diff --git a/.quickstart/quickstart.yml b/.quickstart/quickstart.yml index ad40ee1..0ecca60 100644 --- a/.quickstart/quickstart.yml +++ b/.quickstart/quickstart.yml @@ -6,51 +6,22 @@ multi_connector_config: union_schema_key: amazon_ads_union_schemas model_variable: ad_reporting__amazon_ads_enabled public_models: - - amazon_ads__account_report - amazon_ads__portfolio_report - - amazon_ads__campaign_report - - amazon_ads__ad_group_report - - amazon_ads__ad_report - - amazon_ads__keyword_report - - amazon_ads__search_report apple_search_ads: database_key: apple_search_ads_database union_schema_key: apple_search_ads_union_schemas model_variable: ad_reporting__apple_search_ads_enabled - public_models: - - apple_search_ads__organization_report - - apple_search_ads__campaign_report - - apple_search_ads__ad_group_report - - apple_search_ads__ad_report - - apple_search_ads__keyword_report - - apple_search_ads__search_term_report facebook_ads: database_key: facebook_ads_database union_schema_key: facebook_ads_union_schemas model_variable: ad_reporting__facebook_ads_enabled - public_models: - - facebook_ads__account_report - - facebook_ads__campaign_report - - facebook_ads__ad_set_report - - facebook_ads__ad_report - - facebook_ads__url_report - - facebook_ads__url_tags - - facebook_ads__country_report - - facebook_ads__region_report google_ads: database_key: google_ads_database union_schema_key: google_ads_union_schemas model_variable: ad_reporting__google_ads_enabled public_models: - - google_ads__account_report - - google_ads__campaign_report - google_ads__campaign_bid_modifiers_report - google_ads__campaign_budget_diagnostics_report - - google_ads__ad_group_report - - google_ads__ad_report - - google_ads__keyword_report - - google_ads__search_term_report - - google_ads__url_report supported_vars: google_auto_tagging_enabled: type: boolean @@ -121,14 +92,6 @@ multi_connector_config: database_key: linkedin_ads_database union_schema_key: linkedin_ads_union_schemas model_variable: ad_reporting__linkedin_ads_enabled - public_models: - - linkedin_ads__account_report - - linkedin_ads__campaign_group_report - - linkedin_ads__campaign_report - - linkedin_ads__creative_report - - linkedin_ads__url_report - - linkedin_ads__monthly_campaign_country_report - - linkedin_ads__monthly_campaign_region_report supported_vars: linkedin_ads__use_local_currency: type: boolean @@ -146,16 +109,6 @@ multi_connector_config: database_key: microsoft_ads_database union_schema_key: microsoft_ads_union_schemas model_variable: ad_reporting__microsoft_ads_enabled - public_models: - - microsoft_ads__account_report - - microsoft_ads__campaign_report - - microsoft_ads__ad_group_report - - microsoft_ads__ad_report - - microsoft_ads__keyword_report - - microsoft_ads__search_report - - microsoft_ads__url_report - - microsoft_ads__campaign_country_report - - microsoft_ads__campaign_region_report supported_vars: microsoft_ads_auto_tagging_enabled: type: boolean @@ -166,26 +119,10 @@ multi_connector_config: database_key: pinterest_database union_schema_key: pinterest_ads_union_schemas model_variable: ad_reporting__pinterest_ads_enabled - public_models: - - pinterest_ads__advertiser_report - - pinterest_ads__campaign_report - - pinterest_ads__ad_group_report - - pinterest_ads__pin_promotion_report - - pinterest_ads__keyword_report - - pinterest_ads__url_report - - pinterest_ads__campaign_country_report - - pinterest_ads__campaign_region_report reddit_ads: database_key: reddit_ads_database union_schema_key: reddit_ads_union_schemas model_variable: ad_reporting__reddit_ads_enabled - public_models: - - reddit_ads__account_report - - reddit_ads__campaign_report - - reddit_ads__ad_group_report - - reddit_ads__ad_report - - reddit_ads__url_report - - reddit_ads__campaign_country_report supported_vars: reddit_ads__conversion_event_types: type: list @@ -199,14 +136,6 @@ multi_connector_config: database_key: snapchat_database union_schema_key: snapchat_ads_union_schemas model_variable: ad_reporting__snapchat_ads_enabled - public_models: - - snapchat_ads__account_report - - snapchat_ads__campaign_report - - snapchat_ads__ad_squad_report - - snapchat_ads__ad_report - - snapchat_ads__url_report - - snapchat_ads__campaign_country_report - - snapchat_ads__campaign_region_report supported_vars: snapchat_ads__conversion_fields: type: list @@ -218,26 +147,10 @@ multi_connector_config: database_key: tiktok_ads_database union_schema_key: tiktok_ads_union_schemas model_variable: ad_reporting__tiktok_ads_enabled - public_models: - - tiktok_ads__advertiser_report - - tiktok_ads__campaign_report - - tiktok_ads__ad_group_report - - tiktok_ads__ad_report - - tiktok_ads__url_report - - tiktok_ads__campaign_country_report twitter_ads: database_key: twitter_ads_database union_schema_key: twitter_ads_union_schemas model_variable: ad_reporting__twitter_ads_enabled - public_models: - - twitter_ads__account_report - - twitter_ads__campaign_report - - twitter_ads__line_item_report - - twitter_ads__promoted_tweet_report - - twitter_ads__keyword_report - - twitter_ads__url_report - - twitter_ads__campaign_country_report - - twitter_ads__campaign_region_report supported_vars: twitter_ads__conversion_fields: type: list diff --git a/CHANGELOG.md b/CHANGELOG.md index c9e81c1..3ed7206 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +# dbt_ad_reporting v2.7.2 + +[PR #182](https://github.com/fivetran/dbt_ad_reporting/pull/182) includes the following updates: + +## Under the Hood +- Removes Quickstart UI redundancies by surfacing only connector-level models that are not implicitly run by Ad Reporting: + - [`amazon_ads__portfolio_report`](https://fivetran.github.io/dbt_ad_reporting/#!/model/model.amazon_ads.amazon_ads__portfolio_report) + - [`google_ads__campaign_bid_modifiers_report`](https://fivetran.github.io/dbt_ad_reporting/#!/model/model.google_ads.google_ads__campaign_bid_modifiers_report) + - [`google_ads__campaign_budget_diagnostics_report`](https://fivetran.github.io/dbt_ad_reporting/#!/model/model.google_ads.google_ads__campaign_budget_diagnostics_report) + # dbt_ad_reporting v2.7.1 [PR #179](https://github.com/fivetran/dbt_ad_reporting/pull/179) includes the following updates: diff --git a/dbt_project.yml b/dbt_project.yml index 8756925..09bf8d5 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,5 +1,5 @@ name: 'ad_reporting' -version: '2.7.1' +version: '2.7.2' config-version: 2 diff --git a/docs/catalog.json b/docs/catalog.json index 8ec325e..fd692ed 100644 --- a/docs/catalog.json +++ b/docs/catalog.json @@ -1 +1 @@ -{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/catalog/v1.json", "dbt_version": "1.11.12", "generated_at": "2026-07-07T18:56:09.734907Z", "invocation_id": "1da9f4ef-1e54-4b39-adbc-cc8520ee59ed", "invocation_started_at": "2026-07-07T18:55:47.703230Z", "env": {}}, "nodes": {"seed.ad_reporting_integration_tests.amazon_ads_ad_group_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_ad_group_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "creation_date": {"type": "text", "index": 5, "name": "creation_date", "comment": null}, "default_bid": {"type": "double precision", "index": 6, "name": "default_bid", "comment": null}, "name": {"type": "text", "index": 7, "name": "name", "comment": null}, "serving_status": {"type": "text", "index": 8, "name": "serving_status", "comment": null}, "state": {"type": "text", "index": 9, "name": "state", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_ad_group_history_data"}, "seed.ad_reporting_integration_tests.amazon_ads_ad_group_level_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_ad_group_level_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "campaign_bidding_strategy": {"type": "text", "index": 4, "name": "campaign_bidding_strategy", "comment": null}, "clicks": {"type": "integer", "index": 5, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 6, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_ad_group_level_report_data"}, "seed.ad_reporting_integration_tests.amazon_ads_advertised_product_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_advertised_product_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "integer", "index": 2, "name": "ad_id", "comment": null}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 4, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "campaign_budget_amount": {"type": "double precision", "index": 6, "name": "campaign_budget_amount", "comment": null}, "campaign_budget_currency_code": {"type": "text", "index": 7, "name": "campaign_budget_currency_code", "comment": null}, "campaign_budget_type": {"type": "text", "index": 8, "name": "campaign_budget_type", "comment": null}, "clicks": {"type": "integer", "index": 9, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 10, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 11, "name": "impressions", "comment": null}, "advertised_asin": {"type": "integer", "index": 12, "name": "advertised_asin", "comment": null}, "advertised_sku": {"type": "integer", "index": 13, "name": "advertised_sku", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_advertised_product_report_data"}, "seed.ad_reporting_integration_tests.amazon_ads_campaign_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "bidding_strategy": {"type": "text", "index": 4, "name": "bidding_strategy", "comment": null}, "creation_date": {"type": "text", "index": 5, "name": "creation_date", "comment": null}, "budget": {"type": "integer", "index": 6, "name": "budget", "comment": null}, "end_date": {"type": "integer", "index": 7, "name": "end_date", "comment": null}, "name": {"type": "text", "index": 8, "name": "name", "comment": null}, "portfolio_id": {"type": "integer", "index": 9, "name": "portfolio_id", "comment": null}, "profile_id": {"type": "integer", "index": 10, "name": "profile_id", "comment": null}, "serving_status": {"type": "text", "index": 11, "name": "serving_status", "comment": null}, "start_date": {"type": "date", "index": 12, "name": "start_date", "comment": null}, "state": {"type": "text", "index": 13, "name": "state", "comment": null}, "targeting_type": {"type": "text", "index": 14, "name": "targeting_type", "comment": null}, "budget_type": {"type": "text", "index": 15, "name": "budget_type", "comment": null}, "effective_budget": {"type": "integer", "index": 16, "name": "effective_budget", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_campaign_history_data"}, "seed.ad_reporting_integration_tests.amazon_ads_campaign_level_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_campaign_level_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "campaign_applicable_budget_rule_id": {"type": "integer", "index": 4, "name": "campaign_applicable_budget_rule_id", "comment": null}, "campaign_applicable_budget_rule_name": {"type": "integer", "index": 5, "name": "campaign_applicable_budget_rule_name", "comment": null}, "campaign_bidding_strategy": {"type": "text", "index": 6, "name": "campaign_bidding_strategy", "comment": null}, "campaign_budget_amount": {"type": "double precision", "index": 7, "name": "campaign_budget_amount", "comment": null}, "campaign_budget_currency_code": {"type": "text", "index": 8, "name": "campaign_budget_currency_code", "comment": null}, "campaign_budget_type": {"type": "text", "index": 9, "name": "campaign_budget_type", "comment": null}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 11, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 12, "name": "impressions", "comment": null}, "campaign_rule_based_budget_amount": {"type": "integer", "index": 13, "name": "campaign_rule_based_budget_amount", "comment": null}, "sales_7_d": {"type": "integer", "index": 14, "name": "sales_7_d", "comment": null}, "purchases_30_d": {"type": "integer", "index": 15, "name": "purchases_30_d", "comment": null}, "sales_30_d": {"type": "integer", "index": 16, "name": "sales_30_d", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_campaign_level_report_data"}, "seed.ad_reporting_integration_tests.amazon_ads_keyword_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_keyword_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "ad_group_id": {"type": "integer", "index": 4, "name": "ad_group_id", "comment": null}, "bid": {"type": "double precision", "index": 5, "name": "bid", "comment": null}, "campaign_id": {"type": "integer", "index": 6, "name": "campaign_id", "comment": null}, "creation_date": {"type": "text", "index": 7, "name": "creation_date", "comment": null}, "keyword_text": {"type": "text", "index": 8, "name": "keyword_text", "comment": null}, "match_type": {"type": "text", "index": 9, "name": "match_type", "comment": null}, "native_language_keyword": {"type": "integer", "index": 10, "name": "native_language_keyword", "comment": null}, "serving_status": {"type": "text", "index": 11, "name": "serving_status", "comment": null}, "state": {"type": "text", "index": 12, "name": "state", "comment": null}, "native_language_locale": {"type": "integer", "index": 13, "name": "native_language_locale", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_keyword_history_data"}, "seed.ad_reporting_integration_tests.amazon_ads_portfolio_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_portfolio_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "budget_amount": {"type": "integer", "index": 4, "name": "budget_amount", "comment": null}, "budget_currency_code": {"type": "integer", "index": 5, "name": "budget_currency_code", "comment": null}, "budget_end_date": {"type": "integer", "index": 6, "name": "budget_end_date", "comment": null}, "budget_policy": {"type": "integer", "index": 7, "name": "budget_policy", "comment": null}, "budget_start_date": {"type": "integer", "index": 8, "name": "budget_start_date", "comment": null}, "creation_date": {"type": "text", "index": 9, "name": "creation_date", "comment": null}, "in_budget": {"type": "boolean", "index": 10, "name": "in_budget", "comment": null}, "name": {"type": "text", "index": 11, "name": "name", "comment": null}, "profile_id": {"type": "integer", "index": 12, "name": "profile_id", "comment": null}, "serving_status": {"type": "text", "index": 13, "name": "serving_status", "comment": null}, "state": {"type": "text", "index": 14, "name": "state", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_portfolio_history_data"}, "seed.ad_reporting_integration_tests.amazon_ads_product_ad_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_product_ad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "ad_group_id": {"type": "integer", "index": 4, "name": "ad_group_id", "comment": null}, "asin": {"type": "text", "index": 5, "name": "asin", "comment": null}, "campaign_id": {"type": "integer", "index": 6, "name": "campaign_id", "comment": null}, "creation_date": {"type": "text", "index": 7, "name": "creation_date", "comment": null}, "serving_status": {"type": "text", "index": 8, "name": "serving_status", "comment": null}, "sku": {"type": "integer", "index": 9, "name": "sku", "comment": null}, "state": {"type": "text", "index": 10, "name": "state", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_product_ad_history_data"}, "seed.ad_reporting_integration_tests.amazon_ads_profile_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_profile_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": null}, "account_marketplace_string_id": {"type": "text", "index": 5, "name": "account_marketplace_string_id", "comment": null}, "account_name": {"type": "text", "index": 6, "name": "account_name", "comment": null}, "account_sub_type": {"type": "integer", "index": 7, "name": "account_sub_type", "comment": null}, "account_type": {"type": "text", "index": 8, "name": "account_type", "comment": null}, "account_valid_payment_method": {"type": "boolean", "index": 9, "name": "account_valid_payment_method", "comment": null}, "country_code": {"type": "text", "index": 10, "name": "country_code", "comment": null}, "currency_code": {"type": "text", "index": 11, "name": "currency_code", "comment": null}, "daily_budget": {"type": "integer", "index": 12, "name": "daily_budget", "comment": null}, "timezone": {"type": "text", "index": 13, "name": "timezone", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_profile_data"}, "seed.ad_reporting_integration_tests.amazon_ads_search_term_ad_keyword_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_search_term_ad_keyword_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "keyword_id": {"type": "integer", "index": 4, "name": "keyword_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "campaign_budget_amount": {"type": "double precision", "index": 6, "name": "campaign_budget_amount", "comment": null}, "campaign_budget_currency_code": {"type": "text", "index": 7, "name": "campaign_budget_currency_code", "comment": null}, "campaign_budget_type": {"type": "text", "index": 8, "name": "campaign_budget_type", "comment": null}, "clicks": {"type": "integer", "index": 9, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 10, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 11, "name": "impressions", "comment": null}, "keyword_bid": {"type": "double precision", "index": 12, "name": "keyword_bid", "comment": null}, "search_term": {"type": "text", "index": 13, "name": "search_term", "comment": null}, "targeting": {"type": "text", "index": 14, "name": "targeting", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_search_term_ad_keyword_report_data"}, "seed.ad_reporting_integration_tests.amazon_ads_targeting_keyword_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_targeting_keyword_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "keyword_id": {"type": "integer", "index": 4, "name": "keyword_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "ad_keyword_status": {"type": "text", "index": 6, "name": "ad_keyword_status", "comment": null}, "campaign_budget_amount": {"type": "double precision", "index": 7, "name": "campaign_budget_amount", "comment": null}, "campaign_budget_currency_code": {"type": "text", "index": 8, "name": "campaign_budget_currency_code", "comment": null}, "campaign_budget_type": {"type": "text", "index": 9, "name": "campaign_budget_type", "comment": null}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 11, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 12, "name": "impressions", "comment": null}, "keyword_bid": {"type": "double precision", "index": 13, "name": "keyword_bid", "comment": null}, "keyword_type": {"type": "text", "index": 14, "name": "keyword_type", "comment": null}, "match_type": {"type": "text", "index": 15, "name": "match_type", "comment": null}, "targeting": {"type": "text", "index": 16, "name": "targeting", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_targeting_keyword_report_data"}, "seed.ad_reporting_integration_tests.apple_search_ad_group_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_ad_group_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "timestamp without time zone", "index": 2, "name": "modification_time", "comment": null}, "automated_keywords_opt_in": {"type": "boolean", "index": 3, "name": "automated_keywords_opt_in", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "cpa_goal_amount": {"type": "integer", "index": 5, "name": "cpa_goal_amount", "comment": null}, "cpa_goal_currency": {"type": "integer", "index": 6, "name": "cpa_goal_currency", "comment": null}, "default_cpc_bid_amount": {"type": "integer", "index": 7, "name": "default_cpc_bid_amount", "comment": null}, "default_cpc_bid_currency": {"type": "integer", "index": 8, "name": "default_cpc_bid_currency", "comment": null}, "deleted": {"type": "boolean", "index": 9, "name": "deleted", "comment": null}, "end_time": {"type": "timestamp without time zone", "index": 10, "name": "end_time", "comment": null}, "name": {"type": "text", "index": 11, "name": "name", "comment": null}, "organization_id": {"type": "integer", "index": 12, "name": "organization_id", "comment": null}, "serving_state_reasons": {"type": "integer", "index": 13, "name": "serving_state_reasons", "comment": null}, "serving_status": {"type": "text", "index": 14, "name": "serving_status", "comment": null}, "start_time": {"type": "timestamp without time zone", "index": 15, "name": "start_time", "comment": null}, "status": {"type": "text", "index": 16, "name": "status", "comment": null}, "storefronts": {"type": "integer", "index": 17, "name": "storefronts", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.apple_search_ad_group_history_data"}, "seed.ad_reporting_integration_tests.apple_search_ad_group_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_ad_group_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "avg_cpa_amount": {"type": "double precision", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "text", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "double precision", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "text", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "double precision", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "integer", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "integer", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "integer", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "double precision", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "integer", "index": 17, "name": "taps", "comment": null}, "tap_installs": {"type": "integer", "index": 18, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 19, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 20, "name": "tap_redownloads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.apple_search_ad_group_report_data"}, "seed.ad_reporting_integration_tests.apple_search_ad_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_ad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"creation_time": {"type": "timestamp without time zone", "index": 1, "name": "creation_time", "comment": null}, "modification_time": {"type": "timestamp without time zone", "index": 2, "name": "modification_time", "comment": null}, "org_id": {"type": "integer", "index": 3, "name": "org_id", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "integer", "index": 5, "name": "ad_group_id", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "id": {"type": "integer", "index": 7, "name": "id", "comment": null}, "creative_id": {"type": "integer", "index": 8, "name": "creative_id", "comment": null}, "creative_type": {"type": "text", "index": 9, "name": "creative_type", "comment": null}, "status": {"type": "text", "index": 10, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.apple_search_ad_history_data"}, "seed.ad_reporting_integration_tests.apple_search_ad_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_ad_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "integer", "index": 3, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "integer", "index": 4, "name": "ad_id", "comment": null}, "impressions": {"type": "integer", "index": 5, "name": "impressions", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 6, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 7, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 8, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 9, "name": "redownloads", "comment": null}, "tap_installs": {"type": "integer", "index": 10, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 11, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 12, "name": "tap_redownloads", "comment": null}, "taps": {"type": "integer", "index": 13, "name": "taps", "comment": null}, "conversions": {"type": "integer", "index": 14, "name": "conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.apple_search_ad_report_data"}, "seed.ad_reporting_integration_tests.apple_search_campaign_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "timestamp without time zone", "index": 2, "name": "modification_time", "comment": null}, "adam_id": {"type": "integer", "index": 3, "name": "adam_id", "comment": null}, "budget_amount": {"type": "integer", "index": 4, "name": "budget_amount", "comment": null}, "budget_currency": {"type": "text", "index": 5, "name": "budget_currency", "comment": null}, "budget_orders": {"type": "text", "index": 6, "name": "budget_orders", "comment": null}, "daily_budget_amount": {"type": "integer", "index": 7, "name": "daily_budget_amount", "comment": null}, "daily_budget_currency": {"type": "text", "index": 8, "name": "daily_budget_currency", "comment": null}, "deleted": {"type": "boolean", "index": 9, "name": "deleted", "comment": null}, "end_time": {"type": "timestamp without time zone", "index": 10, "name": "end_time", "comment": null}, "loc_invoice_detail_buyer_email": {"type": "integer", "index": 11, "name": "loc_invoice_detail_buyer_email", "comment": null}, "loc_invoice_detail_buyer_name": {"type": "integer", "index": 12, "name": "loc_invoice_detail_buyer_name", "comment": null}, "loc_invoice_detail_client_name": {"type": "integer", "index": 13, "name": "loc_invoice_detail_client_name", "comment": null}, "loc_invoice_detail_order_number": {"type": "integer", "index": 14, "name": "loc_invoice_detail_order_number", "comment": null}, "name": {"type": "text", "index": 15, "name": "name", "comment": null}, "organization_id": {"type": "integer", "index": 16, "name": "organization_id", "comment": null}, "payment_model": {"type": "text", "index": 17, "name": "payment_model", "comment": null}, "serving_state_reasons": {"type": "text", "index": 18, "name": "serving_state_reasons", "comment": null}, "serving_status": {"type": "text", "index": 19, "name": "serving_status", "comment": null}, "start_time": {"type": "timestamp without time zone", "index": 20, "name": "start_time", "comment": null}, "status": {"type": "text", "index": 21, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.apple_search_campaign_history_data"}, "seed.ad_reporting_integration_tests.apple_search_campaign_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_campaign_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "id": {"type": "integer", "index": 2, "name": "id", "comment": null}, "avg_cpa_amount": {"type": "double precision", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "text", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "double precision", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "text", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "double precision", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "integer", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "integer", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "integer", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "double precision", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "integer", "index": 17, "name": "taps", "comment": null}, "tap_installs": {"type": "integer", "index": 18, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 19, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 20, "name": "tap_redownloads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.apple_search_campaign_report_data"}, "seed.ad_reporting_integration_tests.apple_search_keyword_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_keyword_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "timestamp without time zone", "index": 2, "name": "modification_time", "comment": null}, "ad_group_id": {"type": "integer", "index": 3, "name": "ad_group_id", "comment": null}, "bid_amount": {"type": "double precision", "index": 4, "name": "bid_amount", "comment": null}, "bid_currency": {"type": "text", "index": 5, "name": "bid_currency", "comment": null}, "campaign_id": {"type": "integer", "index": 6, "name": "campaign_id", "comment": null}, "deleted": {"type": "boolean", "index": 7, "name": "deleted", "comment": null}, "match_type": {"type": "text", "index": 8, "name": "match_type", "comment": null}, "status": {"type": "text", "index": 9, "name": "status", "comment": null}, "text": {"type": "text", "index": 10, "name": "text", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.apple_search_keyword_history_data"}, "seed.ad_reporting_integration_tests.apple_search_keyword_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_keyword_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "id": {"type": "integer", "index": 2, "name": "id", "comment": null}, "avg_cpa_amount": {"type": "double precision", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "text", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "double precision", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "text", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "double precision", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "integer", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "integer", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "integer", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "double precision", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "integer", "index": 17, "name": "taps", "comment": null}, "tap_installs": {"type": "integer", "index": 18, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 19, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 20, "name": "tap_redownloads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.apple_search_keyword_report_data"}, "seed.ad_reporting_integration_tests.apple_search_organization_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_organization_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "currency": {"type": "text", "index": 2, "name": "currency", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "payment_model": {"type": "text", "index": 4, "name": "payment_model", "comment": null}, "role_names": {"type": "text", "index": 5, "name": "role_names", "comment": null}, "time_zone": {"type": "text", "index": 6, "name": "time_zone", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.apple_search_organization_data"}, "seed.ad_reporting_integration_tests.apple_search_search_term_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_search_term_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "ad_group_id": {"type": "integer", "index": 2, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 4, "name": "date", "comment": null}, "ad_group_deleted": {"type": "boolean", "index": 5, "name": "ad_group_deleted", "comment": null}, "ad_group_name": {"type": "text", "index": 6, "name": "ad_group_name", "comment": null}, "avg_cpa_amount": {"type": "double precision", "index": 7, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "text", "index": 8, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "double precision", "index": 9, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "text", "index": 10, "name": "avg_cpt_currency", "comment": null}, "bid_amount_amount": {"type": "double precision", "index": 11, "name": "bid_amount_amount", "comment": null}, "bid_amount_currency": {"type": "text", "index": 12, "name": "bid_amount_currency", "comment": null}, "conversion_rate": {"type": "double precision", "index": 13, "name": "conversion_rate", "comment": null}, "conversions": {"type": "integer", "index": 14, "name": "conversions", "comment": null}, "deleted": {"type": "boolean", "index": 15, "name": "deleted", "comment": null}, "impressions": {"type": "integer", "index": 16, "name": "impressions", "comment": null}, "keyword": {"type": "text", "index": 17, "name": "keyword", "comment": null}, "keyword_display_status": {"type": "text", "index": 18, "name": "keyword_display_status", "comment": null}, "keyword_id": {"type": "integer", "index": 19, "name": "keyword_id", "comment": null}, "lat_off_installs": {"type": "integer", "index": 20, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "integer", "index": 21, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 22, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 23, "name": "local_spend_currency", "comment": null}, "match_type": {"type": "text", "index": 24, "name": "match_type", "comment": null}, "new_downloads": {"type": "integer", "index": 25, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 26, "name": "redownloads", "comment": null}, "search_term_source": {"type": "text", "index": 27, "name": "search_term_source", "comment": null}, "search_term_text": {"type": "text", "index": 28, "name": "search_term_text", "comment": null}, "tap_through_rate": {"type": "double precision", "index": 29, "name": "tap_through_rate", "comment": null}, "taps": {"type": "integer", "index": 30, "name": "taps", "comment": null}, "tap_installs": {"type": "integer", "index": 31, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 32, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 33, "name": "tap_redownloads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.apple_search_search_term_report_data"}, "seed.ad_reporting_integration_tests.facebook_ads_account_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_account_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "character varying", "index": 2, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_account_history_data"}, "seed.ad_reporting_integration_tests.facebook_ads_ad_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_ad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "ad_set_id": {"type": "bigint", "index": 3, "name": "ad_set_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": null}, "creative_id": {"type": "bigint", "index": 5, "name": "creative_id", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}, "updated_time": {"type": "timestamp without time zone", "index": 8, "name": "updated_time", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_ad_history_data"}, "seed.ad_reporting_integration_tests.facebook_ads_ad_set_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_ad_set_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "updated_time": {"type": "timestamp without time zone", "index": 6, "name": "updated_time", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_ad_set_history_data"}, "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_action_values_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_basic_ad_action_values_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "integer", "index": 1, "name": "ad_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "_fivetran_id": {"type": "text", "index": 3, "name": "_fivetran_id", "comment": null}, "index": {"type": "integer", "index": 4, "name": "index", "comment": null}, "action_type": {"type": "text", "index": 5, "name": "action_type", "comment": null}, "value": {"type": "double precision", "index": 6, "name": "value", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}, "_7_d_click": {"type": "double precision", "index": 8, "name": "_7_d_click", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_action_values_data"}, "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_actions_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_basic_ad_actions_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "ad_id": {"type": "integer", "index": 2, "name": "ad_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "index": {"type": "integer", "index": 4, "name": "index", "comment": null}, "_1_d_view": {"type": "double precision", "index": 5, "name": "_1_d_view", "comment": null}, "_7_d_click": {"type": "double precision", "index": 6, "name": "_7_d_click", "comment": null}, "_fivetran_synced": {"type": "text", "index": 7, "name": "_fivetran_synced", "comment": null}, "action_type": {"type": "text", "index": 8, "name": "action_type", "comment": null}, "inline": {"type": "double precision", "index": 9, "name": "inline", "comment": null}, "value": {"type": "double precision", "index": 10, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_actions_data"}, "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_basic_ad_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "bigint", "index": 1, "name": "ad_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "impressions": {"type": "integer", "index": 4, "name": "impressions", "comment": null}, "inline_link_clicks": {"type": "integer", "index": 5, "name": "inline_link_clicks", "comment": null}, "spend": {"type": "double precision", "index": 6, "name": "spend", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_data"}, "seed.ad_reporting_integration_tests.facebook_ads_campaign_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "updated_time": {"type": "timestamp without time zone", "index": 5, "name": "updated_time", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_campaign_history_data"}, "seed.ad_reporting_integration_tests.facebook_ads_creative_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_creative_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"page_link": {"type": "character varying", "index": 1, "name": "page_link", "comment": null}, "template_page_link": {"type": "character varying", "index": 2, "name": "template_page_link", "comment": null}, "id": {"type": "bigint", "index": 3, "name": "id", "comment": null}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "url_tags": {"type": "text", "index": 6, "name": "url_tags", "comment": null}, "_fivetran_synced": {"type": "text", "index": 7, "name": "_fivetran_synced", "comment": null}, "asset_feed_spec_link_urls": {"type": "text", "index": 8, "name": "asset_feed_spec_link_urls", "comment": null}, "object_story_link_data_child_attachments": {"type": "text", "index": 9, "name": "object_story_link_data_child_attachments", "comment": null}, "object_story_link_data_caption": {"type": "text", "index": 10, "name": "object_story_link_data_caption", "comment": null}, "object_story_link_data_description": {"type": "text", "index": 11, "name": "object_story_link_data_description", "comment": null}, "object_story_link_data_link": {"type": "text", "index": 12, "name": "object_story_link_data_link", "comment": null}, "object_story_link_data_message": {"type": "text", "index": 13, "name": "object_story_link_data_message", "comment": null}, "template_app_link_spec_ios": {"type": "text", "index": 14, "name": "template_app_link_spec_ios", "comment": null}, "_fivetran_id": {"type": "text", "index": 15, "name": "_fivetran_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_creative_history_data"}, "seed.ad_reporting_integration_tests.facebook_ads_demographics_country_actions_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_demographics_country_actions_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "action_type": {"type": "text", "index": 4, "name": "action_type", "comment": null}, "date": {"type": "date", "index": 5, "name": "date", "comment": null}, "index": {"type": "integer", "index": 6, "name": "index", "comment": null}, "inline": {"type": "double precision", "index": 7, "name": "inline", "comment": null}, "value": {"type": "double precision", "index": 8, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_demographics_country_actions_data"}, "seed.ad_reporting_integration_tests.facebook_ads_demographics_country_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_demographics_country_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "country": {"type": "text", "index": 4, "name": "country", "comment": null}, "date": {"type": "date", "index": 5, "name": "date", "comment": null}, "frequency": {"type": "double precision", "index": 6, "name": "frequency", "comment": null}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": null}, "inline_link_clicks": {"type": "integer", "index": 8, "name": "inline_link_clicks", "comment": null}, "reach": {"type": "integer", "index": 9, "name": "reach", "comment": null}, "spend": {"type": "double precision", "index": 10, "name": "spend", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_demographics_country_data"}, "seed.ad_reporting_integration_tests.facebook_ads_demographics_region_actions_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_demographics_region_actions_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "action_type": {"type": "text", "index": 4, "name": "action_type", "comment": null}, "date": {"type": "date", "index": 5, "name": "date", "comment": null}, "index": {"type": "integer", "index": 6, "name": "index", "comment": null}, "value": {"type": "double precision", "index": 7, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_demographics_region_actions_data"}, "seed.ad_reporting_integration_tests.facebook_ads_demographics_region_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_demographics_region_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "date": {"type": "date", "index": 4, "name": "date", "comment": null}, "frequency": {"type": "double precision", "index": 5, "name": "frequency", "comment": null}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": null}, "inline_link_clicks": {"type": "integer", "index": 7, "name": "inline_link_clicks", "comment": null}, "reach": {"type": "integer", "index": 8, "name": "reach", "comment": null}, "region": {"type": "text", "index": 9, "name": "region", "comment": null}, "spend": {"type": "double precision", "index": 10, "name": "spend", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_demographics_region_data"}, "seed.ad_reporting_integration_tests.google_ads_account_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_account_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "auto_tagging_enabled": {"type": "boolean", "index": 4, "name": "auto_tagging_enabled", "comment": null}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": null}, "descriptive_name": {"type": "integer", "index": 6, "name": "descriptive_name", "comment": null}, "final_url_suffix": {"type": "boolean", "index": 7, "name": "final_url_suffix", "comment": null}, "hidden": {"type": "boolean", "index": 8, "name": "hidden", "comment": null}, "manager": {"type": "integer", "index": 9, "name": "manager", "comment": null}, "manager_customer_id": {"type": "double precision", "index": 10, "name": "manager_customer_id", "comment": null}, "optimization_score": {"type": "text", "index": 11, "name": "optimization_score", "comment": null}, "pay_per_conversion_eligibility_failure_reasons": {"type": "boolean", "index": 12, "name": "pay_per_conversion_eligibility_failure_reasons", "comment": null}, "test_account": {"type": "text", "index": 13, "name": "test_account", "comment": null}, "time_zone": {"type": "integer", "index": 14, "name": "time_zone", "comment": null}, "tracking_url_template": {"type": "integer", "index": 15, "name": "tracking_url_template", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_account_history_data"}, "seed.ad_reporting_integration_tests.google_ads_account_stats_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_account_stats_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "customer_id": {"type": "integer", "index": 2, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "active_view_impressions": {"type": "integer", "index": 5, "name": "active_view_impressions", "comment": null}, "active_view_measurability": {"type": "integer", "index": 6, "name": "active_view_measurability", "comment": null}, "active_view_measurable_cost_micros": {"type": "integer", "index": 7, "name": "active_view_measurable_cost_micros", "comment": null}, "active_view_measurable_impressions": {"type": "integer", "index": 8, "name": "active_view_measurable_impressions", "comment": null}, "active_view_viewability": {"type": "integer", "index": 9, "name": "active_view_viewability", "comment": null}, "ad_network_type": {"type": "text", "index": 10, "name": "ad_network_type", "comment": null}, "clicks": {"type": "integer", "index": 11, "name": "clicks", "comment": null}, "conversions": {"type": "integer", "index": 12, "name": "conversions", "comment": null}, "conversions_value": {"type": "integer", "index": 13, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 14, "name": "cost_micros", "comment": null}, "device": {"type": "text", "index": 15, "name": "device", "comment": null}, "impressions": {"type": "integer", "index": 16, "name": "impressions", "comment": null}, "interaction_event_types": {"type": "text", "index": 17, "name": "interaction_event_types", "comment": null}, "interactions": {"type": "integer", "index": 18, "name": "interactions", "comment": null}, "view_through_conversions": {"type": "integer", "index": 19, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_account_stats_data"}, "seed.ad_reporting_integration_tests.google_ads_ad_group_criterion_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_ad_group_criterion_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 2, "name": "ad_group_id", "comment": null}, "base_campaign_id": {"type": "bigint", "index": 3, "name": "base_campaign_id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 4, "name": "updated_at", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "type": {"type": "text", "index": 6, "name": "type", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}, "keyword_match_type": {"type": "text", "index": 8, "name": "keyword_match_type", "comment": null}, "keyword_text": {"type": "text", "index": 9, "name": "keyword_text", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_ad_group_criterion_history_data"}, "seed.ad_reporting_integration_tests.google_ads_ad_group_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_ad_group_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "type": {"type": "text", "index": 3, "name": "type", "comment": null}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_ad_group_history_data"}, "seed.ad_reporting_integration_tests.google_ads_ad_group_stats_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_ad_group_stats_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "customer_id": {"type": "bigint", "index": 2, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "active_view_impressions": {"type": "integer", "index": 5, "name": "active_view_impressions", "comment": null}, "active_view_measurability": {"type": "integer", "index": 6, "name": "active_view_measurability", "comment": null}, "active_view_measurable_cost_micros": {"type": "integer", "index": 7, "name": "active_view_measurable_cost_micros", "comment": null}, "active_view_measurable_impressions": {"type": "integer", "index": 8, "name": "active_view_measurable_impressions", "comment": null}, "active_view_viewability": {"type": "integer", "index": 9, "name": "active_view_viewability", "comment": null}, "ad_network_type": {"type": "text", "index": 10, "name": "ad_network_type", "comment": null}, "base_ad_group": {"type": "text", "index": 11, "name": "base_ad_group", "comment": null}, "campaign_base_campaign": {"type": "text", "index": 12, "name": "campaign_base_campaign", "comment": null}, "campaign_id": {"type": "bigint", "index": 13, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 14, "name": "clicks", "comment": null}, "conversions": {"type": "double precision", "index": 15, "name": "conversions", "comment": null}, "conversions_value": {"type": "integer", "index": 16, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 17, "name": "cost_micros", "comment": null}, "device": {"type": "text", "index": 18, "name": "device", "comment": null}, "id": {"type": "bigint", "index": 19, "name": "id", "comment": null}, "impressions": {"type": "integer", "index": 20, "name": "impressions", "comment": null}, "interaction_event_types": {"type": "text", "index": 21, "name": "interaction_event_types", "comment": null}, "interactions": {"type": "integer", "index": 22, "name": "interactions", "comment": null}, "view_through_conversions": {"type": "integer", "index": 23, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_ad_group_stats_data"}, "seed.ad_reporting_integration_tests.google_ads_ad_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_ad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "bigint", "index": 1, "name": "ad_group_id", "comment": null}, "id": {"type": "bigint", "index": 2, "name": "id", "comment": null}, "name": {"type": "integer", "index": 3, "name": "name", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 4, "name": "updated_at", "comment": null}, "type": {"type": "integer", "index": 5, "name": "type", "comment": null}, "status": {"type": "text", "index": 6, "name": "status", "comment": null}, "display_url": {"type": "integer", "index": 7, "name": "display_url", "comment": null}, "final_urls": {"type": "text", "index": 8, "name": "final_urls", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_ad_history_data"}, "seed.ad_reporting_integration_tests.google_ads_ad_stats_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_ad_stats_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"customer_id": {"type": "bigint", "index": 1, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "ad_group": {"type": "text", "index": 4, "name": "ad_group", "comment": null}, "keyword_ad_group_criterion": {"type": "text", "index": 5, "name": "keyword_ad_group_criterion", "comment": null}, "ad_network_type": {"type": "text", "index": 6, "name": "ad_network_type", "comment": null}, "device": {"type": "text", "index": 7, "name": "device", "comment": null}, "ad_id": {"type": "bigint", "index": 8, "name": "ad_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 9, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": null}, "cost_micros": {"type": "integer", "index": 11, "name": "cost_micros", "comment": null}, "impressions": {"type": "integer", "index": 12, "name": "impressions", "comment": null}, "conversions": {"type": "integer", "index": 13, "name": "conversions", "comment": null}, "conversions_value": {"type": "double precision", "index": 14, "name": "conversions_value", "comment": null}, "view_through_conversions": {"type": "integer", "index": 15, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_ad_stats_data"}, "seed.ad_reporting_integration_tests.google_ads_campaign_bid_modifier_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_campaign_bid_modifier_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "bigint", "index": 1, "name": "campaign_id", "comment": null}, "criterion_id": {"type": "bigint", "index": 2, "name": "criterion_id", "comment": null}, "bid_modifier": {"type": "double precision", "index": 3, "name": "bid_modifier", "comment": null}, "interaction_type": {"type": "text", "index": 4, "name": "interaction_type", "comment": null}, "interaction_event_types": {"type": "text", "index": 5, "name": "interaction_event_types", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 6, "name": "updated_at", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 7, "name": "_fivetran_active", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_campaign_bid_modifier_history_data"}, "seed.ad_reporting_integration_tests.google_ads_campaign_bidding_strategy_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_campaign_bidding_strategy_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "bigint", "index": 1, "name": "campaign_id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "cpc_bid_ceiling_micros": {"type": "integer", "index": 3, "name": "cpc_bid_ceiling_micros", "comment": null}, "cpc_bid_floor_micros": {"type": "integer", "index": 4, "name": "cpc_bid_floor_micros", "comment": null}, "enhanced_cpc": {"type": "boolean", "index": 5, "name": "enhanced_cpc", "comment": null}, "enhanced_cpc_enabled": {"type": "boolean", "index": 6, "name": "enhanced_cpc_enabled", "comment": null}, "location": {"type": "text", "index": 7, "name": "location", "comment": null}, "location_fraction_micros": {"type": "integer", "index": 8, "name": "location_fraction_micros", "comment": null}, "manual_cpa": {"type": "double precision", "index": 9, "name": "manual_cpa", "comment": null}, "manual_cpm": {"type": "double precision", "index": 10, "name": "manual_cpm", "comment": null}, "manual_cpv": {"type": "double precision", "index": 11, "name": "manual_cpv", "comment": null}, "name": {"type": "text", "index": 12, "name": "name", "comment": null}, "status": {"type": "text", "index": 13, "name": "status", "comment": null}, "target_cpa_micros": {"type": "integer", "index": 14, "name": "target_cpa_micros", "comment": null}, "target_cpm": {"type": "integer", "index": 15, "name": "target_cpm", "comment": null}, "target_roas": {"type": "double precision", "index": 16, "name": "target_roas", "comment": null}, "type": {"type": "text", "index": 17, "name": "type", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 18, "name": "_fivetran_active", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 19, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_campaign_bidding_strategy_history_data"}, "seed.ad_reporting_integration_tests.google_ads_campaign_budget_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_campaign_budget_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "amount_micros": {"type": "integer", "index": 4, "name": "amount_micros", "comment": null}, "delivery_method": {"type": "text", "index": 5, "name": "delivery_method", "comment": null}, "explicitly_shared": {"type": "boolean", "index": 6, "name": "explicitly_shared", "comment": null}, "name": {"type": "text", "index": 7, "name": "name", "comment": null}, "reference_count": {"type": "integer", "index": 8, "name": "reference_count", "comment": null}, "status": {"type": "text", "index": 9, "name": "status", "comment": null}, "has_recommended_budget": {"type": "boolean", "index": 10, "name": "has_recommended_budget", "comment": null}, "period": {"type": "text", "index": 11, "name": "period", "comment": null}, "recommended_budget_amount_micros": {"type": "integer", "index": 12, "name": "recommended_budget_amount_micros", "comment": null}, "total_amount_micros": {"type": "integer", "index": 13, "name": "total_amount_micros", "comment": null}, "type": {"type": "text", "index": 14, "name": "type", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 15, "name": "_fivetran_active", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 16, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_campaign_budget_history_data"}, "seed.ad_reporting_integration_tests.google_ads_campaign_criterion_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_campaign_criterion_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "geo_target_constant_id": {"type": "bigint", "index": 4, "name": "geo_target_constant_id", "comment": null}, "mobile_device_id": {"type": "bigint", "index": 5, "name": "mobile_device_id", "comment": null}, "operating_system_version_id": {"type": "bigint", "index": 6, "name": "operating_system_version_id", "comment": null}, "topic_constant_id": {"type": "bigint", "index": 7, "name": "topic_constant_id", "comment": null}, "user_interest_id": {"type": "bigint", "index": 8, "name": "user_interest_id", "comment": null}, "user_list_id": {"type": "bigint", "index": 9, "name": "user_list_id", "comment": null}, "age_range_type": {"type": "text", "index": 10, "name": "age_range_type", "comment": null}, "bid_modifier": {"type": "double precision", "index": 11, "name": "bid_modifier", "comment": null}, "carrier_country_code": {"type": "text", "index": 12, "name": "carrier_country_code", "comment": null}, "carrier_name": {"type": "text", "index": 13, "name": "carrier_name", "comment": null}, "content_label_type": {"type": "text", "index": 14, "name": "content_label_type", "comment": null}, "device_type": {"type": "text", "index": 15, "name": "device_type", "comment": null}, "display_name": {"type": "text", "index": 16, "name": "display_name", "comment": null}, "gender_type": {"type": "text", "index": 17, "name": "gender_type", "comment": null}, "income_range_type": {"type": "text", "index": 18, "name": "income_range_type", "comment": null}, "ip_block_ip_address": {"type": "text", "index": 19, "name": "ip_block_ip_address", "comment": null}, "negative": {"type": "boolean", "index": 20, "name": "negative", "comment": null}, "keyword_match_type": {"type": "text", "index": 21, "name": "keyword_match_type", "comment": null}, "keyword_text": {"type": "text", "index": 22, "name": "keyword_text", "comment": null}, "language_code": {"type": "text", "index": 23, "name": "language_code", "comment": null}, "language_name": {"type": "text", "index": 24, "name": "language_name", "comment": null}, "mobile_app_category_constant_id": {"type": "bigint", "index": 25, "name": "mobile_app_category_constant_id", "comment": null}, "mobile_app_category_constant_name": {"type": "text", "index": 26, "name": "mobile_app_category_constant_name", "comment": null}, "mobile_application_app_id": {"type": "text", "index": 27, "name": "mobile_application_app_id", "comment": null}, "mobile_application_name": {"type": "text", "index": 28, "name": "mobile_application_name", "comment": null}, "parental_status_type": {"type": "text", "index": 29, "name": "parental_status_type", "comment": null}, "placement_url": {"type": "text", "index": 30, "name": "placement_url", "comment": null}, "status": {"type": "text", "index": 31, "name": "status", "comment": null}, "type": {"type": "text", "index": 32, "name": "type", "comment": null}, "youtube_channel_id": {"type": "text", "index": 33, "name": "youtube_channel_id", "comment": null}, "youtube_video_id": {"type": "text", "index": 34, "name": "youtube_video_id", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 35, "name": "_fivetran_active", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 36, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_campaign_criterion_history_data"}, "seed.ad_reporting_integration_tests.google_ads_campaign_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "customer_id": {"type": "bigint", "index": 4, "name": "customer_id", "comment": null}, "advertising_channel_type": {"type": "text", "index": 5, "name": "advertising_channel_type", "comment": null}, "advertising_channel_subtype": {"type": "text", "index": 6, "name": "advertising_channel_subtype", "comment": null}, "start_date": {"type": "date", "index": 7, "name": "start_date", "comment": null}, "end_date": {"type": "date", "index": 8, "name": "end_date", "comment": null}, "serving_status": {"type": "text", "index": 9, "name": "serving_status", "comment": null}, "status": {"type": "text", "index": 10, "name": "status", "comment": null}, "tracking_url_template": {"type": "integer", "index": 11, "name": "tracking_url_template", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_campaign_history_data"}, "seed.ad_reporting_integration_tests.google_ads_campaign_stats_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_campaign_stats_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "customer_id": {"type": "bigint", "index": 2, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "active_view_impressions": {"type": "integer", "index": 5, "name": "active_view_impressions", "comment": null}, "active_view_measurability": {"type": "integer", "index": 6, "name": "active_view_measurability", "comment": null}, "active_view_measurable_cost_micros": {"type": "integer", "index": 7, "name": "active_view_measurable_cost_micros", "comment": null}, "active_view_measurable_impressions": {"type": "integer", "index": 8, "name": "active_view_measurable_impressions", "comment": null}, "active_view_viewability": {"type": "integer", "index": 9, "name": "active_view_viewability", "comment": null}, "ad_network_type": {"type": "text", "index": 10, "name": "ad_network_type", "comment": null}, "base_campaign": {"type": "text", "index": 11, "name": "base_campaign", "comment": null}, "clicks": {"type": "integer", "index": 12, "name": "clicks", "comment": null}, "conversions": {"type": "integer", "index": 13, "name": "conversions", "comment": null}, "conversions_value": {"type": "integer", "index": 14, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 15, "name": "cost_micros", "comment": null}, "device": {"type": "text", "index": 16, "name": "device", "comment": null}, "id": {"type": "bigint", "index": 17, "name": "id", "comment": null}, "impressions": {"type": "integer", "index": 18, "name": "impressions", "comment": null}, "interaction_event_types": {"type": "text", "index": 19, "name": "interaction_event_types", "comment": null}, "interactions": {"type": "integer", "index": 20, "name": "interactions", "comment": null}, "view_through_conversions": {"type": "integer", "index": 21, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_campaign_stats_data"}, "seed.ad_reporting_integration_tests.google_ads_keyword_stats_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_keyword_stats_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "customer_id": {"type": "bigint", "index": 2, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "active_view_impressions": {"type": "integer", "index": 5, "name": "active_view_impressions", "comment": null}, "active_view_measurability": {"type": "integer", "index": 6, "name": "active_view_measurability", "comment": null}, "active_view_measurable_cost_micros": {"type": "integer", "index": 7, "name": "active_view_measurable_cost_micros", "comment": null}, "active_view_measurable_impressions": {"type": "integer", "index": 8, "name": "active_view_measurable_impressions", "comment": null}, "active_view_viewability": {"type": "integer", "index": 9, "name": "active_view_viewability", "comment": null}, "ad_group_base_ad_group": {"type": "text", "index": 10, "name": "ad_group_base_ad_group", "comment": null}, "ad_group_criterion_criterion_id": {"type": "bigint", "index": 11, "name": "ad_group_criterion_criterion_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 12, "name": "ad_group_id", "comment": null}, "ad_network_type": {"type": "text", "index": 13, "name": "ad_network_type", "comment": null}, "campaign_base_campaign": {"type": "text", "index": 14, "name": "campaign_base_campaign", "comment": null}, "campaign_id": {"type": "bigint", "index": 15, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 16, "name": "clicks", "comment": null}, "conversions": {"type": "integer", "index": 17, "name": "conversions", "comment": null}, "conversions_value": {"type": "integer", "index": 18, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 19, "name": "cost_micros", "comment": null}, "device": {"type": "text", "index": 20, "name": "device", "comment": null}, "impressions": {"type": "integer", "index": 21, "name": "impressions", "comment": null}, "interaction_event_types": {"type": "text", "index": 22, "name": "interaction_event_types", "comment": null}, "interactions": {"type": "integer", "index": 23, "name": "interactions", "comment": null}, "view_through_conversions": {"type": "integer", "index": 24, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_keyword_stats_data"}, "seed.ad_reporting_integration_tests.google_ads_search_term_keyword_stats_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_search_term_keyword_stats_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 5, "name": "clicks", "comment": null}, "conversions": {"type": "double precision", "index": 6, "name": "conversions", "comment": null}, "conversions_value": {"type": "double precision", "index": 7, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 8, "name": "cost_micros", "comment": null}, "customer_id": {"type": "bigint", "index": 9, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 10, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 11, "name": "impressions", "comment": null}, "info_text": {"type": "text", "index": 12, "name": "info_text", "comment": null}, "keyword_ad_group_criterion": {"type": "text", "index": 13, "name": "keyword_ad_group_criterion", "comment": null}, "search_term": {"type": "text", "index": 14, "name": "search_term", "comment": null}, "search_term_match_type": {"type": "text", "index": 15, "name": "search_term_match_type", "comment": null}, "status": {"type": "text", "index": 16, "name": "status", "comment": null}, "view_through_conversions": {"type": "integer", "index": 17, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_search_term_keyword_stats_data"}, "seed.ad_reporting_integration_tests.linkedin_ad_account_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_ad_account_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_modified_time": {"type": "timestamp without time zone", "index": 2, "name": "last_modified_time", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 3, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "currency": {"type": "text", "index": 5, "name": "currency", "comment": null}, "version_tag": {"type": "integer", "index": 6, "name": "version_tag", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.linkedin_ad_account_history_data"}, "seed.ad_reporting_integration_tests.linkedin_ad_analytics_by_campaign_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_ad_analytics_by_campaign_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "day": {"type": "timestamp without time zone", "index": 2, "name": "day", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "action_clicks": {"type": "integer", "index": 4, "name": "action_clicks", "comment": null}, "ad_unit_clicks": {"type": "integer", "index": 5, "name": "ad_unit_clicks", "comment": null}, "approximate_unique_impressions": {"type": "integer", "index": 6, "name": "approximate_unique_impressions", "comment": null}, "card_clicks": {"type": "integer", "index": 7, "name": "card_clicks", "comment": null}, "card_impressions": {"type": "integer", "index": 8, "name": "card_impressions", "comment": null}, "clicks": {"type": "integer", "index": 9, "name": "clicks", "comment": null}, "comment_likes": {"type": "integer", "index": 10, "name": "comment_likes", "comment": null}, "comments": {"type": "integer", "index": 11, "name": "comments", "comment": null}, "company_page_clicks": {"type": "integer", "index": 12, "name": "company_page_clicks", "comment": null}, "conversion_value_in_local_currency": {"type": "integer", "index": 13, "name": "conversion_value_in_local_currency", "comment": null}, "cost_in_local_currency": {"type": "double precision", "index": 14, "name": "cost_in_local_currency", "comment": null}, "cost_in_usd": {"type": "double precision", "index": 15, "name": "cost_in_usd", "comment": null}, "external_website_conversions": {"type": "bigint", "index": 16, "name": "external_website_conversions", "comment": null}, "external_website_post_click_conversions": {"type": "integer", "index": 17, "name": "external_website_post_click_conversions", "comment": null}, "external_website_post_view_conversions": {"type": "integer", "index": 18, "name": "external_website_post_view_conversions", "comment": null}, "follows": {"type": "integer", "index": 19, "name": "follows", "comment": null}, "full_screen_plays": {"type": "integer", "index": 20, "name": "full_screen_plays", "comment": null}, "impressions": {"type": "integer", "index": 21, "name": "impressions", "comment": null}, "landing_page_clicks": {"type": "integer", "index": 22, "name": "landing_page_clicks", "comment": null}, "lead_generation_mail_contact_info_shares": {"type": "integer", "index": 23, "name": "lead_generation_mail_contact_info_shares", "comment": null}, "lead_generation_mail_interested_clicks": {"type": "integer", "index": 24, "name": "lead_generation_mail_interested_clicks", "comment": null}, "likes": {"type": "integer", "index": 25, "name": "likes", "comment": null}, "one_click_lead_form_opens": {"type": "integer", "index": 26, "name": "one_click_lead_form_opens", "comment": null}, "one_click_leads": {"type": "integer", "index": 27, "name": "one_click_leads", "comment": null}, "opens": {"type": "integer", "index": 28, "name": "opens", "comment": null}, "other_engagements": {"type": "integer", "index": 29, "name": "other_engagements", "comment": null}, "shares": {"type": "integer", "index": 30, "name": "shares", "comment": null}, "text_url_clicks": {"type": "integer", "index": 31, "name": "text_url_clicks", "comment": null}, "total_engagements": {"type": "integer", "index": 32, "name": "total_engagements", "comment": null}, "video_completions": {"type": "integer", "index": 33, "name": "video_completions", "comment": null}, "video_first_quartile_completions": {"type": "integer", "index": 34, "name": "video_first_quartile_completions", "comment": null}, "video_midpoint_completions": {"type": "integer", "index": 35, "name": "video_midpoint_completions", "comment": null}, "video_starts": {"type": "integer", "index": 36, "name": "video_starts", "comment": null}, "video_third_quartile_completions": {"type": "integer", "index": 37, "name": "video_third_quartile_completions", "comment": null}, "video_views": {"type": "integer", "index": 38, "name": "video_views", "comment": null}, "viral_card_clicks": {"type": "integer", "index": 39, "name": "viral_card_clicks", "comment": null}, "viral_card_impressions": {"type": "integer", "index": 40, "name": "viral_card_impressions", "comment": null}, "viral_clicks": {"type": "integer", "index": 41, "name": "viral_clicks", "comment": null}, "viral_comment_likes": {"type": "integer", "index": 42, "name": "viral_comment_likes", "comment": null}, "viral_comments": {"type": "integer", "index": 43, "name": "viral_comments", "comment": null}, "viral_company_page_clicks": {"type": "integer", "index": 44, "name": "viral_company_page_clicks", "comment": null}, "viral_external_website_conversions": {"type": "integer", "index": 45, "name": "viral_external_website_conversions", "comment": null}, "viral_external_website_post_click_conversions": {"type": "integer", "index": 46, "name": "viral_external_website_post_click_conversions", "comment": null}, "viral_external_website_post_view_conversions": {"type": "integer", "index": 47, "name": "viral_external_website_post_view_conversions", "comment": null}, "viral_follows": {"type": "integer", "index": 48, "name": "viral_follows", "comment": null}, "viral_full_screen_plays": {"type": "integer", "index": 49, "name": "viral_full_screen_plays", "comment": null}, "viral_impressions": {"type": "integer", "index": 50, "name": "viral_impressions", "comment": null}, "viral_landing_page_clicks": {"type": "integer", "index": 51, "name": "viral_landing_page_clicks", "comment": null}, "viral_likes": {"type": "integer", "index": 52, "name": "viral_likes", "comment": null}, "viral_one_click_lead_form_opens": {"type": "integer", "index": 53, "name": "viral_one_click_lead_form_opens", "comment": null}, "viral_one_click_leads": {"type": "integer", "index": 54, "name": "viral_one_click_leads", "comment": null}, "viral_other_engagements": {"type": "integer", "index": 55, "name": "viral_other_engagements", "comment": null}, "viral_shares": {"type": "integer", "index": 56, "name": "viral_shares", "comment": null}, "viral_total_engagements": {"type": "integer", "index": 57, "name": "viral_total_engagements", "comment": null}, "viral_video_completions": {"type": "integer", "index": 58, "name": "viral_video_completions", "comment": null}, "viral_video_first_quartile_completions": {"type": "integer", "index": 59, "name": "viral_video_first_quartile_completions", "comment": null}, "viral_video_midpoint_completions": {"type": "integer", "index": 60, "name": "viral_video_midpoint_completions", "comment": null}, "viral_video_starts": {"type": "integer", "index": 61, "name": "viral_video_starts", "comment": null}, "viral_video_third_quartile_completions": {"type": "integer", "index": 62, "name": "viral_video_third_quartile_completions", "comment": null}, "viral_video_views": {"type": "integer", "index": 63, "name": "viral_video_views", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.linkedin_ad_analytics_by_campaign_data"}, "seed.ad_reporting_integration_tests.linkedin_ad_analytics_by_creative_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_ad_analytics_by_creative_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"creative_id": {"type": "integer", "index": 1, "name": "creative_id", "comment": null}, "day": {"type": "timestamp without time zone", "index": 2, "name": "day", "comment": null}, "action_clicks": {"type": "integer", "index": 3, "name": "action_clicks", "comment": null}, "card_clicks": {"type": "integer", "index": 4, "name": "card_clicks", "comment": null}, "ad_unit_clicks": {"type": "integer", "index": 5, "name": "ad_unit_clicks", "comment": null}, "landing_page_clicks": {"type": "integer", "index": 6, "name": "landing_page_clicks", "comment": null}, "clicks": {"type": "integer", "index": 7, "name": "clicks", "comment": null}, "approximate_unique_impressions": {"type": "integer", "index": 8, "name": "approximate_unique_impressions", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "card_impressions": {"type": "integer", "index": 10, "name": "card_impressions", "comment": null}, "cost_in_local_currency": {"type": "integer", "index": 11, "name": "cost_in_local_currency", "comment": null}, "cost_in_usd": {"type": "integer", "index": 12, "name": "cost_in_usd", "comment": null}, "comment_likes": {"type": "integer", "index": 13, "name": "comment_likes", "comment": null}, "comments": {"type": "integer", "index": 14, "name": "comments", "comment": null}, "company_page_clicks": {"type": "integer", "index": 15, "name": "company_page_clicks", "comment": null}, "conversion_value_in_local_currency": {"type": "integer", "index": 16, "name": "conversion_value_in_local_currency", "comment": null}, "external_website_conversions": {"type": "bigint", "index": 17, "name": "external_website_conversions", "comment": null}, "external_website_post_click_conversions": {"type": "integer", "index": 18, "name": "external_website_post_click_conversions", "comment": null}, "external_website_post_view_conversions": {"type": "integer", "index": 19, "name": "external_website_post_view_conversions", "comment": null}, "follows": {"type": "integer", "index": 20, "name": "follows", "comment": null}, "full_screen_plays": {"type": "integer", "index": 21, "name": "full_screen_plays", "comment": null}, "lead_generation_mail_contact_info_shares": {"type": "integer", "index": 22, "name": "lead_generation_mail_contact_info_shares", "comment": null}, "lead_generation_mail_interested_clicks": {"type": "integer", "index": 23, "name": "lead_generation_mail_interested_clicks", "comment": null}, "likes": {"type": "integer", "index": 24, "name": "likes", "comment": null}, "one_click_lead_form_opens": {"type": "integer", "index": 25, "name": "one_click_lead_form_opens", "comment": null}, "one_click_leads": {"type": "integer", "index": 26, "name": "one_click_leads", "comment": null}, "opens": {"type": "integer", "index": 27, "name": "opens", "comment": null}, "other_engagements": {"type": "integer", "index": 28, "name": "other_engagements", "comment": null}, "shares": {"type": "integer", "index": 29, "name": "shares", "comment": null}, "text_url_clicks": {"type": "integer", "index": 30, "name": "text_url_clicks", "comment": null}, "total_engagements": {"type": "integer", "index": 31, "name": "total_engagements", "comment": null}, "video_completions": {"type": "integer", "index": 32, "name": "video_completions", "comment": null}, "video_first_quartile_completions": {"type": "integer", "index": 33, "name": "video_first_quartile_completions", "comment": null}, "video_midpoint_completions": {"type": "integer", "index": 34, "name": "video_midpoint_completions", "comment": null}, "video_starts": {"type": "integer", "index": 35, "name": "video_starts", "comment": null}, "video_third_quartile_completions": {"type": "integer", "index": 36, "name": "video_third_quartile_completions", "comment": null}, "video_views": {"type": "integer", "index": 37, "name": "video_views", "comment": null}, "viral_card_clicks": {"type": "integer", "index": 38, "name": "viral_card_clicks", "comment": null}, "viral_card_impressions": {"type": "integer", "index": 39, "name": "viral_card_impressions", "comment": null}, "viral_clicks": {"type": "integer", "index": 40, "name": "viral_clicks", "comment": null}, "viral_comment_likes": {"type": "integer", "index": 41, "name": "viral_comment_likes", "comment": null}, "viral_comments": {"type": "integer", "index": 42, "name": "viral_comments", "comment": null}, "viral_company_page_clicks": {"type": "integer", "index": 43, "name": "viral_company_page_clicks", "comment": null}, "viral_external_website_conversions": {"type": "integer", "index": 44, "name": "viral_external_website_conversions", "comment": null}, "viral_external_website_post_click_conversions": {"type": "integer", "index": 45, "name": "viral_external_website_post_click_conversions", "comment": null}, "viral_external_website_post_view_conversions": {"type": "integer", "index": 46, "name": "viral_external_website_post_view_conversions", "comment": null}, "viral_follows": {"type": "integer", "index": 47, "name": "viral_follows", "comment": null}, "viral_full_screen_plays": {"type": "integer", "index": 48, "name": "viral_full_screen_plays", "comment": null}, "viral_impressions": {"type": "integer", "index": 49, "name": "viral_impressions", "comment": null}, "viral_landing_page_clicks": {"type": "integer", "index": 50, "name": "viral_landing_page_clicks", "comment": null}, "viral_likes": {"type": "integer", "index": 51, "name": "viral_likes", "comment": null}, "viral_one_click_lead_form_opens": {"type": "integer", "index": 52, "name": "viral_one_click_lead_form_opens", "comment": null}, "viral_one_click_leads": {"type": "integer", "index": 53, "name": "viral_one_click_leads", "comment": null}, "viral_other_engagements": {"type": "integer", "index": 54, "name": "viral_other_engagements", "comment": null}, "viral_shares": {"type": "integer", "index": 55, "name": "viral_shares", "comment": null}, "viral_total_engagements": {"type": "integer", "index": 56, "name": "viral_total_engagements", "comment": null}, "viral_video_completions": {"type": "integer", "index": 57, "name": "viral_video_completions", "comment": null}, "viral_video_first_quartile_completions": {"type": "integer", "index": 58, "name": "viral_video_first_quartile_completions", "comment": null}, "viral_video_midpoint_completions": {"type": "integer", "index": 59, "name": "viral_video_midpoint_completions", "comment": null}, "viral_video_starts": {"type": "integer", "index": 60, "name": "viral_video_starts", "comment": null}, "viral_video_third_quartile_completions": {"type": "integer", "index": 61, "name": "viral_video_third_quartile_completions", "comment": null}, "viral_video_views": {"type": "integer", "index": 62, "name": "viral_video_views", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.linkedin_ad_analytics_by_creative_data"}, "seed.ad_reporting_integration_tests.linkedin_ad_campaign_group_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_ad_campaign_group_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_modified_time": {"type": "timestamp without time zone", "index": 2, "name": "last_modified_time", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 4, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.linkedin_ad_campaign_group_history_data"}, "seed.ad_reporting_integration_tests.linkedin_ad_campaign_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_ad_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_modified_time": {"type": "timestamp without time zone", "index": 2, "name": "last_modified_time", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "campaign_group_id": {"type": "integer", "index": 4, "name": "campaign_group_id", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 5, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "version_tag": {"type": "integer", "index": 7, "name": "version_tag", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.linkedin_ad_campaign_history_data"}, "seed.ad_reporting_integration_tests.linkedin_ad_creative_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_ad_creative_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "intended_status": {"type": "character varying", "index": 3, "name": "intended_status", "comment": null}, "click_uri": {"type": "text", "index": 4, "name": "click_uri", "comment": null}, "last_modified_at": {"type": "timestamp without time zone", "index": 5, "name": "last_modified_at", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 6, "name": "created_time", "comment": null}, "text_ad_landing_page": {"type": "text", "index": 7, "name": "text_ad_landing_page", "comment": null}, "spotlight_landing_page": {"type": "text", "index": 8, "name": "spotlight_landing_page", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.linkedin_ad_creative_history_data"}, "seed.ad_reporting_integration_tests.linkedin_geo_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_geo_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "id": {"type": "integer", "index": 2, "name": "id", "comment": null}, "value": {"type": "text", "index": 3, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.linkedin_geo_data"}, "seed.ad_reporting_integration_tests.linkedin_monthly_ad_analytics_by_member_country_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_monthly_ad_analytics_by_member_country_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "month": {"type": "text", "index": 2, "name": "month", "comment": null}, "clicks": {"type": "integer", "index": 3, "name": "clicks", "comment": null}, "member_country": {"type": "integer", "index": 4, "name": "member_country", "comment": null}, "impressions": {"type": "integer", "index": 5, "name": "impressions", "comment": null}, "conversion_value_in_local_currency": {"type": "double precision", "index": 6, "name": "conversion_value_in_local_currency", "comment": null}, "cost_in_local_currency": {"type": "numeric", "index": 7, "name": "cost_in_local_currency", "comment": null}, "cost_in_usd": {"type": "numeric", "index": 8, "name": "cost_in_usd", "comment": null}, "external_website_post_click_conversions": {"type": "integer", "index": 9, "name": "external_website_post_click_conversions", "comment": null}, "one_click_leads": {"type": "integer", "index": 10, "name": "one_click_leads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.linkedin_monthly_ad_analytics_by_member_country_data"}, "seed.ad_reporting_integration_tests.linkedin_monthly_ad_analytics_by_member_region_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_monthly_ad_analytics_by_member_region_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "month": {"type": "text", "index": 2, "name": "month", "comment": null}, "clicks": {"type": "integer", "index": 3, "name": "clicks", "comment": null}, "member_region": {"type": "integer", "index": 4, "name": "member_region", "comment": null}, "impressions": {"type": "integer", "index": 5, "name": "impressions", "comment": null}, "conversion_value_in_local_currency": {"type": "double precision", "index": 6, "name": "conversion_value_in_local_currency", "comment": null}, "cost_in_local_currency": {"type": "numeric", "index": 7, "name": "cost_in_local_currency", "comment": null}, "cost_in_usd": {"type": "numeric", "index": 8, "name": "cost_in_usd", "comment": null}, "external_website_post_click_conversions": {"type": "integer", "index": 9, "name": "external_website_post_click_conversions", "comment": null}, "one_click_leads": {"type": "integer", "index": 10, "name": "one_click_leads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.linkedin_monthly_ad_analytics_by_member_region_data"}, "seed.ad_reporting_integration_tests.microsoft_ads_account_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_account_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "name": {"type": "character varying", "index": 2, "name": "name", "comment": null}, "last_modified_time": {"type": "timestamp without time zone", "index": 3, "name": "last_modified_time", "comment": null}, "time_zone": {"type": "text", "index": 4, "name": "time_zone", "comment": null}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_account_history_data"}, "seed.ad_reporting_integration_tests.microsoft_ads_account_performance_daily_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_account_performance_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "device_os": {"type": "text", "index": 3, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 4, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 5, "name": "network", "comment": null}, "currency_code": {"type": "text", "index": 6, "name": "currency_code", "comment": null}, "ad_distribution": {"type": "text", "index": 7, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 8, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 9, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 10, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 11, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 12, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 13, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 14, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 15, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 16, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 17, "name": "all_conversions_qualified", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_account_performance_daily_report_data"}, "seed.ad_reporting_integration_tests.microsoft_ads_ad_group_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_ad_group_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "modified_time": {"type": "timestamp without time zone", "index": 4, "name": "modified_time", "comment": null}, "start_date": {"type": "date", "index": 5, "name": "start_date", "comment": null}, "end_date": {"type": "integer", "index": 6, "name": "end_date", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_ad_group_history_data"}, "seed.ad_reporting_integration_tests.microsoft_ads_ad_group_performance_daily_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_ad_group_performance_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": null}, "device_os": {"type": "text", "index": 6, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 7, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 8, "name": "network", "comment": null}, "language": {"type": "text", "index": 9, "name": "language", "comment": null}, "ad_distribution": {"type": "text", "index": 10, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 11, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 12, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 13, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 14, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 15, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 16, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 17, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 18, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 19, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 20, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 21, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 22, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_ad_group_performance_daily_report_data"}, "seed.ad_reporting_integration_tests.microsoft_ads_ad_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_ad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "title_part_1": {"type": "text", "index": 2, "name": "title_part_1", "comment": null}, "final_url": {"type": "text", "index": 3, "name": "final_url", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "modified_time": {"type": "timestamp without time zone", "index": 5, "name": "modified_time", "comment": null}, "status": {"type": "text", "index": 6, "name": "status", "comment": null}, "type": {"type": "text", "index": 7, "name": "type", "comment": null}, "title": {"type": "text", "index": 8, "name": "title", "comment": null}, "title_part_2": {"type": "text", "index": 9, "name": "title_part_2", "comment": null}, "title_part_3": {"type": "text", "index": 10, "name": "title_part_3", "comment": null}, "domain": {"type": "text", "index": 11, "name": "domain", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_ad_history_data"}, "seed.ad_reporting_integration_tests.microsoft_ads_ad_performance_daily_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_ad_performance_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "bigint", "index": 5, "name": "ad_id", "comment": null}, "currency_code": {"type": "text", "index": 6, "name": "currency_code", "comment": null}, "device_os": {"type": "text", "index": 7, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 8, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 9, "name": "network", "comment": null}, "language": {"type": "text", "index": 10, "name": "language", "comment": null}, "ad_distribution": {"type": "text", "index": 11, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 12, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 13, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 14, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 15, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 16, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 17, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 18, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 19, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 20, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 21, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 22, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 23, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_ad_performance_daily_report_data"}, "seed.ad_reporting_integration_tests.microsoft_ads_campaign_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "account_id": {"type": "integer", "index": 3, "name": "account_id", "comment": null}, "modified_time": {"type": "timestamp without time zone", "index": 4, "name": "modified_time", "comment": null}, "type": {"type": "text", "index": 5, "name": "type", "comment": null}, "time_zone": {"type": "text", "index": 6, "name": "time_zone", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_campaign_history_data"}, "seed.ad_reporting_integration_tests.microsoft_ads_campaign_performance_daily_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_campaign_performance_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "currency_code": {"type": "text", "index": 4, "name": "currency_code", "comment": null}, "device_os": {"type": "text", "index": 5, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 6, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 7, "name": "network", "comment": null}, "ad_distribution": {"type": "text", "index": 8, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 9, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 10, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 11, "name": "top_vs_other", "comment": null}, "budget_association_status": {"type": "text", "index": 12, "name": "budget_association_status", "comment": null}, "budget_name": {"type": "text", "index": 13, "name": "budget_name", "comment": null}, "clicks": {"type": "integer", "index": 14, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 15, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 16, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 17, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 18, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 19, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 20, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 21, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 22, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_campaign_performance_daily_report_data"}, "seed.ad_reporting_integration_tests.microsoft_ads_geographic_performance_daily_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_geographic_performance_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "bigint", "index": 1, "name": "account_id", "comment": null}, "ad_distribution": {"type": "text", "index": 2, "name": "ad_distribution", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "all_conversions": {"type": "integer", "index": 4, "name": "all_conversions", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 5, "name": "all_conversions_qualified", "comment": null}, "all_revenue": {"type": "numeric", "index": 6, "name": "all_revenue", "comment": null}, "bid_match_type": {"type": "text", "index": 7, "name": "bid_match_type", "comment": null}, "campaign_id": {"type": "bigint", "index": 8, "name": "campaign_id", "comment": null}, "city": {"type": "text", "index": 9, "name": "city", "comment": null}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": null}, "conversions": {"type": "integer", "index": 11, "name": "conversions", "comment": null}, "conversions_qualified": {"type": "integer", "index": 12, "name": "conversions_qualified", "comment": null}, "country": {"type": "text", "index": 13, "name": "country", "comment": null}, "county": {"type": "text", "index": 14, "name": "county", "comment": null}, "currency_code": {"type": "text", "index": 15, "name": "currency_code", "comment": null}, "date": {"type": "date", "index": 16, "name": "date", "comment": null}, "delivered_match_type": {"type": "text", "index": 17, "name": "delivered_match_type", "comment": null}, "device_os": {"type": "text", "index": 18, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 19, "name": "device_type", "comment": null}, "impressions": {"type": "integer", "index": 20, "name": "impressions", "comment": null}, "language": {"type": "text", "index": 21, "name": "language", "comment": null}, "location_type": {"type": "text", "index": 22, "name": "location_type", "comment": null}, "metro_area": {"type": "text", "index": 23, "name": "metro_area", "comment": null}, "postal_code": {"type": "text", "index": 24, "name": "postal_code", "comment": null}, "network": {"type": "text", "index": 25, "name": "network", "comment": null}, "spend": {"type": "numeric", "index": 26, "name": "spend", "comment": null}, "state": {"type": "text", "index": 27, "name": "state", "comment": null}, "top_vs_other": {"type": "text", "index": 28, "name": "top_vs_other", "comment": null}, "revenue": {"type": "numeric", "index": 29, "name": "revenue", "comment": null}, "location_id": {"type": "bigint", "index": 30, "name": "location_id", "comment": null}, "goal": {"type": "text", "index": 31, "name": "goal", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_geographic_performance_daily_report_data"}, "seed.ad_reporting_integration_tests.microsoft_ads_keyword_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_keyword_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "modified_time": {"type": "timestamp without time zone", "index": 3, "name": "modified_time", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "match_type": {"type": "text", "index": 5, "name": "match_type", "comment": null}, "status": {"type": "text", "index": 6, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_keyword_history_data"}, "seed.ad_reporting_integration_tests.microsoft_ads_keyword_performance_daily_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_keyword_performance_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "bigint", "index": 5, "name": "ad_id", "comment": null}, "keyword_id": {"type": "bigint", "index": 6, "name": "keyword_id", "comment": null}, "currency_code": {"type": "text", "index": 7, "name": "currency_code", "comment": null}, "device_os": {"type": "text", "index": 8, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 9, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 10, "name": "network", "comment": null}, "language": {"type": "text", "index": 11, "name": "language", "comment": null}, "ad_distribution": {"type": "text", "index": 12, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 13, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 14, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 15, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 16, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 17, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 18, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 19, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 20, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 21, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 22, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 23, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 24, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_keyword_performance_daily_report_data"}, "seed.ad_reporting_integration_tests.microsoft_ads_search_performance_daily_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_search_performance_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "bigint", "index": 5, "name": "ad_id", "comment": null}, "keyword_id": {"type": "bigint", "index": 6, "name": "keyword_id", "comment": null}, "search_query": {"type": "text", "index": 7, "name": "search_query", "comment": null}, "device_os": {"type": "text", "index": 8, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 9, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 10, "name": "network", "comment": null}, "language": {"type": "text", "index": 11, "name": "language", "comment": null}, "bid_match_type": {"type": "text", "index": 12, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 13, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 14, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 15, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 16, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 17, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 18, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 19, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 20, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 21, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 22, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 23, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_search_performance_daily_report_data"}, "seed.ad_reporting_integration_tests.pinterest_ad_group_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_ad_group_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "campaign_id": {"type": "bigint", "index": 2, "name": "campaign_id", "comment": null}, "created_time": {"type": "text", "index": 3, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "status": {"type": "text", "index": 5, "name": "status", "comment": null}, "start_time": {"type": "text", "index": 6, "name": "start_time", "comment": null}, "end_time": {"type": "integer", "index": 7, "name": "end_time", "comment": null}, "_fivetran_synced": {"type": "text", "index": 8, "name": "_fivetran_synced", "comment": null}, "pacing_delivery_type": {"type": "text", "index": 9, "name": "pacing_delivery_type", "comment": null}, "placement_group": {"type": "text", "index": 10, "name": "placement_group", "comment": null}, "summary_status": {"type": "text", "index": 11, "name": "summary_status", "comment": null}, "ad_account_id": {"type": "bigint", "index": 12, "name": "ad_account_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.pinterest_ad_group_history_data"}, "seed.ad_reporting_integration_tests.pinterest_ad_group_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_ad_group_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "ad_group_id": {"type": "bigint", "index": 2, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "text", "index": 3, "name": "ad_group_name", "comment": null}, "ad_group_status": {"type": "text", "index": 4, "name": "ad_group_status", "comment": null}, "campaign_id": {"type": "bigint", "index": 5, "name": "campaign_id", "comment": null}, "advertiser_id": {"type": "bigint", "index": 6, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 8, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 9, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 10, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 11, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 12, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 13, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 14, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 15, "name": "total_conversions_value_in_micro_dollar", "comment": null}, "total_view_checkout": {"type": "integer", "index": 16, "name": "total_view_checkout", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.pinterest_ad_group_report_data"}, "seed.ad_reporting_integration_tests.pinterest_advertiser_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_advertiser_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_time": {"type": "timestamp without time zone", "index": 2, "name": "updated_time", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "billing_profile_status": {"type": "text", "index": 4, "name": "billing_profile_status", "comment": null}, "billing_type": {"type": "text", "index": 5, "name": "billing_type", "comment": null}, "country": {"type": "text", "index": 6, "name": "country", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 7, "name": "created_time", "comment": null}, "currency": {"type": "text", "index": 8, "name": "currency", "comment": null}, "merchant_id": {"type": "integer", "index": 9, "name": "merchant_id", "comment": null}, "name": {"type": "text", "index": 10, "name": "name", "comment": null}, "owner_user_id": {"type": "integer", "index": 11, "name": "owner_user_id", "comment": null}, "status": {"type": "text", "index": 12, "name": "status", "comment": null}, "owner_username": {"type": "text", "index": 13, "name": "owner_username", "comment": null}, "permissions": {"type": "text", "index": 14, "name": "permissions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.pinterest_advertiser_history_data"}, "seed.ad_reporting_integration_tests.pinterest_advertiser_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_advertiser_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "advertiser_id": {"type": "bigint", "index": 2, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 4, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 5, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 6, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 7, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 8, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 9, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 10, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 11, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.pinterest_advertiser_report_data"}, "seed.ad_reporting_integration_tests.pinterest_campaign_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "created_time": {"type": "text", "index": 2, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "status": {"type": "text", "index": 4, "name": "status", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "advertiser_id": {"type": "bigint", "index": 6, "name": "advertiser_id", "comment": null}, "default_ad_group_budget_in_micro_currency": {"type": "integer", "index": 7, "name": "default_ad_group_budget_in_micro_currency", "comment": null}, "is_automated_campaign": {"type": "boolean", "index": 8, "name": "is_automated_campaign", "comment": null}, "is_campaign_budget_optimization": {"type": "boolean", "index": 9, "name": "is_campaign_budget_optimization", "comment": null}, "is_flexible_daily_budgets": {"type": "boolean", "index": 10, "name": "is_flexible_daily_budgets", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.pinterest_campaign_history_data"}, "seed.ad_reporting_integration_tests.pinterest_campaign_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_campaign_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "campaign_id": {"type": "bigint", "index": 2, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "text", "index": 3, "name": "campaign_name", "comment": null}, "campaign_status": {"type": "text", "index": 4, "name": "campaign_status", "comment": null}, "advertiser_id": {"type": "bigint", "index": 5, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 7, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 8, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 9, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 10, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 11, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 12, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 13, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 14, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.pinterest_campaign_report_data"}, "seed.ad_reporting_integration_tests.pinterest_keyword_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_keyword_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "advertiser_id": {"type": "bigint", "index": 4, "name": "advertiser_id", "comment": null}, "archived": {"type": "boolean", "index": 5, "name": "archived", "comment": null}, "bid": {"type": "integer", "index": 6, "name": "bid", "comment": null}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": null}, "id": {"type": "bigint", "index": 8, "name": "id", "comment": null}, "match_type": {"type": "text", "index": 9, "name": "match_type", "comment": null}, "parent_type": {"type": "text", "index": 10, "name": "parent_type", "comment": null}, "value": {"type": "text", "index": 11, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.pinterest_keyword_history_data"}, "seed.ad_reporting_integration_tests.pinterest_keyword_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_keyword_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "keyword_id": {"type": "bigint", "index": 2, "name": "keyword_id", "comment": null}, "pin_promotion_id": {"type": "bigint", "index": 3, "name": "pin_promotion_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "text", "index": 5, "name": "ad_group_name", "comment": null}, "ad_group_status": {"type": "text", "index": 6, "name": "ad_group_status", "comment": null}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": null}, "advertiser_id": {"type": "bigint", "index": 8, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 9, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 10, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 11, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 12, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 13, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 14, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 15, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 16, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 17, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.pinterest_keyword_report_data"}, "seed.ad_reporting_integration_tests.pinterest_pin_promotion_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_pin_promotion_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 2, "name": "ad_group_id", "comment": null}, "created_time": {"type": "text", "index": 3, "name": "created_time", "comment": null}, "destination_url": {"type": "text", "index": 4, "name": "destination_url", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "pin_id": {"type": "bigint", "index": 6, "name": "pin_id", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}, "creative_type": {"type": "text", "index": 8, "name": "creative_type", "comment": null}, "_fivetran_synced": {"type": "text", "index": 9, "name": "_fivetran_synced", "comment": null}, "ad_account_id": {"type": "bigint", "index": 10, "name": "ad_account_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.pinterest_pin_promotion_history_data"}, "seed.ad_reporting_integration_tests.pinterest_pin_promotion_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_pin_promotion_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "pin_promotion_id": {"type": "bigint", "index": 2, "name": "pin_promotion_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": null}, "advertiser_id": {"type": "bigint", "index": 5, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 7, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 8, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 9, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 10, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 11, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 12, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 13, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 14, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.pinterest_pin_promotion_report_data"}, "seed.ad_reporting_integration_tests.pinterest_pin_promotion_targeting_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_pin_promotion_targeting_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "targeting_type": {"type": "text", "index": 3, "name": "targeting_type", "comment": null}, "targeting_value": {"type": "text", "index": 4, "name": "targeting_value", "comment": null}, "ad_group_id": {"type": "text", "index": 5, "name": "ad_group_id", "comment": null}, "advertiser_id": {"type": "text", "index": 6, "name": "advertiser_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": null}, "pin_promotion_id": {"type": "text", "index": 8, "name": "pin_promotion_id", "comment": null}, "clickthrough_1": {"type": "double precision", "index": 9, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "double precision", "index": 10, "name": "clickthrough_2", "comment": null}, "impression_1": {"type": "double precision", "index": 11, "name": "impression_1", "comment": null}, "impression_2": {"type": "double precision", "index": 12, "name": "impression_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 13, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 14, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 15, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 16, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.pinterest_pin_promotion_targeting_report_data"}, "seed.ad_reporting_integration_tests.pinterest_targeting_geo_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_targeting_geo_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"country_id": {"type": "text", "index": 1, "name": "country_id", "comment": null}, "country_name": {"type": "text", "index": 2, "name": "country_name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.pinterest_targeting_geo_data"}, "seed.ad_reporting_integration_tests.pinterest_targeting_geo_region_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_targeting_geo_region_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "country_id": {"type": "text", "index": 2, "name": "country_id", "comment": null}, "region_id": {"type": "text", "index": 3, "name": "region_id", "comment": null}, "region_name": {"type": "text", "index": 4, "name": "region_name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.pinterest_targeting_geo_region_data"}, "seed.ad_reporting_integration_tests.reddit_ads_account_conversions": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_account_conversions", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "avg_value": {"type": "double precision", "index": 3, "name": "avg_value", "comment": null}, "click_through_conversion_attribution_window_day": {"type": "integer", "index": 4, "name": "click_through_conversion_attribution_window_day", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 5, "name": "click_through_conversion_attribution_window_month", "comment": null}, "click_through_conversion_attribution_window_week": {"type": "integer", "index": 6, "name": "click_through_conversion_attribution_window_week", "comment": null}, "date": {"type": "date", "index": 7, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 8, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 9, "name": "total_items", "comment": null}, "total_value": {"type": "double precision", "index": 10, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_day": {"type": "integer", "index": 11, "name": "view_through_conversion_attribution_window_day", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 12, "name": "view_through_conversion_attribution_window_month", "comment": null}, "view_through_conversion_attribution_window_week": {"type": "integer", "index": 13, "name": "view_through_conversion_attribution_window_week", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_account_conversions"}, "seed.ad_reporting_integration_tests.reddit_ads_account_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_account_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying(255)", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "attribution_type": {"type": "text", "index": 3, "name": "attribution_type", "comment": null}, "click_attribution_window": {"type": "text", "index": 4, "name": "click_attribution_window", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 5, "name": "created_at", "comment": null}, "currency": {"type": "text", "index": 6, "name": "currency", "comment": null}, "status": {"type": "integer", "index": 7, "name": "status", "comment": null}, "time_zone_id": {"type": "text", "index": 8, "name": "time_zone_id", "comment": null}, "view_attribution_window": {"type": "text", "index": 9, "name": "view_attribution_window", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_account_data"}, "seed.ad_reporting_integration_tests.reddit_ads_account_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_account_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "app_install_metrics_add_payment_info": {"type": "integer", "index": 4, "name": "app_install_metrics_add_payment_info", "comment": null}, "app_install_metrics_add_to_cart": {"type": "integer", "index": 5, "name": "app_install_metrics_add_to_cart", "comment": null}, "app_install_metrics_app_launch": {"type": "integer", "index": 6, "name": "app_install_metrics_app_launch", "comment": null}, "app_install_metrics_completed_tutorial": {"type": "integer", "index": 7, "name": "app_install_metrics_completed_tutorial", "comment": null}, "app_install_metrics_install": {"type": "integer", "index": 8, "name": "app_install_metrics_install", "comment": null}, "app_install_metrics_level_achieved": {"type": "integer", "index": 9, "name": "app_install_metrics_level_achieved", "comment": null}, "app_install_metrics_purchase": {"type": "integer", "index": 10, "name": "app_install_metrics_purchase", "comment": null}, "app_install_metrics_search": {"type": "integer", "index": 11, "name": "app_install_metrics_search", "comment": null}, "app_install_metrics_sign_up": {"type": "integer", "index": 12, "name": "app_install_metrics_sign_up", "comment": null}, "app_install_metrics_spend": {"type": "integer", "index": 13, "name": "app_install_metrics_spend", "comment": null}, "app_install_metrics_spend_credits": {"type": "integer", "index": 14, "name": "app_install_metrics_spend_credits", "comment": null}, "app_install_metrics_view_content": {"type": "integer", "index": 15, "name": "app_install_metrics_view_content", "comment": null}, "clicks": {"type": "integer", "index": 16, "name": "clicks", "comment": null}, "comment_downvotes": {"type": "integer", "index": 17, "name": "comment_downvotes", "comment": null}, "comment_upvotes": {"type": "integer", "index": 18, "name": "comment_upvotes", "comment": null}, "comments_page_views": {"type": "integer", "index": 19, "name": "comments_page_views", "comment": null}, "conversion_roas": {"type": "integer", "index": 20, "name": "conversion_roas", "comment": null}, "cpc": {"type": "double precision", "index": 21, "name": "cpc", "comment": null}, "ctr": {"type": "double precision", "index": 22, "name": "ctr", "comment": null}, "ecpm": {"type": "double precision", "index": 23, "name": "ecpm", "comment": null}, "gallery_item_caption": {"type": "integer", "index": 24, "name": "gallery_item_caption", "comment": null}, "gallery_item_id": {"type": "integer", "index": 25, "name": "gallery_item_id", "comment": null}, "impressions": {"type": "integer", "index": 26, "name": "impressions", "comment": null}, "legacy_click_conversions_attribution_window_day": {"type": "integer", "index": 27, "name": "legacy_click_conversions_attribution_window_day", "comment": null}, "legacy_click_conversions_attribution_window_month": {"type": "integer", "index": 28, "name": "legacy_click_conversions_attribution_window_month", "comment": null}, "legacy_click_conversions_attribution_window_week": {"type": "integer", "index": 29, "name": "legacy_click_conversions_attribution_window_week", "comment": null}, "legacy_view_conversions_attribution_window_day": {"type": "integer", "index": 30, "name": "legacy_view_conversions_attribution_window_day", "comment": null}, "legacy_view_conversions_attribution_window_month": {"type": "integer", "index": 31, "name": "legacy_view_conversions_attribution_window_month", "comment": null}, "legacy_view_conversions_attribution_window_week": {"type": "integer", "index": 32, "name": "legacy_view_conversions_attribution_window_week", "comment": null}, "priority": {"type": "integer", "index": 33, "name": "priority", "comment": null}, "region": {"type": "integer", "index": 34, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 35, "name": "spend", "comment": null}, "video_fully_viewable_impressions": {"type": "integer", "index": 36, "name": "video_fully_viewable_impressions", "comment": null}, "video_plays_expanded": {"type": "integer", "index": 37, "name": "video_plays_expanded", "comment": null}, "video_plays_with_sound": {"type": "integer", "index": 38, "name": "video_plays_with_sound", "comment": null}, "video_started": {"type": "integer", "index": 39, "name": "video_started", "comment": null}, "video_viewable_impressions": {"type": "integer", "index": 40, "name": "video_viewable_impressions", "comment": null}, "video_watched_100_percent": {"type": "integer", "index": 41, "name": "video_watched_100_percent", "comment": null}, "video_watched_10_seconds": {"type": "integer", "index": 42, "name": "video_watched_10_seconds", "comment": null}, "video_watched_25_percent": {"type": "integer", "index": 43, "name": "video_watched_25_percent", "comment": null}, "video_watched_3_seconds": {"type": "integer", "index": 44, "name": "video_watched_3_seconds", "comment": null}, "video_watched_50_percent": {"type": "integer", "index": 45, "name": "video_watched_50_percent", "comment": null}, "video_watched_5_seconds": {"type": "integer", "index": 46, "name": "video_watched_5_seconds", "comment": null}, "video_watched_75_percent": {"type": "integer", "index": 47, "name": "video_watched_75_percent", "comment": null}, "video_watched_95_percent": {"type": "integer", "index": 48, "name": "video_watched_95_percent", "comment": null}, "viewable_impressions": {"type": "integer", "index": 49, "name": "viewable_impressions", "comment": null}, "viewer_comments": {"type": "integer", "index": 50, "name": "viewer_comments", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_account_report_data"}, "seed.ad_reporting_integration_tests.reddit_ads_ad_conversions": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_ad_conversions", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "ad_id": {"type": "character varying(255)", "index": 3, "name": "ad_id", "comment": null}, "avg_value": {"type": "double precision", "index": 4, "name": "avg_value", "comment": null}, "click_through_conversion_attribution_window_day": {"type": "integer", "index": 5, "name": "click_through_conversion_attribution_window_day", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 6, "name": "click_through_conversion_attribution_window_month", "comment": null}, "click_through_conversion_attribution_window_week": {"type": "integer", "index": 7, "name": "click_through_conversion_attribution_window_week", "comment": null}, "date": {"type": "date", "index": 8, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 9, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 10, "name": "total_items", "comment": null}, "total_value": {"type": "double precision", "index": 11, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_day": {"type": "integer", "index": 12, "name": "view_through_conversion_attribution_window_day", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 13, "name": "view_through_conversion_attribution_window_month", "comment": null}, "view_through_conversion_attribution_window_week": {"type": "integer", "index": 14, "name": "view_through_conversion_attribution_window_week", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_ad_conversions"}, "seed.ad_reporting_integration_tests.reddit_ads_ad_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_ad_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying(255)", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": null}, "ad_group_id": {"type": "character varying(255)", "index": 4, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 5, "name": "campaign_id", "comment": null}, "click_url": {"type": "text", "index": 6, "name": "click_url", "comment": null}, "configured_status": {"type": "text", "index": 7, "name": "configured_status", "comment": null}, "effective_status": {"type": "text", "index": 8, "name": "effective_status", "comment": null}, "is_processing": {"type": "boolean", "index": 9, "name": "is_processing", "comment": null}, "name": {"type": "text", "index": 10, "name": "name", "comment": null}, "post_id": {"type": "text", "index": 11, "name": "post_id", "comment": null}, "post_url": {"type": "integer", "index": 12, "name": "post_url", "comment": null}, "preview_expiry": {"type": "integer", "index": 13, "name": "preview_expiry", "comment": null}, "preview_url": {"type": "integer", "index": 14, "name": "preview_url", "comment": null}, "rejection_reason": {"type": "integer", "index": 15, "name": "rejection_reason", "comment": null}, "search_term": {"type": "integer", "index": 16, "name": "search_term", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_ad_data"}, "seed.ad_reporting_integration_tests.reddit_ads_ad_group_conversions": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_ad_group_conversions", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "ad_group_id": {"type": "character varying(255)", "index": 3, "name": "ad_group_id", "comment": null}, "avg_value": {"type": "double precision", "index": 4, "name": "avg_value", "comment": null}, "click_through_conversion_attribution_window_day": {"type": "integer", "index": 5, "name": "click_through_conversion_attribution_window_day", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 6, "name": "click_through_conversion_attribution_window_month", "comment": null}, "click_through_conversion_attribution_window_week": {"type": "integer", "index": 7, "name": "click_through_conversion_attribution_window_week", "comment": null}, "date": {"type": "date", "index": 8, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 9, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 10, "name": "total_items", "comment": null}, "total_value": {"type": "double precision", "index": 11, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_day": {"type": "integer", "index": 12, "name": "view_through_conversion_attribution_window_day", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 13, "name": "view_through_conversion_attribution_window_month", "comment": null}, "view_through_conversion_attribution_window_week": {"type": "integer", "index": 14, "name": "view_through_conversion_attribution_window_week", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_ad_group_conversions"}, "seed.ad_reporting_integration_tests.reddit_ads_ad_group_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_ad_group_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "id": {"type": "character varying(255)", "index": 2, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "bid_strategy": {"type": "text", "index": 4, "name": "bid_strategy", "comment": null}, "bid_value": {"type": "integer", "index": 5, "name": "bid_value", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 6, "name": "campaign_id", "comment": null}, "configured_status": {"type": "text", "index": 7, "name": "configured_status", "comment": null}, "effective_status": {"type": "text", "index": 8, "name": "effective_status", "comment": null}, "end_time": {"type": "timestamp without time zone", "index": 9, "name": "end_time", "comment": null}, "expand_targeting": {"type": "boolean", "index": 10, "name": "expand_targeting", "comment": null}, "goal_type": {"type": "text", "index": 11, "name": "goal_type", "comment": null}, "goal_value": {"type": "integer", "index": 12, "name": "goal_value", "comment": null}, "is_processing": {"type": "boolean", "index": 13, "name": "is_processing", "comment": null}, "name": {"type": "text", "index": 14, "name": "name", "comment": null}, "optimization_strategy_type": {"type": "integer", "index": 15, "name": "optimization_strategy_type", "comment": null}, "start_time": {"type": "timestamp without time zone", "index": 16, "name": "start_time", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_ad_group_data"}, "seed.ad_reporting_integration_tests.reddit_ads_ad_group_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_ad_group_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "ad_group_id": {"type": "character varying(255)", "index": 2, "name": "ad_group_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "app_install_metrics_add_payment_info": {"type": "integer", "index": 5, "name": "app_install_metrics_add_payment_info", "comment": null}, "app_install_metrics_add_to_cart": {"type": "integer", "index": 6, "name": "app_install_metrics_add_to_cart", "comment": null}, "app_install_metrics_app_launch": {"type": "integer", "index": 7, "name": "app_install_metrics_app_launch", "comment": null}, "app_install_metrics_completed_tutorial": {"type": "integer", "index": 8, "name": "app_install_metrics_completed_tutorial", "comment": null}, "app_install_metrics_install": {"type": "integer", "index": 9, "name": "app_install_metrics_install", "comment": null}, "app_install_metrics_level_achieved": {"type": "integer", "index": 10, "name": "app_install_metrics_level_achieved", "comment": null}, "app_install_metrics_purchase": {"type": "integer", "index": 11, "name": "app_install_metrics_purchase", "comment": null}, "app_install_metrics_search": {"type": "integer", "index": 12, "name": "app_install_metrics_search", "comment": null}, "app_install_metrics_sign_up": {"type": "integer", "index": 13, "name": "app_install_metrics_sign_up", "comment": null}, "app_install_metrics_spend": {"type": "integer", "index": 14, "name": "app_install_metrics_spend", "comment": null}, "app_install_metrics_spend_credits": {"type": "integer", "index": 15, "name": "app_install_metrics_spend_credits", "comment": null}, "app_install_metrics_view_content": {"type": "integer", "index": 16, "name": "app_install_metrics_view_content", "comment": null}, "clicks": {"type": "integer", "index": 17, "name": "clicks", "comment": null}, "comment_downvotes": {"type": "integer", "index": 18, "name": "comment_downvotes", "comment": null}, "comment_upvotes": {"type": "integer", "index": 19, "name": "comment_upvotes", "comment": null}, "comments_page_views": {"type": "integer", "index": 20, "name": "comments_page_views", "comment": null}, "conversion_roas": {"type": "integer", "index": 21, "name": "conversion_roas", "comment": null}, "cpc": {"type": "double precision", "index": 22, "name": "cpc", "comment": null}, "ctr": {"type": "double precision", "index": 23, "name": "ctr", "comment": null}, "ecpm": {"type": "double precision", "index": 24, "name": "ecpm", "comment": null}, "gallery_item_caption": {"type": "integer", "index": 25, "name": "gallery_item_caption", "comment": null}, "gallery_item_id": {"type": "integer", "index": 26, "name": "gallery_item_id", "comment": null}, "impressions": {"type": "integer", "index": 27, "name": "impressions", "comment": null}, "legacy_click_conversions_attribution_window_day": {"type": "integer", "index": 28, "name": "legacy_click_conversions_attribution_window_day", "comment": null}, "legacy_click_conversions_attribution_window_month": {"type": "integer", "index": 29, "name": "legacy_click_conversions_attribution_window_month", "comment": null}, "legacy_click_conversions_attribution_window_week": {"type": "integer", "index": 30, "name": "legacy_click_conversions_attribution_window_week", "comment": null}, "legacy_view_conversions_attribution_window_day": {"type": "integer", "index": 31, "name": "legacy_view_conversions_attribution_window_day", "comment": null}, "legacy_view_conversions_attribution_window_month": {"type": "integer", "index": 32, "name": "legacy_view_conversions_attribution_window_month", "comment": null}, "legacy_view_conversions_attribution_window_week": {"type": "integer", "index": 33, "name": "legacy_view_conversions_attribution_window_week", "comment": null}, "priority": {"type": "integer", "index": 34, "name": "priority", "comment": null}, "region": {"type": "integer", "index": 35, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 36, "name": "spend", "comment": null}, "video_fully_viewable_impressions": {"type": "integer", "index": 37, "name": "video_fully_viewable_impressions", "comment": null}, "video_plays_expanded": {"type": "integer", "index": 38, "name": "video_plays_expanded", "comment": null}, "video_plays_with_sound": {"type": "integer", "index": 39, "name": "video_plays_with_sound", "comment": null}, "video_started": {"type": "integer", "index": 40, "name": "video_started", "comment": null}, "video_viewable_impressions": {"type": "integer", "index": 41, "name": "video_viewable_impressions", "comment": null}, "video_watched_100_percent": {"type": "integer", "index": 42, "name": "video_watched_100_percent", "comment": null}, "video_watched_10_seconds": {"type": "integer", "index": 43, "name": "video_watched_10_seconds", "comment": null}, "video_watched_25_percent": {"type": "integer", "index": 44, "name": "video_watched_25_percent", "comment": null}, "video_watched_3_seconds": {"type": "integer", "index": 45, "name": "video_watched_3_seconds", "comment": null}, "video_watched_50_percent": {"type": "integer", "index": 46, "name": "video_watched_50_percent", "comment": null}, "video_watched_5_seconds": {"type": "integer", "index": 47, "name": "video_watched_5_seconds", "comment": null}, "video_watched_75_percent": {"type": "integer", "index": 48, "name": "video_watched_75_percent", "comment": null}, "video_watched_95_percent": {"type": "integer", "index": 49, "name": "video_watched_95_percent", "comment": null}, "viewable_impressions": {"type": "integer", "index": 50, "name": "viewable_impressions", "comment": null}, "viewer_comments": {"type": "integer", "index": 51, "name": "viewer_comments", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_ad_group_report_data"}, "seed.ad_reporting_integration_tests.reddit_ads_ad_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_ad_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "ad_id": {"type": "character varying(255)", "index": 2, "name": "ad_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "app_install_metrics_add_payment_info": {"type": "integer", "index": 5, "name": "app_install_metrics_add_payment_info", "comment": null}, "app_install_metrics_add_to_cart": {"type": "integer", "index": 6, "name": "app_install_metrics_add_to_cart", "comment": null}, "app_install_metrics_app_launch": {"type": "integer", "index": 7, "name": "app_install_metrics_app_launch", "comment": null}, "app_install_metrics_completed_tutorial": {"type": "integer", "index": 8, "name": "app_install_metrics_completed_tutorial", "comment": null}, "app_install_metrics_install": {"type": "integer", "index": 9, "name": "app_install_metrics_install", "comment": null}, "app_install_metrics_level_achieved": {"type": "integer", "index": 10, "name": "app_install_metrics_level_achieved", "comment": null}, "app_install_metrics_purchase": {"type": "integer", "index": 11, "name": "app_install_metrics_purchase", "comment": null}, "app_install_metrics_search": {"type": "integer", "index": 12, "name": "app_install_metrics_search", "comment": null}, "app_install_metrics_sign_up": {"type": "integer", "index": 13, "name": "app_install_metrics_sign_up", "comment": null}, "app_install_metrics_spend": {"type": "integer", "index": 14, "name": "app_install_metrics_spend", "comment": null}, "app_install_metrics_spend_credits": {"type": "integer", "index": 15, "name": "app_install_metrics_spend_credits", "comment": null}, "app_install_metrics_view_content": {"type": "integer", "index": 16, "name": "app_install_metrics_view_content", "comment": null}, "clicks": {"type": "integer", "index": 17, "name": "clicks", "comment": null}, "comment_downvotes": {"type": "integer", "index": 18, "name": "comment_downvotes", "comment": null}, "comment_upvotes": {"type": "integer", "index": 19, "name": "comment_upvotes", "comment": null}, "comments_page_views": {"type": "integer", "index": 20, "name": "comments_page_views", "comment": null}, "conversion_roas": {"type": "integer", "index": 21, "name": "conversion_roas", "comment": null}, "cpc": {"type": "double precision", "index": 22, "name": "cpc", "comment": null}, "ctr": {"type": "double precision", "index": 23, "name": "ctr", "comment": null}, "ecpm": {"type": "double precision", "index": 24, "name": "ecpm", "comment": null}, "gallery_item_caption": {"type": "integer", "index": 25, "name": "gallery_item_caption", "comment": null}, "gallery_item_id": {"type": "integer", "index": 26, "name": "gallery_item_id", "comment": null}, "impressions": {"type": "integer", "index": 27, "name": "impressions", "comment": null}, "legacy_click_conversions_attribution_window_day": {"type": "integer", "index": 28, "name": "legacy_click_conversions_attribution_window_day", "comment": null}, "legacy_click_conversions_attribution_window_month": {"type": "integer", "index": 29, "name": "legacy_click_conversions_attribution_window_month", "comment": null}, "legacy_click_conversions_attribution_window_week": {"type": "integer", "index": 30, "name": "legacy_click_conversions_attribution_window_week", "comment": null}, "legacy_view_conversions_attribution_window_day": {"type": "integer", "index": 31, "name": "legacy_view_conversions_attribution_window_day", "comment": null}, "legacy_view_conversions_attribution_window_month": {"type": "integer", "index": 32, "name": "legacy_view_conversions_attribution_window_month", "comment": null}, "legacy_view_conversions_attribution_window_week": {"type": "integer", "index": 33, "name": "legacy_view_conversions_attribution_window_week", "comment": null}, "priority": {"type": "integer", "index": 34, "name": "priority", "comment": null}, "region": {"type": "integer", "index": 35, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 36, "name": "spend", "comment": null}, "video_fully_viewable_impressions": {"type": "integer", "index": 37, "name": "video_fully_viewable_impressions", "comment": null}, "video_plays_expanded": {"type": "integer", "index": 38, "name": "video_plays_expanded", "comment": null}, "video_plays_with_sound": {"type": "integer", "index": 39, "name": "video_plays_with_sound", "comment": null}, "video_started": {"type": "integer", "index": 40, "name": "video_started", "comment": null}, "video_viewable_impressions": {"type": "integer", "index": 41, "name": "video_viewable_impressions", "comment": null}, "video_watched_100_percent": {"type": "integer", "index": 42, "name": "video_watched_100_percent", "comment": null}, "video_watched_10_seconds": {"type": "integer", "index": 43, "name": "video_watched_10_seconds", "comment": null}, "video_watched_25_percent": {"type": "integer", "index": 44, "name": "video_watched_25_percent", "comment": null}, "video_watched_3_seconds": {"type": "integer", "index": 45, "name": "video_watched_3_seconds", "comment": null}, "video_watched_50_percent": {"type": "integer", "index": 46, "name": "video_watched_50_percent", "comment": null}, "video_watched_5_seconds": {"type": "integer", "index": 47, "name": "video_watched_5_seconds", "comment": null}, "video_watched_75_percent": {"type": "integer", "index": 48, "name": "video_watched_75_percent", "comment": null}, "video_watched_95_percent": {"type": "integer", "index": 49, "name": "video_watched_95_percent", "comment": null}, "viewable_impressions": {"type": "integer", "index": 50, "name": "viewable_impressions", "comment": null}, "viewer_comments": {"type": "integer", "index": 51, "name": "viewer_comments", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_ad_report_data"}, "seed.ad_reporting_integration_tests.reddit_ads_business_account_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_business_account_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying(255)", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "attribution_type": {"type": "text", "index": 3, "name": "attribution_type", "comment": null}, "click_attribution_window": {"type": "text", "index": 4, "name": "click_attribution_window", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 5, "name": "created_at", "comment": null}, "currency": {"type": "text", "index": 6, "name": "currency", "comment": null}, "status": {"type": "integer", "index": 7, "name": "status", "comment": null}, "time_zone_id": {"type": "text", "index": 8, "name": "time_zone_id", "comment": null}, "view_attribution_window": {"type": "text", "index": 9, "name": "view_attribution_window", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_business_account_data"}, "seed.ad_reporting_integration_tests.reddit_ads_campaign_conversions": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_campaign_conversions", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "avg_value": {"type": "double precision", "index": 3, "name": "avg_value", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 4, "name": "campaign_id", "comment": null}, "click_through_conversion_attribution_window_day": {"type": "integer", "index": 5, "name": "click_through_conversion_attribution_window_day", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 6, "name": "click_through_conversion_attribution_window_month", "comment": null}, "click_through_conversion_attribution_window_week": {"type": "integer", "index": 7, "name": "click_through_conversion_attribution_window_week", "comment": null}, "date": {"type": "date", "index": 8, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 9, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 10, "name": "total_items", "comment": null}, "total_value": {"type": "double precision", "index": 11, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_day": {"type": "integer", "index": 12, "name": "view_through_conversion_attribution_window_day", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 13, "name": "view_through_conversion_attribution_window_month", "comment": null}, "view_through_conversion_attribution_window_week": {"type": "integer", "index": 14, "name": "view_through_conversion_attribution_window_week", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_campaign_conversions"}, "seed.ad_reporting_integration_tests.reddit_ads_campaign_country_conversions_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_campaign_country_conversions_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 3, "name": "campaign_id", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 4, "name": "click_through_conversion_attribution_window_month", "comment": null}, "country": {"type": "text", "index": 5, "name": "country", "comment": null}, "date": {"type": "date", "index": 6, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 7, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 8, "name": "total_items", "comment": null}, "total_value": {"type": "integer", "index": 9, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 10, "name": "view_through_conversion_attribution_window_month", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_campaign_country_conversions_report_data"}, "seed.ad_reporting_integration_tests.reddit_ads_campaign_country_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_campaign_country_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 3, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 4, "name": "clicks", "comment": null}, "country": {"type": "text", "index": 5, "name": "country", "comment": null}, "date": {"type": "date", "index": 6, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": null}, "region": {"type": "text", "index": 8, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 9, "name": "spend", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_campaign_country_report_data"}, "seed.ad_reporting_integration_tests.reddit_ads_campaign_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_campaign_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying(255)", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": null}, "configured_status": {"type": "text", "index": 4, "name": "configured_status", "comment": null}, "effective_status": {"type": "text", "index": 5, "name": "effective_status", "comment": null}, "funding_instrument_id": {"type": "integer", "index": 6, "name": "funding_instrument_id", "comment": null}, "is_processing": {"type": "boolean", "index": 7, "name": "is_processing", "comment": null}, "name": {"type": "text", "index": 8, "name": "name", "comment": null}, "objective": {"type": "text", "index": 9, "name": "objective", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_campaign_data"}, "seed.ad_reporting_integration_tests.reddit_ads_campaign_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_campaign_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 2, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "app_install_metrics_add_payment_info": {"type": "integer", "index": 5, "name": "app_install_metrics_add_payment_info", "comment": null}, "app_install_metrics_add_to_cart": {"type": "integer", "index": 6, "name": "app_install_metrics_add_to_cart", "comment": null}, "app_install_metrics_app_launch": {"type": "integer", "index": 7, "name": "app_install_metrics_app_launch", "comment": null}, "app_install_metrics_completed_tutorial": {"type": "integer", "index": 8, "name": "app_install_metrics_completed_tutorial", "comment": null}, "app_install_metrics_install": {"type": "integer", "index": 9, "name": "app_install_metrics_install", "comment": null}, "app_install_metrics_level_achieved": {"type": "integer", "index": 10, "name": "app_install_metrics_level_achieved", "comment": null}, "app_install_metrics_purchase": {"type": "integer", "index": 11, "name": "app_install_metrics_purchase", "comment": null}, "app_install_metrics_search": {"type": "integer", "index": 12, "name": "app_install_metrics_search", "comment": null}, "app_install_metrics_sign_up": {"type": "integer", "index": 13, "name": "app_install_metrics_sign_up", "comment": null}, "app_install_metrics_spend": {"type": "integer", "index": 14, "name": "app_install_metrics_spend", "comment": null}, "app_install_metrics_spend_credits": {"type": "integer", "index": 15, "name": "app_install_metrics_spend_credits", "comment": null}, "app_install_metrics_view_content": {"type": "integer", "index": 16, "name": "app_install_metrics_view_content", "comment": null}, "clicks": {"type": "integer", "index": 17, "name": "clicks", "comment": null}, "comment_downvotes": {"type": "integer", "index": 18, "name": "comment_downvotes", "comment": null}, "comment_upvotes": {"type": "integer", "index": 19, "name": "comment_upvotes", "comment": null}, "comments_page_views": {"type": "integer", "index": 20, "name": "comments_page_views", "comment": null}, "conversion_roas": {"type": "integer", "index": 21, "name": "conversion_roas", "comment": null}, "cpc": {"type": "double precision", "index": 22, "name": "cpc", "comment": null}, "ctr": {"type": "double precision", "index": 23, "name": "ctr", "comment": null}, "ecpm": {"type": "double precision", "index": 24, "name": "ecpm", "comment": null}, "gallery_item_caption": {"type": "integer", "index": 25, "name": "gallery_item_caption", "comment": null}, "gallery_item_id": {"type": "integer", "index": 26, "name": "gallery_item_id", "comment": null}, "impressions": {"type": "integer", "index": 27, "name": "impressions", "comment": null}, "legacy_click_conversions_attribution_window_day": {"type": "integer", "index": 28, "name": "legacy_click_conversions_attribution_window_day", "comment": null}, "legacy_click_conversions_attribution_window_month": {"type": "integer", "index": 29, "name": "legacy_click_conversions_attribution_window_month", "comment": null}, "legacy_click_conversions_attribution_window_week": {"type": "integer", "index": 30, "name": "legacy_click_conversions_attribution_window_week", "comment": null}, "legacy_view_conversions_attribution_window_day": {"type": "integer", "index": 31, "name": "legacy_view_conversions_attribution_window_day", "comment": null}, "legacy_view_conversions_attribution_window_month": {"type": "integer", "index": 32, "name": "legacy_view_conversions_attribution_window_month", "comment": null}, "legacy_view_conversions_attribution_window_week": {"type": "integer", "index": 33, "name": "legacy_view_conversions_attribution_window_week", "comment": null}, "priority": {"type": "integer", "index": 34, "name": "priority", "comment": null}, "region": {"type": "integer", "index": 35, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 36, "name": "spend", "comment": null}, "video_fully_viewable_impressions": {"type": "integer", "index": 37, "name": "video_fully_viewable_impressions", "comment": null}, "video_plays_expanded": {"type": "integer", "index": 38, "name": "video_plays_expanded", "comment": null}, "video_plays_with_sound": {"type": "integer", "index": 39, "name": "video_plays_with_sound", "comment": null}, "video_started": {"type": "integer", "index": 40, "name": "video_started", "comment": null}, "video_viewable_impressions": {"type": "integer", "index": 41, "name": "video_viewable_impressions", "comment": null}, "video_watched_100_percent": {"type": "integer", "index": 42, "name": "video_watched_100_percent", "comment": null}, "video_watched_10_seconds": {"type": "integer", "index": 43, "name": "video_watched_10_seconds", "comment": null}, "video_watched_25_percent": {"type": "integer", "index": 44, "name": "video_watched_25_percent", "comment": null}, "video_watched_3_seconds": {"type": "integer", "index": 45, "name": "video_watched_3_seconds", "comment": null}, "video_watched_50_percent": {"type": "integer", "index": 46, "name": "video_watched_50_percent", "comment": null}, "video_watched_5_seconds": {"type": "integer", "index": 47, "name": "video_watched_5_seconds", "comment": null}, "video_watched_75_percent": {"type": "integer", "index": 48, "name": "video_watched_75_percent", "comment": null}, "video_watched_95_percent": {"type": "integer", "index": 49, "name": "video_watched_95_percent", "comment": null}, "viewable_impressions": {"type": "integer", "index": 50, "name": "viewable_impressions", "comment": null}, "viewer_comments": {"type": "integer", "index": 51, "name": "viewer_comments", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_campaign_report_data"}, "seed.ad_reporting_integration_tests.snapchat_ad_account_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_ad_account_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.snapchat_ad_account_history_data"}, "seed.ad_reporting_integration_tests.snapchat_ad_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_ad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "ad_squad_id": {"type": "text", "index": 2, "name": "ad_squad_id", "comment": null}, "creative_id": {"type": "text", "index": 3, "name": "creative_id", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.snapchat_ad_history_data"}, "seed.ad_reporting_integration_tests.snapchat_ad_hourly_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_ad_hourly_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "text", "index": 1, "name": "ad_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 3, "name": "impressions", "comment": null}, "spend": {"type": "integer", "index": 4, "name": "spend", "comment": null}, "swipes": {"type": "integer", "index": 5, "name": "swipes", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 6, "name": "conversion_purchases_value", "comment": null}, "conversion_add_billing": {"type": "integer", "index": 7, "name": "conversion_add_billing", "comment": null}, "conversion_add_cart": {"type": "integer", "index": 8, "name": "conversion_add_cart", "comment": null}, "conversion_app_opens": {"type": "integer", "index": 9, "name": "conversion_app_opens", "comment": null}, "conversion_level_completes": {"type": "integer", "index": 10, "name": "conversion_level_completes", "comment": null}, "conversion_page_views": {"type": "integer", "index": 11, "name": "conversion_page_views", "comment": null}, "conversion_purchases": {"type": "integer", "index": 12, "name": "conversion_purchases", "comment": null}, "conversion_save": {"type": "integer", "index": 13, "name": "conversion_save", "comment": null}, "conversion_searches": {"type": "integer", "index": 14, "name": "conversion_searches", "comment": null}, "conversion_sign_ups": {"type": "integer", "index": 15, "name": "conversion_sign_ups", "comment": null}, "conversion_start_checkout": {"type": "integer", "index": 16, "name": "conversion_start_checkout", "comment": null}, "conversion_view_content": {"type": "integer", "index": 17, "name": "conversion_view_content", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.snapchat_ad_hourly_report_data"}, "seed.ad_reporting_integration_tests.snapchat_ad_squad_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_ad_squad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "campaign_id": {"type": "text", "index": 2, "name": "campaign_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.snapchat_ad_squad_history_data"}, "seed.ad_reporting_integration_tests.snapchat_ad_squad_hourly_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_ad_squad_hourly_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_squad_id": {"type": "text", "index": 1, "name": "ad_squad_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "android_installs": {"type": "integer", "index": 4, "name": "android_installs", "comment": null}, "attachment_avg_view_time_millis": {"type": "integer", "index": 5, "name": "attachment_avg_view_time_millis", "comment": null}, "attachment_quartile_1": {"type": "integer", "index": 6, "name": "attachment_quartile_1", "comment": null}, "attachment_quartile_2": {"type": "integer", "index": 7, "name": "attachment_quartile_2", "comment": null}, "attachment_quartile_3": {"type": "integer", "index": 8, "name": "attachment_quartile_3", "comment": null}, "attachment_total_view_time_millis": {"type": "integer", "index": 9, "name": "attachment_total_view_time_millis", "comment": null}, "attachment_view_completion": {"type": "integer", "index": 10, "name": "attachment_view_completion", "comment": null}, "avg_screen_time_millis": {"type": "integer", "index": 11, "name": "avg_screen_time_millis", "comment": null}, "avg_view_time_millis": {"type": "integer", "index": 12, "name": "avg_view_time_millis", "comment": null}, "conversion_add_billing": {"type": "integer", "index": 13, "name": "conversion_add_billing", "comment": null}, "conversion_add_cart": {"type": "integer", "index": 14, "name": "conversion_add_cart", "comment": null}, "conversion_app_opens": {"type": "integer", "index": 15, "name": "conversion_app_opens", "comment": null}, "conversion_level_completes": {"type": "integer", "index": 16, "name": "conversion_level_completes", "comment": null}, "conversion_page_views": {"type": "integer", "index": 17, "name": "conversion_page_views", "comment": null}, "conversion_purchases": {"type": "integer", "index": 18, "name": "conversion_purchases", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 19, "name": "conversion_purchases_value", "comment": null}, "conversion_save": {"type": "integer", "index": 20, "name": "conversion_save", "comment": null}, "conversion_searches": {"type": "integer", "index": 21, "name": "conversion_searches", "comment": null}, "conversion_sign_ups": {"type": "integer", "index": 22, "name": "conversion_sign_ups", "comment": null}, "conversion_start_checkout": {"type": "integer", "index": 23, "name": "conversion_start_checkout", "comment": null}, "conversion_view_content": {"type": "integer", "index": 24, "name": "conversion_view_content", "comment": null}, "impressions": {"type": "integer", "index": 25, "name": "impressions", "comment": null}, "ios_installs": {"type": "integer", "index": 26, "name": "ios_installs", "comment": null}, "quartile_1": {"type": "integer", "index": 27, "name": "quartile_1", "comment": null}, "quartile_2": {"type": "integer", "index": 28, "name": "quartile_2", "comment": null}, "quartile_3": {"type": "integer", "index": 29, "name": "quartile_3", "comment": null}, "saves": {"type": "integer", "index": 30, "name": "saves", "comment": null}, "screen_time_millis": {"type": "integer", "index": 31, "name": "screen_time_millis", "comment": null}, "shares": {"type": "integer", "index": 32, "name": "shares", "comment": null}, "spend": {"type": "integer", "index": 33, "name": "spend", "comment": null}, "story_completes": {"type": "integer", "index": 34, "name": "story_completes", "comment": null}, "story_opens": {"type": "integer", "index": 35, "name": "story_opens", "comment": null}, "swipe_up_percent": {"type": "integer", "index": 36, "name": "swipe_up_percent", "comment": null}, "swipes": {"type": "integer", "index": 37, "name": "swipes", "comment": null}, "total_installs": {"type": "integer", "index": 38, "name": "total_installs", "comment": null}, "video_views": {"type": "integer", "index": 39, "name": "video_views", "comment": null}, "view_completion": {"type": "integer", "index": 40, "name": "view_completion", "comment": null}, "view_time_millis": {"type": "integer", "index": 41, "name": "view_time_millis", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.snapchat_ad_squad_hourly_report_data"}, "seed.ad_reporting_integration_tests.snapchat_campaign_geo_country_daily_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_campaign_geo_country_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"attachment_quartile_1": {"type": "integer", "index": 1, "name": "attachment_quartile_1", "comment": null}, "attachment_quartile_2": {"type": "integer", "index": 2, "name": "attachment_quartile_2", "comment": null}, "attachment_quartile_3": {"type": "integer", "index": 3, "name": "attachment_quartile_3", "comment": null}, "attachment_total_view_time_millis": {"type": "integer", "index": 4, "name": "attachment_total_view_time_millis", "comment": null}, "attachment_view_completion": {"type": "boolean", "index": 5, "name": "attachment_view_completion", "comment": null}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 7, "name": "date", "comment": null}, "country": {"type": "text", "index": 8, "name": "country", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "quartile_1": {"type": "integer", "index": 10, "name": "quartile_1", "comment": null}, "quartile_2": {"type": "integer", "index": 11, "name": "quartile_2", "comment": null}, "quartile_3": {"type": "integer", "index": 12, "name": "quartile_3", "comment": null}, "saves": {"type": "integer", "index": 13, "name": "saves", "comment": null}, "screen_time_millis": {"type": "integer", "index": 14, "name": "screen_time_millis", "comment": null}, "shares": {"type": "integer", "index": 15, "name": "shares", "comment": null}, "spend": {"type": "integer", "index": 16, "name": "spend", "comment": null}, "swipes": {"type": "integer", "index": 17, "name": "swipes", "comment": null}, "video_views": {"type": "integer", "index": 18, "name": "video_views", "comment": null}, "view_completion": {"type": "boolean", "index": 19, "name": "view_completion", "comment": null}, "view_time_millis": {"type": "integer", "index": 20, "name": "view_time_millis", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 21, "name": "conversion_purchases_value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.snapchat_campaign_geo_country_daily_report_data"}, "seed.ad_reporting_integration_tests.snapchat_campaign_geo_region_daily_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_campaign_geo_region_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"attachment_quartile_1": {"type": "integer", "index": 1, "name": "attachment_quartile_1", "comment": null}, "attachment_quartile_2": {"type": "integer", "index": 2, "name": "attachment_quartile_2", "comment": null}, "attachment_quartile_3": {"type": "integer", "index": 3, "name": "attachment_quartile_3", "comment": null}, "attachment_total_view_time_millis": {"type": "integer", "index": 4, "name": "attachment_total_view_time_millis", "comment": null}, "attachment_view_completion": {"type": "boolean", "index": 5, "name": "attachment_view_completion", "comment": null}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 7, "name": "date", "comment": null}, "region": {"type": "text", "index": 8, "name": "region", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "quartile_1": {"type": "integer", "index": 10, "name": "quartile_1", "comment": null}, "quartile_2": {"type": "integer", "index": 11, "name": "quartile_2", "comment": null}, "quartile_3": {"type": "integer", "index": 12, "name": "quartile_3", "comment": null}, "saves": {"type": "integer", "index": 13, "name": "saves", "comment": null}, "screen_time_millis": {"type": "integer", "index": 14, "name": "screen_time_millis", "comment": null}, "shares": {"type": "integer", "index": 15, "name": "shares", "comment": null}, "spend": {"type": "integer", "index": 16, "name": "spend", "comment": null}, "swipes": {"type": "integer", "index": 17, "name": "swipes", "comment": null}, "video_views": {"type": "integer", "index": 18, "name": "video_views", "comment": null}, "view_completion": {"type": "boolean", "index": 19, "name": "view_completion", "comment": null}, "view_time_millis": {"type": "integer", "index": 20, "name": "view_time_millis", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 21, "name": "conversion_purchases_value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.snapchat_campaign_geo_region_daily_report_data"}, "seed.ad_reporting_integration_tests.snapchat_campaign_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "ad_account_id": {"type": "text", "index": 2, "name": "ad_account_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.snapchat_campaign_history_data"}, "seed.ad_reporting_integration_tests.snapchat_campaign_hourly_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_campaign_hourly_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "text", "index": 1, "name": "campaign_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "android_installs": {"type": "integer", "index": 4, "name": "android_installs", "comment": null}, "attachment_avg_view_time_millis": {"type": "integer", "index": 5, "name": "attachment_avg_view_time_millis", "comment": null}, "attachment_quartile_1": {"type": "integer", "index": 6, "name": "attachment_quartile_1", "comment": null}, "attachment_quartile_2": {"type": "integer", "index": 7, "name": "attachment_quartile_2", "comment": null}, "attachment_quartile_3": {"type": "integer", "index": 8, "name": "attachment_quartile_3", "comment": null}, "attachment_total_view_time_millis": {"type": "integer", "index": 9, "name": "attachment_total_view_time_millis", "comment": null}, "attachment_view_completion": {"type": "integer", "index": 10, "name": "attachment_view_completion", "comment": null}, "avg_screen_time_millis": {"type": "integer", "index": 11, "name": "avg_screen_time_millis", "comment": null}, "avg_view_time_millis": {"type": "integer", "index": 12, "name": "avg_view_time_millis", "comment": null}, "conversion_add_billing": {"type": "integer", "index": 13, "name": "conversion_add_billing", "comment": null}, "conversion_add_cart": {"type": "integer", "index": 14, "name": "conversion_add_cart", "comment": null}, "conversion_app_opens": {"type": "integer", "index": 15, "name": "conversion_app_opens", "comment": null}, "conversion_level_completes": {"type": "integer", "index": 16, "name": "conversion_level_completes", "comment": null}, "conversion_page_views": {"type": "integer", "index": 17, "name": "conversion_page_views", "comment": null}, "conversion_purchases": {"type": "integer", "index": 18, "name": "conversion_purchases", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 19, "name": "conversion_purchases_value", "comment": null}, "conversion_save": {"type": "integer", "index": 20, "name": "conversion_save", "comment": null}, "conversion_searches": {"type": "integer", "index": 21, "name": "conversion_searches", "comment": null}, "conversion_sign_ups": {"type": "integer", "index": 22, "name": "conversion_sign_ups", "comment": null}, "conversion_start_checkout": {"type": "integer", "index": 23, "name": "conversion_start_checkout", "comment": null}, "conversion_view_content": {"type": "integer", "index": 24, "name": "conversion_view_content", "comment": null}, "impressions": {"type": "integer", "index": 25, "name": "impressions", "comment": null}, "ios_installs": {"type": "integer", "index": 26, "name": "ios_installs", "comment": null}, "quartile_1": {"type": "integer", "index": 27, "name": "quartile_1", "comment": null}, "quartile_2": {"type": "integer", "index": 28, "name": "quartile_2", "comment": null}, "quartile_3": {"type": "integer", "index": 29, "name": "quartile_3", "comment": null}, "saves": {"type": "integer", "index": 30, "name": "saves", "comment": null}, "screen_time_millis": {"type": "integer", "index": 31, "name": "screen_time_millis", "comment": null}, "shares": {"type": "integer", "index": 32, "name": "shares", "comment": null}, "spend": {"type": "integer", "index": 33, "name": "spend", "comment": null}, "story_completes": {"type": "integer", "index": 34, "name": "story_completes", "comment": null}, "story_opens": {"type": "integer", "index": 35, "name": "story_opens", "comment": null}, "swipe_up_percent": {"type": "integer", "index": 36, "name": "swipe_up_percent", "comment": null}, "swipes": {"type": "integer", "index": 37, "name": "swipes", "comment": null}, "total_installs": {"type": "integer", "index": 38, "name": "total_installs", "comment": null}, "video_views": {"type": "integer", "index": 39, "name": "video_views", "comment": null}, "view_completion": {"type": "integer", "index": 40, "name": "view_completion", "comment": null}, "view_time_millis": {"type": "integer", "index": 41, "name": "view_time_millis", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.snapchat_campaign_hourly_report_data"}, "seed.ad_reporting_integration_tests.snapchat_creative_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_creative_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "ad_account_id": {"type": "text", "index": 2, "name": "ad_account_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "web_view_url": {"type": "text", "index": 4, "name": "web_view_url", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.snapchat_creative_history_data"}, "seed.ad_reporting_integration_tests.snapchat_creative_url_tag_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_creative_url_tag_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"creative_id": {"type": "text", "index": 1, "name": "creative_id", "comment": null}, "key": {"type": "text", "index": 2, "name": "key", "comment": null}, "value": {"type": "text", "index": 3, "name": "value", "comment": null}, "updated_at": {"type": "text", "index": 4, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.snapchat_creative_url_tag_history_data"}, "seed.ad_reporting_integration_tests.tiktok_ad_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_ad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "integer", "index": 1, "name": "ad_id", "comment": null}, "updated_at": {"type": "text", "index": 2, "name": "updated_at", "comment": null}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": null}, "adgroup_id": {"type": "integer", "index": 4, "name": "adgroup_id", "comment": null}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": null}, "create_time": {"type": "text", "index": 6, "name": "create_time", "comment": null}, "ad_name": {"type": "text", "index": 7, "name": "ad_name", "comment": null}, "call_to_action": {"type": "text", "index": 8, "name": "call_to_action", "comment": null}, "secondary_status": {"type": "text", "index": 9, "name": "secondary_status", "comment": null}, "operation_status": {"type": "text", "index": 10, "name": "operation_status", "comment": null}, "ad_text": {"type": "text", "index": 11, "name": "ad_text", "comment": null}, "video_id": {"type": "text", "index": 12, "name": "video_id", "comment": null}, "app_name": {"type": "integer", "index": 13, "name": "app_name", "comment": null}, "deeplink": {"type": "integer", "index": 14, "name": "deeplink", "comment": null}, "landing_page_url": {"type": "text", "index": 15, "name": "landing_page_url", "comment": null}, "display_name": {"type": "text", "index": 16, "name": "display_name", "comment": null}, "profile_image_url": {"type": "integer", "index": 17, "name": "profile_image_url", "comment": null}, "impression_tracking_url": {"type": "integer", "index": 18, "name": "impression_tracking_url", "comment": null}, "click_tracking_url": {"type": "integer", "index": 19, "name": "click_tracking_url", "comment": null}, "playable_url": {"type": "integer", "index": 20, "name": "playable_url", "comment": null}, "is_aco": {"type": "boolean", "index": 21, "name": "is_aco", "comment": null}, "creative_authorized": {"type": "boolean", "index": 22, "name": "creative_authorized", "comment": null}, "is_new_structure": {"type": "boolean", "index": 23, "name": "is_new_structure", "comment": null}, "image_ids": {"type": "text", "index": 24, "name": "image_ids", "comment": null}, "_fivetran_synced": {"type": "text", "index": 25, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.tiktok_ad_history_data"}, "seed.ad_reporting_integration_tests.tiktok_ad_report_hourly_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_ad_report_hourly_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "integer", "index": 1, "name": "ad_id", "comment": null}, "stat_time_hour": {"type": "timestamp without time zone", "index": 2, "name": "stat_time_hour", "comment": null}, "cost_per_conversion": {"type": "double precision", "index": 3, "name": "cost_per_conversion", "comment": null}, "cpc": {"type": "double precision", "index": 4, "name": "cpc", "comment": null}, "video_play_actions": {"type": "integer", "index": 5, "name": "video_play_actions", "comment": null}, "conversion_rate": {"type": "integer", "index": 6, "name": "conversion_rate", "comment": null}, "video_views_p_75": {"type": "integer", "index": 7, "name": "video_views_p_75", "comment": null}, "result": {"type": "integer", "index": 8, "name": "result", "comment": null}, "video_views_p_50": {"type": "integer", "index": 9, "name": "video_views_p_50", "comment": null}, "impressions": {"type": "integer", "index": 10, "name": "impressions", "comment": null}, "comments": {"type": "integer", "index": 11, "name": "comments", "comment": null}, "real_time_cost_per_result": {"type": "double precision", "index": 12, "name": "real_time_cost_per_result", "comment": null}, "conversion": {"type": "integer", "index": 13, "name": "conversion", "comment": null}, "real_time_result": {"type": "integer", "index": 14, "name": "real_time_result", "comment": null}, "video_views_p_100": {"type": "integer", "index": 15, "name": "video_views_p_100", "comment": null}, "shares": {"type": "integer", "index": 16, "name": "shares", "comment": null}, "real_time_conversion_rate": {"type": "integer", "index": 17, "name": "real_time_conversion_rate", "comment": null}, "cost_per_secondary_goal_result": {"type": "text", "index": 18, "name": "cost_per_secondary_goal_result", "comment": null}, "secondary_goal_result_rate": {"type": "text", "index": 19, "name": "secondary_goal_result_rate", "comment": null}, "clicks": {"type": "integer", "index": 20, "name": "clicks", "comment": null}, "cost_per_1000_reached": {"type": "integer", "index": 21, "name": "cost_per_1000_reached", "comment": null}, "video_views_p_25": {"type": "integer", "index": 22, "name": "video_views_p_25", "comment": null}, "reach": {"type": "integer", "index": 23, "name": "reach", "comment": null}, "real_time_cost_per_conversion": {"type": "double precision", "index": 24, "name": "real_time_cost_per_conversion", "comment": null}, "profile_visits_rate": {"type": "integer", "index": 25, "name": "profile_visits_rate", "comment": null}, "average_video_play": {"type": "double precision", "index": 26, "name": "average_video_play", "comment": null}, "profile_visits": {"type": "integer", "index": 27, "name": "profile_visits", "comment": null}, "cpm": {"type": "double precision", "index": 28, "name": "cpm", "comment": null}, "ctr": {"type": "double precision", "index": 29, "name": "ctr", "comment": null}, "video_watched_2_s": {"type": "integer", "index": 30, "name": "video_watched_2_s", "comment": null}, "follows": {"type": "integer", "index": 31, "name": "follows", "comment": null}, "result_rate": {"type": "integer", "index": 32, "name": "result_rate", "comment": null}, "video_watched_6_s": {"type": "integer", "index": 33, "name": "video_watched_6_s", "comment": null}, "secondary_goal_result": {"type": "text", "index": 34, "name": "secondary_goal_result", "comment": null}, "cost_per_result": {"type": "double precision", "index": 35, "name": "cost_per_result", "comment": null}, "average_video_play_per_user": {"type": "integer", "index": 36, "name": "average_video_play_per_user", "comment": null}, "real_time_result_rate": {"type": "integer", "index": 37, "name": "real_time_result_rate", "comment": null}, "spend": {"type": "double precision", "index": 38, "name": "spend", "comment": null}, "likes": {"type": "integer", "index": 39, "name": "likes", "comment": null}, "real_time_conversion": {"type": "integer", "index": 40, "name": "real_time_conversion", "comment": null}, "total_purchase_value": {"type": "double precision", "index": 41, "name": "total_purchase_value", "comment": null}, "total_sales_lead_value": {"type": "double precision", "index": 42, "name": "total_sales_lead_value", "comment": null}, "_fivetran_synced": {"type": "text", "index": 43, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.tiktok_ad_report_hourly_data"}, "seed.ad_reporting_integration_tests.tiktok_adgroup_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_adgroup_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"adgroup_id": {"type": "integer", "index": 1, "name": "adgroup_id", "comment": null}, "updated_at": {"type": "text", "index": 2, "name": "updated_at", "comment": null}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "create_time": {"type": "text", "index": 5, "name": "create_time", "comment": null}, "adgroup_name": {"type": "text", "index": 6, "name": "adgroup_name", "comment": null}, "placement_type": {"type": "text", "index": 7, "name": "placement_type", "comment": null}, "profile_image": {"type": "integer", "index": 8, "name": "profile_image", "comment": null}, "landing_page_url": {"type": "integer", "index": 9, "name": "landing_page_url", "comment": null}, "display_name": {"type": "integer", "index": 10, "name": "display_name", "comment": null}, "app_type": {"type": "integer", "index": 11, "name": "app_type", "comment": null}, "app_download_url": {"type": "integer", "index": 12, "name": "app_download_url", "comment": null}, "app_name": {"type": "integer", "index": 13, "name": "app_name", "comment": null}, "optimization_event": {"type": "text", "index": 14, "name": "optimization_event", "comment": null}, "secondary_optimization_event": {"type": "integer", "index": 15, "name": "secondary_optimization_event", "comment": null}, "creative_material_mode": {"type": "text", "index": 16, "name": "creative_material_mode", "comment": null}, "audience_type": {"type": "integer", "index": 17, "name": "audience_type", "comment": null}, "gender": {"type": "text", "index": 18, "name": "gender", "comment": null}, "min_android_version": {"type": "integer", "index": 19, "name": "min_android_version", "comment": null}, "min_ios_version": {"type": "integer", "index": 20, "name": "min_ios_version", "comment": null}, "budget_mode": {"type": "text", "index": 21, "name": "budget_mode", "comment": null}, "schedule_type": {"type": "text", "index": 22, "name": "schedule_type", "comment": null}, "dayparting": {"type": "integer", "index": 23, "name": "dayparting", "comment": null}, "optimization_goal": {"type": "text", "index": 24, "name": "optimization_goal", "comment": null}, "cpv_video_duration": {"type": "integer", "index": 25, "name": "cpv_video_duration", "comment": null}, "pacing": {"type": "text", "index": 26, "name": "pacing", "comment": null}, "billing_event": {"type": "text", "index": 27, "name": "billing_event", "comment": null}, "bid_type": {"type": "text", "index": 28, "name": "bid_type", "comment": null}, "deep_bid_type": {"type": "integer", "index": 29, "name": "deep_bid_type", "comment": null}, "impression_tracking_url": {"type": "integer", "index": 30, "name": "impression_tracking_url", "comment": null}, "click_tracking_url": {"type": "integer", "index": 31, "name": "click_tracking_url", "comment": null}, "secondary_status": {"type": "text", "index": 32, "name": "secondary_status", "comment": null}, "operation_status": {"type": "text", "index": 33, "name": "operation_status", "comment": null}, "statistic_type": {"type": "integer", "index": 34, "name": "statistic_type", "comment": null}, "video_download": {"type": "text", "index": 35, "name": "video_download", "comment": null}, "open_url": {"type": "integer", "index": 36, "name": "open_url", "comment": null}, "open_url_type": {"type": "integer", "index": 37, "name": "open_url_type", "comment": null}, "fallback_type": {"type": "integer", "index": 38, "name": "fallback_type", "comment": null}, "budget": {"type": "integer", "index": 39, "name": "budget", "comment": null}, "bid_price": {"type": "integer", "index": 40, "name": "bid_price", "comment": null}, "conversion_bid_price": {"type": "integer", "index": 41, "name": "conversion_bid_price", "comment": null}, "deep_cpa_bid": {"type": "integer", "index": 42, "name": "deep_cpa_bid", "comment": null}, "schedule_start_time": {"type": "text", "index": 43, "name": "schedule_start_time", "comment": null}, "schedule_end_time": {"type": "text", "index": 44, "name": "schedule_end_time", "comment": null}, "app_id": {"type": "integer", "index": 45, "name": "app_id", "comment": null}, "pixel_id": {"type": "integer", "index": 46, "name": "pixel_id", "comment": null}, "inventory_filter_enabled": {"type": "boolean", "index": 47, "name": "inventory_filter_enabled", "comment": null}, "is_hfss": {"type": "boolean", "index": 48, "name": "is_hfss", "comment": null}, "is_new_structure": {"type": "boolean", "index": 49, "name": "is_new_structure", "comment": null}, "category": {"type": "integer", "index": 50, "name": "category", "comment": null}, "is_comment_disable": {"type": "integer", "index": 51, "name": "is_comment_disable", "comment": null}, "skip_learning_phase": {"type": "integer", "index": 52, "name": "skip_learning_phase", "comment": null}, "frequency": {"type": "integer", "index": 53, "name": "frequency", "comment": null}, "frequency_schedule": {"type": "integer", "index": 54, "name": "frequency_schedule", "comment": null}, "action_days": {"type": "integer", "index": 55, "name": "action_days", "comment": null}, "audience": {"type": "text", "index": 56, "name": "audience", "comment": null}, "excluded_audience": {"type": "text", "index": 57, "name": "excluded_audience", "comment": null}, "location": {"type": "text", "index": 58, "name": "location", "comment": null}, "interest_category_v_2": {"type": "text", "index": 59, "name": "interest_category_v_2", "comment": null}, "pangle_block_app_list_id": {"type": "text", "index": 60, "name": "pangle_block_app_list_id", "comment": null}, "action_categories": {"type": "text", "index": 61, "name": "action_categories", "comment": null}, "placements": {"type": "text", "index": 62, "name": "placements", "comment": null}, "keywords": {"type": "integer", "index": 63, "name": "keywords", "comment": null}, "age_groups": {"type": "text", "index": 64, "name": "age_groups", "comment": null}, "languages": {"type": "text", "index": 65, "name": "languages", "comment": null}, "operating_systems": {"type": "text", "index": 66, "name": "operating_systems", "comment": null}, "network_types": {"type": "text", "index": 67, "name": "network_types", "comment": null}, "carriers": {"type": "text", "index": 68, "name": "carriers", "comment": null}, "video_actions": {"type": "text", "index": 69, "name": "video_actions", "comment": null}, "package": {"type": "integer", "index": 70, "name": "package", "comment": null}, "_fivetran_synced": {"type": "text", "index": 71, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.tiktok_adgroup_history_data"}, "seed.ad_reporting_integration_tests.tiktok_adgroup_report_hourly_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_adgroup_report_hourly_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"adgroup_id": {"type": "integer", "index": 1, "name": "adgroup_id", "comment": null}, "stat_time_hour": {"type": "timestamp without time zone", "index": 2, "name": "stat_time_hour", "comment": null}, "cost_per_conversion": {"type": "double precision", "index": 3, "name": "cost_per_conversion", "comment": null}, "cpc": {"type": "double precision", "index": 4, "name": "cpc", "comment": null}, "video_play_actions": {"type": "integer", "index": 5, "name": "video_play_actions", "comment": null}, "conversion_rate": {"type": "integer", "index": 6, "name": "conversion_rate", "comment": null}, "video_views_p_75": {"type": "integer", "index": 7, "name": "video_views_p_75", "comment": null}, "result": {"type": "integer", "index": 8, "name": "result", "comment": null}, "video_views_p_50": {"type": "integer", "index": 9, "name": "video_views_p_50", "comment": null}, "impressions": {"type": "integer", "index": 10, "name": "impressions", "comment": null}, "comments": {"type": "integer", "index": 11, "name": "comments", "comment": null}, "real_time_cost_per_result": {"type": "double precision", "index": 12, "name": "real_time_cost_per_result", "comment": null}, "conversion": {"type": "integer", "index": 13, "name": "conversion", "comment": null}, "real_time_result": {"type": "integer", "index": 14, "name": "real_time_result", "comment": null}, "video_views_p_100": {"type": "integer", "index": 15, "name": "video_views_p_100", "comment": null}, "shares": {"type": "integer", "index": 16, "name": "shares", "comment": null}, "real_time_conversion_rate": {"type": "double precision", "index": 17, "name": "real_time_conversion_rate", "comment": null}, "cost_per_secondary_goal_result": {"type": "text", "index": 18, "name": "cost_per_secondary_goal_result", "comment": null}, "secondary_goal_result_rate": {"type": "text", "index": 19, "name": "secondary_goal_result_rate", "comment": null}, "clicks": {"type": "integer", "index": 20, "name": "clicks", "comment": null}, "cost_per_1000_reached": {"type": "double precision", "index": 21, "name": "cost_per_1000_reached", "comment": null}, "video_views_p_25": {"type": "integer", "index": 22, "name": "video_views_p_25", "comment": null}, "reach": {"type": "integer", "index": 23, "name": "reach", "comment": null}, "real_time_cost_per_conversion": {"type": "double precision", "index": 24, "name": "real_time_cost_per_conversion", "comment": null}, "profile_visits_rate": {"type": "integer", "index": 25, "name": "profile_visits_rate", "comment": null}, "average_video_play": {"type": "double precision", "index": 26, "name": "average_video_play", "comment": null}, "profile_visits": {"type": "integer", "index": 27, "name": "profile_visits", "comment": null}, "cpm": {"type": "double precision", "index": 28, "name": "cpm", "comment": null}, "ctr": {"type": "double precision", "index": 29, "name": "ctr", "comment": null}, "video_watched_2_s": {"type": "integer", "index": 30, "name": "video_watched_2_s", "comment": null}, "follows": {"type": "integer", "index": 31, "name": "follows", "comment": null}, "result_rate": {"type": "double precision", "index": 32, "name": "result_rate", "comment": null}, "video_watched_6_s": {"type": "integer", "index": 33, "name": "video_watched_6_s", "comment": null}, "secondary_goal_result": {"type": "text", "index": 34, "name": "secondary_goal_result", "comment": null}, "cost_per_result": {"type": "double precision", "index": 35, "name": "cost_per_result", "comment": null}, "average_video_play_per_user": {"type": "double precision", "index": 36, "name": "average_video_play_per_user", "comment": null}, "real_time_result_rate": {"type": "double precision", "index": 37, "name": "real_time_result_rate", "comment": null}, "spend": {"type": "double precision", "index": 38, "name": "spend", "comment": null}, "likes": {"type": "integer", "index": 39, "name": "likes", "comment": null}, "real_time_conversion": {"type": "integer", "index": 40, "name": "real_time_conversion", "comment": null}, "total_purchase_value": {"type": "double precision", "index": 41, "name": "total_purchase_value", "comment": null}, "total_sales_lead_value": {"type": "double precision", "index": 42, "name": "total_sales_lead_value", "comment": null}, "_fivetran_synced": {"type": "text", "index": 43, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.tiktok_adgroup_report_hourly_data"}, "seed.ad_reporting_integration_tests.tiktok_advertiser_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_advertiser_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "address": {"type": "text", "index": 3, "name": "address", "comment": null}, "company": {"type": "text", "index": 4, "name": "company", "comment": null}, "contacter": {"type": "integer", "index": 5, "name": "contacter", "comment": null}, "country": {"type": "text", "index": 6, "name": "country", "comment": null}, "currency": {"type": "text", "index": 7, "name": "currency", "comment": null}, "description": {"type": "text", "index": 8, "name": "description", "comment": null}, "email": {"type": "text", "index": 9, "name": "email", "comment": null}, "industry": {"type": "integer", "index": 10, "name": "industry", "comment": null}, "license_no": {"type": "integer", "index": 11, "name": "license_no", "comment": null}, "license_url": {"type": "integer", "index": 12, "name": "license_url", "comment": null}, "promotion_area": {"type": "integer", "index": 13, "name": "promotion_area", "comment": null}, "rejected_reason": {"type": "integer", "index": 14, "name": "rejected_reason", "comment": null}, "role": {"type": "text", "index": 15, "name": "role", "comment": null}, "status": {"type": "text", "index": 16, "name": "status", "comment": null}, "telephone_number": {"type": "text", "index": 17, "name": "telephone_number", "comment": null}, "timezone": {"type": "text", "index": 18, "name": "timezone", "comment": null}, "balance": {"type": "double precision", "index": 19, "name": "balance", "comment": null}, "create_time": {"type": "text", "index": 20, "name": "create_time", "comment": null}, "language": {"type": "text", "index": 21, "name": "language", "comment": null}, "cellphone_number": {"type": "text", "index": 22, "name": "cellphone_number", "comment": null}, "_fivetran_synced": {"type": "text", "index": 23, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.tiktok_advertiser_data"}, "seed.ad_reporting_integration_tests.tiktok_campaign_country_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_campaign_country_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 3, "name": "clicks", "comment": null}, "conversion": {"type": "integer", "index": 4, "name": "conversion", "comment": null}, "conversion_rate": {"type": "double precision", "index": 5, "name": "conversion_rate", "comment": null}, "cost_per_conversion": {"type": "double precision", "index": 6, "name": "cost_per_conversion", "comment": null}, "country_code": {"type": "text", "index": 7, "name": "country_code", "comment": null}, "cpc": {"type": "double precision", "index": 8, "name": "cpc", "comment": null}, "cpm": {"type": "double precision", "index": 9, "name": "cpm", "comment": null}, "ctr": {"type": "double precision", "index": 10, "name": "ctr", "comment": null}, "impressions": {"type": "integer", "index": 11, "name": "impressions", "comment": null}, "real_time_conversion": {"type": "integer", "index": 12, "name": "real_time_conversion", "comment": null}, "spend": {"type": "double precision", "index": 13, "name": "spend", "comment": null}, "stat_time_day": {"type": "timestamp without time zone", "index": 14, "name": "stat_time_day", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.tiktok_campaign_country_report_data"}, "seed.ad_reporting_integration_tests.tiktok_campaign_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "integer", "index": 1, "name": "ad_id", "comment": null}, "updated_at": {"type": "text", "index": 2, "name": "updated_at", "comment": null}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": null}, "adgroup_id": {"type": "integer", "index": 4, "name": "adgroup_id", "comment": null}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": null}, "create_time": {"type": "text", "index": 6, "name": "create_time", "comment": null}, "ad_name": {"type": "text", "index": 7, "name": "ad_name", "comment": null}, "call_to_action": {"type": "text", "index": 8, "name": "call_to_action", "comment": null}, "secondary_status": {"type": "text", "index": 9, "name": "secondary_status", "comment": null}, "operation_status": {"type": "text", "index": 10, "name": "operation_status", "comment": null}, "ad_text": {"type": "text", "index": 11, "name": "ad_text", "comment": null}, "video_id": {"type": "text", "index": 12, "name": "video_id", "comment": null}, "app_name": {"type": "integer", "index": 13, "name": "app_name", "comment": null}, "deeplink": {"type": "integer", "index": 14, "name": "deeplink", "comment": null}, "landing_page_url": {"type": "text", "index": 15, "name": "landing_page_url", "comment": null}, "display_name": {"type": "text", "index": 16, "name": "display_name", "comment": null}, "profile_image_url": {"type": "integer", "index": 17, "name": "profile_image_url", "comment": null}, "impression_tracking_url": {"type": "integer", "index": 18, "name": "impression_tracking_url", "comment": null}, "click_tracking_url": {"type": "integer", "index": 19, "name": "click_tracking_url", "comment": null}, "playable_url": {"type": "integer", "index": 20, "name": "playable_url", "comment": null}, "is_aco": {"type": "boolean", "index": 21, "name": "is_aco", "comment": null}, "creative_authorized": {"type": "boolean", "index": 22, "name": "creative_authorized", "comment": null}, "is_new_structure": {"type": "boolean", "index": 23, "name": "is_new_structure", "comment": null}, "image_ids": {"type": "text", "index": 24, "name": "image_ids", "comment": null}, "_fivetran_synced": {"type": "text", "index": 25, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.tiktok_campaign_history_data"}, "seed.ad_reporting_integration_tests.tiktok_campaign_report_hourly_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_campaign_report_hourly_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "stat_time_hour": {"type": "timestamp without time zone", "index": 2, "name": "stat_time_hour", "comment": null}, "cost_per_conversion": {"type": "double precision", "index": 3, "name": "cost_per_conversion", "comment": null}, "cpc": {"type": "double precision", "index": 4, "name": "cpc", "comment": null}, "video_play_actions": {"type": "integer", "index": 5, "name": "video_play_actions", "comment": null}, "conversion_rate": {"type": "integer", "index": 6, "name": "conversion_rate", "comment": null}, "video_views_p_75": {"type": "integer", "index": 7, "name": "video_views_p_75", "comment": null}, "result": {"type": "integer", "index": 8, "name": "result", "comment": null}, "video_views_p_50": {"type": "integer", "index": 9, "name": "video_views_p_50", "comment": null}, "impressions": {"type": "integer", "index": 10, "name": "impressions", "comment": null}, "comments": {"type": "integer", "index": 11, "name": "comments", "comment": null}, "real_time_cost_per_result": {"type": "double precision", "index": 12, "name": "real_time_cost_per_result", "comment": null}, "conversion": {"type": "integer", "index": 13, "name": "conversion", "comment": null}, "real_time_result": {"type": "integer", "index": 14, "name": "real_time_result", "comment": null}, "video_views_p_100": {"type": "integer", "index": 15, "name": "video_views_p_100", "comment": null}, "shares": {"type": "integer", "index": 16, "name": "shares", "comment": null}, "real_time_conversion_rate": {"type": "double precision", "index": 17, "name": "real_time_conversion_rate", "comment": null}, "cost_per_secondary_goal_result": {"type": "text", "index": 18, "name": "cost_per_secondary_goal_result", "comment": null}, "secondary_goal_result_rate": {"type": "text", "index": 19, "name": "secondary_goal_result_rate", "comment": null}, "clicks": {"type": "integer", "index": 20, "name": "clicks", "comment": null}, "cost_per_1000_reached": {"type": "double precision", "index": 21, "name": "cost_per_1000_reached", "comment": null}, "video_views_p_25": {"type": "integer", "index": 22, "name": "video_views_p_25", "comment": null}, "reach": {"type": "integer", "index": 23, "name": "reach", "comment": null}, "real_time_cost_per_conversion": {"type": "double precision", "index": 24, "name": "real_time_cost_per_conversion", "comment": null}, "profile_visits_rate": {"type": "integer", "index": 25, "name": "profile_visits_rate", "comment": null}, "average_video_play": {"type": "double precision", "index": 26, "name": "average_video_play", "comment": null}, "profile_visits": {"type": "integer", "index": 27, "name": "profile_visits", "comment": null}, "cpm": {"type": "double precision", "index": 28, "name": "cpm", "comment": null}, "ctr": {"type": "double precision", "index": 29, "name": "ctr", "comment": null}, "video_watched_2_s": {"type": "integer", "index": 30, "name": "video_watched_2_s", "comment": null}, "follows": {"type": "integer", "index": 31, "name": "follows", "comment": null}, "result_rate": {"type": "double precision", "index": 32, "name": "result_rate", "comment": null}, "video_watched_6_s": {"type": "integer", "index": 33, "name": "video_watched_6_s", "comment": null}, "secondary_goal_result": {"type": "text", "index": 34, "name": "secondary_goal_result", "comment": null}, "cost_per_result": {"type": "double precision", "index": 35, "name": "cost_per_result", "comment": null}, "average_video_play_per_user": {"type": "double precision", "index": 36, "name": "average_video_play_per_user", "comment": null}, "real_time_result_rate": {"type": "double precision", "index": 37, "name": "real_time_result_rate", "comment": null}, "spend": {"type": "double precision", "index": 38, "name": "spend", "comment": null}, "likes": {"type": "integer", "index": 39, "name": "likes", "comment": null}, "real_time_conversion": {"type": "integer", "index": 40, "name": "real_time_conversion", "comment": null}, "total_purchase_value": {"type": "double precision", "index": 41, "name": "total_purchase_value", "comment": null}, "total_sales_lead_value": {"type": "double precision", "index": 42, "name": "total_sales_lead_value", "comment": null}, "_fivetran_synced": {"type": "text", "index": 43, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.tiktok_campaign_report_hourly_data"}, "seed.ad_reporting_integration_tests.tiktok_location_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_location_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "advertiser_id": {"type": "integer", "index": 2, "name": "advertiser_id", "comment": null}, "area_type": {"type": "text", "index": 3, "name": "area_type", "comment": null}, "country_code": {"type": "text", "index": 4, "name": "country_code", "comment": null}, "parent_id": {"type": "text", "index": 5, "name": "parent_id", "comment": null}, "region_id": {"type": "text", "index": 6, "name": "region_id", "comment": null}, "region_level": {"type": "text", "index": 7, "name": "region_level", "comment": null}, "region_name": {"type": "text", "index": 8, "name": "region_name", "comment": null}, "support_below_18": {"type": "boolean", "index": 9, "name": "support_below_18", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.tiktok_location_data"}, "seed.ad_reporting_integration_tests.twitter_account_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_account_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "approval_status": {"type": "text", "index": 2, "name": "approval_status", "comment": null}, "business_id": {"type": "integer", "index": 3, "name": "business_id", "comment": null}, "business_name": {"type": "integer", "index": 4, "name": "business_name", "comment": null}, "created_at": {"type": "text", "index": 5, "name": "created_at", "comment": null}, "deleted": {"type": "boolean", "index": 6, "name": "deleted", "comment": null}, "id": {"type": "text", "index": 7, "name": "id", "comment": null}, "industry_type": {"type": "integer", "index": 8, "name": "industry_type", "comment": null}, "name": {"type": "character varying", "index": 9, "name": "name", "comment": null}, "salt": {"type": "integer", "index": 10, "name": "salt", "comment": null}, "timezone": {"type": "text", "index": 11, "name": "timezone", "comment": null}, "timezone_switch_at": {"type": "text", "index": 12, "name": "timezone_switch_at", "comment": null}, "updated_at": {"type": "text", "index": 13, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.twitter_account_history_data"}, "seed.ad_reporting_integration_tests.twitter_account_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_account_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "text", "index": 1, "name": "account_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "placement": {"type": "text", "index": 3, "name": "placement", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}, "engagements": {"type": "integer", "index": 5, "name": "engagements", "comment": null}, "follows": {"type": "integer", "index": 6, "name": "follows", "comment": null}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": null}, "likes": {"type": "integer", "index": 8, "name": "likes", "comment": null}, "replies": {"type": "integer", "index": 9, "name": "replies", "comment": null}, "retweets": {"type": "integer", "index": 10, "name": "retweets", "comment": null}, "unfollows": {"type": "integer", "index": 11, "name": "unfollows", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.twitter_account_report_data"}, "seed.ad_reporting_integration_tests.twitter_campaign_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": null}, "created_at": {"type": "text", "index": 3, "name": "created_at", "comment": null}, "currency": {"type": "text", "index": 4, "name": "currency", "comment": null}, "daily_budget_amount_local_micro": {"type": "integer", "index": 5, "name": "daily_budget_amount_local_micro", "comment": null}, "deleted": {"type": "boolean", "index": 6, "name": "deleted", "comment": null}, "duration_in_days": {"type": "integer", "index": 7, "name": "duration_in_days", "comment": null}, "end_time": {"type": "text", "index": 8, "name": "end_time", "comment": null}, "entity_status": {"type": "text", "index": 9, "name": "entity_status", "comment": null}, "frequency_cap": {"type": "integer", "index": 10, "name": "frequency_cap", "comment": null}, "funding_instrument_id": {"type": "text", "index": 11, "name": "funding_instrument_id", "comment": null}, "id": {"type": "text", "index": 12, "name": "id", "comment": null}, "name": {"type": "text", "index": 13, "name": "name", "comment": null}, "servable": {"type": "boolean", "index": 14, "name": "servable", "comment": null}, "standard_delivery": {"type": "boolean", "index": 15, "name": "standard_delivery", "comment": null}, "start_time": {"type": "text", "index": 16, "name": "start_time", "comment": null}, "total_budget_amount_local_micro": {"type": "integer", "index": 17, "name": "total_budget_amount_local_micro", "comment": null}, "updated_at": {"type": "text", "index": 18, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.twitter_campaign_history_data"}, "seed.ad_reporting_integration_tests.twitter_campaign_locations_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_campaign_locations_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"segment": {"type": "text", "index": 1, "name": "segment", "comment": null}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 3, "name": "billed_charge_local_micro", "comment": null}, "campaign_id": {"type": "text", "index": 4, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 5, "name": "clicks", "comment": null}, "date": {"type": "timestamp without time zone", "index": 6, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": null}, "placement": {"type": "text", "index": 8, "name": "placement", "comment": null}, "url_clicks": {"type": "integer", "index": 9, "name": "url_clicks", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.twitter_campaign_locations_report_data"}, "seed.ad_reporting_integration_tests.twitter_campaign_regions_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_campaign_regions_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"location_name": {"type": "text", "index": 1, "name": "location_name", "comment": null}, "location_type": {"type": "text", "index": 2, "name": "location_type", "comment": null}, "segment": {"type": "text", "index": 3, "name": "segment", "comment": null}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 5, "name": "billed_charge_local_micro", "comment": null}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 7, "name": "clicks", "comment": null}, "date": {"type": "timestamp without time zone", "index": 8, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "placement": {"type": "text", "index": 10, "name": "placement", "comment": null}, "url_clicks": {"type": "integer", "index": 11, "name": "url_clicks", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.twitter_campaign_regions_report_data"}, "seed.ad_reporting_integration_tests.twitter_campaign_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_campaign_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "text", "index": 1, "name": "account_id", "comment": null}, "campaign_id": {"type": "text", "index": 2, "name": "campaign_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 3, "name": "date", "comment": null}, "placement": {"type": "text", "index": 4, "name": "placement", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "app_clicks": {"type": "integer", "index": 6, "name": "app_clicks", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 7, "name": "billed_charge_local_micro", "comment": null}, "billed_engagements": {"type": "integer", "index": 8, "name": "billed_engagements", "comment": null}, "card_engagements": {"type": "integer", "index": 9, "name": "card_engagements", "comment": null}, "carousel_swipes": {"type": "integer", "index": 10, "name": "carousel_swipes", "comment": null}, "clicks": {"type": "integer", "index": 11, "name": "clicks", "comment": null}, "conversion_custom_metric": {"type": "integer", "index": 12, "name": "conversion_custom_metric", "comment": null}, "conversion_custom_order_quantity": {"type": "integer", "index": 13, "name": "conversion_custom_order_quantity", "comment": null}, "conversion_custom_order_quantity_engagement": {"type": "integer", "index": 14, "name": "conversion_custom_order_quantity_engagement", "comment": null}, "conversion_custom_order_quantity_view": {"type": "integer", "index": 15, "name": "conversion_custom_order_quantity_view", "comment": null}, "conversion_custom_post_engagement": {"type": "integer", "index": 16, "name": "conversion_custom_post_engagement", "comment": null}, "conversion_custom_post_view": {"type": "integer", "index": 17, "name": "conversion_custom_post_view", "comment": null}, "conversion_custom_sale_amount": {"type": "integer", "index": 18, "name": "conversion_custom_sale_amount", "comment": null}, "conversion_custom_sale_amount_engagement": {"type": "integer", "index": 19, "name": "conversion_custom_sale_amount_engagement", "comment": null}, "conversion_custom_sale_amount_view": {"type": "integer", "index": 20, "name": "conversion_custom_sale_amount_view", "comment": null}, "conversion_downloads_metric": {"type": "integer", "index": 21, "name": "conversion_downloads_metric", "comment": null}, "conversion_downloads_order_quantity": {"type": "integer", "index": 22, "name": "conversion_downloads_order_quantity", "comment": null}, "conversion_downloads_order_quantity_engagement": {"type": "integer", "index": 23, "name": "conversion_downloads_order_quantity_engagement", "comment": null}, "conversion_downloads_order_quantity_view": {"type": "integer", "index": 24, "name": "conversion_downloads_order_quantity_view", "comment": null}, "conversion_downloads_post_engagement": {"type": "integer", "index": 25, "name": "conversion_downloads_post_engagement", "comment": null}, "conversion_downloads_post_view": {"type": "integer", "index": 26, "name": "conversion_downloads_post_view", "comment": null}, "conversion_downloads_sale_amount": {"type": "integer", "index": 27, "name": "conversion_downloads_sale_amount", "comment": null}, "conversion_downloads_sale_amount_engagement": {"type": "integer", "index": 28, "name": "conversion_downloads_sale_amount_engagement", "comment": null}, "conversion_downloads_sale_amount_view": {"type": "integer", "index": 29, "name": "conversion_downloads_sale_amount_view", "comment": null}, "conversion_purchases_assisted": {"type": "integer", "index": 30, "name": "conversion_purchases_assisted", "comment": null}, "conversion_purchases_metric": {"type": "integer", "index": 31, "name": "conversion_purchases_metric", "comment": null}, "conversion_purchases_order_quantity": {"type": "integer", "index": 32, "name": "conversion_purchases_order_quantity", "comment": null}, "conversion_purchases_order_quantity_engagement": {"type": "integer", "index": 33, "name": "conversion_purchases_order_quantity_engagement", "comment": null}, "conversion_purchases_order_quantity_view": {"type": "integer", "index": 34, "name": "conversion_purchases_order_quantity_view", "comment": null}, "conversion_purchases_post_engagement": {"type": "integer", "index": 35, "name": "conversion_purchases_post_engagement", "comment": null}, "conversion_purchases_post_view": {"type": "integer", "index": 36, "name": "conversion_purchases_post_view", "comment": null}, "conversion_purchases_sale_amount": {"type": "integer", "index": 37, "name": "conversion_purchases_sale_amount", "comment": null}, "conversion_purchases_sale_amount_engagement": {"type": "integer", "index": 38, "name": "conversion_purchases_sale_amount_engagement", "comment": null}, "conversion_purchases_sale_amount_view": {"type": "integer", "index": 39, "name": "conversion_purchases_sale_amount_view", "comment": null}, "conversion_sign_ups_assisted": {"type": "integer", "index": 40, "name": "conversion_sign_ups_assisted", "comment": null}, "conversion_sign_ups_metric": {"type": "integer", "index": 41, "name": "conversion_sign_ups_metric", "comment": null}, "conversion_sign_ups_order_quantity": {"type": "integer", "index": 42, "name": "conversion_sign_ups_order_quantity", "comment": null}, "conversion_sign_ups_order_quantity_engagement": {"type": "integer", "index": 43, "name": "conversion_sign_ups_order_quantity_engagement", "comment": null}, "conversion_sign_ups_order_quantity_view": {"type": "integer", "index": 44, "name": "conversion_sign_ups_order_quantity_view", "comment": null}, "conversion_sign_ups_post_engagement": {"type": "integer", "index": 45, "name": "conversion_sign_ups_post_engagement", "comment": null}, "conversion_sign_ups_post_view": {"type": "integer", "index": 46, "name": "conversion_sign_ups_post_view", "comment": null}, "conversion_sign_ups_sale_amount": {"type": "integer", "index": 47, "name": "conversion_sign_ups_sale_amount", "comment": null}, "conversion_sign_ups_sale_amount_engagement": {"type": "integer", "index": 48, "name": "conversion_sign_ups_sale_amount_engagement", "comment": null}, "conversion_sign_ups_sale_amount_view": {"type": "integer", "index": 49, "name": "conversion_sign_ups_sale_amount_view", "comment": null}, "conversion_site_visits_metric": {"type": "integer", "index": 50, "name": "conversion_site_visits_metric", "comment": null}, "conversion_site_visits_order_quantity": {"type": "integer", "index": 51, "name": "conversion_site_visits_order_quantity", "comment": null}, "conversion_site_visits_order_quantity_engagement": {"type": "integer", "index": 52, "name": "conversion_site_visits_order_quantity_engagement", "comment": null}, "conversion_site_visits_order_quantity_view": {"type": "integer", "index": 53, "name": "conversion_site_visits_order_quantity_view", "comment": null}, "conversion_site_visits_post_engagement": {"type": "integer", "index": 54, "name": "conversion_site_visits_post_engagement", "comment": null}, "conversion_site_visits_post_view": {"type": "integer", "index": 55, "name": "conversion_site_visits_post_view", "comment": null}, "conversion_site_visits_sale_amount": {"type": "integer", "index": 56, "name": "conversion_site_visits_sale_amount", "comment": null}, "conversion_site_visits_sale_amount_engagement": {"type": "integer", "index": 57, "name": "conversion_site_visits_sale_amount_engagement", "comment": null}, "conversion_site_visits_sale_amount_view": {"type": "integer", "index": 58, "name": "conversion_site_visits_sale_amount_view", "comment": null}, "engagements": {"type": "integer", "index": 59, "name": "engagements", "comment": null}, "follows": {"type": "integer", "index": 60, "name": "follows", "comment": null}, "impressions": {"type": "integer", "index": 61, "name": "impressions", "comment": null}, "likes": {"type": "integer", "index": 62, "name": "likes", "comment": null}, "media_engagements": {"type": "integer", "index": 63, "name": "media_engagements", "comment": null}, "media_views": {"type": "integer", "index": 64, "name": "media_views", "comment": null}, "mobile_conversion_achievements_unlocked_assisted": {"type": "integer", "index": 65, "name": "mobile_conversion_achievements_unlocked_assisted", "comment": null}, "mobile_conversion_achievements_unlocked_order_quantity": {"type": "integer", "index": 66, "name": "mobile_conversion_achievements_unlocked_order_quantity", "comment": null}, "mobile_conversion_achievements_unlocked_post_engagement": {"type": "integer", "index": 67, "name": "mobile_conversion_achievements_unlocked_post_engagement", "comment": null}, "mobile_conversion_achievements_unlocked_post_view": {"type": "integer", "index": 68, "name": "mobile_conversion_achievements_unlocked_post_view", "comment": null}, "mobile_conversion_achievements_unlocked_sale_amount": {"type": "integer", "index": 69, "name": "mobile_conversion_achievements_unlocked_sale_amount", "comment": null}, "mobile_conversion_add_to_carts_assisted": {"type": "integer", "index": 70, "name": "mobile_conversion_add_to_carts_assisted", "comment": null}, "mobile_conversion_add_to_carts_order_quantity": {"type": "integer", "index": 71, "name": "mobile_conversion_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_add_to_carts_post_engagement": {"type": "integer", "index": 72, "name": "mobile_conversion_add_to_carts_post_engagement", "comment": null}, "mobile_conversion_add_to_carts_post_view": {"type": "integer", "index": 73, "name": "mobile_conversion_add_to_carts_post_view", "comment": null}, "mobile_conversion_add_to_carts_sale_amount": {"type": "integer", "index": 74, "name": "mobile_conversion_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_add_to_wishlists_assisted": {"type": "integer", "index": 75, "name": "mobile_conversion_add_to_wishlists_assisted", "comment": null}, "mobile_conversion_add_to_wishlists_order_quantity": {"type": "integer", "index": 76, "name": "mobile_conversion_add_to_wishlists_order_quantity", "comment": null}, "mobile_conversion_add_to_wishlists_post_engagement": {"type": "integer", "index": 77, "name": "mobile_conversion_add_to_wishlists_post_engagement", "comment": null}, "mobile_conversion_add_to_wishlists_post_view": {"type": "integer", "index": 78, "name": "mobile_conversion_add_to_wishlists_post_view", "comment": null}, "mobile_conversion_add_to_wishlists_sale_amount": {"type": "integer", "index": 79, "name": "mobile_conversion_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_checkouts_initiated_assisted": {"type": "integer", "index": 80, "name": "mobile_conversion_checkouts_initiated_assisted", "comment": null}, "mobile_conversion_checkouts_initiated_order_quantity": {"type": "integer", "index": 81, "name": "mobile_conversion_checkouts_initiated_order_quantity", "comment": null}, "mobile_conversion_checkouts_initiated_post_engagement": {"type": "integer", "index": 82, "name": "mobile_conversion_checkouts_initiated_post_engagement", "comment": null}, "mobile_conversion_checkouts_initiated_post_view": {"type": "integer", "index": 83, "name": "mobile_conversion_checkouts_initiated_post_view", "comment": null}, "mobile_conversion_checkouts_initiated_sale_amount": {"type": "integer", "index": 84, "name": "mobile_conversion_checkouts_initiated_sale_amount", "comment": null}, "mobile_conversion_content_views_assisted": {"type": "integer", "index": 85, "name": "mobile_conversion_content_views_assisted", "comment": null}, "mobile_conversion_content_views_order_quantity": {"type": "integer", "index": 86, "name": "mobile_conversion_content_views_order_quantity", "comment": null}, "mobile_conversion_content_views_post_engagement": {"type": "integer", "index": 87, "name": "mobile_conversion_content_views_post_engagement", "comment": null}, "mobile_conversion_content_views_post_view": {"type": "integer", "index": 88, "name": "mobile_conversion_content_views_post_view", "comment": null}, "mobile_conversion_content_views_sale_amount": {"type": "integer", "index": 89, "name": "mobile_conversion_content_views_sale_amount", "comment": null}, "mobile_conversion_downloads_order_quantity": {"type": "integer", "index": 90, "name": "mobile_conversion_downloads_order_quantity", "comment": null}, "mobile_conversion_downloads_post_engagement": {"type": "integer", "index": 91, "name": "mobile_conversion_downloads_post_engagement", "comment": null}, "mobile_conversion_downloads_post_view": {"type": "integer", "index": 92, "name": "mobile_conversion_downloads_post_view", "comment": null}, "mobile_conversion_downloads_sale_amount": {"type": "integer", "index": 93, "name": "mobile_conversion_downloads_sale_amount", "comment": null}, "mobile_conversion_installs_assisted": {"type": "integer", "index": 94, "name": "mobile_conversion_installs_assisted", "comment": null}, "mobile_conversion_installs_order_quantity": {"type": "integer", "index": 95, "name": "mobile_conversion_installs_order_quantity", "comment": null}, "mobile_conversion_installs_post_engagement": {"type": "integer", "index": 96, "name": "mobile_conversion_installs_post_engagement", "comment": null}, "mobile_conversion_installs_post_view": {"type": "integer", "index": 97, "name": "mobile_conversion_installs_post_view", "comment": null}, "mobile_conversion_installs_sale_amount": {"type": "integer", "index": 98, "name": "mobile_conversion_installs_sale_amount", "comment": null}, "mobile_conversion_invites_assisted": {"type": "integer", "index": 99, "name": "mobile_conversion_invites_assisted", "comment": null}, "mobile_conversion_invites_order_quantity": {"type": "integer", "index": 100, "name": "mobile_conversion_invites_order_quantity", "comment": null}, "mobile_conversion_invites_post_engagement": {"type": "integer", "index": 101, "name": "mobile_conversion_invites_post_engagement", "comment": null}, "mobile_conversion_invites_post_view": {"type": "integer", "index": 102, "name": "mobile_conversion_invites_post_view", "comment": null}, "mobile_conversion_invites_sale_amount": {"type": "integer", "index": 103, "name": "mobile_conversion_invites_sale_amount", "comment": null}, "mobile_conversion_key_page_views_post_engagement": {"type": "integer", "index": 104, "name": "mobile_conversion_key_page_views_post_engagement", "comment": null}, "mobile_conversion_key_page_views_post_view": {"type": "integer", "index": 105, "name": "mobile_conversion_key_page_views_post_view", "comment": null}, "mobile_conversion_levels_achieved_assisted": {"type": "integer", "index": 106, "name": "mobile_conversion_levels_achieved_assisted", "comment": null}, "mobile_conversion_levels_achieved_order_quantity": {"type": "integer", "index": 107, "name": "mobile_conversion_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_levels_achieved_post_engagement": {"type": "integer", "index": 108, "name": "mobile_conversion_levels_achieved_post_engagement", "comment": null}, "mobile_conversion_levels_achieved_post_view": {"type": "integer", "index": 109, "name": "mobile_conversion_levels_achieved_post_view", "comment": null}, "mobile_conversion_levels_achieved_sale_amount": {"type": "integer", "index": 110, "name": "mobile_conversion_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_metric": {"type": "integer", "index": 111, "name": "mobile_conversion_lifetime_value_achievements_unlocked_metric", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_order_qu": {"type": "integer", "index": 112, "name": "mobile_conversion_lifetime_value_achievements_unlocked_order_qu", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo": {"type": "integer", "index": 113, "name": "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_metric": {"type": "integer", "index": 114, "name": "mobile_conversion_lifetime_value_add_to_carts_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_order_quantity": {"type": "integer", "index": 115, "name": "mobile_conversion_lifetime_value_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_sale_amount": {"type": "integer", "index": 116, "name": "mobile_conversion_lifetime_value_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_metric": {"type": "integer", "index": 117, "name": "mobile_conversion_lifetime_value_add_to_wishlists_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit": {"type": "integer", "index": 118, "name": "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount": {"type": "integer", "index": 119, "name": "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_metric": {"type": "integer", "index": 120, "name": "mobile_conversion_lifetime_value_checkouts_initiated_metric", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_order_quan": {"type": "integer", "index": 121, "name": "mobile_conversion_lifetime_value_checkouts_initiated_order_quan", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun": {"type": "integer", "index": 122, "name": "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_content_views_metric": {"type": "integer", "index": 123, "name": "mobile_conversion_lifetime_value_content_views_metric", "comment": null}, "mobile_conversion_lifetime_value_content_views_order_quantity": {"type": "integer", "index": 124, "name": "mobile_conversion_lifetime_value_content_views_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_content_views_sale_amount": {"type": "integer", "index": 125, "name": "mobile_conversion_lifetime_value_content_views_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_invites_metric": {"type": "integer", "index": 126, "name": "mobile_conversion_lifetime_value_invites_metric", "comment": null}, "mobile_conversion_lifetime_value_invites_order_quantity": {"type": "integer", "index": 127, "name": "mobile_conversion_lifetime_value_invites_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_invites_sale_amount": {"type": "integer", "index": 128, "name": "mobile_conversion_lifetime_value_invites_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_metric": {"type": "integer", "index": 129, "name": "mobile_conversion_lifetime_value_levels_achieved_metric", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_order_quantity": {"type": "integer", "index": 130, "name": "mobile_conversion_lifetime_value_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_sale_amount": {"type": "integer", "index": 131, "name": "mobile_conversion_lifetime_value_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_logins_metric": {"type": "integer", "index": 132, "name": "mobile_conversion_lifetime_value_logins_metric", "comment": null}, "mobile_conversion_lifetime_value_logins_order_quantity": {"type": "integer", "index": 133, "name": "mobile_conversion_lifetime_value_logins_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_logins_sale_amount": {"type": "integer", "index": 134, "name": "mobile_conversion_lifetime_value_logins_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_metric": {"type": "integer", "index": 135, "name": "mobile_conversion_lifetime_value_payment_info_additions_metric", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_order_q": {"type": "integer", "index": 136, "name": "mobile_conversion_lifetime_value_payment_info_additions_order_q", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_sale_am": {"type": "integer", "index": 137, "name": "mobile_conversion_lifetime_value_payment_info_additions_sale_am", "comment": null}, "mobile_conversion_lifetime_value_purchases_metric": {"type": "integer", "index": 138, "name": "mobile_conversion_lifetime_value_purchases_metric", "comment": null}, "mobile_conversion_lifetime_value_purchases_order_quantity": {"type": "integer", "index": 139, "name": "mobile_conversion_lifetime_value_purchases_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_purchases_sale_amount": {"type": "integer", "index": 140, "name": "mobile_conversion_lifetime_value_purchases_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_rates_metric": {"type": "integer", "index": 141, "name": "mobile_conversion_lifetime_value_rates_metric", "comment": null}, "mobile_conversion_lifetime_value_rates_order_quantity": {"type": "integer", "index": 142, "name": "mobile_conversion_lifetime_value_rates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_rates_sale_amount": {"type": "integer", "index": 143, "name": "mobile_conversion_lifetime_value_rates_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_reservations_metric": {"type": "integer", "index": 144, "name": "mobile_conversion_lifetime_value_reservations_metric", "comment": null}, "mobile_conversion_lifetime_value_reservations_order_quantity": {"type": "integer", "index": 145, "name": "mobile_conversion_lifetime_value_reservations_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_reservations_sale_amount": {"type": "integer", "index": 146, "name": "mobile_conversion_lifetime_value_reservations_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_searches_metric": {"type": "integer", "index": 147, "name": "mobile_conversion_lifetime_value_searches_metric", "comment": null}, "mobile_conversion_lifetime_value_searches_order_quantity": {"type": "integer", "index": 148, "name": "mobile_conversion_lifetime_value_searches_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_searches_sale_amount": {"type": "integer", "index": 149, "name": "mobile_conversion_lifetime_value_searches_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_shares_metric": {"type": "integer", "index": 150, "name": "mobile_conversion_lifetime_value_shares_metric", "comment": null}, "mobile_conversion_lifetime_value_shares_order_quantity": {"type": "integer", "index": 151, "name": "mobile_conversion_lifetime_value_shares_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_shares_sale_amount": {"type": "integer", "index": 152, "name": "mobile_conversion_lifetime_value_shares_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_metric": {"type": "integer", "index": 153, "name": "mobile_conversion_lifetime_value_sign_ups_metric", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_order_quantity": {"type": "integer", "index": 154, "name": "mobile_conversion_lifetime_value_sign_ups_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_sale_amount": {"type": "integer", "index": 155, "name": "mobile_conversion_lifetime_value_sign_ups_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_metric": {"type": "integer", "index": 156, "name": "mobile_conversion_lifetime_value_spent_credits_metric", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_order_quantity": {"type": "integer", "index": 157, "name": "mobile_conversion_lifetime_value_spent_credits_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_sale_amount": {"type": "integer", "index": 158, "name": "mobile_conversion_lifetime_value_spent_credits_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_metric": {"type": "integer", "index": 159, "name": "mobile_conversion_lifetime_value_tutorials_completed_metric", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_order_quan": {"type": "integer", "index": 160, "name": "mobile_conversion_lifetime_value_tutorials_completed_order_quan", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun": {"type": "integer", "index": 161, "name": "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_updates_metric": {"type": "integer", "index": 162, "name": "mobile_conversion_lifetime_value_updates_metric", "comment": null}, "mobile_conversion_lifetime_value_updates_order_quantity": {"type": "integer", "index": 163, "name": "mobile_conversion_lifetime_value_updates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_updates_sale_amount": {"type": "integer", "index": 164, "name": "mobile_conversion_lifetime_value_updates_sale_amount", "comment": null}, "mobile_conversion_logins_assisted": {"type": "integer", "index": 165, "name": "mobile_conversion_logins_assisted", "comment": null}, "mobile_conversion_logins_order_quantity": {"type": "integer", "index": 166, "name": "mobile_conversion_logins_order_quantity", "comment": null}, "mobile_conversion_logins_post_engagement": {"type": "integer", "index": 167, "name": "mobile_conversion_logins_post_engagement", "comment": null}, "mobile_conversion_logins_post_view": {"type": "integer", "index": 168, "name": "mobile_conversion_logins_post_view", "comment": null}, "mobile_conversion_logins_sale_amount": {"type": "integer", "index": 169, "name": "mobile_conversion_logins_sale_amount", "comment": null}, "mobile_conversion_payment_info_additions_assisted": {"type": "integer", "index": 170, "name": "mobile_conversion_payment_info_additions_assisted", "comment": null}, "mobile_conversion_payment_info_additions_order_quantity": {"type": "integer", "index": 171, "name": "mobile_conversion_payment_info_additions_order_quantity", "comment": null}, "mobile_conversion_payment_info_additions_post_engagement": {"type": "integer", "index": 172, "name": "mobile_conversion_payment_info_additions_post_engagement", "comment": null}, "mobile_conversion_payment_info_additions_post_view": {"type": "integer", "index": 173, "name": "mobile_conversion_payment_info_additions_post_view", "comment": null}, "mobile_conversion_payment_info_additions_sale_amount": {"type": "integer", "index": 174, "name": "mobile_conversion_payment_info_additions_sale_amount", "comment": null}, "mobile_conversion_purchases_assisted": {"type": "integer", "index": 175, "name": "mobile_conversion_purchases_assisted", "comment": null}, "mobile_conversion_purchases_order_quantity": {"type": "integer", "index": 176, "name": "mobile_conversion_purchases_order_quantity", "comment": null}, "mobile_conversion_purchases_post_engagement": {"type": "integer", "index": 177, "name": "mobile_conversion_purchases_post_engagement", "comment": null}, "mobile_conversion_purchases_post_view": {"type": "integer", "index": 178, "name": "mobile_conversion_purchases_post_view", "comment": null}, "mobile_conversion_purchases_sale_amount": {"type": "integer", "index": 179, "name": "mobile_conversion_purchases_sale_amount", "comment": null}, "mobile_conversion_rates_assisted": {"type": "integer", "index": 180, "name": "mobile_conversion_rates_assisted", "comment": null}, "mobile_conversion_rates_order_quantity": {"type": "integer", "index": 181, "name": "mobile_conversion_rates_order_quantity", "comment": null}, "mobile_conversion_rates_post_engagement": {"type": "integer", "index": 182, "name": "mobile_conversion_rates_post_engagement", "comment": null}, "mobile_conversion_rates_post_view": {"type": "integer", "index": 183, "name": "mobile_conversion_rates_post_view", "comment": null}, "mobile_conversion_rates_sale_amount": {"type": "integer", "index": 184, "name": "mobile_conversion_rates_sale_amount", "comment": null}, "mobile_conversion_re_engages_assisted": {"type": "integer", "index": 185, "name": "mobile_conversion_re_engages_assisted", "comment": null}, "mobile_conversion_re_engages_order_quantity": {"type": "integer", "index": 186, "name": "mobile_conversion_re_engages_order_quantity", "comment": null}, "mobile_conversion_re_engages_post_engagement": {"type": "integer", "index": 187, "name": "mobile_conversion_re_engages_post_engagement", "comment": null}, "mobile_conversion_re_engages_post_view": {"type": "integer", "index": 188, "name": "mobile_conversion_re_engages_post_view", "comment": null}, "mobile_conversion_re_engages_sale_amount": {"type": "integer", "index": 189, "name": "mobile_conversion_re_engages_sale_amount", "comment": null}, "mobile_conversion_reservations_assisted": {"type": "integer", "index": 190, "name": "mobile_conversion_reservations_assisted", "comment": null}, "mobile_conversion_reservations_order_quantity": {"type": "integer", "index": 191, "name": "mobile_conversion_reservations_order_quantity", "comment": null}, "mobile_conversion_reservations_post_engagement": {"type": "integer", "index": 192, "name": "mobile_conversion_reservations_post_engagement", "comment": null}, "mobile_conversion_reservations_post_view": {"type": "integer", "index": 193, "name": "mobile_conversion_reservations_post_view", "comment": null}, "mobile_conversion_reservations_sale_amount": {"type": "integer", "index": 194, "name": "mobile_conversion_reservations_sale_amount", "comment": null}, "mobile_conversion_searches_assisted": {"type": "integer", "index": 195, "name": "mobile_conversion_searches_assisted", "comment": null}, "mobile_conversion_searches_order_quantity": {"type": "integer", "index": 196, "name": "mobile_conversion_searches_order_quantity", "comment": null}, "mobile_conversion_searches_post_engagement": {"type": "integer", "index": 197, "name": "mobile_conversion_searches_post_engagement", "comment": null}, "mobile_conversion_searches_post_view": {"type": "integer", "index": 198, "name": "mobile_conversion_searches_post_view", "comment": null}, "mobile_conversion_searches_sale_amount": {"type": "integer", "index": 199, "name": "mobile_conversion_searches_sale_amount", "comment": null}, "mobile_conversion_shares_assisted": {"type": "integer", "index": 200, "name": "mobile_conversion_shares_assisted", "comment": null}, "mobile_conversion_shares_order_quantity": {"type": "integer", "index": 201, "name": "mobile_conversion_shares_order_quantity", "comment": null}, "mobile_conversion_shares_post_engagement": {"type": "integer", "index": 202, "name": "mobile_conversion_shares_post_engagement", "comment": null}, "mobile_conversion_shares_post_view": {"type": "integer", "index": 203, "name": "mobile_conversion_shares_post_view", "comment": null}, "mobile_conversion_shares_sale_amount": {"type": "integer", "index": 204, "name": "mobile_conversion_shares_sale_amount", "comment": null}, "mobile_conversion_sign_ups_assisted": {"type": "integer", "index": 205, "name": "mobile_conversion_sign_ups_assisted", "comment": null}, "mobile_conversion_sign_ups_order_quantity": {"type": "integer", "index": 206, "name": "mobile_conversion_sign_ups_order_quantity", "comment": null}, "mobile_conversion_sign_ups_post_engagement": {"type": "integer", "index": 207, "name": "mobile_conversion_sign_ups_post_engagement", "comment": null}, "mobile_conversion_sign_ups_post_view": {"type": "integer", "index": 208, "name": "mobile_conversion_sign_ups_post_view", "comment": null}, "mobile_conversion_sign_ups_sale_amount": {"type": "integer", "index": 209, "name": "mobile_conversion_sign_ups_sale_amount", "comment": null}, "mobile_conversion_site_visits_order_quantity": {"type": "integer", "index": 210, "name": "mobile_conversion_site_visits_order_quantity", "comment": null}, "mobile_conversion_site_visits_post_engagement": {"type": "integer", "index": 211, "name": "mobile_conversion_site_visits_post_engagement", "comment": null}, "mobile_conversion_site_visits_post_view": {"type": "integer", "index": 212, "name": "mobile_conversion_site_visits_post_view", "comment": null}, "mobile_conversion_site_visits_sale_amount": {"type": "integer", "index": 213, "name": "mobile_conversion_site_visits_sale_amount", "comment": null}, "mobile_conversion_spent_credits_assisted": {"type": "integer", "index": 214, "name": "mobile_conversion_spent_credits_assisted", "comment": null}, "mobile_conversion_spent_credits_order_quantity": {"type": "integer", "index": 215, "name": "mobile_conversion_spent_credits_order_quantity", "comment": null}, "mobile_conversion_spent_credits_post_engagement": {"type": "integer", "index": 216, "name": "mobile_conversion_spent_credits_post_engagement", "comment": null}, "mobile_conversion_spent_credits_post_view": {"type": "integer", "index": 217, "name": "mobile_conversion_spent_credits_post_view", "comment": null}, "mobile_conversion_spent_credits_sale_amount": {"type": "integer", "index": 218, "name": "mobile_conversion_spent_credits_sale_amount", "comment": null}, "mobile_conversion_tutorials_completed_assisted": {"type": "integer", "index": 219, "name": "mobile_conversion_tutorials_completed_assisted", "comment": null}, "mobile_conversion_tutorials_completed_order_quantity": {"type": "integer", "index": 220, "name": "mobile_conversion_tutorials_completed_order_quantity", "comment": null}, "mobile_conversion_tutorials_completed_post_engagement": {"type": "integer", "index": 221, "name": "mobile_conversion_tutorials_completed_post_engagement", "comment": null}, "mobile_conversion_tutorials_completed_post_view": {"type": "integer", "index": 222, "name": "mobile_conversion_tutorials_completed_post_view", "comment": null}, "mobile_conversion_tutorials_completed_sale_amount": {"type": "integer", "index": 223, "name": "mobile_conversion_tutorials_completed_sale_amount", "comment": null}, "mobile_conversion_updates_assisted": {"type": "integer", "index": 224, "name": "mobile_conversion_updates_assisted", "comment": null}, "mobile_conversion_updates_order_quantity": {"type": "integer", "index": 225, "name": "mobile_conversion_updates_order_quantity", "comment": null}, "mobile_conversion_updates_post_engagement": {"type": "integer", "index": 226, "name": "mobile_conversion_updates_post_engagement", "comment": null}, "mobile_conversion_updates_post_view": {"type": "integer", "index": 227, "name": "mobile_conversion_updates_post_view", "comment": null}, "mobile_conversion_updates_sale_amount": {"type": "integer", "index": 228, "name": "mobile_conversion_updates_sale_amount", "comment": null}, "poll_card_vote": {"type": "integer", "index": 229, "name": "poll_card_vote", "comment": null}, "qualified_impressions": {"type": "integer", "index": 230, "name": "qualified_impressions", "comment": null}, "replies": {"type": "integer", "index": 231, "name": "replies", "comment": null}, "retweets": {"type": "integer", "index": 232, "name": "retweets", "comment": null}, "tweets_send": {"type": "integer", "index": 233, "name": "tweets_send", "comment": null}, "unfollows": {"type": "integer", "index": 234, "name": "unfollows", "comment": null}, "url_clicks": {"type": "integer", "index": 235, "name": "url_clicks", "comment": null}, "video_3_s_100_pct_views": {"type": "integer", "index": 236, "name": "video_3_s_100_pct_views", "comment": null}, "video_6_s_views": {"type": "integer", "index": 237, "name": "video_6_s_views", "comment": null}, "video_content_starts": {"type": "integer", "index": 238, "name": "video_content_starts", "comment": null}, "video_cta_clicks": {"type": "integer", "index": 239, "name": "video_cta_clicks", "comment": null}, "video_mrc_views": {"type": "integer", "index": 240, "name": "video_mrc_views", "comment": null}, "video_total_views": {"type": "integer", "index": 241, "name": "video_total_views", "comment": null}, "video_views_100": {"type": "integer", "index": 242, "name": "video_views_100", "comment": null}, "video_views_25": {"type": "integer", "index": 243, "name": "video_views_25", "comment": null}, "video_views_50": {"type": "integer", "index": 244, "name": "video_views_50", "comment": null}, "video_views_75": {"type": "integer", "index": 245, "name": "video_views_75", "comment": null}, "mobile_conversion_installs_skan_post_engagement": {"type": "integer", "index": 246, "name": "mobile_conversion_installs_skan_post_engagement", "comment": null}, "mobile_conversion_installs_skan_post_view": {"type": "integer", "index": 247, "name": "mobile_conversion_installs_skan_post_view", "comment": null}, "mobile_conversion_purchases_skan_post_engagement": {"type": "integer", "index": 248, "name": "mobile_conversion_purchases_skan_post_engagement", "comment": null}, "mobile_conversion_purchases_skan_post_view": {"type": "integer", "index": 249, "name": "mobile_conversion_purchases_skan_post_view", "comment": null}, "video_15_s_views": {"type": "integer", "index": 250, "name": "video_15_s_views", "comment": null}, "auto_created_conversion_landing_page_view": {"type": "integer", "index": 251, "name": "auto_created_conversion_landing_page_view", "comment": null}, "auto_created_conversion_session": {"type": "integer", "index": 252, "name": "auto_created_conversion_session", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.twitter_campaign_report_data"}, "seed.ad_reporting_integration_tests.twitter_line_item_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_line_item_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"advertiser_domain": {"type": "text", "index": 1, "name": "advertiser_domain", "comment": null}, "advertiser_user_id": {"type": "integer", "index": 2, "name": "advertiser_user_id", "comment": null}, "automatically_select_bid": {"type": "boolean", "index": 3, "name": "automatically_select_bid", "comment": null}, "bid_amount_local_micro": {"type": "integer", "index": 4, "name": "bid_amount_local_micro", "comment": null}, "bid_type": {"type": "text", "index": 5, "name": "bid_type", "comment": null}, "bid_unit": {"type": "text", "index": 6, "name": "bid_unit", "comment": null}, "campaign_id": {"type": "text", "index": 7, "name": "campaign_id", "comment": null}, "charge_by": {"type": "text", "index": 8, "name": "charge_by", "comment": null}, "created_at": {"type": "text", "index": 9, "name": "created_at", "comment": null}, "creative_source": {"type": "text", "index": 10, "name": "creative_source", "comment": null}, "currency": {"type": "text", "index": 11, "name": "currency", "comment": null}, "deleted": {"type": "boolean", "index": 12, "name": "deleted", "comment": null}, "end_time": {"type": "integer", "index": 13, "name": "end_time", "comment": null}, "entity_status": {"type": "text", "index": 14, "name": "entity_status", "comment": null}, "id": {"type": "text", "index": 15, "name": "id", "comment": null}, "name": {"type": "text", "index": 16, "name": "name", "comment": null}, "objective": {"type": "text", "index": 17, "name": "objective", "comment": null}, "optimization": {"type": "text", "index": 18, "name": "optimization", "comment": null}, "primary_web_event_tag": {"type": "integer", "index": 19, "name": "primary_web_event_tag", "comment": null}, "product_type": {"type": "text", "index": 20, "name": "product_type", "comment": null}, "start_time": {"type": "integer", "index": 21, "name": "start_time", "comment": null}, "target_cpa_local_micro": {"type": "integer", "index": 22, "name": "target_cpa_local_micro", "comment": null}, "total_budget_amount_local_micro": {"type": "integer", "index": 23, "name": "total_budget_amount_local_micro", "comment": null}, "updated_at": {"type": "text", "index": 24, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.twitter_line_item_history_data"}, "seed.ad_reporting_integration_tests.twitter_line_item_keywords_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_line_item_keywords_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "text", "index": 1, "name": "account_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "line_item_id": {"type": "text", "index": 3, "name": "line_item_id", "comment": null}, "placement": {"type": "text", "index": 4, "name": "placement", "comment": null}, "segment": {"type": "text", "index": 5, "name": "segment", "comment": null}, "_fivetran_synced": {"type": "text", "index": 6, "name": "_fivetran_synced", "comment": null}, "app_clicks": {"type": "integer", "index": 7, "name": "app_clicks", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 8, "name": "billed_charge_local_micro", "comment": null}, "billed_engagements": {"type": "integer", "index": 9, "name": "billed_engagements", "comment": null}, "card_engagements": {"type": "integer", "index": 10, "name": "card_engagements", "comment": null}, "carousel_swipes": {"type": "integer", "index": 11, "name": "carousel_swipes", "comment": null}, "clicks": {"type": "integer", "index": 12, "name": "clicks", "comment": null}, "conversion_custom_metric": {"type": "integer", "index": 13, "name": "conversion_custom_metric", "comment": null}, "conversion_custom_order_quantity": {"type": "integer", "index": 14, "name": "conversion_custom_order_quantity", "comment": null}, "conversion_custom_order_quantity_engagement": {"type": "integer", "index": 15, "name": "conversion_custom_order_quantity_engagement", "comment": null}, "conversion_custom_order_quantity_view": {"type": "integer", "index": 16, "name": "conversion_custom_order_quantity_view", "comment": null}, "conversion_custom_post_engagement": {"type": "integer", "index": 17, "name": "conversion_custom_post_engagement", "comment": null}, "conversion_custom_post_view": {"type": "integer", "index": 18, "name": "conversion_custom_post_view", "comment": null}, "conversion_custom_sale_amount": {"type": "integer", "index": 19, "name": "conversion_custom_sale_amount", "comment": null}, "conversion_custom_sale_amount_engagement": {"type": "integer", "index": 20, "name": "conversion_custom_sale_amount_engagement", "comment": null}, "conversion_custom_sale_amount_view": {"type": "integer", "index": 21, "name": "conversion_custom_sale_amount_view", "comment": null}, "conversion_downloads_metric": {"type": "integer", "index": 22, "name": "conversion_downloads_metric", "comment": null}, "conversion_downloads_order_quantity": {"type": "integer", "index": 23, "name": "conversion_downloads_order_quantity", "comment": null}, "conversion_downloads_order_quantity_engagement": {"type": "integer", "index": 24, "name": "conversion_downloads_order_quantity_engagement", "comment": null}, "conversion_downloads_order_quantity_view": {"type": "integer", "index": 25, "name": "conversion_downloads_order_quantity_view", "comment": null}, "conversion_downloads_post_engagement": {"type": "integer", "index": 26, "name": "conversion_downloads_post_engagement", "comment": null}, "conversion_downloads_post_view": {"type": "integer", "index": 27, "name": "conversion_downloads_post_view", "comment": null}, "conversion_downloads_sale_amount": {"type": "integer", "index": 28, "name": "conversion_downloads_sale_amount", "comment": null}, "conversion_downloads_sale_amount_engagement": {"type": "integer", "index": 29, "name": "conversion_downloads_sale_amount_engagement", "comment": null}, "conversion_downloads_sale_amount_view": {"type": "integer", "index": 30, "name": "conversion_downloads_sale_amount_view", "comment": null}, "conversion_purchases_assisted": {"type": "integer", "index": 31, "name": "conversion_purchases_assisted", "comment": null}, "conversion_purchases_metric": {"type": "integer", "index": 32, "name": "conversion_purchases_metric", "comment": null}, "conversion_purchases_order_quantity": {"type": "integer", "index": 33, "name": "conversion_purchases_order_quantity", "comment": null}, "conversion_purchases_order_quantity_engagement": {"type": "integer", "index": 34, "name": "conversion_purchases_order_quantity_engagement", "comment": null}, "conversion_purchases_order_quantity_view": {"type": "integer", "index": 35, "name": "conversion_purchases_order_quantity_view", "comment": null}, "conversion_purchases_post_engagement": {"type": "integer", "index": 36, "name": "conversion_purchases_post_engagement", "comment": null}, "conversion_purchases_post_view": {"type": "integer", "index": 37, "name": "conversion_purchases_post_view", "comment": null}, "conversion_purchases_sale_amount": {"type": "integer", "index": 38, "name": "conversion_purchases_sale_amount", "comment": null}, "conversion_purchases_sale_amount_engagement": {"type": "integer", "index": 39, "name": "conversion_purchases_sale_amount_engagement", "comment": null}, "conversion_purchases_sale_amount_view": {"type": "integer", "index": 40, "name": "conversion_purchases_sale_amount_view", "comment": null}, "conversion_sign_ups_assisted": {"type": "integer", "index": 41, "name": "conversion_sign_ups_assisted", "comment": null}, "conversion_sign_ups_metric": {"type": "integer", "index": 42, "name": "conversion_sign_ups_metric", "comment": null}, "conversion_sign_ups_order_quantity": {"type": "integer", "index": 43, "name": "conversion_sign_ups_order_quantity", "comment": null}, "conversion_sign_ups_order_quantity_engagement": {"type": "integer", "index": 44, "name": "conversion_sign_ups_order_quantity_engagement", "comment": null}, "conversion_sign_ups_order_quantity_view": {"type": "integer", "index": 45, "name": "conversion_sign_ups_order_quantity_view", "comment": null}, "conversion_sign_ups_post_engagement": {"type": "integer", "index": 46, "name": "conversion_sign_ups_post_engagement", "comment": null}, "conversion_sign_ups_post_view": {"type": "integer", "index": 47, "name": "conversion_sign_ups_post_view", "comment": null}, "conversion_sign_ups_sale_amount": {"type": "integer", "index": 48, "name": "conversion_sign_ups_sale_amount", "comment": null}, "conversion_sign_ups_sale_amount_engagement": {"type": "integer", "index": 49, "name": "conversion_sign_ups_sale_amount_engagement", "comment": null}, "conversion_sign_ups_sale_amount_view": {"type": "integer", "index": 50, "name": "conversion_sign_ups_sale_amount_view", "comment": null}, "conversion_site_visits_metric": {"type": "integer", "index": 51, "name": "conversion_site_visits_metric", "comment": null}, "conversion_site_visits_order_quantity": {"type": "integer", "index": 52, "name": "conversion_site_visits_order_quantity", "comment": null}, "conversion_site_visits_order_quantity_engagement": {"type": "integer", "index": 53, "name": "conversion_site_visits_order_quantity_engagement", "comment": null}, "conversion_site_visits_order_quantity_view": {"type": "integer", "index": 54, "name": "conversion_site_visits_order_quantity_view", "comment": null}, "conversion_site_visits_post_engagement": {"type": "integer", "index": 55, "name": "conversion_site_visits_post_engagement", "comment": null}, "conversion_site_visits_post_view": {"type": "integer", "index": 56, "name": "conversion_site_visits_post_view", "comment": null}, "conversion_site_visits_sale_amount": {"type": "integer", "index": 57, "name": "conversion_site_visits_sale_amount", "comment": null}, "conversion_site_visits_sale_amount_engagement": {"type": "integer", "index": 58, "name": "conversion_site_visits_sale_amount_engagement", "comment": null}, "conversion_site_visits_sale_amount_view": {"type": "integer", "index": 59, "name": "conversion_site_visits_sale_amount_view", "comment": null}, "engagements": {"type": "integer", "index": 60, "name": "engagements", "comment": null}, "follows": {"type": "integer", "index": 61, "name": "follows", "comment": null}, "impressions": {"type": "integer", "index": 62, "name": "impressions", "comment": null}, "likes": {"type": "integer", "index": 63, "name": "likes", "comment": null}, "media_engagements": {"type": "integer", "index": 64, "name": "media_engagements", "comment": null}, "media_views": {"type": "integer", "index": 65, "name": "media_views", "comment": null}, "mobile_conversion_achievements_unlocked_assisted": {"type": "integer", "index": 66, "name": "mobile_conversion_achievements_unlocked_assisted", "comment": null}, "mobile_conversion_achievements_unlocked_order_quantity": {"type": "integer", "index": 67, "name": "mobile_conversion_achievements_unlocked_order_quantity", "comment": null}, "mobile_conversion_achievements_unlocked_post_engagement": {"type": "integer", "index": 68, "name": "mobile_conversion_achievements_unlocked_post_engagement", "comment": null}, "mobile_conversion_achievements_unlocked_post_view": {"type": "integer", "index": 69, "name": "mobile_conversion_achievements_unlocked_post_view", "comment": null}, "mobile_conversion_achievements_unlocked_sale_amount": {"type": "integer", "index": 70, "name": "mobile_conversion_achievements_unlocked_sale_amount", "comment": null}, "mobile_conversion_add_to_carts_assisted": {"type": "integer", "index": 71, "name": "mobile_conversion_add_to_carts_assisted", "comment": null}, "mobile_conversion_add_to_carts_order_quantity": {"type": "integer", "index": 72, "name": "mobile_conversion_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_add_to_carts_post_engagement": {"type": "integer", "index": 73, "name": "mobile_conversion_add_to_carts_post_engagement", "comment": null}, "mobile_conversion_add_to_carts_post_view": {"type": "integer", "index": 74, "name": "mobile_conversion_add_to_carts_post_view", "comment": null}, "mobile_conversion_add_to_carts_sale_amount": {"type": "integer", "index": 75, "name": "mobile_conversion_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_add_to_wishlists_assisted": {"type": "integer", "index": 76, "name": "mobile_conversion_add_to_wishlists_assisted", "comment": null}, "mobile_conversion_add_to_wishlists_order_quantity": {"type": "integer", "index": 77, "name": "mobile_conversion_add_to_wishlists_order_quantity", "comment": null}, "mobile_conversion_add_to_wishlists_post_engagement": {"type": "integer", "index": 78, "name": "mobile_conversion_add_to_wishlists_post_engagement", "comment": null}, "mobile_conversion_add_to_wishlists_post_view": {"type": "integer", "index": 79, "name": "mobile_conversion_add_to_wishlists_post_view", "comment": null}, "mobile_conversion_add_to_wishlists_sale_amount": {"type": "integer", "index": 80, "name": "mobile_conversion_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_checkouts_initiated_assisted": {"type": "integer", "index": 81, "name": "mobile_conversion_checkouts_initiated_assisted", "comment": null}, "mobile_conversion_checkouts_initiated_order_quantity": {"type": "integer", "index": 82, "name": "mobile_conversion_checkouts_initiated_order_quantity", "comment": null}, "mobile_conversion_checkouts_initiated_post_engagement": {"type": "integer", "index": 83, "name": "mobile_conversion_checkouts_initiated_post_engagement", "comment": null}, "mobile_conversion_checkouts_initiated_post_view": {"type": "integer", "index": 84, "name": "mobile_conversion_checkouts_initiated_post_view", "comment": null}, "mobile_conversion_checkouts_initiated_sale_amount": {"type": "integer", "index": 85, "name": "mobile_conversion_checkouts_initiated_sale_amount", "comment": null}, "mobile_conversion_content_views_assisted": {"type": "integer", "index": 86, "name": "mobile_conversion_content_views_assisted", "comment": null}, "mobile_conversion_content_views_order_quantity": {"type": "integer", "index": 87, "name": "mobile_conversion_content_views_order_quantity", "comment": null}, "mobile_conversion_content_views_post_engagement": {"type": "integer", "index": 88, "name": "mobile_conversion_content_views_post_engagement", "comment": null}, "mobile_conversion_content_views_post_view": {"type": "integer", "index": 89, "name": "mobile_conversion_content_views_post_view", "comment": null}, "mobile_conversion_content_views_sale_amount": {"type": "integer", "index": 90, "name": "mobile_conversion_content_views_sale_amount", "comment": null}, "mobile_conversion_downloads_order_quantity": {"type": "integer", "index": 91, "name": "mobile_conversion_downloads_order_quantity", "comment": null}, "mobile_conversion_downloads_post_engagement": {"type": "integer", "index": 92, "name": "mobile_conversion_downloads_post_engagement", "comment": null}, "mobile_conversion_downloads_post_view": {"type": "integer", "index": 93, "name": "mobile_conversion_downloads_post_view", "comment": null}, "mobile_conversion_downloads_sale_amount": {"type": "integer", "index": 94, "name": "mobile_conversion_downloads_sale_amount", "comment": null}, "mobile_conversion_installs_assisted": {"type": "integer", "index": 95, "name": "mobile_conversion_installs_assisted", "comment": null}, "mobile_conversion_installs_order_quantity": {"type": "integer", "index": 96, "name": "mobile_conversion_installs_order_quantity", "comment": null}, "mobile_conversion_installs_post_engagement": {"type": "integer", "index": 97, "name": "mobile_conversion_installs_post_engagement", "comment": null}, "mobile_conversion_installs_post_view": {"type": "integer", "index": 98, "name": "mobile_conversion_installs_post_view", "comment": null}, "mobile_conversion_installs_sale_amount": {"type": "integer", "index": 99, "name": "mobile_conversion_installs_sale_amount", "comment": null}, "mobile_conversion_installs_skan_post_engagement": {"type": "integer", "index": 100, "name": "mobile_conversion_installs_skan_post_engagement", "comment": null}, "mobile_conversion_installs_skan_post_view": {"type": "integer", "index": 101, "name": "mobile_conversion_installs_skan_post_view", "comment": null}, "mobile_conversion_invites_assisted": {"type": "integer", "index": 102, "name": "mobile_conversion_invites_assisted", "comment": null}, "mobile_conversion_invites_order_quantity": {"type": "integer", "index": 103, "name": "mobile_conversion_invites_order_quantity", "comment": null}, "mobile_conversion_invites_post_engagement": {"type": "integer", "index": 104, "name": "mobile_conversion_invites_post_engagement", "comment": null}, "mobile_conversion_invites_post_view": {"type": "integer", "index": 105, "name": "mobile_conversion_invites_post_view", "comment": null}, "mobile_conversion_invites_sale_amount": {"type": "integer", "index": 106, "name": "mobile_conversion_invites_sale_amount", "comment": null}, "mobile_conversion_key_page_views_post_engagement": {"type": "integer", "index": 107, "name": "mobile_conversion_key_page_views_post_engagement", "comment": null}, "mobile_conversion_key_page_views_post_view": {"type": "integer", "index": 108, "name": "mobile_conversion_key_page_views_post_view", "comment": null}, "mobile_conversion_levels_achieved_assisted": {"type": "integer", "index": 109, "name": "mobile_conversion_levels_achieved_assisted", "comment": null}, "mobile_conversion_levels_achieved_order_quantity": {"type": "integer", "index": 110, "name": "mobile_conversion_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_levels_achieved_post_engagement": {"type": "integer", "index": 111, "name": "mobile_conversion_levels_achieved_post_engagement", "comment": null}, "mobile_conversion_levels_achieved_post_view": {"type": "integer", "index": 112, "name": "mobile_conversion_levels_achieved_post_view", "comment": null}, "mobile_conversion_levels_achieved_sale_amount": {"type": "integer", "index": 113, "name": "mobile_conversion_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_metric": {"type": "integer", "index": 114, "name": "mobile_conversion_lifetime_value_achievements_unlocked_metric", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_order_qu": {"type": "integer", "index": 115, "name": "mobile_conversion_lifetime_value_achievements_unlocked_order_qu", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo": {"type": "integer", "index": 116, "name": "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_metric": {"type": "integer", "index": 117, "name": "mobile_conversion_lifetime_value_add_to_carts_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_order_quantity": {"type": "integer", "index": 118, "name": "mobile_conversion_lifetime_value_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_sale_amount": {"type": "integer", "index": 119, "name": "mobile_conversion_lifetime_value_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_metric": {"type": "integer", "index": 120, "name": "mobile_conversion_lifetime_value_add_to_wishlists_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit": {"type": "integer", "index": 121, "name": "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount": {"type": "integer", "index": 122, "name": "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_metric": {"type": "integer", "index": 123, "name": "mobile_conversion_lifetime_value_checkouts_initiated_metric", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_order_quan": {"type": "integer", "index": 124, "name": "mobile_conversion_lifetime_value_checkouts_initiated_order_quan", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun": {"type": "integer", "index": 125, "name": "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_content_views_metric": {"type": "integer", "index": 126, "name": "mobile_conversion_lifetime_value_content_views_metric", "comment": null}, "mobile_conversion_lifetime_value_content_views_order_quantity": {"type": "integer", "index": 127, "name": "mobile_conversion_lifetime_value_content_views_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_content_views_sale_amount": {"type": "integer", "index": 128, "name": "mobile_conversion_lifetime_value_content_views_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_invites_metric": {"type": "integer", "index": 129, "name": "mobile_conversion_lifetime_value_invites_metric", "comment": null}, "mobile_conversion_lifetime_value_invites_order_quantity": {"type": "integer", "index": 130, "name": "mobile_conversion_lifetime_value_invites_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_invites_sale_amount": {"type": "integer", "index": 131, "name": "mobile_conversion_lifetime_value_invites_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_metric": {"type": "integer", "index": 132, "name": "mobile_conversion_lifetime_value_levels_achieved_metric", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_order_quantity": {"type": "integer", "index": 133, "name": "mobile_conversion_lifetime_value_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_sale_amount": {"type": "integer", "index": 134, "name": "mobile_conversion_lifetime_value_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_logins_metric": {"type": "integer", "index": 135, "name": "mobile_conversion_lifetime_value_logins_metric", "comment": null}, "mobile_conversion_lifetime_value_logins_order_quantity": {"type": "integer", "index": 136, "name": "mobile_conversion_lifetime_value_logins_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_logins_sale_amount": {"type": "integer", "index": 137, "name": "mobile_conversion_lifetime_value_logins_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_metric": {"type": "integer", "index": 138, "name": "mobile_conversion_lifetime_value_payment_info_additions_metric", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_order_q": {"type": "integer", "index": 139, "name": "mobile_conversion_lifetime_value_payment_info_additions_order_q", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_sale_am": {"type": "integer", "index": 140, "name": "mobile_conversion_lifetime_value_payment_info_additions_sale_am", "comment": null}, "mobile_conversion_lifetime_value_purchases_metric": {"type": "integer", "index": 141, "name": "mobile_conversion_lifetime_value_purchases_metric", "comment": null}, "mobile_conversion_lifetime_value_purchases_order_quantity": {"type": "integer", "index": 142, "name": "mobile_conversion_lifetime_value_purchases_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_purchases_sale_amount": {"type": "integer", "index": 143, "name": "mobile_conversion_lifetime_value_purchases_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_rates_metric": {"type": "integer", "index": 144, "name": "mobile_conversion_lifetime_value_rates_metric", "comment": null}, "mobile_conversion_lifetime_value_rates_order_quantity": {"type": "integer", "index": 145, "name": "mobile_conversion_lifetime_value_rates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_rates_sale_amount": {"type": "integer", "index": 146, "name": "mobile_conversion_lifetime_value_rates_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_reservations_metric": {"type": "integer", "index": 147, "name": "mobile_conversion_lifetime_value_reservations_metric", "comment": null}, "mobile_conversion_lifetime_value_reservations_order_quantity": {"type": "integer", "index": 148, "name": "mobile_conversion_lifetime_value_reservations_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_reservations_sale_amount": {"type": "integer", "index": 149, "name": "mobile_conversion_lifetime_value_reservations_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_searches_metric": {"type": "integer", "index": 150, "name": "mobile_conversion_lifetime_value_searches_metric", "comment": null}, "mobile_conversion_lifetime_value_searches_order_quantity": {"type": "integer", "index": 151, "name": "mobile_conversion_lifetime_value_searches_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_searches_sale_amount": {"type": "integer", "index": 152, "name": "mobile_conversion_lifetime_value_searches_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_shares_metric": {"type": "integer", "index": 153, "name": "mobile_conversion_lifetime_value_shares_metric", "comment": null}, "mobile_conversion_lifetime_value_shares_order_quantity": {"type": "integer", "index": 154, "name": "mobile_conversion_lifetime_value_shares_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_shares_sale_amount": {"type": "integer", "index": 155, "name": "mobile_conversion_lifetime_value_shares_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_metric": {"type": "integer", "index": 156, "name": "mobile_conversion_lifetime_value_sign_ups_metric", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_order_quantity": {"type": "integer", "index": 157, "name": "mobile_conversion_lifetime_value_sign_ups_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_sale_amount": {"type": "integer", "index": 158, "name": "mobile_conversion_lifetime_value_sign_ups_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_metric": {"type": "integer", "index": 159, "name": "mobile_conversion_lifetime_value_spent_credits_metric", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_order_quantity": {"type": "integer", "index": 160, "name": "mobile_conversion_lifetime_value_spent_credits_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_sale_amount": {"type": "integer", "index": 161, "name": "mobile_conversion_lifetime_value_spent_credits_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_metric": {"type": "integer", "index": 162, "name": "mobile_conversion_lifetime_value_tutorials_completed_metric", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_order_quan": {"type": "integer", "index": 163, "name": "mobile_conversion_lifetime_value_tutorials_completed_order_quan", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun": {"type": "integer", "index": 164, "name": "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_updates_metric": {"type": "integer", "index": 165, "name": "mobile_conversion_lifetime_value_updates_metric", "comment": null}, "mobile_conversion_lifetime_value_updates_order_quantity": {"type": "integer", "index": 166, "name": "mobile_conversion_lifetime_value_updates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_updates_sale_amount": {"type": "integer", "index": 167, "name": "mobile_conversion_lifetime_value_updates_sale_amount", "comment": null}, "mobile_conversion_logins_assisted": {"type": "integer", "index": 168, "name": "mobile_conversion_logins_assisted", "comment": null}, "mobile_conversion_logins_order_quantity": {"type": "integer", "index": 169, "name": "mobile_conversion_logins_order_quantity", "comment": null}, "mobile_conversion_logins_post_engagement": {"type": "integer", "index": 170, "name": "mobile_conversion_logins_post_engagement", "comment": null}, "mobile_conversion_logins_post_view": {"type": "integer", "index": 171, "name": "mobile_conversion_logins_post_view", "comment": null}, "mobile_conversion_logins_sale_amount": {"type": "integer", "index": 172, "name": "mobile_conversion_logins_sale_amount", "comment": null}, "mobile_conversion_payment_info_additions_assisted": {"type": "integer", "index": 173, "name": "mobile_conversion_payment_info_additions_assisted", "comment": null}, "mobile_conversion_payment_info_additions_order_quantity": {"type": "integer", "index": 174, "name": "mobile_conversion_payment_info_additions_order_quantity", "comment": null}, "mobile_conversion_payment_info_additions_post_engagement": {"type": "integer", "index": 175, "name": "mobile_conversion_payment_info_additions_post_engagement", "comment": null}, "mobile_conversion_payment_info_additions_post_view": {"type": "integer", "index": 176, "name": "mobile_conversion_payment_info_additions_post_view", "comment": null}, "mobile_conversion_payment_info_additions_sale_amount": {"type": "integer", "index": 177, "name": "mobile_conversion_payment_info_additions_sale_amount", "comment": null}, "mobile_conversion_purchases_assisted": {"type": "integer", "index": 178, "name": "mobile_conversion_purchases_assisted", "comment": null}, "mobile_conversion_purchases_order_quantity": {"type": "integer", "index": 179, "name": "mobile_conversion_purchases_order_quantity", "comment": null}, "mobile_conversion_purchases_post_engagement": {"type": "integer", "index": 180, "name": "mobile_conversion_purchases_post_engagement", "comment": null}, "mobile_conversion_purchases_post_view": {"type": "integer", "index": 181, "name": "mobile_conversion_purchases_post_view", "comment": null}, "mobile_conversion_purchases_sale_amount": {"type": "integer", "index": 182, "name": "mobile_conversion_purchases_sale_amount", "comment": null}, "mobile_conversion_purchases_skan_post_engagement": {"type": "integer", "index": 183, "name": "mobile_conversion_purchases_skan_post_engagement", "comment": null}, "mobile_conversion_purchases_skan_post_view": {"type": "integer", "index": 184, "name": "mobile_conversion_purchases_skan_post_view", "comment": null}, "mobile_conversion_rates_assisted": {"type": "integer", "index": 185, "name": "mobile_conversion_rates_assisted", "comment": null}, "mobile_conversion_rates_order_quantity": {"type": "integer", "index": 186, "name": "mobile_conversion_rates_order_quantity", "comment": null}, "mobile_conversion_rates_post_engagement": {"type": "integer", "index": 187, "name": "mobile_conversion_rates_post_engagement", "comment": null}, "mobile_conversion_rates_post_view": {"type": "integer", "index": 188, "name": "mobile_conversion_rates_post_view", "comment": null}, "mobile_conversion_rates_sale_amount": {"type": "integer", "index": 189, "name": "mobile_conversion_rates_sale_amount", "comment": null}, "mobile_conversion_re_engages_assisted": {"type": "integer", "index": 190, "name": "mobile_conversion_re_engages_assisted", "comment": null}, "mobile_conversion_re_engages_order_quantity": {"type": "integer", "index": 191, "name": "mobile_conversion_re_engages_order_quantity", "comment": null}, "mobile_conversion_re_engages_post_engagement": {"type": "integer", "index": 192, "name": "mobile_conversion_re_engages_post_engagement", "comment": null}, "mobile_conversion_re_engages_post_view": {"type": "integer", "index": 193, "name": "mobile_conversion_re_engages_post_view", "comment": null}, "mobile_conversion_re_engages_sale_amount": {"type": "integer", "index": 194, "name": "mobile_conversion_re_engages_sale_amount", "comment": null}, "mobile_conversion_reservations_assisted": {"type": "integer", "index": 195, "name": "mobile_conversion_reservations_assisted", "comment": null}, "mobile_conversion_reservations_order_quantity": {"type": "integer", "index": 196, "name": "mobile_conversion_reservations_order_quantity", "comment": null}, "mobile_conversion_reservations_post_engagement": {"type": "integer", "index": 197, "name": "mobile_conversion_reservations_post_engagement", "comment": null}, "mobile_conversion_reservations_post_view": {"type": "integer", "index": 198, "name": "mobile_conversion_reservations_post_view", "comment": null}, "mobile_conversion_reservations_sale_amount": {"type": "integer", "index": 199, "name": "mobile_conversion_reservations_sale_amount", "comment": null}, "mobile_conversion_searches_assisted": {"type": "integer", "index": 200, "name": "mobile_conversion_searches_assisted", "comment": null}, "mobile_conversion_searches_order_quantity": {"type": "integer", "index": 201, "name": "mobile_conversion_searches_order_quantity", "comment": null}, "mobile_conversion_searches_post_engagement": {"type": "integer", "index": 202, "name": "mobile_conversion_searches_post_engagement", "comment": null}, "mobile_conversion_searches_post_view": {"type": "integer", "index": 203, "name": "mobile_conversion_searches_post_view", "comment": null}, "mobile_conversion_searches_sale_amount": {"type": "integer", "index": 204, "name": "mobile_conversion_searches_sale_amount", "comment": null}, "mobile_conversion_shares_assisted": {"type": "integer", "index": 205, "name": "mobile_conversion_shares_assisted", "comment": null}, "mobile_conversion_shares_order_quantity": {"type": "integer", "index": 206, "name": "mobile_conversion_shares_order_quantity", "comment": null}, "mobile_conversion_shares_post_engagement": {"type": "integer", "index": 207, "name": "mobile_conversion_shares_post_engagement", "comment": null}, "mobile_conversion_shares_post_view": {"type": "integer", "index": 208, "name": "mobile_conversion_shares_post_view", "comment": null}, "mobile_conversion_shares_sale_amount": {"type": "integer", "index": 209, "name": "mobile_conversion_shares_sale_amount", "comment": null}, "mobile_conversion_sign_ups_assisted": {"type": "integer", "index": 210, "name": "mobile_conversion_sign_ups_assisted", "comment": null}, "mobile_conversion_sign_ups_order_quantity": {"type": "integer", "index": 211, "name": "mobile_conversion_sign_ups_order_quantity", "comment": null}, "mobile_conversion_sign_ups_post_engagement": {"type": "integer", "index": 212, "name": "mobile_conversion_sign_ups_post_engagement", "comment": null}, "mobile_conversion_sign_ups_post_view": {"type": "integer", "index": 213, "name": "mobile_conversion_sign_ups_post_view", "comment": null}, "mobile_conversion_sign_ups_sale_amount": {"type": "integer", "index": 214, "name": "mobile_conversion_sign_ups_sale_amount", "comment": null}, "mobile_conversion_site_visits_order_quantity": {"type": "integer", "index": 215, "name": "mobile_conversion_site_visits_order_quantity", "comment": null}, "mobile_conversion_site_visits_post_engagement": {"type": "integer", "index": 216, "name": "mobile_conversion_site_visits_post_engagement", "comment": null}, "mobile_conversion_site_visits_post_view": {"type": "integer", "index": 217, "name": "mobile_conversion_site_visits_post_view", "comment": null}, "mobile_conversion_site_visits_sale_amount": {"type": "integer", "index": 218, "name": "mobile_conversion_site_visits_sale_amount", "comment": null}, "mobile_conversion_spent_credits_assisted": {"type": "integer", "index": 219, "name": "mobile_conversion_spent_credits_assisted", "comment": null}, "mobile_conversion_spent_credits_order_quantity": {"type": "integer", "index": 220, "name": "mobile_conversion_spent_credits_order_quantity", "comment": null}, "mobile_conversion_spent_credits_post_engagement": {"type": "integer", "index": 221, "name": "mobile_conversion_spent_credits_post_engagement", "comment": null}, "mobile_conversion_spent_credits_post_view": {"type": "integer", "index": 222, "name": "mobile_conversion_spent_credits_post_view", "comment": null}, "mobile_conversion_spent_credits_sale_amount": {"type": "integer", "index": 223, "name": "mobile_conversion_spent_credits_sale_amount", "comment": null}, "mobile_conversion_tutorials_completed_assisted": {"type": "integer", "index": 224, "name": "mobile_conversion_tutorials_completed_assisted", "comment": null}, "mobile_conversion_tutorials_completed_order_quantity": {"type": "integer", "index": 225, "name": "mobile_conversion_tutorials_completed_order_quantity", "comment": null}, "mobile_conversion_tutorials_completed_post_engagement": {"type": "integer", "index": 226, "name": "mobile_conversion_tutorials_completed_post_engagement", "comment": null}, "mobile_conversion_tutorials_completed_post_view": {"type": "integer", "index": 227, "name": "mobile_conversion_tutorials_completed_post_view", "comment": null}, "mobile_conversion_tutorials_completed_sale_amount": {"type": "integer", "index": 228, "name": "mobile_conversion_tutorials_completed_sale_amount", "comment": null}, "mobile_conversion_updates_assisted": {"type": "integer", "index": 229, "name": "mobile_conversion_updates_assisted", "comment": null}, "mobile_conversion_updates_order_quantity": {"type": "integer", "index": 230, "name": "mobile_conversion_updates_order_quantity", "comment": null}, "mobile_conversion_updates_post_engagement": {"type": "integer", "index": 231, "name": "mobile_conversion_updates_post_engagement", "comment": null}, "mobile_conversion_updates_post_view": {"type": "integer", "index": 232, "name": "mobile_conversion_updates_post_view", "comment": null}, "mobile_conversion_updates_sale_amount": {"type": "integer", "index": 233, "name": "mobile_conversion_updates_sale_amount", "comment": null}, "poll_card_vote": {"type": "integer", "index": 234, "name": "poll_card_vote", "comment": null}, "qualified_impressions": {"type": "integer", "index": 235, "name": "qualified_impressions", "comment": null}, "replies": {"type": "integer", "index": 236, "name": "replies", "comment": null}, "retweets": {"type": "integer", "index": 237, "name": "retweets", "comment": null}, "tweets_send": {"type": "integer", "index": 238, "name": "tweets_send", "comment": null}, "unfollows": {"type": "integer", "index": 239, "name": "unfollows", "comment": null}, "url_clicks": {"type": "integer", "index": 240, "name": "url_clicks", "comment": null}, "video_15_s_views": {"type": "integer", "index": 241, "name": "video_15_s_views", "comment": null}, "video_3_s_100_pct_views": {"type": "integer", "index": 242, "name": "video_3_s_100_pct_views", "comment": null}, "video_6_s_views": {"type": "integer", "index": 243, "name": "video_6_s_views", "comment": null}, "video_content_starts": {"type": "integer", "index": 244, "name": "video_content_starts", "comment": null}, "video_cta_clicks": {"type": "integer", "index": 245, "name": "video_cta_clicks", "comment": null}, "video_total_views": {"type": "integer", "index": 246, "name": "video_total_views", "comment": null}, "video_views_100": {"type": "integer", "index": 247, "name": "video_views_100", "comment": null}, "video_views_25": {"type": "integer", "index": 248, "name": "video_views_25", "comment": null}, "video_views_50": {"type": "integer", "index": 249, "name": "video_views_50", "comment": null}, "video_views_75": {"type": "integer", "index": 250, "name": "video_views_75", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.twitter_line_item_keywords_report_data"}, "seed.ad_reporting_integration_tests.twitter_line_item_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_line_item_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "text", "index": 1, "name": "account_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "line_item_id": {"type": "text", "index": 3, "name": "line_item_id", "comment": null}, "placement": {"type": "text", "index": 4, "name": "placement", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "app_clicks": {"type": "integer", "index": 6, "name": "app_clicks", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 7, "name": "billed_charge_local_micro", "comment": null}, "billed_engagements": {"type": "integer", "index": 8, "name": "billed_engagements", "comment": null}, "card_engagements": {"type": "integer", "index": 9, "name": "card_engagements", "comment": null}, "carousel_swipes": {"type": "integer", "index": 10, "name": "carousel_swipes", "comment": null}, "clicks": {"type": "integer", "index": 11, "name": "clicks", "comment": null}, "conversion_custom_metric": {"type": "integer", "index": 12, "name": "conversion_custom_metric", "comment": null}, "conversion_custom_order_quantity": {"type": "integer", "index": 13, "name": "conversion_custom_order_quantity", "comment": null}, "conversion_custom_order_quantity_engagement": {"type": "integer", "index": 14, "name": "conversion_custom_order_quantity_engagement", "comment": null}, "conversion_custom_order_quantity_view": {"type": "integer", "index": 15, "name": "conversion_custom_order_quantity_view", "comment": null}, "conversion_custom_post_engagement": {"type": "integer", "index": 16, "name": "conversion_custom_post_engagement", "comment": null}, "conversion_custom_post_view": {"type": "integer", "index": 17, "name": "conversion_custom_post_view", "comment": null}, "conversion_custom_sale_amount": {"type": "integer", "index": 18, "name": "conversion_custom_sale_amount", "comment": null}, "conversion_custom_sale_amount_engagement": {"type": "integer", "index": 19, "name": "conversion_custom_sale_amount_engagement", "comment": null}, "conversion_custom_sale_amount_view": {"type": "integer", "index": 20, "name": "conversion_custom_sale_amount_view", "comment": null}, "conversion_downloads_metric": {"type": "integer", "index": 21, "name": "conversion_downloads_metric", "comment": null}, "conversion_downloads_order_quantity": {"type": "integer", "index": 22, "name": "conversion_downloads_order_quantity", "comment": null}, "conversion_downloads_order_quantity_engagement": {"type": "integer", "index": 23, "name": "conversion_downloads_order_quantity_engagement", "comment": null}, "conversion_downloads_order_quantity_view": {"type": "integer", "index": 24, "name": "conversion_downloads_order_quantity_view", "comment": null}, "conversion_downloads_post_engagement": {"type": "integer", "index": 25, "name": "conversion_downloads_post_engagement", "comment": null}, "conversion_downloads_post_view": {"type": "integer", "index": 26, "name": "conversion_downloads_post_view", "comment": null}, "conversion_downloads_sale_amount": {"type": "integer", "index": 27, "name": "conversion_downloads_sale_amount", "comment": null}, "conversion_downloads_sale_amount_engagement": {"type": "integer", "index": 28, "name": "conversion_downloads_sale_amount_engagement", "comment": null}, "conversion_downloads_sale_amount_view": {"type": "integer", "index": 29, "name": "conversion_downloads_sale_amount_view", "comment": null}, "conversion_purchases_assisted": {"type": "integer", "index": 30, "name": "conversion_purchases_assisted", "comment": null}, "conversion_purchases_metric": {"type": "integer", "index": 31, "name": "conversion_purchases_metric", "comment": null}, "conversion_purchases_order_quantity": {"type": "integer", "index": 32, "name": "conversion_purchases_order_quantity", "comment": null}, "conversion_purchases_order_quantity_engagement": {"type": "integer", "index": 33, "name": "conversion_purchases_order_quantity_engagement", "comment": null}, "conversion_purchases_order_quantity_view": {"type": "integer", "index": 34, "name": "conversion_purchases_order_quantity_view", "comment": null}, "conversion_purchases_post_engagement": {"type": "integer", "index": 35, "name": "conversion_purchases_post_engagement", "comment": null}, "conversion_purchases_post_view": {"type": "integer", "index": 36, "name": "conversion_purchases_post_view", "comment": null}, "conversion_purchases_sale_amount": {"type": "integer", "index": 37, "name": "conversion_purchases_sale_amount", "comment": null}, "conversion_purchases_sale_amount_engagement": {"type": "integer", "index": 38, "name": "conversion_purchases_sale_amount_engagement", "comment": null}, "conversion_purchases_sale_amount_view": {"type": "integer", "index": 39, "name": "conversion_purchases_sale_amount_view", "comment": null}, "conversion_sign_ups_assisted": {"type": "integer", "index": 40, "name": "conversion_sign_ups_assisted", "comment": null}, "conversion_sign_ups_metric": {"type": "integer", "index": 41, "name": "conversion_sign_ups_metric", "comment": null}, "conversion_sign_ups_order_quantity": {"type": "integer", "index": 42, "name": "conversion_sign_ups_order_quantity", "comment": null}, "conversion_sign_ups_order_quantity_engagement": {"type": "integer", "index": 43, "name": "conversion_sign_ups_order_quantity_engagement", "comment": null}, "conversion_sign_ups_order_quantity_view": {"type": "integer", "index": 44, "name": "conversion_sign_ups_order_quantity_view", "comment": null}, "conversion_sign_ups_post_engagement": {"type": "integer", "index": 45, "name": "conversion_sign_ups_post_engagement", "comment": null}, "conversion_sign_ups_post_view": {"type": "integer", "index": 46, "name": "conversion_sign_ups_post_view", "comment": null}, "conversion_sign_ups_sale_amount": {"type": "integer", "index": 47, "name": "conversion_sign_ups_sale_amount", "comment": null}, "conversion_sign_ups_sale_amount_engagement": {"type": "integer", "index": 48, "name": "conversion_sign_ups_sale_amount_engagement", "comment": null}, "conversion_sign_ups_sale_amount_view": {"type": "integer", "index": 49, "name": "conversion_sign_ups_sale_amount_view", "comment": null}, "conversion_site_visits_metric": {"type": "integer", "index": 50, "name": "conversion_site_visits_metric", "comment": null}, "conversion_site_visits_order_quantity": {"type": "integer", "index": 51, "name": "conversion_site_visits_order_quantity", "comment": null}, "conversion_site_visits_order_quantity_engagement": {"type": "integer", "index": 52, "name": "conversion_site_visits_order_quantity_engagement", "comment": null}, "conversion_site_visits_order_quantity_view": {"type": "integer", "index": 53, "name": "conversion_site_visits_order_quantity_view", "comment": null}, "conversion_site_visits_post_engagement": {"type": "integer", "index": 54, "name": "conversion_site_visits_post_engagement", "comment": null}, "conversion_site_visits_post_view": {"type": "integer", "index": 55, "name": "conversion_site_visits_post_view", "comment": null}, "conversion_site_visits_sale_amount": {"type": "integer", "index": 56, "name": "conversion_site_visits_sale_amount", "comment": null}, "conversion_site_visits_sale_amount_engagement": {"type": "integer", "index": 57, "name": "conversion_site_visits_sale_amount_engagement", "comment": null}, "conversion_site_visits_sale_amount_view": {"type": "integer", "index": 58, "name": "conversion_site_visits_sale_amount_view", "comment": null}, "engagements": {"type": "integer", "index": 59, "name": "engagements", "comment": null}, "follows": {"type": "integer", "index": 60, "name": "follows", "comment": null}, "impressions": {"type": "integer", "index": 61, "name": "impressions", "comment": null}, "likes": {"type": "integer", "index": 62, "name": "likes", "comment": null}, "media_engagements": {"type": "integer", "index": 63, "name": "media_engagements", "comment": null}, "media_views": {"type": "integer", "index": 64, "name": "media_views", "comment": null}, "mobile_conversion_achievements_unlocked_assisted": {"type": "integer", "index": 65, "name": "mobile_conversion_achievements_unlocked_assisted", "comment": null}, "mobile_conversion_achievements_unlocked_order_quantity": {"type": "integer", "index": 66, "name": "mobile_conversion_achievements_unlocked_order_quantity", "comment": null}, "mobile_conversion_achievements_unlocked_post_engagement": {"type": "integer", "index": 67, "name": "mobile_conversion_achievements_unlocked_post_engagement", "comment": null}, "mobile_conversion_achievements_unlocked_post_view": {"type": "integer", "index": 68, "name": "mobile_conversion_achievements_unlocked_post_view", "comment": null}, "mobile_conversion_achievements_unlocked_sale_amount": {"type": "integer", "index": 69, "name": "mobile_conversion_achievements_unlocked_sale_amount", "comment": null}, "mobile_conversion_add_to_carts_assisted": {"type": "integer", "index": 70, "name": "mobile_conversion_add_to_carts_assisted", "comment": null}, "mobile_conversion_add_to_carts_order_quantity": {"type": "integer", "index": 71, "name": "mobile_conversion_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_add_to_carts_post_engagement": {"type": "integer", "index": 72, "name": "mobile_conversion_add_to_carts_post_engagement", "comment": null}, "mobile_conversion_add_to_carts_post_view": {"type": "integer", "index": 73, "name": "mobile_conversion_add_to_carts_post_view", "comment": null}, "mobile_conversion_add_to_carts_sale_amount": {"type": "integer", "index": 74, "name": "mobile_conversion_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_add_to_wishlists_assisted": {"type": "integer", "index": 75, "name": "mobile_conversion_add_to_wishlists_assisted", "comment": null}, "mobile_conversion_add_to_wishlists_order_quantity": {"type": "integer", "index": 76, "name": "mobile_conversion_add_to_wishlists_order_quantity", "comment": null}, "mobile_conversion_add_to_wishlists_post_engagement": {"type": "integer", "index": 77, "name": "mobile_conversion_add_to_wishlists_post_engagement", "comment": null}, "mobile_conversion_add_to_wishlists_post_view": {"type": "integer", "index": 78, "name": "mobile_conversion_add_to_wishlists_post_view", "comment": null}, "mobile_conversion_add_to_wishlists_sale_amount": {"type": "integer", "index": 79, "name": "mobile_conversion_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_checkouts_initiated_assisted": {"type": "integer", "index": 80, "name": "mobile_conversion_checkouts_initiated_assisted", "comment": null}, "mobile_conversion_checkouts_initiated_order_quantity": {"type": "integer", "index": 81, "name": "mobile_conversion_checkouts_initiated_order_quantity", "comment": null}, "mobile_conversion_checkouts_initiated_post_engagement": {"type": "integer", "index": 82, "name": "mobile_conversion_checkouts_initiated_post_engagement", "comment": null}, "mobile_conversion_checkouts_initiated_post_view": {"type": "integer", "index": 83, "name": "mobile_conversion_checkouts_initiated_post_view", "comment": null}, "mobile_conversion_checkouts_initiated_sale_amount": {"type": "integer", "index": 84, "name": "mobile_conversion_checkouts_initiated_sale_amount", "comment": null}, "mobile_conversion_content_views_assisted": {"type": "integer", "index": 85, "name": "mobile_conversion_content_views_assisted", "comment": null}, "mobile_conversion_content_views_order_quantity": {"type": "integer", "index": 86, "name": "mobile_conversion_content_views_order_quantity", "comment": null}, "mobile_conversion_content_views_post_engagement": {"type": "integer", "index": 87, "name": "mobile_conversion_content_views_post_engagement", "comment": null}, "mobile_conversion_content_views_post_view": {"type": "integer", "index": 88, "name": "mobile_conversion_content_views_post_view", "comment": null}, "mobile_conversion_content_views_sale_amount": {"type": "integer", "index": 89, "name": "mobile_conversion_content_views_sale_amount", "comment": null}, "mobile_conversion_downloads_order_quantity": {"type": "integer", "index": 90, "name": "mobile_conversion_downloads_order_quantity", "comment": null}, "mobile_conversion_downloads_post_engagement": {"type": "integer", "index": 91, "name": "mobile_conversion_downloads_post_engagement", "comment": null}, "mobile_conversion_downloads_post_view": {"type": "integer", "index": 92, "name": "mobile_conversion_downloads_post_view", "comment": null}, "mobile_conversion_downloads_sale_amount": {"type": "integer", "index": 93, "name": "mobile_conversion_downloads_sale_amount", "comment": null}, "mobile_conversion_installs_assisted": {"type": "integer", "index": 94, "name": "mobile_conversion_installs_assisted", "comment": null}, "mobile_conversion_installs_order_quantity": {"type": "integer", "index": 95, "name": "mobile_conversion_installs_order_quantity", "comment": null}, "mobile_conversion_installs_post_engagement": {"type": "integer", "index": 96, "name": "mobile_conversion_installs_post_engagement", "comment": null}, "mobile_conversion_installs_post_view": {"type": "integer", "index": 97, "name": "mobile_conversion_installs_post_view", "comment": null}, "mobile_conversion_installs_sale_amount": {"type": "integer", "index": 98, "name": "mobile_conversion_installs_sale_amount", "comment": null}, "mobile_conversion_invites_assisted": {"type": "integer", "index": 99, "name": "mobile_conversion_invites_assisted", "comment": null}, "mobile_conversion_invites_order_quantity": {"type": "integer", "index": 100, "name": "mobile_conversion_invites_order_quantity", "comment": null}, "mobile_conversion_invites_post_engagement": {"type": "integer", "index": 101, "name": "mobile_conversion_invites_post_engagement", "comment": null}, "mobile_conversion_invites_post_view": {"type": "integer", "index": 102, "name": "mobile_conversion_invites_post_view", "comment": null}, "mobile_conversion_invites_sale_amount": {"type": "integer", "index": 103, "name": "mobile_conversion_invites_sale_amount", "comment": null}, "mobile_conversion_key_page_views_post_engagement": {"type": "integer", "index": 104, "name": "mobile_conversion_key_page_views_post_engagement", "comment": null}, "mobile_conversion_key_page_views_post_view": {"type": "integer", "index": 105, "name": "mobile_conversion_key_page_views_post_view", "comment": null}, "mobile_conversion_levels_achieved_assisted": {"type": "integer", "index": 106, "name": "mobile_conversion_levels_achieved_assisted", "comment": null}, "mobile_conversion_levels_achieved_order_quantity": {"type": "integer", "index": 107, "name": "mobile_conversion_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_levels_achieved_post_engagement": {"type": "integer", "index": 108, "name": "mobile_conversion_levels_achieved_post_engagement", "comment": null}, "mobile_conversion_levels_achieved_post_view": {"type": "integer", "index": 109, "name": "mobile_conversion_levels_achieved_post_view", "comment": null}, "mobile_conversion_levels_achieved_sale_amount": {"type": "integer", "index": 110, "name": "mobile_conversion_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_metric": {"type": "integer", "index": 111, "name": "mobile_conversion_lifetime_value_achievements_unlocked_metric", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_order_qu": {"type": "integer", "index": 112, "name": "mobile_conversion_lifetime_value_achievements_unlocked_order_qu", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo": {"type": "integer", "index": 113, "name": "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_metric": {"type": "integer", "index": 114, "name": "mobile_conversion_lifetime_value_add_to_carts_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_order_quantity": {"type": "integer", "index": 115, "name": "mobile_conversion_lifetime_value_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_sale_amount": {"type": "integer", "index": 116, "name": "mobile_conversion_lifetime_value_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_metric": {"type": "integer", "index": 117, "name": "mobile_conversion_lifetime_value_add_to_wishlists_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit": {"type": "integer", "index": 118, "name": "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount": {"type": "integer", "index": 119, "name": "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_metric": {"type": "integer", "index": 120, "name": "mobile_conversion_lifetime_value_checkouts_initiated_metric", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_order_quan": {"type": "integer", "index": 121, "name": "mobile_conversion_lifetime_value_checkouts_initiated_order_quan", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun": {"type": "integer", "index": 122, "name": "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_content_views_metric": {"type": "integer", "index": 123, "name": "mobile_conversion_lifetime_value_content_views_metric", "comment": null}, "mobile_conversion_lifetime_value_content_views_order_quantity": {"type": "integer", "index": 124, "name": "mobile_conversion_lifetime_value_content_views_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_content_views_sale_amount": {"type": "integer", "index": 125, "name": "mobile_conversion_lifetime_value_content_views_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_invites_metric": {"type": "integer", "index": 126, "name": "mobile_conversion_lifetime_value_invites_metric", "comment": null}, "mobile_conversion_lifetime_value_invites_order_quantity": {"type": "integer", "index": 127, "name": "mobile_conversion_lifetime_value_invites_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_invites_sale_amount": {"type": "integer", "index": 128, "name": "mobile_conversion_lifetime_value_invites_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_metric": {"type": "integer", "index": 129, "name": "mobile_conversion_lifetime_value_levels_achieved_metric", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_order_quantity": {"type": "integer", "index": 130, "name": "mobile_conversion_lifetime_value_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_sale_amount": {"type": "integer", "index": 131, "name": "mobile_conversion_lifetime_value_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_logins_metric": {"type": "integer", "index": 132, "name": "mobile_conversion_lifetime_value_logins_metric", "comment": null}, "mobile_conversion_lifetime_value_logins_order_quantity": {"type": "integer", "index": 133, "name": "mobile_conversion_lifetime_value_logins_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_logins_sale_amount": {"type": "integer", "index": 134, "name": "mobile_conversion_lifetime_value_logins_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_metric": {"type": "integer", "index": 135, "name": "mobile_conversion_lifetime_value_payment_info_additions_metric", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_order_q": {"type": "integer", "index": 136, "name": "mobile_conversion_lifetime_value_payment_info_additions_order_q", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_sale_am": {"type": "integer", "index": 137, "name": "mobile_conversion_lifetime_value_payment_info_additions_sale_am", "comment": null}, "mobile_conversion_lifetime_value_purchases_metric": {"type": "integer", "index": 138, "name": "mobile_conversion_lifetime_value_purchases_metric", "comment": null}, "mobile_conversion_lifetime_value_purchases_order_quantity": {"type": "integer", "index": 139, "name": "mobile_conversion_lifetime_value_purchases_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_purchases_sale_amount": {"type": "integer", "index": 140, "name": "mobile_conversion_lifetime_value_purchases_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_rates_metric": {"type": "integer", "index": 141, "name": "mobile_conversion_lifetime_value_rates_metric", "comment": null}, "mobile_conversion_lifetime_value_rates_order_quantity": {"type": "integer", "index": 142, "name": "mobile_conversion_lifetime_value_rates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_rates_sale_amount": {"type": "integer", "index": 143, "name": "mobile_conversion_lifetime_value_rates_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_reservations_metric": {"type": "integer", "index": 144, "name": "mobile_conversion_lifetime_value_reservations_metric", "comment": null}, "mobile_conversion_lifetime_value_reservations_order_quantity": {"type": "integer", "index": 145, "name": "mobile_conversion_lifetime_value_reservations_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_reservations_sale_amount": {"type": "integer", "index": 146, "name": "mobile_conversion_lifetime_value_reservations_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_searches_metric": {"type": "integer", "index": 147, "name": "mobile_conversion_lifetime_value_searches_metric", "comment": null}, "mobile_conversion_lifetime_value_searches_order_quantity": {"type": "integer", "index": 148, "name": "mobile_conversion_lifetime_value_searches_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_searches_sale_amount": {"type": "integer", "index": 149, "name": "mobile_conversion_lifetime_value_searches_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_shares_metric": {"type": "integer", "index": 150, "name": "mobile_conversion_lifetime_value_shares_metric", "comment": null}, "mobile_conversion_lifetime_value_shares_order_quantity": {"type": "integer", "index": 151, "name": "mobile_conversion_lifetime_value_shares_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_shares_sale_amount": {"type": "integer", "index": 152, "name": "mobile_conversion_lifetime_value_shares_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_metric": {"type": "integer", "index": 153, "name": "mobile_conversion_lifetime_value_sign_ups_metric", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_order_quantity": {"type": "integer", "index": 154, "name": "mobile_conversion_lifetime_value_sign_ups_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_sale_amount": {"type": "integer", "index": 155, "name": "mobile_conversion_lifetime_value_sign_ups_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_metric": {"type": "integer", "index": 156, "name": "mobile_conversion_lifetime_value_spent_credits_metric", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_order_quantity": {"type": "integer", "index": 157, "name": "mobile_conversion_lifetime_value_spent_credits_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_sale_amount": {"type": "integer", "index": 158, "name": "mobile_conversion_lifetime_value_spent_credits_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_metric": {"type": "integer", "index": 159, "name": "mobile_conversion_lifetime_value_tutorials_completed_metric", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_order_quan": {"type": "integer", "index": 160, "name": "mobile_conversion_lifetime_value_tutorials_completed_order_quan", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun": {"type": "integer", "index": 161, "name": "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_updates_metric": {"type": "integer", "index": 162, "name": "mobile_conversion_lifetime_value_updates_metric", "comment": null}, "mobile_conversion_lifetime_value_updates_order_quantity": {"type": "integer", "index": 163, "name": "mobile_conversion_lifetime_value_updates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_updates_sale_amount": {"type": "integer", "index": 164, "name": "mobile_conversion_lifetime_value_updates_sale_amount", "comment": null}, "mobile_conversion_logins_assisted": {"type": "integer", "index": 165, "name": "mobile_conversion_logins_assisted", "comment": null}, "mobile_conversion_logins_order_quantity": {"type": "integer", "index": 166, "name": "mobile_conversion_logins_order_quantity", "comment": null}, "mobile_conversion_logins_post_engagement": {"type": "integer", "index": 167, "name": "mobile_conversion_logins_post_engagement", "comment": null}, "mobile_conversion_logins_post_view": {"type": "integer", "index": 168, "name": "mobile_conversion_logins_post_view", "comment": null}, "mobile_conversion_logins_sale_amount": {"type": "integer", "index": 169, "name": "mobile_conversion_logins_sale_amount", "comment": null}, "mobile_conversion_payment_info_additions_assisted": {"type": "integer", "index": 170, "name": "mobile_conversion_payment_info_additions_assisted", "comment": null}, "mobile_conversion_payment_info_additions_order_quantity": {"type": "integer", "index": 171, "name": "mobile_conversion_payment_info_additions_order_quantity", "comment": null}, "mobile_conversion_payment_info_additions_post_engagement": {"type": "integer", "index": 172, "name": "mobile_conversion_payment_info_additions_post_engagement", "comment": null}, "mobile_conversion_payment_info_additions_post_view": {"type": "integer", "index": 173, "name": "mobile_conversion_payment_info_additions_post_view", "comment": null}, "mobile_conversion_payment_info_additions_sale_amount": {"type": "integer", "index": 174, "name": "mobile_conversion_payment_info_additions_sale_amount", "comment": null}, "mobile_conversion_purchases_assisted": {"type": "integer", "index": 175, "name": "mobile_conversion_purchases_assisted", "comment": null}, "mobile_conversion_purchases_order_quantity": {"type": "integer", "index": 176, "name": "mobile_conversion_purchases_order_quantity", "comment": null}, "mobile_conversion_purchases_post_engagement": {"type": "integer", "index": 177, "name": "mobile_conversion_purchases_post_engagement", "comment": null}, "mobile_conversion_purchases_post_view": {"type": "integer", "index": 178, "name": "mobile_conversion_purchases_post_view", "comment": null}, "mobile_conversion_purchases_sale_amount": {"type": "integer", "index": 179, "name": "mobile_conversion_purchases_sale_amount", "comment": null}, "mobile_conversion_rates_assisted": {"type": "integer", "index": 180, "name": "mobile_conversion_rates_assisted", "comment": null}, "mobile_conversion_rates_order_quantity": {"type": "integer", "index": 181, "name": "mobile_conversion_rates_order_quantity", "comment": null}, "mobile_conversion_rates_post_engagement": {"type": "integer", "index": 182, "name": "mobile_conversion_rates_post_engagement", "comment": null}, "mobile_conversion_rates_post_view": {"type": "integer", "index": 183, "name": "mobile_conversion_rates_post_view", "comment": null}, "mobile_conversion_rates_sale_amount": {"type": "integer", "index": 184, "name": "mobile_conversion_rates_sale_amount", "comment": null}, "mobile_conversion_re_engages_assisted": {"type": "integer", "index": 185, "name": "mobile_conversion_re_engages_assisted", "comment": null}, "mobile_conversion_re_engages_order_quantity": {"type": "integer", "index": 186, "name": "mobile_conversion_re_engages_order_quantity", "comment": null}, "mobile_conversion_re_engages_post_engagement": {"type": "integer", "index": 187, "name": "mobile_conversion_re_engages_post_engagement", "comment": null}, "mobile_conversion_re_engages_post_view": {"type": "integer", "index": 188, "name": "mobile_conversion_re_engages_post_view", "comment": null}, "mobile_conversion_re_engages_sale_amount": {"type": "integer", "index": 189, "name": "mobile_conversion_re_engages_sale_amount", "comment": null}, "mobile_conversion_reservations_assisted": {"type": "integer", "index": 190, "name": "mobile_conversion_reservations_assisted", "comment": null}, "mobile_conversion_reservations_order_quantity": {"type": "integer", "index": 191, "name": "mobile_conversion_reservations_order_quantity", "comment": null}, "mobile_conversion_reservations_post_engagement": {"type": "integer", "index": 192, "name": "mobile_conversion_reservations_post_engagement", "comment": null}, "mobile_conversion_reservations_post_view": {"type": "integer", "index": 193, "name": "mobile_conversion_reservations_post_view", "comment": null}, "mobile_conversion_reservations_sale_amount": {"type": "integer", "index": 194, "name": "mobile_conversion_reservations_sale_amount", "comment": null}, "mobile_conversion_searches_assisted": {"type": "integer", "index": 195, "name": "mobile_conversion_searches_assisted", "comment": null}, "mobile_conversion_searches_order_quantity": {"type": "integer", "index": 196, "name": "mobile_conversion_searches_order_quantity", "comment": null}, "mobile_conversion_searches_post_engagement": {"type": "integer", "index": 197, "name": "mobile_conversion_searches_post_engagement", "comment": null}, "mobile_conversion_searches_post_view": {"type": "integer", "index": 198, "name": "mobile_conversion_searches_post_view", "comment": null}, "mobile_conversion_searches_sale_amount": {"type": "integer", "index": 199, "name": "mobile_conversion_searches_sale_amount", "comment": null}, "mobile_conversion_shares_assisted": {"type": "integer", "index": 200, "name": "mobile_conversion_shares_assisted", "comment": null}, "mobile_conversion_shares_order_quantity": {"type": "integer", "index": 201, "name": "mobile_conversion_shares_order_quantity", "comment": null}, "mobile_conversion_shares_post_engagement": {"type": "integer", "index": 202, "name": "mobile_conversion_shares_post_engagement", "comment": null}, "mobile_conversion_shares_post_view": {"type": "integer", "index": 203, "name": "mobile_conversion_shares_post_view", "comment": null}, "mobile_conversion_shares_sale_amount": {"type": "integer", "index": 204, "name": "mobile_conversion_shares_sale_amount", "comment": null}, "mobile_conversion_sign_ups_assisted": {"type": "integer", "index": 205, "name": "mobile_conversion_sign_ups_assisted", "comment": null}, "mobile_conversion_sign_ups_order_quantity": {"type": "integer", "index": 206, "name": "mobile_conversion_sign_ups_order_quantity", "comment": null}, "mobile_conversion_sign_ups_post_engagement": {"type": "integer", "index": 207, "name": "mobile_conversion_sign_ups_post_engagement", "comment": null}, "mobile_conversion_sign_ups_post_view": {"type": "integer", "index": 208, "name": "mobile_conversion_sign_ups_post_view", "comment": null}, "mobile_conversion_sign_ups_sale_amount": {"type": "integer", "index": 209, "name": "mobile_conversion_sign_ups_sale_amount", "comment": null}, "mobile_conversion_site_visits_order_quantity": {"type": "integer", "index": 210, "name": "mobile_conversion_site_visits_order_quantity", "comment": null}, "mobile_conversion_site_visits_post_engagement": {"type": "integer", "index": 211, "name": "mobile_conversion_site_visits_post_engagement", "comment": null}, "mobile_conversion_site_visits_post_view": {"type": "integer", "index": 212, "name": "mobile_conversion_site_visits_post_view", "comment": null}, "mobile_conversion_site_visits_sale_amount": {"type": "integer", "index": 213, "name": "mobile_conversion_site_visits_sale_amount", "comment": null}, "mobile_conversion_spent_credits_assisted": {"type": "integer", "index": 214, "name": "mobile_conversion_spent_credits_assisted", "comment": null}, "mobile_conversion_spent_credits_order_quantity": {"type": "integer", "index": 215, "name": "mobile_conversion_spent_credits_order_quantity", "comment": null}, "mobile_conversion_spent_credits_post_engagement": {"type": "integer", "index": 216, "name": "mobile_conversion_spent_credits_post_engagement", "comment": null}, "mobile_conversion_spent_credits_post_view": {"type": "integer", "index": 217, "name": "mobile_conversion_spent_credits_post_view", "comment": null}, "mobile_conversion_spent_credits_sale_amount": {"type": "integer", "index": 218, "name": "mobile_conversion_spent_credits_sale_amount", "comment": null}, "mobile_conversion_tutorials_completed_assisted": {"type": "integer", "index": 219, "name": "mobile_conversion_tutorials_completed_assisted", "comment": null}, "mobile_conversion_tutorials_completed_order_quantity": {"type": "integer", "index": 220, "name": "mobile_conversion_tutorials_completed_order_quantity", "comment": null}, "mobile_conversion_tutorials_completed_post_engagement": {"type": "integer", "index": 221, "name": "mobile_conversion_tutorials_completed_post_engagement", "comment": null}, "mobile_conversion_tutorials_completed_post_view": {"type": "integer", "index": 222, "name": "mobile_conversion_tutorials_completed_post_view", "comment": null}, "mobile_conversion_tutorials_completed_sale_amount": {"type": "integer", "index": 223, "name": "mobile_conversion_tutorials_completed_sale_amount", "comment": null}, "mobile_conversion_updates_assisted": {"type": "integer", "index": 224, "name": "mobile_conversion_updates_assisted", "comment": null}, "mobile_conversion_updates_order_quantity": {"type": "integer", "index": 225, "name": "mobile_conversion_updates_order_quantity", "comment": null}, "mobile_conversion_updates_post_engagement": {"type": "integer", "index": 226, "name": "mobile_conversion_updates_post_engagement", "comment": null}, "mobile_conversion_updates_post_view": {"type": "integer", "index": 227, "name": "mobile_conversion_updates_post_view", "comment": null}, "mobile_conversion_updates_sale_amount": {"type": "integer", "index": 228, "name": "mobile_conversion_updates_sale_amount", "comment": null}, "poll_card_vote": {"type": "integer", "index": 229, "name": "poll_card_vote", "comment": null}, "qualified_impressions": {"type": "integer", "index": 230, "name": "qualified_impressions", "comment": null}, "replies": {"type": "integer", "index": 231, "name": "replies", "comment": null}, "retweets": {"type": "integer", "index": 232, "name": "retweets", "comment": null}, "tweets_send": {"type": "integer", "index": 233, "name": "tweets_send", "comment": null}, "unfollows": {"type": "integer", "index": 234, "name": "unfollows", "comment": null}, "url_clicks": {"type": "integer", "index": 235, "name": "url_clicks", "comment": null}, "video_3_s_100_pct_views": {"type": "integer", "index": 236, "name": "video_3_s_100_pct_views", "comment": null}, "video_6_s_views": {"type": "integer", "index": 237, "name": "video_6_s_views", "comment": null}, "video_content_starts": {"type": "integer", "index": 238, "name": "video_content_starts", "comment": null}, "video_cta_clicks": {"type": "integer", "index": 239, "name": "video_cta_clicks", "comment": null}, "video_mrc_views": {"type": "integer", "index": 240, "name": "video_mrc_views", "comment": null}, "video_total_views": {"type": "integer", "index": 241, "name": "video_total_views", "comment": null}, "video_views_100": {"type": "integer", "index": 242, "name": "video_views_100", "comment": null}, "video_views_25": {"type": "integer", "index": 243, "name": "video_views_25", "comment": null}, "video_views_50": {"type": "integer", "index": 244, "name": "video_views_50", "comment": null}, "video_views_75": {"type": "integer", "index": 245, "name": "video_views_75", "comment": null}, "mobile_conversion_installs_skan_post_engagement": {"type": "integer", "index": 246, "name": "mobile_conversion_installs_skan_post_engagement", "comment": null}, "mobile_conversion_installs_skan_post_view": {"type": "integer", "index": 247, "name": "mobile_conversion_installs_skan_post_view", "comment": null}, "mobile_conversion_purchases_skan_post_engagement": {"type": "integer", "index": 248, "name": "mobile_conversion_purchases_skan_post_engagement", "comment": null}, "mobile_conversion_purchases_skan_post_view": {"type": "integer", "index": 249, "name": "mobile_conversion_purchases_skan_post_view", "comment": null}, "video_15_s_views": {"type": "integer", "index": 250, "name": "video_15_s_views", "comment": null}, "auto_created_conversion_landing_page_view": {"type": "integer", "index": 251, "name": "auto_created_conversion_landing_page_view", "comment": null}, "auto_created_conversion_session": {"type": "integer", "index": 252, "name": "auto_created_conversion_session", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.twitter_line_item_report_data"}, "seed.ad_reporting_integration_tests.twitter_promoted_tweet_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_promoted_tweet_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "approval_status": {"type": "text", "index": 2, "name": "approval_status", "comment": null}, "created_at": {"type": "text", "index": 3, "name": "created_at", "comment": null}, "deleted": {"type": "boolean", "index": 4, "name": "deleted", "comment": null}, "entity_status": {"type": "text", "index": 5, "name": "entity_status", "comment": null}, "id": {"type": "text", "index": 6, "name": "id", "comment": null}, "line_item_id": {"type": "text", "index": 7, "name": "line_item_id", "comment": null}, "tweet_id": {"type": "bigint", "index": 8, "name": "tweet_id", "comment": null}, "updated_at": {"type": "text", "index": 9, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.twitter_promoted_tweet_history_data"}, "seed.ad_reporting_integration_tests.twitter_promoted_tweet_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_promoted_tweet_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 3, "name": "billed_charge_local_micro", "comment": null}, "clicks": {"type": "integer", "index": 4, "name": "clicks", "comment": null}, "date": {"type": "timestamp without time zone", "index": 5, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": null}, "promoted_tweet_id": {"type": "text", "index": 7, "name": "promoted_tweet_id", "comment": null}, "url_clicks": {"type": "integer", "index": 8, "name": "url_clicks", "comment": null}, "placement": {"type": "text", "index": 9, "name": "placement", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.twitter_promoted_tweet_report_data"}, "seed.ad_reporting_integration_tests.twitter_tweet_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_tweet_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": null}, "card_uri": {"type": "integer", "index": 4, "name": "card_uri", "comment": null}, "coordinates_coordinates": {"type": "integer", "index": 5, "name": "coordinates_coordinates", "comment": null}, "coordinates_type": {"type": "integer", "index": 6, "name": "coordinates_type", "comment": null}, "created_at": {"type": "text", "index": 7, "name": "created_at", "comment": null}, "favorite_count": {"type": "integer", "index": 8, "name": "favorite_count", "comment": null}, "favorited": {"type": "boolean", "index": 9, "name": "favorited", "comment": null}, "followers": {"type": "integer", "index": 10, "name": "followers", "comment": null}, "full_text": {"type": "text", "index": 11, "name": "full_text", "comment": null}, "geo_coordinates": {"type": "integer", "index": 12, "name": "geo_coordinates", "comment": null}, "geo_type": {"type": "integer", "index": 13, "name": "geo_type", "comment": null}, "in_reply_to_screen_name": {"type": "integer", "index": 14, "name": "in_reply_to_screen_name", "comment": null}, "in_reply_to_status_id": {"type": "integer", "index": 15, "name": "in_reply_to_status_id", "comment": null}, "in_reply_to_user_id": {"type": "integer", "index": 16, "name": "in_reply_to_user_id", "comment": null}, "lang": {"type": "text", "index": 17, "name": "lang", "comment": null}, "media_key": {"type": "integer", "index": 18, "name": "media_key", "comment": null}, "retweet_count": {"type": "integer", "index": 19, "name": "retweet_count", "comment": null}, "retweeted": {"type": "boolean", "index": 20, "name": "retweeted", "comment": null}, "source": {"type": "text", "index": 21, "name": "source", "comment": null}, "truncated": {"type": "boolean", "index": 22, "name": "truncated", "comment": null}, "tweet_type": {"type": "text", "index": 23, "name": "tweet_type", "comment": null}, "user_id": {"type": "integer", "index": 24, "name": "user_id", "comment": null}, "name": {"type": "integer", "index": 25, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.twitter_tweet_data"}, "seed.ad_reporting_integration_tests.twitter_tweet_url_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_tweet_url_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "display_url": {"type": "text", "index": 2, "name": "display_url", "comment": null}, "expanded_url": {"type": "text", "index": 3, "name": "expanded_url", "comment": null}, "index": {"type": "integer", "index": 4, "name": "index", "comment": null}, "indices": {"type": "text", "index": 5, "name": "indices", "comment": null}, "tweet_id": {"type": "bigint", "index": 6, "name": "tweet_id", "comment": null}, "url": {"type": "text", "index": 7, "name": "url", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.twitter_tweet_url_data"}, "model.ad_reporting.ad_reporting__account_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "ad_reporting__account_report", "database": "postgres", "comment": "Each record represents daily metrics by account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "platform": {"type": "text", "index": 3, "name": "platform", "comment": "The ad platform associated with this record."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID representing the account."}, "account_name": {"type": "text", "index": 5, "name": "account_name", "comment": "The name of the account, if present in the source data."}, "clicks": {"type": "bigint", "index": 6, "name": "clicks", "comment": "The count of clicks."}, "impressions": {"type": "bigint", "index": 7, "name": "impressions", "comment": "The count of impressions."}, "spend": {"type": "double precision", "index": 8, "name": "spend", "comment": "The cost of the ads."}, "conversions": {"type": "double precision", "index": 9, "name": "conversions", "comment": "The count of attributed conversion events."}, "conversions_value": {"type": "double precision", "index": 10, "name": "conversions_value", "comment": "The monetary value of attributed conversion events."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.ad_reporting.ad_reporting__account_report"}, "model.ad_reporting.ad_reporting__ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "ad_reporting__ad_group_report", "database": "postgres", "comment": "Each record represents daily metrics by ad group, campaign and account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "platform": {"type": "text", "index": 3, "name": "platform", "comment": "The ad platform associated with this record."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID representing the account."}, "account_name": {"type": "text", "index": 5, "name": "account_name", "comment": "The name of the account, if present in the source data."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID representing the campaign, if present in the source data."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the campaign, if present in the source data."}, "ad_group_id": {"type": "text", "index": 8, "name": "ad_group_id", "comment": "The ID representing the ad group, if present in the source data."}, "ad_group_name": {"type": "text", "index": 9, "name": "ad_group_name", "comment": "The name of the ad group, if present in the source data."}, "clicks": {"type": "bigint", "index": 10, "name": "clicks", "comment": "The count of clicks."}, "impressions": {"type": "bigint", "index": 11, "name": "impressions", "comment": "The count of impressions."}, "spend": {"type": "double precision", "index": 12, "name": "spend", "comment": "The cost of the ads."}, "conversions": {"type": "double precision", "index": 13, "name": "conversions", "comment": "The count of attributed conversion events."}, "conversions_value": {"type": "double precision", "index": 14, "name": "conversions_value", "comment": "The monetary value of attributed conversion events."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.ad_reporting.ad_reporting__ad_group_report"}, "model.ad_reporting.ad_reporting__ad_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "ad_reporting__ad_report", "database": "postgres", "comment": "Each record represents daily metrics by ad, ad group, campaign and account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "platform": {"type": "text", "index": 3, "name": "platform", "comment": "The ad platform associated with this record."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID representing the account."}, "account_name": {"type": "text", "index": 5, "name": "account_name", "comment": "The name of the account, if present in the source data."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID representing the campaign, if present in the source data."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the campaign, if present in the source data."}, "ad_group_id": {"type": "text", "index": 8, "name": "ad_group_id", "comment": "The ID representing the ad group, if present in the source data."}, "ad_group_name": {"type": "text", "index": 9, "name": "ad_group_name", "comment": "The name of the ad group, if present in the source data."}, "ad_id": {"type": "text", "index": 10, "name": "ad_id", "comment": "The ID representing the ad, if present in the source data."}, "ad_name": {"type": "text", "index": 11, "name": "ad_name", "comment": "The name of the ad, if present in the source data."}, "clicks": {"type": "bigint", "index": 12, "name": "clicks", "comment": "The count of clicks."}, "impressions": {"type": "bigint", "index": 13, "name": "impressions", "comment": "The count of impressions."}, "spend": {"type": "double precision", "index": 14, "name": "spend", "comment": "The cost of the ads."}, "conversions": {"type": "double precision", "index": 15, "name": "conversions", "comment": "The count of attributed conversion events."}, "conversions_value": {"type": "double precision", "index": 16, "name": "conversions_value", "comment": "The monetary value of attributed conversion events."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.ad_reporting.ad_reporting__ad_report"}, "model.ad_reporting.ad_reporting__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "ad_reporting__campaign_report", "database": "postgres", "comment": "Each record represents daily metrics by campaign and account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "platform": {"type": "text", "index": 3, "name": "platform", "comment": "The ad platform associated with this record."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID representing the account."}, "account_name": {"type": "text", "index": 5, "name": "account_name", "comment": "The name of the account, if present in the source data."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID representing the campaign, if present in the source data."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the campaign, if present in the source data."}, "clicks": {"type": "bigint", "index": 8, "name": "clicks", "comment": "The count of clicks."}, "impressions": {"type": "bigint", "index": 9, "name": "impressions", "comment": "The count of impressions."}, "spend": {"type": "double precision", "index": 10, "name": "spend", "comment": "The cost of the ads."}, "conversions": {"type": "double precision", "index": 11, "name": "conversions", "comment": "The count of attributed conversion events."}, "conversions_value": {"type": "double precision", "index": 12, "name": "conversions_value", "comment": "The monetary value of attributed conversion events."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.ad_reporting.ad_reporting__campaign_report"}, "model.ad_reporting.ad_reporting__keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "ad_reporting__keyword_report", "database": "postgres", "comment": "Each record represents daily metrics by keyword, ad group, campaign and account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "platform": {"type": "text", "index": 3, "name": "platform", "comment": "The ad platform associated with this record."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID representing the account."}, "account_name": {"type": "text", "index": 5, "name": "account_name", "comment": "The name of the account, if present in the source data."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID representing the campaign, if present in the source data."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the campaign, if present in the source data."}, "ad_group_id": {"type": "text", "index": 8, "name": "ad_group_id", "comment": "The ID representing the ad group, if present in the source data."}, "ad_group_name": {"type": "text", "index": 9, "name": "ad_group_name", "comment": "The name of the ad group, if present in the source data."}, "keyword_id": {"type": "text", "index": 10, "name": "keyword_id", "comment": "The ID representing the keyword, if present in the source data."}, "keyword_text": {"type": "text", "index": 11, "name": "keyword_text", "comment": "The keyword text."}, "keyword_match_type": {"type": "text", "index": 12, "name": "keyword_match_type", "comment": "The keyword match type associated with this record."}, "clicks": {"type": "bigint", "index": 13, "name": "clicks", "comment": "The count of clicks."}, "impressions": {"type": "bigint", "index": 14, "name": "impressions", "comment": "The count of impressions."}, "spend": {"type": "double precision", "index": 15, "name": "spend", "comment": "The cost of the ads."}, "conversions": {"type": "double precision", "index": 16, "name": "conversions", "comment": "The count of attributed conversion events."}, "conversions_value": {"type": "double precision", "index": 17, "name": "conversions_value", "comment": "The monetary value of attributed conversion events."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.ad_reporting.ad_reporting__keyword_report"}, "model.ad_reporting.ad_reporting__monthly_campaign_country_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "ad_reporting__monthly_campaign_country_report", "database": "postgres", "comment": "Each record represents monthly metrics by campaign and country. Country names are standardized to ISO-3166 names.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_month": {"type": "date", "index": 2, "name": "date_month", "comment": "Month of the record, truncated to the first day of the month."}, "platform": {"type": "text", "index": 3, "name": "platform", "comment": "The ad platform associated with this record."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID representing the account."}, "account_name": {"type": "text", "index": 5, "name": "account_name", "comment": "The name of the account, if present in the source data."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID representing the campaign, if present in the source data. Facebook Ads presents country data only at the account level and will have a null value for this field."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the campaign, if present in the source data. Facebook Ads presents country data only at the account level and will have a value of `Account-level` for this field."}, "country": {"type": "text", "index": 8, "name": "country", "comment": "Standardized ISO-3166 name of the country where the campaign was served."}, "country_code": {"type": "text", "index": 9, "name": "country_code", "comment": "ISO-3166 two-letter code of the country where the campaign was served."}, "global_region": {"type": "text", "index": 10, "name": "global_region", "comment": "Greater global region in which the country is located."}, "clicks": {"type": "bigint", "index": 11, "name": "clicks", "comment": "The count of clicks."}, "impressions": {"type": "bigint", "index": 12, "name": "impressions", "comment": "The count of impressions."}, "spend": {"type": "double precision", "index": 13, "name": "spend", "comment": "The cost of the ads."}, "conversions": {"type": "double precision", "index": 14, "name": "conversions", "comment": "The count of attributed conversion events."}, "conversions_value": {"type": "double precision", "index": 15, "name": "conversions_value", "comment": "The monetary value of attributed conversion events."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.ad_reporting.ad_reporting__monthly_campaign_country_report"}, "model.ad_reporting.ad_reporting__monthly_campaign_region_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "ad_reporting__monthly_campaign_region_report", "database": "postgres", "comment": "Each record represents monthly metrics by campaign and region (state, province, metropolitan area, etc.) provided by each platform.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_month": {"type": "date", "index": 2, "name": "date_month", "comment": "Month of the record, truncated to the first day of the month."}, "platform": {"type": "text", "index": 3, "name": "platform", "comment": "The ad platform associated with this record."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID representing the account."}, "account_name": {"type": "text", "index": 5, "name": "account_name", "comment": "The name of the account, if present in the source data."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID representing the campaign, if present in the source data. Facebook Ads presents country data only at the account level and will have a null value for this field."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the campaign, if present in the source data. Facebook Ads presents country data only at the account level and will have a value of `Account-level` for this field."}, "region": {"type": "text", "index": 8, "name": "region", "comment": "Region the ad was served in. The formatting may vary across platforms. This may be a state, province, metropolitan area, etc. Snapchat Ads provides this as a two-letter abbreviation."}, "clicks": {"type": "bigint", "index": 9, "name": "clicks", "comment": "The count of clicks."}, "impressions": {"type": "bigint", "index": 10, "name": "impressions", "comment": "The count of impressions."}, "spend": {"type": "double precision", "index": 11, "name": "spend", "comment": "The cost of the ads."}, "conversions": {"type": "double precision", "index": 12, "name": "conversions", "comment": "The count of attributed conversion events."}, "conversions_value": {"type": "double precision", "index": 13, "name": "conversions_value", "comment": "The monetary value of attributed conversion events."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.ad_reporting.ad_reporting__monthly_campaign_region_report"}, "model.ad_reporting.ad_reporting__search_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "ad_reporting__search_report", "database": "postgres", "comment": "Each record represents daily metrics by search query, ad group, campaign and account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "platform": {"type": "text", "index": 3, "name": "platform", "comment": "The ad platform associated with this record."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID representing the account."}, "account_name": {"type": "text", "index": 5, "name": "account_name", "comment": "The name of the account, if present in the source data."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID representing the campaign, if present in the source data."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the campaign, if present in the source data."}, "ad_group_id": {"type": "text", "index": 8, "name": "ad_group_id", "comment": "The ID representing the ad group, if present in the source data."}, "ad_group_name": {"type": "text", "index": 9, "name": "ad_group_name", "comment": "The name of the ad group, if present in the source data."}, "keyword_id": {"type": "text", "index": 10, "name": "keyword_id", "comment": "The ID representing the keyword, if present in the source data."}, "keyword_text": {"type": "text", "index": 11, "name": "keyword_text", "comment": "The keyword text."}, "search_query": {"type": "text", "index": 12, "name": "search_query", "comment": "The search query text."}, "search_match_type": {"type": "text", "index": 13, "name": "search_match_type", "comment": "The search match type associated with this record."}, "clicks": {"type": "bigint", "index": 14, "name": "clicks", "comment": "The count of clicks."}, "impressions": {"type": "bigint", "index": 15, "name": "impressions", "comment": "The count of impressions."}, "spend": {"type": "double precision", "index": 16, "name": "spend", "comment": "The cost of the ads."}, "conversions": {"type": "double precision", "index": 17, "name": "conversions", "comment": "The count of attributed conversion events."}, "conversions_value": {"type": "double precision", "index": 18, "name": "conversions_value", "comment": "The monetary value of attributed conversion events."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.ad_reporting.ad_reporting__search_report"}, "model.ad_reporting.ad_reporting__url_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "ad_reporting__url_report", "database": "postgres", "comment": "Each record represents daily metrics by URL (and if applicable, URL UTM parameters), ad group, campaign and account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "platform": {"type": "text", "index": 3, "name": "platform", "comment": "The ad platform associated with this record."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID representing the account."}, "account_name": {"type": "text", "index": 5, "name": "account_name", "comment": "The name of the account, if present in the source data."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID representing the campaign, if present in the source data."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the campaign, if present in the source data."}, "ad_group_id": {"type": "text", "index": 8, "name": "ad_group_id", "comment": "The ID representing the ad group, if present in the source data."}, "ad_group_name": {"type": "text", "index": 9, "name": "ad_group_name", "comment": "The name of the ad group, if present in the source data."}, "base_url": {"type": "text", "index": 10, "name": "base_url", "comment": "The base url of the ad."}, "url_host": {"type": "text", "index": 11, "name": "url_host", "comment": "The URL host of the ad."}, "url_path": {"type": "text", "index": 12, "name": "url_path", "comment": "The URL path of the ad."}, "utm_source": {"type": "text", "index": 13, "name": "utm_source", "comment": "The utm_source parameter of the ad."}, "utm_medium": {"type": "text", "index": 14, "name": "utm_medium", "comment": "The utm_medium parameter of the ad."}, "utm_campaign": {"type": "text", "index": 15, "name": "utm_campaign", "comment": "The utm_campaign parameter of the ad."}, "utm_content": {"type": "text", "index": 16, "name": "utm_content", "comment": "The utm_content parameter of the ad."}, "utm_term": {"type": "text", "index": 17, "name": "utm_term", "comment": "The utm_term parameter of the ad."}, "clicks": {"type": "bigint", "index": 18, "name": "clicks", "comment": "The count of clicks."}, "impressions": {"type": "bigint", "index": 19, "name": "impressions", "comment": "The count of impressions."}, "spend": {"type": "double precision", "index": 20, "name": "spend", "comment": "The cost of the ads."}, "conversions": {"type": "double precision", "index": 21, "name": "conversions", "comment": "The count of attributed conversion events."}, "conversions_value": {"type": "double precision", "index": 22, "name": "conversions_value", "comment": "The monetary value of attributed conversion events."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.ad_reporting.ad_reporting__url_report"}, "model.amazon_ads.amazon_ads__account_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "amazon_ads__account_report", "database": "postgres", "comment": "Each record in this table represents the daily performance at the account level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "account_name": {"type": "text", "index": 3, "name": "account_name", "comment": "Account Name. Not currently populated for sellers."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces."}, "country_code": {"type": "text", "index": 5, "name": "country_code", "comment": "The code for a given country."}, "profile_id": {"type": "text", "index": 6, "name": "profile_id", "comment": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace."}, "cost": {"type": "double precision", "index": 7, "name": "cost", "comment": "Total cost of ad clicks."}, "clicks": {"type": "bigint", "index": 8, "name": "clicks", "comment": "Total number of ad clicks."}, "impressions": {"type": "bigint", "index": 9, "name": "impressions", "comment": "Total number of ad impressions."}, "purchases_30_d": {"type": "bigint", "index": 10, "name": "purchases_30_d", "comment": "Number of attributed conversion events occurring within 30 days of an ad click."}, "sales_30_d": {"type": "bigint", "index": 11, "name": "sales_30_d", "comment": "Total value of sales occurring within 30 days of an ad click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.amazon_ads__account_report"}, "model.amazon_ads.amazon_ads__ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "amazon_ads__ad_group_report", "database": "postgres", "comment": "Each record in this table represents the daily performance at the ad group level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "account_name": {"type": "text", "index": 3, "name": "account_name", "comment": "Account Name. Not currently populated for sellers."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces."}, "country_code": {"type": "text", "index": 5, "name": "country_code", "comment": "The code for a given country."}, "profile_id": {"type": "text", "index": 6, "name": "profile_id", "comment": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace."}, "portfolio_name": {"type": "text", "index": 7, "name": "portfolio_name", "comment": "The name of the Portfolio."}, "portfolio_id": {"type": "text", "index": 8, "name": "portfolio_id", "comment": "The ID of the Portfolio."}, "campaign_name": {"type": "text", "index": 9, "name": "campaign_name", "comment": "The name of the Campaign."}, "campaign_id": {"type": "text", "index": 10, "name": "campaign_id", "comment": "The ID of the Campaign."}, "ad_group_name": {"type": "text", "index": 11, "name": "ad_group_name", "comment": "The name of the Campaign."}, "ad_group_id": {"type": "text", "index": 12, "name": "ad_group_id", "comment": "The ID of the Campaign."}, "serving_status": {"type": "text", "index": 13, "name": "serving_status", "comment": "The current serving status of the record."}, "state": {"type": "text", "index": 14, "name": "state", "comment": "The state of the record (enabled, paused, or archived)."}, "default_bid": {"type": "double precision", "index": 15, "name": "default_bid", "comment": "The date of creation of the record."}, "campaign_bidding_strategy": {"type": "text", "index": 16, "name": "campaign_bidding_strategy", "comment": "The bidding strategy associated with a campaign."}, "cost": {"type": "double precision", "index": 17, "name": "cost", "comment": "Total cost of ad clicks."}, "clicks": {"type": "bigint", "index": 18, "name": "clicks", "comment": "Total number of ad clicks."}, "impressions": {"type": "bigint", "index": 19, "name": "impressions", "comment": "Total number of ad impressions."}, "purchases_30_d": {"type": "bigint", "index": 20, "name": "purchases_30_d", "comment": "Number of attributed conversion events occurring within 30 days of an ad click."}, "sales_30_d": {"type": "double precision", "index": 21, "name": "sales_30_d", "comment": "Total value of sales occurring within 30 days of an ad click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.amazon_ads__ad_group_report"}, "model.amazon_ads.amazon_ads__ad_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "amazon_ads__ad_report", "database": "postgres", "comment": "Each record in this table represents the daily performance at the ad level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "account_name": {"type": "text", "index": 3, "name": "account_name", "comment": "Account Name. Not currently populated for sellers."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces."}, "country_code": {"type": "text", "index": 5, "name": "country_code", "comment": "The code for a given country."}, "profile_id": {"type": "text", "index": 6, "name": "profile_id", "comment": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace."}, "portfolio_name": {"type": "text", "index": 7, "name": "portfolio_name", "comment": "The name of the Portfolio."}, "portfolio_id": {"type": "text", "index": 8, "name": "portfolio_id", "comment": "The ID of the Portfolio."}, "campaign_name": {"type": "text", "index": 9, "name": "campaign_name", "comment": "The name of the Campaign."}, "campaign_id": {"type": "text", "index": 10, "name": "campaign_id", "comment": "The ID of the Campaign."}, "ad_group_name": {"type": "text", "index": 11, "name": "ad_group_name", "comment": "The name of the Campaign."}, "ad_group_id": {"type": "text", "index": 12, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "ad_id": {"type": "text", "index": 13, "name": "ad_id", "comment": "The ID of the Ad."}, "serving_status": {"type": "text", "index": 14, "name": "serving_status", "comment": "The current serving status of the record."}, "state": {"type": "text", "index": 15, "name": "state", "comment": "The state of the record (enabled, paused, or archived)."}, "advertised_asin": {"type": "integer", "index": 16, "name": "advertised_asin", "comment": "The ASIN associated to an advertised product."}, "advertised_sku": {"type": "integer", "index": 17, "name": "advertised_sku", "comment": "The SKU being advertised."}, "campaign_budget_amount": {"type": "double precision", "index": 18, "name": "campaign_budget_amount", "comment": "Total budget allocated to the campaign."}, "campaign_budget_currency_code": {"type": "text", "index": 19, "name": "campaign_budget_currency_code", "comment": "The currency code associated with the campaign."}, "campaign_budget_type": {"type": "text", "index": 20, "name": "campaign_budget_type", "comment": "One of: daily or lifetime."}, "cost": {"type": "double precision", "index": 21, "name": "cost", "comment": "Total cost of ad clicks."}, "clicks": {"type": "bigint", "index": 22, "name": "clicks", "comment": "Total number of ad clicks."}, "impressions": {"type": "bigint", "index": 23, "name": "impressions", "comment": "Total number of ad impressions."}, "purchases_30_d": {"type": "bigint", "index": 24, "name": "purchases_30_d", "comment": "Number of attributed conversion events occurring within 30 days of an ad click."}, "sales_30_d": {"type": "double precision", "index": 25, "name": "sales_30_d", "comment": "Total value of sales occurring within 30 days of an ad click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.amazon_ads__ad_report"}, "model.amazon_ads.amazon_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "amazon_ads__campaign_report", "database": "postgres", "comment": "Each record in this table represents the daily performance at the campaign level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "account_name": {"type": "text", "index": 3, "name": "account_name", "comment": "Account Name. Not currently populated for sellers."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces."}, "country_code": {"type": "text", "index": 5, "name": "country_code", "comment": "The code for a given country."}, "profile_id": {"type": "text", "index": 6, "name": "profile_id", "comment": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace."}, "portfolio_name": {"type": "text", "index": 7, "name": "portfolio_name", "comment": "The name of the Portfolio."}, "portfolio_id": {"type": "text", "index": 8, "name": "portfolio_id", "comment": "The ID of the Portfolio."}, "campaign_name": {"type": "text", "index": 9, "name": "campaign_name", "comment": "The name of the Campaign."}, "campaign_id": {"type": "text", "index": 10, "name": "campaign_id", "comment": "The ID of the Campaign."}, "campaign_bidding_strategy": {"type": "text", "index": 11, "name": "campaign_bidding_strategy", "comment": "The bidding strategy associated with a campaign."}, "campaign_budget_amount": {"type": "double precision", "index": 12, "name": "campaign_budget_amount", "comment": "Total budget allocated to the campaign."}, "campaign_budget_currency_code": {"type": "text", "index": 13, "name": "campaign_budget_currency_code", "comment": "The currency code associated with the campaign."}, "campaign_budget_type": {"type": "text", "index": 14, "name": "campaign_budget_type", "comment": "One of: daily or lifetime."}, "cost": {"type": "double precision", "index": 15, "name": "cost", "comment": "Total cost of ad clicks."}, "clicks": {"type": "bigint", "index": 16, "name": "clicks", "comment": "Total number of ad clicks."}, "impressions": {"type": "bigint", "index": 17, "name": "impressions", "comment": "Total number of ad impressions."}, "purchases_30_d": {"type": "bigint", "index": 18, "name": "purchases_30_d", "comment": "Number of attributed conversion events occurring within 30 days of an ad click."}, "sales_30_d": {"type": "bigint", "index": 19, "name": "sales_30_d", "comment": "Total value of sales occurring within 30 days of an ad click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.amazon_ads__campaign_report"}, "model.amazon_ads.amazon_ads__keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "amazon_ads__keyword_report", "database": "postgres", "comment": "Each record in this table represents the daily performance at the keyword level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "account_name": {"type": "text", "index": 3, "name": "account_name", "comment": "Account Name. Not currently populated for sellers."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces."}, "country_code": {"type": "text", "index": 5, "name": "country_code", "comment": "The code for a given country."}, "profile_id": {"type": "text", "index": 6, "name": "profile_id", "comment": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace."}, "portfolio_name": {"type": "text", "index": 7, "name": "portfolio_name", "comment": "The name of the Portfolio."}, "portfolio_id": {"type": "text", "index": 8, "name": "portfolio_id", "comment": "The ID of the Portfolio."}, "campaign_name": {"type": "text", "index": 9, "name": "campaign_name", "comment": "The name of the Campaign."}, "campaign_id": {"type": "text", "index": 10, "name": "campaign_id", "comment": "The ID of the Campaign."}, "ad_group_name": {"type": "text", "index": 11, "name": "ad_group_name", "comment": "The name of the AdGroup."}, "ad_group_id": {"type": "text", "index": 12, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "keyword_id": {"type": "text", "index": 13, "name": "keyword_id", "comment": "The ID of the keyword."}, "keyword_text": {"type": "text", "index": 14, "name": "keyword_text", "comment": "The exact text for the keyword."}, "serving_status": {"type": "text", "index": 15, "name": "serving_status", "comment": "The current serving status of the record."}, "state": {"type": "text", "index": 16, "name": "state", "comment": "The state of the record (enabled, paused, or archived)."}, "keyword_bid": {"type": "double precision", "index": 17, "name": "keyword_bid", "comment": "Bid associated with a keyword or targeting expression."}, "keyword_type": {"type": "text", "index": 18, "name": "keyword_type", "comment": "Type of matching for the keyword used in bid. One of: BROAD, PHRASE, or EXACT."}, "match_type": {"type": "text", "index": 19, "name": "match_type", "comment": "Type of matching for the keyword used in bid. One of: BROAD, PHRASE, or EXACT."}, "cost": {"type": "double precision", "index": 20, "name": "cost", "comment": "Total cost of ad clicks."}, "clicks": {"type": "bigint", "index": 21, "name": "clicks", "comment": "Total number of ad clicks."}, "impressions": {"type": "bigint", "index": 22, "name": "impressions", "comment": "Total number of ad impressions."}, "purchases_30_d": {"type": "bigint", "index": 23, "name": "purchases_30_d", "comment": "Number of attributed conversion events occurring within 30 days of an ad click."}, "sales_30_d": {"type": "double precision", "index": 24, "name": "sales_30_d", "comment": "Total value of sales occurring within 30 days of an ad click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.amazon_ads__keyword_report"}, "model.amazon_ads.amazon_ads__portfolio_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "amazon_ads__portfolio_report", "database": "postgres", "comment": "Each record in this table represents the daily performance at the portfolio level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "account_name": {"type": "text", "index": 3, "name": "account_name", "comment": "Account Name. Not currently populated for sellers."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces."}, "country_code": {"type": "text", "index": 5, "name": "country_code", "comment": "The code for a given country."}, "profile_id": {"type": "text", "index": 6, "name": "profile_id", "comment": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace."}, "portfolio_name": {"type": "text", "index": 7, "name": "portfolio_name", "comment": "The name of the Portfolio."}, "portfolio_id": {"type": "text", "index": 8, "name": "portfolio_id", "comment": "The ID of the Portfolio."}, "budget_amount": {"type": "integer", "index": 9, "name": "budget_amount", "comment": "The budget amount associated with the portfolio. Cannot be null."}, "budget_currency_code": {"type": "integer", "index": 10, "name": "budget_currency_code", "comment": "The currency used for all monetary values for entities under this profile. Cannot be null."}, "budget_start_date": {"type": "integer", "index": 11, "name": "budget_start_date", "comment": "The starting date in YYYYMMDD format to which the budget is applied. Required if policy is set to dateRange. Not specified if policy is set to monthlyRecurring. Note that the starting date for monthlyRecurring is the date when the policy is set."}, "budget_end_date": {"type": "integer", "index": 12, "name": "budget_end_date", "comment": "The end date after which the budget is no longer applied. Optional if policy is set to dateRange or monthlyRecurring."}, "budget_policy": {"type": "integer", "index": 13, "name": "budget_policy", "comment": "The budget policy. Set to dateRange to specify a budget for a specific period of time. Set to monthlyRecurring to specify a budget that is automatically renewed at the beginning of each month. Cannot be null."}, "in_budget": {"type": "boolean", "index": 14, "name": "in_budget", "comment": "Indicates the current budget status of the portfolio. Set to true if the portfolio is in budget, set to false if the portfolio is out of budget."}, "serving_status": {"type": "text", "index": 15, "name": "serving_status", "comment": "The current serving status of the record."}, "state": {"type": "text", "index": 16, "name": "state", "comment": "The state of the record (enabled, paused, or archived)."}, "cost": {"type": "double precision", "index": 17, "name": "cost", "comment": "Total cost of ad clicks."}, "clicks": {"type": "bigint", "index": 18, "name": "clicks", "comment": "Total number of ad clicks."}, "impressions": {"type": "bigint", "index": 19, "name": "impressions", "comment": "Total number of ad impressions."}, "purchases_30_d": {"type": "bigint", "index": 20, "name": "purchases_30_d", "comment": "Number of attributed conversion events occurring within 30 days of an ad click."}, "sales_30_d": {"type": "bigint", "index": 21, "name": "sales_30_d", "comment": "Total value of sales occurring within 30 days of an ad click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.amazon_ads__portfolio_report"}, "model.amazon_ads.amazon_ads__search_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "amazon_ads__search_report", "database": "postgres", "comment": "Each record in this table represents the daily performance at the search term level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "account_name": {"type": "text", "index": 3, "name": "account_name", "comment": "Account Name. Not currently populated for sellers."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces."}, "country_code": {"type": "text", "index": 5, "name": "country_code", "comment": "The code for a given country."}, "profile_id": {"type": "text", "index": 6, "name": "profile_id", "comment": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace."}, "portfolio_name": {"type": "text", "index": 7, "name": "portfolio_name", "comment": "The name of the Portfolio."}, "portfolio_id": {"type": "text", "index": 8, "name": "portfolio_id", "comment": "The ID of the Portfolio."}, "campaign_name": {"type": "text", "index": 9, "name": "campaign_name", "comment": "The name of the Campaign."}, "campaign_id": {"type": "text", "index": 10, "name": "campaign_id", "comment": "The ID of the Campaign."}, "ad_group_name": {"type": "text", "index": 11, "name": "ad_group_name", "comment": "The name of the AdGroup."}, "ad_group_id": {"type": "text", "index": 12, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "keyword_id": {"type": "text", "index": 13, "name": "keyword_id", "comment": "The ID of the keyword."}, "keyword_text": {"type": "text", "index": 14, "name": "keyword_text", "comment": "The exact text for the keyword."}, "match_type": {"type": "text", "index": 15, "name": "match_type", "comment": "Type of matching for the keyword used in bid. One of: BROAD, PHRASE, or EXACT."}, "serving_status": {"type": "text", "index": 16, "name": "serving_status", "comment": "The current serving status of the record."}, "state": {"type": "text", "index": 17, "name": "state", "comment": "The state of the record (enabled, paused, or archived)."}, "search_term": {"type": "text", "index": 18, "name": "search_term", "comment": "The search term used by the customer."}, "targeting": {"type": "text", "index": 19, "name": "targeting", "comment": "A string representation of the expression object used in the targeting clause."}, "cost": {"type": "double precision", "index": 20, "name": "cost", "comment": "Total cost of ad clicks."}, "clicks": {"type": "bigint", "index": 21, "name": "clicks", "comment": "Total number of ad clicks."}, "impressions": {"type": "bigint", "index": 22, "name": "impressions", "comment": "Total number of ad impressions."}, "purchases_30_d": {"type": "bigint", "index": 23, "name": "purchases_30_d", "comment": "Number of attributed conversion events occurring within 30 days of an ad click."}, "sales_30_d": {"type": "double precision", "index": 24, "name": "sales_30_d", "comment": "Total value of sales occurring within 30 days of an ad click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.amazon_ads__search_report"}, "model.apple_search_ads.apple_search_ads__ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "apple_search_ads__ad_group_report", "database": "postgres", "comment": "Each record represents the daily ad performance of each ad group.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Date of the report."}, "organization_id": {"type": "integer", "index": 3, "name": "organization_id", "comment": "Organization ID associated with this record."}, "organization_name": {"type": "text", "index": 4, "name": "organization_name", "comment": "Organization name associated with this record."}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": "Campaign ID associated with this record."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "Campaign name associated with this record."}, "ad_group_id": {"type": "integer", "index": 7, "name": "ad_group_id", "comment": "Ad group ID associated with this record."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "Ad group name associated with this record."}, "currency": {"type": "text", "index": 9, "name": "currency", "comment": "This currency value should match the respective organization's currency value."}, "ad_group_status": {"type": "text", "index": 10, "name": "ad_group_status", "comment": "The status of the ad group associated with this record."}, "start_at": {"type": "timestamp without time zone", "index": 11, "name": "start_at", "comment": "The start timestamp for this ad group."}, "end_at": {"type": "timestamp without time zone", "index": 12, "name": "end_at", "comment": "The end timestamp for this ad group."}, "taps": {"type": "bigint", "index": 13, "name": "taps", "comment": "Number of taps on ad group on given day."}, "new_downloads": {"type": "bigint", "index": 14, "name": "new_downloads", "comment": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025."}, "tap_new_downloads": {"type": "bigint", "index": 15, "name": "tap_new_downloads", "comment": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field."}, "redownloads": {"type": "bigint", "index": 16, "name": "redownloads", "comment": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025."}, "tap_redownloads": {"type": "bigint", "index": 17, "name": "tap_redownloads", "comment": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field."}, "total_downloads": {"type": "bigint", "index": 18, "name": "total_downloads", "comment": "The sum of `new_downloads` and `redownloads`. Following the [release](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) of Apple Search Ads API v5, the package will sunset this field by April 2025. Please refer to its replacement, `tap_total_downloads`, instead."}, "tap_total_downloads": {"type": "bigint", "index": 19, "name": "tap_total_downloads", "comment": "The sum of `tap_new_downloads` and `tap_redownloads`. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `total_downloads` field."}, "conversions": {"type": "bigint", "index": 20, "name": "conversions", "comment": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025."}, "tap_installs": {"type": "bigint", "index": 21, "name": "tap_installs", "comment": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field."}, "impressions": {"type": "bigint", "index": 22, "name": "impressions", "comment": "The number of impressions of ad group in a given day."}, "spend": {"type": "double precision", "index": 23, "name": "spend", "comment": "The spend on ad group in the given day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.apple_search_ads__ad_group_report"}, "model.apple_search_ads.apple_search_ads__ad_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "apple_search_ads__ad_report", "database": "postgres", "comment": "Each record represents the daily ad performance of each ad.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Date of the report."}, "organization_id": {"type": "integer", "index": 3, "name": "organization_id", "comment": "Organization ID associated with this record."}, "organization_name": {"type": "text", "index": 4, "name": "organization_name", "comment": "Organization name associated with this record."}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": "Campaign ID associated with this record."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "Campaign name associated with this record."}, "ad_group_id": {"type": "integer", "index": 7, "name": "ad_group_id", "comment": "Ad group ID associated with this record."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "Ad group name associated with this record."}, "ad_id": {"type": "integer", "index": 9, "name": "ad_id", "comment": "Ad ID associated with this record."}, "ad_name": {"type": "text", "index": 10, "name": "ad_name", "comment": "Ad name associated with this record."}, "currency": {"type": "text", "index": 11, "name": "currency", "comment": "This currency value should match the respective organization's currency value."}, "ad_status": {"type": "text", "index": 12, "name": "ad_status", "comment": "The status of the ad associated with this record."}, "taps": {"type": "bigint", "index": 13, "name": "taps", "comment": "Number of taps on ad group on given day."}, "new_downloads": {"type": "bigint", "index": 14, "name": "new_downloads", "comment": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025."}, "tap_new_downloads": {"type": "bigint", "index": 15, "name": "tap_new_downloads", "comment": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field."}, "redownloads": {"type": "bigint", "index": 16, "name": "redownloads", "comment": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025."}, "tap_redownloads": {"type": "bigint", "index": 17, "name": "tap_redownloads", "comment": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field."}, "total_downloads": {"type": "bigint", "index": 18, "name": "total_downloads", "comment": "The sum of `new_downloads` and `redownloads`. Following the [release](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) of Apple Search Ads API v5, the package will sunset this field by April 2025. Please refer to its replacement, `tap_total_downloads`, instead."}, "tap_total_downloads": {"type": "bigint", "index": 19, "name": "tap_total_downloads", "comment": "The sum of `tap_new_downloads` and `tap_redownloads`. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `total_downloads` field."}, "conversions": {"type": "bigint", "index": 20, "name": "conversions", "comment": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025."}, "tap_installs": {"type": "bigint", "index": 21, "name": "tap_installs", "comment": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field."}, "impressions": {"type": "bigint", "index": 22, "name": "impressions", "comment": "The number of impressions of ad group in a given day."}, "spend": {"type": "double precision", "index": 23, "name": "spend", "comment": "The spend on ad group in the given day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.apple_search_ads__ad_report"}, "model.apple_search_ads.apple_search_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "apple_search_ads__campaign_report", "database": "postgres", "comment": "Each record represents the daily ad performance of each campaign.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Date of the report."}, "organization_id": {"type": "integer", "index": 3, "name": "organization_id", "comment": "Organization ID associated with this record."}, "organization_name": {"type": "text", "index": 4, "name": "organization_name", "comment": "Organization name associated with this record."}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": "Campaign ID associated with this record."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "Campaign name associated with this record."}, "currency": {"type": "text", "index": 7, "name": "currency", "comment": "This currency value should match the respective organization's currency value."}, "campaign_status": {"type": "text", "index": 8, "name": "campaign_status", "comment": "The status of the campaign associted with this record."}, "start_at": {"type": "timestamp without time zone", "index": 9, "name": "start_at", "comment": "The start timestamp of this campaign."}, "end_at": {"type": "timestamp without time zone", "index": 10, "name": "end_at", "comment": "The end timestamp of this campaign."}, "taps": {"type": "bigint", "index": 11, "name": "taps", "comment": "Number of taps on campaign on given day."}, "new_downloads": {"type": "bigint", "index": 12, "name": "new_downloads", "comment": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025."}, "tap_new_downloads": {"type": "bigint", "index": 13, "name": "tap_new_downloads", "comment": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field."}, "redownloads": {"type": "bigint", "index": 14, "name": "redownloads", "comment": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025."}, "tap_redownloads": {"type": "bigint", "index": 15, "name": "tap_redownloads", "comment": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field."}, "total_downloads": {"type": "bigint", "index": 16, "name": "total_downloads", "comment": "The sum of `new_downloads` and `redownloads`. Following the [release](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) of Apple Search Ads API v5, the package will sunset this field by April 2025. Please refer to its replacement, `tap_total_downloads`, instead."}, "tap_total_downloads": {"type": "bigint", "index": 17, "name": "tap_total_downloads", "comment": "The sum of `tap_new_downloads` and `tap_redownloads`. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `total_downloads` field."}, "conversions": {"type": "bigint", "index": 18, "name": "conversions", "comment": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025."}, "tap_installs": {"type": "bigint", "index": 19, "name": "tap_installs", "comment": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field."}, "impressions": {"type": "bigint", "index": 20, "name": "impressions", "comment": "The number of impressions of campaign in a given day."}, "spend": {"type": "double precision", "index": 21, "name": "spend", "comment": "The spend on campaign in the given day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.apple_search_ads__campaign_report"}, "model.apple_search_ads.apple_search_ads__keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "apple_search_ads__keyword_report", "database": "postgres", "comment": "Each record represents the daily ad performance of each creative set.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Date of the report."}, "organization_id": {"type": "integer", "index": 3, "name": "organization_id", "comment": "Organization ID associated with this record."}, "organization_name": {"type": "text", "index": 4, "name": "organization_name", "comment": "Organization name associated with this record."}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": "Campaign ID associated with this record."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "Campaign name associated with this record."}, "ad_group_id": {"type": "integer", "index": 7, "name": "ad_group_id", "comment": "Ad group ID associated with this record."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "Ad group name associated with this record."}, "keyword_id": {"type": "integer", "index": 9, "name": "keyword_id", "comment": "Creative set name associatd with this record."}, "keyword_text": {"type": "text", "index": 10, "name": "keyword_text", "comment": "Creative set ID associated with this record."}, "match_type": {"type": "text", "index": 11, "name": "match_type", "comment": "Controls how ads are matched to user searches; EXACT or BROAD."}, "currency": {"type": "text", "index": 12, "name": "currency", "comment": "This currency value should match the respective organization's currency value."}, "keyword_status": {"type": "text", "index": 13, "name": "keyword_status", "comment": "The status of the keyword associated with this record."}, "taps": {"type": "bigint", "index": 14, "name": "taps", "comment": "Number of taps on keyword on given day."}, "new_downloads": {"type": "bigint", "index": 15, "name": "new_downloads", "comment": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025."}, "tap_new_downloads": {"type": "bigint", "index": 16, "name": "tap_new_downloads", "comment": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field."}, "redownloads": {"type": "bigint", "index": 17, "name": "redownloads", "comment": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025."}, "tap_redownloads": {"type": "bigint", "index": 18, "name": "tap_redownloads", "comment": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field."}, "total_downloads": {"type": "bigint", "index": 19, "name": "total_downloads", "comment": "The sum of `new_downloads` and `redownloads`. Following the [release](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) of Apple Search Ads API v5, the package will sunset this field by April 2025. Please refer to its replacement, `tap_total_downloads`, instead."}, "tap_total_downloads": {"type": "bigint", "index": 20, "name": "tap_total_downloads", "comment": "The sum of `tap_new_downloads` and `tap_redownloads`. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `total_downloads` field."}, "conversions": {"type": "bigint", "index": 21, "name": "conversions", "comment": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025."}, "tap_installs": {"type": "bigint", "index": 22, "name": "tap_installs", "comment": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field."}, "impressions": {"type": "bigint", "index": 23, "name": "impressions", "comment": "The number of impressions of keyword in a given day."}, "spend": {"type": "double precision", "index": 24, "name": "spend", "comment": "The spend on keyword in the given day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.apple_search_ads__keyword_report"}, "model.apple_search_ads.apple_search_ads__organization_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "apple_search_ads__organization_report", "database": "postgres", "comment": "Each record represents the daily ad performance of each organization.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Date of the report."}, "organization_id": {"type": "integer", "index": 3, "name": "organization_id", "comment": "Organization ID associated with this record."}, "organization_name": {"type": "text", "index": 4, "name": "organization_name", "comment": "Organization name associated with this record."}, "currency": {"type": "text", "index": 5, "name": "currency", "comment": "This currency value should match the respective organization's currency value."}, "taps": {"type": "bigint", "index": 6, "name": "taps", "comment": "Number of taps on organization on given day."}, "new_downloads": {"type": "bigint", "index": 7, "name": "new_downloads", "comment": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025."}, "tap_new_downloads": {"type": "bigint", "index": 8, "name": "tap_new_downloads", "comment": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field."}, "redownloads": {"type": "bigint", "index": 9, "name": "redownloads", "comment": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025."}, "tap_redownloads": {"type": "bigint", "index": 10, "name": "tap_redownloads", "comment": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field."}, "total_downloads": {"type": "bigint", "index": 11, "name": "total_downloads", "comment": "The sum of `new_downloads` and `redownloads`. Following the [release](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) of Apple Search Ads API v5, the package will sunset this field by April 2025. Please refer to its replacement, `tap_total_downloads`, instead."}, "tap_total_downloads": {"type": "bigint", "index": 12, "name": "tap_total_downloads", "comment": "The sum of `tap_new_downloads` and `tap_redownloads`. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `total_downloads` field."}, "conversions": {"type": "bigint", "index": 13, "name": "conversions", "comment": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025."}, "tap_installs": {"type": "bigint", "index": 14, "name": "tap_installs", "comment": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field."}, "impressions": {"type": "bigint", "index": 15, "name": "impressions", "comment": "The number of impressions of organization in a given day."}, "spend": {"type": "double precision", "index": 16, "name": "spend", "comment": "The spend on organization in the given day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.apple_search_ads__organization_report"}, "model.apple_search_ads.apple_search_ads__search_term_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "apple_search_ads__search_term_report", "database": "postgres", "comment": "Each record represents the daily ad performance of each search term, only includes records with search term values.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Date of the report."}, "organization_id": {"type": "integer", "index": 3, "name": "organization_id", "comment": "Organization ID associated with this record."}, "organization_name": {"type": "text", "index": 4, "name": "organization_name", "comment": "Organization name associated with this record."}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": "Campaign ID associated with this record."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "Campaign name associated with this record."}, "ad_group_id": {"type": "integer", "index": 7, "name": "ad_group_id", "comment": "Ad group ID associated with this record."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "Ad group name associated with this record."}, "keyword_id": {"type": "integer", "index": 9, "name": "keyword_id", "comment": "Creative set name associatd with this record."}, "keyword_text": {"type": "text", "index": 10, "name": "keyword_text", "comment": "Creative set ID associated with this record."}, "search_term_text": {"type": "text", "index": 11, "name": "search_term_text", "comment": "Search term text."}, "match_type": {"type": "text", "index": 12, "name": "match_type", "comment": "Controls how ads are matched to user searches; EXACT or BROAD."}, "currency": {"type": "text", "index": 13, "name": "currency", "comment": "This currency value should match the respective organization's currency value."}, "taps": {"type": "bigint", "index": 14, "name": "taps", "comment": "Number of taps on organization on given day."}, "new_downloads": {"type": "bigint", "index": 15, "name": "new_downloads", "comment": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025."}, "tap_new_downloads": {"type": "bigint", "index": 16, "name": "tap_new_downloads", "comment": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field."}, "redownloads": {"type": "bigint", "index": 17, "name": "redownloads", "comment": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025."}, "tap_redownloads": {"type": "bigint", "index": 18, "name": "tap_redownloads", "comment": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field."}, "total_downloads": {"type": "bigint", "index": 19, "name": "total_downloads", "comment": "The sum of `new_downloads` and `redownloads`. Following the [release](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) of Apple Search Ads API v5, the package will sunset this field by April 2025. Please refer to its replacement, `tap_total_downloads`, instead."}, "tap_total_downloads": {"type": "bigint", "index": 20, "name": "tap_total_downloads", "comment": "The sum of `tap_new_downloads` and `tap_redownloads`. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `total_downloads` field."}, "conversions": {"type": "bigint", "index": 21, "name": "conversions", "comment": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025."}, "tap_installs": {"type": "bigint", "index": 22, "name": "tap_installs", "comment": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field."}, "impressions": {"type": "bigint", "index": 23, "name": "impressions", "comment": "The number of impressions of organization in a given day."}, "spend": {"type": "double precision", "index": 24, "name": "spend", "comment": "The spend on organization in the given day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.apple_search_ads__search_term_report"}, "model.facebook_ads.facebook_ads__account_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "facebook_ads__account_report", "database": "postgres", "comment": "Each record represents the daily performance of a Facebook account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": "The ID of the related account."}, "account_name": {"type": "character varying", "index": 4, "name": "account_name", "comment": "The name of the related account."}, "account_status": {"type": "text", "index": 5, "name": "account_status", "comment": "Current status of account."}, "business_country_code": {"type": "text", "index": 6, "name": "business_country_code", "comment": "Country code of business associated to account."}, "created_at": {"type": "timestamp without time zone", "index": 7, "name": "created_at", "comment": "The time account was created."}, "currency": {"type": "text", "index": 8, "name": "currency", "comment": "Currency associated with account."}, "timezone_name": {"type": "text", "index": 9, "name": "timezone_name", "comment": "Timezone associated with account."}, "clicks": {"type": "bigint", "index": 10, "name": "clicks", "comment": "The number of clicks the ad had on the given day."}, "impressions": {"type": "bigint", "index": 11, "name": "impressions", "comment": "The number of impressions the ad had on the given day."}, "spend": {"type": "double precision", "index": 12, "name": "spend", "comment": "The spend on the ad in the given day."}, "conversions": {"type": "double precision", "index": 13, "name": "conversions", "comment": "Total number of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n"}, "conversions_value": {"type": "double precision", "index": 14, "name": "conversions_value", "comment": "Total monetary value of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n"}, "onsite_conversion_purchase_conversions": {"type": "double precision", "index": 15, "name": "onsite_conversion_purchase_conversions", "comment": "Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_purchase_conversions_value": {"type": "double precision", "index": 16, "name": "onsite_conversion_purchase_conversions_value", "comment": "Monetary value of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_lead_grouped_conversions": {"type": "double precision", "index": 17, "name": "onsite_conversion_lead_grouped_conversions", "comment": "Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_lead_grouped_conversions_value": {"type": "double precision", "index": 18, "name": "onsite_conversion_lead_grouped_conversions_value", "comment": "Monetary value of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_purchase_conversions": {"type": "double precision", "index": 19, "name": "offsite_conversion_fb_pixel_purchase_conversions", "comment": "Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_purchase_conversions_value": {"type": "double precision", "index": 20, "name": "offsite_conversion_fb_pixel_purchase_conversions_value", "comment": "Monetary value of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_lead_conversions": {"type": "double precision", "index": 21, "name": "offsite_conversion_fb_pixel_lead_conversions", "comment": "Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_lead_conversions_value": {"type": "double precision", "index": 22, "name": "offsite_conversion_fb_pixel_lead_conversions_value", "comment": "Monetary value of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_custom_conversions": {"type": "double precision", "index": 23, "name": "offsite_conversion_fb_pixel_custom_conversions", "comment": "Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_custom_conversions_value": {"type": "double precision", "index": 24, "name": "offsite_conversion_fb_pixel_custom_conversions_value", "comment": "Monetary value of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.facebook_ads__account_report"}, "model.facebook_ads.facebook_ads__ad_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "facebook_ads__ad_report", "database": "postgres", "comment": "Each record represents the daily performance of a Facebook ad.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": "The ID of the related account."}, "account_name": {"type": "character varying", "index": 4, "name": "account_name", "comment": "The name of the related account."}, "campaign_id": {"type": "bigint", "index": 5, "name": "campaign_id", "comment": "The ID of the related campaign."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the related campaign."}, "ad_set_id": {"type": "bigint", "index": 7, "name": "ad_set_id", "comment": "The ID of the related ad set."}, "ad_set_name": {"type": "text", "index": 8, "name": "ad_set_name", "comment": "The name of the related ad set."}, "ad_id": {"type": "bigint", "index": 9, "name": "ad_id", "comment": "The ID of the related ad."}, "ad_name": {"type": "text", "index": 10, "name": "ad_name", "comment": "The name of the related ad."}, "conversion_domain": {"type": "text", "index": 11, "name": "conversion_domain", "comment": "The domain you've configured the ad to convert to."}, "clicks": {"type": "bigint", "index": 12, "name": "clicks", "comment": "The number of clicks the ad had on the given day."}, "impressions": {"type": "bigint", "index": 13, "name": "impressions", "comment": "The number of impressions the ad had on the given day."}, "spend": {"type": "double precision", "index": 14, "name": "spend", "comment": "The spend on the ad in the given day."}, "conversions": {"type": "double precision", "index": 15, "name": "conversions", "comment": "Total number of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n"}, "conversions_value": {"type": "double precision", "index": 16, "name": "conversions_value", "comment": "Total monetary value of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n"}, "onsite_conversion_purchase_conversions": {"type": "double precision", "index": 17, "name": "onsite_conversion_purchase_conversions", "comment": "Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_purchase_conversions_value": {"type": "double precision", "index": 18, "name": "onsite_conversion_purchase_conversions_value", "comment": "Monetary value of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_lead_grouped_conversions": {"type": "double precision", "index": 19, "name": "onsite_conversion_lead_grouped_conversions", "comment": "Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_lead_grouped_conversions_value": {"type": "double precision", "index": 20, "name": "onsite_conversion_lead_grouped_conversions_value", "comment": "Monetary value of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_purchase_conversions": {"type": "double precision", "index": 21, "name": "offsite_conversion_fb_pixel_purchase_conversions", "comment": "Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_purchase_conversions_value": {"type": "double precision", "index": 22, "name": "offsite_conversion_fb_pixel_purchase_conversions_value", "comment": "Monetary value of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_lead_conversions": {"type": "double precision", "index": 23, "name": "offsite_conversion_fb_pixel_lead_conversions", "comment": "Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_lead_conversions_value": {"type": "double precision", "index": 24, "name": "offsite_conversion_fb_pixel_lead_conversions_value", "comment": "Monetary value of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_custom_conversions": {"type": "double precision", "index": 25, "name": "offsite_conversion_fb_pixel_custom_conversions", "comment": "Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_custom_conversions_value": {"type": "double precision", "index": 26, "name": "offsite_conversion_fb_pixel_custom_conversions_value", "comment": "Monetary value of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.facebook_ads__ad_report"}, "model.facebook_ads.facebook_ads__ad_set_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "facebook_ads__ad_set_report", "database": "postgres", "comment": "Each record represents the daily performance of a Facebook ad set.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": "The ID of the related account."}, "account_name": {"type": "character varying", "index": 4, "name": "account_name", "comment": "The name of the related account."}, "campaign_id": {"type": "bigint", "index": 5, "name": "campaign_id", "comment": "The ID of the related campaign."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the related campaign."}, "ad_set_id": {"type": "bigint", "index": 7, "name": "ad_set_id", "comment": "The ID of the related ad set."}, "ad_set_name": {"type": "text", "index": 8, "name": "ad_set_name", "comment": "The name of the related ad set."}, "start_at": {"type": "timestamp without time zone", "index": 9, "name": "start_at", "comment": "Timestamp of designated ad set start time."}, "end_at": {"type": "timestamp without time zone", "index": 10, "name": "end_at", "comment": "Timestamp of designated ad set end time."}, "bid_strategy": {"type": "text", "index": 11, "name": "bid_strategy", "comment": "Bid strategy values are - 'LOWEST_COST_WITHOUT_CAP', 'LOWEST_COST_WITH_BID_CAP', 'COST_CAP', 'LOWEST_COST_WITH_MIN_ROAS'."}, "daily_budget": {"type": "integer", "index": 12, "name": "daily_budget", "comment": "Daily budget of ad set."}, "budget_remaining": {"type": "integer", "index": 13, "name": "budget_remaining", "comment": "Remaining budget of ad set."}, "optimization_goal": {"type": "text", "index": 14, "name": "optimization_goal", "comment": "The optimization goal this ad set is using. Possible values defined [here](https://developers.facebook.com/docs/marketing-api/reference/ad-campaign/#fields)."}, "clicks": {"type": "bigint", "index": 15, "name": "clicks", "comment": "The number of clicks the ad had on the given day."}, "impressions": {"type": "bigint", "index": 16, "name": "impressions", "comment": "The number of impressions the ad had on the given day."}, "spend": {"type": "double precision", "index": 17, "name": "spend", "comment": "The spend on the ad in the given day."}, "conversions": {"type": "double precision", "index": 18, "name": "conversions", "comment": "Total number of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n"}, "conversions_value": {"type": "double precision", "index": 19, "name": "conversions_value", "comment": "Total monetary value of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n"}, "onsite_conversion_purchase_conversions": {"type": "double precision", "index": 20, "name": "onsite_conversion_purchase_conversions", "comment": "Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_purchase_conversions_value": {"type": "double precision", "index": 21, "name": "onsite_conversion_purchase_conversions_value", "comment": "Monetary value of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_lead_grouped_conversions": {"type": "double precision", "index": 22, "name": "onsite_conversion_lead_grouped_conversions", "comment": "Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_lead_grouped_conversions_value": {"type": "double precision", "index": 23, "name": "onsite_conversion_lead_grouped_conversions_value", "comment": "Monetary value of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_purchase_conversions": {"type": "double precision", "index": 24, "name": "offsite_conversion_fb_pixel_purchase_conversions", "comment": "Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_purchase_conversions_value": {"type": "double precision", "index": 25, "name": "offsite_conversion_fb_pixel_purchase_conversions_value", "comment": "Monetary value of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_lead_conversions": {"type": "double precision", "index": 26, "name": "offsite_conversion_fb_pixel_lead_conversions", "comment": "Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_lead_conversions_value": {"type": "double precision", "index": 27, "name": "offsite_conversion_fb_pixel_lead_conversions_value", "comment": "Monetary value of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_custom_conversions": {"type": "double precision", "index": 28, "name": "offsite_conversion_fb_pixel_custom_conversions", "comment": "Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_custom_conversions_value": {"type": "double precision", "index": 29, "name": "offsite_conversion_fb_pixel_custom_conversions_value", "comment": "Monetary value of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.facebook_ads__ad_set_report"}, "model.facebook_ads.facebook_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "facebook_ads__campaign_report", "database": "postgres", "comment": "Each record represents the daily performance of a Facebook campaign.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": "The ID of the related account."}, "account_name": {"type": "character varying", "index": 4, "name": "account_name", "comment": "The name of the related account."}, "campaign_id": {"type": "bigint", "index": 5, "name": "campaign_id", "comment": "The ID of the related campaign."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the related campaign."}, "start_at": {"type": "timestamp without time zone", "index": 7, "name": "start_at", "comment": "Timestamp of designated campaign start time."}, "end_at": {"type": "timestamp without time zone", "index": 8, "name": "end_at", "comment": "Timestamp of designated campaign end time."}, "status": {"type": "text", "index": 9, "name": "status", "comment": "Status values are - 'ACTIVE', 'PAUSED', 'DELETED', 'ARCHIVED'."}, "daily_budget": {"type": "integer", "index": 10, "name": "daily_budget", "comment": "Daily budget of campaign."}, "lifetime_budget": {"type": "integer", "index": 11, "name": "lifetime_budget", "comment": "Lifetime budget of the campaign."}, "budget_remaining": {"type": "double precision", "index": 12, "name": "budget_remaining", "comment": "Remaining budget of campaign."}, "clicks": {"type": "bigint", "index": 13, "name": "clicks", "comment": "The number of clicks the ad had on the given day."}, "impressions": {"type": "bigint", "index": 14, "name": "impressions", "comment": "The number of impressions the ad had on the given day."}, "spend": {"type": "double precision", "index": 15, "name": "spend", "comment": "The spend on the ad in the given day."}, "conversions": {"type": "double precision", "index": 16, "name": "conversions", "comment": "Total number of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n"}, "conversions_value": {"type": "double precision", "index": 17, "name": "conversions_value", "comment": "Total monetary value of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n"}, "onsite_conversion_purchase_conversions": {"type": "double precision", "index": 18, "name": "onsite_conversion_purchase_conversions", "comment": "Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_purchase_conversions_value": {"type": "double precision", "index": 19, "name": "onsite_conversion_purchase_conversions_value", "comment": "Monetary value of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_lead_grouped_conversions": {"type": "double precision", "index": 20, "name": "onsite_conversion_lead_grouped_conversions", "comment": "Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_lead_grouped_conversions_value": {"type": "double precision", "index": 21, "name": "onsite_conversion_lead_grouped_conversions_value", "comment": "Monetary value of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_purchase_conversions": {"type": "double precision", "index": 22, "name": "offsite_conversion_fb_pixel_purchase_conversions", "comment": "Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_purchase_conversions_value": {"type": "double precision", "index": 23, "name": "offsite_conversion_fb_pixel_purchase_conversions_value", "comment": "Monetary value of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_lead_conversions": {"type": "double precision", "index": 24, "name": "offsite_conversion_fb_pixel_lead_conversions", "comment": "Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_lead_conversions_value": {"type": "double precision", "index": 25, "name": "offsite_conversion_fb_pixel_lead_conversions_value", "comment": "Monetary value of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_custom_conversions": {"type": "double precision", "index": 26, "name": "offsite_conversion_fb_pixel_custom_conversions", "comment": "Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_custom_conversions_value": {"type": "double precision", "index": 27, "name": "offsite_conversion_fb_pixel_custom_conversions_value", "comment": "Monetary value of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.facebook_ads__campaign_report"}, "model.facebook_ads.facebook_ads__country_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "facebook_ads__country_report", "database": "postgres", "comment": "Each record represents the daily performance of a Facebook account at the country level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "country_id": {"type": "text", "index": 3, "name": "country_id", "comment": "Fivetran-generated unique ID of the country."}, "country": {"type": "text", "index": 4, "name": "country", "comment": "Country whose ad performance is being reported on."}, "account_id": {"type": "bigint", "index": 5, "name": "account_id", "comment": "The ID of the related account."}, "account_name": {"type": "character varying", "index": 6, "name": "account_name", "comment": "The name of the related account."}, "account_business_country_code": {"type": "text", "index": 7, "name": "account_business_country_code", "comment": "Country code of business associated to account."}, "account_timezone": {"type": "text", "index": 8, "name": "account_timezone", "comment": "Timezone associated with account."}, "account_timezone_offset_hours_utc": {"type": "double precision", "index": 9, "name": "account_timezone_offset_hours_utc", "comment": "Time zone difference from UTC."}, "account_currency": {"type": "text", "index": 10, "name": "account_currency", "comment": "Currency associated with account."}, "account_min_daily_budget": {"type": "integer", "index": 11, "name": "account_min_daily_budget", "comment": "The minimum daily budget for this Ad Account."}, "impressions": {"type": "bigint", "index": 12, "name": "impressions", "comment": "The number of impressions the ad had on the given day."}, "clicks": {"type": "bigint", "index": 13, "name": "clicks", "comment": "The number of clicks the ad had on the given day."}, "spend": {"type": "double precision", "index": 14, "name": "spend", "comment": "The spend on the ad in the given day."}, "reach": {"type": "bigint", "index": 15, "name": "reach", "comment": "The number of people who saw any content from your Page or about your Page. This metric is estimated."}, "frequency": {"type": "double precision", "index": 16, "name": "frequency", "comment": "The average number of times each person saw your ads; it is calculated as impressions divided by reach."}, "conversions": {"type": "double precision", "index": 17, "name": "conversions", "comment": "Total number of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n"}, "onsite_conversion_purchase_conversions": {"type": "double precision", "index": 18, "name": "onsite_conversion_purchase_conversions", "comment": "Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_lead_grouped_conversions": {"type": "double precision", "index": 19, "name": "onsite_conversion_lead_grouped_conversions", "comment": "Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_purchase_conversions": {"type": "double precision", "index": 20, "name": "offsite_conversion_fb_pixel_purchase_conversions", "comment": "Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_lead_conversions": {"type": "double precision", "index": 21, "name": "offsite_conversion_fb_pixel_lead_conversions", "comment": "Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_custom_conversions": {"type": "double precision", "index": 22, "name": "offsite_conversion_fb_pixel_custom_conversions", "comment": "Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.facebook_ads__country_report"}, "model.facebook_ads.facebook_ads__region_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "facebook_ads__region_report", "database": "postgres", "comment": "Each record represents the daily performance of a Facebook account at the region level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "region_id": {"type": "text", "index": 3, "name": "region_id", "comment": "Fivetran-generated unique ID of the geographic region."}, "region": {"type": "text", "index": 4, "name": "region", "comment": "Geographic region whose ad performance is being reported on."}, "account_id": {"type": "bigint", "index": 5, "name": "account_id", "comment": "The ID of the related account."}, "account_name": {"type": "character varying", "index": 6, "name": "account_name", "comment": "The name of the related account."}, "account_business_state": {"type": "text", "index": 7, "name": "account_business_state", "comment": "State abbreviation for business address."}, "account_business_country_code": {"type": "text", "index": 8, "name": "account_business_country_code", "comment": "Country code of business associated to account."}, "account_timezone": {"type": "text", "index": 9, "name": "account_timezone", "comment": "Timezone associated with account."}, "account_timezone_offset_hours_utc": {"type": "double precision", "index": 10, "name": "account_timezone_offset_hours_utc", "comment": "Time zone difference from UTC."}, "account_currency": {"type": "text", "index": 11, "name": "account_currency", "comment": "Currency associated with account."}, "account_min_daily_budget": {"type": "integer", "index": 12, "name": "account_min_daily_budget", "comment": "The minimum daily budget for this Ad Account."}, "impressions": {"type": "bigint", "index": 13, "name": "impressions", "comment": "The number of impressions the ad had on the given day."}, "clicks": {"type": "bigint", "index": 14, "name": "clicks", "comment": "The number of clicks the ad had on the given day."}, "spend": {"type": "double precision", "index": 15, "name": "spend", "comment": "The spend on the ad in the given day."}, "reach": {"type": "bigint", "index": 16, "name": "reach", "comment": "The number of people who saw any content from your Page or about your Page. This metric is estimated."}, "frequency": {"type": "double precision", "index": 17, "name": "frequency", "comment": "The average number of times each person saw your ads; it is calculated as impressions divided by reach."}, "conversions": {"type": "double precision", "index": 18, "name": "conversions", "comment": "Total number of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n"}, "onsite_conversion_purchase_conversions": {"type": "double precision", "index": 19, "name": "onsite_conversion_purchase_conversions", "comment": "Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_lead_grouped_conversions": {"type": "double precision", "index": 20, "name": "onsite_conversion_lead_grouped_conversions", "comment": "Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_purchase_conversions": {"type": "double precision", "index": 21, "name": "offsite_conversion_fb_pixel_purchase_conversions", "comment": "Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_lead_conversions": {"type": "double precision", "index": 22, "name": "offsite_conversion_fb_pixel_lead_conversions", "comment": "Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_custom_conversions": {"type": "double precision", "index": 23, "name": "offsite_conversion_fb_pixel_custom_conversions", "comment": "Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.facebook_ads__region_report"}, "model.facebook_ads.facebook_ads__url_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "facebook_ads__url_report", "database": "postgres", "comment": "Each record represents the daily performance of a Facebook ad at the URL level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": "The ID of the related account."}, "account_name": {"type": "character varying", "index": 4, "name": "account_name", "comment": "The name of the related account."}, "campaign_id": {"type": "bigint", "index": 5, "name": "campaign_id", "comment": "The ID of the related campaign."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the related campaign."}, "ad_set_id": {"type": "bigint", "index": 7, "name": "ad_set_id", "comment": "The ID of the related ad set."}, "ad_set_name": {"type": "text", "index": 8, "name": "ad_set_name", "comment": "The name of the related ad set."}, "ad_id": {"type": "bigint", "index": 9, "name": "ad_id", "comment": "The ID of the related ad."}, "ad_name": {"type": "text", "index": 10, "name": "ad_name", "comment": "The name of the related ad."}, "creative_id": {"type": "bigint", "index": 11, "name": "creative_id", "comment": "The ID of the related creative."}, "creative_name": {"type": "text", "index": 12, "name": "creative_name", "comment": "The name of the related creative."}, "base_url": {"type": "text", "index": 13, "name": "base_url", "comment": "The base URL of the ad, extracted from the page_link and template_page_link."}, "url_host": {"type": "text", "index": 14, "name": "url_host", "comment": "The URL host of the ad, extracted from the page_link and template_page_link."}, "url_path": {"type": "text", "index": 15, "name": "url_path", "comment": "The URL path of the ad, extracted from the page_link and template_page_link."}, "utm_source": {"type": "text", "index": 16, "name": "utm_source", "comment": "The utm_source parameter of the ad, extracted from the page_link and template_page_link."}, "utm_medium": {"type": "text", "index": 17, "name": "utm_medium", "comment": "The utm_medium parameter of the ad, extracted from the page_link and template_page_link."}, "utm_campaign": {"type": "text", "index": 18, "name": "utm_campaign", "comment": "The utm_campaign parameter of the ad, extracted from the page_link and template_page_link."}, "utm_content": {"type": "text", "index": 19, "name": "utm_content", "comment": "The utm_content parameter of the ad, extracted from the page_link and template_page_link."}, "utm_term": {"type": "text", "index": 20, "name": "utm_term", "comment": "The utm_term parameter of the ad, extracted from the page_link and template_page_link."}, "clicks": {"type": "bigint", "index": 21, "name": "clicks", "comment": "The number of clicks the ad had on the given day."}, "impressions": {"type": "bigint", "index": 22, "name": "impressions", "comment": "The number of impressions the ad had on the given day."}, "spend": {"type": "double precision", "index": 23, "name": "spend", "comment": "The spend on the ad in the given day."}, "conversions": {"type": "double precision", "index": 24, "name": "conversions", "comment": "Total number of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n"}, "conversions_value": {"type": "double precision", "index": 25, "name": "conversions_value", "comment": "Total monetary value of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n"}, "onsite_conversion_purchase_conversions": {"type": "double precision", "index": 26, "name": "onsite_conversion_purchase_conversions", "comment": "Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_purchase_conversions_value": {"type": "double precision", "index": 27, "name": "onsite_conversion_purchase_conversions_value", "comment": "Monetary value of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_lead_grouped_conversions": {"type": "double precision", "index": 28, "name": "onsite_conversion_lead_grouped_conversions", "comment": "Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_lead_grouped_conversions_value": {"type": "double precision", "index": 29, "name": "onsite_conversion_lead_grouped_conversions_value", "comment": "Monetary value of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_purchase_conversions": {"type": "double precision", "index": 30, "name": "offsite_conversion_fb_pixel_purchase_conversions", "comment": "Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_purchase_conversions_value": {"type": "double precision", "index": 31, "name": "offsite_conversion_fb_pixel_purchase_conversions_value", "comment": "Monetary value of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_lead_conversions": {"type": "double precision", "index": 32, "name": "offsite_conversion_fb_pixel_lead_conversions", "comment": "Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_lead_conversions_value": {"type": "double precision", "index": 33, "name": "offsite_conversion_fb_pixel_lead_conversions_value", "comment": "Monetary value of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_custom_conversions": {"type": "double precision", "index": 34, "name": "offsite_conversion_fb_pixel_custom_conversions", "comment": "Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_custom_conversions_value": {"type": "double precision", "index": 35, "name": "offsite_conversion_fb_pixel_custom_conversions_value", "comment": "Monetary value of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.facebook_ads__url_report"}, "model.facebook_ads.facebook_ads__url_tags": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "facebook_ads__url_tags", "database": "postgres", "comment": "Each record is a unique combination of creative_id and corresponding key, value, type contained in the url_tags field", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "_fivetran_id": {"type": "text", "index": 2, "name": "_fivetran_id", "comment": "The unique fivetran ID for this record."}, "creative_id": {"type": "bigint", "index": 3, "name": "creative_id", "comment": "The associated creative_id for this record."}, "key": {"type": "text", "index": 4, "name": "key", "comment": "The url tag object name e.g. utm_source associated with this record."}, "value": {"type": "text", "index": 5, "name": "value", "comment": "The value assigned to the url tag object associated with this record."}, "type": {"type": "text", "index": 6, "name": "type", "comment": "The type assigned to the url tag object e.g. 'AD_VIDEO'."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.facebook_ads__url_tags"}, "model.google_ads.google_ads__account_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "google_ads__account_report", "database": "postgres", "comment": "Each record in this table represents the daily performance at the account level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date being reported on."}, "account_name": {"type": "integer", "index": 3, "name": "account_name", "comment": "The descriptive name of the Customer account."}, "account_id": {"type": "integer", "index": 4, "name": "account_id", "comment": "The Customer ID."}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": "The currency which the account uses."}, "auto_tagging_enabled": {"type": "boolean", "index": 6, "name": "auto_tagging_enabled", "comment": "Boolean indicating if the account uses auto tagging within ad urls."}, "time_zone": {"type": "integer", "index": 7, "name": "time_zone", "comment": "The time zone which the account is located."}, "spend": {"type": "numeric", "index": 8, "name": "spend", "comment": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "clicks": {"type": "bigint", "index": 9, "name": "clicks", "comment": "The number of clicks."}, "impressions": {"type": "bigint", "index": 10, "name": "impressions", "comment": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "conversions": {"type": "bigint", "index": 11, "name": "conversions", "comment": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business."}, "conversions_value": {"type": "bigint", "index": 12, "name": "conversions_value", "comment": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful."}, "view_through_conversions": {"type": "bigint", "index": 13, "name": "view_through_conversions", "comment": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.google_ads__account_report"}, "model.google_ads.google_ads__ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "google_ads__ad_group_report", "database": "postgres", "comment": "Each record in this table represents the daily performance at the ad group level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date being reported on."}, "account_name": {"type": "integer", "index": 3, "name": "account_name", "comment": "The descriptive name of the Customer account."}, "account_id": {"type": "integer", "index": 4, "name": "account_id", "comment": "The Customer ID."}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": "The currency which the account uses."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the Campaign."}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": "The ID of the Campaign."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "The name of the AdGroup."}, "ad_group_id": {"type": "text", "index": 9, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "ad_group_status": {"type": "text", "index": 10, "name": "ad_group_status", "comment": "The status of the ad group."}, "ad_group_type": {"type": "text", "index": 11, "name": "ad_group_type", "comment": "The type of ad group which is serving ads."}, "spend": {"type": "numeric", "index": 12, "name": "spend", "comment": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "clicks": {"type": "bigint", "index": 13, "name": "clicks", "comment": "The number of clicks."}, "impressions": {"type": "bigint", "index": 14, "name": "impressions", "comment": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "conversions": {"type": "double precision", "index": 15, "name": "conversions", "comment": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business."}, "conversions_value": {"type": "bigint", "index": 16, "name": "conversions_value", "comment": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful."}, "view_through_conversions": {"type": "bigint", "index": 17, "name": "view_through_conversions", "comment": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.google_ads__ad_group_report"}, "model.google_ads.google_ads__ad_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "google_ads__ad_report", "database": "postgres", "comment": "Each record in this table represents the daily performance at the ad level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date being reported on."}, "account_name": {"type": "integer", "index": 3, "name": "account_name", "comment": "The descriptive name of the Customer account."}, "account_id": {"type": "integer", "index": 4, "name": "account_id", "comment": "The Customer ID."}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": "The currency which the account uses."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the Campaign."}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": "The ID of the Campaign."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "The name of the AdGroup."}, "ad_group_id": {"type": "text", "index": 9, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "ad_id": {"type": "bigint", "index": 10, "name": "ad_id", "comment": "The unique identifier of the ad."}, "ad_name": {"type": "integer", "index": 11, "name": "ad_name", "comment": null}, "ad_status": {"type": "text", "index": 12, "name": "ad_status", "comment": "The status of the ad."}, "ad_type": {"type": "integer", "index": 13, "name": "ad_type", "comment": "The type of the ad that is being served."}, "display_url": {"type": "integer", "index": 14, "name": "display_url", "comment": "The url which is displayed with the ad."}, "source_final_urls": {"type": "text", "index": 15, "name": "source_final_urls", "comment": "The final urls that are used within the ad."}, "spend": {"type": "numeric", "index": 16, "name": "spend", "comment": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "clicks": {"type": "bigint", "index": 17, "name": "clicks", "comment": "The number of clicks."}, "impressions": {"type": "bigint", "index": 18, "name": "impressions", "comment": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "conversions": {"type": "bigint", "index": 19, "name": "conversions", "comment": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business."}, "conversions_value": {"type": "double precision", "index": 20, "name": "conversions_value", "comment": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful."}, "view_through_conversions": {"type": "bigint", "index": 21, "name": "view_through_conversions", "comment": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.google_ads__ad_report"}, "model.google_ads.google_ads__campaign_bid_modifiers_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "google_ads__campaign_bid_modifiers_report", "database": "postgres", "comment": "Each record in this table represents a specific bid modifier and its performance insights. Data is at the campaign-criterion grain since bid modifiers are campaign-level settings, and analysis focuses on overall modifier effectiveness. Campaigns with no bid modifiers will have a null criterion record.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_name": {"type": "integer", "index": 2, "name": "account_name", "comment": "The descriptive name of the Customer account."}, "account_id": {"type": "integer", "index": 3, "name": "account_id", "comment": "The Customer ID."}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": "The ID of the Campaign."}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "The name of the Campaign."}, "advertising_channel_type": {"type": "text", "index": 6, "name": "advertising_channel_type", "comment": "The type of advertising channel being used by the campaign."}, "advertising_channel_subtype": {"type": "text", "index": 7, "name": "advertising_channel_subtype", "comment": "The advertising channel subtype that is being used by the campaign."}, "campaign_status": {"type": "text", "index": 8, "name": "campaign_status", "comment": "General status of the campaign."}, "serving_status": {"type": "text", "index": 9, "name": "serving_status", "comment": "Status of the ads and how they are currently being served."}, "is_campaign_live": {"type": "boolean", "index": 10, "name": "is_campaign_live", "comment": "Boolean indicating if the campaign is both enabled and actively serving (campaign_status = 'ENABLED' and serving_status = 'SERVING')."}, "bidding_strategy_type": {"type": "text", "index": 11, "name": "bidding_strategy_type", "comment": "The type of bidding strategy (MANUAL_CPC, TARGET_CPA, etc.)."}, "target_cpa": {"type": "numeric", "index": 12, "name": "target_cpa", "comment": "Target cost per acquisition."}, "target_roas": {"type": "double precision", "index": 13, "name": "target_roas", "comment": "Target return on ad spend."}, "enhanced_cpc": {"type": "boolean", "index": 14, "name": "enhanced_cpc", "comment": "Boolean indicating if enhanced CPC is enabled."}, "manual_cpa": {"type": "double precision", "index": 15, "name": "manual_cpa", "comment": "Manual cost per acquisition setting."}, "manual_cpm": {"type": "double precision", "index": 16, "name": "manual_cpm", "comment": "Manual cost per mille setting."}, "manual_cpv": {"type": "double precision", "index": 17, "name": "manual_cpv", "comment": "Manual cost per view setting."}, "bidding_status": {"type": "text", "index": 18, "name": "bidding_status", "comment": "The status of the bidding strategy."}, "criterion_id": {"type": "bigint", "index": 19, "name": "criterion_id", "comment": "Unique identifier of the criterion that the bid modifier is applied to."}, "bid_modifier": {"type": "double precision", "index": 20, "name": "bid_modifier", "comment": "The modifier applied to the bid for this criterion."}, "interaction_type": {"type": "text", "index": 21, "name": "interaction_type", "comment": "The type of interaction for the bid modifier."}, "interaction_event_types": {"type": "text", "index": 22, "name": "interaction_event_types", "comment": "The event types for the interaction."}, "modifier_type": {"type": "text", "index": 23, "name": "modifier_type", "comment": "The type of modifier (device, location, age_range, gender, income_range, parental_status, audience, keyword, topic, placement, or other)."}, "modifier_direction": {"type": "text", "index": 24, "name": "modifier_direction", "comment": "Direction of the modifier (positive adjustment, negative adjustment, no adjustment, no modifier set)."}, "modifier_change": {"type": "double precision", "index": 25, "name": "modifier_change", "comment": "The bid modifier change as a decimal (bid_modifier - 1)."}, "total_spend": {"type": "numeric", "index": 26, "name": "total_spend", "comment": "Total spend in the last 30 days."}, "avg_ctr": {"type": "bigint", "index": 27, "name": "avg_ctr", "comment": "Average click-through rate as a decimal."}, "avg_cpc": {"type": "numeric", "index": 28, "name": "avg_cpc", "comment": "Average cost per click."}, "calculated_observation": {"type": "text", "index": 29, "name": "calculated_observation", "comment": "Performance observation that drives the recommendation based on configurable thresholds from individual low/high threshold variables like `google_ads__cpc_low`, `google_ads__cpc_high`, `google_ads__ctr_low`, `google_ads__ctr_high`, `google_ads__spend_low`, `google_ads__spend_high`, and `google_ads__bid_modifier_low`, `google_ads__bid_modifier_high`. Possible values include campaign disabled, campaign ended, not serving, high cpc, low ctr, high spend, manual bidding, disabled modifier, high positive modifier, significant negative modifier, high performance, high spend + poor performance, moderate performance, low spend, and normal performance."}, "calculated_recommendation": {"type": "text", "index": 30, "name": "calculated_recommendation", "comment": "Inferred action for bid modifier optimization based on dbt package logic and configurable threshold variables (Add modifiers, Review adjustments, Monitor performance, Monitor)."}, "calculated_priority": {"type": "text", "index": 31, "name": "calculated_priority", "comment": "Inferred priority level for focusing on most critical issues first (high, medium, low), derived from configurable performance threshold variables."}, "bid_modifier_report_key": {"type": "text", "index": 32, "name": "bid_modifier_report_key", "comment": "Surrogate key for the campaign bid modifiers report, combining source_relation, account_id, campaign_id, and criterion_id."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.google_ads__campaign_bid_modifiers_report"}, "model.google_ads.google_ads__campaign_budget_diagnostics_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "google_ads__campaign_budget_diagnostics_report", "database": "postgres", "comment": "Each record in this table represents a campaign's budget constraints and performance diagnostics.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date being reported on."}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": "The ID of the Campaign."}, "campaign_name": {"type": "text", "index": 4, "name": "campaign_name", "comment": "The name of the Campaign."}, "account_name": {"type": "integer", "index": 5, "name": "account_name", "comment": "The descriptive name of the Customer account."}, "account_id": {"type": "integer", "index": 6, "name": "account_id", "comment": "The Customer ID."}, "advertising_channel_type": {"type": "text", "index": 7, "name": "advertising_channel_type", "comment": "The type of advertising channel being used by the campaign."}, "advertising_channel_subtype": {"type": "text", "index": 8, "name": "advertising_channel_subtype", "comment": "The advertising channel subtype that is being used by the campaign."}, "campaign_status": {"type": "text", "index": 9, "name": "campaign_status", "comment": "General status of the campaign."}, "serving_status": {"type": "text", "index": 10, "name": "serving_status", "comment": "Status of the ads and how they are currently being served."}, "daily_budget": {"type": "numeric", "index": 11, "name": "daily_budget", "comment": "The daily budget amount for the campaign."}, "total_budget": {"type": "numeric", "index": 12, "name": "total_budget", "comment": "The total budget amount for lifetime campaigns."}, "budget_type": {"type": "text", "index": 13, "name": "budget_type", "comment": "The type of budget (DAILY, LIFETIME, etc.)."}, "budget_status": {"type": "text", "index": 14, "name": "budget_status", "comment": "The status of the budget."}, "has_recommended_budget": {"type": "boolean", "index": 15, "name": "has_recommended_budget", "comment": "Boolean indicating if Google has a recommended budget for this campaign."}, "recommended_daily_budget": {"type": "numeric", "index": 16, "name": "recommended_daily_budget", "comment": "Google's recommended daily budget when available, otherwise falls back to current daily budget for consistency."}, "bidding_strategy_type": {"type": "text", "index": 17, "name": "bidding_strategy_type", "comment": "The type of bidding strategy (MANUAL_CPC, TARGET_CPA, etc.)."}, "target_cpa": {"type": "numeric", "index": 18, "name": "target_cpa", "comment": "Target cost per acquisition."}, "target_roas": {"type": "double precision", "index": 19, "name": "target_roas", "comment": "Target return on ad spend."}, "enhanced_cpc": {"type": "boolean", "index": 20, "name": "enhanced_cpc", "comment": "Boolean indicating if enhanced CPC is enabled."}, "impressions": {"type": "bigint", "index": 21, "name": "impressions", "comment": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "spend": {"type": "numeric", "index": 22, "name": "spend", "comment": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "clicks": {"type": "bigint", "index": 23, "name": "clicks", "comment": "The number of clicks."}, "total_targeting_criteria": {"type": "bigint", "index": 24, "name": "total_targeting_criteria", "comment": "Total number of targeting criteria set for the campaign."}, "location_targeting_count": {"type": "bigint", "index": 25, "name": "location_targeting_count", "comment": "Number of location targeting criteria."}, "audience_targeting_count": {"type": "bigint", "index": 26, "name": "audience_targeting_count", "comment": "Number of audience targeting criteria."}, "location_targeting_breadth": {"type": "text", "index": 27, "name": "location_targeting_breadth", "comment": "Assessment of location targeting breadth - 'limited' (fewer than the low threshold), 'broad' (more than the high threshold), or 'normal'. Thresholds are configurable via google_ads__location_targeting_low and google_ads__location_targeting_high variables."}, "is_device_targeting": {"type": "boolean", "index": 28, "name": "is_device_targeting", "comment": "Boolean indicating if device targeting criteria are set."}, "is_audience_targeting": {"type": "boolean", "index": 29, "name": "is_audience_targeting", "comment": "Boolean indicating if audience targeting criteria are set."}, "ctr": {"type": "bigint", "index": 30, "name": "ctr", "comment": "The click-through rate. A ratio showing how often people who see your ad or free product listing end up clicking it. See more details [here](https://support.google.com/google-ads/answer/2615875?hl=en&ref_topic=24937&sjid=15681083914881504235-NC)."}, "budget_utilization": {"type": "numeric", "index": 31, "name": "budget_utilization", "comment": "Decimal representing budget utilization (spend / daily_budget)."}, "is_campaign_live": {"type": "boolean", "index": 32, "name": "is_campaign_live", "comment": "Boolean indicating if the campaign is both enabled and actively serving (campaign_status = 'ENABLED' and serving_status = 'SERVING')."}, "budget_increase_opportunity": {"type": "numeric", "index": 33, "name": "budget_increase_opportunity", "comment": "Dollar amount by which Google recommends increasing the daily budget (0 when Google has no recommendation)."}, "calculated_observation": {"type": "text", "index": 34, "name": "calculated_observation", "comment": "Performance observation that drives the budget recommendation based on configurable thresholds from `google_ads__budget_high_lows`, `google_ads__ctr_high_lows`, `google_ads__cpc_high_lows`, `google_ads__spend_high_lows`, `google_ads__location_targeting_high_lows`, and `google_ads__bid_modifier_high_lows` variables. Possible values include campaign disabled, campaign ended, not serving, budget constrained, budget + targeting constrained, targeting constrained, quality/relevance + targeting constrained, quality/relevance constrained, high spend + good performance, high spend + poor performance, moderate spend + normal performance, low spend + low budget utilization, low spend + budget constrained, low spend, no spend + no targeting, no spend, budget disabled, and normal."}, "calculated_recommendation": {"type": "text", "index": 35, "name": "calculated_recommendation", "comment": "Inferred action for budget optimization based on dbt package logic and configurable threshold variables (increase budget, optimize targeting/bids, improve relevance, etc.)."}, "calculated_priority": {"type": "text", "index": 36, "name": "calculated_priority", "comment": "Inferred priority level for focusing on most critical budget issues first (high, medium, low), derived from configurable performance threshold variables."}, "budget_diagnostics_report_key": {"type": "text", "index": 37, "name": "budget_diagnostics_report_key", "comment": "Surrogate key for the campaign budget diagnostics report, combining source_relation, account_id, campaign_id, and date_day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.google_ads__campaign_budget_diagnostics_report"}, "model.google_ads.google_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "google_ads__campaign_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of a campaign at the campaign/advertising_channel/advertising_channel_subtype level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date being reported on."}, "account_name": {"type": "integer", "index": 3, "name": "account_name", "comment": "The descriptive name of the Customer account."}, "account_id": {"type": "integer", "index": 4, "name": "account_id", "comment": "The Customer ID."}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": "The currency which the account uses."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the Campaign."}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": "The ID of the Campaign."}, "advertising_channel_type": {"type": "text", "index": 8, "name": "advertising_channel_type", "comment": "The channel type of the ads being served within the campaign."}, "advertising_channel_subtype": {"type": "text", "index": 9, "name": "advertising_channel_subtype", "comment": "The channel subtype of the ads being served within the campaign."}, "status": {"type": "text", "index": 10, "name": "status", "comment": "The status of the campaign."}, "serving_status": {"type": "text", "index": 11, "name": "serving_status", "comment": "Status of the ads and how they are currently being served."}, "spend": {"type": "numeric", "index": 12, "name": "spend", "comment": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "clicks": {"type": "bigint", "index": 13, "name": "clicks", "comment": "The number of clicks."}, "impressions": {"type": "bigint", "index": 14, "name": "impressions", "comment": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "conversions": {"type": "bigint", "index": 15, "name": "conversions", "comment": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business."}, "conversions_value": {"type": "bigint", "index": 16, "name": "conversions_value", "comment": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful."}, "view_through_conversions": {"type": "bigint", "index": 17, "name": "view_through_conversions", "comment": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column."}, "ctr": {"type": "bigint", "index": 18, "name": "ctr", "comment": "Click-through rate as a decimal, calculated as clicks / impressions. Shows ad relevance and engagement."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.google_ads__campaign_report"}, "model.google_ads.google_ads__keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "google_ads__keyword_report", "database": "postgres", "comment": "Each record in this table represents the daily performance at the ad group level for keywords.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date being reported on."}, "account_name": {"type": "integer", "index": 3, "name": "account_name", "comment": "The descriptive name of the Customer account."}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": "The Customer ID."}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": "The currency which the account uses."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the Campaign."}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": "The ID of the Campaign."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "The name of the AdGroup."}, "ad_group_id": {"type": "text", "index": 9, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "criterion_id": {"type": "bigint", "index": 10, "name": "criterion_id", "comment": "The unique identifier of the criterion being served."}, "type": {"type": "text", "index": 11, "name": "type", "comment": "The type of keyword ad being served."}, "status": {"type": "text", "index": 12, "name": "status", "comment": "The status of the keyword ads."}, "keyword_match_type": {"type": "text", "index": 13, "name": "keyword_match_type", "comment": "The match type criteria used for the keyword ads."}, "keyword_text": {"type": "text", "index": 14, "name": "keyword_text", "comment": "The specific keyword text that is used."}, "spend": {"type": "numeric", "index": 15, "name": "spend", "comment": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "clicks": {"type": "bigint", "index": 16, "name": "clicks", "comment": "The number of clicks."}, "impressions": {"type": "bigint", "index": 17, "name": "impressions", "comment": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "conversions": {"type": "bigint", "index": 18, "name": "conversions", "comment": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business."}, "conversions_value": {"type": "bigint", "index": 19, "name": "conversions_value", "comment": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful."}, "view_through_conversions": {"type": "bigint", "index": 20, "name": "view_through_conversions", "comment": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.google_ads__keyword_report"}, "model.google_ads.google_ads__search_term_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "google_ads__search_term_report", "database": "postgres", "comment": "Each record in this table represents the daily performance at the ad group level for search terms matching tracked keywords.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date being reported on."}, "account_name": {"type": "integer", "index": 3, "name": "account_name", "comment": "The descriptive name of the Customer account."}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": "The Customer ID."}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": "The currency which the account uses."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the Campaign."}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": "The ID of the Campaign."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "The name of the AdGroup."}, "ad_group_id": {"type": "text", "index": 9, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "search_term": {"type": "text", "index": 10, "name": "search_term", "comment": "A word or set of words a person enters when searching on Google or one of Google's Search Network sites"}, "keyword_text": {"type": "text", "index": 11, "name": "keyword_text", "comment": "The text of the keyword (at most 80 characters and 10 words)."}, "criterion_id": {"type": "text", "index": 12, "name": "criterion_id", "comment": "Reference to the ad group criterion used for the associated keyword. One `keyword_text` may have multiple `criterion_id` values."}, "search_term_match_type": {"type": "text", "index": 13, "name": "search_term_match_type", "comment": "How closely the search terms that triggered your ads on Google are related to the actual keywords in your account. Can be `BROAD` ,`EXACT`, `PHRASE`, `UNKNOWN`, or `UNSPECIFIED`.\n\nSee more details [here](https://support.google.com/google-ads/answer/7478529?sjid=15681083914881504235-NC&visit_id=638760377693438101-1187740487&rd=1)."}, "status": {"type": "text", "index": 14, "name": "status", "comment": "Indicates whether the search term is currently one of your targeted or excluded keywords. Possible values: `ADDED`, `ADDED_EXCLUDED`, `EXCLUDED`, `NONE`, `UNKNOWN`, or `UNSPECIFIED`"}, "spend": {"type": "numeric", "index": 15, "name": "spend", "comment": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "clicks": {"type": "bigint", "index": 16, "name": "clicks", "comment": "The number of clicks."}, "impressions": {"type": "bigint", "index": 17, "name": "impressions", "comment": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "conversions": {"type": "double precision", "index": 18, "name": "conversions", "comment": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business."}, "conversions_value": {"type": "double precision", "index": 19, "name": "conversions_value", "comment": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful."}, "view_through_conversions": {"type": "bigint", "index": 20, "name": "view_through_conversions", "comment": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.google_ads__search_term_report"}, "model.google_ads.google_ads__url_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "google_ads__url_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of URLs at the ad level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date being reported on."}, "account_name": {"type": "integer", "index": 3, "name": "account_name", "comment": "The descriptive name of the Customer account."}, "account_id": {"type": "integer", "index": 4, "name": "account_id", "comment": "The Customer ID."}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": "The currency which the account uses."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the Campaign."}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": "The ID of the Campaign."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "The name of the AdGroup."}, "ad_group_id": {"type": "text", "index": 9, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "ad_id": {"type": "bigint", "index": 10, "name": "ad_id", "comment": "The unique identifier of the ad."}, "base_url": {"type": "text", "index": 11, "name": "base_url", "comment": "The base URL of the ad, extracted from the `final_urls`."}, "url_host": {"type": "text", "index": 12, "name": "url_host", "comment": "The URL host of the ad, extracted from the `final_urls`."}, "url_path": {"type": "text", "index": 13, "name": "url_path", "comment": "The URL path of the ad, extracted from the `final_urls`."}, "utm_source": {"type": "text", "index": 14, "name": "utm_source", "comment": "The utm_source parameter of the ad, extracted from the `final_urls`."}, "utm_medium": {"type": "text", "index": 15, "name": "utm_medium", "comment": "The utm_medium parameter of the ad, extracted from the `final_urls`."}, "utm_campaign": {"type": "text", "index": 16, "name": "utm_campaign", "comment": "The utm_campaign parameter of the ad, extracted from the `final_urls`."}, "utm_content": {"type": "text", "index": 17, "name": "utm_content", "comment": "The utm_content parameter of the ad, extracted from the `final_urls`."}, "utm_term": {"type": "text", "index": 18, "name": "utm_term", "comment": "The utm_term parameter of the ad, extracted from the `final_urls`."}, "spend": {"type": "numeric", "index": 19, "name": "spend", "comment": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "clicks": {"type": "bigint", "index": 20, "name": "clicks", "comment": "The number of clicks."}, "impressions": {"type": "bigint", "index": 21, "name": "impressions", "comment": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "conversions": {"type": "bigint", "index": 22, "name": "conversions", "comment": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business."}, "conversions_value": {"type": "double precision", "index": 23, "name": "conversions_value", "comment": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful."}, "view_through_conversions": {"type": "bigint", "index": 24, "name": "view_through_conversions", "comment": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.google_ads__url_report"}, "model.amazon_ads.int_amazon_ads__portfolio_history": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "int_amazon_ads__portfolio_history", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "portfolio_id": {"type": "text", "index": 2, "name": "portfolio_id", "comment": null}, "budget_amount": {"type": "integer", "index": 3, "name": "budget_amount", "comment": null}, "budget_currency_code": {"type": "integer", "index": 4, "name": "budget_currency_code", "comment": null}, "budget_end_date": {"type": "integer", "index": 5, "name": "budget_end_date", "comment": null}, "budget_policy": {"type": "integer", "index": 6, "name": "budget_policy", "comment": null}, "budget_start_date": {"type": "integer", "index": 7, "name": "budget_start_date", "comment": null}, "creation_date": {"type": "text", "index": 8, "name": "creation_date", "comment": null}, "in_budget": {"type": "boolean", "index": 9, "name": "in_budget", "comment": null}, "last_updated_date": {"type": "text", "index": 10, "name": "last_updated_date", "comment": null}, "portfolio_name": {"type": "text", "index": 11, "name": "portfolio_name", "comment": null}, "profile_id": {"type": "text", "index": 12, "name": "profile_id", "comment": null}, "serving_status": {"type": "text", "index": 13, "name": "serving_status", "comment": null}, "state": {"type": "text", "index": 14, "name": "state", "comment": null}, "is_most_recent_record": {"type": "boolean", "index": 15, "name": "is_most_recent_record", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.int_amazon_ads__portfolio_history"}, "model.facebook_ads.int_facebook_ads__conversions": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "int_facebook_ads__conversions", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "ad_id": {"type": "bigint", "index": 2, "name": "ad_id", "comment": null}, "date_day": {"type": "date", "index": 3, "name": "date_day", "comment": null}, "conversions": {"type": "double precision", "index": 4, "name": "conversions", "comment": null}, "conversions_value": {"type": "double precision", "index": 5, "name": "conversions_value", "comment": null}, "onsite_conversion_purchase_conversions": {"type": "double precision", "index": 6, "name": "onsite_conversion_purchase_conversions", "comment": null}, "onsite_conversion_purchase_conversions_value": {"type": "double precision", "index": 7, "name": "onsite_conversion_purchase_conversions_value", "comment": null}, "onsite_conversion_lead_grouped_conversions": {"type": "double precision", "index": 8, "name": "onsite_conversion_lead_grouped_conversions", "comment": null}, "onsite_conversion_lead_grouped_conversions_value": {"type": "double precision", "index": 9, "name": "onsite_conversion_lead_grouped_conversions_value", "comment": null}, "offsite_conversion_fb_pixel_purchase_conversions": {"type": "double precision", "index": 10, "name": "offsite_conversion_fb_pixel_purchase_conversions", "comment": null}, "offsite_conversion_fb_pixel_purchase_conversions_value": {"type": "double precision", "index": 11, "name": "offsite_conversion_fb_pixel_purchase_conversions_value", "comment": null}, "offsite_conversion_fb_pixel_lead_conversions": {"type": "double precision", "index": 12, "name": "offsite_conversion_fb_pixel_lead_conversions", "comment": null}, "offsite_conversion_fb_pixel_lead_conversions_value": {"type": "double precision", "index": 13, "name": "offsite_conversion_fb_pixel_lead_conversions_value", "comment": null}, "offsite_conversion_fb_pixel_custom_conversions": {"type": "double precision", "index": 14, "name": "offsite_conversion_fb_pixel_custom_conversions", "comment": null}, "offsite_conversion_fb_pixel_custom_conversions_value": {"type": "double precision", "index": 15, "name": "offsite_conversion_fb_pixel_custom_conversions_value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.int_facebook_ads__conversions"}, "model.facebook_ads.int_facebook_ads__creative_history": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "int_facebook_ads__creative_history", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "_fivetran_id": {"type": "text", "index": 2, "name": "_fivetran_id", "comment": null}, "creative_id": {"type": "bigint", "index": 3, "name": "creative_id", "comment": null}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": null}, "creative_name": {"type": "text", "index": 5, "name": "creative_name", "comment": null}, "url": {"type": "character varying", "index": 6, "name": "url", "comment": null}, "base_url": {"type": "text", "index": 7, "name": "base_url", "comment": null}, "url_host": {"type": "text", "index": 8, "name": "url_host", "comment": null}, "url_path": {"type": "text", "index": 9, "name": "url_path", "comment": null}, "utm_source": {"type": "text", "index": 10, "name": "utm_source", "comment": null}, "utm_medium": {"type": "text", "index": 11, "name": "utm_medium", "comment": null}, "utm_campaign": {"type": "text", "index": 12, "name": "utm_campaign", "comment": null}, "utm_content": {"type": "text", "index": 13, "name": "utm_content", "comment": null}, "utm_term": {"type": "text", "index": 14, "name": "utm_term", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.int_facebook_ads__creative_history"}, "model.linkedin.linkedin_ads__account_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "linkedin_ads__account_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the account level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The day of the activity."}, "account_id": {"type": "integer", "index": 3, "name": "account_id", "comment": "Unique internal ID representing the account."}, "account_name": {"type": "text", "index": 4, "name": "account_name", "comment": "A label for the account."}, "version_tag": {"type": "numeric", "index": 5, "name": "version_tag", "comment": "An integer representation of the version of the account."}, "currency": {"type": "text", "index": 6, "name": "currency", "comment": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default)."}, "status": {"type": "text", "index": 7, "name": "status", "comment": "ACTIVE - Account is active; this is the default state\nCANCELLED - Account has been permanently cancelled\nDRAFT - Account is in draft status, meaning it's not yet fully set up and it is not serving\nPENDING_DELETION - Denotes that the account has been requested to be deleted that is currently pending\nREMOVED - Denotes that the account was deleted, but must remain fetchable due to the existence of performance data.\n"}, "type": {"type": "text", "index": 8, "name": "type", "comment": "BUSINESS - This is the only value allowed when creating accounts through the API.\nENTERPRISE - This value cannot be used to create accounts through the API and is reserved for accounts created by LinkedIn's internal ad operations systems.\n"}, "last_modified_at": {"type": "timestamp without time zone", "index": 9, "name": "last_modified_at", "comment": "The timestamp of when the version was updated."}, "created_at": {"type": "timestamp without time zone", "index": 10, "name": "created_at", "comment": "The timestamp of when the account was created."}, "total_conversions": {"type": "numeric", "index": 11, "name": "total_conversions", "comment": "The total conversions being brought in the conversion fields you select in your `linkedin_ads__conversion_fields`."}, "clicks": {"type": "bigint", "index": 12, "name": "clicks", "comment": "The count of chargeable clicks."}, "impressions": {"type": "bigint", "index": 13, "name": "impressions", "comment": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails."}, "cost": {"type": "double precision", "index": 14, "name": "cost", "comment": "The cost of the ads in the local currency or USD."}, "conversion_value_in_local_currency": {"type": "double precision", "index": 15, "name": "conversion_value_in_local_currency", "comment": "The value generated by your conversions, displayed in your LinkedIn account's local currency, on the given day."}, "external_website_conversions": {"type": "numeric", "index": 16, "name": "external_website_conversions", "comment": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads."}, "one_click_leads": {"type": "numeric", "index": 17, "name": "one_click_leads", "comment": "Leads submitted after clicking on LinkedIn ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.linkedin_ads__account_report"}, "model.linkedin.linkedin_ads__campaign_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "linkedin_ads__campaign_group_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the campaign group level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The day of the activity."}, "campaign_group_id": {"type": "integer", "index": 3, "name": "campaign_group_id", "comment": "Unique internal ID representing the campaign group."}, "campaign_group_name": {"type": "text", "index": 4, "name": "campaign_group_name", "comment": "A label for the campaign group."}, "account_id": {"type": "integer", "index": 5, "name": "account_id", "comment": "Unique internal ID representing the account."}, "account_name": {"type": "text", "index": 6, "name": "account_name", "comment": "A label for the account."}, "status": {"type": "text", "index": 7, "name": "status", "comment": "Status of campaign group. Possible values are: ACTIVE - Denotes that the campaign group is capable of serving ads, subject to run date and budget limitations (as well as any other limitations at the account or campaign level). ARCHIVED - Denotes that the campaign group is presently inactive, and should mostly be hidden in the UI until un-archived. CANCELLED - Denotes that the campaign group has been permanently canceled and cannot be reactivated. Not a settable status. DRAFT - Denotes that the campaign group is in a preliminary state and should temporarily not be served. PAUSED - Denotes that the campaign group meets all requirements to be served, but temporarily should not be. PENDING_DELETION - Denotes that the campaign group has been requested to be deleted that is currently pending. REMOVED - Denoted that the campaign group was deleted, but must remain fetchable due to the existence of performance data.\n"}, "currency": {"type": "text", "index": 8, "name": "currency", "comment": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default)."}, "is_backfilled": {"type": "boolean", "index": 9, "name": "is_backfilled", "comment": "Flag that denotes whether the campaign group was created organically or to backfill existing campaigns. This is a read-only field set by the system. Default = false."}, "run_schedule_start_at": {"type": "timestamp without time zone", "index": 10, "name": "run_schedule_start_at", "comment": "Represents the inclusive (greater than or equal to) date when to start running the associated campaigns under this campaign group. This field is required."}, "run_schedule_end_at": {"type": "timestamp without time zone", "index": 11, "name": "run_schedule_end_at", "comment": "Represents the exclusive (strictly less than) date when to stop running the associated campaigns under this campaign group. If this field is unset, it indicates an open range with no end date."}, "last_modified_at": {"type": "timestamp without time zone", "index": 12, "name": "last_modified_at", "comment": "The timestamp of when the version was updated."}, "created_at": {"type": "timestamp without time zone", "index": 13, "name": "created_at", "comment": "The timestamp of when the campaign group was created."}, "total_conversions": {"type": "numeric", "index": 14, "name": "total_conversions", "comment": "The total conversions being brought in the conversion fields you select in your `linkedin_ads__conversion_fields`."}, "clicks": {"type": "bigint", "index": 15, "name": "clicks", "comment": "The count of chargeable clicks."}, "impressions": {"type": "bigint", "index": 16, "name": "impressions", "comment": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails."}, "cost": {"type": "double precision", "index": 17, "name": "cost", "comment": "The cost of the ads in the local currency or USD."}, "conversion_value_in_local_currency": {"type": "double precision", "index": 18, "name": "conversion_value_in_local_currency", "comment": "The value generated by your conversions, displayed in your LinkedIn account's local currency, on the given day."}, "external_website_conversions": {"type": "numeric", "index": 19, "name": "external_website_conversions", "comment": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads."}, "one_click_leads": {"type": "numeric", "index": 20, "name": "one_click_leads", "comment": "Leads submitted after clicking on LinkedIn ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.linkedin_ads__campaign_group_report"}, "model.linkedin.linkedin_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "linkedin_ads__campaign_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the campaign level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The day of the activity."}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": "Unique internal ID representing the campaign."}, "campaign_name": {"type": "text", "index": 4, "name": "campaign_name", "comment": "A label for the campaign."}, "version_tag": {"type": "numeric", "index": 5, "name": "version_tag", "comment": "An integer representation of the version of the campaign."}, "campaign_group_id": {"type": "integer", "index": 6, "name": "campaign_group_id", "comment": "Unique internal ID representing the campaign group."}, "campaign_group_name": {"type": "text", "index": 7, "name": "campaign_group_name", "comment": "A label for the campaign group."}, "account_id": {"type": "integer", "index": 8, "name": "account_id", "comment": "Unique internal ID representing the account."}, "account_name": {"type": "text", "index": 9, "name": "account_name", "comment": "A label for the account."}, "campaign_status": {"type": "text", "index": 10, "name": "campaign_status", "comment": "ACTIVE - Denotes that the campaign is fully servable.\nPAUSED - Denotes that the campaign meets all requirements to be served, but temporarily should not be.\nARCHIVED - Denotes that the campaign is presently inactive, and should mostly be hidden in the UI until un-archived.\nCOMPLETED - Denotes that the campaign has reached a specified budgetary or chronological limit.\nCANCELED - Denotes that the campaign has been permanently canceled, such as when an advertising account is permanently closed.\nDRAFT - Denotes that the campaign is still being edited and not eligible for serving. Some validation will be postponed until the campaign is activated.\nPENDING_DELETION - Denotes that the campaign has been requested to be deleted that is currently pending.\nREMOVED - Denotes that the campaign was deleted, but must remain fetchable due to the existence of performance data.\n"}, "campaign_group_status": {"type": "text", "index": 11, "name": "campaign_group_status", "comment": "Status of campaign's campaign group. Possible values are: ACTIVE - Denotes that the campaign group is capable of serving ads, subject to run date and budget limitations (as well as any other limitations at the account or campaign level). ARCHIVED - Denotes that the campaign group is presently inactive, and should mostly be hidden in the UI until un-archived. CANCELLED - Denotes that the campaign group has been permanently canceled and cannot be reactivated. Not a settable status. DRAFT - Denotes that the campaign group is in a preliminary state and should temporarily not be served. PAUSED - Denotes that the campaign group meets all requirements to be served, but temporarily should not be. PENDING_DELETION - Denotes that the campaign group has been requested to be deleted that is currently pending. REMOVED - Denoted that the campaign group was deleted, but must remain fetchable due to the existence of performance data.\n"}, "type": {"type": "text", "index": 12, "name": "type", "comment": "TEXT_AD - Text-based ads that show up in the right column or top of the page on LinkedIn.\nSPONSORED_UPDATES - Native ads that promote a company's content updates in the LinkedIn feed.\nSPONSORED_INMAILS - Personalized messages with a call-to-action button delivered to a LinkedIn's member inbox.\nDYNAMIC - Ads that are dynamically personalized.\n"}, "cost_type": {"type": "text", "index": 13, "name": "cost_type", "comment": "CPM - Cost per thousand advertising impressions. If type=SPONSORED_INMAILS; cost per send(CPS) is measured as CPM x 1000.\nCPC- Cost per individual click on the associated link.\nCPV- Cost per view for video ads.\n"}, "creative_selection": {"type": "text", "index": 14, "name": "creative_selection", "comment": "ROUND_ROBIN - Rotate through available creatives to serve them as evenly as possible.\nOPTIMIZED (default) - Bias selection taking into account such as expected performance. Not available for Message and Conversation Ads (type=SPONSORED_INMAILS).\n"}, "daily_budget_amount": {"type": "double precision", "index": 15, "name": "daily_budget_amount", "comment": "Maximum amount to spend per day UTC. The amount of money as a real number string."}, "daily_budget_currency_code": {"type": "text", "index": 16, "name": "daily_budget_currency_code", "comment": "ISO currency code. The currency must match that of the parent account."}, "unit_cost_amount": {"type": "double precision", "index": 17, "name": "unit_cost_amount", "comment": "This value is used as one of the following: amount to bid (for manual bidding), amount which is the target cost (for target cost bidding) per click, impression, or other event depending on the pricing model, or cost cap (for cost cap bidding). The amount of money as a real number string. The amount should be non-negative if the bidding strategy is manual, target cost, or cost cap bidding. The default is 0 with the currency code set to match that of the associated account.\n"}, "unit_cost_currency_code": {"type": "text", "index": 18, "name": "unit_cost_currency_code", "comment": "Amount to bid per click, impression, or other event depending on the pricing model. The default is 0 with the currency code set to match that of the associated account. ISO currency code.\n"}, "currency": {"type": "text", "index": 19, "name": "currency", "comment": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default)."}, "format": {"type": "text", "index": 20, "name": "format", "comment": "The ad format on the campaign level. See https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads/campaign-formats?view=li-lms-2022-07"}, "locale_country": {"type": "text", "index": 21, "name": "locale_country", "comment": "Locale of the campaign. An uppercase two-letter country code as defined by ISO-3166."}, "locale_language": {"type": "text", "index": 22, "name": "locale_language", "comment": "Locale of the campaign. A lowercase two-letter language code as defined by ISO-639."}, "objective_type": {"type": "text", "index": 23, "name": "objective_type", "comment": "Campaign Objective type values. Click [here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ad-budget-pricing-type-combinations?view=li-lms-2022-07) for Campaign Objective descriptions. One of: - BRAND_AWARENESS - ENGAGEMENT - JOB_APPLICANTS - LEAD_GENERATION - WEBSITE_CONVERSIONS - WEBSITE_VISITS - VIDEO_VIEWS\n"}, "optimization_target_type": {"type": "text", "index": 24, "name": "optimization_target_type", "comment": "Determines how this campaign is optimized for spending. If this is not set, there is no optimization. Refer to the documentation here. Default = 'NONE'."}, "is_audience_expansion_enabled": {"type": "boolean", "index": 25, "name": "is_audience_expansion_enabled", "comment": "Boolean (default=false) representing whether Audience Expansion is enabled for the campaign provides query expansion for certain targeting criteria."}, "is_offsite_delivery_enabled": {"type": "boolean", "index": 26, "name": "is_offsite_delivery_enabled", "comment": "Boolean indicating if this campaign to allowed to be served on the LinkedIn Audience Network to extend the reach of your campaign by delivering ads beyond the LinkedIn feed to members on third-party apps and sites.\t(default will be \"True\" from June 30, 2022)\n"}, "run_schedule_start_at": {"type": "timestamp without time zone", "index": 27, "name": "run_schedule_start_at", "comment": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the inclusive (greater than or equal to) value in which to start the range."}, "run_schedule_end_at": {"type": "timestamp without time zone", "index": 28, "name": "run_schedule_end_at", "comment": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the exclusive (strictly less than) value in which to end the range, if provided.\n"}, "last_modified_at": {"type": "timestamp without time zone", "index": 29, "name": "last_modified_at", "comment": "The timestamp of when the version was updated."}, "created_at": {"type": "timestamp without time zone", "index": 30, "name": "created_at", "comment": "The timestamp of when the campaign was created."}, "total_conversions": {"type": "numeric", "index": 31, "name": "total_conversions", "comment": "The total conversions being brought in the conversion fields you select in your `linkedin_ads__conversion_fields`."}, "clicks": {"type": "bigint", "index": 32, "name": "clicks", "comment": "The count of chargeable clicks."}, "impressions": {"type": "bigint", "index": 33, "name": "impressions", "comment": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails."}, "cost": {"type": "double precision", "index": 34, "name": "cost", "comment": "The cost of the ads in the local currency or USD."}, "conversion_value_in_local_currency": {"type": "double precision", "index": 35, "name": "conversion_value_in_local_currency", "comment": "The value generated by your conversions, displayed in your LinkedIn account's local currency, on the given day."}, "external_website_conversions": {"type": "numeric", "index": 36, "name": "external_website_conversions", "comment": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads."}, "one_click_leads": {"type": "numeric", "index": 37, "name": "one_click_leads", "comment": "Leads submitted after clicking on LinkedIn ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.linkedin_ads__campaign_report"}, "model.linkedin.linkedin_ads__creative_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "linkedin_ads__creative_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the creative level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The day of the activity."}, "creative_id": {"type": "integer", "index": 3, "name": "creative_id", "comment": "Unique internal ID representing the creative."}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": "Unique internal ID representing the creative's campaign."}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "A label for the creative's campaign."}, "campaign_group_id": {"type": "integer", "index": 6, "name": "campaign_group_id", "comment": "Unique internal ID representing the campaign group."}, "campaign_group_name": {"type": "text", "index": 7, "name": "campaign_group_name", "comment": "A label for the campaign group."}, "account_id": {"type": "integer", "index": 8, "name": "account_id", "comment": "Unique internal ID representing the account."}, "account_name": {"type": "text", "index": 9, "name": "account_name", "comment": "A label for the account."}, "click_uri": {"type": "text", "index": 10, "name": "click_uri", "comment": "The URL where the member should be redirected to, on clicking the text ad or spotlight ad."}, "click_uri_type": {"type": "text", "index": 11, "name": "click_uri_type", "comment": "Will either be `text_ad`, `spotlight`, or `null` to indicate the origin of the click_uri."}, "creative_status": {"type": "text", "index": 12, "name": "creative_status", "comment": "ACTIVE - Creative creation is complete and creative is available for review and serve.\nPAUSED - Creative creation is complete and creative is current, but should temporarily not be served. This status is not valid upon creation.\nDRAFT - Creative creation is incomplete and may still be edited.\nARCHIVED - Creative creation is complete, but creative should not be served and should be separated from non-archived creatives in any UI.\nCANCELED - Creative is permanently canceled.\n"}, "campaign_status": {"type": "text", "index": 13, "name": "campaign_status", "comment": "ACTIVE - Denotes that the campaign is fully servable.\nPAUSED - Denotes that the campaign meets all requirements to be served, but temporarily should not be.\nARCHIVED - Denotes that the campaign is presently inactive, and should mostly be hidden in the UI until un-archived.\nCOMPLETED - Denotes that the campaign has reached a specified budgetary or chronological limit.\nCANCELED - Denotes that the campaign has been permanently canceled, such as when an advertising account is permanently closed.\nDRAFT - Denotes that the campaign is still being edited and not eligible for serving. Some validation will be postponed until the campaign is activated.\nPENDING_DELETION - Denotes that the campaign has been requested to be deleted that is currently pending.\nREMOVED - Denotes that the campaign was deleted, but must remain fetchable due to the existence of performance data.\n"}, "campaign_group_status": {"type": "text", "index": 14, "name": "campaign_group_status", "comment": "Status of campaign's campaign group. Possible values are: ACTIVE - Denotes that the campaign group is capable of serving ads, subject to run date and budget limitations (as well as any other limitations at the account or campaign level). ARCHIVED - Denotes that the campaign group is presently inactive, and should mostly be hidden in the UI until un-archived. CANCELLED - Denotes that the campaign group has been permanently canceled and cannot be reactivated. Not a settable status. DRAFT - Denotes that the campaign group is in a preliminary state and should temporarily not be served. PAUSED - Denotes that the campaign group meets all requirements to be served, but temporarily should not be. PENDING_DELETION - Denotes that the campaign group has been requested to be deleted that is currently pending. REMOVED - Denoted that the campaign group was deleted, but must remain fetchable due to the existence of performance data.\n"}, "currency": {"type": "text", "index": 15, "name": "currency", "comment": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default)."}, "last_modified_at": {"type": "timestamp without time zone", "index": 16, "name": "last_modified_at", "comment": "The timestamp of when the version was updated."}, "created_at": {"type": "timestamp without time zone", "index": 17, "name": "created_at", "comment": "The timestamp of when the creative was created."}, "total_conversions": {"type": "numeric", "index": 18, "name": "total_conversions", "comment": "The total conversions being brought in the conversion fields you select in your `linkedin_ads__conversion_fields`."}, "clicks": {"type": "bigint", "index": 19, "name": "clicks", "comment": "The count of chargeable clicks."}, "impressions": {"type": "bigint", "index": 20, "name": "impressions", "comment": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails."}, "cost": {"type": "bigint", "index": 21, "name": "cost", "comment": "The cost of the ads in the local currency or USD."}, "conversion_value_in_local_currency": {"type": "double precision", "index": 22, "name": "conversion_value_in_local_currency", "comment": "The value generated by your conversions, displayed in your LinkedIn account's local currency, on the given day."}, "external_website_conversions": {"type": "numeric", "index": 23, "name": "external_website_conversions", "comment": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads."}, "one_click_leads": {"type": "numeric", "index": 24, "name": "one_click_leads", "comment": "Leads submitted after clicking on LinkedIn ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.linkedin_ads__creative_report"}, "model.linkedin.linkedin_ads__monthly_campaign_country_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "linkedin_ads__monthly_campaign_country_report", "database": "postgres", "comment": "Each record in this table represents the monthly performance of a campaign at the country level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_month": {"type": "date", "index": 2, "name": "date_month", "comment": "The month of the activity."}, "country_name": {"type": "text", "index": 3, "name": "country_name", "comment": "Name of the country."}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": "Unique internal ID representing the campaign."}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "A label for the campaign."}, "version_tag": {"type": "numeric", "index": 6, "name": "version_tag", "comment": "An integer representation of the version of the campaign."}, "campaign_group_id": {"type": "integer", "index": 7, "name": "campaign_group_id", "comment": "Unique internal ID representing the campaign group."}, "campaign_group_name": {"type": "text", "index": 8, "name": "campaign_group_name", "comment": "A label for the campaign group."}, "account_id": {"type": "integer", "index": 9, "name": "account_id", "comment": "Unique internal ID representing the account."}, "account_name": {"type": "text", "index": 10, "name": "account_name", "comment": "A label for the account."}, "campaign_status": {"type": "text", "index": 11, "name": "campaign_status", "comment": "ACTIVE - Denotes that the campaign is fully servable.\nPAUSED - Denotes that the campaign meets all requirements to be served, but temporarily should not be.\nARCHIVED - Denotes that the campaign is presently inactive, and should mostly be hidden in the UI until un-archived.\nCOMPLETED - Denotes that the campaign has reached a specified budgetary or chronological limit.\nCANCELED - Denotes that the campaign has been permanently canceled, such as when an advertising account is permanently closed.\nDRAFT - Denotes that the campaign is still being edited and not eligible for serving. Some validation will be postponed until the campaign is activated.\nPENDING_DELETION - Denotes that the campaign has been requested to be deleted that is currently pending.\nREMOVED - Denotes that the campaign was deleted, but must remain fetchable due to the existence of performance data.\n"}, "campaign_group_status": {"type": "text", "index": 12, "name": "campaign_group_status", "comment": "Status of campaign's campaign group. Possible values are: ACTIVE - Denotes that the campaign group is capable of serving ads, subject to run date and budget limitations (as well as any other limitations at the account or campaign level). ARCHIVED - Denotes that the campaign group is presently inactive, and should mostly be hidden in the UI until un-archived. CANCELLED - Denotes that the campaign group has been permanently canceled and cannot be reactivated. Not a settable status. DRAFT - Denotes that the campaign group is in a preliminary state and should temporarily not be served. PAUSED - Denotes that the campaign group meets all requirements to be served, but temporarily should not be. PENDING_DELETION - Denotes that the campaign group has been requested to be deleted that is currently pending. REMOVED - Denoted that the campaign group was deleted, but must remain fetchable due to the existence of performance data.\n"}, "campaign_type": {"type": "text", "index": 13, "name": "campaign_type", "comment": "TEXT_AD - Text-based ads that show up in the right column or top of the page on LinkedIn.\nSPONSORED_UPDATES - Native ads that promote a company's content updates in the LinkedIn feed.\nSPONSORED_INMAILS - Personalized messages with a call-to-action button delivered to a LinkedIn's member inbox.\nDYNAMIC - Ads that are dynamically personalized.\n"}, "cost_type": {"type": "text", "index": 14, "name": "cost_type", "comment": "CPM - Cost per thousand advertising impressions. If type=SPONSORED_INMAILS; cost per send(CPS) is measured as CPM x 1000.\nCPC- Cost per individual click on the associated link.\nCPV- Cost per view for video ads.\n"}, "creative_selection": {"type": "text", "index": 15, "name": "creative_selection", "comment": "ROUND_ROBIN - Rotate through available creatives to serve them as evenly as possible.\nOPTIMIZED (default) - Bias selection taking into account such as expected performance. Not available for Message and Conversation Ads (type=SPONSORED_INMAILS).\n"}, "daily_budget_amount": {"type": "double precision", "index": 16, "name": "daily_budget_amount", "comment": "Maximum amount to spend per day UTC. The amount of money as a real number string."}, "daily_budget_currency_code": {"type": "text", "index": 17, "name": "daily_budget_currency_code", "comment": "ISO currency code. The currency must match that of the parent account."}, "unit_cost_amount": {"type": "double precision", "index": 18, "name": "unit_cost_amount", "comment": "This value is used as one of the following: amount to bid (for manual bidding), amount which is the target cost (for target cost bidding) per click, impression, or other event depending on the pricing model, or cost cap (for cost cap bidding). The amount of money as a real number string. The amount should be non-negative if the bidding strategy is manual, target cost, or cost cap bidding. The default is 0 with the currency code set to match that of the associated account.\n"}, "unit_cost_currency_code": {"type": "text", "index": 19, "name": "unit_cost_currency_code", "comment": "Amount to bid per click, impression, or other event depending on the pricing model. The default is 0 with the currency code set to match that of the associated account. ISO currency code.\n"}, "account_currency": {"type": "text", "index": 20, "name": "account_currency", "comment": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default)."}, "format": {"type": "text", "index": 21, "name": "format", "comment": "The ad format on the campaign level. See https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads/campaign-formats?view=li-lms-2022-07"}, "campaign_locale_country": {"type": "text", "index": 22, "name": "campaign_locale_country", "comment": "Locale of the campaign. An uppercase two-letter country code as defined by ISO-3166."}, "campaign_locale_language": {"type": "text", "index": 23, "name": "campaign_locale_language", "comment": "Locale of the campaign. A lowercase two-letter language code as defined by ISO-639."}, "objective_type": {"type": "text", "index": 24, "name": "objective_type", "comment": "Campaign Objective type values. Click [here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ad-budget-pricing-type-combinations?view=li-lms-2022-07) for Campaign Objective descriptions. One of: - BRAND_AWARENESS - ENGAGEMENT - JOB_APPLICANTS - LEAD_GENERATION - WEBSITE_CONVERSIONS - WEBSITE_VISITS - VIDEO_VIEWS\n"}, "optimization_target_type": {"type": "text", "index": 25, "name": "optimization_target_type", "comment": "Determines how this campaign is optimized for spending. If this is not set, there is no optimization. Refer to the documentation here. Default = 'NONE'."}, "is_audience_expansion_enabled": {"type": "boolean", "index": 26, "name": "is_audience_expansion_enabled", "comment": "Boolean (default=false) representing whether Audience Expansion is enabled for the campaign provides query expansion for certain targeting criteria."}, "is_offsite_delivery_enabled": {"type": "boolean", "index": 27, "name": "is_offsite_delivery_enabled", "comment": "Boolean indicating if this campaign to allowed to be served on the LinkedIn Audience Network to extend the reach of your campaign by delivering ads beyond the LinkedIn feed to members on third-party apps and sites.\t(default will be \"True\" from June 30, 2022)\n"}, "run_schedule_start_at": {"type": "timestamp without time zone", "index": 28, "name": "run_schedule_start_at", "comment": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the inclusive (greater than or equal to) value in which to start the range."}, "run_schedule_end_at": {"type": "timestamp without time zone", "index": 29, "name": "run_schedule_end_at", "comment": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the exclusive (strictly less than) value in which to end the range, if provided.\n"}, "last_modified_at": {"type": "timestamp without time zone", "index": 30, "name": "last_modified_at", "comment": "The timestamp of when the version was updated."}, "created_at": {"type": "timestamp without time zone", "index": 31, "name": "created_at", "comment": "The timestamp of when the campaign was created."}, "total_conversions": {"type": "numeric", "index": 32, "name": "total_conversions", "comment": "The total conversions being brought in the conversion fields you select in your `linkedin_ads__conversion_fields`."}, "clicks": {"type": "bigint", "index": 33, "name": "clicks", "comment": "The count of chargeable clicks."}, "impressions": {"type": "bigint", "index": 34, "name": "impressions", "comment": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails."}, "cost": {"type": "numeric", "index": 35, "name": "cost", "comment": "The cost of the ads in the local currency or USD."}, "conversion_value_in_local_currency": {"type": "double precision", "index": 36, "name": "conversion_value_in_local_currency", "comment": "The value generated by your conversions, displayed in your LinkedIn account's local currency, on the given day."}, "external_website_conversions": {"type": "numeric", "index": 37, "name": "external_website_conversions", "comment": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads."}, "one_click_leads": {"type": "numeric", "index": 38, "name": "one_click_leads", "comment": "Leads submitted after clicking on LinkedIn ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.linkedin_ads__monthly_campaign_country_report"}, "model.linkedin.linkedin_ads__monthly_campaign_region_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "linkedin_ads__monthly_campaign_region_report", "database": "postgres", "comment": "Each record in this table represents the monthly performance of a campaign at the country level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_month": {"type": "date", "index": 2, "name": "date_month", "comment": "The month of the activity."}, "region_name": {"type": "text", "index": 3, "name": "region_name", "comment": "Name of the region."}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": "Unique internal ID representing the campaign."}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "A label for the campaign."}, "version_tag": {"type": "numeric", "index": 6, "name": "version_tag", "comment": "An integer representation of the version of the campaign."}, "campaign_group_id": {"type": "integer", "index": 7, "name": "campaign_group_id", "comment": "Unique internal ID representing the campaign group."}, "campaign_group_name": {"type": "text", "index": 8, "name": "campaign_group_name", "comment": "A label for the campaign group."}, "account_id": {"type": "integer", "index": 9, "name": "account_id", "comment": "Unique internal ID representing the account."}, "account_name": {"type": "text", "index": 10, "name": "account_name", "comment": "A label for the account."}, "campaign_status": {"type": "text", "index": 11, "name": "campaign_status", "comment": "ACTIVE - Denotes that the campaign is fully servable.\nPAUSED - Denotes that the campaign meets all requirements to be served, but temporarily should not be.\nARCHIVED - Denotes that the campaign is presently inactive, and should mostly be hidden in the UI until un-archived.\nCOMPLETED - Denotes that the campaign has reached a specified budgetary or chronological limit.\nCANCELED - Denotes that the campaign has been permanently canceled, such as when an advertising account is permanently closed.\nDRAFT - Denotes that the campaign is still being edited and not eligible for serving. Some validation will be postponed until the campaign is activated.\nPENDING_DELETION - Denotes that the campaign has been requested to be deleted that is currently pending.\nREMOVED - Denotes that the campaign was deleted, but must remain fetchable due to the existence of performance data.\n"}, "campaign_group_status": {"type": "text", "index": 12, "name": "campaign_group_status", "comment": "Status of campaign's campaign group. Possible values are: ACTIVE - Denotes that the campaign group is capable of serving ads, subject to run date and budget limitations (as well as any other limitations at the account or campaign level). ARCHIVED - Denotes that the campaign group is presently inactive, and should mostly be hidden in the UI until un-archived. CANCELLED - Denotes that the campaign group has been permanently canceled and cannot be reactivated. Not a settable status. DRAFT - Denotes that the campaign group is in a preliminary state and should temporarily not be served. PAUSED - Denotes that the campaign group meets all requirements to be served, but temporarily should not be. PENDING_DELETION - Denotes that the campaign group has been requested to be deleted that is currently pending. REMOVED - Denoted that the campaign group was deleted, but must remain fetchable due to the existence of performance data.\n"}, "campaign_type": {"type": "text", "index": 13, "name": "campaign_type", "comment": "TEXT_AD - Text-based ads that show up in the right column or top of the page on LinkedIn.\nSPONSORED_UPDATES - Native ads that promote a company's content updates in the LinkedIn feed.\nSPONSORED_INMAILS - Personalized messages with a call-to-action button delivered to a LinkedIn's member inbox.\nDYNAMIC - Ads that are dynamically personalized.\n"}, "cost_type": {"type": "text", "index": 14, "name": "cost_type", "comment": "CPM - Cost per thousand advertising impressions. If type=SPONSORED_INMAILS; cost per send(CPS) is measured as CPM x 1000.\nCPC- Cost per individual click on the associated link.\nCPV- Cost per view for video ads.\n"}, "creative_selection": {"type": "text", "index": 15, "name": "creative_selection", "comment": "ROUND_ROBIN - Rotate through available creatives to serve them as evenly as possible.\nOPTIMIZED (default) - Bias selection taking into account such as expected performance. Not available for Message and Conversation Ads (type=SPONSORED_INMAILS).\n"}, "daily_budget_amount": {"type": "double precision", "index": 16, "name": "daily_budget_amount", "comment": "Maximum amount to spend per day UTC. The amount of money as a real number string."}, "daily_budget_currency_code": {"type": "text", "index": 17, "name": "daily_budget_currency_code", "comment": "ISO currency code. The currency must match that of the parent account."}, "unit_cost_amount": {"type": "double precision", "index": 18, "name": "unit_cost_amount", "comment": "This value is used as one of the following: amount to bid (for manual bidding), amount which is the target cost (for target cost bidding) per click, impression, or other event depending on the pricing model, or cost cap (for cost cap bidding). The amount of money as a real number string. The amount should be non-negative if the bidding strategy is manual, target cost, or cost cap bidding. The default is 0 with the currency code set to match that of the associated account.\n"}, "unit_cost_currency_code": {"type": "text", "index": 19, "name": "unit_cost_currency_code", "comment": "Amount to bid per click, impression, or other event depending on the pricing model. The default is 0 with the currency code set to match that of the associated account. ISO currency code.\n"}, "account_currency": {"type": "text", "index": 20, "name": "account_currency", "comment": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default)."}, "format": {"type": "text", "index": 21, "name": "format", "comment": "The ad format on the campaign level. See https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads/campaign-formats?view=li-lms-2022-07"}, "campaign_locale_country": {"type": "text", "index": 22, "name": "campaign_locale_country", "comment": "Locale of the campaign. An uppercase two-letter country code as defined by ISO-3166."}, "campaign_locale_language": {"type": "text", "index": 23, "name": "campaign_locale_language", "comment": "Locale of the campaign. A lowercase two-letter language code as defined by ISO-639."}, "objective_type": {"type": "text", "index": 24, "name": "objective_type", "comment": "Campaign Objective type values. Click [here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ad-budget-pricing-type-combinations?view=li-lms-2022-07) for Campaign Objective descriptions. One of: - BRAND_AWARENESS - ENGAGEMENT - JOB_APPLICANTS - LEAD_GENERATION - WEBSITE_CONVERSIONS - WEBSITE_VISITS - VIDEO_VIEWS\n"}, "optimization_target_type": {"type": "text", "index": 25, "name": "optimization_target_type", "comment": "Determines how this campaign is optimized for spending. If this is not set, there is no optimization. Refer to the documentation here. Default = 'NONE'."}, "is_audience_expansion_enabled": {"type": "boolean", "index": 26, "name": "is_audience_expansion_enabled", "comment": "Boolean (default=false) representing whether Audience Expansion is enabled for the campaign provides query expansion for certain targeting criteria."}, "is_offsite_delivery_enabled": {"type": "boolean", "index": 27, "name": "is_offsite_delivery_enabled", "comment": "Boolean indicating if this campaign to allowed to be served on the LinkedIn Audience Network to extend the reach of your campaign by delivering ads beyond the LinkedIn feed to members on third-party apps and sites.\t(default will be \"True\" from June 30, 2022)\n"}, "run_schedule_start_at": {"type": "timestamp without time zone", "index": 28, "name": "run_schedule_start_at", "comment": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the inclusive (greater than or equal to) value in which to start the range."}, "run_schedule_end_at": {"type": "timestamp without time zone", "index": 29, "name": "run_schedule_end_at", "comment": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the exclusive (strictly less than) value in which to end the range, if provided.\n"}, "last_modified_at": {"type": "timestamp without time zone", "index": 30, "name": "last_modified_at", "comment": "The timestamp of when the version was updated."}, "created_at": {"type": "timestamp without time zone", "index": 31, "name": "created_at", "comment": "The timestamp of when the campaign was created."}, "total_conversions": {"type": "numeric", "index": 32, "name": "total_conversions", "comment": "The total conversions being brought in the conversion fields you select in your `linkedin_ads__conversion_fields`."}, "clicks": {"type": "bigint", "index": 33, "name": "clicks", "comment": "The count of chargeable clicks."}, "impressions": {"type": "bigint", "index": 34, "name": "impressions", "comment": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails."}, "cost": {"type": "numeric", "index": 35, "name": "cost", "comment": "The cost of the ads in the local currency or USD."}, "conversion_value_in_local_currency": {"type": "double precision", "index": 36, "name": "conversion_value_in_local_currency", "comment": "The value generated by your conversions, displayed in your LinkedIn account's local currency, on the given day."}, "external_website_conversions": {"type": "numeric", "index": 37, "name": "external_website_conversions", "comment": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads."}, "one_click_leads": {"type": "numeric", "index": 38, "name": "one_click_leads", "comment": "Leads submitted after clicking on LinkedIn ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.linkedin_ads__monthly_campaign_region_report"}, "model.linkedin.linkedin_ads__url_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "linkedin_ads__url_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the url level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The day of the activity."}, "click_uri": {"type": "text", "index": 3, "name": "click_uri", "comment": "The URL where the member should be redirected to, on clicking the text ad or spotlight ad."}, "click_uri_type": {"type": "text", "index": 4, "name": "click_uri_type", "comment": "Will either be `text_ad`, `spotlight`, or `null` to indicate the origin of the click_uri."}, "base_url": {"type": "text", "index": 5, "name": "base_url", "comment": "The base URL of the ad, extracted from the `click_uri`."}, "url_host": {"type": "text", "index": 6, "name": "url_host", "comment": "The URL host of the ad, extracted from the `click_uri`."}, "url_path": {"type": "text", "index": 7, "name": "url_path", "comment": "The URL path of the ad, extracted from the `click_uri`."}, "utm_source": {"type": "text", "index": 8, "name": "utm_source", "comment": "The utm_source parameter of the ad, extracted from the `click_uri`."}, "utm_medium": {"type": "text", "index": 9, "name": "utm_medium", "comment": "The utm_medium parameter of the ad, extracted from the `click_uri`."}, "utm_campaign": {"type": "text", "index": 10, "name": "utm_campaign", "comment": "The utm_campaign parameter of the ad, extracted from the `click_uri`."}, "utm_content": {"type": "text", "index": 11, "name": "utm_content", "comment": "The utm_content parameter of the ad, extracted from the `click_uri`."}, "utm_term": {"type": "text", "index": 12, "name": "utm_term", "comment": "The utm_term parameter of the ad, extracted from the `click_uri`."}, "creative_id": {"type": "integer", "index": 13, "name": "creative_id", "comment": "Unique internal ID representing the creative."}, "campaign_id": {"type": "integer", "index": 14, "name": "campaign_id", "comment": "Unique internal ID representing the creative's campaign."}, "campaign_name": {"type": "text", "index": 15, "name": "campaign_name", "comment": "A label for the creative's campaign."}, "campaign_group_id": {"type": "integer", "index": 16, "name": "campaign_group_id", "comment": "Unique internal ID representing the campaign group."}, "campaign_group_name": {"type": "text", "index": 17, "name": "campaign_group_name", "comment": "A label for the campaign group."}, "account_id": {"type": "integer", "index": 18, "name": "account_id", "comment": "Unique internal ID representing the account."}, "account_name": {"type": "text", "index": 19, "name": "account_name", "comment": "A label for the account."}, "currency": {"type": "text", "index": 20, "name": "currency", "comment": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default)."}, "total_conversions": {"type": "numeric", "index": 21, "name": "total_conversions", "comment": "The total conversions being brought in the conversion fields you select in your `linkedin_ads__conversion_fields`."}, "clicks": {"type": "bigint", "index": 22, "name": "clicks", "comment": "The count of chargeable clicks."}, "impressions": {"type": "bigint", "index": 23, "name": "impressions", "comment": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails."}, "cost": {"type": "bigint", "index": 24, "name": "cost", "comment": "The cost of the ads in the local currency or USD."}, "conversion_value_in_local_currency": {"type": "double precision", "index": 25, "name": "conversion_value_in_local_currency", "comment": "The value generated by your conversions, displayed in your LinkedIn account's local currency, on the given day."}, "external_website_conversions": {"type": "numeric", "index": 26, "name": "external_website_conversions", "comment": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads."}, "one_click_leads": {"type": "numeric", "index": 27, "name": "one_click_leads", "comment": "Leads submitted after clicking on LinkedIn ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.linkedin_ads__url_report"}, "model.ad_reporting.metricflow_time_spine": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "metricflow_time_spine", "database": "postgres", "comment": "Metricflow time spine", "owner": "postgres"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.ad_reporting.metricflow_time_spine"}, "model.microsoft_ads.microsoft_ads__account_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__account_report", "database": "postgres", "comment": "Each record in this table represents the daily clicks, impressions, spend (and if applicable other passthrough metrics) of ads by account, account timezone, device os, device type, network and currency code.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "account_name": {"type": "character varying", "index": 3, "name": "account_name", "comment": "The name of the account."}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": "The ID of the account."}, "account_timezone": {"type": "text", "index": 5, "name": "account_timezone", "comment": "The time zone associated with this account."}, "device_os": {"type": "text", "index": 6, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 7, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 8, "name": "network", "comment": "The network associated with this record."}, "currency_code": {"type": "text", "index": 9, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "clicks": {"type": "bigint", "index": 10, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "bigint", "index": 11, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "double precision", "index": 12, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "bigint", "index": 13, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 14, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "bigint", "index": 15, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.microsoft_ads__account_report"}, "model.microsoft_ads.microsoft_ads__ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__ad_group_report", "database": "postgres", "comment": "Each record in this table represents the daily clicks, impressions, spend (and if applicable other passthrough metrics) of ads by ad group, campaign, account, device os, device type, network and currency code.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "account_name": {"type": "character varying", "index": 3, "name": "account_name", "comment": "The name of the account."}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": "The ID of the account."}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "The name of the campaign."}, "campaign_id": {"type": "bigint", "index": 6, "name": "campaign_id", "comment": "The ID of the campaign."}, "ad_group_name": {"type": "text", "index": 7, "name": "ad_group_name", "comment": "The name of the corresponding ad group."}, "ad_group_id": {"type": "bigint", "index": 8, "name": "ad_group_id", "comment": "The ID of the corresponding ad group."}, "device_os": {"type": "text", "index": 9, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 10, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 11, "name": "network", "comment": "The network associated with this record."}, "currency_code": {"type": "text", "index": 12, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "clicks": {"type": "bigint", "index": 13, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "bigint", "index": 14, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "double precision", "index": 15, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "bigint", "index": 16, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 17, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "bigint", "index": 18, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "all_conversions_value": {"type": "double precision", "index": 19, "name": "all_conversions_value", "comment": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.microsoft_ads__ad_group_report"}, "model.microsoft_ads.microsoft_ads__ad_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__ad_report", "database": "postgres", "comment": "Each record in this table represents the daily clicks, impressions, spend (and if applicable other passthrough metrics) of ads by ad, ad group, campaign, account, ad type, device os, device type, network and currency code.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "account_name": {"type": "character varying", "index": 3, "name": "account_name", "comment": "The name of the account."}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": "The ID of the account."}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "The name of the campaign."}, "campaign_id": {"type": "bigint", "index": 6, "name": "campaign_id", "comment": "The ID of the campaign."}, "ad_group_name": {"type": "text", "index": 7, "name": "ad_group_name", "comment": "The name of the corresponding ad group."}, "ad_group_id": {"type": "bigint", "index": 8, "name": "ad_group_id", "comment": "The ID of the corresponding ad group."}, "ad_name": {"type": "text", "index": 9, "name": "ad_name", "comment": "The name of the corresponding ad; `title_part_1` is used as the default ad name but you may customize this by using the `microsoft_ads__ad_name_selector` variable. For more information, refer to the [README](https://github.com/fivetran/dbt_microsoft_ads/blob/main/README.md#change-how-ad-name-is-determined)."}, "ad_id": {"type": "bigint", "index": 10, "name": "ad_id", "comment": "The ID of the corresponding ad."}, "ad_type": {"type": "text", "index": 11, "name": "ad_type", "comment": "The ad type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/adtype?view=bingads-13) for more information on values and definitions."}, "device_os": {"type": "text", "index": 12, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 13, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 14, "name": "network", "comment": "The network associated with this record."}, "currency_code": {"type": "text", "index": 15, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "clicks": {"type": "bigint", "index": 16, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "bigint", "index": 17, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "double precision", "index": 18, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "bigint", "index": 19, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 20, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "bigint", "index": 21, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "all_conversions_value": {"type": "double precision", "index": 22, "name": "all_conversions_value", "comment": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.microsoft_ads__ad_report"}, "model.microsoft_ads.microsoft_ads__campaign_country_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__campaign_country_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads by country, account, campaign, campaign type, campaign timezone, campaign status, device os, device type, network, and currency code.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "country": {"type": "text", "index": 3, "name": "country", "comment": "The country or region where the user was physically located when they clicked the ad."}, "account_name": {"type": "character varying", "index": 4, "name": "account_name", "comment": "The name of the account."}, "account_id": {"type": "bigint", "index": 5, "name": "account_id", "comment": "The ID of the account."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the campaign."}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": "The ID of the campaign."}, "campaign_type": {"type": "text", "index": 8, "name": "campaign_type", "comment": "The campaign type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaigntype?view=bingads-13) for more information on values and definitions."}, "campaign_timezone": {"type": "text", "index": 9, "name": "campaign_timezone", "comment": "The time zone associated with this campaign."}, "campaign_status": {"type": "text", "index": 10, "name": "campaign_status", "comment": "The status of this campaign; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaignstatus?view=bingads-13) for more information on values and definitions."}, "device_os": {"type": "text", "index": 11, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 12, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 13, "name": "network", "comment": "The network associated with this record."}, "currency_code": {"type": "text", "index": 14, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "location_id": {"type": "bigint", "index": 15, "name": "location_id", "comment": "The Microsoft Advertising identifier of the location where the user was physically located when they clicked the ad."}, "goal": {"type": "text", "index": 16, "name": "goal", "comment": "The name of the goal you set for the conversions you want, meaning actions customers take after clicking your ad."}, "geo_language": {"type": "text", "index": 17, "name": "geo_language", "comment": "The language of the publisher where the ad was shown."}, "campaign_budget": {"type": "double precision", "index": 18, "name": "campaign_budget", "comment": "The amount to spend daily across all campaigns that share the budget."}, "campaign_budget_id": {"type": "integer", "index": 19, "name": "campaign_budget_id", "comment": "The unique Microsoft Advertising identifier of the budget."}, "campaign_budget_type": {"type": "text", "index": 20, "name": "campaign_budget_type", "comment": "The budget type determines the pace at which the budget is spent throughout the day."}, "campaign_language": {"type": "text", "index": 21, "name": "campaign_language", "comment": "The language that the associated ad was viewed in."}, "clicks": {"type": "bigint", "index": 22, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "bigint", "index": 23, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "numeric", "index": 24, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "bigint", "index": 25, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 26, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "bigint", "index": 27, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "all_conversions_value": {"type": "double precision", "index": 28, "name": "all_conversions_value", "comment": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.microsoft_ads__campaign_country_report"}, "model.microsoft_ads.microsoft_ads__campaign_region_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__campaign_region_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads by state or region, account, campaign, campaign type, campaign timezone, campaign status, device os, device type, network, and currency code.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "region": {"type": "text", "index": 3, "name": "region", "comment": "The state or geographic region where the user was physically located when they clicked the ad."}, "country": {"type": "text", "index": 4, "name": "country", "comment": "The country or region where the user was physically located when they clicked the ad."}, "account_name": {"type": "character varying", "index": 5, "name": "account_name", "comment": "The name of the account."}, "account_id": {"type": "bigint", "index": 6, "name": "account_id", "comment": "The ID of the account."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the campaign."}, "campaign_id": {"type": "bigint", "index": 8, "name": "campaign_id", "comment": "The ID of the campaign."}, "campaign_type": {"type": "text", "index": 9, "name": "campaign_type", "comment": "The campaign type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaigntype?view=bingads-13) for more information on values and definitions."}, "campaign_timezone": {"type": "text", "index": 10, "name": "campaign_timezone", "comment": "The time zone associated with this campaign."}, "campaign_status": {"type": "text", "index": 11, "name": "campaign_status", "comment": "The status of this campaign; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaignstatus?view=bingads-13) for more information on values and definitions."}, "device_os": {"type": "text", "index": 12, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 13, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 14, "name": "network", "comment": "The network associated with this record."}, "currency_code": {"type": "text", "index": 15, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "location_id": {"type": "bigint", "index": 16, "name": "location_id", "comment": "The Microsoft Advertising identifier of the location where the user was physically located when they clicked the ad."}, "goal": {"type": "text", "index": 17, "name": "goal", "comment": "The name of the goal you set for the conversions you want, meaning actions customers take after clicking your ad."}, "geo_language": {"type": "text", "index": 18, "name": "geo_language", "comment": "The language of the publisher where the ad was shown."}, "campaign_budget": {"type": "double precision", "index": 19, "name": "campaign_budget", "comment": "The amount to spend daily across all campaigns that share the budget."}, "campaign_budget_id": {"type": "integer", "index": 20, "name": "campaign_budget_id", "comment": "The unique Microsoft Advertising identifier of the budget."}, "campaign_budget_type": {"type": "text", "index": 21, "name": "campaign_budget_type", "comment": "The budget type determines the pace at which the budget is spent throughout the day."}, "campaign_language": {"type": "text", "index": 22, "name": "campaign_language", "comment": "The language that the associated ad was viewed in."}, "clicks": {"type": "bigint", "index": 23, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "bigint", "index": 24, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "numeric", "index": 25, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "bigint", "index": 26, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 27, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "bigint", "index": 28, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "all_conversions_value": {"type": "double precision", "index": 29, "name": "all_conversions_value", "comment": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.microsoft_ads__campaign_region_report"}, "model.microsoft_ads.microsoft_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__campaign_report", "database": "postgres", "comment": "Each record in this table represents the daily clicks, impressions, spend (and if applicable other passthrough metrics) of ads by campaign, account, campaign type, campaign timezone, campaign status, device os, device type, network and currency code.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "account_name": {"type": "character varying", "index": 3, "name": "account_name", "comment": "The name of the account."}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": "The ID of the account."}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "The name of the campaign."}, "campaign_id": {"type": "bigint", "index": 6, "name": "campaign_id", "comment": "The ID of the campaign."}, "campaign_type": {"type": "text", "index": 7, "name": "campaign_type", "comment": "The campaign type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaigntype?view=bingads-13) for more information on values and definitions."}, "campaign_timezone": {"type": "text", "index": 8, "name": "campaign_timezone", "comment": "The time zone associated with this campaign."}, "campaign_status": {"type": "text", "index": 9, "name": "campaign_status", "comment": "The status of this campaign; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaignstatus?view=bingads-13) for more information on values and definitions."}, "device_os": {"type": "text", "index": 10, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 11, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 12, "name": "network", "comment": "The network associated with this record."}, "currency_code": {"type": "text", "index": 13, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "clicks": {"type": "bigint", "index": 14, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "bigint", "index": 15, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "double precision", "index": 16, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "bigint", "index": 17, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 18, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "bigint", "index": 19, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "all_conversions_value": {"type": "double precision", "index": 20, "name": "all_conversions_value", "comment": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.microsoft_ads__campaign_report"}, "model.microsoft_ads.microsoft_ads__keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__keyword_report", "database": "postgres", "comment": "Each record in this table represents the daily clicks, impressions, spend (and if applicable other passthrough metrics) of ads by keyword, ad, ad group, campaign, account, device os, device type, network and currency code.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "account_name": {"type": "character varying", "index": 3, "name": "account_name", "comment": "The name of the account."}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": "The ID of the account."}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "The name of the campaign."}, "campaign_id": {"type": "bigint", "index": 6, "name": "campaign_id", "comment": "The ID of the campaign."}, "ad_group_name": {"type": "text", "index": 7, "name": "ad_group_name", "comment": "The name of the corresponding ad group."}, "ad_group_id": {"type": "bigint", "index": 8, "name": "ad_group_id", "comment": "The ID of the corresponding ad group."}, "ad_name": {"type": "text", "index": 9, "name": "ad_name", "comment": "The name of the corresponding ad; `title_part_1` is used as the default ad name but you may customize this by using the `microsoft_ads__ad_name_selector` variable. For more information, refer to the [README](https://github.com/fivetran/dbt_microsoft_ads/blob/main/README.md#change-how-ad-name-is-determined)."}, "ad_id": {"type": "bigint", "index": 10, "name": "ad_id", "comment": "The ID of the corresponding ad."}, "keyword_name": {"type": "text", "index": 11, "name": "keyword_name", "comment": "The keyword(s) associated with this record."}, "keyword_id": {"type": "bigint", "index": 12, "name": "keyword_id", "comment": "The ID of the keyword."}, "match_type": {"type": "text", "index": 13, "name": "match_type", "comment": "The match type associated with this record; values contain but may not be limited to 'Broad', 'Exact', 'Phrase'. Please refer to Microsoft Ad's [documentation](https://help.ads.microsoft.com/#apex/ads/en/50822/1)."}, "device_os": {"type": "text", "index": 14, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 15, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 16, "name": "network", "comment": "The network associated with this record."}, "currency_code": {"type": "text", "index": 17, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "clicks": {"type": "bigint", "index": 18, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "bigint", "index": 19, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "double precision", "index": 20, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "bigint", "index": 21, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 22, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "bigint", "index": 23, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "all_conversions_value": {"type": "double precision", "index": 24, "name": "all_conversions_value", "comment": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.microsoft_ads__keyword_report"}, "model.microsoft_ads.microsoft_ads__search_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__search_report", "database": "postgres", "comment": "Each record in this table represents the daily clicks, impressions, spend (and if applicable other passthrough metrics) of ads by search query, keyword, ad, ad group, campaign, account, device os, device type and network.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "account_name": {"type": "character varying", "index": 3, "name": "account_name", "comment": "The name of the account."}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": "The ID of the account."}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "The name of the campaign."}, "campaign_id": {"type": "bigint", "index": 6, "name": "campaign_id", "comment": "The ID of the campaign."}, "ad_group_name": {"type": "text", "index": 7, "name": "ad_group_name", "comment": "The name of the corresponding ad group."}, "ad_group_id": {"type": "bigint", "index": 8, "name": "ad_group_id", "comment": "The ID of the corresponding ad group."}, "ad_name": {"type": "text", "index": 9, "name": "ad_name", "comment": "The name of the corresponding ad; `title_part_1` is used as the default ad name but you may customize this by using the `microsoft_ads__ad_name_selector` variable. For more information, refer to the [README](https://github.com/fivetran/dbt_microsoft_ads/blob/main/README.md#change-how-ad-name-is-determined)."}, "ad_id": {"type": "bigint", "index": 10, "name": "ad_id", "comment": "The ID of the corresponding ad."}, "keyword_id": {"type": "bigint", "index": 11, "name": "keyword_id", "comment": "The ID of the keyword."}, "keyword_name": {"type": "text", "index": 12, "name": "keyword_name", "comment": "The keyword(s) associated with this record."}, "match_type": {"type": "text", "index": 13, "name": "match_type", "comment": "The match type associated with this record; values contain but may not be limited to 'Broad', 'Exact', 'Phrase'. Please refer to Microsoft Ad's [documentation](https://help.ads.microsoft.com/#apex/ads/en/50822/1)."}, "search_query": {"type": "text", "index": 14, "name": "search_query", "comment": "The search query string associated with this record."}, "device_os": {"type": "text", "index": 15, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 16, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 17, "name": "network", "comment": "The network associated with this record."}, "clicks": {"type": "bigint", "index": 18, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "bigint", "index": 19, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "double precision", "index": 20, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "bigint", "index": 21, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 22, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "bigint", "index": 23, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "all_conversions_value": {"type": "double precision", "index": 24, "name": "all_conversions_value", "comment": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.microsoft_ads__search_report"}, "model.microsoft_ads.microsoft_ads__url_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__url_report", "database": "postgres", "comment": "Each record in this table represents the daily clicks, impressions, spend (and if applicable other passthrough metrics) of ads by ad, ad group, campaign, account, ad type, device os, device type, network, currency code, url and utm parameters.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "account_name": {"type": "character varying", "index": 3, "name": "account_name", "comment": "The name of the account."}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": "The ID of the account."}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "The name of the campaign."}, "campaign_id": {"type": "bigint", "index": 6, "name": "campaign_id", "comment": "The ID of the campaign."}, "ad_group_name": {"type": "text", "index": 7, "name": "ad_group_name", "comment": "The name of the corresponding ad group."}, "ad_group_id": {"type": "bigint", "index": 8, "name": "ad_group_id", "comment": "The ID of the corresponding ad group."}, "ad_name": {"type": "text", "index": 9, "name": "ad_name", "comment": "The name of the corresponding ad; `title_part_1` is used as the default ad name but you may customize this by using the `microsoft_ads__ad_name_selector` variable. For more information, refer to the [README](https://github.com/fivetran/dbt_microsoft_ads/blob/main/README.md#change-how-ad-name-is-determined)."}, "ad_id": {"type": "bigint", "index": 10, "name": "ad_id", "comment": "The ID of the corresponding ad."}, "device_os": {"type": "text", "index": 11, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 12, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 13, "name": "network", "comment": "The network associated with this record."}, "currency_code": {"type": "text", "index": 14, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "base_url": {"type": "text", "index": 15, "name": "base_url", "comment": "The base URL of the ad, extracted from the `final_url`."}, "url_host": {"type": "text", "index": 16, "name": "url_host", "comment": "The URL host of the ad, extracted from the `final_url`."}, "url_path": {"type": "text", "index": 17, "name": "url_path", "comment": "The URL path of the ad, extracted from the `final_url`."}, "utm_source": {"type": "text", "index": 18, "name": "utm_source", "comment": "The site that sent traffic to your page. Microsoft Advertising sets this to Bing; extracted from the `final_url`."}, "utm_medium": {"type": "text", "index": 19, "name": "utm_medium", "comment": "Which channel was used. Microsoft Advertising sets this to cp; extracted from the `final_url`."}, "utm_campaign": {"type": "text", "index": 20, "name": "utm_campaign", "comment": "Which campaign the keyword came from; extracted from the `final_url`."}, "utm_content": {"type": "text", "index": 21, "name": "utm_content", "comment": "Which ad group the keyword came from; extracted from the `final_url`."}, "utm_term": {"type": "text", "index": 22, "name": "utm_term", "comment": "Which keyword brought people to your website; extracted from the `final_url`."}, "clicks": {"type": "bigint", "index": 23, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "bigint", "index": 24, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "double precision", "index": 25, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "bigint", "index": 26, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 27, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "bigint", "index": 28, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "all_conversions_value": {"type": "double precision", "index": 29, "name": "all_conversions_value", "comment": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.microsoft_ads__url_report"}, "model.pinterest.pinterest_ads__ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__ad_group_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the campaign, advertiser, and ad group level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp with time zone", "index": 2, "name": "date_day", "comment": "The performance date of the record."}, "advertiser_name": {"type": "text", "index": 3, "name": "advertiser_name", "comment": "Name of the advertiser."}, "advertiser_id": {"type": "text", "index": 4, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "The name of the related Campaign."}, "campaign_status": {"type": "text", "index": 6, "name": "campaign_status", "comment": "Status of the campaign."}, "campaign_id": {"type": "text", "index": 7, "name": "campaign_id", "comment": "The ID of the related Campaign."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "The name of the related Ad group."}, "ad_group_id": {"type": "text", "index": 9, "name": "ad_group_id", "comment": "The ID of the related Ad group."}, "created_at": {"type": "text", "index": 10, "name": "created_at", "comment": "Ad group creation time."}, "start_time": {"type": "text", "index": 11, "name": "start_time", "comment": "Ad group start time."}, "end_time": {"type": "integer", "index": 12, "name": "end_time", "comment": "Ad group end time."}, "ad_group_status": {"type": "text", "index": 13, "name": "ad_group_status", "comment": "Status of the ad group."}, "spend": {"type": "numeric", "index": 14, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "clicks": {"type": "bigint", "index": 15, "name": "clicks", "comment": "The number of paid and earned clicks that occurred on the day of the record."}, "impressions": {"type": "bigint", "index": 16, "name": "impressions", "comment": "The number of paid and earned impressions that occurred on the day of the record."}, "total_conversions": {"type": "bigint", "index": 17, "name": "total_conversions", "comment": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "total_conversions_quantity": {"type": "bigint", "index": 18, "name": "total_conversions_quantity", "comment": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "total_conversions_value": {"type": "numeric", "index": 19, "name": "total_conversions_value", "comment": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.pinterest_ads__ad_group_report"}, "model.pinterest.pinterest_ads__advertiser_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__advertiser_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of an advertiser on the Pinterest Ads platform.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp with time zone", "index": 2, "name": "date_day", "comment": "The performance date of the record."}, "advertiser_name": {"type": "text", "index": 3, "name": "advertiser_name", "comment": "Name of the advertiser."}, "advertiser_id": {"type": "text", "index": 4, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": "The currency code which the advertiser is set up using."}, "country": {"type": "text", "index": 6, "name": "country", "comment": "The country code where the advertiser is located."}, "spend": {"type": "numeric", "index": 7, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "clicks": {"type": "bigint", "index": 8, "name": "clicks", "comment": "The number of paid and earned clicks that occurred on the day of the record."}, "impressions": {"type": "bigint", "index": 9, "name": "impressions", "comment": "The number of paid and earned impressions that occurred on the day of the record."}, "total_conversions": {"type": "bigint", "index": 10, "name": "total_conversions", "comment": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "total_conversions_quantity": {"type": "bigint", "index": 11, "name": "total_conversions_quantity", "comment": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "total_conversions_value": {"type": "numeric", "index": 12, "name": "total_conversions_value", "comment": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.pinterest_ads__advertiser_report"}, "model.pinterest.pinterest_ads__campaign_country_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__campaign_country_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the country and campaign level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The performance date of the record."}, "country_name": {"type": "text", "index": 3, "name": "country_name", "comment": "Name of the targeted country."}, "country_id": {"type": "text", "index": 4, "name": "country_id", "comment": "The ID of the targeted country."}, "campaign_id": {"type": "text", "index": 5, "name": "campaign_id", "comment": "The ID of the related Campaign."}, "spend": {"type": "numeric", "index": 6, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "clicks": {"type": "double precision", "index": 7, "name": "clicks", "comment": "The number of paid and earned clicks that occurred on the day of the record."}, "impressions": {"type": "double precision", "index": 8, "name": "impressions", "comment": "The number of paid and earned impressions that occurred on the day of the record."}, "total_conversions": {"type": "bigint", "index": 9, "name": "total_conversions", "comment": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "total_conversions_quantity": {"type": "bigint", "index": 10, "name": "total_conversions_quantity", "comment": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "total_conversions_value": {"type": "numeric", "index": 11, "name": "total_conversions_value", "comment": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}, "advertiser_name": {"type": "text", "index": 12, "name": "advertiser_name", "comment": "Name of the advertiser."}, "advertiser_id": {"type": "text", "index": 13, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "campaign_name": {"type": "text", "index": 14, "name": "campaign_name", "comment": "The name of the related Campaign."}, "campaign_status": {"type": "text", "index": 15, "name": "campaign_status", "comment": "Status of the campaign."}, "budget_spend_cap": {"type": "integer", "index": 16, "name": "budget_spend_cap", "comment": "Maximum amount allowed to be spent over a specified budget period for the campaign."}, "lifetime_spend_cap": {"type": "integer", "index": 17, "name": "lifetime_spend_cap", "comment": "Total maximum spend allowed across the entire lifespan of the campaign."}, "campaign_created_at": {"type": "text", "index": 18, "name": "campaign_created_at", "comment": "Campaign creation time."}, "default_ad_group_budget_in_micro_currency": {"type": "integer", "index": 19, "name": "default_ad_group_budget_in_micro_currency", "comment": "When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account."}, "campaign_end_time": {"type": "timestamp without time zone", "index": 20, "name": "campaign_end_time", "comment": "Timestamp when the campaign ended or is scheduled to end."}, "is_campaign_budget_optimization": {"type": "boolean", "index": 21, "name": "is_campaign_budget_optimization", "comment": "Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared."}, "is_flexible_daily_budgets": {"type": "boolean", "index": 22, "name": "is_flexible_daily_budgets", "comment": "Determine if a campaign has flexible daily budgets setup."}, "campaign_objective_type": {"type": "text", "index": 23, "name": "campaign_objective_type", "comment": "The primary goal of the campaign (e.g., brand awareness, conversions, video views)."}, "campaign_start_time": {"type": "timestamp without time zone", "index": 24, "name": "campaign_start_time", "comment": "Timestamp when the campaign became active or was scheduled to start."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.pinterest_ads__campaign_country_report"}, "model.pinterest.pinterest_ads__campaign_region_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__campaign_region_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the region and campaign level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The performance date of the record."}, "region_name": {"type": "text", "index": 3, "name": "region_name", "comment": "Name of the targeted region."}, "region_id": {"type": "text", "index": 4, "name": "region_id", "comment": "The ID of the targeted region."}, "campaign_id": {"type": "text", "index": 5, "name": "campaign_id", "comment": "The ID of the related Campaign."}, "country_id": {"type": "text", "index": 6, "name": "country_id", "comment": "The ID of the targeted country."}, "spend": {"type": "numeric", "index": 7, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "clicks": {"type": "double precision", "index": 8, "name": "clicks", "comment": "The number of paid and earned clicks that occurred on the day of the record."}, "impressions": {"type": "double precision", "index": 9, "name": "impressions", "comment": "The number of paid and earned impressions that occurred on the day of the record."}, "total_conversions": {"type": "bigint", "index": 10, "name": "total_conversions", "comment": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "total_conversions_quantity": {"type": "bigint", "index": 11, "name": "total_conversions_quantity", "comment": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "total_conversions_value": {"type": "numeric", "index": 12, "name": "total_conversions_value", "comment": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}, "country_name": {"type": "text", "index": 13, "name": "country_name", "comment": "Name of the targeted country."}, "advertiser_name": {"type": "text", "index": 14, "name": "advertiser_name", "comment": "Name of the advertiser."}, "advertiser_id": {"type": "text", "index": 15, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "campaign_name": {"type": "text", "index": 16, "name": "campaign_name", "comment": "The name of the related Campaign."}, "campaign_status": {"type": "text", "index": 17, "name": "campaign_status", "comment": "Status of the campaign."}, "budget_spend_cap": {"type": "integer", "index": 18, "name": "budget_spend_cap", "comment": "Maximum amount allowed to be spent over a specified budget period for the campaign."}, "lifetime_spend_cap": {"type": "integer", "index": 19, "name": "lifetime_spend_cap", "comment": "Total maximum spend allowed across the entire lifespan of the campaign."}, "campaign_created_at": {"type": "text", "index": 20, "name": "campaign_created_at", "comment": "Campaign creation time."}, "default_ad_group_budget_in_micro_currency": {"type": "integer", "index": 21, "name": "default_ad_group_budget_in_micro_currency", "comment": "When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account."}, "campaign_end_time": {"type": "timestamp without time zone", "index": 22, "name": "campaign_end_time", "comment": "Timestamp when the campaign ended or is scheduled to end."}, "is_campaign_budget_optimization": {"type": "boolean", "index": 23, "name": "is_campaign_budget_optimization", "comment": "Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared."}, "is_flexible_daily_budgets": {"type": "boolean", "index": 24, "name": "is_flexible_daily_budgets", "comment": "Determine if a campaign has flexible daily budgets setup."}, "campaign_objective_type": {"type": "text", "index": 25, "name": "campaign_objective_type", "comment": "The primary goal of the campaign (e.g., brand awareness, conversions, video views)."}, "campaign_start_time": {"type": "timestamp without time zone", "index": 26, "name": "campaign_start_time", "comment": "Timestamp when the campaign became active or was scheduled to start."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.pinterest_ads__campaign_region_report"}, "model.pinterest.pinterest_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__campaign_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the advertiser and campaign level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp with time zone", "index": 2, "name": "date_day", "comment": "The performance date of the record."}, "advertiser_name": {"type": "text", "index": 3, "name": "advertiser_name", "comment": "Name of the advertiser."}, "advertiser_id": {"type": "text", "index": 4, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "The name of the related Campaign."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID of the related Campaign."}, "campaign_status": {"type": "text", "index": 7, "name": "campaign_status", "comment": "Status of the campaign."}, "spend": {"type": "numeric", "index": 8, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "clicks": {"type": "bigint", "index": 9, "name": "clicks", "comment": "The number of paid and earned clicks that occurred on the day of the record."}, "impressions": {"type": "bigint", "index": 10, "name": "impressions", "comment": "The number of paid and earned impressions that occurred on the day of the record."}, "total_conversions": {"type": "bigint", "index": 11, "name": "total_conversions", "comment": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "total_conversions_quantity": {"type": "bigint", "index": 12, "name": "total_conversions_quantity", "comment": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "total_conversions_value": {"type": "numeric", "index": 13, "name": "total_conversions_value", "comment": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.pinterest_ads__campaign_report"}, "model.pinterest.pinterest_ads__keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__keyword_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of a keyword at the advertiser, campaign, ad group, and keyword level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp with time zone", "index": 2, "name": "date_day", "comment": "The performance date of the record."}, "advertiser_name": {"type": "text", "index": 3, "name": "advertiser_name", "comment": "Name of the advertiser."}, "advertiser_id": {"type": "text", "index": 4, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "Name of the campaign."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID of the related Campaign."}, "ad_group_name": {"type": "text", "index": 7, "name": "ad_group_name", "comment": "Name of the ad group."}, "ad_group_id": {"type": "text", "index": 8, "name": "ad_group_id", "comment": "The ID of the related Ad group."}, "keyword_id": {"type": "text", "index": 9, "name": "keyword_id", "comment": "Unique identifier of the keyword."}, "match_type": {"type": "text", "index": 10, "name": "match_type", "comment": "Type of match the keyword is tied to. Either Exact or Broad."}, "parent_type": {"type": "text", "index": 11, "name": "parent_type", "comment": "Identifier of what grain the parent type is. Ad group or campaign."}, "keyword_value": {"type": "text", "index": 12, "name": "keyword_value", "comment": "The text value that makes upd the keyword."}, "spend": {"type": "numeric", "index": 13, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "clicks": {"type": "bigint", "index": 14, "name": "clicks", "comment": "The number of paid and earned clicks that occurred on the day of the record."}, "impressions": {"type": "bigint", "index": 15, "name": "impressions", "comment": "The number of paid and earned impressions that occurred on the day of the record."}, "total_conversions": {"type": "bigint", "index": 16, "name": "total_conversions", "comment": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "total_conversions_quantity": {"type": "bigint", "index": 17, "name": "total_conversions_quantity", "comment": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "total_conversions_value": {"type": "numeric", "index": 18, "name": "total_conversions_value", "comment": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.pinterest_ads__keyword_report"}, "model.pinterest.pinterest_ads__pin_promotion_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__pin_promotion_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the advertiser, campaign, ad group, and pin level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp with time zone", "index": 2, "name": "date_day", "comment": "The performance date of the record."}, "advertiser_id": {"type": "text", "index": 3, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "advertiser_name": {"type": "text", "index": 4, "name": "advertiser_name", "comment": "Name of the advertiser."}, "campaign_id": {"type": "text", "index": 5, "name": "campaign_id", "comment": "The ID of the related Campaign."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "Name of the campaign."}, "campaign_status": {"type": "text", "index": 7, "name": "campaign_status", "comment": "Status of the campaign."}, "ad_group_id": {"type": "text", "index": 8, "name": "ad_group_id", "comment": "The ID of the related Ad group."}, "ad_group_name": {"type": "text", "index": 9, "name": "ad_group_name", "comment": "Name of the ad group."}, "ad_group_status": {"type": "text", "index": 10, "name": "ad_group_status", "comment": "Status of the ad group."}, "creative_type": {"type": "text", "index": 11, "name": "creative_type", "comment": "The creative type. \nOne of \"APP\", \"APP_VIDEO\", \"BOARD\", \"CAROUSEL\", \"CINEMATIC\", \"COMMERCE\", \"MAX_VIDEO\", \"NATIVE_VIDEO\", \"REGULAR\", \n\"SEARCH_PROMINENCE\", \"SEARCH_PROMINENCE_CAROUSEL\", \"SHOPPING\", \"SHOP_THE_PIN\", \"THIRD_PARTY\", or \"VIDEO\".\n"}, "pin_promotion_id": {"type": "text", "index": 12, "name": "pin_promotion_id", "comment": "The ID of the related Pin promotion."}, "pin_name": {"type": "text", "index": 13, "name": "pin_name", "comment": "Name of the pin."}, "pin_status": {"type": "text", "index": 14, "name": "pin_status", "comment": "Status of the pin."}, "destination_url": {"type": "text", "index": 15, "name": "destination_url", "comment": "Pin destination URL."}, "base_url": {"type": "text", "index": 16, "name": "base_url", "comment": "The base URL of the ad, extracted from the `destination_url`."}, "spend": {"type": "numeric", "index": 17, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "clicks": {"type": "bigint", "index": 18, "name": "clicks", "comment": "The number of paid and earned clicks that occurred on the day of the record."}, "impressions": {"type": "bigint", "index": 19, "name": "impressions", "comment": "The number of paid and earned impressions that occurred on the day of the record."}, "total_conversions": {"type": "bigint", "index": 20, "name": "total_conversions", "comment": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "total_conversions_quantity": {"type": "bigint", "index": 21, "name": "total_conversions_quantity", "comment": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "total_conversions_value": {"type": "numeric", "index": 22, "name": "total_conversions_value", "comment": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.pinterest_ads__pin_promotion_report"}, "model.pinterest.pinterest_ads__url_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__url_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the advertiser, campaign, ad group, and url level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp with time zone", "index": 2, "name": "date_day", "comment": "The performance date of the record."}, "advertiser_id": {"type": "text", "index": 3, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "advertiser_name": {"type": "text", "index": 4, "name": "advertiser_name", "comment": "Name of the advertiser."}, "campaign_id": {"type": "text", "index": 5, "name": "campaign_id", "comment": "The ID of the related Campaign."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the related Campaign."}, "campaign_status": {"type": "text", "index": 7, "name": "campaign_status", "comment": "Status of the campaign."}, "ad_group_id": {"type": "text", "index": 8, "name": "ad_group_id", "comment": "The ID of the related Ad group."}, "ad_group_name": {"type": "text", "index": 9, "name": "ad_group_name", "comment": "The name of the related Ad group."}, "ad_group_status": {"type": "text", "index": 10, "name": "ad_group_status", "comment": "Status of the ad group."}, "destination_url": {"type": "text", "index": 11, "name": "destination_url", "comment": "Pin destination URL."}, "creative_type": {"type": "text", "index": 12, "name": "creative_type", "comment": "The creative type. \nOne of \"APP\", \"APP_VIDEO\", \"BOARD\", \"CAROUSEL\", \"CINEMATIC\", \"COMMERCE\", \"MAX_VIDEO\", \"NATIVE_VIDEO\", \"REGULAR\", \n\"SEARCH_PROMINENCE\", \"SEARCH_PROMINENCE_CAROUSEL\", \"SHOPPING\", \"SHOP_THE_PIN\", \"THIRD_PARTY\", or \"VIDEO\".\n"}, "pin_promotion_id": {"type": "text", "index": 13, "name": "pin_promotion_id", "comment": "The ID of the related Pin promotion."}, "pin_name": {"type": "text", "index": 14, "name": "pin_name", "comment": "Pin promotion name."}, "pin_status": {"type": "text", "index": 15, "name": "pin_status", "comment": "The status of the Pin promotion. One of \"ACTIVE\", \"ARCHIVED\", \"PAUSED\""}, "base_url": {"type": "text", "index": 16, "name": "base_url", "comment": "The base URL of the ad, extracted from the `destination_url`."}, "url_host": {"type": "text", "index": 17, "name": "url_host", "comment": "The URL host of the ad, extracted from the `destination_url`."}, "url_path": {"type": "text", "index": 18, "name": "url_path", "comment": "The URL path of the ad, extracted from the `destination_url`."}, "utm_source": {"type": "text", "index": 19, "name": "utm_source", "comment": "The utm_source parameter of the ad, extracted from the `destination_url`."}, "utm_medium": {"type": "text", "index": 20, "name": "utm_medium", "comment": "The utm_medium parameter of the ad, extracted from the `destination_url`."}, "utm_campaign": {"type": "text", "index": 21, "name": "utm_campaign", "comment": "The utm_campaign parameter of the ad, extracted from the `destination_url`."}, "utm_content": {"type": "text", "index": 22, "name": "utm_content", "comment": "The utm_content parameter of the ad, extracted from the `destination_url`."}, "utm_term": {"type": "text", "index": 23, "name": "utm_term", "comment": "The utm_term parameter of the ad, extracted from the `destination_url`."}, "spend": {"type": "numeric", "index": 24, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "clicks": {"type": "bigint", "index": 25, "name": "clicks", "comment": "The number of paid and earned clicks that occurred on the day of the record."}, "impressions": {"type": "bigint", "index": 26, "name": "impressions", "comment": "The number of paid and earned impressions that occurred on the day of the record."}, "total_conversions": {"type": "bigint", "index": 27, "name": "total_conversions", "comment": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "total_conversions_quantity": {"type": "bigint", "index": 28, "name": "total_conversions_quantity", "comment": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "total_conversions_value": {"type": "numeric", "index": 29, "name": "total_conversions_value", "comment": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.pinterest_ads__url_report"}, "model.reddit_ads.reddit_ads__account_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "reddit_ads__account_report", "database": "postgres", "comment": "Each record in this table represents the daily number of clicks, impressions, and spend of ads by account, account timezone, attribution type, and currency.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "currency": {"type": "text", "index": 4, "name": "currency", "comment": "The currency this account uses (ISO-4217)"}, "attribution_type": {"type": "text", "index": 5, "name": "attribution_type", "comment": "Attribution type: \"CLICK_THROUGH_CONVERSION\", \"VIEW_THROUGH_CONVERSION\", or \"ALL_CONVERSION\".\nCLICK_THROUGH_CONVERSION: A user clicked on your ad and then completed the conversion action on your site. \nVIEW_THROUGH_CONVERSION: A user saw your ad and did not click it, but did complete the conversion action on your site.\nALL_CONVERSION: Combination of both."}, "time_zone_id": {"type": "text", "index": 6, "name": "time_zone_id", "comment": "The time zone id preference for this account"}, "clicks": {"type": "bigint", "index": 7, "name": "clicks", "comment": "The number of clicks detected for this report period"}, "impressions": {"type": "bigint", "index": 8, "name": "impressions", "comment": "The number of impressions served for this report period"}, "spend": {"type": "numeric", "index": 9, "name": "spend", "comment": "Spend converted out of microcurrency (so Spend/1,000,000)"}, "conversions": {"type": "numeric", "index": 10, "name": "conversions", "comment": "The total click-through conversions attributed, for the given month-long window."}, "view_through_conversions": {"type": "numeric", "index": 11, "name": "view_through_conversions", "comment": "The total view-through conversions attributed, for the given month-long window."}, "total_value": {"type": "double precision", "index": 12, "name": "total_value", "comment": "The total monetary value associated with a conversion event."}, "total_items": {"type": "numeric", "index": 13, "name": "total_items", "comment": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion."}, "lead_conversions": {"type": "numeric", "index": 14, "name": "lead_conversions", "comment": "Total attributed click-through conversions for lead generation events."}, "lead_view_through_conversions": {"type": "numeric", "index": 15, "name": "lead_view_through_conversions", "comment": "Total attributed view-through conversions for lead generation events."}, "lead_value": {"type": "double precision", "index": 16, "name": "lead_value", "comment": "Total monetary value associated with lead generation conversion events."}, "lead_items": {"type": "numeric", "index": 17, "name": "lead_items", "comment": "Total number of items involved in lead generation conversion events."}, "purchase_conversions": {"type": "numeric", "index": 18, "name": "purchase_conversions", "comment": "Total attributed click-through conversions for purchase events."}, "purchase_view_through_conversions": {"type": "numeric", "index": 19, "name": "purchase_view_through_conversions", "comment": "Total attributed view-through conversions for purchase events."}, "purchase_value": {"type": "double precision", "index": 20, "name": "purchase_value", "comment": "Total monetary value associated with purchase conversion events."}, "purchase_items": {"type": "numeric", "index": 21, "name": "purchase_items", "comment": "Total number of items involved in purchase conversion events."}, "custom_conversions": {"type": "numeric", "index": 22, "name": "custom_conversions", "comment": "Total attributed click-through conversions for custom-defined events."}, "custom_view_through_conversions": {"type": "numeric", "index": 23, "name": "custom_view_through_conversions", "comment": "Total attributed view-through conversions for custom-defined events."}, "custom_value": {"type": "double precision", "index": 24, "name": "custom_value", "comment": "Total monetary value associated with custom-defined conversion events."}, "custom_items": {"type": "numeric", "index": 25, "name": "custom_items", "comment": "Total number of items involved in custom-defined conversion events."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.reddit_ads__account_report"}, "model.reddit_ads.reddit_ads__ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "reddit_ads__ad_group_report", "database": "postgres", "comment": "Each record in this table represents the daily number of clicks, impressions, and spend per ad group, along with campaign and account information.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "ad_group_name": {"type": "text", "index": 4, "name": "ad_group_name", "comment": "Name of ad group."}, "ad_group_id": {"type": "character varying(255)", "index": 5, "name": "ad_group_id", "comment": "The ID of the ad group."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "Name of campaign."}, "campaign_id": {"type": "character varying(255)", "index": 7, "name": "campaign_id", "comment": "The ID of the campaign."}, "currency": {"type": "text", "index": 8, "name": "currency", "comment": "The currency this account uses (ISO-4217)"}, "clicks": {"type": "bigint", "index": 9, "name": "clicks", "comment": "The number of clicks detected for this report period"}, "impressions": {"type": "bigint", "index": 10, "name": "impressions", "comment": "The number of impressions served for this report period"}, "spend": {"type": "numeric", "index": 11, "name": "spend", "comment": "Spend converted out of microcurrency (so Spend/1,000,000)"}, "conversions": {"type": "numeric", "index": 12, "name": "conversions", "comment": "The total click-through conversions attributed, for the given month-long window."}, "view_through_conversions": {"type": "numeric", "index": 13, "name": "view_through_conversions", "comment": "The total view-through conversions attributed, for the given month-long window."}, "total_value": {"type": "double precision", "index": 14, "name": "total_value", "comment": "The total monetary value associated with a conversion event."}, "total_items": {"type": "numeric", "index": 15, "name": "total_items", "comment": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion."}, "lead_conversions": {"type": "numeric", "index": 16, "name": "lead_conversions", "comment": "Total attributed click-through conversions for lead generation events."}, "lead_view_through_conversions": {"type": "numeric", "index": 17, "name": "lead_view_through_conversions", "comment": "Total attributed view-through conversions for lead generation events."}, "lead_value": {"type": "double precision", "index": 18, "name": "lead_value", "comment": "Total monetary value associated with lead generation conversion events."}, "lead_items": {"type": "numeric", "index": 19, "name": "lead_items", "comment": "Total number of items involved in lead generation conversion events."}, "purchase_conversions": {"type": "numeric", "index": 20, "name": "purchase_conversions", "comment": "Total attributed click-through conversions for purchase events."}, "purchase_view_through_conversions": {"type": "numeric", "index": 21, "name": "purchase_view_through_conversions", "comment": "Total attributed view-through conversions for purchase events."}, "purchase_value": {"type": "double precision", "index": 22, "name": "purchase_value", "comment": "Total monetary value associated with purchase conversion events."}, "purchase_items": {"type": "numeric", "index": 23, "name": "purchase_items", "comment": "Total number of items involved in purchase conversion events."}, "custom_conversions": {"type": "numeric", "index": 24, "name": "custom_conversions", "comment": "Total attributed click-through conversions for custom-defined events."}, "custom_view_through_conversions": {"type": "numeric", "index": 25, "name": "custom_view_through_conversions", "comment": "Total attributed view-through conversions for custom-defined events."}, "custom_value": {"type": "double precision", "index": 26, "name": "custom_value", "comment": "Total monetary value associated with custom-defined conversion events."}, "custom_items": {"type": "numeric", "index": 27, "name": "custom_items", "comment": "Total number of items involved in custom-defined conversion events."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.reddit_ads__ad_group_report"}, "model.reddit_ads.reddit_ads__ad_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "reddit_ads__ad_report", "database": "postgres", "comment": "Each record in this table represents the daily number of clicks, impressions, and spend per ad, along with account, campaign, ad group, and post information.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "ad_id": {"type": "character varying(255)", "index": 3, "name": "ad_id", "comment": "The ID of the ad."}, "ad_name": {"type": "text", "index": 4, "name": "ad_name", "comment": "Name of ad."}, "account_id": {"type": "character varying(255)", "index": 5, "name": "account_id", "comment": "The ID of the account."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "Name of campaign."}, "campaign_id": {"type": "character varying(255)", "index": 7, "name": "campaign_id", "comment": "The ID of the campaign."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "Name of ad group."}, "ad_group_id": {"type": "character varying(255)", "index": 9, "name": "ad_group_id", "comment": "The ID of the ad group."}, "currency": {"type": "text", "index": 10, "name": "currency", "comment": "The currency this account uses (ISO-4217)"}, "post_id": {"type": "text", "index": 11, "name": "post_id", "comment": "The ID of the post."}, "clicks": {"type": "bigint", "index": 12, "name": "clicks", "comment": "The number of clicks detected for this report period"}, "impressions": {"type": "bigint", "index": 13, "name": "impressions", "comment": "The number of impressions served for this report period"}, "spend": {"type": "numeric", "index": 14, "name": "spend", "comment": "Spend converted out of microcurrency (so Spend/1,000,000)"}, "conversions": {"type": "numeric", "index": 15, "name": "conversions", "comment": "The total click-through conversions attributed, for the given month-long window."}, "view_through_conversions": {"type": "numeric", "index": 16, "name": "view_through_conversions", "comment": "The total view-through conversions attributed, for the given month-long window."}, "total_value": {"type": "double precision", "index": 17, "name": "total_value", "comment": "The total monetary value associated with a conversion event."}, "total_items": {"type": "numeric", "index": 18, "name": "total_items", "comment": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion."}, "lead_conversions": {"type": "numeric", "index": 19, "name": "lead_conversions", "comment": "Total attributed click-through conversions for lead generation events."}, "lead_view_through_conversions": {"type": "numeric", "index": 20, "name": "lead_view_through_conversions", "comment": "Total attributed view-through conversions for lead generation events."}, "lead_value": {"type": "double precision", "index": 21, "name": "lead_value", "comment": "Total monetary value associated with lead generation conversion events."}, "lead_items": {"type": "numeric", "index": 22, "name": "lead_items", "comment": "Total number of items involved in lead generation conversion events."}, "purchase_conversions": {"type": "numeric", "index": 23, "name": "purchase_conversions", "comment": "Total attributed click-through conversions for purchase events."}, "purchase_view_through_conversions": {"type": "numeric", "index": 24, "name": "purchase_view_through_conversions", "comment": "Total attributed view-through conversions for purchase events."}, "purchase_value": {"type": "double precision", "index": 25, "name": "purchase_value", "comment": "Total monetary value associated with purchase conversion events."}, "purchase_items": {"type": "numeric", "index": 26, "name": "purchase_items", "comment": "Total number of items involved in purchase conversion events."}, "custom_conversions": {"type": "numeric", "index": 27, "name": "custom_conversions", "comment": "Total attributed click-through conversions for custom-defined events."}, "custom_view_through_conversions": {"type": "numeric", "index": 28, "name": "custom_view_through_conversions", "comment": "Total attributed view-through conversions for custom-defined events."}, "custom_value": {"type": "double precision", "index": 29, "name": "custom_value", "comment": "Total monetary value associated with custom-defined conversion events."}, "custom_items": {"type": "numeric", "index": 30, "name": "custom_items", "comment": "Total number of items involved in custom-defined conversion events."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.reddit_ads__ad_report"}, "model.reddit_ads.reddit_ads__campaign_country_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "reddit_ads__campaign_country_report", "database": "postgres", "comment": "Each record in this table represents the daily number of clicks, impressions, and spend per campaign and country, along with account information.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "campaign_id": {"type": "character varying(255)", "index": 4, "name": "campaign_id", "comment": "The ID of the campaign."}, "country": {"type": "text", "index": 5, "name": "country", "comment": "The country associated with the record."}, "clicks": {"type": "bigint", "index": 6, "name": "clicks", "comment": "The number of clicks detected for this report period"}, "impressions": {"type": "bigint", "index": 7, "name": "impressions", "comment": "The number of impressions served for this report period"}, "spend": {"type": "numeric", "index": 8, "name": "spend", "comment": "Spend converted out of microcurrency (so Spend/1,000,000)"}, "conversions": {"type": "bigint", "index": 9, "name": "conversions", "comment": "The total click-through conversions attributed, for the given month-long window."}, "view_through_conversions": {"type": "bigint", "index": 10, "name": "view_through_conversions", "comment": "The total view-through conversions attributed, for the given month-long window."}, "total_value": {"type": "bigint", "index": 11, "name": "total_value", "comment": "The total monetary value associated with a conversion event."}, "total_items": {"type": "bigint", "index": 12, "name": "total_items", "comment": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion."}, "lead_conversions": {"type": "bigint", "index": 13, "name": "lead_conversions", "comment": "Total attributed click-through conversions for lead generation events."}, "lead_view_through_conversions": {"type": "bigint", "index": 14, "name": "lead_view_through_conversions", "comment": "Total attributed view-through conversions for lead generation events."}, "lead_value": {"type": "bigint", "index": 15, "name": "lead_value", "comment": "Total monetary value associated with lead generation conversion events."}, "lead_items": {"type": "bigint", "index": 16, "name": "lead_items", "comment": "Total number of items involved in lead generation conversion events."}, "purchase_conversions": {"type": "bigint", "index": 17, "name": "purchase_conversions", "comment": "Total attributed click-through conversions for purchase events."}, "purchase_view_through_conversions": {"type": "bigint", "index": 18, "name": "purchase_view_through_conversions", "comment": "Total attributed view-through conversions for purchase events."}, "purchase_value": {"type": "bigint", "index": 19, "name": "purchase_value", "comment": "Total monetary value associated with purchase conversion events."}, "purchase_items": {"type": "bigint", "index": 20, "name": "purchase_items", "comment": "Total number of items involved in purchase conversion events."}, "custom_conversions": {"type": "bigint", "index": 21, "name": "custom_conversions", "comment": "Total attributed click-through conversions for custom-defined events."}, "custom_view_through_conversions": {"type": "bigint", "index": 22, "name": "custom_view_through_conversions", "comment": "Total attributed view-through conversions for custom-defined events."}, "custom_value": {"type": "bigint", "index": 23, "name": "custom_value", "comment": "Total monetary value associated with custom-defined conversion events."}, "custom_items": {"type": "bigint", "index": 24, "name": "custom_items", "comment": "Total number of items involved in custom-defined conversion events."}, "campaign_name": {"type": "text", "index": 25, "name": "campaign_name", "comment": "Name of campaign."}, "currency": {"type": "text", "index": 26, "name": "currency", "comment": "The currency this account uses (ISO-4217)"}, "effective_status": {"type": "text", "index": 27, "name": "effective_status", "comment": "The current effective status of the ad, reflecting both configured status and any internal processing states that may affect delivery.\n"}, "configured_status": {"type": "text", "index": 28, "name": "configured_status", "comment": "The user-defined status of the ad (e.g., ACTIVE, PAUSED), indicating whether it is intended to be running.\n"}, "is_processing": {"type": "boolean", "index": 29, "name": "is_processing", "comment": "A boolean flag indicating whether the ad is still being processed and not yet ready for delivery.\n"}, "objective": {"type": "text", "index": 30, "name": "objective", "comment": "The advertising goal or objective selected for the campaign, such as CONVERSIONS, TRAFFIC, or BRAND_AWARENESS.\n"}, "funding_instrument_id": {"type": "integer", "index": 31, "name": "funding_instrument_id", "comment": "The ID of the funding instrument (e.g., credit card or line of credit) used to pay for the ad campaign."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.reddit_ads__campaign_country_report"}, "model.reddit_ads.reddit_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "reddit_ads__campaign_report", "database": "postgres", "comment": "Each record in this table represents the daily number of clicks, impressions, and spend per campaign, along with account information.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "campaign_name": {"type": "text", "index": 4, "name": "campaign_name", "comment": "Name of campaign."}, "campaign_id": {"type": "character varying(255)", "index": 5, "name": "campaign_id", "comment": "The ID of the campaign."}, "currency": {"type": "text", "index": 6, "name": "currency", "comment": "The currency this account uses (ISO-4217)"}, "clicks": {"type": "bigint", "index": 7, "name": "clicks", "comment": "The number of clicks detected for this report period"}, "impressions": {"type": "bigint", "index": 8, "name": "impressions", "comment": "The number of impressions served for this report period"}, "spend": {"type": "numeric", "index": 9, "name": "spend", "comment": "Spend converted out of microcurrency (so Spend/1,000,000)"}, "conversions": {"type": "numeric", "index": 10, "name": "conversions", "comment": "The total click-through conversions attributed, for the given month-long window."}, "view_through_conversions": {"type": "numeric", "index": 11, "name": "view_through_conversions", "comment": "The total view-through conversions attributed, for the given month-long window."}, "total_value": {"type": "double precision", "index": 12, "name": "total_value", "comment": "The total monetary value associated with a conversion event."}, "total_items": {"type": "numeric", "index": 13, "name": "total_items", "comment": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion."}, "lead_conversions": {"type": "numeric", "index": 14, "name": "lead_conversions", "comment": "Total attributed click-through conversions for lead generation events."}, "lead_view_through_conversions": {"type": "numeric", "index": 15, "name": "lead_view_through_conversions", "comment": "Total attributed view-through conversions for lead generation events."}, "lead_value": {"type": "double precision", "index": 16, "name": "lead_value", "comment": "Total monetary value associated with lead generation conversion events."}, "lead_items": {"type": "numeric", "index": 17, "name": "lead_items", "comment": "Total number of items involved in lead generation conversion events."}, "purchase_conversions": {"type": "numeric", "index": 18, "name": "purchase_conversions", "comment": "Total attributed click-through conversions for purchase events."}, "purchase_view_through_conversions": {"type": "numeric", "index": 19, "name": "purchase_view_through_conversions", "comment": "Total attributed view-through conversions for purchase events."}, "purchase_value": {"type": "double precision", "index": 20, "name": "purchase_value", "comment": "Total monetary value associated with purchase conversion events."}, "purchase_items": {"type": "numeric", "index": 21, "name": "purchase_items", "comment": "Total number of items involved in purchase conversion events."}, "custom_conversions": {"type": "numeric", "index": 22, "name": "custom_conversions", "comment": "Total attributed click-through conversions for custom-defined events."}, "custom_view_through_conversions": {"type": "numeric", "index": 23, "name": "custom_view_through_conversions", "comment": "Total attributed view-through conversions for custom-defined events."}, "custom_value": {"type": "double precision", "index": 24, "name": "custom_value", "comment": "Total monetary value associated with custom-defined conversion events."}, "custom_items": {"type": "numeric", "index": 25, "name": "custom_items", "comment": "Total number of items involved in custom-defined conversion events."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.reddit_ads__campaign_report"}, "model.reddit_ads.reddit_ads__url_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "reddit_ads__url_report", "database": "postgres", "comment": "Each record in this table represents the daily number of clicks, impressions, and spend per url and utm parameters, along with post,ad, account, campaign, and ad group information.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "ad_name": {"type": "text", "index": 3, "name": "ad_name", "comment": "Name of ad."}, "ad_id": {"type": "character varying(255)", "index": 4, "name": "ad_id", "comment": "The ID of the ad."}, "account_id": {"type": "character varying(255)", "index": 5, "name": "account_id", "comment": "The ID of the account."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "Name of campaign."}, "campaign_id": {"type": "character varying(255)", "index": 7, "name": "campaign_id", "comment": "The ID of the campaign."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "Name of ad group."}, "ad_group_id": {"type": "character varying(255)", "index": 9, "name": "ad_group_id", "comment": "The ID of the ad group."}, "currency": {"type": "text", "index": 10, "name": "currency", "comment": "The currency this account uses (ISO-4217)"}, "post_id": {"type": "text", "index": 11, "name": "post_id", "comment": "The ID of the post."}, "post_url": {"type": "integer", "index": 12, "name": "post_url", "comment": "The URL belonging to the post."}, "click_url": {"type": "text", "index": 13, "name": "click_url", "comment": "The destination url, or the website address, that a visitor goes to when they click on the ad"}, "base_url": {"type": "text", "index": 14, "name": "base_url", "comment": "The base URL of the ad, extracted from the `click_url`."}, "url_host": {"type": "text", "index": 15, "name": "url_host", "comment": "The URL host of the ad, extracted from the `click_url`."}, "url_path": {"type": "text", "index": 16, "name": "url_path", "comment": "The URL path of the ad, extracted from the `click_url`."}, "utm_source": {"type": "text", "index": 17, "name": "utm_source", "comment": "The site that sent traffic to your page. Microsoft Advertising sets this to Bing; extracted from the `click_url`."}, "utm_medium": {"type": "text", "index": 18, "name": "utm_medium", "comment": "Which channel was used. Microsoft Advertising sets this to cp; extracted from the `click_url`."}, "utm_term": {"type": "text", "index": 19, "name": "utm_term", "comment": "Which keyword brought people to your website; extracted from the `click_url`."}, "utm_content": {"type": "text", "index": 20, "name": "utm_content", "comment": "Which ad group the keyword came from; extracted from the `click_url`."}, "utm_campaign": {"type": "text", "index": 21, "name": "utm_campaign", "comment": "Which campaign the keyword came from; extracted from the `click_url`."}, "clicks": {"type": "bigint", "index": 22, "name": "clicks", "comment": "The number of clicks detected for this report period"}, "impressions": {"type": "bigint", "index": 23, "name": "impressions", "comment": "The number of impressions served for this report period"}, "spend": {"type": "numeric", "index": 24, "name": "spend", "comment": "Spend converted out of microcurrency (so Spend/1,000,000)"}, "conversions": {"type": "numeric", "index": 25, "name": "conversions", "comment": "The total click-through conversions attributed, for the given month-long window."}, "view_through_conversions": {"type": "numeric", "index": 26, "name": "view_through_conversions", "comment": "The total view-through conversions attributed, for the given month-long window."}, "total_value": {"type": "double precision", "index": 27, "name": "total_value", "comment": "The total monetary value associated with a conversion event."}, "total_items": {"type": "numeric", "index": 28, "name": "total_items", "comment": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion."}, "lead_conversions": {"type": "numeric", "index": 29, "name": "lead_conversions", "comment": "Total attributed click-through conversions for lead generation events."}, "lead_view_through_conversions": {"type": "numeric", "index": 30, "name": "lead_view_through_conversions", "comment": "Total attributed view-through conversions for lead generation events."}, "lead_value": {"type": "double precision", "index": 31, "name": "lead_value", "comment": "Total monetary value associated with lead generation conversion events."}, "lead_items": {"type": "numeric", "index": 32, "name": "lead_items", "comment": "Total number of items involved in lead generation conversion events."}, "purchase_conversions": {"type": "numeric", "index": 33, "name": "purchase_conversions", "comment": "Total attributed click-through conversions for purchase events."}, "purchase_view_through_conversions": {"type": "numeric", "index": 34, "name": "purchase_view_through_conversions", "comment": "Total attributed view-through conversions for purchase events."}, "purchase_value": {"type": "double precision", "index": 35, "name": "purchase_value", "comment": "Total monetary value associated with purchase conversion events."}, "purchase_items": {"type": "numeric", "index": 36, "name": "purchase_items", "comment": "Total number of items involved in purchase conversion events."}, "custom_conversions": {"type": "numeric", "index": 37, "name": "custom_conversions", "comment": "Total attributed click-through conversions for custom-defined events."}, "custom_view_through_conversions": {"type": "numeric", "index": 38, "name": "custom_view_through_conversions", "comment": "Total attributed view-through conversions for custom-defined events."}, "custom_value": {"type": "double precision", "index": 39, "name": "custom_value", "comment": "Total monetary value associated with custom-defined conversion events."}, "custom_items": {"type": "numeric", "index": 40, "name": "custom_items", "comment": "Total number of items involved in custom-defined conversion events."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.reddit_ads__url_report"}, "model.snapchat_ads.snapchat_ads__account_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__account_report", "database": "postgres", "comment": "Each record represents the daily performance of a Snapchat ad account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "ad_account_id": {"type": "text", "index": 3, "name": "ad_account_id", "comment": "The ID of the account in Snapchat."}, "ad_account_name": {"type": "text", "index": 4, "name": "ad_account_name", "comment": "The name of the account in Snapchat."}, "currency": {"type": "text", "index": 5, "name": "currency", "comment": "The currency used by the account in Snapchat."}, "swipes": {"type": "bigint", "index": 6, "name": "swipes", "comment": "The number of swipes for the account on the given day."}, "impressions": {"type": "bigint", "index": 7, "name": "impressions", "comment": "The number of impressions for the account on the given day."}, "spend": {"type": "numeric", "index": 8, "name": "spend", "comment": "The spend for the account on the given day."}, "total_conversions": {"type": "numeric", "index": 9, "name": "total_conversions", "comment": "The total conversions being brought in the conversion fields you select in your `snapchat_ads__conversion_fields`."}, "conversion_purchases_value": {"type": "numeric", "index": 10, "name": "conversion_purchases_value", "comment": "The total value of purchases for the account on the given day."}, "conversion_purchases": {"type": "numeric", "index": 11, "name": "conversion_purchases", "comment": "The total number of purchases for the account on the given day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.snapchat_ads__account_report"}, "model.snapchat_ads.snapchat_ads__ad_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__ad_report", "database": "postgres", "comment": "Each record represents the daily performance of a Snapchat ad account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "ad_account_id": {"type": "text", "index": 3, "name": "ad_account_id", "comment": "The ID of the account in Snapchat."}, "ad_account_name": {"type": "text", "index": 4, "name": "ad_account_name", "comment": "The name of the account in Snapchat."}, "ad_id": {"type": "text", "index": 5, "name": "ad_id", "comment": "The ID of the ad in Snapchat."}, "ad_name": {"type": "text", "index": 6, "name": "ad_name", "comment": "The name of the ad in Snapchat."}, "ad_squad_id": {"type": "text", "index": 7, "name": "ad_squad_id", "comment": "The ID of the ad squad in Snapchat."}, "ad_squad_name": {"type": "text", "index": 8, "name": "ad_squad_name", "comment": "The name of the ad squad in Snapchat."}, "campaign_id": {"type": "text", "index": 9, "name": "campaign_id", "comment": "The ID of the campaign in Snapchat."}, "campaign_name": {"type": "text", "index": 10, "name": "campaign_name", "comment": "The name of the campaign in Snapchat."}, "currency": {"type": "text", "index": 11, "name": "currency", "comment": "The currency used by the account in Snapchat."}, "swipes": {"type": "bigint", "index": 12, "name": "swipes", "comment": "The number of swipes the ad had on the given day."}, "impressions": {"type": "bigint", "index": 13, "name": "impressions", "comment": "The number of impressions the ad had on the given day."}, "spend": {"type": "numeric", "index": 14, "name": "spend", "comment": "The spend on the ad in the given day."}, "total_conversions": {"type": "numeric", "index": 15, "name": "total_conversions", "comment": "The total conversions being brought in the conversion fields you select in your `snapchat_ads__conversion_fields`."}, "conversion_purchases_value": {"type": "numeric", "index": 16, "name": "conversion_purchases_value", "comment": "The total value of purchases for an ad on the given day."}, "conversion_purchases": {"type": "numeric", "index": 17, "name": "conversion_purchases", "comment": "The total number of purchases for an ad on the given day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.snapchat_ads__ad_report"}, "model.snapchat_ads.snapchat_ads__ad_squad_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__ad_squad_report", "database": "postgres", "comment": "Each record represents the daily performance of a Snapchat ad squad.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "ad_account_id": {"type": "text", "index": 3, "name": "ad_account_id", "comment": "The ID of the account in Snapchat."}, "ad_account_name": {"type": "text", "index": 4, "name": "ad_account_name", "comment": "The name of the account in Snapchat."}, "campaign_id": {"type": "text", "index": 5, "name": "campaign_id", "comment": "The ID of the campaign in Snapchat."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the campaign in Snapchat."}, "ad_squad_id": {"type": "text", "index": 7, "name": "ad_squad_id", "comment": "The ID of the ad squad in Snapchat."}, "ad_squad_name": {"type": "text", "index": 8, "name": "ad_squad_name", "comment": "The name of the ad squad in Snapchat."}, "currency": {"type": "text", "index": 9, "name": "currency", "comment": "The currency used by the account in Snapchat."}, "swipes": {"type": "bigint", "index": 10, "name": "swipes", "comment": "The number of swipes the ad squad had on the given day."}, "impressions": {"type": "bigint", "index": 11, "name": "impressions", "comment": "The number of impressions the ad squad had on the given day."}, "spend": {"type": "numeric", "index": 12, "name": "spend", "comment": "The spend on the ad squad in the given day."}, "total_conversions": {"type": "numeric", "index": 13, "name": "total_conversions", "comment": "The total conversions being brought in the conversion fields you select in your `snapchat_ads__conversion_fields`."}, "conversion_purchases_value": {"type": "numeric", "index": 14, "name": "conversion_purchases_value", "comment": "The total value of purchases for an ad squad on the given day."}, "conversion_purchases": {"type": "numeric", "index": 15, "name": "conversion_purchases", "comment": "The total number of purchases for an ad squad on the given day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.snapchat_ads__ad_squad_report"}, "model.snapchat_ads.snapchat_ads__campaign_country_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__campaign_country_report", "database": "postgres", "comment": "Each record represents the daily performance of a Snapchat campaign per country.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the report."}, "campaign_id": {"type": "text", "index": 3, "name": "campaign_id", "comment": "The ID of the campaign in Snapchat."}, "campaign_name": {"type": "text", "index": 4, "name": "campaign_name", "comment": "The name of the campaign in Snapchat."}, "country": {"type": "text", "index": 5, "name": "country", "comment": "The country where the campaign was delivered."}, "ad_account_id": {"type": "text", "index": 6, "name": "ad_account_id", "comment": "The ID of the account in Snapchat."}, "ad_account_name": {"type": "text", "index": 7, "name": "ad_account_name", "comment": "The name of the account in Snapchat."}, "created_at": {"type": "timestamp without time zone", "index": 8, "name": "created_at", "comment": "Timestamp of when the campaign was created."}, "campaign_daily_budget": {"type": "numeric", "index": 9, "name": "campaign_daily_budget", "comment": "Daily spend cap for the campaign (converted from microcurrency)."}, "start_time": {"type": "timestamp without time zone", "index": 10, "name": "start_time", "comment": "The start time of the campaign."}, "end_time": {"type": "timestamp without time zone", "index": 11, "name": "end_time", "comment": "The end time of the campaign."}, "status": {"type": "text", "index": 12, "name": "status", "comment": "Campaign status (e.g., ACTIVE, PAUSED, ARCHIVED)."}, "objective": {"type": "text", "index": 13, "name": "objective", "comment": "The objective of the campaign (e.g., BRAND_AWARENESS, APP_INSTALL, etc.)."}, "campaign_lifetime_spend_cap": {"type": "numeric", "index": 14, "name": "campaign_lifetime_spend_cap", "comment": "Lifetime spend cap for the campaign (converted from microcurrency)."}, "currency": {"type": "text", "index": 15, "name": "currency", "comment": "The currency used by the account in Snapchat."}, "swipes": {"type": "bigint", "index": 16, "name": "swipes", "comment": "The number of swipes the campaign had on the given day."}, "impressions": {"type": "bigint", "index": 17, "name": "impressions", "comment": "The number of impressions the campaign had on the given day."}, "spend": {"type": "numeric", "index": 18, "name": "spend", "comment": "The spend on the campaign in the given day."}, "shares": {"type": "bigint", "index": 19, "name": "shares", "comment": "Number of times components of the campaign were shared."}, "saves": {"type": "bigint", "index": 20, "name": "saves", "comment": "Number of times components of the campaign were saved to Memories."}, "total_conversions": {"type": "numeric", "index": 21, "name": "total_conversions", "comment": "The total conversions being brought in the conversion fields you select in your `snapchat_ads__conversion_fields`."}, "conversion_purchases_value": {"type": "numeric", "index": 22, "name": "conversion_purchases_value", "comment": "The total value of purchases for the campaign on the given day."}, "conversion_purchases": {"type": "numeric", "index": 23, "name": "conversion_purchases", "comment": "The total number of purchases for the campaign on the given day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.snapchat_ads__campaign_country_report"}, "model.snapchat_ads.snapchat_ads__campaign_region_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__campaign_region_report", "database": "postgres", "comment": "Each record represents the daily performance of a Snapchat campaign per region.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the report."}, "campaign_id": {"type": "text", "index": 3, "name": "campaign_id", "comment": "The ID of the campaign in Snapchat."}, "campaign_name": {"type": "text", "index": 4, "name": "campaign_name", "comment": "The name of the campaign in Snapchat."}, "region": {"type": "text", "index": 5, "name": "region", "comment": "The region where the campaign was delivered."}, "ad_account_id": {"type": "text", "index": 6, "name": "ad_account_id", "comment": "The ID of the account in Snapchat."}, "ad_account_name": {"type": "text", "index": 7, "name": "ad_account_name", "comment": "The name of the account in Snapchat."}, "created_at": {"type": "timestamp without time zone", "index": 8, "name": "created_at", "comment": "Timestamp of when the campaign was created."}, "campaign_daily_budget": {"type": "numeric", "index": 9, "name": "campaign_daily_budget", "comment": "Daily spend cap for the campaign (converted from microcurrency)."}, "start_time": {"type": "timestamp without time zone", "index": 10, "name": "start_time", "comment": "The start time of the campaign."}, "end_time": {"type": "timestamp without time zone", "index": 11, "name": "end_time", "comment": "The end time of the campaign."}, "status": {"type": "text", "index": 12, "name": "status", "comment": "Campaign status (e.g., ACTIVE, PAUSED, ARCHIVED)."}, "objective": {"type": "text", "index": 13, "name": "objective", "comment": "The objective of the campaign (e.g., BRAND_AWARENESS, APP_INSTALL, etc.)."}, "campaign_lifetime_spend_cap": {"type": "numeric", "index": 14, "name": "campaign_lifetime_spend_cap", "comment": "Lifetime spend cap for the campaign (converted from microcurrency)."}, "currency": {"type": "text", "index": 15, "name": "currency", "comment": "The currency used by the account in Snapchat."}, "swipes": {"type": "bigint", "index": 16, "name": "swipes", "comment": "The number of swipes the campaign had on the given day."}, "impressions": {"type": "bigint", "index": 17, "name": "impressions", "comment": "The number of impressions the campaign had on the given day."}, "spend": {"type": "numeric", "index": 18, "name": "spend", "comment": "The spend on the campaign in the given day."}, "shares": {"type": "bigint", "index": 19, "name": "shares", "comment": "Number of times components of the campaign were shared."}, "saves": {"type": "bigint", "index": 20, "name": "saves", "comment": "Number of times components of the campaign were saved to Memories."}, "total_conversions": {"type": "numeric", "index": 21, "name": "total_conversions", "comment": "The total conversions being brought in the conversion fields you select in your `snapchat_ads__conversion_fields`."}, "conversion_purchases_value": {"type": "numeric", "index": 22, "name": "conversion_purchases_value", "comment": "The total value of purchases for the campaign on the given day."}, "conversion_purchases": {"type": "numeric", "index": 23, "name": "conversion_purchases", "comment": "The total number of purchases for the campaign on the given day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.snapchat_ads__campaign_region_report"}, "model.snapchat_ads.snapchat_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__campaign_report", "database": "postgres", "comment": "Each record represents the daily performance of a Snapchat campaign.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "ad_account_id": {"type": "text", "index": 3, "name": "ad_account_id", "comment": "The ID of the account in Snapchat."}, "ad_account_name": {"type": "text", "index": 4, "name": "ad_account_name", "comment": "The name of the account in Snapchat."}, "campaign_id": {"type": "text", "index": 5, "name": "campaign_id", "comment": "The ID of the campaign in Snapchat."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the campaign in Snapchat."}, "currency": {"type": "text", "index": 7, "name": "currency", "comment": "The currency used by the account in Snapchat."}, "swipes": {"type": "bigint", "index": 8, "name": "swipes", "comment": "The number of swipes the campaign had on the given day."}, "impressions": {"type": "bigint", "index": 9, "name": "impressions", "comment": "The number of impressions the campaign had on the given day."}, "spend": {"type": "numeric", "index": 10, "name": "spend", "comment": "The spend on the campaign in the given day."}, "total_conversions": {"type": "numeric", "index": 11, "name": "total_conversions", "comment": "The total conversions being brought in the conversion fields you select in your `snapchat_ads__conversion_fields`."}, "conversion_purchases_value": {"type": "numeric", "index": 12, "name": "conversion_purchases_value", "comment": "The total value of purchases for campaign on the given day."}, "conversion_purchases": {"type": "numeric", "index": 13, "name": "conversion_purchases", "comment": "The total number of purchases for the campaign on the given day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.snapchat_ads__campaign_report"}, "model.snapchat_ads.snapchat_ads__url_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__url_report", "database": "postgres", "comment": "Each record represents the daily performance of Snapchat ads that leverage urls.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "ad_account_id": {"type": "text", "index": 3, "name": "ad_account_id", "comment": "The ID of the account in Snapchat."}, "ad_account_name": {"type": "text", "index": 4, "name": "ad_account_name", "comment": "The name of the account in Snapchat."}, "ad_id": {"type": "text", "index": 5, "name": "ad_id", "comment": "The ID of the ad in Snapchat."}, "ad_name": {"type": "text", "index": 6, "name": "ad_name", "comment": "The name of the ad in Snapchat."}, "ad_squad_id": {"type": "text", "index": 7, "name": "ad_squad_id", "comment": "The ID of the ad squad in Snapchat."}, "ad_squad_name": {"type": "text", "index": 8, "name": "ad_squad_name", "comment": "The name of the ad squad in Snapchat."}, "campaign_id": {"type": "text", "index": 9, "name": "campaign_id", "comment": "The ID of the campaign in Snapchat."}, "campaign_name": {"type": "text", "index": 10, "name": "campaign_name", "comment": "The name of the campaign in Snapchat."}, "currency": {"type": "text", "index": 11, "name": "currency", "comment": "The currency used by the account in Snapchat."}, "base_url": {"type": "text", "index": 12, "name": "base_url", "comment": "The base URL of the ad, extracted from the web_view_url."}, "url_host": {"type": "text", "index": 13, "name": "url_host", "comment": "The URL host of the ad, extracted from the web_view_url."}, "url_path": {"type": "text", "index": 14, "name": "url_path", "comment": "The URL path of the ad, extracted from the web_view_url."}, "utm_source": {"type": "text", "index": 15, "name": "utm_source", "comment": "The utm_source parameter of the ad, extracted from the web_view_url."}, "utm_medium": {"type": "text", "index": 16, "name": "utm_medium", "comment": "The utm_medium parameter of the ad, extracted from the web_view_url."}, "utm_campaign": {"type": "text", "index": 17, "name": "utm_campaign", "comment": "The utm_campaign parameter of the ad, extracted from the web_view_url."}, "utm_content": {"type": "text", "index": 18, "name": "utm_content", "comment": "The utm_content parameter of the ad, extracted from the web_view_url."}, "utm_term": {"type": "text", "index": 19, "name": "utm_term", "comment": "The utm_term parameter of the ad, extracted from the web_view_url."}, "swipes": {"type": "bigint", "index": 20, "name": "swipes", "comment": "The number of swipes the ad had on the given day."}, "impressions": {"type": "bigint", "index": 21, "name": "impressions", "comment": "The number of impressions the ad had on the given day."}, "spend": {"type": "numeric", "index": 22, "name": "spend", "comment": "The spend on the ad in the given day."}, "total_conversions": {"type": "numeric", "index": 23, "name": "total_conversions", "comment": "The total conversions being brought in the conversion fields you select in your `snapchat_ads__conversion_fields`."}, "conversion_purchases_value": {"type": "numeric", "index": 24, "name": "conversion_purchases_value", "comment": "The total value of purchases for an ad on the given day."}, "conversion_purchases": {"type": "numeric", "index": 25, "name": "conversion_purchases", "comment": "The total number of purchases for an ad on the given day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.snapchat_ads__url_report"}, "model.amazon_ads.stg_amazon_ads__ad_group_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__ad_group_history", "database": "postgres", "comment": "Each record represents an ad group in Amazon Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_group_id": {"type": "text", "index": 2, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "campaign_id": {"type": "text", "index": 3, "name": "campaign_id", "comment": "The ID of the Campaign."}, "creation_date": {"type": "text", "index": 4, "name": "creation_date", "comment": "The date of creation of the record."}, "default_bid": {"type": "double precision", "index": 5, "name": "default_bid", "comment": "The date of creation of the record."}, "last_updated_date": {"type": "text", "index": 6, "name": "last_updated_date", "comment": "Date of last update to record."}, "ad_group_name": {"type": "text", "index": 7, "name": "ad_group_name", "comment": "The name of the AdGroup."}, "serving_status": {"type": "text", "index": 8, "name": "serving_status", "comment": "The current serving status of the record."}, "state": {"type": "text", "index": 9, "name": "state", "comment": "The state of the record (enabled, paused, or archived)."}, "is_most_recent_record": {"type": "boolean", "index": 10, "name": "is_most_recent_record", "comment": "Boolean indicating whether record was the most recent instance."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__ad_group_history"}, "model.amazon_ads.stg_amazon_ads__ad_group_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__ad_group_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "creation_date": {"type": "text", "index": 5, "name": "creation_date", "comment": null}, "default_bid": {"type": "double precision", "index": 6, "name": "default_bid", "comment": null}, "name": {"type": "text", "index": 7, "name": "name", "comment": null}, "serving_status": {"type": "text", "index": 8, "name": "serving_status", "comment": null}, "state": {"type": "text", "index": 9, "name": "state", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__ad_group_history_tmp"}, "model.amazon_ads.stg_amazon_ads__ad_group_level_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__ad_group_level_report", "database": "postgres", "comment": "Each record in this table represents the daily performance by Amazon ad group.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_group_id": {"type": "text", "index": 2, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "campaign_bidding_strategy": {"type": "text", "index": 3, "name": "campaign_bidding_strategy", "comment": "The bidding strategy associated with a campaign."}, "clicks": {"type": "integer", "index": 4, "name": "clicks", "comment": "Total number of ad clicks."}, "cost": {"type": "double precision", "index": 5, "name": "cost", "comment": "Total cost of ad clicks."}, "date_day": {"type": "date", "index": 6, "name": "date_day", "comment": "The date of the report."}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": "Total number of ad impressions."}, "purchases_30_d": {"type": "integer", "index": 8, "name": "purchases_30_d", "comment": "Number of attributed conversion events occurring within 30 days of an ad click."}, "sales_30_d": {"type": "double precision", "index": 9, "name": "sales_30_d", "comment": "Total value of sales occurring within 30 days of an ad click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__ad_group_level_report"}, "model.amazon_ads.stg_amazon_ads__ad_group_level_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__ad_group_level_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "campaign_bidding_strategy": {"type": "text", "index": 4, "name": "campaign_bidding_strategy", "comment": null}, "clicks": {"type": "integer", "index": 5, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 6, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__ad_group_level_report_tmp"}, "model.amazon_ads.stg_amazon_ads__advertised_product_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__advertised_product_report", "database": "postgres", "comment": "Advertised product reports contain performance data for products that are advertised as part of your campaigns.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_id": {"type": "text", "index": 2, "name": "ad_id", "comment": "The ID of the AdGroup."}, "ad_group_id": {"type": "text", "index": 3, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "advertised_asin": {"type": "integer", "index": 4, "name": "advertised_asin", "comment": "The ASIN associated to an advertised product."}, "advertised_sku": {"type": "integer", "index": 5, "name": "advertised_sku", "comment": "The SKU being advertised."}, "campaign_budget_amount": {"type": "double precision", "index": 6, "name": "campaign_budget_amount", "comment": "Total budget allocated to the campaign."}, "campaign_budget_currency_code": {"type": "text", "index": 7, "name": "campaign_budget_currency_code", "comment": "The currency code associated with the campaign."}, "campaign_budget_type": {"type": "text", "index": 8, "name": "campaign_budget_type", "comment": "One of: daily or lifetime."}, "campaign_id": {"type": "text", "index": 9, "name": "campaign_id", "comment": "The ID of the Campaign."}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": "Total number of ad clicks."}, "cost": {"type": "double precision", "index": 11, "name": "cost", "comment": "Total cost of ad clicks."}, "date_day": {"type": "date", "index": 12, "name": "date_day", "comment": "The date of the report."}, "impressions": {"type": "integer", "index": 13, "name": "impressions", "comment": "Total number of ad impressions."}, "purchases_30_d": {"type": "integer", "index": 14, "name": "purchases_30_d", "comment": "Number of attributed conversion events occurring within 30 days of an ad click."}, "sales_30_d": {"type": "double precision", "index": 15, "name": "sales_30_d", "comment": "Total value of sales occurring within 30 days of an ad click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__advertised_product_report"}, "model.amazon_ads.stg_amazon_ads__advertised_product_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__advertised_product_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "integer", "index": 2, "name": "ad_id", "comment": null}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 4, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "campaign_budget_amount": {"type": "double precision", "index": 6, "name": "campaign_budget_amount", "comment": null}, "campaign_budget_currency_code": {"type": "text", "index": 7, "name": "campaign_budget_currency_code", "comment": null}, "campaign_budget_type": {"type": "text", "index": 8, "name": "campaign_budget_type", "comment": null}, "clicks": {"type": "integer", "index": 9, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 10, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 11, "name": "impressions", "comment": null}, "advertised_asin": {"type": "integer", "index": 12, "name": "advertised_asin", "comment": null}, "advertised_sku": {"type": "integer", "index": 13, "name": "advertised_sku", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__advertised_product_report_tmp"}, "model.amazon_ads.stg_amazon_ads__campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__campaign_history", "database": "postgres", "comment": "Each record represents a campaign in Amazon Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_id": {"type": "text", "index": 2, "name": "campaign_id", "comment": "The ID of the Campaign."}, "last_updated_date": {"type": "text", "index": 3, "name": "last_updated_date", "comment": "Date of last update to record."}, "bidding_strategy": {"type": "text", "index": 4, "name": "bidding_strategy", "comment": "The bidding strategy associated with a campaign (legacyForSales, autoForSales, or manual.)"}, "creation_date": {"type": "text", "index": 5, "name": "creation_date", "comment": "The date of creation of the record."}, "end_date": {"type": "integer", "index": 6, "name": "end_date", "comment": "The end date of the campaign."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the Campaign."}, "portfolio_id": {"type": "text", "index": 8, "name": "portfolio_id", "comment": "The ID of the Portfolio."}, "profile_id": {"type": "text", "index": 9, "name": "profile_id", "comment": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace."}, "serving_status": {"type": "text", "index": 10, "name": "serving_status", "comment": "The current serving status of the record."}, "start_date": {"type": "date", "index": 11, "name": "start_date", "comment": "The start date of the campaign."}, "state": {"type": "text", "index": 12, "name": "state", "comment": "The state of the record (enabled, paused, or archived)."}, "targeting_type": {"type": "text", "index": 13, "name": "targeting_type", "comment": "The type of targeting used for the campaign, either manual or auto."}, "budget": {"type": "integer", "index": 14, "name": "budget", "comment": "The budget for the campaign."}, "budget_type": {"type": "text", "index": 15, "name": "budget_type", "comment": "One of: daily or lifetime."}, "effective_budget": {"type": "integer", "index": 16, "name": "effective_budget", "comment": "Adjusted budget for the campaign that has been impacted by a budget rule."}, "is_most_recent_record": {"type": "boolean", "index": 17, "name": "is_most_recent_record", "comment": "Boolean indicating whether record was the most recent instance."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__campaign_history"}, "model.amazon_ads.stg_amazon_ads__campaign_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__campaign_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "bidding_strategy": {"type": "text", "index": 4, "name": "bidding_strategy", "comment": null}, "creation_date": {"type": "text", "index": 5, "name": "creation_date", "comment": null}, "budget": {"type": "integer", "index": 6, "name": "budget", "comment": null}, "end_date": {"type": "integer", "index": 7, "name": "end_date", "comment": null}, "name": {"type": "text", "index": 8, "name": "name", "comment": null}, "portfolio_id": {"type": "integer", "index": 9, "name": "portfolio_id", "comment": null}, "profile_id": {"type": "integer", "index": 10, "name": "profile_id", "comment": null}, "serving_status": {"type": "text", "index": 11, "name": "serving_status", "comment": null}, "start_date": {"type": "date", "index": 12, "name": "start_date", "comment": null}, "state": {"type": "text", "index": 13, "name": "state", "comment": null}, "targeting_type": {"type": "text", "index": 14, "name": "targeting_type", "comment": null}, "budget_type": {"type": "text", "index": 15, "name": "budget_type", "comment": null}, "effective_budget": {"type": "integer", "index": 16, "name": "effective_budget", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__campaign_history_tmp"}, "model.amazon_ads.stg_amazon_ads__campaign_level_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__campaign_level_report", "database": "postgres", "comment": "Campaign reports contain performance data broken down at the campaign level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_applicable_budget_rule_id": {"type": "integer", "index": 2, "name": "campaign_applicable_budget_rule_id", "comment": "The ID associated to the active budget rule for a campaign."}, "campaign_applicable_budget_rule_name": {"type": "integer", "index": 3, "name": "campaign_applicable_budget_rule_name", "comment": "The name associated to the active budget rule for a campaign."}, "campaign_bidding_strategy": {"type": "text", "index": 4, "name": "campaign_bidding_strategy", "comment": "The bidding strategy associated with a campaign."}, "campaign_budget_amount": {"type": "double precision", "index": 5, "name": "campaign_budget_amount", "comment": "Total budget allocated to the campaign."}, "campaign_budget_currency_code": {"type": "text", "index": 6, "name": "campaign_budget_currency_code", "comment": "The currency code associated with the campaign."}, "campaign_budget_type": {"type": "text", "index": 7, "name": "campaign_budget_type", "comment": "One of: daily or lifetime."}, "campaign_id": {"type": "text", "index": 8, "name": "campaign_id", "comment": "The ID of the Campaign."}, "campaign_rule_based_budget_amount": {"type": "integer", "index": 9, "name": "campaign_rule_based_budget_amount", "comment": "The value of the rule-based budget for a campaign."}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": "Total number of ad clicks."}, "cost": {"type": "double precision", "index": 11, "name": "cost", "comment": "Total cost of ad clicks."}, "date_day": {"type": "date", "index": 12, "name": "date_day", "comment": "The date of the report."}, "impressions": {"type": "integer", "index": 13, "name": "impressions", "comment": "Total number of ad impressions."}, "purchases_30_d": {"type": "integer", "index": 14, "name": "purchases_30_d", "comment": "Number of attributed conversion events occurring within 30 days of an ad click."}, "sales_30_d": {"type": "integer", "index": 15, "name": "sales_30_d", "comment": "Total value of sales occurring within 30 days of an ad click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__campaign_level_report"}, "model.amazon_ads.stg_amazon_ads__campaign_level_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__campaign_level_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "campaign_applicable_budget_rule_id": {"type": "integer", "index": 4, "name": "campaign_applicable_budget_rule_id", "comment": null}, "campaign_applicable_budget_rule_name": {"type": "integer", "index": 5, "name": "campaign_applicable_budget_rule_name", "comment": null}, "campaign_bidding_strategy": {"type": "text", "index": 6, "name": "campaign_bidding_strategy", "comment": null}, "campaign_budget_amount": {"type": "double precision", "index": 7, "name": "campaign_budget_amount", "comment": null}, "campaign_budget_currency_code": {"type": "text", "index": 8, "name": "campaign_budget_currency_code", "comment": null}, "campaign_budget_type": {"type": "text", "index": 9, "name": "campaign_budget_type", "comment": null}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 11, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 12, "name": "impressions", "comment": null}, "campaign_rule_based_budget_amount": {"type": "integer", "index": 13, "name": "campaign_rule_based_budget_amount", "comment": null}, "sales_7_d": {"type": "integer", "index": 14, "name": "sales_7_d", "comment": null}, "purchases_30_d": {"type": "integer", "index": 15, "name": "purchases_30_d", "comment": null}, "sales_30_d": {"type": "integer", "index": 16, "name": "sales_30_d", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__campaign_level_report_tmp"}, "model.amazon_ads.stg_amazon_ads__keyword_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__keyword_history", "database": "postgres", "comment": "Each record represents a keyword in Amazon Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "keyword_id": {"type": "text", "index": 2, "name": "keyword_id", "comment": "The ID of the keyword."}, "ad_group_id": {"type": "text", "index": 3, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "bid": {"type": "double precision", "index": 4, "name": "bid", "comment": "Bid associated with this keyword."}, "campaign_id": {"type": "text", "index": 5, "name": "campaign_id", "comment": "The ID of the Campaign."}, "creation_date": {"type": "text", "index": 6, "name": "creation_date", "comment": "The date of creation of the record."}, "keyword_text": {"type": "text", "index": 7, "name": "keyword_text", "comment": "The exact text for the keyword."}, "last_updated_date": {"type": "text", "index": 8, "name": "last_updated_date", "comment": "Date of last update to record."}, "match_type": {"type": "text", "index": 9, "name": "match_type", "comment": "One of (broad, exact, or phrase.)"}, "native_language_keyword": {"type": "integer", "index": 10, "name": "native_language_keyword", "comment": "The unlocalized keyword text in the preferred locale of the advertiser."}, "serving_status": {"type": "text", "index": 11, "name": "serving_status", "comment": "The current serving status of the record."}, "state": {"type": "text", "index": 12, "name": "state", "comment": "The state of the record (enabled, paused, or archived)."}, "native_language_locale": {"type": "integer", "index": 13, "name": "native_language_locale", "comment": "The preferred language locale of the advertiser."}, "is_most_recent_record": {"type": "boolean", "index": 14, "name": "is_most_recent_record", "comment": "Boolean indicating whether record was the most recent instance."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__keyword_history"}, "model.amazon_ads.stg_amazon_ads__keyword_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__keyword_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "ad_group_id": {"type": "integer", "index": 4, "name": "ad_group_id", "comment": null}, "bid": {"type": "double precision", "index": 5, "name": "bid", "comment": null}, "campaign_id": {"type": "integer", "index": 6, "name": "campaign_id", "comment": null}, "creation_date": {"type": "text", "index": 7, "name": "creation_date", "comment": null}, "keyword_text": {"type": "text", "index": 8, "name": "keyword_text", "comment": null}, "match_type": {"type": "text", "index": 9, "name": "match_type", "comment": null}, "native_language_keyword": {"type": "integer", "index": 10, "name": "native_language_keyword", "comment": null}, "serving_status": {"type": "text", "index": 11, "name": "serving_status", "comment": null}, "state": {"type": "text", "index": 12, "name": "state", "comment": null}, "native_language_locale": {"type": "integer", "index": 13, "name": "native_language_locale", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__keyword_history_tmp"}, "model.amazon_ads.stg_amazon_ads__portfolio_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__portfolio_history", "database": "postgres", "comment": "Each record represents a portfolio in Amazon Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "portfolio_id": {"type": "text", "index": 2, "name": "portfolio_id", "comment": "The ID of the Portfolio."}, "budget_amount": {"type": "integer", "index": 3, "name": "budget_amount", "comment": "The budget amount associated with the portfolio. Cannot be null."}, "budget_currency_code": {"type": "integer", "index": 4, "name": "budget_currency_code", "comment": "The currency used for all monetary values for entities under this profile. Cannot be null."}, "budget_end_date": {"type": "integer", "index": 5, "name": "budget_end_date", "comment": "The end date after which the budget is no longer applied. Optional if policy is set to dateRange or monthlyRecurring."}, "budget_policy": {"type": "integer", "index": 6, "name": "budget_policy", "comment": "The budget policy. Set to dateRange to specify a budget for a specific period of time. Set to monthlyRecurring to specify a budget that is automatically renewed at the beginning of each month. Cannot be null."}, "budget_start_date": {"type": "integer", "index": 7, "name": "budget_start_date", "comment": "The starting date in YYYYMMDD format to which the budget is applied. Required if policy is set to dateRange. Not specified if policy is set to monthlyRecurring. Note that the starting date for monthlyRecurring is the date when the policy is set."}, "creation_date": {"type": "text", "index": 8, "name": "creation_date", "comment": "The date of creation of the record."}, "in_budget": {"type": "boolean", "index": 9, "name": "in_budget", "comment": "Indicates the current budget status of the portfolio. Set to true if the portfolio is in budget, set to false if the portfolio is out of budget."}, "last_updated_date": {"type": "text", "index": 10, "name": "last_updated_date", "comment": "Date of last update to record."}, "portfolio_name": {"type": "text", "index": 11, "name": "portfolio_name", "comment": "The name of the Portfolio."}, "profile_id": {"type": "text", "index": 12, "name": "profile_id", "comment": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace."}, "serving_status": {"type": "text", "index": 13, "name": "serving_status", "comment": "The current serving status of the record."}, "state": {"type": "text", "index": 14, "name": "state", "comment": "The state of the record (enabled, paused, or archived)."}, "is_most_recent_record": {"type": "boolean", "index": 15, "name": "is_most_recent_record", "comment": "Boolean indicating whether record was the most recent instance."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__portfolio_history"}, "model.amazon_ads.stg_amazon_ads__portfolio_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__portfolio_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "budget_amount": {"type": "integer", "index": 4, "name": "budget_amount", "comment": null}, "budget_currency_code": {"type": "integer", "index": 5, "name": "budget_currency_code", "comment": null}, "budget_end_date": {"type": "integer", "index": 6, "name": "budget_end_date", "comment": null}, "budget_policy": {"type": "integer", "index": 7, "name": "budget_policy", "comment": null}, "budget_start_date": {"type": "integer", "index": 8, "name": "budget_start_date", "comment": null}, "creation_date": {"type": "text", "index": 9, "name": "creation_date", "comment": null}, "in_budget": {"type": "boolean", "index": 10, "name": "in_budget", "comment": null}, "name": {"type": "text", "index": 11, "name": "name", "comment": null}, "profile_id": {"type": "integer", "index": 12, "name": "profile_id", "comment": null}, "serving_status": {"type": "text", "index": 13, "name": "serving_status", "comment": null}, "state": {"type": "text", "index": 14, "name": "state", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__portfolio_history_tmp"}, "model.amazon_ads.stg_amazon_ads__product_ad_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__product_ad_history", "database": "postgres", "comment": "Each record represents a product in Amazon Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_id": {"type": "text", "index": 2, "name": "ad_id", "comment": "The ID of the Ad."}, "ad_group_id": {"type": "text", "index": 3, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "asin": {"type": "text", "index": 4, "name": "asin", "comment": "The ASIN associated with the ad."}, "campaign_id": {"type": "text", "index": 5, "name": "campaign_id", "comment": "The ID of the Campaign."}, "creation_date": {"type": "text", "index": 6, "name": "creation_date", "comment": "The date of creation of the record."}, "last_updated_date": {"type": "text", "index": 7, "name": "last_updated_date", "comment": "Date of last update to record."}, "serving_status": {"type": "text", "index": 8, "name": "serving_status", "comment": "The current serving status of the record."}, "sku": {"type": "integer", "index": 9, "name": "sku", "comment": "The product SKU associated with the ad."}, "state": {"type": "text", "index": 10, "name": "state", "comment": "The state of the record (enabled, paused, or archived)."}, "is_most_recent_record": {"type": "boolean", "index": 11, "name": "is_most_recent_record", "comment": "Boolean indicating whether record was the most recent instance."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__product_ad_history"}, "model.amazon_ads.stg_amazon_ads__product_ad_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__product_ad_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "ad_group_id": {"type": "integer", "index": 4, "name": "ad_group_id", "comment": null}, "asin": {"type": "text", "index": 5, "name": "asin", "comment": null}, "campaign_id": {"type": "integer", "index": 6, "name": "campaign_id", "comment": null}, "creation_date": {"type": "text", "index": 7, "name": "creation_date", "comment": null}, "serving_status": {"type": "text", "index": 8, "name": "serving_status", "comment": null}, "sku": {"type": "integer", "index": 9, "name": "sku", "comment": null}, "state": {"type": "text", "index": 10, "name": "state", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__product_ad_history_tmp"}, "model.amazon_ads.stg_amazon_ads__profile": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__profile", "database": "postgres", "comment": "Each record represents a profile. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "profile_id": {"type": "text", "index": 2, "name": "profile_id", "comment": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace."}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces."}, "account_marketplace_string_id": {"type": "text", "index": 4, "name": "account_marketplace_string_id", "comment": "The identifier of the marketplace to which the account is associated."}, "account_name": {"type": "text", "index": 5, "name": "account_name", "comment": "Account Name. Not currently populated for sellers."}, "account_sub_type": {"type": "integer", "index": 6, "name": "account_sub_type", "comment": "The account subtype."}, "account_type": {"type": "text", "index": 7, "name": "account_type", "comment": "One of seller, vendor, or agency."}, "account_valid_payment_method": {"type": "boolean", "index": 8, "name": "account_valid_payment_method", "comment": "For Vendors, this returns if the Advertiser has set up a valid payment method."}, "country_code": {"type": "text", "index": 9, "name": "country_code", "comment": "The code for a given country."}, "currency_code": {"type": "text", "index": 10, "name": "currency_code", "comment": "The currency used for all monetary values for entities under this profile."}, "daily_budget": {"type": "integer", "index": 11, "name": "daily_budget", "comment": "Daily budget for Sponsored Product campaigns for seller type accounts."}, "timezone": {"type": "text", "index": 12, "name": "timezone", "comment": "The time zone used for all date-based campaign management and reporting."}, "_fivetran_deleted": {"type": "boolean", "index": 13, "name": "_fivetran_deleted", "comment": "Boolean created by Fivetran to indicate whether the record has been deleted."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__profile"}, "model.amazon_ads.stg_amazon_ads__profile_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__profile_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": null}, "account_marketplace_string_id": {"type": "text", "index": 5, "name": "account_marketplace_string_id", "comment": null}, "account_name": {"type": "text", "index": 6, "name": "account_name", "comment": null}, "account_sub_type": {"type": "integer", "index": 7, "name": "account_sub_type", "comment": null}, "account_type": {"type": "text", "index": 8, "name": "account_type", "comment": null}, "account_valid_payment_method": {"type": "boolean", "index": 9, "name": "account_valid_payment_method", "comment": null}, "country_code": {"type": "text", "index": 10, "name": "country_code", "comment": null}, "currency_code": {"type": "text", "index": 11, "name": "currency_code", "comment": null}, "daily_budget": {"type": "integer", "index": 12, "name": "daily_budget", "comment": null}, "timezone": {"type": "text", "index": 13, "name": "timezone", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__profile_tmp"}, "model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__search_term_ad_keyword_report", "database": "postgres", "comment": "Search term reports contain search term performance metrics broken down by targeting expressions and keywords.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_group_id": {"type": "text", "index": 2, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "ad_keyword_status": {"type": "text", "index": 3, "name": "ad_keyword_status", "comment": "Current status of a keyword."}, "campaign_budget_amount": {"type": "double precision", "index": 4, "name": "campaign_budget_amount", "comment": "Total budget allocated to the campaign."}, "campaign_budget_currency_code": {"type": "text", "index": 5, "name": "campaign_budget_currency_code", "comment": "The currency code associated with the campaign."}, "campaign_budget_type": {"type": "text", "index": 6, "name": "campaign_budget_type", "comment": "One of: daily or lifetime."}, "campaign_id": {"type": "text", "index": 7, "name": "campaign_id", "comment": "The ID of the Campaign."}, "clicks": {"type": "integer", "index": 8, "name": "clicks", "comment": "Total number of ad clicks."}, "cost": {"type": "double precision", "index": 9, "name": "cost", "comment": "Total cost of ad clicks."}, "date_day": {"type": "date", "index": 10, "name": "date_day", "comment": "The date of the report."}, "impressions": {"type": "integer", "index": 11, "name": "impressions", "comment": "Total number of ad impressions."}, "keyword_bid": {"type": "double precision", "index": 12, "name": "keyword_bid", "comment": "Bid associated with a keyword or targeting expression."}, "keyword_id": {"type": "text", "index": 13, "name": "keyword_id", "comment": "The ID of the keyword."}, "search_term": {"type": "text", "index": 14, "name": "search_term", "comment": "The search term used by the customer."}, "targeting": {"type": "text", "index": 15, "name": "targeting", "comment": "A string representation of the expression object used in the targeting clause."}, "purchases_30_d": {"type": "integer", "index": 16, "name": "purchases_30_d", "comment": "Number of attributed conversion events occurring within 30 days of an ad click."}, "sales_30_d": {"type": "double precision", "index": 17, "name": "sales_30_d", "comment": "Total value of sales occurring within 30 days of an ad click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report"}, "model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__search_term_ad_keyword_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "keyword_id": {"type": "integer", "index": 4, "name": "keyword_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "campaign_budget_amount": {"type": "double precision", "index": 6, "name": "campaign_budget_amount", "comment": null}, "campaign_budget_currency_code": {"type": "text", "index": 7, "name": "campaign_budget_currency_code", "comment": null}, "campaign_budget_type": {"type": "text", "index": 8, "name": "campaign_budget_type", "comment": null}, "clicks": {"type": "integer", "index": 9, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 10, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 11, "name": "impressions", "comment": null}, "keyword_bid": {"type": "double precision", "index": 12, "name": "keyword_bid", "comment": null}, "search_term": {"type": "text", "index": 13, "name": "search_term", "comment": null}, "targeting": {"type": "text", "index": 14, "name": "targeting", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report_tmp"}, "model.amazon_ads.stg_amazon_ads__targeting_keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__targeting_keyword_report", "database": "postgres", "comment": "Targeting reports contain performance metrics broken down by both targeting expressions and keywords.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_group_id": {"type": "text", "index": 2, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "ad_keyword_status": {"type": "text", "index": 3, "name": "ad_keyword_status", "comment": "Current status of a keyword."}, "campaign_budget_amount": {"type": "double precision", "index": 4, "name": "campaign_budget_amount", "comment": "Total budget allocated to the campaign."}, "campaign_budget_currency_code": {"type": "text", "index": 5, "name": "campaign_budget_currency_code", "comment": "The currency code associated with the campaign."}, "campaign_budget_type": {"type": "text", "index": 6, "name": "campaign_budget_type", "comment": "One of: daily or lifetime."}, "campaign_id": {"type": "text", "index": 7, "name": "campaign_id", "comment": "The ID of the Campaign."}, "clicks": {"type": "integer", "index": 8, "name": "clicks", "comment": "Total number of ad clicks."}, "cost": {"type": "double precision", "index": 9, "name": "cost", "comment": "Total cost of ad clicks."}, "date_day": {"type": "date", "index": 10, "name": "date_day", "comment": "The date of the report."}, "impressions": {"type": "integer", "index": 11, "name": "impressions", "comment": "Total number of ad impressions."}, "keyword_bid": {"type": "double precision", "index": 12, "name": "keyword_bid", "comment": "Bid associated with a keyword or targeting expression."}, "keyword_id": {"type": "text", "index": 13, "name": "keyword_id", "comment": "The ID of the keyword."}, "keyword_type": {"type": "text", "index": 14, "name": "keyword_type", "comment": "Type of matching for the keyword used in bid. One of: BROAD, PHRASE, or EXACT."}, "match_type": {"type": "text", "index": 15, "name": "match_type", "comment": "Type of matching for the keyword used in bid. One of: BROAD, PHRASE, or EXACT."}, "targeting": {"type": "text", "index": 16, "name": "targeting", "comment": "A string representation of the expression object used in the targeting clause."}, "purchases_30_d": {"type": "integer", "index": 17, "name": "purchases_30_d", "comment": "Number of attributed conversion events occurring within 30 days of an ad click."}, "sales_30_d": {"type": "double precision", "index": 18, "name": "sales_30_d", "comment": "Total value of sales occurring within 30 days of an ad click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__targeting_keyword_report"}, "model.amazon_ads.stg_amazon_ads__targeting_keyword_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__targeting_keyword_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "keyword_id": {"type": "integer", "index": 4, "name": "keyword_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "ad_keyword_status": {"type": "text", "index": 6, "name": "ad_keyword_status", "comment": null}, "campaign_budget_amount": {"type": "double precision", "index": 7, "name": "campaign_budget_amount", "comment": null}, "campaign_budget_currency_code": {"type": "text", "index": 8, "name": "campaign_budget_currency_code", "comment": null}, "campaign_budget_type": {"type": "text", "index": 9, "name": "campaign_budget_type", "comment": null}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 11, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 12, "name": "impressions", "comment": null}, "keyword_bid": {"type": "double precision", "index": 13, "name": "keyword_bid", "comment": null}, "keyword_type": {"type": "text", "index": 14, "name": "keyword_type", "comment": null}, "match_type": {"type": "text", "index": 15, "name": "match_type", "comment": null}, "targeting": {"type": "text", "index": 16, "name": "targeting", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__targeting_keyword_report_tmp"}, "model.apple_search_ads.stg_apple_search_ads__ad_group_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_group_history", "database": "postgres", "comment": "Each record represents a version of an ad group in Apple Search Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "modified_at": {"type": "timestamp without time zone", "index": 2, "name": "modified_at", "comment": "Timestamp of when the ad group object was last modified."}, "organization_id": {"type": "integer", "index": 3, "name": "organization_id", "comment": "Organization ID associated with the record."}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": "Campaign ID associated with the record."}, "ad_group_name": {"type": "text", "index": 5, "name": "ad_group_name", "comment": "Ad group name."}, "ad_group_id": {"type": "integer", "index": 6, "name": "ad_group_id", "comment": "Ad group ID associated with the record."}, "ad_group_status": {"type": "text", "index": 7, "name": "ad_group_status", "comment": null}, "start_at": {"type": "timestamp without time zone", "index": 8, "name": "start_at", "comment": "The designated ad group start time."}, "end_at": {"type": "timestamp without time zone", "index": 9, "name": "end_at", "comment": "The designated ad group end time."}, "is_most_recent_record": {"type": "boolean", "index": 10, "name": "is_most_recent_record", "comment": "Boolean indicating whether record was the most recent instance."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_group_history"}, "model.apple_search_ads.stg_apple_search_ads__ad_group_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_group_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "timestamp without time zone", "index": 2, "name": "modification_time", "comment": null}, "automated_keywords_opt_in": {"type": "boolean", "index": 3, "name": "automated_keywords_opt_in", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "cpa_goal_amount": {"type": "integer", "index": 5, "name": "cpa_goal_amount", "comment": null}, "cpa_goal_currency": {"type": "integer", "index": 6, "name": "cpa_goal_currency", "comment": null}, "default_cpc_bid_amount": {"type": "integer", "index": 7, "name": "default_cpc_bid_amount", "comment": null}, "default_cpc_bid_currency": {"type": "integer", "index": 8, "name": "default_cpc_bid_currency", "comment": null}, "deleted": {"type": "boolean", "index": 9, "name": "deleted", "comment": null}, "end_time": {"type": "timestamp without time zone", "index": 10, "name": "end_time", "comment": null}, "name": {"type": "text", "index": 11, "name": "name", "comment": null}, "organization_id": {"type": "integer", "index": 12, "name": "organization_id", "comment": null}, "serving_state_reasons": {"type": "integer", "index": 13, "name": "serving_state_reasons", "comment": null}, "serving_status": {"type": "text", "index": 14, "name": "serving_status", "comment": null}, "start_time": {"type": "timestamp without time zone", "index": 15, "name": "start_time", "comment": null}, "status": {"type": "text", "index": 16, "name": "status", "comment": null}, "storefronts": {"type": "integer", "index": 17, "name": "storefronts", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_group_history_tmp"}, "model.apple_search_ads.stg_apple_search_ads__ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_group_report", "database": "postgres", "comment": "Each record represents the daily performance of an ad group in Apple Search Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Date for daily report aggregation."}, "ad_group_id": {"type": "integer", "index": 3, "name": "ad_group_id", "comment": "Ad group ID associated with the record."}, "impressions": {"type": "integer", "index": 4, "name": "impressions", "comment": "Number of times your ad appeared in App Store search results."}, "spend": {"type": "double precision", "index": 5, "name": "spend", "comment": "The sum of costs associated with the number of impressions served. Spend is measured in the currency used in the campaign."}, "currency": {"type": "text", "index": 6, "name": "currency", "comment": "This currency value should match the respective organization's currency value."}, "conversions": {"type": "integer", "index": 7, "name": "conversions", "comment": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025."}, "tap_installs": {"type": "integer", "index": 8, "name": "tap_installs", "comment": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field."}, "new_downloads": {"type": "integer", "index": 9, "name": "new_downloads", "comment": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025."}, "tap_new_downloads": {"type": "integer", "index": 10, "name": "tap_new_downloads", "comment": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field."}, "redownloads": {"type": "integer", "index": 11, "name": "redownloads", "comment": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025."}, "tap_redownloads": {"type": "integer", "index": 12, "name": "tap_redownloads", "comment": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field."}, "taps": {"type": "integer", "index": 13, "name": "taps", "comment": "The number of times ad was tapped by users within the reporting time period."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_group_report"}, "model.apple_search_ads.stg_apple_search_ads__ad_group_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_group_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "avg_cpa_amount": {"type": "double precision", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "text", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "double precision", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "text", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "double precision", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "integer", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "integer", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "integer", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "double precision", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "integer", "index": 17, "name": "taps", "comment": null}, "tap_installs": {"type": "integer", "index": 18, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 19, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 20, "name": "tap_redownloads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_group_report_tmp"}, "model.apple_search_ads.stg_apple_search_ads__ad_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_history", "database": "postgres", "comment": "Each record represents a version of an ad in Apple Search Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "created_at": {"type": "timestamp without time zone", "index": 2, "name": "created_at", "comment": "Timestamp of when ad was created."}, "modified_at": {"type": "timestamp without time zone", "index": 3, "name": "modified_at", "comment": "Timestamp of when the ad object was last modified."}, "organization_id": {"type": "integer", "index": 4, "name": "organization_id", "comment": "Organization ID associated with the record."}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": "Campaign ID associated with the record."}, "ad_group_id": {"type": "integer", "index": 6, "name": "ad_group_id", "comment": "Ad group ID associated with the record."}, "ad_name": {"type": "text", "index": 7, "name": "ad_name", "comment": "Ad name associated with the record."}, "ad_id": {"type": "integer", "index": 8, "name": "ad_id", "comment": "Ad ID associated with the record."}, "ad_status": {"type": "text", "index": 9, "name": "ad_status", "comment": "The current status of the ad, values include ENABLED and PAUSED."}, "is_most_recent_record": {"type": "boolean", "index": 10, "name": "is_most_recent_record", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_history"}, "model.apple_search_ads.stg_apple_search_ads__ad_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"creation_time": {"type": "timestamp without time zone", "index": 1, "name": "creation_time", "comment": null}, "modification_time": {"type": "timestamp without time zone", "index": 2, "name": "modification_time", "comment": null}, "org_id": {"type": "integer", "index": 3, "name": "org_id", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "integer", "index": 5, "name": "ad_group_id", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "id": {"type": "integer", "index": 7, "name": "id", "comment": null}, "creative_id": {"type": "integer", "index": 8, "name": "creative_id", "comment": null}, "creative_type": {"type": "text", "index": 9, "name": "creative_type", "comment": null}, "status": {"type": "text", "index": 10, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_history_tmp"}, "model.apple_search_ads.stg_apple_search_ads__ad_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_report", "database": "postgres", "comment": "Each record represents the daily performance of an ad in Apple Search Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Date for daily report aggregation."}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": "Campaign ID associated with the record."}, "ad_group_id": {"type": "integer", "index": 4, "name": "ad_group_id", "comment": "Ad group ID associated with the record."}, "ad_id": {"type": "integer", "index": 5, "name": "ad_id", "comment": "Ad ID associated with the record."}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": "Number of times your ad appeared in App Store search results."}, "spend": {"type": "double precision", "index": 7, "name": "spend", "comment": "The sum of costs associated with the number of impressions served; Spend is measured in the currency used in the campaign."}, "currency": {"type": "text", "index": 8, "name": "currency", "comment": "This currency value should match the respective organization's currency value."}, "conversions": {"type": "integer", "index": 9, "name": "conversions", "comment": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025."}, "tap_installs": {"type": "integer", "index": 10, "name": "tap_installs", "comment": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field."}, "new_downloads": {"type": "integer", "index": 11, "name": "new_downloads", "comment": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025."}, "tap_new_downloads": {"type": "integer", "index": 12, "name": "tap_new_downloads", "comment": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field."}, "redownloads": {"type": "integer", "index": 13, "name": "redownloads", "comment": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025."}, "tap_redownloads": {"type": "integer", "index": 14, "name": "tap_redownloads", "comment": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field."}, "taps": {"type": "integer", "index": 15, "name": "taps", "comment": "The number of times ad was tapped by users within the reporting time period."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_report"}, "model.apple_search_ads.stg_apple_search_ads__ad_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "integer", "index": 3, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "integer", "index": 4, "name": "ad_id", "comment": null}, "impressions": {"type": "integer", "index": 5, "name": "impressions", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 6, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 7, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 8, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 9, "name": "redownloads", "comment": null}, "tap_installs": {"type": "integer", "index": 10, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 11, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 12, "name": "tap_redownloads", "comment": null}, "taps": {"type": "integer", "index": 13, "name": "taps", "comment": null}, "conversions": {"type": "integer", "index": 14, "name": "conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_report_tmp"}, "model.apple_search_ads.stg_apple_search_ads__campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__campaign_history", "database": "postgres", "comment": "Each record represents a version of a campaign in Apple Search Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "modified_at": {"type": "timestamp without time zone", "index": 2, "name": "modified_at", "comment": "Timestamp of when the campaign object was last modified."}, "organization_id": {"type": "integer", "index": 3, "name": "organization_id", "comment": "Organization ID associated with the record."}, "campaign_name": {"type": "text", "index": 4, "name": "campaign_name", "comment": "Campaign name for the record."}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": "Campaign ID associated with the record."}, "campaign_status": {"type": "text", "index": 6, "name": "campaign_status", "comment": null}, "start_at": {"type": "timestamp without time zone", "index": 7, "name": "start_at", "comment": "The designated ad group start time (ad group with the earliest start time associated with this campaign)."}, "end_at": {"type": "timestamp without time zone", "index": 8, "name": "end_at", "comment": "The designated campaign end time (ad group with the latest start time associated with this campaign)."}, "is_most_recent_record": {"type": "boolean", "index": 9, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__campaign_history"}, "model.apple_search_ads.stg_apple_search_ads__campaign_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__campaign_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "timestamp without time zone", "index": 2, "name": "modification_time", "comment": null}, "adam_id": {"type": "integer", "index": 3, "name": "adam_id", "comment": null}, "budget_amount": {"type": "integer", "index": 4, "name": "budget_amount", "comment": null}, "budget_currency": {"type": "text", "index": 5, "name": "budget_currency", "comment": null}, "budget_orders": {"type": "text", "index": 6, "name": "budget_orders", "comment": null}, "daily_budget_amount": {"type": "integer", "index": 7, "name": "daily_budget_amount", "comment": null}, "daily_budget_currency": {"type": "text", "index": 8, "name": "daily_budget_currency", "comment": null}, "deleted": {"type": "boolean", "index": 9, "name": "deleted", "comment": null}, "end_time": {"type": "timestamp without time zone", "index": 10, "name": "end_time", "comment": null}, "loc_invoice_detail_buyer_email": {"type": "integer", "index": 11, "name": "loc_invoice_detail_buyer_email", "comment": null}, "loc_invoice_detail_buyer_name": {"type": "integer", "index": 12, "name": "loc_invoice_detail_buyer_name", "comment": null}, "loc_invoice_detail_client_name": {"type": "integer", "index": 13, "name": "loc_invoice_detail_client_name", "comment": null}, "loc_invoice_detail_order_number": {"type": "integer", "index": 14, "name": "loc_invoice_detail_order_number", "comment": null}, "name": {"type": "text", "index": 15, "name": "name", "comment": null}, "organization_id": {"type": "integer", "index": 16, "name": "organization_id", "comment": null}, "payment_model": {"type": "text", "index": 17, "name": "payment_model", "comment": null}, "serving_state_reasons": {"type": "text", "index": 18, "name": "serving_state_reasons", "comment": null}, "serving_status": {"type": "text", "index": 19, "name": "serving_status", "comment": null}, "start_time": {"type": "timestamp without time zone", "index": 20, "name": "start_time", "comment": null}, "status": {"type": "text", "index": 21, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__campaign_history_tmp"}, "model.apple_search_ads.stg_apple_search_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__campaign_report", "database": "postgres", "comment": "Each record represents the daily performance of a campaign in Apple Search Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Date for daily report aggregation."}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": "Campaign ID associated with the record."}, "impressions": {"type": "integer", "index": 4, "name": "impressions", "comment": "Number of times your ad appeared in App Store search results."}, "spend": {"type": "double precision", "index": 5, "name": "spend", "comment": "The sum of costs associated with the number of impressions served; Spend is measured in the currency used in the campaign."}, "currency": {"type": "text", "index": 6, "name": "currency", "comment": "This currency value should match the respective organization's currency value."}, "conversions": {"type": "integer", "index": 7, "name": "conversions", "comment": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025."}, "tap_installs": {"type": "integer", "index": 8, "name": "tap_installs", "comment": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field."}, "new_downloads": {"type": "integer", "index": 9, "name": "new_downloads", "comment": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025."}, "tap_new_downloads": {"type": "integer", "index": 10, "name": "tap_new_downloads", "comment": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field."}, "redownloads": {"type": "integer", "index": 11, "name": "redownloads", "comment": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025."}, "tap_redownloads": {"type": "integer", "index": 12, "name": "tap_redownloads", "comment": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field."}, "taps": {"type": "integer", "index": 13, "name": "taps", "comment": "The number of times ad was tapped by users within the reporting time period."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__campaign_report"}, "model.apple_search_ads.stg_apple_search_ads__campaign_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__campaign_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "id": {"type": "integer", "index": 2, "name": "id", "comment": null}, "avg_cpa_amount": {"type": "double precision", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "text", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "double precision", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "text", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "double precision", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "integer", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "integer", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "integer", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "double precision", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "integer", "index": 17, "name": "taps", "comment": null}, "tap_installs": {"type": "integer", "index": 18, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 19, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 20, "name": "tap_redownloads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__campaign_report_tmp"}, "model.apple_search_ads.stg_apple_search_ads__keyword_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__keyword_history", "database": "postgres", "comment": "Each record represents a version of a keyword in Apple Search Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "modified_at": {"type": "timestamp without time zone", "index": 2, "name": "modified_at", "comment": "Timestamp of when the keyword object was last modified."}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": "Campaign ID associated with the record."}, "ad_group_id": {"type": "integer", "index": 4, "name": "ad_group_id", "comment": "Ad group ID associated with the record."}, "keyword_id": {"type": "integer", "index": 5, "name": "keyword_id", "comment": "Keyword ID associated with the record."}, "bid_amount": {"type": "double precision", "index": 6, "name": "bid_amount", "comment": "The bid amount to display your ad for the matching text value."}, "bid_currency": {"type": "text", "index": 7, "name": "bid_currency", "comment": "This currency value should match the respective organization's currency value."}, "match_type": {"type": "text", "index": 8, "name": "match_type", "comment": "Controls how ads are matched to user searches; EXACT or BROAD."}, "keyword_status": {"type": "text", "index": 9, "name": "keyword_status", "comment": null}, "keyword_text": {"type": "text", "index": 10, "name": "keyword_text", "comment": "The word or phrase to match in user searches, to show respective ad."}, "is_most_recent_record": {"type": "boolean", "index": 11, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__keyword_history"}, "model.apple_search_ads.stg_apple_search_ads__keyword_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__keyword_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "timestamp without time zone", "index": 2, "name": "modification_time", "comment": null}, "ad_group_id": {"type": "integer", "index": 3, "name": "ad_group_id", "comment": null}, "bid_amount": {"type": "double precision", "index": 4, "name": "bid_amount", "comment": null}, "bid_currency": {"type": "text", "index": 5, "name": "bid_currency", "comment": null}, "campaign_id": {"type": "integer", "index": 6, "name": "campaign_id", "comment": null}, "deleted": {"type": "boolean", "index": 7, "name": "deleted", "comment": null}, "match_type": {"type": "text", "index": 8, "name": "match_type", "comment": null}, "status": {"type": "text", "index": 9, "name": "status", "comment": null}, "text": {"type": "text", "index": 10, "name": "text", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__keyword_history_tmp"}, "model.apple_search_ads.stg_apple_search_ads__keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__keyword_report", "database": "postgres", "comment": "Each record represents the daily performance of a keyword in Apple Search Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Date for daily report aggregation."}, "keyword_id": {"type": "integer", "index": 3, "name": "keyword_id", "comment": "Keyword ID associated with the record."}, "impressions": {"type": "integer", "index": 4, "name": "impressions", "comment": "Number of times your ad appeared in App Store search results."}, "spend": {"type": "double precision", "index": 5, "name": "spend", "comment": "The sum of costs associated with the number of impressions served; Spend is measured in the currency used in the campaign."}, "currency": {"type": "text", "index": 6, "name": "currency", "comment": "This currency value should match the respective organization's currency value."}, "conversions": {"type": "integer", "index": 7, "name": "conversions", "comment": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025."}, "tap_installs": {"type": "integer", "index": 8, "name": "tap_installs", "comment": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field."}, "new_downloads": {"type": "integer", "index": 9, "name": "new_downloads", "comment": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025."}, "tap_new_downloads": {"type": "integer", "index": 10, "name": "tap_new_downloads", "comment": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field."}, "redownloads": {"type": "integer", "index": 11, "name": "redownloads", "comment": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025."}, "tap_redownloads": {"type": "integer", "index": 12, "name": "tap_redownloads", "comment": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field."}, "taps": {"type": "integer", "index": 13, "name": "taps", "comment": "The number of times ad was tapped by users within the reporting time period."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__keyword_report"}, "model.apple_search_ads.stg_apple_search_ads__keyword_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__keyword_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "id": {"type": "integer", "index": 2, "name": "id", "comment": null}, "avg_cpa_amount": {"type": "double precision", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "text", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "double precision", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "text", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "double precision", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "integer", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "integer", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "integer", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "double precision", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "integer", "index": 17, "name": "taps", "comment": null}, "tap_installs": {"type": "integer", "index": 18, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 19, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 20, "name": "tap_redownloads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__keyword_report_tmp"}, "model.apple_search_ads.stg_apple_search_ads__organization": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__organization", "database": "postgres", "comment": "Each record represents an organization in Apple Search Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "organization_id": {"type": "integer", "index": 2, "name": "organization_id", "comment": "Organization ID associated with the record."}, "currency": {"type": "text", "index": 3, "name": "currency", "comment": "Specified currency for respective organization."}, "payment_model": {"type": "text", "index": 4, "name": "payment_model", "comment": "Values include 'LOC', 'PAYG' or (payment method hasn't been set)."}, "organization_name": {"type": "text", "index": 5, "name": "organization_name", "comment": "Name of organization."}, "time_zone": {"type": "text", "index": 6, "name": "time_zone", "comment": "Organization default timezone; values can be ORTZ or UTC."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__organization"}, "model.apple_search_ads.stg_apple_search_ads__organization_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__organization_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "currency": {"type": "text", "index": 2, "name": "currency", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "payment_model": {"type": "text", "index": 4, "name": "payment_model", "comment": null}, "role_names": {"type": "text", "index": 5, "name": "role_names", "comment": null}, "time_zone": {"type": "text", "index": 6, "name": "time_zone", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__organization_tmp"}, "model.apple_search_ads.stg_apple_search_ads__search_term_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__search_term_report", "database": "postgres", "comment": "Each record represents the daily performance of a search term in Apple Search Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Date for daily report aggregation."}, "_fivetran_id": {"type": "text", "index": 3, "name": "_fivetran_id", "comment": "A Fivetran internal unique id that helps us avoid duplicate rows in primary keyless tables."}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": "Campaign ID associated with the record."}, "ad_group_id": {"type": "integer", "index": 5, "name": "ad_group_id", "comment": "Ad group ID associated with the record."}, "ad_group_name": {"type": "text", "index": 6, "name": "ad_group_name", "comment": "Ad group name."}, "bid_amount": {"type": "double precision", "index": 7, "name": "bid_amount", "comment": "The bid amount to display your ad for the matching text value."}, "bid_currency": {"type": "text", "index": 8, "name": "bid_currency", "comment": "This currency value should match the respective organization's currency value."}, "keyword_text": {"type": "text", "index": 9, "name": "keyword_text", "comment": "The word or phrase to match in user searches, to show respective ad."}, "keyword_display_status": {"type": "text", "index": 10, "name": "keyword_display_status", "comment": "The keyword display status can either be ACTIVE or PAUSED."}, "keyword_id": {"type": "integer", "index": 11, "name": "keyword_id", "comment": "Keyword ID associated with the record."}, "spend": {"type": "double precision", "index": 12, "name": "spend", "comment": "The sum of costs associated with the number of impressions served; Spend is measured in the currency used in the campaign."}, "currency": {"type": "text", "index": 13, "name": "currency", "comment": "This currency value should match the respective organization's currency value."}, "match_type": {"type": "text", "index": 14, "name": "match_type", "comment": "Controls how ads are matched to user searches; values include EXACT, BROAD or AUTO."}, "search_term_source": {"type": "text", "index": 15, "name": "search_term_source", "comment": "The search term source can either be TARGETED or AUTO; if this value is AUTO so will match_type."}, "search_term_text": {"type": "text", "index": 16, "name": "search_term_text", "comment": "The word or phrase to match of user searches."}, "impressions": {"type": "integer", "index": 17, "name": "impressions", "comment": "Number of times your ad appeared in App Store search results."}, "taps": {"type": "integer", "index": 18, "name": "taps", "comment": "The number of times ad was tapped by users within the reporting time period."}, "conversions": {"type": "integer", "index": 19, "name": "conversions", "comment": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025."}, "tap_installs": {"type": "integer", "index": 20, "name": "tap_installs", "comment": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field."}, "new_downloads": {"type": "integer", "index": 21, "name": "new_downloads", "comment": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025."}, "tap_new_downloads": {"type": "integer", "index": 22, "name": "tap_new_downloads", "comment": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field."}, "redownloads": {"type": "integer", "index": 23, "name": "redownloads", "comment": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025."}, "tap_redownloads": {"type": "integer", "index": 24, "name": "tap_redownloads", "comment": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__search_term_report"}, "model.apple_search_ads.stg_apple_search_ads__search_term_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__search_term_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "ad_group_id": {"type": "integer", "index": 2, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 4, "name": "date", "comment": null}, "ad_group_deleted": {"type": "boolean", "index": 5, "name": "ad_group_deleted", "comment": null}, "ad_group_name": {"type": "text", "index": 6, "name": "ad_group_name", "comment": null}, "avg_cpa_amount": {"type": "double precision", "index": 7, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "text", "index": 8, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "double precision", "index": 9, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "text", "index": 10, "name": "avg_cpt_currency", "comment": null}, "bid_amount_amount": {"type": "double precision", "index": 11, "name": "bid_amount_amount", "comment": null}, "bid_amount_currency": {"type": "text", "index": 12, "name": "bid_amount_currency", "comment": null}, "conversion_rate": {"type": "double precision", "index": 13, "name": "conversion_rate", "comment": null}, "conversions": {"type": "integer", "index": 14, "name": "conversions", "comment": null}, "deleted": {"type": "boolean", "index": 15, "name": "deleted", "comment": null}, "impressions": {"type": "integer", "index": 16, "name": "impressions", "comment": null}, "keyword": {"type": "text", "index": 17, "name": "keyword", "comment": null}, "keyword_display_status": {"type": "text", "index": 18, "name": "keyword_display_status", "comment": null}, "keyword_id": {"type": "integer", "index": 19, "name": "keyword_id", "comment": null}, "lat_off_installs": {"type": "integer", "index": 20, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "integer", "index": 21, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 22, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 23, "name": "local_spend_currency", "comment": null}, "match_type": {"type": "text", "index": 24, "name": "match_type", "comment": null}, "new_downloads": {"type": "integer", "index": 25, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 26, "name": "redownloads", "comment": null}, "search_term_source": {"type": "text", "index": 27, "name": "search_term_source", "comment": null}, "search_term_text": {"type": "text", "index": 28, "name": "search_term_text", "comment": null}, "tap_through_rate": {"type": "double precision", "index": 29, "name": "tap_through_rate", "comment": null}, "taps": {"type": "integer", "index": 30, "name": "taps", "comment": null}, "tap_installs": {"type": "integer", "index": 31, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 32, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 33, "name": "tap_redownloads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__search_term_report_tmp"}, "model.facebook_ads.stg_facebook_ads__account_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__account_history", "database": "postgres", "comment": "Each record in this table reflects a Facebook ad account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": "The ID of the ad account."}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": "When the record was last synced by Fivetran."}, "account_name": {"type": "character varying", "index": 4, "name": "account_name", "comment": "Name of the account."}, "account_status": {"type": "text", "index": 5, "name": "account_status", "comment": "Current status of account."}, "business_country_code": {"type": "text", "index": 6, "name": "business_country_code", "comment": "Country code of business associated to account."}, "business_state": {"type": "text", "index": 7, "name": "business_state", "comment": "State abbreviation for business address."}, "created_at": {"type": "timestamp without time zone", "index": 8, "name": "created_at", "comment": "The time account was created."}, "currency": {"type": "text", "index": 9, "name": "currency", "comment": "Currency associated with account."}, "timezone_name": {"type": "text", "index": 10, "name": "timezone_name", "comment": "Timezone associated with account."}, "timezone_offset_hours_utc": {"type": "double precision", "index": 11, "name": "timezone_offset_hours_utc", "comment": "Time zone difference from UTC."}, "min_daily_budget": {"type": "integer", "index": 12, "name": "min_daily_budget", "comment": "The minimum daily budget for this Ad Account."}, "is_most_recent_record": {"type": "boolean", "index": 13, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record. All records should have this value set to True given we filter on it."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__account_history"}, "model.facebook_ads.stg_facebook_ads__account_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__account_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "character varying", "index": 2, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__account_history_tmp"}, "model.facebook_ads.stg_facebook_ads__ad_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__ad_history", "database": "postgres", "comment": "Each record in this table reflects a Facebook ad.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": "The timestamp of the last update of a record."}, "ad_id": {"type": "bigint", "index": 3, "name": "ad_id", "comment": "The ID of this ad."}, "ad_name": {"type": "text", "index": 4, "name": "ad_name", "comment": "Name of the ad."}, "account_id": {"type": "bigint", "index": 5, "name": "account_id", "comment": "The ID of the ad account that this ad belongs to."}, "ad_set_id": {"type": "bigint", "index": 6, "name": "ad_set_id", "comment": "ID of the ad set that contains the ad."}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": "Ad campaign that contains this ad."}, "creative_id": {"type": "bigint", "index": 8, "name": "creative_id", "comment": "The ID of the ad creative to be used by this ad."}, "conversion_domain": {"type": "text", "index": 9, "name": "conversion_domain", "comment": "The domain you've configured the ad to convert to."}, "is_most_recent_record": {"type": "boolean", "index": 10, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record. All records should have this value set to True given we filter on it."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__ad_history"}, "model.facebook_ads.stg_facebook_ads__ad_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__ad_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "ad_set_id": {"type": "bigint", "index": 3, "name": "ad_set_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": null}, "creative_id": {"type": "bigint", "index": 5, "name": "creative_id", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}, "updated_time": {"type": "timestamp without time zone", "index": 8, "name": "updated_time", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__ad_history_tmp"}, "model.facebook_ads.stg_facebook_ads__ad_set_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__ad_set_history", "database": "postgres", "comment": "Each record in this table reflects a Facebook ad set.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": "The timestamp of the last update of a record."}, "ad_set_id": {"type": "bigint", "index": 3, "name": "ad_set_id", "comment": "The ID of the ad set."}, "ad_set_name": {"type": "text", "index": 4, "name": "ad_set_name", "comment": "The name of the ad set."}, "account_id": {"type": "bigint", "index": 5, "name": "account_id", "comment": "The ID of the ad account that this ad set belongs to."}, "campaign_id": {"type": "bigint", "index": 6, "name": "campaign_id", "comment": "Ad campaign that contains this ad set."}, "start_at": {"type": "timestamp without time zone", "index": 7, "name": "start_at", "comment": "Timestamp of designated ad set start time."}, "end_at": {"type": "timestamp without time zone", "index": 8, "name": "end_at", "comment": "Timestamp of designated ad set end time."}, "bid_strategy": {"type": "text", "index": 9, "name": "bid_strategy", "comment": "Bid strategy values are - 'LOWEST_COST_WITHOUT_CAP', 'LOWEST_COST_WITH_BID_CAP', 'COST_CAP', 'LOWEST_COST_WITH_MIN_ROAS'."}, "daily_budget": {"type": "integer", "index": 10, "name": "daily_budget", "comment": "Daily budget of ad set."}, "budget_remaining": {"type": "integer", "index": 11, "name": "budget_remaining", "comment": "Remaining budget of ad set."}, "status": {"type": "text", "index": 12, "name": "status", "comment": "Status values are - 'ACTIVE', 'PAUSED', 'DELETED', 'ARCHIVED'."}, "optimization_goal": {"type": "text", "index": 13, "name": "optimization_goal", "comment": "The optimization goal this ad set is using. Possible values defined [here](https://developers.facebook.com/docs/marketing-api/reference/ad-campaign/#fields)."}, "is_most_recent_record": {"type": "boolean", "index": 14, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record. All records should have this value set to True given we filter on it."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__ad_set_history"}, "model.facebook_ads.stg_facebook_ads__ad_set_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__ad_set_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "updated_time": {"type": "timestamp without time zone", "index": 6, "name": "updated_time", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__ad_set_history_tmp"}, "model.facebook_ads.stg_facebook_ads__basic_ad": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__basic_ad", "database": "postgres", "comment": "Each record represents the daily performance of an ad in Facebook.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_id": {"type": "bigint", "index": 2, "name": "ad_id", "comment": "The ID of the ad the report relates to."}, "ad_name": {"type": "text", "index": 3, "name": "ad_name", "comment": "Name of the ad the report relates to."}, "ad_set_name": {"type": "text", "index": 4, "name": "ad_set_name", "comment": "Name of the ad set the report relates to."}, "date_day": {"type": "date", "index": 5, "name": "date_day", "comment": "The date of the reported performance."}, "account_id": {"type": "bigint", "index": 6, "name": "account_id", "comment": "The ID of the ad account that this ad belongs to."}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": "The number of impressions the ad had on the given day."}, "clicks": {"type": "integer", "index": 8, "name": "clicks", "comment": "The number of clicks the ad had on the given day."}, "spend": {"type": "double precision", "index": 9, "name": "spend", "comment": "The spend on the ad in the given day."}, "reach": {"type": "integer", "index": 10, "name": "reach", "comment": "The number of people who saw any content from your Page or about your Page. This metric is estimated."}, "frequency": {"type": "double precision", "index": 11, "name": "frequency", "comment": "The average number of times each person saw your ad; it is calculated as impressions divided by reach."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__basic_ad"}, "model.facebook_ads.stg_facebook_ads__basic_ad_action_values": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__basic_ad_action_values", "database": "postgres", "comment": "Each record represents the daily conversion values associated with an ad in Facebook. This is the prebuilt `basic_ad` report broken down by `action_type` and `action_values` Include more conversion value metrics by configuring the `facebook_ads__basic_ad_action_values_passthrough_metrics` variable.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "action_type": {"type": "text", "index": 2, "name": "action_type", "comment": "The kind of actions taken on your ad, Page, app or event after your ad was served to someone, even if they didn't click on it. Action types include Page likes, app installs, conversions, event responses and more. Actions prepended by app_custom_event come from mobile app events and actions prepended by offsite_conversion come from the Facebook Pixel.\n"}, "ad_id": {"type": "bigint", "index": 3, "name": "ad_id", "comment": "The ID of the ad the report relates to."}, "_fivetran_id": {"type": "text", "index": 4, "name": "_fivetran_id", "comment": "Unique record identifier."}, "date_day": {"type": "date", "index": 5, "name": "date_day", "comment": "The date of the reported performance."}, "index": {"type": "integer", "index": 6, "name": "index", "comment": "Index reflecting the `action_type` tracked for this ad on this day. A primary key created by Fivetran utilized for tracking data, specifically when there are multiple rows associated with a single row in the parent table."}, "conversions_value": {"type": "double precision", "index": 7, "name": "conversions_value", "comment": "Monetary value associated with the conversion action using the default attribution window."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__basic_ad_action_values"}, "model.facebook_ads.stg_facebook_ads__basic_ad_action_values_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__basic_ad_action_values_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "integer", "index": 1, "name": "ad_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "_fivetran_id": {"type": "text", "index": 3, "name": "_fivetran_id", "comment": null}, "index": {"type": "integer", "index": 4, "name": "index", "comment": null}, "action_type": {"type": "text", "index": 5, "name": "action_type", "comment": null}, "value": {"type": "double precision", "index": 6, "name": "value", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}, "_7_d_click": {"type": "double precision", "index": 8, "name": "_7_d_click", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__basic_ad_action_values_tmp"}, "model.facebook_ads.stg_facebook_ads__basic_ad_actions": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__basic_ad_actions", "database": "postgres", "comment": "Each record represents the daily conversion performance of an ad in Facebook. This is the prebuilt `basic_ad` report broken down by `action_type`. Include more conversion value metrics by configuring the `facebook_ads__basic_ad_actions_passthrough_metrics` variable.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "action_type": {"type": "text", "index": 2, "name": "action_type", "comment": "The kind of actions taken on your ad, Page, app or event after your ad was served to someone, even if they didn't click on it. Action types include Page likes, app installs, conversions, event responses and more. Actions prepended by app_custom_event come from mobile app events and actions prepended by offsite_conversion come from the Facebook Pixel.\n"}, "ad_id": {"type": "bigint", "index": 3, "name": "ad_id", "comment": "The ID of the ad the report relates to."}, "_fivetran_id": {"type": "text", "index": 4, "name": "_fivetran_id", "comment": "Unique record identifier."}, "date_day": {"type": "date", "index": 5, "name": "date_day", "comment": "The date of the reported performance."}, "index": {"type": "integer", "index": 6, "name": "index", "comment": "Index reflecting the `action_type` tracked for this ad on this day. A primary key created by Fivetran utilized for tracking data, specifically when there are multiple rows associated with a single row in the parent table."}, "conversions": {"type": "double precision", "index": 7, "name": "conversions", "comment": "Conversion metric value using the default attribution window."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__basic_ad_actions"}, "model.facebook_ads.stg_facebook_ads__basic_ad_actions_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__basic_ad_actions_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "ad_id": {"type": "integer", "index": 2, "name": "ad_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "index": {"type": "integer", "index": 4, "name": "index", "comment": null}, "_1_d_view": {"type": "double precision", "index": 5, "name": "_1_d_view", "comment": null}, "_7_d_click": {"type": "double precision", "index": 6, "name": "_7_d_click", "comment": null}, "_fivetran_synced": {"type": "text", "index": 7, "name": "_fivetran_synced", "comment": null}, "action_type": {"type": "text", "index": 8, "name": "action_type", "comment": null}, "inline": {"type": "double precision", "index": 9, "name": "inline", "comment": null}, "value": {"type": "double precision", "index": 10, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__basic_ad_actions_tmp"}, "model.facebook_ads.stg_facebook_ads__basic_ad_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__basic_ad_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "bigint", "index": 1, "name": "ad_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "impressions": {"type": "integer", "index": 4, "name": "impressions", "comment": null}, "inline_link_clicks": {"type": "integer", "index": 5, "name": "inline_link_clicks", "comment": null}, "spend": {"type": "double precision", "index": 6, "name": "spend", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__basic_ad_tmp"}, "model.facebook_ads.stg_facebook_ads__campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__campaign_history", "database": "postgres", "comment": "Each record in this table reflects a Facebook campaign.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": "The timestamp of the last update of a record."}, "created_at": {"type": "timestamp without time zone", "index": 3, "name": "created_at", "comment": "The time the campaign was created."}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": "The ID of the ad account that this campaign belongs to."}, "campaign_id": {"type": "bigint", "index": 5, "name": "campaign_id", "comment": "The ID of the campaign."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the campaign."}, "start_at": {"type": "timestamp without time zone", "index": 7, "name": "start_at", "comment": "Timestamp of designated campaign start time."}, "end_at": {"type": "timestamp without time zone", "index": 8, "name": "end_at", "comment": "Timestamp of designated campaign end time."}, "status": {"type": "text", "index": 9, "name": "status", "comment": "Status values are - 'ACTIVE', 'PAUSED', 'DELETED', 'ARCHIVED'."}, "daily_budget": {"type": "integer", "index": 10, "name": "daily_budget", "comment": "Daily budget of campaign."}, "lifetime_budget": {"type": "integer", "index": 11, "name": "lifetime_budget", "comment": "Lifetime budget of the campaign."}, "budget_remaining": {"type": "double precision", "index": 12, "name": "budget_remaining", "comment": "Remaining budget of campaign."}, "is_most_recent_record": {"type": "boolean", "index": 13, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record. All records should have this value set to True given we filter on it."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__campaign_history"}, "model.facebook_ads.stg_facebook_ads__campaign_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__campaign_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "updated_time": {"type": "timestamp without time zone", "index": 5, "name": "updated_time", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__campaign_history_tmp"}, "model.facebook_ads.stg_facebook_ads__creative_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__creative_history", "database": "postgres", "comment": "Each record in this table reflects a Facebook creative.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "_fivetran_id": {"type": "text", "index": 2, "name": "_fivetran_id", "comment": "Unique record identifier"}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": "When the record was last synced by Fivetran."}, "creative_id": {"type": "bigint", "index": 4, "name": "creative_id", "comment": "Unique ID for an ad creative."}, "account_id": {"type": "bigint", "index": 5, "name": "account_id", "comment": "Ad account ID for the account this ad creative belongs to."}, "creative_name": {"type": "text", "index": 6, "name": "creative_name", "comment": "Name of this ad creative as seen in the ad account's library."}, "page_link": {"type": "character varying", "index": 7, "name": "page_link", "comment": "Link for the page."}, "template_page_link": {"type": "character varying", "index": 8, "name": "template_page_link", "comment": "URL destination of Facebook dynamic ads."}, "url_tags": {"type": "text", "index": 9, "name": "url_tags", "comment": "A set of query string parameters which will replace or be appended to urls clicked from page post ads, message of the post, and canvas app install creatives only."}, "asset_feed_spec_link_urls": {"type": "text", "index": 10, "name": "asset_feed_spec_link_urls", "comment": "Link to the asset feed spec"}, "object_story_link_data_child_attachments": {"type": "text", "index": 11, "name": "object_story_link_data_child_attachments", "comment": "Link of the object story child attachments"}, "object_story_link_data_caption": {"type": "text", "index": 12, "name": "object_story_link_data_caption", "comment": "Link of the object story caption"}, "object_story_link_data_description": {"type": "text", "index": 13, "name": "object_story_link_data_description", "comment": "Link of the object story description"}, "object_story_link_data_link": {"type": "text", "index": 14, "name": "object_story_link_data_link", "comment": "Link of the object story link"}, "object_story_link_data_message": {"type": "text", "index": 15, "name": "object_story_link_data_message", "comment": "Link of the object story message"}, "template_app_link_spec_ios": {"type": "text", "index": 16, "name": "template_app_link_spec_ios", "comment": "Link of the object story spec for ios"}, "template_app_link_spec_ipad": {"type": "text", "index": 17, "name": "template_app_link_spec_ipad", "comment": "Link of the template app spec for ipad"}, "template_app_link_spec_android": {"type": "text", "index": 18, "name": "template_app_link_spec_android", "comment": "Link of the template app for android"}, "template_app_link_spec_iphone": {"type": "text", "index": 19, "name": "template_app_link_spec_iphone", "comment": "Link of the template app for iphone"}, "is_most_recent_record": {"type": "boolean", "index": 20, "name": "is_most_recent_record", "comment": "Indicates whether a record is the most recent version of that record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__creative_history"}, "model.facebook_ads.stg_facebook_ads__creative_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__creative_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"page_link": {"type": "character varying", "index": 1, "name": "page_link", "comment": null}, "template_page_link": {"type": "character varying", "index": 2, "name": "template_page_link", "comment": null}, "id": {"type": "bigint", "index": 3, "name": "id", "comment": null}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "url_tags": {"type": "text", "index": 6, "name": "url_tags", "comment": null}, "_fivetran_synced": {"type": "text", "index": 7, "name": "_fivetran_synced", "comment": null}, "asset_feed_spec_link_urls": {"type": "text", "index": 8, "name": "asset_feed_spec_link_urls", "comment": null}, "object_story_link_data_child_attachments": {"type": "text", "index": 9, "name": "object_story_link_data_child_attachments", "comment": null}, "object_story_link_data_caption": {"type": "text", "index": 10, "name": "object_story_link_data_caption", "comment": null}, "object_story_link_data_description": {"type": "text", "index": 11, "name": "object_story_link_data_description", "comment": null}, "object_story_link_data_link": {"type": "text", "index": 12, "name": "object_story_link_data_link", "comment": null}, "object_story_link_data_message": {"type": "text", "index": 13, "name": "object_story_link_data_message", "comment": null}, "template_app_link_spec_ios": {"type": "text", "index": 14, "name": "template_app_link_spec_ios", "comment": null}, "_fivetran_id": {"type": "text", "index": 15, "name": "_fivetran_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__creative_history_tmp"}, "model.facebook_ads.stg_facebook_ads__demographics_country": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_country", "database": "postgres", "comment": "Ads report segmented by country.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "country_id": {"type": "text", "index": 2, "name": "country_id", "comment": "Fivetran-generated unique ID of the country."}, "country": {"type": "text", "index": 3, "name": "country", "comment": "Country whose ad performance is being reported on."}, "date_day": {"type": "date", "index": 4, "name": "date_day", "comment": "The date of the reported performance."}, "account_id": {"type": "bigint", "index": 5, "name": "account_id", "comment": "The ID of the ad account that this ad belongs to."}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": "The number of impressions the ads had on the given day."}, "clicks": {"type": "integer", "index": 7, "name": "clicks", "comment": "The number of clicks on links to select destinations or experiences, on or off Facebook-owned properties. Inline link clicks use a fixed 1-day-click attribution window."}, "spend": {"type": "double precision", "index": 8, "name": "spend", "comment": "Ad spend in a given day for the breakdown."}, "reach": {"type": "integer", "index": 9, "name": "reach", "comment": "The number of people who saw any content from your Page or about your Page. This metric is estimated."}, "frequency": {"type": "double precision", "index": 10, "name": "frequency", "comment": "The average number of times each person saw your ads; it is calculated as impressions divided by reach."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_country"}, "model.facebook_ads.stg_facebook_ads__demographics_country_actions": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_country_actions", "database": "postgres", "comment": "Each record represents daily conversion performance by country. This is the prebuilt `demographics_country` report broken down by `action_type`.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "country_id": {"type": "text", "index": 2, "name": "country_id", "comment": "Fivetran-generated unique ID of the country."}, "action_type": {"type": "text", "index": 3, "name": "action_type", "comment": "The kind of actions taken on your ad, Page, app or event after your ad was served to someone, even if they didn't click on it. Action types include Page likes, app installs, conversions, event responses and more.\nActions prepended by `app_custom_event` come from mobile app events and actions prepended by `offsite_conversion` come from the Facebook Pixel."}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": "The ID of the ad account that this ad belongs to."}, "date_day": {"type": "date", "index": 5, "name": "date_day", "comment": "The date of the reported performance."}, "index": {"type": "integer", "index": 6, "name": "index", "comment": "Index reflecting the `action_type` tracked for this ad on this day. A primary key created by Fivetran utilized for tracking data, specifically when there are multiple rows associated with a single row in the parent table."}, "conversions": {"type": "double precision", "index": 7, "name": "conversions", "comment": "Conversion metric value using the default attribution window."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_country_actions"}, "model.facebook_ads.stg_facebook_ads__demographics_country_actions_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_country_actions_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "action_type": {"type": "text", "index": 4, "name": "action_type", "comment": null}, "date": {"type": "date", "index": 5, "name": "date", "comment": null}, "index": {"type": "integer", "index": 6, "name": "index", "comment": null}, "inline": {"type": "double precision", "index": 7, "name": "inline", "comment": null}, "value": {"type": "double precision", "index": 8, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_country_actions_tmp"}, "model.facebook_ads.stg_facebook_ads__demographics_country_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_country_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "country": {"type": "text", "index": 4, "name": "country", "comment": null}, "date": {"type": "date", "index": 5, "name": "date", "comment": null}, "frequency": {"type": "double precision", "index": 6, "name": "frequency", "comment": null}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": null}, "inline_link_clicks": {"type": "integer", "index": 8, "name": "inline_link_clicks", "comment": null}, "reach": {"type": "integer", "index": 9, "name": "reach", "comment": null}, "spend": {"type": "double precision", "index": 10, "name": "spend", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_country_tmp"}, "model.facebook_ads.stg_facebook_ads__demographics_region": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_region", "database": "postgres", "comment": "Ads report segmented by geographic region.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "region_id": {"type": "text", "index": 2, "name": "region_id", "comment": "Fivetran-generated unique ID of the geographic region."}, "region": {"type": "text", "index": 3, "name": "region", "comment": "Geographic region whose ad performance is being reported on."}, "date_day": {"type": "date", "index": 4, "name": "date_day", "comment": "The date of the reported performance."}, "account_id": {"type": "bigint", "index": 5, "name": "account_id", "comment": "The ID of the ad account that this ad belongs to."}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": "The number of impressions the ads had on the given day."}, "clicks": {"type": "integer", "index": 7, "name": "clicks", "comment": "The number of clicks on links to select destinations or experiences, on or off Facebook-owned properties. Inline link clicks use a fixed 1-day-click attribution window."}, "spend": {"type": "double precision", "index": 8, "name": "spend", "comment": "Ad spend in a given day for the breakdown."}, "reach": {"type": "integer", "index": 9, "name": "reach", "comment": "The number of people who saw any content from your Page or about your Page. This metric is estimated."}, "frequency": {"type": "double precision", "index": 10, "name": "frequency", "comment": "The average number of times each person saw your ads; it is calculated as impressions divided by reach."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_region"}, "model.facebook_ads.stg_facebook_ads__demographics_region_actions": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_region_actions", "database": "postgres", "comment": "Each record represents daily conversion performance by geographic region. This is the prebuilt `demographics_region` report broken down by `action_type`.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "region_id": {"type": "text", "index": 2, "name": "region_id", "comment": "Fivetran-generated unique ID of the geographic region."}, "action_type": {"type": "text", "index": 3, "name": "action_type", "comment": "The kind of actions taken on your ad, Page, app or event after your ad was served to someone, even if they didn't click on it. Action types include Page likes, app installs, conversions, event responses and more.\nActions prepended by `app_custom_event` come from mobile app events and actions prepended by `offsite_conversion` come from the Facebook Pixel."}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": "The ID of the ad account that this ad belongs to."}, "date_day": {"type": "date", "index": 5, "name": "date_day", "comment": "The date of the reported performance."}, "index": {"type": "integer", "index": 6, "name": "index", "comment": "Index reflecting the `action_type` tracked for this ad on this day. A primary key created by Fivetran utilized for tracking data, specifically when there are multiple rows associated with a single row in the parent table."}, "conversions": {"type": "double precision", "index": 7, "name": "conversions", "comment": "Conversion metric value using the default attribution window."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_region_actions"}, "model.facebook_ads.stg_facebook_ads__demographics_region_actions_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_region_actions_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "action_type": {"type": "text", "index": 4, "name": "action_type", "comment": null}, "date": {"type": "date", "index": 5, "name": "date", "comment": null}, "index": {"type": "integer", "index": 6, "name": "index", "comment": null}, "value": {"type": "double precision", "index": 7, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_region_actions_tmp"}, "model.facebook_ads.stg_facebook_ads__demographics_region_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_region_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "date": {"type": "date", "index": 4, "name": "date", "comment": null}, "frequency": {"type": "double precision", "index": 5, "name": "frequency", "comment": null}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": null}, "inline_link_clicks": {"type": "integer", "index": 7, "name": "inline_link_clicks", "comment": null}, "reach": {"type": "integer", "index": 8, "name": "reach", "comment": null}, "region": {"type": "text", "index": 9, "name": "region", "comment": null}, "spend": {"type": "double precision", "index": 10, "name": "spend", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_region_tmp"}, "model.google_ads.stg_google_ads__account_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__account_history", "database": "postgres", "comment": "Each record represents a version of an account in Google Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "integer", "index": 2, "name": "account_id", "comment": "The ID of the Account."}, "updated_at": {"type": "timestamp without time zone", "index": 3, "name": "updated_at", "comment": "Timestamp of when a record was last synced."}, "currency_code": {"type": "text", "index": 4, "name": "currency_code", "comment": "The currency of the spend reported."}, "auto_tagging_enabled": {"type": "boolean", "index": 5, "name": "auto_tagging_enabled", "comment": "Boolean indicating if auto tagging is enabled on the account ads."}, "time_zone": {"type": "integer", "index": 6, "name": "time_zone", "comment": "The time zone of the account ads."}, "account_name": {"type": "integer", "index": 7, "name": "account_name", "comment": "The descriptive name of the Customer account."}, "is_most_recent_record": {"type": "boolean", "index": 8, "name": "is_most_recent_record", "comment": "Boolean representing whether the record is the most recent version of the object."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__account_history"}, "model.google_ads.stg_google_ads__account_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__account_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "auto_tagging_enabled": {"type": "boolean", "index": 4, "name": "auto_tagging_enabled", "comment": null}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": null}, "descriptive_name": {"type": "integer", "index": 6, "name": "descriptive_name", "comment": null}, "final_url_suffix": {"type": "boolean", "index": 7, "name": "final_url_suffix", "comment": null}, "hidden": {"type": "boolean", "index": 8, "name": "hidden", "comment": null}, "manager": {"type": "integer", "index": 9, "name": "manager", "comment": null}, "manager_customer_id": {"type": "double precision", "index": 10, "name": "manager_customer_id", "comment": null}, "optimization_score": {"type": "text", "index": 11, "name": "optimization_score", "comment": null}, "pay_per_conversion_eligibility_failure_reasons": {"type": "boolean", "index": 12, "name": "pay_per_conversion_eligibility_failure_reasons", "comment": null}, "test_account": {"type": "text", "index": 13, "name": "test_account", "comment": null}, "time_zone": {"type": "integer", "index": 14, "name": "time_zone", "comment": null}, "tracking_url_template": {"type": "integer", "index": 15, "name": "tracking_url_template", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__account_history_tmp"}, "model.google_ads.stg_google_ads__account_stats": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__account_stats", "database": "postgres", "comment": "Each record represents the daily performance of an account in Google Ads broken down to the ad network and device type.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "integer", "index": 2, "name": "account_id", "comment": "The Customer ID."}, "date_day": {"type": "date", "index": 3, "name": "date_day", "comment": "The date being reported on."}, "ad_network_type": {"type": "text", "index": 4, "name": "ad_network_type", "comment": "The Google Ad network type used across the account."}, "device": {"type": "text", "index": 5, "name": "device", "comment": "Account ad performance per unique device where the ads were served."}, "clicks": {"type": "integer", "index": 6, "name": "clicks", "comment": "The number of clicks."}, "spend": {"type": "numeric", "index": 7, "name": "spend", "comment": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "impressions": {"type": "integer", "index": 8, "name": "impressions", "comment": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "conversions": {"type": "integer", "index": 9, "name": "conversions", "comment": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business."}, "conversions_value": {"type": "integer", "index": 10, "name": "conversions_value", "comment": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful."}, "view_through_conversions": {"type": "integer", "index": 11, "name": "view_through_conversions", "comment": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__account_stats"}, "model.google_ads.stg_google_ads__account_stats_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__account_stats_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "customer_id": {"type": "integer", "index": 2, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "active_view_impressions": {"type": "integer", "index": 5, "name": "active_view_impressions", "comment": null}, "active_view_measurability": {"type": "integer", "index": 6, "name": "active_view_measurability", "comment": null}, "active_view_measurable_cost_micros": {"type": "integer", "index": 7, "name": "active_view_measurable_cost_micros", "comment": null}, "active_view_measurable_impressions": {"type": "integer", "index": 8, "name": "active_view_measurable_impressions", "comment": null}, "active_view_viewability": {"type": "integer", "index": 9, "name": "active_view_viewability", "comment": null}, "ad_network_type": {"type": "text", "index": 10, "name": "ad_network_type", "comment": null}, "clicks": {"type": "integer", "index": 11, "name": "clicks", "comment": null}, "conversions": {"type": "integer", "index": 12, "name": "conversions", "comment": null}, "conversions_value": {"type": "integer", "index": 13, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 14, "name": "cost_micros", "comment": null}, "device": {"type": "text", "index": 15, "name": "device", "comment": null}, "impressions": {"type": "integer", "index": 16, "name": "impressions", "comment": null}, "interaction_event_types": {"type": "text", "index": 17, "name": "interaction_event_types", "comment": null}, "interactions": {"type": "integer", "index": 18, "name": "interactions", "comment": null}, "view_through_conversions": {"type": "integer", "index": 19, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__account_stats_tmp"}, "model.google_ads.stg_google_ads__ad_group_criterion_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_group_criterion_history", "database": "postgres", "comment": "Each record represents a historical version of an ad group criterion in Google Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "criterion_id": {"type": "bigint", "index": 2, "name": "criterion_id", "comment": "Unique identifier of the ad group criterion."}, "ad_group_id": {"type": "text", "index": 3, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "base_campaign_id": {"type": "bigint", "index": 4, "name": "base_campaign_id", "comment": "The ID of the Campaign."}, "updated_at": {"type": "timestamp without time zone", "index": 5, "name": "updated_at", "comment": "Timestamp of when the record was last updated in Google Ads."}, "type": {"type": "text", "index": 6, "name": "type", "comment": "The type of ad group criterion."}, "status": {"type": "text", "index": 7, "name": "status", "comment": "The current status of the ad group criterion."}, "keyword_match_type": {"type": "text", "index": 8, "name": "keyword_match_type", "comment": "The match type which dictate how closely the keyword needs to match with the user\u2019s search query so that the ad can be considered for the auction."}, "keyword_text": {"type": "text", "index": 9, "name": "keyword_text", "comment": "The text used within the keyword criterion that is being matched against."}, "is_most_recent_record": {"type": "boolean", "index": 10, "name": "is_most_recent_record", "comment": "Boolean representing whether the record is the most recent version of the object."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__ad_group_criterion_history"}, "model.google_ads.stg_google_ads__ad_group_criterion_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_group_criterion_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 2, "name": "ad_group_id", "comment": null}, "base_campaign_id": {"type": "bigint", "index": 3, "name": "base_campaign_id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 4, "name": "updated_at", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "type": {"type": "text", "index": 6, "name": "type", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}, "keyword_match_type": {"type": "text", "index": 8, "name": "keyword_match_type", "comment": null}, "keyword_text": {"type": "text", "index": 9, "name": "keyword_text", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__ad_group_criterion_history_tmp"}, "model.google_ads.stg_google_ads__ad_group_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_group_history", "database": "postgres", "comment": "Each record represents a version of an ad group in Google Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_group_id": {"type": "text", "index": 2, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "updated_at": {"type": "timestamp without time zone", "index": 3, "name": "updated_at", "comment": "Timestamp of when the record was last updated in Google Ads."}, "ad_group_type": {"type": "text", "index": 4, "name": "ad_group_type", "comment": "The type of the ad group in Google Ads."}, "campaign_id": {"type": "bigint", "index": 5, "name": "campaign_id", "comment": "The ID of the Campaign."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the Campaign."}, "ad_group_name": {"type": "text", "index": 7, "name": "ad_group_name", "comment": "The name of the AdGroup."}, "ad_group_status": {"type": "text", "index": 8, "name": "ad_group_status", "comment": "Status of the ad group."}, "is_most_recent_record": {"type": "boolean", "index": 9, "name": "is_most_recent_record", "comment": "Boolean representing whether the record is the most recent version of the object."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__ad_group_history"}, "model.google_ads.stg_google_ads__ad_group_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_group_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "type": {"type": "text", "index": 3, "name": "type", "comment": null}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__ad_group_history_tmp"}, "model.google_ads.stg_google_ads__ad_group_stats": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_group_stats", "database": "postgres", "comment": "Each record represents the daily performance of an ad group in Google Ads broken down to the ad network and device type.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": "The Customer ID."}, "date_day": {"type": "date", "index": 3, "name": "date_day", "comment": "The date being reported on."}, "ad_group_id": {"type": "text", "index": 4, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "campaign_id": {"type": "bigint", "index": 5, "name": "campaign_id", "comment": "The ID of the Campaign."}, "device": {"type": "text", "index": 6, "name": "device", "comment": "Account ad performance per unique device where the ads were served."}, "ad_network_type": {"type": "text", "index": 7, "name": "ad_network_type", "comment": "The Google Ad network type used across the account."}, "clicks": {"type": "integer", "index": 8, "name": "clicks", "comment": "The number of clicks."}, "spend": {"type": "numeric", "index": 9, "name": "spend", "comment": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "impressions": {"type": "integer", "index": 10, "name": "impressions", "comment": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "conversions": {"type": "double precision", "index": 11, "name": "conversions", "comment": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business."}, "conversions_value": {"type": "integer", "index": 12, "name": "conversions_value", "comment": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful."}, "view_through_conversions": {"type": "integer", "index": 13, "name": "view_through_conversions", "comment": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__ad_group_stats"}, "model.google_ads.stg_google_ads__ad_group_stats_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_group_stats_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "customer_id": {"type": "bigint", "index": 2, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "active_view_impressions": {"type": "integer", "index": 5, "name": "active_view_impressions", "comment": null}, "active_view_measurability": {"type": "integer", "index": 6, "name": "active_view_measurability", "comment": null}, "active_view_measurable_cost_micros": {"type": "integer", "index": 7, "name": "active_view_measurable_cost_micros", "comment": null}, "active_view_measurable_impressions": {"type": "integer", "index": 8, "name": "active_view_measurable_impressions", "comment": null}, "active_view_viewability": {"type": "integer", "index": 9, "name": "active_view_viewability", "comment": null}, "ad_network_type": {"type": "text", "index": 10, "name": "ad_network_type", "comment": null}, "base_ad_group": {"type": "text", "index": 11, "name": "base_ad_group", "comment": null}, "campaign_base_campaign": {"type": "text", "index": 12, "name": "campaign_base_campaign", "comment": null}, "campaign_id": {"type": "bigint", "index": 13, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 14, "name": "clicks", "comment": null}, "conversions": {"type": "double precision", "index": 15, "name": "conversions", "comment": null}, "conversions_value": {"type": "integer", "index": 16, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 17, "name": "cost_micros", "comment": null}, "device": {"type": "text", "index": 18, "name": "device", "comment": null}, "id": {"type": "bigint", "index": 19, "name": "id", "comment": null}, "impressions": {"type": "integer", "index": 20, "name": "impressions", "comment": null}, "interaction_event_types": {"type": "text", "index": 21, "name": "interaction_event_types", "comment": null}, "interactions": {"type": "integer", "index": 22, "name": "interactions", "comment": null}, "view_through_conversions": {"type": "integer", "index": 23, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__ad_group_stats_tmp"}, "model.google_ads.stg_google_ads__ad_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_history", "database": "postgres", "comment": "Each record represents a version of an ad in Google Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_group_id": {"type": "text", "index": 2, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "ad_id": {"type": "bigint", "index": 3, "name": "ad_id", "comment": "The ID of the Ad."}, "ad_name": {"type": "integer", "index": 4, "name": "ad_name", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 5, "name": "updated_at", "comment": "Timestamp of when the record was last updated in Google Ads."}, "ad_type": {"type": "integer", "index": 6, "name": "ad_type", "comment": "The type of the ad in Google Ads."}, "ad_status": {"type": "text", "index": 7, "name": "ad_status", "comment": "Status of the Ad."}, "display_url": {"type": "integer", "index": 8, "name": "display_url", "comment": "The display url of the ad that is being served."}, "source_final_urls": {"type": "text", "index": 9, "name": "source_final_urls", "comment": "The original list of final urls expressed as an array. Please be aware the test used on this field is intended to warn you if you have fields with multiple urls. If you do, the `final_url` field will filter down the urls within the array to just the first. Therefore, this package will only leverage one of possibly many urls within this field array."}, "final_urls": {"type": "text", "index": 10, "name": "final_urls", "comment": null}, "is_most_recent_record": {"type": "boolean", "index": 11, "name": "is_most_recent_record", "comment": "Boolean representing whether the record is the most recent version of the object."}, "final_url": {"type": "text", "index": 12, "name": "final_url", "comment": "The first url in the list of the urls within the `final_urls` source field."}, "base_url": {"type": "text", "index": 13, "name": "base_url", "comment": "The base URL of the ad, extracted from the `final_urls`."}, "url_host": {"type": "text", "index": 14, "name": "url_host", "comment": "The URL host of the ad, extracted from the `final_urls`."}, "url_path": {"type": "text", "index": 15, "name": "url_path", "comment": "The URL path of the ad, extracted from the `final_urls`."}, "utm_source": {"type": "text", "index": 16, "name": "utm_source", "comment": "The utm_source parameter of the ad, extracted from the `final_urls`."}, "utm_medium": {"type": "text", "index": 17, "name": "utm_medium", "comment": "The utm_medium parameter of the ad, extracted from the `final_urls`."}, "utm_campaign": {"type": "text", "index": 18, "name": "utm_campaign", "comment": "The utm_campaign parameter of the ad, extracted from the `final_urls`."}, "utm_content": {"type": "text", "index": 19, "name": "utm_content", "comment": "The utm_content parameter of the ad, extracted from the `final_urls`."}, "utm_term": {"type": "text", "index": 20, "name": "utm_term", "comment": "The utm_term parameter of the ad, extracted from the `final_urls`."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__ad_history"}, "model.google_ads.stg_google_ads__ad_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "bigint", "index": 1, "name": "ad_group_id", "comment": null}, "id": {"type": "bigint", "index": 2, "name": "id", "comment": null}, "name": {"type": "integer", "index": 3, "name": "name", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 4, "name": "updated_at", "comment": null}, "type": {"type": "integer", "index": 5, "name": "type", "comment": null}, "status": {"type": "text", "index": 6, "name": "status", "comment": null}, "display_url": {"type": "integer", "index": 7, "name": "display_url", "comment": null}, "final_urls": {"type": "text", "index": 8, "name": "final_urls", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__ad_history_tmp"}, "model.google_ads.stg_google_ads__ad_stats": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_stats", "database": "postgres", "comment": "Each record represents the daily performance of an ad in Google Ads broken down to the ad network, device type, and ad_group_id.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": "The Customer ID."}, "date_day": {"type": "date", "index": 3, "name": "date_day", "comment": "The date being reported on."}, "ad_group_id": {"type": "text", "index": 4, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "keyword_ad_group_criterion": {"type": "text", "index": 5, "name": "keyword_ad_group_criterion", "comment": "The ad group which the keyword criterion resides."}, "ad_network_type": {"type": "text", "index": 6, "name": "ad_network_type", "comment": "The Google Ad network type used across the account."}, "device": {"type": "text", "index": 7, "name": "device", "comment": "Account ad performance per unique device where the ads were served."}, "ad_id": {"type": "bigint", "index": 8, "name": "ad_id", "comment": "The ID of the Ad."}, "campaign_id": {"type": "bigint", "index": 9, "name": "campaign_id", "comment": "The ID of the Campaign."}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": "The number of clicks."}, "spend": {"type": "numeric", "index": 11, "name": "spend", "comment": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "impressions": {"type": "integer", "index": 12, "name": "impressions", "comment": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "conversions": {"type": "integer", "index": 13, "name": "conversions", "comment": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business."}, "conversions_value": {"type": "double precision", "index": 14, "name": "conversions_value", "comment": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful."}, "view_through_conversions": {"type": "integer", "index": 15, "name": "view_through_conversions", "comment": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__ad_stats"}, "model.google_ads.stg_google_ads__ad_stats_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_stats_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"customer_id": {"type": "bigint", "index": 1, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "ad_group": {"type": "text", "index": 4, "name": "ad_group", "comment": null}, "keyword_ad_group_criterion": {"type": "text", "index": 5, "name": "keyword_ad_group_criterion", "comment": null}, "ad_network_type": {"type": "text", "index": 6, "name": "ad_network_type", "comment": null}, "device": {"type": "text", "index": 7, "name": "device", "comment": null}, "ad_id": {"type": "bigint", "index": 8, "name": "ad_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 9, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": null}, "cost_micros": {"type": "integer", "index": 11, "name": "cost_micros", "comment": null}, "impressions": {"type": "integer", "index": 12, "name": "impressions", "comment": null}, "conversions": {"type": "integer", "index": 13, "name": "conversions", "comment": null}, "conversions_value": {"type": "double precision", "index": 14, "name": "conversions_value", "comment": null}, "view_through_conversions": {"type": "integer", "index": 15, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__ad_stats_tmp"}, "model.google_ads.stg_google_ads__campaign_bid_modifier_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_bid_modifier_history", "database": "postgres", "comment": "Each record represents a historical version of a campaign bid modifier in Google Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_id": {"type": "bigint", "index": 2, "name": "campaign_id", "comment": "The ID of the Campaign."}, "criterion_id": {"type": "bigint", "index": 3, "name": "criterion_id", "comment": "Unique identifier of the criterion that the bid modifier is applied to."}, "bid_modifier": {"type": "double precision", "index": 4, "name": "bid_modifier", "comment": "The modifier applied to the bid for this criterion."}, "interaction_type": {"type": "text", "index": 5, "name": "interaction_type", "comment": "The type of interaction for the bid modifier."}, "interaction_event_types": {"type": "text", "index": 6, "name": "interaction_event_types", "comment": "The event types for the interaction."}, "updated_at": {"type": "timestamp without time zone", "index": 7, "name": "updated_at", "comment": "Timestamp of when the record was last updated in Google Ads."}, "is_most_recent_record": {"type": "boolean", "index": 8, "name": "is_most_recent_record", "comment": "Boolean representing whether the record is the most recent version of the object."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__campaign_bid_modifier_history"}, "model.google_ads.stg_google_ads__campaign_bid_modifier_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_bid_modifier_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "bigint", "index": 1, "name": "campaign_id", "comment": null}, "criterion_id": {"type": "bigint", "index": 2, "name": "criterion_id", "comment": null}, "bid_modifier": {"type": "double precision", "index": 3, "name": "bid_modifier", "comment": null}, "interaction_type": {"type": "text", "index": 4, "name": "interaction_type", "comment": null}, "interaction_event_types": {"type": "text", "index": 5, "name": "interaction_event_types", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 6, "name": "updated_at", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 7, "name": "_fivetran_active", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__campaign_bid_modifier_history_tmp"}, "model.google_ads.stg_google_ads__campaign_bidding_strategy_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_bidding_strategy_history", "database": "postgres", "comment": "Each record represents a historical version of a campaign bidding strategy in Google Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_id": {"type": "bigint", "index": 2, "name": "campaign_id", "comment": "The ID of the Campaign."}, "updated_at": {"type": "timestamp without time zone", "index": 3, "name": "updated_at", "comment": "Timestamp of when the record was last updated in Google Ads."}, "enhanced_cpc": {"type": "boolean", "index": 4, "name": "enhanced_cpc", "comment": "Boolean indicating if enhanced CPC is enabled."}, "manual_cpa": {"type": "double precision", "index": 5, "name": "manual_cpa", "comment": "Manual cost per acquisition setting."}, "manual_cpm": {"type": "double precision", "index": 6, "name": "manual_cpm", "comment": "Manual cost per mille setting."}, "manual_cpv": {"type": "double precision", "index": 7, "name": "manual_cpv", "comment": "Manual cost per view setting."}, "bidding_status": {"type": "text", "index": 8, "name": "bidding_status", "comment": "The status of the bidding strategy."}, "target_cpa": {"type": "numeric", "index": 9, "name": "target_cpa", "comment": "Target cost per acquisition in dollars, converted from target_cpa_micros."}, "target_roas": {"type": "double precision", "index": 10, "name": "target_roas", "comment": "Target return on ad spend."}, "bidding_strategy_type": {"type": "text", "index": 11, "name": "bidding_strategy_type", "comment": "The type of bidding strategy (MANUAL_CPC, TARGET_CPA, etc.)."}, "is_most_recent_record": {"type": "boolean", "index": 12, "name": "is_most_recent_record", "comment": "Boolean representing whether the record is the most recent version of the object."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__campaign_bidding_strategy_history"}, "model.google_ads.stg_google_ads__campaign_bidding_strategy_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_bidding_strategy_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "bigint", "index": 1, "name": "campaign_id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "cpc_bid_ceiling_micros": {"type": "integer", "index": 3, "name": "cpc_bid_ceiling_micros", "comment": null}, "cpc_bid_floor_micros": {"type": "integer", "index": 4, "name": "cpc_bid_floor_micros", "comment": null}, "enhanced_cpc": {"type": "boolean", "index": 5, "name": "enhanced_cpc", "comment": null}, "enhanced_cpc_enabled": {"type": "boolean", "index": 6, "name": "enhanced_cpc_enabled", "comment": null}, "location": {"type": "text", "index": 7, "name": "location", "comment": null}, "location_fraction_micros": {"type": "integer", "index": 8, "name": "location_fraction_micros", "comment": null}, "manual_cpa": {"type": "double precision", "index": 9, "name": "manual_cpa", "comment": null}, "manual_cpm": {"type": "double precision", "index": 10, "name": "manual_cpm", "comment": null}, "manual_cpv": {"type": "double precision", "index": 11, "name": "manual_cpv", "comment": null}, "name": {"type": "text", "index": 12, "name": "name", "comment": null}, "status": {"type": "text", "index": 13, "name": "status", "comment": null}, "target_cpa_micros": {"type": "integer", "index": 14, "name": "target_cpa_micros", "comment": null}, "target_cpm": {"type": "integer", "index": 15, "name": "target_cpm", "comment": null}, "target_roas": {"type": "double precision", "index": 16, "name": "target_roas", "comment": null}, "type": {"type": "text", "index": 17, "name": "type", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 18, "name": "_fivetran_active", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 19, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__campaign_bidding_strategy_history_tmp"}, "model.google_ads.stg_google_ads__campaign_budget_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_budget_history", "database": "postgres", "comment": "Each record represents a historical version of a campaign budget in Google Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": "Timestamp of when the record was last updated in Google Ads."}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": "The ID of the Campaign."}, "daily_budget": {"type": "numeric", "index": 4, "name": "daily_budget", "comment": "The daily budget amount in dollars, converted from amount_micros."}, "budget_status": {"type": "text", "index": 5, "name": "budget_status", "comment": "The status of the budget."}, "has_recommended_budget": {"type": "boolean", "index": 6, "name": "has_recommended_budget", "comment": "Boolean indicating if Google has a recommended budget for this campaign."}, "recommended_daily_budget": {"type": "numeric", "index": 7, "name": "recommended_daily_budget", "comment": "Google's recommended daily budget amount in dollars, converted from recommended_budget_amount_micros."}, "total_budget": {"type": "numeric", "index": 8, "name": "total_budget", "comment": "The total budget amount in dollars for lifetime budgets, converted from total_amount_micros."}, "budget_type": {"type": "text", "index": 9, "name": "budget_type", "comment": "The type of budget (DAILY, LIFETIME, etc.)."}, "is_most_recent_record": {"type": "boolean", "index": 10, "name": "is_most_recent_record", "comment": "Boolean representing whether the record is the most recent version of the object."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__campaign_budget_history"}, "model.google_ads.stg_google_ads__campaign_budget_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_budget_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "amount_micros": {"type": "integer", "index": 4, "name": "amount_micros", "comment": null}, "delivery_method": {"type": "text", "index": 5, "name": "delivery_method", "comment": null}, "explicitly_shared": {"type": "boolean", "index": 6, "name": "explicitly_shared", "comment": null}, "name": {"type": "text", "index": 7, "name": "name", "comment": null}, "reference_count": {"type": "integer", "index": 8, "name": "reference_count", "comment": null}, "status": {"type": "text", "index": 9, "name": "status", "comment": null}, "has_recommended_budget": {"type": "boolean", "index": 10, "name": "has_recommended_budget", "comment": null}, "period": {"type": "text", "index": 11, "name": "period", "comment": null}, "recommended_budget_amount_micros": {"type": "integer", "index": 12, "name": "recommended_budget_amount_micros", "comment": null}, "total_amount_micros": {"type": "integer", "index": 13, "name": "total_amount_micros", "comment": null}, "type": {"type": "text", "index": 14, "name": "type", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 15, "name": "_fivetran_active", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 16, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__campaign_budget_history_tmp"}, "model.google_ads.stg_google_ads__campaign_criterion_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_criterion_history", "database": "postgres", "comment": "Each record represents a historical version of a campaign criterion in Google Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "criterion_id": {"type": "bigint", "index": 2, "name": "criterion_id", "comment": "Unique identifier of the campaign criterion."}, "updated_at": {"type": "timestamp without time zone", "index": 3, "name": "updated_at", "comment": "Timestamp of when the record was last updated in Google Ads."}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": "The ID of the Campaign."}, "geo_target_constant_id": {"type": "bigint", "index": 5, "name": "geo_target_constant_id", "comment": "The geographic target constant ID for location targeting."}, "topic_constant_id": {"type": "bigint", "index": 6, "name": "topic_constant_id", "comment": "The topic constant ID for topic targeting."}, "user_list_id": {"type": "bigint", "index": 7, "name": "user_list_id", "comment": "The user list ID for audience targeting."}, "age_range_type": {"type": "text", "index": 8, "name": "age_range_type", "comment": "The age range type for demographic targeting."}, "device_type": {"type": "text", "index": 9, "name": "device_type", "comment": "The device type for targeting (MOBILE, DESKTOP, TABLET)."}, "gender_type": {"type": "text", "index": 10, "name": "gender_type", "comment": "The gender type for demographic targeting."}, "income_range_type": {"type": "text", "index": 11, "name": "income_range_type", "comment": "The income range type for demographic targeting."}, "keyword_text": {"type": "text", "index": 12, "name": "keyword_text", "comment": "The keyword text for keyword targeting."}, "parental_status_type": {"type": "text", "index": 13, "name": "parental_status_type", "comment": "The parental status type for demographic targeting."}, "placement_url": {"type": "text", "index": 14, "name": "placement_url", "comment": "The placement URL for placement targeting."}, "is_most_recent_record": {"type": "boolean", "index": 15, "name": "is_most_recent_record", "comment": "Boolean representing whether the record is the most recent version of the object."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__campaign_criterion_history"}, "model.google_ads.stg_google_ads__campaign_criterion_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_criterion_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "geo_target_constant_id": {"type": "bigint", "index": 4, "name": "geo_target_constant_id", "comment": null}, "mobile_device_id": {"type": "bigint", "index": 5, "name": "mobile_device_id", "comment": null}, "operating_system_version_id": {"type": "bigint", "index": 6, "name": "operating_system_version_id", "comment": null}, "topic_constant_id": {"type": "bigint", "index": 7, "name": "topic_constant_id", "comment": null}, "user_interest_id": {"type": "bigint", "index": 8, "name": "user_interest_id", "comment": null}, "user_list_id": {"type": "bigint", "index": 9, "name": "user_list_id", "comment": null}, "age_range_type": {"type": "text", "index": 10, "name": "age_range_type", "comment": null}, "bid_modifier": {"type": "double precision", "index": 11, "name": "bid_modifier", "comment": null}, "carrier_country_code": {"type": "text", "index": 12, "name": "carrier_country_code", "comment": null}, "carrier_name": {"type": "text", "index": 13, "name": "carrier_name", "comment": null}, "content_label_type": {"type": "text", "index": 14, "name": "content_label_type", "comment": null}, "device_type": {"type": "text", "index": 15, "name": "device_type", "comment": null}, "display_name": {"type": "text", "index": 16, "name": "display_name", "comment": null}, "gender_type": {"type": "text", "index": 17, "name": "gender_type", "comment": null}, "income_range_type": {"type": "text", "index": 18, "name": "income_range_type", "comment": null}, "ip_block_ip_address": {"type": "text", "index": 19, "name": "ip_block_ip_address", "comment": null}, "negative": {"type": "boolean", "index": 20, "name": "negative", "comment": null}, "keyword_match_type": {"type": "text", "index": 21, "name": "keyword_match_type", "comment": null}, "keyword_text": {"type": "text", "index": 22, "name": "keyword_text", "comment": null}, "language_code": {"type": "text", "index": 23, "name": "language_code", "comment": null}, "language_name": {"type": "text", "index": 24, "name": "language_name", "comment": null}, "mobile_app_category_constant_id": {"type": "bigint", "index": 25, "name": "mobile_app_category_constant_id", "comment": null}, "mobile_app_category_constant_name": {"type": "text", "index": 26, "name": "mobile_app_category_constant_name", "comment": null}, "mobile_application_app_id": {"type": "text", "index": 27, "name": "mobile_application_app_id", "comment": null}, "mobile_application_name": {"type": "text", "index": 28, "name": "mobile_application_name", "comment": null}, "parental_status_type": {"type": "text", "index": 29, "name": "parental_status_type", "comment": null}, "placement_url": {"type": "text", "index": 30, "name": "placement_url", "comment": null}, "status": {"type": "text", "index": 31, "name": "status", "comment": null}, "type": {"type": "text", "index": 32, "name": "type", "comment": null}, "youtube_channel_id": {"type": "text", "index": 33, "name": "youtube_channel_id", "comment": null}, "youtube_video_id": {"type": "text", "index": 34, "name": "youtube_video_id", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 35, "name": "_fivetran_active", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 36, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__campaign_criterion_history_tmp"}, "model.google_ads.stg_google_ads__campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_history", "database": "postgres", "comment": "Each record represents a version of a campaign in Google Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_id": {"type": "bigint", "index": 2, "name": "campaign_id", "comment": "The ID of the Campaign."}, "updated_at": {"type": "timestamp without time zone", "index": 3, "name": "updated_at", "comment": "Timestamp of when the record was last updated in Google Ads."}, "campaign_name": {"type": "text", "index": 4, "name": "campaign_name", "comment": "The name of the Campaign."}, "account_id": {"type": "bigint", "index": 5, "name": "account_id", "comment": "The Customer ID."}, "advertising_channel_type": {"type": "text", "index": 6, "name": "advertising_channel_type", "comment": "The type of advertising channel being used by the campaign."}, "advertising_channel_subtype": {"type": "text", "index": 7, "name": "advertising_channel_subtype", "comment": "The advertising channel subtype that is being used by the campaign."}, "start_date": {"type": "text", "index": 8, "name": "start_date", "comment": "The start date of the campaign. Uses start_date_time when available, falls back to start_date for backward compatibility."}, "end_date": {"type": "text", "index": 9, "name": "end_date", "comment": "The end date of the campaign. Uses end_date_time when available, falls back to end_date for backward compatibility."}, "serving_status": {"type": "text", "index": 10, "name": "serving_status", "comment": "Status of the ads and how they are currently being served."}, "status": {"type": "text", "index": 11, "name": "status", "comment": "General status of the campaign."}, "tracking_url_template": {"type": "integer", "index": 12, "name": "tracking_url_template", "comment": "The tracking url template being used throughout the campaign ads."}, "is_most_recent_record": {"type": "boolean", "index": 13, "name": "is_most_recent_record", "comment": "Boolean representing whether the record is the most recent version of the object."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__campaign_history"}, "model.google_ads.stg_google_ads__campaign_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "customer_id": {"type": "bigint", "index": 4, "name": "customer_id", "comment": null}, "advertising_channel_type": {"type": "text", "index": 5, "name": "advertising_channel_type", "comment": null}, "advertising_channel_subtype": {"type": "text", "index": 6, "name": "advertising_channel_subtype", "comment": null}, "start_date": {"type": "date", "index": 7, "name": "start_date", "comment": null}, "end_date": {"type": "date", "index": 8, "name": "end_date", "comment": null}, "serving_status": {"type": "text", "index": 9, "name": "serving_status", "comment": null}, "status": {"type": "text", "index": 10, "name": "status", "comment": null}, "tracking_url_template": {"type": "integer", "index": 11, "name": "tracking_url_template", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__campaign_history_tmp"}, "model.google_ads.stg_google_ads__campaign_stats": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_stats", "database": "postgres", "comment": "Each record represents the daily performance of a campaign in Google Ads broken down to the ad network and device type.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": "The Customer ID."}, "date_day": {"type": "date", "index": 3, "name": "date_day", "comment": "The date being reported on."}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": "The ID of the Campaign."}, "ad_network_type": {"type": "text", "index": 5, "name": "ad_network_type", "comment": "The Google Ad network type used across the account."}, "device": {"type": "text", "index": 6, "name": "device", "comment": "Account ad performance per unique device where the ads were served."}, "clicks": {"type": "integer", "index": 7, "name": "clicks", "comment": "The number of clicks."}, "spend": {"type": "numeric", "index": 8, "name": "spend", "comment": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "conversions": {"type": "integer", "index": 10, "name": "conversions", "comment": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business."}, "conversions_value": {"type": "integer", "index": 11, "name": "conversions_value", "comment": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful."}, "view_through_conversions": {"type": "integer", "index": 12, "name": "view_through_conversions", "comment": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__campaign_stats"}, "model.google_ads.stg_google_ads__campaign_stats_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_stats_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "customer_id": {"type": "bigint", "index": 2, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "active_view_impressions": {"type": "integer", "index": 5, "name": "active_view_impressions", "comment": null}, "active_view_measurability": {"type": "integer", "index": 6, "name": "active_view_measurability", "comment": null}, "active_view_measurable_cost_micros": {"type": "integer", "index": 7, "name": "active_view_measurable_cost_micros", "comment": null}, "active_view_measurable_impressions": {"type": "integer", "index": 8, "name": "active_view_measurable_impressions", "comment": null}, "active_view_viewability": {"type": "integer", "index": 9, "name": "active_view_viewability", "comment": null}, "ad_network_type": {"type": "text", "index": 10, "name": "ad_network_type", "comment": null}, "base_campaign": {"type": "text", "index": 11, "name": "base_campaign", "comment": null}, "clicks": {"type": "integer", "index": 12, "name": "clicks", "comment": null}, "conversions": {"type": "integer", "index": 13, "name": "conversions", "comment": null}, "conversions_value": {"type": "integer", "index": 14, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 15, "name": "cost_micros", "comment": null}, "device": {"type": "text", "index": 16, "name": "device", "comment": null}, "id": {"type": "bigint", "index": 17, "name": "id", "comment": null}, "impressions": {"type": "integer", "index": 18, "name": "impressions", "comment": null}, "interaction_event_types": {"type": "text", "index": 19, "name": "interaction_event_types", "comment": null}, "interactions": {"type": "integer", "index": 20, "name": "interactions", "comment": null}, "view_through_conversions": {"type": "integer", "index": 21, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__campaign_stats_tmp"}, "model.google_ads.stg_google_ads__keyword_stats": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__keyword_stats", "database": "postgres", "comment": "Each record represents the daily performance of a keyword in Google Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "keyword_id": {"type": "text", "index": 2, "name": "keyword_id", "comment": "The unique ID of the keyword record."}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": "The Customer ID."}, "date_day": {"type": "date", "index": 4, "name": "date_day", "comment": "The date being reported on."}, "ad_group_id": {"type": "text", "index": 5, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "criterion_id": {"type": "bigint", "index": 6, "name": "criterion_id", "comment": "Reference to the ad group criterion used for the keyword."}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": "The ID of the Campaign."}, "clicks": {"type": "integer", "index": 8, "name": "clicks", "comment": "The number of clicks."}, "spend": {"type": "numeric", "index": 9, "name": "spend", "comment": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "impressions": {"type": "integer", "index": 10, "name": "impressions", "comment": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "conversions": {"type": "integer", "index": 11, "name": "conversions", "comment": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business."}, "conversions_value": {"type": "integer", "index": 12, "name": "conversions_value", "comment": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful."}, "view_through_conversions": {"type": "integer", "index": 13, "name": "view_through_conversions", "comment": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__keyword_stats"}, "model.google_ads.stg_google_ads__keyword_stats_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__keyword_stats_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "customer_id": {"type": "bigint", "index": 2, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "active_view_impressions": {"type": "integer", "index": 5, "name": "active_view_impressions", "comment": null}, "active_view_measurability": {"type": "integer", "index": 6, "name": "active_view_measurability", "comment": null}, "active_view_measurable_cost_micros": {"type": "integer", "index": 7, "name": "active_view_measurable_cost_micros", "comment": null}, "active_view_measurable_impressions": {"type": "integer", "index": 8, "name": "active_view_measurable_impressions", "comment": null}, "active_view_viewability": {"type": "integer", "index": 9, "name": "active_view_viewability", "comment": null}, "ad_group_base_ad_group": {"type": "text", "index": 10, "name": "ad_group_base_ad_group", "comment": null}, "ad_group_criterion_criterion_id": {"type": "bigint", "index": 11, "name": "ad_group_criterion_criterion_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 12, "name": "ad_group_id", "comment": null}, "ad_network_type": {"type": "text", "index": 13, "name": "ad_network_type", "comment": null}, "campaign_base_campaign": {"type": "text", "index": 14, "name": "campaign_base_campaign", "comment": null}, "campaign_id": {"type": "bigint", "index": 15, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 16, "name": "clicks", "comment": null}, "conversions": {"type": "integer", "index": 17, "name": "conversions", "comment": null}, "conversions_value": {"type": "integer", "index": 18, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 19, "name": "cost_micros", "comment": null}, "device": {"type": "text", "index": 20, "name": "device", "comment": null}, "impressions": {"type": "integer", "index": 21, "name": "impressions", "comment": null}, "interaction_event_types": {"type": "text", "index": 22, "name": "interaction_event_types", "comment": null}, "interactions": {"type": "integer", "index": 23, "name": "interactions", "comment": null}, "view_through_conversions": {"type": "integer", "index": 24, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__keyword_stats_tmp"}, "model.google_ads.stg_google_ads__search_term_keyword_stats": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__search_term_keyword_stats", "database": "postgres", "comment": "Each record represents the daily performance of a search term (including associated tracked keywords) in Google Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": "The Customer ID."}, "date_day": {"type": "date", "index": 3, "name": "date_day", "comment": "The date being reported on."}, "search_term_id": {"type": "text", "index": 4, "name": "search_term_id", "comment": "The unique ID of the search term record."}, "ad_group_id": {"type": "text", "index": 5, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "campaign_id": {"type": "bigint", "index": 6, "name": "campaign_id", "comment": "The ID of the Campaign."}, "keyword_ad_group_criterion": {"type": "text", "index": 7, "name": "keyword_ad_group_criterion", "comment": "The resource name of the keyword's ad group criterion. Ad group criterion resource names have the form: `customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}`"}, "criterion_id": {"type": "text", "index": 8, "name": "criterion_id", "comment": "Reference to the ad group criterion used for the associated keyword. One `keyword_text` may have multiple `criterion_id` values."}, "search_term": {"type": "text", "index": 9, "name": "search_term", "comment": "A word or set of words a person enters when searching on Google or one of Google's Search Network sites"}, "keyword_text": {"type": "text", "index": 10, "name": "keyword_text", "comment": "The text of the keyword (at most 80 characters and 10 words)."}, "search_term_match_type": {"type": "text", "index": 11, "name": "search_term_match_type", "comment": "How closely the search terms that triggered your ads on Google are related to the actual keywords in your account. Can be `BROAD` ,`EXACT`, `PHRASE`, `UNKNOWN`, or `UNSPECIFIED`.\n\nSee more details [here](https://support.google.com/google-ads/answer/7478529?sjid=15681083914881504235-NC&visit_id=638760377693438101-1187740487&rd=1)."}, "status": {"type": "text", "index": 12, "name": "status", "comment": "Indicates whether the search term is currently one of your targeted or excluded keywords. Possible values: `ADDED`, `ADDED_EXCLUDED`, `EXCLUDED`, `NONE`, `UNKNOWN`, or `UNSPECIFIED`"}, "clicks": {"type": "integer", "index": 13, "name": "clicks", "comment": "The number of clicks."}, "spend": {"type": "numeric", "index": 14, "name": "spend", "comment": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "impressions": {"type": "integer", "index": 15, "name": "impressions", "comment": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "conversions": {"type": "double precision", "index": 16, "name": "conversions", "comment": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business."}, "conversions_value": {"type": "double precision", "index": 17, "name": "conversions_value", "comment": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful."}, "view_through_conversions": {"type": "integer", "index": 18, "name": "view_through_conversions", "comment": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__search_term_keyword_stats"}, "model.google_ads.stg_google_ads__search_term_keyword_stats_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__search_term_keyword_stats_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 5, "name": "clicks", "comment": null}, "conversions": {"type": "double precision", "index": 6, "name": "conversions", "comment": null}, "conversions_value": {"type": "double precision", "index": 7, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 8, "name": "cost_micros", "comment": null}, "customer_id": {"type": "bigint", "index": 9, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 10, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 11, "name": "impressions", "comment": null}, "info_text": {"type": "text", "index": 12, "name": "info_text", "comment": null}, "keyword_ad_group_criterion": {"type": "text", "index": 13, "name": "keyword_ad_group_criterion", "comment": null}, "search_term": {"type": "text", "index": 14, "name": "search_term", "comment": null}, "search_term_match_type": {"type": "text", "index": 15, "name": "search_term_match_type", "comment": null}, "status": {"type": "text", "index": 16, "name": "status", "comment": null}, "view_through_conversions": {"type": "integer", "index": 17, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__search_term_keyword_stats_tmp"}, "model.linkedin.stg_linkedin_ads__account_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__account_history", "database": "postgres", "comment": "Each record represents a 'version' of an account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "integer", "index": 2, "name": "account_id", "comment": "Unique internal ID representing the account."}, "account_name": {"type": "text", "index": 3, "name": "account_name", "comment": "A label for the account."}, "currency": {"type": "text", "index": 4, "name": "currency", "comment": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default)."}, "version_tag": {"type": "numeric", "index": 5, "name": "version_tag", "comment": "An integer representation of the version of the account."}, "status": {"type": "text", "index": 6, "name": "status", "comment": "ACTIVE - Account is active; this is the default state\nCANCELLED - Account has been permanently cancelled\nDRAFT - Account is in draft status, meaning it's not yet fully set up and it is not serving\nPENDING_DELETION - Denotes that the account has been requested to be deleted that is currently pending\nREMOVED - Denotes that the account was deleted, but must remain fetchable due to the existence of performance data.\n"}, "type": {"type": "text", "index": 7, "name": "type", "comment": "BUSINESS - This is the only value allowed when creating accounts through the API.\nENTERPRISE - This value cannot be used to create accounts through the API and is reserved for accounts created by LinkedIn's internal ad operations systems.\n"}, "last_modified_at": {"type": "timestamp without time zone", "index": 8, "name": "last_modified_at", "comment": "The timestamp of when the version was updated."}, "created_at": {"type": "timestamp without time zone", "index": 9, "name": "created_at", "comment": "The timestamp of when the account was created."}, "is_latest_version": {"type": "boolean", "index": 10, "name": "is_latest_version", "comment": "Boolean of whether the record is the latest version of the account."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__account_history"}, "model.linkedin.stg_linkedin_ads__account_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__account_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_modified_time": {"type": "timestamp without time zone", "index": 2, "name": "last_modified_time", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 3, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "currency": {"type": "text", "index": 5, "name": "currency", "comment": null}, "version_tag": {"type": "integer", "index": 6, "name": "version_tag", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__account_history_tmp"}, "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__ad_analytics_by_campaign", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the campaign level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The day of the activity."}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": "The ID of the related creative."}, "clicks": {"type": "integer", "index": 4, "name": "clicks", "comment": "The count of chargeable clicks."}, "impressions": {"type": "integer", "index": 5, "name": "impressions", "comment": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails."}, "cost": {"type": "double precision", "index": 6, "name": "cost", "comment": "The cost of the ads in the local currency or USD."}, "conversion_value_in_local_currency": {"type": "double precision", "index": 7, "name": "conversion_value_in_local_currency", "comment": "The value generated by your conversions, displayed in your LinkedIn account's local currency."}, "external_website_conversions": {"type": "bigint", "index": 8, "name": "external_website_conversions", "comment": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads"}, "one_click_leads": {"type": "bigint", "index": 9, "name": "one_click_leads", "comment": "Leads submitted after clicking on LinkedIn ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign"}, "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__ad_analytics_by_campaign_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "day": {"type": "timestamp without time zone", "index": 2, "name": "day", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "action_clicks": {"type": "integer", "index": 4, "name": "action_clicks", "comment": null}, "ad_unit_clicks": {"type": "integer", "index": 5, "name": "ad_unit_clicks", "comment": null}, "approximate_unique_impressions": {"type": "integer", "index": 6, "name": "approximate_unique_impressions", "comment": null}, "card_clicks": {"type": "integer", "index": 7, "name": "card_clicks", "comment": null}, "card_impressions": {"type": "integer", "index": 8, "name": "card_impressions", "comment": null}, "clicks": {"type": "integer", "index": 9, "name": "clicks", "comment": null}, "comment_likes": {"type": "integer", "index": 10, "name": "comment_likes", "comment": null}, "comments": {"type": "integer", "index": 11, "name": "comments", "comment": null}, "company_page_clicks": {"type": "integer", "index": 12, "name": "company_page_clicks", "comment": null}, "conversion_value_in_local_currency": {"type": "integer", "index": 13, "name": "conversion_value_in_local_currency", "comment": null}, "cost_in_local_currency": {"type": "double precision", "index": 14, "name": "cost_in_local_currency", "comment": null}, "cost_in_usd": {"type": "double precision", "index": 15, "name": "cost_in_usd", "comment": null}, "external_website_conversions": {"type": "bigint", "index": 16, "name": "external_website_conversions", "comment": null}, "external_website_post_click_conversions": {"type": "integer", "index": 17, "name": "external_website_post_click_conversions", "comment": null}, "external_website_post_view_conversions": {"type": "integer", "index": 18, "name": "external_website_post_view_conversions", "comment": null}, "follows": {"type": "integer", "index": 19, "name": "follows", "comment": null}, "full_screen_plays": {"type": "integer", "index": 20, "name": "full_screen_plays", "comment": null}, "impressions": {"type": "integer", "index": 21, "name": "impressions", "comment": null}, "landing_page_clicks": {"type": "integer", "index": 22, "name": "landing_page_clicks", "comment": null}, "lead_generation_mail_contact_info_shares": {"type": "integer", "index": 23, "name": "lead_generation_mail_contact_info_shares", "comment": null}, "lead_generation_mail_interested_clicks": {"type": "integer", "index": 24, "name": "lead_generation_mail_interested_clicks", "comment": null}, "likes": {"type": "integer", "index": 25, "name": "likes", "comment": null}, "one_click_lead_form_opens": {"type": "integer", "index": 26, "name": "one_click_lead_form_opens", "comment": null}, "one_click_leads": {"type": "integer", "index": 27, "name": "one_click_leads", "comment": null}, "opens": {"type": "integer", "index": 28, "name": "opens", "comment": null}, "other_engagements": {"type": "integer", "index": 29, "name": "other_engagements", "comment": null}, "shares": {"type": "integer", "index": 30, "name": "shares", "comment": null}, "text_url_clicks": {"type": "integer", "index": 31, "name": "text_url_clicks", "comment": null}, "total_engagements": {"type": "integer", "index": 32, "name": "total_engagements", "comment": null}, "video_completions": {"type": "integer", "index": 33, "name": "video_completions", "comment": null}, "video_first_quartile_completions": {"type": "integer", "index": 34, "name": "video_first_quartile_completions", "comment": null}, "video_midpoint_completions": {"type": "integer", "index": 35, "name": "video_midpoint_completions", "comment": null}, "video_starts": {"type": "integer", "index": 36, "name": "video_starts", "comment": null}, "video_third_quartile_completions": {"type": "integer", "index": 37, "name": "video_third_quartile_completions", "comment": null}, "video_views": {"type": "integer", "index": 38, "name": "video_views", "comment": null}, "viral_card_clicks": {"type": "integer", "index": 39, "name": "viral_card_clicks", "comment": null}, "viral_card_impressions": {"type": "integer", "index": 40, "name": "viral_card_impressions", "comment": null}, "viral_clicks": {"type": "integer", "index": 41, "name": "viral_clicks", "comment": null}, "viral_comment_likes": {"type": "integer", "index": 42, "name": "viral_comment_likes", "comment": null}, "viral_comments": {"type": "integer", "index": 43, "name": "viral_comments", "comment": null}, "viral_company_page_clicks": {"type": "integer", "index": 44, "name": "viral_company_page_clicks", "comment": null}, "viral_external_website_conversions": {"type": "integer", "index": 45, "name": "viral_external_website_conversions", "comment": null}, "viral_external_website_post_click_conversions": {"type": "integer", "index": 46, "name": "viral_external_website_post_click_conversions", "comment": null}, "viral_external_website_post_view_conversions": {"type": "integer", "index": 47, "name": "viral_external_website_post_view_conversions", "comment": null}, "viral_follows": {"type": "integer", "index": 48, "name": "viral_follows", "comment": null}, "viral_full_screen_plays": {"type": "integer", "index": 49, "name": "viral_full_screen_plays", "comment": null}, "viral_impressions": {"type": "integer", "index": 50, "name": "viral_impressions", "comment": null}, "viral_landing_page_clicks": {"type": "integer", "index": 51, "name": "viral_landing_page_clicks", "comment": null}, "viral_likes": {"type": "integer", "index": 52, "name": "viral_likes", "comment": null}, "viral_one_click_lead_form_opens": {"type": "integer", "index": 53, "name": "viral_one_click_lead_form_opens", "comment": null}, "viral_one_click_leads": {"type": "integer", "index": 54, "name": "viral_one_click_leads", "comment": null}, "viral_other_engagements": {"type": "integer", "index": 55, "name": "viral_other_engagements", "comment": null}, "viral_shares": {"type": "integer", "index": 56, "name": "viral_shares", "comment": null}, "viral_total_engagements": {"type": "integer", "index": 57, "name": "viral_total_engagements", "comment": null}, "viral_video_completions": {"type": "integer", "index": 58, "name": "viral_video_completions", "comment": null}, "viral_video_first_quartile_completions": {"type": "integer", "index": 59, "name": "viral_video_first_quartile_completions", "comment": null}, "viral_video_midpoint_completions": {"type": "integer", "index": 60, "name": "viral_video_midpoint_completions", "comment": null}, "viral_video_starts": {"type": "integer", "index": 61, "name": "viral_video_starts", "comment": null}, "viral_video_third_quartile_completions": {"type": "integer", "index": 62, "name": "viral_video_third_quartile_completions", "comment": null}, "viral_video_views": {"type": "integer", "index": 63, "name": "viral_video_views", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign_tmp"}, "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__ad_analytics_by_creative", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the creative level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The day of the activity."}, "creative_id": {"type": "integer", "index": 3, "name": "creative_id", "comment": "The ID of the related creative."}, "clicks": {"type": "integer", "index": 4, "name": "clicks", "comment": "The count of chargeable clicks."}, "impressions": {"type": "integer", "index": 5, "name": "impressions", "comment": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails."}, "cost": {"type": "integer", "index": 6, "name": "cost", "comment": "The cost of the ads in the local currency or USD."}, "conversion_value_in_local_currency": {"type": "double precision", "index": 7, "name": "conversion_value_in_local_currency", "comment": "The value generated by your conversions, displayed in your LinkedIn account's local currency."}, "external_website_conversions": {"type": "bigint", "index": 8, "name": "external_website_conversions", "comment": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads"}, "one_click_leads": {"type": "bigint", "index": 9, "name": "one_click_leads", "comment": "Leads submitted after clicking on LinkedIn ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative"}, "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__ad_analytics_by_creative_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"creative_id": {"type": "integer", "index": 1, "name": "creative_id", "comment": null}, "day": {"type": "timestamp without time zone", "index": 2, "name": "day", "comment": null}, "action_clicks": {"type": "integer", "index": 3, "name": "action_clicks", "comment": null}, "card_clicks": {"type": "integer", "index": 4, "name": "card_clicks", "comment": null}, "ad_unit_clicks": {"type": "integer", "index": 5, "name": "ad_unit_clicks", "comment": null}, "landing_page_clicks": {"type": "integer", "index": 6, "name": "landing_page_clicks", "comment": null}, "clicks": {"type": "integer", "index": 7, "name": "clicks", "comment": null}, "approximate_unique_impressions": {"type": "integer", "index": 8, "name": "approximate_unique_impressions", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "card_impressions": {"type": "integer", "index": 10, "name": "card_impressions", "comment": null}, "cost_in_local_currency": {"type": "integer", "index": 11, "name": "cost_in_local_currency", "comment": null}, "cost_in_usd": {"type": "integer", "index": 12, "name": "cost_in_usd", "comment": null}, "comment_likes": {"type": "integer", "index": 13, "name": "comment_likes", "comment": null}, "comments": {"type": "integer", "index": 14, "name": "comments", "comment": null}, "company_page_clicks": {"type": "integer", "index": 15, "name": "company_page_clicks", "comment": null}, "conversion_value_in_local_currency": {"type": "integer", "index": 16, "name": "conversion_value_in_local_currency", "comment": null}, "external_website_conversions": {"type": "bigint", "index": 17, "name": "external_website_conversions", "comment": null}, "external_website_post_click_conversions": {"type": "integer", "index": 18, "name": "external_website_post_click_conversions", "comment": null}, "external_website_post_view_conversions": {"type": "integer", "index": 19, "name": "external_website_post_view_conversions", "comment": null}, "follows": {"type": "integer", "index": 20, "name": "follows", "comment": null}, "full_screen_plays": {"type": "integer", "index": 21, "name": "full_screen_plays", "comment": null}, "lead_generation_mail_contact_info_shares": {"type": "integer", "index": 22, "name": "lead_generation_mail_contact_info_shares", "comment": null}, "lead_generation_mail_interested_clicks": {"type": "integer", "index": 23, "name": "lead_generation_mail_interested_clicks", "comment": null}, "likes": {"type": "integer", "index": 24, "name": "likes", "comment": null}, "one_click_lead_form_opens": {"type": "integer", "index": 25, "name": "one_click_lead_form_opens", "comment": null}, "one_click_leads": {"type": "integer", "index": 26, "name": "one_click_leads", "comment": null}, "opens": {"type": "integer", "index": 27, "name": "opens", "comment": null}, "other_engagements": {"type": "integer", "index": 28, "name": "other_engagements", "comment": null}, "shares": {"type": "integer", "index": 29, "name": "shares", "comment": null}, "text_url_clicks": {"type": "integer", "index": 30, "name": "text_url_clicks", "comment": null}, "total_engagements": {"type": "integer", "index": 31, "name": "total_engagements", "comment": null}, "video_completions": {"type": "integer", "index": 32, "name": "video_completions", "comment": null}, "video_first_quartile_completions": {"type": "integer", "index": 33, "name": "video_first_quartile_completions", "comment": null}, "video_midpoint_completions": {"type": "integer", "index": 34, "name": "video_midpoint_completions", "comment": null}, "video_starts": {"type": "integer", "index": 35, "name": "video_starts", "comment": null}, "video_third_quartile_completions": {"type": "integer", "index": 36, "name": "video_third_quartile_completions", "comment": null}, "video_views": {"type": "integer", "index": 37, "name": "video_views", "comment": null}, "viral_card_clicks": {"type": "integer", "index": 38, "name": "viral_card_clicks", "comment": null}, "viral_card_impressions": {"type": "integer", "index": 39, "name": "viral_card_impressions", "comment": null}, "viral_clicks": {"type": "integer", "index": 40, "name": "viral_clicks", "comment": null}, "viral_comment_likes": {"type": "integer", "index": 41, "name": "viral_comment_likes", "comment": null}, "viral_comments": {"type": "integer", "index": 42, "name": "viral_comments", "comment": null}, "viral_company_page_clicks": {"type": "integer", "index": 43, "name": "viral_company_page_clicks", "comment": null}, "viral_external_website_conversions": {"type": "integer", "index": 44, "name": "viral_external_website_conversions", "comment": null}, "viral_external_website_post_click_conversions": {"type": "integer", "index": 45, "name": "viral_external_website_post_click_conversions", "comment": null}, "viral_external_website_post_view_conversions": {"type": "integer", "index": 46, "name": "viral_external_website_post_view_conversions", "comment": null}, "viral_follows": {"type": "integer", "index": 47, "name": "viral_follows", "comment": null}, "viral_full_screen_plays": {"type": "integer", "index": 48, "name": "viral_full_screen_plays", "comment": null}, "viral_impressions": {"type": "integer", "index": 49, "name": "viral_impressions", "comment": null}, "viral_landing_page_clicks": {"type": "integer", "index": 50, "name": "viral_landing_page_clicks", "comment": null}, "viral_likes": {"type": "integer", "index": 51, "name": "viral_likes", "comment": null}, "viral_one_click_lead_form_opens": {"type": "integer", "index": 52, "name": "viral_one_click_lead_form_opens", "comment": null}, "viral_one_click_leads": {"type": "integer", "index": 53, "name": "viral_one_click_leads", "comment": null}, "viral_other_engagements": {"type": "integer", "index": 54, "name": "viral_other_engagements", "comment": null}, "viral_shares": {"type": "integer", "index": 55, "name": "viral_shares", "comment": null}, "viral_total_engagements": {"type": "integer", "index": 56, "name": "viral_total_engagements", "comment": null}, "viral_video_completions": {"type": "integer", "index": 57, "name": "viral_video_completions", "comment": null}, "viral_video_first_quartile_completions": {"type": "integer", "index": 58, "name": "viral_video_first_quartile_completions", "comment": null}, "viral_video_midpoint_completions": {"type": "integer", "index": 59, "name": "viral_video_midpoint_completions", "comment": null}, "viral_video_starts": {"type": "integer", "index": 60, "name": "viral_video_starts", "comment": null}, "viral_video_third_quartile_completions": {"type": "integer", "index": 61, "name": "viral_video_third_quartile_completions", "comment": null}, "viral_video_views": {"type": "integer", "index": 62, "name": "viral_video_views", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative_tmp"}, "model.linkedin.stg_linkedin_ads__campaign_group_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__campaign_group_history", "database": "postgres", "comment": "Each record represents a 'version' of a campaign group.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_group_id": {"type": "integer", "index": 2, "name": "campaign_group_id", "comment": "Unique internal ID representing the campaign group."}, "campaign_group_name": {"type": "text", "index": 3, "name": "campaign_group_name", "comment": "A label for the campaign group."}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": "The ID of the account the campaign group belongs to."}, "status": {"type": "text", "index": 5, "name": "status", "comment": "Status of campaign group. Possible values are: ACTIVE - Denotes that the campaign group is capable of serving ads, subject to run date and budget limitations (as well as any other limitations at the account or campaign level). ARCHIVED - Denotes that the campaign group is presently inactive, and should mostly be hidden in the UI until un-archived. CANCELLED - Denotes that the campaign group has been permanently canceled and cannot be reactivated. Not a settable status. DRAFT - Denotes that the campaign group is in a preliminary state and should temporarily not be served. PAUSED - Denotes that the campaign group meets all requirements to be served, but temporarily should not be. PENDING_DELETION - Denotes that the campaign group has been requested to be deleted that is currently pending. REMOVED - Denoted that the campaign group was deleted, but must remain fetchable due to the existence of performance data.\n"}, "is_backfilled": {"type": "boolean", "index": 6, "name": "is_backfilled", "comment": "Flag that denotes whether the campaign group was created organically or to backfill existing campaigns. This is a read-only field set by the system. Default = false."}, "run_schedule_start_at": {"type": "timestamp without time zone", "index": 7, "name": "run_schedule_start_at", "comment": "Represents the inclusive (greater than or equal to) date when to start running the associated campaigns under this campaign group. This field is required."}, "run_schedule_end_at": {"type": "timestamp without time zone", "index": 8, "name": "run_schedule_end_at", "comment": "Represents the exclusive (strictly less than) date when to stop running the associated campaigns under this campaign group. If this field is unset, it indicates an open range with no end date."}, "last_modified_at": {"type": "timestamp without time zone", "index": 9, "name": "last_modified_at", "comment": "The timestamp of when the version was updated."}, "created_at": {"type": "timestamp without time zone", "index": 10, "name": "created_at", "comment": "The timestamp of when the campaign group was created."}, "is_latest_version": {"type": "boolean", "index": 11, "name": "is_latest_version", "comment": "Boolean of whether the record is the latest version of the campaign group."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__campaign_group_history"}, "model.linkedin.stg_linkedin_ads__campaign_group_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__campaign_group_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_modified_time": {"type": "timestamp without time zone", "index": 2, "name": "last_modified_time", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 4, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__campaign_group_history_tmp"}, "model.linkedin.stg_linkedin_ads__campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__campaign_history", "database": "postgres", "comment": "Each record represents a 'version' of a campaign.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": "Unique internal ID representing the campaign."}, "campaign_name": {"type": "text", "index": 3, "name": "campaign_name", "comment": "A label for the campaign."}, "version_tag": {"type": "numeric", "index": 4, "name": "version_tag", "comment": "An integer representation of the version of the campaign."}, "campaign_group_id": {"type": "integer", "index": 5, "name": "campaign_group_id", "comment": "The ID of the campaign group the campaign belongs to."}, "account_id": {"type": "bigint", "index": 6, "name": "account_id", "comment": "The ID of the account the campaign belongs to."}, "status": {"type": "text", "index": 7, "name": "status", "comment": "ACTIVE - Denotes that the campaign is fully servable.\nPAUSED - Denotes that the campaign meets all requirements to be served, but temporarily should not be.\nARCHIVED - Denotes that the campaign is presently inactive, and should mostly be hidden in the UI until un-archived.\nCOMPLETED - Denotes that the campaign has reached a specified budgetary or chronological limit.\nCANCELED - Denotes that the campaign has been permanently canceled, such as when an advertising account is permanently closed.\nDRAFT - Denotes that the campaign is still being edited and not eligible for serving. Some validation will be postponed until the campaign is activated.\nPENDING_DELETION - Denotes that the campaign has been requested to be deleted that is currently pending.\nREMOVED - Denotes that the campaign was deleted, but must remain fetchable due to the existence of performance data.\n"}, "type": {"type": "text", "index": 8, "name": "type", "comment": "TEXT_AD - Text-based ads that show up in the right column or top of the page on LinkedIn.\nSPONSORED_UPDATES - Native ads that promote a company's content updates in the LinkedIn feed.\nSPONSORED_INMAILS - Personalized messages with a call-to-action button delivered to a LinkedIn's member inbox.\nDYNAMIC - Ads that are dynamically personalized.\n"}, "cost_type": {"type": "text", "index": 9, "name": "cost_type", "comment": "CPM - Cost per thousand advertising impressions. If type=SPONSORED_INMAILS; cost per send(CPS) is measured as CPM x 1000.\nCPC- Cost per individual click on the associated link.\nCPV- Cost per view for video ads.\n"}, "creative_selection": {"type": "text", "index": 10, "name": "creative_selection", "comment": "ROUND_ROBIN - Rotate through available creatives to serve them as evenly as possible.\nOPTIMIZED (default) - Bias selection taking into account such as expected performance. Not available for Message and Conversation Ads (type=SPONSORED_INMAILS).\n"}, "daily_budget_amount": {"type": "double precision", "index": 11, "name": "daily_budget_amount", "comment": "Maximum amount to spend per day UTC. The amount of money as a real number string."}, "daily_budget_currency_code": {"type": "text", "index": 12, "name": "daily_budget_currency_code", "comment": "ISO currency code. The currency must match that of the parent account."}, "unit_cost_amount": {"type": "double precision", "index": 13, "name": "unit_cost_amount", "comment": "This value is used as one of the following: amount to bid (for manual bidding), amount which is the target cost (for target cost bidding) per click, impression, or other event depending on the pricing model, or cost cap (for cost cap bidding). The amount of money as a real number string. The amount should be non-negative if the bidding strategy is manual, target cost, or cost cap bidding. The default is 0 with the currency code set to match that of the associated account.\n"}, "unit_cost_currency_code": {"type": "text", "index": 14, "name": "unit_cost_currency_code", "comment": "Amount to bid per click, impression, or other event depending on the pricing model. The default is 0 with the currency code set to match that of the associated account. ISO currency code.\n"}, "format": {"type": "text", "index": 15, "name": "format", "comment": "The ad format on the campaign level. See https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads/campaign-formats?view=li-lms-2022-07"}, "locale_country": {"type": "text", "index": 16, "name": "locale_country", "comment": "Locale of the campaign. An uppercase two-letter country code as defined by ISO-3166."}, "locale_language": {"type": "text", "index": 17, "name": "locale_language", "comment": "Locale of the campaign. A lowercase two-letter language code as defined by ISO-639."}, "objective_type": {"type": "text", "index": 18, "name": "objective_type", "comment": "Campaign Objective type values. Click [here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ad-budget-pricing-type-combinations?view=li-lms-2022-07) for Campaign Objective descriptions. One of: - BRAND_AWARENESS - ENGAGEMENT - JOB_APPLICANTS - LEAD_GENERATION - WEBSITE_CONVERSIONS - WEBSITE_VISITS - VIDEO_VIEWS\n"}, "optimization_target_type": {"type": "text", "index": 19, "name": "optimization_target_type", "comment": "Determines how this campaign is optimized for spending. If this is not set, there is no optimization. Refer to the documentation here. Default = 'NONE'."}, "is_audience_expansion_enabled": {"type": "boolean", "index": 20, "name": "is_audience_expansion_enabled", "comment": "Boolean (default=false) representing whether Audience Expansion is enabled for the campaign provides query expansion for certain targeting criteria."}, "is_offsite_delivery_enabled": {"type": "boolean", "index": 21, "name": "is_offsite_delivery_enabled", "comment": "Boolean indicating if this campaign to allowed to be served on the LinkedIn Audience Network to extend the reach of your campaign by delivering ads beyond the LinkedIn feed to members on third-party apps and sites.\t(default will be \"True\" from June 30, 2022)\n"}, "run_schedule_start_at": {"type": "timestamp without time zone", "index": 22, "name": "run_schedule_start_at", "comment": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the inclusive (greater than or equal to) value in which to start the range."}, "run_schedule_end_at": {"type": "timestamp without time zone", "index": 23, "name": "run_schedule_end_at", "comment": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the exclusive (strictly less than) value in which to end the range, if provided.\n"}, "last_modified_at": {"type": "timestamp without time zone", "index": 24, "name": "last_modified_at", "comment": "The timestamp of when the version was updated."}, "created_at": {"type": "timestamp without time zone", "index": 25, "name": "created_at", "comment": "The timestamp of when the campaign was created."}, "is_latest_version": {"type": "boolean", "index": 26, "name": "is_latest_version", "comment": "Boolean of whether the record is the latest version of the campaign."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__campaign_history"}, "model.linkedin.stg_linkedin_ads__campaign_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__campaign_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_modified_time": {"type": "timestamp without time zone", "index": 2, "name": "last_modified_time", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "campaign_group_id": {"type": "integer", "index": 4, "name": "campaign_group_id", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 5, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "version_tag": {"type": "integer", "index": 7, "name": "version_tag", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__campaign_history_tmp"}, "model.linkedin.stg_linkedin_ads__creative_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__creative_history", "database": "postgres", "comment": "Each record represents a 'version' of a creative.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "creative_id": {"type": "integer", "index": 2, "name": "creative_id", "comment": "Unique internal ID representing the creative."}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": "The ID of the campaign the creative belongs to."}, "status": {"type": "text", "index": 4, "name": "status", "comment": "ACTIVE - Creative creation is complete and creative is available for review and serve.\nPAUSED - Creative creation is complete and creative is current, but should temporarily not be served. This status is not valid upon creation.\nDRAFT - Creative creation is incomplete and may still be edited.\nARCHIVED - Creative creation is complete, but creative should not be served and should be separated from non-archived creatives in any UI.\nCANCELED - Creative is permanently canceled.\n"}, "click_uri": {"type": "text", "index": 5, "name": "click_uri", "comment": "The URL where the member should be redirected to, on clicking the text ad or spotlight ad."}, "last_modified_at": {"type": "timestamp without time zone", "index": 6, "name": "last_modified_at", "comment": "The timestamp of when the version was updated."}, "created_at": {"type": "timestamp without time zone", "index": 7, "name": "created_at", "comment": "The timestamp of when the creative was created."}, "click_uri_type": {"type": "text", "index": 8, "name": "click_uri_type", "comment": "Will either be `text_ad`, `spotlight`, or `null` to indicate the origin of the click_uri."}, "is_latest_version": {"type": "boolean", "index": 9, "name": "is_latest_version", "comment": "Boolean of whether the record is the latest version of the creative."}, "base_url": {"type": "text", "index": 10, "name": "base_url", "comment": "The base URL of the ad, extracted from the `click_uri`."}, "url_host": {"type": "text", "index": 11, "name": "url_host", "comment": "The URL host of the ad, extracted from the `click_uri`."}, "url_path": {"type": "text", "index": 12, "name": "url_path", "comment": "The URL path of the ad, extracted from the `click_uri`."}, "utm_source": {"type": "text", "index": 13, "name": "utm_source", "comment": "The utm_source parameter of the ad, extracted from the `click_uri`."}, "utm_medium": {"type": "text", "index": 14, "name": "utm_medium", "comment": "The utm_medium parameter of the ad, extracted from the `click_uri`."}, "utm_campaign": {"type": "text", "index": 15, "name": "utm_campaign", "comment": "The utm_campaign parameter of the ad, extracted from the `click_uri`."}, "utm_content": {"type": "text", "index": 16, "name": "utm_content", "comment": "The utm_content parameter of the ad, extracted from the `click_uri`."}, "utm_term": {"type": "text", "index": 17, "name": "utm_term", "comment": "The utm_term parameter of the ad, extracted from the `click_uri`."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__creative_history"}, "model.linkedin.stg_linkedin_ads__creative_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__creative_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "intended_status": {"type": "character varying", "index": 3, "name": "intended_status", "comment": null}, "click_uri": {"type": "text", "index": 4, "name": "click_uri", "comment": null}, "last_modified_at": {"type": "timestamp without time zone", "index": 5, "name": "last_modified_at", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 6, "name": "created_time", "comment": null}, "text_ad_landing_page": {"type": "text", "index": 7, "name": "text_ad_landing_page", "comment": null}, "spotlight_landing_page": {"type": "text", "index": 8, "name": "spotlight_landing_page", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__creative_history_tmp"}, "model.linkedin.stg_linkedin_ads__geo": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__geo", "database": "postgres", "comment": "Contains geographic data for LinkedIn Ads, including IDs and names of locations.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "geo_id": {"type": "integer", "index": 2, "name": "geo_id", "comment": "Unique identifier for the geographic entity, used for joins in reporting tables."}, "value": {"type": "text", "index": 3, "name": "value", "comment": "Name of the geographic entity."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__geo"}, "model.linkedin.stg_linkedin_ads__geo_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__geo_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "id": {"type": "integer", "index": 2, "name": "id", "comment": null}, "value": {"type": "text", "index": 3, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__geo_tmp"}, "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__monthly_ad_analytics_by_country", "database": "postgres", "comment": "Monthly LinkedIn Ads performance metrics aggregated by member country and campaign.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_month": {"type": "date", "index": 2, "name": "date_month", "comment": "Month of the reporting data, aliased as `date_month`."}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": "Identifier of the LinkedIn Ads campaign."}, "member_country_geo_id": {"type": "integer", "index": 4, "name": "member_country_geo_id", "comment": "ID representing the country of the LinkedIn members who interacted with the campaign."}, "clicks": {"type": "integer", "index": 5, "name": "clicks", "comment": "The count of chargeable clicks."}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails."}, "cost": {"type": "numeric", "index": 7, "name": "cost", "comment": "The cost of the ads in the local currency or USD."}, "conversion_value_in_local_currency": {"type": "double precision", "index": 8, "name": "conversion_value_in_local_currency", "comment": "The value generated by your conversions, displayed in your LinkedIn account's local currency."}, "external_website_conversions": {"type": "bigint", "index": 9, "name": "external_website_conversions", "comment": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads."}, "one_click_leads": {"type": "bigint", "index": 10, "name": "one_click_leads", "comment": "Leads submitted after clicking on LinkedIn ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country"}, "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__monthly_ad_analytics_by_country_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "month": {"type": "text", "index": 2, "name": "month", "comment": null}, "clicks": {"type": "integer", "index": 3, "name": "clicks", "comment": null}, "member_country": {"type": "integer", "index": 4, "name": "member_country", "comment": null}, "impressions": {"type": "integer", "index": 5, "name": "impressions", "comment": null}, "conversion_value_in_local_currency": {"type": "double precision", "index": 6, "name": "conversion_value_in_local_currency", "comment": null}, "cost_in_local_currency": {"type": "numeric", "index": 7, "name": "cost_in_local_currency", "comment": null}, "cost_in_usd": {"type": "numeric", "index": 8, "name": "cost_in_usd", "comment": null}, "external_website_post_click_conversions": {"type": "integer", "index": 9, "name": "external_website_post_click_conversions", "comment": null}, "one_click_leads": {"type": "integer", "index": 10, "name": "one_click_leads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country_tmp"}, "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__monthly_ad_analytics_by_region", "database": "postgres", "comment": "Monthly LinkedIn Ads performance metrics aggregated by member region and campaign.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_month": {"type": "date", "index": 2, "name": "date_month", "comment": "Month of the reporting data."}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": "Identifier of the LinkedIn Ads campaign."}, "member_region_geo_id": {"type": "integer", "index": 4, "name": "member_region_geo_id", "comment": "ID representing the region of the LinkedIn members who interacted with the campaign."}, "impressions": {"type": "integer", "index": 5, "name": "impressions", "comment": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails."}, "clicks": {"type": "integer", "index": 6, "name": "clicks", "comment": "The count of chargeable clicks."}, "cost": {"type": "numeric", "index": 7, "name": "cost", "comment": "The cost of the ads in the local currency or USD."}, "conversion_value_in_local_currency": {"type": "double precision", "index": 8, "name": "conversion_value_in_local_currency", "comment": "The value generated by your conversions, displayed in your LinkedIn account's local currency."}, "external_website_conversions": {"type": "bigint", "index": 9, "name": "external_website_conversions", "comment": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads."}, "one_click_leads": {"type": "bigint", "index": 10, "name": "one_click_leads", "comment": "Leads submitted after clicking on LinkedIn ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region"}, "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__monthly_ad_analytics_by_region_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "month": {"type": "text", "index": 2, "name": "month", "comment": null}, "clicks": {"type": "integer", "index": 3, "name": "clicks", "comment": null}, "member_region": {"type": "integer", "index": 4, "name": "member_region", "comment": null}, "impressions": {"type": "integer", "index": 5, "name": "impressions", "comment": null}, "conversion_value_in_local_currency": {"type": "double precision", "index": 6, "name": "conversion_value_in_local_currency", "comment": null}, "cost_in_local_currency": {"type": "numeric", "index": 7, "name": "cost_in_local_currency", "comment": null}, "cost_in_usd": {"type": "numeric", "index": 8, "name": "cost_in_usd", "comment": null}, "external_website_post_click_conversions": {"type": "integer", "index": 9, "name": "external_website_post_click_conversions", "comment": null}, "one_click_leads": {"type": "integer", "index": 10, "name": "one_click_leads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region_tmp"}, "model.microsoft_ads.stg_microsoft_ads__account_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__account_daily_report", "database": "postgres", "comment": "Each record in this table represents the daily performance by account and all non-metric columns.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "device_os": {"type": "text", "index": 4, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 5, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 6, "name": "network", "comment": "The network associated with this record."}, "currency_code": {"type": "text", "index": 7, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "ad_distribution": {"type": "text", "index": 8, "name": "ad_distribution", "comment": "The distribution medium associated with this record."}, "bid_match_type": {"type": "text", "index": 9, "name": "bid_match_type", "comment": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "delivered_match_type": {"type": "text", "index": 10, "name": "delivered_match_type", "comment": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "top_vs_other": {"type": "text", "index": 11, "name": "top_vs_other", "comment": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009)."}, "clicks": {"type": "integer", "index": 12, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "integer", "index": 13, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "double precision", "index": 14, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "integer", "index": 15, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 16, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "integer", "index": 17, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__account_daily_report"}, "model.microsoft_ads.stg_microsoft_ads__account_daily_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__account_daily_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "device_os": {"type": "text", "index": 3, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 4, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 5, "name": "network", "comment": null}, "currency_code": {"type": "text", "index": 6, "name": "currency_code", "comment": null}, "ad_distribution": {"type": "text", "index": 7, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 8, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 9, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 10, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 11, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 12, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 13, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 14, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 15, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 16, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 17, "name": "all_conversions_qualified", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__account_daily_report_tmp"}, "model.microsoft_ads.stg_microsoft_ads__account_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__account_history", "database": "postgres", "comment": "Each record in this table represents a version of one or more Microsoft accounts.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "integer", "index": 2, "name": "account_id", "comment": "The ID of the account."}, "account_name": {"type": "character varying", "index": 3, "name": "account_name", "comment": "The name of the account."}, "modified_at": {"type": "timestamp without time zone", "index": 4, "name": "modified_at", "comment": "The time each version of the object was last modified, i.e. when that version of the object was 'created'."}, "time_zone": {"type": "text", "index": 5, "name": "time_zone", "comment": "The time zone associated with this record."}, "currency_code": {"type": "text", "index": 6, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "is_most_recent_record": {"type": "boolean", "index": 7, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__account_history"}, "model.microsoft_ads.stg_microsoft_ads__account_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__account_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "name": {"type": "character varying", "index": 2, "name": "name", "comment": null}, "last_modified_time": {"type": "timestamp without time zone", "index": 3, "name": "last_modified_time", "comment": null}, "time_zone": {"type": "text", "index": 4, "name": "time_zone", "comment": null}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__account_history_tmp"}, "model.microsoft_ads.stg_microsoft_ads__ad_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_daily_report", "database": "postgres", "comment": "Each record in this table represents the daily performance by account, campaign, ad group, ad and all non-metric columns.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": "The ID of the campaign."}, "ad_group_id": {"type": "bigint", "index": 5, "name": "ad_group_id", "comment": "The ID of the corresponding ad group."}, "ad_id": {"type": "bigint", "index": 6, "name": "ad_id", "comment": "The ID of the corresponding ad."}, "currency_code": {"type": "text", "index": 7, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "device_os": {"type": "text", "index": 8, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 9, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 10, "name": "network", "comment": "The network associated with this record."}, "language": {"type": "text", "index": 11, "name": "language", "comment": "The language that the associated ad was viewed in."}, "ad_distribution": {"type": "text", "index": 12, "name": "ad_distribution", "comment": "The distribution medium associated with this record."}, "bid_match_type": {"type": "text", "index": 13, "name": "bid_match_type", "comment": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "delivered_match_type": {"type": "text", "index": 14, "name": "delivered_match_type", "comment": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "top_vs_other": {"type": "text", "index": 15, "name": "top_vs_other", "comment": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009)."}, "clicks": {"type": "integer", "index": 16, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "integer", "index": 17, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "double precision", "index": 18, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "integer", "index": 19, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 20, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "integer", "index": 21, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "all_conversions_value": {"type": "double precision", "index": 22, "name": "all_conversions_value", "comment": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_daily_report"}, "model.microsoft_ads.stg_microsoft_ads__ad_daily_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_daily_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "bigint", "index": 5, "name": "ad_id", "comment": null}, "currency_code": {"type": "text", "index": 6, "name": "currency_code", "comment": null}, "device_os": {"type": "text", "index": 7, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 8, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 9, "name": "network", "comment": null}, "language": {"type": "text", "index": 10, "name": "language", "comment": null}, "ad_distribution": {"type": "text", "index": 11, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 12, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 13, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 14, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 15, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 16, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 17, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 18, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 19, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 20, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 21, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 22, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 23, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_daily_report_tmp"}, "model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_group_daily_report", "database": "postgres", "comment": "Each record in this table represents the daily performance by account, campaign, ad group and all non-metric columns.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": "The ID of the campaign."}, "ad_group_id": {"type": "bigint", "index": 5, "name": "ad_group_id", "comment": "The ID of the corresponding ad group."}, "currency_code": {"type": "text", "index": 6, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "device_os": {"type": "text", "index": 7, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 8, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 9, "name": "network", "comment": "The network associated with this record."}, "language": {"type": "text", "index": 10, "name": "language", "comment": "The language that the associated ad was viewed in."}, "ad_distribution": {"type": "text", "index": 11, "name": "ad_distribution", "comment": "The distribution medium associated with this record."}, "bid_match_type": {"type": "text", "index": 12, "name": "bid_match_type", "comment": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "delivered_match_type": {"type": "text", "index": 13, "name": "delivered_match_type", "comment": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "top_vs_other": {"type": "text", "index": 14, "name": "top_vs_other", "comment": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009)."}, "clicks": {"type": "integer", "index": 15, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "integer", "index": 16, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "double precision", "index": 17, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "integer", "index": 18, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 19, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "integer", "index": 20, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "all_conversions_value": {"type": "double precision", "index": 21, "name": "all_conversions_value", "comment": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report"}, "model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_group_daily_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": null}, "device_os": {"type": "text", "index": 6, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 7, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 8, "name": "network", "comment": null}, "language": {"type": "text", "index": 9, "name": "language", "comment": null}, "ad_distribution": {"type": "text", "index": 10, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 11, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 12, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 13, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 14, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 15, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 16, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 17, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 18, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 19, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 20, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 21, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 22, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report_tmp"}, "model.microsoft_ads.stg_microsoft_ads__ad_group_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_group_history", "database": "postgres", "comment": "Each record in this table represents a version of one or more Microsoft ad groups.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_group_id": {"type": "bigint", "index": 2, "name": "ad_group_id", "comment": "The ID of the corresponding ad group."}, "ad_group_name": {"type": "text", "index": 3, "name": "ad_group_name", "comment": "The name of the corresponding ad group."}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": "The ID of the campaign."}, "modified_at": {"type": "timestamp without time zone", "index": 5, "name": "modified_at", "comment": "The time each version of the object was last modified, i.e. when that version of the object was 'created'."}, "start_date": {"type": "date", "index": 6, "name": "start_date", "comment": "The date in which an ad group starts running."}, "end_date": {"type": "integer", "index": 7, "name": "end_date", "comment": "The date in which this ad group will no longer run."}, "status": {"type": "text", "index": 8, "name": "status", "comment": "The status of this ad group; see the following [documentation](https://help.ads.microsoft.com/apex/index/3/en/53094) for more information on values and definitions."}, "is_most_recent_record": {"type": "boolean", "index": 9, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_group_history"}, "model.microsoft_ads.stg_microsoft_ads__ad_group_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_group_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "modified_time": {"type": "timestamp without time zone", "index": 4, "name": "modified_time", "comment": null}, "start_date": {"type": "date", "index": 5, "name": "start_date", "comment": null}, "end_date": {"type": "integer", "index": 6, "name": "end_date", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_group_history_tmp"}, "model.microsoft_ads.stg_microsoft_ads__ad_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_history", "database": "postgres", "comment": "Each record in this table represents a version of one or more Microsoft ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_id": {"type": "bigint", "index": 2, "name": "ad_id", "comment": "The ID of the corresponding ad."}, "ad_name": {"type": "text", "index": 3, "name": "ad_name", "comment": "The name of the corresponding ad; `title_part_1` is used as the default ad name but you may customize this by using the `microsoft_ads__ad_name_selector` variable. For more information, refer to the [README](https://github.com/fivetran/dbt_microsoft_ads/blob/main/README.md#change-how-ad-name-is-determined)."}, "title": {"type": "text", "index": 4, "name": "title", "comment": "The title of the ad."}, "title_part_1": {"type": "text", "index": 5, "name": "title_part_1", "comment": "Part 1 of the title."}, "title_part_2": {"type": "text", "index": 6, "name": "title_part_2", "comment": "Part 2 of the title."}, "title_part_3": {"type": "text", "index": 7, "name": "title_part_3", "comment": "Part 3 of the title."}, "final_url": {"type": "text", "index": 8, "name": "final_url", "comment": "The full URL that the ad links to."}, "domain": {"type": "text", "index": 9, "name": "domain", "comment": "The associated domain that the ad links to."}, "ad_group_id": {"type": "bigint", "index": 10, "name": "ad_group_id", "comment": "The ID of the corresponding ad group."}, "modified_at": {"type": "timestamp without time zone", "index": 11, "name": "modified_at", "comment": "The time each version of the object was last modified, i.e. when that version of the object was 'created'."}, "status": {"type": "text", "index": 12, "name": "status", "comment": "The status of this ad; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/adstatus?view=bingads-13) for more information on values and definitions."}, "type": {"type": "text", "index": 13, "name": "type", "comment": "The ad type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/adtype?view=bingads-13) for more information on values and definitions."}, "is_most_recent_record": {"type": "boolean", "index": 14, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_history"}, "model.microsoft_ads.stg_microsoft_ads__ad_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "title_part_1": {"type": "text", "index": 2, "name": "title_part_1", "comment": null}, "final_url": {"type": "text", "index": 3, "name": "final_url", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "modified_time": {"type": "timestamp without time zone", "index": 5, "name": "modified_time", "comment": null}, "status": {"type": "text", "index": 6, "name": "status", "comment": null}, "type": {"type": "text", "index": 7, "name": "type", "comment": null}, "title": {"type": "text", "index": 8, "name": "title", "comment": null}, "title_part_2": {"type": "text", "index": 9, "name": "title_part_2", "comment": null}, "title_part_3": {"type": "text", "index": 10, "name": "title_part_3", "comment": null}, "domain": {"type": "text", "index": 11, "name": "domain", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_history_tmp"}, "model.microsoft_ads.stg_microsoft_ads__campaign_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__campaign_daily_report", "database": "postgres", "comment": "Each record in this table represents the daily performance by account, campaign and all non-metric columns.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": "The ID of the campaign."}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "device_os": {"type": "text", "index": 6, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 7, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 8, "name": "network", "comment": "The network associated with this record."}, "ad_distribution": {"type": "text", "index": 9, "name": "ad_distribution", "comment": "The distribution medium associated with this record."}, "bid_match_type": {"type": "text", "index": 10, "name": "bid_match_type", "comment": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "delivered_match_type": {"type": "text", "index": 11, "name": "delivered_match_type", "comment": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "top_vs_other": {"type": "text", "index": 12, "name": "top_vs_other", "comment": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009)."}, "budget_association_status": {"type": "text", "index": 13, "name": "budget_association_status", "comment": "Indicates whether or not the campaign is currently spending from the budget mentioned in the BudgetName column. The possible values are `Current` and `Ended`."}, "budget_name": {"type": "text", "index": 14, "name": "budget_name", "comment": "The name of the budget. This column will be empty for unshared budgets."}, "budget_status": {"type": "text", "index": 15, "name": "budget_status", "comment": "The budget status. The possible values are `Active` and `Deleted`. This column will be empty for unshared budgets."}, "clicks": {"type": "integer", "index": 16, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "integer", "index": 17, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "double precision", "index": 18, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "integer", "index": 19, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 20, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "integer", "index": 21, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "all_conversions_value": {"type": "double precision", "index": 22, "name": "all_conversions_value", "comment": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__campaign_daily_report"}, "model.microsoft_ads.stg_microsoft_ads__campaign_daily_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__campaign_daily_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "currency_code": {"type": "text", "index": 4, "name": "currency_code", "comment": null}, "device_os": {"type": "text", "index": 5, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 6, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 7, "name": "network", "comment": null}, "ad_distribution": {"type": "text", "index": 8, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 9, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 10, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 11, "name": "top_vs_other", "comment": null}, "budget_association_status": {"type": "text", "index": 12, "name": "budget_association_status", "comment": null}, "budget_name": {"type": "text", "index": 13, "name": "budget_name", "comment": null}, "clicks": {"type": "integer", "index": 14, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 15, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 16, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 17, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 18, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 19, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 20, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 21, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 22, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__campaign_daily_report_tmp"}, "model.microsoft_ads.stg_microsoft_ads__campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__campaign_history", "database": "postgres", "comment": "Each record in this table represents a version of one or more Microsoft campaigns.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": "The ID of the campaign."}, "campaign_name": {"type": "text", "index": 3, "name": "campaign_name", "comment": "The name of the campaign."}, "account_id": {"type": "integer", "index": 4, "name": "account_id", "comment": "The ID of the account."}, "modified_at": {"type": "timestamp without time zone", "index": 5, "name": "modified_at", "comment": "The time each version of the object was last modified, i.e. when that version of the object was 'created'."}, "type": {"type": "text", "index": 6, "name": "type", "comment": "The campaign type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaigntype?view=bingads-13) for more information on values and definitions."}, "time_zone": {"type": "text", "index": 7, "name": "time_zone", "comment": "The time zone associated with this record."}, "status": {"type": "text", "index": 8, "name": "status", "comment": "The status of this campaign; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaignstatus?view=bingads-13) for more information on values and definitions."}, "budget": {"type": "double precision", "index": 9, "name": "budget", "comment": "The amount to spend daily across all campaigns that share the budget."}, "budget_id": {"type": "integer", "index": 10, "name": "budget_id", "comment": "The unique Microsoft Advertising identifier of the budget."}, "budget_type": {"type": "text", "index": 11, "name": "budget_type", "comment": "The budget type determines the pace at which the budget is spent throughout the day."}, "language": {"type": "text", "index": 12, "name": "language", "comment": "The language that the associated ad was viewed in."}, "is_most_recent_record": {"type": "boolean", "index": 13, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__campaign_history"}, "model.microsoft_ads.stg_microsoft_ads__campaign_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__campaign_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "account_id": {"type": "integer", "index": 3, "name": "account_id", "comment": null}, "modified_time": {"type": "timestamp without time zone", "index": 4, "name": "modified_time", "comment": null}, "type": {"type": "text", "index": 5, "name": "type", "comment": null}, "time_zone": {"type": "text", "index": 6, "name": "time_zone", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__campaign_history_tmp"}, "model.microsoft_ads.stg_microsoft_ads__geographic_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__geographic_daily_report", "database": "postgres", "comment": "Each record in this table represents the daily performance segmented by geographic location and related attributes.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": "The ID of the campaign."}, "ad_group_id": {"type": "bigint", "index": 5, "name": "ad_group_id", "comment": "The ID of the corresponding ad group."}, "country": {"type": "text", "index": 6, "name": "country", "comment": "The country or region where the user was physically located when they clicked the ad."}, "region": {"type": "text", "index": 7, "name": "region", "comment": "The state or geographic region where the user was physically located when they clicked the ad."}, "county": {"type": "text", "index": 8, "name": "county", "comment": "The county where the user was physically located when they clicked the ad."}, "postal_code": {"type": "text", "index": 9, "name": "postal_code", "comment": "The postal code where the user was physically located when they clicked the ad."}, "city": {"type": "text", "index": 10, "name": "city", "comment": "The city where the user was physically located when they clicked the ad."}, "metro_area": {"type": "text", "index": 11, "name": "metro_area", "comment": "The metro area (Microsoft Market Area in the United States) where the user was physically located when they clicked the ad."}, "location_id": {"type": "bigint", "index": 12, "name": "location_id", "comment": "The Microsoft Advertising identifier of the location where the user was physically located when they clicked the ad."}, "location_type": {"type": "text", "index": 13, "name": "location_type", "comment": "The location type used to deliver ads. Values include \"Physical location\" and \"Location of interest\". \n\n\"Physical location\" indicates the user was in the corresponding City, Country, MetroArea, or State. \"Location of interest\" indicates the user was searching for or viewing pages about the location."}, "most_specific_location": {"type": "text", "index": 14, "name": "most_specific_location", "comment": "The most specific location used to deliver ads. If postal code is available, it is prioritized; otherwise, it may match city or country/region."}, "currency_code": {"type": "text", "index": 15, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "device_os": {"type": "text", "index": 16, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 17, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 18, "name": "network", "comment": "The network associated with this record."}, "language": {"type": "text", "index": 19, "name": "language", "comment": "The language of the publisher where the ad was shown."}, "ad_distribution": {"type": "text", "index": 20, "name": "ad_distribution", "comment": "The distribution medium associated with this record."}, "bid_match_type": {"type": "text", "index": 21, "name": "bid_match_type", "comment": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "delivered_match_type": {"type": "text", "index": 22, "name": "delivered_match_type", "comment": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "top_vs_other": {"type": "text", "index": 23, "name": "top_vs_other", "comment": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009)."}, "goal": {"type": "text", "index": 24, "name": "goal", "comment": "The name of the goal you set for the conversions you want, meaning actions customers take after clicking your ad."}, "clicks": {"type": "integer", "index": 25, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "integer", "index": 26, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "numeric", "index": 27, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "integer", "index": 28, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 29, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "integer", "index": 30, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "all_conversions_value": {"type": "double precision", "index": 31, "name": "all_conversions_value", "comment": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__geographic_daily_report"}, "model.microsoft_ads.stg_microsoft_ads__geographic_daily_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__geographic_daily_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "bigint", "index": 1, "name": "account_id", "comment": null}, "ad_distribution": {"type": "text", "index": 2, "name": "ad_distribution", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "all_conversions": {"type": "integer", "index": 4, "name": "all_conversions", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 5, "name": "all_conversions_qualified", "comment": null}, "all_revenue": {"type": "numeric", "index": 6, "name": "all_revenue", "comment": null}, "bid_match_type": {"type": "text", "index": 7, "name": "bid_match_type", "comment": null}, "campaign_id": {"type": "bigint", "index": 8, "name": "campaign_id", "comment": null}, "city": {"type": "text", "index": 9, "name": "city", "comment": null}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": null}, "conversions": {"type": "integer", "index": 11, "name": "conversions", "comment": null}, "conversions_qualified": {"type": "integer", "index": 12, "name": "conversions_qualified", "comment": null}, "country": {"type": "text", "index": 13, "name": "country", "comment": null}, "county": {"type": "text", "index": 14, "name": "county", "comment": null}, "currency_code": {"type": "text", "index": 15, "name": "currency_code", "comment": null}, "date": {"type": "date", "index": 16, "name": "date", "comment": null}, "delivered_match_type": {"type": "text", "index": 17, "name": "delivered_match_type", "comment": null}, "device_os": {"type": "text", "index": 18, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 19, "name": "device_type", "comment": null}, "impressions": {"type": "integer", "index": 20, "name": "impressions", "comment": null}, "language": {"type": "text", "index": 21, "name": "language", "comment": null}, "location_type": {"type": "text", "index": 22, "name": "location_type", "comment": null}, "metro_area": {"type": "text", "index": 23, "name": "metro_area", "comment": null}, "postal_code": {"type": "text", "index": 24, "name": "postal_code", "comment": null}, "network": {"type": "text", "index": 25, "name": "network", "comment": null}, "spend": {"type": "numeric", "index": 26, "name": "spend", "comment": null}, "state": {"type": "text", "index": 27, "name": "state", "comment": null}, "top_vs_other": {"type": "text", "index": 28, "name": "top_vs_other", "comment": null}, "revenue": {"type": "numeric", "index": 29, "name": "revenue", "comment": null}, "location_id": {"type": "bigint", "index": 30, "name": "location_id", "comment": null}, "goal": {"type": "text", "index": 31, "name": "goal", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__geographic_daily_report_tmp"}, "model.microsoft_ads.stg_microsoft_ads__keyword_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__keyword_daily_report", "database": "postgres", "comment": "Each record in this table represents the daily performance by account, campaign, ad group, ad, keyword and all non-metric columns.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": "The ID of the campaign."}, "ad_group_id": {"type": "bigint", "index": 5, "name": "ad_group_id", "comment": "The ID of the corresponding ad group."}, "ad_id": {"type": "bigint", "index": 6, "name": "ad_id", "comment": "The ID of the corresponding ad."}, "keyword_id": {"type": "bigint", "index": 7, "name": "keyword_id", "comment": "The ID of the keyword."}, "currency_code": {"type": "text", "index": 8, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "device_os": {"type": "text", "index": 9, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 10, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 11, "name": "network", "comment": "The network associated with this record."}, "language": {"type": "text", "index": 12, "name": "language", "comment": "The language that the associated ad was viewed in."}, "ad_distribution": {"type": "text", "index": 13, "name": "ad_distribution", "comment": "The distribution medium associated with this record."}, "bid_match_type": {"type": "text", "index": 14, "name": "bid_match_type", "comment": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "delivered_match_type": {"type": "text", "index": 15, "name": "delivered_match_type", "comment": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "top_vs_other": {"type": "text", "index": 16, "name": "top_vs_other", "comment": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009)."}, "clicks": {"type": "integer", "index": 17, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "integer", "index": 18, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "double precision", "index": 19, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "integer", "index": 20, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 21, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "integer", "index": 22, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "all_conversions_value": {"type": "double precision", "index": 23, "name": "all_conversions_value", "comment": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__keyword_daily_report"}, "model.microsoft_ads.stg_microsoft_ads__keyword_daily_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__keyword_daily_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "bigint", "index": 5, "name": "ad_id", "comment": null}, "keyword_id": {"type": "bigint", "index": 6, "name": "keyword_id", "comment": null}, "currency_code": {"type": "text", "index": 7, "name": "currency_code", "comment": null}, "device_os": {"type": "text", "index": 8, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 9, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 10, "name": "network", "comment": null}, "language": {"type": "text", "index": 11, "name": "language", "comment": null}, "ad_distribution": {"type": "text", "index": 12, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 13, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 14, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 15, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 16, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 17, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 18, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 19, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 20, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 21, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 22, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 23, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 24, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__keyword_daily_report_tmp"}, "model.microsoft_ads.stg_microsoft_ads__keyword_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__keyword_history", "database": "postgres", "comment": "Each record in this table represents a version of one or more Microsoft keywords.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "keyword_id": {"type": "bigint", "index": 2, "name": "keyword_id", "comment": "The ID of the keyword."}, "keyword_name": {"type": "text", "index": 3, "name": "keyword_name", "comment": "The keyword(s) associated with this record."}, "modified_at": {"type": "timestamp without time zone", "index": 4, "name": "modified_at", "comment": "The time each version of the object was last modified, i.e. when that version of the object was 'created'."}, "ad_group_id": {"type": "bigint", "index": 5, "name": "ad_group_id", "comment": "The ID of the corresponding ad group."}, "match_type": {"type": "text", "index": 6, "name": "match_type", "comment": "The match type associated with this record; values contain but may not be limited to 'Broad', 'Exact', 'Phrase'. Please refer to Microsoft Ad's [documentation](https://help.ads.microsoft.com/#apex/ads/en/50822/1)."}, "status": {"type": "text", "index": 7, "name": "status", "comment": "The status of this keyword; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/keywordstatus?view=bingads-13) for more information on values and definitions."}, "is_most_recent_record": {"type": "boolean", "index": 8, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__keyword_history"}, "model.microsoft_ads.stg_microsoft_ads__keyword_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__keyword_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "modified_time": {"type": "timestamp without time zone", "index": 3, "name": "modified_time", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "match_type": {"type": "text", "index": 5, "name": "match_type", "comment": null}, "status": {"type": "text", "index": 6, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__keyword_history_tmp"}, "model.microsoft_ads.stg_microsoft_ads__search_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__search_daily_report", "database": "postgres", "comment": "Each record in this table represents the daily performance by account, campaign, ad group, ad, keyword and all non-metric columns.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": "The ID of the campaign."}, "ad_group_id": {"type": "bigint", "index": 5, "name": "ad_group_id", "comment": "The ID of the corresponding ad group."}, "ad_id": {"type": "bigint", "index": 6, "name": "ad_id", "comment": "The ID of the corresponding ad."}, "keyword_id": {"type": "bigint", "index": 7, "name": "keyword_id", "comment": "The ID of the keyword."}, "search_query": {"type": "text", "index": 8, "name": "search_query", "comment": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009)."}, "device_os": {"type": "text", "index": 9, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 10, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 11, "name": "network", "comment": "The network associated with this record."}, "language": {"type": "text", "index": 12, "name": "language", "comment": "The language that the associated ad was viewed in."}, "bid_match_type": {"type": "text", "index": 13, "name": "bid_match_type", "comment": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "delivered_match_type": {"type": "text", "index": 14, "name": "delivered_match_type", "comment": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "top_vs_other": {"type": "text", "index": 15, "name": "top_vs_other", "comment": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009)."}, "clicks": {"type": "integer", "index": 16, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "integer", "index": 17, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "double precision", "index": 18, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "integer", "index": 19, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 20, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "integer", "index": 21, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "all_conversions_value": {"type": "double precision", "index": 22, "name": "all_conversions_value", "comment": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__search_daily_report"}, "model.microsoft_ads.stg_microsoft_ads__search_daily_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__search_daily_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "bigint", "index": 5, "name": "ad_id", "comment": null}, "keyword_id": {"type": "bigint", "index": 6, "name": "keyword_id", "comment": null}, "search_query": {"type": "text", "index": 7, "name": "search_query", "comment": null}, "device_os": {"type": "text", "index": 8, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 9, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 10, "name": "network", "comment": null}, "language": {"type": "text", "index": 11, "name": "language", "comment": null}, "bid_match_type": {"type": "text", "index": 12, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 13, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 14, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 15, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 16, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 17, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 18, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 19, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 20, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 21, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 22, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 23, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__search_daily_report_tmp"}, "model.pinterest.stg_pinterest_ads__ad_group_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__ad_group_history", "database": "postgres", "comment": "Each record represents a version of a Pinterest Ad Group.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_group_id": {"type": "text", "index": 2, "name": "ad_group_id", "comment": "Ad group ID."}, "ad_group_name": {"type": "text", "index": 3, "name": "ad_group_name", "comment": "Ad group name."}, "ad_group_status": {"type": "text", "index": 4, "name": "ad_group_status", "comment": "The status of the Ad group. One of \"ACTIVE\", \"ARCHIVED\", \"PAUSED\""}, "advertiser_id": {"type": "bigint", "index": 5, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "_fivetran_synced": {"type": "text", "index": 6, "name": "_fivetran_synced", "comment": "Timestamp of when a record was last synced."}, "campaign_id": {"type": "text", "index": 7, "name": "campaign_id", "comment": "Parent Campaign ID."}, "created_at": {"type": "text", "index": 8, "name": "created_at", "comment": "Ad group creation time."}, "end_time": {"type": "integer", "index": 9, "name": "end_time", "comment": "Ad group end time."}, "pacing_delivery_type": {"type": "text", "index": 10, "name": "pacing_delivery_type", "comment": "Ad group pacing delivery type. With ACCELERATED, an ad group budget is spent as fast as possible. With STANDARD, an ad group budget is spent smoothly over a day. When using CBO, only the STANDARD pacing delivery type is allowed."}, "placement_group": {"type": "text", "index": 11, "name": "placement_group", "comment": "The placement group. \"ALL\", \"SEARCH\", \"BROWSE\", or \"OTHER\""}, "start_time": {"type": "text", "index": 12, "name": "start_time", "comment": "Ad group start time."}, "summary_status": {"type": "text", "index": 13, "name": "summary_status", "comment": "Summary status. \"RUNNING\", \"PAUSED\", \"NOT_STARTED\", \"COMPLETED\", \"ADVERTISER_DISABLED\", \"ARCHIVED\""}, "is_most_recent_record": {"type": "boolean", "index": 14, "name": "is_most_recent_record", "comment": "Boolean representing whether the record is the most recent version of the object."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__ad_group_history"}, "model.pinterest.stg_pinterest_ads__ad_group_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__ad_group_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "campaign_id": {"type": "bigint", "index": 2, "name": "campaign_id", "comment": null}, "created_time": {"type": "text", "index": 3, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "status": {"type": "text", "index": 5, "name": "status", "comment": null}, "start_time": {"type": "text", "index": 6, "name": "start_time", "comment": null}, "end_time": {"type": "integer", "index": 7, "name": "end_time", "comment": null}, "_fivetran_synced": {"type": "text", "index": 8, "name": "_fivetran_synced", "comment": null}, "pacing_delivery_type": {"type": "text", "index": 9, "name": "pacing_delivery_type", "comment": null}, "placement_group": {"type": "text", "index": 10, "name": "placement_group", "comment": null}, "summary_status": {"type": "text", "index": 11, "name": "summary_status", "comment": null}, "ad_account_id": {"type": "bigint", "index": 12, "name": "ad_account_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__ad_group_history_tmp"}, "model.pinterest.stg_pinterest_ads__ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__ad_group_report", "database": "postgres", "comment": "Each record represents the daily performance of a Pinterest Ad Groups by campaign and advertiser.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp with time zone", "index": 2, "name": "date_day", "comment": "The performance date of the record."}, "ad_group_id": {"type": "text", "index": 3, "name": "ad_group_id", "comment": "The ID of the related Ad group."}, "ad_group_name": {"type": "text", "index": 4, "name": "ad_group_name", "comment": "Name of the ad group."}, "ad_group_status": {"type": "text", "index": 5, "name": "ad_group_status", "comment": "Status of the ad group."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID of the related Campaign."}, "advertiser_id": {"type": "text", "index": 7, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "impressions": {"type": "integer", "index": 8, "name": "impressions", "comment": "The number of paid and earned impressions that occurred on the day of the record."}, "clicks": {"type": "integer", "index": 9, "name": "clicks", "comment": "The number of paid and earned clicks that occurred on the day of the record."}, "spend": {"type": "numeric", "index": 10, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "total_conversions": {"type": "integer", "index": 11, "name": "total_conversions", "comment": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "total_conversions_quantity": {"type": "integer", "index": 12, "name": "total_conversions_quantity", "comment": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "total_conversions_value": {"type": "numeric", "index": 13, "name": "total_conversions_value", "comment": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__ad_group_report"}, "model.pinterest.stg_pinterest_ads__ad_group_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__ad_group_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "ad_group_id": {"type": "bigint", "index": 2, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "text", "index": 3, "name": "ad_group_name", "comment": null}, "ad_group_status": {"type": "text", "index": 4, "name": "ad_group_status", "comment": null}, "campaign_id": {"type": "bigint", "index": 5, "name": "campaign_id", "comment": null}, "advertiser_id": {"type": "bigint", "index": 6, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 8, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 9, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 10, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 11, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 12, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 13, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 14, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 15, "name": "total_conversions_value_in_micro_dollar", "comment": null}, "total_view_checkout": {"type": "integer", "index": 16, "name": "total_view_checkout", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__ad_group_report_tmp"}, "model.pinterest.stg_pinterest_ads__advertiser_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__advertiser_history", "database": "postgres", "comment": "Each record represents a version of an advertiser.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "advertiser_id": {"type": "text", "index": 2, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "advertiser_name": {"type": "text", "index": 3, "name": "advertiser_name", "comment": "Name of the advertiser."}, "country": {"type": "text", "index": 4, "name": "country", "comment": "The country code where the advertiser is located."}, "created_at": {"type": "timestamp without time zone", "index": 5, "name": "created_at", "comment": "Timestamp of when a record was created."}, "currency_code": {"type": "text", "index": 6, "name": "currency_code", "comment": "The currency code which the advertiser is set up using."}, "owner_user_id": {"type": "integer", "index": 7, "name": "owner_user_id", "comment": "Unique identifier of the owner user."}, "owner_username": {"type": "text", "index": 8, "name": "owner_username", "comment": "Advertiser's username."}, "advertiser_permissions": {"type": "text", "index": 9, "name": "advertiser_permissions", "comment": "The permissions associated with this account."}, "updated_at": {"type": "timestamp without time zone", "index": 10, "name": "updated_at", "comment": "Timestamp of when a record was last updated."}, "is_most_recent_record": {"type": "boolean", "index": 11, "name": "is_most_recent_record", "comment": "Boolean representing whether the record is the most recent version of the object."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__advertiser_history"}, "model.pinterest.stg_pinterest_ads__advertiser_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__advertiser_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_time": {"type": "timestamp without time zone", "index": 2, "name": "updated_time", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "billing_profile_status": {"type": "text", "index": 4, "name": "billing_profile_status", "comment": null}, "billing_type": {"type": "text", "index": 5, "name": "billing_type", "comment": null}, "country": {"type": "text", "index": 6, "name": "country", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 7, "name": "created_time", "comment": null}, "currency": {"type": "text", "index": 8, "name": "currency", "comment": null}, "merchant_id": {"type": "integer", "index": 9, "name": "merchant_id", "comment": null}, "name": {"type": "text", "index": 10, "name": "name", "comment": null}, "owner_user_id": {"type": "integer", "index": 11, "name": "owner_user_id", "comment": null}, "status": {"type": "text", "index": 12, "name": "status", "comment": null}, "owner_username": {"type": "text", "index": 13, "name": "owner_username", "comment": null}, "permissions": {"type": "text", "index": 14, "name": "permissions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__advertiser_history_tmp"}, "model.pinterest.stg_pinterest_ads__advertiser_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__advertiser_report", "database": "postgres", "comment": "Each record represents the daily performance of an Advertiser.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp with time zone", "index": 2, "name": "date_day", "comment": "The performance date of the record."}, "advertiser_id": {"type": "text", "index": 3, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "impressions": {"type": "integer", "index": 4, "name": "impressions", "comment": "The number of paid and earned impressions that occurred on the day of the record."}, "clicks": {"type": "integer", "index": 5, "name": "clicks", "comment": "The number of paid and earned clicks that occurred on the day of the record."}, "spend": {"type": "numeric", "index": 6, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "total_conversions": {"type": "integer", "index": 7, "name": "total_conversions", "comment": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "total_conversions_quantity": {"type": "integer", "index": 8, "name": "total_conversions_quantity", "comment": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "total_conversions_value": {"type": "numeric", "index": 9, "name": "total_conversions_value", "comment": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__advertiser_report"}, "model.pinterest.stg_pinterest_ads__advertiser_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__advertiser_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "advertiser_id": {"type": "bigint", "index": 2, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 4, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 5, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 6, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 7, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 8, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 9, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 10, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 11, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__advertiser_report_tmp"}, "model.pinterest.stg_pinterest_ads__campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__campaign_history", "database": "postgres", "comment": "Each record represents a version of a Pinterest Campaign.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_id": {"type": "text", "index": 2, "name": "campaign_id", "comment": "The ID of the related Campaign."}, "campaign_name": {"type": "text", "index": 3, "name": "campaign_name", "comment": "Campaign name."}, "advertiser_id": {"type": "text", "index": 4, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "default_ad_group_budget_in_micro_currency": {"type": "integer", "index": 5, "name": "default_ad_group_budget_in_micro_currency", "comment": "When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account."}, "is_automated_campaign": {"type": "boolean", "index": 6, "name": "is_automated_campaign", "comment": "Specifies whether the campaign was created in the automated campaign flow"}, "is_campaign_budget_optimization": {"type": "boolean", "index": 7, "name": "is_campaign_budget_optimization", "comment": "Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared."}, "is_flexible_daily_budgets": {"type": "boolean", "index": 8, "name": "is_flexible_daily_budgets", "comment": "Determine if a campaign has flexible daily budgets setup."}, "campaign_status": {"type": "text", "index": 9, "name": "campaign_status", "comment": "The status of the Campaign. One of \"ACTIVE\", \"ARCHIVED\", \"PAUSED\""}, "_fivetran_synced": {"type": "text", "index": 10, "name": "_fivetran_synced", "comment": "Timestamp of when a record was last synced."}, "created_at": {"type": "text", "index": 11, "name": "created_at", "comment": "Campaign creation time."}, "start_time": {"type": "timestamp without time zone", "index": 12, "name": "start_time", "comment": "Timestamp when the campaign became active or was scheduled to start."}, "end_time": {"type": "timestamp without time zone", "index": 13, "name": "end_time", "comment": "Timestamp when the campaign ended or is scheduled to end."}, "budget_spend_cap": {"type": "integer", "index": 14, "name": "budget_spend_cap", "comment": "Maximum amount allowed to be spent over a specified budget period for the campaign."}, "lifetime_spend_cap": {"type": "integer", "index": 15, "name": "lifetime_spend_cap", "comment": "Total maximum spend allowed across the entire lifespan of the campaign."}, "objective_type": {"type": "text", "index": 16, "name": "objective_type", "comment": "The primary goal of the campaign (e.g., brand awareness, conversions, video views)."}, "is_most_recent_record": {"type": "boolean", "index": 17, "name": "is_most_recent_record", "comment": "Boolean representing whether the record is the most recent version of the object."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__campaign_history"}, "model.pinterest.stg_pinterest_ads__campaign_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__campaign_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "created_time": {"type": "text", "index": 2, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "status": {"type": "text", "index": 4, "name": "status", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "advertiser_id": {"type": "bigint", "index": 6, "name": "advertiser_id", "comment": null}, "default_ad_group_budget_in_micro_currency": {"type": "integer", "index": 7, "name": "default_ad_group_budget_in_micro_currency", "comment": null}, "is_automated_campaign": {"type": "boolean", "index": 8, "name": "is_automated_campaign", "comment": null}, "is_campaign_budget_optimization": {"type": "boolean", "index": 9, "name": "is_campaign_budget_optimization", "comment": null}, "is_flexible_daily_budgets": {"type": "boolean", "index": 10, "name": "is_flexible_daily_budgets", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__campaign_history_tmp"}, "model.pinterest.stg_pinterest_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__campaign_report", "database": "postgres", "comment": "Each record represents the daily performance of Campaigns by advertiser.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp with time zone", "index": 2, "name": "date_day", "comment": "The performance date of the record."}, "campaign_id": {"type": "text", "index": 3, "name": "campaign_id", "comment": "The ID of the related Campaign."}, "campaign_name": {"type": "text", "index": 4, "name": "campaign_name", "comment": "Name of the campaign."}, "campaign_status": {"type": "text", "index": 5, "name": "campaign_status", "comment": "Status of the campaign."}, "advertiser_id": {"type": "text", "index": 6, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": "The number of paid and earned impressions that occurred on the day of the record."}, "clicks": {"type": "integer", "index": 8, "name": "clicks", "comment": "The number of paid and earned clicks that occurred on the day of the record."}, "spend": {"type": "numeric", "index": 9, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "total_conversions": {"type": "integer", "index": 10, "name": "total_conversions", "comment": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "total_conversions_quantity": {"type": "integer", "index": 11, "name": "total_conversions_quantity", "comment": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "total_conversions_value": {"type": "numeric", "index": 12, "name": "total_conversions_value", "comment": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__campaign_report"}, "model.pinterest.stg_pinterest_ads__campaign_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__campaign_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "campaign_id": {"type": "bigint", "index": 2, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "text", "index": 3, "name": "campaign_name", "comment": null}, "campaign_status": {"type": "text", "index": 4, "name": "campaign_status", "comment": null}, "advertiser_id": {"type": "bigint", "index": 5, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 7, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 8, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 9, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 10, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 11, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 12, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 13, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 14, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__campaign_report_tmp"}, "model.pinterest.stg_pinterest_ads__keyword_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__keyword_history", "database": "postgres", "comment": "Each record represents the daily performance of a Keyword.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "keyword_id": {"type": "text", "index": 2, "name": "keyword_id", "comment": "Unique identifier of the keyword."}, "keyword_value": {"type": "text", "index": 3, "name": "keyword_value", "comment": "The text value that makes upd the keyword."}, "_fivetran_id": {"type": "text", "index": 4, "name": "_fivetran_id", "comment": "The unique identifier of the record within the Fivetran synced table."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": "Timestamp of when a record was last synced."}, "ad_group_id": {"type": "text", "index": 6, "name": "ad_group_id", "comment": "The ID of the related Ad group."}, "advertiser_id": {"type": "text", "index": 7, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "archived": {"type": "boolean", "index": 8, "name": "archived", "comment": "Boolean indicating if the keyword is archived."}, "bid": {"type": "integer", "index": 9, "name": "bid", "comment": "Bid amount set for the keyword."}, "campaign_id": {"type": "text", "index": 10, "name": "campaign_id", "comment": "The ID of the related Campaign."}, "match_type": {"type": "text", "index": 11, "name": "match_type", "comment": "Type of match the keyword is tied to. Either Exact or Broad."}, "parent_type": {"type": "text", "index": 12, "name": "parent_type", "comment": "Identifier of what grain the parent type is. Ad group or campaign."}, "is_most_recent_record": {"type": "boolean", "index": 13, "name": "is_most_recent_record", "comment": "Boolean representing whether the record is the most recent version of the object."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__keyword_history"}, "model.pinterest.stg_pinterest_ads__keyword_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__keyword_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "advertiser_id": {"type": "bigint", "index": 4, "name": "advertiser_id", "comment": null}, "archived": {"type": "boolean", "index": 5, "name": "archived", "comment": null}, "bid": {"type": "integer", "index": 6, "name": "bid", "comment": null}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": null}, "id": {"type": "bigint", "index": 8, "name": "id", "comment": null}, "match_type": {"type": "text", "index": 9, "name": "match_type", "comment": null}, "parent_type": {"type": "text", "index": 10, "name": "parent_type", "comment": null}, "value": {"type": "text", "index": 11, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__keyword_history_tmp"}, "model.pinterest.stg_pinterest_ads__keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__keyword_report", "database": "postgres", "comment": "Each record represents the daily performance of Keywords by ad group, campaign, and advertiser.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp with time zone", "index": 2, "name": "date_day", "comment": "The performance date of the record."}, "keyword_id": {"type": "text", "index": 3, "name": "keyword_id", "comment": "Unique identifier of the keyword."}, "pin_promotion_id": {"type": "text", "index": 4, "name": "pin_promotion_id", "comment": "The ID of the related Pin promotion."}, "ad_group_id": {"type": "text", "index": 5, "name": "ad_group_id", "comment": "The ID of the related Ad group."}, "ad_group_name": {"type": "text", "index": 6, "name": "ad_group_name", "comment": "Name of the ad group."}, "ad_group_status": {"type": "text", "index": 7, "name": "ad_group_status", "comment": "Status of the ad group."}, "campaign_id": {"type": "text", "index": 8, "name": "campaign_id", "comment": "The ID of the related Campaign."}, "advertiser_id": {"type": "text", "index": 9, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "impressions": {"type": "integer", "index": 10, "name": "impressions", "comment": "The number of paid and earned impressions that occurred on the day of the record."}, "clicks": {"type": "integer", "index": 11, "name": "clicks", "comment": "The number of paid and earned clicks that occurred on the day of the record."}, "spend": {"type": "numeric", "index": 12, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "total_conversions": {"type": "integer", "index": 13, "name": "total_conversions", "comment": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "total_conversions_quantity": {"type": "integer", "index": 14, "name": "total_conversions_quantity", "comment": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "total_conversions_value": {"type": "numeric", "index": 15, "name": "total_conversions_value", "comment": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__keyword_report"}, "model.pinterest.stg_pinterest_ads__keyword_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__keyword_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "keyword_id": {"type": "bigint", "index": 2, "name": "keyword_id", "comment": null}, "pin_promotion_id": {"type": "bigint", "index": 3, "name": "pin_promotion_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "text", "index": 5, "name": "ad_group_name", "comment": null}, "ad_group_status": {"type": "text", "index": 6, "name": "ad_group_status", "comment": null}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": null}, "advertiser_id": {"type": "bigint", "index": 8, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 9, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 10, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 11, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 12, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 13, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 14, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 15, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 16, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 17, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__keyword_report_tmp"}, "model.pinterest.stg_pinterest_ads__pin_promotion_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__pin_promotion_history", "database": "postgres", "comment": "Each record represents a version of a Pinterest Pin promotion.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "pin_promotion_id": {"type": "text", "index": 2, "name": "pin_promotion_id", "comment": "Pin promotion ID."}, "advertiser_id": {"type": "text", "index": 3, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "ad_group_id": {"type": "text", "index": 4, "name": "ad_group_id", "comment": "Pin promotion ad group ID."}, "created_at": {"type": "text", "index": 5, "name": "created_at", "comment": "Pin creation time."}, "destination_url": {"type": "text", "index": 6, "name": "destination_url", "comment": "Pin destination URL."}, "base_url": {"type": "text", "index": 7, "name": "base_url", "comment": "The base URL of the ad, extracted from the `destination_url`."}, "url_host": {"type": "text", "index": 8, "name": "url_host", "comment": "The URL host of the ad, extracted from the `destination_url`."}, "url_path": {"type": "text", "index": 9, "name": "url_path", "comment": "The URL path of the ad, extracted from the `destination_url`."}, "utm_source": {"type": "text", "index": 10, "name": "utm_source", "comment": "The utm_source parameter of the ad, extracted from the `destination_url`."}, "utm_medium": {"type": "text", "index": 11, "name": "utm_medium", "comment": "The utm_medium parameter of the ad, extracted from the `destination_url`."}, "utm_campaign": {"type": "text", "index": 12, "name": "utm_campaign", "comment": "The utm_campaign parameter of the ad, extracted from the `destination_url`."}, "utm_content": {"type": "text", "index": 13, "name": "utm_content", "comment": "The utm_content parameter of the ad, extracted from the `destination_url`."}, "utm_term": {"type": "text", "index": 14, "name": "utm_term", "comment": "The utm_term parameter of the ad, extracted from the `destination_url`."}, "pin_name": {"type": "text", "index": 15, "name": "pin_name", "comment": "Pin promotion name."}, "pin_id": {"type": "text", "index": 16, "name": "pin_id", "comment": "Original pin ID."}, "pin_status": {"type": "text", "index": 17, "name": "pin_status", "comment": "The status of the Pin promotion. One of \"ACTIVE\", \"ARCHIVED\", \"PAUSED\""}, "creative_type": {"type": "text", "index": 18, "name": "creative_type", "comment": "The creative type. \nOne of \"APP\", \"APP_VIDEO\", \"BOARD\", \"CAROUSEL\", \"CINEMATIC\", \"COMMERCE\", \"MAX_VIDEO\", \"NATIVE_VIDEO\", \"REGULAR\", \n\"SEARCH_PROMINENCE\", \"SEARCH_PROMINENCE_CAROUSEL\", \"SHOPPING\", \"SHOP_THE_PIN\", \"THIRD_PARTY\", or \"VIDEO\".\n"}, "_fivetran_synced": {"type": "text", "index": 19, "name": "_fivetran_synced", "comment": "Timestamp of when a record was last synced."}, "is_most_recent_record": {"type": "boolean", "index": 20, "name": "is_most_recent_record", "comment": "Boolean representing whether the record is the most recent version of the object."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__pin_promotion_history"}, "model.pinterest.stg_pinterest_ads__pin_promotion_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__pin_promotion_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 2, "name": "ad_group_id", "comment": null}, "created_time": {"type": "text", "index": 3, "name": "created_time", "comment": null}, "destination_url": {"type": "text", "index": 4, "name": "destination_url", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "pin_id": {"type": "bigint", "index": 6, "name": "pin_id", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}, "creative_type": {"type": "text", "index": 8, "name": "creative_type", "comment": null}, "_fivetran_synced": {"type": "text", "index": 9, "name": "_fivetran_synced", "comment": null}, "ad_account_id": {"type": "bigint", "index": 10, "name": "ad_account_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__pin_promotion_history_tmp"}, "model.pinterest.stg_pinterest_ads__pin_promotion_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__pin_promotion_report", "database": "postgres", "comment": "Each record represents the daily performance of a Pinterest Pin promotion by ad group, campaign, and advertiser.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp with time zone", "index": 2, "name": "date_day", "comment": "The performance date of the record."}, "pin_promotion_id": {"type": "text", "index": 3, "name": "pin_promotion_id", "comment": "The ID of the related Pin promotion."}, "ad_group_id": {"type": "text", "index": 4, "name": "ad_group_id", "comment": "The ID of the related Ad group."}, "campaign_id": {"type": "text", "index": 5, "name": "campaign_id", "comment": "The ID of the related Campaign."}, "advertiser_id": {"type": "text", "index": 6, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": "The number of paid and earned impressions that occurred on the day of the record."}, "clicks": {"type": "integer", "index": 8, "name": "clicks", "comment": "The number of paid and earned clicks that occurred on the day of the record."}, "spend": {"type": "numeric", "index": 9, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "total_conversions": {"type": "integer", "index": 10, "name": "total_conversions", "comment": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "total_conversions_quantity": {"type": "integer", "index": 11, "name": "total_conversions_quantity", "comment": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "total_conversions_value": {"type": "numeric", "index": 12, "name": "total_conversions_value", "comment": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__pin_promotion_report"}, "model.pinterest.stg_pinterest_ads__pin_promotion_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__pin_promotion_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "pin_promotion_id": {"type": "bigint", "index": 2, "name": "pin_promotion_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": null}, "advertiser_id": {"type": "bigint", "index": 5, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 7, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 8, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 9, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 10, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 11, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 12, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 13, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 14, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__pin_promotion_report_tmp"}, "model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__pin_promotion_targeting_report", "database": "postgres", "comment": "Contains performance metrics for promoted Pins segmented by applied targeting criteria, including targeting type, value, and related campaign metadata.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when a record was last synced."}, "date_day": {"type": "timestamp without time zone", "index": 3, "name": "date_day", "comment": "The performance date of the record."}, "targeting_type": {"type": "text", "index": 4, "name": "targeting_type", "comment": "Reporting targeting type for ads. Possible values 'KEYWORD', 'APPTYPE', 'GENDER', 'LOCATION', 'PLACEMENT', 'COUNTRY', 'TARGETED_INTEREST', 'PINNER_INTEREST', 'AUDIENCE_INCLUDE', 'GEO', 'AGE_BUCKET', 'REGION', 'QUIZ_RESULT', 'AGE_BUCKET_AND_GENDER'"}, "targeting_value": {"type": "text", "index": 5, "name": "targeting_value", "comment": "The specific value applied within the targeting type (e.g., 'Fashion' for interest, 'New York' for location)."}, "ad_group_id": {"type": "text", "index": 6, "name": "ad_group_id", "comment": "The ID of the related Ad group."}, "advertiser_id": {"type": "text", "index": 7, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "campaign_id": {"type": "text", "index": 8, "name": "campaign_id", "comment": "The ID of the related Campaign."}, "pin_promotion_id": {"type": "text", "index": 9, "name": "pin_promotion_id", "comment": "The ID of the related Pin promotion."}, "impressions": {"type": "double precision", "index": 10, "name": "impressions", "comment": "The number of paid and earned impressions that occurred on the day of the record."}, "clicks": {"type": "double precision", "index": 11, "name": "clicks", "comment": "The number of paid and earned clicks that occurred on the day of the record."}, "spend": {"type": "numeric", "index": 12, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "total_conversions": {"type": "integer", "index": 13, "name": "total_conversions", "comment": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "total_conversions_quantity": {"type": "integer", "index": 14, "name": "total_conversions_quantity", "comment": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "total_conversions_value": {"type": "numeric", "index": 15, "name": "total_conversions_value", "comment": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report"}, "model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__pin_promotion_targeting_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "targeting_type": {"type": "text", "index": 3, "name": "targeting_type", "comment": null}, "targeting_value": {"type": "text", "index": 4, "name": "targeting_value", "comment": null}, "ad_group_id": {"type": "text", "index": 5, "name": "ad_group_id", "comment": null}, "advertiser_id": {"type": "text", "index": 6, "name": "advertiser_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": null}, "pin_promotion_id": {"type": "text", "index": 8, "name": "pin_promotion_id", "comment": null}, "clickthrough_1": {"type": "double precision", "index": 9, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "double precision", "index": 10, "name": "clickthrough_2", "comment": null}, "impression_1": {"type": "double precision", "index": 11, "name": "impression_1", "comment": null}, "impression_2": {"type": "double precision", "index": 12, "name": "impression_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 13, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 14, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 15, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 16, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report_tmp"}, "model.pinterest.stg_pinterest_ads__targeting_geo": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__targeting_geo", "database": "postgres", "comment": "Maps country targeting values used in campaigns, including standardized names and associated location codes.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when a record was last synced."}, "country_id": {"type": "text", "index": 3, "name": "country_id", "comment": "The ID of the targeted country."}, "country_name": {"type": "text", "index": 4, "name": "country_name", "comment": "The name of the targeted country."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__targeting_geo"}, "model.pinterest.stg_pinterest_ads__targeting_geo_region": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__targeting_geo_region", "database": "postgres", "comment": "Maps region targeting values used in campaigns, including standardized names and associated location codes.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when a record was last synced."}, "country_id": {"type": "text", "index": 3, "name": "country_id", "comment": "The ID of the targeted country."}, "region_id": {"type": "text", "index": 4, "name": "region_id", "comment": "The ID of the targeted region."}, "region_name": {"type": "text", "index": 5, "name": "region_name", "comment": "The name of the targeted region."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__targeting_geo_region"}, "model.pinterest.stg_pinterest_ads__targeting_geo_region_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__targeting_geo_region_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "country_id": {"type": "text", "index": 2, "name": "country_id", "comment": null}, "region_id": {"type": "text", "index": 3, "name": "region_id", "comment": null}, "region_name": {"type": "text", "index": 4, "name": "region_name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__targeting_geo_region_tmp"}, "model.pinterest.stg_pinterest_ads__targeting_geo_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__targeting_geo_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"country_id": {"type": "text", "index": 1, "name": "country_id", "comment": null}, "country_name": {"type": "text", "index": 2, "name": "country_name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__targeting_geo_tmp"}, "model.reddit_ads.stg_reddit_ads__account": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__account", "database": "postgres", "comment": "Each record in this table represents information about an account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "attribution_type": {"type": "text", "index": 2, "name": "attribution_type", "comment": "Attribution type: \"CLICK_THROUGH_CONVERSION\", \"VIEW_THROUGH_CONVERSION\", or \"ALL_CONVERSION\".\nCLICK_THROUGH_CONVERSION: A user clicked on your ad and then completed the conversion action on your site. \nVIEW_THROUGH_CONVERSION: A user saw your ad and did not click it, but did complete the conversion action on your site.\nALL_CONVERSION: Combination of both."}, "click_attribution_window": {"type": "text", "index": 3, "name": "click_attribution_window", "comment": "Determines how long after clicking on your ad you count that user\u2019s actions as a conversion. \"DAY\", \"WEEK\", or \"MONTH\""}, "created_at": {"type": "timestamp without time zone", "index": 4, "name": "created_at", "comment": "Time that the respective record (ad, ad group, campaign, post, etc) was created. ISO-8601 timestamp."}, "currency": {"type": "text", "index": 5, "name": "currency", "comment": "The currency this account uses (ISO-4217)"}, "account_id": {"type": "character varying(255)", "index": 6, "name": "account_id", "comment": "The ID of the account."}, "time_zone_id": {"type": "text", "index": 7, "name": "time_zone_id", "comment": "The time zone id preference for this account"}, "view_attribution_window": {"type": "text", "index": 8, "name": "view_attribution_window", "comment": "Determines how long after viewing on your ad you count that user\u2019s actions as a conversion. \"DAY\", \"WEEK\", or \"MONTH\""}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__account"}, "model.reddit_ads.stg_reddit_ads__account_conversions_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__account_conversions_report", "database": "postgres", "comment": "Provides a summary of conversion events at the account level, aggregating key metrics by event and day such as view-through and click-through conversions.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "date_day": {"type": "date", "index": 4, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "event_name": {"type": "text", "index": 5, "name": "event_name", "comment": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset."}, "total_items": {"type": "integer", "index": 6, "name": "total_items", "comment": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion."}, "total_value": {"type": "double precision", "index": 7, "name": "total_value", "comment": "The total monetary value associated with a conversion event."}, "conversions": {"type": "integer", "index": 8, "name": "conversions", "comment": "The total click-through conversions attributed, for the given month-long window."}, "view_through_conversions": {"type": "integer", "index": 9, "name": "view_through_conversions", "comment": "The total view-through conversions attributed, for the given month-long window."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__account_conversions_report"}, "model.reddit_ads.stg_reddit_ads__account_conversions_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__account_conversions_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "avg_value": {"type": "double precision", "index": 3, "name": "avg_value", "comment": null}, "click_through_conversion_attribution_window_day": {"type": "integer", "index": 4, "name": "click_through_conversion_attribution_window_day", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 5, "name": "click_through_conversion_attribution_window_month", "comment": null}, "click_through_conversion_attribution_window_week": {"type": "integer", "index": 6, "name": "click_through_conversion_attribution_window_week", "comment": null}, "date": {"type": "date", "index": 7, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 8, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 9, "name": "total_items", "comment": null}, "total_value": {"type": "double precision", "index": 10, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_day": {"type": "integer", "index": 11, "name": "view_through_conversion_attribution_window_day", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 12, "name": "view_through_conversion_attribution_window_month", "comment": null}, "view_through_conversion_attribution_window_week": {"type": "integer", "index": 13, "name": "view_through_conversion_attribution_window_week", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__account_conversions_report_tmp"}, "model.reddit_ads.stg_reddit_ads__account_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__account_report", "database": "postgres", "comment": "Each record represents a summary of events for each given date and account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": "The ID of the account."}, "clicks": {"type": "integer", "index": 3, "name": "clicks", "comment": "The number of clicks detected for this report period"}, "date_day": {"type": "date", "index": 4, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "impressions": {"type": "integer", "index": 5, "name": "impressions", "comment": "The number of impressions served for this report period"}, "region": {"type": "integer", "index": 6, "name": "region", "comment": "The region (US state or UK country) targeted for the reports"}, "spend": {"type": "numeric", "index": 7, "name": "spend", "comment": "Spend converted out of microcurrency (so Spend/1,000,000)"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__account_report"}, "model.reddit_ads.stg_reddit_ads__account_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__account_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "app_install_metrics_add_payment_info": {"type": "integer", "index": 4, "name": "app_install_metrics_add_payment_info", "comment": null}, "app_install_metrics_add_to_cart": {"type": "integer", "index": 5, "name": "app_install_metrics_add_to_cart", "comment": null}, "app_install_metrics_app_launch": {"type": "integer", "index": 6, "name": "app_install_metrics_app_launch", "comment": null}, "app_install_metrics_completed_tutorial": {"type": "integer", "index": 7, "name": "app_install_metrics_completed_tutorial", "comment": null}, "app_install_metrics_install": {"type": "integer", "index": 8, "name": "app_install_metrics_install", "comment": null}, "app_install_metrics_level_achieved": {"type": "integer", "index": 9, "name": "app_install_metrics_level_achieved", "comment": null}, "app_install_metrics_purchase": {"type": "integer", "index": 10, "name": "app_install_metrics_purchase", "comment": null}, "app_install_metrics_search": {"type": "integer", "index": 11, "name": "app_install_metrics_search", "comment": null}, "app_install_metrics_sign_up": {"type": "integer", "index": 12, "name": "app_install_metrics_sign_up", "comment": null}, "app_install_metrics_spend": {"type": "integer", "index": 13, "name": "app_install_metrics_spend", "comment": null}, "app_install_metrics_spend_credits": {"type": "integer", "index": 14, "name": "app_install_metrics_spend_credits", "comment": null}, "app_install_metrics_view_content": {"type": "integer", "index": 15, "name": "app_install_metrics_view_content", "comment": null}, "clicks": {"type": "integer", "index": 16, "name": "clicks", "comment": null}, "comment_downvotes": {"type": "integer", "index": 17, "name": "comment_downvotes", "comment": null}, "comment_upvotes": {"type": "integer", "index": 18, "name": "comment_upvotes", "comment": null}, "comments_page_views": {"type": "integer", "index": 19, "name": "comments_page_views", "comment": null}, "conversion_roas": {"type": "integer", "index": 20, "name": "conversion_roas", "comment": null}, "cpc": {"type": "double precision", "index": 21, "name": "cpc", "comment": null}, "ctr": {"type": "double precision", "index": 22, "name": "ctr", "comment": null}, "ecpm": {"type": "double precision", "index": 23, "name": "ecpm", "comment": null}, "gallery_item_caption": {"type": "integer", "index": 24, "name": "gallery_item_caption", "comment": null}, "gallery_item_id": {"type": "integer", "index": 25, "name": "gallery_item_id", "comment": null}, "impressions": {"type": "integer", "index": 26, "name": "impressions", "comment": null}, "legacy_click_conversions_attribution_window_day": {"type": "integer", "index": 27, "name": "legacy_click_conversions_attribution_window_day", "comment": null}, "legacy_click_conversions_attribution_window_month": {"type": "integer", "index": 28, "name": "legacy_click_conversions_attribution_window_month", "comment": null}, "legacy_click_conversions_attribution_window_week": {"type": "integer", "index": 29, "name": "legacy_click_conversions_attribution_window_week", "comment": null}, "legacy_view_conversions_attribution_window_day": {"type": "integer", "index": 30, "name": "legacy_view_conversions_attribution_window_day", "comment": null}, "legacy_view_conversions_attribution_window_month": {"type": "integer", "index": 31, "name": "legacy_view_conversions_attribution_window_month", "comment": null}, "legacy_view_conversions_attribution_window_week": {"type": "integer", "index": 32, "name": "legacy_view_conversions_attribution_window_week", "comment": null}, "priority": {"type": "integer", "index": 33, "name": "priority", "comment": null}, "region": {"type": "integer", "index": 34, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 35, "name": "spend", "comment": null}, "video_fully_viewable_impressions": {"type": "integer", "index": 36, "name": "video_fully_viewable_impressions", "comment": null}, "video_plays_expanded": {"type": "integer", "index": 37, "name": "video_plays_expanded", "comment": null}, "video_plays_with_sound": {"type": "integer", "index": 38, "name": "video_plays_with_sound", "comment": null}, "video_started": {"type": "integer", "index": 39, "name": "video_started", "comment": null}, "video_viewable_impressions": {"type": "integer", "index": 40, "name": "video_viewable_impressions", "comment": null}, "video_watched_100_percent": {"type": "integer", "index": 41, "name": "video_watched_100_percent", "comment": null}, "video_watched_10_seconds": {"type": "integer", "index": 42, "name": "video_watched_10_seconds", "comment": null}, "video_watched_25_percent": {"type": "integer", "index": 43, "name": "video_watched_25_percent", "comment": null}, "video_watched_3_seconds": {"type": "integer", "index": 44, "name": "video_watched_3_seconds", "comment": null}, "video_watched_50_percent": {"type": "integer", "index": 45, "name": "video_watched_50_percent", "comment": null}, "video_watched_5_seconds": {"type": "integer", "index": 46, "name": "video_watched_5_seconds", "comment": null}, "video_watched_75_percent": {"type": "integer", "index": 47, "name": "video_watched_75_percent", "comment": null}, "video_watched_95_percent": {"type": "integer", "index": 48, "name": "video_watched_95_percent", "comment": null}, "viewable_impressions": {"type": "integer", "index": 49, "name": "viewable_impressions", "comment": null}, "viewer_comments": {"type": "integer", "index": 50, "name": "viewer_comments", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__account_report_tmp"}, "model.reddit_ads.stg_reddit_ads__account_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__account_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying(255)", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "attribution_type": {"type": "text", "index": 3, "name": "attribution_type", "comment": null}, "click_attribution_window": {"type": "text", "index": 4, "name": "click_attribution_window", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 5, "name": "created_at", "comment": null}, "currency": {"type": "text", "index": 6, "name": "currency", "comment": null}, "status": {"type": "integer", "index": 7, "name": "status", "comment": null}, "time_zone_id": {"type": "text", "index": 8, "name": "time_zone_id", "comment": null}, "view_attribution_window": {"type": "text", "index": 9, "name": "view_attribution_window", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__account_tmp"}, "model.reddit_ads.stg_reddit_ads__ad": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad", "database": "postgres", "comment": "Each record represents information about each ad.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": "The ID of the account."}, "ad_group_id": {"type": "character varying(255)", "index": 3, "name": "ad_group_id", "comment": "The ID of the ad group."}, "campaign_id": {"type": "character varying(255)", "index": 4, "name": "campaign_id", "comment": "The ID of the campaign."}, "click_url": {"type": "text", "index": 5, "name": "click_url", "comment": "The destination url, or the website address, that a visitor goes to when they click on the ad"}, "configured_status": {"type": "text", "index": 6, "name": "configured_status", "comment": "The status configured by the account owner. \"ACTIVE\", \"PAUSED\", \"ARCHIVED\", \"DELETED\""}, "effective_status": {"type": "text", "index": 7, "name": "effective_status", "comment": "The calculated status determining the real status of this entity."}, "ad_id": {"type": "character varying(255)", "index": 8, "name": "ad_id", "comment": "The ID of the ad."}, "is_processing": {"type": "boolean", "index": 9, "name": "is_processing", "comment": "Whether or not effective status is processing"}, "ad_name": {"type": "text", "index": 10, "name": "ad_name", "comment": "Name of ad."}, "post_id": {"type": "text", "index": 11, "name": "post_id", "comment": "The ID of the post."}, "post_url": {"type": "integer", "index": 12, "name": "post_url", "comment": "The URL belonging to the post."}, "rejection_reason": {"type": "integer", "index": 13, "name": "rejection_reason", "comment": "Reason why entity was rejected."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__ad"}, "model.reddit_ads.stg_reddit_ads__ad_conversions_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_conversions_report", "database": "postgres", "comment": "Provides a summary of conversion events at the individual ad level, aggregating key metrics by event and day such as view-through and click-through conversions.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "ad_id": {"type": "character varying(255)", "index": 4, "name": "ad_id", "comment": "The ID of the ad."}, "date_day": {"type": "date", "index": 5, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "event_name": {"type": "text", "index": 6, "name": "event_name", "comment": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset."}, "total_items": {"type": "integer", "index": 7, "name": "total_items", "comment": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion."}, "total_value": {"type": "double precision", "index": 8, "name": "total_value", "comment": "The total monetary value associated with a conversion event."}, "conversions": {"type": "integer", "index": 9, "name": "conversions", "comment": "The total click-through conversions attributed, for the given month-long window."}, "view_through_conversions": {"type": "integer", "index": 10, "name": "view_through_conversions", "comment": "The total view-through conversions attributed, for the given month-long window."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__ad_conversions_report"}, "model.reddit_ads.stg_reddit_ads__ad_conversions_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_conversions_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "ad_id": {"type": "character varying(255)", "index": 3, "name": "ad_id", "comment": null}, "avg_value": {"type": "double precision", "index": 4, "name": "avg_value", "comment": null}, "click_through_conversion_attribution_window_day": {"type": "integer", "index": 5, "name": "click_through_conversion_attribution_window_day", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 6, "name": "click_through_conversion_attribution_window_month", "comment": null}, "click_through_conversion_attribution_window_week": {"type": "integer", "index": 7, "name": "click_through_conversion_attribution_window_week", "comment": null}, "date": {"type": "date", "index": 8, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 9, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 10, "name": "total_items", "comment": null}, "total_value": {"type": "double precision", "index": 11, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_day": {"type": "integer", "index": 12, "name": "view_through_conversion_attribution_window_day", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 13, "name": "view_through_conversion_attribution_window_month", "comment": null}, "view_through_conversion_attribution_window_week": {"type": "integer", "index": 14, "name": "view_through_conversion_attribution_window_week", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__ad_conversions_report_tmp"}, "model.reddit_ads.stg_reddit_ads__ad_group": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_group", "database": "postgres", "comment": "Each record represents information about each ad group.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": "The ID of the account."}, "bid_strategy": {"type": "text", "index": 3, "name": "bid_strategy", "comment": "The bid strategy for this entity. \"MAXIMIZE_VOLUME\", \"MANUAL_BIDDING\", or \"BIDLESS\""}, "bid_value": {"type": "integer", "index": 4, "name": "bid_value", "comment": "The amount to pay in microcurrency per bidding event."}, "campaign_id": {"type": "character varying(255)", "index": 5, "name": "campaign_id", "comment": "The ID of the campaign."}, "configured_status": {"type": "text", "index": 6, "name": "configured_status", "comment": "The status configured by the account owner. \"ACTIVE\", \"PAUSED\", \"ARCHIVED\", \"DELETED\""}, "effective_status": {"type": "text", "index": 7, "name": "effective_status", "comment": "The calculated status determining the real status of this entity."}, "end_time_at": {"type": "timestamp without time zone", "index": 8, "name": "end_time_at", "comment": "When the entity will stop delivering."}, "expand_targeting": {"type": "boolean", "index": 9, "name": "expand_targeting", "comment": "Boolean that when selected, allows Reddit to expand your targeting to maximize your results."}, "goal_type": {"type": "text", "index": 10, "name": "goal_type", "comment": "The type of goal for the entity. \"IMPRESSIONS\", \"PERCENTAGE\", \"CLICKS\", \"CONVERSIONS\", \"LIFETIME_SPEND\", \"DAILY_SPEND\", or \"VIDEO_VIEWABLE_IMPRESSIONS\""}, "goal_value": {"type": "integer", "index": 11, "name": "goal_value", "comment": "The value used to determine the goal has been met. This is measured in microcurrency for monetary goals types."}, "ad_group_id": {"type": "character varying(255)", "index": 12, "name": "ad_group_id", "comment": "The ID of the ad group."}, "is_processing": {"type": "boolean", "index": 13, "name": "is_processing", "comment": "Whether or not effective status is processing"}, "ad_group_name": {"type": "text", "index": 14, "name": "ad_group_name", "comment": "Name of ad group."}, "optimization_strategy_type": {"type": "integer", "index": 15, "name": "optimization_strategy_type", "comment": "The strategy to use when optimizing the delivery of an ad. \"DOWNSTREAM_CONVERSIONS\" or \"APP_INSTALLS\""}, "start_time_at": {"type": "timestamp without time zone", "index": 16, "name": "start_time_at", "comment": "When the entity will begin to deliver."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__ad_group"}, "model.reddit_ads.stg_reddit_ads__ad_group_conversions_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_group_conversions_report", "database": "postgres", "comment": "Provides a summary of conversion events at the ad group level, aggregating key metrics by event and day such as view-through and click-through conversions.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "ad_group_id": {"type": "character varying(255)", "index": 4, "name": "ad_group_id", "comment": "The ID of the ad group."}, "date_day": {"type": "date", "index": 5, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "event_name": {"type": "text", "index": 6, "name": "event_name", "comment": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset."}, "total_items": {"type": "integer", "index": 7, "name": "total_items", "comment": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion."}, "total_value": {"type": "double precision", "index": 8, "name": "total_value", "comment": "The total monetary value associated with a conversion event."}, "conversions": {"type": "integer", "index": 9, "name": "conversions", "comment": "The total click-through conversions attributed, for the given month-long window."}, "view_through_conversions": {"type": "integer", "index": 10, "name": "view_through_conversions", "comment": "The total view-through conversions attributed, for the given month-long window."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__ad_group_conversions_report"}, "model.reddit_ads.stg_reddit_ads__ad_group_conversions_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_group_conversions_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "ad_group_id": {"type": "character varying(255)", "index": 3, "name": "ad_group_id", "comment": null}, "avg_value": {"type": "double precision", "index": 4, "name": "avg_value", "comment": null}, "click_through_conversion_attribution_window_day": {"type": "integer", "index": 5, "name": "click_through_conversion_attribution_window_day", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 6, "name": "click_through_conversion_attribution_window_month", "comment": null}, "click_through_conversion_attribution_window_week": {"type": "integer", "index": 7, "name": "click_through_conversion_attribution_window_week", "comment": null}, "date": {"type": "date", "index": 8, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 9, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 10, "name": "total_items", "comment": null}, "total_value": {"type": "double precision", "index": 11, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_day": {"type": "integer", "index": 12, "name": "view_through_conversion_attribution_window_day", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 13, "name": "view_through_conversion_attribution_window_month", "comment": null}, "view_through_conversion_attribution_window_week": {"type": "integer", "index": 14, "name": "view_through_conversion_attribution_window_week", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__ad_group_conversions_report_tmp"}, "model.reddit_ads.stg_reddit_ads__ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_group_report", "database": "postgres", "comment": "Each record represents a summary of events for each given date and ad group.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": "The ID of the account."}, "ad_group_id": {"type": "character varying(255)", "index": 3, "name": "ad_group_id", "comment": "The ID of the ad group."}, "clicks": {"type": "integer", "index": 4, "name": "clicks", "comment": "The number of clicks detected for this report period"}, "date_day": {"type": "date", "index": 5, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": "The number of impressions served for this report period"}, "region": {"type": "integer", "index": 7, "name": "region", "comment": "The region (US state or UK country) targeted for the reports"}, "spend": {"type": "numeric", "index": 8, "name": "spend", "comment": "Spend converted out of microcurrency (so Spend/1,000,000)"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__ad_group_report"}, "model.reddit_ads.stg_reddit_ads__ad_group_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_group_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "ad_group_id": {"type": "character varying(255)", "index": 2, "name": "ad_group_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "app_install_metrics_add_payment_info": {"type": "integer", "index": 5, "name": "app_install_metrics_add_payment_info", "comment": null}, "app_install_metrics_add_to_cart": {"type": "integer", "index": 6, "name": "app_install_metrics_add_to_cart", "comment": null}, "app_install_metrics_app_launch": {"type": "integer", "index": 7, "name": "app_install_metrics_app_launch", "comment": null}, "app_install_metrics_completed_tutorial": {"type": "integer", "index": 8, "name": "app_install_metrics_completed_tutorial", "comment": null}, "app_install_metrics_install": {"type": "integer", "index": 9, "name": "app_install_metrics_install", "comment": null}, "app_install_metrics_level_achieved": {"type": "integer", "index": 10, "name": "app_install_metrics_level_achieved", "comment": null}, "app_install_metrics_purchase": {"type": "integer", "index": 11, "name": "app_install_metrics_purchase", "comment": null}, "app_install_metrics_search": {"type": "integer", "index": 12, "name": "app_install_metrics_search", "comment": null}, "app_install_metrics_sign_up": {"type": "integer", "index": 13, "name": "app_install_metrics_sign_up", "comment": null}, "app_install_metrics_spend": {"type": "integer", "index": 14, "name": "app_install_metrics_spend", "comment": null}, "app_install_metrics_spend_credits": {"type": "integer", "index": 15, "name": "app_install_metrics_spend_credits", "comment": null}, "app_install_metrics_view_content": {"type": "integer", "index": 16, "name": "app_install_metrics_view_content", "comment": null}, "clicks": {"type": "integer", "index": 17, "name": "clicks", "comment": null}, "comment_downvotes": {"type": "integer", "index": 18, "name": "comment_downvotes", "comment": null}, "comment_upvotes": {"type": "integer", "index": 19, "name": "comment_upvotes", "comment": null}, "comments_page_views": {"type": "integer", "index": 20, "name": "comments_page_views", "comment": null}, "conversion_roas": {"type": "integer", "index": 21, "name": "conversion_roas", "comment": null}, "cpc": {"type": "double precision", "index": 22, "name": "cpc", "comment": null}, "ctr": {"type": "double precision", "index": 23, "name": "ctr", "comment": null}, "ecpm": {"type": "double precision", "index": 24, "name": "ecpm", "comment": null}, "gallery_item_caption": {"type": "integer", "index": 25, "name": "gallery_item_caption", "comment": null}, "gallery_item_id": {"type": "integer", "index": 26, "name": "gallery_item_id", "comment": null}, "impressions": {"type": "integer", "index": 27, "name": "impressions", "comment": null}, "legacy_click_conversions_attribution_window_day": {"type": "integer", "index": 28, "name": "legacy_click_conversions_attribution_window_day", "comment": null}, "legacy_click_conversions_attribution_window_month": {"type": "integer", "index": 29, "name": "legacy_click_conversions_attribution_window_month", "comment": null}, "legacy_click_conversions_attribution_window_week": {"type": "integer", "index": 30, "name": "legacy_click_conversions_attribution_window_week", "comment": null}, "legacy_view_conversions_attribution_window_day": {"type": "integer", "index": 31, "name": "legacy_view_conversions_attribution_window_day", "comment": null}, "legacy_view_conversions_attribution_window_month": {"type": "integer", "index": 32, "name": "legacy_view_conversions_attribution_window_month", "comment": null}, "legacy_view_conversions_attribution_window_week": {"type": "integer", "index": 33, "name": "legacy_view_conversions_attribution_window_week", "comment": null}, "priority": {"type": "integer", "index": 34, "name": "priority", "comment": null}, "region": {"type": "integer", "index": 35, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 36, "name": "spend", "comment": null}, "video_fully_viewable_impressions": {"type": "integer", "index": 37, "name": "video_fully_viewable_impressions", "comment": null}, "video_plays_expanded": {"type": "integer", "index": 38, "name": "video_plays_expanded", "comment": null}, "video_plays_with_sound": {"type": "integer", "index": 39, "name": "video_plays_with_sound", "comment": null}, "video_started": {"type": "integer", "index": 40, "name": "video_started", "comment": null}, "video_viewable_impressions": {"type": "integer", "index": 41, "name": "video_viewable_impressions", "comment": null}, "video_watched_100_percent": {"type": "integer", "index": 42, "name": "video_watched_100_percent", "comment": null}, "video_watched_10_seconds": {"type": "integer", "index": 43, "name": "video_watched_10_seconds", "comment": null}, "video_watched_25_percent": {"type": "integer", "index": 44, "name": "video_watched_25_percent", "comment": null}, "video_watched_3_seconds": {"type": "integer", "index": 45, "name": "video_watched_3_seconds", "comment": null}, "video_watched_50_percent": {"type": "integer", "index": 46, "name": "video_watched_50_percent", "comment": null}, "video_watched_5_seconds": {"type": "integer", "index": 47, "name": "video_watched_5_seconds", "comment": null}, "video_watched_75_percent": {"type": "integer", "index": 48, "name": "video_watched_75_percent", "comment": null}, "video_watched_95_percent": {"type": "integer", "index": 49, "name": "video_watched_95_percent", "comment": null}, "viewable_impressions": {"type": "integer", "index": 50, "name": "viewable_impressions", "comment": null}, "viewer_comments": {"type": "integer", "index": 51, "name": "viewer_comments", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__ad_group_report_tmp"}, "model.reddit_ads.stg_reddit_ads__ad_group_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_group_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "id": {"type": "character varying(255)", "index": 2, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "bid_strategy": {"type": "text", "index": 4, "name": "bid_strategy", "comment": null}, "bid_value": {"type": "integer", "index": 5, "name": "bid_value", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 6, "name": "campaign_id", "comment": null}, "configured_status": {"type": "text", "index": 7, "name": "configured_status", "comment": null}, "effective_status": {"type": "text", "index": 8, "name": "effective_status", "comment": null}, "end_time": {"type": "timestamp without time zone", "index": 9, "name": "end_time", "comment": null}, "expand_targeting": {"type": "boolean", "index": 10, "name": "expand_targeting", "comment": null}, "goal_type": {"type": "text", "index": 11, "name": "goal_type", "comment": null}, "goal_value": {"type": "integer", "index": 12, "name": "goal_value", "comment": null}, "is_processing": {"type": "boolean", "index": 13, "name": "is_processing", "comment": null}, "name": {"type": "text", "index": 14, "name": "name", "comment": null}, "optimization_strategy_type": {"type": "integer", "index": 15, "name": "optimization_strategy_type", "comment": null}, "start_time": {"type": "timestamp without time zone", "index": 16, "name": "start_time", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__ad_group_tmp"}, "model.reddit_ads.stg_reddit_ads__ad_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_report", "database": "postgres", "comment": "Each record represents a summary of events for each given date and ad.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": "The ID of the account."}, "ad_id": {"type": "character varying(255)", "index": 3, "name": "ad_id", "comment": "The ID of the ad."}, "clicks": {"type": "integer", "index": 4, "name": "clicks", "comment": "The number of clicks detected for this report period"}, "date_day": {"type": "date", "index": 5, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": "The number of impressions served for this report period"}, "region": {"type": "integer", "index": 7, "name": "region", "comment": "The region (US state or UK country) targeted for the reports"}, "spend": {"type": "numeric", "index": 8, "name": "spend", "comment": "Spend converted out of microcurrency (so Spend/1,000,000)"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__ad_report"}, "model.reddit_ads.stg_reddit_ads__ad_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "ad_id": {"type": "character varying(255)", "index": 2, "name": "ad_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "app_install_metrics_add_payment_info": {"type": "integer", "index": 5, "name": "app_install_metrics_add_payment_info", "comment": null}, "app_install_metrics_add_to_cart": {"type": "integer", "index": 6, "name": "app_install_metrics_add_to_cart", "comment": null}, "app_install_metrics_app_launch": {"type": "integer", "index": 7, "name": "app_install_metrics_app_launch", "comment": null}, "app_install_metrics_completed_tutorial": {"type": "integer", "index": 8, "name": "app_install_metrics_completed_tutorial", "comment": null}, "app_install_metrics_install": {"type": "integer", "index": 9, "name": "app_install_metrics_install", "comment": null}, "app_install_metrics_level_achieved": {"type": "integer", "index": 10, "name": "app_install_metrics_level_achieved", "comment": null}, "app_install_metrics_purchase": {"type": "integer", "index": 11, "name": "app_install_metrics_purchase", "comment": null}, "app_install_metrics_search": {"type": "integer", "index": 12, "name": "app_install_metrics_search", "comment": null}, "app_install_metrics_sign_up": {"type": "integer", "index": 13, "name": "app_install_metrics_sign_up", "comment": null}, "app_install_metrics_spend": {"type": "integer", "index": 14, "name": "app_install_metrics_spend", "comment": null}, "app_install_metrics_spend_credits": {"type": "integer", "index": 15, "name": "app_install_metrics_spend_credits", "comment": null}, "app_install_metrics_view_content": {"type": "integer", "index": 16, "name": "app_install_metrics_view_content", "comment": null}, "clicks": {"type": "integer", "index": 17, "name": "clicks", "comment": null}, "comment_downvotes": {"type": "integer", "index": 18, "name": "comment_downvotes", "comment": null}, "comment_upvotes": {"type": "integer", "index": 19, "name": "comment_upvotes", "comment": null}, "comments_page_views": {"type": "integer", "index": 20, "name": "comments_page_views", "comment": null}, "conversion_roas": {"type": "integer", "index": 21, "name": "conversion_roas", "comment": null}, "cpc": {"type": "double precision", "index": 22, "name": "cpc", "comment": null}, "ctr": {"type": "double precision", "index": 23, "name": "ctr", "comment": null}, "ecpm": {"type": "double precision", "index": 24, "name": "ecpm", "comment": null}, "gallery_item_caption": {"type": "integer", "index": 25, "name": "gallery_item_caption", "comment": null}, "gallery_item_id": {"type": "integer", "index": 26, "name": "gallery_item_id", "comment": null}, "impressions": {"type": "integer", "index": 27, "name": "impressions", "comment": null}, "legacy_click_conversions_attribution_window_day": {"type": "integer", "index": 28, "name": "legacy_click_conversions_attribution_window_day", "comment": null}, "legacy_click_conversions_attribution_window_month": {"type": "integer", "index": 29, "name": "legacy_click_conversions_attribution_window_month", "comment": null}, "legacy_click_conversions_attribution_window_week": {"type": "integer", "index": 30, "name": "legacy_click_conversions_attribution_window_week", "comment": null}, "legacy_view_conversions_attribution_window_day": {"type": "integer", "index": 31, "name": "legacy_view_conversions_attribution_window_day", "comment": null}, "legacy_view_conversions_attribution_window_month": {"type": "integer", "index": 32, "name": "legacy_view_conversions_attribution_window_month", "comment": null}, "legacy_view_conversions_attribution_window_week": {"type": "integer", "index": 33, "name": "legacy_view_conversions_attribution_window_week", "comment": null}, "priority": {"type": "integer", "index": 34, "name": "priority", "comment": null}, "region": {"type": "integer", "index": 35, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 36, "name": "spend", "comment": null}, "video_fully_viewable_impressions": {"type": "integer", "index": 37, "name": "video_fully_viewable_impressions", "comment": null}, "video_plays_expanded": {"type": "integer", "index": 38, "name": "video_plays_expanded", "comment": null}, "video_plays_with_sound": {"type": "integer", "index": 39, "name": "video_plays_with_sound", "comment": null}, "video_started": {"type": "integer", "index": 40, "name": "video_started", "comment": null}, "video_viewable_impressions": {"type": "integer", "index": 41, "name": "video_viewable_impressions", "comment": null}, "video_watched_100_percent": {"type": "integer", "index": 42, "name": "video_watched_100_percent", "comment": null}, "video_watched_10_seconds": {"type": "integer", "index": 43, "name": "video_watched_10_seconds", "comment": null}, "video_watched_25_percent": {"type": "integer", "index": 44, "name": "video_watched_25_percent", "comment": null}, "video_watched_3_seconds": {"type": "integer", "index": 45, "name": "video_watched_3_seconds", "comment": null}, "video_watched_50_percent": {"type": "integer", "index": 46, "name": "video_watched_50_percent", "comment": null}, "video_watched_5_seconds": {"type": "integer", "index": 47, "name": "video_watched_5_seconds", "comment": null}, "video_watched_75_percent": {"type": "integer", "index": 48, "name": "video_watched_75_percent", "comment": null}, "video_watched_95_percent": {"type": "integer", "index": 49, "name": "video_watched_95_percent", "comment": null}, "viewable_impressions": {"type": "integer", "index": 50, "name": "viewable_impressions", "comment": null}, "viewer_comments": {"type": "integer", "index": 51, "name": "viewer_comments", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__ad_report_tmp"}, "model.reddit_ads.stg_reddit_ads__ad_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying(255)", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": null}, "ad_group_id": {"type": "character varying(255)", "index": 4, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 5, "name": "campaign_id", "comment": null}, "click_url": {"type": "text", "index": 6, "name": "click_url", "comment": null}, "configured_status": {"type": "text", "index": 7, "name": "configured_status", "comment": null}, "effective_status": {"type": "text", "index": 8, "name": "effective_status", "comment": null}, "is_processing": {"type": "boolean", "index": 9, "name": "is_processing", "comment": null}, "name": {"type": "text", "index": 10, "name": "name", "comment": null}, "post_id": {"type": "text", "index": 11, "name": "post_id", "comment": null}, "post_url": {"type": "integer", "index": 12, "name": "post_url", "comment": null}, "preview_expiry": {"type": "integer", "index": 13, "name": "preview_expiry", "comment": null}, "preview_url": {"type": "integer", "index": 14, "name": "preview_url", "comment": null}, "rejection_reason": {"type": "integer", "index": 15, "name": "rejection_reason", "comment": null}, "search_term": {"type": "integer", "index": 16, "name": "search_term", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__ad_tmp"}, "model.reddit_ads.stg_reddit_ads__campaign": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign", "database": "postgres", "comment": "Each record represents information about each campaign.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": "The ID of the account."}, "configured_status": {"type": "text", "index": 3, "name": "configured_status", "comment": "The status configured by the account owner. \"ACTIVE\", \"PAUSED\", \"ARCHIVED\", \"DELETED\""}, "effective_status": {"type": "text", "index": 4, "name": "effective_status", "comment": "The calculated status determining the real status of this entity."}, "funding_instrument_id": {"type": "integer", "index": 5, "name": "funding_instrument_id", "comment": "Campaign level funding instrument id"}, "campaign_id": {"type": "character varying(255)", "index": 6, "name": "campaign_id", "comment": "The ID of the campaign."}, "is_processing": {"type": "boolean", "index": 7, "name": "is_processing", "comment": "Whether or not effective status is processing"}, "campaign_name": {"type": "text", "index": 8, "name": "campaign_name", "comment": "Name of campaign."}, "objective": {"type": "text", "index": 9, "name": "objective", "comment": "The objective type of a campaign."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__campaign"}, "model.reddit_ads.stg_reddit_ads__campaign_conversions_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_conversions_report", "database": "postgres", "comment": "Provides a summary of conversion events at the campaign level, aggregating key metrics by event and day such as view-through and click-through conversions.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "campaign_id": {"type": "character varying(255)", "index": 4, "name": "campaign_id", "comment": "The ID of the campaign."}, "date_day": {"type": "date", "index": 5, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "event_name": {"type": "text", "index": 6, "name": "event_name", "comment": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset."}, "total_items": {"type": "integer", "index": 7, "name": "total_items", "comment": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion."}, "total_value": {"type": "double precision", "index": 8, "name": "total_value", "comment": "The total monetary value associated with a conversion event."}, "conversions": {"type": "integer", "index": 9, "name": "conversions", "comment": "The total click-through conversions attributed, for the given month-long window."}, "view_through_conversions": {"type": "integer", "index": 10, "name": "view_through_conversions", "comment": "The total view-through conversions attributed, for the given month-long window."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_conversions_report"}, "model.reddit_ads.stg_reddit_ads__campaign_conversions_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_conversions_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "avg_value": {"type": "double precision", "index": 3, "name": "avg_value", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 4, "name": "campaign_id", "comment": null}, "click_through_conversion_attribution_window_day": {"type": "integer", "index": 5, "name": "click_through_conversion_attribution_window_day", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 6, "name": "click_through_conversion_attribution_window_month", "comment": null}, "click_through_conversion_attribution_window_week": {"type": "integer", "index": 7, "name": "click_through_conversion_attribution_window_week", "comment": null}, "date": {"type": "date", "index": 8, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 9, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 10, "name": "total_items", "comment": null}, "total_value": {"type": "double precision", "index": 11, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_day": {"type": "integer", "index": 12, "name": "view_through_conversion_attribution_window_day", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 13, "name": "view_through_conversion_attribution_window_month", "comment": null}, "view_through_conversion_attribution_window_week": {"type": "integer", "index": 14, "name": "view_through_conversion_attribution_window_week", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_conversions_report_tmp"}, "model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_country_conversions_report", "database": "postgres", "comment": "Provides a summary of conversion events at the campaign and country level, aggregating key metrics by event and day such as view-through and click-through conversions.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "campaign_id": {"type": "character varying(255)", "index": 4, "name": "campaign_id", "comment": "The ID of the campaign."}, "date_day": {"type": "date", "index": 5, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "country": {"type": "text", "index": 6, "name": "country", "comment": "The country associated with the record."}, "event_name": {"type": "text", "index": 7, "name": "event_name", "comment": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset."}, "total_items": {"type": "integer", "index": 8, "name": "total_items", "comment": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion."}, "total_value": {"type": "integer", "index": 9, "name": "total_value", "comment": "The total monetary value associated with a conversion event."}, "conversions": {"type": "integer", "index": 10, "name": "conversions", "comment": "The total click-through conversions attributed, for the given month-long window."}, "view_through_conversions": {"type": "integer", "index": 11, "name": "view_through_conversions", "comment": "The total view-through conversions attributed, for the given month-long window."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report"}, "model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_country_conversions_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 3, "name": "campaign_id", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 4, "name": "click_through_conversion_attribution_window_month", "comment": null}, "country": {"type": "text", "index": 5, "name": "country", "comment": null}, "date": {"type": "date", "index": 6, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 7, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 8, "name": "total_items", "comment": null}, "total_value": {"type": "integer", "index": 9, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 10, "name": "view_through_conversion_attribution_window_month", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report_tmp"}, "model.reddit_ads.stg_reddit_ads__campaign_country_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_country_report", "database": "postgres", "comment": "Each record represents a summary of events at the date, country, and campaign level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "campaign_id": {"type": "character varying(255)", "index": 4, "name": "campaign_id", "comment": "The ID of the campaign."}, "country": {"type": "text", "index": 5, "name": "country", "comment": "The country associated with the record."}, "date_day": {"type": "date", "index": 6, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "clicks": {"type": "integer", "index": 7, "name": "clicks", "comment": "The number of clicks detected for this report period"}, "impressions": {"type": "integer", "index": 8, "name": "impressions", "comment": "The number of impressions served for this report period"}, "region": {"type": "text", "index": 9, "name": "region", "comment": "The region (US state or UK country) targeted for the reports"}, "spend": {"type": "numeric", "index": 10, "name": "spend", "comment": "Spend converted out of microcurrency (so Spend/1,000,000)"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_country_report"}, "model.reddit_ads.stg_reddit_ads__campaign_country_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_country_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 3, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 4, "name": "clicks", "comment": null}, "country": {"type": "text", "index": 5, "name": "country", "comment": null}, "date": {"type": "date", "index": 6, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": null}, "region": {"type": "text", "index": 8, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 9, "name": "spend", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_country_report_tmp"}, "model.reddit_ads.stg_reddit_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_report", "database": "postgres", "comment": "Each record represents a summary of events for each given date and campaign.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": "The ID of the account."}, "campaign_id": {"type": "character varying(255)", "index": 3, "name": "campaign_id", "comment": "The ID of the campaign."}, "clicks": {"type": "integer", "index": 4, "name": "clicks", "comment": "The number of clicks detected for this report period"}, "date_day": {"type": "date", "index": 5, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": "The number of impressions served for this report period"}, "region": {"type": "integer", "index": 7, "name": "region", "comment": "The region (US state or UK country) targeted for the reports"}, "spend": {"type": "numeric", "index": 8, "name": "spend", "comment": "Spend converted out of microcurrency (so Spend/1,000,000)"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_report"}, "model.reddit_ads.stg_reddit_ads__campaign_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 2, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "app_install_metrics_add_payment_info": {"type": "integer", "index": 5, "name": "app_install_metrics_add_payment_info", "comment": null}, "app_install_metrics_add_to_cart": {"type": "integer", "index": 6, "name": "app_install_metrics_add_to_cart", "comment": null}, "app_install_metrics_app_launch": {"type": "integer", "index": 7, "name": "app_install_metrics_app_launch", "comment": null}, "app_install_metrics_completed_tutorial": {"type": "integer", "index": 8, "name": "app_install_metrics_completed_tutorial", "comment": null}, "app_install_metrics_install": {"type": "integer", "index": 9, "name": "app_install_metrics_install", "comment": null}, "app_install_metrics_level_achieved": {"type": "integer", "index": 10, "name": "app_install_metrics_level_achieved", "comment": null}, "app_install_metrics_purchase": {"type": "integer", "index": 11, "name": "app_install_metrics_purchase", "comment": null}, "app_install_metrics_search": {"type": "integer", "index": 12, "name": "app_install_metrics_search", "comment": null}, "app_install_metrics_sign_up": {"type": "integer", "index": 13, "name": "app_install_metrics_sign_up", "comment": null}, "app_install_metrics_spend": {"type": "integer", "index": 14, "name": "app_install_metrics_spend", "comment": null}, "app_install_metrics_spend_credits": {"type": "integer", "index": 15, "name": "app_install_metrics_spend_credits", "comment": null}, "app_install_metrics_view_content": {"type": "integer", "index": 16, "name": "app_install_metrics_view_content", "comment": null}, "clicks": {"type": "integer", "index": 17, "name": "clicks", "comment": null}, "comment_downvotes": {"type": "integer", "index": 18, "name": "comment_downvotes", "comment": null}, "comment_upvotes": {"type": "integer", "index": 19, "name": "comment_upvotes", "comment": null}, "comments_page_views": {"type": "integer", "index": 20, "name": "comments_page_views", "comment": null}, "conversion_roas": {"type": "integer", "index": 21, "name": "conversion_roas", "comment": null}, "cpc": {"type": "double precision", "index": 22, "name": "cpc", "comment": null}, "ctr": {"type": "double precision", "index": 23, "name": "ctr", "comment": null}, "ecpm": {"type": "double precision", "index": 24, "name": "ecpm", "comment": null}, "gallery_item_caption": {"type": "integer", "index": 25, "name": "gallery_item_caption", "comment": null}, "gallery_item_id": {"type": "integer", "index": 26, "name": "gallery_item_id", "comment": null}, "impressions": {"type": "integer", "index": 27, "name": "impressions", "comment": null}, "legacy_click_conversions_attribution_window_day": {"type": "integer", "index": 28, "name": "legacy_click_conversions_attribution_window_day", "comment": null}, "legacy_click_conversions_attribution_window_month": {"type": "integer", "index": 29, "name": "legacy_click_conversions_attribution_window_month", "comment": null}, "legacy_click_conversions_attribution_window_week": {"type": "integer", "index": 30, "name": "legacy_click_conversions_attribution_window_week", "comment": null}, "legacy_view_conversions_attribution_window_day": {"type": "integer", "index": 31, "name": "legacy_view_conversions_attribution_window_day", "comment": null}, "legacy_view_conversions_attribution_window_month": {"type": "integer", "index": 32, "name": "legacy_view_conversions_attribution_window_month", "comment": null}, "legacy_view_conversions_attribution_window_week": {"type": "integer", "index": 33, "name": "legacy_view_conversions_attribution_window_week", "comment": null}, "priority": {"type": "integer", "index": 34, "name": "priority", "comment": null}, "region": {"type": "integer", "index": 35, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 36, "name": "spend", "comment": null}, "video_fully_viewable_impressions": {"type": "integer", "index": 37, "name": "video_fully_viewable_impressions", "comment": null}, "video_plays_expanded": {"type": "integer", "index": 38, "name": "video_plays_expanded", "comment": null}, "video_plays_with_sound": {"type": "integer", "index": 39, "name": "video_plays_with_sound", "comment": null}, "video_started": {"type": "integer", "index": 40, "name": "video_started", "comment": null}, "video_viewable_impressions": {"type": "integer", "index": 41, "name": "video_viewable_impressions", "comment": null}, "video_watched_100_percent": {"type": "integer", "index": 42, "name": "video_watched_100_percent", "comment": null}, "video_watched_10_seconds": {"type": "integer", "index": 43, "name": "video_watched_10_seconds", "comment": null}, "video_watched_25_percent": {"type": "integer", "index": 44, "name": "video_watched_25_percent", "comment": null}, "video_watched_3_seconds": {"type": "integer", "index": 45, "name": "video_watched_3_seconds", "comment": null}, "video_watched_50_percent": {"type": "integer", "index": 46, "name": "video_watched_50_percent", "comment": null}, "video_watched_5_seconds": {"type": "integer", "index": 47, "name": "video_watched_5_seconds", "comment": null}, "video_watched_75_percent": {"type": "integer", "index": 48, "name": "video_watched_75_percent", "comment": null}, "video_watched_95_percent": {"type": "integer", "index": 49, "name": "video_watched_95_percent", "comment": null}, "viewable_impressions": {"type": "integer", "index": 50, "name": "viewable_impressions", "comment": null}, "viewer_comments": {"type": "integer", "index": 51, "name": "viewer_comments", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_report_tmp"}, "model.reddit_ads.stg_reddit_ads__campaign_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying(255)", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": null}, "configured_status": {"type": "text", "index": 4, "name": "configured_status", "comment": null}, "effective_status": {"type": "text", "index": 5, "name": "effective_status", "comment": null}, "funding_instrument_id": {"type": "integer", "index": 6, "name": "funding_instrument_id", "comment": null}, "is_processing": {"type": "boolean", "index": 7, "name": "is_processing", "comment": null}, "name": {"type": "text", "index": 8, "name": "name", "comment": null}, "objective": {"type": "text", "index": 9, "name": "objective", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_tmp"}, "model.snapchat_ads.stg_snapchat_ads__ad_account_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_account_history", "database": "postgres", "comment": "Each record in this table represents a historic version of an ad account in Snapchat.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_account_id": {"type": "text", "index": 2, "name": "ad_account_id", "comment": "The ID of the account in Snapchat."}, "ad_account_name": {"type": "text", "index": 3, "name": "ad_account_name", "comment": "The name of the account in Snapchat."}, "created_at": {"type": "timestamp without time zone", "index": 4, "name": "created_at", "comment": "Created at timestamp"}, "advertiser": {"type": "text", "index": 5, "name": "advertiser", "comment": "Name of advertiser"}, "currency": {"type": "text", "index": 6, "name": "currency", "comment": "Currency used by account"}, "timezone": {"type": "text", "index": 7, "name": "timezone", "comment": "Account timezone"}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_synced", "comment": "When the record was last synced by Fivetran."}, "updated_at": {"type": "timestamp without time zone", "index": 9, "name": "updated_at", "comment": "Timestamp of when the record was updated."}, "is_most_recent_record": {"type": "boolean", "index": 10, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_account_history"}, "model.snapchat_ads.stg_snapchat_ads__ad_account_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_account_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_account_history_tmp"}, "model.snapchat_ads.stg_snapchat_ads__ad_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_history", "database": "postgres", "comment": "Each record in this table represents a historic version of an ad in Snapchat.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_id": {"type": "text", "index": 2, "name": "ad_id", "comment": "The ID of the ad in Snapchat."}, "ad_name": {"type": "text", "index": 3, "name": "ad_name", "comment": "The name of the ad in Snapchat."}, "created_at": {"type": "timestamp without time zone", "index": 4, "name": "created_at", "comment": "Created at timestamp"}, "ad_squad_id": {"type": "text", "index": 5, "name": "ad_squad_id", "comment": "The ID of the related ad squad in Snapchat."}, "creative_id": {"type": "text", "index": 6, "name": "creative_id", "comment": "The ID of the related creative in Snapchat."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": "When the record was last synced by Fivetran."}, "updated_at": {"type": "timestamp without time zone", "index": 8, "name": "updated_at", "comment": "Timestamp of when the record was updated."}, "is_most_recent_record": {"type": "boolean", "index": 9, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_history"}, "model.snapchat_ads.stg_snapchat_ads__ad_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "ad_squad_id": {"type": "text", "index": 2, "name": "ad_squad_id", "comment": null}, "creative_id": {"type": "text", "index": 3, "name": "creative_id", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_history_tmp"}, "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_hourly_report", "database": "postgres", "comment": "Each record represents an hourly performance summary for an ad in Snapchat.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_id": {"type": "text", "index": 2, "name": "ad_id", "comment": "The ID of the ad that the report relates to in Snapchat."}, "date_hour": {"type": "timestamp without time zone", "index": 3, "name": "date_hour", "comment": "The hour that the report relates to."}, "attachment_quartile_1": {"type": "numeric(28,6)", "index": 4, "name": "attachment_quartile_1", "comment": "Number of times your Long Form Video was viewed to 25%"}, "attachment_quartile_2": {"type": "numeric(28,6)", "index": 5, "name": "attachment_quartile_2", "comment": "Number of times your Long Form Video was viewed to 50%"}, "attachment_quartile_3": {"type": "numeric(28,6)", "index": 6, "name": "attachment_quartile_3", "comment": "Number of times your Long Form Video was viewed to 75%"}, "attachment_total_view_time": {"type": "numeric", "index": 7, "name": "attachment_total_view_time", "comment": "Total time Snapchatters spent on the attachment (HH:MM:SS)"}, "attachment_view_completion": {"type": "numeric(28,6)", "index": 8, "name": "attachment_view_completion", "comment": "The number of times your Long Form Video was viewed to completion (97% )"}, "quartile_1": {"type": "numeric(28,6)", "index": 9, "name": "quartile_1", "comment": "The number of times your video ad was viewed to 25%"}, "quartile_2": {"type": "numeric(28,6)", "index": 10, "name": "quartile_2", "comment": "The number of times your video ad was viewed to 50%"}, "quartile_3": {"type": "numeric(28,6)", "index": 11, "name": "quartile_3", "comment": "The number of times your video ad was viewed to 75%"}, "saves": {"type": "numeric(28,6)", "index": 12, "name": "saves", "comment": "Number of times an ad was saved to Memories"}, "shares": {"type": "numeric(28,6)", "index": 13, "name": "shares", "comment": "Number of times an ad was shared in a Chat or Story"}, "screen_time": {"type": "numeric", "index": 14, "name": "screen_time", "comment": "The number of seconds spent watching your ad across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts"}, "video_views": {"type": "numeric(28,6)", "index": 15, "name": "video_views", "comment": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first"}, "view_completion": {"type": "numeric(28,6)", "index": 16, "name": "view_completion", "comment": "The number of times your video ad was viewed to completion (97% )"}, "view_time": {"type": "numeric", "index": 17, "name": "view_time", "comment": "The number of seconds spent watching your ad across all users reached."}, "impressions": {"type": "integer", "index": 18, "name": "impressions", "comment": "The number of impressions for an ad in the hour of the record."}, "spend": {"type": "numeric", "index": 19, "name": "spend", "comment": "The amount of spend for an ad in the hour of the record converted from micros."}, "swipes": {"type": "integer", "index": 20, "name": "swipes", "comment": "The number of swipes for an ad in the hour of the record."}, "conversion_purchases_value": {"type": "double precision", "index": 21, "name": "conversion_purchases_value", "comment": "The total value of purchases attributed to an ad in the hour of the record (in Ad Account's currency, converted from microcurrency)."}, "conversion_purchases": {"type": "bigint", "index": 22, "name": "conversion_purchases", "comment": "The total number of purchases attributed to an ad for the day of the record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report"}, "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_hourly_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "text", "index": 1, "name": "ad_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 3, "name": "impressions", "comment": null}, "spend": {"type": "integer", "index": 4, "name": "spend", "comment": null}, "swipes": {"type": "integer", "index": 5, "name": "swipes", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 6, "name": "conversion_purchases_value", "comment": null}, "conversion_add_billing": {"type": "integer", "index": 7, "name": "conversion_add_billing", "comment": null}, "conversion_add_cart": {"type": "integer", "index": 8, "name": "conversion_add_cart", "comment": null}, "conversion_app_opens": {"type": "integer", "index": 9, "name": "conversion_app_opens", "comment": null}, "conversion_level_completes": {"type": "integer", "index": 10, "name": "conversion_level_completes", "comment": null}, "conversion_page_views": {"type": "integer", "index": 11, "name": "conversion_page_views", "comment": null}, "conversion_purchases": {"type": "integer", "index": 12, "name": "conversion_purchases", "comment": null}, "conversion_save": {"type": "integer", "index": 13, "name": "conversion_save", "comment": null}, "conversion_searches": {"type": "integer", "index": 14, "name": "conversion_searches", "comment": null}, "conversion_sign_ups": {"type": "integer", "index": 15, "name": "conversion_sign_ups", "comment": null}, "conversion_start_checkout": {"type": "integer", "index": 16, "name": "conversion_start_checkout", "comment": null}, "conversion_view_content": {"type": "integer", "index": 17, "name": "conversion_view_content", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report_tmp"}, "model.snapchat_ads.stg_snapchat_ads__ad_squad_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_squad_history", "database": "postgres", "comment": "Each record in this table represents a historic version of an ad squad in Snapchat.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_squad_id": {"type": "text", "index": 2, "name": "ad_squad_id", "comment": "The ID of the ad squad in Snapchat."}, "ad_squad_name": {"type": "text", "index": 3, "name": "ad_squad_name", "comment": "The name of the ad squad in Snapchat."}, "created_at": {"type": "timestamp without time zone", "index": 4, "name": "created_at", "comment": "Created at timestamp."}, "campaign_id": {"type": "text", "index": 5, "name": "campaign_id", "comment": "The ID of the related campaign in Snapchat."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": "When the record was last synced by Fivetran."}, "updated_at": {"type": "timestamp without time zone", "index": 7, "name": "updated_at", "comment": "Timestamp of when the record was updated."}, "is_most_recent_record": {"type": "boolean", "index": 8, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_squad_history"}, "model.snapchat_ads.stg_snapchat_ads__ad_squad_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_squad_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "campaign_id": {"type": "text", "index": 2, "name": "campaign_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_squad_history_tmp"}, "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_squad_hourly_report", "database": "postgres", "comment": "Each record in this table represents a historic version of an ad in Snapchat.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_squad_id": {"type": "text", "index": 2, "name": "ad_squad_id", "comment": "ID of the ad squad."}, "date_hour": {"type": "timestamp without time zone", "index": 3, "name": "date_hour", "comment": "The hour that the report relates to."}, "attachment_quartile_1": {"type": "integer", "index": 4, "name": "attachment_quartile_1", "comment": "Number of times your Long Form Video was viewed to 25%"}, "attachment_quartile_2": {"type": "integer", "index": 5, "name": "attachment_quartile_2", "comment": "Number of times your Long Form Video was viewed to 50%"}, "attachment_quartile_3": {"type": "integer", "index": 6, "name": "attachment_quartile_3", "comment": "Number of times your Long Form Video was viewed to 75%"}, "attachment_total_view_time": {"type": "numeric", "index": 7, "name": "attachment_total_view_time", "comment": "Total time Snapchatters spent on the attachment (HH:MM:SS)"}, "attachment_view_completion": {"type": "integer", "index": 8, "name": "attachment_view_completion", "comment": "The number of times your Long Form Video was viewed to completion (97% )"}, "quartile_1": {"type": "integer", "index": 9, "name": "quartile_1", "comment": "The number of times your video was viewed to 25%"}, "quartile_2": {"type": "integer", "index": 10, "name": "quartile_2", "comment": "The number of times your video was viewed to 50%"}, "quartile_3": {"type": "integer", "index": 11, "name": "quartile_3", "comment": "The number of times your video was viewed to 75%"}, "saves": {"type": "integer", "index": 12, "name": "saves", "comment": "Number of times components of the ad squad were saved to Memories"}, "shares": {"type": "integer", "index": 13, "name": "shares", "comment": "Number of times components of the ad squad were shared in a Chat or Story"}, "screen_time": {"type": "numeric", "index": 14, "name": "screen_time", "comment": "The number of seconds spent watching your ad squad across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts"}, "video_views": {"type": "integer", "index": 15, "name": "video_views", "comment": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first"}, "view_completion": {"type": "integer", "index": 16, "name": "view_completion", "comment": "The number of times your video ad was viewed to completion (97% )"}, "view_time": {"type": "numeric", "index": 17, "name": "view_time", "comment": "The number of seconds spent watching your ad squad across all users reached."}, "impressions": {"type": "integer", "index": 18, "name": "impressions", "comment": "The number of impressions for an ad squad in the hour of the record."}, "spend": {"type": "numeric", "index": 19, "name": "spend", "comment": "The amount of spend for an ad squad in the hour of the record."}, "swipes": {"type": "integer", "index": 20, "name": "swipes", "comment": "The number of swipes for an ad squad in the hour of the record. Swipes are when your ad was swiped up on or the CTA was tapped to view the attachment below."}, "conversion_purchases_value": {"type": "double precision", "index": 21, "name": "conversion_purchases_value", "comment": "The total value of purchases attributed to an ad squad in the hour of the record (in Ad Account's currency, converted from microcurrency)."}, "conversion_purchases": {"type": "bigint", "index": 22, "name": "conversion_purchases", "comment": "The total number of purchases attributed to an ad squad for the day of the record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report"}, "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_squad_hourly_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_squad_id": {"type": "text", "index": 1, "name": "ad_squad_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "android_installs": {"type": "integer", "index": 4, "name": "android_installs", "comment": null}, "attachment_avg_view_time_millis": {"type": "integer", "index": 5, "name": "attachment_avg_view_time_millis", "comment": null}, "attachment_quartile_1": {"type": "integer", "index": 6, "name": "attachment_quartile_1", "comment": null}, "attachment_quartile_2": {"type": "integer", "index": 7, "name": "attachment_quartile_2", "comment": null}, "attachment_quartile_3": {"type": "integer", "index": 8, "name": "attachment_quartile_3", "comment": null}, "attachment_total_view_time_millis": {"type": "integer", "index": 9, "name": "attachment_total_view_time_millis", "comment": null}, "attachment_view_completion": {"type": "integer", "index": 10, "name": "attachment_view_completion", "comment": null}, "avg_screen_time_millis": {"type": "integer", "index": 11, "name": "avg_screen_time_millis", "comment": null}, "avg_view_time_millis": {"type": "integer", "index": 12, "name": "avg_view_time_millis", "comment": null}, "conversion_add_billing": {"type": "integer", "index": 13, "name": "conversion_add_billing", "comment": null}, "conversion_add_cart": {"type": "integer", "index": 14, "name": "conversion_add_cart", "comment": null}, "conversion_app_opens": {"type": "integer", "index": 15, "name": "conversion_app_opens", "comment": null}, "conversion_level_completes": {"type": "integer", "index": 16, "name": "conversion_level_completes", "comment": null}, "conversion_page_views": {"type": "integer", "index": 17, "name": "conversion_page_views", "comment": null}, "conversion_purchases": {"type": "integer", "index": 18, "name": "conversion_purchases", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 19, "name": "conversion_purchases_value", "comment": null}, "conversion_save": {"type": "integer", "index": 20, "name": "conversion_save", "comment": null}, "conversion_searches": {"type": "integer", "index": 21, "name": "conversion_searches", "comment": null}, "conversion_sign_ups": {"type": "integer", "index": 22, "name": "conversion_sign_ups", "comment": null}, "conversion_start_checkout": {"type": "integer", "index": 23, "name": "conversion_start_checkout", "comment": null}, "conversion_view_content": {"type": "integer", "index": 24, "name": "conversion_view_content", "comment": null}, "impressions": {"type": "integer", "index": 25, "name": "impressions", "comment": null}, "ios_installs": {"type": "integer", "index": 26, "name": "ios_installs", "comment": null}, "quartile_1": {"type": "integer", "index": 27, "name": "quartile_1", "comment": null}, "quartile_2": {"type": "integer", "index": 28, "name": "quartile_2", "comment": null}, "quartile_3": {"type": "integer", "index": 29, "name": "quartile_3", "comment": null}, "saves": {"type": "integer", "index": 30, "name": "saves", "comment": null}, "screen_time_millis": {"type": "integer", "index": 31, "name": "screen_time_millis", "comment": null}, "shares": {"type": "integer", "index": 32, "name": "shares", "comment": null}, "spend": {"type": "integer", "index": 33, "name": "spend", "comment": null}, "story_completes": {"type": "integer", "index": 34, "name": "story_completes", "comment": null}, "story_opens": {"type": "integer", "index": 35, "name": "story_opens", "comment": null}, "swipe_up_percent": {"type": "integer", "index": 36, "name": "swipe_up_percent", "comment": null}, "swipes": {"type": "integer", "index": 37, "name": "swipes", "comment": null}, "total_installs": {"type": "integer", "index": 38, "name": "total_installs", "comment": null}, "video_views": {"type": "integer", "index": 39, "name": "video_views", "comment": null}, "view_completion": {"type": "integer", "index": 40, "name": "view_completion", "comment": null}, "view_time_millis": {"type": "integer", "index": 41, "name": "view_time_millis", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report_tmp"}, "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_geo_country_daily_report", "database": "postgres", "comment": "Each record represents a daily performance summary per country for each campaign.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_id": {"type": "text", "index": 2, "name": "campaign_id", "comment": "ID of campaign"}, "country": {"type": "text", "index": 3, "name": "country", "comment": "The country that the report relates to."}, "date_day": {"type": "timestamp without time zone", "index": 4, "name": "date_day", "comment": "The day that the report relates to."}, "attachment_quartile_1": {"type": "integer", "index": 5, "name": "attachment_quartile_1", "comment": "Number of times your Long Form Video was viewed to 25%"}, "attachment_quartile_2": {"type": "integer", "index": 6, "name": "attachment_quartile_2", "comment": "Number of times your Long Form Video was viewed to 50%"}, "attachment_quartile_3": {"type": "integer", "index": 7, "name": "attachment_quartile_3", "comment": "Number of times your Long Form Video was viewed to 75%"}, "attachment_total_view_time": {"type": "numeric", "index": 8, "name": "attachment_total_view_time", "comment": "Total time Snapchatters spent on the attachment (HH:MM:SS)"}, "attachment_view_completion": {"type": "boolean", "index": 9, "name": "attachment_view_completion", "comment": "The number of times your Long Form Video was viewed to completion (97%)"}, "quartile_1": {"type": "integer", "index": 10, "name": "quartile_1", "comment": "The number of times your video was viewed to 25%"}, "quartile_2": {"type": "integer", "index": 11, "name": "quartile_2", "comment": "The number of times your video was viewed to 50%"}, "quartile_3": {"type": "integer", "index": 12, "name": "quartile_3", "comment": "The number of times your video was viewed to 75%"}, "saves": {"type": "integer", "index": 13, "name": "saves", "comment": "Number of times components of the campaign were saved to Memories"}, "shares": {"type": "integer", "index": 14, "name": "shares", "comment": "Number of times components of the campaign were shared in a Chat or Story"}, "screen_time": {"type": "numeric", "index": 15, "name": "screen_time", "comment": "The number of seconds spent watching your campaign across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts"}, "video_views": {"type": "integer", "index": 16, "name": "video_views", "comment": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first"}, "view_completion": {"type": "boolean", "index": 17, "name": "view_completion", "comment": "The number of times your video was viewed to completion (97% )"}, "view_time": {"type": "numeric", "index": 18, "name": "view_time", "comment": "The number of seconds spent watching your campaign across all users reached."}, "impressions": {"type": "integer", "index": 19, "name": "impressions", "comment": "The number of impressions for a campaign."}, "spend": {"type": "numeric", "index": 20, "name": "spend", "comment": "The amount of spend for a campaign."}, "swipes": {"type": "integer", "index": 21, "name": "swipes", "comment": "The number of swipes for a campaign. Swipes are when your ad was swiped up on or the CTA was tapped to view the attachment below."}, "conversion_purchases_value": {"type": "double precision", "index": 22, "name": "conversion_purchases_value", "comment": "The total value of purchases attributed to a campaign."}, "conversion_purchases": {"type": "bigint", "index": 23, "name": "conversion_purchases", "comment": "The total number of purchases attributed to a campaign for the day of the record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report"}, "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_geo_country_daily_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"attachment_quartile_1": {"type": "integer", "index": 1, "name": "attachment_quartile_1", "comment": null}, "attachment_quartile_2": {"type": "integer", "index": 2, "name": "attachment_quartile_2", "comment": null}, "attachment_quartile_3": {"type": "integer", "index": 3, "name": "attachment_quartile_3", "comment": null}, "attachment_total_view_time_millis": {"type": "integer", "index": 4, "name": "attachment_total_view_time_millis", "comment": null}, "attachment_view_completion": {"type": "boolean", "index": 5, "name": "attachment_view_completion", "comment": null}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 7, "name": "date", "comment": null}, "country": {"type": "text", "index": 8, "name": "country", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "quartile_1": {"type": "integer", "index": 10, "name": "quartile_1", "comment": null}, "quartile_2": {"type": "integer", "index": 11, "name": "quartile_2", "comment": null}, "quartile_3": {"type": "integer", "index": 12, "name": "quartile_3", "comment": null}, "saves": {"type": "integer", "index": 13, "name": "saves", "comment": null}, "screen_time_millis": {"type": "integer", "index": 14, "name": "screen_time_millis", "comment": null}, "shares": {"type": "integer", "index": 15, "name": "shares", "comment": null}, "spend": {"type": "integer", "index": 16, "name": "spend", "comment": null}, "swipes": {"type": "integer", "index": 17, "name": "swipes", "comment": null}, "video_views": {"type": "integer", "index": 18, "name": "video_views", "comment": null}, "view_completion": {"type": "boolean", "index": 19, "name": "view_completion", "comment": null}, "view_time_millis": {"type": "integer", "index": 20, "name": "view_time_millis", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 21, "name": "conversion_purchases_value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report_tmp"}, "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_geo_region_daily_report", "database": "postgres", "comment": "Each record represents a daily performance summary per region for each campaign.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_id": {"type": "text", "index": 2, "name": "campaign_id", "comment": "ID of campaign"}, "region": {"type": "text", "index": 3, "name": "region", "comment": "The region that the report relates to."}, "date_day": {"type": "timestamp without time zone", "index": 4, "name": "date_day", "comment": "The day that the report relates to."}, "attachment_quartile_1": {"type": "integer", "index": 5, "name": "attachment_quartile_1", "comment": "Number of times your Long Form Video was viewed to 25%"}, "attachment_quartile_2": {"type": "integer", "index": 6, "name": "attachment_quartile_2", "comment": "Number of times your Long Form Video was viewed to 50%"}, "attachment_quartile_3": {"type": "integer", "index": 7, "name": "attachment_quartile_3", "comment": "Number of times your Long Form Video was viewed to 75%"}, "attachment_total_view_time": {"type": "numeric", "index": 8, "name": "attachment_total_view_time", "comment": "Total time Snapchatters spent on the attachment (HH:MM:SS)"}, "attachment_view_completion": {"type": "boolean", "index": 9, "name": "attachment_view_completion", "comment": "The number of times your Long Form Video was viewed to completion (97% )"}, "quartile_1": {"type": "integer", "index": 10, "name": "quartile_1", "comment": "The number of times your video was viewed to 25%"}, "quartile_2": {"type": "integer", "index": 11, "name": "quartile_2", "comment": "The number of times your video was viewed to 50%"}, "quartile_3": {"type": "integer", "index": 12, "name": "quartile_3", "comment": "The number of times your video was viewed to 75%"}, "saves": {"type": "integer", "index": 13, "name": "saves", "comment": "Number of times components of the campaign were saved to Memories"}, "shares": {"type": "integer", "index": 14, "name": "shares", "comment": "Number of times components of the campaign were shared in a Chat or Story"}, "screen_time": {"type": "numeric", "index": 15, "name": "screen_time", "comment": "The number of seconds spent watching your campaign across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts"}, "video_views": {"type": "integer", "index": 16, "name": "video_views", "comment": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first"}, "view_completion": {"type": "boolean", "index": 17, "name": "view_completion", "comment": "The number of times your video was viewed to completion (97% )"}, "view_time": {"type": "numeric", "index": 18, "name": "view_time", "comment": "The number of seconds spent watching your campaign across all users reached."}, "impressions": {"type": "integer", "index": 19, "name": "impressions", "comment": "The number of impressions for a campaign."}, "spend": {"type": "numeric", "index": 20, "name": "spend", "comment": "The amount of spend for a campaign."}, "swipes": {"type": "integer", "index": 21, "name": "swipes", "comment": "The number of swipes for a campaign. Swipes are when your ad was swiped up on or the CTA was tapped to view the attachment below."}, "conversion_purchases_value": {"type": "double precision", "index": 22, "name": "conversion_purchases_value", "comment": "The total value of purchases attributed to a campaign."}, "conversion_purchases": {"type": "bigint", "index": 23, "name": "conversion_purchases", "comment": "The total number of purchases attributed to a campaign for the day of the record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report"}, "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_geo_region_daily_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"attachment_quartile_1": {"type": "integer", "index": 1, "name": "attachment_quartile_1", "comment": null}, "attachment_quartile_2": {"type": "integer", "index": 2, "name": "attachment_quartile_2", "comment": null}, "attachment_quartile_3": {"type": "integer", "index": 3, "name": "attachment_quartile_3", "comment": null}, "attachment_total_view_time_millis": {"type": "integer", "index": 4, "name": "attachment_total_view_time_millis", "comment": null}, "attachment_view_completion": {"type": "boolean", "index": 5, "name": "attachment_view_completion", "comment": null}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 7, "name": "date", "comment": null}, "region": {"type": "text", "index": 8, "name": "region", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "quartile_1": {"type": "integer", "index": 10, "name": "quartile_1", "comment": null}, "quartile_2": {"type": "integer", "index": 11, "name": "quartile_2", "comment": null}, "quartile_3": {"type": "integer", "index": 12, "name": "quartile_3", "comment": null}, "saves": {"type": "integer", "index": 13, "name": "saves", "comment": null}, "screen_time_millis": {"type": "integer", "index": 14, "name": "screen_time_millis", "comment": null}, "shares": {"type": "integer", "index": 15, "name": "shares", "comment": null}, "spend": {"type": "integer", "index": 16, "name": "spend", "comment": null}, "swipes": {"type": "integer", "index": 17, "name": "swipes", "comment": null}, "video_views": {"type": "integer", "index": 18, "name": "video_views", "comment": null}, "view_completion": {"type": "boolean", "index": 19, "name": "view_completion", "comment": null}, "view_time_millis": {"type": "integer", "index": 20, "name": "view_time_millis", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 21, "name": "conversion_purchases_value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report_tmp"}, "model.snapchat_ads.stg_snapchat_ads__campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_history", "database": "postgres", "comment": "Each record in this table represents a historic version of a campaign in Snapchat.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_id": {"type": "text", "index": 2, "name": "campaign_id", "comment": "The id of the campaign in Snapchat."}, "ad_account_id": {"type": "text", "index": 3, "name": "ad_account_id", "comment": "The ID of the related ad account in Snapchat."}, "created_at": {"type": "timestamp without time zone", "index": 4, "name": "created_at", "comment": "Created at timestamp."}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "The name of the campaign in Snapchat."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": "When the record was last synced by Fivetran."}, "updated_at": {"type": "timestamp without time zone", "index": 7, "name": "updated_at", "comment": "Timestamp of when the record was updated."}, "daily_budget": {"type": "numeric", "index": 8, "name": "daily_budget", "comment": "Daily Spend Cap converted from microcurrency"}, "start_time": {"type": "timestamp without time zone", "index": 9, "name": "start_time", "comment": "Start time"}, "end_time": {"type": "timestamp without time zone", "index": 10, "name": "end_time", "comment": "End time"}, "lifetime_spend_cap": {"type": "numeric", "index": 11, "name": "lifetime_spend_cap", "comment": "Lifetime spend cap for the campaign converted from microcurrency"}, "status": {"type": "text", "index": 12, "name": "status", "comment": "Campaign status (ACTIVE, PAUSED)"}, "objective": {"type": "text", "index": 13, "name": "objective", "comment": "Objective of the Campaign (BRAND_AWARENESS (default), APP_CONVERSION, APP_INSTALL, etc)"}, "is_most_recent_record": {"type": "boolean", "index": 14, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_history"}, "model.snapchat_ads.stg_snapchat_ads__campaign_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "ad_account_id": {"type": "text", "index": 2, "name": "ad_account_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_history_tmp"}, "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_hourly_report", "database": "postgres", "comment": "Each record in this table represents a historic version of an ad in Snapchat.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_id": {"type": "text", "index": 2, "name": "campaign_id", "comment": "ID of campaign"}, "date_hour": {"type": "timestamp without time zone", "index": 3, "name": "date_hour", "comment": "The hour that the report relates to."}, "attachment_quartile_1": {"type": "integer", "index": 4, "name": "attachment_quartile_1", "comment": "Number of times your Long Form Video was viewed to 25%"}, "attachment_quartile_2": {"type": "integer", "index": 5, "name": "attachment_quartile_2", "comment": "Number of times your Long Form Video was viewed to 50%"}, "attachment_quartile_3": {"type": "integer", "index": 6, "name": "attachment_quartile_3", "comment": "Number of times your Long Form Video was viewed to 75%"}, "attachment_total_view_time": {"type": "numeric", "index": 7, "name": "attachment_total_view_time", "comment": "Total time Snapchatters spent on the attachment (HH:MM:SS)"}, "attachment_view_completion": {"type": "integer", "index": 8, "name": "attachment_view_completion", "comment": "The number of times your Long Form Video was viewed to completion (97% )"}, "quartile_1": {"type": "integer", "index": 9, "name": "quartile_1", "comment": "The number of times your video was viewed to 25%"}, "quartile_2": {"type": "integer", "index": 10, "name": "quartile_2", "comment": "The number of times your video was viewed to 50%"}, "quartile_3": {"type": "integer", "index": 11, "name": "quartile_3", "comment": "The number of times your video was viewed to 75%"}, "saves": {"type": "integer", "index": 12, "name": "saves", "comment": "Number of times components of the campaign were saved to Memories"}, "shares": {"type": "integer", "index": 13, "name": "shares", "comment": "Number of times components of the campaign were shared in a Chat or Story"}, "screen_time": {"type": "numeric", "index": 14, "name": "screen_time", "comment": "The number of seconds spent watching your campaign across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts"}, "video_views": {"type": "integer", "index": 15, "name": "video_views", "comment": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first"}, "view_completion": {"type": "integer", "index": 16, "name": "view_completion", "comment": "The number of times your video was viewed to completion (97% )"}, "view_time": {"type": "numeric", "index": 17, "name": "view_time", "comment": "The number of seconds spent watching your campaign across all users reached."}, "impressions": {"type": "integer", "index": 18, "name": "impressions", "comment": "The number of impressions for a campaign in the hour of the record."}, "spend": {"type": "numeric", "index": 19, "name": "spend", "comment": "The amount of spend for a campaign in the hour of the record."}, "swipes": {"type": "integer", "index": 20, "name": "swipes", "comment": "The number of swipes for a campaign in the hour of the record. Swipes are when your ad was swiped up on or the CTA was tapped to view the attachment below."}, "conversion_purchases_value": {"type": "double precision", "index": 21, "name": "conversion_purchases_value", "comment": "The total value of purchases attributed to a campaign in the hour of the record (in Ad Account's currency, converted from microcurrency)."}, "conversion_purchases": {"type": "bigint", "index": 22, "name": "conversion_purchases", "comment": "The total number of purchases attributed to a campaign for the day of the record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report"}, "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_hourly_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "text", "index": 1, "name": "campaign_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "android_installs": {"type": "integer", "index": 4, "name": "android_installs", "comment": null}, "attachment_avg_view_time_millis": {"type": "integer", "index": 5, "name": "attachment_avg_view_time_millis", "comment": null}, "attachment_quartile_1": {"type": "integer", "index": 6, "name": "attachment_quartile_1", "comment": null}, "attachment_quartile_2": {"type": "integer", "index": 7, "name": "attachment_quartile_2", "comment": null}, "attachment_quartile_3": {"type": "integer", "index": 8, "name": "attachment_quartile_3", "comment": null}, "attachment_total_view_time_millis": {"type": "integer", "index": 9, "name": "attachment_total_view_time_millis", "comment": null}, "attachment_view_completion": {"type": "integer", "index": 10, "name": "attachment_view_completion", "comment": null}, "avg_screen_time_millis": {"type": "integer", "index": 11, "name": "avg_screen_time_millis", "comment": null}, "avg_view_time_millis": {"type": "integer", "index": 12, "name": "avg_view_time_millis", "comment": null}, "conversion_add_billing": {"type": "integer", "index": 13, "name": "conversion_add_billing", "comment": null}, "conversion_add_cart": {"type": "integer", "index": 14, "name": "conversion_add_cart", "comment": null}, "conversion_app_opens": {"type": "integer", "index": 15, "name": "conversion_app_opens", "comment": null}, "conversion_level_completes": {"type": "integer", "index": 16, "name": "conversion_level_completes", "comment": null}, "conversion_page_views": {"type": "integer", "index": 17, "name": "conversion_page_views", "comment": null}, "conversion_purchases": {"type": "integer", "index": 18, "name": "conversion_purchases", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 19, "name": "conversion_purchases_value", "comment": null}, "conversion_save": {"type": "integer", "index": 20, "name": "conversion_save", "comment": null}, "conversion_searches": {"type": "integer", "index": 21, "name": "conversion_searches", "comment": null}, "conversion_sign_ups": {"type": "integer", "index": 22, "name": "conversion_sign_ups", "comment": null}, "conversion_start_checkout": {"type": "integer", "index": 23, "name": "conversion_start_checkout", "comment": null}, "conversion_view_content": {"type": "integer", "index": 24, "name": "conversion_view_content", "comment": null}, "impressions": {"type": "integer", "index": 25, "name": "impressions", "comment": null}, "ios_installs": {"type": "integer", "index": 26, "name": "ios_installs", "comment": null}, "quartile_1": {"type": "integer", "index": 27, "name": "quartile_1", "comment": null}, "quartile_2": {"type": "integer", "index": 28, "name": "quartile_2", "comment": null}, "quartile_3": {"type": "integer", "index": 29, "name": "quartile_3", "comment": null}, "saves": {"type": "integer", "index": 30, "name": "saves", "comment": null}, "screen_time_millis": {"type": "integer", "index": 31, "name": "screen_time_millis", "comment": null}, "shares": {"type": "integer", "index": 32, "name": "shares", "comment": null}, "spend": {"type": "integer", "index": 33, "name": "spend", "comment": null}, "story_completes": {"type": "integer", "index": 34, "name": "story_completes", "comment": null}, "story_opens": {"type": "integer", "index": 35, "name": "story_opens", "comment": null}, "swipe_up_percent": {"type": "integer", "index": 36, "name": "swipe_up_percent", "comment": null}, "swipes": {"type": "integer", "index": 37, "name": "swipes", "comment": null}, "total_installs": {"type": "integer", "index": 38, "name": "total_installs", "comment": null}, "video_views": {"type": "integer", "index": 39, "name": "video_views", "comment": null}, "view_completion": {"type": "integer", "index": 40, "name": "view_completion", "comment": null}, "view_time_millis": {"type": "integer", "index": 41, "name": "view_time_millis", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report_tmp"}, "model.snapchat_ads.stg_snapchat_ads__creative_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__creative_history", "database": "postgres", "comment": "Each record in this table represents a historic version of a creative in Snapchat.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "creative_id": {"type": "text", "index": 2, "name": "creative_id", "comment": "The ID of the creative in Snapchat."}, "created_at": {"type": "timestamp without time zone", "index": 3, "name": "created_at", "comment": "Created at timestamp."}, "ad_account_id": {"type": "text", "index": 4, "name": "ad_account_id", "comment": "The ID of the related ad account in Snapchat."}, "creative_name": {"type": "text", "index": 5, "name": "creative_name", "comment": "The name of the creative in Snapchat."}, "url": {"type": "text", "index": 6, "name": "url", "comment": "The URL of the creative if the creative is of type 'web view'."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": "When the record was last synced by Fivetran."}, "updated_at": {"type": "timestamp without time zone", "index": 8, "name": "updated_at", "comment": "Timestamp of when the record was updated."}, "is_most_recent_record": {"type": "boolean", "index": 9, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__creative_history"}, "model.snapchat_ads.stg_snapchat_ads__creative_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__creative_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "ad_account_id": {"type": "text", "index": 2, "name": "ad_account_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "web_view_url": {"type": "text", "index": 4, "name": "web_view_url", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__creative_history_tmp"}, "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__creative_url_tag_history", "database": "postgres", "comment": "Each record in this table represents a URL paramter key-value pair for a creative in Snapchat.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "creative_id": {"type": "text", "index": 2, "name": "creative_id", "comment": "The ID of the related creative in Snapchat."}, "param_key": {"type": "text", "index": 3, "name": "param_key", "comment": "The URL parameter key, i.e. UTM_SOURCE."}, "param_value": {"type": "text", "index": 4, "name": "param_value", "comment": "The URL parameter value, i.e. Snapchat."}, "updated_at": {"type": "timestamp without time zone", "index": 5, "name": "updated_at", "comment": "Timestamp of when the record was updated."}, "is_most_recent_record": {"type": "boolean", "index": 6, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history"}, "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__creative_url_tag_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"creative_id": {"type": "text", "index": 1, "name": "creative_id", "comment": null}, "key": {"type": "text", "index": 2, "name": "key", "comment": null}, "value": {"type": "text", "index": 3, "name": "value", "comment": null}, "updated_at": {"type": "text", "index": 4, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history_tmp"}, "model.tiktok_ads.stg_tiktok_ads__ad_group_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_group_history", "database": "postgres", "comment": "Each record represents data for each ad group.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_group_id": {"type": "integer", "index": 2, "name": "ad_group_id", "comment": "Ad group ID"}, "updated_at": {"type": "timestamp without time zone", "index": 3, "name": "updated_at", "comment": "Time the record was updated."}, "advertiser_id": {"type": "integer", "index": 4, "name": "advertiser_id", "comment": "Advertiser ID"}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": "The Ad group's campaign ID."}, "action_days": {"type": "integer", "index": 6, "name": "action_days", "comment": "Action days"}, "action_categories": {"type": "text", "index": 7, "name": "action_categories", "comment": "IDs of the action categories (behaviors) that you want to target."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "Ad group name. Character limit is 512 and cannot contain emoji."}, "age_groups": {"type": "text", "index": 9, "name": "age_groups", "comment": "Age groups you want to target."}, "audience_type": {"type": "integer", "index": 10, "name": "audience_type", "comment": "Audience Type"}, "budget": {"type": "integer", "index": 11, "name": "budget", "comment": "Ad budget. Returns 0.0 when Campaign Budget Optimization (budget_optimize_switch) is on."}, "category": {"type": "integer", "index": 12, "name": "category", "comment": "Ad group category."}, "display_name": {"type": "integer", "index": 13, "name": "display_name", "comment": "Display name of ad group."}, "interest_category": {"type": "text", "index": 14, "name": "interest_category", "comment": "Interest classification. If the interest is specified, users that do not meet interest target will be excluded during delivery."}, "frequency": {"type": "integer", "index": 15, "name": "frequency", "comment": "frequency, together with frequency_schedule, controls how often people see your ad (only available for REACH ads). For example, frequency = 2 frequency_schedule = 3 means \"show ads no more than twice every 3 day\".\n"}, "frequency_schedule": {"type": "integer", "index": 16, "name": "frequency_schedule", "comment": "frequency, together with frequency, controls how often people see your ad (only available for REACH ads)."}, "gender": {"type": "text", "index": 17, "name": "gender", "comment": "Gender that you want to target."}, "languages": {"type": "text", "index": 18, "name": "languages", "comment": "Codes of the languages that you want to target."}, "landing_page_url": {"type": "integer", "index": 19, "name": "landing_page_url", "comment": "Landing page URL."}, "is_most_recent_record": {"type": "boolean", "index": 20, "name": "is_most_recent_record", "comment": "Whether record is the most recent one for this particular grain."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_group_history"}, "model.tiktok_ads.stg_tiktok_ads__ad_group_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_group_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"adgroup_id": {"type": "integer", "index": 1, "name": "adgroup_id", "comment": null}, "updated_at": {"type": "text", "index": 2, "name": "updated_at", "comment": null}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "create_time": {"type": "text", "index": 5, "name": "create_time", "comment": null}, "adgroup_name": {"type": "text", "index": 6, "name": "adgroup_name", "comment": null}, "placement_type": {"type": "text", "index": 7, "name": "placement_type", "comment": null}, "profile_image": {"type": "integer", "index": 8, "name": "profile_image", "comment": null}, "landing_page_url": {"type": "integer", "index": 9, "name": "landing_page_url", "comment": null}, "display_name": {"type": "integer", "index": 10, "name": "display_name", "comment": null}, "app_type": {"type": "integer", "index": 11, "name": "app_type", "comment": null}, "app_download_url": {"type": "integer", "index": 12, "name": "app_download_url", "comment": null}, "app_name": {"type": "integer", "index": 13, "name": "app_name", "comment": null}, "optimization_event": {"type": "text", "index": 14, "name": "optimization_event", "comment": null}, "secondary_optimization_event": {"type": "integer", "index": 15, "name": "secondary_optimization_event", "comment": null}, "creative_material_mode": {"type": "text", "index": 16, "name": "creative_material_mode", "comment": null}, "audience_type": {"type": "integer", "index": 17, "name": "audience_type", "comment": null}, "gender": {"type": "text", "index": 18, "name": "gender", "comment": null}, "min_android_version": {"type": "integer", "index": 19, "name": "min_android_version", "comment": null}, "min_ios_version": {"type": "integer", "index": 20, "name": "min_ios_version", "comment": null}, "budget_mode": {"type": "text", "index": 21, "name": "budget_mode", "comment": null}, "schedule_type": {"type": "text", "index": 22, "name": "schedule_type", "comment": null}, "dayparting": {"type": "integer", "index": 23, "name": "dayparting", "comment": null}, "optimization_goal": {"type": "text", "index": 24, "name": "optimization_goal", "comment": null}, "cpv_video_duration": {"type": "integer", "index": 25, "name": "cpv_video_duration", "comment": null}, "pacing": {"type": "text", "index": 26, "name": "pacing", "comment": null}, "billing_event": {"type": "text", "index": 27, "name": "billing_event", "comment": null}, "bid_type": {"type": "text", "index": 28, "name": "bid_type", "comment": null}, "deep_bid_type": {"type": "integer", "index": 29, "name": "deep_bid_type", "comment": null}, "impression_tracking_url": {"type": "integer", "index": 30, "name": "impression_tracking_url", "comment": null}, "click_tracking_url": {"type": "integer", "index": 31, "name": "click_tracking_url", "comment": null}, "secondary_status": {"type": "text", "index": 32, "name": "secondary_status", "comment": null}, "operation_status": {"type": "text", "index": 33, "name": "operation_status", "comment": null}, "statistic_type": {"type": "integer", "index": 34, "name": "statistic_type", "comment": null}, "video_download": {"type": "text", "index": 35, "name": "video_download", "comment": null}, "open_url": {"type": "integer", "index": 36, "name": "open_url", "comment": null}, "open_url_type": {"type": "integer", "index": 37, "name": "open_url_type", "comment": null}, "fallback_type": {"type": "integer", "index": 38, "name": "fallback_type", "comment": null}, "budget": {"type": "integer", "index": 39, "name": "budget", "comment": null}, "bid_price": {"type": "integer", "index": 40, "name": "bid_price", "comment": null}, "conversion_bid_price": {"type": "integer", "index": 41, "name": "conversion_bid_price", "comment": null}, "deep_cpa_bid": {"type": "integer", "index": 42, "name": "deep_cpa_bid", "comment": null}, "schedule_start_time": {"type": "text", "index": 43, "name": "schedule_start_time", "comment": null}, "schedule_end_time": {"type": "text", "index": 44, "name": "schedule_end_time", "comment": null}, "app_id": {"type": "integer", "index": 45, "name": "app_id", "comment": null}, "pixel_id": {"type": "integer", "index": 46, "name": "pixel_id", "comment": null}, "inventory_filter_enabled": {"type": "boolean", "index": 47, "name": "inventory_filter_enabled", "comment": null}, "is_hfss": {"type": "boolean", "index": 48, "name": "is_hfss", "comment": null}, "is_new_structure": {"type": "boolean", "index": 49, "name": "is_new_structure", "comment": null}, "category": {"type": "integer", "index": 50, "name": "category", "comment": null}, "is_comment_disable": {"type": "integer", "index": 51, "name": "is_comment_disable", "comment": null}, "skip_learning_phase": {"type": "integer", "index": 52, "name": "skip_learning_phase", "comment": null}, "frequency": {"type": "integer", "index": 53, "name": "frequency", "comment": null}, "frequency_schedule": {"type": "integer", "index": 54, "name": "frequency_schedule", "comment": null}, "action_days": {"type": "integer", "index": 55, "name": "action_days", "comment": null}, "audience": {"type": "text", "index": 56, "name": "audience", "comment": null}, "excluded_audience": {"type": "text", "index": 57, "name": "excluded_audience", "comment": null}, "location": {"type": "text", "index": 58, "name": "location", "comment": null}, "interest_category_v_2": {"type": "text", "index": 59, "name": "interest_category_v_2", "comment": null}, "pangle_block_app_list_id": {"type": "text", "index": 60, "name": "pangle_block_app_list_id", "comment": null}, "action_categories": {"type": "text", "index": 61, "name": "action_categories", "comment": null}, "placements": {"type": "text", "index": 62, "name": "placements", "comment": null}, "keywords": {"type": "integer", "index": 63, "name": "keywords", "comment": null}, "age_groups": {"type": "text", "index": 64, "name": "age_groups", "comment": null}, "languages": {"type": "text", "index": 65, "name": "languages", "comment": null}, "operating_systems": {"type": "text", "index": 66, "name": "operating_systems", "comment": null}, "network_types": {"type": "text", "index": 67, "name": "network_types", "comment": null}, "carriers": {"type": "text", "index": 68, "name": "carriers", "comment": null}, "video_actions": {"type": "text", "index": 69, "name": "video_actions", "comment": null}, "package": {"type": "integer", "index": 70, "name": "package", "comment": null}, "_fivetran_synced": {"type": "text", "index": 71, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_group_history_tmp"}, "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_group_report_hourly", "database": "postgres", "comment": "Each record represents data for each ad group for each hour.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_group_id": {"type": "integer", "index": 2, "name": "ad_group_id", "comment": "Ad group id"}, "stat_time_hour": {"type": "timestamp without time zone", "index": 3, "name": "stat_time_hour", "comment": "Hour of activity"}, "cpc": {"type": "double precision", "index": 4, "name": "cpc", "comment": "The average amount of money you've spent on a click."}, "cpm": {"type": "double precision", "index": 5, "name": "cpm", "comment": "The average amount of money you've spent per 1,000 impressions."}, "ctr": {"type": "double precision", "index": 6, "name": "ctr", "comment": "The percentage of times people saw your ad and performed a click."}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": "The number of times your ads were on screen."}, "clicks": {"type": "integer", "index": 8, "name": "clicks", "comment": "The number of clicks on your ads."}, "spend": {"type": "double precision", "index": 9, "name": "spend", "comment": "The estimated total amount of money you've spent on your campaign, ad group or ad during its schedule."}, "reach": {"type": "integer", "index": 10, "name": "reach", "comment": "The number of unique users who saw your ads at least once. This metric is estimated."}, "conversion": {"type": "integer", "index": 11, "name": "conversion", "comment": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n"}, "cost_per_conversion": {"type": "double precision", "index": 12, "name": "cost_per_conversion", "comment": "The average amount of money you've spent on a conversion. (The total count is calculated based on the time each ad impression occurred.)\n"}, "conversion_rate": {"type": "integer", "index": 13, "name": "conversion_rate", "comment": "The percentage of results you received out of all the clicks of your ads. (The total count is calculated based on the time each ad impression occurred.)\n"}, "likes": {"type": "integer", "index": 14, "name": "likes", "comment": "The number of likes your video creative received within 1 day of a user seeing a paid ad."}, "comments": {"type": "integer", "index": 15, "name": "comments", "comment": "The number of comments your video creative received within 1 day of a user seeing a paid ad."}, "shares": {"type": "integer", "index": 16, "name": "shares", "comment": "The number of shares your video creative received within 1 day of a user seeing a paid ad."}, "profile_visits": {"type": "integer", "index": 17, "name": "profile_visits", "comment": "The number of profile visits the ad drove during the campaign. This metric is only for Boosted TikToks."}, "follows": {"type": "integer", "index": 18, "name": "follows", "comment": "The number of new followers that were gained within 1 day of a user seeing a paid ad. This metric is only for Boosted TikToks."}, "video_play_actions": {"type": "integer", "index": 19, "name": "video_play_actions", "comment": "The number of times your video starts to play. Replays will not be counted."}, "video_watched_2_s": {"type": "integer", "index": 20, "name": "video_watched_2_s", "comment": "The number of times your video played for at least 2 seconds. Replays will not be counted."}, "video_watched_6_s": {"type": "integer", "index": 21, "name": "video_watched_6_s", "comment": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted."}, "video_views_p_25": {"type": "integer", "index": 22, "name": "video_views_p_25", "comment": "The number of times your video was played at 25% of its length. Replays will not be counted."}, "video_views_p_50": {"type": "integer", "index": 23, "name": "video_views_p_50", "comment": "The number of times your video was played at 50% of its length. Replays will not be counted."}, "video_views_p_75": {"type": "integer", "index": 24, "name": "video_views_p_75", "comment": "The number of times your video was played at 75% of its length. Replays will not be counted."}, "average_video_play": {"type": "double precision", "index": 25, "name": "average_video_play", "comment": "The average time your video was played per single video view, including any time spent replaying the video."}, "average_video_play_per_user": {"type": "double precision", "index": 26, "name": "average_video_play_per_user", "comment": "The average time per user your video was played per single video view, including any time spent replaying the video."}, "real_time_conversion": {"type": "integer", "index": 27, "name": "real_time_conversion", "comment": "Number of times your ad resulted in the optimization event you selected."}, "total_purchase_value": {"type": "double precision", "index": 28, "name": "total_purchase_value", "comment": "The total value of purchase events that occurred in your app that were recorded by your measurement partner."}, "total_sales_lead_value": {"type": "double precision", "index": 29, "name": "total_sales_lead_value", "comment": "The monetary worth or potential value assigned to a lead generated through ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly"}, "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_group_report_hourly_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"adgroup_id": {"type": "integer", "index": 1, "name": "adgroup_id", "comment": null}, "stat_time_hour": {"type": "timestamp without time zone", "index": 2, "name": "stat_time_hour", "comment": null}, "cost_per_conversion": {"type": "double precision", "index": 3, "name": "cost_per_conversion", "comment": null}, "cpc": {"type": "double precision", "index": 4, "name": "cpc", "comment": null}, "video_play_actions": {"type": "integer", "index": 5, "name": "video_play_actions", "comment": null}, "conversion_rate": {"type": "integer", "index": 6, "name": "conversion_rate", "comment": null}, "video_views_p_75": {"type": "integer", "index": 7, "name": "video_views_p_75", "comment": null}, "result": {"type": "integer", "index": 8, "name": "result", "comment": null}, "video_views_p_50": {"type": "integer", "index": 9, "name": "video_views_p_50", "comment": null}, "impressions": {"type": "integer", "index": 10, "name": "impressions", "comment": null}, "comments": {"type": "integer", "index": 11, "name": "comments", "comment": null}, "real_time_cost_per_result": {"type": "double precision", "index": 12, "name": "real_time_cost_per_result", "comment": null}, "conversion": {"type": "integer", "index": 13, "name": "conversion", "comment": null}, "real_time_result": {"type": "integer", "index": 14, "name": "real_time_result", "comment": null}, "video_views_p_100": {"type": "integer", "index": 15, "name": "video_views_p_100", "comment": null}, "shares": {"type": "integer", "index": 16, "name": "shares", "comment": null}, "real_time_conversion_rate": {"type": "double precision", "index": 17, "name": "real_time_conversion_rate", "comment": null}, "cost_per_secondary_goal_result": {"type": "text", "index": 18, "name": "cost_per_secondary_goal_result", "comment": null}, "secondary_goal_result_rate": {"type": "text", "index": 19, "name": "secondary_goal_result_rate", "comment": null}, "clicks": {"type": "integer", "index": 20, "name": "clicks", "comment": null}, "cost_per_1000_reached": {"type": "double precision", "index": 21, "name": "cost_per_1000_reached", "comment": null}, "video_views_p_25": {"type": "integer", "index": 22, "name": "video_views_p_25", "comment": null}, "reach": {"type": "integer", "index": 23, "name": "reach", "comment": null}, "real_time_cost_per_conversion": {"type": "double precision", "index": 24, "name": "real_time_cost_per_conversion", "comment": null}, "profile_visits_rate": {"type": "integer", "index": 25, "name": "profile_visits_rate", "comment": null}, "average_video_play": {"type": "double precision", "index": 26, "name": "average_video_play", "comment": null}, "profile_visits": {"type": "integer", "index": 27, "name": "profile_visits", "comment": null}, "cpm": {"type": "double precision", "index": 28, "name": "cpm", "comment": null}, "ctr": {"type": "double precision", "index": 29, "name": "ctr", "comment": null}, "video_watched_2_s": {"type": "integer", "index": 30, "name": "video_watched_2_s", "comment": null}, "follows": {"type": "integer", "index": 31, "name": "follows", "comment": null}, "result_rate": {"type": "double precision", "index": 32, "name": "result_rate", "comment": null}, "video_watched_6_s": {"type": "integer", "index": 33, "name": "video_watched_6_s", "comment": null}, "secondary_goal_result": {"type": "text", "index": 34, "name": "secondary_goal_result", "comment": null}, "cost_per_result": {"type": "double precision", "index": 35, "name": "cost_per_result", "comment": null}, "average_video_play_per_user": {"type": "double precision", "index": 36, "name": "average_video_play_per_user", "comment": null}, "real_time_result_rate": {"type": "double precision", "index": 37, "name": "real_time_result_rate", "comment": null}, "spend": {"type": "double precision", "index": 38, "name": "spend", "comment": null}, "likes": {"type": "integer", "index": 39, "name": "likes", "comment": null}, "real_time_conversion": {"type": "integer", "index": 40, "name": "real_time_conversion", "comment": null}, "total_purchase_value": {"type": "double precision", "index": 41, "name": "total_purchase_value", "comment": null}, "total_sales_lead_value": {"type": "double precision", "index": 42, "name": "total_sales_lead_value", "comment": null}, "_fivetran_synced": {"type": "text", "index": 43, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly_tmp"}, "model.tiktok_ads.stg_tiktok_ads__ad_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_history", "database": "postgres", "comment": "Each record represents data for each ad.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_id": {"type": "integer", "index": 2, "name": "ad_id", "comment": "Ad ID"}, "updated_at": {"type": "timestamp without time zone", "index": 3, "name": "updated_at", "comment": "Time the record was updated."}, "ad_group_id": {"type": "integer", "index": 4, "name": "ad_group_id", "comment": "Ad group ID"}, "advertiser_id": {"type": "integer", "index": 5, "name": "advertiser_id", "comment": "Advertiser ID"}, "campaign_id": {"type": "integer", "index": 6, "name": "campaign_id", "comment": "Campaign ID"}, "ad_name": {"type": "text", "index": 7, "name": "ad_name", "comment": "Ad Name."}, "call_to_action": {"type": "text", "index": 8, "name": "call_to_action", "comment": "Call to action values."}, "click_tracking_url": {"type": "integer", "index": 9, "name": "click_tracking_url", "comment": "Click monitoring URL."}, "impression_tracking_url": {"type": "integer", "index": 10, "name": "impression_tracking_url", "comment": "Display monitoring URL."}, "base_url": {"type": "text", "index": 11, "name": "base_url", "comment": "The base URL of the ad, extracted from the `landing page url`."}, "url_host": {"type": "text", "index": 12, "name": "url_host", "comment": "The URL host of the ad, extracted from the `landing_page_url`."}, "url_path": {"type": "text", "index": 13, "name": "url_path", "comment": "The URL path of the ad, extracted from the `landing_page_url`."}, "utm_source": {"type": "text", "index": 14, "name": "utm_source", "comment": "The utm_source parameter of the ad, extracted from the `landing_page_url`."}, "utm_medium": {"type": "text", "index": 15, "name": "utm_medium", "comment": "The utm_medium parameter of the ad, extracted from the `landing_page_url`."}, "utm_campaign": {"type": "text", "index": 16, "name": "utm_campaign", "comment": "The utm_campaign parameter of the ad, extracted from the `landing_page_url`."}, "utm_content": {"type": "text", "index": 17, "name": "utm_content", "comment": "The utm_content parameter of the ad, extracted from the `landing_page_url`."}, "utm_term": {"type": "text", "index": 18, "name": "utm_term", "comment": "The utm_term parameter of the ad, extracted from the `landing_page_url`."}, "landing_page_url": {"type": "text", "index": 19, "name": "landing_page_url", "comment": "Landing page URL."}, "is_most_recent_record": {"type": "boolean", "index": 20, "name": "is_most_recent_record", "comment": "Whether record is the most recent one for this particular grain."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_history"}, "model.tiktok_ads.stg_tiktok_ads__ad_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "integer", "index": 1, "name": "ad_id", "comment": null}, "updated_at": {"type": "text", "index": 2, "name": "updated_at", "comment": null}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": null}, "adgroup_id": {"type": "integer", "index": 4, "name": "adgroup_id", "comment": null}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": null}, "create_time": {"type": "text", "index": 6, "name": "create_time", "comment": null}, "ad_name": {"type": "text", "index": 7, "name": "ad_name", "comment": null}, "call_to_action": {"type": "text", "index": 8, "name": "call_to_action", "comment": null}, "secondary_status": {"type": "text", "index": 9, "name": "secondary_status", "comment": null}, "operation_status": {"type": "text", "index": 10, "name": "operation_status", "comment": null}, "ad_text": {"type": "text", "index": 11, "name": "ad_text", "comment": null}, "video_id": {"type": "text", "index": 12, "name": "video_id", "comment": null}, "app_name": {"type": "integer", "index": 13, "name": "app_name", "comment": null}, "deeplink": {"type": "integer", "index": 14, "name": "deeplink", "comment": null}, "landing_page_url": {"type": "text", "index": 15, "name": "landing_page_url", "comment": null}, "display_name": {"type": "text", "index": 16, "name": "display_name", "comment": null}, "profile_image_url": {"type": "integer", "index": 17, "name": "profile_image_url", "comment": null}, "impression_tracking_url": {"type": "integer", "index": 18, "name": "impression_tracking_url", "comment": null}, "click_tracking_url": {"type": "integer", "index": 19, "name": "click_tracking_url", "comment": null}, "playable_url": {"type": "integer", "index": 20, "name": "playable_url", "comment": null}, "is_aco": {"type": "boolean", "index": 21, "name": "is_aco", "comment": null}, "creative_authorized": {"type": "boolean", "index": 22, "name": "creative_authorized", "comment": null}, "is_new_structure": {"type": "boolean", "index": 23, "name": "is_new_structure", "comment": null}, "image_ids": {"type": "text", "index": 24, "name": "image_ids", "comment": null}, "_fivetran_synced": {"type": "text", "index": 25, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_history_tmp"}, "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_report_hourly", "database": "postgres", "comment": "Each record represents data for each ad for each hour.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_id": {"type": "integer", "index": 2, "name": "ad_id", "comment": "Ad id"}, "stat_time_hour": {"type": "timestamp without time zone", "index": 3, "name": "stat_time_hour", "comment": "Hour of activity"}, "cpc": {"type": "double precision", "index": 4, "name": "cpc", "comment": "The average amount of money you've spent on a click."}, "cpm": {"type": "double precision", "index": 5, "name": "cpm", "comment": "The average amount of money you've spent per 1,000 impressions."}, "ctr": {"type": "double precision", "index": 6, "name": "ctr", "comment": "The percentage of times people saw your ad and performed a click."}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": "The number of times your ads were on screen."}, "clicks": {"type": "integer", "index": 8, "name": "clicks", "comment": "The number of clicks on your ads."}, "spend": {"type": "double precision", "index": 9, "name": "spend", "comment": "The estimated total amount of money you've spent on your campaign, ad group or ad during its schedule."}, "reach": {"type": "integer", "index": 10, "name": "reach", "comment": "The number of unique users who saw your ads at least once. This metric is estimated."}, "conversion": {"type": "integer", "index": 11, "name": "conversion", "comment": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n"}, "cost_per_conversion": {"type": "double precision", "index": 12, "name": "cost_per_conversion", "comment": "The average amount of money you've spent on a conversion. (The total count is calculated based on the time each ad impression occurred.)\n"}, "conversion_rate": {"type": "integer", "index": 13, "name": "conversion_rate", "comment": "The percentage of results you received out of all the clicks of your ads. (The total count is calculated based on the time each ad impression occurred.)\n"}, "likes": {"type": "integer", "index": 14, "name": "likes", "comment": "The number of likes your video creative received within 1 day of a user seeing a paid ad."}, "comments": {"type": "integer", "index": 15, "name": "comments", "comment": "The number of comments your video creative received within 1 day of a user seeing a paid ad."}, "shares": {"type": "integer", "index": 16, "name": "shares", "comment": "The number of shares your video creative received within 1 day of a user seeing a paid ad."}, "profile_visits": {"type": "integer", "index": 17, "name": "profile_visits", "comment": "The number of profile visits the ad drove during the campaign. This metric is only for Boosted TikToks."}, "follows": {"type": "integer", "index": 18, "name": "follows", "comment": "The number of new followers that were gained within 1 day of a user seeing a paid ad. This metric is only for Boosted TikToks."}, "video_play_actions": {"type": "integer", "index": 19, "name": "video_play_actions", "comment": "The number of times your video starts to play. Replays will not be counted."}, "video_watched_2_s": {"type": "integer", "index": 20, "name": "video_watched_2_s", "comment": "The number of times your video played for at least 2 seconds. Replays will not be counted."}, "video_watched_6_s": {"type": "integer", "index": 21, "name": "video_watched_6_s", "comment": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted."}, "video_views_p_25": {"type": "integer", "index": 22, "name": "video_views_p_25", "comment": "The number of times your video was played at 25% of its length. Replays will not be counted."}, "video_views_p_50": {"type": "integer", "index": 23, "name": "video_views_p_50", "comment": "The number of times your video was played at 50% of its length. Replays will not be counted."}, "video_views_p_75": {"type": "integer", "index": 24, "name": "video_views_p_75", "comment": "The number of times your video was played at 75% of its length. Replays will not be counted."}, "average_video_play": {"type": "double precision", "index": 25, "name": "average_video_play", "comment": "The average time your video was played per single video view, including any time spent replaying the video."}, "average_video_play_per_user": {"type": "integer", "index": 26, "name": "average_video_play_per_user", "comment": "The average time per user your video was played per single video view, including any time spent replaying the video."}, "real_time_conversion": {"type": "integer", "index": 27, "name": "real_time_conversion", "comment": "Number of times your ad resulted in the optimization event you selected."}, "total_purchase_value": {"type": "double precision", "index": 28, "name": "total_purchase_value", "comment": "The total value of purchase events that occurred in your app that were recorded by your measurement partner."}, "total_sales_lead_value": {"type": "double precision", "index": 29, "name": "total_sales_lead_value", "comment": "The monetary worth or potential value assigned to a lead generated through ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly"}, "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_report_hourly_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "integer", "index": 1, "name": "ad_id", "comment": null}, "stat_time_hour": {"type": "timestamp without time zone", "index": 2, "name": "stat_time_hour", "comment": null}, "cost_per_conversion": {"type": "double precision", "index": 3, "name": "cost_per_conversion", "comment": null}, "cpc": {"type": "double precision", "index": 4, "name": "cpc", "comment": null}, "video_play_actions": {"type": "integer", "index": 5, "name": "video_play_actions", "comment": null}, "conversion_rate": {"type": "integer", "index": 6, "name": "conversion_rate", "comment": null}, "video_views_p_75": {"type": "integer", "index": 7, "name": "video_views_p_75", "comment": null}, "result": {"type": "integer", "index": 8, "name": "result", "comment": null}, "video_views_p_50": {"type": "integer", "index": 9, "name": "video_views_p_50", "comment": null}, "impressions": {"type": "integer", "index": 10, "name": "impressions", "comment": null}, "comments": {"type": "integer", "index": 11, "name": "comments", "comment": null}, "real_time_cost_per_result": {"type": "double precision", "index": 12, "name": "real_time_cost_per_result", "comment": null}, "conversion": {"type": "integer", "index": 13, "name": "conversion", "comment": null}, "real_time_result": {"type": "integer", "index": 14, "name": "real_time_result", "comment": null}, "video_views_p_100": {"type": "integer", "index": 15, "name": "video_views_p_100", "comment": null}, "shares": {"type": "integer", "index": 16, "name": "shares", "comment": null}, "real_time_conversion_rate": {"type": "integer", "index": 17, "name": "real_time_conversion_rate", "comment": null}, "cost_per_secondary_goal_result": {"type": "text", "index": 18, "name": "cost_per_secondary_goal_result", "comment": null}, "secondary_goal_result_rate": {"type": "text", "index": 19, "name": "secondary_goal_result_rate", "comment": null}, "clicks": {"type": "integer", "index": 20, "name": "clicks", "comment": null}, "cost_per_1000_reached": {"type": "integer", "index": 21, "name": "cost_per_1000_reached", "comment": null}, "video_views_p_25": {"type": "integer", "index": 22, "name": "video_views_p_25", "comment": null}, "reach": {"type": "integer", "index": 23, "name": "reach", "comment": null}, "real_time_cost_per_conversion": {"type": "double precision", "index": 24, "name": "real_time_cost_per_conversion", "comment": null}, "profile_visits_rate": {"type": "integer", "index": 25, "name": "profile_visits_rate", "comment": null}, "average_video_play": {"type": "double precision", "index": 26, "name": "average_video_play", "comment": null}, "profile_visits": {"type": "integer", "index": 27, "name": "profile_visits", "comment": null}, "cpm": {"type": "double precision", "index": 28, "name": "cpm", "comment": null}, "ctr": {"type": "double precision", "index": 29, "name": "ctr", "comment": null}, "video_watched_2_s": {"type": "integer", "index": 30, "name": "video_watched_2_s", "comment": null}, "follows": {"type": "integer", "index": 31, "name": "follows", "comment": null}, "result_rate": {"type": "integer", "index": 32, "name": "result_rate", "comment": null}, "video_watched_6_s": {"type": "integer", "index": 33, "name": "video_watched_6_s", "comment": null}, "secondary_goal_result": {"type": "text", "index": 34, "name": "secondary_goal_result", "comment": null}, "cost_per_result": {"type": "double precision", "index": 35, "name": "cost_per_result", "comment": null}, "average_video_play_per_user": {"type": "integer", "index": 36, "name": "average_video_play_per_user", "comment": null}, "real_time_result_rate": {"type": "integer", "index": 37, "name": "real_time_result_rate", "comment": null}, "spend": {"type": "double precision", "index": 38, "name": "spend", "comment": null}, "likes": {"type": "integer", "index": 39, "name": "likes", "comment": null}, "real_time_conversion": {"type": "integer", "index": 40, "name": "real_time_conversion", "comment": null}, "total_purchase_value": {"type": "double precision", "index": 41, "name": "total_purchase_value", "comment": null}, "total_sales_lead_value": {"type": "double precision", "index": 42, "name": "total_sales_lead_value", "comment": null}, "_fivetran_synced": {"type": "text", "index": 43, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly_tmp"}, "model.tiktok_ads.stg_tiktok_ads__advertiser": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__advertiser", "database": "postgres", "comment": "Each record represents data for each advertiser.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "advertiser_id": {"type": "integer", "index": 2, "name": "advertiser_id", "comment": "Advertiser ID"}, "address": {"type": "text", "index": 3, "name": "address", "comment": "Advertiser address information"}, "balance": {"type": "double precision", "index": 4, "name": "balance", "comment": "Account available balance"}, "company": {"type": "text", "index": 5, "name": "company", "comment": "Advertiser's company name"}, "contacter": {"type": "integer", "index": 6, "name": "contacter", "comment": "Contact Person"}, "country": {"type": "text", "index": 7, "name": "country", "comment": "The advertiser's country"}, "currency": {"type": "text", "index": 8, "name": "currency", "comment": "Type of currency used by advertisers"}, "description": {"type": "text", "index": 9, "name": "description", "comment": "Brand description, i.e. promotional content"}, "email": {"type": "text", "index": 10, "name": "email", "comment": "Advertiser contact email, desensitised data"}, "industry": {"type": "integer", "index": 11, "name": "industry", "comment": "Advertiser industry category"}, "language": {"type": "text", "index": 12, "name": "language", "comment": "Language used by advertisers"}, "advertiser_name": {"type": "text", "index": 13, "name": "advertiser_name", "comment": "Advertiser name"}, "cellphone_number": {"type": "text", "index": 14, "name": "cellphone_number", "comment": "Contact mobile number, desensitised data"}, "telephone_number": {"type": "text", "index": 15, "name": "telephone_number", "comment": "Fixed phone number, desensitised data"}, "timezone": {"type": "text", "index": 16, "name": "timezone", "comment": "Ad account time zone including GMT offset"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__advertiser"}, "model.tiktok_ads.stg_tiktok_ads__advertiser_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__advertiser_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "address": {"type": "text", "index": 3, "name": "address", "comment": null}, "company": {"type": "text", "index": 4, "name": "company", "comment": null}, "contacter": {"type": "integer", "index": 5, "name": "contacter", "comment": null}, "country": {"type": "text", "index": 6, "name": "country", "comment": null}, "currency": {"type": "text", "index": 7, "name": "currency", "comment": null}, "description": {"type": "text", "index": 8, "name": "description", "comment": null}, "email": {"type": "text", "index": 9, "name": "email", "comment": null}, "industry": {"type": "integer", "index": 10, "name": "industry", "comment": null}, "license_no": {"type": "integer", "index": 11, "name": "license_no", "comment": null}, "license_url": {"type": "integer", "index": 12, "name": "license_url", "comment": null}, "promotion_area": {"type": "integer", "index": 13, "name": "promotion_area", "comment": null}, "rejected_reason": {"type": "integer", "index": 14, "name": "rejected_reason", "comment": null}, "role": {"type": "text", "index": 15, "name": "role", "comment": null}, "status": {"type": "text", "index": 16, "name": "status", "comment": null}, "telephone_number": {"type": "text", "index": 17, "name": "telephone_number", "comment": null}, "timezone": {"type": "text", "index": 18, "name": "timezone", "comment": null}, "balance": {"type": "double precision", "index": 19, "name": "balance", "comment": null}, "create_time": {"type": "text", "index": 20, "name": "create_time", "comment": null}, "language": {"type": "text", "index": 21, "name": "language", "comment": null}, "cellphone_number": {"type": "text", "index": 22, "name": "cellphone_number", "comment": null}, "_fivetran_synced": {"type": "text", "index": 23, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__advertiser_tmp"}, "model.tiktok_ads.stg_tiktok_ads__campaign_country_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__campaign_country_report", "database": "postgres", "comment": "Each record provides country-level reporting metrics at the campaign level.", "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": "Unique identifier of the campaign."}, "stat_time_day": {"type": "date", "index": 2, "name": "stat_time_day", "comment": "The reporting date for the campaign data (in YYYY-MM-DD format)."}, "country_code": {"type": "text", "index": 3, "name": "country_code", "comment": "Audience country or region code."}, "clicks": {"type": "integer", "index": 4, "name": "clicks", "comment": "Total number of times users clicked on ads within the campaign."}, "impressions": {"type": "integer", "index": 5, "name": "impressions", "comment": "Total number of times ads in the campaign were shown."}, "spend": {"type": "double precision", "index": 6, "name": "spend", "comment": "Total amount spent for the campaign in the account currency."}, "conversion": {"type": "integer", "index": 7, "name": "conversion", "comment": "Number of attributed conversions from ads in the campaign based on the TikTok attribution model."}, "conversion_rate": {"type": "double precision", "index": 8, "name": "conversion_rate", "comment": "Ratio of conversions to impressions, calculated as conversions divided by impressions."}, "cost_per_conversion": {"type": "double precision", "index": 9, "name": "cost_per_conversion", "comment": "Average cost per conversion, calculated as total spend divided by conversions."}, "cpc": {"type": "double precision", "index": 10, "name": "cpc", "comment": "Cost per click, calculated as spend divided by the number of clicks."}, "cpm": {"type": "double precision", "index": 11, "name": "cpm", "comment": "Cost per thousand impressions, calculated as (spend / impressions) * 1000."}, "ctr": {"type": "double precision", "index": 12, "name": "ctr", "comment": "Click-through rate, calculated as clicks divided by impressions."}, "real_time_conversion": {"type": "integer", "index": 13, "name": "real_time_conversion", "comment": "Number of real-time conversions tracked by TikTok."}, "source_relation": {"type": "text", "index": 14, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 15, "name": "_fivetran_synced", "comment": "Timestamp indicating when the record was last synced."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__campaign_country_report"}, "model.tiktok_ads.stg_tiktok_ads__campaign_country_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__campaign_country_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 3, "name": "clicks", "comment": null}, "conversion": {"type": "integer", "index": 4, "name": "conversion", "comment": null}, "conversion_rate": {"type": "double precision", "index": 5, "name": "conversion_rate", "comment": null}, "cost_per_conversion": {"type": "double precision", "index": 6, "name": "cost_per_conversion", "comment": null}, "country_code": {"type": "text", "index": 7, "name": "country_code", "comment": null}, "cpc": {"type": "double precision", "index": 8, "name": "cpc", "comment": null}, "cpm": {"type": "double precision", "index": 9, "name": "cpm", "comment": null}, "ctr": {"type": "double precision", "index": 10, "name": "ctr", "comment": null}, "impressions": {"type": "integer", "index": 11, "name": "impressions", "comment": null}, "real_time_conversion": {"type": "integer", "index": 12, "name": "real_time_conversion", "comment": null}, "spend": {"type": "double precision", "index": 13, "name": "spend", "comment": null}, "stat_time_day": {"type": "timestamp without time zone", "index": 14, "name": "stat_time_day", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__campaign_country_report_tmp"}, "model.tiktok_ads.stg_tiktok_ads__campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__campaign_history", "database": "postgres", "comment": "Each record represents data for each campaign.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": "Campaign ID"}, "updated_at": {"type": "timestamp without time zone", "index": 3, "name": "updated_at", "comment": "Time the record was updated."}, "advertiser_id": {"type": "integer", "index": 4, "name": "advertiser_id", "comment": "Advertiser ID"}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "Campaign name"}, "campaign_type": {"type": "text", "index": 6, "name": "campaign_type", "comment": "Campaign Type, indicates the campaign is a regular campaign or iOS 14 campaign."}, "split_test_variable": {"type": "text", "index": 7, "name": "split_test_variable", "comment": "Split Test variables. Optional values; TARGETING, BIDDING_OPTIMIZATION, CREATIVE."}, "objective_type": {"type": "text", "index": 8, "name": "objective_type", "comment": "Advertising objective."}, "status": {"type": "text", "index": 9, "name": "status", "comment": "Campaign status."}, "budget": {"type": "numeric(28,6)", "index": 10, "name": "budget", "comment": "Campaign budget"}, "budget_mode": {"type": "text", "index": 11, "name": "budget_mode", "comment": "Budget type"}, "created_at": {"type": "text", "index": 12, "name": "created_at", "comment": "Time at which the campaign was created."}, "is_new_structure": {"type": "boolean", "index": 13, "name": "is_new_structure", "comment": "Whether the campaign is a new structure (for the same campaign, the structure of campaign, adgroups and ads are the same)"}, "is_most_recent_record": {"type": "boolean", "index": 14, "name": "is_most_recent_record", "comment": "Whether record is the most recent one for this particular grain."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__campaign_history"}, "model.tiktok_ads.stg_tiktok_ads__campaign_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__campaign_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "integer", "index": 1, "name": "ad_id", "comment": null}, "updated_at": {"type": "text", "index": 2, "name": "updated_at", "comment": null}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": null}, "adgroup_id": {"type": "integer", "index": 4, "name": "adgroup_id", "comment": null}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": null}, "create_time": {"type": "text", "index": 6, "name": "create_time", "comment": null}, "ad_name": {"type": "text", "index": 7, "name": "ad_name", "comment": null}, "call_to_action": {"type": "text", "index": 8, "name": "call_to_action", "comment": null}, "secondary_status": {"type": "text", "index": 9, "name": "secondary_status", "comment": null}, "operation_status": {"type": "text", "index": 10, "name": "operation_status", "comment": null}, "ad_text": {"type": "text", "index": 11, "name": "ad_text", "comment": null}, "video_id": {"type": "text", "index": 12, "name": "video_id", "comment": null}, "app_name": {"type": "integer", "index": 13, "name": "app_name", "comment": null}, "deeplink": {"type": "integer", "index": 14, "name": "deeplink", "comment": null}, "landing_page_url": {"type": "text", "index": 15, "name": "landing_page_url", "comment": null}, "display_name": {"type": "text", "index": 16, "name": "display_name", "comment": null}, "profile_image_url": {"type": "integer", "index": 17, "name": "profile_image_url", "comment": null}, "impression_tracking_url": {"type": "integer", "index": 18, "name": "impression_tracking_url", "comment": null}, "click_tracking_url": {"type": "integer", "index": 19, "name": "click_tracking_url", "comment": null}, "playable_url": {"type": "integer", "index": 20, "name": "playable_url", "comment": null}, "is_aco": {"type": "boolean", "index": 21, "name": "is_aco", "comment": null}, "creative_authorized": {"type": "boolean", "index": 22, "name": "creative_authorized", "comment": null}, "is_new_structure": {"type": "boolean", "index": 23, "name": "is_new_structure", "comment": null}, "image_ids": {"type": "text", "index": 24, "name": "image_ids", "comment": null}, "_fivetran_synced": {"type": "text", "index": 25, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__campaign_history_tmp"}, "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__campaign_report_hourly", "database": "postgres", "comment": "Each record represent data for each campaign for each hour.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": "Campaign id"}, "stat_time_hour": {"type": "timestamp without time zone", "index": 3, "name": "stat_time_hour", "comment": "Hour of activity"}, "cpc": {"type": "double precision", "index": 4, "name": "cpc", "comment": "The average amount of money you've spent on a click."}, "cpm": {"type": "double precision", "index": 5, "name": "cpm", "comment": "The average amount of money you've spent per 1,000 impressions."}, "ctr": {"type": "double precision", "index": 6, "name": "ctr", "comment": "The percentage of times people saw your ad and performed a click."}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": "The number of times your ads were on screen."}, "clicks": {"type": "integer", "index": 8, "name": "clicks", "comment": "The number of clicks on your ads."}, "spend": {"type": "double precision", "index": 9, "name": "spend", "comment": "The estimated total amount of money you've spent on your campaign, ad group or ad during its schedule."}, "reach": {"type": "integer", "index": 10, "name": "reach", "comment": "The number of unique users who saw your ads at least once. This metric is estimated."}, "conversion": {"type": "integer", "index": 11, "name": "conversion", "comment": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n"}, "cost_per_conversion": {"type": "double precision", "index": 12, "name": "cost_per_conversion", "comment": "The average amount of money you've spent on a conversion. (The total count is calculated based on the time each ad impression occurred.)\n"}, "conversion_rate": {"type": "integer", "index": 13, "name": "conversion_rate", "comment": "The percentage of results you received out of all the clicks of your ads. (The total count is calculated based on the time each ad impression occurred.)\n"}, "likes": {"type": "integer", "index": 14, "name": "likes", "comment": "The number of likes your video creative received within 1 day of a user seeing a paid ad."}, "comments": {"type": "integer", "index": 15, "name": "comments", "comment": "The number of comments your video creative received within 1 day of a user seeing a paid ad."}, "shares": {"type": "integer", "index": 16, "name": "shares", "comment": "The number of shares your video creative received within 1 day of a user seeing a paid ad."}, "profile_visits": {"type": "integer", "index": 17, "name": "profile_visits", "comment": "The number of profile visits the ad drove during the campaign. This metric is only for Boosted TikToks."}, "follows": {"type": "integer", "index": 18, "name": "follows", "comment": "The number of new followers that were gained within 1 day of a user seeing a paid ad. This metric is only for Boosted TikToks."}, "video_play_actions": {"type": "integer", "index": 19, "name": "video_play_actions", "comment": "The number of times your video starts to play. Replays will not be counted."}, "video_watched_2_s": {"type": "integer", "index": 20, "name": "video_watched_2_s", "comment": "The number of times your video played for at least 2 seconds. Replays will not be counted."}, "video_watched_6_s": {"type": "integer", "index": 21, "name": "video_watched_6_s", "comment": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted."}, "video_views_p_25": {"type": "integer", "index": 22, "name": "video_views_p_25", "comment": "The number of times your video was played at 25% of its length. Replays will not be counted."}, "video_views_p_50": {"type": "integer", "index": 23, "name": "video_views_p_50", "comment": "The number of times your video was played at 50% of its length. Replays will not be counted."}, "video_views_p_75": {"type": "integer", "index": 24, "name": "video_views_p_75", "comment": "The number of times your video was played at 75% of its length. Replays will not be counted."}, "average_video_play": {"type": "double precision", "index": 25, "name": "average_video_play", "comment": "The average time your video was played per single video view, including any time spent replaying the video."}, "average_video_play_per_user": {"type": "double precision", "index": 26, "name": "average_video_play_per_user", "comment": "The average time per user your video was played per single video view, including any time spent replaying the video."}, "real_time_conversion": {"type": "integer", "index": 27, "name": "real_time_conversion", "comment": "Number of times your ad resulted in the optimization event you selected."}, "total_purchase_value": {"type": "double precision", "index": 28, "name": "total_purchase_value", "comment": "The total value of purchase events that occurred in your app that were recorded by your measurement partner."}, "total_sales_lead_value": {"type": "double precision", "index": 29, "name": "total_sales_lead_value", "comment": "The monetary worth or potential value assigned to a lead generated through ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly"}, "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__campaign_report_hourly_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "stat_time_hour": {"type": "timestamp without time zone", "index": 2, "name": "stat_time_hour", "comment": null}, "cost_per_conversion": {"type": "double precision", "index": 3, "name": "cost_per_conversion", "comment": null}, "cpc": {"type": "double precision", "index": 4, "name": "cpc", "comment": null}, "video_play_actions": {"type": "integer", "index": 5, "name": "video_play_actions", "comment": null}, "conversion_rate": {"type": "integer", "index": 6, "name": "conversion_rate", "comment": null}, "video_views_p_75": {"type": "integer", "index": 7, "name": "video_views_p_75", "comment": null}, "result": {"type": "integer", "index": 8, "name": "result", "comment": null}, "video_views_p_50": {"type": "integer", "index": 9, "name": "video_views_p_50", "comment": null}, "impressions": {"type": "integer", "index": 10, "name": "impressions", "comment": null}, "comments": {"type": "integer", "index": 11, "name": "comments", "comment": null}, "real_time_cost_per_result": {"type": "double precision", "index": 12, "name": "real_time_cost_per_result", "comment": null}, "conversion": {"type": "integer", "index": 13, "name": "conversion", "comment": null}, "real_time_result": {"type": "integer", "index": 14, "name": "real_time_result", "comment": null}, "video_views_p_100": {"type": "integer", "index": 15, "name": "video_views_p_100", "comment": null}, "shares": {"type": "integer", "index": 16, "name": "shares", "comment": null}, "real_time_conversion_rate": {"type": "double precision", "index": 17, "name": "real_time_conversion_rate", "comment": null}, "cost_per_secondary_goal_result": {"type": "text", "index": 18, "name": "cost_per_secondary_goal_result", "comment": null}, "secondary_goal_result_rate": {"type": "text", "index": 19, "name": "secondary_goal_result_rate", "comment": null}, "clicks": {"type": "integer", "index": 20, "name": "clicks", "comment": null}, "cost_per_1000_reached": {"type": "double precision", "index": 21, "name": "cost_per_1000_reached", "comment": null}, "video_views_p_25": {"type": "integer", "index": 22, "name": "video_views_p_25", "comment": null}, "reach": {"type": "integer", "index": 23, "name": "reach", "comment": null}, "real_time_cost_per_conversion": {"type": "double precision", "index": 24, "name": "real_time_cost_per_conversion", "comment": null}, "profile_visits_rate": {"type": "integer", "index": 25, "name": "profile_visits_rate", "comment": null}, "average_video_play": {"type": "double precision", "index": 26, "name": "average_video_play", "comment": null}, "profile_visits": {"type": "integer", "index": 27, "name": "profile_visits", "comment": null}, "cpm": {"type": "double precision", "index": 28, "name": "cpm", "comment": null}, "ctr": {"type": "double precision", "index": 29, "name": "ctr", "comment": null}, "video_watched_2_s": {"type": "integer", "index": 30, "name": "video_watched_2_s", "comment": null}, "follows": {"type": "integer", "index": 31, "name": "follows", "comment": null}, "result_rate": {"type": "double precision", "index": 32, "name": "result_rate", "comment": null}, "video_watched_6_s": {"type": "integer", "index": 33, "name": "video_watched_6_s", "comment": null}, "secondary_goal_result": {"type": "text", "index": 34, "name": "secondary_goal_result", "comment": null}, "cost_per_result": {"type": "double precision", "index": 35, "name": "cost_per_result", "comment": null}, "average_video_play_per_user": {"type": "double precision", "index": 36, "name": "average_video_play_per_user", "comment": null}, "real_time_result_rate": {"type": "double precision", "index": 37, "name": "real_time_result_rate", "comment": null}, "spend": {"type": "double precision", "index": 38, "name": "spend", "comment": null}, "likes": {"type": "integer", "index": 39, "name": "likes", "comment": null}, "real_time_conversion": {"type": "integer", "index": 40, "name": "real_time_conversion", "comment": null}, "total_purchase_value": {"type": "double precision", "index": 41, "name": "total_purchase_value", "comment": null}, "total_sales_lead_value": {"type": "double precision", "index": 42, "name": "total_sales_lead_value", "comment": null}, "_fivetran_synced": {"type": "text", "index": 43, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly_tmp"}, "model.tiktok_ads.stg_tiktok_ads__location": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__location", "database": "postgres", "comment": "Reference table of geographic regions and locations available for TikTok Ads targeting. Each record represents a location, such as a country, province, or city.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "location_id": {"type": "text", "index": 2, "name": "location_id", "comment": "Unique identifier for the geographic region."}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": "Advertiser ID associated with this location record."}, "country_code": {"type": "text", "index": 4, "name": "country_code", "comment": "Two-letter ISO country code for the location."}, "region_name": {"type": "text", "index": 5, "name": "region_name", "comment": "Human-readable name of the geographic region."}, "region_level": {"type": "text", "index": 6, "name": "region_level", "comment": "Reporting granularity of the location (e.g. COUNTRY, PROVINCE, CITY)."}, "area_type": {"type": "text", "index": 7, "name": "area_type", "comment": "Classification of the location, such as administrative region or media market."}, "parent_location_id": {"type": "text", "index": 8, "name": "parent_location_id", "comment": "Identifier of the parent region, enabling hierarchical rollups (city to state to country)."}, "has_support_below_18": {"type": "boolean", "index": 9, "name": "has_support_below_18", "comment": "Whether the location supports targeting users under 18. Used for compliance with age-restricted ad targeting rules."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 10, "name": "_fivetran_synced", "comment": "Timestamp indicating when the record was last synced."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__location"}, "model.tiktok_ads.stg_tiktok_ads__location_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__location_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "advertiser_id": {"type": "integer", "index": 2, "name": "advertiser_id", "comment": null}, "area_type": {"type": "text", "index": 3, "name": "area_type", "comment": null}, "country_code": {"type": "text", "index": 4, "name": "country_code", "comment": null}, "parent_id": {"type": "text", "index": 5, "name": "parent_id", "comment": null}, "region_id": {"type": "text", "index": 6, "name": "region_id", "comment": null}, "region_level": {"type": "text", "index": 7, "name": "region_level", "comment": null}, "region_name": {"type": "text", "index": 8, "name": "region_name", "comment": null}, "support_below_18": {"type": "boolean", "index": 9, "name": "support_below_18", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__location_tmp"}, "model.twitter_ads.stg_twitter_ads__account_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__account_history", "database": "postgres", "comment": "Each record represents a version of each account. The versions can be differentiated by the updated_at timestamp.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "approval_status": {"type": "text", "index": 2, "name": "approval_status", "comment": "The approval status of the account."}, "business_id": {"type": "integer", "index": 3, "name": "business_id", "comment": "The ID of the related business."}, "business_name": {"type": "integer", "index": 4, "name": "business_name", "comment": "The name of the related business."}, "created_timestamp": {"type": "text", "index": 5, "name": "created_timestamp", "comment": "The timestamp the account was created."}, "is_deleted": {"type": "boolean", "index": 6, "name": "is_deleted", "comment": "Whether the record has been deleted or not."}, "account_id": {"type": "text", "index": 7, "name": "account_id", "comment": "The ID of the account."}, "industry_type": {"type": "integer", "index": 8, "name": "industry_type", "comment": "The industry of the accounts."}, "name": {"type": "character varying", "index": 9, "name": "name", "comment": "The name of the account."}, "salt": {"type": "integer", "index": 10, "name": "salt", "comment": "The random encryption key used to hash data."}, "timezone": {"type": "text", "index": 11, "name": "timezone", "comment": "The timezone the account is set to."}, "timezone_switched_timestamp": {"type": "text", "index": 12, "name": "timezone_switched_timestamp", "comment": "The timestamp the account's timezone was last changed."}, "updated_timestamp": {"type": "text", "index": 13, "name": "updated_timestamp", "comment": "The timestamp the account was last updated."}, "is_latest_version": {"type": "boolean", "index": 14, "name": "is_latest_version", "comment": "Whether the record is the most latest version for the account"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__account_history"}, "model.twitter_ads.stg_twitter_ads__account_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__account_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "approval_status": {"type": "text", "index": 2, "name": "approval_status", "comment": null}, "business_id": {"type": "integer", "index": 3, "name": "business_id", "comment": null}, "business_name": {"type": "integer", "index": 4, "name": "business_name", "comment": null}, "created_at": {"type": "text", "index": 5, "name": "created_at", "comment": null}, "deleted": {"type": "boolean", "index": 6, "name": "deleted", "comment": null}, "id": {"type": "text", "index": 7, "name": "id", "comment": null}, "industry_type": {"type": "integer", "index": 8, "name": "industry_type", "comment": null}, "name": {"type": "character varying", "index": 9, "name": "name", "comment": null}, "salt": {"type": "integer", "index": 10, "name": "salt", "comment": null}, "timezone": {"type": "text", "index": 11, "name": "timezone", "comment": null}, "timezone_switch_at": {"type": "text", "index": 12, "name": "timezone_switch_at", "comment": null}, "updated_at": {"type": "text", "index": 13, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__account_history_tmp"}, "model.twitter_ads.stg_twitter_ads__campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_history", "database": "postgres", "comment": "Each record represents a version of each campaign. The versions can be differentiated by the updated_at timestamp.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": "The ID of the related account."}, "created_timestamp": {"type": "text", "index": 3, "name": "created_timestamp", "comment": "The timestamp the account was created."}, "currency": {"type": "text", "index": 4, "name": "currency", "comment": "The currency all metrics for the account are set to."}, "daily_budget_amount_local_micro": {"type": "integer", "index": 5, "name": "daily_budget_amount_local_micro", "comment": "The daily budget amount to be allocated to the campaign, in micros. The currency associated with the specified funding instrument will be used."}, "is_deleted": {"type": "boolean", "index": 6, "name": "is_deleted", "comment": "Whether the record has been deleted or not."}, "duration_in_days": {"type": "integer", "index": 7, "name": "duration_in_days", "comment": "The time period within which the frequency_cap is achieved."}, "end_timestamp": {"type": "text", "index": 8, "name": "end_timestamp", "comment": "The time the campaign will end"}, "entity_status": {"type": "text", "index": 9, "name": "entity_status", "comment": "The status of the campaign."}, "frequency_cap": {"type": "integer", "index": 10, "name": "frequency_cap", "comment": "The maximum number of times an ad could be delivered to a user."}, "funding_instrument_id": {"type": "text", "index": 11, "name": "funding_instrument_id", "comment": "Reference to the funding instrument."}, "campaign_id": {"type": "text", "index": 12, "name": "campaign_id", "comment": "The ID of the campaign."}, "campaign_name": {"type": "text", "index": 13, "name": "campaign_name", "comment": "The name of the campaign."}, "is_servable": {"type": "boolean", "index": 14, "name": "is_servable", "comment": "Whether the campaign is in a state to be actively served to users."}, "is_standard_delivery": {"type": "boolean", "index": 15, "name": "is_standard_delivery", "comment": "Whether standard delivery is enabled (vs accelerated delivery)."}, "start_timestamp": {"type": "text", "index": 16, "name": "start_timestamp", "comment": "The time the campaign will start."}, "total_budget_amount_local_micro": {"type": "integer", "index": 17, "name": "total_budget_amount_local_micro", "comment": "The total budget amount to be allocated to the campaign, in micros."}, "updated_timestamp": {"type": "text", "index": 18, "name": "updated_timestamp", "comment": "The timestamp the account was last updated."}, "daily_budget_amount": {"type": "numeric", "index": 19, "name": "daily_budget_amount", "comment": "The daily budget amount to be allocated to the campaign. The currency associated with the specified funding instrument will be used."}, "total_budget_amount": {"type": "numeric", "index": 20, "name": "total_budget_amount", "comment": "The total budget amount to be allocated to the campaign."}, "is_latest_version": {"type": "boolean", "index": 21, "name": "is_latest_version", "comment": "Whether the record is the most latest version for the campaign"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_history"}, "model.twitter_ads.stg_twitter_ads__campaign_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": null}, "created_at": {"type": "text", "index": 3, "name": "created_at", "comment": null}, "currency": {"type": "text", "index": 4, "name": "currency", "comment": null}, "daily_budget_amount_local_micro": {"type": "integer", "index": 5, "name": "daily_budget_amount_local_micro", "comment": null}, "deleted": {"type": "boolean", "index": 6, "name": "deleted", "comment": null}, "duration_in_days": {"type": "integer", "index": 7, "name": "duration_in_days", "comment": null}, "end_time": {"type": "text", "index": 8, "name": "end_time", "comment": null}, "entity_status": {"type": "text", "index": 9, "name": "entity_status", "comment": null}, "frequency_cap": {"type": "integer", "index": 10, "name": "frequency_cap", "comment": null}, "funding_instrument_id": {"type": "text", "index": 11, "name": "funding_instrument_id", "comment": null}, "id": {"type": "text", "index": 12, "name": "id", "comment": null}, "name": {"type": "text", "index": 13, "name": "name", "comment": null}, "servable": {"type": "boolean", "index": 14, "name": "servable", "comment": null}, "standard_delivery": {"type": "boolean", "index": 15, "name": "standard_delivery", "comment": null}, "start_time": {"type": "text", "index": 16, "name": "start_time", "comment": null}, "total_budget_amount_local_micro": {"type": "integer", "index": 17, "name": "total_budget_amount_local_micro", "comment": null}, "updated_at": {"type": "text", "index": 18, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_history_tmp"}, "model.twitter_ads.stg_twitter_ads__campaign_locations_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_locations_report", "database": "postgres", "comment": "Each record represents the performance of an ad campaign on a given day in a specific country, for its placement in Twitter.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "country": {"type": "text", "index": 3, "name": "country", "comment": "Long-form name of the country being reported on."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID of the related account."}, "campaign_id": {"type": "text", "index": 5, "name": "campaign_id", "comment": "The ID of the campaign."}, "placement": {"type": "text", "index": 6, "name": "placement", "comment": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`."}, "clicks": {"type": "integer", "index": 7, "name": "clicks", "comment": "The clicks for the campaign on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes."}, "impressions": {"type": "integer", "index": 8, "name": "impressions", "comment": "The impressions for the campaign on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results."}, "spend_micro": {"type": "integer", "index": 9, "name": "spend_micro", "comment": "The spend for the campaign on that day, in micros and in whichever currency was selected during account creation."}, "spend": {"type": "numeric", "index": 10, "name": "spend", "comment": "The spend for the campaign on that day in whichever currency was selected during account creation."}, "url_clicks": {"type": "integer", "index": 11, "name": "url_clicks", "comment": "The url clicks for the campaign on that day."}, "conversion_purchases_metric": {"type": "bigint", "index": 12, "name": "conversion_purchases_metric", "comment": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_custom_metric": {"type": "bigint", "index": 13, "name": "conversion_custom_metric", "comment": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_purchases_sale_amount": {"type": "double precision", "index": 14, "name": "conversion_purchases_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}, "conversion_custom_sale_amount": {"type": "double precision", "index": 15, "name": "conversion_custom_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_locations_report"}, "model.twitter_ads.stg_twitter_ads__campaign_locations_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_locations_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"segment": {"type": "text", "index": 1, "name": "segment", "comment": null}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 3, "name": "billed_charge_local_micro", "comment": null}, "campaign_id": {"type": "text", "index": 4, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 5, "name": "clicks", "comment": null}, "date": {"type": "timestamp without time zone", "index": 6, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": null}, "placement": {"type": "text", "index": 8, "name": "placement", "comment": null}, "url_clicks": {"type": "integer", "index": 9, "name": "url_clicks", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_locations_report_tmp"}, "model.twitter_ads.stg_twitter_ads__campaign_regions_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_regions_report", "database": "postgres", "comment": "Each record represents the performance of an ad campaign on a given day in a specific geographic region, for its placement in Twitter.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "region": {"type": "text", "index": 3, "name": "region", "comment": "Long-form name of the geopgraphic region being reported on."}, "country": {"type": "text", "index": 4, "name": "country", "comment": "Long-form name of the country being reported on."}, "account_id": {"type": "text", "index": 5, "name": "account_id", "comment": "The ID of the related account."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID of the campaign."}, "placement": {"type": "text", "index": 7, "name": "placement", "comment": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`."}, "clicks": {"type": "integer", "index": 8, "name": "clicks", "comment": "The clicks for the campaign on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes."}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": "The impressions for the campaign on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results."}, "spend_micro": {"type": "integer", "index": 10, "name": "spend_micro", "comment": "The spend for the campaign on that day, in micros and in whichever currency was selected during account creation."}, "spend": {"type": "numeric", "index": 11, "name": "spend", "comment": "The spend for the campaign on that day in whichever currency was selected during account creation."}, "url_clicks": {"type": "integer", "index": 12, "name": "url_clicks", "comment": "The url clicks for the campaign on that day."}, "conversion_purchases_metric": {"type": "bigint", "index": 13, "name": "conversion_purchases_metric", "comment": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_custom_metric": {"type": "bigint", "index": 14, "name": "conversion_custom_metric", "comment": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_purchases_sale_amount": {"type": "double precision", "index": 15, "name": "conversion_purchases_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}, "conversion_custom_sale_amount": {"type": "double precision", "index": 16, "name": "conversion_custom_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_regions_report"}, "model.twitter_ads.stg_twitter_ads__campaign_regions_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_regions_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"location_name": {"type": "text", "index": 1, "name": "location_name", "comment": null}, "location_type": {"type": "text", "index": 2, "name": "location_type", "comment": null}, "segment": {"type": "text", "index": 3, "name": "segment", "comment": null}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 5, "name": "billed_charge_local_micro", "comment": null}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 7, "name": "clicks", "comment": null}, "date": {"type": "timestamp without time zone", "index": 8, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "placement": {"type": "text", "index": 10, "name": "placement", "comment": null}, "url_clicks": {"type": "integer", "index": 11, "name": "url_clicks", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_regions_report_tmp"}, "model.twitter_ads.stg_twitter_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_report", "database": "postgres", "comment": "Each record represents the performance of an ad campaign on a given day, for its placement in Twitter.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": "The ID of the related account."}, "campaign_id": {"type": "text", "index": 4, "name": "campaign_id", "comment": "The ID of the campaign."}, "placement": {"type": "text", "index": 5, "name": "placement", "comment": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`."}, "clicks": {"type": "integer", "index": 6, "name": "clicks", "comment": "The clicks for the campaign on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes."}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": "The impressions for the campaign on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results."}, "spend_micro": {"type": "integer", "index": 8, "name": "spend_micro", "comment": "The spend for the campaign on that day, in micros and in whichever currency was selected during account creation."}, "spend": {"type": "numeric", "index": 9, "name": "spend", "comment": "The spend for the campaign on that day in whichever currency was selected during account creation."}, "url_clicks": {"type": "integer", "index": 10, "name": "url_clicks", "comment": "The url clicks for the campaign on that day."}, "conversion_purchases_metric": {"type": "bigint", "index": 11, "name": "conversion_purchases_metric", "comment": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_custom_metric": {"type": "bigint", "index": 12, "name": "conversion_custom_metric", "comment": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_purchases_sale_amount": {"type": "double precision", "index": 13, "name": "conversion_purchases_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}, "conversion_custom_sale_amount": {"type": "double precision", "index": 14, "name": "conversion_custom_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_report"}, "model.twitter_ads.stg_twitter_ads__campaign_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "text", "index": 1, "name": "account_id", "comment": null}, "campaign_id": {"type": "text", "index": 2, "name": "campaign_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 3, "name": "date", "comment": null}, "placement": {"type": "text", "index": 4, "name": "placement", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "app_clicks": {"type": "integer", "index": 6, "name": "app_clicks", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 7, "name": "billed_charge_local_micro", "comment": null}, "billed_engagements": {"type": "integer", "index": 8, "name": "billed_engagements", "comment": null}, "card_engagements": {"type": "integer", "index": 9, "name": "card_engagements", "comment": null}, "carousel_swipes": {"type": "integer", "index": 10, "name": "carousel_swipes", "comment": null}, "clicks": {"type": "integer", "index": 11, "name": "clicks", "comment": null}, "conversion_custom_metric": {"type": "integer", "index": 12, "name": "conversion_custom_metric", "comment": null}, "conversion_custom_order_quantity": {"type": "integer", "index": 13, "name": "conversion_custom_order_quantity", "comment": null}, "conversion_custom_order_quantity_engagement": {"type": "integer", "index": 14, "name": "conversion_custom_order_quantity_engagement", "comment": null}, "conversion_custom_order_quantity_view": {"type": "integer", "index": 15, "name": "conversion_custom_order_quantity_view", "comment": null}, "conversion_custom_post_engagement": {"type": "integer", "index": 16, "name": "conversion_custom_post_engagement", "comment": null}, "conversion_custom_post_view": {"type": "integer", "index": 17, "name": "conversion_custom_post_view", "comment": null}, "conversion_custom_sale_amount": {"type": "integer", "index": 18, "name": "conversion_custom_sale_amount", "comment": null}, "conversion_custom_sale_amount_engagement": {"type": "integer", "index": 19, "name": "conversion_custom_sale_amount_engagement", "comment": null}, "conversion_custom_sale_amount_view": {"type": "integer", "index": 20, "name": "conversion_custom_sale_amount_view", "comment": null}, "conversion_downloads_metric": {"type": "integer", "index": 21, "name": "conversion_downloads_metric", "comment": null}, "conversion_downloads_order_quantity": {"type": "integer", "index": 22, "name": "conversion_downloads_order_quantity", "comment": null}, "conversion_downloads_order_quantity_engagement": {"type": "integer", "index": 23, "name": "conversion_downloads_order_quantity_engagement", "comment": null}, "conversion_downloads_order_quantity_view": {"type": "integer", "index": 24, "name": "conversion_downloads_order_quantity_view", "comment": null}, "conversion_downloads_post_engagement": {"type": "integer", "index": 25, "name": "conversion_downloads_post_engagement", "comment": null}, "conversion_downloads_post_view": {"type": "integer", "index": 26, "name": "conversion_downloads_post_view", "comment": null}, "conversion_downloads_sale_amount": {"type": "integer", "index": 27, "name": "conversion_downloads_sale_amount", "comment": null}, "conversion_downloads_sale_amount_engagement": {"type": "integer", "index": 28, "name": "conversion_downloads_sale_amount_engagement", "comment": null}, "conversion_downloads_sale_amount_view": {"type": "integer", "index": 29, "name": "conversion_downloads_sale_amount_view", "comment": null}, "conversion_purchases_assisted": {"type": "integer", "index": 30, "name": "conversion_purchases_assisted", "comment": null}, "conversion_purchases_metric": {"type": "integer", "index": 31, "name": "conversion_purchases_metric", "comment": null}, "conversion_purchases_order_quantity": {"type": "integer", "index": 32, "name": "conversion_purchases_order_quantity", "comment": null}, "conversion_purchases_order_quantity_engagement": {"type": "integer", "index": 33, "name": "conversion_purchases_order_quantity_engagement", "comment": null}, "conversion_purchases_order_quantity_view": {"type": "integer", "index": 34, "name": "conversion_purchases_order_quantity_view", "comment": null}, "conversion_purchases_post_engagement": {"type": "integer", "index": 35, "name": "conversion_purchases_post_engagement", "comment": null}, "conversion_purchases_post_view": {"type": "integer", "index": 36, "name": "conversion_purchases_post_view", "comment": null}, "conversion_purchases_sale_amount": {"type": "integer", "index": 37, "name": "conversion_purchases_sale_amount", "comment": null}, "conversion_purchases_sale_amount_engagement": {"type": "integer", "index": 38, "name": "conversion_purchases_sale_amount_engagement", "comment": null}, "conversion_purchases_sale_amount_view": {"type": "integer", "index": 39, "name": "conversion_purchases_sale_amount_view", "comment": null}, "conversion_sign_ups_assisted": {"type": "integer", "index": 40, "name": "conversion_sign_ups_assisted", "comment": null}, "conversion_sign_ups_metric": {"type": "integer", "index": 41, "name": "conversion_sign_ups_metric", "comment": null}, "conversion_sign_ups_order_quantity": {"type": "integer", "index": 42, "name": "conversion_sign_ups_order_quantity", "comment": null}, "conversion_sign_ups_order_quantity_engagement": {"type": "integer", "index": 43, "name": "conversion_sign_ups_order_quantity_engagement", "comment": null}, "conversion_sign_ups_order_quantity_view": {"type": "integer", "index": 44, "name": "conversion_sign_ups_order_quantity_view", "comment": null}, "conversion_sign_ups_post_engagement": {"type": "integer", "index": 45, "name": "conversion_sign_ups_post_engagement", "comment": null}, "conversion_sign_ups_post_view": {"type": "integer", "index": 46, "name": "conversion_sign_ups_post_view", "comment": null}, "conversion_sign_ups_sale_amount": {"type": "integer", "index": 47, "name": "conversion_sign_ups_sale_amount", "comment": null}, "conversion_sign_ups_sale_amount_engagement": {"type": "integer", "index": 48, "name": "conversion_sign_ups_sale_amount_engagement", "comment": null}, "conversion_sign_ups_sale_amount_view": {"type": "integer", "index": 49, "name": "conversion_sign_ups_sale_amount_view", "comment": null}, "conversion_site_visits_metric": {"type": "integer", "index": 50, "name": "conversion_site_visits_metric", "comment": null}, "conversion_site_visits_order_quantity": {"type": "integer", "index": 51, "name": "conversion_site_visits_order_quantity", "comment": null}, "conversion_site_visits_order_quantity_engagement": {"type": "integer", "index": 52, "name": "conversion_site_visits_order_quantity_engagement", "comment": null}, "conversion_site_visits_order_quantity_view": {"type": "integer", "index": 53, "name": "conversion_site_visits_order_quantity_view", "comment": null}, "conversion_site_visits_post_engagement": {"type": "integer", "index": 54, "name": "conversion_site_visits_post_engagement", "comment": null}, "conversion_site_visits_post_view": {"type": "integer", "index": 55, "name": "conversion_site_visits_post_view", "comment": null}, "conversion_site_visits_sale_amount": {"type": "integer", "index": 56, "name": "conversion_site_visits_sale_amount", "comment": null}, "conversion_site_visits_sale_amount_engagement": {"type": "integer", "index": 57, "name": "conversion_site_visits_sale_amount_engagement", "comment": null}, "conversion_site_visits_sale_amount_view": {"type": "integer", "index": 58, "name": "conversion_site_visits_sale_amount_view", "comment": null}, "engagements": {"type": "integer", "index": 59, "name": "engagements", "comment": null}, "follows": {"type": "integer", "index": 60, "name": "follows", "comment": null}, "impressions": {"type": "integer", "index": 61, "name": "impressions", "comment": null}, "likes": {"type": "integer", "index": 62, "name": "likes", "comment": null}, "media_engagements": {"type": "integer", "index": 63, "name": "media_engagements", "comment": null}, "media_views": {"type": "integer", "index": 64, "name": "media_views", "comment": null}, "mobile_conversion_achievements_unlocked_assisted": {"type": "integer", "index": 65, "name": "mobile_conversion_achievements_unlocked_assisted", "comment": null}, "mobile_conversion_achievements_unlocked_order_quantity": {"type": "integer", "index": 66, "name": "mobile_conversion_achievements_unlocked_order_quantity", "comment": null}, "mobile_conversion_achievements_unlocked_post_engagement": {"type": "integer", "index": 67, "name": "mobile_conversion_achievements_unlocked_post_engagement", "comment": null}, "mobile_conversion_achievements_unlocked_post_view": {"type": "integer", "index": 68, "name": "mobile_conversion_achievements_unlocked_post_view", "comment": null}, "mobile_conversion_achievements_unlocked_sale_amount": {"type": "integer", "index": 69, "name": "mobile_conversion_achievements_unlocked_sale_amount", "comment": null}, "mobile_conversion_add_to_carts_assisted": {"type": "integer", "index": 70, "name": "mobile_conversion_add_to_carts_assisted", "comment": null}, "mobile_conversion_add_to_carts_order_quantity": {"type": "integer", "index": 71, "name": "mobile_conversion_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_add_to_carts_post_engagement": {"type": "integer", "index": 72, "name": "mobile_conversion_add_to_carts_post_engagement", "comment": null}, "mobile_conversion_add_to_carts_post_view": {"type": "integer", "index": 73, "name": "mobile_conversion_add_to_carts_post_view", "comment": null}, "mobile_conversion_add_to_carts_sale_amount": {"type": "integer", "index": 74, "name": "mobile_conversion_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_add_to_wishlists_assisted": {"type": "integer", "index": 75, "name": "mobile_conversion_add_to_wishlists_assisted", "comment": null}, "mobile_conversion_add_to_wishlists_order_quantity": {"type": "integer", "index": 76, "name": "mobile_conversion_add_to_wishlists_order_quantity", "comment": null}, "mobile_conversion_add_to_wishlists_post_engagement": {"type": "integer", "index": 77, "name": "mobile_conversion_add_to_wishlists_post_engagement", "comment": null}, "mobile_conversion_add_to_wishlists_post_view": {"type": "integer", "index": 78, "name": "mobile_conversion_add_to_wishlists_post_view", "comment": null}, "mobile_conversion_add_to_wishlists_sale_amount": {"type": "integer", "index": 79, "name": "mobile_conversion_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_checkouts_initiated_assisted": {"type": "integer", "index": 80, "name": "mobile_conversion_checkouts_initiated_assisted", "comment": null}, "mobile_conversion_checkouts_initiated_order_quantity": {"type": "integer", "index": 81, "name": "mobile_conversion_checkouts_initiated_order_quantity", "comment": null}, "mobile_conversion_checkouts_initiated_post_engagement": {"type": "integer", "index": 82, "name": "mobile_conversion_checkouts_initiated_post_engagement", "comment": null}, "mobile_conversion_checkouts_initiated_post_view": {"type": "integer", "index": 83, "name": "mobile_conversion_checkouts_initiated_post_view", "comment": null}, "mobile_conversion_checkouts_initiated_sale_amount": {"type": "integer", "index": 84, "name": "mobile_conversion_checkouts_initiated_sale_amount", "comment": null}, "mobile_conversion_content_views_assisted": {"type": "integer", "index": 85, "name": "mobile_conversion_content_views_assisted", "comment": null}, "mobile_conversion_content_views_order_quantity": {"type": "integer", "index": 86, "name": "mobile_conversion_content_views_order_quantity", "comment": null}, "mobile_conversion_content_views_post_engagement": {"type": "integer", "index": 87, "name": "mobile_conversion_content_views_post_engagement", "comment": null}, "mobile_conversion_content_views_post_view": {"type": "integer", "index": 88, "name": "mobile_conversion_content_views_post_view", "comment": null}, "mobile_conversion_content_views_sale_amount": {"type": "integer", "index": 89, "name": "mobile_conversion_content_views_sale_amount", "comment": null}, "mobile_conversion_downloads_order_quantity": {"type": "integer", "index": 90, "name": "mobile_conversion_downloads_order_quantity", "comment": null}, "mobile_conversion_downloads_post_engagement": {"type": "integer", "index": 91, "name": "mobile_conversion_downloads_post_engagement", "comment": null}, "mobile_conversion_downloads_post_view": {"type": "integer", "index": 92, "name": "mobile_conversion_downloads_post_view", "comment": null}, "mobile_conversion_downloads_sale_amount": {"type": "integer", "index": 93, "name": "mobile_conversion_downloads_sale_amount", "comment": null}, "mobile_conversion_installs_assisted": {"type": "integer", "index": 94, "name": "mobile_conversion_installs_assisted", "comment": null}, "mobile_conversion_installs_order_quantity": {"type": "integer", "index": 95, "name": "mobile_conversion_installs_order_quantity", "comment": null}, "mobile_conversion_installs_post_engagement": {"type": "integer", "index": 96, "name": "mobile_conversion_installs_post_engagement", "comment": null}, "mobile_conversion_installs_post_view": {"type": "integer", "index": 97, "name": "mobile_conversion_installs_post_view", "comment": null}, "mobile_conversion_installs_sale_amount": {"type": "integer", "index": 98, "name": "mobile_conversion_installs_sale_amount", "comment": null}, "mobile_conversion_invites_assisted": {"type": "integer", "index": 99, "name": "mobile_conversion_invites_assisted", "comment": null}, "mobile_conversion_invites_order_quantity": {"type": "integer", "index": 100, "name": "mobile_conversion_invites_order_quantity", "comment": null}, "mobile_conversion_invites_post_engagement": {"type": "integer", "index": 101, "name": "mobile_conversion_invites_post_engagement", "comment": null}, "mobile_conversion_invites_post_view": {"type": "integer", "index": 102, "name": "mobile_conversion_invites_post_view", "comment": null}, "mobile_conversion_invites_sale_amount": {"type": "integer", "index": 103, "name": "mobile_conversion_invites_sale_amount", "comment": null}, "mobile_conversion_key_page_views_post_engagement": {"type": "integer", "index": 104, "name": "mobile_conversion_key_page_views_post_engagement", "comment": null}, "mobile_conversion_key_page_views_post_view": {"type": "integer", "index": 105, "name": "mobile_conversion_key_page_views_post_view", "comment": null}, "mobile_conversion_levels_achieved_assisted": {"type": "integer", "index": 106, "name": "mobile_conversion_levels_achieved_assisted", "comment": null}, "mobile_conversion_levels_achieved_order_quantity": {"type": "integer", "index": 107, "name": "mobile_conversion_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_levels_achieved_post_engagement": {"type": "integer", "index": 108, "name": "mobile_conversion_levels_achieved_post_engagement", "comment": null}, "mobile_conversion_levels_achieved_post_view": {"type": "integer", "index": 109, "name": "mobile_conversion_levels_achieved_post_view", "comment": null}, "mobile_conversion_levels_achieved_sale_amount": {"type": "integer", "index": 110, "name": "mobile_conversion_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_metric": {"type": "integer", "index": 111, "name": "mobile_conversion_lifetime_value_achievements_unlocked_metric", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_order_qu": {"type": "integer", "index": 112, "name": "mobile_conversion_lifetime_value_achievements_unlocked_order_qu", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo": {"type": "integer", "index": 113, "name": "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_metric": {"type": "integer", "index": 114, "name": "mobile_conversion_lifetime_value_add_to_carts_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_order_quantity": {"type": "integer", "index": 115, "name": "mobile_conversion_lifetime_value_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_sale_amount": {"type": "integer", "index": 116, "name": "mobile_conversion_lifetime_value_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_metric": {"type": "integer", "index": 117, "name": "mobile_conversion_lifetime_value_add_to_wishlists_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit": {"type": "integer", "index": 118, "name": "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount": {"type": "integer", "index": 119, "name": "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_metric": {"type": "integer", "index": 120, "name": "mobile_conversion_lifetime_value_checkouts_initiated_metric", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_order_quan": {"type": "integer", "index": 121, "name": "mobile_conversion_lifetime_value_checkouts_initiated_order_quan", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun": {"type": "integer", "index": 122, "name": "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_content_views_metric": {"type": "integer", "index": 123, "name": "mobile_conversion_lifetime_value_content_views_metric", "comment": null}, "mobile_conversion_lifetime_value_content_views_order_quantity": {"type": "integer", "index": 124, "name": "mobile_conversion_lifetime_value_content_views_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_content_views_sale_amount": {"type": "integer", "index": 125, "name": "mobile_conversion_lifetime_value_content_views_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_invites_metric": {"type": "integer", "index": 126, "name": "mobile_conversion_lifetime_value_invites_metric", "comment": null}, "mobile_conversion_lifetime_value_invites_order_quantity": {"type": "integer", "index": 127, "name": "mobile_conversion_lifetime_value_invites_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_invites_sale_amount": {"type": "integer", "index": 128, "name": "mobile_conversion_lifetime_value_invites_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_metric": {"type": "integer", "index": 129, "name": "mobile_conversion_lifetime_value_levels_achieved_metric", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_order_quantity": {"type": "integer", "index": 130, "name": "mobile_conversion_lifetime_value_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_sale_amount": {"type": "integer", "index": 131, "name": "mobile_conversion_lifetime_value_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_logins_metric": {"type": "integer", "index": 132, "name": "mobile_conversion_lifetime_value_logins_metric", "comment": null}, "mobile_conversion_lifetime_value_logins_order_quantity": {"type": "integer", "index": 133, "name": "mobile_conversion_lifetime_value_logins_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_logins_sale_amount": {"type": "integer", "index": 134, "name": "mobile_conversion_lifetime_value_logins_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_metric": {"type": "integer", "index": 135, "name": "mobile_conversion_lifetime_value_payment_info_additions_metric", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_order_q": {"type": "integer", "index": 136, "name": "mobile_conversion_lifetime_value_payment_info_additions_order_q", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_sale_am": {"type": "integer", "index": 137, "name": "mobile_conversion_lifetime_value_payment_info_additions_sale_am", "comment": null}, "mobile_conversion_lifetime_value_purchases_metric": {"type": "integer", "index": 138, "name": "mobile_conversion_lifetime_value_purchases_metric", "comment": null}, "mobile_conversion_lifetime_value_purchases_order_quantity": {"type": "integer", "index": 139, "name": "mobile_conversion_lifetime_value_purchases_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_purchases_sale_amount": {"type": "integer", "index": 140, "name": "mobile_conversion_lifetime_value_purchases_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_rates_metric": {"type": "integer", "index": 141, "name": "mobile_conversion_lifetime_value_rates_metric", "comment": null}, "mobile_conversion_lifetime_value_rates_order_quantity": {"type": "integer", "index": 142, "name": "mobile_conversion_lifetime_value_rates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_rates_sale_amount": {"type": "integer", "index": 143, "name": "mobile_conversion_lifetime_value_rates_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_reservations_metric": {"type": "integer", "index": 144, "name": "mobile_conversion_lifetime_value_reservations_metric", "comment": null}, "mobile_conversion_lifetime_value_reservations_order_quantity": {"type": "integer", "index": 145, "name": "mobile_conversion_lifetime_value_reservations_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_reservations_sale_amount": {"type": "integer", "index": 146, "name": "mobile_conversion_lifetime_value_reservations_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_searches_metric": {"type": "integer", "index": 147, "name": "mobile_conversion_lifetime_value_searches_metric", "comment": null}, "mobile_conversion_lifetime_value_searches_order_quantity": {"type": "integer", "index": 148, "name": "mobile_conversion_lifetime_value_searches_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_searches_sale_amount": {"type": "integer", "index": 149, "name": "mobile_conversion_lifetime_value_searches_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_shares_metric": {"type": "integer", "index": 150, "name": "mobile_conversion_lifetime_value_shares_metric", "comment": null}, "mobile_conversion_lifetime_value_shares_order_quantity": {"type": "integer", "index": 151, "name": "mobile_conversion_lifetime_value_shares_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_shares_sale_amount": {"type": "integer", "index": 152, "name": "mobile_conversion_lifetime_value_shares_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_metric": {"type": "integer", "index": 153, "name": "mobile_conversion_lifetime_value_sign_ups_metric", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_order_quantity": {"type": "integer", "index": 154, "name": "mobile_conversion_lifetime_value_sign_ups_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_sale_amount": {"type": "integer", "index": 155, "name": "mobile_conversion_lifetime_value_sign_ups_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_metric": {"type": "integer", "index": 156, "name": "mobile_conversion_lifetime_value_spent_credits_metric", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_order_quantity": {"type": "integer", "index": 157, "name": "mobile_conversion_lifetime_value_spent_credits_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_sale_amount": {"type": "integer", "index": 158, "name": "mobile_conversion_lifetime_value_spent_credits_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_metric": {"type": "integer", "index": 159, "name": "mobile_conversion_lifetime_value_tutorials_completed_metric", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_order_quan": {"type": "integer", "index": 160, "name": "mobile_conversion_lifetime_value_tutorials_completed_order_quan", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun": {"type": "integer", "index": 161, "name": "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_updates_metric": {"type": "integer", "index": 162, "name": "mobile_conversion_lifetime_value_updates_metric", "comment": null}, "mobile_conversion_lifetime_value_updates_order_quantity": {"type": "integer", "index": 163, "name": "mobile_conversion_lifetime_value_updates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_updates_sale_amount": {"type": "integer", "index": 164, "name": "mobile_conversion_lifetime_value_updates_sale_amount", "comment": null}, "mobile_conversion_logins_assisted": {"type": "integer", "index": 165, "name": "mobile_conversion_logins_assisted", "comment": null}, "mobile_conversion_logins_order_quantity": {"type": "integer", "index": 166, "name": "mobile_conversion_logins_order_quantity", "comment": null}, "mobile_conversion_logins_post_engagement": {"type": "integer", "index": 167, "name": "mobile_conversion_logins_post_engagement", "comment": null}, "mobile_conversion_logins_post_view": {"type": "integer", "index": 168, "name": "mobile_conversion_logins_post_view", "comment": null}, "mobile_conversion_logins_sale_amount": {"type": "integer", "index": 169, "name": "mobile_conversion_logins_sale_amount", "comment": null}, "mobile_conversion_payment_info_additions_assisted": {"type": "integer", "index": 170, "name": "mobile_conversion_payment_info_additions_assisted", "comment": null}, "mobile_conversion_payment_info_additions_order_quantity": {"type": "integer", "index": 171, "name": "mobile_conversion_payment_info_additions_order_quantity", "comment": null}, "mobile_conversion_payment_info_additions_post_engagement": {"type": "integer", "index": 172, "name": "mobile_conversion_payment_info_additions_post_engagement", "comment": null}, "mobile_conversion_payment_info_additions_post_view": {"type": "integer", "index": 173, "name": "mobile_conversion_payment_info_additions_post_view", "comment": null}, "mobile_conversion_payment_info_additions_sale_amount": {"type": "integer", "index": 174, "name": "mobile_conversion_payment_info_additions_sale_amount", "comment": null}, "mobile_conversion_purchases_assisted": {"type": "integer", "index": 175, "name": "mobile_conversion_purchases_assisted", "comment": null}, "mobile_conversion_purchases_order_quantity": {"type": "integer", "index": 176, "name": "mobile_conversion_purchases_order_quantity", "comment": null}, "mobile_conversion_purchases_post_engagement": {"type": "integer", "index": 177, "name": "mobile_conversion_purchases_post_engagement", "comment": null}, "mobile_conversion_purchases_post_view": {"type": "integer", "index": 178, "name": "mobile_conversion_purchases_post_view", "comment": null}, "mobile_conversion_purchases_sale_amount": {"type": "integer", "index": 179, "name": "mobile_conversion_purchases_sale_amount", "comment": null}, "mobile_conversion_rates_assisted": {"type": "integer", "index": 180, "name": "mobile_conversion_rates_assisted", "comment": null}, "mobile_conversion_rates_order_quantity": {"type": "integer", "index": 181, "name": "mobile_conversion_rates_order_quantity", "comment": null}, "mobile_conversion_rates_post_engagement": {"type": "integer", "index": 182, "name": "mobile_conversion_rates_post_engagement", "comment": null}, "mobile_conversion_rates_post_view": {"type": "integer", "index": 183, "name": "mobile_conversion_rates_post_view", "comment": null}, "mobile_conversion_rates_sale_amount": {"type": "integer", "index": 184, "name": "mobile_conversion_rates_sale_amount", "comment": null}, "mobile_conversion_re_engages_assisted": {"type": "integer", "index": 185, "name": "mobile_conversion_re_engages_assisted", "comment": null}, "mobile_conversion_re_engages_order_quantity": {"type": "integer", "index": 186, "name": "mobile_conversion_re_engages_order_quantity", "comment": null}, "mobile_conversion_re_engages_post_engagement": {"type": "integer", "index": 187, "name": "mobile_conversion_re_engages_post_engagement", "comment": null}, "mobile_conversion_re_engages_post_view": {"type": "integer", "index": 188, "name": "mobile_conversion_re_engages_post_view", "comment": null}, "mobile_conversion_re_engages_sale_amount": {"type": "integer", "index": 189, "name": "mobile_conversion_re_engages_sale_amount", "comment": null}, "mobile_conversion_reservations_assisted": {"type": "integer", "index": 190, "name": "mobile_conversion_reservations_assisted", "comment": null}, "mobile_conversion_reservations_order_quantity": {"type": "integer", "index": 191, "name": "mobile_conversion_reservations_order_quantity", "comment": null}, "mobile_conversion_reservations_post_engagement": {"type": "integer", "index": 192, "name": "mobile_conversion_reservations_post_engagement", "comment": null}, "mobile_conversion_reservations_post_view": {"type": "integer", "index": 193, "name": "mobile_conversion_reservations_post_view", "comment": null}, "mobile_conversion_reservations_sale_amount": {"type": "integer", "index": 194, "name": "mobile_conversion_reservations_sale_amount", "comment": null}, "mobile_conversion_searches_assisted": {"type": "integer", "index": 195, "name": "mobile_conversion_searches_assisted", "comment": null}, "mobile_conversion_searches_order_quantity": {"type": "integer", "index": 196, "name": "mobile_conversion_searches_order_quantity", "comment": null}, "mobile_conversion_searches_post_engagement": {"type": "integer", "index": 197, "name": "mobile_conversion_searches_post_engagement", "comment": null}, "mobile_conversion_searches_post_view": {"type": "integer", "index": 198, "name": "mobile_conversion_searches_post_view", "comment": null}, "mobile_conversion_searches_sale_amount": {"type": "integer", "index": 199, "name": "mobile_conversion_searches_sale_amount", "comment": null}, "mobile_conversion_shares_assisted": {"type": "integer", "index": 200, "name": "mobile_conversion_shares_assisted", "comment": null}, "mobile_conversion_shares_order_quantity": {"type": "integer", "index": 201, "name": "mobile_conversion_shares_order_quantity", "comment": null}, "mobile_conversion_shares_post_engagement": {"type": "integer", "index": 202, "name": "mobile_conversion_shares_post_engagement", "comment": null}, "mobile_conversion_shares_post_view": {"type": "integer", "index": 203, "name": "mobile_conversion_shares_post_view", "comment": null}, "mobile_conversion_shares_sale_amount": {"type": "integer", "index": 204, "name": "mobile_conversion_shares_sale_amount", "comment": null}, "mobile_conversion_sign_ups_assisted": {"type": "integer", "index": 205, "name": "mobile_conversion_sign_ups_assisted", "comment": null}, "mobile_conversion_sign_ups_order_quantity": {"type": "integer", "index": 206, "name": "mobile_conversion_sign_ups_order_quantity", "comment": null}, "mobile_conversion_sign_ups_post_engagement": {"type": "integer", "index": 207, "name": "mobile_conversion_sign_ups_post_engagement", "comment": null}, "mobile_conversion_sign_ups_post_view": {"type": "integer", "index": 208, "name": "mobile_conversion_sign_ups_post_view", "comment": null}, "mobile_conversion_sign_ups_sale_amount": {"type": "integer", "index": 209, "name": "mobile_conversion_sign_ups_sale_amount", "comment": null}, "mobile_conversion_site_visits_order_quantity": {"type": "integer", "index": 210, "name": "mobile_conversion_site_visits_order_quantity", "comment": null}, "mobile_conversion_site_visits_post_engagement": {"type": "integer", "index": 211, "name": "mobile_conversion_site_visits_post_engagement", "comment": null}, "mobile_conversion_site_visits_post_view": {"type": "integer", "index": 212, "name": "mobile_conversion_site_visits_post_view", "comment": null}, "mobile_conversion_site_visits_sale_amount": {"type": "integer", "index": 213, "name": "mobile_conversion_site_visits_sale_amount", "comment": null}, "mobile_conversion_spent_credits_assisted": {"type": "integer", "index": 214, "name": "mobile_conversion_spent_credits_assisted", "comment": null}, "mobile_conversion_spent_credits_order_quantity": {"type": "integer", "index": 215, "name": "mobile_conversion_spent_credits_order_quantity", "comment": null}, "mobile_conversion_spent_credits_post_engagement": {"type": "integer", "index": 216, "name": "mobile_conversion_spent_credits_post_engagement", "comment": null}, "mobile_conversion_spent_credits_post_view": {"type": "integer", "index": 217, "name": "mobile_conversion_spent_credits_post_view", "comment": null}, "mobile_conversion_spent_credits_sale_amount": {"type": "integer", "index": 218, "name": "mobile_conversion_spent_credits_sale_amount", "comment": null}, "mobile_conversion_tutorials_completed_assisted": {"type": "integer", "index": 219, "name": "mobile_conversion_tutorials_completed_assisted", "comment": null}, "mobile_conversion_tutorials_completed_order_quantity": {"type": "integer", "index": 220, "name": "mobile_conversion_tutorials_completed_order_quantity", "comment": null}, "mobile_conversion_tutorials_completed_post_engagement": {"type": "integer", "index": 221, "name": "mobile_conversion_tutorials_completed_post_engagement", "comment": null}, "mobile_conversion_tutorials_completed_post_view": {"type": "integer", "index": 222, "name": "mobile_conversion_tutorials_completed_post_view", "comment": null}, "mobile_conversion_tutorials_completed_sale_amount": {"type": "integer", "index": 223, "name": "mobile_conversion_tutorials_completed_sale_amount", "comment": null}, "mobile_conversion_updates_assisted": {"type": "integer", "index": 224, "name": "mobile_conversion_updates_assisted", "comment": null}, "mobile_conversion_updates_order_quantity": {"type": "integer", "index": 225, "name": "mobile_conversion_updates_order_quantity", "comment": null}, "mobile_conversion_updates_post_engagement": {"type": "integer", "index": 226, "name": "mobile_conversion_updates_post_engagement", "comment": null}, "mobile_conversion_updates_post_view": {"type": "integer", "index": 227, "name": "mobile_conversion_updates_post_view", "comment": null}, "mobile_conversion_updates_sale_amount": {"type": "integer", "index": 228, "name": "mobile_conversion_updates_sale_amount", "comment": null}, "poll_card_vote": {"type": "integer", "index": 229, "name": "poll_card_vote", "comment": null}, "qualified_impressions": {"type": "integer", "index": 230, "name": "qualified_impressions", "comment": null}, "replies": {"type": "integer", "index": 231, "name": "replies", "comment": null}, "retweets": {"type": "integer", "index": 232, "name": "retweets", "comment": null}, "tweets_send": {"type": "integer", "index": 233, "name": "tweets_send", "comment": null}, "unfollows": {"type": "integer", "index": 234, "name": "unfollows", "comment": null}, "url_clicks": {"type": "integer", "index": 235, "name": "url_clicks", "comment": null}, "video_3_s_100_pct_views": {"type": "integer", "index": 236, "name": "video_3_s_100_pct_views", "comment": null}, "video_6_s_views": {"type": "integer", "index": 237, "name": "video_6_s_views", "comment": null}, "video_content_starts": {"type": "integer", "index": 238, "name": "video_content_starts", "comment": null}, "video_cta_clicks": {"type": "integer", "index": 239, "name": "video_cta_clicks", "comment": null}, "video_mrc_views": {"type": "integer", "index": 240, "name": "video_mrc_views", "comment": null}, "video_total_views": {"type": "integer", "index": 241, "name": "video_total_views", "comment": null}, "video_views_100": {"type": "integer", "index": 242, "name": "video_views_100", "comment": null}, "video_views_25": {"type": "integer", "index": 243, "name": "video_views_25", "comment": null}, "video_views_50": {"type": "integer", "index": 244, "name": "video_views_50", "comment": null}, "video_views_75": {"type": "integer", "index": 245, "name": "video_views_75", "comment": null}, "mobile_conversion_installs_skan_post_engagement": {"type": "integer", "index": 246, "name": "mobile_conversion_installs_skan_post_engagement", "comment": null}, "mobile_conversion_installs_skan_post_view": {"type": "integer", "index": 247, "name": "mobile_conversion_installs_skan_post_view", "comment": null}, "mobile_conversion_purchases_skan_post_engagement": {"type": "integer", "index": 248, "name": "mobile_conversion_purchases_skan_post_engagement", "comment": null}, "mobile_conversion_purchases_skan_post_view": {"type": "integer", "index": 249, "name": "mobile_conversion_purchases_skan_post_view", "comment": null}, "video_15_s_views": {"type": "integer", "index": 250, "name": "video_15_s_views", "comment": null}, "auto_created_conversion_landing_page_view": {"type": "integer", "index": 251, "name": "auto_created_conversion_landing_page_view", "comment": null}, "auto_created_conversion_session": {"type": "integer", "index": 252, "name": "auto_created_conversion_session", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_report_tmp"}, "model.twitter_ads.stg_twitter_ads__line_item_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__line_item_history", "database": "postgres", "comment": "Each record represents a version of each line item. The versions can be differentiated by the updated_at timestamp.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "advertiser_domain": {"type": "text", "index": 2, "name": "advertiser_domain", "comment": "The website domain for this advertiser, without the protocol specification."}, "advertiser_user_id": {"type": "integer", "index": 3, "name": "advertiser_user_id", "comment": "The Twitter user identifier for the handle promoting the ad."}, "automatically_select_bid": {"type": "boolean", "index": 4, "name": "automatically_select_bid", "comment": "Whether automatically optimize bidding is enabled based on daily budget and campaign flight dates."}, "bid_amount_local_micro": {"type": "integer", "index": 5, "name": "bid_amount_local_micro", "comment": "The bid amount to be associated with this line item, in micros."}, "bid_type": {"type": "text", "index": 6, "name": "bid_type", "comment": "The bidding mechanism."}, "bid_unit": {"type": "text", "index": 7, "name": "bid_unit", "comment": "The bid unit for this line item."}, "campaign_id": {"type": "text", "index": 8, "name": "campaign_id", "comment": "The ID of the related campaign."}, "charge_by": {"type": "text", "index": 9, "name": "charge_by", "comment": "The unit to charge this line item by."}, "created_timestamp": {"type": "text", "index": 10, "name": "created_timestamp", "comment": "The timestamp the account was created."}, "creative_source": {"type": "text", "index": 11, "name": "creative_source", "comment": "The source of the creatives for the line item."}, "currency": {"type": "text", "index": 12, "name": "currency", "comment": "The currency in which metrics will be reported."}, "is_deleted": {"type": "boolean", "index": 13, "name": "is_deleted", "comment": "Whether the record has been deleted or not."}, "end_timestamp": {"type": "integer", "index": 14, "name": "end_timestamp", "comment": "The timestamp at which the line item will stop being served."}, "entity_status": {"type": "text", "index": 15, "name": "entity_status", "comment": "The status of the line item."}, "line_item_id": {"type": "text", "index": 16, "name": "line_item_id", "comment": "The ID of the line item."}, "name": {"type": "text", "index": 17, "name": "name", "comment": "The name of the line item."}, "objective": {"type": "text", "index": 18, "name": "objective", "comment": "The campaign objective for this line item."}, "optimization": {"type": "text", "index": 19, "name": "optimization", "comment": "The optimization setting to use with this line item."}, "primary_web_event_tag": {"type": "integer", "index": 20, "name": "primary_web_event_tag", "comment": "The identifier of the primary web event tag. Allows more accurate tracking of engagements for the campaign pertaining to this line item."}, "product_type": {"type": "text", "index": 21, "name": "product_type", "comment": "The type of promoted product that this line item will contain."}, "start_timestamp": {"type": "integer", "index": 22, "name": "start_timestamp", "comment": "The timestamp at which the line item will start being served."}, "target_cpa_local_micro": {"type": "integer", "index": 23, "name": "target_cpa_local_micro", "comment": "The target cost per acquisition for the line item, in micros."}, "total_budget_amount_local_micro": {"type": "integer", "index": 24, "name": "total_budget_amount_local_micro", "comment": "The total budget amount to be allocated to the line item, in micros."}, "updated_timestamp": {"type": "text", "index": 25, "name": "updated_timestamp", "comment": "The timestamp the account was last updated."}, "bid_amount": {"type": "numeric", "index": 26, "name": "bid_amount", "comment": "The bid amount to be associated with this line item."}, "total_budget_amount": {"type": "numeric", "index": 27, "name": "total_budget_amount", "comment": "The total budget amount to be allocated to the campaign."}, "target_cpa": {"type": "numeric", "index": 28, "name": "target_cpa", "comment": "The target cost per acquisition for the line item."}, "is_latest_version": {"type": "boolean", "index": 29, "name": "is_latest_version", "comment": "Whether the record is the most latest version for the line item."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__line_item_history"}, "model.twitter_ads.stg_twitter_ads__line_item_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__line_item_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"advertiser_domain": {"type": "text", "index": 1, "name": "advertiser_domain", "comment": null}, "advertiser_user_id": {"type": "integer", "index": 2, "name": "advertiser_user_id", "comment": null}, "automatically_select_bid": {"type": "boolean", "index": 3, "name": "automatically_select_bid", "comment": null}, "bid_amount_local_micro": {"type": "integer", "index": 4, "name": "bid_amount_local_micro", "comment": null}, "bid_type": {"type": "text", "index": 5, "name": "bid_type", "comment": null}, "bid_unit": {"type": "text", "index": 6, "name": "bid_unit", "comment": null}, "campaign_id": {"type": "text", "index": 7, "name": "campaign_id", "comment": null}, "charge_by": {"type": "text", "index": 8, "name": "charge_by", "comment": null}, "created_at": {"type": "text", "index": 9, "name": "created_at", "comment": null}, "creative_source": {"type": "text", "index": 10, "name": "creative_source", "comment": null}, "currency": {"type": "text", "index": 11, "name": "currency", "comment": null}, "deleted": {"type": "boolean", "index": 12, "name": "deleted", "comment": null}, "end_time": {"type": "integer", "index": 13, "name": "end_time", "comment": null}, "entity_status": {"type": "text", "index": 14, "name": "entity_status", "comment": null}, "id": {"type": "text", "index": 15, "name": "id", "comment": null}, "name": {"type": "text", "index": 16, "name": "name", "comment": null}, "objective": {"type": "text", "index": 17, "name": "objective", "comment": null}, "optimization": {"type": "text", "index": 18, "name": "optimization", "comment": null}, "primary_web_event_tag": {"type": "integer", "index": 19, "name": "primary_web_event_tag", "comment": null}, "product_type": {"type": "text", "index": 20, "name": "product_type", "comment": null}, "start_time": {"type": "integer", "index": 21, "name": "start_time", "comment": null}, "target_cpa_local_micro": {"type": "integer", "index": 22, "name": "target_cpa_local_micro", "comment": null}, "total_budget_amount_local_micro": {"type": "integer", "index": 23, "name": "total_budget_amount_local_micro", "comment": null}, "updated_at": {"type": "text", "index": 24, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__line_item_history_tmp"}, "model.twitter_ads.stg_twitter_ads__line_item_keywords_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__line_item_keywords_report", "database": "postgres", "comment": "Each record represents the performance of a line item (ad group) and keyword combination on a given day, for its placement in Twitter.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "keyword_id": {"type": "text", "index": 3, "name": "keyword_id", "comment": "Unique key of the table built from the combination of 'account_id', 'line_item_id','segment', and 'placement' fields."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID of the related account."}, "line_item_id": {"type": "text", "index": 5, "name": "line_item_id", "comment": "The ID of the line item."}, "keyword": {"type": "text", "index": 6, "name": "keyword", "comment": "The keyword whose performance is being tracked."}, "placement": {"type": "text", "index": 7, "name": "placement", "comment": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`."}, "clicks": {"type": "integer", "index": 8, "name": "clicks", "comment": "The clicks for the line item + keyword on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes."}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": "The impressions for the line item + keyword on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results."}, "spend_micro": {"type": "integer", "index": 10, "name": "spend_micro", "comment": "The spend for the line item + keyword on that day, in micros and in whichever currency was selected during account creation."}, "spend": {"type": "numeric", "index": 11, "name": "spend", "comment": "The spend for the line item + keyword on that day in whichever currency was selected during account creation."}, "url_clicks": {"type": "integer", "index": 12, "name": "url_clicks", "comment": "The url clicks for the line item + keyword on that day."}, "conversion_purchases_metric": {"type": "bigint", "index": 13, "name": "conversion_purchases_metric", "comment": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_custom_metric": {"type": "bigint", "index": 14, "name": "conversion_custom_metric", "comment": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_purchases_sale_amount": {"type": "double precision", "index": 15, "name": "conversion_purchases_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}, "conversion_custom_sale_amount": {"type": "double precision", "index": 16, "name": "conversion_custom_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__line_item_keywords_report"}, "model.twitter_ads.stg_twitter_ads__line_item_keywords_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__line_item_keywords_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "text", "index": 1, "name": "account_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "line_item_id": {"type": "text", "index": 3, "name": "line_item_id", "comment": null}, "placement": {"type": "text", "index": 4, "name": "placement", "comment": null}, "segment": {"type": "text", "index": 5, "name": "segment", "comment": null}, "_fivetran_synced": {"type": "text", "index": 6, "name": "_fivetran_synced", "comment": null}, "app_clicks": {"type": "integer", "index": 7, "name": "app_clicks", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 8, "name": "billed_charge_local_micro", "comment": null}, "billed_engagements": {"type": "integer", "index": 9, "name": "billed_engagements", "comment": null}, "card_engagements": {"type": "integer", "index": 10, "name": "card_engagements", "comment": null}, "carousel_swipes": {"type": "integer", "index": 11, "name": "carousel_swipes", "comment": null}, "clicks": {"type": "integer", "index": 12, "name": "clicks", "comment": null}, "conversion_custom_metric": {"type": "integer", "index": 13, "name": "conversion_custom_metric", "comment": null}, "conversion_custom_order_quantity": {"type": "integer", "index": 14, "name": "conversion_custom_order_quantity", "comment": null}, "conversion_custom_order_quantity_engagement": {"type": "integer", "index": 15, "name": "conversion_custom_order_quantity_engagement", "comment": null}, "conversion_custom_order_quantity_view": {"type": "integer", "index": 16, "name": "conversion_custom_order_quantity_view", "comment": null}, "conversion_custom_post_engagement": {"type": "integer", "index": 17, "name": "conversion_custom_post_engagement", "comment": null}, "conversion_custom_post_view": {"type": "integer", "index": 18, "name": "conversion_custom_post_view", "comment": null}, "conversion_custom_sale_amount": {"type": "integer", "index": 19, "name": "conversion_custom_sale_amount", "comment": null}, "conversion_custom_sale_amount_engagement": {"type": "integer", "index": 20, "name": "conversion_custom_sale_amount_engagement", "comment": null}, "conversion_custom_sale_amount_view": {"type": "integer", "index": 21, "name": "conversion_custom_sale_amount_view", "comment": null}, "conversion_downloads_metric": {"type": "integer", "index": 22, "name": "conversion_downloads_metric", "comment": null}, "conversion_downloads_order_quantity": {"type": "integer", "index": 23, "name": "conversion_downloads_order_quantity", "comment": null}, "conversion_downloads_order_quantity_engagement": {"type": "integer", "index": 24, "name": "conversion_downloads_order_quantity_engagement", "comment": null}, "conversion_downloads_order_quantity_view": {"type": "integer", "index": 25, "name": "conversion_downloads_order_quantity_view", "comment": null}, "conversion_downloads_post_engagement": {"type": "integer", "index": 26, "name": "conversion_downloads_post_engagement", "comment": null}, "conversion_downloads_post_view": {"type": "integer", "index": 27, "name": "conversion_downloads_post_view", "comment": null}, "conversion_downloads_sale_amount": {"type": "integer", "index": 28, "name": "conversion_downloads_sale_amount", "comment": null}, "conversion_downloads_sale_amount_engagement": {"type": "integer", "index": 29, "name": "conversion_downloads_sale_amount_engagement", "comment": null}, "conversion_downloads_sale_amount_view": {"type": "integer", "index": 30, "name": "conversion_downloads_sale_amount_view", "comment": null}, "conversion_purchases_assisted": {"type": "integer", "index": 31, "name": "conversion_purchases_assisted", "comment": null}, "conversion_purchases_metric": {"type": "integer", "index": 32, "name": "conversion_purchases_metric", "comment": null}, "conversion_purchases_order_quantity": {"type": "integer", "index": 33, "name": "conversion_purchases_order_quantity", "comment": null}, "conversion_purchases_order_quantity_engagement": {"type": "integer", "index": 34, "name": "conversion_purchases_order_quantity_engagement", "comment": null}, "conversion_purchases_order_quantity_view": {"type": "integer", "index": 35, "name": "conversion_purchases_order_quantity_view", "comment": null}, "conversion_purchases_post_engagement": {"type": "integer", "index": 36, "name": "conversion_purchases_post_engagement", "comment": null}, "conversion_purchases_post_view": {"type": "integer", "index": 37, "name": "conversion_purchases_post_view", "comment": null}, "conversion_purchases_sale_amount": {"type": "integer", "index": 38, "name": "conversion_purchases_sale_amount", "comment": null}, "conversion_purchases_sale_amount_engagement": {"type": "integer", "index": 39, "name": "conversion_purchases_sale_amount_engagement", "comment": null}, "conversion_purchases_sale_amount_view": {"type": "integer", "index": 40, "name": "conversion_purchases_sale_amount_view", "comment": null}, "conversion_sign_ups_assisted": {"type": "integer", "index": 41, "name": "conversion_sign_ups_assisted", "comment": null}, "conversion_sign_ups_metric": {"type": "integer", "index": 42, "name": "conversion_sign_ups_metric", "comment": null}, "conversion_sign_ups_order_quantity": {"type": "integer", "index": 43, "name": "conversion_sign_ups_order_quantity", "comment": null}, "conversion_sign_ups_order_quantity_engagement": {"type": "integer", "index": 44, "name": "conversion_sign_ups_order_quantity_engagement", "comment": null}, "conversion_sign_ups_order_quantity_view": {"type": "integer", "index": 45, "name": "conversion_sign_ups_order_quantity_view", "comment": null}, "conversion_sign_ups_post_engagement": {"type": "integer", "index": 46, "name": "conversion_sign_ups_post_engagement", "comment": null}, "conversion_sign_ups_post_view": {"type": "integer", "index": 47, "name": "conversion_sign_ups_post_view", "comment": null}, "conversion_sign_ups_sale_amount": {"type": "integer", "index": 48, "name": "conversion_sign_ups_sale_amount", "comment": null}, "conversion_sign_ups_sale_amount_engagement": {"type": "integer", "index": 49, "name": "conversion_sign_ups_sale_amount_engagement", "comment": null}, "conversion_sign_ups_sale_amount_view": {"type": "integer", "index": 50, "name": "conversion_sign_ups_sale_amount_view", "comment": null}, "conversion_site_visits_metric": {"type": "integer", "index": 51, "name": "conversion_site_visits_metric", "comment": null}, "conversion_site_visits_order_quantity": {"type": "integer", "index": 52, "name": "conversion_site_visits_order_quantity", "comment": null}, "conversion_site_visits_order_quantity_engagement": {"type": "integer", "index": 53, "name": "conversion_site_visits_order_quantity_engagement", "comment": null}, "conversion_site_visits_order_quantity_view": {"type": "integer", "index": 54, "name": "conversion_site_visits_order_quantity_view", "comment": null}, "conversion_site_visits_post_engagement": {"type": "integer", "index": 55, "name": "conversion_site_visits_post_engagement", "comment": null}, "conversion_site_visits_post_view": {"type": "integer", "index": 56, "name": "conversion_site_visits_post_view", "comment": null}, "conversion_site_visits_sale_amount": {"type": "integer", "index": 57, "name": "conversion_site_visits_sale_amount", "comment": null}, "conversion_site_visits_sale_amount_engagement": {"type": "integer", "index": 58, "name": "conversion_site_visits_sale_amount_engagement", "comment": null}, "conversion_site_visits_sale_amount_view": {"type": "integer", "index": 59, "name": "conversion_site_visits_sale_amount_view", "comment": null}, "engagements": {"type": "integer", "index": 60, "name": "engagements", "comment": null}, "follows": {"type": "integer", "index": 61, "name": "follows", "comment": null}, "impressions": {"type": "integer", "index": 62, "name": "impressions", "comment": null}, "likes": {"type": "integer", "index": 63, "name": "likes", "comment": null}, "media_engagements": {"type": "integer", "index": 64, "name": "media_engagements", "comment": null}, "media_views": {"type": "integer", "index": 65, "name": "media_views", "comment": null}, "mobile_conversion_achievements_unlocked_assisted": {"type": "integer", "index": 66, "name": "mobile_conversion_achievements_unlocked_assisted", "comment": null}, "mobile_conversion_achievements_unlocked_order_quantity": {"type": "integer", "index": 67, "name": "mobile_conversion_achievements_unlocked_order_quantity", "comment": null}, "mobile_conversion_achievements_unlocked_post_engagement": {"type": "integer", "index": 68, "name": "mobile_conversion_achievements_unlocked_post_engagement", "comment": null}, "mobile_conversion_achievements_unlocked_post_view": {"type": "integer", "index": 69, "name": "mobile_conversion_achievements_unlocked_post_view", "comment": null}, "mobile_conversion_achievements_unlocked_sale_amount": {"type": "integer", "index": 70, "name": "mobile_conversion_achievements_unlocked_sale_amount", "comment": null}, "mobile_conversion_add_to_carts_assisted": {"type": "integer", "index": 71, "name": "mobile_conversion_add_to_carts_assisted", "comment": null}, "mobile_conversion_add_to_carts_order_quantity": {"type": "integer", "index": 72, "name": "mobile_conversion_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_add_to_carts_post_engagement": {"type": "integer", "index": 73, "name": "mobile_conversion_add_to_carts_post_engagement", "comment": null}, "mobile_conversion_add_to_carts_post_view": {"type": "integer", "index": 74, "name": "mobile_conversion_add_to_carts_post_view", "comment": null}, "mobile_conversion_add_to_carts_sale_amount": {"type": "integer", "index": 75, "name": "mobile_conversion_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_add_to_wishlists_assisted": {"type": "integer", "index": 76, "name": "mobile_conversion_add_to_wishlists_assisted", "comment": null}, "mobile_conversion_add_to_wishlists_order_quantity": {"type": "integer", "index": 77, "name": "mobile_conversion_add_to_wishlists_order_quantity", "comment": null}, "mobile_conversion_add_to_wishlists_post_engagement": {"type": "integer", "index": 78, "name": "mobile_conversion_add_to_wishlists_post_engagement", "comment": null}, "mobile_conversion_add_to_wishlists_post_view": {"type": "integer", "index": 79, "name": "mobile_conversion_add_to_wishlists_post_view", "comment": null}, "mobile_conversion_add_to_wishlists_sale_amount": {"type": "integer", "index": 80, "name": "mobile_conversion_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_checkouts_initiated_assisted": {"type": "integer", "index": 81, "name": "mobile_conversion_checkouts_initiated_assisted", "comment": null}, "mobile_conversion_checkouts_initiated_order_quantity": {"type": "integer", "index": 82, "name": "mobile_conversion_checkouts_initiated_order_quantity", "comment": null}, "mobile_conversion_checkouts_initiated_post_engagement": {"type": "integer", "index": 83, "name": "mobile_conversion_checkouts_initiated_post_engagement", "comment": null}, "mobile_conversion_checkouts_initiated_post_view": {"type": "integer", "index": 84, "name": "mobile_conversion_checkouts_initiated_post_view", "comment": null}, "mobile_conversion_checkouts_initiated_sale_amount": {"type": "integer", "index": 85, "name": "mobile_conversion_checkouts_initiated_sale_amount", "comment": null}, "mobile_conversion_content_views_assisted": {"type": "integer", "index": 86, "name": "mobile_conversion_content_views_assisted", "comment": null}, "mobile_conversion_content_views_order_quantity": {"type": "integer", "index": 87, "name": "mobile_conversion_content_views_order_quantity", "comment": null}, "mobile_conversion_content_views_post_engagement": {"type": "integer", "index": 88, "name": "mobile_conversion_content_views_post_engagement", "comment": null}, "mobile_conversion_content_views_post_view": {"type": "integer", "index": 89, "name": "mobile_conversion_content_views_post_view", "comment": null}, "mobile_conversion_content_views_sale_amount": {"type": "integer", "index": 90, "name": "mobile_conversion_content_views_sale_amount", "comment": null}, "mobile_conversion_downloads_order_quantity": {"type": "integer", "index": 91, "name": "mobile_conversion_downloads_order_quantity", "comment": null}, "mobile_conversion_downloads_post_engagement": {"type": "integer", "index": 92, "name": "mobile_conversion_downloads_post_engagement", "comment": null}, "mobile_conversion_downloads_post_view": {"type": "integer", "index": 93, "name": "mobile_conversion_downloads_post_view", "comment": null}, "mobile_conversion_downloads_sale_amount": {"type": "integer", "index": 94, "name": "mobile_conversion_downloads_sale_amount", "comment": null}, "mobile_conversion_installs_assisted": {"type": "integer", "index": 95, "name": "mobile_conversion_installs_assisted", "comment": null}, "mobile_conversion_installs_order_quantity": {"type": "integer", "index": 96, "name": "mobile_conversion_installs_order_quantity", "comment": null}, "mobile_conversion_installs_post_engagement": {"type": "integer", "index": 97, "name": "mobile_conversion_installs_post_engagement", "comment": null}, "mobile_conversion_installs_post_view": {"type": "integer", "index": 98, "name": "mobile_conversion_installs_post_view", "comment": null}, "mobile_conversion_installs_sale_amount": {"type": "integer", "index": 99, "name": "mobile_conversion_installs_sale_amount", "comment": null}, "mobile_conversion_installs_skan_post_engagement": {"type": "integer", "index": 100, "name": "mobile_conversion_installs_skan_post_engagement", "comment": null}, "mobile_conversion_installs_skan_post_view": {"type": "integer", "index": 101, "name": "mobile_conversion_installs_skan_post_view", "comment": null}, "mobile_conversion_invites_assisted": {"type": "integer", "index": 102, "name": "mobile_conversion_invites_assisted", "comment": null}, "mobile_conversion_invites_order_quantity": {"type": "integer", "index": 103, "name": "mobile_conversion_invites_order_quantity", "comment": null}, "mobile_conversion_invites_post_engagement": {"type": "integer", "index": 104, "name": "mobile_conversion_invites_post_engagement", "comment": null}, "mobile_conversion_invites_post_view": {"type": "integer", "index": 105, "name": "mobile_conversion_invites_post_view", "comment": null}, "mobile_conversion_invites_sale_amount": {"type": "integer", "index": 106, "name": "mobile_conversion_invites_sale_amount", "comment": null}, "mobile_conversion_key_page_views_post_engagement": {"type": "integer", "index": 107, "name": "mobile_conversion_key_page_views_post_engagement", "comment": null}, "mobile_conversion_key_page_views_post_view": {"type": "integer", "index": 108, "name": "mobile_conversion_key_page_views_post_view", "comment": null}, "mobile_conversion_levels_achieved_assisted": {"type": "integer", "index": 109, "name": "mobile_conversion_levels_achieved_assisted", "comment": null}, "mobile_conversion_levels_achieved_order_quantity": {"type": "integer", "index": 110, "name": "mobile_conversion_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_levels_achieved_post_engagement": {"type": "integer", "index": 111, "name": "mobile_conversion_levels_achieved_post_engagement", "comment": null}, "mobile_conversion_levels_achieved_post_view": {"type": "integer", "index": 112, "name": "mobile_conversion_levels_achieved_post_view", "comment": null}, "mobile_conversion_levels_achieved_sale_amount": {"type": "integer", "index": 113, "name": "mobile_conversion_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_metric": {"type": "integer", "index": 114, "name": "mobile_conversion_lifetime_value_achievements_unlocked_metric", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_order_qu": {"type": "integer", "index": 115, "name": "mobile_conversion_lifetime_value_achievements_unlocked_order_qu", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo": {"type": "integer", "index": 116, "name": "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_metric": {"type": "integer", "index": 117, "name": "mobile_conversion_lifetime_value_add_to_carts_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_order_quantity": {"type": "integer", "index": 118, "name": "mobile_conversion_lifetime_value_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_sale_amount": {"type": "integer", "index": 119, "name": "mobile_conversion_lifetime_value_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_metric": {"type": "integer", "index": 120, "name": "mobile_conversion_lifetime_value_add_to_wishlists_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit": {"type": "integer", "index": 121, "name": "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount": {"type": "integer", "index": 122, "name": "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_metric": {"type": "integer", "index": 123, "name": "mobile_conversion_lifetime_value_checkouts_initiated_metric", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_order_quan": {"type": "integer", "index": 124, "name": "mobile_conversion_lifetime_value_checkouts_initiated_order_quan", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun": {"type": "integer", "index": 125, "name": "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_content_views_metric": {"type": "integer", "index": 126, "name": "mobile_conversion_lifetime_value_content_views_metric", "comment": null}, "mobile_conversion_lifetime_value_content_views_order_quantity": {"type": "integer", "index": 127, "name": "mobile_conversion_lifetime_value_content_views_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_content_views_sale_amount": {"type": "integer", "index": 128, "name": "mobile_conversion_lifetime_value_content_views_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_invites_metric": {"type": "integer", "index": 129, "name": "mobile_conversion_lifetime_value_invites_metric", "comment": null}, "mobile_conversion_lifetime_value_invites_order_quantity": {"type": "integer", "index": 130, "name": "mobile_conversion_lifetime_value_invites_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_invites_sale_amount": {"type": "integer", "index": 131, "name": "mobile_conversion_lifetime_value_invites_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_metric": {"type": "integer", "index": 132, "name": "mobile_conversion_lifetime_value_levels_achieved_metric", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_order_quantity": {"type": "integer", "index": 133, "name": "mobile_conversion_lifetime_value_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_sale_amount": {"type": "integer", "index": 134, "name": "mobile_conversion_lifetime_value_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_logins_metric": {"type": "integer", "index": 135, "name": "mobile_conversion_lifetime_value_logins_metric", "comment": null}, "mobile_conversion_lifetime_value_logins_order_quantity": {"type": "integer", "index": 136, "name": "mobile_conversion_lifetime_value_logins_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_logins_sale_amount": {"type": "integer", "index": 137, "name": "mobile_conversion_lifetime_value_logins_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_metric": {"type": "integer", "index": 138, "name": "mobile_conversion_lifetime_value_payment_info_additions_metric", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_order_q": {"type": "integer", "index": 139, "name": "mobile_conversion_lifetime_value_payment_info_additions_order_q", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_sale_am": {"type": "integer", "index": 140, "name": "mobile_conversion_lifetime_value_payment_info_additions_sale_am", "comment": null}, "mobile_conversion_lifetime_value_purchases_metric": {"type": "integer", "index": 141, "name": "mobile_conversion_lifetime_value_purchases_metric", "comment": null}, "mobile_conversion_lifetime_value_purchases_order_quantity": {"type": "integer", "index": 142, "name": "mobile_conversion_lifetime_value_purchases_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_purchases_sale_amount": {"type": "integer", "index": 143, "name": "mobile_conversion_lifetime_value_purchases_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_rates_metric": {"type": "integer", "index": 144, "name": "mobile_conversion_lifetime_value_rates_metric", "comment": null}, "mobile_conversion_lifetime_value_rates_order_quantity": {"type": "integer", "index": 145, "name": "mobile_conversion_lifetime_value_rates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_rates_sale_amount": {"type": "integer", "index": 146, "name": "mobile_conversion_lifetime_value_rates_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_reservations_metric": {"type": "integer", "index": 147, "name": "mobile_conversion_lifetime_value_reservations_metric", "comment": null}, "mobile_conversion_lifetime_value_reservations_order_quantity": {"type": "integer", "index": 148, "name": "mobile_conversion_lifetime_value_reservations_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_reservations_sale_amount": {"type": "integer", "index": 149, "name": "mobile_conversion_lifetime_value_reservations_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_searches_metric": {"type": "integer", "index": 150, "name": "mobile_conversion_lifetime_value_searches_metric", "comment": null}, "mobile_conversion_lifetime_value_searches_order_quantity": {"type": "integer", "index": 151, "name": "mobile_conversion_lifetime_value_searches_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_searches_sale_amount": {"type": "integer", "index": 152, "name": "mobile_conversion_lifetime_value_searches_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_shares_metric": {"type": "integer", "index": 153, "name": "mobile_conversion_lifetime_value_shares_metric", "comment": null}, "mobile_conversion_lifetime_value_shares_order_quantity": {"type": "integer", "index": 154, "name": "mobile_conversion_lifetime_value_shares_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_shares_sale_amount": {"type": "integer", "index": 155, "name": "mobile_conversion_lifetime_value_shares_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_metric": {"type": "integer", "index": 156, "name": "mobile_conversion_lifetime_value_sign_ups_metric", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_order_quantity": {"type": "integer", "index": 157, "name": "mobile_conversion_lifetime_value_sign_ups_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_sale_amount": {"type": "integer", "index": 158, "name": "mobile_conversion_lifetime_value_sign_ups_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_metric": {"type": "integer", "index": 159, "name": "mobile_conversion_lifetime_value_spent_credits_metric", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_order_quantity": {"type": "integer", "index": 160, "name": "mobile_conversion_lifetime_value_spent_credits_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_sale_amount": {"type": "integer", "index": 161, "name": "mobile_conversion_lifetime_value_spent_credits_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_metric": {"type": "integer", "index": 162, "name": "mobile_conversion_lifetime_value_tutorials_completed_metric", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_order_quan": {"type": "integer", "index": 163, "name": "mobile_conversion_lifetime_value_tutorials_completed_order_quan", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun": {"type": "integer", "index": 164, "name": "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_updates_metric": {"type": "integer", "index": 165, "name": "mobile_conversion_lifetime_value_updates_metric", "comment": null}, "mobile_conversion_lifetime_value_updates_order_quantity": {"type": "integer", "index": 166, "name": "mobile_conversion_lifetime_value_updates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_updates_sale_amount": {"type": "integer", "index": 167, "name": "mobile_conversion_lifetime_value_updates_sale_amount", "comment": null}, "mobile_conversion_logins_assisted": {"type": "integer", "index": 168, "name": "mobile_conversion_logins_assisted", "comment": null}, "mobile_conversion_logins_order_quantity": {"type": "integer", "index": 169, "name": "mobile_conversion_logins_order_quantity", "comment": null}, "mobile_conversion_logins_post_engagement": {"type": "integer", "index": 170, "name": "mobile_conversion_logins_post_engagement", "comment": null}, "mobile_conversion_logins_post_view": {"type": "integer", "index": 171, "name": "mobile_conversion_logins_post_view", "comment": null}, "mobile_conversion_logins_sale_amount": {"type": "integer", "index": 172, "name": "mobile_conversion_logins_sale_amount", "comment": null}, "mobile_conversion_payment_info_additions_assisted": {"type": "integer", "index": 173, "name": "mobile_conversion_payment_info_additions_assisted", "comment": null}, "mobile_conversion_payment_info_additions_order_quantity": {"type": "integer", "index": 174, "name": "mobile_conversion_payment_info_additions_order_quantity", "comment": null}, "mobile_conversion_payment_info_additions_post_engagement": {"type": "integer", "index": 175, "name": "mobile_conversion_payment_info_additions_post_engagement", "comment": null}, "mobile_conversion_payment_info_additions_post_view": {"type": "integer", "index": 176, "name": "mobile_conversion_payment_info_additions_post_view", "comment": null}, "mobile_conversion_payment_info_additions_sale_amount": {"type": "integer", "index": 177, "name": "mobile_conversion_payment_info_additions_sale_amount", "comment": null}, "mobile_conversion_purchases_assisted": {"type": "integer", "index": 178, "name": "mobile_conversion_purchases_assisted", "comment": null}, "mobile_conversion_purchases_order_quantity": {"type": "integer", "index": 179, "name": "mobile_conversion_purchases_order_quantity", "comment": null}, "mobile_conversion_purchases_post_engagement": {"type": "integer", "index": 180, "name": "mobile_conversion_purchases_post_engagement", "comment": null}, "mobile_conversion_purchases_post_view": {"type": "integer", "index": 181, "name": "mobile_conversion_purchases_post_view", "comment": null}, "mobile_conversion_purchases_sale_amount": {"type": "integer", "index": 182, "name": "mobile_conversion_purchases_sale_amount", "comment": null}, "mobile_conversion_purchases_skan_post_engagement": {"type": "integer", "index": 183, "name": "mobile_conversion_purchases_skan_post_engagement", "comment": null}, "mobile_conversion_purchases_skan_post_view": {"type": "integer", "index": 184, "name": "mobile_conversion_purchases_skan_post_view", "comment": null}, "mobile_conversion_rates_assisted": {"type": "integer", "index": 185, "name": "mobile_conversion_rates_assisted", "comment": null}, "mobile_conversion_rates_order_quantity": {"type": "integer", "index": 186, "name": "mobile_conversion_rates_order_quantity", "comment": null}, "mobile_conversion_rates_post_engagement": {"type": "integer", "index": 187, "name": "mobile_conversion_rates_post_engagement", "comment": null}, "mobile_conversion_rates_post_view": {"type": "integer", "index": 188, "name": "mobile_conversion_rates_post_view", "comment": null}, "mobile_conversion_rates_sale_amount": {"type": "integer", "index": 189, "name": "mobile_conversion_rates_sale_amount", "comment": null}, "mobile_conversion_re_engages_assisted": {"type": "integer", "index": 190, "name": "mobile_conversion_re_engages_assisted", "comment": null}, "mobile_conversion_re_engages_order_quantity": {"type": "integer", "index": 191, "name": "mobile_conversion_re_engages_order_quantity", "comment": null}, "mobile_conversion_re_engages_post_engagement": {"type": "integer", "index": 192, "name": "mobile_conversion_re_engages_post_engagement", "comment": null}, "mobile_conversion_re_engages_post_view": {"type": "integer", "index": 193, "name": "mobile_conversion_re_engages_post_view", "comment": null}, "mobile_conversion_re_engages_sale_amount": {"type": "integer", "index": 194, "name": "mobile_conversion_re_engages_sale_amount", "comment": null}, "mobile_conversion_reservations_assisted": {"type": "integer", "index": 195, "name": "mobile_conversion_reservations_assisted", "comment": null}, "mobile_conversion_reservations_order_quantity": {"type": "integer", "index": 196, "name": "mobile_conversion_reservations_order_quantity", "comment": null}, "mobile_conversion_reservations_post_engagement": {"type": "integer", "index": 197, "name": "mobile_conversion_reservations_post_engagement", "comment": null}, "mobile_conversion_reservations_post_view": {"type": "integer", "index": 198, "name": "mobile_conversion_reservations_post_view", "comment": null}, "mobile_conversion_reservations_sale_amount": {"type": "integer", "index": 199, "name": "mobile_conversion_reservations_sale_amount", "comment": null}, "mobile_conversion_searches_assisted": {"type": "integer", "index": 200, "name": "mobile_conversion_searches_assisted", "comment": null}, "mobile_conversion_searches_order_quantity": {"type": "integer", "index": 201, "name": "mobile_conversion_searches_order_quantity", "comment": null}, "mobile_conversion_searches_post_engagement": {"type": "integer", "index": 202, "name": "mobile_conversion_searches_post_engagement", "comment": null}, "mobile_conversion_searches_post_view": {"type": "integer", "index": 203, "name": "mobile_conversion_searches_post_view", "comment": null}, "mobile_conversion_searches_sale_amount": {"type": "integer", "index": 204, "name": "mobile_conversion_searches_sale_amount", "comment": null}, "mobile_conversion_shares_assisted": {"type": "integer", "index": 205, "name": "mobile_conversion_shares_assisted", "comment": null}, "mobile_conversion_shares_order_quantity": {"type": "integer", "index": 206, "name": "mobile_conversion_shares_order_quantity", "comment": null}, "mobile_conversion_shares_post_engagement": {"type": "integer", "index": 207, "name": "mobile_conversion_shares_post_engagement", "comment": null}, "mobile_conversion_shares_post_view": {"type": "integer", "index": 208, "name": "mobile_conversion_shares_post_view", "comment": null}, "mobile_conversion_shares_sale_amount": {"type": "integer", "index": 209, "name": "mobile_conversion_shares_sale_amount", "comment": null}, "mobile_conversion_sign_ups_assisted": {"type": "integer", "index": 210, "name": "mobile_conversion_sign_ups_assisted", "comment": null}, "mobile_conversion_sign_ups_order_quantity": {"type": "integer", "index": 211, "name": "mobile_conversion_sign_ups_order_quantity", "comment": null}, "mobile_conversion_sign_ups_post_engagement": {"type": "integer", "index": 212, "name": "mobile_conversion_sign_ups_post_engagement", "comment": null}, "mobile_conversion_sign_ups_post_view": {"type": "integer", "index": 213, "name": "mobile_conversion_sign_ups_post_view", "comment": null}, "mobile_conversion_sign_ups_sale_amount": {"type": "integer", "index": 214, "name": "mobile_conversion_sign_ups_sale_amount", "comment": null}, "mobile_conversion_site_visits_order_quantity": {"type": "integer", "index": 215, "name": "mobile_conversion_site_visits_order_quantity", "comment": null}, "mobile_conversion_site_visits_post_engagement": {"type": "integer", "index": 216, "name": "mobile_conversion_site_visits_post_engagement", "comment": null}, "mobile_conversion_site_visits_post_view": {"type": "integer", "index": 217, "name": "mobile_conversion_site_visits_post_view", "comment": null}, "mobile_conversion_site_visits_sale_amount": {"type": "integer", "index": 218, "name": "mobile_conversion_site_visits_sale_amount", "comment": null}, "mobile_conversion_spent_credits_assisted": {"type": "integer", "index": 219, "name": "mobile_conversion_spent_credits_assisted", "comment": null}, "mobile_conversion_spent_credits_order_quantity": {"type": "integer", "index": 220, "name": "mobile_conversion_spent_credits_order_quantity", "comment": null}, "mobile_conversion_spent_credits_post_engagement": {"type": "integer", "index": 221, "name": "mobile_conversion_spent_credits_post_engagement", "comment": null}, "mobile_conversion_spent_credits_post_view": {"type": "integer", "index": 222, "name": "mobile_conversion_spent_credits_post_view", "comment": null}, "mobile_conversion_spent_credits_sale_amount": {"type": "integer", "index": 223, "name": "mobile_conversion_spent_credits_sale_amount", "comment": null}, "mobile_conversion_tutorials_completed_assisted": {"type": "integer", "index": 224, "name": "mobile_conversion_tutorials_completed_assisted", "comment": null}, "mobile_conversion_tutorials_completed_order_quantity": {"type": "integer", "index": 225, "name": "mobile_conversion_tutorials_completed_order_quantity", "comment": null}, "mobile_conversion_tutorials_completed_post_engagement": {"type": "integer", "index": 226, "name": "mobile_conversion_tutorials_completed_post_engagement", "comment": null}, "mobile_conversion_tutorials_completed_post_view": {"type": "integer", "index": 227, "name": "mobile_conversion_tutorials_completed_post_view", "comment": null}, "mobile_conversion_tutorials_completed_sale_amount": {"type": "integer", "index": 228, "name": "mobile_conversion_tutorials_completed_sale_amount", "comment": null}, "mobile_conversion_updates_assisted": {"type": "integer", "index": 229, "name": "mobile_conversion_updates_assisted", "comment": null}, "mobile_conversion_updates_order_quantity": {"type": "integer", "index": 230, "name": "mobile_conversion_updates_order_quantity", "comment": null}, "mobile_conversion_updates_post_engagement": {"type": "integer", "index": 231, "name": "mobile_conversion_updates_post_engagement", "comment": null}, "mobile_conversion_updates_post_view": {"type": "integer", "index": 232, "name": "mobile_conversion_updates_post_view", "comment": null}, "mobile_conversion_updates_sale_amount": {"type": "integer", "index": 233, "name": "mobile_conversion_updates_sale_amount", "comment": null}, "poll_card_vote": {"type": "integer", "index": 234, "name": "poll_card_vote", "comment": null}, "qualified_impressions": {"type": "integer", "index": 235, "name": "qualified_impressions", "comment": null}, "replies": {"type": "integer", "index": 236, "name": "replies", "comment": null}, "retweets": {"type": "integer", "index": 237, "name": "retweets", "comment": null}, "tweets_send": {"type": "integer", "index": 238, "name": "tweets_send", "comment": null}, "unfollows": {"type": "integer", "index": 239, "name": "unfollows", "comment": null}, "url_clicks": {"type": "integer", "index": 240, "name": "url_clicks", "comment": null}, "video_15_s_views": {"type": "integer", "index": 241, "name": "video_15_s_views", "comment": null}, "video_3_s_100_pct_views": {"type": "integer", "index": 242, "name": "video_3_s_100_pct_views", "comment": null}, "video_6_s_views": {"type": "integer", "index": 243, "name": "video_6_s_views", "comment": null}, "video_content_starts": {"type": "integer", "index": 244, "name": "video_content_starts", "comment": null}, "video_cta_clicks": {"type": "integer", "index": 245, "name": "video_cta_clicks", "comment": null}, "video_total_views": {"type": "integer", "index": 246, "name": "video_total_views", "comment": null}, "video_views_100": {"type": "integer", "index": 247, "name": "video_views_100", "comment": null}, "video_views_25": {"type": "integer", "index": 248, "name": "video_views_25", "comment": null}, "video_views_50": {"type": "integer", "index": 249, "name": "video_views_50", "comment": null}, "video_views_75": {"type": "integer", "index": 250, "name": "video_views_75", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__line_item_keywords_report_tmp"}, "model.twitter_ads.stg_twitter_ads__line_item_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__line_item_report", "database": "postgres", "comment": "Each record represents the performance of a line item (ad group) on a given day, for its placement in Twitter.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": "The ID of the related account."}, "line_item_id": {"type": "text", "index": 4, "name": "line_item_id", "comment": "The ID of the line item."}, "placement": {"type": "text", "index": 5, "name": "placement", "comment": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`."}, "clicks": {"type": "integer", "index": 6, "name": "clicks", "comment": "The clicks for the line item on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes."}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": "The impressions for the line item on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results."}, "spend_micro": {"type": "integer", "index": 8, "name": "spend_micro", "comment": "The spend for the line item on that day, in micros and in whichever currency was selected during account creation."}, "spend": {"type": "numeric", "index": 9, "name": "spend", "comment": "The spend for the line item on that day in whichever currency was selected during account creation."}, "url_clicks": {"type": "integer", "index": 10, "name": "url_clicks", "comment": "The url clicks for the line item on that day."}, "conversion_purchases_metric": {"type": "bigint", "index": 11, "name": "conversion_purchases_metric", "comment": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_custom_metric": {"type": "bigint", "index": 12, "name": "conversion_custom_metric", "comment": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_purchases_sale_amount": {"type": "double precision", "index": 13, "name": "conversion_purchases_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}, "conversion_custom_sale_amount": {"type": "double precision", "index": 14, "name": "conversion_custom_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__line_item_report"}, "model.twitter_ads.stg_twitter_ads__line_item_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__line_item_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "text", "index": 1, "name": "account_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "line_item_id": {"type": "text", "index": 3, "name": "line_item_id", "comment": null}, "placement": {"type": "text", "index": 4, "name": "placement", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "app_clicks": {"type": "integer", "index": 6, "name": "app_clicks", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 7, "name": "billed_charge_local_micro", "comment": null}, "billed_engagements": {"type": "integer", "index": 8, "name": "billed_engagements", "comment": null}, "card_engagements": {"type": "integer", "index": 9, "name": "card_engagements", "comment": null}, "carousel_swipes": {"type": "integer", "index": 10, "name": "carousel_swipes", "comment": null}, "clicks": {"type": "integer", "index": 11, "name": "clicks", "comment": null}, "conversion_custom_metric": {"type": "integer", "index": 12, "name": "conversion_custom_metric", "comment": null}, "conversion_custom_order_quantity": {"type": "integer", "index": 13, "name": "conversion_custom_order_quantity", "comment": null}, "conversion_custom_order_quantity_engagement": {"type": "integer", "index": 14, "name": "conversion_custom_order_quantity_engagement", "comment": null}, "conversion_custom_order_quantity_view": {"type": "integer", "index": 15, "name": "conversion_custom_order_quantity_view", "comment": null}, "conversion_custom_post_engagement": {"type": "integer", "index": 16, "name": "conversion_custom_post_engagement", "comment": null}, "conversion_custom_post_view": {"type": "integer", "index": 17, "name": "conversion_custom_post_view", "comment": null}, "conversion_custom_sale_amount": {"type": "integer", "index": 18, "name": "conversion_custom_sale_amount", "comment": null}, "conversion_custom_sale_amount_engagement": {"type": "integer", "index": 19, "name": "conversion_custom_sale_amount_engagement", "comment": null}, "conversion_custom_sale_amount_view": {"type": "integer", "index": 20, "name": "conversion_custom_sale_amount_view", "comment": null}, "conversion_downloads_metric": {"type": "integer", "index": 21, "name": "conversion_downloads_metric", "comment": null}, "conversion_downloads_order_quantity": {"type": "integer", "index": 22, "name": "conversion_downloads_order_quantity", "comment": null}, "conversion_downloads_order_quantity_engagement": {"type": "integer", "index": 23, "name": "conversion_downloads_order_quantity_engagement", "comment": null}, "conversion_downloads_order_quantity_view": {"type": "integer", "index": 24, "name": "conversion_downloads_order_quantity_view", "comment": null}, "conversion_downloads_post_engagement": {"type": "integer", "index": 25, "name": "conversion_downloads_post_engagement", "comment": null}, "conversion_downloads_post_view": {"type": "integer", "index": 26, "name": "conversion_downloads_post_view", "comment": null}, "conversion_downloads_sale_amount": {"type": "integer", "index": 27, "name": "conversion_downloads_sale_amount", "comment": null}, "conversion_downloads_sale_amount_engagement": {"type": "integer", "index": 28, "name": "conversion_downloads_sale_amount_engagement", "comment": null}, "conversion_downloads_sale_amount_view": {"type": "integer", "index": 29, "name": "conversion_downloads_sale_amount_view", "comment": null}, "conversion_purchases_assisted": {"type": "integer", "index": 30, "name": "conversion_purchases_assisted", "comment": null}, "conversion_purchases_metric": {"type": "integer", "index": 31, "name": "conversion_purchases_metric", "comment": null}, "conversion_purchases_order_quantity": {"type": "integer", "index": 32, "name": "conversion_purchases_order_quantity", "comment": null}, "conversion_purchases_order_quantity_engagement": {"type": "integer", "index": 33, "name": "conversion_purchases_order_quantity_engagement", "comment": null}, "conversion_purchases_order_quantity_view": {"type": "integer", "index": 34, "name": "conversion_purchases_order_quantity_view", "comment": null}, "conversion_purchases_post_engagement": {"type": "integer", "index": 35, "name": "conversion_purchases_post_engagement", "comment": null}, "conversion_purchases_post_view": {"type": "integer", "index": 36, "name": "conversion_purchases_post_view", "comment": null}, "conversion_purchases_sale_amount": {"type": "integer", "index": 37, "name": "conversion_purchases_sale_amount", "comment": null}, "conversion_purchases_sale_amount_engagement": {"type": "integer", "index": 38, "name": "conversion_purchases_sale_amount_engagement", "comment": null}, "conversion_purchases_sale_amount_view": {"type": "integer", "index": 39, "name": "conversion_purchases_sale_amount_view", "comment": null}, "conversion_sign_ups_assisted": {"type": "integer", "index": 40, "name": "conversion_sign_ups_assisted", "comment": null}, "conversion_sign_ups_metric": {"type": "integer", "index": 41, "name": "conversion_sign_ups_metric", "comment": null}, "conversion_sign_ups_order_quantity": {"type": "integer", "index": 42, "name": "conversion_sign_ups_order_quantity", "comment": null}, "conversion_sign_ups_order_quantity_engagement": {"type": "integer", "index": 43, "name": "conversion_sign_ups_order_quantity_engagement", "comment": null}, "conversion_sign_ups_order_quantity_view": {"type": "integer", "index": 44, "name": "conversion_sign_ups_order_quantity_view", "comment": null}, "conversion_sign_ups_post_engagement": {"type": "integer", "index": 45, "name": "conversion_sign_ups_post_engagement", "comment": null}, "conversion_sign_ups_post_view": {"type": "integer", "index": 46, "name": "conversion_sign_ups_post_view", "comment": null}, "conversion_sign_ups_sale_amount": {"type": "integer", "index": 47, "name": "conversion_sign_ups_sale_amount", "comment": null}, "conversion_sign_ups_sale_amount_engagement": {"type": "integer", "index": 48, "name": "conversion_sign_ups_sale_amount_engagement", "comment": null}, "conversion_sign_ups_sale_amount_view": {"type": "integer", "index": 49, "name": "conversion_sign_ups_sale_amount_view", "comment": null}, "conversion_site_visits_metric": {"type": "integer", "index": 50, "name": "conversion_site_visits_metric", "comment": null}, "conversion_site_visits_order_quantity": {"type": "integer", "index": 51, "name": "conversion_site_visits_order_quantity", "comment": null}, "conversion_site_visits_order_quantity_engagement": {"type": "integer", "index": 52, "name": "conversion_site_visits_order_quantity_engagement", "comment": null}, "conversion_site_visits_order_quantity_view": {"type": "integer", "index": 53, "name": "conversion_site_visits_order_quantity_view", "comment": null}, "conversion_site_visits_post_engagement": {"type": "integer", "index": 54, "name": "conversion_site_visits_post_engagement", "comment": null}, "conversion_site_visits_post_view": {"type": "integer", "index": 55, "name": "conversion_site_visits_post_view", "comment": null}, "conversion_site_visits_sale_amount": {"type": "integer", "index": 56, "name": "conversion_site_visits_sale_amount", "comment": null}, "conversion_site_visits_sale_amount_engagement": {"type": "integer", "index": 57, "name": "conversion_site_visits_sale_amount_engagement", "comment": null}, "conversion_site_visits_sale_amount_view": {"type": "integer", "index": 58, "name": "conversion_site_visits_sale_amount_view", "comment": null}, "engagements": {"type": "integer", "index": 59, "name": "engagements", "comment": null}, "follows": {"type": "integer", "index": 60, "name": "follows", "comment": null}, "impressions": {"type": "integer", "index": 61, "name": "impressions", "comment": null}, "likes": {"type": "integer", "index": 62, "name": "likes", "comment": null}, "media_engagements": {"type": "integer", "index": 63, "name": "media_engagements", "comment": null}, "media_views": {"type": "integer", "index": 64, "name": "media_views", "comment": null}, "mobile_conversion_achievements_unlocked_assisted": {"type": "integer", "index": 65, "name": "mobile_conversion_achievements_unlocked_assisted", "comment": null}, "mobile_conversion_achievements_unlocked_order_quantity": {"type": "integer", "index": 66, "name": "mobile_conversion_achievements_unlocked_order_quantity", "comment": null}, "mobile_conversion_achievements_unlocked_post_engagement": {"type": "integer", "index": 67, "name": "mobile_conversion_achievements_unlocked_post_engagement", "comment": null}, "mobile_conversion_achievements_unlocked_post_view": {"type": "integer", "index": 68, "name": "mobile_conversion_achievements_unlocked_post_view", "comment": null}, "mobile_conversion_achievements_unlocked_sale_amount": {"type": "integer", "index": 69, "name": "mobile_conversion_achievements_unlocked_sale_amount", "comment": null}, "mobile_conversion_add_to_carts_assisted": {"type": "integer", "index": 70, "name": "mobile_conversion_add_to_carts_assisted", "comment": null}, "mobile_conversion_add_to_carts_order_quantity": {"type": "integer", "index": 71, "name": "mobile_conversion_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_add_to_carts_post_engagement": {"type": "integer", "index": 72, "name": "mobile_conversion_add_to_carts_post_engagement", "comment": null}, "mobile_conversion_add_to_carts_post_view": {"type": "integer", "index": 73, "name": "mobile_conversion_add_to_carts_post_view", "comment": null}, "mobile_conversion_add_to_carts_sale_amount": {"type": "integer", "index": 74, "name": "mobile_conversion_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_add_to_wishlists_assisted": {"type": "integer", "index": 75, "name": "mobile_conversion_add_to_wishlists_assisted", "comment": null}, "mobile_conversion_add_to_wishlists_order_quantity": {"type": "integer", "index": 76, "name": "mobile_conversion_add_to_wishlists_order_quantity", "comment": null}, "mobile_conversion_add_to_wishlists_post_engagement": {"type": "integer", "index": 77, "name": "mobile_conversion_add_to_wishlists_post_engagement", "comment": null}, "mobile_conversion_add_to_wishlists_post_view": {"type": "integer", "index": 78, "name": "mobile_conversion_add_to_wishlists_post_view", "comment": null}, "mobile_conversion_add_to_wishlists_sale_amount": {"type": "integer", "index": 79, "name": "mobile_conversion_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_checkouts_initiated_assisted": {"type": "integer", "index": 80, "name": "mobile_conversion_checkouts_initiated_assisted", "comment": null}, "mobile_conversion_checkouts_initiated_order_quantity": {"type": "integer", "index": 81, "name": "mobile_conversion_checkouts_initiated_order_quantity", "comment": null}, "mobile_conversion_checkouts_initiated_post_engagement": {"type": "integer", "index": 82, "name": "mobile_conversion_checkouts_initiated_post_engagement", "comment": null}, "mobile_conversion_checkouts_initiated_post_view": {"type": "integer", "index": 83, "name": "mobile_conversion_checkouts_initiated_post_view", "comment": null}, "mobile_conversion_checkouts_initiated_sale_amount": {"type": "integer", "index": 84, "name": "mobile_conversion_checkouts_initiated_sale_amount", "comment": null}, "mobile_conversion_content_views_assisted": {"type": "integer", "index": 85, "name": "mobile_conversion_content_views_assisted", "comment": null}, "mobile_conversion_content_views_order_quantity": {"type": "integer", "index": 86, "name": "mobile_conversion_content_views_order_quantity", "comment": null}, "mobile_conversion_content_views_post_engagement": {"type": "integer", "index": 87, "name": "mobile_conversion_content_views_post_engagement", "comment": null}, "mobile_conversion_content_views_post_view": {"type": "integer", "index": 88, "name": "mobile_conversion_content_views_post_view", "comment": null}, "mobile_conversion_content_views_sale_amount": {"type": "integer", "index": 89, "name": "mobile_conversion_content_views_sale_amount", "comment": null}, "mobile_conversion_downloads_order_quantity": {"type": "integer", "index": 90, "name": "mobile_conversion_downloads_order_quantity", "comment": null}, "mobile_conversion_downloads_post_engagement": {"type": "integer", "index": 91, "name": "mobile_conversion_downloads_post_engagement", "comment": null}, "mobile_conversion_downloads_post_view": {"type": "integer", "index": 92, "name": "mobile_conversion_downloads_post_view", "comment": null}, "mobile_conversion_downloads_sale_amount": {"type": "integer", "index": 93, "name": "mobile_conversion_downloads_sale_amount", "comment": null}, "mobile_conversion_installs_assisted": {"type": "integer", "index": 94, "name": "mobile_conversion_installs_assisted", "comment": null}, "mobile_conversion_installs_order_quantity": {"type": "integer", "index": 95, "name": "mobile_conversion_installs_order_quantity", "comment": null}, "mobile_conversion_installs_post_engagement": {"type": "integer", "index": 96, "name": "mobile_conversion_installs_post_engagement", "comment": null}, "mobile_conversion_installs_post_view": {"type": "integer", "index": 97, "name": "mobile_conversion_installs_post_view", "comment": null}, "mobile_conversion_installs_sale_amount": {"type": "integer", "index": 98, "name": "mobile_conversion_installs_sale_amount", "comment": null}, "mobile_conversion_invites_assisted": {"type": "integer", "index": 99, "name": "mobile_conversion_invites_assisted", "comment": null}, "mobile_conversion_invites_order_quantity": {"type": "integer", "index": 100, "name": "mobile_conversion_invites_order_quantity", "comment": null}, "mobile_conversion_invites_post_engagement": {"type": "integer", "index": 101, "name": "mobile_conversion_invites_post_engagement", "comment": null}, "mobile_conversion_invites_post_view": {"type": "integer", "index": 102, "name": "mobile_conversion_invites_post_view", "comment": null}, "mobile_conversion_invites_sale_amount": {"type": "integer", "index": 103, "name": "mobile_conversion_invites_sale_amount", "comment": null}, "mobile_conversion_key_page_views_post_engagement": {"type": "integer", "index": 104, "name": "mobile_conversion_key_page_views_post_engagement", "comment": null}, "mobile_conversion_key_page_views_post_view": {"type": "integer", "index": 105, "name": "mobile_conversion_key_page_views_post_view", "comment": null}, "mobile_conversion_levels_achieved_assisted": {"type": "integer", "index": 106, "name": "mobile_conversion_levels_achieved_assisted", "comment": null}, "mobile_conversion_levels_achieved_order_quantity": {"type": "integer", "index": 107, "name": "mobile_conversion_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_levels_achieved_post_engagement": {"type": "integer", "index": 108, "name": "mobile_conversion_levels_achieved_post_engagement", "comment": null}, "mobile_conversion_levels_achieved_post_view": {"type": "integer", "index": 109, "name": "mobile_conversion_levels_achieved_post_view", "comment": null}, "mobile_conversion_levels_achieved_sale_amount": {"type": "integer", "index": 110, "name": "mobile_conversion_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_metric": {"type": "integer", "index": 111, "name": "mobile_conversion_lifetime_value_achievements_unlocked_metric", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_order_qu": {"type": "integer", "index": 112, "name": "mobile_conversion_lifetime_value_achievements_unlocked_order_qu", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo": {"type": "integer", "index": 113, "name": "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_metric": {"type": "integer", "index": 114, "name": "mobile_conversion_lifetime_value_add_to_carts_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_order_quantity": {"type": "integer", "index": 115, "name": "mobile_conversion_lifetime_value_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_sale_amount": {"type": "integer", "index": 116, "name": "mobile_conversion_lifetime_value_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_metric": {"type": "integer", "index": 117, "name": "mobile_conversion_lifetime_value_add_to_wishlists_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit": {"type": "integer", "index": 118, "name": "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount": {"type": "integer", "index": 119, "name": "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_metric": {"type": "integer", "index": 120, "name": "mobile_conversion_lifetime_value_checkouts_initiated_metric", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_order_quan": {"type": "integer", "index": 121, "name": "mobile_conversion_lifetime_value_checkouts_initiated_order_quan", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun": {"type": "integer", "index": 122, "name": "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_content_views_metric": {"type": "integer", "index": 123, "name": "mobile_conversion_lifetime_value_content_views_metric", "comment": null}, "mobile_conversion_lifetime_value_content_views_order_quantity": {"type": "integer", "index": 124, "name": "mobile_conversion_lifetime_value_content_views_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_content_views_sale_amount": {"type": "integer", "index": 125, "name": "mobile_conversion_lifetime_value_content_views_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_invites_metric": {"type": "integer", "index": 126, "name": "mobile_conversion_lifetime_value_invites_metric", "comment": null}, "mobile_conversion_lifetime_value_invites_order_quantity": {"type": "integer", "index": 127, "name": "mobile_conversion_lifetime_value_invites_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_invites_sale_amount": {"type": "integer", "index": 128, "name": "mobile_conversion_lifetime_value_invites_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_metric": {"type": "integer", "index": 129, "name": "mobile_conversion_lifetime_value_levels_achieved_metric", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_order_quantity": {"type": "integer", "index": 130, "name": "mobile_conversion_lifetime_value_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_sale_amount": {"type": "integer", "index": 131, "name": "mobile_conversion_lifetime_value_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_logins_metric": {"type": "integer", "index": 132, "name": "mobile_conversion_lifetime_value_logins_metric", "comment": null}, "mobile_conversion_lifetime_value_logins_order_quantity": {"type": "integer", "index": 133, "name": "mobile_conversion_lifetime_value_logins_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_logins_sale_amount": {"type": "integer", "index": 134, "name": "mobile_conversion_lifetime_value_logins_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_metric": {"type": "integer", "index": 135, "name": "mobile_conversion_lifetime_value_payment_info_additions_metric", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_order_q": {"type": "integer", "index": 136, "name": "mobile_conversion_lifetime_value_payment_info_additions_order_q", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_sale_am": {"type": "integer", "index": 137, "name": "mobile_conversion_lifetime_value_payment_info_additions_sale_am", "comment": null}, "mobile_conversion_lifetime_value_purchases_metric": {"type": "integer", "index": 138, "name": "mobile_conversion_lifetime_value_purchases_metric", "comment": null}, "mobile_conversion_lifetime_value_purchases_order_quantity": {"type": "integer", "index": 139, "name": "mobile_conversion_lifetime_value_purchases_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_purchases_sale_amount": {"type": "integer", "index": 140, "name": "mobile_conversion_lifetime_value_purchases_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_rates_metric": {"type": "integer", "index": 141, "name": "mobile_conversion_lifetime_value_rates_metric", "comment": null}, "mobile_conversion_lifetime_value_rates_order_quantity": {"type": "integer", "index": 142, "name": "mobile_conversion_lifetime_value_rates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_rates_sale_amount": {"type": "integer", "index": 143, "name": "mobile_conversion_lifetime_value_rates_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_reservations_metric": {"type": "integer", "index": 144, "name": "mobile_conversion_lifetime_value_reservations_metric", "comment": null}, "mobile_conversion_lifetime_value_reservations_order_quantity": {"type": "integer", "index": 145, "name": "mobile_conversion_lifetime_value_reservations_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_reservations_sale_amount": {"type": "integer", "index": 146, "name": "mobile_conversion_lifetime_value_reservations_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_searches_metric": {"type": "integer", "index": 147, "name": "mobile_conversion_lifetime_value_searches_metric", "comment": null}, "mobile_conversion_lifetime_value_searches_order_quantity": {"type": "integer", "index": 148, "name": "mobile_conversion_lifetime_value_searches_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_searches_sale_amount": {"type": "integer", "index": 149, "name": "mobile_conversion_lifetime_value_searches_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_shares_metric": {"type": "integer", "index": 150, "name": "mobile_conversion_lifetime_value_shares_metric", "comment": null}, "mobile_conversion_lifetime_value_shares_order_quantity": {"type": "integer", "index": 151, "name": "mobile_conversion_lifetime_value_shares_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_shares_sale_amount": {"type": "integer", "index": 152, "name": "mobile_conversion_lifetime_value_shares_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_metric": {"type": "integer", "index": 153, "name": "mobile_conversion_lifetime_value_sign_ups_metric", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_order_quantity": {"type": "integer", "index": 154, "name": "mobile_conversion_lifetime_value_sign_ups_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_sale_amount": {"type": "integer", "index": 155, "name": "mobile_conversion_lifetime_value_sign_ups_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_metric": {"type": "integer", "index": 156, "name": "mobile_conversion_lifetime_value_spent_credits_metric", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_order_quantity": {"type": "integer", "index": 157, "name": "mobile_conversion_lifetime_value_spent_credits_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_sale_amount": {"type": "integer", "index": 158, "name": "mobile_conversion_lifetime_value_spent_credits_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_metric": {"type": "integer", "index": 159, "name": "mobile_conversion_lifetime_value_tutorials_completed_metric", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_order_quan": {"type": "integer", "index": 160, "name": "mobile_conversion_lifetime_value_tutorials_completed_order_quan", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun": {"type": "integer", "index": 161, "name": "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_updates_metric": {"type": "integer", "index": 162, "name": "mobile_conversion_lifetime_value_updates_metric", "comment": null}, "mobile_conversion_lifetime_value_updates_order_quantity": {"type": "integer", "index": 163, "name": "mobile_conversion_lifetime_value_updates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_updates_sale_amount": {"type": "integer", "index": 164, "name": "mobile_conversion_lifetime_value_updates_sale_amount", "comment": null}, "mobile_conversion_logins_assisted": {"type": "integer", "index": 165, "name": "mobile_conversion_logins_assisted", "comment": null}, "mobile_conversion_logins_order_quantity": {"type": "integer", "index": 166, "name": "mobile_conversion_logins_order_quantity", "comment": null}, "mobile_conversion_logins_post_engagement": {"type": "integer", "index": 167, "name": "mobile_conversion_logins_post_engagement", "comment": null}, "mobile_conversion_logins_post_view": {"type": "integer", "index": 168, "name": "mobile_conversion_logins_post_view", "comment": null}, "mobile_conversion_logins_sale_amount": {"type": "integer", "index": 169, "name": "mobile_conversion_logins_sale_amount", "comment": null}, "mobile_conversion_payment_info_additions_assisted": {"type": "integer", "index": 170, "name": "mobile_conversion_payment_info_additions_assisted", "comment": null}, "mobile_conversion_payment_info_additions_order_quantity": {"type": "integer", "index": 171, "name": "mobile_conversion_payment_info_additions_order_quantity", "comment": null}, "mobile_conversion_payment_info_additions_post_engagement": {"type": "integer", "index": 172, "name": "mobile_conversion_payment_info_additions_post_engagement", "comment": null}, "mobile_conversion_payment_info_additions_post_view": {"type": "integer", "index": 173, "name": "mobile_conversion_payment_info_additions_post_view", "comment": null}, "mobile_conversion_payment_info_additions_sale_amount": {"type": "integer", "index": 174, "name": "mobile_conversion_payment_info_additions_sale_amount", "comment": null}, "mobile_conversion_purchases_assisted": {"type": "integer", "index": 175, "name": "mobile_conversion_purchases_assisted", "comment": null}, "mobile_conversion_purchases_order_quantity": {"type": "integer", "index": 176, "name": "mobile_conversion_purchases_order_quantity", "comment": null}, "mobile_conversion_purchases_post_engagement": {"type": "integer", "index": 177, "name": "mobile_conversion_purchases_post_engagement", "comment": null}, "mobile_conversion_purchases_post_view": {"type": "integer", "index": 178, "name": "mobile_conversion_purchases_post_view", "comment": null}, "mobile_conversion_purchases_sale_amount": {"type": "integer", "index": 179, "name": "mobile_conversion_purchases_sale_amount", "comment": null}, "mobile_conversion_rates_assisted": {"type": "integer", "index": 180, "name": "mobile_conversion_rates_assisted", "comment": null}, "mobile_conversion_rates_order_quantity": {"type": "integer", "index": 181, "name": "mobile_conversion_rates_order_quantity", "comment": null}, "mobile_conversion_rates_post_engagement": {"type": "integer", "index": 182, "name": "mobile_conversion_rates_post_engagement", "comment": null}, "mobile_conversion_rates_post_view": {"type": "integer", "index": 183, "name": "mobile_conversion_rates_post_view", "comment": null}, "mobile_conversion_rates_sale_amount": {"type": "integer", "index": 184, "name": "mobile_conversion_rates_sale_amount", "comment": null}, "mobile_conversion_re_engages_assisted": {"type": "integer", "index": 185, "name": "mobile_conversion_re_engages_assisted", "comment": null}, "mobile_conversion_re_engages_order_quantity": {"type": "integer", "index": 186, "name": "mobile_conversion_re_engages_order_quantity", "comment": null}, "mobile_conversion_re_engages_post_engagement": {"type": "integer", "index": 187, "name": "mobile_conversion_re_engages_post_engagement", "comment": null}, "mobile_conversion_re_engages_post_view": {"type": "integer", "index": 188, "name": "mobile_conversion_re_engages_post_view", "comment": null}, "mobile_conversion_re_engages_sale_amount": {"type": "integer", "index": 189, "name": "mobile_conversion_re_engages_sale_amount", "comment": null}, "mobile_conversion_reservations_assisted": {"type": "integer", "index": 190, "name": "mobile_conversion_reservations_assisted", "comment": null}, "mobile_conversion_reservations_order_quantity": {"type": "integer", "index": 191, "name": "mobile_conversion_reservations_order_quantity", "comment": null}, "mobile_conversion_reservations_post_engagement": {"type": "integer", "index": 192, "name": "mobile_conversion_reservations_post_engagement", "comment": null}, "mobile_conversion_reservations_post_view": {"type": "integer", "index": 193, "name": "mobile_conversion_reservations_post_view", "comment": null}, "mobile_conversion_reservations_sale_amount": {"type": "integer", "index": 194, "name": "mobile_conversion_reservations_sale_amount", "comment": null}, "mobile_conversion_searches_assisted": {"type": "integer", "index": 195, "name": "mobile_conversion_searches_assisted", "comment": null}, "mobile_conversion_searches_order_quantity": {"type": "integer", "index": 196, "name": "mobile_conversion_searches_order_quantity", "comment": null}, "mobile_conversion_searches_post_engagement": {"type": "integer", "index": 197, "name": "mobile_conversion_searches_post_engagement", "comment": null}, "mobile_conversion_searches_post_view": {"type": "integer", "index": 198, "name": "mobile_conversion_searches_post_view", "comment": null}, "mobile_conversion_searches_sale_amount": {"type": "integer", "index": 199, "name": "mobile_conversion_searches_sale_amount", "comment": null}, "mobile_conversion_shares_assisted": {"type": "integer", "index": 200, "name": "mobile_conversion_shares_assisted", "comment": null}, "mobile_conversion_shares_order_quantity": {"type": "integer", "index": 201, "name": "mobile_conversion_shares_order_quantity", "comment": null}, "mobile_conversion_shares_post_engagement": {"type": "integer", "index": 202, "name": "mobile_conversion_shares_post_engagement", "comment": null}, "mobile_conversion_shares_post_view": {"type": "integer", "index": 203, "name": "mobile_conversion_shares_post_view", "comment": null}, "mobile_conversion_shares_sale_amount": {"type": "integer", "index": 204, "name": "mobile_conversion_shares_sale_amount", "comment": null}, "mobile_conversion_sign_ups_assisted": {"type": "integer", "index": 205, "name": "mobile_conversion_sign_ups_assisted", "comment": null}, "mobile_conversion_sign_ups_order_quantity": {"type": "integer", "index": 206, "name": "mobile_conversion_sign_ups_order_quantity", "comment": null}, "mobile_conversion_sign_ups_post_engagement": {"type": "integer", "index": 207, "name": "mobile_conversion_sign_ups_post_engagement", "comment": null}, "mobile_conversion_sign_ups_post_view": {"type": "integer", "index": 208, "name": "mobile_conversion_sign_ups_post_view", "comment": null}, "mobile_conversion_sign_ups_sale_amount": {"type": "integer", "index": 209, "name": "mobile_conversion_sign_ups_sale_amount", "comment": null}, "mobile_conversion_site_visits_order_quantity": {"type": "integer", "index": 210, "name": "mobile_conversion_site_visits_order_quantity", "comment": null}, "mobile_conversion_site_visits_post_engagement": {"type": "integer", "index": 211, "name": "mobile_conversion_site_visits_post_engagement", "comment": null}, "mobile_conversion_site_visits_post_view": {"type": "integer", "index": 212, "name": "mobile_conversion_site_visits_post_view", "comment": null}, "mobile_conversion_site_visits_sale_amount": {"type": "integer", "index": 213, "name": "mobile_conversion_site_visits_sale_amount", "comment": null}, "mobile_conversion_spent_credits_assisted": {"type": "integer", "index": 214, "name": "mobile_conversion_spent_credits_assisted", "comment": null}, "mobile_conversion_spent_credits_order_quantity": {"type": "integer", "index": 215, "name": "mobile_conversion_spent_credits_order_quantity", "comment": null}, "mobile_conversion_spent_credits_post_engagement": {"type": "integer", "index": 216, "name": "mobile_conversion_spent_credits_post_engagement", "comment": null}, "mobile_conversion_spent_credits_post_view": {"type": "integer", "index": 217, "name": "mobile_conversion_spent_credits_post_view", "comment": null}, "mobile_conversion_spent_credits_sale_amount": {"type": "integer", "index": 218, "name": "mobile_conversion_spent_credits_sale_amount", "comment": null}, "mobile_conversion_tutorials_completed_assisted": {"type": "integer", "index": 219, "name": "mobile_conversion_tutorials_completed_assisted", "comment": null}, "mobile_conversion_tutorials_completed_order_quantity": {"type": "integer", "index": 220, "name": "mobile_conversion_tutorials_completed_order_quantity", "comment": null}, "mobile_conversion_tutorials_completed_post_engagement": {"type": "integer", "index": 221, "name": "mobile_conversion_tutorials_completed_post_engagement", "comment": null}, "mobile_conversion_tutorials_completed_post_view": {"type": "integer", "index": 222, "name": "mobile_conversion_tutorials_completed_post_view", "comment": null}, "mobile_conversion_tutorials_completed_sale_amount": {"type": "integer", "index": 223, "name": "mobile_conversion_tutorials_completed_sale_amount", "comment": null}, "mobile_conversion_updates_assisted": {"type": "integer", "index": 224, "name": "mobile_conversion_updates_assisted", "comment": null}, "mobile_conversion_updates_order_quantity": {"type": "integer", "index": 225, "name": "mobile_conversion_updates_order_quantity", "comment": null}, "mobile_conversion_updates_post_engagement": {"type": "integer", "index": 226, "name": "mobile_conversion_updates_post_engagement", "comment": null}, "mobile_conversion_updates_post_view": {"type": "integer", "index": 227, "name": "mobile_conversion_updates_post_view", "comment": null}, "mobile_conversion_updates_sale_amount": {"type": "integer", "index": 228, "name": "mobile_conversion_updates_sale_amount", "comment": null}, "poll_card_vote": {"type": "integer", "index": 229, "name": "poll_card_vote", "comment": null}, "qualified_impressions": {"type": "integer", "index": 230, "name": "qualified_impressions", "comment": null}, "replies": {"type": "integer", "index": 231, "name": "replies", "comment": null}, "retweets": {"type": "integer", "index": 232, "name": "retweets", "comment": null}, "tweets_send": {"type": "integer", "index": 233, "name": "tweets_send", "comment": null}, "unfollows": {"type": "integer", "index": 234, "name": "unfollows", "comment": null}, "url_clicks": {"type": "integer", "index": 235, "name": "url_clicks", "comment": null}, "video_3_s_100_pct_views": {"type": "integer", "index": 236, "name": "video_3_s_100_pct_views", "comment": null}, "video_6_s_views": {"type": "integer", "index": 237, "name": "video_6_s_views", "comment": null}, "video_content_starts": {"type": "integer", "index": 238, "name": "video_content_starts", "comment": null}, "video_cta_clicks": {"type": "integer", "index": 239, "name": "video_cta_clicks", "comment": null}, "video_mrc_views": {"type": "integer", "index": 240, "name": "video_mrc_views", "comment": null}, "video_total_views": {"type": "integer", "index": 241, "name": "video_total_views", "comment": null}, "video_views_100": {"type": "integer", "index": 242, "name": "video_views_100", "comment": null}, "video_views_25": {"type": "integer", "index": 243, "name": "video_views_25", "comment": null}, "video_views_50": {"type": "integer", "index": 244, "name": "video_views_50", "comment": null}, "video_views_75": {"type": "integer", "index": 245, "name": "video_views_75", "comment": null}, "mobile_conversion_installs_skan_post_engagement": {"type": "integer", "index": 246, "name": "mobile_conversion_installs_skan_post_engagement", "comment": null}, "mobile_conversion_installs_skan_post_view": {"type": "integer", "index": 247, "name": "mobile_conversion_installs_skan_post_view", "comment": null}, "mobile_conversion_purchases_skan_post_engagement": {"type": "integer", "index": 248, "name": "mobile_conversion_purchases_skan_post_engagement", "comment": null}, "mobile_conversion_purchases_skan_post_view": {"type": "integer", "index": 249, "name": "mobile_conversion_purchases_skan_post_view", "comment": null}, "video_15_s_views": {"type": "integer", "index": 250, "name": "video_15_s_views", "comment": null}, "auto_created_conversion_landing_page_view": {"type": "integer", "index": 251, "name": "auto_created_conversion_landing_page_view", "comment": null}, "auto_created_conversion_session": {"type": "integer", "index": 252, "name": "auto_created_conversion_session", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__line_item_report_tmp"}, "model.twitter_ads.stg_twitter_ads__promoted_tweet_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__promoted_tweet_history", "database": "postgres", "comment": "Each record represents a version of each promoted tweet. The versions can be differentiated by the updated_at timestamp.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "approval_status": {"type": "text", "index": 2, "name": "approval_status", "comment": "The approval status of the promoted tweet."}, "created_timestamp": {"type": "text", "index": 3, "name": "created_timestamp", "comment": "The timestamp the account was created."}, "is_deleted": {"type": "boolean", "index": 4, "name": "is_deleted", "comment": "Whether the record has been deleted or not."}, "entity_status": {"type": "text", "index": 5, "name": "entity_status", "comment": "The status of the promoted tweet."}, "promoted_tweet_id": {"type": "text", "index": 6, "name": "promoted_tweet_id", "comment": "The ID of the promoted tweet."}, "line_item_id": {"type": "text", "index": 7, "name": "line_item_id", "comment": "The ID of the related line item."}, "tweet_id": {"type": "bigint", "index": 8, "name": "tweet_id", "comment": "The ID of the related tweet."}, "updated_timestamp": {"type": "text", "index": 9, "name": "updated_timestamp", "comment": "The timestamp the account was last updated."}, "is_latest_version": {"type": "boolean", "index": 10, "name": "is_latest_version", "comment": "Whether the record is the most latest version for the promoted tweet."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__promoted_tweet_history"}, "model.twitter_ads.stg_twitter_ads__promoted_tweet_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__promoted_tweet_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "approval_status": {"type": "text", "index": 2, "name": "approval_status", "comment": null}, "created_at": {"type": "text", "index": 3, "name": "created_at", "comment": null}, "deleted": {"type": "boolean", "index": 4, "name": "deleted", "comment": null}, "entity_status": {"type": "text", "index": 5, "name": "entity_status", "comment": null}, "id": {"type": "text", "index": 6, "name": "id", "comment": null}, "line_item_id": {"type": "text", "index": 7, "name": "line_item_id", "comment": null}, "tweet_id": {"type": "bigint", "index": 8, "name": "tweet_id", "comment": null}, "updated_at": {"type": "text", "index": 9, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__promoted_tweet_history_tmp"}, "model.twitter_ads.stg_twitter_ads__promoted_tweet_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__promoted_tweet_report", "database": "postgres", "comment": "Each record represents the performance of a promoted tweet on a given day, in the tweet's defined placement.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": "The ID of the related account."}, "promoted_tweet_id": {"type": "text", "index": 4, "name": "promoted_tweet_id", "comment": "The ID of the related promoted tweet."}, "placement": {"type": "text", "index": 5, "name": "placement", "comment": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`."}, "clicks": {"type": "integer", "index": 6, "name": "clicks", "comment": "The clicks for the promoted tweet on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes."}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": "The impressions for the promoted tweet on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results."}, "spend_micro": {"type": "integer", "index": 8, "name": "spend_micro", "comment": "The spend (in micros) for the promoted tweet on that day."}, "spend": {"type": "numeric", "index": 9, "name": "spend", "comment": "The spend for the promoted tweet on that day."}, "url_clicks": {"type": "integer", "index": 10, "name": "url_clicks", "comment": "The url clicks for the promoted tweet on that day."}, "conversion_purchases_metric": {"type": "bigint", "index": 11, "name": "conversion_purchases_metric", "comment": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_custom_metric": {"type": "bigint", "index": 12, "name": "conversion_custom_metric", "comment": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_purchases_sale_amount": {"type": "double precision", "index": 13, "name": "conversion_purchases_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}, "conversion_custom_sale_amount": {"type": "double precision", "index": 14, "name": "conversion_custom_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__promoted_tweet_report"}, "model.twitter_ads.stg_twitter_ads__promoted_tweet_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__promoted_tweet_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 3, "name": "billed_charge_local_micro", "comment": null}, "clicks": {"type": "integer", "index": 4, "name": "clicks", "comment": null}, "date": {"type": "timestamp without time zone", "index": 5, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": null}, "promoted_tweet_id": {"type": "text", "index": 7, "name": "promoted_tweet_id", "comment": null}, "url_clicks": {"type": "integer", "index": 8, "name": "url_clicks", "comment": null}, "placement": {"type": "text", "index": 9, "name": "placement", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__promoted_tweet_report_tmp"}, "model.twitter_ads.stg_twitter_ads__tweet": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__tweet", "database": "postgres", "comment": "Each record represents a tweet, promoted or not.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": "The ID of the related account."}, "tweet_id": {"type": "integer", "index": 3, "name": "tweet_id", "comment": "Unique identifier of the tweet."}, "name": {"type": "integer", "index": 4, "name": "name", "comment": "If provided, the non-public title of the tweet."}, "full_text": {"type": "text", "index": 5, "name": "full_text", "comment": "Full text of the tweet's content."}, "language": {"type": "text", "index": 6, "name": "language", "comment": "Two-letter language code of the tweet."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__tweet"}, "model.twitter_ads.stg_twitter_ads__tweet_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__tweet_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": null}, "card_uri": {"type": "integer", "index": 4, "name": "card_uri", "comment": null}, "coordinates_coordinates": {"type": "integer", "index": 5, "name": "coordinates_coordinates", "comment": null}, "coordinates_type": {"type": "integer", "index": 6, "name": "coordinates_type", "comment": null}, "created_at": {"type": "text", "index": 7, "name": "created_at", "comment": null}, "favorite_count": {"type": "integer", "index": 8, "name": "favorite_count", "comment": null}, "favorited": {"type": "boolean", "index": 9, "name": "favorited", "comment": null}, "followers": {"type": "integer", "index": 10, "name": "followers", "comment": null}, "full_text": {"type": "text", "index": 11, "name": "full_text", "comment": null}, "geo_coordinates": {"type": "integer", "index": 12, "name": "geo_coordinates", "comment": null}, "geo_type": {"type": "integer", "index": 13, "name": "geo_type", "comment": null}, "in_reply_to_screen_name": {"type": "integer", "index": 14, "name": "in_reply_to_screen_name", "comment": null}, "in_reply_to_status_id": {"type": "integer", "index": 15, "name": "in_reply_to_status_id", "comment": null}, "in_reply_to_user_id": {"type": "integer", "index": 16, "name": "in_reply_to_user_id", "comment": null}, "lang": {"type": "text", "index": 17, "name": "lang", "comment": null}, "media_key": {"type": "integer", "index": 18, "name": "media_key", "comment": null}, "retweet_count": {"type": "integer", "index": 19, "name": "retweet_count", "comment": null}, "retweeted": {"type": "boolean", "index": 20, "name": "retweeted", "comment": null}, "source": {"type": "text", "index": 21, "name": "source", "comment": null}, "truncated": {"type": "boolean", "index": 22, "name": "truncated", "comment": null}, "tweet_type": {"type": "text", "index": 23, "name": "tweet_type", "comment": null}, "user_id": {"type": "integer", "index": 24, "name": "user_id", "comment": null}, "name": {"type": "integer", "index": 25, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__tweet_tmp"}, "model.twitter_ads.stg_twitter_ads__tweet_url": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__tweet_url", "database": "postgres", "comment": "Each record represents a URL used in a tweet.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "display_url": {"type": "text", "index": 2, "name": "display_url", "comment": "The URL as it will be displayed."}, "expanded_url": {"type": "text", "index": 3, "name": "expanded_url", "comment": "The fully expanded URL."}, "index": {"type": "integer", "index": 4, "name": "index", "comment": "The index of the URL within the tweet (ie if there are multiple URLs)"}, "indices": {"type": "text", "index": 5, "name": "indices", "comment": "The start and end point of where the URL is placed in the tweet text."}, "tweet_id": {"type": "bigint", "index": 6, "name": "tweet_id", "comment": "The ID of the related tweet."}, "url": {"type": "text", "index": 7, "name": "url", "comment": "The 't.co' shortened URL."}, "base_url": {"type": "text", "index": 8, "name": "base_url", "comment": "The base URL of the ad, extracted from the `expanded_url`."}, "url_host": {"type": "text", "index": 9, "name": "url_host", "comment": "The URL host of the ad, extracted from the `expanded_url`."}, "url_path": {"type": "text", "index": 10, "name": "url_path", "comment": "The URL path of the ad, extracted from the `expanded_url`."}, "utm_source": {"type": "text", "index": 11, "name": "utm_source", "comment": "The utm_source parameter of the ad, extracted from the `expanded_url`."}, "utm_medium": {"type": "text", "index": 12, "name": "utm_medium", "comment": "The utm_medium parameter of the ad, extracted from the `expanded_url`."}, "utm_campaign": {"type": "text", "index": 13, "name": "utm_campaign", "comment": "The utm_campaign parameter of the ad, extracted from the `expanded_url`."}, "utm_content": {"type": "text", "index": 14, "name": "utm_content", "comment": "The utm_content parameter of the ad, extracted from the `expanded_url`."}, "utm_term": {"type": "text", "index": 15, "name": "utm_term", "comment": "The utm_term parameter of the ad, extracted from the `expanded_url`."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__tweet_url"}, "model.twitter_ads.stg_twitter_ads__tweet_url_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__tweet_url_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "display_url": {"type": "text", "index": 2, "name": "display_url", "comment": null}, "expanded_url": {"type": "text", "index": 3, "name": "expanded_url", "comment": null}, "index": {"type": "integer", "index": 4, "name": "index", "comment": null}, "indices": {"type": "text", "index": 5, "name": "indices", "comment": null}, "tweet_id": {"type": "bigint", "index": 6, "name": "tweet_id", "comment": null}, "url": {"type": "text", "index": 7, "name": "url", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__tweet_url_tmp"}, "model.tiktok_ads.tiktok_ads__ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "tiktok_ads__ad_group_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the ad group level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Day of record"}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": "Advertiser ID"}, "advertiser_name": {"type": "text", "index": 4, "name": "advertiser_name", "comment": "Advertiser name."}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": "Campaign ID"}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "Campaign name"}, "ad_group_id": {"type": "integer", "index": 7, "name": "ad_group_id", "comment": "Ad group ID"}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "Ad group name"}, "currency": {"type": "text", "index": 9, "name": "currency", "comment": "Advertiser's currency."}, "category": {"type": "integer", "index": 10, "name": "category", "comment": "Ad group category."}, "gender": {"type": "text", "index": 11, "name": "gender", "comment": "Gender that you want to target."}, "audience_type": {"type": "integer", "index": 12, "name": "audience_type", "comment": "Audience Type"}, "budget": {"type": "integer", "index": 13, "name": "budget", "comment": "Ad budget. Returns 0.0 when Campaign Budget Optimization (budget_optimize_switch) is on."}, "impressions": {"type": "bigint", "index": 14, "name": "impressions", "comment": "The number of impressions that occurred on the day of the record."}, "clicks": {"type": "bigint", "index": 15, "name": "clicks", "comment": "The number of clicks that occurred on the day of the record."}, "spend": {"type": "double precision", "index": 16, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "reach": {"type": "bigint", "index": 17, "name": "reach", "comment": "The number of unique users who saw your ads at least once. This metric is estimated."}, "conversion": {"type": "bigint", "index": 18, "name": "conversion", "comment": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n"}, "likes": {"type": "bigint", "index": 19, "name": "likes", "comment": "The number of likes your video creative received within 1 day of a user seeing a paid ad."}, "comments": {"type": "bigint", "index": 20, "name": "comments", "comment": "The number of comments your video creative received within 1 day of a user seeing a paid ad."}, "shares": {"type": "bigint", "index": 21, "name": "shares", "comment": "The number of shares that occurred on the day of the record."}, "profile_visits": {"type": "bigint", "index": 22, "name": "profile_visits", "comment": "The number of profile visits that occurred on the day of the record."}, "follows": {"type": "bigint", "index": 23, "name": "follows", "comment": "The number of follows that occurred on the day of the record."}, "video_watched_2_s": {"type": "bigint", "index": 24, "name": "video_watched_2_s", "comment": "The number of times your video played for at least 2 seconds, or completely played. Replays will not be counted."}, "video_watched_6_s": {"type": "bigint", "index": 25, "name": "video_watched_6_s", "comment": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted."}, "video_views_p_25": {"type": "bigint", "index": 26, "name": "video_views_p_25", "comment": "The number of times your video was played at 25% of its length. Replays will not be counted."}, "video_views_p_50": {"type": "bigint", "index": 27, "name": "video_views_p_50", "comment": "The number of times your video was played at 50% of its length. Replays will not be counted."}, "video_views_p_75": {"type": "bigint", "index": 28, "name": "video_views_p_75", "comment": "The number of times your video was played at 75% of its length. Replays will not be counted."}, "real_time_conversion": {"type": "bigint", "index": 29, "name": "real_time_conversion", "comment": "Number of times your ad resulted in the optimization event you selected."}, "total_purchase_value": {"type": "double precision", "index": 30, "name": "total_purchase_value", "comment": "The total value of purchase events that occurred in your app that were recorded by your measurement partner."}, "total_sales_lead_value": {"type": "double precision", "index": 31, "name": "total_sales_lead_value", "comment": "The monetary worth or potential value assigned to a lead generated through ads."}, "total_conversion_value": {"type": "double precision", "index": 32, "name": "total_conversion_value", "comment": "The accumulated value of `total_purchase_value` and `total_sales_lead_value`."}, "daily_cpc": {"type": "double precision", "index": 33, "name": "daily_cpc", "comment": "The average amount of money you've spent on a click."}, "daily_cpm": {"type": "double precision", "index": 34, "name": "daily_cpm", "comment": "The average amount of money you've spent per 1,000 impressions."}, "daily_ctr": {"type": "bigint", "index": 35, "name": "daily_ctr", "comment": "The percentage of times people saw your ad and performed a click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.tiktok_ads__ad_group_report"}, "model.tiktok_ads.tiktok_ads__ad_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "tiktok_ads__ad_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the ad level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Day of record."}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": "Advertiser ID."}, "advertiser_name": {"type": "text", "index": 4, "name": "advertiser_name", "comment": "Advertiser name."}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": "Campaign ID."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "Campaign name."}, "ad_group_id": {"type": "integer", "index": 7, "name": "ad_group_id", "comment": "Ad group ID."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "Ad group name."}, "ad_id": {"type": "integer", "index": 9, "name": "ad_id", "comment": "Ad ID."}, "ad_name": {"type": "text", "index": 10, "name": "ad_name", "comment": "Ad name."}, "currency": {"type": "text", "index": 11, "name": "currency", "comment": "Advertiser's currency."}, "category": {"type": "integer", "index": 12, "name": "category", "comment": "Ad group category."}, "gender": {"type": "text", "index": 13, "name": "gender", "comment": "Gender that you want to target."}, "audience_type": {"type": "integer", "index": 14, "name": "audience_type", "comment": "Audience Type"}, "budget": {"type": "integer", "index": 15, "name": "budget", "comment": "Ad budget. Returns 0.0 when Campaign Budget Optimization (budget_optimize_switch) is on."}, "impressions": {"type": "bigint", "index": 16, "name": "impressions", "comment": "The number of impressions that occurred on the day of the record."}, "clicks": {"type": "bigint", "index": 17, "name": "clicks", "comment": "The number of clicks that occurred on the day of the record."}, "spend": {"type": "double precision", "index": 18, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "reach": {"type": "bigint", "index": 19, "name": "reach", "comment": "The number of unique users who saw your ads at least once. This metric is estimated."}, "conversion": {"type": "bigint", "index": 20, "name": "conversion", "comment": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n"}, "likes": {"type": "bigint", "index": 21, "name": "likes", "comment": "The number of likes your video creative received within 1 day of a user seeing a paid ad."}, "comments": {"type": "bigint", "index": 22, "name": "comments", "comment": "The number of comments your video creative received within 1 day of a user seeing a paid ad."}, "shares": {"type": "bigint", "index": 23, "name": "shares", "comment": "The number of shares that occurred on the day of the record."}, "profile_visits": {"type": "bigint", "index": 24, "name": "profile_visits", "comment": "The number of profile visits that occurred on the day of the record."}, "follows": {"type": "bigint", "index": 25, "name": "follows", "comment": "The number of follows that occurred on the day of the record."}, "video_watched_2_s": {"type": "bigint", "index": 26, "name": "video_watched_2_s", "comment": "The number of times your video played for at least 2 seconds, or completely played. Replays will not be counted."}, "video_watched_6_s": {"type": "bigint", "index": 27, "name": "video_watched_6_s", "comment": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted."}, "video_views_p_25": {"type": "bigint", "index": 28, "name": "video_views_p_25", "comment": "The number of times your video was played at 25% of its length. Replays will not be counted."}, "video_views_p_50": {"type": "bigint", "index": 29, "name": "video_views_p_50", "comment": "The number of times your video was played at 50% of its length. Replays will not be counted."}, "video_views_p_75": {"type": "bigint", "index": 30, "name": "video_views_p_75", "comment": "The number of times your video was played at 75% of its length. Replays will not be counted."}, "real_time_conversion": {"type": "bigint", "index": 31, "name": "real_time_conversion", "comment": "Number of times your ad resulted in the optimization event you selected."}, "total_purchase_value": {"type": "double precision", "index": 32, "name": "total_purchase_value", "comment": "The total value of purchase events that occurred in your app that were recorded by your measurement partner."}, "total_sales_lead_value": {"type": "double precision", "index": 33, "name": "total_sales_lead_value", "comment": "The monetary worth or potential value assigned to a lead generated through ads."}, "total_conversion_value": {"type": "double precision", "index": 34, "name": "total_conversion_value", "comment": "The accumulated value of `total_purchase_value` and `total_sales_lead_value`."}, "daily_cpc": {"type": "double precision", "index": 35, "name": "daily_cpc", "comment": "The average amount of money you've spent on a click."}, "daily_cpm": {"type": "double precision", "index": 36, "name": "daily_cpm", "comment": "The average amount of money you've spent per 1,000 impressions."}, "daily_ctr": {"type": "bigint", "index": 37, "name": "daily_ctr", "comment": "The percentage of times people saw your ad and performed a click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.tiktok_ads__ad_report"}, "model.tiktok_ads.tiktok_ads__advertiser_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "tiktok_ads__advertiser_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the account level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Day of record."}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": "Advertiser ID."}, "advertiser_name": {"type": "text", "index": 4, "name": "advertiser_name", "comment": "Advertiser name."}, "currency": {"type": "text", "index": 5, "name": "currency", "comment": "Advertiser's currency."}, "clicks": {"type": "bigint", "index": 6, "name": "clicks", "comment": "The number of clicks that occurred on the day of the record."}, "impressions": {"type": "bigint", "index": 7, "name": "impressions", "comment": "The number of impressions that occurred on the day of the record."}, "spend": {"type": "double precision", "index": 8, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "reach": {"type": "bigint", "index": 9, "name": "reach", "comment": "The number of unique users who saw your ads at least once. This metric is estimated."}, "conversion": {"type": "bigint", "index": 10, "name": "conversion", "comment": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n"}, "likes": {"type": "bigint", "index": 11, "name": "likes", "comment": "The number of likes your video creative received within 1 day of a user seeing a paid ad."}, "comments": {"type": "bigint", "index": 12, "name": "comments", "comment": "The number of comments your video creative received within 1 day of a user seeing a paid ad."}, "shares": {"type": "bigint", "index": 13, "name": "shares", "comment": "The number of shares that occurred on the day of the record."}, "profile_visits": {"type": "bigint", "index": 14, "name": "profile_visits", "comment": "The number of profile visits that occurred on the day of the record."}, "follows": {"type": "bigint", "index": 15, "name": "follows", "comment": "The number of follows that occurred on the day of the record."}, "video_watched_2_s": {"type": "bigint", "index": 16, "name": "video_watched_2_s", "comment": "The number of times your video played for at least 2 seconds, or completely played. Replays will not be counted."}, "video_watched_6_s": {"type": "bigint", "index": 17, "name": "video_watched_6_s", "comment": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted."}, "video_views_p_25": {"type": "bigint", "index": 18, "name": "video_views_p_25", "comment": "The number of times your video was played at 25% of its length. Replays will not be counted."}, "video_views_p_50": {"type": "bigint", "index": 19, "name": "video_views_p_50", "comment": "The number of times your video was played at 50% of its length. Replays will not be counted."}, "video_views_p_75": {"type": "bigint", "index": 20, "name": "video_views_p_75", "comment": "The number of times your video was played at 75% of its length. Replays will not be counted."}, "real_time_conversion": {"type": "bigint", "index": 21, "name": "real_time_conversion", "comment": "Number of times your ad resulted in the optimization event you selected."}, "total_purchase_value": {"type": "double precision", "index": 22, "name": "total_purchase_value", "comment": "The total value of purchase events that occurred in your app that were recorded by your measurement partner."}, "total_sales_lead_value": {"type": "double precision", "index": 23, "name": "total_sales_lead_value", "comment": "The monetary worth or potential value assigned to a lead generated through ads."}, "total_conversion_value": {"type": "double precision", "index": 24, "name": "total_conversion_value", "comment": "The accumulated value of `total_purchase_value` and `total_sales_lead_value`."}, "daily_cpc": {"type": "double precision", "index": 25, "name": "daily_cpc", "comment": "The average amount of money you've spent on a click."}, "daily_cpm": {"type": "double precision", "index": 26, "name": "daily_cpm", "comment": "The average amount of money you've spent per 1,000 impressions."}, "daily_ctr": {"type": "bigint", "index": 27, "name": "daily_ctr", "comment": "The percentage of times people saw your ad and performed a click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.tiktok_ads__advertiser_report"}, "model.tiktok_ads.tiktok_ads__campaign_country_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "tiktok_ads__campaign_country_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of a campaign at the country/geographic region level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The reporting date for the campaign data (in YYYY-MM-DD format)."}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": "Unique identifier for the campaign."}, "campaign_name": {"type": "text", "index": 4, "name": "campaign_name", "comment": "Name of the campaign."}, "campaign_type": {"type": "text", "index": 5, "name": "campaign_type", "comment": "Type/category of the campaign."}, "created_at": {"type": "text", "index": 6, "name": "created_at", "comment": "Timestamp when the campaign was created."}, "country_code": {"type": "text", "index": 7, "name": "country_code", "comment": "Audience country or region code."}, "advertiser_id": {"type": "integer", "index": 8, "name": "advertiser_id", "comment": "Unique identifier for the advertiser."}, "advertiser_name": {"type": "text", "index": 9, "name": "advertiser_name", "comment": "Name of the advertiser account."}, "currency": {"type": "text", "index": 10, "name": "currency", "comment": "Currency in which spend and cost metrics are reported."}, "objective_type": {"type": "text", "index": 11, "name": "objective_type", "comment": "Objective type of the campaign (e.g., conversions, traffic)."}, "status": {"type": "text", "index": 12, "name": "status", "comment": "Current status of the campaign."}, "split_test_variable": {"type": "text", "index": 13, "name": "split_test_variable", "comment": "Split Test variables. Optional values; TARGETING, BIDDING_OPTIMIZATION, CREATIVE."}, "budget": {"type": "numeric(28,6)", "index": 14, "name": "budget", "comment": "Total budget allocated to the campaign."}, "budget_mode": {"type": "text", "index": 15, "name": "budget_mode", "comment": "Budget pacing mode (e.g., daily, total)."}, "country_name": {"type": "text", "index": 16, "name": "country_name", "comment": "Human-readable name of the geographic region associated with the country code."}, "location_id": {"type": "text", "index": 17, "name": "location_id", "comment": "TikTok's identifier for the country-level location record."}, "parent_location_id": {"type": "text", "index": 18, "name": "parent_location_id", "comment": "Identifier of the parent region, enabling hierarchical rollups (city to province to country)."}, "has_support_below_18": {"type": "boolean", "index": 19, "name": "has_support_below_18", "comment": "Whether the location supports targeting users under 18. Used for compliance with age-restricted ad targeting rules."}, "clicks": {"type": "bigint", "index": 20, "name": "clicks", "comment": "The number of clicks that occurred on the day of the record."}, "impressions": {"type": "bigint", "index": 21, "name": "impressions", "comment": "The number of impressions that occurred on the day of the record."}, "spend": {"type": "double precision", "index": 22, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "conversion": {"type": "bigint", "index": 23, "name": "conversion", "comment": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n"}, "daily_cpc": {"type": "double precision", "index": 24, "name": "daily_cpc", "comment": "The average amount of money you've spent on a click."}, "daily_cpm": {"type": "double precision", "index": 25, "name": "daily_cpm", "comment": "The average amount of money you've spent per 1,000 impressions."}, "daily_ctr": {"type": "bigint", "index": 26, "name": "daily_ctr", "comment": "The percentage of times people saw your ad and performed a click."}, "real_time_conversion": {"type": "bigint", "index": 27, "name": "real_time_conversion", "comment": "Number of times your ad resulted in the optimization event you selected."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.tiktok_ads__campaign_country_report"}, "model.tiktok_ads.tiktok_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "tiktok_ads__campaign_report", "database": "postgres", "comment": "Each record in this table represents the daily performance at the campaign level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Day of record"}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": "Advertiser ID"}, "advertiser_name": {"type": "text", "index": 4, "name": "advertiser_name", "comment": "Advertiser name"}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": "Campaign ID"}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "Campaign name"}, "currency": {"type": "text", "index": 7, "name": "currency", "comment": "Advertiser's currency."}, "impressions": {"type": "bigint", "index": 8, "name": "impressions", "comment": "The number of impressions that occurred on the day of the record."}, "clicks": {"type": "bigint", "index": 9, "name": "clicks", "comment": "The number of clicks that occurred on the day of the record."}, "spend": {"type": "double precision", "index": 10, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "reach": {"type": "bigint", "index": 11, "name": "reach", "comment": "The number of unique users who saw your ads at least once. This metric is estimated."}, "conversion": {"type": "bigint", "index": 12, "name": "conversion", "comment": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n"}, "likes": {"type": "bigint", "index": 13, "name": "likes", "comment": "The number of likes your video creative received within 1 day of a user seeing a paid ad."}, "comments": {"type": "bigint", "index": 14, "name": "comments", "comment": "The number of comments your video creative received within 1 day of a user seeing a paid ad."}, "shares": {"type": "bigint", "index": 15, "name": "shares", "comment": "The number of shares that occurred on the day of the record."}, "profile_visits": {"type": "bigint", "index": 16, "name": "profile_visits", "comment": "The number of profile visits that occurred on the day of the record."}, "follows": {"type": "bigint", "index": 17, "name": "follows", "comment": "The number of follows that occurred on the day of the record."}, "video_watched_2_s": {"type": "bigint", "index": 18, "name": "video_watched_2_s", "comment": "The number of times your video played for at least 2 seconds, or completely played. Replays will not be counted."}, "video_watched_6_s": {"type": "bigint", "index": 19, "name": "video_watched_6_s", "comment": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted."}, "video_views_p_25": {"type": "bigint", "index": 20, "name": "video_views_p_25", "comment": "The number of times your video was played at 25% of its length. Replays will not be counted."}, "video_views_p_50": {"type": "bigint", "index": 21, "name": "video_views_p_50", "comment": "The number of times your video was played at 50% of its length. Replays will not be counted."}, "video_views_p_75": {"type": "bigint", "index": 22, "name": "video_views_p_75", "comment": "The number of times your video was played at 75% of its length. Replays will not be counted."}, "real_time_conversion": {"type": "bigint", "index": 23, "name": "real_time_conversion", "comment": "Number of times your ad resulted in the optimization event you selected."}, "total_purchase_value": {"type": "double precision", "index": 24, "name": "total_purchase_value", "comment": "The total value of purchase events that occurred in your app that were recorded by your measurement partner."}, "total_sales_lead_value": {"type": "double precision", "index": 25, "name": "total_sales_lead_value", "comment": "The monetary worth or potential value assigned to a lead generated through ads."}, "total_conversion_value": {"type": "double precision", "index": 26, "name": "total_conversion_value", "comment": "The accumulated value of `total_purchase_value` and `total_sales_lead_value`."}, "daily_cpc": {"type": "double precision", "index": 27, "name": "daily_cpc", "comment": "The average amount of money you've spent on a click."}, "daily_cpm": {"type": "double precision", "index": 28, "name": "daily_cpm", "comment": "The average amount of money you've spent per 1,000 impressions."}, "daily_ctr": {"type": "bigint", "index": 29, "name": "daily_ctr", "comment": "The percentage of times people saw your ad and performed a click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.tiktok_ads__campaign_report"}, "model.tiktok_ads.tiktok_ads__url_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "tiktok_ads__url_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the URL level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Day of record."}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": "Advertiser ID."}, "advertiser_name": {"type": "text", "index": 4, "name": "advertiser_name", "comment": "Advertiser name."}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": "Campaign ID."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "Campaign name."}, "ad_group_id": {"type": "integer", "index": 7, "name": "ad_group_id", "comment": "Ad group ID."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "Ad group name."}, "ad_id": {"type": "integer", "index": 9, "name": "ad_id", "comment": "Ad ID."}, "ad_name": {"type": "text", "index": 10, "name": "ad_name", "comment": "Ad name."}, "base_url": {"type": "text", "index": 11, "name": "base_url", "comment": "The base URL of the ad, extracted from the `landing page url`."}, "url_host": {"type": "text", "index": 12, "name": "url_host", "comment": "The URL host of the ad, extracted from the `landing page url`."}, "url_path": {"type": "text", "index": 13, "name": "url_path", "comment": "The URL path of the ad, extracted from the `landing page url`."}, "utm_source": {"type": "text", "index": 14, "name": "utm_source", "comment": "The utm_source parameter of the ad, extracted from the `landing page url`."}, "utm_medium": {"type": "text", "index": 15, "name": "utm_medium", "comment": "The utm_medium parameter of the ad, extracted from the `landing page url`."}, "utm_campaign": {"type": "text", "index": 16, "name": "utm_campaign", "comment": "The utm_campaign parameter of the ad, extracted from the `landing page url`."}, "utm_content": {"type": "text", "index": 17, "name": "utm_content", "comment": "The utm_content parameter of the ad, extracted from the `landing page url`."}, "utm_term": {"type": "text", "index": 18, "name": "utm_term", "comment": "The utm_term parameter of the ad, extracted from the `landing page url`."}, "currency": {"type": "text", "index": 19, "name": "currency", "comment": "Advertiser's currency."}, "category": {"type": "integer", "index": 20, "name": "category", "comment": "Ad group category."}, "gender": {"type": "text", "index": 21, "name": "gender", "comment": "Gender that you want to target."}, "audience_type": {"type": "integer", "index": 22, "name": "audience_type", "comment": "Audience Type"}, "budget": {"type": "integer", "index": 23, "name": "budget", "comment": "Ad budget. Returns 0.0 when Campaign Budget Optimization (budget_optimize_switch) is on."}, "impressions": {"type": "bigint", "index": 24, "name": "impressions", "comment": "The number of impressions that occurred on the day of the record."}, "clicks": {"type": "bigint", "index": 25, "name": "clicks", "comment": "The number of clicks that occurred on the day of the record."}, "spend": {"type": "double precision", "index": 26, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "reach": {"type": "bigint", "index": 27, "name": "reach", "comment": "The number of unique users who saw your ads at least once. This metric is estimated."}, "conversion": {"type": "bigint", "index": 28, "name": "conversion", "comment": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n"}, "likes": {"type": "bigint", "index": 29, "name": "likes", "comment": "The number of likes your video creative received within 1 day of a user seeing a paid ad."}, "comments": {"type": "bigint", "index": 30, "name": "comments", "comment": "The number of comments your video creative received within 1 day of a user seeing a paid ad."}, "shares": {"type": "bigint", "index": 31, "name": "shares", "comment": "The number of shares that occurred on the day of the record."}, "profile_visits": {"type": "bigint", "index": 32, "name": "profile_visits", "comment": "The number of profile visits that occurred on the day of the record."}, "follows": {"type": "bigint", "index": 33, "name": "follows", "comment": "The number of follows that occurred on the day of the record."}, "video_watched_2_s": {"type": "bigint", "index": 34, "name": "video_watched_2_s", "comment": "The number of times your video played for at least 2 seconds, or completely played. Replays will not be counted."}, "video_watched_6_s": {"type": "bigint", "index": 35, "name": "video_watched_6_s", "comment": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted."}, "video_views_p_25": {"type": "bigint", "index": 36, "name": "video_views_p_25", "comment": "The number of times your video was played at 25% of its length. Replays will not be counted."}, "video_views_p_50": {"type": "bigint", "index": 37, "name": "video_views_p_50", "comment": "The number of times your video was played at 50% of its length. Replays will not be counted."}, "video_views_p_75": {"type": "bigint", "index": 38, "name": "video_views_p_75", "comment": "The number of times your video was played at 75% of its length. Replays will not be counted."}, "real_time_conversion": {"type": "bigint", "index": 39, "name": "real_time_conversion", "comment": "Number of times your ad resulted in the optimization event you selected."}, "total_purchase_value": {"type": "double precision", "index": 40, "name": "total_purchase_value", "comment": "The total value of purchase events that occurred in your app that were recorded by your measurement partner."}, "total_sales_lead_value": {"type": "double precision", "index": 41, "name": "total_sales_lead_value", "comment": "The monetary worth or potential value assigned to a lead generated through ads."}, "total_conversion_value": {"type": "double precision", "index": 42, "name": "total_conversion_value", "comment": "The accumulated value of `total_purchase_value` and `total_sales_lead_value`."}, "daily_cpc": {"type": "double precision", "index": 43, "name": "daily_cpc", "comment": "The average amount of money you've spent on a click."}, "daily_cpm": {"type": "double precision", "index": 44, "name": "daily_cpm", "comment": "The average amount of money you've spent per 1,000 impressions."}, "daily_ctr": {"type": "bigint", "index": 45, "name": "daily_ctr", "comment": "The percentage of times people saw your ad and performed a click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.tiktok_ads__url_report"}, "model.twitter_ads.twitter_ads__account_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "twitter_ads__account_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the account level, within a placement in Twitter.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "placement": {"type": "text", "index": 3, "name": "placement", "comment": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID of the account."}, "account_name": {"type": "character varying", "index": 5, "name": "account_name", "comment": "Name of the account."}, "is_deleted": {"type": "boolean", "index": 6, "name": "is_deleted", "comment": "Whether the record has been deleted or not."}, "timezone": {"type": "text", "index": 7, "name": "timezone", "comment": "The timezone the account is set to."}, "industry_type": {"type": "integer", "index": 8, "name": "industry_type", "comment": "The industry of the accounts."}, "approval_status": {"type": "text", "index": 9, "name": "approval_status", "comment": "The approval status of the account."}, "business_name": {"type": "integer", "index": 10, "name": "business_name", "comment": "The name of the related business."}, "business_id": {"type": "integer", "index": 11, "name": "business_id", "comment": "The ID of the related business."}, "created_timestamp": {"type": "text", "index": 12, "name": "created_timestamp", "comment": "The timestamp the account was created."}, "updated_timestamp": {"type": "text", "index": 13, "name": "updated_timestamp", "comment": "The timestamp the account was last updated."}, "timezone_switched_timestamp": {"type": "text", "index": 14, "name": "timezone_switched_timestamp", "comment": "The timestamp the account's timezone was last changed."}, "clicks": {"type": "numeric", "index": 15, "name": "clicks", "comment": "The clicks for th account on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes."}, "impressions": {"type": "numeric", "index": 16, "name": "impressions", "comment": "The impressions for the account on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results."}, "spend": {"type": "numeric", "index": 17, "name": "spend", "comment": "The spend for the account on that day."}, "spend_micro": {"type": "numeric", "index": 18, "name": "spend_micro", "comment": "The spend (in micros) for the account on that day."}, "url_clicks": {"type": "numeric", "index": 19, "name": "url_clicks", "comment": "The url clicks for the account on that day."}, "total_conversions": {"type": "numeric", "index": 20, "name": "total_conversions", "comment": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric)."}, "total_conversions_sale_amount": {"type": "double precision", "index": 21, "name": "total_conversions_sale_amount", "comment": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount)."}, "conversion_purchases_metric": {"type": "numeric", "index": 22, "name": "conversion_purchases_metric", "comment": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_custom_metric": {"type": "numeric", "index": 23, "name": "conversion_custom_metric", "comment": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_purchases_sale_amount": {"type": "double precision", "index": 24, "name": "conversion_purchases_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}, "conversion_custom_sale_amount": {"type": "double precision", "index": 25, "name": "conversion_custom_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.twitter_ads__account_report"}, "model.twitter_ads.twitter_ads__campaign_country_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "twitter_ads__campaign_country_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the account and campaign level, within a placement in Twitter.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "country": {"type": "text", "index": 3, "name": "country", "comment": "Long-form name of the country being reported on."}, "placement": {"type": "text", "index": 4, "name": "placement", "comment": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`."}, "account_id": {"type": "text", "index": 5, "name": "account_id", "comment": "The ID of the related account."}, "account_name": {"type": "character varying", "index": 6, "name": "account_name", "comment": "The name of the related account."}, "campaign_id": {"type": "text", "index": 7, "name": "campaign_id", "comment": "The ID of the campaign."}, "campaign_name": {"type": "text", "index": 8, "name": "campaign_name", "comment": "The name of the campaign."}, "is_campaign_deleted": {"type": "boolean", "index": 9, "name": "is_campaign_deleted", "comment": "Whether the record has been deleted or not."}, "campaign_status": {"type": "text", "index": 10, "name": "campaign_status", "comment": "The status of the campaign."}, "campaign_currency": {"type": "text", "index": 11, "name": "campaign_currency", "comment": "The currency all metrics for the account are set to."}, "is_campaign_servable": {"type": "boolean", "index": 12, "name": "is_campaign_servable", "comment": "Whether the campaign is in a state to be actively served to users."}, "is_campaign_standard_delivery": {"type": "boolean", "index": 13, "name": "is_campaign_standard_delivery", "comment": "Whether standard delivery is enabled (vs accelerated delivery)."}, "campaign_frequency_cap": {"type": "integer", "index": 14, "name": "campaign_frequency_cap", "comment": "The maximum number of times an ad could be delivered to a user."}, "campaign_start_timestamp": {"type": "text", "index": 15, "name": "campaign_start_timestamp", "comment": "The time the campaign will start."}, "campaign_end_timestamp": {"type": "text", "index": 16, "name": "campaign_end_timestamp", "comment": "The time the campaign will end"}, "campaign_created_timestamp": {"type": "text", "index": 17, "name": "campaign_created_timestamp", "comment": "The timestamp the account was created."}, "campaign_updated_timestamp": {"type": "text", "index": 18, "name": "campaign_updated_timestamp", "comment": "The timestamp the account was last updated."}, "campaign_funding_instrument_id": {"type": "text", "index": 19, "name": "campaign_funding_instrument_id", "comment": "Reference to the funding instrument."}, "campaign_daily_budget_amount": {"type": "numeric", "index": 20, "name": "campaign_daily_budget_amount", "comment": "The daily budget amount to be allocated to the campaign. The currency associated with the specified funding instrument will be used."}, "campaign_total_budget_amount": {"type": "numeric", "index": 21, "name": "campaign_total_budget_amount", "comment": "The total budget amount to be allocated to the campaign."}, "clicks": {"type": "bigint", "index": 22, "name": "clicks", "comment": "The number of clicks on that date. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes."}, "impressions": {"type": "bigint", "index": 23, "name": "impressions", "comment": "The number of impressions on that date. This is the number of users who see a Promoted Ad either in their home timeline or search results."}, "spend": {"type": "numeric", "index": 24, "name": "spend", "comment": "The amount of spend on that date."}, "spend_micro": {"type": "bigint", "index": 25, "name": "spend_micro", "comment": "The amount of spend, in micros, on that date."}, "url_clicks": {"type": "bigint", "index": 26, "name": "url_clicks", "comment": "The number of URL clicks on that date."}, "total_conversions": {"type": "numeric", "index": 27, "name": "total_conversions", "comment": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric)."}, "total_conversions_sale_amount": {"type": "double precision", "index": 28, "name": "total_conversions_sale_amount", "comment": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount)."}, "conversion_purchases_metric": {"type": "numeric", "index": 29, "name": "conversion_purchases_metric", "comment": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_custom_metric": {"type": "numeric", "index": 30, "name": "conversion_custom_metric", "comment": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_purchases_sale_amount": {"type": "double precision", "index": 31, "name": "conversion_purchases_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}, "conversion_custom_sale_amount": {"type": "double precision", "index": 32, "name": "conversion_custom_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.twitter_ads__campaign_country_report"}, "model.twitter_ads.twitter_ads__campaign_region_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "twitter_ads__campaign_region_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the account and campaign level, within a placement in Twitter.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "region": {"type": "text", "index": 3, "name": "region", "comment": "Long-form name of the geopgraphic region being reported on."}, "country": {"type": "text", "index": 4, "name": "country", "comment": "Long-form name of the country being reported on."}, "placement": {"type": "text", "index": 5, "name": "placement", "comment": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`."}, "account_id": {"type": "text", "index": 6, "name": "account_id", "comment": "The ID of the related account."}, "account_name": {"type": "character varying", "index": 7, "name": "account_name", "comment": "The name of the related account."}, "campaign_id": {"type": "text", "index": 8, "name": "campaign_id", "comment": "The ID of the campaign."}, "campaign_name": {"type": "text", "index": 9, "name": "campaign_name", "comment": "The name of the campaign."}, "is_campaign_deleted": {"type": "boolean", "index": 10, "name": "is_campaign_deleted", "comment": "Whether the record has been deleted or not."}, "campaign_status": {"type": "text", "index": 11, "name": "campaign_status", "comment": "The status of the campaign."}, "campaign_currency": {"type": "text", "index": 12, "name": "campaign_currency", "comment": "The currency all metrics for the account are set to."}, "is_campaign_servable": {"type": "boolean", "index": 13, "name": "is_campaign_servable", "comment": "Whether the campaign is in a state to be actively served to users."}, "is_campaign_standard_delivery": {"type": "boolean", "index": 14, "name": "is_campaign_standard_delivery", "comment": "Whether standard delivery is enabled (vs accelerated delivery)."}, "campaign_frequency_cap": {"type": "integer", "index": 15, "name": "campaign_frequency_cap", "comment": "The maximum number of times an ad could be delivered to a user."}, "campaign_start_timestamp": {"type": "text", "index": 16, "name": "campaign_start_timestamp", "comment": "The time the campaign will start."}, "campaign_end_timestamp": {"type": "text", "index": 17, "name": "campaign_end_timestamp", "comment": "The time the campaign will end"}, "campaign_created_timestamp": {"type": "text", "index": 18, "name": "campaign_created_timestamp", "comment": "The timestamp the account was created."}, "campaign_updated_timestamp": {"type": "text", "index": 19, "name": "campaign_updated_timestamp", "comment": "The timestamp the account was last updated."}, "campaign_funding_instrument_id": {"type": "text", "index": 20, "name": "campaign_funding_instrument_id", "comment": "Reference to the funding instrument."}, "campaign_daily_budget_amount": {"type": "numeric", "index": 21, "name": "campaign_daily_budget_amount", "comment": "The daily budget amount to be allocated to the campaign. The currency associated with the specified funding instrument will be used."}, "campaign_total_budget_amount": {"type": "numeric", "index": 22, "name": "campaign_total_budget_amount", "comment": "The total budget amount to be allocated to the campaign."}, "clicks": {"type": "bigint", "index": 23, "name": "clicks", "comment": "The number of clicks on that date. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes."}, "impressions": {"type": "bigint", "index": 24, "name": "impressions", "comment": "The number of impressions on that date. This is the number of users who see a Promoted Ad either in their home timeline or search results."}, "spend": {"type": "numeric", "index": 25, "name": "spend", "comment": "The amount of spend on that date."}, "spend_micro": {"type": "bigint", "index": 26, "name": "spend_micro", "comment": "The amount of spend, in micros, on that date."}, "url_clicks": {"type": "bigint", "index": 27, "name": "url_clicks", "comment": "The number of URL clicks on that date."}, "total_conversions": {"type": "numeric", "index": 28, "name": "total_conversions", "comment": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric)."}, "total_conversions_sale_amount": {"type": "double precision", "index": 29, "name": "total_conversions_sale_amount", "comment": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount)."}, "conversion_purchases_metric": {"type": "numeric", "index": 30, "name": "conversion_purchases_metric", "comment": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_custom_metric": {"type": "numeric", "index": 31, "name": "conversion_custom_metric", "comment": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_purchases_sale_amount": {"type": "double precision", "index": 32, "name": "conversion_purchases_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}, "conversion_custom_sale_amount": {"type": "double precision", "index": 33, "name": "conversion_custom_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.twitter_ads__campaign_region_report"}, "model.twitter_ads.twitter_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "twitter_ads__campaign_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the account and campaign level, within a placement in Twitter.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "placement": {"type": "text", "index": 3, "name": "placement", "comment": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID of the related account."}, "account_name": {"type": "character varying", "index": 5, "name": "account_name", "comment": "The name of the related account."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID of the campaign."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the campaign."}, "is_deleted": {"type": "boolean", "index": 8, "name": "is_deleted", "comment": "Whether the record has been deleted or not."}, "campaign_status": {"type": "text", "index": 9, "name": "campaign_status", "comment": "The status of the campaign."}, "currency": {"type": "text", "index": 10, "name": "currency", "comment": "The currency all metrics for the account are set to."}, "is_servable": {"type": "boolean", "index": 11, "name": "is_servable", "comment": "Whether the campaign is in a state to be actively served to users."}, "is_standard_delivery": {"type": "boolean", "index": 12, "name": "is_standard_delivery", "comment": "Whether standard delivery is enabled (vs accelerated delivery)."}, "frequency_cap": {"type": "integer", "index": 13, "name": "frequency_cap", "comment": "The maximum number of times an ad could be delivered to a user."}, "start_timestamp": {"type": "text", "index": 14, "name": "start_timestamp", "comment": "The time the campaign will start."}, "end_timestamp": {"type": "text", "index": 15, "name": "end_timestamp", "comment": "The time the campaign will end"}, "created_timestamp": {"type": "text", "index": 16, "name": "created_timestamp", "comment": "The timestamp the account was created."}, "updated_timestamp": {"type": "text", "index": 17, "name": "updated_timestamp", "comment": "The timestamp the account was last updated."}, "funding_instrument_id": {"type": "text", "index": 18, "name": "funding_instrument_id", "comment": "Reference to the funding instrument."}, "daily_budget_amount": {"type": "numeric", "index": 19, "name": "daily_budget_amount", "comment": "The daily budget amount to be allocated to the campaign. The currency associated with the specified funding instrument will be used."}, "total_budget_amount": {"type": "numeric", "index": 20, "name": "total_budget_amount", "comment": "The total budget amount to be allocated to the campaign."}, "clicks": {"type": "bigint", "index": 21, "name": "clicks", "comment": "The number of clicks on that date. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes."}, "impressions": {"type": "bigint", "index": 22, "name": "impressions", "comment": "The number of impressions on that date. This is the number of users who see a Promoted Ad either in their home timeline or search results."}, "spend": {"type": "numeric", "index": 23, "name": "spend", "comment": "The amount of spend on that date."}, "spend_micro": {"type": "bigint", "index": 24, "name": "spend_micro", "comment": "The amount of spend, in micros, on that date."}, "url_clicks": {"type": "bigint", "index": 25, "name": "url_clicks", "comment": "The number of URL clicks on that date."}, "total_conversions": {"type": "numeric", "index": 26, "name": "total_conversions", "comment": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric)."}, "total_conversions_sale_amount": {"type": "double precision", "index": 27, "name": "total_conversions_sale_amount", "comment": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount)."}, "conversion_purchases_metric": {"type": "numeric", "index": 28, "name": "conversion_purchases_metric", "comment": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_custom_metric": {"type": "numeric", "index": 29, "name": "conversion_custom_metric", "comment": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_purchases_sale_amount": {"type": "double precision", "index": 30, "name": "conversion_purchases_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}, "conversion_custom_sale_amount": {"type": "double precision", "index": 31, "name": "conversion_custom_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.twitter_ads__campaign_report"}, "model.twitter_ads.twitter_ads__keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "twitter_ads__keyword_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the account, campaign, line item (ad group), and keyword level, within a placement in Twitter.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "placement": {"type": "text", "index": 3, "name": "placement", "comment": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID of the related account."}, "account_name": {"type": "character varying", "index": 5, "name": "account_name", "comment": "Name of the associated account."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID of the related campaign."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the related campaign."}, "line_item_id": {"type": "text", "index": 8, "name": "line_item_id", "comment": "The ID of the related line item (ad group)."}, "line_item_name": {"type": "text", "index": 9, "name": "line_item_name", "comment": "The ID of the related line item."}, "keyword_id": {"type": "text", "index": 10, "name": "keyword_id", "comment": "Unique key of the table built from the combination of 'account_id', 'line_item_id', 'segment', and 'placement' fields."}, "keyword": {"type": "text", "index": 11, "name": "keyword", "comment": "The keyword whose performance is being tracked."}, "currency": {"type": "text", "index": 12, "name": "currency", "comment": "The currency all metrics for the account are set to."}, "clicks": {"type": "bigint", "index": 13, "name": "clicks", "comment": "The clicks for the line item + keyword on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes."}, "impressions": {"type": "bigint", "index": 14, "name": "impressions", "comment": "The impressions for the line item + keyword on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results."}, "spend": {"type": "numeric", "index": 15, "name": "spend", "comment": "The spend for the line item + keyword on that day in whichever currency was selected during account creation."}, "spend_micro": {"type": "bigint", "index": 16, "name": "spend_micro", "comment": "The spend for the line item + keyword on that day, in micros and in whichever currency was selected during account creation."}, "url_clicks": {"type": "bigint", "index": 17, "name": "url_clicks", "comment": "The url clicks for the line item + keyword on that day."}, "total_conversions": {"type": "numeric", "index": 18, "name": "total_conversions", "comment": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric)."}, "total_conversions_sale_amount": {"type": "double precision", "index": 19, "name": "total_conversions_sale_amount", "comment": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount)."}, "conversion_purchases_metric": {"type": "numeric", "index": 20, "name": "conversion_purchases_metric", "comment": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_custom_metric": {"type": "numeric", "index": 21, "name": "conversion_custom_metric", "comment": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_purchases_sale_amount": {"type": "double precision", "index": 22, "name": "conversion_purchases_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}, "conversion_custom_sale_amount": {"type": "double precision", "index": 23, "name": "conversion_custom_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.twitter_ads__keyword_report"}, "model.twitter_ads.twitter_ads__line_item_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "twitter_ads__line_item_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the account, campaign, and line item (ad group) level, within a placement in Twitter.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "placement": {"type": "text", "index": 3, "name": "placement", "comment": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID of the related account."}, "account_name": {"type": "character varying", "index": 5, "name": "account_name", "comment": "The name of the related account."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID of the line item's campaign."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the line item's campaign."}, "line_item_id": {"type": "text", "index": 8, "name": "line_item_id", "comment": "The ID of the line item."}, "line_item_name": {"type": "text", "index": 9, "name": "line_item_name", "comment": "The name of the line item."}, "is_deleted": {"type": "boolean", "index": 10, "name": "is_deleted", "comment": "Whether the record has been deleted or not."}, "line_item_status": {"type": "text", "index": 11, "name": "line_item_status", "comment": "The status of the line item."}, "campaign_status": {"type": "text", "index": 12, "name": "campaign_status", "comment": "The status of the line item's related campaign."}, "currency": {"type": "text", "index": 13, "name": "currency", "comment": "The currency in which metrics will be reported."}, "advertiser_domain": {"type": "text", "index": 14, "name": "advertiser_domain", "comment": "The website domain for this advertiser, without the protocol specification."}, "advertiser_user_id": {"type": "integer", "index": 15, "name": "advertiser_user_id", "comment": "The Twitter user identifier for the handle promoting the ad."}, "bid_type": {"type": "text", "index": 16, "name": "bid_type", "comment": "The bidding mechanism."}, "bid_unit": {"type": "text", "index": 17, "name": "bid_unit", "comment": "The bid unit for this line item."}, "charge_by": {"type": "text", "index": 18, "name": "charge_by", "comment": "The unit to charge this line item by."}, "objective": {"type": "text", "index": 19, "name": "objective", "comment": "The campaign objective for this line item."}, "optimization": {"type": "text", "index": 20, "name": "optimization", "comment": "The optimization setting to use with this line item."}, "product_type": {"type": "text", "index": 21, "name": "product_type", "comment": "The type of promoted product that this line item will contain."}, "primary_web_event_tag": {"type": "integer", "index": 22, "name": "primary_web_event_tag", "comment": "The identifier of the primary web event tag. Allows more accurate tracking of engagements for the campaign pertaining to this line item."}, "creative_source": {"type": "text", "index": 23, "name": "creative_source", "comment": "The source of the creatives for the line item."}, "start_timestamp": {"type": "integer", "index": 24, "name": "start_timestamp", "comment": "The timestamp at which the line item will start being served."}, "end_timestamp": {"type": "integer", "index": 25, "name": "end_timestamp", "comment": "The timestamp at which the line item will stop being served."}, "created_timestamp": {"type": "text", "index": 26, "name": "created_timestamp", "comment": "The timestamp the account was created."}, "updated_timestamp": {"type": "text", "index": 27, "name": "updated_timestamp", "comment": "The timestamp the account was last updated."}, "target_cpa": {"type": "numeric", "index": 28, "name": "target_cpa", "comment": "The target cost per acquisition for the line item."}, "total_budget_amount": {"type": "numeric", "index": 29, "name": "total_budget_amount", "comment": "The total budget amount to be allocated to the campaign."}, "bid_amount": {"type": "numeric", "index": 30, "name": "bid_amount", "comment": "The bid amount to be associated with this line item."}, "clicks": {"type": "bigint", "index": 31, "name": "clicks", "comment": "The number of clicks on that date. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes."}, "impressions": {"type": "bigint", "index": 32, "name": "impressions", "comment": "The number of impressions on that date. This is the number of users who see a Promoted Ad either in their home timeline or search results."}, "spend": {"type": "numeric", "index": 33, "name": "spend", "comment": "The amount of spend on that date."}, "spend_micro": {"type": "bigint", "index": 34, "name": "spend_micro", "comment": "The amount of spend, in micros, on that date."}, "url_clicks": {"type": "bigint", "index": 35, "name": "url_clicks", "comment": "The number of URL clicks on that date."}, "total_conversions": {"type": "numeric", "index": 36, "name": "total_conversions", "comment": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric)."}, "total_conversions_sale_amount": {"type": "double precision", "index": 37, "name": "total_conversions_sale_amount", "comment": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount)."}, "conversion_purchases_metric": {"type": "numeric", "index": 38, "name": "conversion_purchases_metric", "comment": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_custom_metric": {"type": "numeric", "index": 39, "name": "conversion_custom_metric", "comment": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_purchases_sale_amount": {"type": "double precision", "index": 40, "name": "conversion_purchases_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}, "conversion_custom_sale_amount": {"type": "double precision", "index": 41, "name": "conversion_custom_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.twitter_ads__line_item_report"}, "model.twitter_ads.twitter_ads__promoted_tweet_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "twitter_ads__promoted_tweet_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the account, campaign, line item (ad group), and promoted tweet level, within a placement in Twitter.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "placement": {"type": "text", "index": 3, "name": "placement", "comment": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID of the related account."}, "account_name": {"type": "character varying", "index": 5, "name": "account_name", "comment": "The name of the related account."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID of the related campaign."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the related campaign."}, "line_item_id": {"type": "text", "index": 8, "name": "line_item_id", "comment": "The ID of the related line item (ad group)."}, "line_item_name": {"type": "text", "index": 9, "name": "line_item_name", "comment": "The ID of the related line item."}, "promoted_tweet_id": {"type": "text", "index": 10, "name": "promoted_tweet_id", "comment": "The ID of the promoted tweet that the URL appeared in."}, "tweet_id": {"type": "bigint", "index": 11, "name": "tweet_id", "comment": "The ID of the tweet that the URL appeared in."}, "tweet_name": {"type": "integer", "index": 12, "name": "tweet_name", "comment": "The name, if provided, of the tweet that the URL appeared in."}, "full_text": {"type": "text", "index": 13, "name": "full_text", "comment": "The full text of the tweet that the URL appeared in."}, "is_deleted": {"type": "boolean", "index": 14, "name": "is_deleted", "comment": "Whether the record has been deleted or not."}, "promoted_tweet_status": {"type": "text", "index": 15, "name": "promoted_tweet_status", "comment": "The status of the promoted tweet."}, "campaign_status": {"type": "text", "index": 16, "name": "campaign_status", "comment": "The status of the tweet's campaign."}, "line_item_status": {"type": "text", "index": 17, "name": "line_item_status", "comment": "The status of the tweet's line item."}, "language": {"type": "text", "index": 18, "name": "language", "comment": "Two-letter language code of the tweet."}, "currency": {"type": "text", "index": 19, "name": "currency", "comment": "The currency all metrics for the account are set to."}, "approval_status": {"type": "text", "index": 20, "name": "approval_status", "comment": "The approval status of the promoted tweet."}, "created_timestamp": {"type": "text", "index": 21, "name": "created_timestamp", "comment": "The timestamp the account was created."}, "updated_timestamp": {"type": "text", "index": 22, "name": "updated_timestamp", "comment": "The timestamp the account was last updated."}, "clicks": {"type": "bigint", "index": 23, "name": "clicks", "comment": "The clicks for the promoted tweet + URL on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes."}, "impressions": {"type": "bigint", "index": 24, "name": "impressions", "comment": "The impressions for the promoted tweet + URL on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results."}, "spend": {"type": "numeric", "index": 25, "name": "spend", "comment": "The spend for the promoted tweet + URL on that day."}, "spend_micro": {"type": "bigint", "index": 26, "name": "spend_micro", "comment": "The spend, in micros, for the tweet + URL on that day."}, "url_clicks": {"type": "bigint", "index": 27, "name": "url_clicks", "comment": "The URL clicks for the promoted tweet + URL on that day."}, "total_conversions": {"type": "numeric", "index": 28, "name": "total_conversions", "comment": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric)."}, "total_conversions_sale_amount": {"type": "double precision", "index": 29, "name": "total_conversions_sale_amount", "comment": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount)."}, "conversion_purchases_metric": {"type": "numeric", "index": 30, "name": "conversion_purchases_metric", "comment": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_custom_metric": {"type": "numeric", "index": 31, "name": "conversion_custom_metric", "comment": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_purchases_sale_amount": {"type": "double precision", "index": 32, "name": "conversion_purchases_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}, "conversion_custom_sale_amount": {"type": "double precision", "index": 33, "name": "conversion_custom_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.twitter_ads__promoted_tweet_report"}, "model.twitter_ads.twitter_ads__url_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "twitter_ads__url_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the account, campaign, line item (ad group), promoted tweet, and url level, within a placement in Twitter.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "placement": {"type": "text", "index": 3, "name": "placement", "comment": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID of the related account."}, "account_name": {"type": "character varying", "index": 5, "name": "account_name", "comment": "The name of the related account."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID of the related campaign."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the related campaign."}, "line_item_id": {"type": "text", "index": 8, "name": "line_item_id", "comment": "The ID of the related line item (ad group)."}, "line_item_name": {"type": "text", "index": 9, "name": "line_item_name", "comment": "The ID of the related line item."}, "promoted_tweet_id": {"type": "text", "index": 10, "name": "promoted_tweet_id", "comment": "The ID of the promoted tweet that the URL appeared in."}, "tweet_id": {"type": "bigint", "index": 11, "name": "tweet_id", "comment": "The ID of the tweet that the URL appeared in."}, "tweet_name": {"type": "integer", "index": 12, "name": "tweet_name", "comment": "The name, if provided, of the tweet that the URL appeared in."}, "tweet_full_text": {"type": "text", "index": 13, "name": "tweet_full_text", "comment": "The full text of the tweet that the URL appeared in."}, "base_url": {"type": "text", "index": 14, "name": "base_url", "comment": "The base URL of the ad, extracted from the `expanded_url`."}, "url_host": {"type": "text", "index": 15, "name": "url_host", "comment": "The URL host of the ad, extracted from the `expanded_url`."}, "url_path": {"type": "text", "index": 16, "name": "url_path", "comment": "The URL path of the ad, extracted from the `expanded_url`."}, "utm_source": {"type": "text", "index": 17, "name": "utm_source", "comment": "The utm_source parameter of the ad, extracted from the `expanded_url`."}, "utm_medium": {"type": "text", "index": 18, "name": "utm_medium", "comment": "The utm_medium parameter of the ad, extracted from the `expanded_url`."}, "utm_campaign": {"type": "text", "index": 19, "name": "utm_campaign", "comment": "The utm_campaign parameter of the ad, extracted from the `expanded_url`."}, "utm_content": {"type": "text", "index": 20, "name": "utm_content", "comment": "The utm_content parameter of the ad, extracted from the `expanded_url`."}, "utm_term": {"type": "text", "index": 21, "name": "utm_term", "comment": "The utm_term parameter of the ad, extracted from the `expanded_url`."}, "expanded_url": {"type": "text", "index": 22, "name": "expanded_url", "comment": "The fully expanded URL."}, "display_url": {"type": "text", "index": 23, "name": "display_url", "comment": "The URL as it will be displayed."}, "currency": {"type": "text", "index": 24, "name": "currency", "comment": "The currency all metrics for the account are set to."}, "clicks": {"type": "bigint", "index": 25, "name": "clicks", "comment": "The clicks for the promoted tweet + URL on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes."}, "impressions": {"type": "bigint", "index": 26, "name": "impressions", "comment": "The impressions for the promoted tweet + URL on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results."}, "spend": {"type": "numeric", "index": 27, "name": "spend", "comment": "The spend for the promoted tweet + URL on that day."}, "spend_micro": {"type": "bigint", "index": 28, "name": "spend_micro", "comment": "The spend, in micros, for the tweet + URL on that day."}, "url_clicks": {"type": "bigint", "index": 29, "name": "url_clicks", "comment": "The URL clicks for the promoted tweet + URL on that day."}, "total_conversions": {"type": "numeric", "index": 30, "name": "total_conversions", "comment": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric)."}, "total_conversions_sale_amount": {"type": "double precision", "index": 31, "name": "total_conversions_sale_amount", "comment": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount)."}, "conversion_purchases_metric": {"type": "numeric", "index": 32, "name": "conversion_purchases_metric", "comment": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_custom_metric": {"type": "numeric", "index": 33, "name": "conversion_custom_metric", "comment": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_purchases_sale_amount": {"type": "double precision", "index": 34, "name": "conversion_purchases_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}, "conversion_custom_sale_amount": {"type": "double precision", "index": 35, "name": "conversion_custom_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.twitter_ads__url_report"}}, "sources": {"source.amazon_ads.amazon_ads.ad_group_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_ad_group_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "creation_date": {"type": "text", "index": 5, "name": "creation_date", "comment": null}, "default_bid": {"type": "double precision", "index": 6, "name": "default_bid", "comment": null}, "name": {"type": "text", "index": 7, "name": "name", "comment": null}, "serving_status": {"type": "text", "index": 8, "name": "serving_status", "comment": null}, "state": {"type": "text", "index": 9, "name": "state", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.amazon_ads.amazon_ads.ad_group_history"}, "source.amazon_ads.amazon_ads.ad_group_level_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_ad_group_level_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "campaign_bidding_strategy": {"type": "text", "index": 4, "name": "campaign_bidding_strategy", "comment": null}, "clicks": {"type": "integer", "index": 5, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 6, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.amazon_ads.amazon_ads.ad_group_level_report"}, "source.amazon_ads.amazon_ads.advertised_product_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_advertised_product_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "integer", "index": 2, "name": "ad_id", "comment": null}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 4, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "campaign_budget_amount": {"type": "double precision", "index": 6, "name": "campaign_budget_amount", "comment": null}, "campaign_budget_currency_code": {"type": "text", "index": 7, "name": "campaign_budget_currency_code", "comment": null}, "campaign_budget_type": {"type": "text", "index": 8, "name": "campaign_budget_type", "comment": null}, "clicks": {"type": "integer", "index": 9, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 10, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 11, "name": "impressions", "comment": null}, "advertised_asin": {"type": "integer", "index": 12, "name": "advertised_asin", "comment": null}, "advertised_sku": {"type": "integer", "index": 13, "name": "advertised_sku", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.amazon_ads.amazon_ads.advertised_product_report"}, "source.amazon_ads.amazon_ads.campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "bidding_strategy": {"type": "text", "index": 4, "name": "bidding_strategy", "comment": null}, "creation_date": {"type": "text", "index": 5, "name": "creation_date", "comment": null}, "budget": {"type": "integer", "index": 6, "name": "budget", "comment": null}, "end_date": {"type": "integer", "index": 7, "name": "end_date", "comment": null}, "name": {"type": "text", "index": 8, "name": "name", "comment": null}, "portfolio_id": {"type": "integer", "index": 9, "name": "portfolio_id", "comment": null}, "profile_id": {"type": "integer", "index": 10, "name": "profile_id", "comment": null}, "serving_status": {"type": "text", "index": 11, "name": "serving_status", "comment": null}, "start_date": {"type": "date", "index": 12, "name": "start_date", "comment": null}, "state": {"type": "text", "index": 13, "name": "state", "comment": null}, "targeting_type": {"type": "text", "index": 14, "name": "targeting_type", "comment": null}, "budget_type": {"type": "text", "index": 15, "name": "budget_type", "comment": null}, "effective_budget": {"type": "integer", "index": 16, "name": "effective_budget", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.amazon_ads.amazon_ads.campaign_history"}, "source.amazon_ads.amazon_ads.campaign_level_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_campaign_level_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "campaign_applicable_budget_rule_id": {"type": "integer", "index": 4, "name": "campaign_applicable_budget_rule_id", "comment": null}, "campaign_applicable_budget_rule_name": {"type": "integer", "index": 5, "name": "campaign_applicable_budget_rule_name", "comment": null}, "campaign_bidding_strategy": {"type": "text", "index": 6, "name": "campaign_bidding_strategy", "comment": null}, "campaign_budget_amount": {"type": "double precision", "index": 7, "name": "campaign_budget_amount", "comment": null}, "campaign_budget_currency_code": {"type": "text", "index": 8, "name": "campaign_budget_currency_code", "comment": null}, "campaign_budget_type": {"type": "text", "index": 9, "name": "campaign_budget_type", "comment": null}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 11, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 12, "name": "impressions", "comment": null}, "campaign_rule_based_budget_amount": {"type": "integer", "index": 13, "name": "campaign_rule_based_budget_amount", "comment": null}, "sales_7_d": {"type": "integer", "index": 14, "name": "sales_7_d", "comment": null}, "purchases_30_d": {"type": "integer", "index": 15, "name": "purchases_30_d", "comment": null}, "sales_30_d": {"type": "integer", "index": 16, "name": "sales_30_d", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.amazon_ads.amazon_ads.campaign_level_report"}, "source.amazon_ads.amazon_ads.keyword_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_keyword_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "ad_group_id": {"type": "integer", "index": 4, "name": "ad_group_id", "comment": null}, "bid": {"type": "double precision", "index": 5, "name": "bid", "comment": null}, "campaign_id": {"type": "integer", "index": 6, "name": "campaign_id", "comment": null}, "creation_date": {"type": "text", "index": 7, "name": "creation_date", "comment": null}, "keyword_text": {"type": "text", "index": 8, "name": "keyword_text", "comment": null}, "match_type": {"type": "text", "index": 9, "name": "match_type", "comment": null}, "native_language_keyword": {"type": "integer", "index": 10, "name": "native_language_keyword", "comment": null}, "serving_status": {"type": "text", "index": 11, "name": "serving_status", "comment": null}, "state": {"type": "text", "index": 12, "name": "state", "comment": null}, "native_language_locale": {"type": "integer", "index": 13, "name": "native_language_locale", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.amazon_ads.amazon_ads.keyword_history"}, "source.amazon_ads.amazon_ads.portfolio_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_portfolio_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "budget_amount": {"type": "integer", "index": 4, "name": "budget_amount", "comment": null}, "budget_currency_code": {"type": "integer", "index": 5, "name": "budget_currency_code", "comment": null}, "budget_end_date": {"type": "integer", "index": 6, "name": "budget_end_date", "comment": null}, "budget_policy": {"type": "integer", "index": 7, "name": "budget_policy", "comment": null}, "budget_start_date": {"type": "integer", "index": 8, "name": "budget_start_date", "comment": null}, "creation_date": {"type": "text", "index": 9, "name": "creation_date", "comment": null}, "in_budget": {"type": "boolean", "index": 10, "name": "in_budget", "comment": null}, "name": {"type": "text", "index": 11, "name": "name", "comment": null}, "profile_id": {"type": "integer", "index": 12, "name": "profile_id", "comment": null}, "serving_status": {"type": "text", "index": 13, "name": "serving_status", "comment": null}, "state": {"type": "text", "index": 14, "name": "state", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.amazon_ads.amazon_ads.portfolio_history"}, "source.amazon_ads.amazon_ads.product_ad_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_product_ad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "ad_group_id": {"type": "integer", "index": 4, "name": "ad_group_id", "comment": null}, "asin": {"type": "text", "index": 5, "name": "asin", "comment": null}, "campaign_id": {"type": "integer", "index": 6, "name": "campaign_id", "comment": null}, "creation_date": {"type": "text", "index": 7, "name": "creation_date", "comment": null}, "serving_status": {"type": "text", "index": 8, "name": "serving_status", "comment": null}, "sku": {"type": "integer", "index": 9, "name": "sku", "comment": null}, "state": {"type": "text", "index": 10, "name": "state", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.amazon_ads.amazon_ads.product_ad_history"}, "source.amazon_ads.amazon_ads.profile": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_profile_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": null}, "account_marketplace_string_id": {"type": "text", "index": 5, "name": "account_marketplace_string_id", "comment": null}, "account_name": {"type": "text", "index": 6, "name": "account_name", "comment": null}, "account_sub_type": {"type": "integer", "index": 7, "name": "account_sub_type", "comment": null}, "account_type": {"type": "text", "index": 8, "name": "account_type", "comment": null}, "account_valid_payment_method": {"type": "boolean", "index": 9, "name": "account_valid_payment_method", "comment": null}, "country_code": {"type": "text", "index": 10, "name": "country_code", "comment": null}, "currency_code": {"type": "text", "index": 11, "name": "currency_code", "comment": null}, "daily_budget": {"type": "integer", "index": 12, "name": "daily_budget", "comment": null}, "timezone": {"type": "text", "index": 13, "name": "timezone", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.amazon_ads.amazon_ads.profile"}, "source.amazon_ads.amazon_ads.search_term_ad_keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_search_term_ad_keyword_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "keyword_id": {"type": "integer", "index": 4, "name": "keyword_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "campaign_budget_amount": {"type": "double precision", "index": 6, "name": "campaign_budget_amount", "comment": null}, "campaign_budget_currency_code": {"type": "text", "index": 7, "name": "campaign_budget_currency_code", "comment": null}, "campaign_budget_type": {"type": "text", "index": 8, "name": "campaign_budget_type", "comment": null}, "clicks": {"type": "integer", "index": 9, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 10, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 11, "name": "impressions", "comment": null}, "keyword_bid": {"type": "double precision", "index": 12, "name": "keyword_bid", "comment": null}, "search_term": {"type": "text", "index": 13, "name": "search_term", "comment": null}, "targeting": {"type": "text", "index": 14, "name": "targeting", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.amazon_ads.amazon_ads.search_term_ad_keyword_report"}, "source.amazon_ads.amazon_ads.targeting_keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_targeting_keyword_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "keyword_id": {"type": "integer", "index": 4, "name": "keyword_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "ad_keyword_status": {"type": "text", "index": 6, "name": "ad_keyword_status", "comment": null}, "campaign_budget_amount": {"type": "double precision", "index": 7, "name": "campaign_budget_amount", "comment": null}, "campaign_budget_currency_code": {"type": "text", "index": 8, "name": "campaign_budget_currency_code", "comment": null}, "campaign_budget_type": {"type": "text", "index": 9, "name": "campaign_budget_type", "comment": null}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 11, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 12, "name": "impressions", "comment": null}, "keyword_bid": {"type": "double precision", "index": 13, "name": "keyword_bid", "comment": null}, "keyword_type": {"type": "text", "index": 14, "name": "keyword_type", "comment": null}, "match_type": {"type": "text", "index": 15, "name": "match_type", "comment": null}, "targeting": {"type": "text", "index": 16, "name": "targeting", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.amazon_ads.amazon_ads.targeting_keyword_report"}, "source.apple_search_ads.apple_search_ads.ad_group_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_ad_group_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "timestamp without time zone", "index": 2, "name": "modification_time", "comment": null}, "automated_keywords_opt_in": {"type": "boolean", "index": 3, "name": "automated_keywords_opt_in", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "cpa_goal_amount": {"type": "integer", "index": 5, "name": "cpa_goal_amount", "comment": null}, "cpa_goal_currency": {"type": "integer", "index": 6, "name": "cpa_goal_currency", "comment": null}, "default_cpc_bid_amount": {"type": "integer", "index": 7, "name": "default_cpc_bid_amount", "comment": null}, "default_cpc_bid_currency": {"type": "integer", "index": 8, "name": "default_cpc_bid_currency", "comment": null}, "deleted": {"type": "boolean", "index": 9, "name": "deleted", "comment": null}, "end_time": {"type": "timestamp without time zone", "index": 10, "name": "end_time", "comment": null}, "name": {"type": "text", "index": 11, "name": "name", "comment": null}, "organization_id": {"type": "integer", "index": 12, "name": "organization_id", "comment": null}, "serving_state_reasons": {"type": "integer", "index": 13, "name": "serving_state_reasons", "comment": null}, "serving_status": {"type": "text", "index": 14, "name": "serving_status", "comment": null}, "start_time": {"type": "timestamp without time zone", "index": 15, "name": "start_time", "comment": null}, "status": {"type": "text", "index": 16, "name": "status", "comment": null}, "storefronts": {"type": "integer", "index": 17, "name": "storefronts", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads.apple_search_ads.ad_group_history"}, "source.apple_search_ads.apple_search_ads.ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_ad_group_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "avg_cpa_amount": {"type": "double precision", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "text", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "double precision", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "text", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "double precision", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "integer", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "integer", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "integer", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "double precision", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "integer", "index": 17, "name": "taps", "comment": null}, "tap_installs": {"type": "integer", "index": 18, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 19, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 20, "name": "tap_redownloads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads.apple_search_ads.ad_group_report"}, "source.apple_search_ads.apple_search_ads.ad_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_ad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"creation_time": {"type": "timestamp without time zone", "index": 1, "name": "creation_time", "comment": null}, "modification_time": {"type": "timestamp without time zone", "index": 2, "name": "modification_time", "comment": null}, "org_id": {"type": "integer", "index": 3, "name": "org_id", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "integer", "index": 5, "name": "ad_group_id", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "id": {"type": "integer", "index": 7, "name": "id", "comment": null}, "creative_id": {"type": "integer", "index": 8, "name": "creative_id", "comment": null}, "creative_type": {"type": "text", "index": 9, "name": "creative_type", "comment": null}, "status": {"type": "text", "index": 10, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads.apple_search_ads.ad_history"}, "source.apple_search_ads.apple_search_ads.ad_level_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_ad_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "integer", "index": 3, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "integer", "index": 4, "name": "ad_id", "comment": null}, "impressions": {"type": "integer", "index": 5, "name": "impressions", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 6, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 7, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 8, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 9, "name": "redownloads", "comment": null}, "tap_installs": {"type": "integer", "index": 10, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 11, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 12, "name": "tap_redownloads", "comment": null}, "taps": {"type": "integer", "index": 13, "name": "taps", "comment": null}, "conversions": {"type": "integer", "index": 14, "name": "conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads.apple_search_ads.ad_level_report"}, "source.apple_search_ads.apple_search_ads.campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "timestamp without time zone", "index": 2, "name": "modification_time", "comment": null}, "adam_id": {"type": "integer", "index": 3, "name": "adam_id", "comment": null}, "budget_amount": {"type": "integer", "index": 4, "name": "budget_amount", "comment": null}, "budget_currency": {"type": "text", "index": 5, "name": "budget_currency", "comment": null}, "budget_orders": {"type": "text", "index": 6, "name": "budget_orders", "comment": null}, "daily_budget_amount": {"type": "integer", "index": 7, "name": "daily_budget_amount", "comment": null}, "daily_budget_currency": {"type": "text", "index": 8, "name": "daily_budget_currency", "comment": null}, "deleted": {"type": "boolean", "index": 9, "name": "deleted", "comment": null}, "end_time": {"type": "timestamp without time zone", "index": 10, "name": "end_time", "comment": null}, "loc_invoice_detail_buyer_email": {"type": "integer", "index": 11, "name": "loc_invoice_detail_buyer_email", "comment": null}, "loc_invoice_detail_buyer_name": {"type": "integer", "index": 12, "name": "loc_invoice_detail_buyer_name", "comment": null}, "loc_invoice_detail_client_name": {"type": "integer", "index": 13, "name": "loc_invoice_detail_client_name", "comment": null}, "loc_invoice_detail_order_number": {"type": "integer", "index": 14, "name": "loc_invoice_detail_order_number", "comment": null}, "name": {"type": "text", "index": 15, "name": "name", "comment": null}, "organization_id": {"type": "integer", "index": 16, "name": "organization_id", "comment": null}, "payment_model": {"type": "text", "index": 17, "name": "payment_model", "comment": null}, "serving_state_reasons": {"type": "text", "index": 18, "name": "serving_state_reasons", "comment": null}, "serving_status": {"type": "text", "index": 19, "name": "serving_status", "comment": null}, "start_time": {"type": "timestamp without time zone", "index": 20, "name": "start_time", "comment": null}, "status": {"type": "text", "index": 21, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads.apple_search_ads.campaign_history"}, "source.apple_search_ads.apple_search_ads.campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_campaign_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "id": {"type": "integer", "index": 2, "name": "id", "comment": null}, "avg_cpa_amount": {"type": "double precision", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "text", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "double precision", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "text", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "double precision", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "integer", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "integer", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "integer", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "double precision", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "integer", "index": 17, "name": "taps", "comment": null}, "tap_installs": {"type": "integer", "index": 18, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 19, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 20, "name": "tap_redownloads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads.apple_search_ads.campaign_report"}, "source.apple_search_ads.apple_search_ads.keyword_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_keyword_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "timestamp without time zone", "index": 2, "name": "modification_time", "comment": null}, "ad_group_id": {"type": "integer", "index": 3, "name": "ad_group_id", "comment": null}, "bid_amount": {"type": "double precision", "index": 4, "name": "bid_amount", "comment": null}, "bid_currency": {"type": "text", "index": 5, "name": "bid_currency", "comment": null}, "campaign_id": {"type": "integer", "index": 6, "name": "campaign_id", "comment": null}, "deleted": {"type": "boolean", "index": 7, "name": "deleted", "comment": null}, "match_type": {"type": "text", "index": 8, "name": "match_type", "comment": null}, "status": {"type": "text", "index": 9, "name": "status", "comment": null}, "text": {"type": "text", "index": 10, "name": "text", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads.apple_search_ads.keyword_history"}, "source.apple_search_ads.apple_search_ads.keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_keyword_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "id": {"type": "integer", "index": 2, "name": "id", "comment": null}, "avg_cpa_amount": {"type": "double precision", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "text", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "double precision", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "text", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "double precision", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "integer", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "integer", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "integer", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "double precision", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "integer", "index": 17, "name": "taps", "comment": null}, "tap_installs": {"type": "integer", "index": 18, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 19, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 20, "name": "tap_redownloads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads.apple_search_ads.keyword_report"}, "source.apple_search_ads.apple_search_ads.organization": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_organization_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "currency": {"type": "text", "index": 2, "name": "currency", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "payment_model": {"type": "text", "index": 4, "name": "payment_model", "comment": null}, "role_names": {"type": "text", "index": 5, "name": "role_names", "comment": null}, "time_zone": {"type": "text", "index": 6, "name": "time_zone", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads.apple_search_ads.organization"}, "source.apple_search_ads.apple_search_ads.search_term_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_search_term_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "ad_group_id": {"type": "integer", "index": 2, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 4, "name": "date", "comment": null}, "ad_group_deleted": {"type": "boolean", "index": 5, "name": "ad_group_deleted", "comment": null}, "ad_group_name": {"type": "text", "index": 6, "name": "ad_group_name", "comment": null}, "avg_cpa_amount": {"type": "double precision", "index": 7, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "text", "index": 8, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "double precision", "index": 9, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "text", "index": 10, "name": "avg_cpt_currency", "comment": null}, "bid_amount_amount": {"type": "double precision", "index": 11, "name": "bid_amount_amount", "comment": null}, "bid_amount_currency": {"type": "text", "index": 12, "name": "bid_amount_currency", "comment": null}, "conversion_rate": {"type": "double precision", "index": 13, "name": "conversion_rate", "comment": null}, "conversions": {"type": "integer", "index": 14, "name": "conversions", "comment": null}, "deleted": {"type": "boolean", "index": 15, "name": "deleted", "comment": null}, "impressions": {"type": "integer", "index": 16, "name": "impressions", "comment": null}, "keyword": {"type": "text", "index": 17, "name": "keyword", "comment": null}, "keyword_display_status": {"type": "text", "index": 18, "name": "keyword_display_status", "comment": null}, "keyword_id": {"type": "integer", "index": 19, "name": "keyword_id", "comment": null}, "lat_off_installs": {"type": "integer", "index": 20, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "integer", "index": 21, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 22, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 23, "name": "local_spend_currency", "comment": null}, "match_type": {"type": "text", "index": 24, "name": "match_type", "comment": null}, "new_downloads": {"type": "integer", "index": 25, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 26, "name": "redownloads", "comment": null}, "search_term_source": {"type": "text", "index": 27, "name": "search_term_source", "comment": null}, "search_term_text": {"type": "text", "index": 28, "name": "search_term_text", "comment": null}, "tap_through_rate": {"type": "double precision", "index": 29, "name": "tap_through_rate", "comment": null}, "taps": {"type": "integer", "index": 30, "name": "taps", "comment": null}, "tap_installs": {"type": "integer", "index": 31, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 32, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 33, "name": "tap_redownloads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads.apple_search_ads.search_term_report"}, "source.facebook_ads.facebook_ads.account_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_account_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "character varying", "index": 2, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.facebook_ads.facebook_ads.account_history"}, "source.facebook_ads.facebook_ads.ad_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_ad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "ad_set_id": {"type": "bigint", "index": 3, "name": "ad_set_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": null}, "creative_id": {"type": "bigint", "index": 5, "name": "creative_id", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}, "updated_time": {"type": "timestamp without time zone", "index": 8, "name": "updated_time", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.facebook_ads.facebook_ads.ad_history"}, "source.facebook_ads.facebook_ads.ad_set_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_ad_set_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "updated_time": {"type": "timestamp without time zone", "index": 6, "name": "updated_time", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.facebook_ads.facebook_ads.ad_set_history"}, "source.facebook_ads.facebook_ads.basic_ad_action_values": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_basic_ad_action_values_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "integer", "index": 1, "name": "ad_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "_fivetran_id": {"type": "text", "index": 3, "name": "_fivetran_id", "comment": null}, "index": {"type": "integer", "index": 4, "name": "index", "comment": null}, "action_type": {"type": "text", "index": 5, "name": "action_type", "comment": null}, "value": {"type": "double precision", "index": 6, "name": "value", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}, "_7_d_click": {"type": "double precision", "index": 8, "name": "_7_d_click", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.facebook_ads.facebook_ads.basic_ad_action_values"}, "source.facebook_ads.facebook_ads.basic_ad_actions": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_basic_ad_actions_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "ad_id": {"type": "integer", "index": 2, "name": "ad_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "index": {"type": "integer", "index": 4, "name": "index", "comment": null}, "_1_d_view": {"type": "double precision", "index": 5, "name": "_1_d_view", "comment": null}, "_7_d_click": {"type": "double precision", "index": 6, "name": "_7_d_click", "comment": null}, "_fivetran_synced": {"type": "text", "index": 7, "name": "_fivetran_synced", "comment": null}, "action_type": {"type": "text", "index": 8, "name": "action_type", "comment": null}, "inline": {"type": "double precision", "index": 9, "name": "inline", "comment": null}, "value": {"type": "double precision", "index": 10, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.facebook_ads.facebook_ads.basic_ad_actions"}, "source.facebook_ads.facebook_ads.basic_ad": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_basic_ad_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "bigint", "index": 1, "name": "ad_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "impressions": {"type": "integer", "index": 4, "name": "impressions", "comment": null}, "inline_link_clicks": {"type": "integer", "index": 5, "name": "inline_link_clicks", "comment": null}, "spend": {"type": "double precision", "index": 6, "name": "spend", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.facebook_ads.facebook_ads.basic_ad"}, "source.facebook_ads.facebook_ads.campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "updated_time": {"type": "timestamp without time zone", "index": 5, "name": "updated_time", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.facebook_ads.facebook_ads.campaign_history"}, "source.facebook_ads.facebook_ads.creative_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_creative_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"page_link": {"type": "character varying", "index": 1, "name": "page_link", "comment": null}, "template_page_link": {"type": "character varying", "index": 2, "name": "template_page_link", "comment": null}, "id": {"type": "bigint", "index": 3, "name": "id", "comment": null}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "url_tags": {"type": "text", "index": 6, "name": "url_tags", "comment": null}, "_fivetran_synced": {"type": "text", "index": 7, "name": "_fivetran_synced", "comment": null}, "asset_feed_spec_link_urls": {"type": "text", "index": 8, "name": "asset_feed_spec_link_urls", "comment": null}, "object_story_link_data_child_attachments": {"type": "text", "index": 9, "name": "object_story_link_data_child_attachments", "comment": null}, "object_story_link_data_caption": {"type": "text", "index": 10, "name": "object_story_link_data_caption", "comment": null}, "object_story_link_data_description": {"type": "text", "index": 11, "name": "object_story_link_data_description", "comment": null}, "object_story_link_data_link": {"type": "text", "index": 12, "name": "object_story_link_data_link", "comment": null}, "object_story_link_data_message": {"type": "text", "index": 13, "name": "object_story_link_data_message", "comment": null}, "template_app_link_spec_ios": {"type": "text", "index": 14, "name": "template_app_link_spec_ios", "comment": null}, "_fivetran_id": {"type": "text", "index": 15, "name": "_fivetran_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.facebook_ads.facebook_ads.creative_history"}, "source.facebook_ads.facebook_ads.demographics_country_actions": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_demographics_country_actions_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "action_type": {"type": "text", "index": 4, "name": "action_type", "comment": null}, "date": {"type": "date", "index": 5, "name": "date", "comment": null}, "index": {"type": "integer", "index": 6, "name": "index", "comment": null}, "inline": {"type": "double precision", "index": 7, "name": "inline", "comment": null}, "value": {"type": "double precision", "index": 8, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.facebook_ads.facebook_ads.demographics_country_actions"}, "source.facebook_ads.facebook_ads.demographics_country": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_demographics_country_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "country": {"type": "text", "index": 4, "name": "country", "comment": null}, "date": {"type": "date", "index": 5, "name": "date", "comment": null}, "frequency": {"type": "double precision", "index": 6, "name": "frequency", "comment": null}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": null}, "inline_link_clicks": {"type": "integer", "index": 8, "name": "inline_link_clicks", "comment": null}, "reach": {"type": "integer", "index": 9, "name": "reach", "comment": null}, "spend": {"type": "double precision", "index": 10, "name": "spend", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.facebook_ads.facebook_ads.demographics_country"}, "source.facebook_ads.facebook_ads.demographics_region_actions": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_demographics_region_actions_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "action_type": {"type": "text", "index": 4, "name": "action_type", "comment": null}, "date": {"type": "date", "index": 5, "name": "date", "comment": null}, "index": {"type": "integer", "index": 6, "name": "index", "comment": null}, "value": {"type": "double precision", "index": 7, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.facebook_ads.facebook_ads.demographics_region_actions"}, "source.facebook_ads.facebook_ads.demographics_region": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_demographics_region_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "date": {"type": "date", "index": 4, "name": "date", "comment": null}, "frequency": {"type": "double precision", "index": 5, "name": "frequency", "comment": null}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": null}, "inline_link_clicks": {"type": "integer", "index": 7, "name": "inline_link_clicks", "comment": null}, "reach": {"type": "integer", "index": 8, "name": "reach", "comment": null}, "region": {"type": "text", "index": 9, "name": "region", "comment": null}, "spend": {"type": "double precision", "index": 10, "name": "spend", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.facebook_ads.facebook_ads.demographics_region"}, "source.google_ads.google_ads.account_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_account_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "auto_tagging_enabled": {"type": "boolean", "index": 4, "name": "auto_tagging_enabled", "comment": null}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": null}, "descriptive_name": {"type": "integer", "index": 6, "name": "descriptive_name", "comment": null}, "final_url_suffix": {"type": "boolean", "index": 7, "name": "final_url_suffix", "comment": null}, "hidden": {"type": "boolean", "index": 8, "name": "hidden", "comment": null}, "manager": {"type": "integer", "index": 9, "name": "manager", "comment": null}, "manager_customer_id": {"type": "double precision", "index": 10, "name": "manager_customer_id", "comment": null}, "optimization_score": {"type": "text", "index": 11, "name": "optimization_score", "comment": null}, "pay_per_conversion_eligibility_failure_reasons": {"type": "boolean", "index": 12, "name": "pay_per_conversion_eligibility_failure_reasons", "comment": null}, "test_account": {"type": "text", "index": 13, "name": "test_account", "comment": null}, "time_zone": {"type": "integer", "index": 14, "name": "time_zone", "comment": null}, "tracking_url_template": {"type": "integer", "index": 15, "name": "tracking_url_template", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.account_history"}, "source.google_ads.google_ads.account_stats": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_account_stats_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "customer_id": {"type": "integer", "index": 2, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "active_view_impressions": {"type": "integer", "index": 5, "name": "active_view_impressions", "comment": null}, "active_view_measurability": {"type": "integer", "index": 6, "name": "active_view_measurability", "comment": null}, "active_view_measurable_cost_micros": {"type": "integer", "index": 7, "name": "active_view_measurable_cost_micros", "comment": null}, "active_view_measurable_impressions": {"type": "integer", "index": 8, "name": "active_view_measurable_impressions", "comment": null}, "active_view_viewability": {"type": "integer", "index": 9, "name": "active_view_viewability", "comment": null}, "ad_network_type": {"type": "text", "index": 10, "name": "ad_network_type", "comment": null}, "clicks": {"type": "integer", "index": 11, "name": "clicks", "comment": null}, "conversions": {"type": "integer", "index": 12, "name": "conversions", "comment": null}, "conversions_value": {"type": "integer", "index": 13, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 14, "name": "cost_micros", "comment": null}, "device": {"type": "text", "index": 15, "name": "device", "comment": null}, "impressions": {"type": "integer", "index": 16, "name": "impressions", "comment": null}, "interaction_event_types": {"type": "text", "index": 17, "name": "interaction_event_types", "comment": null}, "interactions": {"type": "integer", "index": 18, "name": "interactions", "comment": null}, "view_through_conversions": {"type": "integer", "index": 19, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.account_stats"}, "source.google_ads.google_ads.ad_group_criterion_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_ad_group_criterion_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 2, "name": "ad_group_id", "comment": null}, "base_campaign_id": {"type": "bigint", "index": 3, "name": "base_campaign_id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 4, "name": "updated_at", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "type": {"type": "text", "index": 6, "name": "type", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}, "keyword_match_type": {"type": "text", "index": 8, "name": "keyword_match_type", "comment": null}, "keyword_text": {"type": "text", "index": 9, "name": "keyword_text", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.ad_group_criterion_history"}, "source.google_ads.google_ads.ad_group_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_ad_group_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "type": {"type": "text", "index": 3, "name": "type", "comment": null}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.ad_group_history"}, "source.google_ads.google_ads.ad_group_stats": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_ad_group_stats_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "customer_id": {"type": "bigint", "index": 2, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "active_view_impressions": {"type": "integer", "index": 5, "name": "active_view_impressions", "comment": null}, "active_view_measurability": {"type": "integer", "index": 6, "name": "active_view_measurability", "comment": null}, "active_view_measurable_cost_micros": {"type": "integer", "index": 7, "name": "active_view_measurable_cost_micros", "comment": null}, "active_view_measurable_impressions": {"type": "integer", "index": 8, "name": "active_view_measurable_impressions", "comment": null}, "active_view_viewability": {"type": "integer", "index": 9, "name": "active_view_viewability", "comment": null}, "ad_network_type": {"type": "text", "index": 10, "name": "ad_network_type", "comment": null}, "base_ad_group": {"type": "text", "index": 11, "name": "base_ad_group", "comment": null}, "campaign_base_campaign": {"type": "text", "index": 12, "name": "campaign_base_campaign", "comment": null}, "campaign_id": {"type": "bigint", "index": 13, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 14, "name": "clicks", "comment": null}, "conversions": {"type": "double precision", "index": 15, "name": "conversions", "comment": null}, "conversions_value": {"type": "integer", "index": 16, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 17, "name": "cost_micros", "comment": null}, "device": {"type": "text", "index": 18, "name": "device", "comment": null}, "id": {"type": "bigint", "index": 19, "name": "id", "comment": null}, "impressions": {"type": "integer", "index": 20, "name": "impressions", "comment": null}, "interaction_event_types": {"type": "text", "index": 21, "name": "interaction_event_types", "comment": null}, "interactions": {"type": "integer", "index": 22, "name": "interactions", "comment": null}, "view_through_conversions": {"type": "integer", "index": 23, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.ad_group_stats"}, "source.google_ads.google_ads.ad_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_ad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "bigint", "index": 1, "name": "ad_group_id", "comment": null}, "id": {"type": "bigint", "index": 2, "name": "id", "comment": null}, "name": {"type": "integer", "index": 3, "name": "name", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 4, "name": "updated_at", "comment": null}, "type": {"type": "integer", "index": 5, "name": "type", "comment": null}, "status": {"type": "text", "index": 6, "name": "status", "comment": null}, "display_url": {"type": "integer", "index": 7, "name": "display_url", "comment": null}, "final_urls": {"type": "text", "index": 8, "name": "final_urls", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.ad_history"}, "source.google_ads.google_ads.ad_stats": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_ad_stats_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"customer_id": {"type": "bigint", "index": 1, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "ad_group": {"type": "text", "index": 4, "name": "ad_group", "comment": null}, "keyword_ad_group_criterion": {"type": "text", "index": 5, "name": "keyword_ad_group_criterion", "comment": null}, "ad_network_type": {"type": "text", "index": 6, "name": "ad_network_type", "comment": null}, "device": {"type": "text", "index": 7, "name": "device", "comment": null}, "ad_id": {"type": "bigint", "index": 8, "name": "ad_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 9, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": null}, "cost_micros": {"type": "integer", "index": 11, "name": "cost_micros", "comment": null}, "impressions": {"type": "integer", "index": 12, "name": "impressions", "comment": null}, "conversions": {"type": "integer", "index": 13, "name": "conversions", "comment": null}, "conversions_value": {"type": "double precision", "index": 14, "name": "conversions_value", "comment": null}, "view_through_conversions": {"type": "integer", "index": 15, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.ad_stats"}, "source.google_ads.google_ads.campaign_bid_modifier_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_campaign_bid_modifier_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "bigint", "index": 1, "name": "campaign_id", "comment": null}, "criterion_id": {"type": "bigint", "index": 2, "name": "criterion_id", "comment": null}, "bid_modifier": {"type": "double precision", "index": 3, "name": "bid_modifier", "comment": null}, "interaction_type": {"type": "text", "index": 4, "name": "interaction_type", "comment": null}, "interaction_event_types": {"type": "text", "index": 5, "name": "interaction_event_types", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 6, "name": "updated_at", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 7, "name": "_fivetran_active", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.campaign_bid_modifier_history"}, "source.google_ads.google_ads.campaign_bidding_strategy_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_campaign_bidding_strategy_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "bigint", "index": 1, "name": "campaign_id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "cpc_bid_ceiling_micros": {"type": "integer", "index": 3, "name": "cpc_bid_ceiling_micros", "comment": null}, "cpc_bid_floor_micros": {"type": "integer", "index": 4, "name": "cpc_bid_floor_micros", "comment": null}, "enhanced_cpc": {"type": "boolean", "index": 5, "name": "enhanced_cpc", "comment": null}, "enhanced_cpc_enabled": {"type": "boolean", "index": 6, "name": "enhanced_cpc_enabled", "comment": null}, "location": {"type": "text", "index": 7, "name": "location", "comment": null}, "location_fraction_micros": {"type": "integer", "index": 8, "name": "location_fraction_micros", "comment": null}, "manual_cpa": {"type": "double precision", "index": 9, "name": "manual_cpa", "comment": null}, "manual_cpm": {"type": "double precision", "index": 10, "name": "manual_cpm", "comment": null}, "manual_cpv": {"type": "double precision", "index": 11, "name": "manual_cpv", "comment": null}, "name": {"type": "text", "index": 12, "name": "name", "comment": null}, "status": {"type": "text", "index": 13, "name": "status", "comment": null}, "target_cpa_micros": {"type": "integer", "index": 14, "name": "target_cpa_micros", "comment": null}, "target_cpm": {"type": "integer", "index": 15, "name": "target_cpm", "comment": null}, "target_roas": {"type": "double precision", "index": 16, "name": "target_roas", "comment": null}, "type": {"type": "text", "index": 17, "name": "type", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 18, "name": "_fivetran_active", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 19, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.campaign_bidding_strategy_history"}, "source.google_ads.google_ads.campaign_budget_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_campaign_budget_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "amount_micros": {"type": "integer", "index": 4, "name": "amount_micros", "comment": null}, "delivery_method": {"type": "text", "index": 5, "name": "delivery_method", "comment": null}, "explicitly_shared": {"type": "boolean", "index": 6, "name": "explicitly_shared", "comment": null}, "name": {"type": "text", "index": 7, "name": "name", "comment": null}, "reference_count": {"type": "integer", "index": 8, "name": "reference_count", "comment": null}, "status": {"type": "text", "index": 9, "name": "status", "comment": null}, "has_recommended_budget": {"type": "boolean", "index": 10, "name": "has_recommended_budget", "comment": null}, "period": {"type": "text", "index": 11, "name": "period", "comment": null}, "recommended_budget_amount_micros": {"type": "integer", "index": 12, "name": "recommended_budget_amount_micros", "comment": null}, "total_amount_micros": {"type": "integer", "index": 13, "name": "total_amount_micros", "comment": null}, "type": {"type": "text", "index": 14, "name": "type", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 15, "name": "_fivetran_active", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 16, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.campaign_budget_history"}, "source.google_ads.google_ads.campaign_criterion_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_campaign_criterion_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "geo_target_constant_id": {"type": "bigint", "index": 4, "name": "geo_target_constant_id", "comment": null}, "mobile_device_id": {"type": "bigint", "index": 5, "name": "mobile_device_id", "comment": null}, "operating_system_version_id": {"type": "bigint", "index": 6, "name": "operating_system_version_id", "comment": null}, "topic_constant_id": {"type": "bigint", "index": 7, "name": "topic_constant_id", "comment": null}, "user_interest_id": {"type": "bigint", "index": 8, "name": "user_interest_id", "comment": null}, "user_list_id": {"type": "bigint", "index": 9, "name": "user_list_id", "comment": null}, "age_range_type": {"type": "text", "index": 10, "name": "age_range_type", "comment": null}, "bid_modifier": {"type": "double precision", "index": 11, "name": "bid_modifier", "comment": null}, "carrier_country_code": {"type": "text", "index": 12, "name": "carrier_country_code", "comment": null}, "carrier_name": {"type": "text", "index": 13, "name": "carrier_name", "comment": null}, "content_label_type": {"type": "text", "index": 14, "name": "content_label_type", "comment": null}, "device_type": {"type": "text", "index": 15, "name": "device_type", "comment": null}, "display_name": {"type": "text", "index": 16, "name": "display_name", "comment": null}, "gender_type": {"type": "text", "index": 17, "name": "gender_type", "comment": null}, "income_range_type": {"type": "text", "index": 18, "name": "income_range_type", "comment": null}, "ip_block_ip_address": {"type": "text", "index": 19, "name": "ip_block_ip_address", "comment": null}, "negative": {"type": "boolean", "index": 20, "name": "negative", "comment": null}, "keyword_match_type": {"type": "text", "index": 21, "name": "keyword_match_type", "comment": null}, "keyword_text": {"type": "text", "index": 22, "name": "keyword_text", "comment": null}, "language_code": {"type": "text", "index": 23, "name": "language_code", "comment": null}, "language_name": {"type": "text", "index": 24, "name": "language_name", "comment": null}, "mobile_app_category_constant_id": {"type": "bigint", "index": 25, "name": "mobile_app_category_constant_id", "comment": null}, "mobile_app_category_constant_name": {"type": "text", "index": 26, "name": "mobile_app_category_constant_name", "comment": null}, "mobile_application_app_id": {"type": "text", "index": 27, "name": "mobile_application_app_id", "comment": null}, "mobile_application_name": {"type": "text", "index": 28, "name": "mobile_application_name", "comment": null}, "parental_status_type": {"type": "text", "index": 29, "name": "parental_status_type", "comment": null}, "placement_url": {"type": "text", "index": 30, "name": "placement_url", "comment": null}, "status": {"type": "text", "index": 31, "name": "status", "comment": null}, "type": {"type": "text", "index": 32, "name": "type", "comment": null}, "youtube_channel_id": {"type": "text", "index": 33, "name": "youtube_channel_id", "comment": null}, "youtube_video_id": {"type": "text", "index": 34, "name": "youtube_video_id", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 35, "name": "_fivetran_active", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 36, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.campaign_criterion_history"}, "source.google_ads.google_ads.campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "customer_id": {"type": "bigint", "index": 4, "name": "customer_id", "comment": null}, "advertising_channel_type": {"type": "text", "index": 5, "name": "advertising_channel_type", "comment": null}, "advertising_channel_subtype": {"type": "text", "index": 6, "name": "advertising_channel_subtype", "comment": null}, "start_date": {"type": "date", "index": 7, "name": "start_date", "comment": null}, "end_date": {"type": "date", "index": 8, "name": "end_date", "comment": null}, "serving_status": {"type": "text", "index": 9, "name": "serving_status", "comment": null}, "status": {"type": "text", "index": 10, "name": "status", "comment": null}, "tracking_url_template": {"type": "integer", "index": 11, "name": "tracking_url_template", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.campaign_history"}, "source.google_ads.google_ads.campaign_stats": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_campaign_stats_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "customer_id": {"type": "bigint", "index": 2, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "active_view_impressions": {"type": "integer", "index": 5, "name": "active_view_impressions", "comment": null}, "active_view_measurability": {"type": "integer", "index": 6, "name": "active_view_measurability", "comment": null}, "active_view_measurable_cost_micros": {"type": "integer", "index": 7, "name": "active_view_measurable_cost_micros", "comment": null}, "active_view_measurable_impressions": {"type": "integer", "index": 8, "name": "active_view_measurable_impressions", "comment": null}, "active_view_viewability": {"type": "integer", "index": 9, "name": "active_view_viewability", "comment": null}, "ad_network_type": {"type": "text", "index": 10, "name": "ad_network_type", "comment": null}, "base_campaign": {"type": "text", "index": 11, "name": "base_campaign", "comment": null}, "clicks": {"type": "integer", "index": 12, "name": "clicks", "comment": null}, "conversions": {"type": "integer", "index": 13, "name": "conversions", "comment": null}, "conversions_value": {"type": "integer", "index": 14, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 15, "name": "cost_micros", "comment": null}, "device": {"type": "text", "index": 16, "name": "device", "comment": null}, "id": {"type": "bigint", "index": 17, "name": "id", "comment": null}, "impressions": {"type": "integer", "index": 18, "name": "impressions", "comment": null}, "interaction_event_types": {"type": "text", "index": 19, "name": "interaction_event_types", "comment": null}, "interactions": {"type": "integer", "index": 20, "name": "interactions", "comment": null}, "view_through_conversions": {"type": "integer", "index": 21, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.campaign_stats"}, "source.google_ads.google_ads.keyword_stats": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_keyword_stats_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "customer_id": {"type": "bigint", "index": 2, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "active_view_impressions": {"type": "integer", "index": 5, "name": "active_view_impressions", "comment": null}, "active_view_measurability": {"type": "integer", "index": 6, "name": "active_view_measurability", "comment": null}, "active_view_measurable_cost_micros": {"type": "integer", "index": 7, "name": "active_view_measurable_cost_micros", "comment": null}, "active_view_measurable_impressions": {"type": "integer", "index": 8, "name": "active_view_measurable_impressions", "comment": null}, "active_view_viewability": {"type": "integer", "index": 9, "name": "active_view_viewability", "comment": null}, "ad_group_base_ad_group": {"type": "text", "index": 10, "name": "ad_group_base_ad_group", "comment": null}, "ad_group_criterion_criterion_id": {"type": "bigint", "index": 11, "name": "ad_group_criterion_criterion_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 12, "name": "ad_group_id", "comment": null}, "ad_network_type": {"type": "text", "index": 13, "name": "ad_network_type", "comment": null}, "campaign_base_campaign": {"type": "text", "index": 14, "name": "campaign_base_campaign", "comment": null}, "campaign_id": {"type": "bigint", "index": 15, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 16, "name": "clicks", "comment": null}, "conversions": {"type": "integer", "index": 17, "name": "conversions", "comment": null}, "conversions_value": {"type": "integer", "index": 18, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 19, "name": "cost_micros", "comment": null}, "device": {"type": "text", "index": 20, "name": "device", "comment": null}, "impressions": {"type": "integer", "index": 21, "name": "impressions", "comment": null}, "interaction_event_types": {"type": "text", "index": 22, "name": "interaction_event_types", "comment": null}, "interactions": {"type": "integer", "index": 23, "name": "interactions", "comment": null}, "view_through_conversions": {"type": "integer", "index": 24, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.keyword_stats"}, "source.google_ads.google_ads.search_term_keyword_stats": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_search_term_keyword_stats_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 5, "name": "clicks", "comment": null}, "conversions": {"type": "double precision", "index": 6, "name": "conversions", "comment": null}, "conversions_value": {"type": "double precision", "index": 7, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 8, "name": "cost_micros", "comment": null}, "customer_id": {"type": "bigint", "index": 9, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 10, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 11, "name": "impressions", "comment": null}, "info_text": {"type": "text", "index": 12, "name": "info_text", "comment": null}, "keyword_ad_group_criterion": {"type": "text", "index": 13, "name": "keyword_ad_group_criterion", "comment": null}, "search_term": {"type": "text", "index": 14, "name": "search_term", "comment": null}, "search_term_match_type": {"type": "text", "index": 15, "name": "search_term_match_type", "comment": null}, "status": {"type": "text", "index": 16, "name": "status", "comment": null}, "view_through_conversions": {"type": "integer", "index": 17, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.search_term_keyword_stats"}, "source.linkedin.linkedin_ads.account_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_ad_account_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_modified_time": {"type": "timestamp without time zone", "index": 2, "name": "last_modified_time", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 3, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "currency": {"type": "text", "index": 5, "name": "currency", "comment": null}, "version_tag": {"type": "integer", "index": 6, "name": "version_tag", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.linkedin.linkedin_ads.account_history"}, "source.linkedin.linkedin_ads.ad_analytics_by_campaign": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_ad_analytics_by_campaign_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "day": {"type": "timestamp without time zone", "index": 2, "name": "day", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "action_clicks": {"type": "integer", "index": 4, "name": "action_clicks", "comment": null}, "ad_unit_clicks": {"type": "integer", "index": 5, "name": "ad_unit_clicks", "comment": null}, "approximate_unique_impressions": {"type": "integer", "index": 6, "name": "approximate_unique_impressions", "comment": null}, "card_clicks": {"type": "integer", "index": 7, "name": "card_clicks", "comment": null}, "card_impressions": {"type": "integer", "index": 8, "name": "card_impressions", "comment": null}, "clicks": {"type": "integer", "index": 9, "name": "clicks", "comment": null}, "comment_likes": {"type": "integer", "index": 10, "name": "comment_likes", "comment": null}, "comments": {"type": "integer", "index": 11, "name": "comments", "comment": null}, "company_page_clicks": {"type": "integer", "index": 12, "name": "company_page_clicks", "comment": null}, "conversion_value_in_local_currency": {"type": "integer", "index": 13, "name": "conversion_value_in_local_currency", "comment": null}, "cost_in_local_currency": {"type": "double precision", "index": 14, "name": "cost_in_local_currency", "comment": null}, "cost_in_usd": {"type": "double precision", "index": 15, "name": "cost_in_usd", "comment": null}, "external_website_conversions": {"type": "bigint", "index": 16, "name": "external_website_conversions", "comment": null}, "external_website_post_click_conversions": {"type": "integer", "index": 17, "name": "external_website_post_click_conversions", "comment": null}, "external_website_post_view_conversions": {"type": "integer", "index": 18, "name": "external_website_post_view_conversions", "comment": null}, "follows": {"type": "integer", "index": 19, "name": "follows", "comment": null}, "full_screen_plays": {"type": "integer", "index": 20, "name": "full_screen_plays", "comment": null}, "impressions": {"type": "integer", "index": 21, "name": "impressions", "comment": null}, "landing_page_clicks": {"type": "integer", "index": 22, "name": "landing_page_clicks", "comment": null}, "lead_generation_mail_contact_info_shares": {"type": "integer", "index": 23, "name": "lead_generation_mail_contact_info_shares", "comment": null}, "lead_generation_mail_interested_clicks": {"type": "integer", "index": 24, "name": "lead_generation_mail_interested_clicks", "comment": null}, "likes": {"type": "integer", "index": 25, "name": "likes", "comment": null}, "one_click_lead_form_opens": {"type": "integer", "index": 26, "name": "one_click_lead_form_opens", "comment": null}, "one_click_leads": {"type": "integer", "index": 27, "name": "one_click_leads", "comment": null}, "opens": {"type": "integer", "index": 28, "name": "opens", "comment": null}, "other_engagements": {"type": "integer", "index": 29, "name": "other_engagements", "comment": null}, "shares": {"type": "integer", "index": 30, "name": "shares", "comment": null}, "text_url_clicks": {"type": "integer", "index": 31, "name": "text_url_clicks", "comment": null}, "total_engagements": {"type": "integer", "index": 32, "name": "total_engagements", "comment": null}, "video_completions": {"type": "integer", "index": 33, "name": "video_completions", "comment": null}, "video_first_quartile_completions": {"type": "integer", "index": 34, "name": "video_first_quartile_completions", "comment": null}, "video_midpoint_completions": {"type": "integer", "index": 35, "name": "video_midpoint_completions", "comment": null}, "video_starts": {"type": "integer", "index": 36, "name": "video_starts", "comment": null}, "video_third_quartile_completions": {"type": "integer", "index": 37, "name": "video_third_quartile_completions", "comment": null}, "video_views": {"type": "integer", "index": 38, "name": "video_views", "comment": null}, "viral_card_clicks": {"type": "integer", "index": 39, "name": "viral_card_clicks", "comment": null}, "viral_card_impressions": {"type": "integer", "index": 40, "name": "viral_card_impressions", "comment": null}, "viral_clicks": {"type": "integer", "index": 41, "name": "viral_clicks", "comment": null}, "viral_comment_likes": {"type": "integer", "index": 42, "name": "viral_comment_likes", "comment": null}, "viral_comments": {"type": "integer", "index": 43, "name": "viral_comments", "comment": null}, "viral_company_page_clicks": {"type": "integer", "index": 44, "name": "viral_company_page_clicks", "comment": null}, "viral_external_website_conversions": {"type": "integer", "index": 45, "name": "viral_external_website_conversions", "comment": null}, "viral_external_website_post_click_conversions": {"type": "integer", "index": 46, "name": "viral_external_website_post_click_conversions", "comment": null}, "viral_external_website_post_view_conversions": {"type": "integer", "index": 47, "name": "viral_external_website_post_view_conversions", "comment": null}, "viral_follows": {"type": "integer", "index": 48, "name": "viral_follows", "comment": null}, "viral_full_screen_plays": {"type": "integer", "index": 49, "name": "viral_full_screen_plays", "comment": null}, "viral_impressions": {"type": "integer", "index": 50, "name": "viral_impressions", "comment": null}, "viral_landing_page_clicks": {"type": "integer", "index": 51, "name": "viral_landing_page_clicks", "comment": null}, "viral_likes": {"type": "integer", "index": 52, "name": "viral_likes", "comment": null}, "viral_one_click_lead_form_opens": {"type": "integer", "index": 53, "name": "viral_one_click_lead_form_opens", "comment": null}, "viral_one_click_leads": {"type": "integer", "index": 54, "name": "viral_one_click_leads", "comment": null}, "viral_other_engagements": {"type": "integer", "index": 55, "name": "viral_other_engagements", "comment": null}, "viral_shares": {"type": "integer", "index": 56, "name": "viral_shares", "comment": null}, "viral_total_engagements": {"type": "integer", "index": 57, "name": "viral_total_engagements", "comment": null}, "viral_video_completions": {"type": "integer", "index": 58, "name": "viral_video_completions", "comment": null}, "viral_video_first_quartile_completions": {"type": "integer", "index": 59, "name": "viral_video_first_quartile_completions", "comment": null}, "viral_video_midpoint_completions": {"type": "integer", "index": 60, "name": "viral_video_midpoint_completions", "comment": null}, "viral_video_starts": {"type": "integer", "index": 61, "name": "viral_video_starts", "comment": null}, "viral_video_third_quartile_completions": {"type": "integer", "index": 62, "name": "viral_video_third_quartile_completions", "comment": null}, "viral_video_views": {"type": "integer", "index": 63, "name": "viral_video_views", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.linkedin.linkedin_ads.ad_analytics_by_campaign"}, "source.linkedin.linkedin_ads.ad_analytics_by_creative": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_ad_analytics_by_creative_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"creative_id": {"type": "integer", "index": 1, "name": "creative_id", "comment": null}, "day": {"type": "timestamp without time zone", "index": 2, "name": "day", "comment": null}, "action_clicks": {"type": "integer", "index": 3, "name": "action_clicks", "comment": null}, "card_clicks": {"type": "integer", "index": 4, "name": "card_clicks", "comment": null}, "ad_unit_clicks": {"type": "integer", "index": 5, "name": "ad_unit_clicks", "comment": null}, "landing_page_clicks": {"type": "integer", "index": 6, "name": "landing_page_clicks", "comment": null}, "clicks": {"type": "integer", "index": 7, "name": "clicks", "comment": null}, "approximate_unique_impressions": {"type": "integer", "index": 8, "name": "approximate_unique_impressions", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "card_impressions": {"type": "integer", "index": 10, "name": "card_impressions", "comment": null}, "cost_in_local_currency": {"type": "integer", "index": 11, "name": "cost_in_local_currency", "comment": null}, "cost_in_usd": {"type": "integer", "index": 12, "name": "cost_in_usd", "comment": null}, "comment_likes": {"type": "integer", "index": 13, "name": "comment_likes", "comment": null}, "comments": {"type": "integer", "index": 14, "name": "comments", "comment": null}, "company_page_clicks": {"type": "integer", "index": 15, "name": "company_page_clicks", "comment": null}, "conversion_value_in_local_currency": {"type": "integer", "index": 16, "name": "conversion_value_in_local_currency", "comment": null}, "external_website_conversions": {"type": "bigint", "index": 17, "name": "external_website_conversions", "comment": null}, "external_website_post_click_conversions": {"type": "integer", "index": 18, "name": "external_website_post_click_conversions", "comment": null}, "external_website_post_view_conversions": {"type": "integer", "index": 19, "name": "external_website_post_view_conversions", "comment": null}, "follows": {"type": "integer", "index": 20, "name": "follows", "comment": null}, "full_screen_plays": {"type": "integer", "index": 21, "name": "full_screen_plays", "comment": null}, "lead_generation_mail_contact_info_shares": {"type": "integer", "index": 22, "name": "lead_generation_mail_contact_info_shares", "comment": null}, "lead_generation_mail_interested_clicks": {"type": "integer", "index": 23, "name": "lead_generation_mail_interested_clicks", "comment": null}, "likes": {"type": "integer", "index": 24, "name": "likes", "comment": null}, "one_click_lead_form_opens": {"type": "integer", "index": 25, "name": "one_click_lead_form_opens", "comment": null}, "one_click_leads": {"type": "integer", "index": 26, "name": "one_click_leads", "comment": null}, "opens": {"type": "integer", "index": 27, "name": "opens", "comment": null}, "other_engagements": {"type": "integer", "index": 28, "name": "other_engagements", "comment": null}, "shares": {"type": "integer", "index": 29, "name": "shares", "comment": null}, "text_url_clicks": {"type": "integer", "index": 30, "name": "text_url_clicks", "comment": null}, "total_engagements": {"type": "integer", "index": 31, "name": "total_engagements", "comment": null}, "video_completions": {"type": "integer", "index": 32, "name": "video_completions", "comment": null}, "video_first_quartile_completions": {"type": "integer", "index": 33, "name": "video_first_quartile_completions", "comment": null}, "video_midpoint_completions": {"type": "integer", "index": 34, "name": "video_midpoint_completions", "comment": null}, "video_starts": {"type": "integer", "index": 35, "name": "video_starts", "comment": null}, "video_third_quartile_completions": {"type": "integer", "index": 36, "name": "video_third_quartile_completions", "comment": null}, "video_views": {"type": "integer", "index": 37, "name": "video_views", "comment": null}, "viral_card_clicks": {"type": "integer", "index": 38, "name": "viral_card_clicks", "comment": null}, "viral_card_impressions": {"type": "integer", "index": 39, "name": "viral_card_impressions", "comment": null}, "viral_clicks": {"type": "integer", "index": 40, "name": "viral_clicks", "comment": null}, "viral_comment_likes": {"type": "integer", "index": 41, "name": "viral_comment_likes", "comment": null}, "viral_comments": {"type": "integer", "index": 42, "name": "viral_comments", "comment": null}, "viral_company_page_clicks": {"type": "integer", "index": 43, "name": "viral_company_page_clicks", "comment": null}, "viral_external_website_conversions": {"type": "integer", "index": 44, "name": "viral_external_website_conversions", "comment": null}, "viral_external_website_post_click_conversions": {"type": "integer", "index": 45, "name": "viral_external_website_post_click_conversions", "comment": null}, "viral_external_website_post_view_conversions": {"type": "integer", "index": 46, "name": "viral_external_website_post_view_conversions", "comment": null}, "viral_follows": {"type": "integer", "index": 47, "name": "viral_follows", "comment": null}, "viral_full_screen_plays": {"type": "integer", "index": 48, "name": "viral_full_screen_plays", "comment": null}, "viral_impressions": {"type": "integer", "index": 49, "name": "viral_impressions", "comment": null}, "viral_landing_page_clicks": {"type": "integer", "index": 50, "name": "viral_landing_page_clicks", "comment": null}, "viral_likes": {"type": "integer", "index": 51, "name": "viral_likes", "comment": null}, "viral_one_click_lead_form_opens": {"type": "integer", "index": 52, "name": "viral_one_click_lead_form_opens", "comment": null}, "viral_one_click_leads": {"type": "integer", "index": 53, "name": "viral_one_click_leads", "comment": null}, "viral_other_engagements": {"type": "integer", "index": 54, "name": "viral_other_engagements", "comment": null}, "viral_shares": {"type": "integer", "index": 55, "name": "viral_shares", "comment": null}, "viral_total_engagements": {"type": "integer", "index": 56, "name": "viral_total_engagements", "comment": null}, "viral_video_completions": {"type": "integer", "index": 57, "name": "viral_video_completions", "comment": null}, "viral_video_first_quartile_completions": {"type": "integer", "index": 58, "name": "viral_video_first_quartile_completions", "comment": null}, "viral_video_midpoint_completions": {"type": "integer", "index": 59, "name": "viral_video_midpoint_completions", "comment": null}, "viral_video_starts": {"type": "integer", "index": 60, "name": "viral_video_starts", "comment": null}, "viral_video_third_quartile_completions": {"type": "integer", "index": 61, "name": "viral_video_third_quartile_completions", "comment": null}, "viral_video_views": {"type": "integer", "index": 62, "name": "viral_video_views", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.linkedin.linkedin_ads.ad_analytics_by_creative"}, "source.linkedin.linkedin_ads.campaign_group_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_ad_campaign_group_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_modified_time": {"type": "timestamp without time zone", "index": 2, "name": "last_modified_time", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 4, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.linkedin.linkedin_ads.campaign_group_history"}, "source.linkedin.linkedin_ads.campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_ad_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_modified_time": {"type": "timestamp without time zone", "index": 2, "name": "last_modified_time", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "campaign_group_id": {"type": "integer", "index": 4, "name": "campaign_group_id", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 5, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "version_tag": {"type": "integer", "index": 7, "name": "version_tag", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.linkedin.linkedin_ads.campaign_history"}, "source.linkedin.linkedin_ads.creative_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_ad_creative_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "intended_status": {"type": "character varying", "index": 3, "name": "intended_status", "comment": null}, "click_uri": {"type": "text", "index": 4, "name": "click_uri", "comment": null}, "last_modified_at": {"type": "timestamp without time zone", "index": 5, "name": "last_modified_at", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 6, "name": "created_time", "comment": null}, "text_ad_landing_page": {"type": "text", "index": 7, "name": "text_ad_landing_page", "comment": null}, "spotlight_landing_page": {"type": "text", "index": 8, "name": "spotlight_landing_page", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.linkedin.linkedin_ads.creative_history"}, "source.linkedin.linkedin_ads.geo": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_geo_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "id": {"type": "integer", "index": 2, "name": "id", "comment": null}, "value": {"type": "text", "index": 3, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.linkedin.linkedin_ads.geo"}, "source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_country": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_monthly_ad_analytics_by_member_country_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "month": {"type": "text", "index": 2, "name": "month", "comment": null}, "clicks": {"type": "integer", "index": 3, "name": "clicks", "comment": null}, "member_country": {"type": "integer", "index": 4, "name": "member_country", "comment": null}, "impressions": {"type": "integer", "index": 5, "name": "impressions", "comment": null}, "conversion_value_in_local_currency": {"type": "double precision", "index": 6, "name": "conversion_value_in_local_currency", "comment": null}, "cost_in_local_currency": {"type": "numeric", "index": 7, "name": "cost_in_local_currency", "comment": null}, "cost_in_usd": {"type": "numeric", "index": 8, "name": "cost_in_usd", "comment": null}, "external_website_post_click_conversions": {"type": "integer", "index": 9, "name": "external_website_post_click_conversions", "comment": null}, "one_click_leads": {"type": "integer", "index": 10, "name": "one_click_leads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_country"}, "source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_region": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_monthly_ad_analytics_by_member_region_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "month": {"type": "text", "index": 2, "name": "month", "comment": null}, "clicks": {"type": "integer", "index": 3, "name": "clicks", "comment": null}, "member_region": {"type": "integer", "index": 4, "name": "member_region", "comment": null}, "impressions": {"type": "integer", "index": 5, "name": "impressions", "comment": null}, "conversion_value_in_local_currency": {"type": "double precision", "index": 6, "name": "conversion_value_in_local_currency", "comment": null}, "cost_in_local_currency": {"type": "numeric", "index": 7, "name": "cost_in_local_currency", "comment": null}, "cost_in_usd": {"type": "numeric", "index": 8, "name": "cost_in_usd", "comment": null}, "external_website_post_click_conversions": {"type": "integer", "index": 9, "name": "external_website_post_click_conversions", "comment": null}, "one_click_leads": {"type": "integer", "index": 10, "name": "one_click_leads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_region"}, "source.microsoft_ads.microsoft_ads.account_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_account_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "name": {"type": "character varying", "index": 2, "name": "name", "comment": null}, "last_modified_time": {"type": "timestamp without time zone", "index": 3, "name": "last_modified_time", "comment": null}, "time_zone": {"type": "text", "index": 4, "name": "time_zone", "comment": null}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.microsoft_ads.microsoft_ads.account_history"}, "source.microsoft_ads.microsoft_ads.account_performance_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_account_performance_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "device_os": {"type": "text", "index": 3, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 4, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 5, "name": "network", "comment": null}, "currency_code": {"type": "text", "index": 6, "name": "currency_code", "comment": null}, "ad_distribution": {"type": "text", "index": 7, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 8, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 9, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 10, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 11, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 12, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 13, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 14, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 15, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 16, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 17, "name": "all_conversions_qualified", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.microsoft_ads.microsoft_ads.account_performance_daily_report"}, "source.microsoft_ads.microsoft_ads.ad_group_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_ad_group_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "modified_time": {"type": "timestamp without time zone", "index": 4, "name": "modified_time", "comment": null}, "start_date": {"type": "date", "index": 5, "name": "start_date", "comment": null}, "end_date": {"type": "integer", "index": 6, "name": "end_date", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.microsoft_ads.microsoft_ads.ad_group_history"}, "source.microsoft_ads.microsoft_ads.ad_group_performance_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_ad_group_performance_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": null}, "device_os": {"type": "text", "index": 6, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 7, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 8, "name": "network", "comment": null}, "language": {"type": "text", "index": 9, "name": "language", "comment": null}, "ad_distribution": {"type": "text", "index": 10, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 11, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 12, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 13, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 14, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 15, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 16, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 17, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 18, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 19, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 20, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 21, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 22, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.microsoft_ads.microsoft_ads.ad_group_performance_daily_report"}, "source.microsoft_ads.microsoft_ads.ad_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_ad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "title_part_1": {"type": "text", "index": 2, "name": "title_part_1", "comment": null}, "final_url": {"type": "text", "index": 3, "name": "final_url", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "modified_time": {"type": "timestamp without time zone", "index": 5, "name": "modified_time", "comment": null}, "status": {"type": "text", "index": 6, "name": "status", "comment": null}, "type": {"type": "text", "index": 7, "name": "type", "comment": null}, "title": {"type": "text", "index": 8, "name": "title", "comment": null}, "title_part_2": {"type": "text", "index": 9, "name": "title_part_2", "comment": null}, "title_part_3": {"type": "text", "index": 10, "name": "title_part_3", "comment": null}, "domain": {"type": "text", "index": 11, "name": "domain", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.microsoft_ads.microsoft_ads.ad_history"}, "source.microsoft_ads.microsoft_ads.ad_performance_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_ad_performance_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "bigint", "index": 5, "name": "ad_id", "comment": null}, "currency_code": {"type": "text", "index": 6, "name": "currency_code", "comment": null}, "device_os": {"type": "text", "index": 7, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 8, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 9, "name": "network", "comment": null}, "language": {"type": "text", "index": 10, "name": "language", "comment": null}, "ad_distribution": {"type": "text", "index": 11, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 12, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 13, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 14, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 15, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 16, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 17, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 18, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 19, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 20, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 21, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 22, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 23, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.microsoft_ads.microsoft_ads.ad_performance_daily_report"}, "source.microsoft_ads.microsoft_ads.campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "account_id": {"type": "integer", "index": 3, "name": "account_id", "comment": null}, "modified_time": {"type": "timestamp without time zone", "index": 4, "name": "modified_time", "comment": null}, "type": {"type": "text", "index": 5, "name": "type", "comment": null}, "time_zone": {"type": "text", "index": 6, "name": "time_zone", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.microsoft_ads.microsoft_ads.campaign_history"}, "source.microsoft_ads.microsoft_ads.campaign_performance_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_campaign_performance_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "currency_code": {"type": "text", "index": 4, "name": "currency_code", "comment": null}, "device_os": {"type": "text", "index": 5, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 6, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 7, "name": "network", "comment": null}, "ad_distribution": {"type": "text", "index": 8, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 9, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 10, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 11, "name": "top_vs_other", "comment": null}, "budget_association_status": {"type": "text", "index": 12, "name": "budget_association_status", "comment": null}, "budget_name": {"type": "text", "index": 13, "name": "budget_name", "comment": null}, "clicks": {"type": "integer", "index": 14, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 15, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 16, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 17, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 18, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 19, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 20, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 21, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 22, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.microsoft_ads.microsoft_ads.campaign_performance_daily_report"}, "source.microsoft_ads.microsoft_ads.geographic_performance_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_geographic_performance_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "bigint", "index": 1, "name": "account_id", "comment": null}, "ad_distribution": {"type": "text", "index": 2, "name": "ad_distribution", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "all_conversions": {"type": "integer", "index": 4, "name": "all_conversions", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 5, "name": "all_conversions_qualified", "comment": null}, "all_revenue": {"type": "numeric", "index": 6, "name": "all_revenue", "comment": null}, "bid_match_type": {"type": "text", "index": 7, "name": "bid_match_type", "comment": null}, "campaign_id": {"type": "bigint", "index": 8, "name": "campaign_id", "comment": null}, "city": {"type": "text", "index": 9, "name": "city", "comment": null}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": null}, "conversions": {"type": "integer", "index": 11, "name": "conversions", "comment": null}, "conversions_qualified": {"type": "integer", "index": 12, "name": "conversions_qualified", "comment": null}, "country": {"type": "text", "index": 13, "name": "country", "comment": null}, "county": {"type": "text", "index": 14, "name": "county", "comment": null}, "currency_code": {"type": "text", "index": 15, "name": "currency_code", "comment": null}, "date": {"type": "date", "index": 16, "name": "date", "comment": null}, "delivered_match_type": {"type": "text", "index": 17, "name": "delivered_match_type", "comment": null}, "device_os": {"type": "text", "index": 18, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 19, "name": "device_type", "comment": null}, "impressions": {"type": "integer", "index": 20, "name": "impressions", "comment": null}, "language": {"type": "text", "index": 21, "name": "language", "comment": null}, "location_type": {"type": "text", "index": 22, "name": "location_type", "comment": null}, "metro_area": {"type": "text", "index": 23, "name": "metro_area", "comment": null}, "postal_code": {"type": "text", "index": 24, "name": "postal_code", "comment": null}, "network": {"type": "text", "index": 25, "name": "network", "comment": null}, "spend": {"type": "numeric", "index": 26, "name": "spend", "comment": null}, "state": {"type": "text", "index": 27, "name": "state", "comment": null}, "top_vs_other": {"type": "text", "index": 28, "name": "top_vs_other", "comment": null}, "revenue": {"type": "numeric", "index": 29, "name": "revenue", "comment": null}, "location_id": {"type": "bigint", "index": 30, "name": "location_id", "comment": null}, "goal": {"type": "text", "index": 31, "name": "goal", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.microsoft_ads.microsoft_ads.geographic_performance_daily_report"}, "source.microsoft_ads.microsoft_ads.keyword_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_keyword_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "modified_time": {"type": "timestamp without time zone", "index": 3, "name": "modified_time", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "match_type": {"type": "text", "index": 5, "name": "match_type", "comment": null}, "status": {"type": "text", "index": 6, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.microsoft_ads.microsoft_ads.keyword_history"}, "source.microsoft_ads.microsoft_ads.keyword_performance_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_keyword_performance_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "bigint", "index": 5, "name": "ad_id", "comment": null}, "keyword_id": {"type": "bigint", "index": 6, "name": "keyword_id", "comment": null}, "currency_code": {"type": "text", "index": 7, "name": "currency_code", "comment": null}, "device_os": {"type": "text", "index": 8, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 9, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 10, "name": "network", "comment": null}, "language": {"type": "text", "index": 11, "name": "language", "comment": null}, "ad_distribution": {"type": "text", "index": 12, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 13, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 14, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 15, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 16, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 17, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 18, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 19, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 20, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 21, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 22, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 23, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 24, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.microsoft_ads.microsoft_ads.keyword_performance_daily_report"}, "source.microsoft_ads.microsoft_ads.search_query_performance_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_search_performance_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "bigint", "index": 5, "name": "ad_id", "comment": null}, "keyword_id": {"type": "bigint", "index": 6, "name": "keyword_id", "comment": null}, "search_query": {"type": "text", "index": 7, "name": "search_query", "comment": null}, "device_os": {"type": "text", "index": 8, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 9, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 10, "name": "network", "comment": null}, "language": {"type": "text", "index": 11, "name": "language", "comment": null}, "bid_match_type": {"type": "text", "index": 12, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 13, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 14, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 15, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 16, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 17, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 18, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 19, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 20, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 21, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 22, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 23, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.microsoft_ads.microsoft_ads.search_query_performance_daily_report"}, "source.pinterest.pinterest_ads.ad_group_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_ad_group_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "campaign_id": {"type": "bigint", "index": 2, "name": "campaign_id", "comment": null}, "created_time": {"type": "text", "index": 3, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "status": {"type": "text", "index": 5, "name": "status", "comment": null}, "start_time": {"type": "text", "index": 6, "name": "start_time", "comment": null}, "end_time": {"type": "integer", "index": 7, "name": "end_time", "comment": null}, "_fivetran_synced": {"type": "text", "index": 8, "name": "_fivetran_synced", "comment": null}, "pacing_delivery_type": {"type": "text", "index": 9, "name": "pacing_delivery_type", "comment": null}, "placement_group": {"type": "text", "index": 10, "name": "placement_group", "comment": null}, "summary_status": {"type": "text", "index": 11, "name": "summary_status", "comment": null}, "ad_account_id": {"type": "bigint", "index": 12, "name": "ad_account_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.pinterest.pinterest_ads.ad_group_history"}, "source.pinterest.pinterest_ads.ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_ad_group_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "ad_group_id": {"type": "bigint", "index": 2, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "text", "index": 3, "name": "ad_group_name", "comment": null}, "ad_group_status": {"type": "text", "index": 4, "name": "ad_group_status", "comment": null}, "campaign_id": {"type": "bigint", "index": 5, "name": "campaign_id", "comment": null}, "advertiser_id": {"type": "bigint", "index": 6, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 8, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 9, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 10, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 11, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 12, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 13, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 14, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 15, "name": "total_conversions_value_in_micro_dollar", "comment": null}, "total_view_checkout": {"type": "integer", "index": 16, "name": "total_view_checkout", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.pinterest.pinterest_ads.ad_group_report"}, "source.pinterest.pinterest_ads.advertiser_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_advertiser_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_time": {"type": "timestamp without time zone", "index": 2, "name": "updated_time", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "billing_profile_status": {"type": "text", "index": 4, "name": "billing_profile_status", "comment": null}, "billing_type": {"type": "text", "index": 5, "name": "billing_type", "comment": null}, "country": {"type": "text", "index": 6, "name": "country", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 7, "name": "created_time", "comment": null}, "currency": {"type": "text", "index": 8, "name": "currency", "comment": null}, "merchant_id": {"type": "integer", "index": 9, "name": "merchant_id", "comment": null}, "name": {"type": "text", "index": 10, "name": "name", "comment": null}, "owner_user_id": {"type": "integer", "index": 11, "name": "owner_user_id", "comment": null}, "status": {"type": "text", "index": 12, "name": "status", "comment": null}, "owner_username": {"type": "text", "index": 13, "name": "owner_username", "comment": null}, "permissions": {"type": "text", "index": 14, "name": "permissions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.pinterest.pinterest_ads.advertiser_history"}, "source.pinterest.pinterest_ads.advertiser_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_advertiser_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "advertiser_id": {"type": "bigint", "index": 2, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 4, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 5, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 6, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 7, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 8, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 9, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 10, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 11, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.pinterest.pinterest_ads.advertiser_report"}, "source.pinterest.pinterest_ads.campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "created_time": {"type": "text", "index": 2, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "status": {"type": "text", "index": 4, "name": "status", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "advertiser_id": {"type": "bigint", "index": 6, "name": "advertiser_id", "comment": null}, "default_ad_group_budget_in_micro_currency": {"type": "integer", "index": 7, "name": "default_ad_group_budget_in_micro_currency", "comment": null}, "is_automated_campaign": {"type": "boolean", "index": 8, "name": "is_automated_campaign", "comment": null}, "is_campaign_budget_optimization": {"type": "boolean", "index": 9, "name": "is_campaign_budget_optimization", "comment": null}, "is_flexible_daily_budgets": {"type": "boolean", "index": 10, "name": "is_flexible_daily_budgets", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.pinterest.pinterest_ads.campaign_history"}, "source.pinterest.pinterest_ads.campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_campaign_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "campaign_id": {"type": "bigint", "index": 2, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "text", "index": 3, "name": "campaign_name", "comment": null}, "campaign_status": {"type": "text", "index": 4, "name": "campaign_status", "comment": null}, "advertiser_id": {"type": "bigint", "index": 5, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 7, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 8, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 9, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 10, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 11, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 12, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 13, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 14, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.pinterest.pinterest_ads.campaign_report"}, "source.pinterest.pinterest_ads.keyword_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_keyword_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "advertiser_id": {"type": "bigint", "index": 4, "name": "advertiser_id", "comment": null}, "archived": {"type": "boolean", "index": 5, "name": "archived", "comment": null}, "bid": {"type": "integer", "index": 6, "name": "bid", "comment": null}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": null}, "id": {"type": "bigint", "index": 8, "name": "id", "comment": null}, "match_type": {"type": "text", "index": 9, "name": "match_type", "comment": null}, "parent_type": {"type": "text", "index": 10, "name": "parent_type", "comment": null}, "value": {"type": "text", "index": 11, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.pinterest.pinterest_ads.keyword_history"}, "source.pinterest.pinterest_ads.keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_keyword_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "keyword_id": {"type": "bigint", "index": 2, "name": "keyword_id", "comment": null}, "pin_promotion_id": {"type": "bigint", "index": 3, "name": "pin_promotion_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "text", "index": 5, "name": "ad_group_name", "comment": null}, "ad_group_status": {"type": "text", "index": 6, "name": "ad_group_status", "comment": null}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": null}, "advertiser_id": {"type": "bigint", "index": 8, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 9, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 10, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 11, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 12, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 13, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 14, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 15, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 16, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 17, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.pinterest.pinterest_ads.keyword_report"}, "source.pinterest.pinterest_ads.pin_promotion_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_pin_promotion_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 2, "name": "ad_group_id", "comment": null}, "created_time": {"type": "text", "index": 3, "name": "created_time", "comment": null}, "destination_url": {"type": "text", "index": 4, "name": "destination_url", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "pin_id": {"type": "bigint", "index": 6, "name": "pin_id", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}, "creative_type": {"type": "text", "index": 8, "name": "creative_type", "comment": null}, "_fivetran_synced": {"type": "text", "index": 9, "name": "_fivetran_synced", "comment": null}, "ad_account_id": {"type": "bigint", "index": 10, "name": "ad_account_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.pinterest.pinterest_ads.pin_promotion_history"}, "source.pinterest.pinterest_ads.pin_promotion_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_pin_promotion_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "pin_promotion_id": {"type": "bigint", "index": 2, "name": "pin_promotion_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": null}, "advertiser_id": {"type": "bigint", "index": 5, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 7, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 8, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 9, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 10, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 11, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 12, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 13, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 14, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.pinterest.pinterest_ads.pin_promotion_report"}, "source.pinterest.pinterest_ads.pin_promotion_targeting_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_pin_promotion_targeting_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "targeting_type": {"type": "text", "index": 3, "name": "targeting_type", "comment": null}, "targeting_value": {"type": "text", "index": 4, "name": "targeting_value", "comment": null}, "ad_group_id": {"type": "text", "index": 5, "name": "ad_group_id", "comment": null}, "advertiser_id": {"type": "text", "index": 6, "name": "advertiser_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": null}, "pin_promotion_id": {"type": "text", "index": 8, "name": "pin_promotion_id", "comment": null}, "clickthrough_1": {"type": "double precision", "index": 9, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "double precision", "index": 10, "name": "clickthrough_2", "comment": null}, "impression_1": {"type": "double precision", "index": 11, "name": "impression_1", "comment": null}, "impression_2": {"type": "double precision", "index": 12, "name": "impression_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 13, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 14, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 15, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 16, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.pinterest.pinterest_ads.pin_promotion_targeting_report"}, "source.pinterest.pinterest_ads.targeting_geo": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_targeting_geo_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"country_id": {"type": "text", "index": 1, "name": "country_id", "comment": null}, "country_name": {"type": "text", "index": 2, "name": "country_name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.pinterest.pinterest_ads.targeting_geo"}, "source.pinterest.pinterest_ads.targeting_geo_region": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_targeting_geo_region_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "country_id": {"type": "text", "index": 2, "name": "country_id", "comment": null}, "region_id": {"type": "text", "index": 3, "name": "region_id", "comment": null}, "region_name": {"type": "text", "index": 4, "name": "region_name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.pinterest.pinterest_ads.targeting_geo_region"}, "source.reddit_ads.reddit_ads.account_conversions_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_account_conversions", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "avg_value": {"type": "double precision", "index": 3, "name": "avg_value", "comment": null}, "click_through_conversion_attribution_window_day": {"type": "integer", "index": 4, "name": "click_through_conversion_attribution_window_day", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 5, "name": "click_through_conversion_attribution_window_month", "comment": null}, "click_through_conversion_attribution_window_week": {"type": "integer", "index": 6, "name": "click_through_conversion_attribution_window_week", "comment": null}, "date": {"type": "date", "index": 7, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 8, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 9, "name": "total_items", "comment": null}, "total_value": {"type": "double precision", "index": 10, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_day": {"type": "integer", "index": 11, "name": "view_through_conversion_attribution_window_day", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 12, "name": "view_through_conversion_attribution_window_month", "comment": null}, "view_through_conversion_attribution_window_week": {"type": "integer", "index": 13, "name": "view_through_conversion_attribution_window_week", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.reddit_ads.reddit_ads.account_conversions_report"}, "source.reddit_ads.reddit_ads.account_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_account_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "app_install_metrics_add_payment_info": {"type": "integer", "index": 4, "name": "app_install_metrics_add_payment_info", "comment": null}, "app_install_metrics_add_to_cart": {"type": "integer", "index": 5, "name": "app_install_metrics_add_to_cart", "comment": null}, "app_install_metrics_app_launch": {"type": "integer", "index": 6, "name": "app_install_metrics_app_launch", "comment": null}, "app_install_metrics_completed_tutorial": {"type": "integer", "index": 7, "name": "app_install_metrics_completed_tutorial", "comment": null}, "app_install_metrics_install": {"type": "integer", "index": 8, "name": "app_install_metrics_install", "comment": null}, "app_install_metrics_level_achieved": {"type": "integer", "index": 9, "name": "app_install_metrics_level_achieved", "comment": null}, "app_install_metrics_purchase": {"type": "integer", "index": 10, "name": "app_install_metrics_purchase", "comment": null}, "app_install_metrics_search": {"type": "integer", "index": 11, "name": "app_install_metrics_search", "comment": null}, "app_install_metrics_sign_up": {"type": "integer", "index": 12, "name": "app_install_metrics_sign_up", "comment": null}, "app_install_metrics_spend": {"type": "integer", "index": 13, "name": "app_install_metrics_spend", "comment": null}, "app_install_metrics_spend_credits": {"type": "integer", "index": 14, "name": "app_install_metrics_spend_credits", "comment": null}, "app_install_metrics_view_content": {"type": "integer", "index": 15, "name": "app_install_metrics_view_content", "comment": null}, "clicks": {"type": "integer", "index": 16, "name": "clicks", "comment": null}, "comment_downvotes": {"type": "integer", "index": 17, "name": "comment_downvotes", "comment": null}, "comment_upvotes": {"type": "integer", "index": 18, "name": "comment_upvotes", "comment": null}, "comments_page_views": {"type": "integer", "index": 19, "name": "comments_page_views", "comment": null}, "conversion_roas": {"type": "integer", "index": 20, "name": "conversion_roas", "comment": null}, "cpc": {"type": "double precision", "index": 21, "name": "cpc", "comment": null}, "ctr": {"type": "double precision", "index": 22, "name": "ctr", "comment": null}, "ecpm": {"type": "double precision", "index": 23, "name": "ecpm", "comment": null}, "gallery_item_caption": {"type": "integer", "index": 24, "name": "gallery_item_caption", "comment": null}, "gallery_item_id": {"type": "integer", "index": 25, "name": "gallery_item_id", "comment": null}, "impressions": {"type": "integer", "index": 26, "name": "impressions", "comment": null}, "legacy_click_conversions_attribution_window_day": {"type": "integer", "index": 27, "name": "legacy_click_conversions_attribution_window_day", "comment": null}, "legacy_click_conversions_attribution_window_month": {"type": "integer", "index": 28, "name": "legacy_click_conversions_attribution_window_month", "comment": null}, "legacy_click_conversions_attribution_window_week": {"type": "integer", "index": 29, "name": "legacy_click_conversions_attribution_window_week", "comment": null}, "legacy_view_conversions_attribution_window_day": {"type": "integer", "index": 30, "name": "legacy_view_conversions_attribution_window_day", "comment": null}, "legacy_view_conversions_attribution_window_month": {"type": "integer", "index": 31, "name": "legacy_view_conversions_attribution_window_month", "comment": null}, "legacy_view_conversions_attribution_window_week": {"type": "integer", "index": 32, "name": "legacy_view_conversions_attribution_window_week", "comment": null}, "priority": {"type": "integer", "index": 33, "name": "priority", "comment": null}, "region": {"type": "integer", "index": 34, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 35, "name": "spend", "comment": null}, "video_fully_viewable_impressions": {"type": "integer", "index": 36, "name": "video_fully_viewable_impressions", "comment": null}, "video_plays_expanded": {"type": "integer", "index": 37, "name": "video_plays_expanded", "comment": null}, "video_plays_with_sound": {"type": "integer", "index": 38, "name": "video_plays_with_sound", "comment": null}, "video_started": {"type": "integer", "index": 39, "name": "video_started", "comment": null}, "video_viewable_impressions": {"type": "integer", "index": 40, "name": "video_viewable_impressions", "comment": null}, "video_watched_100_percent": {"type": "integer", "index": 41, "name": "video_watched_100_percent", "comment": null}, "video_watched_10_seconds": {"type": "integer", "index": 42, "name": "video_watched_10_seconds", "comment": null}, "video_watched_25_percent": {"type": "integer", "index": 43, "name": "video_watched_25_percent", "comment": null}, "video_watched_3_seconds": {"type": "integer", "index": 44, "name": "video_watched_3_seconds", "comment": null}, "video_watched_50_percent": {"type": "integer", "index": 45, "name": "video_watched_50_percent", "comment": null}, "video_watched_5_seconds": {"type": "integer", "index": 46, "name": "video_watched_5_seconds", "comment": null}, "video_watched_75_percent": {"type": "integer", "index": 47, "name": "video_watched_75_percent", "comment": null}, "video_watched_95_percent": {"type": "integer", "index": 48, "name": "video_watched_95_percent", "comment": null}, "viewable_impressions": {"type": "integer", "index": 49, "name": "viewable_impressions", "comment": null}, "viewer_comments": {"type": "integer", "index": 50, "name": "viewer_comments", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.reddit_ads.reddit_ads.account_report"}, "source.reddit_ads.reddit_ads.ad_conversions_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_ad_conversions", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "ad_id": {"type": "character varying(255)", "index": 3, "name": "ad_id", "comment": null}, "avg_value": {"type": "double precision", "index": 4, "name": "avg_value", "comment": null}, "click_through_conversion_attribution_window_day": {"type": "integer", "index": 5, "name": "click_through_conversion_attribution_window_day", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 6, "name": "click_through_conversion_attribution_window_month", "comment": null}, "click_through_conversion_attribution_window_week": {"type": "integer", "index": 7, "name": "click_through_conversion_attribution_window_week", "comment": null}, "date": {"type": "date", "index": 8, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 9, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 10, "name": "total_items", "comment": null}, "total_value": {"type": "double precision", "index": 11, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_day": {"type": "integer", "index": 12, "name": "view_through_conversion_attribution_window_day", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 13, "name": "view_through_conversion_attribution_window_month", "comment": null}, "view_through_conversion_attribution_window_week": {"type": "integer", "index": 14, "name": "view_through_conversion_attribution_window_week", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.reddit_ads.reddit_ads.ad_conversions_report"}, "source.reddit_ads.reddit_ads.ad": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_ad_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying(255)", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": null}, "ad_group_id": {"type": "character varying(255)", "index": 4, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 5, "name": "campaign_id", "comment": null}, "click_url": {"type": "text", "index": 6, "name": "click_url", "comment": null}, "configured_status": {"type": "text", "index": 7, "name": "configured_status", "comment": null}, "effective_status": {"type": "text", "index": 8, "name": "effective_status", "comment": null}, "is_processing": {"type": "boolean", "index": 9, "name": "is_processing", "comment": null}, "name": {"type": "text", "index": 10, "name": "name", "comment": null}, "post_id": {"type": "text", "index": 11, "name": "post_id", "comment": null}, "post_url": {"type": "integer", "index": 12, "name": "post_url", "comment": null}, "preview_expiry": {"type": "integer", "index": 13, "name": "preview_expiry", "comment": null}, "preview_url": {"type": "integer", "index": 14, "name": "preview_url", "comment": null}, "rejection_reason": {"type": "integer", "index": 15, "name": "rejection_reason", "comment": null}, "search_term": {"type": "integer", "index": 16, "name": "search_term", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.reddit_ads.reddit_ads.ad"}, "source.reddit_ads.reddit_ads.ad_group_conversions_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_ad_group_conversions", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "ad_group_id": {"type": "character varying(255)", "index": 3, "name": "ad_group_id", "comment": null}, "avg_value": {"type": "double precision", "index": 4, "name": "avg_value", "comment": null}, "click_through_conversion_attribution_window_day": {"type": "integer", "index": 5, "name": "click_through_conversion_attribution_window_day", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 6, "name": "click_through_conversion_attribution_window_month", "comment": null}, "click_through_conversion_attribution_window_week": {"type": "integer", "index": 7, "name": "click_through_conversion_attribution_window_week", "comment": null}, "date": {"type": "date", "index": 8, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 9, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 10, "name": "total_items", "comment": null}, "total_value": {"type": "double precision", "index": 11, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_day": {"type": "integer", "index": 12, "name": "view_through_conversion_attribution_window_day", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 13, "name": "view_through_conversion_attribution_window_month", "comment": null}, "view_through_conversion_attribution_window_week": {"type": "integer", "index": 14, "name": "view_through_conversion_attribution_window_week", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.reddit_ads.reddit_ads.ad_group_conversions_report"}, "source.reddit_ads.reddit_ads.ad_group": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_ad_group_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "id": {"type": "character varying(255)", "index": 2, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "bid_strategy": {"type": "text", "index": 4, "name": "bid_strategy", "comment": null}, "bid_value": {"type": "integer", "index": 5, "name": "bid_value", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 6, "name": "campaign_id", "comment": null}, "configured_status": {"type": "text", "index": 7, "name": "configured_status", "comment": null}, "effective_status": {"type": "text", "index": 8, "name": "effective_status", "comment": null}, "end_time": {"type": "timestamp without time zone", "index": 9, "name": "end_time", "comment": null}, "expand_targeting": {"type": "boolean", "index": 10, "name": "expand_targeting", "comment": null}, "goal_type": {"type": "text", "index": 11, "name": "goal_type", "comment": null}, "goal_value": {"type": "integer", "index": 12, "name": "goal_value", "comment": null}, "is_processing": {"type": "boolean", "index": 13, "name": "is_processing", "comment": null}, "name": {"type": "text", "index": 14, "name": "name", "comment": null}, "optimization_strategy_type": {"type": "integer", "index": 15, "name": "optimization_strategy_type", "comment": null}, "start_time": {"type": "timestamp without time zone", "index": 16, "name": "start_time", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.reddit_ads.reddit_ads.ad_group"}, "source.reddit_ads.reddit_ads.ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_ad_group_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "ad_group_id": {"type": "character varying(255)", "index": 2, "name": "ad_group_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "app_install_metrics_add_payment_info": {"type": "integer", "index": 5, "name": "app_install_metrics_add_payment_info", "comment": null}, "app_install_metrics_add_to_cart": {"type": "integer", "index": 6, "name": "app_install_metrics_add_to_cart", "comment": null}, "app_install_metrics_app_launch": {"type": "integer", "index": 7, "name": "app_install_metrics_app_launch", "comment": null}, "app_install_metrics_completed_tutorial": {"type": "integer", "index": 8, "name": "app_install_metrics_completed_tutorial", "comment": null}, "app_install_metrics_install": {"type": "integer", "index": 9, "name": "app_install_metrics_install", "comment": null}, "app_install_metrics_level_achieved": {"type": "integer", "index": 10, "name": "app_install_metrics_level_achieved", "comment": null}, "app_install_metrics_purchase": {"type": "integer", "index": 11, "name": "app_install_metrics_purchase", "comment": null}, "app_install_metrics_search": {"type": "integer", "index": 12, "name": "app_install_metrics_search", "comment": null}, "app_install_metrics_sign_up": {"type": "integer", "index": 13, "name": "app_install_metrics_sign_up", "comment": null}, "app_install_metrics_spend": {"type": "integer", "index": 14, "name": "app_install_metrics_spend", "comment": null}, "app_install_metrics_spend_credits": {"type": "integer", "index": 15, "name": "app_install_metrics_spend_credits", "comment": null}, "app_install_metrics_view_content": {"type": "integer", "index": 16, "name": "app_install_metrics_view_content", "comment": null}, "clicks": {"type": "integer", "index": 17, "name": "clicks", "comment": null}, "comment_downvotes": {"type": "integer", "index": 18, "name": "comment_downvotes", "comment": null}, "comment_upvotes": {"type": "integer", "index": 19, "name": "comment_upvotes", "comment": null}, "comments_page_views": {"type": "integer", "index": 20, "name": "comments_page_views", "comment": null}, "conversion_roas": {"type": "integer", "index": 21, "name": "conversion_roas", "comment": null}, "cpc": {"type": "double precision", "index": 22, "name": "cpc", "comment": null}, "ctr": {"type": "double precision", "index": 23, "name": "ctr", "comment": null}, "ecpm": {"type": "double precision", "index": 24, "name": "ecpm", "comment": null}, "gallery_item_caption": {"type": "integer", "index": 25, "name": "gallery_item_caption", "comment": null}, "gallery_item_id": {"type": "integer", "index": 26, "name": "gallery_item_id", "comment": null}, "impressions": {"type": "integer", "index": 27, "name": "impressions", "comment": null}, "legacy_click_conversions_attribution_window_day": {"type": "integer", "index": 28, "name": "legacy_click_conversions_attribution_window_day", "comment": null}, "legacy_click_conversions_attribution_window_month": {"type": "integer", "index": 29, "name": "legacy_click_conversions_attribution_window_month", "comment": null}, "legacy_click_conversions_attribution_window_week": {"type": "integer", "index": 30, "name": "legacy_click_conversions_attribution_window_week", "comment": null}, "legacy_view_conversions_attribution_window_day": {"type": "integer", "index": 31, "name": "legacy_view_conversions_attribution_window_day", "comment": null}, "legacy_view_conversions_attribution_window_month": {"type": "integer", "index": 32, "name": "legacy_view_conversions_attribution_window_month", "comment": null}, "legacy_view_conversions_attribution_window_week": {"type": "integer", "index": 33, "name": "legacy_view_conversions_attribution_window_week", "comment": null}, "priority": {"type": "integer", "index": 34, "name": "priority", "comment": null}, "region": {"type": "integer", "index": 35, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 36, "name": "spend", "comment": null}, "video_fully_viewable_impressions": {"type": "integer", "index": 37, "name": "video_fully_viewable_impressions", "comment": null}, "video_plays_expanded": {"type": "integer", "index": 38, "name": "video_plays_expanded", "comment": null}, "video_plays_with_sound": {"type": "integer", "index": 39, "name": "video_plays_with_sound", "comment": null}, "video_started": {"type": "integer", "index": 40, "name": "video_started", "comment": null}, "video_viewable_impressions": {"type": "integer", "index": 41, "name": "video_viewable_impressions", "comment": null}, "video_watched_100_percent": {"type": "integer", "index": 42, "name": "video_watched_100_percent", "comment": null}, "video_watched_10_seconds": {"type": "integer", "index": 43, "name": "video_watched_10_seconds", "comment": null}, "video_watched_25_percent": {"type": "integer", "index": 44, "name": "video_watched_25_percent", "comment": null}, "video_watched_3_seconds": {"type": "integer", "index": 45, "name": "video_watched_3_seconds", "comment": null}, "video_watched_50_percent": {"type": "integer", "index": 46, "name": "video_watched_50_percent", "comment": null}, "video_watched_5_seconds": {"type": "integer", "index": 47, "name": "video_watched_5_seconds", "comment": null}, "video_watched_75_percent": {"type": "integer", "index": 48, "name": "video_watched_75_percent", "comment": null}, "video_watched_95_percent": {"type": "integer", "index": 49, "name": "video_watched_95_percent", "comment": null}, "viewable_impressions": {"type": "integer", "index": 50, "name": "viewable_impressions", "comment": null}, "viewer_comments": {"type": "integer", "index": 51, "name": "viewer_comments", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.reddit_ads.reddit_ads.ad_group_report"}, "source.reddit_ads.reddit_ads.ad_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_ad_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "ad_id": {"type": "character varying(255)", "index": 2, "name": "ad_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "app_install_metrics_add_payment_info": {"type": "integer", "index": 5, "name": "app_install_metrics_add_payment_info", "comment": null}, "app_install_metrics_add_to_cart": {"type": "integer", "index": 6, "name": "app_install_metrics_add_to_cart", "comment": null}, "app_install_metrics_app_launch": {"type": "integer", "index": 7, "name": "app_install_metrics_app_launch", "comment": null}, "app_install_metrics_completed_tutorial": {"type": "integer", "index": 8, "name": "app_install_metrics_completed_tutorial", "comment": null}, "app_install_metrics_install": {"type": "integer", "index": 9, "name": "app_install_metrics_install", "comment": null}, "app_install_metrics_level_achieved": {"type": "integer", "index": 10, "name": "app_install_metrics_level_achieved", "comment": null}, "app_install_metrics_purchase": {"type": "integer", "index": 11, "name": "app_install_metrics_purchase", "comment": null}, "app_install_metrics_search": {"type": "integer", "index": 12, "name": "app_install_metrics_search", "comment": null}, "app_install_metrics_sign_up": {"type": "integer", "index": 13, "name": "app_install_metrics_sign_up", "comment": null}, "app_install_metrics_spend": {"type": "integer", "index": 14, "name": "app_install_metrics_spend", "comment": null}, "app_install_metrics_spend_credits": {"type": "integer", "index": 15, "name": "app_install_metrics_spend_credits", "comment": null}, "app_install_metrics_view_content": {"type": "integer", "index": 16, "name": "app_install_metrics_view_content", "comment": null}, "clicks": {"type": "integer", "index": 17, "name": "clicks", "comment": null}, "comment_downvotes": {"type": "integer", "index": 18, "name": "comment_downvotes", "comment": null}, "comment_upvotes": {"type": "integer", "index": 19, "name": "comment_upvotes", "comment": null}, "comments_page_views": {"type": "integer", "index": 20, "name": "comments_page_views", "comment": null}, "conversion_roas": {"type": "integer", "index": 21, "name": "conversion_roas", "comment": null}, "cpc": {"type": "double precision", "index": 22, "name": "cpc", "comment": null}, "ctr": {"type": "double precision", "index": 23, "name": "ctr", "comment": null}, "ecpm": {"type": "double precision", "index": 24, "name": "ecpm", "comment": null}, "gallery_item_caption": {"type": "integer", "index": 25, "name": "gallery_item_caption", "comment": null}, "gallery_item_id": {"type": "integer", "index": 26, "name": "gallery_item_id", "comment": null}, "impressions": {"type": "integer", "index": 27, "name": "impressions", "comment": null}, "legacy_click_conversions_attribution_window_day": {"type": "integer", "index": 28, "name": "legacy_click_conversions_attribution_window_day", "comment": null}, "legacy_click_conversions_attribution_window_month": {"type": "integer", "index": 29, "name": "legacy_click_conversions_attribution_window_month", "comment": null}, "legacy_click_conversions_attribution_window_week": {"type": "integer", "index": 30, "name": "legacy_click_conversions_attribution_window_week", "comment": null}, "legacy_view_conversions_attribution_window_day": {"type": "integer", "index": 31, "name": "legacy_view_conversions_attribution_window_day", "comment": null}, "legacy_view_conversions_attribution_window_month": {"type": "integer", "index": 32, "name": "legacy_view_conversions_attribution_window_month", "comment": null}, "legacy_view_conversions_attribution_window_week": {"type": "integer", "index": 33, "name": "legacy_view_conversions_attribution_window_week", "comment": null}, "priority": {"type": "integer", "index": 34, "name": "priority", "comment": null}, "region": {"type": "integer", "index": 35, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 36, "name": "spend", "comment": null}, "video_fully_viewable_impressions": {"type": "integer", "index": 37, "name": "video_fully_viewable_impressions", "comment": null}, "video_plays_expanded": {"type": "integer", "index": 38, "name": "video_plays_expanded", "comment": null}, "video_plays_with_sound": {"type": "integer", "index": 39, "name": "video_plays_with_sound", "comment": null}, "video_started": {"type": "integer", "index": 40, "name": "video_started", "comment": null}, "video_viewable_impressions": {"type": "integer", "index": 41, "name": "video_viewable_impressions", "comment": null}, "video_watched_100_percent": {"type": "integer", "index": 42, "name": "video_watched_100_percent", "comment": null}, "video_watched_10_seconds": {"type": "integer", "index": 43, "name": "video_watched_10_seconds", "comment": null}, "video_watched_25_percent": {"type": "integer", "index": 44, "name": "video_watched_25_percent", "comment": null}, "video_watched_3_seconds": {"type": "integer", "index": 45, "name": "video_watched_3_seconds", "comment": null}, "video_watched_50_percent": {"type": "integer", "index": 46, "name": "video_watched_50_percent", "comment": null}, "video_watched_5_seconds": {"type": "integer", "index": 47, "name": "video_watched_5_seconds", "comment": null}, "video_watched_75_percent": {"type": "integer", "index": 48, "name": "video_watched_75_percent", "comment": null}, "video_watched_95_percent": {"type": "integer", "index": 49, "name": "video_watched_95_percent", "comment": null}, "viewable_impressions": {"type": "integer", "index": 50, "name": "viewable_impressions", "comment": null}, "viewer_comments": {"type": "integer", "index": 51, "name": "viewer_comments", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.reddit_ads.reddit_ads.ad_report"}, "source.reddit_ads.reddit_ads.business_account": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_business_account_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying(255)", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "attribution_type": {"type": "text", "index": 3, "name": "attribution_type", "comment": null}, "click_attribution_window": {"type": "text", "index": 4, "name": "click_attribution_window", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 5, "name": "created_at", "comment": null}, "currency": {"type": "text", "index": 6, "name": "currency", "comment": null}, "status": {"type": "integer", "index": 7, "name": "status", "comment": null}, "time_zone_id": {"type": "text", "index": 8, "name": "time_zone_id", "comment": null}, "view_attribution_window": {"type": "text", "index": 9, "name": "view_attribution_window", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.reddit_ads.reddit_ads.business_account"}, "source.reddit_ads.reddit_ads.campaign_conversions_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_campaign_conversions", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "avg_value": {"type": "double precision", "index": 3, "name": "avg_value", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 4, "name": "campaign_id", "comment": null}, "click_through_conversion_attribution_window_day": {"type": "integer", "index": 5, "name": "click_through_conversion_attribution_window_day", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 6, "name": "click_through_conversion_attribution_window_month", "comment": null}, "click_through_conversion_attribution_window_week": {"type": "integer", "index": 7, "name": "click_through_conversion_attribution_window_week", "comment": null}, "date": {"type": "date", "index": 8, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 9, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 10, "name": "total_items", "comment": null}, "total_value": {"type": "double precision", "index": 11, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_day": {"type": "integer", "index": 12, "name": "view_through_conversion_attribution_window_day", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 13, "name": "view_through_conversion_attribution_window_month", "comment": null}, "view_through_conversion_attribution_window_week": {"type": "integer", "index": 14, "name": "view_through_conversion_attribution_window_week", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.reddit_ads.reddit_ads.campaign_conversions_report"}, "source.reddit_ads.reddit_ads.campaign_country_conversions_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_campaign_country_conversions_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 3, "name": "campaign_id", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 4, "name": "click_through_conversion_attribution_window_month", "comment": null}, "country": {"type": "text", "index": 5, "name": "country", "comment": null}, "date": {"type": "date", "index": 6, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 7, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 8, "name": "total_items", "comment": null}, "total_value": {"type": "integer", "index": 9, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 10, "name": "view_through_conversion_attribution_window_month", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.reddit_ads.reddit_ads.campaign_country_conversions_report"}, "source.reddit_ads.reddit_ads.campaign_country_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_campaign_country_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 3, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 4, "name": "clicks", "comment": null}, "country": {"type": "text", "index": 5, "name": "country", "comment": null}, "date": {"type": "date", "index": 6, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": null}, "region": {"type": "text", "index": 8, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 9, "name": "spend", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.reddit_ads.reddit_ads.campaign_country_report"}, "source.reddit_ads.reddit_ads.campaign": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_campaign_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying(255)", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": null}, "configured_status": {"type": "text", "index": 4, "name": "configured_status", "comment": null}, "effective_status": {"type": "text", "index": 5, "name": "effective_status", "comment": null}, "funding_instrument_id": {"type": "integer", "index": 6, "name": "funding_instrument_id", "comment": null}, "is_processing": {"type": "boolean", "index": 7, "name": "is_processing", "comment": null}, "name": {"type": "text", "index": 8, "name": "name", "comment": null}, "objective": {"type": "text", "index": 9, "name": "objective", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.reddit_ads.reddit_ads.campaign"}, "source.reddit_ads.reddit_ads.campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_campaign_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 2, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "app_install_metrics_add_payment_info": {"type": "integer", "index": 5, "name": "app_install_metrics_add_payment_info", "comment": null}, "app_install_metrics_add_to_cart": {"type": "integer", "index": 6, "name": "app_install_metrics_add_to_cart", "comment": null}, "app_install_metrics_app_launch": {"type": "integer", "index": 7, "name": "app_install_metrics_app_launch", "comment": null}, "app_install_metrics_completed_tutorial": {"type": "integer", "index": 8, "name": "app_install_metrics_completed_tutorial", "comment": null}, "app_install_metrics_install": {"type": "integer", "index": 9, "name": "app_install_metrics_install", "comment": null}, "app_install_metrics_level_achieved": {"type": "integer", "index": 10, "name": "app_install_metrics_level_achieved", "comment": null}, "app_install_metrics_purchase": {"type": "integer", "index": 11, "name": "app_install_metrics_purchase", "comment": null}, "app_install_metrics_search": {"type": "integer", "index": 12, "name": "app_install_metrics_search", "comment": null}, "app_install_metrics_sign_up": {"type": "integer", "index": 13, "name": "app_install_metrics_sign_up", "comment": null}, "app_install_metrics_spend": {"type": "integer", "index": 14, "name": "app_install_metrics_spend", "comment": null}, "app_install_metrics_spend_credits": {"type": "integer", "index": 15, "name": "app_install_metrics_spend_credits", "comment": null}, "app_install_metrics_view_content": {"type": "integer", "index": 16, "name": "app_install_metrics_view_content", "comment": null}, "clicks": {"type": "integer", "index": 17, "name": "clicks", "comment": null}, "comment_downvotes": {"type": "integer", "index": 18, "name": "comment_downvotes", "comment": null}, "comment_upvotes": {"type": "integer", "index": 19, "name": "comment_upvotes", "comment": null}, "comments_page_views": {"type": "integer", "index": 20, "name": "comments_page_views", "comment": null}, "conversion_roas": {"type": "integer", "index": 21, "name": "conversion_roas", "comment": null}, "cpc": {"type": "double precision", "index": 22, "name": "cpc", "comment": null}, "ctr": {"type": "double precision", "index": 23, "name": "ctr", "comment": null}, "ecpm": {"type": "double precision", "index": 24, "name": "ecpm", "comment": null}, "gallery_item_caption": {"type": "integer", "index": 25, "name": "gallery_item_caption", "comment": null}, "gallery_item_id": {"type": "integer", "index": 26, "name": "gallery_item_id", "comment": null}, "impressions": {"type": "integer", "index": 27, "name": "impressions", "comment": null}, "legacy_click_conversions_attribution_window_day": {"type": "integer", "index": 28, "name": "legacy_click_conversions_attribution_window_day", "comment": null}, "legacy_click_conversions_attribution_window_month": {"type": "integer", "index": 29, "name": "legacy_click_conversions_attribution_window_month", "comment": null}, "legacy_click_conversions_attribution_window_week": {"type": "integer", "index": 30, "name": "legacy_click_conversions_attribution_window_week", "comment": null}, "legacy_view_conversions_attribution_window_day": {"type": "integer", "index": 31, "name": "legacy_view_conversions_attribution_window_day", "comment": null}, "legacy_view_conversions_attribution_window_month": {"type": "integer", "index": 32, "name": "legacy_view_conversions_attribution_window_month", "comment": null}, "legacy_view_conversions_attribution_window_week": {"type": "integer", "index": 33, "name": "legacy_view_conversions_attribution_window_week", "comment": null}, "priority": {"type": "integer", "index": 34, "name": "priority", "comment": null}, "region": {"type": "integer", "index": 35, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 36, "name": "spend", "comment": null}, "video_fully_viewable_impressions": {"type": "integer", "index": 37, "name": "video_fully_viewable_impressions", "comment": null}, "video_plays_expanded": {"type": "integer", "index": 38, "name": "video_plays_expanded", "comment": null}, "video_plays_with_sound": {"type": "integer", "index": 39, "name": "video_plays_with_sound", "comment": null}, "video_started": {"type": "integer", "index": 40, "name": "video_started", "comment": null}, "video_viewable_impressions": {"type": "integer", "index": 41, "name": "video_viewable_impressions", "comment": null}, "video_watched_100_percent": {"type": "integer", "index": 42, "name": "video_watched_100_percent", "comment": null}, "video_watched_10_seconds": {"type": "integer", "index": 43, "name": "video_watched_10_seconds", "comment": null}, "video_watched_25_percent": {"type": "integer", "index": 44, "name": "video_watched_25_percent", "comment": null}, "video_watched_3_seconds": {"type": "integer", "index": 45, "name": "video_watched_3_seconds", "comment": null}, "video_watched_50_percent": {"type": "integer", "index": 46, "name": "video_watched_50_percent", "comment": null}, "video_watched_5_seconds": {"type": "integer", "index": 47, "name": "video_watched_5_seconds", "comment": null}, "video_watched_75_percent": {"type": "integer", "index": 48, "name": "video_watched_75_percent", "comment": null}, "video_watched_95_percent": {"type": "integer", "index": 49, "name": "video_watched_95_percent", "comment": null}, "viewable_impressions": {"type": "integer", "index": 50, "name": "viewable_impressions", "comment": null}, "viewer_comments": {"type": "integer", "index": 51, "name": "viewer_comments", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.reddit_ads.reddit_ads.campaign_report"}, "source.snapchat_ads.snapchat_ads.ad_account_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_ad_account_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snapchat_ads.snapchat_ads.ad_account_history"}, "source.snapchat_ads.snapchat_ads.ad_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_ad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "ad_squad_id": {"type": "text", "index": 2, "name": "ad_squad_id", "comment": null}, "creative_id": {"type": "text", "index": 3, "name": "creative_id", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snapchat_ads.snapchat_ads.ad_history"}, "source.snapchat_ads.snapchat_ads.ad_hourly_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_ad_hourly_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "text", "index": 1, "name": "ad_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 3, "name": "impressions", "comment": null}, "spend": {"type": "integer", "index": 4, "name": "spend", "comment": null}, "swipes": {"type": "integer", "index": 5, "name": "swipes", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 6, "name": "conversion_purchases_value", "comment": null}, "conversion_add_billing": {"type": "integer", "index": 7, "name": "conversion_add_billing", "comment": null}, "conversion_add_cart": {"type": "integer", "index": 8, "name": "conversion_add_cart", "comment": null}, "conversion_app_opens": {"type": "integer", "index": 9, "name": "conversion_app_opens", "comment": null}, "conversion_level_completes": {"type": "integer", "index": 10, "name": "conversion_level_completes", "comment": null}, "conversion_page_views": {"type": "integer", "index": 11, "name": "conversion_page_views", "comment": null}, "conversion_purchases": {"type": "integer", "index": 12, "name": "conversion_purchases", "comment": null}, "conversion_save": {"type": "integer", "index": 13, "name": "conversion_save", "comment": null}, "conversion_searches": {"type": "integer", "index": 14, "name": "conversion_searches", "comment": null}, "conversion_sign_ups": {"type": "integer", "index": 15, "name": "conversion_sign_ups", "comment": null}, "conversion_start_checkout": {"type": "integer", "index": 16, "name": "conversion_start_checkout", "comment": null}, "conversion_view_content": {"type": "integer", "index": 17, "name": "conversion_view_content", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snapchat_ads.snapchat_ads.ad_hourly_report"}, "source.snapchat_ads.snapchat_ads.ad_squad_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_ad_squad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "campaign_id": {"type": "text", "index": 2, "name": "campaign_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snapchat_ads.snapchat_ads.ad_squad_history"}, "source.snapchat_ads.snapchat_ads.ad_squad_hourly_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_ad_squad_hourly_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_squad_id": {"type": "text", "index": 1, "name": "ad_squad_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "android_installs": {"type": "integer", "index": 4, "name": "android_installs", "comment": null}, "attachment_avg_view_time_millis": {"type": "integer", "index": 5, "name": "attachment_avg_view_time_millis", "comment": null}, "attachment_quartile_1": {"type": "integer", "index": 6, "name": "attachment_quartile_1", "comment": null}, "attachment_quartile_2": {"type": "integer", "index": 7, "name": "attachment_quartile_2", "comment": null}, "attachment_quartile_3": {"type": "integer", "index": 8, "name": "attachment_quartile_3", "comment": null}, "attachment_total_view_time_millis": {"type": "integer", "index": 9, "name": "attachment_total_view_time_millis", "comment": null}, "attachment_view_completion": {"type": "integer", "index": 10, "name": "attachment_view_completion", "comment": null}, "avg_screen_time_millis": {"type": "integer", "index": 11, "name": "avg_screen_time_millis", "comment": null}, "avg_view_time_millis": {"type": "integer", "index": 12, "name": "avg_view_time_millis", "comment": null}, "conversion_add_billing": {"type": "integer", "index": 13, "name": "conversion_add_billing", "comment": null}, "conversion_add_cart": {"type": "integer", "index": 14, "name": "conversion_add_cart", "comment": null}, "conversion_app_opens": {"type": "integer", "index": 15, "name": "conversion_app_opens", "comment": null}, "conversion_level_completes": {"type": "integer", "index": 16, "name": "conversion_level_completes", "comment": null}, "conversion_page_views": {"type": "integer", "index": 17, "name": "conversion_page_views", "comment": null}, "conversion_purchases": {"type": "integer", "index": 18, "name": "conversion_purchases", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 19, "name": "conversion_purchases_value", "comment": null}, "conversion_save": {"type": "integer", "index": 20, "name": "conversion_save", "comment": null}, "conversion_searches": {"type": "integer", "index": 21, "name": "conversion_searches", "comment": null}, "conversion_sign_ups": {"type": "integer", "index": 22, "name": "conversion_sign_ups", "comment": null}, "conversion_start_checkout": {"type": "integer", "index": 23, "name": "conversion_start_checkout", "comment": null}, "conversion_view_content": {"type": "integer", "index": 24, "name": "conversion_view_content", "comment": null}, "impressions": {"type": "integer", "index": 25, "name": "impressions", "comment": null}, "ios_installs": {"type": "integer", "index": 26, "name": "ios_installs", "comment": null}, "quartile_1": {"type": "integer", "index": 27, "name": "quartile_1", "comment": null}, "quartile_2": {"type": "integer", "index": 28, "name": "quartile_2", "comment": null}, "quartile_3": {"type": "integer", "index": 29, "name": "quartile_3", "comment": null}, "saves": {"type": "integer", "index": 30, "name": "saves", "comment": null}, "screen_time_millis": {"type": "integer", "index": 31, "name": "screen_time_millis", "comment": null}, "shares": {"type": "integer", "index": 32, "name": "shares", "comment": null}, "spend": {"type": "integer", "index": 33, "name": "spend", "comment": null}, "story_completes": {"type": "integer", "index": 34, "name": "story_completes", "comment": null}, "story_opens": {"type": "integer", "index": 35, "name": "story_opens", "comment": null}, "swipe_up_percent": {"type": "integer", "index": 36, "name": "swipe_up_percent", "comment": null}, "swipes": {"type": "integer", "index": 37, "name": "swipes", "comment": null}, "total_installs": {"type": "integer", "index": 38, "name": "total_installs", "comment": null}, "video_views": {"type": "integer", "index": 39, "name": "video_views", "comment": null}, "view_completion": {"type": "integer", "index": 40, "name": "view_completion", "comment": null}, "view_time_millis": {"type": "integer", "index": 41, "name": "view_time_millis", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snapchat_ads.snapchat_ads.ad_squad_hourly_report"}, "source.snapchat_ads.snapchat_ads.campaign_geo_country_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_campaign_geo_country_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"attachment_quartile_1": {"type": "integer", "index": 1, "name": "attachment_quartile_1", "comment": null}, "attachment_quartile_2": {"type": "integer", "index": 2, "name": "attachment_quartile_2", "comment": null}, "attachment_quartile_3": {"type": "integer", "index": 3, "name": "attachment_quartile_3", "comment": null}, "attachment_total_view_time_millis": {"type": "integer", "index": 4, "name": "attachment_total_view_time_millis", "comment": null}, "attachment_view_completion": {"type": "boolean", "index": 5, "name": "attachment_view_completion", "comment": null}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 7, "name": "date", "comment": null}, "country": {"type": "text", "index": 8, "name": "country", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "quartile_1": {"type": "integer", "index": 10, "name": "quartile_1", "comment": null}, "quartile_2": {"type": "integer", "index": 11, "name": "quartile_2", "comment": null}, "quartile_3": {"type": "integer", "index": 12, "name": "quartile_3", "comment": null}, "saves": {"type": "integer", "index": 13, "name": "saves", "comment": null}, "screen_time_millis": {"type": "integer", "index": 14, "name": "screen_time_millis", "comment": null}, "shares": {"type": "integer", "index": 15, "name": "shares", "comment": null}, "spend": {"type": "integer", "index": 16, "name": "spend", "comment": null}, "swipes": {"type": "integer", "index": 17, "name": "swipes", "comment": null}, "video_views": {"type": "integer", "index": 18, "name": "video_views", "comment": null}, "view_completion": {"type": "boolean", "index": 19, "name": "view_completion", "comment": null}, "view_time_millis": {"type": "integer", "index": 20, "name": "view_time_millis", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 21, "name": "conversion_purchases_value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snapchat_ads.snapchat_ads.campaign_geo_country_daily_report"}, "source.snapchat_ads.snapchat_ads.campaign_geo_region_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_campaign_geo_region_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"attachment_quartile_1": {"type": "integer", "index": 1, "name": "attachment_quartile_1", "comment": null}, "attachment_quartile_2": {"type": "integer", "index": 2, "name": "attachment_quartile_2", "comment": null}, "attachment_quartile_3": {"type": "integer", "index": 3, "name": "attachment_quartile_3", "comment": null}, "attachment_total_view_time_millis": {"type": "integer", "index": 4, "name": "attachment_total_view_time_millis", "comment": null}, "attachment_view_completion": {"type": "boolean", "index": 5, "name": "attachment_view_completion", "comment": null}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 7, "name": "date", "comment": null}, "region": {"type": "text", "index": 8, "name": "region", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "quartile_1": {"type": "integer", "index": 10, "name": "quartile_1", "comment": null}, "quartile_2": {"type": "integer", "index": 11, "name": "quartile_2", "comment": null}, "quartile_3": {"type": "integer", "index": 12, "name": "quartile_3", "comment": null}, "saves": {"type": "integer", "index": 13, "name": "saves", "comment": null}, "screen_time_millis": {"type": "integer", "index": 14, "name": "screen_time_millis", "comment": null}, "shares": {"type": "integer", "index": 15, "name": "shares", "comment": null}, "spend": {"type": "integer", "index": 16, "name": "spend", "comment": null}, "swipes": {"type": "integer", "index": 17, "name": "swipes", "comment": null}, "video_views": {"type": "integer", "index": 18, "name": "video_views", "comment": null}, "view_completion": {"type": "boolean", "index": 19, "name": "view_completion", "comment": null}, "view_time_millis": {"type": "integer", "index": 20, "name": "view_time_millis", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 21, "name": "conversion_purchases_value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snapchat_ads.snapchat_ads.campaign_geo_region_daily_report"}, "source.snapchat_ads.snapchat_ads.campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "ad_account_id": {"type": "text", "index": 2, "name": "ad_account_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snapchat_ads.snapchat_ads.campaign_history"}, "source.snapchat_ads.snapchat_ads.campaign_hourly_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_campaign_hourly_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "text", "index": 1, "name": "campaign_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "android_installs": {"type": "integer", "index": 4, "name": "android_installs", "comment": null}, "attachment_avg_view_time_millis": {"type": "integer", "index": 5, "name": "attachment_avg_view_time_millis", "comment": null}, "attachment_quartile_1": {"type": "integer", "index": 6, "name": "attachment_quartile_1", "comment": null}, "attachment_quartile_2": {"type": "integer", "index": 7, "name": "attachment_quartile_2", "comment": null}, "attachment_quartile_3": {"type": "integer", "index": 8, "name": "attachment_quartile_3", "comment": null}, "attachment_total_view_time_millis": {"type": "integer", "index": 9, "name": "attachment_total_view_time_millis", "comment": null}, "attachment_view_completion": {"type": "integer", "index": 10, "name": "attachment_view_completion", "comment": null}, "avg_screen_time_millis": {"type": "integer", "index": 11, "name": "avg_screen_time_millis", "comment": null}, "avg_view_time_millis": {"type": "integer", "index": 12, "name": "avg_view_time_millis", "comment": null}, "conversion_add_billing": {"type": "integer", "index": 13, "name": "conversion_add_billing", "comment": null}, "conversion_add_cart": {"type": "integer", "index": 14, "name": "conversion_add_cart", "comment": null}, "conversion_app_opens": {"type": "integer", "index": 15, "name": "conversion_app_opens", "comment": null}, "conversion_level_completes": {"type": "integer", "index": 16, "name": "conversion_level_completes", "comment": null}, "conversion_page_views": {"type": "integer", "index": 17, "name": "conversion_page_views", "comment": null}, "conversion_purchases": {"type": "integer", "index": 18, "name": "conversion_purchases", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 19, "name": "conversion_purchases_value", "comment": null}, "conversion_save": {"type": "integer", "index": 20, "name": "conversion_save", "comment": null}, "conversion_searches": {"type": "integer", "index": 21, "name": "conversion_searches", "comment": null}, "conversion_sign_ups": {"type": "integer", "index": 22, "name": "conversion_sign_ups", "comment": null}, "conversion_start_checkout": {"type": "integer", "index": 23, "name": "conversion_start_checkout", "comment": null}, "conversion_view_content": {"type": "integer", "index": 24, "name": "conversion_view_content", "comment": null}, "impressions": {"type": "integer", "index": 25, "name": "impressions", "comment": null}, "ios_installs": {"type": "integer", "index": 26, "name": "ios_installs", "comment": null}, "quartile_1": {"type": "integer", "index": 27, "name": "quartile_1", "comment": null}, "quartile_2": {"type": "integer", "index": 28, "name": "quartile_2", "comment": null}, "quartile_3": {"type": "integer", "index": 29, "name": "quartile_3", "comment": null}, "saves": {"type": "integer", "index": 30, "name": "saves", "comment": null}, "screen_time_millis": {"type": "integer", "index": 31, "name": "screen_time_millis", "comment": null}, "shares": {"type": "integer", "index": 32, "name": "shares", "comment": null}, "spend": {"type": "integer", "index": 33, "name": "spend", "comment": null}, "story_completes": {"type": "integer", "index": 34, "name": "story_completes", "comment": null}, "story_opens": {"type": "integer", "index": 35, "name": "story_opens", "comment": null}, "swipe_up_percent": {"type": "integer", "index": 36, "name": "swipe_up_percent", "comment": null}, "swipes": {"type": "integer", "index": 37, "name": "swipes", "comment": null}, "total_installs": {"type": "integer", "index": 38, "name": "total_installs", "comment": null}, "video_views": {"type": "integer", "index": 39, "name": "video_views", "comment": null}, "view_completion": {"type": "integer", "index": 40, "name": "view_completion", "comment": null}, "view_time_millis": {"type": "integer", "index": 41, "name": "view_time_millis", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snapchat_ads.snapchat_ads.campaign_hourly_report"}, "source.snapchat_ads.snapchat_ads.creative_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_creative_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "ad_account_id": {"type": "text", "index": 2, "name": "ad_account_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "web_view_url": {"type": "text", "index": 4, "name": "web_view_url", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snapchat_ads.snapchat_ads.creative_history"}, "source.snapchat_ads.snapchat_ads.creative_url_tag_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_creative_url_tag_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"creative_id": {"type": "text", "index": 1, "name": "creative_id", "comment": null}, "key": {"type": "text", "index": 2, "name": "key", "comment": null}, "value": {"type": "text", "index": 3, "name": "value", "comment": null}, "updated_at": {"type": "text", "index": 4, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snapchat_ads.snapchat_ads.creative_url_tag_history"}, "source.tiktok_ads.tiktok_ads.ad_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_ad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "integer", "index": 1, "name": "ad_id", "comment": null}, "updated_at": {"type": "text", "index": 2, "name": "updated_at", "comment": null}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": null}, "adgroup_id": {"type": "integer", "index": 4, "name": "adgroup_id", "comment": null}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": null}, "create_time": {"type": "text", "index": 6, "name": "create_time", "comment": null}, "ad_name": {"type": "text", "index": 7, "name": "ad_name", "comment": null}, "call_to_action": {"type": "text", "index": 8, "name": "call_to_action", "comment": null}, "secondary_status": {"type": "text", "index": 9, "name": "secondary_status", "comment": null}, "operation_status": {"type": "text", "index": 10, "name": "operation_status", "comment": null}, "ad_text": {"type": "text", "index": 11, "name": "ad_text", "comment": null}, "video_id": {"type": "text", "index": 12, "name": "video_id", "comment": null}, "app_name": {"type": "integer", "index": 13, "name": "app_name", "comment": null}, "deeplink": {"type": "integer", "index": 14, "name": "deeplink", "comment": null}, "landing_page_url": {"type": "text", "index": 15, "name": "landing_page_url", "comment": null}, "display_name": {"type": "text", "index": 16, "name": "display_name", "comment": null}, "profile_image_url": {"type": "integer", "index": 17, "name": "profile_image_url", "comment": null}, "impression_tracking_url": {"type": "integer", "index": 18, "name": "impression_tracking_url", "comment": null}, "click_tracking_url": {"type": "integer", "index": 19, "name": "click_tracking_url", "comment": null}, "playable_url": {"type": "integer", "index": 20, "name": "playable_url", "comment": null}, "is_aco": {"type": "boolean", "index": 21, "name": "is_aco", "comment": null}, "creative_authorized": {"type": "boolean", "index": 22, "name": "creative_authorized", "comment": null}, "is_new_structure": {"type": "boolean", "index": 23, "name": "is_new_structure", "comment": null}, "image_ids": {"type": "text", "index": 24, "name": "image_ids", "comment": null}, "_fivetran_synced": {"type": "text", "index": 25, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.tiktok_ads.tiktok_ads.ad_history"}, "source.tiktok_ads.tiktok_ads.ad_report_hourly": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_ad_report_hourly_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "integer", "index": 1, "name": "ad_id", "comment": null}, "stat_time_hour": {"type": "timestamp without time zone", "index": 2, "name": "stat_time_hour", "comment": null}, "cost_per_conversion": {"type": "double precision", "index": 3, "name": "cost_per_conversion", "comment": null}, "cpc": {"type": "double precision", "index": 4, "name": "cpc", "comment": null}, "video_play_actions": {"type": "integer", "index": 5, "name": "video_play_actions", "comment": null}, "conversion_rate": {"type": "integer", "index": 6, "name": "conversion_rate", "comment": null}, "video_views_p_75": {"type": "integer", "index": 7, "name": "video_views_p_75", "comment": null}, "result": {"type": "integer", "index": 8, "name": "result", "comment": null}, "video_views_p_50": {"type": "integer", "index": 9, "name": "video_views_p_50", "comment": null}, "impressions": {"type": "integer", "index": 10, "name": "impressions", "comment": null}, "comments": {"type": "integer", "index": 11, "name": "comments", "comment": null}, "real_time_cost_per_result": {"type": "double precision", "index": 12, "name": "real_time_cost_per_result", "comment": null}, "conversion": {"type": "integer", "index": 13, "name": "conversion", "comment": null}, "real_time_result": {"type": "integer", "index": 14, "name": "real_time_result", "comment": null}, "video_views_p_100": {"type": "integer", "index": 15, "name": "video_views_p_100", "comment": null}, "shares": {"type": "integer", "index": 16, "name": "shares", "comment": null}, "real_time_conversion_rate": {"type": "integer", "index": 17, "name": "real_time_conversion_rate", "comment": null}, "cost_per_secondary_goal_result": {"type": "text", "index": 18, "name": "cost_per_secondary_goal_result", "comment": null}, "secondary_goal_result_rate": {"type": "text", "index": 19, "name": "secondary_goal_result_rate", "comment": null}, "clicks": {"type": "integer", "index": 20, "name": "clicks", "comment": null}, "cost_per_1000_reached": {"type": "integer", "index": 21, "name": "cost_per_1000_reached", "comment": null}, "video_views_p_25": {"type": "integer", "index": 22, "name": "video_views_p_25", "comment": null}, "reach": {"type": "integer", "index": 23, "name": "reach", "comment": null}, "real_time_cost_per_conversion": {"type": "double precision", "index": 24, "name": "real_time_cost_per_conversion", "comment": null}, "profile_visits_rate": {"type": "integer", "index": 25, "name": "profile_visits_rate", "comment": null}, "average_video_play": {"type": "double precision", "index": 26, "name": "average_video_play", "comment": null}, "profile_visits": {"type": "integer", "index": 27, "name": "profile_visits", "comment": null}, "cpm": {"type": "double precision", "index": 28, "name": "cpm", "comment": null}, "ctr": {"type": "double precision", "index": 29, "name": "ctr", "comment": null}, "video_watched_2_s": {"type": "integer", "index": 30, "name": "video_watched_2_s", "comment": null}, "follows": {"type": "integer", "index": 31, "name": "follows", "comment": null}, "result_rate": {"type": "integer", "index": 32, "name": "result_rate", "comment": null}, "video_watched_6_s": {"type": "integer", "index": 33, "name": "video_watched_6_s", "comment": null}, "secondary_goal_result": {"type": "text", "index": 34, "name": "secondary_goal_result", "comment": null}, "cost_per_result": {"type": "double precision", "index": 35, "name": "cost_per_result", "comment": null}, "average_video_play_per_user": {"type": "integer", "index": 36, "name": "average_video_play_per_user", "comment": null}, "real_time_result_rate": {"type": "integer", "index": 37, "name": "real_time_result_rate", "comment": null}, "spend": {"type": "double precision", "index": 38, "name": "spend", "comment": null}, "likes": {"type": "integer", "index": 39, "name": "likes", "comment": null}, "real_time_conversion": {"type": "integer", "index": 40, "name": "real_time_conversion", "comment": null}, "total_purchase_value": {"type": "double precision", "index": 41, "name": "total_purchase_value", "comment": null}, "total_sales_lead_value": {"type": "double precision", "index": 42, "name": "total_sales_lead_value", "comment": null}, "_fivetran_synced": {"type": "text", "index": 43, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.tiktok_ads.tiktok_ads.ad_report_hourly"}, "source.tiktok_ads.tiktok_ads.adgroup_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_adgroup_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"adgroup_id": {"type": "integer", "index": 1, "name": "adgroup_id", "comment": null}, "updated_at": {"type": "text", "index": 2, "name": "updated_at", "comment": null}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "create_time": {"type": "text", "index": 5, "name": "create_time", "comment": null}, "adgroup_name": {"type": "text", "index": 6, "name": "adgroup_name", "comment": null}, "placement_type": {"type": "text", "index": 7, "name": "placement_type", "comment": null}, "profile_image": {"type": "integer", "index": 8, "name": "profile_image", "comment": null}, "landing_page_url": {"type": "integer", "index": 9, "name": "landing_page_url", "comment": null}, "display_name": {"type": "integer", "index": 10, "name": "display_name", "comment": null}, "app_type": {"type": "integer", "index": 11, "name": "app_type", "comment": null}, "app_download_url": {"type": "integer", "index": 12, "name": "app_download_url", "comment": null}, "app_name": {"type": "integer", "index": 13, "name": "app_name", "comment": null}, "optimization_event": {"type": "text", "index": 14, "name": "optimization_event", "comment": null}, "secondary_optimization_event": {"type": "integer", "index": 15, "name": "secondary_optimization_event", "comment": null}, "creative_material_mode": {"type": "text", "index": 16, "name": "creative_material_mode", "comment": null}, "audience_type": {"type": "integer", "index": 17, "name": "audience_type", "comment": null}, "gender": {"type": "text", "index": 18, "name": "gender", "comment": null}, "min_android_version": {"type": "integer", "index": 19, "name": "min_android_version", "comment": null}, "min_ios_version": {"type": "integer", "index": 20, "name": "min_ios_version", "comment": null}, "budget_mode": {"type": "text", "index": 21, "name": "budget_mode", "comment": null}, "schedule_type": {"type": "text", "index": 22, "name": "schedule_type", "comment": null}, "dayparting": {"type": "integer", "index": 23, "name": "dayparting", "comment": null}, "optimization_goal": {"type": "text", "index": 24, "name": "optimization_goal", "comment": null}, "cpv_video_duration": {"type": "integer", "index": 25, "name": "cpv_video_duration", "comment": null}, "pacing": {"type": "text", "index": 26, "name": "pacing", "comment": null}, "billing_event": {"type": "text", "index": 27, "name": "billing_event", "comment": null}, "bid_type": {"type": "text", "index": 28, "name": "bid_type", "comment": null}, "deep_bid_type": {"type": "integer", "index": 29, "name": "deep_bid_type", "comment": null}, "impression_tracking_url": {"type": "integer", "index": 30, "name": "impression_tracking_url", "comment": null}, "click_tracking_url": {"type": "integer", "index": 31, "name": "click_tracking_url", "comment": null}, "secondary_status": {"type": "text", "index": 32, "name": "secondary_status", "comment": null}, "operation_status": {"type": "text", "index": 33, "name": "operation_status", "comment": null}, "statistic_type": {"type": "integer", "index": 34, "name": "statistic_type", "comment": null}, "video_download": {"type": "text", "index": 35, "name": "video_download", "comment": null}, "open_url": {"type": "integer", "index": 36, "name": "open_url", "comment": null}, "open_url_type": {"type": "integer", "index": 37, "name": "open_url_type", "comment": null}, "fallback_type": {"type": "integer", "index": 38, "name": "fallback_type", "comment": null}, "budget": {"type": "integer", "index": 39, "name": "budget", "comment": null}, "bid_price": {"type": "integer", "index": 40, "name": "bid_price", "comment": null}, "conversion_bid_price": {"type": "integer", "index": 41, "name": "conversion_bid_price", "comment": null}, "deep_cpa_bid": {"type": "integer", "index": 42, "name": "deep_cpa_bid", "comment": null}, "schedule_start_time": {"type": "text", "index": 43, "name": "schedule_start_time", "comment": null}, "schedule_end_time": {"type": "text", "index": 44, "name": "schedule_end_time", "comment": null}, "app_id": {"type": "integer", "index": 45, "name": "app_id", "comment": null}, "pixel_id": {"type": "integer", "index": 46, "name": "pixel_id", "comment": null}, "inventory_filter_enabled": {"type": "boolean", "index": 47, "name": "inventory_filter_enabled", "comment": null}, "is_hfss": {"type": "boolean", "index": 48, "name": "is_hfss", "comment": null}, "is_new_structure": {"type": "boolean", "index": 49, "name": "is_new_structure", "comment": null}, "category": {"type": "integer", "index": 50, "name": "category", "comment": null}, "is_comment_disable": {"type": "integer", "index": 51, "name": "is_comment_disable", "comment": null}, "skip_learning_phase": {"type": "integer", "index": 52, "name": "skip_learning_phase", "comment": null}, "frequency": {"type": "integer", "index": 53, "name": "frequency", "comment": null}, "frequency_schedule": {"type": "integer", "index": 54, "name": "frequency_schedule", "comment": null}, "action_days": {"type": "integer", "index": 55, "name": "action_days", "comment": null}, "audience": {"type": "text", "index": 56, "name": "audience", "comment": null}, "excluded_audience": {"type": "text", "index": 57, "name": "excluded_audience", "comment": null}, "location": {"type": "text", "index": 58, "name": "location", "comment": null}, "interest_category_v_2": {"type": "text", "index": 59, "name": "interest_category_v_2", "comment": null}, "pangle_block_app_list_id": {"type": "text", "index": 60, "name": "pangle_block_app_list_id", "comment": null}, "action_categories": {"type": "text", "index": 61, "name": "action_categories", "comment": null}, "placements": {"type": "text", "index": 62, "name": "placements", "comment": null}, "keywords": {"type": "integer", "index": 63, "name": "keywords", "comment": null}, "age_groups": {"type": "text", "index": 64, "name": "age_groups", "comment": null}, "languages": {"type": "text", "index": 65, "name": "languages", "comment": null}, "operating_systems": {"type": "text", "index": 66, "name": "operating_systems", "comment": null}, "network_types": {"type": "text", "index": 67, "name": "network_types", "comment": null}, "carriers": {"type": "text", "index": 68, "name": "carriers", "comment": null}, "video_actions": {"type": "text", "index": 69, "name": "video_actions", "comment": null}, "package": {"type": "integer", "index": 70, "name": "package", "comment": null}, "_fivetran_synced": {"type": "text", "index": 71, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.tiktok_ads.tiktok_ads.adgroup_history"}, "source.tiktok_ads.tiktok_ads.adgroup_report_hourly": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_adgroup_report_hourly_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"adgroup_id": {"type": "integer", "index": 1, "name": "adgroup_id", "comment": null}, "stat_time_hour": {"type": "timestamp without time zone", "index": 2, "name": "stat_time_hour", "comment": null}, "cost_per_conversion": {"type": "double precision", "index": 3, "name": "cost_per_conversion", "comment": null}, "cpc": {"type": "double precision", "index": 4, "name": "cpc", "comment": null}, "video_play_actions": {"type": "integer", "index": 5, "name": "video_play_actions", "comment": null}, "conversion_rate": {"type": "integer", "index": 6, "name": "conversion_rate", "comment": null}, "video_views_p_75": {"type": "integer", "index": 7, "name": "video_views_p_75", "comment": null}, "result": {"type": "integer", "index": 8, "name": "result", "comment": null}, "video_views_p_50": {"type": "integer", "index": 9, "name": "video_views_p_50", "comment": null}, "impressions": {"type": "integer", "index": 10, "name": "impressions", "comment": null}, "comments": {"type": "integer", "index": 11, "name": "comments", "comment": null}, "real_time_cost_per_result": {"type": "double precision", "index": 12, "name": "real_time_cost_per_result", "comment": null}, "conversion": {"type": "integer", "index": 13, "name": "conversion", "comment": null}, "real_time_result": {"type": "integer", "index": 14, "name": "real_time_result", "comment": null}, "video_views_p_100": {"type": "integer", "index": 15, "name": "video_views_p_100", "comment": null}, "shares": {"type": "integer", "index": 16, "name": "shares", "comment": null}, "real_time_conversion_rate": {"type": "double precision", "index": 17, "name": "real_time_conversion_rate", "comment": null}, "cost_per_secondary_goal_result": {"type": "text", "index": 18, "name": "cost_per_secondary_goal_result", "comment": null}, "secondary_goal_result_rate": {"type": "text", "index": 19, "name": "secondary_goal_result_rate", "comment": null}, "clicks": {"type": "integer", "index": 20, "name": "clicks", "comment": null}, "cost_per_1000_reached": {"type": "double precision", "index": 21, "name": "cost_per_1000_reached", "comment": null}, "video_views_p_25": {"type": "integer", "index": 22, "name": "video_views_p_25", "comment": null}, "reach": {"type": "integer", "index": 23, "name": "reach", "comment": null}, "real_time_cost_per_conversion": {"type": "double precision", "index": 24, "name": "real_time_cost_per_conversion", "comment": null}, "profile_visits_rate": {"type": "integer", "index": 25, "name": "profile_visits_rate", "comment": null}, "average_video_play": {"type": "double precision", "index": 26, "name": "average_video_play", "comment": null}, "profile_visits": {"type": "integer", "index": 27, "name": "profile_visits", "comment": null}, "cpm": {"type": "double precision", "index": 28, "name": "cpm", "comment": null}, "ctr": {"type": "double precision", "index": 29, "name": "ctr", "comment": null}, "video_watched_2_s": {"type": "integer", "index": 30, "name": "video_watched_2_s", "comment": null}, "follows": {"type": "integer", "index": 31, "name": "follows", "comment": null}, "result_rate": {"type": "double precision", "index": 32, "name": "result_rate", "comment": null}, "video_watched_6_s": {"type": "integer", "index": 33, "name": "video_watched_6_s", "comment": null}, "secondary_goal_result": {"type": "text", "index": 34, "name": "secondary_goal_result", "comment": null}, "cost_per_result": {"type": "double precision", "index": 35, "name": "cost_per_result", "comment": null}, "average_video_play_per_user": {"type": "double precision", "index": 36, "name": "average_video_play_per_user", "comment": null}, "real_time_result_rate": {"type": "double precision", "index": 37, "name": "real_time_result_rate", "comment": null}, "spend": {"type": "double precision", "index": 38, "name": "spend", "comment": null}, "likes": {"type": "integer", "index": 39, "name": "likes", "comment": null}, "real_time_conversion": {"type": "integer", "index": 40, "name": "real_time_conversion", "comment": null}, "total_purchase_value": {"type": "double precision", "index": 41, "name": "total_purchase_value", "comment": null}, "total_sales_lead_value": {"type": "double precision", "index": 42, "name": "total_sales_lead_value", "comment": null}, "_fivetran_synced": {"type": "text", "index": 43, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.tiktok_ads.tiktok_ads.adgroup_report_hourly"}, "source.tiktok_ads.tiktok_ads.advertiser": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_advertiser_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "address": {"type": "text", "index": 3, "name": "address", "comment": null}, "company": {"type": "text", "index": 4, "name": "company", "comment": null}, "contacter": {"type": "integer", "index": 5, "name": "contacter", "comment": null}, "country": {"type": "text", "index": 6, "name": "country", "comment": null}, "currency": {"type": "text", "index": 7, "name": "currency", "comment": null}, "description": {"type": "text", "index": 8, "name": "description", "comment": null}, "email": {"type": "text", "index": 9, "name": "email", "comment": null}, "industry": {"type": "integer", "index": 10, "name": "industry", "comment": null}, "license_no": {"type": "integer", "index": 11, "name": "license_no", "comment": null}, "license_url": {"type": "integer", "index": 12, "name": "license_url", "comment": null}, "promotion_area": {"type": "integer", "index": 13, "name": "promotion_area", "comment": null}, "rejected_reason": {"type": "integer", "index": 14, "name": "rejected_reason", "comment": null}, "role": {"type": "text", "index": 15, "name": "role", "comment": null}, "status": {"type": "text", "index": 16, "name": "status", "comment": null}, "telephone_number": {"type": "text", "index": 17, "name": "telephone_number", "comment": null}, "timezone": {"type": "text", "index": 18, "name": "timezone", "comment": null}, "balance": {"type": "double precision", "index": 19, "name": "balance", "comment": null}, "create_time": {"type": "text", "index": 20, "name": "create_time", "comment": null}, "language": {"type": "text", "index": 21, "name": "language", "comment": null}, "cellphone_number": {"type": "text", "index": 22, "name": "cellphone_number", "comment": null}, "_fivetran_synced": {"type": "text", "index": 23, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.tiktok_ads.tiktok_ads.advertiser"}, "source.tiktok_ads.tiktok_ads.campaign_country_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_campaign_country_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 3, "name": "clicks", "comment": null}, "conversion": {"type": "integer", "index": 4, "name": "conversion", "comment": null}, "conversion_rate": {"type": "double precision", "index": 5, "name": "conversion_rate", "comment": null}, "cost_per_conversion": {"type": "double precision", "index": 6, "name": "cost_per_conversion", "comment": null}, "country_code": {"type": "text", "index": 7, "name": "country_code", "comment": null}, "cpc": {"type": "double precision", "index": 8, "name": "cpc", "comment": null}, "cpm": {"type": "double precision", "index": 9, "name": "cpm", "comment": null}, "ctr": {"type": "double precision", "index": 10, "name": "ctr", "comment": null}, "impressions": {"type": "integer", "index": 11, "name": "impressions", "comment": null}, "real_time_conversion": {"type": "integer", "index": 12, "name": "real_time_conversion", "comment": null}, "spend": {"type": "double precision", "index": 13, "name": "spend", "comment": null}, "stat_time_day": {"type": "timestamp without time zone", "index": 14, "name": "stat_time_day", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.tiktok_ads.tiktok_ads.campaign_country_report"}, "source.tiktok_ads.tiktok_ads.campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "integer", "index": 1, "name": "ad_id", "comment": null}, "updated_at": {"type": "text", "index": 2, "name": "updated_at", "comment": null}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": null}, "adgroup_id": {"type": "integer", "index": 4, "name": "adgroup_id", "comment": null}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": null}, "create_time": {"type": "text", "index": 6, "name": "create_time", "comment": null}, "ad_name": {"type": "text", "index": 7, "name": "ad_name", "comment": null}, "call_to_action": {"type": "text", "index": 8, "name": "call_to_action", "comment": null}, "secondary_status": {"type": "text", "index": 9, "name": "secondary_status", "comment": null}, "operation_status": {"type": "text", "index": 10, "name": "operation_status", "comment": null}, "ad_text": {"type": "text", "index": 11, "name": "ad_text", "comment": null}, "video_id": {"type": "text", "index": 12, "name": "video_id", "comment": null}, "app_name": {"type": "integer", "index": 13, "name": "app_name", "comment": null}, "deeplink": {"type": "integer", "index": 14, "name": "deeplink", "comment": null}, "landing_page_url": {"type": "text", "index": 15, "name": "landing_page_url", "comment": null}, "display_name": {"type": "text", "index": 16, "name": "display_name", "comment": null}, "profile_image_url": {"type": "integer", "index": 17, "name": "profile_image_url", "comment": null}, "impression_tracking_url": {"type": "integer", "index": 18, "name": "impression_tracking_url", "comment": null}, "click_tracking_url": {"type": "integer", "index": 19, "name": "click_tracking_url", "comment": null}, "playable_url": {"type": "integer", "index": 20, "name": "playable_url", "comment": null}, "is_aco": {"type": "boolean", "index": 21, "name": "is_aco", "comment": null}, "creative_authorized": {"type": "boolean", "index": 22, "name": "creative_authorized", "comment": null}, "is_new_structure": {"type": "boolean", "index": 23, "name": "is_new_structure", "comment": null}, "image_ids": {"type": "text", "index": 24, "name": "image_ids", "comment": null}, "_fivetran_synced": {"type": "text", "index": 25, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.tiktok_ads.tiktok_ads.campaign_history"}, "source.tiktok_ads.tiktok_ads.campaign_report_hourly": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_campaign_report_hourly_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "stat_time_hour": {"type": "timestamp without time zone", "index": 2, "name": "stat_time_hour", "comment": null}, "cost_per_conversion": {"type": "double precision", "index": 3, "name": "cost_per_conversion", "comment": null}, "cpc": {"type": "double precision", "index": 4, "name": "cpc", "comment": null}, "video_play_actions": {"type": "integer", "index": 5, "name": "video_play_actions", "comment": null}, "conversion_rate": {"type": "integer", "index": 6, "name": "conversion_rate", "comment": null}, "video_views_p_75": {"type": "integer", "index": 7, "name": "video_views_p_75", "comment": null}, "result": {"type": "integer", "index": 8, "name": "result", "comment": null}, "video_views_p_50": {"type": "integer", "index": 9, "name": "video_views_p_50", "comment": null}, "impressions": {"type": "integer", "index": 10, "name": "impressions", "comment": null}, "comments": {"type": "integer", "index": 11, "name": "comments", "comment": null}, "real_time_cost_per_result": {"type": "double precision", "index": 12, "name": "real_time_cost_per_result", "comment": null}, "conversion": {"type": "integer", "index": 13, "name": "conversion", "comment": null}, "real_time_result": {"type": "integer", "index": 14, "name": "real_time_result", "comment": null}, "video_views_p_100": {"type": "integer", "index": 15, "name": "video_views_p_100", "comment": null}, "shares": {"type": "integer", "index": 16, "name": "shares", "comment": null}, "real_time_conversion_rate": {"type": "double precision", "index": 17, "name": "real_time_conversion_rate", "comment": null}, "cost_per_secondary_goal_result": {"type": "text", "index": 18, "name": "cost_per_secondary_goal_result", "comment": null}, "secondary_goal_result_rate": {"type": "text", "index": 19, "name": "secondary_goal_result_rate", "comment": null}, "clicks": {"type": "integer", "index": 20, "name": "clicks", "comment": null}, "cost_per_1000_reached": {"type": "double precision", "index": 21, "name": "cost_per_1000_reached", "comment": null}, "video_views_p_25": {"type": "integer", "index": 22, "name": "video_views_p_25", "comment": null}, "reach": {"type": "integer", "index": 23, "name": "reach", "comment": null}, "real_time_cost_per_conversion": {"type": "double precision", "index": 24, "name": "real_time_cost_per_conversion", "comment": null}, "profile_visits_rate": {"type": "integer", "index": 25, "name": "profile_visits_rate", "comment": null}, "average_video_play": {"type": "double precision", "index": 26, "name": "average_video_play", "comment": null}, "profile_visits": {"type": "integer", "index": 27, "name": "profile_visits", "comment": null}, "cpm": {"type": "double precision", "index": 28, "name": "cpm", "comment": null}, "ctr": {"type": "double precision", "index": 29, "name": "ctr", "comment": null}, "video_watched_2_s": {"type": "integer", "index": 30, "name": "video_watched_2_s", "comment": null}, "follows": {"type": "integer", "index": 31, "name": "follows", "comment": null}, "result_rate": {"type": "double precision", "index": 32, "name": "result_rate", "comment": null}, "video_watched_6_s": {"type": "integer", "index": 33, "name": "video_watched_6_s", "comment": null}, "secondary_goal_result": {"type": "text", "index": 34, "name": "secondary_goal_result", "comment": null}, "cost_per_result": {"type": "double precision", "index": 35, "name": "cost_per_result", "comment": null}, "average_video_play_per_user": {"type": "double precision", "index": 36, "name": "average_video_play_per_user", "comment": null}, "real_time_result_rate": {"type": "double precision", "index": 37, "name": "real_time_result_rate", "comment": null}, "spend": {"type": "double precision", "index": 38, "name": "spend", "comment": null}, "likes": {"type": "integer", "index": 39, "name": "likes", "comment": null}, "real_time_conversion": {"type": "integer", "index": 40, "name": "real_time_conversion", "comment": null}, "total_purchase_value": {"type": "double precision", "index": 41, "name": "total_purchase_value", "comment": null}, "total_sales_lead_value": {"type": "double precision", "index": 42, "name": "total_sales_lead_value", "comment": null}, "_fivetran_synced": {"type": "text", "index": 43, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.tiktok_ads.tiktok_ads.campaign_report_hourly"}, "source.tiktok_ads.tiktok_ads.location": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_location_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "advertiser_id": {"type": "integer", "index": 2, "name": "advertiser_id", "comment": null}, "area_type": {"type": "text", "index": 3, "name": "area_type", "comment": null}, "country_code": {"type": "text", "index": 4, "name": "country_code", "comment": null}, "parent_id": {"type": "text", "index": 5, "name": "parent_id", "comment": null}, "region_id": {"type": "text", "index": 6, "name": "region_id", "comment": null}, "region_level": {"type": "text", "index": 7, "name": "region_level", "comment": null}, "region_name": {"type": "text", "index": 8, "name": "region_name", "comment": null}, "support_below_18": {"type": "boolean", "index": 9, "name": "support_below_18", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.tiktok_ads.tiktok_ads.location"}, "source.twitter_ads.twitter_ads.account_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_account_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "approval_status": {"type": "text", "index": 2, "name": "approval_status", "comment": null}, "business_id": {"type": "integer", "index": 3, "name": "business_id", "comment": null}, "business_name": {"type": "integer", "index": 4, "name": "business_name", "comment": null}, "created_at": {"type": "text", "index": 5, "name": "created_at", "comment": null}, "deleted": {"type": "boolean", "index": 6, "name": "deleted", "comment": null}, "id": {"type": "text", "index": 7, "name": "id", "comment": null}, "industry_type": {"type": "integer", "index": 8, "name": "industry_type", "comment": null}, "name": {"type": "character varying", "index": 9, "name": "name", "comment": null}, "salt": {"type": "integer", "index": 10, "name": "salt", "comment": null}, "timezone": {"type": "text", "index": 11, "name": "timezone", "comment": null}, "timezone_switch_at": {"type": "text", "index": 12, "name": "timezone_switch_at", "comment": null}, "updated_at": {"type": "text", "index": 13, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.twitter_ads.twitter_ads.account_history"}, "source.twitter_ads.twitter_ads.campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": null}, "created_at": {"type": "text", "index": 3, "name": "created_at", "comment": null}, "currency": {"type": "text", "index": 4, "name": "currency", "comment": null}, "daily_budget_amount_local_micro": {"type": "integer", "index": 5, "name": "daily_budget_amount_local_micro", "comment": null}, "deleted": {"type": "boolean", "index": 6, "name": "deleted", "comment": null}, "duration_in_days": {"type": "integer", "index": 7, "name": "duration_in_days", "comment": null}, "end_time": {"type": "text", "index": 8, "name": "end_time", "comment": null}, "entity_status": {"type": "text", "index": 9, "name": "entity_status", "comment": null}, "frequency_cap": {"type": "integer", "index": 10, "name": "frequency_cap", "comment": null}, "funding_instrument_id": {"type": "text", "index": 11, "name": "funding_instrument_id", "comment": null}, "id": {"type": "text", "index": 12, "name": "id", "comment": null}, "name": {"type": "text", "index": 13, "name": "name", "comment": null}, "servable": {"type": "boolean", "index": 14, "name": "servable", "comment": null}, "standard_delivery": {"type": "boolean", "index": 15, "name": "standard_delivery", "comment": null}, "start_time": {"type": "text", "index": 16, "name": "start_time", "comment": null}, "total_budget_amount_local_micro": {"type": "integer", "index": 17, "name": "total_budget_amount_local_micro", "comment": null}, "updated_at": {"type": "text", "index": 18, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.twitter_ads.twitter_ads.campaign_history"}, "source.twitter_ads.twitter_ads.campaign_locations_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_campaign_locations_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"segment": {"type": "text", "index": 1, "name": "segment", "comment": null}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 3, "name": "billed_charge_local_micro", "comment": null}, "campaign_id": {"type": "text", "index": 4, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 5, "name": "clicks", "comment": null}, "date": {"type": "timestamp without time zone", "index": 6, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": null}, "placement": {"type": "text", "index": 8, "name": "placement", "comment": null}, "url_clicks": {"type": "integer", "index": 9, "name": "url_clicks", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.twitter_ads.twitter_ads.campaign_locations_report"}, "source.twitter_ads.twitter_ads.campaign_regions_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_campaign_regions_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"location_name": {"type": "text", "index": 1, "name": "location_name", "comment": null}, "location_type": {"type": "text", "index": 2, "name": "location_type", "comment": null}, "segment": {"type": "text", "index": 3, "name": "segment", "comment": null}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 5, "name": "billed_charge_local_micro", "comment": null}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 7, "name": "clicks", "comment": null}, "date": {"type": "timestamp without time zone", "index": 8, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "placement": {"type": "text", "index": 10, "name": "placement", "comment": null}, "url_clicks": {"type": "integer", "index": 11, "name": "url_clicks", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.twitter_ads.twitter_ads.campaign_regions_report"}, "source.twitter_ads.twitter_ads.campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_campaign_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "text", "index": 1, "name": "account_id", "comment": null}, "campaign_id": {"type": "text", "index": 2, "name": "campaign_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 3, "name": "date", "comment": null}, "placement": {"type": "text", "index": 4, "name": "placement", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "app_clicks": {"type": "integer", "index": 6, "name": "app_clicks", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 7, "name": "billed_charge_local_micro", "comment": null}, "billed_engagements": {"type": "integer", "index": 8, "name": "billed_engagements", "comment": null}, "card_engagements": {"type": "integer", "index": 9, "name": "card_engagements", "comment": null}, "carousel_swipes": {"type": "integer", "index": 10, "name": "carousel_swipes", "comment": null}, "clicks": {"type": "integer", "index": 11, "name": "clicks", "comment": null}, "conversion_custom_metric": {"type": "integer", "index": 12, "name": "conversion_custom_metric", "comment": null}, "conversion_custom_order_quantity": {"type": "integer", "index": 13, "name": "conversion_custom_order_quantity", "comment": null}, "conversion_custom_order_quantity_engagement": {"type": "integer", "index": 14, "name": "conversion_custom_order_quantity_engagement", "comment": null}, "conversion_custom_order_quantity_view": {"type": "integer", "index": 15, "name": "conversion_custom_order_quantity_view", "comment": null}, "conversion_custom_post_engagement": {"type": "integer", "index": 16, "name": "conversion_custom_post_engagement", "comment": null}, "conversion_custom_post_view": {"type": "integer", "index": 17, "name": "conversion_custom_post_view", "comment": null}, "conversion_custom_sale_amount": {"type": "integer", "index": 18, "name": "conversion_custom_sale_amount", "comment": null}, "conversion_custom_sale_amount_engagement": {"type": "integer", "index": 19, "name": "conversion_custom_sale_amount_engagement", "comment": null}, "conversion_custom_sale_amount_view": {"type": "integer", "index": 20, "name": "conversion_custom_sale_amount_view", "comment": null}, "conversion_downloads_metric": {"type": "integer", "index": 21, "name": "conversion_downloads_metric", "comment": null}, "conversion_downloads_order_quantity": {"type": "integer", "index": 22, "name": "conversion_downloads_order_quantity", "comment": null}, "conversion_downloads_order_quantity_engagement": {"type": "integer", "index": 23, "name": "conversion_downloads_order_quantity_engagement", "comment": null}, "conversion_downloads_order_quantity_view": {"type": "integer", "index": 24, "name": "conversion_downloads_order_quantity_view", "comment": null}, "conversion_downloads_post_engagement": {"type": "integer", "index": 25, "name": "conversion_downloads_post_engagement", "comment": null}, "conversion_downloads_post_view": {"type": "integer", "index": 26, "name": "conversion_downloads_post_view", "comment": null}, "conversion_downloads_sale_amount": {"type": "integer", "index": 27, "name": "conversion_downloads_sale_amount", "comment": null}, "conversion_downloads_sale_amount_engagement": {"type": "integer", "index": 28, "name": "conversion_downloads_sale_amount_engagement", "comment": null}, "conversion_downloads_sale_amount_view": {"type": "integer", "index": 29, "name": "conversion_downloads_sale_amount_view", "comment": null}, "conversion_purchases_assisted": {"type": "integer", "index": 30, "name": "conversion_purchases_assisted", "comment": null}, "conversion_purchases_metric": {"type": "integer", "index": 31, "name": "conversion_purchases_metric", "comment": null}, "conversion_purchases_order_quantity": {"type": "integer", "index": 32, "name": "conversion_purchases_order_quantity", "comment": null}, "conversion_purchases_order_quantity_engagement": {"type": "integer", "index": 33, "name": "conversion_purchases_order_quantity_engagement", "comment": null}, "conversion_purchases_order_quantity_view": {"type": "integer", "index": 34, "name": "conversion_purchases_order_quantity_view", "comment": null}, "conversion_purchases_post_engagement": {"type": "integer", "index": 35, "name": "conversion_purchases_post_engagement", "comment": null}, "conversion_purchases_post_view": {"type": "integer", "index": 36, "name": "conversion_purchases_post_view", "comment": null}, "conversion_purchases_sale_amount": {"type": "integer", "index": 37, "name": "conversion_purchases_sale_amount", "comment": null}, "conversion_purchases_sale_amount_engagement": {"type": "integer", "index": 38, "name": "conversion_purchases_sale_amount_engagement", "comment": null}, "conversion_purchases_sale_amount_view": {"type": "integer", "index": 39, "name": "conversion_purchases_sale_amount_view", "comment": null}, "conversion_sign_ups_assisted": {"type": "integer", "index": 40, "name": "conversion_sign_ups_assisted", "comment": null}, "conversion_sign_ups_metric": {"type": "integer", "index": 41, "name": "conversion_sign_ups_metric", "comment": null}, "conversion_sign_ups_order_quantity": {"type": "integer", "index": 42, "name": "conversion_sign_ups_order_quantity", "comment": null}, "conversion_sign_ups_order_quantity_engagement": {"type": "integer", "index": 43, "name": "conversion_sign_ups_order_quantity_engagement", "comment": null}, "conversion_sign_ups_order_quantity_view": {"type": "integer", "index": 44, "name": "conversion_sign_ups_order_quantity_view", "comment": null}, "conversion_sign_ups_post_engagement": {"type": "integer", "index": 45, "name": "conversion_sign_ups_post_engagement", "comment": null}, "conversion_sign_ups_post_view": {"type": "integer", "index": 46, "name": "conversion_sign_ups_post_view", "comment": null}, "conversion_sign_ups_sale_amount": {"type": "integer", "index": 47, "name": "conversion_sign_ups_sale_amount", "comment": null}, "conversion_sign_ups_sale_amount_engagement": {"type": "integer", "index": 48, "name": "conversion_sign_ups_sale_amount_engagement", "comment": null}, "conversion_sign_ups_sale_amount_view": {"type": "integer", "index": 49, "name": "conversion_sign_ups_sale_amount_view", "comment": null}, "conversion_site_visits_metric": {"type": "integer", "index": 50, "name": "conversion_site_visits_metric", "comment": null}, "conversion_site_visits_order_quantity": {"type": "integer", "index": 51, "name": "conversion_site_visits_order_quantity", "comment": null}, "conversion_site_visits_order_quantity_engagement": {"type": "integer", "index": 52, "name": "conversion_site_visits_order_quantity_engagement", "comment": null}, "conversion_site_visits_order_quantity_view": {"type": "integer", "index": 53, "name": "conversion_site_visits_order_quantity_view", "comment": null}, "conversion_site_visits_post_engagement": {"type": "integer", "index": 54, "name": "conversion_site_visits_post_engagement", "comment": null}, "conversion_site_visits_post_view": {"type": "integer", "index": 55, "name": "conversion_site_visits_post_view", "comment": null}, "conversion_site_visits_sale_amount": {"type": "integer", "index": 56, "name": "conversion_site_visits_sale_amount", "comment": null}, "conversion_site_visits_sale_amount_engagement": {"type": "integer", "index": 57, "name": "conversion_site_visits_sale_amount_engagement", "comment": null}, "conversion_site_visits_sale_amount_view": {"type": "integer", "index": 58, "name": "conversion_site_visits_sale_amount_view", "comment": null}, "engagements": {"type": "integer", "index": 59, "name": "engagements", "comment": null}, "follows": {"type": "integer", "index": 60, "name": "follows", "comment": null}, "impressions": {"type": "integer", "index": 61, "name": "impressions", "comment": null}, "likes": {"type": "integer", "index": 62, "name": "likes", "comment": null}, "media_engagements": {"type": "integer", "index": 63, "name": "media_engagements", "comment": null}, "media_views": {"type": "integer", "index": 64, "name": "media_views", "comment": null}, "mobile_conversion_achievements_unlocked_assisted": {"type": "integer", "index": 65, "name": "mobile_conversion_achievements_unlocked_assisted", "comment": null}, "mobile_conversion_achievements_unlocked_order_quantity": {"type": "integer", "index": 66, "name": "mobile_conversion_achievements_unlocked_order_quantity", "comment": null}, "mobile_conversion_achievements_unlocked_post_engagement": {"type": "integer", "index": 67, "name": "mobile_conversion_achievements_unlocked_post_engagement", "comment": null}, "mobile_conversion_achievements_unlocked_post_view": {"type": "integer", "index": 68, "name": "mobile_conversion_achievements_unlocked_post_view", "comment": null}, "mobile_conversion_achievements_unlocked_sale_amount": {"type": "integer", "index": 69, "name": "mobile_conversion_achievements_unlocked_sale_amount", "comment": null}, "mobile_conversion_add_to_carts_assisted": {"type": "integer", "index": 70, "name": "mobile_conversion_add_to_carts_assisted", "comment": null}, "mobile_conversion_add_to_carts_order_quantity": {"type": "integer", "index": 71, "name": "mobile_conversion_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_add_to_carts_post_engagement": {"type": "integer", "index": 72, "name": "mobile_conversion_add_to_carts_post_engagement", "comment": null}, "mobile_conversion_add_to_carts_post_view": {"type": "integer", "index": 73, "name": "mobile_conversion_add_to_carts_post_view", "comment": null}, "mobile_conversion_add_to_carts_sale_amount": {"type": "integer", "index": 74, "name": "mobile_conversion_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_add_to_wishlists_assisted": {"type": "integer", "index": 75, "name": "mobile_conversion_add_to_wishlists_assisted", "comment": null}, "mobile_conversion_add_to_wishlists_order_quantity": {"type": "integer", "index": 76, "name": "mobile_conversion_add_to_wishlists_order_quantity", "comment": null}, "mobile_conversion_add_to_wishlists_post_engagement": {"type": "integer", "index": 77, "name": "mobile_conversion_add_to_wishlists_post_engagement", "comment": null}, "mobile_conversion_add_to_wishlists_post_view": {"type": "integer", "index": 78, "name": "mobile_conversion_add_to_wishlists_post_view", "comment": null}, "mobile_conversion_add_to_wishlists_sale_amount": {"type": "integer", "index": 79, "name": "mobile_conversion_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_checkouts_initiated_assisted": {"type": "integer", "index": 80, "name": "mobile_conversion_checkouts_initiated_assisted", "comment": null}, "mobile_conversion_checkouts_initiated_order_quantity": {"type": "integer", "index": 81, "name": "mobile_conversion_checkouts_initiated_order_quantity", "comment": null}, "mobile_conversion_checkouts_initiated_post_engagement": {"type": "integer", "index": 82, "name": "mobile_conversion_checkouts_initiated_post_engagement", "comment": null}, "mobile_conversion_checkouts_initiated_post_view": {"type": "integer", "index": 83, "name": "mobile_conversion_checkouts_initiated_post_view", "comment": null}, "mobile_conversion_checkouts_initiated_sale_amount": {"type": "integer", "index": 84, "name": "mobile_conversion_checkouts_initiated_sale_amount", "comment": null}, "mobile_conversion_content_views_assisted": {"type": "integer", "index": 85, "name": "mobile_conversion_content_views_assisted", "comment": null}, "mobile_conversion_content_views_order_quantity": {"type": "integer", "index": 86, "name": "mobile_conversion_content_views_order_quantity", "comment": null}, "mobile_conversion_content_views_post_engagement": {"type": "integer", "index": 87, "name": "mobile_conversion_content_views_post_engagement", "comment": null}, "mobile_conversion_content_views_post_view": {"type": "integer", "index": 88, "name": "mobile_conversion_content_views_post_view", "comment": null}, "mobile_conversion_content_views_sale_amount": {"type": "integer", "index": 89, "name": "mobile_conversion_content_views_sale_amount", "comment": null}, "mobile_conversion_downloads_order_quantity": {"type": "integer", "index": 90, "name": "mobile_conversion_downloads_order_quantity", "comment": null}, "mobile_conversion_downloads_post_engagement": {"type": "integer", "index": 91, "name": "mobile_conversion_downloads_post_engagement", "comment": null}, "mobile_conversion_downloads_post_view": {"type": "integer", "index": 92, "name": "mobile_conversion_downloads_post_view", "comment": null}, "mobile_conversion_downloads_sale_amount": {"type": "integer", "index": 93, "name": "mobile_conversion_downloads_sale_amount", "comment": null}, "mobile_conversion_installs_assisted": {"type": "integer", "index": 94, "name": "mobile_conversion_installs_assisted", "comment": null}, "mobile_conversion_installs_order_quantity": {"type": "integer", "index": 95, "name": "mobile_conversion_installs_order_quantity", "comment": null}, "mobile_conversion_installs_post_engagement": {"type": "integer", "index": 96, "name": "mobile_conversion_installs_post_engagement", "comment": null}, "mobile_conversion_installs_post_view": {"type": "integer", "index": 97, "name": "mobile_conversion_installs_post_view", "comment": null}, "mobile_conversion_installs_sale_amount": {"type": "integer", "index": 98, "name": "mobile_conversion_installs_sale_amount", "comment": null}, "mobile_conversion_invites_assisted": {"type": "integer", "index": 99, "name": "mobile_conversion_invites_assisted", "comment": null}, "mobile_conversion_invites_order_quantity": {"type": "integer", "index": 100, "name": "mobile_conversion_invites_order_quantity", "comment": null}, "mobile_conversion_invites_post_engagement": {"type": "integer", "index": 101, "name": "mobile_conversion_invites_post_engagement", "comment": null}, "mobile_conversion_invites_post_view": {"type": "integer", "index": 102, "name": "mobile_conversion_invites_post_view", "comment": null}, "mobile_conversion_invites_sale_amount": {"type": "integer", "index": 103, "name": "mobile_conversion_invites_sale_amount", "comment": null}, "mobile_conversion_key_page_views_post_engagement": {"type": "integer", "index": 104, "name": "mobile_conversion_key_page_views_post_engagement", "comment": null}, "mobile_conversion_key_page_views_post_view": {"type": "integer", "index": 105, "name": "mobile_conversion_key_page_views_post_view", "comment": null}, "mobile_conversion_levels_achieved_assisted": {"type": "integer", "index": 106, "name": "mobile_conversion_levels_achieved_assisted", "comment": null}, "mobile_conversion_levels_achieved_order_quantity": {"type": "integer", "index": 107, "name": "mobile_conversion_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_levels_achieved_post_engagement": {"type": "integer", "index": 108, "name": "mobile_conversion_levels_achieved_post_engagement", "comment": null}, "mobile_conversion_levels_achieved_post_view": {"type": "integer", "index": 109, "name": "mobile_conversion_levels_achieved_post_view", "comment": null}, "mobile_conversion_levels_achieved_sale_amount": {"type": "integer", "index": 110, "name": "mobile_conversion_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_metric": {"type": "integer", "index": 111, "name": "mobile_conversion_lifetime_value_achievements_unlocked_metric", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_order_qu": {"type": "integer", "index": 112, "name": "mobile_conversion_lifetime_value_achievements_unlocked_order_qu", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo": {"type": "integer", "index": 113, "name": "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_metric": {"type": "integer", "index": 114, "name": "mobile_conversion_lifetime_value_add_to_carts_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_order_quantity": {"type": "integer", "index": 115, "name": "mobile_conversion_lifetime_value_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_sale_amount": {"type": "integer", "index": 116, "name": "mobile_conversion_lifetime_value_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_metric": {"type": "integer", "index": 117, "name": "mobile_conversion_lifetime_value_add_to_wishlists_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit": {"type": "integer", "index": 118, "name": "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount": {"type": "integer", "index": 119, "name": "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_metric": {"type": "integer", "index": 120, "name": "mobile_conversion_lifetime_value_checkouts_initiated_metric", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_order_quan": {"type": "integer", "index": 121, "name": "mobile_conversion_lifetime_value_checkouts_initiated_order_quan", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun": {"type": "integer", "index": 122, "name": "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_content_views_metric": {"type": "integer", "index": 123, "name": "mobile_conversion_lifetime_value_content_views_metric", "comment": null}, "mobile_conversion_lifetime_value_content_views_order_quantity": {"type": "integer", "index": 124, "name": "mobile_conversion_lifetime_value_content_views_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_content_views_sale_amount": {"type": "integer", "index": 125, "name": "mobile_conversion_lifetime_value_content_views_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_invites_metric": {"type": "integer", "index": 126, "name": "mobile_conversion_lifetime_value_invites_metric", "comment": null}, "mobile_conversion_lifetime_value_invites_order_quantity": {"type": "integer", "index": 127, "name": "mobile_conversion_lifetime_value_invites_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_invites_sale_amount": {"type": "integer", "index": 128, "name": "mobile_conversion_lifetime_value_invites_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_metric": {"type": "integer", "index": 129, "name": "mobile_conversion_lifetime_value_levels_achieved_metric", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_order_quantity": {"type": "integer", "index": 130, "name": "mobile_conversion_lifetime_value_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_sale_amount": {"type": "integer", "index": 131, "name": "mobile_conversion_lifetime_value_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_logins_metric": {"type": "integer", "index": 132, "name": "mobile_conversion_lifetime_value_logins_metric", "comment": null}, "mobile_conversion_lifetime_value_logins_order_quantity": {"type": "integer", "index": 133, "name": "mobile_conversion_lifetime_value_logins_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_logins_sale_amount": {"type": "integer", "index": 134, "name": "mobile_conversion_lifetime_value_logins_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_metric": {"type": "integer", "index": 135, "name": "mobile_conversion_lifetime_value_payment_info_additions_metric", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_order_q": {"type": "integer", "index": 136, "name": "mobile_conversion_lifetime_value_payment_info_additions_order_q", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_sale_am": {"type": "integer", "index": 137, "name": "mobile_conversion_lifetime_value_payment_info_additions_sale_am", "comment": null}, "mobile_conversion_lifetime_value_purchases_metric": {"type": "integer", "index": 138, "name": "mobile_conversion_lifetime_value_purchases_metric", "comment": null}, "mobile_conversion_lifetime_value_purchases_order_quantity": {"type": "integer", "index": 139, "name": "mobile_conversion_lifetime_value_purchases_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_purchases_sale_amount": {"type": "integer", "index": 140, "name": "mobile_conversion_lifetime_value_purchases_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_rates_metric": {"type": "integer", "index": 141, "name": "mobile_conversion_lifetime_value_rates_metric", "comment": null}, "mobile_conversion_lifetime_value_rates_order_quantity": {"type": "integer", "index": 142, "name": "mobile_conversion_lifetime_value_rates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_rates_sale_amount": {"type": "integer", "index": 143, "name": "mobile_conversion_lifetime_value_rates_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_reservations_metric": {"type": "integer", "index": 144, "name": "mobile_conversion_lifetime_value_reservations_metric", "comment": null}, "mobile_conversion_lifetime_value_reservations_order_quantity": {"type": "integer", "index": 145, "name": "mobile_conversion_lifetime_value_reservations_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_reservations_sale_amount": {"type": "integer", "index": 146, "name": "mobile_conversion_lifetime_value_reservations_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_searches_metric": {"type": "integer", "index": 147, "name": "mobile_conversion_lifetime_value_searches_metric", "comment": null}, "mobile_conversion_lifetime_value_searches_order_quantity": {"type": "integer", "index": 148, "name": "mobile_conversion_lifetime_value_searches_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_searches_sale_amount": {"type": "integer", "index": 149, "name": "mobile_conversion_lifetime_value_searches_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_shares_metric": {"type": "integer", "index": 150, "name": "mobile_conversion_lifetime_value_shares_metric", "comment": null}, "mobile_conversion_lifetime_value_shares_order_quantity": {"type": "integer", "index": 151, "name": "mobile_conversion_lifetime_value_shares_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_shares_sale_amount": {"type": "integer", "index": 152, "name": "mobile_conversion_lifetime_value_shares_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_metric": {"type": "integer", "index": 153, "name": "mobile_conversion_lifetime_value_sign_ups_metric", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_order_quantity": {"type": "integer", "index": 154, "name": "mobile_conversion_lifetime_value_sign_ups_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_sale_amount": {"type": "integer", "index": 155, "name": "mobile_conversion_lifetime_value_sign_ups_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_metric": {"type": "integer", "index": 156, "name": "mobile_conversion_lifetime_value_spent_credits_metric", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_order_quantity": {"type": "integer", "index": 157, "name": "mobile_conversion_lifetime_value_spent_credits_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_sale_amount": {"type": "integer", "index": 158, "name": "mobile_conversion_lifetime_value_spent_credits_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_metric": {"type": "integer", "index": 159, "name": "mobile_conversion_lifetime_value_tutorials_completed_metric", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_order_quan": {"type": "integer", "index": 160, "name": "mobile_conversion_lifetime_value_tutorials_completed_order_quan", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun": {"type": "integer", "index": 161, "name": "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_updates_metric": {"type": "integer", "index": 162, "name": "mobile_conversion_lifetime_value_updates_metric", "comment": null}, "mobile_conversion_lifetime_value_updates_order_quantity": {"type": "integer", "index": 163, "name": "mobile_conversion_lifetime_value_updates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_updates_sale_amount": {"type": "integer", "index": 164, "name": "mobile_conversion_lifetime_value_updates_sale_amount", "comment": null}, "mobile_conversion_logins_assisted": {"type": "integer", "index": 165, "name": "mobile_conversion_logins_assisted", "comment": null}, "mobile_conversion_logins_order_quantity": {"type": "integer", "index": 166, "name": "mobile_conversion_logins_order_quantity", "comment": null}, "mobile_conversion_logins_post_engagement": {"type": "integer", "index": 167, "name": "mobile_conversion_logins_post_engagement", "comment": null}, "mobile_conversion_logins_post_view": {"type": "integer", "index": 168, "name": "mobile_conversion_logins_post_view", "comment": null}, "mobile_conversion_logins_sale_amount": {"type": "integer", "index": 169, "name": "mobile_conversion_logins_sale_amount", "comment": null}, "mobile_conversion_payment_info_additions_assisted": {"type": "integer", "index": 170, "name": "mobile_conversion_payment_info_additions_assisted", "comment": null}, "mobile_conversion_payment_info_additions_order_quantity": {"type": "integer", "index": 171, "name": "mobile_conversion_payment_info_additions_order_quantity", "comment": null}, "mobile_conversion_payment_info_additions_post_engagement": {"type": "integer", "index": 172, "name": "mobile_conversion_payment_info_additions_post_engagement", "comment": null}, "mobile_conversion_payment_info_additions_post_view": {"type": "integer", "index": 173, "name": "mobile_conversion_payment_info_additions_post_view", "comment": null}, "mobile_conversion_payment_info_additions_sale_amount": {"type": "integer", "index": 174, "name": "mobile_conversion_payment_info_additions_sale_amount", "comment": null}, "mobile_conversion_purchases_assisted": {"type": "integer", "index": 175, "name": "mobile_conversion_purchases_assisted", "comment": null}, "mobile_conversion_purchases_order_quantity": {"type": "integer", "index": 176, "name": "mobile_conversion_purchases_order_quantity", "comment": null}, "mobile_conversion_purchases_post_engagement": {"type": "integer", "index": 177, "name": "mobile_conversion_purchases_post_engagement", "comment": null}, "mobile_conversion_purchases_post_view": {"type": "integer", "index": 178, "name": "mobile_conversion_purchases_post_view", "comment": null}, "mobile_conversion_purchases_sale_amount": {"type": "integer", "index": 179, "name": "mobile_conversion_purchases_sale_amount", "comment": null}, "mobile_conversion_rates_assisted": {"type": "integer", "index": 180, "name": "mobile_conversion_rates_assisted", "comment": null}, "mobile_conversion_rates_order_quantity": {"type": "integer", "index": 181, "name": "mobile_conversion_rates_order_quantity", "comment": null}, "mobile_conversion_rates_post_engagement": {"type": "integer", "index": 182, "name": "mobile_conversion_rates_post_engagement", "comment": null}, "mobile_conversion_rates_post_view": {"type": "integer", "index": 183, "name": "mobile_conversion_rates_post_view", "comment": null}, "mobile_conversion_rates_sale_amount": {"type": "integer", "index": 184, "name": "mobile_conversion_rates_sale_amount", "comment": null}, "mobile_conversion_re_engages_assisted": {"type": "integer", "index": 185, "name": "mobile_conversion_re_engages_assisted", "comment": null}, "mobile_conversion_re_engages_order_quantity": {"type": "integer", "index": 186, "name": "mobile_conversion_re_engages_order_quantity", "comment": null}, "mobile_conversion_re_engages_post_engagement": {"type": "integer", "index": 187, "name": "mobile_conversion_re_engages_post_engagement", "comment": null}, "mobile_conversion_re_engages_post_view": {"type": "integer", "index": 188, "name": "mobile_conversion_re_engages_post_view", "comment": null}, "mobile_conversion_re_engages_sale_amount": {"type": "integer", "index": 189, "name": "mobile_conversion_re_engages_sale_amount", "comment": null}, "mobile_conversion_reservations_assisted": {"type": "integer", "index": 190, "name": "mobile_conversion_reservations_assisted", "comment": null}, "mobile_conversion_reservations_order_quantity": {"type": "integer", "index": 191, "name": "mobile_conversion_reservations_order_quantity", "comment": null}, "mobile_conversion_reservations_post_engagement": {"type": "integer", "index": 192, "name": "mobile_conversion_reservations_post_engagement", "comment": null}, "mobile_conversion_reservations_post_view": {"type": "integer", "index": 193, "name": "mobile_conversion_reservations_post_view", "comment": null}, "mobile_conversion_reservations_sale_amount": {"type": "integer", "index": 194, "name": "mobile_conversion_reservations_sale_amount", "comment": null}, "mobile_conversion_searches_assisted": {"type": "integer", "index": 195, "name": "mobile_conversion_searches_assisted", "comment": null}, "mobile_conversion_searches_order_quantity": {"type": "integer", "index": 196, "name": "mobile_conversion_searches_order_quantity", "comment": null}, "mobile_conversion_searches_post_engagement": {"type": "integer", "index": 197, "name": "mobile_conversion_searches_post_engagement", "comment": null}, "mobile_conversion_searches_post_view": {"type": "integer", "index": 198, "name": "mobile_conversion_searches_post_view", "comment": null}, "mobile_conversion_searches_sale_amount": {"type": "integer", "index": 199, "name": "mobile_conversion_searches_sale_amount", "comment": null}, "mobile_conversion_shares_assisted": {"type": "integer", "index": 200, "name": "mobile_conversion_shares_assisted", "comment": null}, "mobile_conversion_shares_order_quantity": {"type": "integer", "index": 201, "name": "mobile_conversion_shares_order_quantity", "comment": null}, "mobile_conversion_shares_post_engagement": {"type": "integer", "index": 202, "name": "mobile_conversion_shares_post_engagement", "comment": null}, "mobile_conversion_shares_post_view": {"type": "integer", "index": 203, "name": "mobile_conversion_shares_post_view", "comment": null}, "mobile_conversion_shares_sale_amount": {"type": "integer", "index": 204, "name": "mobile_conversion_shares_sale_amount", "comment": null}, "mobile_conversion_sign_ups_assisted": {"type": "integer", "index": 205, "name": "mobile_conversion_sign_ups_assisted", "comment": null}, "mobile_conversion_sign_ups_order_quantity": {"type": "integer", "index": 206, "name": "mobile_conversion_sign_ups_order_quantity", "comment": null}, "mobile_conversion_sign_ups_post_engagement": {"type": "integer", "index": 207, "name": "mobile_conversion_sign_ups_post_engagement", "comment": null}, "mobile_conversion_sign_ups_post_view": {"type": "integer", "index": 208, "name": "mobile_conversion_sign_ups_post_view", "comment": null}, "mobile_conversion_sign_ups_sale_amount": {"type": "integer", "index": 209, "name": "mobile_conversion_sign_ups_sale_amount", "comment": null}, "mobile_conversion_site_visits_order_quantity": {"type": "integer", "index": 210, "name": "mobile_conversion_site_visits_order_quantity", "comment": null}, "mobile_conversion_site_visits_post_engagement": {"type": "integer", "index": 211, "name": "mobile_conversion_site_visits_post_engagement", "comment": null}, "mobile_conversion_site_visits_post_view": {"type": "integer", "index": 212, "name": "mobile_conversion_site_visits_post_view", "comment": null}, "mobile_conversion_site_visits_sale_amount": {"type": "integer", "index": 213, "name": "mobile_conversion_site_visits_sale_amount", "comment": null}, "mobile_conversion_spent_credits_assisted": {"type": "integer", "index": 214, "name": "mobile_conversion_spent_credits_assisted", "comment": null}, "mobile_conversion_spent_credits_order_quantity": {"type": "integer", "index": 215, "name": "mobile_conversion_spent_credits_order_quantity", "comment": null}, "mobile_conversion_spent_credits_post_engagement": {"type": "integer", "index": 216, "name": "mobile_conversion_spent_credits_post_engagement", "comment": null}, "mobile_conversion_spent_credits_post_view": {"type": "integer", "index": 217, "name": "mobile_conversion_spent_credits_post_view", "comment": null}, "mobile_conversion_spent_credits_sale_amount": {"type": "integer", "index": 218, "name": "mobile_conversion_spent_credits_sale_amount", "comment": null}, "mobile_conversion_tutorials_completed_assisted": {"type": "integer", "index": 219, "name": "mobile_conversion_tutorials_completed_assisted", "comment": null}, "mobile_conversion_tutorials_completed_order_quantity": {"type": "integer", "index": 220, "name": "mobile_conversion_tutorials_completed_order_quantity", "comment": null}, "mobile_conversion_tutorials_completed_post_engagement": {"type": "integer", "index": 221, "name": "mobile_conversion_tutorials_completed_post_engagement", "comment": null}, "mobile_conversion_tutorials_completed_post_view": {"type": "integer", "index": 222, "name": "mobile_conversion_tutorials_completed_post_view", "comment": null}, "mobile_conversion_tutorials_completed_sale_amount": {"type": "integer", "index": 223, "name": "mobile_conversion_tutorials_completed_sale_amount", "comment": null}, "mobile_conversion_updates_assisted": {"type": "integer", "index": 224, "name": "mobile_conversion_updates_assisted", "comment": null}, "mobile_conversion_updates_order_quantity": {"type": "integer", "index": 225, "name": "mobile_conversion_updates_order_quantity", "comment": null}, "mobile_conversion_updates_post_engagement": {"type": "integer", "index": 226, "name": "mobile_conversion_updates_post_engagement", "comment": null}, "mobile_conversion_updates_post_view": {"type": "integer", "index": 227, "name": "mobile_conversion_updates_post_view", "comment": null}, "mobile_conversion_updates_sale_amount": {"type": "integer", "index": 228, "name": "mobile_conversion_updates_sale_amount", "comment": null}, "poll_card_vote": {"type": "integer", "index": 229, "name": "poll_card_vote", "comment": null}, "qualified_impressions": {"type": "integer", "index": 230, "name": "qualified_impressions", "comment": null}, "replies": {"type": "integer", "index": 231, "name": "replies", "comment": null}, "retweets": {"type": "integer", "index": 232, "name": "retweets", "comment": null}, "tweets_send": {"type": "integer", "index": 233, "name": "tweets_send", "comment": null}, "unfollows": {"type": "integer", "index": 234, "name": "unfollows", "comment": null}, "url_clicks": {"type": "integer", "index": 235, "name": "url_clicks", "comment": null}, "video_3_s_100_pct_views": {"type": "integer", "index": 236, "name": "video_3_s_100_pct_views", "comment": null}, "video_6_s_views": {"type": "integer", "index": 237, "name": "video_6_s_views", "comment": null}, "video_content_starts": {"type": "integer", "index": 238, "name": "video_content_starts", "comment": null}, "video_cta_clicks": {"type": "integer", "index": 239, "name": "video_cta_clicks", "comment": null}, "video_mrc_views": {"type": "integer", "index": 240, "name": "video_mrc_views", "comment": null}, "video_total_views": {"type": "integer", "index": 241, "name": "video_total_views", "comment": null}, "video_views_100": {"type": "integer", "index": 242, "name": "video_views_100", "comment": null}, "video_views_25": {"type": "integer", "index": 243, "name": "video_views_25", "comment": null}, "video_views_50": {"type": "integer", "index": 244, "name": "video_views_50", "comment": null}, "video_views_75": {"type": "integer", "index": 245, "name": "video_views_75", "comment": null}, "mobile_conversion_installs_skan_post_engagement": {"type": "integer", "index": 246, "name": "mobile_conversion_installs_skan_post_engagement", "comment": null}, "mobile_conversion_installs_skan_post_view": {"type": "integer", "index": 247, "name": "mobile_conversion_installs_skan_post_view", "comment": null}, "mobile_conversion_purchases_skan_post_engagement": {"type": "integer", "index": 248, "name": "mobile_conversion_purchases_skan_post_engagement", "comment": null}, "mobile_conversion_purchases_skan_post_view": {"type": "integer", "index": 249, "name": "mobile_conversion_purchases_skan_post_view", "comment": null}, "video_15_s_views": {"type": "integer", "index": 250, "name": "video_15_s_views", "comment": null}, "auto_created_conversion_landing_page_view": {"type": "integer", "index": 251, "name": "auto_created_conversion_landing_page_view", "comment": null}, "auto_created_conversion_session": {"type": "integer", "index": 252, "name": "auto_created_conversion_session", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.twitter_ads.twitter_ads.campaign_report"}, "source.twitter_ads.twitter_ads.line_item_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_line_item_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"advertiser_domain": {"type": "text", "index": 1, "name": "advertiser_domain", "comment": null}, "advertiser_user_id": {"type": "integer", "index": 2, "name": "advertiser_user_id", "comment": null}, "automatically_select_bid": {"type": "boolean", "index": 3, "name": "automatically_select_bid", "comment": null}, "bid_amount_local_micro": {"type": "integer", "index": 4, "name": "bid_amount_local_micro", "comment": null}, "bid_type": {"type": "text", "index": 5, "name": "bid_type", "comment": null}, "bid_unit": {"type": "text", "index": 6, "name": "bid_unit", "comment": null}, "campaign_id": {"type": "text", "index": 7, "name": "campaign_id", "comment": null}, "charge_by": {"type": "text", "index": 8, "name": "charge_by", "comment": null}, "created_at": {"type": "text", "index": 9, "name": "created_at", "comment": null}, "creative_source": {"type": "text", "index": 10, "name": "creative_source", "comment": null}, "currency": {"type": "text", "index": 11, "name": "currency", "comment": null}, "deleted": {"type": "boolean", "index": 12, "name": "deleted", "comment": null}, "end_time": {"type": "integer", "index": 13, "name": "end_time", "comment": null}, "entity_status": {"type": "text", "index": 14, "name": "entity_status", "comment": null}, "id": {"type": "text", "index": 15, "name": "id", "comment": null}, "name": {"type": "text", "index": 16, "name": "name", "comment": null}, "objective": {"type": "text", "index": 17, "name": "objective", "comment": null}, "optimization": {"type": "text", "index": 18, "name": "optimization", "comment": null}, "primary_web_event_tag": {"type": "integer", "index": 19, "name": "primary_web_event_tag", "comment": null}, "product_type": {"type": "text", "index": 20, "name": "product_type", "comment": null}, "start_time": {"type": "integer", "index": 21, "name": "start_time", "comment": null}, "target_cpa_local_micro": {"type": "integer", "index": 22, "name": "target_cpa_local_micro", "comment": null}, "total_budget_amount_local_micro": {"type": "integer", "index": 23, "name": "total_budget_amount_local_micro", "comment": null}, "updated_at": {"type": "text", "index": 24, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.twitter_ads.twitter_ads.line_item_history"}, "source.twitter_ads.twitter_ads.line_item_keywords_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_line_item_keywords_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "text", "index": 1, "name": "account_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "line_item_id": {"type": "text", "index": 3, "name": "line_item_id", "comment": null}, "placement": {"type": "text", "index": 4, "name": "placement", "comment": null}, "segment": {"type": "text", "index": 5, "name": "segment", "comment": null}, "_fivetran_synced": {"type": "text", "index": 6, "name": "_fivetran_synced", "comment": null}, "app_clicks": {"type": "integer", "index": 7, "name": "app_clicks", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 8, "name": "billed_charge_local_micro", "comment": null}, "billed_engagements": {"type": "integer", "index": 9, "name": "billed_engagements", "comment": null}, "card_engagements": {"type": "integer", "index": 10, "name": "card_engagements", "comment": null}, "carousel_swipes": {"type": "integer", "index": 11, "name": "carousel_swipes", "comment": null}, "clicks": {"type": "integer", "index": 12, "name": "clicks", "comment": null}, "conversion_custom_metric": {"type": "integer", "index": 13, "name": "conversion_custom_metric", "comment": null}, "conversion_custom_order_quantity": {"type": "integer", "index": 14, "name": "conversion_custom_order_quantity", "comment": null}, "conversion_custom_order_quantity_engagement": {"type": "integer", "index": 15, "name": "conversion_custom_order_quantity_engagement", "comment": null}, "conversion_custom_order_quantity_view": {"type": "integer", "index": 16, "name": "conversion_custom_order_quantity_view", "comment": null}, "conversion_custom_post_engagement": {"type": "integer", "index": 17, "name": "conversion_custom_post_engagement", "comment": null}, "conversion_custom_post_view": {"type": "integer", "index": 18, "name": "conversion_custom_post_view", "comment": null}, "conversion_custom_sale_amount": {"type": "integer", "index": 19, "name": "conversion_custom_sale_amount", "comment": null}, "conversion_custom_sale_amount_engagement": {"type": "integer", "index": 20, "name": "conversion_custom_sale_amount_engagement", "comment": null}, "conversion_custom_sale_amount_view": {"type": "integer", "index": 21, "name": "conversion_custom_sale_amount_view", "comment": null}, "conversion_downloads_metric": {"type": "integer", "index": 22, "name": "conversion_downloads_metric", "comment": null}, "conversion_downloads_order_quantity": {"type": "integer", "index": 23, "name": "conversion_downloads_order_quantity", "comment": null}, "conversion_downloads_order_quantity_engagement": {"type": "integer", "index": 24, "name": "conversion_downloads_order_quantity_engagement", "comment": null}, "conversion_downloads_order_quantity_view": {"type": "integer", "index": 25, "name": "conversion_downloads_order_quantity_view", "comment": null}, "conversion_downloads_post_engagement": {"type": "integer", "index": 26, "name": "conversion_downloads_post_engagement", "comment": null}, "conversion_downloads_post_view": {"type": "integer", "index": 27, "name": "conversion_downloads_post_view", "comment": null}, "conversion_downloads_sale_amount": {"type": "integer", "index": 28, "name": "conversion_downloads_sale_amount", "comment": null}, "conversion_downloads_sale_amount_engagement": {"type": "integer", "index": 29, "name": "conversion_downloads_sale_amount_engagement", "comment": null}, "conversion_downloads_sale_amount_view": {"type": "integer", "index": 30, "name": "conversion_downloads_sale_amount_view", "comment": null}, "conversion_purchases_assisted": {"type": "integer", "index": 31, "name": "conversion_purchases_assisted", "comment": null}, "conversion_purchases_metric": {"type": "integer", "index": 32, "name": "conversion_purchases_metric", "comment": null}, "conversion_purchases_order_quantity": {"type": "integer", "index": 33, "name": "conversion_purchases_order_quantity", "comment": null}, "conversion_purchases_order_quantity_engagement": {"type": "integer", "index": 34, "name": "conversion_purchases_order_quantity_engagement", "comment": null}, "conversion_purchases_order_quantity_view": {"type": "integer", "index": 35, "name": "conversion_purchases_order_quantity_view", "comment": null}, "conversion_purchases_post_engagement": {"type": "integer", "index": 36, "name": "conversion_purchases_post_engagement", "comment": null}, "conversion_purchases_post_view": {"type": "integer", "index": 37, "name": "conversion_purchases_post_view", "comment": null}, "conversion_purchases_sale_amount": {"type": "integer", "index": 38, "name": "conversion_purchases_sale_amount", "comment": null}, "conversion_purchases_sale_amount_engagement": {"type": "integer", "index": 39, "name": "conversion_purchases_sale_amount_engagement", "comment": null}, "conversion_purchases_sale_amount_view": {"type": "integer", "index": 40, "name": "conversion_purchases_sale_amount_view", "comment": null}, "conversion_sign_ups_assisted": {"type": "integer", "index": 41, "name": "conversion_sign_ups_assisted", "comment": null}, "conversion_sign_ups_metric": {"type": "integer", "index": 42, "name": "conversion_sign_ups_metric", "comment": null}, "conversion_sign_ups_order_quantity": {"type": "integer", "index": 43, "name": "conversion_sign_ups_order_quantity", "comment": null}, "conversion_sign_ups_order_quantity_engagement": {"type": "integer", "index": 44, "name": "conversion_sign_ups_order_quantity_engagement", "comment": null}, "conversion_sign_ups_order_quantity_view": {"type": "integer", "index": 45, "name": "conversion_sign_ups_order_quantity_view", "comment": null}, "conversion_sign_ups_post_engagement": {"type": "integer", "index": 46, "name": "conversion_sign_ups_post_engagement", "comment": null}, "conversion_sign_ups_post_view": {"type": "integer", "index": 47, "name": "conversion_sign_ups_post_view", "comment": null}, "conversion_sign_ups_sale_amount": {"type": "integer", "index": 48, "name": "conversion_sign_ups_sale_amount", "comment": null}, "conversion_sign_ups_sale_amount_engagement": {"type": "integer", "index": 49, "name": "conversion_sign_ups_sale_amount_engagement", "comment": null}, "conversion_sign_ups_sale_amount_view": {"type": "integer", "index": 50, "name": "conversion_sign_ups_sale_amount_view", "comment": null}, "conversion_site_visits_metric": {"type": "integer", "index": 51, "name": "conversion_site_visits_metric", "comment": null}, "conversion_site_visits_order_quantity": {"type": "integer", "index": 52, "name": "conversion_site_visits_order_quantity", "comment": null}, "conversion_site_visits_order_quantity_engagement": {"type": "integer", "index": 53, "name": "conversion_site_visits_order_quantity_engagement", "comment": null}, "conversion_site_visits_order_quantity_view": {"type": "integer", "index": 54, "name": "conversion_site_visits_order_quantity_view", "comment": null}, "conversion_site_visits_post_engagement": {"type": "integer", "index": 55, "name": "conversion_site_visits_post_engagement", "comment": null}, "conversion_site_visits_post_view": {"type": "integer", "index": 56, "name": "conversion_site_visits_post_view", "comment": null}, "conversion_site_visits_sale_amount": {"type": "integer", "index": 57, "name": "conversion_site_visits_sale_amount", "comment": null}, "conversion_site_visits_sale_amount_engagement": {"type": "integer", "index": 58, "name": "conversion_site_visits_sale_amount_engagement", "comment": null}, "conversion_site_visits_sale_amount_view": {"type": "integer", "index": 59, "name": "conversion_site_visits_sale_amount_view", "comment": null}, "engagements": {"type": "integer", "index": 60, "name": "engagements", "comment": null}, "follows": {"type": "integer", "index": 61, "name": "follows", "comment": null}, "impressions": {"type": "integer", "index": 62, "name": "impressions", "comment": null}, "likes": {"type": "integer", "index": 63, "name": "likes", "comment": null}, "media_engagements": {"type": "integer", "index": 64, "name": "media_engagements", "comment": null}, "media_views": {"type": "integer", "index": 65, "name": "media_views", "comment": null}, "mobile_conversion_achievements_unlocked_assisted": {"type": "integer", "index": 66, "name": "mobile_conversion_achievements_unlocked_assisted", "comment": null}, "mobile_conversion_achievements_unlocked_order_quantity": {"type": "integer", "index": 67, "name": "mobile_conversion_achievements_unlocked_order_quantity", "comment": null}, "mobile_conversion_achievements_unlocked_post_engagement": {"type": "integer", "index": 68, "name": "mobile_conversion_achievements_unlocked_post_engagement", "comment": null}, "mobile_conversion_achievements_unlocked_post_view": {"type": "integer", "index": 69, "name": "mobile_conversion_achievements_unlocked_post_view", "comment": null}, "mobile_conversion_achievements_unlocked_sale_amount": {"type": "integer", "index": 70, "name": "mobile_conversion_achievements_unlocked_sale_amount", "comment": null}, "mobile_conversion_add_to_carts_assisted": {"type": "integer", "index": 71, "name": "mobile_conversion_add_to_carts_assisted", "comment": null}, "mobile_conversion_add_to_carts_order_quantity": {"type": "integer", "index": 72, "name": "mobile_conversion_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_add_to_carts_post_engagement": {"type": "integer", "index": 73, "name": "mobile_conversion_add_to_carts_post_engagement", "comment": null}, "mobile_conversion_add_to_carts_post_view": {"type": "integer", "index": 74, "name": "mobile_conversion_add_to_carts_post_view", "comment": null}, "mobile_conversion_add_to_carts_sale_amount": {"type": "integer", "index": 75, "name": "mobile_conversion_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_add_to_wishlists_assisted": {"type": "integer", "index": 76, "name": "mobile_conversion_add_to_wishlists_assisted", "comment": null}, "mobile_conversion_add_to_wishlists_order_quantity": {"type": "integer", "index": 77, "name": "mobile_conversion_add_to_wishlists_order_quantity", "comment": null}, "mobile_conversion_add_to_wishlists_post_engagement": {"type": "integer", "index": 78, "name": "mobile_conversion_add_to_wishlists_post_engagement", "comment": null}, "mobile_conversion_add_to_wishlists_post_view": {"type": "integer", "index": 79, "name": "mobile_conversion_add_to_wishlists_post_view", "comment": null}, "mobile_conversion_add_to_wishlists_sale_amount": {"type": "integer", "index": 80, "name": "mobile_conversion_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_checkouts_initiated_assisted": {"type": "integer", "index": 81, "name": "mobile_conversion_checkouts_initiated_assisted", "comment": null}, "mobile_conversion_checkouts_initiated_order_quantity": {"type": "integer", "index": 82, "name": "mobile_conversion_checkouts_initiated_order_quantity", "comment": null}, "mobile_conversion_checkouts_initiated_post_engagement": {"type": "integer", "index": 83, "name": "mobile_conversion_checkouts_initiated_post_engagement", "comment": null}, "mobile_conversion_checkouts_initiated_post_view": {"type": "integer", "index": 84, "name": "mobile_conversion_checkouts_initiated_post_view", "comment": null}, "mobile_conversion_checkouts_initiated_sale_amount": {"type": "integer", "index": 85, "name": "mobile_conversion_checkouts_initiated_sale_amount", "comment": null}, "mobile_conversion_content_views_assisted": {"type": "integer", "index": 86, "name": "mobile_conversion_content_views_assisted", "comment": null}, "mobile_conversion_content_views_order_quantity": {"type": "integer", "index": 87, "name": "mobile_conversion_content_views_order_quantity", "comment": null}, "mobile_conversion_content_views_post_engagement": {"type": "integer", "index": 88, "name": "mobile_conversion_content_views_post_engagement", "comment": null}, "mobile_conversion_content_views_post_view": {"type": "integer", "index": 89, "name": "mobile_conversion_content_views_post_view", "comment": null}, "mobile_conversion_content_views_sale_amount": {"type": "integer", "index": 90, "name": "mobile_conversion_content_views_sale_amount", "comment": null}, "mobile_conversion_downloads_order_quantity": {"type": "integer", "index": 91, "name": "mobile_conversion_downloads_order_quantity", "comment": null}, "mobile_conversion_downloads_post_engagement": {"type": "integer", "index": 92, "name": "mobile_conversion_downloads_post_engagement", "comment": null}, "mobile_conversion_downloads_post_view": {"type": "integer", "index": 93, "name": "mobile_conversion_downloads_post_view", "comment": null}, "mobile_conversion_downloads_sale_amount": {"type": "integer", "index": 94, "name": "mobile_conversion_downloads_sale_amount", "comment": null}, "mobile_conversion_installs_assisted": {"type": "integer", "index": 95, "name": "mobile_conversion_installs_assisted", "comment": null}, "mobile_conversion_installs_order_quantity": {"type": "integer", "index": 96, "name": "mobile_conversion_installs_order_quantity", "comment": null}, "mobile_conversion_installs_post_engagement": {"type": "integer", "index": 97, "name": "mobile_conversion_installs_post_engagement", "comment": null}, "mobile_conversion_installs_post_view": {"type": "integer", "index": 98, "name": "mobile_conversion_installs_post_view", "comment": null}, "mobile_conversion_installs_sale_amount": {"type": "integer", "index": 99, "name": "mobile_conversion_installs_sale_amount", "comment": null}, "mobile_conversion_installs_skan_post_engagement": {"type": "integer", "index": 100, "name": "mobile_conversion_installs_skan_post_engagement", "comment": null}, "mobile_conversion_installs_skan_post_view": {"type": "integer", "index": 101, "name": "mobile_conversion_installs_skan_post_view", "comment": null}, "mobile_conversion_invites_assisted": {"type": "integer", "index": 102, "name": "mobile_conversion_invites_assisted", "comment": null}, "mobile_conversion_invites_order_quantity": {"type": "integer", "index": 103, "name": "mobile_conversion_invites_order_quantity", "comment": null}, "mobile_conversion_invites_post_engagement": {"type": "integer", "index": 104, "name": "mobile_conversion_invites_post_engagement", "comment": null}, "mobile_conversion_invites_post_view": {"type": "integer", "index": 105, "name": "mobile_conversion_invites_post_view", "comment": null}, "mobile_conversion_invites_sale_amount": {"type": "integer", "index": 106, "name": "mobile_conversion_invites_sale_amount", "comment": null}, "mobile_conversion_key_page_views_post_engagement": {"type": "integer", "index": 107, "name": "mobile_conversion_key_page_views_post_engagement", "comment": null}, "mobile_conversion_key_page_views_post_view": {"type": "integer", "index": 108, "name": "mobile_conversion_key_page_views_post_view", "comment": null}, "mobile_conversion_levels_achieved_assisted": {"type": "integer", "index": 109, "name": "mobile_conversion_levels_achieved_assisted", "comment": null}, "mobile_conversion_levels_achieved_order_quantity": {"type": "integer", "index": 110, "name": "mobile_conversion_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_levels_achieved_post_engagement": {"type": "integer", "index": 111, "name": "mobile_conversion_levels_achieved_post_engagement", "comment": null}, "mobile_conversion_levels_achieved_post_view": {"type": "integer", "index": 112, "name": "mobile_conversion_levels_achieved_post_view", "comment": null}, "mobile_conversion_levels_achieved_sale_amount": {"type": "integer", "index": 113, "name": "mobile_conversion_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_metric": {"type": "integer", "index": 114, "name": "mobile_conversion_lifetime_value_achievements_unlocked_metric", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_order_qu": {"type": "integer", "index": 115, "name": "mobile_conversion_lifetime_value_achievements_unlocked_order_qu", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo": {"type": "integer", "index": 116, "name": "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_metric": {"type": "integer", "index": 117, "name": "mobile_conversion_lifetime_value_add_to_carts_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_order_quantity": {"type": "integer", "index": 118, "name": "mobile_conversion_lifetime_value_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_sale_amount": {"type": "integer", "index": 119, "name": "mobile_conversion_lifetime_value_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_metric": {"type": "integer", "index": 120, "name": "mobile_conversion_lifetime_value_add_to_wishlists_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit": {"type": "integer", "index": 121, "name": "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount": {"type": "integer", "index": 122, "name": "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_metric": {"type": "integer", "index": 123, "name": "mobile_conversion_lifetime_value_checkouts_initiated_metric", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_order_quan": {"type": "integer", "index": 124, "name": "mobile_conversion_lifetime_value_checkouts_initiated_order_quan", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun": {"type": "integer", "index": 125, "name": "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_content_views_metric": {"type": "integer", "index": 126, "name": "mobile_conversion_lifetime_value_content_views_metric", "comment": null}, "mobile_conversion_lifetime_value_content_views_order_quantity": {"type": "integer", "index": 127, "name": "mobile_conversion_lifetime_value_content_views_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_content_views_sale_amount": {"type": "integer", "index": 128, "name": "mobile_conversion_lifetime_value_content_views_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_invites_metric": {"type": "integer", "index": 129, "name": "mobile_conversion_lifetime_value_invites_metric", "comment": null}, "mobile_conversion_lifetime_value_invites_order_quantity": {"type": "integer", "index": 130, "name": "mobile_conversion_lifetime_value_invites_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_invites_sale_amount": {"type": "integer", "index": 131, "name": "mobile_conversion_lifetime_value_invites_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_metric": {"type": "integer", "index": 132, "name": "mobile_conversion_lifetime_value_levels_achieved_metric", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_order_quantity": {"type": "integer", "index": 133, "name": "mobile_conversion_lifetime_value_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_sale_amount": {"type": "integer", "index": 134, "name": "mobile_conversion_lifetime_value_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_logins_metric": {"type": "integer", "index": 135, "name": "mobile_conversion_lifetime_value_logins_metric", "comment": null}, "mobile_conversion_lifetime_value_logins_order_quantity": {"type": "integer", "index": 136, "name": "mobile_conversion_lifetime_value_logins_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_logins_sale_amount": {"type": "integer", "index": 137, "name": "mobile_conversion_lifetime_value_logins_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_metric": {"type": "integer", "index": 138, "name": "mobile_conversion_lifetime_value_payment_info_additions_metric", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_order_q": {"type": "integer", "index": 139, "name": "mobile_conversion_lifetime_value_payment_info_additions_order_q", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_sale_am": {"type": "integer", "index": 140, "name": "mobile_conversion_lifetime_value_payment_info_additions_sale_am", "comment": null}, "mobile_conversion_lifetime_value_purchases_metric": {"type": "integer", "index": 141, "name": "mobile_conversion_lifetime_value_purchases_metric", "comment": null}, "mobile_conversion_lifetime_value_purchases_order_quantity": {"type": "integer", "index": 142, "name": "mobile_conversion_lifetime_value_purchases_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_purchases_sale_amount": {"type": "integer", "index": 143, "name": "mobile_conversion_lifetime_value_purchases_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_rates_metric": {"type": "integer", "index": 144, "name": "mobile_conversion_lifetime_value_rates_metric", "comment": null}, "mobile_conversion_lifetime_value_rates_order_quantity": {"type": "integer", "index": 145, "name": "mobile_conversion_lifetime_value_rates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_rates_sale_amount": {"type": "integer", "index": 146, "name": "mobile_conversion_lifetime_value_rates_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_reservations_metric": {"type": "integer", "index": 147, "name": "mobile_conversion_lifetime_value_reservations_metric", "comment": null}, "mobile_conversion_lifetime_value_reservations_order_quantity": {"type": "integer", "index": 148, "name": "mobile_conversion_lifetime_value_reservations_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_reservations_sale_amount": {"type": "integer", "index": 149, "name": "mobile_conversion_lifetime_value_reservations_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_searches_metric": {"type": "integer", "index": 150, "name": "mobile_conversion_lifetime_value_searches_metric", "comment": null}, "mobile_conversion_lifetime_value_searches_order_quantity": {"type": "integer", "index": 151, "name": "mobile_conversion_lifetime_value_searches_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_searches_sale_amount": {"type": "integer", "index": 152, "name": "mobile_conversion_lifetime_value_searches_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_shares_metric": {"type": "integer", "index": 153, "name": "mobile_conversion_lifetime_value_shares_metric", "comment": null}, "mobile_conversion_lifetime_value_shares_order_quantity": {"type": "integer", "index": 154, "name": "mobile_conversion_lifetime_value_shares_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_shares_sale_amount": {"type": "integer", "index": 155, "name": "mobile_conversion_lifetime_value_shares_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_metric": {"type": "integer", "index": 156, "name": "mobile_conversion_lifetime_value_sign_ups_metric", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_order_quantity": {"type": "integer", "index": 157, "name": "mobile_conversion_lifetime_value_sign_ups_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_sale_amount": {"type": "integer", "index": 158, "name": "mobile_conversion_lifetime_value_sign_ups_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_metric": {"type": "integer", "index": 159, "name": "mobile_conversion_lifetime_value_spent_credits_metric", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_order_quantity": {"type": "integer", "index": 160, "name": "mobile_conversion_lifetime_value_spent_credits_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_sale_amount": {"type": "integer", "index": 161, "name": "mobile_conversion_lifetime_value_spent_credits_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_metric": {"type": "integer", "index": 162, "name": "mobile_conversion_lifetime_value_tutorials_completed_metric", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_order_quan": {"type": "integer", "index": 163, "name": "mobile_conversion_lifetime_value_tutorials_completed_order_quan", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun": {"type": "integer", "index": 164, "name": "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_updates_metric": {"type": "integer", "index": 165, "name": "mobile_conversion_lifetime_value_updates_metric", "comment": null}, "mobile_conversion_lifetime_value_updates_order_quantity": {"type": "integer", "index": 166, "name": "mobile_conversion_lifetime_value_updates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_updates_sale_amount": {"type": "integer", "index": 167, "name": "mobile_conversion_lifetime_value_updates_sale_amount", "comment": null}, "mobile_conversion_logins_assisted": {"type": "integer", "index": 168, "name": "mobile_conversion_logins_assisted", "comment": null}, "mobile_conversion_logins_order_quantity": {"type": "integer", "index": 169, "name": "mobile_conversion_logins_order_quantity", "comment": null}, "mobile_conversion_logins_post_engagement": {"type": "integer", "index": 170, "name": "mobile_conversion_logins_post_engagement", "comment": null}, "mobile_conversion_logins_post_view": {"type": "integer", "index": 171, "name": "mobile_conversion_logins_post_view", "comment": null}, "mobile_conversion_logins_sale_amount": {"type": "integer", "index": 172, "name": "mobile_conversion_logins_sale_amount", "comment": null}, "mobile_conversion_payment_info_additions_assisted": {"type": "integer", "index": 173, "name": "mobile_conversion_payment_info_additions_assisted", "comment": null}, "mobile_conversion_payment_info_additions_order_quantity": {"type": "integer", "index": 174, "name": "mobile_conversion_payment_info_additions_order_quantity", "comment": null}, "mobile_conversion_payment_info_additions_post_engagement": {"type": "integer", "index": 175, "name": "mobile_conversion_payment_info_additions_post_engagement", "comment": null}, "mobile_conversion_payment_info_additions_post_view": {"type": "integer", "index": 176, "name": "mobile_conversion_payment_info_additions_post_view", "comment": null}, "mobile_conversion_payment_info_additions_sale_amount": {"type": "integer", "index": 177, "name": "mobile_conversion_payment_info_additions_sale_amount", "comment": null}, "mobile_conversion_purchases_assisted": {"type": "integer", "index": 178, "name": "mobile_conversion_purchases_assisted", "comment": null}, "mobile_conversion_purchases_order_quantity": {"type": "integer", "index": 179, "name": "mobile_conversion_purchases_order_quantity", "comment": null}, "mobile_conversion_purchases_post_engagement": {"type": "integer", "index": 180, "name": "mobile_conversion_purchases_post_engagement", "comment": null}, "mobile_conversion_purchases_post_view": {"type": "integer", "index": 181, "name": "mobile_conversion_purchases_post_view", "comment": null}, "mobile_conversion_purchases_sale_amount": {"type": "integer", "index": 182, "name": "mobile_conversion_purchases_sale_amount", "comment": null}, "mobile_conversion_purchases_skan_post_engagement": {"type": "integer", "index": 183, "name": "mobile_conversion_purchases_skan_post_engagement", "comment": null}, "mobile_conversion_purchases_skan_post_view": {"type": "integer", "index": 184, "name": "mobile_conversion_purchases_skan_post_view", "comment": null}, "mobile_conversion_rates_assisted": {"type": "integer", "index": 185, "name": "mobile_conversion_rates_assisted", "comment": null}, "mobile_conversion_rates_order_quantity": {"type": "integer", "index": 186, "name": "mobile_conversion_rates_order_quantity", "comment": null}, "mobile_conversion_rates_post_engagement": {"type": "integer", "index": 187, "name": "mobile_conversion_rates_post_engagement", "comment": null}, "mobile_conversion_rates_post_view": {"type": "integer", "index": 188, "name": "mobile_conversion_rates_post_view", "comment": null}, "mobile_conversion_rates_sale_amount": {"type": "integer", "index": 189, "name": "mobile_conversion_rates_sale_amount", "comment": null}, "mobile_conversion_re_engages_assisted": {"type": "integer", "index": 190, "name": "mobile_conversion_re_engages_assisted", "comment": null}, "mobile_conversion_re_engages_order_quantity": {"type": "integer", "index": 191, "name": "mobile_conversion_re_engages_order_quantity", "comment": null}, "mobile_conversion_re_engages_post_engagement": {"type": "integer", "index": 192, "name": "mobile_conversion_re_engages_post_engagement", "comment": null}, "mobile_conversion_re_engages_post_view": {"type": "integer", "index": 193, "name": "mobile_conversion_re_engages_post_view", "comment": null}, "mobile_conversion_re_engages_sale_amount": {"type": "integer", "index": 194, "name": "mobile_conversion_re_engages_sale_amount", "comment": null}, "mobile_conversion_reservations_assisted": {"type": "integer", "index": 195, "name": "mobile_conversion_reservations_assisted", "comment": null}, "mobile_conversion_reservations_order_quantity": {"type": "integer", "index": 196, "name": "mobile_conversion_reservations_order_quantity", "comment": null}, "mobile_conversion_reservations_post_engagement": {"type": "integer", "index": 197, "name": "mobile_conversion_reservations_post_engagement", "comment": null}, "mobile_conversion_reservations_post_view": {"type": "integer", "index": 198, "name": "mobile_conversion_reservations_post_view", "comment": null}, "mobile_conversion_reservations_sale_amount": {"type": "integer", "index": 199, "name": "mobile_conversion_reservations_sale_amount", "comment": null}, "mobile_conversion_searches_assisted": {"type": "integer", "index": 200, "name": "mobile_conversion_searches_assisted", "comment": null}, "mobile_conversion_searches_order_quantity": {"type": "integer", "index": 201, "name": "mobile_conversion_searches_order_quantity", "comment": null}, "mobile_conversion_searches_post_engagement": {"type": "integer", "index": 202, "name": "mobile_conversion_searches_post_engagement", "comment": null}, "mobile_conversion_searches_post_view": {"type": "integer", "index": 203, "name": "mobile_conversion_searches_post_view", "comment": null}, "mobile_conversion_searches_sale_amount": {"type": "integer", "index": 204, "name": "mobile_conversion_searches_sale_amount", "comment": null}, "mobile_conversion_shares_assisted": {"type": "integer", "index": 205, "name": "mobile_conversion_shares_assisted", "comment": null}, "mobile_conversion_shares_order_quantity": {"type": "integer", "index": 206, "name": "mobile_conversion_shares_order_quantity", "comment": null}, "mobile_conversion_shares_post_engagement": {"type": "integer", "index": 207, "name": "mobile_conversion_shares_post_engagement", "comment": null}, "mobile_conversion_shares_post_view": {"type": "integer", "index": 208, "name": "mobile_conversion_shares_post_view", "comment": null}, "mobile_conversion_shares_sale_amount": {"type": "integer", "index": 209, "name": "mobile_conversion_shares_sale_amount", "comment": null}, "mobile_conversion_sign_ups_assisted": {"type": "integer", "index": 210, "name": "mobile_conversion_sign_ups_assisted", "comment": null}, "mobile_conversion_sign_ups_order_quantity": {"type": "integer", "index": 211, "name": "mobile_conversion_sign_ups_order_quantity", "comment": null}, "mobile_conversion_sign_ups_post_engagement": {"type": "integer", "index": 212, "name": "mobile_conversion_sign_ups_post_engagement", "comment": null}, "mobile_conversion_sign_ups_post_view": {"type": "integer", "index": 213, "name": "mobile_conversion_sign_ups_post_view", "comment": null}, "mobile_conversion_sign_ups_sale_amount": {"type": "integer", "index": 214, "name": "mobile_conversion_sign_ups_sale_amount", "comment": null}, "mobile_conversion_site_visits_order_quantity": {"type": "integer", "index": 215, "name": "mobile_conversion_site_visits_order_quantity", "comment": null}, "mobile_conversion_site_visits_post_engagement": {"type": "integer", "index": 216, "name": "mobile_conversion_site_visits_post_engagement", "comment": null}, "mobile_conversion_site_visits_post_view": {"type": "integer", "index": 217, "name": "mobile_conversion_site_visits_post_view", "comment": null}, "mobile_conversion_site_visits_sale_amount": {"type": "integer", "index": 218, "name": "mobile_conversion_site_visits_sale_amount", "comment": null}, "mobile_conversion_spent_credits_assisted": {"type": "integer", "index": 219, "name": "mobile_conversion_spent_credits_assisted", "comment": null}, "mobile_conversion_spent_credits_order_quantity": {"type": "integer", "index": 220, "name": "mobile_conversion_spent_credits_order_quantity", "comment": null}, "mobile_conversion_spent_credits_post_engagement": {"type": "integer", "index": 221, "name": "mobile_conversion_spent_credits_post_engagement", "comment": null}, "mobile_conversion_spent_credits_post_view": {"type": "integer", "index": 222, "name": "mobile_conversion_spent_credits_post_view", "comment": null}, "mobile_conversion_spent_credits_sale_amount": {"type": "integer", "index": 223, "name": "mobile_conversion_spent_credits_sale_amount", "comment": null}, "mobile_conversion_tutorials_completed_assisted": {"type": "integer", "index": 224, "name": "mobile_conversion_tutorials_completed_assisted", "comment": null}, "mobile_conversion_tutorials_completed_order_quantity": {"type": "integer", "index": 225, "name": "mobile_conversion_tutorials_completed_order_quantity", "comment": null}, "mobile_conversion_tutorials_completed_post_engagement": {"type": "integer", "index": 226, "name": "mobile_conversion_tutorials_completed_post_engagement", "comment": null}, "mobile_conversion_tutorials_completed_post_view": {"type": "integer", "index": 227, "name": "mobile_conversion_tutorials_completed_post_view", "comment": null}, "mobile_conversion_tutorials_completed_sale_amount": {"type": "integer", "index": 228, "name": "mobile_conversion_tutorials_completed_sale_amount", "comment": null}, "mobile_conversion_updates_assisted": {"type": "integer", "index": 229, "name": "mobile_conversion_updates_assisted", "comment": null}, "mobile_conversion_updates_order_quantity": {"type": "integer", "index": 230, "name": "mobile_conversion_updates_order_quantity", "comment": null}, "mobile_conversion_updates_post_engagement": {"type": "integer", "index": 231, "name": "mobile_conversion_updates_post_engagement", "comment": null}, "mobile_conversion_updates_post_view": {"type": "integer", "index": 232, "name": "mobile_conversion_updates_post_view", "comment": null}, "mobile_conversion_updates_sale_amount": {"type": "integer", "index": 233, "name": "mobile_conversion_updates_sale_amount", "comment": null}, "poll_card_vote": {"type": "integer", "index": 234, "name": "poll_card_vote", "comment": null}, "qualified_impressions": {"type": "integer", "index": 235, "name": "qualified_impressions", "comment": null}, "replies": {"type": "integer", "index": 236, "name": "replies", "comment": null}, "retweets": {"type": "integer", "index": 237, "name": "retweets", "comment": null}, "tweets_send": {"type": "integer", "index": 238, "name": "tweets_send", "comment": null}, "unfollows": {"type": "integer", "index": 239, "name": "unfollows", "comment": null}, "url_clicks": {"type": "integer", "index": 240, "name": "url_clicks", "comment": null}, "video_15_s_views": {"type": "integer", "index": 241, "name": "video_15_s_views", "comment": null}, "video_3_s_100_pct_views": {"type": "integer", "index": 242, "name": "video_3_s_100_pct_views", "comment": null}, "video_6_s_views": {"type": "integer", "index": 243, "name": "video_6_s_views", "comment": null}, "video_content_starts": {"type": "integer", "index": 244, "name": "video_content_starts", "comment": null}, "video_cta_clicks": {"type": "integer", "index": 245, "name": "video_cta_clicks", "comment": null}, "video_total_views": {"type": "integer", "index": 246, "name": "video_total_views", "comment": null}, "video_views_100": {"type": "integer", "index": 247, "name": "video_views_100", "comment": null}, "video_views_25": {"type": "integer", "index": 248, "name": "video_views_25", "comment": null}, "video_views_50": {"type": "integer", "index": 249, "name": "video_views_50", "comment": null}, "video_views_75": {"type": "integer", "index": 250, "name": "video_views_75", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.twitter_ads.twitter_ads.line_item_keywords_report"}, "source.twitter_ads.twitter_ads.line_item_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_line_item_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "text", "index": 1, "name": "account_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "line_item_id": {"type": "text", "index": 3, "name": "line_item_id", "comment": null}, "placement": {"type": "text", "index": 4, "name": "placement", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "app_clicks": {"type": "integer", "index": 6, "name": "app_clicks", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 7, "name": "billed_charge_local_micro", "comment": null}, "billed_engagements": {"type": "integer", "index": 8, "name": "billed_engagements", "comment": null}, "card_engagements": {"type": "integer", "index": 9, "name": "card_engagements", "comment": null}, "carousel_swipes": {"type": "integer", "index": 10, "name": "carousel_swipes", "comment": null}, "clicks": {"type": "integer", "index": 11, "name": "clicks", "comment": null}, "conversion_custom_metric": {"type": "integer", "index": 12, "name": "conversion_custom_metric", "comment": null}, "conversion_custom_order_quantity": {"type": "integer", "index": 13, "name": "conversion_custom_order_quantity", "comment": null}, "conversion_custom_order_quantity_engagement": {"type": "integer", "index": 14, "name": "conversion_custom_order_quantity_engagement", "comment": null}, "conversion_custom_order_quantity_view": {"type": "integer", "index": 15, "name": "conversion_custom_order_quantity_view", "comment": null}, "conversion_custom_post_engagement": {"type": "integer", "index": 16, "name": "conversion_custom_post_engagement", "comment": null}, "conversion_custom_post_view": {"type": "integer", "index": 17, "name": "conversion_custom_post_view", "comment": null}, "conversion_custom_sale_amount": {"type": "integer", "index": 18, "name": "conversion_custom_sale_amount", "comment": null}, "conversion_custom_sale_amount_engagement": {"type": "integer", "index": 19, "name": "conversion_custom_sale_amount_engagement", "comment": null}, "conversion_custom_sale_amount_view": {"type": "integer", "index": 20, "name": "conversion_custom_sale_amount_view", "comment": null}, "conversion_downloads_metric": {"type": "integer", "index": 21, "name": "conversion_downloads_metric", "comment": null}, "conversion_downloads_order_quantity": {"type": "integer", "index": 22, "name": "conversion_downloads_order_quantity", "comment": null}, "conversion_downloads_order_quantity_engagement": {"type": "integer", "index": 23, "name": "conversion_downloads_order_quantity_engagement", "comment": null}, "conversion_downloads_order_quantity_view": {"type": "integer", "index": 24, "name": "conversion_downloads_order_quantity_view", "comment": null}, "conversion_downloads_post_engagement": {"type": "integer", "index": 25, "name": "conversion_downloads_post_engagement", "comment": null}, "conversion_downloads_post_view": {"type": "integer", "index": 26, "name": "conversion_downloads_post_view", "comment": null}, "conversion_downloads_sale_amount": {"type": "integer", "index": 27, "name": "conversion_downloads_sale_amount", "comment": null}, "conversion_downloads_sale_amount_engagement": {"type": "integer", "index": 28, "name": "conversion_downloads_sale_amount_engagement", "comment": null}, "conversion_downloads_sale_amount_view": {"type": "integer", "index": 29, "name": "conversion_downloads_sale_amount_view", "comment": null}, "conversion_purchases_assisted": {"type": "integer", "index": 30, "name": "conversion_purchases_assisted", "comment": null}, "conversion_purchases_metric": {"type": "integer", "index": 31, "name": "conversion_purchases_metric", "comment": null}, "conversion_purchases_order_quantity": {"type": "integer", "index": 32, "name": "conversion_purchases_order_quantity", "comment": null}, "conversion_purchases_order_quantity_engagement": {"type": "integer", "index": 33, "name": "conversion_purchases_order_quantity_engagement", "comment": null}, "conversion_purchases_order_quantity_view": {"type": "integer", "index": 34, "name": "conversion_purchases_order_quantity_view", "comment": null}, "conversion_purchases_post_engagement": {"type": "integer", "index": 35, "name": "conversion_purchases_post_engagement", "comment": null}, "conversion_purchases_post_view": {"type": "integer", "index": 36, "name": "conversion_purchases_post_view", "comment": null}, "conversion_purchases_sale_amount": {"type": "integer", "index": 37, "name": "conversion_purchases_sale_amount", "comment": null}, "conversion_purchases_sale_amount_engagement": {"type": "integer", "index": 38, "name": "conversion_purchases_sale_amount_engagement", "comment": null}, "conversion_purchases_sale_amount_view": {"type": "integer", "index": 39, "name": "conversion_purchases_sale_amount_view", "comment": null}, "conversion_sign_ups_assisted": {"type": "integer", "index": 40, "name": "conversion_sign_ups_assisted", "comment": null}, "conversion_sign_ups_metric": {"type": "integer", "index": 41, "name": "conversion_sign_ups_metric", "comment": null}, "conversion_sign_ups_order_quantity": {"type": "integer", "index": 42, "name": "conversion_sign_ups_order_quantity", "comment": null}, "conversion_sign_ups_order_quantity_engagement": {"type": "integer", "index": 43, "name": "conversion_sign_ups_order_quantity_engagement", "comment": null}, "conversion_sign_ups_order_quantity_view": {"type": "integer", "index": 44, "name": "conversion_sign_ups_order_quantity_view", "comment": null}, "conversion_sign_ups_post_engagement": {"type": "integer", "index": 45, "name": "conversion_sign_ups_post_engagement", "comment": null}, "conversion_sign_ups_post_view": {"type": "integer", "index": 46, "name": "conversion_sign_ups_post_view", "comment": null}, "conversion_sign_ups_sale_amount": {"type": "integer", "index": 47, "name": "conversion_sign_ups_sale_amount", "comment": null}, "conversion_sign_ups_sale_amount_engagement": {"type": "integer", "index": 48, "name": "conversion_sign_ups_sale_amount_engagement", "comment": null}, "conversion_sign_ups_sale_amount_view": {"type": "integer", "index": 49, "name": "conversion_sign_ups_sale_amount_view", "comment": null}, "conversion_site_visits_metric": {"type": "integer", "index": 50, "name": "conversion_site_visits_metric", "comment": null}, "conversion_site_visits_order_quantity": {"type": "integer", "index": 51, "name": "conversion_site_visits_order_quantity", "comment": null}, "conversion_site_visits_order_quantity_engagement": {"type": "integer", "index": 52, "name": "conversion_site_visits_order_quantity_engagement", "comment": null}, "conversion_site_visits_order_quantity_view": {"type": "integer", "index": 53, "name": "conversion_site_visits_order_quantity_view", "comment": null}, "conversion_site_visits_post_engagement": {"type": "integer", "index": 54, "name": "conversion_site_visits_post_engagement", "comment": null}, "conversion_site_visits_post_view": {"type": "integer", "index": 55, "name": "conversion_site_visits_post_view", "comment": null}, "conversion_site_visits_sale_amount": {"type": "integer", "index": 56, "name": "conversion_site_visits_sale_amount", "comment": null}, "conversion_site_visits_sale_amount_engagement": {"type": "integer", "index": 57, "name": "conversion_site_visits_sale_amount_engagement", "comment": null}, "conversion_site_visits_sale_amount_view": {"type": "integer", "index": 58, "name": "conversion_site_visits_sale_amount_view", "comment": null}, "engagements": {"type": "integer", "index": 59, "name": "engagements", "comment": null}, "follows": {"type": "integer", "index": 60, "name": "follows", "comment": null}, "impressions": {"type": "integer", "index": 61, "name": "impressions", "comment": null}, "likes": {"type": "integer", "index": 62, "name": "likes", "comment": null}, "media_engagements": {"type": "integer", "index": 63, "name": "media_engagements", "comment": null}, "media_views": {"type": "integer", "index": 64, "name": "media_views", "comment": null}, "mobile_conversion_achievements_unlocked_assisted": {"type": "integer", "index": 65, "name": "mobile_conversion_achievements_unlocked_assisted", "comment": null}, "mobile_conversion_achievements_unlocked_order_quantity": {"type": "integer", "index": 66, "name": "mobile_conversion_achievements_unlocked_order_quantity", "comment": null}, "mobile_conversion_achievements_unlocked_post_engagement": {"type": "integer", "index": 67, "name": "mobile_conversion_achievements_unlocked_post_engagement", "comment": null}, "mobile_conversion_achievements_unlocked_post_view": {"type": "integer", "index": 68, "name": "mobile_conversion_achievements_unlocked_post_view", "comment": null}, "mobile_conversion_achievements_unlocked_sale_amount": {"type": "integer", "index": 69, "name": "mobile_conversion_achievements_unlocked_sale_amount", "comment": null}, "mobile_conversion_add_to_carts_assisted": {"type": "integer", "index": 70, "name": "mobile_conversion_add_to_carts_assisted", "comment": null}, "mobile_conversion_add_to_carts_order_quantity": {"type": "integer", "index": 71, "name": "mobile_conversion_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_add_to_carts_post_engagement": {"type": "integer", "index": 72, "name": "mobile_conversion_add_to_carts_post_engagement", "comment": null}, "mobile_conversion_add_to_carts_post_view": {"type": "integer", "index": 73, "name": "mobile_conversion_add_to_carts_post_view", "comment": null}, "mobile_conversion_add_to_carts_sale_amount": {"type": "integer", "index": 74, "name": "mobile_conversion_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_add_to_wishlists_assisted": {"type": "integer", "index": 75, "name": "mobile_conversion_add_to_wishlists_assisted", "comment": null}, "mobile_conversion_add_to_wishlists_order_quantity": {"type": "integer", "index": 76, "name": "mobile_conversion_add_to_wishlists_order_quantity", "comment": null}, "mobile_conversion_add_to_wishlists_post_engagement": {"type": "integer", "index": 77, "name": "mobile_conversion_add_to_wishlists_post_engagement", "comment": null}, "mobile_conversion_add_to_wishlists_post_view": {"type": "integer", "index": 78, "name": "mobile_conversion_add_to_wishlists_post_view", "comment": null}, "mobile_conversion_add_to_wishlists_sale_amount": {"type": "integer", "index": 79, "name": "mobile_conversion_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_checkouts_initiated_assisted": {"type": "integer", "index": 80, "name": "mobile_conversion_checkouts_initiated_assisted", "comment": null}, "mobile_conversion_checkouts_initiated_order_quantity": {"type": "integer", "index": 81, "name": "mobile_conversion_checkouts_initiated_order_quantity", "comment": null}, "mobile_conversion_checkouts_initiated_post_engagement": {"type": "integer", "index": 82, "name": "mobile_conversion_checkouts_initiated_post_engagement", "comment": null}, "mobile_conversion_checkouts_initiated_post_view": {"type": "integer", "index": 83, "name": "mobile_conversion_checkouts_initiated_post_view", "comment": null}, "mobile_conversion_checkouts_initiated_sale_amount": {"type": "integer", "index": 84, "name": "mobile_conversion_checkouts_initiated_sale_amount", "comment": null}, "mobile_conversion_content_views_assisted": {"type": "integer", "index": 85, "name": "mobile_conversion_content_views_assisted", "comment": null}, "mobile_conversion_content_views_order_quantity": {"type": "integer", "index": 86, "name": "mobile_conversion_content_views_order_quantity", "comment": null}, "mobile_conversion_content_views_post_engagement": {"type": "integer", "index": 87, "name": "mobile_conversion_content_views_post_engagement", "comment": null}, "mobile_conversion_content_views_post_view": {"type": "integer", "index": 88, "name": "mobile_conversion_content_views_post_view", "comment": null}, "mobile_conversion_content_views_sale_amount": {"type": "integer", "index": 89, "name": "mobile_conversion_content_views_sale_amount", "comment": null}, "mobile_conversion_downloads_order_quantity": {"type": "integer", "index": 90, "name": "mobile_conversion_downloads_order_quantity", "comment": null}, "mobile_conversion_downloads_post_engagement": {"type": "integer", "index": 91, "name": "mobile_conversion_downloads_post_engagement", "comment": null}, "mobile_conversion_downloads_post_view": {"type": "integer", "index": 92, "name": "mobile_conversion_downloads_post_view", "comment": null}, "mobile_conversion_downloads_sale_amount": {"type": "integer", "index": 93, "name": "mobile_conversion_downloads_sale_amount", "comment": null}, "mobile_conversion_installs_assisted": {"type": "integer", "index": 94, "name": "mobile_conversion_installs_assisted", "comment": null}, "mobile_conversion_installs_order_quantity": {"type": "integer", "index": 95, "name": "mobile_conversion_installs_order_quantity", "comment": null}, "mobile_conversion_installs_post_engagement": {"type": "integer", "index": 96, "name": "mobile_conversion_installs_post_engagement", "comment": null}, "mobile_conversion_installs_post_view": {"type": "integer", "index": 97, "name": "mobile_conversion_installs_post_view", "comment": null}, "mobile_conversion_installs_sale_amount": {"type": "integer", "index": 98, "name": "mobile_conversion_installs_sale_amount", "comment": null}, "mobile_conversion_invites_assisted": {"type": "integer", "index": 99, "name": "mobile_conversion_invites_assisted", "comment": null}, "mobile_conversion_invites_order_quantity": {"type": "integer", "index": 100, "name": "mobile_conversion_invites_order_quantity", "comment": null}, "mobile_conversion_invites_post_engagement": {"type": "integer", "index": 101, "name": "mobile_conversion_invites_post_engagement", "comment": null}, "mobile_conversion_invites_post_view": {"type": "integer", "index": 102, "name": "mobile_conversion_invites_post_view", "comment": null}, "mobile_conversion_invites_sale_amount": {"type": "integer", "index": 103, "name": "mobile_conversion_invites_sale_amount", "comment": null}, "mobile_conversion_key_page_views_post_engagement": {"type": "integer", "index": 104, "name": "mobile_conversion_key_page_views_post_engagement", "comment": null}, "mobile_conversion_key_page_views_post_view": {"type": "integer", "index": 105, "name": "mobile_conversion_key_page_views_post_view", "comment": null}, "mobile_conversion_levels_achieved_assisted": {"type": "integer", "index": 106, "name": "mobile_conversion_levels_achieved_assisted", "comment": null}, "mobile_conversion_levels_achieved_order_quantity": {"type": "integer", "index": 107, "name": "mobile_conversion_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_levels_achieved_post_engagement": {"type": "integer", "index": 108, "name": "mobile_conversion_levels_achieved_post_engagement", "comment": null}, "mobile_conversion_levels_achieved_post_view": {"type": "integer", "index": 109, "name": "mobile_conversion_levels_achieved_post_view", "comment": null}, "mobile_conversion_levels_achieved_sale_amount": {"type": "integer", "index": 110, "name": "mobile_conversion_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_metric": {"type": "integer", "index": 111, "name": "mobile_conversion_lifetime_value_achievements_unlocked_metric", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_order_qu": {"type": "integer", "index": 112, "name": "mobile_conversion_lifetime_value_achievements_unlocked_order_qu", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo": {"type": "integer", "index": 113, "name": "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_metric": {"type": "integer", "index": 114, "name": "mobile_conversion_lifetime_value_add_to_carts_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_order_quantity": {"type": "integer", "index": 115, "name": "mobile_conversion_lifetime_value_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_sale_amount": {"type": "integer", "index": 116, "name": "mobile_conversion_lifetime_value_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_metric": {"type": "integer", "index": 117, "name": "mobile_conversion_lifetime_value_add_to_wishlists_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit": {"type": "integer", "index": 118, "name": "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount": {"type": "integer", "index": 119, "name": "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_metric": {"type": "integer", "index": 120, "name": "mobile_conversion_lifetime_value_checkouts_initiated_metric", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_order_quan": {"type": "integer", "index": 121, "name": "mobile_conversion_lifetime_value_checkouts_initiated_order_quan", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun": {"type": "integer", "index": 122, "name": "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_content_views_metric": {"type": "integer", "index": 123, "name": "mobile_conversion_lifetime_value_content_views_metric", "comment": null}, "mobile_conversion_lifetime_value_content_views_order_quantity": {"type": "integer", "index": 124, "name": "mobile_conversion_lifetime_value_content_views_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_content_views_sale_amount": {"type": "integer", "index": 125, "name": "mobile_conversion_lifetime_value_content_views_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_invites_metric": {"type": "integer", "index": 126, "name": "mobile_conversion_lifetime_value_invites_metric", "comment": null}, "mobile_conversion_lifetime_value_invites_order_quantity": {"type": "integer", "index": 127, "name": "mobile_conversion_lifetime_value_invites_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_invites_sale_amount": {"type": "integer", "index": 128, "name": "mobile_conversion_lifetime_value_invites_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_metric": {"type": "integer", "index": 129, "name": "mobile_conversion_lifetime_value_levels_achieved_metric", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_order_quantity": {"type": "integer", "index": 130, "name": "mobile_conversion_lifetime_value_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_sale_amount": {"type": "integer", "index": 131, "name": "mobile_conversion_lifetime_value_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_logins_metric": {"type": "integer", "index": 132, "name": "mobile_conversion_lifetime_value_logins_metric", "comment": null}, "mobile_conversion_lifetime_value_logins_order_quantity": {"type": "integer", "index": 133, "name": "mobile_conversion_lifetime_value_logins_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_logins_sale_amount": {"type": "integer", "index": 134, "name": "mobile_conversion_lifetime_value_logins_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_metric": {"type": "integer", "index": 135, "name": "mobile_conversion_lifetime_value_payment_info_additions_metric", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_order_q": {"type": "integer", "index": 136, "name": "mobile_conversion_lifetime_value_payment_info_additions_order_q", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_sale_am": {"type": "integer", "index": 137, "name": "mobile_conversion_lifetime_value_payment_info_additions_sale_am", "comment": null}, "mobile_conversion_lifetime_value_purchases_metric": {"type": "integer", "index": 138, "name": "mobile_conversion_lifetime_value_purchases_metric", "comment": null}, "mobile_conversion_lifetime_value_purchases_order_quantity": {"type": "integer", "index": 139, "name": "mobile_conversion_lifetime_value_purchases_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_purchases_sale_amount": {"type": "integer", "index": 140, "name": "mobile_conversion_lifetime_value_purchases_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_rates_metric": {"type": "integer", "index": 141, "name": "mobile_conversion_lifetime_value_rates_metric", "comment": null}, "mobile_conversion_lifetime_value_rates_order_quantity": {"type": "integer", "index": 142, "name": "mobile_conversion_lifetime_value_rates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_rates_sale_amount": {"type": "integer", "index": 143, "name": "mobile_conversion_lifetime_value_rates_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_reservations_metric": {"type": "integer", "index": 144, "name": "mobile_conversion_lifetime_value_reservations_metric", "comment": null}, "mobile_conversion_lifetime_value_reservations_order_quantity": {"type": "integer", "index": 145, "name": "mobile_conversion_lifetime_value_reservations_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_reservations_sale_amount": {"type": "integer", "index": 146, "name": "mobile_conversion_lifetime_value_reservations_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_searches_metric": {"type": "integer", "index": 147, "name": "mobile_conversion_lifetime_value_searches_metric", "comment": null}, "mobile_conversion_lifetime_value_searches_order_quantity": {"type": "integer", "index": 148, "name": "mobile_conversion_lifetime_value_searches_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_searches_sale_amount": {"type": "integer", "index": 149, "name": "mobile_conversion_lifetime_value_searches_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_shares_metric": {"type": "integer", "index": 150, "name": "mobile_conversion_lifetime_value_shares_metric", "comment": null}, "mobile_conversion_lifetime_value_shares_order_quantity": {"type": "integer", "index": 151, "name": "mobile_conversion_lifetime_value_shares_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_shares_sale_amount": {"type": "integer", "index": 152, "name": "mobile_conversion_lifetime_value_shares_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_metric": {"type": "integer", "index": 153, "name": "mobile_conversion_lifetime_value_sign_ups_metric", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_order_quantity": {"type": "integer", "index": 154, "name": "mobile_conversion_lifetime_value_sign_ups_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_sale_amount": {"type": "integer", "index": 155, "name": "mobile_conversion_lifetime_value_sign_ups_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_metric": {"type": "integer", "index": 156, "name": "mobile_conversion_lifetime_value_spent_credits_metric", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_order_quantity": {"type": "integer", "index": 157, "name": "mobile_conversion_lifetime_value_spent_credits_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_sale_amount": {"type": "integer", "index": 158, "name": "mobile_conversion_lifetime_value_spent_credits_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_metric": {"type": "integer", "index": 159, "name": "mobile_conversion_lifetime_value_tutorials_completed_metric", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_order_quan": {"type": "integer", "index": 160, "name": "mobile_conversion_lifetime_value_tutorials_completed_order_quan", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun": {"type": "integer", "index": 161, "name": "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_updates_metric": {"type": "integer", "index": 162, "name": "mobile_conversion_lifetime_value_updates_metric", "comment": null}, "mobile_conversion_lifetime_value_updates_order_quantity": {"type": "integer", "index": 163, "name": "mobile_conversion_lifetime_value_updates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_updates_sale_amount": {"type": "integer", "index": 164, "name": "mobile_conversion_lifetime_value_updates_sale_amount", "comment": null}, "mobile_conversion_logins_assisted": {"type": "integer", "index": 165, "name": "mobile_conversion_logins_assisted", "comment": null}, "mobile_conversion_logins_order_quantity": {"type": "integer", "index": 166, "name": "mobile_conversion_logins_order_quantity", "comment": null}, "mobile_conversion_logins_post_engagement": {"type": "integer", "index": 167, "name": "mobile_conversion_logins_post_engagement", "comment": null}, "mobile_conversion_logins_post_view": {"type": "integer", "index": 168, "name": "mobile_conversion_logins_post_view", "comment": null}, "mobile_conversion_logins_sale_amount": {"type": "integer", "index": 169, "name": "mobile_conversion_logins_sale_amount", "comment": null}, "mobile_conversion_payment_info_additions_assisted": {"type": "integer", "index": 170, "name": "mobile_conversion_payment_info_additions_assisted", "comment": null}, "mobile_conversion_payment_info_additions_order_quantity": {"type": "integer", "index": 171, "name": "mobile_conversion_payment_info_additions_order_quantity", "comment": null}, "mobile_conversion_payment_info_additions_post_engagement": {"type": "integer", "index": 172, "name": "mobile_conversion_payment_info_additions_post_engagement", "comment": null}, "mobile_conversion_payment_info_additions_post_view": {"type": "integer", "index": 173, "name": "mobile_conversion_payment_info_additions_post_view", "comment": null}, "mobile_conversion_payment_info_additions_sale_amount": {"type": "integer", "index": 174, "name": "mobile_conversion_payment_info_additions_sale_amount", "comment": null}, "mobile_conversion_purchases_assisted": {"type": "integer", "index": 175, "name": "mobile_conversion_purchases_assisted", "comment": null}, "mobile_conversion_purchases_order_quantity": {"type": "integer", "index": 176, "name": "mobile_conversion_purchases_order_quantity", "comment": null}, "mobile_conversion_purchases_post_engagement": {"type": "integer", "index": 177, "name": "mobile_conversion_purchases_post_engagement", "comment": null}, "mobile_conversion_purchases_post_view": {"type": "integer", "index": 178, "name": "mobile_conversion_purchases_post_view", "comment": null}, "mobile_conversion_purchases_sale_amount": {"type": "integer", "index": 179, "name": "mobile_conversion_purchases_sale_amount", "comment": null}, "mobile_conversion_rates_assisted": {"type": "integer", "index": 180, "name": "mobile_conversion_rates_assisted", "comment": null}, "mobile_conversion_rates_order_quantity": {"type": "integer", "index": 181, "name": "mobile_conversion_rates_order_quantity", "comment": null}, "mobile_conversion_rates_post_engagement": {"type": "integer", "index": 182, "name": "mobile_conversion_rates_post_engagement", "comment": null}, "mobile_conversion_rates_post_view": {"type": "integer", "index": 183, "name": "mobile_conversion_rates_post_view", "comment": null}, "mobile_conversion_rates_sale_amount": {"type": "integer", "index": 184, "name": "mobile_conversion_rates_sale_amount", "comment": null}, "mobile_conversion_re_engages_assisted": {"type": "integer", "index": 185, "name": "mobile_conversion_re_engages_assisted", "comment": null}, "mobile_conversion_re_engages_order_quantity": {"type": "integer", "index": 186, "name": "mobile_conversion_re_engages_order_quantity", "comment": null}, "mobile_conversion_re_engages_post_engagement": {"type": "integer", "index": 187, "name": "mobile_conversion_re_engages_post_engagement", "comment": null}, "mobile_conversion_re_engages_post_view": {"type": "integer", "index": 188, "name": "mobile_conversion_re_engages_post_view", "comment": null}, "mobile_conversion_re_engages_sale_amount": {"type": "integer", "index": 189, "name": "mobile_conversion_re_engages_sale_amount", "comment": null}, "mobile_conversion_reservations_assisted": {"type": "integer", "index": 190, "name": "mobile_conversion_reservations_assisted", "comment": null}, "mobile_conversion_reservations_order_quantity": {"type": "integer", "index": 191, "name": "mobile_conversion_reservations_order_quantity", "comment": null}, "mobile_conversion_reservations_post_engagement": {"type": "integer", "index": 192, "name": "mobile_conversion_reservations_post_engagement", "comment": null}, "mobile_conversion_reservations_post_view": {"type": "integer", "index": 193, "name": "mobile_conversion_reservations_post_view", "comment": null}, "mobile_conversion_reservations_sale_amount": {"type": "integer", "index": 194, "name": "mobile_conversion_reservations_sale_amount", "comment": null}, "mobile_conversion_searches_assisted": {"type": "integer", "index": 195, "name": "mobile_conversion_searches_assisted", "comment": null}, "mobile_conversion_searches_order_quantity": {"type": "integer", "index": 196, "name": "mobile_conversion_searches_order_quantity", "comment": null}, "mobile_conversion_searches_post_engagement": {"type": "integer", "index": 197, "name": "mobile_conversion_searches_post_engagement", "comment": null}, "mobile_conversion_searches_post_view": {"type": "integer", "index": 198, "name": "mobile_conversion_searches_post_view", "comment": null}, "mobile_conversion_searches_sale_amount": {"type": "integer", "index": 199, "name": "mobile_conversion_searches_sale_amount", "comment": null}, "mobile_conversion_shares_assisted": {"type": "integer", "index": 200, "name": "mobile_conversion_shares_assisted", "comment": null}, "mobile_conversion_shares_order_quantity": {"type": "integer", "index": 201, "name": "mobile_conversion_shares_order_quantity", "comment": null}, "mobile_conversion_shares_post_engagement": {"type": "integer", "index": 202, "name": "mobile_conversion_shares_post_engagement", "comment": null}, "mobile_conversion_shares_post_view": {"type": "integer", "index": 203, "name": "mobile_conversion_shares_post_view", "comment": null}, "mobile_conversion_shares_sale_amount": {"type": "integer", "index": 204, "name": "mobile_conversion_shares_sale_amount", "comment": null}, "mobile_conversion_sign_ups_assisted": {"type": "integer", "index": 205, "name": "mobile_conversion_sign_ups_assisted", "comment": null}, "mobile_conversion_sign_ups_order_quantity": {"type": "integer", "index": 206, "name": "mobile_conversion_sign_ups_order_quantity", "comment": null}, "mobile_conversion_sign_ups_post_engagement": {"type": "integer", "index": 207, "name": "mobile_conversion_sign_ups_post_engagement", "comment": null}, "mobile_conversion_sign_ups_post_view": {"type": "integer", "index": 208, "name": "mobile_conversion_sign_ups_post_view", "comment": null}, "mobile_conversion_sign_ups_sale_amount": {"type": "integer", "index": 209, "name": "mobile_conversion_sign_ups_sale_amount", "comment": null}, "mobile_conversion_site_visits_order_quantity": {"type": "integer", "index": 210, "name": "mobile_conversion_site_visits_order_quantity", "comment": null}, "mobile_conversion_site_visits_post_engagement": {"type": "integer", "index": 211, "name": "mobile_conversion_site_visits_post_engagement", "comment": null}, "mobile_conversion_site_visits_post_view": {"type": "integer", "index": 212, "name": "mobile_conversion_site_visits_post_view", "comment": null}, "mobile_conversion_site_visits_sale_amount": {"type": "integer", "index": 213, "name": "mobile_conversion_site_visits_sale_amount", "comment": null}, "mobile_conversion_spent_credits_assisted": {"type": "integer", "index": 214, "name": "mobile_conversion_spent_credits_assisted", "comment": null}, "mobile_conversion_spent_credits_order_quantity": {"type": "integer", "index": 215, "name": "mobile_conversion_spent_credits_order_quantity", "comment": null}, "mobile_conversion_spent_credits_post_engagement": {"type": "integer", "index": 216, "name": "mobile_conversion_spent_credits_post_engagement", "comment": null}, "mobile_conversion_spent_credits_post_view": {"type": "integer", "index": 217, "name": "mobile_conversion_spent_credits_post_view", "comment": null}, "mobile_conversion_spent_credits_sale_amount": {"type": "integer", "index": 218, "name": "mobile_conversion_spent_credits_sale_amount", "comment": null}, "mobile_conversion_tutorials_completed_assisted": {"type": "integer", "index": 219, "name": "mobile_conversion_tutorials_completed_assisted", "comment": null}, "mobile_conversion_tutorials_completed_order_quantity": {"type": "integer", "index": 220, "name": "mobile_conversion_tutorials_completed_order_quantity", "comment": null}, "mobile_conversion_tutorials_completed_post_engagement": {"type": "integer", "index": 221, "name": "mobile_conversion_tutorials_completed_post_engagement", "comment": null}, "mobile_conversion_tutorials_completed_post_view": {"type": "integer", "index": 222, "name": "mobile_conversion_tutorials_completed_post_view", "comment": null}, "mobile_conversion_tutorials_completed_sale_amount": {"type": "integer", "index": 223, "name": "mobile_conversion_tutorials_completed_sale_amount", "comment": null}, "mobile_conversion_updates_assisted": {"type": "integer", "index": 224, "name": "mobile_conversion_updates_assisted", "comment": null}, "mobile_conversion_updates_order_quantity": {"type": "integer", "index": 225, "name": "mobile_conversion_updates_order_quantity", "comment": null}, "mobile_conversion_updates_post_engagement": {"type": "integer", "index": 226, "name": "mobile_conversion_updates_post_engagement", "comment": null}, "mobile_conversion_updates_post_view": {"type": "integer", "index": 227, "name": "mobile_conversion_updates_post_view", "comment": null}, "mobile_conversion_updates_sale_amount": {"type": "integer", "index": 228, "name": "mobile_conversion_updates_sale_amount", "comment": null}, "poll_card_vote": {"type": "integer", "index": 229, "name": "poll_card_vote", "comment": null}, "qualified_impressions": {"type": "integer", "index": 230, "name": "qualified_impressions", "comment": null}, "replies": {"type": "integer", "index": 231, "name": "replies", "comment": null}, "retweets": {"type": "integer", "index": 232, "name": "retweets", "comment": null}, "tweets_send": {"type": "integer", "index": 233, "name": "tweets_send", "comment": null}, "unfollows": {"type": "integer", "index": 234, "name": "unfollows", "comment": null}, "url_clicks": {"type": "integer", "index": 235, "name": "url_clicks", "comment": null}, "video_3_s_100_pct_views": {"type": "integer", "index": 236, "name": "video_3_s_100_pct_views", "comment": null}, "video_6_s_views": {"type": "integer", "index": 237, "name": "video_6_s_views", "comment": null}, "video_content_starts": {"type": "integer", "index": 238, "name": "video_content_starts", "comment": null}, "video_cta_clicks": {"type": "integer", "index": 239, "name": "video_cta_clicks", "comment": null}, "video_mrc_views": {"type": "integer", "index": 240, "name": "video_mrc_views", "comment": null}, "video_total_views": {"type": "integer", "index": 241, "name": "video_total_views", "comment": null}, "video_views_100": {"type": "integer", "index": 242, "name": "video_views_100", "comment": null}, "video_views_25": {"type": "integer", "index": 243, "name": "video_views_25", "comment": null}, "video_views_50": {"type": "integer", "index": 244, "name": "video_views_50", "comment": null}, "video_views_75": {"type": "integer", "index": 245, "name": "video_views_75", "comment": null}, "mobile_conversion_installs_skan_post_engagement": {"type": "integer", "index": 246, "name": "mobile_conversion_installs_skan_post_engagement", "comment": null}, "mobile_conversion_installs_skan_post_view": {"type": "integer", "index": 247, "name": "mobile_conversion_installs_skan_post_view", "comment": null}, "mobile_conversion_purchases_skan_post_engagement": {"type": "integer", "index": 248, "name": "mobile_conversion_purchases_skan_post_engagement", "comment": null}, "mobile_conversion_purchases_skan_post_view": {"type": "integer", "index": 249, "name": "mobile_conversion_purchases_skan_post_view", "comment": null}, "video_15_s_views": {"type": "integer", "index": 250, "name": "video_15_s_views", "comment": null}, "auto_created_conversion_landing_page_view": {"type": "integer", "index": 251, "name": "auto_created_conversion_landing_page_view", "comment": null}, "auto_created_conversion_session": {"type": "integer", "index": 252, "name": "auto_created_conversion_session", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.twitter_ads.twitter_ads.line_item_report"}, "source.twitter_ads.twitter_ads.promoted_tweet_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_promoted_tweet_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "approval_status": {"type": "text", "index": 2, "name": "approval_status", "comment": null}, "created_at": {"type": "text", "index": 3, "name": "created_at", "comment": null}, "deleted": {"type": "boolean", "index": 4, "name": "deleted", "comment": null}, "entity_status": {"type": "text", "index": 5, "name": "entity_status", "comment": null}, "id": {"type": "text", "index": 6, "name": "id", "comment": null}, "line_item_id": {"type": "text", "index": 7, "name": "line_item_id", "comment": null}, "tweet_id": {"type": "bigint", "index": 8, "name": "tweet_id", "comment": null}, "updated_at": {"type": "text", "index": 9, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.twitter_ads.twitter_ads.promoted_tweet_history"}, "source.twitter_ads.twitter_ads.promoted_tweet_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_promoted_tweet_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 3, "name": "billed_charge_local_micro", "comment": null}, "clicks": {"type": "integer", "index": 4, "name": "clicks", "comment": null}, "date": {"type": "timestamp without time zone", "index": 5, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": null}, "promoted_tweet_id": {"type": "text", "index": 7, "name": "promoted_tweet_id", "comment": null}, "url_clicks": {"type": "integer", "index": 8, "name": "url_clicks", "comment": null}, "placement": {"type": "text", "index": 9, "name": "placement", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.twitter_ads.twitter_ads.promoted_tweet_report"}, "source.twitter_ads.twitter_ads.tweet": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_tweet_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": null}, "card_uri": {"type": "integer", "index": 4, "name": "card_uri", "comment": null}, "coordinates_coordinates": {"type": "integer", "index": 5, "name": "coordinates_coordinates", "comment": null}, "coordinates_type": {"type": "integer", "index": 6, "name": "coordinates_type", "comment": null}, "created_at": {"type": "text", "index": 7, "name": "created_at", "comment": null}, "favorite_count": {"type": "integer", "index": 8, "name": "favorite_count", "comment": null}, "favorited": {"type": "boolean", "index": 9, "name": "favorited", "comment": null}, "followers": {"type": "integer", "index": 10, "name": "followers", "comment": null}, "full_text": {"type": "text", "index": 11, "name": "full_text", "comment": null}, "geo_coordinates": {"type": "integer", "index": 12, "name": "geo_coordinates", "comment": null}, "geo_type": {"type": "integer", "index": 13, "name": "geo_type", "comment": null}, "in_reply_to_screen_name": {"type": "integer", "index": 14, "name": "in_reply_to_screen_name", "comment": null}, "in_reply_to_status_id": {"type": "integer", "index": 15, "name": "in_reply_to_status_id", "comment": null}, "in_reply_to_user_id": {"type": "integer", "index": 16, "name": "in_reply_to_user_id", "comment": null}, "lang": {"type": "text", "index": 17, "name": "lang", "comment": null}, "media_key": {"type": "integer", "index": 18, "name": "media_key", "comment": null}, "retweet_count": {"type": "integer", "index": 19, "name": "retweet_count", "comment": null}, "retweeted": {"type": "boolean", "index": 20, "name": "retweeted", "comment": null}, "source": {"type": "text", "index": 21, "name": "source", "comment": null}, "truncated": {"type": "boolean", "index": 22, "name": "truncated", "comment": null}, "tweet_type": {"type": "text", "index": 23, "name": "tweet_type", "comment": null}, "user_id": {"type": "integer", "index": 24, "name": "user_id", "comment": null}, "name": {"type": "integer", "index": 25, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.twitter_ads.twitter_ads.tweet"}, "source.twitter_ads.twitter_ads.tweet_url": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_tweet_url_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "display_url": {"type": "text", "index": 2, "name": "display_url", "comment": null}, "expanded_url": {"type": "text", "index": 3, "name": "expanded_url", "comment": null}, "index": {"type": "integer", "index": 4, "name": "index", "comment": null}, "indices": {"type": "text", "index": 5, "name": "indices", "comment": null}, "tweet_id": {"type": "bigint", "index": 6, "name": "tweet_id", "comment": null}, "url": {"type": "text", "index": 7, "name": "url", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.twitter_ads.twitter_ads.tweet_url"}}, "errors": null} \ No newline at end of file +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/catalog/v1.json", "dbt_version": "1.11.12", "generated_at": "2026-07-10T18:31:24.745195Z", "invocation_id": "a9547dfa-e1b4-4424-8d6d-fa6496702378", "invocation_started_at": "2026-07-10T18:31:03.638284Z", "env": {}}, "nodes": {"seed.ad_reporting_integration_tests.amazon_ads_ad_group_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_ad_group_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "creation_date": {"type": "text", "index": 5, "name": "creation_date", "comment": null}, "default_bid": {"type": "double precision", "index": 6, "name": "default_bid", "comment": null}, "name": {"type": "text", "index": 7, "name": "name", "comment": null}, "serving_status": {"type": "text", "index": 8, "name": "serving_status", "comment": null}, "state": {"type": "text", "index": 9, "name": "state", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_ad_group_history_data"}, "seed.ad_reporting_integration_tests.amazon_ads_ad_group_level_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_ad_group_level_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "campaign_bidding_strategy": {"type": "text", "index": 4, "name": "campaign_bidding_strategy", "comment": null}, "clicks": {"type": "integer", "index": 5, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 6, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_ad_group_level_report_data"}, "seed.ad_reporting_integration_tests.amazon_ads_advertised_product_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_advertised_product_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "integer", "index": 2, "name": "ad_id", "comment": null}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 4, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "campaign_budget_amount": {"type": "double precision", "index": 6, "name": "campaign_budget_amount", "comment": null}, "campaign_budget_currency_code": {"type": "text", "index": 7, "name": "campaign_budget_currency_code", "comment": null}, "campaign_budget_type": {"type": "text", "index": 8, "name": "campaign_budget_type", "comment": null}, "clicks": {"type": "integer", "index": 9, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 10, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 11, "name": "impressions", "comment": null}, "advertised_asin": {"type": "integer", "index": 12, "name": "advertised_asin", "comment": null}, "advertised_sku": {"type": "integer", "index": 13, "name": "advertised_sku", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_advertised_product_report_data"}, "seed.ad_reporting_integration_tests.amazon_ads_campaign_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "bidding_strategy": {"type": "text", "index": 4, "name": "bidding_strategy", "comment": null}, "creation_date": {"type": "text", "index": 5, "name": "creation_date", "comment": null}, "budget": {"type": "integer", "index": 6, "name": "budget", "comment": null}, "end_date": {"type": "integer", "index": 7, "name": "end_date", "comment": null}, "name": {"type": "text", "index": 8, "name": "name", "comment": null}, "portfolio_id": {"type": "integer", "index": 9, "name": "portfolio_id", "comment": null}, "profile_id": {"type": "integer", "index": 10, "name": "profile_id", "comment": null}, "serving_status": {"type": "text", "index": 11, "name": "serving_status", "comment": null}, "start_date": {"type": "date", "index": 12, "name": "start_date", "comment": null}, "state": {"type": "text", "index": 13, "name": "state", "comment": null}, "targeting_type": {"type": "text", "index": 14, "name": "targeting_type", "comment": null}, "budget_type": {"type": "text", "index": 15, "name": "budget_type", "comment": null}, "effective_budget": {"type": "integer", "index": 16, "name": "effective_budget", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_campaign_history_data"}, "seed.ad_reporting_integration_tests.amazon_ads_campaign_level_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_campaign_level_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "campaign_applicable_budget_rule_id": {"type": "integer", "index": 4, "name": "campaign_applicable_budget_rule_id", "comment": null}, "campaign_applicable_budget_rule_name": {"type": "integer", "index": 5, "name": "campaign_applicable_budget_rule_name", "comment": null}, "campaign_bidding_strategy": {"type": "text", "index": 6, "name": "campaign_bidding_strategy", "comment": null}, "campaign_budget_amount": {"type": "double precision", "index": 7, "name": "campaign_budget_amount", "comment": null}, "campaign_budget_currency_code": {"type": "text", "index": 8, "name": "campaign_budget_currency_code", "comment": null}, "campaign_budget_type": {"type": "text", "index": 9, "name": "campaign_budget_type", "comment": null}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 11, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 12, "name": "impressions", "comment": null}, "campaign_rule_based_budget_amount": {"type": "integer", "index": 13, "name": "campaign_rule_based_budget_amount", "comment": null}, "sales_7_d": {"type": "integer", "index": 14, "name": "sales_7_d", "comment": null}, "purchases_30_d": {"type": "integer", "index": 15, "name": "purchases_30_d", "comment": null}, "sales_30_d": {"type": "integer", "index": 16, "name": "sales_30_d", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_campaign_level_report_data"}, "seed.ad_reporting_integration_tests.amazon_ads_keyword_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_keyword_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "ad_group_id": {"type": "integer", "index": 4, "name": "ad_group_id", "comment": null}, "bid": {"type": "double precision", "index": 5, "name": "bid", "comment": null}, "campaign_id": {"type": "integer", "index": 6, "name": "campaign_id", "comment": null}, "creation_date": {"type": "text", "index": 7, "name": "creation_date", "comment": null}, "keyword_text": {"type": "text", "index": 8, "name": "keyword_text", "comment": null}, "match_type": {"type": "text", "index": 9, "name": "match_type", "comment": null}, "native_language_keyword": {"type": "integer", "index": 10, "name": "native_language_keyword", "comment": null}, "serving_status": {"type": "text", "index": 11, "name": "serving_status", "comment": null}, "state": {"type": "text", "index": 12, "name": "state", "comment": null}, "native_language_locale": {"type": "integer", "index": 13, "name": "native_language_locale", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_keyword_history_data"}, "seed.ad_reporting_integration_tests.amazon_ads_portfolio_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_portfolio_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "budget_amount": {"type": "integer", "index": 4, "name": "budget_amount", "comment": null}, "budget_currency_code": {"type": "integer", "index": 5, "name": "budget_currency_code", "comment": null}, "budget_end_date": {"type": "integer", "index": 6, "name": "budget_end_date", "comment": null}, "budget_policy": {"type": "integer", "index": 7, "name": "budget_policy", "comment": null}, "budget_start_date": {"type": "integer", "index": 8, "name": "budget_start_date", "comment": null}, "creation_date": {"type": "text", "index": 9, "name": "creation_date", "comment": null}, "in_budget": {"type": "boolean", "index": 10, "name": "in_budget", "comment": null}, "name": {"type": "text", "index": 11, "name": "name", "comment": null}, "profile_id": {"type": "integer", "index": 12, "name": "profile_id", "comment": null}, "serving_status": {"type": "text", "index": 13, "name": "serving_status", "comment": null}, "state": {"type": "text", "index": 14, "name": "state", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_portfolio_history_data"}, "seed.ad_reporting_integration_tests.amazon_ads_product_ad_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_product_ad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "ad_group_id": {"type": "integer", "index": 4, "name": "ad_group_id", "comment": null}, "asin": {"type": "text", "index": 5, "name": "asin", "comment": null}, "campaign_id": {"type": "integer", "index": 6, "name": "campaign_id", "comment": null}, "creation_date": {"type": "text", "index": 7, "name": "creation_date", "comment": null}, "serving_status": {"type": "text", "index": 8, "name": "serving_status", "comment": null}, "sku": {"type": "integer", "index": 9, "name": "sku", "comment": null}, "state": {"type": "text", "index": 10, "name": "state", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_product_ad_history_data"}, "seed.ad_reporting_integration_tests.amazon_ads_profile_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_profile_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": null}, "account_marketplace_string_id": {"type": "text", "index": 5, "name": "account_marketplace_string_id", "comment": null}, "account_name": {"type": "text", "index": 6, "name": "account_name", "comment": null}, "account_sub_type": {"type": "integer", "index": 7, "name": "account_sub_type", "comment": null}, "account_type": {"type": "text", "index": 8, "name": "account_type", "comment": null}, "account_valid_payment_method": {"type": "boolean", "index": 9, "name": "account_valid_payment_method", "comment": null}, "country_code": {"type": "text", "index": 10, "name": "country_code", "comment": null}, "currency_code": {"type": "text", "index": 11, "name": "currency_code", "comment": null}, "daily_budget": {"type": "integer", "index": 12, "name": "daily_budget", "comment": null}, "timezone": {"type": "text", "index": 13, "name": "timezone", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_profile_data"}, "seed.ad_reporting_integration_tests.amazon_ads_search_term_ad_keyword_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_search_term_ad_keyword_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "keyword_id": {"type": "integer", "index": 4, "name": "keyword_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "campaign_budget_amount": {"type": "double precision", "index": 6, "name": "campaign_budget_amount", "comment": null}, "campaign_budget_currency_code": {"type": "text", "index": 7, "name": "campaign_budget_currency_code", "comment": null}, "campaign_budget_type": {"type": "text", "index": 8, "name": "campaign_budget_type", "comment": null}, "clicks": {"type": "integer", "index": 9, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 10, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 11, "name": "impressions", "comment": null}, "keyword_bid": {"type": "double precision", "index": 12, "name": "keyword_bid", "comment": null}, "search_term": {"type": "text", "index": 13, "name": "search_term", "comment": null}, "targeting": {"type": "text", "index": 14, "name": "targeting", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_search_term_ad_keyword_report_data"}, "seed.ad_reporting_integration_tests.amazon_ads_targeting_keyword_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_targeting_keyword_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "keyword_id": {"type": "integer", "index": 4, "name": "keyword_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "ad_keyword_status": {"type": "text", "index": 6, "name": "ad_keyword_status", "comment": null}, "campaign_budget_amount": {"type": "double precision", "index": 7, "name": "campaign_budget_amount", "comment": null}, "campaign_budget_currency_code": {"type": "text", "index": 8, "name": "campaign_budget_currency_code", "comment": null}, "campaign_budget_type": {"type": "text", "index": 9, "name": "campaign_budget_type", "comment": null}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 11, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 12, "name": "impressions", "comment": null}, "keyword_bid": {"type": "double precision", "index": 13, "name": "keyword_bid", "comment": null}, "keyword_type": {"type": "text", "index": 14, "name": "keyword_type", "comment": null}, "match_type": {"type": "text", "index": 15, "name": "match_type", "comment": null}, "targeting": {"type": "text", "index": 16, "name": "targeting", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_targeting_keyword_report_data"}, "seed.ad_reporting_integration_tests.apple_search_ad_group_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_ad_group_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "timestamp without time zone", "index": 2, "name": "modification_time", "comment": null}, "automated_keywords_opt_in": {"type": "boolean", "index": 3, "name": "automated_keywords_opt_in", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "cpa_goal_amount": {"type": "integer", "index": 5, "name": "cpa_goal_amount", "comment": null}, "cpa_goal_currency": {"type": "integer", "index": 6, "name": "cpa_goal_currency", "comment": null}, "default_cpc_bid_amount": {"type": "integer", "index": 7, "name": "default_cpc_bid_amount", "comment": null}, "default_cpc_bid_currency": {"type": "integer", "index": 8, "name": "default_cpc_bid_currency", "comment": null}, "deleted": {"type": "boolean", "index": 9, "name": "deleted", "comment": null}, "end_time": {"type": "timestamp without time zone", "index": 10, "name": "end_time", "comment": null}, "name": {"type": "text", "index": 11, "name": "name", "comment": null}, "organization_id": {"type": "integer", "index": 12, "name": "organization_id", "comment": null}, "serving_state_reasons": {"type": "integer", "index": 13, "name": "serving_state_reasons", "comment": null}, "serving_status": {"type": "text", "index": 14, "name": "serving_status", "comment": null}, "start_time": {"type": "timestamp without time zone", "index": 15, "name": "start_time", "comment": null}, "status": {"type": "text", "index": 16, "name": "status", "comment": null}, "storefronts": {"type": "integer", "index": 17, "name": "storefronts", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.apple_search_ad_group_history_data"}, "seed.ad_reporting_integration_tests.apple_search_ad_group_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_ad_group_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "avg_cpa_amount": {"type": "double precision", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "text", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "double precision", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "text", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "double precision", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "integer", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "integer", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "integer", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "double precision", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "integer", "index": 17, "name": "taps", "comment": null}, "tap_installs": {"type": "integer", "index": 18, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 19, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 20, "name": "tap_redownloads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.apple_search_ad_group_report_data"}, "seed.ad_reporting_integration_tests.apple_search_ad_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_ad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"creation_time": {"type": "timestamp without time zone", "index": 1, "name": "creation_time", "comment": null}, "modification_time": {"type": "timestamp without time zone", "index": 2, "name": "modification_time", "comment": null}, "org_id": {"type": "integer", "index": 3, "name": "org_id", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "integer", "index": 5, "name": "ad_group_id", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "id": {"type": "integer", "index": 7, "name": "id", "comment": null}, "creative_id": {"type": "integer", "index": 8, "name": "creative_id", "comment": null}, "creative_type": {"type": "text", "index": 9, "name": "creative_type", "comment": null}, "status": {"type": "text", "index": 10, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.apple_search_ad_history_data"}, "seed.ad_reporting_integration_tests.apple_search_ad_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_ad_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "integer", "index": 3, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "integer", "index": 4, "name": "ad_id", "comment": null}, "impressions": {"type": "integer", "index": 5, "name": "impressions", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 6, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 7, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 8, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 9, "name": "redownloads", "comment": null}, "tap_installs": {"type": "integer", "index": 10, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 11, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 12, "name": "tap_redownloads", "comment": null}, "taps": {"type": "integer", "index": 13, "name": "taps", "comment": null}, "conversions": {"type": "integer", "index": 14, "name": "conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.apple_search_ad_report_data"}, "seed.ad_reporting_integration_tests.apple_search_campaign_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "timestamp without time zone", "index": 2, "name": "modification_time", "comment": null}, "adam_id": {"type": "integer", "index": 3, "name": "adam_id", "comment": null}, "budget_amount": {"type": "integer", "index": 4, "name": "budget_amount", "comment": null}, "budget_currency": {"type": "text", "index": 5, "name": "budget_currency", "comment": null}, "budget_orders": {"type": "text", "index": 6, "name": "budget_orders", "comment": null}, "daily_budget_amount": {"type": "integer", "index": 7, "name": "daily_budget_amount", "comment": null}, "daily_budget_currency": {"type": "text", "index": 8, "name": "daily_budget_currency", "comment": null}, "deleted": {"type": "boolean", "index": 9, "name": "deleted", "comment": null}, "end_time": {"type": "timestamp without time zone", "index": 10, "name": "end_time", "comment": null}, "loc_invoice_detail_buyer_email": {"type": "integer", "index": 11, "name": "loc_invoice_detail_buyer_email", "comment": null}, "loc_invoice_detail_buyer_name": {"type": "integer", "index": 12, "name": "loc_invoice_detail_buyer_name", "comment": null}, "loc_invoice_detail_client_name": {"type": "integer", "index": 13, "name": "loc_invoice_detail_client_name", "comment": null}, "loc_invoice_detail_order_number": {"type": "integer", "index": 14, "name": "loc_invoice_detail_order_number", "comment": null}, "name": {"type": "text", "index": 15, "name": "name", "comment": null}, "organization_id": {"type": "integer", "index": 16, "name": "organization_id", "comment": null}, "payment_model": {"type": "text", "index": 17, "name": "payment_model", "comment": null}, "serving_state_reasons": {"type": "text", "index": 18, "name": "serving_state_reasons", "comment": null}, "serving_status": {"type": "text", "index": 19, "name": "serving_status", "comment": null}, "start_time": {"type": "timestamp without time zone", "index": 20, "name": "start_time", "comment": null}, "status": {"type": "text", "index": 21, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.apple_search_campaign_history_data"}, "seed.ad_reporting_integration_tests.apple_search_campaign_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_campaign_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "id": {"type": "integer", "index": 2, "name": "id", "comment": null}, "avg_cpa_amount": {"type": "double precision", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "text", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "double precision", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "text", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "double precision", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "integer", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "integer", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "integer", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "double precision", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "integer", "index": 17, "name": "taps", "comment": null}, "tap_installs": {"type": "integer", "index": 18, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 19, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 20, "name": "tap_redownloads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.apple_search_campaign_report_data"}, "seed.ad_reporting_integration_tests.apple_search_keyword_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_keyword_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "timestamp without time zone", "index": 2, "name": "modification_time", "comment": null}, "ad_group_id": {"type": "integer", "index": 3, "name": "ad_group_id", "comment": null}, "bid_amount": {"type": "double precision", "index": 4, "name": "bid_amount", "comment": null}, "bid_currency": {"type": "text", "index": 5, "name": "bid_currency", "comment": null}, "campaign_id": {"type": "integer", "index": 6, "name": "campaign_id", "comment": null}, "deleted": {"type": "boolean", "index": 7, "name": "deleted", "comment": null}, "match_type": {"type": "text", "index": 8, "name": "match_type", "comment": null}, "status": {"type": "text", "index": 9, "name": "status", "comment": null}, "text": {"type": "text", "index": 10, "name": "text", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.apple_search_keyword_history_data"}, "seed.ad_reporting_integration_tests.apple_search_keyword_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_keyword_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "id": {"type": "integer", "index": 2, "name": "id", "comment": null}, "avg_cpa_amount": {"type": "double precision", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "text", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "double precision", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "text", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "double precision", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "integer", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "integer", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "integer", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "double precision", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "integer", "index": 17, "name": "taps", "comment": null}, "tap_installs": {"type": "integer", "index": 18, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 19, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 20, "name": "tap_redownloads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.apple_search_keyword_report_data"}, "seed.ad_reporting_integration_tests.apple_search_organization_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_organization_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "currency": {"type": "text", "index": 2, "name": "currency", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "payment_model": {"type": "text", "index": 4, "name": "payment_model", "comment": null}, "role_names": {"type": "text", "index": 5, "name": "role_names", "comment": null}, "time_zone": {"type": "text", "index": 6, "name": "time_zone", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.apple_search_organization_data"}, "seed.ad_reporting_integration_tests.apple_search_search_term_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_search_term_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "ad_group_id": {"type": "integer", "index": 2, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 4, "name": "date", "comment": null}, "ad_group_deleted": {"type": "boolean", "index": 5, "name": "ad_group_deleted", "comment": null}, "ad_group_name": {"type": "text", "index": 6, "name": "ad_group_name", "comment": null}, "avg_cpa_amount": {"type": "double precision", "index": 7, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "text", "index": 8, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "double precision", "index": 9, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "text", "index": 10, "name": "avg_cpt_currency", "comment": null}, "bid_amount_amount": {"type": "double precision", "index": 11, "name": "bid_amount_amount", "comment": null}, "bid_amount_currency": {"type": "text", "index": 12, "name": "bid_amount_currency", "comment": null}, "conversion_rate": {"type": "double precision", "index": 13, "name": "conversion_rate", "comment": null}, "conversions": {"type": "integer", "index": 14, "name": "conversions", "comment": null}, "deleted": {"type": "boolean", "index": 15, "name": "deleted", "comment": null}, "impressions": {"type": "integer", "index": 16, "name": "impressions", "comment": null}, "keyword": {"type": "text", "index": 17, "name": "keyword", "comment": null}, "keyword_display_status": {"type": "text", "index": 18, "name": "keyword_display_status", "comment": null}, "keyword_id": {"type": "integer", "index": 19, "name": "keyword_id", "comment": null}, "lat_off_installs": {"type": "integer", "index": 20, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "integer", "index": 21, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 22, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 23, "name": "local_spend_currency", "comment": null}, "match_type": {"type": "text", "index": 24, "name": "match_type", "comment": null}, "new_downloads": {"type": "integer", "index": 25, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 26, "name": "redownloads", "comment": null}, "search_term_source": {"type": "text", "index": 27, "name": "search_term_source", "comment": null}, "search_term_text": {"type": "text", "index": 28, "name": "search_term_text", "comment": null}, "tap_through_rate": {"type": "double precision", "index": 29, "name": "tap_through_rate", "comment": null}, "taps": {"type": "integer", "index": 30, "name": "taps", "comment": null}, "tap_installs": {"type": "integer", "index": 31, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 32, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 33, "name": "tap_redownloads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.apple_search_search_term_report_data"}, "seed.ad_reporting_integration_tests.facebook_ads_account_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_account_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "character varying", "index": 2, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_account_history_data"}, "seed.ad_reporting_integration_tests.facebook_ads_ad_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_ad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "ad_set_id": {"type": "bigint", "index": 3, "name": "ad_set_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": null}, "creative_id": {"type": "bigint", "index": 5, "name": "creative_id", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}, "updated_time": {"type": "timestamp without time zone", "index": 8, "name": "updated_time", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_ad_history_data"}, "seed.ad_reporting_integration_tests.facebook_ads_ad_set_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_ad_set_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "updated_time": {"type": "timestamp without time zone", "index": 6, "name": "updated_time", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_ad_set_history_data"}, "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_action_values_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_basic_ad_action_values_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "integer", "index": 1, "name": "ad_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "_fivetran_id": {"type": "text", "index": 3, "name": "_fivetran_id", "comment": null}, "index": {"type": "integer", "index": 4, "name": "index", "comment": null}, "action_type": {"type": "text", "index": 5, "name": "action_type", "comment": null}, "value": {"type": "double precision", "index": 6, "name": "value", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}, "_7_d_click": {"type": "double precision", "index": 8, "name": "_7_d_click", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_action_values_data"}, "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_actions_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_basic_ad_actions_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "ad_id": {"type": "integer", "index": 2, "name": "ad_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "index": {"type": "integer", "index": 4, "name": "index", "comment": null}, "_1_d_view": {"type": "double precision", "index": 5, "name": "_1_d_view", "comment": null}, "_7_d_click": {"type": "double precision", "index": 6, "name": "_7_d_click", "comment": null}, "_fivetran_synced": {"type": "text", "index": 7, "name": "_fivetran_synced", "comment": null}, "action_type": {"type": "text", "index": 8, "name": "action_type", "comment": null}, "inline": {"type": "double precision", "index": 9, "name": "inline", "comment": null}, "value": {"type": "double precision", "index": 10, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_actions_data"}, "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_basic_ad_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "bigint", "index": 1, "name": "ad_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "impressions": {"type": "integer", "index": 4, "name": "impressions", "comment": null}, "inline_link_clicks": {"type": "integer", "index": 5, "name": "inline_link_clicks", "comment": null}, "spend": {"type": "double precision", "index": 6, "name": "spend", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_data"}, "seed.ad_reporting_integration_tests.facebook_ads_campaign_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "updated_time": {"type": "timestamp without time zone", "index": 5, "name": "updated_time", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_campaign_history_data"}, "seed.ad_reporting_integration_tests.facebook_ads_creative_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_creative_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"page_link": {"type": "character varying", "index": 1, "name": "page_link", "comment": null}, "template_page_link": {"type": "character varying", "index": 2, "name": "template_page_link", "comment": null}, "id": {"type": "bigint", "index": 3, "name": "id", "comment": null}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "url_tags": {"type": "text", "index": 6, "name": "url_tags", "comment": null}, "_fivetran_synced": {"type": "text", "index": 7, "name": "_fivetran_synced", "comment": null}, "asset_feed_spec_link_urls": {"type": "text", "index": 8, "name": "asset_feed_spec_link_urls", "comment": null}, "object_story_link_data_child_attachments": {"type": "text", "index": 9, "name": "object_story_link_data_child_attachments", "comment": null}, "object_story_link_data_caption": {"type": "text", "index": 10, "name": "object_story_link_data_caption", "comment": null}, "object_story_link_data_description": {"type": "text", "index": 11, "name": "object_story_link_data_description", "comment": null}, "object_story_link_data_link": {"type": "text", "index": 12, "name": "object_story_link_data_link", "comment": null}, "object_story_link_data_message": {"type": "text", "index": 13, "name": "object_story_link_data_message", "comment": null}, "template_app_link_spec_ios": {"type": "text", "index": 14, "name": "template_app_link_spec_ios", "comment": null}, "_fivetran_id": {"type": "text", "index": 15, "name": "_fivetran_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_creative_history_data"}, "seed.ad_reporting_integration_tests.facebook_ads_demographics_country_actions_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_demographics_country_actions_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "action_type": {"type": "text", "index": 4, "name": "action_type", "comment": null}, "date": {"type": "date", "index": 5, "name": "date", "comment": null}, "index": {"type": "integer", "index": 6, "name": "index", "comment": null}, "inline": {"type": "double precision", "index": 7, "name": "inline", "comment": null}, "value": {"type": "double precision", "index": 8, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_demographics_country_actions_data"}, "seed.ad_reporting_integration_tests.facebook_ads_demographics_country_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_demographics_country_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "country": {"type": "text", "index": 4, "name": "country", "comment": null}, "date": {"type": "date", "index": 5, "name": "date", "comment": null}, "frequency": {"type": "double precision", "index": 6, "name": "frequency", "comment": null}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": null}, "inline_link_clicks": {"type": "integer", "index": 8, "name": "inline_link_clicks", "comment": null}, "reach": {"type": "integer", "index": 9, "name": "reach", "comment": null}, "spend": {"type": "double precision", "index": 10, "name": "spend", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_demographics_country_data"}, "seed.ad_reporting_integration_tests.facebook_ads_demographics_region_actions_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_demographics_region_actions_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "action_type": {"type": "text", "index": 4, "name": "action_type", "comment": null}, "date": {"type": "date", "index": 5, "name": "date", "comment": null}, "index": {"type": "integer", "index": 6, "name": "index", "comment": null}, "value": {"type": "double precision", "index": 7, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_demographics_region_actions_data"}, "seed.ad_reporting_integration_tests.facebook_ads_demographics_region_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_demographics_region_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "date": {"type": "date", "index": 4, "name": "date", "comment": null}, "frequency": {"type": "double precision", "index": 5, "name": "frequency", "comment": null}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": null}, "inline_link_clicks": {"type": "integer", "index": 7, "name": "inline_link_clicks", "comment": null}, "reach": {"type": "integer", "index": 8, "name": "reach", "comment": null}, "region": {"type": "text", "index": 9, "name": "region", "comment": null}, "spend": {"type": "double precision", "index": 10, "name": "spend", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_demographics_region_data"}, "seed.ad_reporting_integration_tests.google_ads_account_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_account_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "auto_tagging_enabled": {"type": "boolean", "index": 4, "name": "auto_tagging_enabled", "comment": null}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": null}, "descriptive_name": {"type": "integer", "index": 6, "name": "descriptive_name", "comment": null}, "final_url_suffix": {"type": "boolean", "index": 7, "name": "final_url_suffix", "comment": null}, "hidden": {"type": "boolean", "index": 8, "name": "hidden", "comment": null}, "manager": {"type": "integer", "index": 9, "name": "manager", "comment": null}, "manager_customer_id": {"type": "double precision", "index": 10, "name": "manager_customer_id", "comment": null}, "optimization_score": {"type": "text", "index": 11, "name": "optimization_score", "comment": null}, "pay_per_conversion_eligibility_failure_reasons": {"type": "boolean", "index": 12, "name": "pay_per_conversion_eligibility_failure_reasons", "comment": null}, "test_account": {"type": "text", "index": 13, "name": "test_account", "comment": null}, "time_zone": {"type": "integer", "index": 14, "name": "time_zone", "comment": null}, "tracking_url_template": {"type": "integer", "index": 15, "name": "tracking_url_template", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_account_history_data"}, "seed.ad_reporting_integration_tests.google_ads_account_stats_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_account_stats_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "customer_id": {"type": "integer", "index": 2, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "active_view_impressions": {"type": "integer", "index": 5, "name": "active_view_impressions", "comment": null}, "active_view_measurability": {"type": "integer", "index": 6, "name": "active_view_measurability", "comment": null}, "active_view_measurable_cost_micros": {"type": "integer", "index": 7, "name": "active_view_measurable_cost_micros", "comment": null}, "active_view_measurable_impressions": {"type": "integer", "index": 8, "name": "active_view_measurable_impressions", "comment": null}, "active_view_viewability": {"type": "integer", "index": 9, "name": "active_view_viewability", "comment": null}, "ad_network_type": {"type": "text", "index": 10, "name": "ad_network_type", "comment": null}, "clicks": {"type": "integer", "index": 11, "name": "clicks", "comment": null}, "conversions": {"type": "integer", "index": 12, "name": "conversions", "comment": null}, "conversions_value": {"type": "integer", "index": 13, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 14, "name": "cost_micros", "comment": null}, "device": {"type": "text", "index": 15, "name": "device", "comment": null}, "impressions": {"type": "integer", "index": 16, "name": "impressions", "comment": null}, "interaction_event_types": {"type": "text", "index": 17, "name": "interaction_event_types", "comment": null}, "interactions": {"type": "integer", "index": 18, "name": "interactions", "comment": null}, "view_through_conversions": {"type": "integer", "index": 19, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_account_stats_data"}, "seed.ad_reporting_integration_tests.google_ads_ad_group_criterion_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_ad_group_criterion_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 2, "name": "ad_group_id", "comment": null}, "base_campaign_id": {"type": "bigint", "index": 3, "name": "base_campaign_id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 4, "name": "updated_at", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "type": {"type": "text", "index": 6, "name": "type", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}, "keyword_match_type": {"type": "text", "index": 8, "name": "keyword_match_type", "comment": null}, "keyword_text": {"type": "text", "index": 9, "name": "keyword_text", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_ad_group_criterion_history_data"}, "seed.ad_reporting_integration_tests.google_ads_ad_group_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_ad_group_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "type": {"type": "text", "index": 3, "name": "type", "comment": null}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_ad_group_history_data"}, "seed.ad_reporting_integration_tests.google_ads_ad_group_stats_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_ad_group_stats_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "customer_id": {"type": "bigint", "index": 2, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "active_view_impressions": {"type": "integer", "index": 5, "name": "active_view_impressions", "comment": null}, "active_view_measurability": {"type": "integer", "index": 6, "name": "active_view_measurability", "comment": null}, "active_view_measurable_cost_micros": {"type": "integer", "index": 7, "name": "active_view_measurable_cost_micros", "comment": null}, "active_view_measurable_impressions": {"type": "integer", "index": 8, "name": "active_view_measurable_impressions", "comment": null}, "active_view_viewability": {"type": "integer", "index": 9, "name": "active_view_viewability", "comment": null}, "ad_network_type": {"type": "text", "index": 10, "name": "ad_network_type", "comment": null}, "base_ad_group": {"type": "text", "index": 11, "name": "base_ad_group", "comment": null}, "campaign_base_campaign": {"type": "text", "index": 12, "name": "campaign_base_campaign", "comment": null}, "campaign_id": {"type": "bigint", "index": 13, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 14, "name": "clicks", "comment": null}, "conversions": {"type": "double precision", "index": 15, "name": "conversions", "comment": null}, "conversions_value": {"type": "integer", "index": 16, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 17, "name": "cost_micros", "comment": null}, "device": {"type": "text", "index": 18, "name": "device", "comment": null}, "id": {"type": "bigint", "index": 19, "name": "id", "comment": null}, "impressions": {"type": "integer", "index": 20, "name": "impressions", "comment": null}, "interaction_event_types": {"type": "text", "index": 21, "name": "interaction_event_types", "comment": null}, "interactions": {"type": "integer", "index": 22, "name": "interactions", "comment": null}, "view_through_conversions": {"type": "integer", "index": 23, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_ad_group_stats_data"}, "seed.ad_reporting_integration_tests.google_ads_ad_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_ad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "bigint", "index": 1, "name": "ad_group_id", "comment": null}, "id": {"type": "bigint", "index": 2, "name": "id", "comment": null}, "name": {"type": "integer", "index": 3, "name": "name", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 4, "name": "updated_at", "comment": null}, "type": {"type": "integer", "index": 5, "name": "type", "comment": null}, "status": {"type": "text", "index": 6, "name": "status", "comment": null}, "display_url": {"type": "integer", "index": 7, "name": "display_url", "comment": null}, "final_urls": {"type": "text", "index": 8, "name": "final_urls", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_ad_history_data"}, "seed.ad_reporting_integration_tests.google_ads_ad_stats_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_ad_stats_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"customer_id": {"type": "bigint", "index": 1, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "ad_group": {"type": "text", "index": 4, "name": "ad_group", "comment": null}, "keyword_ad_group_criterion": {"type": "text", "index": 5, "name": "keyword_ad_group_criterion", "comment": null}, "ad_network_type": {"type": "text", "index": 6, "name": "ad_network_type", "comment": null}, "device": {"type": "text", "index": 7, "name": "device", "comment": null}, "ad_id": {"type": "bigint", "index": 8, "name": "ad_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 9, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": null}, "cost_micros": {"type": "integer", "index": 11, "name": "cost_micros", "comment": null}, "impressions": {"type": "integer", "index": 12, "name": "impressions", "comment": null}, "conversions": {"type": "integer", "index": 13, "name": "conversions", "comment": null}, "conversions_value": {"type": "double precision", "index": 14, "name": "conversions_value", "comment": null}, "view_through_conversions": {"type": "integer", "index": 15, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_ad_stats_data"}, "seed.ad_reporting_integration_tests.google_ads_campaign_bid_modifier_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_campaign_bid_modifier_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "bigint", "index": 1, "name": "campaign_id", "comment": null}, "criterion_id": {"type": "bigint", "index": 2, "name": "criterion_id", "comment": null}, "bid_modifier": {"type": "double precision", "index": 3, "name": "bid_modifier", "comment": null}, "interaction_type": {"type": "text", "index": 4, "name": "interaction_type", "comment": null}, "interaction_event_types": {"type": "text", "index": 5, "name": "interaction_event_types", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 6, "name": "updated_at", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 7, "name": "_fivetran_active", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_campaign_bid_modifier_history_data"}, "seed.ad_reporting_integration_tests.google_ads_campaign_bidding_strategy_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_campaign_bidding_strategy_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "bigint", "index": 1, "name": "campaign_id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "cpc_bid_ceiling_micros": {"type": "integer", "index": 3, "name": "cpc_bid_ceiling_micros", "comment": null}, "cpc_bid_floor_micros": {"type": "integer", "index": 4, "name": "cpc_bid_floor_micros", "comment": null}, "enhanced_cpc": {"type": "boolean", "index": 5, "name": "enhanced_cpc", "comment": null}, "enhanced_cpc_enabled": {"type": "boolean", "index": 6, "name": "enhanced_cpc_enabled", "comment": null}, "location": {"type": "text", "index": 7, "name": "location", "comment": null}, "location_fraction_micros": {"type": "integer", "index": 8, "name": "location_fraction_micros", "comment": null}, "manual_cpa": {"type": "double precision", "index": 9, "name": "manual_cpa", "comment": null}, "manual_cpm": {"type": "double precision", "index": 10, "name": "manual_cpm", "comment": null}, "manual_cpv": {"type": "double precision", "index": 11, "name": "manual_cpv", "comment": null}, "name": {"type": "text", "index": 12, "name": "name", "comment": null}, "status": {"type": "text", "index": 13, "name": "status", "comment": null}, "target_cpa_micros": {"type": "integer", "index": 14, "name": "target_cpa_micros", "comment": null}, "target_cpm": {"type": "integer", "index": 15, "name": "target_cpm", "comment": null}, "target_roas": {"type": "double precision", "index": 16, "name": "target_roas", "comment": null}, "type": {"type": "text", "index": 17, "name": "type", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 18, "name": "_fivetran_active", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 19, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_campaign_bidding_strategy_history_data"}, "seed.ad_reporting_integration_tests.google_ads_campaign_budget_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_campaign_budget_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "amount_micros": {"type": "integer", "index": 4, "name": "amount_micros", "comment": null}, "delivery_method": {"type": "text", "index": 5, "name": "delivery_method", "comment": null}, "explicitly_shared": {"type": "boolean", "index": 6, "name": "explicitly_shared", "comment": null}, "name": {"type": "text", "index": 7, "name": "name", "comment": null}, "reference_count": {"type": "integer", "index": 8, "name": "reference_count", "comment": null}, "status": {"type": "text", "index": 9, "name": "status", "comment": null}, "has_recommended_budget": {"type": "boolean", "index": 10, "name": "has_recommended_budget", "comment": null}, "period": {"type": "text", "index": 11, "name": "period", "comment": null}, "recommended_budget_amount_micros": {"type": "integer", "index": 12, "name": "recommended_budget_amount_micros", "comment": null}, "total_amount_micros": {"type": "integer", "index": 13, "name": "total_amount_micros", "comment": null}, "type": {"type": "text", "index": 14, "name": "type", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 15, "name": "_fivetran_active", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 16, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_campaign_budget_history_data"}, "seed.ad_reporting_integration_tests.google_ads_campaign_criterion_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_campaign_criterion_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "geo_target_constant_id": {"type": "bigint", "index": 4, "name": "geo_target_constant_id", "comment": null}, "mobile_device_id": {"type": "bigint", "index": 5, "name": "mobile_device_id", "comment": null}, "operating_system_version_id": {"type": "bigint", "index": 6, "name": "operating_system_version_id", "comment": null}, "topic_constant_id": {"type": "bigint", "index": 7, "name": "topic_constant_id", "comment": null}, "user_interest_id": {"type": "bigint", "index": 8, "name": "user_interest_id", "comment": null}, "user_list_id": {"type": "bigint", "index": 9, "name": "user_list_id", "comment": null}, "age_range_type": {"type": "text", "index": 10, "name": "age_range_type", "comment": null}, "bid_modifier": {"type": "double precision", "index": 11, "name": "bid_modifier", "comment": null}, "carrier_country_code": {"type": "text", "index": 12, "name": "carrier_country_code", "comment": null}, "carrier_name": {"type": "text", "index": 13, "name": "carrier_name", "comment": null}, "content_label_type": {"type": "text", "index": 14, "name": "content_label_type", "comment": null}, "device_type": {"type": "text", "index": 15, "name": "device_type", "comment": null}, "display_name": {"type": "text", "index": 16, "name": "display_name", "comment": null}, "gender_type": {"type": "text", "index": 17, "name": "gender_type", "comment": null}, "income_range_type": {"type": "text", "index": 18, "name": "income_range_type", "comment": null}, "ip_block_ip_address": {"type": "text", "index": 19, "name": "ip_block_ip_address", "comment": null}, "negative": {"type": "boolean", "index": 20, "name": "negative", "comment": null}, "keyword_match_type": {"type": "text", "index": 21, "name": "keyword_match_type", "comment": null}, "keyword_text": {"type": "text", "index": 22, "name": "keyword_text", "comment": null}, "language_code": {"type": "text", "index": 23, "name": "language_code", "comment": null}, "language_name": {"type": "text", "index": 24, "name": "language_name", "comment": null}, "mobile_app_category_constant_id": {"type": "bigint", "index": 25, "name": "mobile_app_category_constant_id", "comment": null}, "mobile_app_category_constant_name": {"type": "text", "index": 26, "name": "mobile_app_category_constant_name", "comment": null}, "mobile_application_app_id": {"type": "text", "index": 27, "name": "mobile_application_app_id", "comment": null}, "mobile_application_name": {"type": "text", "index": 28, "name": "mobile_application_name", "comment": null}, "parental_status_type": {"type": "text", "index": 29, "name": "parental_status_type", "comment": null}, "placement_url": {"type": "text", "index": 30, "name": "placement_url", "comment": null}, "status": {"type": "text", "index": 31, "name": "status", "comment": null}, "type": {"type": "text", "index": 32, "name": "type", "comment": null}, "youtube_channel_id": {"type": "text", "index": 33, "name": "youtube_channel_id", "comment": null}, "youtube_video_id": {"type": "text", "index": 34, "name": "youtube_video_id", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 35, "name": "_fivetran_active", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 36, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_campaign_criterion_history_data"}, "seed.ad_reporting_integration_tests.google_ads_campaign_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "customer_id": {"type": "bigint", "index": 4, "name": "customer_id", "comment": null}, "advertising_channel_type": {"type": "text", "index": 5, "name": "advertising_channel_type", "comment": null}, "advertising_channel_subtype": {"type": "text", "index": 6, "name": "advertising_channel_subtype", "comment": null}, "start_date": {"type": "date", "index": 7, "name": "start_date", "comment": null}, "end_date": {"type": "date", "index": 8, "name": "end_date", "comment": null}, "serving_status": {"type": "text", "index": 9, "name": "serving_status", "comment": null}, "status": {"type": "text", "index": 10, "name": "status", "comment": null}, "tracking_url_template": {"type": "integer", "index": 11, "name": "tracking_url_template", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_campaign_history_data"}, "seed.ad_reporting_integration_tests.google_ads_campaign_stats_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_campaign_stats_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "customer_id": {"type": "bigint", "index": 2, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "active_view_impressions": {"type": "integer", "index": 5, "name": "active_view_impressions", "comment": null}, "active_view_measurability": {"type": "integer", "index": 6, "name": "active_view_measurability", "comment": null}, "active_view_measurable_cost_micros": {"type": "integer", "index": 7, "name": "active_view_measurable_cost_micros", "comment": null}, "active_view_measurable_impressions": {"type": "integer", "index": 8, "name": "active_view_measurable_impressions", "comment": null}, "active_view_viewability": {"type": "integer", "index": 9, "name": "active_view_viewability", "comment": null}, "ad_network_type": {"type": "text", "index": 10, "name": "ad_network_type", "comment": null}, "base_campaign": {"type": "text", "index": 11, "name": "base_campaign", "comment": null}, "clicks": {"type": "integer", "index": 12, "name": "clicks", "comment": null}, "conversions": {"type": "integer", "index": 13, "name": "conversions", "comment": null}, "conversions_value": {"type": "integer", "index": 14, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 15, "name": "cost_micros", "comment": null}, "device": {"type": "text", "index": 16, "name": "device", "comment": null}, "id": {"type": "bigint", "index": 17, "name": "id", "comment": null}, "impressions": {"type": "integer", "index": 18, "name": "impressions", "comment": null}, "interaction_event_types": {"type": "text", "index": 19, "name": "interaction_event_types", "comment": null}, "interactions": {"type": "integer", "index": 20, "name": "interactions", "comment": null}, "view_through_conversions": {"type": "integer", "index": 21, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_campaign_stats_data"}, "seed.ad_reporting_integration_tests.google_ads_keyword_stats_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_keyword_stats_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "customer_id": {"type": "bigint", "index": 2, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "active_view_impressions": {"type": "integer", "index": 5, "name": "active_view_impressions", "comment": null}, "active_view_measurability": {"type": "integer", "index": 6, "name": "active_view_measurability", "comment": null}, "active_view_measurable_cost_micros": {"type": "integer", "index": 7, "name": "active_view_measurable_cost_micros", "comment": null}, "active_view_measurable_impressions": {"type": "integer", "index": 8, "name": "active_view_measurable_impressions", "comment": null}, "active_view_viewability": {"type": "integer", "index": 9, "name": "active_view_viewability", "comment": null}, "ad_group_base_ad_group": {"type": "text", "index": 10, "name": "ad_group_base_ad_group", "comment": null}, "ad_group_criterion_criterion_id": {"type": "bigint", "index": 11, "name": "ad_group_criterion_criterion_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 12, "name": "ad_group_id", "comment": null}, "ad_network_type": {"type": "text", "index": 13, "name": "ad_network_type", "comment": null}, "campaign_base_campaign": {"type": "text", "index": 14, "name": "campaign_base_campaign", "comment": null}, "campaign_id": {"type": "bigint", "index": 15, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 16, "name": "clicks", "comment": null}, "conversions": {"type": "integer", "index": 17, "name": "conversions", "comment": null}, "conversions_value": {"type": "integer", "index": 18, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 19, "name": "cost_micros", "comment": null}, "device": {"type": "text", "index": 20, "name": "device", "comment": null}, "impressions": {"type": "integer", "index": 21, "name": "impressions", "comment": null}, "interaction_event_types": {"type": "text", "index": 22, "name": "interaction_event_types", "comment": null}, "interactions": {"type": "integer", "index": 23, "name": "interactions", "comment": null}, "view_through_conversions": {"type": "integer", "index": 24, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_keyword_stats_data"}, "seed.ad_reporting_integration_tests.google_ads_search_term_keyword_stats_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_search_term_keyword_stats_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 5, "name": "clicks", "comment": null}, "conversions": {"type": "double precision", "index": 6, "name": "conversions", "comment": null}, "conversions_value": {"type": "double precision", "index": 7, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 8, "name": "cost_micros", "comment": null}, "customer_id": {"type": "bigint", "index": 9, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 10, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 11, "name": "impressions", "comment": null}, "info_text": {"type": "text", "index": 12, "name": "info_text", "comment": null}, "keyword_ad_group_criterion": {"type": "text", "index": 13, "name": "keyword_ad_group_criterion", "comment": null}, "search_term": {"type": "text", "index": 14, "name": "search_term", "comment": null}, "search_term_match_type": {"type": "text", "index": 15, "name": "search_term_match_type", "comment": null}, "status": {"type": "text", "index": 16, "name": "status", "comment": null}, "view_through_conversions": {"type": "integer", "index": 17, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.google_ads_search_term_keyword_stats_data"}, "seed.ad_reporting_integration_tests.linkedin_ad_account_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_ad_account_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_modified_time": {"type": "timestamp without time zone", "index": 2, "name": "last_modified_time", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 3, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "currency": {"type": "text", "index": 5, "name": "currency", "comment": null}, "version_tag": {"type": "integer", "index": 6, "name": "version_tag", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.linkedin_ad_account_history_data"}, "seed.ad_reporting_integration_tests.linkedin_ad_analytics_by_campaign_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_ad_analytics_by_campaign_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "day": {"type": "timestamp without time zone", "index": 2, "name": "day", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "action_clicks": {"type": "integer", "index": 4, "name": "action_clicks", "comment": null}, "ad_unit_clicks": {"type": "integer", "index": 5, "name": "ad_unit_clicks", "comment": null}, "approximate_unique_impressions": {"type": "integer", "index": 6, "name": "approximate_unique_impressions", "comment": null}, "card_clicks": {"type": "integer", "index": 7, "name": "card_clicks", "comment": null}, "card_impressions": {"type": "integer", "index": 8, "name": "card_impressions", "comment": null}, "clicks": {"type": "integer", "index": 9, "name": "clicks", "comment": null}, "comment_likes": {"type": "integer", "index": 10, "name": "comment_likes", "comment": null}, "comments": {"type": "integer", "index": 11, "name": "comments", "comment": null}, "company_page_clicks": {"type": "integer", "index": 12, "name": "company_page_clicks", "comment": null}, "conversion_value_in_local_currency": {"type": "integer", "index": 13, "name": "conversion_value_in_local_currency", "comment": null}, "cost_in_local_currency": {"type": "double precision", "index": 14, "name": "cost_in_local_currency", "comment": null}, "cost_in_usd": {"type": "double precision", "index": 15, "name": "cost_in_usd", "comment": null}, "external_website_conversions": {"type": "bigint", "index": 16, "name": "external_website_conversions", "comment": null}, "external_website_post_click_conversions": {"type": "integer", "index": 17, "name": "external_website_post_click_conversions", "comment": null}, "external_website_post_view_conversions": {"type": "integer", "index": 18, "name": "external_website_post_view_conversions", "comment": null}, "follows": {"type": "integer", "index": 19, "name": "follows", "comment": null}, "full_screen_plays": {"type": "integer", "index": 20, "name": "full_screen_plays", "comment": null}, "impressions": {"type": "integer", "index": 21, "name": "impressions", "comment": null}, "landing_page_clicks": {"type": "integer", "index": 22, "name": "landing_page_clicks", "comment": null}, "lead_generation_mail_contact_info_shares": {"type": "integer", "index": 23, "name": "lead_generation_mail_contact_info_shares", "comment": null}, "lead_generation_mail_interested_clicks": {"type": "integer", "index": 24, "name": "lead_generation_mail_interested_clicks", "comment": null}, "likes": {"type": "integer", "index": 25, "name": "likes", "comment": null}, "one_click_lead_form_opens": {"type": "integer", "index": 26, "name": "one_click_lead_form_opens", "comment": null}, "one_click_leads": {"type": "integer", "index": 27, "name": "one_click_leads", "comment": null}, "opens": {"type": "integer", "index": 28, "name": "opens", "comment": null}, "other_engagements": {"type": "integer", "index": 29, "name": "other_engagements", "comment": null}, "shares": {"type": "integer", "index": 30, "name": "shares", "comment": null}, "text_url_clicks": {"type": "integer", "index": 31, "name": "text_url_clicks", "comment": null}, "total_engagements": {"type": "integer", "index": 32, "name": "total_engagements", "comment": null}, "video_completions": {"type": "integer", "index": 33, "name": "video_completions", "comment": null}, "video_first_quartile_completions": {"type": "integer", "index": 34, "name": "video_first_quartile_completions", "comment": null}, "video_midpoint_completions": {"type": "integer", "index": 35, "name": "video_midpoint_completions", "comment": null}, "video_starts": {"type": "integer", "index": 36, "name": "video_starts", "comment": null}, "video_third_quartile_completions": {"type": "integer", "index": 37, "name": "video_third_quartile_completions", "comment": null}, "video_views": {"type": "integer", "index": 38, "name": "video_views", "comment": null}, "viral_card_clicks": {"type": "integer", "index": 39, "name": "viral_card_clicks", "comment": null}, "viral_card_impressions": {"type": "integer", "index": 40, "name": "viral_card_impressions", "comment": null}, "viral_clicks": {"type": "integer", "index": 41, "name": "viral_clicks", "comment": null}, "viral_comment_likes": {"type": "integer", "index": 42, "name": "viral_comment_likes", "comment": null}, "viral_comments": {"type": "integer", "index": 43, "name": "viral_comments", "comment": null}, "viral_company_page_clicks": {"type": "integer", "index": 44, "name": "viral_company_page_clicks", "comment": null}, "viral_external_website_conversions": {"type": "integer", "index": 45, "name": "viral_external_website_conversions", "comment": null}, "viral_external_website_post_click_conversions": {"type": "integer", "index": 46, "name": "viral_external_website_post_click_conversions", "comment": null}, "viral_external_website_post_view_conversions": {"type": "integer", "index": 47, "name": "viral_external_website_post_view_conversions", "comment": null}, "viral_follows": {"type": "integer", "index": 48, "name": "viral_follows", "comment": null}, "viral_full_screen_plays": {"type": "integer", "index": 49, "name": "viral_full_screen_plays", "comment": null}, "viral_impressions": {"type": "integer", "index": 50, "name": "viral_impressions", "comment": null}, "viral_landing_page_clicks": {"type": "integer", "index": 51, "name": "viral_landing_page_clicks", "comment": null}, "viral_likes": {"type": "integer", "index": 52, "name": "viral_likes", "comment": null}, "viral_one_click_lead_form_opens": {"type": "integer", "index": 53, "name": "viral_one_click_lead_form_opens", "comment": null}, "viral_one_click_leads": {"type": "integer", "index": 54, "name": "viral_one_click_leads", "comment": null}, "viral_other_engagements": {"type": "integer", "index": 55, "name": "viral_other_engagements", "comment": null}, "viral_shares": {"type": "integer", "index": 56, "name": "viral_shares", "comment": null}, "viral_total_engagements": {"type": "integer", "index": 57, "name": "viral_total_engagements", "comment": null}, "viral_video_completions": {"type": "integer", "index": 58, "name": "viral_video_completions", "comment": null}, "viral_video_first_quartile_completions": {"type": "integer", "index": 59, "name": "viral_video_first_quartile_completions", "comment": null}, "viral_video_midpoint_completions": {"type": "integer", "index": 60, "name": "viral_video_midpoint_completions", "comment": null}, "viral_video_starts": {"type": "integer", "index": 61, "name": "viral_video_starts", "comment": null}, "viral_video_third_quartile_completions": {"type": "integer", "index": 62, "name": "viral_video_third_quartile_completions", "comment": null}, "viral_video_views": {"type": "integer", "index": 63, "name": "viral_video_views", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.linkedin_ad_analytics_by_campaign_data"}, "seed.ad_reporting_integration_tests.linkedin_ad_analytics_by_creative_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_ad_analytics_by_creative_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"creative_id": {"type": "integer", "index": 1, "name": "creative_id", "comment": null}, "day": {"type": "timestamp without time zone", "index": 2, "name": "day", "comment": null}, "action_clicks": {"type": "integer", "index": 3, "name": "action_clicks", "comment": null}, "card_clicks": {"type": "integer", "index": 4, "name": "card_clicks", "comment": null}, "ad_unit_clicks": {"type": "integer", "index": 5, "name": "ad_unit_clicks", "comment": null}, "landing_page_clicks": {"type": "integer", "index": 6, "name": "landing_page_clicks", "comment": null}, "clicks": {"type": "integer", "index": 7, "name": "clicks", "comment": null}, "approximate_unique_impressions": {"type": "integer", "index": 8, "name": "approximate_unique_impressions", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "card_impressions": {"type": "integer", "index": 10, "name": "card_impressions", "comment": null}, "cost_in_local_currency": {"type": "integer", "index": 11, "name": "cost_in_local_currency", "comment": null}, "cost_in_usd": {"type": "integer", "index": 12, "name": "cost_in_usd", "comment": null}, "comment_likes": {"type": "integer", "index": 13, "name": "comment_likes", "comment": null}, "comments": {"type": "integer", "index": 14, "name": "comments", "comment": null}, "company_page_clicks": {"type": "integer", "index": 15, "name": "company_page_clicks", "comment": null}, "conversion_value_in_local_currency": {"type": "integer", "index": 16, "name": "conversion_value_in_local_currency", "comment": null}, "external_website_conversions": {"type": "bigint", "index": 17, "name": "external_website_conversions", "comment": null}, "external_website_post_click_conversions": {"type": "integer", "index": 18, "name": "external_website_post_click_conversions", "comment": null}, "external_website_post_view_conversions": {"type": "integer", "index": 19, "name": "external_website_post_view_conversions", "comment": null}, "follows": {"type": "integer", "index": 20, "name": "follows", "comment": null}, "full_screen_plays": {"type": "integer", "index": 21, "name": "full_screen_plays", "comment": null}, "lead_generation_mail_contact_info_shares": {"type": "integer", "index": 22, "name": "lead_generation_mail_contact_info_shares", "comment": null}, "lead_generation_mail_interested_clicks": {"type": "integer", "index": 23, "name": "lead_generation_mail_interested_clicks", "comment": null}, "likes": {"type": "integer", "index": 24, "name": "likes", "comment": null}, "one_click_lead_form_opens": {"type": "integer", "index": 25, "name": "one_click_lead_form_opens", "comment": null}, "one_click_leads": {"type": "integer", "index": 26, "name": "one_click_leads", "comment": null}, "opens": {"type": "integer", "index": 27, "name": "opens", "comment": null}, "other_engagements": {"type": "integer", "index": 28, "name": "other_engagements", "comment": null}, "shares": {"type": "integer", "index": 29, "name": "shares", "comment": null}, "text_url_clicks": {"type": "integer", "index": 30, "name": "text_url_clicks", "comment": null}, "total_engagements": {"type": "integer", "index": 31, "name": "total_engagements", "comment": null}, "video_completions": {"type": "integer", "index": 32, "name": "video_completions", "comment": null}, "video_first_quartile_completions": {"type": "integer", "index": 33, "name": "video_first_quartile_completions", "comment": null}, "video_midpoint_completions": {"type": "integer", "index": 34, "name": "video_midpoint_completions", "comment": null}, "video_starts": {"type": "integer", "index": 35, "name": "video_starts", "comment": null}, "video_third_quartile_completions": {"type": "integer", "index": 36, "name": "video_third_quartile_completions", "comment": null}, "video_views": {"type": "integer", "index": 37, "name": "video_views", "comment": null}, "viral_card_clicks": {"type": "integer", "index": 38, "name": "viral_card_clicks", "comment": null}, "viral_card_impressions": {"type": "integer", "index": 39, "name": "viral_card_impressions", "comment": null}, "viral_clicks": {"type": "integer", "index": 40, "name": "viral_clicks", "comment": null}, "viral_comment_likes": {"type": "integer", "index": 41, "name": "viral_comment_likes", "comment": null}, "viral_comments": {"type": "integer", "index": 42, "name": "viral_comments", "comment": null}, "viral_company_page_clicks": {"type": "integer", "index": 43, "name": "viral_company_page_clicks", "comment": null}, "viral_external_website_conversions": {"type": "integer", "index": 44, "name": "viral_external_website_conversions", "comment": null}, "viral_external_website_post_click_conversions": {"type": "integer", "index": 45, "name": "viral_external_website_post_click_conversions", "comment": null}, "viral_external_website_post_view_conversions": {"type": "integer", "index": 46, "name": "viral_external_website_post_view_conversions", "comment": null}, "viral_follows": {"type": "integer", "index": 47, "name": "viral_follows", "comment": null}, "viral_full_screen_plays": {"type": "integer", "index": 48, "name": "viral_full_screen_plays", "comment": null}, "viral_impressions": {"type": "integer", "index": 49, "name": "viral_impressions", "comment": null}, "viral_landing_page_clicks": {"type": "integer", "index": 50, "name": "viral_landing_page_clicks", "comment": null}, "viral_likes": {"type": "integer", "index": 51, "name": "viral_likes", "comment": null}, "viral_one_click_lead_form_opens": {"type": "integer", "index": 52, "name": "viral_one_click_lead_form_opens", "comment": null}, "viral_one_click_leads": {"type": "integer", "index": 53, "name": "viral_one_click_leads", "comment": null}, "viral_other_engagements": {"type": "integer", "index": 54, "name": "viral_other_engagements", "comment": null}, "viral_shares": {"type": "integer", "index": 55, "name": "viral_shares", "comment": null}, "viral_total_engagements": {"type": "integer", "index": 56, "name": "viral_total_engagements", "comment": null}, "viral_video_completions": {"type": "integer", "index": 57, "name": "viral_video_completions", "comment": null}, "viral_video_first_quartile_completions": {"type": "integer", "index": 58, "name": "viral_video_first_quartile_completions", "comment": null}, "viral_video_midpoint_completions": {"type": "integer", "index": 59, "name": "viral_video_midpoint_completions", "comment": null}, "viral_video_starts": {"type": "integer", "index": 60, "name": "viral_video_starts", "comment": null}, "viral_video_third_quartile_completions": {"type": "integer", "index": 61, "name": "viral_video_third_quartile_completions", "comment": null}, "viral_video_views": {"type": "integer", "index": 62, "name": "viral_video_views", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.linkedin_ad_analytics_by_creative_data"}, "seed.ad_reporting_integration_tests.linkedin_ad_campaign_group_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_ad_campaign_group_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_modified_time": {"type": "timestamp without time zone", "index": 2, "name": "last_modified_time", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 4, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.linkedin_ad_campaign_group_history_data"}, "seed.ad_reporting_integration_tests.linkedin_ad_campaign_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_ad_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_modified_time": {"type": "timestamp without time zone", "index": 2, "name": "last_modified_time", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "campaign_group_id": {"type": "integer", "index": 4, "name": "campaign_group_id", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 5, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "version_tag": {"type": "integer", "index": 7, "name": "version_tag", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.linkedin_ad_campaign_history_data"}, "seed.ad_reporting_integration_tests.linkedin_ad_creative_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_ad_creative_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "intended_status": {"type": "character varying", "index": 3, "name": "intended_status", "comment": null}, "click_uri": {"type": "text", "index": 4, "name": "click_uri", "comment": null}, "last_modified_at": {"type": "timestamp without time zone", "index": 5, "name": "last_modified_at", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 6, "name": "created_time", "comment": null}, "text_ad_landing_page": {"type": "text", "index": 7, "name": "text_ad_landing_page", "comment": null}, "spotlight_landing_page": {"type": "text", "index": 8, "name": "spotlight_landing_page", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.linkedin_ad_creative_history_data"}, "seed.ad_reporting_integration_tests.linkedin_geo_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_geo_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "id": {"type": "integer", "index": 2, "name": "id", "comment": null}, "value": {"type": "text", "index": 3, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.linkedin_geo_data"}, "seed.ad_reporting_integration_tests.linkedin_monthly_ad_analytics_by_member_country_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_monthly_ad_analytics_by_member_country_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "month": {"type": "text", "index": 2, "name": "month", "comment": null}, "clicks": {"type": "integer", "index": 3, "name": "clicks", "comment": null}, "member_country": {"type": "integer", "index": 4, "name": "member_country", "comment": null}, "impressions": {"type": "integer", "index": 5, "name": "impressions", "comment": null}, "conversion_value_in_local_currency": {"type": "double precision", "index": 6, "name": "conversion_value_in_local_currency", "comment": null}, "cost_in_local_currency": {"type": "numeric", "index": 7, "name": "cost_in_local_currency", "comment": null}, "cost_in_usd": {"type": "numeric", "index": 8, "name": "cost_in_usd", "comment": null}, "external_website_post_click_conversions": {"type": "integer", "index": 9, "name": "external_website_post_click_conversions", "comment": null}, "one_click_leads": {"type": "integer", "index": 10, "name": "one_click_leads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.linkedin_monthly_ad_analytics_by_member_country_data"}, "seed.ad_reporting_integration_tests.linkedin_monthly_ad_analytics_by_member_region_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_monthly_ad_analytics_by_member_region_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "month": {"type": "text", "index": 2, "name": "month", "comment": null}, "clicks": {"type": "integer", "index": 3, "name": "clicks", "comment": null}, "member_region": {"type": "integer", "index": 4, "name": "member_region", "comment": null}, "impressions": {"type": "integer", "index": 5, "name": "impressions", "comment": null}, "conversion_value_in_local_currency": {"type": "double precision", "index": 6, "name": "conversion_value_in_local_currency", "comment": null}, "cost_in_local_currency": {"type": "numeric", "index": 7, "name": "cost_in_local_currency", "comment": null}, "cost_in_usd": {"type": "numeric", "index": 8, "name": "cost_in_usd", "comment": null}, "external_website_post_click_conversions": {"type": "integer", "index": 9, "name": "external_website_post_click_conversions", "comment": null}, "one_click_leads": {"type": "integer", "index": 10, "name": "one_click_leads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.linkedin_monthly_ad_analytics_by_member_region_data"}, "seed.ad_reporting_integration_tests.microsoft_ads_account_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_account_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "name": {"type": "character varying", "index": 2, "name": "name", "comment": null}, "last_modified_time": {"type": "timestamp without time zone", "index": 3, "name": "last_modified_time", "comment": null}, "time_zone": {"type": "text", "index": 4, "name": "time_zone", "comment": null}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_account_history_data"}, "seed.ad_reporting_integration_tests.microsoft_ads_account_performance_daily_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_account_performance_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "device_os": {"type": "text", "index": 3, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 4, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 5, "name": "network", "comment": null}, "currency_code": {"type": "text", "index": 6, "name": "currency_code", "comment": null}, "ad_distribution": {"type": "text", "index": 7, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 8, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 9, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 10, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 11, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 12, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 13, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 14, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 15, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 16, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 17, "name": "all_conversions_qualified", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_account_performance_daily_report_data"}, "seed.ad_reporting_integration_tests.microsoft_ads_ad_group_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_ad_group_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "modified_time": {"type": "timestamp without time zone", "index": 4, "name": "modified_time", "comment": null}, "start_date": {"type": "date", "index": 5, "name": "start_date", "comment": null}, "end_date": {"type": "integer", "index": 6, "name": "end_date", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_ad_group_history_data"}, "seed.ad_reporting_integration_tests.microsoft_ads_ad_group_performance_daily_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_ad_group_performance_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": null}, "device_os": {"type": "text", "index": 6, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 7, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 8, "name": "network", "comment": null}, "language": {"type": "text", "index": 9, "name": "language", "comment": null}, "ad_distribution": {"type": "text", "index": 10, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 11, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 12, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 13, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 14, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 15, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 16, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 17, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 18, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 19, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 20, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 21, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 22, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_ad_group_performance_daily_report_data"}, "seed.ad_reporting_integration_tests.microsoft_ads_ad_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_ad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "title_part_1": {"type": "text", "index": 2, "name": "title_part_1", "comment": null}, "final_url": {"type": "text", "index": 3, "name": "final_url", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "modified_time": {"type": "timestamp without time zone", "index": 5, "name": "modified_time", "comment": null}, "status": {"type": "text", "index": 6, "name": "status", "comment": null}, "type": {"type": "text", "index": 7, "name": "type", "comment": null}, "title": {"type": "text", "index": 8, "name": "title", "comment": null}, "title_part_2": {"type": "text", "index": 9, "name": "title_part_2", "comment": null}, "title_part_3": {"type": "text", "index": 10, "name": "title_part_3", "comment": null}, "domain": {"type": "text", "index": 11, "name": "domain", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_ad_history_data"}, "seed.ad_reporting_integration_tests.microsoft_ads_ad_performance_daily_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_ad_performance_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "bigint", "index": 5, "name": "ad_id", "comment": null}, "currency_code": {"type": "text", "index": 6, "name": "currency_code", "comment": null}, "device_os": {"type": "text", "index": 7, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 8, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 9, "name": "network", "comment": null}, "language": {"type": "text", "index": 10, "name": "language", "comment": null}, "ad_distribution": {"type": "text", "index": 11, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 12, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 13, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 14, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 15, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 16, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 17, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 18, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 19, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 20, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 21, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 22, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 23, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_ad_performance_daily_report_data"}, "seed.ad_reporting_integration_tests.microsoft_ads_campaign_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "account_id": {"type": "integer", "index": 3, "name": "account_id", "comment": null}, "modified_time": {"type": "timestamp without time zone", "index": 4, "name": "modified_time", "comment": null}, "type": {"type": "text", "index": 5, "name": "type", "comment": null}, "time_zone": {"type": "text", "index": 6, "name": "time_zone", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_campaign_history_data"}, "seed.ad_reporting_integration_tests.microsoft_ads_campaign_performance_daily_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_campaign_performance_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "currency_code": {"type": "text", "index": 4, "name": "currency_code", "comment": null}, "device_os": {"type": "text", "index": 5, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 6, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 7, "name": "network", "comment": null}, "ad_distribution": {"type": "text", "index": 8, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 9, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 10, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 11, "name": "top_vs_other", "comment": null}, "budget_association_status": {"type": "text", "index": 12, "name": "budget_association_status", "comment": null}, "budget_name": {"type": "text", "index": 13, "name": "budget_name", "comment": null}, "clicks": {"type": "integer", "index": 14, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 15, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 16, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 17, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 18, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 19, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 20, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 21, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 22, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_campaign_performance_daily_report_data"}, "seed.ad_reporting_integration_tests.microsoft_ads_geographic_performance_daily_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_geographic_performance_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "bigint", "index": 1, "name": "account_id", "comment": null}, "ad_distribution": {"type": "text", "index": 2, "name": "ad_distribution", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "all_conversions": {"type": "integer", "index": 4, "name": "all_conversions", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 5, "name": "all_conversions_qualified", "comment": null}, "all_revenue": {"type": "numeric", "index": 6, "name": "all_revenue", "comment": null}, "bid_match_type": {"type": "text", "index": 7, "name": "bid_match_type", "comment": null}, "campaign_id": {"type": "bigint", "index": 8, "name": "campaign_id", "comment": null}, "city": {"type": "text", "index": 9, "name": "city", "comment": null}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": null}, "conversions": {"type": "integer", "index": 11, "name": "conversions", "comment": null}, "conversions_qualified": {"type": "integer", "index": 12, "name": "conversions_qualified", "comment": null}, "country": {"type": "text", "index": 13, "name": "country", "comment": null}, "county": {"type": "text", "index": 14, "name": "county", "comment": null}, "currency_code": {"type": "text", "index": 15, "name": "currency_code", "comment": null}, "date": {"type": "date", "index": 16, "name": "date", "comment": null}, "delivered_match_type": {"type": "text", "index": 17, "name": "delivered_match_type", "comment": null}, "device_os": {"type": "text", "index": 18, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 19, "name": "device_type", "comment": null}, "impressions": {"type": "integer", "index": 20, "name": "impressions", "comment": null}, "language": {"type": "text", "index": 21, "name": "language", "comment": null}, "location_type": {"type": "text", "index": 22, "name": "location_type", "comment": null}, "metro_area": {"type": "text", "index": 23, "name": "metro_area", "comment": null}, "postal_code": {"type": "text", "index": 24, "name": "postal_code", "comment": null}, "network": {"type": "text", "index": 25, "name": "network", "comment": null}, "spend": {"type": "numeric", "index": 26, "name": "spend", "comment": null}, "state": {"type": "text", "index": 27, "name": "state", "comment": null}, "top_vs_other": {"type": "text", "index": 28, "name": "top_vs_other", "comment": null}, "revenue": {"type": "numeric", "index": 29, "name": "revenue", "comment": null}, "location_id": {"type": "bigint", "index": 30, "name": "location_id", "comment": null}, "goal": {"type": "text", "index": 31, "name": "goal", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_geographic_performance_daily_report_data"}, "seed.ad_reporting_integration_tests.microsoft_ads_keyword_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_keyword_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "modified_time": {"type": "timestamp without time zone", "index": 3, "name": "modified_time", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "match_type": {"type": "text", "index": 5, "name": "match_type", "comment": null}, "status": {"type": "text", "index": 6, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_keyword_history_data"}, "seed.ad_reporting_integration_tests.microsoft_ads_keyword_performance_daily_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_keyword_performance_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "bigint", "index": 5, "name": "ad_id", "comment": null}, "keyword_id": {"type": "bigint", "index": 6, "name": "keyword_id", "comment": null}, "currency_code": {"type": "text", "index": 7, "name": "currency_code", "comment": null}, "device_os": {"type": "text", "index": 8, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 9, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 10, "name": "network", "comment": null}, "language": {"type": "text", "index": 11, "name": "language", "comment": null}, "ad_distribution": {"type": "text", "index": 12, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 13, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 14, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 15, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 16, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 17, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 18, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 19, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 20, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 21, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 22, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 23, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 24, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_keyword_performance_daily_report_data"}, "seed.ad_reporting_integration_tests.microsoft_ads_search_performance_daily_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_search_performance_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "bigint", "index": 5, "name": "ad_id", "comment": null}, "keyword_id": {"type": "bigint", "index": 6, "name": "keyword_id", "comment": null}, "search_query": {"type": "text", "index": 7, "name": "search_query", "comment": null}, "device_os": {"type": "text", "index": 8, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 9, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 10, "name": "network", "comment": null}, "language": {"type": "text", "index": 11, "name": "language", "comment": null}, "bid_match_type": {"type": "text", "index": 12, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 13, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 14, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 15, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 16, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 17, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 18, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 19, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 20, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 21, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 22, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 23, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_search_performance_daily_report_data"}, "seed.ad_reporting_integration_tests.pinterest_ad_group_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_ad_group_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "campaign_id": {"type": "bigint", "index": 2, "name": "campaign_id", "comment": null}, "created_time": {"type": "text", "index": 3, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "status": {"type": "text", "index": 5, "name": "status", "comment": null}, "start_time": {"type": "text", "index": 6, "name": "start_time", "comment": null}, "end_time": {"type": "integer", "index": 7, "name": "end_time", "comment": null}, "_fivetran_synced": {"type": "text", "index": 8, "name": "_fivetran_synced", "comment": null}, "pacing_delivery_type": {"type": "text", "index": 9, "name": "pacing_delivery_type", "comment": null}, "placement_group": {"type": "text", "index": 10, "name": "placement_group", "comment": null}, "summary_status": {"type": "text", "index": 11, "name": "summary_status", "comment": null}, "ad_account_id": {"type": "bigint", "index": 12, "name": "ad_account_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.pinterest_ad_group_history_data"}, "seed.ad_reporting_integration_tests.pinterest_ad_group_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_ad_group_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "ad_group_id": {"type": "bigint", "index": 2, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "text", "index": 3, "name": "ad_group_name", "comment": null}, "ad_group_status": {"type": "text", "index": 4, "name": "ad_group_status", "comment": null}, "campaign_id": {"type": "bigint", "index": 5, "name": "campaign_id", "comment": null}, "advertiser_id": {"type": "bigint", "index": 6, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 8, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 9, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 10, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 11, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 12, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 13, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 14, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 15, "name": "total_conversions_value_in_micro_dollar", "comment": null}, "total_view_checkout": {"type": "integer", "index": 16, "name": "total_view_checkout", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.pinterest_ad_group_report_data"}, "seed.ad_reporting_integration_tests.pinterest_advertiser_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_advertiser_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_time": {"type": "timestamp without time zone", "index": 2, "name": "updated_time", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "billing_profile_status": {"type": "text", "index": 4, "name": "billing_profile_status", "comment": null}, "billing_type": {"type": "text", "index": 5, "name": "billing_type", "comment": null}, "country": {"type": "text", "index": 6, "name": "country", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 7, "name": "created_time", "comment": null}, "currency": {"type": "text", "index": 8, "name": "currency", "comment": null}, "merchant_id": {"type": "integer", "index": 9, "name": "merchant_id", "comment": null}, "name": {"type": "text", "index": 10, "name": "name", "comment": null}, "owner_user_id": {"type": "integer", "index": 11, "name": "owner_user_id", "comment": null}, "status": {"type": "text", "index": 12, "name": "status", "comment": null}, "owner_username": {"type": "text", "index": 13, "name": "owner_username", "comment": null}, "permissions": {"type": "text", "index": 14, "name": "permissions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.pinterest_advertiser_history_data"}, "seed.ad_reporting_integration_tests.pinterest_advertiser_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_advertiser_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "advertiser_id": {"type": "bigint", "index": 2, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 4, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 5, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 6, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 7, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 8, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 9, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 10, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 11, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.pinterest_advertiser_report_data"}, "seed.ad_reporting_integration_tests.pinterest_campaign_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "created_time": {"type": "text", "index": 2, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "status": {"type": "text", "index": 4, "name": "status", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "advertiser_id": {"type": "bigint", "index": 6, "name": "advertiser_id", "comment": null}, "default_ad_group_budget_in_micro_currency": {"type": "integer", "index": 7, "name": "default_ad_group_budget_in_micro_currency", "comment": null}, "is_automated_campaign": {"type": "boolean", "index": 8, "name": "is_automated_campaign", "comment": null}, "is_campaign_budget_optimization": {"type": "boolean", "index": 9, "name": "is_campaign_budget_optimization", "comment": null}, "is_flexible_daily_budgets": {"type": "boolean", "index": 10, "name": "is_flexible_daily_budgets", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.pinterest_campaign_history_data"}, "seed.ad_reporting_integration_tests.pinterest_campaign_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_campaign_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "campaign_id": {"type": "bigint", "index": 2, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "text", "index": 3, "name": "campaign_name", "comment": null}, "campaign_status": {"type": "text", "index": 4, "name": "campaign_status", "comment": null}, "advertiser_id": {"type": "bigint", "index": 5, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 7, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 8, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 9, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 10, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 11, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 12, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 13, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 14, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.pinterest_campaign_report_data"}, "seed.ad_reporting_integration_tests.pinterest_keyword_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_keyword_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "advertiser_id": {"type": "bigint", "index": 4, "name": "advertiser_id", "comment": null}, "archived": {"type": "boolean", "index": 5, "name": "archived", "comment": null}, "bid": {"type": "integer", "index": 6, "name": "bid", "comment": null}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": null}, "id": {"type": "bigint", "index": 8, "name": "id", "comment": null}, "match_type": {"type": "text", "index": 9, "name": "match_type", "comment": null}, "parent_type": {"type": "text", "index": 10, "name": "parent_type", "comment": null}, "value": {"type": "text", "index": 11, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.pinterest_keyword_history_data"}, "seed.ad_reporting_integration_tests.pinterest_keyword_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_keyword_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "keyword_id": {"type": "bigint", "index": 2, "name": "keyword_id", "comment": null}, "pin_promotion_id": {"type": "bigint", "index": 3, "name": "pin_promotion_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "text", "index": 5, "name": "ad_group_name", "comment": null}, "ad_group_status": {"type": "text", "index": 6, "name": "ad_group_status", "comment": null}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": null}, "advertiser_id": {"type": "bigint", "index": 8, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 9, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 10, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 11, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 12, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 13, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 14, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 15, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 16, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 17, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.pinterest_keyword_report_data"}, "seed.ad_reporting_integration_tests.pinterest_pin_promotion_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_pin_promotion_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 2, "name": "ad_group_id", "comment": null}, "created_time": {"type": "text", "index": 3, "name": "created_time", "comment": null}, "destination_url": {"type": "text", "index": 4, "name": "destination_url", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "pin_id": {"type": "bigint", "index": 6, "name": "pin_id", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}, "creative_type": {"type": "text", "index": 8, "name": "creative_type", "comment": null}, "_fivetran_synced": {"type": "text", "index": 9, "name": "_fivetran_synced", "comment": null}, "ad_account_id": {"type": "bigint", "index": 10, "name": "ad_account_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.pinterest_pin_promotion_history_data"}, "seed.ad_reporting_integration_tests.pinterest_pin_promotion_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_pin_promotion_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "pin_promotion_id": {"type": "bigint", "index": 2, "name": "pin_promotion_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": null}, "advertiser_id": {"type": "bigint", "index": 5, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 7, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 8, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 9, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 10, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 11, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 12, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 13, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 14, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.pinterest_pin_promotion_report_data"}, "seed.ad_reporting_integration_tests.pinterest_pin_promotion_targeting_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_pin_promotion_targeting_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "targeting_type": {"type": "text", "index": 3, "name": "targeting_type", "comment": null}, "targeting_value": {"type": "text", "index": 4, "name": "targeting_value", "comment": null}, "ad_group_id": {"type": "text", "index": 5, "name": "ad_group_id", "comment": null}, "advertiser_id": {"type": "text", "index": 6, "name": "advertiser_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": null}, "pin_promotion_id": {"type": "text", "index": 8, "name": "pin_promotion_id", "comment": null}, "clickthrough_1": {"type": "double precision", "index": 9, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "double precision", "index": 10, "name": "clickthrough_2", "comment": null}, "impression_1": {"type": "double precision", "index": 11, "name": "impression_1", "comment": null}, "impression_2": {"type": "double precision", "index": 12, "name": "impression_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 13, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 14, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 15, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 16, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.pinterest_pin_promotion_targeting_report_data"}, "seed.ad_reporting_integration_tests.pinterest_targeting_geo_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_targeting_geo_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"country_id": {"type": "text", "index": 1, "name": "country_id", "comment": null}, "country_name": {"type": "text", "index": 2, "name": "country_name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.pinterest_targeting_geo_data"}, "seed.ad_reporting_integration_tests.pinterest_targeting_geo_region_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_targeting_geo_region_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "country_id": {"type": "text", "index": 2, "name": "country_id", "comment": null}, "region_id": {"type": "text", "index": 3, "name": "region_id", "comment": null}, "region_name": {"type": "text", "index": 4, "name": "region_name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.pinterest_targeting_geo_region_data"}, "seed.ad_reporting_integration_tests.reddit_ads_account_conversions": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_account_conversions", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "avg_value": {"type": "double precision", "index": 3, "name": "avg_value", "comment": null}, "click_through_conversion_attribution_window_day": {"type": "integer", "index": 4, "name": "click_through_conversion_attribution_window_day", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 5, "name": "click_through_conversion_attribution_window_month", "comment": null}, "click_through_conversion_attribution_window_week": {"type": "integer", "index": 6, "name": "click_through_conversion_attribution_window_week", "comment": null}, "date": {"type": "date", "index": 7, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 8, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 9, "name": "total_items", "comment": null}, "total_value": {"type": "double precision", "index": 10, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_day": {"type": "integer", "index": 11, "name": "view_through_conversion_attribution_window_day", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 12, "name": "view_through_conversion_attribution_window_month", "comment": null}, "view_through_conversion_attribution_window_week": {"type": "integer", "index": 13, "name": "view_through_conversion_attribution_window_week", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_account_conversions"}, "seed.ad_reporting_integration_tests.reddit_ads_account_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_account_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying(255)", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "attribution_type": {"type": "text", "index": 3, "name": "attribution_type", "comment": null}, "click_attribution_window": {"type": "text", "index": 4, "name": "click_attribution_window", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 5, "name": "created_at", "comment": null}, "currency": {"type": "text", "index": 6, "name": "currency", "comment": null}, "status": {"type": "integer", "index": 7, "name": "status", "comment": null}, "time_zone_id": {"type": "text", "index": 8, "name": "time_zone_id", "comment": null}, "view_attribution_window": {"type": "text", "index": 9, "name": "view_attribution_window", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_account_data"}, "seed.ad_reporting_integration_tests.reddit_ads_account_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_account_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "app_install_metrics_add_payment_info": {"type": "integer", "index": 4, "name": "app_install_metrics_add_payment_info", "comment": null}, "app_install_metrics_add_to_cart": {"type": "integer", "index": 5, "name": "app_install_metrics_add_to_cart", "comment": null}, "app_install_metrics_app_launch": {"type": "integer", "index": 6, "name": "app_install_metrics_app_launch", "comment": null}, "app_install_metrics_completed_tutorial": {"type": "integer", "index": 7, "name": "app_install_metrics_completed_tutorial", "comment": null}, "app_install_metrics_install": {"type": "integer", "index": 8, "name": "app_install_metrics_install", "comment": null}, "app_install_metrics_level_achieved": {"type": "integer", "index": 9, "name": "app_install_metrics_level_achieved", "comment": null}, "app_install_metrics_purchase": {"type": "integer", "index": 10, "name": "app_install_metrics_purchase", "comment": null}, "app_install_metrics_search": {"type": "integer", "index": 11, "name": "app_install_metrics_search", "comment": null}, "app_install_metrics_sign_up": {"type": "integer", "index": 12, "name": "app_install_metrics_sign_up", "comment": null}, "app_install_metrics_spend": {"type": "integer", "index": 13, "name": "app_install_metrics_spend", "comment": null}, "app_install_metrics_spend_credits": {"type": "integer", "index": 14, "name": "app_install_metrics_spend_credits", "comment": null}, "app_install_metrics_view_content": {"type": "integer", "index": 15, "name": "app_install_metrics_view_content", "comment": null}, "clicks": {"type": "integer", "index": 16, "name": "clicks", "comment": null}, "comment_downvotes": {"type": "integer", "index": 17, "name": "comment_downvotes", "comment": null}, "comment_upvotes": {"type": "integer", "index": 18, "name": "comment_upvotes", "comment": null}, "comments_page_views": {"type": "integer", "index": 19, "name": "comments_page_views", "comment": null}, "conversion_roas": {"type": "integer", "index": 20, "name": "conversion_roas", "comment": null}, "cpc": {"type": "double precision", "index": 21, "name": "cpc", "comment": null}, "ctr": {"type": "double precision", "index": 22, "name": "ctr", "comment": null}, "ecpm": {"type": "double precision", "index": 23, "name": "ecpm", "comment": null}, "gallery_item_caption": {"type": "integer", "index": 24, "name": "gallery_item_caption", "comment": null}, "gallery_item_id": {"type": "integer", "index": 25, "name": "gallery_item_id", "comment": null}, "impressions": {"type": "integer", "index": 26, "name": "impressions", "comment": null}, "legacy_click_conversions_attribution_window_day": {"type": "integer", "index": 27, "name": "legacy_click_conversions_attribution_window_day", "comment": null}, "legacy_click_conversions_attribution_window_month": {"type": "integer", "index": 28, "name": "legacy_click_conversions_attribution_window_month", "comment": null}, "legacy_click_conversions_attribution_window_week": {"type": "integer", "index": 29, "name": "legacy_click_conversions_attribution_window_week", "comment": null}, "legacy_view_conversions_attribution_window_day": {"type": "integer", "index": 30, "name": "legacy_view_conversions_attribution_window_day", "comment": null}, "legacy_view_conversions_attribution_window_month": {"type": "integer", "index": 31, "name": "legacy_view_conversions_attribution_window_month", "comment": null}, "legacy_view_conversions_attribution_window_week": {"type": "integer", "index": 32, "name": "legacy_view_conversions_attribution_window_week", "comment": null}, "priority": {"type": "integer", "index": 33, "name": "priority", "comment": null}, "region": {"type": "integer", "index": 34, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 35, "name": "spend", "comment": null}, "video_fully_viewable_impressions": {"type": "integer", "index": 36, "name": "video_fully_viewable_impressions", "comment": null}, "video_plays_expanded": {"type": "integer", "index": 37, "name": "video_plays_expanded", "comment": null}, "video_plays_with_sound": {"type": "integer", "index": 38, "name": "video_plays_with_sound", "comment": null}, "video_started": {"type": "integer", "index": 39, "name": "video_started", "comment": null}, "video_viewable_impressions": {"type": "integer", "index": 40, "name": "video_viewable_impressions", "comment": null}, "video_watched_100_percent": {"type": "integer", "index": 41, "name": "video_watched_100_percent", "comment": null}, "video_watched_10_seconds": {"type": "integer", "index": 42, "name": "video_watched_10_seconds", "comment": null}, "video_watched_25_percent": {"type": "integer", "index": 43, "name": "video_watched_25_percent", "comment": null}, "video_watched_3_seconds": {"type": "integer", "index": 44, "name": "video_watched_3_seconds", "comment": null}, "video_watched_50_percent": {"type": "integer", "index": 45, "name": "video_watched_50_percent", "comment": null}, "video_watched_5_seconds": {"type": "integer", "index": 46, "name": "video_watched_5_seconds", "comment": null}, "video_watched_75_percent": {"type": "integer", "index": 47, "name": "video_watched_75_percent", "comment": null}, "video_watched_95_percent": {"type": "integer", "index": 48, "name": "video_watched_95_percent", "comment": null}, "viewable_impressions": {"type": "integer", "index": 49, "name": "viewable_impressions", "comment": null}, "viewer_comments": {"type": "integer", "index": 50, "name": "viewer_comments", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_account_report_data"}, "seed.ad_reporting_integration_tests.reddit_ads_ad_conversions": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_ad_conversions", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "ad_id": {"type": "character varying(255)", "index": 3, "name": "ad_id", "comment": null}, "avg_value": {"type": "double precision", "index": 4, "name": "avg_value", "comment": null}, "click_through_conversion_attribution_window_day": {"type": "integer", "index": 5, "name": "click_through_conversion_attribution_window_day", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 6, "name": "click_through_conversion_attribution_window_month", "comment": null}, "click_through_conversion_attribution_window_week": {"type": "integer", "index": 7, "name": "click_through_conversion_attribution_window_week", "comment": null}, "date": {"type": "date", "index": 8, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 9, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 10, "name": "total_items", "comment": null}, "total_value": {"type": "double precision", "index": 11, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_day": {"type": "integer", "index": 12, "name": "view_through_conversion_attribution_window_day", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 13, "name": "view_through_conversion_attribution_window_month", "comment": null}, "view_through_conversion_attribution_window_week": {"type": "integer", "index": 14, "name": "view_through_conversion_attribution_window_week", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_ad_conversions"}, "seed.ad_reporting_integration_tests.reddit_ads_ad_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_ad_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying(255)", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": null}, "ad_group_id": {"type": "character varying(255)", "index": 4, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 5, "name": "campaign_id", "comment": null}, "click_url": {"type": "text", "index": 6, "name": "click_url", "comment": null}, "configured_status": {"type": "text", "index": 7, "name": "configured_status", "comment": null}, "effective_status": {"type": "text", "index": 8, "name": "effective_status", "comment": null}, "is_processing": {"type": "boolean", "index": 9, "name": "is_processing", "comment": null}, "name": {"type": "text", "index": 10, "name": "name", "comment": null}, "post_id": {"type": "text", "index": 11, "name": "post_id", "comment": null}, "post_url": {"type": "integer", "index": 12, "name": "post_url", "comment": null}, "preview_expiry": {"type": "integer", "index": 13, "name": "preview_expiry", "comment": null}, "preview_url": {"type": "integer", "index": 14, "name": "preview_url", "comment": null}, "rejection_reason": {"type": "integer", "index": 15, "name": "rejection_reason", "comment": null}, "search_term": {"type": "integer", "index": 16, "name": "search_term", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_ad_data"}, "seed.ad_reporting_integration_tests.reddit_ads_ad_group_conversions": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_ad_group_conversions", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "ad_group_id": {"type": "character varying(255)", "index": 3, "name": "ad_group_id", "comment": null}, "avg_value": {"type": "double precision", "index": 4, "name": "avg_value", "comment": null}, "click_through_conversion_attribution_window_day": {"type": "integer", "index": 5, "name": "click_through_conversion_attribution_window_day", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 6, "name": "click_through_conversion_attribution_window_month", "comment": null}, "click_through_conversion_attribution_window_week": {"type": "integer", "index": 7, "name": "click_through_conversion_attribution_window_week", "comment": null}, "date": {"type": "date", "index": 8, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 9, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 10, "name": "total_items", "comment": null}, "total_value": {"type": "double precision", "index": 11, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_day": {"type": "integer", "index": 12, "name": "view_through_conversion_attribution_window_day", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 13, "name": "view_through_conversion_attribution_window_month", "comment": null}, "view_through_conversion_attribution_window_week": {"type": "integer", "index": 14, "name": "view_through_conversion_attribution_window_week", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_ad_group_conversions"}, "seed.ad_reporting_integration_tests.reddit_ads_ad_group_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_ad_group_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "id": {"type": "character varying(255)", "index": 2, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "bid_strategy": {"type": "text", "index": 4, "name": "bid_strategy", "comment": null}, "bid_value": {"type": "integer", "index": 5, "name": "bid_value", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 6, "name": "campaign_id", "comment": null}, "configured_status": {"type": "text", "index": 7, "name": "configured_status", "comment": null}, "effective_status": {"type": "text", "index": 8, "name": "effective_status", "comment": null}, "end_time": {"type": "timestamp without time zone", "index": 9, "name": "end_time", "comment": null}, "expand_targeting": {"type": "boolean", "index": 10, "name": "expand_targeting", "comment": null}, "goal_type": {"type": "text", "index": 11, "name": "goal_type", "comment": null}, "goal_value": {"type": "integer", "index": 12, "name": "goal_value", "comment": null}, "is_processing": {"type": "boolean", "index": 13, "name": "is_processing", "comment": null}, "name": {"type": "text", "index": 14, "name": "name", "comment": null}, "optimization_strategy_type": {"type": "integer", "index": 15, "name": "optimization_strategy_type", "comment": null}, "start_time": {"type": "timestamp without time zone", "index": 16, "name": "start_time", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_ad_group_data"}, "seed.ad_reporting_integration_tests.reddit_ads_ad_group_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_ad_group_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "ad_group_id": {"type": "character varying(255)", "index": 2, "name": "ad_group_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "app_install_metrics_add_payment_info": {"type": "integer", "index": 5, "name": "app_install_metrics_add_payment_info", "comment": null}, "app_install_metrics_add_to_cart": {"type": "integer", "index": 6, "name": "app_install_metrics_add_to_cart", "comment": null}, "app_install_metrics_app_launch": {"type": "integer", "index": 7, "name": "app_install_metrics_app_launch", "comment": null}, "app_install_metrics_completed_tutorial": {"type": "integer", "index": 8, "name": "app_install_metrics_completed_tutorial", "comment": null}, "app_install_metrics_install": {"type": "integer", "index": 9, "name": "app_install_metrics_install", "comment": null}, "app_install_metrics_level_achieved": {"type": "integer", "index": 10, "name": "app_install_metrics_level_achieved", "comment": null}, "app_install_metrics_purchase": {"type": "integer", "index": 11, "name": "app_install_metrics_purchase", "comment": null}, "app_install_metrics_search": {"type": "integer", "index": 12, "name": "app_install_metrics_search", "comment": null}, "app_install_metrics_sign_up": {"type": "integer", "index": 13, "name": "app_install_metrics_sign_up", "comment": null}, "app_install_metrics_spend": {"type": "integer", "index": 14, "name": "app_install_metrics_spend", "comment": null}, "app_install_metrics_spend_credits": {"type": "integer", "index": 15, "name": "app_install_metrics_spend_credits", "comment": null}, "app_install_metrics_view_content": {"type": "integer", "index": 16, "name": "app_install_metrics_view_content", "comment": null}, "clicks": {"type": "integer", "index": 17, "name": "clicks", "comment": null}, "comment_downvotes": {"type": "integer", "index": 18, "name": "comment_downvotes", "comment": null}, "comment_upvotes": {"type": "integer", "index": 19, "name": "comment_upvotes", "comment": null}, "comments_page_views": {"type": "integer", "index": 20, "name": "comments_page_views", "comment": null}, "conversion_roas": {"type": "integer", "index": 21, "name": "conversion_roas", "comment": null}, "cpc": {"type": "double precision", "index": 22, "name": "cpc", "comment": null}, "ctr": {"type": "double precision", "index": 23, "name": "ctr", "comment": null}, "ecpm": {"type": "double precision", "index": 24, "name": "ecpm", "comment": null}, "gallery_item_caption": {"type": "integer", "index": 25, "name": "gallery_item_caption", "comment": null}, "gallery_item_id": {"type": "integer", "index": 26, "name": "gallery_item_id", "comment": null}, "impressions": {"type": "integer", "index": 27, "name": "impressions", "comment": null}, "legacy_click_conversions_attribution_window_day": {"type": "integer", "index": 28, "name": "legacy_click_conversions_attribution_window_day", "comment": null}, "legacy_click_conversions_attribution_window_month": {"type": "integer", "index": 29, "name": "legacy_click_conversions_attribution_window_month", "comment": null}, "legacy_click_conversions_attribution_window_week": {"type": "integer", "index": 30, "name": "legacy_click_conversions_attribution_window_week", "comment": null}, "legacy_view_conversions_attribution_window_day": {"type": "integer", "index": 31, "name": "legacy_view_conversions_attribution_window_day", "comment": null}, "legacy_view_conversions_attribution_window_month": {"type": "integer", "index": 32, "name": "legacy_view_conversions_attribution_window_month", "comment": null}, "legacy_view_conversions_attribution_window_week": {"type": "integer", "index": 33, "name": "legacy_view_conversions_attribution_window_week", "comment": null}, "priority": {"type": "integer", "index": 34, "name": "priority", "comment": null}, "region": {"type": "integer", "index": 35, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 36, "name": "spend", "comment": null}, "video_fully_viewable_impressions": {"type": "integer", "index": 37, "name": "video_fully_viewable_impressions", "comment": null}, "video_plays_expanded": {"type": "integer", "index": 38, "name": "video_plays_expanded", "comment": null}, "video_plays_with_sound": {"type": "integer", "index": 39, "name": "video_plays_with_sound", "comment": null}, "video_started": {"type": "integer", "index": 40, "name": "video_started", "comment": null}, "video_viewable_impressions": {"type": "integer", "index": 41, "name": "video_viewable_impressions", "comment": null}, "video_watched_100_percent": {"type": "integer", "index": 42, "name": "video_watched_100_percent", "comment": null}, "video_watched_10_seconds": {"type": "integer", "index": 43, "name": "video_watched_10_seconds", "comment": null}, "video_watched_25_percent": {"type": "integer", "index": 44, "name": "video_watched_25_percent", "comment": null}, "video_watched_3_seconds": {"type": "integer", "index": 45, "name": "video_watched_3_seconds", "comment": null}, "video_watched_50_percent": {"type": "integer", "index": 46, "name": "video_watched_50_percent", "comment": null}, "video_watched_5_seconds": {"type": "integer", "index": 47, "name": "video_watched_5_seconds", "comment": null}, "video_watched_75_percent": {"type": "integer", "index": 48, "name": "video_watched_75_percent", "comment": null}, "video_watched_95_percent": {"type": "integer", "index": 49, "name": "video_watched_95_percent", "comment": null}, "viewable_impressions": {"type": "integer", "index": 50, "name": "viewable_impressions", "comment": null}, "viewer_comments": {"type": "integer", "index": 51, "name": "viewer_comments", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_ad_group_report_data"}, "seed.ad_reporting_integration_tests.reddit_ads_ad_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_ad_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "ad_id": {"type": "character varying(255)", "index": 2, "name": "ad_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "app_install_metrics_add_payment_info": {"type": "integer", "index": 5, "name": "app_install_metrics_add_payment_info", "comment": null}, "app_install_metrics_add_to_cart": {"type": "integer", "index": 6, "name": "app_install_metrics_add_to_cart", "comment": null}, "app_install_metrics_app_launch": {"type": "integer", "index": 7, "name": "app_install_metrics_app_launch", "comment": null}, "app_install_metrics_completed_tutorial": {"type": "integer", "index": 8, "name": "app_install_metrics_completed_tutorial", "comment": null}, "app_install_metrics_install": {"type": "integer", "index": 9, "name": "app_install_metrics_install", "comment": null}, "app_install_metrics_level_achieved": {"type": "integer", "index": 10, "name": "app_install_metrics_level_achieved", "comment": null}, "app_install_metrics_purchase": {"type": "integer", "index": 11, "name": "app_install_metrics_purchase", "comment": null}, "app_install_metrics_search": {"type": "integer", "index": 12, "name": "app_install_metrics_search", "comment": null}, "app_install_metrics_sign_up": {"type": "integer", "index": 13, "name": "app_install_metrics_sign_up", "comment": null}, "app_install_metrics_spend": {"type": "integer", "index": 14, "name": "app_install_metrics_spend", "comment": null}, "app_install_metrics_spend_credits": {"type": "integer", "index": 15, "name": "app_install_metrics_spend_credits", "comment": null}, "app_install_metrics_view_content": {"type": "integer", "index": 16, "name": "app_install_metrics_view_content", "comment": null}, "clicks": {"type": "integer", "index": 17, "name": "clicks", "comment": null}, "comment_downvotes": {"type": "integer", "index": 18, "name": "comment_downvotes", "comment": null}, "comment_upvotes": {"type": "integer", "index": 19, "name": "comment_upvotes", "comment": null}, "comments_page_views": {"type": "integer", "index": 20, "name": "comments_page_views", "comment": null}, "conversion_roas": {"type": "integer", "index": 21, "name": "conversion_roas", "comment": null}, "cpc": {"type": "double precision", "index": 22, "name": "cpc", "comment": null}, "ctr": {"type": "double precision", "index": 23, "name": "ctr", "comment": null}, "ecpm": {"type": "double precision", "index": 24, "name": "ecpm", "comment": null}, "gallery_item_caption": {"type": "integer", "index": 25, "name": "gallery_item_caption", "comment": null}, "gallery_item_id": {"type": "integer", "index": 26, "name": "gallery_item_id", "comment": null}, "impressions": {"type": "integer", "index": 27, "name": "impressions", "comment": null}, "legacy_click_conversions_attribution_window_day": {"type": "integer", "index": 28, "name": "legacy_click_conversions_attribution_window_day", "comment": null}, "legacy_click_conversions_attribution_window_month": {"type": "integer", "index": 29, "name": "legacy_click_conversions_attribution_window_month", "comment": null}, "legacy_click_conversions_attribution_window_week": {"type": "integer", "index": 30, "name": "legacy_click_conversions_attribution_window_week", "comment": null}, "legacy_view_conversions_attribution_window_day": {"type": "integer", "index": 31, "name": "legacy_view_conversions_attribution_window_day", "comment": null}, "legacy_view_conversions_attribution_window_month": {"type": "integer", "index": 32, "name": "legacy_view_conversions_attribution_window_month", "comment": null}, "legacy_view_conversions_attribution_window_week": {"type": "integer", "index": 33, "name": "legacy_view_conversions_attribution_window_week", "comment": null}, "priority": {"type": "integer", "index": 34, "name": "priority", "comment": null}, "region": {"type": "integer", "index": 35, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 36, "name": "spend", "comment": null}, "video_fully_viewable_impressions": {"type": "integer", "index": 37, "name": "video_fully_viewable_impressions", "comment": null}, "video_plays_expanded": {"type": "integer", "index": 38, "name": "video_plays_expanded", "comment": null}, "video_plays_with_sound": {"type": "integer", "index": 39, "name": "video_plays_with_sound", "comment": null}, "video_started": {"type": "integer", "index": 40, "name": "video_started", "comment": null}, "video_viewable_impressions": {"type": "integer", "index": 41, "name": "video_viewable_impressions", "comment": null}, "video_watched_100_percent": {"type": "integer", "index": 42, "name": "video_watched_100_percent", "comment": null}, "video_watched_10_seconds": {"type": "integer", "index": 43, "name": "video_watched_10_seconds", "comment": null}, "video_watched_25_percent": {"type": "integer", "index": 44, "name": "video_watched_25_percent", "comment": null}, "video_watched_3_seconds": {"type": "integer", "index": 45, "name": "video_watched_3_seconds", "comment": null}, "video_watched_50_percent": {"type": "integer", "index": 46, "name": "video_watched_50_percent", "comment": null}, "video_watched_5_seconds": {"type": "integer", "index": 47, "name": "video_watched_5_seconds", "comment": null}, "video_watched_75_percent": {"type": "integer", "index": 48, "name": "video_watched_75_percent", "comment": null}, "video_watched_95_percent": {"type": "integer", "index": 49, "name": "video_watched_95_percent", "comment": null}, "viewable_impressions": {"type": "integer", "index": 50, "name": "viewable_impressions", "comment": null}, "viewer_comments": {"type": "integer", "index": 51, "name": "viewer_comments", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_ad_report_data"}, "seed.ad_reporting_integration_tests.reddit_ads_business_account_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_business_account_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying(255)", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "attribution_type": {"type": "text", "index": 3, "name": "attribution_type", "comment": null}, "click_attribution_window": {"type": "text", "index": 4, "name": "click_attribution_window", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 5, "name": "created_at", "comment": null}, "currency": {"type": "text", "index": 6, "name": "currency", "comment": null}, "status": {"type": "integer", "index": 7, "name": "status", "comment": null}, "time_zone_id": {"type": "text", "index": 8, "name": "time_zone_id", "comment": null}, "view_attribution_window": {"type": "text", "index": 9, "name": "view_attribution_window", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_business_account_data"}, "seed.ad_reporting_integration_tests.reddit_ads_campaign_conversions": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_campaign_conversions", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "avg_value": {"type": "double precision", "index": 3, "name": "avg_value", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 4, "name": "campaign_id", "comment": null}, "click_through_conversion_attribution_window_day": {"type": "integer", "index": 5, "name": "click_through_conversion_attribution_window_day", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 6, "name": "click_through_conversion_attribution_window_month", "comment": null}, "click_through_conversion_attribution_window_week": {"type": "integer", "index": 7, "name": "click_through_conversion_attribution_window_week", "comment": null}, "date": {"type": "date", "index": 8, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 9, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 10, "name": "total_items", "comment": null}, "total_value": {"type": "double precision", "index": 11, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_day": {"type": "integer", "index": 12, "name": "view_through_conversion_attribution_window_day", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 13, "name": "view_through_conversion_attribution_window_month", "comment": null}, "view_through_conversion_attribution_window_week": {"type": "integer", "index": 14, "name": "view_through_conversion_attribution_window_week", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_campaign_conversions"}, "seed.ad_reporting_integration_tests.reddit_ads_campaign_country_conversions_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_campaign_country_conversions_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 3, "name": "campaign_id", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 4, "name": "click_through_conversion_attribution_window_month", "comment": null}, "country": {"type": "text", "index": 5, "name": "country", "comment": null}, "date": {"type": "date", "index": 6, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 7, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 8, "name": "total_items", "comment": null}, "total_value": {"type": "integer", "index": 9, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 10, "name": "view_through_conversion_attribution_window_month", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_campaign_country_conversions_report_data"}, "seed.ad_reporting_integration_tests.reddit_ads_campaign_country_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_campaign_country_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 3, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 4, "name": "clicks", "comment": null}, "country": {"type": "text", "index": 5, "name": "country", "comment": null}, "date": {"type": "date", "index": 6, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": null}, "region": {"type": "text", "index": 8, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 9, "name": "spend", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_campaign_country_report_data"}, "seed.ad_reporting_integration_tests.reddit_ads_campaign_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_campaign_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying(255)", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": null}, "configured_status": {"type": "text", "index": 4, "name": "configured_status", "comment": null}, "effective_status": {"type": "text", "index": 5, "name": "effective_status", "comment": null}, "funding_instrument_id": {"type": "integer", "index": 6, "name": "funding_instrument_id", "comment": null}, "is_processing": {"type": "boolean", "index": 7, "name": "is_processing", "comment": null}, "name": {"type": "text", "index": 8, "name": "name", "comment": null}, "objective": {"type": "text", "index": 9, "name": "objective", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_campaign_data"}, "seed.ad_reporting_integration_tests.reddit_ads_campaign_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_campaign_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 2, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "app_install_metrics_add_payment_info": {"type": "integer", "index": 5, "name": "app_install_metrics_add_payment_info", "comment": null}, "app_install_metrics_add_to_cart": {"type": "integer", "index": 6, "name": "app_install_metrics_add_to_cart", "comment": null}, "app_install_metrics_app_launch": {"type": "integer", "index": 7, "name": "app_install_metrics_app_launch", "comment": null}, "app_install_metrics_completed_tutorial": {"type": "integer", "index": 8, "name": "app_install_metrics_completed_tutorial", "comment": null}, "app_install_metrics_install": {"type": "integer", "index": 9, "name": "app_install_metrics_install", "comment": null}, "app_install_metrics_level_achieved": {"type": "integer", "index": 10, "name": "app_install_metrics_level_achieved", "comment": null}, "app_install_metrics_purchase": {"type": "integer", "index": 11, "name": "app_install_metrics_purchase", "comment": null}, "app_install_metrics_search": {"type": "integer", "index": 12, "name": "app_install_metrics_search", "comment": null}, "app_install_metrics_sign_up": {"type": "integer", "index": 13, "name": "app_install_metrics_sign_up", "comment": null}, "app_install_metrics_spend": {"type": "integer", "index": 14, "name": "app_install_metrics_spend", "comment": null}, "app_install_metrics_spend_credits": {"type": "integer", "index": 15, "name": "app_install_metrics_spend_credits", "comment": null}, "app_install_metrics_view_content": {"type": "integer", "index": 16, "name": "app_install_metrics_view_content", "comment": null}, "clicks": {"type": "integer", "index": 17, "name": "clicks", "comment": null}, "comment_downvotes": {"type": "integer", "index": 18, "name": "comment_downvotes", "comment": null}, "comment_upvotes": {"type": "integer", "index": 19, "name": "comment_upvotes", "comment": null}, "comments_page_views": {"type": "integer", "index": 20, "name": "comments_page_views", "comment": null}, "conversion_roas": {"type": "integer", "index": 21, "name": "conversion_roas", "comment": null}, "cpc": {"type": "double precision", "index": 22, "name": "cpc", "comment": null}, "ctr": {"type": "double precision", "index": 23, "name": "ctr", "comment": null}, "ecpm": {"type": "double precision", "index": 24, "name": "ecpm", "comment": null}, "gallery_item_caption": {"type": "integer", "index": 25, "name": "gallery_item_caption", "comment": null}, "gallery_item_id": {"type": "integer", "index": 26, "name": "gallery_item_id", "comment": null}, "impressions": {"type": "integer", "index": 27, "name": "impressions", "comment": null}, "legacy_click_conversions_attribution_window_day": {"type": "integer", "index": 28, "name": "legacy_click_conversions_attribution_window_day", "comment": null}, "legacy_click_conversions_attribution_window_month": {"type": "integer", "index": 29, "name": "legacy_click_conversions_attribution_window_month", "comment": null}, "legacy_click_conversions_attribution_window_week": {"type": "integer", "index": 30, "name": "legacy_click_conversions_attribution_window_week", "comment": null}, "legacy_view_conversions_attribution_window_day": {"type": "integer", "index": 31, "name": "legacy_view_conversions_attribution_window_day", "comment": null}, "legacy_view_conversions_attribution_window_month": {"type": "integer", "index": 32, "name": "legacy_view_conversions_attribution_window_month", "comment": null}, "legacy_view_conversions_attribution_window_week": {"type": "integer", "index": 33, "name": "legacy_view_conversions_attribution_window_week", "comment": null}, "priority": {"type": "integer", "index": 34, "name": "priority", "comment": null}, "region": {"type": "integer", "index": 35, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 36, "name": "spend", "comment": null}, "video_fully_viewable_impressions": {"type": "integer", "index": 37, "name": "video_fully_viewable_impressions", "comment": null}, "video_plays_expanded": {"type": "integer", "index": 38, "name": "video_plays_expanded", "comment": null}, "video_plays_with_sound": {"type": "integer", "index": 39, "name": "video_plays_with_sound", "comment": null}, "video_started": {"type": "integer", "index": 40, "name": "video_started", "comment": null}, "video_viewable_impressions": {"type": "integer", "index": 41, "name": "video_viewable_impressions", "comment": null}, "video_watched_100_percent": {"type": "integer", "index": 42, "name": "video_watched_100_percent", "comment": null}, "video_watched_10_seconds": {"type": "integer", "index": 43, "name": "video_watched_10_seconds", "comment": null}, "video_watched_25_percent": {"type": "integer", "index": 44, "name": "video_watched_25_percent", "comment": null}, "video_watched_3_seconds": {"type": "integer", "index": 45, "name": "video_watched_3_seconds", "comment": null}, "video_watched_50_percent": {"type": "integer", "index": 46, "name": "video_watched_50_percent", "comment": null}, "video_watched_5_seconds": {"type": "integer", "index": 47, "name": "video_watched_5_seconds", "comment": null}, "video_watched_75_percent": {"type": "integer", "index": 48, "name": "video_watched_75_percent", "comment": null}, "video_watched_95_percent": {"type": "integer", "index": 49, "name": "video_watched_95_percent", "comment": null}, "viewable_impressions": {"type": "integer", "index": 50, "name": "viewable_impressions", "comment": null}, "viewer_comments": {"type": "integer", "index": 51, "name": "viewer_comments", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_campaign_report_data"}, "seed.ad_reporting_integration_tests.snapchat_ad_account_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_ad_account_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.snapchat_ad_account_history_data"}, "seed.ad_reporting_integration_tests.snapchat_ad_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_ad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "ad_squad_id": {"type": "text", "index": 2, "name": "ad_squad_id", "comment": null}, "creative_id": {"type": "text", "index": 3, "name": "creative_id", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.snapchat_ad_history_data"}, "seed.ad_reporting_integration_tests.snapchat_ad_hourly_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_ad_hourly_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "text", "index": 1, "name": "ad_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 3, "name": "impressions", "comment": null}, "spend": {"type": "integer", "index": 4, "name": "spend", "comment": null}, "swipes": {"type": "integer", "index": 5, "name": "swipes", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 6, "name": "conversion_purchases_value", "comment": null}, "conversion_add_billing": {"type": "integer", "index": 7, "name": "conversion_add_billing", "comment": null}, "conversion_add_cart": {"type": "integer", "index": 8, "name": "conversion_add_cart", "comment": null}, "conversion_app_opens": {"type": "integer", "index": 9, "name": "conversion_app_opens", "comment": null}, "conversion_level_completes": {"type": "integer", "index": 10, "name": "conversion_level_completes", "comment": null}, "conversion_page_views": {"type": "integer", "index": 11, "name": "conversion_page_views", "comment": null}, "conversion_purchases": {"type": "integer", "index": 12, "name": "conversion_purchases", "comment": null}, "conversion_save": {"type": "integer", "index": 13, "name": "conversion_save", "comment": null}, "conversion_searches": {"type": "integer", "index": 14, "name": "conversion_searches", "comment": null}, "conversion_sign_ups": {"type": "integer", "index": 15, "name": "conversion_sign_ups", "comment": null}, "conversion_start_checkout": {"type": "integer", "index": 16, "name": "conversion_start_checkout", "comment": null}, "conversion_view_content": {"type": "integer", "index": 17, "name": "conversion_view_content", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.snapchat_ad_hourly_report_data"}, "seed.ad_reporting_integration_tests.snapchat_ad_squad_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_ad_squad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "campaign_id": {"type": "text", "index": 2, "name": "campaign_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.snapchat_ad_squad_history_data"}, "seed.ad_reporting_integration_tests.snapchat_ad_squad_hourly_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_ad_squad_hourly_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_squad_id": {"type": "text", "index": 1, "name": "ad_squad_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "android_installs": {"type": "integer", "index": 4, "name": "android_installs", "comment": null}, "attachment_avg_view_time_millis": {"type": "integer", "index": 5, "name": "attachment_avg_view_time_millis", "comment": null}, "attachment_quartile_1": {"type": "integer", "index": 6, "name": "attachment_quartile_1", "comment": null}, "attachment_quartile_2": {"type": "integer", "index": 7, "name": "attachment_quartile_2", "comment": null}, "attachment_quartile_3": {"type": "integer", "index": 8, "name": "attachment_quartile_3", "comment": null}, "attachment_total_view_time_millis": {"type": "integer", "index": 9, "name": "attachment_total_view_time_millis", "comment": null}, "attachment_view_completion": {"type": "integer", "index": 10, "name": "attachment_view_completion", "comment": null}, "avg_screen_time_millis": {"type": "integer", "index": 11, "name": "avg_screen_time_millis", "comment": null}, "avg_view_time_millis": {"type": "integer", "index": 12, "name": "avg_view_time_millis", "comment": null}, "conversion_add_billing": {"type": "integer", "index": 13, "name": "conversion_add_billing", "comment": null}, "conversion_add_cart": {"type": "integer", "index": 14, "name": "conversion_add_cart", "comment": null}, "conversion_app_opens": {"type": "integer", "index": 15, "name": "conversion_app_opens", "comment": null}, "conversion_level_completes": {"type": "integer", "index": 16, "name": "conversion_level_completes", "comment": null}, "conversion_page_views": {"type": "integer", "index": 17, "name": "conversion_page_views", "comment": null}, "conversion_purchases": {"type": "integer", "index": 18, "name": "conversion_purchases", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 19, "name": "conversion_purchases_value", "comment": null}, "conversion_save": {"type": "integer", "index": 20, "name": "conversion_save", "comment": null}, "conversion_searches": {"type": "integer", "index": 21, "name": "conversion_searches", "comment": null}, "conversion_sign_ups": {"type": "integer", "index": 22, "name": "conversion_sign_ups", "comment": null}, "conversion_start_checkout": {"type": "integer", "index": 23, "name": "conversion_start_checkout", "comment": null}, "conversion_view_content": {"type": "integer", "index": 24, "name": "conversion_view_content", "comment": null}, "impressions": {"type": "integer", "index": 25, "name": "impressions", "comment": null}, "ios_installs": {"type": "integer", "index": 26, "name": "ios_installs", "comment": null}, "quartile_1": {"type": "integer", "index": 27, "name": "quartile_1", "comment": null}, "quartile_2": {"type": "integer", "index": 28, "name": "quartile_2", "comment": null}, "quartile_3": {"type": "integer", "index": 29, "name": "quartile_3", "comment": null}, "saves": {"type": "integer", "index": 30, "name": "saves", "comment": null}, "screen_time_millis": {"type": "integer", "index": 31, "name": "screen_time_millis", "comment": null}, "shares": {"type": "integer", "index": 32, "name": "shares", "comment": null}, "spend": {"type": "integer", "index": 33, "name": "spend", "comment": null}, "story_completes": {"type": "integer", "index": 34, "name": "story_completes", "comment": null}, "story_opens": {"type": "integer", "index": 35, "name": "story_opens", "comment": null}, "swipe_up_percent": {"type": "integer", "index": 36, "name": "swipe_up_percent", "comment": null}, "swipes": {"type": "integer", "index": 37, "name": "swipes", "comment": null}, "total_installs": {"type": "integer", "index": 38, "name": "total_installs", "comment": null}, "video_views": {"type": "integer", "index": 39, "name": "video_views", "comment": null}, "view_completion": {"type": "integer", "index": 40, "name": "view_completion", "comment": null}, "view_time_millis": {"type": "integer", "index": 41, "name": "view_time_millis", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.snapchat_ad_squad_hourly_report_data"}, "seed.ad_reporting_integration_tests.snapchat_campaign_geo_country_daily_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_campaign_geo_country_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"attachment_quartile_1": {"type": "integer", "index": 1, "name": "attachment_quartile_1", "comment": null}, "attachment_quartile_2": {"type": "integer", "index": 2, "name": "attachment_quartile_2", "comment": null}, "attachment_quartile_3": {"type": "integer", "index": 3, "name": "attachment_quartile_3", "comment": null}, "attachment_total_view_time_millis": {"type": "integer", "index": 4, "name": "attachment_total_view_time_millis", "comment": null}, "attachment_view_completion": {"type": "boolean", "index": 5, "name": "attachment_view_completion", "comment": null}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 7, "name": "date", "comment": null}, "country": {"type": "text", "index": 8, "name": "country", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "quartile_1": {"type": "integer", "index": 10, "name": "quartile_1", "comment": null}, "quartile_2": {"type": "integer", "index": 11, "name": "quartile_2", "comment": null}, "quartile_3": {"type": "integer", "index": 12, "name": "quartile_3", "comment": null}, "saves": {"type": "integer", "index": 13, "name": "saves", "comment": null}, "screen_time_millis": {"type": "integer", "index": 14, "name": "screen_time_millis", "comment": null}, "shares": {"type": "integer", "index": 15, "name": "shares", "comment": null}, "spend": {"type": "integer", "index": 16, "name": "spend", "comment": null}, "swipes": {"type": "integer", "index": 17, "name": "swipes", "comment": null}, "video_views": {"type": "integer", "index": 18, "name": "video_views", "comment": null}, "view_completion": {"type": "boolean", "index": 19, "name": "view_completion", "comment": null}, "view_time_millis": {"type": "integer", "index": 20, "name": "view_time_millis", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 21, "name": "conversion_purchases_value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.snapchat_campaign_geo_country_daily_report_data"}, "seed.ad_reporting_integration_tests.snapchat_campaign_geo_region_daily_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_campaign_geo_region_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"attachment_quartile_1": {"type": "integer", "index": 1, "name": "attachment_quartile_1", "comment": null}, "attachment_quartile_2": {"type": "integer", "index": 2, "name": "attachment_quartile_2", "comment": null}, "attachment_quartile_3": {"type": "integer", "index": 3, "name": "attachment_quartile_3", "comment": null}, "attachment_total_view_time_millis": {"type": "integer", "index": 4, "name": "attachment_total_view_time_millis", "comment": null}, "attachment_view_completion": {"type": "boolean", "index": 5, "name": "attachment_view_completion", "comment": null}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 7, "name": "date", "comment": null}, "region": {"type": "text", "index": 8, "name": "region", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "quartile_1": {"type": "integer", "index": 10, "name": "quartile_1", "comment": null}, "quartile_2": {"type": "integer", "index": 11, "name": "quartile_2", "comment": null}, "quartile_3": {"type": "integer", "index": 12, "name": "quartile_3", "comment": null}, "saves": {"type": "integer", "index": 13, "name": "saves", "comment": null}, "screen_time_millis": {"type": "integer", "index": 14, "name": "screen_time_millis", "comment": null}, "shares": {"type": "integer", "index": 15, "name": "shares", "comment": null}, "spend": {"type": "integer", "index": 16, "name": "spend", "comment": null}, "swipes": {"type": "integer", "index": 17, "name": "swipes", "comment": null}, "video_views": {"type": "integer", "index": 18, "name": "video_views", "comment": null}, "view_completion": {"type": "boolean", "index": 19, "name": "view_completion", "comment": null}, "view_time_millis": {"type": "integer", "index": 20, "name": "view_time_millis", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 21, "name": "conversion_purchases_value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.snapchat_campaign_geo_region_daily_report_data"}, "seed.ad_reporting_integration_tests.snapchat_campaign_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "ad_account_id": {"type": "text", "index": 2, "name": "ad_account_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.snapchat_campaign_history_data"}, "seed.ad_reporting_integration_tests.snapchat_campaign_hourly_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_campaign_hourly_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "text", "index": 1, "name": "campaign_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "android_installs": {"type": "integer", "index": 4, "name": "android_installs", "comment": null}, "attachment_avg_view_time_millis": {"type": "integer", "index": 5, "name": "attachment_avg_view_time_millis", "comment": null}, "attachment_quartile_1": {"type": "integer", "index": 6, "name": "attachment_quartile_1", "comment": null}, "attachment_quartile_2": {"type": "integer", "index": 7, "name": "attachment_quartile_2", "comment": null}, "attachment_quartile_3": {"type": "integer", "index": 8, "name": "attachment_quartile_3", "comment": null}, "attachment_total_view_time_millis": {"type": "integer", "index": 9, "name": "attachment_total_view_time_millis", "comment": null}, "attachment_view_completion": {"type": "integer", "index": 10, "name": "attachment_view_completion", "comment": null}, "avg_screen_time_millis": {"type": "integer", "index": 11, "name": "avg_screen_time_millis", "comment": null}, "avg_view_time_millis": {"type": "integer", "index": 12, "name": "avg_view_time_millis", "comment": null}, "conversion_add_billing": {"type": "integer", "index": 13, "name": "conversion_add_billing", "comment": null}, "conversion_add_cart": {"type": "integer", "index": 14, "name": "conversion_add_cart", "comment": null}, "conversion_app_opens": {"type": "integer", "index": 15, "name": "conversion_app_opens", "comment": null}, "conversion_level_completes": {"type": "integer", "index": 16, "name": "conversion_level_completes", "comment": null}, "conversion_page_views": {"type": "integer", "index": 17, "name": "conversion_page_views", "comment": null}, "conversion_purchases": {"type": "integer", "index": 18, "name": "conversion_purchases", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 19, "name": "conversion_purchases_value", "comment": null}, "conversion_save": {"type": "integer", "index": 20, "name": "conversion_save", "comment": null}, "conversion_searches": {"type": "integer", "index": 21, "name": "conversion_searches", "comment": null}, "conversion_sign_ups": {"type": "integer", "index": 22, "name": "conversion_sign_ups", "comment": null}, "conversion_start_checkout": {"type": "integer", "index": 23, "name": "conversion_start_checkout", "comment": null}, "conversion_view_content": {"type": "integer", "index": 24, "name": "conversion_view_content", "comment": null}, "impressions": {"type": "integer", "index": 25, "name": "impressions", "comment": null}, "ios_installs": {"type": "integer", "index": 26, "name": "ios_installs", "comment": null}, "quartile_1": {"type": "integer", "index": 27, "name": "quartile_1", "comment": null}, "quartile_2": {"type": "integer", "index": 28, "name": "quartile_2", "comment": null}, "quartile_3": {"type": "integer", "index": 29, "name": "quartile_3", "comment": null}, "saves": {"type": "integer", "index": 30, "name": "saves", "comment": null}, "screen_time_millis": {"type": "integer", "index": 31, "name": "screen_time_millis", "comment": null}, "shares": {"type": "integer", "index": 32, "name": "shares", "comment": null}, "spend": {"type": "integer", "index": 33, "name": "spend", "comment": null}, "story_completes": {"type": "integer", "index": 34, "name": "story_completes", "comment": null}, "story_opens": {"type": "integer", "index": 35, "name": "story_opens", "comment": null}, "swipe_up_percent": {"type": "integer", "index": 36, "name": "swipe_up_percent", "comment": null}, "swipes": {"type": "integer", "index": 37, "name": "swipes", "comment": null}, "total_installs": {"type": "integer", "index": 38, "name": "total_installs", "comment": null}, "video_views": {"type": "integer", "index": 39, "name": "video_views", "comment": null}, "view_completion": {"type": "integer", "index": 40, "name": "view_completion", "comment": null}, "view_time_millis": {"type": "integer", "index": 41, "name": "view_time_millis", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.snapchat_campaign_hourly_report_data"}, "seed.ad_reporting_integration_tests.snapchat_creative_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_creative_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "ad_account_id": {"type": "text", "index": 2, "name": "ad_account_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "web_view_url": {"type": "text", "index": 4, "name": "web_view_url", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.snapchat_creative_history_data"}, "seed.ad_reporting_integration_tests.snapchat_creative_url_tag_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_creative_url_tag_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"creative_id": {"type": "text", "index": 1, "name": "creative_id", "comment": null}, "key": {"type": "text", "index": 2, "name": "key", "comment": null}, "value": {"type": "text", "index": 3, "name": "value", "comment": null}, "updated_at": {"type": "text", "index": 4, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.snapchat_creative_url_tag_history_data"}, "seed.ad_reporting_integration_tests.tiktok_ad_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_ad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "integer", "index": 1, "name": "ad_id", "comment": null}, "updated_at": {"type": "text", "index": 2, "name": "updated_at", "comment": null}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": null}, "adgroup_id": {"type": "integer", "index": 4, "name": "adgroup_id", "comment": null}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": null}, "create_time": {"type": "text", "index": 6, "name": "create_time", "comment": null}, "ad_name": {"type": "text", "index": 7, "name": "ad_name", "comment": null}, "call_to_action": {"type": "text", "index": 8, "name": "call_to_action", "comment": null}, "secondary_status": {"type": "text", "index": 9, "name": "secondary_status", "comment": null}, "operation_status": {"type": "text", "index": 10, "name": "operation_status", "comment": null}, "ad_text": {"type": "text", "index": 11, "name": "ad_text", "comment": null}, "video_id": {"type": "text", "index": 12, "name": "video_id", "comment": null}, "app_name": {"type": "integer", "index": 13, "name": "app_name", "comment": null}, "deeplink": {"type": "integer", "index": 14, "name": "deeplink", "comment": null}, "landing_page_url": {"type": "text", "index": 15, "name": "landing_page_url", "comment": null}, "display_name": {"type": "text", "index": 16, "name": "display_name", "comment": null}, "profile_image_url": {"type": "integer", "index": 17, "name": "profile_image_url", "comment": null}, "impression_tracking_url": {"type": "integer", "index": 18, "name": "impression_tracking_url", "comment": null}, "click_tracking_url": {"type": "integer", "index": 19, "name": "click_tracking_url", "comment": null}, "playable_url": {"type": "integer", "index": 20, "name": "playable_url", "comment": null}, "is_aco": {"type": "boolean", "index": 21, "name": "is_aco", "comment": null}, "creative_authorized": {"type": "boolean", "index": 22, "name": "creative_authorized", "comment": null}, "is_new_structure": {"type": "boolean", "index": 23, "name": "is_new_structure", "comment": null}, "image_ids": {"type": "text", "index": 24, "name": "image_ids", "comment": null}, "_fivetran_synced": {"type": "text", "index": 25, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.tiktok_ad_history_data"}, "seed.ad_reporting_integration_tests.tiktok_ad_report_hourly_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_ad_report_hourly_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "integer", "index": 1, "name": "ad_id", "comment": null}, "stat_time_hour": {"type": "timestamp without time zone", "index": 2, "name": "stat_time_hour", "comment": null}, "cost_per_conversion": {"type": "double precision", "index": 3, "name": "cost_per_conversion", "comment": null}, "cpc": {"type": "double precision", "index": 4, "name": "cpc", "comment": null}, "video_play_actions": {"type": "integer", "index": 5, "name": "video_play_actions", "comment": null}, "conversion_rate": {"type": "integer", "index": 6, "name": "conversion_rate", "comment": null}, "video_views_p_75": {"type": "integer", "index": 7, "name": "video_views_p_75", "comment": null}, "result": {"type": "integer", "index": 8, "name": "result", "comment": null}, "video_views_p_50": {"type": "integer", "index": 9, "name": "video_views_p_50", "comment": null}, "impressions": {"type": "integer", "index": 10, "name": "impressions", "comment": null}, "comments": {"type": "integer", "index": 11, "name": "comments", "comment": null}, "real_time_cost_per_result": {"type": "double precision", "index": 12, "name": "real_time_cost_per_result", "comment": null}, "conversion": {"type": "integer", "index": 13, "name": "conversion", "comment": null}, "real_time_result": {"type": "integer", "index": 14, "name": "real_time_result", "comment": null}, "video_views_p_100": {"type": "integer", "index": 15, "name": "video_views_p_100", "comment": null}, "shares": {"type": "integer", "index": 16, "name": "shares", "comment": null}, "real_time_conversion_rate": {"type": "integer", "index": 17, "name": "real_time_conversion_rate", "comment": null}, "cost_per_secondary_goal_result": {"type": "text", "index": 18, "name": "cost_per_secondary_goal_result", "comment": null}, "secondary_goal_result_rate": {"type": "text", "index": 19, "name": "secondary_goal_result_rate", "comment": null}, "clicks": {"type": "integer", "index": 20, "name": "clicks", "comment": null}, "cost_per_1000_reached": {"type": "integer", "index": 21, "name": "cost_per_1000_reached", "comment": null}, "video_views_p_25": {"type": "integer", "index": 22, "name": "video_views_p_25", "comment": null}, "reach": {"type": "integer", "index": 23, "name": "reach", "comment": null}, "real_time_cost_per_conversion": {"type": "double precision", "index": 24, "name": "real_time_cost_per_conversion", "comment": null}, "profile_visits_rate": {"type": "integer", "index": 25, "name": "profile_visits_rate", "comment": null}, "average_video_play": {"type": "double precision", "index": 26, "name": "average_video_play", "comment": null}, "profile_visits": {"type": "integer", "index": 27, "name": "profile_visits", "comment": null}, "cpm": {"type": "double precision", "index": 28, "name": "cpm", "comment": null}, "ctr": {"type": "double precision", "index": 29, "name": "ctr", "comment": null}, "video_watched_2_s": {"type": "integer", "index": 30, "name": "video_watched_2_s", "comment": null}, "follows": {"type": "integer", "index": 31, "name": "follows", "comment": null}, "result_rate": {"type": "integer", "index": 32, "name": "result_rate", "comment": null}, "video_watched_6_s": {"type": "integer", "index": 33, "name": "video_watched_6_s", "comment": null}, "secondary_goal_result": {"type": "text", "index": 34, "name": "secondary_goal_result", "comment": null}, "cost_per_result": {"type": "double precision", "index": 35, "name": "cost_per_result", "comment": null}, "average_video_play_per_user": {"type": "integer", "index": 36, "name": "average_video_play_per_user", "comment": null}, "real_time_result_rate": {"type": "integer", "index": 37, "name": "real_time_result_rate", "comment": null}, "spend": {"type": "double precision", "index": 38, "name": "spend", "comment": null}, "likes": {"type": "integer", "index": 39, "name": "likes", "comment": null}, "real_time_conversion": {"type": "integer", "index": 40, "name": "real_time_conversion", "comment": null}, "total_purchase_value": {"type": "double precision", "index": 41, "name": "total_purchase_value", "comment": null}, "total_sales_lead_value": {"type": "double precision", "index": 42, "name": "total_sales_lead_value", "comment": null}, "_fivetran_synced": {"type": "text", "index": 43, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.tiktok_ad_report_hourly_data"}, "seed.ad_reporting_integration_tests.tiktok_adgroup_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_adgroup_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"adgroup_id": {"type": "integer", "index": 1, "name": "adgroup_id", "comment": null}, "updated_at": {"type": "text", "index": 2, "name": "updated_at", "comment": null}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "create_time": {"type": "text", "index": 5, "name": "create_time", "comment": null}, "adgroup_name": {"type": "text", "index": 6, "name": "adgroup_name", "comment": null}, "placement_type": {"type": "text", "index": 7, "name": "placement_type", "comment": null}, "profile_image": {"type": "integer", "index": 8, "name": "profile_image", "comment": null}, "landing_page_url": {"type": "integer", "index": 9, "name": "landing_page_url", "comment": null}, "display_name": {"type": "integer", "index": 10, "name": "display_name", "comment": null}, "app_type": {"type": "integer", "index": 11, "name": "app_type", "comment": null}, "app_download_url": {"type": "integer", "index": 12, "name": "app_download_url", "comment": null}, "app_name": {"type": "integer", "index": 13, "name": "app_name", "comment": null}, "optimization_event": {"type": "text", "index": 14, "name": "optimization_event", "comment": null}, "secondary_optimization_event": {"type": "integer", "index": 15, "name": "secondary_optimization_event", "comment": null}, "creative_material_mode": {"type": "text", "index": 16, "name": "creative_material_mode", "comment": null}, "audience_type": {"type": "integer", "index": 17, "name": "audience_type", "comment": null}, "gender": {"type": "text", "index": 18, "name": "gender", "comment": null}, "min_android_version": {"type": "integer", "index": 19, "name": "min_android_version", "comment": null}, "min_ios_version": {"type": "integer", "index": 20, "name": "min_ios_version", "comment": null}, "budget_mode": {"type": "text", "index": 21, "name": "budget_mode", "comment": null}, "schedule_type": {"type": "text", "index": 22, "name": "schedule_type", "comment": null}, "dayparting": {"type": "integer", "index": 23, "name": "dayparting", "comment": null}, "optimization_goal": {"type": "text", "index": 24, "name": "optimization_goal", "comment": null}, "cpv_video_duration": {"type": "integer", "index": 25, "name": "cpv_video_duration", "comment": null}, "pacing": {"type": "text", "index": 26, "name": "pacing", "comment": null}, "billing_event": {"type": "text", "index": 27, "name": "billing_event", "comment": null}, "bid_type": {"type": "text", "index": 28, "name": "bid_type", "comment": null}, "deep_bid_type": {"type": "integer", "index": 29, "name": "deep_bid_type", "comment": null}, "impression_tracking_url": {"type": "integer", "index": 30, "name": "impression_tracking_url", "comment": null}, "click_tracking_url": {"type": "integer", "index": 31, "name": "click_tracking_url", "comment": null}, "secondary_status": {"type": "text", "index": 32, "name": "secondary_status", "comment": null}, "operation_status": {"type": "text", "index": 33, "name": "operation_status", "comment": null}, "statistic_type": {"type": "integer", "index": 34, "name": "statistic_type", "comment": null}, "video_download": {"type": "text", "index": 35, "name": "video_download", "comment": null}, "open_url": {"type": "integer", "index": 36, "name": "open_url", "comment": null}, "open_url_type": {"type": "integer", "index": 37, "name": "open_url_type", "comment": null}, "fallback_type": {"type": "integer", "index": 38, "name": "fallback_type", "comment": null}, "budget": {"type": "integer", "index": 39, "name": "budget", "comment": null}, "bid_price": {"type": "integer", "index": 40, "name": "bid_price", "comment": null}, "conversion_bid_price": {"type": "integer", "index": 41, "name": "conversion_bid_price", "comment": null}, "deep_cpa_bid": {"type": "integer", "index": 42, "name": "deep_cpa_bid", "comment": null}, "schedule_start_time": {"type": "text", "index": 43, "name": "schedule_start_time", "comment": null}, "schedule_end_time": {"type": "text", "index": 44, "name": "schedule_end_time", "comment": null}, "app_id": {"type": "integer", "index": 45, "name": "app_id", "comment": null}, "pixel_id": {"type": "integer", "index": 46, "name": "pixel_id", "comment": null}, "inventory_filter_enabled": {"type": "boolean", "index": 47, "name": "inventory_filter_enabled", "comment": null}, "is_hfss": {"type": "boolean", "index": 48, "name": "is_hfss", "comment": null}, "is_new_structure": {"type": "boolean", "index": 49, "name": "is_new_structure", "comment": null}, "category": {"type": "integer", "index": 50, "name": "category", "comment": null}, "is_comment_disable": {"type": "integer", "index": 51, "name": "is_comment_disable", "comment": null}, "skip_learning_phase": {"type": "integer", "index": 52, "name": "skip_learning_phase", "comment": null}, "frequency": {"type": "integer", "index": 53, "name": "frequency", "comment": null}, "frequency_schedule": {"type": "integer", "index": 54, "name": "frequency_schedule", "comment": null}, "action_days": {"type": "integer", "index": 55, "name": "action_days", "comment": null}, "audience": {"type": "text", "index": 56, "name": "audience", "comment": null}, "excluded_audience": {"type": "text", "index": 57, "name": "excluded_audience", "comment": null}, "location": {"type": "text", "index": 58, "name": "location", "comment": null}, "interest_category_v_2": {"type": "text", "index": 59, "name": "interest_category_v_2", "comment": null}, "pangle_block_app_list_id": {"type": "text", "index": 60, "name": "pangle_block_app_list_id", "comment": null}, "action_categories": {"type": "text", "index": 61, "name": "action_categories", "comment": null}, "placements": {"type": "text", "index": 62, "name": "placements", "comment": null}, "keywords": {"type": "integer", "index": 63, "name": "keywords", "comment": null}, "age_groups": {"type": "text", "index": 64, "name": "age_groups", "comment": null}, "languages": {"type": "text", "index": 65, "name": "languages", "comment": null}, "operating_systems": {"type": "text", "index": 66, "name": "operating_systems", "comment": null}, "network_types": {"type": "text", "index": 67, "name": "network_types", "comment": null}, "carriers": {"type": "text", "index": 68, "name": "carriers", "comment": null}, "video_actions": {"type": "text", "index": 69, "name": "video_actions", "comment": null}, "package": {"type": "integer", "index": 70, "name": "package", "comment": null}, "_fivetran_synced": {"type": "text", "index": 71, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.tiktok_adgroup_history_data"}, "seed.ad_reporting_integration_tests.tiktok_adgroup_report_hourly_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_adgroup_report_hourly_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"adgroup_id": {"type": "integer", "index": 1, "name": "adgroup_id", "comment": null}, "stat_time_hour": {"type": "timestamp without time zone", "index": 2, "name": "stat_time_hour", "comment": null}, "cost_per_conversion": {"type": "double precision", "index": 3, "name": "cost_per_conversion", "comment": null}, "cpc": {"type": "double precision", "index": 4, "name": "cpc", "comment": null}, "video_play_actions": {"type": "integer", "index": 5, "name": "video_play_actions", "comment": null}, "conversion_rate": {"type": "integer", "index": 6, "name": "conversion_rate", "comment": null}, "video_views_p_75": {"type": "integer", "index": 7, "name": "video_views_p_75", "comment": null}, "result": {"type": "integer", "index": 8, "name": "result", "comment": null}, "video_views_p_50": {"type": "integer", "index": 9, "name": "video_views_p_50", "comment": null}, "impressions": {"type": "integer", "index": 10, "name": "impressions", "comment": null}, "comments": {"type": "integer", "index": 11, "name": "comments", "comment": null}, "real_time_cost_per_result": {"type": "double precision", "index": 12, "name": "real_time_cost_per_result", "comment": null}, "conversion": {"type": "integer", "index": 13, "name": "conversion", "comment": null}, "real_time_result": {"type": "integer", "index": 14, "name": "real_time_result", "comment": null}, "video_views_p_100": {"type": "integer", "index": 15, "name": "video_views_p_100", "comment": null}, "shares": {"type": "integer", "index": 16, "name": "shares", "comment": null}, "real_time_conversion_rate": {"type": "double precision", "index": 17, "name": "real_time_conversion_rate", "comment": null}, "cost_per_secondary_goal_result": {"type": "text", "index": 18, "name": "cost_per_secondary_goal_result", "comment": null}, "secondary_goal_result_rate": {"type": "text", "index": 19, "name": "secondary_goal_result_rate", "comment": null}, "clicks": {"type": "integer", "index": 20, "name": "clicks", "comment": null}, "cost_per_1000_reached": {"type": "double precision", "index": 21, "name": "cost_per_1000_reached", "comment": null}, "video_views_p_25": {"type": "integer", "index": 22, "name": "video_views_p_25", "comment": null}, "reach": {"type": "integer", "index": 23, "name": "reach", "comment": null}, "real_time_cost_per_conversion": {"type": "double precision", "index": 24, "name": "real_time_cost_per_conversion", "comment": null}, "profile_visits_rate": {"type": "integer", "index": 25, "name": "profile_visits_rate", "comment": null}, "average_video_play": {"type": "double precision", "index": 26, "name": "average_video_play", "comment": null}, "profile_visits": {"type": "integer", "index": 27, "name": "profile_visits", "comment": null}, "cpm": {"type": "double precision", "index": 28, "name": "cpm", "comment": null}, "ctr": {"type": "double precision", "index": 29, "name": "ctr", "comment": null}, "video_watched_2_s": {"type": "integer", "index": 30, "name": "video_watched_2_s", "comment": null}, "follows": {"type": "integer", "index": 31, "name": "follows", "comment": null}, "result_rate": {"type": "double precision", "index": 32, "name": "result_rate", "comment": null}, "video_watched_6_s": {"type": "integer", "index": 33, "name": "video_watched_6_s", "comment": null}, "secondary_goal_result": {"type": "text", "index": 34, "name": "secondary_goal_result", "comment": null}, "cost_per_result": {"type": "double precision", "index": 35, "name": "cost_per_result", "comment": null}, "average_video_play_per_user": {"type": "double precision", "index": 36, "name": "average_video_play_per_user", "comment": null}, "real_time_result_rate": {"type": "double precision", "index": 37, "name": "real_time_result_rate", "comment": null}, "spend": {"type": "double precision", "index": 38, "name": "spend", "comment": null}, "likes": {"type": "integer", "index": 39, "name": "likes", "comment": null}, "real_time_conversion": {"type": "integer", "index": 40, "name": "real_time_conversion", "comment": null}, "total_purchase_value": {"type": "double precision", "index": 41, "name": "total_purchase_value", "comment": null}, "total_sales_lead_value": {"type": "double precision", "index": 42, "name": "total_sales_lead_value", "comment": null}, "_fivetran_synced": {"type": "text", "index": 43, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.tiktok_adgroup_report_hourly_data"}, "seed.ad_reporting_integration_tests.tiktok_advertiser_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_advertiser_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "address": {"type": "text", "index": 3, "name": "address", "comment": null}, "company": {"type": "text", "index": 4, "name": "company", "comment": null}, "contacter": {"type": "integer", "index": 5, "name": "contacter", "comment": null}, "country": {"type": "text", "index": 6, "name": "country", "comment": null}, "currency": {"type": "text", "index": 7, "name": "currency", "comment": null}, "description": {"type": "text", "index": 8, "name": "description", "comment": null}, "email": {"type": "text", "index": 9, "name": "email", "comment": null}, "industry": {"type": "integer", "index": 10, "name": "industry", "comment": null}, "license_no": {"type": "integer", "index": 11, "name": "license_no", "comment": null}, "license_url": {"type": "integer", "index": 12, "name": "license_url", "comment": null}, "promotion_area": {"type": "integer", "index": 13, "name": "promotion_area", "comment": null}, "rejected_reason": {"type": "integer", "index": 14, "name": "rejected_reason", "comment": null}, "role": {"type": "text", "index": 15, "name": "role", "comment": null}, "status": {"type": "text", "index": 16, "name": "status", "comment": null}, "telephone_number": {"type": "text", "index": 17, "name": "telephone_number", "comment": null}, "timezone": {"type": "text", "index": 18, "name": "timezone", "comment": null}, "balance": {"type": "double precision", "index": 19, "name": "balance", "comment": null}, "create_time": {"type": "text", "index": 20, "name": "create_time", "comment": null}, "language": {"type": "text", "index": 21, "name": "language", "comment": null}, "cellphone_number": {"type": "text", "index": 22, "name": "cellphone_number", "comment": null}, "_fivetran_synced": {"type": "text", "index": 23, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.tiktok_advertiser_data"}, "seed.ad_reporting_integration_tests.tiktok_campaign_country_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_campaign_country_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 3, "name": "clicks", "comment": null}, "conversion": {"type": "integer", "index": 4, "name": "conversion", "comment": null}, "conversion_rate": {"type": "double precision", "index": 5, "name": "conversion_rate", "comment": null}, "cost_per_conversion": {"type": "double precision", "index": 6, "name": "cost_per_conversion", "comment": null}, "country_code": {"type": "text", "index": 7, "name": "country_code", "comment": null}, "cpc": {"type": "double precision", "index": 8, "name": "cpc", "comment": null}, "cpm": {"type": "double precision", "index": 9, "name": "cpm", "comment": null}, "ctr": {"type": "double precision", "index": 10, "name": "ctr", "comment": null}, "impressions": {"type": "integer", "index": 11, "name": "impressions", "comment": null}, "real_time_conversion": {"type": "integer", "index": 12, "name": "real_time_conversion", "comment": null}, "spend": {"type": "double precision", "index": 13, "name": "spend", "comment": null}, "stat_time_day": {"type": "timestamp without time zone", "index": 14, "name": "stat_time_day", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.tiktok_campaign_country_report_data"}, "seed.ad_reporting_integration_tests.tiktok_campaign_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "integer", "index": 1, "name": "ad_id", "comment": null}, "updated_at": {"type": "text", "index": 2, "name": "updated_at", "comment": null}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": null}, "adgroup_id": {"type": "integer", "index": 4, "name": "adgroup_id", "comment": null}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": null}, "create_time": {"type": "text", "index": 6, "name": "create_time", "comment": null}, "ad_name": {"type": "text", "index": 7, "name": "ad_name", "comment": null}, "call_to_action": {"type": "text", "index": 8, "name": "call_to_action", "comment": null}, "secondary_status": {"type": "text", "index": 9, "name": "secondary_status", "comment": null}, "operation_status": {"type": "text", "index": 10, "name": "operation_status", "comment": null}, "ad_text": {"type": "text", "index": 11, "name": "ad_text", "comment": null}, "video_id": {"type": "text", "index": 12, "name": "video_id", "comment": null}, "app_name": {"type": "integer", "index": 13, "name": "app_name", "comment": null}, "deeplink": {"type": "integer", "index": 14, "name": "deeplink", "comment": null}, "landing_page_url": {"type": "text", "index": 15, "name": "landing_page_url", "comment": null}, "display_name": {"type": "text", "index": 16, "name": "display_name", "comment": null}, "profile_image_url": {"type": "integer", "index": 17, "name": "profile_image_url", "comment": null}, "impression_tracking_url": {"type": "integer", "index": 18, "name": "impression_tracking_url", "comment": null}, "click_tracking_url": {"type": "integer", "index": 19, "name": "click_tracking_url", "comment": null}, "playable_url": {"type": "integer", "index": 20, "name": "playable_url", "comment": null}, "is_aco": {"type": "boolean", "index": 21, "name": "is_aco", "comment": null}, "creative_authorized": {"type": "boolean", "index": 22, "name": "creative_authorized", "comment": null}, "is_new_structure": {"type": "boolean", "index": 23, "name": "is_new_structure", "comment": null}, "image_ids": {"type": "text", "index": 24, "name": "image_ids", "comment": null}, "_fivetran_synced": {"type": "text", "index": 25, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.tiktok_campaign_history_data"}, "seed.ad_reporting_integration_tests.tiktok_campaign_report_hourly_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_campaign_report_hourly_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "stat_time_hour": {"type": "timestamp without time zone", "index": 2, "name": "stat_time_hour", "comment": null}, "cost_per_conversion": {"type": "double precision", "index": 3, "name": "cost_per_conversion", "comment": null}, "cpc": {"type": "double precision", "index": 4, "name": "cpc", "comment": null}, "video_play_actions": {"type": "integer", "index": 5, "name": "video_play_actions", "comment": null}, "conversion_rate": {"type": "integer", "index": 6, "name": "conversion_rate", "comment": null}, "video_views_p_75": {"type": "integer", "index": 7, "name": "video_views_p_75", "comment": null}, "result": {"type": "integer", "index": 8, "name": "result", "comment": null}, "video_views_p_50": {"type": "integer", "index": 9, "name": "video_views_p_50", "comment": null}, "impressions": {"type": "integer", "index": 10, "name": "impressions", "comment": null}, "comments": {"type": "integer", "index": 11, "name": "comments", "comment": null}, "real_time_cost_per_result": {"type": "double precision", "index": 12, "name": "real_time_cost_per_result", "comment": null}, "conversion": {"type": "integer", "index": 13, "name": "conversion", "comment": null}, "real_time_result": {"type": "integer", "index": 14, "name": "real_time_result", "comment": null}, "video_views_p_100": {"type": "integer", "index": 15, "name": "video_views_p_100", "comment": null}, "shares": {"type": "integer", "index": 16, "name": "shares", "comment": null}, "real_time_conversion_rate": {"type": "double precision", "index": 17, "name": "real_time_conversion_rate", "comment": null}, "cost_per_secondary_goal_result": {"type": "text", "index": 18, "name": "cost_per_secondary_goal_result", "comment": null}, "secondary_goal_result_rate": {"type": "text", "index": 19, "name": "secondary_goal_result_rate", "comment": null}, "clicks": {"type": "integer", "index": 20, "name": "clicks", "comment": null}, "cost_per_1000_reached": {"type": "double precision", "index": 21, "name": "cost_per_1000_reached", "comment": null}, "video_views_p_25": {"type": "integer", "index": 22, "name": "video_views_p_25", "comment": null}, "reach": {"type": "integer", "index": 23, "name": "reach", "comment": null}, "real_time_cost_per_conversion": {"type": "double precision", "index": 24, "name": "real_time_cost_per_conversion", "comment": null}, "profile_visits_rate": {"type": "integer", "index": 25, "name": "profile_visits_rate", "comment": null}, "average_video_play": {"type": "double precision", "index": 26, "name": "average_video_play", "comment": null}, "profile_visits": {"type": "integer", "index": 27, "name": "profile_visits", "comment": null}, "cpm": {"type": "double precision", "index": 28, "name": "cpm", "comment": null}, "ctr": {"type": "double precision", "index": 29, "name": "ctr", "comment": null}, "video_watched_2_s": {"type": "integer", "index": 30, "name": "video_watched_2_s", "comment": null}, "follows": {"type": "integer", "index": 31, "name": "follows", "comment": null}, "result_rate": {"type": "double precision", "index": 32, "name": "result_rate", "comment": null}, "video_watched_6_s": {"type": "integer", "index": 33, "name": "video_watched_6_s", "comment": null}, "secondary_goal_result": {"type": "text", "index": 34, "name": "secondary_goal_result", "comment": null}, "cost_per_result": {"type": "double precision", "index": 35, "name": "cost_per_result", "comment": null}, "average_video_play_per_user": {"type": "double precision", "index": 36, "name": "average_video_play_per_user", "comment": null}, "real_time_result_rate": {"type": "double precision", "index": 37, "name": "real_time_result_rate", "comment": null}, "spend": {"type": "double precision", "index": 38, "name": "spend", "comment": null}, "likes": {"type": "integer", "index": 39, "name": "likes", "comment": null}, "real_time_conversion": {"type": "integer", "index": 40, "name": "real_time_conversion", "comment": null}, "total_purchase_value": {"type": "double precision", "index": 41, "name": "total_purchase_value", "comment": null}, "total_sales_lead_value": {"type": "double precision", "index": 42, "name": "total_sales_lead_value", "comment": null}, "_fivetran_synced": {"type": "text", "index": 43, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.tiktok_campaign_report_hourly_data"}, "seed.ad_reporting_integration_tests.tiktok_location_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_location_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "advertiser_id": {"type": "integer", "index": 2, "name": "advertiser_id", "comment": null}, "area_type": {"type": "text", "index": 3, "name": "area_type", "comment": null}, "country_code": {"type": "text", "index": 4, "name": "country_code", "comment": null}, "parent_id": {"type": "text", "index": 5, "name": "parent_id", "comment": null}, "region_id": {"type": "text", "index": 6, "name": "region_id", "comment": null}, "region_level": {"type": "text", "index": 7, "name": "region_level", "comment": null}, "region_name": {"type": "text", "index": 8, "name": "region_name", "comment": null}, "support_below_18": {"type": "boolean", "index": 9, "name": "support_below_18", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.tiktok_location_data"}, "seed.ad_reporting_integration_tests.twitter_account_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_account_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "approval_status": {"type": "text", "index": 2, "name": "approval_status", "comment": null}, "business_id": {"type": "integer", "index": 3, "name": "business_id", "comment": null}, "business_name": {"type": "integer", "index": 4, "name": "business_name", "comment": null}, "created_at": {"type": "text", "index": 5, "name": "created_at", "comment": null}, "deleted": {"type": "boolean", "index": 6, "name": "deleted", "comment": null}, "id": {"type": "text", "index": 7, "name": "id", "comment": null}, "industry_type": {"type": "integer", "index": 8, "name": "industry_type", "comment": null}, "name": {"type": "character varying", "index": 9, "name": "name", "comment": null}, "salt": {"type": "integer", "index": 10, "name": "salt", "comment": null}, "timezone": {"type": "text", "index": 11, "name": "timezone", "comment": null}, "timezone_switch_at": {"type": "text", "index": 12, "name": "timezone_switch_at", "comment": null}, "updated_at": {"type": "text", "index": 13, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.twitter_account_history_data"}, "seed.ad_reporting_integration_tests.twitter_account_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_account_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "text", "index": 1, "name": "account_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "placement": {"type": "text", "index": 3, "name": "placement", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}, "engagements": {"type": "integer", "index": 5, "name": "engagements", "comment": null}, "follows": {"type": "integer", "index": 6, "name": "follows", "comment": null}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": null}, "likes": {"type": "integer", "index": 8, "name": "likes", "comment": null}, "replies": {"type": "integer", "index": 9, "name": "replies", "comment": null}, "retweets": {"type": "integer", "index": 10, "name": "retweets", "comment": null}, "unfollows": {"type": "integer", "index": 11, "name": "unfollows", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.twitter_account_report_data"}, "seed.ad_reporting_integration_tests.twitter_campaign_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": null}, "created_at": {"type": "text", "index": 3, "name": "created_at", "comment": null}, "currency": {"type": "text", "index": 4, "name": "currency", "comment": null}, "daily_budget_amount_local_micro": {"type": "integer", "index": 5, "name": "daily_budget_amount_local_micro", "comment": null}, "deleted": {"type": "boolean", "index": 6, "name": "deleted", "comment": null}, "duration_in_days": {"type": "integer", "index": 7, "name": "duration_in_days", "comment": null}, "end_time": {"type": "text", "index": 8, "name": "end_time", "comment": null}, "entity_status": {"type": "text", "index": 9, "name": "entity_status", "comment": null}, "frequency_cap": {"type": "integer", "index": 10, "name": "frequency_cap", "comment": null}, "funding_instrument_id": {"type": "text", "index": 11, "name": "funding_instrument_id", "comment": null}, "id": {"type": "text", "index": 12, "name": "id", "comment": null}, "name": {"type": "text", "index": 13, "name": "name", "comment": null}, "servable": {"type": "boolean", "index": 14, "name": "servable", "comment": null}, "standard_delivery": {"type": "boolean", "index": 15, "name": "standard_delivery", "comment": null}, "start_time": {"type": "text", "index": 16, "name": "start_time", "comment": null}, "total_budget_amount_local_micro": {"type": "integer", "index": 17, "name": "total_budget_amount_local_micro", "comment": null}, "updated_at": {"type": "text", "index": 18, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.twitter_campaign_history_data"}, "seed.ad_reporting_integration_tests.twitter_campaign_locations_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_campaign_locations_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"segment": {"type": "text", "index": 1, "name": "segment", "comment": null}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 3, "name": "billed_charge_local_micro", "comment": null}, "campaign_id": {"type": "text", "index": 4, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 5, "name": "clicks", "comment": null}, "date": {"type": "timestamp without time zone", "index": 6, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": null}, "placement": {"type": "text", "index": 8, "name": "placement", "comment": null}, "url_clicks": {"type": "integer", "index": 9, "name": "url_clicks", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.twitter_campaign_locations_report_data"}, "seed.ad_reporting_integration_tests.twitter_campaign_regions_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_campaign_regions_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"location_name": {"type": "text", "index": 1, "name": "location_name", "comment": null}, "location_type": {"type": "text", "index": 2, "name": "location_type", "comment": null}, "segment": {"type": "text", "index": 3, "name": "segment", "comment": null}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 5, "name": "billed_charge_local_micro", "comment": null}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 7, "name": "clicks", "comment": null}, "date": {"type": "timestamp without time zone", "index": 8, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "placement": {"type": "text", "index": 10, "name": "placement", "comment": null}, "url_clicks": {"type": "integer", "index": 11, "name": "url_clicks", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.twitter_campaign_regions_report_data"}, "seed.ad_reporting_integration_tests.twitter_campaign_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_campaign_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "text", "index": 1, "name": "account_id", "comment": null}, "campaign_id": {"type": "text", "index": 2, "name": "campaign_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 3, "name": "date", "comment": null}, "placement": {"type": "text", "index": 4, "name": "placement", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "app_clicks": {"type": "integer", "index": 6, "name": "app_clicks", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 7, "name": "billed_charge_local_micro", "comment": null}, "billed_engagements": {"type": "integer", "index": 8, "name": "billed_engagements", "comment": null}, "card_engagements": {"type": "integer", "index": 9, "name": "card_engagements", "comment": null}, "carousel_swipes": {"type": "integer", "index": 10, "name": "carousel_swipes", "comment": null}, "clicks": {"type": "integer", "index": 11, "name": "clicks", "comment": null}, "conversion_custom_metric": {"type": "integer", "index": 12, "name": "conversion_custom_metric", "comment": null}, "conversion_custom_order_quantity": {"type": "integer", "index": 13, "name": "conversion_custom_order_quantity", "comment": null}, "conversion_custom_order_quantity_engagement": {"type": "integer", "index": 14, "name": "conversion_custom_order_quantity_engagement", "comment": null}, "conversion_custom_order_quantity_view": {"type": "integer", "index": 15, "name": "conversion_custom_order_quantity_view", "comment": null}, "conversion_custom_post_engagement": {"type": "integer", "index": 16, "name": "conversion_custom_post_engagement", "comment": null}, "conversion_custom_post_view": {"type": "integer", "index": 17, "name": "conversion_custom_post_view", "comment": null}, "conversion_custom_sale_amount": {"type": "integer", "index": 18, "name": "conversion_custom_sale_amount", "comment": null}, "conversion_custom_sale_amount_engagement": {"type": "integer", "index": 19, "name": "conversion_custom_sale_amount_engagement", "comment": null}, "conversion_custom_sale_amount_view": {"type": "integer", "index": 20, "name": "conversion_custom_sale_amount_view", "comment": null}, "conversion_downloads_metric": {"type": "integer", "index": 21, "name": "conversion_downloads_metric", "comment": null}, "conversion_downloads_order_quantity": {"type": "integer", "index": 22, "name": "conversion_downloads_order_quantity", "comment": null}, "conversion_downloads_order_quantity_engagement": {"type": "integer", "index": 23, "name": "conversion_downloads_order_quantity_engagement", "comment": null}, "conversion_downloads_order_quantity_view": {"type": "integer", "index": 24, "name": "conversion_downloads_order_quantity_view", "comment": null}, "conversion_downloads_post_engagement": {"type": "integer", "index": 25, "name": "conversion_downloads_post_engagement", "comment": null}, "conversion_downloads_post_view": {"type": "integer", "index": 26, "name": "conversion_downloads_post_view", "comment": null}, "conversion_downloads_sale_amount": {"type": "integer", "index": 27, "name": "conversion_downloads_sale_amount", "comment": null}, "conversion_downloads_sale_amount_engagement": {"type": "integer", "index": 28, "name": "conversion_downloads_sale_amount_engagement", "comment": null}, "conversion_downloads_sale_amount_view": {"type": "integer", "index": 29, "name": "conversion_downloads_sale_amount_view", "comment": null}, "conversion_purchases_assisted": {"type": "integer", "index": 30, "name": "conversion_purchases_assisted", "comment": null}, "conversion_purchases_metric": {"type": "integer", "index": 31, "name": "conversion_purchases_metric", "comment": null}, "conversion_purchases_order_quantity": {"type": "integer", "index": 32, "name": "conversion_purchases_order_quantity", "comment": null}, "conversion_purchases_order_quantity_engagement": {"type": "integer", "index": 33, "name": "conversion_purchases_order_quantity_engagement", "comment": null}, "conversion_purchases_order_quantity_view": {"type": "integer", "index": 34, "name": "conversion_purchases_order_quantity_view", "comment": null}, "conversion_purchases_post_engagement": {"type": "integer", "index": 35, "name": "conversion_purchases_post_engagement", "comment": null}, "conversion_purchases_post_view": {"type": "integer", "index": 36, "name": "conversion_purchases_post_view", "comment": null}, "conversion_purchases_sale_amount": {"type": "integer", "index": 37, "name": "conversion_purchases_sale_amount", "comment": null}, "conversion_purchases_sale_amount_engagement": {"type": "integer", "index": 38, "name": "conversion_purchases_sale_amount_engagement", "comment": null}, "conversion_purchases_sale_amount_view": {"type": "integer", "index": 39, "name": "conversion_purchases_sale_amount_view", "comment": null}, "conversion_sign_ups_assisted": {"type": "integer", "index": 40, "name": "conversion_sign_ups_assisted", "comment": null}, "conversion_sign_ups_metric": {"type": "integer", "index": 41, "name": "conversion_sign_ups_metric", "comment": null}, "conversion_sign_ups_order_quantity": {"type": "integer", "index": 42, "name": "conversion_sign_ups_order_quantity", "comment": null}, "conversion_sign_ups_order_quantity_engagement": {"type": "integer", "index": 43, "name": "conversion_sign_ups_order_quantity_engagement", "comment": null}, "conversion_sign_ups_order_quantity_view": {"type": "integer", "index": 44, "name": "conversion_sign_ups_order_quantity_view", "comment": null}, "conversion_sign_ups_post_engagement": {"type": "integer", "index": 45, "name": "conversion_sign_ups_post_engagement", "comment": null}, "conversion_sign_ups_post_view": {"type": "integer", "index": 46, "name": "conversion_sign_ups_post_view", "comment": null}, "conversion_sign_ups_sale_amount": {"type": "integer", "index": 47, "name": "conversion_sign_ups_sale_amount", "comment": null}, "conversion_sign_ups_sale_amount_engagement": {"type": "integer", "index": 48, "name": "conversion_sign_ups_sale_amount_engagement", "comment": null}, "conversion_sign_ups_sale_amount_view": {"type": "integer", "index": 49, "name": "conversion_sign_ups_sale_amount_view", "comment": null}, "conversion_site_visits_metric": {"type": "integer", "index": 50, "name": "conversion_site_visits_metric", "comment": null}, "conversion_site_visits_order_quantity": {"type": "integer", "index": 51, "name": "conversion_site_visits_order_quantity", "comment": null}, "conversion_site_visits_order_quantity_engagement": {"type": "integer", "index": 52, "name": "conversion_site_visits_order_quantity_engagement", "comment": null}, "conversion_site_visits_order_quantity_view": {"type": "integer", "index": 53, "name": "conversion_site_visits_order_quantity_view", "comment": null}, "conversion_site_visits_post_engagement": {"type": "integer", "index": 54, "name": "conversion_site_visits_post_engagement", "comment": null}, "conversion_site_visits_post_view": {"type": "integer", "index": 55, "name": "conversion_site_visits_post_view", "comment": null}, "conversion_site_visits_sale_amount": {"type": "integer", "index": 56, "name": "conversion_site_visits_sale_amount", "comment": null}, "conversion_site_visits_sale_amount_engagement": {"type": "integer", "index": 57, "name": "conversion_site_visits_sale_amount_engagement", "comment": null}, "conversion_site_visits_sale_amount_view": {"type": "integer", "index": 58, "name": "conversion_site_visits_sale_amount_view", "comment": null}, "engagements": {"type": "integer", "index": 59, "name": "engagements", "comment": null}, "follows": {"type": "integer", "index": 60, "name": "follows", "comment": null}, "impressions": {"type": "integer", "index": 61, "name": "impressions", "comment": null}, "likes": {"type": "integer", "index": 62, "name": "likes", "comment": null}, "media_engagements": {"type": "integer", "index": 63, "name": "media_engagements", "comment": null}, "media_views": {"type": "integer", "index": 64, "name": "media_views", "comment": null}, "mobile_conversion_achievements_unlocked_assisted": {"type": "integer", "index": 65, "name": "mobile_conversion_achievements_unlocked_assisted", "comment": null}, "mobile_conversion_achievements_unlocked_order_quantity": {"type": "integer", "index": 66, "name": "mobile_conversion_achievements_unlocked_order_quantity", "comment": null}, "mobile_conversion_achievements_unlocked_post_engagement": {"type": "integer", "index": 67, "name": "mobile_conversion_achievements_unlocked_post_engagement", "comment": null}, "mobile_conversion_achievements_unlocked_post_view": {"type": "integer", "index": 68, "name": "mobile_conversion_achievements_unlocked_post_view", "comment": null}, "mobile_conversion_achievements_unlocked_sale_amount": {"type": "integer", "index": 69, "name": "mobile_conversion_achievements_unlocked_sale_amount", "comment": null}, "mobile_conversion_add_to_carts_assisted": {"type": "integer", "index": 70, "name": "mobile_conversion_add_to_carts_assisted", "comment": null}, "mobile_conversion_add_to_carts_order_quantity": {"type": "integer", "index": 71, "name": "mobile_conversion_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_add_to_carts_post_engagement": {"type": "integer", "index": 72, "name": "mobile_conversion_add_to_carts_post_engagement", "comment": null}, "mobile_conversion_add_to_carts_post_view": {"type": "integer", "index": 73, "name": "mobile_conversion_add_to_carts_post_view", "comment": null}, "mobile_conversion_add_to_carts_sale_amount": {"type": "integer", "index": 74, "name": "mobile_conversion_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_add_to_wishlists_assisted": {"type": "integer", "index": 75, "name": "mobile_conversion_add_to_wishlists_assisted", "comment": null}, "mobile_conversion_add_to_wishlists_order_quantity": {"type": "integer", "index": 76, "name": "mobile_conversion_add_to_wishlists_order_quantity", "comment": null}, "mobile_conversion_add_to_wishlists_post_engagement": {"type": "integer", "index": 77, "name": "mobile_conversion_add_to_wishlists_post_engagement", "comment": null}, "mobile_conversion_add_to_wishlists_post_view": {"type": "integer", "index": 78, "name": "mobile_conversion_add_to_wishlists_post_view", "comment": null}, "mobile_conversion_add_to_wishlists_sale_amount": {"type": "integer", "index": 79, "name": "mobile_conversion_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_checkouts_initiated_assisted": {"type": "integer", "index": 80, "name": "mobile_conversion_checkouts_initiated_assisted", "comment": null}, "mobile_conversion_checkouts_initiated_order_quantity": {"type": "integer", "index": 81, "name": "mobile_conversion_checkouts_initiated_order_quantity", "comment": null}, "mobile_conversion_checkouts_initiated_post_engagement": {"type": "integer", "index": 82, "name": "mobile_conversion_checkouts_initiated_post_engagement", "comment": null}, "mobile_conversion_checkouts_initiated_post_view": {"type": "integer", "index": 83, "name": "mobile_conversion_checkouts_initiated_post_view", "comment": null}, "mobile_conversion_checkouts_initiated_sale_amount": {"type": "integer", "index": 84, "name": "mobile_conversion_checkouts_initiated_sale_amount", "comment": null}, "mobile_conversion_content_views_assisted": {"type": "integer", "index": 85, "name": "mobile_conversion_content_views_assisted", "comment": null}, "mobile_conversion_content_views_order_quantity": {"type": "integer", "index": 86, "name": "mobile_conversion_content_views_order_quantity", "comment": null}, "mobile_conversion_content_views_post_engagement": {"type": "integer", "index": 87, "name": "mobile_conversion_content_views_post_engagement", "comment": null}, "mobile_conversion_content_views_post_view": {"type": "integer", "index": 88, "name": "mobile_conversion_content_views_post_view", "comment": null}, "mobile_conversion_content_views_sale_amount": {"type": "integer", "index": 89, "name": "mobile_conversion_content_views_sale_amount", "comment": null}, "mobile_conversion_downloads_order_quantity": {"type": "integer", "index": 90, "name": "mobile_conversion_downloads_order_quantity", "comment": null}, "mobile_conversion_downloads_post_engagement": {"type": "integer", "index": 91, "name": "mobile_conversion_downloads_post_engagement", "comment": null}, "mobile_conversion_downloads_post_view": {"type": "integer", "index": 92, "name": "mobile_conversion_downloads_post_view", "comment": null}, "mobile_conversion_downloads_sale_amount": {"type": "integer", "index": 93, "name": "mobile_conversion_downloads_sale_amount", "comment": null}, "mobile_conversion_installs_assisted": {"type": "integer", "index": 94, "name": "mobile_conversion_installs_assisted", "comment": null}, "mobile_conversion_installs_order_quantity": {"type": "integer", "index": 95, "name": "mobile_conversion_installs_order_quantity", "comment": null}, "mobile_conversion_installs_post_engagement": {"type": "integer", "index": 96, "name": "mobile_conversion_installs_post_engagement", "comment": null}, "mobile_conversion_installs_post_view": {"type": "integer", "index": 97, "name": "mobile_conversion_installs_post_view", "comment": null}, "mobile_conversion_installs_sale_amount": {"type": "integer", "index": 98, "name": "mobile_conversion_installs_sale_amount", "comment": null}, "mobile_conversion_invites_assisted": {"type": "integer", "index": 99, "name": "mobile_conversion_invites_assisted", "comment": null}, "mobile_conversion_invites_order_quantity": {"type": "integer", "index": 100, "name": "mobile_conversion_invites_order_quantity", "comment": null}, "mobile_conversion_invites_post_engagement": {"type": "integer", "index": 101, "name": "mobile_conversion_invites_post_engagement", "comment": null}, "mobile_conversion_invites_post_view": {"type": "integer", "index": 102, "name": "mobile_conversion_invites_post_view", "comment": null}, "mobile_conversion_invites_sale_amount": {"type": "integer", "index": 103, "name": "mobile_conversion_invites_sale_amount", "comment": null}, "mobile_conversion_key_page_views_post_engagement": {"type": "integer", "index": 104, "name": "mobile_conversion_key_page_views_post_engagement", "comment": null}, "mobile_conversion_key_page_views_post_view": {"type": "integer", "index": 105, "name": "mobile_conversion_key_page_views_post_view", "comment": null}, "mobile_conversion_levels_achieved_assisted": {"type": "integer", "index": 106, "name": "mobile_conversion_levels_achieved_assisted", "comment": null}, "mobile_conversion_levels_achieved_order_quantity": {"type": "integer", "index": 107, "name": "mobile_conversion_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_levels_achieved_post_engagement": {"type": "integer", "index": 108, "name": "mobile_conversion_levels_achieved_post_engagement", "comment": null}, "mobile_conversion_levels_achieved_post_view": {"type": "integer", "index": 109, "name": "mobile_conversion_levels_achieved_post_view", "comment": null}, "mobile_conversion_levels_achieved_sale_amount": {"type": "integer", "index": 110, "name": "mobile_conversion_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_metric": {"type": "integer", "index": 111, "name": "mobile_conversion_lifetime_value_achievements_unlocked_metric", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_order_qu": {"type": "integer", "index": 112, "name": "mobile_conversion_lifetime_value_achievements_unlocked_order_qu", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo": {"type": "integer", "index": 113, "name": "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_metric": {"type": "integer", "index": 114, "name": "mobile_conversion_lifetime_value_add_to_carts_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_order_quantity": {"type": "integer", "index": 115, "name": "mobile_conversion_lifetime_value_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_sale_amount": {"type": "integer", "index": 116, "name": "mobile_conversion_lifetime_value_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_metric": {"type": "integer", "index": 117, "name": "mobile_conversion_lifetime_value_add_to_wishlists_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit": {"type": "integer", "index": 118, "name": "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount": {"type": "integer", "index": 119, "name": "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_metric": {"type": "integer", "index": 120, "name": "mobile_conversion_lifetime_value_checkouts_initiated_metric", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_order_quan": {"type": "integer", "index": 121, "name": "mobile_conversion_lifetime_value_checkouts_initiated_order_quan", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun": {"type": "integer", "index": 122, "name": "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_content_views_metric": {"type": "integer", "index": 123, "name": "mobile_conversion_lifetime_value_content_views_metric", "comment": null}, "mobile_conversion_lifetime_value_content_views_order_quantity": {"type": "integer", "index": 124, "name": "mobile_conversion_lifetime_value_content_views_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_content_views_sale_amount": {"type": "integer", "index": 125, "name": "mobile_conversion_lifetime_value_content_views_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_invites_metric": {"type": "integer", "index": 126, "name": "mobile_conversion_lifetime_value_invites_metric", "comment": null}, "mobile_conversion_lifetime_value_invites_order_quantity": {"type": "integer", "index": 127, "name": "mobile_conversion_lifetime_value_invites_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_invites_sale_amount": {"type": "integer", "index": 128, "name": "mobile_conversion_lifetime_value_invites_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_metric": {"type": "integer", "index": 129, "name": "mobile_conversion_lifetime_value_levels_achieved_metric", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_order_quantity": {"type": "integer", "index": 130, "name": "mobile_conversion_lifetime_value_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_sale_amount": {"type": "integer", "index": 131, "name": "mobile_conversion_lifetime_value_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_logins_metric": {"type": "integer", "index": 132, "name": "mobile_conversion_lifetime_value_logins_metric", "comment": null}, "mobile_conversion_lifetime_value_logins_order_quantity": {"type": "integer", "index": 133, "name": "mobile_conversion_lifetime_value_logins_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_logins_sale_amount": {"type": "integer", "index": 134, "name": "mobile_conversion_lifetime_value_logins_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_metric": {"type": "integer", "index": 135, "name": "mobile_conversion_lifetime_value_payment_info_additions_metric", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_order_q": {"type": "integer", "index": 136, "name": "mobile_conversion_lifetime_value_payment_info_additions_order_q", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_sale_am": {"type": "integer", "index": 137, "name": "mobile_conversion_lifetime_value_payment_info_additions_sale_am", "comment": null}, "mobile_conversion_lifetime_value_purchases_metric": {"type": "integer", "index": 138, "name": "mobile_conversion_lifetime_value_purchases_metric", "comment": null}, "mobile_conversion_lifetime_value_purchases_order_quantity": {"type": "integer", "index": 139, "name": "mobile_conversion_lifetime_value_purchases_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_purchases_sale_amount": {"type": "integer", "index": 140, "name": "mobile_conversion_lifetime_value_purchases_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_rates_metric": {"type": "integer", "index": 141, "name": "mobile_conversion_lifetime_value_rates_metric", "comment": null}, "mobile_conversion_lifetime_value_rates_order_quantity": {"type": "integer", "index": 142, "name": "mobile_conversion_lifetime_value_rates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_rates_sale_amount": {"type": "integer", "index": 143, "name": "mobile_conversion_lifetime_value_rates_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_reservations_metric": {"type": "integer", "index": 144, "name": "mobile_conversion_lifetime_value_reservations_metric", "comment": null}, "mobile_conversion_lifetime_value_reservations_order_quantity": {"type": "integer", "index": 145, "name": "mobile_conversion_lifetime_value_reservations_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_reservations_sale_amount": {"type": "integer", "index": 146, "name": "mobile_conversion_lifetime_value_reservations_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_searches_metric": {"type": "integer", "index": 147, "name": "mobile_conversion_lifetime_value_searches_metric", "comment": null}, "mobile_conversion_lifetime_value_searches_order_quantity": {"type": "integer", "index": 148, "name": "mobile_conversion_lifetime_value_searches_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_searches_sale_amount": {"type": "integer", "index": 149, "name": "mobile_conversion_lifetime_value_searches_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_shares_metric": {"type": "integer", "index": 150, "name": "mobile_conversion_lifetime_value_shares_metric", "comment": null}, "mobile_conversion_lifetime_value_shares_order_quantity": {"type": "integer", "index": 151, "name": "mobile_conversion_lifetime_value_shares_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_shares_sale_amount": {"type": "integer", "index": 152, "name": "mobile_conversion_lifetime_value_shares_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_metric": {"type": "integer", "index": 153, "name": "mobile_conversion_lifetime_value_sign_ups_metric", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_order_quantity": {"type": "integer", "index": 154, "name": "mobile_conversion_lifetime_value_sign_ups_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_sale_amount": {"type": "integer", "index": 155, "name": "mobile_conversion_lifetime_value_sign_ups_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_metric": {"type": "integer", "index": 156, "name": "mobile_conversion_lifetime_value_spent_credits_metric", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_order_quantity": {"type": "integer", "index": 157, "name": "mobile_conversion_lifetime_value_spent_credits_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_sale_amount": {"type": "integer", "index": 158, "name": "mobile_conversion_lifetime_value_spent_credits_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_metric": {"type": "integer", "index": 159, "name": "mobile_conversion_lifetime_value_tutorials_completed_metric", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_order_quan": {"type": "integer", "index": 160, "name": "mobile_conversion_lifetime_value_tutorials_completed_order_quan", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun": {"type": "integer", "index": 161, "name": "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_updates_metric": {"type": "integer", "index": 162, "name": "mobile_conversion_lifetime_value_updates_metric", "comment": null}, "mobile_conversion_lifetime_value_updates_order_quantity": {"type": "integer", "index": 163, "name": "mobile_conversion_lifetime_value_updates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_updates_sale_amount": {"type": "integer", "index": 164, "name": "mobile_conversion_lifetime_value_updates_sale_amount", "comment": null}, "mobile_conversion_logins_assisted": {"type": "integer", "index": 165, "name": "mobile_conversion_logins_assisted", "comment": null}, "mobile_conversion_logins_order_quantity": {"type": "integer", "index": 166, "name": "mobile_conversion_logins_order_quantity", "comment": null}, "mobile_conversion_logins_post_engagement": {"type": "integer", "index": 167, "name": "mobile_conversion_logins_post_engagement", "comment": null}, "mobile_conversion_logins_post_view": {"type": "integer", "index": 168, "name": "mobile_conversion_logins_post_view", "comment": null}, "mobile_conversion_logins_sale_amount": {"type": "integer", "index": 169, "name": "mobile_conversion_logins_sale_amount", "comment": null}, "mobile_conversion_payment_info_additions_assisted": {"type": "integer", "index": 170, "name": "mobile_conversion_payment_info_additions_assisted", "comment": null}, "mobile_conversion_payment_info_additions_order_quantity": {"type": "integer", "index": 171, "name": "mobile_conversion_payment_info_additions_order_quantity", "comment": null}, "mobile_conversion_payment_info_additions_post_engagement": {"type": "integer", "index": 172, "name": "mobile_conversion_payment_info_additions_post_engagement", "comment": null}, "mobile_conversion_payment_info_additions_post_view": {"type": "integer", "index": 173, "name": "mobile_conversion_payment_info_additions_post_view", "comment": null}, "mobile_conversion_payment_info_additions_sale_amount": {"type": "integer", "index": 174, "name": "mobile_conversion_payment_info_additions_sale_amount", "comment": null}, "mobile_conversion_purchases_assisted": {"type": "integer", "index": 175, "name": "mobile_conversion_purchases_assisted", "comment": null}, "mobile_conversion_purchases_order_quantity": {"type": "integer", "index": 176, "name": "mobile_conversion_purchases_order_quantity", "comment": null}, "mobile_conversion_purchases_post_engagement": {"type": "integer", "index": 177, "name": "mobile_conversion_purchases_post_engagement", "comment": null}, "mobile_conversion_purchases_post_view": {"type": "integer", "index": 178, "name": "mobile_conversion_purchases_post_view", "comment": null}, "mobile_conversion_purchases_sale_amount": {"type": "integer", "index": 179, "name": "mobile_conversion_purchases_sale_amount", "comment": null}, "mobile_conversion_rates_assisted": {"type": "integer", "index": 180, "name": "mobile_conversion_rates_assisted", "comment": null}, "mobile_conversion_rates_order_quantity": {"type": "integer", "index": 181, "name": "mobile_conversion_rates_order_quantity", "comment": null}, "mobile_conversion_rates_post_engagement": {"type": "integer", "index": 182, "name": "mobile_conversion_rates_post_engagement", "comment": null}, "mobile_conversion_rates_post_view": {"type": "integer", "index": 183, "name": "mobile_conversion_rates_post_view", "comment": null}, "mobile_conversion_rates_sale_amount": {"type": "integer", "index": 184, "name": "mobile_conversion_rates_sale_amount", "comment": null}, "mobile_conversion_re_engages_assisted": {"type": "integer", "index": 185, "name": "mobile_conversion_re_engages_assisted", "comment": null}, "mobile_conversion_re_engages_order_quantity": {"type": "integer", "index": 186, "name": "mobile_conversion_re_engages_order_quantity", "comment": null}, "mobile_conversion_re_engages_post_engagement": {"type": "integer", "index": 187, "name": "mobile_conversion_re_engages_post_engagement", "comment": null}, "mobile_conversion_re_engages_post_view": {"type": "integer", "index": 188, "name": "mobile_conversion_re_engages_post_view", "comment": null}, "mobile_conversion_re_engages_sale_amount": {"type": "integer", "index": 189, "name": "mobile_conversion_re_engages_sale_amount", "comment": null}, "mobile_conversion_reservations_assisted": {"type": "integer", "index": 190, "name": "mobile_conversion_reservations_assisted", "comment": null}, "mobile_conversion_reservations_order_quantity": {"type": "integer", "index": 191, "name": "mobile_conversion_reservations_order_quantity", "comment": null}, "mobile_conversion_reservations_post_engagement": {"type": "integer", "index": 192, "name": "mobile_conversion_reservations_post_engagement", "comment": null}, "mobile_conversion_reservations_post_view": {"type": "integer", "index": 193, "name": "mobile_conversion_reservations_post_view", "comment": null}, "mobile_conversion_reservations_sale_amount": {"type": "integer", "index": 194, "name": "mobile_conversion_reservations_sale_amount", "comment": null}, "mobile_conversion_searches_assisted": {"type": "integer", "index": 195, "name": "mobile_conversion_searches_assisted", "comment": null}, "mobile_conversion_searches_order_quantity": {"type": "integer", "index": 196, "name": "mobile_conversion_searches_order_quantity", "comment": null}, "mobile_conversion_searches_post_engagement": {"type": "integer", "index": 197, "name": "mobile_conversion_searches_post_engagement", "comment": null}, "mobile_conversion_searches_post_view": {"type": "integer", "index": 198, "name": "mobile_conversion_searches_post_view", "comment": null}, "mobile_conversion_searches_sale_amount": {"type": "integer", "index": 199, "name": "mobile_conversion_searches_sale_amount", "comment": null}, "mobile_conversion_shares_assisted": {"type": "integer", "index": 200, "name": "mobile_conversion_shares_assisted", "comment": null}, "mobile_conversion_shares_order_quantity": {"type": "integer", "index": 201, "name": "mobile_conversion_shares_order_quantity", "comment": null}, "mobile_conversion_shares_post_engagement": {"type": "integer", "index": 202, "name": "mobile_conversion_shares_post_engagement", "comment": null}, "mobile_conversion_shares_post_view": {"type": "integer", "index": 203, "name": "mobile_conversion_shares_post_view", "comment": null}, "mobile_conversion_shares_sale_amount": {"type": "integer", "index": 204, "name": "mobile_conversion_shares_sale_amount", "comment": null}, "mobile_conversion_sign_ups_assisted": {"type": "integer", "index": 205, "name": "mobile_conversion_sign_ups_assisted", "comment": null}, "mobile_conversion_sign_ups_order_quantity": {"type": "integer", "index": 206, "name": "mobile_conversion_sign_ups_order_quantity", "comment": null}, "mobile_conversion_sign_ups_post_engagement": {"type": "integer", "index": 207, "name": "mobile_conversion_sign_ups_post_engagement", "comment": null}, "mobile_conversion_sign_ups_post_view": {"type": "integer", "index": 208, "name": "mobile_conversion_sign_ups_post_view", "comment": null}, "mobile_conversion_sign_ups_sale_amount": {"type": "integer", "index": 209, "name": "mobile_conversion_sign_ups_sale_amount", "comment": null}, "mobile_conversion_site_visits_order_quantity": {"type": "integer", "index": 210, "name": "mobile_conversion_site_visits_order_quantity", "comment": null}, "mobile_conversion_site_visits_post_engagement": {"type": "integer", "index": 211, "name": "mobile_conversion_site_visits_post_engagement", "comment": null}, "mobile_conversion_site_visits_post_view": {"type": "integer", "index": 212, "name": "mobile_conversion_site_visits_post_view", "comment": null}, "mobile_conversion_site_visits_sale_amount": {"type": "integer", "index": 213, "name": "mobile_conversion_site_visits_sale_amount", "comment": null}, "mobile_conversion_spent_credits_assisted": {"type": "integer", "index": 214, "name": "mobile_conversion_spent_credits_assisted", "comment": null}, "mobile_conversion_spent_credits_order_quantity": {"type": "integer", "index": 215, "name": "mobile_conversion_spent_credits_order_quantity", "comment": null}, "mobile_conversion_spent_credits_post_engagement": {"type": "integer", "index": 216, "name": "mobile_conversion_spent_credits_post_engagement", "comment": null}, "mobile_conversion_spent_credits_post_view": {"type": "integer", "index": 217, "name": "mobile_conversion_spent_credits_post_view", "comment": null}, "mobile_conversion_spent_credits_sale_amount": {"type": "integer", "index": 218, "name": "mobile_conversion_spent_credits_sale_amount", "comment": null}, "mobile_conversion_tutorials_completed_assisted": {"type": "integer", "index": 219, "name": "mobile_conversion_tutorials_completed_assisted", "comment": null}, "mobile_conversion_tutorials_completed_order_quantity": {"type": "integer", "index": 220, "name": "mobile_conversion_tutorials_completed_order_quantity", "comment": null}, "mobile_conversion_tutorials_completed_post_engagement": {"type": "integer", "index": 221, "name": "mobile_conversion_tutorials_completed_post_engagement", "comment": null}, "mobile_conversion_tutorials_completed_post_view": {"type": "integer", "index": 222, "name": "mobile_conversion_tutorials_completed_post_view", "comment": null}, "mobile_conversion_tutorials_completed_sale_amount": {"type": "integer", "index": 223, "name": "mobile_conversion_tutorials_completed_sale_amount", "comment": null}, "mobile_conversion_updates_assisted": {"type": "integer", "index": 224, "name": "mobile_conversion_updates_assisted", "comment": null}, "mobile_conversion_updates_order_quantity": {"type": "integer", "index": 225, "name": "mobile_conversion_updates_order_quantity", "comment": null}, "mobile_conversion_updates_post_engagement": {"type": "integer", "index": 226, "name": "mobile_conversion_updates_post_engagement", "comment": null}, "mobile_conversion_updates_post_view": {"type": "integer", "index": 227, "name": "mobile_conversion_updates_post_view", "comment": null}, "mobile_conversion_updates_sale_amount": {"type": "integer", "index": 228, "name": "mobile_conversion_updates_sale_amount", "comment": null}, "poll_card_vote": {"type": "integer", "index": 229, "name": "poll_card_vote", "comment": null}, "qualified_impressions": {"type": "integer", "index": 230, "name": "qualified_impressions", "comment": null}, "replies": {"type": "integer", "index": 231, "name": "replies", "comment": null}, "retweets": {"type": "integer", "index": 232, "name": "retweets", "comment": null}, "tweets_send": {"type": "integer", "index": 233, "name": "tweets_send", "comment": null}, "unfollows": {"type": "integer", "index": 234, "name": "unfollows", "comment": null}, "url_clicks": {"type": "integer", "index": 235, "name": "url_clicks", "comment": null}, "video_3_s_100_pct_views": {"type": "integer", "index": 236, "name": "video_3_s_100_pct_views", "comment": null}, "video_6_s_views": {"type": "integer", "index": 237, "name": "video_6_s_views", "comment": null}, "video_content_starts": {"type": "integer", "index": 238, "name": "video_content_starts", "comment": null}, "video_cta_clicks": {"type": "integer", "index": 239, "name": "video_cta_clicks", "comment": null}, "video_mrc_views": {"type": "integer", "index": 240, "name": "video_mrc_views", "comment": null}, "video_total_views": {"type": "integer", "index": 241, "name": "video_total_views", "comment": null}, "video_views_100": {"type": "integer", "index": 242, "name": "video_views_100", "comment": null}, "video_views_25": {"type": "integer", "index": 243, "name": "video_views_25", "comment": null}, "video_views_50": {"type": "integer", "index": 244, "name": "video_views_50", "comment": null}, "video_views_75": {"type": "integer", "index": 245, "name": "video_views_75", "comment": null}, "mobile_conversion_installs_skan_post_engagement": {"type": "integer", "index": 246, "name": "mobile_conversion_installs_skan_post_engagement", "comment": null}, "mobile_conversion_installs_skan_post_view": {"type": "integer", "index": 247, "name": "mobile_conversion_installs_skan_post_view", "comment": null}, "mobile_conversion_purchases_skan_post_engagement": {"type": "integer", "index": 248, "name": "mobile_conversion_purchases_skan_post_engagement", "comment": null}, "mobile_conversion_purchases_skan_post_view": {"type": "integer", "index": 249, "name": "mobile_conversion_purchases_skan_post_view", "comment": null}, "video_15_s_views": {"type": "integer", "index": 250, "name": "video_15_s_views", "comment": null}, "auto_created_conversion_landing_page_view": {"type": "integer", "index": 251, "name": "auto_created_conversion_landing_page_view", "comment": null}, "auto_created_conversion_session": {"type": "integer", "index": 252, "name": "auto_created_conversion_session", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.twitter_campaign_report_data"}, "seed.ad_reporting_integration_tests.twitter_line_item_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_line_item_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"advertiser_domain": {"type": "text", "index": 1, "name": "advertiser_domain", "comment": null}, "advertiser_user_id": {"type": "integer", "index": 2, "name": "advertiser_user_id", "comment": null}, "automatically_select_bid": {"type": "boolean", "index": 3, "name": "automatically_select_bid", "comment": null}, "bid_amount_local_micro": {"type": "integer", "index": 4, "name": "bid_amount_local_micro", "comment": null}, "bid_type": {"type": "text", "index": 5, "name": "bid_type", "comment": null}, "bid_unit": {"type": "text", "index": 6, "name": "bid_unit", "comment": null}, "campaign_id": {"type": "text", "index": 7, "name": "campaign_id", "comment": null}, "charge_by": {"type": "text", "index": 8, "name": "charge_by", "comment": null}, "created_at": {"type": "text", "index": 9, "name": "created_at", "comment": null}, "creative_source": {"type": "text", "index": 10, "name": "creative_source", "comment": null}, "currency": {"type": "text", "index": 11, "name": "currency", "comment": null}, "deleted": {"type": "boolean", "index": 12, "name": "deleted", "comment": null}, "end_time": {"type": "integer", "index": 13, "name": "end_time", "comment": null}, "entity_status": {"type": "text", "index": 14, "name": "entity_status", "comment": null}, "id": {"type": "text", "index": 15, "name": "id", "comment": null}, "name": {"type": "text", "index": 16, "name": "name", "comment": null}, "objective": {"type": "text", "index": 17, "name": "objective", "comment": null}, "optimization": {"type": "text", "index": 18, "name": "optimization", "comment": null}, "primary_web_event_tag": {"type": "integer", "index": 19, "name": "primary_web_event_tag", "comment": null}, "product_type": {"type": "text", "index": 20, "name": "product_type", "comment": null}, "start_time": {"type": "integer", "index": 21, "name": "start_time", "comment": null}, "target_cpa_local_micro": {"type": "integer", "index": 22, "name": "target_cpa_local_micro", "comment": null}, "total_budget_amount_local_micro": {"type": "integer", "index": 23, "name": "total_budget_amount_local_micro", "comment": null}, "updated_at": {"type": "text", "index": 24, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.twitter_line_item_history_data"}, "seed.ad_reporting_integration_tests.twitter_line_item_keywords_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_line_item_keywords_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "text", "index": 1, "name": "account_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "line_item_id": {"type": "text", "index": 3, "name": "line_item_id", "comment": null}, "placement": {"type": "text", "index": 4, "name": "placement", "comment": null}, "segment": {"type": "text", "index": 5, "name": "segment", "comment": null}, "_fivetran_synced": {"type": "text", "index": 6, "name": "_fivetran_synced", "comment": null}, "app_clicks": {"type": "integer", "index": 7, "name": "app_clicks", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 8, "name": "billed_charge_local_micro", "comment": null}, "billed_engagements": {"type": "integer", "index": 9, "name": "billed_engagements", "comment": null}, "card_engagements": {"type": "integer", "index": 10, "name": "card_engagements", "comment": null}, "carousel_swipes": {"type": "integer", "index": 11, "name": "carousel_swipes", "comment": null}, "clicks": {"type": "integer", "index": 12, "name": "clicks", "comment": null}, "conversion_custom_metric": {"type": "integer", "index": 13, "name": "conversion_custom_metric", "comment": null}, "conversion_custom_order_quantity": {"type": "integer", "index": 14, "name": "conversion_custom_order_quantity", "comment": null}, "conversion_custom_order_quantity_engagement": {"type": "integer", "index": 15, "name": "conversion_custom_order_quantity_engagement", "comment": null}, "conversion_custom_order_quantity_view": {"type": "integer", "index": 16, "name": "conversion_custom_order_quantity_view", "comment": null}, "conversion_custom_post_engagement": {"type": "integer", "index": 17, "name": "conversion_custom_post_engagement", "comment": null}, "conversion_custom_post_view": {"type": "integer", "index": 18, "name": "conversion_custom_post_view", "comment": null}, "conversion_custom_sale_amount": {"type": "integer", "index": 19, "name": "conversion_custom_sale_amount", "comment": null}, "conversion_custom_sale_amount_engagement": {"type": "integer", "index": 20, "name": "conversion_custom_sale_amount_engagement", "comment": null}, "conversion_custom_sale_amount_view": {"type": "integer", "index": 21, "name": "conversion_custom_sale_amount_view", "comment": null}, "conversion_downloads_metric": {"type": "integer", "index": 22, "name": "conversion_downloads_metric", "comment": null}, "conversion_downloads_order_quantity": {"type": "integer", "index": 23, "name": "conversion_downloads_order_quantity", "comment": null}, "conversion_downloads_order_quantity_engagement": {"type": "integer", "index": 24, "name": "conversion_downloads_order_quantity_engagement", "comment": null}, "conversion_downloads_order_quantity_view": {"type": "integer", "index": 25, "name": "conversion_downloads_order_quantity_view", "comment": null}, "conversion_downloads_post_engagement": {"type": "integer", "index": 26, "name": "conversion_downloads_post_engagement", "comment": null}, "conversion_downloads_post_view": {"type": "integer", "index": 27, "name": "conversion_downloads_post_view", "comment": null}, "conversion_downloads_sale_amount": {"type": "integer", "index": 28, "name": "conversion_downloads_sale_amount", "comment": null}, "conversion_downloads_sale_amount_engagement": {"type": "integer", "index": 29, "name": "conversion_downloads_sale_amount_engagement", "comment": null}, "conversion_downloads_sale_amount_view": {"type": "integer", "index": 30, "name": "conversion_downloads_sale_amount_view", "comment": null}, "conversion_purchases_assisted": {"type": "integer", "index": 31, "name": "conversion_purchases_assisted", "comment": null}, "conversion_purchases_metric": {"type": "integer", "index": 32, "name": "conversion_purchases_metric", "comment": null}, "conversion_purchases_order_quantity": {"type": "integer", "index": 33, "name": "conversion_purchases_order_quantity", "comment": null}, "conversion_purchases_order_quantity_engagement": {"type": "integer", "index": 34, "name": "conversion_purchases_order_quantity_engagement", "comment": null}, "conversion_purchases_order_quantity_view": {"type": "integer", "index": 35, "name": "conversion_purchases_order_quantity_view", "comment": null}, "conversion_purchases_post_engagement": {"type": "integer", "index": 36, "name": "conversion_purchases_post_engagement", "comment": null}, "conversion_purchases_post_view": {"type": "integer", "index": 37, "name": "conversion_purchases_post_view", "comment": null}, "conversion_purchases_sale_amount": {"type": "integer", "index": 38, "name": "conversion_purchases_sale_amount", "comment": null}, "conversion_purchases_sale_amount_engagement": {"type": "integer", "index": 39, "name": "conversion_purchases_sale_amount_engagement", "comment": null}, "conversion_purchases_sale_amount_view": {"type": "integer", "index": 40, "name": "conversion_purchases_sale_amount_view", "comment": null}, "conversion_sign_ups_assisted": {"type": "integer", "index": 41, "name": "conversion_sign_ups_assisted", "comment": null}, "conversion_sign_ups_metric": {"type": "integer", "index": 42, "name": "conversion_sign_ups_metric", "comment": null}, "conversion_sign_ups_order_quantity": {"type": "integer", "index": 43, "name": "conversion_sign_ups_order_quantity", "comment": null}, "conversion_sign_ups_order_quantity_engagement": {"type": "integer", "index": 44, "name": "conversion_sign_ups_order_quantity_engagement", "comment": null}, "conversion_sign_ups_order_quantity_view": {"type": "integer", "index": 45, "name": "conversion_sign_ups_order_quantity_view", "comment": null}, "conversion_sign_ups_post_engagement": {"type": "integer", "index": 46, "name": "conversion_sign_ups_post_engagement", "comment": null}, "conversion_sign_ups_post_view": {"type": "integer", "index": 47, "name": "conversion_sign_ups_post_view", "comment": null}, "conversion_sign_ups_sale_amount": {"type": "integer", "index": 48, "name": "conversion_sign_ups_sale_amount", "comment": null}, "conversion_sign_ups_sale_amount_engagement": {"type": "integer", "index": 49, "name": "conversion_sign_ups_sale_amount_engagement", "comment": null}, "conversion_sign_ups_sale_amount_view": {"type": "integer", "index": 50, "name": "conversion_sign_ups_sale_amount_view", "comment": null}, "conversion_site_visits_metric": {"type": "integer", "index": 51, "name": "conversion_site_visits_metric", "comment": null}, "conversion_site_visits_order_quantity": {"type": "integer", "index": 52, "name": "conversion_site_visits_order_quantity", "comment": null}, "conversion_site_visits_order_quantity_engagement": {"type": "integer", "index": 53, "name": "conversion_site_visits_order_quantity_engagement", "comment": null}, "conversion_site_visits_order_quantity_view": {"type": "integer", "index": 54, "name": "conversion_site_visits_order_quantity_view", "comment": null}, "conversion_site_visits_post_engagement": {"type": "integer", "index": 55, "name": "conversion_site_visits_post_engagement", "comment": null}, "conversion_site_visits_post_view": {"type": "integer", "index": 56, "name": "conversion_site_visits_post_view", "comment": null}, "conversion_site_visits_sale_amount": {"type": "integer", "index": 57, "name": "conversion_site_visits_sale_amount", "comment": null}, "conversion_site_visits_sale_amount_engagement": {"type": "integer", "index": 58, "name": "conversion_site_visits_sale_amount_engagement", "comment": null}, "conversion_site_visits_sale_amount_view": {"type": "integer", "index": 59, "name": "conversion_site_visits_sale_amount_view", "comment": null}, "engagements": {"type": "integer", "index": 60, "name": "engagements", "comment": null}, "follows": {"type": "integer", "index": 61, "name": "follows", "comment": null}, "impressions": {"type": "integer", "index": 62, "name": "impressions", "comment": null}, "likes": {"type": "integer", "index": 63, "name": "likes", "comment": null}, "media_engagements": {"type": "integer", "index": 64, "name": "media_engagements", "comment": null}, "media_views": {"type": "integer", "index": 65, "name": "media_views", "comment": null}, "mobile_conversion_achievements_unlocked_assisted": {"type": "integer", "index": 66, "name": "mobile_conversion_achievements_unlocked_assisted", "comment": null}, "mobile_conversion_achievements_unlocked_order_quantity": {"type": "integer", "index": 67, "name": "mobile_conversion_achievements_unlocked_order_quantity", "comment": null}, "mobile_conversion_achievements_unlocked_post_engagement": {"type": "integer", "index": 68, "name": "mobile_conversion_achievements_unlocked_post_engagement", "comment": null}, "mobile_conversion_achievements_unlocked_post_view": {"type": "integer", "index": 69, "name": "mobile_conversion_achievements_unlocked_post_view", "comment": null}, "mobile_conversion_achievements_unlocked_sale_amount": {"type": "integer", "index": 70, "name": "mobile_conversion_achievements_unlocked_sale_amount", "comment": null}, "mobile_conversion_add_to_carts_assisted": {"type": "integer", "index": 71, "name": "mobile_conversion_add_to_carts_assisted", "comment": null}, "mobile_conversion_add_to_carts_order_quantity": {"type": "integer", "index": 72, "name": "mobile_conversion_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_add_to_carts_post_engagement": {"type": "integer", "index": 73, "name": "mobile_conversion_add_to_carts_post_engagement", "comment": null}, "mobile_conversion_add_to_carts_post_view": {"type": "integer", "index": 74, "name": "mobile_conversion_add_to_carts_post_view", "comment": null}, "mobile_conversion_add_to_carts_sale_amount": {"type": "integer", "index": 75, "name": "mobile_conversion_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_add_to_wishlists_assisted": {"type": "integer", "index": 76, "name": "mobile_conversion_add_to_wishlists_assisted", "comment": null}, "mobile_conversion_add_to_wishlists_order_quantity": {"type": "integer", "index": 77, "name": "mobile_conversion_add_to_wishlists_order_quantity", "comment": null}, "mobile_conversion_add_to_wishlists_post_engagement": {"type": "integer", "index": 78, "name": "mobile_conversion_add_to_wishlists_post_engagement", "comment": null}, "mobile_conversion_add_to_wishlists_post_view": {"type": "integer", "index": 79, "name": "mobile_conversion_add_to_wishlists_post_view", "comment": null}, "mobile_conversion_add_to_wishlists_sale_amount": {"type": "integer", "index": 80, "name": "mobile_conversion_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_checkouts_initiated_assisted": {"type": "integer", "index": 81, "name": "mobile_conversion_checkouts_initiated_assisted", "comment": null}, "mobile_conversion_checkouts_initiated_order_quantity": {"type": "integer", "index": 82, "name": "mobile_conversion_checkouts_initiated_order_quantity", "comment": null}, "mobile_conversion_checkouts_initiated_post_engagement": {"type": "integer", "index": 83, "name": "mobile_conversion_checkouts_initiated_post_engagement", "comment": null}, "mobile_conversion_checkouts_initiated_post_view": {"type": "integer", "index": 84, "name": "mobile_conversion_checkouts_initiated_post_view", "comment": null}, "mobile_conversion_checkouts_initiated_sale_amount": {"type": "integer", "index": 85, "name": "mobile_conversion_checkouts_initiated_sale_amount", "comment": null}, "mobile_conversion_content_views_assisted": {"type": "integer", "index": 86, "name": "mobile_conversion_content_views_assisted", "comment": null}, "mobile_conversion_content_views_order_quantity": {"type": "integer", "index": 87, "name": "mobile_conversion_content_views_order_quantity", "comment": null}, "mobile_conversion_content_views_post_engagement": {"type": "integer", "index": 88, "name": "mobile_conversion_content_views_post_engagement", "comment": null}, "mobile_conversion_content_views_post_view": {"type": "integer", "index": 89, "name": "mobile_conversion_content_views_post_view", "comment": null}, "mobile_conversion_content_views_sale_amount": {"type": "integer", "index": 90, "name": "mobile_conversion_content_views_sale_amount", "comment": null}, "mobile_conversion_downloads_order_quantity": {"type": "integer", "index": 91, "name": "mobile_conversion_downloads_order_quantity", "comment": null}, "mobile_conversion_downloads_post_engagement": {"type": "integer", "index": 92, "name": "mobile_conversion_downloads_post_engagement", "comment": null}, "mobile_conversion_downloads_post_view": {"type": "integer", "index": 93, "name": "mobile_conversion_downloads_post_view", "comment": null}, "mobile_conversion_downloads_sale_amount": {"type": "integer", "index": 94, "name": "mobile_conversion_downloads_sale_amount", "comment": null}, "mobile_conversion_installs_assisted": {"type": "integer", "index": 95, "name": "mobile_conversion_installs_assisted", "comment": null}, "mobile_conversion_installs_order_quantity": {"type": "integer", "index": 96, "name": "mobile_conversion_installs_order_quantity", "comment": null}, "mobile_conversion_installs_post_engagement": {"type": "integer", "index": 97, "name": "mobile_conversion_installs_post_engagement", "comment": null}, "mobile_conversion_installs_post_view": {"type": "integer", "index": 98, "name": "mobile_conversion_installs_post_view", "comment": null}, "mobile_conversion_installs_sale_amount": {"type": "integer", "index": 99, "name": "mobile_conversion_installs_sale_amount", "comment": null}, "mobile_conversion_installs_skan_post_engagement": {"type": "integer", "index": 100, "name": "mobile_conversion_installs_skan_post_engagement", "comment": null}, "mobile_conversion_installs_skan_post_view": {"type": "integer", "index": 101, "name": "mobile_conversion_installs_skan_post_view", "comment": null}, "mobile_conversion_invites_assisted": {"type": "integer", "index": 102, "name": "mobile_conversion_invites_assisted", "comment": null}, "mobile_conversion_invites_order_quantity": {"type": "integer", "index": 103, "name": "mobile_conversion_invites_order_quantity", "comment": null}, "mobile_conversion_invites_post_engagement": {"type": "integer", "index": 104, "name": "mobile_conversion_invites_post_engagement", "comment": null}, "mobile_conversion_invites_post_view": {"type": "integer", "index": 105, "name": "mobile_conversion_invites_post_view", "comment": null}, "mobile_conversion_invites_sale_amount": {"type": "integer", "index": 106, "name": "mobile_conversion_invites_sale_amount", "comment": null}, "mobile_conversion_key_page_views_post_engagement": {"type": "integer", "index": 107, "name": "mobile_conversion_key_page_views_post_engagement", "comment": null}, "mobile_conversion_key_page_views_post_view": {"type": "integer", "index": 108, "name": "mobile_conversion_key_page_views_post_view", "comment": null}, "mobile_conversion_levels_achieved_assisted": {"type": "integer", "index": 109, "name": "mobile_conversion_levels_achieved_assisted", "comment": null}, "mobile_conversion_levels_achieved_order_quantity": {"type": "integer", "index": 110, "name": "mobile_conversion_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_levels_achieved_post_engagement": {"type": "integer", "index": 111, "name": "mobile_conversion_levels_achieved_post_engagement", "comment": null}, "mobile_conversion_levels_achieved_post_view": {"type": "integer", "index": 112, "name": "mobile_conversion_levels_achieved_post_view", "comment": null}, "mobile_conversion_levels_achieved_sale_amount": {"type": "integer", "index": 113, "name": "mobile_conversion_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_metric": {"type": "integer", "index": 114, "name": "mobile_conversion_lifetime_value_achievements_unlocked_metric", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_order_qu": {"type": "integer", "index": 115, "name": "mobile_conversion_lifetime_value_achievements_unlocked_order_qu", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo": {"type": "integer", "index": 116, "name": "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_metric": {"type": "integer", "index": 117, "name": "mobile_conversion_lifetime_value_add_to_carts_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_order_quantity": {"type": "integer", "index": 118, "name": "mobile_conversion_lifetime_value_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_sale_amount": {"type": "integer", "index": 119, "name": "mobile_conversion_lifetime_value_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_metric": {"type": "integer", "index": 120, "name": "mobile_conversion_lifetime_value_add_to_wishlists_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit": {"type": "integer", "index": 121, "name": "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount": {"type": "integer", "index": 122, "name": "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_metric": {"type": "integer", "index": 123, "name": "mobile_conversion_lifetime_value_checkouts_initiated_metric", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_order_quan": {"type": "integer", "index": 124, "name": "mobile_conversion_lifetime_value_checkouts_initiated_order_quan", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun": {"type": "integer", "index": 125, "name": "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_content_views_metric": {"type": "integer", "index": 126, "name": "mobile_conversion_lifetime_value_content_views_metric", "comment": null}, "mobile_conversion_lifetime_value_content_views_order_quantity": {"type": "integer", "index": 127, "name": "mobile_conversion_lifetime_value_content_views_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_content_views_sale_amount": {"type": "integer", "index": 128, "name": "mobile_conversion_lifetime_value_content_views_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_invites_metric": {"type": "integer", "index": 129, "name": "mobile_conversion_lifetime_value_invites_metric", "comment": null}, "mobile_conversion_lifetime_value_invites_order_quantity": {"type": "integer", "index": 130, "name": "mobile_conversion_lifetime_value_invites_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_invites_sale_amount": {"type": "integer", "index": 131, "name": "mobile_conversion_lifetime_value_invites_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_metric": {"type": "integer", "index": 132, "name": "mobile_conversion_lifetime_value_levels_achieved_metric", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_order_quantity": {"type": "integer", "index": 133, "name": "mobile_conversion_lifetime_value_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_sale_amount": {"type": "integer", "index": 134, "name": "mobile_conversion_lifetime_value_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_logins_metric": {"type": "integer", "index": 135, "name": "mobile_conversion_lifetime_value_logins_metric", "comment": null}, "mobile_conversion_lifetime_value_logins_order_quantity": {"type": "integer", "index": 136, "name": "mobile_conversion_lifetime_value_logins_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_logins_sale_amount": {"type": "integer", "index": 137, "name": "mobile_conversion_lifetime_value_logins_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_metric": {"type": "integer", "index": 138, "name": "mobile_conversion_lifetime_value_payment_info_additions_metric", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_order_q": {"type": "integer", "index": 139, "name": "mobile_conversion_lifetime_value_payment_info_additions_order_q", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_sale_am": {"type": "integer", "index": 140, "name": "mobile_conversion_lifetime_value_payment_info_additions_sale_am", "comment": null}, "mobile_conversion_lifetime_value_purchases_metric": {"type": "integer", "index": 141, "name": "mobile_conversion_lifetime_value_purchases_metric", "comment": null}, "mobile_conversion_lifetime_value_purchases_order_quantity": {"type": "integer", "index": 142, "name": "mobile_conversion_lifetime_value_purchases_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_purchases_sale_amount": {"type": "integer", "index": 143, "name": "mobile_conversion_lifetime_value_purchases_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_rates_metric": {"type": "integer", "index": 144, "name": "mobile_conversion_lifetime_value_rates_metric", "comment": null}, "mobile_conversion_lifetime_value_rates_order_quantity": {"type": "integer", "index": 145, "name": "mobile_conversion_lifetime_value_rates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_rates_sale_amount": {"type": "integer", "index": 146, "name": "mobile_conversion_lifetime_value_rates_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_reservations_metric": {"type": "integer", "index": 147, "name": "mobile_conversion_lifetime_value_reservations_metric", "comment": null}, "mobile_conversion_lifetime_value_reservations_order_quantity": {"type": "integer", "index": 148, "name": "mobile_conversion_lifetime_value_reservations_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_reservations_sale_amount": {"type": "integer", "index": 149, "name": "mobile_conversion_lifetime_value_reservations_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_searches_metric": {"type": "integer", "index": 150, "name": "mobile_conversion_lifetime_value_searches_metric", "comment": null}, "mobile_conversion_lifetime_value_searches_order_quantity": {"type": "integer", "index": 151, "name": "mobile_conversion_lifetime_value_searches_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_searches_sale_amount": {"type": "integer", "index": 152, "name": "mobile_conversion_lifetime_value_searches_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_shares_metric": {"type": "integer", "index": 153, "name": "mobile_conversion_lifetime_value_shares_metric", "comment": null}, "mobile_conversion_lifetime_value_shares_order_quantity": {"type": "integer", "index": 154, "name": "mobile_conversion_lifetime_value_shares_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_shares_sale_amount": {"type": "integer", "index": 155, "name": "mobile_conversion_lifetime_value_shares_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_metric": {"type": "integer", "index": 156, "name": "mobile_conversion_lifetime_value_sign_ups_metric", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_order_quantity": {"type": "integer", "index": 157, "name": "mobile_conversion_lifetime_value_sign_ups_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_sale_amount": {"type": "integer", "index": 158, "name": "mobile_conversion_lifetime_value_sign_ups_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_metric": {"type": "integer", "index": 159, "name": "mobile_conversion_lifetime_value_spent_credits_metric", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_order_quantity": {"type": "integer", "index": 160, "name": "mobile_conversion_lifetime_value_spent_credits_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_sale_amount": {"type": "integer", "index": 161, "name": "mobile_conversion_lifetime_value_spent_credits_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_metric": {"type": "integer", "index": 162, "name": "mobile_conversion_lifetime_value_tutorials_completed_metric", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_order_quan": {"type": "integer", "index": 163, "name": "mobile_conversion_lifetime_value_tutorials_completed_order_quan", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun": {"type": "integer", "index": 164, "name": "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_updates_metric": {"type": "integer", "index": 165, "name": "mobile_conversion_lifetime_value_updates_metric", "comment": null}, "mobile_conversion_lifetime_value_updates_order_quantity": {"type": "integer", "index": 166, "name": "mobile_conversion_lifetime_value_updates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_updates_sale_amount": {"type": "integer", "index": 167, "name": "mobile_conversion_lifetime_value_updates_sale_amount", "comment": null}, "mobile_conversion_logins_assisted": {"type": "integer", "index": 168, "name": "mobile_conversion_logins_assisted", "comment": null}, "mobile_conversion_logins_order_quantity": {"type": "integer", "index": 169, "name": "mobile_conversion_logins_order_quantity", "comment": null}, "mobile_conversion_logins_post_engagement": {"type": "integer", "index": 170, "name": "mobile_conversion_logins_post_engagement", "comment": null}, "mobile_conversion_logins_post_view": {"type": "integer", "index": 171, "name": "mobile_conversion_logins_post_view", "comment": null}, "mobile_conversion_logins_sale_amount": {"type": "integer", "index": 172, "name": "mobile_conversion_logins_sale_amount", "comment": null}, "mobile_conversion_payment_info_additions_assisted": {"type": "integer", "index": 173, "name": "mobile_conversion_payment_info_additions_assisted", "comment": null}, "mobile_conversion_payment_info_additions_order_quantity": {"type": "integer", "index": 174, "name": "mobile_conversion_payment_info_additions_order_quantity", "comment": null}, "mobile_conversion_payment_info_additions_post_engagement": {"type": "integer", "index": 175, "name": "mobile_conversion_payment_info_additions_post_engagement", "comment": null}, "mobile_conversion_payment_info_additions_post_view": {"type": "integer", "index": 176, "name": "mobile_conversion_payment_info_additions_post_view", "comment": null}, "mobile_conversion_payment_info_additions_sale_amount": {"type": "integer", "index": 177, "name": "mobile_conversion_payment_info_additions_sale_amount", "comment": null}, "mobile_conversion_purchases_assisted": {"type": "integer", "index": 178, "name": "mobile_conversion_purchases_assisted", "comment": null}, "mobile_conversion_purchases_order_quantity": {"type": "integer", "index": 179, "name": "mobile_conversion_purchases_order_quantity", "comment": null}, "mobile_conversion_purchases_post_engagement": {"type": "integer", "index": 180, "name": "mobile_conversion_purchases_post_engagement", "comment": null}, "mobile_conversion_purchases_post_view": {"type": "integer", "index": 181, "name": "mobile_conversion_purchases_post_view", "comment": null}, "mobile_conversion_purchases_sale_amount": {"type": "integer", "index": 182, "name": "mobile_conversion_purchases_sale_amount", "comment": null}, "mobile_conversion_purchases_skan_post_engagement": {"type": "integer", "index": 183, "name": "mobile_conversion_purchases_skan_post_engagement", "comment": null}, "mobile_conversion_purchases_skan_post_view": {"type": "integer", "index": 184, "name": "mobile_conversion_purchases_skan_post_view", "comment": null}, "mobile_conversion_rates_assisted": {"type": "integer", "index": 185, "name": "mobile_conversion_rates_assisted", "comment": null}, "mobile_conversion_rates_order_quantity": {"type": "integer", "index": 186, "name": "mobile_conversion_rates_order_quantity", "comment": null}, "mobile_conversion_rates_post_engagement": {"type": "integer", "index": 187, "name": "mobile_conversion_rates_post_engagement", "comment": null}, "mobile_conversion_rates_post_view": {"type": "integer", "index": 188, "name": "mobile_conversion_rates_post_view", "comment": null}, "mobile_conversion_rates_sale_amount": {"type": "integer", "index": 189, "name": "mobile_conversion_rates_sale_amount", "comment": null}, "mobile_conversion_re_engages_assisted": {"type": "integer", "index": 190, "name": "mobile_conversion_re_engages_assisted", "comment": null}, "mobile_conversion_re_engages_order_quantity": {"type": "integer", "index": 191, "name": "mobile_conversion_re_engages_order_quantity", "comment": null}, "mobile_conversion_re_engages_post_engagement": {"type": "integer", "index": 192, "name": "mobile_conversion_re_engages_post_engagement", "comment": null}, "mobile_conversion_re_engages_post_view": {"type": "integer", "index": 193, "name": "mobile_conversion_re_engages_post_view", "comment": null}, "mobile_conversion_re_engages_sale_amount": {"type": "integer", "index": 194, "name": "mobile_conversion_re_engages_sale_amount", "comment": null}, "mobile_conversion_reservations_assisted": {"type": "integer", "index": 195, "name": "mobile_conversion_reservations_assisted", "comment": null}, "mobile_conversion_reservations_order_quantity": {"type": "integer", "index": 196, "name": "mobile_conversion_reservations_order_quantity", "comment": null}, "mobile_conversion_reservations_post_engagement": {"type": "integer", "index": 197, "name": "mobile_conversion_reservations_post_engagement", "comment": null}, "mobile_conversion_reservations_post_view": {"type": "integer", "index": 198, "name": "mobile_conversion_reservations_post_view", "comment": null}, "mobile_conversion_reservations_sale_amount": {"type": "integer", "index": 199, "name": "mobile_conversion_reservations_sale_amount", "comment": null}, "mobile_conversion_searches_assisted": {"type": "integer", "index": 200, "name": "mobile_conversion_searches_assisted", "comment": null}, "mobile_conversion_searches_order_quantity": {"type": "integer", "index": 201, "name": "mobile_conversion_searches_order_quantity", "comment": null}, "mobile_conversion_searches_post_engagement": {"type": "integer", "index": 202, "name": "mobile_conversion_searches_post_engagement", "comment": null}, "mobile_conversion_searches_post_view": {"type": "integer", "index": 203, "name": "mobile_conversion_searches_post_view", "comment": null}, "mobile_conversion_searches_sale_amount": {"type": "integer", "index": 204, "name": "mobile_conversion_searches_sale_amount", "comment": null}, "mobile_conversion_shares_assisted": {"type": "integer", "index": 205, "name": "mobile_conversion_shares_assisted", "comment": null}, "mobile_conversion_shares_order_quantity": {"type": "integer", "index": 206, "name": "mobile_conversion_shares_order_quantity", "comment": null}, "mobile_conversion_shares_post_engagement": {"type": "integer", "index": 207, "name": "mobile_conversion_shares_post_engagement", "comment": null}, "mobile_conversion_shares_post_view": {"type": "integer", "index": 208, "name": "mobile_conversion_shares_post_view", "comment": null}, "mobile_conversion_shares_sale_amount": {"type": "integer", "index": 209, "name": "mobile_conversion_shares_sale_amount", "comment": null}, "mobile_conversion_sign_ups_assisted": {"type": "integer", "index": 210, "name": "mobile_conversion_sign_ups_assisted", "comment": null}, "mobile_conversion_sign_ups_order_quantity": {"type": "integer", "index": 211, "name": "mobile_conversion_sign_ups_order_quantity", "comment": null}, "mobile_conversion_sign_ups_post_engagement": {"type": "integer", "index": 212, "name": "mobile_conversion_sign_ups_post_engagement", "comment": null}, "mobile_conversion_sign_ups_post_view": {"type": "integer", "index": 213, "name": "mobile_conversion_sign_ups_post_view", "comment": null}, "mobile_conversion_sign_ups_sale_amount": {"type": "integer", "index": 214, "name": "mobile_conversion_sign_ups_sale_amount", "comment": null}, "mobile_conversion_site_visits_order_quantity": {"type": "integer", "index": 215, "name": "mobile_conversion_site_visits_order_quantity", "comment": null}, "mobile_conversion_site_visits_post_engagement": {"type": "integer", "index": 216, "name": "mobile_conversion_site_visits_post_engagement", "comment": null}, "mobile_conversion_site_visits_post_view": {"type": "integer", "index": 217, "name": "mobile_conversion_site_visits_post_view", "comment": null}, "mobile_conversion_site_visits_sale_amount": {"type": "integer", "index": 218, "name": "mobile_conversion_site_visits_sale_amount", "comment": null}, "mobile_conversion_spent_credits_assisted": {"type": "integer", "index": 219, "name": "mobile_conversion_spent_credits_assisted", "comment": null}, "mobile_conversion_spent_credits_order_quantity": {"type": "integer", "index": 220, "name": "mobile_conversion_spent_credits_order_quantity", "comment": null}, "mobile_conversion_spent_credits_post_engagement": {"type": "integer", "index": 221, "name": "mobile_conversion_spent_credits_post_engagement", "comment": null}, "mobile_conversion_spent_credits_post_view": {"type": "integer", "index": 222, "name": "mobile_conversion_spent_credits_post_view", "comment": null}, "mobile_conversion_spent_credits_sale_amount": {"type": "integer", "index": 223, "name": "mobile_conversion_spent_credits_sale_amount", "comment": null}, "mobile_conversion_tutorials_completed_assisted": {"type": "integer", "index": 224, "name": "mobile_conversion_tutorials_completed_assisted", "comment": null}, "mobile_conversion_tutorials_completed_order_quantity": {"type": "integer", "index": 225, "name": "mobile_conversion_tutorials_completed_order_quantity", "comment": null}, "mobile_conversion_tutorials_completed_post_engagement": {"type": "integer", "index": 226, "name": "mobile_conversion_tutorials_completed_post_engagement", "comment": null}, "mobile_conversion_tutorials_completed_post_view": {"type": "integer", "index": 227, "name": "mobile_conversion_tutorials_completed_post_view", "comment": null}, "mobile_conversion_tutorials_completed_sale_amount": {"type": "integer", "index": 228, "name": "mobile_conversion_tutorials_completed_sale_amount", "comment": null}, "mobile_conversion_updates_assisted": {"type": "integer", "index": 229, "name": "mobile_conversion_updates_assisted", "comment": null}, "mobile_conversion_updates_order_quantity": {"type": "integer", "index": 230, "name": "mobile_conversion_updates_order_quantity", "comment": null}, "mobile_conversion_updates_post_engagement": {"type": "integer", "index": 231, "name": "mobile_conversion_updates_post_engagement", "comment": null}, "mobile_conversion_updates_post_view": {"type": "integer", "index": 232, "name": "mobile_conversion_updates_post_view", "comment": null}, "mobile_conversion_updates_sale_amount": {"type": "integer", "index": 233, "name": "mobile_conversion_updates_sale_amount", "comment": null}, "poll_card_vote": {"type": "integer", "index": 234, "name": "poll_card_vote", "comment": null}, "qualified_impressions": {"type": "integer", "index": 235, "name": "qualified_impressions", "comment": null}, "replies": {"type": "integer", "index": 236, "name": "replies", "comment": null}, "retweets": {"type": "integer", "index": 237, "name": "retweets", "comment": null}, "tweets_send": {"type": "integer", "index": 238, "name": "tweets_send", "comment": null}, "unfollows": {"type": "integer", "index": 239, "name": "unfollows", "comment": null}, "url_clicks": {"type": "integer", "index": 240, "name": "url_clicks", "comment": null}, "video_15_s_views": {"type": "integer", "index": 241, "name": "video_15_s_views", "comment": null}, "video_3_s_100_pct_views": {"type": "integer", "index": 242, "name": "video_3_s_100_pct_views", "comment": null}, "video_6_s_views": {"type": "integer", "index": 243, "name": "video_6_s_views", "comment": null}, "video_content_starts": {"type": "integer", "index": 244, "name": "video_content_starts", "comment": null}, "video_cta_clicks": {"type": "integer", "index": 245, "name": "video_cta_clicks", "comment": null}, "video_total_views": {"type": "integer", "index": 246, "name": "video_total_views", "comment": null}, "video_views_100": {"type": "integer", "index": 247, "name": "video_views_100", "comment": null}, "video_views_25": {"type": "integer", "index": 248, "name": "video_views_25", "comment": null}, "video_views_50": {"type": "integer", "index": 249, "name": "video_views_50", "comment": null}, "video_views_75": {"type": "integer", "index": 250, "name": "video_views_75", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.twitter_line_item_keywords_report_data"}, "seed.ad_reporting_integration_tests.twitter_line_item_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_line_item_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "text", "index": 1, "name": "account_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "line_item_id": {"type": "text", "index": 3, "name": "line_item_id", "comment": null}, "placement": {"type": "text", "index": 4, "name": "placement", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "app_clicks": {"type": "integer", "index": 6, "name": "app_clicks", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 7, "name": "billed_charge_local_micro", "comment": null}, "billed_engagements": {"type": "integer", "index": 8, "name": "billed_engagements", "comment": null}, "card_engagements": {"type": "integer", "index": 9, "name": "card_engagements", "comment": null}, "carousel_swipes": {"type": "integer", "index": 10, "name": "carousel_swipes", "comment": null}, "clicks": {"type": "integer", "index": 11, "name": "clicks", "comment": null}, "conversion_custom_metric": {"type": "integer", "index": 12, "name": "conversion_custom_metric", "comment": null}, "conversion_custom_order_quantity": {"type": "integer", "index": 13, "name": "conversion_custom_order_quantity", "comment": null}, "conversion_custom_order_quantity_engagement": {"type": "integer", "index": 14, "name": "conversion_custom_order_quantity_engagement", "comment": null}, "conversion_custom_order_quantity_view": {"type": "integer", "index": 15, "name": "conversion_custom_order_quantity_view", "comment": null}, "conversion_custom_post_engagement": {"type": "integer", "index": 16, "name": "conversion_custom_post_engagement", "comment": null}, "conversion_custom_post_view": {"type": "integer", "index": 17, "name": "conversion_custom_post_view", "comment": null}, "conversion_custom_sale_amount": {"type": "integer", "index": 18, "name": "conversion_custom_sale_amount", "comment": null}, "conversion_custom_sale_amount_engagement": {"type": "integer", "index": 19, "name": "conversion_custom_sale_amount_engagement", "comment": null}, "conversion_custom_sale_amount_view": {"type": "integer", "index": 20, "name": "conversion_custom_sale_amount_view", "comment": null}, "conversion_downloads_metric": {"type": "integer", "index": 21, "name": "conversion_downloads_metric", "comment": null}, "conversion_downloads_order_quantity": {"type": "integer", "index": 22, "name": "conversion_downloads_order_quantity", "comment": null}, "conversion_downloads_order_quantity_engagement": {"type": "integer", "index": 23, "name": "conversion_downloads_order_quantity_engagement", "comment": null}, "conversion_downloads_order_quantity_view": {"type": "integer", "index": 24, "name": "conversion_downloads_order_quantity_view", "comment": null}, "conversion_downloads_post_engagement": {"type": "integer", "index": 25, "name": "conversion_downloads_post_engagement", "comment": null}, "conversion_downloads_post_view": {"type": "integer", "index": 26, "name": "conversion_downloads_post_view", "comment": null}, "conversion_downloads_sale_amount": {"type": "integer", "index": 27, "name": "conversion_downloads_sale_amount", "comment": null}, "conversion_downloads_sale_amount_engagement": {"type": "integer", "index": 28, "name": "conversion_downloads_sale_amount_engagement", "comment": null}, "conversion_downloads_sale_amount_view": {"type": "integer", "index": 29, "name": "conversion_downloads_sale_amount_view", "comment": null}, "conversion_purchases_assisted": {"type": "integer", "index": 30, "name": "conversion_purchases_assisted", "comment": null}, "conversion_purchases_metric": {"type": "integer", "index": 31, "name": "conversion_purchases_metric", "comment": null}, "conversion_purchases_order_quantity": {"type": "integer", "index": 32, "name": "conversion_purchases_order_quantity", "comment": null}, "conversion_purchases_order_quantity_engagement": {"type": "integer", "index": 33, "name": "conversion_purchases_order_quantity_engagement", "comment": null}, "conversion_purchases_order_quantity_view": {"type": "integer", "index": 34, "name": "conversion_purchases_order_quantity_view", "comment": null}, "conversion_purchases_post_engagement": {"type": "integer", "index": 35, "name": "conversion_purchases_post_engagement", "comment": null}, "conversion_purchases_post_view": {"type": "integer", "index": 36, "name": "conversion_purchases_post_view", "comment": null}, "conversion_purchases_sale_amount": {"type": "integer", "index": 37, "name": "conversion_purchases_sale_amount", "comment": null}, "conversion_purchases_sale_amount_engagement": {"type": "integer", "index": 38, "name": "conversion_purchases_sale_amount_engagement", "comment": null}, "conversion_purchases_sale_amount_view": {"type": "integer", "index": 39, "name": "conversion_purchases_sale_amount_view", "comment": null}, "conversion_sign_ups_assisted": {"type": "integer", "index": 40, "name": "conversion_sign_ups_assisted", "comment": null}, "conversion_sign_ups_metric": {"type": "integer", "index": 41, "name": "conversion_sign_ups_metric", "comment": null}, "conversion_sign_ups_order_quantity": {"type": "integer", "index": 42, "name": "conversion_sign_ups_order_quantity", "comment": null}, "conversion_sign_ups_order_quantity_engagement": {"type": "integer", "index": 43, "name": "conversion_sign_ups_order_quantity_engagement", "comment": null}, "conversion_sign_ups_order_quantity_view": {"type": "integer", "index": 44, "name": "conversion_sign_ups_order_quantity_view", "comment": null}, "conversion_sign_ups_post_engagement": {"type": "integer", "index": 45, "name": "conversion_sign_ups_post_engagement", "comment": null}, "conversion_sign_ups_post_view": {"type": "integer", "index": 46, "name": "conversion_sign_ups_post_view", "comment": null}, "conversion_sign_ups_sale_amount": {"type": "integer", "index": 47, "name": "conversion_sign_ups_sale_amount", "comment": null}, "conversion_sign_ups_sale_amount_engagement": {"type": "integer", "index": 48, "name": "conversion_sign_ups_sale_amount_engagement", "comment": null}, "conversion_sign_ups_sale_amount_view": {"type": "integer", "index": 49, "name": "conversion_sign_ups_sale_amount_view", "comment": null}, "conversion_site_visits_metric": {"type": "integer", "index": 50, "name": "conversion_site_visits_metric", "comment": null}, "conversion_site_visits_order_quantity": {"type": "integer", "index": 51, "name": "conversion_site_visits_order_quantity", "comment": null}, "conversion_site_visits_order_quantity_engagement": {"type": "integer", "index": 52, "name": "conversion_site_visits_order_quantity_engagement", "comment": null}, "conversion_site_visits_order_quantity_view": {"type": "integer", "index": 53, "name": "conversion_site_visits_order_quantity_view", "comment": null}, "conversion_site_visits_post_engagement": {"type": "integer", "index": 54, "name": "conversion_site_visits_post_engagement", "comment": null}, "conversion_site_visits_post_view": {"type": "integer", "index": 55, "name": "conversion_site_visits_post_view", "comment": null}, "conversion_site_visits_sale_amount": {"type": "integer", "index": 56, "name": "conversion_site_visits_sale_amount", "comment": null}, "conversion_site_visits_sale_amount_engagement": {"type": "integer", "index": 57, "name": "conversion_site_visits_sale_amount_engagement", "comment": null}, "conversion_site_visits_sale_amount_view": {"type": "integer", "index": 58, "name": "conversion_site_visits_sale_amount_view", "comment": null}, "engagements": {"type": "integer", "index": 59, "name": "engagements", "comment": null}, "follows": {"type": "integer", "index": 60, "name": "follows", "comment": null}, "impressions": {"type": "integer", "index": 61, "name": "impressions", "comment": null}, "likes": {"type": "integer", "index": 62, "name": "likes", "comment": null}, "media_engagements": {"type": "integer", "index": 63, "name": "media_engagements", "comment": null}, "media_views": {"type": "integer", "index": 64, "name": "media_views", "comment": null}, "mobile_conversion_achievements_unlocked_assisted": {"type": "integer", "index": 65, "name": "mobile_conversion_achievements_unlocked_assisted", "comment": null}, "mobile_conversion_achievements_unlocked_order_quantity": {"type": "integer", "index": 66, "name": "mobile_conversion_achievements_unlocked_order_quantity", "comment": null}, "mobile_conversion_achievements_unlocked_post_engagement": {"type": "integer", "index": 67, "name": "mobile_conversion_achievements_unlocked_post_engagement", "comment": null}, "mobile_conversion_achievements_unlocked_post_view": {"type": "integer", "index": 68, "name": "mobile_conversion_achievements_unlocked_post_view", "comment": null}, "mobile_conversion_achievements_unlocked_sale_amount": {"type": "integer", "index": 69, "name": "mobile_conversion_achievements_unlocked_sale_amount", "comment": null}, "mobile_conversion_add_to_carts_assisted": {"type": "integer", "index": 70, "name": "mobile_conversion_add_to_carts_assisted", "comment": null}, "mobile_conversion_add_to_carts_order_quantity": {"type": "integer", "index": 71, "name": "mobile_conversion_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_add_to_carts_post_engagement": {"type": "integer", "index": 72, "name": "mobile_conversion_add_to_carts_post_engagement", "comment": null}, "mobile_conversion_add_to_carts_post_view": {"type": "integer", "index": 73, "name": "mobile_conversion_add_to_carts_post_view", "comment": null}, "mobile_conversion_add_to_carts_sale_amount": {"type": "integer", "index": 74, "name": "mobile_conversion_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_add_to_wishlists_assisted": {"type": "integer", "index": 75, "name": "mobile_conversion_add_to_wishlists_assisted", "comment": null}, "mobile_conversion_add_to_wishlists_order_quantity": {"type": "integer", "index": 76, "name": "mobile_conversion_add_to_wishlists_order_quantity", "comment": null}, "mobile_conversion_add_to_wishlists_post_engagement": {"type": "integer", "index": 77, "name": "mobile_conversion_add_to_wishlists_post_engagement", "comment": null}, "mobile_conversion_add_to_wishlists_post_view": {"type": "integer", "index": 78, "name": "mobile_conversion_add_to_wishlists_post_view", "comment": null}, "mobile_conversion_add_to_wishlists_sale_amount": {"type": "integer", "index": 79, "name": "mobile_conversion_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_checkouts_initiated_assisted": {"type": "integer", "index": 80, "name": "mobile_conversion_checkouts_initiated_assisted", "comment": null}, "mobile_conversion_checkouts_initiated_order_quantity": {"type": "integer", "index": 81, "name": "mobile_conversion_checkouts_initiated_order_quantity", "comment": null}, "mobile_conversion_checkouts_initiated_post_engagement": {"type": "integer", "index": 82, "name": "mobile_conversion_checkouts_initiated_post_engagement", "comment": null}, "mobile_conversion_checkouts_initiated_post_view": {"type": "integer", "index": 83, "name": "mobile_conversion_checkouts_initiated_post_view", "comment": null}, "mobile_conversion_checkouts_initiated_sale_amount": {"type": "integer", "index": 84, "name": "mobile_conversion_checkouts_initiated_sale_amount", "comment": null}, "mobile_conversion_content_views_assisted": {"type": "integer", "index": 85, "name": "mobile_conversion_content_views_assisted", "comment": null}, "mobile_conversion_content_views_order_quantity": {"type": "integer", "index": 86, "name": "mobile_conversion_content_views_order_quantity", "comment": null}, "mobile_conversion_content_views_post_engagement": {"type": "integer", "index": 87, "name": "mobile_conversion_content_views_post_engagement", "comment": null}, "mobile_conversion_content_views_post_view": {"type": "integer", "index": 88, "name": "mobile_conversion_content_views_post_view", "comment": null}, "mobile_conversion_content_views_sale_amount": {"type": "integer", "index": 89, "name": "mobile_conversion_content_views_sale_amount", "comment": null}, "mobile_conversion_downloads_order_quantity": {"type": "integer", "index": 90, "name": "mobile_conversion_downloads_order_quantity", "comment": null}, "mobile_conversion_downloads_post_engagement": {"type": "integer", "index": 91, "name": "mobile_conversion_downloads_post_engagement", "comment": null}, "mobile_conversion_downloads_post_view": {"type": "integer", "index": 92, "name": "mobile_conversion_downloads_post_view", "comment": null}, "mobile_conversion_downloads_sale_amount": {"type": "integer", "index": 93, "name": "mobile_conversion_downloads_sale_amount", "comment": null}, "mobile_conversion_installs_assisted": {"type": "integer", "index": 94, "name": "mobile_conversion_installs_assisted", "comment": null}, "mobile_conversion_installs_order_quantity": {"type": "integer", "index": 95, "name": "mobile_conversion_installs_order_quantity", "comment": null}, "mobile_conversion_installs_post_engagement": {"type": "integer", "index": 96, "name": "mobile_conversion_installs_post_engagement", "comment": null}, "mobile_conversion_installs_post_view": {"type": "integer", "index": 97, "name": "mobile_conversion_installs_post_view", "comment": null}, "mobile_conversion_installs_sale_amount": {"type": "integer", "index": 98, "name": "mobile_conversion_installs_sale_amount", "comment": null}, "mobile_conversion_invites_assisted": {"type": "integer", "index": 99, "name": "mobile_conversion_invites_assisted", "comment": null}, "mobile_conversion_invites_order_quantity": {"type": "integer", "index": 100, "name": "mobile_conversion_invites_order_quantity", "comment": null}, "mobile_conversion_invites_post_engagement": {"type": "integer", "index": 101, "name": "mobile_conversion_invites_post_engagement", "comment": null}, "mobile_conversion_invites_post_view": {"type": "integer", "index": 102, "name": "mobile_conversion_invites_post_view", "comment": null}, "mobile_conversion_invites_sale_amount": {"type": "integer", "index": 103, "name": "mobile_conversion_invites_sale_amount", "comment": null}, "mobile_conversion_key_page_views_post_engagement": {"type": "integer", "index": 104, "name": "mobile_conversion_key_page_views_post_engagement", "comment": null}, "mobile_conversion_key_page_views_post_view": {"type": "integer", "index": 105, "name": "mobile_conversion_key_page_views_post_view", "comment": null}, "mobile_conversion_levels_achieved_assisted": {"type": "integer", "index": 106, "name": "mobile_conversion_levels_achieved_assisted", "comment": null}, "mobile_conversion_levels_achieved_order_quantity": {"type": "integer", "index": 107, "name": "mobile_conversion_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_levels_achieved_post_engagement": {"type": "integer", "index": 108, "name": "mobile_conversion_levels_achieved_post_engagement", "comment": null}, "mobile_conversion_levels_achieved_post_view": {"type": "integer", "index": 109, "name": "mobile_conversion_levels_achieved_post_view", "comment": null}, "mobile_conversion_levels_achieved_sale_amount": {"type": "integer", "index": 110, "name": "mobile_conversion_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_metric": {"type": "integer", "index": 111, "name": "mobile_conversion_lifetime_value_achievements_unlocked_metric", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_order_qu": {"type": "integer", "index": 112, "name": "mobile_conversion_lifetime_value_achievements_unlocked_order_qu", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo": {"type": "integer", "index": 113, "name": "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_metric": {"type": "integer", "index": 114, "name": "mobile_conversion_lifetime_value_add_to_carts_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_order_quantity": {"type": "integer", "index": 115, "name": "mobile_conversion_lifetime_value_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_sale_amount": {"type": "integer", "index": 116, "name": "mobile_conversion_lifetime_value_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_metric": {"type": "integer", "index": 117, "name": "mobile_conversion_lifetime_value_add_to_wishlists_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit": {"type": "integer", "index": 118, "name": "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount": {"type": "integer", "index": 119, "name": "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_metric": {"type": "integer", "index": 120, "name": "mobile_conversion_lifetime_value_checkouts_initiated_metric", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_order_quan": {"type": "integer", "index": 121, "name": "mobile_conversion_lifetime_value_checkouts_initiated_order_quan", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun": {"type": "integer", "index": 122, "name": "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_content_views_metric": {"type": "integer", "index": 123, "name": "mobile_conversion_lifetime_value_content_views_metric", "comment": null}, "mobile_conversion_lifetime_value_content_views_order_quantity": {"type": "integer", "index": 124, "name": "mobile_conversion_lifetime_value_content_views_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_content_views_sale_amount": {"type": "integer", "index": 125, "name": "mobile_conversion_lifetime_value_content_views_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_invites_metric": {"type": "integer", "index": 126, "name": "mobile_conversion_lifetime_value_invites_metric", "comment": null}, "mobile_conversion_lifetime_value_invites_order_quantity": {"type": "integer", "index": 127, "name": "mobile_conversion_lifetime_value_invites_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_invites_sale_amount": {"type": "integer", "index": 128, "name": "mobile_conversion_lifetime_value_invites_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_metric": {"type": "integer", "index": 129, "name": "mobile_conversion_lifetime_value_levels_achieved_metric", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_order_quantity": {"type": "integer", "index": 130, "name": "mobile_conversion_lifetime_value_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_sale_amount": {"type": "integer", "index": 131, "name": "mobile_conversion_lifetime_value_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_logins_metric": {"type": "integer", "index": 132, "name": "mobile_conversion_lifetime_value_logins_metric", "comment": null}, "mobile_conversion_lifetime_value_logins_order_quantity": {"type": "integer", "index": 133, "name": "mobile_conversion_lifetime_value_logins_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_logins_sale_amount": {"type": "integer", "index": 134, "name": "mobile_conversion_lifetime_value_logins_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_metric": {"type": "integer", "index": 135, "name": "mobile_conversion_lifetime_value_payment_info_additions_metric", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_order_q": {"type": "integer", "index": 136, "name": "mobile_conversion_lifetime_value_payment_info_additions_order_q", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_sale_am": {"type": "integer", "index": 137, "name": "mobile_conversion_lifetime_value_payment_info_additions_sale_am", "comment": null}, "mobile_conversion_lifetime_value_purchases_metric": {"type": "integer", "index": 138, "name": "mobile_conversion_lifetime_value_purchases_metric", "comment": null}, "mobile_conversion_lifetime_value_purchases_order_quantity": {"type": "integer", "index": 139, "name": "mobile_conversion_lifetime_value_purchases_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_purchases_sale_amount": {"type": "integer", "index": 140, "name": "mobile_conversion_lifetime_value_purchases_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_rates_metric": {"type": "integer", "index": 141, "name": "mobile_conversion_lifetime_value_rates_metric", "comment": null}, "mobile_conversion_lifetime_value_rates_order_quantity": {"type": "integer", "index": 142, "name": "mobile_conversion_lifetime_value_rates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_rates_sale_amount": {"type": "integer", "index": 143, "name": "mobile_conversion_lifetime_value_rates_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_reservations_metric": {"type": "integer", "index": 144, "name": "mobile_conversion_lifetime_value_reservations_metric", "comment": null}, "mobile_conversion_lifetime_value_reservations_order_quantity": {"type": "integer", "index": 145, "name": "mobile_conversion_lifetime_value_reservations_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_reservations_sale_amount": {"type": "integer", "index": 146, "name": "mobile_conversion_lifetime_value_reservations_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_searches_metric": {"type": "integer", "index": 147, "name": "mobile_conversion_lifetime_value_searches_metric", "comment": null}, "mobile_conversion_lifetime_value_searches_order_quantity": {"type": "integer", "index": 148, "name": "mobile_conversion_lifetime_value_searches_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_searches_sale_amount": {"type": "integer", "index": 149, "name": "mobile_conversion_lifetime_value_searches_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_shares_metric": {"type": "integer", "index": 150, "name": "mobile_conversion_lifetime_value_shares_metric", "comment": null}, "mobile_conversion_lifetime_value_shares_order_quantity": {"type": "integer", "index": 151, "name": "mobile_conversion_lifetime_value_shares_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_shares_sale_amount": {"type": "integer", "index": 152, "name": "mobile_conversion_lifetime_value_shares_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_metric": {"type": "integer", "index": 153, "name": "mobile_conversion_lifetime_value_sign_ups_metric", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_order_quantity": {"type": "integer", "index": 154, "name": "mobile_conversion_lifetime_value_sign_ups_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_sale_amount": {"type": "integer", "index": 155, "name": "mobile_conversion_lifetime_value_sign_ups_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_metric": {"type": "integer", "index": 156, "name": "mobile_conversion_lifetime_value_spent_credits_metric", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_order_quantity": {"type": "integer", "index": 157, "name": "mobile_conversion_lifetime_value_spent_credits_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_sale_amount": {"type": "integer", "index": 158, "name": "mobile_conversion_lifetime_value_spent_credits_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_metric": {"type": "integer", "index": 159, "name": "mobile_conversion_lifetime_value_tutorials_completed_metric", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_order_quan": {"type": "integer", "index": 160, "name": "mobile_conversion_lifetime_value_tutorials_completed_order_quan", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun": {"type": "integer", "index": 161, "name": "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_updates_metric": {"type": "integer", "index": 162, "name": "mobile_conversion_lifetime_value_updates_metric", "comment": null}, "mobile_conversion_lifetime_value_updates_order_quantity": {"type": "integer", "index": 163, "name": "mobile_conversion_lifetime_value_updates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_updates_sale_amount": {"type": "integer", "index": 164, "name": "mobile_conversion_lifetime_value_updates_sale_amount", "comment": null}, "mobile_conversion_logins_assisted": {"type": "integer", "index": 165, "name": "mobile_conversion_logins_assisted", "comment": null}, "mobile_conversion_logins_order_quantity": {"type": "integer", "index": 166, "name": "mobile_conversion_logins_order_quantity", "comment": null}, "mobile_conversion_logins_post_engagement": {"type": "integer", "index": 167, "name": "mobile_conversion_logins_post_engagement", "comment": null}, "mobile_conversion_logins_post_view": {"type": "integer", "index": 168, "name": "mobile_conversion_logins_post_view", "comment": null}, "mobile_conversion_logins_sale_amount": {"type": "integer", "index": 169, "name": "mobile_conversion_logins_sale_amount", "comment": null}, "mobile_conversion_payment_info_additions_assisted": {"type": "integer", "index": 170, "name": "mobile_conversion_payment_info_additions_assisted", "comment": null}, "mobile_conversion_payment_info_additions_order_quantity": {"type": "integer", "index": 171, "name": "mobile_conversion_payment_info_additions_order_quantity", "comment": null}, "mobile_conversion_payment_info_additions_post_engagement": {"type": "integer", "index": 172, "name": "mobile_conversion_payment_info_additions_post_engagement", "comment": null}, "mobile_conversion_payment_info_additions_post_view": {"type": "integer", "index": 173, "name": "mobile_conversion_payment_info_additions_post_view", "comment": null}, "mobile_conversion_payment_info_additions_sale_amount": {"type": "integer", "index": 174, "name": "mobile_conversion_payment_info_additions_sale_amount", "comment": null}, "mobile_conversion_purchases_assisted": {"type": "integer", "index": 175, "name": "mobile_conversion_purchases_assisted", "comment": null}, "mobile_conversion_purchases_order_quantity": {"type": "integer", "index": 176, "name": "mobile_conversion_purchases_order_quantity", "comment": null}, "mobile_conversion_purchases_post_engagement": {"type": "integer", "index": 177, "name": "mobile_conversion_purchases_post_engagement", "comment": null}, "mobile_conversion_purchases_post_view": {"type": "integer", "index": 178, "name": "mobile_conversion_purchases_post_view", "comment": null}, "mobile_conversion_purchases_sale_amount": {"type": "integer", "index": 179, "name": "mobile_conversion_purchases_sale_amount", "comment": null}, "mobile_conversion_rates_assisted": {"type": "integer", "index": 180, "name": "mobile_conversion_rates_assisted", "comment": null}, "mobile_conversion_rates_order_quantity": {"type": "integer", "index": 181, "name": "mobile_conversion_rates_order_quantity", "comment": null}, "mobile_conversion_rates_post_engagement": {"type": "integer", "index": 182, "name": "mobile_conversion_rates_post_engagement", "comment": null}, "mobile_conversion_rates_post_view": {"type": "integer", "index": 183, "name": "mobile_conversion_rates_post_view", "comment": null}, "mobile_conversion_rates_sale_amount": {"type": "integer", "index": 184, "name": "mobile_conversion_rates_sale_amount", "comment": null}, "mobile_conversion_re_engages_assisted": {"type": "integer", "index": 185, "name": "mobile_conversion_re_engages_assisted", "comment": null}, "mobile_conversion_re_engages_order_quantity": {"type": "integer", "index": 186, "name": "mobile_conversion_re_engages_order_quantity", "comment": null}, "mobile_conversion_re_engages_post_engagement": {"type": "integer", "index": 187, "name": "mobile_conversion_re_engages_post_engagement", "comment": null}, "mobile_conversion_re_engages_post_view": {"type": "integer", "index": 188, "name": "mobile_conversion_re_engages_post_view", "comment": null}, "mobile_conversion_re_engages_sale_amount": {"type": "integer", "index": 189, "name": "mobile_conversion_re_engages_sale_amount", "comment": null}, "mobile_conversion_reservations_assisted": {"type": "integer", "index": 190, "name": "mobile_conversion_reservations_assisted", "comment": null}, "mobile_conversion_reservations_order_quantity": {"type": "integer", "index": 191, "name": "mobile_conversion_reservations_order_quantity", "comment": null}, "mobile_conversion_reservations_post_engagement": {"type": "integer", "index": 192, "name": "mobile_conversion_reservations_post_engagement", "comment": null}, "mobile_conversion_reservations_post_view": {"type": "integer", "index": 193, "name": "mobile_conversion_reservations_post_view", "comment": null}, "mobile_conversion_reservations_sale_amount": {"type": "integer", "index": 194, "name": "mobile_conversion_reservations_sale_amount", "comment": null}, "mobile_conversion_searches_assisted": {"type": "integer", "index": 195, "name": "mobile_conversion_searches_assisted", "comment": null}, "mobile_conversion_searches_order_quantity": {"type": "integer", "index": 196, "name": "mobile_conversion_searches_order_quantity", "comment": null}, "mobile_conversion_searches_post_engagement": {"type": "integer", "index": 197, "name": "mobile_conversion_searches_post_engagement", "comment": null}, "mobile_conversion_searches_post_view": {"type": "integer", "index": 198, "name": "mobile_conversion_searches_post_view", "comment": null}, "mobile_conversion_searches_sale_amount": {"type": "integer", "index": 199, "name": "mobile_conversion_searches_sale_amount", "comment": null}, "mobile_conversion_shares_assisted": {"type": "integer", "index": 200, "name": "mobile_conversion_shares_assisted", "comment": null}, "mobile_conversion_shares_order_quantity": {"type": "integer", "index": 201, "name": "mobile_conversion_shares_order_quantity", "comment": null}, "mobile_conversion_shares_post_engagement": {"type": "integer", "index": 202, "name": "mobile_conversion_shares_post_engagement", "comment": null}, "mobile_conversion_shares_post_view": {"type": "integer", "index": 203, "name": "mobile_conversion_shares_post_view", "comment": null}, "mobile_conversion_shares_sale_amount": {"type": "integer", "index": 204, "name": "mobile_conversion_shares_sale_amount", "comment": null}, "mobile_conversion_sign_ups_assisted": {"type": "integer", "index": 205, "name": "mobile_conversion_sign_ups_assisted", "comment": null}, "mobile_conversion_sign_ups_order_quantity": {"type": "integer", "index": 206, "name": "mobile_conversion_sign_ups_order_quantity", "comment": null}, "mobile_conversion_sign_ups_post_engagement": {"type": "integer", "index": 207, "name": "mobile_conversion_sign_ups_post_engagement", "comment": null}, "mobile_conversion_sign_ups_post_view": {"type": "integer", "index": 208, "name": "mobile_conversion_sign_ups_post_view", "comment": null}, "mobile_conversion_sign_ups_sale_amount": {"type": "integer", "index": 209, "name": "mobile_conversion_sign_ups_sale_amount", "comment": null}, "mobile_conversion_site_visits_order_quantity": {"type": "integer", "index": 210, "name": "mobile_conversion_site_visits_order_quantity", "comment": null}, "mobile_conversion_site_visits_post_engagement": {"type": "integer", "index": 211, "name": "mobile_conversion_site_visits_post_engagement", "comment": null}, "mobile_conversion_site_visits_post_view": {"type": "integer", "index": 212, "name": "mobile_conversion_site_visits_post_view", "comment": null}, "mobile_conversion_site_visits_sale_amount": {"type": "integer", "index": 213, "name": "mobile_conversion_site_visits_sale_amount", "comment": null}, "mobile_conversion_spent_credits_assisted": {"type": "integer", "index": 214, "name": "mobile_conversion_spent_credits_assisted", "comment": null}, "mobile_conversion_spent_credits_order_quantity": {"type": "integer", "index": 215, "name": "mobile_conversion_spent_credits_order_quantity", "comment": null}, "mobile_conversion_spent_credits_post_engagement": {"type": "integer", "index": 216, "name": "mobile_conversion_spent_credits_post_engagement", "comment": null}, "mobile_conversion_spent_credits_post_view": {"type": "integer", "index": 217, "name": "mobile_conversion_spent_credits_post_view", "comment": null}, "mobile_conversion_spent_credits_sale_amount": {"type": "integer", "index": 218, "name": "mobile_conversion_spent_credits_sale_amount", "comment": null}, "mobile_conversion_tutorials_completed_assisted": {"type": "integer", "index": 219, "name": "mobile_conversion_tutorials_completed_assisted", "comment": null}, "mobile_conversion_tutorials_completed_order_quantity": {"type": "integer", "index": 220, "name": "mobile_conversion_tutorials_completed_order_quantity", "comment": null}, "mobile_conversion_tutorials_completed_post_engagement": {"type": "integer", "index": 221, "name": "mobile_conversion_tutorials_completed_post_engagement", "comment": null}, "mobile_conversion_tutorials_completed_post_view": {"type": "integer", "index": 222, "name": "mobile_conversion_tutorials_completed_post_view", "comment": null}, "mobile_conversion_tutorials_completed_sale_amount": {"type": "integer", "index": 223, "name": "mobile_conversion_tutorials_completed_sale_amount", "comment": null}, "mobile_conversion_updates_assisted": {"type": "integer", "index": 224, "name": "mobile_conversion_updates_assisted", "comment": null}, "mobile_conversion_updates_order_quantity": {"type": "integer", "index": 225, "name": "mobile_conversion_updates_order_quantity", "comment": null}, "mobile_conversion_updates_post_engagement": {"type": "integer", "index": 226, "name": "mobile_conversion_updates_post_engagement", "comment": null}, "mobile_conversion_updates_post_view": {"type": "integer", "index": 227, "name": "mobile_conversion_updates_post_view", "comment": null}, "mobile_conversion_updates_sale_amount": {"type": "integer", "index": 228, "name": "mobile_conversion_updates_sale_amount", "comment": null}, "poll_card_vote": {"type": "integer", "index": 229, "name": "poll_card_vote", "comment": null}, "qualified_impressions": {"type": "integer", "index": 230, "name": "qualified_impressions", "comment": null}, "replies": {"type": "integer", "index": 231, "name": "replies", "comment": null}, "retweets": {"type": "integer", "index": 232, "name": "retweets", "comment": null}, "tweets_send": {"type": "integer", "index": 233, "name": "tweets_send", "comment": null}, "unfollows": {"type": "integer", "index": 234, "name": "unfollows", "comment": null}, "url_clicks": {"type": "integer", "index": 235, "name": "url_clicks", "comment": null}, "video_3_s_100_pct_views": {"type": "integer", "index": 236, "name": "video_3_s_100_pct_views", "comment": null}, "video_6_s_views": {"type": "integer", "index": 237, "name": "video_6_s_views", "comment": null}, "video_content_starts": {"type": "integer", "index": 238, "name": "video_content_starts", "comment": null}, "video_cta_clicks": {"type": "integer", "index": 239, "name": "video_cta_clicks", "comment": null}, "video_mrc_views": {"type": "integer", "index": 240, "name": "video_mrc_views", "comment": null}, "video_total_views": {"type": "integer", "index": 241, "name": "video_total_views", "comment": null}, "video_views_100": {"type": "integer", "index": 242, "name": "video_views_100", "comment": null}, "video_views_25": {"type": "integer", "index": 243, "name": "video_views_25", "comment": null}, "video_views_50": {"type": "integer", "index": 244, "name": "video_views_50", "comment": null}, "video_views_75": {"type": "integer", "index": 245, "name": "video_views_75", "comment": null}, "mobile_conversion_installs_skan_post_engagement": {"type": "integer", "index": 246, "name": "mobile_conversion_installs_skan_post_engagement", "comment": null}, "mobile_conversion_installs_skan_post_view": {"type": "integer", "index": 247, "name": "mobile_conversion_installs_skan_post_view", "comment": null}, "mobile_conversion_purchases_skan_post_engagement": {"type": "integer", "index": 248, "name": "mobile_conversion_purchases_skan_post_engagement", "comment": null}, "mobile_conversion_purchases_skan_post_view": {"type": "integer", "index": 249, "name": "mobile_conversion_purchases_skan_post_view", "comment": null}, "video_15_s_views": {"type": "integer", "index": 250, "name": "video_15_s_views", "comment": null}, "auto_created_conversion_landing_page_view": {"type": "integer", "index": 251, "name": "auto_created_conversion_landing_page_view", "comment": null}, "auto_created_conversion_session": {"type": "integer", "index": 252, "name": "auto_created_conversion_session", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.twitter_line_item_report_data"}, "seed.ad_reporting_integration_tests.twitter_promoted_tweet_history_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_promoted_tweet_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "approval_status": {"type": "text", "index": 2, "name": "approval_status", "comment": null}, "created_at": {"type": "text", "index": 3, "name": "created_at", "comment": null}, "deleted": {"type": "boolean", "index": 4, "name": "deleted", "comment": null}, "entity_status": {"type": "text", "index": 5, "name": "entity_status", "comment": null}, "id": {"type": "text", "index": 6, "name": "id", "comment": null}, "line_item_id": {"type": "text", "index": 7, "name": "line_item_id", "comment": null}, "tweet_id": {"type": "bigint", "index": 8, "name": "tweet_id", "comment": null}, "updated_at": {"type": "text", "index": 9, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.twitter_promoted_tweet_history_data"}, "seed.ad_reporting_integration_tests.twitter_promoted_tweet_report_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_promoted_tweet_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 3, "name": "billed_charge_local_micro", "comment": null}, "clicks": {"type": "integer", "index": 4, "name": "clicks", "comment": null}, "date": {"type": "timestamp without time zone", "index": 5, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": null}, "promoted_tweet_id": {"type": "text", "index": 7, "name": "promoted_tweet_id", "comment": null}, "url_clicks": {"type": "integer", "index": 8, "name": "url_clicks", "comment": null}, "placement": {"type": "text", "index": 9, "name": "placement", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.twitter_promoted_tweet_report_data"}, "seed.ad_reporting_integration_tests.twitter_tweet_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_tweet_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": null}, "card_uri": {"type": "integer", "index": 4, "name": "card_uri", "comment": null}, "coordinates_coordinates": {"type": "integer", "index": 5, "name": "coordinates_coordinates", "comment": null}, "coordinates_type": {"type": "integer", "index": 6, "name": "coordinates_type", "comment": null}, "created_at": {"type": "text", "index": 7, "name": "created_at", "comment": null}, "favorite_count": {"type": "integer", "index": 8, "name": "favorite_count", "comment": null}, "favorited": {"type": "boolean", "index": 9, "name": "favorited", "comment": null}, "followers": {"type": "integer", "index": 10, "name": "followers", "comment": null}, "full_text": {"type": "text", "index": 11, "name": "full_text", "comment": null}, "geo_coordinates": {"type": "integer", "index": 12, "name": "geo_coordinates", "comment": null}, "geo_type": {"type": "integer", "index": 13, "name": "geo_type", "comment": null}, "in_reply_to_screen_name": {"type": "integer", "index": 14, "name": "in_reply_to_screen_name", "comment": null}, "in_reply_to_status_id": {"type": "integer", "index": 15, "name": "in_reply_to_status_id", "comment": null}, "in_reply_to_user_id": {"type": "integer", "index": 16, "name": "in_reply_to_user_id", "comment": null}, "lang": {"type": "text", "index": 17, "name": "lang", "comment": null}, "media_key": {"type": "integer", "index": 18, "name": "media_key", "comment": null}, "retweet_count": {"type": "integer", "index": 19, "name": "retweet_count", "comment": null}, "retweeted": {"type": "boolean", "index": 20, "name": "retweeted", "comment": null}, "source": {"type": "text", "index": 21, "name": "source", "comment": null}, "truncated": {"type": "boolean", "index": 22, "name": "truncated", "comment": null}, "tweet_type": {"type": "text", "index": 23, "name": "tweet_type", "comment": null}, "user_id": {"type": "integer", "index": 24, "name": "user_id", "comment": null}, "name": {"type": "integer", "index": 25, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.twitter_tweet_data"}, "seed.ad_reporting_integration_tests.twitter_tweet_url_data": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_tweet_url_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "display_url": {"type": "text", "index": 2, "name": "display_url", "comment": null}, "expanded_url": {"type": "text", "index": 3, "name": "expanded_url", "comment": null}, "index": {"type": "integer", "index": 4, "name": "index", "comment": null}, "indices": {"type": "text", "index": 5, "name": "indices", "comment": null}, "tweet_id": {"type": "bigint", "index": 6, "name": "tweet_id", "comment": null}, "url": {"type": "text", "index": 7, "name": "url", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.ad_reporting_integration_tests.twitter_tweet_url_data"}, "model.ad_reporting.ad_reporting__account_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "ad_reporting__account_report", "database": "postgres", "comment": "Each record represents daily metrics by account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "platform": {"type": "text", "index": 3, "name": "platform", "comment": "The ad platform associated with this record."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID representing the account."}, "account_name": {"type": "text", "index": 5, "name": "account_name", "comment": "The name of the account, if present in the source data."}, "clicks": {"type": "bigint", "index": 6, "name": "clicks", "comment": "The count of clicks."}, "impressions": {"type": "bigint", "index": 7, "name": "impressions", "comment": "The count of impressions."}, "spend": {"type": "double precision", "index": 8, "name": "spend", "comment": "The cost of the ads."}, "conversions": {"type": "double precision", "index": 9, "name": "conversions", "comment": "The count of attributed conversion events."}, "conversions_value": {"type": "double precision", "index": 10, "name": "conversions_value", "comment": "The monetary value of attributed conversion events."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.ad_reporting.ad_reporting__account_report"}, "model.ad_reporting.ad_reporting__ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "ad_reporting__ad_group_report", "database": "postgres", "comment": "Each record represents daily metrics by ad group, campaign and account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "platform": {"type": "text", "index": 3, "name": "platform", "comment": "The ad platform associated with this record."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID representing the account."}, "account_name": {"type": "text", "index": 5, "name": "account_name", "comment": "The name of the account, if present in the source data."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID representing the campaign, if present in the source data."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the campaign, if present in the source data."}, "ad_group_id": {"type": "text", "index": 8, "name": "ad_group_id", "comment": "The ID representing the ad group, if present in the source data."}, "ad_group_name": {"type": "text", "index": 9, "name": "ad_group_name", "comment": "The name of the ad group, if present in the source data."}, "clicks": {"type": "bigint", "index": 10, "name": "clicks", "comment": "The count of clicks."}, "impressions": {"type": "bigint", "index": 11, "name": "impressions", "comment": "The count of impressions."}, "spend": {"type": "double precision", "index": 12, "name": "spend", "comment": "The cost of the ads."}, "conversions": {"type": "double precision", "index": 13, "name": "conversions", "comment": "The count of attributed conversion events."}, "conversions_value": {"type": "double precision", "index": 14, "name": "conversions_value", "comment": "The monetary value of attributed conversion events."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.ad_reporting.ad_reporting__ad_group_report"}, "model.ad_reporting.ad_reporting__ad_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "ad_reporting__ad_report", "database": "postgres", "comment": "Each record represents daily metrics by ad, ad group, campaign and account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "platform": {"type": "text", "index": 3, "name": "platform", "comment": "The ad platform associated with this record."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID representing the account."}, "account_name": {"type": "text", "index": 5, "name": "account_name", "comment": "The name of the account, if present in the source data."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID representing the campaign, if present in the source data."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the campaign, if present in the source data."}, "ad_group_id": {"type": "text", "index": 8, "name": "ad_group_id", "comment": "The ID representing the ad group, if present in the source data."}, "ad_group_name": {"type": "text", "index": 9, "name": "ad_group_name", "comment": "The name of the ad group, if present in the source data."}, "ad_id": {"type": "text", "index": 10, "name": "ad_id", "comment": "The ID representing the ad, if present in the source data."}, "ad_name": {"type": "text", "index": 11, "name": "ad_name", "comment": "The name of the ad, if present in the source data."}, "clicks": {"type": "bigint", "index": 12, "name": "clicks", "comment": "The count of clicks."}, "impressions": {"type": "bigint", "index": 13, "name": "impressions", "comment": "The count of impressions."}, "spend": {"type": "double precision", "index": 14, "name": "spend", "comment": "The cost of the ads."}, "conversions": {"type": "double precision", "index": 15, "name": "conversions", "comment": "The count of attributed conversion events."}, "conversions_value": {"type": "double precision", "index": 16, "name": "conversions_value", "comment": "The monetary value of attributed conversion events."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.ad_reporting.ad_reporting__ad_report"}, "model.ad_reporting.ad_reporting__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "ad_reporting__campaign_report", "database": "postgres", "comment": "Each record represents daily metrics by campaign and account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "platform": {"type": "text", "index": 3, "name": "platform", "comment": "The ad platform associated with this record."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID representing the account."}, "account_name": {"type": "text", "index": 5, "name": "account_name", "comment": "The name of the account, if present in the source data."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID representing the campaign, if present in the source data."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the campaign, if present in the source data."}, "clicks": {"type": "bigint", "index": 8, "name": "clicks", "comment": "The count of clicks."}, "impressions": {"type": "bigint", "index": 9, "name": "impressions", "comment": "The count of impressions."}, "spend": {"type": "double precision", "index": 10, "name": "spend", "comment": "The cost of the ads."}, "conversions": {"type": "double precision", "index": 11, "name": "conversions", "comment": "The count of attributed conversion events."}, "conversions_value": {"type": "double precision", "index": 12, "name": "conversions_value", "comment": "The monetary value of attributed conversion events."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.ad_reporting.ad_reporting__campaign_report"}, "model.ad_reporting.ad_reporting__keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "ad_reporting__keyword_report", "database": "postgres", "comment": "Each record represents daily metrics by keyword, ad group, campaign and account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "platform": {"type": "text", "index": 3, "name": "platform", "comment": "The ad platform associated with this record."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID representing the account."}, "account_name": {"type": "text", "index": 5, "name": "account_name", "comment": "The name of the account, if present in the source data."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID representing the campaign, if present in the source data."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the campaign, if present in the source data."}, "ad_group_id": {"type": "text", "index": 8, "name": "ad_group_id", "comment": "The ID representing the ad group, if present in the source data."}, "ad_group_name": {"type": "text", "index": 9, "name": "ad_group_name", "comment": "The name of the ad group, if present in the source data."}, "keyword_id": {"type": "text", "index": 10, "name": "keyword_id", "comment": "The ID representing the keyword, if present in the source data."}, "keyword_text": {"type": "text", "index": 11, "name": "keyword_text", "comment": "The keyword text."}, "keyword_match_type": {"type": "text", "index": 12, "name": "keyword_match_type", "comment": "The keyword match type associated with this record."}, "clicks": {"type": "bigint", "index": 13, "name": "clicks", "comment": "The count of clicks."}, "impressions": {"type": "bigint", "index": 14, "name": "impressions", "comment": "The count of impressions."}, "spend": {"type": "double precision", "index": 15, "name": "spend", "comment": "The cost of the ads."}, "conversions": {"type": "double precision", "index": 16, "name": "conversions", "comment": "The count of attributed conversion events."}, "conversions_value": {"type": "double precision", "index": 17, "name": "conversions_value", "comment": "The monetary value of attributed conversion events."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.ad_reporting.ad_reporting__keyword_report"}, "model.ad_reporting.ad_reporting__monthly_campaign_country_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "ad_reporting__monthly_campaign_country_report", "database": "postgres", "comment": "Each record represents monthly metrics by campaign and country. Country names are standardized to ISO-3166 names.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_month": {"type": "date", "index": 2, "name": "date_month", "comment": "Month of the record, truncated to the first day of the month."}, "platform": {"type": "text", "index": 3, "name": "platform", "comment": "The ad platform associated with this record."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID representing the account."}, "account_name": {"type": "text", "index": 5, "name": "account_name", "comment": "The name of the account, if present in the source data."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID representing the campaign, if present in the source data. Facebook Ads presents country data only at the account level and will have a null value for this field."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the campaign, if present in the source data. Facebook Ads presents country data only at the account level and will have a value of `Account-level` for this field."}, "country": {"type": "text", "index": 8, "name": "country", "comment": "Standardized ISO-3166 name of the country where the campaign was served."}, "country_code": {"type": "text", "index": 9, "name": "country_code", "comment": "ISO-3166 two-letter code of the country where the campaign was served."}, "global_region": {"type": "text", "index": 10, "name": "global_region", "comment": "Greater global region in which the country is located."}, "clicks": {"type": "bigint", "index": 11, "name": "clicks", "comment": "The count of clicks."}, "impressions": {"type": "bigint", "index": 12, "name": "impressions", "comment": "The count of impressions."}, "spend": {"type": "double precision", "index": 13, "name": "spend", "comment": "The cost of the ads."}, "conversions": {"type": "double precision", "index": 14, "name": "conversions", "comment": "The count of attributed conversion events."}, "conversions_value": {"type": "double precision", "index": 15, "name": "conversions_value", "comment": "The monetary value of attributed conversion events."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.ad_reporting.ad_reporting__monthly_campaign_country_report"}, "model.ad_reporting.ad_reporting__monthly_campaign_region_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "ad_reporting__monthly_campaign_region_report", "database": "postgres", "comment": "Each record represents monthly metrics by campaign and region (state, province, metropolitan area, etc.) provided by each platform.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_month": {"type": "date", "index": 2, "name": "date_month", "comment": "Month of the record, truncated to the first day of the month."}, "platform": {"type": "text", "index": 3, "name": "platform", "comment": "The ad platform associated with this record."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID representing the account."}, "account_name": {"type": "text", "index": 5, "name": "account_name", "comment": "The name of the account, if present in the source data."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID representing the campaign, if present in the source data. Facebook Ads presents country data only at the account level and will have a null value for this field."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the campaign, if present in the source data. Facebook Ads presents country data only at the account level and will have a value of `Account-level` for this field."}, "region": {"type": "text", "index": 8, "name": "region", "comment": "Region the ad was served in. The formatting may vary across platforms. This may be a state, province, metropolitan area, etc. Snapchat Ads provides this as a two-letter abbreviation."}, "clicks": {"type": "bigint", "index": 9, "name": "clicks", "comment": "The count of clicks."}, "impressions": {"type": "bigint", "index": 10, "name": "impressions", "comment": "The count of impressions."}, "spend": {"type": "double precision", "index": 11, "name": "spend", "comment": "The cost of the ads."}, "conversions": {"type": "double precision", "index": 12, "name": "conversions", "comment": "The count of attributed conversion events."}, "conversions_value": {"type": "double precision", "index": 13, "name": "conversions_value", "comment": "The monetary value of attributed conversion events."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.ad_reporting.ad_reporting__monthly_campaign_region_report"}, "model.ad_reporting.ad_reporting__search_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "ad_reporting__search_report", "database": "postgres", "comment": "Each record represents daily metrics by search query, ad group, campaign and account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "platform": {"type": "text", "index": 3, "name": "platform", "comment": "The ad platform associated with this record."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID representing the account."}, "account_name": {"type": "text", "index": 5, "name": "account_name", "comment": "The name of the account, if present in the source data."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID representing the campaign, if present in the source data."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the campaign, if present in the source data."}, "ad_group_id": {"type": "text", "index": 8, "name": "ad_group_id", "comment": "The ID representing the ad group, if present in the source data."}, "ad_group_name": {"type": "text", "index": 9, "name": "ad_group_name", "comment": "The name of the ad group, if present in the source data."}, "keyword_id": {"type": "text", "index": 10, "name": "keyword_id", "comment": "The ID representing the keyword, if present in the source data."}, "keyword_text": {"type": "text", "index": 11, "name": "keyword_text", "comment": "The keyword text."}, "search_query": {"type": "text", "index": 12, "name": "search_query", "comment": "The search query text."}, "search_match_type": {"type": "text", "index": 13, "name": "search_match_type", "comment": "The search match type associated with this record."}, "clicks": {"type": "bigint", "index": 14, "name": "clicks", "comment": "The count of clicks."}, "impressions": {"type": "bigint", "index": 15, "name": "impressions", "comment": "The count of impressions."}, "spend": {"type": "double precision", "index": 16, "name": "spend", "comment": "The cost of the ads."}, "conversions": {"type": "double precision", "index": 17, "name": "conversions", "comment": "The count of attributed conversion events."}, "conversions_value": {"type": "double precision", "index": 18, "name": "conversions_value", "comment": "The monetary value of attributed conversion events."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.ad_reporting.ad_reporting__search_report"}, "model.ad_reporting.ad_reporting__url_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "ad_reporting__url_report", "database": "postgres", "comment": "Each record represents daily metrics by URL (and if applicable, URL UTM parameters), ad group, campaign and account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "platform": {"type": "text", "index": 3, "name": "platform", "comment": "The ad platform associated with this record."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID representing the account."}, "account_name": {"type": "text", "index": 5, "name": "account_name", "comment": "The name of the account, if present in the source data."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID representing the campaign, if present in the source data."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the campaign, if present in the source data."}, "ad_group_id": {"type": "text", "index": 8, "name": "ad_group_id", "comment": "The ID representing the ad group, if present in the source data."}, "ad_group_name": {"type": "text", "index": 9, "name": "ad_group_name", "comment": "The name of the ad group, if present in the source data."}, "base_url": {"type": "text", "index": 10, "name": "base_url", "comment": "The base url of the ad."}, "url_host": {"type": "text", "index": 11, "name": "url_host", "comment": "The URL host of the ad."}, "url_path": {"type": "text", "index": 12, "name": "url_path", "comment": "The URL path of the ad."}, "utm_source": {"type": "text", "index": 13, "name": "utm_source", "comment": "The utm_source parameter of the ad."}, "utm_medium": {"type": "text", "index": 14, "name": "utm_medium", "comment": "The utm_medium parameter of the ad."}, "utm_campaign": {"type": "text", "index": 15, "name": "utm_campaign", "comment": "The utm_campaign parameter of the ad."}, "utm_content": {"type": "text", "index": 16, "name": "utm_content", "comment": "The utm_content parameter of the ad."}, "utm_term": {"type": "text", "index": 17, "name": "utm_term", "comment": "The utm_term parameter of the ad."}, "clicks": {"type": "bigint", "index": 18, "name": "clicks", "comment": "The count of clicks."}, "impressions": {"type": "bigint", "index": 19, "name": "impressions", "comment": "The count of impressions."}, "spend": {"type": "double precision", "index": 20, "name": "spend", "comment": "The cost of the ads."}, "conversions": {"type": "double precision", "index": 21, "name": "conversions", "comment": "The count of attributed conversion events."}, "conversions_value": {"type": "double precision", "index": 22, "name": "conversions_value", "comment": "The monetary value of attributed conversion events."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.ad_reporting.ad_reporting__url_report"}, "model.amazon_ads.amazon_ads__account_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "amazon_ads__account_report", "database": "postgres", "comment": "Each record in this table represents the daily performance at the account level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "account_name": {"type": "text", "index": 3, "name": "account_name", "comment": "Account Name. Not currently populated for sellers."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces."}, "country_code": {"type": "text", "index": 5, "name": "country_code", "comment": "The code for a given country."}, "profile_id": {"type": "text", "index": 6, "name": "profile_id", "comment": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace."}, "cost": {"type": "double precision", "index": 7, "name": "cost", "comment": "Total cost of ad clicks."}, "clicks": {"type": "bigint", "index": 8, "name": "clicks", "comment": "Total number of ad clicks."}, "impressions": {"type": "bigint", "index": 9, "name": "impressions", "comment": "Total number of ad impressions."}, "purchases_30_d": {"type": "bigint", "index": 10, "name": "purchases_30_d", "comment": "Number of attributed conversion events occurring within 30 days of an ad click."}, "sales_30_d": {"type": "bigint", "index": 11, "name": "sales_30_d", "comment": "Total value of sales occurring within 30 days of an ad click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.amazon_ads__account_report"}, "model.amazon_ads.amazon_ads__ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "amazon_ads__ad_group_report", "database": "postgres", "comment": "Each record in this table represents the daily performance at the ad group level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "account_name": {"type": "text", "index": 3, "name": "account_name", "comment": "Account Name. Not currently populated for sellers."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces."}, "country_code": {"type": "text", "index": 5, "name": "country_code", "comment": "The code for a given country."}, "profile_id": {"type": "text", "index": 6, "name": "profile_id", "comment": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace."}, "portfolio_name": {"type": "text", "index": 7, "name": "portfolio_name", "comment": "The name of the Portfolio."}, "portfolio_id": {"type": "text", "index": 8, "name": "portfolio_id", "comment": "The ID of the Portfolio."}, "campaign_name": {"type": "text", "index": 9, "name": "campaign_name", "comment": "The name of the Campaign."}, "campaign_id": {"type": "text", "index": 10, "name": "campaign_id", "comment": "The ID of the Campaign."}, "ad_group_name": {"type": "text", "index": 11, "name": "ad_group_name", "comment": "The name of the Campaign."}, "ad_group_id": {"type": "text", "index": 12, "name": "ad_group_id", "comment": "The ID of the Campaign."}, "serving_status": {"type": "text", "index": 13, "name": "serving_status", "comment": "The current serving status of the record."}, "state": {"type": "text", "index": 14, "name": "state", "comment": "The state of the record (enabled, paused, or archived)."}, "default_bid": {"type": "double precision", "index": 15, "name": "default_bid", "comment": "The date of creation of the record."}, "campaign_bidding_strategy": {"type": "text", "index": 16, "name": "campaign_bidding_strategy", "comment": "The bidding strategy associated with a campaign."}, "cost": {"type": "double precision", "index": 17, "name": "cost", "comment": "Total cost of ad clicks."}, "clicks": {"type": "bigint", "index": 18, "name": "clicks", "comment": "Total number of ad clicks."}, "impressions": {"type": "bigint", "index": 19, "name": "impressions", "comment": "Total number of ad impressions."}, "purchases_30_d": {"type": "bigint", "index": 20, "name": "purchases_30_d", "comment": "Number of attributed conversion events occurring within 30 days of an ad click."}, "sales_30_d": {"type": "double precision", "index": 21, "name": "sales_30_d", "comment": "Total value of sales occurring within 30 days of an ad click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.amazon_ads__ad_group_report"}, "model.amazon_ads.amazon_ads__ad_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "amazon_ads__ad_report", "database": "postgres", "comment": "Each record in this table represents the daily performance at the ad level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "account_name": {"type": "text", "index": 3, "name": "account_name", "comment": "Account Name. Not currently populated for sellers."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces."}, "country_code": {"type": "text", "index": 5, "name": "country_code", "comment": "The code for a given country."}, "profile_id": {"type": "text", "index": 6, "name": "profile_id", "comment": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace."}, "portfolio_name": {"type": "text", "index": 7, "name": "portfolio_name", "comment": "The name of the Portfolio."}, "portfolio_id": {"type": "text", "index": 8, "name": "portfolio_id", "comment": "The ID of the Portfolio."}, "campaign_name": {"type": "text", "index": 9, "name": "campaign_name", "comment": "The name of the Campaign."}, "campaign_id": {"type": "text", "index": 10, "name": "campaign_id", "comment": "The ID of the Campaign."}, "ad_group_name": {"type": "text", "index": 11, "name": "ad_group_name", "comment": "The name of the Campaign."}, "ad_group_id": {"type": "text", "index": 12, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "ad_id": {"type": "text", "index": 13, "name": "ad_id", "comment": "The ID of the Ad."}, "serving_status": {"type": "text", "index": 14, "name": "serving_status", "comment": "The current serving status of the record."}, "state": {"type": "text", "index": 15, "name": "state", "comment": "The state of the record (enabled, paused, or archived)."}, "advertised_asin": {"type": "integer", "index": 16, "name": "advertised_asin", "comment": "The ASIN associated to an advertised product."}, "advertised_sku": {"type": "integer", "index": 17, "name": "advertised_sku", "comment": "The SKU being advertised."}, "campaign_budget_amount": {"type": "double precision", "index": 18, "name": "campaign_budget_amount", "comment": "Total budget allocated to the campaign."}, "campaign_budget_currency_code": {"type": "text", "index": 19, "name": "campaign_budget_currency_code", "comment": "The currency code associated with the campaign."}, "campaign_budget_type": {"type": "text", "index": 20, "name": "campaign_budget_type", "comment": "One of: daily or lifetime."}, "cost": {"type": "double precision", "index": 21, "name": "cost", "comment": "Total cost of ad clicks."}, "clicks": {"type": "bigint", "index": 22, "name": "clicks", "comment": "Total number of ad clicks."}, "impressions": {"type": "bigint", "index": 23, "name": "impressions", "comment": "Total number of ad impressions."}, "purchases_30_d": {"type": "bigint", "index": 24, "name": "purchases_30_d", "comment": "Number of attributed conversion events occurring within 30 days of an ad click."}, "sales_30_d": {"type": "double precision", "index": 25, "name": "sales_30_d", "comment": "Total value of sales occurring within 30 days of an ad click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.amazon_ads__ad_report"}, "model.amazon_ads.amazon_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "amazon_ads__campaign_report", "database": "postgres", "comment": "Each record in this table represents the daily performance at the campaign level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "account_name": {"type": "text", "index": 3, "name": "account_name", "comment": "Account Name. Not currently populated for sellers."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces."}, "country_code": {"type": "text", "index": 5, "name": "country_code", "comment": "The code for a given country."}, "profile_id": {"type": "text", "index": 6, "name": "profile_id", "comment": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace."}, "portfolio_name": {"type": "text", "index": 7, "name": "portfolio_name", "comment": "The name of the Portfolio."}, "portfolio_id": {"type": "text", "index": 8, "name": "portfolio_id", "comment": "The ID of the Portfolio."}, "campaign_name": {"type": "text", "index": 9, "name": "campaign_name", "comment": "The name of the Campaign."}, "campaign_id": {"type": "text", "index": 10, "name": "campaign_id", "comment": "The ID of the Campaign."}, "campaign_bidding_strategy": {"type": "text", "index": 11, "name": "campaign_bidding_strategy", "comment": "The bidding strategy associated with a campaign."}, "campaign_budget_amount": {"type": "double precision", "index": 12, "name": "campaign_budget_amount", "comment": "Total budget allocated to the campaign."}, "campaign_budget_currency_code": {"type": "text", "index": 13, "name": "campaign_budget_currency_code", "comment": "The currency code associated with the campaign."}, "campaign_budget_type": {"type": "text", "index": 14, "name": "campaign_budget_type", "comment": "One of: daily or lifetime."}, "cost": {"type": "double precision", "index": 15, "name": "cost", "comment": "Total cost of ad clicks."}, "clicks": {"type": "bigint", "index": 16, "name": "clicks", "comment": "Total number of ad clicks."}, "impressions": {"type": "bigint", "index": 17, "name": "impressions", "comment": "Total number of ad impressions."}, "purchases_30_d": {"type": "bigint", "index": 18, "name": "purchases_30_d", "comment": "Number of attributed conversion events occurring within 30 days of an ad click."}, "sales_30_d": {"type": "bigint", "index": 19, "name": "sales_30_d", "comment": "Total value of sales occurring within 30 days of an ad click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.amazon_ads__campaign_report"}, "model.amazon_ads.amazon_ads__keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "amazon_ads__keyword_report", "database": "postgres", "comment": "Each record in this table represents the daily performance at the keyword level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "account_name": {"type": "text", "index": 3, "name": "account_name", "comment": "Account Name. Not currently populated for sellers."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces."}, "country_code": {"type": "text", "index": 5, "name": "country_code", "comment": "The code for a given country."}, "profile_id": {"type": "text", "index": 6, "name": "profile_id", "comment": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace."}, "portfolio_name": {"type": "text", "index": 7, "name": "portfolio_name", "comment": "The name of the Portfolio."}, "portfolio_id": {"type": "text", "index": 8, "name": "portfolio_id", "comment": "The ID of the Portfolio."}, "campaign_name": {"type": "text", "index": 9, "name": "campaign_name", "comment": "The name of the Campaign."}, "campaign_id": {"type": "text", "index": 10, "name": "campaign_id", "comment": "The ID of the Campaign."}, "ad_group_name": {"type": "text", "index": 11, "name": "ad_group_name", "comment": "The name of the AdGroup."}, "ad_group_id": {"type": "text", "index": 12, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "keyword_id": {"type": "text", "index": 13, "name": "keyword_id", "comment": "The ID of the keyword."}, "keyword_text": {"type": "text", "index": 14, "name": "keyword_text", "comment": "The exact text for the keyword."}, "serving_status": {"type": "text", "index": 15, "name": "serving_status", "comment": "The current serving status of the record."}, "state": {"type": "text", "index": 16, "name": "state", "comment": "The state of the record (enabled, paused, or archived)."}, "keyword_bid": {"type": "double precision", "index": 17, "name": "keyword_bid", "comment": "Bid associated with a keyword or targeting expression."}, "keyword_type": {"type": "text", "index": 18, "name": "keyword_type", "comment": "Type of matching for the keyword used in bid. One of: BROAD, PHRASE, or EXACT."}, "match_type": {"type": "text", "index": 19, "name": "match_type", "comment": "Type of matching for the keyword used in bid. One of: BROAD, PHRASE, or EXACT."}, "cost": {"type": "double precision", "index": 20, "name": "cost", "comment": "Total cost of ad clicks."}, "clicks": {"type": "bigint", "index": 21, "name": "clicks", "comment": "Total number of ad clicks."}, "impressions": {"type": "bigint", "index": 22, "name": "impressions", "comment": "Total number of ad impressions."}, "purchases_30_d": {"type": "bigint", "index": 23, "name": "purchases_30_d", "comment": "Number of attributed conversion events occurring within 30 days of an ad click."}, "sales_30_d": {"type": "double precision", "index": 24, "name": "sales_30_d", "comment": "Total value of sales occurring within 30 days of an ad click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.amazon_ads__keyword_report"}, "model.amazon_ads.amazon_ads__portfolio_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "amazon_ads__portfolio_report", "database": "postgres", "comment": "Each record in this table represents the daily performance at the portfolio level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "account_name": {"type": "text", "index": 3, "name": "account_name", "comment": "Account Name. Not currently populated for sellers."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces."}, "country_code": {"type": "text", "index": 5, "name": "country_code", "comment": "The code for a given country."}, "profile_id": {"type": "text", "index": 6, "name": "profile_id", "comment": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace."}, "portfolio_name": {"type": "text", "index": 7, "name": "portfolio_name", "comment": "The name of the Portfolio."}, "portfolio_id": {"type": "text", "index": 8, "name": "portfolio_id", "comment": "The ID of the Portfolio."}, "budget_amount": {"type": "integer", "index": 9, "name": "budget_amount", "comment": "The budget amount associated with the portfolio. Cannot be null."}, "budget_currency_code": {"type": "integer", "index": 10, "name": "budget_currency_code", "comment": "The currency used for all monetary values for entities under this profile. Cannot be null."}, "budget_start_date": {"type": "integer", "index": 11, "name": "budget_start_date", "comment": "The starting date in YYYYMMDD format to which the budget is applied. Required if policy is set to dateRange. Not specified if policy is set to monthlyRecurring. Note that the starting date for monthlyRecurring is the date when the policy is set."}, "budget_end_date": {"type": "integer", "index": 12, "name": "budget_end_date", "comment": "The end date after which the budget is no longer applied. Optional if policy is set to dateRange or monthlyRecurring."}, "budget_policy": {"type": "integer", "index": 13, "name": "budget_policy", "comment": "The budget policy. Set to dateRange to specify a budget for a specific period of time. Set to monthlyRecurring to specify a budget that is automatically renewed at the beginning of each month. Cannot be null."}, "in_budget": {"type": "boolean", "index": 14, "name": "in_budget", "comment": "Indicates the current budget status of the portfolio. Set to true if the portfolio is in budget, set to false if the portfolio is out of budget."}, "serving_status": {"type": "text", "index": 15, "name": "serving_status", "comment": "The current serving status of the record."}, "state": {"type": "text", "index": 16, "name": "state", "comment": "The state of the record (enabled, paused, or archived)."}, "cost": {"type": "double precision", "index": 17, "name": "cost", "comment": "Total cost of ad clicks."}, "clicks": {"type": "bigint", "index": 18, "name": "clicks", "comment": "Total number of ad clicks."}, "impressions": {"type": "bigint", "index": 19, "name": "impressions", "comment": "Total number of ad impressions."}, "purchases_30_d": {"type": "bigint", "index": 20, "name": "purchases_30_d", "comment": "Number of attributed conversion events occurring within 30 days of an ad click."}, "sales_30_d": {"type": "bigint", "index": 21, "name": "sales_30_d", "comment": "Total value of sales occurring within 30 days of an ad click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.amazon_ads__portfolio_report"}, "model.amazon_ads.amazon_ads__search_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "amazon_ads__search_report", "database": "postgres", "comment": "Each record in this table represents the daily performance at the search term level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "account_name": {"type": "text", "index": 3, "name": "account_name", "comment": "Account Name. Not currently populated for sellers."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces."}, "country_code": {"type": "text", "index": 5, "name": "country_code", "comment": "The code for a given country."}, "profile_id": {"type": "text", "index": 6, "name": "profile_id", "comment": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace."}, "portfolio_name": {"type": "text", "index": 7, "name": "portfolio_name", "comment": "The name of the Portfolio."}, "portfolio_id": {"type": "text", "index": 8, "name": "portfolio_id", "comment": "The ID of the Portfolio."}, "campaign_name": {"type": "text", "index": 9, "name": "campaign_name", "comment": "The name of the Campaign."}, "campaign_id": {"type": "text", "index": 10, "name": "campaign_id", "comment": "The ID of the Campaign."}, "ad_group_name": {"type": "text", "index": 11, "name": "ad_group_name", "comment": "The name of the AdGroup."}, "ad_group_id": {"type": "text", "index": 12, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "keyword_id": {"type": "text", "index": 13, "name": "keyword_id", "comment": "The ID of the keyword."}, "keyword_text": {"type": "text", "index": 14, "name": "keyword_text", "comment": "The exact text for the keyword."}, "match_type": {"type": "text", "index": 15, "name": "match_type", "comment": "Type of matching for the keyword used in bid. One of: BROAD, PHRASE, or EXACT."}, "serving_status": {"type": "text", "index": 16, "name": "serving_status", "comment": "The current serving status of the record."}, "state": {"type": "text", "index": 17, "name": "state", "comment": "The state of the record (enabled, paused, or archived)."}, "search_term": {"type": "text", "index": 18, "name": "search_term", "comment": "The search term used by the customer."}, "targeting": {"type": "text", "index": 19, "name": "targeting", "comment": "A string representation of the expression object used in the targeting clause."}, "cost": {"type": "double precision", "index": 20, "name": "cost", "comment": "Total cost of ad clicks."}, "clicks": {"type": "bigint", "index": 21, "name": "clicks", "comment": "Total number of ad clicks."}, "impressions": {"type": "bigint", "index": 22, "name": "impressions", "comment": "Total number of ad impressions."}, "purchases_30_d": {"type": "bigint", "index": 23, "name": "purchases_30_d", "comment": "Number of attributed conversion events occurring within 30 days of an ad click."}, "sales_30_d": {"type": "double precision", "index": 24, "name": "sales_30_d", "comment": "Total value of sales occurring within 30 days of an ad click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.amazon_ads__search_report"}, "model.apple_search_ads.apple_search_ads__ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "apple_search_ads__ad_group_report", "database": "postgres", "comment": "Each record represents the daily ad performance of each ad group.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Date of the report."}, "organization_id": {"type": "integer", "index": 3, "name": "organization_id", "comment": "Organization ID associated with this record."}, "organization_name": {"type": "text", "index": 4, "name": "organization_name", "comment": "Organization name associated with this record."}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": "Campaign ID associated with this record."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "Campaign name associated with this record."}, "ad_group_id": {"type": "integer", "index": 7, "name": "ad_group_id", "comment": "Ad group ID associated with this record."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "Ad group name associated with this record."}, "currency": {"type": "text", "index": 9, "name": "currency", "comment": "This currency value should match the respective organization's currency value."}, "ad_group_status": {"type": "text", "index": 10, "name": "ad_group_status", "comment": "The status of the ad group associated with this record."}, "start_at": {"type": "timestamp without time zone", "index": 11, "name": "start_at", "comment": "The start timestamp for this ad group."}, "end_at": {"type": "timestamp without time zone", "index": 12, "name": "end_at", "comment": "The end timestamp for this ad group."}, "taps": {"type": "bigint", "index": 13, "name": "taps", "comment": "Number of taps on ad group on given day."}, "new_downloads": {"type": "bigint", "index": 14, "name": "new_downloads", "comment": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025."}, "tap_new_downloads": {"type": "bigint", "index": 15, "name": "tap_new_downloads", "comment": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field."}, "redownloads": {"type": "bigint", "index": 16, "name": "redownloads", "comment": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025."}, "tap_redownloads": {"type": "bigint", "index": 17, "name": "tap_redownloads", "comment": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field."}, "total_downloads": {"type": "bigint", "index": 18, "name": "total_downloads", "comment": "The sum of `new_downloads` and `redownloads`. Following the [release](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) of Apple Search Ads API v5, the package will sunset this field by April 2025. Please refer to its replacement, `tap_total_downloads`, instead."}, "tap_total_downloads": {"type": "bigint", "index": 19, "name": "tap_total_downloads", "comment": "The sum of `tap_new_downloads` and `tap_redownloads`. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `total_downloads` field."}, "conversions": {"type": "bigint", "index": 20, "name": "conversions", "comment": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025."}, "tap_installs": {"type": "bigint", "index": 21, "name": "tap_installs", "comment": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field."}, "impressions": {"type": "bigint", "index": 22, "name": "impressions", "comment": "The number of impressions of ad group in a given day."}, "spend": {"type": "double precision", "index": 23, "name": "spend", "comment": "The spend on ad group in the given day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.apple_search_ads__ad_group_report"}, "model.apple_search_ads.apple_search_ads__ad_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "apple_search_ads__ad_report", "database": "postgres", "comment": "Each record represents the daily ad performance of each ad.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Date of the report."}, "organization_id": {"type": "integer", "index": 3, "name": "organization_id", "comment": "Organization ID associated with this record."}, "organization_name": {"type": "text", "index": 4, "name": "organization_name", "comment": "Organization name associated with this record."}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": "Campaign ID associated with this record."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "Campaign name associated with this record."}, "ad_group_id": {"type": "integer", "index": 7, "name": "ad_group_id", "comment": "Ad group ID associated with this record."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "Ad group name associated with this record."}, "ad_id": {"type": "integer", "index": 9, "name": "ad_id", "comment": "Ad ID associated with this record."}, "ad_name": {"type": "text", "index": 10, "name": "ad_name", "comment": "Ad name associated with this record."}, "currency": {"type": "text", "index": 11, "name": "currency", "comment": "This currency value should match the respective organization's currency value."}, "ad_status": {"type": "text", "index": 12, "name": "ad_status", "comment": "The status of the ad associated with this record."}, "taps": {"type": "bigint", "index": 13, "name": "taps", "comment": "Number of taps on ad group on given day."}, "new_downloads": {"type": "bigint", "index": 14, "name": "new_downloads", "comment": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025."}, "tap_new_downloads": {"type": "bigint", "index": 15, "name": "tap_new_downloads", "comment": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field."}, "redownloads": {"type": "bigint", "index": 16, "name": "redownloads", "comment": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025."}, "tap_redownloads": {"type": "bigint", "index": 17, "name": "tap_redownloads", "comment": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field."}, "total_downloads": {"type": "bigint", "index": 18, "name": "total_downloads", "comment": "The sum of `new_downloads` and `redownloads`. Following the [release](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) of Apple Search Ads API v5, the package will sunset this field by April 2025. Please refer to its replacement, `tap_total_downloads`, instead."}, "tap_total_downloads": {"type": "bigint", "index": 19, "name": "tap_total_downloads", "comment": "The sum of `tap_new_downloads` and `tap_redownloads`. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `total_downloads` field."}, "conversions": {"type": "bigint", "index": 20, "name": "conversions", "comment": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025."}, "tap_installs": {"type": "bigint", "index": 21, "name": "tap_installs", "comment": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field."}, "impressions": {"type": "bigint", "index": 22, "name": "impressions", "comment": "The number of impressions of ad group in a given day."}, "spend": {"type": "double precision", "index": 23, "name": "spend", "comment": "The spend on ad group in the given day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.apple_search_ads__ad_report"}, "model.apple_search_ads.apple_search_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "apple_search_ads__campaign_report", "database": "postgres", "comment": "Each record represents the daily ad performance of each campaign.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Date of the report."}, "organization_id": {"type": "integer", "index": 3, "name": "organization_id", "comment": "Organization ID associated with this record."}, "organization_name": {"type": "text", "index": 4, "name": "organization_name", "comment": "Organization name associated with this record."}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": "Campaign ID associated with this record."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "Campaign name associated with this record."}, "currency": {"type": "text", "index": 7, "name": "currency", "comment": "This currency value should match the respective organization's currency value."}, "campaign_status": {"type": "text", "index": 8, "name": "campaign_status", "comment": "The status of the campaign associted with this record."}, "start_at": {"type": "timestamp without time zone", "index": 9, "name": "start_at", "comment": "The start timestamp of this campaign."}, "end_at": {"type": "timestamp without time zone", "index": 10, "name": "end_at", "comment": "The end timestamp of this campaign."}, "taps": {"type": "bigint", "index": 11, "name": "taps", "comment": "Number of taps on campaign on given day."}, "new_downloads": {"type": "bigint", "index": 12, "name": "new_downloads", "comment": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025."}, "tap_new_downloads": {"type": "bigint", "index": 13, "name": "tap_new_downloads", "comment": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field."}, "redownloads": {"type": "bigint", "index": 14, "name": "redownloads", "comment": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025."}, "tap_redownloads": {"type": "bigint", "index": 15, "name": "tap_redownloads", "comment": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field."}, "total_downloads": {"type": "bigint", "index": 16, "name": "total_downloads", "comment": "The sum of `new_downloads` and `redownloads`. Following the [release](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) of Apple Search Ads API v5, the package will sunset this field by April 2025. Please refer to its replacement, `tap_total_downloads`, instead."}, "tap_total_downloads": {"type": "bigint", "index": 17, "name": "tap_total_downloads", "comment": "The sum of `tap_new_downloads` and `tap_redownloads`. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `total_downloads` field."}, "conversions": {"type": "bigint", "index": 18, "name": "conversions", "comment": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025."}, "tap_installs": {"type": "bigint", "index": 19, "name": "tap_installs", "comment": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field."}, "impressions": {"type": "bigint", "index": 20, "name": "impressions", "comment": "The number of impressions of campaign in a given day."}, "spend": {"type": "double precision", "index": 21, "name": "spend", "comment": "The spend on campaign in the given day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.apple_search_ads__campaign_report"}, "model.apple_search_ads.apple_search_ads__keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "apple_search_ads__keyword_report", "database": "postgres", "comment": "Each record represents the daily ad performance of each creative set.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Date of the report."}, "organization_id": {"type": "integer", "index": 3, "name": "organization_id", "comment": "Organization ID associated with this record."}, "organization_name": {"type": "text", "index": 4, "name": "organization_name", "comment": "Organization name associated with this record."}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": "Campaign ID associated with this record."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "Campaign name associated with this record."}, "ad_group_id": {"type": "integer", "index": 7, "name": "ad_group_id", "comment": "Ad group ID associated with this record."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "Ad group name associated with this record."}, "keyword_id": {"type": "integer", "index": 9, "name": "keyword_id", "comment": "Creative set name associatd with this record."}, "keyword_text": {"type": "text", "index": 10, "name": "keyword_text", "comment": "Creative set ID associated with this record."}, "match_type": {"type": "text", "index": 11, "name": "match_type", "comment": "Controls how ads are matched to user searches; EXACT or BROAD."}, "currency": {"type": "text", "index": 12, "name": "currency", "comment": "This currency value should match the respective organization's currency value."}, "keyword_status": {"type": "text", "index": 13, "name": "keyword_status", "comment": "The status of the keyword associated with this record."}, "taps": {"type": "bigint", "index": 14, "name": "taps", "comment": "Number of taps on keyword on given day."}, "new_downloads": {"type": "bigint", "index": 15, "name": "new_downloads", "comment": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025."}, "tap_new_downloads": {"type": "bigint", "index": 16, "name": "tap_new_downloads", "comment": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field."}, "redownloads": {"type": "bigint", "index": 17, "name": "redownloads", "comment": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025."}, "tap_redownloads": {"type": "bigint", "index": 18, "name": "tap_redownloads", "comment": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field."}, "total_downloads": {"type": "bigint", "index": 19, "name": "total_downloads", "comment": "The sum of `new_downloads` and `redownloads`. Following the [release](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) of Apple Search Ads API v5, the package will sunset this field by April 2025. Please refer to its replacement, `tap_total_downloads`, instead."}, "tap_total_downloads": {"type": "bigint", "index": 20, "name": "tap_total_downloads", "comment": "The sum of `tap_new_downloads` and `tap_redownloads`. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `total_downloads` field."}, "conversions": {"type": "bigint", "index": 21, "name": "conversions", "comment": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025."}, "tap_installs": {"type": "bigint", "index": 22, "name": "tap_installs", "comment": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field."}, "impressions": {"type": "bigint", "index": 23, "name": "impressions", "comment": "The number of impressions of keyword in a given day."}, "spend": {"type": "double precision", "index": 24, "name": "spend", "comment": "The spend on keyword in the given day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.apple_search_ads__keyword_report"}, "model.apple_search_ads.apple_search_ads__organization_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "apple_search_ads__organization_report", "database": "postgres", "comment": "Each record represents the daily ad performance of each organization.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Date of the report."}, "organization_id": {"type": "integer", "index": 3, "name": "organization_id", "comment": "Organization ID associated with this record."}, "organization_name": {"type": "text", "index": 4, "name": "organization_name", "comment": "Organization name associated with this record."}, "currency": {"type": "text", "index": 5, "name": "currency", "comment": "This currency value should match the respective organization's currency value."}, "taps": {"type": "bigint", "index": 6, "name": "taps", "comment": "Number of taps on organization on given day."}, "new_downloads": {"type": "bigint", "index": 7, "name": "new_downloads", "comment": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025."}, "tap_new_downloads": {"type": "bigint", "index": 8, "name": "tap_new_downloads", "comment": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field."}, "redownloads": {"type": "bigint", "index": 9, "name": "redownloads", "comment": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025."}, "tap_redownloads": {"type": "bigint", "index": 10, "name": "tap_redownloads", "comment": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field."}, "total_downloads": {"type": "bigint", "index": 11, "name": "total_downloads", "comment": "The sum of `new_downloads` and `redownloads`. Following the [release](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) of Apple Search Ads API v5, the package will sunset this field by April 2025. Please refer to its replacement, `tap_total_downloads`, instead."}, "tap_total_downloads": {"type": "bigint", "index": 12, "name": "tap_total_downloads", "comment": "The sum of `tap_new_downloads` and `tap_redownloads`. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `total_downloads` field."}, "conversions": {"type": "bigint", "index": 13, "name": "conversions", "comment": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025."}, "tap_installs": {"type": "bigint", "index": 14, "name": "tap_installs", "comment": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field."}, "impressions": {"type": "bigint", "index": 15, "name": "impressions", "comment": "The number of impressions of organization in a given day."}, "spend": {"type": "double precision", "index": 16, "name": "spend", "comment": "The spend on organization in the given day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.apple_search_ads__organization_report"}, "model.apple_search_ads.apple_search_ads__search_term_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "apple_search_ads__search_term_report", "database": "postgres", "comment": "Each record represents the daily ad performance of each search term, only includes records with search term values.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Date of the report."}, "organization_id": {"type": "integer", "index": 3, "name": "organization_id", "comment": "Organization ID associated with this record."}, "organization_name": {"type": "text", "index": 4, "name": "organization_name", "comment": "Organization name associated with this record."}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": "Campaign ID associated with this record."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "Campaign name associated with this record."}, "ad_group_id": {"type": "integer", "index": 7, "name": "ad_group_id", "comment": "Ad group ID associated with this record."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "Ad group name associated with this record."}, "keyword_id": {"type": "integer", "index": 9, "name": "keyword_id", "comment": "Creative set name associatd with this record."}, "keyword_text": {"type": "text", "index": 10, "name": "keyword_text", "comment": "Creative set ID associated with this record."}, "search_term_text": {"type": "text", "index": 11, "name": "search_term_text", "comment": "Search term text."}, "match_type": {"type": "text", "index": 12, "name": "match_type", "comment": "Controls how ads are matched to user searches; EXACT or BROAD."}, "currency": {"type": "text", "index": 13, "name": "currency", "comment": "This currency value should match the respective organization's currency value."}, "taps": {"type": "bigint", "index": 14, "name": "taps", "comment": "Number of taps on organization on given day."}, "new_downloads": {"type": "bigint", "index": 15, "name": "new_downloads", "comment": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025."}, "tap_new_downloads": {"type": "bigint", "index": 16, "name": "tap_new_downloads", "comment": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field."}, "redownloads": {"type": "bigint", "index": 17, "name": "redownloads", "comment": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025."}, "tap_redownloads": {"type": "bigint", "index": 18, "name": "tap_redownloads", "comment": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field."}, "total_downloads": {"type": "bigint", "index": 19, "name": "total_downloads", "comment": "The sum of `new_downloads` and `redownloads`. Following the [release](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) of Apple Search Ads API v5, the package will sunset this field by April 2025. Please refer to its replacement, `tap_total_downloads`, instead."}, "tap_total_downloads": {"type": "bigint", "index": 20, "name": "tap_total_downloads", "comment": "The sum of `tap_new_downloads` and `tap_redownloads`. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `total_downloads` field."}, "conversions": {"type": "bigint", "index": 21, "name": "conversions", "comment": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025."}, "tap_installs": {"type": "bigint", "index": 22, "name": "tap_installs", "comment": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field."}, "impressions": {"type": "bigint", "index": 23, "name": "impressions", "comment": "The number of impressions of organization in a given day."}, "spend": {"type": "double precision", "index": 24, "name": "spend", "comment": "The spend on organization in the given day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.apple_search_ads__search_term_report"}, "model.facebook_ads.facebook_ads__account_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "facebook_ads__account_report", "database": "postgres", "comment": "Each record represents the daily performance of a Facebook account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": "The ID of the related account."}, "account_name": {"type": "character varying", "index": 4, "name": "account_name", "comment": "The name of the related account."}, "account_status": {"type": "text", "index": 5, "name": "account_status", "comment": "Current status of account."}, "business_country_code": {"type": "text", "index": 6, "name": "business_country_code", "comment": "Country code of business associated to account."}, "created_at": {"type": "timestamp without time zone", "index": 7, "name": "created_at", "comment": "The time account was created."}, "currency": {"type": "text", "index": 8, "name": "currency", "comment": "Currency associated with account."}, "timezone_name": {"type": "text", "index": 9, "name": "timezone_name", "comment": "Timezone associated with account."}, "clicks": {"type": "bigint", "index": 10, "name": "clicks", "comment": "The number of clicks the ad had on the given day."}, "impressions": {"type": "bigint", "index": 11, "name": "impressions", "comment": "The number of impressions the ad had on the given day."}, "spend": {"type": "double precision", "index": 12, "name": "spend", "comment": "The spend on the ad in the given day."}, "conversions": {"type": "double precision", "index": 13, "name": "conversions", "comment": "Total number of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n"}, "conversions_value": {"type": "double precision", "index": 14, "name": "conversions_value", "comment": "Total monetary value of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n"}, "onsite_conversion_purchase_conversions": {"type": "double precision", "index": 15, "name": "onsite_conversion_purchase_conversions", "comment": "Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_purchase_conversions_value": {"type": "double precision", "index": 16, "name": "onsite_conversion_purchase_conversions_value", "comment": "Monetary value of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_lead_grouped_conversions": {"type": "double precision", "index": 17, "name": "onsite_conversion_lead_grouped_conversions", "comment": "Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_lead_grouped_conversions_value": {"type": "double precision", "index": 18, "name": "onsite_conversion_lead_grouped_conversions_value", "comment": "Monetary value of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_purchase_conversions": {"type": "double precision", "index": 19, "name": "offsite_conversion_fb_pixel_purchase_conversions", "comment": "Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_purchase_conversions_value": {"type": "double precision", "index": 20, "name": "offsite_conversion_fb_pixel_purchase_conversions_value", "comment": "Monetary value of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_lead_conversions": {"type": "double precision", "index": 21, "name": "offsite_conversion_fb_pixel_lead_conversions", "comment": "Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_lead_conversions_value": {"type": "double precision", "index": 22, "name": "offsite_conversion_fb_pixel_lead_conversions_value", "comment": "Monetary value of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_custom_conversions": {"type": "double precision", "index": 23, "name": "offsite_conversion_fb_pixel_custom_conversions", "comment": "Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_custom_conversions_value": {"type": "double precision", "index": 24, "name": "offsite_conversion_fb_pixel_custom_conversions_value", "comment": "Monetary value of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.facebook_ads__account_report"}, "model.facebook_ads.facebook_ads__ad_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "facebook_ads__ad_report", "database": "postgres", "comment": "Each record represents the daily performance of a Facebook ad.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": "The ID of the related account."}, "account_name": {"type": "character varying", "index": 4, "name": "account_name", "comment": "The name of the related account."}, "campaign_id": {"type": "bigint", "index": 5, "name": "campaign_id", "comment": "The ID of the related campaign."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the related campaign."}, "ad_set_id": {"type": "bigint", "index": 7, "name": "ad_set_id", "comment": "The ID of the related ad set."}, "ad_set_name": {"type": "text", "index": 8, "name": "ad_set_name", "comment": "The name of the related ad set."}, "ad_id": {"type": "bigint", "index": 9, "name": "ad_id", "comment": "The ID of the related ad."}, "ad_name": {"type": "text", "index": 10, "name": "ad_name", "comment": "The name of the related ad."}, "conversion_domain": {"type": "text", "index": 11, "name": "conversion_domain", "comment": "The domain you've configured the ad to convert to."}, "clicks": {"type": "bigint", "index": 12, "name": "clicks", "comment": "The number of clicks the ad had on the given day."}, "impressions": {"type": "bigint", "index": 13, "name": "impressions", "comment": "The number of impressions the ad had on the given day."}, "spend": {"type": "double precision", "index": 14, "name": "spend", "comment": "The spend on the ad in the given day."}, "conversions": {"type": "double precision", "index": 15, "name": "conversions", "comment": "Total number of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n"}, "conversions_value": {"type": "double precision", "index": 16, "name": "conversions_value", "comment": "Total monetary value of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n"}, "onsite_conversion_purchase_conversions": {"type": "double precision", "index": 17, "name": "onsite_conversion_purchase_conversions", "comment": "Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_purchase_conversions_value": {"type": "double precision", "index": 18, "name": "onsite_conversion_purchase_conversions_value", "comment": "Monetary value of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_lead_grouped_conversions": {"type": "double precision", "index": 19, "name": "onsite_conversion_lead_grouped_conversions", "comment": "Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_lead_grouped_conversions_value": {"type": "double precision", "index": 20, "name": "onsite_conversion_lead_grouped_conversions_value", "comment": "Monetary value of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_purchase_conversions": {"type": "double precision", "index": 21, "name": "offsite_conversion_fb_pixel_purchase_conversions", "comment": "Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_purchase_conversions_value": {"type": "double precision", "index": 22, "name": "offsite_conversion_fb_pixel_purchase_conversions_value", "comment": "Monetary value of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_lead_conversions": {"type": "double precision", "index": 23, "name": "offsite_conversion_fb_pixel_lead_conversions", "comment": "Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_lead_conversions_value": {"type": "double precision", "index": 24, "name": "offsite_conversion_fb_pixel_lead_conversions_value", "comment": "Monetary value of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_custom_conversions": {"type": "double precision", "index": 25, "name": "offsite_conversion_fb_pixel_custom_conversions", "comment": "Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_custom_conversions_value": {"type": "double precision", "index": 26, "name": "offsite_conversion_fb_pixel_custom_conversions_value", "comment": "Monetary value of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.facebook_ads__ad_report"}, "model.facebook_ads.facebook_ads__ad_set_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "facebook_ads__ad_set_report", "database": "postgres", "comment": "Each record represents the daily performance of a Facebook ad set.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": "The ID of the related account."}, "account_name": {"type": "character varying", "index": 4, "name": "account_name", "comment": "The name of the related account."}, "campaign_id": {"type": "bigint", "index": 5, "name": "campaign_id", "comment": "The ID of the related campaign."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the related campaign."}, "ad_set_id": {"type": "bigint", "index": 7, "name": "ad_set_id", "comment": "The ID of the related ad set."}, "ad_set_name": {"type": "text", "index": 8, "name": "ad_set_name", "comment": "The name of the related ad set."}, "start_at": {"type": "timestamp without time zone", "index": 9, "name": "start_at", "comment": "Timestamp of designated ad set start time."}, "end_at": {"type": "timestamp without time zone", "index": 10, "name": "end_at", "comment": "Timestamp of designated ad set end time."}, "bid_strategy": {"type": "text", "index": 11, "name": "bid_strategy", "comment": "Bid strategy values are - 'LOWEST_COST_WITHOUT_CAP', 'LOWEST_COST_WITH_BID_CAP', 'COST_CAP', 'LOWEST_COST_WITH_MIN_ROAS'."}, "daily_budget": {"type": "integer", "index": 12, "name": "daily_budget", "comment": "Daily budget of ad set."}, "budget_remaining": {"type": "integer", "index": 13, "name": "budget_remaining", "comment": "Remaining budget of ad set."}, "optimization_goal": {"type": "text", "index": 14, "name": "optimization_goal", "comment": "The optimization goal this ad set is using. Possible values defined [here](https://developers.facebook.com/docs/marketing-api/reference/ad-campaign/#fields)."}, "clicks": {"type": "bigint", "index": 15, "name": "clicks", "comment": "The number of clicks the ad had on the given day."}, "impressions": {"type": "bigint", "index": 16, "name": "impressions", "comment": "The number of impressions the ad had on the given day."}, "spend": {"type": "double precision", "index": 17, "name": "spend", "comment": "The spend on the ad in the given day."}, "conversions": {"type": "double precision", "index": 18, "name": "conversions", "comment": "Total number of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n"}, "conversions_value": {"type": "double precision", "index": 19, "name": "conversions_value", "comment": "Total monetary value of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n"}, "onsite_conversion_purchase_conversions": {"type": "double precision", "index": 20, "name": "onsite_conversion_purchase_conversions", "comment": "Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_purchase_conversions_value": {"type": "double precision", "index": 21, "name": "onsite_conversion_purchase_conversions_value", "comment": "Monetary value of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_lead_grouped_conversions": {"type": "double precision", "index": 22, "name": "onsite_conversion_lead_grouped_conversions", "comment": "Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_lead_grouped_conversions_value": {"type": "double precision", "index": 23, "name": "onsite_conversion_lead_grouped_conversions_value", "comment": "Monetary value of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_purchase_conversions": {"type": "double precision", "index": 24, "name": "offsite_conversion_fb_pixel_purchase_conversions", "comment": "Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_purchase_conversions_value": {"type": "double precision", "index": 25, "name": "offsite_conversion_fb_pixel_purchase_conversions_value", "comment": "Monetary value of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_lead_conversions": {"type": "double precision", "index": 26, "name": "offsite_conversion_fb_pixel_lead_conversions", "comment": "Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_lead_conversions_value": {"type": "double precision", "index": 27, "name": "offsite_conversion_fb_pixel_lead_conversions_value", "comment": "Monetary value of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_custom_conversions": {"type": "double precision", "index": 28, "name": "offsite_conversion_fb_pixel_custom_conversions", "comment": "Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_custom_conversions_value": {"type": "double precision", "index": 29, "name": "offsite_conversion_fb_pixel_custom_conversions_value", "comment": "Monetary value of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.facebook_ads__ad_set_report"}, "model.facebook_ads.facebook_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "facebook_ads__campaign_report", "database": "postgres", "comment": "Each record represents the daily performance of a Facebook campaign.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": "The ID of the related account."}, "account_name": {"type": "character varying", "index": 4, "name": "account_name", "comment": "The name of the related account."}, "campaign_id": {"type": "bigint", "index": 5, "name": "campaign_id", "comment": "The ID of the related campaign."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the related campaign."}, "start_at": {"type": "timestamp without time zone", "index": 7, "name": "start_at", "comment": "Timestamp of designated campaign start time."}, "end_at": {"type": "timestamp without time zone", "index": 8, "name": "end_at", "comment": "Timestamp of designated campaign end time."}, "status": {"type": "text", "index": 9, "name": "status", "comment": "Status values are - 'ACTIVE', 'PAUSED', 'DELETED', 'ARCHIVED'."}, "daily_budget": {"type": "integer", "index": 10, "name": "daily_budget", "comment": "Daily budget of campaign."}, "lifetime_budget": {"type": "integer", "index": 11, "name": "lifetime_budget", "comment": "Lifetime budget of the campaign."}, "budget_remaining": {"type": "double precision", "index": 12, "name": "budget_remaining", "comment": "Remaining budget of campaign."}, "clicks": {"type": "bigint", "index": 13, "name": "clicks", "comment": "The number of clicks the ad had on the given day."}, "impressions": {"type": "bigint", "index": 14, "name": "impressions", "comment": "The number of impressions the ad had on the given day."}, "spend": {"type": "double precision", "index": 15, "name": "spend", "comment": "The spend on the ad in the given day."}, "conversions": {"type": "double precision", "index": 16, "name": "conversions", "comment": "Total number of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n"}, "conversions_value": {"type": "double precision", "index": 17, "name": "conversions_value", "comment": "Total monetary value of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n"}, "onsite_conversion_purchase_conversions": {"type": "double precision", "index": 18, "name": "onsite_conversion_purchase_conversions", "comment": "Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_purchase_conversions_value": {"type": "double precision", "index": 19, "name": "onsite_conversion_purchase_conversions_value", "comment": "Monetary value of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_lead_grouped_conversions": {"type": "double precision", "index": 20, "name": "onsite_conversion_lead_grouped_conversions", "comment": "Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_lead_grouped_conversions_value": {"type": "double precision", "index": 21, "name": "onsite_conversion_lead_grouped_conversions_value", "comment": "Monetary value of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_purchase_conversions": {"type": "double precision", "index": 22, "name": "offsite_conversion_fb_pixel_purchase_conversions", "comment": "Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_purchase_conversions_value": {"type": "double precision", "index": 23, "name": "offsite_conversion_fb_pixel_purchase_conversions_value", "comment": "Monetary value of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_lead_conversions": {"type": "double precision", "index": 24, "name": "offsite_conversion_fb_pixel_lead_conversions", "comment": "Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_lead_conversions_value": {"type": "double precision", "index": 25, "name": "offsite_conversion_fb_pixel_lead_conversions_value", "comment": "Monetary value of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_custom_conversions": {"type": "double precision", "index": 26, "name": "offsite_conversion_fb_pixel_custom_conversions", "comment": "Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_custom_conversions_value": {"type": "double precision", "index": 27, "name": "offsite_conversion_fb_pixel_custom_conversions_value", "comment": "Monetary value of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.facebook_ads__campaign_report"}, "model.facebook_ads.facebook_ads__country_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "facebook_ads__country_report", "database": "postgres", "comment": "Each record represents the daily performance of a Facebook account at the country level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "country_id": {"type": "text", "index": 3, "name": "country_id", "comment": "Fivetran-generated unique ID of the country."}, "country": {"type": "text", "index": 4, "name": "country", "comment": "Country whose ad performance is being reported on."}, "account_id": {"type": "bigint", "index": 5, "name": "account_id", "comment": "The ID of the related account."}, "account_name": {"type": "character varying", "index": 6, "name": "account_name", "comment": "The name of the related account."}, "account_business_country_code": {"type": "text", "index": 7, "name": "account_business_country_code", "comment": "Country code of business associated to account."}, "account_timezone": {"type": "text", "index": 8, "name": "account_timezone", "comment": "Timezone associated with account."}, "account_timezone_offset_hours_utc": {"type": "double precision", "index": 9, "name": "account_timezone_offset_hours_utc", "comment": "Time zone difference from UTC."}, "account_currency": {"type": "text", "index": 10, "name": "account_currency", "comment": "Currency associated with account."}, "account_min_daily_budget": {"type": "integer", "index": 11, "name": "account_min_daily_budget", "comment": "The minimum daily budget for this Ad Account."}, "impressions": {"type": "bigint", "index": 12, "name": "impressions", "comment": "The number of impressions the ad had on the given day."}, "clicks": {"type": "bigint", "index": 13, "name": "clicks", "comment": "The number of clicks the ad had on the given day."}, "spend": {"type": "double precision", "index": 14, "name": "spend", "comment": "The spend on the ad in the given day."}, "reach": {"type": "bigint", "index": 15, "name": "reach", "comment": "The number of people who saw any content from your Page or about your Page. This metric is estimated."}, "frequency": {"type": "double precision", "index": 16, "name": "frequency", "comment": "The average number of times each person saw your ads; it is calculated as impressions divided by reach."}, "conversions": {"type": "double precision", "index": 17, "name": "conversions", "comment": "Total number of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n"}, "onsite_conversion_purchase_conversions": {"type": "double precision", "index": 18, "name": "onsite_conversion_purchase_conversions", "comment": "Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_lead_grouped_conversions": {"type": "double precision", "index": 19, "name": "onsite_conversion_lead_grouped_conversions", "comment": "Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_purchase_conversions": {"type": "double precision", "index": 20, "name": "offsite_conversion_fb_pixel_purchase_conversions", "comment": "Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_lead_conversions": {"type": "double precision", "index": 21, "name": "offsite_conversion_fb_pixel_lead_conversions", "comment": "Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_custom_conversions": {"type": "double precision", "index": 22, "name": "offsite_conversion_fb_pixel_custom_conversions", "comment": "Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.facebook_ads__country_report"}, "model.facebook_ads.facebook_ads__region_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "facebook_ads__region_report", "database": "postgres", "comment": "Each record represents the daily performance of a Facebook account at the region level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "region_id": {"type": "text", "index": 3, "name": "region_id", "comment": "Fivetran-generated unique ID of the geographic region."}, "region": {"type": "text", "index": 4, "name": "region", "comment": "Geographic region whose ad performance is being reported on."}, "account_id": {"type": "bigint", "index": 5, "name": "account_id", "comment": "The ID of the related account."}, "account_name": {"type": "character varying", "index": 6, "name": "account_name", "comment": "The name of the related account."}, "account_business_state": {"type": "text", "index": 7, "name": "account_business_state", "comment": "State abbreviation for business address."}, "account_business_country_code": {"type": "text", "index": 8, "name": "account_business_country_code", "comment": "Country code of business associated to account."}, "account_timezone": {"type": "text", "index": 9, "name": "account_timezone", "comment": "Timezone associated with account."}, "account_timezone_offset_hours_utc": {"type": "double precision", "index": 10, "name": "account_timezone_offset_hours_utc", "comment": "Time zone difference from UTC."}, "account_currency": {"type": "text", "index": 11, "name": "account_currency", "comment": "Currency associated with account."}, "account_min_daily_budget": {"type": "integer", "index": 12, "name": "account_min_daily_budget", "comment": "The minimum daily budget for this Ad Account."}, "impressions": {"type": "bigint", "index": 13, "name": "impressions", "comment": "The number of impressions the ad had on the given day."}, "clicks": {"type": "bigint", "index": 14, "name": "clicks", "comment": "The number of clicks the ad had on the given day."}, "spend": {"type": "double precision", "index": 15, "name": "spend", "comment": "The spend on the ad in the given day."}, "reach": {"type": "bigint", "index": 16, "name": "reach", "comment": "The number of people who saw any content from your Page or about your Page. This metric is estimated."}, "frequency": {"type": "double precision", "index": 17, "name": "frequency", "comment": "The average number of times each person saw your ads; it is calculated as impressions divided by reach."}, "conversions": {"type": "double precision", "index": 18, "name": "conversions", "comment": "Total number of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n"}, "onsite_conversion_purchase_conversions": {"type": "double precision", "index": 19, "name": "onsite_conversion_purchase_conversions", "comment": "Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_lead_grouped_conversions": {"type": "double precision", "index": 20, "name": "onsite_conversion_lead_grouped_conversions", "comment": "Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_purchase_conversions": {"type": "double precision", "index": 21, "name": "offsite_conversion_fb_pixel_purchase_conversions", "comment": "Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_lead_conversions": {"type": "double precision", "index": 22, "name": "offsite_conversion_fb_pixel_lead_conversions", "comment": "Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_custom_conversions": {"type": "double precision", "index": 23, "name": "offsite_conversion_fb_pixel_custom_conversions", "comment": "Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.facebook_ads__region_report"}, "model.facebook_ads.facebook_ads__url_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "facebook_ads__url_report", "database": "postgres", "comment": "Each record represents the daily performance of a Facebook ad at the URL level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": "The ID of the related account."}, "account_name": {"type": "character varying", "index": 4, "name": "account_name", "comment": "The name of the related account."}, "campaign_id": {"type": "bigint", "index": 5, "name": "campaign_id", "comment": "The ID of the related campaign."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the related campaign."}, "ad_set_id": {"type": "bigint", "index": 7, "name": "ad_set_id", "comment": "The ID of the related ad set."}, "ad_set_name": {"type": "text", "index": 8, "name": "ad_set_name", "comment": "The name of the related ad set."}, "ad_id": {"type": "bigint", "index": 9, "name": "ad_id", "comment": "The ID of the related ad."}, "ad_name": {"type": "text", "index": 10, "name": "ad_name", "comment": "The name of the related ad."}, "creative_id": {"type": "bigint", "index": 11, "name": "creative_id", "comment": "The ID of the related creative."}, "creative_name": {"type": "text", "index": 12, "name": "creative_name", "comment": "The name of the related creative."}, "base_url": {"type": "text", "index": 13, "name": "base_url", "comment": "The base URL of the ad, extracted from the page_link and template_page_link."}, "url_host": {"type": "text", "index": 14, "name": "url_host", "comment": "The URL host of the ad, extracted from the page_link and template_page_link."}, "url_path": {"type": "text", "index": 15, "name": "url_path", "comment": "The URL path of the ad, extracted from the page_link and template_page_link."}, "utm_source": {"type": "text", "index": 16, "name": "utm_source", "comment": "The utm_source parameter of the ad, extracted from the page_link and template_page_link."}, "utm_medium": {"type": "text", "index": 17, "name": "utm_medium", "comment": "The utm_medium parameter of the ad, extracted from the page_link and template_page_link."}, "utm_campaign": {"type": "text", "index": 18, "name": "utm_campaign", "comment": "The utm_campaign parameter of the ad, extracted from the page_link and template_page_link."}, "utm_content": {"type": "text", "index": 19, "name": "utm_content", "comment": "The utm_content parameter of the ad, extracted from the page_link and template_page_link."}, "utm_term": {"type": "text", "index": 20, "name": "utm_term", "comment": "The utm_term parameter of the ad, extracted from the page_link and template_page_link."}, "clicks": {"type": "bigint", "index": 21, "name": "clicks", "comment": "The number of clicks the ad had on the given day."}, "impressions": {"type": "bigint", "index": 22, "name": "impressions", "comment": "The number of impressions the ad had on the given day."}, "spend": {"type": "double precision", "index": 23, "name": "spend", "comment": "The spend on the ad in the given day."}, "conversions": {"type": "double precision", "index": 24, "name": "conversions", "comment": "Total number of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n"}, "conversions_value": {"type": "double precision", "index": 25, "name": "conversions_value", "comment": "Total monetary value of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n"}, "onsite_conversion_purchase_conversions": {"type": "double precision", "index": 26, "name": "onsite_conversion_purchase_conversions", "comment": "Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_purchase_conversions_value": {"type": "double precision", "index": 27, "name": "onsite_conversion_purchase_conversions_value", "comment": "Monetary value of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_lead_grouped_conversions": {"type": "double precision", "index": 28, "name": "onsite_conversion_lead_grouped_conversions", "comment": "Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "onsite_conversion_lead_grouped_conversions_value": {"type": "double precision", "index": 29, "name": "onsite_conversion_lead_grouped_conversions_value", "comment": "Monetary value of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_purchase_conversions": {"type": "double precision", "index": 30, "name": "offsite_conversion_fb_pixel_purchase_conversions", "comment": "Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_purchase_conversions_value": {"type": "double precision", "index": 31, "name": "offsite_conversion_fb_pixel_purchase_conversions_value", "comment": "Monetary value of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_lead_conversions": {"type": "double precision", "index": 32, "name": "offsite_conversion_fb_pixel_lead_conversions", "comment": "Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_lead_conversions_value": {"type": "double precision", "index": 33, "name": "offsite_conversion_fb_pixel_lead_conversions_value", "comment": "Monetary value of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_custom_conversions": {"type": "double precision", "index": 34, "name": "offsite_conversion_fb_pixel_custom_conversions", "comment": "Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}, "offsite_conversion_fb_pixel_custom_conversions_value": {"type": "double precision", "index": 35, "name": "offsite_conversion_fb_pixel_custom_conversions_value", "comment": "Monetary value of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.facebook_ads__url_report"}, "model.facebook_ads.facebook_ads__url_tags": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "facebook_ads__url_tags", "database": "postgres", "comment": "Each record is a unique combination of creative_id and corresponding key, value, type contained in the url_tags field", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "_fivetran_id": {"type": "text", "index": 2, "name": "_fivetran_id", "comment": "The unique fivetran ID for this record."}, "creative_id": {"type": "bigint", "index": 3, "name": "creative_id", "comment": "The associated creative_id for this record."}, "key": {"type": "text", "index": 4, "name": "key", "comment": "The url tag object name e.g. utm_source associated with this record."}, "value": {"type": "text", "index": 5, "name": "value", "comment": "The value assigned to the url tag object associated with this record."}, "type": {"type": "text", "index": 6, "name": "type", "comment": "The type assigned to the url tag object e.g. 'AD_VIDEO'."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.facebook_ads__url_tags"}, "model.google_ads.google_ads__account_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "google_ads__account_report", "database": "postgres", "comment": "Each record in this table represents the daily performance at the account level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date being reported on."}, "account_name": {"type": "integer", "index": 3, "name": "account_name", "comment": "The descriptive name of the Customer account."}, "account_id": {"type": "integer", "index": 4, "name": "account_id", "comment": "The Customer ID."}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": "The currency which the account uses."}, "auto_tagging_enabled": {"type": "boolean", "index": 6, "name": "auto_tagging_enabled", "comment": "Boolean indicating if the account uses auto tagging within ad urls."}, "time_zone": {"type": "integer", "index": 7, "name": "time_zone", "comment": "The time zone which the account is located."}, "spend": {"type": "numeric", "index": 8, "name": "spend", "comment": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "clicks": {"type": "bigint", "index": 9, "name": "clicks", "comment": "The number of clicks."}, "impressions": {"type": "bigint", "index": 10, "name": "impressions", "comment": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "conversions": {"type": "bigint", "index": 11, "name": "conversions", "comment": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business."}, "conversions_value": {"type": "bigint", "index": 12, "name": "conversions_value", "comment": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful."}, "view_through_conversions": {"type": "bigint", "index": 13, "name": "view_through_conversions", "comment": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.google_ads__account_report"}, "model.google_ads.google_ads__ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "google_ads__ad_group_report", "database": "postgres", "comment": "Each record in this table represents the daily performance at the ad group level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date being reported on."}, "account_name": {"type": "integer", "index": 3, "name": "account_name", "comment": "The descriptive name of the Customer account."}, "account_id": {"type": "integer", "index": 4, "name": "account_id", "comment": "The Customer ID."}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": "The currency which the account uses."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the Campaign."}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": "The ID of the Campaign."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "The name of the AdGroup."}, "ad_group_id": {"type": "text", "index": 9, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "ad_group_status": {"type": "text", "index": 10, "name": "ad_group_status", "comment": "The status of the ad group."}, "ad_group_type": {"type": "text", "index": 11, "name": "ad_group_type", "comment": "The type of ad group which is serving ads."}, "spend": {"type": "numeric", "index": 12, "name": "spend", "comment": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "clicks": {"type": "bigint", "index": 13, "name": "clicks", "comment": "The number of clicks."}, "impressions": {"type": "bigint", "index": 14, "name": "impressions", "comment": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "conversions": {"type": "double precision", "index": 15, "name": "conversions", "comment": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business."}, "conversions_value": {"type": "bigint", "index": 16, "name": "conversions_value", "comment": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful."}, "view_through_conversions": {"type": "bigint", "index": 17, "name": "view_through_conversions", "comment": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.google_ads__ad_group_report"}, "model.google_ads.google_ads__ad_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "google_ads__ad_report", "database": "postgres", "comment": "Each record in this table represents the daily performance at the ad level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date being reported on."}, "account_name": {"type": "integer", "index": 3, "name": "account_name", "comment": "The descriptive name of the Customer account."}, "account_id": {"type": "integer", "index": 4, "name": "account_id", "comment": "The Customer ID."}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": "The currency which the account uses."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the Campaign."}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": "The ID of the Campaign."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "The name of the AdGroup."}, "ad_group_id": {"type": "text", "index": 9, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "ad_id": {"type": "bigint", "index": 10, "name": "ad_id", "comment": "The unique identifier of the ad."}, "ad_name": {"type": "integer", "index": 11, "name": "ad_name", "comment": null}, "ad_status": {"type": "text", "index": 12, "name": "ad_status", "comment": "The status of the ad."}, "ad_type": {"type": "integer", "index": 13, "name": "ad_type", "comment": "The type of the ad that is being served."}, "display_url": {"type": "integer", "index": 14, "name": "display_url", "comment": "The url which is displayed with the ad."}, "source_final_urls": {"type": "text", "index": 15, "name": "source_final_urls", "comment": "The final urls that are used within the ad."}, "spend": {"type": "numeric", "index": 16, "name": "spend", "comment": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "clicks": {"type": "bigint", "index": 17, "name": "clicks", "comment": "The number of clicks."}, "impressions": {"type": "bigint", "index": 18, "name": "impressions", "comment": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "conversions": {"type": "bigint", "index": 19, "name": "conversions", "comment": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business."}, "conversions_value": {"type": "double precision", "index": 20, "name": "conversions_value", "comment": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful."}, "view_through_conversions": {"type": "bigint", "index": 21, "name": "view_through_conversions", "comment": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.google_ads__ad_report"}, "model.google_ads.google_ads__campaign_bid_modifiers_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "google_ads__campaign_bid_modifiers_report", "database": "postgres", "comment": "Each record in this table represents a specific bid modifier and its performance insights. Data is at the campaign-criterion grain since bid modifiers are campaign-level settings, and analysis focuses on overall modifier effectiveness. Campaigns with no bid modifiers will have a null criterion record.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_name": {"type": "integer", "index": 2, "name": "account_name", "comment": "The descriptive name of the Customer account."}, "account_id": {"type": "integer", "index": 3, "name": "account_id", "comment": "The Customer ID."}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": "The ID of the Campaign."}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "The name of the Campaign."}, "advertising_channel_type": {"type": "text", "index": 6, "name": "advertising_channel_type", "comment": "The type of advertising channel being used by the campaign."}, "advertising_channel_subtype": {"type": "text", "index": 7, "name": "advertising_channel_subtype", "comment": "The advertising channel subtype that is being used by the campaign."}, "campaign_status": {"type": "text", "index": 8, "name": "campaign_status", "comment": "General status of the campaign."}, "serving_status": {"type": "text", "index": 9, "name": "serving_status", "comment": "Status of the ads and how they are currently being served."}, "is_campaign_live": {"type": "boolean", "index": 10, "name": "is_campaign_live", "comment": "Boolean indicating if the campaign is both enabled and actively serving (campaign_status = 'ENABLED' and serving_status = 'SERVING')."}, "bidding_strategy_type": {"type": "text", "index": 11, "name": "bidding_strategy_type", "comment": "The type of bidding strategy (MANUAL_CPC, TARGET_CPA, etc.)."}, "target_cpa": {"type": "numeric", "index": 12, "name": "target_cpa", "comment": "Target cost per acquisition."}, "target_roas": {"type": "double precision", "index": 13, "name": "target_roas", "comment": "Target return on ad spend."}, "enhanced_cpc": {"type": "boolean", "index": 14, "name": "enhanced_cpc", "comment": "Boolean indicating if enhanced CPC is enabled."}, "manual_cpa": {"type": "double precision", "index": 15, "name": "manual_cpa", "comment": "Manual cost per acquisition setting."}, "manual_cpm": {"type": "double precision", "index": 16, "name": "manual_cpm", "comment": "Manual cost per mille setting."}, "manual_cpv": {"type": "double precision", "index": 17, "name": "manual_cpv", "comment": "Manual cost per view setting."}, "bidding_status": {"type": "text", "index": 18, "name": "bidding_status", "comment": "The status of the bidding strategy."}, "criterion_id": {"type": "bigint", "index": 19, "name": "criterion_id", "comment": "Unique identifier of the criterion that the bid modifier is applied to."}, "bid_modifier": {"type": "double precision", "index": 20, "name": "bid_modifier", "comment": "The modifier applied to the bid for this criterion."}, "interaction_type": {"type": "text", "index": 21, "name": "interaction_type", "comment": "The type of interaction for the bid modifier."}, "interaction_event_types": {"type": "text", "index": 22, "name": "interaction_event_types", "comment": "The event types for the interaction."}, "modifier_type": {"type": "text", "index": 23, "name": "modifier_type", "comment": "The type of modifier (device, location, age_range, gender, income_range, parental_status, audience, keyword, topic, placement, or other)."}, "modifier_direction": {"type": "text", "index": 24, "name": "modifier_direction", "comment": "Direction of the modifier (positive adjustment, negative adjustment, no adjustment, no modifier set)."}, "modifier_change": {"type": "double precision", "index": 25, "name": "modifier_change", "comment": "The bid modifier change as a decimal (bid_modifier - 1)."}, "total_spend": {"type": "numeric", "index": 26, "name": "total_spend", "comment": "Total spend in the last 30 days."}, "avg_ctr": {"type": "bigint", "index": 27, "name": "avg_ctr", "comment": "Average click-through rate as a decimal."}, "avg_cpc": {"type": "numeric", "index": 28, "name": "avg_cpc", "comment": "Average cost per click."}, "calculated_observation": {"type": "text", "index": 29, "name": "calculated_observation", "comment": "Performance observation that drives the recommendation based on configurable thresholds from individual low/high threshold variables like `google_ads__cpc_low`, `google_ads__cpc_high`, `google_ads__ctr_low`, `google_ads__ctr_high`, `google_ads__spend_low`, `google_ads__spend_high`, and `google_ads__bid_modifier_low`, `google_ads__bid_modifier_high`. Possible values include campaign disabled, campaign ended, not serving, high cpc, low ctr, high spend, manual bidding, disabled modifier, high positive modifier, significant negative modifier, high performance, high spend + poor performance, moderate performance, low spend, and normal performance."}, "calculated_recommendation": {"type": "text", "index": 30, "name": "calculated_recommendation", "comment": "Inferred action for bid modifier optimization based on dbt package logic and configurable threshold variables (Add modifiers, Review adjustments, Monitor performance, Monitor)."}, "calculated_priority": {"type": "text", "index": 31, "name": "calculated_priority", "comment": "Inferred priority level for focusing on most critical issues first (high, medium, low), derived from configurable performance threshold variables."}, "bid_modifier_report_key": {"type": "text", "index": 32, "name": "bid_modifier_report_key", "comment": "Surrogate key for the campaign bid modifiers report, combining source_relation, account_id, campaign_id, and criterion_id."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.google_ads__campaign_bid_modifiers_report"}, "model.google_ads.google_ads__campaign_budget_diagnostics_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "google_ads__campaign_budget_diagnostics_report", "database": "postgres", "comment": "Each record in this table represents a campaign's budget constraints and performance diagnostics.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date being reported on."}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": "The ID of the Campaign."}, "campaign_name": {"type": "text", "index": 4, "name": "campaign_name", "comment": "The name of the Campaign."}, "account_name": {"type": "integer", "index": 5, "name": "account_name", "comment": "The descriptive name of the Customer account."}, "account_id": {"type": "integer", "index": 6, "name": "account_id", "comment": "The Customer ID."}, "advertising_channel_type": {"type": "text", "index": 7, "name": "advertising_channel_type", "comment": "The type of advertising channel being used by the campaign."}, "advertising_channel_subtype": {"type": "text", "index": 8, "name": "advertising_channel_subtype", "comment": "The advertising channel subtype that is being used by the campaign."}, "campaign_status": {"type": "text", "index": 9, "name": "campaign_status", "comment": "General status of the campaign."}, "serving_status": {"type": "text", "index": 10, "name": "serving_status", "comment": "Status of the ads and how they are currently being served."}, "daily_budget": {"type": "numeric", "index": 11, "name": "daily_budget", "comment": "The daily budget amount for the campaign."}, "total_budget": {"type": "numeric", "index": 12, "name": "total_budget", "comment": "The total budget amount for lifetime campaigns."}, "budget_type": {"type": "text", "index": 13, "name": "budget_type", "comment": "The type of budget (DAILY, LIFETIME, etc.)."}, "budget_status": {"type": "text", "index": 14, "name": "budget_status", "comment": "The status of the budget."}, "has_recommended_budget": {"type": "boolean", "index": 15, "name": "has_recommended_budget", "comment": "Boolean indicating if Google has a recommended budget for this campaign."}, "recommended_daily_budget": {"type": "numeric", "index": 16, "name": "recommended_daily_budget", "comment": "Google's recommended daily budget when available, otherwise falls back to current daily budget for consistency."}, "bidding_strategy_type": {"type": "text", "index": 17, "name": "bidding_strategy_type", "comment": "The type of bidding strategy (MANUAL_CPC, TARGET_CPA, etc.)."}, "target_cpa": {"type": "numeric", "index": 18, "name": "target_cpa", "comment": "Target cost per acquisition."}, "target_roas": {"type": "double precision", "index": 19, "name": "target_roas", "comment": "Target return on ad spend."}, "enhanced_cpc": {"type": "boolean", "index": 20, "name": "enhanced_cpc", "comment": "Boolean indicating if enhanced CPC is enabled."}, "impressions": {"type": "bigint", "index": 21, "name": "impressions", "comment": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "spend": {"type": "numeric", "index": 22, "name": "spend", "comment": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "clicks": {"type": "bigint", "index": 23, "name": "clicks", "comment": "The number of clicks."}, "total_targeting_criteria": {"type": "bigint", "index": 24, "name": "total_targeting_criteria", "comment": "Total number of targeting criteria set for the campaign."}, "location_targeting_count": {"type": "bigint", "index": 25, "name": "location_targeting_count", "comment": "Number of location targeting criteria."}, "audience_targeting_count": {"type": "bigint", "index": 26, "name": "audience_targeting_count", "comment": "Number of audience targeting criteria."}, "location_targeting_breadth": {"type": "text", "index": 27, "name": "location_targeting_breadth", "comment": "Assessment of location targeting breadth - 'limited' (fewer than the low threshold), 'broad' (more than the high threshold), or 'normal'. Thresholds are configurable via google_ads__location_targeting_low and google_ads__location_targeting_high variables."}, "is_device_targeting": {"type": "boolean", "index": 28, "name": "is_device_targeting", "comment": "Boolean indicating if device targeting criteria are set."}, "is_audience_targeting": {"type": "boolean", "index": 29, "name": "is_audience_targeting", "comment": "Boolean indicating if audience targeting criteria are set."}, "ctr": {"type": "bigint", "index": 30, "name": "ctr", "comment": "The click-through rate. A ratio showing how often people who see your ad or free product listing end up clicking it. See more details [here](https://support.google.com/google-ads/answer/2615875?hl=en&ref_topic=24937&sjid=15681083914881504235-NC)."}, "budget_utilization": {"type": "numeric", "index": 31, "name": "budget_utilization", "comment": "Decimal representing budget utilization (spend / daily_budget)."}, "is_campaign_live": {"type": "boolean", "index": 32, "name": "is_campaign_live", "comment": "Boolean indicating if the campaign is both enabled and actively serving (campaign_status = 'ENABLED' and serving_status = 'SERVING')."}, "budget_increase_opportunity": {"type": "numeric", "index": 33, "name": "budget_increase_opportunity", "comment": "Dollar amount by which Google recommends increasing the daily budget (0 when Google has no recommendation)."}, "calculated_observation": {"type": "text", "index": 34, "name": "calculated_observation", "comment": "Performance observation that drives the budget recommendation based on configurable thresholds from `google_ads__budget_high_lows`, `google_ads__ctr_high_lows`, `google_ads__cpc_high_lows`, `google_ads__spend_high_lows`, `google_ads__location_targeting_high_lows`, and `google_ads__bid_modifier_high_lows` variables. Possible values include campaign disabled, campaign ended, not serving, budget constrained, budget + targeting constrained, targeting constrained, quality/relevance + targeting constrained, quality/relevance constrained, high spend + good performance, high spend + poor performance, moderate spend + normal performance, low spend + low budget utilization, low spend + budget constrained, low spend, no spend + no targeting, no spend, budget disabled, and normal."}, "calculated_recommendation": {"type": "text", "index": 35, "name": "calculated_recommendation", "comment": "Inferred action for budget optimization based on dbt package logic and configurable threshold variables (increase budget, optimize targeting/bids, improve relevance, etc.)."}, "calculated_priority": {"type": "text", "index": 36, "name": "calculated_priority", "comment": "Inferred priority level for focusing on most critical budget issues first (high, medium, low), derived from configurable performance threshold variables."}, "budget_diagnostics_report_key": {"type": "text", "index": 37, "name": "budget_diagnostics_report_key", "comment": "Surrogate key for the campaign budget diagnostics report, combining source_relation, account_id, campaign_id, and date_day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.google_ads__campaign_budget_diagnostics_report"}, "model.google_ads.google_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "google_ads__campaign_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of a campaign at the campaign/advertising_channel/advertising_channel_subtype level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date being reported on."}, "account_name": {"type": "integer", "index": 3, "name": "account_name", "comment": "The descriptive name of the Customer account."}, "account_id": {"type": "integer", "index": 4, "name": "account_id", "comment": "The Customer ID."}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": "The currency which the account uses."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the Campaign."}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": "The ID of the Campaign."}, "advertising_channel_type": {"type": "text", "index": 8, "name": "advertising_channel_type", "comment": "The channel type of the ads being served within the campaign."}, "advertising_channel_subtype": {"type": "text", "index": 9, "name": "advertising_channel_subtype", "comment": "The channel subtype of the ads being served within the campaign."}, "status": {"type": "text", "index": 10, "name": "status", "comment": "The status of the campaign."}, "serving_status": {"type": "text", "index": 11, "name": "serving_status", "comment": "Status of the ads and how they are currently being served."}, "spend": {"type": "numeric", "index": 12, "name": "spend", "comment": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "clicks": {"type": "bigint", "index": 13, "name": "clicks", "comment": "The number of clicks."}, "impressions": {"type": "bigint", "index": 14, "name": "impressions", "comment": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "conversions": {"type": "bigint", "index": 15, "name": "conversions", "comment": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business."}, "conversions_value": {"type": "bigint", "index": 16, "name": "conversions_value", "comment": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful."}, "view_through_conversions": {"type": "bigint", "index": 17, "name": "view_through_conversions", "comment": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column."}, "ctr": {"type": "bigint", "index": 18, "name": "ctr", "comment": "Click-through rate as a decimal, calculated as clicks / impressions. Shows ad relevance and engagement."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.google_ads__campaign_report"}, "model.google_ads.google_ads__keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "google_ads__keyword_report", "database": "postgres", "comment": "Each record in this table represents the daily performance at the ad group level for keywords.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date being reported on."}, "account_name": {"type": "integer", "index": 3, "name": "account_name", "comment": "The descriptive name of the Customer account."}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": "The Customer ID."}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": "The currency which the account uses."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the Campaign."}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": "The ID of the Campaign."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "The name of the AdGroup."}, "ad_group_id": {"type": "text", "index": 9, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "criterion_id": {"type": "bigint", "index": 10, "name": "criterion_id", "comment": "The unique identifier of the criterion being served."}, "type": {"type": "text", "index": 11, "name": "type", "comment": "The type of keyword ad being served."}, "status": {"type": "text", "index": 12, "name": "status", "comment": "The status of the keyword ads."}, "keyword_match_type": {"type": "text", "index": 13, "name": "keyword_match_type", "comment": "The match type criteria used for the keyword ads."}, "keyword_text": {"type": "text", "index": 14, "name": "keyword_text", "comment": "The specific keyword text that is used."}, "spend": {"type": "numeric", "index": 15, "name": "spend", "comment": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "clicks": {"type": "bigint", "index": 16, "name": "clicks", "comment": "The number of clicks."}, "impressions": {"type": "bigint", "index": 17, "name": "impressions", "comment": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "conversions": {"type": "bigint", "index": 18, "name": "conversions", "comment": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business."}, "conversions_value": {"type": "bigint", "index": 19, "name": "conversions_value", "comment": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful."}, "view_through_conversions": {"type": "bigint", "index": 20, "name": "view_through_conversions", "comment": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.google_ads__keyword_report"}, "model.google_ads.google_ads__search_term_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "google_ads__search_term_report", "database": "postgres", "comment": "Each record in this table represents the daily performance at the ad group level for search terms matching tracked keywords.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date being reported on."}, "account_name": {"type": "integer", "index": 3, "name": "account_name", "comment": "The descriptive name of the Customer account."}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": "The Customer ID."}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": "The currency which the account uses."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the Campaign."}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": "The ID of the Campaign."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "The name of the AdGroup."}, "ad_group_id": {"type": "text", "index": 9, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "search_term": {"type": "text", "index": 10, "name": "search_term", "comment": "A word or set of words a person enters when searching on Google or one of Google's Search Network sites"}, "keyword_text": {"type": "text", "index": 11, "name": "keyword_text", "comment": "The text of the keyword (at most 80 characters and 10 words)."}, "criterion_id": {"type": "text", "index": 12, "name": "criterion_id", "comment": "Reference to the ad group criterion used for the associated keyword. One `keyword_text` may have multiple `criterion_id` values."}, "search_term_match_type": {"type": "text", "index": 13, "name": "search_term_match_type", "comment": "How closely the search terms that triggered your ads on Google are related to the actual keywords in your account. Can be `BROAD` ,`EXACT`, `PHRASE`, `UNKNOWN`, or `UNSPECIFIED`.\n\nSee more details [here](https://support.google.com/google-ads/answer/7478529?sjid=15681083914881504235-NC&visit_id=638760377693438101-1187740487&rd=1)."}, "status": {"type": "text", "index": 14, "name": "status", "comment": "Indicates whether the search term is currently one of your targeted or excluded keywords. Possible values: `ADDED`, `ADDED_EXCLUDED`, `EXCLUDED`, `NONE`, `UNKNOWN`, or `UNSPECIFIED`"}, "spend": {"type": "numeric", "index": 15, "name": "spend", "comment": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "clicks": {"type": "bigint", "index": 16, "name": "clicks", "comment": "The number of clicks."}, "impressions": {"type": "bigint", "index": 17, "name": "impressions", "comment": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "conversions": {"type": "double precision", "index": 18, "name": "conversions", "comment": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business."}, "conversions_value": {"type": "double precision", "index": 19, "name": "conversions_value", "comment": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful."}, "view_through_conversions": {"type": "bigint", "index": 20, "name": "view_through_conversions", "comment": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.google_ads__search_term_report"}, "model.google_ads.google_ads__url_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "google_ads__url_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of URLs at the ad level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date being reported on."}, "account_name": {"type": "integer", "index": 3, "name": "account_name", "comment": "The descriptive name of the Customer account."}, "account_id": {"type": "integer", "index": 4, "name": "account_id", "comment": "The Customer ID."}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": "The currency which the account uses."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the Campaign."}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": "The ID of the Campaign."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "The name of the AdGroup."}, "ad_group_id": {"type": "text", "index": 9, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "ad_id": {"type": "bigint", "index": 10, "name": "ad_id", "comment": "The unique identifier of the ad."}, "base_url": {"type": "text", "index": 11, "name": "base_url", "comment": "The base URL of the ad, extracted from the `final_urls`."}, "url_host": {"type": "text", "index": 12, "name": "url_host", "comment": "The URL host of the ad, extracted from the `final_urls`."}, "url_path": {"type": "text", "index": 13, "name": "url_path", "comment": "The URL path of the ad, extracted from the `final_urls`."}, "utm_source": {"type": "text", "index": 14, "name": "utm_source", "comment": "The utm_source parameter of the ad, extracted from the `final_urls`."}, "utm_medium": {"type": "text", "index": 15, "name": "utm_medium", "comment": "The utm_medium parameter of the ad, extracted from the `final_urls`."}, "utm_campaign": {"type": "text", "index": 16, "name": "utm_campaign", "comment": "The utm_campaign parameter of the ad, extracted from the `final_urls`."}, "utm_content": {"type": "text", "index": 17, "name": "utm_content", "comment": "The utm_content parameter of the ad, extracted from the `final_urls`."}, "utm_term": {"type": "text", "index": 18, "name": "utm_term", "comment": "The utm_term parameter of the ad, extracted from the `final_urls`."}, "spend": {"type": "numeric", "index": 19, "name": "spend", "comment": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "clicks": {"type": "bigint", "index": 20, "name": "clicks", "comment": "The number of clicks."}, "impressions": {"type": "bigint", "index": 21, "name": "impressions", "comment": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "conversions": {"type": "bigint", "index": 22, "name": "conversions", "comment": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business."}, "conversions_value": {"type": "double precision", "index": 23, "name": "conversions_value", "comment": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful."}, "view_through_conversions": {"type": "bigint", "index": 24, "name": "view_through_conversions", "comment": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.google_ads__url_report"}, "model.amazon_ads.int_amazon_ads__portfolio_history": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "int_amazon_ads__portfolio_history", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "portfolio_id": {"type": "text", "index": 2, "name": "portfolio_id", "comment": null}, "budget_amount": {"type": "integer", "index": 3, "name": "budget_amount", "comment": null}, "budget_currency_code": {"type": "integer", "index": 4, "name": "budget_currency_code", "comment": null}, "budget_end_date": {"type": "integer", "index": 5, "name": "budget_end_date", "comment": null}, "budget_policy": {"type": "integer", "index": 6, "name": "budget_policy", "comment": null}, "budget_start_date": {"type": "integer", "index": 7, "name": "budget_start_date", "comment": null}, "creation_date": {"type": "text", "index": 8, "name": "creation_date", "comment": null}, "in_budget": {"type": "boolean", "index": 9, "name": "in_budget", "comment": null}, "last_updated_date": {"type": "text", "index": 10, "name": "last_updated_date", "comment": null}, "portfolio_name": {"type": "text", "index": 11, "name": "portfolio_name", "comment": null}, "profile_id": {"type": "text", "index": 12, "name": "profile_id", "comment": null}, "serving_status": {"type": "text", "index": 13, "name": "serving_status", "comment": null}, "state": {"type": "text", "index": 14, "name": "state", "comment": null}, "is_most_recent_record": {"type": "boolean", "index": 15, "name": "is_most_recent_record", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.int_amazon_ads__portfolio_history"}, "model.facebook_ads.int_facebook_ads__conversions": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "int_facebook_ads__conversions", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "ad_id": {"type": "bigint", "index": 2, "name": "ad_id", "comment": null}, "date_day": {"type": "date", "index": 3, "name": "date_day", "comment": null}, "conversions": {"type": "double precision", "index": 4, "name": "conversions", "comment": null}, "conversions_value": {"type": "double precision", "index": 5, "name": "conversions_value", "comment": null}, "onsite_conversion_purchase_conversions": {"type": "double precision", "index": 6, "name": "onsite_conversion_purchase_conversions", "comment": null}, "onsite_conversion_purchase_conversions_value": {"type": "double precision", "index": 7, "name": "onsite_conversion_purchase_conversions_value", "comment": null}, "onsite_conversion_lead_grouped_conversions": {"type": "double precision", "index": 8, "name": "onsite_conversion_lead_grouped_conversions", "comment": null}, "onsite_conversion_lead_grouped_conversions_value": {"type": "double precision", "index": 9, "name": "onsite_conversion_lead_grouped_conversions_value", "comment": null}, "offsite_conversion_fb_pixel_purchase_conversions": {"type": "double precision", "index": 10, "name": "offsite_conversion_fb_pixel_purchase_conversions", "comment": null}, "offsite_conversion_fb_pixel_purchase_conversions_value": {"type": "double precision", "index": 11, "name": "offsite_conversion_fb_pixel_purchase_conversions_value", "comment": null}, "offsite_conversion_fb_pixel_lead_conversions": {"type": "double precision", "index": 12, "name": "offsite_conversion_fb_pixel_lead_conversions", "comment": null}, "offsite_conversion_fb_pixel_lead_conversions_value": {"type": "double precision", "index": 13, "name": "offsite_conversion_fb_pixel_lead_conversions_value", "comment": null}, "offsite_conversion_fb_pixel_custom_conversions": {"type": "double precision", "index": 14, "name": "offsite_conversion_fb_pixel_custom_conversions", "comment": null}, "offsite_conversion_fb_pixel_custom_conversions_value": {"type": "double precision", "index": 15, "name": "offsite_conversion_fb_pixel_custom_conversions_value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.int_facebook_ads__conversions"}, "model.facebook_ads.int_facebook_ads__creative_history": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "int_facebook_ads__creative_history", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": null}, "_fivetran_id": {"type": "text", "index": 2, "name": "_fivetran_id", "comment": null}, "creative_id": {"type": "bigint", "index": 3, "name": "creative_id", "comment": null}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": null}, "creative_name": {"type": "text", "index": 5, "name": "creative_name", "comment": null}, "url": {"type": "character varying", "index": 6, "name": "url", "comment": null}, "base_url": {"type": "text", "index": 7, "name": "base_url", "comment": null}, "url_host": {"type": "text", "index": 8, "name": "url_host", "comment": null}, "url_path": {"type": "text", "index": 9, "name": "url_path", "comment": null}, "utm_source": {"type": "text", "index": 10, "name": "utm_source", "comment": null}, "utm_medium": {"type": "text", "index": 11, "name": "utm_medium", "comment": null}, "utm_campaign": {"type": "text", "index": 12, "name": "utm_campaign", "comment": null}, "utm_content": {"type": "text", "index": 13, "name": "utm_content", "comment": null}, "utm_term": {"type": "text", "index": 14, "name": "utm_term", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.int_facebook_ads__creative_history"}, "model.linkedin.linkedin_ads__account_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "linkedin_ads__account_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the account level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The day of the activity."}, "account_id": {"type": "integer", "index": 3, "name": "account_id", "comment": "Unique internal ID representing the account."}, "account_name": {"type": "text", "index": 4, "name": "account_name", "comment": "A label for the account."}, "version_tag": {"type": "numeric", "index": 5, "name": "version_tag", "comment": "An integer representation of the version of the account."}, "currency": {"type": "text", "index": 6, "name": "currency", "comment": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default)."}, "status": {"type": "text", "index": 7, "name": "status", "comment": "ACTIVE - Account is active; this is the default state\nCANCELLED - Account has been permanently cancelled\nDRAFT - Account is in draft status, meaning it's not yet fully set up and it is not serving\nPENDING_DELETION - Denotes that the account has been requested to be deleted that is currently pending\nREMOVED - Denotes that the account was deleted, but must remain fetchable due to the existence of performance data.\n"}, "type": {"type": "text", "index": 8, "name": "type", "comment": "BUSINESS - This is the only value allowed when creating accounts through the API.\nENTERPRISE - This value cannot be used to create accounts through the API and is reserved for accounts created by LinkedIn's internal ad operations systems.\n"}, "last_modified_at": {"type": "timestamp without time zone", "index": 9, "name": "last_modified_at", "comment": "The timestamp of when the version was updated."}, "created_at": {"type": "timestamp without time zone", "index": 10, "name": "created_at", "comment": "The timestamp of when the account was created."}, "total_conversions": {"type": "numeric", "index": 11, "name": "total_conversions", "comment": "The total conversions being brought in the conversion fields you select in your `linkedin_ads__conversion_fields`."}, "clicks": {"type": "bigint", "index": 12, "name": "clicks", "comment": "The count of chargeable clicks."}, "impressions": {"type": "bigint", "index": 13, "name": "impressions", "comment": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails."}, "cost": {"type": "double precision", "index": 14, "name": "cost", "comment": "The cost of the ads in the local currency or USD."}, "conversion_value_in_local_currency": {"type": "double precision", "index": 15, "name": "conversion_value_in_local_currency", "comment": "The value generated by your conversions, displayed in your LinkedIn account's local currency, on the given day."}, "external_website_conversions": {"type": "numeric", "index": 16, "name": "external_website_conversions", "comment": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads."}, "one_click_leads": {"type": "numeric", "index": 17, "name": "one_click_leads", "comment": "Leads submitted after clicking on LinkedIn ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.linkedin_ads__account_report"}, "model.linkedin.linkedin_ads__campaign_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "linkedin_ads__campaign_group_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the campaign group level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The day of the activity."}, "campaign_group_id": {"type": "integer", "index": 3, "name": "campaign_group_id", "comment": "Unique internal ID representing the campaign group."}, "campaign_group_name": {"type": "text", "index": 4, "name": "campaign_group_name", "comment": "A label for the campaign group."}, "account_id": {"type": "integer", "index": 5, "name": "account_id", "comment": "Unique internal ID representing the account."}, "account_name": {"type": "text", "index": 6, "name": "account_name", "comment": "A label for the account."}, "status": {"type": "text", "index": 7, "name": "status", "comment": "Status of campaign group. Possible values are: ACTIVE - Denotes that the campaign group is capable of serving ads, subject to run date and budget limitations (as well as any other limitations at the account or campaign level). ARCHIVED - Denotes that the campaign group is presently inactive, and should mostly be hidden in the UI until un-archived. CANCELLED - Denotes that the campaign group has been permanently canceled and cannot be reactivated. Not a settable status. DRAFT - Denotes that the campaign group is in a preliminary state and should temporarily not be served. PAUSED - Denotes that the campaign group meets all requirements to be served, but temporarily should not be. PENDING_DELETION - Denotes that the campaign group has been requested to be deleted that is currently pending. REMOVED - Denoted that the campaign group was deleted, but must remain fetchable due to the existence of performance data.\n"}, "currency": {"type": "text", "index": 8, "name": "currency", "comment": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default)."}, "is_backfilled": {"type": "boolean", "index": 9, "name": "is_backfilled", "comment": "Flag that denotes whether the campaign group was created organically or to backfill existing campaigns. This is a read-only field set by the system. Default = false."}, "run_schedule_start_at": {"type": "timestamp without time zone", "index": 10, "name": "run_schedule_start_at", "comment": "Represents the inclusive (greater than or equal to) date when to start running the associated campaigns under this campaign group. This field is required."}, "run_schedule_end_at": {"type": "timestamp without time zone", "index": 11, "name": "run_schedule_end_at", "comment": "Represents the exclusive (strictly less than) date when to stop running the associated campaigns under this campaign group. If this field is unset, it indicates an open range with no end date."}, "last_modified_at": {"type": "timestamp without time zone", "index": 12, "name": "last_modified_at", "comment": "The timestamp of when the version was updated."}, "created_at": {"type": "timestamp without time zone", "index": 13, "name": "created_at", "comment": "The timestamp of when the campaign group was created."}, "total_conversions": {"type": "numeric", "index": 14, "name": "total_conversions", "comment": "The total conversions being brought in the conversion fields you select in your `linkedin_ads__conversion_fields`."}, "clicks": {"type": "bigint", "index": 15, "name": "clicks", "comment": "The count of chargeable clicks."}, "impressions": {"type": "bigint", "index": 16, "name": "impressions", "comment": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails."}, "cost": {"type": "double precision", "index": 17, "name": "cost", "comment": "The cost of the ads in the local currency or USD."}, "conversion_value_in_local_currency": {"type": "double precision", "index": 18, "name": "conversion_value_in_local_currency", "comment": "The value generated by your conversions, displayed in your LinkedIn account's local currency, on the given day."}, "external_website_conversions": {"type": "numeric", "index": 19, "name": "external_website_conversions", "comment": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads."}, "one_click_leads": {"type": "numeric", "index": 20, "name": "one_click_leads", "comment": "Leads submitted after clicking on LinkedIn ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.linkedin_ads__campaign_group_report"}, "model.linkedin.linkedin_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "linkedin_ads__campaign_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the campaign level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The day of the activity."}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": "Unique internal ID representing the campaign."}, "campaign_name": {"type": "text", "index": 4, "name": "campaign_name", "comment": "A label for the campaign."}, "version_tag": {"type": "numeric", "index": 5, "name": "version_tag", "comment": "An integer representation of the version of the campaign."}, "campaign_group_id": {"type": "integer", "index": 6, "name": "campaign_group_id", "comment": "Unique internal ID representing the campaign group."}, "campaign_group_name": {"type": "text", "index": 7, "name": "campaign_group_name", "comment": "A label for the campaign group."}, "account_id": {"type": "integer", "index": 8, "name": "account_id", "comment": "Unique internal ID representing the account."}, "account_name": {"type": "text", "index": 9, "name": "account_name", "comment": "A label for the account."}, "campaign_status": {"type": "text", "index": 10, "name": "campaign_status", "comment": "ACTIVE - Denotes that the campaign is fully servable.\nPAUSED - Denotes that the campaign meets all requirements to be served, but temporarily should not be.\nARCHIVED - Denotes that the campaign is presently inactive, and should mostly be hidden in the UI until un-archived.\nCOMPLETED - Denotes that the campaign has reached a specified budgetary or chronological limit.\nCANCELED - Denotes that the campaign has been permanently canceled, such as when an advertising account is permanently closed.\nDRAFT - Denotes that the campaign is still being edited and not eligible for serving. Some validation will be postponed until the campaign is activated.\nPENDING_DELETION - Denotes that the campaign has been requested to be deleted that is currently pending.\nREMOVED - Denotes that the campaign was deleted, but must remain fetchable due to the existence of performance data.\n"}, "campaign_group_status": {"type": "text", "index": 11, "name": "campaign_group_status", "comment": "Status of campaign's campaign group. Possible values are: ACTIVE - Denotes that the campaign group is capable of serving ads, subject to run date and budget limitations (as well as any other limitations at the account or campaign level). ARCHIVED - Denotes that the campaign group is presently inactive, and should mostly be hidden in the UI until un-archived. CANCELLED - Denotes that the campaign group has been permanently canceled and cannot be reactivated. Not a settable status. DRAFT - Denotes that the campaign group is in a preliminary state and should temporarily not be served. PAUSED - Denotes that the campaign group meets all requirements to be served, but temporarily should not be. PENDING_DELETION - Denotes that the campaign group has been requested to be deleted that is currently pending. REMOVED - Denoted that the campaign group was deleted, but must remain fetchable due to the existence of performance data.\n"}, "type": {"type": "text", "index": 12, "name": "type", "comment": "TEXT_AD - Text-based ads that show up in the right column or top of the page on LinkedIn.\nSPONSORED_UPDATES - Native ads that promote a company's content updates in the LinkedIn feed.\nSPONSORED_INMAILS - Personalized messages with a call-to-action button delivered to a LinkedIn's member inbox.\nDYNAMIC - Ads that are dynamically personalized.\n"}, "cost_type": {"type": "text", "index": 13, "name": "cost_type", "comment": "CPM - Cost per thousand advertising impressions. If type=SPONSORED_INMAILS; cost per send(CPS) is measured as CPM x 1000.\nCPC- Cost per individual click on the associated link.\nCPV- Cost per view for video ads.\n"}, "creative_selection": {"type": "text", "index": 14, "name": "creative_selection", "comment": "ROUND_ROBIN - Rotate through available creatives to serve them as evenly as possible.\nOPTIMIZED (default) - Bias selection taking into account such as expected performance. Not available for Message and Conversation Ads (type=SPONSORED_INMAILS).\n"}, "daily_budget_amount": {"type": "double precision", "index": 15, "name": "daily_budget_amount", "comment": "Maximum amount to spend per day UTC. The amount of money as a real number string."}, "daily_budget_currency_code": {"type": "text", "index": 16, "name": "daily_budget_currency_code", "comment": "ISO currency code. The currency must match that of the parent account."}, "unit_cost_amount": {"type": "double precision", "index": 17, "name": "unit_cost_amount", "comment": "This value is used as one of the following: amount to bid (for manual bidding), amount which is the target cost (for target cost bidding) per click, impression, or other event depending on the pricing model, or cost cap (for cost cap bidding). The amount of money as a real number string. The amount should be non-negative if the bidding strategy is manual, target cost, or cost cap bidding. The default is 0 with the currency code set to match that of the associated account.\n"}, "unit_cost_currency_code": {"type": "text", "index": 18, "name": "unit_cost_currency_code", "comment": "Amount to bid per click, impression, or other event depending on the pricing model. The default is 0 with the currency code set to match that of the associated account. ISO currency code.\n"}, "currency": {"type": "text", "index": 19, "name": "currency", "comment": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default)."}, "format": {"type": "text", "index": 20, "name": "format", "comment": "The ad format on the campaign level. See https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads/campaign-formats?view=li-lms-2022-07"}, "locale_country": {"type": "text", "index": 21, "name": "locale_country", "comment": "Locale of the campaign. An uppercase two-letter country code as defined by ISO-3166."}, "locale_language": {"type": "text", "index": 22, "name": "locale_language", "comment": "Locale of the campaign. A lowercase two-letter language code as defined by ISO-639."}, "objective_type": {"type": "text", "index": 23, "name": "objective_type", "comment": "Campaign Objective type values. Click [here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ad-budget-pricing-type-combinations?view=li-lms-2022-07) for Campaign Objective descriptions. One of: - BRAND_AWARENESS - ENGAGEMENT - JOB_APPLICANTS - LEAD_GENERATION - WEBSITE_CONVERSIONS - WEBSITE_VISITS - VIDEO_VIEWS\n"}, "optimization_target_type": {"type": "text", "index": 24, "name": "optimization_target_type", "comment": "Determines how this campaign is optimized for spending. If this is not set, there is no optimization. Refer to the documentation here. Default = 'NONE'."}, "is_audience_expansion_enabled": {"type": "boolean", "index": 25, "name": "is_audience_expansion_enabled", "comment": "Boolean (default=false) representing whether Audience Expansion is enabled for the campaign provides query expansion for certain targeting criteria."}, "is_offsite_delivery_enabled": {"type": "boolean", "index": 26, "name": "is_offsite_delivery_enabled", "comment": "Boolean indicating if this campaign to allowed to be served on the LinkedIn Audience Network to extend the reach of your campaign by delivering ads beyond the LinkedIn feed to members on third-party apps and sites.\t(default will be \"True\" from June 30, 2022)\n"}, "run_schedule_start_at": {"type": "timestamp without time zone", "index": 27, "name": "run_schedule_start_at", "comment": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the inclusive (greater than or equal to) value in which to start the range."}, "run_schedule_end_at": {"type": "timestamp without time zone", "index": 28, "name": "run_schedule_end_at", "comment": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the exclusive (strictly less than) value in which to end the range, if provided.\n"}, "last_modified_at": {"type": "timestamp without time zone", "index": 29, "name": "last_modified_at", "comment": "The timestamp of when the version was updated."}, "created_at": {"type": "timestamp without time zone", "index": 30, "name": "created_at", "comment": "The timestamp of when the campaign was created."}, "total_conversions": {"type": "numeric", "index": 31, "name": "total_conversions", "comment": "The total conversions being brought in the conversion fields you select in your `linkedin_ads__conversion_fields`."}, "clicks": {"type": "bigint", "index": 32, "name": "clicks", "comment": "The count of chargeable clicks."}, "impressions": {"type": "bigint", "index": 33, "name": "impressions", "comment": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails."}, "cost": {"type": "double precision", "index": 34, "name": "cost", "comment": "The cost of the ads in the local currency or USD."}, "conversion_value_in_local_currency": {"type": "double precision", "index": 35, "name": "conversion_value_in_local_currency", "comment": "The value generated by your conversions, displayed in your LinkedIn account's local currency, on the given day."}, "external_website_conversions": {"type": "numeric", "index": 36, "name": "external_website_conversions", "comment": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads."}, "one_click_leads": {"type": "numeric", "index": 37, "name": "one_click_leads", "comment": "Leads submitted after clicking on LinkedIn ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.linkedin_ads__campaign_report"}, "model.linkedin.linkedin_ads__creative_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "linkedin_ads__creative_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the creative level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The day of the activity."}, "creative_id": {"type": "integer", "index": 3, "name": "creative_id", "comment": "Unique internal ID representing the creative."}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": "Unique internal ID representing the creative's campaign."}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "A label for the creative's campaign."}, "campaign_group_id": {"type": "integer", "index": 6, "name": "campaign_group_id", "comment": "Unique internal ID representing the campaign group."}, "campaign_group_name": {"type": "text", "index": 7, "name": "campaign_group_name", "comment": "A label for the campaign group."}, "account_id": {"type": "integer", "index": 8, "name": "account_id", "comment": "Unique internal ID representing the account."}, "account_name": {"type": "text", "index": 9, "name": "account_name", "comment": "A label for the account."}, "click_uri": {"type": "text", "index": 10, "name": "click_uri", "comment": "The URL where the member should be redirected to, on clicking the text ad or spotlight ad."}, "click_uri_type": {"type": "text", "index": 11, "name": "click_uri_type", "comment": "Will either be `text_ad`, `spotlight`, or `null` to indicate the origin of the click_uri."}, "creative_status": {"type": "text", "index": 12, "name": "creative_status", "comment": "ACTIVE - Creative creation is complete and creative is available for review and serve.\nPAUSED - Creative creation is complete and creative is current, but should temporarily not be served. This status is not valid upon creation.\nDRAFT - Creative creation is incomplete and may still be edited.\nARCHIVED - Creative creation is complete, but creative should not be served and should be separated from non-archived creatives in any UI.\nCANCELED - Creative is permanently canceled.\n"}, "campaign_status": {"type": "text", "index": 13, "name": "campaign_status", "comment": "ACTIVE - Denotes that the campaign is fully servable.\nPAUSED - Denotes that the campaign meets all requirements to be served, but temporarily should not be.\nARCHIVED - Denotes that the campaign is presently inactive, and should mostly be hidden in the UI until un-archived.\nCOMPLETED - Denotes that the campaign has reached a specified budgetary or chronological limit.\nCANCELED - Denotes that the campaign has been permanently canceled, such as when an advertising account is permanently closed.\nDRAFT - Denotes that the campaign is still being edited and not eligible for serving. Some validation will be postponed until the campaign is activated.\nPENDING_DELETION - Denotes that the campaign has been requested to be deleted that is currently pending.\nREMOVED - Denotes that the campaign was deleted, but must remain fetchable due to the existence of performance data.\n"}, "campaign_group_status": {"type": "text", "index": 14, "name": "campaign_group_status", "comment": "Status of campaign's campaign group. Possible values are: ACTIVE - Denotes that the campaign group is capable of serving ads, subject to run date and budget limitations (as well as any other limitations at the account or campaign level). ARCHIVED - Denotes that the campaign group is presently inactive, and should mostly be hidden in the UI until un-archived. CANCELLED - Denotes that the campaign group has been permanently canceled and cannot be reactivated. Not a settable status. DRAFT - Denotes that the campaign group is in a preliminary state and should temporarily not be served. PAUSED - Denotes that the campaign group meets all requirements to be served, but temporarily should not be. PENDING_DELETION - Denotes that the campaign group has been requested to be deleted that is currently pending. REMOVED - Denoted that the campaign group was deleted, but must remain fetchable due to the existence of performance data.\n"}, "currency": {"type": "text", "index": 15, "name": "currency", "comment": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default)."}, "last_modified_at": {"type": "timestamp without time zone", "index": 16, "name": "last_modified_at", "comment": "The timestamp of when the version was updated."}, "created_at": {"type": "timestamp without time zone", "index": 17, "name": "created_at", "comment": "The timestamp of when the creative was created."}, "total_conversions": {"type": "numeric", "index": 18, "name": "total_conversions", "comment": "The total conversions being brought in the conversion fields you select in your `linkedin_ads__conversion_fields`."}, "clicks": {"type": "bigint", "index": 19, "name": "clicks", "comment": "The count of chargeable clicks."}, "impressions": {"type": "bigint", "index": 20, "name": "impressions", "comment": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails."}, "cost": {"type": "bigint", "index": 21, "name": "cost", "comment": "The cost of the ads in the local currency or USD."}, "conversion_value_in_local_currency": {"type": "double precision", "index": 22, "name": "conversion_value_in_local_currency", "comment": "The value generated by your conversions, displayed in your LinkedIn account's local currency, on the given day."}, "external_website_conversions": {"type": "numeric", "index": 23, "name": "external_website_conversions", "comment": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads."}, "one_click_leads": {"type": "numeric", "index": 24, "name": "one_click_leads", "comment": "Leads submitted after clicking on LinkedIn ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.linkedin_ads__creative_report"}, "model.linkedin.linkedin_ads__monthly_campaign_country_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "linkedin_ads__monthly_campaign_country_report", "database": "postgres", "comment": "Each record in this table represents the monthly performance of a campaign at the country level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_month": {"type": "date", "index": 2, "name": "date_month", "comment": "The month of the activity."}, "country_name": {"type": "text", "index": 3, "name": "country_name", "comment": "Name of the country."}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": "Unique internal ID representing the campaign."}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "A label for the campaign."}, "version_tag": {"type": "numeric", "index": 6, "name": "version_tag", "comment": "An integer representation of the version of the campaign."}, "campaign_group_id": {"type": "integer", "index": 7, "name": "campaign_group_id", "comment": "Unique internal ID representing the campaign group."}, "campaign_group_name": {"type": "text", "index": 8, "name": "campaign_group_name", "comment": "A label for the campaign group."}, "account_id": {"type": "integer", "index": 9, "name": "account_id", "comment": "Unique internal ID representing the account."}, "account_name": {"type": "text", "index": 10, "name": "account_name", "comment": "A label for the account."}, "campaign_status": {"type": "text", "index": 11, "name": "campaign_status", "comment": "ACTIVE - Denotes that the campaign is fully servable.\nPAUSED - Denotes that the campaign meets all requirements to be served, but temporarily should not be.\nARCHIVED - Denotes that the campaign is presently inactive, and should mostly be hidden in the UI until un-archived.\nCOMPLETED - Denotes that the campaign has reached a specified budgetary or chronological limit.\nCANCELED - Denotes that the campaign has been permanently canceled, such as when an advertising account is permanently closed.\nDRAFT - Denotes that the campaign is still being edited and not eligible for serving. Some validation will be postponed until the campaign is activated.\nPENDING_DELETION - Denotes that the campaign has been requested to be deleted that is currently pending.\nREMOVED - Denotes that the campaign was deleted, but must remain fetchable due to the existence of performance data.\n"}, "campaign_group_status": {"type": "text", "index": 12, "name": "campaign_group_status", "comment": "Status of campaign's campaign group. Possible values are: ACTIVE - Denotes that the campaign group is capable of serving ads, subject to run date and budget limitations (as well as any other limitations at the account or campaign level). ARCHIVED - Denotes that the campaign group is presently inactive, and should mostly be hidden in the UI until un-archived. CANCELLED - Denotes that the campaign group has been permanently canceled and cannot be reactivated. Not a settable status. DRAFT - Denotes that the campaign group is in a preliminary state and should temporarily not be served. PAUSED - Denotes that the campaign group meets all requirements to be served, but temporarily should not be. PENDING_DELETION - Denotes that the campaign group has been requested to be deleted that is currently pending. REMOVED - Denoted that the campaign group was deleted, but must remain fetchable due to the existence of performance data.\n"}, "campaign_type": {"type": "text", "index": 13, "name": "campaign_type", "comment": "TEXT_AD - Text-based ads that show up in the right column or top of the page on LinkedIn.\nSPONSORED_UPDATES - Native ads that promote a company's content updates in the LinkedIn feed.\nSPONSORED_INMAILS - Personalized messages with a call-to-action button delivered to a LinkedIn's member inbox.\nDYNAMIC - Ads that are dynamically personalized.\n"}, "cost_type": {"type": "text", "index": 14, "name": "cost_type", "comment": "CPM - Cost per thousand advertising impressions. If type=SPONSORED_INMAILS; cost per send(CPS) is measured as CPM x 1000.\nCPC- Cost per individual click on the associated link.\nCPV- Cost per view for video ads.\n"}, "creative_selection": {"type": "text", "index": 15, "name": "creative_selection", "comment": "ROUND_ROBIN - Rotate through available creatives to serve them as evenly as possible.\nOPTIMIZED (default) - Bias selection taking into account such as expected performance. Not available for Message and Conversation Ads (type=SPONSORED_INMAILS).\n"}, "daily_budget_amount": {"type": "double precision", "index": 16, "name": "daily_budget_amount", "comment": "Maximum amount to spend per day UTC. The amount of money as a real number string."}, "daily_budget_currency_code": {"type": "text", "index": 17, "name": "daily_budget_currency_code", "comment": "ISO currency code. The currency must match that of the parent account."}, "unit_cost_amount": {"type": "double precision", "index": 18, "name": "unit_cost_amount", "comment": "This value is used as one of the following: amount to bid (for manual bidding), amount which is the target cost (for target cost bidding) per click, impression, or other event depending on the pricing model, or cost cap (for cost cap bidding). The amount of money as a real number string. The amount should be non-negative if the bidding strategy is manual, target cost, or cost cap bidding. The default is 0 with the currency code set to match that of the associated account.\n"}, "unit_cost_currency_code": {"type": "text", "index": 19, "name": "unit_cost_currency_code", "comment": "Amount to bid per click, impression, or other event depending on the pricing model. The default is 0 with the currency code set to match that of the associated account. ISO currency code.\n"}, "account_currency": {"type": "text", "index": 20, "name": "account_currency", "comment": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default)."}, "format": {"type": "text", "index": 21, "name": "format", "comment": "The ad format on the campaign level. See https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads/campaign-formats?view=li-lms-2022-07"}, "campaign_locale_country": {"type": "text", "index": 22, "name": "campaign_locale_country", "comment": "Locale of the campaign. An uppercase two-letter country code as defined by ISO-3166."}, "campaign_locale_language": {"type": "text", "index": 23, "name": "campaign_locale_language", "comment": "Locale of the campaign. A lowercase two-letter language code as defined by ISO-639."}, "objective_type": {"type": "text", "index": 24, "name": "objective_type", "comment": "Campaign Objective type values. Click [here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ad-budget-pricing-type-combinations?view=li-lms-2022-07) for Campaign Objective descriptions. One of: - BRAND_AWARENESS - ENGAGEMENT - JOB_APPLICANTS - LEAD_GENERATION - WEBSITE_CONVERSIONS - WEBSITE_VISITS - VIDEO_VIEWS\n"}, "optimization_target_type": {"type": "text", "index": 25, "name": "optimization_target_type", "comment": "Determines how this campaign is optimized for spending. If this is not set, there is no optimization. Refer to the documentation here. Default = 'NONE'."}, "is_audience_expansion_enabled": {"type": "boolean", "index": 26, "name": "is_audience_expansion_enabled", "comment": "Boolean (default=false) representing whether Audience Expansion is enabled for the campaign provides query expansion for certain targeting criteria."}, "is_offsite_delivery_enabled": {"type": "boolean", "index": 27, "name": "is_offsite_delivery_enabled", "comment": "Boolean indicating if this campaign to allowed to be served on the LinkedIn Audience Network to extend the reach of your campaign by delivering ads beyond the LinkedIn feed to members on third-party apps and sites.\t(default will be \"True\" from June 30, 2022)\n"}, "run_schedule_start_at": {"type": "timestamp without time zone", "index": 28, "name": "run_schedule_start_at", "comment": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the inclusive (greater than or equal to) value in which to start the range."}, "run_schedule_end_at": {"type": "timestamp without time zone", "index": 29, "name": "run_schedule_end_at", "comment": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the exclusive (strictly less than) value in which to end the range, if provided.\n"}, "last_modified_at": {"type": "timestamp without time zone", "index": 30, "name": "last_modified_at", "comment": "The timestamp of when the version was updated."}, "created_at": {"type": "timestamp without time zone", "index": 31, "name": "created_at", "comment": "The timestamp of when the campaign was created."}, "total_conversions": {"type": "numeric", "index": 32, "name": "total_conversions", "comment": "The total conversions being brought in the conversion fields you select in your `linkedin_ads__conversion_fields`."}, "clicks": {"type": "bigint", "index": 33, "name": "clicks", "comment": "The count of chargeable clicks."}, "impressions": {"type": "bigint", "index": 34, "name": "impressions", "comment": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails."}, "cost": {"type": "numeric", "index": 35, "name": "cost", "comment": "The cost of the ads in the local currency or USD."}, "conversion_value_in_local_currency": {"type": "double precision", "index": 36, "name": "conversion_value_in_local_currency", "comment": "The value generated by your conversions, displayed in your LinkedIn account's local currency, on the given day."}, "external_website_conversions": {"type": "numeric", "index": 37, "name": "external_website_conversions", "comment": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads."}, "one_click_leads": {"type": "numeric", "index": 38, "name": "one_click_leads", "comment": "Leads submitted after clicking on LinkedIn ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.linkedin_ads__monthly_campaign_country_report"}, "model.linkedin.linkedin_ads__monthly_campaign_region_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "linkedin_ads__monthly_campaign_region_report", "database": "postgres", "comment": "Each record in this table represents the monthly performance of a campaign at the country level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_month": {"type": "date", "index": 2, "name": "date_month", "comment": "The month of the activity."}, "region_name": {"type": "text", "index": 3, "name": "region_name", "comment": "Name of the region."}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": "Unique internal ID representing the campaign."}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "A label for the campaign."}, "version_tag": {"type": "numeric", "index": 6, "name": "version_tag", "comment": "An integer representation of the version of the campaign."}, "campaign_group_id": {"type": "integer", "index": 7, "name": "campaign_group_id", "comment": "Unique internal ID representing the campaign group."}, "campaign_group_name": {"type": "text", "index": 8, "name": "campaign_group_name", "comment": "A label for the campaign group."}, "account_id": {"type": "integer", "index": 9, "name": "account_id", "comment": "Unique internal ID representing the account."}, "account_name": {"type": "text", "index": 10, "name": "account_name", "comment": "A label for the account."}, "campaign_status": {"type": "text", "index": 11, "name": "campaign_status", "comment": "ACTIVE - Denotes that the campaign is fully servable.\nPAUSED - Denotes that the campaign meets all requirements to be served, but temporarily should not be.\nARCHIVED - Denotes that the campaign is presently inactive, and should mostly be hidden in the UI until un-archived.\nCOMPLETED - Denotes that the campaign has reached a specified budgetary or chronological limit.\nCANCELED - Denotes that the campaign has been permanently canceled, such as when an advertising account is permanently closed.\nDRAFT - Denotes that the campaign is still being edited and not eligible for serving. Some validation will be postponed until the campaign is activated.\nPENDING_DELETION - Denotes that the campaign has been requested to be deleted that is currently pending.\nREMOVED - Denotes that the campaign was deleted, but must remain fetchable due to the existence of performance data.\n"}, "campaign_group_status": {"type": "text", "index": 12, "name": "campaign_group_status", "comment": "Status of campaign's campaign group. Possible values are: ACTIVE - Denotes that the campaign group is capable of serving ads, subject to run date and budget limitations (as well as any other limitations at the account or campaign level). ARCHIVED - Denotes that the campaign group is presently inactive, and should mostly be hidden in the UI until un-archived. CANCELLED - Denotes that the campaign group has been permanently canceled and cannot be reactivated. Not a settable status. DRAFT - Denotes that the campaign group is in a preliminary state and should temporarily not be served. PAUSED - Denotes that the campaign group meets all requirements to be served, but temporarily should not be. PENDING_DELETION - Denotes that the campaign group has been requested to be deleted that is currently pending. REMOVED - Denoted that the campaign group was deleted, but must remain fetchable due to the existence of performance data.\n"}, "campaign_type": {"type": "text", "index": 13, "name": "campaign_type", "comment": "TEXT_AD - Text-based ads that show up in the right column or top of the page on LinkedIn.\nSPONSORED_UPDATES - Native ads that promote a company's content updates in the LinkedIn feed.\nSPONSORED_INMAILS - Personalized messages with a call-to-action button delivered to a LinkedIn's member inbox.\nDYNAMIC - Ads that are dynamically personalized.\n"}, "cost_type": {"type": "text", "index": 14, "name": "cost_type", "comment": "CPM - Cost per thousand advertising impressions. If type=SPONSORED_INMAILS; cost per send(CPS) is measured as CPM x 1000.\nCPC- Cost per individual click on the associated link.\nCPV- Cost per view for video ads.\n"}, "creative_selection": {"type": "text", "index": 15, "name": "creative_selection", "comment": "ROUND_ROBIN - Rotate through available creatives to serve them as evenly as possible.\nOPTIMIZED (default) - Bias selection taking into account such as expected performance. Not available for Message and Conversation Ads (type=SPONSORED_INMAILS).\n"}, "daily_budget_amount": {"type": "double precision", "index": 16, "name": "daily_budget_amount", "comment": "Maximum amount to spend per day UTC. The amount of money as a real number string."}, "daily_budget_currency_code": {"type": "text", "index": 17, "name": "daily_budget_currency_code", "comment": "ISO currency code. The currency must match that of the parent account."}, "unit_cost_amount": {"type": "double precision", "index": 18, "name": "unit_cost_amount", "comment": "This value is used as one of the following: amount to bid (for manual bidding), amount which is the target cost (for target cost bidding) per click, impression, or other event depending on the pricing model, or cost cap (for cost cap bidding). The amount of money as a real number string. The amount should be non-negative if the bidding strategy is manual, target cost, or cost cap bidding. The default is 0 with the currency code set to match that of the associated account.\n"}, "unit_cost_currency_code": {"type": "text", "index": 19, "name": "unit_cost_currency_code", "comment": "Amount to bid per click, impression, or other event depending on the pricing model. The default is 0 with the currency code set to match that of the associated account. ISO currency code.\n"}, "account_currency": {"type": "text", "index": 20, "name": "account_currency", "comment": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default)."}, "format": {"type": "text", "index": 21, "name": "format", "comment": "The ad format on the campaign level. See https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads/campaign-formats?view=li-lms-2022-07"}, "campaign_locale_country": {"type": "text", "index": 22, "name": "campaign_locale_country", "comment": "Locale of the campaign. An uppercase two-letter country code as defined by ISO-3166."}, "campaign_locale_language": {"type": "text", "index": 23, "name": "campaign_locale_language", "comment": "Locale of the campaign. A lowercase two-letter language code as defined by ISO-639."}, "objective_type": {"type": "text", "index": 24, "name": "objective_type", "comment": "Campaign Objective type values. Click [here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ad-budget-pricing-type-combinations?view=li-lms-2022-07) for Campaign Objective descriptions. One of: - BRAND_AWARENESS - ENGAGEMENT - JOB_APPLICANTS - LEAD_GENERATION - WEBSITE_CONVERSIONS - WEBSITE_VISITS - VIDEO_VIEWS\n"}, "optimization_target_type": {"type": "text", "index": 25, "name": "optimization_target_type", "comment": "Determines how this campaign is optimized for spending. If this is not set, there is no optimization. Refer to the documentation here. Default = 'NONE'."}, "is_audience_expansion_enabled": {"type": "boolean", "index": 26, "name": "is_audience_expansion_enabled", "comment": "Boolean (default=false) representing whether Audience Expansion is enabled for the campaign provides query expansion for certain targeting criteria."}, "is_offsite_delivery_enabled": {"type": "boolean", "index": 27, "name": "is_offsite_delivery_enabled", "comment": "Boolean indicating if this campaign to allowed to be served on the LinkedIn Audience Network to extend the reach of your campaign by delivering ads beyond the LinkedIn feed to members on third-party apps and sites.\t(default will be \"True\" from June 30, 2022)\n"}, "run_schedule_start_at": {"type": "timestamp without time zone", "index": 28, "name": "run_schedule_start_at", "comment": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the inclusive (greater than or equal to) value in which to start the range."}, "run_schedule_end_at": {"type": "timestamp without time zone", "index": 29, "name": "run_schedule_end_at", "comment": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the exclusive (strictly less than) value in which to end the range, if provided.\n"}, "last_modified_at": {"type": "timestamp without time zone", "index": 30, "name": "last_modified_at", "comment": "The timestamp of when the version was updated."}, "created_at": {"type": "timestamp without time zone", "index": 31, "name": "created_at", "comment": "The timestamp of when the campaign was created."}, "total_conversions": {"type": "numeric", "index": 32, "name": "total_conversions", "comment": "The total conversions being brought in the conversion fields you select in your `linkedin_ads__conversion_fields`."}, "clicks": {"type": "bigint", "index": 33, "name": "clicks", "comment": "The count of chargeable clicks."}, "impressions": {"type": "bigint", "index": 34, "name": "impressions", "comment": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails."}, "cost": {"type": "numeric", "index": 35, "name": "cost", "comment": "The cost of the ads in the local currency or USD."}, "conversion_value_in_local_currency": {"type": "double precision", "index": 36, "name": "conversion_value_in_local_currency", "comment": "The value generated by your conversions, displayed in your LinkedIn account's local currency, on the given day."}, "external_website_conversions": {"type": "numeric", "index": 37, "name": "external_website_conversions", "comment": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads."}, "one_click_leads": {"type": "numeric", "index": 38, "name": "one_click_leads", "comment": "Leads submitted after clicking on LinkedIn ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.linkedin_ads__monthly_campaign_region_report"}, "model.linkedin.linkedin_ads__url_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "linkedin_ads__url_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the url level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The day of the activity."}, "click_uri": {"type": "text", "index": 3, "name": "click_uri", "comment": "The URL where the member should be redirected to, on clicking the text ad or spotlight ad."}, "click_uri_type": {"type": "text", "index": 4, "name": "click_uri_type", "comment": "Will either be `text_ad`, `spotlight`, or `null` to indicate the origin of the click_uri."}, "base_url": {"type": "text", "index": 5, "name": "base_url", "comment": "The base URL of the ad, extracted from the `click_uri`."}, "url_host": {"type": "text", "index": 6, "name": "url_host", "comment": "The URL host of the ad, extracted from the `click_uri`."}, "url_path": {"type": "text", "index": 7, "name": "url_path", "comment": "The URL path of the ad, extracted from the `click_uri`."}, "utm_source": {"type": "text", "index": 8, "name": "utm_source", "comment": "The utm_source parameter of the ad, extracted from the `click_uri`."}, "utm_medium": {"type": "text", "index": 9, "name": "utm_medium", "comment": "The utm_medium parameter of the ad, extracted from the `click_uri`."}, "utm_campaign": {"type": "text", "index": 10, "name": "utm_campaign", "comment": "The utm_campaign parameter of the ad, extracted from the `click_uri`."}, "utm_content": {"type": "text", "index": 11, "name": "utm_content", "comment": "The utm_content parameter of the ad, extracted from the `click_uri`."}, "utm_term": {"type": "text", "index": 12, "name": "utm_term", "comment": "The utm_term parameter of the ad, extracted from the `click_uri`."}, "creative_id": {"type": "integer", "index": 13, "name": "creative_id", "comment": "Unique internal ID representing the creative."}, "campaign_id": {"type": "integer", "index": 14, "name": "campaign_id", "comment": "Unique internal ID representing the creative's campaign."}, "campaign_name": {"type": "text", "index": 15, "name": "campaign_name", "comment": "A label for the creative's campaign."}, "campaign_group_id": {"type": "integer", "index": 16, "name": "campaign_group_id", "comment": "Unique internal ID representing the campaign group."}, "campaign_group_name": {"type": "text", "index": 17, "name": "campaign_group_name", "comment": "A label for the campaign group."}, "account_id": {"type": "integer", "index": 18, "name": "account_id", "comment": "Unique internal ID representing the account."}, "account_name": {"type": "text", "index": 19, "name": "account_name", "comment": "A label for the account."}, "currency": {"type": "text", "index": 20, "name": "currency", "comment": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default)."}, "total_conversions": {"type": "numeric", "index": 21, "name": "total_conversions", "comment": "The total conversions being brought in the conversion fields you select in your `linkedin_ads__conversion_fields`."}, "clicks": {"type": "bigint", "index": 22, "name": "clicks", "comment": "The count of chargeable clicks."}, "impressions": {"type": "bigint", "index": 23, "name": "impressions", "comment": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails."}, "cost": {"type": "bigint", "index": 24, "name": "cost", "comment": "The cost of the ads in the local currency or USD."}, "conversion_value_in_local_currency": {"type": "double precision", "index": 25, "name": "conversion_value_in_local_currency", "comment": "The value generated by your conversions, displayed in your LinkedIn account's local currency, on the given day."}, "external_website_conversions": {"type": "numeric", "index": 26, "name": "external_website_conversions", "comment": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads."}, "one_click_leads": {"type": "numeric", "index": 27, "name": "one_click_leads", "comment": "Leads submitted after clicking on LinkedIn ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.linkedin_ads__url_report"}, "model.ad_reporting.metricflow_time_spine": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "metricflow_time_spine", "database": "postgres", "comment": "Metricflow time spine", "owner": "postgres"}, "columns": {"date_day": {"type": "date", "index": 1, "name": "date_day", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.ad_reporting.metricflow_time_spine"}, "model.microsoft_ads.microsoft_ads__account_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__account_report", "database": "postgres", "comment": "Each record in this table represents the daily clicks, impressions, spend (and if applicable other passthrough metrics) of ads by account, account timezone, device os, device type, network and currency code.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "account_name": {"type": "character varying", "index": 3, "name": "account_name", "comment": "The name of the account."}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": "The ID of the account."}, "account_timezone": {"type": "text", "index": 5, "name": "account_timezone", "comment": "The time zone associated with this account."}, "device_os": {"type": "text", "index": 6, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 7, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 8, "name": "network", "comment": "The network associated with this record."}, "currency_code": {"type": "text", "index": 9, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "clicks": {"type": "bigint", "index": 10, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "bigint", "index": 11, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "double precision", "index": 12, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "bigint", "index": 13, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 14, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "bigint", "index": 15, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.microsoft_ads__account_report"}, "model.microsoft_ads.microsoft_ads__ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__ad_group_report", "database": "postgres", "comment": "Each record in this table represents the daily clicks, impressions, spend (and if applicable other passthrough metrics) of ads by ad group, campaign, account, device os, device type, network and currency code.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "account_name": {"type": "character varying", "index": 3, "name": "account_name", "comment": "The name of the account."}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": "The ID of the account."}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "The name of the campaign."}, "campaign_id": {"type": "bigint", "index": 6, "name": "campaign_id", "comment": "The ID of the campaign."}, "ad_group_name": {"type": "text", "index": 7, "name": "ad_group_name", "comment": "The name of the corresponding ad group."}, "ad_group_id": {"type": "bigint", "index": 8, "name": "ad_group_id", "comment": "The ID of the corresponding ad group."}, "device_os": {"type": "text", "index": 9, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 10, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 11, "name": "network", "comment": "The network associated with this record."}, "currency_code": {"type": "text", "index": 12, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "clicks": {"type": "bigint", "index": 13, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "bigint", "index": 14, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "double precision", "index": 15, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "bigint", "index": 16, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 17, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "bigint", "index": 18, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "all_conversions_value": {"type": "double precision", "index": 19, "name": "all_conversions_value", "comment": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.microsoft_ads__ad_group_report"}, "model.microsoft_ads.microsoft_ads__ad_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__ad_report", "database": "postgres", "comment": "Each record in this table represents the daily clicks, impressions, spend (and if applicable other passthrough metrics) of ads by ad, ad group, campaign, account, ad type, device os, device type, network and currency code.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "account_name": {"type": "character varying", "index": 3, "name": "account_name", "comment": "The name of the account."}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": "The ID of the account."}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "The name of the campaign."}, "campaign_id": {"type": "bigint", "index": 6, "name": "campaign_id", "comment": "The ID of the campaign."}, "ad_group_name": {"type": "text", "index": 7, "name": "ad_group_name", "comment": "The name of the corresponding ad group."}, "ad_group_id": {"type": "bigint", "index": 8, "name": "ad_group_id", "comment": "The ID of the corresponding ad group."}, "ad_name": {"type": "text", "index": 9, "name": "ad_name", "comment": "The name of the corresponding ad; `title_part_1` is used as the default ad name but you may customize this by using the `microsoft_ads__ad_name_selector` variable. For more information, refer to the [README](https://github.com/fivetran/dbt_microsoft_ads/blob/main/README.md#change-how-ad-name-is-determined)."}, "ad_id": {"type": "bigint", "index": 10, "name": "ad_id", "comment": "The ID of the corresponding ad."}, "ad_type": {"type": "text", "index": 11, "name": "ad_type", "comment": "The ad type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/adtype?view=bingads-13) for more information on values and definitions."}, "device_os": {"type": "text", "index": 12, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 13, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 14, "name": "network", "comment": "The network associated with this record."}, "currency_code": {"type": "text", "index": 15, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "clicks": {"type": "bigint", "index": 16, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "bigint", "index": 17, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "double precision", "index": 18, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "bigint", "index": 19, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 20, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "bigint", "index": 21, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "all_conversions_value": {"type": "double precision", "index": 22, "name": "all_conversions_value", "comment": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.microsoft_ads__ad_report"}, "model.microsoft_ads.microsoft_ads__campaign_country_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__campaign_country_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads by country, account, campaign, campaign type, campaign timezone, campaign status, device os, device type, network, and currency code.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "country": {"type": "text", "index": 3, "name": "country", "comment": "The country or region where the user was physically located when they clicked the ad."}, "account_name": {"type": "character varying", "index": 4, "name": "account_name", "comment": "The name of the account."}, "account_id": {"type": "bigint", "index": 5, "name": "account_id", "comment": "The ID of the account."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the campaign."}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": "The ID of the campaign."}, "campaign_type": {"type": "text", "index": 8, "name": "campaign_type", "comment": "The campaign type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaigntype?view=bingads-13) for more information on values and definitions."}, "campaign_timezone": {"type": "text", "index": 9, "name": "campaign_timezone", "comment": "The time zone associated with this campaign."}, "campaign_status": {"type": "text", "index": 10, "name": "campaign_status", "comment": "The status of this campaign; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaignstatus?view=bingads-13) for more information on values and definitions."}, "device_os": {"type": "text", "index": 11, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 12, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 13, "name": "network", "comment": "The network associated with this record."}, "currency_code": {"type": "text", "index": 14, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "location_id": {"type": "bigint", "index": 15, "name": "location_id", "comment": "The Microsoft Advertising identifier of the location where the user was physically located when they clicked the ad."}, "goal": {"type": "text", "index": 16, "name": "goal", "comment": "The name of the goal you set for the conversions you want, meaning actions customers take after clicking your ad."}, "geo_language": {"type": "text", "index": 17, "name": "geo_language", "comment": "The language of the publisher where the ad was shown."}, "campaign_budget": {"type": "double precision", "index": 18, "name": "campaign_budget", "comment": "The amount to spend daily across all campaigns that share the budget."}, "campaign_budget_id": {"type": "integer", "index": 19, "name": "campaign_budget_id", "comment": "The unique Microsoft Advertising identifier of the budget."}, "campaign_budget_type": {"type": "text", "index": 20, "name": "campaign_budget_type", "comment": "The budget type determines the pace at which the budget is spent throughout the day."}, "campaign_language": {"type": "text", "index": 21, "name": "campaign_language", "comment": "The language that the associated ad was viewed in."}, "clicks": {"type": "bigint", "index": 22, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "bigint", "index": 23, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "numeric", "index": 24, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "bigint", "index": 25, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 26, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "bigint", "index": 27, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "all_conversions_value": {"type": "double precision", "index": 28, "name": "all_conversions_value", "comment": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.microsoft_ads__campaign_country_report"}, "model.microsoft_ads.microsoft_ads__campaign_region_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__campaign_region_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads by state or region, account, campaign, campaign type, campaign timezone, campaign status, device os, device type, network, and currency code.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "region": {"type": "text", "index": 3, "name": "region", "comment": "The state or geographic region where the user was physically located when they clicked the ad."}, "country": {"type": "text", "index": 4, "name": "country", "comment": "The country or region where the user was physically located when they clicked the ad."}, "account_name": {"type": "character varying", "index": 5, "name": "account_name", "comment": "The name of the account."}, "account_id": {"type": "bigint", "index": 6, "name": "account_id", "comment": "The ID of the account."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the campaign."}, "campaign_id": {"type": "bigint", "index": 8, "name": "campaign_id", "comment": "The ID of the campaign."}, "campaign_type": {"type": "text", "index": 9, "name": "campaign_type", "comment": "The campaign type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaigntype?view=bingads-13) for more information on values and definitions."}, "campaign_timezone": {"type": "text", "index": 10, "name": "campaign_timezone", "comment": "The time zone associated with this campaign."}, "campaign_status": {"type": "text", "index": 11, "name": "campaign_status", "comment": "The status of this campaign; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaignstatus?view=bingads-13) for more information on values and definitions."}, "device_os": {"type": "text", "index": 12, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 13, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 14, "name": "network", "comment": "The network associated with this record."}, "currency_code": {"type": "text", "index": 15, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "location_id": {"type": "bigint", "index": 16, "name": "location_id", "comment": "The Microsoft Advertising identifier of the location where the user was physically located when they clicked the ad."}, "goal": {"type": "text", "index": 17, "name": "goal", "comment": "The name of the goal you set for the conversions you want, meaning actions customers take after clicking your ad."}, "geo_language": {"type": "text", "index": 18, "name": "geo_language", "comment": "The language of the publisher where the ad was shown."}, "campaign_budget": {"type": "double precision", "index": 19, "name": "campaign_budget", "comment": "The amount to spend daily across all campaigns that share the budget."}, "campaign_budget_id": {"type": "integer", "index": 20, "name": "campaign_budget_id", "comment": "The unique Microsoft Advertising identifier of the budget."}, "campaign_budget_type": {"type": "text", "index": 21, "name": "campaign_budget_type", "comment": "The budget type determines the pace at which the budget is spent throughout the day."}, "campaign_language": {"type": "text", "index": 22, "name": "campaign_language", "comment": "The language that the associated ad was viewed in."}, "clicks": {"type": "bigint", "index": 23, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "bigint", "index": 24, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "numeric", "index": 25, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "bigint", "index": 26, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 27, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "bigint", "index": 28, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "all_conversions_value": {"type": "double precision", "index": 29, "name": "all_conversions_value", "comment": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.microsoft_ads__campaign_region_report"}, "model.microsoft_ads.microsoft_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__campaign_report", "database": "postgres", "comment": "Each record in this table represents the daily clicks, impressions, spend (and if applicable other passthrough metrics) of ads by campaign, account, campaign type, campaign timezone, campaign status, device os, device type, network and currency code.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "account_name": {"type": "character varying", "index": 3, "name": "account_name", "comment": "The name of the account."}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": "The ID of the account."}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "The name of the campaign."}, "campaign_id": {"type": "bigint", "index": 6, "name": "campaign_id", "comment": "The ID of the campaign."}, "campaign_type": {"type": "text", "index": 7, "name": "campaign_type", "comment": "The campaign type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaigntype?view=bingads-13) for more information on values and definitions."}, "campaign_timezone": {"type": "text", "index": 8, "name": "campaign_timezone", "comment": "The time zone associated with this campaign."}, "campaign_status": {"type": "text", "index": 9, "name": "campaign_status", "comment": "The status of this campaign; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaignstatus?view=bingads-13) for more information on values and definitions."}, "device_os": {"type": "text", "index": 10, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 11, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 12, "name": "network", "comment": "The network associated with this record."}, "currency_code": {"type": "text", "index": 13, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "clicks": {"type": "bigint", "index": 14, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "bigint", "index": 15, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "double precision", "index": 16, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "bigint", "index": 17, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 18, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "bigint", "index": 19, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "all_conversions_value": {"type": "double precision", "index": 20, "name": "all_conversions_value", "comment": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.microsoft_ads__campaign_report"}, "model.microsoft_ads.microsoft_ads__keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__keyword_report", "database": "postgres", "comment": "Each record in this table represents the daily clicks, impressions, spend (and if applicable other passthrough metrics) of ads by keyword, ad, ad group, campaign, account, device os, device type, network and currency code.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "account_name": {"type": "character varying", "index": 3, "name": "account_name", "comment": "The name of the account."}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": "The ID of the account."}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "The name of the campaign."}, "campaign_id": {"type": "bigint", "index": 6, "name": "campaign_id", "comment": "The ID of the campaign."}, "ad_group_name": {"type": "text", "index": 7, "name": "ad_group_name", "comment": "The name of the corresponding ad group."}, "ad_group_id": {"type": "bigint", "index": 8, "name": "ad_group_id", "comment": "The ID of the corresponding ad group."}, "ad_name": {"type": "text", "index": 9, "name": "ad_name", "comment": "The name of the corresponding ad; `title_part_1` is used as the default ad name but you may customize this by using the `microsoft_ads__ad_name_selector` variable. For more information, refer to the [README](https://github.com/fivetran/dbt_microsoft_ads/blob/main/README.md#change-how-ad-name-is-determined)."}, "ad_id": {"type": "bigint", "index": 10, "name": "ad_id", "comment": "The ID of the corresponding ad."}, "keyword_name": {"type": "text", "index": 11, "name": "keyword_name", "comment": "The keyword(s) associated with this record."}, "keyword_id": {"type": "bigint", "index": 12, "name": "keyword_id", "comment": "The ID of the keyword."}, "match_type": {"type": "text", "index": 13, "name": "match_type", "comment": "The match type associated with this record; values contain but may not be limited to 'Broad', 'Exact', 'Phrase'. Please refer to Microsoft Ad's [documentation](https://help.ads.microsoft.com/#apex/ads/en/50822/1)."}, "device_os": {"type": "text", "index": 14, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 15, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 16, "name": "network", "comment": "The network associated with this record."}, "currency_code": {"type": "text", "index": 17, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "clicks": {"type": "bigint", "index": 18, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "bigint", "index": 19, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "double precision", "index": 20, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "bigint", "index": 21, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 22, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "bigint", "index": 23, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "all_conversions_value": {"type": "double precision", "index": 24, "name": "all_conversions_value", "comment": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.microsoft_ads__keyword_report"}, "model.microsoft_ads.microsoft_ads__search_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__search_report", "database": "postgres", "comment": "Each record in this table represents the daily clicks, impressions, spend (and if applicable other passthrough metrics) of ads by search query, keyword, ad, ad group, campaign, account, device os, device type and network.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "account_name": {"type": "character varying", "index": 3, "name": "account_name", "comment": "The name of the account."}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": "The ID of the account."}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "The name of the campaign."}, "campaign_id": {"type": "bigint", "index": 6, "name": "campaign_id", "comment": "The ID of the campaign."}, "ad_group_name": {"type": "text", "index": 7, "name": "ad_group_name", "comment": "The name of the corresponding ad group."}, "ad_group_id": {"type": "bigint", "index": 8, "name": "ad_group_id", "comment": "The ID of the corresponding ad group."}, "ad_name": {"type": "text", "index": 9, "name": "ad_name", "comment": "The name of the corresponding ad; `title_part_1` is used as the default ad name but you may customize this by using the `microsoft_ads__ad_name_selector` variable. For more information, refer to the [README](https://github.com/fivetran/dbt_microsoft_ads/blob/main/README.md#change-how-ad-name-is-determined)."}, "ad_id": {"type": "bigint", "index": 10, "name": "ad_id", "comment": "The ID of the corresponding ad."}, "keyword_id": {"type": "bigint", "index": 11, "name": "keyword_id", "comment": "The ID of the keyword."}, "keyword_name": {"type": "text", "index": 12, "name": "keyword_name", "comment": "The keyword(s) associated with this record."}, "match_type": {"type": "text", "index": 13, "name": "match_type", "comment": "The match type associated with this record; values contain but may not be limited to 'Broad', 'Exact', 'Phrase'. Please refer to Microsoft Ad's [documentation](https://help.ads.microsoft.com/#apex/ads/en/50822/1)."}, "search_query": {"type": "text", "index": 14, "name": "search_query", "comment": "The search query string associated with this record."}, "device_os": {"type": "text", "index": 15, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 16, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 17, "name": "network", "comment": "The network associated with this record."}, "clicks": {"type": "bigint", "index": 18, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "bigint", "index": 19, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "double precision", "index": 20, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "bigint", "index": 21, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 22, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "bigint", "index": 23, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "all_conversions_value": {"type": "double precision", "index": 24, "name": "all_conversions_value", "comment": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.microsoft_ads__search_report"}, "model.microsoft_ads.microsoft_ads__url_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__url_report", "database": "postgres", "comment": "Each record in this table represents the daily clicks, impressions, spend (and if applicable other passthrough metrics) of ads by ad, ad group, campaign, account, ad type, device os, device type, network, currency code, url and utm parameters.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "account_name": {"type": "character varying", "index": 3, "name": "account_name", "comment": "The name of the account."}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": "The ID of the account."}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "The name of the campaign."}, "campaign_id": {"type": "bigint", "index": 6, "name": "campaign_id", "comment": "The ID of the campaign."}, "ad_group_name": {"type": "text", "index": 7, "name": "ad_group_name", "comment": "The name of the corresponding ad group."}, "ad_group_id": {"type": "bigint", "index": 8, "name": "ad_group_id", "comment": "The ID of the corresponding ad group."}, "ad_name": {"type": "text", "index": 9, "name": "ad_name", "comment": "The name of the corresponding ad; `title_part_1` is used as the default ad name but you may customize this by using the `microsoft_ads__ad_name_selector` variable. For more information, refer to the [README](https://github.com/fivetran/dbt_microsoft_ads/blob/main/README.md#change-how-ad-name-is-determined)."}, "ad_id": {"type": "bigint", "index": 10, "name": "ad_id", "comment": "The ID of the corresponding ad."}, "device_os": {"type": "text", "index": 11, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 12, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 13, "name": "network", "comment": "The network associated with this record."}, "currency_code": {"type": "text", "index": 14, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "base_url": {"type": "text", "index": 15, "name": "base_url", "comment": "The base URL of the ad, extracted from the `final_url`."}, "url_host": {"type": "text", "index": 16, "name": "url_host", "comment": "The URL host of the ad, extracted from the `final_url`."}, "url_path": {"type": "text", "index": 17, "name": "url_path", "comment": "The URL path of the ad, extracted from the `final_url`."}, "utm_source": {"type": "text", "index": 18, "name": "utm_source", "comment": "The site that sent traffic to your page. Microsoft Advertising sets this to Bing; extracted from the `final_url`."}, "utm_medium": {"type": "text", "index": 19, "name": "utm_medium", "comment": "Which channel was used. Microsoft Advertising sets this to cp; extracted from the `final_url`."}, "utm_campaign": {"type": "text", "index": 20, "name": "utm_campaign", "comment": "Which campaign the keyword came from; extracted from the `final_url`."}, "utm_content": {"type": "text", "index": 21, "name": "utm_content", "comment": "Which ad group the keyword came from; extracted from the `final_url`."}, "utm_term": {"type": "text", "index": 22, "name": "utm_term", "comment": "Which keyword brought people to your website; extracted from the `final_url`."}, "clicks": {"type": "bigint", "index": 23, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "bigint", "index": 24, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "double precision", "index": 25, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "bigint", "index": 26, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 27, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "bigint", "index": 28, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "all_conversions_value": {"type": "double precision", "index": 29, "name": "all_conversions_value", "comment": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.microsoft_ads__url_report"}, "model.pinterest.pinterest_ads__ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__ad_group_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the campaign, advertiser, and ad group level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp with time zone", "index": 2, "name": "date_day", "comment": "The performance date of the record."}, "advertiser_name": {"type": "text", "index": 3, "name": "advertiser_name", "comment": "Name of the advertiser."}, "advertiser_id": {"type": "text", "index": 4, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "The name of the related Campaign."}, "campaign_status": {"type": "text", "index": 6, "name": "campaign_status", "comment": "Status of the campaign."}, "campaign_id": {"type": "text", "index": 7, "name": "campaign_id", "comment": "The ID of the related Campaign."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "The name of the related Ad group."}, "ad_group_id": {"type": "text", "index": 9, "name": "ad_group_id", "comment": "The ID of the related Ad group."}, "created_at": {"type": "text", "index": 10, "name": "created_at", "comment": "Ad group creation time."}, "start_time": {"type": "text", "index": 11, "name": "start_time", "comment": "Ad group start time."}, "end_time": {"type": "integer", "index": 12, "name": "end_time", "comment": "Ad group end time."}, "ad_group_status": {"type": "text", "index": 13, "name": "ad_group_status", "comment": "Status of the ad group."}, "spend": {"type": "numeric", "index": 14, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "clicks": {"type": "bigint", "index": 15, "name": "clicks", "comment": "The number of paid and earned clicks that occurred on the day of the record."}, "impressions": {"type": "bigint", "index": 16, "name": "impressions", "comment": "The number of paid and earned impressions that occurred on the day of the record."}, "total_conversions": {"type": "bigint", "index": 17, "name": "total_conversions", "comment": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "total_conversions_quantity": {"type": "bigint", "index": 18, "name": "total_conversions_quantity", "comment": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "total_conversions_value": {"type": "numeric", "index": 19, "name": "total_conversions_value", "comment": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.pinterest_ads__ad_group_report"}, "model.pinterest.pinterest_ads__advertiser_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__advertiser_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of an advertiser on the Pinterest Ads platform.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp with time zone", "index": 2, "name": "date_day", "comment": "The performance date of the record."}, "advertiser_name": {"type": "text", "index": 3, "name": "advertiser_name", "comment": "Name of the advertiser."}, "advertiser_id": {"type": "text", "index": 4, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": "The currency code which the advertiser is set up using."}, "country": {"type": "text", "index": 6, "name": "country", "comment": "The country code where the advertiser is located."}, "spend": {"type": "numeric", "index": 7, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "clicks": {"type": "bigint", "index": 8, "name": "clicks", "comment": "The number of paid and earned clicks that occurred on the day of the record."}, "impressions": {"type": "bigint", "index": 9, "name": "impressions", "comment": "The number of paid and earned impressions that occurred on the day of the record."}, "total_conversions": {"type": "bigint", "index": 10, "name": "total_conversions", "comment": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "total_conversions_quantity": {"type": "bigint", "index": 11, "name": "total_conversions_quantity", "comment": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "total_conversions_value": {"type": "numeric", "index": 12, "name": "total_conversions_value", "comment": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.pinterest_ads__advertiser_report"}, "model.pinterest.pinterest_ads__campaign_country_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__campaign_country_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the country and campaign level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The performance date of the record."}, "country_name": {"type": "text", "index": 3, "name": "country_name", "comment": "Name of the targeted country."}, "country_id": {"type": "text", "index": 4, "name": "country_id", "comment": "The ID of the targeted country."}, "campaign_id": {"type": "text", "index": 5, "name": "campaign_id", "comment": "The ID of the related Campaign."}, "spend": {"type": "numeric", "index": 6, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "clicks": {"type": "double precision", "index": 7, "name": "clicks", "comment": "The number of paid and earned clicks that occurred on the day of the record."}, "impressions": {"type": "double precision", "index": 8, "name": "impressions", "comment": "The number of paid and earned impressions that occurred on the day of the record."}, "total_conversions": {"type": "bigint", "index": 9, "name": "total_conversions", "comment": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "total_conversions_quantity": {"type": "bigint", "index": 10, "name": "total_conversions_quantity", "comment": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "total_conversions_value": {"type": "numeric", "index": 11, "name": "total_conversions_value", "comment": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}, "advertiser_name": {"type": "text", "index": 12, "name": "advertiser_name", "comment": "Name of the advertiser."}, "advertiser_id": {"type": "text", "index": 13, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "campaign_name": {"type": "text", "index": 14, "name": "campaign_name", "comment": "The name of the related Campaign."}, "campaign_status": {"type": "text", "index": 15, "name": "campaign_status", "comment": "Status of the campaign."}, "budget_spend_cap": {"type": "integer", "index": 16, "name": "budget_spend_cap", "comment": "Maximum amount allowed to be spent over a specified budget period for the campaign."}, "lifetime_spend_cap": {"type": "integer", "index": 17, "name": "lifetime_spend_cap", "comment": "Total maximum spend allowed across the entire lifespan of the campaign."}, "campaign_created_at": {"type": "text", "index": 18, "name": "campaign_created_at", "comment": "Campaign creation time."}, "default_ad_group_budget_in_micro_currency": {"type": "integer", "index": 19, "name": "default_ad_group_budget_in_micro_currency", "comment": "When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account."}, "campaign_end_time": {"type": "timestamp without time zone", "index": 20, "name": "campaign_end_time", "comment": "Timestamp when the campaign ended or is scheduled to end."}, "is_campaign_budget_optimization": {"type": "boolean", "index": 21, "name": "is_campaign_budget_optimization", "comment": "Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared."}, "is_flexible_daily_budgets": {"type": "boolean", "index": 22, "name": "is_flexible_daily_budgets", "comment": "Determine if a campaign has flexible daily budgets setup."}, "campaign_objective_type": {"type": "text", "index": 23, "name": "campaign_objective_type", "comment": "The primary goal of the campaign (e.g., brand awareness, conversions, video views)."}, "campaign_start_time": {"type": "timestamp without time zone", "index": 24, "name": "campaign_start_time", "comment": "Timestamp when the campaign became active or was scheduled to start."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.pinterest_ads__campaign_country_report"}, "model.pinterest.pinterest_ads__campaign_region_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__campaign_region_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the region and campaign level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The performance date of the record."}, "region_name": {"type": "text", "index": 3, "name": "region_name", "comment": "Name of the targeted region."}, "region_id": {"type": "text", "index": 4, "name": "region_id", "comment": "The ID of the targeted region."}, "campaign_id": {"type": "text", "index": 5, "name": "campaign_id", "comment": "The ID of the related Campaign."}, "country_id": {"type": "text", "index": 6, "name": "country_id", "comment": "The ID of the targeted country."}, "spend": {"type": "numeric", "index": 7, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "clicks": {"type": "double precision", "index": 8, "name": "clicks", "comment": "The number of paid and earned clicks that occurred on the day of the record."}, "impressions": {"type": "double precision", "index": 9, "name": "impressions", "comment": "The number of paid and earned impressions that occurred on the day of the record."}, "total_conversions": {"type": "bigint", "index": 10, "name": "total_conversions", "comment": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "total_conversions_quantity": {"type": "bigint", "index": 11, "name": "total_conversions_quantity", "comment": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "total_conversions_value": {"type": "numeric", "index": 12, "name": "total_conversions_value", "comment": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}, "country_name": {"type": "text", "index": 13, "name": "country_name", "comment": "Name of the targeted country."}, "advertiser_name": {"type": "text", "index": 14, "name": "advertiser_name", "comment": "Name of the advertiser."}, "advertiser_id": {"type": "text", "index": 15, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "campaign_name": {"type": "text", "index": 16, "name": "campaign_name", "comment": "The name of the related Campaign."}, "campaign_status": {"type": "text", "index": 17, "name": "campaign_status", "comment": "Status of the campaign."}, "budget_spend_cap": {"type": "integer", "index": 18, "name": "budget_spend_cap", "comment": "Maximum amount allowed to be spent over a specified budget period for the campaign."}, "lifetime_spend_cap": {"type": "integer", "index": 19, "name": "lifetime_spend_cap", "comment": "Total maximum spend allowed across the entire lifespan of the campaign."}, "campaign_created_at": {"type": "text", "index": 20, "name": "campaign_created_at", "comment": "Campaign creation time."}, "default_ad_group_budget_in_micro_currency": {"type": "integer", "index": 21, "name": "default_ad_group_budget_in_micro_currency", "comment": "When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account."}, "campaign_end_time": {"type": "timestamp without time zone", "index": 22, "name": "campaign_end_time", "comment": "Timestamp when the campaign ended or is scheduled to end."}, "is_campaign_budget_optimization": {"type": "boolean", "index": 23, "name": "is_campaign_budget_optimization", "comment": "Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared."}, "is_flexible_daily_budgets": {"type": "boolean", "index": 24, "name": "is_flexible_daily_budgets", "comment": "Determine if a campaign has flexible daily budgets setup."}, "campaign_objective_type": {"type": "text", "index": 25, "name": "campaign_objective_type", "comment": "The primary goal of the campaign (e.g., brand awareness, conversions, video views)."}, "campaign_start_time": {"type": "timestamp without time zone", "index": 26, "name": "campaign_start_time", "comment": "Timestamp when the campaign became active or was scheduled to start."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.pinterest_ads__campaign_region_report"}, "model.pinterest.pinterest_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__campaign_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the advertiser and campaign level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp with time zone", "index": 2, "name": "date_day", "comment": "The performance date of the record."}, "advertiser_name": {"type": "text", "index": 3, "name": "advertiser_name", "comment": "Name of the advertiser."}, "advertiser_id": {"type": "text", "index": 4, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "The name of the related Campaign."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID of the related Campaign."}, "campaign_status": {"type": "text", "index": 7, "name": "campaign_status", "comment": "Status of the campaign."}, "spend": {"type": "numeric", "index": 8, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "clicks": {"type": "bigint", "index": 9, "name": "clicks", "comment": "The number of paid and earned clicks that occurred on the day of the record."}, "impressions": {"type": "bigint", "index": 10, "name": "impressions", "comment": "The number of paid and earned impressions that occurred on the day of the record."}, "total_conversions": {"type": "bigint", "index": 11, "name": "total_conversions", "comment": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "total_conversions_quantity": {"type": "bigint", "index": 12, "name": "total_conversions_quantity", "comment": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "total_conversions_value": {"type": "numeric", "index": 13, "name": "total_conversions_value", "comment": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.pinterest_ads__campaign_report"}, "model.pinterest.pinterest_ads__keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__keyword_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of a keyword at the advertiser, campaign, ad group, and keyword level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp with time zone", "index": 2, "name": "date_day", "comment": "The performance date of the record."}, "advertiser_name": {"type": "text", "index": 3, "name": "advertiser_name", "comment": "Name of the advertiser."}, "advertiser_id": {"type": "text", "index": 4, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "Name of the campaign."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID of the related Campaign."}, "ad_group_name": {"type": "text", "index": 7, "name": "ad_group_name", "comment": "Name of the ad group."}, "ad_group_id": {"type": "text", "index": 8, "name": "ad_group_id", "comment": "The ID of the related Ad group."}, "keyword_id": {"type": "text", "index": 9, "name": "keyword_id", "comment": "Unique identifier of the keyword."}, "match_type": {"type": "text", "index": 10, "name": "match_type", "comment": "Type of match the keyword is tied to. Either Exact or Broad."}, "parent_type": {"type": "text", "index": 11, "name": "parent_type", "comment": "Identifier of what grain the parent type is. Ad group or campaign."}, "keyword_value": {"type": "text", "index": 12, "name": "keyword_value", "comment": "The text value that makes upd the keyword."}, "spend": {"type": "numeric", "index": 13, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "clicks": {"type": "bigint", "index": 14, "name": "clicks", "comment": "The number of paid and earned clicks that occurred on the day of the record."}, "impressions": {"type": "bigint", "index": 15, "name": "impressions", "comment": "The number of paid and earned impressions that occurred on the day of the record."}, "total_conversions": {"type": "bigint", "index": 16, "name": "total_conversions", "comment": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "total_conversions_quantity": {"type": "bigint", "index": 17, "name": "total_conversions_quantity", "comment": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "total_conversions_value": {"type": "numeric", "index": 18, "name": "total_conversions_value", "comment": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.pinterest_ads__keyword_report"}, "model.pinterest.pinterest_ads__pin_promotion_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__pin_promotion_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the advertiser, campaign, ad group, and pin level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp with time zone", "index": 2, "name": "date_day", "comment": "The performance date of the record."}, "advertiser_id": {"type": "text", "index": 3, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "advertiser_name": {"type": "text", "index": 4, "name": "advertiser_name", "comment": "Name of the advertiser."}, "campaign_id": {"type": "text", "index": 5, "name": "campaign_id", "comment": "The ID of the related Campaign."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "Name of the campaign."}, "campaign_status": {"type": "text", "index": 7, "name": "campaign_status", "comment": "Status of the campaign."}, "ad_group_id": {"type": "text", "index": 8, "name": "ad_group_id", "comment": "The ID of the related Ad group."}, "ad_group_name": {"type": "text", "index": 9, "name": "ad_group_name", "comment": "Name of the ad group."}, "ad_group_status": {"type": "text", "index": 10, "name": "ad_group_status", "comment": "Status of the ad group."}, "creative_type": {"type": "text", "index": 11, "name": "creative_type", "comment": "The creative type. \nOne of \"APP\", \"APP_VIDEO\", \"BOARD\", \"CAROUSEL\", \"CINEMATIC\", \"COMMERCE\", \"MAX_VIDEO\", \"NATIVE_VIDEO\", \"REGULAR\", \n\"SEARCH_PROMINENCE\", \"SEARCH_PROMINENCE_CAROUSEL\", \"SHOPPING\", \"SHOP_THE_PIN\", \"THIRD_PARTY\", or \"VIDEO\".\n"}, "pin_promotion_id": {"type": "text", "index": 12, "name": "pin_promotion_id", "comment": "The ID of the related Pin promotion."}, "pin_name": {"type": "text", "index": 13, "name": "pin_name", "comment": "Name of the pin."}, "pin_status": {"type": "text", "index": 14, "name": "pin_status", "comment": "Status of the pin."}, "destination_url": {"type": "text", "index": 15, "name": "destination_url", "comment": "Pin destination URL."}, "base_url": {"type": "text", "index": 16, "name": "base_url", "comment": "The base URL of the ad, extracted from the `destination_url`."}, "spend": {"type": "numeric", "index": 17, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "clicks": {"type": "bigint", "index": 18, "name": "clicks", "comment": "The number of paid and earned clicks that occurred on the day of the record."}, "impressions": {"type": "bigint", "index": 19, "name": "impressions", "comment": "The number of paid and earned impressions that occurred on the day of the record."}, "total_conversions": {"type": "bigint", "index": 20, "name": "total_conversions", "comment": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "total_conversions_quantity": {"type": "bigint", "index": 21, "name": "total_conversions_quantity", "comment": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "total_conversions_value": {"type": "numeric", "index": 22, "name": "total_conversions_value", "comment": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.pinterest_ads__pin_promotion_report"}, "model.pinterest.pinterest_ads__url_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__url_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the advertiser, campaign, ad group, and url level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp with time zone", "index": 2, "name": "date_day", "comment": "The performance date of the record."}, "advertiser_id": {"type": "text", "index": 3, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "advertiser_name": {"type": "text", "index": 4, "name": "advertiser_name", "comment": "Name of the advertiser."}, "campaign_id": {"type": "text", "index": 5, "name": "campaign_id", "comment": "The ID of the related Campaign."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the related Campaign."}, "campaign_status": {"type": "text", "index": 7, "name": "campaign_status", "comment": "Status of the campaign."}, "ad_group_id": {"type": "text", "index": 8, "name": "ad_group_id", "comment": "The ID of the related Ad group."}, "ad_group_name": {"type": "text", "index": 9, "name": "ad_group_name", "comment": "The name of the related Ad group."}, "ad_group_status": {"type": "text", "index": 10, "name": "ad_group_status", "comment": "Status of the ad group."}, "destination_url": {"type": "text", "index": 11, "name": "destination_url", "comment": "Pin destination URL."}, "creative_type": {"type": "text", "index": 12, "name": "creative_type", "comment": "The creative type. \nOne of \"APP\", \"APP_VIDEO\", \"BOARD\", \"CAROUSEL\", \"CINEMATIC\", \"COMMERCE\", \"MAX_VIDEO\", \"NATIVE_VIDEO\", \"REGULAR\", \n\"SEARCH_PROMINENCE\", \"SEARCH_PROMINENCE_CAROUSEL\", \"SHOPPING\", \"SHOP_THE_PIN\", \"THIRD_PARTY\", or \"VIDEO\".\n"}, "pin_promotion_id": {"type": "text", "index": 13, "name": "pin_promotion_id", "comment": "The ID of the related Pin promotion."}, "pin_name": {"type": "text", "index": 14, "name": "pin_name", "comment": "Pin promotion name."}, "pin_status": {"type": "text", "index": 15, "name": "pin_status", "comment": "The status of the Pin promotion. One of \"ACTIVE\", \"ARCHIVED\", \"PAUSED\""}, "base_url": {"type": "text", "index": 16, "name": "base_url", "comment": "The base URL of the ad, extracted from the `destination_url`."}, "url_host": {"type": "text", "index": 17, "name": "url_host", "comment": "The URL host of the ad, extracted from the `destination_url`."}, "url_path": {"type": "text", "index": 18, "name": "url_path", "comment": "The URL path of the ad, extracted from the `destination_url`."}, "utm_source": {"type": "text", "index": 19, "name": "utm_source", "comment": "The utm_source parameter of the ad, extracted from the `destination_url`."}, "utm_medium": {"type": "text", "index": 20, "name": "utm_medium", "comment": "The utm_medium parameter of the ad, extracted from the `destination_url`."}, "utm_campaign": {"type": "text", "index": 21, "name": "utm_campaign", "comment": "The utm_campaign parameter of the ad, extracted from the `destination_url`."}, "utm_content": {"type": "text", "index": 22, "name": "utm_content", "comment": "The utm_content parameter of the ad, extracted from the `destination_url`."}, "utm_term": {"type": "text", "index": 23, "name": "utm_term", "comment": "The utm_term parameter of the ad, extracted from the `destination_url`."}, "spend": {"type": "numeric", "index": 24, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "clicks": {"type": "bigint", "index": 25, "name": "clicks", "comment": "The number of paid and earned clicks that occurred on the day of the record."}, "impressions": {"type": "bigint", "index": 26, "name": "impressions", "comment": "The number of paid and earned impressions that occurred on the day of the record."}, "total_conversions": {"type": "bigint", "index": 27, "name": "total_conversions", "comment": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "total_conversions_quantity": {"type": "bigint", "index": 28, "name": "total_conversions_quantity", "comment": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "total_conversions_value": {"type": "numeric", "index": 29, "name": "total_conversions_value", "comment": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.pinterest_ads__url_report"}, "model.reddit_ads.reddit_ads__account_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "reddit_ads__account_report", "database": "postgres", "comment": "Each record in this table represents the daily number of clicks, impressions, and spend of ads by account, account timezone, attribution type, and currency.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "currency": {"type": "text", "index": 4, "name": "currency", "comment": "The currency this account uses (ISO-4217)"}, "attribution_type": {"type": "text", "index": 5, "name": "attribution_type", "comment": "Attribution type: \"CLICK_THROUGH_CONVERSION\", \"VIEW_THROUGH_CONVERSION\", or \"ALL_CONVERSION\".\nCLICK_THROUGH_CONVERSION: A user clicked on your ad and then completed the conversion action on your site. \nVIEW_THROUGH_CONVERSION: A user saw your ad and did not click it, but did complete the conversion action on your site.\nALL_CONVERSION: Combination of both."}, "time_zone_id": {"type": "text", "index": 6, "name": "time_zone_id", "comment": "The time zone id preference for this account"}, "clicks": {"type": "bigint", "index": 7, "name": "clicks", "comment": "The number of clicks detected for this report period"}, "impressions": {"type": "bigint", "index": 8, "name": "impressions", "comment": "The number of impressions served for this report period"}, "spend": {"type": "numeric", "index": 9, "name": "spend", "comment": "Spend converted out of microcurrency (so Spend/1,000,000)"}, "conversions": {"type": "numeric", "index": 10, "name": "conversions", "comment": "The total click-through conversions attributed, for the given month-long window."}, "view_through_conversions": {"type": "numeric", "index": 11, "name": "view_through_conversions", "comment": "The total view-through conversions attributed, for the given month-long window."}, "total_value": {"type": "double precision", "index": 12, "name": "total_value", "comment": "The total monetary value associated with a conversion event."}, "total_items": {"type": "numeric", "index": 13, "name": "total_items", "comment": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion."}, "lead_conversions": {"type": "numeric", "index": 14, "name": "lead_conversions", "comment": "Total attributed click-through conversions for lead generation events."}, "lead_view_through_conversions": {"type": "numeric", "index": 15, "name": "lead_view_through_conversions", "comment": "Total attributed view-through conversions for lead generation events."}, "lead_value": {"type": "double precision", "index": 16, "name": "lead_value", "comment": "Total monetary value associated with lead generation conversion events."}, "lead_items": {"type": "numeric", "index": 17, "name": "lead_items", "comment": "Total number of items involved in lead generation conversion events."}, "purchase_conversions": {"type": "numeric", "index": 18, "name": "purchase_conversions", "comment": "Total attributed click-through conversions for purchase events."}, "purchase_view_through_conversions": {"type": "numeric", "index": 19, "name": "purchase_view_through_conversions", "comment": "Total attributed view-through conversions for purchase events."}, "purchase_value": {"type": "double precision", "index": 20, "name": "purchase_value", "comment": "Total monetary value associated with purchase conversion events."}, "purchase_items": {"type": "numeric", "index": 21, "name": "purchase_items", "comment": "Total number of items involved in purchase conversion events."}, "custom_conversions": {"type": "numeric", "index": 22, "name": "custom_conversions", "comment": "Total attributed click-through conversions for custom-defined events."}, "custom_view_through_conversions": {"type": "numeric", "index": 23, "name": "custom_view_through_conversions", "comment": "Total attributed view-through conversions for custom-defined events."}, "custom_value": {"type": "double precision", "index": 24, "name": "custom_value", "comment": "Total monetary value associated with custom-defined conversion events."}, "custom_items": {"type": "numeric", "index": 25, "name": "custom_items", "comment": "Total number of items involved in custom-defined conversion events."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.reddit_ads__account_report"}, "model.reddit_ads.reddit_ads__ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "reddit_ads__ad_group_report", "database": "postgres", "comment": "Each record in this table represents the daily number of clicks, impressions, and spend per ad group, along with campaign and account information.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "ad_group_name": {"type": "text", "index": 4, "name": "ad_group_name", "comment": "Name of ad group."}, "ad_group_id": {"type": "character varying(255)", "index": 5, "name": "ad_group_id", "comment": "The ID of the ad group."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "Name of campaign."}, "campaign_id": {"type": "character varying(255)", "index": 7, "name": "campaign_id", "comment": "The ID of the campaign."}, "currency": {"type": "text", "index": 8, "name": "currency", "comment": "The currency this account uses (ISO-4217)"}, "clicks": {"type": "bigint", "index": 9, "name": "clicks", "comment": "The number of clicks detected for this report period"}, "impressions": {"type": "bigint", "index": 10, "name": "impressions", "comment": "The number of impressions served for this report period"}, "spend": {"type": "numeric", "index": 11, "name": "spend", "comment": "Spend converted out of microcurrency (so Spend/1,000,000)"}, "conversions": {"type": "numeric", "index": 12, "name": "conversions", "comment": "The total click-through conversions attributed, for the given month-long window."}, "view_through_conversions": {"type": "numeric", "index": 13, "name": "view_through_conversions", "comment": "The total view-through conversions attributed, for the given month-long window."}, "total_value": {"type": "double precision", "index": 14, "name": "total_value", "comment": "The total monetary value associated with a conversion event."}, "total_items": {"type": "numeric", "index": 15, "name": "total_items", "comment": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion."}, "lead_conversions": {"type": "numeric", "index": 16, "name": "lead_conversions", "comment": "Total attributed click-through conversions for lead generation events."}, "lead_view_through_conversions": {"type": "numeric", "index": 17, "name": "lead_view_through_conversions", "comment": "Total attributed view-through conversions for lead generation events."}, "lead_value": {"type": "double precision", "index": 18, "name": "lead_value", "comment": "Total monetary value associated with lead generation conversion events."}, "lead_items": {"type": "numeric", "index": 19, "name": "lead_items", "comment": "Total number of items involved in lead generation conversion events."}, "purchase_conversions": {"type": "numeric", "index": 20, "name": "purchase_conversions", "comment": "Total attributed click-through conversions for purchase events."}, "purchase_view_through_conversions": {"type": "numeric", "index": 21, "name": "purchase_view_through_conversions", "comment": "Total attributed view-through conversions for purchase events."}, "purchase_value": {"type": "double precision", "index": 22, "name": "purchase_value", "comment": "Total monetary value associated with purchase conversion events."}, "purchase_items": {"type": "numeric", "index": 23, "name": "purchase_items", "comment": "Total number of items involved in purchase conversion events."}, "custom_conversions": {"type": "numeric", "index": 24, "name": "custom_conversions", "comment": "Total attributed click-through conversions for custom-defined events."}, "custom_view_through_conversions": {"type": "numeric", "index": 25, "name": "custom_view_through_conversions", "comment": "Total attributed view-through conversions for custom-defined events."}, "custom_value": {"type": "double precision", "index": 26, "name": "custom_value", "comment": "Total monetary value associated with custom-defined conversion events."}, "custom_items": {"type": "numeric", "index": 27, "name": "custom_items", "comment": "Total number of items involved in custom-defined conversion events."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.reddit_ads__ad_group_report"}, "model.reddit_ads.reddit_ads__ad_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "reddit_ads__ad_report", "database": "postgres", "comment": "Each record in this table represents the daily number of clicks, impressions, and spend per ad, along with account, campaign, ad group, and post information.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "ad_id": {"type": "character varying(255)", "index": 3, "name": "ad_id", "comment": "The ID of the ad."}, "ad_name": {"type": "text", "index": 4, "name": "ad_name", "comment": "Name of ad."}, "account_id": {"type": "character varying(255)", "index": 5, "name": "account_id", "comment": "The ID of the account."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "Name of campaign."}, "campaign_id": {"type": "character varying(255)", "index": 7, "name": "campaign_id", "comment": "The ID of the campaign."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "Name of ad group."}, "ad_group_id": {"type": "character varying(255)", "index": 9, "name": "ad_group_id", "comment": "The ID of the ad group."}, "currency": {"type": "text", "index": 10, "name": "currency", "comment": "The currency this account uses (ISO-4217)"}, "post_id": {"type": "text", "index": 11, "name": "post_id", "comment": "The ID of the post."}, "clicks": {"type": "bigint", "index": 12, "name": "clicks", "comment": "The number of clicks detected for this report period"}, "impressions": {"type": "bigint", "index": 13, "name": "impressions", "comment": "The number of impressions served for this report period"}, "spend": {"type": "numeric", "index": 14, "name": "spend", "comment": "Spend converted out of microcurrency (so Spend/1,000,000)"}, "conversions": {"type": "numeric", "index": 15, "name": "conversions", "comment": "The total click-through conversions attributed, for the given month-long window."}, "view_through_conversions": {"type": "numeric", "index": 16, "name": "view_through_conversions", "comment": "The total view-through conversions attributed, for the given month-long window."}, "total_value": {"type": "double precision", "index": 17, "name": "total_value", "comment": "The total monetary value associated with a conversion event."}, "total_items": {"type": "numeric", "index": 18, "name": "total_items", "comment": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion."}, "lead_conversions": {"type": "numeric", "index": 19, "name": "lead_conversions", "comment": "Total attributed click-through conversions for lead generation events."}, "lead_view_through_conversions": {"type": "numeric", "index": 20, "name": "lead_view_through_conversions", "comment": "Total attributed view-through conversions for lead generation events."}, "lead_value": {"type": "double precision", "index": 21, "name": "lead_value", "comment": "Total monetary value associated with lead generation conversion events."}, "lead_items": {"type": "numeric", "index": 22, "name": "lead_items", "comment": "Total number of items involved in lead generation conversion events."}, "purchase_conversions": {"type": "numeric", "index": 23, "name": "purchase_conversions", "comment": "Total attributed click-through conversions for purchase events."}, "purchase_view_through_conversions": {"type": "numeric", "index": 24, "name": "purchase_view_through_conversions", "comment": "Total attributed view-through conversions for purchase events."}, "purchase_value": {"type": "double precision", "index": 25, "name": "purchase_value", "comment": "Total monetary value associated with purchase conversion events."}, "purchase_items": {"type": "numeric", "index": 26, "name": "purchase_items", "comment": "Total number of items involved in purchase conversion events."}, "custom_conversions": {"type": "numeric", "index": 27, "name": "custom_conversions", "comment": "Total attributed click-through conversions for custom-defined events."}, "custom_view_through_conversions": {"type": "numeric", "index": 28, "name": "custom_view_through_conversions", "comment": "Total attributed view-through conversions for custom-defined events."}, "custom_value": {"type": "double precision", "index": 29, "name": "custom_value", "comment": "Total monetary value associated with custom-defined conversion events."}, "custom_items": {"type": "numeric", "index": 30, "name": "custom_items", "comment": "Total number of items involved in custom-defined conversion events."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.reddit_ads__ad_report"}, "model.reddit_ads.reddit_ads__campaign_country_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "reddit_ads__campaign_country_report", "database": "postgres", "comment": "Each record in this table represents the daily number of clicks, impressions, and spend per campaign and country, along with account information.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "campaign_id": {"type": "character varying(255)", "index": 4, "name": "campaign_id", "comment": "The ID of the campaign."}, "country": {"type": "text", "index": 5, "name": "country", "comment": "The country associated with the record."}, "clicks": {"type": "bigint", "index": 6, "name": "clicks", "comment": "The number of clicks detected for this report period"}, "impressions": {"type": "bigint", "index": 7, "name": "impressions", "comment": "The number of impressions served for this report period"}, "spend": {"type": "numeric", "index": 8, "name": "spend", "comment": "Spend converted out of microcurrency (so Spend/1,000,000)"}, "conversions": {"type": "bigint", "index": 9, "name": "conversions", "comment": "The total click-through conversions attributed, for the given month-long window."}, "view_through_conversions": {"type": "bigint", "index": 10, "name": "view_through_conversions", "comment": "The total view-through conversions attributed, for the given month-long window."}, "total_value": {"type": "bigint", "index": 11, "name": "total_value", "comment": "The total monetary value associated with a conversion event."}, "total_items": {"type": "bigint", "index": 12, "name": "total_items", "comment": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion."}, "lead_conversions": {"type": "bigint", "index": 13, "name": "lead_conversions", "comment": "Total attributed click-through conversions for lead generation events."}, "lead_view_through_conversions": {"type": "bigint", "index": 14, "name": "lead_view_through_conversions", "comment": "Total attributed view-through conversions for lead generation events."}, "lead_value": {"type": "bigint", "index": 15, "name": "lead_value", "comment": "Total monetary value associated with lead generation conversion events."}, "lead_items": {"type": "bigint", "index": 16, "name": "lead_items", "comment": "Total number of items involved in lead generation conversion events."}, "purchase_conversions": {"type": "bigint", "index": 17, "name": "purchase_conversions", "comment": "Total attributed click-through conversions for purchase events."}, "purchase_view_through_conversions": {"type": "bigint", "index": 18, "name": "purchase_view_through_conversions", "comment": "Total attributed view-through conversions for purchase events."}, "purchase_value": {"type": "bigint", "index": 19, "name": "purchase_value", "comment": "Total monetary value associated with purchase conversion events."}, "purchase_items": {"type": "bigint", "index": 20, "name": "purchase_items", "comment": "Total number of items involved in purchase conversion events."}, "custom_conversions": {"type": "bigint", "index": 21, "name": "custom_conversions", "comment": "Total attributed click-through conversions for custom-defined events."}, "custom_view_through_conversions": {"type": "bigint", "index": 22, "name": "custom_view_through_conversions", "comment": "Total attributed view-through conversions for custom-defined events."}, "custom_value": {"type": "bigint", "index": 23, "name": "custom_value", "comment": "Total monetary value associated with custom-defined conversion events."}, "custom_items": {"type": "bigint", "index": 24, "name": "custom_items", "comment": "Total number of items involved in custom-defined conversion events."}, "campaign_name": {"type": "text", "index": 25, "name": "campaign_name", "comment": "Name of campaign."}, "currency": {"type": "text", "index": 26, "name": "currency", "comment": "The currency this account uses (ISO-4217)"}, "effective_status": {"type": "text", "index": 27, "name": "effective_status", "comment": "The current effective status of the ad, reflecting both configured status and any internal processing states that may affect delivery.\n"}, "configured_status": {"type": "text", "index": 28, "name": "configured_status", "comment": "The user-defined status of the ad (e.g., ACTIVE, PAUSED), indicating whether it is intended to be running.\n"}, "is_processing": {"type": "boolean", "index": 29, "name": "is_processing", "comment": "A boolean flag indicating whether the ad is still being processed and not yet ready for delivery.\n"}, "objective": {"type": "text", "index": 30, "name": "objective", "comment": "The advertising goal or objective selected for the campaign, such as CONVERSIONS, TRAFFIC, or BRAND_AWARENESS.\n"}, "funding_instrument_id": {"type": "integer", "index": 31, "name": "funding_instrument_id", "comment": "The ID of the funding instrument (e.g., credit card or line of credit) used to pay for the ad campaign."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.reddit_ads__campaign_country_report"}, "model.reddit_ads.reddit_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "reddit_ads__campaign_report", "database": "postgres", "comment": "Each record in this table represents the daily number of clicks, impressions, and spend per campaign, along with account information.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "campaign_name": {"type": "text", "index": 4, "name": "campaign_name", "comment": "Name of campaign."}, "campaign_id": {"type": "character varying(255)", "index": 5, "name": "campaign_id", "comment": "The ID of the campaign."}, "currency": {"type": "text", "index": 6, "name": "currency", "comment": "The currency this account uses (ISO-4217)"}, "clicks": {"type": "bigint", "index": 7, "name": "clicks", "comment": "The number of clicks detected for this report period"}, "impressions": {"type": "bigint", "index": 8, "name": "impressions", "comment": "The number of impressions served for this report period"}, "spend": {"type": "numeric", "index": 9, "name": "spend", "comment": "Spend converted out of microcurrency (so Spend/1,000,000)"}, "conversions": {"type": "numeric", "index": 10, "name": "conversions", "comment": "The total click-through conversions attributed, for the given month-long window."}, "view_through_conversions": {"type": "numeric", "index": 11, "name": "view_through_conversions", "comment": "The total view-through conversions attributed, for the given month-long window."}, "total_value": {"type": "double precision", "index": 12, "name": "total_value", "comment": "The total monetary value associated with a conversion event."}, "total_items": {"type": "numeric", "index": 13, "name": "total_items", "comment": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion."}, "lead_conversions": {"type": "numeric", "index": 14, "name": "lead_conversions", "comment": "Total attributed click-through conversions for lead generation events."}, "lead_view_through_conversions": {"type": "numeric", "index": 15, "name": "lead_view_through_conversions", "comment": "Total attributed view-through conversions for lead generation events."}, "lead_value": {"type": "double precision", "index": 16, "name": "lead_value", "comment": "Total monetary value associated with lead generation conversion events."}, "lead_items": {"type": "numeric", "index": 17, "name": "lead_items", "comment": "Total number of items involved in lead generation conversion events."}, "purchase_conversions": {"type": "numeric", "index": 18, "name": "purchase_conversions", "comment": "Total attributed click-through conversions for purchase events."}, "purchase_view_through_conversions": {"type": "numeric", "index": 19, "name": "purchase_view_through_conversions", "comment": "Total attributed view-through conversions for purchase events."}, "purchase_value": {"type": "double precision", "index": 20, "name": "purchase_value", "comment": "Total monetary value associated with purchase conversion events."}, "purchase_items": {"type": "numeric", "index": 21, "name": "purchase_items", "comment": "Total number of items involved in purchase conversion events."}, "custom_conversions": {"type": "numeric", "index": 22, "name": "custom_conversions", "comment": "Total attributed click-through conversions for custom-defined events."}, "custom_view_through_conversions": {"type": "numeric", "index": 23, "name": "custom_view_through_conversions", "comment": "Total attributed view-through conversions for custom-defined events."}, "custom_value": {"type": "double precision", "index": 24, "name": "custom_value", "comment": "Total monetary value associated with custom-defined conversion events."}, "custom_items": {"type": "numeric", "index": 25, "name": "custom_items", "comment": "Total number of items involved in custom-defined conversion events."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.reddit_ads__campaign_report"}, "model.reddit_ads.reddit_ads__url_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "reddit_ads__url_report", "database": "postgres", "comment": "Each record in this table represents the daily number of clicks, impressions, and spend per url and utm parameters, along with post,ad, account, campaign, and ad group information.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "ad_name": {"type": "text", "index": 3, "name": "ad_name", "comment": "Name of ad."}, "ad_id": {"type": "character varying(255)", "index": 4, "name": "ad_id", "comment": "The ID of the ad."}, "account_id": {"type": "character varying(255)", "index": 5, "name": "account_id", "comment": "The ID of the account."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "Name of campaign."}, "campaign_id": {"type": "character varying(255)", "index": 7, "name": "campaign_id", "comment": "The ID of the campaign."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "Name of ad group."}, "ad_group_id": {"type": "character varying(255)", "index": 9, "name": "ad_group_id", "comment": "The ID of the ad group."}, "currency": {"type": "text", "index": 10, "name": "currency", "comment": "The currency this account uses (ISO-4217)"}, "post_id": {"type": "text", "index": 11, "name": "post_id", "comment": "The ID of the post."}, "post_url": {"type": "integer", "index": 12, "name": "post_url", "comment": "The URL belonging to the post."}, "click_url": {"type": "text", "index": 13, "name": "click_url", "comment": "The destination url, or the website address, that a visitor goes to when they click on the ad"}, "base_url": {"type": "text", "index": 14, "name": "base_url", "comment": "The base URL of the ad, extracted from the `click_url`."}, "url_host": {"type": "text", "index": 15, "name": "url_host", "comment": "The URL host of the ad, extracted from the `click_url`."}, "url_path": {"type": "text", "index": 16, "name": "url_path", "comment": "The URL path of the ad, extracted from the `click_url`."}, "utm_source": {"type": "text", "index": 17, "name": "utm_source", "comment": "The site that sent traffic to your page. Microsoft Advertising sets this to Bing; extracted from the `click_url`."}, "utm_medium": {"type": "text", "index": 18, "name": "utm_medium", "comment": "Which channel was used. Microsoft Advertising sets this to cp; extracted from the `click_url`."}, "utm_term": {"type": "text", "index": 19, "name": "utm_term", "comment": "Which keyword brought people to your website; extracted from the `click_url`."}, "utm_content": {"type": "text", "index": 20, "name": "utm_content", "comment": "Which ad group the keyword came from; extracted from the `click_url`."}, "utm_campaign": {"type": "text", "index": 21, "name": "utm_campaign", "comment": "Which campaign the keyword came from; extracted from the `click_url`."}, "clicks": {"type": "bigint", "index": 22, "name": "clicks", "comment": "The number of clicks detected for this report period"}, "impressions": {"type": "bigint", "index": 23, "name": "impressions", "comment": "The number of impressions served for this report period"}, "spend": {"type": "numeric", "index": 24, "name": "spend", "comment": "Spend converted out of microcurrency (so Spend/1,000,000)"}, "conversions": {"type": "numeric", "index": 25, "name": "conversions", "comment": "The total click-through conversions attributed, for the given month-long window."}, "view_through_conversions": {"type": "numeric", "index": 26, "name": "view_through_conversions", "comment": "The total view-through conversions attributed, for the given month-long window."}, "total_value": {"type": "double precision", "index": 27, "name": "total_value", "comment": "The total monetary value associated with a conversion event."}, "total_items": {"type": "numeric", "index": 28, "name": "total_items", "comment": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion."}, "lead_conversions": {"type": "numeric", "index": 29, "name": "lead_conversions", "comment": "Total attributed click-through conversions for lead generation events."}, "lead_view_through_conversions": {"type": "numeric", "index": 30, "name": "lead_view_through_conversions", "comment": "Total attributed view-through conversions for lead generation events."}, "lead_value": {"type": "double precision", "index": 31, "name": "lead_value", "comment": "Total monetary value associated with lead generation conversion events."}, "lead_items": {"type": "numeric", "index": 32, "name": "lead_items", "comment": "Total number of items involved in lead generation conversion events."}, "purchase_conversions": {"type": "numeric", "index": 33, "name": "purchase_conversions", "comment": "Total attributed click-through conversions for purchase events."}, "purchase_view_through_conversions": {"type": "numeric", "index": 34, "name": "purchase_view_through_conversions", "comment": "Total attributed view-through conversions for purchase events."}, "purchase_value": {"type": "double precision", "index": 35, "name": "purchase_value", "comment": "Total monetary value associated with purchase conversion events."}, "purchase_items": {"type": "numeric", "index": 36, "name": "purchase_items", "comment": "Total number of items involved in purchase conversion events."}, "custom_conversions": {"type": "numeric", "index": 37, "name": "custom_conversions", "comment": "Total attributed click-through conversions for custom-defined events."}, "custom_view_through_conversions": {"type": "numeric", "index": 38, "name": "custom_view_through_conversions", "comment": "Total attributed view-through conversions for custom-defined events."}, "custom_value": {"type": "double precision", "index": 39, "name": "custom_value", "comment": "Total monetary value associated with custom-defined conversion events."}, "custom_items": {"type": "numeric", "index": 40, "name": "custom_items", "comment": "Total number of items involved in custom-defined conversion events."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.reddit_ads__url_report"}, "model.snapchat_ads.snapchat_ads__account_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__account_report", "database": "postgres", "comment": "Each record represents the daily performance of a Snapchat ad account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "ad_account_id": {"type": "text", "index": 3, "name": "ad_account_id", "comment": "The ID of the account in Snapchat."}, "ad_account_name": {"type": "text", "index": 4, "name": "ad_account_name", "comment": "The name of the account in Snapchat."}, "currency": {"type": "text", "index": 5, "name": "currency", "comment": "The currency used by the account in Snapchat."}, "swipes": {"type": "bigint", "index": 6, "name": "swipes", "comment": "The number of swipes for the account on the given day."}, "impressions": {"type": "bigint", "index": 7, "name": "impressions", "comment": "The number of impressions for the account on the given day."}, "spend": {"type": "numeric", "index": 8, "name": "spend", "comment": "The spend for the account on the given day."}, "total_conversions": {"type": "numeric", "index": 9, "name": "total_conversions", "comment": "The total conversions being brought in the conversion fields you select in your `snapchat_ads__conversion_fields`."}, "conversion_purchases_value": {"type": "numeric", "index": 10, "name": "conversion_purchases_value", "comment": "The total value of purchases for the account on the given day."}, "conversion_purchases": {"type": "numeric", "index": 11, "name": "conversion_purchases", "comment": "The total number of purchases for the account on the given day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.snapchat_ads__account_report"}, "model.snapchat_ads.snapchat_ads__ad_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__ad_report", "database": "postgres", "comment": "Each record represents the daily performance of a Snapchat ad account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "ad_account_id": {"type": "text", "index": 3, "name": "ad_account_id", "comment": "The ID of the account in Snapchat."}, "ad_account_name": {"type": "text", "index": 4, "name": "ad_account_name", "comment": "The name of the account in Snapchat."}, "ad_id": {"type": "text", "index": 5, "name": "ad_id", "comment": "The ID of the ad in Snapchat."}, "ad_name": {"type": "text", "index": 6, "name": "ad_name", "comment": "The name of the ad in Snapchat."}, "ad_squad_id": {"type": "text", "index": 7, "name": "ad_squad_id", "comment": "The ID of the ad squad in Snapchat."}, "ad_squad_name": {"type": "text", "index": 8, "name": "ad_squad_name", "comment": "The name of the ad squad in Snapchat."}, "campaign_id": {"type": "text", "index": 9, "name": "campaign_id", "comment": "The ID of the campaign in Snapchat."}, "campaign_name": {"type": "text", "index": 10, "name": "campaign_name", "comment": "The name of the campaign in Snapchat."}, "currency": {"type": "text", "index": 11, "name": "currency", "comment": "The currency used by the account in Snapchat."}, "swipes": {"type": "bigint", "index": 12, "name": "swipes", "comment": "The number of swipes the ad had on the given day."}, "impressions": {"type": "bigint", "index": 13, "name": "impressions", "comment": "The number of impressions the ad had on the given day."}, "spend": {"type": "numeric", "index": 14, "name": "spend", "comment": "The spend on the ad in the given day."}, "total_conversions": {"type": "numeric", "index": 15, "name": "total_conversions", "comment": "The total conversions being brought in the conversion fields you select in your `snapchat_ads__conversion_fields`."}, "conversion_purchases_value": {"type": "numeric", "index": 16, "name": "conversion_purchases_value", "comment": "The total value of purchases for an ad on the given day."}, "conversion_purchases": {"type": "numeric", "index": 17, "name": "conversion_purchases", "comment": "The total number of purchases for an ad on the given day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.snapchat_ads__ad_report"}, "model.snapchat_ads.snapchat_ads__ad_squad_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__ad_squad_report", "database": "postgres", "comment": "Each record represents the daily performance of a Snapchat ad squad.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "ad_account_id": {"type": "text", "index": 3, "name": "ad_account_id", "comment": "The ID of the account in Snapchat."}, "ad_account_name": {"type": "text", "index": 4, "name": "ad_account_name", "comment": "The name of the account in Snapchat."}, "campaign_id": {"type": "text", "index": 5, "name": "campaign_id", "comment": "The ID of the campaign in Snapchat."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the campaign in Snapchat."}, "ad_squad_id": {"type": "text", "index": 7, "name": "ad_squad_id", "comment": "The ID of the ad squad in Snapchat."}, "ad_squad_name": {"type": "text", "index": 8, "name": "ad_squad_name", "comment": "The name of the ad squad in Snapchat."}, "currency": {"type": "text", "index": 9, "name": "currency", "comment": "The currency used by the account in Snapchat."}, "swipes": {"type": "bigint", "index": 10, "name": "swipes", "comment": "The number of swipes the ad squad had on the given day."}, "impressions": {"type": "bigint", "index": 11, "name": "impressions", "comment": "The number of impressions the ad squad had on the given day."}, "spend": {"type": "numeric", "index": 12, "name": "spend", "comment": "The spend on the ad squad in the given day."}, "total_conversions": {"type": "numeric", "index": 13, "name": "total_conversions", "comment": "The total conversions being brought in the conversion fields you select in your `snapchat_ads__conversion_fields`."}, "conversion_purchases_value": {"type": "numeric", "index": 14, "name": "conversion_purchases_value", "comment": "The total value of purchases for an ad squad on the given day."}, "conversion_purchases": {"type": "numeric", "index": 15, "name": "conversion_purchases", "comment": "The total number of purchases for an ad squad on the given day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.snapchat_ads__ad_squad_report"}, "model.snapchat_ads.snapchat_ads__campaign_country_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__campaign_country_report", "database": "postgres", "comment": "Each record represents the daily performance of a Snapchat campaign per country.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the report."}, "campaign_id": {"type": "text", "index": 3, "name": "campaign_id", "comment": "The ID of the campaign in Snapchat."}, "campaign_name": {"type": "text", "index": 4, "name": "campaign_name", "comment": "The name of the campaign in Snapchat."}, "country": {"type": "text", "index": 5, "name": "country", "comment": "The country where the campaign was delivered."}, "ad_account_id": {"type": "text", "index": 6, "name": "ad_account_id", "comment": "The ID of the account in Snapchat."}, "ad_account_name": {"type": "text", "index": 7, "name": "ad_account_name", "comment": "The name of the account in Snapchat."}, "created_at": {"type": "timestamp without time zone", "index": 8, "name": "created_at", "comment": "Timestamp of when the campaign was created."}, "campaign_daily_budget": {"type": "numeric", "index": 9, "name": "campaign_daily_budget", "comment": "Daily spend cap for the campaign (converted from microcurrency)."}, "start_time": {"type": "timestamp without time zone", "index": 10, "name": "start_time", "comment": "The start time of the campaign."}, "end_time": {"type": "timestamp without time zone", "index": 11, "name": "end_time", "comment": "The end time of the campaign."}, "status": {"type": "text", "index": 12, "name": "status", "comment": "Campaign status (e.g., ACTIVE, PAUSED, ARCHIVED)."}, "objective": {"type": "text", "index": 13, "name": "objective", "comment": "The objective of the campaign (e.g., BRAND_AWARENESS, APP_INSTALL, etc.)."}, "campaign_lifetime_spend_cap": {"type": "numeric", "index": 14, "name": "campaign_lifetime_spend_cap", "comment": "Lifetime spend cap for the campaign (converted from microcurrency)."}, "currency": {"type": "text", "index": 15, "name": "currency", "comment": "The currency used by the account in Snapchat."}, "swipes": {"type": "bigint", "index": 16, "name": "swipes", "comment": "The number of swipes the campaign had on the given day."}, "impressions": {"type": "bigint", "index": 17, "name": "impressions", "comment": "The number of impressions the campaign had on the given day."}, "spend": {"type": "numeric", "index": 18, "name": "spend", "comment": "The spend on the campaign in the given day."}, "shares": {"type": "bigint", "index": 19, "name": "shares", "comment": "Number of times components of the campaign were shared."}, "saves": {"type": "bigint", "index": 20, "name": "saves", "comment": "Number of times components of the campaign were saved to Memories."}, "total_conversions": {"type": "numeric", "index": 21, "name": "total_conversions", "comment": "The total conversions being brought in the conversion fields you select in your `snapchat_ads__conversion_fields`."}, "conversion_purchases_value": {"type": "numeric", "index": 22, "name": "conversion_purchases_value", "comment": "The total value of purchases for the campaign on the given day."}, "conversion_purchases": {"type": "numeric", "index": 23, "name": "conversion_purchases", "comment": "The total number of purchases for the campaign on the given day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.snapchat_ads__campaign_country_report"}, "model.snapchat_ads.snapchat_ads__campaign_region_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__campaign_region_report", "database": "postgres", "comment": "Each record represents the daily performance of a Snapchat campaign per region.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the report."}, "campaign_id": {"type": "text", "index": 3, "name": "campaign_id", "comment": "The ID of the campaign in Snapchat."}, "campaign_name": {"type": "text", "index": 4, "name": "campaign_name", "comment": "The name of the campaign in Snapchat."}, "region": {"type": "text", "index": 5, "name": "region", "comment": "The region where the campaign was delivered."}, "ad_account_id": {"type": "text", "index": 6, "name": "ad_account_id", "comment": "The ID of the account in Snapchat."}, "ad_account_name": {"type": "text", "index": 7, "name": "ad_account_name", "comment": "The name of the account in Snapchat."}, "created_at": {"type": "timestamp without time zone", "index": 8, "name": "created_at", "comment": "Timestamp of when the campaign was created."}, "campaign_daily_budget": {"type": "numeric", "index": 9, "name": "campaign_daily_budget", "comment": "Daily spend cap for the campaign (converted from microcurrency)."}, "start_time": {"type": "timestamp without time zone", "index": 10, "name": "start_time", "comment": "The start time of the campaign."}, "end_time": {"type": "timestamp without time zone", "index": 11, "name": "end_time", "comment": "The end time of the campaign."}, "status": {"type": "text", "index": 12, "name": "status", "comment": "Campaign status (e.g., ACTIVE, PAUSED, ARCHIVED)."}, "objective": {"type": "text", "index": 13, "name": "objective", "comment": "The objective of the campaign (e.g., BRAND_AWARENESS, APP_INSTALL, etc.)."}, "campaign_lifetime_spend_cap": {"type": "numeric", "index": 14, "name": "campaign_lifetime_spend_cap", "comment": "Lifetime spend cap for the campaign (converted from microcurrency)."}, "currency": {"type": "text", "index": 15, "name": "currency", "comment": "The currency used by the account in Snapchat."}, "swipes": {"type": "bigint", "index": 16, "name": "swipes", "comment": "The number of swipes the campaign had on the given day."}, "impressions": {"type": "bigint", "index": 17, "name": "impressions", "comment": "The number of impressions the campaign had on the given day."}, "spend": {"type": "numeric", "index": 18, "name": "spend", "comment": "The spend on the campaign in the given day."}, "shares": {"type": "bigint", "index": 19, "name": "shares", "comment": "Number of times components of the campaign were shared."}, "saves": {"type": "bigint", "index": 20, "name": "saves", "comment": "Number of times components of the campaign were saved to Memories."}, "total_conversions": {"type": "numeric", "index": 21, "name": "total_conversions", "comment": "The total conversions being brought in the conversion fields you select in your `snapchat_ads__conversion_fields`."}, "conversion_purchases_value": {"type": "numeric", "index": 22, "name": "conversion_purchases_value", "comment": "The total value of purchases for the campaign on the given day."}, "conversion_purchases": {"type": "numeric", "index": 23, "name": "conversion_purchases", "comment": "The total number of purchases for the campaign on the given day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.snapchat_ads__campaign_region_report"}, "model.snapchat_ads.snapchat_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__campaign_report", "database": "postgres", "comment": "Each record represents the daily performance of a Snapchat campaign.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "ad_account_id": {"type": "text", "index": 3, "name": "ad_account_id", "comment": "The ID of the account in Snapchat."}, "ad_account_name": {"type": "text", "index": 4, "name": "ad_account_name", "comment": "The name of the account in Snapchat."}, "campaign_id": {"type": "text", "index": 5, "name": "campaign_id", "comment": "The ID of the campaign in Snapchat."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the campaign in Snapchat."}, "currency": {"type": "text", "index": 7, "name": "currency", "comment": "The currency used by the account in Snapchat."}, "swipes": {"type": "bigint", "index": 8, "name": "swipes", "comment": "The number of swipes the campaign had on the given day."}, "impressions": {"type": "bigint", "index": 9, "name": "impressions", "comment": "The number of impressions the campaign had on the given day."}, "spend": {"type": "numeric", "index": 10, "name": "spend", "comment": "The spend on the campaign in the given day."}, "total_conversions": {"type": "numeric", "index": 11, "name": "total_conversions", "comment": "The total conversions being brought in the conversion fields you select in your `snapchat_ads__conversion_fields`."}, "conversion_purchases_value": {"type": "numeric", "index": 12, "name": "conversion_purchases_value", "comment": "The total value of purchases for campaign on the given day."}, "conversion_purchases": {"type": "numeric", "index": 13, "name": "conversion_purchases", "comment": "The total number of purchases for the campaign on the given day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.snapchat_ads__campaign_report"}, "model.snapchat_ads.snapchat_ads__url_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__url_report", "database": "postgres", "comment": "Each record represents the daily performance of Snapchat ads that leverage urls.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the report."}, "ad_account_id": {"type": "text", "index": 3, "name": "ad_account_id", "comment": "The ID of the account in Snapchat."}, "ad_account_name": {"type": "text", "index": 4, "name": "ad_account_name", "comment": "The name of the account in Snapchat."}, "ad_id": {"type": "text", "index": 5, "name": "ad_id", "comment": "The ID of the ad in Snapchat."}, "ad_name": {"type": "text", "index": 6, "name": "ad_name", "comment": "The name of the ad in Snapchat."}, "ad_squad_id": {"type": "text", "index": 7, "name": "ad_squad_id", "comment": "The ID of the ad squad in Snapchat."}, "ad_squad_name": {"type": "text", "index": 8, "name": "ad_squad_name", "comment": "The name of the ad squad in Snapchat."}, "campaign_id": {"type": "text", "index": 9, "name": "campaign_id", "comment": "The ID of the campaign in Snapchat."}, "campaign_name": {"type": "text", "index": 10, "name": "campaign_name", "comment": "The name of the campaign in Snapchat."}, "currency": {"type": "text", "index": 11, "name": "currency", "comment": "The currency used by the account in Snapchat."}, "base_url": {"type": "text", "index": 12, "name": "base_url", "comment": "The base URL of the ad, extracted from the web_view_url."}, "url_host": {"type": "text", "index": 13, "name": "url_host", "comment": "The URL host of the ad, extracted from the web_view_url."}, "url_path": {"type": "text", "index": 14, "name": "url_path", "comment": "The URL path of the ad, extracted from the web_view_url."}, "utm_source": {"type": "text", "index": 15, "name": "utm_source", "comment": "The utm_source parameter of the ad, extracted from the web_view_url."}, "utm_medium": {"type": "text", "index": 16, "name": "utm_medium", "comment": "The utm_medium parameter of the ad, extracted from the web_view_url."}, "utm_campaign": {"type": "text", "index": 17, "name": "utm_campaign", "comment": "The utm_campaign parameter of the ad, extracted from the web_view_url."}, "utm_content": {"type": "text", "index": 18, "name": "utm_content", "comment": "The utm_content parameter of the ad, extracted from the web_view_url."}, "utm_term": {"type": "text", "index": 19, "name": "utm_term", "comment": "The utm_term parameter of the ad, extracted from the web_view_url."}, "swipes": {"type": "bigint", "index": 20, "name": "swipes", "comment": "The number of swipes the ad had on the given day."}, "impressions": {"type": "bigint", "index": 21, "name": "impressions", "comment": "The number of impressions the ad had on the given day."}, "spend": {"type": "numeric", "index": 22, "name": "spend", "comment": "The spend on the ad in the given day."}, "total_conversions": {"type": "numeric", "index": 23, "name": "total_conversions", "comment": "The total conversions being brought in the conversion fields you select in your `snapchat_ads__conversion_fields`."}, "conversion_purchases_value": {"type": "numeric", "index": 24, "name": "conversion_purchases_value", "comment": "The total value of purchases for an ad on the given day."}, "conversion_purchases": {"type": "numeric", "index": 25, "name": "conversion_purchases", "comment": "The total number of purchases for an ad on the given day."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.snapchat_ads__url_report"}, "model.amazon_ads.stg_amazon_ads__ad_group_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__ad_group_history", "database": "postgres", "comment": "Each record represents an ad group in Amazon Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_group_id": {"type": "text", "index": 2, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "campaign_id": {"type": "text", "index": 3, "name": "campaign_id", "comment": "The ID of the Campaign."}, "creation_date": {"type": "text", "index": 4, "name": "creation_date", "comment": "The date of creation of the record."}, "default_bid": {"type": "double precision", "index": 5, "name": "default_bid", "comment": "The date of creation of the record."}, "last_updated_date": {"type": "text", "index": 6, "name": "last_updated_date", "comment": "Date of last update to record."}, "ad_group_name": {"type": "text", "index": 7, "name": "ad_group_name", "comment": "The name of the AdGroup."}, "serving_status": {"type": "text", "index": 8, "name": "serving_status", "comment": "The current serving status of the record."}, "state": {"type": "text", "index": 9, "name": "state", "comment": "The state of the record (enabled, paused, or archived)."}, "is_most_recent_record": {"type": "boolean", "index": 10, "name": "is_most_recent_record", "comment": "Boolean indicating whether record was the most recent instance."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__ad_group_history"}, "model.amazon_ads.stg_amazon_ads__ad_group_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__ad_group_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "creation_date": {"type": "text", "index": 5, "name": "creation_date", "comment": null}, "default_bid": {"type": "double precision", "index": 6, "name": "default_bid", "comment": null}, "name": {"type": "text", "index": 7, "name": "name", "comment": null}, "serving_status": {"type": "text", "index": 8, "name": "serving_status", "comment": null}, "state": {"type": "text", "index": 9, "name": "state", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__ad_group_history_tmp"}, "model.amazon_ads.stg_amazon_ads__ad_group_level_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__ad_group_level_report", "database": "postgres", "comment": "Each record in this table represents the daily performance by Amazon ad group.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_group_id": {"type": "text", "index": 2, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "campaign_bidding_strategy": {"type": "text", "index": 3, "name": "campaign_bidding_strategy", "comment": "The bidding strategy associated with a campaign."}, "clicks": {"type": "integer", "index": 4, "name": "clicks", "comment": "Total number of ad clicks."}, "cost": {"type": "double precision", "index": 5, "name": "cost", "comment": "Total cost of ad clicks."}, "date_day": {"type": "date", "index": 6, "name": "date_day", "comment": "The date of the report."}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": "Total number of ad impressions."}, "purchases_30_d": {"type": "integer", "index": 8, "name": "purchases_30_d", "comment": "Number of attributed conversion events occurring within 30 days of an ad click."}, "sales_30_d": {"type": "double precision", "index": 9, "name": "sales_30_d", "comment": "Total value of sales occurring within 30 days of an ad click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__ad_group_level_report"}, "model.amazon_ads.stg_amazon_ads__ad_group_level_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__ad_group_level_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "campaign_bidding_strategy": {"type": "text", "index": 4, "name": "campaign_bidding_strategy", "comment": null}, "clicks": {"type": "integer", "index": 5, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 6, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__ad_group_level_report_tmp"}, "model.amazon_ads.stg_amazon_ads__advertised_product_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__advertised_product_report", "database": "postgres", "comment": "Advertised product reports contain performance data for products that are advertised as part of your campaigns.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_id": {"type": "text", "index": 2, "name": "ad_id", "comment": "The ID of the AdGroup."}, "ad_group_id": {"type": "text", "index": 3, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "advertised_asin": {"type": "integer", "index": 4, "name": "advertised_asin", "comment": "The ASIN associated to an advertised product."}, "advertised_sku": {"type": "integer", "index": 5, "name": "advertised_sku", "comment": "The SKU being advertised."}, "campaign_budget_amount": {"type": "double precision", "index": 6, "name": "campaign_budget_amount", "comment": "Total budget allocated to the campaign."}, "campaign_budget_currency_code": {"type": "text", "index": 7, "name": "campaign_budget_currency_code", "comment": "The currency code associated with the campaign."}, "campaign_budget_type": {"type": "text", "index": 8, "name": "campaign_budget_type", "comment": "One of: daily or lifetime."}, "campaign_id": {"type": "text", "index": 9, "name": "campaign_id", "comment": "The ID of the Campaign."}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": "Total number of ad clicks."}, "cost": {"type": "double precision", "index": 11, "name": "cost", "comment": "Total cost of ad clicks."}, "date_day": {"type": "date", "index": 12, "name": "date_day", "comment": "The date of the report."}, "impressions": {"type": "integer", "index": 13, "name": "impressions", "comment": "Total number of ad impressions."}, "purchases_30_d": {"type": "integer", "index": 14, "name": "purchases_30_d", "comment": "Number of attributed conversion events occurring within 30 days of an ad click."}, "sales_30_d": {"type": "double precision", "index": 15, "name": "sales_30_d", "comment": "Total value of sales occurring within 30 days of an ad click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__advertised_product_report"}, "model.amazon_ads.stg_amazon_ads__advertised_product_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__advertised_product_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "integer", "index": 2, "name": "ad_id", "comment": null}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 4, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "campaign_budget_amount": {"type": "double precision", "index": 6, "name": "campaign_budget_amount", "comment": null}, "campaign_budget_currency_code": {"type": "text", "index": 7, "name": "campaign_budget_currency_code", "comment": null}, "campaign_budget_type": {"type": "text", "index": 8, "name": "campaign_budget_type", "comment": null}, "clicks": {"type": "integer", "index": 9, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 10, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 11, "name": "impressions", "comment": null}, "advertised_asin": {"type": "integer", "index": 12, "name": "advertised_asin", "comment": null}, "advertised_sku": {"type": "integer", "index": 13, "name": "advertised_sku", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__advertised_product_report_tmp"}, "model.amazon_ads.stg_amazon_ads__campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__campaign_history", "database": "postgres", "comment": "Each record represents a campaign in Amazon Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_id": {"type": "text", "index": 2, "name": "campaign_id", "comment": "The ID of the Campaign."}, "last_updated_date": {"type": "text", "index": 3, "name": "last_updated_date", "comment": "Date of last update to record."}, "bidding_strategy": {"type": "text", "index": 4, "name": "bidding_strategy", "comment": "The bidding strategy associated with a campaign (legacyForSales, autoForSales, or manual.)"}, "creation_date": {"type": "text", "index": 5, "name": "creation_date", "comment": "The date of creation of the record."}, "end_date": {"type": "integer", "index": 6, "name": "end_date", "comment": "The end date of the campaign."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the Campaign."}, "portfolio_id": {"type": "text", "index": 8, "name": "portfolio_id", "comment": "The ID of the Portfolio."}, "profile_id": {"type": "text", "index": 9, "name": "profile_id", "comment": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace."}, "serving_status": {"type": "text", "index": 10, "name": "serving_status", "comment": "The current serving status of the record."}, "start_date": {"type": "date", "index": 11, "name": "start_date", "comment": "The start date of the campaign."}, "state": {"type": "text", "index": 12, "name": "state", "comment": "The state of the record (enabled, paused, or archived)."}, "targeting_type": {"type": "text", "index": 13, "name": "targeting_type", "comment": "The type of targeting used for the campaign, either manual or auto."}, "budget": {"type": "integer", "index": 14, "name": "budget", "comment": "The budget for the campaign."}, "budget_type": {"type": "text", "index": 15, "name": "budget_type", "comment": "One of: daily or lifetime."}, "effective_budget": {"type": "integer", "index": 16, "name": "effective_budget", "comment": "Adjusted budget for the campaign that has been impacted by a budget rule."}, "is_most_recent_record": {"type": "boolean", "index": 17, "name": "is_most_recent_record", "comment": "Boolean indicating whether record was the most recent instance."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__campaign_history"}, "model.amazon_ads.stg_amazon_ads__campaign_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__campaign_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "bidding_strategy": {"type": "text", "index": 4, "name": "bidding_strategy", "comment": null}, "creation_date": {"type": "text", "index": 5, "name": "creation_date", "comment": null}, "budget": {"type": "integer", "index": 6, "name": "budget", "comment": null}, "end_date": {"type": "integer", "index": 7, "name": "end_date", "comment": null}, "name": {"type": "text", "index": 8, "name": "name", "comment": null}, "portfolio_id": {"type": "integer", "index": 9, "name": "portfolio_id", "comment": null}, "profile_id": {"type": "integer", "index": 10, "name": "profile_id", "comment": null}, "serving_status": {"type": "text", "index": 11, "name": "serving_status", "comment": null}, "start_date": {"type": "date", "index": 12, "name": "start_date", "comment": null}, "state": {"type": "text", "index": 13, "name": "state", "comment": null}, "targeting_type": {"type": "text", "index": 14, "name": "targeting_type", "comment": null}, "budget_type": {"type": "text", "index": 15, "name": "budget_type", "comment": null}, "effective_budget": {"type": "integer", "index": 16, "name": "effective_budget", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__campaign_history_tmp"}, "model.amazon_ads.stg_amazon_ads__campaign_level_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__campaign_level_report", "database": "postgres", "comment": "Campaign reports contain performance data broken down at the campaign level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_applicable_budget_rule_id": {"type": "integer", "index": 2, "name": "campaign_applicable_budget_rule_id", "comment": "The ID associated to the active budget rule for a campaign."}, "campaign_applicable_budget_rule_name": {"type": "integer", "index": 3, "name": "campaign_applicable_budget_rule_name", "comment": "The name associated to the active budget rule for a campaign."}, "campaign_bidding_strategy": {"type": "text", "index": 4, "name": "campaign_bidding_strategy", "comment": "The bidding strategy associated with a campaign."}, "campaign_budget_amount": {"type": "double precision", "index": 5, "name": "campaign_budget_amount", "comment": "Total budget allocated to the campaign."}, "campaign_budget_currency_code": {"type": "text", "index": 6, "name": "campaign_budget_currency_code", "comment": "The currency code associated with the campaign."}, "campaign_budget_type": {"type": "text", "index": 7, "name": "campaign_budget_type", "comment": "One of: daily or lifetime."}, "campaign_id": {"type": "text", "index": 8, "name": "campaign_id", "comment": "The ID of the Campaign."}, "campaign_rule_based_budget_amount": {"type": "integer", "index": 9, "name": "campaign_rule_based_budget_amount", "comment": "The value of the rule-based budget for a campaign."}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": "Total number of ad clicks."}, "cost": {"type": "double precision", "index": 11, "name": "cost", "comment": "Total cost of ad clicks."}, "date_day": {"type": "date", "index": 12, "name": "date_day", "comment": "The date of the report."}, "impressions": {"type": "integer", "index": 13, "name": "impressions", "comment": "Total number of ad impressions."}, "purchases_30_d": {"type": "integer", "index": 14, "name": "purchases_30_d", "comment": "Number of attributed conversion events occurring within 30 days of an ad click."}, "sales_30_d": {"type": "integer", "index": 15, "name": "sales_30_d", "comment": "Total value of sales occurring within 30 days of an ad click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__campaign_level_report"}, "model.amazon_ads.stg_amazon_ads__campaign_level_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__campaign_level_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "campaign_applicable_budget_rule_id": {"type": "integer", "index": 4, "name": "campaign_applicable_budget_rule_id", "comment": null}, "campaign_applicable_budget_rule_name": {"type": "integer", "index": 5, "name": "campaign_applicable_budget_rule_name", "comment": null}, "campaign_bidding_strategy": {"type": "text", "index": 6, "name": "campaign_bidding_strategy", "comment": null}, "campaign_budget_amount": {"type": "double precision", "index": 7, "name": "campaign_budget_amount", "comment": null}, "campaign_budget_currency_code": {"type": "text", "index": 8, "name": "campaign_budget_currency_code", "comment": null}, "campaign_budget_type": {"type": "text", "index": 9, "name": "campaign_budget_type", "comment": null}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 11, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 12, "name": "impressions", "comment": null}, "campaign_rule_based_budget_amount": {"type": "integer", "index": 13, "name": "campaign_rule_based_budget_amount", "comment": null}, "sales_7_d": {"type": "integer", "index": 14, "name": "sales_7_d", "comment": null}, "purchases_30_d": {"type": "integer", "index": 15, "name": "purchases_30_d", "comment": null}, "sales_30_d": {"type": "integer", "index": 16, "name": "sales_30_d", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__campaign_level_report_tmp"}, "model.amazon_ads.stg_amazon_ads__keyword_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__keyword_history", "database": "postgres", "comment": "Each record represents a keyword in Amazon Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "keyword_id": {"type": "text", "index": 2, "name": "keyword_id", "comment": "The ID of the keyword."}, "ad_group_id": {"type": "text", "index": 3, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "bid": {"type": "double precision", "index": 4, "name": "bid", "comment": "Bid associated with this keyword."}, "campaign_id": {"type": "text", "index": 5, "name": "campaign_id", "comment": "The ID of the Campaign."}, "creation_date": {"type": "text", "index": 6, "name": "creation_date", "comment": "The date of creation of the record."}, "keyword_text": {"type": "text", "index": 7, "name": "keyword_text", "comment": "The exact text for the keyword."}, "last_updated_date": {"type": "text", "index": 8, "name": "last_updated_date", "comment": "Date of last update to record."}, "match_type": {"type": "text", "index": 9, "name": "match_type", "comment": "One of (broad, exact, or phrase.)"}, "native_language_keyword": {"type": "integer", "index": 10, "name": "native_language_keyword", "comment": "The unlocalized keyword text in the preferred locale of the advertiser."}, "serving_status": {"type": "text", "index": 11, "name": "serving_status", "comment": "The current serving status of the record."}, "state": {"type": "text", "index": 12, "name": "state", "comment": "The state of the record (enabled, paused, or archived)."}, "native_language_locale": {"type": "integer", "index": 13, "name": "native_language_locale", "comment": "The preferred language locale of the advertiser."}, "is_most_recent_record": {"type": "boolean", "index": 14, "name": "is_most_recent_record", "comment": "Boolean indicating whether record was the most recent instance."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__keyword_history"}, "model.amazon_ads.stg_amazon_ads__keyword_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__keyword_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "ad_group_id": {"type": "integer", "index": 4, "name": "ad_group_id", "comment": null}, "bid": {"type": "double precision", "index": 5, "name": "bid", "comment": null}, "campaign_id": {"type": "integer", "index": 6, "name": "campaign_id", "comment": null}, "creation_date": {"type": "text", "index": 7, "name": "creation_date", "comment": null}, "keyword_text": {"type": "text", "index": 8, "name": "keyword_text", "comment": null}, "match_type": {"type": "text", "index": 9, "name": "match_type", "comment": null}, "native_language_keyword": {"type": "integer", "index": 10, "name": "native_language_keyword", "comment": null}, "serving_status": {"type": "text", "index": 11, "name": "serving_status", "comment": null}, "state": {"type": "text", "index": 12, "name": "state", "comment": null}, "native_language_locale": {"type": "integer", "index": 13, "name": "native_language_locale", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__keyword_history_tmp"}, "model.amazon_ads.stg_amazon_ads__portfolio_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__portfolio_history", "database": "postgres", "comment": "Each record represents a portfolio in Amazon Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "portfolio_id": {"type": "text", "index": 2, "name": "portfolio_id", "comment": "The ID of the Portfolio."}, "budget_amount": {"type": "integer", "index": 3, "name": "budget_amount", "comment": "The budget amount associated with the portfolio. Cannot be null."}, "budget_currency_code": {"type": "integer", "index": 4, "name": "budget_currency_code", "comment": "The currency used for all monetary values for entities under this profile. Cannot be null."}, "budget_end_date": {"type": "integer", "index": 5, "name": "budget_end_date", "comment": "The end date after which the budget is no longer applied. Optional if policy is set to dateRange or monthlyRecurring."}, "budget_policy": {"type": "integer", "index": 6, "name": "budget_policy", "comment": "The budget policy. Set to dateRange to specify a budget for a specific period of time. Set to monthlyRecurring to specify a budget that is automatically renewed at the beginning of each month. Cannot be null."}, "budget_start_date": {"type": "integer", "index": 7, "name": "budget_start_date", "comment": "The starting date in YYYYMMDD format to which the budget is applied. Required if policy is set to dateRange. Not specified if policy is set to monthlyRecurring. Note that the starting date for monthlyRecurring is the date when the policy is set."}, "creation_date": {"type": "text", "index": 8, "name": "creation_date", "comment": "The date of creation of the record."}, "in_budget": {"type": "boolean", "index": 9, "name": "in_budget", "comment": "Indicates the current budget status of the portfolio. Set to true if the portfolio is in budget, set to false if the portfolio is out of budget."}, "last_updated_date": {"type": "text", "index": 10, "name": "last_updated_date", "comment": "Date of last update to record."}, "portfolio_name": {"type": "text", "index": 11, "name": "portfolio_name", "comment": "The name of the Portfolio."}, "profile_id": {"type": "text", "index": 12, "name": "profile_id", "comment": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace."}, "serving_status": {"type": "text", "index": 13, "name": "serving_status", "comment": "The current serving status of the record."}, "state": {"type": "text", "index": 14, "name": "state", "comment": "The state of the record (enabled, paused, or archived)."}, "is_most_recent_record": {"type": "boolean", "index": 15, "name": "is_most_recent_record", "comment": "Boolean indicating whether record was the most recent instance."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__portfolio_history"}, "model.amazon_ads.stg_amazon_ads__portfolio_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__portfolio_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "budget_amount": {"type": "integer", "index": 4, "name": "budget_amount", "comment": null}, "budget_currency_code": {"type": "integer", "index": 5, "name": "budget_currency_code", "comment": null}, "budget_end_date": {"type": "integer", "index": 6, "name": "budget_end_date", "comment": null}, "budget_policy": {"type": "integer", "index": 7, "name": "budget_policy", "comment": null}, "budget_start_date": {"type": "integer", "index": 8, "name": "budget_start_date", "comment": null}, "creation_date": {"type": "text", "index": 9, "name": "creation_date", "comment": null}, "in_budget": {"type": "boolean", "index": 10, "name": "in_budget", "comment": null}, "name": {"type": "text", "index": 11, "name": "name", "comment": null}, "profile_id": {"type": "integer", "index": 12, "name": "profile_id", "comment": null}, "serving_status": {"type": "text", "index": 13, "name": "serving_status", "comment": null}, "state": {"type": "text", "index": 14, "name": "state", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__portfolio_history_tmp"}, "model.amazon_ads.stg_amazon_ads__product_ad_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__product_ad_history", "database": "postgres", "comment": "Each record represents a product in Amazon Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_id": {"type": "text", "index": 2, "name": "ad_id", "comment": "The ID of the Ad."}, "ad_group_id": {"type": "text", "index": 3, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "asin": {"type": "text", "index": 4, "name": "asin", "comment": "The ASIN associated with the ad."}, "campaign_id": {"type": "text", "index": 5, "name": "campaign_id", "comment": "The ID of the Campaign."}, "creation_date": {"type": "text", "index": 6, "name": "creation_date", "comment": "The date of creation of the record."}, "last_updated_date": {"type": "text", "index": 7, "name": "last_updated_date", "comment": "Date of last update to record."}, "serving_status": {"type": "text", "index": 8, "name": "serving_status", "comment": "The current serving status of the record."}, "sku": {"type": "integer", "index": 9, "name": "sku", "comment": "The product SKU associated with the ad."}, "state": {"type": "text", "index": 10, "name": "state", "comment": "The state of the record (enabled, paused, or archived)."}, "is_most_recent_record": {"type": "boolean", "index": 11, "name": "is_most_recent_record", "comment": "Boolean indicating whether record was the most recent instance."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__product_ad_history"}, "model.amazon_ads.stg_amazon_ads__product_ad_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__product_ad_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "ad_group_id": {"type": "integer", "index": 4, "name": "ad_group_id", "comment": null}, "asin": {"type": "text", "index": 5, "name": "asin", "comment": null}, "campaign_id": {"type": "integer", "index": 6, "name": "campaign_id", "comment": null}, "creation_date": {"type": "text", "index": 7, "name": "creation_date", "comment": null}, "serving_status": {"type": "text", "index": 8, "name": "serving_status", "comment": null}, "sku": {"type": "integer", "index": 9, "name": "sku", "comment": null}, "state": {"type": "text", "index": 10, "name": "state", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__product_ad_history_tmp"}, "model.amazon_ads.stg_amazon_ads__profile": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__profile", "database": "postgres", "comment": "Each record represents a profile. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "profile_id": {"type": "text", "index": 2, "name": "profile_id", "comment": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace."}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces."}, "account_marketplace_string_id": {"type": "text", "index": 4, "name": "account_marketplace_string_id", "comment": "The identifier of the marketplace to which the account is associated."}, "account_name": {"type": "text", "index": 5, "name": "account_name", "comment": "Account Name. Not currently populated for sellers."}, "account_sub_type": {"type": "integer", "index": 6, "name": "account_sub_type", "comment": "The account subtype."}, "account_type": {"type": "text", "index": 7, "name": "account_type", "comment": "One of seller, vendor, or agency."}, "account_valid_payment_method": {"type": "boolean", "index": 8, "name": "account_valid_payment_method", "comment": "For Vendors, this returns if the Advertiser has set up a valid payment method."}, "country_code": {"type": "text", "index": 9, "name": "country_code", "comment": "The code for a given country."}, "currency_code": {"type": "text", "index": 10, "name": "currency_code", "comment": "The currency used for all monetary values for entities under this profile."}, "daily_budget": {"type": "integer", "index": 11, "name": "daily_budget", "comment": "Daily budget for Sponsored Product campaigns for seller type accounts."}, "timezone": {"type": "text", "index": 12, "name": "timezone", "comment": "The time zone used for all date-based campaign management and reporting."}, "_fivetran_deleted": {"type": "boolean", "index": 13, "name": "_fivetran_deleted", "comment": "Boolean created by Fivetran to indicate whether the record has been deleted."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__profile"}, "model.amazon_ads.stg_amazon_ads__profile_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__profile_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": null}, "account_marketplace_string_id": {"type": "text", "index": 5, "name": "account_marketplace_string_id", "comment": null}, "account_name": {"type": "text", "index": 6, "name": "account_name", "comment": null}, "account_sub_type": {"type": "integer", "index": 7, "name": "account_sub_type", "comment": null}, "account_type": {"type": "text", "index": 8, "name": "account_type", "comment": null}, "account_valid_payment_method": {"type": "boolean", "index": 9, "name": "account_valid_payment_method", "comment": null}, "country_code": {"type": "text", "index": 10, "name": "country_code", "comment": null}, "currency_code": {"type": "text", "index": 11, "name": "currency_code", "comment": null}, "daily_budget": {"type": "integer", "index": 12, "name": "daily_budget", "comment": null}, "timezone": {"type": "text", "index": 13, "name": "timezone", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__profile_tmp"}, "model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__search_term_ad_keyword_report", "database": "postgres", "comment": "Search term reports contain search term performance metrics broken down by targeting expressions and keywords.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_group_id": {"type": "text", "index": 2, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "ad_keyword_status": {"type": "text", "index": 3, "name": "ad_keyword_status", "comment": "Current status of a keyword."}, "campaign_budget_amount": {"type": "double precision", "index": 4, "name": "campaign_budget_amount", "comment": "Total budget allocated to the campaign."}, "campaign_budget_currency_code": {"type": "text", "index": 5, "name": "campaign_budget_currency_code", "comment": "The currency code associated with the campaign."}, "campaign_budget_type": {"type": "text", "index": 6, "name": "campaign_budget_type", "comment": "One of: daily or lifetime."}, "campaign_id": {"type": "text", "index": 7, "name": "campaign_id", "comment": "The ID of the Campaign."}, "clicks": {"type": "integer", "index": 8, "name": "clicks", "comment": "Total number of ad clicks."}, "cost": {"type": "double precision", "index": 9, "name": "cost", "comment": "Total cost of ad clicks."}, "date_day": {"type": "date", "index": 10, "name": "date_day", "comment": "The date of the report."}, "impressions": {"type": "integer", "index": 11, "name": "impressions", "comment": "Total number of ad impressions."}, "keyword_bid": {"type": "double precision", "index": 12, "name": "keyword_bid", "comment": "Bid associated with a keyword or targeting expression."}, "keyword_id": {"type": "text", "index": 13, "name": "keyword_id", "comment": "The ID of the keyword."}, "search_term": {"type": "text", "index": 14, "name": "search_term", "comment": "The search term used by the customer."}, "targeting": {"type": "text", "index": 15, "name": "targeting", "comment": "A string representation of the expression object used in the targeting clause."}, "purchases_30_d": {"type": "integer", "index": 16, "name": "purchases_30_d", "comment": "Number of attributed conversion events occurring within 30 days of an ad click."}, "sales_30_d": {"type": "double precision", "index": 17, "name": "sales_30_d", "comment": "Total value of sales occurring within 30 days of an ad click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report"}, "model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__search_term_ad_keyword_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "keyword_id": {"type": "integer", "index": 4, "name": "keyword_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "campaign_budget_amount": {"type": "double precision", "index": 6, "name": "campaign_budget_amount", "comment": null}, "campaign_budget_currency_code": {"type": "text", "index": 7, "name": "campaign_budget_currency_code", "comment": null}, "campaign_budget_type": {"type": "text", "index": 8, "name": "campaign_budget_type", "comment": null}, "clicks": {"type": "integer", "index": 9, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 10, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 11, "name": "impressions", "comment": null}, "keyword_bid": {"type": "double precision", "index": 12, "name": "keyword_bid", "comment": null}, "search_term": {"type": "text", "index": 13, "name": "search_term", "comment": null}, "targeting": {"type": "text", "index": 14, "name": "targeting", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report_tmp"}, "model.amazon_ads.stg_amazon_ads__targeting_keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__targeting_keyword_report", "database": "postgres", "comment": "Targeting reports contain performance metrics broken down by both targeting expressions and keywords.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_group_id": {"type": "text", "index": 2, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "ad_keyword_status": {"type": "text", "index": 3, "name": "ad_keyword_status", "comment": "Current status of a keyword."}, "campaign_budget_amount": {"type": "double precision", "index": 4, "name": "campaign_budget_amount", "comment": "Total budget allocated to the campaign."}, "campaign_budget_currency_code": {"type": "text", "index": 5, "name": "campaign_budget_currency_code", "comment": "The currency code associated with the campaign."}, "campaign_budget_type": {"type": "text", "index": 6, "name": "campaign_budget_type", "comment": "One of: daily or lifetime."}, "campaign_id": {"type": "text", "index": 7, "name": "campaign_id", "comment": "The ID of the Campaign."}, "clicks": {"type": "integer", "index": 8, "name": "clicks", "comment": "Total number of ad clicks."}, "cost": {"type": "double precision", "index": 9, "name": "cost", "comment": "Total cost of ad clicks."}, "date_day": {"type": "date", "index": 10, "name": "date_day", "comment": "The date of the report."}, "impressions": {"type": "integer", "index": 11, "name": "impressions", "comment": "Total number of ad impressions."}, "keyword_bid": {"type": "double precision", "index": 12, "name": "keyword_bid", "comment": "Bid associated with a keyword or targeting expression."}, "keyword_id": {"type": "text", "index": 13, "name": "keyword_id", "comment": "The ID of the keyword."}, "keyword_type": {"type": "text", "index": 14, "name": "keyword_type", "comment": "Type of matching for the keyword used in bid. One of: BROAD, PHRASE, or EXACT."}, "match_type": {"type": "text", "index": 15, "name": "match_type", "comment": "Type of matching for the keyword used in bid. One of: BROAD, PHRASE, or EXACT."}, "targeting": {"type": "text", "index": 16, "name": "targeting", "comment": "A string representation of the expression object used in the targeting clause."}, "purchases_30_d": {"type": "integer", "index": 17, "name": "purchases_30_d", "comment": "Number of attributed conversion events occurring within 30 days of an ad click."}, "sales_30_d": {"type": "double precision", "index": 18, "name": "sales_30_d", "comment": "Total value of sales occurring within 30 days of an ad click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__targeting_keyword_report"}, "model.amazon_ads.stg_amazon_ads__targeting_keyword_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__targeting_keyword_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "keyword_id": {"type": "integer", "index": 4, "name": "keyword_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "ad_keyword_status": {"type": "text", "index": 6, "name": "ad_keyword_status", "comment": null}, "campaign_budget_amount": {"type": "double precision", "index": 7, "name": "campaign_budget_amount", "comment": null}, "campaign_budget_currency_code": {"type": "text", "index": 8, "name": "campaign_budget_currency_code", "comment": null}, "campaign_budget_type": {"type": "text", "index": 9, "name": "campaign_budget_type", "comment": null}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 11, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 12, "name": "impressions", "comment": null}, "keyword_bid": {"type": "double precision", "index": 13, "name": "keyword_bid", "comment": null}, "keyword_type": {"type": "text", "index": 14, "name": "keyword_type", "comment": null}, "match_type": {"type": "text", "index": 15, "name": "match_type", "comment": null}, "targeting": {"type": "text", "index": 16, "name": "targeting", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.amazon_ads.stg_amazon_ads__targeting_keyword_report_tmp"}, "model.apple_search_ads.stg_apple_search_ads__ad_group_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_group_history", "database": "postgres", "comment": "Each record represents a version of an ad group in Apple Search Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "modified_at": {"type": "timestamp without time zone", "index": 2, "name": "modified_at", "comment": "Timestamp of when the ad group object was last modified."}, "organization_id": {"type": "integer", "index": 3, "name": "organization_id", "comment": "Organization ID associated with the record."}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": "Campaign ID associated with the record."}, "ad_group_name": {"type": "text", "index": 5, "name": "ad_group_name", "comment": "Ad group name."}, "ad_group_id": {"type": "integer", "index": 6, "name": "ad_group_id", "comment": "Ad group ID associated with the record."}, "ad_group_status": {"type": "text", "index": 7, "name": "ad_group_status", "comment": null}, "start_at": {"type": "timestamp without time zone", "index": 8, "name": "start_at", "comment": "The designated ad group start time."}, "end_at": {"type": "timestamp without time zone", "index": 9, "name": "end_at", "comment": "The designated ad group end time."}, "is_most_recent_record": {"type": "boolean", "index": 10, "name": "is_most_recent_record", "comment": "Boolean indicating whether record was the most recent instance."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_group_history"}, "model.apple_search_ads.stg_apple_search_ads__ad_group_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_group_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "timestamp without time zone", "index": 2, "name": "modification_time", "comment": null}, "automated_keywords_opt_in": {"type": "boolean", "index": 3, "name": "automated_keywords_opt_in", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "cpa_goal_amount": {"type": "integer", "index": 5, "name": "cpa_goal_amount", "comment": null}, "cpa_goal_currency": {"type": "integer", "index": 6, "name": "cpa_goal_currency", "comment": null}, "default_cpc_bid_amount": {"type": "integer", "index": 7, "name": "default_cpc_bid_amount", "comment": null}, "default_cpc_bid_currency": {"type": "integer", "index": 8, "name": "default_cpc_bid_currency", "comment": null}, "deleted": {"type": "boolean", "index": 9, "name": "deleted", "comment": null}, "end_time": {"type": "timestamp without time zone", "index": 10, "name": "end_time", "comment": null}, "name": {"type": "text", "index": 11, "name": "name", "comment": null}, "organization_id": {"type": "integer", "index": 12, "name": "organization_id", "comment": null}, "serving_state_reasons": {"type": "integer", "index": 13, "name": "serving_state_reasons", "comment": null}, "serving_status": {"type": "text", "index": 14, "name": "serving_status", "comment": null}, "start_time": {"type": "timestamp without time zone", "index": 15, "name": "start_time", "comment": null}, "status": {"type": "text", "index": 16, "name": "status", "comment": null}, "storefronts": {"type": "integer", "index": 17, "name": "storefronts", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_group_history_tmp"}, "model.apple_search_ads.stg_apple_search_ads__ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_group_report", "database": "postgres", "comment": "Each record represents the daily performance of an ad group in Apple Search Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Date for daily report aggregation."}, "ad_group_id": {"type": "integer", "index": 3, "name": "ad_group_id", "comment": "Ad group ID associated with the record."}, "impressions": {"type": "integer", "index": 4, "name": "impressions", "comment": "Number of times your ad appeared in App Store search results."}, "spend": {"type": "double precision", "index": 5, "name": "spend", "comment": "The sum of costs associated with the number of impressions served. Spend is measured in the currency used in the campaign."}, "currency": {"type": "text", "index": 6, "name": "currency", "comment": "This currency value should match the respective organization's currency value."}, "conversions": {"type": "integer", "index": 7, "name": "conversions", "comment": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025."}, "tap_installs": {"type": "integer", "index": 8, "name": "tap_installs", "comment": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field."}, "new_downloads": {"type": "integer", "index": 9, "name": "new_downloads", "comment": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025."}, "tap_new_downloads": {"type": "integer", "index": 10, "name": "tap_new_downloads", "comment": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field."}, "redownloads": {"type": "integer", "index": 11, "name": "redownloads", "comment": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025."}, "tap_redownloads": {"type": "integer", "index": 12, "name": "tap_redownloads", "comment": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field."}, "taps": {"type": "integer", "index": 13, "name": "taps", "comment": "The number of times ad was tapped by users within the reporting time period."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_group_report"}, "model.apple_search_ads.stg_apple_search_ads__ad_group_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_group_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "avg_cpa_amount": {"type": "double precision", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "text", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "double precision", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "text", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "double precision", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "integer", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "integer", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "integer", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "double precision", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "integer", "index": 17, "name": "taps", "comment": null}, "tap_installs": {"type": "integer", "index": 18, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 19, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 20, "name": "tap_redownloads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_group_report_tmp"}, "model.apple_search_ads.stg_apple_search_ads__ad_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_history", "database": "postgres", "comment": "Each record represents a version of an ad in Apple Search Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "created_at": {"type": "timestamp without time zone", "index": 2, "name": "created_at", "comment": "Timestamp of when ad was created."}, "modified_at": {"type": "timestamp without time zone", "index": 3, "name": "modified_at", "comment": "Timestamp of when the ad object was last modified."}, "organization_id": {"type": "integer", "index": 4, "name": "organization_id", "comment": "Organization ID associated with the record."}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": "Campaign ID associated with the record."}, "ad_group_id": {"type": "integer", "index": 6, "name": "ad_group_id", "comment": "Ad group ID associated with the record."}, "ad_name": {"type": "text", "index": 7, "name": "ad_name", "comment": "Ad name associated with the record."}, "ad_id": {"type": "integer", "index": 8, "name": "ad_id", "comment": "Ad ID associated with the record."}, "ad_status": {"type": "text", "index": 9, "name": "ad_status", "comment": "The current status of the ad, values include ENABLED and PAUSED."}, "is_most_recent_record": {"type": "boolean", "index": 10, "name": "is_most_recent_record", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_history"}, "model.apple_search_ads.stg_apple_search_ads__ad_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"creation_time": {"type": "timestamp without time zone", "index": 1, "name": "creation_time", "comment": null}, "modification_time": {"type": "timestamp without time zone", "index": 2, "name": "modification_time", "comment": null}, "org_id": {"type": "integer", "index": 3, "name": "org_id", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "integer", "index": 5, "name": "ad_group_id", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "id": {"type": "integer", "index": 7, "name": "id", "comment": null}, "creative_id": {"type": "integer", "index": 8, "name": "creative_id", "comment": null}, "creative_type": {"type": "text", "index": 9, "name": "creative_type", "comment": null}, "status": {"type": "text", "index": 10, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_history_tmp"}, "model.apple_search_ads.stg_apple_search_ads__ad_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_report", "database": "postgres", "comment": "Each record represents the daily performance of an ad in Apple Search Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Date for daily report aggregation."}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": "Campaign ID associated with the record."}, "ad_group_id": {"type": "integer", "index": 4, "name": "ad_group_id", "comment": "Ad group ID associated with the record."}, "ad_id": {"type": "integer", "index": 5, "name": "ad_id", "comment": "Ad ID associated with the record."}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": "Number of times your ad appeared in App Store search results."}, "spend": {"type": "double precision", "index": 7, "name": "spend", "comment": "The sum of costs associated with the number of impressions served; Spend is measured in the currency used in the campaign."}, "currency": {"type": "text", "index": 8, "name": "currency", "comment": "This currency value should match the respective organization's currency value."}, "conversions": {"type": "integer", "index": 9, "name": "conversions", "comment": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025."}, "tap_installs": {"type": "integer", "index": 10, "name": "tap_installs", "comment": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field."}, "new_downloads": {"type": "integer", "index": 11, "name": "new_downloads", "comment": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025."}, "tap_new_downloads": {"type": "integer", "index": 12, "name": "tap_new_downloads", "comment": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field."}, "redownloads": {"type": "integer", "index": 13, "name": "redownloads", "comment": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025."}, "tap_redownloads": {"type": "integer", "index": 14, "name": "tap_redownloads", "comment": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field."}, "taps": {"type": "integer", "index": 15, "name": "taps", "comment": "The number of times ad was tapped by users within the reporting time period."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_report"}, "model.apple_search_ads.stg_apple_search_ads__ad_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "integer", "index": 3, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "integer", "index": 4, "name": "ad_id", "comment": null}, "impressions": {"type": "integer", "index": 5, "name": "impressions", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 6, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 7, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 8, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 9, "name": "redownloads", "comment": null}, "tap_installs": {"type": "integer", "index": 10, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 11, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 12, "name": "tap_redownloads", "comment": null}, "taps": {"type": "integer", "index": 13, "name": "taps", "comment": null}, "conversions": {"type": "integer", "index": 14, "name": "conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_report_tmp"}, "model.apple_search_ads.stg_apple_search_ads__campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__campaign_history", "database": "postgres", "comment": "Each record represents a version of a campaign in Apple Search Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "modified_at": {"type": "timestamp without time zone", "index": 2, "name": "modified_at", "comment": "Timestamp of when the campaign object was last modified."}, "organization_id": {"type": "integer", "index": 3, "name": "organization_id", "comment": "Organization ID associated with the record."}, "campaign_name": {"type": "text", "index": 4, "name": "campaign_name", "comment": "Campaign name for the record."}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": "Campaign ID associated with the record."}, "campaign_status": {"type": "text", "index": 6, "name": "campaign_status", "comment": null}, "start_at": {"type": "timestamp without time zone", "index": 7, "name": "start_at", "comment": "The designated ad group start time (ad group with the earliest start time associated with this campaign)."}, "end_at": {"type": "timestamp without time zone", "index": 8, "name": "end_at", "comment": "The designated campaign end time (ad group with the latest start time associated with this campaign)."}, "is_most_recent_record": {"type": "boolean", "index": 9, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__campaign_history"}, "model.apple_search_ads.stg_apple_search_ads__campaign_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__campaign_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "timestamp without time zone", "index": 2, "name": "modification_time", "comment": null}, "adam_id": {"type": "integer", "index": 3, "name": "adam_id", "comment": null}, "budget_amount": {"type": "integer", "index": 4, "name": "budget_amount", "comment": null}, "budget_currency": {"type": "text", "index": 5, "name": "budget_currency", "comment": null}, "budget_orders": {"type": "text", "index": 6, "name": "budget_orders", "comment": null}, "daily_budget_amount": {"type": "integer", "index": 7, "name": "daily_budget_amount", "comment": null}, "daily_budget_currency": {"type": "text", "index": 8, "name": "daily_budget_currency", "comment": null}, "deleted": {"type": "boolean", "index": 9, "name": "deleted", "comment": null}, "end_time": {"type": "timestamp without time zone", "index": 10, "name": "end_time", "comment": null}, "loc_invoice_detail_buyer_email": {"type": "integer", "index": 11, "name": "loc_invoice_detail_buyer_email", "comment": null}, "loc_invoice_detail_buyer_name": {"type": "integer", "index": 12, "name": "loc_invoice_detail_buyer_name", "comment": null}, "loc_invoice_detail_client_name": {"type": "integer", "index": 13, "name": "loc_invoice_detail_client_name", "comment": null}, "loc_invoice_detail_order_number": {"type": "integer", "index": 14, "name": "loc_invoice_detail_order_number", "comment": null}, "name": {"type": "text", "index": 15, "name": "name", "comment": null}, "organization_id": {"type": "integer", "index": 16, "name": "organization_id", "comment": null}, "payment_model": {"type": "text", "index": 17, "name": "payment_model", "comment": null}, "serving_state_reasons": {"type": "text", "index": 18, "name": "serving_state_reasons", "comment": null}, "serving_status": {"type": "text", "index": 19, "name": "serving_status", "comment": null}, "start_time": {"type": "timestamp without time zone", "index": 20, "name": "start_time", "comment": null}, "status": {"type": "text", "index": 21, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__campaign_history_tmp"}, "model.apple_search_ads.stg_apple_search_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__campaign_report", "database": "postgres", "comment": "Each record represents the daily performance of a campaign in Apple Search Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Date for daily report aggregation."}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": "Campaign ID associated with the record."}, "impressions": {"type": "integer", "index": 4, "name": "impressions", "comment": "Number of times your ad appeared in App Store search results."}, "spend": {"type": "double precision", "index": 5, "name": "spend", "comment": "The sum of costs associated with the number of impressions served; Spend is measured in the currency used in the campaign."}, "currency": {"type": "text", "index": 6, "name": "currency", "comment": "This currency value should match the respective organization's currency value."}, "conversions": {"type": "integer", "index": 7, "name": "conversions", "comment": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025."}, "tap_installs": {"type": "integer", "index": 8, "name": "tap_installs", "comment": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field."}, "new_downloads": {"type": "integer", "index": 9, "name": "new_downloads", "comment": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025."}, "tap_new_downloads": {"type": "integer", "index": 10, "name": "tap_new_downloads", "comment": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field."}, "redownloads": {"type": "integer", "index": 11, "name": "redownloads", "comment": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025."}, "tap_redownloads": {"type": "integer", "index": 12, "name": "tap_redownloads", "comment": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field."}, "taps": {"type": "integer", "index": 13, "name": "taps", "comment": "The number of times ad was tapped by users within the reporting time period."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__campaign_report"}, "model.apple_search_ads.stg_apple_search_ads__campaign_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__campaign_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "id": {"type": "integer", "index": 2, "name": "id", "comment": null}, "avg_cpa_amount": {"type": "double precision", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "text", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "double precision", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "text", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "double precision", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "integer", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "integer", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "integer", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "double precision", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "integer", "index": 17, "name": "taps", "comment": null}, "tap_installs": {"type": "integer", "index": 18, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 19, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 20, "name": "tap_redownloads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__campaign_report_tmp"}, "model.apple_search_ads.stg_apple_search_ads__keyword_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__keyword_history", "database": "postgres", "comment": "Each record represents a version of a keyword in Apple Search Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "modified_at": {"type": "timestamp without time zone", "index": 2, "name": "modified_at", "comment": "Timestamp of when the keyword object was last modified."}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": "Campaign ID associated with the record."}, "ad_group_id": {"type": "integer", "index": 4, "name": "ad_group_id", "comment": "Ad group ID associated with the record."}, "keyword_id": {"type": "integer", "index": 5, "name": "keyword_id", "comment": "Keyword ID associated with the record."}, "bid_amount": {"type": "double precision", "index": 6, "name": "bid_amount", "comment": "The bid amount to display your ad for the matching text value."}, "bid_currency": {"type": "text", "index": 7, "name": "bid_currency", "comment": "This currency value should match the respective organization's currency value."}, "match_type": {"type": "text", "index": 8, "name": "match_type", "comment": "Controls how ads are matched to user searches; EXACT or BROAD."}, "keyword_status": {"type": "text", "index": 9, "name": "keyword_status", "comment": null}, "keyword_text": {"type": "text", "index": 10, "name": "keyword_text", "comment": "The word or phrase to match in user searches, to show respective ad."}, "is_most_recent_record": {"type": "boolean", "index": 11, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__keyword_history"}, "model.apple_search_ads.stg_apple_search_ads__keyword_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__keyword_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "timestamp without time zone", "index": 2, "name": "modification_time", "comment": null}, "ad_group_id": {"type": "integer", "index": 3, "name": "ad_group_id", "comment": null}, "bid_amount": {"type": "double precision", "index": 4, "name": "bid_amount", "comment": null}, "bid_currency": {"type": "text", "index": 5, "name": "bid_currency", "comment": null}, "campaign_id": {"type": "integer", "index": 6, "name": "campaign_id", "comment": null}, "deleted": {"type": "boolean", "index": 7, "name": "deleted", "comment": null}, "match_type": {"type": "text", "index": 8, "name": "match_type", "comment": null}, "status": {"type": "text", "index": 9, "name": "status", "comment": null}, "text": {"type": "text", "index": 10, "name": "text", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__keyword_history_tmp"}, "model.apple_search_ads.stg_apple_search_ads__keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__keyword_report", "database": "postgres", "comment": "Each record represents the daily performance of a keyword in Apple Search Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Date for daily report aggregation."}, "keyword_id": {"type": "integer", "index": 3, "name": "keyword_id", "comment": "Keyword ID associated with the record."}, "impressions": {"type": "integer", "index": 4, "name": "impressions", "comment": "Number of times your ad appeared in App Store search results."}, "spend": {"type": "double precision", "index": 5, "name": "spend", "comment": "The sum of costs associated with the number of impressions served; Spend is measured in the currency used in the campaign."}, "currency": {"type": "text", "index": 6, "name": "currency", "comment": "This currency value should match the respective organization's currency value."}, "conversions": {"type": "integer", "index": 7, "name": "conversions", "comment": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025."}, "tap_installs": {"type": "integer", "index": 8, "name": "tap_installs", "comment": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field."}, "new_downloads": {"type": "integer", "index": 9, "name": "new_downloads", "comment": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025."}, "tap_new_downloads": {"type": "integer", "index": 10, "name": "tap_new_downloads", "comment": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field."}, "redownloads": {"type": "integer", "index": 11, "name": "redownloads", "comment": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025."}, "tap_redownloads": {"type": "integer", "index": 12, "name": "tap_redownloads", "comment": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field."}, "taps": {"type": "integer", "index": 13, "name": "taps", "comment": "The number of times ad was tapped by users within the reporting time period."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__keyword_report"}, "model.apple_search_ads.stg_apple_search_ads__keyword_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__keyword_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "id": {"type": "integer", "index": 2, "name": "id", "comment": null}, "avg_cpa_amount": {"type": "double precision", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "text", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "double precision", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "text", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "double precision", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "integer", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "integer", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "integer", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "double precision", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "integer", "index": 17, "name": "taps", "comment": null}, "tap_installs": {"type": "integer", "index": 18, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 19, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 20, "name": "tap_redownloads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__keyword_report_tmp"}, "model.apple_search_ads.stg_apple_search_ads__organization": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__organization", "database": "postgres", "comment": "Each record represents an organization in Apple Search Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "organization_id": {"type": "integer", "index": 2, "name": "organization_id", "comment": "Organization ID associated with the record."}, "currency": {"type": "text", "index": 3, "name": "currency", "comment": "Specified currency for respective organization."}, "payment_model": {"type": "text", "index": 4, "name": "payment_model", "comment": "Values include 'LOC', 'PAYG' or (payment method hasn't been set)."}, "organization_name": {"type": "text", "index": 5, "name": "organization_name", "comment": "Name of organization."}, "time_zone": {"type": "text", "index": 6, "name": "time_zone", "comment": "Organization default timezone; values can be ORTZ or UTC."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__organization"}, "model.apple_search_ads.stg_apple_search_ads__organization_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__organization_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "currency": {"type": "text", "index": 2, "name": "currency", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "payment_model": {"type": "text", "index": 4, "name": "payment_model", "comment": null}, "role_names": {"type": "text", "index": 5, "name": "role_names", "comment": null}, "time_zone": {"type": "text", "index": 6, "name": "time_zone", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__organization_tmp"}, "model.apple_search_ads.stg_apple_search_ads__search_term_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__search_term_report", "database": "postgres", "comment": "Each record represents the daily performance of a search term in Apple Search Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Date for daily report aggregation."}, "_fivetran_id": {"type": "text", "index": 3, "name": "_fivetran_id", "comment": "A Fivetran internal unique id that helps us avoid duplicate rows in primary keyless tables."}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": "Campaign ID associated with the record."}, "ad_group_id": {"type": "integer", "index": 5, "name": "ad_group_id", "comment": "Ad group ID associated with the record."}, "ad_group_name": {"type": "text", "index": 6, "name": "ad_group_name", "comment": "Ad group name."}, "bid_amount": {"type": "double precision", "index": 7, "name": "bid_amount", "comment": "The bid amount to display your ad for the matching text value."}, "bid_currency": {"type": "text", "index": 8, "name": "bid_currency", "comment": "This currency value should match the respective organization's currency value."}, "keyword_text": {"type": "text", "index": 9, "name": "keyword_text", "comment": "The word or phrase to match in user searches, to show respective ad."}, "keyword_display_status": {"type": "text", "index": 10, "name": "keyword_display_status", "comment": "The keyword display status can either be ACTIVE or PAUSED."}, "keyword_id": {"type": "integer", "index": 11, "name": "keyword_id", "comment": "Keyword ID associated with the record."}, "spend": {"type": "double precision", "index": 12, "name": "spend", "comment": "The sum of costs associated with the number of impressions served; Spend is measured in the currency used in the campaign."}, "currency": {"type": "text", "index": 13, "name": "currency", "comment": "This currency value should match the respective organization's currency value."}, "match_type": {"type": "text", "index": 14, "name": "match_type", "comment": "Controls how ads are matched to user searches; values include EXACT, BROAD or AUTO."}, "search_term_source": {"type": "text", "index": 15, "name": "search_term_source", "comment": "The search term source can either be TARGETED or AUTO; if this value is AUTO so will match_type."}, "search_term_text": {"type": "text", "index": 16, "name": "search_term_text", "comment": "The word or phrase to match of user searches."}, "impressions": {"type": "integer", "index": 17, "name": "impressions", "comment": "Number of times your ad appeared in App Store search results."}, "taps": {"type": "integer", "index": 18, "name": "taps", "comment": "The number of times ad was tapped by users within the reporting time period."}, "conversions": {"type": "integer", "index": 19, "name": "conversions", "comment": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025."}, "tap_installs": {"type": "integer", "index": 20, "name": "tap_installs", "comment": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field."}, "new_downloads": {"type": "integer", "index": 21, "name": "new_downloads", "comment": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025."}, "tap_new_downloads": {"type": "integer", "index": 22, "name": "tap_new_downloads", "comment": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field."}, "redownloads": {"type": "integer", "index": 23, "name": "redownloads", "comment": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025."}, "tap_redownloads": {"type": "integer", "index": 24, "name": "tap_redownloads", "comment": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__search_term_report"}, "model.apple_search_ads.stg_apple_search_ads__search_term_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__search_term_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "ad_group_id": {"type": "integer", "index": 2, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 4, "name": "date", "comment": null}, "ad_group_deleted": {"type": "boolean", "index": 5, "name": "ad_group_deleted", "comment": null}, "ad_group_name": {"type": "text", "index": 6, "name": "ad_group_name", "comment": null}, "avg_cpa_amount": {"type": "double precision", "index": 7, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "text", "index": 8, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "double precision", "index": 9, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "text", "index": 10, "name": "avg_cpt_currency", "comment": null}, "bid_amount_amount": {"type": "double precision", "index": 11, "name": "bid_amount_amount", "comment": null}, "bid_amount_currency": {"type": "text", "index": 12, "name": "bid_amount_currency", "comment": null}, "conversion_rate": {"type": "double precision", "index": 13, "name": "conversion_rate", "comment": null}, "conversions": {"type": "integer", "index": 14, "name": "conversions", "comment": null}, "deleted": {"type": "boolean", "index": 15, "name": "deleted", "comment": null}, "impressions": {"type": "integer", "index": 16, "name": "impressions", "comment": null}, "keyword": {"type": "text", "index": 17, "name": "keyword", "comment": null}, "keyword_display_status": {"type": "text", "index": 18, "name": "keyword_display_status", "comment": null}, "keyword_id": {"type": "integer", "index": 19, "name": "keyword_id", "comment": null}, "lat_off_installs": {"type": "integer", "index": 20, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "integer", "index": 21, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 22, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 23, "name": "local_spend_currency", "comment": null}, "match_type": {"type": "text", "index": 24, "name": "match_type", "comment": null}, "new_downloads": {"type": "integer", "index": 25, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 26, "name": "redownloads", "comment": null}, "search_term_source": {"type": "text", "index": 27, "name": "search_term_source", "comment": null}, "search_term_text": {"type": "text", "index": 28, "name": "search_term_text", "comment": null}, "tap_through_rate": {"type": "double precision", "index": 29, "name": "tap_through_rate", "comment": null}, "taps": {"type": "integer", "index": 30, "name": "taps", "comment": null}, "tap_installs": {"type": "integer", "index": 31, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 32, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 33, "name": "tap_redownloads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.apple_search_ads.stg_apple_search_ads__search_term_report_tmp"}, "model.facebook_ads.stg_facebook_ads__account_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__account_history", "database": "postgres", "comment": "Each record in this table reflects a Facebook ad account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": "The ID of the ad account."}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": "When the record was last synced by Fivetran."}, "account_name": {"type": "character varying", "index": 4, "name": "account_name", "comment": "Name of the account."}, "account_status": {"type": "text", "index": 5, "name": "account_status", "comment": "Current status of account."}, "business_country_code": {"type": "text", "index": 6, "name": "business_country_code", "comment": "Country code of business associated to account."}, "business_state": {"type": "text", "index": 7, "name": "business_state", "comment": "State abbreviation for business address."}, "created_at": {"type": "timestamp without time zone", "index": 8, "name": "created_at", "comment": "The time account was created."}, "currency": {"type": "text", "index": 9, "name": "currency", "comment": "Currency associated with account."}, "timezone_name": {"type": "text", "index": 10, "name": "timezone_name", "comment": "Timezone associated with account."}, "timezone_offset_hours_utc": {"type": "double precision", "index": 11, "name": "timezone_offset_hours_utc", "comment": "Time zone difference from UTC."}, "min_daily_budget": {"type": "integer", "index": 12, "name": "min_daily_budget", "comment": "The minimum daily budget for this Ad Account."}, "is_most_recent_record": {"type": "boolean", "index": 13, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record. All records should have this value set to True given we filter on it."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__account_history"}, "model.facebook_ads.stg_facebook_ads__account_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__account_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "character varying", "index": 2, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__account_history_tmp"}, "model.facebook_ads.stg_facebook_ads__ad_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__ad_history", "database": "postgres", "comment": "Each record in this table reflects a Facebook ad.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": "The timestamp of the last update of a record."}, "ad_id": {"type": "bigint", "index": 3, "name": "ad_id", "comment": "The ID of this ad."}, "ad_name": {"type": "text", "index": 4, "name": "ad_name", "comment": "Name of the ad."}, "account_id": {"type": "bigint", "index": 5, "name": "account_id", "comment": "The ID of the ad account that this ad belongs to."}, "ad_set_id": {"type": "bigint", "index": 6, "name": "ad_set_id", "comment": "ID of the ad set that contains the ad."}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": "Ad campaign that contains this ad."}, "creative_id": {"type": "bigint", "index": 8, "name": "creative_id", "comment": "The ID of the ad creative to be used by this ad."}, "conversion_domain": {"type": "text", "index": 9, "name": "conversion_domain", "comment": "The domain you've configured the ad to convert to."}, "is_most_recent_record": {"type": "boolean", "index": 10, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record. All records should have this value set to True given we filter on it."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__ad_history"}, "model.facebook_ads.stg_facebook_ads__ad_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__ad_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "ad_set_id": {"type": "bigint", "index": 3, "name": "ad_set_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": null}, "creative_id": {"type": "bigint", "index": 5, "name": "creative_id", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}, "updated_time": {"type": "timestamp without time zone", "index": 8, "name": "updated_time", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__ad_history_tmp"}, "model.facebook_ads.stg_facebook_ads__ad_set_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__ad_set_history", "database": "postgres", "comment": "Each record in this table reflects a Facebook ad set.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": "The timestamp of the last update of a record."}, "ad_set_id": {"type": "bigint", "index": 3, "name": "ad_set_id", "comment": "The ID of the ad set."}, "ad_set_name": {"type": "text", "index": 4, "name": "ad_set_name", "comment": "The name of the ad set."}, "account_id": {"type": "bigint", "index": 5, "name": "account_id", "comment": "The ID of the ad account that this ad set belongs to."}, "campaign_id": {"type": "bigint", "index": 6, "name": "campaign_id", "comment": "Ad campaign that contains this ad set."}, "start_at": {"type": "timestamp without time zone", "index": 7, "name": "start_at", "comment": "Timestamp of designated ad set start time."}, "end_at": {"type": "timestamp without time zone", "index": 8, "name": "end_at", "comment": "Timestamp of designated ad set end time."}, "bid_strategy": {"type": "text", "index": 9, "name": "bid_strategy", "comment": "Bid strategy values are - 'LOWEST_COST_WITHOUT_CAP', 'LOWEST_COST_WITH_BID_CAP', 'COST_CAP', 'LOWEST_COST_WITH_MIN_ROAS'."}, "daily_budget": {"type": "integer", "index": 10, "name": "daily_budget", "comment": "Daily budget of ad set."}, "budget_remaining": {"type": "integer", "index": 11, "name": "budget_remaining", "comment": "Remaining budget of ad set."}, "status": {"type": "text", "index": 12, "name": "status", "comment": "Status values are - 'ACTIVE', 'PAUSED', 'DELETED', 'ARCHIVED'."}, "optimization_goal": {"type": "text", "index": 13, "name": "optimization_goal", "comment": "The optimization goal this ad set is using. Possible values defined [here](https://developers.facebook.com/docs/marketing-api/reference/ad-campaign/#fields)."}, "is_most_recent_record": {"type": "boolean", "index": 14, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record. All records should have this value set to True given we filter on it."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__ad_set_history"}, "model.facebook_ads.stg_facebook_ads__ad_set_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__ad_set_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "updated_time": {"type": "timestamp without time zone", "index": 6, "name": "updated_time", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__ad_set_history_tmp"}, "model.facebook_ads.stg_facebook_ads__basic_ad": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__basic_ad", "database": "postgres", "comment": "Each record represents the daily performance of an ad in Facebook.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_id": {"type": "bigint", "index": 2, "name": "ad_id", "comment": "The ID of the ad the report relates to."}, "ad_name": {"type": "text", "index": 3, "name": "ad_name", "comment": "Name of the ad the report relates to."}, "ad_set_name": {"type": "text", "index": 4, "name": "ad_set_name", "comment": "Name of the ad set the report relates to."}, "date_day": {"type": "date", "index": 5, "name": "date_day", "comment": "The date of the reported performance."}, "account_id": {"type": "bigint", "index": 6, "name": "account_id", "comment": "The ID of the ad account that this ad belongs to."}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": "The number of impressions the ad had on the given day."}, "clicks": {"type": "integer", "index": 8, "name": "clicks", "comment": "The number of clicks the ad had on the given day."}, "spend": {"type": "double precision", "index": 9, "name": "spend", "comment": "The spend on the ad in the given day."}, "reach": {"type": "integer", "index": 10, "name": "reach", "comment": "The number of people who saw any content from your Page or about your Page. This metric is estimated."}, "frequency": {"type": "double precision", "index": 11, "name": "frequency", "comment": "The average number of times each person saw your ad; it is calculated as impressions divided by reach."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__basic_ad"}, "model.facebook_ads.stg_facebook_ads__basic_ad_action_values": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__basic_ad_action_values", "database": "postgres", "comment": "Each record represents the daily conversion values associated with an ad in Facebook. This is the prebuilt `basic_ad` report broken down by `action_type` and `action_values` Include more conversion value metrics by configuring the `facebook_ads__basic_ad_action_values_passthrough_metrics` variable.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "action_type": {"type": "text", "index": 2, "name": "action_type", "comment": "The kind of actions taken on your ad, Page, app or event after your ad was served to someone, even if they didn't click on it. Action types include Page likes, app installs, conversions, event responses and more. Actions prepended by app_custom_event come from mobile app events and actions prepended by offsite_conversion come from the Facebook Pixel.\n"}, "ad_id": {"type": "bigint", "index": 3, "name": "ad_id", "comment": "The ID of the ad the report relates to."}, "_fivetran_id": {"type": "text", "index": 4, "name": "_fivetran_id", "comment": "Unique record identifier."}, "date_day": {"type": "date", "index": 5, "name": "date_day", "comment": "The date of the reported performance."}, "index": {"type": "integer", "index": 6, "name": "index", "comment": "Index reflecting the `action_type` tracked for this ad on this day. A primary key created by Fivetran utilized for tracking data, specifically when there are multiple rows associated with a single row in the parent table."}, "conversions_value": {"type": "double precision", "index": 7, "name": "conversions_value", "comment": "Monetary value associated with the conversion action using the default attribution window."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__basic_ad_action_values"}, "model.facebook_ads.stg_facebook_ads__basic_ad_action_values_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__basic_ad_action_values_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "integer", "index": 1, "name": "ad_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "_fivetran_id": {"type": "text", "index": 3, "name": "_fivetran_id", "comment": null}, "index": {"type": "integer", "index": 4, "name": "index", "comment": null}, "action_type": {"type": "text", "index": 5, "name": "action_type", "comment": null}, "value": {"type": "double precision", "index": 6, "name": "value", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}, "_7_d_click": {"type": "double precision", "index": 8, "name": "_7_d_click", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__basic_ad_action_values_tmp"}, "model.facebook_ads.stg_facebook_ads__basic_ad_actions": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__basic_ad_actions", "database": "postgres", "comment": "Each record represents the daily conversion performance of an ad in Facebook. This is the prebuilt `basic_ad` report broken down by `action_type`. Include more conversion value metrics by configuring the `facebook_ads__basic_ad_actions_passthrough_metrics` variable.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "action_type": {"type": "text", "index": 2, "name": "action_type", "comment": "The kind of actions taken on your ad, Page, app or event after your ad was served to someone, even if they didn't click on it. Action types include Page likes, app installs, conversions, event responses and more. Actions prepended by app_custom_event come from mobile app events and actions prepended by offsite_conversion come from the Facebook Pixel.\n"}, "ad_id": {"type": "bigint", "index": 3, "name": "ad_id", "comment": "The ID of the ad the report relates to."}, "_fivetran_id": {"type": "text", "index": 4, "name": "_fivetran_id", "comment": "Unique record identifier."}, "date_day": {"type": "date", "index": 5, "name": "date_day", "comment": "The date of the reported performance."}, "index": {"type": "integer", "index": 6, "name": "index", "comment": "Index reflecting the `action_type` tracked for this ad on this day. A primary key created by Fivetran utilized for tracking data, specifically when there are multiple rows associated with a single row in the parent table."}, "conversions": {"type": "double precision", "index": 7, "name": "conversions", "comment": "Conversion metric value using the default attribution window."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__basic_ad_actions"}, "model.facebook_ads.stg_facebook_ads__basic_ad_actions_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__basic_ad_actions_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "ad_id": {"type": "integer", "index": 2, "name": "ad_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "index": {"type": "integer", "index": 4, "name": "index", "comment": null}, "_1_d_view": {"type": "double precision", "index": 5, "name": "_1_d_view", "comment": null}, "_7_d_click": {"type": "double precision", "index": 6, "name": "_7_d_click", "comment": null}, "_fivetran_synced": {"type": "text", "index": 7, "name": "_fivetran_synced", "comment": null}, "action_type": {"type": "text", "index": 8, "name": "action_type", "comment": null}, "inline": {"type": "double precision", "index": 9, "name": "inline", "comment": null}, "value": {"type": "double precision", "index": 10, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__basic_ad_actions_tmp"}, "model.facebook_ads.stg_facebook_ads__basic_ad_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__basic_ad_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "bigint", "index": 1, "name": "ad_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "impressions": {"type": "integer", "index": 4, "name": "impressions", "comment": null}, "inline_link_clicks": {"type": "integer", "index": 5, "name": "inline_link_clicks", "comment": null}, "spend": {"type": "double precision", "index": 6, "name": "spend", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__basic_ad_tmp"}, "model.facebook_ads.stg_facebook_ads__campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__campaign_history", "database": "postgres", "comment": "Each record in this table reflects a Facebook campaign.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": "The timestamp of the last update of a record."}, "created_at": {"type": "timestamp without time zone", "index": 3, "name": "created_at", "comment": "The time the campaign was created."}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": "The ID of the ad account that this campaign belongs to."}, "campaign_id": {"type": "bigint", "index": 5, "name": "campaign_id", "comment": "The ID of the campaign."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the campaign."}, "start_at": {"type": "timestamp without time zone", "index": 7, "name": "start_at", "comment": "Timestamp of designated campaign start time."}, "end_at": {"type": "timestamp without time zone", "index": 8, "name": "end_at", "comment": "Timestamp of designated campaign end time."}, "status": {"type": "text", "index": 9, "name": "status", "comment": "Status values are - 'ACTIVE', 'PAUSED', 'DELETED', 'ARCHIVED'."}, "daily_budget": {"type": "integer", "index": 10, "name": "daily_budget", "comment": "Daily budget of campaign."}, "lifetime_budget": {"type": "integer", "index": 11, "name": "lifetime_budget", "comment": "Lifetime budget of the campaign."}, "budget_remaining": {"type": "double precision", "index": 12, "name": "budget_remaining", "comment": "Remaining budget of campaign."}, "is_most_recent_record": {"type": "boolean", "index": 13, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record. All records should have this value set to True given we filter on it."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__campaign_history"}, "model.facebook_ads.stg_facebook_ads__campaign_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__campaign_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "updated_time": {"type": "timestamp without time zone", "index": 5, "name": "updated_time", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__campaign_history_tmp"}, "model.facebook_ads.stg_facebook_ads__creative_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__creative_history", "database": "postgres", "comment": "Each record in this table reflects a Facebook creative.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "_fivetran_id": {"type": "text", "index": 2, "name": "_fivetran_id", "comment": "Unique record identifier"}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": "When the record was last synced by Fivetran."}, "creative_id": {"type": "bigint", "index": 4, "name": "creative_id", "comment": "Unique ID for an ad creative."}, "account_id": {"type": "bigint", "index": 5, "name": "account_id", "comment": "Ad account ID for the account this ad creative belongs to."}, "creative_name": {"type": "text", "index": 6, "name": "creative_name", "comment": "Name of this ad creative as seen in the ad account's library."}, "page_link": {"type": "character varying", "index": 7, "name": "page_link", "comment": "Link for the page."}, "template_page_link": {"type": "character varying", "index": 8, "name": "template_page_link", "comment": "URL destination of Facebook dynamic ads."}, "url_tags": {"type": "text", "index": 9, "name": "url_tags", "comment": "A set of query string parameters which will replace or be appended to urls clicked from page post ads, message of the post, and canvas app install creatives only."}, "asset_feed_spec_link_urls": {"type": "text", "index": 10, "name": "asset_feed_spec_link_urls", "comment": "Link to the asset feed spec"}, "object_story_link_data_child_attachments": {"type": "text", "index": 11, "name": "object_story_link_data_child_attachments", "comment": "Link of the object story child attachments"}, "object_story_link_data_caption": {"type": "text", "index": 12, "name": "object_story_link_data_caption", "comment": "Link of the object story caption"}, "object_story_link_data_description": {"type": "text", "index": 13, "name": "object_story_link_data_description", "comment": "Link of the object story description"}, "object_story_link_data_link": {"type": "text", "index": 14, "name": "object_story_link_data_link", "comment": "Link of the object story link"}, "object_story_link_data_message": {"type": "text", "index": 15, "name": "object_story_link_data_message", "comment": "Link of the object story message"}, "template_app_link_spec_ios": {"type": "text", "index": 16, "name": "template_app_link_spec_ios", "comment": "Link of the object story spec for ios"}, "template_app_link_spec_ipad": {"type": "text", "index": 17, "name": "template_app_link_spec_ipad", "comment": "Link of the template app spec for ipad"}, "template_app_link_spec_android": {"type": "text", "index": 18, "name": "template_app_link_spec_android", "comment": "Link of the template app for android"}, "template_app_link_spec_iphone": {"type": "text", "index": 19, "name": "template_app_link_spec_iphone", "comment": "Link of the template app for iphone"}, "is_most_recent_record": {"type": "boolean", "index": 20, "name": "is_most_recent_record", "comment": "Indicates whether a record is the most recent version of that record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__creative_history"}, "model.facebook_ads.stg_facebook_ads__creative_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__creative_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"page_link": {"type": "character varying", "index": 1, "name": "page_link", "comment": null}, "template_page_link": {"type": "character varying", "index": 2, "name": "template_page_link", "comment": null}, "id": {"type": "bigint", "index": 3, "name": "id", "comment": null}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "url_tags": {"type": "text", "index": 6, "name": "url_tags", "comment": null}, "_fivetran_synced": {"type": "text", "index": 7, "name": "_fivetran_synced", "comment": null}, "asset_feed_spec_link_urls": {"type": "text", "index": 8, "name": "asset_feed_spec_link_urls", "comment": null}, "object_story_link_data_child_attachments": {"type": "text", "index": 9, "name": "object_story_link_data_child_attachments", "comment": null}, "object_story_link_data_caption": {"type": "text", "index": 10, "name": "object_story_link_data_caption", "comment": null}, "object_story_link_data_description": {"type": "text", "index": 11, "name": "object_story_link_data_description", "comment": null}, "object_story_link_data_link": {"type": "text", "index": 12, "name": "object_story_link_data_link", "comment": null}, "object_story_link_data_message": {"type": "text", "index": 13, "name": "object_story_link_data_message", "comment": null}, "template_app_link_spec_ios": {"type": "text", "index": 14, "name": "template_app_link_spec_ios", "comment": null}, "_fivetran_id": {"type": "text", "index": 15, "name": "_fivetran_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__creative_history_tmp"}, "model.facebook_ads.stg_facebook_ads__demographics_country": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_country", "database": "postgres", "comment": "Ads report segmented by country.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "country_id": {"type": "text", "index": 2, "name": "country_id", "comment": "Fivetran-generated unique ID of the country."}, "country": {"type": "text", "index": 3, "name": "country", "comment": "Country whose ad performance is being reported on."}, "date_day": {"type": "date", "index": 4, "name": "date_day", "comment": "The date of the reported performance."}, "account_id": {"type": "bigint", "index": 5, "name": "account_id", "comment": "The ID of the ad account that this ad belongs to."}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": "The number of impressions the ads had on the given day."}, "clicks": {"type": "integer", "index": 7, "name": "clicks", "comment": "The number of clicks on links to select destinations or experiences, on or off Facebook-owned properties. Inline link clicks use a fixed 1-day-click attribution window."}, "spend": {"type": "double precision", "index": 8, "name": "spend", "comment": "Ad spend in a given day for the breakdown."}, "reach": {"type": "integer", "index": 9, "name": "reach", "comment": "The number of people who saw any content from your Page or about your Page. This metric is estimated."}, "frequency": {"type": "double precision", "index": 10, "name": "frequency", "comment": "The average number of times each person saw your ads; it is calculated as impressions divided by reach."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_country"}, "model.facebook_ads.stg_facebook_ads__demographics_country_actions": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_country_actions", "database": "postgres", "comment": "Each record represents daily conversion performance by country. This is the prebuilt `demographics_country` report broken down by `action_type`.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "country_id": {"type": "text", "index": 2, "name": "country_id", "comment": "Fivetran-generated unique ID of the country."}, "action_type": {"type": "text", "index": 3, "name": "action_type", "comment": "The kind of actions taken on your ad, Page, app or event after your ad was served to someone, even if they didn't click on it. Action types include Page likes, app installs, conversions, event responses and more.\nActions prepended by `app_custom_event` come from mobile app events and actions prepended by `offsite_conversion` come from the Facebook Pixel."}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": "The ID of the ad account that this ad belongs to."}, "date_day": {"type": "date", "index": 5, "name": "date_day", "comment": "The date of the reported performance."}, "index": {"type": "integer", "index": 6, "name": "index", "comment": "Index reflecting the `action_type` tracked for this ad on this day. A primary key created by Fivetran utilized for tracking data, specifically when there are multiple rows associated with a single row in the parent table."}, "conversions": {"type": "double precision", "index": 7, "name": "conversions", "comment": "Conversion metric value using the default attribution window."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_country_actions"}, "model.facebook_ads.stg_facebook_ads__demographics_country_actions_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_country_actions_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "action_type": {"type": "text", "index": 4, "name": "action_type", "comment": null}, "date": {"type": "date", "index": 5, "name": "date", "comment": null}, "index": {"type": "integer", "index": 6, "name": "index", "comment": null}, "inline": {"type": "double precision", "index": 7, "name": "inline", "comment": null}, "value": {"type": "double precision", "index": 8, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_country_actions_tmp"}, "model.facebook_ads.stg_facebook_ads__demographics_country_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_country_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "country": {"type": "text", "index": 4, "name": "country", "comment": null}, "date": {"type": "date", "index": 5, "name": "date", "comment": null}, "frequency": {"type": "double precision", "index": 6, "name": "frequency", "comment": null}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": null}, "inline_link_clicks": {"type": "integer", "index": 8, "name": "inline_link_clicks", "comment": null}, "reach": {"type": "integer", "index": 9, "name": "reach", "comment": null}, "spend": {"type": "double precision", "index": 10, "name": "spend", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_country_tmp"}, "model.facebook_ads.stg_facebook_ads__demographics_region": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_region", "database": "postgres", "comment": "Ads report segmented by geographic region.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "region_id": {"type": "text", "index": 2, "name": "region_id", "comment": "Fivetran-generated unique ID of the geographic region."}, "region": {"type": "text", "index": 3, "name": "region", "comment": "Geographic region whose ad performance is being reported on."}, "date_day": {"type": "date", "index": 4, "name": "date_day", "comment": "The date of the reported performance."}, "account_id": {"type": "bigint", "index": 5, "name": "account_id", "comment": "The ID of the ad account that this ad belongs to."}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": "The number of impressions the ads had on the given day."}, "clicks": {"type": "integer", "index": 7, "name": "clicks", "comment": "The number of clicks on links to select destinations or experiences, on or off Facebook-owned properties. Inline link clicks use a fixed 1-day-click attribution window."}, "spend": {"type": "double precision", "index": 8, "name": "spend", "comment": "Ad spend in a given day for the breakdown."}, "reach": {"type": "integer", "index": 9, "name": "reach", "comment": "The number of people who saw any content from your Page or about your Page. This metric is estimated."}, "frequency": {"type": "double precision", "index": 10, "name": "frequency", "comment": "The average number of times each person saw your ads; it is calculated as impressions divided by reach."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_region"}, "model.facebook_ads.stg_facebook_ads__demographics_region_actions": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_region_actions", "database": "postgres", "comment": "Each record represents daily conversion performance by geographic region. This is the prebuilt `demographics_region` report broken down by `action_type`.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "region_id": {"type": "text", "index": 2, "name": "region_id", "comment": "Fivetran-generated unique ID of the geographic region."}, "action_type": {"type": "text", "index": 3, "name": "action_type", "comment": "The kind of actions taken on your ad, Page, app or event after your ad was served to someone, even if they didn't click on it. Action types include Page likes, app installs, conversions, event responses and more.\nActions prepended by `app_custom_event` come from mobile app events and actions prepended by `offsite_conversion` come from the Facebook Pixel."}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": "The ID of the ad account that this ad belongs to."}, "date_day": {"type": "date", "index": 5, "name": "date_day", "comment": "The date of the reported performance."}, "index": {"type": "integer", "index": 6, "name": "index", "comment": "Index reflecting the `action_type` tracked for this ad on this day. A primary key created by Fivetran utilized for tracking data, specifically when there are multiple rows associated with a single row in the parent table."}, "conversions": {"type": "double precision", "index": 7, "name": "conversions", "comment": "Conversion metric value using the default attribution window."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_region_actions"}, "model.facebook_ads.stg_facebook_ads__demographics_region_actions_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_region_actions_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "action_type": {"type": "text", "index": 4, "name": "action_type", "comment": null}, "date": {"type": "date", "index": 5, "name": "date", "comment": null}, "index": {"type": "integer", "index": 6, "name": "index", "comment": null}, "value": {"type": "double precision", "index": 7, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_region_actions_tmp"}, "model.facebook_ads.stg_facebook_ads__demographics_region_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_region_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "date": {"type": "date", "index": 4, "name": "date", "comment": null}, "frequency": {"type": "double precision", "index": 5, "name": "frequency", "comment": null}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": null}, "inline_link_clicks": {"type": "integer", "index": 7, "name": "inline_link_clicks", "comment": null}, "reach": {"type": "integer", "index": 8, "name": "reach", "comment": null}, "region": {"type": "text", "index": 9, "name": "region", "comment": null}, "spend": {"type": "double precision", "index": 10, "name": "spend", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_region_tmp"}, "model.google_ads.stg_google_ads__account_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__account_history", "database": "postgres", "comment": "Each record represents a version of an account in Google Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "integer", "index": 2, "name": "account_id", "comment": "The ID of the Account."}, "updated_at": {"type": "timestamp without time zone", "index": 3, "name": "updated_at", "comment": "Timestamp of when a record was last synced."}, "currency_code": {"type": "text", "index": 4, "name": "currency_code", "comment": "The currency of the spend reported."}, "auto_tagging_enabled": {"type": "boolean", "index": 5, "name": "auto_tagging_enabled", "comment": "Boolean indicating if auto tagging is enabled on the account ads."}, "time_zone": {"type": "integer", "index": 6, "name": "time_zone", "comment": "The time zone of the account ads."}, "account_name": {"type": "integer", "index": 7, "name": "account_name", "comment": "The descriptive name of the Customer account."}, "is_most_recent_record": {"type": "boolean", "index": 8, "name": "is_most_recent_record", "comment": "Boolean representing whether the record is the most recent version of the object."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__account_history"}, "model.google_ads.stg_google_ads__account_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__account_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "auto_tagging_enabled": {"type": "boolean", "index": 4, "name": "auto_tagging_enabled", "comment": null}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": null}, "descriptive_name": {"type": "integer", "index": 6, "name": "descriptive_name", "comment": null}, "final_url_suffix": {"type": "boolean", "index": 7, "name": "final_url_suffix", "comment": null}, "hidden": {"type": "boolean", "index": 8, "name": "hidden", "comment": null}, "manager": {"type": "integer", "index": 9, "name": "manager", "comment": null}, "manager_customer_id": {"type": "double precision", "index": 10, "name": "manager_customer_id", "comment": null}, "optimization_score": {"type": "text", "index": 11, "name": "optimization_score", "comment": null}, "pay_per_conversion_eligibility_failure_reasons": {"type": "boolean", "index": 12, "name": "pay_per_conversion_eligibility_failure_reasons", "comment": null}, "test_account": {"type": "text", "index": 13, "name": "test_account", "comment": null}, "time_zone": {"type": "integer", "index": 14, "name": "time_zone", "comment": null}, "tracking_url_template": {"type": "integer", "index": 15, "name": "tracking_url_template", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__account_history_tmp"}, "model.google_ads.stg_google_ads__account_stats": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__account_stats", "database": "postgres", "comment": "Each record represents the daily performance of an account in Google Ads broken down to the ad network and device type.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "integer", "index": 2, "name": "account_id", "comment": "The Customer ID."}, "date_day": {"type": "date", "index": 3, "name": "date_day", "comment": "The date being reported on."}, "ad_network_type": {"type": "text", "index": 4, "name": "ad_network_type", "comment": "The Google Ad network type used across the account."}, "device": {"type": "text", "index": 5, "name": "device", "comment": "Account ad performance per unique device where the ads were served."}, "clicks": {"type": "integer", "index": 6, "name": "clicks", "comment": "The number of clicks."}, "spend": {"type": "numeric", "index": 7, "name": "spend", "comment": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "impressions": {"type": "integer", "index": 8, "name": "impressions", "comment": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "conversions": {"type": "integer", "index": 9, "name": "conversions", "comment": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business."}, "conversions_value": {"type": "integer", "index": 10, "name": "conversions_value", "comment": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful."}, "view_through_conversions": {"type": "integer", "index": 11, "name": "view_through_conversions", "comment": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__account_stats"}, "model.google_ads.stg_google_ads__account_stats_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__account_stats_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "customer_id": {"type": "integer", "index": 2, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "active_view_impressions": {"type": "integer", "index": 5, "name": "active_view_impressions", "comment": null}, "active_view_measurability": {"type": "integer", "index": 6, "name": "active_view_measurability", "comment": null}, "active_view_measurable_cost_micros": {"type": "integer", "index": 7, "name": "active_view_measurable_cost_micros", "comment": null}, "active_view_measurable_impressions": {"type": "integer", "index": 8, "name": "active_view_measurable_impressions", "comment": null}, "active_view_viewability": {"type": "integer", "index": 9, "name": "active_view_viewability", "comment": null}, "ad_network_type": {"type": "text", "index": 10, "name": "ad_network_type", "comment": null}, "clicks": {"type": "integer", "index": 11, "name": "clicks", "comment": null}, "conversions": {"type": "integer", "index": 12, "name": "conversions", "comment": null}, "conversions_value": {"type": "integer", "index": 13, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 14, "name": "cost_micros", "comment": null}, "device": {"type": "text", "index": 15, "name": "device", "comment": null}, "impressions": {"type": "integer", "index": 16, "name": "impressions", "comment": null}, "interaction_event_types": {"type": "text", "index": 17, "name": "interaction_event_types", "comment": null}, "interactions": {"type": "integer", "index": 18, "name": "interactions", "comment": null}, "view_through_conversions": {"type": "integer", "index": 19, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__account_stats_tmp"}, "model.google_ads.stg_google_ads__ad_group_criterion_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_group_criterion_history", "database": "postgres", "comment": "Each record represents a historical version of an ad group criterion in Google Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "criterion_id": {"type": "bigint", "index": 2, "name": "criterion_id", "comment": "Unique identifier of the ad group criterion."}, "ad_group_id": {"type": "text", "index": 3, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "base_campaign_id": {"type": "bigint", "index": 4, "name": "base_campaign_id", "comment": "The ID of the Campaign."}, "updated_at": {"type": "timestamp without time zone", "index": 5, "name": "updated_at", "comment": "Timestamp of when the record was last updated in Google Ads."}, "type": {"type": "text", "index": 6, "name": "type", "comment": "The type of ad group criterion."}, "status": {"type": "text", "index": 7, "name": "status", "comment": "The current status of the ad group criterion."}, "keyword_match_type": {"type": "text", "index": 8, "name": "keyword_match_type", "comment": "The match type which dictate how closely the keyword needs to match with the user\u2019s search query so that the ad can be considered for the auction."}, "keyword_text": {"type": "text", "index": 9, "name": "keyword_text", "comment": "The text used within the keyword criterion that is being matched against."}, "is_most_recent_record": {"type": "boolean", "index": 10, "name": "is_most_recent_record", "comment": "Boolean representing whether the record is the most recent version of the object."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__ad_group_criterion_history"}, "model.google_ads.stg_google_ads__ad_group_criterion_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_group_criterion_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 2, "name": "ad_group_id", "comment": null}, "base_campaign_id": {"type": "bigint", "index": 3, "name": "base_campaign_id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 4, "name": "updated_at", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "type": {"type": "text", "index": 6, "name": "type", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}, "keyword_match_type": {"type": "text", "index": 8, "name": "keyword_match_type", "comment": null}, "keyword_text": {"type": "text", "index": 9, "name": "keyword_text", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__ad_group_criterion_history_tmp"}, "model.google_ads.stg_google_ads__ad_group_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_group_history", "database": "postgres", "comment": "Each record represents a version of an ad group in Google Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_group_id": {"type": "text", "index": 2, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "updated_at": {"type": "timestamp without time zone", "index": 3, "name": "updated_at", "comment": "Timestamp of when the record was last updated in Google Ads."}, "ad_group_type": {"type": "text", "index": 4, "name": "ad_group_type", "comment": "The type of the ad group in Google Ads."}, "campaign_id": {"type": "bigint", "index": 5, "name": "campaign_id", "comment": "The ID of the Campaign."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "The name of the Campaign."}, "ad_group_name": {"type": "text", "index": 7, "name": "ad_group_name", "comment": "The name of the AdGroup."}, "ad_group_status": {"type": "text", "index": 8, "name": "ad_group_status", "comment": "Status of the ad group."}, "is_most_recent_record": {"type": "boolean", "index": 9, "name": "is_most_recent_record", "comment": "Boolean representing whether the record is the most recent version of the object."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__ad_group_history"}, "model.google_ads.stg_google_ads__ad_group_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_group_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "type": {"type": "text", "index": 3, "name": "type", "comment": null}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__ad_group_history_tmp"}, "model.google_ads.stg_google_ads__ad_group_stats": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_group_stats", "database": "postgres", "comment": "Each record represents the daily performance of an ad group in Google Ads broken down to the ad network and device type.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": "The Customer ID."}, "date_day": {"type": "date", "index": 3, "name": "date_day", "comment": "The date being reported on."}, "ad_group_id": {"type": "text", "index": 4, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "campaign_id": {"type": "bigint", "index": 5, "name": "campaign_id", "comment": "The ID of the Campaign."}, "device": {"type": "text", "index": 6, "name": "device", "comment": "Account ad performance per unique device where the ads were served."}, "ad_network_type": {"type": "text", "index": 7, "name": "ad_network_type", "comment": "The Google Ad network type used across the account."}, "clicks": {"type": "integer", "index": 8, "name": "clicks", "comment": "The number of clicks."}, "spend": {"type": "numeric", "index": 9, "name": "spend", "comment": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "impressions": {"type": "integer", "index": 10, "name": "impressions", "comment": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "conversions": {"type": "double precision", "index": 11, "name": "conversions", "comment": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business."}, "conversions_value": {"type": "integer", "index": 12, "name": "conversions_value", "comment": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful."}, "view_through_conversions": {"type": "integer", "index": 13, "name": "view_through_conversions", "comment": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__ad_group_stats"}, "model.google_ads.stg_google_ads__ad_group_stats_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_group_stats_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "customer_id": {"type": "bigint", "index": 2, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "active_view_impressions": {"type": "integer", "index": 5, "name": "active_view_impressions", "comment": null}, "active_view_measurability": {"type": "integer", "index": 6, "name": "active_view_measurability", "comment": null}, "active_view_measurable_cost_micros": {"type": "integer", "index": 7, "name": "active_view_measurable_cost_micros", "comment": null}, "active_view_measurable_impressions": {"type": "integer", "index": 8, "name": "active_view_measurable_impressions", "comment": null}, "active_view_viewability": {"type": "integer", "index": 9, "name": "active_view_viewability", "comment": null}, "ad_network_type": {"type": "text", "index": 10, "name": "ad_network_type", "comment": null}, "base_ad_group": {"type": "text", "index": 11, "name": "base_ad_group", "comment": null}, "campaign_base_campaign": {"type": "text", "index": 12, "name": "campaign_base_campaign", "comment": null}, "campaign_id": {"type": "bigint", "index": 13, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 14, "name": "clicks", "comment": null}, "conversions": {"type": "double precision", "index": 15, "name": "conversions", "comment": null}, "conversions_value": {"type": "integer", "index": 16, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 17, "name": "cost_micros", "comment": null}, "device": {"type": "text", "index": 18, "name": "device", "comment": null}, "id": {"type": "bigint", "index": 19, "name": "id", "comment": null}, "impressions": {"type": "integer", "index": 20, "name": "impressions", "comment": null}, "interaction_event_types": {"type": "text", "index": 21, "name": "interaction_event_types", "comment": null}, "interactions": {"type": "integer", "index": 22, "name": "interactions", "comment": null}, "view_through_conversions": {"type": "integer", "index": 23, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__ad_group_stats_tmp"}, "model.google_ads.stg_google_ads__ad_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_history", "database": "postgres", "comment": "Each record represents a version of an ad in Google Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_group_id": {"type": "text", "index": 2, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "ad_id": {"type": "bigint", "index": 3, "name": "ad_id", "comment": "The ID of the Ad."}, "ad_name": {"type": "integer", "index": 4, "name": "ad_name", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 5, "name": "updated_at", "comment": "Timestamp of when the record was last updated in Google Ads."}, "ad_type": {"type": "integer", "index": 6, "name": "ad_type", "comment": "The type of the ad in Google Ads."}, "ad_status": {"type": "text", "index": 7, "name": "ad_status", "comment": "Status of the Ad."}, "display_url": {"type": "integer", "index": 8, "name": "display_url", "comment": "The display url of the ad that is being served."}, "source_final_urls": {"type": "text", "index": 9, "name": "source_final_urls", "comment": "The original list of final urls expressed as an array. Please be aware the test used on this field is intended to warn you if you have fields with multiple urls. If you do, the `final_url` field will filter down the urls within the array to just the first. Therefore, this package will only leverage one of possibly many urls within this field array."}, "final_urls": {"type": "text", "index": 10, "name": "final_urls", "comment": null}, "is_most_recent_record": {"type": "boolean", "index": 11, "name": "is_most_recent_record", "comment": "Boolean representing whether the record is the most recent version of the object."}, "final_url": {"type": "text", "index": 12, "name": "final_url", "comment": "The first url in the list of the urls within the `final_urls` source field."}, "base_url": {"type": "text", "index": 13, "name": "base_url", "comment": "The base URL of the ad, extracted from the `final_urls`."}, "url_host": {"type": "text", "index": 14, "name": "url_host", "comment": "The URL host of the ad, extracted from the `final_urls`."}, "url_path": {"type": "text", "index": 15, "name": "url_path", "comment": "The URL path of the ad, extracted from the `final_urls`."}, "utm_source": {"type": "text", "index": 16, "name": "utm_source", "comment": "The utm_source parameter of the ad, extracted from the `final_urls`."}, "utm_medium": {"type": "text", "index": 17, "name": "utm_medium", "comment": "The utm_medium parameter of the ad, extracted from the `final_urls`."}, "utm_campaign": {"type": "text", "index": 18, "name": "utm_campaign", "comment": "The utm_campaign parameter of the ad, extracted from the `final_urls`."}, "utm_content": {"type": "text", "index": 19, "name": "utm_content", "comment": "The utm_content parameter of the ad, extracted from the `final_urls`."}, "utm_term": {"type": "text", "index": 20, "name": "utm_term", "comment": "The utm_term parameter of the ad, extracted from the `final_urls`."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__ad_history"}, "model.google_ads.stg_google_ads__ad_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "bigint", "index": 1, "name": "ad_group_id", "comment": null}, "id": {"type": "bigint", "index": 2, "name": "id", "comment": null}, "name": {"type": "integer", "index": 3, "name": "name", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 4, "name": "updated_at", "comment": null}, "type": {"type": "integer", "index": 5, "name": "type", "comment": null}, "status": {"type": "text", "index": 6, "name": "status", "comment": null}, "display_url": {"type": "integer", "index": 7, "name": "display_url", "comment": null}, "final_urls": {"type": "text", "index": 8, "name": "final_urls", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__ad_history_tmp"}, "model.google_ads.stg_google_ads__ad_stats": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_stats", "database": "postgres", "comment": "Each record represents the daily performance of an ad in Google Ads broken down to the ad network, device type, and ad_group_id.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": "The Customer ID."}, "date_day": {"type": "date", "index": 3, "name": "date_day", "comment": "The date being reported on."}, "ad_group_id": {"type": "text", "index": 4, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "keyword_ad_group_criterion": {"type": "text", "index": 5, "name": "keyword_ad_group_criterion", "comment": "The ad group which the keyword criterion resides."}, "ad_network_type": {"type": "text", "index": 6, "name": "ad_network_type", "comment": "The Google Ad network type used across the account."}, "device": {"type": "text", "index": 7, "name": "device", "comment": "Account ad performance per unique device where the ads were served."}, "ad_id": {"type": "bigint", "index": 8, "name": "ad_id", "comment": "The ID of the Ad."}, "campaign_id": {"type": "bigint", "index": 9, "name": "campaign_id", "comment": "The ID of the Campaign."}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": "The number of clicks."}, "spend": {"type": "numeric", "index": 11, "name": "spend", "comment": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "impressions": {"type": "integer", "index": 12, "name": "impressions", "comment": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "conversions": {"type": "integer", "index": 13, "name": "conversions", "comment": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business."}, "conversions_value": {"type": "double precision", "index": 14, "name": "conversions_value", "comment": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful."}, "view_through_conversions": {"type": "integer", "index": 15, "name": "view_through_conversions", "comment": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__ad_stats"}, "model.google_ads.stg_google_ads__ad_stats_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_stats_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"customer_id": {"type": "bigint", "index": 1, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "ad_group": {"type": "text", "index": 4, "name": "ad_group", "comment": null}, "keyword_ad_group_criterion": {"type": "text", "index": 5, "name": "keyword_ad_group_criterion", "comment": null}, "ad_network_type": {"type": "text", "index": 6, "name": "ad_network_type", "comment": null}, "device": {"type": "text", "index": 7, "name": "device", "comment": null}, "ad_id": {"type": "bigint", "index": 8, "name": "ad_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 9, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": null}, "cost_micros": {"type": "integer", "index": 11, "name": "cost_micros", "comment": null}, "impressions": {"type": "integer", "index": 12, "name": "impressions", "comment": null}, "conversions": {"type": "integer", "index": 13, "name": "conversions", "comment": null}, "conversions_value": {"type": "double precision", "index": 14, "name": "conversions_value", "comment": null}, "view_through_conversions": {"type": "integer", "index": 15, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__ad_stats_tmp"}, "model.google_ads.stg_google_ads__campaign_bid_modifier_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_bid_modifier_history", "database": "postgres", "comment": "Each record represents a historical version of a campaign bid modifier in Google Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_id": {"type": "bigint", "index": 2, "name": "campaign_id", "comment": "The ID of the Campaign."}, "criterion_id": {"type": "bigint", "index": 3, "name": "criterion_id", "comment": "Unique identifier of the criterion that the bid modifier is applied to."}, "bid_modifier": {"type": "double precision", "index": 4, "name": "bid_modifier", "comment": "The modifier applied to the bid for this criterion."}, "interaction_type": {"type": "text", "index": 5, "name": "interaction_type", "comment": "The type of interaction for the bid modifier."}, "interaction_event_types": {"type": "text", "index": 6, "name": "interaction_event_types", "comment": "The event types for the interaction."}, "updated_at": {"type": "timestamp without time zone", "index": 7, "name": "updated_at", "comment": "Timestamp of when the record was last updated in Google Ads."}, "is_most_recent_record": {"type": "boolean", "index": 8, "name": "is_most_recent_record", "comment": "Boolean representing whether the record is the most recent version of the object."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__campaign_bid_modifier_history"}, "model.google_ads.stg_google_ads__campaign_bid_modifier_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_bid_modifier_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "bigint", "index": 1, "name": "campaign_id", "comment": null}, "criterion_id": {"type": "bigint", "index": 2, "name": "criterion_id", "comment": null}, "bid_modifier": {"type": "double precision", "index": 3, "name": "bid_modifier", "comment": null}, "interaction_type": {"type": "text", "index": 4, "name": "interaction_type", "comment": null}, "interaction_event_types": {"type": "text", "index": 5, "name": "interaction_event_types", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 6, "name": "updated_at", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 7, "name": "_fivetran_active", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__campaign_bid_modifier_history_tmp"}, "model.google_ads.stg_google_ads__campaign_bidding_strategy_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_bidding_strategy_history", "database": "postgres", "comment": "Each record represents a historical version of a campaign bidding strategy in Google Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_id": {"type": "bigint", "index": 2, "name": "campaign_id", "comment": "The ID of the Campaign."}, "updated_at": {"type": "timestamp without time zone", "index": 3, "name": "updated_at", "comment": "Timestamp of when the record was last updated in Google Ads."}, "enhanced_cpc": {"type": "boolean", "index": 4, "name": "enhanced_cpc", "comment": "Boolean indicating if enhanced CPC is enabled."}, "manual_cpa": {"type": "double precision", "index": 5, "name": "manual_cpa", "comment": "Manual cost per acquisition setting."}, "manual_cpm": {"type": "double precision", "index": 6, "name": "manual_cpm", "comment": "Manual cost per mille setting."}, "manual_cpv": {"type": "double precision", "index": 7, "name": "manual_cpv", "comment": "Manual cost per view setting."}, "bidding_status": {"type": "text", "index": 8, "name": "bidding_status", "comment": "The status of the bidding strategy."}, "target_cpa": {"type": "numeric", "index": 9, "name": "target_cpa", "comment": "Target cost per acquisition in dollars, converted from target_cpa_micros."}, "target_roas": {"type": "double precision", "index": 10, "name": "target_roas", "comment": "Target return on ad spend."}, "bidding_strategy_type": {"type": "text", "index": 11, "name": "bidding_strategy_type", "comment": "The type of bidding strategy (MANUAL_CPC, TARGET_CPA, etc.)."}, "is_most_recent_record": {"type": "boolean", "index": 12, "name": "is_most_recent_record", "comment": "Boolean representing whether the record is the most recent version of the object."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__campaign_bidding_strategy_history"}, "model.google_ads.stg_google_ads__campaign_bidding_strategy_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_bidding_strategy_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "bigint", "index": 1, "name": "campaign_id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "cpc_bid_ceiling_micros": {"type": "integer", "index": 3, "name": "cpc_bid_ceiling_micros", "comment": null}, "cpc_bid_floor_micros": {"type": "integer", "index": 4, "name": "cpc_bid_floor_micros", "comment": null}, "enhanced_cpc": {"type": "boolean", "index": 5, "name": "enhanced_cpc", "comment": null}, "enhanced_cpc_enabled": {"type": "boolean", "index": 6, "name": "enhanced_cpc_enabled", "comment": null}, "location": {"type": "text", "index": 7, "name": "location", "comment": null}, "location_fraction_micros": {"type": "integer", "index": 8, "name": "location_fraction_micros", "comment": null}, "manual_cpa": {"type": "double precision", "index": 9, "name": "manual_cpa", "comment": null}, "manual_cpm": {"type": "double precision", "index": 10, "name": "manual_cpm", "comment": null}, "manual_cpv": {"type": "double precision", "index": 11, "name": "manual_cpv", "comment": null}, "name": {"type": "text", "index": 12, "name": "name", "comment": null}, "status": {"type": "text", "index": 13, "name": "status", "comment": null}, "target_cpa_micros": {"type": "integer", "index": 14, "name": "target_cpa_micros", "comment": null}, "target_cpm": {"type": "integer", "index": 15, "name": "target_cpm", "comment": null}, "target_roas": {"type": "double precision", "index": 16, "name": "target_roas", "comment": null}, "type": {"type": "text", "index": 17, "name": "type", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 18, "name": "_fivetran_active", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 19, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__campaign_bidding_strategy_history_tmp"}, "model.google_ads.stg_google_ads__campaign_budget_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_budget_history", "database": "postgres", "comment": "Each record represents a historical version of a campaign budget in Google Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": "Timestamp of when the record was last updated in Google Ads."}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": "The ID of the Campaign."}, "daily_budget": {"type": "numeric", "index": 4, "name": "daily_budget", "comment": "The daily budget amount in dollars, converted from amount_micros."}, "budget_status": {"type": "text", "index": 5, "name": "budget_status", "comment": "The status of the budget."}, "has_recommended_budget": {"type": "boolean", "index": 6, "name": "has_recommended_budget", "comment": "Boolean indicating if Google has a recommended budget for this campaign."}, "recommended_daily_budget": {"type": "numeric", "index": 7, "name": "recommended_daily_budget", "comment": "Google's recommended daily budget amount in dollars, converted from recommended_budget_amount_micros."}, "total_budget": {"type": "numeric", "index": 8, "name": "total_budget", "comment": "The total budget amount in dollars for lifetime budgets, converted from total_amount_micros."}, "budget_type": {"type": "text", "index": 9, "name": "budget_type", "comment": "The type of budget (DAILY, LIFETIME, etc.)."}, "is_most_recent_record": {"type": "boolean", "index": 10, "name": "is_most_recent_record", "comment": "Boolean representing whether the record is the most recent version of the object."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__campaign_budget_history"}, "model.google_ads.stg_google_ads__campaign_budget_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_budget_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "amount_micros": {"type": "integer", "index": 4, "name": "amount_micros", "comment": null}, "delivery_method": {"type": "text", "index": 5, "name": "delivery_method", "comment": null}, "explicitly_shared": {"type": "boolean", "index": 6, "name": "explicitly_shared", "comment": null}, "name": {"type": "text", "index": 7, "name": "name", "comment": null}, "reference_count": {"type": "integer", "index": 8, "name": "reference_count", "comment": null}, "status": {"type": "text", "index": 9, "name": "status", "comment": null}, "has_recommended_budget": {"type": "boolean", "index": 10, "name": "has_recommended_budget", "comment": null}, "period": {"type": "text", "index": 11, "name": "period", "comment": null}, "recommended_budget_amount_micros": {"type": "integer", "index": 12, "name": "recommended_budget_amount_micros", "comment": null}, "total_amount_micros": {"type": "integer", "index": 13, "name": "total_amount_micros", "comment": null}, "type": {"type": "text", "index": 14, "name": "type", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 15, "name": "_fivetran_active", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 16, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__campaign_budget_history_tmp"}, "model.google_ads.stg_google_ads__campaign_criterion_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_criterion_history", "database": "postgres", "comment": "Each record represents a historical version of a campaign criterion in Google Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "criterion_id": {"type": "bigint", "index": 2, "name": "criterion_id", "comment": "Unique identifier of the campaign criterion."}, "updated_at": {"type": "timestamp without time zone", "index": 3, "name": "updated_at", "comment": "Timestamp of when the record was last updated in Google Ads."}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": "The ID of the Campaign."}, "geo_target_constant_id": {"type": "bigint", "index": 5, "name": "geo_target_constant_id", "comment": "The geographic target constant ID for location targeting."}, "topic_constant_id": {"type": "bigint", "index": 6, "name": "topic_constant_id", "comment": "The topic constant ID for topic targeting."}, "user_list_id": {"type": "bigint", "index": 7, "name": "user_list_id", "comment": "The user list ID for audience targeting."}, "age_range_type": {"type": "text", "index": 8, "name": "age_range_type", "comment": "The age range type for demographic targeting."}, "device_type": {"type": "text", "index": 9, "name": "device_type", "comment": "The device type for targeting (MOBILE, DESKTOP, TABLET)."}, "gender_type": {"type": "text", "index": 10, "name": "gender_type", "comment": "The gender type for demographic targeting."}, "income_range_type": {"type": "text", "index": 11, "name": "income_range_type", "comment": "The income range type for demographic targeting."}, "keyword_text": {"type": "text", "index": 12, "name": "keyword_text", "comment": "The keyword text for keyword targeting."}, "parental_status_type": {"type": "text", "index": 13, "name": "parental_status_type", "comment": "The parental status type for demographic targeting."}, "placement_url": {"type": "text", "index": 14, "name": "placement_url", "comment": "The placement URL for placement targeting."}, "is_most_recent_record": {"type": "boolean", "index": 15, "name": "is_most_recent_record", "comment": "Boolean representing whether the record is the most recent version of the object."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__campaign_criterion_history"}, "model.google_ads.stg_google_ads__campaign_criterion_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_criterion_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "geo_target_constant_id": {"type": "bigint", "index": 4, "name": "geo_target_constant_id", "comment": null}, "mobile_device_id": {"type": "bigint", "index": 5, "name": "mobile_device_id", "comment": null}, "operating_system_version_id": {"type": "bigint", "index": 6, "name": "operating_system_version_id", "comment": null}, "topic_constant_id": {"type": "bigint", "index": 7, "name": "topic_constant_id", "comment": null}, "user_interest_id": {"type": "bigint", "index": 8, "name": "user_interest_id", "comment": null}, "user_list_id": {"type": "bigint", "index": 9, "name": "user_list_id", "comment": null}, "age_range_type": {"type": "text", "index": 10, "name": "age_range_type", "comment": null}, "bid_modifier": {"type": "double precision", "index": 11, "name": "bid_modifier", "comment": null}, "carrier_country_code": {"type": "text", "index": 12, "name": "carrier_country_code", "comment": null}, "carrier_name": {"type": "text", "index": 13, "name": "carrier_name", "comment": null}, "content_label_type": {"type": "text", "index": 14, "name": "content_label_type", "comment": null}, "device_type": {"type": "text", "index": 15, "name": "device_type", "comment": null}, "display_name": {"type": "text", "index": 16, "name": "display_name", "comment": null}, "gender_type": {"type": "text", "index": 17, "name": "gender_type", "comment": null}, "income_range_type": {"type": "text", "index": 18, "name": "income_range_type", "comment": null}, "ip_block_ip_address": {"type": "text", "index": 19, "name": "ip_block_ip_address", "comment": null}, "negative": {"type": "boolean", "index": 20, "name": "negative", "comment": null}, "keyword_match_type": {"type": "text", "index": 21, "name": "keyword_match_type", "comment": null}, "keyword_text": {"type": "text", "index": 22, "name": "keyword_text", "comment": null}, "language_code": {"type": "text", "index": 23, "name": "language_code", "comment": null}, "language_name": {"type": "text", "index": 24, "name": "language_name", "comment": null}, "mobile_app_category_constant_id": {"type": "bigint", "index": 25, "name": "mobile_app_category_constant_id", "comment": null}, "mobile_app_category_constant_name": {"type": "text", "index": 26, "name": "mobile_app_category_constant_name", "comment": null}, "mobile_application_app_id": {"type": "text", "index": 27, "name": "mobile_application_app_id", "comment": null}, "mobile_application_name": {"type": "text", "index": 28, "name": "mobile_application_name", "comment": null}, "parental_status_type": {"type": "text", "index": 29, "name": "parental_status_type", "comment": null}, "placement_url": {"type": "text", "index": 30, "name": "placement_url", "comment": null}, "status": {"type": "text", "index": 31, "name": "status", "comment": null}, "type": {"type": "text", "index": 32, "name": "type", "comment": null}, "youtube_channel_id": {"type": "text", "index": 33, "name": "youtube_channel_id", "comment": null}, "youtube_video_id": {"type": "text", "index": 34, "name": "youtube_video_id", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 35, "name": "_fivetran_active", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 36, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__campaign_criterion_history_tmp"}, "model.google_ads.stg_google_ads__campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_history", "database": "postgres", "comment": "Each record represents a version of a campaign in Google Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_id": {"type": "bigint", "index": 2, "name": "campaign_id", "comment": "The ID of the Campaign."}, "updated_at": {"type": "timestamp without time zone", "index": 3, "name": "updated_at", "comment": "Timestamp of when the record was last updated in Google Ads."}, "campaign_name": {"type": "text", "index": 4, "name": "campaign_name", "comment": "The name of the Campaign."}, "account_id": {"type": "bigint", "index": 5, "name": "account_id", "comment": "The Customer ID."}, "advertising_channel_type": {"type": "text", "index": 6, "name": "advertising_channel_type", "comment": "The type of advertising channel being used by the campaign."}, "advertising_channel_subtype": {"type": "text", "index": 7, "name": "advertising_channel_subtype", "comment": "The advertising channel subtype that is being used by the campaign."}, "start_date": {"type": "text", "index": 8, "name": "start_date", "comment": "The start date of the campaign. Uses start_date_time when available, falls back to start_date for backward compatibility."}, "end_date": {"type": "text", "index": 9, "name": "end_date", "comment": "The end date of the campaign. Uses end_date_time when available, falls back to end_date for backward compatibility."}, "serving_status": {"type": "text", "index": 10, "name": "serving_status", "comment": "Status of the ads and how they are currently being served."}, "status": {"type": "text", "index": 11, "name": "status", "comment": "General status of the campaign."}, "tracking_url_template": {"type": "integer", "index": 12, "name": "tracking_url_template", "comment": "The tracking url template being used throughout the campaign ads."}, "is_most_recent_record": {"type": "boolean", "index": 13, "name": "is_most_recent_record", "comment": "Boolean representing whether the record is the most recent version of the object."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__campaign_history"}, "model.google_ads.stg_google_ads__campaign_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "customer_id": {"type": "bigint", "index": 4, "name": "customer_id", "comment": null}, "advertising_channel_type": {"type": "text", "index": 5, "name": "advertising_channel_type", "comment": null}, "advertising_channel_subtype": {"type": "text", "index": 6, "name": "advertising_channel_subtype", "comment": null}, "start_date": {"type": "date", "index": 7, "name": "start_date", "comment": null}, "end_date": {"type": "date", "index": 8, "name": "end_date", "comment": null}, "serving_status": {"type": "text", "index": 9, "name": "serving_status", "comment": null}, "status": {"type": "text", "index": 10, "name": "status", "comment": null}, "tracking_url_template": {"type": "integer", "index": 11, "name": "tracking_url_template", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__campaign_history_tmp"}, "model.google_ads.stg_google_ads__campaign_stats": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_stats", "database": "postgres", "comment": "Each record represents the daily performance of a campaign in Google Ads broken down to the ad network and device type.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": "The Customer ID."}, "date_day": {"type": "date", "index": 3, "name": "date_day", "comment": "The date being reported on."}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": "The ID of the Campaign."}, "ad_network_type": {"type": "text", "index": 5, "name": "ad_network_type", "comment": "The Google Ad network type used across the account."}, "device": {"type": "text", "index": 6, "name": "device", "comment": "Account ad performance per unique device where the ads were served."}, "clicks": {"type": "integer", "index": 7, "name": "clicks", "comment": "The number of clicks."}, "spend": {"type": "numeric", "index": 8, "name": "spend", "comment": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "conversions": {"type": "integer", "index": 10, "name": "conversions", "comment": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business."}, "conversions_value": {"type": "integer", "index": 11, "name": "conversions_value", "comment": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful."}, "view_through_conversions": {"type": "integer", "index": 12, "name": "view_through_conversions", "comment": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__campaign_stats"}, "model.google_ads.stg_google_ads__campaign_stats_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_stats_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "customer_id": {"type": "bigint", "index": 2, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "active_view_impressions": {"type": "integer", "index": 5, "name": "active_view_impressions", "comment": null}, "active_view_measurability": {"type": "integer", "index": 6, "name": "active_view_measurability", "comment": null}, "active_view_measurable_cost_micros": {"type": "integer", "index": 7, "name": "active_view_measurable_cost_micros", "comment": null}, "active_view_measurable_impressions": {"type": "integer", "index": 8, "name": "active_view_measurable_impressions", "comment": null}, "active_view_viewability": {"type": "integer", "index": 9, "name": "active_view_viewability", "comment": null}, "ad_network_type": {"type": "text", "index": 10, "name": "ad_network_type", "comment": null}, "base_campaign": {"type": "text", "index": 11, "name": "base_campaign", "comment": null}, "clicks": {"type": "integer", "index": 12, "name": "clicks", "comment": null}, "conversions": {"type": "integer", "index": 13, "name": "conversions", "comment": null}, "conversions_value": {"type": "integer", "index": 14, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 15, "name": "cost_micros", "comment": null}, "device": {"type": "text", "index": 16, "name": "device", "comment": null}, "id": {"type": "bigint", "index": 17, "name": "id", "comment": null}, "impressions": {"type": "integer", "index": 18, "name": "impressions", "comment": null}, "interaction_event_types": {"type": "text", "index": 19, "name": "interaction_event_types", "comment": null}, "interactions": {"type": "integer", "index": 20, "name": "interactions", "comment": null}, "view_through_conversions": {"type": "integer", "index": 21, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__campaign_stats_tmp"}, "model.google_ads.stg_google_ads__keyword_stats": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__keyword_stats", "database": "postgres", "comment": "Each record represents the daily performance of a keyword in Google Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "keyword_id": {"type": "text", "index": 2, "name": "keyword_id", "comment": "The unique ID of the keyword record."}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": "The Customer ID."}, "date_day": {"type": "date", "index": 4, "name": "date_day", "comment": "The date being reported on."}, "ad_group_id": {"type": "text", "index": 5, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "criterion_id": {"type": "bigint", "index": 6, "name": "criterion_id", "comment": "Reference to the ad group criterion used for the keyword."}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": "The ID of the Campaign."}, "clicks": {"type": "integer", "index": 8, "name": "clicks", "comment": "The number of clicks."}, "spend": {"type": "numeric", "index": 9, "name": "spend", "comment": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "impressions": {"type": "integer", "index": 10, "name": "impressions", "comment": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "conversions": {"type": "integer", "index": 11, "name": "conversions", "comment": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business."}, "conversions_value": {"type": "integer", "index": 12, "name": "conversions_value", "comment": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful."}, "view_through_conversions": {"type": "integer", "index": 13, "name": "view_through_conversions", "comment": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__keyword_stats"}, "model.google_ads.stg_google_ads__keyword_stats_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__keyword_stats_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "customer_id": {"type": "bigint", "index": 2, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "active_view_impressions": {"type": "integer", "index": 5, "name": "active_view_impressions", "comment": null}, "active_view_measurability": {"type": "integer", "index": 6, "name": "active_view_measurability", "comment": null}, "active_view_measurable_cost_micros": {"type": "integer", "index": 7, "name": "active_view_measurable_cost_micros", "comment": null}, "active_view_measurable_impressions": {"type": "integer", "index": 8, "name": "active_view_measurable_impressions", "comment": null}, "active_view_viewability": {"type": "integer", "index": 9, "name": "active_view_viewability", "comment": null}, "ad_group_base_ad_group": {"type": "text", "index": 10, "name": "ad_group_base_ad_group", "comment": null}, "ad_group_criterion_criterion_id": {"type": "bigint", "index": 11, "name": "ad_group_criterion_criterion_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 12, "name": "ad_group_id", "comment": null}, "ad_network_type": {"type": "text", "index": 13, "name": "ad_network_type", "comment": null}, "campaign_base_campaign": {"type": "text", "index": 14, "name": "campaign_base_campaign", "comment": null}, "campaign_id": {"type": "bigint", "index": 15, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 16, "name": "clicks", "comment": null}, "conversions": {"type": "integer", "index": 17, "name": "conversions", "comment": null}, "conversions_value": {"type": "integer", "index": 18, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 19, "name": "cost_micros", "comment": null}, "device": {"type": "text", "index": 20, "name": "device", "comment": null}, "impressions": {"type": "integer", "index": 21, "name": "impressions", "comment": null}, "interaction_event_types": {"type": "text", "index": 22, "name": "interaction_event_types", "comment": null}, "interactions": {"type": "integer", "index": 23, "name": "interactions", "comment": null}, "view_through_conversions": {"type": "integer", "index": 24, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__keyword_stats_tmp"}, "model.google_ads.stg_google_ads__search_term_keyword_stats": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__search_term_keyword_stats", "database": "postgres", "comment": "Each record represents the daily performance of a search term (including associated tracked keywords) in Google Ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": "The Customer ID."}, "date_day": {"type": "date", "index": 3, "name": "date_day", "comment": "The date being reported on."}, "search_term_id": {"type": "text", "index": 4, "name": "search_term_id", "comment": "The unique ID of the search term record."}, "ad_group_id": {"type": "text", "index": 5, "name": "ad_group_id", "comment": "The ID of the AdGroup."}, "campaign_id": {"type": "bigint", "index": 6, "name": "campaign_id", "comment": "The ID of the Campaign."}, "keyword_ad_group_criterion": {"type": "text", "index": 7, "name": "keyword_ad_group_criterion", "comment": "The resource name of the keyword's ad group criterion. Ad group criterion resource names have the form: `customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}`"}, "criterion_id": {"type": "text", "index": 8, "name": "criterion_id", "comment": "Reference to the ad group criterion used for the associated keyword. One `keyword_text` may have multiple `criterion_id` values."}, "search_term": {"type": "text", "index": 9, "name": "search_term", "comment": "A word or set of words a person enters when searching on Google or one of Google's Search Network sites"}, "keyword_text": {"type": "text", "index": 10, "name": "keyword_text", "comment": "The text of the keyword (at most 80 characters and 10 words)."}, "search_term_match_type": {"type": "text", "index": 11, "name": "search_term_match_type", "comment": "How closely the search terms that triggered your ads on Google are related to the actual keywords in your account. Can be `BROAD` ,`EXACT`, `PHRASE`, `UNKNOWN`, or `UNSPECIFIED`.\n\nSee more details [here](https://support.google.com/google-ads/answer/7478529?sjid=15681083914881504235-NC&visit_id=638760377693438101-1187740487&rd=1)."}, "status": {"type": "text", "index": 12, "name": "status", "comment": "Indicates whether the search term is currently one of your targeted or excluded keywords. Possible values: `ADDED`, `ADDED_EXCLUDED`, `EXCLUDED`, `NONE`, `UNKNOWN`, or `UNSPECIFIED`"}, "clicks": {"type": "integer", "index": 13, "name": "clicks", "comment": "The number of clicks."}, "spend": {"type": "numeric", "index": 14, "name": "spend", "comment": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "impressions": {"type": "integer", "index": 15, "name": "impressions", "comment": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "conversions": {"type": "double precision", "index": 16, "name": "conversions", "comment": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business."}, "conversions_value": {"type": "double precision", "index": 17, "name": "conversions_value", "comment": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful."}, "view_through_conversions": {"type": "integer", "index": 18, "name": "view_through_conversions", "comment": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__search_term_keyword_stats"}, "model.google_ads.stg_google_ads__search_term_keyword_stats_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__search_term_keyword_stats_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 5, "name": "clicks", "comment": null}, "conversions": {"type": "double precision", "index": 6, "name": "conversions", "comment": null}, "conversions_value": {"type": "double precision", "index": 7, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 8, "name": "cost_micros", "comment": null}, "customer_id": {"type": "bigint", "index": 9, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 10, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 11, "name": "impressions", "comment": null}, "info_text": {"type": "text", "index": 12, "name": "info_text", "comment": null}, "keyword_ad_group_criterion": {"type": "text", "index": 13, "name": "keyword_ad_group_criterion", "comment": null}, "search_term": {"type": "text", "index": 14, "name": "search_term", "comment": null}, "search_term_match_type": {"type": "text", "index": 15, "name": "search_term_match_type", "comment": null}, "status": {"type": "text", "index": 16, "name": "status", "comment": null}, "view_through_conversions": {"type": "integer", "index": 17, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.google_ads.stg_google_ads__search_term_keyword_stats_tmp"}, "model.linkedin.stg_linkedin_ads__account_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__account_history", "database": "postgres", "comment": "Each record represents a 'version' of an account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "integer", "index": 2, "name": "account_id", "comment": "Unique internal ID representing the account."}, "account_name": {"type": "text", "index": 3, "name": "account_name", "comment": "A label for the account."}, "currency": {"type": "text", "index": 4, "name": "currency", "comment": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default)."}, "version_tag": {"type": "numeric", "index": 5, "name": "version_tag", "comment": "An integer representation of the version of the account."}, "status": {"type": "text", "index": 6, "name": "status", "comment": "ACTIVE - Account is active; this is the default state\nCANCELLED - Account has been permanently cancelled\nDRAFT - Account is in draft status, meaning it's not yet fully set up and it is not serving\nPENDING_DELETION - Denotes that the account has been requested to be deleted that is currently pending\nREMOVED - Denotes that the account was deleted, but must remain fetchable due to the existence of performance data.\n"}, "type": {"type": "text", "index": 7, "name": "type", "comment": "BUSINESS - This is the only value allowed when creating accounts through the API.\nENTERPRISE - This value cannot be used to create accounts through the API and is reserved for accounts created by LinkedIn's internal ad operations systems.\n"}, "last_modified_at": {"type": "timestamp without time zone", "index": 8, "name": "last_modified_at", "comment": "The timestamp of when the version was updated."}, "created_at": {"type": "timestamp without time zone", "index": 9, "name": "created_at", "comment": "The timestamp of when the account was created."}, "is_latest_version": {"type": "boolean", "index": 10, "name": "is_latest_version", "comment": "Boolean of whether the record is the latest version of the account."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__account_history"}, "model.linkedin.stg_linkedin_ads__account_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__account_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_modified_time": {"type": "timestamp without time zone", "index": 2, "name": "last_modified_time", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 3, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "currency": {"type": "text", "index": 5, "name": "currency", "comment": null}, "version_tag": {"type": "integer", "index": 6, "name": "version_tag", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__account_history_tmp"}, "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__ad_analytics_by_campaign", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the campaign level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The day of the activity."}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": "The ID of the related creative."}, "clicks": {"type": "integer", "index": 4, "name": "clicks", "comment": "The count of chargeable clicks."}, "impressions": {"type": "integer", "index": 5, "name": "impressions", "comment": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails."}, "cost": {"type": "double precision", "index": 6, "name": "cost", "comment": "The cost of the ads in the local currency or USD."}, "conversion_value_in_local_currency": {"type": "double precision", "index": 7, "name": "conversion_value_in_local_currency", "comment": "The value generated by your conversions, displayed in your LinkedIn account's local currency."}, "external_website_conversions": {"type": "bigint", "index": 8, "name": "external_website_conversions", "comment": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads"}, "one_click_leads": {"type": "bigint", "index": 9, "name": "one_click_leads", "comment": "Leads submitted after clicking on LinkedIn ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign"}, "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__ad_analytics_by_campaign_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "day": {"type": "timestamp without time zone", "index": 2, "name": "day", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "action_clicks": {"type": "integer", "index": 4, "name": "action_clicks", "comment": null}, "ad_unit_clicks": {"type": "integer", "index": 5, "name": "ad_unit_clicks", "comment": null}, "approximate_unique_impressions": {"type": "integer", "index": 6, "name": "approximate_unique_impressions", "comment": null}, "card_clicks": {"type": "integer", "index": 7, "name": "card_clicks", "comment": null}, "card_impressions": {"type": "integer", "index": 8, "name": "card_impressions", "comment": null}, "clicks": {"type": "integer", "index": 9, "name": "clicks", "comment": null}, "comment_likes": {"type": "integer", "index": 10, "name": "comment_likes", "comment": null}, "comments": {"type": "integer", "index": 11, "name": "comments", "comment": null}, "company_page_clicks": {"type": "integer", "index": 12, "name": "company_page_clicks", "comment": null}, "conversion_value_in_local_currency": {"type": "integer", "index": 13, "name": "conversion_value_in_local_currency", "comment": null}, "cost_in_local_currency": {"type": "double precision", "index": 14, "name": "cost_in_local_currency", "comment": null}, "cost_in_usd": {"type": "double precision", "index": 15, "name": "cost_in_usd", "comment": null}, "external_website_conversions": {"type": "bigint", "index": 16, "name": "external_website_conversions", "comment": null}, "external_website_post_click_conversions": {"type": "integer", "index": 17, "name": "external_website_post_click_conversions", "comment": null}, "external_website_post_view_conversions": {"type": "integer", "index": 18, "name": "external_website_post_view_conversions", "comment": null}, "follows": {"type": "integer", "index": 19, "name": "follows", "comment": null}, "full_screen_plays": {"type": "integer", "index": 20, "name": "full_screen_plays", "comment": null}, "impressions": {"type": "integer", "index": 21, "name": "impressions", "comment": null}, "landing_page_clicks": {"type": "integer", "index": 22, "name": "landing_page_clicks", "comment": null}, "lead_generation_mail_contact_info_shares": {"type": "integer", "index": 23, "name": "lead_generation_mail_contact_info_shares", "comment": null}, "lead_generation_mail_interested_clicks": {"type": "integer", "index": 24, "name": "lead_generation_mail_interested_clicks", "comment": null}, "likes": {"type": "integer", "index": 25, "name": "likes", "comment": null}, "one_click_lead_form_opens": {"type": "integer", "index": 26, "name": "one_click_lead_form_opens", "comment": null}, "one_click_leads": {"type": "integer", "index": 27, "name": "one_click_leads", "comment": null}, "opens": {"type": "integer", "index": 28, "name": "opens", "comment": null}, "other_engagements": {"type": "integer", "index": 29, "name": "other_engagements", "comment": null}, "shares": {"type": "integer", "index": 30, "name": "shares", "comment": null}, "text_url_clicks": {"type": "integer", "index": 31, "name": "text_url_clicks", "comment": null}, "total_engagements": {"type": "integer", "index": 32, "name": "total_engagements", "comment": null}, "video_completions": {"type": "integer", "index": 33, "name": "video_completions", "comment": null}, "video_first_quartile_completions": {"type": "integer", "index": 34, "name": "video_first_quartile_completions", "comment": null}, "video_midpoint_completions": {"type": "integer", "index": 35, "name": "video_midpoint_completions", "comment": null}, "video_starts": {"type": "integer", "index": 36, "name": "video_starts", "comment": null}, "video_third_quartile_completions": {"type": "integer", "index": 37, "name": "video_third_quartile_completions", "comment": null}, "video_views": {"type": "integer", "index": 38, "name": "video_views", "comment": null}, "viral_card_clicks": {"type": "integer", "index": 39, "name": "viral_card_clicks", "comment": null}, "viral_card_impressions": {"type": "integer", "index": 40, "name": "viral_card_impressions", "comment": null}, "viral_clicks": {"type": "integer", "index": 41, "name": "viral_clicks", "comment": null}, "viral_comment_likes": {"type": "integer", "index": 42, "name": "viral_comment_likes", "comment": null}, "viral_comments": {"type": "integer", "index": 43, "name": "viral_comments", "comment": null}, "viral_company_page_clicks": {"type": "integer", "index": 44, "name": "viral_company_page_clicks", "comment": null}, "viral_external_website_conversions": {"type": "integer", "index": 45, "name": "viral_external_website_conversions", "comment": null}, "viral_external_website_post_click_conversions": {"type": "integer", "index": 46, "name": "viral_external_website_post_click_conversions", "comment": null}, "viral_external_website_post_view_conversions": {"type": "integer", "index": 47, "name": "viral_external_website_post_view_conversions", "comment": null}, "viral_follows": {"type": "integer", "index": 48, "name": "viral_follows", "comment": null}, "viral_full_screen_plays": {"type": "integer", "index": 49, "name": "viral_full_screen_plays", "comment": null}, "viral_impressions": {"type": "integer", "index": 50, "name": "viral_impressions", "comment": null}, "viral_landing_page_clicks": {"type": "integer", "index": 51, "name": "viral_landing_page_clicks", "comment": null}, "viral_likes": {"type": "integer", "index": 52, "name": "viral_likes", "comment": null}, "viral_one_click_lead_form_opens": {"type": "integer", "index": 53, "name": "viral_one_click_lead_form_opens", "comment": null}, "viral_one_click_leads": {"type": "integer", "index": 54, "name": "viral_one_click_leads", "comment": null}, "viral_other_engagements": {"type": "integer", "index": 55, "name": "viral_other_engagements", "comment": null}, "viral_shares": {"type": "integer", "index": 56, "name": "viral_shares", "comment": null}, "viral_total_engagements": {"type": "integer", "index": 57, "name": "viral_total_engagements", "comment": null}, "viral_video_completions": {"type": "integer", "index": 58, "name": "viral_video_completions", "comment": null}, "viral_video_first_quartile_completions": {"type": "integer", "index": 59, "name": "viral_video_first_quartile_completions", "comment": null}, "viral_video_midpoint_completions": {"type": "integer", "index": 60, "name": "viral_video_midpoint_completions", "comment": null}, "viral_video_starts": {"type": "integer", "index": 61, "name": "viral_video_starts", "comment": null}, "viral_video_third_quartile_completions": {"type": "integer", "index": 62, "name": "viral_video_third_quartile_completions", "comment": null}, "viral_video_views": {"type": "integer", "index": 63, "name": "viral_video_views", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign_tmp"}, "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__ad_analytics_by_creative", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the creative level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The day of the activity."}, "creative_id": {"type": "integer", "index": 3, "name": "creative_id", "comment": "The ID of the related creative."}, "clicks": {"type": "integer", "index": 4, "name": "clicks", "comment": "The count of chargeable clicks."}, "impressions": {"type": "integer", "index": 5, "name": "impressions", "comment": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails."}, "cost": {"type": "integer", "index": 6, "name": "cost", "comment": "The cost of the ads in the local currency or USD."}, "conversion_value_in_local_currency": {"type": "double precision", "index": 7, "name": "conversion_value_in_local_currency", "comment": "The value generated by your conversions, displayed in your LinkedIn account's local currency."}, "external_website_conversions": {"type": "bigint", "index": 8, "name": "external_website_conversions", "comment": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads"}, "one_click_leads": {"type": "bigint", "index": 9, "name": "one_click_leads", "comment": "Leads submitted after clicking on LinkedIn ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative"}, "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__ad_analytics_by_creative_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"creative_id": {"type": "integer", "index": 1, "name": "creative_id", "comment": null}, "day": {"type": "timestamp without time zone", "index": 2, "name": "day", "comment": null}, "action_clicks": {"type": "integer", "index": 3, "name": "action_clicks", "comment": null}, "card_clicks": {"type": "integer", "index": 4, "name": "card_clicks", "comment": null}, "ad_unit_clicks": {"type": "integer", "index": 5, "name": "ad_unit_clicks", "comment": null}, "landing_page_clicks": {"type": "integer", "index": 6, "name": "landing_page_clicks", "comment": null}, "clicks": {"type": "integer", "index": 7, "name": "clicks", "comment": null}, "approximate_unique_impressions": {"type": "integer", "index": 8, "name": "approximate_unique_impressions", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "card_impressions": {"type": "integer", "index": 10, "name": "card_impressions", "comment": null}, "cost_in_local_currency": {"type": "integer", "index": 11, "name": "cost_in_local_currency", "comment": null}, "cost_in_usd": {"type": "integer", "index": 12, "name": "cost_in_usd", "comment": null}, "comment_likes": {"type": "integer", "index": 13, "name": "comment_likes", "comment": null}, "comments": {"type": "integer", "index": 14, "name": "comments", "comment": null}, "company_page_clicks": {"type": "integer", "index": 15, "name": "company_page_clicks", "comment": null}, "conversion_value_in_local_currency": {"type": "integer", "index": 16, "name": "conversion_value_in_local_currency", "comment": null}, "external_website_conversions": {"type": "bigint", "index": 17, "name": "external_website_conversions", "comment": null}, "external_website_post_click_conversions": {"type": "integer", "index": 18, "name": "external_website_post_click_conversions", "comment": null}, "external_website_post_view_conversions": {"type": "integer", "index": 19, "name": "external_website_post_view_conversions", "comment": null}, "follows": {"type": "integer", "index": 20, "name": "follows", "comment": null}, "full_screen_plays": {"type": "integer", "index": 21, "name": "full_screen_plays", "comment": null}, "lead_generation_mail_contact_info_shares": {"type": "integer", "index": 22, "name": "lead_generation_mail_contact_info_shares", "comment": null}, "lead_generation_mail_interested_clicks": {"type": "integer", "index": 23, "name": "lead_generation_mail_interested_clicks", "comment": null}, "likes": {"type": "integer", "index": 24, "name": "likes", "comment": null}, "one_click_lead_form_opens": {"type": "integer", "index": 25, "name": "one_click_lead_form_opens", "comment": null}, "one_click_leads": {"type": "integer", "index": 26, "name": "one_click_leads", "comment": null}, "opens": {"type": "integer", "index": 27, "name": "opens", "comment": null}, "other_engagements": {"type": "integer", "index": 28, "name": "other_engagements", "comment": null}, "shares": {"type": "integer", "index": 29, "name": "shares", "comment": null}, "text_url_clicks": {"type": "integer", "index": 30, "name": "text_url_clicks", "comment": null}, "total_engagements": {"type": "integer", "index": 31, "name": "total_engagements", "comment": null}, "video_completions": {"type": "integer", "index": 32, "name": "video_completions", "comment": null}, "video_first_quartile_completions": {"type": "integer", "index": 33, "name": "video_first_quartile_completions", "comment": null}, "video_midpoint_completions": {"type": "integer", "index": 34, "name": "video_midpoint_completions", "comment": null}, "video_starts": {"type": "integer", "index": 35, "name": "video_starts", "comment": null}, "video_third_quartile_completions": {"type": "integer", "index": 36, "name": "video_third_quartile_completions", "comment": null}, "video_views": {"type": "integer", "index": 37, "name": "video_views", "comment": null}, "viral_card_clicks": {"type": "integer", "index": 38, "name": "viral_card_clicks", "comment": null}, "viral_card_impressions": {"type": "integer", "index": 39, "name": "viral_card_impressions", "comment": null}, "viral_clicks": {"type": "integer", "index": 40, "name": "viral_clicks", "comment": null}, "viral_comment_likes": {"type": "integer", "index": 41, "name": "viral_comment_likes", "comment": null}, "viral_comments": {"type": "integer", "index": 42, "name": "viral_comments", "comment": null}, "viral_company_page_clicks": {"type": "integer", "index": 43, "name": "viral_company_page_clicks", "comment": null}, "viral_external_website_conversions": {"type": "integer", "index": 44, "name": "viral_external_website_conversions", "comment": null}, "viral_external_website_post_click_conversions": {"type": "integer", "index": 45, "name": "viral_external_website_post_click_conversions", "comment": null}, "viral_external_website_post_view_conversions": {"type": "integer", "index": 46, "name": "viral_external_website_post_view_conversions", "comment": null}, "viral_follows": {"type": "integer", "index": 47, "name": "viral_follows", "comment": null}, "viral_full_screen_plays": {"type": "integer", "index": 48, "name": "viral_full_screen_plays", "comment": null}, "viral_impressions": {"type": "integer", "index": 49, "name": "viral_impressions", "comment": null}, "viral_landing_page_clicks": {"type": "integer", "index": 50, "name": "viral_landing_page_clicks", "comment": null}, "viral_likes": {"type": "integer", "index": 51, "name": "viral_likes", "comment": null}, "viral_one_click_lead_form_opens": {"type": "integer", "index": 52, "name": "viral_one_click_lead_form_opens", "comment": null}, "viral_one_click_leads": {"type": "integer", "index": 53, "name": "viral_one_click_leads", "comment": null}, "viral_other_engagements": {"type": "integer", "index": 54, "name": "viral_other_engagements", "comment": null}, "viral_shares": {"type": "integer", "index": 55, "name": "viral_shares", "comment": null}, "viral_total_engagements": {"type": "integer", "index": 56, "name": "viral_total_engagements", "comment": null}, "viral_video_completions": {"type": "integer", "index": 57, "name": "viral_video_completions", "comment": null}, "viral_video_first_quartile_completions": {"type": "integer", "index": 58, "name": "viral_video_first_quartile_completions", "comment": null}, "viral_video_midpoint_completions": {"type": "integer", "index": 59, "name": "viral_video_midpoint_completions", "comment": null}, "viral_video_starts": {"type": "integer", "index": 60, "name": "viral_video_starts", "comment": null}, "viral_video_third_quartile_completions": {"type": "integer", "index": 61, "name": "viral_video_third_quartile_completions", "comment": null}, "viral_video_views": {"type": "integer", "index": 62, "name": "viral_video_views", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative_tmp"}, "model.linkedin.stg_linkedin_ads__campaign_group_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__campaign_group_history", "database": "postgres", "comment": "Each record represents a 'version' of a campaign group.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_group_id": {"type": "integer", "index": 2, "name": "campaign_group_id", "comment": "Unique internal ID representing the campaign group."}, "campaign_group_name": {"type": "text", "index": 3, "name": "campaign_group_name", "comment": "A label for the campaign group."}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": "The ID of the account the campaign group belongs to."}, "status": {"type": "text", "index": 5, "name": "status", "comment": "Status of campaign group. Possible values are: ACTIVE - Denotes that the campaign group is capable of serving ads, subject to run date and budget limitations (as well as any other limitations at the account or campaign level). ARCHIVED - Denotes that the campaign group is presently inactive, and should mostly be hidden in the UI until un-archived. CANCELLED - Denotes that the campaign group has been permanently canceled and cannot be reactivated. Not a settable status. DRAFT - Denotes that the campaign group is in a preliminary state and should temporarily not be served. PAUSED - Denotes that the campaign group meets all requirements to be served, but temporarily should not be. PENDING_DELETION - Denotes that the campaign group has been requested to be deleted that is currently pending. REMOVED - Denoted that the campaign group was deleted, but must remain fetchable due to the existence of performance data.\n"}, "is_backfilled": {"type": "boolean", "index": 6, "name": "is_backfilled", "comment": "Flag that denotes whether the campaign group was created organically or to backfill existing campaigns. This is a read-only field set by the system. Default = false."}, "run_schedule_start_at": {"type": "timestamp without time zone", "index": 7, "name": "run_schedule_start_at", "comment": "Represents the inclusive (greater than or equal to) date when to start running the associated campaigns under this campaign group. This field is required."}, "run_schedule_end_at": {"type": "timestamp without time zone", "index": 8, "name": "run_schedule_end_at", "comment": "Represents the exclusive (strictly less than) date when to stop running the associated campaigns under this campaign group. If this field is unset, it indicates an open range with no end date."}, "last_modified_at": {"type": "timestamp without time zone", "index": 9, "name": "last_modified_at", "comment": "The timestamp of when the version was updated."}, "created_at": {"type": "timestamp without time zone", "index": 10, "name": "created_at", "comment": "The timestamp of when the campaign group was created."}, "is_latest_version": {"type": "boolean", "index": 11, "name": "is_latest_version", "comment": "Boolean of whether the record is the latest version of the campaign group."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__campaign_group_history"}, "model.linkedin.stg_linkedin_ads__campaign_group_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__campaign_group_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_modified_time": {"type": "timestamp without time zone", "index": 2, "name": "last_modified_time", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 4, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__campaign_group_history_tmp"}, "model.linkedin.stg_linkedin_ads__campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__campaign_history", "database": "postgres", "comment": "Each record represents a 'version' of a campaign.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": "Unique internal ID representing the campaign."}, "campaign_name": {"type": "text", "index": 3, "name": "campaign_name", "comment": "A label for the campaign."}, "version_tag": {"type": "numeric", "index": 4, "name": "version_tag", "comment": "An integer representation of the version of the campaign."}, "campaign_group_id": {"type": "integer", "index": 5, "name": "campaign_group_id", "comment": "The ID of the campaign group the campaign belongs to."}, "account_id": {"type": "bigint", "index": 6, "name": "account_id", "comment": "The ID of the account the campaign belongs to."}, "status": {"type": "text", "index": 7, "name": "status", "comment": "ACTIVE - Denotes that the campaign is fully servable.\nPAUSED - Denotes that the campaign meets all requirements to be served, but temporarily should not be.\nARCHIVED - Denotes that the campaign is presently inactive, and should mostly be hidden in the UI until un-archived.\nCOMPLETED - Denotes that the campaign has reached a specified budgetary or chronological limit.\nCANCELED - Denotes that the campaign has been permanently canceled, such as when an advertising account is permanently closed.\nDRAFT - Denotes that the campaign is still being edited and not eligible for serving. Some validation will be postponed until the campaign is activated.\nPENDING_DELETION - Denotes that the campaign has been requested to be deleted that is currently pending.\nREMOVED - Denotes that the campaign was deleted, but must remain fetchable due to the existence of performance data.\n"}, "type": {"type": "text", "index": 8, "name": "type", "comment": "TEXT_AD - Text-based ads that show up in the right column or top of the page on LinkedIn.\nSPONSORED_UPDATES - Native ads that promote a company's content updates in the LinkedIn feed.\nSPONSORED_INMAILS - Personalized messages with a call-to-action button delivered to a LinkedIn's member inbox.\nDYNAMIC - Ads that are dynamically personalized.\n"}, "cost_type": {"type": "text", "index": 9, "name": "cost_type", "comment": "CPM - Cost per thousand advertising impressions. If type=SPONSORED_INMAILS; cost per send(CPS) is measured as CPM x 1000.\nCPC- Cost per individual click on the associated link.\nCPV- Cost per view for video ads.\n"}, "creative_selection": {"type": "text", "index": 10, "name": "creative_selection", "comment": "ROUND_ROBIN - Rotate through available creatives to serve them as evenly as possible.\nOPTIMIZED (default) - Bias selection taking into account such as expected performance. Not available for Message and Conversation Ads (type=SPONSORED_INMAILS).\n"}, "daily_budget_amount": {"type": "double precision", "index": 11, "name": "daily_budget_amount", "comment": "Maximum amount to spend per day UTC. The amount of money as a real number string."}, "daily_budget_currency_code": {"type": "text", "index": 12, "name": "daily_budget_currency_code", "comment": "ISO currency code. The currency must match that of the parent account."}, "unit_cost_amount": {"type": "double precision", "index": 13, "name": "unit_cost_amount", "comment": "This value is used as one of the following: amount to bid (for manual bidding), amount which is the target cost (for target cost bidding) per click, impression, or other event depending on the pricing model, or cost cap (for cost cap bidding). The amount of money as a real number string. The amount should be non-negative if the bidding strategy is manual, target cost, or cost cap bidding. The default is 0 with the currency code set to match that of the associated account.\n"}, "unit_cost_currency_code": {"type": "text", "index": 14, "name": "unit_cost_currency_code", "comment": "Amount to bid per click, impression, or other event depending on the pricing model. The default is 0 with the currency code set to match that of the associated account. ISO currency code.\n"}, "format": {"type": "text", "index": 15, "name": "format", "comment": "The ad format on the campaign level. See https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads/campaign-formats?view=li-lms-2022-07"}, "locale_country": {"type": "text", "index": 16, "name": "locale_country", "comment": "Locale of the campaign. An uppercase two-letter country code as defined by ISO-3166."}, "locale_language": {"type": "text", "index": 17, "name": "locale_language", "comment": "Locale of the campaign. A lowercase two-letter language code as defined by ISO-639."}, "objective_type": {"type": "text", "index": 18, "name": "objective_type", "comment": "Campaign Objective type values. Click [here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ad-budget-pricing-type-combinations?view=li-lms-2022-07) for Campaign Objective descriptions. One of: - BRAND_AWARENESS - ENGAGEMENT - JOB_APPLICANTS - LEAD_GENERATION - WEBSITE_CONVERSIONS - WEBSITE_VISITS - VIDEO_VIEWS\n"}, "optimization_target_type": {"type": "text", "index": 19, "name": "optimization_target_type", "comment": "Determines how this campaign is optimized for spending. If this is not set, there is no optimization. Refer to the documentation here. Default = 'NONE'."}, "is_audience_expansion_enabled": {"type": "boolean", "index": 20, "name": "is_audience_expansion_enabled", "comment": "Boolean (default=false) representing whether Audience Expansion is enabled for the campaign provides query expansion for certain targeting criteria."}, "is_offsite_delivery_enabled": {"type": "boolean", "index": 21, "name": "is_offsite_delivery_enabled", "comment": "Boolean indicating if this campaign to allowed to be served on the LinkedIn Audience Network to extend the reach of your campaign by delivering ads beyond the LinkedIn feed to members on third-party apps and sites.\t(default will be \"True\" from June 30, 2022)\n"}, "run_schedule_start_at": {"type": "timestamp without time zone", "index": 22, "name": "run_schedule_start_at", "comment": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the inclusive (greater than or equal to) value in which to start the range."}, "run_schedule_end_at": {"type": "timestamp without time zone", "index": 23, "name": "run_schedule_end_at", "comment": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the exclusive (strictly less than) value in which to end the range, if provided.\n"}, "last_modified_at": {"type": "timestamp without time zone", "index": 24, "name": "last_modified_at", "comment": "The timestamp of when the version was updated."}, "created_at": {"type": "timestamp without time zone", "index": 25, "name": "created_at", "comment": "The timestamp of when the campaign was created."}, "is_latest_version": {"type": "boolean", "index": 26, "name": "is_latest_version", "comment": "Boolean of whether the record is the latest version of the campaign."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__campaign_history"}, "model.linkedin.stg_linkedin_ads__campaign_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__campaign_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_modified_time": {"type": "timestamp without time zone", "index": 2, "name": "last_modified_time", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "campaign_group_id": {"type": "integer", "index": 4, "name": "campaign_group_id", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 5, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "version_tag": {"type": "integer", "index": 7, "name": "version_tag", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__campaign_history_tmp"}, "model.linkedin.stg_linkedin_ads__creative_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__creative_history", "database": "postgres", "comment": "Each record represents a 'version' of a creative.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "creative_id": {"type": "integer", "index": 2, "name": "creative_id", "comment": "Unique internal ID representing the creative."}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": "The ID of the campaign the creative belongs to."}, "status": {"type": "text", "index": 4, "name": "status", "comment": "ACTIVE - Creative creation is complete and creative is available for review and serve.\nPAUSED - Creative creation is complete and creative is current, but should temporarily not be served. This status is not valid upon creation.\nDRAFT - Creative creation is incomplete and may still be edited.\nARCHIVED - Creative creation is complete, but creative should not be served and should be separated from non-archived creatives in any UI.\nCANCELED - Creative is permanently canceled.\n"}, "click_uri": {"type": "text", "index": 5, "name": "click_uri", "comment": "The URL where the member should be redirected to, on clicking the text ad or spotlight ad."}, "last_modified_at": {"type": "timestamp without time zone", "index": 6, "name": "last_modified_at", "comment": "The timestamp of when the version was updated."}, "created_at": {"type": "timestamp without time zone", "index": 7, "name": "created_at", "comment": "The timestamp of when the creative was created."}, "click_uri_type": {"type": "text", "index": 8, "name": "click_uri_type", "comment": "Will either be `text_ad`, `spotlight`, or `null` to indicate the origin of the click_uri."}, "is_latest_version": {"type": "boolean", "index": 9, "name": "is_latest_version", "comment": "Boolean of whether the record is the latest version of the creative."}, "base_url": {"type": "text", "index": 10, "name": "base_url", "comment": "The base URL of the ad, extracted from the `click_uri`."}, "url_host": {"type": "text", "index": 11, "name": "url_host", "comment": "The URL host of the ad, extracted from the `click_uri`."}, "url_path": {"type": "text", "index": 12, "name": "url_path", "comment": "The URL path of the ad, extracted from the `click_uri`."}, "utm_source": {"type": "text", "index": 13, "name": "utm_source", "comment": "The utm_source parameter of the ad, extracted from the `click_uri`."}, "utm_medium": {"type": "text", "index": 14, "name": "utm_medium", "comment": "The utm_medium parameter of the ad, extracted from the `click_uri`."}, "utm_campaign": {"type": "text", "index": 15, "name": "utm_campaign", "comment": "The utm_campaign parameter of the ad, extracted from the `click_uri`."}, "utm_content": {"type": "text", "index": 16, "name": "utm_content", "comment": "The utm_content parameter of the ad, extracted from the `click_uri`."}, "utm_term": {"type": "text", "index": 17, "name": "utm_term", "comment": "The utm_term parameter of the ad, extracted from the `click_uri`."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__creative_history"}, "model.linkedin.stg_linkedin_ads__creative_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__creative_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "intended_status": {"type": "character varying", "index": 3, "name": "intended_status", "comment": null}, "click_uri": {"type": "text", "index": 4, "name": "click_uri", "comment": null}, "last_modified_at": {"type": "timestamp without time zone", "index": 5, "name": "last_modified_at", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 6, "name": "created_time", "comment": null}, "text_ad_landing_page": {"type": "text", "index": 7, "name": "text_ad_landing_page", "comment": null}, "spotlight_landing_page": {"type": "text", "index": 8, "name": "spotlight_landing_page", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__creative_history_tmp"}, "model.linkedin.stg_linkedin_ads__geo": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__geo", "database": "postgres", "comment": "Contains geographic data for LinkedIn Ads, including IDs and names of locations.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "geo_id": {"type": "integer", "index": 2, "name": "geo_id", "comment": "Unique identifier for the geographic entity, used for joins in reporting tables."}, "value": {"type": "text", "index": 3, "name": "value", "comment": "Name of the geographic entity."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__geo"}, "model.linkedin.stg_linkedin_ads__geo_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__geo_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "id": {"type": "integer", "index": 2, "name": "id", "comment": null}, "value": {"type": "text", "index": 3, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__geo_tmp"}, "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__monthly_ad_analytics_by_country", "database": "postgres", "comment": "Monthly LinkedIn Ads performance metrics aggregated by member country and campaign.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_month": {"type": "date", "index": 2, "name": "date_month", "comment": "Month of the reporting data, aliased as `date_month`."}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": "Identifier of the LinkedIn Ads campaign."}, "member_country_geo_id": {"type": "integer", "index": 4, "name": "member_country_geo_id", "comment": "ID representing the country of the LinkedIn members who interacted with the campaign."}, "clicks": {"type": "integer", "index": 5, "name": "clicks", "comment": "The count of chargeable clicks."}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails."}, "cost": {"type": "numeric", "index": 7, "name": "cost", "comment": "The cost of the ads in the local currency or USD."}, "conversion_value_in_local_currency": {"type": "double precision", "index": 8, "name": "conversion_value_in_local_currency", "comment": "The value generated by your conversions, displayed in your LinkedIn account's local currency."}, "external_website_conversions": {"type": "bigint", "index": 9, "name": "external_website_conversions", "comment": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads."}, "one_click_leads": {"type": "bigint", "index": 10, "name": "one_click_leads", "comment": "Leads submitted after clicking on LinkedIn ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country"}, "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__monthly_ad_analytics_by_country_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "month": {"type": "text", "index": 2, "name": "month", "comment": null}, "clicks": {"type": "integer", "index": 3, "name": "clicks", "comment": null}, "member_country": {"type": "integer", "index": 4, "name": "member_country", "comment": null}, "impressions": {"type": "integer", "index": 5, "name": "impressions", "comment": null}, "conversion_value_in_local_currency": {"type": "double precision", "index": 6, "name": "conversion_value_in_local_currency", "comment": null}, "cost_in_local_currency": {"type": "numeric", "index": 7, "name": "cost_in_local_currency", "comment": null}, "cost_in_usd": {"type": "numeric", "index": 8, "name": "cost_in_usd", "comment": null}, "external_website_post_click_conversions": {"type": "integer", "index": 9, "name": "external_website_post_click_conversions", "comment": null}, "one_click_leads": {"type": "integer", "index": 10, "name": "one_click_leads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country_tmp"}, "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__monthly_ad_analytics_by_region", "database": "postgres", "comment": "Monthly LinkedIn Ads performance metrics aggregated by member region and campaign.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_month": {"type": "date", "index": 2, "name": "date_month", "comment": "Month of the reporting data."}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": "Identifier of the LinkedIn Ads campaign."}, "member_region_geo_id": {"type": "integer", "index": 4, "name": "member_region_geo_id", "comment": "ID representing the region of the LinkedIn members who interacted with the campaign."}, "impressions": {"type": "integer", "index": 5, "name": "impressions", "comment": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails."}, "clicks": {"type": "integer", "index": 6, "name": "clicks", "comment": "The count of chargeable clicks."}, "cost": {"type": "numeric", "index": 7, "name": "cost", "comment": "The cost of the ads in the local currency or USD."}, "conversion_value_in_local_currency": {"type": "double precision", "index": 8, "name": "conversion_value_in_local_currency", "comment": "The value generated by your conversions, displayed in your LinkedIn account's local currency."}, "external_website_conversions": {"type": "bigint", "index": 9, "name": "external_website_conversions", "comment": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads."}, "one_click_leads": {"type": "bigint", "index": 10, "name": "one_click_leads", "comment": "Leads submitted after clicking on LinkedIn ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region"}, "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__monthly_ad_analytics_by_region_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "month": {"type": "text", "index": 2, "name": "month", "comment": null}, "clicks": {"type": "integer", "index": 3, "name": "clicks", "comment": null}, "member_region": {"type": "integer", "index": 4, "name": "member_region", "comment": null}, "impressions": {"type": "integer", "index": 5, "name": "impressions", "comment": null}, "conversion_value_in_local_currency": {"type": "double precision", "index": 6, "name": "conversion_value_in_local_currency", "comment": null}, "cost_in_local_currency": {"type": "numeric", "index": 7, "name": "cost_in_local_currency", "comment": null}, "cost_in_usd": {"type": "numeric", "index": 8, "name": "cost_in_usd", "comment": null}, "external_website_post_click_conversions": {"type": "integer", "index": 9, "name": "external_website_post_click_conversions", "comment": null}, "one_click_leads": {"type": "integer", "index": 10, "name": "one_click_leads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region_tmp"}, "model.microsoft_ads.stg_microsoft_ads__account_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__account_daily_report", "database": "postgres", "comment": "Each record in this table represents the daily performance by account and all non-metric columns.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "device_os": {"type": "text", "index": 4, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 5, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 6, "name": "network", "comment": "The network associated with this record."}, "currency_code": {"type": "text", "index": 7, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "ad_distribution": {"type": "text", "index": 8, "name": "ad_distribution", "comment": "The distribution medium associated with this record."}, "bid_match_type": {"type": "text", "index": 9, "name": "bid_match_type", "comment": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "delivered_match_type": {"type": "text", "index": 10, "name": "delivered_match_type", "comment": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "top_vs_other": {"type": "text", "index": 11, "name": "top_vs_other", "comment": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009)."}, "clicks": {"type": "integer", "index": 12, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "integer", "index": 13, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "double precision", "index": 14, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "integer", "index": 15, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 16, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "integer", "index": 17, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__account_daily_report"}, "model.microsoft_ads.stg_microsoft_ads__account_daily_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__account_daily_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "device_os": {"type": "text", "index": 3, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 4, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 5, "name": "network", "comment": null}, "currency_code": {"type": "text", "index": 6, "name": "currency_code", "comment": null}, "ad_distribution": {"type": "text", "index": 7, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 8, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 9, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 10, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 11, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 12, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 13, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 14, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 15, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 16, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 17, "name": "all_conversions_qualified", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__account_daily_report_tmp"}, "model.microsoft_ads.stg_microsoft_ads__account_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__account_history", "database": "postgres", "comment": "Each record in this table represents a version of one or more Microsoft accounts.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "integer", "index": 2, "name": "account_id", "comment": "The ID of the account."}, "account_name": {"type": "character varying", "index": 3, "name": "account_name", "comment": "The name of the account."}, "modified_at": {"type": "timestamp without time zone", "index": 4, "name": "modified_at", "comment": "The time each version of the object was last modified, i.e. when that version of the object was 'created'."}, "time_zone": {"type": "text", "index": 5, "name": "time_zone", "comment": "The time zone associated with this record."}, "currency_code": {"type": "text", "index": 6, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "is_most_recent_record": {"type": "boolean", "index": 7, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__account_history"}, "model.microsoft_ads.stg_microsoft_ads__account_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__account_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "name": {"type": "character varying", "index": 2, "name": "name", "comment": null}, "last_modified_time": {"type": "timestamp without time zone", "index": 3, "name": "last_modified_time", "comment": null}, "time_zone": {"type": "text", "index": 4, "name": "time_zone", "comment": null}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__account_history_tmp"}, "model.microsoft_ads.stg_microsoft_ads__ad_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_daily_report", "database": "postgres", "comment": "Each record in this table represents the daily performance by account, campaign, ad group, ad and all non-metric columns.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": "The ID of the campaign."}, "ad_group_id": {"type": "bigint", "index": 5, "name": "ad_group_id", "comment": "The ID of the corresponding ad group."}, "ad_id": {"type": "bigint", "index": 6, "name": "ad_id", "comment": "The ID of the corresponding ad."}, "currency_code": {"type": "text", "index": 7, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "device_os": {"type": "text", "index": 8, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 9, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 10, "name": "network", "comment": "The network associated with this record."}, "language": {"type": "text", "index": 11, "name": "language", "comment": "The language that the associated ad was viewed in."}, "ad_distribution": {"type": "text", "index": 12, "name": "ad_distribution", "comment": "The distribution medium associated with this record."}, "bid_match_type": {"type": "text", "index": 13, "name": "bid_match_type", "comment": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "delivered_match_type": {"type": "text", "index": 14, "name": "delivered_match_type", "comment": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "top_vs_other": {"type": "text", "index": 15, "name": "top_vs_other", "comment": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009)."}, "clicks": {"type": "integer", "index": 16, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "integer", "index": 17, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "double precision", "index": 18, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "integer", "index": 19, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 20, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "integer", "index": 21, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "all_conversions_value": {"type": "double precision", "index": 22, "name": "all_conversions_value", "comment": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_daily_report"}, "model.microsoft_ads.stg_microsoft_ads__ad_daily_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_daily_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "bigint", "index": 5, "name": "ad_id", "comment": null}, "currency_code": {"type": "text", "index": 6, "name": "currency_code", "comment": null}, "device_os": {"type": "text", "index": 7, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 8, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 9, "name": "network", "comment": null}, "language": {"type": "text", "index": 10, "name": "language", "comment": null}, "ad_distribution": {"type": "text", "index": 11, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 12, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 13, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 14, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 15, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 16, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 17, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 18, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 19, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 20, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 21, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 22, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 23, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_daily_report_tmp"}, "model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_group_daily_report", "database": "postgres", "comment": "Each record in this table represents the daily performance by account, campaign, ad group and all non-metric columns.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": "The ID of the campaign."}, "ad_group_id": {"type": "bigint", "index": 5, "name": "ad_group_id", "comment": "The ID of the corresponding ad group."}, "currency_code": {"type": "text", "index": 6, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "device_os": {"type": "text", "index": 7, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 8, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 9, "name": "network", "comment": "The network associated with this record."}, "language": {"type": "text", "index": 10, "name": "language", "comment": "The language that the associated ad was viewed in."}, "ad_distribution": {"type": "text", "index": 11, "name": "ad_distribution", "comment": "The distribution medium associated with this record."}, "bid_match_type": {"type": "text", "index": 12, "name": "bid_match_type", "comment": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "delivered_match_type": {"type": "text", "index": 13, "name": "delivered_match_type", "comment": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "top_vs_other": {"type": "text", "index": 14, "name": "top_vs_other", "comment": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009)."}, "clicks": {"type": "integer", "index": 15, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "integer", "index": 16, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "double precision", "index": 17, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "integer", "index": 18, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 19, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "integer", "index": 20, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "all_conversions_value": {"type": "double precision", "index": 21, "name": "all_conversions_value", "comment": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report"}, "model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_group_daily_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": null}, "device_os": {"type": "text", "index": 6, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 7, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 8, "name": "network", "comment": null}, "language": {"type": "text", "index": 9, "name": "language", "comment": null}, "ad_distribution": {"type": "text", "index": 10, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 11, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 12, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 13, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 14, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 15, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 16, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 17, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 18, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 19, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 20, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 21, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 22, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report_tmp"}, "model.microsoft_ads.stg_microsoft_ads__ad_group_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_group_history", "database": "postgres", "comment": "Each record in this table represents a version of one or more Microsoft ad groups.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_group_id": {"type": "bigint", "index": 2, "name": "ad_group_id", "comment": "The ID of the corresponding ad group."}, "ad_group_name": {"type": "text", "index": 3, "name": "ad_group_name", "comment": "The name of the corresponding ad group."}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": "The ID of the campaign."}, "modified_at": {"type": "timestamp without time zone", "index": 5, "name": "modified_at", "comment": "The time each version of the object was last modified, i.e. when that version of the object was 'created'."}, "start_date": {"type": "date", "index": 6, "name": "start_date", "comment": "The date in which an ad group starts running."}, "end_date": {"type": "integer", "index": 7, "name": "end_date", "comment": "The date in which this ad group will no longer run."}, "status": {"type": "text", "index": 8, "name": "status", "comment": "The status of this ad group; see the following [documentation](https://help.ads.microsoft.com/apex/index/3/en/53094) for more information on values and definitions."}, "is_most_recent_record": {"type": "boolean", "index": 9, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_group_history"}, "model.microsoft_ads.stg_microsoft_ads__ad_group_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_group_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "modified_time": {"type": "timestamp without time zone", "index": 4, "name": "modified_time", "comment": null}, "start_date": {"type": "date", "index": 5, "name": "start_date", "comment": null}, "end_date": {"type": "integer", "index": 6, "name": "end_date", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_group_history_tmp"}, "model.microsoft_ads.stg_microsoft_ads__ad_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_history", "database": "postgres", "comment": "Each record in this table represents a version of one or more Microsoft ads.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_id": {"type": "bigint", "index": 2, "name": "ad_id", "comment": "The ID of the corresponding ad."}, "ad_name": {"type": "text", "index": 3, "name": "ad_name", "comment": "The name of the corresponding ad; `title_part_1` is used as the default ad name but you may customize this by using the `microsoft_ads__ad_name_selector` variable. For more information, refer to the [README](https://github.com/fivetran/dbt_microsoft_ads/blob/main/README.md#change-how-ad-name-is-determined)."}, "title": {"type": "text", "index": 4, "name": "title", "comment": "The title of the ad."}, "title_part_1": {"type": "text", "index": 5, "name": "title_part_1", "comment": "Part 1 of the title."}, "title_part_2": {"type": "text", "index": 6, "name": "title_part_2", "comment": "Part 2 of the title."}, "title_part_3": {"type": "text", "index": 7, "name": "title_part_3", "comment": "Part 3 of the title."}, "final_url": {"type": "text", "index": 8, "name": "final_url", "comment": "The full URL that the ad links to."}, "domain": {"type": "text", "index": 9, "name": "domain", "comment": "The associated domain that the ad links to."}, "ad_group_id": {"type": "bigint", "index": 10, "name": "ad_group_id", "comment": "The ID of the corresponding ad group."}, "modified_at": {"type": "timestamp without time zone", "index": 11, "name": "modified_at", "comment": "The time each version of the object was last modified, i.e. when that version of the object was 'created'."}, "status": {"type": "text", "index": 12, "name": "status", "comment": "The status of this ad; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/adstatus?view=bingads-13) for more information on values and definitions."}, "type": {"type": "text", "index": 13, "name": "type", "comment": "The ad type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/adtype?view=bingads-13) for more information on values and definitions."}, "is_most_recent_record": {"type": "boolean", "index": 14, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_history"}, "model.microsoft_ads.stg_microsoft_ads__ad_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "title_part_1": {"type": "text", "index": 2, "name": "title_part_1", "comment": null}, "final_url": {"type": "text", "index": 3, "name": "final_url", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "modified_time": {"type": "timestamp without time zone", "index": 5, "name": "modified_time", "comment": null}, "status": {"type": "text", "index": 6, "name": "status", "comment": null}, "type": {"type": "text", "index": 7, "name": "type", "comment": null}, "title": {"type": "text", "index": 8, "name": "title", "comment": null}, "title_part_2": {"type": "text", "index": 9, "name": "title_part_2", "comment": null}, "title_part_3": {"type": "text", "index": 10, "name": "title_part_3", "comment": null}, "domain": {"type": "text", "index": 11, "name": "domain", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_history_tmp"}, "model.microsoft_ads.stg_microsoft_ads__campaign_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__campaign_daily_report", "database": "postgres", "comment": "Each record in this table represents the daily performance by account, campaign and all non-metric columns.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": "The ID of the campaign."}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "device_os": {"type": "text", "index": 6, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 7, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 8, "name": "network", "comment": "The network associated with this record."}, "ad_distribution": {"type": "text", "index": 9, "name": "ad_distribution", "comment": "The distribution medium associated with this record."}, "bid_match_type": {"type": "text", "index": 10, "name": "bid_match_type", "comment": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "delivered_match_type": {"type": "text", "index": 11, "name": "delivered_match_type", "comment": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "top_vs_other": {"type": "text", "index": 12, "name": "top_vs_other", "comment": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009)."}, "budget_association_status": {"type": "text", "index": 13, "name": "budget_association_status", "comment": "Indicates whether or not the campaign is currently spending from the budget mentioned in the BudgetName column. The possible values are `Current` and `Ended`."}, "budget_name": {"type": "text", "index": 14, "name": "budget_name", "comment": "The name of the budget. This column will be empty for unshared budgets."}, "budget_status": {"type": "text", "index": 15, "name": "budget_status", "comment": "The budget status. The possible values are `Active` and `Deleted`. This column will be empty for unshared budgets."}, "clicks": {"type": "integer", "index": 16, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "integer", "index": 17, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "double precision", "index": 18, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "integer", "index": 19, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 20, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "integer", "index": 21, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "all_conversions_value": {"type": "double precision", "index": 22, "name": "all_conversions_value", "comment": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__campaign_daily_report"}, "model.microsoft_ads.stg_microsoft_ads__campaign_daily_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__campaign_daily_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "currency_code": {"type": "text", "index": 4, "name": "currency_code", "comment": null}, "device_os": {"type": "text", "index": 5, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 6, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 7, "name": "network", "comment": null}, "ad_distribution": {"type": "text", "index": 8, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 9, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 10, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 11, "name": "top_vs_other", "comment": null}, "budget_association_status": {"type": "text", "index": 12, "name": "budget_association_status", "comment": null}, "budget_name": {"type": "text", "index": 13, "name": "budget_name", "comment": null}, "clicks": {"type": "integer", "index": 14, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 15, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 16, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 17, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 18, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 19, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 20, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 21, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 22, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__campaign_daily_report_tmp"}, "model.microsoft_ads.stg_microsoft_ads__campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__campaign_history", "database": "postgres", "comment": "Each record in this table represents a version of one or more Microsoft campaigns.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": "The ID of the campaign."}, "campaign_name": {"type": "text", "index": 3, "name": "campaign_name", "comment": "The name of the campaign."}, "account_id": {"type": "integer", "index": 4, "name": "account_id", "comment": "The ID of the account."}, "modified_at": {"type": "timestamp without time zone", "index": 5, "name": "modified_at", "comment": "The time each version of the object was last modified, i.e. when that version of the object was 'created'."}, "type": {"type": "text", "index": 6, "name": "type", "comment": "The campaign type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaigntype?view=bingads-13) for more information on values and definitions."}, "time_zone": {"type": "text", "index": 7, "name": "time_zone", "comment": "The time zone associated with this record."}, "status": {"type": "text", "index": 8, "name": "status", "comment": "The status of this campaign; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaignstatus?view=bingads-13) for more information on values and definitions."}, "budget": {"type": "double precision", "index": 9, "name": "budget", "comment": "The amount to spend daily across all campaigns that share the budget."}, "budget_id": {"type": "integer", "index": 10, "name": "budget_id", "comment": "The unique Microsoft Advertising identifier of the budget."}, "budget_type": {"type": "text", "index": 11, "name": "budget_type", "comment": "The budget type determines the pace at which the budget is spent throughout the day."}, "language": {"type": "text", "index": 12, "name": "language", "comment": "The language that the associated ad was viewed in."}, "is_most_recent_record": {"type": "boolean", "index": 13, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__campaign_history"}, "model.microsoft_ads.stg_microsoft_ads__campaign_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__campaign_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "account_id": {"type": "integer", "index": 3, "name": "account_id", "comment": null}, "modified_time": {"type": "timestamp without time zone", "index": 4, "name": "modified_time", "comment": null}, "type": {"type": "text", "index": 5, "name": "type", "comment": null}, "time_zone": {"type": "text", "index": 6, "name": "time_zone", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__campaign_history_tmp"}, "model.microsoft_ads.stg_microsoft_ads__geographic_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__geographic_daily_report", "database": "postgres", "comment": "Each record in this table represents the daily performance segmented by geographic location and related attributes.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": "The ID of the campaign."}, "ad_group_id": {"type": "bigint", "index": 5, "name": "ad_group_id", "comment": "The ID of the corresponding ad group."}, "country": {"type": "text", "index": 6, "name": "country", "comment": "The country or region where the user was physically located when they clicked the ad."}, "region": {"type": "text", "index": 7, "name": "region", "comment": "The state or geographic region where the user was physically located when they clicked the ad."}, "county": {"type": "text", "index": 8, "name": "county", "comment": "The county where the user was physically located when they clicked the ad."}, "postal_code": {"type": "text", "index": 9, "name": "postal_code", "comment": "The postal code where the user was physically located when they clicked the ad."}, "city": {"type": "text", "index": 10, "name": "city", "comment": "The city where the user was physically located when they clicked the ad."}, "metro_area": {"type": "text", "index": 11, "name": "metro_area", "comment": "The metro area (Microsoft Market Area in the United States) where the user was physically located when they clicked the ad."}, "location_id": {"type": "bigint", "index": 12, "name": "location_id", "comment": "The Microsoft Advertising identifier of the location where the user was physically located when they clicked the ad."}, "location_type": {"type": "text", "index": 13, "name": "location_type", "comment": "The location type used to deliver ads. Values include \"Physical location\" and \"Location of interest\". \n\n\"Physical location\" indicates the user was in the corresponding City, Country, MetroArea, or State. \"Location of interest\" indicates the user was searching for or viewing pages about the location."}, "most_specific_location": {"type": "text", "index": 14, "name": "most_specific_location", "comment": "The most specific location used to deliver ads. If postal code is available, it is prioritized; otherwise, it may match city or country/region."}, "currency_code": {"type": "text", "index": 15, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "device_os": {"type": "text", "index": 16, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 17, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 18, "name": "network", "comment": "The network associated with this record."}, "language": {"type": "text", "index": 19, "name": "language", "comment": "The language of the publisher where the ad was shown."}, "ad_distribution": {"type": "text", "index": 20, "name": "ad_distribution", "comment": "The distribution medium associated with this record."}, "bid_match_type": {"type": "text", "index": 21, "name": "bid_match_type", "comment": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "delivered_match_type": {"type": "text", "index": 22, "name": "delivered_match_type", "comment": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "top_vs_other": {"type": "text", "index": 23, "name": "top_vs_other", "comment": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009)."}, "goal": {"type": "text", "index": 24, "name": "goal", "comment": "The name of the goal you set for the conversions you want, meaning actions customers take after clicking your ad."}, "clicks": {"type": "integer", "index": 25, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "integer", "index": 26, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "numeric", "index": 27, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "integer", "index": 28, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 29, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "integer", "index": 30, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "all_conversions_value": {"type": "double precision", "index": 31, "name": "all_conversions_value", "comment": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__geographic_daily_report"}, "model.microsoft_ads.stg_microsoft_ads__geographic_daily_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__geographic_daily_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "bigint", "index": 1, "name": "account_id", "comment": null}, "ad_distribution": {"type": "text", "index": 2, "name": "ad_distribution", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "all_conversions": {"type": "integer", "index": 4, "name": "all_conversions", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 5, "name": "all_conversions_qualified", "comment": null}, "all_revenue": {"type": "numeric", "index": 6, "name": "all_revenue", "comment": null}, "bid_match_type": {"type": "text", "index": 7, "name": "bid_match_type", "comment": null}, "campaign_id": {"type": "bigint", "index": 8, "name": "campaign_id", "comment": null}, "city": {"type": "text", "index": 9, "name": "city", "comment": null}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": null}, "conversions": {"type": "integer", "index": 11, "name": "conversions", "comment": null}, "conversions_qualified": {"type": "integer", "index": 12, "name": "conversions_qualified", "comment": null}, "country": {"type": "text", "index": 13, "name": "country", "comment": null}, "county": {"type": "text", "index": 14, "name": "county", "comment": null}, "currency_code": {"type": "text", "index": 15, "name": "currency_code", "comment": null}, "date": {"type": "date", "index": 16, "name": "date", "comment": null}, "delivered_match_type": {"type": "text", "index": 17, "name": "delivered_match_type", "comment": null}, "device_os": {"type": "text", "index": 18, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 19, "name": "device_type", "comment": null}, "impressions": {"type": "integer", "index": 20, "name": "impressions", "comment": null}, "language": {"type": "text", "index": 21, "name": "language", "comment": null}, "location_type": {"type": "text", "index": 22, "name": "location_type", "comment": null}, "metro_area": {"type": "text", "index": 23, "name": "metro_area", "comment": null}, "postal_code": {"type": "text", "index": 24, "name": "postal_code", "comment": null}, "network": {"type": "text", "index": 25, "name": "network", "comment": null}, "spend": {"type": "numeric", "index": 26, "name": "spend", "comment": null}, "state": {"type": "text", "index": 27, "name": "state", "comment": null}, "top_vs_other": {"type": "text", "index": 28, "name": "top_vs_other", "comment": null}, "revenue": {"type": "numeric", "index": 29, "name": "revenue", "comment": null}, "location_id": {"type": "bigint", "index": 30, "name": "location_id", "comment": null}, "goal": {"type": "text", "index": 31, "name": "goal", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__geographic_daily_report_tmp"}, "model.microsoft_ads.stg_microsoft_ads__keyword_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__keyword_daily_report", "database": "postgres", "comment": "Each record in this table represents the daily performance by account, campaign, ad group, ad, keyword and all non-metric columns.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": "The ID of the campaign."}, "ad_group_id": {"type": "bigint", "index": 5, "name": "ad_group_id", "comment": "The ID of the corresponding ad group."}, "ad_id": {"type": "bigint", "index": 6, "name": "ad_id", "comment": "The ID of the corresponding ad."}, "keyword_id": {"type": "bigint", "index": 7, "name": "keyword_id", "comment": "The ID of the keyword."}, "currency_code": {"type": "text", "index": 8, "name": "currency_code", "comment": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "device_os": {"type": "text", "index": 9, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 10, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 11, "name": "network", "comment": "The network associated with this record."}, "language": {"type": "text", "index": 12, "name": "language", "comment": "The language that the associated ad was viewed in."}, "ad_distribution": {"type": "text", "index": 13, "name": "ad_distribution", "comment": "The distribution medium associated with this record."}, "bid_match_type": {"type": "text", "index": 14, "name": "bid_match_type", "comment": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "delivered_match_type": {"type": "text", "index": 15, "name": "delivered_match_type", "comment": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "top_vs_other": {"type": "text", "index": 16, "name": "top_vs_other", "comment": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009)."}, "clicks": {"type": "integer", "index": 17, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "integer", "index": 18, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "double precision", "index": 19, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "integer", "index": 20, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 21, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "integer", "index": 22, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "all_conversions_value": {"type": "double precision", "index": 23, "name": "all_conversions_value", "comment": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__keyword_daily_report"}, "model.microsoft_ads.stg_microsoft_ads__keyword_daily_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__keyword_daily_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "bigint", "index": 5, "name": "ad_id", "comment": null}, "keyword_id": {"type": "bigint", "index": 6, "name": "keyword_id", "comment": null}, "currency_code": {"type": "text", "index": 7, "name": "currency_code", "comment": null}, "device_os": {"type": "text", "index": 8, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 9, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 10, "name": "network", "comment": null}, "language": {"type": "text", "index": 11, "name": "language", "comment": null}, "ad_distribution": {"type": "text", "index": 12, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 13, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 14, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 15, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 16, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 17, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 18, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 19, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 20, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 21, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 22, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 23, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 24, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__keyword_daily_report_tmp"}, "model.microsoft_ads.stg_microsoft_ads__keyword_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__keyword_history", "database": "postgres", "comment": "Each record in this table represents a version of one or more Microsoft keywords.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "keyword_id": {"type": "bigint", "index": 2, "name": "keyword_id", "comment": "The ID of the keyword."}, "keyword_name": {"type": "text", "index": 3, "name": "keyword_name", "comment": "The keyword(s) associated with this record."}, "modified_at": {"type": "timestamp without time zone", "index": 4, "name": "modified_at", "comment": "The time each version of the object was last modified, i.e. when that version of the object was 'created'."}, "ad_group_id": {"type": "bigint", "index": 5, "name": "ad_group_id", "comment": "The ID of the corresponding ad group."}, "match_type": {"type": "text", "index": 6, "name": "match_type", "comment": "The match type associated with this record; values contain but may not be limited to 'Broad', 'Exact', 'Phrase'. Please refer to Microsoft Ad's [documentation](https://help.ads.microsoft.com/#apex/ads/en/50822/1)."}, "status": {"type": "text", "index": 7, "name": "status", "comment": "The status of this keyword; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/keywordstatus?view=bingads-13) for more information on values and definitions."}, "is_most_recent_record": {"type": "boolean", "index": 8, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__keyword_history"}, "model.microsoft_ads.stg_microsoft_ads__keyword_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__keyword_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "modified_time": {"type": "timestamp without time zone", "index": 3, "name": "modified_time", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "match_type": {"type": "text", "index": 5, "name": "match_type", "comment": null}, "status": {"type": "text", "index": 6, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__keyword_history_tmp"}, "model.microsoft_ads.stg_microsoft_ads__search_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__search_daily_report", "database": "postgres", "comment": "Each record in this table represents the daily performance by account, campaign, ad group, ad, keyword and all non-metric columns.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The date of the performance report."}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": "The ID of the campaign."}, "ad_group_id": {"type": "bigint", "index": 5, "name": "ad_group_id", "comment": "The ID of the corresponding ad group."}, "ad_id": {"type": "bigint", "index": 6, "name": "ad_id", "comment": "The ID of the corresponding ad."}, "keyword_id": {"type": "bigint", "index": 7, "name": "keyword_id", "comment": "The ID of the keyword."}, "search_query": {"type": "text", "index": 8, "name": "search_query", "comment": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009)."}, "device_os": {"type": "text", "index": 9, "name": "device_os", "comment": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "device_type": {"type": "text", "index": 10, "name": "device_type", "comment": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "network": {"type": "text", "index": 11, "name": "network", "comment": "The network associated with this record."}, "language": {"type": "text", "index": 12, "name": "language", "comment": "The language that the associated ad was viewed in."}, "bid_match_type": {"type": "text", "index": 13, "name": "bid_match_type", "comment": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "delivered_match_type": {"type": "text", "index": 14, "name": "delivered_match_type", "comment": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "top_vs_other": {"type": "text", "index": 15, "name": "top_vs_other", "comment": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009)."}, "clicks": {"type": "integer", "index": 16, "name": "clicks", "comment": "The number of clicks that occurred by the grain of the report."}, "impressions": {"type": "integer", "index": 17, "name": "impressions", "comment": "The number of impressions that occurred by the grain of the report."}, "spend": {"type": "double precision", "index": 18, "name": "spend", "comment": "The amount of spend that occurred by the grain of the report."}, "conversions": {"type": "integer", "index": 19, "name": "conversions", "comment": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "conversions_value": {"type": "double precision", "index": 20, "name": "conversions_value", "comment": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "all_conversions": {"type": "integer", "index": 21, "name": "all_conversions", "comment": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "all_conversions_value": {"type": "double precision", "index": 22, "name": "all_conversions_value", "comment": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__search_daily_report"}, "model.microsoft_ads.stg_microsoft_ads__search_daily_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__search_daily_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "bigint", "index": 5, "name": "ad_id", "comment": null}, "keyword_id": {"type": "bigint", "index": 6, "name": "keyword_id", "comment": null}, "search_query": {"type": "text", "index": 7, "name": "search_query", "comment": null}, "device_os": {"type": "text", "index": 8, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 9, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 10, "name": "network", "comment": null}, "language": {"type": "text", "index": 11, "name": "language", "comment": null}, "bid_match_type": {"type": "text", "index": 12, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 13, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 14, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 15, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 16, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 17, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 18, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 19, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 20, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 21, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 22, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 23, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.microsoft_ads.stg_microsoft_ads__search_daily_report_tmp"}, "model.pinterest.stg_pinterest_ads__ad_group_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__ad_group_history", "database": "postgres", "comment": "Each record represents a version of a Pinterest Ad Group.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_group_id": {"type": "text", "index": 2, "name": "ad_group_id", "comment": "Ad group ID."}, "ad_group_name": {"type": "text", "index": 3, "name": "ad_group_name", "comment": "Ad group name."}, "ad_group_status": {"type": "text", "index": 4, "name": "ad_group_status", "comment": "The status of the Ad group. One of \"ACTIVE\", \"ARCHIVED\", \"PAUSED\""}, "advertiser_id": {"type": "bigint", "index": 5, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "_fivetran_synced": {"type": "text", "index": 6, "name": "_fivetran_synced", "comment": "Timestamp of when a record was last synced."}, "campaign_id": {"type": "text", "index": 7, "name": "campaign_id", "comment": "Parent Campaign ID."}, "created_at": {"type": "text", "index": 8, "name": "created_at", "comment": "Ad group creation time."}, "end_time": {"type": "integer", "index": 9, "name": "end_time", "comment": "Ad group end time."}, "pacing_delivery_type": {"type": "text", "index": 10, "name": "pacing_delivery_type", "comment": "Ad group pacing delivery type. With ACCELERATED, an ad group budget is spent as fast as possible. With STANDARD, an ad group budget is spent smoothly over a day. When using CBO, only the STANDARD pacing delivery type is allowed."}, "placement_group": {"type": "text", "index": 11, "name": "placement_group", "comment": "The placement group. \"ALL\", \"SEARCH\", \"BROWSE\", or \"OTHER\""}, "start_time": {"type": "text", "index": 12, "name": "start_time", "comment": "Ad group start time."}, "summary_status": {"type": "text", "index": 13, "name": "summary_status", "comment": "Summary status. \"RUNNING\", \"PAUSED\", \"NOT_STARTED\", \"COMPLETED\", \"ADVERTISER_DISABLED\", \"ARCHIVED\""}, "is_most_recent_record": {"type": "boolean", "index": 14, "name": "is_most_recent_record", "comment": "Boolean representing whether the record is the most recent version of the object."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__ad_group_history"}, "model.pinterest.stg_pinterest_ads__ad_group_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__ad_group_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "campaign_id": {"type": "bigint", "index": 2, "name": "campaign_id", "comment": null}, "created_time": {"type": "text", "index": 3, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "status": {"type": "text", "index": 5, "name": "status", "comment": null}, "start_time": {"type": "text", "index": 6, "name": "start_time", "comment": null}, "end_time": {"type": "integer", "index": 7, "name": "end_time", "comment": null}, "_fivetran_synced": {"type": "text", "index": 8, "name": "_fivetran_synced", "comment": null}, "pacing_delivery_type": {"type": "text", "index": 9, "name": "pacing_delivery_type", "comment": null}, "placement_group": {"type": "text", "index": 10, "name": "placement_group", "comment": null}, "summary_status": {"type": "text", "index": 11, "name": "summary_status", "comment": null}, "ad_account_id": {"type": "bigint", "index": 12, "name": "ad_account_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__ad_group_history_tmp"}, "model.pinterest.stg_pinterest_ads__ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__ad_group_report", "database": "postgres", "comment": "Each record represents the daily performance of a Pinterest Ad Groups by campaign and advertiser.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp with time zone", "index": 2, "name": "date_day", "comment": "The performance date of the record."}, "ad_group_id": {"type": "text", "index": 3, "name": "ad_group_id", "comment": "The ID of the related Ad group."}, "ad_group_name": {"type": "text", "index": 4, "name": "ad_group_name", "comment": "Name of the ad group."}, "ad_group_status": {"type": "text", "index": 5, "name": "ad_group_status", "comment": "Status of the ad group."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID of the related Campaign."}, "advertiser_id": {"type": "text", "index": 7, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "impressions": {"type": "integer", "index": 8, "name": "impressions", "comment": "The number of paid and earned impressions that occurred on the day of the record."}, "clicks": {"type": "integer", "index": 9, "name": "clicks", "comment": "The number of paid and earned clicks that occurred on the day of the record."}, "spend": {"type": "numeric", "index": 10, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "total_conversions": {"type": "integer", "index": 11, "name": "total_conversions", "comment": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "total_conversions_quantity": {"type": "integer", "index": 12, "name": "total_conversions_quantity", "comment": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "total_conversions_value": {"type": "numeric", "index": 13, "name": "total_conversions_value", "comment": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__ad_group_report"}, "model.pinterest.stg_pinterest_ads__ad_group_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__ad_group_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "ad_group_id": {"type": "bigint", "index": 2, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "text", "index": 3, "name": "ad_group_name", "comment": null}, "ad_group_status": {"type": "text", "index": 4, "name": "ad_group_status", "comment": null}, "campaign_id": {"type": "bigint", "index": 5, "name": "campaign_id", "comment": null}, "advertiser_id": {"type": "bigint", "index": 6, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 8, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 9, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 10, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 11, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 12, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 13, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 14, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 15, "name": "total_conversions_value_in_micro_dollar", "comment": null}, "total_view_checkout": {"type": "integer", "index": 16, "name": "total_view_checkout", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__ad_group_report_tmp"}, "model.pinterest.stg_pinterest_ads__advertiser_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__advertiser_history", "database": "postgres", "comment": "Each record represents a version of an advertiser.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "advertiser_id": {"type": "text", "index": 2, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "advertiser_name": {"type": "text", "index": 3, "name": "advertiser_name", "comment": "Name of the advertiser."}, "country": {"type": "text", "index": 4, "name": "country", "comment": "The country code where the advertiser is located."}, "created_at": {"type": "timestamp without time zone", "index": 5, "name": "created_at", "comment": "Timestamp of when a record was created."}, "currency_code": {"type": "text", "index": 6, "name": "currency_code", "comment": "The currency code which the advertiser is set up using."}, "owner_user_id": {"type": "integer", "index": 7, "name": "owner_user_id", "comment": "Unique identifier of the owner user."}, "owner_username": {"type": "text", "index": 8, "name": "owner_username", "comment": "Advertiser's username."}, "advertiser_permissions": {"type": "text", "index": 9, "name": "advertiser_permissions", "comment": "The permissions associated with this account."}, "updated_at": {"type": "timestamp without time zone", "index": 10, "name": "updated_at", "comment": "Timestamp of when a record was last updated."}, "is_most_recent_record": {"type": "boolean", "index": 11, "name": "is_most_recent_record", "comment": "Boolean representing whether the record is the most recent version of the object."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__advertiser_history"}, "model.pinterest.stg_pinterest_ads__advertiser_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__advertiser_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_time": {"type": "timestamp without time zone", "index": 2, "name": "updated_time", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "billing_profile_status": {"type": "text", "index": 4, "name": "billing_profile_status", "comment": null}, "billing_type": {"type": "text", "index": 5, "name": "billing_type", "comment": null}, "country": {"type": "text", "index": 6, "name": "country", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 7, "name": "created_time", "comment": null}, "currency": {"type": "text", "index": 8, "name": "currency", "comment": null}, "merchant_id": {"type": "integer", "index": 9, "name": "merchant_id", "comment": null}, "name": {"type": "text", "index": 10, "name": "name", "comment": null}, "owner_user_id": {"type": "integer", "index": 11, "name": "owner_user_id", "comment": null}, "status": {"type": "text", "index": 12, "name": "status", "comment": null}, "owner_username": {"type": "text", "index": 13, "name": "owner_username", "comment": null}, "permissions": {"type": "text", "index": 14, "name": "permissions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__advertiser_history_tmp"}, "model.pinterest.stg_pinterest_ads__advertiser_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__advertiser_report", "database": "postgres", "comment": "Each record represents the daily performance of an Advertiser.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp with time zone", "index": 2, "name": "date_day", "comment": "The performance date of the record."}, "advertiser_id": {"type": "text", "index": 3, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "impressions": {"type": "integer", "index": 4, "name": "impressions", "comment": "The number of paid and earned impressions that occurred on the day of the record."}, "clicks": {"type": "integer", "index": 5, "name": "clicks", "comment": "The number of paid and earned clicks that occurred on the day of the record."}, "spend": {"type": "numeric", "index": 6, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "total_conversions": {"type": "integer", "index": 7, "name": "total_conversions", "comment": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "total_conversions_quantity": {"type": "integer", "index": 8, "name": "total_conversions_quantity", "comment": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "total_conversions_value": {"type": "numeric", "index": 9, "name": "total_conversions_value", "comment": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__advertiser_report"}, "model.pinterest.stg_pinterest_ads__advertiser_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__advertiser_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "advertiser_id": {"type": "bigint", "index": 2, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 4, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 5, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 6, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 7, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 8, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 9, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 10, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 11, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__advertiser_report_tmp"}, "model.pinterest.stg_pinterest_ads__campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__campaign_history", "database": "postgres", "comment": "Each record represents a version of a Pinterest Campaign.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_id": {"type": "text", "index": 2, "name": "campaign_id", "comment": "The ID of the related Campaign."}, "campaign_name": {"type": "text", "index": 3, "name": "campaign_name", "comment": "Campaign name."}, "advertiser_id": {"type": "text", "index": 4, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "default_ad_group_budget_in_micro_currency": {"type": "integer", "index": 5, "name": "default_ad_group_budget_in_micro_currency", "comment": "When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account."}, "is_automated_campaign": {"type": "boolean", "index": 6, "name": "is_automated_campaign", "comment": "Specifies whether the campaign was created in the automated campaign flow"}, "is_campaign_budget_optimization": {"type": "boolean", "index": 7, "name": "is_campaign_budget_optimization", "comment": "Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared."}, "is_flexible_daily_budgets": {"type": "boolean", "index": 8, "name": "is_flexible_daily_budgets", "comment": "Determine if a campaign has flexible daily budgets setup."}, "campaign_status": {"type": "text", "index": 9, "name": "campaign_status", "comment": "The status of the Campaign. One of \"ACTIVE\", \"ARCHIVED\", \"PAUSED\""}, "_fivetran_synced": {"type": "text", "index": 10, "name": "_fivetran_synced", "comment": "Timestamp of when a record was last synced."}, "created_at": {"type": "text", "index": 11, "name": "created_at", "comment": "Campaign creation time."}, "start_time": {"type": "timestamp without time zone", "index": 12, "name": "start_time", "comment": "Timestamp when the campaign became active or was scheduled to start."}, "end_time": {"type": "timestamp without time zone", "index": 13, "name": "end_time", "comment": "Timestamp when the campaign ended or is scheduled to end."}, "budget_spend_cap": {"type": "integer", "index": 14, "name": "budget_spend_cap", "comment": "Maximum amount allowed to be spent over a specified budget period for the campaign."}, "lifetime_spend_cap": {"type": "integer", "index": 15, "name": "lifetime_spend_cap", "comment": "Total maximum spend allowed across the entire lifespan of the campaign."}, "objective_type": {"type": "text", "index": 16, "name": "objective_type", "comment": "The primary goal of the campaign (e.g., brand awareness, conversions, video views)."}, "is_most_recent_record": {"type": "boolean", "index": 17, "name": "is_most_recent_record", "comment": "Boolean representing whether the record is the most recent version of the object."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__campaign_history"}, "model.pinterest.stg_pinterest_ads__campaign_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__campaign_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "created_time": {"type": "text", "index": 2, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "status": {"type": "text", "index": 4, "name": "status", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "advertiser_id": {"type": "bigint", "index": 6, "name": "advertiser_id", "comment": null}, "default_ad_group_budget_in_micro_currency": {"type": "integer", "index": 7, "name": "default_ad_group_budget_in_micro_currency", "comment": null}, "is_automated_campaign": {"type": "boolean", "index": 8, "name": "is_automated_campaign", "comment": null}, "is_campaign_budget_optimization": {"type": "boolean", "index": 9, "name": "is_campaign_budget_optimization", "comment": null}, "is_flexible_daily_budgets": {"type": "boolean", "index": 10, "name": "is_flexible_daily_budgets", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__campaign_history_tmp"}, "model.pinterest.stg_pinterest_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__campaign_report", "database": "postgres", "comment": "Each record represents the daily performance of Campaigns by advertiser.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp with time zone", "index": 2, "name": "date_day", "comment": "The performance date of the record."}, "campaign_id": {"type": "text", "index": 3, "name": "campaign_id", "comment": "The ID of the related Campaign."}, "campaign_name": {"type": "text", "index": 4, "name": "campaign_name", "comment": "Name of the campaign."}, "campaign_status": {"type": "text", "index": 5, "name": "campaign_status", "comment": "Status of the campaign."}, "advertiser_id": {"type": "text", "index": 6, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": "The number of paid and earned impressions that occurred on the day of the record."}, "clicks": {"type": "integer", "index": 8, "name": "clicks", "comment": "The number of paid and earned clicks that occurred on the day of the record."}, "spend": {"type": "numeric", "index": 9, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "total_conversions": {"type": "integer", "index": 10, "name": "total_conversions", "comment": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "total_conversions_quantity": {"type": "integer", "index": 11, "name": "total_conversions_quantity", "comment": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "total_conversions_value": {"type": "numeric", "index": 12, "name": "total_conversions_value", "comment": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__campaign_report"}, "model.pinterest.stg_pinterest_ads__campaign_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__campaign_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "campaign_id": {"type": "bigint", "index": 2, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "text", "index": 3, "name": "campaign_name", "comment": null}, "campaign_status": {"type": "text", "index": 4, "name": "campaign_status", "comment": null}, "advertiser_id": {"type": "bigint", "index": 5, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 7, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 8, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 9, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 10, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 11, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 12, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 13, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 14, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__campaign_report_tmp"}, "model.pinterest.stg_pinterest_ads__keyword_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__keyword_history", "database": "postgres", "comment": "Each record represents the daily performance of a Keyword.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "keyword_id": {"type": "text", "index": 2, "name": "keyword_id", "comment": "Unique identifier of the keyword."}, "keyword_value": {"type": "text", "index": 3, "name": "keyword_value", "comment": "The text value that makes upd the keyword."}, "_fivetran_id": {"type": "text", "index": 4, "name": "_fivetran_id", "comment": "The unique identifier of the record within the Fivetran synced table."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": "Timestamp of when a record was last synced."}, "ad_group_id": {"type": "text", "index": 6, "name": "ad_group_id", "comment": "The ID of the related Ad group."}, "advertiser_id": {"type": "text", "index": 7, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "archived": {"type": "boolean", "index": 8, "name": "archived", "comment": "Boolean indicating if the keyword is archived."}, "bid": {"type": "integer", "index": 9, "name": "bid", "comment": "Bid amount set for the keyword."}, "campaign_id": {"type": "text", "index": 10, "name": "campaign_id", "comment": "The ID of the related Campaign."}, "match_type": {"type": "text", "index": 11, "name": "match_type", "comment": "Type of match the keyword is tied to. Either Exact or Broad."}, "parent_type": {"type": "text", "index": 12, "name": "parent_type", "comment": "Identifier of what grain the parent type is. Ad group or campaign."}, "is_most_recent_record": {"type": "boolean", "index": 13, "name": "is_most_recent_record", "comment": "Boolean representing whether the record is the most recent version of the object."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__keyword_history"}, "model.pinterest.stg_pinterest_ads__keyword_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__keyword_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "advertiser_id": {"type": "bigint", "index": 4, "name": "advertiser_id", "comment": null}, "archived": {"type": "boolean", "index": 5, "name": "archived", "comment": null}, "bid": {"type": "integer", "index": 6, "name": "bid", "comment": null}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": null}, "id": {"type": "bigint", "index": 8, "name": "id", "comment": null}, "match_type": {"type": "text", "index": 9, "name": "match_type", "comment": null}, "parent_type": {"type": "text", "index": 10, "name": "parent_type", "comment": null}, "value": {"type": "text", "index": 11, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__keyword_history_tmp"}, "model.pinterest.stg_pinterest_ads__keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__keyword_report", "database": "postgres", "comment": "Each record represents the daily performance of Keywords by ad group, campaign, and advertiser.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp with time zone", "index": 2, "name": "date_day", "comment": "The performance date of the record."}, "keyword_id": {"type": "text", "index": 3, "name": "keyword_id", "comment": "Unique identifier of the keyword."}, "pin_promotion_id": {"type": "text", "index": 4, "name": "pin_promotion_id", "comment": "The ID of the related Pin promotion."}, "ad_group_id": {"type": "text", "index": 5, "name": "ad_group_id", "comment": "The ID of the related Ad group."}, "ad_group_name": {"type": "text", "index": 6, "name": "ad_group_name", "comment": "Name of the ad group."}, "ad_group_status": {"type": "text", "index": 7, "name": "ad_group_status", "comment": "Status of the ad group."}, "campaign_id": {"type": "text", "index": 8, "name": "campaign_id", "comment": "The ID of the related Campaign."}, "advertiser_id": {"type": "text", "index": 9, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "impressions": {"type": "integer", "index": 10, "name": "impressions", "comment": "The number of paid and earned impressions that occurred on the day of the record."}, "clicks": {"type": "integer", "index": 11, "name": "clicks", "comment": "The number of paid and earned clicks that occurred on the day of the record."}, "spend": {"type": "numeric", "index": 12, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "total_conversions": {"type": "integer", "index": 13, "name": "total_conversions", "comment": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "total_conversions_quantity": {"type": "integer", "index": 14, "name": "total_conversions_quantity", "comment": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "total_conversions_value": {"type": "numeric", "index": 15, "name": "total_conversions_value", "comment": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__keyword_report"}, "model.pinterest.stg_pinterest_ads__keyword_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__keyword_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "keyword_id": {"type": "bigint", "index": 2, "name": "keyword_id", "comment": null}, "pin_promotion_id": {"type": "bigint", "index": 3, "name": "pin_promotion_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "text", "index": 5, "name": "ad_group_name", "comment": null}, "ad_group_status": {"type": "text", "index": 6, "name": "ad_group_status", "comment": null}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": null}, "advertiser_id": {"type": "bigint", "index": 8, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 9, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 10, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 11, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 12, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 13, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 14, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 15, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 16, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 17, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__keyword_report_tmp"}, "model.pinterest.stg_pinterest_ads__pin_promotion_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__pin_promotion_history", "database": "postgres", "comment": "Each record represents a version of a Pinterest Pin promotion.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "pin_promotion_id": {"type": "text", "index": 2, "name": "pin_promotion_id", "comment": "Pin promotion ID."}, "advertiser_id": {"type": "text", "index": 3, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "ad_group_id": {"type": "text", "index": 4, "name": "ad_group_id", "comment": "Pin promotion ad group ID."}, "created_at": {"type": "text", "index": 5, "name": "created_at", "comment": "Pin creation time."}, "destination_url": {"type": "text", "index": 6, "name": "destination_url", "comment": "Pin destination URL."}, "base_url": {"type": "text", "index": 7, "name": "base_url", "comment": "The base URL of the ad, extracted from the `destination_url`."}, "url_host": {"type": "text", "index": 8, "name": "url_host", "comment": "The URL host of the ad, extracted from the `destination_url`."}, "url_path": {"type": "text", "index": 9, "name": "url_path", "comment": "The URL path of the ad, extracted from the `destination_url`."}, "utm_source": {"type": "text", "index": 10, "name": "utm_source", "comment": "The utm_source parameter of the ad, extracted from the `destination_url`."}, "utm_medium": {"type": "text", "index": 11, "name": "utm_medium", "comment": "The utm_medium parameter of the ad, extracted from the `destination_url`."}, "utm_campaign": {"type": "text", "index": 12, "name": "utm_campaign", "comment": "The utm_campaign parameter of the ad, extracted from the `destination_url`."}, "utm_content": {"type": "text", "index": 13, "name": "utm_content", "comment": "The utm_content parameter of the ad, extracted from the `destination_url`."}, "utm_term": {"type": "text", "index": 14, "name": "utm_term", "comment": "The utm_term parameter of the ad, extracted from the `destination_url`."}, "pin_name": {"type": "text", "index": 15, "name": "pin_name", "comment": "Pin promotion name."}, "pin_id": {"type": "text", "index": 16, "name": "pin_id", "comment": "Original pin ID."}, "pin_status": {"type": "text", "index": 17, "name": "pin_status", "comment": "The status of the Pin promotion. One of \"ACTIVE\", \"ARCHIVED\", \"PAUSED\""}, "creative_type": {"type": "text", "index": 18, "name": "creative_type", "comment": "The creative type. \nOne of \"APP\", \"APP_VIDEO\", \"BOARD\", \"CAROUSEL\", \"CINEMATIC\", \"COMMERCE\", \"MAX_VIDEO\", \"NATIVE_VIDEO\", \"REGULAR\", \n\"SEARCH_PROMINENCE\", \"SEARCH_PROMINENCE_CAROUSEL\", \"SHOPPING\", \"SHOP_THE_PIN\", \"THIRD_PARTY\", or \"VIDEO\".\n"}, "_fivetran_synced": {"type": "text", "index": 19, "name": "_fivetran_synced", "comment": "Timestamp of when a record was last synced."}, "is_most_recent_record": {"type": "boolean", "index": 20, "name": "is_most_recent_record", "comment": "Boolean representing whether the record is the most recent version of the object."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__pin_promotion_history"}, "model.pinterest.stg_pinterest_ads__pin_promotion_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__pin_promotion_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 2, "name": "ad_group_id", "comment": null}, "created_time": {"type": "text", "index": 3, "name": "created_time", "comment": null}, "destination_url": {"type": "text", "index": 4, "name": "destination_url", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "pin_id": {"type": "bigint", "index": 6, "name": "pin_id", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}, "creative_type": {"type": "text", "index": 8, "name": "creative_type", "comment": null}, "_fivetran_synced": {"type": "text", "index": 9, "name": "_fivetran_synced", "comment": null}, "ad_account_id": {"type": "bigint", "index": 10, "name": "ad_account_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__pin_promotion_history_tmp"}, "model.pinterest.stg_pinterest_ads__pin_promotion_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__pin_promotion_report", "database": "postgres", "comment": "Each record represents the daily performance of a Pinterest Pin promotion by ad group, campaign, and advertiser.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp with time zone", "index": 2, "name": "date_day", "comment": "The performance date of the record."}, "pin_promotion_id": {"type": "text", "index": 3, "name": "pin_promotion_id", "comment": "The ID of the related Pin promotion."}, "ad_group_id": {"type": "text", "index": 4, "name": "ad_group_id", "comment": "The ID of the related Ad group."}, "campaign_id": {"type": "text", "index": 5, "name": "campaign_id", "comment": "The ID of the related Campaign."}, "advertiser_id": {"type": "text", "index": 6, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": "The number of paid and earned impressions that occurred on the day of the record."}, "clicks": {"type": "integer", "index": 8, "name": "clicks", "comment": "The number of paid and earned clicks that occurred on the day of the record."}, "spend": {"type": "numeric", "index": 9, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "total_conversions": {"type": "integer", "index": 10, "name": "total_conversions", "comment": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "total_conversions_quantity": {"type": "integer", "index": 11, "name": "total_conversions_quantity", "comment": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "total_conversions_value": {"type": "numeric", "index": 12, "name": "total_conversions_value", "comment": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__pin_promotion_report"}, "model.pinterest.stg_pinterest_ads__pin_promotion_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__pin_promotion_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "pin_promotion_id": {"type": "bigint", "index": 2, "name": "pin_promotion_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": null}, "advertiser_id": {"type": "bigint", "index": 5, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 7, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 8, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 9, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 10, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 11, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 12, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 13, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 14, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__pin_promotion_report_tmp"}, "model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__pin_promotion_targeting_report", "database": "postgres", "comment": "Contains performance metrics for promoted Pins segmented by applied targeting criteria, including targeting type, value, and related campaign metadata.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when a record was last synced."}, "date_day": {"type": "timestamp without time zone", "index": 3, "name": "date_day", "comment": "The performance date of the record."}, "targeting_type": {"type": "text", "index": 4, "name": "targeting_type", "comment": "Reporting targeting type for ads. Possible values 'KEYWORD', 'APPTYPE', 'GENDER', 'LOCATION', 'PLACEMENT', 'COUNTRY', 'TARGETED_INTEREST', 'PINNER_INTEREST', 'AUDIENCE_INCLUDE', 'GEO', 'AGE_BUCKET', 'REGION', 'QUIZ_RESULT', 'AGE_BUCKET_AND_GENDER'"}, "targeting_value": {"type": "text", "index": 5, "name": "targeting_value", "comment": "The specific value applied within the targeting type (e.g., 'Fashion' for interest, 'New York' for location)."}, "ad_group_id": {"type": "text", "index": 6, "name": "ad_group_id", "comment": "The ID of the related Ad group."}, "advertiser_id": {"type": "text", "index": 7, "name": "advertiser_id", "comment": "The ID of the related Advertiser."}, "campaign_id": {"type": "text", "index": 8, "name": "campaign_id", "comment": "The ID of the related Campaign."}, "pin_promotion_id": {"type": "text", "index": 9, "name": "pin_promotion_id", "comment": "The ID of the related Pin promotion."}, "impressions": {"type": "double precision", "index": 10, "name": "impressions", "comment": "The number of paid and earned impressions that occurred on the day of the record."}, "clicks": {"type": "double precision", "index": 11, "name": "clicks", "comment": "The number of paid and earned clicks that occurred on the day of the record."}, "spend": {"type": "numeric", "index": 12, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "total_conversions": {"type": "integer", "index": 13, "name": "total_conversions", "comment": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "total_conversions_quantity": {"type": "integer", "index": 14, "name": "total_conversions_quantity", "comment": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "total_conversions_value": {"type": "numeric", "index": 15, "name": "total_conversions_value", "comment": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report"}, "model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__pin_promotion_targeting_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "targeting_type": {"type": "text", "index": 3, "name": "targeting_type", "comment": null}, "targeting_value": {"type": "text", "index": 4, "name": "targeting_value", "comment": null}, "ad_group_id": {"type": "text", "index": 5, "name": "ad_group_id", "comment": null}, "advertiser_id": {"type": "text", "index": 6, "name": "advertiser_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": null}, "pin_promotion_id": {"type": "text", "index": 8, "name": "pin_promotion_id", "comment": null}, "clickthrough_1": {"type": "double precision", "index": 9, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "double precision", "index": 10, "name": "clickthrough_2", "comment": null}, "impression_1": {"type": "double precision", "index": 11, "name": "impression_1", "comment": null}, "impression_2": {"type": "double precision", "index": 12, "name": "impression_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 13, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 14, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 15, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 16, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report_tmp"}, "model.pinterest.stg_pinterest_ads__targeting_geo": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__targeting_geo", "database": "postgres", "comment": "Maps country targeting values used in campaigns, including standardized names and associated location codes.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when a record was last synced."}, "country_id": {"type": "text", "index": 3, "name": "country_id", "comment": "The ID of the targeted country."}, "country_name": {"type": "text", "index": 4, "name": "country_name", "comment": "The name of the targeted country."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__targeting_geo"}, "model.pinterest.stg_pinterest_ads__targeting_geo_region": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__targeting_geo_region", "database": "postgres", "comment": "Maps region targeting values used in campaigns, including standardized names and associated location codes.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when a record was last synced."}, "country_id": {"type": "text", "index": 3, "name": "country_id", "comment": "The ID of the targeted country."}, "region_id": {"type": "text", "index": 4, "name": "region_id", "comment": "The ID of the targeted region."}, "region_name": {"type": "text", "index": 5, "name": "region_name", "comment": "The name of the targeted region."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__targeting_geo_region"}, "model.pinterest.stg_pinterest_ads__targeting_geo_region_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__targeting_geo_region_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "country_id": {"type": "text", "index": 2, "name": "country_id", "comment": null}, "region_id": {"type": "text", "index": 3, "name": "region_id", "comment": null}, "region_name": {"type": "text", "index": 4, "name": "region_name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__targeting_geo_region_tmp"}, "model.pinterest.stg_pinterest_ads__targeting_geo_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__targeting_geo_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"country_id": {"type": "text", "index": 1, "name": "country_id", "comment": null}, "country_name": {"type": "text", "index": 2, "name": "country_name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.pinterest.stg_pinterest_ads__targeting_geo_tmp"}, "model.reddit_ads.stg_reddit_ads__account": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__account", "database": "postgres", "comment": "Each record in this table represents information about an account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "attribution_type": {"type": "text", "index": 2, "name": "attribution_type", "comment": "Attribution type: \"CLICK_THROUGH_CONVERSION\", \"VIEW_THROUGH_CONVERSION\", or \"ALL_CONVERSION\".\nCLICK_THROUGH_CONVERSION: A user clicked on your ad and then completed the conversion action on your site. \nVIEW_THROUGH_CONVERSION: A user saw your ad and did not click it, but did complete the conversion action on your site.\nALL_CONVERSION: Combination of both."}, "click_attribution_window": {"type": "text", "index": 3, "name": "click_attribution_window", "comment": "Determines how long after clicking on your ad you count that user\u2019s actions as a conversion. \"DAY\", \"WEEK\", or \"MONTH\""}, "created_at": {"type": "timestamp without time zone", "index": 4, "name": "created_at", "comment": "Time that the respective record (ad, ad group, campaign, post, etc) was created. ISO-8601 timestamp."}, "currency": {"type": "text", "index": 5, "name": "currency", "comment": "The currency this account uses (ISO-4217)"}, "account_id": {"type": "character varying(255)", "index": 6, "name": "account_id", "comment": "The ID of the account."}, "time_zone_id": {"type": "text", "index": 7, "name": "time_zone_id", "comment": "The time zone id preference for this account"}, "view_attribution_window": {"type": "text", "index": 8, "name": "view_attribution_window", "comment": "Determines how long after viewing on your ad you count that user\u2019s actions as a conversion. \"DAY\", \"WEEK\", or \"MONTH\""}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__account"}, "model.reddit_ads.stg_reddit_ads__account_conversions_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__account_conversions_report", "database": "postgres", "comment": "Provides a summary of conversion events at the account level, aggregating key metrics by event and day such as view-through and click-through conversions.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "date_day": {"type": "date", "index": 4, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "event_name": {"type": "text", "index": 5, "name": "event_name", "comment": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset."}, "total_items": {"type": "integer", "index": 6, "name": "total_items", "comment": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion."}, "total_value": {"type": "double precision", "index": 7, "name": "total_value", "comment": "The total monetary value associated with a conversion event."}, "conversions": {"type": "integer", "index": 8, "name": "conversions", "comment": "The total click-through conversions attributed, for the given month-long window."}, "view_through_conversions": {"type": "integer", "index": 9, "name": "view_through_conversions", "comment": "The total view-through conversions attributed, for the given month-long window."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__account_conversions_report"}, "model.reddit_ads.stg_reddit_ads__account_conversions_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__account_conversions_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "avg_value": {"type": "double precision", "index": 3, "name": "avg_value", "comment": null}, "click_through_conversion_attribution_window_day": {"type": "integer", "index": 4, "name": "click_through_conversion_attribution_window_day", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 5, "name": "click_through_conversion_attribution_window_month", "comment": null}, "click_through_conversion_attribution_window_week": {"type": "integer", "index": 6, "name": "click_through_conversion_attribution_window_week", "comment": null}, "date": {"type": "date", "index": 7, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 8, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 9, "name": "total_items", "comment": null}, "total_value": {"type": "double precision", "index": 10, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_day": {"type": "integer", "index": 11, "name": "view_through_conversion_attribution_window_day", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 12, "name": "view_through_conversion_attribution_window_month", "comment": null}, "view_through_conversion_attribution_window_week": {"type": "integer", "index": 13, "name": "view_through_conversion_attribution_window_week", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__account_conversions_report_tmp"}, "model.reddit_ads.stg_reddit_ads__account_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__account_report", "database": "postgres", "comment": "Each record represents a summary of events for each given date and account.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": "The ID of the account."}, "clicks": {"type": "integer", "index": 3, "name": "clicks", "comment": "The number of clicks detected for this report period"}, "date_day": {"type": "date", "index": 4, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "impressions": {"type": "integer", "index": 5, "name": "impressions", "comment": "The number of impressions served for this report period"}, "region": {"type": "integer", "index": 6, "name": "region", "comment": "The region (US state or UK country) targeted for the reports"}, "spend": {"type": "numeric", "index": 7, "name": "spend", "comment": "Spend converted out of microcurrency (so Spend/1,000,000)"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__account_report"}, "model.reddit_ads.stg_reddit_ads__account_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__account_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "app_install_metrics_add_payment_info": {"type": "integer", "index": 4, "name": "app_install_metrics_add_payment_info", "comment": null}, "app_install_metrics_add_to_cart": {"type": "integer", "index": 5, "name": "app_install_metrics_add_to_cart", "comment": null}, "app_install_metrics_app_launch": {"type": "integer", "index": 6, "name": "app_install_metrics_app_launch", "comment": null}, "app_install_metrics_completed_tutorial": {"type": "integer", "index": 7, "name": "app_install_metrics_completed_tutorial", "comment": null}, "app_install_metrics_install": {"type": "integer", "index": 8, "name": "app_install_metrics_install", "comment": null}, "app_install_metrics_level_achieved": {"type": "integer", "index": 9, "name": "app_install_metrics_level_achieved", "comment": null}, "app_install_metrics_purchase": {"type": "integer", "index": 10, "name": "app_install_metrics_purchase", "comment": null}, "app_install_metrics_search": {"type": "integer", "index": 11, "name": "app_install_metrics_search", "comment": null}, "app_install_metrics_sign_up": {"type": "integer", "index": 12, "name": "app_install_metrics_sign_up", "comment": null}, "app_install_metrics_spend": {"type": "integer", "index": 13, "name": "app_install_metrics_spend", "comment": null}, "app_install_metrics_spend_credits": {"type": "integer", "index": 14, "name": "app_install_metrics_spend_credits", "comment": null}, "app_install_metrics_view_content": {"type": "integer", "index": 15, "name": "app_install_metrics_view_content", "comment": null}, "clicks": {"type": "integer", "index": 16, "name": "clicks", "comment": null}, "comment_downvotes": {"type": "integer", "index": 17, "name": "comment_downvotes", "comment": null}, "comment_upvotes": {"type": "integer", "index": 18, "name": "comment_upvotes", "comment": null}, "comments_page_views": {"type": "integer", "index": 19, "name": "comments_page_views", "comment": null}, "conversion_roas": {"type": "integer", "index": 20, "name": "conversion_roas", "comment": null}, "cpc": {"type": "double precision", "index": 21, "name": "cpc", "comment": null}, "ctr": {"type": "double precision", "index": 22, "name": "ctr", "comment": null}, "ecpm": {"type": "double precision", "index": 23, "name": "ecpm", "comment": null}, "gallery_item_caption": {"type": "integer", "index": 24, "name": "gallery_item_caption", "comment": null}, "gallery_item_id": {"type": "integer", "index": 25, "name": "gallery_item_id", "comment": null}, "impressions": {"type": "integer", "index": 26, "name": "impressions", "comment": null}, "legacy_click_conversions_attribution_window_day": {"type": "integer", "index": 27, "name": "legacy_click_conversions_attribution_window_day", "comment": null}, "legacy_click_conversions_attribution_window_month": {"type": "integer", "index": 28, "name": "legacy_click_conversions_attribution_window_month", "comment": null}, "legacy_click_conversions_attribution_window_week": {"type": "integer", "index": 29, "name": "legacy_click_conversions_attribution_window_week", "comment": null}, "legacy_view_conversions_attribution_window_day": {"type": "integer", "index": 30, "name": "legacy_view_conversions_attribution_window_day", "comment": null}, "legacy_view_conversions_attribution_window_month": {"type": "integer", "index": 31, "name": "legacy_view_conversions_attribution_window_month", "comment": null}, "legacy_view_conversions_attribution_window_week": {"type": "integer", "index": 32, "name": "legacy_view_conversions_attribution_window_week", "comment": null}, "priority": {"type": "integer", "index": 33, "name": "priority", "comment": null}, "region": {"type": "integer", "index": 34, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 35, "name": "spend", "comment": null}, "video_fully_viewable_impressions": {"type": "integer", "index": 36, "name": "video_fully_viewable_impressions", "comment": null}, "video_plays_expanded": {"type": "integer", "index": 37, "name": "video_plays_expanded", "comment": null}, "video_plays_with_sound": {"type": "integer", "index": 38, "name": "video_plays_with_sound", "comment": null}, "video_started": {"type": "integer", "index": 39, "name": "video_started", "comment": null}, "video_viewable_impressions": {"type": "integer", "index": 40, "name": "video_viewable_impressions", "comment": null}, "video_watched_100_percent": {"type": "integer", "index": 41, "name": "video_watched_100_percent", "comment": null}, "video_watched_10_seconds": {"type": "integer", "index": 42, "name": "video_watched_10_seconds", "comment": null}, "video_watched_25_percent": {"type": "integer", "index": 43, "name": "video_watched_25_percent", "comment": null}, "video_watched_3_seconds": {"type": "integer", "index": 44, "name": "video_watched_3_seconds", "comment": null}, "video_watched_50_percent": {"type": "integer", "index": 45, "name": "video_watched_50_percent", "comment": null}, "video_watched_5_seconds": {"type": "integer", "index": 46, "name": "video_watched_5_seconds", "comment": null}, "video_watched_75_percent": {"type": "integer", "index": 47, "name": "video_watched_75_percent", "comment": null}, "video_watched_95_percent": {"type": "integer", "index": 48, "name": "video_watched_95_percent", "comment": null}, "viewable_impressions": {"type": "integer", "index": 49, "name": "viewable_impressions", "comment": null}, "viewer_comments": {"type": "integer", "index": 50, "name": "viewer_comments", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__account_report_tmp"}, "model.reddit_ads.stg_reddit_ads__account_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__account_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying(255)", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "attribution_type": {"type": "text", "index": 3, "name": "attribution_type", "comment": null}, "click_attribution_window": {"type": "text", "index": 4, "name": "click_attribution_window", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 5, "name": "created_at", "comment": null}, "currency": {"type": "text", "index": 6, "name": "currency", "comment": null}, "status": {"type": "integer", "index": 7, "name": "status", "comment": null}, "time_zone_id": {"type": "text", "index": 8, "name": "time_zone_id", "comment": null}, "view_attribution_window": {"type": "text", "index": 9, "name": "view_attribution_window", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__account_tmp"}, "model.reddit_ads.stg_reddit_ads__ad": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad", "database": "postgres", "comment": "Each record represents information about each ad.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": "The ID of the account."}, "ad_group_id": {"type": "character varying(255)", "index": 3, "name": "ad_group_id", "comment": "The ID of the ad group."}, "campaign_id": {"type": "character varying(255)", "index": 4, "name": "campaign_id", "comment": "The ID of the campaign."}, "click_url": {"type": "text", "index": 5, "name": "click_url", "comment": "The destination url, or the website address, that a visitor goes to when they click on the ad"}, "configured_status": {"type": "text", "index": 6, "name": "configured_status", "comment": "The status configured by the account owner. \"ACTIVE\", \"PAUSED\", \"ARCHIVED\", \"DELETED\""}, "effective_status": {"type": "text", "index": 7, "name": "effective_status", "comment": "The calculated status determining the real status of this entity."}, "ad_id": {"type": "character varying(255)", "index": 8, "name": "ad_id", "comment": "The ID of the ad."}, "is_processing": {"type": "boolean", "index": 9, "name": "is_processing", "comment": "Whether or not effective status is processing"}, "ad_name": {"type": "text", "index": 10, "name": "ad_name", "comment": "Name of ad."}, "post_id": {"type": "text", "index": 11, "name": "post_id", "comment": "The ID of the post."}, "post_url": {"type": "integer", "index": 12, "name": "post_url", "comment": "The URL belonging to the post."}, "rejection_reason": {"type": "integer", "index": 13, "name": "rejection_reason", "comment": "Reason why entity was rejected."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__ad"}, "model.reddit_ads.stg_reddit_ads__ad_conversions_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_conversions_report", "database": "postgres", "comment": "Provides a summary of conversion events at the individual ad level, aggregating key metrics by event and day such as view-through and click-through conversions.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "ad_id": {"type": "character varying(255)", "index": 4, "name": "ad_id", "comment": "The ID of the ad."}, "date_day": {"type": "date", "index": 5, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "event_name": {"type": "text", "index": 6, "name": "event_name", "comment": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset."}, "total_items": {"type": "integer", "index": 7, "name": "total_items", "comment": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion."}, "total_value": {"type": "double precision", "index": 8, "name": "total_value", "comment": "The total monetary value associated with a conversion event."}, "conversions": {"type": "integer", "index": 9, "name": "conversions", "comment": "The total click-through conversions attributed, for the given month-long window."}, "view_through_conversions": {"type": "integer", "index": 10, "name": "view_through_conversions", "comment": "The total view-through conversions attributed, for the given month-long window."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__ad_conversions_report"}, "model.reddit_ads.stg_reddit_ads__ad_conversions_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_conversions_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "ad_id": {"type": "character varying(255)", "index": 3, "name": "ad_id", "comment": null}, "avg_value": {"type": "double precision", "index": 4, "name": "avg_value", "comment": null}, "click_through_conversion_attribution_window_day": {"type": "integer", "index": 5, "name": "click_through_conversion_attribution_window_day", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 6, "name": "click_through_conversion_attribution_window_month", "comment": null}, "click_through_conversion_attribution_window_week": {"type": "integer", "index": 7, "name": "click_through_conversion_attribution_window_week", "comment": null}, "date": {"type": "date", "index": 8, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 9, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 10, "name": "total_items", "comment": null}, "total_value": {"type": "double precision", "index": 11, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_day": {"type": "integer", "index": 12, "name": "view_through_conversion_attribution_window_day", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 13, "name": "view_through_conversion_attribution_window_month", "comment": null}, "view_through_conversion_attribution_window_week": {"type": "integer", "index": 14, "name": "view_through_conversion_attribution_window_week", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__ad_conversions_report_tmp"}, "model.reddit_ads.stg_reddit_ads__ad_group": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_group", "database": "postgres", "comment": "Each record represents information about each ad group.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": "The ID of the account."}, "bid_strategy": {"type": "text", "index": 3, "name": "bid_strategy", "comment": "The bid strategy for this entity. \"MAXIMIZE_VOLUME\", \"MANUAL_BIDDING\", or \"BIDLESS\""}, "bid_value": {"type": "integer", "index": 4, "name": "bid_value", "comment": "The amount to pay in microcurrency per bidding event."}, "campaign_id": {"type": "character varying(255)", "index": 5, "name": "campaign_id", "comment": "The ID of the campaign."}, "configured_status": {"type": "text", "index": 6, "name": "configured_status", "comment": "The status configured by the account owner. \"ACTIVE\", \"PAUSED\", \"ARCHIVED\", \"DELETED\""}, "effective_status": {"type": "text", "index": 7, "name": "effective_status", "comment": "The calculated status determining the real status of this entity."}, "end_time_at": {"type": "timestamp without time zone", "index": 8, "name": "end_time_at", "comment": "When the entity will stop delivering."}, "expand_targeting": {"type": "boolean", "index": 9, "name": "expand_targeting", "comment": "Boolean that when selected, allows Reddit to expand your targeting to maximize your results."}, "goal_type": {"type": "text", "index": 10, "name": "goal_type", "comment": "The type of goal for the entity. \"IMPRESSIONS\", \"PERCENTAGE\", \"CLICKS\", \"CONVERSIONS\", \"LIFETIME_SPEND\", \"DAILY_SPEND\", or \"VIDEO_VIEWABLE_IMPRESSIONS\""}, "goal_value": {"type": "integer", "index": 11, "name": "goal_value", "comment": "The value used to determine the goal has been met. This is measured in microcurrency for monetary goals types."}, "ad_group_id": {"type": "character varying(255)", "index": 12, "name": "ad_group_id", "comment": "The ID of the ad group."}, "is_processing": {"type": "boolean", "index": 13, "name": "is_processing", "comment": "Whether or not effective status is processing"}, "ad_group_name": {"type": "text", "index": 14, "name": "ad_group_name", "comment": "Name of ad group."}, "optimization_strategy_type": {"type": "integer", "index": 15, "name": "optimization_strategy_type", "comment": "The strategy to use when optimizing the delivery of an ad. \"DOWNSTREAM_CONVERSIONS\" or \"APP_INSTALLS\""}, "start_time_at": {"type": "timestamp without time zone", "index": 16, "name": "start_time_at", "comment": "When the entity will begin to deliver."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__ad_group"}, "model.reddit_ads.stg_reddit_ads__ad_group_conversions_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_group_conversions_report", "database": "postgres", "comment": "Provides a summary of conversion events at the ad group level, aggregating key metrics by event and day such as view-through and click-through conversions.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "ad_group_id": {"type": "character varying(255)", "index": 4, "name": "ad_group_id", "comment": "The ID of the ad group."}, "date_day": {"type": "date", "index": 5, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "event_name": {"type": "text", "index": 6, "name": "event_name", "comment": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset."}, "total_items": {"type": "integer", "index": 7, "name": "total_items", "comment": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion."}, "total_value": {"type": "double precision", "index": 8, "name": "total_value", "comment": "The total monetary value associated with a conversion event."}, "conversions": {"type": "integer", "index": 9, "name": "conversions", "comment": "The total click-through conversions attributed, for the given month-long window."}, "view_through_conversions": {"type": "integer", "index": 10, "name": "view_through_conversions", "comment": "The total view-through conversions attributed, for the given month-long window."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__ad_group_conversions_report"}, "model.reddit_ads.stg_reddit_ads__ad_group_conversions_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_group_conversions_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "ad_group_id": {"type": "character varying(255)", "index": 3, "name": "ad_group_id", "comment": null}, "avg_value": {"type": "double precision", "index": 4, "name": "avg_value", "comment": null}, "click_through_conversion_attribution_window_day": {"type": "integer", "index": 5, "name": "click_through_conversion_attribution_window_day", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 6, "name": "click_through_conversion_attribution_window_month", "comment": null}, "click_through_conversion_attribution_window_week": {"type": "integer", "index": 7, "name": "click_through_conversion_attribution_window_week", "comment": null}, "date": {"type": "date", "index": 8, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 9, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 10, "name": "total_items", "comment": null}, "total_value": {"type": "double precision", "index": 11, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_day": {"type": "integer", "index": 12, "name": "view_through_conversion_attribution_window_day", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 13, "name": "view_through_conversion_attribution_window_month", "comment": null}, "view_through_conversion_attribution_window_week": {"type": "integer", "index": 14, "name": "view_through_conversion_attribution_window_week", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__ad_group_conversions_report_tmp"}, "model.reddit_ads.stg_reddit_ads__ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_group_report", "database": "postgres", "comment": "Each record represents a summary of events for each given date and ad group.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": "The ID of the account."}, "ad_group_id": {"type": "character varying(255)", "index": 3, "name": "ad_group_id", "comment": "The ID of the ad group."}, "clicks": {"type": "integer", "index": 4, "name": "clicks", "comment": "The number of clicks detected for this report period"}, "date_day": {"type": "date", "index": 5, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": "The number of impressions served for this report period"}, "region": {"type": "integer", "index": 7, "name": "region", "comment": "The region (US state or UK country) targeted for the reports"}, "spend": {"type": "numeric", "index": 8, "name": "spend", "comment": "Spend converted out of microcurrency (so Spend/1,000,000)"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__ad_group_report"}, "model.reddit_ads.stg_reddit_ads__ad_group_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_group_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "ad_group_id": {"type": "character varying(255)", "index": 2, "name": "ad_group_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "app_install_metrics_add_payment_info": {"type": "integer", "index": 5, "name": "app_install_metrics_add_payment_info", "comment": null}, "app_install_metrics_add_to_cart": {"type": "integer", "index": 6, "name": "app_install_metrics_add_to_cart", "comment": null}, "app_install_metrics_app_launch": {"type": "integer", "index": 7, "name": "app_install_metrics_app_launch", "comment": null}, "app_install_metrics_completed_tutorial": {"type": "integer", "index": 8, "name": "app_install_metrics_completed_tutorial", "comment": null}, "app_install_metrics_install": {"type": "integer", "index": 9, "name": "app_install_metrics_install", "comment": null}, "app_install_metrics_level_achieved": {"type": "integer", "index": 10, "name": "app_install_metrics_level_achieved", "comment": null}, "app_install_metrics_purchase": {"type": "integer", "index": 11, "name": "app_install_metrics_purchase", "comment": null}, "app_install_metrics_search": {"type": "integer", "index": 12, "name": "app_install_metrics_search", "comment": null}, "app_install_metrics_sign_up": {"type": "integer", "index": 13, "name": "app_install_metrics_sign_up", "comment": null}, "app_install_metrics_spend": {"type": "integer", "index": 14, "name": "app_install_metrics_spend", "comment": null}, "app_install_metrics_spend_credits": {"type": "integer", "index": 15, "name": "app_install_metrics_spend_credits", "comment": null}, "app_install_metrics_view_content": {"type": "integer", "index": 16, "name": "app_install_metrics_view_content", "comment": null}, "clicks": {"type": "integer", "index": 17, "name": "clicks", "comment": null}, "comment_downvotes": {"type": "integer", "index": 18, "name": "comment_downvotes", "comment": null}, "comment_upvotes": {"type": "integer", "index": 19, "name": "comment_upvotes", "comment": null}, "comments_page_views": {"type": "integer", "index": 20, "name": "comments_page_views", "comment": null}, "conversion_roas": {"type": "integer", "index": 21, "name": "conversion_roas", "comment": null}, "cpc": {"type": "double precision", "index": 22, "name": "cpc", "comment": null}, "ctr": {"type": "double precision", "index": 23, "name": "ctr", "comment": null}, "ecpm": {"type": "double precision", "index": 24, "name": "ecpm", "comment": null}, "gallery_item_caption": {"type": "integer", "index": 25, "name": "gallery_item_caption", "comment": null}, "gallery_item_id": {"type": "integer", "index": 26, "name": "gallery_item_id", "comment": null}, "impressions": {"type": "integer", "index": 27, "name": "impressions", "comment": null}, "legacy_click_conversions_attribution_window_day": {"type": "integer", "index": 28, "name": "legacy_click_conversions_attribution_window_day", "comment": null}, "legacy_click_conversions_attribution_window_month": {"type": "integer", "index": 29, "name": "legacy_click_conversions_attribution_window_month", "comment": null}, "legacy_click_conversions_attribution_window_week": {"type": "integer", "index": 30, "name": "legacy_click_conversions_attribution_window_week", "comment": null}, "legacy_view_conversions_attribution_window_day": {"type": "integer", "index": 31, "name": "legacy_view_conversions_attribution_window_day", "comment": null}, "legacy_view_conversions_attribution_window_month": {"type": "integer", "index": 32, "name": "legacy_view_conversions_attribution_window_month", "comment": null}, "legacy_view_conversions_attribution_window_week": {"type": "integer", "index": 33, "name": "legacy_view_conversions_attribution_window_week", "comment": null}, "priority": {"type": "integer", "index": 34, "name": "priority", "comment": null}, "region": {"type": "integer", "index": 35, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 36, "name": "spend", "comment": null}, "video_fully_viewable_impressions": {"type": "integer", "index": 37, "name": "video_fully_viewable_impressions", "comment": null}, "video_plays_expanded": {"type": "integer", "index": 38, "name": "video_plays_expanded", "comment": null}, "video_plays_with_sound": {"type": "integer", "index": 39, "name": "video_plays_with_sound", "comment": null}, "video_started": {"type": "integer", "index": 40, "name": "video_started", "comment": null}, "video_viewable_impressions": {"type": "integer", "index": 41, "name": "video_viewable_impressions", "comment": null}, "video_watched_100_percent": {"type": "integer", "index": 42, "name": "video_watched_100_percent", "comment": null}, "video_watched_10_seconds": {"type": "integer", "index": 43, "name": "video_watched_10_seconds", "comment": null}, "video_watched_25_percent": {"type": "integer", "index": 44, "name": "video_watched_25_percent", "comment": null}, "video_watched_3_seconds": {"type": "integer", "index": 45, "name": "video_watched_3_seconds", "comment": null}, "video_watched_50_percent": {"type": "integer", "index": 46, "name": "video_watched_50_percent", "comment": null}, "video_watched_5_seconds": {"type": "integer", "index": 47, "name": "video_watched_5_seconds", "comment": null}, "video_watched_75_percent": {"type": "integer", "index": 48, "name": "video_watched_75_percent", "comment": null}, "video_watched_95_percent": {"type": "integer", "index": 49, "name": "video_watched_95_percent", "comment": null}, "viewable_impressions": {"type": "integer", "index": 50, "name": "viewable_impressions", "comment": null}, "viewer_comments": {"type": "integer", "index": 51, "name": "viewer_comments", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__ad_group_report_tmp"}, "model.reddit_ads.stg_reddit_ads__ad_group_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_group_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "id": {"type": "character varying(255)", "index": 2, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "bid_strategy": {"type": "text", "index": 4, "name": "bid_strategy", "comment": null}, "bid_value": {"type": "integer", "index": 5, "name": "bid_value", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 6, "name": "campaign_id", "comment": null}, "configured_status": {"type": "text", "index": 7, "name": "configured_status", "comment": null}, "effective_status": {"type": "text", "index": 8, "name": "effective_status", "comment": null}, "end_time": {"type": "timestamp without time zone", "index": 9, "name": "end_time", "comment": null}, "expand_targeting": {"type": "boolean", "index": 10, "name": "expand_targeting", "comment": null}, "goal_type": {"type": "text", "index": 11, "name": "goal_type", "comment": null}, "goal_value": {"type": "integer", "index": 12, "name": "goal_value", "comment": null}, "is_processing": {"type": "boolean", "index": 13, "name": "is_processing", "comment": null}, "name": {"type": "text", "index": 14, "name": "name", "comment": null}, "optimization_strategy_type": {"type": "integer", "index": 15, "name": "optimization_strategy_type", "comment": null}, "start_time": {"type": "timestamp without time zone", "index": 16, "name": "start_time", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__ad_group_tmp"}, "model.reddit_ads.stg_reddit_ads__ad_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_report", "database": "postgres", "comment": "Each record represents a summary of events for each given date and ad.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": "The ID of the account."}, "ad_id": {"type": "character varying(255)", "index": 3, "name": "ad_id", "comment": "The ID of the ad."}, "clicks": {"type": "integer", "index": 4, "name": "clicks", "comment": "The number of clicks detected for this report period"}, "date_day": {"type": "date", "index": 5, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": "The number of impressions served for this report period"}, "region": {"type": "integer", "index": 7, "name": "region", "comment": "The region (US state or UK country) targeted for the reports"}, "spend": {"type": "numeric", "index": 8, "name": "spend", "comment": "Spend converted out of microcurrency (so Spend/1,000,000)"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__ad_report"}, "model.reddit_ads.stg_reddit_ads__ad_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "ad_id": {"type": "character varying(255)", "index": 2, "name": "ad_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "app_install_metrics_add_payment_info": {"type": "integer", "index": 5, "name": "app_install_metrics_add_payment_info", "comment": null}, "app_install_metrics_add_to_cart": {"type": "integer", "index": 6, "name": "app_install_metrics_add_to_cart", "comment": null}, "app_install_metrics_app_launch": {"type": "integer", "index": 7, "name": "app_install_metrics_app_launch", "comment": null}, "app_install_metrics_completed_tutorial": {"type": "integer", "index": 8, "name": "app_install_metrics_completed_tutorial", "comment": null}, "app_install_metrics_install": {"type": "integer", "index": 9, "name": "app_install_metrics_install", "comment": null}, "app_install_metrics_level_achieved": {"type": "integer", "index": 10, "name": "app_install_metrics_level_achieved", "comment": null}, "app_install_metrics_purchase": {"type": "integer", "index": 11, "name": "app_install_metrics_purchase", "comment": null}, "app_install_metrics_search": {"type": "integer", "index": 12, "name": "app_install_metrics_search", "comment": null}, "app_install_metrics_sign_up": {"type": "integer", "index": 13, "name": "app_install_metrics_sign_up", "comment": null}, "app_install_metrics_spend": {"type": "integer", "index": 14, "name": "app_install_metrics_spend", "comment": null}, "app_install_metrics_spend_credits": {"type": "integer", "index": 15, "name": "app_install_metrics_spend_credits", "comment": null}, "app_install_metrics_view_content": {"type": "integer", "index": 16, "name": "app_install_metrics_view_content", "comment": null}, "clicks": {"type": "integer", "index": 17, "name": "clicks", "comment": null}, "comment_downvotes": {"type": "integer", "index": 18, "name": "comment_downvotes", "comment": null}, "comment_upvotes": {"type": "integer", "index": 19, "name": "comment_upvotes", "comment": null}, "comments_page_views": {"type": "integer", "index": 20, "name": "comments_page_views", "comment": null}, "conversion_roas": {"type": "integer", "index": 21, "name": "conversion_roas", "comment": null}, "cpc": {"type": "double precision", "index": 22, "name": "cpc", "comment": null}, "ctr": {"type": "double precision", "index": 23, "name": "ctr", "comment": null}, "ecpm": {"type": "double precision", "index": 24, "name": "ecpm", "comment": null}, "gallery_item_caption": {"type": "integer", "index": 25, "name": "gallery_item_caption", "comment": null}, "gallery_item_id": {"type": "integer", "index": 26, "name": "gallery_item_id", "comment": null}, "impressions": {"type": "integer", "index": 27, "name": "impressions", "comment": null}, "legacy_click_conversions_attribution_window_day": {"type": "integer", "index": 28, "name": "legacy_click_conversions_attribution_window_day", "comment": null}, "legacy_click_conversions_attribution_window_month": {"type": "integer", "index": 29, "name": "legacy_click_conversions_attribution_window_month", "comment": null}, "legacy_click_conversions_attribution_window_week": {"type": "integer", "index": 30, "name": "legacy_click_conversions_attribution_window_week", "comment": null}, "legacy_view_conversions_attribution_window_day": {"type": "integer", "index": 31, "name": "legacy_view_conversions_attribution_window_day", "comment": null}, "legacy_view_conversions_attribution_window_month": {"type": "integer", "index": 32, "name": "legacy_view_conversions_attribution_window_month", "comment": null}, "legacy_view_conversions_attribution_window_week": {"type": "integer", "index": 33, "name": "legacy_view_conversions_attribution_window_week", "comment": null}, "priority": {"type": "integer", "index": 34, "name": "priority", "comment": null}, "region": {"type": "integer", "index": 35, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 36, "name": "spend", "comment": null}, "video_fully_viewable_impressions": {"type": "integer", "index": 37, "name": "video_fully_viewable_impressions", "comment": null}, "video_plays_expanded": {"type": "integer", "index": 38, "name": "video_plays_expanded", "comment": null}, "video_plays_with_sound": {"type": "integer", "index": 39, "name": "video_plays_with_sound", "comment": null}, "video_started": {"type": "integer", "index": 40, "name": "video_started", "comment": null}, "video_viewable_impressions": {"type": "integer", "index": 41, "name": "video_viewable_impressions", "comment": null}, "video_watched_100_percent": {"type": "integer", "index": 42, "name": "video_watched_100_percent", "comment": null}, "video_watched_10_seconds": {"type": "integer", "index": 43, "name": "video_watched_10_seconds", "comment": null}, "video_watched_25_percent": {"type": "integer", "index": 44, "name": "video_watched_25_percent", "comment": null}, "video_watched_3_seconds": {"type": "integer", "index": 45, "name": "video_watched_3_seconds", "comment": null}, "video_watched_50_percent": {"type": "integer", "index": 46, "name": "video_watched_50_percent", "comment": null}, "video_watched_5_seconds": {"type": "integer", "index": 47, "name": "video_watched_5_seconds", "comment": null}, "video_watched_75_percent": {"type": "integer", "index": 48, "name": "video_watched_75_percent", "comment": null}, "video_watched_95_percent": {"type": "integer", "index": 49, "name": "video_watched_95_percent", "comment": null}, "viewable_impressions": {"type": "integer", "index": 50, "name": "viewable_impressions", "comment": null}, "viewer_comments": {"type": "integer", "index": 51, "name": "viewer_comments", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__ad_report_tmp"}, "model.reddit_ads.stg_reddit_ads__ad_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying(255)", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": null}, "ad_group_id": {"type": "character varying(255)", "index": 4, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 5, "name": "campaign_id", "comment": null}, "click_url": {"type": "text", "index": 6, "name": "click_url", "comment": null}, "configured_status": {"type": "text", "index": 7, "name": "configured_status", "comment": null}, "effective_status": {"type": "text", "index": 8, "name": "effective_status", "comment": null}, "is_processing": {"type": "boolean", "index": 9, "name": "is_processing", "comment": null}, "name": {"type": "text", "index": 10, "name": "name", "comment": null}, "post_id": {"type": "text", "index": 11, "name": "post_id", "comment": null}, "post_url": {"type": "integer", "index": 12, "name": "post_url", "comment": null}, "preview_expiry": {"type": "integer", "index": 13, "name": "preview_expiry", "comment": null}, "preview_url": {"type": "integer", "index": 14, "name": "preview_url", "comment": null}, "rejection_reason": {"type": "integer", "index": 15, "name": "rejection_reason", "comment": null}, "search_term": {"type": "integer", "index": 16, "name": "search_term", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__ad_tmp"}, "model.reddit_ads.stg_reddit_ads__campaign": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign", "database": "postgres", "comment": "Each record represents information about each campaign.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": "The ID of the account."}, "configured_status": {"type": "text", "index": 3, "name": "configured_status", "comment": "The status configured by the account owner. \"ACTIVE\", \"PAUSED\", \"ARCHIVED\", \"DELETED\""}, "effective_status": {"type": "text", "index": 4, "name": "effective_status", "comment": "The calculated status determining the real status of this entity."}, "funding_instrument_id": {"type": "integer", "index": 5, "name": "funding_instrument_id", "comment": "Campaign level funding instrument id"}, "campaign_id": {"type": "character varying(255)", "index": 6, "name": "campaign_id", "comment": "The ID of the campaign."}, "is_processing": {"type": "boolean", "index": 7, "name": "is_processing", "comment": "Whether or not effective status is processing"}, "campaign_name": {"type": "text", "index": 8, "name": "campaign_name", "comment": "Name of campaign."}, "objective": {"type": "text", "index": 9, "name": "objective", "comment": "The objective type of a campaign."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__campaign"}, "model.reddit_ads.stg_reddit_ads__campaign_conversions_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_conversions_report", "database": "postgres", "comment": "Provides a summary of conversion events at the campaign level, aggregating key metrics by event and day such as view-through and click-through conversions.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "campaign_id": {"type": "character varying(255)", "index": 4, "name": "campaign_id", "comment": "The ID of the campaign."}, "date_day": {"type": "date", "index": 5, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "event_name": {"type": "text", "index": 6, "name": "event_name", "comment": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset."}, "total_items": {"type": "integer", "index": 7, "name": "total_items", "comment": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion."}, "total_value": {"type": "double precision", "index": 8, "name": "total_value", "comment": "The total monetary value associated with a conversion event."}, "conversions": {"type": "integer", "index": 9, "name": "conversions", "comment": "The total click-through conversions attributed, for the given month-long window."}, "view_through_conversions": {"type": "integer", "index": 10, "name": "view_through_conversions", "comment": "The total view-through conversions attributed, for the given month-long window."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_conversions_report"}, "model.reddit_ads.stg_reddit_ads__campaign_conversions_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_conversions_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "avg_value": {"type": "double precision", "index": 3, "name": "avg_value", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 4, "name": "campaign_id", "comment": null}, "click_through_conversion_attribution_window_day": {"type": "integer", "index": 5, "name": "click_through_conversion_attribution_window_day", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 6, "name": "click_through_conversion_attribution_window_month", "comment": null}, "click_through_conversion_attribution_window_week": {"type": "integer", "index": 7, "name": "click_through_conversion_attribution_window_week", "comment": null}, "date": {"type": "date", "index": 8, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 9, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 10, "name": "total_items", "comment": null}, "total_value": {"type": "double precision", "index": 11, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_day": {"type": "integer", "index": 12, "name": "view_through_conversion_attribution_window_day", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 13, "name": "view_through_conversion_attribution_window_month", "comment": null}, "view_through_conversion_attribution_window_week": {"type": "integer", "index": 14, "name": "view_through_conversion_attribution_window_week", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_conversions_report_tmp"}, "model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_country_conversions_report", "database": "postgres", "comment": "Provides a summary of conversion events at the campaign and country level, aggregating key metrics by event and day such as view-through and click-through conversions.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "campaign_id": {"type": "character varying(255)", "index": 4, "name": "campaign_id", "comment": "The ID of the campaign."}, "date_day": {"type": "date", "index": 5, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "country": {"type": "text", "index": 6, "name": "country", "comment": "The country associated with the record."}, "event_name": {"type": "text", "index": 7, "name": "event_name", "comment": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset."}, "total_items": {"type": "integer", "index": 8, "name": "total_items", "comment": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion."}, "total_value": {"type": "integer", "index": 9, "name": "total_value", "comment": "The total monetary value associated with a conversion event."}, "conversions": {"type": "integer", "index": 10, "name": "conversions", "comment": "The total click-through conversions attributed, for the given month-long window."}, "view_through_conversions": {"type": "integer", "index": 11, "name": "view_through_conversions", "comment": "The total view-through conversions attributed, for the given month-long window."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report"}, "model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_country_conversions_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 3, "name": "campaign_id", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 4, "name": "click_through_conversion_attribution_window_month", "comment": null}, "country": {"type": "text", "index": 5, "name": "country", "comment": null}, "date": {"type": "date", "index": 6, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 7, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 8, "name": "total_items", "comment": null}, "total_value": {"type": "integer", "index": 9, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 10, "name": "view_through_conversion_attribution_window_month", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report_tmp"}, "model.reddit_ads.stg_reddit_ads__campaign_country_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_country_report", "database": "postgres", "comment": "Each record represents a summary of events at the date, country, and campaign level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": "Timestamp of when Fivetran synced a record."}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": "The ID of the account."}, "campaign_id": {"type": "character varying(255)", "index": 4, "name": "campaign_id", "comment": "The ID of the campaign."}, "country": {"type": "text", "index": 5, "name": "country", "comment": "The country associated with the record."}, "date_day": {"type": "date", "index": 6, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "clicks": {"type": "integer", "index": 7, "name": "clicks", "comment": "The number of clicks detected for this report period"}, "impressions": {"type": "integer", "index": 8, "name": "impressions", "comment": "The number of impressions served for this report period"}, "region": {"type": "text", "index": 9, "name": "region", "comment": "The region (US state or UK country) targeted for the reports"}, "spend": {"type": "numeric", "index": 10, "name": "spend", "comment": "Spend converted out of microcurrency (so Spend/1,000,000)"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_country_report"}, "model.reddit_ads.stg_reddit_ads__campaign_country_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_country_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 3, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 4, "name": "clicks", "comment": null}, "country": {"type": "text", "index": 5, "name": "country", "comment": null}, "date": {"type": "date", "index": 6, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": null}, "region": {"type": "text", "index": 8, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 9, "name": "spend", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_country_report_tmp"}, "model.reddit_ads.stg_reddit_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_report", "database": "postgres", "comment": "Each record represents a summary of events for each given date and campaign.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": "The ID of the account."}, "campaign_id": {"type": "character varying(255)", "index": 3, "name": "campaign_id", "comment": "The ID of the campaign."}, "clicks": {"type": "integer", "index": 4, "name": "clicks", "comment": "The number of clicks detected for this report period"}, "date_day": {"type": "date", "index": 5, "name": "date_day", "comment": "YYYY-MM-DD formatted date"}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": "The number of impressions served for this report period"}, "region": {"type": "integer", "index": 7, "name": "region", "comment": "The region (US state or UK country) targeted for the reports"}, "spend": {"type": "numeric", "index": 8, "name": "spend", "comment": "Spend converted out of microcurrency (so Spend/1,000,000)"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_report"}, "model.reddit_ads.stg_reddit_ads__campaign_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 2, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "app_install_metrics_add_payment_info": {"type": "integer", "index": 5, "name": "app_install_metrics_add_payment_info", "comment": null}, "app_install_metrics_add_to_cart": {"type": "integer", "index": 6, "name": "app_install_metrics_add_to_cart", "comment": null}, "app_install_metrics_app_launch": {"type": "integer", "index": 7, "name": "app_install_metrics_app_launch", "comment": null}, "app_install_metrics_completed_tutorial": {"type": "integer", "index": 8, "name": "app_install_metrics_completed_tutorial", "comment": null}, "app_install_metrics_install": {"type": "integer", "index": 9, "name": "app_install_metrics_install", "comment": null}, "app_install_metrics_level_achieved": {"type": "integer", "index": 10, "name": "app_install_metrics_level_achieved", "comment": null}, "app_install_metrics_purchase": {"type": "integer", "index": 11, "name": "app_install_metrics_purchase", "comment": null}, "app_install_metrics_search": {"type": "integer", "index": 12, "name": "app_install_metrics_search", "comment": null}, "app_install_metrics_sign_up": {"type": "integer", "index": 13, "name": "app_install_metrics_sign_up", "comment": null}, "app_install_metrics_spend": {"type": "integer", "index": 14, "name": "app_install_metrics_spend", "comment": null}, "app_install_metrics_spend_credits": {"type": "integer", "index": 15, "name": "app_install_metrics_spend_credits", "comment": null}, "app_install_metrics_view_content": {"type": "integer", "index": 16, "name": "app_install_metrics_view_content", "comment": null}, "clicks": {"type": "integer", "index": 17, "name": "clicks", "comment": null}, "comment_downvotes": {"type": "integer", "index": 18, "name": "comment_downvotes", "comment": null}, "comment_upvotes": {"type": "integer", "index": 19, "name": "comment_upvotes", "comment": null}, "comments_page_views": {"type": "integer", "index": 20, "name": "comments_page_views", "comment": null}, "conversion_roas": {"type": "integer", "index": 21, "name": "conversion_roas", "comment": null}, "cpc": {"type": "double precision", "index": 22, "name": "cpc", "comment": null}, "ctr": {"type": "double precision", "index": 23, "name": "ctr", "comment": null}, "ecpm": {"type": "double precision", "index": 24, "name": "ecpm", "comment": null}, "gallery_item_caption": {"type": "integer", "index": 25, "name": "gallery_item_caption", "comment": null}, "gallery_item_id": {"type": "integer", "index": 26, "name": "gallery_item_id", "comment": null}, "impressions": {"type": "integer", "index": 27, "name": "impressions", "comment": null}, "legacy_click_conversions_attribution_window_day": {"type": "integer", "index": 28, "name": "legacy_click_conversions_attribution_window_day", "comment": null}, "legacy_click_conversions_attribution_window_month": {"type": "integer", "index": 29, "name": "legacy_click_conversions_attribution_window_month", "comment": null}, "legacy_click_conversions_attribution_window_week": {"type": "integer", "index": 30, "name": "legacy_click_conversions_attribution_window_week", "comment": null}, "legacy_view_conversions_attribution_window_day": {"type": "integer", "index": 31, "name": "legacy_view_conversions_attribution_window_day", "comment": null}, "legacy_view_conversions_attribution_window_month": {"type": "integer", "index": 32, "name": "legacy_view_conversions_attribution_window_month", "comment": null}, "legacy_view_conversions_attribution_window_week": {"type": "integer", "index": 33, "name": "legacy_view_conversions_attribution_window_week", "comment": null}, "priority": {"type": "integer", "index": 34, "name": "priority", "comment": null}, "region": {"type": "integer", "index": 35, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 36, "name": "spend", "comment": null}, "video_fully_viewable_impressions": {"type": "integer", "index": 37, "name": "video_fully_viewable_impressions", "comment": null}, "video_plays_expanded": {"type": "integer", "index": 38, "name": "video_plays_expanded", "comment": null}, "video_plays_with_sound": {"type": "integer", "index": 39, "name": "video_plays_with_sound", "comment": null}, "video_started": {"type": "integer", "index": 40, "name": "video_started", "comment": null}, "video_viewable_impressions": {"type": "integer", "index": 41, "name": "video_viewable_impressions", "comment": null}, "video_watched_100_percent": {"type": "integer", "index": 42, "name": "video_watched_100_percent", "comment": null}, "video_watched_10_seconds": {"type": "integer", "index": 43, "name": "video_watched_10_seconds", "comment": null}, "video_watched_25_percent": {"type": "integer", "index": 44, "name": "video_watched_25_percent", "comment": null}, "video_watched_3_seconds": {"type": "integer", "index": 45, "name": "video_watched_3_seconds", "comment": null}, "video_watched_50_percent": {"type": "integer", "index": 46, "name": "video_watched_50_percent", "comment": null}, "video_watched_5_seconds": {"type": "integer", "index": 47, "name": "video_watched_5_seconds", "comment": null}, "video_watched_75_percent": {"type": "integer", "index": 48, "name": "video_watched_75_percent", "comment": null}, "video_watched_95_percent": {"type": "integer", "index": 49, "name": "video_watched_95_percent", "comment": null}, "viewable_impressions": {"type": "integer", "index": 50, "name": "viewable_impressions", "comment": null}, "viewer_comments": {"type": "integer", "index": 51, "name": "viewer_comments", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_report_tmp"}, "model.reddit_ads.stg_reddit_ads__campaign_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying(255)", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": null}, "configured_status": {"type": "text", "index": 4, "name": "configured_status", "comment": null}, "effective_status": {"type": "text", "index": 5, "name": "effective_status", "comment": null}, "funding_instrument_id": {"type": "integer", "index": 6, "name": "funding_instrument_id", "comment": null}, "is_processing": {"type": "boolean", "index": 7, "name": "is_processing", "comment": null}, "name": {"type": "text", "index": 8, "name": "name", "comment": null}, "objective": {"type": "text", "index": 9, "name": "objective", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_tmp"}, "model.snapchat_ads.stg_snapchat_ads__ad_account_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_account_history", "database": "postgres", "comment": "Each record in this table represents a historic version of an ad account in Snapchat.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_account_id": {"type": "text", "index": 2, "name": "ad_account_id", "comment": "The ID of the account in Snapchat."}, "ad_account_name": {"type": "text", "index": 3, "name": "ad_account_name", "comment": "The name of the account in Snapchat."}, "created_at": {"type": "timestamp without time zone", "index": 4, "name": "created_at", "comment": "Created at timestamp"}, "advertiser": {"type": "text", "index": 5, "name": "advertiser", "comment": "Name of advertiser"}, "currency": {"type": "text", "index": 6, "name": "currency", "comment": "Currency used by account"}, "timezone": {"type": "text", "index": 7, "name": "timezone", "comment": "Account timezone"}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_synced", "comment": "When the record was last synced by Fivetran."}, "updated_at": {"type": "timestamp without time zone", "index": 9, "name": "updated_at", "comment": "Timestamp of when the record was updated."}, "is_most_recent_record": {"type": "boolean", "index": 10, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_account_history"}, "model.snapchat_ads.stg_snapchat_ads__ad_account_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_account_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_account_history_tmp"}, "model.snapchat_ads.stg_snapchat_ads__ad_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_history", "database": "postgres", "comment": "Each record in this table represents a historic version of an ad in Snapchat.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_id": {"type": "text", "index": 2, "name": "ad_id", "comment": "The ID of the ad in Snapchat."}, "ad_name": {"type": "text", "index": 3, "name": "ad_name", "comment": "The name of the ad in Snapchat."}, "created_at": {"type": "timestamp without time zone", "index": 4, "name": "created_at", "comment": "Created at timestamp"}, "ad_squad_id": {"type": "text", "index": 5, "name": "ad_squad_id", "comment": "The ID of the related ad squad in Snapchat."}, "creative_id": {"type": "text", "index": 6, "name": "creative_id", "comment": "The ID of the related creative in Snapchat."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": "When the record was last synced by Fivetran."}, "updated_at": {"type": "timestamp without time zone", "index": 8, "name": "updated_at", "comment": "Timestamp of when the record was updated."}, "is_most_recent_record": {"type": "boolean", "index": 9, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_history"}, "model.snapchat_ads.stg_snapchat_ads__ad_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "ad_squad_id": {"type": "text", "index": 2, "name": "ad_squad_id", "comment": null}, "creative_id": {"type": "text", "index": 3, "name": "creative_id", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_history_tmp"}, "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_hourly_report", "database": "postgres", "comment": "Each record represents an hourly performance summary for an ad in Snapchat.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_id": {"type": "text", "index": 2, "name": "ad_id", "comment": "The ID of the ad that the report relates to in Snapchat."}, "date_hour": {"type": "timestamp without time zone", "index": 3, "name": "date_hour", "comment": "The hour that the report relates to."}, "attachment_quartile_1": {"type": "numeric(28,6)", "index": 4, "name": "attachment_quartile_1", "comment": "Number of times your Long Form Video was viewed to 25%"}, "attachment_quartile_2": {"type": "numeric(28,6)", "index": 5, "name": "attachment_quartile_2", "comment": "Number of times your Long Form Video was viewed to 50%"}, "attachment_quartile_3": {"type": "numeric(28,6)", "index": 6, "name": "attachment_quartile_3", "comment": "Number of times your Long Form Video was viewed to 75%"}, "attachment_total_view_time": {"type": "numeric", "index": 7, "name": "attachment_total_view_time", "comment": "Total time Snapchatters spent on the attachment (HH:MM:SS)"}, "attachment_view_completion": {"type": "numeric(28,6)", "index": 8, "name": "attachment_view_completion", "comment": "The number of times your Long Form Video was viewed to completion (97% )"}, "quartile_1": {"type": "numeric(28,6)", "index": 9, "name": "quartile_1", "comment": "The number of times your video ad was viewed to 25%"}, "quartile_2": {"type": "numeric(28,6)", "index": 10, "name": "quartile_2", "comment": "The number of times your video ad was viewed to 50%"}, "quartile_3": {"type": "numeric(28,6)", "index": 11, "name": "quartile_3", "comment": "The number of times your video ad was viewed to 75%"}, "saves": {"type": "numeric(28,6)", "index": 12, "name": "saves", "comment": "Number of times an ad was saved to Memories"}, "shares": {"type": "numeric(28,6)", "index": 13, "name": "shares", "comment": "Number of times an ad was shared in a Chat or Story"}, "screen_time": {"type": "numeric", "index": 14, "name": "screen_time", "comment": "The number of seconds spent watching your ad across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts"}, "video_views": {"type": "numeric(28,6)", "index": 15, "name": "video_views", "comment": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first"}, "view_completion": {"type": "numeric(28,6)", "index": 16, "name": "view_completion", "comment": "The number of times your video ad was viewed to completion (97% )"}, "view_time": {"type": "numeric", "index": 17, "name": "view_time", "comment": "The number of seconds spent watching your ad across all users reached."}, "impressions": {"type": "integer", "index": 18, "name": "impressions", "comment": "The number of impressions for an ad in the hour of the record."}, "spend": {"type": "numeric", "index": 19, "name": "spend", "comment": "The amount of spend for an ad in the hour of the record converted from micros."}, "swipes": {"type": "integer", "index": 20, "name": "swipes", "comment": "The number of swipes for an ad in the hour of the record."}, "conversion_purchases_value": {"type": "double precision", "index": 21, "name": "conversion_purchases_value", "comment": "The total value of purchases attributed to an ad in the hour of the record (in Ad Account's currency, converted from microcurrency)."}, "conversion_purchases": {"type": "bigint", "index": 22, "name": "conversion_purchases", "comment": "The total number of purchases attributed to an ad for the day of the record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report"}, "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_hourly_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "text", "index": 1, "name": "ad_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 3, "name": "impressions", "comment": null}, "spend": {"type": "integer", "index": 4, "name": "spend", "comment": null}, "swipes": {"type": "integer", "index": 5, "name": "swipes", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 6, "name": "conversion_purchases_value", "comment": null}, "conversion_add_billing": {"type": "integer", "index": 7, "name": "conversion_add_billing", "comment": null}, "conversion_add_cart": {"type": "integer", "index": 8, "name": "conversion_add_cart", "comment": null}, "conversion_app_opens": {"type": "integer", "index": 9, "name": "conversion_app_opens", "comment": null}, "conversion_level_completes": {"type": "integer", "index": 10, "name": "conversion_level_completes", "comment": null}, "conversion_page_views": {"type": "integer", "index": 11, "name": "conversion_page_views", "comment": null}, "conversion_purchases": {"type": "integer", "index": 12, "name": "conversion_purchases", "comment": null}, "conversion_save": {"type": "integer", "index": 13, "name": "conversion_save", "comment": null}, "conversion_searches": {"type": "integer", "index": 14, "name": "conversion_searches", "comment": null}, "conversion_sign_ups": {"type": "integer", "index": 15, "name": "conversion_sign_ups", "comment": null}, "conversion_start_checkout": {"type": "integer", "index": 16, "name": "conversion_start_checkout", "comment": null}, "conversion_view_content": {"type": "integer", "index": 17, "name": "conversion_view_content", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report_tmp"}, "model.snapchat_ads.stg_snapchat_ads__ad_squad_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_squad_history", "database": "postgres", "comment": "Each record in this table represents a historic version of an ad squad in Snapchat.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_squad_id": {"type": "text", "index": 2, "name": "ad_squad_id", "comment": "The ID of the ad squad in Snapchat."}, "ad_squad_name": {"type": "text", "index": 3, "name": "ad_squad_name", "comment": "The name of the ad squad in Snapchat."}, "created_at": {"type": "timestamp without time zone", "index": 4, "name": "created_at", "comment": "Created at timestamp."}, "campaign_id": {"type": "text", "index": 5, "name": "campaign_id", "comment": "The ID of the related campaign in Snapchat."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": "When the record was last synced by Fivetran."}, "updated_at": {"type": "timestamp without time zone", "index": 7, "name": "updated_at", "comment": "Timestamp of when the record was updated."}, "is_most_recent_record": {"type": "boolean", "index": 8, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_squad_history"}, "model.snapchat_ads.stg_snapchat_ads__ad_squad_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_squad_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "campaign_id": {"type": "text", "index": 2, "name": "campaign_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_squad_history_tmp"}, "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_squad_hourly_report", "database": "postgres", "comment": "Each record in this table represents a historic version of an ad in Snapchat.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_squad_id": {"type": "text", "index": 2, "name": "ad_squad_id", "comment": "ID of the ad squad."}, "date_hour": {"type": "timestamp without time zone", "index": 3, "name": "date_hour", "comment": "The hour that the report relates to."}, "attachment_quartile_1": {"type": "integer", "index": 4, "name": "attachment_quartile_1", "comment": "Number of times your Long Form Video was viewed to 25%"}, "attachment_quartile_2": {"type": "integer", "index": 5, "name": "attachment_quartile_2", "comment": "Number of times your Long Form Video was viewed to 50%"}, "attachment_quartile_3": {"type": "integer", "index": 6, "name": "attachment_quartile_3", "comment": "Number of times your Long Form Video was viewed to 75%"}, "attachment_total_view_time": {"type": "numeric", "index": 7, "name": "attachment_total_view_time", "comment": "Total time Snapchatters spent on the attachment (HH:MM:SS)"}, "attachment_view_completion": {"type": "integer", "index": 8, "name": "attachment_view_completion", "comment": "The number of times your Long Form Video was viewed to completion (97% )"}, "quartile_1": {"type": "integer", "index": 9, "name": "quartile_1", "comment": "The number of times your video was viewed to 25%"}, "quartile_2": {"type": "integer", "index": 10, "name": "quartile_2", "comment": "The number of times your video was viewed to 50%"}, "quartile_3": {"type": "integer", "index": 11, "name": "quartile_3", "comment": "The number of times your video was viewed to 75%"}, "saves": {"type": "integer", "index": 12, "name": "saves", "comment": "Number of times components of the ad squad were saved to Memories"}, "shares": {"type": "integer", "index": 13, "name": "shares", "comment": "Number of times components of the ad squad were shared in a Chat or Story"}, "screen_time": {"type": "numeric", "index": 14, "name": "screen_time", "comment": "The number of seconds spent watching your ad squad across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts"}, "video_views": {"type": "integer", "index": 15, "name": "video_views", "comment": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first"}, "view_completion": {"type": "integer", "index": 16, "name": "view_completion", "comment": "The number of times your video ad was viewed to completion (97% )"}, "view_time": {"type": "numeric", "index": 17, "name": "view_time", "comment": "The number of seconds spent watching your ad squad across all users reached."}, "impressions": {"type": "integer", "index": 18, "name": "impressions", "comment": "The number of impressions for an ad squad in the hour of the record."}, "spend": {"type": "numeric", "index": 19, "name": "spend", "comment": "The amount of spend for an ad squad in the hour of the record."}, "swipes": {"type": "integer", "index": 20, "name": "swipes", "comment": "The number of swipes for an ad squad in the hour of the record. Swipes are when your ad was swiped up on or the CTA was tapped to view the attachment below."}, "conversion_purchases_value": {"type": "double precision", "index": 21, "name": "conversion_purchases_value", "comment": "The total value of purchases attributed to an ad squad in the hour of the record (in Ad Account's currency, converted from microcurrency)."}, "conversion_purchases": {"type": "bigint", "index": 22, "name": "conversion_purchases", "comment": "The total number of purchases attributed to an ad squad for the day of the record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report"}, "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_squad_hourly_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_squad_id": {"type": "text", "index": 1, "name": "ad_squad_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "android_installs": {"type": "integer", "index": 4, "name": "android_installs", "comment": null}, "attachment_avg_view_time_millis": {"type": "integer", "index": 5, "name": "attachment_avg_view_time_millis", "comment": null}, "attachment_quartile_1": {"type": "integer", "index": 6, "name": "attachment_quartile_1", "comment": null}, "attachment_quartile_2": {"type": "integer", "index": 7, "name": "attachment_quartile_2", "comment": null}, "attachment_quartile_3": {"type": "integer", "index": 8, "name": "attachment_quartile_3", "comment": null}, "attachment_total_view_time_millis": {"type": "integer", "index": 9, "name": "attachment_total_view_time_millis", "comment": null}, "attachment_view_completion": {"type": "integer", "index": 10, "name": "attachment_view_completion", "comment": null}, "avg_screen_time_millis": {"type": "integer", "index": 11, "name": "avg_screen_time_millis", "comment": null}, "avg_view_time_millis": {"type": "integer", "index": 12, "name": "avg_view_time_millis", "comment": null}, "conversion_add_billing": {"type": "integer", "index": 13, "name": "conversion_add_billing", "comment": null}, "conversion_add_cart": {"type": "integer", "index": 14, "name": "conversion_add_cart", "comment": null}, "conversion_app_opens": {"type": "integer", "index": 15, "name": "conversion_app_opens", "comment": null}, "conversion_level_completes": {"type": "integer", "index": 16, "name": "conversion_level_completes", "comment": null}, "conversion_page_views": {"type": "integer", "index": 17, "name": "conversion_page_views", "comment": null}, "conversion_purchases": {"type": "integer", "index": 18, "name": "conversion_purchases", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 19, "name": "conversion_purchases_value", "comment": null}, "conversion_save": {"type": "integer", "index": 20, "name": "conversion_save", "comment": null}, "conversion_searches": {"type": "integer", "index": 21, "name": "conversion_searches", "comment": null}, "conversion_sign_ups": {"type": "integer", "index": 22, "name": "conversion_sign_ups", "comment": null}, "conversion_start_checkout": {"type": "integer", "index": 23, "name": "conversion_start_checkout", "comment": null}, "conversion_view_content": {"type": "integer", "index": 24, "name": "conversion_view_content", "comment": null}, "impressions": {"type": "integer", "index": 25, "name": "impressions", "comment": null}, "ios_installs": {"type": "integer", "index": 26, "name": "ios_installs", "comment": null}, "quartile_1": {"type": "integer", "index": 27, "name": "quartile_1", "comment": null}, "quartile_2": {"type": "integer", "index": 28, "name": "quartile_2", "comment": null}, "quartile_3": {"type": "integer", "index": 29, "name": "quartile_3", "comment": null}, "saves": {"type": "integer", "index": 30, "name": "saves", "comment": null}, "screen_time_millis": {"type": "integer", "index": 31, "name": "screen_time_millis", "comment": null}, "shares": {"type": "integer", "index": 32, "name": "shares", "comment": null}, "spend": {"type": "integer", "index": 33, "name": "spend", "comment": null}, "story_completes": {"type": "integer", "index": 34, "name": "story_completes", "comment": null}, "story_opens": {"type": "integer", "index": 35, "name": "story_opens", "comment": null}, "swipe_up_percent": {"type": "integer", "index": 36, "name": "swipe_up_percent", "comment": null}, "swipes": {"type": "integer", "index": 37, "name": "swipes", "comment": null}, "total_installs": {"type": "integer", "index": 38, "name": "total_installs", "comment": null}, "video_views": {"type": "integer", "index": 39, "name": "video_views", "comment": null}, "view_completion": {"type": "integer", "index": 40, "name": "view_completion", "comment": null}, "view_time_millis": {"type": "integer", "index": 41, "name": "view_time_millis", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report_tmp"}, "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_geo_country_daily_report", "database": "postgres", "comment": "Each record represents a daily performance summary per country for each campaign.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_id": {"type": "text", "index": 2, "name": "campaign_id", "comment": "ID of campaign"}, "country": {"type": "text", "index": 3, "name": "country", "comment": "The country that the report relates to."}, "date_day": {"type": "timestamp without time zone", "index": 4, "name": "date_day", "comment": "The day that the report relates to."}, "attachment_quartile_1": {"type": "integer", "index": 5, "name": "attachment_quartile_1", "comment": "Number of times your Long Form Video was viewed to 25%"}, "attachment_quartile_2": {"type": "integer", "index": 6, "name": "attachment_quartile_2", "comment": "Number of times your Long Form Video was viewed to 50%"}, "attachment_quartile_3": {"type": "integer", "index": 7, "name": "attachment_quartile_3", "comment": "Number of times your Long Form Video was viewed to 75%"}, "attachment_total_view_time": {"type": "numeric", "index": 8, "name": "attachment_total_view_time", "comment": "Total time Snapchatters spent on the attachment (HH:MM:SS)"}, "attachment_view_completion": {"type": "boolean", "index": 9, "name": "attachment_view_completion", "comment": "The number of times your Long Form Video was viewed to completion (97%)"}, "quartile_1": {"type": "integer", "index": 10, "name": "quartile_1", "comment": "The number of times your video was viewed to 25%"}, "quartile_2": {"type": "integer", "index": 11, "name": "quartile_2", "comment": "The number of times your video was viewed to 50%"}, "quartile_3": {"type": "integer", "index": 12, "name": "quartile_3", "comment": "The number of times your video was viewed to 75%"}, "saves": {"type": "integer", "index": 13, "name": "saves", "comment": "Number of times components of the campaign were saved to Memories"}, "shares": {"type": "integer", "index": 14, "name": "shares", "comment": "Number of times components of the campaign were shared in a Chat or Story"}, "screen_time": {"type": "numeric", "index": 15, "name": "screen_time", "comment": "The number of seconds spent watching your campaign across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts"}, "video_views": {"type": "integer", "index": 16, "name": "video_views", "comment": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first"}, "view_completion": {"type": "boolean", "index": 17, "name": "view_completion", "comment": "The number of times your video was viewed to completion (97% )"}, "view_time": {"type": "numeric", "index": 18, "name": "view_time", "comment": "The number of seconds spent watching your campaign across all users reached."}, "impressions": {"type": "integer", "index": 19, "name": "impressions", "comment": "The number of impressions for a campaign."}, "spend": {"type": "numeric", "index": 20, "name": "spend", "comment": "The amount of spend for a campaign."}, "swipes": {"type": "integer", "index": 21, "name": "swipes", "comment": "The number of swipes for a campaign. Swipes are when your ad was swiped up on or the CTA was tapped to view the attachment below."}, "conversion_purchases_value": {"type": "double precision", "index": 22, "name": "conversion_purchases_value", "comment": "The total value of purchases attributed to a campaign."}, "conversion_purchases": {"type": "bigint", "index": 23, "name": "conversion_purchases", "comment": "The total number of purchases attributed to a campaign for the day of the record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report"}, "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_geo_country_daily_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"attachment_quartile_1": {"type": "integer", "index": 1, "name": "attachment_quartile_1", "comment": null}, "attachment_quartile_2": {"type": "integer", "index": 2, "name": "attachment_quartile_2", "comment": null}, "attachment_quartile_3": {"type": "integer", "index": 3, "name": "attachment_quartile_3", "comment": null}, "attachment_total_view_time_millis": {"type": "integer", "index": 4, "name": "attachment_total_view_time_millis", "comment": null}, "attachment_view_completion": {"type": "boolean", "index": 5, "name": "attachment_view_completion", "comment": null}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 7, "name": "date", "comment": null}, "country": {"type": "text", "index": 8, "name": "country", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "quartile_1": {"type": "integer", "index": 10, "name": "quartile_1", "comment": null}, "quartile_2": {"type": "integer", "index": 11, "name": "quartile_2", "comment": null}, "quartile_3": {"type": "integer", "index": 12, "name": "quartile_3", "comment": null}, "saves": {"type": "integer", "index": 13, "name": "saves", "comment": null}, "screen_time_millis": {"type": "integer", "index": 14, "name": "screen_time_millis", "comment": null}, "shares": {"type": "integer", "index": 15, "name": "shares", "comment": null}, "spend": {"type": "integer", "index": 16, "name": "spend", "comment": null}, "swipes": {"type": "integer", "index": 17, "name": "swipes", "comment": null}, "video_views": {"type": "integer", "index": 18, "name": "video_views", "comment": null}, "view_completion": {"type": "boolean", "index": 19, "name": "view_completion", "comment": null}, "view_time_millis": {"type": "integer", "index": 20, "name": "view_time_millis", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 21, "name": "conversion_purchases_value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report_tmp"}, "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_geo_region_daily_report", "database": "postgres", "comment": "Each record represents a daily performance summary per region for each campaign.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_id": {"type": "text", "index": 2, "name": "campaign_id", "comment": "ID of campaign"}, "region": {"type": "text", "index": 3, "name": "region", "comment": "The region that the report relates to."}, "date_day": {"type": "timestamp without time zone", "index": 4, "name": "date_day", "comment": "The day that the report relates to."}, "attachment_quartile_1": {"type": "integer", "index": 5, "name": "attachment_quartile_1", "comment": "Number of times your Long Form Video was viewed to 25%"}, "attachment_quartile_2": {"type": "integer", "index": 6, "name": "attachment_quartile_2", "comment": "Number of times your Long Form Video was viewed to 50%"}, "attachment_quartile_3": {"type": "integer", "index": 7, "name": "attachment_quartile_3", "comment": "Number of times your Long Form Video was viewed to 75%"}, "attachment_total_view_time": {"type": "numeric", "index": 8, "name": "attachment_total_view_time", "comment": "Total time Snapchatters spent on the attachment (HH:MM:SS)"}, "attachment_view_completion": {"type": "boolean", "index": 9, "name": "attachment_view_completion", "comment": "The number of times your Long Form Video was viewed to completion (97% )"}, "quartile_1": {"type": "integer", "index": 10, "name": "quartile_1", "comment": "The number of times your video was viewed to 25%"}, "quartile_2": {"type": "integer", "index": 11, "name": "quartile_2", "comment": "The number of times your video was viewed to 50%"}, "quartile_3": {"type": "integer", "index": 12, "name": "quartile_3", "comment": "The number of times your video was viewed to 75%"}, "saves": {"type": "integer", "index": 13, "name": "saves", "comment": "Number of times components of the campaign were saved to Memories"}, "shares": {"type": "integer", "index": 14, "name": "shares", "comment": "Number of times components of the campaign were shared in a Chat or Story"}, "screen_time": {"type": "numeric", "index": 15, "name": "screen_time", "comment": "The number of seconds spent watching your campaign across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts"}, "video_views": {"type": "integer", "index": 16, "name": "video_views", "comment": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first"}, "view_completion": {"type": "boolean", "index": 17, "name": "view_completion", "comment": "The number of times your video was viewed to completion (97% )"}, "view_time": {"type": "numeric", "index": 18, "name": "view_time", "comment": "The number of seconds spent watching your campaign across all users reached."}, "impressions": {"type": "integer", "index": 19, "name": "impressions", "comment": "The number of impressions for a campaign."}, "spend": {"type": "numeric", "index": 20, "name": "spend", "comment": "The amount of spend for a campaign."}, "swipes": {"type": "integer", "index": 21, "name": "swipes", "comment": "The number of swipes for a campaign. Swipes are when your ad was swiped up on or the CTA was tapped to view the attachment below."}, "conversion_purchases_value": {"type": "double precision", "index": 22, "name": "conversion_purchases_value", "comment": "The total value of purchases attributed to a campaign."}, "conversion_purchases": {"type": "bigint", "index": 23, "name": "conversion_purchases", "comment": "The total number of purchases attributed to a campaign for the day of the record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report"}, "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_geo_region_daily_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"attachment_quartile_1": {"type": "integer", "index": 1, "name": "attachment_quartile_1", "comment": null}, "attachment_quartile_2": {"type": "integer", "index": 2, "name": "attachment_quartile_2", "comment": null}, "attachment_quartile_3": {"type": "integer", "index": 3, "name": "attachment_quartile_3", "comment": null}, "attachment_total_view_time_millis": {"type": "integer", "index": 4, "name": "attachment_total_view_time_millis", "comment": null}, "attachment_view_completion": {"type": "boolean", "index": 5, "name": "attachment_view_completion", "comment": null}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 7, "name": "date", "comment": null}, "region": {"type": "text", "index": 8, "name": "region", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "quartile_1": {"type": "integer", "index": 10, "name": "quartile_1", "comment": null}, "quartile_2": {"type": "integer", "index": 11, "name": "quartile_2", "comment": null}, "quartile_3": {"type": "integer", "index": 12, "name": "quartile_3", "comment": null}, "saves": {"type": "integer", "index": 13, "name": "saves", "comment": null}, "screen_time_millis": {"type": "integer", "index": 14, "name": "screen_time_millis", "comment": null}, "shares": {"type": "integer", "index": 15, "name": "shares", "comment": null}, "spend": {"type": "integer", "index": 16, "name": "spend", "comment": null}, "swipes": {"type": "integer", "index": 17, "name": "swipes", "comment": null}, "video_views": {"type": "integer", "index": 18, "name": "video_views", "comment": null}, "view_completion": {"type": "boolean", "index": 19, "name": "view_completion", "comment": null}, "view_time_millis": {"type": "integer", "index": 20, "name": "view_time_millis", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 21, "name": "conversion_purchases_value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report_tmp"}, "model.snapchat_ads.stg_snapchat_ads__campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_history", "database": "postgres", "comment": "Each record in this table represents a historic version of a campaign in Snapchat.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_id": {"type": "text", "index": 2, "name": "campaign_id", "comment": "The id of the campaign in Snapchat."}, "ad_account_id": {"type": "text", "index": 3, "name": "ad_account_id", "comment": "The ID of the related ad account in Snapchat."}, "created_at": {"type": "timestamp without time zone", "index": 4, "name": "created_at", "comment": "Created at timestamp."}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "The name of the campaign in Snapchat."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": "When the record was last synced by Fivetran."}, "updated_at": {"type": "timestamp without time zone", "index": 7, "name": "updated_at", "comment": "Timestamp of when the record was updated."}, "daily_budget": {"type": "numeric", "index": 8, "name": "daily_budget", "comment": "Daily Spend Cap converted from microcurrency"}, "start_time": {"type": "timestamp without time zone", "index": 9, "name": "start_time", "comment": "Start time"}, "end_time": {"type": "timestamp without time zone", "index": 10, "name": "end_time", "comment": "End time"}, "lifetime_spend_cap": {"type": "numeric", "index": 11, "name": "lifetime_spend_cap", "comment": "Lifetime spend cap for the campaign converted from microcurrency"}, "status": {"type": "text", "index": 12, "name": "status", "comment": "Campaign status (ACTIVE, PAUSED)"}, "objective": {"type": "text", "index": 13, "name": "objective", "comment": "Objective of the Campaign (BRAND_AWARENESS (default), APP_CONVERSION, APP_INSTALL, etc)"}, "is_most_recent_record": {"type": "boolean", "index": 14, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_history"}, "model.snapchat_ads.stg_snapchat_ads__campaign_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "ad_account_id": {"type": "text", "index": 2, "name": "ad_account_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_history_tmp"}, "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_hourly_report", "database": "postgres", "comment": "Each record in this table represents a historic version of an ad in Snapchat.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_id": {"type": "text", "index": 2, "name": "campaign_id", "comment": "ID of campaign"}, "date_hour": {"type": "timestamp without time zone", "index": 3, "name": "date_hour", "comment": "The hour that the report relates to."}, "attachment_quartile_1": {"type": "integer", "index": 4, "name": "attachment_quartile_1", "comment": "Number of times your Long Form Video was viewed to 25%"}, "attachment_quartile_2": {"type": "integer", "index": 5, "name": "attachment_quartile_2", "comment": "Number of times your Long Form Video was viewed to 50%"}, "attachment_quartile_3": {"type": "integer", "index": 6, "name": "attachment_quartile_3", "comment": "Number of times your Long Form Video was viewed to 75%"}, "attachment_total_view_time": {"type": "numeric", "index": 7, "name": "attachment_total_view_time", "comment": "Total time Snapchatters spent on the attachment (HH:MM:SS)"}, "attachment_view_completion": {"type": "integer", "index": 8, "name": "attachment_view_completion", "comment": "The number of times your Long Form Video was viewed to completion (97% )"}, "quartile_1": {"type": "integer", "index": 9, "name": "quartile_1", "comment": "The number of times your video was viewed to 25%"}, "quartile_2": {"type": "integer", "index": 10, "name": "quartile_2", "comment": "The number of times your video was viewed to 50%"}, "quartile_3": {"type": "integer", "index": 11, "name": "quartile_3", "comment": "The number of times your video was viewed to 75%"}, "saves": {"type": "integer", "index": 12, "name": "saves", "comment": "Number of times components of the campaign were saved to Memories"}, "shares": {"type": "integer", "index": 13, "name": "shares", "comment": "Number of times components of the campaign were shared in a Chat or Story"}, "screen_time": {"type": "numeric", "index": 14, "name": "screen_time", "comment": "The number of seconds spent watching your campaign across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts"}, "video_views": {"type": "integer", "index": 15, "name": "video_views", "comment": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first"}, "view_completion": {"type": "integer", "index": 16, "name": "view_completion", "comment": "The number of times your video was viewed to completion (97% )"}, "view_time": {"type": "numeric", "index": 17, "name": "view_time", "comment": "The number of seconds spent watching your campaign across all users reached."}, "impressions": {"type": "integer", "index": 18, "name": "impressions", "comment": "The number of impressions for a campaign in the hour of the record."}, "spend": {"type": "numeric", "index": 19, "name": "spend", "comment": "The amount of spend for a campaign in the hour of the record."}, "swipes": {"type": "integer", "index": 20, "name": "swipes", "comment": "The number of swipes for a campaign in the hour of the record. Swipes are when your ad was swiped up on or the CTA was tapped to view the attachment below."}, "conversion_purchases_value": {"type": "double precision", "index": 21, "name": "conversion_purchases_value", "comment": "The total value of purchases attributed to a campaign in the hour of the record (in Ad Account's currency, converted from microcurrency)."}, "conversion_purchases": {"type": "bigint", "index": 22, "name": "conversion_purchases", "comment": "The total number of purchases attributed to a campaign for the day of the record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report"}, "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_hourly_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "text", "index": 1, "name": "campaign_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "android_installs": {"type": "integer", "index": 4, "name": "android_installs", "comment": null}, "attachment_avg_view_time_millis": {"type": "integer", "index": 5, "name": "attachment_avg_view_time_millis", "comment": null}, "attachment_quartile_1": {"type": "integer", "index": 6, "name": "attachment_quartile_1", "comment": null}, "attachment_quartile_2": {"type": "integer", "index": 7, "name": "attachment_quartile_2", "comment": null}, "attachment_quartile_3": {"type": "integer", "index": 8, "name": "attachment_quartile_3", "comment": null}, "attachment_total_view_time_millis": {"type": "integer", "index": 9, "name": "attachment_total_view_time_millis", "comment": null}, "attachment_view_completion": {"type": "integer", "index": 10, "name": "attachment_view_completion", "comment": null}, "avg_screen_time_millis": {"type": "integer", "index": 11, "name": "avg_screen_time_millis", "comment": null}, "avg_view_time_millis": {"type": "integer", "index": 12, "name": "avg_view_time_millis", "comment": null}, "conversion_add_billing": {"type": "integer", "index": 13, "name": "conversion_add_billing", "comment": null}, "conversion_add_cart": {"type": "integer", "index": 14, "name": "conversion_add_cart", "comment": null}, "conversion_app_opens": {"type": "integer", "index": 15, "name": "conversion_app_opens", "comment": null}, "conversion_level_completes": {"type": "integer", "index": 16, "name": "conversion_level_completes", "comment": null}, "conversion_page_views": {"type": "integer", "index": 17, "name": "conversion_page_views", "comment": null}, "conversion_purchases": {"type": "integer", "index": 18, "name": "conversion_purchases", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 19, "name": "conversion_purchases_value", "comment": null}, "conversion_save": {"type": "integer", "index": 20, "name": "conversion_save", "comment": null}, "conversion_searches": {"type": "integer", "index": 21, "name": "conversion_searches", "comment": null}, "conversion_sign_ups": {"type": "integer", "index": 22, "name": "conversion_sign_ups", "comment": null}, "conversion_start_checkout": {"type": "integer", "index": 23, "name": "conversion_start_checkout", "comment": null}, "conversion_view_content": {"type": "integer", "index": 24, "name": "conversion_view_content", "comment": null}, "impressions": {"type": "integer", "index": 25, "name": "impressions", "comment": null}, "ios_installs": {"type": "integer", "index": 26, "name": "ios_installs", "comment": null}, "quartile_1": {"type": "integer", "index": 27, "name": "quartile_1", "comment": null}, "quartile_2": {"type": "integer", "index": 28, "name": "quartile_2", "comment": null}, "quartile_3": {"type": "integer", "index": 29, "name": "quartile_3", "comment": null}, "saves": {"type": "integer", "index": 30, "name": "saves", "comment": null}, "screen_time_millis": {"type": "integer", "index": 31, "name": "screen_time_millis", "comment": null}, "shares": {"type": "integer", "index": 32, "name": "shares", "comment": null}, "spend": {"type": "integer", "index": 33, "name": "spend", "comment": null}, "story_completes": {"type": "integer", "index": 34, "name": "story_completes", "comment": null}, "story_opens": {"type": "integer", "index": 35, "name": "story_opens", "comment": null}, "swipe_up_percent": {"type": "integer", "index": 36, "name": "swipe_up_percent", "comment": null}, "swipes": {"type": "integer", "index": 37, "name": "swipes", "comment": null}, "total_installs": {"type": "integer", "index": 38, "name": "total_installs", "comment": null}, "video_views": {"type": "integer", "index": 39, "name": "video_views", "comment": null}, "view_completion": {"type": "integer", "index": 40, "name": "view_completion", "comment": null}, "view_time_millis": {"type": "integer", "index": 41, "name": "view_time_millis", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report_tmp"}, "model.snapchat_ads.stg_snapchat_ads__creative_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__creative_history", "database": "postgres", "comment": "Each record in this table represents a historic version of a creative in Snapchat.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "creative_id": {"type": "text", "index": 2, "name": "creative_id", "comment": "The ID of the creative in Snapchat."}, "created_at": {"type": "timestamp without time zone", "index": 3, "name": "created_at", "comment": "Created at timestamp."}, "ad_account_id": {"type": "text", "index": 4, "name": "ad_account_id", "comment": "The ID of the related ad account in Snapchat."}, "creative_name": {"type": "text", "index": 5, "name": "creative_name", "comment": "The name of the creative in Snapchat."}, "url": {"type": "text", "index": 6, "name": "url", "comment": "The URL of the creative if the creative is of type 'web view'."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": "When the record was last synced by Fivetran."}, "updated_at": {"type": "timestamp without time zone", "index": 8, "name": "updated_at", "comment": "Timestamp of when the record was updated."}, "is_most_recent_record": {"type": "boolean", "index": 9, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__creative_history"}, "model.snapchat_ads.stg_snapchat_ads__creative_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__creative_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "ad_account_id": {"type": "text", "index": 2, "name": "ad_account_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "web_view_url": {"type": "text", "index": 4, "name": "web_view_url", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__creative_history_tmp"}, "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__creative_url_tag_history", "database": "postgres", "comment": "Each record in this table represents a URL paramter key-value pair for a creative in Snapchat.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "creative_id": {"type": "text", "index": 2, "name": "creative_id", "comment": "The ID of the related creative in Snapchat."}, "param_key": {"type": "text", "index": 3, "name": "param_key", "comment": "The URL parameter key, i.e. UTM_SOURCE."}, "param_value": {"type": "text", "index": 4, "name": "param_value", "comment": "The URL parameter value, i.e. Snapchat."}, "updated_at": {"type": "timestamp without time zone", "index": 5, "name": "updated_at", "comment": "Timestamp of when the record was updated."}, "is_most_recent_record": {"type": "boolean", "index": 6, "name": "is_most_recent_record", "comment": "Boolean representing whether a record is the most recent version of that record."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history"}, "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__creative_url_tag_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"creative_id": {"type": "text", "index": 1, "name": "creative_id", "comment": null}, "key": {"type": "text", "index": 2, "name": "key", "comment": null}, "value": {"type": "text", "index": 3, "name": "value", "comment": null}, "updated_at": {"type": "text", "index": 4, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history_tmp"}, "model.tiktok_ads.stg_tiktok_ads__ad_group_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_group_history", "database": "postgres", "comment": "Each record represents data for each ad group.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_group_id": {"type": "integer", "index": 2, "name": "ad_group_id", "comment": "Ad group ID"}, "updated_at": {"type": "timestamp without time zone", "index": 3, "name": "updated_at", "comment": "Time the record was updated."}, "advertiser_id": {"type": "integer", "index": 4, "name": "advertiser_id", "comment": "Advertiser ID"}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": "The Ad group's campaign ID."}, "action_days": {"type": "integer", "index": 6, "name": "action_days", "comment": "Action days"}, "action_categories": {"type": "text", "index": 7, "name": "action_categories", "comment": "IDs of the action categories (behaviors) that you want to target."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "Ad group name. Character limit is 512 and cannot contain emoji."}, "age_groups": {"type": "text", "index": 9, "name": "age_groups", "comment": "Age groups you want to target."}, "audience_type": {"type": "integer", "index": 10, "name": "audience_type", "comment": "Audience Type"}, "budget": {"type": "integer", "index": 11, "name": "budget", "comment": "Ad budget. Returns 0.0 when Campaign Budget Optimization (budget_optimize_switch) is on."}, "category": {"type": "integer", "index": 12, "name": "category", "comment": "Ad group category."}, "display_name": {"type": "integer", "index": 13, "name": "display_name", "comment": "Display name of ad group."}, "interest_category": {"type": "text", "index": 14, "name": "interest_category", "comment": "Interest classification. If the interest is specified, users that do not meet interest target will be excluded during delivery."}, "frequency": {"type": "integer", "index": 15, "name": "frequency", "comment": "frequency, together with frequency_schedule, controls how often people see your ad (only available for REACH ads). For example, frequency = 2 frequency_schedule = 3 means \"show ads no more than twice every 3 day\".\n"}, "frequency_schedule": {"type": "integer", "index": 16, "name": "frequency_schedule", "comment": "frequency, together with frequency, controls how often people see your ad (only available for REACH ads)."}, "gender": {"type": "text", "index": 17, "name": "gender", "comment": "Gender that you want to target."}, "languages": {"type": "text", "index": 18, "name": "languages", "comment": "Codes of the languages that you want to target."}, "landing_page_url": {"type": "integer", "index": 19, "name": "landing_page_url", "comment": "Landing page URL."}, "is_most_recent_record": {"type": "boolean", "index": 20, "name": "is_most_recent_record", "comment": "Whether record is the most recent one for this particular grain."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_group_history"}, "model.tiktok_ads.stg_tiktok_ads__ad_group_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_group_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"adgroup_id": {"type": "integer", "index": 1, "name": "adgroup_id", "comment": null}, "updated_at": {"type": "text", "index": 2, "name": "updated_at", "comment": null}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "create_time": {"type": "text", "index": 5, "name": "create_time", "comment": null}, "adgroup_name": {"type": "text", "index": 6, "name": "adgroup_name", "comment": null}, "placement_type": {"type": "text", "index": 7, "name": "placement_type", "comment": null}, "profile_image": {"type": "integer", "index": 8, "name": "profile_image", "comment": null}, "landing_page_url": {"type": "integer", "index": 9, "name": "landing_page_url", "comment": null}, "display_name": {"type": "integer", "index": 10, "name": "display_name", "comment": null}, "app_type": {"type": "integer", "index": 11, "name": "app_type", "comment": null}, "app_download_url": {"type": "integer", "index": 12, "name": "app_download_url", "comment": null}, "app_name": {"type": "integer", "index": 13, "name": "app_name", "comment": null}, "optimization_event": {"type": "text", "index": 14, "name": "optimization_event", "comment": null}, "secondary_optimization_event": {"type": "integer", "index": 15, "name": "secondary_optimization_event", "comment": null}, "creative_material_mode": {"type": "text", "index": 16, "name": "creative_material_mode", "comment": null}, "audience_type": {"type": "integer", "index": 17, "name": "audience_type", "comment": null}, "gender": {"type": "text", "index": 18, "name": "gender", "comment": null}, "min_android_version": {"type": "integer", "index": 19, "name": "min_android_version", "comment": null}, "min_ios_version": {"type": "integer", "index": 20, "name": "min_ios_version", "comment": null}, "budget_mode": {"type": "text", "index": 21, "name": "budget_mode", "comment": null}, "schedule_type": {"type": "text", "index": 22, "name": "schedule_type", "comment": null}, "dayparting": {"type": "integer", "index": 23, "name": "dayparting", "comment": null}, "optimization_goal": {"type": "text", "index": 24, "name": "optimization_goal", "comment": null}, "cpv_video_duration": {"type": "integer", "index": 25, "name": "cpv_video_duration", "comment": null}, "pacing": {"type": "text", "index": 26, "name": "pacing", "comment": null}, "billing_event": {"type": "text", "index": 27, "name": "billing_event", "comment": null}, "bid_type": {"type": "text", "index": 28, "name": "bid_type", "comment": null}, "deep_bid_type": {"type": "integer", "index": 29, "name": "deep_bid_type", "comment": null}, "impression_tracking_url": {"type": "integer", "index": 30, "name": "impression_tracking_url", "comment": null}, "click_tracking_url": {"type": "integer", "index": 31, "name": "click_tracking_url", "comment": null}, "secondary_status": {"type": "text", "index": 32, "name": "secondary_status", "comment": null}, "operation_status": {"type": "text", "index": 33, "name": "operation_status", "comment": null}, "statistic_type": {"type": "integer", "index": 34, "name": "statistic_type", "comment": null}, "video_download": {"type": "text", "index": 35, "name": "video_download", "comment": null}, "open_url": {"type": "integer", "index": 36, "name": "open_url", "comment": null}, "open_url_type": {"type": "integer", "index": 37, "name": "open_url_type", "comment": null}, "fallback_type": {"type": "integer", "index": 38, "name": "fallback_type", "comment": null}, "budget": {"type": "integer", "index": 39, "name": "budget", "comment": null}, "bid_price": {"type": "integer", "index": 40, "name": "bid_price", "comment": null}, "conversion_bid_price": {"type": "integer", "index": 41, "name": "conversion_bid_price", "comment": null}, "deep_cpa_bid": {"type": "integer", "index": 42, "name": "deep_cpa_bid", "comment": null}, "schedule_start_time": {"type": "text", "index": 43, "name": "schedule_start_time", "comment": null}, "schedule_end_time": {"type": "text", "index": 44, "name": "schedule_end_time", "comment": null}, "app_id": {"type": "integer", "index": 45, "name": "app_id", "comment": null}, "pixel_id": {"type": "integer", "index": 46, "name": "pixel_id", "comment": null}, "inventory_filter_enabled": {"type": "boolean", "index": 47, "name": "inventory_filter_enabled", "comment": null}, "is_hfss": {"type": "boolean", "index": 48, "name": "is_hfss", "comment": null}, "is_new_structure": {"type": "boolean", "index": 49, "name": "is_new_structure", "comment": null}, "category": {"type": "integer", "index": 50, "name": "category", "comment": null}, "is_comment_disable": {"type": "integer", "index": 51, "name": "is_comment_disable", "comment": null}, "skip_learning_phase": {"type": "integer", "index": 52, "name": "skip_learning_phase", "comment": null}, "frequency": {"type": "integer", "index": 53, "name": "frequency", "comment": null}, "frequency_schedule": {"type": "integer", "index": 54, "name": "frequency_schedule", "comment": null}, "action_days": {"type": "integer", "index": 55, "name": "action_days", "comment": null}, "audience": {"type": "text", "index": 56, "name": "audience", "comment": null}, "excluded_audience": {"type": "text", "index": 57, "name": "excluded_audience", "comment": null}, "location": {"type": "text", "index": 58, "name": "location", "comment": null}, "interest_category_v_2": {"type": "text", "index": 59, "name": "interest_category_v_2", "comment": null}, "pangle_block_app_list_id": {"type": "text", "index": 60, "name": "pangle_block_app_list_id", "comment": null}, "action_categories": {"type": "text", "index": 61, "name": "action_categories", "comment": null}, "placements": {"type": "text", "index": 62, "name": "placements", "comment": null}, "keywords": {"type": "integer", "index": 63, "name": "keywords", "comment": null}, "age_groups": {"type": "text", "index": 64, "name": "age_groups", "comment": null}, "languages": {"type": "text", "index": 65, "name": "languages", "comment": null}, "operating_systems": {"type": "text", "index": 66, "name": "operating_systems", "comment": null}, "network_types": {"type": "text", "index": 67, "name": "network_types", "comment": null}, "carriers": {"type": "text", "index": 68, "name": "carriers", "comment": null}, "video_actions": {"type": "text", "index": 69, "name": "video_actions", "comment": null}, "package": {"type": "integer", "index": 70, "name": "package", "comment": null}, "_fivetran_synced": {"type": "text", "index": 71, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_group_history_tmp"}, "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_group_report_hourly", "database": "postgres", "comment": "Each record represents data for each ad group for each hour.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_group_id": {"type": "integer", "index": 2, "name": "ad_group_id", "comment": "Ad group id"}, "stat_time_hour": {"type": "timestamp without time zone", "index": 3, "name": "stat_time_hour", "comment": "Hour of activity"}, "cpc": {"type": "double precision", "index": 4, "name": "cpc", "comment": "The average amount of money you've spent on a click."}, "cpm": {"type": "double precision", "index": 5, "name": "cpm", "comment": "The average amount of money you've spent per 1,000 impressions."}, "ctr": {"type": "double precision", "index": 6, "name": "ctr", "comment": "The percentage of times people saw your ad and performed a click."}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": "The number of times your ads were on screen."}, "clicks": {"type": "integer", "index": 8, "name": "clicks", "comment": "The number of clicks on your ads."}, "spend": {"type": "double precision", "index": 9, "name": "spend", "comment": "The estimated total amount of money you've spent on your campaign, ad group or ad during its schedule."}, "reach": {"type": "integer", "index": 10, "name": "reach", "comment": "The number of unique users who saw your ads at least once. This metric is estimated."}, "conversion": {"type": "integer", "index": 11, "name": "conversion", "comment": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n"}, "cost_per_conversion": {"type": "double precision", "index": 12, "name": "cost_per_conversion", "comment": "The average amount of money you've spent on a conversion. (The total count is calculated based on the time each ad impression occurred.)\n"}, "conversion_rate": {"type": "integer", "index": 13, "name": "conversion_rate", "comment": "The percentage of results you received out of all the clicks of your ads. (The total count is calculated based on the time each ad impression occurred.)\n"}, "likes": {"type": "integer", "index": 14, "name": "likes", "comment": "The number of likes your video creative received within 1 day of a user seeing a paid ad."}, "comments": {"type": "integer", "index": 15, "name": "comments", "comment": "The number of comments your video creative received within 1 day of a user seeing a paid ad."}, "shares": {"type": "integer", "index": 16, "name": "shares", "comment": "The number of shares your video creative received within 1 day of a user seeing a paid ad."}, "profile_visits": {"type": "integer", "index": 17, "name": "profile_visits", "comment": "The number of profile visits the ad drove during the campaign. This metric is only for Boosted TikToks."}, "follows": {"type": "integer", "index": 18, "name": "follows", "comment": "The number of new followers that were gained within 1 day of a user seeing a paid ad. This metric is only for Boosted TikToks."}, "video_play_actions": {"type": "integer", "index": 19, "name": "video_play_actions", "comment": "The number of times your video starts to play. Replays will not be counted."}, "video_watched_2_s": {"type": "integer", "index": 20, "name": "video_watched_2_s", "comment": "The number of times your video played for at least 2 seconds. Replays will not be counted."}, "video_watched_6_s": {"type": "integer", "index": 21, "name": "video_watched_6_s", "comment": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted."}, "video_views_p_25": {"type": "integer", "index": 22, "name": "video_views_p_25", "comment": "The number of times your video was played at 25% of its length. Replays will not be counted."}, "video_views_p_50": {"type": "integer", "index": 23, "name": "video_views_p_50", "comment": "The number of times your video was played at 50% of its length. Replays will not be counted."}, "video_views_p_75": {"type": "integer", "index": 24, "name": "video_views_p_75", "comment": "The number of times your video was played at 75% of its length. Replays will not be counted."}, "average_video_play": {"type": "double precision", "index": 25, "name": "average_video_play", "comment": "The average time your video was played per single video view, including any time spent replaying the video."}, "average_video_play_per_user": {"type": "double precision", "index": 26, "name": "average_video_play_per_user", "comment": "The average time per user your video was played per single video view, including any time spent replaying the video."}, "real_time_conversion": {"type": "integer", "index": 27, "name": "real_time_conversion", "comment": "Number of times your ad resulted in the optimization event you selected."}, "total_purchase_value": {"type": "double precision", "index": 28, "name": "total_purchase_value", "comment": "The total value of purchase events that occurred in your app that were recorded by your measurement partner."}, "total_sales_lead_value": {"type": "double precision", "index": 29, "name": "total_sales_lead_value", "comment": "The monetary worth or potential value assigned to a lead generated through ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly"}, "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_group_report_hourly_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"adgroup_id": {"type": "integer", "index": 1, "name": "adgroup_id", "comment": null}, "stat_time_hour": {"type": "timestamp without time zone", "index": 2, "name": "stat_time_hour", "comment": null}, "cost_per_conversion": {"type": "double precision", "index": 3, "name": "cost_per_conversion", "comment": null}, "cpc": {"type": "double precision", "index": 4, "name": "cpc", "comment": null}, "video_play_actions": {"type": "integer", "index": 5, "name": "video_play_actions", "comment": null}, "conversion_rate": {"type": "integer", "index": 6, "name": "conversion_rate", "comment": null}, "video_views_p_75": {"type": "integer", "index": 7, "name": "video_views_p_75", "comment": null}, "result": {"type": "integer", "index": 8, "name": "result", "comment": null}, "video_views_p_50": {"type": "integer", "index": 9, "name": "video_views_p_50", "comment": null}, "impressions": {"type": "integer", "index": 10, "name": "impressions", "comment": null}, "comments": {"type": "integer", "index": 11, "name": "comments", "comment": null}, "real_time_cost_per_result": {"type": "double precision", "index": 12, "name": "real_time_cost_per_result", "comment": null}, "conversion": {"type": "integer", "index": 13, "name": "conversion", "comment": null}, "real_time_result": {"type": "integer", "index": 14, "name": "real_time_result", "comment": null}, "video_views_p_100": {"type": "integer", "index": 15, "name": "video_views_p_100", "comment": null}, "shares": {"type": "integer", "index": 16, "name": "shares", "comment": null}, "real_time_conversion_rate": {"type": "double precision", "index": 17, "name": "real_time_conversion_rate", "comment": null}, "cost_per_secondary_goal_result": {"type": "text", "index": 18, "name": "cost_per_secondary_goal_result", "comment": null}, "secondary_goal_result_rate": {"type": "text", "index": 19, "name": "secondary_goal_result_rate", "comment": null}, "clicks": {"type": "integer", "index": 20, "name": "clicks", "comment": null}, "cost_per_1000_reached": {"type": "double precision", "index": 21, "name": "cost_per_1000_reached", "comment": null}, "video_views_p_25": {"type": "integer", "index": 22, "name": "video_views_p_25", "comment": null}, "reach": {"type": "integer", "index": 23, "name": "reach", "comment": null}, "real_time_cost_per_conversion": {"type": "double precision", "index": 24, "name": "real_time_cost_per_conversion", "comment": null}, "profile_visits_rate": {"type": "integer", "index": 25, "name": "profile_visits_rate", "comment": null}, "average_video_play": {"type": "double precision", "index": 26, "name": "average_video_play", "comment": null}, "profile_visits": {"type": "integer", "index": 27, "name": "profile_visits", "comment": null}, "cpm": {"type": "double precision", "index": 28, "name": "cpm", "comment": null}, "ctr": {"type": "double precision", "index": 29, "name": "ctr", "comment": null}, "video_watched_2_s": {"type": "integer", "index": 30, "name": "video_watched_2_s", "comment": null}, "follows": {"type": "integer", "index": 31, "name": "follows", "comment": null}, "result_rate": {"type": "double precision", "index": 32, "name": "result_rate", "comment": null}, "video_watched_6_s": {"type": "integer", "index": 33, "name": "video_watched_6_s", "comment": null}, "secondary_goal_result": {"type": "text", "index": 34, "name": "secondary_goal_result", "comment": null}, "cost_per_result": {"type": "double precision", "index": 35, "name": "cost_per_result", "comment": null}, "average_video_play_per_user": {"type": "double precision", "index": 36, "name": "average_video_play_per_user", "comment": null}, "real_time_result_rate": {"type": "double precision", "index": 37, "name": "real_time_result_rate", "comment": null}, "spend": {"type": "double precision", "index": 38, "name": "spend", "comment": null}, "likes": {"type": "integer", "index": 39, "name": "likes", "comment": null}, "real_time_conversion": {"type": "integer", "index": 40, "name": "real_time_conversion", "comment": null}, "total_purchase_value": {"type": "double precision", "index": 41, "name": "total_purchase_value", "comment": null}, "total_sales_lead_value": {"type": "double precision", "index": 42, "name": "total_sales_lead_value", "comment": null}, "_fivetran_synced": {"type": "text", "index": 43, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly_tmp"}, "model.tiktok_ads.stg_tiktok_ads__ad_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_history", "database": "postgres", "comment": "Each record represents data for each ad.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_id": {"type": "integer", "index": 2, "name": "ad_id", "comment": "Ad ID"}, "updated_at": {"type": "timestamp without time zone", "index": 3, "name": "updated_at", "comment": "Time the record was updated."}, "ad_group_id": {"type": "integer", "index": 4, "name": "ad_group_id", "comment": "Ad group ID"}, "advertiser_id": {"type": "integer", "index": 5, "name": "advertiser_id", "comment": "Advertiser ID"}, "campaign_id": {"type": "integer", "index": 6, "name": "campaign_id", "comment": "Campaign ID"}, "ad_name": {"type": "text", "index": 7, "name": "ad_name", "comment": "Ad Name."}, "call_to_action": {"type": "text", "index": 8, "name": "call_to_action", "comment": "Call to action values."}, "click_tracking_url": {"type": "integer", "index": 9, "name": "click_tracking_url", "comment": "Click monitoring URL."}, "impression_tracking_url": {"type": "integer", "index": 10, "name": "impression_tracking_url", "comment": "Display monitoring URL."}, "base_url": {"type": "text", "index": 11, "name": "base_url", "comment": "The base URL of the ad, extracted from the `landing page url`."}, "url_host": {"type": "text", "index": 12, "name": "url_host", "comment": "The URL host of the ad, extracted from the `landing_page_url`."}, "url_path": {"type": "text", "index": 13, "name": "url_path", "comment": "The URL path of the ad, extracted from the `landing_page_url`."}, "utm_source": {"type": "text", "index": 14, "name": "utm_source", "comment": "The utm_source parameter of the ad, extracted from the `landing_page_url`."}, "utm_medium": {"type": "text", "index": 15, "name": "utm_medium", "comment": "The utm_medium parameter of the ad, extracted from the `landing_page_url`."}, "utm_campaign": {"type": "text", "index": 16, "name": "utm_campaign", "comment": "The utm_campaign parameter of the ad, extracted from the `landing_page_url`."}, "utm_content": {"type": "text", "index": 17, "name": "utm_content", "comment": "The utm_content parameter of the ad, extracted from the `landing_page_url`."}, "utm_term": {"type": "text", "index": 18, "name": "utm_term", "comment": "The utm_term parameter of the ad, extracted from the `landing_page_url`."}, "landing_page_url": {"type": "text", "index": 19, "name": "landing_page_url", "comment": "Landing page URL."}, "is_most_recent_record": {"type": "boolean", "index": 20, "name": "is_most_recent_record", "comment": "Whether record is the most recent one for this particular grain."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_history"}, "model.tiktok_ads.stg_tiktok_ads__ad_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "integer", "index": 1, "name": "ad_id", "comment": null}, "updated_at": {"type": "text", "index": 2, "name": "updated_at", "comment": null}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": null}, "adgroup_id": {"type": "integer", "index": 4, "name": "adgroup_id", "comment": null}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": null}, "create_time": {"type": "text", "index": 6, "name": "create_time", "comment": null}, "ad_name": {"type": "text", "index": 7, "name": "ad_name", "comment": null}, "call_to_action": {"type": "text", "index": 8, "name": "call_to_action", "comment": null}, "secondary_status": {"type": "text", "index": 9, "name": "secondary_status", "comment": null}, "operation_status": {"type": "text", "index": 10, "name": "operation_status", "comment": null}, "ad_text": {"type": "text", "index": 11, "name": "ad_text", "comment": null}, "video_id": {"type": "text", "index": 12, "name": "video_id", "comment": null}, "app_name": {"type": "integer", "index": 13, "name": "app_name", "comment": null}, "deeplink": {"type": "integer", "index": 14, "name": "deeplink", "comment": null}, "landing_page_url": {"type": "text", "index": 15, "name": "landing_page_url", "comment": null}, "display_name": {"type": "text", "index": 16, "name": "display_name", "comment": null}, "profile_image_url": {"type": "integer", "index": 17, "name": "profile_image_url", "comment": null}, "impression_tracking_url": {"type": "integer", "index": 18, "name": "impression_tracking_url", "comment": null}, "click_tracking_url": {"type": "integer", "index": 19, "name": "click_tracking_url", "comment": null}, "playable_url": {"type": "integer", "index": 20, "name": "playable_url", "comment": null}, "is_aco": {"type": "boolean", "index": 21, "name": "is_aco", "comment": null}, "creative_authorized": {"type": "boolean", "index": 22, "name": "creative_authorized", "comment": null}, "is_new_structure": {"type": "boolean", "index": 23, "name": "is_new_structure", "comment": null}, "image_ids": {"type": "text", "index": 24, "name": "image_ids", "comment": null}, "_fivetran_synced": {"type": "text", "index": 25, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_history_tmp"}, "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_report_hourly", "database": "postgres", "comment": "Each record represents data for each ad for each hour.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "ad_id": {"type": "integer", "index": 2, "name": "ad_id", "comment": "Ad id"}, "stat_time_hour": {"type": "timestamp without time zone", "index": 3, "name": "stat_time_hour", "comment": "Hour of activity"}, "cpc": {"type": "double precision", "index": 4, "name": "cpc", "comment": "The average amount of money you've spent on a click."}, "cpm": {"type": "double precision", "index": 5, "name": "cpm", "comment": "The average amount of money you've spent per 1,000 impressions."}, "ctr": {"type": "double precision", "index": 6, "name": "ctr", "comment": "The percentage of times people saw your ad and performed a click."}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": "The number of times your ads were on screen."}, "clicks": {"type": "integer", "index": 8, "name": "clicks", "comment": "The number of clicks on your ads."}, "spend": {"type": "double precision", "index": 9, "name": "spend", "comment": "The estimated total amount of money you've spent on your campaign, ad group or ad during its schedule."}, "reach": {"type": "integer", "index": 10, "name": "reach", "comment": "The number of unique users who saw your ads at least once. This metric is estimated."}, "conversion": {"type": "integer", "index": 11, "name": "conversion", "comment": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n"}, "cost_per_conversion": {"type": "double precision", "index": 12, "name": "cost_per_conversion", "comment": "The average amount of money you've spent on a conversion. (The total count is calculated based on the time each ad impression occurred.)\n"}, "conversion_rate": {"type": "integer", "index": 13, "name": "conversion_rate", "comment": "The percentage of results you received out of all the clicks of your ads. (The total count is calculated based on the time each ad impression occurred.)\n"}, "likes": {"type": "integer", "index": 14, "name": "likes", "comment": "The number of likes your video creative received within 1 day of a user seeing a paid ad."}, "comments": {"type": "integer", "index": 15, "name": "comments", "comment": "The number of comments your video creative received within 1 day of a user seeing a paid ad."}, "shares": {"type": "integer", "index": 16, "name": "shares", "comment": "The number of shares your video creative received within 1 day of a user seeing a paid ad."}, "profile_visits": {"type": "integer", "index": 17, "name": "profile_visits", "comment": "The number of profile visits the ad drove during the campaign. This metric is only for Boosted TikToks."}, "follows": {"type": "integer", "index": 18, "name": "follows", "comment": "The number of new followers that were gained within 1 day of a user seeing a paid ad. This metric is only for Boosted TikToks."}, "video_play_actions": {"type": "integer", "index": 19, "name": "video_play_actions", "comment": "The number of times your video starts to play. Replays will not be counted."}, "video_watched_2_s": {"type": "integer", "index": 20, "name": "video_watched_2_s", "comment": "The number of times your video played for at least 2 seconds. Replays will not be counted."}, "video_watched_6_s": {"type": "integer", "index": 21, "name": "video_watched_6_s", "comment": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted."}, "video_views_p_25": {"type": "integer", "index": 22, "name": "video_views_p_25", "comment": "The number of times your video was played at 25% of its length. Replays will not be counted."}, "video_views_p_50": {"type": "integer", "index": 23, "name": "video_views_p_50", "comment": "The number of times your video was played at 50% of its length. Replays will not be counted."}, "video_views_p_75": {"type": "integer", "index": 24, "name": "video_views_p_75", "comment": "The number of times your video was played at 75% of its length. Replays will not be counted."}, "average_video_play": {"type": "double precision", "index": 25, "name": "average_video_play", "comment": "The average time your video was played per single video view, including any time spent replaying the video."}, "average_video_play_per_user": {"type": "integer", "index": 26, "name": "average_video_play_per_user", "comment": "The average time per user your video was played per single video view, including any time spent replaying the video."}, "real_time_conversion": {"type": "integer", "index": 27, "name": "real_time_conversion", "comment": "Number of times your ad resulted in the optimization event you selected."}, "total_purchase_value": {"type": "double precision", "index": 28, "name": "total_purchase_value", "comment": "The total value of purchase events that occurred in your app that were recorded by your measurement partner."}, "total_sales_lead_value": {"type": "double precision", "index": 29, "name": "total_sales_lead_value", "comment": "The monetary worth or potential value assigned to a lead generated through ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly"}, "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_report_hourly_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "integer", "index": 1, "name": "ad_id", "comment": null}, "stat_time_hour": {"type": "timestamp without time zone", "index": 2, "name": "stat_time_hour", "comment": null}, "cost_per_conversion": {"type": "double precision", "index": 3, "name": "cost_per_conversion", "comment": null}, "cpc": {"type": "double precision", "index": 4, "name": "cpc", "comment": null}, "video_play_actions": {"type": "integer", "index": 5, "name": "video_play_actions", "comment": null}, "conversion_rate": {"type": "integer", "index": 6, "name": "conversion_rate", "comment": null}, "video_views_p_75": {"type": "integer", "index": 7, "name": "video_views_p_75", "comment": null}, "result": {"type": "integer", "index": 8, "name": "result", "comment": null}, "video_views_p_50": {"type": "integer", "index": 9, "name": "video_views_p_50", "comment": null}, "impressions": {"type": "integer", "index": 10, "name": "impressions", "comment": null}, "comments": {"type": "integer", "index": 11, "name": "comments", "comment": null}, "real_time_cost_per_result": {"type": "double precision", "index": 12, "name": "real_time_cost_per_result", "comment": null}, "conversion": {"type": "integer", "index": 13, "name": "conversion", "comment": null}, "real_time_result": {"type": "integer", "index": 14, "name": "real_time_result", "comment": null}, "video_views_p_100": {"type": "integer", "index": 15, "name": "video_views_p_100", "comment": null}, "shares": {"type": "integer", "index": 16, "name": "shares", "comment": null}, "real_time_conversion_rate": {"type": "integer", "index": 17, "name": "real_time_conversion_rate", "comment": null}, "cost_per_secondary_goal_result": {"type": "text", "index": 18, "name": "cost_per_secondary_goal_result", "comment": null}, "secondary_goal_result_rate": {"type": "text", "index": 19, "name": "secondary_goal_result_rate", "comment": null}, "clicks": {"type": "integer", "index": 20, "name": "clicks", "comment": null}, "cost_per_1000_reached": {"type": "integer", "index": 21, "name": "cost_per_1000_reached", "comment": null}, "video_views_p_25": {"type": "integer", "index": 22, "name": "video_views_p_25", "comment": null}, "reach": {"type": "integer", "index": 23, "name": "reach", "comment": null}, "real_time_cost_per_conversion": {"type": "double precision", "index": 24, "name": "real_time_cost_per_conversion", "comment": null}, "profile_visits_rate": {"type": "integer", "index": 25, "name": "profile_visits_rate", "comment": null}, "average_video_play": {"type": "double precision", "index": 26, "name": "average_video_play", "comment": null}, "profile_visits": {"type": "integer", "index": 27, "name": "profile_visits", "comment": null}, "cpm": {"type": "double precision", "index": 28, "name": "cpm", "comment": null}, "ctr": {"type": "double precision", "index": 29, "name": "ctr", "comment": null}, "video_watched_2_s": {"type": "integer", "index": 30, "name": "video_watched_2_s", "comment": null}, "follows": {"type": "integer", "index": 31, "name": "follows", "comment": null}, "result_rate": {"type": "integer", "index": 32, "name": "result_rate", "comment": null}, "video_watched_6_s": {"type": "integer", "index": 33, "name": "video_watched_6_s", "comment": null}, "secondary_goal_result": {"type": "text", "index": 34, "name": "secondary_goal_result", "comment": null}, "cost_per_result": {"type": "double precision", "index": 35, "name": "cost_per_result", "comment": null}, "average_video_play_per_user": {"type": "integer", "index": 36, "name": "average_video_play_per_user", "comment": null}, "real_time_result_rate": {"type": "integer", "index": 37, "name": "real_time_result_rate", "comment": null}, "spend": {"type": "double precision", "index": 38, "name": "spend", "comment": null}, "likes": {"type": "integer", "index": 39, "name": "likes", "comment": null}, "real_time_conversion": {"type": "integer", "index": 40, "name": "real_time_conversion", "comment": null}, "total_purchase_value": {"type": "double precision", "index": 41, "name": "total_purchase_value", "comment": null}, "total_sales_lead_value": {"type": "double precision", "index": 42, "name": "total_sales_lead_value", "comment": null}, "_fivetran_synced": {"type": "text", "index": 43, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly_tmp"}, "model.tiktok_ads.stg_tiktok_ads__advertiser": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__advertiser", "database": "postgres", "comment": "Each record represents data for each advertiser.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "advertiser_id": {"type": "integer", "index": 2, "name": "advertiser_id", "comment": "Advertiser ID"}, "address": {"type": "text", "index": 3, "name": "address", "comment": "Advertiser address information"}, "balance": {"type": "double precision", "index": 4, "name": "balance", "comment": "Account available balance"}, "company": {"type": "text", "index": 5, "name": "company", "comment": "Advertiser's company name"}, "contacter": {"type": "integer", "index": 6, "name": "contacter", "comment": "Contact Person"}, "country": {"type": "text", "index": 7, "name": "country", "comment": "The advertiser's country"}, "currency": {"type": "text", "index": 8, "name": "currency", "comment": "Type of currency used by advertisers"}, "description": {"type": "text", "index": 9, "name": "description", "comment": "Brand description, i.e. promotional content"}, "email": {"type": "text", "index": 10, "name": "email", "comment": "Advertiser contact email, desensitised data"}, "industry": {"type": "integer", "index": 11, "name": "industry", "comment": "Advertiser industry category"}, "language": {"type": "text", "index": 12, "name": "language", "comment": "Language used by advertisers"}, "advertiser_name": {"type": "text", "index": 13, "name": "advertiser_name", "comment": "Advertiser name"}, "cellphone_number": {"type": "text", "index": 14, "name": "cellphone_number", "comment": "Contact mobile number, desensitised data"}, "telephone_number": {"type": "text", "index": 15, "name": "telephone_number", "comment": "Fixed phone number, desensitised data"}, "timezone": {"type": "text", "index": 16, "name": "timezone", "comment": "Ad account time zone including GMT offset"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__advertiser"}, "model.tiktok_ads.stg_tiktok_ads__advertiser_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__advertiser_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "address": {"type": "text", "index": 3, "name": "address", "comment": null}, "company": {"type": "text", "index": 4, "name": "company", "comment": null}, "contacter": {"type": "integer", "index": 5, "name": "contacter", "comment": null}, "country": {"type": "text", "index": 6, "name": "country", "comment": null}, "currency": {"type": "text", "index": 7, "name": "currency", "comment": null}, "description": {"type": "text", "index": 8, "name": "description", "comment": null}, "email": {"type": "text", "index": 9, "name": "email", "comment": null}, "industry": {"type": "integer", "index": 10, "name": "industry", "comment": null}, "license_no": {"type": "integer", "index": 11, "name": "license_no", "comment": null}, "license_url": {"type": "integer", "index": 12, "name": "license_url", "comment": null}, "promotion_area": {"type": "integer", "index": 13, "name": "promotion_area", "comment": null}, "rejected_reason": {"type": "integer", "index": 14, "name": "rejected_reason", "comment": null}, "role": {"type": "text", "index": 15, "name": "role", "comment": null}, "status": {"type": "text", "index": 16, "name": "status", "comment": null}, "telephone_number": {"type": "text", "index": 17, "name": "telephone_number", "comment": null}, "timezone": {"type": "text", "index": 18, "name": "timezone", "comment": null}, "balance": {"type": "double precision", "index": 19, "name": "balance", "comment": null}, "create_time": {"type": "text", "index": 20, "name": "create_time", "comment": null}, "language": {"type": "text", "index": 21, "name": "language", "comment": null}, "cellphone_number": {"type": "text", "index": 22, "name": "cellphone_number", "comment": null}, "_fivetran_synced": {"type": "text", "index": 23, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__advertiser_tmp"}, "model.tiktok_ads.stg_tiktok_ads__campaign_country_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__campaign_country_report", "database": "postgres", "comment": "Each record provides country-level reporting metrics at the campaign level.", "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": "Unique identifier of the campaign."}, "stat_time_day": {"type": "date", "index": 2, "name": "stat_time_day", "comment": "The reporting date for the campaign data (in YYYY-MM-DD format)."}, "country_code": {"type": "text", "index": 3, "name": "country_code", "comment": "Audience country or region code."}, "clicks": {"type": "integer", "index": 4, "name": "clicks", "comment": "Total number of times users clicked on ads within the campaign."}, "impressions": {"type": "integer", "index": 5, "name": "impressions", "comment": "Total number of times ads in the campaign were shown."}, "spend": {"type": "double precision", "index": 6, "name": "spend", "comment": "Total amount spent for the campaign in the account currency."}, "conversion": {"type": "integer", "index": 7, "name": "conversion", "comment": "Number of attributed conversions from ads in the campaign based on the TikTok attribution model."}, "conversion_rate": {"type": "double precision", "index": 8, "name": "conversion_rate", "comment": "Ratio of conversions to impressions, calculated as conversions divided by impressions."}, "cost_per_conversion": {"type": "double precision", "index": 9, "name": "cost_per_conversion", "comment": "Average cost per conversion, calculated as total spend divided by conversions."}, "cpc": {"type": "double precision", "index": 10, "name": "cpc", "comment": "Cost per click, calculated as spend divided by the number of clicks."}, "cpm": {"type": "double precision", "index": 11, "name": "cpm", "comment": "Cost per thousand impressions, calculated as (spend / impressions) * 1000."}, "ctr": {"type": "double precision", "index": 12, "name": "ctr", "comment": "Click-through rate, calculated as clicks divided by impressions."}, "real_time_conversion": {"type": "integer", "index": 13, "name": "real_time_conversion", "comment": "Number of real-time conversions tracked by TikTok."}, "source_relation": {"type": "text", "index": 14, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 15, "name": "_fivetran_synced", "comment": "Timestamp indicating when the record was last synced."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__campaign_country_report"}, "model.tiktok_ads.stg_tiktok_ads__campaign_country_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__campaign_country_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 3, "name": "clicks", "comment": null}, "conversion": {"type": "integer", "index": 4, "name": "conversion", "comment": null}, "conversion_rate": {"type": "double precision", "index": 5, "name": "conversion_rate", "comment": null}, "cost_per_conversion": {"type": "double precision", "index": 6, "name": "cost_per_conversion", "comment": null}, "country_code": {"type": "text", "index": 7, "name": "country_code", "comment": null}, "cpc": {"type": "double precision", "index": 8, "name": "cpc", "comment": null}, "cpm": {"type": "double precision", "index": 9, "name": "cpm", "comment": null}, "ctr": {"type": "double precision", "index": 10, "name": "ctr", "comment": null}, "impressions": {"type": "integer", "index": 11, "name": "impressions", "comment": null}, "real_time_conversion": {"type": "integer", "index": 12, "name": "real_time_conversion", "comment": null}, "spend": {"type": "double precision", "index": 13, "name": "spend", "comment": null}, "stat_time_day": {"type": "timestamp without time zone", "index": 14, "name": "stat_time_day", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__campaign_country_report_tmp"}, "model.tiktok_ads.stg_tiktok_ads__campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__campaign_history", "database": "postgres", "comment": "Each record represents data for each campaign.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": "Campaign ID"}, "updated_at": {"type": "timestamp without time zone", "index": 3, "name": "updated_at", "comment": "Time the record was updated."}, "advertiser_id": {"type": "integer", "index": 4, "name": "advertiser_id", "comment": "Advertiser ID"}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": "Campaign name"}, "campaign_type": {"type": "text", "index": 6, "name": "campaign_type", "comment": "Campaign Type, indicates the campaign is a regular campaign or iOS 14 campaign."}, "split_test_variable": {"type": "text", "index": 7, "name": "split_test_variable", "comment": "Split Test variables. Optional values; TARGETING, BIDDING_OPTIMIZATION, CREATIVE."}, "objective_type": {"type": "text", "index": 8, "name": "objective_type", "comment": "Advertising objective."}, "status": {"type": "text", "index": 9, "name": "status", "comment": "Campaign status."}, "budget": {"type": "numeric(28,6)", "index": 10, "name": "budget", "comment": "Campaign budget"}, "budget_mode": {"type": "text", "index": 11, "name": "budget_mode", "comment": "Budget type"}, "created_at": {"type": "text", "index": 12, "name": "created_at", "comment": "Time at which the campaign was created."}, "is_new_structure": {"type": "boolean", "index": 13, "name": "is_new_structure", "comment": "Whether the campaign is a new structure (for the same campaign, the structure of campaign, adgroups and ads are the same)"}, "is_most_recent_record": {"type": "boolean", "index": 14, "name": "is_most_recent_record", "comment": "Whether record is the most recent one for this particular grain."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__campaign_history"}, "model.tiktok_ads.stg_tiktok_ads__campaign_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__campaign_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "integer", "index": 1, "name": "ad_id", "comment": null}, "updated_at": {"type": "text", "index": 2, "name": "updated_at", "comment": null}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": null}, "adgroup_id": {"type": "integer", "index": 4, "name": "adgroup_id", "comment": null}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": null}, "create_time": {"type": "text", "index": 6, "name": "create_time", "comment": null}, "ad_name": {"type": "text", "index": 7, "name": "ad_name", "comment": null}, "call_to_action": {"type": "text", "index": 8, "name": "call_to_action", "comment": null}, "secondary_status": {"type": "text", "index": 9, "name": "secondary_status", "comment": null}, "operation_status": {"type": "text", "index": 10, "name": "operation_status", "comment": null}, "ad_text": {"type": "text", "index": 11, "name": "ad_text", "comment": null}, "video_id": {"type": "text", "index": 12, "name": "video_id", "comment": null}, "app_name": {"type": "integer", "index": 13, "name": "app_name", "comment": null}, "deeplink": {"type": "integer", "index": 14, "name": "deeplink", "comment": null}, "landing_page_url": {"type": "text", "index": 15, "name": "landing_page_url", "comment": null}, "display_name": {"type": "text", "index": 16, "name": "display_name", "comment": null}, "profile_image_url": {"type": "integer", "index": 17, "name": "profile_image_url", "comment": null}, "impression_tracking_url": {"type": "integer", "index": 18, "name": "impression_tracking_url", "comment": null}, "click_tracking_url": {"type": "integer", "index": 19, "name": "click_tracking_url", "comment": null}, "playable_url": {"type": "integer", "index": 20, "name": "playable_url", "comment": null}, "is_aco": {"type": "boolean", "index": 21, "name": "is_aco", "comment": null}, "creative_authorized": {"type": "boolean", "index": 22, "name": "creative_authorized", "comment": null}, "is_new_structure": {"type": "boolean", "index": 23, "name": "is_new_structure", "comment": null}, "image_ids": {"type": "text", "index": 24, "name": "image_ids", "comment": null}, "_fivetran_synced": {"type": "text", "index": 25, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__campaign_history_tmp"}, "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__campaign_report_hourly", "database": "postgres", "comment": "Each record represent data for each campaign for each hour.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": "Campaign id"}, "stat_time_hour": {"type": "timestamp without time zone", "index": 3, "name": "stat_time_hour", "comment": "Hour of activity"}, "cpc": {"type": "double precision", "index": 4, "name": "cpc", "comment": "The average amount of money you've spent on a click."}, "cpm": {"type": "double precision", "index": 5, "name": "cpm", "comment": "The average amount of money you've spent per 1,000 impressions."}, "ctr": {"type": "double precision", "index": 6, "name": "ctr", "comment": "The percentage of times people saw your ad and performed a click."}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": "The number of times your ads were on screen."}, "clicks": {"type": "integer", "index": 8, "name": "clicks", "comment": "The number of clicks on your ads."}, "spend": {"type": "double precision", "index": 9, "name": "spend", "comment": "The estimated total amount of money you've spent on your campaign, ad group or ad during its schedule."}, "reach": {"type": "integer", "index": 10, "name": "reach", "comment": "The number of unique users who saw your ads at least once. This metric is estimated."}, "conversion": {"type": "integer", "index": 11, "name": "conversion", "comment": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n"}, "cost_per_conversion": {"type": "double precision", "index": 12, "name": "cost_per_conversion", "comment": "The average amount of money you've spent on a conversion. (The total count is calculated based on the time each ad impression occurred.)\n"}, "conversion_rate": {"type": "integer", "index": 13, "name": "conversion_rate", "comment": "The percentage of results you received out of all the clicks of your ads. (The total count is calculated based on the time each ad impression occurred.)\n"}, "likes": {"type": "integer", "index": 14, "name": "likes", "comment": "The number of likes your video creative received within 1 day of a user seeing a paid ad."}, "comments": {"type": "integer", "index": 15, "name": "comments", "comment": "The number of comments your video creative received within 1 day of a user seeing a paid ad."}, "shares": {"type": "integer", "index": 16, "name": "shares", "comment": "The number of shares your video creative received within 1 day of a user seeing a paid ad."}, "profile_visits": {"type": "integer", "index": 17, "name": "profile_visits", "comment": "The number of profile visits the ad drove during the campaign. This metric is only for Boosted TikToks."}, "follows": {"type": "integer", "index": 18, "name": "follows", "comment": "The number of new followers that were gained within 1 day of a user seeing a paid ad. This metric is only for Boosted TikToks."}, "video_play_actions": {"type": "integer", "index": 19, "name": "video_play_actions", "comment": "The number of times your video starts to play. Replays will not be counted."}, "video_watched_2_s": {"type": "integer", "index": 20, "name": "video_watched_2_s", "comment": "The number of times your video played for at least 2 seconds. Replays will not be counted."}, "video_watched_6_s": {"type": "integer", "index": 21, "name": "video_watched_6_s", "comment": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted."}, "video_views_p_25": {"type": "integer", "index": 22, "name": "video_views_p_25", "comment": "The number of times your video was played at 25% of its length. Replays will not be counted."}, "video_views_p_50": {"type": "integer", "index": 23, "name": "video_views_p_50", "comment": "The number of times your video was played at 50% of its length. Replays will not be counted."}, "video_views_p_75": {"type": "integer", "index": 24, "name": "video_views_p_75", "comment": "The number of times your video was played at 75% of its length. Replays will not be counted."}, "average_video_play": {"type": "double precision", "index": 25, "name": "average_video_play", "comment": "The average time your video was played per single video view, including any time spent replaying the video."}, "average_video_play_per_user": {"type": "double precision", "index": 26, "name": "average_video_play_per_user", "comment": "The average time per user your video was played per single video view, including any time spent replaying the video."}, "real_time_conversion": {"type": "integer", "index": 27, "name": "real_time_conversion", "comment": "Number of times your ad resulted in the optimization event you selected."}, "total_purchase_value": {"type": "double precision", "index": 28, "name": "total_purchase_value", "comment": "The total value of purchase events that occurred in your app that were recorded by your measurement partner."}, "total_sales_lead_value": {"type": "double precision", "index": 29, "name": "total_sales_lead_value", "comment": "The monetary worth or potential value assigned to a lead generated through ads."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly"}, "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__campaign_report_hourly_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "stat_time_hour": {"type": "timestamp without time zone", "index": 2, "name": "stat_time_hour", "comment": null}, "cost_per_conversion": {"type": "double precision", "index": 3, "name": "cost_per_conversion", "comment": null}, "cpc": {"type": "double precision", "index": 4, "name": "cpc", "comment": null}, "video_play_actions": {"type": "integer", "index": 5, "name": "video_play_actions", "comment": null}, "conversion_rate": {"type": "integer", "index": 6, "name": "conversion_rate", "comment": null}, "video_views_p_75": {"type": "integer", "index": 7, "name": "video_views_p_75", "comment": null}, "result": {"type": "integer", "index": 8, "name": "result", "comment": null}, "video_views_p_50": {"type": "integer", "index": 9, "name": "video_views_p_50", "comment": null}, "impressions": {"type": "integer", "index": 10, "name": "impressions", "comment": null}, "comments": {"type": "integer", "index": 11, "name": "comments", "comment": null}, "real_time_cost_per_result": {"type": "double precision", "index": 12, "name": "real_time_cost_per_result", "comment": null}, "conversion": {"type": "integer", "index": 13, "name": "conversion", "comment": null}, "real_time_result": {"type": "integer", "index": 14, "name": "real_time_result", "comment": null}, "video_views_p_100": {"type": "integer", "index": 15, "name": "video_views_p_100", "comment": null}, "shares": {"type": "integer", "index": 16, "name": "shares", "comment": null}, "real_time_conversion_rate": {"type": "double precision", "index": 17, "name": "real_time_conversion_rate", "comment": null}, "cost_per_secondary_goal_result": {"type": "text", "index": 18, "name": "cost_per_secondary_goal_result", "comment": null}, "secondary_goal_result_rate": {"type": "text", "index": 19, "name": "secondary_goal_result_rate", "comment": null}, "clicks": {"type": "integer", "index": 20, "name": "clicks", "comment": null}, "cost_per_1000_reached": {"type": "double precision", "index": 21, "name": "cost_per_1000_reached", "comment": null}, "video_views_p_25": {"type": "integer", "index": 22, "name": "video_views_p_25", "comment": null}, "reach": {"type": "integer", "index": 23, "name": "reach", "comment": null}, "real_time_cost_per_conversion": {"type": "double precision", "index": 24, "name": "real_time_cost_per_conversion", "comment": null}, "profile_visits_rate": {"type": "integer", "index": 25, "name": "profile_visits_rate", "comment": null}, "average_video_play": {"type": "double precision", "index": 26, "name": "average_video_play", "comment": null}, "profile_visits": {"type": "integer", "index": 27, "name": "profile_visits", "comment": null}, "cpm": {"type": "double precision", "index": 28, "name": "cpm", "comment": null}, "ctr": {"type": "double precision", "index": 29, "name": "ctr", "comment": null}, "video_watched_2_s": {"type": "integer", "index": 30, "name": "video_watched_2_s", "comment": null}, "follows": {"type": "integer", "index": 31, "name": "follows", "comment": null}, "result_rate": {"type": "double precision", "index": 32, "name": "result_rate", "comment": null}, "video_watched_6_s": {"type": "integer", "index": 33, "name": "video_watched_6_s", "comment": null}, "secondary_goal_result": {"type": "text", "index": 34, "name": "secondary_goal_result", "comment": null}, "cost_per_result": {"type": "double precision", "index": 35, "name": "cost_per_result", "comment": null}, "average_video_play_per_user": {"type": "double precision", "index": 36, "name": "average_video_play_per_user", "comment": null}, "real_time_result_rate": {"type": "double precision", "index": 37, "name": "real_time_result_rate", "comment": null}, "spend": {"type": "double precision", "index": 38, "name": "spend", "comment": null}, "likes": {"type": "integer", "index": 39, "name": "likes", "comment": null}, "real_time_conversion": {"type": "integer", "index": 40, "name": "real_time_conversion", "comment": null}, "total_purchase_value": {"type": "double precision", "index": 41, "name": "total_purchase_value", "comment": null}, "total_sales_lead_value": {"type": "double precision", "index": 42, "name": "total_sales_lead_value", "comment": null}, "_fivetran_synced": {"type": "text", "index": 43, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly_tmp"}, "model.tiktok_ads.stg_tiktok_ads__location": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__location", "database": "postgres", "comment": "Reference table of geographic regions and locations available for TikTok Ads targeting. Each record represents a location, such as a country, province, or city.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "location_id": {"type": "text", "index": 2, "name": "location_id", "comment": "Unique identifier for the geographic region."}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": "Advertiser ID associated with this location record."}, "country_code": {"type": "text", "index": 4, "name": "country_code", "comment": "Two-letter ISO country code for the location."}, "region_name": {"type": "text", "index": 5, "name": "region_name", "comment": "Human-readable name of the geographic region."}, "region_level": {"type": "text", "index": 6, "name": "region_level", "comment": "Reporting granularity of the location (e.g. COUNTRY, PROVINCE, CITY)."}, "area_type": {"type": "text", "index": 7, "name": "area_type", "comment": "Classification of the location, such as administrative region or media market."}, "parent_location_id": {"type": "text", "index": 8, "name": "parent_location_id", "comment": "Identifier of the parent region, enabling hierarchical rollups (city to state to country)."}, "has_support_below_18": {"type": "boolean", "index": 9, "name": "has_support_below_18", "comment": "Whether the location supports targeting users under 18. Used for compliance with age-restricted ad targeting rules."}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 10, "name": "_fivetran_synced", "comment": "Timestamp indicating when the record was last synced."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__location"}, "model.tiktok_ads.stg_tiktok_ads__location_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__location_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "advertiser_id": {"type": "integer", "index": 2, "name": "advertiser_id", "comment": null}, "area_type": {"type": "text", "index": 3, "name": "area_type", "comment": null}, "country_code": {"type": "text", "index": 4, "name": "country_code", "comment": null}, "parent_id": {"type": "text", "index": 5, "name": "parent_id", "comment": null}, "region_id": {"type": "text", "index": 6, "name": "region_id", "comment": null}, "region_level": {"type": "text", "index": 7, "name": "region_level", "comment": null}, "region_name": {"type": "text", "index": 8, "name": "region_name", "comment": null}, "support_below_18": {"type": "boolean", "index": 9, "name": "support_below_18", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.stg_tiktok_ads__location_tmp"}, "model.twitter_ads.stg_twitter_ads__account_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__account_history", "database": "postgres", "comment": "Each record represents a version of each account. The versions can be differentiated by the updated_at timestamp.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "approval_status": {"type": "text", "index": 2, "name": "approval_status", "comment": "The approval status of the account."}, "business_id": {"type": "integer", "index": 3, "name": "business_id", "comment": "The ID of the related business."}, "business_name": {"type": "integer", "index": 4, "name": "business_name", "comment": "The name of the related business."}, "created_timestamp": {"type": "text", "index": 5, "name": "created_timestamp", "comment": "The timestamp the account was created."}, "is_deleted": {"type": "boolean", "index": 6, "name": "is_deleted", "comment": "Whether the record has been deleted or not."}, "account_id": {"type": "text", "index": 7, "name": "account_id", "comment": "The ID of the account."}, "industry_type": {"type": "integer", "index": 8, "name": "industry_type", "comment": "The industry of the accounts."}, "name": {"type": "character varying", "index": 9, "name": "name", "comment": "The name of the account."}, "salt": {"type": "integer", "index": 10, "name": "salt", "comment": "The random encryption key used to hash data."}, "timezone": {"type": "text", "index": 11, "name": "timezone", "comment": "The timezone the account is set to."}, "timezone_switched_timestamp": {"type": "text", "index": 12, "name": "timezone_switched_timestamp", "comment": "The timestamp the account's timezone was last changed."}, "updated_timestamp": {"type": "text", "index": 13, "name": "updated_timestamp", "comment": "The timestamp the account was last updated."}, "is_latest_version": {"type": "boolean", "index": 14, "name": "is_latest_version", "comment": "Whether the record is the most latest version for the account"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__account_history"}, "model.twitter_ads.stg_twitter_ads__account_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__account_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "approval_status": {"type": "text", "index": 2, "name": "approval_status", "comment": null}, "business_id": {"type": "integer", "index": 3, "name": "business_id", "comment": null}, "business_name": {"type": "integer", "index": 4, "name": "business_name", "comment": null}, "created_at": {"type": "text", "index": 5, "name": "created_at", "comment": null}, "deleted": {"type": "boolean", "index": 6, "name": "deleted", "comment": null}, "id": {"type": "text", "index": 7, "name": "id", "comment": null}, "industry_type": {"type": "integer", "index": 8, "name": "industry_type", "comment": null}, "name": {"type": "character varying", "index": 9, "name": "name", "comment": null}, "salt": {"type": "integer", "index": 10, "name": "salt", "comment": null}, "timezone": {"type": "text", "index": 11, "name": "timezone", "comment": null}, "timezone_switch_at": {"type": "text", "index": 12, "name": "timezone_switch_at", "comment": null}, "updated_at": {"type": "text", "index": 13, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__account_history_tmp"}, "model.twitter_ads.stg_twitter_ads__campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_history", "database": "postgres", "comment": "Each record represents a version of each campaign. The versions can be differentiated by the updated_at timestamp.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": "The ID of the related account."}, "created_timestamp": {"type": "text", "index": 3, "name": "created_timestamp", "comment": "The timestamp the account was created."}, "currency": {"type": "text", "index": 4, "name": "currency", "comment": "The currency all metrics for the account are set to."}, "daily_budget_amount_local_micro": {"type": "integer", "index": 5, "name": "daily_budget_amount_local_micro", "comment": "The daily budget amount to be allocated to the campaign, in micros. The currency associated with the specified funding instrument will be used."}, "is_deleted": {"type": "boolean", "index": 6, "name": "is_deleted", "comment": "Whether the record has been deleted or not."}, "duration_in_days": {"type": "integer", "index": 7, "name": "duration_in_days", "comment": "The time period within which the frequency_cap is achieved."}, "end_timestamp": {"type": "text", "index": 8, "name": "end_timestamp", "comment": "The time the campaign will end"}, "entity_status": {"type": "text", "index": 9, "name": "entity_status", "comment": "The status of the campaign."}, "frequency_cap": {"type": "integer", "index": 10, "name": "frequency_cap", "comment": "The maximum number of times an ad could be delivered to a user."}, "funding_instrument_id": {"type": "text", "index": 11, "name": "funding_instrument_id", "comment": "Reference to the funding instrument."}, "campaign_id": {"type": "text", "index": 12, "name": "campaign_id", "comment": "The ID of the campaign."}, "campaign_name": {"type": "text", "index": 13, "name": "campaign_name", "comment": "The name of the campaign."}, "is_servable": {"type": "boolean", "index": 14, "name": "is_servable", "comment": "Whether the campaign is in a state to be actively served to users."}, "is_standard_delivery": {"type": "boolean", "index": 15, "name": "is_standard_delivery", "comment": "Whether standard delivery is enabled (vs accelerated delivery)."}, "start_timestamp": {"type": "text", "index": 16, "name": "start_timestamp", "comment": "The time the campaign will start."}, "total_budget_amount_local_micro": {"type": "integer", "index": 17, "name": "total_budget_amount_local_micro", "comment": "The total budget amount to be allocated to the campaign, in micros."}, "updated_timestamp": {"type": "text", "index": 18, "name": "updated_timestamp", "comment": "The timestamp the account was last updated."}, "daily_budget_amount": {"type": "numeric", "index": 19, "name": "daily_budget_amount", "comment": "The daily budget amount to be allocated to the campaign. The currency associated with the specified funding instrument will be used."}, "total_budget_amount": {"type": "numeric", "index": 20, "name": "total_budget_amount", "comment": "The total budget amount to be allocated to the campaign."}, "is_latest_version": {"type": "boolean", "index": 21, "name": "is_latest_version", "comment": "Whether the record is the most latest version for the campaign"}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_history"}, "model.twitter_ads.stg_twitter_ads__campaign_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": null}, "created_at": {"type": "text", "index": 3, "name": "created_at", "comment": null}, "currency": {"type": "text", "index": 4, "name": "currency", "comment": null}, "daily_budget_amount_local_micro": {"type": "integer", "index": 5, "name": "daily_budget_amount_local_micro", "comment": null}, "deleted": {"type": "boolean", "index": 6, "name": "deleted", "comment": null}, "duration_in_days": {"type": "integer", "index": 7, "name": "duration_in_days", "comment": null}, "end_time": {"type": "text", "index": 8, "name": "end_time", "comment": null}, "entity_status": {"type": "text", "index": 9, "name": "entity_status", "comment": null}, "frequency_cap": {"type": "integer", "index": 10, "name": "frequency_cap", "comment": null}, "funding_instrument_id": {"type": "text", "index": 11, "name": "funding_instrument_id", "comment": null}, "id": {"type": "text", "index": 12, "name": "id", "comment": null}, "name": {"type": "text", "index": 13, "name": "name", "comment": null}, "servable": {"type": "boolean", "index": 14, "name": "servable", "comment": null}, "standard_delivery": {"type": "boolean", "index": 15, "name": "standard_delivery", "comment": null}, "start_time": {"type": "text", "index": 16, "name": "start_time", "comment": null}, "total_budget_amount_local_micro": {"type": "integer", "index": 17, "name": "total_budget_amount_local_micro", "comment": null}, "updated_at": {"type": "text", "index": 18, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_history_tmp"}, "model.twitter_ads.stg_twitter_ads__campaign_locations_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_locations_report", "database": "postgres", "comment": "Each record represents the performance of an ad campaign on a given day in a specific country, for its placement in Twitter.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "country": {"type": "text", "index": 3, "name": "country", "comment": "Long-form name of the country being reported on."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID of the related account."}, "campaign_id": {"type": "text", "index": 5, "name": "campaign_id", "comment": "The ID of the campaign."}, "placement": {"type": "text", "index": 6, "name": "placement", "comment": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`."}, "clicks": {"type": "integer", "index": 7, "name": "clicks", "comment": "The clicks for the campaign on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes."}, "impressions": {"type": "integer", "index": 8, "name": "impressions", "comment": "The impressions for the campaign on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results."}, "spend_micro": {"type": "integer", "index": 9, "name": "spend_micro", "comment": "The spend for the campaign on that day, in micros and in whichever currency was selected during account creation."}, "spend": {"type": "numeric", "index": 10, "name": "spend", "comment": "The spend for the campaign on that day in whichever currency was selected during account creation."}, "url_clicks": {"type": "integer", "index": 11, "name": "url_clicks", "comment": "The url clicks for the campaign on that day."}, "conversion_purchases_metric": {"type": "bigint", "index": 12, "name": "conversion_purchases_metric", "comment": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_custom_metric": {"type": "bigint", "index": 13, "name": "conversion_custom_metric", "comment": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_purchases_sale_amount": {"type": "double precision", "index": 14, "name": "conversion_purchases_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}, "conversion_custom_sale_amount": {"type": "double precision", "index": 15, "name": "conversion_custom_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_locations_report"}, "model.twitter_ads.stg_twitter_ads__campaign_locations_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_locations_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"segment": {"type": "text", "index": 1, "name": "segment", "comment": null}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 3, "name": "billed_charge_local_micro", "comment": null}, "campaign_id": {"type": "text", "index": 4, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 5, "name": "clicks", "comment": null}, "date": {"type": "timestamp without time zone", "index": 6, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": null}, "placement": {"type": "text", "index": 8, "name": "placement", "comment": null}, "url_clicks": {"type": "integer", "index": 9, "name": "url_clicks", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_locations_report_tmp"}, "model.twitter_ads.stg_twitter_ads__campaign_regions_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_regions_report", "database": "postgres", "comment": "Each record represents the performance of an ad campaign on a given day in a specific geographic region, for its placement in Twitter.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "region": {"type": "text", "index": 3, "name": "region", "comment": "Long-form name of the geopgraphic region being reported on."}, "country": {"type": "text", "index": 4, "name": "country", "comment": "Long-form name of the country being reported on."}, "account_id": {"type": "text", "index": 5, "name": "account_id", "comment": "The ID of the related account."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID of the campaign."}, "placement": {"type": "text", "index": 7, "name": "placement", "comment": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`."}, "clicks": {"type": "integer", "index": 8, "name": "clicks", "comment": "The clicks for the campaign on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes."}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": "The impressions for the campaign on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results."}, "spend_micro": {"type": "integer", "index": 10, "name": "spend_micro", "comment": "The spend for the campaign on that day, in micros and in whichever currency was selected during account creation."}, "spend": {"type": "numeric", "index": 11, "name": "spend", "comment": "The spend for the campaign on that day in whichever currency was selected during account creation."}, "url_clicks": {"type": "integer", "index": 12, "name": "url_clicks", "comment": "The url clicks for the campaign on that day."}, "conversion_purchases_metric": {"type": "bigint", "index": 13, "name": "conversion_purchases_metric", "comment": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_custom_metric": {"type": "bigint", "index": 14, "name": "conversion_custom_metric", "comment": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_purchases_sale_amount": {"type": "double precision", "index": 15, "name": "conversion_purchases_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}, "conversion_custom_sale_amount": {"type": "double precision", "index": 16, "name": "conversion_custom_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_regions_report"}, "model.twitter_ads.stg_twitter_ads__campaign_regions_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_regions_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"location_name": {"type": "text", "index": 1, "name": "location_name", "comment": null}, "location_type": {"type": "text", "index": 2, "name": "location_type", "comment": null}, "segment": {"type": "text", "index": 3, "name": "segment", "comment": null}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 5, "name": "billed_charge_local_micro", "comment": null}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 7, "name": "clicks", "comment": null}, "date": {"type": "timestamp without time zone", "index": 8, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "placement": {"type": "text", "index": 10, "name": "placement", "comment": null}, "url_clicks": {"type": "integer", "index": 11, "name": "url_clicks", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_regions_report_tmp"}, "model.twitter_ads.stg_twitter_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_report", "database": "postgres", "comment": "Each record represents the performance of an ad campaign on a given day, for its placement in Twitter.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": "The ID of the related account."}, "campaign_id": {"type": "text", "index": 4, "name": "campaign_id", "comment": "The ID of the campaign."}, "placement": {"type": "text", "index": 5, "name": "placement", "comment": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`."}, "clicks": {"type": "integer", "index": 6, "name": "clicks", "comment": "The clicks for the campaign on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes."}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": "The impressions for the campaign on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results."}, "spend_micro": {"type": "integer", "index": 8, "name": "spend_micro", "comment": "The spend for the campaign on that day, in micros and in whichever currency was selected during account creation."}, "spend": {"type": "numeric", "index": 9, "name": "spend", "comment": "The spend for the campaign on that day in whichever currency was selected during account creation."}, "url_clicks": {"type": "integer", "index": 10, "name": "url_clicks", "comment": "The url clicks for the campaign on that day."}, "conversion_purchases_metric": {"type": "bigint", "index": 11, "name": "conversion_purchases_metric", "comment": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_custom_metric": {"type": "bigint", "index": 12, "name": "conversion_custom_metric", "comment": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_purchases_sale_amount": {"type": "double precision", "index": 13, "name": "conversion_purchases_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}, "conversion_custom_sale_amount": {"type": "double precision", "index": 14, "name": "conversion_custom_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_report"}, "model.twitter_ads.stg_twitter_ads__campaign_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "text", "index": 1, "name": "account_id", "comment": null}, "campaign_id": {"type": "text", "index": 2, "name": "campaign_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 3, "name": "date", "comment": null}, "placement": {"type": "text", "index": 4, "name": "placement", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "app_clicks": {"type": "integer", "index": 6, "name": "app_clicks", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 7, "name": "billed_charge_local_micro", "comment": null}, "billed_engagements": {"type": "integer", "index": 8, "name": "billed_engagements", "comment": null}, "card_engagements": {"type": "integer", "index": 9, "name": "card_engagements", "comment": null}, "carousel_swipes": {"type": "integer", "index": 10, "name": "carousel_swipes", "comment": null}, "clicks": {"type": "integer", "index": 11, "name": "clicks", "comment": null}, "conversion_custom_metric": {"type": "integer", "index": 12, "name": "conversion_custom_metric", "comment": null}, "conversion_custom_order_quantity": {"type": "integer", "index": 13, "name": "conversion_custom_order_quantity", "comment": null}, "conversion_custom_order_quantity_engagement": {"type": "integer", "index": 14, "name": "conversion_custom_order_quantity_engagement", "comment": null}, "conversion_custom_order_quantity_view": {"type": "integer", "index": 15, "name": "conversion_custom_order_quantity_view", "comment": null}, "conversion_custom_post_engagement": {"type": "integer", "index": 16, "name": "conversion_custom_post_engagement", "comment": null}, "conversion_custom_post_view": {"type": "integer", "index": 17, "name": "conversion_custom_post_view", "comment": null}, "conversion_custom_sale_amount": {"type": "integer", "index": 18, "name": "conversion_custom_sale_amount", "comment": null}, "conversion_custom_sale_amount_engagement": {"type": "integer", "index": 19, "name": "conversion_custom_sale_amount_engagement", "comment": null}, "conversion_custom_sale_amount_view": {"type": "integer", "index": 20, "name": "conversion_custom_sale_amount_view", "comment": null}, "conversion_downloads_metric": {"type": "integer", "index": 21, "name": "conversion_downloads_metric", "comment": null}, "conversion_downloads_order_quantity": {"type": "integer", "index": 22, "name": "conversion_downloads_order_quantity", "comment": null}, "conversion_downloads_order_quantity_engagement": {"type": "integer", "index": 23, "name": "conversion_downloads_order_quantity_engagement", "comment": null}, "conversion_downloads_order_quantity_view": {"type": "integer", "index": 24, "name": "conversion_downloads_order_quantity_view", "comment": null}, "conversion_downloads_post_engagement": {"type": "integer", "index": 25, "name": "conversion_downloads_post_engagement", "comment": null}, "conversion_downloads_post_view": {"type": "integer", "index": 26, "name": "conversion_downloads_post_view", "comment": null}, "conversion_downloads_sale_amount": {"type": "integer", "index": 27, "name": "conversion_downloads_sale_amount", "comment": null}, "conversion_downloads_sale_amount_engagement": {"type": "integer", "index": 28, "name": "conversion_downloads_sale_amount_engagement", "comment": null}, "conversion_downloads_sale_amount_view": {"type": "integer", "index": 29, "name": "conversion_downloads_sale_amount_view", "comment": null}, "conversion_purchases_assisted": {"type": "integer", "index": 30, "name": "conversion_purchases_assisted", "comment": null}, "conversion_purchases_metric": {"type": "integer", "index": 31, "name": "conversion_purchases_metric", "comment": null}, "conversion_purchases_order_quantity": {"type": "integer", "index": 32, "name": "conversion_purchases_order_quantity", "comment": null}, "conversion_purchases_order_quantity_engagement": {"type": "integer", "index": 33, "name": "conversion_purchases_order_quantity_engagement", "comment": null}, "conversion_purchases_order_quantity_view": {"type": "integer", "index": 34, "name": "conversion_purchases_order_quantity_view", "comment": null}, "conversion_purchases_post_engagement": {"type": "integer", "index": 35, "name": "conversion_purchases_post_engagement", "comment": null}, "conversion_purchases_post_view": {"type": "integer", "index": 36, "name": "conversion_purchases_post_view", "comment": null}, "conversion_purchases_sale_amount": {"type": "integer", "index": 37, "name": "conversion_purchases_sale_amount", "comment": null}, "conversion_purchases_sale_amount_engagement": {"type": "integer", "index": 38, "name": "conversion_purchases_sale_amount_engagement", "comment": null}, "conversion_purchases_sale_amount_view": {"type": "integer", "index": 39, "name": "conversion_purchases_sale_amount_view", "comment": null}, "conversion_sign_ups_assisted": {"type": "integer", "index": 40, "name": "conversion_sign_ups_assisted", "comment": null}, "conversion_sign_ups_metric": {"type": "integer", "index": 41, "name": "conversion_sign_ups_metric", "comment": null}, "conversion_sign_ups_order_quantity": {"type": "integer", "index": 42, "name": "conversion_sign_ups_order_quantity", "comment": null}, "conversion_sign_ups_order_quantity_engagement": {"type": "integer", "index": 43, "name": "conversion_sign_ups_order_quantity_engagement", "comment": null}, "conversion_sign_ups_order_quantity_view": {"type": "integer", "index": 44, "name": "conversion_sign_ups_order_quantity_view", "comment": null}, "conversion_sign_ups_post_engagement": {"type": "integer", "index": 45, "name": "conversion_sign_ups_post_engagement", "comment": null}, "conversion_sign_ups_post_view": {"type": "integer", "index": 46, "name": "conversion_sign_ups_post_view", "comment": null}, "conversion_sign_ups_sale_amount": {"type": "integer", "index": 47, "name": "conversion_sign_ups_sale_amount", "comment": null}, "conversion_sign_ups_sale_amount_engagement": {"type": "integer", "index": 48, "name": "conversion_sign_ups_sale_amount_engagement", "comment": null}, "conversion_sign_ups_sale_amount_view": {"type": "integer", "index": 49, "name": "conversion_sign_ups_sale_amount_view", "comment": null}, "conversion_site_visits_metric": {"type": "integer", "index": 50, "name": "conversion_site_visits_metric", "comment": null}, "conversion_site_visits_order_quantity": {"type": "integer", "index": 51, "name": "conversion_site_visits_order_quantity", "comment": null}, "conversion_site_visits_order_quantity_engagement": {"type": "integer", "index": 52, "name": "conversion_site_visits_order_quantity_engagement", "comment": null}, "conversion_site_visits_order_quantity_view": {"type": "integer", "index": 53, "name": "conversion_site_visits_order_quantity_view", "comment": null}, "conversion_site_visits_post_engagement": {"type": "integer", "index": 54, "name": "conversion_site_visits_post_engagement", "comment": null}, "conversion_site_visits_post_view": {"type": "integer", "index": 55, "name": "conversion_site_visits_post_view", "comment": null}, "conversion_site_visits_sale_amount": {"type": "integer", "index": 56, "name": "conversion_site_visits_sale_amount", "comment": null}, "conversion_site_visits_sale_amount_engagement": {"type": "integer", "index": 57, "name": "conversion_site_visits_sale_amount_engagement", "comment": null}, "conversion_site_visits_sale_amount_view": {"type": "integer", "index": 58, "name": "conversion_site_visits_sale_amount_view", "comment": null}, "engagements": {"type": "integer", "index": 59, "name": "engagements", "comment": null}, "follows": {"type": "integer", "index": 60, "name": "follows", "comment": null}, "impressions": {"type": "integer", "index": 61, "name": "impressions", "comment": null}, "likes": {"type": "integer", "index": 62, "name": "likes", "comment": null}, "media_engagements": {"type": "integer", "index": 63, "name": "media_engagements", "comment": null}, "media_views": {"type": "integer", "index": 64, "name": "media_views", "comment": null}, "mobile_conversion_achievements_unlocked_assisted": {"type": "integer", "index": 65, "name": "mobile_conversion_achievements_unlocked_assisted", "comment": null}, "mobile_conversion_achievements_unlocked_order_quantity": {"type": "integer", "index": 66, "name": "mobile_conversion_achievements_unlocked_order_quantity", "comment": null}, "mobile_conversion_achievements_unlocked_post_engagement": {"type": "integer", "index": 67, "name": "mobile_conversion_achievements_unlocked_post_engagement", "comment": null}, "mobile_conversion_achievements_unlocked_post_view": {"type": "integer", "index": 68, "name": "mobile_conversion_achievements_unlocked_post_view", "comment": null}, "mobile_conversion_achievements_unlocked_sale_amount": {"type": "integer", "index": 69, "name": "mobile_conversion_achievements_unlocked_sale_amount", "comment": null}, "mobile_conversion_add_to_carts_assisted": {"type": "integer", "index": 70, "name": "mobile_conversion_add_to_carts_assisted", "comment": null}, "mobile_conversion_add_to_carts_order_quantity": {"type": "integer", "index": 71, "name": "mobile_conversion_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_add_to_carts_post_engagement": {"type": "integer", "index": 72, "name": "mobile_conversion_add_to_carts_post_engagement", "comment": null}, "mobile_conversion_add_to_carts_post_view": {"type": "integer", "index": 73, "name": "mobile_conversion_add_to_carts_post_view", "comment": null}, "mobile_conversion_add_to_carts_sale_amount": {"type": "integer", "index": 74, "name": "mobile_conversion_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_add_to_wishlists_assisted": {"type": "integer", "index": 75, "name": "mobile_conversion_add_to_wishlists_assisted", "comment": null}, "mobile_conversion_add_to_wishlists_order_quantity": {"type": "integer", "index": 76, "name": "mobile_conversion_add_to_wishlists_order_quantity", "comment": null}, "mobile_conversion_add_to_wishlists_post_engagement": {"type": "integer", "index": 77, "name": "mobile_conversion_add_to_wishlists_post_engagement", "comment": null}, "mobile_conversion_add_to_wishlists_post_view": {"type": "integer", "index": 78, "name": "mobile_conversion_add_to_wishlists_post_view", "comment": null}, "mobile_conversion_add_to_wishlists_sale_amount": {"type": "integer", "index": 79, "name": "mobile_conversion_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_checkouts_initiated_assisted": {"type": "integer", "index": 80, "name": "mobile_conversion_checkouts_initiated_assisted", "comment": null}, "mobile_conversion_checkouts_initiated_order_quantity": {"type": "integer", "index": 81, "name": "mobile_conversion_checkouts_initiated_order_quantity", "comment": null}, "mobile_conversion_checkouts_initiated_post_engagement": {"type": "integer", "index": 82, "name": "mobile_conversion_checkouts_initiated_post_engagement", "comment": null}, "mobile_conversion_checkouts_initiated_post_view": {"type": "integer", "index": 83, "name": "mobile_conversion_checkouts_initiated_post_view", "comment": null}, "mobile_conversion_checkouts_initiated_sale_amount": {"type": "integer", "index": 84, "name": "mobile_conversion_checkouts_initiated_sale_amount", "comment": null}, "mobile_conversion_content_views_assisted": {"type": "integer", "index": 85, "name": "mobile_conversion_content_views_assisted", "comment": null}, "mobile_conversion_content_views_order_quantity": {"type": "integer", "index": 86, "name": "mobile_conversion_content_views_order_quantity", "comment": null}, "mobile_conversion_content_views_post_engagement": {"type": "integer", "index": 87, "name": "mobile_conversion_content_views_post_engagement", "comment": null}, "mobile_conversion_content_views_post_view": {"type": "integer", "index": 88, "name": "mobile_conversion_content_views_post_view", "comment": null}, "mobile_conversion_content_views_sale_amount": {"type": "integer", "index": 89, "name": "mobile_conversion_content_views_sale_amount", "comment": null}, "mobile_conversion_downloads_order_quantity": {"type": "integer", "index": 90, "name": "mobile_conversion_downloads_order_quantity", "comment": null}, "mobile_conversion_downloads_post_engagement": {"type": "integer", "index": 91, "name": "mobile_conversion_downloads_post_engagement", "comment": null}, "mobile_conversion_downloads_post_view": {"type": "integer", "index": 92, "name": "mobile_conversion_downloads_post_view", "comment": null}, "mobile_conversion_downloads_sale_amount": {"type": "integer", "index": 93, "name": "mobile_conversion_downloads_sale_amount", "comment": null}, "mobile_conversion_installs_assisted": {"type": "integer", "index": 94, "name": "mobile_conversion_installs_assisted", "comment": null}, "mobile_conversion_installs_order_quantity": {"type": "integer", "index": 95, "name": "mobile_conversion_installs_order_quantity", "comment": null}, "mobile_conversion_installs_post_engagement": {"type": "integer", "index": 96, "name": "mobile_conversion_installs_post_engagement", "comment": null}, "mobile_conversion_installs_post_view": {"type": "integer", "index": 97, "name": "mobile_conversion_installs_post_view", "comment": null}, "mobile_conversion_installs_sale_amount": {"type": "integer", "index": 98, "name": "mobile_conversion_installs_sale_amount", "comment": null}, "mobile_conversion_invites_assisted": {"type": "integer", "index": 99, "name": "mobile_conversion_invites_assisted", "comment": null}, "mobile_conversion_invites_order_quantity": {"type": "integer", "index": 100, "name": "mobile_conversion_invites_order_quantity", "comment": null}, "mobile_conversion_invites_post_engagement": {"type": "integer", "index": 101, "name": "mobile_conversion_invites_post_engagement", "comment": null}, "mobile_conversion_invites_post_view": {"type": "integer", "index": 102, "name": "mobile_conversion_invites_post_view", "comment": null}, "mobile_conversion_invites_sale_amount": {"type": "integer", "index": 103, "name": "mobile_conversion_invites_sale_amount", "comment": null}, "mobile_conversion_key_page_views_post_engagement": {"type": "integer", "index": 104, "name": "mobile_conversion_key_page_views_post_engagement", "comment": null}, "mobile_conversion_key_page_views_post_view": {"type": "integer", "index": 105, "name": "mobile_conversion_key_page_views_post_view", "comment": null}, "mobile_conversion_levels_achieved_assisted": {"type": "integer", "index": 106, "name": "mobile_conversion_levels_achieved_assisted", "comment": null}, "mobile_conversion_levels_achieved_order_quantity": {"type": "integer", "index": 107, "name": "mobile_conversion_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_levels_achieved_post_engagement": {"type": "integer", "index": 108, "name": "mobile_conversion_levels_achieved_post_engagement", "comment": null}, "mobile_conversion_levels_achieved_post_view": {"type": "integer", "index": 109, "name": "mobile_conversion_levels_achieved_post_view", "comment": null}, "mobile_conversion_levels_achieved_sale_amount": {"type": "integer", "index": 110, "name": "mobile_conversion_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_metric": {"type": "integer", "index": 111, "name": "mobile_conversion_lifetime_value_achievements_unlocked_metric", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_order_qu": {"type": "integer", "index": 112, "name": "mobile_conversion_lifetime_value_achievements_unlocked_order_qu", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo": {"type": "integer", "index": 113, "name": "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_metric": {"type": "integer", "index": 114, "name": "mobile_conversion_lifetime_value_add_to_carts_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_order_quantity": {"type": "integer", "index": 115, "name": "mobile_conversion_lifetime_value_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_sale_amount": {"type": "integer", "index": 116, "name": "mobile_conversion_lifetime_value_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_metric": {"type": "integer", "index": 117, "name": "mobile_conversion_lifetime_value_add_to_wishlists_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit": {"type": "integer", "index": 118, "name": "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount": {"type": "integer", "index": 119, "name": "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_metric": {"type": "integer", "index": 120, "name": "mobile_conversion_lifetime_value_checkouts_initiated_metric", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_order_quan": {"type": "integer", "index": 121, "name": "mobile_conversion_lifetime_value_checkouts_initiated_order_quan", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun": {"type": "integer", "index": 122, "name": "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_content_views_metric": {"type": "integer", "index": 123, "name": "mobile_conversion_lifetime_value_content_views_metric", "comment": null}, "mobile_conversion_lifetime_value_content_views_order_quantity": {"type": "integer", "index": 124, "name": "mobile_conversion_lifetime_value_content_views_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_content_views_sale_amount": {"type": "integer", "index": 125, "name": "mobile_conversion_lifetime_value_content_views_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_invites_metric": {"type": "integer", "index": 126, "name": "mobile_conversion_lifetime_value_invites_metric", "comment": null}, "mobile_conversion_lifetime_value_invites_order_quantity": {"type": "integer", "index": 127, "name": "mobile_conversion_lifetime_value_invites_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_invites_sale_amount": {"type": "integer", "index": 128, "name": "mobile_conversion_lifetime_value_invites_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_metric": {"type": "integer", "index": 129, "name": "mobile_conversion_lifetime_value_levels_achieved_metric", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_order_quantity": {"type": "integer", "index": 130, "name": "mobile_conversion_lifetime_value_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_sale_amount": {"type": "integer", "index": 131, "name": "mobile_conversion_lifetime_value_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_logins_metric": {"type": "integer", "index": 132, "name": "mobile_conversion_lifetime_value_logins_metric", "comment": null}, "mobile_conversion_lifetime_value_logins_order_quantity": {"type": "integer", "index": 133, "name": "mobile_conversion_lifetime_value_logins_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_logins_sale_amount": {"type": "integer", "index": 134, "name": "mobile_conversion_lifetime_value_logins_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_metric": {"type": "integer", "index": 135, "name": "mobile_conversion_lifetime_value_payment_info_additions_metric", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_order_q": {"type": "integer", "index": 136, "name": "mobile_conversion_lifetime_value_payment_info_additions_order_q", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_sale_am": {"type": "integer", "index": 137, "name": "mobile_conversion_lifetime_value_payment_info_additions_sale_am", "comment": null}, "mobile_conversion_lifetime_value_purchases_metric": {"type": "integer", "index": 138, "name": "mobile_conversion_lifetime_value_purchases_metric", "comment": null}, "mobile_conversion_lifetime_value_purchases_order_quantity": {"type": "integer", "index": 139, "name": "mobile_conversion_lifetime_value_purchases_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_purchases_sale_amount": {"type": "integer", "index": 140, "name": "mobile_conversion_lifetime_value_purchases_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_rates_metric": {"type": "integer", "index": 141, "name": "mobile_conversion_lifetime_value_rates_metric", "comment": null}, "mobile_conversion_lifetime_value_rates_order_quantity": {"type": "integer", "index": 142, "name": "mobile_conversion_lifetime_value_rates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_rates_sale_amount": {"type": "integer", "index": 143, "name": "mobile_conversion_lifetime_value_rates_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_reservations_metric": {"type": "integer", "index": 144, "name": "mobile_conversion_lifetime_value_reservations_metric", "comment": null}, "mobile_conversion_lifetime_value_reservations_order_quantity": {"type": "integer", "index": 145, "name": "mobile_conversion_lifetime_value_reservations_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_reservations_sale_amount": {"type": "integer", "index": 146, "name": "mobile_conversion_lifetime_value_reservations_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_searches_metric": {"type": "integer", "index": 147, "name": "mobile_conversion_lifetime_value_searches_metric", "comment": null}, "mobile_conversion_lifetime_value_searches_order_quantity": {"type": "integer", "index": 148, "name": "mobile_conversion_lifetime_value_searches_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_searches_sale_amount": {"type": "integer", "index": 149, "name": "mobile_conversion_lifetime_value_searches_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_shares_metric": {"type": "integer", "index": 150, "name": "mobile_conversion_lifetime_value_shares_metric", "comment": null}, "mobile_conversion_lifetime_value_shares_order_quantity": {"type": "integer", "index": 151, "name": "mobile_conversion_lifetime_value_shares_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_shares_sale_amount": {"type": "integer", "index": 152, "name": "mobile_conversion_lifetime_value_shares_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_metric": {"type": "integer", "index": 153, "name": "mobile_conversion_lifetime_value_sign_ups_metric", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_order_quantity": {"type": "integer", "index": 154, "name": "mobile_conversion_lifetime_value_sign_ups_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_sale_amount": {"type": "integer", "index": 155, "name": "mobile_conversion_lifetime_value_sign_ups_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_metric": {"type": "integer", "index": 156, "name": "mobile_conversion_lifetime_value_spent_credits_metric", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_order_quantity": {"type": "integer", "index": 157, "name": "mobile_conversion_lifetime_value_spent_credits_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_sale_amount": {"type": "integer", "index": 158, "name": "mobile_conversion_lifetime_value_spent_credits_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_metric": {"type": "integer", "index": 159, "name": "mobile_conversion_lifetime_value_tutorials_completed_metric", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_order_quan": {"type": "integer", "index": 160, "name": "mobile_conversion_lifetime_value_tutorials_completed_order_quan", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun": {"type": "integer", "index": 161, "name": "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_updates_metric": {"type": "integer", "index": 162, "name": "mobile_conversion_lifetime_value_updates_metric", "comment": null}, "mobile_conversion_lifetime_value_updates_order_quantity": {"type": "integer", "index": 163, "name": "mobile_conversion_lifetime_value_updates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_updates_sale_amount": {"type": "integer", "index": 164, "name": "mobile_conversion_lifetime_value_updates_sale_amount", "comment": null}, "mobile_conversion_logins_assisted": {"type": "integer", "index": 165, "name": "mobile_conversion_logins_assisted", "comment": null}, "mobile_conversion_logins_order_quantity": {"type": "integer", "index": 166, "name": "mobile_conversion_logins_order_quantity", "comment": null}, "mobile_conversion_logins_post_engagement": {"type": "integer", "index": 167, "name": "mobile_conversion_logins_post_engagement", "comment": null}, "mobile_conversion_logins_post_view": {"type": "integer", "index": 168, "name": "mobile_conversion_logins_post_view", "comment": null}, "mobile_conversion_logins_sale_amount": {"type": "integer", "index": 169, "name": "mobile_conversion_logins_sale_amount", "comment": null}, "mobile_conversion_payment_info_additions_assisted": {"type": "integer", "index": 170, "name": "mobile_conversion_payment_info_additions_assisted", "comment": null}, "mobile_conversion_payment_info_additions_order_quantity": {"type": "integer", "index": 171, "name": "mobile_conversion_payment_info_additions_order_quantity", "comment": null}, "mobile_conversion_payment_info_additions_post_engagement": {"type": "integer", "index": 172, "name": "mobile_conversion_payment_info_additions_post_engagement", "comment": null}, "mobile_conversion_payment_info_additions_post_view": {"type": "integer", "index": 173, "name": "mobile_conversion_payment_info_additions_post_view", "comment": null}, "mobile_conversion_payment_info_additions_sale_amount": {"type": "integer", "index": 174, "name": "mobile_conversion_payment_info_additions_sale_amount", "comment": null}, "mobile_conversion_purchases_assisted": {"type": "integer", "index": 175, "name": "mobile_conversion_purchases_assisted", "comment": null}, "mobile_conversion_purchases_order_quantity": {"type": "integer", "index": 176, "name": "mobile_conversion_purchases_order_quantity", "comment": null}, "mobile_conversion_purchases_post_engagement": {"type": "integer", "index": 177, "name": "mobile_conversion_purchases_post_engagement", "comment": null}, "mobile_conversion_purchases_post_view": {"type": "integer", "index": 178, "name": "mobile_conversion_purchases_post_view", "comment": null}, "mobile_conversion_purchases_sale_amount": {"type": "integer", "index": 179, "name": "mobile_conversion_purchases_sale_amount", "comment": null}, "mobile_conversion_rates_assisted": {"type": "integer", "index": 180, "name": "mobile_conversion_rates_assisted", "comment": null}, "mobile_conversion_rates_order_quantity": {"type": "integer", "index": 181, "name": "mobile_conversion_rates_order_quantity", "comment": null}, "mobile_conversion_rates_post_engagement": {"type": "integer", "index": 182, "name": "mobile_conversion_rates_post_engagement", "comment": null}, "mobile_conversion_rates_post_view": {"type": "integer", "index": 183, "name": "mobile_conversion_rates_post_view", "comment": null}, "mobile_conversion_rates_sale_amount": {"type": "integer", "index": 184, "name": "mobile_conversion_rates_sale_amount", "comment": null}, "mobile_conversion_re_engages_assisted": {"type": "integer", "index": 185, "name": "mobile_conversion_re_engages_assisted", "comment": null}, "mobile_conversion_re_engages_order_quantity": {"type": "integer", "index": 186, "name": "mobile_conversion_re_engages_order_quantity", "comment": null}, "mobile_conversion_re_engages_post_engagement": {"type": "integer", "index": 187, "name": "mobile_conversion_re_engages_post_engagement", "comment": null}, "mobile_conversion_re_engages_post_view": {"type": "integer", "index": 188, "name": "mobile_conversion_re_engages_post_view", "comment": null}, "mobile_conversion_re_engages_sale_amount": {"type": "integer", "index": 189, "name": "mobile_conversion_re_engages_sale_amount", "comment": null}, "mobile_conversion_reservations_assisted": {"type": "integer", "index": 190, "name": "mobile_conversion_reservations_assisted", "comment": null}, "mobile_conversion_reservations_order_quantity": {"type": "integer", "index": 191, "name": "mobile_conversion_reservations_order_quantity", "comment": null}, "mobile_conversion_reservations_post_engagement": {"type": "integer", "index": 192, "name": "mobile_conversion_reservations_post_engagement", "comment": null}, "mobile_conversion_reservations_post_view": {"type": "integer", "index": 193, "name": "mobile_conversion_reservations_post_view", "comment": null}, "mobile_conversion_reservations_sale_amount": {"type": "integer", "index": 194, "name": "mobile_conversion_reservations_sale_amount", "comment": null}, "mobile_conversion_searches_assisted": {"type": "integer", "index": 195, "name": "mobile_conversion_searches_assisted", "comment": null}, "mobile_conversion_searches_order_quantity": {"type": "integer", "index": 196, "name": "mobile_conversion_searches_order_quantity", "comment": null}, "mobile_conversion_searches_post_engagement": {"type": "integer", "index": 197, "name": "mobile_conversion_searches_post_engagement", "comment": null}, "mobile_conversion_searches_post_view": {"type": "integer", "index": 198, "name": "mobile_conversion_searches_post_view", "comment": null}, "mobile_conversion_searches_sale_amount": {"type": "integer", "index": 199, "name": "mobile_conversion_searches_sale_amount", "comment": null}, "mobile_conversion_shares_assisted": {"type": "integer", "index": 200, "name": "mobile_conversion_shares_assisted", "comment": null}, "mobile_conversion_shares_order_quantity": {"type": "integer", "index": 201, "name": "mobile_conversion_shares_order_quantity", "comment": null}, "mobile_conversion_shares_post_engagement": {"type": "integer", "index": 202, "name": "mobile_conversion_shares_post_engagement", "comment": null}, "mobile_conversion_shares_post_view": {"type": "integer", "index": 203, "name": "mobile_conversion_shares_post_view", "comment": null}, "mobile_conversion_shares_sale_amount": {"type": "integer", "index": 204, "name": "mobile_conversion_shares_sale_amount", "comment": null}, "mobile_conversion_sign_ups_assisted": {"type": "integer", "index": 205, "name": "mobile_conversion_sign_ups_assisted", "comment": null}, "mobile_conversion_sign_ups_order_quantity": {"type": "integer", "index": 206, "name": "mobile_conversion_sign_ups_order_quantity", "comment": null}, "mobile_conversion_sign_ups_post_engagement": {"type": "integer", "index": 207, "name": "mobile_conversion_sign_ups_post_engagement", "comment": null}, "mobile_conversion_sign_ups_post_view": {"type": "integer", "index": 208, "name": "mobile_conversion_sign_ups_post_view", "comment": null}, "mobile_conversion_sign_ups_sale_amount": {"type": "integer", "index": 209, "name": "mobile_conversion_sign_ups_sale_amount", "comment": null}, "mobile_conversion_site_visits_order_quantity": {"type": "integer", "index": 210, "name": "mobile_conversion_site_visits_order_quantity", "comment": null}, "mobile_conversion_site_visits_post_engagement": {"type": "integer", "index": 211, "name": "mobile_conversion_site_visits_post_engagement", "comment": null}, "mobile_conversion_site_visits_post_view": {"type": "integer", "index": 212, "name": "mobile_conversion_site_visits_post_view", "comment": null}, "mobile_conversion_site_visits_sale_amount": {"type": "integer", "index": 213, "name": "mobile_conversion_site_visits_sale_amount", "comment": null}, "mobile_conversion_spent_credits_assisted": {"type": "integer", "index": 214, "name": "mobile_conversion_spent_credits_assisted", "comment": null}, "mobile_conversion_spent_credits_order_quantity": {"type": "integer", "index": 215, "name": "mobile_conversion_spent_credits_order_quantity", "comment": null}, "mobile_conversion_spent_credits_post_engagement": {"type": "integer", "index": 216, "name": "mobile_conversion_spent_credits_post_engagement", "comment": null}, "mobile_conversion_spent_credits_post_view": {"type": "integer", "index": 217, "name": "mobile_conversion_spent_credits_post_view", "comment": null}, "mobile_conversion_spent_credits_sale_amount": {"type": "integer", "index": 218, "name": "mobile_conversion_spent_credits_sale_amount", "comment": null}, "mobile_conversion_tutorials_completed_assisted": {"type": "integer", "index": 219, "name": "mobile_conversion_tutorials_completed_assisted", "comment": null}, "mobile_conversion_tutorials_completed_order_quantity": {"type": "integer", "index": 220, "name": "mobile_conversion_tutorials_completed_order_quantity", "comment": null}, "mobile_conversion_tutorials_completed_post_engagement": {"type": "integer", "index": 221, "name": "mobile_conversion_tutorials_completed_post_engagement", "comment": null}, "mobile_conversion_tutorials_completed_post_view": {"type": "integer", "index": 222, "name": "mobile_conversion_tutorials_completed_post_view", "comment": null}, "mobile_conversion_tutorials_completed_sale_amount": {"type": "integer", "index": 223, "name": "mobile_conversion_tutorials_completed_sale_amount", "comment": null}, "mobile_conversion_updates_assisted": {"type": "integer", "index": 224, "name": "mobile_conversion_updates_assisted", "comment": null}, "mobile_conversion_updates_order_quantity": {"type": "integer", "index": 225, "name": "mobile_conversion_updates_order_quantity", "comment": null}, "mobile_conversion_updates_post_engagement": {"type": "integer", "index": 226, "name": "mobile_conversion_updates_post_engagement", "comment": null}, "mobile_conversion_updates_post_view": {"type": "integer", "index": 227, "name": "mobile_conversion_updates_post_view", "comment": null}, "mobile_conversion_updates_sale_amount": {"type": "integer", "index": 228, "name": "mobile_conversion_updates_sale_amount", "comment": null}, "poll_card_vote": {"type": "integer", "index": 229, "name": "poll_card_vote", "comment": null}, "qualified_impressions": {"type": "integer", "index": 230, "name": "qualified_impressions", "comment": null}, "replies": {"type": "integer", "index": 231, "name": "replies", "comment": null}, "retweets": {"type": "integer", "index": 232, "name": "retweets", "comment": null}, "tweets_send": {"type": "integer", "index": 233, "name": "tweets_send", "comment": null}, "unfollows": {"type": "integer", "index": 234, "name": "unfollows", "comment": null}, "url_clicks": {"type": "integer", "index": 235, "name": "url_clicks", "comment": null}, "video_3_s_100_pct_views": {"type": "integer", "index": 236, "name": "video_3_s_100_pct_views", "comment": null}, "video_6_s_views": {"type": "integer", "index": 237, "name": "video_6_s_views", "comment": null}, "video_content_starts": {"type": "integer", "index": 238, "name": "video_content_starts", "comment": null}, "video_cta_clicks": {"type": "integer", "index": 239, "name": "video_cta_clicks", "comment": null}, "video_mrc_views": {"type": "integer", "index": 240, "name": "video_mrc_views", "comment": null}, "video_total_views": {"type": "integer", "index": 241, "name": "video_total_views", "comment": null}, "video_views_100": {"type": "integer", "index": 242, "name": "video_views_100", "comment": null}, "video_views_25": {"type": "integer", "index": 243, "name": "video_views_25", "comment": null}, "video_views_50": {"type": "integer", "index": 244, "name": "video_views_50", "comment": null}, "video_views_75": {"type": "integer", "index": 245, "name": "video_views_75", "comment": null}, "mobile_conversion_installs_skan_post_engagement": {"type": "integer", "index": 246, "name": "mobile_conversion_installs_skan_post_engagement", "comment": null}, "mobile_conversion_installs_skan_post_view": {"type": "integer", "index": 247, "name": "mobile_conversion_installs_skan_post_view", "comment": null}, "mobile_conversion_purchases_skan_post_engagement": {"type": "integer", "index": 248, "name": "mobile_conversion_purchases_skan_post_engagement", "comment": null}, "mobile_conversion_purchases_skan_post_view": {"type": "integer", "index": 249, "name": "mobile_conversion_purchases_skan_post_view", "comment": null}, "video_15_s_views": {"type": "integer", "index": 250, "name": "video_15_s_views", "comment": null}, "auto_created_conversion_landing_page_view": {"type": "integer", "index": 251, "name": "auto_created_conversion_landing_page_view", "comment": null}, "auto_created_conversion_session": {"type": "integer", "index": 252, "name": "auto_created_conversion_session", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_report_tmp"}, "model.twitter_ads.stg_twitter_ads__line_item_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__line_item_history", "database": "postgres", "comment": "Each record represents a version of each line item. The versions can be differentiated by the updated_at timestamp.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "advertiser_domain": {"type": "text", "index": 2, "name": "advertiser_domain", "comment": "The website domain for this advertiser, without the protocol specification."}, "advertiser_user_id": {"type": "integer", "index": 3, "name": "advertiser_user_id", "comment": "The Twitter user identifier for the handle promoting the ad."}, "automatically_select_bid": {"type": "boolean", "index": 4, "name": "automatically_select_bid", "comment": "Whether automatically optimize bidding is enabled based on daily budget and campaign flight dates."}, "bid_amount_local_micro": {"type": "integer", "index": 5, "name": "bid_amount_local_micro", "comment": "The bid amount to be associated with this line item, in micros."}, "bid_type": {"type": "text", "index": 6, "name": "bid_type", "comment": "The bidding mechanism."}, "bid_unit": {"type": "text", "index": 7, "name": "bid_unit", "comment": "The bid unit for this line item."}, "campaign_id": {"type": "text", "index": 8, "name": "campaign_id", "comment": "The ID of the related campaign."}, "charge_by": {"type": "text", "index": 9, "name": "charge_by", "comment": "The unit to charge this line item by."}, "created_timestamp": {"type": "text", "index": 10, "name": "created_timestamp", "comment": "The timestamp the account was created."}, "creative_source": {"type": "text", "index": 11, "name": "creative_source", "comment": "The source of the creatives for the line item."}, "currency": {"type": "text", "index": 12, "name": "currency", "comment": "The currency in which metrics will be reported."}, "is_deleted": {"type": "boolean", "index": 13, "name": "is_deleted", "comment": "Whether the record has been deleted or not."}, "end_timestamp": {"type": "integer", "index": 14, "name": "end_timestamp", "comment": "The timestamp at which the line item will stop being served."}, "entity_status": {"type": "text", "index": 15, "name": "entity_status", "comment": "The status of the line item."}, "line_item_id": {"type": "text", "index": 16, "name": "line_item_id", "comment": "The ID of the line item."}, "name": {"type": "text", "index": 17, "name": "name", "comment": "The name of the line item."}, "objective": {"type": "text", "index": 18, "name": "objective", "comment": "The campaign objective for this line item."}, "optimization": {"type": "text", "index": 19, "name": "optimization", "comment": "The optimization setting to use with this line item."}, "primary_web_event_tag": {"type": "integer", "index": 20, "name": "primary_web_event_tag", "comment": "The identifier of the primary web event tag. Allows more accurate tracking of engagements for the campaign pertaining to this line item."}, "product_type": {"type": "text", "index": 21, "name": "product_type", "comment": "The type of promoted product that this line item will contain."}, "start_timestamp": {"type": "integer", "index": 22, "name": "start_timestamp", "comment": "The timestamp at which the line item will start being served."}, "target_cpa_local_micro": {"type": "integer", "index": 23, "name": "target_cpa_local_micro", "comment": "The target cost per acquisition for the line item, in micros."}, "total_budget_amount_local_micro": {"type": "integer", "index": 24, "name": "total_budget_amount_local_micro", "comment": "The total budget amount to be allocated to the line item, in micros."}, "updated_timestamp": {"type": "text", "index": 25, "name": "updated_timestamp", "comment": "The timestamp the account was last updated."}, "bid_amount": {"type": "numeric", "index": 26, "name": "bid_amount", "comment": "The bid amount to be associated with this line item."}, "total_budget_amount": {"type": "numeric", "index": 27, "name": "total_budget_amount", "comment": "The total budget amount to be allocated to the campaign."}, "target_cpa": {"type": "numeric", "index": 28, "name": "target_cpa", "comment": "The target cost per acquisition for the line item."}, "is_latest_version": {"type": "boolean", "index": 29, "name": "is_latest_version", "comment": "Whether the record is the most latest version for the line item."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__line_item_history"}, "model.twitter_ads.stg_twitter_ads__line_item_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__line_item_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"advertiser_domain": {"type": "text", "index": 1, "name": "advertiser_domain", "comment": null}, "advertiser_user_id": {"type": "integer", "index": 2, "name": "advertiser_user_id", "comment": null}, "automatically_select_bid": {"type": "boolean", "index": 3, "name": "automatically_select_bid", "comment": null}, "bid_amount_local_micro": {"type": "integer", "index": 4, "name": "bid_amount_local_micro", "comment": null}, "bid_type": {"type": "text", "index": 5, "name": "bid_type", "comment": null}, "bid_unit": {"type": "text", "index": 6, "name": "bid_unit", "comment": null}, "campaign_id": {"type": "text", "index": 7, "name": "campaign_id", "comment": null}, "charge_by": {"type": "text", "index": 8, "name": "charge_by", "comment": null}, "created_at": {"type": "text", "index": 9, "name": "created_at", "comment": null}, "creative_source": {"type": "text", "index": 10, "name": "creative_source", "comment": null}, "currency": {"type": "text", "index": 11, "name": "currency", "comment": null}, "deleted": {"type": "boolean", "index": 12, "name": "deleted", "comment": null}, "end_time": {"type": "integer", "index": 13, "name": "end_time", "comment": null}, "entity_status": {"type": "text", "index": 14, "name": "entity_status", "comment": null}, "id": {"type": "text", "index": 15, "name": "id", "comment": null}, "name": {"type": "text", "index": 16, "name": "name", "comment": null}, "objective": {"type": "text", "index": 17, "name": "objective", "comment": null}, "optimization": {"type": "text", "index": 18, "name": "optimization", "comment": null}, "primary_web_event_tag": {"type": "integer", "index": 19, "name": "primary_web_event_tag", "comment": null}, "product_type": {"type": "text", "index": 20, "name": "product_type", "comment": null}, "start_time": {"type": "integer", "index": 21, "name": "start_time", "comment": null}, "target_cpa_local_micro": {"type": "integer", "index": 22, "name": "target_cpa_local_micro", "comment": null}, "total_budget_amount_local_micro": {"type": "integer", "index": 23, "name": "total_budget_amount_local_micro", "comment": null}, "updated_at": {"type": "text", "index": 24, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__line_item_history_tmp"}, "model.twitter_ads.stg_twitter_ads__line_item_keywords_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__line_item_keywords_report", "database": "postgres", "comment": "Each record represents the performance of a line item (ad group) and keyword combination on a given day, for its placement in Twitter.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "keyword_id": {"type": "text", "index": 3, "name": "keyword_id", "comment": "Unique key of the table built from the combination of 'account_id', 'line_item_id','segment', and 'placement' fields."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID of the related account."}, "line_item_id": {"type": "text", "index": 5, "name": "line_item_id", "comment": "The ID of the line item."}, "keyword": {"type": "text", "index": 6, "name": "keyword", "comment": "The keyword whose performance is being tracked."}, "placement": {"type": "text", "index": 7, "name": "placement", "comment": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`."}, "clicks": {"type": "integer", "index": 8, "name": "clicks", "comment": "The clicks for the line item + keyword on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes."}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": "The impressions for the line item + keyword on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results."}, "spend_micro": {"type": "integer", "index": 10, "name": "spend_micro", "comment": "The spend for the line item + keyword on that day, in micros and in whichever currency was selected during account creation."}, "spend": {"type": "numeric", "index": 11, "name": "spend", "comment": "The spend for the line item + keyword on that day in whichever currency was selected during account creation."}, "url_clicks": {"type": "integer", "index": 12, "name": "url_clicks", "comment": "The url clicks for the line item + keyword on that day."}, "conversion_purchases_metric": {"type": "bigint", "index": 13, "name": "conversion_purchases_metric", "comment": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_custom_metric": {"type": "bigint", "index": 14, "name": "conversion_custom_metric", "comment": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_purchases_sale_amount": {"type": "double precision", "index": 15, "name": "conversion_purchases_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}, "conversion_custom_sale_amount": {"type": "double precision", "index": 16, "name": "conversion_custom_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__line_item_keywords_report"}, "model.twitter_ads.stg_twitter_ads__line_item_keywords_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__line_item_keywords_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "text", "index": 1, "name": "account_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "line_item_id": {"type": "text", "index": 3, "name": "line_item_id", "comment": null}, "placement": {"type": "text", "index": 4, "name": "placement", "comment": null}, "segment": {"type": "text", "index": 5, "name": "segment", "comment": null}, "_fivetran_synced": {"type": "text", "index": 6, "name": "_fivetran_synced", "comment": null}, "app_clicks": {"type": "integer", "index": 7, "name": "app_clicks", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 8, "name": "billed_charge_local_micro", "comment": null}, "billed_engagements": {"type": "integer", "index": 9, "name": "billed_engagements", "comment": null}, "card_engagements": {"type": "integer", "index": 10, "name": "card_engagements", "comment": null}, "carousel_swipes": {"type": "integer", "index": 11, "name": "carousel_swipes", "comment": null}, "clicks": {"type": "integer", "index": 12, "name": "clicks", "comment": null}, "conversion_custom_metric": {"type": "integer", "index": 13, "name": "conversion_custom_metric", "comment": null}, "conversion_custom_order_quantity": {"type": "integer", "index": 14, "name": "conversion_custom_order_quantity", "comment": null}, "conversion_custom_order_quantity_engagement": {"type": "integer", "index": 15, "name": "conversion_custom_order_quantity_engagement", "comment": null}, "conversion_custom_order_quantity_view": {"type": "integer", "index": 16, "name": "conversion_custom_order_quantity_view", "comment": null}, "conversion_custom_post_engagement": {"type": "integer", "index": 17, "name": "conversion_custom_post_engagement", "comment": null}, "conversion_custom_post_view": {"type": "integer", "index": 18, "name": "conversion_custom_post_view", "comment": null}, "conversion_custom_sale_amount": {"type": "integer", "index": 19, "name": "conversion_custom_sale_amount", "comment": null}, "conversion_custom_sale_amount_engagement": {"type": "integer", "index": 20, "name": "conversion_custom_sale_amount_engagement", "comment": null}, "conversion_custom_sale_amount_view": {"type": "integer", "index": 21, "name": "conversion_custom_sale_amount_view", "comment": null}, "conversion_downloads_metric": {"type": "integer", "index": 22, "name": "conversion_downloads_metric", "comment": null}, "conversion_downloads_order_quantity": {"type": "integer", "index": 23, "name": "conversion_downloads_order_quantity", "comment": null}, "conversion_downloads_order_quantity_engagement": {"type": "integer", "index": 24, "name": "conversion_downloads_order_quantity_engagement", "comment": null}, "conversion_downloads_order_quantity_view": {"type": "integer", "index": 25, "name": "conversion_downloads_order_quantity_view", "comment": null}, "conversion_downloads_post_engagement": {"type": "integer", "index": 26, "name": "conversion_downloads_post_engagement", "comment": null}, "conversion_downloads_post_view": {"type": "integer", "index": 27, "name": "conversion_downloads_post_view", "comment": null}, "conversion_downloads_sale_amount": {"type": "integer", "index": 28, "name": "conversion_downloads_sale_amount", "comment": null}, "conversion_downloads_sale_amount_engagement": {"type": "integer", "index": 29, "name": "conversion_downloads_sale_amount_engagement", "comment": null}, "conversion_downloads_sale_amount_view": {"type": "integer", "index": 30, "name": "conversion_downloads_sale_amount_view", "comment": null}, "conversion_purchases_assisted": {"type": "integer", "index": 31, "name": "conversion_purchases_assisted", "comment": null}, "conversion_purchases_metric": {"type": "integer", "index": 32, "name": "conversion_purchases_metric", "comment": null}, "conversion_purchases_order_quantity": {"type": "integer", "index": 33, "name": "conversion_purchases_order_quantity", "comment": null}, "conversion_purchases_order_quantity_engagement": {"type": "integer", "index": 34, "name": "conversion_purchases_order_quantity_engagement", "comment": null}, "conversion_purchases_order_quantity_view": {"type": "integer", "index": 35, "name": "conversion_purchases_order_quantity_view", "comment": null}, "conversion_purchases_post_engagement": {"type": "integer", "index": 36, "name": "conversion_purchases_post_engagement", "comment": null}, "conversion_purchases_post_view": {"type": "integer", "index": 37, "name": "conversion_purchases_post_view", "comment": null}, "conversion_purchases_sale_amount": {"type": "integer", "index": 38, "name": "conversion_purchases_sale_amount", "comment": null}, "conversion_purchases_sale_amount_engagement": {"type": "integer", "index": 39, "name": "conversion_purchases_sale_amount_engagement", "comment": null}, "conversion_purchases_sale_amount_view": {"type": "integer", "index": 40, "name": "conversion_purchases_sale_amount_view", "comment": null}, "conversion_sign_ups_assisted": {"type": "integer", "index": 41, "name": "conversion_sign_ups_assisted", "comment": null}, "conversion_sign_ups_metric": {"type": "integer", "index": 42, "name": "conversion_sign_ups_metric", "comment": null}, "conversion_sign_ups_order_quantity": {"type": "integer", "index": 43, "name": "conversion_sign_ups_order_quantity", "comment": null}, "conversion_sign_ups_order_quantity_engagement": {"type": "integer", "index": 44, "name": "conversion_sign_ups_order_quantity_engagement", "comment": null}, "conversion_sign_ups_order_quantity_view": {"type": "integer", "index": 45, "name": "conversion_sign_ups_order_quantity_view", "comment": null}, "conversion_sign_ups_post_engagement": {"type": "integer", "index": 46, "name": "conversion_sign_ups_post_engagement", "comment": null}, "conversion_sign_ups_post_view": {"type": "integer", "index": 47, "name": "conversion_sign_ups_post_view", "comment": null}, "conversion_sign_ups_sale_amount": {"type": "integer", "index": 48, "name": "conversion_sign_ups_sale_amount", "comment": null}, "conversion_sign_ups_sale_amount_engagement": {"type": "integer", "index": 49, "name": "conversion_sign_ups_sale_amount_engagement", "comment": null}, "conversion_sign_ups_sale_amount_view": {"type": "integer", "index": 50, "name": "conversion_sign_ups_sale_amount_view", "comment": null}, "conversion_site_visits_metric": {"type": "integer", "index": 51, "name": "conversion_site_visits_metric", "comment": null}, "conversion_site_visits_order_quantity": {"type": "integer", "index": 52, "name": "conversion_site_visits_order_quantity", "comment": null}, "conversion_site_visits_order_quantity_engagement": {"type": "integer", "index": 53, "name": "conversion_site_visits_order_quantity_engagement", "comment": null}, "conversion_site_visits_order_quantity_view": {"type": "integer", "index": 54, "name": "conversion_site_visits_order_quantity_view", "comment": null}, "conversion_site_visits_post_engagement": {"type": "integer", "index": 55, "name": "conversion_site_visits_post_engagement", "comment": null}, "conversion_site_visits_post_view": {"type": "integer", "index": 56, "name": "conversion_site_visits_post_view", "comment": null}, "conversion_site_visits_sale_amount": {"type": "integer", "index": 57, "name": "conversion_site_visits_sale_amount", "comment": null}, "conversion_site_visits_sale_amount_engagement": {"type": "integer", "index": 58, "name": "conversion_site_visits_sale_amount_engagement", "comment": null}, "conversion_site_visits_sale_amount_view": {"type": "integer", "index": 59, "name": "conversion_site_visits_sale_amount_view", "comment": null}, "engagements": {"type": "integer", "index": 60, "name": "engagements", "comment": null}, "follows": {"type": "integer", "index": 61, "name": "follows", "comment": null}, "impressions": {"type": "integer", "index": 62, "name": "impressions", "comment": null}, "likes": {"type": "integer", "index": 63, "name": "likes", "comment": null}, "media_engagements": {"type": "integer", "index": 64, "name": "media_engagements", "comment": null}, "media_views": {"type": "integer", "index": 65, "name": "media_views", "comment": null}, "mobile_conversion_achievements_unlocked_assisted": {"type": "integer", "index": 66, "name": "mobile_conversion_achievements_unlocked_assisted", "comment": null}, "mobile_conversion_achievements_unlocked_order_quantity": {"type": "integer", "index": 67, "name": "mobile_conversion_achievements_unlocked_order_quantity", "comment": null}, "mobile_conversion_achievements_unlocked_post_engagement": {"type": "integer", "index": 68, "name": "mobile_conversion_achievements_unlocked_post_engagement", "comment": null}, "mobile_conversion_achievements_unlocked_post_view": {"type": "integer", "index": 69, "name": "mobile_conversion_achievements_unlocked_post_view", "comment": null}, "mobile_conversion_achievements_unlocked_sale_amount": {"type": "integer", "index": 70, "name": "mobile_conversion_achievements_unlocked_sale_amount", "comment": null}, "mobile_conversion_add_to_carts_assisted": {"type": "integer", "index": 71, "name": "mobile_conversion_add_to_carts_assisted", "comment": null}, "mobile_conversion_add_to_carts_order_quantity": {"type": "integer", "index": 72, "name": "mobile_conversion_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_add_to_carts_post_engagement": {"type": "integer", "index": 73, "name": "mobile_conversion_add_to_carts_post_engagement", "comment": null}, "mobile_conversion_add_to_carts_post_view": {"type": "integer", "index": 74, "name": "mobile_conversion_add_to_carts_post_view", "comment": null}, "mobile_conversion_add_to_carts_sale_amount": {"type": "integer", "index": 75, "name": "mobile_conversion_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_add_to_wishlists_assisted": {"type": "integer", "index": 76, "name": "mobile_conversion_add_to_wishlists_assisted", "comment": null}, "mobile_conversion_add_to_wishlists_order_quantity": {"type": "integer", "index": 77, "name": "mobile_conversion_add_to_wishlists_order_quantity", "comment": null}, "mobile_conversion_add_to_wishlists_post_engagement": {"type": "integer", "index": 78, "name": "mobile_conversion_add_to_wishlists_post_engagement", "comment": null}, "mobile_conversion_add_to_wishlists_post_view": {"type": "integer", "index": 79, "name": "mobile_conversion_add_to_wishlists_post_view", "comment": null}, "mobile_conversion_add_to_wishlists_sale_amount": {"type": "integer", "index": 80, "name": "mobile_conversion_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_checkouts_initiated_assisted": {"type": "integer", "index": 81, "name": "mobile_conversion_checkouts_initiated_assisted", "comment": null}, "mobile_conversion_checkouts_initiated_order_quantity": {"type": "integer", "index": 82, "name": "mobile_conversion_checkouts_initiated_order_quantity", "comment": null}, "mobile_conversion_checkouts_initiated_post_engagement": {"type": "integer", "index": 83, "name": "mobile_conversion_checkouts_initiated_post_engagement", "comment": null}, "mobile_conversion_checkouts_initiated_post_view": {"type": "integer", "index": 84, "name": "mobile_conversion_checkouts_initiated_post_view", "comment": null}, "mobile_conversion_checkouts_initiated_sale_amount": {"type": "integer", "index": 85, "name": "mobile_conversion_checkouts_initiated_sale_amount", "comment": null}, "mobile_conversion_content_views_assisted": {"type": "integer", "index": 86, "name": "mobile_conversion_content_views_assisted", "comment": null}, "mobile_conversion_content_views_order_quantity": {"type": "integer", "index": 87, "name": "mobile_conversion_content_views_order_quantity", "comment": null}, "mobile_conversion_content_views_post_engagement": {"type": "integer", "index": 88, "name": "mobile_conversion_content_views_post_engagement", "comment": null}, "mobile_conversion_content_views_post_view": {"type": "integer", "index": 89, "name": "mobile_conversion_content_views_post_view", "comment": null}, "mobile_conversion_content_views_sale_amount": {"type": "integer", "index": 90, "name": "mobile_conversion_content_views_sale_amount", "comment": null}, "mobile_conversion_downloads_order_quantity": {"type": "integer", "index": 91, "name": "mobile_conversion_downloads_order_quantity", "comment": null}, "mobile_conversion_downloads_post_engagement": {"type": "integer", "index": 92, "name": "mobile_conversion_downloads_post_engagement", "comment": null}, "mobile_conversion_downloads_post_view": {"type": "integer", "index": 93, "name": "mobile_conversion_downloads_post_view", "comment": null}, "mobile_conversion_downloads_sale_amount": {"type": "integer", "index": 94, "name": "mobile_conversion_downloads_sale_amount", "comment": null}, "mobile_conversion_installs_assisted": {"type": "integer", "index": 95, "name": "mobile_conversion_installs_assisted", "comment": null}, "mobile_conversion_installs_order_quantity": {"type": "integer", "index": 96, "name": "mobile_conversion_installs_order_quantity", "comment": null}, "mobile_conversion_installs_post_engagement": {"type": "integer", "index": 97, "name": "mobile_conversion_installs_post_engagement", "comment": null}, "mobile_conversion_installs_post_view": {"type": "integer", "index": 98, "name": "mobile_conversion_installs_post_view", "comment": null}, "mobile_conversion_installs_sale_amount": {"type": "integer", "index": 99, "name": "mobile_conversion_installs_sale_amount", "comment": null}, "mobile_conversion_installs_skan_post_engagement": {"type": "integer", "index": 100, "name": "mobile_conversion_installs_skan_post_engagement", "comment": null}, "mobile_conversion_installs_skan_post_view": {"type": "integer", "index": 101, "name": "mobile_conversion_installs_skan_post_view", "comment": null}, "mobile_conversion_invites_assisted": {"type": "integer", "index": 102, "name": "mobile_conversion_invites_assisted", "comment": null}, "mobile_conversion_invites_order_quantity": {"type": "integer", "index": 103, "name": "mobile_conversion_invites_order_quantity", "comment": null}, "mobile_conversion_invites_post_engagement": {"type": "integer", "index": 104, "name": "mobile_conversion_invites_post_engagement", "comment": null}, "mobile_conversion_invites_post_view": {"type": "integer", "index": 105, "name": "mobile_conversion_invites_post_view", "comment": null}, "mobile_conversion_invites_sale_amount": {"type": "integer", "index": 106, "name": "mobile_conversion_invites_sale_amount", "comment": null}, "mobile_conversion_key_page_views_post_engagement": {"type": "integer", "index": 107, "name": "mobile_conversion_key_page_views_post_engagement", "comment": null}, "mobile_conversion_key_page_views_post_view": {"type": "integer", "index": 108, "name": "mobile_conversion_key_page_views_post_view", "comment": null}, "mobile_conversion_levels_achieved_assisted": {"type": "integer", "index": 109, "name": "mobile_conversion_levels_achieved_assisted", "comment": null}, "mobile_conversion_levels_achieved_order_quantity": {"type": "integer", "index": 110, "name": "mobile_conversion_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_levels_achieved_post_engagement": {"type": "integer", "index": 111, "name": "mobile_conversion_levels_achieved_post_engagement", "comment": null}, "mobile_conversion_levels_achieved_post_view": {"type": "integer", "index": 112, "name": "mobile_conversion_levels_achieved_post_view", "comment": null}, "mobile_conversion_levels_achieved_sale_amount": {"type": "integer", "index": 113, "name": "mobile_conversion_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_metric": {"type": "integer", "index": 114, "name": "mobile_conversion_lifetime_value_achievements_unlocked_metric", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_order_qu": {"type": "integer", "index": 115, "name": "mobile_conversion_lifetime_value_achievements_unlocked_order_qu", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo": {"type": "integer", "index": 116, "name": "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_metric": {"type": "integer", "index": 117, "name": "mobile_conversion_lifetime_value_add_to_carts_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_order_quantity": {"type": "integer", "index": 118, "name": "mobile_conversion_lifetime_value_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_sale_amount": {"type": "integer", "index": 119, "name": "mobile_conversion_lifetime_value_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_metric": {"type": "integer", "index": 120, "name": "mobile_conversion_lifetime_value_add_to_wishlists_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit": {"type": "integer", "index": 121, "name": "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount": {"type": "integer", "index": 122, "name": "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_metric": {"type": "integer", "index": 123, "name": "mobile_conversion_lifetime_value_checkouts_initiated_metric", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_order_quan": {"type": "integer", "index": 124, "name": "mobile_conversion_lifetime_value_checkouts_initiated_order_quan", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun": {"type": "integer", "index": 125, "name": "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_content_views_metric": {"type": "integer", "index": 126, "name": "mobile_conversion_lifetime_value_content_views_metric", "comment": null}, "mobile_conversion_lifetime_value_content_views_order_quantity": {"type": "integer", "index": 127, "name": "mobile_conversion_lifetime_value_content_views_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_content_views_sale_amount": {"type": "integer", "index": 128, "name": "mobile_conversion_lifetime_value_content_views_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_invites_metric": {"type": "integer", "index": 129, "name": "mobile_conversion_lifetime_value_invites_metric", "comment": null}, "mobile_conversion_lifetime_value_invites_order_quantity": {"type": "integer", "index": 130, "name": "mobile_conversion_lifetime_value_invites_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_invites_sale_amount": {"type": "integer", "index": 131, "name": "mobile_conversion_lifetime_value_invites_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_metric": {"type": "integer", "index": 132, "name": "mobile_conversion_lifetime_value_levels_achieved_metric", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_order_quantity": {"type": "integer", "index": 133, "name": "mobile_conversion_lifetime_value_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_sale_amount": {"type": "integer", "index": 134, "name": "mobile_conversion_lifetime_value_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_logins_metric": {"type": "integer", "index": 135, "name": "mobile_conversion_lifetime_value_logins_metric", "comment": null}, "mobile_conversion_lifetime_value_logins_order_quantity": {"type": "integer", "index": 136, "name": "mobile_conversion_lifetime_value_logins_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_logins_sale_amount": {"type": "integer", "index": 137, "name": "mobile_conversion_lifetime_value_logins_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_metric": {"type": "integer", "index": 138, "name": "mobile_conversion_lifetime_value_payment_info_additions_metric", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_order_q": {"type": "integer", "index": 139, "name": "mobile_conversion_lifetime_value_payment_info_additions_order_q", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_sale_am": {"type": "integer", "index": 140, "name": "mobile_conversion_lifetime_value_payment_info_additions_sale_am", "comment": null}, "mobile_conversion_lifetime_value_purchases_metric": {"type": "integer", "index": 141, "name": "mobile_conversion_lifetime_value_purchases_metric", "comment": null}, "mobile_conversion_lifetime_value_purchases_order_quantity": {"type": "integer", "index": 142, "name": "mobile_conversion_lifetime_value_purchases_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_purchases_sale_amount": {"type": "integer", "index": 143, "name": "mobile_conversion_lifetime_value_purchases_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_rates_metric": {"type": "integer", "index": 144, "name": "mobile_conversion_lifetime_value_rates_metric", "comment": null}, "mobile_conversion_lifetime_value_rates_order_quantity": {"type": "integer", "index": 145, "name": "mobile_conversion_lifetime_value_rates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_rates_sale_amount": {"type": "integer", "index": 146, "name": "mobile_conversion_lifetime_value_rates_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_reservations_metric": {"type": "integer", "index": 147, "name": "mobile_conversion_lifetime_value_reservations_metric", "comment": null}, "mobile_conversion_lifetime_value_reservations_order_quantity": {"type": "integer", "index": 148, "name": "mobile_conversion_lifetime_value_reservations_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_reservations_sale_amount": {"type": "integer", "index": 149, "name": "mobile_conversion_lifetime_value_reservations_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_searches_metric": {"type": "integer", "index": 150, "name": "mobile_conversion_lifetime_value_searches_metric", "comment": null}, "mobile_conversion_lifetime_value_searches_order_quantity": {"type": "integer", "index": 151, "name": "mobile_conversion_lifetime_value_searches_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_searches_sale_amount": {"type": "integer", "index": 152, "name": "mobile_conversion_lifetime_value_searches_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_shares_metric": {"type": "integer", "index": 153, "name": "mobile_conversion_lifetime_value_shares_metric", "comment": null}, "mobile_conversion_lifetime_value_shares_order_quantity": {"type": "integer", "index": 154, "name": "mobile_conversion_lifetime_value_shares_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_shares_sale_amount": {"type": "integer", "index": 155, "name": "mobile_conversion_lifetime_value_shares_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_metric": {"type": "integer", "index": 156, "name": "mobile_conversion_lifetime_value_sign_ups_metric", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_order_quantity": {"type": "integer", "index": 157, "name": "mobile_conversion_lifetime_value_sign_ups_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_sale_amount": {"type": "integer", "index": 158, "name": "mobile_conversion_lifetime_value_sign_ups_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_metric": {"type": "integer", "index": 159, "name": "mobile_conversion_lifetime_value_spent_credits_metric", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_order_quantity": {"type": "integer", "index": 160, "name": "mobile_conversion_lifetime_value_spent_credits_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_sale_amount": {"type": "integer", "index": 161, "name": "mobile_conversion_lifetime_value_spent_credits_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_metric": {"type": "integer", "index": 162, "name": "mobile_conversion_lifetime_value_tutorials_completed_metric", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_order_quan": {"type": "integer", "index": 163, "name": "mobile_conversion_lifetime_value_tutorials_completed_order_quan", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun": {"type": "integer", "index": 164, "name": "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_updates_metric": {"type": "integer", "index": 165, "name": "mobile_conversion_lifetime_value_updates_metric", "comment": null}, "mobile_conversion_lifetime_value_updates_order_quantity": {"type": "integer", "index": 166, "name": "mobile_conversion_lifetime_value_updates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_updates_sale_amount": {"type": "integer", "index": 167, "name": "mobile_conversion_lifetime_value_updates_sale_amount", "comment": null}, "mobile_conversion_logins_assisted": {"type": "integer", "index": 168, "name": "mobile_conversion_logins_assisted", "comment": null}, "mobile_conversion_logins_order_quantity": {"type": "integer", "index": 169, "name": "mobile_conversion_logins_order_quantity", "comment": null}, "mobile_conversion_logins_post_engagement": {"type": "integer", "index": 170, "name": "mobile_conversion_logins_post_engagement", "comment": null}, "mobile_conversion_logins_post_view": {"type": "integer", "index": 171, "name": "mobile_conversion_logins_post_view", "comment": null}, "mobile_conversion_logins_sale_amount": {"type": "integer", "index": 172, "name": "mobile_conversion_logins_sale_amount", "comment": null}, "mobile_conversion_payment_info_additions_assisted": {"type": "integer", "index": 173, "name": "mobile_conversion_payment_info_additions_assisted", "comment": null}, "mobile_conversion_payment_info_additions_order_quantity": {"type": "integer", "index": 174, "name": "mobile_conversion_payment_info_additions_order_quantity", "comment": null}, "mobile_conversion_payment_info_additions_post_engagement": {"type": "integer", "index": 175, "name": "mobile_conversion_payment_info_additions_post_engagement", "comment": null}, "mobile_conversion_payment_info_additions_post_view": {"type": "integer", "index": 176, "name": "mobile_conversion_payment_info_additions_post_view", "comment": null}, "mobile_conversion_payment_info_additions_sale_amount": {"type": "integer", "index": 177, "name": "mobile_conversion_payment_info_additions_sale_amount", "comment": null}, "mobile_conversion_purchases_assisted": {"type": "integer", "index": 178, "name": "mobile_conversion_purchases_assisted", "comment": null}, "mobile_conversion_purchases_order_quantity": {"type": "integer", "index": 179, "name": "mobile_conversion_purchases_order_quantity", "comment": null}, "mobile_conversion_purchases_post_engagement": {"type": "integer", "index": 180, "name": "mobile_conversion_purchases_post_engagement", "comment": null}, "mobile_conversion_purchases_post_view": {"type": "integer", "index": 181, "name": "mobile_conversion_purchases_post_view", "comment": null}, "mobile_conversion_purchases_sale_amount": {"type": "integer", "index": 182, "name": "mobile_conversion_purchases_sale_amount", "comment": null}, "mobile_conversion_purchases_skan_post_engagement": {"type": "integer", "index": 183, "name": "mobile_conversion_purchases_skan_post_engagement", "comment": null}, "mobile_conversion_purchases_skan_post_view": {"type": "integer", "index": 184, "name": "mobile_conversion_purchases_skan_post_view", "comment": null}, "mobile_conversion_rates_assisted": {"type": "integer", "index": 185, "name": "mobile_conversion_rates_assisted", "comment": null}, "mobile_conversion_rates_order_quantity": {"type": "integer", "index": 186, "name": "mobile_conversion_rates_order_quantity", "comment": null}, "mobile_conversion_rates_post_engagement": {"type": "integer", "index": 187, "name": "mobile_conversion_rates_post_engagement", "comment": null}, "mobile_conversion_rates_post_view": {"type": "integer", "index": 188, "name": "mobile_conversion_rates_post_view", "comment": null}, "mobile_conversion_rates_sale_amount": {"type": "integer", "index": 189, "name": "mobile_conversion_rates_sale_amount", "comment": null}, "mobile_conversion_re_engages_assisted": {"type": "integer", "index": 190, "name": "mobile_conversion_re_engages_assisted", "comment": null}, "mobile_conversion_re_engages_order_quantity": {"type": "integer", "index": 191, "name": "mobile_conversion_re_engages_order_quantity", "comment": null}, "mobile_conversion_re_engages_post_engagement": {"type": "integer", "index": 192, "name": "mobile_conversion_re_engages_post_engagement", "comment": null}, "mobile_conversion_re_engages_post_view": {"type": "integer", "index": 193, "name": "mobile_conversion_re_engages_post_view", "comment": null}, "mobile_conversion_re_engages_sale_amount": {"type": "integer", "index": 194, "name": "mobile_conversion_re_engages_sale_amount", "comment": null}, "mobile_conversion_reservations_assisted": {"type": "integer", "index": 195, "name": "mobile_conversion_reservations_assisted", "comment": null}, "mobile_conversion_reservations_order_quantity": {"type": "integer", "index": 196, "name": "mobile_conversion_reservations_order_quantity", "comment": null}, "mobile_conversion_reservations_post_engagement": {"type": "integer", "index": 197, "name": "mobile_conversion_reservations_post_engagement", "comment": null}, "mobile_conversion_reservations_post_view": {"type": "integer", "index": 198, "name": "mobile_conversion_reservations_post_view", "comment": null}, "mobile_conversion_reservations_sale_amount": {"type": "integer", "index": 199, "name": "mobile_conversion_reservations_sale_amount", "comment": null}, "mobile_conversion_searches_assisted": {"type": "integer", "index": 200, "name": "mobile_conversion_searches_assisted", "comment": null}, "mobile_conversion_searches_order_quantity": {"type": "integer", "index": 201, "name": "mobile_conversion_searches_order_quantity", "comment": null}, "mobile_conversion_searches_post_engagement": {"type": "integer", "index": 202, "name": "mobile_conversion_searches_post_engagement", "comment": null}, "mobile_conversion_searches_post_view": {"type": "integer", "index": 203, "name": "mobile_conversion_searches_post_view", "comment": null}, "mobile_conversion_searches_sale_amount": {"type": "integer", "index": 204, "name": "mobile_conversion_searches_sale_amount", "comment": null}, "mobile_conversion_shares_assisted": {"type": "integer", "index": 205, "name": "mobile_conversion_shares_assisted", "comment": null}, "mobile_conversion_shares_order_quantity": {"type": "integer", "index": 206, "name": "mobile_conversion_shares_order_quantity", "comment": null}, "mobile_conversion_shares_post_engagement": {"type": "integer", "index": 207, "name": "mobile_conversion_shares_post_engagement", "comment": null}, "mobile_conversion_shares_post_view": {"type": "integer", "index": 208, "name": "mobile_conversion_shares_post_view", "comment": null}, "mobile_conversion_shares_sale_amount": {"type": "integer", "index": 209, "name": "mobile_conversion_shares_sale_amount", "comment": null}, "mobile_conversion_sign_ups_assisted": {"type": "integer", "index": 210, "name": "mobile_conversion_sign_ups_assisted", "comment": null}, "mobile_conversion_sign_ups_order_quantity": {"type": "integer", "index": 211, "name": "mobile_conversion_sign_ups_order_quantity", "comment": null}, "mobile_conversion_sign_ups_post_engagement": {"type": "integer", "index": 212, "name": "mobile_conversion_sign_ups_post_engagement", "comment": null}, "mobile_conversion_sign_ups_post_view": {"type": "integer", "index": 213, "name": "mobile_conversion_sign_ups_post_view", "comment": null}, "mobile_conversion_sign_ups_sale_amount": {"type": "integer", "index": 214, "name": "mobile_conversion_sign_ups_sale_amount", "comment": null}, "mobile_conversion_site_visits_order_quantity": {"type": "integer", "index": 215, "name": "mobile_conversion_site_visits_order_quantity", "comment": null}, "mobile_conversion_site_visits_post_engagement": {"type": "integer", "index": 216, "name": "mobile_conversion_site_visits_post_engagement", "comment": null}, "mobile_conversion_site_visits_post_view": {"type": "integer", "index": 217, "name": "mobile_conversion_site_visits_post_view", "comment": null}, "mobile_conversion_site_visits_sale_amount": {"type": "integer", "index": 218, "name": "mobile_conversion_site_visits_sale_amount", "comment": null}, "mobile_conversion_spent_credits_assisted": {"type": "integer", "index": 219, "name": "mobile_conversion_spent_credits_assisted", "comment": null}, "mobile_conversion_spent_credits_order_quantity": {"type": "integer", "index": 220, "name": "mobile_conversion_spent_credits_order_quantity", "comment": null}, "mobile_conversion_spent_credits_post_engagement": {"type": "integer", "index": 221, "name": "mobile_conversion_spent_credits_post_engagement", "comment": null}, "mobile_conversion_spent_credits_post_view": {"type": "integer", "index": 222, "name": "mobile_conversion_spent_credits_post_view", "comment": null}, "mobile_conversion_spent_credits_sale_amount": {"type": "integer", "index": 223, "name": "mobile_conversion_spent_credits_sale_amount", "comment": null}, "mobile_conversion_tutorials_completed_assisted": {"type": "integer", "index": 224, "name": "mobile_conversion_tutorials_completed_assisted", "comment": null}, "mobile_conversion_tutorials_completed_order_quantity": {"type": "integer", "index": 225, "name": "mobile_conversion_tutorials_completed_order_quantity", "comment": null}, "mobile_conversion_tutorials_completed_post_engagement": {"type": "integer", "index": 226, "name": "mobile_conversion_tutorials_completed_post_engagement", "comment": null}, "mobile_conversion_tutorials_completed_post_view": {"type": "integer", "index": 227, "name": "mobile_conversion_tutorials_completed_post_view", "comment": null}, "mobile_conversion_tutorials_completed_sale_amount": {"type": "integer", "index": 228, "name": "mobile_conversion_tutorials_completed_sale_amount", "comment": null}, "mobile_conversion_updates_assisted": {"type": "integer", "index": 229, "name": "mobile_conversion_updates_assisted", "comment": null}, "mobile_conversion_updates_order_quantity": {"type": "integer", "index": 230, "name": "mobile_conversion_updates_order_quantity", "comment": null}, "mobile_conversion_updates_post_engagement": {"type": "integer", "index": 231, "name": "mobile_conversion_updates_post_engagement", "comment": null}, "mobile_conversion_updates_post_view": {"type": "integer", "index": 232, "name": "mobile_conversion_updates_post_view", "comment": null}, "mobile_conversion_updates_sale_amount": {"type": "integer", "index": 233, "name": "mobile_conversion_updates_sale_amount", "comment": null}, "poll_card_vote": {"type": "integer", "index": 234, "name": "poll_card_vote", "comment": null}, "qualified_impressions": {"type": "integer", "index": 235, "name": "qualified_impressions", "comment": null}, "replies": {"type": "integer", "index": 236, "name": "replies", "comment": null}, "retweets": {"type": "integer", "index": 237, "name": "retweets", "comment": null}, "tweets_send": {"type": "integer", "index": 238, "name": "tweets_send", "comment": null}, "unfollows": {"type": "integer", "index": 239, "name": "unfollows", "comment": null}, "url_clicks": {"type": "integer", "index": 240, "name": "url_clicks", "comment": null}, "video_15_s_views": {"type": "integer", "index": 241, "name": "video_15_s_views", "comment": null}, "video_3_s_100_pct_views": {"type": "integer", "index": 242, "name": "video_3_s_100_pct_views", "comment": null}, "video_6_s_views": {"type": "integer", "index": 243, "name": "video_6_s_views", "comment": null}, "video_content_starts": {"type": "integer", "index": 244, "name": "video_content_starts", "comment": null}, "video_cta_clicks": {"type": "integer", "index": 245, "name": "video_cta_clicks", "comment": null}, "video_total_views": {"type": "integer", "index": 246, "name": "video_total_views", "comment": null}, "video_views_100": {"type": "integer", "index": 247, "name": "video_views_100", "comment": null}, "video_views_25": {"type": "integer", "index": 248, "name": "video_views_25", "comment": null}, "video_views_50": {"type": "integer", "index": 249, "name": "video_views_50", "comment": null}, "video_views_75": {"type": "integer", "index": 250, "name": "video_views_75", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__line_item_keywords_report_tmp"}, "model.twitter_ads.stg_twitter_ads__line_item_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__line_item_report", "database": "postgres", "comment": "Each record represents the performance of a line item (ad group) on a given day, for its placement in Twitter.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": "The ID of the related account."}, "line_item_id": {"type": "text", "index": 4, "name": "line_item_id", "comment": "The ID of the line item."}, "placement": {"type": "text", "index": 5, "name": "placement", "comment": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`."}, "clicks": {"type": "integer", "index": 6, "name": "clicks", "comment": "The clicks for the line item on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes."}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": "The impressions for the line item on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results."}, "spend_micro": {"type": "integer", "index": 8, "name": "spend_micro", "comment": "The spend for the line item on that day, in micros and in whichever currency was selected during account creation."}, "spend": {"type": "numeric", "index": 9, "name": "spend", "comment": "The spend for the line item on that day in whichever currency was selected during account creation."}, "url_clicks": {"type": "integer", "index": 10, "name": "url_clicks", "comment": "The url clicks for the line item on that day."}, "conversion_purchases_metric": {"type": "bigint", "index": 11, "name": "conversion_purchases_metric", "comment": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_custom_metric": {"type": "bigint", "index": 12, "name": "conversion_custom_metric", "comment": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_purchases_sale_amount": {"type": "double precision", "index": 13, "name": "conversion_purchases_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}, "conversion_custom_sale_amount": {"type": "double precision", "index": 14, "name": "conversion_custom_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__line_item_report"}, "model.twitter_ads.stg_twitter_ads__line_item_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__line_item_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "text", "index": 1, "name": "account_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "line_item_id": {"type": "text", "index": 3, "name": "line_item_id", "comment": null}, "placement": {"type": "text", "index": 4, "name": "placement", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "app_clicks": {"type": "integer", "index": 6, "name": "app_clicks", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 7, "name": "billed_charge_local_micro", "comment": null}, "billed_engagements": {"type": "integer", "index": 8, "name": "billed_engagements", "comment": null}, "card_engagements": {"type": "integer", "index": 9, "name": "card_engagements", "comment": null}, "carousel_swipes": {"type": "integer", "index": 10, "name": "carousel_swipes", "comment": null}, "clicks": {"type": "integer", "index": 11, "name": "clicks", "comment": null}, "conversion_custom_metric": {"type": "integer", "index": 12, "name": "conversion_custom_metric", "comment": null}, "conversion_custom_order_quantity": {"type": "integer", "index": 13, "name": "conversion_custom_order_quantity", "comment": null}, "conversion_custom_order_quantity_engagement": {"type": "integer", "index": 14, "name": "conversion_custom_order_quantity_engagement", "comment": null}, "conversion_custom_order_quantity_view": {"type": "integer", "index": 15, "name": "conversion_custom_order_quantity_view", "comment": null}, "conversion_custom_post_engagement": {"type": "integer", "index": 16, "name": "conversion_custom_post_engagement", "comment": null}, "conversion_custom_post_view": {"type": "integer", "index": 17, "name": "conversion_custom_post_view", "comment": null}, "conversion_custom_sale_amount": {"type": "integer", "index": 18, "name": "conversion_custom_sale_amount", "comment": null}, "conversion_custom_sale_amount_engagement": {"type": "integer", "index": 19, "name": "conversion_custom_sale_amount_engagement", "comment": null}, "conversion_custom_sale_amount_view": {"type": "integer", "index": 20, "name": "conversion_custom_sale_amount_view", "comment": null}, "conversion_downloads_metric": {"type": "integer", "index": 21, "name": "conversion_downloads_metric", "comment": null}, "conversion_downloads_order_quantity": {"type": "integer", "index": 22, "name": "conversion_downloads_order_quantity", "comment": null}, "conversion_downloads_order_quantity_engagement": {"type": "integer", "index": 23, "name": "conversion_downloads_order_quantity_engagement", "comment": null}, "conversion_downloads_order_quantity_view": {"type": "integer", "index": 24, "name": "conversion_downloads_order_quantity_view", "comment": null}, "conversion_downloads_post_engagement": {"type": "integer", "index": 25, "name": "conversion_downloads_post_engagement", "comment": null}, "conversion_downloads_post_view": {"type": "integer", "index": 26, "name": "conversion_downloads_post_view", "comment": null}, "conversion_downloads_sale_amount": {"type": "integer", "index": 27, "name": "conversion_downloads_sale_amount", "comment": null}, "conversion_downloads_sale_amount_engagement": {"type": "integer", "index": 28, "name": "conversion_downloads_sale_amount_engagement", "comment": null}, "conversion_downloads_sale_amount_view": {"type": "integer", "index": 29, "name": "conversion_downloads_sale_amount_view", "comment": null}, "conversion_purchases_assisted": {"type": "integer", "index": 30, "name": "conversion_purchases_assisted", "comment": null}, "conversion_purchases_metric": {"type": "integer", "index": 31, "name": "conversion_purchases_metric", "comment": null}, "conversion_purchases_order_quantity": {"type": "integer", "index": 32, "name": "conversion_purchases_order_quantity", "comment": null}, "conversion_purchases_order_quantity_engagement": {"type": "integer", "index": 33, "name": "conversion_purchases_order_quantity_engagement", "comment": null}, "conversion_purchases_order_quantity_view": {"type": "integer", "index": 34, "name": "conversion_purchases_order_quantity_view", "comment": null}, "conversion_purchases_post_engagement": {"type": "integer", "index": 35, "name": "conversion_purchases_post_engagement", "comment": null}, "conversion_purchases_post_view": {"type": "integer", "index": 36, "name": "conversion_purchases_post_view", "comment": null}, "conversion_purchases_sale_amount": {"type": "integer", "index": 37, "name": "conversion_purchases_sale_amount", "comment": null}, "conversion_purchases_sale_amount_engagement": {"type": "integer", "index": 38, "name": "conversion_purchases_sale_amount_engagement", "comment": null}, "conversion_purchases_sale_amount_view": {"type": "integer", "index": 39, "name": "conversion_purchases_sale_amount_view", "comment": null}, "conversion_sign_ups_assisted": {"type": "integer", "index": 40, "name": "conversion_sign_ups_assisted", "comment": null}, "conversion_sign_ups_metric": {"type": "integer", "index": 41, "name": "conversion_sign_ups_metric", "comment": null}, "conversion_sign_ups_order_quantity": {"type": "integer", "index": 42, "name": "conversion_sign_ups_order_quantity", "comment": null}, "conversion_sign_ups_order_quantity_engagement": {"type": "integer", "index": 43, "name": "conversion_sign_ups_order_quantity_engagement", "comment": null}, "conversion_sign_ups_order_quantity_view": {"type": "integer", "index": 44, "name": "conversion_sign_ups_order_quantity_view", "comment": null}, "conversion_sign_ups_post_engagement": {"type": "integer", "index": 45, "name": "conversion_sign_ups_post_engagement", "comment": null}, "conversion_sign_ups_post_view": {"type": "integer", "index": 46, "name": "conversion_sign_ups_post_view", "comment": null}, "conversion_sign_ups_sale_amount": {"type": "integer", "index": 47, "name": "conversion_sign_ups_sale_amount", "comment": null}, "conversion_sign_ups_sale_amount_engagement": {"type": "integer", "index": 48, "name": "conversion_sign_ups_sale_amount_engagement", "comment": null}, "conversion_sign_ups_sale_amount_view": {"type": "integer", "index": 49, "name": "conversion_sign_ups_sale_amount_view", "comment": null}, "conversion_site_visits_metric": {"type": "integer", "index": 50, "name": "conversion_site_visits_metric", "comment": null}, "conversion_site_visits_order_quantity": {"type": "integer", "index": 51, "name": "conversion_site_visits_order_quantity", "comment": null}, "conversion_site_visits_order_quantity_engagement": {"type": "integer", "index": 52, "name": "conversion_site_visits_order_quantity_engagement", "comment": null}, "conversion_site_visits_order_quantity_view": {"type": "integer", "index": 53, "name": "conversion_site_visits_order_quantity_view", "comment": null}, "conversion_site_visits_post_engagement": {"type": "integer", "index": 54, "name": "conversion_site_visits_post_engagement", "comment": null}, "conversion_site_visits_post_view": {"type": "integer", "index": 55, "name": "conversion_site_visits_post_view", "comment": null}, "conversion_site_visits_sale_amount": {"type": "integer", "index": 56, "name": "conversion_site_visits_sale_amount", "comment": null}, "conversion_site_visits_sale_amount_engagement": {"type": "integer", "index": 57, "name": "conversion_site_visits_sale_amount_engagement", "comment": null}, "conversion_site_visits_sale_amount_view": {"type": "integer", "index": 58, "name": "conversion_site_visits_sale_amount_view", "comment": null}, "engagements": {"type": "integer", "index": 59, "name": "engagements", "comment": null}, "follows": {"type": "integer", "index": 60, "name": "follows", "comment": null}, "impressions": {"type": "integer", "index": 61, "name": "impressions", "comment": null}, "likes": {"type": "integer", "index": 62, "name": "likes", "comment": null}, "media_engagements": {"type": "integer", "index": 63, "name": "media_engagements", "comment": null}, "media_views": {"type": "integer", "index": 64, "name": "media_views", "comment": null}, "mobile_conversion_achievements_unlocked_assisted": {"type": "integer", "index": 65, "name": "mobile_conversion_achievements_unlocked_assisted", "comment": null}, "mobile_conversion_achievements_unlocked_order_quantity": {"type": "integer", "index": 66, "name": "mobile_conversion_achievements_unlocked_order_quantity", "comment": null}, "mobile_conversion_achievements_unlocked_post_engagement": {"type": "integer", "index": 67, "name": "mobile_conversion_achievements_unlocked_post_engagement", "comment": null}, "mobile_conversion_achievements_unlocked_post_view": {"type": "integer", "index": 68, "name": "mobile_conversion_achievements_unlocked_post_view", "comment": null}, "mobile_conversion_achievements_unlocked_sale_amount": {"type": "integer", "index": 69, "name": "mobile_conversion_achievements_unlocked_sale_amount", "comment": null}, "mobile_conversion_add_to_carts_assisted": {"type": "integer", "index": 70, "name": "mobile_conversion_add_to_carts_assisted", "comment": null}, "mobile_conversion_add_to_carts_order_quantity": {"type": "integer", "index": 71, "name": "mobile_conversion_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_add_to_carts_post_engagement": {"type": "integer", "index": 72, "name": "mobile_conversion_add_to_carts_post_engagement", "comment": null}, "mobile_conversion_add_to_carts_post_view": {"type": "integer", "index": 73, "name": "mobile_conversion_add_to_carts_post_view", "comment": null}, "mobile_conversion_add_to_carts_sale_amount": {"type": "integer", "index": 74, "name": "mobile_conversion_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_add_to_wishlists_assisted": {"type": "integer", "index": 75, "name": "mobile_conversion_add_to_wishlists_assisted", "comment": null}, "mobile_conversion_add_to_wishlists_order_quantity": {"type": "integer", "index": 76, "name": "mobile_conversion_add_to_wishlists_order_quantity", "comment": null}, "mobile_conversion_add_to_wishlists_post_engagement": {"type": "integer", "index": 77, "name": "mobile_conversion_add_to_wishlists_post_engagement", "comment": null}, "mobile_conversion_add_to_wishlists_post_view": {"type": "integer", "index": 78, "name": "mobile_conversion_add_to_wishlists_post_view", "comment": null}, "mobile_conversion_add_to_wishlists_sale_amount": {"type": "integer", "index": 79, "name": "mobile_conversion_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_checkouts_initiated_assisted": {"type": "integer", "index": 80, "name": "mobile_conversion_checkouts_initiated_assisted", "comment": null}, "mobile_conversion_checkouts_initiated_order_quantity": {"type": "integer", "index": 81, "name": "mobile_conversion_checkouts_initiated_order_quantity", "comment": null}, "mobile_conversion_checkouts_initiated_post_engagement": {"type": "integer", "index": 82, "name": "mobile_conversion_checkouts_initiated_post_engagement", "comment": null}, "mobile_conversion_checkouts_initiated_post_view": {"type": "integer", "index": 83, "name": "mobile_conversion_checkouts_initiated_post_view", "comment": null}, "mobile_conversion_checkouts_initiated_sale_amount": {"type": "integer", "index": 84, "name": "mobile_conversion_checkouts_initiated_sale_amount", "comment": null}, "mobile_conversion_content_views_assisted": {"type": "integer", "index": 85, "name": "mobile_conversion_content_views_assisted", "comment": null}, "mobile_conversion_content_views_order_quantity": {"type": "integer", "index": 86, "name": "mobile_conversion_content_views_order_quantity", "comment": null}, "mobile_conversion_content_views_post_engagement": {"type": "integer", "index": 87, "name": "mobile_conversion_content_views_post_engagement", "comment": null}, "mobile_conversion_content_views_post_view": {"type": "integer", "index": 88, "name": "mobile_conversion_content_views_post_view", "comment": null}, "mobile_conversion_content_views_sale_amount": {"type": "integer", "index": 89, "name": "mobile_conversion_content_views_sale_amount", "comment": null}, "mobile_conversion_downloads_order_quantity": {"type": "integer", "index": 90, "name": "mobile_conversion_downloads_order_quantity", "comment": null}, "mobile_conversion_downloads_post_engagement": {"type": "integer", "index": 91, "name": "mobile_conversion_downloads_post_engagement", "comment": null}, "mobile_conversion_downloads_post_view": {"type": "integer", "index": 92, "name": "mobile_conversion_downloads_post_view", "comment": null}, "mobile_conversion_downloads_sale_amount": {"type": "integer", "index": 93, "name": "mobile_conversion_downloads_sale_amount", "comment": null}, "mobile_conversion_installs_assisted": {"type": "integer", "index": 94, "name": "mobile_conversion_installs_assisted", "comment": null}, "mobile_conversion_installs_order_quantity": {"type": "integer", "index": 95, "name": "mobile_conversion_installs_order_quantity", "comment": null}, "mobile_conversion_installs_post_engagement": {"type": "integer", "index": 96, "name": "mobile_conversion_installs_post_engagement", "comment": null}, "mobile_conversion_installs_post_view": {"type": "integer", "index": 97, "name": "mobile_conversion_installs_post_view", "comment": null}, "mobile_conversion_installs_sale_amount": {"type": "integer", "index": 98, "name": "mobile_conversion_installs_sale_amount", "comment": null}, "mobile_conversion_invites_assisted": {"type": "integer", "index": 99, "name": "mobile_conversion_invites_assisted", "comment": null}, "mobile_conversion_invites_order_quantity": {"type": "integer", "index": 100, "name": "mobile_conversion_invites_order_quantity", "comment": null}, "mobile_conversion_invites_post_engagement": {"type": "integer", "index": 101, "name": "mobile_conversion_invites_post_engagement", "comment": null}, "mobile_conversion_invites_post_view": {"type": "integer", "index": 102, "name": "mobile_conversion_invites_post_view", "comment": null}, "mobile_conversion_invites_sale_amount": {"type": "integer", "index": 103, "name": "mobile_conversion_invites_sale_amount", "comment": null}, "mobile_conversion_key_page_views_post_engagement": {"type": "integer", "index": 104, "name": "mobile_conversion_key_page_views_post_engagement", "comment": null}, "mobile_conversion_key_page_views_post_view": {"type": "integer", "index": 105, "name": "mobile_conversion_key_page_views_post_view", "comment": null}, "mobile_conversion_levels_achieved_assisted": {"type": "integer", "index": 106, "name": "mobile_conversion_levels_achieved_assisted", "comment": null}, "mobile_conversion_levels_achieved_order_quantity": {"type": "integer", "index": 107, "name": "mobile_conversion_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_levels_achieved_post_engagement": {"type": "integer", "index": 108, "name": "mobile_conversion_levels_achieved_post_engagement", "comment": null}, "mobile_conversion_levels_achieved_post_view": {"type": "integer", "index": 109, "name": "mobile_conversion_levels_achieved_post_view", "comment": null}, "mobile_conversion_levels_achieved_sale_amount": {"type": "integer", "index": 110, "name": "mobile_conversion_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_metric": {"type": "integer", "index": 111, "name": "mobile_conversion_lifetime_value_achievements_unlocked_metric", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_order_qu": {"type": "integer", "index": 112, "name": "mobile_conversion_lifetime_value_achievements_unlocked_order_qu", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo": {"type": "integer", "index": 113, "name": "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_metric": {"type": "integer", "index": 114, "name": "mobile_conversion_lifetime_value_add_to_carts_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_order_quantity": {"type": "integer", "index": 115, "name": "mobile_conversion_lifetime_value_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_sale_amount": {"type": "integer", "index": 116, "name": "mobile_conversion_lifetime_value_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_metric": {"type": "integer", "index": 117, "name": "mobile_conversion_lifetime_value_add_to_wishlists_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit": {"type": "integer", "index": 118, "name": "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount": {"type": "integer", "index": 119, "name": "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_metric": {"type": "integer", "index": 120, "name": "mobile_conversion_lifetime_value_checkouts_initiated_metric", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_order_quan": {"type": "integer", "index": 121, "name": "mobile_conversion_lifetime_value_checkouts_initiated_order_quan", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun": {"type": "integer", "index": 122, "name": "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_content_views_metric": {"type": "integer", "index": 123, "name": "mobile_conversion_lifetime_value_content_views_metric", "comment": null}, "mobile_conversion_lifetime_value_content_views_order_quantity": {"type": "integer", "index": 124, "name": "mobile_conversion_lifetime_value_content_views_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_content_views_sale_amount": {"type": "integer", "index": 125, "name": "mobile_conversion_lifetime_value_content_views_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_invites_metric": {"type": "integer", "index": 126, "name": "mobile_conversion_lifetime_value_invites_metric", "comment": null}, "mobile_conversion_lifetime_value_invites_order_quantity": {"type": "integer", "index": 127, "name": "mobile_conversion_lifetime_value_invites_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_invites_sale_amount": {"type": "integer", "index": 128, "name": "mobile_conversion_lifetime_value_invites_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_metric": {"type": "integer", "index": 129, "name": "mobile_conversion_lifetime_value_levels_achieved_metric", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_order_quantity": {"type": "integer", "index": 130, "name": "mobile_conversion_lifetime_value_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_sale_amount": {"type": "integer", "index": 131, "name": "mobile_conversion_lifetime_value_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_logins_metric": {"type": "integer", "index": 132, "name": "mobile_conversion_lifetime_value_logins_metric", "comment": null}, "mobile_conversion_lifetime_value_logins_order_quantity": {"type": "integer", "index": 133, "name": "mobile_conversion_lifetime_value_logins_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_logins_sale_amount": {"type": "integer", "index": 134, "name": "mobile_conversion_lifetime_value_logins_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_metric": {"type": "integer", "index": 135, "name": "mobile_conversion_lifetime_value_payment_info_additions_metric", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_order_q": {"type": "integer", "index": 136, "name": "mobile_conversion_lifetime_value_payment_info_additions_order_q", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_sale_am": {"type": "integer", "index": 137, "name": "mobile_conversion_lifetime_value_payment_info_additions_sale_am", "comment": null}, "mobile_conversion_lifetime_value_purchases_metric": {"type": "integer", "index": 138, "name": "mobile_conversion_lifetime_value_purchases_metric", "comment": null}, "mobile_conversion_lifetime_value_purchases_order_quantity": {"type": "integer", "index": 139, "name": "mobile_conversion_lifetime_value_purchases_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_purchases_sale_amount": {"type": "integer", "index": 140, "name": "mobile_conversion_lifetime_value_purchases_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_rates_metric": {"type": "integer", "index": 141, "name": "mobile_conversion_lifetime_value_rates_metric", "comment": null}, "mobile_conversion_lifetime_value_rates_order_quantity": {"type": "integer", "index": 142, "name": "mobile_conversion_lifetime_value_rates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_rates_sale_amount": {"type": "integer", "index": 143, "name": "mobile_conversion_lifetime_value_rates_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_reservations_metric": {"type": "integer", "index": 144, "name": "mobile_conversion_lifetime_value_reservations_metric", "comment": null}, "mobile_conversion_lifetime_value_reservations_order_quantity": {"type": "integer", "index": 145, "name": "mobile_conversion_lifetime_value_reservations_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_reservations_sale_amount": {"type": "integer", "index": 146, "name": "mobile_conversion_lifetime_value_reservations_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_searches_metric": {"type": "integer", "index": 147, "name": "mobile_conversion_lifetime_value_searches_metric", "comment": null}, "mobile_conversion_lifetime_value_searches_order_quantity": {"type": "integer", "index": 148, "name": "mobile_conversion_lifetime_value_searches_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_searches_sale_amount": {"type": "integer", "index": 149, "name": "mobile_conversion_lifetime_value_searches_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_shares_metric": {"type": "integer", "index": 150, "name": "mobile_conversion_lifetime_value_shares_metric", "comment": null}, "mobile_conversion_lifetime_value_shares_order_quantity": {"type": "integer", "index": 151, "name": "mobile_conversion_lifetime_value_shares_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_shares_sale_amount": {"type": "integer", "index": 152, "name": "mobile_conversion_lifetime_value_shares_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_metric": {"type": "integer", "index": 153, "name": "mobile_conversion_lifetime_value_sign_ups_metric", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_order_quantity": {"type": "integer", "index": 154, "name": "mobile_conversion_lifetime_value_sign_ups_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_sale_amount": {"type": "integer", "index": 155, "name": "mobile_conversion_lifetime_value_sign_ups_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_metric": {"type": "integer", "index": 156, "name": "mobile_conversion_lifetime_value_spent_credits_metric", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_order_quantity": {"type": "integer", "index": 157, "name": "mobile_conversion_lifetime_value_spent_credits_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_sale_amount": {"type": "integer", "index": 158, "name": "mobile_conversion_lifetime_value_spent_credits_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_metric": {"type": "integer", "index": 159, "name": "mobile_conversion_lifetime_value_tutorials_completed_metric", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_order_quan": {"type": "integer", "index": 160, "name": "mobile_conversion_lifetime_value_tutorials_completed_order_quan", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun": {"type": "integer", "index": 161, "name": "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_updates_metric": {"type": "integer", "index": 162, "name": "mobile_conversion_lifetime_value_updates_metric", "comment": null}, "mobile_conversion_lifetime_value_updates_order_quantity": {"type": "integer", "index": 163, "name": "mobile_conversion_lifetime_value_updates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_updates_sale_amount": {"type": "integer", "index": 164, "name": "mobile_conversion_lifetime_value_updates_sale_amount", "comment": null}, "mobile_conversion_logins_assisted": {"type": "integer", "index": 165, "name": "mobile_conversion_logins_assisted", "comment": null}, "mobile_conversion_logins_order_quantity": {"type": "integer", "index": 166, "name": "mobile_conversion_logins_order_quantity", "comment": null}, "mobile_conversion_logins_post_engagement": {"type": "integer", "index": 167, "name": "mobile_conversion_logins_post_engagement", "comment": null}, "mobile_conversion_logins_post_view": {"type": "integer", "index": 168, "name": "mobile_conversion_logins_post_view", "comment": null}, "mobile_conversion_logins_sale_amount": {"type": "integer", "index": 169, "name": "mobile_conversion_logins_sale_amount", "comment": null}, "mobile_conversion_payment_info_additions_assisted": {"type": "integer", "index": 170, "name": "mobile_conversion_payment_info_additions_assisted", "comment": null}, "mobile_conversion_payment_info_additions_order_quantity": {"type": "integer", "index": 171, "name": "mobile_conversion_payment_info_additions_order_quantity", "comment": null}, "mobile_conversion_payment_info_additions_post_engagement": {"type": "integer", "index": 172, "name": "mobile_conversion_payment_info_additions_post_engagement", "comment": null}, "mobile_conversion_payment_info_additions_post_view": {"type": "integer", "index": 173, "name": "mobile_conversion_payment_info_additions_post_view", "comment": null}, "mobile_conversion_payment_info_additions_sale_amount": {"type": "integer", "index": 174, "name": "mobile_conversion_payment_info_additions_sale_amount", "comment": null}, "mobile_conversion_purchases_assisted": {"type": "integer", "index": 175, "name": "mobile_conversion_purchases_assisted", "comment": null}, "mobile_conversion_purchases_order_quantity": {"type": "integer", "index": 176, "name": "mobile_conversion_purchases_order_quantity", "comment": null}, "mobile_conversion_purchases_post_engagement": {"type": "integer", "index": 177, "name": "mobile_conversion_purchases_post_engagement", "comment": null}, "mobile_conversion_purchases_post_view": {"type": "integer", "index": 178, "name": "mobile_conversion_purchases_post_view", "comment": null}, "mobile_conversion_purchases_sale_amount": {"type": "integer", "index": 179, "name": "mobile_conversion_purchases_sale_amount", "comment": null}, "mobile_conversion_rates_assisted": {"type": "integer", "index": 180, "name": "mobile_conversion_rates_assisted", "comment": null}, "mobile_conversion_rates_order_quantity": {"type": "integer", "index": 181, "name": "mobile_conversion_rates_order_quantity", "comment": null}, "mobile_conversion_rates_post_engagement": {"type": "integer", "index": 182, "name": "mobile_conversion_rates_post_engagement", "comment": null}, "mobile_conversion_rates_post_view": {"type": "integer", "index": 183, "name": "mobile_conversion_rates_post_view", "comment": null}, "mobile_conversion_rates_sale_amount": {"type": "integer", "index": 184, "name": "mobile_conversion_rates_sale_amount", "comment": null}, "mobile_conversion_re_engages_assisted": {"type": "integer", "index": 185, "name": "mobile_conversion_re_engages_assisted", "comment": null}, "mobile_conversion_re_engages_order_quantity": {"type": "integer", "index": 186, "name": "mobile_conversion_re_engages_order_quantity", "comment": null}, "mobile_conversion_re_engages_post_engagement": {"type": "integer", "index": 187, "name": "mobile_conversion_re_engages_post_engagement", "comment": null}, "mobile_conversion_re_engages_post_view": {"type": "integer", "index": 188, "name": "mobile_conversion_re_engages_post_view", "comment": null}, "mobile_conversion_re_engages_sale_amount": {"type": "integer", "index": 189, "name": "mobile_conversion_re_engages_sale_amount", "comment": null}, "mobile_conversion_reservations_assisted": {"type": "integer", "index": 190, "name": "mobile_conversion_reservations_assisted", "comment": null}, "mobile_conversion_reservations_order_quantity": {"type": "integer", "index": 191, "name": "mobile_conversion_reservations_order_quantity", "comment": null}, "mobile_conversion_reservations_post_engagement": {"type": "integer", "index": 192, "name": "mobile_conversion_reservations_post_engagement", "comment": null}, "mobile_conversion_reservations_post_view": {"type": "integer", "index": 193, "name": "mobile_conversion_reservations_post_view", "comment": null}, "mobile_conversion_reservations_sale_amount": {"type": "integer", "index": 194, "name": "mobile_conversion_reservations_sale_amount", "comment": null}, "mobile_conversion_searches_assisted": {"type": "integer", "index": 195, "name": "mobile_conversion_searches_assisted", "comment": null}, "mobile_conversion_searches_order_quantity": {"type": "integer", "index": 196, "name": "mobile_conversion_searches_order_quantity", "comment": null}, "mobile_conversion_searches_post_engagement": {"type": "integer", "index": 197, "name": "mobile_conversion_searches_post_engagement", "comment": null}, "mobile_conversion_searches_post_view": {"type": "integer", "index": 198, "name": "mobile_conversion_searches_post_view", "comment": null}, "mobile_conversion_searches_sale_amount": {"type": "integer", "index": 199, "name": "mobile_conversion_searches_sale_amount", "comment": null}, "mobile_conversion_shares_assisted": {"type": "integer", "index": 200, "name": "mobile_conversion_shares_assisted", "comment": null}, "mobile_conversion_shares_order_quantity": {"type": "integer", "index": 201, "name": "mobile_conversion_shares_order_quantity", "comment": null}, "mobile_conversion_shares_post_engagement": {"type": "integer", "index": 202, "name": "mobile_conversion_shares_post_engagement", "comment": null}, "mobile_conversion_shares_post_view": {"type": "integer", "index": 203, "name": "mobile_conversion_shares_post_view", "comment": null}, "mobile_conversion_shares_sale_amount": {"type": "integer", "index": 204, "name": "mobile_conversion_shares_sale_amount", "comment": null}, "mobile_conversion_sign_ups_assisted": {"type": "integer", "index": 205, "name": "mobile_conversion_sign_ups_assisted", "comment": null}, "mobile_conversion_sign_ups_order_quantity": {"type": "integer", "index": 206, "name": "mobile_conversion_sign_ups_order_quantity", "comment": null}, "mobile_conversion_sign_ups_post_engagement": {"type": "integer", "index": 207, "name": "mobile_conversion_sign_ups_post_engagement", "comment": null}, "mobile_conversion_sign_ups_post_view": {"type": "integer", "index": 208, "name": "mobile_conversion_sign_ups_post_view", "comment": null}, "mobile_conversion_sign_ups_sale_amount": {"type": "integer", "index": 209, "name": "mobile_conversion_sign_ups_sale_amount", "comment": null}, "mobile_conversion_site_visits_order_quantity": {"type": "integer", "index": 210, "name": "mobile_conversion_site_visits_order_quantity", "comment": null}, "mobile_conversion_site_visits_post_engagement": {"type": "integer", "index": 211, "name": "mobile_conversion_site_visits_post_engagement", "comment": null}, "mobile_conversion_site_visits_post_view": {"type": "integer", "index": 212, "name": "mobile_conversion_site_visits_post_view", "comment": null}, "mobile_conversion_site_visits_sale_amount": {"type": "integer", "index": 213, "name": "mobile_conversion_site_visits_sale_amount", "comment": null}, "mobile_conversion_spent_credits_assisted": {"type": "integer", "index": 214, "name": "mobile_conversion_spent_credits_assisted", "comment": null}, "mobile_conversion_spent_credits_order_quantity": {"type": "integer", "index": 215, "name": "mobile_conversion_spent_credits_order_quantity", "comment": null}, "mobile_conversion_spent_credits_post_engagement": {"type": "integer", "index": 216, "name": "mobile_conversion_spent_credits_post_engagement", "comment": null}, "mobile_conversion_spent_credits_post_view": {"type": "integer", "index": 217, "name": "mobile_conversion_spent_credits_post_view", "comment": null}, "mobile_conversion_spent_credits_sale_amount": {"type": "integer", "index": 218, "name": "mobile_conversion_spent_credits_sale_amount", "comment": null}, "mobile_conversion_tutorials_completed_assisted": {"type": "integer", "index": 219, "name": "mobile_conversion_tutorials_completed_assisted", "comment": null}, "mobile_conversion_tutorials_completed_order_quantity": {"type": "integer", "index": 220, "name": "mobile_conversion_tutorials_completed_order_quantity", "comment": null}, "mobile_conversion_tutorials_completed_post_engagement": {"type": "integer", "index": 221, "name": "mobile_conversion_tutorials_completed_post_engagement", "comment": null}, "mobile_conversion_tutorials_completed_post_view": {"type": "integer", "index": 222, "name": "mobile_conversion_tutorials_completed_post_view", "comment": null}, "mobile_conversion_tutorials_completed_sale_amount": {"type": "integer", "index": 223, "name": "mobile_conversion_tutorials_completed_sale_amount", "comment": null}, "mobile_conversion_updates_assisted": {"type": "integer", "index": 224, "name": "mobile_conversion_updates_assisted", "comment": null}, "mobile_conversion_updates_order_quantity": {"type": "integer", "index": 225, "name": "mobile_conversion_updates_order_quantity", "comment": null}, "mobile_conversion_updates_post_engagement": {"type": "integer", "index": 226, "name": "mobile_conversion_updates_post_engagement", "comment": null}, "mobile_conversion_updates_post_view": {"type": "integer", "index": 227, "name": "mobile_conversion_updates_post_view", "comment": null}, "mobile_conversion_updates_sale_amount": {"type": "integer", "index": 228, "name": "mobile_conversion_updates_sale_amount", "comment": null}, "poll_card_vote": {"type": "integer", "index": 229, "name": "poll_card_vote", "comment": null}, "qualified_impressions": {"type": "integer", "index": 230, "name": "qualified_impressions", "comment": null}, "replies": {"type": "integer", "index": 231, "name": "replies", "comment": null}, "retweets": {"type": "integer", "index": 232, "name": "retweets", "comment": null}, "tweets_send": {"type": "integer", "index": 233, "name": "tweets_send", "comment": null}, "unfollows": {"type": "integer", "index": 234, "name": "unfollows", "comment": null}, "url_clicks": {"type": "integer", "index": 235, "name": "url_clicks", "comment": null}, "video_3_s_100_pct_views": {"type": "integer", "index": 236, "name": "video_3_s_100_pct_views", "comment": null}, "video_6_s_views": {"type": "integer", "index": 237, "name": "video_6_s_views", "comment": null}, "video_content_starts": {"type": "integer", "index": 238, "name": "video_content_starts", "comment": null}, "video_cta_clicks": {"type": "integer", "index": 239, "name": "video_cta_clicks", "comment": null}, "video_mrc_views": {"type": "integer", "index": 240, "name": "video_mrc_views", "comment": null}, "video_total_views": {"type": "integer", "index": 241, "name": "video_total_views", "comment": null}, "video_views_100": {"type": "integer", "index": 242, "name": "video_views_100", "comment": null}, "video_views_25": {"type": "integer", "index": 243, "name": "video_views_25", "comment": null}, "video_views_50": {"type": "integer", "index": 244, "name": "video_views_50", "comment": null}, "video_views_75": {"type": "integer", "index": 245, "name": "video_views_75", "comment": null}, "mobile_conversion_installs_skan_post_engagement": {"type": "integer", "index": 246, "name": "mobile_conversion_installs_skan_post_engagement", "comment": null}, "mobile_conversion_installs_skan_post_view": {"type": "integer", "index": 247, "name": "mobile_conversion_installs_skan_post_view", "comment": null}, "mobile_conversion_purchases_skan_post_engagement": {"type": "integer", "index": 248, "name": "mobile_conversion_purchases_skan_post_engagement", "comment": null}, "mobile_conversion_purchases_skan_post_view": {"type": "integer", "index": 249, "name": "mobile_conversion_purchases_skan_post_view", "comment": null}, "video_15_s_views": {"type": "integer", "index": 250, "name": "video_15_s_views", "comment": null}, "auto_created_conversion_landing_page_view": {"type": "integer", "index": 251, "name": "auto_created_conversion_landing_page_view", "comment": null}, "auto_created_conversion_session": {"type": "integer", "index": 252, "name": "auto_created_conversion_session", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__line_item_report_tmp"}, "model.twitter_ads.stg_twitter_ads__promoted_tweet_history": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__promoted_tweet_history", "database": "postgres", "comment": "Each record represents a version of each promoted tweet. The versions can be differentiated by the updated_at timestamp.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "approval_status": {"type": "text", "index": 2, "name": "approval_status", "comment": "The approval status of the promoted tweet."}, "created_timestamp": {"type": "text", "index": 3, "name": "created_timestamp", "comment": "The timestamp the account was created."}, "is_deleted": {"type": "boolean", "index": 4, "name": "is_deleted", "comment": "Whether the record has been deleted or not."}, "entity_status": {"type": "text", "index": 5, "name": "entity_status", "comment": "The status of the promoted tweet."}, "promoted_tweet_id": {"type": "text", "index": 6, "name": "promoted_tweet_id", "comment": "The ID of the promoted tweet."}, "line_item_id": {"type": "text", "index": 7, "name": "line_item_id", "comment": "The ID of the related line item."}, "tweet_id": {"type": "bigint", "index": 8, "name": "tweet_id", "comment": "The ID of the related tweet."}, "updated_timestamp": {"type": "text", "index": 9, "name": "updated_timestamp", "comment": "The timestamp the account was last updated."}, "is_latest_version": {"type": "boolean", "index": 10, "name": "is_latest_version", "comment": "Whether the record is the most latest version for the promoted tweet."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__promoted_tweet_history"}, "model.twitter_ads.stg_twitter_ads__promoted_tweet_history_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__promoted_tweet_history_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "approval_status": {"type": "text", "index": 2, "name": "approval_status", "comment": null}, "created_at": {"type": "text", "index": 3, "name": "created_at", "comment": null}, "deleted": {"type": "boolean", "index": 4, "name": "deleted", "comment": null}, "entity_status": {"type": "text", "index": 5, "name": "entity_status", "comment": null}, "id": {"type": "text", "index": 6, "name": "id", "comment": null}, "line_item_id": {"type": "text", "index": 7, "name": "line_item_id", "comment": null}, "tweet_id": {"type": "bigint", "index": 8, "name": "tweet_id", "comment": null}, "updated_at": {"type": "text", "index": 9, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__promoted_tweet_history_tmp"}, "model.twitter_ads.stg_twitter_ads__promoted_tweet_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__promoted_tweet_report", "database": "postgres", "comment": "Each record represents the performance of a promoted tweet on a given day, in the tweet's defined placement.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": "The ID of the related account."}, "promoted_tweet_id": {"type": "text", "index": 4, "name": "promoted_tweet_id", "comment": "The ID of the related promoted tweet."}, "placement": {"type": "text", "index": 5, "name": "placement", "comment": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`."}, "clicks": {"type": "integer", "index": 6, "name": "clicks", "comment": "The clicks for the promoted tweet on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes."}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": "The impressions for the promoted tweet on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results."}, "spend_micro": {"type": "integer", "index": 8, "name": "spend_micro", "comment": "The spend (in micros) for the promoted tweet on that day."}, "spend": {"type": "numeric", "index": 9, "name": "spend", "comment": "The spend for the promoted tweet on that day."}, "url_clicks": {"type": "integer", "index": 10, "name": "url_clicks", "comment": "The url clicks for the promoted tweet on that day."}, "conversion_purchases_metric": {"type": "bigint", "index": 11, "name": "conversion_purchases_metric", "comment": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_custom_metric": {"type": "bigint", "index": 12, "name": "conversion_custom_metric", "comment": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_purchases_sale_amount": {"type": "double precision", "index": 13, "name": "conversion_purchases_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}, "conversion_custom_sale_amount": {"type": "double precision", "index": 14, "name": "conversion_custom_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__promoted_tweet_report"}, "model.twitter_ads.stg_twitter_ads__promoted_tweet_report_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__promoted_tweet_report_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 3, "name": "billed_charge_local_micro", "comment": null}, "clicks": {"type": "integer", "index": 4, "name": "clicks", "comment": null}, "date": {"type": "timestamp without time zone", "index": 5, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": null}, "promoted_tweet_id": {"type": "text", "index": 7, "name": "promoted_tweet_id", "comment": null}, "url_clicks": {"type": "integer", "index": 8, "name": "url_clicks", "comment": null}, "placement": {"type": "text", "index": 9, "name": "placement", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__promoted_tweet_report_tmp"}, "model.twitter_ads.stg_twitter_ads__tweet": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__tweet", "database": "postgres", "comment": "Each record represents a tweet, promoted or not.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": "The ID of the related account."}, "tweet_id": {"type": "integer", "index": 3, "name": "tweet_id", "comment": "Unique identifier of the tweet."}, "name": {"type": "integer", "index": 4, "name": "name", "comment": "If provided, the non-public title of the tweet."}, "full_text": {"type": "text", "index": 5, "name": "full_text", "comment": "Full text of the tweet's content."}, "language": {"type": "text", "index": 6, "name": "language", "comment": "Two-letter language code of the tweet."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__tweet"}, "model.twitter_ads.stg_twitter_ads__tweet_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__tweet_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": null}, "card_uri": {"type": "integer", "index": 4, "name": "card_uri", "comment": null}, "coordinates_coordinates": {"type": "integer", "index": 5, "name": "coordinates_coordinates", "comment": null}, "coordinates_type": {"type": "integer", "index": 6, "name": "coordinates_type", "comment": null}, "created_at": {"type": "text", "index": 7, "name": "created_at", "comment": null}, "favorite_count": {"type": "integer", "index": 8, "name": "favorite_count", "comment": null}, "favorited": {"type": "boolean", "index": 9, "name": "favorited", "comment": null}, "followers": {"type": "integer", "index": 10, "name": "followers", "comment": null}, "full_text": {"type": "text", "index": 11, "name": "full_text", "comment": null}, "geo_coordinates": {"type": "integer", "index": 12, "name": "geo_coordinates", "comment": null}, "geo_type": {"type": "integer", "index": 13, "name": "geo_type", "comment": null}, "in_reply_to_screen_name": {"type": "integer", "index": 14, "name": "in_reply_to_screen_name", "comment": null}, "in_reply_to_status_id": {"type": "integer", "index": 15, "name": "in_reply_to_status_id", "comment": null}, "in_reply_to_user_id": {"type": "integer", "index": 16, "name": "in_reply_to_user_id", "comment": null}, "lang": {"type": "text", "index": 17, "name": "lang", "comment": null}, "media_key": {"type": "integer", "index": 18, "name": "media_key", "comment": null}, "retweet_count": {"type": "integer", "index": 19, "name": "retweet_count", "comment": null}, "retweeted": {"type": "boolean", "index": 20, "name": "retweeted", "comment": null}, "source": {"type": "text", "index": 21, "name": "source", "comment": null}, "truncated": {"type": "boolean", "index": 22, "name": "truncated", "comment": null}, "tweet_type": {"type": "text", "index": 23, "name": "tweet_type", "comment": null}, "user_id": {"type": "integer", "index": 24, "name": "user_id", "comment": null}, "name": {"type": "integer", "index": 25, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__tweet_tmp"}, "model.twitter_ads.stg_twitter_ads__tweet_url": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__tweet_url", "database": "postgres", "comment": "Each record represents a URL used in a tweet.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "display_url": {"type": "text", "index": 2, "name": "display_url", "comment": "The URL as it will be displayed."}, "expanded_url": {"type": "text", "index": 3, "name": "expanded_url", "comment": "The fully expanded URL."}, "index": {"type": "integer", "index": 4, "name": "index", "comment": "The index of the URL within the tweet (ie if there are multiple URLs)"}, "indices": {"type": "text", "index": 5, "name": "indices", "comment": "The start and end point of where the URL is placed in the tweet text."}, "tweet_id": {"type": "bigint", "index": 6, "name": "tweet_id", "comment": "The ID of the related tweet."}, "url": {"type": "text", "index": 7, "name": "url", "comment": "The 't.co' shortened URL."}, "base_url": {"type": "text", "index": 8, "name": "base_url", "comment": "The base URL of the ad, extracted from the `expanded_url`."}, "url_host": {"type": "text", "index": 9, "name": "url_host", "comment": "The URL host of the ad, extracted from the `expanded_url`."}, "url_path": {"type": "text", "index": 10, "name": "url_path", "comment": "The URL path of the ad, extracted from the `expanded_url`."}, "utm_source": {"type": "text", "index": 11, "name": "utm_source", "comment": "The utm_source parameter of the ad, extracted from the `expanded_url`."}, "utm_medium": {"type": "text", "index": 12, "name": "utm_medium", "comment": "The utm_medium parameter of the ad, extracted from the `expanded_url`."}, "utm_campaign": {"type": "text", "index": 13, "name": "utm_campaign", "comment": "The utm_campaign parameter of the ad, extracted from the `expanded_url`."}, "utm_content": {"type": "text", "index": 14, "name": "utm_content", "comment": "The utm_content parameter of the ad, extracted from the `expanded_url`."}, "utm_term": {"type": "text", "index": 15, "name": "utm_term", "comment": "The utm_term parameter of the ad, extracted from the `expanded_url`."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__tweet_url"}, "model.twitter_ads.stg_twitter_ads__tweet_url_tmp": {"metadata": {"type": "VIEW", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__tweet_url_tmp", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "display_url": {"type": "text", "index": 2, "name": "display_url", "comment": null}, "expanded_url": {"type": "text", "index": 3, "name": "expanded_url", "comment": null}, "index": {"type": "integer", "index": 4, "name": "index", "comment": null}, "indices": {"type": "text", "index": 5, "name": "indices", "comment": null}, "tweet_id": {"type": "bigint", "index": 6, "name": "tweet_id", "comment": null}, "url": {"type": "text", "index": 7, "name": "url", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.stg_twitter_ads__tweet_url_tmp"}, "model.tiktok_ads.tiktok_ads__ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "tiktok_ads__ad_group_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the ad group level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Day of record"}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": "Advertiser ID"}, "advertiser_name": {"type": "text", "index": 4, "name": "advertiser_name", "comment": "Advertiser name."}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": "Campaign ID"}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "Campaign name"}, "ad_group_id": {"type": "integer", "index": 7, "name": "ad_group_id", "comment": "Ad group ID"}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "Ad group name"}, "currency": {"type": "text", "index": 9, "name": "currency", "comment": "Advertiser's currency."}, "category": {"type": "integer", "index": 10, "name": "category", "comment": "Ad group category."}, "gender": {"type": "text", "index": 11, "name": "gender", "comment": "Gender that you want to target."}, "audience_type": {"type": "integer", "index": 12, "name": "audience_type", "comment": "Audience Type"}, "budget": {"type": "integer", "index": 13, "name": "budget", "comment": "Ad budget. Returns 0.0 when Campaign Budget Optimization (budget_optimize_switch) is on."}, "impressions": {"type": "bigint", "index": 14, "name": "impressions", "comment": "The number of impressions that occurred on the day of the record."}, "clicks": {"type": "bigint", "index": 15, "name": "clicks", "comment": "The number of clicks that occurred on the day of the record."}, "spend": {"type": "double precision", "index": 16, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "reach": {"type": "bigint", "index": 17, "name": "reach", "comment": "The number of unique users who saw your ads at least once. This metric is estimated."}, "conversion": {"type": "bigint", "index": 18, "name": "conversion", "comment": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n"}, "likes": {"type": "bigint", "index": 19, "name": "likes", "comment": "The number of likes your video creative received within 1 day of a user seeing a paid ad."}, "comments": {"type": "bigint", "index": 20, "name": "comments", "comment": "The number of comments your video creative received within 1 day of a user seeing a paid ad."}, "shares": {"type": "bigint", "index": 21, "name": "shares", "comment": "The number of shares that occurred on the day of the record."}, "profile_visits": {"type": "bigint", "index": 22, "name": "profile_visits", "comment": "The number of profile visits that occurred on the day of the record."}, "follows": {"type": "bigint", "index": 23, "name": "follows", "comment": "The number of follows that occurred on the day of the record."}, "video_watched_2_s": {"type": "bigint", "index": 24, "name": "video_watched_2_s", "comment": "The number of times your video played for at least 2 seconds, or completely played. Replays will not be counted."}, "video_watched_6_s": {"type": "bigint", "index": 25, "name": "video_watched_6_s", "comment": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted."}, "video_views_p_25": {"type": "bigint", "index": 26, "name": "video_views_p_25", "comment": "The number of times your video was played at 25% of its length. Replays will not be counted."}, "video_views_p_50": {"type": "bigint", "index": 27, "name": "video_views_p_50", "comment": "The number of times your video was played at 50% of its length. Replays will not be counted."}, "video_views_p_75": {"type": "bigint", "index": 28, "name": "video_views_p_75", "comment": "The number of times your video was played at 75% of its length. Replays will not be counted."}, "real_time_conversion": {"type": "bigint", "index": 29, "name": "real_time_conversion", "comment": "Number of times your ad resulted in the optimization event you selected."}, "total_purchase_value": {"type": "double precision", "index": 30, "name": "total_purchase_value", "comment": "The total value of purchase events that occurred in your app that were recorded by your measurement partner."}, "total_sales_lead_value": {"type": "double precision", "index": 31, "name": "total_sales_lead_value", "comment": "The monetary worth or potential value assigned to a lead generated through ads."}, "total_conversion_value": {"type": "double precision", "index": 32, "name": "total_conversion_value", "comment": "The accumulated value of `total_purchase_value` and `total_sales_lead_value`."}, "daily_cpc": {"type": "double precision", "index": 33, "name": "daily_cpc", "comment": "The average amount of money you've spent on a click."}, "daily_cpm": {"type": "double precision", "index": 34, "name": "daily_cpm", "comment": "The average amount of money you've spent per 1,000 impressions."}, "daily_ctr": {"type": "bigint", "index": 35, "name": "daily_ctr", "comment": "The percentage of times people saw your ad and performed a click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.tiktok_ads__ad_group_report"}, "model.tiktok_ads.tiktok_ads__ad_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "tiktok_ads__ad_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the ad level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Day of record."}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": "Advertiser ID."}, "advertiser_name": {"type": "text", "index": 4, "name": "advertiser_name", "comment": "Advertiser name."}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": "Campaign ID."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "Campaign name."}, "ad_group_id": {"type": "integer", "index": 7, "name": "ad_group_id", "comment": "Ad group ID."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "Ad group name."}, "ad_id": {"type": "integer", "index": 9, "name": "ad_id", "comment": "Ad ID."}, "ad_name": {"type": "text", "index": 10, "name": "ad_name", "comment": "Ad name."}, "currency": {"type": "text", "index": 11, "name": "currency", "comment": "Advertiser's currency."}, "category": {"type": "integer", "index": 12, "name": "category", "comment": "Ad group category."}, "gender": {"type": "text", "index": 13, "name": "gender", "comment": "Gender that you want to target."}, "audience_type": {"type": "integer", "index": 14, "name": "audience_type", "comment": "Audience Type"}, "budget": {"type": "integer", "index": 15, "name": "budget", "comment": "Ad budget. Returns 0.0 when Campaign Budget Optimization (budget_optimize_switch) is on."}, "impressions": {"type": "bigint", "index": 16, "name": "impressions", "comment": "The number of impressions that occurred on the day of the record."}, "clicks": {"type": "bigint", "index": 17, "name": "clicks", "comment": "The number of clicks that occurred on the day of the record."}, "spend": {"type": "double precision", "index": 18, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "reach": {"type": "bigint", "index": 19, "name": "reach", "comment": "The number of unique users who saw your ads at least once. This metric is estimated."}, "conversion": {"type": "bigint", "index": 20, "name": "conversion", "comment": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n"}, "likes": {"type": "bigint", "index": 21, "name": "likes", "comment": "The number of likes your video creative received within 1 day of a user seeing a paid ad."}, "comments": {"type": "bigint", "index": 22, "name": "comments", "comment": "The number of comments your video creative received within 1 day of a user seeing a paid ad."}, "shares": {"type": "bigint", "index": 23, "name": "shares", "comment": "The number of shares that occurred on the day of the record."}, "profile_visits": {"type": "bigint", "index": 24, "name": "profile_visits", "comment": "The number of profile visits that occurred on the day of the record."}, "follows": {"type": "bigint", "index": 25, "name": "follows", "comment": "The number of follows that occurred on the day of the record."}, "video_watched_2_s": {"type": "bigint", "index": 26, "name": "video_watched_2_s", "comment": "The number of times your video played for at least 2 seconds, or completely played. Replays will not be counted."}, "video_watched_6_s": {"type": "bigint", "index": 27, "name": "video_watched_6_s", "comment": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted."}, "video_views_p_25": {"type": "bigint", "index": 28, "name": "video_views_p_25", "comment": "The number of times your video was played at 25% of its length. Replays will not be counted."}, "video_views_p_50": {"type": "bigint", "index": 29, "name": "video_views_p_50", "comment": "The number of times your video was played at 50% of its length. Replays will not be counted."}, "video_views_p_75": {"type": "bigint", "index": 30, "name": "video_views_p_75", "comment": "The number of times your video was played at 75% of its length. Replays will not be counted."}, "real_time_conversion": {"type": "bigint", "index": 31, "name": "real_time_conversion", "comment": "Number of times your ad resulted in the optimization event you selected."}, "total_purchase_value": {"type": "double precision", "index": 32, "name": "total_purchase_value", "comment": "The total value of purchase events that occurred in your app that were recorded by your measurement partner."}, "total_sales_lead_value": {"type": "double precision", "index": 33, "name": "total_sales_lead_value", "comment": "The monetary worth or potential value assigned to a lead generated through ads."}, "total_conversion_value": {"type": "double precision", "index": 34, "name": "total_conversion_value", "comment": "The accumulated value of `total_purchase_value` and `total_sales_lead_value`."}, "daily_cpc": {"type": "double precision", "index": 35, "name": "daily_cpc", "comment": "The average amount of money you've spent on a click."}, "daily_cpm": {"type": "double precision", "index": 36, "name": "daily_cpm", "comment": "The average amount of money you've spent per 1,000 impressions."}, "daily_ctr": {"type": "bigint", "index": 37, "name": "daily_ctr", "comment": "The percentage of times people saw your ad and performed a click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.tiktok_ads__ad_report"}, "model.tiktok_ads.tiktok_ads__advertiser_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "tiktok_ads__advertiser_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the account level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Day of record."}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": "Advertiser ID."}, "advertiser_name": {"type": "text", "index": 4, "name": "advertiser_name", "comment": "Advertiser name."}, "currency": {"type": "text", "index": 5, "name": "currency", "comment": "Advertiser's currency."}, "clicks": {"type": "bigint", "index": 6, "name": "clicks", "comment": "The number of clicks that occurred on the day of the record."}, "impressions": {"type": "bigint", "index": 7, "name": "impressions", "comment": "The number of impressions that occurred on the day of the record."}, "spend": {"type": "double precision", "index": 8, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "reach": {"type": "bigint", "index": 9, "name": "reach", "comment": "The number of unique users who saw your ads at least once. This metric is estimated."}, "conversion": {"type": "bigint", "index": 10, "name": "conversion", "comment": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n"}, "likes": {"type": "bigint", "index": 11, "name": "likes", "comment": "The number of likes your video creative received within 1 day of a user seeing a paid ad."}, "comments": {"type": "bigint", "index": 12, "name": "comments", "comment": "The number of comments your video creative received within 1 day of a user seeing a paid ad."}, "shares": {"type": "bigint", "index": 13, "name": "shares", "comment": "The number of shares that occurred on the day of the record."}, "profile_visits": {"type": "bigint", "index": 14, "name": "profile_visits", "comment": "The number of profile visits that occurred on the day of the record."}, "follows": {"type": "bigint", "index": 15, "name": "follows", "comment": "The number of follows that occurred on the day of the record."}, "video_watched_2_s": {"type": "bigint", "index": 16, "name": "video_watched_2_s", "comment": "The number of times your video played for at least 2 seconds, or completely played. Replays will not be counted."}, "video_watched_6_s": {"type": "bigint", "index": 17, "name": "video_watched_6_s", "comment": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted."}, "video_views_p_25": {"type": "bigint", "index": 18, "name": "video_views_p_25", "comment": "The number of times your video was played at 25% of its length. Replays will not be counted."}, "video_views_p_50": {"type": "bigint", "index": 19, "name": "video_views_p_50", "comment": "The number of times your video was played at 50% of its length. Replays will not be counted."}, "video_views_p_75": {"type": "bigint", "index": 20, "name": "video_views_p_75", "comment": "The number of times your video was played at 75% of its length. Replays will not be counted."}, "real_time_conversion": {"type": "bigint", "index": 21, "name": "real_time_conversion", "comment": "Number of times your ad resulted in the optimization event you selected."}, "total_purchase_value": {"type": "double precision", "index": 22, "name": "total_purchase_value", "comment": "The total value of purchase events that occurred in your app that were recorded by your measurement partner."}, "total_sales_lead_value": {"type": "double precision", "index": 23, "name": "total_sales_lead_value", "comment": "The monetary worth or potential value assigned to a lead generated through ads."}, "total_conversion_value": {"type": "double precision", "index": 24, "name": "total_conversion_value", "comment": "The accumulated value of `total_purchase_value` and `total_sales_lead_value`."}, "daily_cpc": {"type": "double precision", "index": 25, "name": "daily_cpc", "comment": "The average amount of money you've spent on a click."}, "daily_cpm": {"type": "double precision", "index": 26, "name": "daily_cpm", "comment": "The average amount of money you've spent per 1,000 impressions."}, "daily_ctr": {"type": "bigint", "index": 27, "name": "daily_ctr", "comment": "The percentage of times people saw your ad and performed a click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.tiktok_ads__advertiser_report"}, "model.tiktok_ads.tiktok_ads__campaign_country_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "tiktok_ads__campaign_country_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of a campaign at the country/geographic region level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "The reporting date for the campaign data (in YYYY-MM-DD format)."}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": "Unique identifier for the campaign."}, "campaign_name": {"type": "text", "index": 4, "name": "campaign_name", "comment": "Name of the campaign."}, "campaign_type": {"type": "text", "index": 5, "name": "campaign_type", "comment": "Type/category of the campaign."}, "created_at": {"type": "text", "index": 6, "name": "created_at", "comment": "Timestamp when the campaign was created."}, "country_code": {"type": "text", "index": 7, "name": "country_code", "comment": "Audience country or region code."}, "advertiser_id": {"type": "integer", "index": 8, "name": "advertiser_id", "comment": "Unique identifier for the advertiser."}, "advertiser_name": {"type": "text", "index": 9, "name": "advertiser_name", "comment": "Name of the advertiser account."}, "currency": {"type": "text", "index": 10, "name": "currency", "comment": "Currency in which spend and cost metrics are reported."}, "objective_type": {"type": "text", "index": 11, "name": "objective_type", "comment": "Objective type of the campaign (e.g., conversions, traffic)."}, "status": {"type": "text", "index": 12, "name": "status", "comment": "Current status of the campaign."}, "split_test_variable": {"type": "text", "index": 13, "name": "split_test_variable", "comment": "Split Test variables. Optional values; TARGETING, BIDDING_OPTIMIZATION, CREATIVE."}, "budget": {"type": "numeric(28,6)", "index": 14, "name": "budget", "comment": "Total budget allocated to the campaign."}, "budget_mode": {"type": "text", "index": 15, "name": "budget_mode", "comment": "Budget pacing mode (e.g., daily, total)."}, "country_name": {"type": "text", "index": 16, "name": "country_name", "comment": "Human-readable name of the geographic region associated with the country code."}, "location_id": {"type": "text", "index": 17, "name": "location_id", "comment": "TikTok's identifier for the country-level location record."}, "parent_location_id": {"type": "text", "index": 18, "name": "parent_location_id", "comment": "Identifier of the parent region, enabling hierarchical rollups (city to province to country)."}, "has_support_below_18": {"type": "boolean", "index": 19, "name": "has_support_below_18", "comment": "Whether the location supports targeting users under 18. Used for compliance with age-restricted ad targeting rules."}, "clicks": {"type": "bigint", "index": 20, "name": "clicks", "comment": "The number of clicks that occurred on the day of the record."}, "impressions": {"type": "bigint", "index": 21, "name": "impressions", "comment": "The number of impressions that occurred on the day of the record."}, "spend": {"type": "double precision", "index": 22, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "conversion": {"type": "bigint", "index": 23, "name": "conversion", "comment": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n"}, "daily_cpc": {"type": "double precision", "index": 24, "name": "daily_cpc", "comment": "The average amount of money you've spent on a click."}, "daily_cpm": {"type": "double precision", "index": 25, "name": "daily_cpm", "comment": "The average amount of money you've spent per 1,000 impressions."}, "daily_ctr": {"type": "bigint", "index": 26, "name": "daily_ctr", "comment": "The percentage of times people saw your ad and performed a click."}, "real_time_conversion": {"type": "bigint", "index": 27, "name": "real_time_conversion", "comment": "Number of times your ad resulted in the optimization event you selected."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.tiktok_ads__campaign_country_report"}, "model.tiktok_ads.tiktok_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "tiktok_ads__campaign_report", "database": "postgres", "comment": "Each record in this table represents the daily performance at the campaign level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Day of record"}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": "Advertiser ID"}, "advertiser_name": {"type": "text", "index": 4, "name": "advertiser_name", "comment": "Advertiser name"}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": "Campaign ID"}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "Campaign name"}, "currency": {"type": "text", "index": 7, "name": "currency", "comment": "Advertiser's currency."}, "impressions": {"type": "bigint", "index": 8, "name": "impressions", "comment": "The number of impressions that occurred on the day of the record."}, "clicks": {"type": "bigint", "index": 9, "name": "clicks", "comment": "The number of clicks that occurred on the day of the record."}, "spend": {"type": "double precision", "index": 10, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "reach": {"type": "bigint", "index": 11, "name": "reach", "comment": "The number of unique users who saw your ads at least once. This metric is estimated."}, "conversion": {"type": "bigint", "index": 12, "name": "conversion", "comment": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n"}, "likes": {"type": "bigint", "index": 13, "name": "likes", "comment": "The number of likes your video creative received within 1 day of a user seeing a paid ad."}, "comments": {"type": "bigint", "index": 14, "name": "comments", "comment": "The number of comments your video creative received within 1 day of a user seeing a paid ad."}, "shares": {"type": "bigint", "index": 15, "name": "shares", "comment": "The number of shares that occurred on the day of the record."}, "profile_visits": {"type": "bigint", "index": 16, "name": "profile_visits", "comment": "The number of profile visits that occurred on the day of the record."}, "follows": {"type": "bigint", "index": 17, "name": "follows", "comment": "The number of follows that occurred on the day of the record."}, "video_watched_2_s": {"type": "bigint", "index": 18, "name": "video_watched_2_s", "comment": "The number of times your video played for at least 2 seconds, or completely played. Replays will not be counted."}, "video_watched_6_s": {"type": "bigint", "index": 19, "name": "video_watched_6_s", "comment": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted."}, "video_views_p_25": {"type": "bigint", "index": 20, "name": "video_views_p_25", "comment": "The number of times your video was played at 25% of its length. Replays will not be counted."}, "video_views_p_50": {"type": "bigint", "index": 21, "name": "video_views_p_50", "comment": "The number of times your video was played at 50% of its length. Replays will not be counted."}, "video_views_p_75": {"type": "bigint", "index": 22, "name": "video_views_p_75", "comment": "The number of times your video was played at 75% of its length. Replays will not be counted."}, "real_time_conversion": {"type": "bigint", "index": 23, "name": "real_time_conversion", "comment": "Number of times your ad resulted in the optimization event you selected."}, "total_purchase_value": {"type": "double precision", "index": 24, "name": "total_purchase_value", "comment": "The total value of purchase events that occurred in your app that were recorded by your measurement partner."}, "total_sales_lead_value": {"type": "double precision", "index": 25, "name": "total_sales_lead_value", "comment": "The monetary worth or potential value assigned to a lead generated through ads."}, "total_conversion_value": {"type": "double precision", "index": 26, "name": "total_conversion_value", "comment": "The accumulated value of `total_purchase_value` and `total_sales_lead_value`."}, "daily_cpc": {"type": "double precision", "index": 27, "name": "daily_cpc", "comment": "The average amount of money you've spent on a click."}, "daily_cpm": {"type": "double precision", "index": 28, "name": "daily_cpm", "comment": "The average amount of money you've spent per 1,000 impressions."}, "daily_ctr": {"type": "bigint", "index": 29, "name": "daily_ctr", "comment": "The percentage of times people saw your ad and performed a click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.tiktok_ads__campaign_report"}, "model.tiktok_ads.tiktok_ads__url_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "tiktok_ads__url_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the URL level.", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "date", "index": 2, "name": "date_day", "comment": "Day of record."}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": "Advertiser ID."}, "advertiser_name": {"type": "text", "index": 4, "name": "advertiser_name", "comment": "Advertiser name."}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": "Campaign ID."}, "campaign_name": {"type": "text", "index": 6, "name": "campaign_name", "comment": "Campaign name."}, "ad_group_id": {"type": "integer", "index": 7, "name": "ad_group_id", "comment": "Ad group ID."}, "ad_group_name": {"type": "text", "index": 8, "name": "ad_group_name", "comment": "Ad group name."}, "ad_id": {"type": "integer", "index": 9, "name": "ad_id", "comment": "Ad ID."}, "ad_name": {"type": "text", "index": 10, "name": "ad_name", "comment": "Ad name."}, "base_url": {"type": "text", "index": 11, "name": "base_url", "comment": "The base URL of the ad, extracted from the `landing page url`."}, "url_host": {"type": "text", "index": 12, "name": "url_host", "comment": "The URL host of the ad, extracted from the `landing page url`."}, "url_path": {"type": "text", "index": 13, "name": "url_path", "comment": "The URL path of the ad, extracted from the `landing page url`."}, "utm_source": {"type": "text", "index": 14, "name": "utm_source", "comment": "The utm_source parameter of the ad, extracted from the `landing page url`."}, "utm_medium": {"type": "text", "index": 15, "name": "utm_medium", "comment": "The utm_medium parameter of the ad, extracted from the `landing page url`."}, "utm_campaign": {"type": "text", "index": 16, "name": "utm_campaign", "comment": "The utm_campaign parameter of the ad, extracted from the `landing page url`."}, "utm_content": {"type": "text", "index": 17, "name": "utm_content", "comment": "The utm_content parameter of the ad, extracted from the `landing page url`."}, "utm_term": {"type": "text", "index": 18, "name": "utm_term", "comment": "The utm_term parameter of the ad, extracted from the `landing page url`."}, "currency": {"type": "text", "index": 19, "name": "currency", "comment": "Advertiser's currency."}, "category": {"type": "integer", "index": 20, "name": "category", "comment": "Ad group category."}, "gender": {"type": "text", "index": 21, "name": "gender", "comment": "Gender that you want to target."}, "audience_type": {"type": "integer", "index": 22, "name": "audience_type", "comment": "Audience Type"}, "budget": {"type": "integer", "index": 23, "name": "budget", "comment": "Ad budget. Returns 0.0 when Campaign Budget Optimization (budget_optimize_switch) is on."}, "impressions": {"type": "bigint", "index": 24, "name": "impressions", "comment": "The number of impressions that occurred on the day of the record."}, "clicks": {"type": "bigint", "index": 25, "name": "clicks", "comment": "The number of clicks that occurred on the day of the record."}, "spend": {"type": "double precision", "index": 26, "name": "spend", "comment": "The amount of spend that occurred on the day of the record."}, "reach": {"type": "bigint", "index": 27, "name": "reach", "comment": "The number of unique users who saw your ads at least once. This metric is estimated."}, "conversion": {"type": "bigint", "index": 28, "name": "conversion", "comment": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n"}, "likes": {"type": "bigint", "index": 29, "name": "likes", "comment": "The number of likes your video creative received within 1 day of a user seeing a paid ad."}, "comments": {"type": "bigint", "index": 30, "name": "comments", "comment": "The number of comments your video creative received within 1 day of a user seeing a paid ad."}, "shares": {"type": "bigint", "index": 31, "name": "shares", "comment": "The number of shares that occurred on the day of the record."}, "profile_visits": {"type": "bigint", "index": 32, "name": "profile_visits", "comment": "The number of profile visits that occurred on the day of the record."}, "follows": {"type": "bigint", "index": 33, "name": "follows", "comment": "The number of follows that occurred on the day of the record."}, "video_watched_2_s": {"type": "bigint", "index": 34, "name": "video_watched_2_s", "comment": "The number of times your video played for at least 2 seconds, or completely played. Replays will not be counted."}, "video_watched_6_s": {"type": "bigint", "index": 35, "name": "video_watched_6_s", "comment": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted."}, "video_views_p_25": {"type": "bigint", "index": 36, "name": "video_views_p_25", "comment": "The number of times your video was played at 25% of its length. Replays will not be counted."}, "video_views_p_50": {"type": "bigint", "index": 37, "name": "video_views_p_50", "comment": "The number of times your video was played at 50% of its length. Replays will not be counted."}, "video_views_p_75": {"type": "bigint", "index": 38, "name": "video_views_p_75", "comment": "The number of times your video was played at 75% of its length. Replays will not be counted."}, "real_time_conversion": {"type": "bigint", "index": 39, "name": "real_time_conversion", "comment": "Number of times your ad resulted in the optimization event you selected."}, "total_purchase_value": {"type": "double precision", "index": 40, "name": "total_purchase_value", "comment": "The total value of purchase events that occurred in your app that were recorded by your measurement partner."}, "total_sales_lead_value": {"type": "double precision", "index": 41, "name": "total_sales_lead_value", "comment": "The monetary worth or potential value assigned to a lead generated through ads."}, "total_conversion_value": {"type": "double precision", "index": 42, "name": "total_conversion_value", "comment": "The accumulated value of `total_purchase_value` and `total_sales_lead_value`."}, "daily_cpc": {"type": "double precision", "index": 43, "name": "daily_cpc", "comment": "The average amount of money you've spent on a click."}, "daily_cpm": {"type": "double precision", "index": 44, "name": "daily_cpm", "comment": "The average amount of money you've spent per 1,000 impressions."}, "daily_ctr": {"type": "bigint", "index": 45, "name": "daily_ctr", "comment": "The percentage of times people saw your ad and performed a click."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.tiktok_ads.tiktok_ads__url_report"}, "model.twitter_ads.twitter_ads__account_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "twitter_ads__account_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the account level, within a placement in Twitter.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "placement": {"type": "text", "index": 3, "name": "placement", "comment": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID of the account."}, "account_name": {"type": "character varying", "index": 5, "name": "account_name", "comment": "Name of the account."}, "is_deleted": {"type": "boolean", "index": 6, "name": "is_deleted", "comment": "Whether the record has been deleted or not."}, "timezone": {"type": "text", "index": 7, "name": "timezone", "comment": "The timezone the account is set to."}, "industry_type": {"type": "integer", "index": 8, "name": "industry_type", "comment": "The industry of the accounts."}, "approval_status": {"type": "text", "index": 9, "name": "approval_status", "comment": "The approval status of the account."}, "business_name": {"type": "integer", "index": 10, "name": "business_name", "comment": "The name of the related business."}, "business_id": {"type": "integer", "index": 11, "name": "business_id", "comment": "The ID of the related business."}, "created_timestamp": {"type": "text", "index": 12, "name": "created_timestamp", "comment": "The timestamp the account was created."}, "updated_timestamp": {"type": "text", "index": 13, "name": "updated_timestamp", "comment": "The timestamp the account was last updated."}, "timezone_switched_timestamp": {"type": "text", "index": 14, "name": "timezone_switched_timestamp", "comment": "The timestamp the account's timezone was last changed."}, "clicks": {"type": "numeric", "index": 15, "name": "clicks", "comment": "The clicks for th account on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes."}, "impressions": {"type": "numeric", "index": 16, "name": "impressions", "comment": "The impressions for the account on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results."}, "spend": {"type": "numeric", "index": 17, "name": "spend", "comment": "The spend for the account on that day."}, "spend_micro": {"type": "numeric", "index": 18, "name": "spend_micro", "comment": "The spend (in micros) for the account on that day."}, "url_clicks": {"type": "numeric", "index": 19, "name": "url_clicks", "comment": "The url clicks for the account on that day."}, "total_conversions": {"type": "numeric", "index": 20, "name": "total_conversions", "comment": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric)."}, "total_conversions_sale_amount": {"type": "double precision", "index": 21, "name": "total_conversions_sale_amount", "comment": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount)."}, "conversion_purchases_metric": {"type": "numeric", "index": 22, "name": "conversion_purchases_metric", "comment": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_custom_metric": {"type": "numeric", "index": 23, "name": "conversion_custom_metric", "comment": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_purchases_sale_amount": {"type": "double precision", "index": 24, "name": "conversion_purchases_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}, "conversion_custom_sale_amount": {"type": "double precision", "index": 25, "name": "conversion_custom_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.twitter_ads__account_report"}, "model.twitter_ads.twitter_ads__campaign_country_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "twitter_ads__campaign_country_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the account and campaign level, within a placement in Twitter.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "country": {"type": "text", "index": 3, "name": "country", "comment": "Long-form name of the country being reported on."}, "placement": {"type": "text", "index": 4, "name": "placement", "comment": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`."}, "account_id": {"type": "text", "index": 5, "name": "account_id", "comment": "The ID of the related account."}, "account_name": {"type": "character varying", "index": 6, "name": "account_name", "comment": "The name of the related account."}, "campaign_id": {"type": "text", "index": 7, "name": "campaign_id", "comment": "The ID of the campaign."}, "campaign_name": {"type": "text", "index": 8, "name": "campaign_name", "comment": "The name of the campaign."}, "is_campaign_deleted": {"type": "boolean", "index": 9, "name": "is_campaign_deleted", "comment": "Whether the record has been deleted or not."}, "campaign_status": {"type": "text", "index": 10, "name": "campaign_status", "comment": "The status of the campaign."}, "campaign_currency": {"type": "text", "index": 11, "name": "campaign_currency", "comment": "The currency all metrics for the account are set to."}, "is_campaign_servable": {"type": "boolean", "index": 12, "name": "is_campaign_servable", "comment": "Whether the campaign is in a state to be actively served to users."}, "is_campaign_standard_delivery": {"type": "boolean", "index": 13, "name": "is_campaign_standard_delivery", "comment": "Whether standard delivery is enabled (vs accelerated delivery)."}, "campaign_frequency_cap": {"type": "integer", "index": 14, "name": "campaign_frequency_cap", "comment": "The maximum number of times an ad could be delivered to a user."}, "campaign_start_timestamp": {"type": "text", "index": 15, "name": "campaign_start_timestamp", "comment": "The time the campaign will start."}, "campaign_end_timestamp": {"type": "text", "index": 16, "name": "campaign_end_timestamp", "comment": "The time the campaign will end"}, "campaign_created_timestamp": {"type": "text", "index": 17, "name": "campaign_created_timestamp", "comment": "The timestamp the account was created."}, "campaign_updated_timestamp": {"type": "text", "index": 18, "name": "campaign_updated_timestamp", "comment": "The timestamp the account was last updated."}, "campaign_funding_instrument_id": {"type": "text", "index": 19, "name": "campaign_funding_instrument_id", "comment": "Reference to the funding instrument."}, "campaign_daily_budget_amount": {"type": "numeric", "index": 20, "name": "campaign_daily_budget_amount", "comment": "The daily budget amount to be allocated to the campaign. The currency associated with the specified funding instrument will be used."}, "campaign_total_budget_amount": {"type": "numeric", "index": 21, "name": "campaign_total_budget_amount", "comment": "The total budget amount to be allocated to the campaign."}, "clicks": {"type": "bigint", "index": 22, "name": "clicks", "comment": "The number of clicks on that date. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes."}, "impressions": {"type": "bigint", "index": 23, "name": "impressions", "comment": "The number of impressions on that date. This is the number of users who see a Promoted Ad either in their home timeline or search results."}, "spend": {"type": "numeric", "index": 24, "name": "spend", "comment": "The amount of spend on that date."}, "spend_micro": {"type": "bigint", "index": 25, "name": "spend_micro", "comment": "The amount of spend, in micros, on that date."}, "url_clicks": {"type": "bigint", "index": 26, "name": "url_clicks", "comment": "The number of URL clicks on that date."}, "total_conversions": {"type": "numeric", "index": 27, "name": "total_conversions", "comment": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric)."}, "total_conversions_sale_amount": {"type": "double precision", "index": 28, "name": "total_conversions_sale_amount", "comment": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount)."}, "conversion_purchases_metric": {"type": "numeric", "index": 29, "name": "conversion_purchases_metric", "comment": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_custom_metric": {"type": "numeric", "index": 30, "name": "conversion_custom_metric", "comment": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_purchases_sale_amount": {"type": "double precision", "index": 31, "name": "conversion_purchases_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}, "conversion_custom_sale_amount": {"type": "double precision", "index": 32, "name": "conversion_custom_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.twitter_ads__campaign_country_report"}, "model.twitter_ads.twitter_ads__campaign_region_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "twitter_ads__campaign_region_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the account and campaign level, within a placement in Twitter.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "region": {"type": "text", "index": 3, "name": "region", "comment": "Long-form name of the geopgraphic region being reported on."}, "country": {"type": "text", "index": 4, "name": "country", "comment": "Long-form name of the country being reported on."}, "placement": {"type": "text", "index": 5, "name": "placement", "comment": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`."}, "account_id": {"type": "text", "index": 6, "name": "account_id", "comment": "The ID of the related account."}, "account_name": {"type": "character varying", "index": 7, "name": "account_name", "comment": "The name of the related account."}, "campaign_id": {"type": "text", "index": 8, "name": "campaign_id", "comment": "The ID of the campaign."}, "campaign_name": {"type": "text", "index": 9, "name": "campaign_name", "comment": "The name of the campaign."}, "is_campaign_deleted": {"type": "boolean", "index": 10, "name": "is_campaign_deleted", "comment": "Whether the record has been deleted or not."}, "campaign_status": {"type": "text", "index": 11, "name": "campaign_status", "comment": "The status of the campaign."}, "campaign_currency": {"type": "text", "index": 12, "name": "campaign_currency", "comment": "The currency all metrics for the account are set to."}, "is_campaign_servable": {"type": "boolean", "index": 13, "name": "is_campaign_servable", "comment": "Whether the campaign is in a state to be actively served to users."}, "is_campaign_standard_delivery": {"type": "boolean", "index": 14, "name": "is_campaign_standard_delivery", "comment": "Whether standard delivery is enabled (vs accelerated delivery)."}, "campaign_frequency_cap": {"type": "integer", "index": 15, "name": "campaign_frequency_cap", "comment": "The maximum number of times an ad could be delivered to a user."}, "campaign_start_timestamp": {"type": "text", "index": 16, "name": "campaign_start_timestamp", "comment": "The time the campaign will start."}, "campaign_end_timestamp": {"type": "text", "index": 17, "name": "campaign_end_timestamp", "comment": "The time the campaign will end"}, "campaign_created_timestamp": {"type": "text", "index": 18, "name": "campaign_created_timestamp", "comment": "The timestamp the account was created."}, "campaign_updated_timestamp": {"type": "text", "index": 19, "name": "campaign_updated_timestamp", "comment": "The timestamp the account was last updated."}, "campaign_funding_instrument_id": {"type": "text", "index": 20, "name": "campaign_funding_instrument_id", "comment": "Reference to the funding instrument."}, "campaign_daily_budget_amount": {"type": "numeric", "index": 21, "name": "campaign_daily_budget_amount", "comment": "The daily budget amount to be allocated to the campaign. The currency associated with the specified funding instrument will be used."}, "campaign_total_budget_amount": {"type": "numeric", "index": 22, "name": "campaign_total_budget_amount", "comment": "The total budget amount to be allocated to the campaign."}, "clicks": {"type": "bigint", "index": 23, "name": "clicks", "comment": "The number of clicks on that date. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes."}, "impressions": {"type": "bigint", "index": 24, "name": "impressions", "comment": "The number of impressions on that date. This is the number of users who see a Promoted Ad either in their home timeline or search results."}, "spend": {"type": "numeric", "index": 25, "name": "spend", "comment": "The amount of spend on that date."}, "spend_micro": {"type": "bigint", "index": 26, "name": "spend_micro", "comment": "The amount of spend, in micros, on that date."}, "url_clicks": {"type": "bigint", "index": 27, "name": "url_clicks", "comment": "The number of URL clicks on that date."}, "total_conversions": {"type": "numeric", "index": 28, "name": "total_conversions", "comment": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric)."}, "total_conversions_sale_amount": {"type": "double precision", "index": 29, "name": "total_conversions_sale_amount", "comment": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount)."}, "conversion_purchases_metric": {"type": "numeric", "index": 30, "name": "conversion_purchases_metric", "comment": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_custom_metric": {"type": "numeric", "index": 31, "name": "conversion_custom_metric", "comment": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_purchases_sale_amount": {"type": "double precision", "index": 32, "name": "conversion_purchases_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}, "conversion_custom_sale_amount": {"type": "double precision", "index": 33, "name": "conversion_custom_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.twitter_ads__campaign_region_report"}, "model.twitter_ads.twitter_ads__campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "twitter_ads__campaign_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the account and campaign level, within a placement in Twitter.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "placement": {"type": "text", "index": 3, "name": "placement", "comment": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID of the related account."}, "account_name": {"type": "character varying", "index": 5, "name": "account_name", "comment": "The name of the related account."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID of the campaign."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the campaign."}, "is_deleted": {"type": "boolean", "index": 8, "name": "is_deleted", "comment": "Whether the record has been deleted or not."}, "campaign_status": {"type": "text", "index": 9, "name": "campaign_status", "comment": "The status of the campaign."}, "currency": {"type": "text", "index": 10, "name": "currency", "comment": "The currency all metrics for the account are set to."}, "is_servable": {"type": "boolean", "index": 11, "name": "is_servable", "comment": "Whether the campaign is in a state to be actively served to users."}, "is_standard_delivery": {"type": "boolean", "index": 12, "name": "is_standard_delivery", "comment": "Whether standard delivery is enabled (vs accelerated delivery)."}, "frequency_cap": {"type": "integer", "index": 13, "name": "frequency_cap", "comment": "The maximum number of times an ad could be delivered to a user."}, "start_timestamp": {"type": "text", "index": 14, "name": "start_timestamp", "comment": "The time the campaign will start."}, "end_timestamp": {"type": "text", "index": 15, "name": "end_timestamp", "comment": "The time the campaign will end"}, "created_timestamp": {"type": "text", "index": 16, "name": "created_timestamp", "comment": "The timestamp the account was created."}, "updated_timestamp": {"type": "text", "index": 17, "name": "updated_timestamp", "comment": "The timestamp the account was last updated."}, "funding_instrument_id": {"type": "text", "index": 18, "name": "funding_instrument_id", "comment": "Reference to the funding instrument."}, "daily_budget_amount": {"type": "numeric", "index": 19, "name": "daily_budget_amount", "comment": "The daily budget amount to be allocated to the campaign. The currency associated with the specified funding instrument will be used."}, "total_budget_amount": {"type": "numeric", "index": 20, "name": "total_budget_amount", "comment": "The total budget amount to be allocated to the campaign."}, "clicks": {"type": "bigint", "index": 21, "name": "clicks", "comment": "The number of clicks on that date. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes."}, "impressions": {"type": "bigint", "index": 22, "name": "impressions", "comment": "The number of impressions on that date. This is the number of users who see a Promoted Ad either in their home timeline or search results."}, "spend": {"type": "numeric", "index": 23, "name": "spend", "comment": "The amount of spend on that date."}, "spend_micro": {"type": "bigint", "index": 24, "name": "spend_micro", "comment": "The amount of spend, in micros, on that date."}, "url_clicks": {"type": "bigint", "index": 25, "name": "url_clicks", "comment": "The number of URL clicks on that date."}, "total_conversions": {"type": "numeric", "index": 26, "name": "total_conversions", "comment": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric)."}, "total_conversions_sale_amount": {"type": "double precision", "index": 27, "name": "total_conversions_sale_amount", "comment": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount)."}, "conversion_purchases_metric": {"type": "numeric", "index": 28, "name": "conversion_purchases_metric", "comment": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_custom_metric": {"type": "numeric", "index": 29, "name": "conversion_custom_metric", "comment": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_purchases_sale_amount": {"type": "double precision", "index": 30, "name": "conversion_purchases_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}, "conversion_custom_sale_amount": {"type": "double precision", "index": 31, "name": "conversion_custom_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.twitter_ads__campaign_report"}, "model.twitter_ads.twitter_ads__keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "twitter_ads__keyword_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the account, campaign, line item (ad group), and keyword level, within a placement in Twitter.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "placement": {"type": "text", "index": 3, "name": "placement", "comment": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID of the related account."}, "account_name": {"type": "character varying", "index": 5, "name": "account_name", "comment": "Name of the associated account."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID of the related campaign."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the related campaign."}, "line_item_id": {"type": "text", "index": 8, "name": "line_item_id", "comment": "The ID of the related line item (ad group)."}, "line_item_name": {"type": "text", "index": 9, "name": "line_item_name", "comment": "The ID of the related line item."}, "keyword_id": {"type": "text", "index": 10, "name": "keyword_id", "comment": "Unique key of the table built from the combination of 'account_id', 'line_item_id', 'segment', and 'placement' fields."}, "keyword": {"type": "text", "index": 11, "name": "keyword", "comment": "The keyword whose performance is being tracked."}, "currency": {"type": "text", "index": 12, "name": "currency", "comment": "The currency all metrics for the account are set to."}, "clicks": {"type": "bigint", "index": 13, "name": "clicks", "comment": "The clicks for the line item + keyword on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes."}, "impressions": {"type": "bigint", "index": 14, "name": "impressions", "comment": "The impressions for the line item + keyword on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results."}, "spend": {"type": "numeric", "index": 15, "name": "spend", "comment": "The spend for the line item + keyword on that day in whichever currency was selected during account creation."}, "spend_micro": {"type": "bigint", "index": 16, "name": "spend_micro", "comment": "The spend for the line item + keyword on that day, in micros and in whichever currency was selected during account creation."}, "url_clicks": {"type": "bigint", "index": 17, "name": "url_clicks", "comment": "The url clicks for the line item + keyword on that day."}, "total_conversions": {"type": "numeric", "index": 18, "name": "total_conversions", "comment": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric)."}, "total_conversions_sale_amount": {"type": "double precision", "index": 19, "name": "total_conversions_sale_amount", "comment": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount)."}, "conversion_purchases_metric": {"type": "numeric", "index": 20, "name": "conversion_purchases_metric", "comment": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_custom_metric": {"type": "numeric", "index": 21, "name": "conversion_custom_metric", "comment": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_purchases_sale_amount": {"type": "double precision", "index": 22, "name": "conversion_purchases_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}, "conversion_custom_sale_amount": {"type": "double precision", "index": 23, "name": "conversion_custom_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.twitter_ads__keyword_report"}, "model.twitter_ads.twitter_ads__line_item_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "twitter_ads__line_item_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the account, campaign, and line item (ad group) level, within a placement in Twitter.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "placement": {"type": "text", "index": 3, "name": "placement", "comment": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID of the related account."}, "account_name": {"type": "character varying", "index": 5, "name": "account_name", "comment": "The name of the related account."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID of the line item's campaign."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the line item's campaign."}, "line_item_id": {"type": "text", "index": 8, "name": "line_item_id", "comment": "The ID of the line item."}, "line_item_name": {"type": "text", "index": 9, "name": "line_item_name", "comment": "The name of the line item."}, "is_deleted": {"type": "boolean", "index": 10, "name": "is_deleted", "comment": "Whether the record has been deleted or not."}, "line_item_status": {"type": "text", "index": 11, "name": "line_item_status", "comment": "The status of the line item."}, "campaign_status": {"type": "text", "index": 12, "name": "campaign_status", "comment": "The status of the line item's related campaign."}, "currency": {"type": "text", "index": 13, "name": "currency", "comment": "The currency in which metrics will be reported."}, "advertiser_domain": {"type": "text", "index": 14, "name": "advertiser_domain", "comment": "The website domain for this advertiser, without the protocol specification."}, "advertiser_user_id": {"type": "integer", "index": 15, "name": "advertiser_user_id", "comment": "The Twitter user identifier for the handle promoting the ad."}, "bid_type": {"type": "text", "index": 16, "name": "bid_type", "comment": "The bidding mechanism."}, "bid_unit": {"type": "text", "index": 17, "name": "bid_unit", "comment": "The bid unit for this line item."}, "charge_by": {"type": "text", "index": 18, "name": "charge_by", "comment": "The unit to charge this line item by."}, "objective": {"type": "text", "index": 19, "name": "objective", "comment": "The campaign objective for this line item."}, "optimization": {"type": "text", "index": 20, "name": "optimization", "comment": "The optimization setting to use with this line item."}, "product_type": {"type": "text", "index": 21, "name": "product_type", "comment": "The type of promoted product that this line item will contain."}, "primary_web_event_tag": {"type": "integer", "index": 22, "name": "primary_web_event_tag", "comment": "The identifier of the primary web event tag. Allows more accurate tracking of engagements for the campaign pertaining to this line item."}, "creative_source": {"type": "text", "index": 23, "name": "creative_source", "comment": "The source of the creatives for the line item."}, "start_timestamp": {"type": "integer", "index": 24, "name": "start_timestamp", "comment": "The timestamp at which the line item will start being served."}, "end_timestamp": {"type": "integer", "index": 25, "name": "end_timestamp", "comment": "The timestamp at which the line item will stop being served."}, "created_timestamp": {"type": "text", "index": 26, "name": "created_timestamp", "comment": "The timestamp the account was created."}, "updated_timestamp": {"type": "text", "index": 27, "name": "updated_timestamp", "comment": "The timestamp the account was last updated."}, "target_cpa": {"type": "numeric", "index": 28, "name": "target_cpa", "comment": "The target cost per acquisition for the line item."}, "total_budget_amount": {"type": "numeric", "index": 29, "name": "total_budget_amount", "comment": "The total budget amount to be allocated to the campaign."}, "bid_amount": {"type": "numeric", "index": 30, "name": "bid_amount", "comment": "The bid amount to be associated with this line item."}, "clicks": {"type": "bigint", "index": 31, "name": "clicks", "comment": "The number of clicks on that date. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes."}, "impressions": {"type": "bigint", "index": 32, "name": "impressions", "comment": "The number of impressions on that date. This is the number of users who see a Promoted Ad either in their home timeline or search results."}, "spend": {"type": "numeric", "index": 33, "name": "spend", "comment": "The amount of spend on that date."}, "spend_micro": {"type": "bigint", "index": 34, "name": "spend_micro", "comment": "The amount of spend, in micros, on that date."}, "url_clicks": {"type": "bigint", "index": 35, "name": "url_clicks", "comment": "The number of URL clicks on that date."}, "total_conversions": {"type": "numeric", "index": 36, "name": "total_conversions", "comment": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric)."}, "total_conversions_sale_amount": {"type": "double precision", "index": 37, "name": "total_conversions_sale_amount", "comment": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount)."}, "conversion_purchases_metric": {"type": "numeric", "index": 38, "name": "conversion_purchases_metric", "comment": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_custom_metric": {"type": "numeric", "index": 39, "name": "conversion_custom_metric", "comment": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_purchases_sale_amount": {"type": "double precision", "index": 40, "name": "conversion_purchases_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}, "conversion_custom_sale_amount": {"type": "double precision", "index": 41, "name": "conversion_custom_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.twitter_ads__line_item_report"}, "model.twitter_ads.twitter_ads__promoted_tweet_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "twitter_ads__promoted_tweet_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the account, campaign, line item (ad group), and promoted tweet level, within a placement in Twitter.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "placement": {"type": "text", "index": 3, "name": "placement", "comment": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID of the related account."}, "account_name": {"type": "character varying", "index": 5, "name": "account_name", "comment": "The name of the related account."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID of the related campaign."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the related campaign."}, "line_item_id": {"type": "text", "index": 8, "name": "line_item_id", "comment": "The ID of the related line item (ad group)."}, "line_item_name": {"type": "text", "index": 9, "name": "line_item_name", "comment": "The ID of the related line item."}, "promoted_tweet_id": {"type": "text", "index": 10, "name": "promoted_tweet_id", "comment": "The ID of the promoted tweet that the URL appeared in."}, "tweet_id": {"type": "bigint", "index": 11, "name": "tweet_id", "comment": "The ID of the tweet that the URL appeared in."}, "tweet_name": {"type": "integer", "index": 12, "name": "tweet_name", "comment": "The name, if provided, of the tweet that the URL appeared in."}, "full_text": {"type": "text", "index": 13, "name": "full_text", "comment": "The full text of the tweet that the URL appeared in."}, "is_deleted": {"type": "boolean", "index": 14, "name": "is_deleted", "comment": "Whether the record has been deleted or not."}, "promoted_tweet_status": {"type": "text", "index": 15, "name": "promoted_tweet_status", "comment": "The status of the promoted tweet."}, "campaign_status": {"type": "text", "index": 16, "name": "campaign_status", "comment": "The status of the tweet's campaign."}, "line_item_status": {"type": "text", "index": 17, "name": "line_item_status", "comment": "The status of the tweet's line item."}, "language": {"type": "text", "index": 18, "name": "language", "comment": "Two-letter language code of the tweet."}, "currency": {"type": "text", "index": 19, "name": "currency", "comment": "The currency all metrics for the account are set to."}, "approval_status": {"type": "text", "index": 20, "name": "approval_status", "comment": "The approval status of the promoted tweet."}, "created_timestamp": {"type": "text", "index": 21, "name": "created_timestamp", "comment": "The timestamp the account was created."}, "updated_timestamp": {"type": "text", "index": 22, "name": "updated_timestamp", "comment": "The timestamp the account was last updated."}, "clicks": {"type": "bigint", "index": 23, "name": "clicks", "comment": "The clicks for the promoted tweet + URL on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes."}, "impressions": {"type": "bigint", "index": 24, "name": "impressions", "comment": "The impressions for the promoted tweet + URL on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results."}, "spend": {"type": "numeric", "index": 25, "name": "spend", "comment": "The spend for the promoted tweet + URL on that day."}, "spend_micro": {"type": "bigint", "index": 26, "name": "spend_micro", "comment": "The spend, in micros, for the tweet + URL on that day."}, "url_clicks": {"type": "bigint", "index": 27, "name": "url_clicks", "comment": "The URL clicks for the promoted tweet + URL on that day."}, "total_conversions": {"type": "numeric", "index": 28, "name": "total_conversions", "comment": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric)."}, "total_conversions_sale_amount": {"type": "double precision", "index": 29, "name": "total_conversions_sale_amount", "comment": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount)."}, "conversion_purchases_metric": {"type": "numeric", "index": 30, "name": "conversion_purchases_metric", "comment": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_custom_metric": {"type": "numeric", "index": 31, "name": "conversion_custom_metric", "comment": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_purchases_sale_amount": {"type": "double precision", "index": 32, "name": "conversion_purchases_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}, "conversion_custom_sale_amount": {"type": "double precision", "index": 33, "name": "conversion_custom_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.twitter_ads__promoted_tweet_report"}, "model.twitter_ads.twitter_ads__url_report": {"metadata": {"type": "BASE TABLE", "schema": "public_ad_reporting_dev", "name": "twitter_ads__url_report", "database": "postgres", "comment": "Each record in this table represents the daily performance of ads at the account, campaign, line item (ad group), promoted tweet, and url level, within a placement in Twitter.\n", "owner": "postgres"}, "columns": {"source_relation": {"type": "text", "index": 1, "name": "source_relation", "comment": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "date_day": {"type": "timestamp without time zone", "index": 2, "name": "date_day", "comment": "The date of the performance."}, "placement": {"type": "text", "index": 3, "name": "placement", "comment": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`."}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": "The ID of the related account."}, "account_name": {"type": "character varying", "index": 5, "name": "account_name", "comment": "The name of the related account."}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": "The ID of the related campaign."}, "campaign_name": {"type": "text", "index": 7, "name": "campaign_name", "comment": "The name of the related campaign."}, "line_item_id": {"type": "text", "index": 8, "name": "line_item_id", "comment": "The ID of the related line item (ad group)."}, "line_item_name": {"type": "text", "index": 9, "name": "line_item_name", "comment": "The ID of the related line item."}, "promoted_tweet_id": {"type": "text", "index": 10, "name": "promoted_tweet_id", "comment": "The ID of the promoted tweet that the URL appeared in."}, "tweet_id": {"type": "bigint", "index": 11, "name": "tweet_id", "comment": "The ID of the tweet that the URL appeared in."}, "tweet_name": {"type": "integer", "index": 12, "name": "tweet_name", "comment": "The name, if provided, of the tweet that the URL appeared in."}, "tweet_full_text": {"type": "text", "index": 13, "name": "tweet_full_text", "comment": "The full text of the tweet that the URL appeared in."}, "base_url": {"type": "text", "index": 14, "name": "base_url", "comment": "The base URL of the ad, extracted from the `expanded_url`."}, "url_host": {"type": "text", "index": 15, "name": "url_host", "comment": "The URL host of the ad, extracted from the `expanded_url`."}, "url_path": {"type": "text", "index": 16, "name": "url_path", "comment": "The URL path of the ad, extracted from the `expanded_url`."}, "utm_source": {"type": "text", "index": 17, "name": "utm_source", "comment": "The utm_source parameter of the ad, extracted from the `expanded_url`."}, "utm_medium": {"type": "text", "index": 18, "name": "utm_medium", "comment": "The utm_medium parameter of the ad, extracted from the `expanded_url`."}, "utm_campaign": {"type": "text", "index": 19, "name": "utm_campaign", "comment": "The utm_campaign parameter of the ad, extracted from the `expanded_url`."}, "utm_content": {"type": "text", "index": 20, "name": "utm_content", "comment": "The utm_content parameter of the ad, extracted from the `expanded_url`."}, "utm_term": {"type": "text", "index": 21, "name": "utm_term", "comment": "The utm_term parameter of the ad, extracted from the `expanded_url`."}, "expanded_url": {"type": "text", "index": 22, "name": "expanded_url", "comment": "The fully expanded URL."}, "display_url": {"type": "text", "index": 23, "name": "display_url", "comment": "The URL as it will be displayed."}, "currency": {"type": "text", "index": 24, "name": "currency", "comment": "The currency all metrics for the account are set to."}, "clicks": {"type": "bigint", "index": 25, "name": "clicks", "comment": "The clicks for the promoted tweet + URL on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes."}, "impressions": {"type": "bigint", "index": 26, "name": "impressions", "comment": "The impressions for the promoted tweet + URL on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results."}, "spend": {"type": "numeric", "index": 27, "name": "spend", "comment": "The spend for the promoted tweet + URL on that day."}, "spend_micro": {"type": "bigint", "index": 28, "name": "spend_micro", "comment": "The spend, in micros, for the tweet + URL on that day."}, "url_clicks": {"type": "bigint", "index": 29, "name": "url_clicks", "comment": "The URL clicks for the promoted tweet + URL on that day."}, "total_conversions": {"type": "numeric", "index": 30, "name": "total_conversions", "comment": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric)."}, "total_conversions_sale_amount": {"type": "double precision", "index": 31, "name": "total_conversions_sale_amount", "comment": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount)."}, "conversion_purchases_metric": {"type": "numeric", "index": 32, "name": "conversion_purchases_metric", "comment": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_custom_metric": {"type": "numeric", "index": 33, "name": "conversion_custom_metric", "comment": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default."}, "conversion_purchases_sale_amount": {"type": "double precision", "index": 34, "name": "conversion_purchases_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}, "conversion_custom_sale_amount": {"type": "double precision", "index": 35, "name": "conversion_custom_sale_amount", "comment": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default."}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.twitter_ads.twitter_ads__url_report"}}, "sources": {"source.amazon_ads.amazon_ads.ad_group_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_ad_group_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "creation_date": {"type": "text", "index": 5, "name": "creation_date", "comment": null}, "default_bid": {"type": "double precision", "index": 6, "name": "default_bid", "comment": null}, "name": {"type": "text", "index": 7, "name": "name", "comment": null}, "serving_status": {"type": "text", "index": 8, "name": "serving_status", "comment": null}, "state": {"type": "text", "index": 9, "name": "state", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.amazon_ads.amazon_ads.ad_group_history"}, "source.amazon_ads.amazon_ads.ad_group_level_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_ad_group_level_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "campaign_bidding_strategy": {"type": "text", "index": 4, "name": "campaign_bidding_strategy", "comment": null}, "clicks": {"type": "integer", "index": 5, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 6, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.amazon_ads.amazon_ads.ad_group_level_report"}, "source.amazon_ads.amazon_ads.advertised_product_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_advertised_product_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "integer", "index": 2, "name": "ad_id", "comment": null}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 4, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "campaign_budget_amount": {"type": "double precision", "index": 6, "name": "campaign_budget_amount", "comment": null}, "campaign_budget_currency_code": {"type": "text", "index": 7, "name": "campaign_budget_currency_code", "comment": null}, "campaign_budget_type": {"type": "text", "index": 8, "name": "campaign_budget_type", "comment": null}, "clicks": {"type": "integer", "index": 9, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 10, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 11, "name": "impressions", "comment": null}, "advertised_asin": {"type": "integer", "index": 12, "name": "advertised_asin", "comment": null}, "advertised_sku": {"type": "integer", "index": 13, "name": "advertised_sku", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.amazon_ads.amazon_ads.advertised_product_report"}, "source.amazon_ads.amazon_ads.campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "bidding_strategy": {"type": "text", "index": 4, "name": "bidding_strategy", "comment": null}, "creation_date": {"type": "text", "index": 5, "name": "creation_date", "comment": null}, "budget": {"type": "integer", "index": 6, "name": "budget", "comment": null}, "end_date": {"type": "integer", "index": 7, "name": "end_date", "comment": null}, "name": {"type": "text", "index": 8, "name": "name", "comment": null}, "portfolio_id": {"type": "integer", "index": 9, "name": "portfolio_id", "comment": null}, "profile_id": {"type": "integer", "index": 10, "name": "profile_id", "comment": null}, "serving_status": {"type": "text", "index": 11, "name": "serving_status", "comment": null}, "start_date": {"type": "date", "index": 12, "name": "start_date", "comment": null}, "state": {"type": "text", "index": 13, "name": "state", "comment": null}, "targeting_type": {"type": "text", "index": 14, "name": "targeting_type", "comment": null}, "budget_type": {"type": "text", "index": 15, "name": "budget_type", "comment": null}, "effective_budget": {"type": "integer", "index": 16, "name": "effective_budget", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.amazon_ads.amazon_ads.campaign_history"}, "source.amazon_ads.amazon_ads.campaign_level_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_campaign_level_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "campaign_applicable_budget_rule_id": {"type": "integer", "index": 4, "name": "campaign_applicable_budget_rule_id", "comment": null}, "campaign_applicable_budget_rule_name": {"type": "integer", "index": 5, "name": "campaign_applicable_budget_rule_name", "comment": null}, "campaign_bidding_strategy": {"type": "text", "index": 6, "name": "campaign_bidding_strategy", "comment": null}, "campaign_budget_amount": {"type": "double precision", "index": 7, "name": "campaign_budget_amount", "comment": null}, "campaign_budget_currency_code": {"type": "text", "index": 8, "name": "campaign_budget_currency_code", "comment": null}, "campaign_budget_type": {"type": "text", "index": 9, "name": "campaign_budget_type", "comment": null}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 11, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 12, "name": "impressions", "comment": null}, "campaign_rule_based_budget_amount": {"type": "integer", "index": 13, "name": "campaign_rule_based_budget_amount", "comment": null}, "sales_7_d": {"type": "integer", "index": 14, "name": "sales_7_d", "comment": null}, "purchases_30_d": {"type": "integer", "index": 15, "name": "purchases_30_d", "comment": null}, "sales_30_d": {"type": "integer", "index": 16, "name": "sales_30_d", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.amazon_ads.amazon_ads.campaign_level_report"}, "source.amazon_ads.amazon_ads.keyword_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_keyword_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "ad_group_id": {"type": "integer", "index": 4, "name": "ad_group_id", "comment": null}, "bid": {"type": "double precision", "index": 5, "name": "bid", "comment": null}, "campaign_id": {"type": "integer", "index": 6, "name": "campaign_id", "comment": null}, "creation_date": {"type": "text", "index": 7, "name": "creation_date", "comment": null}, "keyword_text": {"type": "text", "index": 8, "name": "keyword_text", "comment": null}, "match_type": {"type": "text", "index": 9, "name": "match_type", "comment": null}, "native_language_keyword": {"type": "integer", "index": 10, "name": "native_language_keyword", "comment": null}, "serving_status": {"type": "text", "index": 11, "name": "serving_status", "comment": null}, "state": {"type": "text", "index": 12, "name": "state", "comment": null}, "native_language_locale": {"type": "integer", "index": 13, "name": "native_language_locale", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.amazon_ads.amazon_ads.keyword_history"}, "source.amazon_ads.amazon_ads.portfolio_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_portfolio_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "budget_amount": {"type": "integer", "index": 4, "name": "budget_amount", "comment": null}, "budget_currency_code": {"type": "integer", "index": 5, "name": "budget_currency_code", "comment": null}, "budget_end_date": {"type": "integer", "index": 6, "name": "budget_end_date", "comment": null}, "budget_policy": {"type": "integer", "index": 7, "name": "budget_policy", "comment": null}, "budget_start_date": {"type": "integer", "index": 8, "name": "budget_start_date", "comment": null}, "creation_date": {"type": "text", "index": 9, "name": "creation_date", "comment": null}, "in_budget": {"type": "boolean", "index": 10, "name": "in_budget", "comment": null}, "name": {"type": "text", "index": 11, "name": "name", "comment": null}, "profile_id": {"type": "integer", "index": 12, "name": "profile_id", "comment": null}, "serving_status": {"type": "text", "index": 13, "name": "serving_status", "comment": null}, "state": {"type": "text", "index": 14, "name": "state", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.amazon_ads.amazon_ads.portfolio_history"}, "source.amazon_ads.amazon_ads.product_ad_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_product_ad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_updated_date": {"type": "text", "index": 2, "name": "last_updated_date", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "ad_group_id": {"type": "integer", "index": 4, "name": "ad_group_id", "comment": null}, "asin": {"type": "text", "index": 5, "name": "asin", "comment": null}, "campaign_id": {"type": "integer", "index": 6, "name": "campaign_id", "comment": null}, "creation_date": {"type": "text", "index": 7, "name": "creation_date", "comment": null}, "serving_status": {"type": "text", "index": 8, "name": "serving_status", "comment": null}, "sku": {"type": "integer", "index": 9, "name": "sku", "comment": null}, "state": {"type": "text", "index": 10, "name": "state", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.amazon_ads.amazon_ads.product_ad_history"}, "source.amazon_ads.amazon_ads.profile": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_profile_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_deleted": {"type": "boolean", "index": 2, "name": "_fivetran_deleted", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": null}, "account_marketplace_string_id": {"type": "text", "index": 5, "name": "account_marketplace_string_id", "comment": null}, "account_name": {"type": "text", "index": 6, "name": "account_name", "comment": null}, "account_sub_type": {"type": "integer", "index": 7, "name": "account_sub_type", "comment": null}, "account_type": {"type": "text", "index": 8, "name": "account_type", "comment": null}, "account_valid_payment_method": {"type": "boolean", "index": 9, "name": "account_valid_payment_method", "comment": null}, "country_code": {"type": "text", "index": 10, "name": "country_code", "comment": null}, "currency_code": {"type": "text", "index": 11, "name": "currency_code", "comment": null}, "daily_budget": {"type": "integer", "index": 12, "name": "daily_budget", "comment": null}, "timezone": {"type": "text", "index": 13, "name": "timezone", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.amazon_ads.amazon_ads.profile"}, "source.amazon_ads.amazon_ads.search_term_ad_keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_search_term_ad_keyword_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "keyword_id": {"type": "integer", "index": 4, "name": "keyword_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "campaign_budget_amount": {"type": "double precision", "index": 6, "name": "campaign_budget_amount", "comment": null}, "campaign_budget_currency_code": {"type": "text", "index": 7, "name": "campaign_budget_currency_code", "comment": null}, "campaign_budget_type": {"type": "text", "index": 8, "name": "campaign_budget_type", "comment": null}, "clicks": {"type": "integer", "index": 9, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 10, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 11, "name": "impressions", "comment": null}, "keyword_bid": {"type": "double precision", "index": 12, "name": "keyword_bid", "comment": null}, "search_term": {"type": "text", "index": 13, "name": "search_term", "comment": null}, "targeting": {"type": "text", "index": 14, "name": "targeting", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.amazon_ads.amazon_ads.search_term_ad_keyword_report"}, "source.amazon_ads.amazon_ads.targeting_keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "amazon_ads_targeting_keyword_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "keyword_id": {"type": "integer", "index": 4, "name": "keyword_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "ad_keyword_status": {"type": "text", "index": 6, "name": "ad_keyword_status", "comment": null}, "campaign_budget_amount": {"type": "double precision", "index": 7, "name": "campaign_budget_amount", "comment": null}, "campaign_budget_currency_code": {"type": "text", "index": 8, "name": "campaign_budget_currency_code", "comment": null}, "campaign_budget_type": {"type": "text", "index": 9, "name": "campaign_budget_type", "comment": null}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": null}, "cost": {"type": "double precision", "index": 11, "name": "cost", "comment": null}, "impressions": {"type": "integer", "index": 12, "name": "impressions", "comment": null}, "keyword_bid": {"type": "double precision", "index": 13, "name": "keyword_bid", "comment": null}, "keyword_type": {"type": "text", "index": 14, "name": "keyword_type", "comment": null}, "match_type": {"type": "text", "index": 15, "name": "match_type", "comment": null}, "targeting": {"type": "text", "index": 16, "name": "targeting", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.amazon_ads.amazon_ads.targeting_keyword_report"}, "source.apple_search_ads.apple_search_ads.ad_group_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_ad_group_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "timestamp without time zone", "index": 2, "name": "modification_time", "comment": null}, "automated_keywords_opt_in": {"type": "boolean", "index": 3, "name": "automated_keywords_opt_in", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "cpa_goal_amount": {"type": "integer", "index": 5, "name": "cpa_goal_amount", "comment": null}, "cpa_goal_currency": {"type": "integer", "index": 6, "name": "cpa_goal_currency", "comment": null}, "default_cpc_bid_amount": {"type": "integer", "index": 7, "name": "default_cpc_bid_amount", "comment": null}, "default_cpc_bid_currency": {"type": "integer", "index": 8, "name": "default_cpc_bid_currency", "comment": null}, "deleted": {"type": "boolean", "index": 9, "name": "deleted", "comment": null}, "end_time": {"type": "timestamp without time zone", "index": 10, "name": "end_time", "comment": null}, "name": {"type": "text", "index": 11, "name": "name", "comment": null}, "organization_id": {"type": "integer", "index": 12, "name": "organization_id", "comment": null}, "serving_state_reasons": {"type": "integer", "index": 13, "name": "serving_state_reasons", "comment": null}, "serving_status": {"type": "text", "index": 14, "name": "serving_status", "comment": null}, "start_time": {"type": "timestamp without time zone", "index": 15, "name": "start_time", "comment": null}, "status": {"type": "text", "index": 16, "name": "status", "comment": null}, "storefronts": {"type": "integer", "index": 17, "name": "storefronts", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads.apple_search_ads.ad_group_history"}, "source.apple_search_ads.apple_search_ads.ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_ad_group_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "integer", "index": 1, "name": "ad_group_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "avg_cpa_amount": {"type": "double precision", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "text", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "double precision", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "text", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "double precision", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "integer", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "integer", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "integer", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "double precision", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "integer", "index": 17, "name": "taps", "comment": null}, "tap_installs": {"type": "integer", "index": 18, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 19, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 20, "name": "tap_redownloads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads.apple_search_ads.ad_group_report"}, "source.apple_search_ads.apple_search_ads.ad_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_ad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"creation_time": {"type": "timestamp without time zone", "index": 1, "name": "creation_time", "comment": null}, "modification_time": {"type": "timestamp without time zone", "index": 2, "name": "modification_time", "comment": null}, "org_id": {"type": "integer", "index": 3, "name": "org_id", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "integer", "index": 5, "name": "ad_group_id", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "id": {"type": "integer", "index": 7, "name": "id", "comment": null}, "creative_id": {"type": "integer", "index": 8, "name": "creative_id", "comment": null}, "creative_type": {"type": "text", "index": 9, "name": "creative_type", "comment": null}, "status": {"type": "text", "index": 10, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads.apple_search_ads.ad_history"}, "source.apple_search_ads.apple_search_ads.ad_level_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_ad_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "integer", "index": 3, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "integer", "index": 4, "name": "ad_id", "comment": null}, "impressions": {"type": "integer", "index": 5, "name": "impressions", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 6, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 7, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 8, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 9, "name": "redownloads", "comment": null}, "tap_installs": {"type": "integer", "index": 10, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 11, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 12, "name": "tap_redownloads", "comment": null}, "taps": {"type": "integer", "index": 13, "name": "taps", "comment": null}, "conversions": {"type": "integer", "index": 14, "name": "conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads.apple_search_ads.ad_level_report"}, "source.apple_search_ads.apple_search_ads.campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "timestamp without time zone", "index": 2, "name": "modification_time", "comment": null}, "adam_id": {"type": "integer", "index": 3, "name": "adam_id", "comment": null}, "budget_amount": {"type": "integer", "index": 4, "name": "budget_amount", "comment": null}, "budget_currency": {"type": "text", "index": 5, "name": "budget_currency", "comment": null}, "budget_orders": {"type": "text", "index": 6, "name": "budget_orders", "comment": null}, "daily_budget_amount": {"type": "integer", "index": 7, "name": "daily_budget_amount", "comment": null}, "daily_budget_currency": {"type": "text", "index": 8, "name": "daily_budget_currency", "comment": null}, "deleted": {"type": "boolean", "index": 9, "name": "deleted", "comment": null}, "end_time": {"type": "timestamp without time zone", "index": 10, "name": "end_time", "comment": null}, "loc_invoice_detail_buyer_email": {"type": "integer", "index": 11, "name": "loc_invoice_detail_buyer_email", "comment": null}, "loc_invoice_detail_buyer_name": {"type": "integer", "index": 12, "name": "loc_invoice_detail_buyer_name", "comment": null}, "loc_invoice_detail_client_name": {"type": "integer", "index": 13, "name": "loc_invoice_detail_client_name", "comment": null}, "loc_invoice_detail_order_number": {"type": "integer", "index": 14, "name": "loc_invoice_detail_order_number", "comment": null}, "name": {"type": "text", "index": 15, "name": "name", "comment": null}, "organization_id": {"type": "integer", "index": 16, "name": "organization_id", "comment": null}, "payment_model": {"type": "text", "index": 17, "name": "payment_model", "comment": null}, "serving_state_reasons": {"type": "text", "index": 18, "name": "serving_state_reasons", "comment": null}, "serving_status": {"type": "text", "index": 19, "name": "serving_status", "comment": null}, "start_time": {"type": "timestamp without time zone", "index": 20, "name": "start_time", "comment": null}, "status": {"type": "text", "index": 21, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads.apple_search_ads.campaign_history"}, "source.apple_search_ads.apple_search_ads.campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_campaign_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "id": {"type": "integer", "index": 2, "name": "id", "comment": null}, "avg_cpa_amount": {"type": "double precision", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "text", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "double precision", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "text", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "double precision", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "integer", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "integer", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "integer", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "double precision", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "integer", "index": 17, "name": "taps", "comment": null}, "tap_installs": {"type": "integer", "index": 18, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 19, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 20, "name": "tap_redownloads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads.apple_search_ads.campaign_report"}, "source.apple_search_ads.apple_search_ads.keyword_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_keyword_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "modification_time": {"type": "timestamp without time zone", "index": 2, "name": "modification_time", "comment": null}, "ad_group_id": {"type": "integer", "index": 3, "name": "ad_group_id", "comment": null}, "bid_amount": {"type": "double precision", "index": 4, "name": "bid_amount", "comment": null}, "bid_currency": {"type": "text", "index": 5, "name": "bid_currency", "comment": null}, "campaign_id": {"type": "integer", "index": 6, "name": "campaign_id", "comment": null}, "deleted": {"type": "boolean", "index": 7, "name": "deleted", "comment": null}, "match_type": {"type": "text", "index": 8, "name": "match_type", "comment": null}, "status": {"type": "text", "index": 9, "name": "status", "comment": null}, "text": {"type": "text", "index": 10, "name": "text", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads.apple_search_ads.keyword_history"}, "source.apple_search_ads.apple_search_ads.keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_keyword_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "id": {"type": "integer", "index": 2, "name": "id", "comment": null}, "avg_cpa_amount": {"type": "double precision", "index": 3, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "text", "index": 4, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "double precision", "index": 5, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "text", "index": 6, "name": "avg_cpt_currency", "comment": null}, "conversion_rate": {"type": "double precision", "index": 7, "name": "conversion_rate", "comment": null}, "conversions": {"type": "integer", "index": 8, "name": "conversions", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "lat_off_installs": {"type": "integer", "index": 10, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "integer", "index": 11, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 12, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 13, "name": "local_spend_currency", "comment": null}, "new_downloads": {"type": "integer", "index": 14, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 15, "name": "redownloads", "comment": null}, "tap_through_rate": {"type": "double precision", "index": 16, "name": "tap_through_rate", "comment": null}, "taps": {"type": "integer", "index": 17, "name": "taps", "comment": null}, "tap_installs": {"type": "integer", "index": 18, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 19, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 20, "name": "tap_redownloads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads.apple_search_ads.keyword_report"}, "source.apple_search_ads.apple_search_ads.organization": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_organization_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "currency": {"type": "text", "index": 2, "name": "currency", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "payment_model": {"type": "text", "index": 4, "name": "payment_model", "comment": null}, "role_names": {"type": "text", "index": 5, "name": "role_names", "comment": null}, "time_zone": {"type": "text", "index": 6, "name": "time_zone", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads.apple_search_ads.organization"}, "source.apple_search_ads.apple_search_ads.search_term_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "apple_search_search_term_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "ad_group_id": {"type": "integer", "index": 2, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "integer", "index": 3, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 4, "name": "date", "comment": null}, "ad_group_deleted": {"type": "boolean", "index": 5, "name": "ad_group_deleted", "comment": null}, "ad_group_name": {"type": "text", "index": 6, "name": "ad_group_name", "comment": null}, "avg_cpa_amount": {"type": "double precision", "index": 7, "name": "avg_cpa_amount", "comment": null}, "avg_cpa_currency": {"type": "text", "index": 8, "name": "avg_cpa_currency", "comment": null}, "avg_cpt_amount": {"type": "double precision", "index": 9, "name": "avg_cpt_amount", "comment": null}, "avg_cpt_currency": {"type": "text", "index": 10, "name": "avg_cpt_currency", "comment": null}, "bid_amount_amount": {"type": "double precision", "index": 11, "name": "bid_amount_amount", "comment": null}, "bid_amount_currency": {"type": "text", "index": 12, "name": "bid_amount_currency", "comment": null}, "conversion_rate": {"type": "double precision", "index": 13, "name": "conversion_rate", "comment": null}, "conversions": {"type": "integer", "index": 14, "name": "conversions", "comment": null}, "deleted": {"type": "boolean", "index": 15, "name": "deleted", "comment": null}, "impressions": {"type": "integer", "index": 16, "name": "impressions", "comment": null}, "keyword": {"type": "text", "index": 17, "name": "keyword", "comment": null}, "keyword_display_status": {"type": "text", "index": 18, "name": "keyword_display_status", "comment": null}, "keyword_id": {"type": "integer", "index": 19, "name": "keyword_id", "comment": null}, "lat_off_installs": {"type": "integer", "index": 20, "name": "lat_off_installs", "comment": null}, "lat_on_installs": {"type": "integer", "index": 21, "name": "lat_on_installs", "comment": null}, "local_spend_amount": {"type": "double precision", "index": 22, "name": "local_spend_amount", "comment": null}, "local_spend_currency": {"type": "text", "index": 23, "name": "local_spend_currency", "comment": null}, "match_type": {"type": "text", "index": 24, "name": "match_type", "comment": null}, "new_downloads": {"type": "integer", "index": 25, "name": "new_downloads", "comment": null}, "redownloads": {"type": "integer", "index": 26, "name": "redownloads", "comment": null}, "search_term_source": {"type": "text", "index": 27, "name": "search_term_source", "comment": null}, "search_term_text": {"type": "text", "index": 28, "name": "search_term_text", "comment": null}, "tap_through_rate": {"type": "double precision", "index": 29, "name": "tap_through_rate", "comment": null}, "taps": {"type": "integer", "index": 30, "name": "taps", "comment": null}, "tap_installs": {"type": "integer", "index": 31, "name": "tap_installs", "comment": null}, "tap_new_downloads": {"type": "integer", "index": 32, "name": "tap_new_downloads", "comment": null}, "tap_redownloads": {"type": "integer", "index": 33, "name": "tap_redownloads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.apple_search_ads.apple_search_ads.search_term_report"}, "source.facebook_ads.facebook_ads.account_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_account_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "character varying", "index": 2, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.facebook_ads.facebook_ads.account_history"}, "source.facebook_ads.facebook_ads.ad_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_ad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "ad_set_id": {"type": "bigint", "index": 3, "name": "ad_set_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": null}, "creative_id": {"type": "bigint", "index": 5, "name": "creative_id", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}, "updated_time": {"type": "timestamp without time zone", "index": 8, "name": "updated_time", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.facebook_ads.facebook_ads.ad_history"}, "source.facebook_ads.facebook_ads.ad_set_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_ad_set_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "updated_time": {"type": "timestamp without time zone", "index": 6, "name": "updated_time", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.facebook_ads.facebook_ads.ad_set_history"}, "source.facebook_ads.facebook_ads.basic_ad_action_values": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_basic_ad_action_values_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "integer", "index": 1, "name": "ad_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "_fivetran_id": {"type": "text", "index": 3, "name": "_fivetran_id", "comment": null}, "index": {"type": "integer", "index": 4, "name": "index", "comment": null}, "action_type": {"type": "text", "index": 5, "name": "action_type", "comment": null}, "value": {"type": "double precision", "index": 6, "name": "value", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}, "_7_d_click": {"type": "double precision", "index": 8, "name": "_7_d_click", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.facebook_ads.facebook_ads.basic_ad_action_values"}, "source.facebook_ads.facebook_ads.basic_ad_actions": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_basic_ad_actions_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "ad_id": {"type": "integer", "index": 2, "name": "ad_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "index": {"type": "integer", "index": 4, "name": "index", "comment": null}, "_1_d_view": {"type": "double precision", "index": 5, "name": "_1_d_view", "comment": null}, "_7_d_click": {"type": "double precision", "index": 6, "name": "_7_d_click", "comment": null}, "_fivetran_synced": {"type": "text", "index": 7, "name": "_fivetran_synced", "comment": null}, "action_type": {"type": "text", "index": 8, "name": "action_type", "comment": null}, "inline": {"type": "double precision", "index": 9, "name": "inline", "comment": null}, "value": {"type": "double precision", "index": 10, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.facebook_ads.facebook_ads.basic_ad_actions"}, "source.facebook_ads.facebook_ads.basic_ad": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_basic_ad_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "bigint", "index": 1, "name": "ad_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "impressions": {"type": "integer", "index": 4, "name": "impressions", "comment": null}, "inline_link_clicks": {"type": "integer", "index": 5, "name": "inline_link_clicks", "comment": null}, "spend": {"type": "double precision", "index": 6, "name": "spend", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.facebook_ads.facebook_ads.basic_ad"}, "source.facebook_ads.facebook_ads.campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "updated_time": {"type": "timestamp without time zone", "index": 5, "name": "updated_time", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.facebook_ads.facebook_ads.campaign_history"}, "source.facebook_ads.facebook_ads.creative_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_creative_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"page_link": {"type": "character varying", "index": 1, "name": "page_link", "comment": null}, "template_page_link": {"type": "character varying", "index": 2, "name": "template_page_link", "comment": null}, "id": {"type": "bigint", "index": 3, "name": "id", "comment": null}, "account_id": {"type": "bigint", "index": 4, "name": "account_id", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "url_tags": {"type": "text", "index": 6, "name": "url_tags", "comment": null}, "_fivetran_synced": {"type": "text", "index": 7, "name": "_fivetran_synced", "comment": null}, "asset_feed_spec_link_urls": {"type": "text", "index": 8, "name": "asset_feed_spec_link_urls", "comment": null}, "object_story_link_data_child_attachments": {"type": "text", "index": 9, "name": "object_story_link_data_child_attachments", "comment": null}, "object_story_link_data_caption": {"type": "text", "index": 10, "name": "object_story_link_data_caption", "comment": null}, "object_story_link_data_description": {"type": "text", "index": 11, "name": "object_story_link_data_description", "comment": null}, "object_story_link_data_link": {"type": "text", "index": 12, "name": "object_story_link_data_link", "comment": null}, "object_story_link_data_message": {"type": "text", "index": 13, "name": "object_story_link_data_message", "comment": null}, "template_app_link_spec_ios": {"type": "text", "index": 14, "name": "template_app_link_spec_ios", "comment": null}, "_fivetran_id": {"type": "text", "index": 15, "name": "_fivetran_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.facebook_ads.facebook_ads.creative_history"}, "source.facebook_ads.facebook_ads.demographics_country_actions": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_demographics_country_actions_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "action_type": {"type": "text", "index": 4, "name": "action_type", "comment": null}, "date": {"type": "date", "index": 5, "name": "date", "comment": null}, "index": {"type": "integer", "index": 6, "name": "index", "comment": null}, "inline": {"type": "double precision", "index": 7, "name": "inline", "comment": null}, "value": {"type": "double precision", "index": 8, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.facebook_ads.facebook_ads.demographics_country_actions"}, "source.facebook_ads.facebook_ads.demographics_country": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_demographics_country_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "country": {"type": "text", "index": 4, "name": "country", "comment": null}, "date": {"type": "date", "index": 5, "name": "date", "comment": null}, "frequency": {"type": "double precision", "index": 6, "name": "frequency", "comment": null}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": null}, "inline_link_clicks": {"type": "integer", "index": 8, "name": "inline_link_clicks", "comment": null}, "reach": {"type": "integer", "index": 9, "name": "reach", "comment": null}, "spend": {"type": "double precision", "index": 10, "name": "spend", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.facebook_ads.facebook_ads.demographics_country"}, "source.facebook_ads.facebook_ads.demographics_region_actions": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_demographics_region_actions_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "action_type": {"type": "text", "index": 4, "name": "action_type", "comment": null}, "date": {"type": "date", "index": 5, "name": "date", "comment": null}, "index": {"type": "integer", "index": 6, "name": "index", "comment": null}, "value": {"type": "double precision", "index": 7, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.facebook_ads.facebook_ads.demographics_region_actions"}, "source.facebook_ads.facebook_ads.demographics_region": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "facebook_ads_demographics_region_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "date": {"type": "date", "index": 4, "name": "date", "comment": null}, "frequency": {"type": "double precision", "index": 5, "name": "frequency", "comment": null}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": null}, "inline_link_clicks": {"type": "integer", "index": 7, "name": "inline_link_clicks", "comment": null}, "reach": {"type": "integer", "index": 8, "name": "reach", "comment": null}, "region": {"type": "text", "index": 9, "name": "region", "comment": null}, "spend": {"type": "double precision", "index": 10, "name": "spend", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.facebook_ads.facebook_ads.demographics_region"}, "source.google_ads.google_ads.account_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_account_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "auto_tagging_enabled": {"type": "boolean", "index": 4, "name": "auto_tagging_enabled", "comment": null}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": null}, "descriptive_name": {"type": "integer", "index": 6, "name": "descriptive_name", "comment": null}, "final_url_suffix": {"type": "boolean", "index": 7, "name": "final_url_suffix", "comment": null}, "hidden": {"type": "boolean", "index": 8, "name": "hidden", "comment": null}, "manager": {"type": "integer", "index": 9, "name": "manager", "comment": null}, "manager_customer_id": {"type": "double precision", "index": 10, "name": "manager_customer_id", "comment": null}, "optimization_score": {"type": "text", "index": 11, "name": "optimization_score", "comment": null}, "pay_per_conversion_eligibility_failure_reasons": {"type": "boolean", "index": 12, "name": "pay_per_conversion_eligibility_failure_reasons", "comment": null}, "test_account": {"type": "text", "index": 13, "name": "test_account", "comment": null}, "time_zone": {"type": "integer", "index": 14, "name": "time_zone", "comment": null}, "tracking_url_template": {"type": "integer", "index": 15, "name": "tracking_url_template", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.account_history"}, "source.google_ads.google_ads.account_stats": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_account_stats_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "customer_id": {"type": "integer", "index": 2, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "active_view_impressions": {"type": "integer", "index": 5, "name": "active_view_impressions", "comment": null}, "active_view_measurability": {"type": "integer", "index": 6, "name": "active_view_measurability", "comment": null}, "active_view_measurable_cost_micros": {"type": "integer", "index": 7, "name": "active_view_measurable_cost_micros", "comment": null}, "active_view_measurable_impressions": {"type": "integer", "index": 8, "name": "active_view_measurable_impressions", "comment": null}, "active_view_viewability": {"type": "integer", "index": 9, "name": "active_view_viewability", "comment": null}, "ad_network_type": {"type": "text", "index": 10, "name": "ad_network_type", "comment": null}, "clicks": {"type": "integer", "index": 11, "name": "clicks", "comment": null}, "conversions": {"type": "integer", "index": 12, "name": "conversions", "comment": null}, "conversions_value": {"type": "integer", "index": 13, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 14, "name": "cost_micros", "comment": null}, "device": {"type": "text", "index": 15, "name": "device", "comment": null}, "impressions": {"type": "integer", "index": 16, "name": "impressions", "comment": null}, "interaction_event_types": {"type": "text", "index": 17, "name": "interaction_event_types", "comment": null}, "interactions": {"type": "integer", "index": 18, "name": "interactions", "comment": null}, "view_through_conversions": {"type": "integer", "index": 19, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.account_stats"}, "source.google_ads.google_ads.ad_group_criterion_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_ad_group_criterion_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 2, "name": "ad_group_id", "comment": null}, "base_campaign_id": {"type": "bigint", "index": 3, "name": "base_campaign_id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 4, "name": "updated_at", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "type": {"type": "text", "index": 6, "name": "type", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}, "keyword_match_type": {"type": "text", "index": 8, "name": "keyword_match_type", "comment": null}, "keyword_text": {"type": "text", "index": 9, "name": "keyword_text", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.ad_group_criterion_history"}, "source.google_ads.google_ads.ad_group_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_ad_group_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "type": {"type": "text", "index": 3, "name": "type", "comment": null}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "text", "index": 5, "name": "campaign_name", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.ad_group_history"}, "source.google_ads.google_ads.ad_group_stats": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_ad_group_stats_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "customer_id": {"type": "bigint", "index": 2, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "active_view_impressions": {"type": "integer", "index": 5, "name": "active_view_impressions", "comment": null}, "active_view_measurability": {"type": "integer", "index": 6, "name": "active_view_measurability", "comment": null}, "active_view_measurable_cost_micros": {"type": "integer", "index": 7, "name": "active_view_measurable_cost_micros", "comment": null}, "active_view_measurable_impressions": {"type": "integer", "index": 8, "name": "active_view_measurable_impressions", "comment": null}, "active_view_viewability": {"type": "integer", "index": 9, "name": "active_view_viewability", "comment": null}, "ad_network_type": {"type": "text", "index": 10, "name": "ad_network_type", "comment": null}, "base_ad_group": {"type": "text", "index": 11, "name": "base_ad_group", "comment": null}, "campaign_base_campaign": {"type": "text", "index": 12, "name": "campaign_base_campaign", "comment": null}, "campaign_id": {"type": "bigint", "index": 13, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 14, "name": "clicks", "comment": null}, "conversions": {"type": "double precision", "index": 15, "name": "conversions", "comment": null}, "conversions_value": {"type": "integer", "index": 16, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 17, "name": "cost_micros", "comment": null}, "device": {"type": "text", "index": 18, "name": "device", "comment": null}, "id": {"type": "bigint", "index": 19, "name": "id", "comment": null}, "impressions": {"type": "integer", "index": 20, "name": "impressions", "comment": null}, "interaction_event_types": {"type": "text", "index": 21, "name": "interaction_event_types", "comment": null}, "interactions": {"type": "integer", "index": 22, "name": "interactions", "comment": null}, "view_through_conversions": {"type": "integer", "index": 23, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.ad_group_stats"}, "source.google_ads.google_ads.ad_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_ad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_group_id": {"type": "bigint", "index": 1, "name": "ad_group_id", "comment": null}, "id": {"type": "bigint", "index": 2, "name": "id", "comment": null}, "name": {"type": "integer", "index": 3, "name": "name", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 4, "name": "updated_at", "comment": null}, "type": {"type": "integer", "index": 5, "name": "type", "comment": null}, "status": {"type": "text", "index": 6, "name": "status", "comment": null}, "display_url": {"type": "integer", "index": 7, "name": "display_url", "comment": null}, "final_urls": {"type": "text", "index": 8, "name": "final_urls", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.ad_history"}, "source.google_ads.google_ads.ad_stats": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_ad_stats_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"customer_id": {"type": "bigint", "index": 1, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "ad_group": {"type": "text", "index": 4, "name": "ad_group", "comment": null}, "keyword_ad_group_criterion": {"type": "text", "index": 5, "name": "keyword_ad_group_criterion", "comment": null}, "ad_network_type": {"type": "text", "index": 6, "name": "ad_network_type", "comment": null}, "device": {"type": "text", "index": 7, "name": "device", "comment": null}, "ad_id": {"type": "bigint", "index": 8, "name": "ad_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 9, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": null}, "cost_micros": {"type": "integer", "index": 11, "name": "cost_micros", "comment": null}, "impressions": {"type": "integer", "index": 12, "name": "impressions", "comment": null}, "conversions": {"type": "integer", "index": 13, "name": "conversions", "comment": null}, "conversions_value": {"type": "double precision", "index": 14, "name": "conversions_value", "comment": null}, "view_through_conversions": {"type": "integer", "index": 15, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.ad_stats"}, "source.google_ads.google_ads.campaign_bid_modifier_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_campaign_bid_modifier_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "bigint", "index": 1, "name": "campaign_id", "comment": null}, "criterion_id": {"type": "bigint", "index": 2, "name": "criterion_id", "comment": null}, "bid_modifier": {"type": "double precision", "index": 3, "name": "bid_modifier", "comment": null}, "interaction_type": {"type": "text", "index": 4, "name": "interaction_type", "comment": null}, "interaction_event_types": {"type": "text", "index": 5, "name": "interaction_event_types", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 6, "name": "updated_at", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 7, "name": "_fivetran_active", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 8, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.campaign_bid_modifier_history"}, "source.google_ads.google_ads.campaign_bidding_strategy_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_campaign_bidding_strategy_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "bigint", "index": 1, "name": "campaign_id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "cpc_bid_ceiling_micros": {"type": "integer", "index": 3, "name": "cpc_bid_ceiling_micros", "comment": null}, "cpc_bid_floor_micros": {"type": "integer", "index": 4, "name": "cpc_bid_floor_micros", "comment": null}, "enhanced_cpc": {"type": "boolean", "index": 5, "name": "enhanced_cpc", "comment": null}, "enhanced_cpc_enabled": {"type": "boolean", "index": 6, "name": "enhanced_cpc_enabled", "comment": null}, "location": {"type": "text", "index": 7, "name": "location", "comment": null}, "location_fraction_micros": {"type": "integer", "index": 8, "name": "location_fraction_micros", "comment": null}, "manual_cpa": {"type": "double precision", "index": 9, "name": "manual_cpa", "comment": null}, "manual_cpm": {"type": "double precision", "index": 10, "name": "manual_cpm", "comment": null}, "manual_cpv": {"type": "double precision", "index": 11, "name": "manual_cpv", "comment": null}, "name": {"type": "text", "index": 12, "name": "name", "comment": null}, "status": {"type": "text", "index": 13, "name": "status", "comment": null}, "target_cpa_micros": {"type": "integer", "index": 14, "name": "target_cpa_micros", "comment": null}, "target_cpm": {"type": "integer", "index": 15, "name": "target_cpm", "comment": null}, "target_roas": {"type": "double precision", "index": 16, "name": "target_roas", "comment": null}, "type": {"type": "text", "index": 17, "name": "type", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 18, "name": "_fivetran_active", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 19, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.campaign_bidding_strategy_history"}, "source.google_ads.google_ads.campaign_budget_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_campaign_budget_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "amount_micros": {"type": "integer", "index": 4, "name": "amount_micros", "comment": null}, "delivery_method": {"type": "text", "index": 5, "name": "delivery_method", "comment": null}, "explicitly_shared": {"type": "boolean", "index": 6, "name": "explicitly_shared", "comment": null}, "name": {"type": "text", "index": 7, "name": "name", "comment": null}, "reference_count": {"type": "integer", "index": 8, "name": "reference_count", "comment": null}, "status": {"type": "text", "index": 9, "name": "status", "comment": null}, "has_recommended_budget": {"type": "boolean", "index": 10, "name": "has_recommended_budget", "comment": null}, "period": {"type": "text", "index": 11, "name": "period", "comment": null}, "recommended_budget_amount_micros": {"type": "integer", "index": 12, "name": "recommended_budget_amount_micros", "comment": null}, "total_amount_micros": {"type": "integer", "index": 13, "name": "total_amount_micros", "comment": null}, "type": {"type": "text", "index": 14, "name": "type", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 15, "name": "_fivetran_active", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 16, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.campaign_budget_history"}, "source.google_ads.google_ads.campaign_criterion_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_campaign_criterion_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "geo_target_constant_id": {"type": "bigint", "index": 4, "name": "geo_target_constant_id", "comment": null}, "mobile_device_id": {"type": "bigint", "index": 5, "name": "mobile_device_id", "comment": null}, "operating_system_version_id": {"type": "bigint", "index": 6, "name": "operating_system_version_id", "comment": null}, "topic_constant_id": {"type": "bigint", "index": 7, "name": "topic_constant_id", "comment": null}, "user_interest_id": {"type": "bigint", "index": 8, "name": "user_interest_id", "comment": null}, "user_list_id": {"type": "bigint", "index": 9, "name": "user_list_id", "comment": null}, "age_range_type": {"type": "text", "index": 10, "name": "age_range_type", "comment": null}, "bid_modifier": {"type": "double precision", "index": 11, "name": "bid_modifier", "comment": null}, "carrier_country_code": {"type": "text", "index": 12, "name": "carrier_country_code", "comment": null}, "carrier_name": {"type": "text", "index": 13, "name": "carrier_name", "comment": null}, "content_label_type": {"type": "text", "index": 14, "name": "content_label_type", "comment": null}, "device_type": {"type": "text", "index": 15, "name": "device_type", "comment": null}, "display_name": {"type": "text", "index": 16, "name": "display_name", "comment": null}, "gender_type": {"type": "text", "index": 17, "name": "gender_type", "comment": null}, "income_range_type": {"type": "text", "index": 18, "name": "income_range_type", "comment": null}, "ip_block_ip_address": {"type": "text", "index": 19, "name": "ip_block_ip_address", "comment": null}, "negative": {"type": "boolean", "index": 20, "name": "negative", "comment": null}, "keyword_match_type": {"type": "text", "index": 21, "name": "keyword_match_type", "comment": null}, "keyword_text": {"type": "text", "index": 22, "name": "keyword_text", "comment": null}, "language_code": {"type": "text", "index": 23, "name": "language_code", "comment": null}, "language_name": {"type": "text", "index": 24, "name": "language_name", "comment": null}, "mobile_app_category_constant_id": {"type": "bigint", "index": 25, "name": "mobile_app_category_constant_id", "comment": null}, "mobile_app_category_constant_name": {"type": "text", "index": 26, "name": "mobile_app_category_constant_name", "comment": null}, "mobile_application_app_id": {"type": "text", "index": 27, "name": "mobile_application_app_id", "comment": null}, "mobile_application_name": {"type": "text", "index": 28, "name": "mobile_application_name", "comment": null}, "parental_status_type": {"type": "text", "index": 29, "name": "parental_status_type", "comment": null}, "placement_url": {"type": "text", "index": 30, "name": "placement_url", "comment": null}, "status": {"type": "text", "index": 31, "name": "status", "comment": null}, "type": {"type": "text", "index": 32, "name": "type", "comment": null}, "youtube_channel_id": {"type": "text", "index": 33, "name": "youtube_channel_id", "comment": null}, "youtube_video_id": {"type": "text", "index": 34, "name": "youtube_video_id", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 35, "name": "_fivetran_active", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 36, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.campaign_criterion_history"}, "source.google_ads.google_ads.campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_at": {"type": "timestamp without time zone", "index": 2, "name": "updated_at", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "customer_id": {"type": "bigint", "index": 4, "name": "customer_id", "comment": null}, "advertising_channel_type": {"type": "text", "index": 5, "name": "advertising_channel_type", "comment": null}, "advertising_channel_subtype": {"type": "text", "index": 6, "name": "advertising_channel_subtype", "comment": null}, "start_date": {"type": "date", "index": 7, "name": "start_date", "comment": null}, "end_date": {"type": "date", "index": 8, "name": "end_date", "comment": null}, "serving_status": {"type": "text", "index": 9, "name": "serving_status", "comment": null}, "status": {"type": "text", "index": 10, "name": "status", "comment": null}, "tracking_url_template": {"type": "integer", "index": 11, "name": "tracking_url_template", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.campaign_history"}, "source.google_ads.google_ads.campaign_stats": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_campaign_stats_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "customer_id": {"type": "bigint", "index": 2, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "active_view_impressions": {"type": "integer", "index": 5, "name": "active_view_impressions", "comment": null}, "active_view_measurability": {"type": "integer", "index": 6, "name": "active_view_measurability", "comment": null}, "active_view_measurable_cost_micros": {"type": "integer", "index": 7, "name": "active_view_measurable_cost_micros", "comment": null}, "active_view_measurable_impressions": {"type": "integer", "index": 8, "name": "active_view_measurable_impressions", "comment": null}, "active_view_viewability": {"type": "integer", "index": 9, "name": "active_view_viewability", "comment": null}, "ad_network_type": {"type": "text", "index": 10, "name": "ad_network_type", "comment": null}, "base_campaign": {"type": "text", "index": 11, "name": "base_campaign", "comment": null}, "clicks": {"type": "integer", "index": 12, "name": "clicks", "comment": null}, "conversions": {"type": "integer", "index": 13, "name": "conversions", "comment": null}, "conversions_value": {"type": "integer", "index": 14, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 15, "name": "cost_micros", "comment": null}, "device": {"type": "text", "index": 16, "name": "device", "comment": null}, "id": {"type": "bigint", "index": 17, "name": "id", "comment": null}, "impressions": {"type": "integer", "index": 18, "name": "impressions", "comment": null}, "interaction_event_types": {"type": "text", "index": 19, "name": "interaction_event_types", "comment": null}, "interactions": {"type": "integer", "index": 20, "name": "interactions", "comment": null}, "view_through_conversions": {"type": "integer", "index": 21, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.campaign_stats"}, "source.google_ads.google_ads.keyword_stats": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_keyword_stats_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "customer_id": {"type": "bigint", "index": 2, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "active_view_impressions": {"type": "integer", "index": 5, "name": "active_view_impressions", "comment": null}, "active_view_measurability": {"type": "integer", "index": 6, "name": "active_view_measurability", "comment": null}, "active_view_measurable_cost_micros": {"type": "integer", "index": 7, "name": "active_view_measurable_cost_micros", "comment": null}, "active_view_measurable_impressions": {"type": "integer", "index": 8, "name": "active_view_measurable_impressions", "comment": null}, "active_view_viewability": {"type": "integer", "index": 9, "name": "active_view_viewability", "comment": null}, "ad_group_base_ad_group": {"type": "text", "index": 10, "name": "ad_group_base_ad_group", "comment": null}, "ad_group_criterion_criterion_id": {"type": "bigint", "index": 11, "name": "ad_group_criterion_criterion_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 12, "name": "ad_group_id", "comment": null}, "ad_network_type": {"type": "text", "index": 13, "name": "ad_network_type", "comment": null}, "campaign_base_campaign": {"type": "text", "index": 14, "name": "campaign_base_campaign", "comment": null}, "campaign_id": {"type": "bigint", "index": 15, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 16, "name": "clicks", "comment": null}, "conversions": {"type": "integer", "index": 17, "name": "conversions", "comment": null}, "conversions_value": {"type": "integer", "index": 18, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 19, "name": "cost_micros", "comment": null}, "device": {"type": "text", "index": 20, "name": "device", "comment": null}, "impressions": {"type": "integer", "index": 21, "name": "impressions", "comment": null}, "interaction_event_types": {"type": "text", "index": 22, "name": "interaction_event_types", "comment": null}, "interactions": {"type": "integer", "index": 23, "name": "interactions", "comment": null}, "view_through_conversions": {"type": "integer", "index": 24, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.keyword_stats"}, "source.google_ads.google_ads.search_term_keyword_stats": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "google_ads_search_term_keyword_stats_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 5, "name": "clicks", "comment": null}, "conversions": {"type": "double precision", "index": 6, "name": "conversions", "comment": null}, "conversions_value": {"type": "double precision", "index": 7, "name": "conversions_value", "comment": null}, "cost_micros": {"type": "integer", "index": 8, "name": "cost_micros", "comment": null}, "customer_id": {"type": "bigint", "index": 9, "name": "customer_id", "comment": null}, "date": {"type": "date", "index": 10, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 11, "name": "impressions", "comment": null}, "info_text": {"type": "text", "index": 12, "name": "info_text", "comment": null}, "keyword_ad_group_criterion": {"type": "text", "index": 13, "name": "keyword_ad_group_criterion", "comment": null}, "search_term": {"type": "text", "index": 14, "name": "search_term", "comment": null}, "search_term_match_type": {"type": "text", "index": 15, "name": "search_term_match_type", "comment": null}, "status": {"type": "text", "index": 16, "name": "status", "comment": null}, "view_through_conversions": {"type": "integer", "index": 17, "name": "view_through_conversions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.google_ads.google_ads.search_term_keyword_stats"}, "source.linkedin.linkedin_ads.account_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_ad_account_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_modified_time": {"type": "timestamp without time zone", "index": 2, "name": "last_modified_time", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 3, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "currency": {"type": "text", "index": 5, "name": "currency", "comment": null}, "version_tag": {"type": "integer", "index": 6, "name": "version_tag", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.linkedin.linkedin_ads.account_history"}, "source.linkedin.linkedin_ads.ad_analytics_by_campaign": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_ad_analytics_by_campaign_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "day": {"type": "timestamp without time zone", "index": 2, "name": "day", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}, "action_clicks": {"type": "integer", "index": 4, "name": "action_clicks", "comment": null}, "ad_unit_clicks": {"type": "integer", "index": 5, "name": "ad_unit_clicks", "comment": null}, "approximate_unique_impressions": {"type": "integer", "index": 6, "name": "approximate_unique_impressions", "comment": null}, "card_clicks": {"type": "integer", "index": 7, "name": "card_clicks", "comment": null}, "card_impressions": {"type": "integer", "index": 8, "name": "card_impressions", "comment": null}, "clicks": {"type": "integer", "index": 9, "name": "clicks", "comment": null}, "comment_likes": {"type": "integer", "index": 10, "name": "comment_likes", "comment": null}, "comments": {"type": "integer", "index": 11, "name": "comments", "comment": null}, "company_page_clicks": {"type": "integer", "index": 12, "name": "company_page_clicks", "comment": null}, "conversion_value_in_local_currency": {"type": "integer", "index": 13, "name": "conversion_value_in_local_currency", "comment": null}, "cost_in_local_currency": {"type": "double precision", "index": 14, "name": "cost_in_local_currency", "comment": null}, "cost_in_usd": {"type": "double precision", "index": 15, "name": "cost_in_usd", "comment": null}, "external_website_conversions": {"type": "bigint", "index": 16, "name": "external_website_conversions", "comment": null}, "external_website_post_click_conversions": {"type": "integer", "index": 17, "name": "external_website_post_click_conversions", "comment": null}, "external_website_post_view_conversions": {"type": "integer", "index": 18, "name": "external_website_post_view_conversions", "comment": null}, "follows": {"type": "integer", "index": 19, "name": "follows", "comment": null}, "full_screen_plays": {"type": "integer", "index": 20, "name": "full_screen_plays", "comment": null}, "impressions": {"type": "integer", "index": 21, "name": "impressions", "comment": null}, "landing_page_clicks": {"type": "integer", "index": 22, "name": "landing_page_clicks", "comment": null}, "lead_generation_mail_contact_info_shares": {"type": "integer", "index": 23, "name": "lead_generation_mail_contact_info_shares", "comment": null}, "lead_generation_mail_interested_clicks": {"type": "integer", "index": 24, "name": "lead_generation_mail_interested_clicks", "comment": null}, "likes": {"type": "integer", "index": 25, "name": "likes", "comment": null}, "one_click_lead_form_opens": {"type": "integer", "index": 26, "name": "one_click_lead_form_opens", "comment": null}, "one_click_leads": {"type": "integer", "index": 27, "name": "one_click_leads", "comment": null}, "opens": {"type": "integer", "index": 28, "name": "opens", "comment": null}, "other_engagements": {"type": "integer", "index": 29, "name": "other_engagements", "comment": null}, "shares": {"type": "integer", "index": 30, "name": "shares", "comment": null}, "text_url_clicks": {"type": "integer", "index": 31, "name": "text_url_clicks", "comment": null}, "total_engagements": {"type": "integer", "index": 32, "name": "total_engagements", "comment": null}, "video_completions": {"type": "integer", "index": 33, "name": "video_completions", "comment": null}, "video_first_quartile_completions": {"type": "integer", "index": 34, "name": "video_first_quartile_completions", "comment": null}, "video_midpoint_completions": {"type": "integer", "index": 35, "name": "video_midpoint_completions", "comment": null}, "video_starts": {"type": "integer", "index": 36, "name": "video_starts", "comment": null}, "video_third_quartile_completions": {"type": "integer", "index": 37, "name": "video_third_quartile_completions", "comment": null}, "video_views": {"type": "integer", "index": 38, "name": "video_views", "comment": null}, "viral_card_clicks": {"type": "integer", "index": 39, "name": "viral_card_clicks", "comment": null}, "viral_card_impressions": {"type": "integer", "index": 40, "name": "viral_card_impressions", "comment": null}, "viral_clicks": {"type": "integer", "index": 41, "name": "viral_clicks", "comment": null}, "viral_comment_likes": {"type": "integer", "index": 42, "name": "viral_comment_likes", "comment": null}, "viral_comments": {"type": "integer", "index": 43, "name": "viral_comments", "comment": null}, "viral_company_page_clicks": {"type": "integer", "index": 44, "name": "viral_company_page_clicks", "comment": null}, "viral_external_website_conversions": {"type": "integer", "index": 45, "name": "viral_external_website_conversions", "comment": null}, "viral_external_website_post_click_conversions": {"type": "integer", "index": 46, "name": "viral_external_website_post_click_conversions", "comment": null}, "viral_external_website_post_view_conversions": {"type": "integer", "index": 47, "name": "viral_external_website_post_view_conversions", "comment": null}, "viral_follows": {"type": "integer", "index": 48, "name": "viral_follows", "comment": null}, "viral_full_screen_plays": {"type": "integer", "index": 49, "name": "viral_full_screen_plays", "comment": null}, "viral_impressions": {"type": "integer", "index": 50, "name": "viral_impressions", "comment": null}, "viral_landing_page_clicks": {"type": "integer", "index": 51, "name": "viral_landing_page_clicks", "comment": null}, "viral_likes": {"type": "integer", "index": 52, "name": "viral_likes", "comment": null}, "viral_one_click_lead_form_opens": {"type": "integer", "index": 53, "name": "viral_one_click_lead_form_opens", "comment": null}, "viral_one_click_leads": {"type": "integer", "index": 54, "name": "viral_one_click_leads", "comment": null}, "viral_other_engagements": {"type": "integer", "index": 55, "name": "viral_other_engagements", "comment": null}, "viral_shares": {"type": "integer", "index": 56, "name": "viral_shares", "comment": null}, "viral_total_engagements": {"type": "integer", "index": 57, "name": "viral_total_engagements", "comment": null}, "viral_video_completions": {"type": "integer", "index": 58, "name": "viral_video_completions", "comment": null}, "viral_video_first_quartile_completions": {"type": "integer", "index": 59, "name": "viral_video_first_quartile_completions", "comment": null}, "viral_video_midpoint_completions": {"type": "integer", "index": 60, "name": "viral_video_midpoint_completions", "comment": null}, "viral_video_starts": {"type": "integer", "index": 61, "name": "viral_video_starts", "comment": null}, "viral_video_third_quartile_completions": {"type": "integer", "index": 62, "name": "viral_video_third_quartile_completions", "comment": null}, "viral_video_views": {"type": "integer", "index": 63, "name": "viral_video_views", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.linkedin.linkedin_ads.ad_analytics_by_campaign"}, "source.linkedin.linkedin_ads.ad_analytics_by_creative": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_ad_analytics_by_creative_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"creative_id": {"type": "integer", "index": 1, "name": "creative_id", "comment": null}, "day": {"type": "timestamp without time zone", "index": 2, "name": "day", "comment": null}, "action_clicks": {"type": "integer", "index": 3, "name": "action_clicks", "comment": null}, "card_clicks": {"type": "integer", "index": 4, "name": "card_clicks", "comment": null}, "ad_unit_clicks": {"type": "integer", "index": 5, "name": "ad_unit_clicks", "comment": null}, "landing_page_clicks": {"type": "integer", "index": 6, "name": "landing_page_clicks", "comment": null}, "clicks": {"type": "integer", "index": 7, "name": "clicks", "comment": null}, "approximate_unique_impressions": {"type": "integer", "index": 8, "name": "approximate_unique_impressions", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "card_impressions": {"type": "integer", "index": 10, "name": "card_impressions", "comment": null}, "cost_in_local_currency": {"type": "integer", "index": 11, "name": "cost_in_local_currency", "comment": null}, "cost_in_usd": {"type": "integer", "index": 12, "name": "cost_in_usd", "comment": null}, "comment_likes": {"type": "integer", "index": 13, "name": "comment_likes", "comment": null}, "comments": {"type": "integer", "index": 14, "name": "comments", "comment": null}, "company_page_clicks": {"type": "integer", "index": 15, "name": "company_page_clicks", "comment": null}, "conversion_value_in_local_currency": {"type": "integer", "index": 16, "name": "conversion_value_in_local_currency", "comment": null}, "external_website_conversions": {"type": "bigint", "index": 17, "name": "external_website_conversions", "comment": null}, "external_website_post_click_conversions": {"type": "integer", "index": 18, "name": "external_website_post_click_conversions", "comment": null}, "external_website_post_view_conversions": {"type": "integer", "index": 19, "name": "external_website_post_view_conversions", "comment": null}, "follows": {"type": "integer", "index": 20, "name": "follows", "comment": null}, "full_screen_plays": {"type": "integer", "index": 21, "name": "full_screen_plays", "comment": null}, "lead_generation_mail_contact_info_shares": {"type": "integer", "index": 22, "name": "lead_generation_mail_contact_info_shares", "comment": null}, "lead_generation_mail_interested_clicks": {"type": "integer", "index": 23, "name": "lead_generation_mail_interested_clicks", "comment": null}, "likes": {"type": "integer", "index": 24, "name": "likes", "comment": null}, "one_click_lead_form_opens": {"type": "integer", "index": 25, "name": "one_click_lead_form_opens", "comment": null}, "one_click_leads": {"type": "integer", "index": 26, "name": "one_click_leads", "comment": null}, "opens": {"type": "integer", "index": 27, "name": "opens", "comment": null}, "other_engagements": {"type": "integer", "index": 28, "name": "other_engagements", "comment": null}, "shares": {"type": "integer", "index": 29, "name": "shares", "comment": null}, "text_url_clicks": {"type": "integer", "index": 30, "name": "text_url_clicks", "comment": null}, "total_engagements": {"type": "integer", "index": 31, "name": "total_engagements", "comment": null}, "video_completions": {"type": "integer", "index": 32, "name": "video_completions", "comment": null}, "video_first_quartile_completions": {"type": "integer", "index": 33, "name": "video_first_quartile_completions", "comment": null}, "video_midpoint_completions": {"type": "integer", "index": 34, "name": "video_midpoint_completions", "comment": null}, "video_starts": {"type": "integer", "index": 35, "name": "video_starts", "comment": null}, "video_third_quartile_completions": {"type": "integer", "index": 36, "name": "video_third_quartile_completions", "comment": null}, "video_views": {"type": "integer", "index": 37, "name": "video_views", "comment": null}, "viral_card_clicks": {"type": "integer", "index": 38, "name": "viral_card_clicks", "comment": null}, "viral_card_impressions": {"type": "integer", "index": 39, "name": "viral_card_impressions", "comment": null}, "viral_clicks": {"type": "integer", "index": 40, "name": "viral_clicks", "comment": null}, "viral_comment_likes": {"type": "integer", "index": 41, "name": "viral_comment_likes", "comment": null}, "viral_comments": {"type": "integer", "index": 42, "name": "viral_comments", "comment": null}, "viral_company_page_clicks": {"type": "integer", "index": 43, "name": "viral_company_page_clicks", "comment": null}, "viral_external_website_conversions": {"type": "integer", "index": 44, "name": "viral_external_website_conversions", "comment": null}, "viral_external_website_post_click_conversions": {"type": "integer", "index": 45, "name": "viral_external_website_post_click_conversions", "comment": null}, "viral_external_website_post_view_conversions": {"type": "integer", "index": 46, "name": "viral_external_website_post_view_conversions", "comment": null}, "viral_follows": {"type": "integer", "index": 47, "name": "viral_follows", "comment": null}, "viral_full_screen_plays": {"type": "integer", "index": 48, "name": "viral_full_screen_plays", "comment": null}, "viral_impressions": {"type": "integer", "index": 49, "name": "viral_impressions", "comment": null}, "viral_landing_page_clicks": {"type": "integer", "index": 50, "name": "viral_landing_page_clicks", "comment": null}, "viral_likes": {"type": "integer", "index": 51, "name": "viral_likes", "comment": null}, "viral_one_click_lead_form_opens": {"type": "integer", "index": 52, "name": "viral_one_click_lead_form_opens", "comment": null}, "viral_one_click_leads": {"type": "integer", "index": 53, "name": "viral_one_click_leads", "comment": null}, "viral_other_engagements": {"type": "integer", "index": 54, "name": "viral_other_engagements", "comment": null}, "viral_shares": {"type": "integer", "index": 55, "name": "viral_shares", "comment": null}, "viral_total_engagements": {"type": "integer", "index": 56, "name": "viral_total_engagements", "comment": null}, "viral_video_completions": {"type": "integer", "index": 57, "name": "viral_video_completions", "comment": null}, "viral_video_first_quartile_completions": {"type": "integer", "index": 58, "name": "viral_video_first_quartile_completions", "comment": null}, "viral_video_midpoint_completions": {"type": "integer", "index": 59, "name": "viral_video_midpoint_completions", "comment": null}, "viral_video_starts": {"type": "integer", "index": 60, "name": "viral_video_starts", "comment": null}, "viral_video_third_quartile_completions": {"type": "integer", "index": 61, "name": "viral_video_third_quartile_completions", "comment": null}, "viral_video_views": {"type": "integer", "index": 62, "name": "viral_video_views", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.linkedin.linkedin_ads.ad_analytics_by_creative"}, "source.linkedin.linkedin_ads.campaign_group_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_ad_campaign_group_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_modified_time": {"type": "timestamp without time zone", "index": 2, "name": "last_modified_time", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 4, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.linkedin.linkedin_ads.campaign_group_history"}, "source.linkedin.linkedin_ads.campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_ad_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "last_modified_time": {"type": "timestamp without time zone", "index": 2, "name": "last_modified_time", "comment": null}, "account_id": {"type": "bigint", "index": 3, "name": "account_id", "comment": null}, "campaign_group_id": {"type": "integer", "index": 4, "name": "campaign_group_id", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 5, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 6, "name": "name", "comment": null}, "version_tag": {"type": "integer", "index": 7, "name": "version_tag", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.linkedin.linkedin_ads.campaign_history"}, "source.linkedin.linkedin_ads.creative_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_ad_creative_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "intended_status": {"type": "character varying", "index": 3, "name": "intended_status", "comment": null}, "click_uri": {"type": "text", "index": 4, "name": "click_uri", "comment": null}, "last_modified_at": {"type": "timestamp without time zone", "index": 5, "name": "last_modified_at", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 6, "name": "created_time", "comment": null}, "text_ad_landing_page": {"type": "text", "index": 7, "name": "text_ad_landing_page", "comment": null}, "spotlight_landing_page": {"type": "text", "index": 8, "name": "spotlight_landing_page", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.linkedin.linkedin_ads.creative_history"}, "source.linkedin.linkedin_ads.geo": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_geo_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "id": {"type": "integer", "index": 2, "name": "id", "comment": null}, "value": {"type": "text", "index": 3, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.linkedin.linkedin_ads.geo"}, "source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_country": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_monthly_ad_analytics_by_member_country_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "month": {"type": "text", "index": 2, "name": "month", "comment": null}, "clicks": {"type": "integer", "index": 3, "name": "clicks", "comment": null}, "member_country": {"type": "integer", "index": 4, "name": "member_country", "comment": null}, "impressions": {"type": "integer", "index": 5, "name": "impressions", "comment": null}, "conversion_value_in_local_currency": {"type": "double precision", "index": 6, "name": "conversion_value_in_local_currency", "comment": null}, "cost_in_local_currency": {"type": "numeric", "index": 7, "name": "cost_in_local_currency", "comment": null}, "cost_in_usd": {"type": "numeric", "index": 8, "name": "cost_in_usd", "comment": null}, "external_website_post_click_conversions": {"type": "integer", "index": 9, "name": "external_website_post_click_conversions", "comment": null}, "one_click_leads": {"type": "integer", "index": 10, "name": "one_click_leads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_country"}, "source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_region": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "linkedin_monthly_ad_analytics_by_member_region_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "month": {"type": "text", "index": 2, "name": "month", "comment": null}, "clicks": {"type": "integer", "index": 3, "name": "clicks", "comment": null}, "member_region": {"type": "integer", "index": 4, "name": "member_region", "comment": null}, "impressions": {"type": "integer", "index": 5, "name": "impressions", "comment": null}, "conversion_value_in_local_currency": {"type": "double precision", "index": 6, "name": "conversion_value_in_local_currency", "comment": null}, "cost_in_local_currency": {"type": "numeric", "index": 7, "name": "cost_in_local_currency", "comment": null}, "cost_in_usd": {"type": "numeric", "index": 8, "name": "cost_in_usd", "comment": null}, "external_website_post_click_conversions": {"type": "integer", "index": 9, "name": "external_website_post_click_conversions", "comment": null}, "one_click_leads": {"type": "integer", "index": 10, "name": "one_click_leads", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_region"}, "source.microsoft_ads.microsoft_ads.account_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_account_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "name": {"type": "character varying", "index": 2, "name": "name", "comment": null}, "last_modified_time": {"type": "timestamp without time zone", "index": 3, "name": "last_modified_time", "comment": null}, "time_zone": {"type": "text", "index": 4, "name": "time_zone", "comment": null}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.microsoft_ads.microsoft_ads.account_history"}, "source.microsoft_ads.microsoft_ads.account_performance_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_account_performance_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "device_os": {"type": "text", "index": 3, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 4, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 5, "name": "network", "comment": null}, "currency_code": {"type": "text", "index": 6, "name": "currency_code", "comment": null}, "ad_distribution": {"type": "text", "index": 7, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 8, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 9, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 10, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 11, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 12, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 13, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 14, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 15, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 16, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 17, "name": "all_conversions_qualified", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.microsoft_ads.microsoft_ads.account_performance_daily_report"}, "source.microsoft_ads.microsoft_ads.ad_group_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_ad_group_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "modified_time": {"type": "timestamp without time zone", "index": 4, "name": "modified_time", "comment": null}, "start_date": {"type": "date", "index": 5, "name": "start_date", "comment": null}, "end_date": {"type": "integer", "index": 6, "name": "end_date", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.microsoft_ads.microsoft_ads.ad_group_history"}, "source.microsoft_ads.microsoft_ads.ad_group_performance_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_ad_group_performance_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "currency_code": {"type": "text", "index": 5, "name": "currency_code", "comment": null}, "device_os": {"type": "text", "index": 6, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 7, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 8, "name": "network", "comment": null}, "language": {"type": "text", "index": 9, "name": "language", "comment": null}, "ad_distribution": {"type": "text", "index": 10, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 11, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 12, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 13, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 14, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 15, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 16, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 17, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 18, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 19, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 20, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 21, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 22, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.microsoft_ads.microsoft_ads.ad_group_performance_daily_report"}, "source.microsoft_ads.microsoft_ads.ad_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_ad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "title_part_1": {"type": "text", "index": 2, "name": "title_part_1", "comment": null}, "final_url": {"type": "text", "index": 3, "name": "final_url", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "modified_time": {"type": "timestamp without time zone", "index": 5, "name": "modified_time", "comment": null}, "status": {"type": "text", "index": 6, "name": "status", "comment": null}, "type": {"type": "text", "index": 7, "name": "type", "comment": null}, "title": {"type": "text", "index": 8, "name": "title", "comment": null}, "title_part_2": {"type": "text", "index": 9, "name": "title_part_2", "comment": null}, "title_part_3": {"type": "text", "index": 10, "name": "title_part_3", "comment": null}, "domain": {"type": "text", "index": 11, "name": "domain", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.microsoft_ads.microsoft_ads.ad_history"}, "source.microsoft_ads.microsoft_ads.ad_performance_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_ad_performance_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "bigint", "index": 5, "name": "ad_id", "comment": null}, "currency_code": {"type": "text", "index": 6, "name": "currency_code", "comment": null}, "device_os": {"type": "text", "index": 7, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 8, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 9, "name": "network", "comment": null}, "language": {"type": "text", "index": 10, "name": "language", "comment": null}, "ad_distribution": {"type": "text", "index": 11, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 12, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 13, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 14, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 15, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 16, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 17, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 18, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 19, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 20, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 21, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 22, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 23, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.microsoft_ads.microsoft_ads.ad_performance_daily_report"}, "source.microsoft_ads.microsoft_ads.campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "account_id": {"type": "integer", "index": 3, "name": "account_id", "comment": null}, "modified_time": {"type": "timestamp without time zone", "index": 4, "name": "modified_time", "comment": null}, "type": {"type": "text", "index": 5, "name": "type", "comment": null}, "time_zone": {"type": "text", "index": 6, "name": "time_zone", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.microsoft_ads.microsoft_ads.campaign_history"}, "source.microsoft_ads.microsoft_ads.campaign_performance_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_campaign_performance_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "currency_code": {"type": "text", "index": 4, "name": "currency_code", "comment": null}, "device_os": {"type": "text", "index": 5, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 6, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 7, "name": "network", "comment": null}, "ad_distribution": {"type": "text", "index": 8, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 9, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 10, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 11, "name": "top_vs_other", "comment": null}, "budget_association_status": {"type": "text", "index": 12, "name": "budget_association_status", "comment": null}, "budget_name": {"type": "text", "index": 13, "name": "budget_name", "comment": null}, "clicks": {"type": "integer", "index": 14, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 15, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 16, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 17, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 18, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 19, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 20, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 21, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 22, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.microsoft_ads.microsoft_ads.campaign_performance_daily_report"}, "source.microsoft_ads.microsoft_ads.geographic_performance_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_geographic_performance_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "bigint", "index": 1, "name": "account_id", "comment": null}, "ad_distribution": {"type": "text", "index": 2, "name": "ad_distribution", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "all_conversions": {"type": "integer", "index": 4, "name": "all_conversions", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 5, "name": "all_conversions_qualified", "comment": null}, "all_revenue": {"type": "numeric", "index": 6, "name": "all_revenue", "comment": null}, "bid_match_type": {"type": "text", "index": 7, "name": "bid_match_type", "comment": null}, "campaign_id": {"type": "bigint", "index": 8, "name": "campaign_id", "comment": null}, "city": {"type": "text", "index": 9, "name": "city", "comment": null}, "clicks": {"type": "integer", "index": 10, "name": "clicks", "comment": null}, "conversions": {"type": "integer", "index": 11, "name": "conversions", "comment": null}, "conversions_qualified": {"type": "integer", "index": 12, "name": "conversions_qualified", "comment": null}, "country": {"type": "text", "index": 13, "name": "country", "comment": null}, "county": {"type": "text", "index": 14, "name": "county", "comment": null}, "currency_code": {"type": "text", "index": 15, "name": "currency_code", "comment": null}, "date": {"type": "date", "index": 16, "name": "date", "comment": null}, "delivered_match_type": {"type": "text", "index": 17, "name": "delivered_match_type", "comment": null}, "device_os": {"type": "text", "index": 18, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 19, "name": "device_type", "comment": null}, "impressions": {"type": "integer", "index": 20, "name": "impressions", "comment": null}, "language": {"type": "text", "index": 21, "name": "language", "comment": null}, "location_type": {"type": "text", "index": 22, "name": "location_type", "comment": null}, "metro_area": {"type": "text", "index": 23, "name": "metro_area", "comment": null}, "postal_code": {"type": "text", "index": 24, "name": "postal_code", "comment": null}, "network": {"type": "text", "index": 25, "name": "network", "comment": null}, "spend": {"type": "numeric", "index": 26, "name": "spend", "comment": null}, "state": {"type": "text", "index": 27, "name": "state", "comment": null}, "top_vs_other": {"type": "text", "index": 28, "name": "top_vs_other", "comment": null}, "revenue": {"type": "numeric", "index": 29, "name": "revenue", "comment": null}, "location_id": {"type": "bigint", "index": 30, "name": "location_id", "comment": null}, "goal": {"type": "text", "index": 31, "name": "goal", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.microsoft_ads.microsoft_ads.geographic_performance_daily_report"}, "source.microsoft_ads.microsoft_ads.keyword_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_keyword_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "modified_time": {"type": "timestamp without time zone", "index": 3, "name": "modified_time", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "match_type": {"type": "text", "index": 5, "name": "match_type", "comment": null}, "status": {"type": "text", "index": 6, "name": "status", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.microsoft_ads.microsoft_ads.keyword_history"}, "source.microsoft_ads.microsoft_ads.keyword_performance_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_keyword_performance_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "bigint", "index": 5, "name": "ad_id", "comment": null}, "keyword_id": {"type": "bigint", "index": 6, "name": "keyword_id", "comment": null}, "currency_code": {"type": "text", "index": 7, "name": "currency_code", "comment": null}, "device_os": {"type": "text", "index": 8, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 9, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 10, "name": "network", "comment": null}, "language": {"type": "text", "index": 11, "name": "language", "comment": null}, "ad_distribution": {"type": "text", "index": 12, "name": "ad_distribution", "comment": null}, "bid_match_type": {"type": "text", "index": 13, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 14, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 15, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 16, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 17, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 18, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 19, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 20, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 21, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 22, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 23, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 24, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.microsoft_ads.microsoft_ads.keyword_performance_daily_report"}, "source.microsoft_ads.microsoft_ads.search_query_performance_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "microsoft_ads_search_performance_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "account_id": {"type": "bigint", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 3, "name": "campaign_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "ad_id": {"type": "bigint", "index": 5, "name": "ad_id", "comment": null}, "keyword_id": {"type": "bigint", "index": 6, "name": "keyword_id", "comment": null}, "search_query": {"type": "text", "index": 7, "name": "search_query", "comment": null}, "device_os": {"type": "text", "index": 8, "name": "device_os", "comment": null}, "device_type": {"type": "text", "index": 9, "name": "device_type", "comment": null}, "network": {"type": "text", "index": 10, "name": "network", "comment": null}, "language": {"type": "text", "index": 11, "name": "language", "comment": null}, "bid_match_type": {"type": "text", "index": 12, "name": "bid_match_type", "comment": null}, "delivered_match_type": {"type": "text", "index": 13, "name": "delivered_match_type", "comment": null}, "top_vs_other": {"type": "text", "index": 14, "name": "top_vs_other", "comment": null}, "clicks": {"type": "integer", "index": 15, "name": "clicks", "comment": null}, "impressions": {"type": "integer", "index": 16, "name": "impressions", "comment": null}, "spend": {"type": "double precision", "index": 17, "name": "spend", "comment": null}, "conversions_qualified": {"type": "integer", "index": 18, "name": "conversions_qualified", "comment": null}, "conversions": {"type": "integer", "index": 19, "name": "conversions", "comment": null}, "revenue": {"type": "double precision", "index": 20, "name": "revenue", "comment": null}, "all_conversions_qualified": {"type": "integer", "index": 21, "name": "all_conversions_qualified", "comment": null}, "all_conversions": {"type": "integer", "index": 22, "name": "all_conversions", "comment": null}, "all_revenue": {"type": "double precision", "index": 23, "name": "all_revenue", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.microsoft_ads.microsoft_ads.search_query_performance_daily_report"}, "source.pinterest.pinterest_ads.ad_group_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_ad_group_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "campaign_id": {"type": "bigint", "index": 2, "name": "campaign_id", "comment": null}, "created_time": {"type": "text", "index": 3, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "status": {"type": "text", "index": 5, "name": "status", "comment": null}, "start_time": {"type": "text", "index": 6, "name": "start_time", "comment": null}, "end_time": {"type": "integer", "index": 7, "name": "end_time", "comment": null}, "_fivetran_synced": {"type": "text", "index": 8, "name": "_fivetran_synced", "comment": null}, "pacing_delivery_type": {"type": "text", "index": 9, "name": "pacing_delivery_type", "comment": null}, "placement_group": {"type": "text", "index": 10, "name": "placement_group", "comment": null}, "summary_status": {"type": "text", "index": 11, "name": "summary_status", "comment": null}, "ad_account_id": {"type": "bigint", "index": 12, "name": "ad_account_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.pinterest.pinterest_ads.ad_group_history"}, "source.pinterest.pinterest_ads.ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_ad_group_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "ad_group_id": {"type": "bigint", "index": 2, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "text", "index": 3, "name": "ad_group_name", "comment": null}, "ad_group_status": {"type": "text", "index": 4, "name": "ad_group_status", "comment": null}, "campaign_id": {"type": "bigint", "index": 5, "name": "campaign_id", "comment": null}, "advertiser_id": {"type": "bigint", "index": 6, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 8, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 9, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 10, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 11, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 12, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 13, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 14, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 15, "name": "total_conversions_value_in_micro_dollar", "comment": null}, "total_view_checkout": {"type": "integer", "index": 16, "name": "total_view_checkout", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.pinterest.pinterest_ads.ad_group_report"}, "source.pinterest.pinterest_ads.advertiser_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_advertiser_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "updated_time": {"type": "timestamp without time zone", "index": 2, "name": "updated_time", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "billing_profile_status": {"type": "text", "index": 4, "name": "billing_profile_status", "comment": null}, "billing_type": {"type": "text", "index": 5, "name": "billing_type", "comment": null}, "country": {"type": "text", "index": 6, "name": "country", "comment": null}, "created_time": {"type": "timestamp without time zone", "index": 7, "name": "created_time", "comment": null}, "currency": {"type": "text", "index": 8, "name": "currency", "comment": null}, "merchant_id": {"type": "integer", "index": 9, "name": "merchant_id", "comment": null}, "name": {"type": "text", "index": 10, "name": "name", "comment": null}, "owner_user_id": {"type": "integer", "index": 11, "name": "owner_user_id", "comment": null}, "status": {"type": "text", "index": 12, "name": "status", "comment": null}, "owner_username": {"type": "text", "index": 13, "name": "owner_username", "comment": null}, "permissions": {"type": "text", "index": 14, "name": "permissions", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.pinterest.pinterest_ads.advertiser_history"}, "source.pinterest.pinterest_ads.advertiser_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_advertiser_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "advertiser_id": {"type": "bigint", "index": 2, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 4, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 5, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 6, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 7, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 8, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 9, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 10, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 11, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.pinterest.pinterest_ads.advertiser_report"}, "source.pinterest.pinterest_ads.campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "created_time": {"type": "text", "index": 2, "name": "created_time", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "status": {"type": "text", "index": 4, "name": "status", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "advertiser_id": {"type": "bigint", "index": 6, "name": "advertiser_id", "comment": null}, "default_ad_group_budget_in_micro_currency": {"type": "integer", "index": 7, "name": "default_ad_group_budget_in_micro_currency", "comment": null}, "is_automated_campaign": {"type": "boolean", "index": 8, "name": "is_automated_campaign", "comment": null}, "is_campaign_budget_optimization": {"type": "boolean", "index": 9, "name": "is_campaign_budget_optimization", "comment": null}, "is_flexible_daily_budgets": {"type": "boolean", "index": 10, "name": "is_flexible_daily_budgets", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.pinterest.pinterest_ads.campaign_history"}, "source.pinterest.pinterest_ads.campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_campaign_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "campaign_id": {"type": "bigint", "index": 2, "name": "campaign_id", "comment": null}, "campaign_name": {"type": "text", "index": 3, "name": "campaign_name", "comment": null}, "campaign_status": {"type": "text", "index": 4, "name": "campaign_status", "comment": null}, "advertiser_id": {"type": "bigint", "index": 5, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 7, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 8, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 9, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 10, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 11, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 12, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 13, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 14, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.pinterest.pinterest_ads.campaign_report"}, "source.pinterest.pinterest_ads.keyword_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_keyword_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_id": {"type": "text", "index": 1, "name": "_fivetran_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "advertiser_id": {"type": "bigint", "index": 4, "name": "advertiser_id", "comment": null}, "archived": {"type": "boolean", "index": 5, "name": "archived", "comment": null}, "bid": {"type": "integer", "index": 6, "name": "bid", "comment": null}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": null}, "id": {"type": "bigint", "index": 8, "name": "id", "comment": null}, "match_type": {"type": "text", "index": 9, "name": "match_type", "comment": null}, "parent_type": {"type": "text", "index": 10, "name": "parent_type", "comment": null}, "value": {"type": "text", "index": 11, "name": "value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.pinterest.pinterest_ads.keyword_history"}, "source.pinterest.pinterest_ads.keyword_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_keyword_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "keyword_id": {"type": "bigint", "index": 2, "name": "keyword_id", "comment": null}, "pin_promotion_id": {"type": "bigint", "index": 3, "name": "pin_promotion_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 4, "name": "ad_group_id", "comment": null}, "ad_group_name": {"type": "text", "index": 5, "name": "ad_group_name", "comment": null}, "ad_group_status": {"type": "text", "index": 6, "name": "ad_group_status", "comment": null}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": null}, "advertiser_id": {"type": "bigint", "index": 8, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 9, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 10, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 11, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 12, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 13, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 14, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 15, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 16, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 17, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.pinterest.pinterest_ads.keyword_report"}, "source.pinterest.pinterest_ads.pin_promotion_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_pin_promotion_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "bigint", "index": 1, "name": "id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 2, "name": "ad_group_id", "comment": null}, "created_time": {"type": "text", "index": 3, "name": "created_time", "comment": null}, "destination_url": {"type": "text", "index": 4, "name": "destination_url", "comment": null}, "name": {"type": "text", "index": 5, "name": "name", "comment": null}, "pin_id": {"type": "bigint", "index": 6, "name": "pin_id", "comment": null}, "status": {"type": "text", "index": 7, "name": "status", "comment": null}, "creative_type": {"type": "text", "index": 8, "name": "creative_type", "comment": null}, "_fivetran_synced": {"type": "text", "index": 9, "name": "_fivetran_synced", "comment": null}, "ad_account_id": {"type": "bigint", "index": 10, "name": "ad_account_id", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.pinterest.pinterest_ads.pin_promotion_history"}, "source.pinterest.pinterest_ads.pin_promotion_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_pin_promotion_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"date": {"type": "date", "index": 1, "name": "date", "comment": null}, "pin_promotion_id": {"type": "bigint", "index": 2, "name": "pin_promotion_id", "comment": null}, "ad_group_id": {"type": "bigint", "index": 3, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 4, "name": "campaign_id", "comment": null}, "advertiser_id": {"type": "bigint", "index": 5, "name": "advertiser_id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 6, "name": "_fivetran_synced", "comment": null}, "impression_1": {"type": "integer", "index": 7, "name": "impression_1", "comment": null}, "impression_2": {"type": "integer", "index": 8, "name": "impression_2", "comment": null}, "clickthrough_1": {"type": "integer", "index": 9, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "integer", "index": 10, "name": "clickthrough_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 11, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 12, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 13, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 14, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.pinterest.pinterest_ads.pin_promotion_report"}, "source.pinterest.pinterest_ads.pin_promotion_targeting_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_pin_promotion_targeting_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "targeting_type": {"type": "text", "index": 3, "name": "targeting_type", "comment": null}, "targeting_value": {"type": "text", "index": 4, "name": "targeting_value", "comment": null}, "ad_group_id": {"type": "text", "index": 5, "name": "ad_group_id", "comment": null}, "advertiser_id": {"type": "text", "index": 6, "name": "advertiser_id", "comment": null}, "campaign_id": {"type": "bigint", "index": 7, "name": "campaign_id", "comment": null}, "pin_promotion_id": {"type": "text", "index": 8, "name": "pin_promotion_id", "comment": null}, "clickthrough_1": {"type": "double precision", "index": 9, "name": "clickthrough_1", "comment": null}, "clickthrough_2": {"type": "double precision", "index": 10, "name": "clickthrough_2", "comment": null}, "impression_1": {"type": "double precision", "index": 11, "name": "impression_1", "comment": null}, "impression_2": {"type": "double precision", "index": 12, "name": "impression_2", "comment": null}, "spend_in_micro_dollar": {"type": "integer", "index": 13, "name": "spend_in_micro_dollar", "comment": null}, "total_conversions": {"type": "integer", "index": 14, "name": "total_conversions", "comment": null}, "total_conversions_quantity": {"type": "integer", "index": 15, "name": "total_conversions_quantity", "comment": null}, "total_conversions_value_in_micro_dollar": {"type": "integer", "index": 16, "name": "total_conversions_value_in_micro_dollar", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.pinterest.pinterest_ads.pin_promotion_targeting_report"}, "source.pinterest.pinterest_ads.targeting_geo": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_targeting_geo_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"country_id": {"type": "text", "index": 1, "name": "country_id", "comment": null}, "country_name": {"type": "text", "index": 2, "name": "country_name", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.pinterest.pinterest_ads.targeting_geo"}, "source.pinterest.pinterest_ads.targeting_geo_region": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "pinterest_targeting_geo_region_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "country_id": {"type": "text", "index": 2, "name": "country_id", "comment": null}, "region_id": {"type": "text", "index": 3, "name": "region_id", "comment": null}, "region_name": {"type": "text", "index": 4, "name": "region_name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.pinterest.pinterest_ads.targeting_geo_region"}, "source.reddit_ads.reddit_ads.account_conversions_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_account_conversions", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "avg_value": {"type": "double precision", "index": 3, "name": "avg_value", "comment": null}, "click_through_conversion_attribution_window_day": {"type": "integer", "index": 4, "name": "click_through_conversion_attribution_window_day", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 5, "name": "click_through_conversion_attribution_window_month", "comment": null}, "click_through_conversion_attribution_window_week": {"type": "integer", "index": 6, "name": "click_through_conversion_attribution_window_week", "comment": null}, "date": {"type": "date", "index": 7, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 8, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 9, "name": "total_items", "comment": null}, "total_value": {"type": "double precision", "index": 10, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_day": {"type": "integer", "index": 11, "name": "view_through_conversion_attribution_window_day", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 12, "name": "view_through_conversion_attribution_window_month", "comment": null}, "view_through_conversion_attribution_window_week": {"type": "integer", "index": 13, "name": "view_through_conversion_attribution_window_week", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.reddit_ads.reddit_ads.account_conversions_report"}, "source.reddit_ads.reddit_ads.account_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_account_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "date": {"type": "date", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "app_install_metrics_add_payment_info": {"type": "integer", "index": 4, "name": "app_install_metrics_add_payment_info", "comment": null}, "app_install_metrics_add_to_cart": {"type": "integer", "index": 5, "name": "app_install_metrics_add_to_cart", "comment": null}, "app_install_metrics_app_launch": {"type": "integer", "index": 6, "name": "app_install_metrics_app_launch", "comment": null}, "app_install_metrics_completed_tutorial": {"type": "integer", "index": 7, "name": "app_install_metrics_completed_tutorial", "comment": null}, "app_install_metrics_install": {"type": "integer", "index": 8, "name": "app_install_metrics_install", "comment": null}, "app_install_metrics_level_achieved": {"type": "integer", "index": 9, "name": "app_install_metrics_level_achieved", "comment": null}, "app_install_metrics_purchase": {"type": "integer", "index": 10, "name": "app_install_metrics_purchase", "comment": null}, "app_install_metrics_search": {"type": "integer", "index": 11, "name": "app_install_metrics_search", "comment": null}, "app_install_metrics_sign_up": {"type": "integer", "index": 12, "name": "app_install_metrics_sign_up", "comment": null}, "app_install_metrics_spend": {"type": "integer", "index": 13, "name": "app_install_metrics_spend", "comment": null}, "app_install_metrics_spend_credits": {"type": "integer", "index": 14, "name": "app_install_metrics_spend_credits", "comment": null}, "app_install_metrics_view_content": {"type": "integer", "index": 15, "name": "app_install_metrics_view_content", "comment": null}, "clicks": {"type": "integer", "index": 16, "name": "clicks", "comment": null}, "comment_downvotes": {"type": "integer", "index": 17, "name": "comment_downvotes", "comment": null}, "comment_upvotes": {"type": "integer", "index": 18, "name": "comment_upvotes", "comment": null}, "comments_page_views": {"type": "integer", "index": 19, "name": "comments_page_views", "comment": null}, "conversion_roas": {"type": "integer", "index": 20, "name": "conversion_roas", "comment": null}, "cpc": {"type": "double precision", "index": 21, "name": "cpc", "comment": null}, "ctr": {"type": "double precision", "index": 22, "name": "ctr", "comment": null}, "ecpm": {"type": "double precision", "index": 23, "name": "ecpm", "comment": null}, "gallery_item_caption": {"type": "integer", "index": 24, "name": "gallery_item_caption", "comment": null}, "gallery_item_id": {"type": "integer", "index": 25, "name": "gallery_item_id", "comment": null}, "impressions": {"type": "integer", "index": 26, "name": "impressions", "comment": null}, "legacy_click_conversions_attribution_window_day": {"type": "integer", "index": 27, "name": "legacy_click_conversions_attribution_window_day", "comment": null}, "legacy_click_conversions_attribution_window_month": {"type": "integer", "index": 28, "name": "legacy_click_conversions_attribution_window_month", "comment": null}, "legacy_click_conversions_attribution_window_week": {"type": "integer", "index": 29, "name": "legacy_click_conversions_attribution_window_week", "comment": null}, "legacy_view_conversions_attribution_window_day": {"type": "integer", "index": 30, "name": "legacy_view_conversions_attribution_window_day", "comment": null}, "legacy_view_conversions_attribution_window_month": {"type": "integer", "index": 31, "name": "legacy_view_conversions_attribution_window_month", "comment": null}, "legacy_view_conversions_attribution_window_week": {"type": "integer", "index": 32, "name": "legacy_view_conversions_attribution_window_week", "comment": null}, "priority": {"type": "integer", "index": 33, "name": "priority", "comment": null}, "region": {"type": "integer", "index": 34, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 35, "name": "spend", "comment": null}, "video_fully_viewable_impressions": {"type": "integer", "index": 36, "name": "video_fully_viewable_impressions", "comment": null}, "video_plays_expanded": {"type": "integer", "index": 37, "name": "video_plays_expanded", "comment": null}, "video_plays_with_sound": {"type": "integer", "index": 38, "name": "video_plays_with_sound", "comment": null}, "video_started": {"type": "integer", "index": 39, "name": "video_started", "comment": null}, "video_viewable_impressions": {"type": "integer", "index": 40, "name": "video_viewable_impressions", "comment": null}, "video_watched_100_percent": {"type": "integer", "index": 41, "name": "video_watched_100_percent", "comment": null}, "video_watched_10_seconds": {"type": "integer", "index": 42, "name": "video_watched_10_seconds", "comment": null}, "video_watched_25_percent": {"type": "integer", "index": 43, "name": "video_watched_25_percent", "comment": null}, "video_watched_3_seconds": {"type": "integer", "index": 44, "name": "video_watched_3_seconds", "comment": null}, "video_watched_50_percent": {"type": "integer", "index": 45, "name": "video_watched_50_percent", "comment": null}, "video_watched_5_seconds": {"type": "integer", "index": 46, "name": "video_watched_5_seconds", "comment": null}, "video_watched_75_percent": {"type": "integer", "index": 47, "name": "video_watched_75_percent", "comment": null}, "video_watched_95_percent": {"type": "integer", "index": 48, "name": "video_watched_95_percent", "comment": null}, "viewable_impressions": {"type": "integer", "index": 49, "name": "viewable_impressions", "comment": null}, "viewer_comments": {"type": "integer", "index": 50, "name": "viewer_comments", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.reddit_ads.reddit_ads.account_report"}, "source.reddit_ads.reddit_ads.ad_conversions_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_ad_conversions", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "ad_id": {"type": "character varying(255)", "index": 3, "name": "ad_id", "comment": null}, "avg_value": {"type": "double precision", "index": 4, "name": "avg_value", "comment": null}, "click_through_conversion_attribution_window_day": {"type": "integer", "index": 5, "name": "click_through_conversion_attribution_window_day", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 6, "name": "click_through_conversion_attribution_window_month", "comment": null}, "click_through_conversion_attribution_window_week": {"type": "integer", "index": 7, "name": "click_through_conversion_attribution_window_week", "comment": null}, "date": {"type": "date", "index": 8, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 9, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 10, "name": "total_items", "comment": null}, "total_value": {"type": "double precision", "index": 11, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_day": {"type": "integer", "index": 12, "name": "view_through_conversion_attribution_window_day", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 13, "name": "view_through_conversion_attribution_window_month", "comment": null}, "view_through_conversion_attribution_window_week": {"type": "integer", "index": 14, "name": "view_through_conversion_attribution_window_week", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.reddit_ads.reddit_ads.ad_conversions_report"}, "source.reddit_ads.reddit_ads.ad": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_ad_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying(255)", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": null}, "ad_group_id": {"type": "character varying(255)", "index": 4, "name": "ad_group_id", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 5, "name": "campaign_id", "comment": null}, "click_url": {"type": "text", "index": 6, "name": "click_url", "comment": null}, "configured_status": {"type": "text", "index": 7, "name": "configured_status", "comment": null}, "effective_status": {"type": "text", "index": 8, "name": "effective_status", "comment": null}, "is_processing": {"type": "boolean", "index": 9, "name": "is_processing", "comment": null}, "name": {"type": "text", "index": 10, "name": "name", "comment": null}, "post_id": {"type": "text", "index": 11, "name": "post_id", "comment": null}, "post_url": {"type": "integer", "index": 12, "name": "post_url", "comment": null}, "preview_expiry": {"type": "integer", "index": 13, "name": "preview_expiry", "comment": null}, "preview_url": {"type": "integer", "index": 14, "name": "preview_url", "comment": null}, "rejection_reason": {"type": "integer", "index": 15, "name": "rejection_reason", "comment": null}, "search_term": {"type": "integer", "index": 16, "name": "search_term", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.reddit_ads.reddit_ads.ad"}, "source.reddit_ads.reddit_ads.ad_group_conversions_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_ad_group_conversions", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "ad_group_id": {"type": "character varying(255)", "index": 3, "name": "ad_group_id", "comment": null}, "avg_value": {"type": "double precision", "index": 4, "name": "avg_value", "comment": null}, "click_through_conversion_attribution_window_day": {"type": "integer", "index": 5, "name": "click_through_conversion_attribution_window_day", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 6, "name": "click_through_conversion_attribution_window_month", "comment": null}, "click_through_conversion_attribution_window_week": {"type": "integer", "index": 7, "name": "click_through_conversion_attribution_window_week", "comment": null}, "date": {"type": "date", "index": 8, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 9, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 10, "name": "total_items", "comment": null}, "total_value": {"type": "double precision", "index": 11, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_day": {"type": "integer", "index": 12, "name": "view_through_conversion_attribution_window_day", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 13, "name": "view_through_conversion_attribution_window_month", "comment": null}, "view_through_conversion_attribution_window_week": {"type": "integer", "index": 14, "name": "view_through_conversion_attribution_window_week", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.reddit_ads.reddit_ads.ad_group_conversions_report"}, "source.reddit_ads.reddit_ads.ad_group": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_ad_group_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "id": {"type": "character varying(255)", "index": 2, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "bid_strategy": {"type": "text", "index": 4, "name": "bid_strategy", "comment": null}, "bid_value": {"type": "integer", "index": 5, "name": "bid_value", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 6, "name": "campaign_id", "comment": null}, "configured_status": {"type": "text", "index": 7, "name": "configured_status", "comment": null}, "effective_status": {"type": "text", "index": 8, "name": "effective_status", "comment": null}, "end_time": {"type": "timestamp without time zone", "index": 9, "name": "end_time", "comment": null}, "expand_targeting": {"type": "boolean", "index": 10, "name": "expand_targeting", "comment": null}, "goal_type": {"type": "text", "index": 11, "name": "goal_type", "comment": null}, "goal_value": {"type": "integer", "index": 12, "name": "goal_value", "comment": null}, "is_processing": {"type": "boolean", "index": 13, "name": "is_processing", "comment": null}, "name": {"type": "text", "index": 14, "name": "name", "comment": null}, "optimization_strategy_type": {"type": "integer", "index": 15, "name": "optimization_strategy_type", "comment": null}, "start_time": {"type": "timestamp without time zone", "index": 16, "name": "start_time", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.reddit_ads.reddit_ads.ad_group"}, "source.reddit_ads.reddit_ads.ad_group_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_ad_group_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "ad_group_id": {"type": "character varying(255)", "index": 2, "name": "ad_group_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "app_install_metrics_add_payment_info": {"type": "integer", "index": 5, "name": "app_install_metrics_add_payment_info", "comment": null}, "app_install_metrics_add_to_cart": {"type": "integer", "index": 6, "name": "app_install_metrics_add_to_cart", "comment": null}, "app_install_metrics_app_launch": {"type": "integer", "index": 7, "name": "app_install_metrics_app_launch", "comment": null}, "app_install_metrics_completed_tutorial": {"type": "integer", "index": 8, "name": "app_install_metrics_completed_tutorial", "comment": null}, "app_install_metrics_install": {"type": "integer", "index": 9, "name": "app_install_metrics_install", "comment": null}, "app_install_metrics_level_achieved": {"type": "integer", "index": 10, "name": "app_install_metrics_level_achieved", "comment": null}, "app_install_metrics_purchase": {"type": "integer", "index": 11, "name": "app_install_metrics_purchase", "comment": null}, "app_install_metrics_search": {"type": "integer", "index": 12, "name": "app_install_metrics_search", "comment": null}, "app_install_metrics_sign_up": {"type": "integer", "index": 13, "name": "app_install_metrics_sign_up", "comment": null}, "app_install_metrics_spend": {"type": "integer", "index": 14, "name": "app_install_metrics_spend", "comment": null}, "app_install_metrics_spend_credits": {"type": "integer", "index": 15, "name": "app_install_metrics_spend_credits", "comment": null}, "app_install_metrics_view_content": {"type": "integer", "index": 16, "name": "app_install_metrics_view_content", "comment": null}, "clicks": {"type": "integer", "index": 17, "name": "clicks", "comment": null}, "comment_downvotes": {"type": "integer", "index": 18, "name": "comment_downvotes", "comment": null}, "comment_upvotes": {"type": "integer", "index": 19, "name": "comment_upvotes", "comment": null}, "comments_page_views": {"type": "integer", "index": 20, "name": "comments_page_views", "comment": null}, "conversion_roas": {"type": "integer", "index": 21, "name": "conversion_roas", "comment": null}, "cpc": {"type": "double precision", "index": 22, "name": "cpc", "comment": null}, "ctr": {"type": "double precision", "index": 23, "name": "ctr", "comment": null}, "ecpm": {"type": "double precision", "index": 24, "name": "ecpm", "comment": null}, "gallery_item_caption": {"type": "integer", "index": 25, "name": "gallery_item_caption", "comment": null}, "gallery_item_id": {"type": "integer", "index": 26, "name": "gallery_item_id", "comment": null}, "impressions": {"type": "integer", "index": 27, "name": "impressions", "comment": null}, "legacy_click_conversions_attribution_window_day": {"type": "integer", "index": 28, "name": "legacy_click_conversions_attribution_window_day", "comment": null}, "legacy_click_conversions_attribution_window_month": {"type": "integer", "index": 29, "name": "legacy_click_conversions_attribution_window_month", "comment": null}, "legacy_click_conversions_attribution_window_week": {"type": "integer", "index": 30, "name": "legacy_click_conversions_attribution_window_week", "comment": null}, "legacy_view_conversions_attribution_window_day": {"type": "integer", "index": 31, "name": "legacy_view_conversions_attribution_window_day", "comment": null}, "legacy_view_conversions_attribution_window_month": {"type": "integer", "index": 32, "name": "legacy_view_conversions_attribution_window_month", "comment": null}, "legacy_view_conversions_attribution_window_week": {"type": "integer", "index": 33, "name": "legacy_view_conversions_attribution_window_week", "comment": null}, "priority": {"type": "integer", "index": 34, "name": "priority", "comment": null}, "region": {"type": "integer", "index": 35, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 36, "name": "spend", "comment": null}, "video_fully_viewable_impressions": {"type": "integer", "index": 37, "name": "video_fully_viewable_impressions", "comment": null}, "video_plays_expanded": {"type": "integer", "index": 38, "name": "video_plays_expanded", "comment": null}, "video_plays_with_sound": {"type": "integer", "index": 39, "name": "video_plays_with_sound", "comment": null}, "video_started": {"type": "integer", "index": 40, "name": "video_started", "comment": null}, "video_viewable_impressions": {"type": "integer", "index": 41, "name": "video_viewable_impressions", "comment": null}, "video_watched_100_percent": {"type": "integer", "index": 42, "name": "video_watched_100_percent", "comment": null}, "video_watched_10_seconds": {"type": "integer", "index": 43, "name": "video_watched_10_seconds", "comment": null}, "video_watched_25_percent": {"type": "integer", "index": 44, "name": "video_watched_25_percent", "comment": null}, "video_watched_3_seconds": {"type": "integer", "index": 45, "name": "video_watched_3_seconds", "comment": null}, "video_watched_50_percent": {"type": "integer", "index": 46, "name": "video_watched_50_percent", "comment": null}, "video_watched_5_seconds": {"type": "integer", "index": 47, "name": "video_watched_5_seconds", "comment": null}, "video_watched_75_percent": {"type": "integer", "index": 48, "name": "video_watched_75_percent", "comment": null}, "video_watched_95_percent": {"type": "integer", "index": 49, "name": "video_watched_95_percent", "comment": null}, "viewable_impressions": {"type": "integer", "index": 50, "name": "viewable_impressions", "comment": null}, "viewer_comments": {"type": "integer", "index": 51, "name": "viewer_comments", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.reddit_ads.reddit_ads.ad_group_report"}, "source.reddit_ads.reddit_ads.ad_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_ad_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "ad_id": {"type": "character varying(255)", "index": 2, "name": "ad_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "app_install_metrics_add_payment_info": {"type": "integer", "index": 5, "name": "app_install_metrics_add_payment_info", "comment": null}, "app_install_metrics_add_to_cart": {"type": "integer", "index": 6, "name": "app_install_metrics_add_to_cart", "comment": null}, "app_install_metrics_app_launch": {"type": "integer", "index": 7, "name": "app_install_metrics_app_launch", "comment": null}, "app_install_metrics_completed_tutorial": {"type": "integer", "index": 8, "name": "app_install_metrics_completed_tutorial", "comment": null}, "app_install_metrics_install": {"type": "integer", "index": 9, "name": "app_install_metrics_install", "comment": null}, "app_install_metrics_level_achieved": {"type": "integer", "index": 10, "name": "app_install_metrics_level_achieved", "comment": null}, "app_install_metrics_purchase": {"type": "integer", "index": 11, "name": "app_install_metrics_purchase", "comment": null}, "app_install_metrics_search": {"type": "integer", "index": 12, "name": "app_install_metrics_search", "comment": null}, "app_install_metrics_sign_up": {"type": "integer", "index": 13, "name": "app_install_metrics_sign_up", "comment": null}, "app_install_metrics_spend": {"type": "integer", "index": 14, "name": "app_install_metrics_spend", "comment": null}, "app_install_metrics_spend_credits": {"type": "integer", "index": 15, "name": "app_install_metrics_spend_credits", "comment": null}, "app_install_metrics_view_content": {"type": "integer", "index": 16, "name": "app_install_metrics_view_content", "comment": null}, "clicks": {"type": "integer", "index": 17, "name": "clicks", "comment": null}, "comment_downvotes": {"type": "integer", "index": 18, "name": "comment_downvotes", "comment": null}, "comment_upvotes": {"type": "integer", "index": 19, "name": "comment_upvotes", "comment": null}, "comments_page_views": {"type": "integer", "index": 20, "name": "comments_page_views", "comment": null}, "conversion_roas": {"type": "integer", "index": 21, "name": "conversion_roas", "comment": null}, "cpc": {"type": "double precision", "index": 22, "name": "cpc", "comment": null}, "ctr": {"type": "double precision", "index": 23, "name": "ctr", "comment": null}, "ecpm": {"type": "double precision", "index": 24, "name": "ecpm", "comment": null}, "gallery_item_caption": {"type": "integer", "index": 25, "name": "gallery_item_caption", "comment": null}, "gallery_item_id": {"type": "integer", "index": 26, "name": "gallery_item_id", "comment": null}, "impressions": {"type": "integer", "index": 27, "name": "impressions", "comment": null}, "legacy_click_conversions_attribution_window_day": {"type": "integer", "index": 28, "name": "legacy_click_conversions_attribution_window_day", "comment": null}, "legacy_click_conversions_attribution_window_month": {"type": "integer", "index": 29, "name": "legacy_click_conversions_attribution_window_month", "comment": null}, "legacy_click_conversions_attribution_window_week": {"type": "integer", "index": 30, "name": "legacy_click_conversions_attribution_window_week", "comment": null}, "legacy_view_conversions_attribution_window_day": {"type": "integer", "index": 31, "name": "legacy_view_conversions_attribution_window_day", "comment": null}, "legacy_view_conversions_attribution_window_month": {"type": "integer", "index": 32, "name": "legacy_view_conversions_attribution_window_month", "comment": null}, "legacy_view_conversions_attribution_window_week": {"type": "integer", "index": 33, "name": "legacy_view_conversions_attribution_window_week", "comment": null}, "priority": {"type": "integer", "index": 34, "name": "priority", "comment": null}, "region": {"type": "integer", "index": 35, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 36, "name": "spend", "comment": null}, "video_fully_viewable_impressions": {"type": "integer", "index": 37, "name": "video_fully_viewable_impressions", "comment": null}, "video_plays_expanded": {"type": "integer", "index": 38, "name": "video_plays_expanded", "comment": null}, "video_plays_with_sound": {"type": "integer", "index": 39, "name": "video_plays_with_sound", "comment": null}, "video_started": {"type": "integer", "index": 40, "name": "video_started", "comment": null}, "video_viewable_impressions": {"type": "integer", "index": 41, "name": "video_viewable_impressions", "comment": null}, "video_watched_100_percent": {"type": "integer", "index": 42, "name": "video_watched_100_percent", "comment": null}, "video_watched_10_seconds": {"type": "integer", "index": 43, "name": "video_watched_10_seconds", "comment": null}, "video_watched_25_percent": {"type": "integer", "index": 44, "name": "video_watched_25_percent", "comment": null}, "video_watched_3_seconds": {"type": "integer", "index": 45, "name": "video_watched_3_seconds", "comment": null}, "video_watched_50_percent": {"type": "integer", "index": 46, "name": "video_watched_50_percent", "comment": null}, "video_watched_5_seconds": {"type": "integer", "index": 47, "name": "video_watched_5_seconds", "comment": null}, "video_watched_75_percent": {"type": "integer", "index": 48, "name": "video_watched_75_percent", "comment": null}, "video_watched_95_percent": {"type": "integer", "index": 49, "name": "video_watched_95_percent", "comment": null}, "viewable_impressions": {"type": "integer", "index": 50, "name": "viewable_impressions", "comment": null}, "viewer_comments": {"type": "integer", "index": 51, "name": "viewer_comments", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.reddit_ads.reddit_ads.ad_report"}, "source.reddit_ads.reddit_ads.business_account": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_business_account_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying(255)", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "attribution_type": {"type": "text", "index": 3, "name": "attribution_type", "comment": null}, "click_attribution_window": {"type": "text", "index": 4, "name": "click_attribution_window", "comment": null}, "created_at": {"type": "timestamp without time zone", "index": 5, "name": "created_at", "comment": null}, "currency": {"type": "text", "index": 6, "name": "currency", "comment": null}, "status": {"type": "integer", "index": 7, "name": "status", "comment": null}, "time_zone_id": {"type": "text", "index": 8, "name": "time_zone_id", "comment": null}, "view_attribution_window": {"type": "text", "index": 9, "name": "view_attribution_window", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.reddit_ads.reddit_ads.business_account"}, "source.reddit_ads.reddit_ads.campaign_conversions_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_campaign_conversions", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "avg_value": {"type": "double precision", "index": 3, "name": "avg_value", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 4, "name": "campaign_id", "comment": null}, "click_through_conversion_attribution_window_day": {"type": "integer", "index": 5, "name": "click_through_conversion_attribution_window_day", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 6, "name": "click_through_conversion_attribution_window_month", "comment": null}, "click_through_conversion_attribution_window_week": {"type": "integer", "index": 7, "name": "click_through_conversion_attribution_window_week", "comment": null}, "date": {"type": "date", "index": 8, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 9, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 10, "name": "total_items", "comment": null}, "total_value": {"type": "double precision", "index": 11, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_day": {"type": "integer", "index": 12, "name": "view_through_conversion_attribution_window_day", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 13, "name": "view_through_conversion_attribution_window_month", "comment": null}, "view_through_conversion_attribution_window_week": {"type": "integer", "index": 14, "name": "view_through_conversion_attribution_window_week", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.reddit_ads.reddit_ads.campaign_conversions_report"}, "source.reddit_ads.reddit_ads.campaign_country_conversions_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_campaign_country_conversions_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 3, "name": "campaign_id", "comment": null}, "click_through_conversion_attribution_window_month": {"type": "integer", "index": 4, "name": "click_through_conversion_attribution_window_month", "comment": null}, "country": {"type": "text", "index": 5, "name": "country", "comment": null}, "date": {"type": "date", "index": 6, "name": "date", "comment": null}, "event_name": {"type": "text", "index": 7, "name": "event_name", "comment": null}, "total_items": {"type": "integer", "index": 8, "name": "total_items", "comment": null}, "total_value": {"type": "integer", "index": 9, "name": "total_value", "comment": null}, "view_through_conversion_attribution_window_month": {"type": "integer", "index": 10, "name": "view_through_conversion_attribution_window_month", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.reddit_ads.reddit_ads.campaign_country_conversions_report"}, "source.reddit_ads.reddit_ads.campaign_country_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_campaign_country_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 2, "name": "account_id", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 3, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 4, "name": "clicks", "comment": null}, "country": {"type": "text", "index": 5, "name": "country", "comment": null}, "date": {"type": "date", "index": 6, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": null}, "region": {"type": "text", "index": 8, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 9, "name": "spend", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.reddit_ads.reddit_ads.campaign_country_report"}, "source.reddit_ads.reddit_ads.campaign": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_campaign_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "character varying(255)", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "character varying(255)", "index": 3, "name": "account_id", "comment": null}, "configured_status": {"type": "text", "index": 4, "name": "configured_status", "comment": null}, "effective_status": {"type": "text", "index": 5, "name": "effective_status", "comment": null}, "funding_instrument_id": {"type": "integer", "index": 6, "name": "funding_instrument_id", "comment": null}, "is_processing": {"type": "boolean", "index": 7, "name": "is_processing", "comment": null}, "name": {"type": "text", "index": 8, "name": "name", "comment": null}, "objective": {"type": "text", "index": 9, "name": "objective", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.reddit_ads.reddit_ads.campaign"}, "source.reddit_ads.reddit_ads.campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "reddit_ads_campaign_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "character varying(255)", "index": 1, "name": "account_id", "comment": null}, "campaign_id": {"type": "character varying(255)", "index": 2, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 3, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "app_install_metrics_add_payment_info": {"type": "integer", "index": 5, "name": "app_install_metrics_add_payment_info", "comment": null}, "app_install_metrics_add_to_cart": {"type": "integer", "index": 6, "name": "app_install_metrics_add_to_cart", "comment": null}, "app_install_metrics_app_launch": {"type": "integer", "index": 7, "name": "app_install_metrics_app_launch", "comment": null}, "app_install_metrics_completed_tutorial": {"type": "integer", "index": 8, "name": "app_install_metrics_completed_tutorial", "comment": null}, "app_install_metrics_install": {"type": "integer", "index": 9, "name": "app_install_metrics_install", "comment": null}, "app_install_metrics_level_achieved": {"type": "integer", "index": 10, "name": "app_install_metrics_level_achieved", "comment": null}, "app_install_metrics_purchase": {"type": "integer", "index": 11, "name": "app_install_metrics_purchase", "comment": null}, "app_install_metrics_search": {"type": "integer", "index": 12, "name": "app_install_metrics_search", "comment": null}, "app_install_metrics_sign_up": {"type": "integer", "index": 13, "name": "app_install_metrics_sign_up", "comment": null}, "app_install_metrics_spend": {"type": "integer", "index": 14, "name": "app_install_metrics_spend", "comment": null}, "app_install_metrics_spend_credits": {"type": "integer", "index": 15, "name": "app_install_metrics_spend_credits", "comment": null}, "app_install_metrics_view_content": {"type": "integer", "index": 16, "name": "app_install_metrics_view_content", "comment": null}, "clicks": {"type": "integer", "index": 17, "name": "clicks", "comment": null}, "comment_downvotes": {"type": "integer", "index": 18, "name": "comment_downvotes", "comment": null}, "comment_upvotes": {"type": "integer", "index": 19, "name": "comment_upvotes", "comment": null}, "comments_page_views": {"type": "integer", "index": 20, "name": "comments_page_views", "comment": null}, "conversion_roas": {"type": "integer", "index": 21, "name": "conversion_roas", "comment": null}, "cpc": {"type": "double precision", "index": 22, "name": "cpc", "comment": null}, "ctr": {"type": "double precision", "index": 23, "name": "ctr", "comment": null}, "ecpm": {"type": "double precision", "index": 24, "name": "ecpm", "comment": null}, "gallery_item_caption": {"type": "integer", "index": 25, "name": "gallery_item_caption", "comment": null}, "gallery_item_id": {"type": "integer", "index": 26, "name": "gallery_item_id", "comment": null}, "impressions": {"type": "integer", "index": 27, "name": "impressions", "comment": null}, "legacy_click_conversions_attribution_window_day": {"type": "integer", "index": 28, "name": "legacy_click_conversions_attribution_window_day", "comment": null}, "legacy_click_conversions_attribution_window_month": {"type": "integer", "index": 29, "name": "legacy_click_conversions_attribution_window_month", "comment": null}, "legacy_click_conversions_attribution_window_week": {"type": "integer", "index": 30, "name": "legacy_click_conversions_attribution_window_week", "comment": null}, "legacy_view_conversions_attribution_window_day": {"type": "integer", "index": 31, "name": "legacy_view_conversions_attribution_window_day", "comment": null}, "legacy_view_conversions_attribution_window_month": {"type": "integer", "index": 32, "name": "legacy_view_conversions_attribution_window_month", "comment": null}, "legacy_view_conversions_attribution_window_week": {"type": "integer", "index": 33, "name": "legacy_view_conversions_attribution_window_week", "comment": null}, "priority": {"type": "integer", "index": 34, "name": "priority", "comment": null}, "region": {"type": "integer", "index": 35, "name": "region", "comment": null}, "spend": {"type": "integer", "index": 36, "name": "spend", "comment": null}, "video_fully_viewable_impressions": {"type": "integer", "index": 37, "name": "video_fully_viewable_impressions", "comment": null}, "video_plays_expanded": {"type": "integer", "index": 38, "name": "video_plays_expanded", "comment": null}, "video_plays_with_sound": {"type": "integer", "index": 39, "name": "video_plays_with_sound", "comment": null}, "video_started": {"type": "integer", "index": 40, "name": "video_started", "comment": null}, "video_viewable_impressions": {"type": "integer", "index": 41, "name": "video_viewable_impressions", "comment": null}, "video_watched_100_percent": {"type": "integer", "index": 42, "name": "video_watched_100_percent", "comment": null}, "video_watched_10_seconds": {"type": "integer", "index": 43, "name": "video_watched_10_seconds", "comment": null}, "video_watched_25_percent": {"type": "integer", "index": 44, "name": "video_watched_25_percent", "comment": null}, "video_watched_3_seconds": {"type": "integer", "index": 45, "name": "video_watched_3_seconds", "comment": null}, "video_watched_50_percent": {"type": "integer", "index": 46, "name": "video_watched_50_percent", "comment": null}, "video_watched_5_seconds": {"type": "integer", "index": 47, "name": "video_watched_5_seconds", "comment": null}, "video_watched_75_percent": {"type": "integer", "index": 48, "name": "video_watched_75_percent", "comment": null}, "video_watched_95_percent": {"type": "integer", "index": 49, "name": "video_watched_95_percent", "comment": null}, "viewable_impressions": {"type": "integer", "index": 50, "name": "viewable_impressions", "comment": null}, "viewer_comments": {"type": "integer", "index": 51, "name": "viewer_comments", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.reddit_ads.reddit_ads.campaign_report"}, "source.snapchat_ads.snapchat_ads.ad_account_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_ad_account_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 3, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snapchat_ads.snapchat_ads.ad_account_history"}, "source.snapchat_ads.snapchat_ads.ad_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_ad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "ad_squad_id": {"type": "text", "index": 2, "name": "ad_squad_id", "comment": null}, "creative_id": {"type": "text", "index": 3, "name": "creative_id", "comment": null}, "name": {"type": "text", "index": 4, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snapchat_ads.snapchat_ads.ad_history"}, "source.snapchat_ads.snapchat_ads.ad_hourly_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_ad_hourly_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "text", "index": 1, "name": "ad_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 3, "name": "impressions", "comment": null}, "spend": {"type": "integer", "index": 4, "name": "spend", "comment": null}, "swipes": {"type": "integer", "index": 5, "name": "swipes", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 6, "name": "conversion_purchases_value", "comment": null}, "conversion_add_billing": {"type": "integer", "index": 7, "name": "conversion_add_billing", "comment": null}, "conversion_add_cart": {"type": "integer", "index": 8, "name": "conversion_add_cart", "comment": null}, "conversion_app_opens": {"type": "integer", "index": 9, "name": "conversion_app_opens", "comment": null}, "conversion_level_completes": {"type": "integer", "index": 10, "name": "conversion_level_completes", "comment": null}, "conversion_page_views": {"type": "integer", "index": 11, "name": "conversion_page_views", "comment": null}, "conversion_purchases": {"type": "integer", "index": 12, "name": "conversion_purchases", "comment": null}, "conversion_save": {"type": "integer", "index": 13, "name": "conversion_save", "comment": null}, "conversion_searches": {"type": "integer", "index": 14, "name": "conversion_searches", "comment": null}, "conversion_sign_ups": {"type": "integer", "index": 15, "name": "conversion_sign_ups", "comment": null}, "conversion_start_checkout": {"type": "integer", "index": 16, "name": "conversion_start_checkout", "comment": null}, "conversion_view_content": {"type": "integer", "index": 17, "name": "conversion_view_content", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snapchat_ads.snapchat_ads.ad_hourly_report"}, "source.snapchat_ads.snapchat_ads.ad_squad_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_ad_squad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "campaign_id": {"type": "text", "index": 2, "name": "campaign_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snapchat_ads.snapchat_ads.ad_squad_history"}, "source.snapchat_ads.snapchat_ads.ad_squad_hourly_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_ad_squad_hourly_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_squad_id": {"type": "text", "index": 1, "name": "ad_squad_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "android_installs": {"type": "integer", "index": 4, "name": "android_installs", "comment": null}, "attachment_avg_view_time_millis": {"type": "integer", "index": 5, "name": "attachment_avg_view_time_millis", "comment": null}, "attachment_quartile_1": {"type": "integer", "index": 6, "name": "attachment_quartile_1", "comment": null}, "attachment_quartile_2": {"type": "integer", "index": 7, "name": "attachment_quartile_2", "comment": null}, "attachment_quartile_3": {"type": "integer", "index": 8, "name": "attachment_quartile_3", "comment": null}, "attachment_total_view_time_millis": {"type": "integer", "index": 9, "name": "attachment_total_view_time_millis", "comment": null}, "attachment_view_completion": {"type": "integer", "index": 10, "name": "attachment_view_completion", "comment": null}, "avg_screen_time_millis": {"type": "integer", "index": 11, "name": "avg_screen_time_millis", "comment": null}, "avg_view_time_millis": {"type": "integer", "index": 12, "name": "avg_view_time_millis", "comment": null}, "conversion_add_billing": {"type": "integer", "index": 13, "name": "conversion_add_billing", "comment": null}, "conversion_add_cart": {"type": "integer", "index": 14, "name": "conversion_add_cart", "comment": null}, "conversion_app_opens": {"type": "integer", "index": 15, "name": "conversion_app_opens", "comment": null}, "conversion_level_completes": {"type": "integer", "index": 16, "name": "conversion_level_completes", "comment": null}, "conversion_page_views": {"type": "integer", "index": 17, "name": "conversion_page_views", "comment": null}, "conversion_purchases": {"type": "integer", "index": 18, "name": "conversion_purchases", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 19, "name": "conversion_purchases_value", "comment": null}, "conversion_save": {"type": "integer", "index": 20, "name": "conversion_save", "comment": null}, "conversion_searches": {"type": "integer", "index": 21, "name": "conversion_searches", "comment": null}, "conversion_sign_ups": {"type": "integer", "index": 22, "name": "conversion_sign_ups", "comment": null}, "conversion_start_checkout": {"type": "integer", "index": 23, "name": "conversion_start_checkout", "comment": null}, "conversion_view_content": {"type": "integer", "index": 24, "name": "conversion_view_content", "comment": null}, "impressions": {"type": "integer", "index": 25, "name": "impressions", "comment": null}, "ios_installs": {"type": "integer", "index": 26, "name": "ios_installs", "comment": null}, "quartile_1": {"type": "integer", "index": 27, "name": "quartile_1", "comment": null}, "quartile_2": {"type": "integer", "index": 28, "name": "quartile_2", "comment": null}, "quartile_3": {"type": "integer", "index": 29, "name": "quartile_3", "comment": null}, "saves": {"type": "integer", "index": 30, "name": "saves", "comment": null}, "screen_time_millis": {"type": "integer", "index": 31, "name": "screen_time_millis", "comment": null}, "shares": {"type": "integer", "index": 32, "name": "shares", "comment": null}, "spend": {"type": "integer", "index": 33, "name": "spend", "comment": null}, "story_completes": {"type": "integer", "index": 34, "name": "story_completes", "comment": null}, "story_opens": {"type": "integer", "index": 35, "name": "story_opens", "comment": null}, "swipe_up_percent": {"type": "integer", "index": 36, "name": "swipe_up_percent", "comment": null}, "swipes": {"type": "integer", "index": 37, "name": "swipes", "comment": null}, "total_installs": {"type": "integer", "index": 38, "name": "total_installs", "comment": null}, "video_views": {"type": "integer", "index": 39, "name": "video_views", "comment": null}, "view_completion": {"type": "integer", "index": 40, "name": "view_completion", "comment": null}, "view_time_millis": {"type": "integer", "index": 41, "name": "view_time_millis", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snapchat_ads.snapchat_ads.ad_squad_hourly_report"}, "source.snapchat_ads.snapchat_ads.campaign_geo_country_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_campaign_geo_country_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"attachment_quartile_1": {"type": "integer", "index": 1, "name": "attachment_quartile_1", "comment": null}, "attachment_quartile_2": {"type": "integer", "index": 2, "name": "attachment_quartile_2", "comment": null}, "attachment_quartile_3": {"type": "integer", "index": 3, "name": "attachment_quartile_3", "comment": null}, "attachment_total_view_time_millis": {"type": "integer", "index": 4, "name": "attachment_total_view_time_millis", "comment": null}, "attachment_view_completion": {"type": "boolean", "index": 5, "name": "attachment_view_completion", "comment": null}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 7, "name": "date", "comment": null}, "country": {"type": "text", "index": 8, "name": "country", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "quartile_1": {"type": "integer", "index": 10, "name": "quartile_1", "comment": null}, "quartile_2": {"type": "integer", "index": 11, "name": "quartile_2", "comment": null}, "quartile_3": {"type": "integer", "index": 12, "name": "quartile_3", "comment": null}, "saves": {"type": "integer", "index": 13, "name": "saves", "comment": null}, "screen_time_millis": {"type": "integer", "index": 14, "name": "screen_time_millis", "comment": null}, "shares": {"type": "integer", "index": 15, "name": "shares", "comment": null}, "spend": {"type": "integer", "index": 16, "name": "spend", "comment": null}, "swipes": {"type": "integer", "index": 17, "name": "swipes", "comment": null}, "video_views": {"type": "integer", "index": 18, "name": "video_views", "comment": null}, "view_completion": {"type": "boolean", "index": 19, "name": "view_completion", "comment": null}, "view_time_millis": {"type": "integer", "index": 20, "name": "view_time_millis", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 21, "name": "conversion_purchases_value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snapchat_ads.snapchat_ads.campaign_geo_country_daily_report"}, "source.snapchat_ads.snapchat_ads.campaign_geo_region_daily_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_campaign_geo_region_daily_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"attachment_quartile_1": {"type": "integer", "index": 1, "name": "attachment_quartile_1", "comment": null}, "attachment_quartile_2": {"type": "integer", "index": 2, "name": "attachment_quartile_2", "comment": null}, "attachment_quartile_3": {"type": "integer", "index": 3, "name": "attachment_quartile_3", "comment": null}, "attachment_total_view_time_millis": {"type": "integer", "index": 4, "name": "attachment_total_view_time_millis", "comment": null}, "attachment_view_completion": {"type": "boolean", "index": 5, "name": "attachment_view_completion", "comment": null}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": null}, "date": {"type": "date", "index": 7, "name": "date", "comment": null}, "region": {"type": "text", "index": 8, "name": "region", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "quartile_1": {"type": "integer", "index": 10, "name": "quartile_1", "comment": null}, "quartile_2": {"type": "integer", "index": 11, "name": "quartile_2", "comment": null}, "quartile_3": {"type": "integer", "index": 12, "name": "quartile_3", "comment": null}, "saves": {"type": "integer", "index": 13, "name": "saves", "comment": null}, "screen_time_millis": {"type": "integer", "index": 14, "name": "screen_time_millis", "comment": null}, "shares": {"type": "integer", "index": 15, "name": "shares", "comment": null}, "spend": {"type": "integer", "index": 16, "name": "spend", "comment": null}, "swipes": {"type": "integer", "index": 17, "name": "swipes", "comment": null}, "video_views": {"type": "integer", "index": 18, "name": "video_views", "comment": null}, "view_completion": {"type": "boolean", "index": 19, "name": "view_completion", "comment": null}, "view_time_millis": {"type": "integer", "index": 20, "name": "view_time_millis", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 21, "name": "conversion_purchases_value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snapchat_ads.snapchat_ads.campaign_geo_region_daily_report"}, "source.snapchat_ads.snapchat_ads.campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "ad_account_id": {"type": "text", "index": 2, "name": "ad_account_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "_fivetran_synced": {"type": "text", "index": 4, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snapchat_ads.snapchat_ads.campaign_history"}, "source.snapchat_ads.snapchat_ads.campaign_hourly_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_campaign_hourly_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "text", "index": 1, "name": "campaign_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_synced", "comment": null}, "android_installs": {"type": "integer", "index": 4, "name": "android_installs", "comment": null}, "attachment_avg_view_time_millis": {"type": "integer", "index": 5, "name": "attachment_avg_view_time_millis", "comment": null}, "attachment_quartile_1": {"type": "integer", "index": 6, "name": "attachment_quartile_1", "comment": null}, "attachment_quartile_2": {"type": "integer", "index": 7, "name": "attachment_quartile_2", "comment": null}, "attachment_quartile_3": {"type": "integer", "index": 8, "name": "attachment_quartile_3", "comment": null}, "attachment_total_view_time_millis": {"type": "integer", "index": 9, "name": "attachment_total_view_time_millis", "comment": null}, "attachment_view_completion": {"type": "integer", "index": 10, "name": "attachment_view_completion", "comment": null}, "avg_screen_time_millis": {"type": "integer", "index": 11, "name": "avg_screen_time_millis", "comment": null}, "avg_view_time_millis": {"type": "integer", "index": 12, "name": "avg_view_time_millis", "comment": null}, "conversion_add_billing": {"type": "integer", "index": 13, "name": "conversion_add_billing", "comment": null}, "conversion_add_cart": {"type": "integer", "index": 14, "name": "conversion_add_cart", "comment": null}, "conversion_app_opens": {"type": "integer", "index": 15, "name": "conversion_app_opens", "comment": null}, "conversion_level_completes": {"type": "integer", "index": 16, "name": "conversion_level_completes", "comment": null}, "conversion_page_views": {"type": "integer", "index": 17, "name": "conversion_page_views", "comment": null}, "conversion_purchases": {"type": "integer", "index": 18, "name": "conversion_purchases", "comment": null}, "conversion_purchases_value": {"type": "double precision", "index": 19, "name": "conversion_purchases_value", "comment": null}, "conversion_save": {"type": "integer", "index": 20, "name": "conversion_save", "comment": null}, "conversion_searches": {"type": "integer", "index": 21, "name": "conversion_searches", "comment": null}, "conversion_sign_ups": {"type": "integer", "index": 22, "name": "conversion_sign_ups", "comment": null}, "conversion_start_checkout": {"type": "integer", "index": 23, "name": "conversion_start_checkout", "comment": null}, "conversion_view_content": {"type": "integer", "index": 24, "name": "conversion_view_content", "comment": null}, "impressions": {"type": "integer", "index": 25, "name": "impressions", "comment": null}, "ios_installs": {"type": "integer", "index": 26, "name": "ios_installs", "comment": null}, "quartile_1": {"type": "integer", "index": 27, "name": "quartile_1", "comment": null}, "quartile_2": {"type": "integer", "index": 28, "name": "quartile_2", "comment": null}, "quartile_3": {"type": "integer", "index": 29, "name": "quartile_3", "comment": null}, "saves": {"type": "integer", "index": 30, "name": "saves", "comment": null}, "screen_time_millis": {"type": "integer", "index": 31, "name": "screen_time_millis", "comment": null}, "shares": {"type": "integer", "index": 32, "name": "shares", "comment": null}, "spend": {"type": "integer", "index": 33, "name": "spend", "comment": null}, "story_completes": {"type": "integer", "index": 34, "name": "story_completes", "comment": null}, "story_opens": {"type": "integer", "index": 35, "name": "story_opens", "comment": null}, "swipe_up_percent": {"type": "integer", "index": 36, "name": "swipe_up_percent", "comment": null}, "swipes": {"type": "integer", "index": 37, "name": "swipes", "comment": null}, "total_installs": {"type": "integer", "index": 38, "name": "total_installs", "comment": null}, "video_views": {"type": "integer", "index": 39, "name": "video_views", "comment": null}, "view_completion": {"type": "integer", "index": 40, "name": "view_completion", "comment": null}, "view_time_millis": {"type": "integer", "index": 41, "name": "view_time_millis", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snapchat_ads.snapchat_ads.campaign_hourly_report"}, "source.snapchat_ads.snapchat_ads.creative_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_creative_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "ad_account_id": {"type": "text", "index": 2, "name": "ad_account_id", "comment": null}, "name": {"type": "text", "index": 3, "name": "name", "comment": null}, "web_view_url": {"type": "text", "index": 4, "name": "web_view_url", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snapchat_ads.snapchat_ads.creative_history"}, "source.snapchat_ads.snapchat_ads.creative_url_tag_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "snapchat_creative_url_tag_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"creative_id": {"type": "text", "index": 1, "name": "creative_id", "comment": null}, "key": {"type": "text", "index": 2, "name": "key", "comment": null}, "value": {"type": "text", "index": 3, "name": "value", "comment": null}, "updated_at": {"type": "text", "index": 4, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.snapchat_ads.snapchat_ads.creative_url_tag_history"}, "source.tiktok_ads.tiktok_ads.ad_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_ad_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "integer", "index": 1, "name": "ad_id", "comment": null}, "updated_at": {"type": "text", "index": 2, "name": "updated_at", "comment": null}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": null}, "adgroup_id": {"type": "integer", "index": 4, "name": "adgroup_id", "comment": null}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": null}, "create_time": {"type": "text", "index": 6, "name": "create_time", "comment": null}, "ad_name": {"type": "text", "index": 7, "name": "ad_name", "comment": null}, "call_to_action": {"type": "text", "index": 8, "name": "call_to_action", "comment": null}, "secondary_status": {"type": "text", "index": 9, "name": "secondary_status", "comment": null}, "operation_status": {"type": "text", "index": 10, "name": "operation_status", "comment": null}, "ad_text": {"type": "text", "index": 11, "name": "ad_text", "comment": null}, "video_id": {"type": "text", "index": 12, "name": "video_id", "comment": null}, "app_name": {"type": "integer", "index": 13, "name": "app_name", "comment": null}, "deeplink": {"type": "integer", "index": 14, "name": "deeplink", "comment": null}, "landing_page_url": {"type": "text", "index": 15, "name": "landing_page_url", "comment": null}, "display_name": {"type": "text", "index": 16, "name": "display_name", "comment": null}, "profile_image_url": {"type": "integer", "index": 17, "name": "profile_image_url", "comment": null}, "impression_tracking_url": {"type": "integer", "index": 18, "name": "impression_tracking_url", "comment": null}, "click_tracking_url": {"type": "integer", "index": 19, "name": "click_tracking_url", "comment": null}, "playable_url": {"type": "integer", "index": 20, "name": "playable_url", "comment": null}, "is_aco": {"type": "boolean", "index": 21, "name": "is_aco", "comment": null}, "creative_authorized": {"type": "boolean", "index": 22, "name": "creative_authorized", "comment": null}, "is_new_structure": {"type": "boolean", "index": 23, "name": "is_new_structure", "comment": null}, "image_ids": {"type": "text", "index": 24, "name": "image_ids", "comment": null}, "_fivetran_synced": {"type": "text", "index": 25, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.tiktok_ads.tiktok_ads.ad_history"}, "source.tiktok_ads.tiktok_ads.ad_report_hourly": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_ad_report_hourly_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "integer", "index": 1, "name": "ad_id", "comment": null}, "stat_time_hour": {"type": "timestamp without time zone", "index": 2, "name": "stat_time_hour", "comment": null}, "cost_per_conversion": {"type": "double precision", "index": 3, "name": "cost_per_conversion", "comment": null}, "cpc": {"type": "double precision", "index": 4, "name": "cpc", "comment": null}, "video_play_actions": {"type": "integer", "index": 5, "name": "video_play_actions", "comment": null}, "conversion_rate": {"type": "integer", "index": 6, "name": "conversion_rate", "comment": null}, "video_views_p_75": {"type": "integer", "index": 7, "name": "video_views_p_75", "comment": null}, "result": {"type": "integer", "index": 8, "name": "result", "comment": null}, "video_views_p_50": {"type": "integer", "index": 9, "name": "video_views_p_50", "comment": null}, "impressions": {"type": "integer", "index": 10, "name": "impressions", "comment": null}, "comments": {"type": "integer", "index": 11, "name": "comments", "comment": null}, "real_time_cost_per_result": {"type": "double precision", "index": 12, "name": "real_time_cost_per_result", "comment": null}, "conversion": {"type": "integer", "index": 13, "name": "conversion", "comment": null}, "real_time_result": {"type": "integer", "index": 14, "name": "real_time_result", "comment": null}, "video_views_p_100": {"type": "integer", "index": 15, "name": "video_views_p_100", "comment": null}, "shares": {"type": "integer", "index": 16, "name": "shares", "comment": null}, "real_time_conversion_rate": {"type": "integer", "index": 17, "name": "real_time_conversion_rate", "comment": null}, "cost_per_secondary_goal_result": {"type": "text", "index": 18, "name": "cost_per_secondary_goal_result", "comment": null}, "secondary_goal_result_rate": {"type": "text", "index": 19, "name": "secondary_goal_result_rate", "comment": null}, "clicks": {"type": "integer", "index": 20, "name": "clicks", "comment": null}, "cost_per_1000_reached": {"type": "integer", "index": 21, "name": "cost_per_1000_reached", "comment": null}, "video_views_p_25": {"type": "integer", "index": 22, "name": "video_views_p_25", "comment": null}, "reach": {"type": "integer", "index": 23, "name": "reach", "comment": null}, "real_time_cost_per_conversion": {"type": "double precision", "index": 24, "name": "real_time_cost_per_conversion", "comment": null}, "profile_visits_rate": {"type": "integer", "index": 25, "name": "profile_visits_rate", "comment": null}, "average_video_play": {"type": "double precision", "index": 26, "name": "average_video_play", "comment": null}, "profile_visits": {"type": "integer", "index": 27, "name": "profile_visits", "comment": null}, "cpm": {"type": "double precision", "index": 28, "name": "cpm", "comment": null}, "ctr": {"type": "double precision", "index": 29, "name": "ctr", "comment": null}, "video_watched_2_s": {"type": "integer", "index": 30, "name": "video_watched_2_s", "comment": null}, "follows": {"type": "integer", "index": 31, "name": "follows", "comment": null}, "result_rate": {"type": "integer", "index": 32, "name": "result_rate", "comment": null}, "video_watched_6_s": {"type": "integer", "index": 33, "name": "video_watched_6_s", "comment": null}, "secondary_goal_result": {"type": "text", "index": 34, "name": "secondary_goal_result", "comment": null}, "cost_per_result": {"type": "double precision", "index": 35, "name": "cost_per_result", "comment": null}, "average_video_play_per_user": {"type": "integer", "index": 36, "name": "average_video_play_per_user", "comment": null}, "real_time_result_rate": {"type": "integer", "index": 37, "name": "real_time_result_rate", "comment": null}, "spend": {"type": "double precision", "index": 38, "name": "spend", "comment": null}, "likes": {"type": "integer", "index": 39, "name": "likes", "comment": null}, "real_time_conversion": {"type": "integer", "index": 40, "name": "real_time_conversion", "comment": null}, "total_purchase_value": {"type": "double precision", "index": 41, "name": "total_purchase_value", "comment": null}, "total_sales_lead_value": {"type": "double precision", "index": 42, "name": "total_sales_lead_value", "comment": null}, "_fivetran_synced": {"type": "text", "index": 43, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.tiktok_ads.tiktok_ads.ad_report_hourly"}, "source.tiktok_ads.tiktok_ads.adgroup_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_adgroup_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"adgroup_id": {"type": "integer", "index": 1, "name": "adgroup_id", "comment": null}, "updated_at": {"type": "text", "index": 2, "name": "updated_at", "comment": null}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "create_time": {"type": "text", "index": 5, "name": "create_time", "comment": null}, "adgroup_name": {"type": "text", "index": 6, "name": "adgroup_name", "comment": null}, "placement_type": {"type": "text", "index": 7, "name": "placement_type", "comment": null}, "profile_image": {"type": "integer", "index": 8, "name": "profile_image", "comment": null}, "landing_page_url": {"type": "integer", "index": 9, "name": "landing_page_url", "comment": null}, "display_name": {"type": "integer", "index": 10, "name": "display_name", "comment": null}, "app_type": {"type": "integer", "index": 11, "name": "app_type", "comment": null}, "app_download_url": {"type": "integer", "index": 12, "name": "app_download_url", "comment": null}, "app_name": {"type": "integer", "index": 13, "name": "app_name", "comment": null}, "optimization_event": {"type": "text", "index": 14, "name": "optimization_event", "comment": null}, "secondary_optimization_event": {"type": "integer", "index": 15, "name": "secondary_optimization_event", "comment": null}, "creative_material_mode": {"type": "text", "index": 16, "name": "creative_material_mode", "comment": null}, "audience_type": {"type": "integer", "index": 17, "name": "audience_type", "comment": null}, "gender": {"type": "text", "index": 18, "name": "gender", "comment": null}, "min_android_version": {"type": "integer", "index": 19, "name": "min_android_version", "comment": null}, "min_ios_version": {"type": "integer", "index": 20, "name": "min_ios_version", "comment": null}, "budget_mode": {"type": "text", "index": 21, "name": "budget_mode", "comment": null}, "schedule_type": {"type": "text", "index": 22, "name": "schedule_type", "comment": null}, "dayparting": {"type": "integer", "index": 23, "name": "dayparting", "comment": null}, "optimization_goal": {"type": "text", "index": 24, "name": "optimization_goal", "comment": null}, "cpv_video_duration": {"type": "integer", "index": 25, "name": "cpv_video_duration", "comment": null}, "pacing": {"type": "text", "index": 26, "name": "pacing", "comment": null}, "billing_event": {"type": "text", "index": 27, "name": "billing_event", "comment": null}, "bid_type": {"type": "text", "index": 28, "name": "bid_type", "comment": null}, "deep_bid_type": {"type": "integer", "index": 29, "name": "deep_bid_type", "comment": null}, "impression_tracking_url": {"type": "integer", "index": 30, "name": "impression_tracking_url", "comment": null}, "click_tracking_url": {"type": "integer", "index": 31, "name": "click_tracking_url", "comment": null}, "secondary_status": {"type": "text", "index": 32, "name": "secondary_status", "comment": null}, "operation_status": {"type": "text", "index": 33, "name": "operation_status", "comment": null}, "statistic_type": {"type": "integer", "index": 34, "name": "statistic_type", "comment": null}, "video_download": {"type": "text", "index": 35, "name": "video_download", "comment": null}, "open_url": {"type": "integer", "index": 36, "name": "open_url", "comment": null}, "open_url_type": {"type": "integer", "index": 37, "name": "open_url_type", "comment": null}, "fallback_type": {"type": "integer", "index": 38, "name": "fallback_type", "comment": null}, "budget": {"type": "integer", "index": 39, "name": "budget", "comment": null}, "bid_price": {"type": "integer", "index": 40, "name": "bid_price", "comment": null}, "conversion_bid_price": {"type": "integer", "index": 41, "name": "conversion_bid_price", "comment": null}, "deep_cpa_bid": {"type": "integer", "index": 42, "name": "deep_cpa_bid", "comment": null}, "schedule_start_time": {"type": "text", "index": 43, "name": "schedule_start_time", "comment": null}, "schedule_end_time": {"type": "text", "index": 44, "name": "schedule_end_time", "comment": null}, "app_id": {"type": "integer", "index": 45, "name": "app_id", "comment": null}, "pixel_id": {"type": "integer", "index": 46, "name": "pixel_id", "comment": null}, "inventory_filter_enabled": {"type": "boolean", "index": 47, "name": "inventory_filter_enabled", "comment": null}, "is_hfss": {"type": "boolean", "index": 48, "name": "is_hfss", "comment": null}, "is_new_structure": {"type": "boolean", "index": 49, "name": "is_new_structure", "comment": null}, "category": {"type": "integer", "index": 50, "name": "category", "comment": null}, "is_comment_disable": {"type": "integer", "index": 51, "name": "is_comment_disable", "comment": null}, "skip_learning_phase": {"type": "integer", "index": 52, "name": "skip_learning_phase", "comment": null}, "frequency": {"type": "integer", "index": 53, "name": "frequency", "comment": null}, "frequency_schedule": {"type": "integer", "index": 54, "name": "frequency_schedule", "comment": null}, "action_days": {"type": "integer", "index": 55, "name": "action_days", "comment": null}, "audience": {"type": "text", "index": 56, "name": "audience", "comment": null}, "excluded_audience": {"type": "text", "index": 57, "name": "excluded_audience", "comment": null}, "location": {"type": "text", "index": 58, "name": "location", "comment": null}, "interest_category_v_2": {"type": "text", "index": 59, "name": "interest_category_v_2", "comment": null}, "pangle_block_app_list_id": {"type": "text", "index": 60, "name": "pangle_block_app_list_id", "comment": null}, "action_categories": {"type": "text", "index": 61, "name": "action_categories", "comment": null}, "placements": {"type": "text", "index": 62, "name": "placements", "comment": null}, "keywords": {"type": "integer", "index": 63, "name": "keywords", "comment": null}, "age_groups": {"type": "text", "index": 64, "name": "age_groups", "comment": null}, "languages": {"type": "text", "index": 65, "name": "languages", "comment": null}, "operating_systems": {"type": "text", "index": 66, "name": "operating_systems", "comment": null}, "network_types": {"type": "text", "index": 67, "name": "network_types", "comment": null}, "carriers": {"type": "text", "index": 68, "name": "carriers", "comment": null}, "video_actions": {"type": "text", "index": 69, "name": "video_actions", "comment": null}, "package": {"type": "integer", "index": 70, "name": "package", "comment": null}, "_fivetran_synced": {"type": "text", "index": 71, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.tiktok_ads.tiktok_ads.adgroup_history"}, "source.tiktok_ads.tiktok_ads.adgroup_report_hourly": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_adgroup_report_hourly_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"adgroup_id": {"type": "integer", "index": 1, "name": "adgroup_id", "comment": null}, "stat_time_hour": {"type": "timestamp without time zone", "index": 2, "name": "stat_time_hour", "comment": null}, "cost_per_conversion": {"type": "double precision", "index": 3, "name": "cost_per_conversion", "comment": null}, "cpc": {"type": "double precision", "index": 4, "name": "cpc", "comment": null}, "video_play_actions": {"type": "integer", "index": 5, "name": "video_play_actions", "comment": null}, "conversion_rate": {"type": "integer", "index": 6, "name": "conversion_rate", "comment": null}, "video_views_p_75": {"type": "integer", "index": 7, "name": "video_views_p_75", "comment": null}, "result": {"type": "integer", "index": 8, "name": "result", "comment": null}, "video_views_p_50": {"type": "integer", "index": 9, "name": "video_views_p_50", "comment": null}, "impressions": {"type": "integer", "index": 10, "name": "impressions", "comment": null}, "comments": {"type": "integer", "index": 11, "name": "comments", "comment": null}, "real_time_cost_per_result": {"type": "double precision", "index": 12, "name": "real_time_cost_per_result", "comment": null}, "conversion": {"type": "integer", "index": 13, "name": "conversion", "comment": null}, "real_time_result": {"type": "integer", "index": 14, "name": "real_time_result", "comment": null}, "video_views_p_100": {"type": "integer", "index": 15, "name": "video_views_p_100", "comment": null}, "shares": {"type": "integer", "index": 16, "name": "shares", "comment": null}, "real_time_conversion_rate": {"type": "double precision", "index": 17, "name": "real_time_conversion_rate", "comment": null}, "cost_per_secondary_goal_result": {"type": "text", "index": 18, "name": "cost_per_secondary_goal_result", "comment": null}, "secondary_goal_result_rate": {"type": "text", "index": 19, "name": "secondary_goal_result_rate", "comment": null}, "clicks": {"type": "integer", "index": 20, "name": "clicks", "comment": null}, "cost_per_1000_reached": {"type": "double precision", "index": 21, "name": "cost_per_1000_reached", "comment": null}, "video_views_p_25": {"type": "integer", "index": 22, "name": "video_views_p_25", "comment": null}, "reach": {"type": "integer", "index": 23, "name": "reach", "comment": null}, "real_time_cost_per_conversion": {"type": "double precision", "index": 24, "name": "real_time_cost_per_conversion", "comment": null}, "profile_visits_rate": {"type": "integer", "index": 25, "name": "profile_visits_rate", "comment": null}, "average_video_play": {"type": "double precision", "index": 26, "name": "average_video_play", "comment": null}, "profile_visits": {"type": "integer", "index": 27, "name": "profile_visits", "comment": null}, "cpm": {"type": "double precision", "index": 28, "name": "cpm", "comment": null}, "ctr": {"type": "double precision", "index": 29, "name": "ctr", "comment": null}, "video_watched_2_s": {"type": "integer", "index": 30, "name": "video_watched_2_s", "comment": null}, "follows": {"type": "integer", "index": 31, "name": "follows", "comment": null}, "result_rate": {"type": "double precision", "index": 32, "name": "result_rate", "comment": null}, "video_watched_6_s": {"type": "integer", "index": 33, "name": "video_watched_6_s", "comment": null}, "secondary_goal_result": {"type": "text", "index": 34, "name": "secondary_goal_result", "comment": null}, "cost_per_result": {"type": "double precision", "index": 35, "name": "cost_per_result", "comment": null}, "average_video_play_per_user": {"type": "double precision", "index": 36, "name": "average_video_play_per_user", "comment": null}, "real_time_result_rate": {"type": "double precision", "index": 37, "name": "real_time_result_rate", "comment": null}, "spend": {"type": "double precision", "index": 38, "name": "spend", "comment": null}, "likes": {"type": "integer", "index": 39, "name": "likes", "comment": null}, "real_time_conversion": {"type": "integer", "index": 40, "name": "real_time_conversion", "comment": null}, "total_purchase_value": {"type": "double precision", "index": 41, "name": "total_purchase_value", "comment": null}, "total_sales_lead_value": {"type": "double precision", "index": 42, "name": "total_sales_lead_value", "comment": null}, "_fivetran_synced": {"type": "text", "index": 43, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.tiktok_ads.tiktok_ads.adgroup_report_hourly"}, "source.tiktok_ads.tiktok_ads.advertiser": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_advertiser_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "name": {"type": "text", "index": 2, "name": "name", "comment": null}, "address": {"type": "text", "index": 3, "name": "address", "comment": null}, "company": {"type": "text", "index": 4, "name": "company", "comment": null}, "contacter": {"type": "integer", "index": 5, "name": "contacter", "comment": null}, "country": {"type": "text", "index": 6, "name": "country", "comment": null}, "currency": {"type": "text", "index": 7, "name": "currency", "comment": null}, "description": {"type": "text", "index": 8, "name": "description", "comment": null}, "email": {"type": "text", "index": 9, "name": "email", "comment": null}, "industry": {"type": "integer", "index": 10, "name": "industry", "comment": null}, "license_no": {"type": "integer", "index": 11, "name": "license_no", "comment": null}, "license_url": {"type": "integer", "index": 12, "name": "license_url", "comment": null}, "promotion_area": {"type": "integer", "index": 13, "name": "promotion_area", "comment": null}, "rejected_reason": {"type": "integer", "index": 14, "name": "rejected_reason", "comment": null}, "role": {"type": "text", "index": 15, "name": "role", "comment": null}, "status": {"type": "text", "index": 16, "name": "status", "comment": null}, "telephone_number": {"type": "text", "index": 17, "name": "telephone_number", "comment": null}, "timezone": {"type": "text", "index": 18, "name": "timezone", "comment": null}, "balance": {"type": "double precision", "index": 19, "name": "balance", "comment": null}, "create_time": {"type": "text", "index": 20, "name": "create_time", "comment": null}, "language": {"type": "text", "index": 21, "name": "language", "comment": null}, "cellphone_number": {"type": "text", "index": 22, "name": "cellphone_number", "comment": null}, "_fivetran_synced": {"type": "text", "index": 23, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.tiktok_ads.tiktok_ads.advertiser"}, "source.tiktok_ads.tiktok_ads.campaign_country_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_campaign_country_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "campaign_id": {"type": "integer", "index": 2, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 3, "name": "clicks", "comment": null}, "conversion": {"type": "integer", "index": 4, "name": "conversion", "comment": null}, "conversion_rate": {"type": "double precision", "index": 5, "name": "conversion_rate", "comment": null}, "cost_per_conversion": {"type": "double precision", "index": 6, "name": "cost_per_conversion", "comment": null}, "country_code": {"type": "text", "index": 7, "name": "country_code", "comment": null}, "cpc": {"type": "double precision", "index": 8, "name": "cpc", "comment": null}, "cpm": {"type": "double precision", "index": 9, "name": "cpm", "comment": null}, "ctr": {"type": "double precision", "index": 10, "name": "ctr", "comment": null}, "impressions": {"type": "integer", "index": 11, "name": "impressions", "comment": null}, "real_time_conversion": {"type": "integer", "index": 12, "name": "real_time_conversion", "comment": null}, "spend": {"type": "double precision", "index": 13, "name": "spend", "comment": null}, "stat_time_day": {"type": "timestamp without time zone", "index": 14, "name": "stat_time_day", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.tiktok_ads.tiktok_ads.campaign_country_report"}, "source.tiktok_ads.tiktok_ads.campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"ad_id": {"type": "integer", "index": 1, "name": "ad_id", "comment": null}, "updated_at": {"type": "text", "index": 2, "name": "updated_at", "comment": null}, "advertiser_id": {"type": "integer", "index": 3, "name": "advertiser_id", "comment": null}, "adgroup_id": {"type": "integer", "index": 4, "name": "adgroup_id", "comment": null}, "campaign_id": {"type": "integer", "index": 5, "name": "campaign_id", "comment": null}, "create_time": {"type": "text", "index": 6, "name": "create_time", "comment": null}, "ad_name": {"type": "text", "index": 7, "name": "ad_name", "comment": null}, "call_to_action": {"type": "text", "index": 8, "name": "call_to_action", "comment": null}, "secondary_status": {"type": "text", "index": 9, "name": "secondary_status", "comment": null}, "operation_status": {"type": "text", "index": 10, "name": "operation_status", "comment": null}, "ad_text": {"type": "text", "index": 11, "name": "ad_text", "comment": null}, "video_id": {"type": "text", "index": 12, "name": "video_id", "comment": null}, "app_name": {"type": "integer", "index": 13, "name": "app_name", "comment": null}, "deeplink": {"type": "integer", "index": 14, "name": "deeplink", "comment": null}, "landing_page_url": {"type": "text", "index": 15, "name": "landing_page_url", "comment": null}, "display_name": {"type": "text", "index": 16, "name": "display_name", "comment": null}, "profile_image_url": {"type": "integer", "index": 17, "name": "profile_image_url", "comment": null}, "impression_tracking_url": {"type": "integer", "index": 18, "name": "impression_tracking_url", "comment": null}, "click_tracking_url": {"type": "integer", "index": 19, "name": "click_tracking_url", "comment": null}, "playable_url": {"type": "integer", "index": 20, "name": "playable_url", "comment": null}, "is_aco": {"type": "boolean", "index": 21, "name": "is_aco", "comment": null}, "creative_authorized": {"type": "boolean", "index": 22, "name": "creative_authorized", "comment": null}, "is_new_structure": {"type": "boolean", "index": 23, "name": "is_new_structure", "comment": null}, "image_ids": {"type": "text", "index": 24, "name": "image_ids", "comment": null}, "_fivetran_synced": {"type": "text", "index": 25, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.tiktok_ads.tiktok_ads.campaign_history"}, "source.tiktok_ads.tiktok_ads.campaign_report_hourly": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_campaign_report_hourly_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"campaign_id": {"type": "integer", "index": 1, "name": "campaign_id", "comment": null}, "stat_time_hour": {"type": "timestamp without time zone", "index": 2, "name": "stat_time_hour", "comment": null}, "cost_per_conversion": {"type": "double precision", "index": 3, "name": "cost_per_conversion", "comment": null}, "cpc": {"type": "double precision", "index": 4, "name": "cpc", "comment": null}, "video_play_actions": {"type": "integer", "index": 5, "name": "video_play_actions", "comment": null}, "conversion_rate": {"type": "integer", "index": 6, "name": "conversion_rate", "comment": null}, "video_views_p_75": {"type": "integer", "index": 7, "name": "video_views_p_75", "comment": null}, "result": {"type": "integer", "index": 8, "name": "result", "comment": null}, "video_views_p_50": {"type": "integer", "index": 9, "name": "video_views_p_50", "comment": null}, "impressions": {"type": "integer", "index": 10, "name": "impressions", "comment": null}, "comments": {"type": "integer", "index": 11, "name": "comments", "comment": null}, "real_time_cost_per_result": {"type": "double precision", "index": 12, "name": "real_time_cost_per_result", "comment": null}, "conversion": {"type": "integer", "index": 13, "name": "conversion", "comment": null}, "real_time_result": {"type": "integer", "index": 14, "name": "real_time_result", "comment": null}, "video_views_p_100": {"type": "integer", "index": 15, "name": "video_views_p_100", "comment": null}, "shares": {"type": "integer", "index": 16, "name": "shares", "comment": null}, "real_time_conversion_rate": {"type": "double precision", "index": 17, "name": "real_time_conversion_rate", "comment": null}, "cost_per_secondary_goal_result": {"type": "text", "index": 18, "name": "cost_per_secondary_goal_result", "comment": null}, "secondary_goal_result_rate": {"type": "text", "index": 19, "name": "secondary_goal_result_rate", "comment": null}, "clicks": {"type": "integer", "index": 20, "name": "clicks", "comment": null}, "cost_per_1000_reached": {"type": "double precision", "index": 21, "name": "cost_per_1000_reached", "comment": null}, "video_views_p_25": {"type": "integer", "index": 22, "name": "video_views_p_25", "comment": null}, "reach": {"type": "integer", "index": 23, "name": "reach", "comment": null}, "real_time_cost_per_conversion": {"type": "double precision", "index": 24, "name": "real_time_cost_per_conversion", "comment": null}, "profile_visits_rate": {"type": "integer", "index": 25, "name": "profile_visits_rate", "comment": null}, "average_video_play": {"type": "double precision", "index": 26, "name": "average_video_play", "comment": null}, "profile_visits": {"type": "integer", "index": 27, "name": "profile_visits", "comment": null}, "cpm": {"type": "double precision", "index": 28, "name": "cpm", "comment": null}, "ctr": {"type": "double precision", "index": 29, "name": "ctr", "comment": null}, "video_watched_2_s": {"type": "integer", "index": 30, "name": "video_watched_2_s", "comment": null}, "follows": {"type": "integer", "index": 31, "name": "follows", "comment": null}, "result_rate": {"type": "double precision", "index": 32, "name": "result_rate", "comment": null}, "video_watched_6_s": {"type": "integer", "index": 33, "name": "video_watched_6_s", "comment": null}, "secondary_goal_result": {"type": "text", "index": 34, "name": "secondary_goal_result", "comment": null}, "cost_per_result": {"type": "double precision", "index": 35, "name": "cost_per_result", "comment": null}, "average_video_play_per_user": {"type": "double precision", "index": 36, "name": "average_video_play_per_user", "comment": null}, "real_time_result_rate": {"type": "double precision", "index": 37, "name": "real_time_result_rate", "comment": null}, "spend": {"type": "double precision", "index": 38, "name": "spend", "comment": null}, "likes": {"type": "integer", "index": 39, "name": "likes", "comment": null}, "real_time_conversion": {"type": "integer", "index": 40, "name": "real_time_conversion", "comment": null}, "total_purchase_value": {"type": "double precision", "index": 41, "name": "total_purchase_value", "comment": null}, "total_sales_lead_value": {"type": "double precision", "index": 42, "name": "total_sales_lead_value", "comment": null}, "_fivetran_synced": {"type": "text", "index": 43, "name": "_fivetran_synced", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.tiktok_ads.tiktok_ads.campaign_report_hourly"}, "source.tiktok_ads.tiktok_ads.location": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "tiktok_location_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "advertiser_id": {"type": "integer", "index": 2, "name": "advertiser_id", "comment": null}, "area_type": {"type": "text", "index": 3, "name": "area_type", "comment": null}, "country_code": {"type": "text", "index": 4, "name": "country_code", "comment": null}, "parent_id": {"type": "text", "index": 5, "name": "parent_id", "comment": null}, "region_id": {"type": "text", "index": 6, "name": "region_id", "comment": null}, "region_level": {"type": "text", "index": 7, "name": "region_level", "comment": null}, "region_name": {"type": "text", "index": 8, "name": "region_name", "comment": null}, "support_below_18": {"type": "boolean", "index": 9, "name": "support_below_18", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.tiktok_ads.tiktok_ads.location"}, "source.twitter_ads.twitter_ads.account_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_account_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "approval_status": {"type": "text", "index": 2, "name": "approval_status", "comment": null}, "business_id": {"type": "integer", "index": 3, "name": "business_id", "comment": null}, "business_name": {"type": "integer", "index": 4, "name": "business_name", "comment": null}, "created_at": {"type": "text", "index": 5, "name": "created_at", "comment": null}, "deleted": {"type": "boolean", "index": 6, "name": "deleted", "comment": null}, "id": {"type": "text", "index": 7, "name": "id", "comment": null}, "industry_type": {"type": "integer", "index": 8, "name": "industry_type", "comment": null}, "name": {"type": "character varying", "index": 9, "name": "name", "comment": null}, "salt": {"type": "integer", "index": 10, "name": "salt", "comment": null}, "timezone": {"type": "text", "index": 11, "name": "timezone", "comment": null}, "timezone_switch_at": {"type": "text", "index": 12, "name": "timezone_switch_at", "comment": null}, "updated_at": {"type": "text", "index": 13, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.twitter_ads.twitter_ads.account_history"}, "source.twitter_ads.twitter_ads.campaign_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_campaign_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": null}, "created_at": {"type": "text", "index": 3, "name": "created_at", "comment": null}, "currency": {"type": "text", "index": 4, "name": "currency", "comment": null}, "daily_budget_amount_local_micro": {"type": "integer", "index": 5, "name": "daily_budget_amount_local_micro", "comment": null}, "deleted": {"type": "boolean", "index": 6, "name": "deleted", "comment": null}, "duration_in_days": {"type": "integer", "index": 7, "name": "duration_in_days", "comment": null}, "end_time": {"type": "text", "index": 8, "name": "end_time", "comment": null}, "entity_status": {"type": "text", "index": 9, "name": "entity_status", "comment": null}, "frequency_cap": {"type": "integer", "index": 10, "name": "frequency_cap", "comment": null}, "funding_instrument_id": {"type": "text", "index": 11, "name": "funding_instrument_id", "comment": null}, "id": {"type": "text", "index": 12, "name": "id", "comment": null}, "name": {"type": "text", "index": 13, "name": "name", "comment": null}, "servable": {"type": "boolean", "index": 14, "name": "servable", "comment": null}, "standard_delivery": {"type": "boolean", "index": 15, "name": "standard_delivery", "comment": null}, "start_time": {"type": "text", "index": 16, "name": "start_time", "comment": null}, "total_budget_amount_local_micro": {"type": "integer", "index": 17, "name": "total_budget_amount_local_micro", "comment": null}, "updated_at": {"type": "text", "index": 18, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.twitter_ads.twitter_ads.campaign_history"}, "source.twitter_ads.twitter_ads.campaign_locations_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_campaign_locations_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"segment": {"type": "text", "index": 1, "name": "segment", "comment": null}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 3, "name": "billed_charge_local_micro", "comment": null}, "campaign_id": {"type": "text", "index": 4, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 5, "name": "clicks", "comment": null}, "date": {"type": "timestamp without time zone", "index": 6, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 7, "name": "impressions", "comment": null}, "placement": {"type": "text", "index": 8, "name": "placement", "comment": null}, "url_clicks": {"type": "integer", "index": 9, "name": "url_clicks", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.twitter_ads.twitter_ads.campaign_locations_report"}, "source.twitter_ads.twitter_ads.campaign_regions_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_campaign_regions_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"location_name": {"type": "text", "index": 1, "name": "location_name", "comment": null}, "location_type": {"type": "text", "index": 2, "name": "location_type", "comment": null}, "segment": {"type": "text", "index": 3, "name": "segment", "comment": null}, "account_id": {"type": "text", "index": 4, "name": "account_id", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 5, "name": "billed_charge_local_micro", "comment": null}, "campaign_id": {"type": "text", "index": 6, "name": "campaign_id", "comment": null}, "clicks": {"type": "integer", "index": 7, "name": "clicks", "comment": null}, "date": {"type": "timestamp without time zone", "index": 8, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 9, "name": "impressions", "comment": null}, "placement": {"type": "text", "index": 10, "name": "placement", "comment": null}, "url_clicks": {"type": "integer", "index": 11, "name": "url_clicks", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.twitter_ads.twitter_ads.campaign_regions_report"}, "source.twitter_ads.twitter_ads.campaign_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_campaign_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "text", "index": 1, "name": "account_id", "comment": null}, "campaign_id": {"type": "text", "index": 2, "name": "campaign_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 3, "name": "date", "comment": null}, "placement": {"type": "text", "index": 4, "name": "placement", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "app_clicks": {"type": "integer", "index": 6, "name": "app_clicks", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 7, "name": "billed_charge_local_micro", "comment": null}, "billed_engagements": {"type": "integer", "index": 8, "name": "billed_engagements", "comment": null}, "card_engagements": {"type": "integer", "index": 9, "name": "card_engagements", "comment": null}, "carousel_swipes": {"type": "integer", "index": 10, "name": "carousel_swipes", "comment": null}, "clicks": {"type": "integer", "index": 11, "name": "clicks", "comment": null}, "conversion_custom_metric": {"type": "integer", "index": 12, "name": "conversion_custom_metric", "comment": null}, "conversion_custom_order_quantity": {"type": "integer", "index": 13, "name": "conversion_custom_order_quantity", "comment": null}, "conversion_custom_order_quantity_engagement": {"type": "integer", "index": 14, "name": "conversion_custom_order_quantity_engagement", "comment": null}, "conversion_custom_order_quantity_view": {"type": "integer", "index": 15, "name": "conversion_custom_order_quantity_view", "comment": null}, "conversion_custom_post_engagement": {"type": "integer", "index": 16, "name": "conversion_custom_post_engagement", "comment": null}, "conversion_custom_post_view": {"type": "integer", "index": 17, "name": "conversion_custom_post_view", "comment": null}, "conversion_custom_sale_amount": {"type": "integer", "index": 18, "name": "conversion_custom_sale_amount", "comment": null}, "conversion_custom_sale_amount_engagement": {"type": "integer", "index": 19, "name": "conversion_custom_sale_amount_engagement", "comment": null}, "conversion_custom_sale_amount_view": {"type": "integer", "index": 20, "name": "conversion_custom_sale_amount_view", "comment": null}, "conversion_downloads_metric": {"type": "integer", "index": 21, "name": "conversion_downloads_metric", "comment": null}, "conversion_downloads_order_quantity": {"type": "integer", "index": 22, "name": "conversion_downloads_order_quantity", "comment": null}, "conversion_downloads_order_quantity_engagement": {"type": "integer", "index": 23, "name": "conversion_downloads_order_quantity_engagement", "comment": null}, "conversion_downloads_order_quantity_view": {"type": "integer", "index": 24, "name": "conversion_downloads_order_quantity_view", "comment": null}, "conversion_downloads_post_engagement": {"type": "integer", "index": 25, "name": "conversion_downloads_post_engagement", "comment": null}, "conversion_downloads_post_view": {"type": "integer", "index": 26, "name": "conversion_downloads_post_view", "comment": null}, "conversion_downloads_sale_amount": {"type": "integer", "index": 27, "name": "conversion_downloads_sale_amount", "comment": null}, "conversion_downloads_sale_amount_engagement": {"type": "integer", "index": 28, "name": "conversion_downloads_sale_amount_engagement", "comment": null}, "conversion_downloads_sale_amount_view": {"type": "integer", "index": 29, "name": "conversion_downloads_sale_amount_view", "comment": null}, "conversion_purchases_assisted": {"type": "integer", "index": 30, "name": "conversion_purchases_assisted", "comment": null}, "conversion_purchases_metric": {"type": "integer", "index": 31, "name": "conversion_purchases_metric", "comment": null}, "conversion_purchases_order_quantity": {"type": "integer", "index": 32, "name": "conversion_purchases_order_quantity", "comment": null}, "conversion_purchases_order_quantity_engagement": {"type": "integer", "index": 33, "name": "conversion_purchases_order_quantity_engagement", "comment": null}, "conversion_purchases_order_quantity_view": {"type": "integer", "index": 34, "name": "conversion_purchases_order_quantity_view", "comment": null}, "conversion_purchases_post_engagement": {"type": "integer", "index": 35, "name": "conversion_purchases_post_engagement", "comment": null}, "conversion_purchases_post_view": {"type": "integer", "index": 36, "name": "conversion_purchases_post_view", "comment": null}, "conversion_purchases_sale_amount": {"type": "integer", "index": 37, "name": "conversion_purchases_sale_amount", "comment": null}, "conversion_purchases_sale_amount_engagement": {"type": "integer", "index": 38, "name": "conversion_purchases_sale_amount_engagement", "comment": null}, "conversion_purchases_sale_amount_view": {"type": "integer", "index": 39, "name": "conversion_purchases_sale_amount_view", "comment": null}, "conversion_sign_ups_assisted": {"type": "integer", "index": 40, "name": "conversion_sign_ups_assisted", "comment": null}, "conversion_sign_ups_metric": {"type": "integer", "index": 41, "name": "conversion_sign_ups_metric", "comment": null}, "conversion_sign_ups_order_quantity": {"type": "integer", "index": 42, "name": "conversion_sign_ups_order_quantity", "comment": null}, "conversion_sign_ups_order_quantity_engagement": {"type": "integer", "index": 43, "name": "conversion_sign_ups_order_quantity_engagement", "comment": null}, "conversion_sign_ups_order_quantity_view": {"type": "integer", "index": 44, "name": "conversion_sign_ups_order_quantity_view", "comment": null}, "conversion_sign_ups_post_engagement": {"type": "integer", "index": 45, "name": "conversion_sign_ups_post_engagement", "comment": null}, "conversion_sign_ups_post_view": {"type": "integer", "index": 46, "name": "conversion_sign_ups_post_view", "comment": null}, "conversion_sign_ups_sale_amount": {"type": "integer", "index": 47, "name": "conversion_sign_ups_sale_amount", "comment": null}, "conversion_sign_ups_sale_amount_engagement": {"type": "integer", "index": 48, "name": "conversion_sign_ups_sale_amount_engagement", "comment": null}, "conversion_sign_ups_sale_amount_view": {"type": "integer", "index": 49, "name": "conversion_sign_ups_sale_amount_view", "comment": null}, "conversion_site_visits_metric": {"type": "integer", "index": 50, "name": "conversion_site_visits_metric", "comment": null}, "conversion_site_visits_order_quantity": {"type": "integer", "index": 51, "name": "conversion_site_visits_order_quantity", "comment": null}, "conversion_site_visits_order_quantity_engagement": {"type": "integer", "index": 52, "name": "conversion_site_visits_order_quantity_engagement", "comment": null}, "conversion_site_visits_order_quantity_view": {"type": "integer", "index": 53, "name": "conversion_site_visits_order_quantity_view", "comment": null}, "conversion_site_visits_post_engagement": {"type": "integer", "index": 54, "name": "conversion_site_visits_post_engagement", "comment": null}, "conversion_site_visits_post_view": {"type": "integer", "index": 55, "name": "conversion_site_visits_post_view", "comment": null}, "conversion_site_visits_sale_amount": {"type": "integer", "index": 56, "name": "conversion_site_visits_sale_amount", "comment": null}, "conversion_site_visits_sale_amount_engagement": {"type": "integer", "index": 57, "name": "conversion_site_visits_sale_amount_engagement", "comment": null}, "conversion_site_visits_sale_amount_view": {"type": "integer", "index": 58, "name": "conversion_site_visits_sale_amount_view", "comment": null}, "engagements": {"type": "integer", "index": 59, "name": "engagements", "comment": null}, "follows": {"type": "integer", "index": 60, "name": "follows", "comment": null}, "impressions": {"type": "integer", "index": 61, "name": "impressions", "comment": null}, "likes": {"type": "integer", "index": 62, "name": "likes", "comment": null}, "media_engagements": {"type": "integer", "index": 63, "name": "media_engagements", "comment": null}, "media_views": {"type": "integer", "index": 64, "name": "media_views", "comment": null}, "mobile_conversion_achievements_unlocked_assisted": {"type": "integer", "index": 65, "name": "mobile_conversion_achievements_unlocked_assisted", "comment": null}, "mobile_conversion_achievements_unlocked_order_quantity": {"type": "integer", "index": 66, "name": "mobile_conversion_achievements_unlocked_order_quantity", "comment": null}, "mobile_conversion_achievements_unlocked_post_engagement": {"type": "integer", "index": 67, "name": "mobile_conversion_achievements_unlocked_post_engagement", "comment": null}, "mobile_conversion_achievements_unlocked_post_view": {"type": "integer", "index": 68, "name": "mobile_conversion_achievements_unlocked_post_view", "comment": null}, "mobile_conversion_achievements_unlocked_sale_amount": {"type": "integer", "index": 69, "name": "mobile_conversion_achievements_unlocked_sale_amount", "comment": null}, "mobile_conversion_add_to_carts_assisted": {"type": "integer", "index": 70, "name": "mobile_conversion_add_to_carts_assisted", "comment": null}, "mobile_conversion_add_to_carts_order_quantity": {"type": "integer", "index": 71, "name": "mobile_conversion_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_add_to_carts_post_engagement": {"type": "integer", "index": 72, "name": "mobile_conversion_add_to_carts_post_engagement", "comment": null}, "mobile_conversion_add_to_carts_post_view": {"type": "integer", "index": 73, "name": "mobile_conversion_add_to_carts_post_view", "comment": null}, "mobile_conversion_add_to_carts_sale_amount": {"type": "integer", "index": 74, "name": "mobile_conversion_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_add_to_wishlists_assisted": {"type": "integer", "index": 75, "name": "mobile_conversion_add_to_wishlists_assisted", "comment": null}, "mobile_conversion_add_to_wishlists_order_quantity": {"type": "integer", "index": 76, "name": "mobile_conversion_add_to_wishlists_order_quantity", "comment": null}, "mobile_conversion_add_to_wishlists_post_engagement": {"type": "integer", "index": 77, "name": "mobile_conversion_add_to_wishlists_post_engagement", "comment": null}, "mobile_conversion_add_to_wishlists_post_view": {"type": "integer", "index": 78, "name": "mobile_conversion_add_to_wishlists_post_view", "comment": null}, "mobile_conversion_add_to_wishlists_sale_amount": {"type": "integer", "index": 79, "name": "mobile_conversion_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_checkouts_initiated_assisted": {"type": "integer", "index": 80, "name": "mobile_conversion_checkouts_initiated_assisted", "comment": null}, "mobile_conversion_checkouts_initiated_order_quantity": {"type": "integer", "index": 81, "name": "mobile_conversion_checkouts_initiated_order_quantity", "comment": null}, "mobile_conversion_checkouts_initiated_post_engagement": {"type": "integer", "index": 82, "name": "mobile_conversion_checkouts_initiated_post_engagement", "comment": null}, "mobile_conversion_checkouts_initiated_post_view": {"type": "integer", "index": 83, "name": "mobile_conversion_checkouts_initiated_post_view", "comment": null}, "mobile_conversion_checkouts_initiated_sale_amount": {"type": "integer", "index": 84, "name": "mobile_conversion_checkouts_initiated_sale_amount", "comment": null}, "mobile_conversion_content_views_assisted": {"type": "integer", "index": 85, "name": "mobile_conversion_content_views_assisted", "comment": null}, "mobile_conversion_content_views_order_quantity": {"type": "integer", "index": 86, "name": "mobile_conversion_content_views_order_quantity", "comment": null}, "mobile_conversion_content_views_post_engagement": {"type": "integer", "index": 87, "name": "mobile_conversion_content_views_post_engagement", "comment": null}, "mobile_conversion_content_views_post_view": {"type": "integer", "index": 88, "name": "mobile_conversion_content_views_post_view", "comment": null}, "mobile_conversion_content_views_sale_amount": {"type": "integer", "index": 89, "name": "mobile_conversion_content_views_sale_amount", "comment": null}, "mobile_conversion_downloads_order_quantity": {"type": "integer", "index": 90, "name": "mobile_conversion_downloads_order_quantity", "comment": null}, "mobile_conversion_downloads_post_engagement": {"type": "integer", "index": 91, "name": "mobile_conversion_downloads_post_engagement", "comment": null}, "mobile_conversion_downloads_post_view": {"type": "integer", "index": 92, "name": "mobile_conversion_downloads_post_view", "comment": null}, "mobile_conversion_downloads_sale_amount": {"type": "integer", "index": 93, "name": "mobile_conversion_downloads_sale_amount", "comment": null}, "mobile_conversion_installs_assisted": {"type": "integer", "index": 94, "name": "mobile_conversion_installs_assisted", "comment": null}, "mobile_conversion_installs_order_quantity": {"type": "integer", "index": 95, "name": "mobile_conversion_installs_order_quantity", "comment": null}, "mobile_conversion_installs_post_engagement": {"type": "integer", "index": 96, "name": "mobile_conversion_installs_post_engagement", "comment": null}, "mobile_conversion_installs_post_view": {"type": "integer", "index": 97, "name": "mobile_conversion_installs_post_view", "comment": null}, "mobile_conversion_installs_sale_amount": {"type": "integer", "index": 98, "name": "mobile_conversion_installs_sale_amount", "comment": null}, "mobile_conversion_invites_assisted": {"type": "integer", "index": 99, "name": "mobile_conversion_invites_assisted", "comment": null}, "mobile_conversion_invites_order_quantity": {"type": "integer", "index": 100, "name": "mobile_conversion_invites_order_quantity", "comment": null}, "mobile_conversion_invites_post_engagement": {"type": "integer", "index": 101, "name": "mobile_conversion_invites_post_engagement", "comment": null}, "mobile_conversion_invites_post_view": {"type": "integer", "index": 102, "name": "mobile_conversion_invites_post_view", "comment": null}, "mobile_conversion_invites_sale_amount": {"type": "integer", "index": 103, "name": "mobile_conversion_invites_sale_amount", "comment": null}, "mobile_conversion_key_page_views_post_engagement": {"type": "integer", "index": 104, "name": "mobile_conversion_key_page_views_post_engagement", "comment": null}, "mobile_conversion_key_page_views_post_view": {"type": "integer", "index": 105, "name": "mobile_conversion_key_page_views_post_view", "comment": null}, "mobile_conversion_levels_achieved_assisted": {"type": "integer", "index": 106, "name": "mobile_conversion_levels_achieved_assisted", "comment": null}, "mobile_conversion_levels_achieved_order_quantity": {"type": "integer", "index": 107, "name": "mobile_conversion_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_levels_achieved_post_engagement": {"type": "integer", "index": 108, "name": "mobile_conversion_levels_achieved_post_engagement", "comment": null}, "mobile_conversion_levels_achieved_post_view": {"type": "integer", "index": 109, "name": "mobile_conversion_levels_achieved_post_view", "comment": null}, "mobile_conversion_levels_achieved_sale_amount": {"type": "integer", "index": 110, "name": "mobile_conversion_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_metric": {"type": "integer", "index": 111, "name": "mobile_conversion_lifetime_value_achievements_unlocked_metric", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_order_qu": {"type": "integer", "index": 112, "name": "mobile_conversion_lifetime_value_achievements_unlocked_order_qu", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo": {"type": "integer", "index": 113, "name": "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_metric": {"type": "integer", "index": 114, "name": "mobile_conversion_lifetime_value_add_to_carts_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_order_quantity": {"type": "integer", "index": 115, "name": "mobile_conversion_lifetime_value_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_sale_amount": {"type": "integer", "index": 116, "name": "mobile_conversion_lifetime_value_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_metric": {"type": "integer", "index": 117, "name": "mobile_conversion_lifetime_value_add_to_wishlists_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit": {"type": "integer", "index": 118, "name": "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount": {"type": "integer", "index": 119, "name": "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_metric": {"type": "integer", "index": 120, "name": "mobile_conversion_lifetime_value_checkouts_initiated_metric", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_order_quan": {"type": "integer", "index": 121, "name": "mobile_conversion_lifetime_value_checkouts_initiated_order_quan", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun": {"type": "integer", "index": 122, "name": "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_content_views_metric": {"type": "integer", "index": 123, "name": "mobile_conversion_lifetime_value_content_views_metric", "comment": null}, "mobile_conversion_lifetime_value_content_views_order_quantity": {"type": "integer", "index": 124, "name": "mobile_conversion_lifetime_value_content_views_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_content_views_sale_amount": {"type": "integer", "index": 125, "name": "mobile_conversion_lifetime_value_content_views_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_invites_metric": {"type": "integer", "index": 126, "name": "mobile_conversion_lifetime_value_invites_metric", "comment": null}, "mobile_conversion_lifetime_value_invites_order_quantity": {"type": "integer", "index": 127, "name": "mobile_conversion_lifetime_value_invites_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_invites_sale_amount": {"type": "integer", "index": 128, "name": "mobile_conversion_lifetime_value_invites_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_metric": {"type": "integer", "index": 129, "name": "mobile_conversion_lifetime_value_levels_achieved_metric", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_order_quantity": {"type": "integer", "index": 130, "name": "mobile_conversion_lifetime_value_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_sale_amount": {"type": "integer", "index": 131, "name": "mobile_conversion_lifetime_value_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_logins_metric": {"type": "integer", "index": 132, "name": "mobile_conversion_lifetime_value_logins_metric", "comment": null}, "mobile_conversion_lifetime_value_logins_order_quantity": {"type": "integer", "index": 133, "name": "mobile_conversion_lifetime_value_logins_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_logins_sale_amount": {"type": "integer", "index": 134, "name": "mobile_conversion_lifetime_value_logins_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_metric": {"type": "integer", "index": 135, "name": "mobile_conversion_lifetime_value_payment_info_additions_metric", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_order_q": {"type": "integer", "index": 136, "name": "mobile_conversion_lifetime_value_payment_info_additions_order_q", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_sale_am": {"type": "integer", "index": 137, "name": "mobile_conversion_lifetime_value_payment_info_additions_sale_am", "comment": null}, "mobile_conversion_lifetime_value_purchases_metric": {"type": "integer", "index": 138, "name": "mobile_conversion_lifetime_value_purchases_metric", "comment": null}, "mobile_conversion_lifetime_value_purchases_order_quantity": {"type": "integer", "index": 139, "name": "mobile_conversion_lifetime_value_purchases_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_purchases_sale_amount": {"type": "integer", "index": 140, "name": "mobile_conversion_lifetime_value_purchases_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_rates_metric": {"type": "integer", "index": 141, "name": "mobile_conversion_lifetime_value_rates_metric", "comment": null}, "mobile_conversion_lifetime_value_rates_order_quantity": {"type": "integer", "index": 142, "name": "mobile_conversion_lifetime_value_rates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_rates_sale_amount": {"type": "integer", "index": 143, "name": "mobile_conversion_lifetime_value_rates_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_reservations_metric": {"type": "integer", "index": 144, "name": "mobile_conversion_lifetime_value_reservations_metric", "comment": null}, "mobile_conversion_lifetime_value_reservations_order_quantity": {"type": "integer", "index": 145, "name": "mobile_conversion_lifetime_value_reservations_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_reservations_sale_amount": {"type": "integer", "index": 146, "name": "mobile_conversion_lifetime_value_reservations_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_searches_metric": {"type": "integer", "index": 147, "name": "mobile_conversion_lifetime_value_searches_metric", "comment": null}, "mobile_conversion_lifetime_value_searches_order_quantity": {"type": "integer", "index": 148, "name": "mobile_conversion_lifetime_value_searches_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_searches_sale_amount": {"type": "integer", "index": 149, "name": "mobile_conversion_lifetime_value_searches_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_shares_metric": {"type": "integer", "index": 150, "name": "mobile_conversion_lifetime_value_shares_metric", "comment": null}, "mobile_conversion_lifetime_value_shares_order_quantity": {"type": "integer", "index": 151, "name": "mobile_conversion_lifetime_value_shares_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_shares_sale_amount": {"type": "integer", "index": 152, "name": "mobile_conversion_lifetime_value_shares_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_metric": {"type": "integer", "index": 153, "name": "mobile_conversion_lifetime_value_sign_ups_metric", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_order_quantity": {"type": "integer", "index": 154, "name": "mobile_conversion_lifetime_value_sign_ups_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_sale_amount": {"type": "integer", "index": 155, "name": "mobile_conversion_lifetime_value_sign_ups_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_metric": {"type": "integer", "index": 156, "name": "mobile_conversion_lifetime_value_spent_credits_metric", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_order_quantity": {"type": "integer", "index": 157, "name": "mobile_conversion_lifetime_value_spent_credits_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_sale_amount": {"type": "integer", "index": 158, "name": "mobile_conversion_lifetime_value_spent_credits_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_metric": {"type": "integer", "index": 159, "name": "mobile_conversion_lifetime_value_tutorials_completed_metric", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_order_quan": {"type": "integer", "index": 160, "name": "mobile_conversion_lifetime_value_tutorials_completed_order_quan", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun": {"type": "integer", "index": 161, "name": "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_updates_metric": {"type": "integer", "index": 162, "name": "mobile_conversion_lifetime_value_updates_metric", "comment": null}, "mobile_conversion_lifetime_value_updates_order_quantity": {"type": "integer", "index": 163, "name": "mobile_conversion_lifetime_value_updates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_updates_sale_amount": {"type": "integer", "index": 164, "name": "mobile_conversion_lifetime_value_updates_sale_amount", "comment": null}, "mobile_conversion_logins_assisted": {"type": "integer", "index": 165, "name": "mobile_conversion_logins_assisted", "comment": null}, "mobile_conversion_logins_order_quantity": {"type": "integer", "index": 166, "name": "mobile_conversion_logins_order_quantity", "comment": null}, "mobile_conversion_logins_post_engagement": {"type": "integer", "index": 167, "name": "mobile_conversion_logins_post_engagement", "comment": null}, "mobile_conversion_logins_post_view": {"type": "integer", "index": 168, "name": "mobile_conversion_logins_post_view", "comment": null}, "mobile_conversion_logins_sale_amount": {"type": "integer", "index": 169, "name": "mobile_conversion_logins_sale_amount", "comment": null}, "mobile_conversion_payment_info_additions_assisted": {"type": "integer", "index": 170, "name": "mobile_conversion_payment_info_additions_assisted", "comment": null}, "mobile_conversion_payment_info_additions_order_quantity": {"type": "integer", "index": 171, "name": "mobile_conversion_payment_info_additions_order_quantity", "comment": null}, "mobile_conversion_payment_info_additions_post_engagement": {"type": "integer", "index": 172, "name": "mobile_conversion_payment_info_additions_post_engagement", "comment": null}, "mobile_conversion_payment_info_additions_post_view": {"type": "integer", "index": 173, "name": "mobile_conversion_payment_info_additions_post_view", "comment": null}, "mobile_conversion_payment_info_additions_sale_amount": {"type": "integer", "index": 174, "name": "mobile_conversion_payment_info_additions_sale_amount", "comment": null}, "mobile_conversion_purchases_assisted": {"type": "integer", "index": 175, "name": "mobile_conversion_purchases_assisted", "comment": null}, "mobile_conversion_purchases_order_quantity": {"type": "integer", "index": 176, "name": "mobile_conversion_purchases_order_quantity", "comment": null}, "mobile_conversion_purchases_post_engagement": {"type": "integer", "index": 177, "name": "mobile_conversion_purchases_post_engagement", "comment": null}, "mobile_conversion_purchases_post_view": {"type": "integer", "index": 178, "name": "mobile_conversion_purchases_post_view", "comment": null}, "mobile_conversion_purchases_sale_amount": {"type": "integer", "index": 179, "name": "mobile_conversion_purchases_sale_amount", "comment": null}, "mobile_conversion_rates_assisted": {"type": "integer", "index": 180, "name": "mobile_conversion_rates_assisted", "comment": null}, "mobile_conversion_rates_order_quantity": {"type": "integer", "index": 181, "name": "mobile_conversion_rates_order_quantity", "comment": null}, "mobile_conversion_rates_post_engagement": {"type": "integer", "index": 182, "name": "mobile_conversion_rates_post_engagement", "comment": null}, "mobile_conversion_rates_post_view": {"type": "integer", "index": 183, "name": "mobile_conversion_rates_post_view", "comment": null}, "mobile_conversion_rates_sale_amount": {"type": "integer", "index": 184, "name": "mobile_conversion_rates_sale_amount", "comment": null}, "mobile_conversion_re_engages_assisted": {"type": "integer", "index": 185, "name": "mobile_conversion_re_engages_assisted", "comment": null}, "mobile_conversion_re_engages_order_quantity": {"type": "integer", "index": 186, "name": "mobile_conversion_re_engages_order_quantity", "comment": null}, "mobile_conversion_re_engages_post_engagement": {"type": "integer", "index": 187, "name": "mobile_conversion_re_engages_post_engagement", "comment": null}, "mobile_conversion_re_engages_post_view": {"type": "integer", "index": 188, "name": "mobile_conversion_re_engages_post_view", "comment": null}, "mobile_conversion_re_engages_sale_amount": {"type": "integer", "index": 189, "name": "mobile_conversion_re_engages_sale_amount", "comment": null}, "mobile_conversion_reservations_assisted": {"type": "integer", "index": 190, "name": "mobile_conversion_reservations_assisted", "comment": null}, "mobile_conversion_reservations_order_quantity": {"type": "integer", "index": 191, "name": "mobile_conversion_reservations_order_quantity", "comment": null}, "mobile_conversion_reservations_post_engagement": {"type": "integer", "index": 192, "name": "mobile_conversion_reservations_post_engagement", "comment": null}, "mobile_conversion_reservations_post_view": {"type": "integer", "index": 193, "name": "mobile_conversion_reservations_post_view", "comment": null}, "mobile_conversion_reservations_sale_amount": {"type": "integer", "index": 194, "name": "mobile_conversion_reservations_sale_amount", "comment": null}, "mobile_conversion_searches_assisted": {"type": "integer", "index": 195, "name": "mobile_conversion_searches_assisted", "comment": null}, "mobile_conversion_searches_order_quantity": {"type": "integer", "index": 196, "name": "mobile_conversion_searches_order_quantity", "comment": null}, "mobile_conversion_searches_post_engagement": {"type": "integer", "index": 197, "name": "mobile_conversion_searches_post_engagement", "comment": null}, "mobile_conversion_searches_post_view": {"type": "integer", "index": 198, "name": "mobile_conversion_searches_post_view", "comment": null}, "mobile_conversion_searches_sale_amount": {"type": "integer", "index": 199, "name": "mobile_conversion_searches_sale_amount", "comment": null}, "mobile_conversion_shares_assisted": {"type": "integer", "index": 200, "name": "mobile_conversion_shares_assisted", "comment": null}, "mobile_conversion_shares_order_quantity": {"type": "integer", "index": 201, "name": "mobile_conversion_shares_order_quantity", "comment": null}, "mobile_conversion_shares_post_engagement": {"type": "integer", "index": 202, "name": "mobile_conversion_shares_post_engagement", "comment": null}, "mobile_conversion_shares_post_view": {"type": "integer", "index": 203, "name": "mobile_conversion_shares_post_view", "comment": null}, "mobile_conversion_shares_sale_amount": {"type": "integer", "index": 204, "name": "mobile_conversion_shares_sale_amount", "comment": null}, "mobile_conversion_sign_ups_assisted": {"type": "integer", "index": 205, "name": "mobile_conversion_sign_ups_assisted", "comment": null}, "mobile_conversion_sign_ups_order_quantity": {"type": "integer", "index": 206, "name": "mobile_conversion_sign_ups_order_quantity", "comment": null}, "mobile_conversion_sign_ups_post_engagement": {"type": "integer", "index": 207, "name": "mobile_conversion_sign_ups_post_engagement", "comment": null}, "mobile_conversion_sign_ups_post_view": {"type": "integer", "index": 208, "name": "mobile_conversion_sign_ups_post_view", "comment": null}, "mobile_conversion_sign_ups_sale_amount": {"type": "integer", "index": 209, "name": "mobile_conversion_sign_ups_sale_amount", "comment": null}, "mobile_conversion_site_visits_order_quantity": {"type": "integer", "index": 210, "name": "mobile_conversion_site_visits_order_quantity", "comment": null}, "mobile_conversion_site_visits_post_engagement": {"type": "integer", "index": 211, "name": "mobile_conversion_site_visits_post_engagement", "comment": null}, "mobile_conversion_site_visits_post_view": {"type": "integer", "index": 212, "name": "mobile_conversion_site_visits_post_view", "comment": null}, "mobile_conversion_site_visits_sale_amount": {"type": "integer", "index": 213, "name": "mobile_conversion_site_visits_sale_amount", "comment": null}, "mobile_conversion_spent_credits_assisted": {"type": "integer", "index": 214, "name": "mobile_conversion_spent_credits_assisted", "comment": null}, "mobile_conversion_spent_credits_order_quantity": {"type": "integer", "index": 215, "name": "mobile_conversion_spent_credits_order_quantity", "comment": null}, "mobile_conversion_spent_credits_post_engagement": {"type": "integer", "index": 216, "name": "mobile_conversion_spent_credits_post_engagement", "comment": null}, "mobile_conversion_spent_credits_post_view": {"type": "integer", "index": 217, "name": "mobile_conversion_spent_credits_post_view", "comment": null}, "mobile_conversion_spent_credits_sale_amount": {"type": "integer", "index": 218, "name": "mobile_conversion_spent_credits_sale_amount", "comment": null}, "mobile_conversion_tutorials_completed_assisted": {"type": "integer", "index": 219, "name": "mobile_conversion_tutorials_completed_assisted", "comment": null}, "mobile_conversion_tutorials_completed_order_quantity": {"type": "integer", "index": 220, "name": "mobile_conversion_tutorials_completed_order_quantity", "comment": null}, "mobile_conversion_tutorials_completed_post_engagement": {"type": "integer", "index": 221, "name": "mobile_conversion_tutorials_completed_post_engagement", "comment": null}, "mobile_conversion_tutorials_completed_post_view": {"type": "integer", "index": 222, "name": "mobile_conversion_tutorials_completed_post_view", "comment": null}, "mobile_conversion_tutorials_completed_sale_amount": {"type": "integer", "index": 223, "name": "mobile_conversion_tutorials_completed_sale_amount", "comment": null}, "mobile_conversion_updates_assisted": {"type": "integer", "index": 224, "name": "mobile_conversion_updates_assisted", "comment": null}, "mobile_conversion_updates_order_quantity": {"type": "integer", "index": 225, "name": "mobile_conversion_updates_order_quantity", "comment": null}, "mobile_conversion_updates_post_engagement": {"type": "integer", "index": 226, "name": "mobile_conversion_updates_post_engagement", "comment": null}, "mobile_conversion_updates_post_view": {"type": "integer", "index": 227, "name": "mobile_conversion_updates_post_view", "comment": null}, "mobile_conversion_updates_sale_amount": {"type": "integer", "index": 228, "name": "mobile_conversion_updates_sale_amount", "comment": null}, "poll_card_vote": {"type": "integer", "index": 229, "name": "poll_card_vote", "comment": null}, "qualified_impressions": {"type": "integer", "index": 230, "name": "qualified_impressions", "comment": null}, "replies": {"type": "integer", "index": 231, "name": "replies", "comment": null}, "retweets": {"type": "integer", "index": 232, "name": "retweets", "comment": null}, "tweets_send": {"type": "integer", "index": 233, "name": "tweets_send", "comment": null}, "unfollows": {"type": "integer", "index": 234, "name": "unfollows", "comment": null}, "url_clicks": {"type": "integer", "index": 235, "name": "url_clicks", "comment": null}, "video_3_s_100_pct_views": {"type": "integer", "index": 236, "name": "video_3_s_100_pct_views", "comment": null}, "video_6_s_views": {"type": "integer", "index": 237, "name": "video_6_s_views", "comment": null}, "video_content_starts": {"type": "integer", "index": 238, "name": "video_content_starts", "comment": null}, "video_cta_clicks": {"type": "integer", "index": 239, "name": "video_cta_clicks", "comment": null}, "video_mrc_views": {"type": "integer", "index": 240, "name": "video_mrc_views", "comment": null}, "video_total_views": {"type": "integer", "index": 241, "name": "video_total_views", "comment": null}, "video_views_100": {"type": "integer", "index": 242, "name": "video_views_100", "comment": null}, "video_views_25": {"type": "integer", "index": 243, "name": "video_views_25", "comment": null}, "video_views_50": {"type": "integer", "index": 244, "name": "video_views_50", "comment": null}, "video_views_75": {"type": "integer", "index": 245, "name": "video_views_75", "comment": null}, "mobile_conversion_installs_skan_post_engagement": {"type": "integer", "index": 246, "name": "mobile_conversion_installs_skan_post_engagement", "comment": null}, "mobile_conversion_installs_skan_post_view": {"type": "integer", "index": 247, "name": "mobile_conversion_installs_skan_post_view", "comment": null}, "mobile_conversion_purchases_skan_post_engagement": {"type": "integer", "index": 248, "name": "mobile_conversion_purchases_skan_post_engagement", "comment": null}, "mobile_conversion_purchases_skan_post_view": {"type": "integer", "index": 249, "name": "mobile_conversion_purchases_skan_post_view", "comment": null}, "video_15_s_views": {"type": "integer", "index": 250, "name": "video_15_s_views", "comment": null}, "auto_created_conversion_landing_page_view": {"type": "integer", "index": 251, "name": "auto_created_conversion_landing_page_view", "comment": null}, "auto_created_conversion_session": {"type": "integer", "index": 252, "name": "auto_created_conversion_session", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.twitter_ads.twitter_ads.campaign_report"}, "source.twitter_ads.twitter_ads.line_item_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_line_item_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"advertiser_domain": {"type": "text", "index": 1, "name": "advertiser_domain", "comment": null}, "advertiser_user_id": {"type": "integer", "index": 2, "name": "advertiser_user_id", "comment": null}, "automatically_select_bid": {"type": "boolean", "index": 3, "name": "automatically_select_bid", "comment": null}, "bid_amount_local_micro": {"type": "integer", "index": 4, "name": "bid_amount_local_micro", "comment": null}, "bid_type": {"type": "text", "index": 5, "name": "bid_type", "comment": null}, "bid_unit": {"type": "text", "index": 6, "name": "bid_unit", "comment": null}, "campaign_id": {"type": "text", "index": 7, "name": "campaign_id", "comment": null}, "charge_by": {"type": "text", "index": 8, "name": "charge_by", "comment": null}, "created_at": {"type": "text", "index": 9, "name": "created_at", "comment": null}, "creative_source": {"type": "text", "index": 10, "name": "creative_source", "comment": null}, "currency": {"type": "text", "index": 11, "name": "currency", "comment": null}, "deleted": {"type": "boolean", "index": 12, "name": "deleted", "comment": null}, "end_time": {"type": "integer", "index": 13, "name": "end_time", "comment": null}, "entity_status": {"type": "text", "index": 14, "name": "entity_status", "comment": null}, "id": {"type": "text", "index": 15, "name": "id", "comment": null}, "name": {"type": "text", "index": 16, "name": "name", "comment": null}, "objective": {"type": "text", "index": 17, "name": "objective", "comment": null}, "optimization": {"type": "text", "index": 18, "name": "optimization", "comment": null}, "primary_web_event_tag": {"type": "integer", "index": 19, "name": "primary_web_event_tag", "comment": null}, "product_type": {"type": "text", "index": 20, "name": "product_type", "comment": null}, "start_time": {"type": "integer", "index": 21, "name": "start_time", "comment": null}, "target_cpa_local_micro": {"type": "integer", "index": 22, "name": "target_cpa_local_micro", "comment": null}, "total_budget_amount_local_micro": {"type": "integer", "index": 23, "name": "total_budget_amount_local_micro", "comment": null}, "updated_at": {"type": "text", "index": 24, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.twitter_ads.twitter_ads.line_item_history"}, "source.twitter_ads.twitter_ads.line_item_keywords_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_line_item_keywords_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "text", "index": 1, "name": "account_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "line_item_id": {"type": "text", "index": 3, "name": "line_item_id", "comment": null}, "placement": {"type": "text", "index": 4, "name": "placement", "comment": null}, "segment": {"type": "text", "index": 5, "name": "segment", "comment": null}, "_fivetran_synced": {"type": "text", "index": 6, "name": "_fivetran_synced", "comment": null}, "app_clicks": {"type": "integer", "index": 7, "name": "app_clicks", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 8, "name": "billed_charge_local_micro", "comment": null}, "billed_engagements": {"type": "integer", "index": 9, "name": "billed_engagements", "comment": null}, "card_engagements": {"type": "integer", "index": 10, "name": "card_engagements", "comment": null}, "carousel_swipes": {"type": "integer", "index": 11, "name": "carousel_swipes", "comment": null}, "clicks": {"type": "integer", "index": 12, "name": "clicks", "comment": null}, "conversion_custom_metric": {"type": "integer", "index": 13, "name": "conversion_custom_metric", "comment": null}, "conversion_custom_order_quantity": {"type": "integer", "index": 14, "name": "conversion_custom_order_quantity", "comment": null}, "conversion_custom_order_quantity_engagement": {"type": "integer", "index": 15, "name": "conversion_custom_order_quantity_engagement", "comment": null}, "conversion_custom_order_quantity_view": {"type": "integer", "index": 16, "name": "conversion_custom_order_quantity_view", "comment": null}, "conversion_custom_post_engagement": {"type": "integer", "index": 17, "name": "conversion_custom_post_engagement", "comment": null}, "conversion_custom_post_view": {"type": "integer", "index": 18, "name": "conversion_custom_post_view", "comment": null}, "conversion_custom_sale_amount": {"type": "integer", "index": 19, "name": "conversion_custom_sale_amount", "comment": null}, "conversion_custom_sale_amount_engagement": {"type": "integer", "index": 20, "name": "conversion_custom_sale_amount_engagement", "comment": null}, "conversion_custom_sale_amount_view": {"type": "integer", "index": 21, "name": "conversion_custom_sale_amount_view", "comment": null}, "conversion_downloads_metric": {"type": "integer", "index": 22, "name": "conversion_downloads_metric", "comment": null}, "conversion_downloads_order_quantity": {"type": "integer", "index": 23, "name": "conversion_downloads_order_quantity", "comment": null}, "conversion_downloads_order_quantity_engagement": {"type": "integer", "index": 24, "name": "conversion_downloads_order_quantity_engagement", "comment": null}, "conversion_downloads_order_quantity_view": {"type": "integer", "index": 25, "name": "conversion_downloads_order_quantity_view", "comment": null}, "conversion_downloads_post_engagement": {"type": "integer", "index": 26, "name": "conversion_downloads_post_engagement", "comment": null}, "conversion_downloads_post_view": {"type": "integer", "index": 27, "name": "conversion_downloads_post_view", "comment": null}, "conversion_downloads_sale_amount": {"type": "integer", "index": 28, "name": "conversion_downloads_sale_amount", "comment": null}, "conversion_downloads_sale_amount_engagement": {"type": "integer", "index": 29, "name": "conversion_downloads_sale_amount_engagement", "comment": null}, "conversion_downloads_sale_amount_view": {"type": "integer", "index": 30, "name": "conversion_downloads_sale_amount_view", "comment": null}, "conversion_purchases_assisted": {"type": "integer", "index": 31, "name": "conversion_purchases_assisted", "comment": null}, "conversion_purchases_metric": {"type": "integer", "index": 32, "name": "conversion_purchases_metric", "comment": null}, "conversion_purchases_order_quantity": {"type": "integer", "index": 33, "name": "conversion_purchases_order_quantity", "comment": null}, "conversion_purchases_order_quantity_engagement": {"type": "integer", "index": 34, "name": "conversion_purchases_order_quantity_engagement", "comment": null}, "conversion_purchases_order_quantity_view": {"type": "integer", "index": 35, "name": "conversion_purchases_order_quantity_view", "comment": null}, "conversion_purchases_post_engagement": {"type": "integer", "index": 36, "name": "conversion_purchases_post_engagement", "comment": null}, "conversion_purchases_post_view": {"type": "integer", "index": 37, "name": "conversion_purchases_post_view", "comment": null}, "conversion_purchases_sale_amount": {"type": "integer", "index": 38, "name": "conversion_purchases_sale_amount", "comment": null}, "conversion_purchases_sale_amount_engagement": {"type": "integer", "index": 39, "name": "conversion_purchases_sale_amount_engagement", "comment": null}, "conversion_purchases_sale_amount_view": {"type": "integer", "index": 40, "name": "conversion_purchases_sale_amount_view", "comment": null}, "conversion_sign_ups_assisted": {"type": "integer", "index": 41, "name": "conversion_sign_ups_assisted", "comment": null}, "conversion_sign_ups_metric": {"type": "integer", "index": 42, "name": "conversion_sign_ups_metric", "comment": null}, "conversion_sign_ups_order_quantity": {"type": "integer", "index": 43, "name": "conversion_sign_ups_order_quantity", "comment": null}, "conversion_sign_ups_order_quantity_engagement": {"type": "integer", "index": 44, "name": "conversion_sign_ups_order_quantity_engagement", "comment": null}, "conversion_sign_ups_order_quantity_view": {"type": "integer", "index": 45, "name": "conversion_sign_ups_order_quantity_view", "comment": null}, "conversion_sign_ups_post_engagement": {"type": "integer", "index": 46, "name": "conversion_sign_ups_post_engagement", "comment": null}, "conversion_sign_ups_post_view": {"type": "integer", "index": 47, "name": "conversion_sign_ups_post_view", "comment": null}, "conversion_sign_ups_sale_amount": {"type": "integer", "index": 48, "name": "conversion_sign_ups_sale_amount", "comment": null}, "conversion_sign_ups_sale_amount_engagement": {"type": "integer", "index": 49, "name": "conversion_sign_ups_sale_amount_engagement", "comment": null}, "conversion_sign_ups_sale_amount_view": {"type": "integer", "index": 50, "name": "conversion_sign_ups_sale_amount_view", "comment": null}, "conversion_site_visits_metric": {"type": "integer", "index": 51, "name": "conversion_site_visits_metric", "comment": null}, "conversion_site_visits_order_quantity": {"type": "integer", "index": 52, "name": "conversion_site_visits_order_quantity", "comment": null}, "conversion_site_visits_order_quantity_engagement": {"type": "integer", "index": 53, "name": "conversion_site_visits_order_quantity_engagement", "comment": null}, "conversion_site_visits_order_quantity_view": {"type": "integer", "index": 54, "name": "conversion_site_visits_order_quantity_view", "comment": null}, "conversion_site_visits_post_engagement": {"type": "integer", "index": 55, "name": "conversion_site_visits_post_engagement", "comment": null}, "conversion_site_visits_post_view": {"type": "integer", "index": 56, "name": "conversion_site_visits_post_view", "comment": null}, "conversion_site_visits_sale_amount": {"type": "integer", "index": 57, "name": "conversion_site_visits_sale_amount", "comment": null}, "conversion_site_visits_sale_amount_engagement": {"type": "integer", "index": 58, "name": "conversion_site_visits_sale_amount_engagement", "comment": null}, "conversion_site_visits_sale_amount_view": {"type": "integer", "index": 59, "name": "conversion_site_visits_sale_amount_view", "comment": null}, "engagements": {"type": "integer", "index": 60, "name": "engagements", "comment": null}, "follows": {"type": "integer", "index": 61, "name": "follows", "comment": null}, "impressions": {"type": "integer", "index": 62, "name": "impressions", "comment": null}, "likes": {"type": "integer", "index": 63, "name": "likes", "comment": null}, "media_engagements": {"type": "integer", "index": 64, "name": "media_engagements", "comment": null}, "media_views": {"type": "integer", "index": 65, "name": "media_views", "comment": null}, "mobile_conversion_achievements_unlocked_assisted": {"type": "integer", "index": 66, "name": "mobile_conversion_achievements_unlocked_assisted", "comment": null}, "mobile_conversion_achievements_unlocked_order_quantity": {"type": "integer", "index": 67, "name": "mobile_conversion_achievements_unlocked_order_quantity", "comment": null}, "mobile_conversion_achievements_unlocked_post_engagement": {"type": "integer", "index": 68, "name": "mobile_conversion_achievements_unlocked_post_engagement", "comment": null}, "mobile_conversion_achievements_unlocked_post_view": {"type": "integer", "index": 69, "name": "mobile_conversion_achievements_unlocked_post_view", "comment": null}, "mobile_conversion_achievements_unlocked_sale_amount": {"type": "integer", "index": 70, "name": "mobile_conversion_achievements_unlocked_sale_amount", "comment": null}, "mobile_conversion_add_to_carts_assisted": {"type": "integer", "index": 71, "name": "mobile_conversion_add_to_carts_assisted", "comment": null}, "mobile_conversion_add_to_carts_order_quantity": {"type": "integer", "index": 72, "name": "mobile_conversion_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_add_to_carts_post_engagement": {"type": "integer", "index": 73, "name": "mobile_conversion_add_to_carts_post_engagement", "comment": null}, "mobile_conversion_add_to_carts_post_view": {"type": "integer", "index": 74, "name": "mobile_conversion_add_to_carts_post_view", "comment": null}, "mobile_conversion_add_to_carts_sale_amount": {"type": "integer", "index": 75, "name": "mobile_conversion_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_add_to_wishlists_assisted": {"type": "integer", "index": 76, "name": "mobile_conversion_add_to_wishlists_assisted", "comment": null}, "mobile_conversion_add_to_wishlists_order_quantity": {"type": "integer", "index": 77, "name": "mobile_conversion_add_to_wishlists_order_quantity", "comment": null}, "mobile_conversion_add_to_wishlists_post_engagement": {"type": "integer", "index": 78, "name": "mobile_conversion_add_to_wishlists_post_engagement", "comment": null}, "mobile_conversion_add_to_wishlists_post_view": {"type": "integer", "index": 79, "name": "mobile_conversion_add_to_wishlists_post_view", "comment": null}, "mobile_conversion_add_to_wishlists_sale_amount": {"type": "integer", "index": 80, "name": "mobile_conversion_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_checkouts_initiated_assisted": {"type": "integer", "index": 81, "name": "mobile_conversion_checkouts_initiated_assisted", "comment": null}, "mobile_conversion_checkouts_initiated_order_quantity": {"type": "integer", "index": 82, "name": "mobile_conversion_checkouts_initiated_order_quantity", "comment": null}, "mobile_conversion_checkouts_initiated_post_engagement": {"type": "integer", "index": 83, "name": "mobile_conversion_checkouts_initiated_post_engagement", "comment": null}, "mobile_conversion_checkouts_initiated_post_view": {"type": "integer", "index": 84, "name": "mobile_conversion_checkouts_initiated_post_view", "comment": null}, "mobile_conversion_checkouts_initiated_sale_amount": {"type": "integer", "index": 85, "name": "mobile_conversion_checkouts_initiated_sale_amount", "comment": null}, "mobile_conversion_content_views_assisted": {"type": "integer", "index": 86, "name": "mobile_conversion_content_views_assisted", "comment": null}, "mobile_conversion_content_views_order_quantity": {"type": "integer", "index": 87, "name": "mobile_conversion_content_views_order_quantity", "comment": null}, "mobile_conversion_content_views_post_engagement": {"type": "integer", "index": 88, "name": "mobile_conversion_content_views_post_engagement", "comment": null}, "mobile_conversion_content_views_post_view": {"type": "integer", "index": 89, "name": "mobile_conversion_content_views_post_view", "comment": null}, "mobile_conversion_content_views_sale_amount": {"type": "integer", "index": 90, "name": "mobile_conversion_content_views_sale_amount", "comment": null}, "mobile_conversion_downloads_order_quantity": {"type": "integer", "index": 91, "name": "mobile_conversion_downloads_order_quantity", "comment": null}, "mobile_conversion_downloads_post_engagement": {"type": "integer", "index": 92, "name": "mobile_conversion_downloads_post_engagement", "comment": null}, "mobile_conversion_downloads_post_view": {"type": "integer", "index": 93, "name": "mobile_conversion_downloads_post_view", "comment": null}, "mobile_conversion_downloads_sale_amount": {"type": "integer", "index": 94, "name": "mobile_conversion_downloads_sale_amount", "comment": null}, "mobile_conversion_installs_assisted": {"type": "integer", "index": 95, "name": "mobile_conversion_installs_assisted", "comment": null}, "mobile_conversion_installs_order_quantity": {"type": "integer", "index": 96, "name": "mobile_conversion_installs_order_quantity", "comment": null}, "mobile_conversion_installs_post_engagement": {"type": "integer", "index": 97, "name": "mobile_conversion_installs_post_engagement", "comment": null}, "mobile_conversion_installs_post_view": {"type": "integer", "index": 98, "name": "mobile_conversion_installs_post_view", "comment": null}, "mobile_conversion_installs_sale_amount": {"type": "integer", "index": 99, "name": "mobile_conversion_installs_sale_amount", "comment": null}, "mobile_conversion_installs_skan_post_engagement": {"type": "integer", "index": 100, "name": "mobile_conversion_installs_skan_post_engagement", "comment": null}, "mobile_conversion_installs_skan_post_view": {"type": "integer", "index": 101, "name": "mobile_conversion_installs_skan_post_view", "comment": null}, "mobile_conversion_invites_assisted": {"type": "integer", "index": 102, "name": "mobile_conversion_invites_assisted", "comment": null}, "mobile_conversion_invites_order_quantity": {"type": "integer", "index": 103, "name": "mobile_conversion_invites_order_quantity", "comment": null}, "mobile_conversion_invites_post_engagement": {"type": "integer", "index": 104, "name": "mobile_conversion_invites_post_engagement", "comment": null}, "mobile_conversion_invites_post_view": {"type": "integer", "index": 105, "name": "mobile_conversion_invites_post_view", "comment": null}, "mobile_conversion_invites_sale_amount": {"type": "integer", "index": 106, "name": "mobile_conversion_invites_sale_amount", "comment": null}, "mobile_conversion_key_page_views_post_engagement": {"type": "integer", "index": 107, "name": "mobile_conversion_key_page_views_post_engagement", "comment": null}, "mobile_conversion_key_page_views_post_view": {"type": "integer", "index": 108, "name": "mobile_conversion_key_page_views_post_view", "comment": null}, "mobile_conversion_levels_achieved_assisted": {"type": "integer", "index": 109, "name": "mobile_conversion_levels_achieved_assisted", "comment": null}, "mobile_conversion_levels_achieved_order_quantity": {"type": "integer", "index": 110, "name": "mobile_conversion_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_levels_achieved_post_engagement": {"type": "integer", "index": 111, "name": "mobile_conversion_levels_achieved_post_engagement", "comment": null}, "mobile_conversion_levels_achieved_post_view": {"type": "integer", "index": 112, "name": "mobile_conversion_levels_achieved_post_view", "comment": null}, "mobile_conversion_levels_achieved_sale_amount": {"type": "integer", "index": 113, "name": "mobile_conversion_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_metric": {"type": "integer", "index": 114, "name": "mobile_conversion_lifetime_value_achievements_unlocked_metric", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_order_qu": {"type": "integer", "index": 115, "name": "mobile_conversion_lifetime_value_achievements_unlocked_order_qu", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo": {"type": "integer", "index": 116, "name": "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_metric": {"type": "integer", "index": 117, "name": "mobile_conversion_lifetime_value_add_to_carts_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_order_quantity": {"type": "integer", "index": 118, "name": "mobile_conversion_lifetime_value_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_sale_amount": {"type": "integer", "index": 119, "name": "mobile_conversion_lifetime_value_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_metric": {"type": "integer", "index": 120, "name": "mobile_conversion_lifetime_value_add_to_wishlists_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit": {"type": "integer", "index": 121, "name": "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount": {"type": "integer", "index": 122, "name": "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_metric": {"type": "integer", "index": 123, "name": "mobile_conversion_lifetime_value_checkouts_initiated_metric", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_order_quan": {"type": "integer", "index": 124, "name": "mobile_conversion_lifetime_value_checkouts_initiated_order_quan", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun": {"type": "integer", "index": 125, "name": "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_content_views_metric": {"type": "integer", "index": 126, "name": "mobile_conversion_lifetime_value_content_views_metric", "comment": null}, "mobile_conversion_lifetime_value_content_views_order_quantity": {"type": "integer", "index": 127, "name": "mobile_conversion_lifetime_value_content_views_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_content_views_sale_amount": {"type": "integer", "index": 128, "name": "mobile_conversion_lifetime_value_content_views_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_invites_metric": {"type": "integer", "index": 129, "name": "mobile_conversion_lifetime_value_invites_metric", "comment": null}, "mobile_conversion_lifetime_value_invites_order_quantity": {"type": "integer", "index": 130, "name": "mobile_conversion_lifetime_value_invites_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_invites_sale_amount": {"type": "integer", "index": 131, "name": "mobile_conversion_lifetime_value_invites_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_metric": {"type": "integer", "index": 132, "name": "mobile_conversion_lifetime_value_levels_achieved_metric", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_order_quantity": {"type": "integer", "index": 133, "name": "mobile_conversion_lifetime_value_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_sale_amount": {"type": "integer", "index": 134, "name": "mobile_conversion_lifetime_value_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_logins_metric": {"type": "integer", "index": 135, "name": "mobile_conversion_lifetime_value_logins_metric", "comment": null}, "mobile_conversion_lifetime_value_logins_order_quantity": {"type": "integer", "index": 136, "name": "mobile_conversion_lifetime_value_logins_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_logins_sale_amount": {"type": "integer", "index": 137, "name": "mobile_conversion_lifetime_value_logins_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_metric": {"type": "integer", "index": 138, "name": "mobile_conversion_lifetime_value_payment_info_additions_metric", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_order_q": {"type": "integer", "index": 139, "name": "mobile_conversion_lifetime_value_payment_info_additions_order_q", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_sale_am": {"type": "integer", "index": 140, "name": "mobile_conversion_lifetime_value_payment_info_additions_sale_am", "comment": null}, "mobile_conversion_lifetime_value_purchases_metric": {"type": "integer", "index": 141, "name": "mobile_conversion_lifetime_value_purchases_metric", "comment": null}, "mobile_conversion_lifetime_value_purchases_order_quantity": {"type": "integer", "index": 142, "name": "mobile_conversion_lifetime_value_purchases_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_purchases_sale_amount": {"type": "integer", "index": 143, "name": "mobile_conversion_lifetime_value_purchases_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_rates_metric": {"type": "integer", "index": 144, "name": "mobile_conversion_lifetime_value_rates_metric", "comment": null}, "mobile_conversion_lifetime_value_rates_order_quantity": {"type": "integer", "index": 145, "name": "mobile_conversion_lifetime_value_rates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_rates_sale_amount": {"type": "integer", "index": 146, "name": "mobile_conversion_lifetime_value_rates_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_reservations_metric": {"type": "integer", "index": 147, "name": "mobile_conversion_lifetime_value_reservations_metric", "comment": null}, "mobile_conversion_lifetime_value_reservations_order_quantity": {"type": "integer", "index": 148, "name": "mobile_conversion_lifetime_value_reservations_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_reservations_sale_amount": {"type": "integer", "index": 149, "name": "mobile_conversion_lifetime_value_reservations_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_searches_metric": {"type": "integer", "index": 150, "name": "mobile_conversion_lifetime_value_searches_metric", "comment": null}, "mobile_conversion_lifetime_value_searches_order_quantity": {"type": "integer", "index": 151, "name": "mobile_conversion_lifetime_value_searches_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_searches_sale_amount": {"type": "integer", "index": 152, "name": "mobile_conversion_lifetime_value_searches_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_shares_metric": {"type": "integer", "index": 153, "name": "mobile_conversion_lifetime_value_shares_metric", "comment": null}, "mobile_conversion_lifetime_value_shares_order_quantity": {"type": "integer", "index": 154, "name": "mobile_conversion_lifetime_value_shares_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_shares_sale_amount": {"type": "integer", "index": 155, "name": "mobile_conversion_lifetime_value_shares_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_metric": {"type": "integer", "index": 156, "name": "mobile_conversion_lifetime_value_sign_ups_metric", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_order_quantity": {"type": "integer", "index": 157, "name": "mobile_conversion_lifetime_value_sign_ups_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_sale_amount": {"type": "integer", "index": 158, "name": "mobile_conversion_lifetime_value_sign_ups_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_metric": {"type": "integer", "index": 159, "name": "mobile_conversion_lifetime_value_spent_credits_metric", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_order_quantity": {"type": "integer", "index": 160, "name": "mobile_conversion_lifetime_value_spent_credits_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_sale_amount": {"type": "integer", "index": 161, "name": "mobile_conversion_lifetime_value_spent_credits_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_metric": {"type": "integer", "index": 162, "name": "mobile_conversion_lifetime_value_tutorials_completed_metric", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_order_quan": {"type": "integer", "index": 163, "name": "mobile_conversion_lifetime_value_tutorials_completed_order_quan", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun": {"type": "integer", "index": 164, "name": "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_updates_metric": {"type": "integer", "index": 165, "name": "mobile_conversion_lifetime_value_updates_metric", "comment": null}, "mobile_conversion_lifetime_value_updates_order_quantity": {"type": "integer", "index": 166, "name": "mobile_conversion_lifetime_value_updates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_updates_sale_amount": {"type": "integer", "index": 167, "name": "mobile_conversion_lifetime_value_updates_sale_amount", "comment": null}, "mobile_conversion_logins_assisted": {"type": "integer", "index": 168, "name": "mobile_conversion_logins_assisted", "comment": null}, "mobile_conversion_logins_order_quantity": {"type": "integer", "index": 169, "name": "mobile_conversion_logins_order_quantity", "comment": null}, "mobile_conversion_logins_post_engagement": {"type": "integer", "index": 170, "name": "mobile_conversion_logins_post_engagement", "comment": null}, "mobile_conversion_logins_post_view": {"type": "integer", "index": 171, "name": "mobile_conversion_logins_post_view", "comment": null}, "mobile_conversion_logins_sale_amount": {"type": "integer", "index": 172, "name": "mobile_conversion_logins_sale_amount", "comment": null}, "mobile_conversion_payment_info_additions_assisted": {"type": "integer", "index": 173, "name": "mobile_conversion_payment_info_additions_assisted", "comment": null}, "mobile_conversion_payment_info_additions_order_quantity": {"type": "integer", "index": 174, "name": "mobile_conversion_payment_info_additions_order_quantity", "comment": null}, "mobile_conversion_payment_info_additions_post_engagement": {"type": "integer", "index": 175, "name": "mobile_conversion_payment_info_additions_post_engagement", "comment": null}, "mobile_conversion_payment_info_additions_post_view": {"type": "integer", "index": 176, "name": "mobile_conversion_payment_info_additions_post_view", "comment": null}, "mobile_conversion_payment_info_additions_sale_amount": {"type": "integer", "index": 177, "name": "mobile_conversion_payment_info_additions_sale_amount", "comment": null}, "mobile_conversion_purchases_assisted": {"type": "integer", "index": 178, "name": "mobile_conversion_purchases_assisted", "comment": null}, "mobile_conversion_purchases_order_quantity": {"type": "integer", "index": 179, "name": "mobile_conversion_purchases_order_quantity", "comment": null}, "mobile_conversion_purchases_post_engagement": {"type": "integer", "index": 180, "name": "mobile_conversion_purchases_post_engagement", "comment": null}, "mobile_conversion_purchases_post_view": {"type": "integer", "index": 181, "name": "mobile_conversion_purchases_post_view", "comment": null}, "mobile_conversion_purchases_sale_amount": {"type": "integer", "index": 182, "name": "mobile_conversion_purchases_sale_amount", "comment": null}, "mobile_conversion_purchases_skan_post_engagement": {"type": "integer", "index": 183, "name": "mobile_conversion_purchases_skan_post_engagement", "comment": null}, "mobile_conversion_purchases_skan_post_view": {"type": "integer", "index": 184, "name": "mobile_conversion_purchases_skan_post_view", "comment": null}, "mobile_conversion_rates_assisted": {"type": "integer", "index": 185, "name": "mobile_conversion_rates_assisted", "comment": null}, "mobile_conversion_rates_order_quantity": {"type": "integer", "index": 186, "name": "mobile_conversion_rates_order_quantity", "comment": null}, "mobile_conversion_rates_post_engagement": {"type": "integer", "index": 187, "name": "mobile_conversion_rates_post_engagement", "comment": null}, "mobile_conversion_rates_post_view": {"type": "integer", "index": 188, "name": "mobile_conversion_rates_post_view", "comment": null}, "mobile_conversion_rates_sale_amount": {"type": "integer", "index": 189, "name": "mobile_conversion_rates_sale_amount", "comment": null}, "mobile_conversion_re_engages_assisted": {"type": "integer", "index": 190, "name": "mobile_conversion_re_engages_assisted", "comment": null}, "mobile_conversion_re_engages_order_quantity": {"type": "integer", "index": 191, "name": "mobile_conversion_re_engages_order_quantity", "comment": null}, "mobile_conversion_re_engages_post_engagement": {"type": "integer", "index": 192, "name": "mobile_conversion_re_engages_post_engagement", "comment": null}, "mobile_conversion_re_engages_post_view": {"type": "integer", "index": 193, "name": "mobile_conversion_re_engages_post_view", "comment": null}, "mobile_conversion_re_engages_sale_amount": {"type": "integer", "index": 194, "name": "mobile_conversion_re_engages_sale_amount", "comment": null}, "mobile_conversion_reservations_assisted": {"type": "integer", "index": 195, "name": "mobile_conversion_reservations_assisted", "comment": null}, "mobile_conversion_reservations_order_quantity": {"type": "integer", "index": 196, "name": "mobile_conversion_reservations_order_quantity", "comment": null}, "mobile_conversion_reservations_post_engagement": {"type": "integer", "index": 197, "name": "mobile_conversion_reservations_post_engagement", "comment": null}, "mobile_conversion_reservations_post_view": {"type": "integer", "index": 198, "name": "mobile_conversion_reservations_post_view", "comment": null}, "mobile_conversion_reservations_sale_amount": {"type": "integer", "index": 199, "name": "mobile_conversion_reservations_sale_amount", "comment": null}, "mobile_conversion_searches_assisted": {"type": "integer", "index": 200, "name": "mobile_conversion_searches_assisted", "comment": null}, "mobile_conversion_searches_order_quantity": {"type": "integer", "index": 201, "name": "mobile_conversion_searches_order_quantity", "comment": null}, "mobile_conversion_searches_post_engagement": {"type": "integer", "index": 202, "name": "mobile_conversion_searches_post_engagement", "comment": null}, "mobile_conversion_searches_post_view": {"type": "integer", "index": 203, "name": "mobile_conversion_searches_post_view", "comment": null}, "mobile_conversion_searches_sale_amount": {"type": "integer", "index": 204, "name": "mobile_conversion_searches_sale_amount", "comment": null}, "mobile_conversion_shares_assisted": {"type": "integer", "index": 205, "name": "mobile_conversion_shares_assisted", "comment": null}, "mobile_conversion_shares_order_quantity": {"type": "integer", "index": 206, "name": "mobile_conversion_shares_order_quantity", "comment": null}, "mobile_conversion_shares_post_engagement": {"type": "integer", "index": 207, "name": "mobile_conversion_shares_post_engagement", "comment": null}, "mobile_conversion_shares_post_view": {"type": "integer", "index": 208, "name": "mobile_conversion_shares_post_view", "comment": null}, "mobile_conversion_shares_sale_amount": {"type": "integer", "index": 209, "name": "mobile_conversion_shares_sale_amount", "comment": null}, "mobile_conversion_sign_ups_assisted": {"type": "integer", "index": 210, "name": "mobile_conversion_sign_ups_assisted", "comment": null}, "mobile_conversion_sign_ups_order_quantity": {"type": "integer", "index": 211, "name": "mobile_conversion_sign_ups_order_quantity", "comment": null}, "mobile_conversion_sign_ups_post_engagement": {"type": "integer", "index": 212, "name": "mobile_conversion_sign_ups_post_engagement", "comment": null}, "mobile_conversion_sign_ups_post_view": {"type": "integer", "index": 213, "name": "mobile_conversion_sign_ups_post_view", "comment": null}, "mobile_conversion_sign_ups_sale_amount": {"type": "integer", "index": 214, "name": "mobile_conversion_sign_ups_sale_amount", "comment": null}, "mobile_conversion_site_visits_order_quantity": {"type": "integer", "index": 215, "name": "mobile_conversion_site_visits_order_quantity", "comment": null}, "mobile_conversion_site_visits_post_engagement": {"type": "integer", "index": 216, "name": "mobile_conversion_site_visits_post_engagement", "comment": null}, "mobile_conversion_site_visits_post_view": {"type": "integer", "index": 217, "name": "mobile_conversion_site_visits_post_view", "comment": null}, "mobile_conversion_site_visits_sale_amount": {"type": "integer", "index": 218, "name": "mobile_conversion_site_visits_sale_amount", "comment": null}, "mobile_conversion_spent_credits_assisted": {"type": "integer", "index": 219, "name": "mobile_conversion_spent_credits_assisted", "comment": null}, "mobile_conversion_spent_credits_order_quantity": {"type": "integer", "index": 220, "name": "mobile_conversion_spent_credits_order_quantity", "comment": null}, "mobile_conversion_spent_credits_post_engagement": {"type": "integer", "index": 221, "name": "mobile_conversion_spent_credits_post_engagement", "comment": null}, "mobile_conversion_spent_credits_post_view": {"type": "integer", "index": 222, "name": "mobile_conversion_spent_credits_post_view", "comment": null}, "mobile_conversion_spent_credits_sale_amount": {"type": "integer", "index": 223, "name": "mobile_conversion_spent_credits_sale_amount", "comment": null}, "mobile_conversion_tutorials_completed_assisted": {"type": "integer", "index": 224, "name": "mobile_conversion_tutorials_completed_assisted", "comment": null}, "mobile_conversion_tutorials_completed_order_quantity": {"type": "integer", "index": 225, "name": "mobile_conversion_tutorials_completed_order_quantity", "comment": null}, "mobile_conversion_tutorials_completed_post_engagement": {"type": "integer", "index": 226, "name": "mobile_conversion_tutorials_completed_post_engagement", "comment": null}, "mobile_conversion_tutorials_completed_post_view": {"type": "integer", "index": 227, "name": "mobile_conversion_tutorials_completed_post_view", "comment": null}, "mobile_conversion_tutorials_completed_sale_amount": {"type": "integer", "index": 228, "name": "mobile_conversion_tutorials_completed_sale_amount", "comment": null}, "mobile_conversion_updates_assisted": {"type": "integer", "index": 229, "name": "mobile_conversion_updates_assisted", "comment": null}, "mobile_conversion_updates_order_quantity": {"type": "integer", "index": 230, "name": "mobile_conversion_updates_order_quantity", "comment": null}, "mobile_conversion_updates_post_engagement": {"type": "integer", "index": 231, "name": "mobile_conversion_updates_post_engagement", "comment": null}, "mobile_conversion_updates_post_view": {"type": "integer", "index": 232, "name": "mobile_conversion_updates_post_view", "comment": null}, "mobile_conversion_updates_sale_amount": {"type": "integer", "index": 233, "name": "mobile_conversion_updates_sale_amount", "comment": null}, "poll_card_vote": {"type": "integer", "index": 234, "name": "poll_card_vote", "comment": null}, "qualified_impressions": {"type": "integer", "index": 235, "name": "qualified_impressions", "comment": null}, "replies": {"type": "integer", "index": 236, "name": "replies", "comment": null}, "retweets": {"type": "integer", "index": 237, "name": "retweets", "comment": null}, "tweets_send": {"type": "integer", "index": 238, "name": "tweets_send", "comment": null}, "unfollows": {"type": "integer", "index": 239, "name": "unfollows", "comment": null}, "url_clicks": {"type": "integer", "index": 240, "name": "url_clicks", "comment": null}, "video_15_s_views": {"type": "integer", "index": 241, "name": "video_15_s_views", "comment": null}, "video_3_s_100_pct_views": {"type": "integer", "index": 242, "name": "video_3_s_100_pct_views", "comment": null}, "video_6_s_views": {"type": "integer", "index": 243, "name": "video_6_s_views", "comment": null}, "video_content_starts": {"type": "integer", "index": 244, "name": "video_content_starts", "comment": null}, "video_cta_clicks": {"type": "integer", "index": 245, "name": "video_cta_clicks", "comment": null}, "video_total_views": {"type": "integer", "index": 246, "name": "video_total_views", "comment": null}, "video_views_100": {"type": "integer", "index": 247, "name": "video_views_100", "comment": null}, "video_views_25": {"type": "integer", "index": 248, "name": "video_views_25", "comment": null}, "video_views_50": {"type": "integer", "index": 249, "name": "video_views_50", "comment": null}, "video_views_75": {"type": "integer", "index": 250, "name": "video_views_75", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.twitter_ads.twitter_ads.line_item_keywords_report"}, "source.twitter_ads.twitter_ads.line_item_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_line_item_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"account_id": {"type": "text", "index": 1, "name": "account_id", "comment": null}, "date": {"type": "timestamp without time zone", "index": 2, "name": "date", "comment": null}, "line_item_id": {"type": "text", "index": 3, "name": "line_item_id", "comment": null}, "placement": {"type": "text", "index": 4, "name": "placement", "comment": null}, "_fivetran_synced": {"type": "text", "index": 5, "name": "_fivetran_synced", "comment": null}, "app_clicks": {"type": "integer", "index": 6, "name": "app_clicks", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 7, "name": "billed_charge_local_micro", "comment": null}, "billed_engagements": {"type": "integer", "index": 8, "name": "billed_engagements", "comment": null}, "card_engagements": {"type": "integer", "index": 9, "name": "card_engagements", "comment": null}, "carousel_swipes": {"type": "integer", "index": 10, "name": "carousel_swipes", "comment": null}, "clicks": {"type": "integer", "index": 11, "name": "clicks", "comment": null}, "conversion_custom_metric": {"type": "integer", "index": 12, "name": "conversion_custom_metric", "comment": null}, "conversion_custom_order_quantity": {"type": "integer", "index": 13, "name": "conversion_custom_order_quantity", "comment": null}, "conversion_custom_order_quantity_engagement": {"type": "integer", "index": 14, "name": "conversion_custom_order_quantity_engagement", "comment": null}, "conversion_custom_order_quantity_view": {"type": "integer", "index": 15, "name": "conversion_custom_order_quantity_view", "comment": null}, "conversion_custom_post_engagement": {"type": "integer", "index": 16, "name": "conversion_custom_post_engagement", "comment": null}, "conversion_custom_post_view": {"type": "integer", "index": 17, "name": "conversion_custom_post_view", "comment": null}, "conversion_custom_sale_amount": {"type": "integer", "index": 18, "name": "conversion_custom_sale_amount", "comment": null}, "conversion_custom_sale_amount_engagement": {"type": "integer", "index": 19, "name": "conversion_custom_sale_amount_engagement", "comment": null}, "conversion_custom_sale_amount_view": {"type": "integer", "index": 20, "name": "conversion_custom_sale_amount_view", "comment": null}, "conversion_downloads_metric": {"type": "integer", "index": 21, "name": "conversion_downloads_metric", "comment": null}, "conversion_downloads_order_quantity": {"type": "integer", "index": 22, "name": "conversion_downloads_order_quantity", "comment": null}, "conversion_downloads_order_quantity_engagement": {"type": "integer", "index": 23, "name": "conversion_downloads_order_quantity_engagement", "comment": null}, "conversion_downloads_order_quantity_view": {"type": "integer", "index": 24, "name": "conversion_downloads_order_quantity_view", "comment": null}, "conversion_downloads_post_engagement": {"type": "integer", "index": 25, "name": "conversion_downloads_post_engagement", "comment": null}, "conversion_downloads_post_view": {"type": "integer", "index": 26, "name": "conversion_downloads_post_view", "comment": null}, "conversion_downloads_sale_amount": {"type": "integer", "index": 27, "name": "conversion_downloads_sale_amount", "comment": null}, "conversion_downloads_sale_amount_engagement": {"type": "integer", "index": 28, "name": "conversion_downloads_sale_amount_engagement", "comment": null}, "conversion_downloads_sale_amount_view": {"type": "integer", "index": 29, "name": "conversion_downloads_sale_amount_view", "comment": null}, "conversion_purchases_assisted": {"type": "integer", "index": 30, "name": "conversion_purchases_assisted", "comment": null}, "conversion_purchases_metric": {"type": "integer", "index": 31, "name": "conversion_purchases_metric", "comment": null}, "conversion_purchases_order_quantity": {"type": "integer", "index": 32, "name": "conversion_purchases_order_quantity", "comment": null}, "conversion_purchases_order_quantity_engagement": {"type": "integer", "index": 33, "name": "conversion_purchases_order_quantity_engagement", "comment": null}, "conversion_purchases_order_quantity_view": {"type": "integer", "index": 34, "name": "conversion_purchases_order_quantity_view", "comment": null}, "conversion_purchases_post_engagement": {"type": "integer", "index": 35, "name": "conversion_purchases_post_engagement", "comment": null}, "conversion_purchases_post_view": {"type": "integer", "index": 36, "name": "conversion_purchases_post_view", "comment": null}, "conversion_purchases_sale_amount": {"type": "integer", "index": 37, "name": "conversion_purchases_sale_amount", "comment": null}, "conversion_purchases_sale_amount_engagement": {"type": "integer", "index": 38, "name": "conversion_purchases_sale_amount_engagement", "comment": null}, "conversion_purchases_sale_amount_view": {"type": "integer", "index": 39, "name": "conversion_purchases_sale_amount_view", "comment": null}, "conversion_sign_ups_assisted": {"type": "integer", "index": 40, "name": "conversion_sign_ups_assisted", "comment": null}, "conversion_sign_ups_metric": {"type": "integer", "index": 41, "name": "conversion_sign_ups_metric", "comment": null}, "conversion_sign_ups_order_quantity": {"type": "integer", "index": 42, "name": "conversion_sign_ups_order_quantity", "comment": null}, "conversion_sign_ups_order_quantity_engagement": {"type": "integer", "index": 43, "name": "conversion_sign_ups_order_quantity_engagement", "comment": null}, "conversion_sign_ups_order_quantity_view": {"type": "integer", "index": 44, "name": "conversion_sign_ups_order_quantity_view", "comment": null}, "conversion_sign_ups_post_engagement": {"type": "integer", "index": 45, "name": "conversion_sign_ups_post_engagement", "comment": null}, "conversion_sign_ups_post_view": {"type": "integer", "index": 46, "name": "conversion_sign_ups_post_view", "comment": null}, "conversion_sign_ups_sale_amount": {"type": "integer", "index": 47, "name": "conversion_sign_ups_sale_amount", "comment": null}, "conversion_sign_ups_sale_amount_engagement": {"type": "integer", "index": 48, "name": "conversion_sign_ups_sale_amount_engagement", "comment": null}, "conversion_sign_ups_sale_amount_view": {"type": "integer", "index": 49, "name": "conversion_sign_ups_sale_amount_view", "comment": null}, "conversion_site_visits_metric": {"type": "integer", "index": 50, "name": "conversion_site_visits_metric", "comment": null}, "conversion_site_visits_order_quantity": {"type": "integer", "index": 51, "name": "conversion_site_visits_order_quantity", "comment": null}, "conversion_site_visits_order_quantity_engagement": {"type": "integer", "index": 52, "name": "conversion_site_visits_order_quantity_engagement", "comment": null}, "conversion_site_visits_order_quantity_view": {"type": "integer", "index": 53, "name": "conversion_site_visits_order_quantity_view", "comment": null}, "conversion_site_visits_post_engagement": {"type": "integer", "index": 54, "name": "conversion_site_visits_post_engagement", "comment": null}, "conversion_site_visits_post_view": {"type": "integer", "index": 55, "name": "conversion_site_visits_post_view", "comment": null}, "conversion_site_visits_sale_amount": {"type": "integer", "index": 56, "name": "conversion_site_visits_sale_amount", "comment": null}, "conversion_site_visits_sale_amount_engagement": {"type": "integer", "index": 57, "name": "conversion_site_visits_sale_amount_engagement", "comment": null}, "conversion_site_visits_sale_amount_view": {"type": "integer", "index": 58, "name": "conversion_site_visits_sale_amount_view", "comment": null}, "engagements": {"type": "integer", "index": 59, "name": "engagements", "comment": null}, "follows": {"type": "integer", "index": 60, "name": "follows", "comment": null}, "impressions": {"type": "integer", "index": 61, "name": "impressions", "comment": null}, "likes": {"type": "integer", "index": 62, "name": "likes", "comment": null}, "media_engagements": {"type": "integer", "index": 63, "name": "media_engagements", "comment": null}, "media_views": {"type": "integer", "index": 64, "name": "media_views", "comment": null}, "mobile_conversion_achievements_unlocked_assisted": {"type": "integer", "index": 65, "name": "mobile_conversion_achievements_unlocked_assisted", "comment": null}, "mobile_conversion_achievements_unlocked_order_quantity": {"type": "integer", "index": 66, "name": "mobile_conversion_achievements_unlocked_order_quantity", "comment": null}, "mobile_conversion_achievements_unlocked_post_engagement": {"type": "integer", "index": 67, "name": "mobile_conversion_achievements_unlocked_post_engagement", "comment": null}, "mobile_conversion_achievements_unlocked_post_view": {"type": "integer", "index": 68, "name": "mobile_conversion_achievements_unlocked_post_view", "comment": null}, "mobile_conversion_achievements_unlocked_sale_amount": {"type": "integer", "index": 69, "name": "mobile_conversion_achievements_unlocked_sale_amount", "comment": null}, "mobile_conversion_add_to_carts_assisted": {"type": "integer", "index": 70, "name": "mobile_conversion_add_to_carts_assisted", "comment": null}, "mobile_conversion_add_to_carts_order_quantity": {"type": "integer", "index": 71, "name": "mobile_conversion_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_add_to_carts_post_engagement": {"type": "integer", "index": 72, "name": "mobile_conversion_add_to_carts_post_engagement", "comment": null}, "mobile_conversion_add_to_carts_post_view": {"type": "integer", "index": 73, "name": "mobile_conversion_add_to_carts_post_view", "comment": null}, "mobile_conversion_add_to_carts_sale_amount": {"type": "integer", "index": 74, "name": "mobile_conversion_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_add_to_wishlists_assisted": {"type": "integer", "index": 75, "name": "mobile_conversion_add_to_wishlists_assisted", "comment": null}, "mobile_conversion_add_to_wishlists_order_quantity": {"type": "integer", "index": 76, "name": "mobile_conversion_add_to_wishlists_order_quantity", "comment": null}, "mobile_conversion_add_to_wishlists_post_engagement": {"type": "integer", "index": 77, "name": "mobile_conversion_add_to_wishlists_post_engagement", "comment": null}, "mobile_conversion_add_to_wishlists_post_view": {"type": "integer", "index": 78, "name": "mobile_conversion_add_to_wishlists_post_view", "comment": null}, "mobile_conversion_add_to_wishlists_sale_amount": {"type": "integer", "index": 79, "name": "mobile_conversion_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_checkouts_initiated_assisted": {"type": "integer", "index": 80, "name": "mobile_conversion_checkouts_initiated_assisted", "comment": null}, "mobile_conversion_checkouts_initiated_order_quantity": {"type": "integer", "index": 81, "name": "mobile_conversion_checkouts_initiated_order_quantity", "comment": null}, "mobile_conversion_checkouts_initiated_post_engagement": {"type": "integer", "index": 82, "name": "mobile_conversion_checkouts_initiated_post_engagement", "comment": null}, "mobile_conversion_checkouts_initiated_post_view": {"type": "integer", "index": 83, "name": "mobile_conversion_checkouts_initiated_post_view", "comment": null}, "mobile_conversion_checkouts_initiated_sale_amount": {"type": "integer", "index": 84, "name": "mobile_conversion_checkouts_initiated_sale_amount", "comment": null}, "mobile_conversion_content_views_assisted": {"type": "integer", "index": 85, "name": "mobile_conversion_content_views_assisted", "comment": null}, "mobile_conversion_content_views_order_quantity": {"type": "integer", "index": 86, "name": "mobile_conversion_content_views_order_quantity", "comment": null}, "mobile_conversion_content_views_post_engagement": {"type": "integer", "index": 87, "name": "mobile_conversion_content_views_post_engagement", "comment": null}, "mobile_conversion_content_views_post_view": {"type": "integer", "index": 88, "name": "mobile_conversion_content_views_post_view", "comment": null}, "mobile_conversion_content_views_sale_amount": {"type": "integer", "index": 89, "name": "mobile_conversion_content_views_sale_amount", "comment": null}, "mobile_conversion_downloads_order_quantity": {"type": "integer", "index": 90, "name": "mobile_conversion_downloads_order_quantity", "comment": null}, "mobile_conversion_downloads_post_engagement": {"type": "integer", "index": 91, "name": "mobile_conversion_downloads_post_engagement", "comment": null}, "mobile_conversion_downloads_post_view": {"type": "integer", "index": 92, "name": "mobile_conversion_downloads_post_view", "comment": null}, "mobile_conversion_downloads_sale_amount": {"type": "integer", "index": 93, "name": "mobile_conversion_downloads_sale_amount", "comment": null}, "mobile_conversion_installs_assisted": {"type": "integer", "index": 94, "name": "mobile_conversion_installs_assisted", "comment": null}, "mobile_conversion_installs_order_quantity": {"type": "integer", "index": 95, "name": "mobile_conversion_installs_order_quantity", "comment": null}, "mobile_conversion_installs_post_engagement": {"type": "integer", "index": 96, "name": "mobile_conversion_installs_post_engagement", "comment": null}, "mobile_conversion_installs_post_view": {"type": "integer", "index": 97, "name": "mobile_conversion_installs_post_view", "comment": null}, "mobile_conversion_installs_sale_amount": {"type": "integer", "index": 98, "name": "mobile_conversion_installs_sale_amount", "comment": null}, "mobile_conversion_invites_assisted": {"type": "integer", "index": 99, "name": "mobile_conversion_invites_assisted", "comment": null}, "mobile_conversion_invites_order_quantity": {"type": "integer", "index": 100, "name": "mobile_conversion_invites_order_quantity", "comment": null}, "mobile_conversion_invites_post_engagement": {"type": "integer", "index": 101, "name": "mobile_conversion_invites_post_engagement", "comment": null}, "mobile_conversion_invites_post_view": {"type": "integer", "index": 102, "name": "mobile_conversion_invites_post_view", "comment": null}, "mobile_conversion_invites_sale_amount": {"type": "integer", "index": 103, "name": "mobile_conversion_invites_sale_amount", "comment": null}, "mobile_conversion_key_page_views_post_engagement": {"type": "integer", "index": 104, "name": "mobile_conversion_key_page_views_post_engagement", "comment": null}, "mobile_conversion_key_page_views_post_view": {"type": "integer", "index": 105, "name": "mobile_conversion_key_page_views_post_view", "comment": null}, "mobile_conversion_levels_achieved_assisted": {"type": "integer", "index": 106, "name": "mobile_conversion_levels_achieved_assisted", "comment": null}, "mobile_conversion_levels_achieved_order_quantity": {"type": "integer", "index": 107, "name": "mobile_conversion_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_levels_achieved_post_engagement": {"type": "integer", "index": 108, "name": "mobile_conversion_levels_achieved_post_engagement", "comment": null}, "mobile_conversion_levels_achieved_post_view": {"type": "integer", "index": 109, "name": "mobile_conversion_levels_achieved_post_view", "comment": null}, "mobile_conversion_levels_achieved_sale_amount": {"type": "integer", "index": 110, "name": "mobile_conversion_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_metric": {"type": "integer", "index": 111, "name": "mobile_conversion_lifetime_value_achievements_unlocked_metric", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_order_qu": {"type": "integer", "index": 112, "name": "mobile_conversion_lifetime_value_achievements_unlocked_order_qu", "comment": null}, "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo": {"type": "integer", "index": 113, "name": "mobile_conversion_lifetime_value_achievements_unlocked_sale_amo", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_metric": {"type": "integer", "index": 114, "name": "mobile_conversion_lifetime_value_add_to_carts_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_order_quantity": {"type": "integer", "index": 115, "name": "mobile_conversion_lifetime_value_add_to_carts_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_add_to_carts_sale_amount": {"type": "integer", "index": 116, "name": "mobile_conversion_lifetime_value_add_to_carts_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_metric": {"type": "integer", "index": 117, "name": "mobile_conversion_lifetime_value_add_to_wishlists_metric", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit": {"type": "integer", "index": 118, "name": "mobile_conversion_lifetime_value_add_to_wishlists_order_quantit", "comment": null}, "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount": {"type": "integer", "index": 119, "name": "mobile_conversion_lifetime_value_add_to_wishlists_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_metric": {"type": "integer", "index": 120, "name": "mobile_conversion_lifetime_value_checkouts_initiated_metric", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_order_quan": {"type": "integer", "index": 121, "name": "mobile_conversion_lifetime_value_checkouts_initiated_order_quan", "comment": null}, "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun": {"type": "integer", "index": 122, "name": "mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_content_views_metric": {"type": "integer", "index": 123, "name": "mobile_conversion_lifetime_value_content_views_metric", "comment": null}, "mobile_conversion_lifetime_value_content_views_order_quantity": {"type": "integer", "index": 124, "name": "mobile_conversion_lifetime_value_content_views_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_content_views_sale_amount": {"type": "integer", "index": 125, "name": "mobile_conversion_lifetime_value_content_views_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_invites_metric": {"type": "integer", "index": 126, "name": "mobile_conversion_lifetime_value_invites_metric", "comment": null}, "mobile_conversion_lifetime_value_invites_order_quantity": {"type": "integer", "index": 127, "name": "mobile_conversion_lifetime_value_invites_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_invites_sale_amount": {"type": "integer", "index": 128, "name": "mobile_conversion_lifetime_value_invites_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_metric": {"type": "integer", "index": 129, "name": "mobile_conversion_lifetime_value_levels_achieved_metric", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_order_quantity": {"type": "integer", "index": 130, "name": "mobile_conversion_lifetime_value_levels_achieved_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_levels_achieved_sale_amount": {"type": "integer", "index": 131, "name": "mobile_conversion_lifetime_value_levels_achieved_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_logins_metric": {"type": "integer", "index": 132, "name": "mobile_conversion_lifetime_value_logins_metric", "comment": null}, "mobile_conversion_lifetime_value_logins_order_quantity": {"type": "integer", "index": 133, "name": "mobile_conversion_lifetime_value_logins_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_logins_sale_amount": {"type": "integer", "index": 134, "name": "mobile_conversion_lifetime_value_logins_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_metric": {"type": "integer", "index": 135, "name": "mobile_conversion_lifetime_value_payment_info_additions_metric", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_order_q": {"type": "integer", "index": 136, "name": "mobile_conversion_lifetime_value_payment_info_additions_order_q", "comment": null}, "mobile_conversion_lifetime_value_payment_info_additions_sale_am": {"type": "integer", "index": 137, "name": "mobile_conversion_lifetime_value_payment_info_additions_sale_am", "comment": null}, "mobile_conversion_lifetime_value_purchases_metric": {"type": "integer", "index": 138, "name": "mobile_conversion_lifetime_value_purchases_metric", "comment": null}, "mobile_conversion_lifetime_value_purchases_order_quantity": {"type": "integer", "index": 139, "name": "mobile_conversion_lifetime_value_purchases_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_purchases_sale_amount": {"type": "integer", "index": 140, "name": "mobile_conversion_lifetime_value_purchases_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_rates_metric": {"type": "integer", "index": 141, "name": "mobile_conversion_lifetime_value_rates_metric", "comment": null}, "mobile_conversion_lifetime_value_rates_order_quantity": {"type": "integer", "index": 142, "name": "mobile_conversion_lifetime_value_rates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_rates_sale_amount": {"type": "integer", "index": 143, "name": "mobile_conversion_lifetime_value_rates_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_reservations_metric": {"type": "integer", "index": 144, "name": "mobile_conversion_lifetime_value_reservations_metric", "comment": null}, "mobile_conversion_lifetime_value_reservations_order_quantity": {"type": "integer", "index": 145, "name": "mobile_conversion_lifetime_value_reservations_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_reservations_sale_amount": {"type": "integer", "index": 146, "name": "mobile_conversion_lifetime_value_reservations_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_searches_metric": {"type": "integer", "index": 147, "name": "mobile_conversion_lifetime_value_searches_metric", "comment": null}, "mobile_conversion_lifetime_value_searches_order_quantity": {"type": "integer", "index": 148, "name": "mobile_conversion_lifetime_value_searches_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_searches_sale_amount": {"type": "integer", "index": 149, "name": "mobile_conversion_lifetime_value_searches_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_shares_metric": {"type": "integer", "index": 150, "name": "mobile_conversion_lifetime_value_shares_metric", "comment": null}, "mobile_conversion_lifetime_value_shares_order_quantity": {"type": "integer", "index": 151, "name": "mobile_conversion_lifetime_value_shares_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_shares_sale_amount": {"type": "integer", "index": 152, "name": "mobile_conversion_lifetime_value_shares_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_metric": {"type": "integer", "index": 153, "name": "mobile_conversion_lifetime_value_sign_ups_metric", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_order_quantity": {"type": "integer", "index": 154, "name": "mobile_conversion_lifetime_value_sign_ups_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_sign_ups_sale_amount": {"type": "integer", "index": 155, "name": "mobile_conversion_lifetime_value_sign_ups_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_metric": {"type": "integer", "index": 156, "name": "mobile_conversion_lifetime_value_spent_credits_metric", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_order_quantity": {"type": "integer", "index": 157, "name": "mobile_conversion_lifetime_value_spent_credits_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_spent_credits_sale_amount": {"type": "integer", "index": 158, "name": "mobile_conversion_lifetime_value_spent_credits_sale_amount", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_metric": {"type": "integer", "index": 159, "name": "mobile_conversion_lifetime_value_tutorials_completed_metric", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_order_quan": {"type": "integer", "index": 160, "name": "mobile_conversion_lifetime_value_tutorials_completed_order_quan", "comment": null}, "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun": {"type": "integer", "index": 161, "name": "mobile_conversion_lifetime_value_tutorials_completed_sale_amoun", "comment": null}, "mobile_conversion_lifetime_value_updates_metric": {"type": "integer", "index": 162, "name": "mobile_conversion_lifetime_value_updates_metric", "comment": null}, "mobile_conversion_lifetime_value_updates_order_quantity": {"type": "integer", "index": 163, "name": "mobile_conversion_lifetime_value_updates_order_quantity", "comment": null}, "mobile_conversion_lifetime_value_updates_sale_amount": {"type": "integer", "index": 164, "name": "mobile_conversion_lifetime_value_updates_sale_amount", "comment": null}, "mobile_conversion_logins_assisted": {"type": "integer", "index": 165, "name": "mobile_conversion_logins_assisted", "comment": null}, "mobile_conversion_logins_order_quantity": {"type": "integer", "index": 166, "name": "mobile_conversion_logins_order_quantity", "comment": null}, "mobile_conversion_logins_post_engagement": {"type": "integer", "index": 167, "name": "mobile_conversion_logins_post_engagement", "comment": null}, "mobile_conversion_logins_post_view": {"type": "integer", "index": 168, "name": "mobile_conversion_logins_post_view", "comment": null}, "mobile_conversion_logins_sale_amount": {"type": "integer", "index": 169, "name": "mobile_conversion_logins_sale_amount", "comment": null}, "mobile_conversion_payment_info_additions_assisted": {"type": "integer", "index": 170, "name": "mobile_conversion_payment_info_additions_assisted", "comment": null}, "mobile_conversion_payment_info_additions_order_quantity": {"type": "integer", "index": 171, "name": "mobile_conversion_payment_info_additions_order_quantity", "comment": null}, "mobile_conversion_payment_info_additions_post_engagement": {"type": "integer", "index": 172, "name": "mobile_conversion_payment_info_additions_post_engagement", "comment": null}, "mobile_conversion_payment_info_additions_post_view": {"type": "integer", "index": 173, "name": "mobile_conversion_payment_info_additions_post_view", "comment": null}, "mobile_conversion_payment_info_additions_sale_amount": {"type": "integer", "index": 174, "name": "mobile_conversion_payment_info_additions_sale_amount", "comment": null}, "mobile_conversion_purchases_assisted": {"type": "integer", "index": 175, "name": "mobile_conversion_purchases_assisted", "comment": null}, "mobile_conversion_purchases_order_quantity": {"type": "integer", "index": 176, "name": "mobile_conversion_purchases_order_quantity", "comment": null}, "mobile_conversion_purchases_post_engagement": {"type": "integer", "index": 177, "name": "mobile_conversion_purchases_post_engagement", "comment": null}, "mobile_conversion_purchases_post_view": {"type": "integer", "index": 178, "name": "mobile_conversion_purchases_post_view", "comment": null}, "mobile_conversion_purchases_sale_amount": {"type": "integer", "index": 179, "name": "mobile_conversion_purchases_sale_amount", "comment": null}, "mobile_conversion_rates_assisted": {"type": "integer", "index": 180, "name": "mobile_conversion_rates_assisted", "comment": null}, "mobile_conversion_rates_order_quantity": {"type": "integer", "index": 181, "name": "mobile_conversion_rates_order_quantity", "comment": null}, "mobile_conversion_rates_post_engagement": {"type": "integer", "index": 182, "name": "mobile_conversion_rates_post_engagement", "comment": null}, "mobile_conversion_rates_post_view": {"type": "integer", "index": 183, "name": "mobile_conversion_rates_post_view", "comment": null}, "mobile_conversion_rates_sale_amount": {"type": "integer", "index": 184, "name": "mobile_conversion_rates_sale_amount", "comment": null}, "mobile_conversion_re_engages_assisted": {"type": "integer", "index": 185, "name": "mobile_conversion_re_engages_assisted", "comment": null}, "mobile_conversion_re_engages_order_quantity": {"type": "integer", "index": 186, "name": "mobile_conversion_re_engages_order_quantity", "comment": null}, "mobile_conversion_re_engages_post_engagement": {"type": "integer", "index": 187, "name": "mobile_conversion_re_engages_post_engagement", "comment": null}, "mobile_conversion_re_engages_post_view": {"type": "integer", "index": 188, "name": "mobile_conversion_re_engages_post_view", "comment": null}, "mobile_conversion_re_engages_sale_amount": {"type": "integer", "index": 189, "name": "mobile_conversion_re_engages_sale_amount", "comment": null}, "mobile_conversion_reservations_assisted": {"type": "integer", "index": 190, "name": "mobile_conversion_reservations_assisted", "comment": null}, "mobile_conversion_reservations_order_quantity": {"type": "integer", "index": 191, "name": "mobile_conversion_reservations_order_quantity", "comment": null}, "mobile_conversion_reservations_post_engagement": {"type": "integer", "index": 192, "name": "mobile_conversion_reservations_post_engagement", "comment": null}, "mobile_conversion_reservations_post_view": {"type": "integer", "index": 193, "name": "mobile_conversion_reservations_post_view", "comment": null}, "mobile_conversion_reservations_sale_amount": {"type": "integer", "index": 194, "name": "mobile_conversion_reservations_sale_amount", "comment": null}, "mobile_conversion_searches_assisted": {"type": "integer", "index": 195, "name": "mobile_conversion_searches_assisted", "comment": null}, "mobile_conversion_searches_order_quantity": {"type": "integer", "index": 196, "name": "mobile_conversion_searches_order_quantity", "comment": null}, "mobile_conversion_searches_post_engagement": {"type": "integer", "index": 197, "name": "mobile_conversion_searches_post_engagement", "comment": null}, "mobile_conversion_searches_post_view": {"type": "integer", "index": 198, "name": "mobile_conversion_searches_post_view", "comment": null}, "mobile_conversion_searches_sale_amount": {"type": "integer", "index": 199, "name": "mobile_conversion_searches_sale_amount", "comment": null}, "mobile_conversion_shares_assisted": {"type": "integer", "index": 200, "name": "mobile_conversion_shares_assisted", "comment": null}, "mobile_conversion_shares_order_quantity": {"type": "integer", "index": 201, "name": "mobile_conversion_shares_order_quantity", "comment": null}, "mobile_conversion_shares_post_engagement": {"type": "integer", "index": 202, "name": "mobile_conversion_shares_post_engagement", "comment": null}, "mobile_conversion_shares_post_view": {"type": "integer", "index": 203, "name": "mobile_conversion_shares_post_view", "comment": null}, "mobile_conversion_shares_sale_amount": {"type": "integer", "index": 204, "name": "mobile_conversion_shares_sale_amount", "comment": null}, "mobile_conversion_sign_ups_assisted": {"type": "integer", "index": 205, "name": "mobile_conversion_sign_ups_assisted", "comment": null}, "mobile_conversion_sign_ups_order_quantity": {"type": "integer", "index": 206, "name": "mobile_conversion_sign_ups_order_quantity", "comment": null}, "mobile_conversion_sign_ups_post_engagement": {"type": "integer", "index": 207, "name": "mobile_conversion_sign_ups_post_engagement", "comment": null}, "mobile_conversion_sign_ups_post_view": {"type": "integer", "index": 208, "name": "mobile_conversion_sign_ups_post_view", "comment": null}, "mobile_conversion_sign_ups_sale_amount": {"type": "integer", "index": 209, "name": "mobile_conversion_sign_ups_sale_amount", "comment": null}, "mobile_conversion_site_visits_order_quantity": {"type": "integer", "index": 210, "name": "mobile_conversion_site_visits_order_quantity", "comment": null}, "mobile_conversion_site_visits_post_engagement": {"type": "integer", "index": 211, "name": "mobile_conversion_site_visits_post_engagement", "comment": null}, "mobile_conversion_site_visits_post_view": {"type": "integer", "index": 212, "name": "mobile_conversion_site_visits_post_view", "comment": null}, "mobile_conversion_site_visits_sale_amount": {"type": "integer", "index": 213, "name": "mobile_conversion_site_visits_sale_amount", "comment": null}, "mobile_conversion_spent_credits_assisted": {"type": "integer", "index": 214, "name": "mobile_conversion_spent_credits_assisted", "comment": null}, "mobile_conversion_spent_credits_order_quantity": {"type": "integer", "index": 215, "name": "mobile_conversion_spent_credits_order_quantity", "comment": null}, "mobile_conversion_spent_credits_post_engagement": {"type": "integer", "index": 216, "name": "mobile_conversion_spent_credits_post_engagement", "comment": null}, "mobile_conversion_spent_credits_post_view": {"type": "integer", "index": 217, "name": "mobile_conversion_spent_credits_post_view", "comment": null}, "mobile_conversion_spent_credits_sale_amount": {"type": "integer", "index": 218, "name": "mobile_conversion_spent_credits_sale_amount", "comment": null}, "mobile_conversion_tutorials_completed_assisted": {"type": "integer", "index": 219, "name": "mobile_conversion_tutorials_completed_assisted", "comment": null}, "mobile_conversion_tutorials_completed_order_quantity": {"type": "integer", "index": 220, "name": "mobile_conversion_tutorials_completed_order_quantity", "comment": null}, "mobile_conversion_tutorials_completed_post_engagement": {"type": "integer", "index": 221, "name": "mobile_conversion_tutorials_completed_post_engagement", "comment": null}, "mobile_conversion_tutorials_completed_post_view": {"type": "integer", "index": 222, "name": "mobile_conversion_tutorials_completed_post_view", "comment": null}, "mobile_conversion_tutorials_completed_sale_amount": {"type": "integer", "index": 223, "name": "mobile_conversion_tutorials_completed_sale_amount", "comment": null}, "mobile_conversion_updates_assisted": {"type": "integer", "index": 224, "name": "mobile_conversion_updates_assisted", "comment": null}, "mobile_conversion_updates_order_quantity": {"type": "integer", "index": 225, "name": "mobile_conversion_updates_order_quantity", "comment": null}, "mobile_conversion_updates_post_engagement": {"type": "integer", "index": 226, "name": "mobile_conversion_updates_post_engagement", "comment": null}, "mobile_conversion_updates_post_view": {"type": "integer", "index": 227, "name": "mobile_conversion_updates_post_view", "comment": null}, "mobile_conversion_updates_sale_amount": {"type": "integer", "index": 228, "name": "mobile_conversion_updates_sale_amount", "comment": null}, "poll_card_vote": {"type": "integer", "index": 229, "name": "poll_card_vote", "comment": null}, "qualified_impressions": {"type": "integer", "index": 230, "name": "qualified_impressions", "comment": null}, "replies": {"type": "integer", "index": 231, "name": "replies", "comment": null}, "retweets": {"type": "integer", "index": 232, "name": "retweets", "comment": null}, "tweets_send": {"type": "integer", "index": 233, "name": "tweets_send", "comment": null}, "unfollows": {"type": "integer", "index": 234, "name": "unfollows", "comment": null}, "url_clicks": {"type": "integer", "index": 235, "name": "url_clicks", "comment": null}, "video_3_s_100_pct_views": {"type": "integer", "index": 236, "name": "video_3_s_100_pct_views", "comment": null}, "video_6_s_views": {"type": "integer", "index": 237, "name": "video_6_s_views", "comment": null}, "video_content_starts": {"type": "integer", "index": 238, "name": "video_content_starts", "comment": null}, "video_cta_clicks": {"type": "integer", "index": 239, "name": "video_cta_clicks", "comment": null}, "video_mrc_views": {"type": "integer", "index": 240, "name": "video_mrc_views", "comment": null}, "video_total_views": {"type": "integer", "index": 241, "name": "video_total_views", "comment": null}, "video_views_100": {"type": "integer", "index": 242, "name": "video_views_100", "comment": null}, "video_views_25": {"type": "integer", "index": 243, "name": "video_views_25", "comment": null}, "video_views_50": {"type": "integer", "index": 244, "name": "video_views_50", "comment": null}, "video_views_75": {"type": "integer", "index": 245, "name": "video_views_75", "comment": null}, "mobile_conversion_installs_skan_post_engagement": {"type": "integer", "index": 246, "name": "mobile_conversion_installs_skan_post_engagement", "comment": null}, "mobile_conversion_installs_skan_post_view": {"type": "integer", "index": 247, "name": "mobile_conversion_installs_skan_post_view", "comment": null}, "mobile_conversion_purchases_skan_post_engagement": {"type": "integer", "index": 248, "name": "mobile_conversion_purchases_skan_post_engagement", "comment": null}, "mobile_conversion_purchases_skan_post_view": {"type": "integer", "index": 249, "name": "mobile_conversion_purchases_skan_post_view", "comment": null}, "video_15_s_views": {"type": "integer", "index": 250, "name": "video_15_s_views", "comment": null}, "auto_created_conversion_landing_page_view": {"type": "integer", "index": 251, "name": "auto_created_conversion_landing_page_view", "comment": null}, "auto_created_conversion_session": {"type": "integer", "index": 252, "name": "auto_created_conversion_session", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.twitter_ads.twitter_ads.line_item_report"}, "source.twitter_ads.twitter_ads.promoted_tweet_history": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_promoted_tweet_history_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "approval_status": {"type": "text", "index": 2, "name": "approval_status", "comment": null}, "created_at": {"type": "text", "index": 3, "name": "created_at", "comment": null}, "deleted": {"type": "boolean", "index": 4, "name": "deleted", "comment": null}, "entity_status": {"type": "text", "index": 5, "name": "entity_status", "comment": null}, "id": {"type": "text", "index": 6, "name": "id", "comment": null}, "line_item_id": {"type": "text", "index": 7, "name": "line_item_id", "comment": null}, "tweet_id": {"type": "bigint", "index": 8, "name": "tweet_id", "comment": null}, "updated_at": {"type": "text", "index": 9, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.twitter_ads.twitter_ads.promoted_tweet_history"}, "source.twitter_ads.twitter_ads.promoted_tweet_report": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_promoted_tweet_report_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": null}, "billed_charge_local_micro": {"type": "integer", "index": 3, "name": "billed_charge_local_micro", "comment": null}, "clicks": {"type": "integer", "index": 4, "name": "clicks", "comment": null}, "date": {"type": "timestamp without time zone", "index": 5, "name": "date", "comment": null}, "impressions": {"type": "integer", "index": 6, "name": "impressions", "comment": null}, "promoted_tweet_id": {"type": "text", "index": 7, "name": "promoted_tweet_id", "comment": null}, "url_clicks": {"type": "integer", "index": 8, "name": "url_clicks", "comment": null}, "placement": {"type": "text", "index": 9, "name": "placement", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.twitter_ads.twitter_ads.promoted_tweet_report"}, "source.twitter_ads.twitter_ads.tweet": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_tweet_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"id": {"type": "integer", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "text", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": null}, "card_uri": {"type": "integer", "index": 4, "name": "card_uri", "comment": null}, "coordinates_coordinates": {"type": "integer", "index": 5, "name": "coordinates_coordinates", "comment": null}, "coordinates_type": {"type": "integer", "index": 6, "name": "coordinates_type", "comment": null}, "created_at": {"type": "text", "index": 7, "name": "created_at", "comment": null}, "favorite_count": {"type": "integer", "index": 8, "name": "favorite_count", "comment": null}, "favorited": {"type": "boolean", "index": 9, "name": "favorited", "comment": null}, "followers": {"type": "integer", "index": 10, "name": "followers", "comment": null}, "full_text": {"type": "text", "index": 11, "name": "full_text", "comment": null}, "geo_coordinates": {"type": "integer", "index": 12, "name": "geo_coordinates", "comment": null}, "geo_type": {"type": "integer", "index": 13, "name": "geo_type", "comment": null}, "in_reply_to_screen_name": {"type": "integer", "index": 14, "name": "in_reply_to_screen_name", "comment": null}, "in_reply_to_status_id": {"type": "integer", "index": 15, "name": "in_reply_to_status_id", "comment": null}, "in_reply_to_user_id": {"type": "integer", "index": 16, "name": "in_reply_to_user_id", "comment": null}, "lang": {"type": "text", "index": 17, "name": "lang", "comment": null}, "media_key": {"type": "integer", "index": 18, "name": "media_key", "comment": null}, "retweet_count": {"type": "integer", "index": 19, "name": "retweet_count", "comment": null}, "retweeted": {"type": "boolean", "index": 20, "name": "retweeted", "comment": null}, "source": {"type": "text", "index": 21, "name": "source", "comment": null}, "truncated": {"type": "boolean", "index": 22, "name": "truncated", "comment": null}, "tweet_type": {"type": "text", "index": 23, "name": "tweet_type", "comment": null}, "user_id": {"type": "integer", "index": 24, "name": "user_id", "comment": null}, "name": {"type": "integer", "index": 25, "name": "name", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.twitter_ads.twitter_ads.tweet"}, "source.twitter_ads.twitter_ads.tweet_url": {"metadata": {"type": "BASE TABLE", "schema": "public", "name": "twitter_tweet_url_data", "database": "postgres", "comment": null, "owner": "postgres"}, "columns": {"_fivetran_synced": {"type": "text", "index": 1, "name": "_fivetran_synced", "comment": null}, "display_url": {"type": "text", "index": 2, "name": "display_url", "comment": null}, "expanded_url": {"type": "text", "index": 3, "name": "expanded_url", "comment": null}, "index": {"type": "integer", "index": 4, "name": "index", "comment": null}, "indices": {"type": "text", "index": 5, "name": "indices", "comment": null}, "tweet_id": {"type": "bigint", "index": 6, "name": "tweet_id", "comment": null}, "url": {"type": "text", "index": 7, "name": "url", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.twitter_ads.twitter_ads.tweet_url"}}, "errors": null} \ No newline at end of file diff --git a/docs/manifest.json b/docs/manifest.json index 68439b4..6344c0c 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -1 +1 @@ -{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v12.json", "dbt_version": "1.11.12", "generated_at": "2026-07-07T18:55:48.990455Z", "invocation_id": "1da9f4ef-1e54-4b39-adbc-cc8520ee59ed", "invocation_started_at": "2026-07-07T18:54:50.570913+00:00", "env": {}, "project_name": "ad_reporting_integration_tests", "project_id": "9bf57d857f8bb3abf75f1b334ad30f3c", "user_id": null, "send_anonymous_usage_stats": false, "adapter_type": "postgres", "quoting": {"database": true, "schema": true, "identifier": true, "column": null}, "run_started_at": "2026-07-07T18:54:50.571195+00:00"}, "nodes": {"seed.ad_reporting_integration_tests.twitter_campaign_locations_report_data": {"database": "postgres", "schema": "public", "name": "twitter_campaign_locations_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "twitter_campaign_locations_report_data.csv", "original_file_path": "seeds/twitter_campaign_locations_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.twitter_campaign_locations_report_data", "fqn": ["ad_reporting_integration_tests", "twitter_campaign_locations_report_data"], "alias": "twitter_campaign_locations_report_data", "checksum": {"name": "sha256", "checksum": "a43a6e4dabfcdb8168f1ce9855d872e91ee69ce2d0df2f319dc7210222040556"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450494.9793873, "relation_name": "\"postgres\".\"public\".\"twitter_campaign_locations_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.apple_search_ad_history_data": {"database": "postgres", "schema": "public", "name": "apple_search_ad_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "apple_search_ad_history_data.csv", "original_file_path": "seeds/apple_search_ad_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.apple_search_ad_history_data", "fqn": ["ad_reporting_integration_tests", "apple_search_ad_history_data"], "alias": "apple_search_ad_history_data", "checksum": {"name": "sha256", "checksum": "e9e1a65339d24d616ce16ea8ee3cc902473a1b5048789ad338c4ba6ca57fe8e0"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"creation_time": "timestamp", "modification_time": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"creation_time": "timestamp", "modification_time": "timestamp"}}, "created_at": 1783450494.987359, "relation_name": "\"postgres\".\"public\".\"apple_search_ad_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.snapchat_ad_hourly_report_data": {"database": "postgres", "schema": "public", "name": "snapchat_ad_hourly_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "snapchat_ad_hourly_report_data.csv", "original_file_path": "seeds/snapchat_ad_hourly_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.snapchat_ad_hourly_report_data", "fqn": ["ad_reporting_integration_tests", "snapchat_ad_hourly_report_data"], "alias": "snapchat_ad_hourly_report_data", "checksum": {"name": "sha256", "checksum": "44942448ec2f5fdab1d102948af6724bc9d10970c6d760cd5b9eb778a16aa12b"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"date": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"date": "timestamp"}}, "created_at": 1783450494.9908478, "relation_name": "\"postgres\".\"public\".\"snapchat_ad_hourly_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.linkedin_ad_account_history_data": {"database": "postgres", "schema": "public", "name": "linkedin_ad_account_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "linkedin_ad_account_history_data.csv", "original_file_path": "seeds/linkedin_ad_account_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.linkedin_ad_account_history_data", "fqn": ["ad_reporting_integration_tests", "linkedin_ad_account_history_data"], "alias": "linkedin_ad_account_history_data", "checksum": {"name": "sha256", "checksum": "f57fbb5e5a881a56457ed9b37150ec111e83e2e43deff5cc82891125ef61bc1d"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"created_time": "timestamp", "last_modified_time": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"created_time": "timestamp", "last_modified_time": "timestamp"}}, "created_at": 1783450494.9945865, "relation_name": "\"postgres\".\"public\".\"linkedin_ad_account_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_account_history_data": {"database": "postgres", "schema": "public", "name": "google_ads_account_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_account_history_data.csv", "original_file_path": "seeds/google_ads_account_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_account_history_data", "fqn": ["ad_reporting_integration_tests", "google_ads_account_history_data"], "alias": "google_ads_account_history_data", "checksum": {"name": "sha256", "checksum": "bf0559a512f089514aa67964b7ae5aef0fee8deb6e0874c01e853ed78dd7883d"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450494.9978776, "relation_name": "\"postgres\".\"public\".\"google_ads_account_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.microsoft_ads_campaign_performance_daily_report_data": {"database": "postgres", "schema": "public", "name": "microsoft_ads_campaign_performance_daily_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "microsoft_ads_campaign_performance_daily_report_data.csv", "original_file_path": "seeds/microsoft_ads_campaign_performance_daily_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_campaign_performance_daily_report_data", "fqn": ["ad_reporting_integration_tests", "microsoft_ads_campaign_performance_daily_report_data"], "alias": "microsoft_ads_campaign_performance_daily_report_data", "checksum": {"name": "sha256", "checksum": "d8dd92f23ecc97f6845e6b06977edfa44f0cc2a255aec5849b19449b6f294b57"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "bigint", "campaign_id": "bigint", "spend": "float"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "spend": "float"}}, "created_at": 1783450495.0012107, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_campaign_performance_daily_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.tiktok_advertiser_data": {"database": "postgres", "schema": "public", "name": "tiktok_advertiser_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "tiktok_advertiser_data.csv", "original_file_path": "seeds/tiktok_advertiser_data.csv", "unique_id": "seed.ad_reporting_integration_tests.tiktok_advertiser_data", "fqn": ["ad_reporting_integration_tests", "tiktok_advertiser_data"], "alias": "tiktok_advertiser_data", "checksum": {"name": "sha256", "checksum": "d85541c61ba67dc5ec46124b93d9484b43554ca4aa6e7582e52cbdb04fd5287b"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.0045025, "relation_name": "\"postgres\".\"public\".\"tiktok_advertiser_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.amazon_ads_targeting_keyword_report_data": {"database": "postgres", "schema": "public", "name": "amazon_ads_targeting_keyword_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "amazon_ads_targeting_keyword_report_data.csv", "original_file_path": "seeds/amazon_ads_targeting_keyword_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_targeting_keyword_report_data", "fqn": ["ad_reporting_integration_tests", "amazon_ads_targeting_keyword_report_data"], "alias": "amazon_ads_targeting_keyword_report_data", "checksum": {"name": "sha256", "checksum": "465149df01ea42da88e6faab29bc91faaed75d50c2e04cece5c7a4a442e31994"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "campaign_budget_amount": "float", "keyword_bid": "float"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"_fivetran_synced": "timestamp", "campaign_budget_amount": "float", "keyword_bid": "float"}}, "created_at": 1783450495.0077178, "relation_name": "\"postgres\".\"public\".\"amazon_ads_targeting_keyword_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.snapchat_creative_url_tag_history_data": {"database": "postgres", "schema": "public", "name": "snapchat_creative_url_tag_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "snapchat_creative_url_tag_history_data.csv", "original_file_path": "seeds/snapchat_creative_url_tag_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.snapchat_creative_url_tag_history_data", "fqn": ["ad_reporting_integration_tests", "snapchat_creative_url_tag_history_data"], "alias": "snapchat_creative_url_tag_history_data", "checksum": {"name": "sha256", "checksum": "c5e8dbafad038e142209d2145532d5d5e762922bf4fe44535901b46cd9797dcc"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.011055, "relation_name": "\"postgres\".\"public\".\"snapchat_creative_url_tag_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_actions_data": {"database": "postgres", "schema": "public", "name": "facebook_ads_basic_ad_actions_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "facebook_ads_basic_ad_actions_data.csv", "original_file_path": "seeds/facebook_ads_basic_ad_actions_data.csv", "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_actions_data", "fqn": ["ad_reporting_integration_tests", "facebook_ads_basic_ad_actions_data"], "alias": "facebook_ads_basic_ad_actions_data", "checksum": {"name": "sha256", "checksum": "ed0977ee47305aeb99778125280a699f5a7f0d6d36f7f115ff53c737b6c929ca"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"value": "float", "inline": "float", "_1_d_view": "float", "_7_d_click": "float"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"value": "float", "inline": "float", "_1_d_view": "float", "_7_d_click": "float"}}, "created_at": 1783450495.0143297, "relation_name": "\"postgres\".\"public\".\"facebook_ads_basic_ad_actions_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.amazon_ads_ad_group_history_data": {"database": "postgres", "schema": "public", "name": "amazon_ads_ad_group_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "amazon_ads_ad_group_history_data.csv", "original_file_path": "seeds/amazon_ads_ad_group_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_ad_group_history_data", "fqn": ["ad_reporting_integration_tests", "amazon_ads_ad_group_history_data"], "alias": "amazon_ads_ad_group_history_data", "checksum": {"name": "sha256", "checksum": "45753ff9cf086544b805b76303478c515ead8870e4ad9ae3988de8cae6befdde"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.0175812, "relation_name": "\"postgres\".\"public\".\"amazon_ads_ad_group_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_campaign_data": {"database": "postgres", "schema": "public", "name": "reddit_ads_campaign_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_campaign_data.csv", "original_file_path": "seeds/reddit_ads_campaign_data.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_campaign_data", "fqn": ["ad_reporting_integration_tests", "reddit_ads_campaign_data"], "alias": "reddit_ads_campaign_data", "checksum": {"name": "sha256", "checksum": "726c8b03bd81f57203df064ff66dd74bbdae559b8d7e1175c214ec06da819881"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "varchar(255)", "id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}", "id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783450495.0207636, "relation_name": "\"postgres\".\"public\".\"reddit_ads_campaign_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.apple_search_ad_report_data": {"database": "postgres", "schema": "public", "name": "apple_search_ad_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "apple_search_ad_report_data.csv", "original_file_path": "seeds/apple_search_ad_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.apple_search_ad_report_data", "fqn": ["ad_reporting_integration_tests", "apple_search_ad_report_data"], "alias": "apple_search_ad_report_data", "checksum": {"name": "sha256", "checksum": "8936d63dc5f422a1d45a934fad9be37c2ab56047a4ba67eaaf7f64830d9de563"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.024042, "relation_name": "\"postgres\".\"public\".\"apple_search_ad_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_ad_group_report_data": {"database": "postgres", "schema": "public", "name": "reddit_ads_ad_group_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_ad_group_report_data.csv", "original_file_path": "seeds/reddit_ads_ad_group_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_ad_group_report_data", "fqn": ["ad_reporting_integration_tests", "reddit_ads_ad_group_report_data"], "alias": "reddit_ads_ad_group_report_data", "checksum": {"name": "sha256", "checksum": "18a4e6c21b4b4c6248b681cc49bad5d0d12171a2d0a699ca99af864737d40817"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "varchar(255)", "ad_group_id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}", "ad_group_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783450495.027287, "relation_name": "\"postgres\".\"public\".\"reddit_ads_ad_group_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.microsoft_ads_geographic_performance_daily_report_data": {"database": "postgres", "schema": "public", "name": "microsoft_ads_geographic_performance_daily_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "microsoft_ads_geographic_performance_daily_report_data.csv", "original_file_path": "seeds/microsoft_ads_geographic_performance_daily_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_geographic_performance_daily_report_data", "fqn": ["ad_reporting_integration_tests", "microsoft_ads_geographic_performance_daily_report_data"], "alias": "microsoft_ads_geographic_performance_daily_report_data", "checksum": {"name": "sha256", "checksum": "5d2d0ccecc1cf02ec73c3a5652ac26f41c9da96d9141034c5ed2e8c48b1524e4"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "bigint", "campaign_id": "bigint", "ad_group_id": "bigint", "location_id": "bigint", "clicks": "integer", "impressions": "integer", "spend": "numeric", "conversions_qualified": "integer", "conversions": "integer", "revenue": "numeric", "all_conversions_qualified": "integer", "all_conversions": "integer", "all_revenue": "numeric"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "location_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "clicks": "integer", "impressions": "integer", "spend": "numeric", "conversions_qualified": "integer", "conversions": "integer", "revenue": "numeric", "all_conversions_qualified": "integer", "all_conversions": "integer", "all_revenue": "numeric"}}, "created_at": 1783450495.030711, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_geographic_performance_daily_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.twitter_promoted_tweet_report_data": {"database": "postgres", "schema": "public", "name": "twitter_promoted_tweet_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "twitter_promoted_tweet_report_data.csv", "original_file_path": "seeds/twitter_promoted_tweet_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.twitter_promoted_tweet_report_data", "fqn": ["ad_reporting_integration_tests", "twitter_promoted_tweet_report_data"], "alias": "twitter_promoted_tweet_report_data", "checksum": {"name": "sha256", "checksum": "481c6351831987ef3e159d6ae4f98a7f8d9a231125e99178fd01d1fbc906f0e5"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.0340056, "relation_name": "\"postgres\".\"public\".\"twitter_promoted_tweet_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.snapchat_creative_history_data": {"database": "postgres", "schema": "public", "name": "snapchat_creative_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "snapchat_creative_history_data.csv", "original_file_path": "seeds/snapchat_creative_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.snapchat_creative_history_data", "fqn": ["ad_reporting_integration_tests", "snapchat_creative_history_data"], "alias": "snapchat_creative_history_data", "checksum": {"name": "sha256", "checksum": "40505e1e47b59c850371007584560a03172120f078da2c81c6712aea77d868a8"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.0371606, "relation_name": "\"postgres\".\"public\".\"snapchat_creative_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_data": {"database": "postgres", "schema": "public", "name": "facebook_ads_basic_ad_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "facebook_ads_basic_ad_data.csv", "original_file_path": "seeds/facebook_ads_basic_ad_data.csv", "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_data", "fqn": ["ad_reporting_integration_tests", "facebook_ads_basic_ad_data"], "alias": "facebook_ads_basic_ad_data", "checksum": {"name": "sha256", "checksum": "66b31e24edd0ba75d3fee6ad4c1522fd9b43417943aac398f1c92f5076ba7ac0"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"ad_id": "bigint", "account_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"ad_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "account_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.0415814, "relation_name": "\"postgres\".\"public\".\"facebook_ads_basic_ad_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_ad_group_criterion_history_data": {"database": "postgres", "schema": "public", "name": "google_ads_ad_group_criterion_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_ad_group_criterion_history_data.csv", "original_file_path": "seeds/google_ads_ad_group_criterion_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_ad_group_criterion_history_data", "fqn": ["ad_reporting_integration_tests", "google_ads_ad_group_criterion_history_data"], "alias": "google_ads_ad_group_criterion_history_data", "checksum": {"name": "sha256", "checksum": "ba922f14e5ead32ec131a2d000bede63d45f504b6c27fc84534b4bf56fc019f2"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "base_campaign_id": "bigint", "ad_group_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "base_campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.0449011, "relation_name": "\"postgres\".\"public\".\"google_ads_ad_group_criterion_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.amazon_ads_portfolio_history_data": {"database": "postgres", "schema": "public", "name": "amazon_ads_portfolio_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "amazon_ads_portfolio_history_data.csv", "original_file_path": "seeds/amazon_ads_portfolio_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_portfolio_history_data", "fqn": ["ad_reporting_integration_tests", "amazon_ads_portfolio_history_data"], "alias": "amazon_ads_portfolio_history_data", "checksum": {"name": "sha256", "checksum": "f35ce3ea8cd6309e50535134b9375861995eb6cda4e215efc0b170cae03a3eee"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.048121, "relation_name": "\"postgres\".\"public\".\"amazon_ads_portfolio_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.apple_search_organization_data": {"database": "postgres", "schema": "public", "name": "apple_search_organization_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "apple_search_organization_data.csv", "original_file_path": "seeds/apple_search_organization_data.csv", "unique_id": "seed.ad_reporting_integration_tests.apple_search_organization_data", "fqn": ["ad_reporting_integration_tests", "apple_search_organization_data"], "alias": "apple_search_organization_data", "checksum": {"name": "sha256", "checksum": "bbb5878ab9c07bd1f391181a8321ea50476f37d25f36fd1d66e58d513336699c"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.0512161, "relation_name": "\"postgres\".\"public\".\"apple_search_organization_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.twitter_campaign_history_data": {"database": "postgres", "schema": "public", "name": "twitter_campaign_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "twitter_campaign_history_data.csv", "original_file_path": "seeds/twitter_campaign_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.twitter_campaign_history_data", "fqn": ["ad_reporting_integration_tests", "twitter_campaign_history_data"], "alias": "twitter_campaign_history_data", "checksum": {"name": "sha256", "checksum": "3d5c2b36e3c3bbbefb4a60469db1471ae01fe82c65d167bd062fb947d617b247"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.0544593, "relation_name": "\"postgres\".\"public\".\"twitter_campaign_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.linkedin_monthly_ad_analytics_by_member_region_data": {"database": "postgres", "schema": "public", "name": "linkedin_monthly_ad_analytics_by_member_region_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "linkedin_monthly_ad_analytics_by_member_region_data.csv", "original_file_path": "seeds/linkedin_monthly_ad_analytics_by_member_region_data.csv", "unique_id": "seed.ad_reporting_integration_tests.linkedin_monthly_ad_analytics_by_member_region_data", "fqn": ["ad_reporting_integration_tests", "linkedin_monthly_ad_analytics_by_member_region_data"], "alias": "linkedin_monthly_ad_analytics_by_member_region_data", "checksum": {"name": "sha256", "checksum": "b19d48623e7c44b6c8cee56674b210f34c1a3dc65aa5637fd72f0aa4da191686"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"cost_in_local_currency": "numeric", "cost_in_usd": "numeric"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"cost_in_local_currency": "numeric", "cost_in_usd": "numeric"}}, "created_at": 1783450495.057704, "relation_name": "\"postgres\".\"public\".\"linkedin_monthly_ad_analytics_by_member_region_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.apple_search_campaign_history_data": {"database": "postgres", "schema": "public", "name": "apple_search_campaign_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "apple_search_campaign_history_data.csv", "original_file_path": "seeds/apple_search_campaign_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.apple_search_campaign_history_data", "fqn": ["ad_reporting_integration_tests", "apple_search_campaign_history_data"], "alias": "apple_search_campaign_history_data", "checksum": {"name": "sha256", "checksum": "67a15ad12127dc164bd5fa76ea29db9ca3be5f483960039d16f24acc886fbe62"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp"}}, "created_at": 1783450495.0610013, "relation_name": "\"postgres\".\"public\".\"apple_search_campaign_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.pinterest_campaign_report_data": {"database": "postgres", "schema": "public", "name": "pinterest_campaign_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "pinterest_campaign_report_data.csv", "original_file_path": "seeds/pinterest_campaign_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.pinterest_campaign_report_data", "fqn": ["ad_reporting_integration_tests", "pinterest_campaign_report_data"], "alias": "pinterest_campaign_report_data", "checksum": {"name": "sha256", "checksum": "047f3d50be337f92c4385d27515012017b627cdf9834cecf020fa0b29ce2935d"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"campaign_id": "bigint", "advertiser_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"campaign_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "advertiser_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.0643263, "relation_name": "\"postgres\".\"public\".\"pinterest_campaign_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.snapchat_campaign_history_data": {"database": "postgres", "schema": "public", "name": "snapchat_campaign_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "snapchat_campaign_history_data.csv", "original_file_path": "seeds/snapchat_campaign_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.snapchat_campaign_history_data", "fqn": ["ad_reporting_integration_tests", "snapchat_campaign_history_data"], "alias": "snapchat_campaign_history_data", "checksum": {"name": "sha256", "checksum": "640eb2ec082938ad70c430a6b3441711f6fed19eb6e28d7622f03294e92e5b70"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.0676405, "relation_name": "\"postgres\".\"public\".\"snapchat_campaign_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.twitter_account_report_data": {"database": "postgres", "schema": "public", "name": "twitter_account_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "twitter_account_report_data.csv", "original_file_path": "seeds/twitter_account_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.twitter_account_report_data", "fqn": ["ad_reporting_integration_tests", "twitter_account_report_data"], "alias": "twitter_account_report_data", "checksum": {"name": "sha256", "checksum": "d1364362cbe48a00e05e628fac71d48e151ee2c5394b44c6000765ea069fa154"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.0707755, "relation_name": "\"postgres\".\"public\".\"twitter_account_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.microsoft_ads_account_history_data": {"database": "postgres", "schema": "public", "name": "microsoft_ads_account_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "microsoft_ads_account_history_data.csv", "original_file_path": "seeds/microsoft_ads_account_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_account_history_data", "fqn": ["ad_reporting_integration_tests", "microsoft_ads_account_history_data"], "alias": "microsoft_ads_account_history_data", "checksum": {"name": "sha256", "checksum": "282800342d5306132bdc208ee361599831ae8566b4639cd5c3bea492062e4b78"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"name": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"name": "{{ 'string' if target.type in ['bigquery','spark', 'databricks'] else 'varchar' }}"}}, "created_at": 1783450495.073955, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_account_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.snapchat_campaign_hourly_report_data": {"database": "postgres", "schema": "public", "name": "snapchat_campaign_hourly_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "snapchat_campaign_hourly_report_data.csv", "original_file_path": "seeds/snapchat_campaign_hourly_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.snapchat_campaign_hourly_report_data", "fqn": ["ad_reporting_integration_tests", "snapchat_campaign_hourly_report_data"], "alias": "snapchat_campaign_hourly_report_data", "checksum": {"name": "sha256", "checksum": "90145700bcd091f7cfe9fa88155e2473a36b674778ec51ed934c6876ec23e91f"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.0771315, "relation_name": "\"postgres\".\"public\".\"snapchat_campaign_hourly_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.facebook_ads_account_history_data": {"database": "postgres", "schema": "public", "name": "facebook_ads_account_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "facebook_ads_account_history_data.csv", "original_file_path": "seeds/facebook_ads_account_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_account_history_data", "fqn": ["ad_reporting_integration_tests", "facebook_ads_account_history_data"], "alias": "facebook_ads_account_history_data", "checksum": {"name": "sha256", "checksum": "92f318955a317f351b928ce94de43eae07f29dc3cadbd0f1a26e62fdba1dc4b1"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "name": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "name": "{{ 'string' if target.type in ['bigquery','spark', 'databricks'] else 'varchar' }}"}}, "created_at": 1783450495.0803237, "relation_name": "\"postgres\".\"public\".\"facebook_ads_account_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.apple_search_search_term_report_data": {"database": "postgres", "schema": "public", "name": "apple_search_search_term_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "apple_search_search_term_report_data.csv", "original_file_path": "seeds/apple_search_search_term_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.apple_search_search_term_report_data", "fqn": ["ad_reporting_integration_tests", "apple_search_search_term_report_data"], "alias": "apple_search_search_term_report_data", "checksum": {"name": "sha256", "checksum": "add5f0a4ebd076182acceb2710596c581a32c7aa738b57bc1bdda58cc8013f4d"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.083615, "relation_name": "\"postgres\".\"public\".\"apple_search_search_term_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.linkedin_monthly_ad_analytics_by_member_country_data": {"database": "postgres", "schema": "public", "name": "linkedin_monthly_ad_analytics_by_member_country_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "linkedin_monthly_ad_analytics_by_member_country_data.csv", "original_file_path": "seeds/linkedin_monthly_ad_analytics_by_member_country_data.csv", "unique_id": "seed.ad_reporting_integration_tests.linkedin_monthly_ad_analytics_by_member_country_data", "fqn": ["ad_reporting_integration_tests", "linkedin_monthly_ad_analytics_by_member_country_data"], "alias": "linkedin_monthly_ad_analytics_by_member_country_data", "checksum": {"name": "sha256", "checksum": "19558c13da1351432b3c99c154c10436b047f101efdfd26ccd884b4bb0983e23"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"cost_in_local_currency": "numeric", "cost_in_usd": "numeric"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"cost_in_local_currency": "numeric", "cost_in_usd": "numeric"}}, "created_at": 1783450495.0868087, "relation_name": "\"postgres\".\"public\".\"linkedin_monthly_ad_analytics_by_member_country_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.twitter_promoted_tweet_history_data": {"database": "postgres", "schema": "public", "name": "twitter_promoted_tweet_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "twitter_promoted_tweet_history_data.csv", "original_file_path": "seeds/twitter_promoted_tweet_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.twitter_promoted_tweet_history_data", "fqn": ["ad_reporting_integration_tests", "twitter_promoted_tweet_history_data"], "alias": "twitter_promoted_tweet_history_data", "checksum": {"name": "sha256", "checksum": "ec5e3be3c75b17b07893e9e7c21a4e0b8d5a820a73d3306fd94ec59935714690"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"tweet_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"tweet_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.0900726, "relation_name": "\"postgres\".\"public\".\"twitter_promoted_tweet_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.microsoft_ads_search_performance_daily_report_data": {"database": "postgres", "schema": "public", "name": "microsoft_ads_search_performance_daily_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "microsoft_ads_search_performance_daily_report_data.csv", "original_file_path": "seeds/microsoft_ads_search_performance_daily_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_search_performance_daily_report_data", "fqn": ["ad_reporting_integration_tests", "microsoft_ads_search_performance_daily_report_data"], "alias": "microsoft_ads_search_performance_daily_report_data", "checksum": {"name": "sha256", "checksum": "cfca4231aed334aed35468aa7062db63e1c93cf514a26311ab1dd4b68991c32c"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "bigint", "campaign_id": "bigint", "ad_group_id": "bigint", "ad_id": "bigint", "keyword_id": "bigint", "spend": "float"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "keyword_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "spend": "float"}}, "created_at": 1783450495.0934067, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_search_performance_daily_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_campaign_report_data": {"database": "postgres", "schema": "public", "name": "reddit_ads_campaign_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_campaign_report_data.csv", "original_file_path": "seeds/reddit_ads_campaign_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_campaign_report_data", "fqn": ["ad_reporting_integration_tests", "reddit_ads_campaign_report_data"], "alias": "reddit_ads_campaign_report_data", "checksum": {"name": "sha256", "checksum": "73d181faba6c8451dcb1b7cc04f028642990fd68fbd13c2e84f952f0fa1b424e"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "varchar(255)", "campaign_id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}", "campaign_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783450495.0968497, "relation_name": "\"postgres\".\"public\".\"reddit_ads_campaign_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.facebook_ads_demographics_region_actions_data": {"database": "postgres", "schema": "public", "name": "facebook_ads_demographics_region_actions_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "facebook_ads_demographics_region_actions_data.csv", "original_file_path": "seeds/facebook_ads_demographics_region_actions_data.csv", "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_demographics_region_actions_data", "fqn": ["ad_reporting_integration_tests", "facebook_ads_demographics_region_actions_data"], "alias": "facebook_ads_demographics_region_actions_data", "checksum": {"name": "sha256", "checksum": "f0035514fc50a70b1fc9c381f76dae211c6af46f0918bc2faeeb0c64a55fca86"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"value": "float", "account_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"value": "float", "account_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.1001518, "relation_name": "\"postgres\".\"public\".\"facebook_ads_demographics_region_actions_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.twitter_campaign_regions_report_data": {"database": "postgres", "schema": "public", "name": "twitter_campaign_regions_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "twitter_campaign_regions_report_data.csv", "original_file_path": "seeds/twitter_campaign_regions_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.twitter_campaign_regions_report_data", "fqn": ["ad_reporting_integration_tests", "twitter_campaign_regions_report_data"], "alias": "twitter_campaign_regions_report_data", "checksum": {"name": "sha256", "checksum": "2dfd7bcf02925a8c7c922b70298fa1fc36a18991ac0e54b3c6e7170657766fbe"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.1033547, "relation_name": "\"postgres\".\"public\".\"twitter_campaign_regions_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_campaign_country_conversions_report_data": {"database": "postgres", "schema": "public", "name": "reddit_ads_campaign_country_conversions_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_campaign_country_conversions_report_data.csv", "original_file_path": "seeds/reddit_ads_campaign_country_conversions_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_campaign_country_conversions_report_data", "fqn": ["ad_reporting_integration_tests", "reddit_ads_campaign_country_conversions_report_data"], "alias": "reddit_ads_campaign_country_conversions_report_data", "checksum": {"name": "sha256", "checksum": "5959f914e44cb2fa507bf4b6ccd688949fd3eab4d22a37cd1bbc2f556d872c1a"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "varchar(255)", "campaign_id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}", "campaign_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783450495.1065922, "relation_name": "\"postgres\".\"public\".\"reddit_ads_campaign_country_conversions_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_search_term_keyword_stats_data": {"database": "postgres", "schema": "public", "name": "google_ads_search_term_keyword_stats_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_search_term_keyword_stats_data.csv", "original_file_path": "seeds/google_ads_search_term_keyword_stats_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_search_term_keyword_stats_data", "fqn": ["ad_reporting_integration_tests", "google_ads_search_term_keyword_stats_data"], "alias": "google_ads_search_term_keyword_stats_data", "checksum": {"name": "sha256", "checksum": "a4622d48da3123b5911e71c541e8ae6688986412895b4b7e5c5a4f0076a1de32"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"ad_group_id": "bigint", "customer_id": "bigint", "campaign_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"ad_group_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "customer_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.1098773, "relation_name": "\"postgres\".\"public\".\"google_ads_search_term_keyword_stats_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.snapchat_ad_history_data": {"database": "postgres", "schema": "public", "name": "snapchat_ad_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "snapchat_ad_history_data.csv", "original_file_path": "seeds/snapchat_ad_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.snapchat_ad_history_data", "fqn": ["ad_reporting_integration_tests", "snapchat_ad_history_data"], "alias": "snapchat_ad_history_data", "checksum": {"name": "sha256", "checksum": "839c0910ff6ff3cff2580bd9144223132dd1d87f003aeea329e47ba858a2dc23"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.1131573, "relation_name": "\"postgres\".\"public\".\"snapchat_ad_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_ad_report_data": {"database": "postgres", "schema": "public", "name": "reddit_ads_ad_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_ad_report_data.csv", "original_file_path": "seeds/reddit_ads_ad_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_ad_report_data", "fqn": ["ad_reporting_integration_tests", "reddit_ads_ad_report_data"], "alias": "reddit_ads_ad_report_data", "checksum": {"name": "sha256", "checksum": "14c3bf5b4e2b66f5971ba77839d88bdabbef2a61b57a373335303973d27d5d33"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "varchar(255)", "ad_id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}", "ad_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783450495.116357, "relation_name": "\"postgres\".\"public\".\"reddit_ads_ad_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_campaign_bidding_strategy_history_data": {"database": "postgres", "schema": "public", "name": "google_ads_campaign_bidding_strategy_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_campaign_bidding_strategy_history_data.csv", "original_file_path": "seeds/google_ads_campaign_bidding_strategy_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_campaign_bidding_strategy_history_data", "fqn": ["ad_reporting_integration_tests", "google_ads_campaign_bidding_strategy_history_data"], "alias": "google_ads_campaign_bidding_strategy_history_data", "checksum": {"name": "sha256", "checksum": "1ff6557e91357c6b0cab43955a219229ead32acd59041553883a53a2fd03de64"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"campaign_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.119642, "relation_name": "\"postgres\".\"public\".\"google_ads_campaign_bidding_strategy_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_campaign_budget_history_data": {"database": "postgres", "schema": "public", "name": "google_ads_campaign_budget_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_campaign_budget_history_data.csv", "original_file_path": "seeds/google_ads_campaign_budget_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_campaign_budget_history_data", "fqn": ["ad_reporting_integration_tests", "google_ads_campaign_budget_history_data"], "alias": "google_ads_campaign_budget_history_data", "checksum": {"name": "sha256", "checksum": "b9a93b7679f9d4cecb51e8ed0e62790395550e378560dd4e61cc288fd7cb9577"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "campaign_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.1229138, "relation_name": "\"postgres\".\"public\".\"google_ads_campaign_budget_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_ad_conversions": {"database": "postgres", "schema": "public", "name": "reddit_ads_ad_conversions", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_ad_conversions.csv", "original_file_path": "seeds/reddit_ads_ad_conversions.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_ad_conversions", "fqn": ["ad_reporting_integration_tests", "reddit_ads_ad_conversions"], "alias": "reddit_ads_ad_conversions", "checksum": {"name": "sha256", "checksum": "f8dc29b5b9935791c50d28c5e986c6a02a96e518997a32f49cf6eac4cdac1131"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "varchar(255)", "ad_id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}", "ad_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783450495.1263766, "relation_name": "\"postgres\".\"public\".\"reddit_ads_ad_conversions\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.tiktok_location_data": {"database": "postgres", "schema": "public", "name": "tiktok_location_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "tiktok_location_data.csv", "original_file_path": "seeds/tiktok_location_data.csv", "unique_id": "seed.ad_reporting_integration_tests.tiktok_location_data", "fqn": ["ad_reporting_integration_tests", "tiktok_location_data"], "alias": "tiktok_location_data", "checksum": {"name": "sha256", "checksum": "11b0d0525a88b79939364e96c1b93a2043887b476fffa452ba3d319a770a11ce"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.1296346, "relation_name": "\"postgres\".\"public\".\"tiktok_location_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.pinterest_advertiser_report_data": {"database": "postgres", "schema": "public", "name": "pinterest_advertiser_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "pinterest_advertiser_report_data.csv", "original_file_path": "seeds/pinterest_advertiser_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.pinterest_advertiser_report_data", "fqn": ["ad_reporting_integration_tests", "pinterest_advertiser_report_data"], "alias": "pinterest_advertiser_report_data", "checksum": {"name": "sha256", "checksum": "a99af28ad8c13e82c3a8693cdf7dbda30af34de7c8ddaabe887e0944c22776fa"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"advertiser_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"advertiser_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.1328173, "relation_name": "\"postgres\".\"public\".\"pinterest_advertiser_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.snapchat_ad_squad_history_data": {"database": "postgres", "schema": "public", "name": "snapchat_ad_squad_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "snapchat_ad_squad_history_data.csv", "original_file_path": "seeds/snapchat_ad_squad_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.snapchat_ad_squad_history_data", "fqn": ["ad_reporting_integration_tests", "snapchat_ad_squad_history_data"], "alias": "snapchat_ad_squad_history_data", "checksum": {"name": "sha256", "checksum": "0e83ca691f2153480e7b63173f1c7ed8c38c0dc247d41a6f2fd46afc1e5963b1"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.1360357, "relation_name": "\"postgres\".\"public\".\"snapchat_ad_squad_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.twitter_tweet_url_data": {"database": "postgres", "schema": "public", "name": "twitter_tweet_url_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "twitter_tweet_url_data.csv", "original_file_path": "seeds/twitter_tweet_url_data.csv", "unique_id": "seed.ad_reporting_integration_tests.twitter_tweet_url_data", "fqn": ["ad_reporting_integration_tests", "twitter_tweet_url_data"], "alias": "twitter_tweet_url_data", "checksum": {"name": "sha256", "checksum": "b8d1d342fc9dbfa624f40d04facabf144039ecdb099b6a8d6b4232c980b80896"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"tweet_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"tweet_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.1392064, "relation_name": "\"postgres\".\"public\".\"twitter_tweet_url_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.linkedin_ad_creative_history_data": {"database": "postgres", "schema": "public", "name": "linkedin_ad_creative_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "linkedin_ad_creative_history_data.csv", "original_file_path": "seeds/linkedin_ad_creative_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.linkedin_ad_creative_history_data", "fqn": ["ad_reporting_integration_tests", "linkedin_ad_creative_history_data"], "alias": "linkedin_ad_creative_history_data", "checksum": {"name": "sha256", "checksum": "f505b76fba655f34214388f03f53ccfb83225b27d502874865d4daef6954fde8"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"created_time": "timestamp", "intended_status": "varchar", "last_modified_at": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"created_time": "timestamp", "intended_status": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar' }}", "last_modified_at": "timestamp"}}, "created_at": 1783450495.1426215, "relation_name": "\"postgres\".\"public\".\"linkedin_ad_creative_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.amazon_ads_search_term_ad_keyword_report_data": {"database": "postgres", "schema": "public", "name": "amazon_ads_search_term_ad_keyword_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "amazon_ads_search_term_ad_keyword_report_data.csv", "original_file_path": "seeds/amazon_ads_search_term_ad_keyword_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_search_term_ad_keyword_report_data", "fqn": ["ad_reporting_integration_tests", "amazon_ads_search_term_ad_keyword_report_data"], "alias": "amazon_ads_search_term_ad_keyword_report_data", "checksum": {"name": "sha256", "checksum": "72e0151237f3fc67bea3d517f7ef50c94ce494d2c0017fced4e1287623639722"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "campaign_budget_amount": "float", "keyword_bid": "float"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"_fivetran_synced": "timestamp", "campaign_budget_amount": "float", "keyword_bid": "float"}}, "created_at": 1783450495.1459332, "relation_name": "\"postgres\".\"public\".\"amazon_ads_search_term_ad_keyword_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.microsoft_ads_ad_group_history_data": {"database": "postgres", "schema": "public", "name": "microsoft_ads_ad_group_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "microsoft_ads_ad_group_history_data.csv", "original_file_path": "seeds/microsoft_ads_ad_group_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_ad_group_history_data", "fqn": ["ad_reporting_integration_tests", "microsoft_ads_ad_group_history_data"], "alias": "microsoft_ads_ad_group_history_data", "checksum": {"name": "sha256", "checksum": "6ec441a72afc08dbb3fc86b36eef0fe6926e2ff19ff3b3f77847fb0697a24c12"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "campaign_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.1492116, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_ad_group_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.facebook_ads_demographics_region_data": {"database": "postgres", "schema": "public", "name": "facebook_ads_demographics_region_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "facebook_ads_demographics_region_data.csv", "original_file_path": "seeds/facebook_ads_demographics_region_data.csv", "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_demographics_region_data", "fqn": ["ad_reporting_integration_tests", "facebook_ads_demographics_region_data"], "alias": "facebook_ads_demographics_region_data", "checksum": {"name": "sha256", "checksum": "5aef14230a97cdedea2acf6185654a97c8fe0e0617c72cc1f9ab3f197bc12b8c"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.152472, "relation_name": "\"postgres\".\"public\".\"facebook_ads_demographics_region_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.microsoft_ads_ad_performance_daily_report_data": {"database": "postgres", "schema": "public", "name": "microsoft_ads_ad_performance_daily_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "microsoft_ads_ad_performance_daily_report_data.csv", "original_file_path": "seeds/microsoft_ads_ad_performance_daily_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_ad_performance_daily_report_data", "fqn": ["ad_reporting_integration_tests", "microsoft_ads_ad_performance_daily_report_data"], "alias": "microsoft_ads_ad_performance_daily_report_data", "checksum": {"name": "sha256", "checksum": "2604c0155fbc98a0fba96b1c3805547be469d6b740f9f9b0763bdc55b7b01443"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "bigint", "campaign_id": "bigint", "ad_group_id": "bigint", "ad_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.155846, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_ad_performance_daily_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.apple_search_keyword_history_data": {"database": "postgres", "schema": "public", "name": "apple_search_keyword_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "apple_search_keyword_history_data.csv", "original_file_path": "seeds/apple_search_keyword_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.apple_search_keyword_history_data", "fqn": ["ad_reporting_integration_tests", "apple_search_keyword_history_data"], "alias": "apple_search_keyword_history_data", "checksum": {"name": "sha256", "checksum": "a6d53cd4951594b21214e60bf51503907ee364eac04c7d24a19dc490cc7d818c"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"modification_time": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"modification_time": "timestamp"}}, "created_at": 1783450495.1591458, "relation_name": "\"postgres\".\"public\".\"apple_search_keyword_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_account_data": {"database": "postgres", "schema": "public", "name": "reddit_ads_account_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_account_data.csv", "original_file_path": "seeds/reddit_ads_account_data.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_account_data", "fqn": ["ad_reporting_integration_tests", "reddit_ads_account_data"], "alias": "reddit_ads_account_data", "checksum": {"name": "sha256", "checksum": "4d672f0080db8e51bd896c8fe9a56a0f2e6cb4fe175ae3a55713449532cd6a67"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783450495.1624177, "relation_name": "\"postgres\".\"public\".\"reddit_ads_account_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.linkedin_ad_campaign_group_history_data": {"database": "postgres", "schema": "public", "name": "linkedin_ad_campaign_group_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "linkedin_ad_campaign_group_history_data.csv", "original_file_path": "seeds/linkedin_ad_campaign_group_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.linkedin_ad_campaign_group_history_data", "fqn": ["ad_reporting_integration_tests", "linkedin_ad_campaign_group_history_data"], "alias": "linkedin_ad_campaign_group_history_data", "checksum": {"name": "sha256", "checksum": "48aeff219340dccafbdb2de6c0086e94cca22a741c15ad8ce23f1e207fa15fd2"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"created_time": "timestamp", "last_modified_time": "timestamp", "account_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"created_time": "timestamp", "last_modified_time": "timestamp", "account_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.1657007, "relation_name": "\"postgres\".\"public\".\"linkedin_ad_campaign_group_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.microsoft_ads_keyword_performance_daily_report_data": {"database": "postgres", "schema": "public", "name": "microsoft_ads_keyword_performance_daily_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "microsoft_ads_keyword_performance_daily_report_data.csv", "original_file_path": "seeds/microsoft_ads_keyword_performance_daily_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_keyword_performance_daily_report_data", "fqn": ["ad_reporting_integration_tests", "microsoft_ads_keyword_performance_daily_report_data"], "alias": "microsoft_ads_keyword_performance_daily_report_data", "checksum": {"name": "sha256", "checksum": "480b49ad514d8c5d9021bce2cfcef259a8ee3d9123b12314e1a63c670cc37688"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "bigint", "campaign_id": "bigint", "ad_group_id": "bigint", "ad_id": "bigint", "keyword_id": "bigint", "spend": "float"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "keyword_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "spend": "float"}}, "created_at": 1783450495.1690264, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_keyword_performance_daily_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_ad_group_history_data": {"database": "postgres", "schema": "public", "name": "google_ads_ad_group_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_ad_group_history_data.csv", "original_file_path": "seeds/google_ads_ad_group_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_ad_group_history_data", "fqn": ["ad_reporting_integration_tests", "google_ads_ad_group_history_data"], "alias": "google_ads_ad_group_history_data", "checksum": {"name": "sha256", "checksum": "82518353626bed4214f1dea514b77c97c96da2e4c7253734c3268e55111e67ce"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"campaign_id": "bigint", "id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.1724627, "relation_name": "\"postgres\".\"public\".\"google_ads_ad_group_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.amazon_ads_profile_data": {"database": "postgres", "schema": "public", "name": "amazon_ads_profile_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "amazon_ads_profile_data.csv", "original_file_path": "seeds/amazon_ads_profile_data.csv", "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_profile_data", "fqn": ["ad_reporting_integration_tests", "amazon_ads_profile_data"], "alias": "amazon_ads_profile_data", "checksum": {"name": "sha256", "checksum": "bf98315483844e348320dc4d774059cb5229ef48b495aebace17dd04520d160b"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.1756556, "relation_name": "\"postgres\".\"public\".\"amazon_ads_profile_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.pinterest_campaign_history_data": {"database": "postgres", "schema": "public", "name": "pinterest_campaign_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "pinterest_campaign_history_data.csv", "original_file_path": "seeds/pinterest_campaign_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.pinterest_campaign_history_data", "fqn": ["ad_reporting_integration_tests", "pinterest_campaign_history_data"], "alias": "pinterest_campaign_history_data", "checksum": {"name": "sha256", "checksum": "6ffcb6b6cd42022cfd0189ef3d54920158b7b45db1dffdf47463731ad14c4ec0"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "advertiser_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "advertiser_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.1788454, "relation_name": "\"postgres\".\"public\".\"pinterest_campaign_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.twitter_line_item_report_data": {"database": "postgres", "schema": "public", "name": "twitter_line_item_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "twitter_line_item_report_data.csv", "original_file_path": "seeds/twitter_line_item_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.twitter_line_item_report_data", "fqn": ["ad_reporting_integration_tests", "twitter_line_item_report_data"], "alias": "twitter_line_item_report_data", "checksum": {"name": "sha256", "checksum": "4cef1efaf56e236366e68ccc814c5da3ddf3d2504ab3f156d5f4da1918c0bed6"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.1820316, "relation_name": "\"postgres\".\"public\".\"twitter_line_item_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_campaign_stats_data": {"database": "postgres", "schema": "public", "name": "google_ads_campaign_stats_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_campaign_stats_data.csv", "original_file_path": "seeds/google_ads_campaign_stats_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_campaign_stats_data", "fqn": ["ad_reporting_integration_tests", "google_ads_campaign_stats_data"], "alias": "google_ads_campaign_stats_data", "checksum": {"name": "sha256", "checksum": "f8ffb40c33a31cdd4185ed5e956cfdaff9736054806ef3f9da5cf6f036ef7d0d"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"customer_id": "bigint", "id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"customer_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.1853082, "relation_name": "\"postgres\".\"public\".\"google_ads_campaign_stats_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.twitter_line_item_history_data": {"database": "postgres", "schema": "public", "name": "twitter_line_item_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "twitter_line_item_history_data.csv", "original_file_path": "seeds/twitter_line_item_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.twitter_line_item_history_data", "fqn": ["ad_reporting_integration_tests", "twitter_line_item_history_data"], "alias": "twitter_line_item_history_data", "checksum": {"name": "sha256", "checksum": "e7c5ac79c6915f530670f98c6f7cd9ad80be52a5b2c5bd810ad3fff6c7041bd2"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.1885712, "relation_name": "\"postgres\".\"public\".\"twitter_line_item_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_ad_stats_data": {"database": "postgres", "schema": "public", "name": "google_ads_ad_stats_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_ad_stats_data.csv", "original_file_path": "seeds/google_ads_ad_stats_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_ad_stats_data", "fqn": ["ad_reporting_integration_tests", "google_ads_ad_stats_data"], "alias": "google_ads_ad_stats_data", "checksum": {"name": "sha256", "checksum": "417738f961255266f49a15548d2e7b278713c32c28c766b10b9d038613cf35fb"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"customer_id": "bigint", "ad_id": "bigint", "campaign_id": "bigint", "ad_group_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"customer_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.1918104, "relation_name": "\"postgres\".\"public\".\"google_ads_ad_stats_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_account_conversions": {"database": "postgres", "schema": "public", "name": "reddit_ads_account_conversions", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_account_conversions.csv", "original_file_path": "seeds/reddit_ads_account_conversions.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_account_conversions", "fqn": ["ad_reporting_integration_tests", "reddit_ads_account_conversions"], "alias": "reddit_ads_account_conversions", "checksum": {"name": "sha256", "checksum": "4eb70e9496b0dcf31186020f33f9d19c67576af11b0e6c46300ffa2dde4e286a"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783450495.1951036, "relation_name": "\"postgres\".\"public\".\"reddit_ads_account_conversions\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_account_stats_data": {"database": "postgres", "schema": "public", "name": "google_ads_account_stats_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_account_stats_data.csv", "original_file_path": "seeds/google_ads_account_stats_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_account_stats_data", "fqn": ["ad_reporting_integration_tests", "google_ads_account_stats_data"], "alias": "google_ads_account_stats_data", "checksum": {"name": "sha256", "checksum": "d6b21f0858465ed0937e45a56e864fa023280d4e9a343e3e8442764386717ff7"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.1982796, "relation_name": "\"postgres\".\"public\".\"google_ads_account_stats_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.snapchat_campaign_geo_country_daily_report_data": {"database": "postgres", "schema": "public", "name": "snapchat_campaign_geo_country_daily_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "snapchat_campaign_geo_country_daily_report_data.csv", "original_file_path": "seeds/snapchat_campaign_geo_country_daily_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.snapchat_campaign_geo_country_daily_report_data", "fqn": ["ad_reporting_integration_tests", "snapchat_campaign_geo_country_daily_report_data"], "alias": "snapchat_campaign_geo_country_daily_report_data", "checksum": {"name": "sha256", "checksum": "af259d9acfb0b0f341d54d23c5adc6e8ab0a5e367fbb0a2e452ec175066f78c3"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.2014785, "relation_name": "\"postgres\".\"public\".\"snapchat_campaign_geo_country_daily_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.microsoft_ads_ad_group_performance_daily_report_data": {"database": "postgres", "schema": "public", "name": "microsoft_ads_ad_group_performance_daily_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "microsoft_ads_ad_group_performance_daily_report_data.csv", "original_file_path": "seeds/microsoft_ads_ad_group_performance_daily_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_ad_group_performance_daily_report_data", "fqn": ["ad_reporting_integration_tests", "microsoft_ads_ad_group_performance_daily_report_data"], "alias": "microsoft_ads_ad_group_performance_daily_report_data", "checksum": {"name": "sha256", "checksum": "d61e016b59c5195471adaeb79fccfad355d611af16f7f301f4754dc14d4e7aad"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "bigint", "campaign_id": "bigint", "ad_group_id": "bigint", "spend": "float"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "spend": "float"}}, "created_at": 1783450495.2046843, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_ad_group_performance_daily_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.amazon_ads_product_ad_history_data": {"database": "postgres", "schema": "public", "name": "amazon_ads_product_ad_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "amazon_ads_product_ad_history_data.csv", "original_file_path": "seeds/amazon_ads_product_ad_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_product_ad_history_data", "fqn": ["ad_reporting_integration_tests", "amazon_ads_product_ad_history_data"], "alias": "amazon_ads_product_ad_history_data", "checksum": {"name": "sha256", "checksum": "7efed04b5599f1f2a4e8db33b56eb1f43c6ed27a77a504c7f8b7d628aac37749"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.207886, "relation_name": "\"postgres\".\"public\".\"amazon_ads_product_ad_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.microsoft_ads_ad_history_data": {"database": "postgres", "schema": "public", "name": "microsoft_ads_ad_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "microsoft_ads_ad_history_data.csv", "original_file_path": "seeds/microsoft_ads_ad_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_ad_history_data", "fqn": ["ad_reporting_integration_tests", "microsoft_ads_ad_history_data"], "alias": "microsoft_ads_ad_history_data", "checksum": {"name": "sha256", "checksum": "a8362c38b31cc6baf6c67809ddc20dc7fe47ffeb49e49d9ee44e2236a7f2db86"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "ad_group_id": "bigint", "modified_time": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "modified_time": "timestamp"}}, "created_at": 1783450495.21106, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_ad_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_campaign_country_report_data": {"database": "postgres", "schema": "public", "name": "reddit_ads_campaign_country_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_campaign_country_report_data.csv", "original_file_path": "seeds/reddit_ads_campaign_country_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_campaign_country_report_data", "fqn": ["ad_reporting_integration_tests", "reddit_ads_campaign_country_report_data"], "alias": "reddit_ads_campaign_country_report_data", "checksum": {"name": "sha256", "checksum": "05af71513b9c24fbb69372f27ad8d73ed815d75a03cfa01e59c7a4ce3a7e124f"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "varchar(255)", "campaign_id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}", "campaign_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783450495.2145529, "relation_name": "\"postgres\".\"public\".\"reddit_ads_campaign_country_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.facebook_ads_ad_history_data": {"database": "postgres", "schema": "public", "name": "facebook_ads_ad_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "facebook_ads_ad_history_data.csv", "original_file_path": "seeds/facebook_ads_ad_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_ad_history_data", "fqn": ["ad_reporting_integration_tests", "facebook_ads_ad_history_data"], "alias": "facebook_ads_ad_history_data", "checksum": {"name": "sha256", "checksum": "95c960d78745b1652034ba4da5cc2a7d5b923e816a81c90360f1b28588b7befd"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "account_id": "bigint", "ad_set_id": "bigint", "campaign_id": "bigint", "creative_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "account_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "ad_set_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "creative_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.2178595, "relation_name": "\"postgres\".\"public\".\"facebook_ads_ad_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.pinterest_ad_group_report_data": {"database": "postgres", "schema": "public", "name": "pinterest_ad_group_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "pinterest_ad_group_report_data.csv", "original_file_path": "seeds/pinterest_ad_group_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.pinterest_ad_group_report_data", "fqn": ["ad_reporting_integration_tests", "pinterest_ad_group_report_data"], "alias": "pinterest_ad_group_report_data", "checksum": {"name": "sha256", "checksum": "ca2133d8c675b7b10abe2ba021f5dced5769f7469bc9ed910929ed564f9e33d3"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"campaign_id": "bigint", "ad_group_id": "bigint", "advertiser_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"campaign_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "advertiser_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.2211564, "relation_name": "\"postgres\".\"public\".\"pinterest_ad_group_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.twitter_campaign_report_data": {"database": "postgres", "schema": "public", "name": "twitter_campaign_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "twitter_campaign_report_data.csv", "original_file_path": "seeds/twitter_campaign_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.twitter_campaign_report_data", "fqn": ["ad_reporting_integration_tests", "twitter_campaign_report_data"], "alias": "twitter_campaign_report_data", "checksum": {"name": "sha256", "checksum": "bb3bdaea68e1bc903cb5b3a3e507926b43009e0f52ec2f867a97e7276cef81bb"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.2243176, "relation_name": "\"postgres\".\"public\".\"twitter_campaign_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.facebook_ads_ad_set_history_data": {"database": "postgres", "schema": "public", "name": "facebook_ads_ad_set_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "facebook_ads_ad_set_history_data.csv", "original_file_path": "seeds/facebook_ads_ad_set_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_ad_set_history_data", "fqn": ["ad_reporting_integration_tests", "facebook_ads_ad_set_history_data"], "alias": "facebook_ads_ad_set_history_data", "checksum": {"name": "sha256", "checksum": "da4e6b48f3feaa4bd2c3783b125909a14c5317b3c1484b4f6af5d7c1d88f5bd7"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "account_id": "bigint", "campaign_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "account_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.227507, "relation_name": "\"postgres\".\"public\".\"facebook_ads_ad_set_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.snapchat_campaign_geo_region_daily_report_data": {"database": "postgres", "schema": "public", "name": "snapchat_campaign_geo_region_daily_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "snapchat_campaign_geo_region_daily_report_data.csv", "original_file_path": "seeds/snapchat_campaign_geo_region_daily_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.snapchat_campaign_geo_region_daily_report_data", "fqn": ["ad_reporting_integration_tests", "snapchat_campaign_geo_region_daily_report_data"], "alias": "snapchat_campaign_geo_region_daily_report_data", "checksum": {"name": "sha256", "checksum": "38911055198ead8cd7d5ddbc08d9e1cacabc92916c41a38d1dd8d845f5859dc6"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.2307603, "relation_name": "\"postgres\".\"public\".\"snapchat_campaign_geo_region_daily_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.pinterest_pin_promotion_history_data": {"database": "postgres", "schema": "public", "name": "pinterest_pin_promotion_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "pinterest_pin_promotion_history_data.csv", "original_file_path": "seeds/pinterest_pin_promotion_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.pinterest_pin_promotion_history_data", "fqn": ["ad_reporting_integration_tests", "pinterest_pin_promotion_history_data"], "alias": "pinterest_pin_promotion_history_data", "checksum": {"name": "sha256", "checksum": "ac9ca6b81cebffa2e22e24f03afe41f6e31dd683b1532df5a40fcb7700a2d854"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "ad_group_id": "bigint", "pin_id": "bigint", "ad_account_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "pin_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "ad_account_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.2339678, "relation_name": "\"postgres\".\"public\".\"pinterest_pin_promotion_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.amazon_ads_ad_group_level_report_data": {"database": "postgres", "schema": "public", "name": "amazon_ads_ad_group_level_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "amazon_ads_ad_group_level_report_data.csv", "original_file_path": "seeds/amazon_ads_ad_group_level_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_ad_group_level_report_data", "fqn": ["ad_reporting_integration_tests", "amazon_ads_ad_group_level_report_data"], "alias": "amazon_ads_ad_group_level_report_data", "checksum": {"name": "sha256", "checksum": "b8d7399c22df2187d6518c6db0d9125b6c93172cf23200a8cbc365d43532d2ba"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.237157, "relation_name": "\"postgres\".\"public\".\"amazon_ads_ad_group_level_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.twitter_line_item_keywords_report_data": {"database": "postgres", "schema": "public", "name": "twitter_line_item_keywords_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "twitter_line_item_keywords_report_data.csv", "original_file_path": "seeds/twitter_line_item_keywords_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.twitter_line_item_keywords_report_data", "fqn": ["ad_reporting_integration_tests", "twitter_line_item_keywords_report_data"], "alias": "twitter_line_item_keywords_report_data", "checksum": {"name": "sha256", "checksum": "80107d8a67ce63a986c2e1a4d7af8d1e6572053a11e20e7df98f5d42e0da690e"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.240261, "relation_name": "\"postgres\".\"public\".\"twitter_line_item_keywords_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.twitter_tweet_data": {"database": "postgres", "schema": "public", "name": "twitter_tweet_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "twitter_tweet_data.csv", "original_file_path": "seeds/twitter_tweet_data.csv", "unique_id": "seed.ad_reporting_integration_tests.twitter_tweet_data", "fqn": ["ad_reporting_integration_tests", "twitter_tweet_data"], "alias": "twitter_tweet_data", "checksum": {"name": "sha256", "checksum": "7e28de3484a806b3428f4898e035364e2a282ef5819cfe895f8c94f6455e726f"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.2434418, "relation_name": "\"postgres\".\"public\".\"twitter_tweet_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.tiktok_campaign_country_report_data": {"database": "postgres", "schema": "public", "name": "tiktok_campaign_country_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "tiktok_campaign_country_report_data.csv", "original_file_path": "seeds/tiktok_campaign_country_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.tiktok_campaign_country_report_data", "fqn": ["ad_reporting_integration_tests", "tiktok_campaign_country_report_data"], "alias": "tiktok_campaign_country_report_data", "checksum": {"name": "sha256", "checksum": "7139e115150333f6e01069b15397e98ef2ce066ae81c9ea881faa47b159773a0"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.2466383, "relation_name": "\"postgres\".\"public\".\"tiktok_campaign_country_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.facebook_ads_creative_history_data": {"database": "postgres", "schema": "public", "name": "facebook_ads_creative_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "facebook_ads_creative_history_data.csv", "original_file_path": "seeds/facebook_ads_creative_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_creative_history_data", "fqn": ["ad_reporting_integration_tests", "facebook_ads_creative_history_data"], "alias": "facebook_ads_creative_history_data", "checksum": {"name": "path", "checksum": "seeds/facebook_ads_creative_history_data.csv"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"page_link": "varchar", "template_page_link": "varchar", "id": "bigint", "account_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"page_link": "{{ 'string' if target.type in ['bigquery','spark', 'databricks'] else 'varchar' }}", "template_page_link": "{{ 'string' if target.type in ['bigquery','spark', 'databricks'] else 'varchar' }}", "id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "account_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.2498345, "relation_name": "\"postgres\".\"public\".\"facebook_ads_creative_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.facebook_ads_campaign_history_data": {"database": "postgres", "schema": "public", "name": "facebook_ads_campaign_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "facebook_ads_campaign_history_data.csv", "original_file_path": "seeds/facebook_ads_campaign_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_campaign_history_data", "fqn": ["ad_reporting_integration_tests", "facebook_ads_campaign_history_data"], "alias": "facebook_ads_campaign_history_data", "checksum": {"name": "sha256", "checksum": "1dfd8244efe7c32be5fb93c8417575d79670225092a28cab9da03d0ad7773432"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "account_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "account_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.2531004, "relation_name": "\"postgres\".\"public\".\"facebook_ads_campaign_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.amazon_ads_campaign_level_report_data": {"database": "postgres", "schema": "public", "name": "amazon_ads_campaign_level_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "amazon_ads_campaign_level_report_data.csv", "original_file_path": "seeds/amazon_ads_campaign_level_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_campaign_level_report_data", "fqn": ["ad_reporting_integration_tests", "amazon_ads_campaign_level_report_data"], "alias": "amazon_ads_campaign_level_report_data", "checksum": {"name": "sha256", "checksum": "12c4efc842123e0085f28a11922eba7cb83bd04770a5657c839a8a7b048a9616"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "campaign_budget_amount": "float"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"_fivetran_synced": "timestamp", "campaign_budget_amount": "float"}}, "created_at": 1783450495.2599468, "relation_name": "\"postgres\".\"public\".\"amazon_ads_campaign_level_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_ad_group_stats_data": {"database": "postgres", "schema": "public", "name": "google_ads_ad_group_stats_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_ad_group_stats_data.csv", "original_file_path": "seeds/google_ads_ad_group_stats_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_ad_group_stats_data", "fqn": ["ad_reporting_integration_tests", "google_ads_ad_group_stats_data"], "alias": "google_ads_ad_group_stats_data", "checksum": {"name": "sha256", "checksum": "d3ac6d88466ebf8fca7753e60be01dfa615a8e9b654da4d91fab8ee59c6c7cf0"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"customer_id": "bigint", "campaign_id": "bigint", "id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"customer_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.2635734, "relation_name": "\"postgres\".\"public\".\"google_ads_ad_group_stats_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.apple_search_keyword_report_data": {"database": "postgres", "schema": "public", "name": "apple_search_keyword_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "apple_search_keyword_report_data.csv", "original_file_path": "seeds/apple_search_keyword_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.apple_search_keyword_report_data", "fqn": ["ad_reporting_integration_tests", "apple_search_keyword_report_data"], "alias": "apple_search_keyword_report_data", "checksum": {"name": "sha256", "checksum": "926fe237ceaaa3e17d15621afcd737bcfe4fa9400d38ec6ec81e71ed64a6f179"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.2667913, "relation_name": "\"postgres\".\"public\".\"apple_search_keyword_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.tiktok_campaign_report_hourly_data": {"database": "postgres", "schema": "public", "name": "tiktok_campaign_report_hourly_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "tiktok_campaign_report_hourly_data.csv", "original_file_path": "seeds/tiktok_campaign_report_hourly_data.csv", "unique_id": "seed.ad_reporting_integration_tests.tiktok_campaign_report_hourly_data", "fqn": ["ad_reporting_integration_tests", "tiktok_campaign_report_hourly_data"], "alias": "tiktok_campaign_report_hourly_data", "checksum": {"name": "sha256", "checksum": "044dcc02e6136b1ae73b46072bf99073245fbe5cc6832a52884300fcd2425278"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.2699265, "relation_name": "\"postgres\".\"public\".\"tiktok_campaign_report_hourly_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.amazon_ads_advertised_product_report_data": {"database": "postgres", "schema": "public", "name": "amazon_ads_advertised_product_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "amazon_ads_advertised_product_report_data.csv", "original_file_path": "seeds/amazon_ads_advertised_product_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_advertised_product_report_data", "fqn": ["ad_reporting_integration_tests", "amazon_ads_advertised_product_report_data"], "alias": "amazon_ads_advertised_product_report_data", "checksum": {"name": "sha256", "checksum": "a4e7228789e73cea87c629d75d3940ce2d21dada457eccc0c753f02a610c1439"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "campaign_budget_amount": "float"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"_fivetran_synced": "timestamp", "campaign_budget_amount": "float"}}, "created_at": 1783450495.2731457, "relation_name": "\"postgres\".\"public\".\"amazon_ads_advertised_product_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.twitter_account_history_data": {"database": "postgres", "schema": "public", "name": "twitter_account_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "twitter_account_history_data.csv", "original_file_path": "seeds/twitter_account_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.twitter_account_history_data", "fqn": ["ad_reporting_integration_tests", "twitter_account_history_data"], "alias": "twitter_account_history_data", "checksum": {"name": "sha256", "checksum": "e880da5ea30536301dbb19627aa818f454eceae2b8bd10e40cada659e4585d64"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"name": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"name": "{{ 'string' if target.type in ['bigquery','spark', 'databricks'] else 'varchar' }}"}}, "created_at": 1783450495.2765024, "relation_name": "\"postgres\".\"public\".\"twitter_account_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.apple_search_ad_group_history_data": {"database": "postgres", "schema": "public", "name": "apple_search_ad_group_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "apple_search_ad_group_history_data.csv", "original_file_path": "seeds/apple_search_ad_group_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.apple_search_ad_group_history_data", "fqn": ["ad_reporting_integration_tests", "apple_search_ad_group_history_data"], "alias": "apple_search_ad_group_history_data", "checksum": {"name": "sha256", "checksum": "6940c04c90cc94b46d8a36bf1b3701cbd64d75b298222e26819aaf6460ddf984"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp"}}, "created_at": 1783450495.2797806, "relation_name": "\"postgres\".\"public\".\"apple_search_ad_group_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.tiktok_adgroup_history_data": {"database": "postgres", "schema": "public", "name": "tiktok_adgroup_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "tiktok_adgroup_history_data.csv", "original_file_path": "seeds/tiktok_adgroup_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.tiktok_adgroup_history_data", "fqn": ["ad_reporting_integration_tests", "tiktok_adgroup_history_data"], "alias": "tiktok_adgroup_history_data", "checksum": {"name": "sha256", "checksum": "639ab801e23bda0eab7fc62a605781f2f926f1ef2bd935f12af67e56d9ffeb89"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.2829378, "relation_name": "\"postgres\".\"public\".\"tiktok_adgroup_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.apple_search_campaign_report_data": {"database": "postgres", "schema": "public", "name": "apple_search_campaign_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "apple_search_campaign_report_data.csv", "original_file_path": "seeds/apple_search_campaign_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.apple_search_campaign_report_data", "fqn": ["ad_reporting_integration_tests", "apple_search_campaign_report_data"], "alias": "apple_search_campaign_report_data", "checksum": {"name": "sha256", "checksum": "3c46e3723ddc97efb7c195a1036f10a700aa4656c300da7c82ff0bfdf7ef7736"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.2860305, "relation_name": "\"postgres\".\"public\".\"apple_search_campaign_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_ad_data": {"database": "postgres", "schema": "public", "name": "reddit_ads_ad_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_ad_data.csv", "original_file_path": "seeds/reddit_ads_ad_data.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_ad_data", "fqn": ["ad_reporting_integration_tests", "reddit_ads_ad_data"], "alias": "reddit_ads_ad_data", "checksum": {"name": "sha256", "checksum": "3c60814303d77bfb7b387e026b59ea6f6db7ae316bcb3a8c5b84b50e706d9d59"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "varchar(255)", "ad_group_id": "varchar(255)", "campaign_id": "varchar(255)", "id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}", "ad_group_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}", "campaign_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}", "id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783450495.2892277, "relation_name": "\"postgres\".\"public\".\"reddit_ads_ad_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.snapchat_ad_squad_hourly_report_data": {"database": "postgres", "schema": "public", "name": "snapchat_ad_squad_hourly_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "snapchat_ad_squad_hourly_report_data.csv", "original_file_path": "seeds/snapchat_ad_squad_hourly_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.snapchat_ad_squad_hourly_report_data", "fqn": ["ad_reporting_integration_tests", "snapchat_ad_squad_hourly_report_data"], "alias": "snapchat_ad_squad_hourly_report_data", "checksum": {"name": "sha256", "checksum": "4bcd58c89168843edd94874f95222804c28b5b3571d66dbb194a498a0f8f85b7"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.2925541, "relation_name": "\"postgres\".\"public\".\"snapchat_ad_squad_hourly_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.linkedin_ad_analytics_by_campaign_data": {"database": "postgres", "schema": "public", "name": "linkedin_ad_analytics_by_campaign_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "linkedin_ad_analytics_by_campaign_data.csv", "original_file_path": "seeds/linkedin_ad_analytics_by_campaign_data.csv", "unique_id": "seed.ad_reporting_integration_tests.linkedin_ad_analytics_by_campaign_data", "fqn": ["ad_reporting_integration_tests", "linkedin_ad_analytics_by_campaign_data"], "alias": "linkedin_ad_analytics_by_campaign_data", "checksum": {"name": "sha256", "checksum": "a6b72fcf11043561ec04bae0035659363e992cd11f8ed5376f056b7f4e5b5b32"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"day": "timestamp", "external_website_conversions": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"day": "timestamp", "external_website_conversions": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.2957456, "relation_name": "\"postgres\".\"public\".\"linkedin_ad_analytics_by_campaign_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.snapchat_ad_account_history_data": {"database": "postgres", "schema": "public", "name": "snapchat_ad_account_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "snapchat_ad_account_history_data.csv", "original_file_path": "seeds/snapchat_ad_account_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.snapchat_ad_account_history_data", "fqn": ["ad_reporting_integration_tests", "snapchat_ad_account_history_data"], "alias": "snapchat_ad_account_history_data", "checksum": {"name": "sha256", "checksum": "0e1f3a58ee6a4863bb59fbd30c286606f0de77040fbb2903ab312e5d248454cb"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.298884, "relation_name": "\"postgres\".\"public\".\"snapchat_ad_account_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.tiktok_ad_history_data": {"database": "postgres", "schema": "public", "name": "tiktok_ad_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "tiktok_ad_history_data.csv", "original_file_path": "seeds/tiktok_ad_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.tiktok_ad_history_data", "fqn": ["ad_reporting_integration_tests", "tiktok_ad_history_data"], "alias": "tiktok_ad_history_data", "checksum": {"name": "sha256", "checksum": "a5977d1a4315d2bffbdb7be9c73345ce724324c20407af4cab3afae24f0fca34"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.301956, "relation_name": "\"postgres\".\"public\".\"tiktok_ad_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.linkedin_ad_analytics_by_creative_data": {"database": "postgres", "schema": "public", "name": "linkedin_ad_analytics_by_creative_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "linkedin_ad_analytics_by_creative_data.csv", "original_file_path": "seeds/linkedin_ad_analytics_by_creative_data.csv", "unique_id": "seed.ad_reporting_integration_tests.linkedin_ad_analytics_by_creative_data", "fqn": ["ad_reporting_integration_tests", "linkedin_ad_analytics_by_creative_data"], "alias": "linkedin_ad_analytics_by_creative_data", "checksum": {"name": "sha256", "checksum": "b5958b032b3396d36be3b8e4e7664029927e507034d9a7e5f2e7045e8366cc24"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"day": "timestamp", "external_website_conversions": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"day": "timestamp", "external_website_conversions": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.3052263, "relation_name": "\"postgres\".\"public\".\"linkedin_ad_analytics_by_creative_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_account_report_data": {"database": "postgres", "schema": "public", "name": "reddit_ads_account_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_account_report_data.csv", "original_file_path": "seeds/reddit_ads_account_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_account_report_data", "fqn": ["ad_reporting_integration_tests", "reddit_ads_account_report_data"], "alias": "reddit_ads_account_report_data", "checksum": {"name": "sha256", "checksum": "82b98a76c07069e7752621a8ce85c1a613bcbcbb4be084c7f3b6d25fbf10a6c6"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783450495.3084772, "relation_name": "\"postgres\".\"public\".\"reddit_ads_account_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_ad_group_data": {"database": "postgres", "schema": "public", "name": "reddit_ads_ad_group_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_ad_group_data.csv", "original_file_path": "seeds/reddit_ads_ad_group_data.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_ad_group_data", "fqn": ["ad_reporting_integration_tests", "reddit_ads_ad_group_data"], "alias": "reddit_ads_ad_group_data", "checksum": {"name": "sha256", "checksum": "854e1b14702e4e7d1d455e8d47bb6356e3970c7baac2b1a2e1aafbb129233a62"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "varchar(255)", "campaign_id": "varchar(255)", "id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}", "campaign_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}", "id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783450495.3117309, "relation_name": "\"postgres\".\"public\".\"reddit_ads_ad_group_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.microsoft_ads_campaign_history_data": {"database": "postgres", "schema": "public", "name": "microsoft_ads_campaign_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "microsoft_ads_campaign_history_data.csv", "original_file_path": "seeds/microsoft_ads_campaign_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_campaign_history_data", "fqn": ["ad_reporting_integration_tests", "microsoft_ads_campaign_history_data"], "alias": "microsoft_ads_campaign_history_data", "checksum": {"name": "sha256", "checksum": "b713e54ffdbc25d2260c83c5a17eb48d98bde788bcdb5b62defa9cca936cb552"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.314882, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_campaign_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.pinterest_pin_promotion_report_data": {"database": "postgres", "schema": "public", "name": "pinterest_pin_promotion_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "pinterest_pin_promotion_report_data.csv", "original_file_path": "seeds/pinterest_pin_promotion_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.pinterest_pin_promotion_report_data", "fqn": ["ad_reporting_integration_tests", "pinterest_pin_promotion_report_data"], "alias": "pinterest_pin_promotion_report_data", "checksum": {"name": "sha256", "checksum": "d38f800761cda64662a51255e2c98a4c0dffa9ace704960d44d666aead38cdf1"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"pin_promotion_id": "bigint", "ad_group_id": "bigint", "campaign_id": "bigint", "advertiser_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"pin_promotion_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "advertiser_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.3180544, "relation_name": "\"postgres\".\"public\".\"pinterest_pin_promotion_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.pinterest_targeting_geo_data": {"database": "postgres", "schema": "public", "name": "pinterest_targeting_geo_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "pinterest_targeting_geo_data.csv", "original_file_path": "seeds/pinterest_targeting_geo_data.csv", "unique_id": "seed.ad_reporting_integration_tests.pinterest_targeting_geo_data", "fqn": ["ad_reporting_integration_tests", "pinterest_targeting_geo_data"], "alias": "pinterest_targeting_geo_data", "checksum": {"name": "sha256", "checksum": "9130c7ec5fe59ea386e827a20c461b54d5654be5790f6c38ff0feaf541285704"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.3213432, "relation_name": "\"postgres\".\"public\".\"pinterest_targeting_geo_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.linkedin_geo_data": {"database": "postgres", "schema": "public", "name": "linkedin_geo_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "linkedin_geo_data.csv", "original_file_path": "seeds/linkedin_geo_data.csv", "unique_id": "seed.ad_reporting_integration_tests.linkedin_geo_data", "fqn": ["ad_reporting_integration_tests", "linkedin_geo_data"], "alias": "linkedin_geo_data", "checksum": {"name": "sha256", "checksum": "ca6ca7996af617f0c6faf0e04eac12e4fefe184cd23dd1e39605e48eb67b272a"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.3244529, "relation_name": "\"postgres\".\"public\".\"linkedin_geo_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.linkedin_ad_campaign_history_data": {"database": "postgres", "schema": "public", "name": "linkedin_ad_campaign_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "linkedin_ad_campaign_history_data.csv", "original_file_path": "seeds/linkedin_ad_campaign_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.linkedin_ad_campaign_history_data", "fqn": ["ad_reporting_integration_tests", "linkedin_ad_campaign_history_data"], "alias": "linkedin_ad_campaign_history_data", "checksum": {"name": "sha256", "checksum": "6d9dc155f63100a6555d22bf221ef2d037492984e4206518b68e17e0acb3b00a"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"created_time": "timestamp", "last_modified_time": "timestamp", "account_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"created_time": "timestamp", "last_modified_time": "timestamp", "account_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.3277123, "relation_name": "\"postgres\".\"public\".\"linkedin_ad_campaign_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.tiktok_campaign_history_data": {"database": "postgres", "schema": "public", "name": "tiktok_campaign_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "tiktok_campaign_history_data.csv", "original_file_path": "seeds/tiktok_campaign_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.tiktok_campaign_history_data", "fqn": ["ad_reporting_integration_tests", "tiktok_campaign_history_data"], "alias": "tiktok_campaign_history_data", "checksum": {"name": "sha256", "checksum": "ed72ea1d488112201d4226b6c4b88bee861b84446a4d4f7d31abb6719c38b612"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.3309205, "relation_name": "\"postgres\".\"public\".\"tiktok_campaign_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_ad_history_data": {"database": "postgres", "schema": "public", "name": "google_ads_ad_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_ad_history_data.csv", "original_file_path": "seeds/google_ads_ad_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_ad_history_data", "fqn": ["ad_reporting_integration_tests", "google_ads_ad_history_data"], "alias": "google_ads_ad_history_data", "checksum": {"name": "sha256", "checksum": "d75e5e99b2a5e2c3cecf248666c708c739a75cdee2cd66068fc893d9fe7ad635"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"ad_group_id": "bigint", "id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"ad_group_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.3342278, "relation_name": "\"postgres\".\"public\".\"google_ads_ad_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_campaign_criterion_history_data": {"database": "postgres", "schema": "public", "name": "google_ads_campaign_criterion_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_campaign_criterion_history_data.csv", "original_file_path": "seeds/google_ads_campaign_criterion_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_campaign_criterion_history_data", "fqn": ["ad_reporting_integration_tests", "google_ads_campaign_criterion_history_data"], "alias": "google_ads_campaign_criterion_history_data", "checksum": {"name": "sha256", "checksum": "6fde1012cf65b170fe7b3863249880e3df00dbe04faec341cb95c73330e2bef7"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "campaign_id": "bigint", "geo_target_constant_id": "bigint", "mobile_device_id": "bigint", "operating_system_version_id": "bigint", "topic_constant_id": "bigint", "user_interest_id": "bigint", "user_list_id": "bigint", "mobile_app_category_constant_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "geo_target_constant_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "mobile_device_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "operating_system_version_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "topic_constant_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "user_interest_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "user_list_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "mobile_app_category_constant_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.3376284, "relation_name": "\"postgres\".\"public\".\"google_ads_campaign_criterion_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_campaign_bid_modifier_history_data": {"database": "postgres", "schema": "public", "name": "google_ads_campaign_bid_modifier_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_campaign_bid_modifier_history_data.csv", "original_file_path": "seeds/google_ads_campaign_bid_modifier_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_campaign_bid_modifier_history_data", "fqn": ["ad_reporting_integration_tests", "google_ads_campaign_bid_modifier_history_data"], "alias": "google_ads_campaign_bid_modifier_history_data", "checksum": {"name": "sha256", "checksum": "984b02e59affadd44c34165e437e4fd94f7f738cbea727e30c6d4f48b1b2256a"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"campaign_id": "bigint", "criterion_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "criterion_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.3409348, "relation_name": "\"postgres\".\"public\".\"google_ads_campaign_bid_modifier_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.microsoft_ads_account_performance_daily_report_data": {"database": "postgres", "schema": "public", "name": "microsoft_ads_account_performance_daily_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "microsoft_ads_account_performance_daily_report_data.csv", "original_file_path": "seeds/microsoft_ads_account_performance_daily_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_account_performance_daily_report_data", "fqn": ["ad_reporting_integration_tests", "microsoft_ads_account_performance_daily_report_data"], "alias": "microsoft_ads_account_performance_daily_report_data", "checksum": {"name": "sha256", "checksum": "407268e863d1ec81e7450ec40910c1be3f6c3e898b3c5878f407f26b55429240"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "bigint", "spend": "float"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "spend": "float"}}, "created_at": 1783450495.3441606, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_account_performance_daily_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.tiktok_adgroup_report_hourly_data": {"database": "postgres", "schema": "public", "name": "tiktok_adgroup_report_hourly_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "tiktok_adgroup_report_hourly_data.csv", "original_file_path": "seeds/tiktok_adgroup_report_hourly_data.csv", "unique_id": "seed.ad_reporting_integration_tests.tiktok_adgroup_report_hourly_data", "fqn": ["ad_reporting_integration_tests", "tiktok_adgroup_report_hourly_data"], "alias": "tiktok_adgroup_report_hourly_data", "checksum": {"name": "sha256", "checksum": "9c037b120447cb51b8413ddc2c93f0f5f009e8500b3bcc37b23c5086ef743fe7"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.347312, "relation_name": "\"postgres\".\"public\".\"tiktok_adgroup_report_hourly_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_keyword_stats_data": {"database": "postgres", "schema": "public", "name": "google_ads_keyword_stats_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_keyword_stats_data.csv", "original_file_path": "seeds/google_ads_keyword_stats_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_keyword_stats_data", "fqn": ["ad_reporting_integration_tests", "google_ads_keyword_stats_data"], "alias": "google_ads_keyword_stats_data", "checksum": {"name": "sha256", "checksum": "e4745703dd19dabf77a7df047ced6c1c56966ad8552d2f67676bcfd4ff36c94f"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"customer_id": "bigint", "campaign_id": "bigint", "ad_group_id": "bigint", "ad_group_criterion_criterion_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"customer_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_criterion_criterion_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.3505864, "relation_name": "\"postgres\".\"public\".\"google_ads_keyword_stats_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.pinterest_keyword_report_data": {"database": "postgres", "schema": "public", "name": "pinterest_keyword_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "pinterest_keyword_report_data.csv", "original_file_path": "seeds/pinterest_keyword_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.pinterest_keyword_report_data", "fqn": ["ad_reporting_integration_tests", "pinterest_keyword_report_data"], "alias": "pinterest_keyword_report_data", "checksum": {"name": "sha256", "checksum": "51ad505e0c3419b86759141226d3a5cc8b18aa07d35cb0212c2fbfbfadb17a31"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"keyword_id": "bigint", "pin_promotion_id": "bigint", "ad_group_id": "bigint", "campaign_id": "bigint", "advertiser_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"keyword_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "pin_promotion_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "advertiser_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.3538358, "relation_name": "\"postgres\".\"public\".\"pinterest_keyword_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_campaign_history_data": {"database": "postgres", "schema": "public", "name": "google_ads_campaign_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_campaign_history_data.csv", "original_file_path": "seeds/google_ads_campaign_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_campaign_history_data", "fqn": ["ad_reporting_integration_tests", "google_ads_campaign_history_data"], "alias": "google_ads_campaign_history_data", "checksum": {"name": "sha256", "checksum": "54db8f4f5a51eae1af9391b9b74c4b847485e82c382a25ebc1b4a727640825e5"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"customer_id": "bigint", "id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"customer_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.3571043, "relation_name": "\"postgres\".\"public\".\"google_ads_campaign_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.pinterest_keyword_history_data": {"database": "postgres", "schema": "public", "name": "pinterest_keyword_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "pinterest_keyword_history_data.csv", "original_file_path": "seeds/pinterest_keyword_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.pinterest_keyword_history_data", "fqn": ["ad_reporting_integration_tests", "pinterest_keyword_history_data"], "alias": "pinterest_keyword_history_data", "checksum": {"name": "sha256", "checksum": "c2bee861548c505642cb588c90a9e97ce95b77d8246448031bb9225bc5e2db84"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "campaign_id": "bigint", "ad_group_id": "bigint", "advertiser_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "advertiser_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.3603885, "relation_name": "\"postgres\".\"public\".\"pinterest_keyword_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.pinterest_ad_group_history_data": {"database": "postgres", "schema": "public", "name": "pinterest_ad_group_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "pinterest_ad_group_history_data.csv", "original_file_path": "seeds/pinterest_ad_group_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.pinterest_ad_group_history_data", "fqn": ["ad_reporting_integration_tests", "pinterest_ad_group_history_data"], "alias": "pinterest_ad_group_history_data", "checksum": {"name": "sha256", "checksum": "1dd6628bd824b4b3626bff8bd0a8f7c5eadfbadfa0319f24e2dffa7f16ca9d0c"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "campaign_id": "bigint", "ad_account_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "ad_account_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.3637383, "relation_name": "\"postgres\".\"public\".\"pinterest_ad_group_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.pinterest_advertiser_history_data": {"database": "postgres", "schema": "public", "name": "pinterest_advertiser_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "pinterest_advertiser_history_data.csv", "original_file_path": "seeds/pinterest_advertiser_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.pinterest_advertiser_history_data", "fqn": ["ad_reporting_integration_tests", "pinterest_advertiser_history_data"], "alias": "pinterest_advertiser_history_data", "checksum": {"name": "sha256", "checksum": "d301cef7c69c7e1571a0df75ddbd36147977d804380dbbb528a8db432c9e7e5b"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.366979, "relation_name": "\"postgres\".\"public\".\"pinterest_advertiser_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.amazon_ads_campaign_history_data": {"database": "postgres", "schema": "public", "name": "amazon_ads_campaign_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "amazon_ads_campaign_history_data.csv", "original_file_path": "seeds/amazon_ads_campaign_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_campaign_history_data", "fqn": ["ad_reporting_integration_tests", "amazon_ads_campaign_history_data"], "alias": "amazon_ads_campaign_history_data", "checksum": {"name": "sha256", "checksum": "0f20a7204beca4248a325978992ffd60e0fe986c633790b2bd032754d77c5184"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.370189, "relation_name": "\"postgres\".\"public\".\"amazon_ads_campaign_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.facebook_ads_demographics_country_data": {"database": "postgres", "schema": "public", "name": "facebook_ads_demographics_country_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "facebook_ads_demographics_country_data.csv", "original_file_path": "seeds/facebook_ads_demographics_country_data.csv", "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_demographics_country_data", "fqn": ["ad_reporting_integration_tests", "facebook_ads_demographics_country_data"], "alias": "facebook_ads_demographics_country_data", "checksum": {"name": "sha256", "checksum": "c147c99cc41b96b6ec0d35f8c9963c46bd8d06e4d50f4ba62e59eae5268b0b94"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.3733351, "relation_name": "\"postgres\".\"public\".\"facebook_ads_demographics_country_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_campaign_conversions": {"database": "postgres", "schema": "public", "name": "reddit_ads_campaign_conversions", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_campaign_conversions.csv", "original_file_path": "seeds/reddit_ads_campaign_conversions.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_campaign_conversions", "fqn": ["ad_reporting_integration_tests", "reddit_ads_campaign_conversions"], "alias": "reddit_ads_campaign_conversions", "checksum": {"name": "sha256", "checksum": "ca700b6314c329f81da024b4c8c262a7c22a17ea3660ba8094c1686871ee5091"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "varchar(255)", "campaign_id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}", "campaign_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783450495.3765745, "relation_name": "\"postgres\".\"public\".\"reddit_ads_campaign_conversions\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.facebook_ads_demographics_country_actions_data": {"database": "postgres", "schema": "public", "name": "facebook_ads_demographics_country_actions_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "facebook_ads_demographics_country_actions_data.csv", "original_file_path": "seeds/facebook_ads_demographics_country_actions_data.csv", "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_demographics_country_actions_data", "fqn": ["ad_reporting_integration_tests", "facebook_ads_demographics_country_actions_data"], "alias": "facebook_ads_demographics_country_actions_data", "checksum": {"name": "sha256", "checksum": "1c9bcd0559769f07cd2beded81b7305a10b9c1887d7ced00332da8102063ecb5"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"value": "float", "account_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"value": "float", "account_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.3799007, "relation_name": "\"postgres\".\"public\".\"facebook_ads_demographics_country_actions_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.apple_search_ad_group_report_data": {"database": "postgres", "schema": "public", "name": "apple_search_ad_group_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "apple_search_ad_group_report_data.csv", "original_file_path": "seeds/apple_search_ad_group_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.apple_search_ad_group_report_data", "fqn": ["ad_reporting_integration_tests", "apple_search_ad_group_report_data"], "alias": "apple_search_ad_group_report_data", "checksum": {"name": "sha256", "checksum": "1afb930ba3bc99a582e1d9e2c6595b033bd9399e80a047f964b075903cb0437f"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.3830495, "relation_name": "\"postgres\".\"public\".\"apple_search_ad_group_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_business_account_data": {"database": "postgres", "schema": "public", "name": "reddit_ads_business_account_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_business_account_data.csv", "original_file_path": "seeds/reddit_ads_business_account_data.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_business_account_data", "fqn": ["ad_reporting_integration_tests", "reddit_ads_business_account_data"], "alias": "reddit_ads_business_account_data", "checksum": {"name": "sha256", "checksum": "2fc3cf9d4be251e4e448f3e09ddb92f2c2c96c1fca52ef4f112dd62ff7278a25"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783450495.386202, "relation_name": "\"postgres\".\"public\".\"reddit_ads_business_account_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.microsoft_ads_keyword_history_data": {"database": "postgres", "schema": "public", "name": "microsoft_ads_keyword_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "microsoft_ads_keyword_history_data.csv", "original_file_path": "seeds/microsoft_ads_keyword_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_keyword_history_data", "fqn": ["ad_reporting_integration_tests", "microsoft_ads_keyword_history_data"], "alias": "microsoft_ads_keyword_history_data", "checksum": {"name": "sha256", "checksum": "e736b54737adad8174d44a89eab9a6b720326744bff802fda870f585c86e7511"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "ad_group_id": "bigint", "modified_time": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "modified_time": "timestamp"}}, "created_at": 1783450495.389433, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_keyword_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.amazon_ads_keyword_history_data": {"database": "postgres", "schema": "public", "name": "amazon_ads_keyword_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "amazon_ads_keyword_history_data.csv", "original_file_path": "seeds/amazon_ads_keyword_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_keyword_history_data", "fqn": ["ad_reporting_integration_tests", "amazon_ads_keyword_history_data"], "alias": "amazon_ads_keyword_history_data", "checksum": {"name": "sha256", "checksum": "a76f88aeb6ebf78cec10fe06d07479eace29a79b9afa52b3278e32f65964dc33"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.3928082, "relation_name": "\"postgres\".\"public\".\"amazon_ads_keyword_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.pinterest_pin_promotion_targeting_report_data": {"database": "postgres", "schema": "public", "name": "pinterest_pin_promotion_targeting_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "pinterest_pin_promotion_targeting_report_data.csv", "original_file_path": "seeds/pinterest_pin_promotion_targeting_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.pinterest_pin_promotion_targeting_report_data", "fqn": ["ad_reporting_integration_tests", "pinterest_pin_promotion_targeting_report_data"], "alias": "pinterest_pin_promotion_targeting_report_data", "checksum": {"name": "sha256", "checksum": "8e9b12428773578820ca562018bfbe2a42b5a12d19105428bbd222272daa9413"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"campaign_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"campaign_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783450495.395966, "relation_name": "\"postgres\".\"public\".\"pinterest_pin_promotion_targeting_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_ad_group_conversions": {"database": "postgres", "schema": "public", "name": "reddit_ads_ad_group_conversions", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_ad_group_conversions.csv", "original_file_path": "seeds/reddit_ads_ad_group_conversions.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_ad_group_conversions", "fqn": ["ad_reporting_integration_tests", "reddit_ads_ad_group_conversions"], "alias": "reddit_ads_ad_group_conversions", "checksum": {"name": "sha256", "checksum": "4289f878ef2942b8ddba332bc3b8a830dc22af6f0fa480fbedb78ec7f9549ac3"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "varchar(255)", "ad_group_id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}", "ad_group_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783450495.3991842, "relation_name": "\"postgres\".\"public\".\"reddit_ads_ad_group_conversions\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.tiktok_ad_report_hourly_data": {"database": "postgres", "schema": "public", "name": "tiktok_ad_report_hourly_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "tiktok_ad_report_hourly_data.csv", "original_file_path": "seeds/tiktok_ad_report_hourly_data.csv", "unique_id": "seed.ad_reporting_integration_tests.tiktok_ad_report_hourly_data", "fqn": ["ad_reporting_integration_tests", "tiktok_ad_report_hourly_data"], "alias": "tiktok_ad_report_hourly_data", "checksum": {"name": "sha256", "checksum": "22559e87d6e55c6731d1ce33e793304f522ec0f6c5ae461ac6dbcca9c4333a5b"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.4023228, "relation_name": "\"postgres\".\"public\".\"tiktok_ad_report_hourly_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.pinterest_targeting_geo_region_data": {"database": "postgres", "schema": "public", "name": "pinterest_targeting_geo_region_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "pinterest_targeting_geo_region_data.csv", "original_file_path": "seeds/pinterest_targeting_geo_region_data.csv", "unique_id": "seed.ad_reporting_integration_tests.pinterest_targeting_geo_region_data", "fqn": ["ad_reporting_integration_tests", "pinterest_targeting_geo_region_data"], "alias": "pinterest_targeting_geo_region_data", "checksum": {"name": "sha256", "checksum": "68a1178fe36de4fd24be28fb76f4a65cefda5a355fff1a2620eaf87cecce5f85"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.4054105, "relation_name": "\"postgres\".\"public\".\"pinterest_targeting_geo_region_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_action_values_data": {"database": "postgres", "schema": "public", "name": "facebook_ads_basic_ad_action_values_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "facebook_ads_basic_ad_action_values_data.csv", "original_file_path": "seeds/facebook_ads_basic_ad_action_values_data.csv", "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_action_values_data", "fqn": ["ad_reporting_integration_tests", "facebook_ads_basic_ad_action_values_data"], "alias": "facebook_ads_basic_ad_action_values_data", "checksum": {"name": "sha256", "checksum": "77e70b5d122d72d83aa7bfa30799d4164dadcbbed0d2e514c55afacb1a968aa4"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783450495.4085684, "relation_name": "\"postgres\".\"public\".\"facebook_ads_basic_ad_action_values_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "model.linkedin.linkedin_ads__creative_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "linkedin_ads__creative_report", "resource_type": "model", "package_name": "linkedin", "path": "linkedin_ads__creative_report.sql", "original_file_path": "models/linkedin_ads__creative_report.sql", "unique_id": "model.linkedin.linkedin_ads__creative_report", "fqn": ["linkedin", "linkedin_ads__creative_report"], "alias": "linkedin_ads__creative_report", "checksum": {"name": "sha256", "checksum": "69eb85190bc0a22e63b16c2e102534f2d948699875e0ac59addd4de5e7713b74"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the creative level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}, "account_name": {"name": "account_name", "description": "A label for the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "Unique internal ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The day of the activity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost": {"name": "cost", "description": "The cost of the ads in the local currency or USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_name": {"name": "campaign_group_name", "description": "A label for the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_id": {"name": "campaign_group_id", "description": "Unique internal ID representing the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "A label for the creative's campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Unique internal ID representing the creative's campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_id": {"name": "creative_id", "description": "Unique internal ID representing the creative.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_at": {"name": "last_modified_at", "description": "The timestamp of when the version was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp of when the creative was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_status": {"name": "creative_status", "description": "ACTIVE - Creative creation is complete and creative is available for review and serve.\nPAUSED - Creative creation is complete and creative is current, but should temporarily not be served. This status is not valid upon creation.\nDRAFT - Creative creation is incomplete and may still be edited.\nARCHIVED - Creative creation is complete, but creative should not be served and should be separated from non-archived creatives in any UI.\nCANCELED - Creative is permanently canceled.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_uri": {"name": "click_uri", "description": "The URL where the member should be redirected to, on clicking the text ad or spotlight ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_uri_type": {"name": "click_uri_type", "description": "Will either be `text_ad`, `spotlight`, or `null` to indicate the origin of the click_uri.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_status": {"name": "campaign_group_status", "description": "Status of campaign's campaign group. Possible values are: ACTIVE - Denotes that the campaign group is capable of serving ads, subject to run date and budget limitations (as well as any other limitations at the account or campaign level). ARCHIVED - Denotes that the campaign group is presently inactive, and should mostly be hidden in the UI until un-archived. CANCELLED - Denotes that the campaign group has been permanently canceled and cannot be reactivated. Not a settable status. DRAFT - Denotes that the campaign group is in a preliminary state and should temporarily not be served. PAUSED - Denotes that the campaign group meets all requirements to be served, but temporarily should not be. PENDING_DELETION - Denotes that the campaign group has been requested to be deleted that is currently pending. REMOVED - Denoted that the campaign group was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "ACTIVE - Denotes that the campaign is fully servable.\nPAUSED - Denotes that the campaign meets all requirements to be served, but temporarily should not be.\nARCHIVED - Denotes that the campaign is presently inactive, and should mostly be hidden in the UI until un-archived.\nCOMPLETED - Denotes that the campaign has reached a specified budgetary or chronological limit.\nCANCELED - Denotes that the campaign has been permanently canceled, such as when an advertising account is permanently closed.\nDRAFT - Denotes that the campaign is still being edited and not eligible for serving. Some validation will be postponed until the campaign is activated.\nPENDING_DELETION - Denotes that the campaign has been requested to be deleted that is currently pending.\nREMOVED - Denotes that the campaign was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency, on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "The total conversions being brought in the conversion fields you select in your `linkedin_ads__conversion_fields`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.4751885, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__creative_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\nwith creative as (\n\n select *\n from {{ ref('stg_linkedin_ads__creative_history') }}\n where is_latest_version\n),\n\ncampaign as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_history') }}\n where is_latest_version\n),\n\ncampaign_group as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_group_history') }}\n where is_latest_version\n),\n\naccount as (\n\n select *\n from {{ ref('stg_linkedin_ads__account_history') }}\n where is_latest_version\n),\n\nreport as (\n\n select *,\n {% if var('linkedin_ads__conversion_fields', none) %}\n {{ var('linkedin_ads__conversion_fields') | join(' + ') }} as total_conversions\n {% else %}\n 0 as total_conversions\n {% endif %}\n from {{ ref('stg_linkedin_ads__ad_analytics_by_creative') }}\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.creative_id,\n campaign.campaign_id,\n campaign.campaign_name,\n campaign_group.campaign_group_id,\n campaign_group.campaign_group_name,\n account.account_id,\n account.account_name,\n creative.click_uri,\n creative.click_uri_type,\n creative.status as creative_status,\n campaign.status as campaign_status,\n campaign_group.status as campaign_group_status,\n account.currency,\n creative.last_modified_at,\n creative.created_at,\n sum(report.total_conversions) as total_conversions,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.cost) as cost,\n sum(coalesce(report.conversion_value_in_local_currency, 0)) as conversion_value_in_local_currency \n\n {{ linkedin_ads_persist_pass_through_columns(pass_through_variable='linkedin_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='linkedin_ads__creative_passthrough_metrics', exclude_fields=['conversion_value_in_local_currency']) }}\n\n {{ linkedin_ads_persist_pass_through_columns(pass_through_variable='linkedin_ads__creative_passthrough_metrics', transform='sum', exclude_fields=['conversion_value_in_local_currency']) }}\n\n from report \n left join creative \n on report.creative_id = creative.creative_id\n and report.source_relation = creative.source_relation\n left join campaign \n on creative.campaign_id = campaign.campaign_id\n and creative.source_relation = campaign.source_relation\n left join campaign_group\n on campaign.campaign_group_id = campaign_group.campaign_group_id\n and campaign.source_relation = campaign_group.source_relation\n left join account \n on campaign.account_id = account.account_id\n and campaign.source_relation = account.source_relation\n\n {{ dbt_utils.group_by(17) }}\n\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__creative_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__campaign_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__campaign_group_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__account_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__ad_analytics_by_creative", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.linkedin.linkedin_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.linkedin.stg_linkedin_ads__creative_history", "model.linkedin.stg_linkedin_ads__campaign_history", "model.linkedin.stg_linkedin_ads__campaign_group_history", "model.linkedin.stg_linkedin_ads__account_history", "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative"]}, "compiled_path": "target/compiled/linkedin/models/linkedin_ads__creative_report.sql", "compiled": true, "compiled_code": "\n\nwith creative as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__creative_history\"\n where is_latest_version\n),\n\ncampaign as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_history\"\n where is_latest_version\n),\n\ncampaign_group as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_group_history\"\n where is_latest_version\n),\n\naccount as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__account_history\"\n where is_latest_version\n),\n\nreport as (\n\n select *,\n \n external_website_conversions + one_click_leads as total_conversions\n \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_creative\"\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.creative_id,\n campaign.campaign_id,\n campaign.campaign_name,\n campaign_group.campaign_group_id,\n campaign_group.campaign_group_name,\n account.account_id,\n account.account_name,\n creative.click_uri,\n creative.click_uri_type,\n creative.status as creative_status,\n campaign.status as campaign_status,\n campaign_group.status as campaign_group_status,\n account.currency,\n creative.last_modified_at,\n creative.created_at,\n sum(report.total_conversions) as total_conversions,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.cost) as cost,\n sum(coalesce(report.conversion_value_in_local_currency, 0)) as conversion_value_in_local_currency \n\n \n\n\n\n \n \n\n\n\n \n\n\n\n \n \n \n \n , sum(coalesce(external_website_conversions, 0)) as external_website_conversions\n \n\n \n \n \n \n , sum(coalesce(one_click_leads, 0)) as one_click_leads\n \n\n \n\n\n\n\n \n\n\n\n\n\n \n\n\n\n\n\n\n from report \n left join creative \n on report.creative_id = creative.creative_id\n and report.source_relation = creative.source_relation\n left join campaign \n on creative.campaign_id = campaign.campaign_id\n and creative.source_relation = campaign.source_relation\n left join campaign_group\n on campaign.campaign_group_id = campaign_group.campaign_group_id\n and campaign.source_relation = campaign_group.source_relation\n left join account \n on campaign.account_id = account.account_id\n and campaign.source_relation = account.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17\n\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.linkedin_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "linkedin_ads__campaign_report", "resource_type": "model", "package_name": "linkedin", "path": "linkedin_ads__campaign_report.sql", "original_file_path": "models/linkedin_ads__campaign_report.sql", "unique_id": "model.linkedin.linkedin_ads__campaign_report", "fqn": ["linkedin", "linkedin_ads__campaign_report"], "alias": "linkedin_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "db37ff0d37bbd8c514396c692c9addcdd6c4d1e3fb1ba7bdb7a67c44678bbdaf"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the campaign level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}, "account_name": {"name": "account_name", "description": "A label for the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "Unique internal ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The day of the activity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost": {"name": "cost", "description": "The cost of the ads in the local currency or USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_name": {"name": "campaign_group_name", "description": "A label for the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_id": {"name": "campaign_group_id", "description": "Unique internal ID representing the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "A label for the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Unique internal ID representing the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_status": {"name": "campaign_group_status", "description": "Status of campaign's campaign group. Possible values are: ACTIVE - Denotes that the campaign group is capable of serving ads, subject to run date and budget limitations (as well as any other limitations at the account or campaign level). ARCHIVED - Denotes that the campaign group is presently inactive, and should mostly be hidden in the UI until un-archived. CANCELLED - Denotes that the campaign group has been permanently canceled and cannot be reactivated. Not a settable status. DRAFT - Denotes that the campaign group is in a preliminary state and should temporarily not be served. PAUSED - Denotes that the campaign group meets all requirements to be served, but temporarily should not be. PENDING_DELETION - Denotes that the campaign group has been requested to be deleted that is currently pending. REMOVED - Denoted that the campaign group was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_at": {"name": "last_modified_at", "description": "The timestamp of when the version was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp of when the campaign was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "version_tag": {"name": "version_tag", "description": "An integer representation of the version of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_audience_expansion_enabled": {"name": "is_audience_expansion_enabled", "description": "Boolean (default=false) representing whether Audience Expansion is enabled for the campaign provides query expansion for certain targeting criteria.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_type": {"name": "cost_type", "description": "CPM - Cost per thousand advertising impressions. If type=SPONSORED_INMAILS; cost per send(CPS) is measured as CPM x 1000.\nCPC- Cost per individual click on the associated link.\nCPV- Cost per view for video ads.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_selection": {"name": "creative_selection", "description": "ROUND_ROBIN - Rotate through available creatives to serve them as evenly as possible.\nOPTIMIZED (default) - Bias selection taking into account such as expected performance. Not available for Message and Conversation Ads (type=SPONSORED_INMAILS).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_amount": {"name": "daily_budget_amount", "description": "Maximum amount to spend per day UTC. The amount of money as a real number string.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_currency_code": {"name": "daily_budget_currency_code", "description": "ISO currency code. The currency must match that of the parent account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "format": {"name": "format", "description": "The ad format on the campaign level. See https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads/campaign-formats?view=li-lms-2022-07", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "locale_country": {"name": "locale_country", "description": "Locale of the campaign. An uppercase two-letter country code as defined by ISO-3166.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "locale_language": {"name": "locale_language", "description": "Locale of the campaign. A lowercase two-letter language code as defined by ISO-639.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective_type": {"name": "objective_type", "description": "Campaign Objective type values. Click [here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ad-budget-pricing-type-combinations?view=li-lms-2022-07) for Campaign Objective descriptions. One of: - BRAND_AWARENESS - ENGAGEMENT - JOB_APPLICANTS - LEAD_GENERATION - WEBSITE_CONVERSIONS - WEBSITE_VISITS - VIDEO_VIEWS\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_offsite_delivery_enabled": {"name": "is_offsite_delivery_enabled", "description": "Boolean indicating if this campaign to allowed to be served on the LinkedIn Audience Network to extend the reach of your campaign by delivering ads beyond the LinkedIn feed to members on third-party apps and sites.\t(default will be \"True\" from June 30, 2022)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "optimization_target_type": {"name": "optimization_target_type", "description": "Determines how this campaign is optimized for spending. If this is not set, there is no optimization. Refer to the documentation here. Default = 'NONE'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_start_at": {"name": "run_schedule_start_at", "description": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the inclusive (greater than or equal to) value in which to start the range.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_end_at": {"name": "run_schedule_end_at", "description": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the exclusive (strictly less than) value in which to end the range, if provided.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "ACTIVE - Denotes that the campaign is fully servable.\nPAUSED - Denotes that the campaign meets all requirements to be served, but temporarily should not be.\nARCHIVED - Denotes that the campaign is presently inactive, and should mostly be hidden in the UI until un-archived.\nCOMPLETED - Denotes that the campaign has reached a specified budgetary or chronological limit.\nCANCELED - Denotes that the campaign has been permanently canceled, such as when an advertising account is permanently closed.\nDRAFT - Denotes that the campaign is still being edited and not eligible for serving. Some validation will be postponed until the campaign is activated.\nPENDING_DELETION - Denotes that the campaign has been requested to be deleted that is currently pending.\nREMOVED - Denotes that the campaign was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "type": {"name": "type", "description": "TEXT_AD - Text-based ads that show up in the right column or top of the page on LinkedIn.\nSPONSORED_UPDATES - Native ads that promote a company's content updates in the LinkedIn feed.\nSPONSORED_INMAILS - Personalized messages with a call-to-action button delivered to a LinkedIn's member inbox.\nDYNAMIC - Ads that are dynamically personalized.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "unit_cost_amount": {"name": "unit_cost_amount", "description": "This value is used as one of the following: amount to bid (for manual bidding), amount which is the target cost (for target cost bidding) per click, impression, or other event depending on the pricing model, or cost cap (for cost cap bidding). The amount of money as a real number string. The amount should be non-negative if the bidding strategy is manual, target cost, or cost cap bidding. The default is 0 with the currency code set to match that of the associated account.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "unit_cost_currency_code": {"name": "unit_cost_currency_code", "description": "Amount to bid per click, impression, or other event depending on the pricing model. The default is 0 with the currency code set to match that of the associated account. ISO currency code.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency, on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "The total conversions being brought in the conversion fields you select in your `linkedin_ads__conversion_fields`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.4703305, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\nwith campaign as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_history') }}\n where is_latest_version\n),\n\ncampaign_group as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_group_history') }}\n where is_latest_version\n),\n\naccount as (\n\n select *\n from {{ ref('stg_linkedin_ads__account_history') }}\n where is_latest_version\n),\n\nreport as (\n\n select *,\n {% if var('linkedin_ads__conversion_fields', none) %}\n {{ var('linkedin_ads__conversion_fields') | join(' + ') }} as total_conversions\n {% else %}\n 0 as total_conversions\n {% endif %}\n from {{ ref('stg_linkedin_ads__ad_analytics_by_campaign') }}\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.campaign_id,\n campaign.campaign_name,\n campaign.version_tag,\n campaign_group.campaign_group_id,\n campaign_group.campaign_group_name,\n account.account_id,\n account.account_name,\n campaign.status as campaign_status,\n campaign_group.status as campaign_group_status,\n campaign.type,\n campaign.cost_type,\n campaign.creative_selection,\n campaign.daily_budget_amount,\n campaign.daily_budget_currency_code,\n campaign.unit_cost_amount,\n campaign.unit_cost_currency_code,\n account.currency,\n campaign.format,\n campaign.locale_country,\n campaign.locale_language,\n campaign.objective_type,\n campaign.optimization_target_type,\n campaign.is_audience_expansion_enabled,\n campaign.is_offsite_delivery_enabled,\n campaign.run_schedule_start_at,\n campaign.run_schedule_end_at,\n campaign.last_modified_at,\n campaign.created_at,\n sum(report.total_conversions) as total_conversions,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.cost) as cost,\n sum(coalesce(report.conversion_value_in_local_currency, 0)) as conversion_value_in_local_currency\n\n {{ linkedin_ads_persist_pass_through_columns(pass_through_variable='linkedin_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='linkedin_ads__campaign_passthrough_metrics', exclude_fields=['conversion_value_in_local_currency']) }}\n \n {{ linkedin_ads_persist_pass_through_columns(pass_through_variable='linkedin_ads__campaign_passthrough_metrics', transform='sum', exclude_fields=['conversion_value_in_local_currency']) }}\n\n from report \n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join campaign_group\n on campaign.campaign_group_id = campaign_group.campaign_group_id\n and campaign.source_relation = campaign_group.source_relation\n left join account \n on campaign.account_id = account.account_id\n and campaign.source_relation = account.source_relation\n\n {{ dbt_utils.group_by(30) }}\n\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__campaign_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__campaign_group_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__account_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__ad_analytics_by_campaign", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.linkedin.linkedin_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.linkedin.stg_linkedin_ads__campaign_history", "model.linkedin.stg_linkedin_ads__campaign_group_history", "model.linkedin.stg_linkedin_ads__account_history", "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign"]}, "compiled_path": "target/compiled/linkedin/models/linkedin_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith campaign as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_history\"\n where is_latest_version\n),\n\ncampaign_group as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_group_history\"\n where is_latest_version\n),\n\naccount as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__account_history\"\n where is_latest_version\n),\n\nreport as (\n\n select *,\n \n external_website_conversions + one_click_leads as total_conversions\n \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_campaign\"\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.campaign_id,\n campaign.campaign_name,\n campaign.version_tag,\n campaign_group.campaign_group_id,\n campaign_group.campaign_group_name,\n account.account_id,\n account.account_name,\n campaign.status as campaign_status,\n campaign_group.status as campaign_group_status,\n campaign.type,\n campaign.cost_type,\n campaign.creative_selection,\n campaign.daily_budget_amount,\n campaign.daily_budget_currency_code,\n campaign.unit_cost_amount,\n campaign.unit_cost_currency_code,\n account.currency,\n campaign.format,\n campaign.locale_country,\n campaign.locale_language,\n campaign.objective_type,\n campaign.optimization_target_type,\n campaign.is_audience_expansion_enabled,\n campaign.is_offsite_delivery_enabled,\n campaign.run_schedule_start_at,\n campaign.run_schedule_end_at,\n campaign.last_modified_at,\n campaign.created_at,\n sum(report.total_conversions) as total_conversions,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.cost) as cost,\n sum(coalesce(report.conversion_value_in_local_currency, 0)) as conversion_value_in_local_currency\n\n \n\n\n\n \n \n\n\n\n \n\n\n\n \n \n \n \n , sum(coalesce(external_website_conversions, 0)) as external_website_conversions\n \n\n \n \n \n \n , sum(coalesce(one_click_leads, 0)) as one_click_leads\n \n\n \n\n\n\n \n \n\n\n\n\n\n \n\n\n\n\n\n\n from report \n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join campaign_group\n on campaign.campaign_group_id = campaign_group.campaign_group_id\n and campaign.source_relation = campaign_group.source_relation\n left join account \n on campaign.account_id = account.account_id\n and campaign.source_relation = account.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30\n\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.linkedin_ads__monthly_campaign_region_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "linkedin_ads__monthly_campaign_region_report", "resource_type": "model", "package_name": "linkedin", "path": "linkedin_ads__monthly_campaign_region_report.sql", "original_file_path": "models/linkedin_ads__monthly_campaign_region_report.sql", "unique_id": "model.linkedin.linkedin_ads__monthly_campaign_region_report", "fqn": ["linkedin", "linkedin_ads__monthly_campaign_region_report"], "alias": "linkedin_ads__monthly_campaign_region_report", "checksum": {"name": "sha256", "checksum": "1a6720d282a78b77ab1c2c085d87830bd056ca8d05f4247015f4fdd7e0203e56"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the monthly performance of a campaign at the country level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}, "account_name": {"name": "account_name", "description": "A label for the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "Unique internal ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_month": {"name": "date_month", "description": "The month of the activity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "region_name": {"name": "region_name", "description": "Name of the region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost": {"name": "cost", "description": "The cost of the ads in the local currency or USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_name": {"name": "campaign_group_name", "description": "A label for the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_id": {"name": "campaign_group_id", "description": "Unique internal ID representing the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "A label for the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Unique internal ID representing the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_status": {"name": "campaign_group_status", "description": "Status of campaign's campaign group. Possible values are: ACTIVE - Denotes that the campaign group is capable of serving ads, subject to run date and budget limitations (as well as any other limitations at the account or campaign level). ARCHIVED - Denotes that the campaign group is presently inactive, and should mostly be hidden in the UI until un-archived. CANCELLED - Denotes that the campaign group has been permanently canceled and cannot be reactivated. Not a settable status. DRAFT - Denotes that the campaign group is in a preliminary state and should temporarily not be served. PAUSED - Denotes that the campaign group meets all requirements to be served, but temporarily should not be. PENDING_DELETION - Denotes that the campaign group has been requested to be deleted that is currently pending. REMOVED - Denoted that the campaign group was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_at": {"name": "last_modified_at", "description": "The timestamp of when the version was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp of when the campaign was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "version_tag": {"name": "version_tag", "description": "An integer representation of the version of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_audience_expansion_enabled": {"name": "is_audience_expansion_enabled", "description": "Boolean (default=false) representing whether Audience Expansion is enabled for the campaign provides query expansion for certain targeting criteria.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_type": {"name": "cost_type", "description": "CPM - Cost per thousand advertising impressions. If type=SPONSORED_INMAILS; cost per send(CPS) is measured as CPM x 1000.\nCPC- Cost per individual click on the associated link.\nCPV- Cost per view for video ads.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_selection": {"name": "creative_selection", "description": "ROUND_ROBIN - Rotate through available creatives to serve them as evenly as possible.\nOPTIMIZED (default) - Bias selection taking into account such as expected performance. Not available for Message and Conversation Ads (type=SPONSORED_INMAILS).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_amount": {"name": "daily_budget_amount", "description": "Maximum amount to spend per day UTC. The amount of money as a real number string.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_currency_code": {"name": "daily_budget_currency_code", "description": "ISO currency code. The currency must match that of the parent account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "format": {"name": "format", "description": "The ad format on the campaign level. See https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads/campaign-formats?view=li-lms-2022-07", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_locale_country": {"name": "campaign_locale_country", "description": "Locale of the campaign. An uppercase two-letter country code as defined by ISO-3166.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_locale_language": {"name": "campaign_locale_language", "description": "Locale of the campaign. A lowercase two-letter language code as defined by ISO-639.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective_type": {"name": "objective_type", "description": "Campaign Objective type values. Click [here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ad-budget-pricing-type-combinations?view=li-lms-2022-07) for Campaign Objective descriptions. One of: - BRAND_AWARENESS - ENGAGEMENT - JOB_APPLICANTS - LEAD_GENERATION - WEBSITE_CONVERSIONS - WEBSITE_VISITS - VIDEO_VIEWS\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_offsite_delivery_enabled": {"name": "is_offsite_delivery_enabled", "description": "Boolean indicating if this campaign to allowed to be served on the LinkedIn Audience Network to extend the reach of your campaign by delivering ads beyond the LinkedIn feed to members on third-party apps and sites.\t(default will be \"True\" from June 30, 2022)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "optimization_target_type": {"name": "optimization_target_type", "description": "Determines how this campaign is optimized for spending. If this is not set, there is no optimization. Refer to the documentation here. Default = 'NONE'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_start_at": {"name": "run_schedule_start_at", "description": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the inclusive (greater than or equal to) value in which to start the range.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_end_at": {"name": "run_schedule_end_at", "description": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the exclusive (strictly less than) value in which to end the range, if provided.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "ACTIVE - Denotes that the campaign is fully servable.\nPAUSED - Denotes that the campaign meets all requirements to be served, but temporarily should not be.\nARCHIVED - Denotes that the campaign is presently inactive, and should mostly be hidden in the UI until un-archived.\nCOMPLETED - Denotes that the campaign has reached a specified budgetary or chronological limit.\nCANCELED - Denotes that the campaign has been permanently canceled, such as when an advertising account is permanently closed.\nDRAFT - Denotes that the campaign is still being edited and not eligible for serving. Some validation will be postponed until the campaign is activated.\nPENDING_DELETION - Denotes that the campaign has been requested to be deleted that is currently pending.\nREMOVED - Denotes that the campaign was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_type": {"name": "campaign_type", "description": "TEXT_AD - Text-based ads that show up in the right column or top of the page on LinkedIn.\nSPONSORED_UPDATES - Native ads that promote a company's content updates in the LinkedIn feed.\nSPONSORED_INMAILS - Personalized messages with a call-to-action button delivered to a LinkedIn's member inbox.\nDYNAMIC - Ads that are dynamically personalized.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "unit_cost_amount": {"name": "unit_cost_amount", "description": "This value is used as one of the following: amount to bid (for manual bidding), amount which is the target cost (for target cost bidding) per click, impression, or other event depending on the pricing model, or cost cap (for cost cap bidding). The amount of money as a real number string. The amount should be non-negative if the bidding strategy is manual, target cost, or cost cap bidding. The default is 0 with the currency code set to match that of the associated account.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "unit_cost_currency_code": {"name": "unit_cost_currency_code", "description": "Amount to bid per click, impression, or other event depending on the pricing model. The default is 0 with the currency code set to match that of the associated account. ISO currency code.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_currency": {"name": "account_currency", "description": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency, on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "The total conversions being brought in the conversion fields you select in your `linkedin_ads__conversion_fields`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.487176, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__monthly_campaign_region_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__linkedin_ads_enabled','linkedin_ads__using_geo','linkedin_ads__using_monthly_ad_analytics_by_member_region'])) }}\n\nwith campaign as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_history') }}\n where is_latest_version\n),\n\ncampaign_group as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_group_history') }}\n where is_latest_version\n),\n\naccount as (\n\n select *\n from {{ ref('stg_linkedin_ads__account_history') }}\n where is_latest_version\n),\n\ngeo as (\n\n select *\n from {{ ref('stg_linkedin_ads__geo') }}\n),\n\nreport as (\n\n select *,\n {% if var('linkedin_ads__conversion_fields', none) %}\n {{ var('linkedin_ads__conversion_fields') | join(' + ') }} as total_conversions\n {% else %}\n 0 as total_conversions\n {% endif %}\n from {{ ref('stg_linkedin_ads__monthly_ad_analytics_by_region') }}\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_month,\n geo.value as region_name,\n report.campaign_id,\n campaign.campaign_name,\n campaign.version_tag,\n campaign_group.campaign_group_id,\n campaign_group.campaign_group_name,\n account.account_id,\n account.account_name,\n campaign.status as campaign_status,\n campaign_group.status as campaign_group_status,\n campaign.type as campaign_type,\n campaign.cost_type,\n campaign.creative_selection,\n campaign.daily_budget_amount,\n campaign.daily_budget_currency_code,\n campaign.unit_cost_amount,\n campaign.unit_cost_currency_code,\n account.currency as account_currency,\n campaign.format,\n campaign.locale_country as campaign_locale_country,\n campaign.locale_language as campaign_locale_language,\n campaign.objective_type,\n campaign.optimization_target_type,\n campaign.is_audience_expansion_enabled,\n campaign.is_offsite_delivery_enabled,\n campaign.run_schedule_start_at,\n campaign.run_schedule_end_at,\n campaign.last_modified_at,\n campaign.created_at,\n sum(report.total_conversions) as total_conversions,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.cost) as cost,\n sum(coalesce(report.conversion_value_in_local_currency, 0)) as conversion_value_in_local_currency\n\n {{ linkedin_ads_persist_pass_through_columns(pass_through_variable='linkedin_ads__conversion_fields', transform='sum', coalesce_with=0) }}\n \n {{ linkedin_ads_persist_pass_through_columns(pass_through_variable='linkedin_ads__monthly_ad_analytics_by_member_region_passthrough_metrics', transform='sum') }}\n\n from report\n left join geo\n on geo.geo_id = report.member_region_geo_id\n and report.source_relation = report.source_relation\n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join campaign_group\n on campaign.campaign_group_id = campaign_group.campaign_group_id\n and campaign.source_relation = campaign_group.source_relation\n left join account \n on campaign.account_id = account.account_id\n and campaign.source_relation = account.source_relation\n\n {{ dbt_utils.group_by(31) }}\n\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__campaign_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__campaign_group_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__account_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__geo", "package": null, "version": null}, {"name": "stg_linkedin_ads__monthly_ad_analytics_by_region", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.linkedin.linkedin_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.linkedin.stg_linkedin_ads__campaign_history", "model.linkedin.stg_linkedin_ads__campaign_group_history", "model.linkedin.stg_linkedin_ads__account_history", "model.linkedin.stg_linkedin_ads__geo", "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region"]}, "compiled_path": "target/compiled/linkedin/models/linkedin_ads__monthly_campaign_region_report.sql", "compiled": true, "compiled_code": "\n\nwith campaign as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_history\"\n where is_latest_version\n),\n\ncampaign_group as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_group_history\"\n where is_latest_version\n),\n\naccount as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__account_history\"\n where is_latest_version\n),\n\ngeo as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__geo\"\n),\n\nreport as (\n\n select *,\n \n external_website_conversions + one_click_leads as total_conversions\n \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__monthly_ad_analytics_by_region\"\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_month,\n geo.value as region_name,\n report.campaign_id,\n campaign.campaign_name,\n campaign.version_tag,\n campaign_group.campaign_group_id,\n campaign_group.campaign_group_name,\n account.account_id,\n account.account_name,\n campaign.status as campaign_status,\n campaign_group.status as campaign_group_status,\n campaign.type as campaign_type,\n campaign.cost_type,\n campaign.creative_selection,\n campaign.daily_budget_amount,\n campaign.daily_budget_currency_code,\n campaign.unit_cost_amount,\n campaign.unit_cost_currency_code,\n account.currency as account_currency,\n campaign.format,\n campaign.locale_country as campaign_locale_country,\n campaign.locale_language as campaign_locale_language,\n campaign.objective_type,\n campaign.optimization_target_type,\n campaign.is_audience_expansion_enabled,\n campaign.is_offsite_delivery_enabled,\n campaign.run_schedule_start_at,\n campaign.run_schedule_end_at,\n campaign.last_modified_at,\n campaign.created_at,\n sum(report.total_conversions) as total_conversions,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.cost) as cost,\n sum(coalesce(report.conversion_value_in_local_currency, 0)) as conversion_value_in_local_currency\n\n \n\n\n\n\n\n\n\n \n \n \n \n , sum(coalesce(external_website_conversions, 0)) as external_website_conversions\n \n\n \n \n \n \n , sum(coalesce(one_click_leads, 0)) as one_click_leads\n \n\n \n\n\n\n \n \n\n\n\n\n\n\n\n\n\n\n from report\n left join geo\n on geo.geo_id = report.member_region_geo_id\n and report.source_relation = report.source_relation\n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join campaign_group\n on campaign.campaign_group_id = campaign_group.campaign_group_id\n and campaign.source_relation = campaign_group.source_relation\n left join account \n on campaign.account_id = account.account_id\n and campaign.source_relation = account.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31\n\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.linkedin_ads__monthly_campaign_country_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "linkedin_ads__monthly_campaign_country_report", "resource_type": "model", "package_name": "linkedin", "path": "linkedin_ads__monthly_campaign_country_report.sql", "original_file_path": "models/linkedin_ads__monthly_campaign_country_report.sql", "unique_id": "model.linkedin.linkedin_ads__monthly_campaign_country_report", "fqn": ["linkedin", "linkedin_ads__monthly_campaign_country_report"], "alias": "linkedin_ads__monthly_campaign_country_report", "checksum": {"name": "sha256", "checksum": "f101c7eb060e5d296a9ceaf70fa5646a5f13e85f5acf1d35253b46d2d9f61327"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the monthly performance of a campaign at the country level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}, "account_name": {"name": "account_name", "description": "A label for the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "Unique internal ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_month": {"name": "date_month", "description": "The month of the activity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country_name": {"name": "country_name", "description": "Name of the country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost": {"name": "cost", "description": "The cost of the ads in the local currency or USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_name": {"name": "campaign_group_name", "description": "A label for the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_id": {"name": "campaign_group_id", "description": "Unique internal ID representing the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "A label for the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Unique internal ID representing the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_status": {"name": "campaign_group_status", "description": "Status of campaign's campaign group. Possible values are: ACTIVE - Denotes that the campaign group is capable of serving ads, subject to run date and budget limitations (as well as any other limitations at the account or campaign level). ARCHIVED - Denotes that the campaign group is presently inactive, and should mostly be hidden in the UI until un-archived. CANCELLED - Denotes that the campaign group has been permanently canceled and cannot be reactivated. Not a settable status. DRAFT - Denotes that the campaign group is in a preliminary state and should temporarily not be served. PAUSED - Denotes that the campaign group meets all requirements to be served, but temporarily should not be. PENDING_DELETION - Denotes that the campaign group has been requested to be deleted that is currently pending. REMOVED - Denoted that the campaign group was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_at": {"name": "last_modified_at", "description": "The timestamp of when the version was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp of when the campaign was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "version_tag": {"name": "version_tag", "description": "An integer representation of the version of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_audience_expansion_enabled": {"name": "is_audience_expansion_enabled", "description": "Boolean (default=false) representing whether Audience Expansion is enabled for the campaign provides query expansion for certain targeting criteria.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_type": {"name": "cost_type", "description": "CPM - Cost per thousand advertising impressions. If type=SPONSORED_INMAILS; cost per send(CPS) is measured as CPM x 1000.\nCPC- Cost per individual click on the associated link.\nCPV- Cost per view for video ads.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_selection": {"name": "creative_selection", "description": "ROUND_ROBIN - Rotate through available creatives to serve them as evenly as possible.\nOPTIMIZED (default) - Bias selection taking into account such as expected performance. Not available for Message and Conversation Ads (type=SPONSORED_INMAILS).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_amount": {"name": "daily_budget_amount", "description": "Maximum amount to spend per day UTC. The amount of money as a real number string.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_currency_code": {"name": "daily_budget_currency_code", "description": "ISO currency code. The currency must match that of the parent account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "format": {"name": "format", "description": "The ad format on the campaign level. See https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads/campaign-formats?view=li-lms-2022-07", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_locale_country": {"name": "campaign_locale_country", "description": "Locale of the campaign. An uppercase two-letter country code as defined by ISO-3166.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_locale_language": {"name": "campaign_locale_language", "description": "Locale of the campaign. A lowercase two-letter language code as defined by ISO-639.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective_type": {"name": "objective_type", "description": "Campaign Objective type values. Click [here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ad-budget-pricing-type-combinations?view=li-lms-2022-07) for Campaign Objective descriptions. One of: - BRAND_AWARENESS - ENGAGEMENT - JOB_APPLICANTS - LEAD_GENERATION - WEBSITE_CONVERSIONS - WEBSITE_VISITS - VIDEO_VIEWS\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_offsite_delivery_enabled": {"name": "is_offsite_delivery_enabled", "description": "Boolean indicating if this campaign to allowed to be served on the LinkedIn Audience Network to extend the reach of your campaign by delivering ads beyond the LinkedIn feed to members on third-party apps and sites.\t(default will be \"True\" from June 30, 2022)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "optimization_target_type": {"name": "optimization_target_type", "description": "Determines how this campaign is optimized for spending. If this is not set, there is no optimization. Refer to the documentation here. Default = 'NONE'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_start_at": {"name": "run_schedule_start_at", "description": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the inclusive (greater than or equal to) value in which to start the range.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_end_at": {"name": "run_schedule_end_at", "description": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the exclusive (strictly less than) value in which to end the range, if provided.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "ACTIVE - Denotes that the campaign is fully servable.\nPAUSED - Denotes that the campaign meets all requirements to be served, but temporarily should not be.\nARCHIVED - Denotes that the campaign is presently inactive, and should mostly be hidden in the UI until un-archived.\nCOMPLETED - Denotes that the campaign has reached a specified budgetary or chronological limit.\nCANCELED - Denotes that the campaign has been permanently canceled, such as when an advertising account is permanently closed.\nDRAFT - Denotes that the campaign is still being edited and not eligible for serving. Some validation will be postponed until the campaign is activated.\nPENDING_DELETION - Denotes that the campaign has been requested to be deleted that is currently pending.\nREMOVED - Denotes that the campaign was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_type": {"name": "campaign_type", "description": "TEXT_AD - Text-based ads that show up in the right column or top of the page on LinkedIn.\nSPONSORED_UPDATES - Native ads that promote a company's content updates in the LinkedIn feed.\nSPONSORED_INMAILS - Personalized messages with a call-to-action button delivered to a LinkedIn's member inbox.\nDYNAMIC - Ads that are dynamically personalized.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "unit_cost_amount": {"name": "unit_cost_amount", "description": "This value is used as one of the following: amount to bid (for manual bidding), amount which is the target cost (for target cost bidding) per click, impression, or other event depending on the pricing model, or cost cap (for cost cap bidding). The amount of money as a real number string. The amount should be non-negative if the bidding strategy is manual, target cost, or cost cap bidding. The default is 0 with the currency code set to match that of the associated account.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "unit_cost_currency_code": {"name": "unit_cost_currency_code", "description": "Amount to bid per click, impression, or other event depending on the pricing model. The default is 0 with the currency code set to match that of the associated account. ISO currency code.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_currency": {"name": "account_currency", "description": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency, on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "The total conversions being brought in the conversion fields you select in your `linkedin_ads__conversion_fields`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.484275, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__monthly_campaign_country_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__linkedin_ads_enabled','linkedin_ads__using_geo','linkedin_ads__using_monthly_ad_analytics_by_member_country'])) }}\n\nwith campaign as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_history') }}\n where is_latest_version\n),\n\ncampaign_group as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_group_history') }}\n where is_latest_version\n),\n\naccount as (\n\n select *\n from {{ ref('stg_linkedin_ads__account_history') }}\n where is_latest_version\n),\n\ngeo as (\n\n select *\n from {{ ref('stg_linkedin_ads__geo') }}\n),\n\nreport as (\n\n select *,\n {% if var('linkedin_ads__conversion_fields', none) %}\n {{ var('linkedin_ads__conversion_fields') | join(' + ') }} as total_conversions\n {% else %}\n 0 as total_conversions\n {% endif %}\n from {{ ref('stg_linkedin_ads__monthly_ad_analytics_by_country') }}\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_month,\n geo.value as country_name,\n report.campaign_id,\n campaign.campaign_name,\n campaign.version_tag,\n campaign_group.campaign_group_id,\n campaign_group.campaign_group_name,\n account.account_id,\n account.account_name,\n campaign.status as campaign_status,\n campaign_group.status as campaign_group_status,\n campaign.type as campaign_type,\n campaign.cost_type,\n campaign.creative_selection,\n campaign.daily_budget_amount,\n campaign.daily_budget_currency_code,\n campaign.unit_cost_amount,\n campaign.unit_cost_currency_code,\n account.currency as account_currency,\n campaign.format,\n campaign.locale_country as campaign_locale_country,\n campaign.locale_language as campaign_locale_language,\n campaign.objective_type,\n campaign.optimization_target_type,\n campaign.is_audience_expansion_enabled,\n campaign.is_offsite_delivery_enabled,\n campaign.run_schedule_start_at,\n campaign.run_schedule_end_at,\n campaign.last_modified_at,\n campaign.created_at,\n sum(report.total_conversions) as total_conversions,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.cost) as cost,\n sum(coalesce(report.conversion_value_in_local_currency, 0)) as conversion_value_in_local_currency\n\n {{ linkedin_ads_persist_pass_through_columns(pass_through_variable='linkedin_ads__conversion_fields', transform='sum', coalesce_with=0) }}\n \n {{ linkedin_ads_persist_pass_through_columns(pass_through_variable='linkedin_ads__monthly_ad_analytics_by_member_country_passthrough_metrics', transform='sum') }}\n\n from report \n left join geo\n on geo.geo_id = report.member_country_geo_id\n and report.source_relation = report.source_relation\n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join campaign_group\n on campaign.campaign_group_id = campaign_group.campaign_group_id\n and campaign.source_relation = campaign_group.source_relation\n left join account \n on campaign.account_id = account.account_id\n and campaign.source_relation = account.source_relation\n\n {{ dbt_utils.group_by(31) }}\n\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__campaign_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__campaign_group_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__account_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__geo", "package": null, "version": null}, {"name": "stg_linkedin_ads__monthly_ad_analytics_by_country", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.linkedin.linkedin_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.linkedin.stg_linkedin_ads__campaign_history", "model.linkedin.stg_linkedin_ads__campaign_group_history", "model.linkedin.stg_linkedin_ads__account_history", "model.linkedin.stg_linkedin_ads__geo", "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country"]}, "compiled_path": "target/compiled/linkedin/models/linkedin_ads__monthly_campaign_country_report.sql", "compiled": true, "compiled_code": "\n\nwith campaign as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_history\"\n where is_latest_version\n),\n\ncampaign_group as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_group_history\"\n where is_latest_version\n),\n\naccount as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__account_history\"\n where is_latest_version\n),\n\ngeo as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__geo\"\n),\n\nreport as (\n\n select *,\n \n external_website_conversions + one_click_leads as total_conversions\n \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__monthly_ad_analytics_by_country\"\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_month,\n geo.value as country_name,\n report.campaign_id,\n campaign.campaign_name,\n campaign.version_tag,\n campaign_group.campaign_group_id,\n campaign_group.campaign_group_name,\n account.account_id,\n account.account_name,\n campaign.status as campaign_status,\n campaign_group.status as campaign_group_status,\n campaign.type as campaign_type,\n campaign.cost_type,\n campaign.creative_selection,\n campaign.daily_budget_amount,\n campaign.daily_budget_currency_code,\n campaign.unit_cost_amount,\n campaign.unit_cost_currency_code,\n account.currency as account_currency,\n campaign.format,\n campaign.locale_country as campaign_locale_country,\n campaign.locale_language as campaign_locale_language,\n campaign.objective_type,\n campaign.optimization_target_type,\n campaign.is_audience_expansion_enabled,\n campaign.is_offsite_delivery_enabled,\n campaign.run_schedule_start_at,\n campaign.run_schedule_end_at,\n campaign.last_modified_at,\n campaign.created_at,\n sum(report.total_conversions) as total_conversions,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.cost) as cost,\n sum(coalesce(report.conversion_value_in_local_currency, 0)) as conversion_value_in_local_currency\n\n \n\n\n\n\n\n\n\n \n \n \n \n , sum(coalesce(external_website_conversions, 0)) as external_website_conversions\n \n\n \n \n \n \n , sum(coalesce(one_click_leads, 0)) as one_click_leads\n \n\n \n\n\n\n \n \n\n\n\n\n\n\n\n\n\n\n from report \n left join geo\n on geo.geo_id = report.member_country_geo_id\n and report.source_relation = report.source_relation\n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join campaign_group\n on campaign.campaign_group_id = campaign_group.campaign_group_id\n and campaign.source_relation = campaign_group.source_relation\n left join account \n on campaign.account_id = account.account_id\n and campaign.source_relation = account.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31\n\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.linkedin_ads__account_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "linkedin_ads__account_report", "resource_type": "model", "package_name": "linkedin", "path": "linkedin_ads__account_report.sql", "original_file_path": "models/linkedin_ads__account_report.sql", "unique_id": "model.linkedin.linkedin_ads__account_report", "fqn": ["linkedin", "linkedin_ads__account_report"], "alias": "linkedin_ads__account_report", "checksum": {"name": "sha256", "checksum": "7a41431883d88c0a39ba361aed8802d1c9111e356f2897d83b474a497496d6da"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the account level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}, "account_name": {"name": "account_name", "description": "A label for the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "Unique internal ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The day of the activity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost": {"name": "cost", "description": "The cost of the ads in the local currency or USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_at": {"name": "last_modified_at", "description": "The timestamp of when the version was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp of when the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "version_tag": {"name": "version_tag", "description": "An integer representation of the version of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "ACTIVE - Account is active; this is the default state\nCANCELLED - Account has been permanently cancelled\nDRAFT - Account is in draft status, meaning it's not yet fully set up and it is not serving\nPENDING_DELETION - Denotes that the account has been requested to be deleted that is currently pending\nREMOVED - Denotes that the account was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "type": {"name": "type", "description": "BUSINESS - This is the only value allowed when creating accounts through the API.\nENTERPRISE - This value cannot be used to create accounts through the API and is reserved for accounts created by LinkedIn's internal ad operations systems.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency, on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "The total conversions being brought in the conversion fields you select in your `linkedin_ads__conversion_fields`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.4612286, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__account_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\nwith account as (\n\n select *\n from {{ ref('stg_linkedin_ads__account_history') }}\n where is_latest_version\n),\n\ncampaign as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_history') }}\n where is_latest_version\n),\n\nreport as (\n\n select *,\n {% if var('linkedin_ads__conversion_fields', none) %}\n {{ var('linkedin_ads__conversion_fields') | join(' + ') }} as total_conversions\n {% else %}\n 0 as total_conversions\n {% endif %}\n from {{ ref('stg_linkedin_ads__ad_analytics_by_campaign') }}\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n account.account_id,\n account.account_name,\n account.version_tag,\n account.currency,\n account.status,\n account.type,\n account.last_modified_at,\n account.created_at,\n sum(report.total_conversions) as total_conversions,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.cost) as cost,\n sum(coalesce(report.conversion_value_in_local_currency, 0)) as conversion_value_in_local_currency\n\n {{ linkedin_ads_persist_pass_through_columns(pass_through_variable='linkedin_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='linkedin_ads__campaign_passthrough_metrics', exclude_fields=['conversion_value_in_local_currency']) }}\n \n {{ linkedin_ads_persist_pass_through_columns(pass_through_variable='linkedin_ads__campaign_passthrough_metrics', transform='sum', exclude_fields=['conversion_value_in_local_currency']) }}\n\n from report \n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join account \n on campaign.account_id = account.account_id\n and campaign.source_relation = account.source_relation\n\n {{ dbt_utils.group_by(10) }}\n\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__account_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__campaign_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__ad_analytics_by_campaign", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.linkedin.linkedin_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.linkedin.stg_linkedin_ads__account_history", "model.linkedin.stg_linkedin_ads__campaign_history", "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign"]}, "compiled_path": "target/compiled/linkedin/models/linkedin_ads__account_report.sql", "compiled": true, "compiled_code": "\n\nwith account as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__account_history\"\n where is_latest_version\n),\n\ncampaign as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_history\"\n where is_latest_version\n),\n\nreport as (\n\n select *,\n \n external_website_conversions + one_click_leads as total_conversions\n \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_campaign\"\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n account.account_id,\n account.account_name,\n account.version_tag,\n account.currency,\n account.status,\n account.type,\n account.last_modified_at,\n account.created_at,\n sum(report.total_conversions) as total_conversions,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.cost) as cost,\n sum(coalesce(report.conversion_value_in_local_currency, 0)) as conversion_value_in_local_currency\n\n \n\n\n\n \n \n\n\n\n \n\n\n\n \n \n \n \n , sum(coalesce(external_website_conversions, 0)) as external_website_conversions\n \n\n \n \n \n \n , sum(coalesce(one_click_leads, 0)) as one_click_leads\n \n\n \n\n\n\n \n \n\n\n\n\n\n \n\n\n\n\n\n\n from report \n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join account \n on campaign.account_id = account.account_id\n and campaign.source_relation = account.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10\n\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.linkedin_ads__campaign_group_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "linkedin_ads__campaign_group_report", "resource_type": "model", "package_name": "linkedin", "path": "linkedin_ads__campaign_group_report.sql", "original_file_path": "models/linkedin_ads__campaign_group_report.sql", "unique_id": "model.linkedin.linkedin_ads__campaign_group_report", "fqn": ["linkedin", "linkedin_ads__campaign_group_report"], "alias": "linkedin_ads__campaign_group_report", "checksum": {"name": "sha256", "checksum": "6779ecaffd04d2f0d0bb9d8de21809f90a53ed6d8e9d0b5a481e1b4d99c125f2"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the campaign group level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}, "account_name": {"name": "account_name", "description": "A label for the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "Unique internal ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The day of the activity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost": {"name": "cost", "description": "The cost of the ads in the local currency or USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_name": {"name": "campaign_group_name", "description": "A label for the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_id": {"name": "campaign_group_id", "description": "Unique internal ID representing the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_at": {"name": "last_modified_at", "description": "The timestamp of when the version was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp of when the campaign group was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_backfilled": {"name": "is_backfilled", "description": "Flag that denotes whether the campaign group was created organically or to backfill existing campaigns. This is a read-only field set by the system. Default = false.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_start_at": {"name": "run_schedule_start_at", "description": "Represents the inclusive (greater than or equal to) date when to start running the associated campaigns under this campaign group. This field is required.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_end_at": {"name": "run_schedule_end_at", "description": "Represents the exclusive (strictly less than) date when to stop running the associated campaigns under this campaign group. If this field is unset, it indicates an open range with no end date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Status of campaign group. Possible values are: ACTIVE - Denotes that the campaign group is capable of serving ads, subject to run date and budget limitations (as well as any other limitations at the account or campaign level). ARCHIVED - Denotes that the campaign group is presently inactive, and should mostly be hidden in the UI until un-archived. CANCELLED - Denotes that the campaign group has been permanently canceled and cannot be reactivated. Not a settable status. DRAFT - Denotes that the campaign group is in a preliminary state and should temporarily not be served. PAUSED - Denotes that the campaign group meets all requirements to be served, but temporarily should not be. PENDING_DELETION - Denotes that the campaign group has been requested to be deleted that is currently pending. REMOVED - Denoted that the campaign group was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency, on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "The total conversions being brought in the conversion fields you select in your `linkedin_ads__conversion_fields`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.4721801, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__campaign_group_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\nwith campaign_group as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_group_history') }}\n where is_latest_version\n),\n\ncampaign as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_history') }}\n where is_latest_version\n),\n\naccount as (\n\n select *\n from {{ ref('stg_linkedin_ads__account_history') }}\n where is_latest_version\n),\n\nreport as (\n\n select *,\n {% if var('linkedin_ads__conversion_fields', none) %}\n {{ var('linkedin_ads__conversion_fields') | join(' + ') }} as total_conversions\n {% else %}\n 0 as total_conversions\n {% endif %}\n from {{ ref('stg_linkedin_ads__ad_analytics_by_campaign') }}\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n campaign_group.campaign_group_id,\n campaign_group.campaign_group_name,\n account.account_id,\n account.account_name,\n campaign_group.status,\n account.currency,\n campaign_group.is_backfilled,\n campaign_group.run_schedule_start_at,\n campaign_group.run_schedule_end_at,\n campaign_group.last_modified_at,\n campaign_group.created_at,\n sum(report.total_conversions) as total_conversions,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.cost) as cost,\n sum(coalesce(report.conversion_value_in_local_currency, 0)) as conversion_value_in_local_currency\n\n {{ linkedin_ads_persist_pass_through_columns(pass_through_variable='linkedin_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='linkedin_ads__campaign_passthrough_metrics', exclude_fields=['conversion_value_in_local_currency']) }}\n\n {{ linkedin_ads_persist_pass_through_columns(pass_through_variable='linkedin_ads__campaign_passthrough_metrics', transform='sum', exclude_fields=['conversion_value_in_local_currency']) }}\n\n from report \n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join campaign_group\n on campaign.campaign_group_id = campaign_group.campaign_group_id\n and campaign.source_relation = campaign_group.source_relation\n left join account \n on campaign.account_id = account.account_id\n and campaign.source_relation = account.source_relation\n\n {{ dbt_utils.group_by(13) }}\n\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__campaign_group_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__campaign_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__account_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__ad_analytics_by_campaign", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.linkedin.linkedin_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.linkedin.stg_linkedin_ads__campaign_group_history", "model.linkedin.stg_linkedin_ads__campaign_history", "model.linkedin.stg_linkedin_ads__account_history", "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign"]}, "compiled_path": "target/compiled/linkedin/models/linkedin_ads__campaign_group_report.sql", "compiled": true, "compiled_code": "\n\nwith campaign_group as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_group_history\"\n where is_latest_version\n),\n\ncampaign as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_history\"\n where is_latest_version\n),\n\naccount as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__account_history\"\n where is_latest_version\n),\n\nreport as (\n\n select *,\n \n external_website_conversions + one_click_leads as total_conversions\n \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_campaign\"\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n campaign_group.campaign_group_id,\n campaign_group.campaign_group_name,\n account.account_id,\n account.account_name,\n campaign_group.status,\n account.currency,\n campaign_group.is_backfilled,\n campaign_group.run_schedule_start_at,\n campaign_group.run_schedule_end_at,\n campaign_group.last_modified_at,\n campaign_group.created_at,\n sum(report.total_conversions) as total_conversions,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.cost) as cost,\n sum(coalesce(report.conversion_value_in_local_currency, 0)) as conversion_value_in_local_currency\n\n \n\n\n\n \n \n\n\n\n \n\n\n\n \n \n \n \n , sum(coalesce(external_website_conversions, 0)) as external_website_conversions\n \n\n \n \n \n \n , sum(coalesce(one_click_leads, 0)) as one_click_leads\n \n\n \n\n\n\n\n \n\n\n\n\n\n \n\n\n\n\n\n\n from report \n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join campaign_group\n on campaign.campaign_group_id = campaign_group.campaign_group_id\n and campaign.source_relation = campaign_group.source_relation\n left join account \n on campaign.account_id = account.account_id\n and campaign.source_relation = account.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13\n\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.linkedin_ads__url_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "linkedin_ads__url_report", "resource_type": "model", "package_name": "linkedin", "path": "linkedin_ads__url_report.sql", "original_file_path": "models/linkedin_ads__url_report.sql", "unique_id": "model.linkedin.linkedin_ads__url_report", "fqn": ["linkedin", "linkedin_ads__url_report"], "alias": "linkedin_ads__url_report", "checksum": {"name": "sha256", "checksum": "8e023b4ed38d8a2914262e47ea0bcb43312398adbab36df8774dd7eecef77b7d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the url level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}, "account_name": {"name": "account_name", "description": "A label for the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "Unique internal ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The day of the activity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost": {"name": "cost", "description": "The cost of the ads in the local currency or USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_name": {"name": "campaign_group_name", "description": "A label for the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_id": {"name": "campaign_group_id", "description": "Unique internal ID representing the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_id": {"name": "creative_id", "description": "Unique internal ID representing the creative.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_uri": {"name": "click_uri", "description": "The URL where the member should be redirected to, on clicking the text ad or spotlight ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_uri_type": {"name": "click_uri_type", "description": "Will either be `text_ad`, `spotlight`, or `null` to indicate the origin of the click_uri.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_host": {"name": "url_host", "description": "The URL host of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_path": {"name": "url_path", "description": "The URL path of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_source": {"name": "utm_source", "description": "The utm_source parameter of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_medium": {"name": "utm_medium", "description": "The utm_medium parameter of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_campaign": {"name": "utm_campaign", "description": "The utm_campaign parameter of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_content": {"name": "utm_content", "description": "The utm_content parameter of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_term": {"name": "utm_term", "description": "The utm_term parameter of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "A label for the creative's campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Unique internal ID representing the creative's campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency, on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "The total conversions being brought in the conversion fields you select in your `linkedin_ads__conversion_fields`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.4796984, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__url_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\nwith creative as (\n\n select *\n from {{ ref('stg_linkedin_ads__creative_history') }}\n where is_latest_version\n),\n\ncampaign as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_history') }}\n where is_latest_version\n),\n\ncampaign_group as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_group_history') }}\n where is_latest_version\n),\n\naccount as (\n\n select *\n from {{ ref('stg_linkedin_ads__account_history') }}\n where is_latest_version\n),\n\nreport as (\n\n select *,\n {% if var('linkedin_ads__conversion_fields', none) %}\n {{ var('linkedin_ads__conversion_fields') | join(' + ') }} as total_conversions\n {% else %}\n 0 as total_conversions\n {% endif %}\n from {{ ref('stg_linkedin_ads__ad_analytics_by_creative') }}\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n creative.click_uri,\n creative.click_uri_type,\n creative.base_url,\n creative.url_host,\n creative.url_path,\n creative.utm_source,\n creative.utm_medium,\n creative.utm_campaign,\n creative.utm_content,\n creative.utm_term,\n report.creative_id,\n campaign.campaign_id,\n campaign.campaign_name,\n campaign_group.campaign_group_id,\n campaign_group.campaign_group_name,\n account.account_id,\n account.account_name,\n account.currency,\n sum(report.total_conversions) as total_conversions,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.cost) as cost,\n sum(coalesce(report.conversion_value_in_local_currency, 0)) as conversion_value_in_local_currency\n\n {{ linkedin_ads_persist_pass_through_columns(pass_through_variable='linkedin_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='linkedin_ads__creative_passthrough_metrics', exclude_fields=['conversion_value_in_local_currency']) }}\n\n {{ linkedin_ads_persist_pass_through_columns(pass_through_variable='linkedin_ads__creative_passthrough_metrics', transform='sum', exclude_fields=['conversion_value_in_local_currency']) }}\n\n from report \n left join creative \n on report.creative_id = creative.creative_id\n and report.source_relation = creative.source_relation\n left join campaign \n on creative.campaign_id = campaign.campaign_id\n and creative.source_relation = campaign.source_relation\n left join campaign_group\n on campaign.campaign_group_id = campaign_group.campaign_group_id\n and campaign.source_relation = campaign_group.source_relation\n left join account \n on campaign.account_id = account.account_id\n and campaign.source_relation = account.source_relation\n\n {% if var('ad_reporting__url_report__using_null_filter', True) %}\n where creative.click_uri is not null\n {% endif %}\n\n {{ dbt_utils.group_by(20) }}\n\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__creative_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__campaign_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__campaign_group_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__account_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__ad_analytics_by_creative", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.linkedin.linkedin_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.linkedin.stg_linkedin_ads__creative_history", "model.linkedin.stg_linkedin_ads__campaign_history", "model.linkedin.stg_linkedin_ads__campaign_group_history", "model.linkedin.stg_linkedin_ads__account_history", "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative"]}, "compiled_path": "target/compiled/linkedin/models/linkedin_ads__url_report.sql", "compiled": true, "compiled_code": "\n\nwith creative as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__creative_history\"\n where is_latest_version\n),\n\ncampaign as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_history\"\n where is_latest_version\n),\n\ncampaign_group as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_group_history\"\n where is_latest_version\n),\n\naccount as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__account_history\"\n where is_latest_version\n),\n\nreport as (\n\n select *,\n \n external_website_conversions + one_click_leads as total_conversions\n \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_creative\"\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n creative.click_uri,\n creative.click_uri_type,\n creative.base_url,\n creative.url_host,\n creative.url_path,\n creative.utm_source,\n creative.utm_medium,\n creative.utm_campaign,\n creative.utm_content,\n creative.utm_term,\n report.creative_id,\n campaign.campaign_id,\n campaign.campaign_name,\n campaign_group.campaign_group_id,\n campaign_group.campaign_group_name,\n account.account_id,\n account.account_name,\n account.currency,\n sum(report.total_conversions) as total_conversions,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.cost) as cost,\n sum(coalesce(report.conversion_value_in_local_currency, 0)) as conversion_value_in_local_currency\n\n \n\n\n\n \n \n\n\n\n \n\n\n\n \n \n \n \n , sum(coalesce(external_website_conversions, 0)) as external_website_conversions\n \n\n \n \n \n \n , sum(coalesce(one_click_leads, 0)) as one_click_leads\n \n\n \n\n\n\n\n \n\n\n\n\n\n \n\n\n\n\n\n\n from report \n left join creative \n on report.creative_id = creative.creative_id\n and report.source_relation = creative.source_relation\n left join campaign \n on creative.campaign_id = campaign.campaign_id\n and creative.source_relation = campaign.source_relation\n left join campaign_group\n on campaign.campaign_group_id = campaign_group.campaign_group_id\n and campaign.source_relation = campaign_group.source_relation\n left join account \n on campaign.account_id = account.account_id\n and campaign.source_relation = account.source_relation\n\n \n where creative.click_uri is not null\n \n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20\n\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__geo": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__geo", "resource_type": "model", "package_name": "linkedin", "path": "staging/stg_linkedin_ads__geo.sql", "original_file_path": "models/staging/stg_linkedin_ads__geo.sql", "unique_id": "model.linkedin.stg_linkedin_ads__geo", "fqn": ["linkedin", "staging", "stg_linkedin_ads__geo"], "alias": "stg_linkedin_ads__geo", "checksum": {"name": "sha256", "checksum": "1221c12cde0473dad3e0c17877ace55b91e7799d52d957ecc56a01029f5bc0a4"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Contains geographic data for LinkedIn Ads, including IDs and names of locations.", "columns": {"geo_id": {"name": "geo_id", "description": "Unique identifier for the geographic entity, used for joins in reporting tables.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "value": {"name": "value", "description": "Name of the geographic entity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/staging/stg_linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.6173809, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__geo\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__linkedin_ads_enabled','linkedin_ads__using_geo'])) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_linkedin_ads__geo_tmp') }}\n),\n\nmacro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_linkedin_ads__geo_tmp')),\n staging_columns=get_geo_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='linkedin_ads') }}\n\n from base\n),\n\nfields as (\n \n select \n source_relation,\n id as geo_id,\n value\n from macro\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__geo_tmp", "package": null, "version": null}, {"name": "stg_linkedin_ads__geo_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.linkedin.get_geo_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.linkedin.stg_linkedin_ads__geo_tmp"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin_ads__geo.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__geo_tmp\"\n),\n\nmacro as (\n\n select\n \n id as id,\n value as value\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfields as (\n \n select \n source_relation,\n id as geo_id,\n value\n from macro\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__account_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__account_history", "resource_type": "model", "package_name": "linkedin", "path": "staging/stg_linkedin_ads__account_history.sql", "original_file_path": "models/staging/stg_linkedin_ads__account_history.sql", "unique_id": "model.linkedin.stg_linkedin_ads__account_history", "fqn": ["linkedin", "staging", "stg_linkedin_ads__account_history"], "alias": "stg_linkedin_ads__account_history", "checksum": {"name": "sha256", "checksum": "aec5ac772fcfb96cf146e71d9bee6e5c4ad90cdf6594de9464a26205f63fa627"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a 'version' of an account.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}, "account_id": {"name": "account_id", "description": "Unique internal ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_at": {"name": "last_modified_at", "description": "The timestamp of when the version was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp of when the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "A label for the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "version_tag": {"name": "version_tag", "description": "An integer representation of the version of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "ACTIVE - Account is active; this is the default state\nCANCELLED - Account has been permanently cancelled\nDRAFT - Account is in draft status, meaning it's not yet fully set up and it is not serving\nPENDING_DELETION - Denotes that the account has been requested to be deleted that is currently pending\nREMOVED - Denotes that the account was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "type": {"name": "type", "description": "BUSINESS - This is the only value allowed when creating accounts through the API.\nENTERPRISE - This value cannot be used to create accounts through the API and is reserved for accounts created by LinkedIn's internal ad operations systems.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_latest_version": {"name": "is_latest_version", "description": "Boolean of whether the record is the latest version of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/staging/stg_linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.6160533, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__account_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_linkedin_ads__account_history_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_linkedin_ads__account_history_tmp')),\n staging_columns=get_account_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='linkedin_ads') }}\n\n from base\n\n), fields as (\n\n select \n source_relation,\n id as account_id,\n name as account_name,\n currency,\n cast(version_tag as numeric) as version_tag,\n status,\n type,\n cast(last_modified_time as {{ dbt.type_timestamp() }}) as last_modified_at,\n cast(created_time as {{ dbt.type_timestamp() }}) as created_at,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='linkedin_ads') }} order by last_modified_time desc) = 1 as is_latest_version\n\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__account_history_tmp", "package": null, "version": null}, {"name": "stg_linkedin_ads__account_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.linkedin.get_account_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.linkedin.stg_linkedin_ads__account_history_tmp"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin_ads__account_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__account_history_tmp\"\n\n), macro as (\n\n select\n \n created_time as created_time,\n currency as currency,\n id as id,\n last_modified_time as last_modified_time,\n name as name,\n cast(null as TEXT) as status,\n cast(null as TEXT) as type,\n version_tag as version_tag\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n\n), fields as (\n\n select \n source_relation,\n id as account_id,\n name as account_name,\n currency,\n cast(version_tag as numeric) as version_tag,\n status,\n type,\n cast(last_modified_time as timestamp) as last_modified_at,\n cast(created_time as timestamp) as created_at,\n row_number() over (partition by id order by last_modified_time desc) = 1 as is_latest_version\n\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__ad_analytics_by_creative", "resource_type": "model", "package_name": "linkedin", "path": "staging/stg_linkedin_ads__ad_analytics_by_creative.sql", "original_file_path": "models/staging/stg_linkedin_ads__ad_analytics_by_creative.sql", "unique_id": "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative", "fqn": ["linkedin", "staging", "stg_linkedin_ads__ad_analytics_by_creative"], "alias": "stg_linkedin_ads__ad_analytics_by_creative", "checksum": {"name": "sha256", "checksum": "258989351017d31f229836fda56eb8122d48e1212fc0b544b3863af53c938c57"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the creative level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}, "creative_id": {"name": "creative_id", "description": "The ID of the related creative.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The day of the activity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost": {"name": "cost", "description": "The cost of the ads in the local currency or USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/staging/stg_linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.6092238, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_creative\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_linkedin_ads__ad_analytics_by_creative_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_linkedin_ads__ad_analytics_by_creative_tmp')),\n staging_columns=get_ad_analytics_by_creative_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='linkedin_ads') }}\n\n from base\n\n), fields as (\n\n select\n source_relation,\n {{ dbt.date_trunc('day', 'day') }} as date_day,\n creative_id,\n clicks, \n impressions,\n {% if var('linkedin_ads__use_local_currency', false) %}\n cost_in_local_currency as cost,\n {% else %}\n cost_in_usd as cost,\n {% endif %}\n\n coalesce(cast(conversion_value_in_local_currency as {{ dbt.type_float() }}), 0) as conversion_value_in_local_currency\n\n {% for conversion in var('linkedin_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {{ linkedin_ads_fill_pass_through_columns(pass_through_fields=var('linkedin_ads__creative_passthrough_metrics'), except=(var('linkedin_ads__conversion_fields') + ['conversion_value_in_local_currency'])) }}\n\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__ad_analytics_by_creative_tmp", "package": null, "version": null}, {"name": "stg_linkedin_ads__ad_analytics_by_creative_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.linkedin.get_ad_analytics_by_creative_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.date_trunc", "macro.dbt.type_float", "macro.dbt.type_bigint", "macro.linkedin.linkedin_ads_fill_pass_through_columns"], "nodes": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_creative_tmp"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin_ads__ad_analytics_by_creative.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_creative_tmp\"\n\n), macro as (\n\n select\n \n clicks as clicks,\n cost_in_local_currency as cost_in_local_currency,\n cost_in_usd as cost_in_usd,\n creative_id as creative_id,\n day as day,\n impressions as impressions,\n conversion_value_in_local_currency as conversion_value_in_local_currency,\n external_website_conversions as external_website_conversions,\n one_click_leads as one_click_leads\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n\n), fields as (\n\n select\n source_relation,\n date_trunc('day', day) as date_day,\n creative_id,\n clicks, \n impressions,\n \n cost_in_usd as cost,\n \n\n coalesce(cast(conversion_value_in_local_currency as float), 0) as conversion_value_in_local_currency\n\n \n , coalesce(cast(external_website_conversions as bigint), 0) as external_website_conversions\n \n , coalesce(cast(one_click_leads as bigint), 0) as one_click_leads\n \n\n \n\n\n\n\n\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__monthly_ad_analytics_by_country", "resource_type": "model", "package_name": "linkedin", "path": "staging/stg_linkedin_ads__monthly_ad_analytics_by_country.sql", "original_file_path": "models/staging/stg_linkedin_ads__monthly_ad_analytics_by_country.sql", "unique_id": "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country", "fqn": ["linkedin", "staging", "stg_linkedin_ads__monthly_ad_analytics_by_country"], "alias": "stg_linkedin_ads__monthly_ad_analytics_by_country", "checksum": {"name": "sha256", "checksum": "6800a7412b3c37a568dda7d759a63a685f06fd9ed83b8051de2c122b5b493cac"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Monthly LinkedIn Ads performance metrics aggregated by member country and campaign.", "columns": {"campaign_id": {"name": "campaign_id", "description": "Identifier of the LinkedIn Ads campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_month": {"name": "date_month", "description": "Month of the reporting data, aliased as `date_month`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "member_country_geo_id": {"name": "member_country_geo_id", "description": "ID representing the country of the LinkedIn members who interacted with the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost": {"name": "cost", "description": "The cost of the ads in the local currency or USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/staging/stg_linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.61877, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__monthly_ad_analytics_by_country\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__linkedin_ads_enabled','linkedin_ads__using_monthly_ad_analytics_by_member_country'])) }}\n\n\nwith base as (\n\n select * \n from {{ ref('stg_linkedin_ads__monthly_ad_analytics_by_country_tmp') }}\n),\n\nmacro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_linkedin_ads__monthly_ad_analytics_by_country_tmp')),\n staging_columns=get_monthly_ad_analytics_by_member_country_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='linkedin_ads') }}\n\n from base\n),\n\nfields as (\n \n select \n source_relation,\n {{ linkedin.date_from_month_string('date_month') }} as date_month, --Renamed in macros/get_monthly_ad_analytics_by_member_country_columns to avoid reserved word error.\n campaign_id,\n member_country as member_country_geo_id,\n clicks,\n impressions,\n {% if var('linkedin_ads__use_local_currency', false) %}\n cost_in_local_currency as cost,\n {% else %}\n cost_in_usd as cost,\n {% endif %}\n\n coalesce(cast(conversion_value_in_local_currency as {{ dbt.type_float() }}), 0) as conversion_value_in_local_currency\n\n {% for conversion in var('linkedin_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {{ linkedin_ads_fill_pass_through_columns(pass_through_fields=var('linkedin_ads__monthly_ad_analytics_by_member_country_passthrough_metrics')) }}\n\n from macro\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__monthly_ad_analytics_by_country_tmp", "package": null, "version": null}, {"name": "stg_linkedin_ads__monthly_ad_analytics_by_country_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.linkedin.get_monthly_ad_analytics_by_member_country_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.linkedin.date_from_month_string", "macro.dbt.type_float", "macro.dbt.type_bigint", "macro.linkedin.linkedin_ads_fill_pass_through_columns"], "nodes": ["model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country_tmp"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin_ads__monthly_ad_analytics_by_country.sql", "compiled": true, "compiled_code": "\n\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__monthly_ad_analytics_by_country_tmp\"\n),\n\nmacro as (\n\n select\n \n campaign_id as campaign_id,\n month as date_month,\n clicks as clicks,\n member_country as member_country,\n impressions as impressions,\n conversion_value_in_local_currency as conversion_value_in_local_currency,\n cost_in_local_currency as cost_in_local_currency,\n cost_in_usd as cost_in_usd,\n cast(null as TEXT) as external_website_conversions,\n one_click_leads as one_click_leads\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfields as (\n \n select \n source_relation,\n \n to_date(\n split_part(date_month, '-', 1) || '-' || lpad(split_part(date_month, '-', 2), 2, '0') || '-01',\n 'YYYY-MM-DD'\n )\n as date_month, --Renamed in macros/get_monthly_ad_analytics_by_member_country_columns to avoid reserved word error.\n campaign_id,\n member_country as member_country_geo_id,\n clicks,\n impressions,\n \n cost_in_usd as cost,\n \n\n coalesce(cast(conversion_value_in_local_currency as float), 0) as conversion_value_in_local_currency\n\n \n , coalesce(cast(external_website_conversions as bigint), 0) as external_website_conversions\n \n , coalesce(cast(one_click_leads as bigint), 0) as one_click_leads\n \n\n \n\n\n\n\n\n from macro\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__campaign_group_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__campaign_group_history", "resource_type": "model", "package_name": "linkedin", "path": "staging/stg_linkedin_ads__campaign_group_history.sql", "original_file_path": "models/staging/stg_linkedin_ads__campaign_group_history.sql", "unique_id": "model.linkedin.stg_linkedin_ads__campaign_group_history", "fqn": ["linkedin", "staging", "stg_linkedin_ads__campaign_group_history"], "alias": "stg_linkedin_ads__campaign_group_history", "checksum": {"name": "sha256", "checksum": "85ab26909f26df04974f18915d71cb4983c525c726de25286f81dbe2f86df7b1"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a 'version' of a campaign group.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}, "campaign_group_id": {"name": "campaign_group_id", "description": "Unique internal ID representing the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_at": {"name": "last_modified_at", "description": "The timestamp of when the version was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the account the campaign group belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp of when the campaign group was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_name": {"name": "campaign_group_name", "description": "A label for the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_backfilled": {"name": "is_backfilled", "description": "Flag that denotes whether the campaign group was created organically or to backfill existing campaigns. This is a read-only field set by the system. Default = false.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_start_at": {"name": "run_schedule_start_at", "description": "Represents the inclusive (greater than or equal to) date when to start running the associated campaigns under this campaign group. This field is required.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_end_at": {"name": "run_schedule_end_at", "description": "Represents the exclusive (strictly less than) date when to stop running the associated campaigns under this campaign group. If this field is unset, it indicates an open range with no end date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Status of campaign group. Possible values are: ACTIVE - Denotes that the campaign group is capable of serving ads, subject to run date and budget limitations (as well as any other limitations at the account or campaign level). ARCHIVED - Denotes that the campaign group is presently inactive, and should mostly be hidden in the UI until un-archived. CANCELLED - Denotes that the campaign group has been permanently canceled and cannot be reactivated. Not a settable status. DRAFT - Denotes that the campaign group is in a preliminary state and should temporarily not be served. PAUSED - Denotes that the campaign group meets all requirements to be served, but temporarily should not be. PENDING_DELETION - Denotes that the campaign group has been requested to be deleted that is currently pending. REMOVED - Denoted that the campaign group was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_latest_version": {"name": "is_latest_version", "description": "Boolean of whether the record is the latest version of the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/staging/stg_linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.614969, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_group_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_group_history_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_linkedin_ads__campaign_group_history_tmp')),\n staging_columns=get_campaign_group_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='linkedin_ads') }}\n\n from base\n\n), fields as (\n\n select \n source_relation,\n id as campaign_group_id,\n name as campaign_group_name,\n account_id,\n status,\n backfilled as is_backfilled,\n cast(run_schedule_start as {{ dbt.type_timestamp() }}) as run_schedule_start_at,\n cast(run_schedule_end as {{ dbt.type_timestamp() }}) as run_schedule_end_at,\n cast(last_modified_time as {{ dbt.type_timestamp() }}) as last_modified_at,\n cast(created_time as {{ dbt.type_timestamp() }}) as created_at,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='linkedin_ads') }} order by last_modified_time desc) = 1 as is_latest_version\n\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__campaign_group_history_tmp", "package": null, "version": null}, {"name": "stg_linkedin_ads__campaign_group_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.linkedin.get_campaign_group_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.linkedin.stg_linkedin_ads__campaign_group_history_tmp"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin_ads__campaign_group_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_group_history_tmp\"\n\n), macro as (\n\n select\n \n account_id as account_id,\n cast(null as boolean) as backfilled,\n created_time as created_time,\n id as id,\n last_modified_time as last_modified_time,\n name as name,\n cast(null as timestamp) as run_schedule_end,\n cast(null as timestamp) as run_schedule_start,\n cast(null as TEXT) as status\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n\n), fields as (\n\n select \n source_relation,\n id as campaign_group_id,\n name as campaign_group_name,\n account_id,\n status,\n backfilled as is_backfilled,\n cast(run_schedule_start as timestamp) as run_schedule_start_at,\n cast(run_schedule_end as timestamp) as run_schedule_end_at,\n cast(last_modified_time as timestamp) as last_modified_at,\n cast(created_time as timestamp) as created_at,\n row_number() over (partition by id order by last_modified_time desc) = 1 as is_latest_version\n\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__monthly_ad_analytics_by_region", "resource_type": "model", "package_name": "linkedin", "path": "staging/stg_linkedin_ads__monthly_ad_analytics_by_region.sql", "original_file_path": "models/staging/stg_linkedin_ads__monthly_ad_analytics_by_region.sql", "unique_id": "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region", "fqn": ["linkedin", "staging", "stg_linkedin_ads__monthly_ad_analytics_by_region"], "alias": "stg_linkedin_ads__monthly_ad_analytics_by_region", "checksum": {"name": "sha256", "checksum": "baa3e923e89b6696432bf4371c693c059fcde08530c24edaa58ca417e93351dc"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Monthly LinkedIn Ads performance metrics aggregated by member region and campaign.", "columns": {"campaign_id": {"name": "campaign_id", "description": "Identifier of the LinkedIn Ads campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_month": {"name": "date_month", "description": "Month of the reporting data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "member_region_geo_id": {"name": "member_region_geo_id", "description": "ID representing the region of the LinkedIn members who interacted with the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost": {"name": "cost", "description": "The cost of the ads in the local currency or USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/staging/stg_linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.6201072, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__monthly_ad_analytics_by_region\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__linkedin_ads_enabled','linkedin_ads__using_monthly_ad_analytics_by_member_region'])) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_linkedin_ads__monthly_ad_analytics_by_region_tmp') }}\n),\n\nmacro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_linkedin_ads__monthly_ad_analytics_by_region_tmp')),\n staging_columns=get_monthly_ad_analytics_by_member_region_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='linkedin_ads') }}\n\n from base\n),\n\nfields as (\n \n select \n source_relation,\n {{ linkedin.date_from_month_string('date_month') }} as date_month, --Renamed in macros/get_monthly_ad_analytics_by_member_region_columns to avoid reserved word error.\n campaign_id,\n member_region as member_region_geo_id,\n impressions,\n clicks,\n {% if var('linkedin_ads__use_local_currency', false) %}\n cost_in_local_currency as cost,\n {% else %}\n cost_in_usd as cost,\n {% endif %}\n\n coalesce(cast(conversion_value_in_local_currency as {{ dbt.type_float() }}), 0) as conversion_value_in_local_currency\n\n {% for conversion in var('linkedin_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {{ linkedin_ads_fill_pass_through_columns(pass_through_fields=var('linkedin_ads__monthly_ad_analytics_by_member_region_passthrough_metrics')) }}\n\n from macro\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__monthly_ad_analytics_by_region_tmp", "package": null, "version": null}, {"name": "stg_linkedin_ads__monthly_ad_analytics_by_region_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.linkedin.get_monthly_ad_analytics_by_member_region_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.linkedin.date_from_month_string", "macro.dbt.type_float", "macro.dbt.type_bigint", "macro.linkedin.linkedin_ads_fill_pass_through_columns"], "nodes": ["model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region_tmp"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin_ads__monthly_ad_analytics_by_region.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__monthly_ad_analytics_by_region_tmp\"\n),\n\nmacro as (\n\n select\n \n campaign_id as campaign_id,\n month as date_month,\n clicks as clicks,\n member_region as member_region,\n impressions as impressions,\n conversion_value_in_local_currency as conversion_value_in_local_currency,\n cost_in_local_currency as cost_in_local_currency,\n cost_in_usd as cost_in_usd,\n cast(null as TEXT) as external_website_conversions,\n one_click_leads as one_click_leads\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfields as (\n \n select \n source_relation,\n \n to_date(\n split_part(date_month, '-', 1) || '-' || lpad(split_part(date_month, '-', 2), 2, '0') || '-01',\n 'YYYY-MM-DD'\n )\n as date_month, --Renamed in macros/get_monthly_ad_analytics_by_member_region_columns to avoid reserved word error.\n campaign_id,\n member_region as member_region_geo_id,\n impressions,\n clicks,\n \n cost_in_usd as cost,\n \n\n coalesce(cast(conversion_value_in_local_currency as float), 0) as conversion_value_in_local_currency\n\n \n , coalesce(cast(external_website_conversions as bigint), 0) as external_website_conversions\n \n , coalesce(cast(one_click_leads as bigint), 0) as one_click_leads\n \n\n \n\n\n\n\n\n from macro\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__ad_analytics_by_campaign", "resource_type": "model", "package_name": "linkedin", "path": "staging/stg_linkedin_ads__ad_analytics_by_campaign.sql", "original_file_path": "models/staging/stg_linkedin_ads__ad_analytics_by_campaign.sql", "unique_id": "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign", "fqn": ["linkedin", "staging", "stg_linkedin_ads__ad_analytics_by_campaign"], "alias": "stg_linkedin_ads__ad_analytics_by_campaign", "checksum": {"name": "sha256", "checksum": "de85d23d6e9b62034c498617e7d73ddd6dae14686f4f959af33da1a431c49e6b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the campaign level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related creative.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The day of the activity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost": {"name": "cost", "description": "The cost of the ads in the local currency or USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/staging/stg_linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.6102793, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_campaign\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_linkedin_ads__ad_analytics_by_campaign_tmp') }}\n),\n\nmacro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_linkedin_ads__ad_analytics_by_campaign_tmp')),\n staging_columns=get_ad_analytics_by_campaign_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='linkedin_ads') }}\n\n from base\n),\n\nfields as (\n \n select \n source_relation,\n {{ dbt.date_trunc('day', 'day') }} as date_day,\n campaign_id,\n clicks,\n impressions,\n {% if var('linkedin_ads__use_local_currency', false) %}\n cost_in_local_currency as cost,\n {% else %}\n cost_in_usd as cost,\n {% endif %}\n\n coalesce(cast(conversion_value_in_local_currency as {{ dbt.type_float() }}), 0) as conversion_value_in_local_currency\n\n {% for conversion in var('linkedin_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {{ linkedin_ads_fill_pass_through_columns(pass_through_fields=var('linkedin_ads__campaign_passthrough_metrics'), except=(var('linkedin_ads__conversion_fields') + ['conversion_value_in_local_currency'])) }}\n\n from macro\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__ad_analytics_by_campaign_tmp", "package": null, "version": null}, {"name": "stg_linkedin_ads__ad_analytics_by_campaign_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.linkedin.get_ad_analytics_by_campaign_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.date_trunc", "macro.dbt.type_float", "macro.dbt.type_bigint", "macro.linkedin.linkedin_ads_fill_pass_through_columns"], "nodes": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign_tmp"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin_ads__ad_analytics_by_campaign.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_campaign_tmp\"\n),\n\nmacro as (\n\n select\n \n campaign_id as campaign_id,\n clicks as clicks,\n cost_in_local_currency as cost_in_local_currency,\n cost_in_usd as cost_in_usd,\n day as day,\n impressions as impressions,\n conversion_value_in_local_currency as conversion_value_in_local_currency,\n external_website_conversions as external_website_conversions,\n one_click_leads as one_click_leads\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfields as (\n \n select \n source_relation,\n date_trunc('day', day) as date_day,\n campaign_id,\n clicks,\n impressions,\n \n cost_in_usd as cost,\n \n\n coalesce(cast(conversion_value_in_local_currency as float), 0) as conversion_value_in_local_currency\n\n \n , coalesce(cast(external_website_conversions as bigint), 0) as external_website_conversions\n \n , coalesce(cast(one_click_leads as bigint), 0) as one_click_leads\n \n\n \n\n\n\n\n\n from macro\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__campaign_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__campaign_history", "resource_type": "model", "package_name": "linkedin", "path": "staging/stg_linkedin_ads__campaign_history.sql", "original_file_path": "models/staging/stg_linkedin_ads__campaign_history.sql", "unique_id": "model.linkedin.stg_linkedin_ads__campaign_history", "fqn": ["linkedin", "staging", "stg_linkedin_ads__campaign_history"], "alias": "stg_linkedin_ads__campaign_history", "checksum": {"name": "sha256", "checksum": "7d24a6ac6d669b02833174e3275e267a94e1f497857d73bd63408dc2aae3fb86"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a 'version' of a campaign.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "Unique internal ID representing the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_at": {"name": "last_modified_at", "description": "The timestamp of when the version was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the account the campaign belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_id": {"name": "campaign_group_id", "description": "The ID of the campaign group the campaign belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp of when the campaign was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "A label for the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "version_tag": {"name": "version_tag", "description": "An integer representation of the version of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_audience_expansion_enabled": {"name": "is_audience_expansion_enabled", "description": "Boolean (default=false) representing whether Audience Expansion is enabled for the campaign provides query expansion for certain targeting criteria.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_type": {"name": "cost_type", "description": "CPM - Cost per thousand advertising impressions. If type=SPONSORED_INMAILS; cost per send(CPS) is measured as CPM x 1000.\nCPC- Cost per individual click on the associated link.\nCPV- Cost per view for video ads.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_selection": {"name": "creative_selection", "description": "ROUND_ROBIN - Rotate through available creatives to serve them as evenly as possible.\nOPTIMIZED (default) - Bias selection taking into account such as expected performance. Not available for Message and Conversation Ads (type=SPONSORED_INMAILS).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_amount": {"name": "daily_budget_amount", "description": "Maximum amount to spend per day UTC. The amount of money as a real number string.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_currency_code": {"name": "daily_budget_currency_code", "description": "ISO currency code. The currency must match that of the parent account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "format": {"name": "format", "description": "The ad format on the campaign level. See https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads/campaign-formats?view=li-lms-2022-07", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "locale_country": {"name": "locale_country", "description": "Locale of the campaign. An uppercase two-letter country code as defined by ISO-3166.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "locale_language": {"name": "locale_language", "description": "Locale of the campaign. A lowercase two-letter language code as defined by ISO-639.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective_type": {"name": "objective_type", "description": "Campaign Objective type values. Click [here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ad-budget-pricing-type-combinations?view=li-lms-2022-07) for Campaign Objective descriptions. One of: - BRAND_AWARENESS - ENGAGEMENT - JOB_APPLICANTS - LEAD_GENERATION - WEBSITE_CONVERSIONS - WEBSITE_VISITS - VIDEO_VIEWS\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_offsite_delivery_enabled": {"name": "is_offsite_delivery_enabled", "description": "Boolean indicating if this campaign to allowed to be served on the LinkedIn Audience Network to extend the reach of your campaign by delivering ads beyond the LinkedIn feed to members on third-party apps and sites.\t(default will be \"True\" from June 30, 2022)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "optimization_target_type": {"name": "optimization_target_type", "description": "Determines how this campaign is optimized for spending. If this is not set, there is no optimization. Refer to the documentation here. Default = 'NONE'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_start_at": {"name": "run_schedule_start_at", "description": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the inclusive (greater than or equal to) value in which to start the range.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_end_at": {"name": "run_schedule_end_at", "description": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the exclusive (strictly less than) value in which to end the range, if provided.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "ACTIVE - Denotes that the campaign is fully servable.\nPAUSED - Denotes that the campaign meets all requirements to be served, but temporarily should not be.\nARCHIVED - Denotes that the campaign is presently inactive, and should mostly be hidden in the UI until un-archived.\nCOMPLETED - Denotes that the campaign has reached a specified budgetary or chronological limit.\nCANCELED - Denotes that the campaign has been permanently canceled, such as when an advertising account is permanently closed.\nDRAFT - Denotes that the campaign is still being edited and not eligible for serving. Some validation will be postponed until the campaign is activated.\nPENDING_DELETION - Denotes that the campaign has been requested to be deleted that is currently pending.\nREMOVED - Denotes that the campaign was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "type": {"name": "type", "description": "TEXT_AD - Text-based ads that show up in the right column or top of the page on LinkedIn.\nSPONSORED_UPDATES - Native ads that promote a company's content updates in the LinkedIn feed.\nSPONSORED_INMAILS - Personalized messages with a call-to-action button delivered to a LinkedIn's member inbox.\nDYNAMIC - Ads that are dynamically personalized.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "unit_cost_amount": {"name": "unit_cost_amount", "description": "This value is used as one of the following: amount to bid (for manual bidding), amount which is the target cost (for target cost bidding) per click, impression, or other event depending on the pricing model, or cost cap (for cost cap bidding). The amount of money as a real number string. The amount should be non-negative if the bidding strategy is manual, target cost, or cost cap bidding. The default is 0 with the currency code set to match that of the associated account.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "unit_cost_currency_code": {"name": "unit_cost_currency_code", "description": "Amount to bid per click, impression, or other event depending on the pricing model. The default is 0 with the currency code set to match that of the associated account. ISO currency code.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_latest_version": {"name": "is_latest_version", "description": "Boolean of whether the record is the latest version of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/staging/stg_linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.6138585, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_history_tmp') }}\n\n), macro as (\n\n select \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_linkedin_ads__campaign_history_tmp')),\n staging_columns=get_campaign_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='linkedin_ads') }}\n\n from base\n\n), fields as (\n\n select \n source_relation,\n id as campaign_id,\n name as campaign_name,\n cast(version_tag as numeric) as version_tag,\n campaign_group_id,\n account_id,\n status,\n type,\n cost_type,\n creative_selection,\n daily_budget_amount,\n daily_budget_currency_code,\n unit_cost_amount,\n unit_cost_currency_code,\n format,\n locale_country,\n locale_language,\n objective_type,\n optimization_target_type,\n audience_expansion_enabled as is_audience_expansion_enabled,\n offsite_delivery_enabled as is_offsite_delivery_enabled,\n cast(run_schedule_start as {{ dbt.type_timestamp() }}) as run_schedule_start_at,\n cast(run_schedule_end as {{ dbt.type_timestamp() }}) as run_schedule_end_at,\n cast(last_modified_time as {{ dbt.type_timestamp() }}) as last_modified_at,\n cast(created_time as {{ dbt.type_timestamp() }}) as created_at,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='linkedin_ads') }} order by last_modified_time desc) = 1 as is_latest_version\n\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__campaign_history_tmp", "package": null, "version": null}, {"name": "stg_linkedin_ads__campaign_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.linkedin.get_campaign_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.linkedin.stg_linkedin_ads__campaign_history_tmp"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin_ads__campaign_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_history_tmp\"\n\n), macro as (\n\n select \n \n account_id as account_id,\n cast(null as boolean) as audience_expansion_enabled,\n campaign_group_id as campaign_group_id,\n cast(null as TEXT) as cost_type,\n created_time as created_time,\n cast(null as TEXT) as creative_selection,\n cast(null as float) as daily_budget_amount,\n cast(null as TEXT) as daily_budget_currency_code,\n cast(null as TEXT) as format,\n id as id,\n last_modified_time as last_modified_time,\n cast(null as TEXT) as locale_country,\n cast(null as TEXT) as locale_language,\n name as name,\n cast(null as TEXT) as objective_type,\n cast(null as boolean) as offsite_delivery_enabled,\n cast(null as TEXT) as optimization_target_type,\n cast(null as timestamp) as run_schedule_end,\n cast(null as timestamp) as run_schedule_start,\n cast(null as TEXT) as status,\n cast(null as TEXT) as type,\n cast(null as float) as unit_cost_amount,\n cast(null as TEXT) as unit_cost_currency_code,\n version_tag as version_tag\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n\n), fields as (\n\n select \n source_relation,\n id as campaign_id,\n name as campaign_name,\n cast(version_tag as numeric) as version_tag,\n campaign_group_id,\n account_id,\n status,\n type,\n cost_type,\n creative_selection,\n daily_budget_amount,\n daily_budget_currency_code,\n unit_cost_amount,\n unit_cost_currency_code,\n format,\n locale_country,\n locale_language,\n objective_type,\n optimization_target_type,\n audience_expansion_enabled as is_audience_expansion_enabled,\n offsite_delivery_enabled as is_offsite_delivery_enabled,\n cast(run_schedule_start as timestamp) as run_schedule_start_at,\n cast(run_schedule_end as timestamp) as run_schedule_end_at,\n cast(last_modified_time as timestamp) as last_modified_at,\n cast(created_time as timestamp) as created_at,\n row_number() over (partition by id order by last_modified_time desc) = 1 as is_latest_version\n\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__creative_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__creative_history", "resource_type": "model", "package_name": "linkedin", "path": "staging/stg_linkedin_ads__creative_history.sql", "original_file_path": "models/staging/stg_linkedin_ads__creative_history.sql", "unique_id": "model.linkedin.stg_linkedin_ads__creative_history", "fqn": ["linkedin", "staging", "stg_linkedin_ads__creative_history"], "alias": "stg_linkedin_ads__creative_history", "checksum": {"name": "sha256", "checksum": "a79dff162816c27339bd552a3ab2e2e8a4a997fa274cdc39c2429ea5b711d9c1"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a 'version' of a creative.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}, "creative_id": {"name": "creative_id", "description": "Unique internal ID representing the creative.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_at": {"name": "last_modified_at", "description": "The timestamp of when the version was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp of when the creative was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign the creative belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "ACTIVE - Creative creation is complete and creative is available for review and serve.\nPAUSED - Creative creation is complete and creative is current, but should temporarily not be served. This status is not valid upon creation.\nDRAFT - Creative creation is incomplete and may still be edited.\nARCHIVED - Creative creation is complete, but creative should not be served and should be separated from non-archived creatives in any UI.\nCANCELED - Creative is permanently canceled.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_uri": {"name": "click_uri", "description": "The URL where the member should be redirected to, on clicking the text ad or spotlight ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_uri_type": {"name": "click_uri_type", "description": "Will either be `text_ad`, `spotlight`, or `null` to indicate the origin of the click_uri.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_host": {"name": "url_host", "description": "The URL host of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_path": {"name": "url_path", "description": "The URL path of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_source": {"name": "utm_source", "description": "The utm_source parameter of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_medium": {"name": "utm_medium", "description": "The utm_medium parameter of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_campaign": {"name": "utm_campaign", "description": "The utm_campaign parameter of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_content": {"name": "utm_content", "description": "The utm_content parameter of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_term": {"name": "utm_term", "description": "The utm_term parameter of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_latest_version": {"name": "is_latest_version", "description": "Boolean of whether the record is the latest version of the creative.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/staging/stg_linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.6120582, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__creative_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_linkedin_ads__creative_history_tmp') }}\n\n), macro as (\n\n select \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_linkedin_ads__creative_history_tmp')),\n staging_columns=get_creative_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='linkedin_ads') }}\n\n from base\n\n), fields as (\n\n select\n source_relation,\n id as creative_id,\n campaign_id,\n coalesce(status, intended_status) as status,\n coalesce(text_ad_landing_page, spotlight_landing_page, click_uri) as click_uri,\n cast(coalesce(last_modified_time, last_modified_at) as {{ dbt.type_timestamp() }}) as last_modified_at,\n cast(coalesce(created_time, created_at) as {{ dbt.type_timestamp() }}) as created_at,\n case when text_ad_landing_page is not null then 'text_ad'\n when spotlight_landing_page is not null then 'spotlight'\n else cast(null as {{ dbt.type_string() }})\n end as click_uri_type\n\n from macro\n\n), url_fields as (\n\n select \n *,\n row_number() over (partition by creative_id {{ fivetran_utils.partition_by_source_relation(package_name='linkedin_ads') }} order by last_modified_at desc) = 1 as is_latest_version,\n {{ dbt.split_part('click_uri', \"'?'\", 1) }} as base_url,\n {{ dbt_utils.get_url_host('click_uri') }} as url_host,\n '/' || {{ dbt_utils.get_url_path('click_uri') }} as url_path,\n {{ linkedin.linkedin_ads_extract_url_parameter('click_uri', 'utm_source') }} as utm_source,\n {{ linkedin.linkedin_ads_extract_url_parameter('click_uri', 'utm_medium') }} as utm_medium,\n {{ linkedin.linkedin_ads_extract_url_parameter('click_uri', 'utm_campaign') }} as utm_campaign,\n {{ linkedin.linkedin_ads_extract_url_parameter('click_uri', 'utm_content') }} as utm_content,\n {{ linkedin.linkedin_ads_extract_url_parameter('click_uri', 'utm_term') }} as utm_term\n \n from fields\n)\n\nselect *\nfrom url_fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__creative_history_tmp", "package": null, "version": null}, {"name": "stg_linkedin_ads__creative_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.linkedin.get_creative_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.fivetran_utils.partition_by_source_relation", "macro.dbt.split_part", "macro.dbt_utils.get_url_host", "macro.dbt_utils.get_url_path", "macro.linkedin.linkedin_ads_extract_url_parameter"], "nodes": ["model.linkedin.stg_linkedin_ads__creative_history_tmp"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin_ads__creative_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__creative_history_tmp\"\n\n), macro as (\n\n select \n \n campaign_id as campaign_id,\n click_uri as click_uri,\n created_time as created_time,\n cast(null as timestamp) as created_at,\n id as id,\n cast(null as timestamp) as last_modified_time,\n last_modified_at as last_modified_at,\n intended_status as intended_status,\n cast(null as TEXT) as status,\n text_ad_landing_page as text_ad_landing_page,\n spotlight_landing_page as spotlight_landing_page\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n\n), fields as (\n\n select\n source_relation,\n id as creative_id,\n campaign_id,\n coalesce(status, intended_status) as status,\n coalesce(text_ad_landing_page, spotlight_landing_page, click_uri) as click_uri,\n cast(coalesce(last_modified_time, last_modified_at) as timestamp) as last_modified_at,\n cast(coalesce(created_time, created_at) as timestamp) as created_at,\n case when text_ad_landing_page is not null then 'text_ad'\n when spotlight_landing_page is not null then 'spotlight'\n else cast(null as TEXT)\n end as click_uri_type\n\n from macro\n\n), url_fields as (\n\n select \n *,\n row_number() over (partition by creative_id order by last_modified_at desc) = 1 as is_latest_version,\n \n\n \n \n\n split_part(\n click_uri,\n '?',\n 1\n )\n\n\n \n\n as base_url,\n \n \n cast(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n \n\n replace(\n \n\n replace(\n \n\n replace(\n click_uri,\n 'android-app://',\n ''\n )\n\n\n,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n '/',\n 1\n )\n\n\n \n\n,\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_host,\n '/' || \n \n cast(\n\n \n \n\n split_part(\n \n\n right(\n \n\n replace(\n \n\n replace(\n click_uri,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n \n\n length(\n \n\n replace(\n \n\n replace(\n click_uri,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n )-coalesce(\n nullif(\n\n position(\n '/' in \n\n replace(\n \n\n replace(\n click_uri,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ), 0),\n \n\n position(\n '?' in \n\n replace(\n \n\n replace(\n click_uri,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ) - 1\n )\n ),\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_path,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n click_uri,\n 'utm_source=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_source,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n click_uri,\n 'utm_medium=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_medium,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n click_uri,\n 'utm_campaign=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_campaign,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n click_uri,\n 'utm_content=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_content,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n click_uri,\n 'utm_term=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_term\n \n from fields\n)\n\nselect *\nfrom url_fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__creative_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__creative_history_tmp", "resource_type": "model", "package_name": "linkedin", "path": "staging/tmp/stg_linkedin_ads__creative_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_linkedin_ads__creative_history_tmp.sql", "unique_id": "model.linkedin.stg_linkedin_ads__creative_history_tmp", "fqn": ["linkedin", "staging", "tmp", "stg_linkedin_ads__creative_history_tmp"], "alias": "stg_linkedin_ads__creative_history_tmp", "checksum": {"name": "sha256", "checksum": "fd1cc520fe4579912f65b134232b4d5bf726daf453c1da0777c8028624a02cf8"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450496.0367336, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__creative_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\n{% if var('linkedin_ads_union_schemas', []) | length > 0 or var('linkedin_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='creative_history', \n database_variable='linkedin_ads_database', \n schema_variable='linkedin_ads_schema', \n default_database=target.database,\n default_schema='linkedin_ads',\n default_variable='creative_history',\n union_schema_variable='linkedin_ads_union_schemas',\n union_database_variable='linkedin_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='linkedin_ads_sources',\n single_source_name='linkedin_ads',\n single_table_name='creative_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["linkedin_ads", "creative_history"], ["linkedin_ads", "creative_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.linkedin.linkedin_ads.creative_history"]}, "compiled_path": "target/compiled/linkedin/models/staging/tmp/stg_linkedin_ads__creative_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: linkedin_ads_creative_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: linkedin_ad_creative_history_data\n\n\n select\n \"id\",\n \"campaign_id\",\n \"intended_status\",\n \"click_uri\",\n \"last_modified_at\",\n \"created_time\",\n \"text_ad_landing_page\",\n \"spotlight_landing_page\"\n from \"postgres\".\"public\".\"linkedin_ad_creative_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__monthly_ad_analytics_by_region_tmp", "resource_type": "model", "package_name": "linkedin", "path": "staging/tmp/stg_linkedin_ads__monthly_ad_analytics_by_region_tmp.sql", "original_file_path": "models/staging/tmp/stg_linkedin_ads__monthly_ad_analytics_by_region_tmp.sql", "unique_id": "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region_tmp", "fqn": ["linkedin", "staging", "tmp", "stg_linkedin_ads__monthly_ad_analytics_by_region_tmp"], "alias": "stg_linkedin_ads__monthly_ad_analytics_by_region_tmp", "checksum": {"name": "sha256", "checksum": "c31760953d01e16bb31502d9af249627b67dd2ce525fde53b4b61444a31a33df"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450496.0649927, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__monthly_ad_analytics_by_region_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__linkedin_ads_enabled','linkedin_ads__using_monthly_ad_analytics_by_member_region'])) }}\n\n{% if var('linkedin_ads_union_schemas', []) | length > 0 or var('linkedin_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='monthly_ad_analytics_by_member_region', \n database_variable='linkedin_ads_database', \n schema_variable='linkedin_ads_schema', \n default_database=target.database,\n default_schema='linkedin_ads',\n default_variable='monthly_ad_analytics_by_member_region',\n union_schema_variable='linkedin_ads_union_schemas',\n union_database_variable='linkedin_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='linkedin_ads_sources',\n single_source_name='linkedin_ads',\n single_table_name='monthly_ad_analytics_by_member_region'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["linkedin_ads", "monthly_ad_analytics_by_member_region"], ["linkedin_ads", "monthly_ad_analytics_by_member_region"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_region"]}, "compiled_path": "target/compiled/linkedin/models/staging/tmp/stg_linkedin_ads__monthly_ad_analytics_by_region_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: linkedin_ads_monthly_ad_analytics_by_member_region_identifier\n -- database: postgres \n -- schema: public\n -- identifier: linkedin_monthly_ad_analytics_by_member_region_data\n\n\n select\n \"campaign_id\",\n \"month\",\n \"clicks\",\n \"member_region\",\n \"impressions\",\n \"conversion_value_in_local_currency\",\n \"cost_in_local_currency\",\n \"cost_in_usd\",\n \"external_website_post_click_conversions\",\n \"one_click_leads\"\n from \"postgres\".\"public\".\"linkedin_monthly_ad_analytics_by_member_region_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__monthly_ad_analytics_by_country_tmp", "resource_type": "model", "package_name": "linkedin", "path": "staging/tmp/stg_linkedin_ads__monthly_ad_analytics_by_country_tmp.sql", "original_file_path": "models/staging/tmp/stg_linkedin_ads__monthly_ad_analytics_by_country_tmp.sql", "unique_id": "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country_tmp", "fqn": ["linkedin", "staging", "tmp", "stg_linkedin_ads__monthly_ad_analytics_by_country_tmp"], "alias": "stg_linkedin_ads__monthly_ad_analytics_by_country_tmp", "checksum": {"name": "sha256", "checksum": "d7adfb77dfbc5702ba5035e14b627d73aa58f6ff1203b19cc491ee798edbb35b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450496.07754, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__monthly_ad_analytics_by_country_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__linkedin_ads_enabled','linkedin_ads__using_monthly_ad_analytics_by_member_country'])) }}\n\n{% if var('linkedin_ads_union_schemas', []) | length > 0 or var('linkedin_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='monthly_ad_analytics_by_member_country', \n database_variable='linkedin_ads_database', \n schema_variable='linkedin_ads_schema', \n default_database=target.database,\n default_schema='linkedin_ads',\n default_variable='monthly_ad_analytics_by_member_country',\n union_schema_variable='linkedin_ads_union_schemas',\n union_database_variable='linkedin_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='linkedin_ads_sources',\n single_source_name='linkedin_ads',\n single_table_name='monthly_ad_analytics_by_member_country'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["linkedin_ads", "monthly_ad_analytics_by_member_country"], ["linkedin_ads", "monthly_ad_analytics_by_member_country"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_country"]}, "compiled_path": "target/compiled/linkedin/models/staging/tmp/stg_linkedin_ads__monthly_ad_analytics_by_country_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: linkedin_ads_monthly_ad_analytics_by_member_country_identifier\n -- database: postgres \n -- schema: public\n -- identifier: linkedin_monthly_ad_analytics_by_member_country_data\n\n\n select\n \"campaign_id\",\n \"month\",\n \"clicks\",\n \"member_country\",\n \"impressions\",\n \"conversion_value_in_local_currency\",\n \"cost_in_local_currency\",\n \"cost_in_usd\",\n \"external_website_post_click_conversions\",\n \"one_click_leads\"\n from \"postgres\".\"public\".\"linkedin_monthly_ad_analytics_by_member_country_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__campaign_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__campaign_history_tmp", "resource_type": "model", "package_name": "linkedin", "path": "staging/tmp/stg_linkedin_ads__campaign_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_linkedin_ads__campaign_history_tmp.sql", "unique_id": "model.linkedin.stg_linkedin_ads__campaign_history_tmp", "fqn": ["linkedin", "staging", "tmp", "stg_linkedin_ads__campaign_history_tmp"], "alias": "stg_linkedin_ads__campaign_history_tmp", "checksum": {"name": "sha256", "checksum": "bc1edc91d94917f69a7d0507b7d8cd60631d4c540be484aba8dbedfb557f5e8d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450496.088991, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\n{% if var('linkedin_ads_union_schemas', []) | length > 0 or var('linkedin_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_history', \n database_variable='linkedin_ads_database', \n schema_variable='linkedin_ads_schema', \n default_database=target.database,\n default_schema='linkedin_ads',\n default_variable='campaign_history',\n union_schema_variable='linkedin_ads_union_schemas',\n union_database_variable='linkedin_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='linkedin_ads_sources',\n single_source_name='linkedin_ads',\n single_table_name='campaign_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["linkedin_ads", "campaign_history"], ["linkedin_ads", "campaign_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.linkedin.linkedin_ads.campaign_history"]}, "compiled_path": "target/compiled/linkedin/models/staging/tmp/stg_linkedin_ads__campaign_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: linkedin_ads_campaign_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: linkedin_ad_campaign_history_data\n\n\n select\n \"id\",\n \"last_modified_time\",\n \"account_id\",\n \"campaign_group_id\",\n \"created_time\",\n \"name\",\n \"version_tag\"\n from \"postgres\".\"public\".\"linkedin_ad_campaign_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__campaign_group_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__campaign_group_history_tmp", "resource_type": "model", "package_name": "linkedin", "path": "staging/tmp/stg_linkedin_ads__campaign_group_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_linkedin_ads__campaign_group_history_tmp.sql", "unique_id": "model.linkedin.stg_linkedin_ads__campaign_group_history_tmp", "fqn": ["linkedin", "staging", "tmp", "stg_linkedin_ads__campaign_group_history_tmp"], "alias": "stg_linkedin_ads__campaign_group_history_tmp", "checksum": {"name": "sha256", "checksum": "b605a15de4553e52fbe54dcd6ef80f4c9d824c888f3f95510a31f43d1f8b079d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450496.0998473, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_group_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\n{% if var('linkedin_ads_union_schemas', []) | length > 0 or var('linkedin_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_group_history', \n database_variable='linkedin_ads_database', \n schema_variable='linkedin_ads_schema', \n default_database=target.database,\n default_schema='linkedin_ads',\n default_variable='campaign_group_history',\n union_schema_variable='linkedin_ads_union_schemas',\n union_database_variable='linkedin_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='linkedin_ads_sources',\n single_source_name='linkedin_ads',\n single_table_name='campaign_group_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["linkedin_ads", "campaign_group_history"], ["linkedin_ads", "campaign_group_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.linkedin.linkedin_ads.campaign_group_history"]}, "compiled_path": "target/compiled/linkedin/models/staging/tmp/stg_linkedin_ads__campaign_group_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: linkedin_ads_campaign_group_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: linkedin_ad_campaign_group_history_data\n\n\n select\n \"id\",\n \"last_modified_time\",\n \"account_id\",\n \"created_time\",\n \"name\"\n from \"postgres\".\"public\".\"linkedin_ad_campaign_group_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__ad_analytics_by_campaign_tmp", "resource_type": "model", "package_name": "linkedin", "path": "staging/tmp/stg_linkedin_ads__ad_analytics_by_campaign_tmp.sql", "original_file_path": "models/staging/tmp/stg_linkedin_ads__ad_analytics_by_campaign_tmp.sql", "unique_id": "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign_tmp", "fqn": ["linkedin", "staging", "tmp", "stg_linkedin_ads__ad_analytics_by_campaign_tmp"], "alias": "stg_linkedin_ads__ad_analytics_by_campaign_tmp", "checksum": {"name": "sha256", "checksum": "d946f554a7c5847ab30fe093d4ec7cb14e1f023119b3b085a701ae982429df67"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450496.1113892, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_campaign_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\n{% if var('linkedin_ads_union_schemas', []) | length > 0 or var('linkedin_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_analytics_by_campaign', \n database_variable='linkedin_ads_database', \n schema_variable='linkedin_ads_schema', \n default_database=target.database,\n default_schema='linkedin_ads',\n default_variable='ad_analytics_by_campaign',\n union_schema_variable='linkedin_ads_union_schemas',\n union_database_variable='linkedin_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='linkedin_ads_sources',\n single_source_name='linkedin_ads',\n single_table_name='ad_analytics_by_campaign'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["linkedin_ads", "ad_analytics_by_campaign"], ["linkedin_ads", "ad_analytics_by_campaign"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.linkedin.linkedin_ads.ad_analytics_by_campaign"]}, "compiled_path": "target/compiled/linkedin/models/staging/tmp/stg_linkedin_ads__ad_analytics_by_campaign_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: linkedin_ads_ad_analytics_by_campaign_identifier\n -- database: postgres \n -- schema: public\n -- identifier: linkedin_ad_analytics_by_campaign_data\n\n\n select\n \"campaign_id\",\n \"day\",\n \"_fivetran_synced\",\n \"action_clicks\",\n \"ad_unit_clicks\",\n \"approximate_unique_impressions\",\n \"card_clicks\",\n \"card_impressions\",\n \"clicks\",\n \"comment_likes\",\n \"comments\",\n \"company_page_clicks\",\n \"conversion_value_in_local_currency\",\n \"cost_in_local_currency\",\n \"cost_in_usd\",\n \"external_website_conversions\",\n \"external_website_post_click_conversions\",\n \"external_website_post_view_conversions\",\n \"follows\",\n \"full_screen_plays\",\n \"impressions\",\n \"landing_page_clicks\",\n \"lead_generation_mail_contact_info_shares\",\n \"lead_generation_mail_interested_clicks\",\n \"likes\",\n \"one_click_lead_form_opens\",\n \"one_click_leads\",\n \"opens\",\n \"other_engagements\",\n \"shares\",\n \"text_url_clicks\",\n \"total_engagements\",\n \"video_completions\",\n \"video_first_quartile_completions\",\n \"video_midpoint_completions\",\n \"video_starts\",\n \"video_third_quartile_completions\",\n \"video_views\",\n \"viral_card_clicks\",\n \"viral_card_impressions\",\n \"viral_clicks\",\n \"viral_comment_likes\",\n \"viral_comments\",\n \"viral_company_page_clicks\",\n \"viral_external_website_conversions\",\n \"viral_external_website_post_click_conversions\",\n \"viral_external_website_post_view_conversions\",\n \"viral_follows\",\n \"viral_full_screen_plays\",\n \"viral_impressions\",\n \"viral_landing_page_clicks\",\n \"viral_likes\",\n \"viral_one_click_lead_form_opens\",\n \"viral_one_click_leads\",\n \"viral_other_engagements\",\n \"viral_shares\",\n \"viral_total_engagements\",\n \"viral_video_completions\",\n \"viral_video_first_quartile_completions\",\n \"viral_video_midpoint_completions\",\n \"viral_video_starts\",\n \"viral_video_third_quartile_completions\",\n \"viral_video_views\"\n from \"postgres\".\"public\".\"linkedin_ad_analytics_by_campaign_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__ad_analytics_by_creative_tmp", "resource_type": "model", "package_name": "linkedin", "path": "staging/tmp/stg_linkedin_ads__ad_analytics_by_creative_tmp.sql", "original_file_path": "models/staging/tmp/stg_linkedin_ads__ad_analytics_by_creative_tmp.sql", "unique_id": "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative_tmp", "fqn": ["linkedin", "staging", "tmp", "stg_linkedin_ads__ad_analytics_by_creative_tmp"], "alias": "stg_linkedin_ads__ad_analytics_by_creative_tmp", "checksum": {"name": "sha256", "checksum": "a8a4b5756b29bedf77a7aa6360892e3a8959373f92fd7ba1e3d6acfeb9ca97e9"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450496.2105875, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_creative_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\n{% if var('linkedin_ads_union_schemas', []) | length > 0 or var('linkedin_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_analytics_by_creative', \n database_variable='linkedin_ads_database', \n schema_variable='linkedin_ads_schema', \n default_database=target.database,\n default_schema='linkedin_ads',\n default_variable='ad_analytics_by_creative',\n union_schema_variable='linkedin_ads_union_schemas',\n union_database_variable='linkedin_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='linkedin_ads_sources',\n single_source_name='linkedin_ads',\n single_table_name='ad_analytics_by_creative'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["linkedin_ads", "ad_analytics_by_creative"], ["linkedin_ads", "ad_analytics_by_creative"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.linkedin.linkedin_ads.ad_analytics_by_creative"]}, "compiled_path": "target/compiled/linkedin/models/staging/tmp/stg_linkedin_ads__ad_analytics_by_creative_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: linkedin_ads_ad_analytics_by_creative_identifier\n -- database: postgres \n -- schema: public\n -- identifier: linkedin_ad_analytics_by_creative_data\n\n\n select\n \"creative_id\",\n \"day\",\n \"action_clicks\",\n \"card_clicks\",\n \"ad_unit_clicks\",\n \"landing_page_clicks\",\n \"clicks\",\n \"approximate_unique_impressions\",\n \"impressions\",\n \"card_impressions\",\n \"cost_in_local_currency\",\n \"cost_in_usd\",\n \"comment_likes\",\n \"comments\",\n \"company_page_clicks\",\n \"conversion_value_in_local_currency\",\n \"external_website_conversions\",\n \"external_website_post_click_conversions\",\n \"external_website_post_view_conversions\",\n \"follows\",\n \"full_screen_plays\",\n \"lead_generation_mail_contact_info_shares\",\n \"lead_generation_mail_interested_clicks\",\n \"likes\",\n \"one_click_lead_form_opens\",\n \"one_click_leads\",\n \"opens\",\n \"other_engagements\",\n \"shares\",\n \"text_url_clicks\",\n \"total_engagements\",\n \"video_completions\",\n \"video_first_quartile_completions\",\n \"video_midpoint_completions\",\n \"video_starts\",\n \"video_third_quartile_completions\",\n \"video_views\",\n \"viral_card_clicks\",\n \"viral_card_impressions\",\n \"viral_clicks\",\n \"viral_comment_likes\",\n \"viral_comments\",\n \"viral_company_page_clicks\",\n \"viral_external_website_conversions\",\n \"viral_external_website_post_click_conversions\",\n \"viral_external_website_post_view_conversions\",\n \"viral_follows\",\n \"viral_full_screen_plays\",\n \"viral_impressions\",\n \"viral_landing_page_clicks\",\n \"viral_likes\",\n \"viral_one_click_lead_form_opens\",\n \"viral_one_click_leads\",\n \"viral_other_engagements\",\n \"viral_shares\",\n \"viral_total_engagements\",\n \"viral_video_completions\",\n \"viral_video_first_quartile_completions\",\n \"viral_video_midpoint_completions\",\n \"viral_video_starts\",\n \"viral_video_third_quartile_completions\",\n \"viral_video_views\"\n from \"postgres\".\"public\".\"linkedin_ad_analytics_by_creative_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__geo_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__geo_tmp", "resource_type": "model", "package_name": "linkedin", "path": "staging/tmp/stg_linkedin_ads__geo_tmp.sql", "original_file_path": "models/staging/tmp/stg_linkedin_ads__geo_tmp.sql", "unique_id": "model.linkedin.stg_linkedin_ads__geo_tmp", "fqn": ["linkedin", "staging", "tmp", "stg_linkedin_ads__geo_tmp"], "alias": "stg_linkedin_ads__geo_tmp", "checksum": {"name": "sha256", "checksum": "9fb4f226ca36de5ebcf4b3a948a0be2f1ec8ab8665305fe20fbdf8b00fce119c"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450496.2223415, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__geo_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__linkedin_ads_enabled','linkedin_ads__using_geo'])) }}\n\n{% if var('linkedin_ads_union_schemas', []) | length > 0 or var('linkedin_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='geo', \n database_variable='linkedin_ads_database', \n schema_variable='linkedin_ads_schema', \n default_database=target.database,\n default_schema='linkedin_ads',\n default_variable='geo',\n union_schema_variable='linkedin_ads_union_schemas',\n union_database_variable='linkedin_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='linkedin_ads_sources',\n single_source_name='linkedin_ads',\n single_table_name='geo'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["linkedin_ads", "geo"], ["linkedin_ads", "geo"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.linkedin.linkedin_ads.geo"]}, "compiled_path": "target/compiled/linkedin/models/staging/tmp/stg_linkedin_ads__geo_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: linkedin_ads_geo_identifier\n -- database: postgres \n -- schema: public\n -- identifier: linkedin_geo_data\n\n\n select\n \"_fivetran_synced\",\n \"id\",\n \"value\"\n from \"postgres\".\"public\".\"linkedin_geo_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__account_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__account_history_tmp", "resource_type": "model", "package_name": "linkedin", "path": "staging/tmp/stg_linkedin_ads__account_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_linkedin_ads__account_history_tmp.sql", "unique_id": "model.linkedin.stg_linkedin_ads__account_history_tmp", "fqn": ["linkedin", "staging", "tmp", "stg_linkedin_ads__account_history_tmp"], "alias": "stg_linkedin_ads__account_history_tmp", "checksum": {"name": "sha256", "checksum": "7e37cd7a9d5af1e81073ee77b0a8262328883bdb1f27cc7381c28a0d34eef705"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450496.2338932, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__account_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\n{% if var('linkedin_ads_union_schemas', []) | length > 0 or var('linkedin_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='account_history', \n database_variable='linkedin_ads_database', \n schema_variable='linkedin_ads_schema', \n default_database=target.database,\n default_schema='linkedin_ads',\n default_variable='account_history',\n union_schema_variable='linkedin_ads_union_schemas',\n union_database_variable='linkedin_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='linkedin_ads_sources',\n single_source_name='linkedin_ads',\n single_table_name='account_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["linkedin_ads", "account_history"], ["linkedin_ads", "account_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.linkedin.linkedin_ads.account_history"]}, "compiled_path": "target/compiled/linkedin/models/staging/tmp/stg_linkedin_ads__account_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: linkedin_ads_account_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: linkedin_ad_account_history_data\n\n\n select\n \"id\",\n \"last_modified_time\",\n \"created_time\",\n \"name\",\n \"currency\",\n \"version_tag\"\n from \"postgres\".\"public\".\"linkedin_ad_account_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.apple_search_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "apple_search_ads__campaign_report", "resource_type": "model", "package_name": "apple_search_ads", "path": "apple_search_ads__campaign_report.sql", "original_file_path": "models/apple_search_ads__campaign_report.sql", "unique_id": "model.apple_search_ads.apple_search_ads__campaign_report", "fqn": ["apple_search_ads", "apple_search_ads__campaign_report"], "alias": "apple_search_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "a443a3a34a1d5275915454391a282a9bacc5bc167f407cbb770a0e70d68d5e0b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily ad performance of each campaign.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "The status of the campaign associted with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_at": {"name": "start_at", "description": "The start timestamp of this campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_at": {"name": "end_at", "description": "The end timestamp of this campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "taps": {"name": "taps", "description": "Number of taps on campaign on given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "total_downloads": {"name": "total_downloads", "description": "The sum of `new_downloads` and `redownloads`. Following the [release](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) of Apple Search Ads API v5, the package will sunset this field by April 2025. Please refer to its replacement, `tap_total_downloads`, instead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.total_downloads"]}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "The number of impressions of campaign in a given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on campaign in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}, "tap_total_downloads": {"name": "tap_total_downloads", "description": "The sum of `tap_new_downloads` and `tap_redownloads`. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `total_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_total_downloads"]}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.9191058, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith report as (\n \n select *\n from {{ ref('stg_apple_search_ads__campaign_report') }}\n\n), \n\ncampaign as (\n\n select *\n from {{ ref('stg_apple_search_ads__campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ ref('stg_apple_search_ads__organization') }}\n\n), \n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n campaign.organization_id,\n organization.organization_name,\n report.campaign_id, \n campaign.campaign_name, \n report.currency,\n campaign.campaign_status,\n campaign.start_at,\n campaign.end_at,\n sum(report.taps) as taps,\n sum(report.new_downloads) as new_downloads, -- this will be deprecated shortly; please reference tap_new_downloads instead\n sum(report.tap_new_downloads) as tap_new_downloads,\n sum(report.redownloads) as redownloads, -- this will be deprecated shortly; please reference tap_redownloads instead\n sum(report.tap_redownloads) as tap_redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads, -- this will be deprecated shortly; please reference tap_total_downloads instead\n sum(report.tap_new_downloads + report.tap_redownloads) as tap_total_downloads,\n sum(report.conversions) as conversions, -- this will be deprecated shortly; please reference tap_installs instead\n sum(report.tap_installs) as tap_installs,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ apple_search_ads_persist_pass_through_columns(\n pass_through_variable = 'apple_search_ads__campaign_passthrough_metrics',\n identifier = 'report',\n transform = 'sum',\n coalesce_with = 0,\n exclude_fields = ['conversions']) }}\n\n from report\n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join organization \n on campaign.organization_id = organization.organization_id\n and campaign.source_relation = organization.source_relation\n {{ dbt_utils.group_by(10) }}\n)\n\nselect * \nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__campaign_report", "package": null, "version": null}, {"name": "stg_apple_search_ads__campaign_history", "package": null, "version": null}, {"name": "stg_apple_search_ads__organization", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.apple_search_ads.apple_search_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__campaign_report", "model.apple_search_ads.stg_apple_search_ads__campaign_history", "model.apple_search_ads.stg_apple_search_ads__organization"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n \n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_report\"\n\n), \n\ncampaign as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_history\"\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__organization\"\n\n), \n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n campaign.organization_id,\n organization.organization_name,\n report.campaign_id, \n campaign.campaign_name, \n report.currency,\n campaign.campaign_status,\n campaign.start_at,\n campaign.end_at,\n sum(report.taps) as taps,\n sum(report.new_downloads) as new_downloads, -- this will be deprecated shortly; please reference tap_new_downloads instead\n sum(report.tap_new_downloads) as tap_new_downloads,\n sum(report.redownloads) as redownloads, -- this will be deprecated shortly; please reference tap_redownloads instead\n sum(report.tap_redownloads) as tap_redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads, -- this will be deprecated shortly; please reference tap_total_downloads instead\n sum(report.tap_new_downloads + report.tap_redownloads) as tap_total_downloads,\n sum(report.conversions) as conversions, -- this will be deprecated shortly; please reference tap_installs instead\n sum(report.tap_installs) as tap_installs,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n\n from report\n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join organization \n on campaign.organization_id = organization.organization_id\n and campaign.source_relation = organization.source_relation\n group by 1,2,3,4,5,6,7,8,9,10\n)\n\nselect * \nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.apple_search_ads__organization_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "apple_search_ads__organization_report", "resource_type": "model", "package_name": "apple_search_ads", "path": "apple_search_ads__organization_report.sql", "original_file_path": "models/apple_search_ads__organization_report.sql", "unique_id": "model.apple_search_ads.apple_search_ads__organization_report", "fqn": ["apple_search_ads", "apple_search_ads__organization_report"], "alias": "apple_search_ads__organization_report", "checksum": {"name": "sha256", "checksum": "ba10c795b24331bf59d8424b2810137469a91aa0a6bdc9e1d6905a82507e8f50"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily ad performance of each organization.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "taps": {"name": "taps", "description": "Number of taps on organization on given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "total_downloads": {"name": "total_downloads", "description": "The sum of `new_downloads` and `redownloads`. Following the [release](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) of Apple Search Ads API v5, the package will sunset this field by April 2025. Please refer to its replacement, `tap_total_downloads`, instead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.total_downloads"]}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "The number of impressions of organization in a given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on organization in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}, "tap_total_downloads": {"name": "tap_total_downloads", "description": "The sum of `tap_new_downloads` and `tap_redownloads`. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `total_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_total_downloads"]}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.9233193, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__organization_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith report as (\n \n select *\n from {{ ref('stg_apple_search_ads__campaign_report') }}\n), \n\ncampaign as (\n\n select *\n from {{ ref('stg_apple_search_ads__campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ ref('stg_apple_search_ads__organization') }}\n), \n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n organization.organization_id,\n organization.organization_name,\n organization.currency,\n sum(report.taps) as taps,\n sum(report.new_downloads) as new_downloads, -- this will be deprecated shortly; please reference tap_new_downloads instead\n sum(report.tap_new_downloads) as tap_new_downloads,\n sum(report.redownloads) as redownloads, -- this will be deprecated shortly; please reference tap_redownloads instead\n sum(report.tap_redownloads) as tap_redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads, -- this will be deprecated shortly; please reference tap_total_downloads instead\n sum(report.tap_new_downloads + report.tap_redownloads) as tap_total_downloads,\n sum(report.conversions) as conversions, -- this will be deprecated shortly; please reference tap_installs instead\n sum(report.tap_installs) as tap_installs,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ apple_search_ads_persist_pass_through_columns(\n pass_through_variable = 'apple_search_ads__campaign_passthrough_metrics',\n identifier = 'report',\n transform = 'sum',\n coalesce_with = 0,\n exclude_fields = ['conversions']) }}\n\n from report\n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join organization \n on campaign.organization_id = organization.organization_id\n and campaign.source_relation = organization.source_relation\n {{ dbt_utils.group_by(5) }}\n)\n\nselect * \nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__campaign_report", "package": null, "version": null}, {"name": "stg_apple_search_ads__campaign_history", "package": null, "version": null}, {"name": "stg_apple_search_ads__organization", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.apple_search_ads.apple_search_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__campaign_report", "model.apple_search_ads.stg_apple_search_ads__campaign_history", "model.apple_search_ads.stg_apple_search_ads__organization"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__organization_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n \n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_report\"\n), \n\ncampaign as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_history\"\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__organization\"\n), \n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n organization.organization_id,\n organization.organization_name,\n organization.currency,\n sum(report.taps) as taps,\n sum(report.new_downloads) as new_downloads, -- this will be deprecated shortly; please reference tap_new_downloads instead\n sum(report.tap_new_downloads) as tap_new_downloads,\n sum(report.redownloads) as redownloads, -- this will be deprecated shortly; please reference tap_redownloads instead\n sum(report.tap_redownloads) as tap_redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads, -- this will be deprecated shortly; please reference tap_total_downloads instead\n sum(report.tap_new_downloads + report.tap_redownloads) as tap_total_downloads,\n sum(report.conversions) as conversions, -- this will be deprecated shortly; please reference tap_installs instead\n sum(report.tap_installs) as tap_installs,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n\n from report\n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join organization \n on campaign.organization_id = organization.organization_id\n and campaign.source_relation = organization.source_relation\n group by 1,2,3,4,5\n)\n\nselect * \nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.apple_search_ads__search_term_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "apple_search_ads__search_term_report", "resource_type": "model", "package_name": "apple_search_ads", "path": "apple_search_ads__search_term_report.sql", "original_file_path": "models/apple_search_ads__search_term_report.sql", "unique_id": "model.apple_search_ads.apple_search_ads__search_term_report", "fqn": ["apple_search_ads", "apple_search_ads__search_term_report"], "alias": "apple_search_ads__search_term_report", "checksum": {"name": "sha256", "checksum": "98d501c53b4a2365853fb0fb71c02ec018fe2d27429802bd781138e91000cadf"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily ad performance of each search term, only includes records with search term values.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; EXACT or BROAD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "search_term_text": {"name": "search_term_text", "description": "Search term text.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "taps": {"name": "taps", "description": "Number of taps on organization on given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "total_downloads": {"name": "total_downloads", "description": "The sum of `new_downloads` and `redownloads`. Following the [release](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) of Apple Search Ads API v5, the package will sunset this field by April 2025. Please refer to its replacement, `tap_total_downloads`, instead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.total_downloads"]}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "The number of impressions of organization in a given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on organization in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_id": {"name": "keyword_id", "description": "Creative set name associatd with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_text": {"name": "keyword_text", "description": "Creative set ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}, "tap_total_downloads": {"name": "tap_total_downloads", "description": "The sum of `tap_new_downloads` and `tap_redownloads`. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `total_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_total_downloads"]}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.925329, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__search_term_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__apple_search_ads_enabled','apple_search_ads__using_search_terms'])) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_apple_search_ads__search_term_report') }}\n), \n\ncampaign as (\n\n select *\n from {{ ref('stg_apple_search_ads__campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ ref('stg_apple_search_ads__organization') }}\n), \n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n organization.organization_id,\n organization.organization_name,\n report.campaign_id, \n campaign.campaign_name, \n report.ad_group_id,\n report.ad_group_name,\n report.keyword_id,\n report.keyword_text,\n report.search_term_text,\n report.match_type,\n report.currency,\n sum(report.taps) as taps,\n sum(report.new_downloads) as new_downloads, -- this will be deprecated shortly; please reference tap_new_downloads instead\n sum(report.tap_new_downloads) as tap_new_downloads,\n sum(report.redownloads) as redownloads, -- this will be deprecated shortly; please reference tap_redownloads instead\n sum(report.tap_redownloads) as tap_redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads, -- this will be deprecated shortly; please reference tap_total_downloads instead\n sum(report.tap_new_downloads + report.tap_redownloads) as tap_total_downloads,\n sum(report.conversions) as conversions, -- this will be deprecated shortly; please reference tap_installs instead\n sum(report.tap_installs) as tap_installs,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ apple_search_ads_persist_pass_through_columns(\n pass_through_variable = 'apple_search_ads__search_term_passthrough_metrics',\n identifier = 'report',\n transform = 'sum',\n coalesce_with = 0,\n exclude_fields = ['conversions']) }}\n\n from report\n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join organization \n on campaign.organization_id = organization.organization_id\n and campaign.source_relation = organization.source_relation\n where report.search_term_text is not null\n {{ dbt_utils.group_by(13) }}\n)\n\nselect * \nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__search_term_report", "package": null, "version": null}, {"name": "stg_apple_search_ads__campaign_history", "package": null, "version": null}, {"name": "stg_apple_search_ads__organization", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.apple_search_ads.apple_search_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__search_term_report", "model.apple_search_ads.stg_apple_search_ads__campaign_history", "model.apple_search_ads.stg_apple_search_ads__organization"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__search_term_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__search_term_report\"\n), \n\ncampaign as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_history\"\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__organization\"\n), \n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n organization.organization_id,\n organization.organization_name,\n report.campaign_id, \n campaign.campaign_name, \n report.ad_group_id,\n report.ad_group_name,\n report.keyword_id,\n report.keyword_text,\n report.search_term_text,\n report.match_type,\n report.currency,\n sum(report.taps) as taps,\n sum(report.new_downloads) as new_downloads, -- this will be deprecated shortly; please reference tap_new_downloads instead\n sum(report.tap_new_downloads) as tap_new_downloads,\n sum(report.redownloads) as redownloads, -- this will be deprecated shortly; please reference tap_redownloads instead\n sum(report.tap_redownloads) as tap_redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads, -- this will be deprecated shortly; please reference tap_total_downloads instead\n sum(report.tap_new_downloads + report.tap_redownloads) as tap_total_downloads,\n sum(report.conversions) as conversions, -- this will be deprecated shortly; please reference tap_installs instead\n sum(report.tap_installs) as tap_installs,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n\n from report\n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join organization \n on campaign.organization_id = organization.organization_id\n and campaign.source_relation = organization.source_relation\n where report.search_term_text is not null\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13\n)\n\nselect * \nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.apple_search_ads__ad_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "apple_search_ads__ad_report", "resource_type": "model", "package_name": "apple_search_ads", "path": "apple_search_ads__ad_report.sql", "original_file_path": "models/apple_search_ads__ad_report.sql", "unique_id": "model.apple_search_ads.apple_search_ads__ad_report", "fqn": ["apple_search_ads", "apple_search_ads__ad_report"], "alias": "apple_search_ads__ad_report", "checksum": {"name": "sha256", "checksum": "2c764edf06023a27bc7eabd60ee108f65cd1d61a2a0c88fdec90f37236ad1c8e"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily ad performance of each ad.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_id": {"name": "ad_id", "description": "Ad ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_name": {"name": "ad_name", "description": "Ad name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_status": {"name": "ad_status", "description": "The status of the ad associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "taps": {"name": "taps", "description": "Number of taps on ad group on given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "total_downloads": {"name": "total_downloads", "description": "The sum of `new_downloads` and `redownloads`. Following the [release](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) of Apple Search Ads API v5, the package will sunset this field by April 2025. Please refer to its replacement, `tap_total_downloads`, instead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.total_downloads"]}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "The number of impressions of ad group in a given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on ad group in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}, "tap_total_downloads": {"name": "tap_total_downloads", "description": "The sum of `tap_new_downloads` and `tap_redownloads`. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `total_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_total_downloads"]}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.9175456, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__ad_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_apple_search_ads__ad_report') }}\n), \n\nad as (\n\n select * \n from {{ ref('stg_apple_search_ads__ad_history') }}\n where is_most_recent_record = True\n), \n\nad_group as (\n\n select * \n from {{ ref('stg_apple_search_ads__ad_group_history') }}\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from {{ ref('stg_apple_search_ads__campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ ref('stg_apple_search_ads__organization') }}\n), \n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n organization.organization_id,\n organization.organization_name,\n report.campaign_id, \n campaign.campaign_name, \n report.ad_group_id,\n ad_group.ad_group_name,\n report.ad_id,\n ad.ad_name,\n report.currency,\n ad.ad_status,\n sum(report.taps) as taps,\n sum(report.new_downloads) as new_downloads, -- this will be deprecated shortly; please reference tap_new_downloads instead\n sum(report.tap_new_downloads) as tap_new_downloads,\n sum(report.redownloads) as redownloads, -- this will be deprecated shortly; please reference tap_redownloads instead\n sum(report.tap_redownloads) as tap_redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads, -- this will be deprecated shortly; please reference tap_total_downloads instead\n sum(report.tap_new_downloads + report.tap_redownloads) as tap_total_downloads,\n sum(report.conversions) as conversions, -- this will be deprecated shortly; please reference tap_installs instead\n sum(report.tap_installs) as tap_installs,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ apple_search_ads_persist_pass_through_columns(\n pass_through_variable = 'apple_search_ads__ad_passthrough_metrics',\n identifier = 'report',\n transform = 'sum',\n coalesce_with = 0,\n exclude_fields = ['conversions']) }}\n\n from report\n left join ad \n on report.ad_id = ad.ad_id\n and report.source_relation = ad.source_relation\n left join ad_group \n on report.ad_group_id = ad_group.ad_group_id\n and report.source_relation = ad_group.source_relation\n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join organization \n on ad.organization_id = organization.organization_id\n and ad.source_relation = organization.source_relation\n {{ dbt_utils.group_by(12) }}\n)\n\nselect * \nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_report", "package": null, "version": null}, {"name": "stg_apple_search_ads__ad_history", "package": null, "version": null}, {"name": "stg_apple_search_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_apple_search_ads__campaign_history", "package": null, "version": null}, {"name": "stg_apple_search_ads__organization", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.apple_search_ads.apple_search_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_report", "model.apple_search_ads.stg_apple_search_ads__ad_history", "model.apple_search_ads.stg_apple_search_ads__ad_group_history", "model.apple_search_ads.stg_apple_search_ads__campaign_history", "model.apple_search_ads.stg_apple_search_ads__organization"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__ad_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_report\"\n), \n\nad as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_history\"\n where is_most_recent_record = True\n), \n\nad_group as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_history\"\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__organization\"\n), \n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n organization.organization_id,\n organization.organization_name,\n report.campaign_id, \n campaign.campaign_name, \n report.ad_group_id,\n ad_group.ad_group_name,\n report.ad_id,\n ad.ad_name,\n report.currency,\n ad.ad_status,\n sum(report.taps) as taps,\n sum(report.new_downloads) as new_downloads, -- this will be deprecated shortly; please reference tap_new_downloads instead\n sum(report.tap_new_downloads) as tap_new_downloads,\n sum(report.redownloads) as redownloads, -- this will be deprecated shortly; please reference tap_redownloads instead\n sum(report.tap_redownloads) as tap_redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads, -- this will be deprecated shortly; please reference tap_total_downloads instead\n sum(report.tap_new_downloads + report.tap_redownloads) as tap_total_downloads,\n sum(report.conversions) as conversions, -- this will be deprecated shortly; please reference tap_installs instead\n sum(report.tap_installs) as tap_installs,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n\n from report\n left join ad \n on report.ad_id = ad.ad_id\n and report.source_relation = ad.source_relation\n left join ad_group \n on report.ad_group_id = ad_group.ad_group_id\n and report.source_relation = ad_group.source_relation\n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join organization \n on ad.organization_id = organization.organization_id\n and ad.source_relation = organization.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12\n)\n\nselect * \nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.apple_search_ads__keyword_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "apple_search_ads__keyword_report", "resource_type": "model", "package_name": "apple_search_ads", "path": "apple_search_ads__keyword_report.sql", "original_file_path": "models/apple_search_ads__keyword_report.sql", "unique_id": "model.apple_search_ads.apple_search_ads__keyword_report", "fqn": ["apple_search_ads", "apple_search_ads__keyword_report"], "alias": "apple_search_ads__keyword_report", "checksum": {"name": "sha256", "checksum": "f2be26f2c5201a53fa11d8663fa3d732c837a28cbda667ca542380b90bc4a2e8"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily ad performance of each creative set.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_id": {"name": "keyword_id", "description": "Creative set name associatd with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_text": {"name": "keyword_text", "description": "Creative set ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; EXACT or BROAD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_status": {"name": "keyword_status", "description": "The status of the keyword associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "taps": {"name": "taps", "description": "Number of taps on keyword on given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "total_downloads": {"name": "total_downloads", "description": "The sum of `new_downloads` and `redownloads`. Following the [release](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) of Apple Search Ads API v5, the package will sunset this field by April 2025. Please refer to its replacement, `tap_total_downloads`, instead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.total_downloads"]}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "The number of impressions of keyword in a given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on keyword in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}, "tap_total_downloads": {"name": "tap_total_downloads", "description": "The sum of `tap_new_downloads` and `tap_redownloads`. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `total_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_total_downloads"]}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.9220328, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__keyword_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_apple_search_ads__keyword_report') }}\n), \n\nkeyword as (\n\n select *\n from {{ ref('stg_apple_search_ads__keyword_history') }}\n where is_most_recent_record = True\n), \n\nad_group as (\n\n select *\n from {{ ref('stg_apple_search_ads__ad_group_history') }}\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from {{ ref('stg_apple_search_ads__campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ ref('stg_apple_search_ads__organization') }}\n), \n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n organization.organization_id,\n organization.organization_name,\n campaign.campaign_id, \n campaign.campaign_name, \n ad_group.ad_group_id,\n ad_group.ad_group_name,\n report.keyword_id,\n keyword.keyword_text,\n keyword.match_type,\n report.currency,\n keyword.keyword_status,\n sum(report.taps) as taps,\n sum(report.new_downloads) as new_downloads, -- this will be deprecated shortly; please reference tap_new_downloads instead\n sum(report.tap_new_downloads) as tap_new_downloads,\n sum(report.redownloads) as redownloads, -- this will be deprecated shortly; please reference tap_redownloads instead\n sum(report.tap_redownloads) as tap_redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads, -- this will be deprecated shortly; please reference tap_total_downloads instead\n sum(report.tap_new_downloads + report.tap_redownloads) as tap_total_downloads,\n sum(report.conversions) as conversions, -- this will be deprecated shortly; please reference tap_installs instead\n sum(report.tap_installs) as tap_installs,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ apple_search_ads_persist_pass_through_columns(\n pass_through_variable = 'apple_search_ads__keyword_passthrough_metrics',\n identifier = 'report',\n transform = 'sum',\n coalesce_with = 0,\n exclude_fields = ['conversions']) }}\n\n from report\n left join keyword \n on report.keyword_id = keyword.keyword_id\n and report.source_relation = keyword.source_relation\n left join ad_group \n on keyword.ad_group_id = ad_group.ad_group_id\n and keyword.source_relation = ad_group.source_relation\n left join campaign \n on ad_group.campaign_id = campaign.campaign_id\n and ad_group.source_relation = campaign.source_relation\n left join organization \n on ad_group.organization_id = organization.organization_id\n and ad_group.source_relation = organization.source_relation\n {{ dbt_utils.group_by(13) }}\n)\n\nselect * \nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__keyword_report", "package": null, "version": null}, {"name": "stg_apple_search_ads__keyword_history", "package": null, "version": null}, {"name": "stg_apple_search_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_apple_search_ads__campaign_history", "package": null, "version": null}, {"name": "stg_apple_search_ads__organization", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.apple_search_ads.apple_search_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__keyword_report", "model.apple_search_ads.stg_apple_search_ads__keyword_history", "model.apple_search_ads.stg_apple_search_ads__ad_group_history", "model.apple_search_ads.stg_apple_search_ads__campaign_history", "model.apple_search_ads.stg_apple_search_ads__organization"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__keyword_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__keyword_report\"\n), \n\nkeyword as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__keyword_history\"\n where is_most_recent_record = True\n), \n\nad_group as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_history\"\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__organization\"\n), \n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n organization.organization_id,\n organization.organization_name,\n campaign.campaign_id, \n campaign.campaign_name, \n ad_group.ad_group_id,\n ad_group.ad_group_name,\n report.keyword_id,\n keyword.keyword_text,\n keyword.match_type,\n report.currency,\n keyword.keyword_status,\n sum(report.taps) as taps,\n sum(report.new_downloads) as new_downloads, -- this will be deprecated shortly; please reference tap_new_downloads instead\n sum(report.tap_new_downloads) as tap_new_downloads,\n sum(report.redownloads) as redownloads, -- this will be deprecated shortly; please reference tap_redownloads instead\n sum(report.tap_redownloads) as tap_redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads, -- this will be deprecated shortly; please reference tap_total_downloads instead\n sum(report.tap_new_downloads + report.tap_redownloads) as tap_total_downloads,\n sum(report.conversions) as conversions, -- this will be deprecated shortly; please reference tap_installs instead\n sum(report.tap_installs) as tap_installs,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n\n from report\n left join keyword \n on report.keyword_id = keyword.keyword_id\n and report.source_relation = keyword.source_relation\n left join ad_group \n on keyword.ad_group_id = ad_group.ad_group_id\n and keyword.source_relation = ad_group.source_relation\n left join campaign \n on ad_group.campaign_id = campaign.campaign_id\n and ad_group.source_relation = campaign.source_relation\n left join organization \n on ad_group.organization_id = organization.organization_id\n and ad_group.source_relation = organization.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13\n)\n\nselect * \nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.apple_search_ads__ad_group_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "apple_search_ads__ad_group_report", "resource_type": "model", "package_name": "apple_search_ads", "path": "apple_search_ads__ad_group_report.sql", "original_file_path": "models/apple_search_ads__ad_group_report.sql", "unique_id": "model.apple_search_ads.apple_search_ads__ad_group_report", "fqn": ["apple_search_ads", "apple_search_ads__ad_group_report"], "alias": "apple_search_ads__ad_group_report", "checksum": {"name": "sha256", "checksum": "143293addca99cbc932d856cec5e337bd8658eed58d340d4c00a7cd109773935"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily ad performance of each ad group.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_status": {"name": "ad_group_status", "description": "The status of the ad group associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_at": {"name": "start_at", "description": "The start timestamp for this ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_at": {"name": "end_at", "description": "The end timestamp for this ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "taps": {"name": "taps", "description": "Number of taps on ad group on given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "total_downloads": {"name": "total_downloads", "description": "The sum of `new_downloads` and `redownloads`. Following the [release](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) of Apple Search Ads API v5, the package will sunset this field by April 2025. Please refer to its replacement, `tap_total_downloads`, instead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.total_downloads"]}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "The number of impressions of ad group in a given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on ad group in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}, "tap_total_downloads": {"name": "tap_total_downloads", "description": "The sum of `tap_new_downloads` and `tap_redownloads`. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `total_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_total_downloads"]}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.914947, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__ad_group_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_apple_search_ads__ad_group_report') }}\n), \n\nad_group as (\n\n select * \n from {{ ref('stg_apple_search_ads__ad_group_history') }}\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from {{ ref('stg_apple_search_ads__campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ ref('stg_apple_search_ads__organization') }}\n), \n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n organization.organization_id,\n organization.organization_name,\n campaign.campaign_id, \n campaign.campaign_name, \n report.ad_group_id,\n ad_group.ad_group_name,\n report.currency,\n ad_group.ad_group_status,\n ad_group.start_at, \n ad_group.end_at,\n sum(report.taps) as taps,\n sum(report.new_downloads) as new_downloads, -- this will be deprecated shortly; please reference tap_new_downloads instead\n sum(report.tap_new_downloads) as tap_new_downloads,\n sum(report.redownloads) as redownloads, -- this will be deprecated shortly; please reference tap_redownloads instead\n sum(report.tap_redownloads) as tap_redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads, -- this will be deprecated shortly; please reference tap_total_downloads instead\n sum(report.tap_new_downloads + report.tap_redownloads) as tap_total_downloads,\n sum(report.conversions) as conversions, -- this will be deprecated shortly; please reference tap_installs instead\n sum(report.tap_installs) as tap_installs,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ apple_search_ads_persist_pass_through_columns(\n pass_through_variable = 'apple_search_ads__ad_group_passthrough_metrics',\n identifier = 'report',\n transform = 'sum',\n coalesce_with = 0,\n exclude_fields = ['conversions']) }}\n\n from report\n left join ad_group \n on report.ad_group_id = ad_group.ad_group_id\n and report.source_relation = ad_group.source_relation\n left join campaign \n on ad_group.campaign_id = campaign.campaign_id\n and ad_group.source_relation = campaign.source_relation\n left join organization \n on ad_group.organization_id = organization.organization_id\n and ad_group.source_relation = organization.source_relation\n {{ dbt_utils.group_by(12) }}\n)\n\nselect * \nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_group_report", "package": null, "version": null}, {"name": "stg_apple_search_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_apple_search_ads__campaign_history", "package": null, "version": null}, {"name": "stg_apple_search_ads__organization", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.apple_search_ads.apple_search_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_group_report", "model.apple_search_ads.stg_apple_search_ads__ad_group_history", "model.apple_search_ads.stg_apple_search_ads__campaign_history", "model.apple_search_ads.stg_apple_search_ads__organization"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__ad_group_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_group_report\"\n), \n\nad_group as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_history\"\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__organization\"\n), \n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n organization.organization_id,\n organization.organization_name,\n campaign.campaign_id, \n campaign.campaign_name, \n report.ad_group_id,\n ad_group.ad_group_name,\n report.currency,\n ad_group.ad_group_status,\n ad_group.start_at, \n ad_group.end_at,\n sum(report.taps) as taps,\n sum(report.new_downloads) as new_downloads, -- this will be deprecated shortly; please reference tap_new_downloads instead\n sum(report.tap_new_downloads) as tap_new_downloads,\n sum(report.redownloads) as redownloads, -- this will be deprecated shortly; please reference tap_redownloads instead\n sum(report.tap_redownloads) as tap_redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads, -- this will be deprecated shortly; please reference tap_total_downloads instead\n sum(report.tap_new_downloads + report.tap_redownloads) as tap_total_downloads,\n sum(report.conversions) as conversions, -- this will be deprecated shortly; please reference tap_installs instead\n sum(report.tap_installs) as tap_installs,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n\n from report\n left join ad_group \n on report.ad_group_id = ad_group.ad_group_id\n and report.source_relation = ad_group.source_relation\n left join campaign \n on ad_group.campaign_id = campaign.campaign_id\n and ad_group.source_relation = campaign.source_relation\n left join organization \n on ad_group.organization_id = organization.organization_id\n and ad_group.source_relation = organization.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12\n)\n\nselect * \nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__ad_group_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_group_history", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/stg_apple_search_ads__ad_group_history.sql", "original_file_path": "models/staging/stg_apple_search_ads__ad_group_history.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_group_history", "fqn": ["apple_search_ads", "staging", "stg_apple_search_ads__ad_group_history"], "alias": "stg_apple_search_ads__ad_group_history", "checksum": {"name": "sha256", "checksum": "d28835e6041fe9a60999e589d81356dc623ae33b79f5f9035ca286d19f3f39ba"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of an ad group in Apple Search Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "modified_at": {"name": "modified_at", "description": "Timestamp of when the ad group object was last modified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean indicating whether record was the most recent instance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_at": {"name": "start_at", "description": "The designated ad group start time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_at": {"name": "end_at", "description": "The designated ad group end time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The current status of the ad group, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/staging/stg_apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.9834335, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_group_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_apple_search_ads__ad_group_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_apple_search_ads__ad_group_history_tmp')),\n staging_columns=get_ad_group_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='apple_search_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n modification_time as modified_at,\n organization_id,\n campaign_id,\n name as ad_group_name,\n id as ad_group_id,\n status as ad_group_status,\n start_time as start_at,\n end_time as end_at,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='apple_search_ads') }} order by modification_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_group_history_tmp", "package": null, "version": null}, {"name": "stg_apple_search_ads__ad_group_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.apple_search_ads.get_ad_group_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_group_history_tmp"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads__ad_group_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_group_history_tmp\"\n),\n\nfields as (\n\n select\n \n campaign_id as campaign_id,\n end_time as end_time,\n id as id,\n modification_time as modification_time,\n name as name,\n organization_id as organization_id,\n start_time as start_time,\n status as status\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n modification_time as modified_at,\n organization_id,\n campaign_id,\n name as ad_group_name,\n id as ad_group_id,\n status as ad_group_status,\n start_time as start_at,\n end_time as end_at,\n row_number() over (partition by id order by modification_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__keyword_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__keyword_history", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/stg_apple_search_ads__keyword_history.sql", "original_file_path": "models/staging/stg_apple_search_ads__keyword_history.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__keyword_history", "fqn": ["apple_search_ads", "staging", "stg_apple_search_ads__keyword_history"], "alias": "stg_apple_search_ads__keyword_history", "checksum": {"name": "sha256", "checksum": "d3607fcd2c05eadb450186eb6c056c3f6b99e72226bbf1aeafda59a7fd1b6e45"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of a keyword in Apple Search Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "modified_at": {"name": "modified_at", "description": "Timestamp of when the keyword object was last modified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_id": {"name": "keyword_id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_amount": {"name": "bid_amount", "description": "The bid amount to display your ad for the matching text value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_currency": {"name": "bid_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; EXACT or BROAD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The current status of the keyword, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_text": {"name": "keyword_text", "description": "The word or phrase to match in user searches, to show respective ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/staging/stg_apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.9907007, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__keyword_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_apple_search_ads__keyword_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_apple_search_ads__keyword_history_tmp')),\n staging_columns=get_keyword_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='apple_search_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n modification_time as modified_at,\n campaign_id,\n ad_group_id,\n id as keyword_id,\n bid_amount, \n bid_currency,\n match_type,\n status as keyword_status,\n text as keyword_text,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='apple_search_ads') }} order by modification_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__keyword_history_tmp", "package": null, "version": null}, {"name": "stg_apple_search_ads__keyword_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.apple_search_ads.get_keyword_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__keyword_history_tmp"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads__keyword_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__keyword_history_tmp\"\n),\n\nfields as (\n\n select\n \n ad_group_id as ad_group_id,\n bid_amount as bid_amount,\n bid_currency as bid_currency,\n campaign_id as campaign_id,\n id as id,\n match_type as match_type,\n modification_time as modification_time,\n status as status,\n text as text\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n modification_time as modified_at,\n campaign_id,\n ad_group_id,\n id as keyword_id,\n bid_amount, \n bid_currency,\n match_type,\n status as keyword_status,\n text as keyword_text,\n row_number() over (partition by id order by modification_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__keyword_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__keyword_report", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/stg_apple_search_ads__keyword_report.sql", "original_file_path": "models/staging/stg_apple_search_ads__keyword_report.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__keyword_report", "fqn": ["apple_search_ads", "staging", "stg_apple_search_ads__keyword_report"], "alias": "stg_apple_search_ads__keyword_report", "checksum": {"name": "sha256", "checksum": "50f0ddc5757e5d570c398d37a4c787d706fa02c99ddadf2f06ec1f854839475d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a keyword in Apple Search Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "keyword_id": {"name": "keyword_id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The sum of costs associated with the number of impressions served; Spend is measured in the currency used in the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/staging/stg_apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.9919674, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__keyword_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_apple_search_ads__keyword_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_apple_search_ads__keyword_report_tmp')),\n staging_columns=get_keyword_report_columns()\n )\n }} \n \n {{ fivetran_utils.apply_source_relation(package_name='apple_search_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n id as keyword_id,\n impressions,\n local_spend_amount as spend,\n local_spend_currency as currency,\n coalesce(conversions, tap_installs) as conversions, \n coalesce(tap_installs, conversions) as tap_installs,\n coalesce(new_downloads, tap_new_downloads) as new_downloads,\n coalesce(tap_new_downloads, new_downloads) as tap_new_downloads,\n coalesce(redownloads, tap_redownloads) as redownloads,\n coalesce(tap_redownloads, redownloads) as tap_redownloads,\n taps\n\n {{ apple_search_ads_fill_pass_through_columns(\n pass_through_fields=var('apple_search_ads__keyword_passthrough_metrics'),\n except=['conversions']) }}\n\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__keyword_report_tmp", "package": null, "version": null}, {"name": "stg_apple_search_ads__keyword_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.apple_search_ads.get_keyword_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.apple_search_ads.apple_search_ads_fill_pass_through_columns"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__keyword_report_tmp"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads__keyword_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__keyword_report_tmp\"\n),\n\nfields as (\n\n select\n \n date as date,\n id as id,\n conversions as conversions,\n impressions as impressions,\n local_spend_amount as local_spend_amount,\n local_spend_currency as local_spend_currency,\n new_downloads as new_downloads,\n redownloads as redownloads,\n taps as taps,\n tap_installs as tap_installs,\n tap_new_downloads as tap_new_downloads,\n tap_redownloads as tap_redownloads \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n id as keyword_id,\n impressions,\n local_spend_amount as spend,\n local_spend_currency as currency,\n coalesce(conversions, tap_installs) as conversions, \n coalesce(tap_installs, conversions) as tap_installs,\n coalesce(new_downloads, tap_new_downloads) as new_downloads,\n coalesce(tap_new_downloads, new_downloads) as tap_new_downloads,\n coalesce(redownloads, tap_redownloads) as redownloads,\n coalesce(tap_redownloads, redownloads) as tap_redownloads,\n taps\n\n \n\n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__campaign_report", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/stg_apple_search_ads__campaign_report.sql", "original_file_path": "models/staging/stg_apple_search_ads__campaign_report.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__campaign_report", "fqn": ["apple_search_ads", "staging", "stg_apple_search_ads__campaign_report"], "alias": "stg_apple_search_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "22b08c44b9acff0431ba1f4ebea355752f8d1ca96353bed27a4b8fa4509439b7"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a campaign in Apple Search Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The sum of costs associated with the number of impressions served; Spend is measured in the currency used in the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/staging/stg_apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.9895191, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_apple_search_ads__campaign_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_apple_search_ads__campaign_report_tmp')),\n staging_columns=get_campaign_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='apple_search_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n id as campaign_id,\n impressions,\n local_spend_amount as spend,\n local_spend_currency as currency,\n coalesce(conversions, tap_installs) as conversions, \n coalesce(tap_installs, conversions) as tap_installs,\n coalesce(new_downloads, tap_new_downloads) as new_downloads,\n coalesce(tap_new_downloads, new_downloads) as tap_new_downloads,\n coalesce(redownloads, tap_redownloads) as redownloads,\n coalesce(tap_redownloads, redownloads) as tap_redownloads,\n taps\n\n {{ apple_search_ads_fill_pass_through_columns(\n pass_through_fields=var('apple_search_ads__campaign_passthrough_metrics'),\n except=['conversions']) }}\n\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__campaign_report_tmp", "package": null, "version": null}, {"name": "stg_apple_search_ads__campaign_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.apple_search_ads.get_campaign_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.apple_search_ads.apple_search_ads_fill_pass_through_columns"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__campaign_report_tmp"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_report_tmp\"\n),\n\nfields as (\n\n select\n \n date as date,\n id as id,\n conversions as conversions,\n impressions as impressions,\n local_spend_amount as local_spend_amount,\n local_spend_currency as local_spend_currency,\n new_downloads as new_downloads,\n redownloads as redownloads,\n taps as taps,\n tap_installs as tap_installs,\n tap_new_downloads as tap_new_downloads,\n tap_redownloads as tap_redownloads\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n id as campaign_id,\n impressions,\n local_spend_amount as spend,\n local_spend_currency as currency,\n coalesce(conversions, tap_installs) as conversions, \n coalesce(tap_installs, conversions) as tap_installs,\n coalesce(new_downloads, tap_new_downloads) as new_downloads,\n coalesce(tap_new_downloads, new_downloads) as tap_new_downloads,\n coalesce(redownloads, tap_redownloads) as redownloads,\n coalesce(tap_redownloads, redownloads) as tap_redownloads,\n taps\n\n \n\n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__search_term_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__search_term_report", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/stg_apple_search_ads__search_term_report.sql", "original_file_path": "models/staging/stg_apple_search_ads__search_term_report.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__search_term_report", "fqn": ["apple_search_ads", "staging", "stg_apple_search_ads__search_term_report"], "alias": "stg_apple_search_ads__search_term_report", "checksum": {"name": "sha256", "checksum": "4431d47543deacdca5eceb02e472423f250b5283a6e3b827e9d6092a3a230e43"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a search term in Apple Search Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "_fivetran_id": {"name": "_fivetran_id", "description": "A Fivetran internal unique id that helps us avoid duplicate rows in primary keyless tables.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_format": {"name": "ad_format", "description": "Format of creative set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_amount": {"name": "bid_amount", "description": "The bid amount to display your ad for the matching text value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_currency": {"name": "bid_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_text": {"name": "keyword_text", "description": "The word or phrase to match in user searches, to show respective ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_display_status": {"name": "keyword_display_status", "description": "The keyword display status can either be ACTIVE or PAUSED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_id": {"name": "keyword_id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The sum of costs associated with the number of impressions served; Spend is measured in the currency used in the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; values include EXACT, BROAD or AUTO.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "search_term_source": {"name": "search_term_source", "description": "The search term source can either be TARGETED or AUTO; if this value is AUTO so will match_type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "search_term_text": {"name": "search_term_text", "description": "The word or phrase to match of user searches.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/staging/stg_apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.9949384, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__search_term_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__apple_search_ads_enabled','apple_search_ads__using_search_terms'])) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_apple_search_ads__search_term_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_apple_search_ads__search_term_report_tmp')),\n staging_columns=get_search_term_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='apple_search_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n _fivetran_id,\n campaign_id,\n ad_group_id,\n ad_group_name,\n bid_amount_amount as bid_amount,\n bid_amount_currency as bid_currency,\n keyword as keyword_text,\n keyword_display_status,\n keyword_id,\n local_spend_amount as spend,\n local_spend_currency as currency,\n match_type,\n search_term_source,\n search_term_text,\n impressions,\n taps,\n coalesce(conversions, tap_installs) as conversions, \n coalesce(tap_installs, conversions) as tap_installs,\n coalesce(new_downloads, tap_new_downloads) as new_downloads,\n coalesce(tap_new_downloads, new_downloads) as tap_new_downloads,\n coalesce(redownloads, tap_redownloads) as redownloads,\n coalesce(tap_redownloads, redownloads) as tap_redownloads\n\n {{ apple_search_ads_fill_pass_through_columns(\n pass_through_fields=var('apple_search_ads__search_term_passthrough_metrics'),\n except=['conversions']) }}\n\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__search_term_report_tmp", "package": null, "version": null}, {"name": "stg_apple_search_ads__search_term_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.apple_search_ads.get_search_term_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.apple_search_ads.apple_search_ads_fill_pass_through_columns"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__search_term_report_tmp"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads__search_term_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__search_term_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_id as _fivetran_id,\n ad_group_deleted as ad_group_deleted,\n ad_group_id as ad_group_id,\n ad_group_name as ad_group_name,\n bid_amount_amount as bid_amount_amount,\n bid_amount_currency as bid_amount_currency,\n campaign_id as campaign_id,\n date as date,\n deleted as deleted,\n conversions as conversions,\n impressions as impressions,\n keyword as keyword,\n keyword_display_status as keyword_display_status,\n keyword_id as keyword_id,\n local_spend_amount as local_spend_amount,\n local_spend_currency as local_spend_currency,\n match_type as match_type,\n new_downloads as new_downloads,\n redownloads as redownloads,\n search_term_source as search_term_source,\n search_term_text as search_term_text,\n taps as taps,\n tap_installs as tap_installs,\n tap_new_downloads as tap_new_downloads,\n tap_redownloads as tap_redownloads\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n _fivetran_id,\n campaign_id,\n ad_group_id,\n ad_group_name,\n bid_amount_amount as bid_amount,\n bid_amount_currency as bid_currency,\n keyword as keyword_text,\n keyword_display_status,\n keyword_id,\n local_spend_amount as spend,\n local_spend_currency as currency,\n match_type,\n search_term_source,\n search_term_text,\n impressions,\n taps,\n coalesce(conversions, tap_installs) as conversions, \n coalesce(tap_installs, conversions) as tap_installs,\n coalesce(new_downloads, tap_new_downloads) as new_downloads,\n coalesce(tap_new_downloads, new_downloads) as tap_new_downloads,\n coalesce(redownloads, tap_redownloads) as redownloads,\n coalesce(tap_redownloads, redownloads) as tap_redownloads\n\n \n\n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__campaign_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__campaign_history", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/stg_apple_search_ads__campaign_history.sql", "original_file_path": "models/staging/stg_apple_search_ads__campaign_history.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__campaign_history", "fqn": ["apple_search_ads", "staging", "stg_apple_search_ads__campaign_history"], "alias": "stg_apple_search_ads__campaign_history", "checksum": {"name": "sha256", "checksum": "811e8cac6c9d16842fc234b3f9b553739bf877cf94d1bd1c32c0459652719ca9"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of a campaign in Apple Search Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "modified_at": {"name": "modified_at", "description": "Timestamp of when the campaign object was last modified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_at": {"name": "start_at", "description": "The designated ad group start time (ad group with the earliest start time associated with this campaign).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_at": {"name": "end_at", "description": "The designated campaign end time (ad group with the latest start time associated with this campaign).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name for the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The current status of the campaign, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/staging/stg_apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.9882183, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_apple_search_ads__campaign_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_apple_search_ads__campaign_history_tmp')),\n staging_columns=get_campaign_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='apple_search_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n modification_time as modified_at,\n organization_id,\n name as campaign_name,\n id as campaign_id,\n status as campaign_status,\n start_time as start_at,\n end_time as end_at,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='apple_search_ads') }} order by modification_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__campaign_history_tmp", "package": null, "version": null}, {"name": "stg_apple_search_ads__campaign_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.apple_search_ads.get_campaign_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__campaign_history_tmp"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads__campaign_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_history_tmp\"\n),\n\nfields as (\n\n select\n \n end_time as end_time,\n id as id,\n modification_time as modification_time,\n name as name,\n organization_id as organization_id,\n start_time as start_time,\n status as status\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n modification_time as modified_at,\n organization_id,\n name as campaign_name,\n id as campaign_id,\n status as campaign_status,\n start_time as start_at,\n end_time as end_at,\n row_number() over (partition by id order by modification_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__ad_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_report", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/stg_apple_search_ads__ad_report.sql", "original_file_path": "models/staging/stg_apple_search_ads__ad_report.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_report", "fqn": ["apple_search_ads", "staging", "stg_apple_search_ads__ad_report"], "alias": "stg_apple_search_ads__ad_report", "checksum": {"name": "sha256", "checksum": "58a74d74b050dd4c8cbbc4bbc1c4fb5ae40d849567d84037d3f91e02da72fc40"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of an ad in Apple Search Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_id": {"name": "ad_id", "description": "Ad ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The sum of costs associated with the number of impressions served; Spend is measured in the currency used in the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/staging/stg_apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.9871266, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_apple_search_ads__ad_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_apple_search_ads__ad_report_tmp')),\n staging_columns=get_ad_level_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='apple_search_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n campaign_id,\n ad_group_id,\n ad_id,\n impressions,\n local_spend_amount as spend,\n local_spend_currency as currency,\n coalesce(conversions, tap_installs) as conversions, \n coalesce(tap_installs, conversions) as tap_installs,\n coalesce(new_downloads, tap_new_downloads) as new_downloads,\n coalesce(tap_new_downloads, new_downloads) as tap_new_downloads,\n coalesce(redownloads, tap_redownloads) as redownloads,\n coalesce(tap_redownloads, redownloads) as tap_redownloads,\n taps\n\n {{ apple_search_ads_fill_pass_through_columns(\n pass_through_fields=var('apple_search_ads__ad_passthrough_metrics'),\n except=['conversions']) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_report_tmp", "package": null, "version": null}, {"name": "stg_apple_search_ads__ad_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.apple_search_ads.get_ad_level_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.apple_search_ads.apple_search_ads_fill_pass_through_columns"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_report_tmp"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads__ad_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_report_tmp\"\n),\n\nfields as (\n\n select\n \n ad_group_id as ad_group_id,\n ad_id as ad_id,\n campaign_id as campaign_id,\n date as date,\n conversions as conversions,\n impressions as impressions,\n local_spend_amount as local_spend_amount,\n local_spend_currency as local_spend_currency,\n new_downloads as new_downloads,\n redownloads as redownloads,\n taps as taps,\n tap_installs as tap_installs,\n tap_new_downloads as tap_new_downloads,\n tap_redownloads as tap_redownloads\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n campaign_id,\n ad_group_id,\n ad_id,\n impressions,\n local_spend_amount as spend,\n local_spend_currency as currency,\n coalesce(conversions, tap_installs) as conversions, \n coalesce(tap_installs, conversions) as tap_installs,\n coalesce(new_downloads, tap_new_downloads) as new_downloads,\n coalesce(tap_new_downloads, new_downloads) as tap_new_downloads,\n coalesce(redownloads, tap_redownloads) as redownloads,\n coalesce(tap_redownloads, redownloads) as tap_redownloads,\n taps\n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__ad_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_history", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/stg_apple_search_ads__ad_history.sql", "original_file_path": "models/staging/stg_apple_search_ads__ad_history.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_history", "fqn": ["apple_search_ads", "staging", "stg_apple_search_ads__ad_history"], "alias": "stg_apple_search_ads__ad_history", "checksum": {"name": "sha256", "checksum": "ec8551f5ea5fc3a9c70339824c8891445e2c0b6e1a08a34bb702c76e75331511"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of an ad in Apple Search Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "created_at": {"name": "created_at", "description": "Timestamp of when ad was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "modified_at": {"name": "modified_at", "description": "Timestamp of when the ad object was last modified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_name": {"name": "ad_name", "description": "Ad name associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_id": {"name": "ad_id", "description": "Ad ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_status": {"name": "ad_status", "description": "The current status of the ad, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/staging/stg_apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.9858072, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_apple_search_ads__ad_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_apple_search_ads__ad_history_tmp')),\n staging_columns=get_ad_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='apple_search_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n creation_time as created_at,\n modification_time as modified_at,\n org_id as organization_id,\n campaign_id,\n ad_group_id,\n name as ad_name,\n id as ad_id,\n status as ad_status, \n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='apple_search_ads') }} order by modification_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_history_tmp", "package": null, "version": null}, {"name": "stg_apple_search_ads__ad_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.apple_search_ads.get_ad_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_history_tmp"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads__ad_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_history_tmp\"\n),\n\nfields as (\n\n select\n \n ad_group_id as ad_group_id,\n campaign_id as campaign_id,\n creation_time as creation_time,\n id as id,\n modification_time as modification_time,\n name as name,\n org_id as org_id,\n status as status\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n creation_time as created_at,\n modification_time as modified_at,\n org_id as organization_id,\n campaign_id,\n ad_group_id,\n name as ad_name,\n id as ad_id,\n status as ad_status, \n row_number() over (partition by id order by modification_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__ad_group_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_group_report", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/stg_apple_search_ads__ad_group_report.sql", "original_file_path": "models/staging/stg_apple_search_ads__ad_group_report.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_group_report", "fqn": ["apple_search_ads", "staging", "stg_apple_search_ads__ad_group_report"], "alias": "stg_apple_search_ads__ad_group_report", "checksum": {"name": "sha256", "checksum": "0874ddfd3985298c7f9f31959c72f44b89683e07e9508d29a2fcf6332e317db8"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of an ad group in Apple Search Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The sum of costs associated with the number of impressions served. Spend is measured in the currency used in the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/staging/stg_apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.9847534, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_group_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_apple_search_ads__ad_group_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_apple_search_ads__ad_group_report_tmp')),\n staging_columns=get_ad_group_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='apple_search_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n date as date_day, \n ad_group_id,\n impressions,\n local_spend_amount as spend,\n local_spend_currency as currency,\n coalesce(conversions, tap_installs) as conversions, \n coalesce(tap_installs, conversions) as tap_installs,\n coalesce(new_downloads, tap_new_downloads) as new_downloads,\n coalesce(tap_new_downloads, new_downloads) as tap_new_downloads,\n coalesce(redownloads, tap_redownloads) as redownloads,\n coalesce(tap_redownloads, redownloads) as tap_redownloads,\n taps\n\n {{ apple_search_ads_fill_pass_through_columns(\n pass_through_fields=var('apple_search_ads__ad_group_passthrough_metrics'),\n except=['conversions']) }}\n\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_group_report_tmp", "package": null, "version": null}, {"name": "stg_apple_search_ads__ad_group_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.apple_search_ads.get_ad_group_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.apple_search_ads.apple_search_ads_fill_pass_through_columns"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_group_report_tmp"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads__ad_group_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_group_report_tmp\"\n),\n\nfields as (\n\n select\n \n ad_group_id as ad_group_id,\n date as date,\n conversions as conversions,\n impressions as impressions,\n local_spend_amount as local_spend_amount,\n local_spend_currency as local_spend_currency,\n new_downloads as new_downloads,\n redownloads as redownloads,\n taps as taps,\n tap_installs as tap_installs,\n tap_new_downloads as tap_new_downloads,\n tap_redownloads as tap_redownloads\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n date as date_day, \n ad_group_id,\n impressions,\n local_spend_amount as spend,\n local_spend_currency as currency,\n coalesce(conversions, tap_installs) as conversions, \n coalesce(tap_installs, conversions) as tap_installs,\n coalesce(new_downloads, tap_new_downloads) as new_downloads,\n coalesce(tap_new_downloads, new_downloads) as tap_new_downloads,\n coalesce(redownloads, tap_redownloads) as redownloads,\n coalesce(tap_redownloads, redownloads) as tap_redownloads,\n taps\n\n \n\n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__organization": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__organization", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/stg_apple_search_ads__organization.sql", "original_file_path": "models/staging/stg_apple_search_ads__organization.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__organization", "fqn": ["apple_search_ads", "staging", "stg_apple_search_ads__organization"], "alias": "stg_apple_search_ads__organization", "checksum": {"name": "sha256", "checksum": "a237fc021beae9640979eed4a7565362fa414d3ec2c48f67f799ca05d2e256c7"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents an organization in Apple Search Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Specified currency for respective organization.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "payment_model": {"name": "payment_model", "description": "Values include 'LOC', 'PAYG' or (payment method hasn't been set).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "organization_name": {"name": "organization_name", "description": "Name of organization.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "time_zone": {"name": "time_zone", "description": "Organization default timezone; values can be ORTZ or UTC.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/staging/stg_apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.9928508, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__organization\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_apple_search_ads__organization_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_apple_search_ads__organization_tmp')),\n staging_columns=get_organization_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='apple_search_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as organization_id,\n currency,\n payment_model,\n name as organization_name,\n time_zone\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__organization_tmp", "package": null, "version": null}, {"name": "stg_apple_search_ads__organization_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.apple_search_ads.get_organization_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__organization_tmp"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads__organization.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__organization_tmp\"\n),\n\nfields as (\n\n select\n \n currency as currency,\n id as id,\n name as name,\n payment_model as payment_model,\n time_zone as time_zone\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as organization_id,\n currency,\n payment_model,\n name as organization_name,\n time_zone\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__ad_group_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_group_history_tmp", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/tmp/stg_apple_search_ads__ad_group_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_apple_search_ads__ad_group_history_tmp.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_group_history_tmp", "fqn": ["apple_search_ads", "staging", "tmp", "stg_apple_search_ads__ad_group_history_tmp"], "alias": "stg_apple_search_ads__ad_group_history_tmp", "checksum": {"name": "sha256", "checksum": "75b99fe16f788842517719c57c82e7f1140f88c8a5e2bdbe54e51e0c2dbc9370"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450496.5326695, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_group_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\n{% if var('apple_search_ads_union_schemas', []) | length > 0 or var('apple_search_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_group_history', \n database_variable='apple_search_ads_database', \n schema_variable='apple_search_ads_schema', \n default_database=target.database,\n default_schema='apple_search_ads',\n default_variable='ad_group_history',\n union_schema_variable='apple_search_ads_union_schemas',\n union_database_variable='apple_search_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='apple_search_ads_sources',\n single_source_name='apple_search_ads',\n single_table_name='ad_group_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["apple_search_ads", "ad_group_history"], ["apple_search_ads", "ad_group_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.apple_search_ads.apple_search_ads.ad_group_history"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/tmp/stg_apple_search_ads__ad_group_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: apple_search_ads_ad_group_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: apple_search_ad_group_history_data\n\n\n select\n \"id\",\n \"modification_time\",\n \"automated_keywords_opt_in\",\n \"campaign_id\",\n \"cpa_goal_amount\",\n \"cpa_goal_currency\",\n \"default_cpc_bid_amount\",\n \"default_cpc_bid_currency\",\n \"deleted\",\n \"end_time\",\n \"name\",\n \"organization_id\",\n \"serving_state_reasons\",\n \"serving_status\",\n \"start_time\",\n \"status\",\n \"storefronts\"\n from \"postgres\".\"public\".\"apple_search_ad_group_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__campaign_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__campaign_report_tmp", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/tmp/stg_apple_search_ads__campaign_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_apple_search_ads__campaign_report_tmp.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__campaign_report_tmp", "fqn": ["apple_search_ads", "staging", "tmp", "stg_apple_search_ads__campaign_report_tmp"], "alias": "stg_apple_search_ads__campaign_report_tmp", "checksum": {"name": "sha256", "checksum": "806601e26978e61eaec0a1ae29a2879c209382c42a20bd1ca367a789fa77e1db"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450496.5438852, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\n{% if var('apple_search_ads_union_schemas', []) | length > 0 or var('apple_search_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_report', \n database_variable='apple_search_ads_database', \n schema_variable='apple_search_ads_schema', \n default_database=target.database,\n default_schema='apple_search_ads',\n default_variable='campaign_report',\n union_schema_variable='apple_search_ads_union_schemas',\n union_database_variable='apple_search_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='apple_search_ads_sources',\n single_source_name='apple_search_ads',\n single_table_name='campaign_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["apple_search_ads", "campaign_report"], ["apple_search_ads", "campaign_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.apple_search_ads.apple_search_ads.campaign_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/tmp/stg_apple_search_ads__campaign_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: apple_search_ads_campaign_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: apple_search_campaign_report_data\n\n\n select\n \"date\",\n \"id\",\n \"avg_cpa_amount\",\n \"avg_cpa_currency\",\n \"avg_cpt_amount\",\n \"avg_cpt_currency\",\n \"conversion_rate\",\n \"conversions\",\n \"impressions\",\n \"lat_off_installs\",\n \"lat_on_installs\",\n \"local_spend_amount\",\n \"local_spend_currency\",\n \"new_downloads\",\n \"redownloads\",\n \"tap_through_rate\",\n \"taps\",\n \"tap_installs\",\n \"tap_new_downloads\",\n \"tap_redownloads\"\n from \"postgres\".\"public\".\"apple_search_campaign_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__campaign_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__campaign_history_tmp", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/tmp/stg_apple_search_ads__campaign_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_apple_search_ads__campaign_history_tmp.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__campaign_history_tmp", "fqn": ["apple_search_ads", "staging", "tmp", "stg_apple_search_ads__campaign_history_tmp"], "alias": "stg_apple_search_ads__campaign_history_tmp", "checksum": {"name": "sha256", "checksum": "f3685e8e12d74d80cae84acab3ea488454cdb561c05c2d9750d266fef1340d6d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450496.554997, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\n{% if var('apple_search_ads_union_schemas', []) | length > 0 or var('apple_search_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_history', \n database_variable='apple_search_ads_database', \n schema_variable='apple_search_ads_schema', \n default_database=target.database,\n default_schema='apple_search_ads',\n default_variable='campaign_history',\n union_schema_variable='apple_search_ads_union_schemas',\n union_database_variable='apple_search_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='apple_search_ads_sources',\n single_source_name='apple_search_ads',\n single_table_name='campaign_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["apple_search_ads", "campaign_history"], ["apple_search_ads", "campaign_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.apple_search_ads.apple_search_ads.campaign_history"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/tmp/stg_apple_search_ads__campaign_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: apple_search_ads_campaign_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: apple_search_campaign_history_data\n\n\n select\n \"id\",\n \"modification_time\",\n \"adam_id\",\n \"budget_amount\",\n \"budget_currency\",\n \"budget_orders\",\n \"daily_budget_amount\",\n \"daily_budget_currency\",\n \"deleted\",\n \"end_time\",\n \"loc_invoice_detail_buyer_email\",\n \"loc_invoice_detail_buyer_name\",\n \"loc_invoice_detail_client_name\",\n \"loc_invoice_detail_order_number\",\n \"name\",\n \"organization_id\",\n \"payment_model\",\n \"serving_state_reasons\",\n \"serving_status\",\n \"start_time\",\n \"status\"\n from \"postgres\".\"public\".\"apple_search_campaign_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__keyword_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__keyword_history_tmp", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/tmp/stg_apple_search_ads__keyword_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_apple_search_ads__keyword_history_tmp.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__keyword_history_tmp", "fqn": ["apple_search_ads", "staging", "tmp", "stg_apple_search_ads__keyword_history_tmp"], "alias": "stg_apple_search_ads__keyword_history_tmp", "checksum": {"name": "sha256", "checksum": "7a1c187e725b57fc0e2d57f647e52d97009569e9f559325be4834378a0f82e2f"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450496.5677629, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__keyword_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\n{% if var('apple_search_ads_union_schemas', []) | length > 0 or var('apple_search_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='keyword_history', \n database_variable='apple_search_ads_database', \n schema_variable='apple_search_ads_schema', \n default_database=target.database,\n default_schema='apple_search_ads',\n default_variable='keyword_history',\n union_schema_variable='apple_search_ads_union_schemas',\n union_database_variable='apple_search_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='apple_search_ads_sources',\n single_source_name='apple_search_ads',\n single_table_name='keyword_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["apple_search_ads", "keyword_history"], ["apple_search_ads", "keyword_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.apple_search_ads.apple_search_ads.keyword_history"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/tmp/stg_apple_search_ads__keyword_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: apple_search_ads_keyword_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: apple_search_keyword_history_data\n\n\n select\n \"id\",\n \"modification_time\",\n \"ad_group_id\",\n \"bid_amount\",\n \"bid_currency\",\n \"campaign_id\",\n \"deleted\",\n \"match_type\",\n \"status\",\n \"text\"\n from \"postgres\".\"public\".\"apple_search_keyword_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__search_term_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__search_term_report_tmp", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/tmp/stg_apple_search_ads__search_term_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_apple_search_ads__search_term_report_tmp.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__search_term_report_tmp", "fqn": ["apple_search_ads", "staging", "tmp", "stg_apple_search_ads__search_term_report_tmp"], "alias": "stg_apple_search_ads__search_term_report_tmp", "checksum": {"name": "sha256", "checksum": "c19662b56c0269db51a0fb2fe98276e97c9fda46d46f757ee8f3942c6889d7ae"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450496.5788548, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__search_term_report_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__apple_search_ads_enabled','apple_search_ads__using_search_terms'])) }}\n\n{% if var('apple_search_ads_union_schemas', []) | length > 0 or var('apple_search_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='search_term_report', \n database_variable='apple_search_ads_database', \n schema_variable='apple_search_ads_schema', \n default_database=target.database,\n default_schema='apple_search_ads',\n default_variable='search_term_report',\n union_schema_variable='apple_search_ads_union_schemas',\n union_database_variable='apple_search_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='apple_search_ads_sources',\n single_source_name='apple_search_ads',\n single_table_name='search_term_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["apple_search_ads", "search_term_report"], ["apple_search_ads", "search_term_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.apple_search_ads.apple_search_ads.search_term_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/tmp/stg_apple_search_ads__search_term_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: apple_search_ads_search_term_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: apple_search_search_term_report_data\n\n\n select\n \"_fivetran_id\",\n \"ad_group_id\",\n \"campaign_id\",\n \"date\",\n \"ad_group_deleted\",\n \"ad_group_name\",\n \"avg_cpa_amount\",\n \"avg_cpa_currency\",\n \"avg_cpt_amount\",\n \"avg_cpt_currency\",\n \"bid_amount_amount\",\n \"bid_amount_currency\",\n \"conversion_rate\",\n \"conversions\",\n \"deleted\",\n \"impressions\",\n \"keyword\",\n \"keyword_display_status\",\n \"keyword_id\",\n \"lat_off_installs\",\n \"lat_on_installs\",\n \"local_spend_amount\",\n \"local_spend_currency\",\n \"match_type\",\n \"new_downloads\",\n \"redownloads\",\n \"search_term_source\",\n \"search_term_text\",\n \"tap_through_rate\",\n \"taps\",\n \"tap_installs\",\n \"tap_new_downloads\",\n \"tap_redownloads\"\n from \"postgres\".\"public\".\"apple_search_search_term_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__keyword_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__keyword_report_tmp", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/tmp/stg_apple_search_ads__keyword_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_apple_search_ads__keyword_report_tmp.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__keyword_report_tmp", "fqn": ["apple_search_ads", "staging", "tmp", "stg_apple_search_ads__keyword_report_tmp"], "alias": "stg_apple_search_ads__keyword_report_tmp", "checksum": {"name": "sha256", "checksum": "d41cd93af1a24bcd62aa926cb64bc83b7a4d4b33cdc6b2796e90d5247be1d6b9"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450496.5904095, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__keyword_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\n{% if var('apple_search_ads_union_schemas', []) | length > 0 or var('apple_search_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='keyword_report', \n database_variable='apple_search_ads_database', \n schema_variable='apple_search_ads_schema', \n default_database=target.database,\n default_schema='apple_search_ads',\n default_variable='keyword_report',\n union_schema_variable='apple_search_ads_union_schemas',\n union_database_variable='apple_search_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='apple_search_ads_sources',\n single_source_name='apple_search_ads',\n single_table_name='keyword_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["apple_search_ads", "keyword_report"], ["apple_search_ads", "keyword_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.apple_search_ads.apple_search_ads.keyword_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/tmp/stg_apple_search_ads__keyword_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: apple_search_ads_keyword_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: apple_search_keyword_report_data\n\n\n select\n \"date\",\n \"id\",\n \"avg_cpa_amount\",\n \"avg_cpa_currency\",\n \"avg_cpt_amount\",\n \"avg_cpt_currency\",\n \"conversion_rate\",\n \"conversions\",\n \"impressions\",\n \"lat_off_installs\",\n \"lat_on_installs\",\n \"local_spend_amount\",\n \"local_spend_currency\",\n \"new_downloads\",\n \"redownloads\",\n \"tap_through_rate\",\n \"taps\",\n \"tap_installs\",\n \"tap_new_downloads\",\n \"tap_redownloads\"\n from \"postgres\".\"public\".\"apple_search_keyword_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__ad_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_history_tmp", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/tmp/stg_apple_search_ads__ad_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_apple_search_ads__ad_history_tmp.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_history_tmp", "fqn": ["apple_search_ads", "staging", "tmp", "stg_apple_search_ads__ad_history_tmp"], "alias": "stg_apple_search_ads__ad_history_tmp", "checksum": {"name": "sha256", "checksum": "9edaf3379243d092338c4b863295cf1e021cf5623273a34ed001fdf57a6c8bf2"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450496.6028144, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\n{% if var('apple_search_ads_union_schemas', []) | length > 0 or var('apple_search_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_history', \n database_variable='apple_search_ads_database', \n schema_variable='apple_search_ads_schema', \n default_database=target.database,\n default_schema='apple_search_ads',\n default_variable='ad_history',\n union_schema_variable='apple_search_ads_union_schemas',\n union_database_variable='apple_search_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='apple_search_ads_sources',\n single_source_name='apple_search_ads',\n single_table_name='ad_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["apple_search_ads", "ad_history"], ["apple_search_ads", "ad_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.apple_search_ads.apple_search_ads.ad_history"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/tmp/stg_apple_search_ads__ad_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: apple_search_ads_ad_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: apple_search_ad_history_data\n\n\n select\n \"creation_time\",\n \"modification_time\",\n \"org_id\",\n \"campaign_id\",\n \"ad_group_id\",\n \"name\",\n \"id\",\n \"creative_id\",\n \"creative_type\",\n \"status\"\n from \"postgres\".\"public\".\"apple_search_ad_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__ad_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_report_tmp", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/tmp/stg_apple_search_ads__ad_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_apple_search_ads__ad_report_tmp.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_report_tmp", "fqn": ["apple_search_ads", "staging", "tmp", "stg_apple_search_ads__ad_report_tmp"], "alias": "stg_apple_search_ads__ad_report_tmp", "checksum": {"name": "sha256", "checksum": "ed2508015a875221eb9c01d9f6e99f08186ee01997fc038cd236d06ec2059f39"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450496.6142292, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\n{% if var('apple_search_ads_union_schemas', []) | length > 0 or var('apple_search_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_level_report', \n database_variable='apple_search_ads_database', \n schema_variable='apple_search_ads_schema', \n default_database=target.database,\n default_schema='apple_search_ads',\n default_variable='ad_level_report',\n union_schema_variable='apple_search_ads_union_schemas',\n union_database_variable='apple_search_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='apple_search_ads_sources',\n single_source_name='apple_search_ads',\n single_table_name='ad_level_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["apple_search_ads", "ad_level_report"], ["apple_search_ads", "ad_level_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.apple_search_ads.apple_search_ads.ad_level_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/tmp/stg_apple_search_ads__ad_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: apple_search_ads_ad_level_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: apple_search_ad_report_data\n\n\n select\n \"date\",\n \"campaign_id\",\n \"ad_group_id\",\n \"ad_id\",\n \"impressions\",\n \"local_spend_amount\",\n \"local_spend_currency\",\n \"new_downloads\",\n \"redownloads\",\n \"tap_installs\",\n \"tap_new_downloads\",\n \"tap_redownloads\",\n \"taps\",\n \"conversions\"\n from \"postgres\".\"public\".\"apple_search_ad_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__ad_group_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_group_report_tmp", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/tmp/stg_apple_search_ads__ad_group_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_apple_search_ads__ad_group_report_tmp.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_group_report_tmp", "fqn": ["apple_search_ads", "staging", "tmp", "stg_apple_search_ads__ad_group_report_tmp"], "alias": "stg_apple_search_ads__ad_group_report_tmp", "checksum": {"name": "sha256", "checksum": "ad3a2f54eed05a5470b28e2a348dadb45b595f44b9f02cf91ea488abd084476a"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450496.6257842, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_group_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\n{% if var('apple_search_ads_union_schemas', []) | length > 0 or var('apple_search_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_group_report', \n database_variable='apple_search_ads_database', \n schema_variable='apple_search_ads_schema', \n default_database=target.database,\n default_schema='apple_search_ads',\n default_variable='ad_group_report',\n union_schema_variable='apple_search_ads_union_schemas',\n union_database_variable='apple_search_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='apple_search_ads_sources',\n single_source_name='apple_search_ads',\n single_table_name='ad_group_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["apple_search_ads", "ad_group_report"], ["apple_search_ads", "ad_group_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.apple_search_ads.apple_search_ads.ad_group_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/tmp/stg_apple_search_ads__ad_group_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: apple_search_ads_ad_group_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: apple_search_ad_group_report_data\n\n\n select\n \"ad_group_id\",\n \"date\",\n \"avg_cpa_amount\",\n \"avg_cpa_currency\",\n \"avg_cpt_amount\",\n \"avg_cpt_currency\",\n \"conversion_rate\",\n \"conversions\",\n \"impressions\",\n \"lat_off_installs\",\n \"lat_on_installs\",\n \"local_spend_amount\",\n \"local_spend_currency\",\n \"new_downloads\",\n \"redownloads\",\n \"tap_through_rate\",\n \"taps\",\n \"tap_installs\",\n \"tap_new_downloads\",\n \"tap_redownloads\"\n from \"postgres\".\"public\".\"apple_search_ad_group_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__organization_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__organization_tmp", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/tmp/stg_apple_search_ads__organization_tmp.sql", "original_file_path": "models/staging/tmp/stg_apple_search_ads__organization_tmp.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__organization_tmp", "fqn": ["apple_search_ads", "staging", "tmp", "stg_apple_search_ads__organization_tmp"], "alias": "stg_apple_search_ads__organization_tmp", "checksum": {"name": "sha256", "checksum": "681f9d1c727372db8d81bf6c38c422c08960093460dd1f12ba5ff096178b56df"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450496.6368325, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__organization_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\n{% if var('apple_search_ads_union_schemas', []) | length > 0 or var('apple_search_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='organization', \n database_variable='apple_search_ads_database', \n schema_variable='apple_search_ads_schema', \n default_database=target.database,\n default_schema='apple_search_ads',\n default_variable='organization',\n union_schema_variable='apple_search_ads_union_schemas',\n union_database_variable='apple_search_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='apple_search_ads_sources',\n single_source_name='apple_search_ads',\n single_table_name='organization'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["apple_search_ads", "organization"], ["apple_search_ads", "organization"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.apple_search_ads.apple_search_ads.organization"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/tmp/stg_apple_search_ads__organization_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: apple_search_ads_organization_identifier\n -- database: postgres \n -- schema: public\n -- identifier: apple_search_organization_data\n\n\n select\n \"id\",\n \"currency\",\n \"name\",\n \"payment_model\",\n \"role_names\",\n \"time_zone\"\n from \"postgres\".\"public\".\"apple_search_organization_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.reddit_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "reddit_ads__campaign_report", "resource_type": "model", "package_name": "reddit_ads", "path": "reddit_ads__campaign_report.sql", "original_file_path": "models/reddit_ads__campaign_report.sql", "unique_id": "model.reddit_ads.reddit_ads__campaign_report", "fqn": ["reddit_ads", "reddit_ads__campaign_report"], "alias": "reddit_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "2c9f70052ba1a5f8c071eb20a28606c4eeda5a7b3ac32e45494f43dba74043db"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily number of clicks, impressions, and spend per campaign, along with account information.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "campaign_name": {"name": "campaign_name", "description": "Name of campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "currency": {"name": "currency", "description": "The currency this account uses (ISO-4217)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.currency"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "spend": {"name": "spend", "description": "Spend converted out of microcurrency (so Spend/1,000,000)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "The total click-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "The total view-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion"]}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "purchase_conversions": {"name": "purchase_conversions", "description": "Total attributed click-through conversions for purchase events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_view_through_conversions": {"name": "purchase_view_through_conversions", "description": "Total attributed view-through conversions for purchase events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_value": {"name": "purchase_value", "description": "Total monetary value associated with purchase conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_items": {"name": "purchase_items", "description": "Total number of items involved in purchase conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_conversions": {"name": "lead_conversions", "description": "Total attributed click-through conversions for lead generation events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_view_through_conversions": {"name": "lead_view_through_conversions", "description": "Total attributed view-through conversions for lead generation events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_value": {"name": "lead_value", "description": "Total monetary value associated with lead generation conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_items": {"name": "lead_items", "description": "Total number of items involved in lead generation conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_conversions": {"name": "custom_conversions", "description": "Total attributed click-through conversions for custom-defined events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_view_through_conversions": {"name": "custom_view_through_conversions", "description": "Total attributed view-through conversions for custom-defined events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_value": {"name": "custom_value", "description": "Total monetary value associated with custom-defined conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_items": {"name": "custom_items", "description": "Total number of items involved in custom-defined conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.0766015, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_reddit_ads__campaign_report') }}\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_reddit_ads__campaign') }}\n),\n\naccounts as (\n\n select *\n from {{ ref('stg_reddit_ads__account') }}\n),\n\n{# This includes data at the event type level that we'll need to roll up and pivot out #}\nconversions_report as (\n\n select *\n from {{ ref('stg_reddit_ads__campaign_conversions_report') }}\n),\n\nrollup_conversions_report as (\n\n select \n source_relation,\n date_day,\n campaign_id,\n sum(conversions) as conversions,\n sum(view_through_conversions) as view_through_conversions,\n sum(total_value) as total_value,\n sum(total_items) as total_items\n\n {% if var('reddit_ads__conversion_event_types') %}\n {% for event_type in var('reddit_ads__conversion_event_types') %}\n , sum(case when event_name = '{{ event_type|lower }}' then conversions else 0 end) as {{ event_type|lower }}_conversions\n , sum(case when event_name = '{{ event_type|lower }}' then view_through_conversions else 0 end) as {{ event_type|lower }}_view_through_conversions\n , sum(case when event_name = '{{ event_type|lower }}' then total_value else 0 end) as {{ event_type|lower }}_value\n , sum(case when event_name = '{{ event_type|lower }}' then total_items else 0 end) as {{ event_type|lower }}_items\n {% endfor %}\n {% endif %}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='reddit_ads__campaign_conversions_passthrough_metrics', transform = 'sum') }}\n\n from conversions_report\n\n {% if var('reddit_ads__conversion_event_types') %}\n where \n {% for event_type in var('reddit_ads__conversion_event_types') %}\n event_name = '{{ event_type|lower }}'\n {% if not loop.last %} or {% endif %} \n {% endfor %}\n {% endif %}\n\n group by 1,2,3\n),\n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n accounts.currency,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(rollup_conversions_report.conversions) as conversions,\n sum(rollup_conversions_report.view_through_conversions) as view_through_conversions,\n sum(rollup_conversions_report.total_value) as total_value,\n sum(rollup_conversions_report.total_items) as total_items\n\n {% if var('reddit_ads__conversion_event_types') %} \n {% for event_type in var('reddit_ads__conversion_event_types') %}\n , sum({{ event_type|lower }}_conversions) as {{ event_type|lower }}_conversions\n , sum({{ event_type|lower }}_view_through_conversions) as {{ event_type|lower }}_view_through_conversions\n , sum({{ event_type|lower }}_value) as {{ event_type|lower }}_value\n , sum({{ event_type|lower }}_items) as {{ event_type|lower }}_items\n {% endfor %}\n {% endif %}\n\n {{ reddit_ads_persist_pass_through_columns(pass_through_variable='reddit_ads__campaign_passthrough_metrics', identifier = 'report', transform = 'sum', alias_fields=['conversions', 'view_through_conversions', 'total_value', 'total_items']) }}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='reddit_ads__campaign_conversions_passthrough_metrics', transform = 'sum') }}\n\n from report\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join rollup_conversions_report\n on report.campaign_id = rollup_conversions_report.campaign_id\n and report.source_relation = rollup_conversions_report.source_relation\n and report.date_day = rollup_conversions_report.date_day\n {{ dbt_utils.group_by(6) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__campaign_report", "package": null, "version": null}, {"name": "stg_reddit_ads__campaign", "package": null, "version": null}, {"name": "stg_reddit_ads__account", "package": null, "version": null}, {"name": "stg_reddit_ads__campaign_conversions_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.reddit_ads.reddit_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.reddit_ads.stg_reddit_ads__campaign_report", "model.reddit_ads.stg_reddit_ads__campaign", "model.reddit_ads.stg_reddit_ads__account", "model.reddit_ads.stg_reddit_ads__campaign_conversions_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_report\"\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign\"\n),\n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account\"\n),\n\n\nconversions_report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_conversions_report\"\n),\n\nrollup_conversions_report as (\n\n select \n source_relation,\n date_day,\n campaign_id,\n sum(conversions) as conversions,\n sum(view_through_conversions) as view_through_conversions,\n sum(total_value) as total_value,\n sum(total_items) as total_items\n\n \n \n , sum(case when event_name = 'lead' then conversions else 0 end) as lead_conversions\n , sum(case when event_name = 'lead' then view_through_conversions else 0 end) as lead_view_through_conversions\n , sum(case when event_name = 'lead' then total_value else 0 end) as lead_value\n , sum(case when event_name = 'lead' then total_items else 0 end) as lead_items\n \n , sum(case when event_name = 'purchase' then conversions else 0 end) as purchase_conversions\n , sum(case when event_name = 'purchase' then view_through_conversions else 0 end) as purchase_view_through_conversions\n , sum(case when event_name = 'purchase' then total_value else 0 end) as purchase_value\n , sum(case when event_name = 'purchase' then total_items else 0 end) as purchase_items\n \n , sum(case when event_name = 'custom' then conversions else 0 end) as custom_conversions\n , sum(case when event_name = 'custom' then view_through_conversions else 0 end) as custom_view_through_conversions\n , sum(case when event_name = 'custom' then total_value else 0 end) as custom_value\n , sum(case when event_name = 'custom' then total_items else 0 end) as custom_items\n \n \n\n \n\n\n\n\n\n from conversions_report\n\n \n where \n \n event_name = 'lead'\n or \n \n event_name = 'purchase'\n or \n \n event_name = 'custom'\n \n \n \n\n group by 1,2,3\n),\n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n accounts.currency,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(rollup_conversions_report.conversions) as conversions,\n sum(rollup_conversions_report.view_through_conversions) as view_through_conversions,\n sum(rollup_conversions_report.total_value) as total_value,\n sum(rollup_conversions_report.total_items) as total_items\n\n \n \n , sum(lead_conversions) as lead_conversions\n , sum(lead_view_through_conversions) as lead_view_through_conversions\n , sum(lead_value) as lead_value\n , sum(lead_items) as lead_items\n \n , sum(purchase_conversions) as purchase_conversions\n , sum(purchase_view_through_conversions) as purchase_view_through_conversions\n , sum(purchase_value) as purchase_value\n , sum(purchase_items) as purchase_items\n \n , sum(custom_conversions) as custom_conversions\n , sum(custom_view_through_conversions) as custom_view_through_conversions\n , sum(custom_value) as custom_value\n , sum(custom_items) as custom_items\n \n \n\n \n\n\n\n\n\n \n\n\n\n\n\n from report\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join rollup_conversions_report\n on report.campaign_id = rollup_conversions_report.campaign_id\n and report.source_relation = rollup_conversions_report.source_relation\n and report.date_day = rollup_conversions_report.date_day\n group by 1,2,3,4,5,6\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.reddit_ads__campaign_country_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "reddit_ads__campaign_country_report", "resource_type": "model", "package_name": "reddit_ads", "path": "reddit_ads__campaign_country_report.sql", "original_file_path": "models/reddit_ads__campaign_country_report.sql", "unique_id": "model.reddit_ads.reddit_ads__campaign_country_report", "fqn": ["reddit_ads", "reddit_ads__campaign_country_report"], "alias": "reddit_ads__campaign_country_report", "checksum": {"name": "sha256", "checksum": "b083a4587ec843b55b2bbdd4c4588caae5a5e4adfc896306b8edf00fcf5db74e"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily number of clicks, impressions, and spend per campaign and country, along with account information.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "Name of campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_name"]}, "country": {"name": "country", "description": "The country associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.country"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "spend": {"name": "spend", "description": "Spend converted out of microcurrency (so Spend/1,000,000)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "The total click-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "The total view-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion"]}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "purchase_conversions": {"name": "purchase_conversions", "description": "Total attributed click-through conversions for purchase events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_view_through_conversions": {"name": "purchase_view_through_conversions", "description": "Total attributed view-through conversions for purchase events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_value": {"name": "purchase_value", "description": "Total monetary value associated with purchase conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_items": {"name": "purchase_items", "description": "Total number of items involved in purchase conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_conversions": {"name": "lead_conversions", "description": "Total attributed click-through conversions for lead generation events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_view_through_conversions": {"name": "lead_view_through_conversions", "description": "Total attributed view-through conversions for lead generation events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_value": {"name": "lead_value", "description": "Total monetary value associated with lead generation conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_items": {"name": "lead_items", "description": "Total number of items involved in lead generation conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_conversions": {"name": "custom_conversions", "description": "Total attributed click-through conversions for custom-defined events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_view_through_conversions": {"name": "custom_view_through_conversions", "description": "Total attributed view-through conversions for custom-defined events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_value": {"name": "custom_value", "description": "Total monetary value associated with custom-defined conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_items": {"name": "custom_items", "description": "Total number of items involved in custom-defined conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The currency this account uses (ISO-4217)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.currency"]}, "effective_status": {"name": "effective_status", "description": "The current effective status of the ad, reflecting both configured status and any internal processing states that may affect delivery.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "configured_status": {"name": "configured_status", "description": "The user-defined status of the ad (e.g., ACTIVE, PAUSED), indicating whether it is intended to be running.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_processing": {"name": "is_processing", "description": "A boolean flag indicating whether the ad is still being processed and not yet ready for delivery.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective": {"name": "objective", "description": "The advertising goal or objective selected for the campaign, such as CONVERSIONS, TRAFFIC, or BRAND_AWARENESS.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "funding_instrument_id": {"name": "funding_instrument_id", "description": "The ID of the funding instrument (e.g., credit card or line of credit) used to pay for the ad campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.084412, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__campaign_country_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars([\n 'ad_reporting__reddit_ads_enabled',\n 'reddit_ads__using_campaign_country_report'])\n) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_reddit_ads__campaign_country_report') }}\n),\n\nrollup_report as (\n\n select \n source_relation,\n date_day,\n account_id,\n campaign_id,\n country,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend\n\n {{ fivetran_utils.persist_pass_through_columns(\n pass_through_variable='reddit_ads__campaign_country_passthrough_metrics',\n transform = 'sum') }}\n\n from report\n\n {{ dbt_utils.group_by(5) }}\n),\n\n{% set country_conversions_report_enabled = var('reddit_ads__using_campaign_country_conversions_report', True) %}\n{% if country_conversions_report_enabled %}\nconversions_report as (\n\n select *\n from {{ ref('stg_reddit_ads__campaign_country_conversions_report') }}\n),\n\nrollup_conversions_report as (\n\n select \n source_relation,\n date_day,\n account_id,\n campaign_id,\n country,\n sum(conversions) as conversions,\n sum(view_through_conversions) as view_through_conversions,\n sum(total_items) as total_items,\n sum(total_value) as total_value\n\n {% if var('reddit_ads__conversion_event_types') %}\n {% for event_type in var('reddit_ads__conversion_event_types') %}\n , sum(case when event_name = '{{ event_type|lower }}' then conversions else 0 end) as {{ event_type|lower }}_conversions\n , sum(case when event_name = '{{ event_type|lower }}' then view_through_conversions else 0 end) as {{ event_type|lower }}_view_through_conversions\n , sum(case when event_name = '{{ event_type|lower }}' then total_value else 0 end) as {{ event_type|lower }}_value\n , sum(case when event_name = '{{ event_type|lower }}' then total_items else 0 end) as {{ event_type|lower }}_items\n {% endfor %}\n {% endif %}\n\n {{ fivetran_utils.persist_pass_through_columns(\n pass_through_variable='reddit_ads__campaign_country_conversions_passthrough_metrics',\n transform = 'sum') }}\n\n from conversions_report\n\n {% if var('reddit_ads__conversion_event_types') %}\n where \n {% for event_type in var('reddit_ads__conversion_event_types') %}\n event_name = '{{ event_type|lower }}'\n {{ 'or' if not loop.last }}\n {% endfor %}\n {% endif %}\n\n {{ dbt_utils.group_by(5) }}\n),\n{% endif %}\n\ncampaigns as (\n\n select *\n from {{ ref('stg_reddit_ads__campaign') }}\n),\n\naccounts as (\n\n select *\n from {{ ref('stg_reddit_ads__account') }}\n),\n\njoined as (\n\n select\n rollup_report.source_relation,\n rollup_report.date_day,\n rollup_report.account_id,\n rollup_report.campaign_id,\n rollup_report.country,\n rollup_report.clicks,\n rollup_report.impressions,\n rollup_report.spend\n {{ reddit_ads_persist_pass_through_columns(\n pass_through_variable='reddit_ads__campaign_country_passthrough_metrics',\n identifier = 'rollup_report') }}\n\n {% if country_conversions_report_enabled %}\n ,\n rollup_conversions_report.conversions,\n rollup_conversions_report.view_through_conversions,\n rollup_conversions_report.total_value,\n rollup_conversions_report.total_items\n\n {% if var('reddit_ads__conversion_event_types') %} \n {% for event_type in var('reddit_ads__conversion_event_types') %}\n , {{ event_type|lower }}_conversions\n , {{ event_type|lower }}_view_through_conversions\n , {{ event_type|lower }}_value\n , {{ event_type|lower }}_items\n {% endfor %}\n {% endif %}\n\n {{ reddit_ads_persist_pass_through_columns(\n pass_through_variable='reddit_ads__campaign_country_conversions_passthrough_metrics',\n identifier = 'rollup_conversions_report') }}\n\n from rollup_report\n left join rollup_conversions_report\n on rollup_report.campaign_id = rollup_conversions_report.campaign_id\n and rollup_report.account_id = rollup_conversions_report.account_id\n and rollup_report.source_relation = rollup_conversions_report.source_relation\n and rollup_report.date_day = rollup_conversions_report.date_day\n and rollup_report.country = rollup_conversions_report.country\n\n {% else %}\n from rollup_report\n \n {% endif %}\n),\n\nfinal as (\n select\n joined.*,\n campaigns.campaign_name,\n accounts.currency,\n campaigns.effective_status,\n campaigns.configured_status,\n campaigns.is_processing,\n campaigns.objective,\n campaigns.funding_instrument_id\n from joined\n left join accounts\n on joined.account_id = accounts.account_id\n and joined.source_relation = accounts.source_relation\n left join campaigns\n on joined.campaign_id = campaigns.campaign_id\n and joined.source_relation = campaigns.source_relation\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__campaign_country_report", "package": null, "version": null}, {"name": "stg_reddit_ads__campaign_country_conversions_report", "package": null, "version": null}, {"name": "stg_reddit_ads__campaign", "package": null, "version": null}, {"name": "stg_reddit_ads__account", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by", "macro.reddit_ads.reddit_ads_persist_pass_through_columns"], "nodes": ["model.reddit_ads.stg_reddit_ads__campaign_country_report", "model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report", "model.reddit_ads.stg_reddit_ads__campaign", "model.reddit_ads.stg_reddit_ads__account"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads__campaign_country_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_country_report\"\n),\n\nrollup_report as (\n\n select \n source_relation,\n date_day,\n account_id,\n campaign_id,\n country,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend\n\n \n\n\n\n\n\n from report\n\n group by 1,2,3,4,5\n),\n\n\n\nconversions_report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_country_conversions_report\"\n),\n\nrollup_conversions_report as (\n\n select \n source_relation,\n date_day,\n account_id,\n campaign_id,\n country,\n sum(conversions) as conversions,\n sum(view_through_conversions) as view_through_conversions,\n sum(total_items) as total_items,\n sum(total_value) as total_value\n\n \n \n , sum(case when event_name = 'lead' then conversions else 0 end) as lead_conversions\n , sum(case when event_name = 'lead' then view_through_conversions else 0 end) as lead_view_through_conversions\n , sum(case when event_name = 'lead' then total_value else 0 end) as lead_value\n , sum(case when event_name = 'lead' then total_items else 0 end) as lead_items\n \n , sum(case when event_name = 'purchase' then conversions else 0 end) as purchase_conversions\n , sum(case when event_name = 'purchase' then view_through_conversions else 0 end) as purchase_view_through_conversions\n , sum(case when event_name = 'purchase' then total_value else 0 end) as purchase_value\n , sum(case when event_name = 'purchase' then total_items else 0 end) as purchase_items\n \n , sum(case when event_name = 'custom' then conversions else 0 end) as custom_conversions\n , sum(case when event_name = 'custom' then view_through_conversions else 0 end) as custom_view_through_conversions\n , sum(case when event_name = 'custom' then total_value else 0 end) as custom_value\n , sum(case when event_name = 'custom' then total_items else 0 end) as custom_items\n \n \n\n \n\n\n\n\n\n from conversions_report\n\n \n where \n \n event_name = 'lead'\n or\n \n event_name = 'purchase'\n or\n \n event_name = 'custom'\n \n \n \n\n group by 1,2,3,4,5\n),\n\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign\"\n),\n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account\"\n),\n\njoined as (\n\n select\n rollup_report.source_relation,\n rollup_report.date_day,\n rollup_report.account_id,\n rollup_report.campaign_id,\n rollup_report.country,\n rollup_report.clicks,\n rollup_report.impressions,\n rollup_report.spend\n \n\n\n\n\n\n \n ,\n rollup_conversions_report.conversions,\n rollup_conversions_report.view_through_conversions,\n rollup_conversions_report.total_value,\n rollup_conversions_report.total_items\n\n \n \n , lead_conversions\n , lead_view_through_conversions\n , lead_value\n , lead_items\n \n , purchase_conversions\n , purchase_view_through_conversions\n , purchase_value\n , purchase_items\n \n , custom_conversions\n , custom_view_through_conversions\n , custom_value\n , custom_items\n \n \n\n \n\n\n\n\n\n from rollup_report\n left join rollup_conversions_report\n on rollup_report.campaign_id = rollup_conversions_report.campaign_id\n and rollup_report.account_id = rollup_conversions_report.account_id\n and rollup_report.source_relation = rollup_conversions_report.source_relation\n and rollup_report.date_day = rollup_conversions_report.date_day\n and rollup_report.country = rollup_conversions_report.country\n\n \n),\n\nfinal as (\n select\n joined.*,\n campaigns.campaign_name,\n accounts.currency,\n campaigns.effective_status,\n campaigns.configured_status,\n campaigns.is_processing,\n campaigns.objective,\n campaigns.funding_instrument_id\n from joined\n left join accounts\n on joined.account_id = accounts.account_id\n and joined.source_relation = accounts.source_relation\n left join campaigns\n on joined.campaign_id = campaigns.campaign_id\n and joined.source_relation = campaigns.source_relation\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.reddit_ads__url_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "reddit_ads__url_report", "resource_type": "model", "package_name": "reddit_ads", "path": "reddit_ads__url_report.sql", "original_file_path": "models/reddit_ads__url_report.sql", "unique_id": "model.reddit_ads.reddit_ads__url_report", "fqn": ["reddit_ads", "reddit_ads__url_report"], "alias": "reddit_ads__url_report", "checksum": {"name": "sha256", "checksum": "a3cff883520ced2084feaecd94195863f8aaded7811e572e99432eb998262562"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily number of clicks, impressions, and spend per url and utm parameters, along with post,ad, account, campaign, and ad group information.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date_day"]}, "ad_name": {"name": "ad_name", "description": "Name of ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_name"]}, "ad_id": {"name": "ad_id", "description": "The ID of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_id"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "campaign_name": {"name": "campaign_name", "description": "Name of campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "Name of ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_id"]}, "currency": {"name": "currency", "description": "The currency this account uses (ISO-4217)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.currency"]}, "post_id": {"name": "post_id", "description": "The ID of the post.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.post_id"]}, "post_url": {"name": "post_url", "description": "The URL belonging to the post.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.post_url"]}, "click_url": {"name": "click_url", "description": "The destination url, or the website address, that a visitor goes to when they click on the ad", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_url"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "spend": {"name": "spend", "description": "Spend converted out of microcurrency (so Spend/1,000,000)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the `click_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_host": {"name": "url_host", "description": "The URL host of the ad, extracted from the `click_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_path": {"name": "url_path", "description": "The URL path of the ad, extracted from the `click_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_source": {"name": "utm_source", "description": "The site that sent traffic to your page. Microsoft Advertising sets this to Bing; extracted from the `click_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_medium": {"name": "utm_medium", "description": "Which channel was used. Microsoft Advertising sets this to cp; extracted from the `click_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_campaign": {"name": "utm_campaign", "description": "Which campaign the keyword came from; extracted from the `click_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_content": {"name": "utm_content", "description": "Which ad group the keyword came from; extracted from the `click_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_term": {"name": "utm_term", "description": "Which keyword brought people to your website; extracted from the `click_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "The total click-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "The total view-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion"]}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "purchase_conversions": {"name": "purchase_conversions", "description": "Total attributed click-through conversions for purchase events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_view_through_conversions": {"name": "purchase_view_through_conversions", "description": "Total attributed view-through conversions for purchase events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_value": {"name": "purchase_value", "description": "Total monetary value associated with purchase conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_items": {"name": "purchase_items", "description": "Total number of items involved in purchase conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_conversions": {"name": "lead_conversions", "description": "Total attributed click-through conversions for lead generation events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_view_through_conversions": {"name": "lead_view_through_conversions", "description": "Total attributed view-through conversions for lead generation events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_value": {"name": "lead_value", "description": "Total monetary value associated with lead generation conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_items": {"name": "lead_items", "description": "Total number of items involved in lead generation conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_conversions": {"name": "custom_conversions", "description": "Total attributed click-through conversions for custom-defined events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_view_through_conversions": {"name": "custom_view_through_conversions", "description": "Total attributed view-through conversions for custom-defined events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_value": {"name": "custom_value", "description": "Total monetary value associated with custom-defined conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_items": {"name": "custom_items", "description": "Total number of items involved in custom-defined conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.0796678, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__url_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_reddit_ads__ad_report') }}\n),\n\nads as (\n\n select *\n from {{ ref('stg_reddit_ads__ad') }}\n),\n\nad_groups as (\n\n select *\n from {{ ref('stg_reddit_ads__ad_group') }}\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_reddit_ads__campaign') }}\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_reddit_ads__account') }}\n),\n\n{# This includes data at the event type level that we'll need to roll up and pivot out #}\nconversions_report as (\n\n select *\n from {{ ref('stg_reddit_ads__ad_conversions_report') }}\n),\n\nrollup_conversions_report as (\n\n select \n source_relation,\n date_day,\n ad_id,\n sum(conversions) as conversions,\n sum(view_through_conversions) as view_through_conversions,\n sum(total_value) as total_value,\n sum(total_items) as total_items\n\n {% if var('reddit_ads__conversion_event_types') %}\n {% for event_type in var('reddit_ads__conversion_event_types') %}\n , sum(case when event_name = '{{ event_type|lower }}' then conversions else 0 end) as {{ event_type|lower }}_conversions\n , sum(case when event_name = '{{ event_type|lower }}' then view_through_conversions else 0 end) as {{ event_type|lower }}_view_through_conversions\n , sum(case when event_name = '{{ event_type|lower }}' then total_value else 0 end) as {{ event_type|lower }}_value\n , sum(case when event_name = '{{ event_type|lower }}' then total_items else 0 end) as {{ event_type|lower }}_items\n {% endfor %}\n {% endif %}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='reddit_ads__ad_conversions_passthrough_metrics', transform = 'sum') }}\n\n from conversions_report\n\n {% if var('reddit_ads__conversion_event_types') %}\n where \n {% for event_type in var('reddit_ads__conversion_event_types') %}\n event_name = '{{ event_type|lower }}'\n {% if not loop.last %} or {% endif %} \n {% endfor %}\n {% endif %}\n\n group by 1,2,3\n),\n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n ads.ad_name,\n report.ad_id,\n report.account_id,\n campaigns.campaign_name,\n ads.campaign_id,\n ad_groups.ad_group_name,\n ads.ad_group_id,\n accounts.currency,\n ads.post_id,\n ads.post_url,\n ads.click_url,\n {{ dbt.split_part('ads.click_url', \"'?'\", 1) }} as base_url,\n {{ dbt_utils.get_url_host('ads.click_url') }} as url_host,\n '/' || {{ dbt_utils.get_url_path('ads.click_url') }} as url_path,\n {{ reddit_ads.reddit_ads_extract_url_parameter('ads.click_url', 'utm_source') }} as utm_source,\n {{ reddit_ads.reddit_ads_extract_url_parameter('ads.click_url', 'utm_medium') }} as utm_medium,\n {{ reddit_ads.reddit_ads_extract_url_parameter('ads.click_url', 'utm_term') }} as utm_term,\n {{ reddit_ads.reddit_ads_extract_url_parameter('ads.click_url', 'utm_content') }} as utm_content,\n coalesce( {{ reddit_ads.reddit_ads_extract_url_parameter('ads.click_url', 'utm_campaign') }}, campaigns.campaign_name) as utm_campaign,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(rollup_conversions_report.conversions) as conversions,\n sum(rollup_conversions_report.view_through_conversions) as view_through_conversions,\n sum(rollup_conversions_report.total_value) as total_value,\n sum(rollup_conversions_report.total_items) as total_items\n\n {% if var('reddit_ads__conversion_event_types') %} \n {% for event_type in var('reddit_ads__conversion_event_types') %}\n , sum({{ event_type|lower }}_conversions) as {{ event_type|lower }}_conversions\n , sum({{ event_type|lower }}_view_through_conversions) as {{ event_type|lower }}_view_through_conversions\n , sum({{ event_type|lower }}_value) as {{ event_type|lower }}_value\n , sum({{ event_type|lower }}_items) as {{ event_type|lower }}_items\n {% endfor %}\n {% endif %}\n\n {{ reddit_ads_persist_pass_through_columns(pass_through_variable='reddit_ads__ad_passthrough_metrics', identifier = 'report', transform = 'sum', alias_fields=['conversions', 'view_through_conversions', 'total_value', 'total_items']) }}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='reddit_ads__ad_conversions_passthrough_metrics', transform = 'sum') }}\n\n from report\n left join ads\n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join ad_groups\n on ads.ad_group_id = ad_groups.ad_group_id\n and ads.source_relation = ad_groups.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n left join rollup_conversions_report\n on report.ad_id = rollup_conversions_report.ad_id\n and report.source_relation = rollup_conversions_report.source_relation\n and report.date_day = rollup_conversions_report.date_day\n \n {{ dbt_utils.group_by(20) }}\n), \n\nfiltered as (\n\n select *\n from joined\n\n {% if var('ad_reporting__url_report__using_null_filter', True) %}\n where click_url is not null -- filter for only ads with valid URLs\n {% endif %}\n)\n\nselect *\nfrom filtered", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__ad_report", "package": null, "version": null}, {"name": "stg_reddit_ads__ad", "package": null, "version": null}, {"name": "stg_reddit_ads__ad_group", "package": null, "version": null}, {"name": "stg_reddit_ads__campaign", "package": null, "version": null}, {"name": "stg_reddit_ads__account", "package": null, "version": null}, {"name": "stg_reddit_ads__ad_conversions_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.dbt.split_part", "macro.dbt_utils.get_url_host", "macro.dbt_utils.get_url_path", "macro.reddit_ads.reddit_ads_extract_url_parameter", "macro.reddit_ads.reddit_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.reddit_ads.stg_reddit_ads__ad_report", "model.reddit_ads.stg_reddit_ads__ad", "model.reddit_ads.stg_reddit_ads__ad_group", "model.reddit_ads.stg_reddit_ads__campaign", "model.reddit_ads.stg_reddit_ads__account", "model.reddit_ads.stg_reddit_ads__ad_conversions_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads__url_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_report\"\n),\n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad\"\n),\n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group\"\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign\"\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account\"\n),\n\n\nconversions_report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_conversions_report\"\n),\n\nrollup_conversions_report as (\n\n select \n source_relation,\n date_day,\n ad_id,\n sum(conversions) as conversions,\n sum(view_through_conversions) as view_through_conversions,\n sum(total_value) as total_value,\n sum(total_items) as total_items\n\n \n \n , sum(case when event_name = 'lead' then conversions else 0 end) as lead_conversions\n , sum(case when event_name = 'lead' then view_through_conversions else 0 end) as lead_view_through_conversions\n , sum(case when event_name = 'lead' then total_value else 0 end) as lead_value\n , sum(case when event_name = 'lead' then total_items else 0 end) as lead_items\n \n , sum(case when event_name = 'purchase' then conversions else 0 end) as purchase_conversions\n , sum(case when event_name = 'purchase' then view_through_conversions else 0 end) as purchase_view_through_conversions\n , sum(case when event_name = 'purchase' then total_value else 0 end) as purchase_value\n , sum(case when event_name = 'purchase' then total_items else 0 end) as purchase_items\n \n , sum(case when event_name = 'custom' then conversions else 0 end) as custom_conversions\n , sum(case when event_name = 'custom' then view_through_conversions else 0 end) as custom_view_through_conversions\n , sum(case when event_name = 'custom' then total_value else 0 end) as custom_value\n , sum(case when event_name = 'custom' then total_items else 0 end) as custom_items\n \n \n\n \n\n\n\n\n\n from conversions_report\n\n \n where \n \n event_name = 'lead'\n or \n \n event_name = 'purchase'\n or \n \n event_name = 'custom'\n \n \n \n\n group by 1,2,3\n),\n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n ads.ad_name,\n report.ad_id,\n report.account_id,\n campaigns.campaign_name,\n ads.campaign_id,\n ad_groups.ad_group_name,\n ads.ad_group_id,\n accounts.currency,\n ads.post_id,\n ads.post_url,\n ads.click_url,\n \n\n \n \n\n split_part(\n ads.click_url,\n '?',\n 1\n )\n\n\n \n\n as base_url,\n \n \n cast(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n \n\n replace(\n \n\n replace(\n \n\n replace(\n ads.click_url,\n 'android-app://',\n ''\n )\n\n\n,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n '/',\n 1\n )\n\n\n \n\n,\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_host,\n '/' || \n \n cast(\n\n \n \n\n split_part(\n \n\n right(\n \n\n replace(\n \n\n replace(\n ads.click_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n \n\n length(\n \n\n replace(\n \n\n replace(\n ads.click_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n )-coalesce(\n nullif(\n\n position(\n '/' in \n\n replace(\n \n\n replace(\n ads.click_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ), 0),\n \n\n position(\n '?' in \n\n replace(\n \n\n replace(\n ads.click_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ) - 1\n )\n ),\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_path,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n ads.click_url,\n 'utm_source=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_source,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n ads.click_url,\n 'utm_medium=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_medium,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n ads.click_url,\n 'utm_term=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_term,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n ads.click_url,\n 'utm_content=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_content,\n coalesce( nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n ads.click_url,\n 'utm_campaign=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,''), campaigns.campaign_name) as utm_campaign,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(rollup_conversions_report.conversions) as conversions,\n sum(rollup_conversions_report.view_through_conversions) as view_through_conversions,\n sum(rollup_conversions_report.total_value) as total_value,\n sum(rollup_conversions_report.total_items) as total_items\n\n \n \n , sum(lead_conversions) as lead_conversions\n , sum(lead_view_through_conversions) as lead_view_through_conversions\n , sum(lead_value) as lead_value\n , sum(lead_items) as lead_items\n \n , sum(purchase_conversions) as purchase_conversions\n , sum(purchase_view_through_conversions) as purchase_view_through_conversions\n , sum(purchase_value) as purchase_value\n , sum(purchase_items) as purchase_items\n \n , sum(custom_conversions) as custom_conversions\n , sum(custom_view_through_conversions) as custom_view_through_conversions\n , sum(custom_value) as custom_value\n , sum(custom_items) as custom_items\n \n \n\n \n\n\n\n\n\n \n\n\n\n\n\n from report\n left join ads\n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join ad_groups\n on ads.ad_group_id = ad_groups.ad_group_id\n and ads.source_relation = ad_groups.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n left join rollup_conversions_report\n on report.ad_id = rollup_conversions_report.ad_id\n and report.source_relation = rollup_conversions_report.source_relation\n and report.date_day = rollup_conversions_report.date_day\n \n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20\n), \n\nfiltered as (\n\n select *\n from joined\n\n \n where click_url is not null -- filter for only ads with valid URLs\n \n)\n\nselect *\nfrom filtered", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.reddit_ads__account_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "reddit_ads__account_report", "resource_type": "model", "package_name": "reddit_ads", "path": "reddit_ads__account_report.sql", "original_file_path": "models/reddit_ads__account_report.sql", "unique_id": "model.reddit_ads.reddit_ads__account_report", "fqn": ["reddit_ads", "reddit_ads__account_report"], "alias": "reddit_ads__account_report", "checksum": {"name": "sha256", "checksum": "d243be37628e15b7c880ad98039231802dbc67e713527dc76325bb8bd71e58a5"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily number of clicks, impressions, and spend of ads by account, account timezone, attribution type, and currency.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "currency": {"name": "currency", "description": "The currency this account uses (ISO-4217)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.currency"]}, "attribution_type": {"name": "attribution_type", "description": "Attribution type: \"CLICK_THROUGH_CONVERSION\", \"VIEW_THROUGH_CONVERSION\", or \"ALL_CONVERSION\".\nCLICK_THROUGH_CONVERSION: A user clicked on your ad and then completed the conversion action on your site. \nVIEW_THROUGH_CONVERSION: A user saw your ad and did not click it, but did complete the conversion action on your site.\nALL_CONVERSION: Combination of both.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.attribution_type"]}, "time_zone_id": {"name": "time_zone_id", "description": "The time zone id preference for this account", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.time_zone_id"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "spend": {"name": "spend", "description": "Spend converted out of microcurrency (so Spend/1,000,000)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "The total click-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "The total view-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion"]}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "purchase_conversions": {"name": "purchase_conversions", "description": "Total attributed click-through conversions for purchase events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_view_through_conversions": {"name": "purchase_view_through_conversions", "description": "Total attributed view-through conversions for purchase events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_value": {"name": "purchase_value", "description": "Total monetary value associated with purchase conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_items": {"name": "purchase_items", "description": "Total number of items involved in purchase conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_conversions": {"name": "lead_conversions", "description": "Total attributed click-through conversions for lead generation events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_view_through_conversions": {"name": "lead_view_through_conversions", "description": "Total attributed view-through conversions for lead generation events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_value": {"name": "lead_value", "description": "Total monetary value associated with lead generation conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_items": {"name": "lead_items", "description": "Total number of items involved in lead generation conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_conversions": {"name": "custom_conversions", "description": "Total attributed click-through conversions for custom-defined events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_view_through_conversions": {"name": "custom_view_through_conversions", "description": "Total attributed view-through conversions for custom-defined events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_value": {"name": "custom_value", "description": "Total monetary value associated with custom-defined conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_items": {"name": "custom_items", "description": "Total number of items involved in custom-defined conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.070805, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__account_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_reddit_ads__account_report') }}\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_reddit_ads__account') }}\n),\n\n{# This includes data at the event type level that we'll need to roll up and pivot out #}\nconversions_report as (\n\n select *\n from {{ ref('stg_reddit_ads__account_conversions_report') }}\n),\n\nrollup_conversions_report as (\n\n select \n source_relation,\n date_day,\n account_id,\n sum(conversions) as conversions,\n sum(view_through_conversions) as view_through_conversions,\n sum(total_value) as total_value,\n sum(total_items) as total_items\n\n {% if var('reddit_ads__conversion_event_types') %}\n {% for event_type in var('reddit_ads__conversion_event_types') %}\n , sum(case when event_name = '{{ event_type|lower }}' then conversions else 0 end) as {{ event_type|lower }}_conversions\n , sum(case when event_name = '{{ event_type|lower }}' then view_through_conversions else 0 end) as {{ event_type|lower }}_view_through_conversions\n , sum(case when event_name = '{{ event_type|lower }}' then total_value else 0 end) as {{ event_type|lower }}_value\n , sum(case when event_name = '{{ event_type|lower }}' then total_items else 0 end) as {{ event_type|lower }}_items\n {% endfor %}\n {% endif %}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='reddit_ads__account_conversions_passthrough_metrics', transform = 'sum') }}\n\n from conversions_report\n\n {% if var('reddit_ads__conversion_event_types') %}\n where \n {% for event_type in var('reddit_ads__conversion_event_types') %}\n event_name = '{{ event_type|lower }}'\n {% if not loop.last %} or {% endif %} \n {% endfor %}\n {% endif %}\n\n group by 1,2,3\n),\n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n report.account_id,\n accounts.currency,\n accounts.attribution_type,\n accounts.time_zone_id,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(rollup_conversions_report.conversions) as conversions,\n sum(rollup_conversions_report.view_through_conversions) as view_through_conversions,\n sum(rollup_conversions_report.total_value) as total_value,\n sum(rollup_conversions_report.total_items) as total_items\n\n {% if var('reddit_ads__conversion_event_types') %} \n {% for event_type in var('reddit_ads__conversion_event_types') %}\n , sum({{ event_type|lower }}_conversions) as {{ event_type|lower }}_conversions\n , sum({{ event_type|lower }}_view_through_conversions) as {{ event_type|lower }}_view_through_conversions\n , sum({{ event_type|lower }}_value) as {{ event_type|lower }}_value\n , sum({{ event_type|lower }}_items) as {{ event_type|lower }}_items\n {% endfor %}\n {% endif %}\n\n {{ reddit_ads_persist_pass_through_columns(pass_through_variable='reddit_ads__account_passthrough_metrics', identifier = 'report', transform = 'sum', alias_fields=['conversions', 'view_through_conversions', 'total_value', 'total_items']) }}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='reddit_ads__account_conversions_passthrough_metrics', transform = 'sum') }}\n\n from report\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join rollup_conversions_report\n on report.account_id = rollup_conversions_report.account_id\n and report.source_relation = rollup_conversions_report.source_relation\n and report.date_day = rollup_conversions_report.date_day\n {{ dbt_utils.group_by(6) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__account_report", "package": null, "version": null}, {"name": "stg_reddit_ads__account", "package": null, "version": null}, {"name": "stg_reddit_ads__account_conversions_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.reddit_ads.reddit_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.reddit_ads.stg_reddit_ads__account_report", "model.reddit_ads.stg_reddit_ads__account", "model.reddit_ads.stg_reddit_ads__account_conversions_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads__account_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account_report\"\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account\"\n),\n\n\nconversions_report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account_conversions_report\"\n),\n\nrollup_conversions_report as (\n\n select \n source_relation,\n date_day,\n account_id,\n sum(conversions) as conversions,\n sum(view_through_conversions) as view_through_conversions,\n sum(total_value) as total_value,\n sum(total_items) as total_items\n\n \n \n , sum(case when event_name = 'lead' then conversions else 0 end) as lead_conversions\n , sum(case when event_name = 'lead' then view_through_conversions else 0 end) as lead_view_through_conversions\n , sum(case when event_name = 'lead' then total_value else 0 end) as lead_value\n , sum(case when event_name = 'lead' then total_items else 0 end) as lead_items\n \n , sum(case when event_name = 'purchase' then conversions else 0 end) as purchase_conversions\n , sum(case when event_name = 'purchase' then view_through_conversions else 0 end) as purchase_view_through_conversions\n , sum(case when event_name = 'purchase' then total_value else 0 end) as purchase_value\n , sum(case when event_name = 'purchase' then total_items else 0 end) as purchase_items\n \n , sum(case when event_name = 'custom' then conversions else 0 end) as custom_conversions\n , sum(case when event_name = 'custom' then view_through_conversions else 0 end) as custom_view_through_conversions\n , sum(case when event_name = 'custom' then total_value else 0 end) as custom_value\n , sum(case when event_name = 'custom' then total_items else 0 end) as custom_items\n \n \n\n \n\n\n\n\n\n from conversions_report\n\n \n where \n \n event_name = 'lead'\n or \n \n event_name = 'purchase'\n or \n \n event_name = 'custom'\n \n \n \n\n group by 1,2,3\n),\n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n report.account_id,\n accounts.currency,\n accounts.attribution_type,\n accounts.time_zone_id,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(rollup_conversions_report.conversions) as conversions,\n sum(rollup_conversions_report.view_through_conversions) as view_through_conversions,\n sum(rollup_conversions_report.total_value) as total_value,\n sum(rollup_conversions_report.total_items) as total_items\n\n \n \n , sum(lead_conversions) as lead_conversions\n , sum(lead_view_through_conversions) as lead_view_through_conversions\n , sum(lead_value) as lead_value\n , sum(lead_items) as lead_items\n \n , sum(purchase_conversions) as purchase_conversions\n , sum(purchase_view_through_conversions) as purchase_view_through_conversions\n , sum(purchase_value) as purchase_value\n , sum(purchase_items) as purchase_items\n \n , sum(custom_conversions) as custom_conversions\n , sum(custom_view_through_conversions) as custom_view_through_conversions\n , sum(custom_value) as custom_value\n , sum(custom_items) as custom_items\n \n \n\n \n\n\n\n\n\n \n\n\n\n\n\n from report\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join rollup_conversions_report\n on report.account_id = rollup_conversions_report.account_id\n and report.source_relation = rollup_conversions_report.source_relation\n and report.date_day = rollup_conversions_report.date_day\n group by 1,2,3,4,5,6\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.reddit_ads__ad_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "reddit_ads__ad_report", "resource_type": "model", "package_name": "reddit_ads", "path": "reddit_ads__ad_report.sql", "original_file_path": "models/reddit_ads__ad_report.sql", "unique_id": "model.reddit_ads.reddit_ads__ad_report", "fqn": ["reddit_ads", "reddit_ads__ad_report"], "alias": "reddit_ads__ad_report", "checksum": {"name": "sha256", "checksum": "d317ae0b0d3b2aacb87e410f326a595d3f232de86842691a6ede9cc6daf2e87f"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily number of clicks, impressions, and spend per ad, along with account, campaign, ad group, and post information.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date_day"]}, "ad_id": {"name": "ad_id", "description": "The ID of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_id"]}, "ad_name": {"name": "ad_name", "description": "Name of ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_name"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "campaign_name": {"name": "campaign_name", "description": "Name of campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "Name of ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_id"]}, "currency": {"name": "currency", "description": "The currency this account uses (ISO-4217)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.currency"]}, "post_id": {"name": "post_id", "description": "The ID of the post.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.post_id"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "spend": {"name": "spend", "description": "Spend converted out of microcurrency (so Spend/1,000,000)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "The total click-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "The total view-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion"]}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "purchase_conversions": {"name": "purchase_conversions", "description": "Total attributed click-through conversions for purchase events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_view_through_conversions": {"name": "purchase_view_through_conversions", "description": "Total attributed view-through conversions for purchase events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_value": {"name": "purchase_value", "description": "Total monetary value associated with purchase conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_items": {"name": "purchase_items", "description": "Total number of items involved in purchase conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_conversions": {"name": "lead_conversions", "description": "Total attributed click-through conversions for lead generation events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_view_through_conversions": {"name": "lead_view_through_conversions", "description": "Total attributed view-through conversions for lead generation events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_value": {"name": "lead_value", "description": "Total monetary value associated with lead generation conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_items": {"name": "lead_items", "description": "Total number of items involved in lead generation conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_conversions": {"name": "custom_conversions", "description": "Total attributed click-through conversions for custom-defined events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_view_through_conversions": {"name": "custom_view_through_conversions", "description": "Total attributed view-through conversions for custom-defined events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_value": {"name": "custom_value", "description": "Total monetary value associated with custom-defined conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_items": {"name": "custom_items", "description": "Total number of items involved in custom-defined conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.0748563, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__ad_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_reddit_ads__ad_report') }}\n),\n\nads as (\n\n select *\n from {{ ref('stg_reddit_ads__ad') }}\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_reddit_ads__ad_group') }}\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_reddit_ads__campaign') }}\n),\n\naccounts as (\n\n select *\n from {{ ref('stg_reddit_ads__account') }}\n),\n\n{# This includes data at the event type level that we'll need to roll up and pivot out #}\nconversions_report as (\n\n select *\n from {{ ref('stg_reddit_ads__ad_conversions_report') }}\n),\n\nrollup_conversions_report as (\n\n select \n source_relation,\n date_day,\n ad_id,\n sum(conversions) as conversions,\n sum(view_through_conversions) as view_through_conversions,\n sum(total_value) as total_value,\n sum(total_items) as total_items\n\n {% if var('reddit_ads__conversion_event_types') %}\n {% for event_type in var('reddit_ads__conversion_event_types') %}\n , sum(case when event_name = '{{ event_type|lower }}' then conversions else 0 end) as {{ event_type|lower }}_conversions\n , sum(case when event_name = '{{ event_type|lower }}' then view_through_conversions else 0 end) as {{ event_type|lower }}_view_through_conversions\n , sum(case when event_name = '{{ event_type|lower }}' then total_value else 0 end) as {{ event_type|lower }}_value\n , sum(case when event_name = '{{ event_type|lower }}' then total_items else 0 end) as {{ event_type|lower }}_items\n {% endfor %}\n {% endif %}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='reddit_ads__ad_conversions_passthrough_metrics', transform = 'sum') }}\n\n from conversions_report\n\n {% if var('reddit_ads__conversion_event_types') %}\n where \n {% for event_type in var('reddit_ads__conversion_event_types') %}\n event_name = '{{ event_type|lower }}'\n {% if not loop.last %} or {% endif %} \n {% endfor %}\n {% endif %}\n\n group by 1,2,3\n),\n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n report.ad_id,\n ads.ad_name,\n report.account_id,\n campaigns.campaign_name,\n ads.campaign_id,\n ad_groups.ad_group_name,\n ads.ad_group_id,\n accounts.currency,\n ads.post_id,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(rollup_conversions_report.conversions) as conversions,\n sum(rollup_conversions_report.view_through_conversions) as view_through_conversions,\n sum(rollup_conversions_report.total_value) as total_value,\n sum(rollup_conversions_report.total_items) as total_items\n\n {% if var('reddit_ads__conversion_event_types') %} \n {% for event_type in var('reddit_ads__conversion_event_types') %}\n , sum({{ event_type|lower }}_conversions) as {{ event_type|lower }}_conversions\n , sum({{ event_type|lower }}_view_through_conversions) as {{ event_type|lower }}_view_through_conversions\n , sum({{ event_type|lower }}_value) as {{ event_type|lower }}_value\n , sum({{ event_type|lower }}_items) as {{ event_type|lower }}_items\n {% endfor %}\n {% endif %}\n\n {{ reddit_ads_persist_pass_through_columns(pass_through_variable='reddit_ads__ad_passthrough_metrics', identifier = 'report', transform = 'sum', alias_fields=['conversions', 'view_through_conversions', 'total_value', 'total_items']) }}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='reddit_ads__ad_conversions_passthrough_metrics', transform = 'sum') }}\n\n from report\n left join ads\n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join ad_groups\n on ads.ad_group_id = ad_groups.ad_group_id\n and ads.source_relation = ad_groups.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n left join rollup_conversions_report\n on report.ad_id = rollup_conversions_report.ad_id\n and report.source_relation = rollup_conversions_report.source_relation\n and report.date_day = rollup_conversions_report.date_day\n {{ dbt_utils.group_by(11) }}\n\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__ad_report", "package": null, "version": null}, {"name": "stg_reddit_ads__ad", "package": null, "version": null}, {"name": "stg_reddit_ads__ad_group", "package": null, "version": null}, {"name": "stg_reddit_ads__campaign", "package": null, "version": null}, {"name": "stg_reddit_ads__account", "package": null, "version": null}, {"name": "stg_reddit_ads__ad_conversions_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.reddit_ads.reddit_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.reddit_ads.stg_reddit_ads__ad_report", "model.reddit_ads.stg_reddit_ads__ad", "model.reddit_ads.stg_reddit_ads__ad_group", "model.reddit_ads.stg_reddit_ads__campaign", "model.reddit_ads.stg_reddit_ads__account", "model.reddit_ads.stg_reddit_ads__ad_conversions_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads__ad_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_report\"\n),\n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad\"\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group\"\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign\"\n),\n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account\"\n),\n\n\nconversions_report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_conversions_report\"\n),\n\nrollup_conversions_report as (\n\n select \n source_relation,\n date_day,\n ad_id,\n sum(conversions) as conversions,\n sum(view_through_conversions) as view_through_conversions,\n sum(total_value) as total_value,\n sum(total_items) as total_items\n\n \n \n , sum(case when event_name = 'lead' then conversions else 0 end) as lead_conversions\n , sum(case when event_name = 'lead' then view_through_conversions else 0 end) as lead_view_through_conversions\n , sum(case when event_name = 'lead' then total_value else 0 end) as lead_value\n , sum(case when event_name = 'lead' then total_items else 0 end) as lead_items\n \n , sum(case when event_name = 'purchase' then conversions else 0 end) as purchase_conversions\n , sum(case when event_name = 'purchase' then view_through_conversions else 0 end) as purchase_view_through_conversions\n , sum(case when event_name = 'purchase' then total_value else 0 end) as purchase_value\n , sum(case when event_name = 'purchase' then total_items else 0 end) as purchase_items\n \n , sum(case when event_name = 'custom' then conversions else 0 end) as custom_conversions\n , sum(case when event_name = 'custom' then view_through_conversions else 0 end) as custom_view_through_conversions\n , sum(case when event_name = 'custom' then total_value else 0 end) as custom_value\n , sum(case when event_name = 'custom' then total_items else 0 end) as custom_items\n \n \n\n \n\n\n\n\n\n from conversions_report\n\n \n where \n \n event_name = 'lead'\n or \n \n event_name = 'purchase'\n or \n \n event_name = 'custom'\n \n \n \n\n group by 1,2,3\n),\n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n report.ad_id,\n ads.ad_name,\n report.account_id,\n campaigns.campaign_name,\n ads.campaign_id,\n ad_groups.ad_group_name,\n ads.ad_group_id,\n accounts.currency,\n ads.post_id,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(rollup_conversions_report.conversions) as conversions,\n sum(rollup_conversions_report.view_through_conversions) as view_through_conversions,\n sum(rollup_conversions_report.total_value) as total_value,\n sum(rollup_conversions_report.total_items) as total_items\n\n \n \n , sum(lead_conversions) as lead_conversions\n , sum(lead_view_through_conversions) as lead_view_through_conversions\n , sum(lead_value) as lead_value\n , sum(lead_items) as lead_items\n \n , sum(purchase_conversions) as purchase_conversions\n , sum(purchase_view_through_conversions) as purchase_view_through_conversions\n , sum(purchase_value) as purchase_value\n , sum(purchase_items) as purchase_items\n \n , sum(custom_conversions) as custom_conversions\n , sum(custom_view_through_conversions) as custom_view_through_conversions\n , sum(custom_value) as custom_value\n , sum(custom_items) as custom_items\n \n \n\n \n\n\n\n\n\n \n\n\n\n\n\n from report\n left join ads\n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join ad_groups\n on ads.ad_group_id = ad_groups.ad_group_id\n and ads.source_relation = ad_groups.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n left join rollup_conversions_report\n on report.ad_id = rollup_conversions_report.ad_id\n and report.source_relation = rollup_conversions_report.source_relation\n and report.date_day = rollup_conversions_report.date_day\n group by 1,2,3,4,5,6,7,8,9,10,11\n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.reddit_ads__ad_group_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "reddit_ads__ad_group_report", "resource_type": "model", "package_name": "reddit_ads", "path": "reddit_ads__ad_group_report.sql", "original_file_path": "models/reddit_ads__ad_group_report.sql", "unique_id": "model.reddit_ads.reddit_ads__ad_group_report", "fqn": ["reddit_ads", "reddit_ads__ad_group_report"], "alias": "reddit_ads__ad_group_report", "checksum": {"name": "sha256", "checksum": "4ad3ac31ab9acbc33583494548fb6205684594260057857aea768c6b2ea041e0"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily number of clicks, impressions, and spend per ad group, along with campaign and account information.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "Name of ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_id"]}, "campaign_name": {"name": "campaign_name", "description": "Name of campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "currency": {"name": "currency", "description": "The currency this account uses (ISO-4217)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.currency"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "spend": {"name": "spend", "description": "Spend converted out of microcurrency (so Spend/1,000,000)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "The total click-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "The total view-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion"]}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "purchase_conversions": {"name": "purchase_conversions", "description": "Total attributed click-through conversions for purchase events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_view_through_conversions": {"name": "purchase_view_through_conversions", "description": "Total attributed view-through conversions for purchase events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_value": {"name": "purchase_value", "description": "Total monetary value associated with purchase conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_items": {"name": "purchase_items", "description": "Total number of items involved in purchase conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_conversions": {"name": "lead_conversions", "description": "Total attributed click-through conversions for lead generation events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_view_through_conversions": {"name": "lead_view_through_conversions", "description": "Total attributed view-through conversions for lead generation events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_value": {"name": "lead_value", "description": "Total monetary value associated with lead generation conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_items": {"name": "lead_items", "description": "Total number of items involved in lead generation conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_conversions": {"name": "custom_conversions", "description": "Total attributed click-through conversions for custom-defined events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_view_through_conversions": {"name": "custom_view_through_conversions", "description": "Total attributed view-through conversions for custom-defined events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_value": {"name": "custom_value", "description": "Total monetary value associated with custom-defined conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_items": {"name": "custom_items", "description": "Total number of items involved in custom-defined conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.0725963, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__ad_group_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_reddit_ads__ad_group_report') }}\n),\n\nad_groups as (\n\n select *\n from {{ ref('stg_reddit_ads__ad_group') }}\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_reddit_ads__campaign') }}\n),\n\naccounts as (\n\n select *\n from {{ ref('stg_reddit_ads__account') }}\n),\n\n{# This includes data at the event type level that we'll need to roll up and pivot out #}\nconversions_report as (\n\n select *\n from {{ ref('stg_reddit_ads__ad_group_conversions_report') }}\n),\n\nrollup_conversions_report as (\n\n select \n source_relation,\n date_day,\n ad_group_id,\n sum(conversions) as conversions,\n sum(view_through_conversions) as view_through_conversions,\n sum(total_value) as total_value,\n sum(total_items) as total_items\n\n {% if var('reddit_ads__conversion_event_types') %}\n {% for event_type in var('reddit_ads__conversion_event_types') %}\n , sum(case when event_name = '{{ event_type|lower }}' then conversions else 0 end) as {{ event_type|lower }}_conversions\n , sum(case when event_name = '{{ event_type|lower }}' then view_through_conversions else 0 end) as {{ event_type|lower }}_view_through_conversions\n , sum(case when event_name = '{{ event_type|lower }}' then total_value else 0 end) as {{ event_type|lower }}_value\n , sum(case when event_name = '{{ event_type|lower }}' then total_items else 0 end) as {{ event_type|lower }}_items\n {% endfor %}\n {% endif %}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='reddit_ads__ad_group_conversions_passthrough_metrics', transform = 'sum') }}\n\n from conversions_report\n\n {% if var('reddit_ads__conversion_event_types') %}\n where \n {% for event_type in var('reddit_ads__conversion_event_types') %}\n event_name = '{{ event_type|lower }}'\n {% if not loop.last %} or {% endif %} \n {% endfor %}\n {% endif %}\n\n group by 1,2,3\n),\n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n report.account_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n campaigns.campaign_name,\n ad_groups.campaign_id,\n accounts.currency,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(rollup_conversions_report.conversions) as conversions,\n sum(rollup_conversions_report.view_through_conversions) as view_through_conversions,\n sum(rollup_conversions_report.total_value) as total_value,\n sum(rollup_conversions_report.total_items) as total_items\n\n {% if var('reddit_ads__conversion_event_types') %} \n {% for event_type in var('reddit_ads__conversion_event_types') %}\n , sum({{ event_type|lower }}_conversions) as {{ event_type|lower }}_conversions\n , sum({{ event_type|lower }}_view_through_conversions) as {{ event_type|lower }}_view_through_conversions\n , sum({{ event_type|lower }}_value) as {{ event_type|lower }}_value\n , sum({{ event_type|lower }}_items) as {{ event_type|lower }}_items\n {% endfor %}\n {% endif %}\n\n {{ reddit_ads_persist_pass_through_columns(pass_through_variable='reddit_ads__ad_group_passthrough_metrics', identifier = 'report', transform = 'sum', alias_fields=['conversions', 'view_through_conversions', 'total_value', 'total_items']) }}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='reddit_ads__ad_group_conversions_passthrough_metrics', transform = 'sum') }}\n\n from report\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join campaigns\n on ad_groups.campaign_id = campaigns.campaign_id\n and ad_groups.source_relation = campaigns.source_relation\n left join rollup_conversions_report\n on report.ad_group_id = rollup_conversions_report.ad_group_id\n and report.source_relation = rollup_conversions_report.source_relation\n and report.date_day = rollup_conversions_report.date_day\n {{ dbt_utils.group_by(8) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__ad_group_report", "package": null, "version": null}, {"name": "stg_reddit_ads__ad_group", "package": null, "version": null}, {"name": "stg_reddit_ads__campaign", "package": null, "version": null}, {"name": "stg_reddit_ads__account", "package": null, "version": null}, {"name": "stg_reddit_ads__ad_group_conversions_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.reddit_ads.reddit_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.reddit_ads.stg_reddit_ads__ad_group_report", "model.reddit_ads.stg_reddit_ads__ad_group", "model.reddit_ads.stg_reddit_ads__campaign", "model.reddit_ads.stg_reddit_ads__account", "model.reddit_ads.stg_reddit_ads__ad_group_conversions_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads__ad_group_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group_report\"\n),\n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group\"\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign\"\n),\n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account\"\n),\n\n\nconversions_report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group_conversions_report\"\n),\n\nrollup_conversions_report as (\n\n select \n source_relation,\n date_day,\n ad_group_id,\n sum(conversions) as conversions,\n sum(view_through_conversions) as view_through_conversions,\n sum(total_value) as total_value,\n sum(total_items) as total_items\n\n \n \n , sum(case when event_name = 'lead' then conversions else 0 end) as lead_conversions\n , sum(case when event_name = 'lead' then view_through_conversions else 0 end) as lead_view_through_conversions\n , sum(case when event_name = 'lead' then total_value else 0 end) as lead_value\n , sum(case when event_name = 'lead' then total_items else 0 end) as lead_items\n \n , sum(case when event_name = 'purchase' then conversions else 0 end) as purchase_conversions\n , sum(case when event_name = 'purchase' then view_through_conversions else 0 end) as purchase_view_through_conversions\n , sum(case when event_name = 'purchase' then total_value else 0 end) as purchase_value\n , sum(case when event_name = 'purchase' then total_items else 0 end) as purchase_items\n \n , sum(case when event_name = 'custom' then conversions else 0 end) as custom_conversions\n , sum(case when event_name = 'custom' then view_through_conversions else 0 end) as custom_view_through_conversions\n , sum(case when event_name = 'custom' then total_value else 0 end) as custom_value\n , sum(case when event_name = 'custom' then total_items else 0 end) as custom_items\n \n \n\n \n\n\n\n\n\n from conversions_report\n\n \n where \n \n event_name = 'lead'\n or \n \n event_name = 'purchase'\n or \n \n event_name = 'custom'\n \n \n \n\n group by 1,2,3\n),\n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n report.account_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n campaigns.campaign_name,\n ad_groups.campaign_id,\n accounts.currency,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(rollup_conversions_report.conversions) as conversions,\n sum(rollup_conversions_report.view_through_conversions) as view_through_conversions,\n sum(rollup_conversions_report.total_value) as total_value,\n sum(rollup_conversions_report.total_items) as total_items\n\n \n \n , sum(lead_conversions) as lead_conversions\n , sum(lead_view_through_conversions) as lead_view_through_conversions\n , sum(lead_value) as lead_value\n , sum(lead_items) as lead_items\n \n , sum(purchase_conversions) as purchase_conversions\n , sum(purchase_view_through_conversions) as purchase_view_through_conversions\n , sum(purchase_value) as purchase_value\n , sum(purchase_items) as purchase_items\n \n , sum(custom_conversions) as custom_conversions\n , sum(custom_view_through_conversions) as custom_view_through_conversions\n , sum(custom_value) as custom_value\n , sum(custom_items) as custom_items\n \n \n\n \n\n\n\n\n\n \n\n\n\n\n\n from report\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join campaigns\n on ad_groups.campaign_id = campaigns.campaign_id\n and ad_groups.source_relation = campaigns.source_relation\n left join rollup_conversions_report\n on report.ad_group_id = rollup_conversions_report.ad_group_id\n and report.source_relation = rollup_conversions_report.source_relation\n and report.date_day = rollup_conversions_report.date_day\n group by 1,2,3,4,5,6,7,8\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__ad_group": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_group", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/stg_reddit_ads__ad_group.sql", "original_file_path": "models/staging/stg_reddit_ads__ad_group.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__ad_group", "fqn": ["reddit_ads", "staging", "stg_reddit_ads__ad_group"], "alias": "stg_reddit_ads__ad_group", "checksum": {"name": "sha256", "checksum": "da64d1b5afdfee37e1a9871da13ed3054e1146e6996700208acd4f1f4588f829"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents information about each ad group.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_id"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "bid_strategy": {"name": "bid_strategy", "description": "The bid strategy for this entity. \"MAXIMIZE_VOLUME\", \"MANUAL_BIDDING\", or \"BIDLESS\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.bid_strategy"]}, "bid_value": {"name": "bid_value", "description": "The amount to pay in microcurrency per bidding event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.bid_value"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "configured_status": {"name": "configured_status", "description": "The status configured by the account owner. \"ACTIVE\", \"PAUSED\", \"ARCHIVED\", \"DELETED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.configured_status"]}, "effective_status": {"name": "effective_status", "description": "The calculated status determining the real status of this entity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.effective_status"]}, "end_time_at": {"name": "end_time_at", "description": "When the entity will stop delivering.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.end_time"]}, "expand_targeting": {"name": "expand_targeting", "description": "Boolean that when selected, allows Reddit to expand your targeting to maximize your results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.expand_targeting"]}, "goal_type": {"name": "goal_type", "description": "The type of goal for the entity. \"IMPRESSIONS\", \"PERCENTAGE\", \"CLICKS\", \"CONVERSIONS\", \"LIFETIME_SPEND\", \"DAILY_SPEND\", or \"VIDEO_VIEWABLE_IMPRESSIONS\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.goal_type"]}, "goal_value": {"name": "goal_value", "description": "The value used to determine the goal has been met. This is measured in microcurrency for monetary goals types.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.goal_value"]}, "is_processing": {"name": "is_processing", "description": "Whether or not effective status is processing", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.is_processing"]}, "ad_group_name": {"name": "ad_group_name", "description": "Name of ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_name"]}, "optimization_strategy_type": {"name": "optimization_strategy_type", "description": "The strategy to use when optimizing the delivery of an ad. \"DOWNSTREAM_CONVERSIONS\" or \"APP_INSTALLS\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.optimization_strategy_type"]}, "start_time_at": {"name": "start_time_at", "description": "When the entity will begin to deliver.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.start_time"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/staging/stg_reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.1609352, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_reddit_ads__ad_group_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_reddit_ads__ad_group_tmp')),\n staging_columns=get_ad_group_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='reddit_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n account_id,\n bid_strategy,\n bid_value,\n campaign_id,\n configured_status,\n effective_status,\n cast(end_time as {{ dbt.type_timestamp() }}) as end_time_at,\n expand_targeting,\n goal_type,\n goal_value,\n id as ad_group_id,\n is_processing,\n name as ad_group_name,\n optimization_strategy_type,\n cast(start_time as {{ dbt.type_timestamp() }}) as start_time_at\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__ad_group_tmp", "package": null, "version": null}, {"name": "stg_reddit_ads__ad_group_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.reddit_ads.get_ad_group_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.reddit_ads.stg_reddit_ads__ad_group_tmp"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads__ad_group.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n bid_strategy as bid_strategy,\n bid_value as bid_value,\n campaign_id as campaign_id,\n configured_status as configured_status,\n effective_status as effective_status,\n end_time as end_time,\n expand_targeting as expand_targeting,\n goal_type as goal_type,\n goal_value as goal_value,\n id as id,\n is_processing as is_processing,\n name as name,\n optimization_strategy_type as optimization_strategy_type,\n start_time as start_time\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n account_id,\n bid_strategy,\n bid_value,\n campaign_id,\n configured_status,\n effective_status,\n cast(end_time as timestamp) as end_time_at,\n expand_targeting,\n goal_type,\n goal_value,\n id as ad_group_id,\n is_processing,\n name as ad_group_name,\n optimization_strategy_type,\n cast(start_time as timestamp) as start_time_at\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__ad_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_report", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/stg_reddit_ads__ad_report.sql", "original_file_path": "models/staging/stg_reddit_ads__ad_report.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__ad_report", "fqn": ["reddit_ads", "staging", "stg_reddit_ads__ad_report"], "alias": "stg_reddit_ads__ad_report", "checksum": {"name": "sha256", "checksum": "22a7246e7a8509250b3d16fccd4a9a533d4d8562038e4dbcefca9812abe6ea23"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a summary of events for each given date and ad.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "ad_id": {"name": "ad_id", "description": "The ID of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_id"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "region": {"name": "region", "description": "The region (US state or UK country) targeted for the reports", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.region"]}, "spend": {"name": "spend", "description": "Spend converted out of microcurrency (so Spend/1,000,000)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/staging/stg_reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.1590083, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_reddit_ads__ad_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_reddit_ads__ad_report_tmp')),\n staging_columns=get_ad_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='reddit_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n account_id,\n ad_id,\n coalesce(clicks,0) as clicks,\n date as date_day,\n coalesce(impressions,0) as impressions,\n region,\n {{ reddit_ads.convert_microcurrency('spend') }} as spend\n \n {{ fivetran_utils.fill_pass_through_columns('reddit_ads__ad_passthrough_metrics') }}\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__ad_report_tmp", "package": null, "version": null}, {"name": "stg_reddit_ads__ad_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.reddit_ads.get_ad_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.reddit_ads.convert_microcurrency", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.reddit_ads.stg_reddit_ads__ad_report_tmp"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads__ad_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n ad_id as ad_id,\n clicks as clicks,\n date as date,\n impressions as impressions,\n region as region,\n spend as spend,\n date as date_day\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n account_id,\n ad_id,\n coalesce(clicks,0) as clicks,\n date as date_day,\n coalesce(impressions,0) as impressions,\n region,\n \n coalesce(cast(spend as numeric(28,6)) / cast(1000000 as numeric(28,6)), 0)\n as spend\n \n \n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__ad_conversions_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_conversions_report", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/stg_reddit_ads__ad_conversions_report.sql", "original_file_path": "models/staging/stg_reddit_ads__ad_conversions_report.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__ad_conversions_report", "fqn": ["reddit_ads", "staging", "stg_reddit_ads__ad_conversions_report"], "alias": "stg_reddit_ads__ad_conversions_report", "checksum": {"name": "sha256", "checksum": "192420f1f3056e8fa8adec4b0e8288372b012c4555d9cdf0aa764f44c6fb2910"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Provides a summary of conversion events at the individual ad level, aggregating key metrics by event and day such as view-through and click-through conversions.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "ad_id": {"name": "ad_id", "description": "The ID of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_id"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "event_name": {"name": "event_name", "description": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.event_name"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "conversions": {"name": "conversions", "description": "The total click-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion"]}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "The total view-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion"]}, "source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/staging/stg_reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.1667612, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_conversions_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_reddit_ads__ad_conversions_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_reddit_ads__ad_conversions_report_tmp')),\n staging_columns=get_ad_conversions_report_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='reddit_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_synced,\n account_id,\n ad_id,\n date as date_day,\n lower(event_name) as event_name,\n coalesce(total_items, 0) as total_items,\n coalesce(total_value, 0) as total_value,\n coalesce(clicks, click_through_conversion_attribution_window_month, 0) as conversions,\n coalesce(views, view_through_conversion_attribution_window_month, 0) as view_through_conversions\n \n {{ fivetran_utils.fill_pass_through_columns('reddit_ads__ad_conversions_passthrough_metrics') }}\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": ["doc.reddit_ads.stg_reddit_ads__ad_conversions_report"], "language": "sql", "refs": [{"name": "stg_reddit_ads__ad_conversions_report_tmp", "package": null, "version": null}, {"name": "stg_reddit_ads__ad_conversions_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.reddit_ads.get_ad_conversions_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.reddit_ads.stg_reddit_ads__ad_conversions_report_tmp"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads__ad_conversions_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_conversions_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n ad_id as ad_id,\n cast(null as integer) as clicks,\n click_through_conversion_attribution_window_month as click_through_conversion_attribution_window_month,\n date as date,\n event_name as event_name,\n total_items as total_items,\n total_value as total_value,\n cast(null as integer) as views,\n view_through_conversion_attribution_window_month as view_through_conversion_attribution_window_month\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_synced,\n account_id,\n ad_id,\n date as date_day,\n lower(event_name) as event_name,\n coalesce(total_items, 0) as total_items,\n coalesce(total_value, 0) as total_value,\n coalesce(clicks, click_through_conversion_attribution_window_month, 0) as conversions,\n coalesce(views, view_through_conversion_attribution_window_month, 0) as view_through_conversions\n \n \n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__campaign": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/stg_reddit_ads__campaign.sql", "original_file_path": "models/staging/stg_reddit_ads__campaign.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__campaign", "fqn": ["reddit_ads", "staging", "stg_reddit_ads__campaign"], "alias": "stg_reddit_ads__campaign", "checksum": {"name": "sha256", "checksum": "a49b8cc309b03bfec5657cef3d13e334db88069530938e8b1cfa9dc137f6a5a1"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents information about each campaign.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "configured_status": {"name": "configured_status", "description": "The status configured by the account owner. \"ACTIVE\", \"PAUSED\", \"ARCHIVED\", \"DELETED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.configured_status"]}, "effective_status": {"name": "effective_status", "description": "The calculated status determining the real status of this entity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.effective_status"]}, "funding_instrument_id": {"name": "funding_instrument_id", "description": "Campaign level funding instrument id", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.funding_instrument_id"]}, "is_processing": {"name": "is_processing", "description": "Whether or not effective status is processing", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.is_processing"]}, "campaign_name": {"name": "campaign_name", "description": "Name of campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_name"]}, "objective": {"name": "objective", "description": "The objective type of a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.objective"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/staging/stg_reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.1629148, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_reddit_ads__campaign_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_reddit_ads__campaign_tmp')),\n staging_columns=get_campaign_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='reddit_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n account_id,\n configured_status,\n effective_status,\n funding_instrument_id,\n id as campaign_id,\n is_processing,\n name as campaign_name,\n objective\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__campaign_tmp", "package": null, "version": null}, {"name": "stg_reddit_ads__campaign_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.reddit_ads.get_campaign_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.reddit_ads.stg_reddit_ads__campaign_tmp"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads__campaign.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n configured_status as configured_status,\n effective_status as effective_status,\n funding_instrument_id as funding_instrument_id,\n id as id,\n is_processing as is_processing,\n name as name,\n objective as objective\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n account_id,\n configured_status,\n effective_status,\n funding_instrument_id,\n id as campaign_id,\n is_processing,\n name as campaign_name,\n objective\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_country_conversions_report", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/stg_reddit_ads__campaign_country_conversions_report.sql", "original_file_path": "models/staging/stg_reddit_ads__campaign_country_conversions_report.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report", "fqn": ["reddit_ads", "staging", "stg_reddit_ads__campaign_country_conversions_report"], "alias": "stg_reddit_ads__campaign_country_conversions_report", "checksum": {"name": "sha256", "checksum": "d19ac3e970becaa7a61909d0c7a4ba76cbdb1f26223639db8124740af8ef48ab"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Provides a summary of conversion events at the campaign and country level, aggregating key metrics by event and day such as view-through and click-through conversions.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "country": {"name": "country", "description": "The country associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.country"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "event_name": {"name": "event_name", "description": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.event_name"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "conversions": {"name": "conversions", "description": "The total click-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion"]}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "The total view-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion"]}, "source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/staging/stg_reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.169755, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_country_conversions_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars([\n 'ad_reporting__reddit_ads_enabled',\n 'reddit_ads__using_campaign_country_report',\n 'reddit_ads__using_campaign_country_conversions_report'])\n) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_reddit_ads__campaign_country_conversions_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_reddit_ads__campaign_country_conversions_report_tmp')),\n staging_columns=get_campaign_country_conversions_report_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='reddit_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_synced,\n account_id,\n campaign_id,\n date as date_day,\n country,\n lower(event_name) as event_name,\n coalesce(total_items,0) as total_items,\n coalesce(total_value,0) as total_value,\n coalesce(clicks, click_through_conversion_attribution_window_month, 0) as conversions,\n coalesce(views, view_through_conversion_attribution_window_month, 0) as view_through_conversions\n\n {{ fivetran_utils.fill_pass_through_columns('reddit_ads__campaign_country_conversions_passthrough_metrics') }}\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": ["doc.reddit_ads.campaign_country_conversions_report"], "language": "sql", "refs": [{"name": "stg_reddit_ads__campaign_country_conversions_report_tmp", "package": null, "version": null}, {"name": "stg_reddit_ads__campaign_country_conversions_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.reddit_ads.get_campaign_country_conversions_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report_tmp"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads__campaign_country_conversions_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_country_conversions_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n cast(null as float) as avg_value,\n campaign_id as campaign_id,\n cast(null as integer) as clicks,\n click_through_conversion_attribution_window_month as click_through_conversion_attribution_window_month,\n country as country,\n date as date,\n event_name as event_name,\n total_items as total_items,\n total_value as total_value,\n cast(null as integer) as views,\n view_through_conversion_attribution_window_month as view_through_conversion_attribution_window_month\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_synced,\n account_id,\n campaign_id,\n date as date_day,\n country,\n lower(event_name) as event_name,\n coalesce(total_items,0) as total_items,\n coalesce(total_value,0) as total_value,\n coalesce(clicks, click_through_conversion_attribution_window_month, 0) as conversions,\n coalesce(views, view_through_conversion_attribution_window_month, 0) as view_through_conversions\n\n \n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_report", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/stg_reddit_ads__campaign_report.sql", "original_file_path": "models/staging/stg_reddit_ads__campaign_report.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_report", "fqn": ["reddit_ads", "staging", "stg_reddit_ads__campaign_report"], "alias": "stg_reddit_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "3ee1dc5dc88198ea936dff530972f79c8df3f7d94559570a48e4849e41c56303"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a summary of events for each given date and campaign.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "region": {"name": "region", "description": "The region (US state or UK country) targeted for the reports", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.region"]}, "spend": {"name": "spend", "description": "Spend converted out of microcurrency (so Spend/1,000,000)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/staging/stg_reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.1638324, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_reddit_ads__campaign_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_reddit_ads__campaign_report_tmp')),\n staging_columns=get_campaign_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='reddit_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n account_id,\n campaign_id,\n coalesce(clicks,0) as clicks,\n date as date_day,\n coalesce(impressions,0) as impressions,\n region,\n {{ reddit_ads.convert_microcurrency('spend') }} as spend\n \n {{ fivetran_utils.fill_pass_through_columns('reddit_ads__campaign_passthrough_metrics') }}\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__campaign_report_tmp", "package": null, "version": null}, {"name": "stg_reddit_ads__campaign_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.reddit_ads.get_campaign_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.reddit_ads.convert_microcurrency", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.reddit_ads.stg_reddit_ads__campaign_report_tmp"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n campaign_id as campaign_id,\n clicks as clicks,\n date as date,\n impressions as impressions,\n region as region,\n spend as spend,\n date as date_day\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n account_id,\n campaign_id,\n coalesce(clicks,0) as clicks,\n date as date_day,\n coalesce(impressions,0) as impressions,\n region,\n \n coalesce(cast(spend as numeric(28,6)) / cast(1000000 as numeric(28,6)), 0)\n as spend\n \n \n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__ad": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/stg_reddit_ads__ad.sql", "original_file_path": "models/staging/stg_reddit_ads__ad.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__ad", "fqn": ["reddit_ads", "staging", "stg_reddit_ads__ad"], "alias": "stg_reddit_ads__ad", "checksum": {"name": "sha256", "checksum": "959174d214ac7cd49c55a530a58c45af4e23d084cbf8928188524b4e0cc9e599"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents information about each ad.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}, "ad_id": {"name": "ad_id", "description": "The ID of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_id"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "click_url": {"name": "click_url", "description": "The destination url, or the website address, that a visitor goes to when they click on the ad", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_url"]}, "configured_status": {"name": "configured_status", "description": "The status configured by the account owner. \"ACTIVE\", \"PAUSED\", \"ARCHIVED\", \"DELETED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.configured_status"]}, "effective_status": {"name": "effective_status", "description": "The calculated status determining the real status of this entity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.effective_status"]}, "is_processing": {"name": "is_processing", "description": "Whether or not effective status is processing", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.is_processing"]}, "ad_name": {"name": "ad_name", "description": "Name of ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_name"]}, "post_id": {"name": "post_id", "description": "The ID of the post.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.post_id"]}, "post_url": {"name": "post_url", "description": "The URL belonging to the post.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.post_url"]}, "rejection_reason": {"name": "rejection_reason", "description": "Reason why entity was rejected.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.rejection_reason"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/staging/stg_reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.1577146, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_reddit_ads__ad_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_reddit_ads__ad_tmp')),\n staging_columns=get_ad_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='reddit_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n account_id,\n ad_group_id,\n campaign_id,\n click_url,\n configured_status,\n effective_status,\n id as ad_id,\n is_processing,\n name as ad_name,\n post_id,\n post_url,\n rejection_reason\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__ad_tmp", "package": null, "version": null}, {"name": "stg_reddit_ads__ad_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.reddit_ads.get_ad_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.reddit_ads.stg_reddit_ads__ad_tmp"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads__ad.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n ad_group_id as ad_group_id,\n campaign_id as campaign_id,\n click_url as click_url,\n configured_status as configured_status,\n effective_status as effective_status,\n id as id,\n is_processing as is_processing,\n name as name,\n post_id as post_id,\n post_url as post_url,\n rejection_reason as rejection_reason\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n account_id,\n ad_group_id,\n campaign_id,\n click_url,\n configured_status,\n effective_status,\n id as ad_id,\n is_processing,\n name as ad_name,\n post_id,\n post_url,\n rejection_reason\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__account_conversions_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__account_conversions_report", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/stg_reddit_ads__account_conversions_report.sql", "original_file_path": "models/staging/stg_reddit_ads__account_conversions_report.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__account_conversions_report", "fqn": ["reddit_ads", "staging", "stg_reddit_ads__account_conversions_report"], "alias": "stg_reddit_ads__account_conversions_report", "checksum": {"name": "sha256", "checksum": "0a6e7b5a810d37edb229c20e95b9eb4538ec2275bb4c7fb8b725f5d79ad3429d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Provides a summary of conversion events at the account level, aggregating key metrics by event and day such as view-through and click-through conversions.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "event_name": {"name": "event_name", "description": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.event_name"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "conversions": {"name": "conversions", "description": "The total click-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion"]}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "The total view-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion"]}, "source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/staging/stg_reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.164758, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account_conversions_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_reddit_ads__account_conversions_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_reddit_ads__account_conversions_report_tmp')),\n staging_columns=get_account_conversions_report_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='reddit_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_synced,\n account_id,\n date as date_day,\n lower(event_name) as event_name,\n coalesce(total_items,0) as total_items,\n coalesce(total_value,0) as total_value,\n coalesce(clicks, click_through_conversion_attribution_window_month, 0) as conversions,\n coalesce(views, view_through_conversion_attribution_window_month, 0) as view_through_conversions\n \n {{ fivetran_utils.fill_pass_through_columns('reddit_ads__account_conversions_passthrough_metrics') }}\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": ["doc.reddit_ads.stg_reddit_ads__account_conversions_report"], "language": "sql", "refs": [{"name": "stg_reddit_ads__account_conversions_report_tmp", "package": null, "version": null}, {"name": "stg_reddit_ads__account_conversions_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.reddit_ads.get_account_conversions_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.reddit_ads.stg_reddit_ads__account_conversions_report_tmp"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads__account_conversions_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account_conversions_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n cast(null as integer) as clicks,\n click_through_conversion_attribution_window_month as click_through_conversion_attribution_window_month,\n date as date,\n event_name as event_name,\n total_items as total_items,\n total_value as total_value,\n cast(null as integer) as views,\n view_through_conversion_attribution_window_month as view_through_conversion_attribution_window_month\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_synced,\n account_id,\n date as date_day,\n lower(event_name) as event_name,\n coalesce(total_items,0) as total_items,\n coalesce(total_value,0) as total_value,\n coalesce(clicks, click_through_conversion_attribution_window_month, 0) as conversions,\n coalesce(views, view_through_conversion_attribution_window_month, 0) as view_through_conversions\n \n \n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__account_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__account_report", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/stg_reddit_ads__account_report.sql", "original_file_path": "models/staging/stg_reddit_ads__account_report.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__account_report", "fqn": ["reddit_ads", "staging", "stg_reddit_ads__account_report"], "alias": "stg_reddit_ads__account_report", "checksum": {"name": "sha256", "checksum": "43a50246b76914003044d726a2f32ddd5e79c4b81b4e53d155e3fac4858d19f3"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a summary of events for each given date and account.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "region": {"name": "region", "description": "The region (US state or UK country) targeted for the reports", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.region"]}, "spend": {"name": "spend", "description": "Spend converted out of microcurrency (so Spend/1,000,000)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/staging/stg_reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.156576, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_reddit_ads__account_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_reddit_ads__account_report_tmp')),\n staging_columns=get_account_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='reddit_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n account_id,\n coalesce(clicks,0) as clicks,\n date as date_day,\n coalesce(impressions,0) as impressions,\n region,\n {{ reddit_ads.convert_microcurrency('spend') }} as spend\n \n {{ fivetran_utils.fill_pass_through_columns('reddit_ads__account_passthrough_metrics') }}\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__account_report_tmp", "package": null, "version": null}, {"name": "stg_reddit_ads__account_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.reddit_ads.get_account_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.reddit_ads.convert_microcurrency", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.reddit_ads.stg_reddit_ads__account_report_tmp"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads__account_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n clicks as clicks,\n date as date,\n impressions as impressions,\n region as region,\n spend as spend,\n date as date_day\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n account_id,\n coalesce(clicks,0) as clicks,\n date as date_day,\n coalesce(impressions,0) as impressions,\n region,\n \n coalesce(cast(spend as numeric(28,6)) / cast(1000000 as numeric(28,6)), 0)\n as spend\n \n \n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__campaign_conversions_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_conversions_report", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/stg_reddit_ads__campaign_conversions_report.sql", "original_file_path": "models/staging/stg_reddit_ads__campaign_conversions_report.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_conversions_report", "fqn": ["reddit_ads", "staging", "stg_reddit_ads__campaign_conversions_report"], "alias": "stg_reddit_ads__campaign_conversions_report", "checksum": {"name": "sha256", "checksum": "275cd73d649436a0b8408bdc79124c7922f0af37bf724e2b774b0a1f28de7ff1"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Provides a summary of conversion events at the campaign level, aggregating key metrics by event and day such as view-through and click-through conversions.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "event_name": {"name": "event_name", "description": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.event_name"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "conversions": {"name": "conversions", "description": "The total click-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion"]}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "The total view-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion"]}, "source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/staging/stg_reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.1677213, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_conversions_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_reddit_ads__campaign_conversions_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_reddit_ads__campaign_conversions_report_tmp')),\n staging_columns=get_campaign_conversions_report_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='reddit_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_synced,\n account_id,\n campaign_id,\n date as date_day,\n lower(event_name) as event_name,\n coalesce(total_items,0) as total_items,\n coalesce(total_value,0) as total_value,\n coalesce(clicks, click_through_conversion_attribution_window_month, 0) as conversions,\n coalesce(views, view_through_conversion_attribution_window_month, 0) as view_through_conversions\n \n {{ fivetran_utils.fill_pass_through_columns('reddit_ads__campaign_conversions_passthrough_metrics') }}\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": ["doc.reddit_ads.stg_reddit_ads__campaign_conversions_report"], "language": "sql", "refs": [{"name": "stg_reddit_ads__campaign_conversions_report_tmp", "package": null, "version": null}, {"name": "stg_reddit_ads__campaign_conversions_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.reddit_ads.get_campaign_conversions_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.reddit_ads.stg_reddit_ads__campaign_conversions_report_tmp"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads__campaign_conversions_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_conversions_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n campaign_id as campaign_id,\n cast(null as integer) as clicks,\n click_through_conversion_attribution_window_month as click_through_conversion_attribution_window_month,\n date as date,\n event_name as event_name,\n total_items as total_items,\n total_value as total_value,\n cast(null as integer) as views,\n view_through_conversion_attribution_window_month as view_through_conversion_attribution_window_month\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_synced,\n account_id,\n campaign_id,\n date as date_day,\n lower(event_name) as event_name,\n coalesce(total_items,0) as total_items,\n coalesce(total_value,0) as total_value,\n coalesce(clicks, click_through_conversion_attribution_window_month, 0) as conversions,\n coalesce(views, view_through_conversion_attribution_window_month, 0) as view_through_conversions\n \n \n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__ad_group_conversions_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_group_conversions_report", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/stg_reddit_ads__ad_group_conversions_report.sql", "original_file_path": "models/staging/stg_reddit_ads__ad_group_conversions_report.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__ad_group_conversions_report", "fqn": ["reddit_ads", "staging", "stg_reddit_ads__ad_group_conversions_report"], "alias": "stg_reddit_ads__ad_group_conversions_report", "checksum": {"name": "sha256", "checksum": "13632a9a07209b5c8a628e31e625fa18b1997e4f8045bd7e7bfcee1e789242b4"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Provides a summary of conversion events at the ad group level, aggregating key metrics by event and day such as view-through and click-through conversions.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_id"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "event_name": {"name": "event_name", "description": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.event_name"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "conversions": {"name": "conversions", "description": "The total click-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion"]}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "The total view-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion"]}, "source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/staging/stg_reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.1657898, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group_conversions_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_reddit_ads__ad_group_conversions_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_reddit_ads__ad_group_conversions_report_tmp')),\n staging_columns=get_ad_group_conversions_report_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='reddit_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_synced,\n account_id,\n ad_group_id,\n date as date_day,\n lower(event_name) as event_name,\n coalesce(total_items,0) as total_items,\n coalesce(total_value,0) as total_value,\n coalesce(clicks, click_through_conversion_attribution_window_month, 0) as conversions,\n coalesce(views, view_through_conversion_attribution_window_month, 0) as view_through_conversions\n \n {{ fivetran_utils.fill_pass_through_columns('reddit_ads__ad_group_conversions_passthrough_metrics') }}\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": ["doc.reddit_ads.stg_reddit_ads__ad_group_conversions_report"], "language": "sql", "refs": [{"name": "stg_reddit_ads__ad_group_conversions_report_tmp", "package": null, "version": null}, {"name": "stg_reddit_ads__ad_group_conversions_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.reddit_ads.get_ad_group_conversions_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.reddit_ads.stg_reddit_ads__ad_group_conversions_report_tmp"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads__ad_group_conversions_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group_conversions_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n ad_group_id as ad_group_id,\n cast(null as integer) as clicks,\n click_through_conversion_attribution_window_month as click_through_conversion_attribution_window_month,\n date as date,\n event_name as event_name,\n total_items as total_items,\n total_value as total_value,\n cast(null as integer) as views,\n view_through_conversion_attribution_window_month as view_through_conversion_attribution_window_month\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_synced,\n account_id,\n ad_group_id,\n date as date_day,\n lower(event_name) as event_name,\n coalesce(total_items,0) as total_items,\n coalesce(total_value,0) as total_value,\n coalesce(clicks, click_through_conversion_attribution_window_month, 0) as conversions,\n coalesce(views, view_through_conversion_attribution_window_month, 0) as view_through_conversions\n \n \n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__ad_group_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_group_report", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/stg_reddit_ads__ad_group_report.sql", "original_file_path": "models/staging/stg_reddit_ads__ad_group_report.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__ad_group_report", "fqn": ["reddit_ads", "staging", "stg_reddit_ads__ad_group_report"], "alias": "stg_reddit_ads__ad_group_report", "checksum": {"name": "sha256", "checksum": "434bc26b468b67584d3329a95c24a8deb3091ee4cdbcb9ed969bb34a698b4e29"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a summary of events for each given date and ad group.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_id"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "region": {"name": "region", "description": "The region (US state or UK country) targeted for the reports", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.region"]}, "spend": {"name": "spend", "description": "Spend converted out of microcurrency (so Spend/1,000,000)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/staging/stg_reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.161946, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_reddit_ads__ad_group_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_reddit_ads__ad_group_report_tmp')),\n staging_columns=get_ad_group_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='reddit_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n account_id,\n ad_group_id,\n coalesce(clicks,0) as clicks,\n date as date_day,\n coalesce(impressions,0) as impressions,\n region,\n {{ reddit_ads.convert_microcurrency('spend') }} as spend\n \n {{ fivetran_utils.fill_pass_through_columns('reddit_ads__ad_group_passthrough_metrics') }}\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__ad_group_report_tmp", "package": null, "version": null}, {"name": "stg_reddit_ads__ad_group_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.reddit_ads.get_ad_group_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.reddit_ads.convert_microcurrency", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.reddit_ads.stg_reddit_ads__ad_group_report_tmp"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads__ad_group_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n ad_group_id as ad_group_id,\n clicks as clicks,\n date as date,\n impressions as impressions,\n region as region,\n spend as spend,\n date as date_day\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n account_id,\n ad_group_id,\n coalesce(clicks,0) as clicks,\n date as date_day,\n coalesce(impressions,0) as impressions,\n region,\n \n coalesce(cast(spend as numeric(28,6)) / cast(1000000 as numeric(28,6)), 0)\n as spend\n \n \n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__campaign_country_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_country_report", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/stg_reddit_ads__campaign_country_report.sql", "original_file_path": "models/staging/stg_reddit_ads__campaign_country_report.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_country_report", "fqn": ["reddit_ads", "staging", "stg_reddit_ads__campaign_country_report"], "alias": "stg_reddit_ads__campaign_country_report", "checksum": {"name": "sha256", "checksum": "9fb3c016c3e5ad44c5c67f194d330204a27d53024114cab8a99ac21d48b97ee1"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a summary of events at the date, country, and campaign level.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "country": {"name": "country", "description": "The country associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.country"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "region": {"name": "region", "description": "The region (US state or UK country) targeted for the reports", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.region"]}, "spend": {"name": "spend", "description": "Spend converted out of microcurrency (so Spend/1,000,000)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/staging/stg_reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.1687462, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_country_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars([\n 'ad_reporting__reddit_ads_enabled',\n 'reddit_ads__using_campaign_country_report'])\n) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_reddit_ads__campaign_country_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_reddit_ads__campaign_country_report_tmp')),\n staging_columns=get_campaign_country_report_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='reddit_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation,\n _fivetran_synced,\n account_id,\n campaign_id,\n country,\n date as date_day,\n coalesce(clicks,0) as clicks,\n coalesce(impressions,0) as impressions,\n region,\n {{ reddit_ads.convert_microcurrency('spend') }} as spend\n\n {{ fivetran_utils.fill_pass_through_columns('reddit_ads__campaign_country_passthrough_metrics') }}\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": ["doc.reddit_ads.campaign_country_report"], "language": "sql", "refs": [{"name": "stg_reddit_ads__campaign_country_report_tmp", "package": null, "version": null}, {"name": "stg_reddit_ads__campaign_country_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.reddit_ads.get_campaign_country_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.reddit_ads.convert_microcurrency", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.reddit_ads.stg_reddit_ads__campaign_country_report_tmp"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads__campaign_country_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_country_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n campaign_id as campaign_id,\n clicks as clicks,\n country as country,\n date as date,\n impressions as impressions,\n region as region,\n spend as spend,\n date as date_day\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation,\n _fivetran_synced,\n account_id,\n campaign_id,\n country,\n date as date_day,\n coalesce(clicks,0) as clicks,\n coalesce(impressions,0) as impressions,\n region,\n \n coalesce(cast(spend as numeric(28,6)) / cast(1000000 as numeric(28,6)), 0)\n as spend\n\n \n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__account": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__account", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/stg_reddit_ads__account.sql", "original_file_path": "models/staging/stg_reddit_ads__account.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__account", "fqn": ["reddit_ads", "staging", "stg_reddit_ads__account"], "alias": "stg_reddit_ads__account", "checksum": {"name": "sha256", "checksum": "058b85510c1277f43764b29b7af75946447525151b33a756b023373be9242e25"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents information about an account.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "attribution_type": {"name": "attribution_type", "description": "Attribution type: \"CLICK_THROUGH_CONVERSION\", \"VIEW_THROUGH_CONVERSION\", or \"ALL_CONVERSION\".\nCLICK_THROUGH_CONVERSION: A user clicked on your ad and then completed the conversion action on your site. \nVIEW_THROUGH_CONVERSION: A user saw your ad and did not click it, but did complete the conversion action on your site.\nALL_CONVERSION: Combination of both.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.attribution_type"]}, "click_attribution_window": {"name": "click_attribution_window", "description": "Determines how long after clicking on your ad you count that user\u2019s actions as a conversion. \"DAY\", \"WEEK\", or \"MONTH\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_attribution_window"]}, "created_at": {"name": "created_at", "description": "Time that the respective record (ad, ad group, campaign, post, etc) was created. ISO-8601 timestamp.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.created_at"]}, "currency": {"name": "currency", "description": "The currency this account uses (ISO-4217)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.currency"]}, "time_zone_id": {"name": "time_zone_id", "description": "The time zone id preference for this account", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.time_zone_id"]}, "view_attribution_window": {"name": "view_attribution_window", "description": "Determines how long after viewing on your ad you count that user\u2019s actions as a conversion. \"DAY\", \"WEEK\", or \"MONTH\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_attribution_window"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/staging/stg_reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.1556478, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_reddit_ads__account_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_reddit_ads__account_tmp')),\n staging_columns=get_account_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='reddit_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n attribution_type,\n click_attribution_window,\n cast(created_at as {{ dbt.type_timestamp() }}) as created_at,\n currency,\n id as account_id,\n time_zone_id,\n view_attribution_window\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__account_tmp", "package": null, "version": null}, {"name": "stg_reddit_ads__account_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.reddit_ads.get_account_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.reddit_ads.stg_reddit_ads__account_tmp"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads__account.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n attribution_type as attribution_type,\n click_attribution_window as click_attribution_window,\n created_at as created_at,\n currency as currency,\n id as id,\n time_zone_id as time_zone_id,\n view_attribution_window as view_attribution_window\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n attribution_type,\n click_attribution_window,\n cast(created_at as timestamp) as created_at,\n currency,\n id as account_id,\n time_zone_id,\n view_attribution_window\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__ad_conversions_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_conversions_report_tmp", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/tmp/stg_reddit_ads__ad_conversions_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_reddit_ads__ad_conversions_report_tmp.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__ad_conversions_report_tmp", "fqn": ["reddit_ads", "staging", "tmp", "stg_reddit_ads__ad_conversions_report_tmp"], "alias": "stg_reddit_ads__ad_conversions_report_tmp", "checksum": {"name": "sha256", "checksum": "8ca05e63c8af8709ebe9bd577987e1606ffc69a99f16337ae7382316f44589de"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450497.1619937, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_conversions_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\n{% if var('reddit_ads_union_schemas', []) | length > 0 or var('reddit_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_conversions_report', \n database_variable='reddit_ads_database', \n schema_variable='reddit_ads_schema', \n default_database=target.database,\n default_schema='reddit_ads',\n default_variable='ad_conversions_report',\n union_schema_variable='reddit_ads_union_schemas',\n union_database_variable='reddit_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='reddit_ads_sources',\n single_source_name='reddit_ads',\n single_table_name='ad_conversions_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["reddit_ads", "ad_conversions_report"], ["reddit_ads", "ad_conversions_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.reddit_ads.reddit_ads.ad_conversions_report"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/tmp/stg_reddit_ads__ad_conversions_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: reddit_ads_ad_conversions_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: reddit_ads_ad_conversions\n\n\n select\n \"_fivetran_synced\",\n \"account_id\",\n \"ad_id\",\n \"avg_value\",\n \"click_through_conversion_attribution_window_day\",\n \"click_through_conversion_attribution_window_month\",\n \"click_through_conversion_attribution_window_week\",\n \"date\",\n \"event_name\",\n \"total_items\",\n \"total_value\",\n \"view_through_conversion_attribution_window_day\",\n \"view_through_conversion_attribution_window_month\",\n \"view_through_conversion_attribution_window_week\"\n from \"postgres\".\"public\".\"reddit_ads_ad_conversions\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_country_conversions_report_tmp", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/tmp/stg_reddit_ads__campaign_country_conversions_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_reddit_ads__campaign_country_conversions_report_tmp.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report_tmp", "fqn": ["reddit_ads", "staging", "tmp", "stg_reddit_ads__campaign_country_conversions_report_tmp"], "alias": "stg_reddit_ads__campaign_country_conversions_report_tmp", "checksum": {"name": "sha256", "checksum": "43ed5c51a96f4f5b194882b0bd1fa2b39f33967f52c07f8d15b49557c8b4c878"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450497.1726835, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_country_conversions_report_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars([\n 'ad_reporting__reddit_ads_enabled',\n 'reddit_ads__using_campaign_country_report',\n 'reddit_ads__using_campaign_country_conversions_report'])\n) }}\n\n{% if var('reddit_ads_union_schemas', []) | length > 0 or var('reddit_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_country_conversions_report', \n database_variable='reddit_ads_database', \n schema_variable='reddit_ads_schema', \n default_database=target.database,\n default_schema='reddit_ads',\n default_variable='campaign_country_conversions_report',\n union_schema_variable='reddit_ads_union_schemas',\n union_database_variable='reddit_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='reddit_ads_sources',\n single_source_name='reddit_ads',\n single_table_name='campaign_country_conversions_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["reddit_ads", "campaign_country_conversions_report"], ["reddit_ads", "campaign_country_conversions_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.reddit_ads.reddit_ads.campaign_country_conversions_report"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/tmp/stg_reddit_ads__campaign_country_conversions_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: reddit_ads_campaign_country_conversions_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: reddit_ads_campaign_country_conversions_report_data\n\n\n select\n \"_fivetran_synced\",\n \"account_id\",\n \"campaign_id\",\n \"click_through_conversion_attribution_window_month\",\n \"country\",\n \"date\",\n \"event_name\",\n \"total_items\",\n \"total_value\",\n \"view_through_conversion_attribution_window_month\"\n from \"postgres\".\"public\".\"reddit_ads_campaign_country_conversions_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__account_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__account_report_tmp", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/tmp/stg_reddit_ads__account_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_reddit_ads__account_report_tmp.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__account_report_tmp", "fqn": ["reddit_ads", "staging", "tmp", "stg_reddit_ads__account_report_tmp"], "alias": "stg_reddit_ads__account_report_tmp", "checksum": {"name": "sha256", "checksum": "c49719da88307b1e740567618d9424144f2b858c17bed6d0c4436b3704c695c2"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450497.1838653, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\n{% if var('reddit_ads_union_schemas', []) | length > 0 or var('reddit_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='account_report', \n database_variable='reddit_ads_database', \n schema_variable='reddit_ads_schema', \n default_database=target.database,\n default_schema='reddit_ads',\n default_variable='account_report',\n union_schema_variable='reddit_ads_union_schemas',\n union_database_variable='reddit_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='reddit_ads_sources',\n single_source_name='reddit_ads',\n single_table_name='account_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["reddit_ads", "account_report"], ["reddit_ads", "account_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.reddit_ads.reddit_ads.account_report"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/tmp/stg_reddit_ads__account_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: reddit_ads_account_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: reddit_ads_account_report_data\n\n\n select\n \"account_id\",\n \"date\",\n \"_fivetran_synced\",\n \"app_install_metrics_add_payment_info\",\n \"app_install_metrics_add_to_cart\",\n \"app_install_metrics_app_launch\",\n \"app_install_metrics_completed_tutorial\",\n \"app_install_metrics_install\",\n \"app_install_metrics_level_achieved\",\n \"app_install_metrics_purchase\",\n \"app_install_metrics_search\",\n \"app_install_metrics_sign_up\",\n \"app_install_metrics_spend\",\n \"app_install_metrics_spend_credits\",\n \"app_install_metrics_view_content\",\n \"clicks\",\n \"comment_downvotes\",\n \"comment_upvotes\",\n \"comments_page_views\",\n \"conversion_roas\",\n \"cpc\",\n \"ctr\",\n \"ecpm\",\n \"gallery_item_caption\",\n \"gallery_item_id\",\n \"impressions\",\n \"legacy_click_conversions_attribution_window_day\",\n \"legacy_click_conversions_attribution_window_month\",\n \"legacy_click_conversions_attribution_window_week\",\n \"legacy_view_conversions_attribution_window_day\",\n \"legacy_view_conversions_attribution_window_month\",\n \"legacy_view_conversions_attribution_window_week\",\n \"priority\",\n \"region\",\n \"spend\",\n \"video_fully_viewable_impressions\",\n \"video_plays_expanded\",\n \"video_plays_with_sound\",\n \"video_started\",\n \"video_viewable_impressions\",\n \"video_watched_100_percent\",\n \"video_watched_10_seconds\",\n \"video_watched_25_percent\",\n \"video_watched_3_seconds\",\n \"video_watched_50_percent\",\n \"video_watched_5_seconds\",\n \"video_watched_75_percent\",\n \"video_watched_95_percent\",\n \"viewable_impressions\",\n \"viewer_comments\"\n from \"postgres\".\"public\".\"reddit_ads_account_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__campaign_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_report_tmp", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/tmp/stg_reddit_ads__campaign_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_reddit_ads__campaign_report_tmp.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_report_tmp", "fqn": ["reddit_ads", "staging", "tmp", "stg_reddit_ads__campaign_report_tmp"], "alias": "stg_reddit_ads__campaign_report_tmp", "checksum": {"name": "sha256", "checksum": "8d566b524e1eee73ae761735f9e42549ed740cdc6a2548f997f789104cd1990b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450497.1965597, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\n{% if var('reddit_ads_union_schemas', []) | length > 0 or var('reddit_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_report', \n database_variable='reddit_ads_database', \n schema_variable='reddit_ads_schema', \n default_database=target.database,\n default_schema='reddit_ads',\n default_variable='campaign_report',\n union_schema_variable='reddit_ads_union_schemas',\n union_database_variable='reddit_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='reddit_ads_sources',\n single_source_name='reddit_ads',\n single_table_name='campaign_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["reddit_ads", "campaign_report"], ["reddit_ads", "campaign_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.reddit_ads.reddit_ads.campaign_report"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/tmp/stg_reddit_ads__campaign_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: reddit_ads_campaign_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: reddit_ads_campaign_report_data\n\n\n select\n \"account_id\",\n \"campaign_id\",\n \"date\",\n \"_fivetran_synced\",\n \"app_install_metrics_add_payment_info\",\n \"app_install_metrics_add_to_cart\",\n \"app_install_metrics_app_launch\",\n \"app_install_metrics_completed_tutorial\",\n \"app_install_metrics_install\",\n \"app_install_metrics_level_achieved\",\n \"app_install_metrics_purchase\",\n \"app_install_metrics_search\",\n \"app_install_metrics_sign_up\",\n \"app_install_metrics_spend\",\n \"app_install_metrics_spend_credits\",\n \"app_install_metrics_view_content\",\n \"clicks\",\n \"comment_downvotes\",\n \"comment_upvotes\",\n \"comments_page_views\",\n \"conversion_roas\",\n \"cpc\",\n \"ctr\",\n \"ecpm\",\n \"gallery_item_caption\",\n \"gallery_item_id\",\n \"impressions\",\n \"legacy_click_conversions_attribution_window_day\",\n \"legacy_click_conversions_attribution_window_month\",\n \"legacy_click_conversions_attribution_window_week\",\n \"legacy_view_conversions_attribution_window_day\",\n \"legacy_view_conversions_attribution_window_month\",\n \"legacy_view_conversions_attribution_window_week\",\n \"priority\",\n \"region\",\n \"spend\",\n \"video_fully_viewable_impressions\",\n \"video_plays_expanded\",\n \"video_plays_with_sound\",\n \"video_started\",\n \"video_viewable_impressions\",\n \"video_watched_100_percent\",\n \"video_watched_10_seconds\",\n \"video_watched_25_percent\",\n \"video_watched_3_seconds\",\n \"video_watched_50_percent\",\n \"video_watched_5_seconds\",\n \"video_watched_75_percent\",\n \"video_watched_95_percent\",\n \"viewable_impressions\",\n \"viewer_comments\"\n from \"postgres\".\"public\".\"reddit_ads_campaign_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__ad_group_conversions_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_group_conversions_report_tmp", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/tmp/stg_reddit_ads__ad_group_conversions_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_reddit_ads__ad_group_conversions_report_tmp.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__ad_group_conversions_report_tmp", "fqn": ["reddit_ads", "staging", "tmp", "stg_reddit_ads__ad_group_conversions_report_tmp"], "alias": "stg_reddit_ads__ad_group_conversions_report_tmp", "checksum": {"name": "sha256", "checksum": "7a3a38dae036ee6c4f4edea9eb3d60df6b458b85543e5b150c4b29a0ff56183b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450497.2076569, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group_conversions_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\n{% if var('reddit_ads_union_schemas', []) | length > 0 or var('reddit_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_group_conversions_report', \n database_variable='reddit_ads_database', \n schema_variable='reddit_ads_schema', \n default_database=target.database,\n default_schema='reddit_ads',\n default_variable='ad_group_conversions_report',\n union_schema_variable='reddit_ads_union_schemas',\n union_database_variable='reddit_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='reddit_ads_sources',\n single_source_name='reddit_ads',\n single_table_name='ad_group_conversions_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["reddit_ads", "ad_group_conversions_report"], ["reddit_ads", "ad_group_conversions_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.reddit_ads.reddit_ads.ad_group_conversions_report"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/tmp/stg_reddit_ads__ad_group_conversions_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: reddit_ads_ad_group_conversions_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: reddit_ads_ad_group_conversions\n\n\n select\n \"_fivetran_synced\",\n \"account_id\",\n \"ad_group_id\",\n \"avg_value\",\n \"click_through_conversion_attribution_window_day\",\n \"click_through_conversion_attribution_window_month\",\n \"click_through_conversion_attribution_window_week\",\n \"date\",\n \"event_name\",\n \"total_items\",\n \"total_value\",\n \"view_through_conversion_attribution_window_day\",\n \"view_through_conversion_attribution_window_month\",\n \"view_through_conversion_attribution_window_week\"\n from \"postgres\".\"public\".\"reddit_ads_ad_group_conversions\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__ad_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_tmp", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/tmp/stg_reddit_ads__ad_tmp.sql", "original_file_path": "models/staging/tmp/stg_reddit_ads__ad_tmp.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__ad_tmp", "fqn": ["reddit_ads", "staging", "tmp", "stg_reddit_ads__ad_tmp"], "alias": "stg_reddit_ads__ad_tmp", "checksum": {"name": "sha256", "checksum": "99fc15469e76ced6fb4122e464e7e8f4be6900e43eff718bef430e39d07f388a"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450497.2183545, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\n{% if var('reddit_ads_union_schemas', []) | length > 0 or var('reddit_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad', \n database_variable='reddit_ads_database', \n schema_variable='reddit_ads_schema', \n default_database=target.database,\n default_schema='reddit_ads',\n default_variable='ad',\n union_schema_variable='reddit_ads_union_schemas',\n union_database_variable='reddit_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='reddit_ads_sources',\n single_source_name='reddit_ads',\n single_table_name='ad'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["reddit_ads", "ad"], ["reddit_ads", "ad"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.reddit_ads.reddit_ads.ad"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/tmp/stg_reddit_ads__ad_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: reddit_ads_ad_identifier\n -- database: postgres \n -- schema: public\n -- identifier: reddit_ads_ad_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"account_id\",\n \"ad_group_id\",\n \"campaign_id\",\n \"click_url\",\n \"configured_status\",\n \"effective_status\",\n \"is_processing\",\n \"name\",\n \"post_id\",\n \"post_url\",\n \"preview_expiry\",\n \"preview_url\",\n \"rejection_reason\",\n \"search_term\"\n from \"postgres\".\"public\".\"reddit_ads_ad_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__campaign_country_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_country_report_tmp", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/tmp/stg_reddit_ads__campaign_country_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_reddit_ads__campaign_country_report_tmp.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_country_report_tmp", "fqn": ["reddit_ads", "staging", "tmp", "stg_reddit_ads__campaign_country_report_tmp"], "alias": "stg_reddit_ads__campaign_country_report_tmp", "checksum": {"name": "sha256", "checksum": "dfcc2be0b6d7c6040dbd314ba63a2b74f74fa46cb1329722f3b1946da54412e7"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450497.2303283, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_country_report_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars([\n 'ad_reporting__reddit_ads_enabled',\n 'reddit_ads__using_campaign_country_report'])\n) }}\n\n{% if var('reddit_ads_union_schemas', []) | length > 0 or var('reddit_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_country_report', \n database_variable='reddit_ads_database', \n schema_variable='reddit_ads_schema', \n default_database=target.database,\n default_schema='reddit_ads',\n default_variable='campaign_country_report',\n union_schema_variable='reddit_ads_union_schemas',\n union_database_variable='reddit_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='reddit_ads_sources',\n single_source_name='reddit_ads',\n single_table_name='campaign_country_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["reddit_ads", "campaign_country_report"], ["reddit_ads", "campaign_country_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.reddit_ads.reddit_ads.campaign_country_report"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/tmp/stg_reddit_ads__campaign_country_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: reddit_ads_campaign_country_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: reddit_ads_campaign_country_report_data\n\n\n select\n \"_fivetran_synced\",\n \"account_id\",\n \"campaign_id\",\n \"clicks\",\n \"country\",\n \"date\",\n \"impressions\",\n \"region\",\n \"spend\"\n from \"postgres\".\"public\".\"reddit_ads_campaign_country_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__account_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__account_tmp", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/tmp/stg_reddit_ads__account_tmp.sql", "original_file_path": "models/staging/tmp/stg_reddit_ads__account_tmp.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__account_tmp", "fqn": ["reddit_ads", "staging", "tmp", "stg_reddit_ads__account_tmp"], "alias": "stg_reddit_ads__account_tmp", "checksum": {"name": "sha256", "checksum": "46a5666b3cb9b0b2020c2991ad8ff2c5fe9fcf29bd7c47e0074070e46dd1f26f"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450497.2414196, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\n{%- set business_account_or_account = 'business_account' if var('reddit_ads__using_business_account', True) else 'account' -%}\n\n{% if var('reddit_ads_union_schemas', []) | length > 0 or var('reddit_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier=business_account_or_account, \n database_variable='reddit_ads_database', \n schema_variable='reddit_ads_schema', \n default_database=target.database,\n default_schema='reddit_ads',\n default_variable=business_account_or_account,\n union_schema_variable='reddit_ads_union_schemas',\n union_database_variable='reddit_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='reddit_ads_sources',\n single_source_name='reddit_ads',\n single_table_name=business_account_or_account\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["reddit_ads", "business_account"], ["reddit_ads", "business_account"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.reddit_ads.reddit_ads.business_account"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/tmp/stg_reddit_ads__account_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: reddit_ads_business_account_identifier\n -- database: postgres \n -- schema: public\n -- identifier: reddit_ads_business_account_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"attribution_type\",\n \"click_attribution_window\",\n \"created_at\",\n \"currency\",\n \"status\",\n \"time_zone_id\",\n \"view_attribution_window\"\n from \"postgres\".\"public\".\"reddit_ads_business_account_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__campaign_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_tmp", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/tmp/stg_reddit_ads__campaign_tmp.sql", "original_file_path": "models/staging/tmp/stg_reddit_ads__campaign_tmp.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_tmp", "fqn": ["reddit_ads", "staging", "tmp", "stg_reddit_ads__campaign_tmp"], "alias": "stg_reddit_ads__campaign_tmp", "checksum": {"name": "sha256", "checksum": "61b9d5eab6a17819b65078c9c5a842656f5e339e14585e75ca2d99fb39bbcbc0"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450497.2528472, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\n{% if var('reddit_ads_union_schemas', []) | length > 0 or var('reddit_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign', \n database_variable='reddit_ads_database', \n schema_variable='reddit_ads_schema', \n default_database=target.database,\n default_schema='reddit_ads',\n default_variable='campaign',\n union_schema_variable='reddit_ads_union_schemas',\n union_database_variable='reddit_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='reddit_ads_sources',\n single_source_name='reddit_ads',\n single_table_name='campaign'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["reddit_ads", "campaign"], ["reddit_ads", "campaign"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.reddit_ads.reddit_ads.campaign"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/tmp/stg_reddit_ads__campaign_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: reddit_ads_campaign_identifier\n -- database: postgres \n -- schema: public\n -- identifier: reddit_ads_campaign_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"account_id\",\n \"configured_status\",\n \"effective_status\",\n \"funding_instrument_id\",\n \"is_processing\",\n \"name\",\n \"objective\"\n from \"postgres\".\"public\".\"reddit_ads_campaign_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__ad_group_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_group_report_tmp", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/tmp/stg_reddit_ads__ad_group_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_reddit_ads__ad_group_report_tmp.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__ad_group_report_tmp", "fqn": ["reddit_ads", "staging", "tmp", "stg_reddit_ads__ad_group_report_tmp"], "alias": "stg_reddit_ads__ad_group_report_tmp", "checksum": {"name": "sha256", "checksum": "3b222e54709a8f6a93a51df76ad58d3b9469c1c905f100f5ec80d635e059db73"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450497.2636688, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\n{% if var('reddit_ads_union_schemas', []) | length > 0 or var('reddit_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_group_report', \n database_variable='reddit_ads_database', \n schema_variable='reddit_ads_schema', \n default_database=target.database,\n default_schema='reddit_ads',\n default_variable='ad_group_report',\n union_schema_variable='reddit_ads_union_schemas',\n union_database_variable='reddit_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='reddit_ads_sources',\n single_source_name='reddit_ads',\n single_table_name='ad_group_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["reddit_ads", "ad_group_report"], ["reddit_ads", "ad_group_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.reddit_ads.reddit_ads.ad_group_report"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/tmp/stg_reddit_ads__ad_group_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: reddit_ads_ad_group_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: reddit_ads_ad_group_report_data\n\n\n select\n \"account_id\",\n \"ad_group_id\",\n \"date\",\n \"_fivetran_synced\",\n \"app_install_metrics_add_payment_info\",\n \"app_install_metrics_add_to_cart\",\n \"app_install_metrics_app_launch\",\n \"app_install_metrics_completed_tutorial\",\n \"app_install_metrics_install\",\n \"app_install_metrics_level_achieved\",\n \"app_install_metrics_purchase\",\n \"app_install_metrics_search\",\n \"app_install_metrics_sign_up\",\n \"app_install_metrics_spend\",\n \"app_install_metrics_spend_credits\",\n \"app_install_metrics_view_content\",\n \"clicks\",\n \"comment_downvotes\",\n \"comment_upvotes\",\n \"comments_page_views\",\n \"conversion_roas\",\n \"cpc\",\n \"ctr\",\n \"ecpm\",\n \"gallery_item_caption\",\n \"gallery_item_id\",\n \"impressions\",\n \"legacy_click_conversions_attribution_window_day\",\n \"legacy_click_conversions_attribution_window_month\",\n \"legacy_click_conversions_attribution_window_week\",\n \"legacy_view_conversions_attribution_window_day\",\n \"legacy_view_conversions_attribution_window_month\",\n \"legacy_view_conversions_attribution_window_week\",\n \"priority\",\n \"region\",\n \"spend\",\n \"video_fully_viewable_impressions\",\n \"video_plays_expanded\",\n \"video_plays_with_sound\",\n \"video_started\",\n \"video_viewable_impressions\",\n \"video_watched_100_percent\",\n \"video_watched_10_seconds\",\n \"video_watched_25_percent\",\n \"video_watched_3_seconds\",\n \"video_watched_50_percent\",\n \"video_watched_5_seconds\",\n \"video_watched_75_percent\",\n \"video_watched_95_percent\",\n \"viewable_impressions\",\n \"viewer_comments\"\n from \"postgres\".\"public\".\"reddit_ads_ad_group_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__account_conversions_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__account_conversions_report_tmp", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/tmp/stg_reddit_ads__account_conversions_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_reddit_ads__account_conversions_report_tmp.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__account_conversions_report_tmp", "fqn": ["reddit_ads", "staging", "tmp", "stg_reddit_ads__account_conversions_report_tmp"], "alias": "stg_reddit_ads__account_conversions_report_tmp", "checksum": {"name": "sha256", "checksum": "8627dc3199e97b24d1e2ca0cd9cb57a6ddfd656c81eb631c9125dad04ca004f7"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450497.276067, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account_conversions_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\n{% if var('reddit_ads_union_schemas', []) | length > 0 or var('reddit_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='account_conversions_report', \n database_variable='reddit_ads_database', \n schema_variable='reddit_ads_schema', \n default_database=target.database,\n default_schema='reddit_ads',\n default_variable='account_conversions_report',\n union_schema_variable='reddit_ads_union_schemas',\n union_database_variable='reddit_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='reddit_ads_sources',\n single_source_name='reddit_ads',\n single_table_name='account_conversions_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["reddit_ads", "account_conversions_report"], ["reddit_ads", "account_conversions_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.reddit_ads.reddit_ads.account_conversions_report"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/tmp/stg_reddit_ads__account_conversions_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: reddit_ads_account_conversions_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: reddit_ads_account_conversions\n\n\n select\n \"_fivetran_synced\",\n \"account_id\",\n \"avg_value\",\n \"click_through_conversion_attribution_window_day\",\n \"click_through_conversion_attribution_window_month\",\n \"click_through_conversion_attribution_window_week\",\n \"date\",\n \"event_name\",\n \"total_items\",\n \"total_value\",\n \"view_through_conversion_attribution_window_day\",\n \"view_through_conversion_attribution_window_month\",\n \"view_through_conversion_attribution_window_week\"\n from \"postgres\".\"public\".\"reddit_ads_account_conversions\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__ad_group_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_group_tmp", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/tmp/stg_reddit_ads__ad_group_tmp.sql", "original_file_path": "models/staging/tmp/stg_reddit_ads__ad_group_tmp.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__ad_group_tmp", "fqn": ["reddit_ads", "staging", "tmp", "stg_reddit_ads__ad_group_tmp"], "alias": "stg_reddit_ads__ad_group_tmp", "checksum": {"name": "sha256", "checksum": "8b21e40e629435d8873ccf083ad35839203ebffdbe7bd3f45d4707d08afde24a"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450497.286634, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\n{% if var('reddit_ads_union_schemas', []) | length > 0 or var('reddit_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_group', \n database_variable='reddit_ads_database', \n schema_variable='reddit_ads_schema', \n default_database=target.database,\n default_schema='reddit_ads',\n default_variable='ad_group',\n union_schema_variable='reddit_ads_union_schemas',\n union_database_variable='reddit_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='reddit_ads_sources',\n single_source_name='reddit_ads',\n single_table_name='ad_group'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["reddit_ads", "ad_group"], ["reddit_ads", "ad_group"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.reddit_ads.reddit_ads.ad_group"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/tmp/stg_reddit_ads__ad_group_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: reddit_ads_ad_group_identifier\n -- database: postgres \n -- schema: public\n -- identifier: reddit_ads_ad_group_data\n\n\n select\n \"account_id\",\n \"id\",\n \"_fivetran_synced\",\n \"bid_strategy\",\n \"bid_value\",\n \"campaign_id\",\n \"configured_status\",\n \"effective_status\",\n \"end_time\",\n \"expand_targeting\",\n \"goal_type\",\n \"goal_value\",\n \"is_processing\",\n \"name\",\n \"optimization_strategy_type\",\n \"start_time\"\n from \"postgres\".\"public\".\"reddit_ads_ad_group_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__campaign_conversions_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_conversions_report_tmp", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/tmp/stg_reddit_ads__campaign_conversions_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_reddit_ads__campaign_conversions_report_tmp.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_conversions_report_tmp", "fqn": ["reddit_ads", "staging", "tmp", "stg_reddit_ads__campaign_conversions_report_tmp"], "alias": "stg_reddit_ads__campaign_conversions_report_tmp", "checksum": {"name": "sha256", "checksum": "4f214ad86d990c74937b9569b743f6273cbf8fa6d6cefe1c6c561e9bf386fd19"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450497.2973535, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_conversions_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\n{% if var('reddit_ads_union_schemas', []) | length > 0 or var('reddit_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_conversions_report', \n database_variable='reddit_ads_database', \n schema_variable='reddit_ads_schema', \n default_database=target.database,\n default_schema='reddit_ads',\n default_variable='campaign_conversions_report',\n union_schema_variable='reddit_ads_union_schemas',\n union_database_variable='reddit_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='reddit_ads_sources',\n single_source_name='reddit_ads',\n single_table_name='campaign_conversions_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["reddit_ads", "campaign_conversions_report"], ["reddit_ads", "campaign_conversions_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.reddit_ads.reddit_ads.campaign_conversions_report"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/tmp/stg_reddit_ads__campaign_conversions_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: reddit_ads_campaign_conversions_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: reddit_ads_campaign_conversions\n\n\n select\n \"_fivetran_synced\",\n \"account_id\",\n \"avg_value\",\n \"campaign_id\",\n \"click_through_conversion_attribution_window_day\",\n \"click_through_conversion_attribution_window_month\",\n \"click_through_conversion_attribution_window_week\",\n \"date\",\n \"event_name\",\n \"total_items\",\n \"total_value\",\n \"view_through_conversion_attribution_window_day\",\n \"view_through_conversion_attribution_window_month\",\n \"view_through_conversion_attribution_window_week\"\n from \"postgres\".\"public\".\"reddit_ads_campaign_conversions\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__ad_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_report_tmp", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/tmp/stg_reddit_ads__ad_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_reddit_ads__ad_report_tmp.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__ad_report_tmp", "fqn": ["reddit_ads", "staging", "tmp", "stg_reddit_ads__ad_report_tmp"], "alias": "stg_reddit_ads__ad_report_tmp", "checksum": {"name": "sha256", "checksum": "49cfa2477a106e0483f1cbbbdf42fdc0a3dee26b18d627707eeb769768636ed6"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450497.3092473, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\n{% if var('reddit_ads_union_schemas', []) | length > 0 or var('reddit_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_report', \n database_variable='reddit_ads_database', \n schema_variable='reddit_ads_schema', \n default_database=target.database,\n default_schema='reddit_ads',\n default_variable='ad_report',\n union_schema_variable='reddit_ads_union_schemas',\n union_database_variable='reddit_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='reddit_ads_sources',\n single_source_name='reddit_ads',\n single_table_name='ad_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["reddit_ads", "ad_report"], ["reddit_ads", "ad_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.reddit_ads.reddit_ads.ad_report"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/tmp/stg_reddit_ads__ad_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: reddit_ads_ad_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: reddit_ads_ad_report_data\n\n\n select\n \"account_id\",\n \"ad_id\",\n \"date\",\n \"_fivetran_synced\",\n \"app_install_metrics_add_payment_info\",\n \"app_install_metrics_add_to_cart\",\n \"app_install_metrics_app_launch\",\n \"app_install_metrics_completed_tutorial\",\n \"app_install_metrics_install\",\n \"app_install_metrics_level_achieved\",\n \"app_install_metrics_purchase\",\n \"app_install_metrics_search\",\n \"app_install_metrics_sign_up\",\n \"app_install_metrics_spend\",\n \"app_install_metrics_spend_credits\",\n \"app_install_metrics_view_content\",\n \"clicks\",\n \"comment_downvotes\",\n \"comment_upvotes\",\n \"comments_page_views\",\n \"conversion_roas\",\n \"cpc\",\n \"ctr\",\n \"ecpm\",\n \"gallery_item_caption\",\n \"gallery_item_id\",\n \"impressions\",\n \"legacy_click_conversions_attribution_window_day\",\n \"legacy_click_conversions_attribution_window_month\",\n \"legacy_click_conversions_attribution_window_week\",\n \"legacy_view_conversions_attribution_window_day\",\n \"legacy_view_conversions_attribution_window_month\",\n \"legacy_view_conversions_attribution_window_week\",\n \"priority\",\n \"region\",\n \"spend\",\n \"video_fully_viewable_impressions\",\n \"video_plays_expanded\",\n \"video_plays_with_sound\",\n \"video_started\",\n \"video_viewable_impressions\",\n \"video_watched_100_percent\",\n \"video_watched_10_seconds\",\n \"video_watched_25_percent\",\n \"video_watched_3_seconds\",\n \"video_watched_50_percent\",\n \"video_watched_5_seconds\",\n \"video_watched_75_percent\",\n \"video_watched_95_percent\",\n \"viewable_impressions\",\n \"viewer_comments\"\n from \"postgres\".\"public\".\"reddit_ads_ad_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.snapchat_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__campaign_report", "resource_type": "model", "package_name": "snapchat_ads", "path": "snapchat_ads__campaign_report.sql", "original_file_path": "models/snapchat_ads__campaign_report.sql", "unique_id": "model.snapchat_ads.snapchat_ads__campaign_report", "fqn": ["snapchat_ads", "snapchat_ads__campaign_report"], "alias": "snapchat_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "c16377f005063037c79ffc522e938cf49cf800f1296aa9d5bc8973f113c96470"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Snapchat campaign.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_id": {"name": "ad_account_id", "description": "The ID of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_name": {"name": "ad_account_name", "description": "The name of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The currency used by the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the campaign in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the campaign had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes the campaign had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases for the campaign on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases for campaign on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "The total conversions being brought in the conversion fields you select in your `snapchat_ads__conversion_fields`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.2141783, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\nwith campaign_hourly as (\n\n select *,\n {% if var('snapchat_ads__conversion_fields', none) %}\n {{ var('snapchat_ads__conversion_fields') | join(' + ') }} as total_conversions\n {% else %}\n 0 as total_conversions\n {% endif %}\n from {{ ref('stg_snapchat_ads__campaign_hourly_report') }}\n\n), account as (\n\n select *\n from {{ ref('stg_snapchat_ads__ad_account_history') }}\n where is_most_recent_record = true\n\n), campaigns as (\n\n select *\n from {{ ref('stg_snapchat_ads__campaign_history') }}\n where is_most_recent_record = true\n\n\n), aggregated as (\n\n select\n campaign_hourly.source_relation,\n cast(campaign_hourly.date_hour as date) as date_day,\n account.ad_account_id,\n account.ad_account_name,\n campaign_hourly.campaign_id,\n campaigns.campaign_name,\n account.currency,\n sum(campaign_hourly.swipes) as swipes,\n sum(campaign_hourly.impressions) as impressions,\n round(sum(campaign_hourly.spend),2) as spend,\n sum(campaign_hourly.total_conversions) as total_conversions,\n round(cast(sum(campaign_hourly.conversion_purchases_value) as {{ dbt.type_numeric() }}), 2) as conversion_purchases_value\n\n {{ snapchat_ads_persist_pass_through_columns(pass_through_variable='snapchat_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='snapchat_ads__campaign_hourly_report_passthrough_metrics', exclude_fields=['conversion_purchases_value']) }}\n \n {{ snapchat_ads_persist_pass_through_columns(pass_through_variable='snapchat_ads__campaign_hourly_report_passthrough_metrics', transform='sum', exclude_fields=['conversion_purchases_value']) }}\n \n from campaign_hourly\n left join campaigns\n on campaign_hourly.campaign_id = campaigns.campaign_id\n and campaign_hourly.source_relation = campaigns.source_relation\n left join account\n on campaigns.ad_account_id = account.ad_account_id\n and campaigns.source_relation = account.source_relation\n \n {{ dbt_utils.group_by(7) }}\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_hourly_report", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_account_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.type_numeric", "macro.snapchat_ads.snapchat_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report", "model.snapchat_ads.stg_snapchat_ads__ad_account_history", "model.snapchat_ads.stg_snapchat_ads__campaign_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith campaign_hourly as (\n\n select *,\n \n conversion_purchases as total_conversions\n \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_hourly_report\"\n\n), account as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_account_history\"\n where is_most_recent_record = true\n\n), campaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_history\"\n where is_most_recent_record = true\n\n\n), aggregated as (\n\n select\n campaign_hourly.source_relation,\n cast(campaign_hourly.date_hour as date) as date_day,\n account.ad_account_id,\n account.ad_account_name,\n campaign_hourly.campaign_id,\n campaigns.campaign_name,\n account.currency,\n sum(campaign_hourly.swipes) as swipes,\n sum(campaign_hourly.impressions) as impressions,\n round(sum(campaign_hourly.spend),2) as spend,\n sum(campaign_hourly.total_conversions) as total_conversions,\n round(cast(sum(campaign_hourly.conversion_purchases_value) as numeric(28,6)), 2) as conversion_purchases_value\n\n \n\n\n\n \n \n\n\n\n \n\n\n\n \n \n \n \n , sum(coalesce(conversion_purchases, 0)) as conversion_purchases\n \n\n \n\n\n\n \n \n\n\n\n\n\n \n\n\n\n\n\n \n from campaign_hourly\n left join campaigns\n on campaign_hourly.campaign_id = campaigns.campaign_id\n and campaign_hourly.source_relation = campaigns.source_relation\n left join account\n on campaigns.ad_account_id = account.ad_account_id\n and campaigns.source_relation = account.source_relation\n \n group by 1,2,3,4,5,6,7\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.snapchat_ads__url_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__url_report", "resource_type": "model", "package_name": "snapchat_ads", "path": "snapchat_ads__url_report.sql", "original_file_path": "models/snapchat_ads__url_report.sql", "unique_id": "model.snapchat_ads.snapchat_ads__url_report", "fqn": ["snapchat_ads", "snapchat_ads__url_report"], "alias": "snapchat_ads__url_report", "checksum": {"name": "sha256", "checksum": "59837fd6d04c7817a570854f2c0d402c141a4a9b1e31bb831112280d24ead2b9"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of Snapchat ads that leverage urls.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_id": {"name": "ad_id", "description": "The ID of the ad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_squad_id": {"name": "ad_squad_id", "description": "The ID of the ad squad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_id": {"name": "ad_account_id", "description": "The ID of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_name": {"name": "ad_account_name", "description": "The name of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_name": {"name": "ad_name", "description": "The name of the ad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_squad_name": {"name": "ad_squad_name", "description": "The name of the ad squad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The currency used by the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the web_view_url.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_host": {"name": "url_host", "description": "The URL host of the ad, extracted from the web_view_url.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_path": {"name": "url_path", "description": "The URL path of the ad, extracted from the web_view_url.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_source": {"name": "utm_source", "description": "The utm_source parameter of the ad, extracted from the web_view_url.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_medium": {"name": "utm_medium", "description": "The utm_medium parameter of the ad, extracted from the web_view_url.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_campaign": {"name": "utm_campaign", "description": "The utm_campaign parameter of the ad, extracted from the web_view_url.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_content": {"name": "utm_content", "description": "The utm_content parameter of the ad, extracted from the web_view_url.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_term": {"name": "utm_term", "description": "The utm_term parameter of the ad, extracted from the web_view_url.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the ad in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases for an ad on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases for an ad on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "The total conversions being brought in the conversion fields you select in your `snapchat_ads__conversion_fields`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.2172818, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__url_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\nwith ad_hourly as (\n\n select *,\n {% if var('snapchat_ads__conversion_fields', none) %}\n {{ var('snapchat_ads__conversion_fields') | join(' + ') }} as total_conversions\n {% else %}\n 0 as total_conversions\n {% endif %}\n from {{ ref('stg_snapchat_ads__ad_hourly_report') }}\n\n), creatives as (\n\n select *\n from {{ ref('snapchat_ads__creative_history_prep') }}\n\n), account as (\n\n select *\n from {{ ref('stg_snapchat_ads__ad_account_history') }}\n where is_most_recent_record = true\n\n), ads as (\n\n select *\n from {{ ref('stg_snapchat_ads__ad_history') }}\n where is_most_recent_record = true\n\n), ad_squads as (\n\n select *\n from {{ ref('stg_snapchat_ads__ad_squad_history') }}\n where is_most_recent_record = true\n\n), campaigns as (\n\n select *\n from {{ ref('stg_snapchat_ads__campaign_history') }}\n where is_most_recent_record = true\n\n\n), aggregated as (\n\n select\n ad_hourly.source_relation,\n cast(ad_hourly.date_hour as date) as date_day,\n account.ad_account_id,\n account.ad_account_name,\n ad_hourly.ad_id,\n ads.ad_name,\n ad_squads.ad_squad_id,\n ad_squads.ad_squad_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n account.currency,\n creatives.base_url,\n creatives.url_host,\n creatives.url_path,\n creatives.utm_source,\n creatives.utm_medium,\n creatives.utm_campaign,\n creatives.utm_content,\n creatives.utm_term,\n sum(ad_hourly.swipes) as swipes,\n sum(ad_hourly.impressions) as impressions,\n round(sum(ad_hourly.spend),2) as spend,\n sum(ad_hourly.total_conversions) as total_conversions,\n round(cast(sum(ad_hourly.conversion_purchases_value) as {{ dbt.type_numeric() }}), 2) as conversion_purchases_value\n \n {{ snapchat_ads_persist_pass_through_columns(pass_through_variable='snapchat_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='snapchat_ads__ad_hourly_passthrough_metrics', exclude_fields=['conversion_purchases_value']) }}\n\n {{ snapchat_ads_persist_pass_through_columns(pass_through_variable='snapchat_ads__ad_hourly_passthrough_metrics', transform='sum', exclude_fields=['conversion_purchases_value']) }}\n \n from ad_hourly\n left join ads \n on ad_hourly.ad_id = ads.ad_id\n and ad_hourly.source_relation = ads.source_relation\n left join creatives\n on ads.creative_id = creatives.creative_id\n and ads.source_relation = creatives.source_relation\n left join ad_squads\n on ads.ad_squad_id = ad_squads.ad_squad_id\n and ads.source_relation = ad_squads.source_relation\n left join campaigns\n on ad_squads.campaign_id = campaigns.campaign_id\n and ad_squads.source_relation = campaigns.source_relation\n left join account\n on creatives.ad_account_id = account.ad_account_id\n and creatives.source_relation = account.source_relation\n\n {% if var('ad_reporting__url_report__using_null_filter', True) %}\n -- We only want utm ads to populate this report. Therefore, we filter where url ads are populated.\n where creatives.url is not null\n {% endif %}\n\n {{ dbt_utils.group_by(19) }}\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_hourly_report", "package": null, "version": null}, {"name": "snapchat_ads__creative_history_prep", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_account_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_squad_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.type_numeric", "macro.snapchat_ads.snapchat_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_hourly_report", "model.snapchat_ads.snapchat_ads__creative_history_prep", "model.snapchat_ads.stg_snapchat_ads__ad_account_history", "model.snapchat_ads.stg_snapchat_ads__ad_history", "model.snapchat_ads.stg_snapchat_ads__ad_squad_history", "model.snapchat_ads.stg_snapchat_ads__campaign_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat_ads__url_report.sql", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__snapchat_ads__creative_history_prep as (\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_history\"\n where is_most_recent_record = true\n\n), url_tags as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_url_tag_history\"\n where is_most_recent_record = true\n\n), url_tags_pivoted as (\n\n select \n source_relation,\n creative_id,\n min(case when param_key = 'utm_source' then param_value end) as utm_source,\n min(case when param_key = 'utm_medium' then param_value end) as utm_medium,\n min(case when param_key = 'utm_campaign' then param_value end) as utm_campaign,\n min(case when param_key = 'utm_content' then param_value end) as utm_content,\n min(case when param_key = 'utm_term' then param_value end) as utm_term\n from url_tags\n group by 1,2\n\n), fields as (\n\n select\n base.source_relation,\n base.creative_id,\n base.ad_account_id,\n base.creative_name,\n base.url,\n \n\n \n \n\n split_part(\n base.url,\n '?',\n 1\n )\n\n\n \n\n as base_url,\n \n \n cast(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n \n\n replace(\n \n\n replace(\n \n\n replace(\n base.url,\n 'android-app://',\n ''\n )\n\n\n,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n '/',\n 1\n )\n\n\n \n\n,\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_host,\n '/' || \n \n cast(\n\n \n \n\n split_part(\n \n\n right(\n \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n \n\n length(\n \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n )-coalesce(\n nullif(\n\n position(\n '/' in \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ), 0),\n \n\n position(\n '?' in \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ) - 1\n )\n ),\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_path,\n coalesce(url_tags_pivoted.utm_source, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_source=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_source,\n coalesce(url_tags_pivoted.utm_medium, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_medium=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_medium,\n coalesce(url_tags_pivoted.utm_campaign, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_campaign=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_campaign,\n coalesce(url_tags_pivoted.utm_content, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_content=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_content,\n coalesce(url_tags_pivoted.utm_term, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_term=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_term\n from base\n left join url_tags_pivoted\n on base.creative_id = url_tags_pivoted.creative_id\n and base.source_relation = url_tags_pivoted.source_relation\n\n)\n\nselect *\nfrom fields\n), ad_hourly as (\n\n select *,\n \n conversion_purchases as total_conversions\n \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_hourly_report\"\n\n), creatives as (\n\n select *\n from __dbt__cte__snapchat_ads__creative_history_prep\n\n), account as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_account_history\"\n where is_most_recent_record = true\n\n), ads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_history\"\n where is_most_recent_record = true\n\n), ad_squads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_history\"\n where is_most_recent_record = true\n\n), campaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_history\"\n where is_most_recent_record = true\n\n\n), aggregated as (\n\n select\n ad_hourly.source_relation,\n cast(ad_hourly.date_hour as date) as date_day,\n account.ad_account_id,\n account.ad_account_name,\n ad_hourly.ad_id,\n ads.ad_name,\n ad_squads.ad_squad_id,\n ad_squads.ad_squad_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n account.currency,\n creatives.base_url,\n creatives.url_host,\n creatives.url_path,\n creatives.utm_source,\n creatives.utm_medium,\n creatives.utm_campaign,\n creatives.utm_content,\n creatives.utm_term,\n sum(ad_hourly.swipes) as swipes,\n sum(ad_hourly.impressions) as impressions,\n round(sum(ad_hourly.spend),2) as spend,\n sum(ad_hourly.total_conversions) as total_conversions,\n round(cast(sum(ad_hourly.conversion_purchases_value) as numeric(28,6)), 2) as conversion_purchases_value\n \n \n\n\n\n \n \n\n\n\n \n\n\n\n \n \n \n \n , sum(coalesce(conversion_purchases, 0)) as conversion_purchases\n \n\n \n\n\n\n\n \n\n\n\n\n\n \n\n\n\n\n\n \n from ad_hourly\n left join ads \n on ad_hourly.ad_id = ads.ad_id\n and ad_hourly.source_relation = ads.source_relation\n left join creatives\n on ads.creative_id = creatives.creative_id\n and ads.source_relation = creatives.source_relation\n left join ad_squads\n on ads.ad_squad_id = ad_squads.ad_squad_id\n and ads.source_relation = ad_squads.source_relation\n left join campaigns\n on ad_squads.campaign_id = campaigns.campaign_id\n and ad_squads.source_relation = campaigns.source_relation\n left join account\n on creatives.ad_account_id = account.ad_account_id\n and creatives.source_relation = account.source_relation\n\n \n -- We only want utm ads to populate this report. Therefore, we filter where url ads are populated.\n where creatives.url is not null\n \n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.snapchat_ads.snapchat_ads__creative_history_prep", "sql": " __dbt__cte__snapchat_ads__creative_history_prep as (\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_history\"\n where is_most_recent_record = true\n\n), url_tags as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_url_tag_history\"\n where is_most_recent_record = true\n\n), url_tags_pivoted as (\n\n select \n source_relation,\n creative_id,\n min(case when param_key = 'utm_source' then param_value end) as utm_source,\n min(case when param_key = 'utm_medium' then param_value end) as utm_medium,\n min(case when param_key = 'utm_campaign' then param_value end) as utm_campaign,\n min(case when param_key = 'utm_content' then param_value end) as utm_content,\n min(case when param_key = 'utm_term' then param_value end) as utm_term\n from url_tags\n group by 1,2\n\n), fields as (\n\n select\n base.source_relation,\n base.creative_id,\n base.ad_account_id,\n base.creative_name,\n base.url,\n \n\n \n \n\n split_part(\n base.url,\n '?',\n 1\n )\n\n\n \n\n as base_url,\n \n \n cast(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n \n\n replace(\n \n\n replace(\n \n\n replace(\n base.url,\n 'android-app://',\n ''\n )\n\n\n,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n '/',\n 1\n )\n\n\n \n\n,\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_host,\n '/' || \n \n cast(\n\n \n \n\n split_part(\n \n\n right(\n \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n \n\n length(\n \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n )-coalesce(\n nullif(\n\n position(\n '/' in \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ), 0),\n \n\n position(\n '?' in \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ) - 1\n )\n ),\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_path,\n coalesce(url_tags_pivoted.utm_source, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_source=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_source,\n coalesce(url_tags_pivoted.utm_medium, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_medium=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_medium,\n coalesce(url_tags_pivoted.utm_campaign, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_campaign=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_campaign,\n coalesce(url_tags_pivoted.utm_content, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_content=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_content,\n coalesce(url_tags_pivoted.utm_term, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_term=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_term\n from base\n left join url_tags_pivoted\n on base.creative_id = url_tags_pivoted.creative_id\n and base.source_relation = url_tags_pivoted.source_relation\n\n)\n\nselect *\nfrom fields\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.snapchat_ads__campaign_country_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__campaign_country_report", "resource_type": "model", "package_name": "snapchat_ads", "path": "snapchat_ads__campaign_country_report.sql", "original_file_path": "models/snapchat_ads__campaign_country_report.sql", "unique_id": "model.snapchat_ads.snapchat_ads__campaign_country_report", "fqn": ["snapchat_ads", "snapchat_ads__campaign_country_report"], "alias": "snapchat_ads__campaign_country_report", "checksum": {"name": "sha256", "checksum": "4d6042fcce9a1ef51c7de16dd8e2c33bea4172b631d95d26fc4b5372963351b2"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Snapchat campaign per country.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country": {"name": "country", "description": "The country where the campaign was delivered.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_id": {"name": "ad_account_id", "description": "The ID of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_name": {"name": "ad_account_name", "description": "The name of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The currency used by the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the campaign in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the campaign had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes the campaign had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "Number of times components of the campaign were shared.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "saves": {"name": "saves", "description": "Number of times components of the campaign were saved to Memories.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "The total conversions being brought in the conversion fields you select in your `snapchat_ads__conversion_fields`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases for the campaign on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases for the campaign on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the campaign was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_daily_budget": {"name": "campaign_daily_budget", "description": "Daily spend cap for the campaign (converted from microcurrency).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_time": {"name": "start_time", "description": "The start time of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_time": {"name": "end_time", "description": "The end time of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Campaign status (e.g., ACTIVE, PAUSED, ARCHIVED).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective": {"name": "objective", "description": "The objective of the campaign (e.g., BRAND_AWARENESS, APP_INSTALL, etc.).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_lifetime_spend_cap": {"name": "campaign_lifetime_spend_cap", "description": "Lifetime spend cap for the campaign (converted from microcurrency).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.2202468, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_country_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true) and var('snapchat_ads__using_campaign_country_report', false)) }}\n\nwith campaign_daily as (\n\n select *,\n {% if var('snapchat_ads__conversion_fields', none) %}\n {{ var('snapchat_ads__conversion_fields') | join(' + ') }} as total_conversions\n {% else %}\n 0 as total_conversions\n {% endif %}\n from {{ ref('stg_snapchat_ads__campaign_geo_country_daily_report') }}\n\n), account as (\n\n select *\n from {{ ref('stg_snapchat_ads__ad_account_history') }}\n where is_most_recent_record = true\n\n), campaigns as (\n\n select *\n from {{ ref('stg_snapchat_ads__campaign_history') }}\n where is_most_recent_record = true\n\n\n), aggregated as (\n\n select\n campaign_daily.source_relation,\n campaign_daily.date_day,\n campaign_daily.campaign_id,\n campaigns.campaign_name,\n campaign_daily.country,\n account.ad_account_id,\n account.ad_account_name,\n campaigns.created_at,\n campaigns.daily_budget as campaign_daily_budget,\n campaigns.start_time,\n campaigns.end_time,\n campaigns.status,\n campaigns.objective,\n campaigns.lifetime_spend_cap as campaign_lifetime_spend_cap,\n account.currency,\n sum(campaign_daily.swipes) as swipes,\n sum(campaign_daily.impressions) as impressions,\n round(sum(campaign_daily.spend),2) as spend,\n sum(campaign_daily.shares) as shares,\n sum(campaign_daily.saves) as saves,\n sum(campaign_daily.total_conversions) as total_conversions,\n round(cast(sum(campaign_daily.conversion_purchases_value) as {{ dbt.type_numeric() }}), 2) as conversion_purchases_value\n\n {{ snapchat_ads_persist_pass_through_columns(pass_through_variable='snapchat_ads__conversion_fields', transform='sum', coalesce_with=0) }}\n \n {{ snapchat_ads_persist_pass_through_columns(pass_through_variable='snapchat_ads__campaign_daily_country_report_passthrough_metrics', transform='sum') }}\n\n from campaign_daily\n left join campaigns\n on campaign_daily.campaign_id = campaigns.campaign_id\n and campaign_daily.source_relation = campaigns.source_relation\n left join account\n on campaigns.ad_account_id = account.ad_account_id\n and campaigns.source_relation = account.source_relation\n\n {{ dbt_utils.group_by(15) }}\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_geo_country_daily_report", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_account_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.type_numeric", "macro.snapchat_ads.snapchat_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report", "model.snapchat_ads.stg_snapchat_ads__ad_account_history", "model.snapchat_ads.stg_snapchat_ads__campaign_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat_ads__campaign_country_report.sql", "compiled": true, "compiled_code": "\n\nwith campaign_daily as (\n\n select *,\n \n conversion_purchases as total_conversions\n \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_geo_country_daily_report\"\n\n), account as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_account_history\"\n where is_most_recent_record = true\n\n), campaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_history\"\n where is_most_recent_record = true\n\n\n), aggregated as (\n\n select\n campaign_daily.source_relation,\n campaign_daily.date_day,\n campaign_daily.campaign_id,\n campaigns.campaign_name,\n campaign_daily.country,\n account.ad_account_id,\n account.ad_account_name,\n campaigns.created_at,\n campaigns.daily_budget as campaign_daily_budget,\n campaigns.start_time,\n campaigns.end_time,\n campaigns.status,\n campaigns.objective,\n campaigns.lifetime_spend_cap as campaign_lifetime_spend_cap,\n account.currency,\n sum(campaign_daily.swipes) as swipes,\n sum(campaign_daily.impressions) as impressions,\n round(sum(campaign_daily.spend),2) as spend,\n sum(campaign_daily.shares) as shares,\n sum(campaign_daily.saves) as saves,\n sum(campaign_daily.total_conversions) as total_conversions,\n round(cast(sum(campaign_daily.conversion_purchases_value) as numeric(28,6)), 2) as conversion_purchases_value\n\n \n\n\n\n\n\n\n\n \n \n \n \n , sum(coalesce(conversion_purchases, 0)) as conversion_purchases\n \n\n \n\n\n\n \n \n\n\n\n\n\n\n\n\n\n\n from campaign_daily\n left join campaigns\n on campaign_daily.campaign_id = campaigns.campaign_id\n and campaign_daily.source_relation = campaigns.source_relation\n left join account\n on campaigns.ad_account_id = account.ad_account_id\n and campaigns.source_relation = account.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.snapchat_ads__campaign_region_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__campaign_region_report", "resource_type": "model", "package_name": "snapchat_ads", "path": "snapchat_ads__campaign_region_report.sql", "original_file_path": "models/snapchat_ads__campaign_region_report.sql", "unique_id": "model.snapchat_ads.snapchat_ads__campaign_region_report", "fqn": ["snapchat_ads", "snapchat_ads__campaign_region_report"], "alias": "snapchat_ads__campaign_region_report", "checksum": {"name": "sha256", "checksum": "5b82a098a34660cde64027d76eb0402f6dfc683516cf488a6fa747b5f7e03785"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Snapchat campaign per region.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "region": {"name": "region", "description": "The region where the campaign was delivered.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_id": {"name": "ad_account_id", "description": "The ID of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_name": {"name": "ad_account_name", "description": "The name of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The currency used by the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the campaign in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the campaign had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes the campaign had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "Number of times components of the campaign were shared.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "saves": {"name": "saves", "description": "Number of times components of the campaign were saved to Memories.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "The total conversions being brought in the conversion fields you select in your `snapchat_ads__conversion_fields`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases for the campaign on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases for the campaign on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the campaign was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_daily_budget": {"name": "campaign_daily_budget", "description": "Daily spend cap for the campaign (converted from microcurrency).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_time": {"name": "start_time", "description": "The start time of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_time": {"name": "end_time", "description": "The end time of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Campaign status (e.g., ACTIVE, PAUSED, ARCHIVED).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective": {"name": "objective", "description": "The objective of the campaign (e.g., BRAND_AWARENESS, APP_INSTALL, etc.).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_lifetime_spend_cap": {"name": "campaign_lifetime_spend_cap", "description": "Lifetime spend cap for the campaign (converted from microcurrency).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.221879, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_region_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true) and var('snapchat_ads__using_campaign_region_report', false)) }}\n\nwith campaign_daily as (\n\n select *,\n {% if var('snapchat_ads__conversion_fields', none) %}\n {{ var('snapchat_ads__conversion_fields') | join(' + ') }} as total_conversions\n {% else %}\n 0 as total_conversions\n {% endif %}\n from {{ ref('stg_snapchat_ads__campaign_geo_region_daily_report') }}\n\n), account as (\n\n select *\n from {{ ref('stg_snapchat_ads__ad_account_history') }}\n where is_most_recent_record = true\n\n), campaigns as (\n\n select *\n from {{ ref('stg_snapchat_ads__campaign_history') }}\n where is_most_recent_record = true\n\n\n), aggregated as (\n\n select\n campaign_daily.source_relation,\n campaign_daily.date_day,\n campaign_daily.campaign_id,\n campaigns.campaign_name,\n campaign_daily.region,\n account.ad_account_id,\n account.ad_account_name,\n campaigns.created_at,\n campaigns.daily_budget as campaign_daily_budget,\n campaigns.start_time,\n campaigns.end_time,\n campaigns.status,\n campaigns.objective,\n campaigns.lifetime_spend_cap as campaign_lifetime_spend_cap,\n account.currency,\n sum(campaign_daily.swipes) as swipes,\n sum(campaign_daily.impressions) as impressions,\n round(sum(campaign_daily.spend),2) as spend,\n sum(campaign_daily.shares) as shares,\n sum(campaign_daily.saves) as saves,\n sum(campaign_daily.total_conversions) as total_conversions,\n round(cast(sum(campaign_daily.conversion_purchases_value) as {{ dbt.type_numeric() }}), 2) as conversion_purchases_value\n\n {{ snapchat_ads_persist_pass_through_columns(pass_through_variable='snapchat_ads__conversion_fields', transform='sum', coalesce_with=0) }}\n \n {{ snapchat_ads_persist_pass_through_columns(pass_through_variable='snapchat_ads__campaign_daily_region_report_passthrough_metrics', transform='sum') }}\n \n from campaign_daily\n left join campaigns\n on campaign_daily.campaign_id = campaigns.campaign_id\n and campaign_daily.source_relation = campaigns.source_relation\n left join account\n on campaigns.ad_account_id = account.ad_account_id\n and campaigns.source_relation = account.source_relation\n \n {{ dbt_utils.group_by(15) }}\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_geo_region_daily_report", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_account_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.type_numeric", "macro.snapchat_ads.snapchat_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report", "model.snapchat_ads.stg_snapchat_ads__ad_account_history", "model.snapchat_ads.stg_snapchat_ads__campaign_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat_ads__campaign_region_report.sql", "compiled": true, "compiled_code": "\n\nwith campaign_daily as (\n\n select *,\n \n conversion_purchases as total_conversions\n \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_geo_region_daily_report\"\n\n), account as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_account_history\"\n where is_most_recent_record = true\n\n), campaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_history\"\n where is_most_recent_record = true\n\n\n), aggregated as (\n\n select\n campaign_daily.source_relation,\n campaign_daily.date_day,\n campaign_daily.campaign_id,\n campaigns.campaign_name,\n campaign_daily.region,\n account.ad_account_id,\n account.ad_account_name,\n campaigns.created_at,\n campaigns.daily_budget as campaign_daily_budget,\n campaigns.start_time,\n campaigns.end_time,\n campaigns.status,\n campaigns.objective,\n campaigns.lifetime_spend_cap as campaign_lifetime_spend_cap,\n account.currency,\n sum(campaign_daily.swipes) as swipes,\n sum(campaign_daily.impressions) as impressions,\n round(sum(campaign_daily.spend),2) as spend,\n sum(campaign_daily.shares) as shares,\n sum(campaign_daily.saves) as saves,\n sum(campaign_daily.total_conversions) as total_conversions,\n round(cast(sum(campaign_daily.conversion_purchases_value) as numeric(28,6)), 2) as conversion_purchases_value\n\n \n\n\n\n\n\n\n\n \n \n \n \n , sum(coalesce(conversion_purchases, 0)) as conversion_purchases\n \n\n \n\n\n\n \n \n\n\n\n\n\n\n\n\n\n \n from campaign_daily\n left join campaigns\n on campaign_daily.campaign_id = campaigns.campaign_id\n and campaign_daily.source_relation = campaigns.source_relation\n left join account\n on campaigns.ad_account_id = account.ad_account_id\n and campaigns.source_relation = account.source_relation\n \n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.snapchat_ads__ad_squad_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__ad_squad_report", "resource_type": "model", "package_name": "snapchat_ads", "path": "snapchat_ads__ad_squad_report.sql", "original_file_path": "models/snapchat_ads__ad_squad_report.sql", "unique_id": "model.snapchat_ads.snapchat_ads__ad_squad_report", "fqn": ["snapchat_ads", "snapchat_ads__ad_squad_report"], "alias": "snapchat_ads__ad_squad_report", "checksum": {"name": "sha256", "checksum": "e3429475af588de41f1b42e2dcbc8ba7bb8073de12ee49902b64aee5ea5e89dd"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Snapchat ad squad.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_squad_id": {"name": "ad_squad_id", "description": "The ID of the ad squad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_id": {"name": "ad_account_id", "description": "The ID of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_name": {"name": "ad_account_name", "description": "The name of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_squad_name": {"name": "ad_squad_name", "description": "The name of the ad squad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The currency used by the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the ad squad in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the ad squad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes the ad squad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases for an ad squad on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases for an ad squad on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "The total conversions being brought in the conversion fields you select in your `snapchat_ads__conversion_fields`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.215533, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__ad_squad_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\nwith ad_squad_hourly as (\n\n select *,\n {% if var('snapchat_ads__conversion_fields', none) %}\n {{ var('snapchat_ads__conversion_fields') | join(' + ') }} as total_conversions\n {% else %}\n 0 as total_conversions\n {% endif %}\n from {{ ref('stg_snapchat_ads__ad_squad_hourly_report') }}\n\n), account as (\n\n select *\n from {{ ref('stg_snapchat_ads__ad_account_history') }}\n where is_most_recent_record = true\n\n), ad_squads as (\n\n select *\n from {{ ref('stg_snapchat_ads__ad_squad_history') }}\n where is_most_recent_record = true\n\n), campaigns as (\n\n select *\n from {{ ref('stg_snapchat_ads__campaign_history') }}\n where is_most_recent_record = true\n\n\n), aggregated as (\n\n select\n ad_squad_hourly.source_relation,\n cast(ad_squad_hourly.date_hour as date) as date_day,\n account.ad_account_id,\n account.ad_account_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n ad_squad_hourly.ad_squad_id,\n ad_squads.ad_squad_name,\n account.currency,\n sum(ad_squad_hourly.swipes) as swipes,\n sum(ad_squad_hourly.impressions) as impressions,\n round(sum(ad_squad_hourly.spend),2) as spend,\n sum(ad_squad_hourly.total_conversions) as total_conversions,\n round(cast(sum(ad_squad_hourly.conversion_purchases_value) as {{ dbt.type_numeric() }}), 2) as conversion_purchases_value\n\n {{ snapchat_ads_persist_pass_through_columns(pass_through_variable='snapchat_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='snapchat_ads__ad_squad_hourly_passthrough_metrics', exclude_fields=['conversion_purchases_value']) }}\n \n {{ snapchat_ads_persist_pass_through_columns(pass_through_variable='snapchat_ads__ad_squad_hourly_passthrough_metrics', transform='sum', exclude_fields=['conversion_purchases_value']) }}\n\n from ad_squad_hourly\n left join ad_squads\n on ad_squad_hourly.ad_squad_id = ad_squads.ad_squad_id\n and ad_squad_hourly.source_relation = ad_squads.source_relation\n left join campaigns\n on ad_squads.campaign_id = campaigns.campaign_id\n and ad_squads.source_relation = campaigns.source_relation\n left join account\n on campaigns.ad_account_id = account.ad_account_id\n and campaigns.source_relation = account.source_relation\n \n {{ dbt_utils.group_by(9) }}\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_squad_hourly_report", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_account_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_squad_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.type_numeric", "macro.snapchat_ads.snapchat_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report", "model.snapchat_ads.stg_snapchat_ads__ad_account_history", "model.snapchat_ads.stg_snapchat_ads__ad_squad_history", "model.snapchat_ads.stg_snapchat_ads__campaign_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat_ads__ad_squad_report.sql", "compiled": true, "compiled_code": "\n\nwith ad_squad_hourly as (\n\n select *,\n \n conversion_purchases as total_conversions\n \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_hourly_report\"\n\n), account as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_account_history\"\n where is_most_recent_record = true\n\n), ad_squads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_history\"\n where is_most_recent_record = true\n\n), campaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_history\"\n where is_most_recent_record = true\n\n\n), aggregated as (\n\n select\n ad_squad_hourly.source_relation,\n cast(ad_squad_hourly.date_hour as date) as date_day,\n account.ad_account_id,\n account.ad_account_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n ad_squad_hourly.ad_squad_id,\n ad_squads.ad_squad_name,\n account.currency,\n sum(ad_squad_hourly.swipes) as swipes,\n sum(ad_squad_hourly.impressions) as impressions,\n round(sum(ad_squad_hourly.spend),2) as spend,\n sum(ad_squad_hourly.total_conversions) as total_conversions,\n round(cast(sum(ad_squad_hourly.conversion_purchases_value) as numeric(28,6)), 2) as conversion_purchases_value\n\n \n\n\n\n \n \n\n\n\n \n\n\n\n \n \n \n \n , sum(coalesce(conversion_purchases, 0)) as conversion_purchases\n \n\n \n\n\n\n \n \n\n\n\n\n\n \n\n\n\n\n\n\n from ad_squad_hourly\n left join ad_squads\n on ad_squad_hourly.ad_squad_id = ad_squads.ad_squad_id\n and ad_squad_hourly.source_relation = ad_squads.source_relation\n left join campaigns\n on ad_squads.campaign_id = campaigns.campaign_id\n and ad_squads.source_relation = campaigns.source_relation\n left join account\n on campaigns.ad_account_id = account.ad_account_id\n and campaigns.source_relation = account.source_relation\n \n group by 1,2,3,4,5,6,7,8,9\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.snapchat_ads__ad_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__ad_report", "resource_type": "model", "package_name": "snapchat_ads", "path": "snapchat_ads__ad_report.sql", "original_file_path": "models/snapchat_ads__ad_report.sql", "unique_id": "model.snapchat_ads.snapchat_ads__ad_report", "fqn": ["snapchat_ads", "snapchat_ads__ad_report"], "alias": "snapchat_ads__ad_report", "checksum": {"name": "sha256", "checksum": "ff7dac356172cc09474fda0ad12780fdd28137a260773a16b469a8e292a12923"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Snapchat ad account.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_id": {"name": "ad_id", "description": "The ID of the ad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_id": {"name": "ad_account_id", "description": "The ID of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_name": {"name": "ad_account_name", "description": "The name of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_name": {"name": "ad_name", "description": "The name of the ad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_squad_id": {"name": "ad_squad_id", "description": "The ID of the ad squad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_squad_name": {"name": "ad_squad_name", "description": "The name of the ad squad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The currency used by the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the ad in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases for an ad on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases for an ad on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "The total conversions being brought in the conversion fields you select in your `snapchat_ads__conversion_fields`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.2129607, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__ad_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\nwith ad_hourly as (\n\n select *,\n {% if var('snapchat_ads__conversion_fields', none) %}\n {{ var('snapchat_ads__conversion_fields') | join(' + ') }} as total_conversions\n {% else %}\n 0 as total_conversions\n {% endif %}\n from {{ ref('stg_snapchat_ads__ad_hourly_report') }}\n\n), creatives as (\n\n select *\n from {{ ref('snapchat_ads__creative_history_prep') }}\n\n), account as (\n\n select *\n from {{ ref('stg_snapchat_ads__ad_account_history') }}\n where is_most_recent_record = true\n\n), ads as (\n\n select *\n from {{ ref('stg_snapchat_ads__ad_history') }}\n where is_most_recent_record = true\n\n), ad_squads as (\n\n select *\n from {{ ref('stg_snapchat_ads__ad_squad_history') }}\n where is_most_recent_record = true\n\n), campaigns as (\n\n select *\n from {{ ref('stg_snapchat_ads__campaign_history') }}\n where is_most_recent_record = true\n\n\n), aggregated as (\n\n select\n ad_hourly.source_relation,\n cast(ad_hourly.date_hour as date) as date_day,\n account.ad_account_id,\n account.ad_account_name,\n ad_hourly.ad_id,\n ads.ad_name,\n ad_squads.ad_squad_id,\n ad_squads.ad_squad_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n account.currency,\n sum(ad_hourly.swipes) as swipes,\n sum(ad_hourly.impressions) as impressions,\n round(sum(ad_hourly.spend),2) as spend,\n sum(ad_hourly.total_conversions) as total_conversions,\n round(cast(sum(ad_hourly.conversion_purchases_value) as {{ dbt.type_numeric() }}), 2) as conversion_purchases_value\n\n {{ snapchat_ads_persist_pass_through_columns(pass_through_variable='snapchat_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='snapchat_ads__ad_hourly_passthrough_metrics', exclude_fields=['conversion_purchases_value']) }}\n\n {{ snapchat_ads_persist_pass_through_columns(pass_through_variable='snapchat_ads__ad_hourly_passthrough_metrics', transform='sum', exclude_fields=['conversion_purchases_value']) }}\n\n from ad_hourly\n left join ads \n on ad_hourly.ad_id = ads.ad_id\n and ad_hourly.source_relation = ads.source_relation\n left join creatives\n on ads.creative_id = creatives.creative_id\n and ads.source_relation = creatives.source_relation\n left join account\n on creatives.ad_account_id = account.ad_account_id\n and creatives.source_relation = account.source_relation\n left join ad_squads\n on ads.ad_squad_id = ad_squads.ad_squad_id\n and ads.source_relation = ad_squads.source_relation\n left join campaigns\n on ad_squads.campaign_id = campaigns.campaign_id\n and ad_squads.source_relation = campaigns.source_relation\n \n {{ dbt_utils.group_by(11) }}\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_hourly_report", "package": null, "version": null}, {"name": "snapchat_ads__creative_history_prep", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_account_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_squad_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.type_numeric", "macro.snapchat_ads.snapchat_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_hourly_report", "model.snapchat_ads.snapchat_ads__creative_history_prep", "model.snapchat_ads.stg_snapchat_ads__ad_account_history", "model.snapchat_ads.stg_snapchat_ads__ad_history", "model.snapchat_ads.stg_snapchat_ads__ad_squad_history", "model.snapchat_ads.stg_snapchat_ads__campaign_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat_ads__ad_report.sql", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__snapchat_ads__creative_history_prep as (\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_history\"\n where is_most_recent_record = true\n\n), url_tags as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_url_tag_history\"\n where is_most_recent_record = true\n\n), url_tags_pivoted as (\n\n select \n source_relation,\n creative_id,\n min(case when param_key = 'utm_source' then param_value end) as utm_source,\n min(case when param_key = 'utm_medium' then param_value end) as utm_medium,\n min(case when param_key = 'utm_campaign' then param_value end) as utm_campaign,\n min(case when param_key = 'utm_content' then param_value end) as utm_content,\n min(case when param_key = 'utm_term' then param_value end) as utm_term\n from url_tags\n group by 1,2\n\n), fields as (\n\n select\n base.source_relation,\n base.creative_id,\n base.ad_account_id,\n base.creative_name,\n base.url,\n \n\n \n \n\n split_part(\n base.url,\n '?',\n 1\n )\n\n\n \n\n as base_url,\n \n \n cast(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n \n\n replace(\n \n\n replace(\n \n\n replace(\n base.url,\n 'android-app://',\n ''\n )\n\n\n,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n '/',\n 1\n )\n\n\n \n\n,\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_host,\n '/' || \n \n cast(\n\n \n \n\n split_part(\n \n\n right(\n \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n \n\n length(\n \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n )-coalesce(\n nullif(\n\n position(\n '/' in \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ), 0),\n \n\n position(\n '?' in \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ) - 1\n )\n ),\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_path,\n coalesce(url_tags_pivoted.utm_source, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_source=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_source,\n coalesce(url_tags_pivoted.utm_medium, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_medium=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_medium,\n coalesce(url_tags_pivoted.utm_campaign, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_campaign=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_campaign,\n coalesce(url_tags_pivoted.utm_content, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_content=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_content,\n coalesce(url_tags_pivoted.utm_term, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_term=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_term\n from base\n left join url_tags_pivoted\n on base.creative_id = url_tags_pivoted.creative_id\n and base.source_relation = url_tags_pivoted.source_relation\n\n)\n\nselect *\nfrom fields\n), ad_hourly as (\n\n select *,\n \n conversion_purchases as total_conversions\n \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_hourly_report\"\n\n), creatives as (\n\n select *\n from __dbt__cte__snapchat_ads__creative_history_prep\n\n), account as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_account_history\"\n where is_most_recent_record = true\n\n), ads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_history\"\n where is_most_recent_record = true\n\n), ad_squads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_history\"\n where is_most_recent_record = true\n\n), campaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_history\"\n where is_most_recent_record = true\n\n\n), aggregated as (\n\n select\n ad_hourly.source_relation,\n cast(ad_hourly.date_hour as date) as date_day,\n account.ad_account_id,\n account.ad_account_name,\n ad_hourly.ad_id,\n ads.ad_name,\n ad_squads.ad_squad_id,\n ad_squads.ad_squad_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n account.currency,\n sum(ad_hourly.swipes) as swipes,\n sum(ad_hourly.impressions) as impressions,\n round(sum(ad_hourly.spend),2) as spend,\n sum(ad_hourly.total_conversions) as total_conversions,\n round(cast(sum(ad_hourly.conversion_purchases_value) as numeric(28,6)), 2) as conversion_purchases_value\n\n \n\n\n\n \n \n\n\n\n \n\n\n\n \n \n \n \n , sum(coalesce(conversion_purchases, 0)) as conversion_purchases\n \n\n \n\n\n\n\n \n\n\n\n\n\n \n\n\n\n\n\n\n from ad_hourly\n left join ads \n on ad_hourly.ad_id = ads.ad_id\n and ad_hourly.source_relation = ads.source_relation\n left join creatives\n on ads.creative_id = creatives.creative_id\n and ads.source_relation = creatives.source_relation\n left join account\n on creatives.ad_account_id = account.ad_account_id\n and creatives.source_relation = account.source_relation\n left join ad_squads\n on ads.ad_squad_id = ad_squads.ad_squad_id\n and ads.source_relation = ad_squads.source_relation\n left join campaigns\n on ad_squads.campaign_id = campaigns.campaign_id\n and ad_squads.source_relation = campaigns.source_relation\n \n group by 1,2,3,4,5,6,7,8,9,10,11\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.snapchat_ads.snapchat_ads__creative_history_prep", "sql": " __dbt__cte__snapchat_ads__creative_history_prep as (\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_history\"\n where is_most_recent_record = true\n\n), url_tags as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_url_tag_history\"\n where is_most_recent_record = true\n\n), url_tags_pivoted as (\n\n select \n source_relation,\n creative_id,\n min(case when param_key = 'utm_source' then param_value end) as utm_source,\n min(case when param_key = 'utm_medium' then param_value end) as utm_medium,\n min(case when param_key = 'utm_campaign' then param_value end) as utm_campaign,\n min(case when param_key = 'utm_content' then param_value end) as utm_content,\n min(case when param_key = 'utm_term' then param_value end) as utm_term\n from url_tags\n group by 1,2\n\n), fields as (\n\n select\n base.source_relation,\n base.creative_id,\n base.ad_account_id,\n base.creative_name,\n base.url,\n \n\n \n \n\n split_part(\n base.url,\n '?',\n 1\n )\n\n\n \n\n as base_url,\n \n \n cast(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n \n\n replace(\n \n\n replace(\n \n\n replace(\n base.url,\n 'android-app://',\n ''\n )\n\n\n,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n '/',\n 1\n )\n\n\n \n\n,\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_host,\n '/' || \n \n cast(\n\n \n \n\n split_part(\n \n\n right(\n \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n \n\n length(\n \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n )-coalesce(\n nullif(\n\n position(\n '/' in \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ), 0),\n \n\n position(\n '?' in \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ) - 1\n )\n ),\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_path,\n coalesce(url_tags_pivoted.utm_source, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_source=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_source,\n coalesce(url_tags_pivoted.utm_medium, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_medium=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_medium,\n coalesce(url_tags_pivoted.utm_campaign, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_campaign=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_campaign,\n coalesce(url_tags_pivoted.utm_content, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_content=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_content,\n coalesce(url_tags_pivoted.utm_term, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_term=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_term\n from base\n left join url_tags_pivoted\n on base.creative_id = url_tags_pivoted.creative_id\n and base.source_relation = url_tags_pivoted.source_relation\n\n)\n\nselect *\nfrom fields\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.snapchat_ads__account_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__account_report", "resource_type": "model", "package_name": "snapchat_ads", "path": "snapchat_ads__account_report.sql", "original_file_path": "models/snapchat_ads__account_report.sql", "unique_id": "model.snapchat_ads.snapchat_ads__account_report", "fqn": ["snapchat_ads", "snapchat_ads__account_report"], "alias": "snapchat_ads__account_report", "checksum": {"name": "sha256", "checksum": "91096e7014d0e95f63e59278afd05f37c79262e7c12f4f4f489b4c5d60abeade"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Snapchat ad account.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_id": {"name": "ad_account_id", "description": "The ID of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_name": {"name": "ad_account_name", "description": "The name of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The currency used by the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend for the account on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions for the account on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes for the account on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases for the account on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases for the account on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "The total conversions being brought in the conversion fields you select in your `snapchat_ads__conversion_fields`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.2097769, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__account_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\nwith ad_hourly as (\n\n select *,\n {% if var('snapchat_ads__conversion_fields', none) %}\n {{ var('snapchat_ads__conversion_fields') | join(' + ') }} as total_conversions\n {% else %}\n 0 as total_conversions\n {% endif %}\n from {{ ref('stg_snapchat_ads__ad_hourly_report') }}\n\n), account as (\n\n select *\n from {{ ref('stg_snapchat_ads__ad_account_history') }}\n where is_most_recent_record = true\n\n), ads as (\n\n select *\n from {{ ref('stg_snapchat_ads__ad_history') }}\n where is_most_recent_record = true\n\n), ad_squads as (\n\n select *\n from {{ ref('stg_snapchat_ads__ad_squad_history') }}\n where is_most_recent_record = true\n\n), campaigns as (\n\n select *\n from {{ ref('stg_snapchat_ads__campaign_history') }}\n where is_most_recent_record = true\n\n\n), aggregated as (\n\n select\n ad_hourly.source_relation,\n cast(ad_hourly.date_hour as date) as date_day,\n account.ad_account_id,\n account.ad_account_name,\n account.currency,\n sum(ad_hourly.swipes) as swipes,\n sum(ad_hourly.impressions) as impressions,\n round(sum(ad_hourly.spend),2) as spend,\n sum(ad_hourly.total_conversions) as total_conversions,\n round(cast(sum(ad_hourly.conversion_purchases_value) as {{ dbt.type_numeric() }}), 2) as conversion_purchases_value\n\n {{ snapchat_ads_persist_pass_through_columns(pass_through_variable='snapchat_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='snapchat_ads__ad_hourly_passthrough_metrics', exclude_fields=['conversion_purchases_value']) }}\n\n {{ snapchat_ads_persist_pass_through_columns(pass_through_variable='snapchat_ads__ad_hourly_passthrough_metrics', transform='sum', exclude_fields=['conversion_purchases_value']) }}\n\n from ad_hourly\n left join ads \n on ad_hourly.ad_id = ads.ad_id\n and ad_hourly.source_relation = ads.source_relation\n left join ad_squads\n on ads.ad_squad_id = ad_squads.ad_squad_id\n and ads.source_relation = ad_squads.source_relation\n left join campaigns\n on ad_squads.campaign_id = campaigns.campaign_id\n and ad_squads.source_relation = campaigns.source_relation\n left join account\n on campaigns.ad_account_id = account.ad_account_id\n and campaigns.source_relation = account.source_relation\n\n {{ dbt_utils.group_by(5) }}\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_hourly_report", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_account_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_squad_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.type_numeric", "macro.snapchat_ads.snapchat_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_hourly_report", "model.snapchat_ads.stg_snapchat_ads__ad_account_history", "model.snapchat_ads.stg_snapchat_ads__ad_history", "model.snapchat_ads.stg_snapchat_ads__ad_squad_history", "model.snapchat_ads.stg_snapchat_ads__campaign_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat_ads__account_report.sql", "compiled": true, "compiled_code": "\n\nwith ad_hourly as (\n\n select *,\n \n conversion_purchases as total_conversions\n \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_hourly_report\"\n\n), account as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_account_history\"\n where is_most_recent_record = true\n\n), ads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_history\"\n where is_most_recent_record = true\n\n), ad_squads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_history\"\n where is_most_recent_record = true\n\n), campaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_history\"\n where is_most_recent_record = true\n\n\n), aggregated as (\n\n select\n ad_hourly.source_relation,\n cast(ad_hourly.date_hour as date) as date_day,\n account.ad_account_id,\n account.ad_account_name,\n account.currency,\n sum(ad_hourly.swipes) as swipes,\n sum(ad_hourly.impressions) as impressions,\n round(sum(ad_hourly.spend),2) as spend,\n sum(ad_hourly.total_conversions) as total_conversions,\n round(cast(sum(ad_hourly.conversion_purchases_value) as numeric(28,6)), 2) as conversion_purchases_value\n\n \n\n\n\n \n \n\n\n\n \n\n\n\n \n \n \n \n , sum(coalesce(conversion_purchases, 0)) as conversion_purchases\n \n\n \n\n\n\n\n \n\n\n\n\n\n \n\n\n\n\n\n\n from ad_hourly\n left join ads \n on ad_hourly.ad_id = ads.ad_id\n and ad_hourly.source_relation = ads.source_relation\n left join ad_squads\n on ads.ad_squad_id = ad_squads.ad_squad_id\n and ads.source_relation = ad_squads.source_relation\n left join campaigns\n on ad_squads.campaign_id = campaigns.campaign_id\n and ad_squads.source_relation = campaigns.source_relation\n left join account\n on campaigns.ad_account_id = account.ad_account_id\n and campaigns.source_relation = account.source_relation\n\n group by 1,2,3,4,5\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__creative_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__creative_history", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/stg_snapchat_ads__creative_history.sql", "original_file_path": "models/staging/stg_snapchat_ads__creative_history.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__creative_history", "fqn": ["snapchat_ads", "staging", "stg_snapchat_ads__creative_history"], "alias": "stg_snapchat_ads__creative_history", "checksum": {"name": "sha256", "checksum": "96c444fa425bed7c83d79b283016abca2c147ef05d7996b68a4ff7fee399d8d8"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a historic version of a creative in Snapchat.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}, "creative_id": {"name": "creative_id", "description": "The ID of the creative in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_name": {"name": "creative_name", "description": "The name of the creative in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_id": {"name": "ad_account_id", "description": "The ID of the related ad account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url": {"name": "url", "description": "The URL of the creative if the creative is of type 'web view'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Created at timestamp.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/staging/stg_snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.3121905, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_snapchat_ads__creative_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_snapchat_ads__creative_history_tmp')),\n staging_columns=get_creative_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='snapchat_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as creative_id,\n cast (created_at as {{ dbt.type_timestamp() }}) as created_at,\n ad_account_id,\n name as creative_name,\n web_view_url as url,\n cast (_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast (updated_at as {{ dbt.type_timestamp() }}) as updated_at,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='snapchat_ads') }} order by _fivetran_synced desc) =1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__creative_history_tmp", "package": null, "version": null}, {"name": "stg_snapchat_ads__creative_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.snapchat_ads.get_creative_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__creative_history_tmp"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat_ads__creative_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_history_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n ad_account_id as ad_account_id,\n cast(null as timestamp) as created_at,\n id as id,\n name as name,\n cast(null as timestamp) as updated_at,\n web_view_url as web_view_url\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as creative_id,\n cast (created_at as timestamp) as created_at,\n ad_account_id,\n name as creative_name,\n web_view_url as url,\n cast (_fivetran_synced as timestamp) as _fivetran_synced,\n cast (updated_at as timestamp) as updated_at,\n row_number() over (partition by id order by _fivetran_synced desc) =1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__ad_squad_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_squad_history", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/stg_snapchat_ads__ad_squad_history.sql", "original_file_path": "models/staging/stg_snapchat_ads__ad_squad_history.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_squad_history", "fqn": ["snapchat_ads", "staging", "stg_snapchat_ads__ad_squad_history"], "alias": "stg_snapchat_ads__ad_squad_history", "checksum": {"name": "sha256", "checksum": "a5bf1506009cccce65fcf790c7c960e75393482c9a595e6438831dd31781e578"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a historic version of an ad squad in Snapchat.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}, "ad_squad_id": {"name": "ad_squad_id", "description": "The ID of the ad squad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_squad_name": {"name": "ad_squad_name", "description": "The name of the ad squad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Created at timestamp.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/staging/stg_snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.305479, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_snapchat_ads__ad_squad_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_snapchat_ads__ad_squad_history_tmp')),\n staging_columns=get_ad_squad_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='snapchat_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as ad_squad_id,\n name as ad_squad_name,\n cast (created_at as {{ dbt.type_timestamp() }}) as created_at,\n campaign_id,\n cast (_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast (updated_at as {{ dbt.type_timestamp() }}) as updated_at,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='snapchat_ads') }} order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_squad_history_tmp", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_squad_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.snapchat_ads.get_ad_squad_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_history_tmp"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat_ads__ad_squad_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_history_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n campaign_id as campaign_id,\n cast(null as timestamp) as created_at,\n id as id,\n name as name,\n cast(null as timestamp) as updated_at\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as ad_squad_id,\n name as ad_squad_name,\n cast (created_at as timestamp) as created_at,\n campaign_id,\n cast (_fivetran_synced as timestamp) as _fivetran_synced,\n cast (updated_at as timestamp) as updated_at,\n row_number() over (partition by id order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_hourly_report", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/stg_snapchat_ads__ad_hourly_report.sql", "original_file_path": "models/staging/stg_snapchat_ads__ad_hourly_report.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report", "fqn": ["snapchat_ads", "staging", "stg_snapchat_ads__ad_hourly_report"], "alias": "stg_snapchat_ads__ad_hourly_report", "checksum": {"name": "sha256", "checksum": "826ca1addcc8418adee89d0060427f0cdbdaac7b4bdf1b63f25b22ccb8a52258"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents an hourly performance summary for an ad in Snapchat.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "ad_id": {"name": "ad_id", "description": "The ID of the ad that the report relates to in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_hour": {"name": "date_hour", "description": "The hour that the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_1": {"name": "attachment_quartile_1", "description": "Number of times your Long Form Video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_2": {"name": "attachment_quartile_2", "description": "Number of times your Long Form Video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_3": {"name": "attachment_quartile_3", "description": "Number of times your Long Form Video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_total_view_time": {"name": "attachment_total_view_time", "description": "Total time Snapchatters spent on the attachment (HH:MM:SS)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_view_completion": {"name": "attachment_view_completion", "description": "The number of times your Long Form Video was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_1": {"name": "quartile_1", "description": "The number of times your video ad was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_2": {"name": "quartile_2", "description": "The number of times your video ad was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_3": {"name": "quartile_3", "description": "The number of times your video ad was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "saves": {"name": "saves", "description": "Number of times an ad was saved to Memories", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "Number of times an ad was shared in a Chat or Story", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "screen_time": {"name": "screen_time", "description": "The number of seconds spent watching your ad across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views": {"name": "video_views", "description": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_completion": {"name": "view_completion", "description": "The number of times your video ad was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_time": {"name": "view_time", "description": "The number of seconds spent watching your ad across all users reached.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions for an ad in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend for an ad in the hour of the record converted from micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes for an ad in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases attributed to an ad for the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases attributed to an ad in the hour of the record (in Ad Account's currency, converted from microcurrency).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/staging/stg_snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.3044393, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_hourly_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_snapchat_ads__ad_hourly_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_snapchat_ads__ad_hourly_report_tmp')),\n staging_columns=get_ad_hourly_report_columns()\n )\n }} \n \n {{ fivetran_utils.apply_source_relation(package_name='snapchat_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n ad_id,\n cast (date as {{ dbt.type_timestamp() }}) as date_hour,\n attachment_quartile_1,\n attachment_quartile_2,\n attachment_quartile_3,\n (attachment_total_view_time_millis / 1000000.0) as attachment_total_view_time,\n attachment_view_completion,\n quartile_1,\n quartile_2,\n quartile_3,\n saves,\n shares,\n (screen_time_millis / 1000000.0) as screen_time,\n video_views,\n view_completion,\n (view_time_millis / 1000000.0) as view_time,\n impressions,\n (spend / 1000000.0) as spend,\n swipes,\n coalesce(cast(conversion_purchases_value as {{ dbt.type_float() }}), 0) / 1000000.0 as conversion_purchases_value\n\n {% for conversion in var('snapchat_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {{ snapchat_ads_fill_pass_through_columns(pass_through_fields=var('snapchat_ads__ad_hourly_passthrough_metrics'), except=(var('snapchat_ads__conversion_fields') + ['conversion_purchases_value'])) }}\n\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_hourly_report_tmp", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_hourly_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.snapchat_ads.get_ad_hourly_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_float", "macro.dbt.type_bigint", "macro.snapchat_ads.snapchat_ads_fill_pass_through_columns"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_hourly_report_tmp"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat_ads__ad_hourly_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_hourly_report_tmp\"\n),\n\nfields as (\n\n select\n \n ad_id as ad_id,\n cast(null as numeric(28,6)) as attachment_quartile_1,\n cast(null as numeric(28,6)) as attachment_quartile_2,\n cast(null as numeric(28,6)) as attachment_quartile_3,\n cast(null as numeric(28,6)) as attachment_total_view_time_millis,\n cast(null as numeric(28,6)) as attachment_view_completion,\n date as date,\n impressions as impressions,\n cast(null as numeric(28,6)) as quartile_1,\n cast(null as numeric(28,6)) as quartile_2,\n cast(null as numeric(28,6)) as quartile_3,\n cast(null as numeric(28,6)) as saves,\n cast(null as numeric(28,6)) as screen_time_millis,\n cast(null as numeric(28,6)) as shares,\n spend as spend,\n swipes as swipes,\n cast(null as numeric(28,6)) as video_views,\n cast(null as numeric(28,6)) as view_completion,\n cast(null as numeric(28,6)) as view_time_millis,\n conversion_purchases_value as conversion_purchases_value,\n conversion_purchases as conversion_purchases \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n ad_id,\n cast (date as timestamp) as date_hour,\n attachment_quartile_1,\n attachment_quartile_2,\n attachment_quartile_3,\n (attachment_total_view_time_millis / 1000000.0) as attachment_total_view_time,\n attachment_view_completion,\n quartile_1,\n quartile_2,\n quartile_3,\n saves,\n shares,\n (screen_time_millis / 1000000.0) as screen_time,\n video_views,\n view_completion,\n (view_time_millis / 1000000.0) as view_time,\n impressions,\n (spend / 1000000.0) as spend,\n swipes,\n coalesce(cast(conversion_purchases_value as float), 0) / 1000000.0 as conversion_purchases_value\n\n \n , coalesce(cast(conversion_purchases as bigint), 0) as conversion_purchases\n \n\n \n\n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_geo_region_daily_report", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/stg_snapchat_ads__campaign_geo_region_daily_report.sql", "original_file_path": "models/staging/stg_snapchat_ads__campaign_geo_region_daily_report.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report", "fqn": ["snapchat_ads", "staging", "stg_snapchat_ads__campaign_geo_region_daily_report"], "alias": "stg_snapchat_ads__campaign_geo_region_daily_report", "checksum": {"name": "sha256", "checksum": "c68a0f865a231a32e8dd0e29d662e4e80fb125a3a114c68d118e80d82752f27d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a daily performance summary per region for each campaign.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "ID of campaign", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "region": {"name": "region", "description": "The region that the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The day that the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_1": {"name": "attachment_quartile_1", "description": "Number of times your Long Form Video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_2": {"name": "attachment_quartile_2", "description": "Number of times your Long Form Video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_3": {"name": "attachment_quartile_3", "description": "Number of times your Long Form Video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_total_view_time": {"name": "attachment_total_view_time", "description": "Total time Snapchatters spent on the attachment (HH:MM:SS)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_view_completion": {"name": "attachment_view_completion", "description": "The number of times your Long Form Video was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_1": {"name": "quartile_1", "description": "The number of times your video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_2": {"name": "quartile_2", "description": "The number of times your video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_3": {"name": "quartile_3", "description": "The number of times your video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "saves": {"name": "saves", "description": "Number of times components of the campaign were saved to Memories", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "Number of times components of the campaign were shared in a Chat or Story", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "screen_time": {"name": "screen_time", "description": "The number of seconds spent watching your campaign across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views": {"name": "video_views", "description": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_completion": {"name": "view_completion", "description": "The number of times your video was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_time": {"name": "view_time", "description": "The number of seconds spent watching your campaign across all users reached.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions for a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend for a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes for a campaign. Swipes are when your ad was swiped up on or the CTA was tapped to view the attachment below.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases attributed to a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases attributed to a campaign for the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/staging/stg_snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.3170037, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_geo_region_daily_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true) and var('snapchat_ads__using_campaign_region_report', false)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_snapchat_ads__campaign_geo_region_daily_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_snapchat_ads__campaign_geo_region_daily_report_tmp')),\n staging_columns=get_campaign_geo_region_daily_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='snapchat_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n campaign_id,\n upper(region) as region,\n cast(date as {{ dbt.type_timestamp() }}) as date_day,\n attachment_quartile_1,\n attachment_quartile_2,\n attachment_quartile_3,\n (attachment_total_view_time_millis / 1000000.0) as attachment_total_view_time,\n attachment_view_completion,\n quartile_1,\n quartile_2,\n quartile_3,\n saves,\n shares,\n (screen_time_millis / 1000000.0) as screen_time,\n video_views,\n view_completion,\n (view_time_millis / 1000000.0) as view_time,\n impressions,\n (spend / 1000000.0) as spend,\n swipes,\n coalesce(cast(conversion_purchases_value as {{ dbt.type_float() }}), 0) / 1000000.0 as conversion_purchases_value\n\n {% for conversion in var('snapchat_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {{ snapchat_ads_fill_pass_through_columns(pass_through_fields=var('snapchat_ads__campaign_daily_region_report_passthrough_metrics')) }}\n \n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_geo_region_daily_report_tmp", "package": null, "version": null}, {"name": "stg_snapchat_ads__campaign_geo_region_daily_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.snapchat_ads.get_campaign_geo_region_daily_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_float", "macro.dbt.type_bigint", "macro.snapchat_ads.snapchat_ads_fill_pass_through_columns"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report_tmp"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat_ads__campaign_geo_region_daily_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_geo_region_daily_report_tmp\"\n),\n\nfields as (\n\n select\n \n attachment_quartile_1 as attachment_quartile_1,\n attachment_quartile_2 as attachment_quartile_2,\n attachment_quartile_3 as attachment_quartile_3,\n attachment_total_view_time_millis as attachment_total_view_time_millis,\n attachment_view_completion as attachment_view_completion,\n campaign_id as campaign_id,\n date as date,\n region as region,\n impressions as impressions,\n quartile_1 as quartile_1,\n quartile_2 as quartile_2,\n quartile_3 as quartile_3,\n saves as saves,\n screen_time_millis as screen_time_millis,\n shares as shares,\n spend as spend,\n swipes as swipes,\n video_views as video_views,\n view_completion as view_completion,\n view_time_millis as view_time_millis,\n conversion_purchases_value as conversion_purchases_value,\n cast(null as TEXT) as conversion_purchases\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n campaign_id,\n upper(region) as region,\n cast(date as timestamp) as date_day,\n attachment_quartile_1,\n attachment_quartile_2,\n attachment_quartile_3,\n (attachment_total_view_time_millis / 1000000.0) as attachment_total_view_time,\n attachment_view_completion,\n quartile_1,\n quartile_2,\n quartile_3,\n saves,\n shares,\n (screen_time_millis / 1000000.0) as screen_time,\n video_views,\n view_completion,\n (view_time_millis / 1000000.0) as view_time,\n impressions,\n (spend / 1000000.0) as spend,\n swipes,\n coalesce(cast(conversion_purchases_value as float), 0) / 1000000.0 as conversion_purchases_value\n\n \n , coalesce(cast(conversion_purchases as bigint), 0) as conversion_purchases\n \n\n \n\n\n\n\n \n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_geo_country_daily_report", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/stg_snapchat_ads__campaign_geo_country_daily_report.sql", "original_file_path": "models/staging/stg_snapchat_ads__campaign_geo_country_daily_report.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report", "fqn": ["snapchat_ads", "staging", "stg_snapchat_ads__campaign_geo_country_daily_report"], "alias": "stg_snapchat_ads__campaign_geo_country_daily_report", "checksum": {"name": "sha256", "checksum": "b5c97b5b5acc28258cf259e0413f5e881d199d0fdb841928396067103f88cef2"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a daily performance summary per country for each campaign.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "ID of campaign", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country": {"name": "country", "description": "The country that the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The day that the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_1": {"name": "attachment_quartile_1", "description": "Number of times your Long Form Video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_2": {"name": "attachment_quartile_2", "description": "Number of times your Long Form Video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_3": {"name": "attachment_quartile_3", "description": "Number of times your Long Form Video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_total_view_time": {"name": "attachment_total_view_time", "description": "Total time Snapchatters spent on the attachment (HH:MM:SS)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_view_completion": {"name": "attachment_view_completion", "description": "The number of times your Long Form Video was viewed to completion (97%)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_1": {"name": "quartile_1", "description": "The number of times your video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_2": {"name": "quartile_2", "description": "The number of times your video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_3": {"name": "quartile_3", "description": "The number of times your video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "saves": {"name": "saves", "description": "Number of times components of the campaign were saved to Memories", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "Number of times components of the campaign were shared in a Chat or Story", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "screen_time": {"name": "screen_time", "description": "The number of seconds spent watching your campaign across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views": {"name": "video_views", "description": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_completion": {"name": "view_completion", "description": "The number of times your video was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_time": {"name": "view_time", "description": "The number of seconds spent watching your campaign across all users reached.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions for a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend for a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes for a campaign. Swipes are when your ad was swiped up on or the CTA was tapped to view the attachment below.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases attributed to a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases attributed to a campaign for the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/staging/stg_snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.3153443, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_geo_country_daily_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true) and var('snapchat_ads__using_campaign_country_report', false)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_snapchat_ads__campaign_geo_country_daily_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_snapchat_ads__campaign_geo_country_daily_report_tmp')),\n staging_columns=get_campaign_geo_country_daily_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='snapchat_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n campaign_id,\n upper(country) as country,\n cast(date as {{ dbt.type_timestamp() }}) as date_day,\n attachment_quartile_1,\n attachment_quartile_2,\n attachment_quartile_3,\n (attachment_total_view_time_millis / 1000000.0) as attachment_total_view_time,\n attachment_view_completion,\n quartile_1,\n quartile_2,\n quartile_3,\n saves,\n shares,\n (screen_time_millis / 1000000.0) as screen_time,\n video_views,\n view_completion,\n (view_time_millis / 1000000.0) as view_time,\n impressions,\n (spend / 1000000.0) as spend,\n swipes,\n coalesce(cast(conversion_purchases_value as {{ dbt.type_float() }}), 0) / 1000000.0 as conversion_purchases_value\n\n {% for conversion in var('snapchat_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {{ snapchat_ads_fill_pass_through_columns(pass_through_fields=var('snapchat_ads__campaign_daily_country_report_passthrough_metrics')) }}\n \n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_geo_country_daily_report_tmp", "package": null, "version": null}, {"name": "stg_snapchat_ads__campaign_geo_country_daily_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.snapchat_ads.get_campaign_geo_country_daily_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_float", "macro.dbt.type_bigint", "macro.snapchat_ads.snapchat_ads_fill_pass_through_columns"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report_tmp"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat_ads__campaign_geo_country_daily_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_geo_country_daily_report_tmp\"\n),\n\nfields as (\n\n select\n \n attachment_quartile_1 as attachment_quartile_1,\n attachment_quartile_2 as attachment_quartile_2,\n attachment_quartile_3 as attachment_quartile_3,\n attachment_total_view_time_millis as attachment_total_view_time_millis,\n attachment_view_completion as attachment_view_completion,\n campaign_id as campaign_id,\n date as date,\n country as country,\n impressions as impressions,\n quartile_1 as quartile_1,\n quartile_2 as quartile_2,\n quartile_3 as quartile_3,\n saves as saves,\n screen_time_millis as screen_time_millis,\n shares as shares,\n spend as spend,\n swipes as swipes,\n video_views as video_views,\n view_completion as view_completion,\n view_time_millis as view_time_millis,\n conversion_purchases_value as conversion_purchases_value,\n cast(null as TEXT) as conversion_purchases\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n campaign_id,\n upper(country) as country,\n cast(date as timestamp) as date_day,\n attachment_quartile_1,\n attachment_quartile_2,\n attachment_quartile_3,\n (attachment_total_view_time_millis / 1000000.0) as attachment_total_view_time,\n attachment_view_completion,\n quartile_1,\n quartile_2,\n quartile_3,\n saves,\n shares,\n (screen_time_millis / 1000000.0) as screen_time,\n video_views,\n view_completion,\n (view_time_millis / 1000000.0) as view_time,\n impressions,\n (spend / 1000000.0) as spend,\n swipes,\n coalesce(cast(conversion_purchases_value as float), 0) / 1000000.0 as conversion_purchases_value\n\n \n , coalesce(cast(conversion_purchases as bigint), 0) as conversion_purchases\n \n\n \n\n\n\n\n \n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_squad_hourly_report", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/stg_snapchat_ads__ad_squad_hourly_report.sql", "original_file_path": "models/staging/stg_snapchat_ads__ad_squad_hourly_report.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report", "fqn": ["snapchat_ads", "staging", "stg_snapchat_ads__ad_squad_hourly_report"], "alias": "stg_snapchat_ads__ad_squad_hourly_report", "checksum": {"name": "sha256", "checksum": "056d9b63ded661bec7565f7df7cc7c8a73cda9d2762acb6e932357b559e8c0f8"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a historic version of an ad in Snapchat.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "ad_squad_id": {"name": "ad_squad_id", "description": "ID of the ad squad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_hour": {"name": "date_hour", "description": "The hour that the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_1": {"name": "attachment_quartile_1", "description": "Number of times your Long Form Video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_2": {"name": "attachment_quartile_2", "description": "Number of times your Long Form Video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_3": {"name": "attachment_quartile_3", "description": "Number of times your Long Form Video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_total_view_time": {"name": "attachment_total_view_time", "description": "Total time Snapchatters spent on the attachment (HH:MM:SS)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_view_completion": {"name": "attachment_view_completion", "description": "The number of times your Long Form Video was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_1": {"name": "quartile_1", "description": "The number of times your video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_2": {"name": "quartile_2", "description": "The number of times your video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_3": {"name": "quartile_3", "description": "The number of times your video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "saves": {"name": "saves", "description": "Number of times components of the ad squad were saved to Memories", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "Number of times components of the ad squad were shared in a Chat or Story", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "screen_time": {"name": "screen_time", "description": "The number of seconds spent watching your ad squad across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views": {"name": "video_views", "description": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_completion": {"name": "view_completion", "description": "The number of times your video ad was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_time": {"name": "view_time", "description": "The number of seconds spent watching your ad squad across all users reached.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions for an ad squad in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend for an ad squad in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes for an ad squad in the hour of the record. Swipes are when your ad was swiped up on or the CTA was tapped to view the attachment below.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases attributed to an ad squad for the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases attributed to an ad squad in the hour of the record (in Ad Account's currency, converted from microcurrency).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/staging/stg_snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.3070035, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_hourly_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_snapchat_ads__ad_squad_hourly_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_snapchat_ads__ad_squad_hourly_report_tmp')),\n staging_columns=get_ad_squad_hourly_report_columns()\n )\n }} \n \n {{ fivetran_utils.apply_source_relation(package_name='snapchat_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n ad_squad_id,\n cast (date as {{ dbt.type_timestamp() }}) as date_hour,\n attachment_quartile_1,\n attachment_quartile_2,\n attachment_quartile_3,\n (attachment_total_view_time_millis / 1000000.0) as attachment_total_view_time,\n attachment_view_completion,\n quartile_1,\n quartile_2,\n quartile_3,\n saves,\n shares,\n (screen_time_millis / 1000000.0) as screen_time,\n video_views,\n view_completion,\n (view_time_millis / 1000000.0) as view_time,\n impressions,\n (spend / 1000000.0) as spend,\n swipes,\n coalesce(cast(conversion_purchases_value as {{ dbt.type_float() }}), 0) / 1000000.0 as conversion_purchases_value\n\n {% for conversion in var('snapchat_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {{ snapchat_ads_fill_pass_through_columns(pass_through_fields=var('snapchat_ads__ad_squad_hourly_passthrough_metrics'), except=(var('snapchat_ads__conversion_fields') + ['conversion_purchases_value'])) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_squad_hourly_report_tmp", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_squad_hourly_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.snapchat_ads.get_ad_squad_hourly_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_float", "macro.dbt.type_bigint", "macro.snapchat_ads.snapchat_ads_fill_pass_through_columns"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report_tmp"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat_ads__ad_squad_hourly_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_hourly_report_tmp\"\n),\n\nfields as (\n\n select\n \n ad_squad_id as ad_squad_id,\n attachment_quartile_1 as attachment_quartile_1,\n attachment_quartile_2 as attachment_quartile_2,\n attachment_quartile_3 as attachment_quartile_3,\n attachment_total_view_time_millis as attachment_total_view_time_millis,\n attachment_view_completion as attachment_view_completion,\n date as date,\n impressions as impressions,\n quartile_1 as quartile_1,\n quartile_2 as quartile_2,\n quartile_3 as quartile_3,\n saves as saves,\n screen_time_millis as screen_time_millis,\n shares as shares,\n spend as spend,\n swipes as swipes,\n video_views as video_views,\n view_completion as view_completion,\n view_time_millis as view_time_millis,\n conversion_purchases_value as conversion_purchases_value,\n conversion_purchases as conversion_purchases \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n ad_squad_id,\n cast (date as timestamp) as date_hour,\n attachment_quartile_1,\n attachment_quartile_2,\n attachment_quartile_3,\n (attachment_total_view_time_millis / 1000000.0) as attachment_total_view_time,\n attachment_view_completion,\n quartile_1,\n quartile_2,\n quartile_3,\n saves,\n shares,\n (screen_time_millis / 1000000.0) as screen_time,\n video_views,\n view_completion,\n (view_time_millis / 1000000.0) as view_time,\n impressions,\n (spend / 1000000.0) as spend,\n swipes,\n coalesce(cast(conversion_purchases_value as float), 0) / 1000000.0 as conversion_purchases_value\n\n \n , coalesce(cast(conversion_purchases as bigint), 0) as conversion_purchases\n \n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__creative_url_tag_history", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/stg_snapchat_ads__creative_url_tag_history.sql", "original_file_path": "models/staging/stg_snapchat_ads__creative_url_tag_history.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history", "fqn": ["snapchat_ads", "staging", "stg_snapchat_ads__creative_url_tag_history"], "alias": "stg_snapchat_ads__creative_url_tag_history", "checksum": {"name": "sha256", "checksum": "5c60bce0ea6860ecdaed285c3a90afa8dbcefbc56364c6fcf3203666aaf3f49f"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a URL paramter key-value pair for a creative in Snapchat.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "creative_id": {"name": "creative_id", "description": "The ID of the related creative in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "param_key": {"name": "param_key", "description": "The URL parameter key, i.e. UTM_SOURCE.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "param_value": {"name": "param_value", "description": "The URL parameter value, i.e. Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/staging/stg_snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.313677, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_url_tag_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_snapchat_ads__creative_url_tag_history_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_snapchat_ads__creative_url_tag_history_tmp')),\n staging_columns=get_creative_url_tag_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='snapchat_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n creative_id,\n key as param_key,\n value as param_value,\n cast (updated_at as {{ dbt.type_timestamp() }}) as updated_at,\n row_number() over (partition by creative_id, key {{ fivetran_utils.partition_by_source_relation(package_name='snapchat_ads') }} order by updated_at desc) =1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__creative_url_tag_history_tmp", "package": null, "version": null}, {"name": "stg_snapchat_ads__creative_url_tag_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.snapchat_ads.get_creative_url_tag_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history_tmp"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat_ads__creative_url_tag_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_url_tag_history_tmp\"\n\n),\n\nfields as (\n\n select\n \n creative_id as creative_id,\n key as key,\n updated_at as updated_at,\n value as value\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n creative_id,\n key as param_key,\n value as param_value,\n cast (updated_at as timestamp) as updated_at,\n row_number() over (partition by creative_id, key order by updated_at desc) =1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__ad_account_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_account_history", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/stg_snapchat_ads__ad_account_history.sql", "original_file_path": "models/staging/stg_snapchat_ads__ad_account_history.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_account_history", "fqn": ["snapchat_ads", "staging", "stg_snapchat_ads__ad_account_history"], "alias": "stg_snapchat_ads__ad_account_history", "checksum": {"name": "sha256", "checksum": "6ea64dad5e11f3c21e6e7fb576196a5486e75ba3065c9cfb366bc353c42eab36"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a historic version of an ad account in Snapchat.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}, "ad_account_id": {"name": "ad_account_id", "description": "The ID of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_name": {"name": "ad_account_name", "description": "The name of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser": {"name": "advertiser", "description": "Name of advertiser", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Currency used by account", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Created at timestamp", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone": {"name": "timezone", "description": "Account timezone", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/staging/stg_snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.300502, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_account_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_snapchat_ads__ad_account_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_snapchat_ads__ad_account_history_tmp')),\n staging_columns=get_ad_account_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='snapchat_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as ad_account_id,\n name as ad_account_name,\n cast (created_at as {{ dbt.type_timestamp() }}) as created_at,\n advertiser, \n currency,\n timezone,\n cast (_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast (updated_at as {{ dbt.type_timestamp() }}) as updated_at,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='snapchat_ads') }} order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_account_history_tmp", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_account_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.snapchat_ads.get_ad_account_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_account_history_tmp"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat_ads__ad_account_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_account_history_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n cast(null as TEXT) as advertiser,\n cast(null as timestamp) as created_at,\n cast(null as TEXT) as currency,\n id as id,\n name as name,\n cast(null as TEXT) as timezone,\n cast(null as TEXT) as type,\n cast(null as timestamp) as updated_at\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as ad_account_id,\n name as ad_account_name,\n cast (created_at as timestamp) as created_at,\n advertiser, \n currency,\n timezone,\n cast (_fivetran_synced as timestamp) as _fivetran_synced,\n cast (updated_at as timestamp) as updated_at,\n row_number() over (partition by id order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__campaign_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_history", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/stg_snapchat_ads__campaign_history.sql", "original_file_path": "models/staging/stg_snapchat_ads__campaign_history.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_history", "fqn": ["snapchat_ads", "staging", "stg_snapchat_ads__campaign_history"], "alias": "stg_snapchat_ads__campaign_history", "checksum": {"name": "sha256", "checksum": "aa8fda0d9eaf1004c38b62ec1a3dec7e16c17bb49c5d4a1ba5754cff82023016"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a historic version of a campaign in Snapchat.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}, "campaign_id": {"name": "campaign_id", "description": "The id of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_id": {"name": "ad_account_id", "description": "The ID of the related ad account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Created at timestamp.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.is_most_recent_record"]}, "daily_budget": {"name": "daily_budget", "description": "Daily Spend Cap converted from microcurrency", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_time": {"name": "start_time", "description": "Start time", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_time": {"name": "end_time", "description": "End time", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lifetime_spend_cap": {"name": "lifetime_spend_cap", "description": "Lifetime spend cap for the campaign converted from microcurrency", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Campaign status (ACTIVE, PAUSED)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective": {"name": "objective", "description": "Objective of the Campaign (BRAND_AWARENESS (default), APP_CONVERSION, APP_INSTALL, etc)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/staging/stg_snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.308958, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_snapchat_ads__campaign_history_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_snapchat_ads__campaign_history_tmp')),\n staging_columns=get_campaign_history_columns()\n )\n }}\n\n {{ fivetran_utils.apply_source_relation(package_name='snapchat_ads') }}\n\n from base\n\n),\n\nfinal as (\n\n select\n source_relation,\n id as campaign_id,\n ad_account_id,\n cast(created_at as {{ dbt.type_timestamp() }}) as created_at,\n name as campaign_name,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast(updated_at as {{ dbt.type_timestamp() }}) as updated_at,\n (daily_budget_micro / 1000000.0) as daily_budget,\n cast(start_time as {{ dbt.type_timestamp() }}) as start_time,\n cast(end_time as {{ dbt.type_timestamp() }}) as end_time,\n (lifetime_spend_cap_micro / 1000000.0) as lifetime_spend_cap,\n status,\n objective,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='snapchat_ads') }} order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_history_tmp", "package": null, "version": null}, {"name": "stg_snapchat_ads__campaign_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.snapchat_ads.get_campaign_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_history_tmp"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat_ads__campaign_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_history_tmp\"\n\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n ad_account_id as ad_account_id,\n cast(null as timestamp) as created_at,\n id as id,\n name as name,\n cast(null as timestamp) as updated_at,\n cast(null as integer) as daily_budget_micro,\n cast(null as timestamp) as start_time,\n cast(null as timestamp) as end_time,\n cast(null as integer) as lifetime_spend_cap_micro,\n cast(null as TEXT) as status,\n cast(null as TEXT) as objective\n\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n\n),\n\nfinal as (\n\n select\n source_relation,\n id as campaign_id,\n ad_account_id,\n cast(created_at as timestamp) as created_at,\n name as campaign_name,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n cast(updated_at as timestamp) as updated_at,\n (daily_budget_micro / 1000000.0) as daily_budget,\n cast(start_time as timestamp) as start_time,\n cast(end_time as timestamp) as end_time,\n (lifetime_spend_cap_micro / 1000000.0) as lifetime_spend_cap,\n status,\n objective,\n row_number() over (partition by id order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__ad_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_history", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/stg_snapchat_ads__ad_history.sql", "original_file_path": "models/staging/stg_snapchat_ads__ad_history.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_history", "fqn": ["snapchat_ads", "staging", "stg_snapchat_ads__ad_history"], "alias": "stg_snapchat_ads__ad_history", "checksum": {"name": "sha256", "checksum": "1c12fc38b7eedfb08957c102f483905c9f58f6c9839964b39c75c28363f18a87"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a historic version of an ad in Snapchat.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}, "ad_id": {"name": "ad_id", "description": "The ID of the ad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_squad_id": {"name": "ad_squad_id", "description": "The ID of the related ad squad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_id": {"name": "creative_id", "description": "The ID of the related creative in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_name": {"name": "ad_name", "description": "The name of the ad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Created at timestamp", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/staging/stg_snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.3015444, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_snapchat_ads__ad_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_snapchat_ads__ad_history_tmp')),\n staging_columns=get_ad_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='snapchat_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as ad_id,\n name as ad_name,\n cast (created_at as {{ dbt.type_timestamp() }}) as created_at,\n ad_squad_id,\n creative_id,\n cast (_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast (updated_at as {{ dbt.type_timestamp() }}) as updated_at,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='snapchat_ads') }} order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_history_tmp", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.snapchat_ads.get_ad_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_history_tmp"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat_ads__ad_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_history_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n ad_squad_id as ad_squad_id,\n cast(null as timestamp) as created_at,\n creative_id as creative_id,\n id as id,\n name as name,\n cast(null as timestamp) as updated_at\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as ad_id,\n name as ad_name,\n cast (created_at as timestamp) as created_at,\n ad_squad_id,\n creative_id,\n cast (_fivetran_synced as timestamp) as _fivetran_synced,\n cast (updated_at as timestamp) as updated_at,\n row_number() over (partition by id order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_hourly_report", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/stg_snapchat_ads__campaign_hourly_report.sql", "original_file_path": "models/staging/stg_snapchat_ads__campaign_hourly_report.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report", "fqn": ["snapchat_ads", "staging", "stg_snapchat_ads__campaign_hourly_report"], "alias": "stg_snapchat_ads__campaign_hourly_report", "checksum": {"name": "sha256", "checksum": "744073009cfb48fcda365575b183b729c51fb0e87934f4dfb5a3d4fd94a9d50b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a historic version of an ad in Snapchat.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "ID of campaign", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_hour": {"name": "date_hour", "description": "The hour that the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_1": {"name": "attachment_quartile_1", "description": "Number of times your Long Form Video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_2": {"name": "attachment_quartile_2", "description": "Number of times your Long Form Video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_3": {"name": "attachment_quartile_3", "description": "Number of times your Long Form Video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_total_view_time": {"name": "attachment_total_view_time", "description": "Total time Snapchatters spent on the attachment (HH:MM:SS)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_view_completion": {"name": "attachment_view_completion", "description": "The number of times your Long Form Video was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_1": {"name": "quartile_1", "description": "The number of times your video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_2": {"name": "quartile_2", "description": "The number of times your video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_3": {"name": "quartile_3", "description": "The number of times your video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "saves": {"name": "saves", "description": "Number of times components of the campaign were saved to Memories", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "Number of times components of the campaign were shared in a Chat or Story", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "screen_time": {"name": "screen_time", "description": "The number of seconds spent watching your campaign across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views": {"name": "video_views", "description": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_completion": {"name": "view_completion", "description": "The number of times your video was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_time": {"name": "view_time", "description": "The number of seconds spent watching your campaign across all users reached.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions for a campaign in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend for a campaign in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes for a campaign in the hour of the record. Swipes are when your ad was swiped up on or the CTA was tapped to view the attachment below.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases attributed to a campaign for the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases attributed to a campaign in the hour of the record (in Ad Account's currency, converted from microcurrency).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/staging/stg_snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.3105087, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_hourly_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_snapchat_ads__campaign_hourly_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_snapchat_ads__campaign_hourly_report_tmp')),\n staging_columns=get_campaign_hourly_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='snapchat_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n campaign_id,\n cast (date as {{ dbt.type_timestamp() }}) as date_hour,\n attachment_quartile_1,\n attachment_quartile_2,\n attachment_quartile_3,\n (attachment_total_view_time_millis / 1000000.0) as attachment_total_view_time,\n attachment_view_completion,\n quartile_1,\n quartile_2,\n quartile_3,\n saves,\n shares,\n (screen_time_millis / 1000000.0) as screen_time,\n video_views,\n view_completion,\n (view_time_millis / 1000000.0) as view_time,\n impressions,\n (spend / 1000000.0) as spend,\n swipes,\n coalesce(cast(conversion_purchases_value as {{ dbt.type_float() }}), 0) / 1000000.0 as conversion_purchases_value\n\n {% for conversion in var('snapchat_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {{ snapchat_ads_fill_pass_through_columns(pass_through_fields=var('snapchat_ads__campaign_hourly_report_passthrough_metrics'), except=(var('snapchat_ads__conversion_fields') + ['conversion_purchases_value'])) }}\n \n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_hourly_report_tmp", "package": null, "version": null}, {"name": "stg_snapchat_ads__campaign_hourly_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.snapchat_ads.get_campaign_hourly_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_float", "macro.dbt.type_bigint", "macro.snapchat_ads.snapchat_ads_fill_pass_through_columns"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report_tmp"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat_ads__campaign_hourly_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_hourly_report_tmp\"\n),\n\nfields as (\n\n select\n \n attachment_quartile_1 as attachment_quartile_1,\n attachment_quartile_2 as attachment_quartile_2,\n attachment_quartile_3 as attachment_quartile_3,\n attachment_total_view_time_millis as attachment_total_view_time_millis,\n attachment_view_completion as attachment_view_completion,\n campaign_id as campaign_id,\n date as date,\n impressions as impressions,\n quartile_1 as quartile_1,\n quartile_2 as quartile_2,\n quartile_3 as quartile_3,\n saves as saves,\n screen_time_millis as screen_time_millis,\n shares as shares,\n spend as spend,\n swipes as swipes,\n video_views as video_views,\n view_completion as view_completion,\n view_time_millis as view_time_millis,\n conversion_purchases_value as conversion_purchases_value,\n conversion_purchases as conversion_purchases\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n campaign_id,\n cast (date as timestamp) as date_hour,\n attachment_quartile_1,\n attachment_quartile_2,\n attachment_quartile_3,\n (attachment_total_view_time_millis / 1000000.0) as attachment_total_view_time,\n attachment_view_completion,\n quartile_1,\n quartile_2,\n quartile_3,\n saves,\n shares,\n (screen_time_millis / 1000000.0) as screen_time,\n video_views,\n view_completion,\n (view_time_millis / 1000000.0) as view_time,\n impressions,\n (spend / 1000000.0) as spend,\n swipes,\n coalesce(cast(conversion_purchases_value as float), 0) / 1000000.0 as conversion_purchases_value\n\n \n , coalesce(cast(conversion_purchases as bigint), 0) as conversion_purchases\n \n\n \n\n\n\n\n \n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__ad_squad_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_squad_history_tmp", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/tmp/stg_snapchat_ads__ad_squad_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_snapchat_ads__ad_squad_history_tmp.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_squad_history_tmp", "fqn": ["snapchat_ads", "staging", "tmp", "stg_snapchat_ads__ad_squad_history_tmp"], "alias": "stg_snapchat_ads__ad_squad_history_tmp", "checksum": {"name": "sha256", "checksum": "54b0932b74d1c699e5746185d2e61711e7152ba373883624ca22407e98e1a35d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450497.7973247, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\n{% if var('snapchat_ads_union_schemas', []) | length > 0 or var('snapchat_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_squad_history', \n database_variable='snapchat_ads_database', \n schema_variable='snapchat_ads_schema', \n default_database=target.database,\n default_schema='snapchat_ads',\n default_variable='ad_squad_history',\n union_schema_variable='snapchat_ads_union_schemas',\n union_database_variable='snapchat_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='snapchat_ads_sources',\n single_source_name='snapchat_ads',\n single_table_name='ad_squad_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["snapchat_ads", "ad_squad_history"], ["snapchat_ads", "ad_squad_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.snapchat_ads.snapchat_ads.ad_squad_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/tmp/stg_snapchat_ads__ad_squad_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: snapchat_ads_ad_squad_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: snapchat_ad_squad_history_data\n\n\n select\n \"id\",\n \"campaign_id\",\n \"name\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"snapchat_ad_squad_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_geo_country_daily_report_tmp", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/tmp/stg_snapchat_ads__campaign_geo_country_daily_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_snapchat_ads__campaign_geo_country_daily_report_tmp.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report_tmp", "fqn": ["snapchat_ads", "staging", "tmp", "stg_snapchat_ads__campaign_geo_country_daily_report_tmp"], "alias": "stg_snapchat_ads__campaign_geo_country_daily_report_tmp", "checksum": {"name": "sha256", "checksum": "608b5229228eac4a2fa5bc0fc82d3557312213c024337163b79dab417ca0cd64"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450497.8080492, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_geo_country_daily_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true) and var('snapchat_ads__using_campaign_country_report', false)) }}\n\n{% if var('snapchat_ads_union_schemas', []) | length > 0 or var('snapchat_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_geo_country_daily_report', \n database_variable='snapchat_ads_database', \n schema_variable='snapchat_ads_schema', \n default_database=target.database,\n default_schema='snapchat_ads',\n default_variable='campaign_geo_country_daily_report',\n union_schema_variable='snapchat_ads_union_schemas',\n union_database_variable='snapchat_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='snapchat_ads_sources',\n single_source_name='snapchat_ads',\n single_table_name='campaign_geo_country_daily_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["snapchat_ads", "campaign_geo_country_daily_report"], ["snapchat_ads", "campaign_geo_country_daily_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.snapchat_ads.snapchat_ads.campaign_geo_country_daily_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/tmp/stg_snapchat_ads__campaign_geo_country_daily_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: snapchat_ads_campaign_geo_country_daily_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: snapchat_campaign_geo_country_daily_report_data\n\n\n select\n \"attachment_quartile_1\",\n \"attachment_quartile_2\",\n \"attachment_quartile_3\",\n \"attachment_total_view_time_millis\",\n \"attachment_view_completion\",\n \"campaign_id\",\n \"date\",\n \"country\",\n \"impressions\",\n \"quartile_1\",\n \"quartile_2\",\n \"quartile_3\",\n \"saves\",\n \"screen_time_millis\",\n \"shares\",\n \"spend\",\n \"swipes\",\n \"video_views\",\n \"view_completion\",\n \"view_time_millis\",\n \"conversion_purchases_value\"\n from \"postgres\".\"public\".\"snapchat_campaign_geo_country_daily_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__creative_url_tag_history_tmp", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/tmp/stg_snapchat_ads__creative_url_tag_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_snapchat_ads__creative_url_tag_history_tmp.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history_tmp", "fqn": ["snapchat_ads", "staging", "tmp", "stg_snapchat_ads__creative_url_tag_history_tmp"], "alias": "stg_snapchat_ads__creative_url_tag_history_tmp", "checksum": {"name": "sha256", "checksum": "41030a99c096de1da9b1a4729c54ec1c635597def9bbeb4bd135479347992f91"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450497.8200068, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_url_tag_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\n{% if var('snapchat_ads_union_schemas', []) | length > 0 or var('snapchat_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='creative_url_tag_history', \n database_variable='snapchat_ads_database', \n schema_variable='snapchat_ads_schema', \n default_database=target.database,\n default_schema='snapchat_ads',\n default_variable='creative_url_tag_history',\n union_schema_variable='snapchat_ads_union_schemas',\n union_database_variable='snapchat_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='snapchat_ads_sources',\n single_source_name='snapchat_ads',\n single_table_name='creative_url_tag_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["snapchat_ads", "creative_url_tag_history"], ["snapchat_ads", "creative_url_tag_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.snapchat_ads.snapchat_ads.creative_url_tag_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/tmp/stg_snapchat_ads__creative_url_tag_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: snapchat_ads_creative_url_tag_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: snapchat_creative_url_tag_history_data\n\n\n select\n \"creative_id\",\n \"key\",\n \"value\",\n \"updated_at\"\n from \"postgres\".\"public\".\"snapchat_creative_url_tag_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_squad_hourly_report_tmp", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/tmp/stg_snapchat_ads__ad_squad_hourly_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_snapchat_ads__ad_squad_hourly_report_tmp.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report_tmp", "fqn": ["snapchat_ads", "staging", "tmp", "stg_snapchat_ads__ad_squad_hourly_report_tmp"], "alias": "stg_snapchat_ads__ad_squad_hourly_report_tmp", "checksum": {"name": "sha256", "checksum": "d1ac3ee9201c46aae50d1de1084102f3e4bd6c4a48c97dabc7004f0d94492080"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450497.8307512, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_hourly_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\n{% if var('snapchat_ads_union_schemas', []) | length > 0 or var('snapchat_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_squad_hourly_report', \n database_variable='snapchat_ads_database', \n schema_variable='snapchat_ads_schema', \n default_database=target.database,\n default_schema='snapchat_ads',\n default_variable='ad_squad_hourly_report',\n union_schema_variable='snapchat_ads_union_schemas',\n union_database_variable='snapchat_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='snapchat_ads_sources',\n single_source_name='snapchat_ads',\n single_table_name='ad_squad_hourly_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["snapchat_ads", "ad_squad_hourly_report"], ["snapchat_ads", "ad_squad_hourly_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.snapchat_ads.snapchat_ads.ad_squad_hourly_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/tmp/stg_snapchat_ads__ad_squad_hourly_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: snapchat_ads_ad_squad_hourly_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: snapchat_ad_squad_hourly_report_data\n\n\n select\n \"ad_squad_id\",\n \"date\",\n \"_fivetran_synced\",\n \"android_installs\",\n \"attachment_avg_view_time_millis\",\n \"attachment_quartile_1\",\n \"attachment_quartile_2\",\n \"attachment_quartile_3\",\n \"attachment_total_view_time_millis\",\n \"attachment_view_completion\",\n \"avg_screen_time_millis\",\n \"avg_view_time_millis\",\n \"conversion_add_billing\",\n \"conversion_add_cart\",\n \"conversion_app_opens\",\n \"conversion_level_completes\",\n \"conversion_page_views\",\n \"conversion_purchases\",\n \"conversion_purchases_value\",\n \"conversion_save\",\n \"conversion_searches\",\n \"conversion_sign_ups\",\n \"conversion_start_checkout\",\n \"conversion_view_content\",\n \"impressions\",\n \"ios_installs\",\n \"quartile_1\",\n \"quartile_2\",\n \"quartile_3\",\n \"saves\",\n \"screen_time_millis\",\n \"shares\",\n \"spend\",\n \"story_completes\",\n \"story_opens\",\n \"swipe_up_percent\",\n \"swipes\",\n \"total_installs\",\n \"video_views\",\n \"view_completion\",\n \"view_time_millis\"\n from \"postgres\".\"public\".\"snapchat_ad_squad_hourly_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_hourly_report_tmp", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/tmp/stg_snapchat_ads__campaign_hourly_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_snapchat_ads__campaign_hourly_report_tmp.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report_tmp", "fqn": ["snapchat_ads", "staging", "tmp", "stg_snapchat_ads__campaign_hourly_report_tmp"], "alias": "stg_snapchat_ads__campaign_hourly_report_tmp", "checksum": {"name": "sha256", "checksum": "ec10a64c1065d40017856d236999fc154aaf94b1d1ace30feb3371d7150ae3ed"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450497.8416178, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_hourly_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\n{% if var('snapchat_ads_union_schemas', []) | length > 0 or var('snapchat_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_hourly_report', \n database_variable='snapchat_ads_database', \n schema_variable='snapchat_ads_schema', \n default_database=target.database,\n default_schema='snapchat_ads',\n default_variable='campaign_hourly_report',\n union_schema_variable='snapchat_ads_union_schemas',\n union_database_variable='snapchat_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='snapchat_ads_sources',\n single_source_name='snapchat_ads',\n single_table_name='campaign_hourly_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["snapchat_ads", "campaign_hourly_report"], ["snapchat_ads", "campaign_hourly_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.snapchat_ads.snapchat_ads.campaign_hourly_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/tmp/stg_snapchat_ads__campaign_hourly_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: snapchat_ads_campaign_hourly_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: snapchat_campaign_hourly_report_data\n\n\n select\n \"campaign_id\",\n \"date\",\n \"_fivetran_synced\",\n \"android_installs\",\n \"attachment_avg_view_time_millis\",\n \"attachment_quartile_1\",\n \"attachment_quartile_2\",\n \"attachment_quartile_3\",\n \"attachment_total_view_time_millis\",\n \"attachment_view_completion\",\n \"avg_screen_time_millis\",\n \"avg_view_time_millis\",\n \"conversion_add_billing\",\n \"conversion_add_cart\",\n \"conversion_app_opens\",\n \"conversion_level_completes\",\n \"conversion_page_views\",\n \"conversion_purchases\",\n \"conversion_purchases_value\",\n \"conversion_save\",\n \"conversion_searches\",\n \"conversion_sign_ups\",\n \"conversion_start_checkout\",\n \"conversion_view_content\",\n \"impressions\",\n \"ios_installs\",\n \"quartile_1\",\n \"quartile_2\",\n \"quartile_3\",\n \"saves\",\n \"screen_time_millis\",\n \"shares\",\n \"spend\",\n \"story_completes\",\n \"story_opens\",\n \"swipe_up_percent\",\n \"swipes\",\n \"total_installs\",\n \"video_views\",\n \"view_completion\",\n \"view_time_millis\"\n from \"postgres\".\"public\".\"snapchat_campaign_hourly_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__campaign_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_history_tmp", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/tmp/stg_snapchat_ads__campaign_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_snapchat_ads__campaign_history_tmp.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_history_tmp", "fqn": ["snapchat_ads", "staging", "tmp", "stg_snapchat_ads__campaign_history_tmp"], "alias": "stg_snapchat_ads__campaign_history_tmp", "checksum": {"name": "sha256", "checksum": "fde4a5d27c343283dcdb8e9f0b525168c722bede41de09291c66e475a82df440"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450497.8534317, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\n{% if var('snapchat_ads_union_schemas', []) | length > 0 or var('snapchat_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_history', \n database_variable='snapchat_ads_database', \n schema_variable='snapchat_ads_schema', \n default_database=target.database,\n default_schema='snapchat_ads',\n default_variable='campaign_history',\n union_schema_variable='snapchat_ads_union_schemas',\n union_database_variable='snapchat_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='snapchat_ads_sources',\n single_source_name='snapchat_ads',\n single_table_name='campaign_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["snapchat_ads", "campaign_history"], ["snapchat_ads", "campaign_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.snapchat_ads.snapchat_ads.campaign_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/tmp/stg_snapchat_ads__campaign_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: snapchat_ads_campaign_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: snapchat_campaign_history_data\n\n\n select\n \"id\",\n \"ad_account_id\",\n \"name\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"snapchat_campaign_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__ad_account_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_account_history_tmp", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/tmp/stg_snapchat_ads__ad_account_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_snapchat_ads__ad_account_history_tmp.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_account_history_tmp", "fqn": ["snapchat_ads", "staging", "tmp", "stg_snapchat_ads__ad_account_history_tmp"], "alias": "stg_snapchat_ads__ad_account_history_tmp", "checksum": {"name": "sha256", "checksum": "38eea03e72a7827e1f896c0ae0bc19bd391ced072c647ea35d2bcf5d3672d33a"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450497.8639367, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_account_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\n{% if var('snapchat_ads_union_schemas', []) | length > 0 or var('snapchat_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_account_history', \n database_variable='snapchat_ads_database', \n schema_variable='snapchat_ads_schema', \n default_database=target.database,\n default_schema='snapchat_ads',\n default_variable='ad_account_history',\n union_schema_variable='snapchat_ads_union_schemas',\n union_database_variable='snapchat_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='snapchat_ads_sources',\n single_source_name='snapchat_ads',\n single_table_name='ad_account_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["snapchat_ads", "ad_account_history"], ["snapchat_ads", "ad_account_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.snapchat_ads.snapchat_ads.ad_account_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/tmp/stg_snapchat_ads__ad_account_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: snapchat_ads_ad_account_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: snapchat_ad_account_history_data\n\n\n select\n \"id\",\n \"name\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"snapchat_ad_account_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__ad_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_history_tmp", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/tmp/stg_snapchat_ads__ad_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_snapchat_ads__ad_history_tmp.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_history_tmp", "fqn": ["snapchat_ads", "staging", "tmp", "stg_snapchat_ads__ad_history_tmp"], "alias": "stg_snapchat_ads__ad_history_tmp", "checksum": {"name": "sha256", "checksum": "33440d5eea972c3f4b5cc4557b382c9fee64ac31e7d1398909845d491a738146"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450497.8743153, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\n{% if var('snapchat_ads_union_schemas', []) | length > 0 or var('snapchat_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_history', \n database_variable='snapchat_ads_database', \n schema_variable='snapchat_ads_schema', \n default_database=target.database,\n default_schema='snapchat_ads',\n default_variable='ad_history',\n union_schema_variable='snapchat_ads_union_schemas',\n union_database_variable='snapchat_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='snapchat_ads_sources',\n single_source_name='snapchat_ads',\n single_table_name='ad_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["snapchat_ads", "ad_history"], ["snapchat_ads", "ad_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.snapchat_ads.snapchat_ads.ad_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/tmp/stg_snapchat_ads__ad_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: snapchat_ads_ad_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: snapchat_ad_history_data\n\n\n select\n \"id\",\n \"ad_squad_id\",\n \"creative_id\",\n \"name\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"snapchat_ad_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_geo_region_daily_report_tmp", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/tmp/stg_snapchat_ads__campaign_geo_region_daily_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_snapchat_ads__campaign_geo_region_daily_report_tmp.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report_tmp", "fqn": ["snapchat_ads", "staging", "tmp", "stg_snapchat_ads__campaign_geo_region_daily_report_tmp"], "alias": "stg_snapchat_ads__campaign_geo_region_daily_report_tmp", "checksum": {"name": "sha256", "checksum": "bb014a0eba007300d8b97000bc5d98a9cde027bc30dd2ae48887e5dae5345741"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450497.8860064, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_geo_region_daily_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true) and var('snapchat_ads__using_campaign_region_report', false)) }}\n\n{% if var('snapchat_ads_union_schemas', []) | length > 0 or var('snapchat_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_geo_region_daily_report', \n database_variable='snapchat_ads_database', \n schema_variable='snapchat_ads_schema', \n default_database=target.database,\n default_schema='snapchat_ads',\n default_variable='campaign_geo_region_daily_report',\n union_schema_variable='snapchat_ads_union_schemas',\n union_database_variable='snapchat_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='snapchat_ads_sources',\n single_source_name='snapchat_ads',\n single_table_name='campaign_geo_region_daily_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["snapchat_ads", "campaign_geo_region_daily_report"], ["snapchat_ads", "campaign_geo_region_daily_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.snapchat_ads.snapchat_ads.campaign_geo_region_daily_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/tmp/stg_snapchat_ads__campaign_geo_region_daily_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: snapchat_ads_campaign_geo_region_daily_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: snapchat_campaign_geo_region_daily_report_data\n\n\n select\n \"attachment_quartile_1\",\n \"attachment_quartile_2\",\n \"attachment_quartile_3\",\n \"attachment_total_view_time_millis\",\n \"attachment_view_completion\",\n \"campaign_id\",\n \"date\",\n \"region\",\n \"impressions\",\n \"quartile_1\",\n \"quartile_2\",\n \"quartile_3\",\n \"saves\",\n \"screen_time_millis\",\n \"shares\",\n \"spend\",\n \"swipes\",\n \"video_views\",\n \"view_completion\",\n \"view_time_millis\",\n \"conversion_purchases_value\"\n from \"postgres\".\"public\".\"snapchat_campaign_geo_region_daily_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_hourly_report_tmp", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/tmp/stg_snapchat_ads__ad_hourly_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_snapchat_ads__ad_hourly_report_tmp.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report_tmp", "fqn": ["snapchat_ads", "staging", "tmp", "stg_snapchat_ads__ad_hourly_report_tmp"], "alias": "stg_snapchat_ads__ad_hourly_report_tmp", "checksum": {"name": "sha256", "checksum": "f637119610c052498df954e8501ab0e205ba3c268d905116944008830f5ca9d3"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450497.8966236, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_hourly_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\n{% if var('snapchat_ads_union_schemas', []) | length > 0 or var('snapchat_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_hourly_report', \n database_variable='snapchat_ads_database', \n schema_variable='snapchat_ads_schema', \n default_database=target.database,\n default_schema='snapchat_ads',\n default_variable='ad_hourly_report',\n union_schema_variable='snapchat_ads_union_schemas',\n union_database_variable='snapchat_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='snapchat_ads_sources',\n single_source_name='snapchat_ads',\n single_table_name='ad_hourly_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["snapchat_ads", "ad_hourly_report"], ["snapchat_ads", "ad_hourly_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.snapchat_ads.snapchat_ads.ad_hourly_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/tmp/stg_snapchat_ads__ad_hourly_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: snapchat_ads_ad_hourly_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: snapchat_ad_hourly_report_data\n\n\n select\n \"ad_id\",\n \"date\",\n \"impressions\",\n \"spend\",\n \"swipes\",\n \"conversion_purchases_value\",\n \"conversion_add_billing\",\n \"conversion_add_cart\",\n \"conversion_app_opens\",\n \"conversion_level_completes\",\n \"conversion_page_views\",\n \"conversion_purchases\",\n \"conversion_save\",\n \"conversion_searches\",\n \"conversion_sign_ups\",\n \"conversion_start_checkout\",\n \"conversion_view_content\"\n from \"postgres\".\"public\".\"snapchat_ad_hourly_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__creative_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__creative_history_tmp", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/tmp/stg_snapchat_ads__creative_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_snapchat_ads__creative_history_tmp.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__creative_history_tmp", "fqn": ["snapchat_ads", "staging", "tmp", "stg_snapchat_ads__creative_history_tmp"], "alias": "stg_snapchat_ads__creative_history_tmp", "checksum": {"name": "sha256", "checksum": "df237d994c73b14ddcc6e5dfbe0244962ab53508d64c908f8b1b12b92ab5948b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450497.907279, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\n{% if var('snapchat_ads_union_schemas', []) | length > 0 or var('snapchat_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='creative_history', \n database_variable='snapchat_ads_database', \n schema_variable='snapchat_ads_schema', \n default_database=target.database,\n default_schema='snapchat_ads',\n default_variable='creative_history',\n union_schema_variable='snapchat_ads_union_schemas',\n union_database_variable='snapchat_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='snapchat_ads_sources',\n single_source_name='snapchat_ads',\n single_table_name='creative_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["snapchat_ads", "creative_history"], ["snapchat_ads", "creative_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.snapchat_ads.snapchat_ads.creative_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/tmp/stg_snapchat_ads__creative_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: snapchat_ads_creative_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: snapchat_creative_history_data\n\n\n select\n \"id\",\n \"ad_account_id\",\n \"name\",\n \"web_view_url\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"snapchat_creative_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.snapchat_ads__creative_history_prep": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__creative_history_prep", "resource_type": "model", "package_name": "snapchat_ads", "path": "intermediate/snapchat_ads__creative_history_prep.sql", "original_file_path": "models/intermediate/snapchat_ads__creative_history_prep.sql", "unique_id": "model.snapchat_ads.snapchat_ads__creative_history_prep", "fqn": ["snapchat_ads", "intermediate", "snapchat_ads__creative_history_prep"], "alias": "snapchat_ads__creative_history_prep", "checksum": {"name": "sha256", "checksum": "7d2d2fff48586c7db57b1f6e43c8b207aaef5356a7820ad3b0f9d6fad0cda94d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "ephemeral", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450497.9179103, "relation_name": null, "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\nwith base as (\n\n select *\n from {{ ref('stg_snapchat_ads__creative_history') }}\n where is_most_recent_record = true\n\n), url_tags as (\n\n select *\n from {{ ref('stg_snapchat_ads__creative_url_tag_history') }}\n where is_most_recent_record = true\n\n), url_tags_pivoted as (\n\n select \n source_relation,\n creative_id,\n min(case when param_key = 'utm_source' then param_value end) as utm_source,\n min(case when param_key = 'utm_medium' then param_value end) as utm_medium,\n min(case when param_key = 'utm_campaign' then param_value end) as utm_campaign,\n min(case when param_key = 'utm_content' then param_value end) as utm_content,\n min(case when param_key = 'utm_term' then param_value end) as utm_term\n from url_tags\n group by 1,2\n\n), fields as (\n\n select\n base.source_relation,\n base.creative_id,\n base.ad_account_id,\n base.creative_name,\n base.url,\n {{ dbt.split_part('base.url', \"'?'\", 1) }} as base_url,\n {{ dbt_utils.get_url_host('base.url') }} as url_host,\n '/' || {{ dbt_utils.get_url_path('base.url') }} as url_path,\n coalesce(url_tags_pivoted.utm_source, {{ snapchat_ads.snapchat_ads_extract_url_parameter('base.url', 'utm_source') }}) as utm_source,\n coalesce(url_tags_pivoted.utm_medium, {{ snapchat_ads.snapchat_ads_extract_url_parameter('base.url', 'utm_medium') }}) as utm_medium,\n coalesce(url_tags_pivoted.utm_campaign, {{ snapchat_ads.snapchat_ads_extract_url_parameter('base.url', 'utm_campaign') }}) as utm_campaign,\n coalesce(url_tags_pivoted.utm_content, {{ snapchat_ads.snapchat_ads_extract_url_parameter('base.url', 'utm_content') }}) as utm_content,\n coalesce(url_tags_pivoted.utm_term, {{ snapchat_ads.snapchat_ads_extract_url_parameter('base.url', 'utm_term') }}) as utm_term\n from base\n left join url_tags_pivoted\n on base.creative_id = url_tags_pivoted.creative_id\n and base.source_relation = url_tags_pivoted.source_relation\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__creative_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__creative_url_tag_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.split_part", "macro.dbt_utils.get_url_host", "macro.dbt_utils.get_url_path", "macro.snapchat_ads.snapchat_ads_extract_url_parameter"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__creative_history", "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/intermediate/snapchat_ads__creative_history_prep.sql", "compiled": true, "compiled_code": "\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_history\"\n where is_most_recent_record = true\n\n), url_tags as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_url_tag_history\"\n where is_most_recent_record = true\n\n), url_tags_pivoted as (\n\n select \n source_relation,\n creative_id,\n min(case when param_key = 'utm_source' then param_value end) as utm_source,\n min(case when param_key = 'utm_medium' then param_value end) as utm_medium,\n min(case when param_key = 'utm_campaign' then param_value end) as utm_campaign,\n min(case when param_key = 'utm_content' then param_value end) as utm_content,\n min(case when param_key = 'utm_term' then param_value end) as utm_term\n from url_tags\n group by 1,2\n\n), fields as (\n\n select\n base.source_relation,\n base.creative_id,\n base.ad_account_id,\n base.creative_name,\n base.url,\n \n\n \n \n\n split_part(\n base.url,\n '?',\n 1\n )\n\n\n \n\n as base_url,\n \n \n cast(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n \n\n replace(\n \n\n replace(\n \n\n replace(\n base.url,\n 'android-app://',\n ''\n )\n\n\n,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n '/',\n 1\n )\n\n\n \n\n,\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_host,\n '/' || \n \n cast(\n\n \n \n\n split_part(\n \n\n right(\n \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n \n\n length(\n \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n )-coalesce(\n nullif(\n\n position(\n '/' in \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ), 0),\n \n\n position(\n '?' in \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ) - 1\n )\n ),\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_path,\n coalesce(url_tags_pivoted.utm_source, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_source=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_source,\n coalesce(url_tags_pivoted.utm_medium, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_medium=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_medium,\n coalesce(url_tags_pivoted.utm_campaign, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_campaign=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_campaign,\n coalesce(url_tags_pivoted.utm_content, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_content=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_content,\n coalesce(url_tags_pivoted.utm_term, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_term=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_term\n from base\n left join url_tags_pivoted\n on base.creative_id = url_tags_pivoted.creative_id\n and base.source_relation = url_tags_pivoted.source_relation\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.pinterest_ads__campaign_region_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__campaign_region_report", "resource_type": "model", "package_name": "pinterest", "path": "pinterest_ads__campaign_region_report.sql", "original_file_path": "models/pinterest_ads__campaign_region_report.sql", "unique_id": "model.pinterest.pinterest_ads__campaign_region_report", "fqn": ["pinterest", "pinterest_ads__campaign_region_report"], "alias": "pinterest_ads__campaign_region_report", "checksum": {"name": "sha256", "checksum": "df55196c067952e5517730f33aad71281efb54cc5414701e95eac08f2d803bbd"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the region and campaign level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "date_day": {"name": "date_day", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "country_id": {"name": "country_id", "description": "The ID of the targeted country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.country_id"]}, "country_name": {"name": "country_name", "description": "Name of the targeted country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "region_id": {"name": "region_id", "description": "The ID of the targeted region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.region_id"]}, "region_name": {"name": "region_name", "description": "Name of the targeted region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "Status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "advertiser_name": {"name": "advertiser_name", "description": "Name of the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_created_at": {"name": "campaign_created_at", "description": "Campaign creation time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_start_time": {"name": "campaign_start_time", "description": "Timestamp when the campaign became active or was scheduled to start.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_end_time": {"name": "campaign_end_time", "description": "Timestamp when the campaign ended or is scheduled to end.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_spend_cap": {"name": "budget_spend_cap", "description": "Maximum amount allowed to be spent over a specified budget period for the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lifetime_spend_cap": {"name": "lifetime_spend_cap", "description": "Total maximum spend allowed across the entire lifespan of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_objective_type": {"name": "campaign_objective_type", "description": "The primary goal of the campaign (e.g., brand awareness, conversions, video views).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "default_ad_group_budget_in_micro_currency": {"name": "default_ad_group_budget_in_micro_currency", "description": "When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_campaign_budget_optimization": {"name": "is_campaign_budget_optimization", "description": "Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_flexible_daily_budgets": {"name": "is_flexible_daily_budgets", "description": "Determine if a campaign has flexible daily budgets setup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of paid and earned impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impressions"]}, "clicks": {"name": "clicks", "description": "The number of paid and earned clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clicks"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value": {"name": "total_conversions_value", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/pinterest.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.4103453, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_region_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__pinterest_ads_enabled','pinterest__using_pin_promotion_targeting_report', 'pinterest__using_targeting_geo_region'])) }}\n\nwith report as (\n select *\n from {{ ref('stg_pinterest_ads__pin_promotion_targeting_report') }}\n where lower(targeting_type) = 'region'\n),\n\nregions as (\n select *\n from {{ ref('stg_pinterest_ads__targeting_geo_region') }}\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_pinterest_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\nadvertisers as (\n select *\n from {{ ref('stg_pinterest_ads__advertiser_history') }}\n where is_most_recent_record = True\n),\n\n{% set using_targeting_geo = var('pinterest__using_targeting_geo', true) %}\n{% if using_targeting_geo %}\ncountries as (\n select *\n from {{ ref('stg_pinterest_ads__targeting_geo') }}\n),\n{% endif %}\n\nfields as (\n\n select\n report.source_relation,\n report.date_day,\n regions.region_name,\n regions.region_id,\n report.campaign_id,\n regions.country_id,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n {{ pinterest_ads_persist_pass_through_columns(pass_through_variable='pinterest__pin_promotion_targeting_report_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0) }}\n\n from report\n left join regions\n on report.targeting_value = regions.region_id\n and report.source_relation = regions.source_relation\n\n {{ dbt_utils.group_by(6) }}\n\n),\n\nfinal as (\n select\n fields.*,\n {{ 'countries.country_name,' if using_targeting_geo }}\n advertisers.advertiser_name,\n advertisers.advertiser_id,\n campaigns.campaign_name,\n campaigns.campaign_status,\n campaigns.budget_spend_cap,\n campaigns.lifetime_spend_cap,\n campaigns.created_at as campaign_created_at,\n campaigns.default_ad_group_budget_in_micro_currency,\n campaigns.end_time as campaign_end_time,\n campaigns.is_campaign_budget_optimization,\n campaigns.is_flexible_daily_budgets,\n campaigns.objective_type as campaign_objective_type,\n campaigns.start_time as campaign_start_time\n from fields\n left join campaigns\n on fields.campaign_id = campaigns.campaign_id\n and fields.source_relation = campaigns.source_relation\n left join advertisers\n on campaigns.advertiser_id = advertisers.advertiser_id\n and campaigns.source_relation = advertisers.source_relation\n\n {% if using_targeting_geo %}\n left join countries\n on fields.country_id = countries.country_id\n and fields.source_relation = countries.source_relation\n {% endif %}\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__pin_promotion_targeting_report", "package": null, "version": null}, {"name": "stg_pinterest_ads__targeting_geo_region", "package": null, "version": null}, {"name": "stg_pinterest_ads__campaign_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__advertiser_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__targeting_geo", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.pinterest.pinterest_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report", "model.pinterest.stg_pinterest_ads__targeting_geo_region", "model.pinterest.stg_pinterest_ads__campaign_history", "model.pinterest.stg_pinterest_ads__advertiser_history", "model.pinterest.stg_pinterest_ads__targeting_geo"]}, "compiled_path": "target/compiled/pinterest/models/pinterest_ads__campaign_region_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_targeting_report\"\n where lower(targeting_type) = 'region'\n),\n\nregions as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__targeting_geo_region\"\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\nadvertisers as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_history\"\n where is_most_recent_record = True\n),\n\n\n\ncountries as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__targeting_geo\"\n),\n\n\nfields as (\n\n select\n report.source_relation,\n report.date_day,\n regions.region_name,\n regions.region_id,\n report.campaign_id,\n regions.country_id,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n \n\n\n\n\n\n from report\n left join regions\n on report.targeting_value = regions.region_id\n and report.source_relation = regions.source_relation\n\n group by 1,2,3,4,5,6\n\n),\n\nfinal as (\n select\n fields.*,\n countries.country_name,\n advertisers.advertiser_name,\n advertisers.advertiser_id,\n campaigns.campaign_name,\n campaigns.campaign_status,\n campaigns.budget_spend_cap,\n campaigns.lifetime_spend_cap,\n campaigns.created_at as campaign_created_at,\n campaigns.default_ad_group_budget_in_micro_currency,\n campaigns.end_time as campaign_end_time,\n campaigns.is_campaign_budget_optimization,\n campaigns.is_flexible_daily_budgets,\n campaigns.objective_type as campaign_objective_type,\n campaigns.start_time as campaign_start_time\n from fields\n left join campaigns\n on fields.campaign_id = campaigns.campaign_id\n and fields.source_relation = campaigns.source_relation\n left join advertisers\n on campaigns.advertiser_id = advertisers.advertiser_id\n and campaigns.source_relation = advertisers.source_relation\n\n \n left join countries\n on fields.country_id = countries.country_id\n and fields.source_relation = countries.source_relation\n \n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.pinterest_ads__keyword_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__keyword_report", "resource_type": "model", "package_name": "pinterest", "path": "pinterest_ads__keyword_report.sql", "original_file_path": "models/pinterest_ads__keyword_report.sql", "unique_id": "model.pinterest.pinterest_ads__keyword_report", "fqn": ["pinterest", "pinterest_ads__keyword_report"], "alias": "pinterest_ads__keyword_report", "checksum": {"name": "sha256", "checksum": "0f46d4d8fdbc15ac8d1aa57d53d43e724c966d5024ee99c3f747a6f0e92e6471"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of a keyword at the advertiser, campaign, ad group, and keyword level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "date_day": {"name": "date_day", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "advertiser_name": {"name": "advertiser_name", "description": "Name of the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "campaign_name": {"name": "campaign_name", "description": "Name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "Name of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "keyword_id": {"name": "keyword_id", "description": "Unique identifier of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "match_type": {"name": "match_type", "description": "Type of match the keyword is tied to. Either Exact or Broad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "parent_type": {"name": "parent_type", "description": "Identifier of what grain the parent type is. Ad group or campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_value": {"name": "keyword_value", "description": "The text value that makes upd the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend"]}, "clicks": {"name": "clicks", "description": "The number of paid and earned clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clicks"]}, "impressions": {"name": "impressions", "description": "The number of paid and earned impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impressions"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value": {"name": "total_conversions_value", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/pinterest.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.4016266, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__keyword_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__pinterest_ads_enabled','pinterest__using_keywords'])) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_pinterest_ads__keyword_report') }}\n), \n\nadvertisers as (\n\n select *\n from {{ ref('stg_pinterest_ads__advertiser_history') }}\n where is_most_recent_record = True\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_pinterest_ads__campaign_history') }}\n where is_most_recent_record = True\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_pinterest_ads__ad_group_history') }}\n where is_most_recent_record = True\n), \n\nkeywords as (\n\n select *\n from {{ ref('stg_pinterest_ads__keyword_history') }}\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n report.source_relation,\n report.date_day,\n advertisers.advertiser_name,\n advertisers.advertiser_id,\n campaigns.campaign_name,\n campaigns.campaign_id,\n ad_groups.ad_group_name,\n ad_groups.ad_group_id,\n report.keyword_id,\n keywords.match_type,\n keywords.parent_type,\n keywords.keyword_value,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n {{ pinterest_ads_persist_pass_through_columns(pass_through_variable='pinterest__keyword_report_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0, exclude_fields=['total_conversions','total_conversions_quantity','total_conversions_value']) }}\n\n from report\n left join keywords\n on report.keyword_id = keywords.keyword_id\n and report.source_relation = keywords.source_relation\n left join ad_groups\n on keywords.ad_group_id = ad_groups.ad_group_id\n and keywords.source_relation = ad_groups.source_relation\n left join campaigns\n on ad_groups.campaign_id = campaigns.campaign_id\n and ad_groups.source_relation = campaigns.source_relation\n left join advertisers\n on campaigns.advertiser_id = advertisers.advertiser_id\n and campaigns.source_relation = advertisers.source_relation\n {{ dbt_utils.group_by(12) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__keyword_report", "package": null, "version": null}, {"name": "stg_pinterest_ads__advertiser_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__campaign_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__keyword_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.pinterest.pinterest_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.pinterest.stg_pinterest_ads__keyword_report", "model.pinterest.stg_pinterest_ads__advertiser_history", "model.pinterest.stg_pinterest_ads__campaign_history", "model.pinterest.stg_pinterest_ads__ad_group_history", "model.pinterest.stg_pinterest_ads__keyword_history"]}, "compiled_path": "target/compiled/pinterest/models/pinterest_ads__keyword_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__keyword_report\"\n), \n\nadvertisers as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_history\"\n where is_most_recent_record = True\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_history\"\n where is_most_recent_record = True\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\nkeywords as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__keyword_history\"\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n report.source_relation,\n report.date_day,\n advertisers.advertiser_name,\n advertisers.advertiser_id,\n campaigns.campaign_name,\n campaigns.campaign_id,\n ad_groups.ad_group_name,\n ad_groups.ad_group_id,\n report.keyword_id,\n keywords.match_type,\n keywords.parent_type,\n keywords.keyword_value,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n \n\n\n\n\n\n from report\n left join keywords\n on report.keyword_id = keywords.keyword_id\n and report.source_relation = keywords.source_relation\n left join ad_groups\n on keywords.ad_group_id = ad_groups.ad_group_id\n and keywords.source_relation = ad_groups.source_relation\n left join campaigns\n on ad_groups.campaign_id = campaigns.campaign_id\n and ad_groups.source_relation = campaigns.source_relation\n left join advertisers\n on campaigns.advertiser_id = advertisers.advertiser_id\n and campaigns.source_relation = advertisers.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.pinterest_ads__advertiser_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__advertiser_report", "resource_type": "model", "package_name": "pinterest", "path": "pinterest_ads__advertiser_report.sql", "original_file_path": "models/pinterest_ads__advertiser_report.sql", "unique_id": "model.pinterest.pinterest_ads__advertiser_report", "fqn": ["pinterest", "pinterest_ads__advertiser_report"], "alias": "pinterest_ads__advertiser_report", "checksum": {"name": "sha256", "checksum": "760cc4e0bdd8d9482a50666721061d52ab49949e99e0417d874adff43694f960"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of an advertiser on the Pinterest Ads platform.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "date_day": {"name": "date_day", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "advertiser_name": {"name": "advertiser_name", "description": "Name of the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "currency_code": {"name": "currency_code", "description": "The currency code which the advertiser is set up using.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country": {"name": "country", "description": "The country code where the advertiser is located.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend"]}, "clicks": {"name": "clicks", "description": "The number of paid and earned clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clicks"]}, "impressions": {"name": "impressions", "description": "The number of paid and earned impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impressions"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value": {"name": "total_conversions_value", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/pinterest.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.3995962, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__advertiser_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_pinterest_ads__advertiser_report') }}\n), \n\nadvertisers as (\n\n select *\n from {{ ref('stg_pinterest_ads__advertiser_history') }}\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n report.source_relation,\n report.date_day,\n advertisers.advertiser_name,\n report.advertiser_id,\n advertisers.currency_code,\n advertisers.country,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n {{ pinterest_ads_persist_pass_through_columns(pass_through_variable='pinterest__advertiser_report_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0, exclude_fields=['total_conversions','total_conversions_quantity','total_conversions_value']) }}\n\n from report\n left join advertisers\n on cast(report.advertiser_id as {{ dbt.type_string() }}) = cast(advertisers.advertiser_id as {{ dbt.type_string() }})\n and report.source_relation = advertisers.source_relation\n {{ dbt_utils.group_by(6) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__advertiser_report", "package": null, "version": null}, {"name": "stg_pinterest_ads__advertiser_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.pinterest.pinterest_ads_persist_pass_through_columns", "macro.dbt.type_string", "macro.dbt_utils.group_by"], "nodes": ["model.pinterest.stg_pinterest_ads__advertiser_report", "model.pinterest.stg_pinterest_ads__advertiser_history"]}, "compiled_path": "target/compiled/pinterest/models/pinterest_ads__advertiser_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_report\"\n), \n\nadvertisers as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_history\"\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n report.source_relation,\n report.date_day,\n advertisers.advertiser_name,\n report.advertiser_id,\n advertisers.currency_code,\n advertisers.country,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n \n\n\n\n\n\n from report\n left join advertisers\n on cast(report.advertiser_id as TEXT) = cast(advertisers.advertiser_id as TEXT)\n and report.source_relation = advertisers.source_relation\n group by 1,2,3,4,5,6\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.pinterest_ads__url_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__url_report", "resource_type": "model", "package_name": "pinterest", "path": "pinterest_ads__url_report.sql", "original_file_path": "models/pinterest_ads__url_report.sql", "unique_id": "model.pinterest.pinterest_ads__url_report", "fqn": ["pinterest", "pinterest_ads__url_report"], "alias": "pinterest_ads__url_report", "checksum": {"name": "sha256", "checksum": "73f2fb65808d3d2f71b6532bfd5b44ed36d2eb757d5a9e2db13de677dfd253f8"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the advertiser, campaign, ad group, and url level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "date_day": {"name": "date_day", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "advertiser_name": {"name": "advertiser_name", "description": "Name of the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "Status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_status": {"name": "ad_group_status", "description": "Status of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "destination_url": {"name": "destination_url", "description": "Pin destination URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pin_promotion_id": {"name": "pin_promotion_id", "description": "The ID of the related Pin promotion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.pin_promotion_id"]}, "pin_name": {"name": "pin_name", "description": "Pin promotion name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pin_status": {"name": "pin_status", "description": "The status of the Pin promotion. One of \"ACTIVE\", \"ARCHIVED\", \"PAUSED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_type": {"name": "creative_type", "description": "The creative type. \nOne of \"APP\", \"APP_VIDEO\", \"BOARD\", \"CAROUSEL\", \"CINEMATIC\", \"COMMERCE\", \"MAX_VIDEO\", \"NATIVE_VIDEO\", \"REGULAR\", \n\"SEARCH_PROMINENCE\", \"SEARCH_PROMINENCE_CAROUSEL\", \"SHOPPING\", \"SHOP_THE_PIN\", \"THIRD_PARTY\", or \"VIDEO\".\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_host": {"name": "url_host", "description": "The URL host of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_path": {"name": "url_path", "description": "The URL path of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_source": {"name": "utm_source", "description": "The utm_source parameter of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_medium": {"name": "utm_medium", "description": "The utm_medium parameter of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_campaign": {"name": "utm_campaign", "description": "The utm_campaign parameter of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_content": {"name": "utm_content", "description": "The utm_content parameter of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_term": {"name": "utm_term", "description": "The utm_term parameter of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of paid and earned impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impressions"]}, "clicks": {"name": "clicks", "description": "The number of paid and earned clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clicks"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value": {"name": "total_conversions_value", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/pinterest.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.3953464, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__url_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_pinterest_ads__pin_promotion_report') }}\n), \n\npins as (\n\n select *\n from {{ ref('stg_pinterest_ads__pin_promotion_history') }}\n where is_most_recent_record = True\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_pinterest_ads__ad_group_history') }}\n where is_most_recent_record = True\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_pinterest_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\nadvertisers as (\n\n select *\n from {{ ref('stg_pinterest_ads__advertiser_history') }}\n where is_most_recent_record = True\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n campaigns.advertiser_id,\n advertisers.advertiser_name,\n report.campaign_id,\n campaigns.campaign_name,\n campaigns.campaign_status,\n report.ad_group_id,\n ad_groups.ad_group_name,\n ad_groups.ad_group_status,\n pins.destination_url,\n pins.creative_type,\n report.pin_promotion_id,\n pins.pin_name,\n pins.pin_status,\n pins.base_url,\n pins.url_host,\n pins.url_path,\n pins.utm_source,\n pins.utm_medium,\n pins.utm_campaign,\n pins.utm_content,\n pins.utm_term,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n {{ pinterest_ads_persist_pass_through_columns(pass_through_variable='pinterest__pin_promotion_report_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0, exclude_fields=['total_conversions','total_conversions_quantity','total_conversions_value']) }}\n\n from report \n left join pins \n on report.pin_promotion_id = pins.pin_promotion_id\n and report.source_relation = pins.source_relation\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join campaigns \n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join advertisers\n on campaigns.advertiser_id = advertisers.advertiser_id\n and campaigns.source_relation = advertisers.source_relation\n\n {% if var('ad_reporting__url_report__using_null_filter', True) %}\n where pins.destination_url is not null\n {% endif %}\n\n {{ dbt_utils.group_by(23) }}\n)\n\nselect * \nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__pin_promotion_report", "package": null, "version": null}, {"name": "stg_pinterest_ads__pin_promotion_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__campaign_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__advertiser_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.pinterest.pinterest_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.pinterest.stg_pinterest_ads__pin_promotion_report", "model.pinterest.stg_pinterest_ads__pin_promotion_history", "model.pinterest.stg_pinterest_ads__ad_group_history", "model.pinterest.stg_pinterest_ads__campaign_history", "model.pinterest.stg_pinterest_ads__advertiser_history"]}, "compiled_path": "target/compiled/pinterest/models/pinterest_ads__url_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_report\"\n), \n\npins as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_history\"\n where is_most_recent_record = True\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\nadvertisers as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_history\"\n where is_most_recent_record = True\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n campaigns.advertiser_id,\n advertisers.advertiser_name,\n report.campaign_id,\n campaigns.campaign_name,\n campaigns.campaign_status,\n report.ad_group_id,\n ad_groups.ad_group_name,\n ad_groups.ad_group_status,\n pins.destination_url,\n pins.creative_type,\n report.pin_promotion_id,\n pins.pin_name,\n pins.pin_status,\n pins.base_url,\n pins.url_host,\n pins.url_path,\n pins.utm_source,\n pins.utm_medium,\n pins.utm_campaign,\n pins.utm_content,\n pins.utm_term,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n \n\n\n\n\n\n from report \n left join pins \n on report.pin_promotion_id = pins.pin_promotion_id\n and report.source_relation = pins.source_relation\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join campaigns \n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join advertisers\n on campaigns.advertiser_id = advertisers.advertiser_id\n and campaigns.source_relation = advertisers.source_relation\n\n \n where pins.destination_url is not null\n \n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23\n)\n\nselect * \nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.pinterest_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__campaign_report", "resource_type": "model", "package_name": "pinterest", "path": "pinterest_ads__campaign_report.sql", "original_file_path": "models/pinterest_ads__campaign_report.sql", "unique_id": "model.pinterest.pinterest_ads__campaign_report", "fqn": ["pinterest", "pinterest_ads__campaign_report"], "alias": "pinterest_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "eb0e3fc0893458e6bd25c059bb5b5e852bbec7dccc62b4b756f04c6f774521f4"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the advertiser and campaign level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "date_day": {"name": "date_day", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "advertiser_name": {"name": "advertiser_name", "description": "Name of the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "Status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of paid and earned impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impressions"]}, "clicks": {"name": "clicks", "description": "The number of paid and earned clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clicks"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value": {"name": "total_conversions_value", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/pinterest.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.3980434, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\nwith report as (\n select *\n from {{ ref('stg_pinterest_ads__campaign_report') }}\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_pinterest_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\nadvertisers as (\n select *\n from {{ ref('stg_pinterest_ads__advertiser_history') }}\n where is_most_recent_record = True\n),\n\nfields as (\n\n select\n report.source_relation,\n report.date_day,\n advertisers.advertiser_name,\n advertisers.advertiser_id,\n campaigns.campaign_name,\n report.campaign_id,\n campaigns.campaign_status,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n {{ pinterest_ads_persist_pass_through_columns(pass_through_variable='pinterest__campaign_report_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0, exclude_fields=['total_conversions','total_conversions_quantity','total_conversions_value']) }}\n\n from report\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join advertisers\n on campaigns.advertiser_id = advertisers.advertiser_id\n and campaigns.source_relation = advertisers.source_relation\n {{ dbt_utils.group_by(7) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__campaign_report", "package": null, "version": null}, {"name": "stg_pinterest_ads__campaign_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__advertiser_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.pinterest.pinterest_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.pinterest.stg_pinterest_ads__campaign_report", "model.pinterest.stg_pinterest_ads__campaign_history", "model.pinterest.stg_pinterest_ads__advertiser_history"]}, "compiled_path": "target/compiled/pinterest/models/pinterest_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_report\"\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\nadvertisers as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_history\"\n where is_most_recent_record = True\n),\n\nfields as (\n\n select\n report.source_relation,\n report.date_day,\n advertisers.advertiser_name,\n advertisers.advertiser_id,\n campaigns.campaign_name,\n report.campaign_id,\n campaigns.campaign_status,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n \n\n\n\n\n\n from report\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join advertisers\n on campaigns.advertiser_id = advertisers.advertiser_id\n and campaigns.source_relation = advertisers.source_relation\n group by 1,2,3,4,5,6,7\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.pinterest_ads__campaign_country_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__campaign_country_report", "resource_type": "model", "package_name": "pinterest", "path": "pinterest_ads__campaign_country_report.sql", "original_file_path": "models/pinterest_ads__campaign_country_report.sql", "unique_id": "model.pinterest.pinterest_ads__campaign_country_report", "fqn": ["pinterest", "pinterest_ads__campaign_country_report"], "alias": "pinterest_ads__campaign_country_report", "checksum": {"name": "sha256", "checksum": "4185ef29d4372f921ab36e092e0e57874aab8e25071e20a0f26392ea666643ad"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the country and campaign level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "date_day": {"name": "date_day", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "country_id": {"name": "country_id", "description": "The ID of the targeted country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.country_id"]}, "country_name": {"name": "country_name", "description": "Name of the targeted country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "Status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "advertiser_name": {"name": "advertiser_name", "description": "Name of the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_created_at": {"name": "campaign_created_at", "description": "Campaign creation time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_start_time": {"name": "campaign_start_time", "description": "Timestamp when the campaign became active or was scheduled to start.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_end_time": {"name": "campaign_end_time", "description": "Timestamp when the campaign ended or is scheduled to end.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_spend_cap": {"name": "budget_spend_cap", "description": "Maximum amount allowed to be spent over a specified budget period for the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lifetime_spend_cap": {"name": "lifetime_spend_cap", "description": "Total maximum spend allowed across the entire lifespan of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_objective_type": {"name": "campaign_objective_type", "description": "The primary goal of the campaign (e.g., brand awareness, conversions, video views).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "default_ad_group_budget_in_micro_currency": {"name": "default_ad_group_budget_in_micro_currency", "description": "When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_campaign_budget_optimization": {"name": "is_campaign_budget_optimization", "description": "Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_flexible_daily_budgets": {"name": "is_flexible_daily_budgets", "description": "Determine if a campaign has flexible daily budgets setup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of paid and earned impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impressions"]}, "clicks": {"name": "clicks", "description": "The number of paid and earned clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clicks"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value": {"name": "total_conversions_value", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/pinterest.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.4078178, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_country_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__pinterest_ads_enabled','pinterest__using_pin_promotion_targeting_report', 'pinterest__using_targeting_geo'])) }}\n\nwith report as (\n select *\n from {{ ref('stg_pinterest_ads__pin_promotion_targeting_report') }}\n where lower(targeting_type) = 'country'\n),\n\ncountries as (\n select *\n from {{ ref('stg_pinterest_ads__targeting_geo') }}\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_pinterest_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\nadvertisers as (\n select *\n from {{ ref('stg_pinterest_ads__advertiser_history') }}\n where is_most_recent_record = True\n),\n\nfields as (\n\n select\n report.source_relation,\n report.date_day,\n countries.country_name,\n countries.country_id,\n report.campaign_id,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n {{ pinterest_ads_persist_pass_through_columns(pass_through_variable='pinterest__pin_promotion_targeting_report_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0) }}\n\n from report\n left join countries\n on report.targeting_value = countries.country_id\n and report.source_relation = countries.source_relation\n\n {{ dbt_utils.group_by(5) }}\n),\n\nfinal as (\n select\n fields.*,\n advertisers.advertiser_name,\n advertisers.advertiser_id,\n campaigns.campaign_name,\n campaigns.campaign_status,\n campaigns.budget_spend_cap,\n campaigns.lifetime_spend_cap,\n campaigns.created_at as campaign_created_at,\n campaigns.default_ad_group_budget_in_micro_currency,\n campaigns.end_time as campaign_end_time,\n campaigns.is_campaign_budget_optimization,\n campaigns.is_flexible_daily_budgets,\n campaigns.objective_type as campaign_objective_type,\n campaigns.start_time as campaign_start_time\n from fields\n left join campaigns\n on fields.campaign_id = campaigns.campaign_id\n and fields.source_relation = campaigns.source_relation\n left join advertisers\n on campaigns.advertiser_id = advertisers.advertiser_id\n and campaigns.source_relation = advertisers.source_relation\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__pin_promotion_targeting_report", "package": null, "version": null}, {"name": "stg_pinterest_ads__targeting_geo", "package": null, "version": null}, {"name": "stg_pinterest_ads__campaign_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__advertiser_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.pinterest.pinterest_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report", "model.pinterest.stg_pinterest_ads__targeting_geo", "model.pinterest.stg_pinterest_ads__campaign_history", "model.pinterest.stg_pinterest_ads__advertiser_history"]}, "compiled_path": "target/compiled/pinterest/models/pinterest_ads__campaign_country_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_targeting_report\"\n where lower(targeting_type) = 'country'\n),\n\ncountries as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__targeting_geo\"\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\nadvertisers as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_history\"\n where is_most_recent_record = True\n),\n\nfields as (\n\n select\n report.source_relation,\n report.date_day,\n countries.country_name,\n countries.country_id,\n report.campaign_id,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n \n\n\n\n\n\n from report\n left join countries\n on report.targeting_value = countries.country_id\n and report.source_relation = countries.source_relation\n\n group by 1,2,3,4,5\n),\n\nfinal as (\n select\n fields.*,\n advertisers.advertiser_name,\n advertisers.advertiser_id,\n campaigns.campaign_name,\n campaigns.campaign_status,\n campaigns.budget_spend_cap,\n campaigns.lifetime_spend_cap,\n campaigns.created_at as campaign_created_at,\n campaigns.default_ad_group_budget_in_micro_currency,\n campaigns.end_time as campaign_end_time,\n campaigns.is_campaign_budget_optimization,\n campaigns.is_flexible_daily_budgets,\n campaigns.objective_type as campaign_objective_type,\n campaigns.start_time as campaign_start_time\n from fields\n left join campaigns\n on fields.campaign_id = campaigns.campaign_id\n and fields.source_relation = campaigns.source_relation\n left join advertisers\n on campaigns.advertiser_id = advertisers.advertiser_id\n and campaigns.source_relation = advertisers.source_relation\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.pinterest_ads__pin_promotion_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__pin_promotion_report", "resource_type": "model", "package_name": "pinterest", "path": "pinterest_ads__pin_promotion_report.sql", "original_file_path": "models/pinterest_ads__pin_promotion_report.sql", "unique_id": "model.pinterest.pinterest_ads__pin_promotion_report", "fqn": ["pinterest", "pinterest_ads__pin_promotion_report"], "alias": "pinterest_ads__pin_promotion_report", "checksum": {"name": "sha256", "checksum": "5470dc091d896e0188b3ebd869d9fb1d90a1070c377e7362984c772f4b197f4f"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the advertiser, campaign, ad group, and pin level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "date_day": {"name": "date_day", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "advertiser_name": {"name": "advertiser_name", "description": "Name of the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "Name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "Status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "Name of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_status": {"name": "ad_group_status", "description": "Status of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_type": {"name": "creative_type", "description": "The creative type. \nOne of \"APP\", \"APP_VIDEO\", \"BOARD\", \"CAROUSEL\", \"CINEMATIC\", \"COMMERCE\", \"MAX_VIDEO\", \"NATIVE_VIDEO\", \"REGULAR\", \n\"SEARCH_PROMINENCE\", \"SEARCH_PROMINENCE_CAROUSEL\", \"SHOPPING\", \"SHOP_THE_PIN\", \"THIRD_PARTY\", or \"VIDEO\".\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pin_promotion_id": {"name": "pin_promotion_id", "description": "The ID of the related Pin promotion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.pin_promotion_id"]}, "pin_name": {"name": "pin_name", "description": "Name of the pin.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pin_status": {"name": "pin_status", "description": "Status of the pin.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "destination_url": {"name": "destination_url", "description": "Pin destination URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of paid and earned clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clicks"]}, "impressions": {"name": "impressions", "description": "The number of paid and earned impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value": {"name": "total_conversions_value", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/pinterest.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.403241, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__pin_promotion_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_pinterest_ads__pin_promotion_report') }}\n), \n\npins as (\n\n select *\n from {{ ref('stg_pinterest_ads__pin_promotion_history') }}\n where is_most_recent_record = True\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_pinterest_ads__ad_group_history') }}\n where is_most_recent_record = True\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_pinterest_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\nadvertisers as (\n\n select *\n from {{ ref('stg_pinterest_ads__advertiser_history') }}\n where is_most_recent_record = True\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n campaigns.advertiser_id,\n advertisers.advertiser_name,\n report.campaign_id,\n campaigns.campaign_name,\n campaigns.campaign_status,\n report.ad_group_id,\n ad_groups.ad_group_name,\n ad_groups.ad_group_status,\n pins.creative_type,\n report.pin_promotion_id,\n pins.pin_name,\n pins.pin_status,\n pins.destination_url,\n pins.base_url,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n {{ pinterest_ads_persist_pass_through_columns(pass_through_variable='pinterest__pin_promotion_report_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0, exclude_fields=['total_conversions','total_conversions_quantity','total_conversions_value']) }}\n\n from report \n left join pins \n on report.pin_promotion_id = pins.pin_promotion_id\n and report.source_relation = pins.source_relation\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join campaigns \n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join advertisers\n on campaigns.advertiser_id = advertisers.advertiser_id\n and campaigns.source_relation = advertisers.source_relation\n\n {{ dbt_utils.group_by(16) }}\n)\n\nselect * \nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__pin_promotion_report", "package": null, "version": null}, {"name": "stg_pinterest_ads__pin_promotion_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__campaign_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__advertiser_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.pinterest.pinterest_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.pinterest.stg_pinterest_ads__pin_promotion_report", "model.pinterest.stg_pinterest_ads__pin_promotion_history", "model.pinterest.stg_pinterest_ads__ad_group_history", "model.pinterest.stg_pinterest_ads__campaign_history", "model.pinterest.stg_pinterest_ads__advertiser_history"]}, "compiled_path": "target/compiled/pinterest/models/pinterest_ads__pin_promotion_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_report\"\n), \n\npins as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_history\"\n where is_most_recent_record = True\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\nadvertisers as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_history\"\n where is_most_recent_record = True\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n campaigns.advertiser_id,\n advertisers.advertiser_name,\n report.campaign_id,\n campaigns.campaign_name,\n campaigns.campaign_status,\n report.ad_group_id,\n ad_groups.ad_group_name,\n ad_groups.ad_group_status,\n pins.creative_type,\n report.pin_promotion_id,\n pins.pin_name,\n pins.pin_status,\n pins.destination_url,\n pins.base_url,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n \n\n\n\n\n\n from report \n left join pins \n on report.pin_promotion_id = pins.pin_promotion_id\n and report.source_relation = pins.source_relation\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join campaigns \n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join advertisers\n on campaigns.advertiser_id = advertisers.advertiser_id\n and campaigns.source_relation = advertisers.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16\n)\n\nselect * \nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.pinterest_ads__ad_group_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__ad_group_report", "resource_type": "model", "package_name": "pinterest", "path": "pinterest_ads__ad_group_report.sql", "original_file_path": "models/pinterest_ads__ad_group_report.sql", "unique_id": "model.pinterest.pinterest_ads__ad_group_report", "fqn": ["pinterest", "pinterest_ads__ad_group_report"], "alias": "pinterest_ads__ad_group_report", "checksum": {"name": "sha256", "checksum": "41209526d0e948e0f77cd373cdf3cc565500d3bbec72419b163cbab307777e62"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the campaign, advertiser, and ad group level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "date_day": {"name": "date_day", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "advertiser_name": {"name": "advertiser_name", "description": "Name of the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "Status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_status": {"name": "ad_group_status", "description": "Status of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Ad group creation time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_time": {"name": "start_time", "description": "Ad group start time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_time": {"name": "end_time", "description": "Ad group end time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of paid and earned impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impressions"]}, "clicks": {"name": "clicks", "description": "The number of paid and earned clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clicks"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value": {"name": "total_conversions_value", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/pinterest.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.3968554, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__ad_group_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_pinterest_ads__ad_group_report') }}\n), \n\nadvertisers as (\n\n select *\n from {{ ref('stg_pinterest_ads__advertiser_history') }}\n where is_most_recent_record = True\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_pinterest_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\nad_groups as (\n\n select *\n from {{ ref('stg_pinterest_ads__ad_group_history') }}\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n report.source_relation,\n report.date_day,\n advertisers.advertiser_name,\n advertisers.advertiser_id,\n campaigns.campaign_name,\n campaigns.campaign_status,\n campaigns.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n ad_groups.created_at,\n ad_groups.start_time,\n ad_groups.end_time,\n ad_groups.ad_group_status,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n {{ pinterest_ads_persist_pass_through_columns(pass_through_variable='pinterest__ad_group_report_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0, exclude_fields=['total_conversions','total_conversions_quantity','total_conversions_value']) }}\n\n from report\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join campaigns\n on ad_groups.campaign_id = campaigns.campaign_id\n and ad_groups.source_relation = campaigns.source_relation\n left join advertisers\n on campaigns.advertiser_id = advertisers.advertiser_id\n and campaigns.source_relation = advertisers.source_relation\n {{ dbt_utils.group_by(13) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__ad_group_report", "package": null, "version": null}, {"name": "stg_pinterest_ads__advertiser_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__campaign_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__ad_group_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.pinterest.pinterest_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.pinterest.stg_pinterest_ads__ad_group_report", "model.pinterest.stg_pinterest_ads__advertiser_history", "model.pinterest.stg_pinterest_ads__campaign_history", "model.pinterest.stg_pinterest_ads__ad_group_history"]}, "compiled_path": "target/compiled/pinterest/models/pinterest_ads__ad_group_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__ad_group_report\"\n), \n\nadvertisers as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_history\"\n where is_most_recent_record = True\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n report.source_relation,\n report.date_day,\n advertisers.advertiser_name,\n advertisers.advertiser_id,\n campaigns.campaign_name,\n campaigns.campaign_status,\n campaigns.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n ad_groups.created_at,\n ad_groups.start_time,\n ad_groups.end_time,\n ad_groups.ad_group_status,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n \n\n\n\n\n\n from report\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join campaigns\n on ad_groups.campaign_id = campaigns.campaign_id\n and ad_groups.source_relation = campaigns.source_relation\n left join advertisers\n on campaigns.advertiser_id = advertisers.advertiser_id\n and campaigns.source_relation = advertisers.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__pin_promotion_targeting_report", "resource_type": "model", "package_name": "pinterest", "path": "staging/stg_pinterest_ads__pin_promotion_targeting_report.sql", "original_file_path": "models/staging/stg_pinterest_ads__pin_promotion_targeting_report.sql", "unique_id": "model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report", "fqn": ["pinterest", "staging", "stg_pinterest_ads__pin_promotion_targeting_report"], "alias": "stg_pinterest_ads__pin_promotion_targeting_report", "checksum": {"name": "sha256", "checksum": "a2fd66cf671238a7e85369791d7fea02f63b57a760f53a04cea41b4b33357d23"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Contains performance metrics for promoted Pins segmented by applied targeting criteria, including targeting type, value, and related campaign metadata.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}, "date_day": {"name": "date_day", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "targeting_type": {"name": "targeting_type", "description": "Reporting targeting type for ads. Possible values 'KEYWORD', 'APPTYPE', 'GENDER', 'LOCATION', 'PLACEMENT', 'COUNTRY', 'TARGETED_INTEREST', 'PINNER_INTEREST', 'AUDIENCE_INCLUDE', 'GEO', 'AGE_BUCKET', 'REGION', 'QUIZ_RESULT', 'AGE_BUCKET_AND_GENDER'", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "targeting_value": {"name": "targeting_value", "description": "The specific value applied within the targeting type (e.g., 'Fashion' for interest, 'New York' for location).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "pin_promotion_id": {"name": "pin_promotion_id", "description": "The ID of the related Pin promotion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.pin_promotion_id"]}, "impressions": {"name": "impressions", "description": "The number of paid and earned impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impressions"]}, "clicks": {"name": "clicks", "description": "The number of paid and earned clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clicks"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value": {"name": "total_conversions_value", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/staging/stg_pinterest_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.6199968, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_targeting_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__pinterest_ads_enabled','pinterest__using_pin_promotion_targeting_report'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_pinterest_ads__pin_promotion_targeting_report_tmp') }}\n\n), fields as (\n\n select\n {{ fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_pinterest_ads__pin_promotion_targeting_report_tmp')),\n staging_columns=get_pin_promotion_targeting_report_columns()\n ) }}\n\n {{ fivetran_utils.apply_source_relation(package_name='pinterest_ads') }}\n \n from base\n\n), final as (\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast(date as {{ dbt.type_timestamp() }}) as date_day,\n cast(targeting_type as {{ dbt.type_string() }}) as targeting_type,\n cast(targeting_value as {{ dbt.type_string() }}) as targeting_value,\n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id,\n cast(advertiser_id as {{ dbt.type_string() }}) as advertiser_id,\n cast(campaign_id as {{ dbt.type_string() }}) as campaign_id,\n cast(pin_promotion_id as {{ dbt.type_string() }}) as pin_promotion_id,\n coalesce(impression_1,0) + coalesce(impression_2,0) as impressions,\n coalesce(clickthrough_1,0) + coalesce(clickthrough_2,0) as clicks,\n coalesce(spend_in_micro_dollar, 0) / 1000000.0 as spend,\n coalesce(total_conversions, 0) as total_conversions,\n coalesce(total_conversions_quantity, 0) as total_conversions_quantity,\n coalesce(total_conversions_value_in_micro_dollar, 0) / 1000000.0 as total_conversions_value\n\n {{ pinterest_ads_fill_pass_through_columns(pass_through_fields=var('pinterest__pin_promotion_targeting_report_passthrough_metrics')) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__pin_promotion_targeting_report_tmp", "package": null, "version": null}, {"name": "stg_pinterest_ads__pin_promotion_targeting_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.pinterest.get_pin_promotion_targeting_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.pinterest.pinterest_ads_fill_pass_through_columns"], "nodes": ["model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report_tmp"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads__pin_promotion_targeting_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_targeting_report_tmp\"\n\n), fields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n date as date,\n targeting_type as targeting_type,\n targeting_value as targeting_value,\n ad_group_id as ad_group_id,\n advertiser_id as advertiser_id,\n campaign_id as campaign_id,\n pin_promotion_id as pin_promotion_id,\n clickthrough_1 as clickthrough_1,\n clickthrough_2 as clickthrough_2,\n impression_1 as impression_1,\n impression_2 as impression_2,\n spend_in_micro_dollar as spend_in_micro_dollar,\n total_conversions as total_conversions,\n total_conversions_quantity as total_conversions_quantity,\n total_conversions_value_in_micro_dollar as total_conversions_value_in_micro_dollar\n\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.pinterest_ads' as TEXT) as source_relation\n\n \n from base\n\n), final as (\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n cast(date as timestamp) as date_day,\n cast(targeting_type as TEXT) as targeting_type,\n cast(targeting_value as TEXT) as targeting_value,\n cast(ad_group_id as TEXT) as ad_group_id,\n cast(advertiser_id as TEXT) as advertiser_id,\n cast(campaign_id as TEXT) as campaign_id,\n cast(pin_promotion_id as TEXT) as pin_promotion_id,\n coalesce(impression_1,0) + coalesce(impression_2,0) as impressions,\n coalesce(clickthrough_1,0) + coalesce(clickthrough_2,0) as clicks,\n coalesce(spend_in_micro_dollar, 0) / 1000000.0 as spend,\n coalesce(total_conversions, 0) as total_conversions,\n coalesce(total_conversions_quantity, 0) as total_conversions_quantity,\n coalesce(total_conversions_value_in_micro_dollar, 0) / 1000000.0 as total_conversions_value\n\n \t\n\n\t\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__pin_promotion_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__pin_promotion_report", "resource_type": "model", "package_name": "pinterest", "path": "staging/stg_pinterest_ads__pin_promotion_report.sql", "original_file_path": "models/staging/stg_pinterest_ads__pin_promotion_report.sql", "unique_id": "model.pinterest.stg_pinterest_ads__pin_promotion_report", "fqn": ["pinterest", "staging", "stg_pinterest_ads__pin_promotion_report"], "alias": "stg_pinterest_ads__pin_promotion_report", "checksum": {"name": "sha256", "checksum": "25ee3060dcc5e04ae50f85d7b42326c2088c71530eac77bf3ccacee2b154c896"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Pinterest Pin promotion by ad group, campaign, and advertiser.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "date_day": {"name": "date_day", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "pin_promotion_id": {"name": "pin_promotion_id", "description": "The ID of the related Pin promotion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.pin_promotion_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "impressions": {"name": "impressions", "description": "The number of paid and earned impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impressions"]}, "clicks": {"name": "clicks", "description": "The number of paid and earned clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clicks"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value": {"name": "total_conversions_value", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/staging/stg_pinterest_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.611097, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_pinterest_ads__pin_promotion_report_tmp') }}\n), \n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_pinterest_ads__pin_promotion_report_tmp')),\n staging_columns=get_pin_promotion_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='pinterest_ads') }}\n\n from base\n), \n\nfinal as (\n\n select\n source_relation, \n {{ dbt.date_trunc('day', 'date') }} as date_day,\n cast(pin_promotion_id as {{ dbt.type_string() }}) as pin_promotion_id,\n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id,\n cast(campaign_id as {{ dbt.type_string() }}) as campaign_id,\n cast(advertiser_id as {{ dbt.type_string() }}) as advertiser_id,\n coalesce(impression_1,0) + coalesce(impression_2,0) as impressions,\n coalesce(clickthrough_1,0) + coalesce(clickthrough_2,0) as clicks,\n coalesce(spend_in_micro_dollar, 0) / 1000000.0 as spend,\n coalesce(total_conversions, 0) as total_conversions,\n coalesce(total_conversions_quantity, 0) as total_conversions_quantity,\n coalesce(total_conversions_value_in_micro_dollar, 0) / 1000000.0 as total_conversions_value\n\n {{ pinterest_ads_fill_pass_through_columns(pass_through_fields=var('pinterest__pin_promotion_report_passthrough_metrics'), except=['total_conversions','total_conversions_quantity','total_conversions_value']) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__pin_promotion_report_tmp", "package": null, "version": null}, {"name": "stg_pinterest_ads__pin_promotion_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.pinterest.get_pin_promotion_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.date_trunc", "macro.dbt.type_string", "macro.pinterest.pinterest_ads_fill_pass_through_columns"], "nodes": ["model.pinterest.stg_pinterest_ads__pin_promotion_report_tmp"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads__pin_promotion_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_report_tmp\"\n), \n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n ad_group_id as ad_group_id,\n advertiser_id as advertiser_id,\n campaign_id as campaign_id,\n clickthrough_1 as clickthrough_1,\n clickthrough_2 as clickthrough_2,\n date as date,\n impression_1 as impression_1,\n impression_2 as impression_2,\n pin_promotion_id as pin_promotion_id,\n spend_in_micro_dollar as spend_in_micro_dollar,\n total_conversions as total_conversions,\n total_conversions_quantity as total_conversions_quantity,\n total_conversions_value_in_micro_dollar as total_conversions_value_in_micro_dollar\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.pinterest_ads' as TEXT) as source_relation\n\n\n from base\n), \n\nfinal as (\n\n select\n source_relation, \n date_trunc('day', date) as date_day,\n cast(pin_promotion_id as TEXT) as pin_promotion_id,\n cast(ad_group_id as TEXT) as ad_group_id,\n cast(campaign_id as TEXT) as campaign_id,\n cast(advertiser_id as TEXT) as advertiser_id,\n coalesce(impression_1,0) + coalesce(impression_2,0) as impressions,\n coalesce(clickthrough_1,0) + coalesce(clickthrough_2,0) as clicks,\n coalesce(spend_in_micro_dollar, 0) / 1000000.0 as spend,\n coalesce(total_conversions, 0) as total_conversions,\n coalesce(total_conversions_quantity, 0) as total_conversions_quantity,\n coalesce(total_conversions_value_in_micro_dollar, 0) / 1000000.0 as total_conversions_value\n\n \t\n\n\t\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__ad_group_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__ad_group_history", "resource_type": "model", "package_name": "pinterest", "path": "staging/stg_pinterest_ads__ad_group_history.sql", "original_file_path": "models/staging/stg_pinterest_ads__ad_group_history.sql", "unique_id": "model.pinterest.stg_pinterest_ads__ad_group_history", "fqn": ["pinterest", "staging", "stg_pinterest_ads__ad_group_history"], "alias": "stg_pinterest_ads__ad_group_history", "checksum": {"name": "sha256", "checksum": "1883248b7841561a14c66736bfe1c8e4186dabcdb8631f5cff2b193b0948d9a3"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of a Pinterest Ad Group.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Parent Campaign ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Ad group creation time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_status": {"name": "ad_group_status", "description": "The status of the Ad group. One of \"ACTIVE\", \"ARCHIVED\", \"PAUSED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "start_time": {"name": "start_time", "description": "Ad group start time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_time": {"name": "end_time", "description": "Ad group end time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pacing_delivery_type": {"name": "pacing_delivery_type", "description": "Ad group pacing delivery type. With ACCELERATED, an ad group budget is spent as fast as possible. With STANDARD, an ad group budget is spent smoothly over a day. When using CBO, only the STANDARD pacing delivery type is allowed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement_group": {"name": "placement_group", "description": "The placement group. \"ALL\", \"SEARCH\", \"BROWSE\", or \"OTHER\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "summary_status": {"name": "summary_status", "description": "Summary status. \"RUNNING\", \"PAUSED\", \"NOT_STARTED\", \"COMPLETED\", \"ADVERTISER_DISABLED\", \"ARCHIVED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether the record is the most recent version of the object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/staging/stg_pinterest_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.6070564, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__ad_group_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_pinterest_ads__ad_group_history_tmp') }}\n), \n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_pinterest_ads__ad_group_history_tmp')),\n staging_columns=get_ad_group_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='pinterest_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n cast(id as {{ dbt.type_string() }}) as ad_group_id,\n name as ad_group_name,\n status as ad_group_status,\n ad_account_id as advertiser_id,\n _fivetran_synced,\n cast(campaign_id as {{ dbt.type_string() }}) as campaign_id,\n created_time as created_at,\n end_time,\n pacing_delivery_type,\n placement_group,\n start_time,\n summary_status,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='pinterest_ads') }} order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__ad_group_history_tmp", "package": null, "version": null}, {"name": "stg_pinterest_ads__ad_group_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.pinterest.get_ad_group_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.pinterest.stg_pinterest_ads__ad_group_history_tmp"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads__ad_group_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__ad_group_history_tmp\"\n), \n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n campaign_id as campaign_id,\n created_time as created_time,\n end_time as end_time,\n id as id,\n ad_account_id as ad_account_id,\n name as name,\n pacing_delivery_type as pacing_delivery_type,\n placement_group as placement_group,\n start_time as start_time,\n status as status,\n summary_status as summary_status\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.pinterest_ads' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n cast(id as TEXT) as ad_group_id,\n name as ad_group_name,\n status as ad_group_status,\n ad_account_id as advertiser_id,\n _fivetran_synced,\n cast(campaign_id as TEXT) as campaign_id,\n created_time as created_at,\n end_time,\n pacing_delivery_type,\n placement_group,\n start_time,\n summary_status,\n row_number() over (partition by id order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__targeting_geo_region": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__targeting_geo_region", "resource_type": "model", "package_name": "pinterest", "path": "staging/stg_pinterest_ads__targeting_geo_region.sql", "original_file_path": "models/staging/stg_pinterest_ads__targeting_geo_region.sql", "unique_id": "model.pinterest.stg_pinterest_ads__targeting_geo_region", "fqn": ["pinterest", "staging", "stg_pinterest_ads__targeting_geo_region"], "alias": "stg_pinterest_ads__targeting_geo_region", "checksum": {"name": "sha256", "checksum": "b097105f1a7de4cee512fed5474fd82f95da2d1447501a01d91e9239f22cd121"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Maps region targeting values used in campaigns, including standardized names and associated location codes.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}, "country_id": {"name": "country_id", "description": "The ID of the targeted country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.country_id"]}, "region_id": {"name": "region_id", "description": "The ID of the targeted region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.region_id"]}, "region_name": {"name": "region_name", "description": "The name of the targeted region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/staging/stg_pinterest_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.6214974, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__targeting_geo_region\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__pinterest_ads_enabled', 'pinterest__using_targeting_geo_region'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_pinterest_ads__targeting_geo_region_tmp') }}\n\n), fields as (\n\n select\n {{ fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_pinterest_ads__targeting_geo_region_tmp')),\n staging_columns=get_targeting_geo_region_columns()\n ) }}\n\n {{ fivetran_utils.apply_source_relation(package_name='pinterest_ads') }}\n \n from base\n\n), final as (\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast(country_id as {{ dbt.type_string() }}) as country_id,\n cast(region_id as {{ dbt.type_string() }}) as region_id,\n region_name\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__targeting_geo_region_tmp", "package": null, "version": null}, {"name": "stg_pinterest_ads__targeting_geo_region_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.pinterest.get_targeting_geo_region_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_string"], "nodes": ["model.pinterest.stg_pinterest_ads__targeting_geo_region_tmp"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads__targeting_geo_region.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__targeting_geo_region_tmp\"\n\n), fields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n country_id as country_id,\n region_id as region_id,\n region_name as region_name\n\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.pinterest_ads' as TEXT) as source_relation\n\n \n from base\n\n), final as (\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n cast(country_id as TEXT) as country_id,\n cast(region_id as TEXT) as region_id,\n region_name\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__campaign_report", "resource_type": "model", "package_name": "pinterest", "path": "staging/stg_pinterest_ads__campaign_report.sql", "original_file_path": "models/staging/stg_pinterest_ads__campaign_report.sql", "unique_id": "model.pinterest.stg_pinterest_ads__campaign_report", "fqn": ["pinterest", "staging", "stg_pinterest_ads__campaign_report"], "alias": "stg_pinterest_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "8f7c215e9940a4bc633f1309bbf530df68554bb486339340f99e5b80e659d573"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of Campaigns by advertiser.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "date_day": {"name": "date_day", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "Name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "Status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "impressions": {"name": "impressions", "description": "The number of paid and earned impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impressions"]}, "clicks": {"name": "clicks", "description": "The number of paid and earned clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clicks"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value": {"name": "total_conversions_value", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/staging/stg_pinterest_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.616333, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_pinterest_ads__campaign_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_pinterest_ads__campaign_report_tmp')),\n staging_columns=get_campaign_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='pinterest_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n {{ dbt.date_trunc('day', 'date') }} as date_day,\n cast(campaign_id as {{ dbt.type_string() }}) as campaign_id,\n campaign_name,\n campaign_status,\n cast(advertiser_id as {{ dbt.type_string() }}) as advertiser_id,\n coalesce(impression_1,0) + coalesce(impression_2,0) as impressions,\n coalesce(clickthrough_1,0) + coalesce(clickthrough_2,0) as clicks,\n coalesce(spend_in_micro_dollar, 0) / 1000000.0 as spend,\n coalesce(total_conversions, 0) as total_conversions,\n coalesce(total_conversions_quantity, 0) as total_conversions_quantity,\n coalesce(total_conversions_value_in_micro_dollar, 0) / 1000000.0 as total_conversions_value\n\n {{ pinterest_ads_fill_pass_through_columns(pass_through_fields=var('pinterest__campaign_report_passthrough_metrics'), except=['total_conversions','total_conversions_quantity','total_conversions_value']) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__campaign_report_tmp", "package": null, "version": null}, {"name": "stg_pinterest_ads__campaign_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.pinterest.get_campaign_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.date_trunc", "macro.dbt.type_string", "macro.pinterest.pinterest_ads_fill_pass_through_columns"], "nodes": ["model.pinterest.stg_pinterest_ads__campaign_report_tmp"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n advertiser_id as advertiser_id,\n campaign_id as campaign_id,\n campaign_name as campaign_name,\n campaign_status as campaign_status,\n clickthrough_1 as clickthrough_1,\n clickthrough_2 as clickthrough_2,\n date as date,\n impression_1 as impression_1,\n impression_2 as impression_2,\n spend_in_micro_dollar as spend_in_micro_dollar,\n total_conversions as total_conversions,\n total_conversions_quantity as total_conversions_quantity,\n total_conversions_value_in_micro_dollar as total_conversions_value_in_micro_dollar\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.pinterest_ads' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date_trunc('day', date) as date_day,\n cast(campaign_id as TEXT) as campaign_id,\n campaign_name,\n campaign_status,\n cast(advertiser_id as TEXT) as advertiser_id,\n coalesce(impression_1,0) + coalesce(impression_2,0) as impressions,\n coalesce(clickthrough_1,0) + coalesce(clickthrough_2,0) as clicks,\n coalesce(spend_in_micro_dollar, 0) / 1000000.0 as spend,\n coalesce(total_conversions, 0) as total_conversions,\n coalesce(total_conversions_quantity, 0) as total_conversions_quantity,\n coalesce(total_conversions_value_in_micro_dollar, 0) / 1000000.0 as total_conversions_value\n\n \t\n\n\t\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__advertiser_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__advertiser_history", "resource_type": "model", "package_name": "pinterest", "path": "staging/stg_pinterest_ads__advertiser_history.sql", "original_file_path": "models/staging/stg_pinterest_ads__advertiser_history.sql", "unique_id": "model.pinterest.stg_pinterest_ads__advertiser_history", "fqn": ["pinterest", "staging", "stg_pinterest_ads__advertiser_history"], "alias": "stg_pinterest_ads__advertiser_history", "checksum": {"name": "sha256", "checksum": "bbdd02b52c28a90529b0cb045f2da6d7870f2d18b4ba1c964e9398042565f17b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of an advertiser.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "advertiser_name": {"name": "advertiser_name", "description": "Name of the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country": {"name": "country", "description": "The country code where the advertiser is located.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp of when a record was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.created_at"]}, "currency_code": {"name": "currency_code", "description": "The currency code which the advertiser is set up using.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when a record was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.updated_at"]}, "owner_username": {"name": "owner_username", "description": "Advertiser's username.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "owner_user_id": {"name": "owner_user_id", "description": "Unique identifier of the owner user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_permissions": {"name": "advertiser_permissions", "description": "The permissions associated with this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether the record is the most recent version of the object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/staging/stg_pinterest_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.6137822, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_pinterest_ads__advertiser_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_pinterest_ads__advertiser_history_tmp')),\n staging_columns=get_advertiser_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='pinterest_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as {{ dbt.type_string() }}) as advertiser_id,\n name as advertiser_name,\n country,\n created_time as created_at,\n currency as currency_code,\n owner_user_id,\n owner_username,\n advertiser_permissions, -- permissions was renamed in macro\n updated_time as updated_at,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='pinterest_ads') }} order by updated_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__advertiser_history_tmp", "package": null, "version": null}, {"name": "stg_pinterest_ads__advertiser_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.pinterest.get_advertiser_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.pinterest.stg_pinterest_ads__advertiser_history_tmp"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads__advertiser_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_history_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n country as country,\n created_time as created_time,\n currency as currency,\n id as id,\n owner_user_id as owner_user_id,\n owner_username as owner_username,\n name as name,\n \n \"permissions\" as advertiser_permissions,\n updated_time as updated_time\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.pinterest_ads' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as TEXT) as advertiser_id,\n name as advertiser_name,\n country,\n created_time as created_at,\n currency as currency_code,\n owner_user_id,\n owner_username,\n advertiser_permissions, -- permissions was renamed in macro\n updated_time as updated_at,\n row_number() over (partition by id order by updated_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__campaign_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__campaign_history", "resource_type": "model", "package_name": "pinterest", "path": "staging/stg_pinterest_ads__campaign_history.sql", "original_file_path": "models/staging/stg_pinterest_ads__campaign_history.sql", "unique_id": "model.pinterest.stg_pinterest_ads__campaign_history", "fqn": ["pinterest", "staging", "stg_pinterest_ads__campaign_history"], "alias": "stg_pinterest_ads__campaign_history", "checksum": {"name": "sha256", "checksum": "753907d1bec94e3ad400698673a916d859bf2e40d799c25a1e80229a11181c29"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of a Pinterest Campaign.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "created_at": {"name": "created_at", "description": "Campaign creation time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "campaign_name": {"name": "campaign_name", "description": "Campaign name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "The status of the Campaign. One of \"ACTIVE\", \"ARCHIVED\", \"PAUSED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "default_ad_group_budget_in_micro_currency": {"name": "default_ad_group_budget_in_micro_currency", "description": "When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_automated_campaign": {"name": "is_automated_campaign", "description": "Specifies whether the campaign was created in the automated campaign flow", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_campaign_budget_optimization": {"name": "is_campaign_budget_optimization", "description": "Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_flexible_daily_budgets": {"name": "is_flexible_daily_budgets", "description": "Determine if a campaign has flexible daily budgets setup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_time": {"name": "start_time", "description": "Timestamp when the campaign became active or was scheduled to start.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_time": {"name": "end_time", "description": "Timestamp when the campaign ended or is scheduled to end.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_spend_cap": {"name": "budget_spend_cap", "description": "Maximum amount allowed to be spent over a specified budget period for the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lifetime_spend_cap": {"name": "lifetime_spend_cap", "description": "Total maximum spend allowed across the entire lifespan of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective_type": {"name": "objective_type", "description": "The primary goal of the campaign (e.g., brand awareness, conversions, video views).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether the record is the most recent version of the object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/staging/stg_pinterest_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.6084816, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_pinterest_ads__campaign_history_tmp') }}\n), \n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_pinterest_ads__campaign_history_tmp')),\n staging_columns=get_campaign_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='pinterest_ads') }}\n\n from base\n), \n\nfinal as (\n\n select\n source_relation, \n cast(id as {{ dbt.type_string() }}) as campaign_id,\n name as campaign_name,\n cast(advertiser_id as {{ dbt.type_string() }}) as advertiser_id,\n default_ad_group_budget_in_micro_currency,\n is_automated_campaign,\n is_campaign_budget_optimization,\n is_flexible_daily_budgets,\n status as campaign_status,\n _fivetran_synced,\n created_time as created_at,\n start_time,\n end_time,\n budget_spend_cap,\n lifetime_spend_cap,\n objective_type,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='pinterest_ads') }} order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__campaign_history_tmp", "package": null, "version": null}, {"name": "stg_pinterest_ads__campaign_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.pinterest.get_campaign_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.pinterest.stg_pinterest_ads__campaign_history_tmp"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads__campaign_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_history_tmp\"\n), \n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n created_time as created_time,\n default_ad_group_budget_in_micro_currency as default_ad_group_budget_in_micro_currency,\n is_automated_campaign as is_automated_campaign,\n is_campaign_budget_optimization as is_campaign_budget_optimization,\n is_flexible_daily_budgets as is_flexible_daily_budgets,\n id as id,\n advertiser_id as advertiser_id,\n name as name,\n status as status,\n cast(null as timestamp) as start_time,\n cast(null as timestamp) as end_time,\n cast(null as integer) as budget_spend_cap,\n cast(null as integer) as lifetime_spend_cap,\n cast(null as TEXT) as objective_type\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.pinterest_ads' as TEXT) as source_relation\n\n\n from base\n), \n\nfinal as (\n\n select\n source_relation, \n cast(id as TEXT) as campaign_id,\n name as campaign_name,\n cast(advertiser_id as TEXT) as advertiser_id,\n default_ad_group_budget_in_micro_currency,\n is_automated_campaign,\n is_campaign_budget_optimization,\n is_flexible_daily_budgets,\n status as campaign_status,\n _fivetran_synced,\n created_time as created_at,\n start_time,\n end_time,\n budget_spend_cap,\n lifetime_spend_cap,\n objective_type,\n row_number() over (partition by id order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__keyword_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__keyword_history", "resource_type": "model", "package_name": "pinterest", "path": "staging/stg_pinterest_ads__keyword_history.sql", "original_file_path": "models/staging/stg_pinterest_ads__keyword_history.sql", "unique_id": "model.pinterest.stg_pinterest_ads__keyword_history", "fqn": ["pinterest", "staging", "stg_pinterest_ads__keyword_history"], "alias": "stg_pinterest_ads__keyword_history", "checksum": {"name": "sha256", "checksum": "ff13b0f10c74a5086c3e92455b8257c51de83c042cc9172f22eecb177da77e8d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Keyword.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "keyword_id": {"name": "keyword_id", "description": "Unique identifier of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_value": {"name": "keyword_value", "description": "The text value that makes upd the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_id": {"name": "_fivetran_id", "description": "The unique identifier of the record within the Fivetran synced table.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "archived": {"name": "archived", "description": "Boolean indicating if the keyword is archived.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid": {"name": "bid", "description": "Bid amount set for the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "match_type": {"name": "match_type", "description": "Type of match the keyword is tied to. Either Exact or Broad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "parent_type": {"name": "parent_type", "description": "Identifier of what grain the parent type is. Ad group or campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether the record is the most recent version of the object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/staging/stg_pinterest_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.6174996, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__keyword_history\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__pinterest_ads_enabled','pinterest__using_keywords'])) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_pinterest_ads__keyword_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_pinterest_ads__keyword_history_tmp')),\n staging_columns=get_keyword_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='pinterest_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n cast(id as {{ dbt.type_string() }}) as keyword_id,\n value as keyword_value,\n _fivetran_id,\n _fivetran_synced,\n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id,\n cast(advertiser_id as {{ dbt.type_string() }}) as advertiser_id,\n archived,\n bid,\n cast(campaign_id as {{ dbt.type_string() }}) as campaign_id,\n match_type,\n parent_type,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='pinterest_ads') }} order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__keyword_history_tmp", "package": null, "version": null}, {"name": "stg_pinterest_ads__keyword_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.pinterest.get_keyword_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.pinterest.stg_pinterest_ads__keyword_history_tmp"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads__keyword_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__keyword_history_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_id as _fivetran_id,\n _fivetran_synced as _fivetran_synced,\n ad_group_id as ad_group_id,\n advertiser_id as advertiser_id,\n archived as archived,\n bid as bid,\n campaign_id as campaign_id,\n id as id,\n match_type as match_type,\n parent_type as parent_type,\n value as value\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.pinterest_ads' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n cast(id as TEXT) as keyword_id,\n value as keyword_value,\n _fivetran_id,\n _fivetran_synced,\n cast(ad_group_id as TEXT) as ad_group_id,\n cast(advertiser_id as TEXT) as advertiser_id,\n archived,\n bid,\n cast(campaign_id as TEXT) as campaign_id,\n match_type,\n parent_type,\n row_number() over (partition by id order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__advertiser_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__advertiser_report", "resource_type": "model", "package_name": "pinterest", "path": "staging/stg_pinterest_ads__advertiser_report.sql", "original_file_path": "models/staging/stg_pinterest_ads__advertiser_report.sql", "unique_id": "model.pinterest.stg_pinterest_ads__advertiser_report", "fqn": ["pinterest", "staging", "stg_pinterest_ads__advertiser_report"], "alias": "stg_pinterest_ads__advertiser_report", "checksum": {"name": "sha256", "checksum": "5bae0f0801914697867722be8d84256319e1a8e68c9b76ad3afb04a665f9209c"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of an Advertiser.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "date_day": {"name": "date_day", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "impressions": {"name": "impressions", "description": "The number of paid and earned impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impressions"]}, "clicks": {"name": "clicks", "description": "The number of paid and earned clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clicks"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value": {"name": "total_conversions_value", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/staging/stg_pinterest_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.6151958, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_pinterest_ads__advertiser_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_pinterest_ads__advertiser_report_tmp')),\n staging_columns=get_advertiser_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='pinterest_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n {{ dbt.date_trunc('day', 'date') }} as date_day,\n cast(advertiser_id as {{ dbt.type_string() }}) as advertiser_id,\n coalesce(impression_1,0) + coalesce(impression_2,0) as impressions,\n coalesce(clickthrough_1,0) + coalesce(clickthrough_2,0) as clicks,\n coalesce(spend_in_micro_dollar, 0) / 1000000.0 as spend,\n coalesce(total_conversions, 0) as total_conversions,\n coalesce(total_conversions_quantity, 0) as total_conversions_quantity,\n coalesce(total_conversions_value_in_micro_dollar, 0) / 1000000.0 as total_conversions_value\n\n {{ pinterest_ads_fill_pass_through_columns(pass_through_fields=var('pinterest__advertiser_report_passthrough_metrics'), except=['total_conversions','total_conversions_quantity','total_conversions_value']) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__advertiser_report_tmp", "package": null, "version": null}, {"name": "stg_pinterest_ads__advertiser_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.pinterest.get_advertiser_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.date_trunc", "macro.dbt.type_string", "macro.pinterest.pinterest_ads_fill_pass_through_columns"], "nodes": ["model.pinterest.stg_pinterest_ads__advertiser_report_tmp"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads__advertiser_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n advertiser_id as advertiser_id,\n clickthrough_1 as clickthrough_1,\n clickthrough_2 as clickthrough_2,\n date as date,\n impression_1 as impression_1,\n impression_2 as impression_2,\n spend_in_micro_dollar as spend_in_micro_dollar,\n total_conversions as total_conversions,\n total_conversions_quantity as total_conversions_quantity,\n total_conversions_value_in_micro_dollar as total_conversions_value_in_micro_dollar\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.pinterest_ads' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date_trunc('day', date) as date_day,\n cast(advertiser_id as TEXT) as advertiser_id,\n coalesce(impression_1,0) + coalesce(impression_2,0) as impressions,\n coalesce(clickthrough_1,0) + coalesce(clickthrough_2,0) as clicks,\n coalesce(spend_in_micro_dollar, 0) / 1000000.0 as spend,\n coalesce(total_conversions, 0) as total_conversions,\n coalesce(total_conversions_quantity, 0) as total_conversions_quantity,\n coalesce(total_conversions_value_in_micro_dollar, 0) / 1000000.0 as total_conversions_value\n\n \t\n\n\t\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__pin_promotion_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__pin_promotion_history", "resource_type": "model", "package_name": "pinterest", "path": "staging/stg_pinterest_ads__pin_promotion_history.sql", "original_file_path": "models/staging/stg_pinterest_ads__pin_promotion_history.sql", "unique_id": "model.pinterest.stg_pinterest_ads__pin_promotion_history", "fqn": ["pinterest", "staging", "stg_pinterest_ads__pin_promotion_history"], "alias": "stg_pinterest_ads__pin_promotion_history", "checksum": {"name": "sha256", "checksum": "8a461be83757c3f5d006518afc5ad72f46be26ca64997f308fe8acf78f3057ff"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of a Pinterest Pin promotion.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "pin_promotion_id": {"name": "pin_promotion_id", "description": "Pin promotion ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "Pin promotion ad group ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Pin creation time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "destination_url": {"name": "destination_url", "description": "Pin destination URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pin_name": {"name": "pin_name", "description": "Pin promotion name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pin_id": {"name": "pin_id", "description": "Original pin ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pin_status": {"name": "pin_status", "description": "The status of the Pin promotion. One of \"ACTIVE\", \"ARCHIVED\", \"PAUSED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_type": {"name": "creative_type", "description": "The creative type. \nOne of \"APP\", \"APP_VIDEO\", \"BOARD\", \"CAROUSEL\", \"CINEMATIC\", \"COMMERCE\", \"MAX_VIDEO\", \"NATIVE_VIDEO\", \"REGULAR\", \n\"SEARCH_PROMINENCE\", \"SEARCH_PROMINENCE_CAROUSEL\", \"SHOPPING\", \"SHOP_THE_PIN\", \"THIRD_PARTY\", or \"VIDEO\".\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether the record is the most recent version of the object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.is_most_recent_record"]}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_host": {"name": "url_host", "description": "The URL host of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_path": {"name": "url_path", "description": "The URL path of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_source": {"name": "utm_source", "description": "The utm_source parameter of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_medium": {"name": "utm_medium", "description": "The utm_medium parameter of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_campaign": {"name": "utm_campaign", "description": "The utm_campaign parameter of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_content": {"name": "utm_content", "description": "The utm_content parameter of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_term": {"name": "utm_term", "description": "The utm_term parameter of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/staging/stg_pinterest_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.609928, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_pinterest_ads__pin_promotion_history_tmp') }}\n), \n\nfields as (\n\n select\n\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_pinterest_ads__pin_promotion_history_tmp')),\n staging_columns=get_pin_promotion_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='pinterest_ads') }}\n\n from base\n), \n\nfinal as (\n\n select\n source_relation,\n cast(id as {{ dbt.type_string() }}) as pin_promotion_id,\n cast(ad_account_id as {{ dbt.type_string() }}) as advertiser_id,\n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id,\n created_time as created_at,\n destination_url,\n {{ dbt.split_part('destination_url', \"'?'\", 1) }} as base_url,\n {{ dbt_utils.get_url_host('destination_url') }} as url_host,\n '/' || {{ dbt_utils.get_url_path('destination_url') }} as url_path,\n {{ pinterest.pinterest_ads_extract_url_parameter('destination_url', 'utm_source') }} as utm_source,\n {{ pinterest.pinterest_ads_extract_url_parameter('destination_url', 'utm_medium') }} as utm_medium,\n {{ pinterest.pinterest_ads_extract_url_parameter('destination_url', 'utm_campaign') }} as utm_campaign,\n {{ pinterest.pinterest_ads_extract_url_parameter('destination_url', 'utm_content') }} as utm_content,\n {{ pinterest.pinterest_ads_extract_url_parameter('destination_url', 'utm_term') }} as utm_term,\n name as pin_name,\n cast(pin_id as {{ dbt.type_string() }}) as pin_id,\n status as pin_status,\n creative_type,\n _fivetran_synced,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='pinterest_ads') }} order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__pin_promotion_history_tmp", "package": null, "version": null}, {"name": "stg_pinterest_ads__pin_promotion_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.pinterest.get_pin_promotion_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.dbt.split_part", "macro.dbt_utils.get_url_host", "macro.dbt_utils.get_url_path", "macro.pinterest.pinterest_ads_extract_url_parameter", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.pinterest.stg_pinterest_ads__pin_promotion_history_tmp"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads__pin_promotion_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_history_tmp\"\n), \n\nfields as (\n\n select\n\n \n _fivetran_synced as _fivetran_synced,\n ad_group_id as ad_group_id,\n ad_account_id as ad_account_id,\n cast(null as TEXT) as android_deep_link,\n cast(null as TEXT) as click_tracking_url,\n created_time as created_time,\n creative_type as creative_type,\n destination_url as destination_url,\n id as id,\n cast(null as TEXT) as ios_deep_link,\n cast(null as boolean) as is_pin_deleted,\n cast(null as boolean) as is_removable,\n name as name,\n pin_id as pin_id,\n cast(null as TEXT) as review_status,\n status as status,\n cast(null as timestamp) as updated_time,\n cast(null as TEXT) as view_tracking_url\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.pinterest_ads' as TEXT) as source_relation\n\n\n from base\n), \n\nfinal as (\n\n select\n source_relation,\n cast(id as TEXT) as pin_promotion_id,\n cast(ad_account_id as TEXT) as advertiser_id,\n cast(ad_group_id as TEXT) as ad_group_id,\n created_time as created_at,\n destination_url,\n \n\n \n \n\n split_part(\n destination_url,\n '?',\n 1\n )\n\n\n \n\n as base_url,\n \n \n cast(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n \n\n replace(\n \n\n replace(\n \n\n replace(\n destination_url,\n 'android-app://',\n ''\n )\n\n\n,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n '/',\n 1\n )\n\n\n \n\n,\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_host,\n '/' || \n \n cast(\n\n \n \n\n split_part(\n \n\n right(\n \n\n replace(\n \n\n replace(\n destination_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n \n\n length(\n \n\n replace(\n \n\n replace(\n destination_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n )-coalesce(\n nullif(\n\n position(\n '/' in \n\n replace(\n \n\n replace(\n destination_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ), 0),\n \n\n position(\n '?' in \n\n replace(\n \n\n replace(\n destination_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ) - 1\n )\n ),\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_path,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n destination_url,\n 'utm_source=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_source,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n destination_url,\n 'utm_medium=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_medium,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n destination_url,\n 'utm_campaign=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_campaign,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n destination_url,\n 'utm_content=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_content,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n destination_url,\n 'utm_term=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_term,\n name as pin_name,\n cast(pin_id as TEXT) as pin_id,\n status as pin_status,\n creative_type,\n _fivetran_synced,\n row_number() over (partition by id order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__targeting_geo": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__targeting_geo", "resource_type": "model", "package_name": "pinterest", "path": "staging/stg_pinterest_ads__targeting_geo.sql", "original_file_path": "models/staging/stg_pinterest_ads__targeting_geo.sql", "unique_id": "model.pinterest.stg_pinterest_ads__targeting_geo", "fqn": ["pinterest", "staging", "stg_pinterest_ads__targeting_geo"], "alias": "stg_pinterest_ads__targeting_geo", "checksum": {"name": "sha256", "checksum": "63f3cee1b5091fca6a3323e842fd66d2022c2c0befd3029b85bc217b9ff37c55"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Maps country targeting values used in campaigns, including standardized names and associated location codes.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "country_id": {"name": "country_id", "description": "The ID of the targeted country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.country_id"]}, "country_name": {"name": "country_name", "description": "The name of the targeted country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/staging/stg_pinterest_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.6207535, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__targeting_geo\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__pinterest_ads_enabled', 'pinterest__using_targeting_geo'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_pinterest_ads__targeting_geo_tmp') }}\n\n), fields as (\n\n select\n {{ fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_pinterest_ads__targeting_geo_tmp')),\n staging_columns=get_targeting_geo_columns()\n ) }}\n\n {{ fivetran_utils.apply_source_relation(package_name='pinterest_ads') }}\n \n from base\n\n), final as (\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast(country_id as {{ dbt.type_string() }}) as country_id,\n country_name\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__targeting_geo_tmp", "package": null, "version": null}, {"name": "stg_pinterest_ads__targeting_geo_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.pinterest.get_targeting_geo_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_string"], "nodes": ["model.pinterest.stg_pinterest_ads__targeting_geo_tmp"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads__targeting_geo.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__targeting_geo_tmp\"\n\n), fields as (\n\n select\n \n country_id as country_id,\n country_name as country_name,\n _fivetran_synced as _fivetran_synced\n\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.pinterest_ads' as TEXT) as source_relation\n\n \n from base\n\n), final as (\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n cast(country_id as TEXT) as country_id,\n country_name\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__keyword_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__keyword_report", "resource_type": "model", "package_name": "pinterest", "path": "staging/stg_pinterest_ads__keyword_report.sql", "original_file_path": "models/staging/stg_pinterest_ads__keyword_report.sql", "unique_id": "model.pinterest.stg_pinterest_ads__keyword_report", "fqn": ["pinterest", "staging", "stg_pinterest_ads__keyword_report"], "alias": "stg_pinterest_ads__keyword_report", "checksum": {"name": "sha256", "checksum": "4ac80a21e27a3f15690588305a2422c0cdff0b85752e4bedfab4424a640b6be2"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of Keywords by ad group, campaign, and advertiser.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "date_day": {"name": "date_day", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "keyword_id": {"name": "keyword_id", "description": "Unique identifier of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pin_promotion_id": {"name": "pin_promotion_id", "description": "The ID of the related Pin promotion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.pin_promotion_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "Name of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_status": {"name": "ad_group_status", "description": "Status of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "impressions": {"name": "impressions", "description": "The number of paid and earned impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impressions"]}, "clicks": {"name": "clicks", "description": "The number of paid and earned clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clicks"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value": {"name": "total_conversions_value", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/staging/stg_pinterest_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.6188312, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__keyword_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__pinterest_ads_enabled','pinterest__using_keywords'])) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_pinterest_ads__keyword_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_pinterest_ads__keyword_report_tmp')),\n staging_columns=get_keyword_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='pinterest_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n {{ dbt.date_trunc('day', 'date') }} as date_day,\n cast(keyword_id as {{dbt.type_string() }}) as keyword_id,\n cast(pin_promotion_id as {{dbt.type_string() }}) as pin_promotion_id,\n cast(ad_group_id as {{dbt.type_string() }}) as ad_group_id,\n ad_group_name,\n ad_group_status,\n cast(campaign_id as {{dbt.type_string() }}) as campaign_id,\n cast(advertiser_id as {{dbt.type_string() }}) as advertiser_id,\n coalesce(impression_1,0) + coalesce(impression_2,0) as impressions,\n coalesce(clickthrough_1,0) + coalesce(clickthrough_2,0) as clicks,\n coalesce(spend_in_micro_dollar, 0) / 1000000.0 as spend,\n coalesce(total_conversions, 0) as total_conversions,\n coalesce(total_conversions_quantity, 0) as total_conversions_quantity,\n coalesce(total_conversions_value_in_micro_dollar, 0) / 1000000.0 as total_conversions_value\n\n {{ pinterest_ads_fill_pass_through_columns(pass_through_fields=var('pinterest__keyword_report_passthrough_metrics'), except=['total_conversions','total_conversions_quantity','total_conversions_value']) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__keyword_report_tmp", "package": null, "version": null}, {"name": "stg_pinterest_ads__keyword_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.pinterest.get_keyword_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.date_trunc", "macro.dbt.type_string", "macro.pinterest.pinterest_ads_fill_pass_through_columns"], "nodes": ["model.pinterest.stg_pinterest_ads__keyword_report_tmp"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads__keyword_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__keyword_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n ad_group_id as ad_group_id,\n ad_group_name as ad_group_name,\n ad_group_status as ad_group_status,\n advertiser_id as advertiser_id,\n campaign_id as campaign_id,\n clickthrough_1 as clickthrough_1,\n clickthrough_2 as clickthrough_2,\n date as date,\n impression_1 as impression_1,\n impression_2 as impression_2,\n keyword_id as keyword_id,\n pin_promotion_id as pin_promotion_id,\n spend_in_micro_dollar as spend_in_micro_dollar,\n total_conversions as total_conversions,\n total_conversions_quantity as total_conversions_quantity,\n total_conversions_value_in_micro_dollar as total_conversions_value_in_micro_dollar\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.pinterest_ads' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n date_trunc('day', date) as date_day,\n cast(keyword_id as TEXT) as keyword_id,\n cast(pin_promotion_id as TEXT) as pin_promotion_id,\n cast(ad_group_id as TEXT) as ad_group_id,\n ad_group_name,\n ad_group_status,\n cast(campaign_id as TEXT) as campaign_id,\n cast(advertiser_id as TEXT) as advertiser_id,\n coalesce(impression_1,0) + coalesce(impression_2,0) as impressions,\n coalesce(clickthrough_1,0) + coalesce(clickthrough_2,0) as clicks,\n coalesce(spend_in_micro_dollar, 0) / 1000000.0 as spend,\n coalesce(total_conversions, 0) as total_conversions,\n coalesce(total_conversions_quantity, 0) as total_conversions_quantity,\n coalesce(total_conversions_value_in_micro_dollar, 0) / 1000000.0 as total_conversions_value\n\n \t\n\n\t\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__ad_group_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__ad_group_report", "resource_type": "model", "package_name": "pinterest", "path": "staging/stg_pinterest_ads__ad_group_report.sql", "original_file_path": "models/staging/stg_pinterest_ads__ad_group_report.sql", "unique_id": "model.pinterest.stg_pinterest_ads__ad_group_report", "fqn": ["pinterest", "staging", "stg_pinterest_ads__ad_group_report"], "alias": "stg_pinterest_ads__ad_group_report", "checksum": {"name": "sha256", "checksum": "e395625feff6a007c2e1bcf04d6d4c814838375efa04427134b48f9eaa612ed4"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Pinterest Ad Groups by campaign and advertiser.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "date_day": {"name": "date_day", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "Name of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_status": {"name": "ad_group_status", "description": "Status of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "impressions": {"name": "impressions", "description": "The number of paid and earned impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impressions"]}, "clicks": {"name": "clicks", "description": "The number of paid and earned clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clicks"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value": {"name": "total_conversions_value", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/staging/stg_pinterest_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.6123638, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__ad_group_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_pinterest_ads__ad_group_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_pinterest_ads__ad_group_report_tmp')),\n staging_columns=get_ad_group_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='pinterest_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n {{ dbt.date_trunc('day', 'date') }} as date_day,\n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id,\n ad_group_name,\n ad_group_status,\n cast(campaign_id as {{ dbt.type_string() }}) as campaign_id,\n cast(advertiser_id as {{ dbt.type_string() }}) as advertiser_id,\n coalesce(impression_1,0) + coalesce(impression_2,0) as impressions,\n coalesce(clickthrough_1,0) + coalesce(clickthrough_2,0) as clicks,\n coalesce(spend_in_micro_dollar, 0) / 1000000.0 as spend,\n coalesce(total_conversions, 0) as total_conversions,\n coalesce(total_conversions_quantity, 0) as total_conversions_quantity,\n coalesce(total_conversions_value_in_micro_dollar, 0) / 1000000.0 as total_conversions_value\n\n {{ pinterest_ads_fill_pass_through_columns(pass_through_fields=var('pinterest__ad_group_report_passthrough_metrics'), except=['total_conversions','total_conversions_quantity','total_conversions_value']) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__ad_group_report_tmp", "package": null, "version": null}, {"name": "stg_pinterest_ads__ad_group_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.pinterest.get_ad_group_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.date_trunc", "macro.dbt.type_string", "macro.pinterest.pinterest_ads_fill_pass_through_columns"], "nodes": ["model.pinterest.stg_pinterest_ads__ad_group_report_tmp"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads__ad_group_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__ad_group_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n ad_group_id as ad_group_id,\n ad_group_name as ad_group_name,\n ad_group_status as ad_group_status,\n advertiser_id as advertiser_id,\n campaign_id as campaign_id,\n clickthrough_1 as clickthrough_1,\n clickthrough_2 as clickthrough_2,\n date as date,\n impression_1 as impression_1,\n impression_2 as impression_2,\n spend_in_micro_dollar as spend_in_micro_dollar,\n total_conversions as total_conversions,\n total_conversions_quantity as total_conversions_quantity,\n total_conversions_value_in_micro_dollar as total_conversions_value_in_micro_dollar\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.pinterest_ads' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date_trunc('day', date) as date_day,\n cast(ad_group_id as TEXT) as ad_group_id,\n ad_group_name,\n ad_group_status,\n cast(campaign_id as TEXT) as campaign_id,\n cast(advertiser_id as TEXT) as advertiser_id,\n coalesce(impression_1,0) + coalesce(impression_2,0) as impressions,\n coalesce(clickthrough_1,0) + coalesce(clickthrough_2,0) as clicks,\n coalesce(spend_in_micro_dollar, 0) / 1000000.0 as spend,\n coalesce(total_conversions, 0) as total_conversions,\n coalesce(total_conversions_quantity, 0) as total_conversions_quantity,\n coalesce(total_conversions_value_in_micro_dollar, 0) / 1000000.0 as total_conversions_value\n\n \t\n\n\t\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__pin_promotion_targeting_report_tmp", "resource_type": "model", "package_name": "pinterest", "path": "staging/tmp/stg_pinterest_ads__pin_promotion_targeting_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_pinterest_ads__pin_promotion_targeting_report_tmp.sql", "unique_id": "model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report_tmp", "fqn": ["pinterest", "staging", "tmp", "stg_pinterest_ads__pin_promotion_targeting_report_tmp"], "alias": "stg_pinterest_ads__pin_promotion_targeting_report_tmp", "checksum": {"name": "sha256", "checksum": "93b1c9d986bc81385d756b80cc4f23dbb9556b506da975aee40b93837842ea5c"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450498.3585298, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_targeting_report_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__pinterest_ads_enabled', 'pinterest__using_pin_promotion_targeting_report'])) }}\n\n{% if var('pinterest_ads_union_schemas', []) | length > 0 or var('pinterest_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='pin_promotion_targeting_report',\n database_variable='pinterest_database',\n schema_variable='pinterest_schema',\n default_database=target.database,\n default_schema='pinterest_ads',\n default_variable='pin_promotion_targeting_report',\n union_schema_variable='pinterest_ads_union_schemas',\n union_database_variable='pinterest_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='pinterest_ads_sources',\n single_source_name='pinterest_ads',\n single_table_name='pin_promotion_targeting_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["pinterest_ads", "pin_promotion_targeting_report"], ["pinterest_ads", "pin_promotion_targeting_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.pinterest.pinterest_ads.pin_promotion_targeting_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/tmp/stg_pinterest_ads__pin_promotion_targeting_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: pinterest_ads_pin_promotion_targeting_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: pinterest_pin_promotion_targeting_report_data\n\n\n select\n \"_fivetran_synced\",\n \"date\",\n \"targeting_type\",\n \"targeting_value\",\n \"ad_group_id\",\n \"advertiser_id\",\n \"campaign_id\",\n \"pin_promotion_id\",\n \"clickthrough_1\",\n \"clickthrough_2\",\n \"impression_1\",\n \"impression_2\",\n \"spend_in_micro_dollar\",\n \"total_conversions\",\n \"total_conversions_quantity\",\n \"total_conversions_value_in_micro_dollar\"\n from \"postgres\".\"public\".\"pinterest_pin_promotion_targeting_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__ad_group_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__ad_group_report_tmp", "resource_type": "model", "package_name": "pinterest", "path": "staging/tmp/stg_pinterest_ads__ad_group_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_pinterest_ads__ad_group_report_tmp.sql", "unique_id": "model.pinterest.stg_pinterest_ads__ad_group_report_tmp", "fqn": ["pinterest", "staging", "tmp", "stg_pinterest_ads__ad_group_report_tmp"], "alias": "stg_pinterest_ads__ad_group_report_tmp", "checksum": {"name": "sha256", "checksum": "34fd143082a76d7bcb98d4c8f060e1de28b2e71f25eb35e4c5fb3593536e9d0f"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450498.3698196, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__ad_group_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\n{% if var('pinterest_ads_union_schemas', []) | length > 0 or var('pinterest_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_group_report',\n database_variable='pinterest_database',\n schema_variable='pinterest_schema',\n default_database=target.database,\n default_schema='pinterest_ads',\n default_variable='ad_group_report',\n union_schema_variable='pinterest_ads_union_schemas',\n union_database_variable='pinterest_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='pinterest_ads_sources',\n single_source_name='pinterest_ads',\n single_table_name='ad_group_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["pinterest_ads", "ad_group_report"], ["pinterest_ads", "ad_group_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.pinterest.pinterest_ads.ad_group_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/tmp/stg_pinterest_ads__ad_group_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: pinterest_ads_ad_group_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: pinterest_ad_group_report_data\n\n\n select\n \"date\",\n \"ad_group_id\",\n \"ad_group_name\",\n \"ad_group_status\",\n \"campaign_id\",\n \"advertiser_id\",\n \"_fivetran_synced\",\n \"impression_1\",\n \"impression_2\",\n \"clickthrough_1\",\n \"clickthrough_2\",\n \"spend_in_micro_dollar\",\n \"total_conversions\",\n \"total_conversions_quantity\",\n \"total_conversions_value_in_micro_dollar\",\n \"total_view_checkout\"\n from \"postgres\".\"public\".\"pinterest_ad_group_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__pin_promotion_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__pin_promotion_history_tmp", "resource_type": "model", "package_name": "pinterest", "path": "staging/tmp/stg_pinterest_ads__pin_promotion_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_pinterest_ads__pin_promotion_history_tmp.sql", "unique_id": "model.pinterest.stg_pinterest_ads__pin_promotion_history_tmp", "fqn": ["pinterest", "staging", "tmp", "stg_pinterest_ads__pin_promotion_history_tmp"], "alias": "stg_pinterest_ads__pin_promotion_history_tmp", "checksum": {"name": "sha256", "checksum": "0148faded2d7e7567d1467f5ce201ad6b8fc7eb5accfa0c36548da2b11a9d513"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450498.380127, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\n{% if var('pinterest_ads_union_schemas', []) | length > 0 or var('pinterest_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='pin_promotion_history',\n database_variable='pinterest_database',\n schema_variable='pinterest_schema',\n default_database=target.database,\n default_schema='pinterest_ads',\n default_variable='pin_promotion_history',\n union_schema_variable='pinterest_ads_union_schemas',\n union_database_variable='pinterest_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='pinterest_ads_sources',\n single_source_name='pinterest_ads',\n single_table_name='pin_promotion_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["pinterest_ads", "pin_promotion_history"], ["pinterest_ads", "pin_promotion_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.pinterest.pinterest_ads.pin_promotion_history"]}, "compiled_path": "target/compiled/pinterest/models/staging/tmp/stg_pinterest_ads__pin_promotion_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: pinterest_ads_pin_promotion_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: pinterest_pin_promotion_history_data\n\n\n select\n \"id\",\n \"ad_group_id\",\n \"created_time\",\n \"destination_url\",\n \"name\",\n \"pin_id\",\n \"status\",\n \"creative_type\",\n \"_fivetran_synced\",\n \"ad_account_id\"\n from \"postgres\".\"public\".\"pinterest_pin_promotion_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__campaign_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__campaign_report_tmp", "resource_type": "model", "package_name": "pinterest", "path": "staging/tmp/stg_pinterest_ads__campaign_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_pinterest_ads__campaign_report_tmp.sql", "unique_id": "model.pinterest.stg_pinterest_ads__campaign_report_tmp", "fqn": ["pinterest", "staging", "tmp", "stg_pinterest_ads__campaign_report_tmp"], "alias": "stg_pinterest_ads__campaign_report_tmp", "checksum": {"name": "sha256", "checksum": "ad4dd33bf6b6c32fc43e6cf6338058e36224a71523a26a1687804e2d338b92f1"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450498.390525, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\n{% if var('pinterest_ads_union_schemas', []) | length > 0 or var('pinterest_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_report',\n database_variable='pinterest_database',\n schema_variable='pinterest_schema',\n default_database=target.database,\n default_schema='pinterest_ads',\n default_variable='campaign_report',\n union_schema_variable='pinterest_ads_union_schemas',\n union_database_variable='pinterest_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='pinterest_ads_sources',\n single_source_name='pinterest_ads',\n single_table_name='campaign_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["pinterest_ads", "campaign_report"], ["pinterest_ads", "campaign_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.pinterest.pinterest_ads.campaign_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/tmp/stg_pinterest_ads__campaign_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: pinterest_ads_campaign_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: pinterest_campaign_report_data\n\n\n select\n \"date\",\n \"campaign_id\",\n \"campaign_name\",\n \"campaign_status\",\n \"advertiser_id\",\n \"_fivetran_synced\",\n \"impression_1\",\n \"impression_2\",\n \"clickthrough_1\",\n \"clickthrough_2\",\n \"spend_in_micro_dollar\",\n \"total_conversions\",\n \"total_conversions_quantity\",\n \"total_conversions_value_in_micro_dollar\"\n from \"postgres\".\"public\".\"pinterest_campaign_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__advertiser_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__advertiser_history_tmp", "resource_type": "model", "package_name": "pinterest", "path": "staging/tmp/stg_pinterest_ads__advertiser_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_pinterest_ads__advertiser_history_tmp.sql", "unique_id": "model.pinterest.stg_pinterest_ads__advertiser_history_tmp", "fqn": ["pinterest", "staging", "tmp", "stg_pinterest_ads__advertiser_history_tmp"], "alias": "stg_pinterest_ads__advertiser_history_tmp", "checksum": {"name": "sha256", "checksum": "0a0ce2037e1594fdb65db4599b6ff5645fbd73e03cf4084ebe9c9169e21c66c5"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450498.40103, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\n{% if var('pinterest_ads_union_schemas', []) | length > 0 or var('pinterest_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='advertiser_history',\n database_variable='pinterest_database',\n schema_variable='pinterest_schema',\n default_database=target.database,\n default_schema='pinterest_ads',\n default_variable='advertiser_history',\n union_schema_variable='pinterest_ads_union_schemas',\n union_database_variable='pinterest_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='pinterest_ads_sources',\n single_source_name='pinterest_ads',\n single_table_name='advertiser_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["pinterest_ads", "advertiser_history"], ["pinterest_ads", "advertiser_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.pinterest.pinterest_ads.advertiser_history"]}, "compiled_path": "target/compiled/pinterest/models/staging/tmp/stg_pinterest_ads__advertiser_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: pinterest_ads_advertiser_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: pinterest_advertiser_history_data\n\n\n select\n \"id\",\n \"updated_time\",\n \"_fivetran_synced\",\n \"billing_profile_status\",\n \"billing_type\",\n \"country\",\n \"created_time\",\n \"currency\",\n \"merchant_id\",\n \"name\",\n \"owner_user_id\",\n \"status\",\n \"owner_username\",\n \"permissions\"\n from \"postgres\".\"public\".\"pinterest_advertiser_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__keyword_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__keyword_history_tmp", "resource_type": "model", "package_name": "pinterest", "path": "staging/tmp/stg_pinterest_ads__keyword_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_pinterest_ads__keyword_history_tmp.sql", "unique_id": "model.pinterest.stg_pinterest_ads__keyword_history_tmp", "fqn": ["pinterest", "staging", "tmp", "stg_pinterest_ads__keyword_history_tmp"], "alias": "stg_pinterest_ads__keyword_history_tmp", "checksum": {"name": "sha256", "checksum": "07a3a2c06c741e131f0f4dc7f7c5a4f0d35182a42d82799ab66d611aa30c7ffa"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450498.413195, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__keyword_history_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__pinterest_ads_enabled','pinterest__using_keywords'])) }}\n\n{% if var('pinterest_ads_union_schemas', []) | length > 0 or var('pinterest_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='keyword_history',\n database_variable='pinterest_database',\n schema_variable='pinterest_schema',\n default_database=target.database,\n default_schema='pinterest_ads',\n default_variable='keyword_history',\n union_schema_variable='pinterest_ads_union_schemas',\n union_database_variable='pinterest_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='pinterest_ads_sources',\n single_source_name='pinterest_ads',\n single_table_name='keyword_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["pinterest_ads", "keyword_history"], ["pinterest_ads", "keyword_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.pinterest.pinterest_ads.keyword_history"]}, "compiled_path": "target/compiled/pinterest/models/staging/tmp/stg_pinterest_ads__keyword_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: pinterest_ads_keyword_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: pinterest_keyword_history_data\n\n\n select\n \"_fivetran_id\",\n \"_fivetran_synced\",\n \"ad_group_id\",\n \"advertiser_id\",\n \"archived\",\n \"bid\",\n \"campaign_id\",\n \"id\",\n \"match_type\",\n \"parent_type\",\n \"value\"\n from \"postgres\".\"public\".\"pinterest_keyword_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__pin_promotion_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__pin_promotion_report_tmp", "resource_type": "model", "package_name": "pinterest", "path": "staging/tmp/stg_pinterest_ads__pin_promotion_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_pinterest_ads__pin_promotion_report_tmp.sql", "unique_id": "model.pinterest.stg_pinterest_ads__pin_promotion_report_tmp", "fqn": ["pinterest", "staging", "tmp", "stg_pinterest_ads__pin_promotion_report_tmp"], "alias": "stg_pinterest_ads__pin_promotion_report_tmp", "checksum": {"name": "sha256", "checksum": "7f45f896d44c9d9ac38b3bd2229745b99ca5e330be6a9ada81c8d431e6b18973"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450498.4240549, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\n{% if var('pinterest_ads_union_schemas', []) | length > 0 or var('pinterest_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='pin_promotion_report',\n database_variable='pinterest_database',\n schema_variable='pinterest_schema',\n default_database=target.database,\n default_schema='pinterest_ads',\n default_variable='pin_promotion_report',\n union_schema_variable='pinterest_ads_union_schemas',\n union_database_variable='pinterest_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='pinterest_ads_sources',\n single_source_name='pinterest_ads',\n single_table_name='pin_promotion_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["pinterest_ads", "pin_promotion_report"], ["pinterest_ads", "pin_promotion_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.pinterest.pinterest_ads.pin_promotion_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/tmp/stg_pinterest_ads__pin_promotion_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: pinterest_ads_pin_promotion_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: pinterest_pin_promotion_report_data\n\n\n select\n \"date\",\n \"pin_promotion_id\",\n \"ad_group_id\",\n \"campaign_id\",\n \"advertiser_id\",\n \"_fivetran_synced\",\n \"impression_1\",\n \"impression_2\",\n \"clickthrough_1\",\n \"clickthrough_2\",\n \"spend_in_micro_dollar\",\n \"total_conversions\",\n \"total_conversions_quantity\",\n \"total_conversions_value_in_micro_dollar\"\n from \"postgres\".\"public\".\"pinterest_pin_promotion_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__advertiser_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__advertiser_report_tmp", "resource_type": "model", "package_name": "pinterest", "path": "staging/tmp/stg_pinterest_ads__advertiser_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_pinterest_ads__advertiser_report_tmp.sql", "unique_id": "model.pinterest.stg_pinterest_ads__advertiser_report_tmp", "fqn": ["pinterest", "staging", "tmp", "stg_pinterest_ads__advertiser_report_tmp"], "alias": "stg_pinterest_ads__advertiser_report_tmp", "checksum": {"name": "sha256", "checksum": "0ca52710005610e018bc7136c1acf758b459197934ebfa6e47d949057e67af03"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450498.4349601, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\n{% if var('pinterest_ads_union_schemas', []) | length > 0 or var('pinterest_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='advertiser_report',\n database_variable='pinterest_database',\n schema_variable='pinterest_schema',\n default_database=target.database,\n default_schema='pinterest_ads',\n default_variable='advertiser_report',\n union_schema_variable='pinterest_ads_union_schemas',\n union_database_variable='pinterest_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='pinterest_ads_sources',\n single_source_name='pinterest_ads',\n single_table_name='advertiser_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["pinterest_ads", "advertiser_report"], ["pinterest_ads", "advertiser_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.pinterest.pinterest_ads.advertiser_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/tmp/stg_pinterest_ads__advertiser_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: pinterest_ads_advertiser_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: pinterest_advertiser_report_data\n\n\n select\n \"date\",\n \"advertiser_id\",\n \"_fivetran_synced\",\n \"impression_1\",\n \"impression_2\",\n \"clickthrough_1\",\n \"clickthrough_2\",\n \"spend_in_micro_dollar\",\n \"total_conversions\",\n \"total_conversions_quantity\",\n \"total_conversions_value_in_micro_dollar\"\n from \"postgres\".\"public\".\"pinterest_advertiser_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__ad_group_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__ad_group_history_tmp", "resource_type": "model", "package_name": "pinterest", "path": "staging/tmp/stg_pinterest_ads__ad_group_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_pinterest_ads__ad_group_history_tmp.sql", "unique_id": "model.pinterest.stg_pinterest_ads__ad_group_history_tmp", "fqn": ["pinterest", "staging", "tmp", "stg_pinterest_ads__ad_group_history_tmp"], "alias": "stg_pinterest_ads__ad_group_history_tmp", "checksum": {"name": "sha256", "checksum": "33a49af934069ae3deb3ecabcca30777f20f197a3ce758330c3bae8eaa097dfe"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450498.5498016, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__ad_group_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\n{% if var('pinterest_ads_union_schemas', []) | length > 0 or var('pinterest_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_group_history', \n database_variable='pinterest_database', \n schema_variable='pinterest_schema', \n default_database=target.database,\n default_schema='pinterest_ads',\n default_variable='ad_group_history',\n union_schema_variable='pinterest_ads_union_schemas',\n union_database_variable='pinterest_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='pinterest_ads_sources',\n single_source_name='pinterest_ads',\n single_table_name='ad_group_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["pinterest_ads", "ad_group_history"], ["pinterest_ads", "ad_group_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.pinterest.pinterest_ads.ad_group_history"]}, "compiled_path": "target/compiled/pinterest/models/staging/tmp/stg_pinterest_ads__ad_group_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: pinterest_ads_ad_group_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: pinterest_ad_group_history_data\n\n\n select\n \"id\",\n \"campaign_id\",\n \"created_time\",\n \"name\",\n \"status\",\n \"start_time\",\n \"end_time\",\n \"_fivetran_synced\",\n \"pacing_delivery_type\",\n \"placement_group\",\n \"summary_status\",\n \"ad_account_id\"\n from \"postgres\".\"public\".\"pinterest_ad_group_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__targeting_geo_region_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__targeting_geo_region_tmp", "resource_type": "model", "package_name": "pinterest", "path": "staging/tmp/stg_pinterest_ads__targeting_geo_region_tmp.sql", "original_file_path": "models/staging/tmp/stg_pinterest_ads__targeting_geo_region_tmp.sql", "unique_id": "model.pinterest.stg_pinterest_ads__targeting_geo_region_tmp", "fqn": ["pinterest", "staging", "tmp", "stg_pinterest_ads__targeting_geo_region_tmp"], "alias": "stg_pinterest_ads__targeting_geo_region_tmp", "checksum": {"name": "sha256", "checksum": "765550e6ca3fb178a2fdc71dfa377bdbd46f24e0cdade72f94628da25106c220"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450498.5610085, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__targeting_geo_region_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__pinterest_ads_enabled', 'pinterest__using_targeting_geo_region'])) }}\n\n{% if var('pinterest_ads_union_schemas', []) | length > 0 or var('pinterest_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='targeting_geo_region',\n database_variable='pinterest_database',\n schema_variable='pinterest_schema',\n default_database=target.database,\n default_schema='pinterest_ads',\n default_variable='targeting_geo_region',\n union_schema_variable='pinterest_ads_union_schemas',\n union_database_variable='pinterest_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='pinterest_ads_sources',\n single_source_name='pinterest_ads',\n single_table_name='targeting_geo_region'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["pinterest_ads", "targeting_geo_region"], ["pinterest_ads", "targeting_geo_region"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.pinterest.pinterest_ads.targeting_geo_region"]}, "compiled_path": "target/compiled/pinterest/models/staging/tmp/stg_pinterest_ads__targeting_geo_region_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: pinterest_ads_targeting_geo_region_identifier\n -- database: postgres \n -- schema: public\n -- identifier: pinterest_targeting_geo_region_data\n\n\n select\n \"_fivetran_synced\",\n \"country_id\",\n \"region_id\",\n \"region_name\"\n from \"postgres\".\"public\".\"pinterest_targeting_geo_region_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__campaign_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__campaign_history_tmp", "resource_type": "model", "package_name": "pinterest", "path": "staging/tmp/stg_pinterest_ads__campaign_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_pinterest_ads__campaign_history_tmp.sql", "unique_id": "model.pinterest.stg_pinterest_ads__campaign_history_tmp", "fqn": ["pinterest", "staging", "tmp", "stg_pinterest_ads__campaign_history_tmp"], "alias": "stg_pinterest_ads__campaign_history_tmp", "checksum": {"name": "sha256", "checksum": "1b20d76a2d4f401b22ce88e7d7e940f0a7a39644a7bd8bd8397d53a7059dad3c"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450498.5721915, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\n{% if var('pinterest_ads_union_schemas', []) | length > 0 or var('pinterest_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_history',\n database_variable='pinterest_database',\n schema_variable='pinterest_schema',\n default_database=target.database,\n default_schema='pinterest_ads',\n default_variable='campaign_history',\n union_schema_variable='pinterest_ads_union_schemas',\n union_database_variable='pinterest_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='pinterest_ads_sources',\n single_source_name='pinterest_ads',\n single_table_name='campaign_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["pinterest_ads", "campaign_history"], ["pinterest_ads", "campaign_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.pinterest.pinterest_ads.campaign_history"]}, "compiled_path": "target/compiled/pinterest/models/staging/tmp/stg_pinterest_ads__campaign_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: pinterest_ads_campaign_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: pinterest_campaign_history_data\n\n\n select\n \"id\",\n \"created_time\",\n \"name\",\n \"status\",\n \"_fivetran_synced\",\n \"advertiser_id\",\n \"default_ad_group_budget_in_micro_currency\",\n \"is_automated_campaign\",\n \"is_campaign_budget_optimization\",\n \"is_flexible_daily_budgets\"\n from \"postgres\".\"public\".\"pinterest_campaign_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__targeting_geo_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__targeting_geo_tmp", "resource_type": "model", "package_name": "pinterest", "path": "staging/tmp/stg_pinterest_ads__targeting_geo_tmp.sql", "original_file_path": "models/staging/tmp/stg_pinterest_ads__targeting_geo_tmp.sql", "unique_id": "model.pinterest.stg_pinterest_ads__targeting_geo_tmp", "fqn": ["pinterest", "staging", "tmp", "stg_pinterest_ads__targeting_geo_tmp"], "alias": "stg_pinterest_ads__targeting_geo_tmp", "checksum": {"name": "sha256", "checksum": "330aa403f8663b97e1c75951a9dc73860b164b1cb515d5ec17d6e75b5d74b3c0"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450498.5829418, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__targeting_geo_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__pinterest_ads_enabled', 'pinterest__using_targeting_geo'])) }}\n\n{% if var('pinterest_ads_union_schemas', []) | length > 0 or var('pinterest_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='targeting_geo',\n database_variable='pinterest_database',\n schema_variable='pinterest_schema',\n default_database=target.database,\n default_schema='pinterest_ads',\n default_variable='targeting_geo',\n union_schema_variable='pinterest_ads_union_schemas',\n union_database_variable='pinterest_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='pinterest_ads_sources',\n single_source_name='pinterest_ads',\n single_table_name='targeting_geo'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["pinterest_ads", "targeting_geo"], ["pinterest_ads", "targeting_geo"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.pinterest.pinterest_ads.targeting_geo"]}, "compiled_path": "target/compiled/pinterest/models/staging/tmp/stg_pinterest_ads__targeting_geo_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: pinterest_ads_targeting_geo_identifier\n -- database: postgres \n -- schema: public\n -- identifier: pinterest_targeting_geo_data\n\n\n select\n \"country_id\",\n \"country_name\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"pinterest_targeting_geo_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__keyword_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__keyword_report_tmp", "resource_type": "model", "package_name": "pinterest", "path": "staging/tmp/stg_pinterest_ads__keyword_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_pinterest_ads__keyword_report_tmp.sql", "unique_id": "model.pinterest.stg_pinterest_ads__keyword_report_tmp", "fqn": ["pinterest", "staging", "tmp", "stg_pinterest_ads__keyword_report_tmp"], "alias": "stg_pinterest_ads__keyword_report_tmp", "checksum": {"name": "sha256", "checksum": "3992915e51255cb556ab907d0e845f37b6606b37111e2acb4d6e27011d72b680"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450498.5951562, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__keyword_report_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__pinterest_ads_enabled','pinterest__using_keywords'])) }}\n\n{% if var('pinterest_ads_union_schemas', []) | length > 0 or var('pinterest_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='keyword_report',\n database_variable='pinterest_database',\n schema_variable='pinterest_schema',\n default_database=target.database,\n default_schema='pinterest_ads',\n default_variable='keyword_report',\n union_schema_variable='pinterest_ads_union_schemas',\n union_database_variable='pinterest_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='pinterest_ads_sources',\n single_source_name='pinterest_ads',\n single_table_name='keyword_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["pinterest_ads", "keyword_report"], ["pinterest_ads", "keyword_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.pinterest.pinterest_ads.keyword_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/tmp/stg_pinterest_ads__keyword_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: pinterest_ads_keyword_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: pinterest_keyword_report_data\n\n\n select\n \"date\",\n \"keyword_id\",\n \"pin_promotion_id\",\n \"ad_group_id\",\n \"ad_group_name\",\n \"ad_group_status\",\n \"campaign_id\",\n \"advertiser_id\",\n \"_fivetran_synced\",\n \"impression_1\",\n \"impression_2\",\n \"clickthrough_1\",\n \"clickthrough_2\",\n \"spend_in_micro_dollar\",\n \"total_conversions\",\n \"total_conversions_quantity\",\n \"total_conversions_value_in_micro_dollar\"\n from \"postgres\".\"public\".\"pinterest_keyword_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.google_ads__search_term_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "google_ads__search_term_report", "resource_type": "model", "package_name": "google_ads", "path": "google_ads__search_term_report.sql", "original_file_path": "models/google_ads__search_term_report.sql", "unique_id": "model.google_ads.google_ads__search_term_report", "fqn": ["google_ads", "google_ads__search_term_report"], "alias": "google_ads__search_term_report", "checksum": {"name": "sha256", "checksum": "49fdd52da3b4b0387112fc8a654aa7ce150963c2f1ab945a4642565e11ffd789"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance at the ad group level for search terms matching tracked keywords.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "account_name": {"name": "account_name", "description": "The descriptive name of the Customer account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.account_descriptive_name"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "currency_code": {"name": "currency_code", "description": "The currency which the account uses.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "search_term": {"name": "search_term", "description": "A word or set of words a person enters when searching on Google or one of Google's Search Network sites", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.search_term"]}, "keyword_text": {"name": "keyword_text", "description": "The text of the keyword (at most 80 characters and 10 words).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.info_text"]}, "search_term_match_type": {"name": "search_term_match_type", "description": "How closely the search terms that triggered your ads on Google are related to the actual keywords in your account. Can be `BROAD` ,`EXACT`, `PHRASE`, `UNKNOWN`, or `UNSPECIFIED`.\n\nSee more details [here](https://support.google.com/google-ads/answer/7478529?sjid=15681083914881504235-NC&visit_id=638760377693438101-1187740487&rd=1).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.search_term_match_type"]}, "status": {"name": "status", "description": "Indicates whether the search term is currently one of your targeted or excluded keywords. Possible values: `ADDED`, `ADDED_EXCLUDED`, `EXCLUDED`, `NONE`, `UNKNOWN`, or `UNSPECIFIED`", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.search_term_status"]}, "spend": {"name": "spend", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}, "criterion_id": {"name": "criterion_id", "description": "Reference to the ad group criterion used for the associated keyword. One `keyword_text` may have multiple `criterion_id` values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.6908565, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"google_ads__search_term_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True) and var('google_ads__using_search_term_keyword_stats', True)) }}\n\nwith stats as (\n\n select *\n from {{ ref('stg_google_ads__search_term_keyword_stats') }}\n), \n\ncampaigns_accounts as (\n\n select *\n from {{ ref('int_google_ads__campaigns_accounts') }}\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_google_ads__ad_group_history') }}\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n stats.source_relation,\n stats.date_day,\n campaigns_accounts.account_name,\n stats.account_id,\n campaigns_accounts.currency_code,\n campaigns_accounts.campaign_name,\n stats.campaign_id,\n ad_groups.ad_group_name,\n stats.ad_group_id,\n stats.search_term,\n stats.keyword_text,\n stats.criterion_id,\n stats.search_term_match_type,\n stats.status,\n sum(stats.spend) as spend,\n sum(stats.clicks) as clicks,\n sum(stats.impressions) as impressions,\n sum(stats.conversions) as conversions,\n sum(stats.conversions_value) as conversions_value,\n sum(stats.view_through_conversions) as view_through_conversions\n\n {{ google_ads_persist_pass_through_columns(pass_through_variable='google_ads__search_term_keyword_stats_passthrough_metrics', identifier='stats', transform='sum', coalesce_with=0) }}\n\n from stats\n left join ad_groups\n on stats.ad_group_id = ad_groups.ad_group_id\n and stats.source_relation = ad_groups.source_relation\n left join campaigns_accounts\n on stats.campaign_id = campaigns_accounts.campaign_id\n and stats.source_relation = campaigns_accounts.source_relation\n {{ dbt_utils.group_by(14) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__search_term_keyword_stats", "package": null, "version": null}, {"name": "int_google_ads__campaigns_accounts", "package": null, "version": null}, {"name": "stg_google_ads__ad_group_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.google_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.google_ads.stg_google_ads__search_term_keyword_stats", "model.google_ads.int_google_ads__campaigns_accounts", "model.google_ads.stg_google_ads__ad_group_history"]}, "compiled_path": "target/compiled/google_ads/models/google_ads__search_term_report.sql", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__int_google_ads__campaigns_accounts as (\n\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final\n), stats as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__search_term_keyword_stats\"\n), \n\ncampaigns_accounts as (\n\n select *\n from __dbt__cte__int_google_ads__campaigns_accounts\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n stats.source_relation,\n stats.date_day,\n campaigns_accounts.account_name,\n stats.account_id,\n campaigns_accounts.currency_code,\n campaigns_accounts.campaign_name,\n stats.campaign_id,\n ad_groups.ad_group_name,\n stats.ad_group_id,\n stats.search_term,\n stats.keyword_text,\n stats.criterion_id,\n stats.search_term_match_type,\n stats.status,\n sum(stats.spend) as spend,\n sum(stats.clicks) as clicks,\n sum(stats.impressions) as impressions,\n sum(stats.conversions) as conversions,\n sum(stats.conversions_value) as conversions_value,\n sum(stats.view_through_conversions) as view_through_conversions\n\n \n\n\n\n\n\n from stats\n left join ad_groups\n on stats.ad_group_id = ad_groups.ad_group_id\n and stats.source_relation = ad_groups.source_relation\n left join campaigns_accounts\n on stats.campaign_id = campaigns_accounts.campaign_id\n and stats.source_relation = campaigns_accounts.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.google_ads.int_google_ads__campaigns_accounts", "sql": " __dbt__cte__int_google_ads__campaigns_accounts as (\n\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.google_ads__ad_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "google_ads__ad_report", "resource_type": "model", "package_name": "google_ads", "path": "google_ads__ad_report.sql", "original_file_path": "models/google_ads__ad_report.sql", "unique_id": "model.google_ads.google_ads__ad_report", "fqn": ["google_ads", "google_ads__ad_report"], "alias": "google_ads__ad_report", "checksum": {"name": "sha256", "checksum": "dc31e0c4b6d55b87821c25127e6223e9058a3d8319f00eee4a900cc9ebd509b3"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance at the ad level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "account_name": {"name": "account_name", "description": "The descriptive name of the Customer account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.account_descriptive_name"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "currency_code": {"name": "currency_code", "description": "The currency which the account uses.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "ad_id": {"name": "ad_id", "description": "The unique identifier of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "display_url": {"name": "display_url", "description": "The url which is displayed with the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "source_final_urls": {"name": "source_final_urls", "description": "The final urls that are used within the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_status": {"name": "ad_status", "description": "The status of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_type": {"name": "ad_type", "description": "The type of the ad that is being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.6842964, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"google_ads__ad_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith stats as (\n\n select *\n from {{ ref('stg_google_ads__ad_stats') }}\n), \n\ncampaigns_accounts as (\n\n select *\n from {{ ref('int_google_ads__campaigns_accounts') }}\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_google_ads__ad_group_history') }}\n where is_most_recent_record = True\n),\n\nads as (\n\n select *\n from {{ ref('stg_google_ads__ad_history') }}\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n stats.source_relation,\n stats.date_day,\n campaigns_accounts.account_name,\n campaigns_accounts.account_id,\n campaigns_accounts.currency_code,\n campaigns_accounts.campaign_name,\n campaigns_accounts.campaign_id,\n ad_groups.ad_group_name,\n stats.ad_group_id,\n stats.ad_id,\n ads.ad_name,\n ads.ad_status,\n ads.ad_type,\n ads.display_url,\n ads.source_final_urls,\n sum(stats.spend) as spend,\n sum(stats.clicks) as clicks,\n sum(stats.impressions) as impressions,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value,\n sum(view_through_conversions) as view_through_conversions\n\n {{ google_ads_persist_pass_through_columns(pass_through_variable='google_ads__ad_stats_passthrough_metrics', identifier='stats', transform='sum', coalesce_with=0, exclude_fields=['conversions','conversions_value','view_through_conversions']) }}\n\n from stats\n left join ads\n on stats.ad_id = ads.ad_id\n and stats.source_relation = ads.source_relation\n and stats.ad_group_id = ads.ad_group_id\n left join ad_groups\n on ads.ad_group_id = ad_groups.ad_group_id\n and ads.source_relation = ad_groups.source_relation\n left join campaigns_accounts\n on ad_groups.campaign_id = campaigns_accounts.campaign_id\n and ad_groups.source_relation = campaigns_accounts.source_relation\n {{ dbt_utils.group_by(15) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_stats", "package": null, "version": null}, {"name": "int_google_ads__campaigns_accounts", "package": null, "version": null}, {"name": "stg_google_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_google_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.google_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.google_ads.stg_google_ads__ad_stats", "model.google_ads.int_google_ads__campaigns_accounts", "model.google_ads.stg_google_ads__ad_group_history", "model.google_ads.stg_google_ads__ad_history"]}, "compiled_path": "target/compiled/google_ads/models/google_ads__ad_report.sql", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__int_google_ads__campaigns_accounts as (\n\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final\n), stats as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_stats\"\n), \n\ncampaigns_accounts as (\n\n select *\n from __dbt__cte__int_google_ads__campaigns_accounts\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_history\"\n where is_most_recent_record = True\n),\n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_history\"\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n stats.source_relation,\n stats.date_day,\n campaigns_accounts.account_name,\n campaigns_accounts.account_id,\n campaigns_accounts.currency_code,\n campaigns_accounts.campaign_name,\n campaigns_accounts.campaign_id,\n ad_groups.ad_group_name,\n stats.ad_group_id,\n stats.ad_id,\n ads.ad_name,\n ads.ad_status,\n ads.ad_type,\n ads.display_url,\n ads.source_final_urls,\n sum(stats.spend) as spend,\n sum(stats.clicks) as clicks,\n sum(stats.impressions) as impressions,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value,\n sum(view_through_conversions) as view_through_conversions\n\n \n\n\n\n\n\n from stats\n left join ads\n on stats.ad_id = ads.ad_id\n and stats.source_relation = ads.source_relation\n and stats.ad_group_id = ads.ad_group_id\n left join ad_groups\n on ads.ad_group_id = ad_groups.ad_group_id\n and ads.source_relation = ad_groups.source_relation\n left join campaigns_accounts\n on ad_groups.campaign_id = campaigns_accounts.campaign_id\n and ad_groups.source_relation = campaigns_accounts.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.google_ads.int_google_ads__campaigns_accounts", "sql": " __dbt__cte__int_google_ads__campaigns_accounts as (\n\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.google_ads__ad_group_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "google_ads__ad_group_report", "resource_type": "model", "package_name": "google_ads", "path": "google_ads__ad_group_report.sql", "original_file_path": "models/google_ads__ad_group_report.sql", "unique_id": "model.google_ads.google_ads__ad_group_report", "fqn": ["google_ads", "google_ads__ad_group_report"], "alias": "google_ads__ad_group_report", "checksum": {"name": "sha256", "checksum": "fe10e735f038ef73b6198421fe276e3dc5c29eb34daea07a1e649b88b90e265b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance at the ad group level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "account_name": {"name": "account_name", "description": "The descriptive name of the Customer account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.account_descriptive_name"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "currency_code": {"name": "currency_code", "description": "The currency which the account uses.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "ad_group_status": {"name": "ad_group_status", "description": "The status of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_type": {"name": "ad_group_type", "description": "The type of ad group which is serving ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.6819286, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"google_ads__ad_group_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith stats as (\n\n select *\n from {{ ref('stg_google_ads__ad_group_stats') }}\n),\n\ncampaigns_accounts as (\n\n select *\n from {{ ref('int_google_ads__campaigns_accounts') }}\n),\n\nad_groups as (\n\n select *\n from {{ ref('stg_google_ads__ad_group_history') }}\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n stats.source_relation,\n stats.date_day,\n campaigns_accounts.account_name,\n campaigns_accounts.account_id,\n campaigns_accounts.currency_code,\n campaigns_accounts.campaign_name,\n campaigns_accounts.campaign_id,\n ad_groups.ad_group_name,\n stats.ad_group_id,\n ad_groups.ad_group_status,\n ad_groups.ad_group_type,\n sum(stats.spend) as spend,\n sum(stats.clicks) as clicks,\n sum(stats.impressions) as impressions,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value,\n sum(view_through_conversions) as view_through_conversions\n\n {{ google_ads_persist_pass_through_columns(pass_through_variable='google_ads__ad_group_stats_passthrough_metrics', identifier='stats', transform='sum', coalesce_with=0, exclude_fields=['conversions','conversions_value','view_through_conversions']) }}\n\n from stats\n left join ad_groups\n on stats.ad_group_id = ad_groups.ad_group_id\n and stats.source_relation = ad_groups.source_relation\n left join campaigns_accounts\n on ad_groups.campaign_id = campaigns_accounts.campaign_id\n and ad_groups.source_relation = campaigns_accounts.source_relation\n {{ dbt_utils.group_by(11) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_group_stats", "package": null, "version": null}, {"name": "int_google_ads__campaigns_accounts", "package": null, "version": null}, {"name": "stg_google_ads__ad_group_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.google_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.google_ads.stg_google_ads__ad_group_stats", "model.google_ads.int_google_ads__campaigns_accounts", "model.google_ads.stg_google_ads__ad_group_history"]}, "compiled_path": "target/compiled/google_ads/models/google_ads__ad_group_report.sql", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__int_google_ads__campaigns_accounts as (\n\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final\n), stats as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_stats\"\n),\n\ncampaigns_accounts as (\n\n select *\n from __dbt__cte__int_google_ads__campaigns_accounts\n),\n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n stats.source_relation,\n stats.date_day,\n campaigns_accounts.account_name,\n campaigns_accounts.account_id,\n campaigns_accounts.currency_code,\n campaigns_accounts.campaign_name,\n campaigns_accounts.campaign_id,\n ad_groups.ad_group_name,\n stats.ad_group_id,\n ad_groups.ad_group_status,\n ad_groups.ad_group_type,\n sum(stats.spend) as spend,\n sum(stats.clicks) as clicks,\n sum(stats.impressions) as impressions,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value,\n sum(view_through_conversions) as view_through_conversions\n\n \n\n\n\n\n\n from stats\n left join ad_groups\n on stats.ad_group_id = ad_groups.ad_group_id\n and stats.source_relation = ad_groups.source_relation\n left join campaigns_accounts\n on ad_groups.campaign_id = campaigns_accounts.campaign_id\n and ad_groups.source_relation = campaigns_accounts.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.google_ads.int_google_ads__campaigns_accounts", "sql": " __dbt__cte__int_google_ads__campaigns_accounts as (\n\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.google_ads__account_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "google_ads__account_report", "resource_type": "model", "package_name": "google_ads", "path": "google_ads__account_report.sql", "original_file_path": "models/google_ads__account_report.sql", "unique_id": "model.google_ads.google_ads__account_report", "fqn": ["google_ads", "google_ads__account_report"], "alias": "google_ads__account_report", "checksum": {"name": "sha256", "checksum": "aaa1bae43d7a161831bcbbe9dec200c01c7189f790f6d6a7d1070862d2bafef5"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance at the account level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "account_name": {"name": "account_name", "description": "The descriptive name of the Customer account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.account_descriptive_name"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "time_zone": {"name": "time_zone", "description": "The time zone which the account is located.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency_code": {"name": "currency_code", "description": "The currency which the account uses.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "auto_tagging_enabled": {"name": "auto_tagging_enabled", "description": "Boolean indicating if the account uses auto tagging within ad urls.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.6802073, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"google_ads__account_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith stats as (\n\n select *\n from {{ ref('stg_google_ads__account_stats') }}\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_google_ads__account_history') }}\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n stats.source_relation,\n stats.date_day,\n accounts.account_name,\n stats.account_id,\n accounts.currency_code,\n accounts.auto_tagging_enabled,\n accounts.time_zone,\n sum(stats.spend) as spend,\n sum(stats.clicks) as clicks,\n sum(stats.impressions) as impressions,\n sum(stats.conversions) as conversions,\n sum(stats.conversions_value) as conversions_value,\n sum(stats.view_through_conversions) as view_through_conversions\n\n {{ google_ads_persist_pass_through_columns(pass_through_variable='google_ads__account_stats_passthrough_metrics', identifier='stats', transform='sum', coalesce_with=0, exclude_fields=['conversions','conversions_value','view_through_conversions']) }}\n\n from stats\n left join accounts\n on stats.account_id = accounts.account_id\n and stats.source_relation = accounts.source_relation\n {{ dbt_utils.group_by(7) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__account_stats", "package": null, "version": null}, {"name": "stg_google_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.google_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.google_ads.stg_google_ads__account_stats", "model.google_ads.stg_google_ads__account_history"]}, "compiled_path": "target/compiled/google_ads/models/google_ads__account_report.sql", "compiled": true, "compiled_code": "\n\nwith stats as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_stats\"\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n stats.source_relation,\n stats.date_day,\n accounts.account_name,\n stats.account_id,\n accounts.currency_code,\n accounts.auto_tagging_enabled,\n accounts.time_zone,\n sum(stats.spend) as spend,\n sum(stats.clicks) as clicks,\n sum(stats.impressions) as impressions,\n sum(stats.conversions) as conversions,\n sum(stats.conversions_value) as conversions_value,\n sum(stats.view_through_conversions) as view_through_conversions\n\n \n\n\n\n\n\n from stats\n left join accounts\n on stats.account_id = accounts.account_id\n and stats.source_relation = accounts.source_relation\n group by 1,2,3,4,5,6,7\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.google_ads__campaign_bid_modifiers_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "google_ads__campaign_bid_modifiers_report", "resource_type": "model", "package_name": "google_ads", "path": "google_ads__campaign_bid_modifiers_report.sql", "original_file_path": "models/google_ads__campaign_bid_modifiers_report.sql", "unique_id": "model.google_ads.google_ads__campaign_bid_modifiers_report", "fqn": ["google_ads", "google_ads__campaign_bid_modifiers_report"], "alias": "google_ads__campaign_bid_modifiers_report", "checksum": {"name": "sha256", "checksum": "b8acc437825d9c45198b8645dfe87e2da50055e914fa2aca8b12b8ecebcea142"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a specific bid modifier and its performance insights. Data is at the campaign-criterion grain since bid modifiers are campaign-level settings, and analysis focuses on overall modifier effectiveness. Campaigns with no bid modifiers will have a null criterion record.", "columns": {"bid_modifier_report_key": {"name": "bid_modifier_report_key", "description": "Surrogate key for the campaign bid modifiers report, combining source_relation, account_id, campaign_id, and criterion_id.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "account_name": {"name": "account_name", "description": "The descriptive name of the Customer account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.account_descriptive_name"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_name"]}, "advertising_channel_type": {"name": "advertising_channel_type", "description": "The type of advertising channel being used by the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertising_channel_subtype": {"name": "advertising_channel_subtype", "description": "The advertising channel subtype that is being used by the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "General status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "serving_status": {"name": "serving_status", "description": "Status of the ads and how they are currently being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_campaign_live": {"name": "is_campaign_live", "description": "Boolean indicating if the campaign is both enabled and actively serving (campaign_status = 'ENABLED' and serving_status = 'SERVING').", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bidding_strategy_type": {"name": "bidding_strategy_type", "description": "The type of bidding strategy (MANUAL_CPC, TARGET_CPA, etc.).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "target_cpa": {"name": "target_cpa", "description": "Target cost per acquisition.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "target_roas": {"name": "target_roas", "description": "Target return on ad spend.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "enhanced_cpc": {"name": "enhanced_cpc", "description": "Boolean indicating if enhanced CPC is enabled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "manual_cpa": {"name": "manual_cpa", "description": "Manual cost per acquisition setting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "manual_cpm": {"name": "manual_cpm", "description": "Manual cost per mille setting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "manual_cpv": {"name": "manual_cpv", "description": "Manual cost per view setting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bidding_status": {"name": "bidding_status", "description": "The status of the bidding strategy.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "criterion_id": {"name": "criterion_id", "description": "Unique identifier of the criterion that the bid modifier is applied to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_modifier": {"name": "bid_modifier", "description": "The modifier applied to the bid for this criterion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "interaction_type": {"name": "interaction_type", "description": "The type of interaction for the bid modifier.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "interaction_event_types": {"name": "interaction_event_types", "description": "The event types for the interaction.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "modifier_type": {"name": "modifier_type", "description": "The type of modifier (device, location, age_range, gender, income_range, parental_status, audience, keyword, topic, placement, or other).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "modifier_direction": {"name": "modifier_direction", "description": "Direction of the modifier (positive adjustment, negative adjustment, no adjustment, no modifier set).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "modifier_change": {"name": "modifier_change", "description": "The bid modifier change as a decimal (bid_modifier - 1).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_spend": {"name": "total_spend", "description": "Total spend in the last 30 days.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "avg_ctr": {"name": "avg_ctr", "description": "Average click-through rate as a decimal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "avg_cpc": {"name": "avg_cpc", "description": "Average cost per click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "calculated_observation": {"name": "calculated_observation", "description": "Performance observation that drives the recommendation based on configurable thresholds from individual low/high threshold variables like `google_ads__cpc_low`, `google_ads__cpc_high`, `google_ads__ctr_low`, `google_ads__ctr_high`, `google_ads__spend_low`, `google_ads__spend_high`, and `google_ads__bid_modifier_low`, `google_ads__bid_modifier_high`. Possible values include campaign disabled, campaign ended, not serving, high cpc, low ctr, high spend, manual bidding, disabled modifier, high positive modifier, significant negative modifier, high performance, high spend + poor performance, moderate performance, low spend, and normal performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "calculated_recommendation": {"name": "calculated_recommendation", "description": "Inferred action for bid modifier optimization based on dbt package logic and configurable threshold variables (Add modifiers, Review adjustments, Monitor performance, Monitor).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "calculated_priority": {"name": "calculated_priority", "description": "Inferred priority level for focusing on most critical issues first (high, medium, low), derived from configurable performance threshold variables.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.6997333, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"google_ads__campaign_bid_modifiers_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True) and var('google_ads__using_campaign_bid_modifier_history', True)) }}\n\n{% set using_campaign_bidding_strategy_history = var('google_ads__using_campaign_bidding_strategy_history', True) %}\n{% set using_campaign_criterion_history = var('google_ads__using_campaign_criterion_history', True) %}\n\n{% set diagnostic_thresholds = get_threshold_high_lows() %}\n\nwith bid_modifiers as (\n select *\n from {{ ref('stg_google_ads__campaign_bid_modifier_history') }}\n where is_most_recent_record = True\n),\n\n{% if using_campaign_bidding_strategy_history %}\nbidding_strategy as (\n select *\n from {{ ref('stg_google_ads__campaign_bidding_strategy_history') }}\n where is_most_recent_record = True\n),\n{% endif %}\n\n{% if using_campaign_criterion_history %}\ncampaign_criterion as (\n select *\n from {{ ref('stg_google_ads__campaign_criterion_history') }}\n where is_most_recent_record = True\n),\n{% endif %}\n\ncampaigns_accounts as (\n select *\n from {{ ref('int_google_ads__campaigns_accounts') }}\n),\n\n-- Performance by campaign last 30 days from staging\nrecent_campaign_performance as (\n select\n campaign_id,\n source_relation,\n sum(spend) as total_spend,\n sum(clicks) as total_clicks,\n sum(impressions) as total_impressions,\n\n -- CTR = Click-Through Rate (shows if bid adjustments improve engagement)\n {{ dbt_utils.safe_divide('sum(clicks)', 'sum(impressions)') }} as avg_ctr,\n -- CPC = Cost Per Click (shows actual cost impact of bid modifications)\n {{ dbt_utils.safe_divide('sum(spend)', 'sum(clicks)') }} as avg_cpc\n from {{ ref('stg_google_ads__campaign_stats') }}\n -- Rolling 30-day window for recent performance analysis\n -- Note: This creates non-deterministic results that change daily, which is intentional\n -- to provide current performance context for bid modifier recommendations\n where date_day >= {{ dbt.dateadd('day', -30, dbt.current_timestamp()) }}\n group by 1, 2\n),\n\n-- Base data gathering with joins and basic field calculations\ncampaign_base as (\n select\n campaigns_accounts.source_relation,\n campaigns_accounts.account_name,\n campaigns_accounts.account_id,\n campaigns_accounts.campaign_id,\n campaigns_accounts.campaign_name,\n campaigns_accounts.advertising_channel_type,\n campaigns_accounts.advertising_channel_subtype,\n campaigns_accounts.campaign_status,\n campaigns_accounts.serving_status,\n\n -- Helper field for live campaigns\n case\n when upper(campaigns_accounts.campaign_status) = 'ENABLED' and upper(campaigns_accounts.serving_status) = 'SERVING' then true\n else false\n end as is_campaign_live,\n\n {% if var('google_ads__using_campaign_bidding_strategy_history', True) %}\n -- Bidding strategy information\n coalesce(bidding_strategy.bidding_strategy_type, 'unknown') as bidding_strategy_type,\n coalesce(bidding_strategy.target_cpa, 0) as target_cpa,\n bidding_strategy.target_roas,\n bidding_strategy.enhanced_cpc,\n bidding_strategy.manual_cpa,\n bidding_strategy.manual_cpm,\n bidding_strategy.manual_cpv,\n bidding_strategy.bidding_status,\n {% endif %}\n\n -- Bid modifier information\n bid_modifiers.criterion_id,\n bid_modifiers.bid_modifier,\n bid_modifiers.interaction_type,\n bid_modifiers.interaction_event_types,\n\n {% if var('google_ads__using_campaign_criterion_history', True) %}\n -- Categorize modifier type based on criterion relationships\n case\n when campaign_criterion.device_type is not null then 'device'\n when campaign_criterion.geo_target_constant_id is not null then 'location'\n when campaign_criterion.age_range_type is not null then 'age_range'\n when campaign_criterion.gender_type is not null then 'gender'\n when campaign_criterion.income_range_type is not null then 'income_range'\n when campaign_criterion.parental_status_type is not null then 'parental_status'\n when campaign_criterion.user_list_id is not null then 'audience'\n when campaign_criterion.keyword_text is not null then 'keyword'\n when campaign_criterion.topic_constant_id is not null then 'topic'\n when campaign_criterion.placement_url is not null then 'placement'\n else 'other'\n end as modifier_type,\n {% else %}\n 'unknown' as modifier_type,\n {% endif %}\n\n case\n when bid_modifiers.bid_modifier = 0 then 'disabled'\n when bid_modifiers.bid_modifier > 1 then 'positive adjustment'\n when bid_modifiers.bid_modifier < 1 and bid_modifiers.bid_modifier > 0 then 'negative adjustment'\n when bid_modifiers.bid_modifier = 1 then 'no adjustment'\n else 'no modifier set'\n end as modifier_direction,\n\n -- Bid modifier change (decimal)\n case\n when bid_modifiers.bid_modifier is not null then (bid_modifiers.bid_modifier - 1)\n else 0\n end as modifier_change,\n\n -- Performance metrics to evaluate bid modifier effectiveness\n coalesce(recent_campaign_performance.total_spend, 0) as total_spend,\n coalesce(recent_campaign_performance.avg_ctr, 0) as avg_ctr,\n coalesce(recent_campaign_performance.avg_cpc, 0) as avg_cpc\n\n from campaigns_accounts\n left join bid_modifiers\n on campaigns_accounts.campaign_id = bid_modifiers.campaign_id\n and campaigns_accounts.source_relation = bid_modifiers.source_relation\n left join recent_campaign_performance\n on campaigns_accounts.campaign_id = recent_campaign_performance.campaign_id\n and campaigns_accounts.source_relation = recent_campaign_performance.source_relation\n\n {% if var('google_ads__using_campaign_bidding_strategy_history', True) %}\n left join bidding_strategy\n on campaigns_accounts.campaign_id = bidding_strategy.campaign_id\n and campaigns_accounts.source_relation = bidding_strategy.source_relation\n {% endif %}\n\n {% if var('google_ads__using_campaign_criterion_history', True) %}\n left join campaign_criterion\n on bid_modifiers.criterion_id = campaign_criterion.criterion_id\n and campaigns_accounts.campaign_id = campaign_criterion.campaign_id\n and campaigns_accounts.source_relation = campaign_criterion.source_relation\n {% endif %}\n),\n\n-- Determine recommendation reason based on performance thresholds and current bid settings\nrecommendation_logic as (\n select\n *,\n -- Inferred performance observation that drives the recommendation\n case\n when campaign_status in ('REMOVED', 'PAUSED')\n then 'campaign disabled'\n when serving_status = 'ENDED'\n then 'campaign ended'\n when serving_status != 'SERVING'\n then 'not serving'\n when avg_cpc > {{ diagnostic_thresholds['cpc']['high'] }}\n and bid_modifier is null\n and is_campaign_live\n then 'high cpc'\n when avg_ctr < {{ diagnostic_thresholds['ctr']['low'] }}\n and bid_modifier > 1\n and is_campaign_live\n then 'low ctr'\n when total_spend > {{ diagnostic_thresholds['spend']['high'] }}\n and bid_modifier is null\n and is_campaign_live\n then 'high spend'\n {% if var('google_ads__using_campaign_bidding_strategy_history', True) %}\n when lower(bidding_strategy_type) in ('manual_cpc', 'enhanced_cpc')\n and bid_modifier is null\n then 'manual bidding'\n {% endif %}\n when bid_modifier = 0\n then 'disabled modifier'\n when bid_modifier > {{ diagnostic_thresholds['bid_modifier']['high'] }}\n then 'high positive modifier'\n when bid_modifier < {{ diagnostic_thresholds['bid_modifier']['low'] }} and bid_modifier > 0\n then 'significant negative modifier'\n when avg_ctr >= {{ diagnostic_thresholds['ctr']['high'] }}\n and avg_cpc <= {{ diagnostic_thresholds['cpc']['low'] }}\n then 'high performance'\n when total_spend > {{ diagnostic_thresholds['spend']['high'] }}\n and avg_ctr < {{ diagnostic_thresholds['ctr']['low'] }}\n then 'high spend + poor performance'\n when total_spend >= {{ diagnostic_thresholds['spend']['low'] }}\n and total_spend <= {{ diagnostic_thresholds['spend']['high'] }}\n and avg_ctr >= {{ diagnostic_thresholds['ctr']['low'] }}\n then 'moderate performance'\n when total_spend < {{ diagnostic_thresholds['spend']['low'] }}\n and total_spend > 0\n then 'low spend'\n else 'no notable observation'\n end as calculated_observation\n\n from campaign_base\n),\n\n-- derive action from reason to avoid duplicating threshold logic\nfinal as (\n select\n *,\n -- inferred action based on the performance observation\n case\n when calculated_observation = 'campaign disabled' then 'enable campaign'\n when calculated_observation = 'campaign ended' then 'review or restart campaign'\n when calculated_observation = 'not serving' then 'resolve serving issues'\n when calculated_observation in ('high cpc', 'high spend', 'manual bidding') then 'add modifiers'\n when calculated_observation in ('low ctr', 'significant negative modifier', 'disabled modifier') then 'review adjustments'\n when calculated_observation = 'high positive modifier' then 'monitor performance'\n when calculated_observation = 'high performance' then 'scale successful modifiers'\n when calculated_observation = 'high spend + poor performance' then 'optimize bid modifiers'\n when calculated_observation = 'moderate performance' then 'optimize gradually'\n when calculated_observation = 'low spend' then 'consider increasing budget'\n else 'monitor'\n end as calculated_recommendation,\n\n -- inferred priority level for focusing on most critical issues first\n case\n -- High: Campaign blocking issues\n when calculated_observation in ('campaign disabled', 'not serving') then 'high'\n\n -- High: Cost/spend issues requiring immediate attention\n when calculated_observation in ('high cpc', 'high spend', 'high spend + poor performance') then 'high'\n\n -- Medium: Setup and optimization issues\n when calculated_observation = 'campaign ended' then 'medium'\n when calculated_observation in ('significant negative modifier', 'low ctr', 'disabled modifier') then 'medium'\n when calculated_observation in ('manual bidding', 'high positive modifier') then 'medium'\n\n -- Low: Normal operations and good performance\n when calculated_observation in ('high performance', 'moderate performance', 'low spend') then 'low'\n else 'low'\n end as calculated_priority\n from recommendation_logic\n)\n\nselect\n *,\n {{ dbt_utils.generate_surrogate_key(['source_relation', 'account_id', 'campaign_id', 'criterion_id']) }} as bid_modifier_report_key\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_bid_modifier_history", "package": null, "version": null}, {"name": "stg_google_ads__campaign_bidding_strategy_history", "package": null, "version": null}, {"name": "stg_google_ads__campaign_criterion_history", "package": null, "version": null}, {"name": "int_google_ads__campaigns_accounts", "package": null, "version": null}, {"name": "stg_google_ads__campaign_stats", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_threshold_high_lows", "macro.dbt_utils.safe_divide", "macro.dbt.current_timestamp", "macro.dbt.dateadd", "macro.dbt_utils.generate_surrogate_key"], "nodes": ["model.google_ads.stg_google_ads__campaign_bid_modifier_history", "model.google_ads.stg_google_ads__campaign_bidding_strategy_history", "model.google_ads.stg_google_ads__campaign_criterion_history", "model.google_ads.int_google_ads__campaigns_accounts", "model.google_ads.stg_google_ads__campaign_stats"]}, "compiled_path": "target/compiled/google_ads/models/google_ads__campaign_bid_modifiers_report.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\nwith __dbt__cte__int_google_ads__campaigns_accounts as (\n\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final\n), bid_modifiers as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_bid_modifier_history\"\n where is_most_recent_record = True\n),\n\n\nbidding_strategy as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_bidding_strategy_history\"\n where is_most_recent_record = True\n),\n\n\n\ncampaign_criterion as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_criterion_history\"\n where is_most_recent_record = True\n),\n\n\ncampaigns_accounts as (\n select *\n from __dbt__cte__int_google_ads__campaigns_accounts\n),\n\n-- Performance by campaign last 30 days from staging\nrecent_campaign_performance as (\n select\n campaign_id,\n source_relation,\n sum(spend) as total_spend,\n sum(clicks) as total_clicks,\n sum(impressions) as total_impressions,\n\n -- CTR = Click-Through Rate (shows if bid adjustments improve engagement)\n \n ( sum(clicks) ) / nullif( ( sum(impressions) ), 0)\n as avg_ctr,\n -- CPC = Cost Per Click (shows actual cost impact of bid modifications)\n \n ( sum(spend) ) / nullif( ( sum(clicks) ), 0)\n as avg_cpc\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_stats\"\n -- Rolling 30-day window for recent performance analysis\n -- Note: This creates non-deterministic results that change daily, which is intentional\n -- to provide current performance context for bid modifier recommendations\n where date_day >= \n\n now() + ((interval '1 day') * (-30))\n\n\n group by 1, 2\n),\n\n-- Base data gathering with joins and basic field calculations\ncampaign_base as (\n select\n campaigns_accounts.source_relation,\n campaigns_accounts.account_name,\n campaigns_accounts.account_id,\n campaigns_accounts.campaign_id,\n campaigns_accounts.campaign_name,\n campaigns_accounts.advertising_channel_type,\n campaigns_accounts.advertising_channel_subtype,\n campaigns_accounts.campaign_status,\n campaigns_accounts.serving_status,\n\n -- Helper field for live campaigns\n case\n when upper(campaigns_accounts.campaign_status) = 'ENABLED' and upper(campaigns_accounts.serving_status) = 'SERVING' then true\n else false\n end as is_campaign_live,\n\n \n -- Bidding strategy information\n coalesce(bidding_strategy.bidding_strategy_type, 'unknown') as bidding_strategy_type,\n coalesce(bidding_strategy.target_cpa, 0) as target_cpa,\n bidding_strategy.target_roas,\n bidding_strategy.enhanced_cpc,\n bidding_strategy.manual_cpa,\n bidding_strategy.manual_cpm,\n bidding_strategy.manual_cpv,\n bidding_strategy.bidding_status,\n \n\n -- Bid modifier information\n bid_modifiers.criterion_id,\n bid_modifiers.bid_modifier,\n bid_modifiers.interaction_type,\n bid_modifiers.interaction_event_types,\n\n \n -- Categorize modifier type based on criterion relationships\n case\n when campaign_criterion.device_type is not null then 'device'\n when campaign_criterion.geo_target_constant_id is not null then 'location'\n when campaign_criterion.age_range_type is not null then 'age_range'\n when campaign_criterion.gender_type is not null then 'gender'\n when campaign_criterion.income_range_type is not null then 'income_range'\n when campaign_criterion.parental_status_type is not null then 'parental_status'\n when campaign_criterion.user_list_id is not null then 'audience'\n when campaign_criterion.keyword_text is not null then 'keyword'\n when campaign_criterion.topic_constant_id is not null then 'topic'\n when campaign_criterion.placement_url is not null then 'placement'\n else 'other'\n end as modifier_type,\n \n\n case\n when bid_modifiers.bid_modifier = 0 then 'disabled'\n when bid_modifiers.bid_modifier > 1 then 'positive adjustment'\n when bid_modifiers.bid_modifier < 1 and bid_modifiers.bid_modifier > 0 then 'negative adjustment'\n when bid_modifiers.bid_modifier = 1 then 'no adjustment'\n else 'no modifier set'\n end as modifier_direction,\n\n -- Bid modifier change (decimal)\n case\n when bid_modifiers.bid_modifier is not null then (bid_modifiers.bid_modifier - 1)\n else 0\n end as modifier_change,\n\n -- Performance metrics to evaluate bid modifier effectiveness\n coalesce(recent_campaign_performance.total_spend, 0) as total_spend,\n coalesce(recent_campaign_performance.avg_ctr, 0) as avg_ctr,\n coalesce(recent_campaign_performance.avg_cpc, 0) as avg_cpc\n\n from campaigns_accounts\n left join bid_modifiers\n on campaigns_accounts.campaign_id = bid_modifiers.campaign_id\n and campaigns_accounts.source_relation = bid_modifiers.source_relation\n left join recent_campaign_performance\n on campaigns_accounts.campaign_id = recent_campaign_performance.campaign_id\n and campaigns_accounts.source_relation = recent_campaign_performance.source_relation\n\n \n left join bidding_strategy\n on campaigns_accounts.campaign_id = bidding_strategy.campaign_id\n and campaigns_accounts.source_relation = bidding_strategy.source_relation\n \n\n \n left join campaign_criterion\n on bid_modifiers.criterion_id = campaign_criterion.criterion_id\n and campaigns_accounts.campaign_id = campaign_criterion.campaign_id\n and campaigns_accounts.source_relation = campaign_criterion.source_relation\n \n),\n\n-- Determine recommendation reason based on performance thresholds and current bid settings\nrecommendation_logic as (\n select\n *,\n -- Inferred performance observation that drives the recommendation\n case\n when campaign_status in ('REMOVED', 'PAUSED')\n then 'campaign disabled'\n when serving_status = 'ENDED'\n then 'campaign ended'\n when serving_status != 'SERVING'\n then 'not serving'\n when avg_cpc > 3.0\n and bid_modifier is null\n and is_campaign_live\n then 'high cpc'\n when avg_ctr < 0.015\n and bid_modifier > 1\n and is_campaign_live\n then 'low ctr'\n when total_spend > 500.0\n and bid_modifier is null\n and is_campaign_live\n then 'high spend'\n \n when lower(bidding_strategy_type) in ('manual_cpc', 'enhanced_cpc')\n and bid_modifier is null\n then 'manual bidding'\n \n when bid_modifier = 0\n then 'disabled modifier'\n when bid_modifier > 1.5\n then 'high positive modifier'\n when bid_modifier < 0.7 and bid_modifier > 0\n then 'significant negative modifier'\n when avg_ctr >= 0.03\n and avg_cpc <= 1.0\n then 'high performance'\n when total_spend > 500.0\n and avg_ctr < 0.015\n then 'high spend + poor performance'\n when total_spend >= 100.0\n and total_spend <= 500.0\n and avg_ctr >= 0.015\n then 'moderate performance'\n when total_spend < 100.0\n and total_spend > 0\n then 'low spend'\n else 'no notable observation'\n end as calculated_observation\n\n from campaign_base\n),\n\n-- derive action from reason to avoid duplicating threshold logic\nfinal as (\n select\n *,\n -- inferred action based on the performance observation\n case\n when calculated_observation = 'campaign disabled' then 'enable campaign'\n when calculated_observation = 'campaign ended' then 'review or restart campaign'\n when calculated_observation = 'not serving' then 'resolve serving issues'\n when calculated_observation in ('high cpc', 'high spend', 'manual bidding') then 'add modifiers'\n when calculated_observation in ('low ctr', 'significant negative modifier', 'disabled modifier') then 'review adjustments'\n when calculated_observation = 'high positive modifier' then 'monitor performance'\n when calculated_observation = 'high performance' then 'scale successful modifiers'\n when calculated_observation = 'high spend + poor performance' then 'optimize bid modifiers'\n when calculated_observation = 'moderate performance' then 'optimize gradually'\n when calculated_observation = 'low spend' then 'consider increasing budget'\n else 'monitor'\n end as calculated_recommendation,\n\n -- inferred priority level for focusing on most critical issues first\n case\n -- High: Campaign blocking issues\n when calculated_observation in ('campaign disabled', 'not serving') then 'high'\n\n -- High: Cost/spend issues requiring immediate attention\n when calculated_observation in ('high cpc', 'high spend', 'high spend + poor performance') then 'high'\n\n -- Medium: Setup and optimization issues\n when calculated_observation = 'campaign ended' then 'medium'\n when calculated_observation in ('significant negative modifier', 'low ctr', 'disabled modifier') then 'medium'\n when calculated_observation in ('manual bidding', 'high positive modifier') then 'medium'\n\n -- Low: Normal operations and good performance\n when calculated_observation in ('high performance', 'moderate performance', 'low spend') then 'low'\n else 'low'\n end as calculated_priority\n from recommendation_logic\n)\n\nselect\n *,\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(account_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(campaign_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(criterion_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as bid_modifier_report_key\nfrom final", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.google_ads.int_google_ads__campaigns_accounts", "sql": " __dbt__cte__int_google_ads__campaigns_accounts as (\n\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": ["bid_modifier_report_key"], "time_spine": null}, "model.google_ads.google_ads__campaign_budget_diagnostics_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "google_ads__campaign_budget_diagnostics_report", "resource_type": "model", "package_name": "google_ads", "path": "google_ads__campaign_budget_diagnostics_report.sql", "original_file_path": "models/google_ads__campaign_budget_diagnostics_report.sql", "unique_id": "model.google_ads.google_ads__campaign_budget_diagnostics_report", "fqn": ["google_ads", "google_ads__campaign_budget_diagnostics_report"], "alias": "google_ads__campaign_budget_diagnostics_report", "checksum": {"name": "sha256", "checksum": "4d648df642262eea71cdc2edb015bdaaad23adf8007577754ffde8546c680ca5"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a campaign's budget constraints and performance diagnostics.", "columns": {"budget_diagnostics_report_key": {"name": "budget_diagnostics_report_key", "description": "Surrogate key for the campaign budget diagnostics report, combining source_relation, account_id, campaign_id, and date_day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "date_day": {"name": "date_day", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_name"]}, "account_name": {"name": "account_name", "description": "The descriptive name of the Customer account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.account_descriptive_name"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "advertising_channel_type": {"name": "advertising_channel_type", "description": "The type of advertising channel being used by the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertising_channel_subtype": {"name": "advertising_channel_subtype", "description": "The advertising channel subtype that is being used by the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "General status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "serving_status": {"name": "serving_status", "description": "Status of the ads and how they are currently being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_campaign_live": {"name": "is_campaign_live", "description": "Boolean indicating if the campaign is both enabled and actively serving (campaign_status = 'ENABLED' and serving_status = 'SERVING').", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget": {"name": "daily_budget", "description": "The daily budget amount for the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_budget": {"name": "total_budget", "description": "The total budget amount for lifetime campaigns.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_type": {"name": "budget_type", "description": "The type of budget (DAILY, LIFETIME, etc.).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_status": {"name": "budget_status", "description": "The status of the budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "has_recommended_budget": {"name": "has_recommended_budget", "description": "Boolean indicating if Google has a recommended budget for this campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "recommended_daily_budget": {"name": "recommended_daily_budget", "description": "Google's recommended daily budget when available, otherwise falls back to current daily budget for consistency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bidding_strategy_type": {"name": "bidding_strategy_type", "description": "The type of bidding strategy (MANUAL_CPC, TARGET_CPA, etc.).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "target_cpa": {"name": "target_cpa", "description": "Target cost per acquisition.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "target_roas": {"name": "target_roas", "description": "Target return on ad spend.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "enhanced_cpc": {"name": "enhanced_cpc", "description": "Boolean indicating if enhanced CPC is enabled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "spend": {"name": "spend", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "ctr": {"name": "ctr", "description": "The click-through rate. A ratio showing how often people who see your ad or free product listing end up clicking it. See more details [here](https://support.google.com/google-ads/answer/2615875?hl=en&ref_topic=24937&sjid=15681083914881504235-NC).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ctr"]}, "budget_utilization": {"name": "budget_utilization", "description": "Decimal representing budget utilization (spend / daily_budget).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_targeting_criteria": {"name": "total_targeting_criteria", "description": "Total number of targeting criteria set for the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "location_targeting_count": {"name": "location_targeting_count", "description": "Number of location targeting criteria.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "audience_targeting_count": {"name": "audience_targeting_count", "description": "Number of audience targeting criteria.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "location_targeting_breadth": {"name": "location_targeting_breadth", "description": "Assessment of location targeting breadth - 'limited' (fewer than the low threshold), 'broad' (more than the high threshold), or 'normal'. Thresholds are configurable via google_ads__location_targeting_low and google_ads__location_targeting_high variables.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_device_targeting": {"name": "is_device_targeting", "description": "Boolean indicating if device targeting criteria are set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_audience_targeting": {"name": "is_audience_targeting", "description": "Boolean indicating if audience targeting criteria are set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_increase_opportunity": {"name": "budget_increase_opportunity", "description": "Dollar amount by which Google recommends increasing the daily budget (0 when Google has no recommendation).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "calculated_observation": {"name": "calculated_observation", "description": "Performance observation that drives the budget recommendation based on configurable thresholds from `google_ads__budget_high_lows`, `google_ads__ctr_high_lows`, `google_ads__cpc_high_lows`, `google_ads__spend_high_lows`, `google_ads__location_targeting_high_lows`, and `google_ads__bid_modifier_high_lows` variables. Possible values include campaign disabled, campaign ended, not serving, budget constrained, budget + targeting constrained, targeting constrained, quality/relevance + targeting constrained, quality/relevance constrained, high spend + good performance, high spend + poor performance, moderate spend + normal performance, low spend + low budget utilization, low spend + budget constrained, low spend, no spend + no targeting, no spend, budget disabled, and normal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "calculated_recommendation": {"name": "calculated_recommendation", "description": "Inferred action for budget optimization based on dbt package logic and configurable threshold variables (increase budget, optimize targeting/bids, improve relevance, etc.).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "calculated_priority": {"name": "calculated_priority", "description": "Inferred priority level for focusing on most critical budget issues first (high, medium, low), derived from configurable performance threshold variables.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.706327, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"google_ads__campaign_budget_diagnostics_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True) and var('google_ads__using_campaign_budget_history', True)) }}\n\n{% set using_campaign_bidding_strategy_history = var('google_ads__using_campaign_bidding_strategy_history', True) %}\n{% set using_campaign_criterion_history = var('google_ads__using_campaign_criterion_history', True) %}\n\n{% set diagnostic_thresholds = get_threshold_high_lows() %}\n\nwith campaign_report as (\n select *\n from {{ ref('google_ads__campaign_report') }}\n),\n\ncampaign_budget as (\n select *\n from {{ ref('stg_google_ads__campaign_budget_history') }}\n where is_most_recent_record = True\n),\n\n{% if using_campaign_bidding_strategy_history %}\ncampaign_bidding_strategy as (\n select *\n from {{ ref('stg_google_ads__campaign_bidding_strategy_history') }}\n where is_most_recent_record = True\n),\n{% endif %}\n\n{% if using_campaign_criterion_history %}\ncampaign_criterion as (\n select *\n from {{ ref('stg_google_ads__campaign_criterion_history') }}\n where is_most_recent_record = True\n),\n{% endif %}\n\n{% if using_campaign_criterion_history %}\n-- Raw targeting counts by campaign\ncampaign_targeting_counts as (\n select\n campaign_id,\n source_relation,\n count(*) as total_criteria_count,\n count(case when geo_target_constant_id is not null then 1 end) as location_targets_count,\n count(case when device_type is not null then 1 end) as device_targets_count,\n count(case when age_range_type is not null then 1 end) as age_targets_count,\n count(case when gender_type is not null then 1 end) as gender_targets_count,\n count(case when user_list_id is not null then 1 end) as audience_targets_count\n\n from campaign_criterion\n group by 1, 2\n),\n\n-- Apply targeting constraint logic\ncampaign_targeting_analysis as (\n select\n *,\n -- Targeting constraint flags\n case\n when location_targets_count < {{ diagnostic_thresholds['location_targeting']['low'] }} then 'limited'\n when location_targets_count > {{ diagnostic_thresholds['location_targeting']['high'] }} then 'broad'\n else 'normal'\n end as location_targeting_breadth,\n\n (device_targets_count > 0) as is_device_targeting,\n (audience_targets_count > 0) as is_audience_targeting\n\n from campaign_targeting_counts\n),\n{% endif %}\n\n\n\n-- Base data gathering with joins and basic field calculations\ncampaign_base as (\n select\n campaign_report.source_relation,\n campaign_report.date_day,\n campaign_report.campaign_id,\n campaign_report.campaign_name,\n campaign_report.account_name,\n campaign_report.account_id,\n campaign_report.advertising_channel_type,\n campaign_report.advertising_channel_subtype,\n campaign_report.status as campaign_status,\n campaign_report.serving_status,\n\n -- Budget information\n coalesce(campaign_budget.daily_budget, 0) as daily_budget,\n coalesce(campaign_budget.total_budget, 0) as total_budget,\n campaign_budget.budget_type,\n campaign_budget.budget_status,\n campaign_budget.has_recommended_budget,\n -- Use Google's recommendation when available, otherwise fall back to current budget\n case\n when campaign_budget.recommended_daily_budget > 0\n then campaign_budget.recommended_daily_budget\n else coalesce(campaign_budget.daily_budget, 0)\n end as recommended_daily_budget,\n\n {% if using_campaign_bidding_strategy_history %}\n -- Bidding strategy information\n campaign_bidding_strategy.bidding_strategy_type,\n coalesce(campaign_bidding_strategy.target_cpa, 0) as target_cpa,\n coalesce(campaign_bidding_strategy.target_roas, 0) as target_roas,\n campaign_bidding_strategy.enhanced_cpc,\n {% endif %}\n\n -- Performance metrics\n campaign_report.impressions,\n campaign_report.spend,\n campaign_report.clicks,\n\n {% if using_campaign_criterion_history %}\n -- Targeting constraint information\n coalesce(campaign_targeting_analysis.total_criteria_count, 0) as total_targeting_criteria,\n coalesce(campaign_targeting_analysis.location_targets_count, 0) as location_targeting_count,\n coalesce(campaign_targeting_analysis.audience_targets_count, 0) as audience_targeting_count,\n coalesce(campaign_targeting_analysis.location_targeting_breadth, 'normal') as location_targeting_breadth,\n coalesce(campaign_targeting_analysis.is_device_targeting, false) as is_device_targeting,\n coalesce(campaign_targeting_analysis.is_audience_targeting, false) as is_audience_targeting,\n {% endif %}\n\n -- Click-through rate (shows ad relevance and quality)\n campaign_report.ctr,\n -- Budget usage (shows if budget constraints are limiting performance)\n {{ dbt_utils.safe_divide('campaign_report.spend', 'campaign_budget.daily_budget') }} as budget_utilization,\n -- Helper field for live campaigns\n (upper(campaign_report.status) = 'ENABLED' and upper(campaign_report.serving_status) = 'SERVING') as is_campaign_live\n\n from campaign_report\n left join campaign_budget\n on campaign_report.campaign_id = campaign_budget.campaign_id\n and campaign_report.source_relation = campaign_budget.source_relation\n {% if using_campaign_bidding_strategy_history %}\n left join campaign_bidding_strategy\n on campaign_report.campaign_id = campaign_bidding_strategy.campaign_id\n and campaign_report.source_relation = campaign_bidding_strategy.source_relation\n {% endif %}\n {% if using_campaign_criterion_history %}\n left join campaign_targeting_analysis\n on campaign_report.campaign_id = campaign_targeting_analysis.campaign_id\n and campaign_report.source_relation = campaign_targeting_analysis.source_relation\n {% endif %}\n),\n\n-- Apply business logic for diagnostics\nrecommendation_logic as (\n select\n *,\n \n -- Budget increase opportunity (simple difference since recommended_daily_budget falls back to current when no recommendation)\n recommended_daily_budget - daily_budget as budget_increase_opportunity,\n\n -- Inferred performance observation that drives the recommendation\n case\n when campaign_status in ('REMOVED', 'PAUSED')\n then 'campaign disabled'\n when serving_status = 'ENDED'\n then 'campaign ended'\n when serving_status != 'SERVING'\n then 'not serving'\n when budget_utilization >= {{ diagnostic_thresholds['budget']['high'] }}\n and daily_budget > 0\n and is_campaign_live\n then 'budget constrained'\n {% if using_campaign_criterion_history %}\n when budget_utilization >= {{ diagnostic_thresholds['budget']['low'] }} -- \">= budget.low\" translates to moderate budget utilization\n and location_targeting_breadth = 'limited'\n and daily_budget > 0\n and is_campaign_live\n then 'budget + targeting constrained'\n when spend > 0\n and location_targeting_breadth = 'limited'\n and not is_audience_targeting\n and is_campaign_live\n then 'targeting constrained'\n when spend > 0\n and impressions > 0\n and ctr < {{ diagnostic_thresholds['ctr']['low'] }}\n and not is_audience_targeting\n and is_campaign_live\n then 'quality/relevance + targeting constrained'\n {% endif %}\n when spend > 0\n and impressions > 0\n and ctr < {{ diagnostic_thresholds['ctr']['low'] }}\n and is_campaign_live\n then 'quality/relevance constrained'\n when spend > {{ diagnostic_thresholds['spend']['high'] }}\n and impressions > 0\n and ctr >= {{ diagnostic_thresholds['ctr']['high'] }}\n and is_campaign_live\n then 'high spend + good performance'\n when spend > {{ diagnostic_thresholds['spend']['high'] }}\n and impressions > 0\n and ctr < {{ diagnostic_thresholds['ctr']['low'] }}\n and is_campaign_live\n then 'high spend + poor performance'\n when spend >= {{ diagnostic_thresholds['spend']['low'] }}\n and spend <= {{ diagnostic_thresholds['spend']['high'] }}\n and ctr >= {{ diagnostic_thresholds['ctr']['low'] }}\n and ctr < {{ diagnostic_thresholds['ctr']['high'] }}\n and is_campaign_live\n then 'moderate spend + normal performance'\n when spend < {{ diagnostic_thresholds['spend']['low'] }}\n and spend > 0\n and budget_utilization < {{ diagnostic_thresholds['budget']['low'] }}\n and is_campaign_live\n then 'low spend + low budget utilization'\n when spend < {{ diagnostic_thresholds['spend']['low'] }}\n and spend > 0\n and budget_utilization >= {{ diagnostic_thresholds['budget']['low'] }}\n and is_campaign_live\n then 'low spend + budget constrained'\n when spend < {{ diagnostic_thresholds['spend']['low'] }}\n and spend > 0\n and is_campaign_live\n then 'low spend'\n {% if using_campaign_criterion_history %}\n when spend = 0\n and total_targeting_criteria = 0\n then 'no spend + no targeting'\n {% endif %}\n when spend = 0\n then 'no spend'\n when budget_status != 'ENABLED'\n then 'budget disabled'\n when campaign_status != 'ENABLED'\n then 'campaign disabled'\n else 'no notable observation'\n end as calculated_observation\n\n from campaign_base\n),\n\n-- Derive action and priority from observation\nfinal as (\n select\n *,\n -- Inferred action based on the performance observation\n case\n when calculated_observation in ('campaign disabled', 'budget disabled') then 'enable campaign'\n when calculated_observation = 'campaign ended' then 'review or restart campaign'\n when calculated_observation = 'not serving' then 'resolve serving issues'\n when calculated_observation in ('budget constrained', 'budget + targeting constrained') then 'increase budget'\n when calculated_observation = 'targeting constrained' then 'expand targeting'\n when calculated_observation in ('quality/relevance constrained', 'quality/relevance + targeting constrained') then 'improve relevance'\n when calculated_observation in ('no spend + no targeting', 'no spend') then 'diagnose setup'\n when calculated_observation = 'high spend + good performance' then 'maintain and scale'\n when calculated_observation = 'high spend + poor performance' then 'improve efficiency'\n when calculated_observation = 'moderate spend + normal performance' then 'optimize gradually'\n when calculated_observation = 'low spend + low budget utilization' then 'diagnose targeting and bidding'\n when calculated_observation = 'low spend + budget constrained' then 'increase budget'\n when calculated_observation = 'low spend' then 'consider increasing budget'\n else 'monitor'\n end as calculated_recommendation,\n\n -- Inferred priority level for focusing on most critical issues first\n case\n -- High: Campaign/Budget blocking issues\n when calculated_observation in ('campaign disabled', 'budget disabled', 'not serving') then 'high'\n when calculated_observation in ('budget constrained', 'budget + targeting constrained') then 'high'\n when calculated_observation in ('no spend + no targeting', 'no spend') then 'high'\n\n -- High: Poor performance with high spend\n when calculated_observation = 'high spend + poor performance' then 'high'\n\n -- Medium: Setup and constraint issues\n when calculated_observation = 'campaign ended' then 'medium'\n when calculated_observation in ('targeting constrained', 'quality/relevance constrained', 'quality/relevance + targeting constrained') then 'medium'\n when calculated_observation in ('low spend + low budget utilization', 'low spend + budget constrained') then 'medium'\n\n -- Low: Normal operations and good performance\n when calculated_observation in ('high spend + good performance', 'moderate spend + normal performance', 'low spend') then 'low'\n else 'low'\n end as calculated_priority\n from recommendation_logic\n)\n\nselect\n *,\n {{ dbt_utils.generate_surrogate_key(['source_relation', 'account_id', 'campaign_id', 'date_day']) }} as budget_diagnostics_report_key\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__campaign_report", "package": null, "version": null}, {"name": "stg_google_ads__campaign_budget_history", "package": null, "version": null}, {"name": "stg_google_ads__campaign_bidding_strategy_history", "package": null, "version": null}, {"name": "stg_google_ads__campaign_criterion_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_threshold_high_lows", "macro.dbt_utils.safe_divide", "macro.dbt_utils.generate_surrogate_key"], "nodes": ["model.google_ads.google_ads__campaign_report", "model.google_ads.stg_google_ads__campaign_budget_history", "model.google_ads.stg_google_ads__campaign_bidding_strategy_history", "model.google_ads.stg_google_ads__campaign_criterion_history"]}, "compiled_path": "target/compiled/google_ads/models/google_ads__campaign_budget_diagnostics_report.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\nwith campaign_report as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"google_ads__campaign_report\"\n),\n\ncampaign_budget as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_budget_history\"\n where is_most_recent_record = True\n),\n\n\ncampaign_bidding_strategy as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_bidding_strategy_history\"\n where is_most_recent_record = True\n),\n\n\n\ncampaign_criterion as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_criterion_history\"\n where is_most_recent_record = True\n),\n\n\n\n-- Raw targeting counts by campaign\ncampaign_targeting_counts as (\n select\n campaign_id,\n source_relation,\n count(*) as total_criteria_count,\n count(case when geo_target_constant_id is not null then 1 end) as location_targets_count,\n count(case when device_type is not null then 1 end) as device_targets_count,\n count(case when age_range_type is not null then 1 end) as age_targets_count,\n count(case when gender_type is not null then 1 end) as gender_targets_count,\n count(case when user_list_id is not null then 1 end) as audience_targets_count\n\n from campaign_criterion\n group by 1, 2\n),\n\n-- Apply targeting constraint logic\ncampaign_targeting_analysis as (\n select\n *,\n -- Targeting constraint flags\n case\n when location_targets_count < 5.0 then 'limited'\n when location_targets_count > 50.0 then 'broad'\n else 'normal'\n end as location_targeting_breadth,\n\n (device_targets_count > 0) as is_device_targeting,\n (audience_targets_count > 0) as is_audience_targeting\n\n from campaign_targeting_counts\n),\n\n\n\n\n-- Base data gathering with joins and basic field calculations\ncampaign_base as (\n select\n campaign_report.source_relation,\n campaign_report.date_day,\n campaign_report.campaign_id,\n campaign_report.campaign_name,\n campaign_report.account_name,\n campaign_report.account_id,\n campaign_report.advertising_channel_type,\n campaign_report.advertising_channel_subtype,\n campaign_report.status as campaign_status,\n campaign_report.serving_status,\n\n -- Budget information\n coalesce(campaign_budget.daily_budget, 0) as daily_budget,\n coalesce(campaign_budget.total_budget, 0) as total_budget,\n campaign_budget.budget_type,\n campaign_budget.budget_status,\n campaign_budget.has_recommended_budget,\n -- Use Google's recommendation when available, otherwise fall back to current budget\n case\n when campaign_budget.recommended_daily_budget > 0\n then campaign_budget.recommended_daily_budget\n else coalesce(campaign_budget.daily_budget, 0)\n end as recommended_daily_budget,\n\n \n -- Bidding strategy information\n campaign_bidding_strategy.bidding_strategy_type,\n coalesce(campaign_bidding_strategy.target_cpa, 0) as target_cpa,\n coalesce(campaign_bidding_strategy.target_roas, 0) as target_roas,\n campaign_bidding_strategy.enhanced_cpc,\n \n\n -- Performance metrics\n campaign_report.impressions,\n campaign_report.spend,\n campaign_report.clicks,\n\n \n -- Targeting constraint information\n coalesce(campaign_targeting_analysis.total_criteria_count, 0) as total_targeting_criteria,\n coalesce(campaign_targeting_analysis.location_targets_count, 0) as location_targeting_count,\n coalesce(campaign_targeting_analysis.audience_targets_count, 0) as audience_targeting_count,\n coalesce(campaign_targeting_analysis.location_targeting_breadth, 'normal') as location_targeting_breadth,\n coalesce(campaign_targeting_analysis.is_device_targeting, false) as is_device_targeting,\n coalesce(campaign_targeting_analysis.is_audience_targeting, false) as is_audience_targeting,\n \n\n -- Click-through rate (shows ad relevance and quality)\n campaign_report.ctr,\n -- Budget usage (shows if budget constraints are limiting performance)\n \n ( campaign_report.spend ) / nullif( ( campaign_budget.daily_budget ), 0)\n as budget_utilization,\n -- Helper field for live campaigns\n (upper(campaign_report.status) = 'ENABLED' and upper(campaign_report.serving_status) = 'SERVING') as is_campaign_live\n\n from campaign_report\n left join campaign_budget\n on campaign_report.campaign_id = campaign_budget.campaign_id\n and campaign_report.source_relation = campaign_budget.source_relation\n \n left join campaign_bidding_strategy\n on campaign_report.campaign_id = campaign_bidding_strategy.campaign_id\n and campaign_report.source_relation = campaign_bidding_strategy.source_relation\n \n \n left join campaign_targeting_analysis\n on campaign_report.campaign_id = campaign_targeting_analysis.campaign_id\n and campaign_report.source_relation = campaign_targeting_analysis.source_relation\n \n),\n\n-- Apply business logic for diagnostics\nrecommendation_logic as (\n select\n *,\n \n -- Budget increase opportunity (simple difference since recommended_daily_budget falls back to current when no recommendation)\n recommended_daily_budget - daily_budget as budget_increase_opportunity,\n\n -- Inferred performance observation that drives the recommendation\n case\n when campaign_status in ('REMOVED', 'PAUSED')\n then 'campaign disabled'\n when serving_status = 'ENDED'\n then 'campaign ended'\n when serving_status != 'SERVING'\n then 'not serving'\n when budget_utilization >= 0.95\n and daily_budget > 0\n and is_campaign_live\n then 'budget constrained'\n \n when budget_utilization >= 0.75 -- \">= budget.low\" translates to moderate budget utilization\n and location_targeting_breadth = 'limited'\n and daily_budget > 0\n and is_campaign_live\n then 'budget + targeting constrained'\n when spend > 0\n and location_targeting_breadth = 'limited'\n and not is_audience_targeting\n and is_campaign_live\n then 'targeting constrained'\n when spend > 0\n and impressions > 0\n and ctr < 0.015\n and not is_audience_targeting\n and is_campaign_live\n then 'quality/relevance + targeting constrained'\n \n when spend > 0\n and impressions > 0\n and ctr < 0.015\n and is_campaign_live\n then 'quality/relevance constrained'\n when spend > 500.0\n and impressions > 0\n and ctr >= 0.03\n and is_campaign_live\n then 'high spend + good performance'\n when spend > 500.0\n and impressions > 0\n and ctr < 0.015\n and is_campaign_live\n then 'high spend + poor performance'\n when spend >= 100.0\n and spend <= 500.0\n and ctr >= 0.015\n and ctr < 0.03\n and is_campaign_live\n then 'moderate spend + normal performance'\n when spend < 100.0\n and spend > 0\n and budget_utilization < 0.75\n and is_campaign_live\n then 'low spend + low budget utilization'\n when spend < 100.0\n and spend > 0\n and budget_utilization >= 0.75\n and is_campaign_live\n then 'low spend + budget constrained'\n when spend < 100.0\n and spend > 0\n and is_campaign_live\n then 'low spend'\n \n when spend = 0\n and total_targeting_criteria = 0\n then 'no spend + no targeting'\n \n when spend = 0\n then 'no spend'\n when budget_status != 'ENABLED'\n then 'budget disabled'\n when campaign_status != 'ENABLED'\n then 'campaign disabled'\n else 'no notable observation'\n end as calculated_observation\n\n from campaign_base\n),\n\n-- Derive action and priority from observation\nfinal as (\n select\n *,\n -- Inferred action based on the performance observation\n case\n when calculated_observation in ('campaign disabled', 'budget disabled') then 'enable campaign'\n when calculated_observation = 'campaign ended' then 'review or restart campaign'\n when calculated_observation = 'not serving' then 'resolve serving issues'\n when calculated_observation in ('budget constrained', 'budget + targeting constrained') then 'increase budget'\n when calculated_observation = 'targeting constrained' then 'expand targeting'\n when calculated_observation in ('quality/relevance constrained', 'quality/relevance + targeting constrained') then 'improve relevance'\n when calculated_observation in ('no spend + no targeting', 'no spend') then 'diagnose setup'\n when calculated_observation = 'high spend + good performance' then 'maintain and scale'\n when calculated_observation = 'high spend + poor performance' then 'improve efficiency'\n when calculated_observation = 'moderate spend + normal performance' then 'optimize gradually'\n when calculated_observation = 'low spend + low budget utilization' then 'diagnose targeting and bidding'\n when calculated_observation = 'low spend + budget constrained' then 'increase budget'\n when calculated_observation = 'low spend' then 'consider increasing budget'\n else 'monitor'\n end as calculated_recommendation,\n\n -- Inferred priority level for focusing on most critical issues first\n case\n -- High: Campaign/Budget blocking issues\n when calculated_observation in ('campaign disabled', 'budget disabled', 'not serving') then 'high'\n when calculated_observation in ('budget constrained', 'budget + targeting constrained') then 'high'\n when calculated_observation in ('no spend + no targeting', 'no spend') then 'high'\n\n -- High: Poor performance with high spend\n when calculated_observation = 'high spend + poor performance' then 'high'\n\n -- Medium: Setup and constraint issues\n when calculated_observation = 'campaign ended' then 'medium'\n when calculated_observation in ('targeting constrained', 'quality/relevance constrained', 'quality/relevance + targeting constrained') then 'medium'\n when calculated_observation in ('low spend + low budget utilization', 'low spend + budget constrained') then 'medium'\n\n -- Low: Normal operations and good performance\n when calculated_observation in ('high spend + good performance', 'moderate spend + normal performance', 'low spend') then 'low'\n else 'low'\n end as calculated_priority\n from recommendation_logic\n)\n\nselect\n *,\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(account_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(campaign_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as budget_diagnostics_report_key\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": ["budget_diagnostics_report_key"], "time_spine": null}, "model.google_ads.google_ads__url_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "google_ads__url_report", "resource_type": "model", "package_name": "google_ads", "path": "google_ads__url_report.sql", "original_file_path": "models/google_ads__url_report.sql", "unique_id": "model.google_ads.google_ads__url_report", "fqn": ["google_ads", "google_ads__url_report"], "alias": "google_ads__url_report", "checksum": {"name": "sha256", "checksum": "4de5cafaf0441a6d518c7847647a820868645bf903a2ca78a86396673fd6dfb3"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of URLs at the ad level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "account_name": {"name": "account_name", "description": "The descriptive name of the Customer account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.account_descriptive_name"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "currency_code": {"name": "currency_code", "description": "The currency which the account uses.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "ad_id": {"name": "ad_id", "description": "The unique identifier of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.base_url"]}, "url_host": {"name": "url_host", "description": "The URL host of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.url_host"]}, "url_path": {"name": "url_path", "description": "The URL path of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.url_path"]}, "utm_source": {"name": "utm_source", "description": "The utm_source parameter of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.utm_source"]}, "utm_medium": {"name": "utm_medium", "description": "The utm_medium parameter of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.utm_medium"]}, "utm_campaign": {"name": "utm_campaign", "description": "The utm_campaign parameter of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.utm_campaign"]}, "utm_content": {"name": "utm_content", "description": "The utm_content parameter of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.utm_content"]}, "utm_term": {"name": "utm_term", "description": "The utm_term parameter of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.utm_term"]}, "spend": {"name": "spend", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.6786761, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"google_ads__url_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith stats as (\n\n select *\n from {{ ref('stg_google_ads__ad_stats') }}\n), \n\ncampaigns_accounts as (\n\n select *\n from {{ ref('int_google_ads__campaigns_accounts') }}\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_google_ads__ad_group_history') }}\n where is_most_recent_record = True\n),\n\nads as (\n\n select *\n from {{ ref('stg_google_ads__ad_history') }}\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n stats.source_relation,\n stats.date_day,\n campaigns_accounts.account_name,\n campaigns_accounts.account_id,\n campaigns_accounts.currency_code,\n campaigns_accounts.campaign_name,\n campaigns_accounts.campaign_id,\n ad_groups.ad_group_name,\n stats.ad_group_id,\n stats.ad_id,\n ads.base_url,\n ads.url_host,\n ads.url_path,\n\n {% if var('google_auto_tagging_enabled', false) %}\n\n coalesce( {{ google_ads.google_ads_extract_url_parameter('ads.final_url', 'utm_source') }} , 'google') as utm_source,\n coalesce( {{ google_ads.google_ads_extract_url_parameter('ads.final_url', 'utm_medium') }} , 'cpc') as utm_medium,\n coalesce( {{ google_ads.google_ads_extract_url_parameter('ads.final_url', 'utm_campaign') }} , campaigns_accounts.campaign_name) as utm_campaign,\n coalesce( {{ google_ads.google_ads_extract_url_parameter('ads.final_url', 'utm_content') }} , ad_groups.ad_group_name) as utm_content,\n\n {% else %}\n\n ads.utm_source,\n ads.utm_medium,\n ads.utm_campaign,\n ads.utm_content,\n \n {% endif %}\n\n ads.utm_term,\n sum(stats.spend) as spend,\n sum(stats.clicks) as clicks,\n sum(stats.impressions) as impressions,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value,\n sum(view_through_conversions) as view_through_conversions\n\n {{ google_ads_persist_pass_through_columns(pass_through_variable='google_ads__ad_stats_passthrough_metrics', identifier='stats', transform='sum', coalesce_with=0, exclude_fields=['conversions','conversions_value','view_through_conversions']) }}\n\n from stats\n left join ads\n on stats.ad_id = ads.ad_id\n and stats.source_relation = ads.source_relation\n and stats.ad_group_id = ads.ad_group_id\n left join ad_groups\n on ads.ad_group_id = ad_groups.ad_group_id\n and ads.source_relation = ad_groups.source_relation\n left join campaigns_accounts\n on ad_groups.campaign_id = campaigns_accounts.campaign_id\n and ad_groups.source_relation = campaigns_accounts.source_relation\n\n {% if var('ad_reporting__url_report__using_null_filter', True) %}\n where ads.source_final_urls is not null\n {% endif %}\n\n {{ dbt_utils.group_by(18) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_stats", "package": null, "version": null}, {"name": "int_google_ads__campaigns_accounts", "package": null, "version": null}, {"name": "stg_google_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_google_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.google_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.google_ads.stg_google_ads__ad_stats", "model.google_ads.int_google_ads__campaigns_accounts", "model.google_ads.stg_google_ads__ad_group_history", "model.google_ads.stg_google_ads__ad_history"]}, "compiled_path": "target/compiled/google_ads/models/google_ads__url_report.sql", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__int_google_ads__campaigns_accounts as (\n\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final\n), stats as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_stats\"\n), \n\ncampaigns_accounts as (\n\n select *\n from __dbt__cte__int_google_ads__campaigns_accounts\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_history\"\n where is_most_recent_record = True\n),\n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_history\"\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n stats.source_relation,\n stats.date_day,\n campaigns_accounts.account_name,\n campaigns_accounts.account_id,\n campaigns_accounts.currency_code,\n campaigns_accounts.campaign_name,\n campaigns_accounts.campaign_id,\n ad_groups.ad_group_name,\n stats.ad_group_id,\n stats.ad_id,\n ads.base_url,\n ads.url_host,\n ads.url_path,\n\n \n\n ads.utm_source,\n ads.utm_medium,\n ads.utm_campaign,\n ads.utm_content,\n \n \n\n ads.utm_term,\n sum(stats.spend) as spend,\n sum(stats.clicks) as clicks,\n sum(stats.impressions) as impressions,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value,\n sum(view_through_conversions) as view_through_conversions\n\n \n\n\n\n\n\n from stats\n left join ads\n on stats.ad_id = ads.ad_id\n and stats.source_relation = ads.source_relation\n and stats.ad_group_id = ads.ad_group_id\n left join ad_groups\n on ads.ad_group_id = ad_groups.ad_group_id\n and ads.source_relation = ad_groups.source_relation\n left join campaigns_accounts\n on ad_groups.campaign_id = campaigns_accounts.campaign_id\n and ad_groups.source_relation = campaigns_accounts.source_relation\n\n \n where ads.source_final_urls is not null\n \n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.google_ads.int_google_ads__campaigns_accounts", "sql": " __dbt__cte__int_google_ads__campaigns_accounts as (\n\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.google_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "google_ads__campaign_report", "resource_type": "model", "package_name": "google_ads", "path": "google_ads__campaign_report.sql", "original_file_path": "models/google_ads__campaign_report.sql", "unique_id": "model.google_ads.google_ads__campaign_report", "fqn": ["google_ads", "google_ads__campaign_report"], "alias": "google_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "3faa9df9a62716349ec0e8aa2b9e95ecbcd49a15ae3b7e23c6f3c5dbdd440521"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of a campaign at the campaign/advertising_channel/advertising_channel_subtype level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "account_name": {"name": "account_name", "description": "The descriptive name of the Customer account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.account_descriptive_name"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "currency_code": {"name": "currency_code", "description": "The currency which the account uses.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "advertising_channel_type": {"name": "advertising_channel_type", "description": "The channel type of the ads being served within the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertising_channel_subtype": {"name": "advertising_channel_subtype", "description": "The channel subtype of the ads being served within the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "serving_status": {"name": "serving_status", "description": "Status of the ads and how they are currently being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}, "ctr": {"name": "ctr", "description": "Click-through rate as a decimal, calculated as clicks / impressions. Shows ad relevance and engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.686678, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"google_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith stats as (\n\n select *\n from {{ ref('stg_google_ads__campaign_stats') }}\n),\n\ncampaigns_accounts as (\n\n select *\n from {{ ref('int_google_ads__campaigns_accounts') }}\n),\n\nfields as (\n\n select\n stats.source_relation,\n stats.date_day,\n campaigns_accounts.account_name,\n campaigns_accounts.account_id,\n campaigns_accounts.currency_code,\n campaigns_accounts.campaign_name,\n stats.campaign_id,\n campaigns_accounts.advertising_channel_type,\n campaigns_accounts.advertising_channel_subtype,\n campaigns_accounts.campaign_status as status,\n campaigns_accounts.serving_status,\n sum(stats.spend) as spend,\n sum(stats.clicks) as clicks,\n sum(stats.impressions) as impressions,\n sum(stats.conversions) as conversions,\n sum(stats.conversions_value) as conversions_value,\n sum(stats.view_through_conversions) as view_through_conversions,\n {{ dbt_utils.safe_divide('sum(stats.clicks)', 'sum(stats.impressions)') }} as ctr -- Click-through rate (shows ad relevance and engagement)\n\n {{ google_ads_persist_pass_through_columns(pass_through_variable='google_ads__campaign_stats_passthrough_metrics', identifier='stats', transform='sum', coalesce_with=0, exclude_fields=['conversions','conversions_value','view_through_conversions']) }}\n\n from stats\n left join campaigns_accounts\n on stats.campaign_id = campaigns_accounts.campaign_id\n and stats.source_relation = campaigns_accounts.source_relation\n {{ dbt_utils.group_by(11) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_stats", "package": null, "version": null}, {"name": "int_google_ads__campaigns_accounts", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.safe_divide", "macro.google_ads.google_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.google_ads.stg_google_ads__campaign_stats", "model.google_ads.int_google_ads__campaigns_accounts"]}, "compiled_path": "target/compiled/google_ads/models/google_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__int_google_ads__campaigns_accounts as (\n\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final\n), stats as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_stats\"\n),\n\ncampaigns_accounts as (\n\n select *\n from __dbt__cte__int_google_ads__campaigns_accounts\n),\n\nfields as (\n\n select\n stats.source_relation,\n stats.date_day,\n campaigns_accounts.account_name,\n campaigns_accounts.account_id,\n campaigns_accounts.currency_code,\n campaigns_accounts.campaign_name,\n stats.campaign_id,\n campaigns_accounts.advertising_channel_type,\n campaigns_accounts.advertising_channel_subtype,\n campaigns_accounts.campaign_status as status,\n campaigns_accounts.serving_status,\n sum(stats.spend) as spend,\n sum(stats.clicks) as clicks,\n sum(stats.impressions) as impressions,\n sum(stats.conversions) as conversions,\n sum(stats.conversions_value) as conversions_value,\n sum(stats.view_through_conversions) as view_through_conversions,\n \n ( sum(stats.clicks) ) / nullif( ( sum(stats.impressions) ), 0)\n as ctr -- Click-through rate (shows ad relevance and engagement)\n\n \n\n\n\n\n\n from stats\n left join campaigns_accounts\n on stats.campaign_id = campaigns_accounts.campaign_id\n and stats.source_relation = campaigns_accounts.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.google_ads.int_google_ads__campaigns_accounts", "sql": " __dbt__cte__int_google_ads__campaigns_accounts as (\n\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.google_ads__keyword_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "google_ads__keyword_report", "resource_type": "model", "package_name": "google_ads", "path": "google_ads__keyword_report.sql", "original_file_path": "models/google_ads__keyword_report.sql", "unique_id": "model.google_ads.google_ads__keyword_report", "fqn": ["google_ads", "google_ads__keyword_report"], "alias": "google_ads__keyword_report", "checksum": {"name": "sha256", "checksum": "9edc66e1e5f8e8c6fee124dbfeb88f2a56b92fefe54e13a6cad17d42dfbeb0e9"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance at the ad group level for keywords.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "account_name": {"name": "account_name", "description": "The descriptive name of the Customer account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.account_descriptive_name"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "currency_code": {"name": "currency_code", "description": "The currency which the account uses.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "criterion_id": {"name": "criterion_id", "description": "The unique identifier of the criterion being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "type": {"name": "type", "description": "The type of keyword ad being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The status of the keyword ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_match_type": {"name": "keyword_match_type", "description": "The match type criteria used for the keyword ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_text": {"name": "keyword_text", "description": "The specific keyword text that is used.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.6888247, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"google_ads__keyword_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith stats as (\n\n select *\n from {{ ref('stg_google_ads__keyword_stats') }}\n), \n\ncampaigns_accounts as (\n\n select *\n from {{ ref('int_google_ads__campaigns_accounts') }}\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_google_ads__ad_group_history') }}\n where is_most_recent_record = True\n), \n\ncriterions as (\n\n select *\n from {{ ref('stg_google_ads__ad_group_criterion_history') }}\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n stats.source_relation,\n stats.date_day,\n campaigns_accounts.account_name,\n stats.account_id,\n campaigns_accounts.currency_code,\n campaigns_accounts.campaign_name,\n stats.campaign_id,\n ad_groups.ad_group_name,\n stats.ad_group_id,\n stats.criterion_id,\n criterions.type,\n criterions.status,\n criterions.keyword_match_type,\n criterions.keyword_text,\n sum(stats.spend) as spend,\n sum(stats.clicks) as clicks,\n sum(stats.impressions) as impressions,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value,\n sum(view_through_conversions) as view_through_conversions\n\n {{ google_ads_persist_pass_through_columns(pass_through_variable='google_ads__keyword_stats_passthrough_metrics', identifier='stats', transform='sum', coalesce_with=0, exclude_fields=['conversions','conversions_value','view_through_conversions']) }}\n\n from stats\n left join criterions\n on stats.criterion_id = criterions.criterion_id\n and stats.source_relation = criterions.source_relation\n left join ad_groups\n on stats.ad_group_id = ad_groups.ad_group_id\n and stats.source_relation = ad_groups.source_relation\n left join campaigns_accounts\n on stats.campaign_id = campaigns_accounts.campaign_id\n and stats.source_relation = campaigns_accounts.source_relation\n {{ dbt_utils.group_by(14) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__keyword_stats", "package": null, "version": null}, {"name": "int_google_ads__campaigns_accounts", "package": null, "version": null}, {"name": "stg_google_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_google_ads__ad_group_criterion_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.google_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.google_ads.stg_google_ads__keyword_stats", "model.google_ads.int_google_ads__campaigns_accounts", "model.google_ads.stg_google_ads__ad_group_history", "model.google_ads.stg_google_ads__ad_group_criterion_history"]}, "compiled_path": "target/compiled/google_ads/models/google_ads__keyword_report.sql", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__int_google_ads__campaigns_accounts as (\n\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final\n), stats as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__keyword_stats\"\n), \n\ncampaigns_accounts as (\n\n select *\n from __dbt__cte__int_google_ads__campaigns_accounts\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\ncriterions as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_criterion_history\"\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n stats.source_relation,\n stats.date_day,\n campaigns_accounts.account_name,\n stats.account_id,\n campaigns_accounts.currency_code,\n campaigns_accounts.campaign_name,\n stats.campaign_id,\n ad_groups.ad_group_name,\n stats.ad_group_id,\n stats.criterion_id,\n criterions.type,\n criterions.status,\n criterions.keyword_match_type,\n criterions.keyword_text,\n sum(stats.spend) as spend,\n sum(stats.clicks) as clicks,\n sum(stats.impressions) as impressions,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value,\n sum(view_through_conversions) as view_through_conversions\n\n \n\n\n\n\n\n from stats\n left join criterions\n on stats.criterion_id = criterions.criterion_id\n and stats.source_relation = criterions.source_relation\n left join ad_groups\n on stats.ad_group_id = ad_groups.ad_group_id\n and stats.source_relation = ad_groups.source_relation\n left join campaigns_accounts\n on stats.campaign_id = campaigns_accounts.campaign_id\n and stats.source_relation = campaigns_accounts.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.google_ads.int_google_ads__campaigns_accounts", "sql": " __dbt__cte__int_google_ads__campaigns_accounts as (\n\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__account_stats": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__account_stats", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__account_stats.sql", "original_file_path": "models/staging/stg_google_ads__account_stats.sql", "unique_id": "model.google_ads.stg_google_ads__account_stats", "fqn": ["google_ads", "staging", "stg_google_ads__account_stats"], "alias": "stg_google_ads__account_stats", "checksum": {"name": "sha256", "checksum": "1483cb7859e41b7c200981378496060307293ad55db1ef815dcff1d2a1ba49f2"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of an account in Google Ads broken down to the ad network and device type.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "date_day": {"name": "date_day", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "ad_network_type": {"name": "ad_network_type", "description": "The Google Ad network type used across the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_network_type"]}, "device": {"name": "device", "description": "Account ad performance per unique device where the ads were served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.device"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "spend": {"name": "spend", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.7525458, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_stats\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_google_ads__account_stats_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__account_stats_tmp')),\n staging_columns=get_account_stats_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n customer_id as account_id, \n date as date_day,\n ad_network_type,\n device,\n coalesce(clicks, 0) as clicks, \n coalesce(cost_micros, 0) / 1000000.0 as spend, \n coalesce(impressions, 0) as impressions,\n coalesce(conversions, 0) as conversions,\n coalesce(conversions_value, 0) as conversions_value,\n coalesce(view_through_conversions, 0) as view_through_conversions\n \n {{ google_ads_fill_pass_through_columns(pass_through_fields=var('google_ads__account_stats_passthrough_metrics'), except=['conversions', \"conversions_value\", \"view_through_conversions\"]) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__account_stats_tmp", "package": null, "version": null}, {"name": "stg_google_ads__account_stats_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_account_stats_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.google_ads.google_ads_fill_pass_through_columns"], "nodes": ["model.google_ads.stg_google_ads__account_stats_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__account_stats.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_stats_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_id as _fivetran_id,\n _fivetran_synced as _fivetran_synced,\n ad_network_type as ad_network_type,\n clicks as clicks,\n cost_micros as cost_micros,\n customer_id as customer_id,\n date as date,\n device as device,\n impressions as impressions,\n conversions as conversions,\n conversions_value as conversions_value,\n view_through_conversions as view_through_conversions\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n customer_id as account_id, \n date as date_day,\n ad_network_type,\n device,\n coalesce(clicks, 0) as clicks, \n coalesce(cost_micros, 0) / 1000000.0 as spend, \n coalesce(impressions, 0) as impressions,\n coalesce(conversions, 0) as conversions,\n coalesce(conversions_value, 0) as conversions_value,\n coalesce(view_through_conversions, 0) as view_through_conversions\n \n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__ad_group_stats": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_group_stats", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__ad_group_stats.sql", "original_file_path": "models/staging/stg_google_ads__ad_group_stats.sql", "unique_id": "model.google_ads.stg_google_ads__ad_group_stats", "fqn": ["google_ads", "staging", "stg_google_ads__ad_group_stats"], "alias": "stg_google_ads__ad_group_stats", "checksum": {"name": "sha256", "checksum": "7adf2107c94462aa1fa0ac6f669d932138f5da66aae41eadd7a9da16d0f1c315"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of an ad group in Google Ads broken down to the ad network and device type.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "date_day": {"name": "date_day", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "ad_network_type": {"name": "ad_network_type", "description": "The Google Ad network type used across the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_network_type"]}, "device": {"name": "device", "description": "Account ad performance per unique device where the ads were served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.device"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "spend": {"name": "spend", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.7490828, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_stats\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_google_ads__ad_group_stats_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__ad_group_stats_tmp')),\n staging_columns=get_ad_group_stats_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n customer_id as account_id, \n date as date_day, \n cast(id as {{ dbt.type_string() }}) as ad_group_id, \n campaign_id, \n device,\n ad_network_type,\n coalesce(clicks, 0) as clicks, \n coalesce(cost_micros, 0) / 1000000.0 as spend, \n coalesce(impressions, 0) as impressions,\n coalesce(conversions, 0) as conversions,\n coalesce(conversions_value, 0) as conversions_value,\n coalesce(view_through_conversions, 0) as view_through_conversions\n \n {{ google_ads_fill_pass_through_columns(pass_through_fields=var('google_ads__ad_group_stats_passthrough_metrics'), except=['conversions', \"conversions_value\", \"view_through_conversions\"]) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_group_stats_tmp", "package": null, "version": null}, {"name": "stg_google_ads__ad_group_stats_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_ad_group_stats_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.google_ads.google_ads_fill_pass_through_columns"], "nodes": ["model.google_ads.stg_google_ads__ad_group_stats_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__ad_group_stats.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_stats_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_id as _fivetran_id,\n _fivetran_synced as _fivetran_synced,\n ad_network_type as ad_network_type,\n campaign_id as campaign_id,\n clicks as clicks,\n cost_micros as cost_micros,\n customer_id as customer_id,\n date as date,\n device as device,\n id as id,\n impressions as impressions,\n conversions as conversions,\n conversions_value as conversions_value,\n view_through_conversions as view_through_conversions\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n customer_id as account_id, \n date as date_day, \n cast(id as TEXT) as ad_group_id, \n campaign_id, \n device,\n ad_network_type,\n coalesce(clicks, 0) as clicks, \n coalesce(cost_micros, 0) / 1000000.0 as spend, \n coalesce(impressions, 0) as impressions,\n coalesce(conversions, 0) as conversions,\n coalesce(conversions_value, 0) as conversions_value,\n coalesce(view_through_conversions, 0) as view_through_conversions\n \n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__account_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__account_history", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__account_history.sql", "original_file_path": "models/staging/stg_google_ads__account_history.sql", "unique_id": "model.google_ads.stg_google_ads__account_history", "fqn": ["google_ads", "staging", "stg_google_ads__account_history"], "alias": "stg_google_ads__account_history", "checksum": {"name": "sha256", "checksum": "c24e632389d4b0d90a331f54a8468cc4aa5cd67d8fdc3a6ed82629c03337e55b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of an account in Google Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The ID of the Account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.account_id"]}, "currency_code": {"name": "currency_code", "description": "The currency of the spend reported.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "auto_tagging_enabled": {"name": "auto_tagging_enabled", "description": "Boolean indicating if auto tagging is enabled on the account ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "time_zone": {"name": "time_zone", "description": "The time zone of the account ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "The descriptive name of the Customer account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.account_descriptive_name"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads._fivetran_synced"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether the record is the most recent version of the object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.7388241, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_google_ads__account_history_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__account_history_tmp')),\n staging_columns=get_account_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as account_id,\n updated_at,\n currency_code,\n auto_tagging_enabled,\n time_zone,\n descriptive_name as account_name,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='google_ads') }} order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__account_history_tmp", "package": null, "version": null}, {"name": "stg_google_ads__account_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_account_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.google_ads.stg_google_ads__account_history_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__account_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history_tmp\"\n\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n auto_tagging_enabled as auto_tagging_enabled,\n currency_code as currency_code,\n descriptive_name as descriptive_name,\n id as id,\n time_zone as time_zone,\n updated_at as updated_at,\n cast(null as boolean) as _fivetran_active\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as account_id,\n updated_at,\n currency_code,\n auto_tagging_enabled,\n time_zone,\n descriptive_name as account_name,\n row_number() over (partition by id order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__ad_group_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_group_history", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__ad_group_history.sql", "original_file_path": "models/staging/stg_google_ads__ad_group_history.sql", "unique_id": "model.google_ads.stg_google_ads__ad_group_history", "fqn": ["google_ads", "staging", "stg_google_ads__ad_group_history"], "alias": "stg_google_ads__ad_group_history", "checksum": {"name": "sha256", "checksum": "975a28a6356dad15fd349196e7f5681cb7d879c3c24c5176491e443a890707bb"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of an ad group in Google Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "ad_group_type": {"name": "ad_group_type", "description": "The type of the ad group in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_type"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_name"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_name"]}, "ad_group_status": {"name": "ad_group_status", "description": "Status of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_status"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether the record is the most recent version of the object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.739834, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_google_ads__ad_group_history_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__ad_group_history_tmp')),\n staging_columns=get_ad_group_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as {{ dbt.type_string() }}) as ad_group_id,\n updated_at,\n type as ad_group_type, \n campaign_id, \n campaign_name, \n name as ad_group_name, \n status as ad_group_status,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='google_ads') }} order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_group_history_tmp", "package": null, "version": null}, {"name": "stg_google_ads__ad_group_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_ad_group_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.google_ads.stg_google_ads__ad_group_history_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__ad_group_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_history_tmp\"\n\n),\n\nfields as (\n\n select\n \n campaign_id as campaign_id,\n campaign_name as campaign_name,\n id as id,\n name as name,\n status as status,\n type as type,\n updated_at as updated_at,\n cast(null as boolean) as _fivetran_active\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as TEXT) as ad_group_id,\n updated_at,\n type as ad_group_type, \n campaign_id, \n campaign_name, \n name as ad_group_name, \n status as ad_group_status,\n row_number() over (partition by id order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__campaign_stats": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_stats", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__campaign_stats.sql", "original_file_path": "models/staging/stg_google_ads__campaign_stats.sql", "unique_id": "model.google_ads.stg_google_ads__campaign_stats", "fqn": ["google_ads", "staging", "stg_google_ads__campaign_stats"], "alias": "stg_google_ads__campaign_stats", "checksum": {"name": "sha256", "checksum": "0a6f489a9c965114a9b63b47a59898baeaceae5513804119a07c11c285704b18"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a campaign in Google Ads broken down to the ad network and device type.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "date_day": {"name": "date_day", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "ad_network_type": {"name": "ad_network_type", "description": "The Google Ad network type used across the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_network_type"]}, "device": {"name": "device", "description": "Account ad performance per unique device where the ads were served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.device"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "spend": {"name": "spend", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.7502227, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_stats\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_google_ads__campaign_stats_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__campaign_stats_tmp')),\n staging_columns=get_campaign_stats_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n customer_id as account_id, \n date as date_day, \n id as campaign_id, \n ad_network_type,\n device,\n coalesce(clicks, 0) as clicks, \n coalesce(cost_micros, 0) / 1000000.0 as spend, \n coalesce(impressions, 0) as impressions,\n coalesce(conversions, 0) as conversions,\n coalesce(conversions_value, 0) as conversions_value,\n coalesce(view_through_conversions, 0) as view_through_conversions\n \n {{ google_ads_fill_pass_through_columns(pass_through_fields=var('google_ads__campaign_stats_passthrough_metrics'), except=['conversions', \"conversions_value\", \"view_through_conversions\"]) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_stats_tmp", "package": null, "version": null}, {"name": "stg_google_ads__campaign_stats_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_campaign_stats_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.google_ads.google_ads_fill_pass_through_columns"], "nodes": ["model.google_ads.stg_google_ads__campaign_stats_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__campaign_stats.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_stats_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_id as _fivetran_id,\n _fivetran_synced as _fivetran_synced,\n ad_network_type as ad_network_type,\n clicks as clicks,\n cost_micros as cost_micros,\n customer_id as customer_id,\n date as date,\n device as device,\n id as id,\n impressions as impressions,\n conversions as conversions,\n conversions_value as conversions_value,\n view_through_conversions as view_through_conversions\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n customer_id as account_id, \n date as date_day, \n id as campaign_id, \n ad_network_type,\n device,\n coalesce(clicks, 0) as clicks, \n coalesce(cost_micros, 0) / 1000000.0 as spend, \n coalesce(impressions, 0) as impressions,\n coalesce(conversions, 0) as conversions,\n coalesce(conversions_value, 0) as conversions_value,\n coalesce(view_through_conversions, 0) as view_through_conversions\n \n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__campaign_budget_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_budget_history", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__campaign_budget_history.sql", "original_file_path": "models/staging/stg_google_ads__campaign_budget_history.sql", "unique_id": "model.google_ads.stg_google_ads__campaign_budget_history", "fqn": ["google_ads", "staging", "stg_google_ads__campaign_budget_history"], "alias": "stg_google_ads__campaign_budget_history", "checksum": {"name": "sha256", "checksum": "7fa23c1b1dd88c604a539192aefd83dd4352bb660447a3c86833d5f07548e983"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a historical version of a campaign budget in Google Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "daily_budget": {"name": "daily_budget", "description": "The daily budget amount in dollars, converted from amount_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "has_recommended_budget": {"name": "has_recommended_budget", "description": "Boolean indicating if Google has a recommended budget for this campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "recommended_daily_budget": {"name": "recommended_daily_budget", "description": "Google's recommended daily budget amount in dollars, converted from recommended_budget_amount_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_budget": {"name": "total_budget", "description": "The total budget amount in dollars for lifetime budgets, converted from total_amount_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_type": {"name": "budget_type", "description": "The type of budget (DAILY, LIFETIME, etc.).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_status": {"name": "budget_status", "description": "The status of the budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether the record is the most recent version of the object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.7563152, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_budget_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True) and var('google_ads__using_campaign_budget_history', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_google_ads__campaign_budget_history_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__campaign_budget_history_tmp')),\n staging_columns=get_campaign_budget_history_columns()\n )\n }}\n\n\n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n updated_at,\n campaign_id,\n amount_micros / 1000000.0 as daily_budget,\n status as budget_status,\n has_recommended_budget,\n recommended_budget_amount_micros / 1000000.0 as recommended_daily_budget,\n total_amount_micros / 1000000.0 as total_budget,\n type as budget_type,\n row_number() over (partition by campaign_id {{ fivetran_utils.partition_by_source_relation(package_name='google_ads') }} order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_budget_history_tmp", "package": null, "version": null}, {"name": "stg_google_ads__campaign_budget_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_campaign_budget_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.google_ads.stg_google_ads__campaign_budget_history_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__campaign_budget_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_budget_history_tmp\"\n\n),\n\nfields as (\n\n select\n \n id as id,\n updated_at as updated_at,\n campaign_id as campaign_id,\n amount_micros as amount_micros,\n delivery_method as delivery_method,\n explicitly_shared as explicitly_shared,\n name as name,\n reference_count as reference_count,\n status as status,\n has_recommended_budget as has_recommended_budget,\n period as period,\n recommended_budget_amount_micros as recommended_budget_amount_micros,\n total_amount_micros as total_amount_micros,\n type as type,\n _fivetran_active as _fivetran_active\n\n\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n updated_at,\n campaign_id,\n amount_micros / 1000000.0 as daily_budget,\n status as budget_status,\n has_recommended_budget,\n recommended_budget_amount_micros / 1000000.0 as recommended_daily_budget,\n total_amount_micros / 1000000.0 as total_budget,\n type as budget_type,\n row_number() over (partition by campaign_id order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__campaign_bid_modifier_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_bid_modifier_history", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__campaign_bid_modifier_history.sql", "original_file_path": "models/staging/stg_google_ads__campaign_bid_modifier_history.sql", "unique_id": "model.google_ads.stg_google_ads__campaign_bid_modifier_history", "fqn": ["google_ads", "staging", "stg_google_ads__campaign_bid_modifier_history"], "alias": "stg_google_ads__campaign_bid_modifier_history", "checksum": {"name": "sha256", "checksum": "b0e8cbebf0728494a13430b496479e4c28bf38ca8ce4a780e72d2b5f15f88a45"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a historical version of a campaign bid modifier in Google Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "criterion_id": {"name": "criterion_id", "description": "Unique identifier of the criterion that the bid modifier is applied to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_modifier": {"name": "bid_modifier", "description": "The modifier applied to the bid for this criterion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "interaction_type": {"name": "interaction_type", "description": "The type of interaction for the bid modifier.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "interaction_event_types": {"name": "interaction_event_types", "description": "The event types for the interaction.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether the record is the most recent version of the object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.7552836, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_bid_modifier_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True) and var('google_ads__using_campaign_bid_modifier_history', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_google_ads__campaign_bid_modifier_history_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__campaign_bid_modifier_history_tmp')),\n staging_columns=get_campaign_bid_modifier_history_columns()\n )\n }}\n\n\n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n campaign_id,\n criterion_id,\n bid_modifier,\n interaction_type,\n interaction_event_types,\n updated_at,\n row_number() over (partition by campaign_id, criterion_id {{ fivetran_utils.partition_by_source_relation(package_name='google_ads') }} order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_bid_modifier_history_tmp", "package": null, "version": null}, {"name": "stg_google_ads__campaign_bid_modifier_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_campaign_bid_modifier_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.google_ads.stg_google_ads__campaign_bid_modifier_history_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__campaign_bid_modifier_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_bid_modifier_history_tmp\"\n\n),\n\nfields as (\n\n select\n \n campaign_id as campaign_id,\n criterion_id as criterion_id,\n bid_modifier as bid_modifier,\n interaction_type as interaction_type,\n interaction_event_types as interaction_event_types,\n updated_at as updated_at,\n _fivetran_active as _fivetran_active\n\n\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n campaign_id,\n criterion_id,\n bid_modifier,\n interaction_type,\n interaction_event_types,\n updated_at,\n row_number() over (partition by campaign_id, criterion_id order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__keyword_stats": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__keyword_stats", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__keyword_stats.sql", "original_file_path": "models/staging/stg_google_ads__keyword_stats.sql", "unique_id": "model.google_ads.stg_google_ads__keyword_stats", "fqn": ["google_ads", "staging", "stg_google_ads__keyword_stats"], "alias": "stg_google_ads__keyword_stats", "checksum": {"name": "sha256", "checksum": "6d5023f3f164b181243119c03070a2a00311bab3342378e2d582d87cd9e0e8ef"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a keyword in Google Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "date_day": {"name": "date_day", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "keyword_id": {"name": "keyword_id", "description": "The unique ID of the keyword record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "criterion_id": {"name": "criterion_id", "description": "Reference to the ad group criterion used for the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "spend": {"name": "spend", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.7513785, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__keyword_stats\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_google_ads__keyword_stats_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__keyword_stats_tmp')),\n staging_columns=get_keyword_stats_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n _fivetran_id as keyword_id,\n customer_id as account_id, \n date as date_day, \n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id,\n ad_group_criterion_criterion_id as criterion_id,\n campaign_id, \n coalesce(clicks, 0) as clicks, \n coalesce(cost_micros, 0) / 1000000.0 as spend, \n coalesce(impressions, 0) as impressions,\n coalesce(conversions, 0) as conversions,\n coalesce(conversions_value, 0) as conversions_value,\n coalesce(view_through_conversions, 0) as view_through_conversions\n \n {{ google_ads_fill_pass_through_columns(pass_through_fields=var('google_ads__keyword_stats_passthrough_metrics'), except=['conversions', \"conversions_value\", \"view_through_conversions\"]) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__keyword_stats_tmp", "package": null, "version": null}, {"name": "stg_google_ads__keyword_stats_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_keyword_stats_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.google_ads.google_ads_fill_pass_through_columns"], "nodes": ["model.google_ads.stg_google_ads__keyword_stats_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__keyword_stats.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__keyword_stats_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_id as _fivetran_id,\n _fivetran_synced as _fivetran_synced,\n ad_group_criterion_criterion_id as ad_group_criterion_criterion_id,\n ad_group_id as ad_group_id,\n ad_network_type as ad_network_type,\n campaign_id as campaign_id,\n clicks as clicks,\n cost_micros as cost_micros,\n customer_id as customer_id,\n date as date,\n device as device,\n impressions as impressions,\n conversions as conversions,\n conversions_value as conversions_value,\n view_through_conversions as view_through_conversions\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n _fivetran_id as keyword_id,\n customer_id as account_id, \n date as date_day, \n cast(ad_group_id as TEXT) as ad_group_id,\n ad_group_criterion_criterion_id as criterion_id,\n campaign_id, \n coalesce(clicks, 0) as clicks, \n coalesce(cost_micros, 0) / 1000000.0 as spend, \n coalesce(impressions, 0) as impressions,\n coalesce(conversions, 0) as conversions,\n coalesce(conversions_value, 0) as conversions_value,\n coalesce(view_through_conversions, 0) as view_through_conversions\n \n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__ad_stats": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_stats", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__ad_stats.sql", "original_file_path": "models/staging/stg_google_ads__ad_stats.sql", "unique_id": "model.google_ads.stg_google_ads__ad_stats", "fqn": ["google_ads", "staging", "stg_google_ads__ad_stats"], "alias": "stg_google_ads__ad_stats", "checksum": {"name": "sha256", "checksum": "c6d9037906224b8362fb2936ddeecc5d299023d6b9b02054f7a0ba7dc4ede422"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of an ad in Google Ads broken down to the ad network, device type, and ad_group_id.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "date_day": {"name": "date_day", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "ad_id": {"name": "ad_id", "description": "The ID of the Ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "ad_network_type": {"name": "ad_network_type", "description": "The Google Ad network type used across the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_network_type"]}, "keyword_ad_group_criterion": {"name": "keyword_ad_group_criterion", "description": "The ad group which the keyword criterion resides.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "device": {"name": "device", "description": "Account ad performance per unique device where the ads were served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.device"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "spend": {"name": "spend", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.7439723, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_stats\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_google_ads__ad_stats_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__ad_stats_tmp')),\n staging_columns=get_ad_stats_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n customer_id as account_id, \n date as date_day, \n {% if target.type in ('spark','databricks') %}\n coalesce(cast(ad_group_id as {{ dbt.type_string() }}), split(ad_group,'adGroups/')[1]) as ad_group_id,\n {% else %}\n coalesce(cast(ad_group_id as {{ dbt.type_string() }}), {{ dbt.split_part(string_text='ad_group', delimiter_text=\"'adGroups/'\", part_number=2) }}) as ad_group_id,\n {% endif %}\n keyword_ad_group_criterion,\n ad_network_type,\n device,\n ad_id, \n campaign_id, \n coalesce(clicks, 0) as clicks, \n coalesce(cost_micros, 0) / 1000000.0 as spend, \n coalesce(impressions, 0) as impressions,\n coalesce(conversions, 0) as conversions,\n coalesce(conversions_value, 0) as conversions_value,\n coalesce(view_through_conversions, 0) as view_through_conversions\n\n {{ google_ads_fill_pass_through_columns(pass_through_fields=var('google_ads__ad_stats_passthrough_metrics'), except=['conversions', \"conversions_value\", \"view_through_conversions\"]) }}\n\n from fields\n)\n\nselect * from final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_stats_tmp", "package": null, "version": null}, {"name": "stg_google_ads__ad_stats_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_ad_stats_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.dbt.split_part", "macro.google_ads.google_ads_fill_pass_through_columns"], "nodes": ["model.google_ads.stg_google_ads__ad_stats_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__ad_stats.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_stats_tmp\"\n\n),\n\nfields as (\n\n select\n \n ad_group as ad_group,\n ad_group_id as ad_group_id,\n ad_id as ad_id,\n ad_network_type as ad_network_type,\n campaign_id as campaign_id,\n clicks as clicks,\n cost_micros as cost_micros,\n customer_id as customer_id,\n date as date,\n device as device,\n impressions as impressions,\n keyword_ad_group_criterion as keyword_ad_group_criterion,\n conversions as conversions,\n conversions_value as conversions_value,\n view_through_conversions as view_through_conversions\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n customer_id as account_id, \n date as date_day, \n \n coalesce(cast(ad_group_id as TEXT), \n\n \n \n\n split_part(\n ad_group,\n 'adGroups/',\n 2\n )\n\n\n \n\n) as ad_group_id,\n \n keyword_ad_group_criterion,\n ad_network_type,\n device,\n ad_id, \n campaign_id, \n coalesce(clicks, 0) as clicks, \n coalesce(cost_micros, 0) / 1000000.0 as spend, \n coalesce(impressions, 0) as impressions,\n coalesce(conversions, 0) as conversions,\n coalesce(conversions_value, 0) as conversions_value,\n coalesce(view_through_conversions, 0) as view_through_conversions\n\n \n\n\n\n\n\n from fields\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__ad_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_history", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__ad_history.sql", "original_file_path": "models/staging/stg_google_ads__ad_history.sql", "unique_id": "model.google_ads.stg_google_ads__ad_history", "fqn": ["google_ads", "staging", "stg_google_ads__ad_history"], "alias": "stg_google_ads__ad_history", "checksum": {"name": "sha256", "checksum": "f2da7dbb48248ef620b8fc71255aba890efb7e97de8eac15d7023106c40c111e"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of an ad in Google Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "ad_id": {"name": "ad_id", "description": "The ID of the Ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_id"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "display_url": {"name": "display_url", "description": "The display url of the ad that is being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_type": {"name": "ad_type", "description": "The type of the ad in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_type"]}, "ad_status": {"name": "ad_status", "description": "Status of the Ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_status"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether the record is the most recent version of the object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.is_most_recent_record"]}, "source_final_urls": {"name": "source_final_urls", "description": "The original list of final urls expressed as an array. Please be aware the test used on this field is intended to warn you if you have fields with multiple urls. If you do, the `final_url` field will filter down the urls within the array to just the first. Therefore, this package will only leverage one of possibly many urls within this field array.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "final_url": {"name": "final_url", "description": "The first url in the list of the urls within the `final_urls` source field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.base_url"]}, "url_host": {"name": "url_host", "description": "The URL host of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.url_host"]}, "url_path": {"name": "url_path", "description": "The URL path of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.url_path"]}, "utm_source": {"name": "utm_source", "description": "The utm_source parameter of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.utm_source"]}, "utm_medium": {"name": "utm_medium", "description": "The utm_medium parameter of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.utm_medium"]}, "utm_campaign": {"name": "utm_campaign", "description": "The utm_campaign parameter of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.utm_campaign"]}, "utm_content": {"name": "utm_content", "description": "The utm_content parameter of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.utm_content"]}, "utm_term": {"name": "utm_term", "description": "The utm_term parameter of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.utm_term"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.741712, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_google_ads__ad_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__ad_history_tmp')),\n staging_columns=get_ad_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id, \n id as ad_id,\n name as ad_name,\n updated_at,\n type as ad_type,\n status as ad_status,\n display_url,\n final_urls as source_final_urls,\n replace(replace(final_urls, '[', ''),']','') as final_urls,\n row_number() over (partition by id, ad_group_id {{ fivetran_utils.partition_by_source_relation(package_name='google_ads') }} order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n),\n\nfinal_urls as (\n\n select \n *,\n --Extract the first url within the list of urls provided within the final_urls field\n {{ dbt.split_part(string_text='final_urls', delimiter_text=\"','\", part_number=1) }} as final_url\n\n from final\n\n),\n\nurl_fields as (\n select \n *,\n {{ dbt.split_part('final_url', \"'?'\", 1) }} as base_url,\n {{ dbt_utils.get_url_host('final_url') }} as url_host,\n '/' || {{ dbt_utils.get_url_path('final_url') }} as url_path,\n {{ google_ads.google_ads_extract_url_parameter('final_url', 'utm_source') }} as utm_source,\n {{ google_ads.google_ads_extract_url_parameter('final_url', 'utm_medium') }} as utm_medium,\n {{ google_ads.google_ads_extract_url_parameter('final_url', 'utm_campaign') }} as utm_campaign,\n {{ google_ads.google_ads_extract_url_parameter('final_url', 'utm_content') }} as utm_content,\n {{ google_ads.google_ads_extract_url_parameter('final_url', 'utm_term') }} as utm_term\n from final_urls\n)\n\nselect * \nfrom url_fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_history_tmp", "package": null, "version": null}, {"name": "stg_google_ads__ad_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_ad_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.fivetran_utils.partition_by_source_relation", "macro.dbt.split_part", "macro.dbt_utils.get_url_host", "macro.dbt_utils.get_url_path", "macro.google_ads.google_ads_extract_url_parameter"], "nodes": ["model.google_ads.stg_google_ads__ad_history_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__ad_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_history_tmp\"\n),\n\nfields as (\n\n select\n \n ad_group_id as ad_group_id,\n display_url as display_url,\n final_urls as final_urls,\n id as id,\n name as name,\n status as status,\n type as type,\n updated_at as updated_at,\n cast(null as boolean) as _fivetran_active\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(ad_group_id as TEXT) as ad_group_id, \n id as ad_id,\n name as ad_name,\n updated_at,\n type as ad_type,\n status as ad_status,\n display_url,\n final_urls as source_final_urls,\n replace(replace(final_urls, '[', ''),']','') as final_urls,\n row_number() over (partition by id, ad_group_id order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n),\n\nfinal_urls as (\n\n select \n *,\n --Extract the first url within the list of urls provided within the final_urls field\n \n\n \n \n\n split_part(\n final_urls,\n ',',\n 1\n )\n\n\n \n\n as final_url\n\n from final\n\n),\n\nurl_fields as (\n select \n *,\n \n\n \n \n\n split_part(\n final_url,\n '?',\n 1\n )\n\n\n \n\n as base_url,\n \n \n cast(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n \n\n replace(\n \n\n replace(\n \n\n replace(\n final_url,\n 'android-app://',\n ''\n )\n\n\n,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n '/',\n 1\n )\n\n\n \n\n,\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_host,\n '/' || \n \n cast(\n\n \n \n\n split_part(\n \n\n right(\n \n\n replace(\n \n\n replace(\n final_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n \n\n length(\n \n\n replace(\n \n\n replace(\n final_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n )-coalesce(\n nullif(\n\n position(\n '/' in \n\n replace(\n \n\n replace(\n final_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ), 0),\n \n\n position(\n '?' in \n\n replace(\n \n\n replace(\n final_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ) - 1\n )\n ),\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_path,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n final_url,\n 'utm_source=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_source,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n final_url,\n 'utm_medium=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_medium,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n final_url,\n 'utm_campaign=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_campaign,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n final_url,\n 'utm_content=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_content,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n final_url,\n 'utm_term=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_term\n from final_urls\n)\n\nselect * \nfrom url_fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__ad_group_criterion_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_group_criterion_history", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__ad_group_criterion_history.sql", "original_file_path": "models/staging/stg_google_ads__ad_group_criterion_history.sql", "unique_id": "model.google_ads.stg_google_ads__ad_group_criterion_history", "fqn": ["google_ads", "staging", "stg_google_ads__ad_group_criterion_history"], "alias": "stg_google_ads__ad_group_criterion_history", "checksum": {"name": "sha256", "checksum": "dd658cb5c3120d8e798782414b31aabce002635e64dd043ed09f922c073f8be7"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a historical version of an ad group criterion in Google Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "criterion_id": {"name": "criterion_id", "description": "Unique identifier of the ad group criterion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "base_campaign_id": {"name": "base_campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "type": {"name": "type", "description": "The type of ad group criterion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The current status of the ad group criterion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_match_type": {"name": "keyword_match_type", "description": "The match type which dictate how closely the keyword needs to match with the user\u2019s search query so that the ad can be considered for the auction.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_text": {"name": "keyword_text", "description": "The text used within the keyword criterion that is being matched against.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether the record is the most recent version of the object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.747835, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_criterion_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_google_ads__ad_group_criterion_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__ad_group_criterion_history_tmp')),\n staging_columns=get_ad_group_criterion_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as criterion_id,\n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id,\n base_campaign_id,\n updated_at,\n type,\n status,\n keyword_match_type,\n keyword_text,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='google_ads') }} order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_group_criterion_history_tmp", "package": null, "version": null}, {"name": "stg_google_ads__ad_group_criterion_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_ad_group_criterion_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.google_ads.stg_google_ads__ad_group_criterion_history_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__ad_group_criterion_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_criterion_history_tmp\"\n),\n\nfields as (\n\n select\n \n id as id,\n ad_group_id as ad_group_id,\n base_campaign_id as base_campaign_id,\n _fivetran_synced as _fivetran_synced,\n updated_at as updated_at,\n type as type,\n status as status,\n keyword_match_type as keyword_match_type,\n keyword_text as keyword_text,\n cast(null as boolean) as _fivetran_active\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as criterion_id,\n cast(ad_group_id as TEXT) as ad_group_id,\n base_campaign_id,\n updated_at,\n type,\n status,\n keyword_match_type,\n keyword_text,\n row_number() over (partition by id order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__search_term_keyword_stats": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__search_term_keyword_stats", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__search_term_keyword_stats.sql", "original_file_path": "models/staging/stg_google_ads__search_term_keyword_stats.sql", "unique_id": "model.google_ads.stg_google_ads__search_term_keyword_stats", "fqn": ["google_ads", "staging", "stg_google_ads__search_term_keyword_stats"], "alias": "stg_google_ads__search_term_keyword_stats", "checksum": {"name": "sha256", "checksum": "e959c4e02c3e911646bba80785f3e9603c99b27131ebf33251ea810bd2aff3df"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a search term (including associated tracked keywords) in Google Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "date_day": {"name": "date_day", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "search_term_id": {"name": "search_term_id", "description": "The unique ID of the search term record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "search_term": {"name": "search_term", "description": "A word or set of words a person enters when searching on Google or one of Google's Search Network sites", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.search_term"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "search_term_match_type": {"name": "search_term_match_type", "description": "How closely the search terms that triggered your ads on Google are related to the actual keywords in your account. Can be `BROAD` ,`EXACT`, `PHRASE`, `UNKNOWN`, or `UNSPECIFIED`.\n\nSee more details [here](https://support.google.com/google-ads/answer/7478529?sjid=15681083914881504235-NC&visit_id=638760377693438101-1187740487&rd=1).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.search_term_match_type"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "keyword_ad_group_criterion": {"name": "keyword_ad_group_criterion", "description": "The resource name of the keyword's ad group criterion. Ad group criterion resource names have the form: `customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}`", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.keyword_ad_group_criterion"]}, "status": {"name": "status", "description": "Indicates whether the search term is currently one of your targeted or excluded keywords. Possible values: `ADDED`, `ADDED_EXCLUDED`, `EXCLUDED`, `NONE`, `UNKNOWN`, or `UNSPECIFIED`", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.search_term_status"]}, "keyword_text": {"name": "keyword_text", "description": "The text of the keyword (at most 80 characters and 10 words).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.info_text"]}, "spend": {"name": "spend", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "criterion_id": {"name": "criterion_id", "description": "Reference to the ad group criterion used for the associated keyword. One `keyword_text` may have multiple `criterion_id` values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.7542684, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__search_term_keyword_stats\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True) and var('google_ads__using_search_term_keyword_stats', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_google_ads__search_term_keyword_stats_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__search_term_keyword_stats_tmp')),\n staging_columns=get_search_term_keyword_stats_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n customer_id as account_id,\n date as date_day,\n _fivetran_id as search_term_id,\n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id,\n campaign_id,\n keyword_ad_group_criterion,\n {# keyword_ad_group_criterion is formatted as: customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id} #}\n {{ dbt.split_part(string_text=\"keyword_ad_group_criterion\", delimiter_text=\"'~'\", part_number=2) }} as criterion_id,\n search_term,\n info_text as keyword_text,\n search_term_match_type,\n status, \n coalesce(clicks, 0) as clicks, \n coalesce(cost_micros, 0) / 1000000.0 as spend, \n coalesce(impressions, 0) as impressions,\n coalesce(conversions, 0) as conversions,\n coalesce(conversions_value, 0) as conversions_value,\n coalesce(view_through_conversions, 0) as view_through_conversions\n\n {{ google_ads_fill_pass_through_columns(pass_through_fields=var('google_ads__search_term_keyword_stats_passthrough_metrics')) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__search_term_keyword_stats_tmp", "package": null, "version": null}, {"name": "stg_google_ads__search_term_keyword_stats_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_search_term_keyword_stats_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.dbt.split_part", "macro.google_ads.google_ads_fill_pass_through_columns"], "nodes": ["model.google_ads.stg_google_ads__search_term_keyword_stats_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__search_term_keyword_stats.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__search_term_keyword_stats_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_id as _fivetran_id,\n _fivetran_synced as _fivetran_synced,\n ad_group_id as ad_group_id,\n campaign_id as campaign_id,\n clicks as clicks,\n conversions as conversions,\n conversions_value as conversions_value,\n cost_micros as cost_micros,\n customer_id as customer_id,\n date as date,\n impressions as impressions,\n info_text as info_text,\n keyword_ad_group_criterion as keyword_ad_group_criterion,\n search_term as search_term,\n search_term_match_type as search_term_match_type,\n status as status,\n view_through_conversions as view_through_conversions\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n customer_id as account_id,\n date as date_day,\n _fivetran_id as search_term_id,\n cast(ad_group_id as TEXT) as ad_group_id,\n campaign_id,\n keyword_ad_group_criterion,\n \n \n\n \n \n\n split_part(\n keyword_ad_group_criterion,\n '~',\n 2\n )\n\n\n \n\n as criterion_id,\n search_term,\n info_text as keyword_text,\n search_term_match_type,\n status, \n coalesce(clicks, 0) as clicks, \n coalesce(cost_micros, 0) / 1000000.0 as spend, \n coalesce(impressions, 0) as impressions,\n coalesce(conversions, 0) as conversions,\n coalesce(conversions_value, 0) as conversions_value,\n coalesce(view_through_conversions, 0) as view_through_conversions\n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__campaign_bidding_strategy_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_bidding_strategy_history", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__campaign_bidding_strategy_history.sql", "original_file_path": "models/staging/stg_google_ads__campaign_bidding_strategy_history.sql", "unique_id": "model.google_ads.stg_google_ads__campaign_bidding_strategy_history", "fqn": ["google_ads", "staging", "stg_google_ads__campaign_bidding_strategy_history"], "alias": "stg_google_ads__campaign_bidding_strategy_history", "checksum": {"name": "sha256", "checksum": "cdca3aa07882444b8da052aeede74cd7e4831a435e9b1f917f8931dc89d3f660"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a historical version of a campaign bidding strategy in Google Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "enhanced_cpc": {"name": "enhanced_cpc", "description": "Boolean indicating if enhanced CPC is enabled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "manual_cpa": {"name": "manual_cpa", "description": "Manual cost per acquisition setting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "manual_cpm": {"name": "manual_cpm", "description": "Manual cost per mille setting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "manual_cpv": {"name": "manual_cpv", "description": "Manual cost per view setting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bidding_status": {"name": "bidding_status", "description": "The status of the bidding strategy.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "target_cpa": {"name": "target_cpa", "description": "Target cost per acquisition in dollars, converted from target_cpa_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "target_roas": {"name": "target_roas", "description": "Target return on ad spend.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bidding_strategy_type": {"name": "bidding_strategy_type", "description": "The type of bidding strategy (MANUAL_CPC, TARGET_CPA, etc.).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether the record is the most recent version of the object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.7615907, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_bidding_strategy_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True) and var('google_ads__using_campaign_bidding_strategy_history', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_google_ads__campaign_bidding_strategy_history_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__campaign_bidding_strategy_history_tmp')),\n staging_columns=get_campaign_bidding_strategy_history_columns()\n )\n }}\n\n\n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n campaign_id,\n updated_at,\n enhanced_cpc,\n manual_cpa,\n manual_cpm,\n manual_cpv,\n status as bidding_status,\n target_cpa_micros / 1000000.0 as target_cpa,\n target_roas,\n type as bidding_strategy_type,\n row_number() over (partition by campaign_id {{ fivetran_utils.partition_by_source_relation(package_name='google_ads') }} order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_bidding_strategy_history_tmp", "package": null, "version": null}, {"name": "stg_google_ads__campaign_bidding_strategy_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_campaign_bidding_strategy_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.google_ads.stg_google_ads__campaign_bidding_strategy_history_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__campaign_bidding_strategy_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_bidding_strategy_history_tmp\"\n\n),\n\nfields as (\n\n select\n \n campaign_id as campaign_id,\n updated_at as updated_at,\n cpc_bid_ceiling_micros as cpc_bid_ceiling_micros,\n cpc_bid_floor_micros as cpc_bid_floor_micros,\n enhanced_cpc as enhanced_cpc,\n enhanced_cpc_enabled as enhanced_cpc_enabled,\n location as location,\n location_fraction_micros as location_fraction_micros,\n manual_cpa as manual_cpa,\n manual_cpm as manual_cpm,\n manual_cpv as manual_cpv,\n name as name,\n status as status,\n target_cpa_micros as target_cpa_micros,\n target_cpm as target_cpm,\n target_roas as target_roas,\n type as type,\n _fivetran_active as _fivetran_active\n\n\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n campaign_id,\n updated_at,\n enhanced_cpc,\n manual_cpa,\n manual_cpm,\n manual_cpv,\n status as bidding_status,\n target_cpa_micros / 1000000.0 as target_cpa,\n target_roas,\n type as bidding_strategy_type,\n row_number() over (partition by campaign_id order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__campaign_criterion_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_criterion_history", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__campaign_criterion_history.sql", "original_file_path": "models/staging/stg_google_ads__campaign_criterion_history.sql", "unique_id": "model.google_ads.stg_google_ads__campaign_criterion_history", "fqn": ["google_ads", "staging", "stg_google_ads__campaign_criterion_history"], "alias": "stg_google_ads__campaign_criterion_history", "checksum": {"name": "sha256", "checksum": "b40b2b38671e063d114a1d02da5c2b04ab7908528caa59d2870a6d1d5cdaf930"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a historical version of a campaign criterion in Google Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "criterion_id": {"name": "criterion_id", "description": "Unique identifier of the campaign criterion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "age_range_type": {"name": "age_range_type", "description": "The age range type for demographic targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "device_type": {"name": "device_type", "description": "The device type for targeting (MOBILE, DESKTOP, TABLET).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "geo_target_constant_id": {"name": "geo_target_constant_id", "description": "The geographic target constant ID for location targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "gender_type": {"name": "gender_type", "description": "The gender type for demographic targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "income_range_type": {"name": "income_range_type", "description": "The income range type for demographic targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_text": {"name": "keyword_text", "description": "The keyword text for keyword targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "parental_status_type": {"name": "parental_status_type", "description": "The parental status type for demographic targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement_url": {"name": "placement_url", "description": "The placement URL for placement targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "topic_constant_id": {"name": "topic_constant_id", "description": "The topic constant ID for topic targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "user_list_id": {"name": "user_list_id", "description": "The user list ID for audience targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether the record is the most recent version of the object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.7604885, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_criterion_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True) and var('google_ads__using_campaign_criterion_history', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_google_ads__campaign_criterion_history_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__campaign_criterion_history_tmp')),\n staging_columns=get_campaign_criterion_history_columns()\n )\n }}\n\n\n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n id as criterion_id,\n updated_at,\n campaign_id,\n geo_target_constant_id,\n topic_constant_id,\n user_list_id,\n age_range_type,\n device_type,\n gender_type,\n income_range_type,\n keyword_text,\n parental_status_type,\n placement_url,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='google_ads') }} order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_criterion_history_tmp", "package": null, "version": null}, {"name": "stg_google_ads__campaign_criterion_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_campaign_criterion_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.google_ads.stg_google_ads__campaign_criterion_history_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__campaign_criterion_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_criterion_history_tmp\"\n\n),\n\nfields as (\n\n select\n \n id as id,\n updated_at as updated_at,\n campaign_id as campaign_id,\n geo_target_constant_id as geo_target_constant_id,\n mobile_device_id as mobile_device_id,\n operating_system_version_id as operating_system_version_id,\n topic_constant_id as topic_constant_id,\n user_interest_id as user_interest_id,\n user_list_id as user_list_id,\n age_range_type as age_range_type,\n bid_modifier as bid_modifier,\n carrier_country_code as carrier_country_code,\n carrier_name as carrier_name,\n content_label_type as content_label_type,\n device_type as device_type,\n display_name as display_name,\n gender_type as gender_type,\n income_range_type as income_range_type,\n ip_block_ip_address as ip_block_ip_address,\n negative as negative,\n keyword_match_type as keyword_match_type,\n keyword_text as keyword_text,\n language_code as language_code,\n language_name as language_name,\n mobile_app_category_constant_id as mobile_app_category_constant_id,\n mobile_app_category_constant_name as mobile_app_category_constant_name,\n mobile_application_app_id as mobile_application_app_id,\n mobile_application_name as mobile_application_name,\n parental_status_type as parental_status_type,\n placement_url as placement_url,\n status as status,\n type as type,\n youtube_channel_id as youtube_channel_id,\n youtube_video_id as youtube_video_id,\n _fivetran_active as _fivetran_active,\n _fivetran_synced as _fivetran_synced\n\n\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n id as criterion_id,\n updated_at,\n campaign_id,\n geo_target_constant_id,\n topic_constant_id,\n user_list_id,\n age_range_type,\n device_type,\n gender_type,\n income_range_type,\n keyword_text,\n parental_status_type,\n placement_url,\n row_number() over (partition by id order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__campaign_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_history", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__campaign_history.sql", "original_file_path": "models/staging/stg_google_ads__campaign_history.sql", "unique_id": "model.google_ads.stg_google_ads__campaign_history", "fqn": ["google_ads", "staging", "stg_google_ads__campaign_history"], "alias": "stg_google_ads__campaign_history", "checksum": {"name": "sha256", "checksum": "d88b43b16ca176e99502cab0d2a2314459210f3255142fc01f34d8373ce827b4"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of a campaign in Google Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "advertising_channel_type": {"name": "advertising_channel_type", "description": "The type of advertising channel being used by the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertising_channel_subtype": {"name": "advertising_channel_subtype", "description": "The advertising channel subtype that is being used by the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_date": {"name": "start_date", "description": "The start date of the campaign. Uses start_date_time when available, falls back to start_date for backward compatibility.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_date": {"name": "end_date", "description": "The end date of the campaign. Uses end_date_time when available, falls back to end_date for backward compatibility.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "serving_status": {"name": "serving_status", "description": "Status of the ads and how they are currently being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "General status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tracking_url_template": {"name": "tracking_url_template", "description": "The tracking url template being used throughout the campaign ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_name"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether the record is the most recent version of the object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.7465196, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_google_ads__campaign_history_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__campaign_history_tmp')),\n staging_columns=get_campaign_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as campaign_id, \n updated_at,\n name as campaign_name,\n customer_id as account_id,\n advertising_channel_type,\n advertising_channel_subtype,\n coalesce(cast(start_date_time as {{ dbt.type_string() }}), cast(start_date as {{ dbt.type_string() }})) as start_date,\n coalesce(cast(end_date_time as {{ dbt.type_string() }}), cast(end_date as {{ dbt.type_string() }})) as end_date,\n serving_status,\n status,\n tracking_url_template,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='google_ads') }} order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_history_tmp", "package": null, "version": null}, {"name": "stg_google_ads__campaign_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_campaign_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.google_ads.stg_google_ads__campaign_history_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__campaign_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history_tmp\"\n\n),\n\nfields as (\n\n select\n \n advertising_channel_subtype as advertising_channel_subtype,\n advertising_channel_type as advertising_channel_type,\n customer_id as customer_id,\n end_date as end_date,\n cast(null as timestamp) as end_date_time,\n id as id,\n name as name,\n serving_status as serving_status,\n start_date as start_date,\n cast(null as timestamp) as start_date_time,\n status as status,\n tracking_url_template as tracking_url_template,\n updated_at as updated_at,\n cast(null as boolean) as _fivetran_active\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as campaign_id, \n updated_at,\n name as campaign_name,\n customer_id as account_id,\n advertising_channel_type,\n advertising_channel_subtype,\n coalesce(cast(start_date_time as TEXT), cast(start_date as TEXT)) as start_date,\n coalesce(cast(end_date_time as TEXT), cast(end_date as TEXT)) as end_date,\n serving_status,\n status,\n tracking_url_template,\n row_number() over (partition by id order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__ad_group_criterion_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_group_criterion_history_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__ad_group_criterion_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__ad_group_criterion_history_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__ad_group_criterion_history_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__ad_group_criterion_history_tmp"], "alias": "stg_google_ads__ad_group_criterion_history_tmp", "checksum": {"name": "sha256", "checksum": "63056b60a1f353599f3b69fb25b49c738abe69144f326b86a2aca382f9450b23"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450499.1161942, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_criterion_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_group_criterion_history', \n database_variable='google_ads_database', \n schema_variable='google_ads_schema', \n default_database=target.database,\n default_schema='google_ads',\n default_variable='ad_group_criterion_history',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='ad_group_criterion_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "ad_group_criterion_history"], ["google_ads", "ad_group_criterion_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.ad_group_criterion_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__ad_group_criterion_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_ad_group_criterion_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_ad_group_criterion_history_data\n\n\n select\n \"id\",\n \"ad_group_id\",\n \"base_campaign_id\",\n \"updated_at\",\n \"_fivetran_synced\",\n \"type\",\n \"status\",\n \"keyword_match_type\",\n \"keyword_text\"\n from \"postgres\".\"public\".\"google_ads_ad_group_criterion_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__campaign_budget_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_budget_history_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__campaign_budget_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__campaign_budget_history_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__campaign_budget_history_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__campaign_budget_history_tmp"], "alias": "stg_google_ads__campaign_budget_history_tmp", "checksum": {"name": "sha256", "checksum": "c7cfd70d902eb74511a7d827c7805d9cf0db513d112e5ffbef237ca516a85316"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450499.1269479, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_budget_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True) and var('google_ads__using_campaign_budget_history', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_budget_history',\n database_variable='google_ads_database',\n schema_variable='google_ads_schema',\n default_database=target.database,\n default_schema='google_ads',\n default_variable='campaign_budget_history',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='campaign_budget_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "campaign_budget_history"], ["google_ads", "campaign_budget_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.campaign_budget_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__campaign_budget_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_campaign_budget_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_campaign_budget_history_data\n\n\n select\n \"id\",\n \"updated_at\",\n \"campaign_id\",\n \"amount_micros\",\n \"delivery_method\",\n \"explicitly_shared\",\n \"name\",\n \"reference_count\",\n \"status\",\n \"has_recommended_budget\",\n \"period\",\n \"recommended_budget_amount_micros\",\n \"total_amount_micros\",\n \"type\",\n \"_fivetran_active\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"google_ads_campaign_budget_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__campaign_stats_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_stats_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__campaign_stats_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__campaign_stats_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__campaign_stats_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__campaign_stats_tmp"], "alias": "stg_google_ads__campaign_stats_tmp", "checksum": {"name": "sha256", "checksum": "d7e3d58f6494ca6557e387de5bc5c8a228263fba4b22be44efe56af9de61b598"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450499.1377478, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_stats_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_stats', \n database_variable='google_ads_database', \n schema_variable='google_ads_schema', \n default_database=target.database,\n default_schema='google_ads',\n default_variable='campaign_stats',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='campaign_stats'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "campaign_stats"], ["google_ads", "campaign_stats"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.campaign_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__campaign_stats_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_campaign_stats_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_campaign_stats_data\n\n\n select\n \"_fivetran_id\",\n \"customer_id\",\n \"date\",\n \"_fivetran_synced\",\n \"active_view_impressions\",\n \"active_view_measurability\",\n \"active_view_measurable_cost_micros\",\n \"active_view_measurable_impressions\",\n \"active_view_viewability\",\n \"ad_network_type\",\n \"base_campaign\",\n \"clicks\",\n \"conversions\",\n \"conversions_value\",\n \"cost_micros\",\n \"device\",\n \"id\",\n \"impressions\",\n \"interaction_event_types\",\n \"interactions\",\n \"view_through_conversions\"\n from \"postgres\".\"public\".\"google_ads_campaign_stats_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__campaign_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_history_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__campaign_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__campaign_history_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__campaign_history_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__campaign_history_tmp"], "alias": "stg_google_ads__campaign_history_tmp", "checksum": {"name": "sha256", "checksum": "47624df19aa5630cab425555743638e1172fe93ce28049eccd8f7e2e1c5e9847"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450499.1491456, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_history', \n database_variable='google_ads_database', \n schema_variable='google_ads_schema', \n default_database=target.database,\n default_schema='google_ads',\n default_variable='campaign_history',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='campaign_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "campaign_history"], ["google_ads", "campaign_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.campaign_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__campaign_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_campaign_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_campaign_history_data\n\n\n select\n \"id\",\n \"updated_at\",\n \"name\",\n \"customer_id\",\n \"advertising_channel_type\",\n \"advertising_channel_subtype\",\n \"start_date\",\n \"end_date\",\n \"serving_status\",\n \"status\",\n \"tracking_url_template\"\n from \"postgres\".\"public\".\"google_ads_campaign_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__account_stats_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__account_stats_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__account_stats_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__account_stats_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__account_stats_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__account_stats_tmp"], "alias": "stg_google_ads__account_stats_tmp", "checksum": {"name": "sha256", "checksum": "b3028b7ca5054447ec186489ea8decefa1c57bc863986bdae1d45dbbb28c8a4d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450499.1595485, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_stats_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='account_stats', \n database_variable='google_ads_database', \n schema_variable='google_ads_schema', \n default_database=target.database,\n default_schema='google_ads',\n default_variable='account_stats',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='account_stats'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "account_stats"], ["google_ads", "account_stats"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.account_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__account_stats_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_account_stats_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_account_stats_data\n\n\n select\n \"_fivetran_id\",\n \"customer_id\",\n \"date\",\n \"_fivetran_synced\",\n \"active_view_impressions\",\n \"active_view_measurability\",\n \"active_view_measurable_cost_micros\",\n \"active_view_measurable_impressions\",\n \"active_view_viewability\",\n \"ad_network_type\",\n \"clicks\",\n \"conversions\",\n \"conversions_value\",\n \"cost_micros\",\n \"device\",\n \"impressions\",\n \"interaction_event_types\",\n \"interactions\",\n \"view_through_conversions\"\n from \"postgres\".\"public\".\"google_ads_account_stats_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__campaign_bid_modifier_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_bid_modifier_history_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__campaign_bid_modifier_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__campaign_bid_modifier_history_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__campaign_bid_modifier_history_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__campaign_bid_modifier_history_tmp"], "alias": "stg_google_ads__campaign_bid_modifier_history_tmp", "checksum": {"name": "sha256", "checksum": "2ce1ab7b441c071b47d590608625deadb5c8139b910393cd75e239c5315229e2"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450499.1702466, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_bid_modifier_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True) and var('google_ads__using_campaign_bid_modifier_history', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_bid_modifier_history',\n database_variable='google_ads_database',\n schema_variable='google_ads_schema',\n default_database=target.database,\n default_schema='google_ads',\n default_variable='campaign_bid_modifier_history',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='campaign_bid_modifier_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "campaign_bid_modifier_history"], ["google_ads", "campaign_bid_modifier_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.campaign_bid_modifier_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__campaign_bid_modifier_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_campaign_bid_modifier_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_campaign_bid_modifier_history_data\n\n\n select\n \"campaign_id\",\n \"criterion_id\",\n \"bid_modifier\",\n \"interaction_type\",\n \"interaction_event_types\",\n \"updated_at\",\n \"_fivetran_active\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"google_ads_campaign_bid_modifier_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__search_term_keyword_stats_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__search_term_keyword_stats_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__search_term_keyword_stats_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__search_term_keyword_stats_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__search_term_keyword_stats_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__search_term_keyword_stats_tmp"], "alias": "stg_google_ads__search_term_keyword_stats_tmp", "checksum": {"name": "sha256", "checksum": "52e76034d6e0ae931e81c27b3e81adb9c5f30817cfc7ee9089c0ac88743302e9"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450499.181883, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__search_term_keyword_stats_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True) and var('google_ads__using_search_term_keyword_stats', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='search_term_keyword_stats', \n database_variable='google_ads_database', \n schema_variable='google_ads_schema', \n default_database=target.database,\n default_schema='google_ads',\n default_variable='search_term_keyword_stats',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='search_term_keyword_stats'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "search_term_keyword_stats"], ["google_ads", "search_term_keyword_stats"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.search_term_keyword_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__search_term_keyword_stats_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_search_term_keyword_stats_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_search_term_keyword_stats_data\n\n\n select\n \"_fivetran_id\",\n \"_fivetran_synced\",\n \"ad_group_id\",\n \"campaign_id\",\n \"clicks\",\n \"conversions\",\n \"conversions_value\",\n \"cost_micros\",\n \"customer_id\",\n \"date\",\n \"impressions\",\n \"info_text\",\n \"keyword_ad_group_criterion\",\n \"search_term\",\n \"search_term_match_type\",\n \"status\",\n \"view_through_conversions\"\n from \"postgres\".\"public\".\"google_ads_search_term_keyword_stats_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__ad_group_stats_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_group_stats_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__ad_group_stats_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__ad_group_stats_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__ad_group_stats_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__ad_group_stats_tmp"], "alias": "stg_google_ads__ad_group_stats_tmp", "checksum": {"name": "sha256", "checksum": "fe0f28b5974c01cfb8da8a18f2e4ddcdb4ff6a953caf60a66ce525d3f8b11883"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450499.192657, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_stats_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_group_stats', \n database_variable='google_ads_database', \n schema_variable='google_ads_schema', \n default_database=target.database,\n default_schema='google_ads',\n default_variable='ad_group_stats',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='ad_group_stats'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "ad_group_stats"], ["google_ads", "ad_group_stats"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.ad_group_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__ad_group_stats_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_ad_group_stats_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_ad_group_stats_data\n\n\n select\n \"_fivetran_id\",\n \"customer_id\",\n \"date\",\n \"_fivetran_synced\",\n \"active_view_impressions\",\n \"active_view_measurability\",\n \"active_view_measurable_cost_micros\",\n \"active_view_measurable_impressions\",\n \"active_view_viewability\",\n \"ad_network_type\",\n \"base_ad_group\",\n \"campaign_base_campaign\",\n \"campaign_id\",\n \"clicks\",\n \"conversions\",\n \"conversions_value\",\n \"cost_micros\",\n \"device\",\n \"id\",\n \"impressions\",\n \"interaction_event_types\",\n \"interactions\",\n \"view_through_conversions\"\n from \"postgres\".\"public\".\"google_ads_ad_group_stats_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__campaign_criterion_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_criterion_history_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__campaign_criterion_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__campaign_criterion_history_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__campaign_criterion_history_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__campaign_criterion_history_tmp"], "alias": "stg_google_ads__campaign_criterion_history_tmp", "checksum": {"name": "sha256", "checksum": "97291f57298d185e15af8d815d53db028ed81b0f6c351b11370d8481a8e2e3ab"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450499.2030911, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_criterion_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True) and var('google_ads__using_campaign_criterion_history', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_criterion_history',\n database_variable='google_ads_database',\n schema_variable='google_ads_schema',\n default_database=target.database,\n default_schema='google_ads',\n default_variable='campaign_criterion_history',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='campaign_criterion_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "campaign_criterion_history"], ["google_ads", "campaign_criterion_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.campaign_criterion_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__campaign_criterion_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_campaign_criterion_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_campaign_criterion_history_data\n\n\n select\n \"id\",\n \"updated_at\",\n \"campaign_id\",\n \"geo_target_constant_id\",\n \"mobile_device_id\",\n \"operating_system_version_id\",\n \"topic_constant_id\",\n \"user_interest_id\",\n \"user_list_id\",\n \"age_range_type\",\n \"bid_modifier\",\n \"carrier_country_code\",\n \"carrier_name\",\n \"content_label_type\",\n \"device_type\",\n \"display_name\",\n \"gender_type\",\n \"income_range_type\",\n \"ip_block_ip_address\",\n \"negative\",\n \"keyword_match_type\",\n \"keyword_text\",\n \"language_code\",\n \"language_name\",\n \"mobile_app_category_constant_id\",\n \"mobile_app_category_constant_name\",\n \"mobile_application_app_id\",\n \"mobile_application_name\",\n \"parental_status_type\",\n \"placement_url\",\n \"status\",\n \"type\",\n \"youtube_channel_id\",\n \"youtube_video_id\",\n \"_fivetran_active\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"google_ads_campaign_criterion_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__keyword_stats_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__keyword_stats_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__keyword_stats_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__keyword_stats_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__keyword_stats_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__keyword_stats_tmp"], "alias": "stg_google_ads__keyword_stats_tmp", "checksum": {"name": "sha256", "checksum": "e5ba405b5ec8ebd3dcd5a4028acb2aae273361c654c7a49a9744d47447c6615e"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450499.2147834, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__keyword_stats_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='keyword_stats', \n database_variable='google_ads_database', \n schema_variable='google_ads_schema', \n default_database=target.database,\n default_schema='google_ads',\n default_variable='keyword_stats',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='keyword_stats'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "keyword_stats"], ["google_ads", "keyword_stats"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.keyword_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__keyword_stats_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_keyword_stats_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_keyword_stats_data\n\n\n select\n \"_fivetran_id\",\n \"customer_id\",\n \"date\",\n \"_fivetran_synced\",\n \"active_view_impressions\",\n \"active_view_measurability\",\n \"active_view_measurable_cost_micros\",\n \"active_view_measurable_impressions\",\n \"active_view_viewability\",\n \"ad_group_base_ad_group\",\n \"ad_group_criterion_criterion_id\",\n \"ad_group_id\",\n \"ad_network_type\",\n \"campaign_base_campaign\",\n \"campaign_id\",\n \"clicks\",\n \"conversions\",\n \"conversions_value\",\n \"cost_micros\",\n \"device\",\n \"impressions\",\n \"interaction_event_types\",\n \"interactions\",\n \"view_through_conversions\"\n from \"postgres\".\"public\".\"google_ads_keyword_stats_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__ad_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_history_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__ad_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__ad_history_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__ad_history_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__ad_history_tmp"], "alias": "stg_google_ads__ad_history_tmp", "checksum": {"name": "sha256", "checksum": "c6a698b67a518ff7efea4f0bcdfe827f6c75d872278cf8c67c14b7c7285f5a51"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450499.2251146, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_history', \n database_variable='google_ads_database', \n schema_variable='google_ads_schema', \n default_database=target.database,\n default_schema='google_ads',\n default_variable='ad_history',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='ad_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "ad_history"], ["google_ads", "ad_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.ad_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__ad_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_ad_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_ad_history_data\n\n\n select\n \"ad_group_id\",\n \"id\",\n \"name\",\n \"updated_at\",\n \"type\",\n \"status\",\n \"display_url\",\n \"final_urls\"\n from \"postgres\".\"public\".\"google_ads_ad_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__campaign_bidding_strategy_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_bidding_strategy_history_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__campaign_bidding_strategy_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__campaign_bidding_strategy_history_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__campaign_bidding_strategy_history_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__campaign_bidding_strategy_history_tmp"], "alias": "stg_google_ads__campaign_bidding_strategy_history_tmp", "checksum": {"name": "sha256", "checksum": "fe76e3e4e1ee0d794e95ffa83e36914a69fe0a4a99c70a1cbd7a5d9cda35fd41"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450499.2354357, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_bidding_strategy_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True) and var('google_ads__using_campaign_bidding_strategy_history', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_bidding_strategy_history',\n database_variable='google_ads_database',\n schema_variable='google_ads_schema',\n default_database=target.database,\n default_schema='google_ads',\n default_variable='campaign_bidding_strategy_history',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='campaign_bidding_strategy_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "campaign_bidding_strategy_history"], ["google_ads", "campaign_bidding_strategy_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.campaign_bidding_strategy_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__campaign_bidding_strategy_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_campaign_bidding_strategy_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_campaign_bidding_strategy_history_data\n\n\n select\n \"campaign_id\",\n \"updated_at\",\n \"cpc_bid_ceiling_micros\",\n \"cpc_bid_floor_micros\",\n \"enhanced_cpc\",\n \"enhanced_cpc_enabled\",\n \"location\",\n \"location_fraction_micros\",\n \"manual_cpa\",\n \"manual_cpm\",\n \"manual_cpv\",\n \"name\",\n \"status\",\n \"target_cpa_micros\",\n \"target_cpm\",\n \"target_roas\",\n \"type\",\n \"_fivetran_active\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"google_ads_campaign_bidding_strategy_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__account_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__account_history_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__account_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__account_history_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__account_history_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__account_history_tmp"], "alias": "stg_google_ads__account_history_tmp", "checksum": {"name": "sha256", "checksum": "04d151667ede29b416ae5f2d20043fd8fae2ee611661c0cfa3f42cd27ac883f8"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450499.246189, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='account_history', \n database_variable='google_ads_database', \n schema_variable='google_ads_schema', \n default_database=target.database,\n default_schema='google_ads',\n default_variable='account_history',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='account_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "account_history"], ["google_ads", "account_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.account_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__account_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_account_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_account_history_data\n\n\n select\n \"id\",\n \"updated_at\",\n \"_fivetran_synced\",\n \"auto_tagging_enabled\",\n \"currency_code\",\n \"descriptive_name\",\n \"final_url_suffix\",\n \"hidden\",\n \"manager\",\n \"manager_customer_id\",\n \"optimization_score\",\n \"pay_per_conversion_eligibility_failure_reasons\",\n \"test_account\",\n \"time_zone\",\n \"tracking_url_template\"\n from \"postgres\".\"public\".\"google_ads_account_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__ad_group_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_group_history_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__ad_group_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__ad_group_history_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__ad_group_history_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__ad_group_history_tmp"], "alias": "stg_google_ads__ad_group_history_tmp", "checksum": {"name": "sha256", "checksum": "521ca990eda54e5f856c7ffb59ddec3daedf2204e01af29d893948af2518cc17"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450499.2578378, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_group_history', \n database_variable='google_ads_database', \n schema_variable='google_ads_schema', \n default_database=target.database,\n default_schema='google_ads',\n default_variable='ad_group_history',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='ad_group_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "ad_group_history"], ["google_ads", "ad_group_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.ad_group_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__ad_group_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_ad_group_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_ad_group_history_data\n\n\n select\n \"id\",\n \"updated_at\",\n \"type\",\n \"campaign_id\",\n \"campaign_name\",\n \"name\",\n \"status\"\n from \"postgres\".\"public\".\"google_ads_ad_group_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__ad_stats_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_stats_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__ad_stats_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__ad_stats_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__ad_stats_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__ad_stats_tmp"], "alias": "stg_google_ads__ad_stats_tmp", "checksum": {"name": "sha256", "checksum": "3e363172d0cc23605d9e5ca18846ce090141162f7e1981fffc24ce16ca09795b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450499.2683105, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_stats_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_stats', \n database_variable='google_ads_database', \n schema_variable='google_ads_schema', \n default_database=target.database,\n default_schema='google_ads',\n default_variable='ad_stats',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='ad_stats'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "ad_stats"], ["google_ads", "ad_stats"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.ad_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__ad_stats_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_ad_stats_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_ad_stats_data\n\n\n select\n \"customer_id\",\n \"date\",\n \"ad_group_id\",\n \"ad_group\",\n \"keyword_ad_group_criterion\",\n \"ad_network_type\",\n \"device\",\n \"ad_id\",\n \"campaign_id\",\n \"clicks\",\n \"cost_micros\",\n \"impressions\",\n \"conversions\",\n \"conversions_value\",\n \"view_through_conversions\"\n from \"postgres\".\"public\".\"google_ads_ad_stats_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.int_google_ads__campaigns_accounts": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "int_google_ads__campaigns_accounts", "resource_type": "model", "package_name": "google_ads", "path": "intermediate/int_google_ads__campaigns_accounts.sql", "original_file_path": "models/intermediate/int_google_ads__campaigns_accounts.sql", "unique_id": "model.google_ads.int_google_ads__campaigns_accounts", "fqn": ["google_ads", "intermediate", "int_google_ads__campaigns_accounts"], "alias": "int_google_ads__campaigns_accounts", "checksum": {"name": "sha256", "checksum": "99411ca7507d33287a03e18ea8db1a54eef1f318aa8734903e65a243f57d900d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "ephemeral", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450499.278586, "relation_name": null, "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith campaigns as (\n select *\n from {{ ref('stg_google_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from {{ ref('stg_google_ads__account_history') }}\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_history", "package": null, "version": null}, {"name": "stg_google_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": ["model.google_ads.stg_google_ads__campaign_history", "model.google_ads.stg_google_ads__account_history"]}, "compiled_path": "target/compiled/google_ads/models/intermediate/int_google_ads__campaigns_accounts.sql", "compiled": true, "compiled_code": "\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.amazon_ads__search_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "amazon_ads__search_report", "resource_type": "model", "package_name": "amazon_ads", "path": "amazon_ads__search_report.sql", "original_file_path": "models/amazon_ads__search_report.sql", "unique_id": "model.amazon_ads.amazon_ads__search_report", "fqn": ["amazon_ads", "amazon_ads__search_report"], "alias": "amazon_ads__search_report", "checksum": {"name": "sha256", "checksum": "b4171d0945ea0be2cc5c50811fdaaa66f86e47e679d6e7ae6a0cf493535cf572"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance at the search term level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "account_id": {"name": "account_id", "description": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_id"]}, "account_name": {"name": "account_name", "description": "Account Name. Not currently populated for sellers.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_name"]}, "country_code": {"name": "country_code", "description": "The code for a given country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.country_code"]}, "keyword_id": {"name": "keyword_id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_id"]}, "keyword_text": {"name": "keyword_text", "description": "The exact text for the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_text"]}, "match_type": {"name": "match_type", "description": "Type of matching for the keyword used in bid. One of: BROAD, PHRASE, or EXACT.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.match_type"]}, "portfolio_id": {"name": "portfolio_id", "description": "The ID of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_id"]}, "portfolio_name": {"name": "portfolio_name", "description": "The name of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_name"]}, "profile_id": {"name": "profile_id", "description": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.profile_id"]}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "search_term": {"name": "search_term", "description": "The search term used by the customer.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.search_term"]}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}, "targeting": {"name": "targeting", "description": "A string representation of the expression object used in the targeting clause.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.targeting"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.8953032, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__search_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith report as (\n select *\n from {{ ref('stg_amazon_ads__search_term_ad_keyword_report') }}\n), \n\naccount_info as (\n select *\n from {{ ref('stg_amazon_ads__profile') }}\n where _fivetran_deleted = False\n),\n\nportfolios as (\n select *\n from {{ ref('int_amazon_ads__portfolio_history') }}\n), \n\ncampaigns as (\n select *\n from {{ ref('stg_amazon_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\nad_groups as (\n select *\n from {{ ref('stg_amazon_ads__ad_group_history') }}\n where is_most_recent_record = True\n), \n\nkeywords as (\n select *\n from {{ ref('stg_amazon_ads__keyword_history') }}\n where is_most_recent_record = True\n), \n\nfields as (\n select\n report.source_relation,\n report.date_day,\n account_info.account_name,\n account_info.account_id,\n account_info.country_code,\n account_info.profile_id,\n portfolios.portfolio_name,\n portfolios.portfolio_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n report.keyword_id,\n keywords.keyword_text,\n keywords.match_type,\n keywords.serving_status,\n keywords.state,\n report.search_term,\n report.targeting,\n sum(report.cost) as cost,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.purchases_30_d) as purchases_30_d,\n sum(report.sales_30_d) as sales_30_d\n\n {{ amazon_ads_persist_pass_through_columns(pass_through_variable='amazon_ads__search_term_ad_keyword_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0, exclude_fields=['purchases_30_d','sales_30_d']) }} \n\n from report\n\n left join keywords\n on keywords.keyword_id = report.keyword_id\n and keywords.source_relation = report.source_relation\n left join ad_groups\n on ad_groups.ad_group_id = report.ad_group_id\n and ad_groups.source_relation = report.source_relation\n left join campaigns\n on campaigns.campaign_id = report.campaign_id\n and campaigns.source_relation = report.source_relation\n left join portfolios\n on portfolios.portfolio_id = campaigns.portfolio_id\n and portfolios.source_relation = campaigns.source_relation\n left join account_info\n on account_info.profile_id = campaigns.profile_id\n and account_info.source_relation = campaigns.source_relation\n\n {{ dbt_utils.group_by(19) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__search_term_ad_keyword_report", "package": null, "version": null}, {"name": "stg_amazon_ads__profile", "package": null, "version": null}, {"name": "int_amazon_ads__portfolio_history", "package": null, "version": null}, {"name": "stg_amazon_ads__campaign_history", "package": null, "version": null}, {"name": "stg_amazon_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_amazon_ads__keyword_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.amazon_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report", "model.amazon_ads.stg_amazon_ads__profile", "model.amazon_ads.int_amazon_ads__portfolio_history", "model.amazon_ads.stg_amazon_ads__campaign_history", "model.amazon_ads.stg_amazon_ads__ad_group_history", "model.amazon_ads.stg_amazon_ads__keyword_history"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads__search_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__search_term_ad_keyword_report\"\n), \n\naccount_info as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__profile\"\n where _fivetran_deleted = False\n),\n\nportfolios as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"int_amazon_ads__portfolio_history\"\n), \n\ncampaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\nad_groups as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\nkeywords as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__keyword_history\"\n where is_most_recent_record = True\n), \n\nfields as (\n select\n report.source_relation,\n report.date_day,\n account_info.account_name,\n account_info.account_id,\n account_info.country_code,\n account_info.profile_id,\n portfolios.portfolio_name,\n portfolios.portfolio_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n report.keyword_id,\n keywords.keyword_text,\n keywords.match_type,\n keywords.serving_status,\n keywords.state,\n report.search_term,\n report.targeting,\n sum(report.cost) as cost,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.purchases_30_d) as purchases_30_d,\n sum(report.sales_30_d) as sales_30_d\n\n \n\n\n\n \n\n from report\n\n left join keywords\n on keywords.keyword_id = report.keyword_id\n and keywords.source_relation = report.source_relation\n left join ad_groups\n on ad_groups.ad_group_id = report.ad_group_id\n and ad_groups.source_relation = report.source_relation\n left join campaigns\n on campaigns.campaign_id = report.campaign_id\n and campaigns.source_relation = report.source_relation\n left join portfolios\n on portfolios.portfolio_id = campaigns.portfolio_id\n and portfolios.source_relation = campaigns.source_relation\n left join account_info\n on account_info.profile_id = campaigns.profile_id\n and account_info.source_relation = campaigns.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.amazon_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "amazon_ads__campaign_report", "resource_type": "model", "package_name": "amazon_ads", "path": "amazon_ads__campaign_report.sql", "original_file_path": "models/amazon_ads__campaign_report.sql", "unique_id": "model.amazon_ads.amazon_ads__campaign_report", "fqn": ["amazon_ads", "amazon_ads__campaign_report"], "alias": "amazon_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "8cefb303901e71edf27b9931b7ad848e32d449dc97aebb7680f5f188a00028c1"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance at the campaign level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "account_id": {"name": "account_id", "description": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_id"]}, "account_name": {"name": "account_name", "description": "Account Name. Not currently populated for sellers.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_name"]}, "campaign_bidding_strategy": {"name": "campaign_bidding_strategy", "description": "The bidding strategy associated with a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_bidding_strategy"]}, "campaign_budget_amount": {"name": "campaign_budget_amount", "description": "Total budget allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_amount"]}, "campaign_budget_currency_code": {"name": "campaign_budget_currency_code", "description": "The currency code associated with the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_currency_code"]}, "campaign_budget_type": {"name": "campaign_budget_type", "description": "One of: daily or lifetime.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_type"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_name"]}, "country_code": {"name": "country_code", "description": "The code for a given country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.country_code"]}, "portfolio_id": {"name": "portfolio_id", "description": "The ID of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_id"]}, "portfolio_name": {"name": "portfolio_name", "description": "The name of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_name"]}, "profile_id": {"name": "profile_id", "description": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.profile_id"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.8875754, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith report as (\n select *\n from {{ ref('stg_amazon_ads__campaign_level_report') }}\n), \n\naccount_info as (\n select *\n from {{ ref('stg_amazon_ads__profile') }}\n where _fivetran_deleted = False\n),\n\nportfolios as (\n select *\n from {{ ref('int_amazon_ads__portfolio_history') }}\n), \n\ncampaigns as (\n select *\n from {{ ref('stg_amazon_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\nfields as (\n select\n report.source_relation,\n report.date_day,\n account_info.account_name,\n account_info.account_id,\n account_info.country_code,\n account_info.profile_id,\n portfolios.portfolio_name,\n portfolios.portfolio_id,\n campaigns.campaign_name,\n report.campaign_id,\n report.campaign_bidding_strategy,\n report.campaign_budget_amount,\n report.campaign_budget_currency_code,\n report.campaign_budget_type,\n sum(report.cost) as cost,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.purchases_30_d) as purchases_30_d,\n sum(report.sales_30_d) as sales_30_d\n\n {{ amazon_ads_persist_pass_through_columns(pass_through_variable='amazon_ads__campaign_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0, exclude_fields=['purchases_30_d','sales_30_d']) }} \n\n from report\n\n left join campaigns\n on campaigns.campaign_id = report.campaign_id\n and campaigns.source_relation = report.source_relation\n left join portfolios\n on portfolios.portfolio_id = campaigns.portfolio_id\n and portfolios.source_relation = campaigns.source_relation \n left join account_info\n on account_info.profile_id = campaigns.profile_id\n and account_info.source_relation = campaigns.source_relation \n\n {{ dbt_utils.group_by(14) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__campaign_level_report", "package": null, "version": null}, {"name": "stg_amazon_ads__profile", "package": null, "version": null}, {"name": "int_amazon_ads__portfolio_history", "package": null, "version": null}, {"name": "stg_amazon_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.amazon_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.amazon_ads.stg_amazon_ads__campaign_level_report", "model.amazon_ads.stg_amazon_ads__profile", "model.amazon_ads.int_amazon_ads__portfolio_history", "model.amazon_ads.stg_amazon_ads__campaign_history"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_level_report\"\n), \n\naccount_info as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__profile\"\n where _fivetran_deleted = False\n),\n\nportfolios as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"int_amazon_ads__portfolio_history\"\n), \n\ncampaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\nfields as (\n select\n report.source_relation,\n report.date_day,\n account_info.account_name,\n account_info.account_id,\n account_info.country_code,\n account_info.profile_id,\n portfolios.portfolio_name,\n portfolios.portfolio_id,\n campaigns.campaign_name,\n report.campaign_id,\n report.campaign_bidding_strategy,\n report.campaign_budget_amount,\n report.campaign_budget_currency_code,\n report.campaign_budget_type,\n sum(report.cost) as cost,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.purchases_30_d) as purchases_30_d,\n sum(report.sales_30_d) as sales_30_d\n\n \n\n\n\n \n\n from report\n\n left join campaigns\n on campaigns.campaign_id = report.campaign_id\n and campaigns.source_relation = report.source_relation\n left join portfolios\n on portfolios.portfolio_id = campaigns.portfolio_id\n and portfolios.source_relation = campaigns.source_relation \n left join account_info\n on account_info.profile_id = campaigns.profile_id\n and account_info.source_relation = campaigns.source_relation \n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.amazon_ads__account_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "amazon_ads__account_report", "resource_type": "model", "package_name": "amazon_ads", "path": "amazon_ads__account_report.sql", "original_file_path": "models/amazon_ads__account_report.sql", "unique_id": "model.amazon_ads.amazon_ads__account_report", "fqn": ["amazon_ads", "amazon_ads__account_report"], "alias": "amazon_ads__account_report", "checksum": {"name": "sha256", "checksum": "16944b494db996760584a557ee19f44fe4e36519eff8d47eb094534675110baa"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance at the account level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "profile_id": {"name": "profile_id", "description": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.profile_id"]}, "account_id": {"name": "account_id", "description": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_id"]}, "account_name": {"name": "account_name", "description": "Account Name. Not currently populated for sellers.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_name"]}, "country_code": {"name": "country_code", "description": "The code for a given country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.country_code"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.879717, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__account_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith report as (\n select *\n --use campaign report since account report not provided\n from {{ ref('stg_amazon_ads__campaign_level_report') }}\n), \n\naccount_info as (\n select *\n from {{ ref('stg_amazon_ads__profile') }}\n where _fivetran_deleted = False\n),\n\ncampaigns as (\n select *\n from {{ ref('stg_amazon_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\nfields as (\n select\n report.source_relation,\n report.date_day,\n account_info.account_name,\n account_info.account_id,\n account_info.country_code,\n account_info.profile_id,\n sum(report.cost) as cost,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.purchases_30_d) as purchases_30_d,\n sum(report.sales_30_d) as sales_30_d\n\n {{ amazon_ads_persist_pass_through_columns(pass_through_variable='amazon_ads__campaign_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0, exclude_fields=['purchases_30_d','sales_30_d']) }}\n\n from report\n\n left join campaigns\n on campaigns.campaign_id = report.campaign_id\n and campaigns.source_relation = report.source_relation\n left join account_info\n on account_info.profile_id = campaigns.profile_id\n and account_info.source_relation = campaigns.source_relation\n \n\n {{ dbt_utils.group_by(6) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__campaign_level_report", "package": null, "version": null}, {"name": "stg_amazon_ads__profile", "package": null, "version": null}, {"name": "stg_amazon_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.amazon_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.amazon_ads.stg_amazon_ads__campaign_level_report", "model.amazon_ads.stg_amazon_ads__profile", "model.amazon_ads.stg_amazon_ads__campaign_history"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads__account_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n select *\n --use campaign report since account report not provided\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_level_report\"\n), \n\naccount_info as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__profile\"\n where _fivetran_deleted = False\n),\n\ncampaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\nfields as (\n select\n report.source_relation,\n report.date_day,\n account_info.account_name,\n account_info.account_id,\n account_info.country_code,\n account_info.profile_id,\n sum(report.cost) as cost,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.purchases_30_d) as purchases_30_d,\n sum(report.sales_30_d) as sales_30_d\n\n \n\n\n\n\n\n from report\n\n left join campaigns\n on campaigns.campaign_id = report.campaign_id\n and campaigns.source_relation = report.source_relation\n left join account_info\n on account_info.profile_id = campaigns.profile_id\n and account_info.source_relation = campaigns.source_relation\n \n\n group by 1,2,3,4,5,6\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.amazon_ads__portfolio_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "amazon_ads__portfolio_report", "resource_type": "model", "package_name": "amazon_ads", "path": "amazon_ads__portfolio_report.sql", "original_file_path": "models/amazon_ads__portfolio_report.sql", "unique_id": "model.amazon_ads.amazon_ads__portfolio_report", "fqn": ["amazon_ads", "amazon_ads__portfolio_report"], "alias": "amazon_ads__portfolio_report", "checksum": {"name": "sha256", "checksum": "b8c9f790249199a351760b8cf17cc8c9da33684a1b3b62f08e94c2145a6a8dcb"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance at the portfolio level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "account_id": {"name": "account_id", "description": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_id"]}, "account_name": {"name": "account_name", "description": "Account Name. Not currently populated for sellers.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_name"]}, "budget_amount": {"name": "budget_amount", "description": "The budget amount associated with the portfolio. Cannot be null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_currency_code": {"name": "budget_currency_code", "description": "The currency used for all monetary values for entities under this profile. Cannot be null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_end_date": {"name": "budget_end_date", "description": "The end date after which the budget is no longer applied. Optional if policy is set to dateRange or monthlyRecurring.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_start_date": {"name": "budget_start_date", "description": "The starting date in YYYYMMDD format to which the budget is applied. Required if policy is set to dateRange. Not specified if policy is set to monthlyRecurring. Note that the starting date for monthlyRecurring is the date when the policy is set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_policy": {"name": "budget_policy", "description": "The budget policy. Set to dateRange to specify a budget for a specific period of time. Set to monthlyRecurring to specify a budget that is automatically renewed at the beginning of each month. Cannot be null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country_code": {"name": "country_code", "description": "The code for a given country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.country_code"]}, "in_budget": {"name": "in_budget", "description": "Indicates the current budget status of the portfolio. Set to true if the portfolio is in budget, set to false if the portfolio is out of budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "portfolio_id": {"name": "portfolio_id", "description": "The ID of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_id"]}, "portfolio_name": {"name": "portfolio_name", "description": "The name of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_name"]}, "profile_id": {"name": "profile_id", "description": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.profile_id"]}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.891039, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__portfolio_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__amazon_ads_enabled','amazon_ads__portfolio_history_enabled'])) }}\n\nwith report as (\n select *\n --use campaign report since portfolio report not provided\n from {{ ref('stg_amazon_ads__campaign_level_report') }}\n), \n\naccount_info as (\n select *\n from {{ ref('stg_amazon_ads__profile') }}\n where _fivetran_deleted = False\n),\n\nportfolios as (\n select *\n from {{ ref('stg_amazon_ads__portfolio_history') }}\n where is_most_recent_record = True\n), \n\ncampaigns as (\n select *\n from {{ ref('stg_amazon_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\nfields as (\n select\n report.source_relation,\n report.date_day,\n account_info.account_name,\n account_info.account_id,\n account_info.country_code,\n account_info.profile_id,\n portfolios.portfolio_name,\n portfolios.portfolio_id,\n portfolios.budget_amount,\n portfolios.budget_currency_code,\n portfolios.budget_start_date,\n portfolios.budget_end_date,\n portfolios.budget_policy,\n portfolios.in_budget,\n portfolios.serving_status,\n portfolios.state,\n sum(report.cost) as cost,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.purchases_30_d) as purchases_30_d,\n sum(report.sales_30_d) as sales_30_d\n\n {{ amazon_ads_persist_pass_through_columns(pass_through_variable='amazon_ads__campaign_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0, exclude_fields=['purchases_30_d','sales_30_d']) }} \n\n from portfolios\n\n left join campaigns\n on campaigns.portfolio_id = portfolios.portfolio_id\n and campaigns.source_relation = portfolios.source_relation\n left join account_info\n on account_info.profile_id = campaigns.profile_id\n and account_info.source_relation = campaigns.source_relation\n left join report\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n\n {{ dbt_utils.group_by(16) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__campaign_level_report", "package": null, "version": null}, {"name": "stg_amazon_ads__profile", "package": null, "version": null}, {"name": "stg_amazon_ads__portfolio_history", "package": null, "version": null}, {"name": "stg_amazon_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.amazon_ads.amazon_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.amazon_ads.stg_amazon_ads__campaign_level_report", "model.amazon_ads.stg_amazon_ads__profile", "model.amazon_ads.stg_amazon_ads__portfolio_history", "model.amazon_ads.stg_amazon_ads__campaign_history"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads__portfolio_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n select *\n --use campaign report since portfolio report not provided\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_level_report\"\n), \n\naccount_info as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__profile\"\n where _fivetran_deleted = False\n),\n\nportfolios as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__portfolio_history\"\n where is_most_recent_record = True\n), \n\ncampaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\nfields as (\n select\n report.source_relation,\n report.date_day,\n account_info.account_name,\n account_info.account_id,\n account_info.country_code,\n account_info.profile_id,\n portfolios.portfolio_name,\n portfolios.portfolio_id,\n portfolios.budget_amount,\n portfolios.budget_currency_code,\n portfolios.budget_start_date,\n portfolios.budget_end_date,\n portfolios.budget_policy,\n portfolios.in_budget,\n portfolios.serving_status,\n portfolios.state,\n sum(report.cost) as cost,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.purchases_30_d) as purchases_30_d,\n sum(report.sales_30_d) as sales_30_d\n\n \n\n\n\n \n\n from portfolios\n\n left join campaigns\n on campaigns.portfolio_id = portfolios.portfolio_id\n and campaigns.source_relation = portfolios.source_relation\n left join account_info\n on account_info.profile_id = campaigns.profile_id\n and account_info.source_relation = campaigns.source_relation\n left join report\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.amazon_ads__keyword_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "amazon_ads__keyword_report", "resource_type": "model", "package_name": "amazon_ads", "path": "amazon_ads__keyword_report.sql", "original_file_path": "models/amazon_ads__keyword_report.sql", "unique_id": "model.amazon_ads.amazon_ads__keyword_report", "fqn": ["amazon_ads", "amazon_ads__keyword_report"], "alias": "amazon_ads__keyword_report", "checksum": {"name": "sha256", "checksum": "53370ecd41c5a7917f7f5af699bcdf8725207b0ffd65ba90cbc8e2a823b1592b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance at the keyword level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "account_id": {"name": "account_id", "description": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_id"]}, "account_name": {"name": "account_name", "description": "Account Name. Not currently populated for sellers.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_name"]}, "country_code": {"name": "country_code", "description": "The code for a given country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.country_code"]}, "keyword_bid": {"name": "keyword_bid", "description": "Bid associated with a keyword or targeting expression.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_bid"]}, "keyword_id": {"name": "keyword_id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_id"]}, "keyword_text": {"name": "keyword_text", "description": "The exact text for the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_text"]}, "keyword_type": {"name": "keyword_type", "description": "Type of matching for the keyword used in bid. One of: BROAD, PHRASE, or EXACT.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_type"]}, "match_type": {"name": "match_type", "description": "Type of matching for the keyword used in bid. One of: BROAD, PHRASE, or EXACT.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.match_type"]}, "portfolio_id": {"name": "portfolio_id", "description": "The ID of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_id"]}, "portfolio_name": {"name": "portfolio_name", "description": "The name of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_name"]}, "profile_id": {"name": "profile_id", "description": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.profile_id"]}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.8933597, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__keyword_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith report as (\n select *\n from {{ ref('stg_amazon_ads__targeting_keyword_report') }}\n), \n\naccount_info as (\n select *\n from {{ ref('stg_amazon_ads__profile') }}\n where _fivetran_deleted = False\n),\n\nportfolios as (\n select *\n from {{ ref('int_amazon_ads__portfolio_history') }}\n), \n\ncampaigns as (\n select *\n from {{ ref('stg_amazon_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\nad_groups as (\n select *\n from {{ ref('stg_amazon_ads__ad_group_history') }}\n where is_most_recent_record = True\n), \n\nkeywords as (\n select *\n from {{ ref('stg_amazon_ads__keyword_history') }}\n where is_most_recent_record = True\n), \n\nfields as (\n select\n report.source_relation,\n report.date_day,\n account_info.account_name,\n account_info.account_id,\n account_info.country_code,\n account_info.profile_id,\n portfolios.portfolio_name,\n portfolios.portfolio_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n report.keyword_id,\n keywords.keyword_text,\n keywords.serving_status,\n keywords.state,\n report.keyword_bid,\n report.keyword_type,\n report.match_type,\n sum(report.cost) as cost,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.purchases_30_d) as purchases_30_d,\n sum(report.sales_30_d) as sales_30_d\n\n {{ amazon_ads_persist_pass_through_columns(pass_through_variable='amazon_ads__targeting_keyword_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0, exclude_fields=['purchases_30_d','sales_30_d']) }}\n\n from report\n\n left join keywords\n on keywords.keyword_id = report.keyword_id\n and keywords.source_relation = report.source_relation\n left join ad_groups\n on ad_groups.ad_group_id = report.ad_group_id\n and ad_groups.source_relation = report.source_relation\n left join campaigns\n on campaigns.campaign_id = report.campaign_id\n and campaigns.source_relation = report.source_relation\n left join portfolios\n on portfolios.portfolio_id = campaigns.portfolio_id\n and portfolios.source_relation = campaigns.source_relation\n left join account_info\n on account_info.profile_id = campaigns.profile_id\n and account_info.source_relation = campaigns.source_relation\n\n {{ dbt_utils.group_by(19) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__targeting_keyword_report", "package": null, "version": null}, {"name": "stg_amazon_ads__profile", "package": null, "version": null}, {"name": "int_amazon_ads__portfolio_history", "package": null, "version": null}, {"name": "stg_amazon_ads__campaign_history", "package": null, "version": null}, {"name": "stg_amazon_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_amazon_ads__keyword_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.amazon_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.amazon_ads.stg_amazon_ads__targeting_keyword_report", "model.amazon_ads.stg_amazon_ads__profile", "model.amazon_ads.int_amazon_ads__portfolio_history", "model.amazon_ads.stg_amazon_ads__campaign_history", "model.amazon_ads.stg_amazon_ads__ad_group_history", "model.amazon_ads.stg_amazon_ads__keyword_history"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads__keyword_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__targeting_keyword_report\"\n), \n\naccount_info as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__profile\"\n where _fivetran_deleted = False\n),\n\nportfolios as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"int_amazon_ads__portfolio_history\"\n), \n\ncampaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\nad_groups as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\nkeywords as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__keyword_history\"\n where is_most_recent_record = True\n), \n\nfields as (\n select\n report.source_relation,\n report.date_day,\n account_info.account_name,\n account_info.account_id,\n account_info.country_code,\n account_info.profile_id,\n portfolios.portfolio_name,\n portfolios.portfolio_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n report.keyword_id,\n keywords.keyword_text,\n keywords.serving_status,\n keywords.state,\n report.keyword_bid,\n report.keyword_type,\n report.match_type,\n sum(report.cost) as cost,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.purchases_30_d) as purchases_30_d,\n sum(report.sales_30_d) as sales_30_d\n\n \n\n\n\n\n\n from report\n\n left join keywords\n on keywords.keyword_id = report.keyword_id\n and keywords.source_relation = report.source_relation\n left join ad_groups\n on ad_groups.ad_group_id = report.ad_group_id\n and ad_groups.source_relation = report.source_relation\n left join campaigns\n on campaigns.campaign_id = report.campaign_id\n and campaigns.source_relation = report.source_relation\n left join portfolios\n on portfolios.portfolio_id = campaigns.portfolio_id\n and portfolios.source_relation = campaigns.source_relation\n left join account_info\n on account_info.profile_id = campaigns.profile_id\n and account_info.source_relation = campaigns.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.amazon_ads__ad_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "amazon_ads__ad_report", "resource_type": "model", "package_name": "amazon_ads", "path": "amazon_ads__ad_report.sql", "original_file_path": "models/amazon_ads__ad_report.sql", "unique_id": "model.amazon_ads.amazon_ads__ad_report", "fqn": ["amazon_ads", "amazon_ads__ad_report"], "alias": "amazon_ads__ad_report", "checksum": {"name": "sha256", "checksum": "5cf0c8bdc9ab5aa8e9a2dace8324fe415dcb7aba8a5773fc2e31b89f193e8140"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance at the ad level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "account_id": {"name": "account_id", "description": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_id"]}, "account_name": {"name": "account_name", "description": "Account Name. Not currently populated for sellers.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_name"]}, "ad_id": {"name": "ad_id", "description": "The ID of the Ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_name"]}, "country_code": {"name": "country_code", "description": "The code for a given country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.country_code"]}, "portfolio_id": {"name": "portfolio_id", "description": "The ID of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_id"]}, "portfolio_name": {"name": "portfolio_name", "description": "The name of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_name"]}, "profile_id": {"name": "profile_id", "description": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.profile_id"]}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}, "advertised_asin": {"name": "advertised_asin", "description": "The ASIN associated to an advertised product.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.advertised_asin"]}, "advertised_sku": {"name": "advertised_sku", "description": "The SKU being advertised.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.advertised_sku"]}, "campaign_budget_amount": {"name": "campaign_budget_amount", "description": "Total budget allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_amount"]}, "campaign_budget_currency_code": {"name": "campaign_budget_currency_code", "description": "The currency code associated with the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_currency_code"]}, "campaign_budget_type": {"name": "campaign_budget_type", "description": "One of: daily or lifetime.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_type"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.8860993, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__ad_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith report as (\n select *\n from {{ ref('stg_amazon_ads__advertised_product_report') }}\n), \n\naccount_info as (\n select *\n from {{ ref('stg_amazon_ads__profile') }}\n where _fivetran_deleted = False\n),\n\nportfolios as (\n select *\n from {{ ref('int_amazon_ads__portfolio_history') }}\n), \n\ncampaigns as (\n select *\n from {{ ref('stg_amazon_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\nad_groups as (\n select *\n from {{ ref('stg_amazon_ads__ad_group_history') }}\n where is_most_recent_record = True\n), \n\nads as (\n select *\n from {{ ref('stg_amazon_ads__product_ad_history') }}\n where is_most_recent_record = True\n),\n\nfields as (\n select\n report.source_relation,\n report.date_day,\n account_info.account_name,\n account_info.account_id,\n account_info.country_code,\n account_info.profile_id,\n portfolios.portfolio_name,\n portfolios.portfolio_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n report.ad_id,\n ads.serving_status,\n ads.state,\n report.advertised_asin,\n report.advertised_sku,\n report.campaign_budget_amount,\n report.campaign_budget_currency_code,\n report.campaign_budget_type,\n sum(report.cost) as cost,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.purchases_30_d) as purchases_30_d,\n sum(report.sales_30_d) as sales_30_d\n\n {{ amazon_ads_persist_pass_through_columns(pass_through_variable='amazon_ads__advertised_product_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0, exclude_fields=['purchases_30_d','sales_30_d']) }}\n\n from report\n \n left join ads\n on ads.ad_id = report.ad_id\n and ads.source_relation = report.source_relation\n left join ad_groups\n on ad_groups.ad_group_id = report.ad_group_id\n and ad_groups.source_relation = report.source_relation\n left join campaigns\n on campaigns.campaign_id = report.campaign_id\n and campaigns.source_relation = report.source_relation\n left join portfolios\n on portfolios.portfolio_id = campaigns.portfolio_id\n and portfolios.source_relation = campaigns.source_relation \n left join account_info\n on account_info.profile_id = campaigns.profile_id\n and account_info.source_relation = campaigns.source_relation \n\n {{ dbt_utils.group_by(20) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__advertised_product_report", "package": null, "version": null}, {"name": "stg_amazon_ads__profile", "package": null, "version": null}, {"name": "int_amazon_ads__portfolio_history", "package": null, "version": null}, {"name": "stg_amazon_ads__campaign_history", "package": null, "version": null}, {"name": "stg_amazon_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_amazon_ads__product_ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.amazon_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.amazon_ads.stg_amazon_ads__advertised_product_report", "model.amazon_ads.stg_amazon_ads__profile", "model.amazon_ads.int_amazon_ads__portfolio_history", "model.amazon_ads.stg_amazon_ads__campaign_history", "model.amazon_ads.stg_amazon_ads__ad_group_history", "model.amazon_ads.stg_amazon_ads__product_ad_history"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads__ad_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__advertised_product_report\"\n), \n\naccount_info as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__profile\"\n where _fivetran_deleted = False\n),\n\nportfolios as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"int_amazon_ads__portfolio_history\"\n), \n\ncampaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\nad_groups as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\nads as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__product_ad_history\"\n where is_most_recent_record = True\n),\n\nfields as (\n select\n report.source_relation,\n report.date_day,\n account_info.account_name,\n account_info.account_id,\n account_info.country_code,\n account_info.profile_id,\n portfolios.portfolio_name,\n portfolios.portfolio_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n report.ad_id,\n ads.serving_status,\n ads.state,\n report.advertised_asin,\n report.advertised_sku,\n report.campaign_budget_amount,\n report.campaign_budget_currency_code,\n report.campaign_budget_type,\n sum(report.cost) as cost,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.purchases_30_d) as purchases_30_d,\n sum(report.sales_30_d) as sales_30_d\n\n \n\n\n\n\n\n from report\n \n left join ads\n on ads.ad_id = report.ad_id\n and ads.source_relation = report.source_relation\n left join ad_groups\n on ad_groups.ad_group_id = report.ad_group_id\n and ad_groups.source_relation = report.source_relation\n left join campaigns\n on campaigns.campaign_id = report.campaign_id\n and campaigns.source_relation = report.source_relation\n left join portfolios\n on portfolios.portfolio_id = campaigns.portfolio_id\n and portfolios.source_relation = campaigns.source_relation \n left join account_info\n on account_info.profile_id = campaigns.profile_id\n and account_info.source_relation = campaigns.source_relation \n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.amazon_ads__ad_group_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "amazon_ads__ad_group_report", "resource_type": "model", "package_name": "amazon_ads", "path": "amazon_ads__ad_group_report.sql", "original_file_path": "models/amazon_ads__ad_group_report.sql", "unique_id": "model.amazon_ads.amazon_ads__ad_group_report", "fqn": ["amazon_ads", "amazon_ads__ad_group_report"], "alias": "amazon_ads__ad_group_report", "checksum": {"name": "sha256", "checksum": "649bd5784a32bba8e64559e8c9f3fc603ad7414e801781ffc2115e24aa84ca8a"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance at the ad group level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "account_id": {"name": "account_id", "description": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_id"]}, "account_name": {"name": "account_name", "description": "Account Name. Not currently populated for sellers.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_name"]}, "campaign_bidding_strategy": {"name": "campaign_bidding_strategy", "description": "The bidding strategy associated with a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_bidding_strategy"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_name"]}, "country_code": {"name": "country_code", "description": "The code for a given country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.country_code"]}, "default_bid": {"name": "default_bid", "description": "The date of creation of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.default_bid"]}, "portfolio_id": {"name": "portfolio_id", "description": "The ID of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_id"]}, "portfolio_name": {"name": "portfolio_name", "description": "The name of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_name"]}, "profile_id": {"name": "profile_id", "description": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.profile_id"]}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.8828301, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__ad_group_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith report as (\n select *\n from {{ ref('stg_amazon_ads__ad_group_level_report') }}\n), \n\naccount_info as (\n select *\n from {{ ref('stg_amazon_ads__profile') }}\n where _fivetran_deleted = False\n),\n\nportfolios as (\n select *\n from {{ ref('int_amazon_ads__portfolio_history') }}\n), \n\ncampaigns as (\n select *\n from {{ ref('stg_amazon_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\nad_groups as (\n select *\n from {{ ref('stg_amazon_ads__ad_group_history') }}\n where is_most_recent_record = True\n), \n\nfields as (\n select\n report.source_relation,\n report.date_day,\n account_info.account_name,\n account_info.account_id,\n account_info.country_code,\n account_info.profile_id,\n portfolios.portfolio_name,\n portfolios.portfolio_id,\n campaigns.campaign_name,\n campaigns.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n ad_groups.serving_status,\n ad_groups.state,\n ad_groups.default_bid,\n report.campaign_bidding_strategy,\n sum(report.cost) as cost,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.purchases_30_d) as purchases_30_d,\n sum(report.sales_30_d) as sales_30_d\n\n {{ amazon_ads_persist_pass_through_columns(pass_through_variable='amazon_ads__ad_group_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0, exclude_fields=['purchases_30_d','sales_30_d']) }}\n\n from report\n\n left join ad_groups\n on ad_groups.ad_group_id = report.ad_group_id\n and ad_groups.source_relation = report.source_relation\n left join campaigns\n on campaigns.campaign_id = ad_groups.campaign_id\n and campaigns.source_relation = ad_groups.source_relation\n left join portfolios\n on portfolios.portfolio_id = campaigns.portfolio_id\n and portfolios.source_relation = campaigns.source_relation\n left join account_info\n on account_info.profile_id = campaigns.profile_id\n and account_info.source_relation = campaigns.source_relation\n\n {{ dbt_utils.group_by(16) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__ad_group_level_report", "package": null, "version": null}, {"name": "stg_amazon_ads__profile", "package": null, "version": null}, {"name": "int_amazon_ads__portfolio_history", "package": null, "version": null}, {"name": "stg_amazon_ads__campaign_history", "package": null, "version": null}, {"name": "stg_amazon_ads__ad_group_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.amazon_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.amazon_ads.stg_amazon_ads__ad_group_level_report", "model.amazon_ads.stg_amazon_ads__profile", "model.amazon_ads.int_amazon_ads__portfolio_history", "model.amazon_ads.stg_amazon_ads__campaign_history", "model.amazon_ads.stg_amazon_ads__ad_group_history"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads__ad_group_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__ad_group_level_report\"\n), \n\naccount_info as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__profile\"\n where _fivetran_deleted = False\n),\n\nportfolios as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"int_amazon_ads__portfolio_history\"\n), \n\ncampaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\nad_groups as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\nfields as (\n select\n report.source_relation,\n report.date_day,\n account_info.account_name,\n account_info.account_id,\n account_info.country_code,\n account_info.profile_id,\n portfolios.portfolio_name,\n portfolios.portfolio_id,\n campaigns.campaign_name,\n campaigns.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n ad_groups.serving_status,\n ad_groups.state,\n ad_groups.default_bid,\n report.campaign_bidding_strategy,\n sum(report.cost) as cost,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.purchases_30_d) as purchases_30_d,\n sum(report.sales_30_d) as sales_30_d\n\n \n\n\n\n\n\n from report\n\n left join ad_groups\n on ad_groups.ad_group_id = report.ad_group_id\n and ad_groups.source_relation = report.source_relation\n left join campaigns\n on campaigns.campaign_id = ad_groups.campaign_id\n and campaigns.source_relation = ad_groups.source_relation\n left join portfolios\n on portfolios.portfolio_id = campaigns.portfolio_id\n and portfolios.source_relation = campaigns.source_relation\n left join account_info\n on account_info.profile_id = campaigns.profile_id\n and account_info.source_relation = campaigns.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__search_term_ad_keyword_report", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/stg_amazon_ads__search_term_ad_keyword_report.sql", "original_file_path": "models/staging/stg_amazon_ads__search_term_ad_keyword_report.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report", "fqn": ["amazon_ads", "staging", "stg_amazon_ads__search_term_ad_keyword_report"], "alias": "stg_amazon_ads__search_term_ad_keyword_report", "checksum": {"name": "sha256", "checksum": "922833dd61ab4d70f5f8e8d2a929b3634b644b4012c7a8b4cd4a75ecab1598cc"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Search term reports contain search term performance metrics broken down by targeting expressions and keywords.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "ad_keyword_status": {"name": "ad_keyword_status", "description": "Current status of a keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_keyword_status"]}, "campaign_budget_amount": {"name": "campaign_budget_amount", "description": "Total budget allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_amount"]}, "campaign_budget_currency_code": {"name": "campaign_budget_currency_code", "description": "The currency code associated with the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_currency_code"]}, "campaign_budget_type": {"name": "campaign_budget_type", "description": "One of: daily or lifetime.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_type"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "keyword_bid": {"name": "keyword_bid", "description": "Bid associated with a keyword or targeting expression.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_bid"]}, "keyword_id": {"name": "keyword_id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_id"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "search_term": {"name": "search_term", "description": "The search term used by the customer.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.search_term"]}, "targeting": {"name": "targeting", "description": "A string representation of the expression object used in the targeting clause.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.targeting"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/staging/stg_amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.9560862, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__search_term_ad_keyword_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_amazon_ads__search_term_ad_keyword_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_amazon_ads__search_term_ad_keyword_report_tmp')),\n staging_columns=get_search_term_ad_keyword_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='amazon_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id,\n ad_keyword_status,\n campaign_budget_amount,\n campaign_budget_currency_code,\n campaign_budget_type,\n cast(campaign_id as {{ dbt.type_string() }}) as campaign_id,\n clicks,\n cost,\n date as date_day,\n impressions,\n keyword_bid,\n cast(keyword_id as {{ dbt.type_string() }}) as keyword_id,\n search_term,\n targeting,\n purchases_30_d,\n sales_30_d\n\n {{ amazon_ads_fill_pass_through_columns(pass_through_fields=var('amazon_ads__search_term_ad_keyword_passthrough_metrics'), except=['purchases_30_d', 'sales_30_d']) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__search_term_ad_keyword_report_tmp", "package": null, "version": null}, {"name": "stg_amazon_ads__search_term_ad_keyword_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.get_search_term_ad_keyword_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.amazon_ads.amazon_ads_fill_pass_through_columns"], "nodes": ["model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report_tmp"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads__search_term_ad_keyword_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__search_term_ad_keyword_report_tmp\"\n),\n\nfields as (\n\n select\n \n ad_group_id as ad_group_id,\n cast(null as TEXT) as ad_keyword_status,\n campaign_budget_amount as campaign_budget_amount,\n campaign_budget_currency_code as campaign_budget_currency_code,\n campaign_budget_type as campaign_budget_type,\n campaign_id as campaign_id,\n clicks as clicks,\n cost as cost,\n date as date,\n impressions as impressions,\n keyword_bid as keyword_bid,\n keyword_id as keyword_id,\n search_term as search_term,\n targeting as targeting,\n cast(null as integer) as purchases_30_d,\n cast(null as float) as sales_30_d\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(ad_group_id as TEXT) as ad_group_id,\n ad_keyword_status,\n campaign_budget_amount,\n campaign_budget_currency_code,\n campaign_budget_type,\n cast(campaign_id as TEXT) as campaign_id,\n clicks,\n cost,\n date as date_day,\n impressions,\n keyword_bid,\n cast(keyword_id as TEXT) as keyword_id,\n search_term,\n targeting,\n purchases_30_d,\n sales_30_d\n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__ad_group_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__ad_group_history", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/stg_amazon_ads__ad_group_history.sql", "original_file_path": "models/staging/stg_amazon_ads__ad_group_history.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__ad_group_history", "fqn": ["amazon_ads", "staging", "stg_amazon_ads__ad_group_history"], "alias": "stg_amazon_ads__ad_group_history", "checksum": {"name": "sha256", "checksum": "b92358cdcbadfa3bf07c1f629c5ecb046ce3bd72c9ed6b12ae5fda63ef71837b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents an ad group in Amazon Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "creation_date": {"name": "creation_date", "description": "The date of creation of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.creation_date"]}, "default_bid": {"name": "default_bid", "description": "The date of creation of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.default_bid"]}, "last_updated_date": {"name": "last_updated_date", "description": "Date of last update to record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.last_updated_date"]}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean indicating whether record was the most recent instance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/staging/stg_amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.9435456, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__ad_group_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_amazon_ads__ad_group_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_amazon_ads__ad_group_history_tmp')),\n staging_columns=get_ad_group_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='amazon_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as {{ dbt.type_string() }}) as ad_group_id,\n cast(campaign_id as {{ dbt.type_string() }}) as campaign_id,\n creation_date,\n default_bid,\n last_updated_date,\n name as ad_group_name,\n serving_status,\n state,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='amazon_ads') }} order by last_updated_date desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__ad_group_history_tmp", "package": null, "version": null}, {"name": "stg_amazon_ads__ad_group_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.get_ad_group_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.amazon_ads.stg_amazon_ads__ad_group_history_tmp"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads__ad_group_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__ad_group_history_tmp\"\n),\n\nfields as (\n\n select\n \n campaign_id as campaign_id,\n creation_date as creation_date,\n default_bid as default_bid,\n id as id,\n last_updated_date as last_updated_date,\n name as name,\n serving_status as serving_status,\n state as state\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as TEXT) as ad_group_id,\n cast(campaign_id as TEXT) as campaign_id,\n creation_date,\n default_bid,\n last_updated_date,\n name as ad_group_name,\n serving_status,\n state,\n row_number() over (partition by id order by last_updated_date desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__portfolio_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__portfolio_history", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/stg_amazon_ads__portfolio_history.sql", "original_file_path": "models/staging/stg_amazon_ads__portfolio_history.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__portfolio_history", "fqn": ["amazon_ads", "staging", "stg_amazon_ads__portfolio_history"], "alias": "stg_amazon_ads__portfolio_history", "checksum": {"name": "sha256", "checksum": "248ef50d2d55f79b8e1c51068bedb82f9a8cac3b550f25c97be6fd979ba9df78"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a portfolio in Amazon Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "portfolio_id": {"name": "portfolio_id", "description": "The ID of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_id"]}, "portfolio_name": {"name": "portfolio_name", "description": "The name of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_name"]}, "last_updated_date": {"name": "last_updated_date", "description": "Date of last update to record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.last_updated_date"]}, "creation_date": {"name": "creation_date", "description": "The date of creation of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.creation_date"]}, "budget_amount": {"name": "budget_amount", "description": "The budget amount associated with the portfolio. Cannot be null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_currency_code": {"name": "budget_currency_code", "description": "The currency used for all monetary values for entities under this profile. Cannot be null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_end_date": {"name": "budget_end_date", "description": "The end date after which the budget is no longer applied. Optional if policy is set to dateRange or monthlyRecurring.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_start_date": {"name": "budget_start_date", "description": "The starting date in YYYYMMDD format to which the budget is applied. Required if policy is set to dateRange. Not specified if policy is set to monthlyRecurring. Note that the starting date for monthlyRecurring is the date when the policy is set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_policy": {"name": "budget_policy", "description": "The budget policy. Set to dateRange to specify a budget for a specific period of time. Set to monthlyRecurring to specify a budget that is automatically renewed at the beginning of each month. Cannot be null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "in_budget": {"name": "in_budget", "description": "Indicates the current budget status of the portfolio. Set to true if the portfolio is in budget, set to false if the portfolio is out of budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_id": {"name": "profile_id", "description": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.profile_id"]}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean indicating whether record was the most recent instance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/staging/stg_amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.951107, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__portfolio_history\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__amazon_ads_enabled','amazon_ads__portfolio_history_enabled'])) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_amazon_ads__portfolio_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_amazon_ads__portfolio_history_tmp')),\n staging_columns=get_portfolio_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='amazon_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as {{ dbt.type_string() }}) as portfolio_id,\n budget_amount,\n budget_currency_code,\n budget_end_date,\n budget_policy,\n budget_start_date,\n creation_date,\n in_budget,\n last_updated_date,\n name as portfolio_name,\n cast(profile_id as {{ dbt.type_string() }}) as profile_id,\n serving_status,\n state,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='amazon_ads') }} order by last_updated_date desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__portfolio_history_tmp", "package": null, "version": null}, {"name": "stg_amazon_ads__portfolio_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.amazon_ads.get_portfolio_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.amazon_ads.stg_amazon_ads__portfolio_history_tmp"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads__portfolio_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__portfolio_history_tmp\"\n),\n\nfields as (\n\n select\n \n budget_amount as budget_amount,\n budget_currency_code as budget_currency_code,\n budget_end_date as budget_end_date,\n budget_policy as budget_policy,\n budget_start_date as budget_start_date,\n creation_date as creation_date,\n id as id,\n in_budget as in_budget,\n last_updated_date as last_updated_date,\n name as name,\n profile_id as profile_id,\n serving_status as serving_status,\n state as state\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as TEXT) as portfolio_id,\n budget_amount,\n budget_currency_code,\n budget_end_date,\n budget_policy,\n budget_start_date,\n creation_date,\n in_budget,\n last_updated_date,\n name as portfolio_name,\n cast(profile_id as TEXT) as profile_id,\n serving_status,\n state,\n row_number() over (partition by id order by last_updated_date desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__campaign_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__campaign_history", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/stg_amazon_ads__campaign_history.sql", "original_file_path": "models/staging/stg_amazon_ads__campaign_history.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__campaign_history", "fqn": ["amazon_ads", "staging", "stg_amazon_ads__campaign_history"], "alias": "stg_amazon_ads__campaign_history", "checksum": {"name": "sha256", "checksum": "5d109847fdd7a54a02a0d0552b20a3a32827842c1f774a355a2a15508035d78e"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a campaign in Amazon Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_name"]}, "creation_date": {"name": "creation_date", "description": "The date of creation of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.creation_date"]}, "last_updated_date": {"name": "last_updated_date", "description": "Date of last update to record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.last_updated_date"]}, "portfolio_id": {"name": "portfolio_id", "description": "The ID of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_id"]}, "bidding_strategy": {"name": "bidding_strategy", "description": "The bidding strategy associated with a campaign (legacyForSales, autoForSales, or manual.)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget": {"name": "budget", "description": "The budget for the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_type": {"name": "budget_type", "description": "One of: daily or lifetime.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_type"]}, "effective_budget": {"name": "effective_budget", "description": "Adjusted budget for the campaign that has been impacted by a budget rule.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_date": {"name": "end_date", "description": "The end date of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_id": {"name": "profile_id", "description": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.profile_id"]}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "start_date": {"name": "start_date", "description": "The start date of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}, "targeting_type": {"name": "targeting_type", "description": "The type of targeting used for the campaign, either manual or auto.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean indicating whether record was the most recent instance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/staging/stg_amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.9473846, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_amazon_ads__campaign_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_amazon_ads__campaign_history_tmp')),\n staging_columns=get_campaign_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='amazon_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as {{ dbt.type_string() }}) as campaign_id,\n last_updated_date,\n bidding_strategy,\n creation_date,\n end_date,\n name as campaign_name,\n cast(portfolio_id as {{ dbt.type_string() }}) as portfolio_id,\n cast(profile_id as {{ dbt.type_string() }}) as profile_id,\n serving_status,\n start_date,\n state,\n targeting_type,\n budget,\n budget_type,\n effective_budget,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='amazon_ads') }} order by last_updated_date desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__campaign_history_tmp", "package": null, "version": null}, {"name": "stg_amazon_ads__campaign_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.get_campaign_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.amazon_ads.stg_amazon_ads__campaign_history_tmp"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads__campaign_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_history_tmp\"\n),\n\nfields as (\n\n select\n \n bidding_strategy as bidding_strategy,\n creation_date as creation_date,\n end_date as end_date,\n id as id,\n last_updated_date as last_updated_date,\n name as name,\n portfolio_id as portfolio_id,\n profile_id as profile_id,\n serving_status as serving_status,\n start_date as start_date,\n state as state,\n targeting_type as targeting_type,\n budget as budget,\n budget_type as budget_type,\n effective_budget as effective_budget\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as TEXT) as campaign_id,\n last_updated_date,\n bidding_strategy,\n creation_date,\n end_date,\n name as campaign_name,\n cast(portfolio_id as TEXT) as portfolio_id,\n cast(profile_id as TEXT) as profile_id,\n serving_status,\n start_date,\n state,\n targeting_type,\n budget,\n budget_type,\n effective_budget,\n row_number() over (partition by id order by last_updated_date desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__ad_group_level_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__ad_group_level_report", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/stg_amazon_ads__ad_group_level_report.sql", "original_file_path": "models/staging/stg_amazon_ads__ad_group_level_report.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__ad_group_level_report", "fqn": ["amazon_ads", "staging", "stg_amazon_ads__ad_group_level_report"], "alias": "stg_amazon_ads__ad_group_level_report", "checksum": {"name": "sha256", "checksum": "aa52f2bd1885bbc2191b2cb2936ee4ecfdcd9c823f408ac3134aec6531b3f386"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance by Amazon ad group.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "campaign_bidding_strategy": {"name": "campaign_bidding_strategy", "description": "The bidding strategy associated with a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_bidding_strategy"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/staging/stg_amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.9445446, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__ad_group_level_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\nwith base as (\n\n select * \n from {{ ref('stg_amazon_ads__ad_group_level_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_amazon_ads__ad_group_level_report_tmp')),\n staging_columns=get_ad_group_level_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='amazon_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id,\n campaign_bidding_strategy,\n clicks,\n cost,\n date as date_day,\n impressions,\n purchases_30_d,\n sales_30_d\n \n {{ amazon_ads_fill_pass_through_columns(pass_through_fields=var('amazon_ads__ad_group_passthrough_metrics'), except=['purchases_30_d', 'sales_30_d']) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__ad_group_level_report_tmp", "package": null, "version": null}, {"name": "stg_amazon_ads__ad_group_level_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.get_ad_group_level_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.amazon_ads.amazon_ads_fill_pass_through_columns"], "nodes": ["model.amazon_ads.stg_amazon_ads__ad_group_level_report_tmp"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads__ad_group_level_report.sql", "compiled": true, "compiled_code": "\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__ad_group_level_report_tmp\"\n),\n\nfields as (\n\n select\n \n ad_group_id as ad_group_id,\n campaign_bidding_strategy as campaign_bidding_strategy,\n clicks as clicks,\n cost as cost,\n date as date,\n impressions as impressions,\n cast(null as integer) as purchases_30_d,\n cast(null as float) as sales_30_d\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(ad_group_id as TEXT) as ad_group_id,\n campaign_bidding_strategy,\n clicks,\n cost,\n date as date_day,\n impressions,\n purchases_30_d,\n sales_30_d\n \n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__targeting_keyword_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__targeting_keyword_report", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/stg_amazon_ads__targeting_keyword_report.sql", "original_file_path": "models/staging/stg_amazon_ads__targeting_keyword_report.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__targeting_keyword_report", "fqn": ["amazon_ads", "staging", "stg_amazon_ads__targeting_keyword_report"], "alias": "stg_amazon_ads__targeting_keyword_report", "checksum": {"name": "sha256", "checksum": "b31838ddeeb3c6af579e32dfb1121fb4aec4013a1ffc10121ebe0e8d271eb4db"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Targeting reports contain performance metrics broken down by both targeting expressions and keywords.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "ad_keyword_status": {"name": "ad_keyword_status", "description": "Current status of a keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_keyword_status"]}, "campaign_budget_amount": {"name": "campaign_budget_amount", "description": "Total budget allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_amount"]}, "campaign_budget_currency_code": {"name": "campaign_budget_currency_code", "description": "The currency code associated with the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_currency_code"]}, "campaign_budget_type": {"name": "campaign_budget_type", "description": "One of: daily or lifetime.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_type"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "keyword_bid": {"name": "keyword_bid", "description": "Bid associated with a keyword or targeting expression.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_bid"]}, "keyword_id": {"name": "keyword_id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_id"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "keyword_type": {"name": "keyword_type", "description": "Type of matching for the keyword used in bid. One of: BROAD, PHRASE, or EXACT.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_type"]}, "match_type": {"name": "match_type", "description": "Type of matching for the keyword used in bid. One of: BROAD, PHRASE, or EXACT.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.match_type"]}, "targeting": {"name": "targeting", "description": "A string representation of the expression object used in the targeting clause.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.targeting"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/staging/stg_amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.9547818, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__targeting_keyword_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_amazon_ads__targeting_keyword_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_amazon_ads__targeting_keyword_report_tmp')),\n staging_columns=get_targeting_keyword_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='amazon_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id,\n ad_keyword_status,\n campaign_budget_amount,\n campaign_budget_currency_code,\n campaign_budget_type,\n cast(campaign_id as {{ dbt.type_string() }}) as campaign_id,\n clicks,\n cost,\n date as date_day,\n impressions,\n keyword_bid,\n cast(keyword_id as {{ dbt.type_string() }}) as keyword_id,\n keyword_type,\n match_type,\n targeting,\n purchases_30_d,\n sales_30_d\n\n {{ amazon_ads_fill_pass_through_columns(pass_through_fields=var('amazon_ads__targeting_keyword_passthrough_metrics'), except=['purchases_30_d', 'sales_30_d']) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__targeting_keyword_report_tmp", "package": null, "version": null}, {"name": "stg_amazon_ads__targeting_keyword_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.get_targeting_keyword_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.amazon_ads.amazon_ads_fill_pass_through_columns"], "nodes": ["model.amazon_ads.stg_amazon_ads__targeting_keyword_report_tmp"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads__targeting_keyword_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__targeting_keyword_report_tmp\"\n),\n\nfields as (\n\n select\n \n ad_group_id as ad_group_id,\n ad_keyword_status as ad_keyword_status,\n campaign_budget_amount as campaign_budget_amount,\n campaign_budget_currency_code as campaign_budget_currency_code,\n campaign_budget_type as campaign_budget_type,\n campaign_id as campaign_id,\n clicks as clicks,\n cost as cost,\n date as date,\n impressions as impressions,\n keyword_bid as keyword_bid,\n keyword_id as keyword_id,\n keyword_type as keyword_type,\n match_type as match_type,\n targeting as targeting,\n cast(null as integer) as purchases_30_d,\n cast(null as float) as sales_30_d\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(ad_group_id as TEXT) as ad_group_id,\n ad_keyword_status,\n campaign_budget_amount,\n campaign_budget_currency_code,\n campaign_budget_type,\n cast(campaign_id as TEXT) as campaign_id,\n clicks,\n cost,\n date as date_day,\n impressions,\n keyword_bid,\n cast(keyword_id as TEXT) as keyword_id,\n keyword_type,\n match_type,\n targeting,\n purchases_30_d,\n sales_30_d\n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__advertised_product_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__advertised_product_report", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/stg_amazon_ads__advertised_product_report.sql", "original_file_path": "models/staging/stg_amazon_ads__advertised_product_report.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__advertised_product_report", "fqn": ["amazon_ads", "staging", "stg_amazon_ads__advertised_product_report"], "alias": "stg_amazon_ads__advertised_product_report", "checksum": {"name": "sha256", "checksum": "b8f3274b34d3d6eca309b4a4c57552fdd851c3fe99285a88e7900394578eb3a8"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Advertised product reports contain performance data for products that are advertised as part of your campaigns.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "ad_id": {"name": "ad_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "advertised_asin": {"name": "advertised_asin", "description": "The ASIN associated to an advertised product.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.advertised_asin"]}, "advertised_sku": {"name": "advertised_sku", "description": "The SKU being advertised.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.advertised_sku"]}, "campaign_budget_amount": {"name": "campaign_budget_amount", "description": "Total budget allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_amount"]}, "campaign_budget_currency_code": {"name": "campaign_budget_currency_code", "description": "The currency code associated with the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_currency_code"]}, "campaign_budget_type": {"name": "campaign_budget_type", "description": "One of: daily or lifetime.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_type"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/staging/stg_amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.9460752, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__advertised_product_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_amazon_ads__advertised_product_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_amazon_ads__advertised_product_report_tmp')),\n staging_columns=get_advertised_product_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='amazon_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(ad_id as {{ dbt.type_string() }}) as ad_id,\n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id,\n advertised_asin,\n advertised_sku,\n campaign_budget_amount,\n campaign_budget_currency_code,\n campaign_budget_type,\n cast(campaign_id as {{ dbt.type_string() }}) as campaign_id,\n clicks,\n cost,\n date as date_day,\n impressions,\n purchases_30_d,\n sales_30_d\n \n {{ amazon_ads_fill_pass_through_columns(pass_through_fields=var('amazon_ads__advertised_product_passthrough_metrics'), except=['purchases_30_d', 'sales_30_d']) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__advertised_product_report_tmp", "package": null, "version": null}, {"name": "stg_amazon_ads__advertised_product_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.get_advertised_product_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.amazon_ads.amazon_ads_fill_pass_through_columns"], "nodes": ["model.amazon_ads.stg_amazon_ads__advertised_product_report_tmp"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads__advertised_product_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__advertised_product_report_tmp\"\n),\n\nfields as (\n\n select\n \n ad_group_id as ad_group_id,\n ad_id as ad_id,\n advertised_asin as advertised_asin,\n advertised_sku as advertised_sku,\n campaign_budget_amount as campaign_budget_amount,\n campaign_budget_currency_code as campaign_budget_currency_code,\n campaign_budget_type as campaign_budget_type,\n campaign_id as campaign_id,\n clicks as clicks,\n cost as cost,\n date as date,\n impressions as impressions,\n cast(null as integer) as purchases_30_d,\n cast(null as float) as sales_30_d\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(ad_id as TEXT) as ad_id,\n cast(ad_group_id as TEXT) as ad_group_id,\n advertised_asin,\n advertised_sku,\n campaign_budget_amount,\n campaign_budget_currency_code,\n campaign_budget_type,\n cast(campaign_id as TEXT) as campaign_id,\n clicks,\n cost,\n date as date_day,\n impressions,\n purchases_30_d,\n sales_30_d\n \n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__keyword_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__keyword_history", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/stg_amazon_ads__keyword_history.sql", "original_file_path": "models/staging/stg_amazon_ads__keyword_history.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__keyword_history", "fqn": ["amazon_ads", "staging", "stg_amazon_ads__keyword_history"], "alias": "stg_amazon_ads__keyword_history", "checksum": {"name": "sha256", "checksum": "dbaf0a033752695b539a48206654e34f5414a54e8994e458db3dae658fc621c7"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a keyword in Amazon Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "keyword_id": {"name": "keyword_id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_id"]}, "last_updated_date": {"name": "last_updated_date", "description": "Date of last update to record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.last_updated_date"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "bid": {"name": "bid", "description": "Bid associated with this keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.bid_keyword"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "creation_date": {"name": "creation_date", "description": "The date of creation of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.creation_date"]}, "keyword_text": {"name": "keyword_text", "description": "The exact text for the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "match_type": {"name": "match_type", "description": "One of (broad, exact, or phrase.)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_match_type"]}, "native_language_keyword": {"name": "native_language_keyword", "description": "The unlocalized keyword text in the preferred locale of the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "native_language_locale": {"name": "native_language_locale", "description": "The preferred language locale of the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean indicating whether record was the most recent instance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/staging/stg_amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.9498923, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__keyword_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_amazon_ads__keyword_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_amazon_ads__keyword_history_tmp')),\n staging_columns=get_keyword_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='amazon_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as {{ dbt.type_string() }}) as keyword_id,\n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id,\n bid,\n cast(campaign_id as {{ dbt.type_string() }}) as campaign_id,\n creation_date,\n keyword_text,\n last_updated_date,\n match_type,\n native_language_keyword,\n serving_status,\n state,\n native_language_locale,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='amazon_ads') }} order by last_updated_date desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__keyword_history_tmp", "package": null, "version": null}, {"name": "stg_amazon_ads__keyword_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.get_keyword_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.amazon_ads.stg_amazon_ads__keyword_history_tmp"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads__keyword_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__keyword_history_tmp\"\n),\n\nfields as (\n\n select\n \n ad_group_id as ad_group_id,\n bid as bid,\n campaign_id as campaign_id,\n creation_date as creation_date,\n id as id,\n keyword_text as keyword_text,\n last_updated_date as last_updated_date,\n match_type as match_type,\n native_language_keyword as native_language_keyword,\n serving_status as serving_status,\n state as state,\n native_language_locale as native_language_locale\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as TEXT) as keyword_id,\n cast(ad_group_id as TEXT) as ad_group_id,\n bid,\n cast(campaign_id as TEXT) as campaign_id,\n creation_date,\n keyword_text,\n last_updated_date,\n match_type,\n native_language_keyword,\n serving_status,\n state,\n native_language_locale,\n row_number() over (partition by id order by last_updated_date desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__campaign_level_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__campaign_level_report", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/stg_amazon_ads__campaign_level_report.sql", "original_file_path": "models/staging/stg_amazon_ads__campaign_level_report.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__campaign_level_report", "fqn": ["amazon_ads", "staging", "stg_amazon_ads__campaign_level_report"], "alias": "stg_amazon_ads__campaign_level_report", "checksum": {"name": "sha256", "checksum": "26d28d96834f54faff1859f82c50ed58f75feba319534bf61ae381473183e5b5"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Campaign reports contain performance data broken down at the campaign level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "campaign_applicable_budget_rule_id": {"name": "campaign_applicable_budget_rule_id", "description": "The ID associated to the active budget rule for a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_applicable_budget_rule_id"]}, "campaign_applicable_budget_rule_name": {"name": "campaign_applicable_budget_rule_name", "description": "The name associated to the active budget rule for a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_applicable_budget_rule_name"]}, "campaign_bidding_strategy": {"name": "campaign_bidding_strategy", "description": "The bidding strategy associated with a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_bidding_strategy"]}, "campaign_budget_amount": {"name": "campaign_budget_amount", "description": "Total budget allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_amount"]}, "campaign_budget_currency_code": {"name": "campaign_budget_currency_code", "description": "The currency code associated with the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_currency_code"]}, "campaign_budget_type": {"name": "campaign_budget_type", "description": "One of: daily or lifetime.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_type"]}, "campaign_rule_based_budget_amount": {"name": "campaign_rule_based_budget_amount", "description": "The value of the rule-based budget for a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_rule_based_budget_amount"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/staging/stg_amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.948691, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_level_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_amazon_ads__campaign_level_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_amazon_ads__campaign_level_report_tmp')),\n staging_columns=get_campaign_level_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='amazon_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n campaign_applicable_budget_rule_id,\n campaign_applicable_budget_rule_name,\n campaign_bidding_strategy,\n campaign_budget_amount,\n campaign_budget_currency_code,\n campaign_budget_type,\n cast(campaign_id as {{ dbt.type_string() }}) as campaign_id,\n campaign_rule_based_budget_amount,\n clicks,\n cost,\n date as date_day,\n impressions,\n purchases_30_d,\n sales_30_d\n\n {{ amazon_ads_fill_pass_through_columns(pass_through_fields=var('amazon_ads__campaign_passthrough_metrics'), except=['purchases_30_d', 'sales_30_d']) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__campaign_level_report_tmp", "package": null, "version": null}, {"name": "stg_amazon_ads__campaign_level_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.get_campaign_level_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.amazon_ads.amazon_ads_fill_pass_through_columns"], "nodes": ["model.amazon_ads.stg_amazon_ads__campaign_level_report_tmp"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads__campaign_level_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_level_report_tmp\"\n),\n\nfields as (\n\n select\n \n campaign_applicable_budget_rule_id as campaign_applicable_budget_rule_id,\n campaign_applicable_budget_rule_name as campaign_applicable_budget_rule_name,\n campaign_bidding_strategy as campaign_bidding_strategy,\n campaign_budget_amount as campaign_budget_amount,\n campaign_budget_currency_code as campaign_budget_currency_code,\n campaign_budget_type as campaign_budget_type,\n campaign_id as campaign_id,\n campaign_rule_based_budget_amount as campaign_rule_based_budget_amount,\n clicks as clicks,\n cost as cost,\n date as date,\n impressions as impressions,\n purchases_30_d as purchases_30_d,\n sales_30_d as sales_30_d\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n campaign_applicable_budget_rule_id,\n campaign_applicable_budget_rule_name,\n campaign_bidding_strategy,\n campaign_budget_amount,\n campaign_budget_currency_code,\n campaign_budget_type,\n cast(campaign_id as TEXT) as campaign_id,\n campaign_rule_based_budget_amount,\n clicks,\n cost,\n date as date_day,\n impressions,\n purchases_30_d,\n sales_30_d\n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__profile": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__profile", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/stg_amazon_ads__profile.sql", "original_file_path": "models/staging/stg_amazon_ads__profile.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__profile", "fqn": ["amazon_ads", "staging", "stg_amazon_ads__profile"], "alias": "stg_amazon_ads__profile", "checksum": {"name": "sha256", "checksum": "4a524c8198fc506924fe7058aff58222287c034659acfce0651fe9aff3756d41"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a profile. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean created by Fivetran to indicate whether the record has been deleted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads._fivetran_deleted"]}, "profile_id": {"name": "profile_id", "description": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.profile_id"]}, "account_id": {"name": "account_id", "description": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_id"]}, "account_marketplace_string_id": {"name": "account_marketplace_string_id", "description": "The identifier of the marketplace to which the account is associated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "Account Name. Not currently populated for sellers.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_name"]}, "account_sub_type": {"name": "account_sub_type", "description": "The account subtype.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_type": {"name": "account_type", "description": "One of seller, vendor, or agency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_valid_payment_method": {"name": "account_valid_payment_method", "description": "For Vendors, this returns if the Advertiser has set up a valid payment method.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country_code": {"name": "country_code", "description": "The code for a given country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.country_code"]}, "currency_code": {"name": "currency_code", "description": "The currency used for all monetary values for entities under this profile.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.currency_code"]}, "daily_budget": {"name": "daily_budget", "description": "Daily budget for Sponsored Product campaigns for seller type accounts.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone": {"name": "timezone", "description": "The time zone used for all date-based campaign management and reporting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/staging/stg_amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.9533734, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__profile\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_amazon_ads__profile_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_amazon_ads__profile_tmp')),\n staging_columns=get_profile_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='amazon_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as {{ dbt.type_string() }}) as profile_id,\n cast(account_id as {{ dbt.type_string() }}) as account_id,\n account_marketplace_string_id,\n account_name,\n account_sub_type,\n account_type,\n account_valid_payment_method,\n country_code,\n currency_code,\n daily_budget,\n timezone,\n _fivetran_deleted\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__profile_tmp", "package": null, "version": null}, {"name": "stg_amazon_ads__profile_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.get_profile_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string"], "nodes": ["model.amazon_ads.stg_amazon_ads__profile_tmp"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads__profile.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__profile_tmp\"\n),\n\nfields as (\n\n select\n \n id as id,\n account_id as account_id,\n account_marketplace_string_id as account_marketplace_string_id,\n account_name as account_name,\n account_sub_type as account_sub_type,\n account_type as account_type,\n account_valid_payment_method as account_valid_payment_method,\n country_code as country_code,\n currency_code as currency_code,\n daily_budget as daily_budget,\n timezone as timezone,\n _fivetran_deleted as _fivetran_deleted\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as TEXT) as profile_id,\n cast(account_id as TEXT) as account_id,\n account_marketplace_string_id,\n account_name,\n account_sub_type,\n account_type,\n account_valid_payment_method,\n country_code,\n currency_code,\n daily_budget,\n timezone,\n _fivetran_deleted\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__product_ad_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__product_ad_history", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/stg_amazon_ads__product_ad_history.sql", "original_file_path": "models/staging/stg_amazon_ads__product_ad_history.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__product_ad_history", "fqn": ["amazon_ads", "staging", "stg_amazon_ads__product_ad_history"], "alias": "stg_amazon_ads__product_ad_history", "checksum": {"name": "sha256", "checksum": "b01e70975ac97cfcc68f21165faebaf40f6ce0e1235c616c4f2dc56e7ddd6aa7"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a product in Amazon Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "ad_id": {"name": "ad_id", "description": "The ID of the Ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_id"]}, "last_updated_date": {"name": "last_updated_date", "description": "Date of last update to record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.last_updated_date"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "asin": {"name": "asin", "description": "The ASIN associated with the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creation_date": {"name": "creation_date", "description": "The date of creation of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.creation_date"]}, "sku": {"name": "sku", "description": "The product SKU associated with the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean indicating whether record was the most recent instance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/staging/stg_amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450504.9522297, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__product_ad_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_amazon_ads__product_ad_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_amazon_ads__product_ad_history_tmp')),\n staging_columns=get_product_ad_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='amazon_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as {{ dbt.type_string() }}) as ad_id,\n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id,\n asin,\n cast(campaign_id as {{ dbt.type_string() }}) as campaign_id,\n creation_date,\n last_updated_date,\n serving_status,\n sku,\n state,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='amazon_ads') }} order by last_updated_date desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__product_ad_history_tmp", "package": null, "version": null}, {"name": "stg_amazon_ads__product_ad_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.get_product_ad_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.amazon_ads.stg_amazon_ads__product_ad_history_tmp"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads__product_ad_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__product_ad_history_tmp\"\n),\n\nfields as (\n\n select\n \n ad_group_id as ad_group_id,\n asin as asin,\n campaign_id as campaign_id,\n creation_date as creation_date,\n id as id,\n last_updated_date as last_updated_date,\n serving_status as serving_status,\n sku as sku,\n state as state\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as TEXT) as ad_id,\n cast(ad_group_id as TEXT) as ad_group_id,\n asin,\n cast(campaign_id as TEXT) as campaign_id,\n creation_date,\n last_updated_date,\n serving_status,\n sku,\n state,\n row_number() over (partition by id order by last_updated_date desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__keyword_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__keyword_history_tmp", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/tmp/stg_amazon_ads__keyword_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_amazon_ads__keyword_history_tmp.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__keyword_history_tmp", "fqn": ["amazon_ads", "staging", "tmp", "stg_amazon_ads__keyword_history_tmp"], "alias": "stg_amazon_ads__keyword_history_tmp", "checksum": {"name": "sha256", "checksum": "7b8132355b140aa6e4f6ced3e5948c4dfb594db9ff5b29b2c5bb7f8464bcb612"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450499.721071, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__keyword_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\n{% if var('amazon_ads_union_schemas', []) | length > 0 or var('amazon_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='keyword_history', \n database_variable='amazon_ads_database', \n schema_variable='amazon_ads_schema', \n default_database=target.database,\n default_schema='amazon_ads',\n default_variable='keyword_history',\n union_schema_variable='amazon_ads_union_schemas',\n union_database_variable='amazon_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='amazon_ads_sources',\n single_source_name='amazon_ads',\n single_table_name='keyword_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["amazon_ads", "keyword_history"], ["amazon_ads", "keyword_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.amazon_ads.amazon_ads.keyword_history"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/tmp/stg_amazon_ads__keyword_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: amazon_ads_keyword_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: amazon_ads_keyword_history_data\n\n\n select\n \"id\",\n \"last_updated_date\",\n \"_fivetran_synced\",\n \"ad_group_id\",\n \"bid\",\n \"campaign_id\",\n \"creation_date\",\n \"keyword_text\",\n \"match_type\",\n \"native_language_keyword\",\n \"serving_status\",\n \"state\",\n \"native_language_locale\"\n from \"postgres\".\"public\".\"amazon_ads_keyword_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__campaign_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__campaign_history_tmp", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/tmp/stg_amazon_ads__campaign_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_amazon_ads__campaign_history_tmp.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__campaign_history_tmp", "fqn": ["amazon_ads", "staging", "tmp", "stg_amazon_ads__campaign_history_tmp"], "alias": "stg_amazon_ads__campaign_history_tmp", "checksum": {"name": "sha256", "checksum": "a6c7ccb3bba8fc386a2a7291aeee00b585c8d19b14c131ab5e4ee3bbcbe303a4"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450499.73172, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\n{% if var('amazon_ads_union_schemas', []) | length > 0 or var('amazon_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_history', \n database_variable='amazon_ads_database', \n schema_variable='amazon_ads_schema', \n default_database=target.database,\n default_schema='amazon_ads',\n default_variable='campaign_history',\n union_schema_variable='amazon_ads_union_schemas',\n union_database_variable='amazon_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='amazon_ads_sources',\n single_source_name='amazon_ads',\n single_table_name='campaign_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["amazon_ads", "campaign_history"], ["amazon_ads", "campaign_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.amazon_ads.amazon_ads.campaign_history"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/tmp/stg_amazon_ads__campaign_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: amazon_ads_campaign_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: amazon_ads_campaign_history_data\n\n\n select\n \"id\",\n \"last_updated_date\",\n \"_fivetran_synced\",\n \"bidding_strategy\",\n \"creation_date\",\n \"budget\",\n \"end_date\",\n \"name\",\n \"portfolio_id\",\n \"profile_id\",\n \"serving_status\",\n \"start_date\",\n \"state\",\n \"targeting_type\",\n \"budget_type\",\n \"effective_budget\"\n from \"postgres\".\"public\".\"amazon_ads_campaign_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__search_term_ad_keyword_report_tmp", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/tmp/stg_amazon_ads__search_term_ad_keyword_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_amazon_ads__search_term_ad_keyword_report_tmp.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report_tmp", "fqn": ["amazon_ads", "staging", "tmp", "stg_amazon_ads__search_term_ad_keyword_report_tmp"], "alias": "stg_amazon_ads__search_term_ad_keyword_report_tmp", "checksum": {"name": "sha256", "checksum": "2ccd82d36486f242bf863cf6ef5e68a842ca40a46d5468b9a1b38c47cf321fc0"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450499.7426674, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__search_term_ad_keyword_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\n{% if var('amazon_ads_union_schemas', []) | length > 0 or var('amazon_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='search_term_ad_keyword_report', \n database_variable='amazon_ads_database', \n schema_variable='amazon_ads_schema', \n default_database=target.database,\n default_schema='amazon_ads',\n default_variable='search_term_ad_keyword_report',\n union_schema_variable='amazon_ads_union_schemas',\n union_database_variable='amazon_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='amazon_ads_sources',\n single_source_name='amazon_ads',\n single_table_name='search_term_ad_keyword_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["amazon_ads", "search_term_ad_keyword_report"], ["amazon_ads", "search_term_ad_keyword_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.amazon_ads.amazon_ads.search_term_ad_keyword_report"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/tmp/stg_amazon_ads__search_term_ad_keyword_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: amazon_ads_search_term_ad_keyword_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: amazon_ads_search_term_ad_keyword_report_data\n\n\n select\n \"ad_group_id\",\n \"campaign_id\",\n \"date\",\n \"keyword_id\",\n \"_fivetran_synced\",\n \"campaign_budget_amount\",\n \"campaign_budget_currency_code\",\n \"campaign_budget_type\",\n \"clicks\",\n \"cost\",\n \"impressions\",\n \"keyword_bid\",\n \"search_term\",\n \"targeting\"\n from \"postgres\".\"public\".\"amazon_ads_search_term_ad_keyword_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__campaign_level_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__campaign_level_report_tmp", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/tmp/stg_amazon_ads__campaign_level_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_amazon_ads__campaign_level_report_tmp.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__campaign_level_report_tmp", "fqn": ["amazon_ads", "staging", "tmp", "stg_amazon_ads__campaign_level_report_tmp"], "alias": "stg_amazon_ads__campaign_level_report_tmp", "checksum": {"name": "sha256", "checksum": "a73b069a9c57479eb126f59c2360c6a9faae53cb18633bb58f47de722e1e1640"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450499.7531, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_level_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\n{% if var('amazon_ads_union_schemas', []) | length > 0 or var('amazon_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_level_report', \n database_variable='amazon_ads_database', \n schema_variable='amazon_ads_schema', \n default_database=target.database,\n default_schema='amazon_ads',\n default_variable='campaign_level_report',\n union_schema_variable='amazon_ads_union_schemas',\n union_database_variable='amazon_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='amazon_ads_sources',\n single_source_name='amazon_ads',\n single_table_name='campaign_level_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["amazon_ads", "campaign_level_report"], ["amazon_ads", "campaign_level_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.amazon_ads.amazon_ads.campaign_level_report"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/tmp/stg_amazon_ads__campaign_level_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: amazon_ads_campaign_level_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: amazon_ads_campaign_level_report_data\n\n\n select\n \"campaign_id\",\n \"date\",\n \"_fivetran_synced\",\n \"campaign_applicable_budget_rule_id\",\n \"campaign_applicable_budget_rule_name\",\n \"campaign_bidding_strategy\",\n \"campaign_budget_amount\",\n \"campaign_budget_currency_code\",\n \"campaign_budget_type\",\n \"clicks\",\n \"cost\",\n \"impressions\",\n \"campaign_rule_based_budget_amount\",\n \"sales_7_d\",\n \"purchases_30_d\",\n \"sales_30_d\"\n from \"postgres\".\"public\".\"amazon_ads_campaign_level_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__profile_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__profile_tmp", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/tmp/stg_amazon_ads__profile_tmp.sql", "original_file_path": "models/staging/tmp/stg_amazon_ads__profile_tmp.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__profile_tmp", "fqn": ["amazon_ads", "staging", "tmp", "stg_amazon_ads__profile_tmp"], "alias": "stg_amazon_ads__profile_tmp", "checksum": {"name": "sha256", "checksum": "6ebb916ae09e297be68a551e03175770daa27009e1dccc8d4e79f92516cfe1fa"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450499.7653267, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__profile_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\n{% if var('amazon_ads_union_schemas', []) | length > 0 or var('amazon_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='profile', \n database_variable='amazon_ads_database', \n schema_variable='amazon_ads_schema', \n default_database=target.database,\n default_schema='amazon_ads',\n default_variable='profile',\n union_schema_variable='amazon_ads_union_schemas',\n union_database_variable='amazon_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='amazon_ads_sources',\n single_source_name='amazon_ads',\n single_table_name='profile'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["amazon_ads", "profile"], ["amazon_ads", "profile"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.amazon_ads.amazon_ads.profile"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/tmp/stg_amazon_ads__profile_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: amazon_ads_profile_identifier\n -- database: postgres \n -- schema: public\n -- identifier: amazon_ads_profile_data\n\n\n select\n \"id\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"account_id\",\n \"account_marketplace_string_id\",\n \"account_name\",\n \"account_sub_type\",\n \"account_type\",\n \"account_valid_payment_method\",\n \"country_code\",\n \"currency_code\",\n \"daily_budget\",\n \"timezone\"\n from \"postgres\".\"public\".\"amazon_ads_profile_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__ad_group_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__ad_group_history_tmp", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/tmp/stg_amazon_ads__ad_group_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_amazon_ads__ad_group_history_tmp.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__ad_group_history_tmp", "fqn": ["amazon_ads", "staging", "tmp", "stg_amazon_ads__ad_group_history_tmp"], "alias": "stg_amazon_ads__ad_group_history_tmp", "checksum": {"name": "sha256", "checksum": "e5c1668edfd9a86d7f014dd1dbdea6684559d08693ea0cfeca1d37ded0b5a98b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450499.7761502, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__ad_group_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\n{% if var('amazon_ads_union_schemas', []) | length > 0 or var('amazon_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_group_history', \n database_variable='amazon_ads_database', \n schema_variable='amazon_ads_schema', \n default_database=target.database,\n default_schema='amazon_ads',\n default_variable='ad_group_history',\n union_schema_variable='amazon_ads_union_schemas',\n union_database_variable='amazon_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='amazon_ads_sources',\n single_source_name='amazon_ads',\n single_table_name='ad_group_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["amazon_ads", "ad_group_history"], ["amazon_ads", "ad_group_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.amazon_ads.amazon_ads.ad_group_history"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/tmp/stg_amazon_ads__ad_group_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: amazon_ads_ad_group_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: amazon_ads_ad_group_history_data\n\n\n select\n \"id\",\n \"last_updated_date\",\n \"_fivetran_synced\",\n \"campaign_id\",\n \"creation_date\",\n \"default_bid\",\n \"name\",\n \"serving_status\",\n \"state\"\n from \"postgres\".\"public\".\"amazon_ads_ad_group_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__targeting_keyword_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__targeting_keyword_report_tmp", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/tmp/stg_amazon_ads__targeting_keyword_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_amazon_ads__targeting_keyword_report_tmp.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__targeting_keyword_report_tmp", "fqn": ["amazon_ads", "staging", "tmp", "stg_amazon_ads__targeting_keyword_report_tmp"], "alias": "stg_amazon_ads__targeting_keyword_report_tmp", "checksum": {"name": "sha256", "checksum": "2faa7e5bda77d2a5f08e0db47520698ce39828a41bd178d0ef79ff5d829c7f43"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450499.7872999, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__targeting_keyword_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\n{% if var('amazon_ads_union_schemas', []) | length > 0 or var('amazon_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='targeting_keyword_report', \n database_variable='amazon_ads_database', \n schema_variable='amazon_ads_schema', \n default_database=target.database,\n default_schema='amazon_ads',\n default_variable='targeting_keyword_report',\n union_schema_variable='amazon_ads_union_schemas',\n union_database_variable='amazon_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='amazon_ads_sources',\n single_source_name='amazon_ads',\n single_table_name='targeting_keyword_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["amazon_ads", "targeting_keyword_report"], ["amazon_ads", "targeting_keyword_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.amazon_ads.amazon_ads.targeting_keyword_report"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/tmp/stg_amazon_ads__targeting_keyword_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: amazon_ads_targeting_keyword_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: amazon_ads_targeting_keyword_report_data\n\n\n select\n \"ad_group_id\",\n \"campaign_id\",\n \"date\",\n \"keyword_id\",\n \"_fivetran_synced\",\n \"ad_keyword_status\",\n \"campaign_budget_amount\",\n \"campaign_budget_currency_code\",\n \"campaign_budget_type\",\n \"clicks\",\n \"cost\",\n \"impressions\",\n \"keyword_bid\",\n \"keyword_type\",\n \"match_type\",\n \"targeting\"\n from \"postgres\".\"public\".\"amazon_ads_targeting_keyword_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__advertised_product_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__advertised_product_report_tmp", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/tmp/stg_amazon_ads__advertised_product_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_amazon_ads__advertised_product_report_tmp.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__advertised_product_report_tmp", "fqn": ["amazon_ads", "staging", "tmp", "stg_amazon_ads__advertised_product_report_tmp"], "alias": "stg_amazon_ads__advertised_product_report_tmp", "checksum": {"name": "sha256", "checksum": "17a88b978f4dc101972f8a5a9a894bc2e158dc51c6fd72774e3c8ba03c68bb4e"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450499.7992082, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__advertised_product_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\n{% if var('amazon_ads_union_schemas', []) | length > 0 or var('amazon_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='advertised_product_report', \n database_variable='amazon_ads_database', \n schema_variable='amazon_ads_schema', \n default_database=target.database,\n default_schema='amazon_ads',\n default_variable='advertised_product_report',\n union_schema_variable='amazon_ads_union_schemas',\n union_database_variable='amazon_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='amazon_ads_sources',\n single_source_name='amazon_ads',\n single_table_name='advertised_product_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["amazon_ads", "advertised_product_report"], ["amazon_ads", "advertised_product_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.amazon_ads.amazon_ads.advertised_product_report"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/tmp/stg_amazon_ads__advertised_product_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: amazon_ads_advertised_product_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: amazon_ads_advertised_product_report_data\n\n\n select\n \"ad_group_id\",\n \"ad_id\",\n \"campaign_id\",\n \"date\",\n \"_fivetran_synced\",\n \"campaign_budget_amount\",\n \"campaign_budget_currency_code\",\n \"campaign_budget_type\",\n \"clicks\",\n \"cost\",\n \"impressions\",\n \"advertised_asin\",\n \"advertised_sku\"\n from \"postgres\".\"public\".\"amazon_ads_advertised_product_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__ad_group_level_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__ad_group_level_report_tmp", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/tmp/stg_amazon_ads__ad_group_level_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_amazon_ads__ad_group_level_report_tmp.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__ad_group_level_report_tmp", "fqn": ["amazon_ads", "staging", "tmp", "stg_amazon_ads__ad_group_level_report_tmp"], "alias": "stg_amazon_ads__ad_group_level_report_tmp", "checksum": {"name": "sha256", "checksum": "acb545136d6b6a77f3685fbebe4bf84ad29c0cf3b48037e0357c9b44c18dad9a"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450499.8098028, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__ad_group_level_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\n{% if var('amazon_ads_union_schemas', []) | length > 0 or var('amazon_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_group_level_report', \n database_variable='amazon_ads_database', \n schema_variable='amazon_ads_schema', \n default_database=target.database,\n default_schema='amazon_ads',\n default_variable='ad_group_level_report',\n union_schema_variable='amazon_ads_union_schemas',\n union_database_variable='amazon_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='amazon_ads_sources',\n single_source_name='amazon_ads',\n single_table_name='ad_group_level_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["amazon_ads", "ad_group_level_report"], ["amazon_ads", "ad_group_level_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.amazon_ads.amazon_ads.ad_group_level_report"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/tmp/stg_amazon_ads__ad_group_level_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: amazon_ads_ad_group_level_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: amazon_ads_ad_group_level_report_data\n\n\n select\n \"ad_group_id\",\n \"date\",\n \"_fivetran_synced\",\n \"campaign_bidding_strategy\",\n \"clicks\",\n \"cost\",\n \"impressions\"\n from \"postgres\".\"public\".\"amazon_ads_ad_group_level_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__portfolio_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__portfolio_history_tmp", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/tmp/stg_amazon_ads__portfolio_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_amazon_ads__portfolio_history_tmp.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__portfolio_history_tmp", "fqn": ["amazon_ads", "staging", "tmp", "stg_amazon_ads__portfolio_history_tmp"], "alias": "stg_amazon_ads__portfolio_history_tmp", "checksum": {"name": "sha256", "checksum": "6b7646b12996809d7f34b7ac42f76f4b8616a4e8feaad5f24e1d1b01c618c034"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450499.8202288, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__portfolio_history_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__amazon_ads_enabled','amazon_ads__portfolio_history_enabled'])) }}\n\n{% if var('amazon_ads_union_schemas', []) | length > 0 or var('amazon_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='portfolio_history', \n database_variable='amazon_ads_database', \n schema_variable='amazon_ads_schema', \n default_database=target.database,\n default_schema='amazon_ads',\n default_variable='portfolio_history',\n union_schema_variable='amazon_ads_union_schemas',\n union_database_variable='amazon_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='amazon_ads_sources',\n single_source_name='amazon_ads',\n single_table_name='portfolio_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["amazon_ads", "portfolio_history"], ["amazon_ads", "portfolio_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.amazon_ads.amazon_ads.portfolio_history"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/tmp/stg_amazon_ads__portfolio_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: amazon_ads_portfolio_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: amazon_ads_portfolio_history_data\n\n\n select\n \"id\",\n \"last_updated_date\",\n \"_fivetran_synced\",\n \"budget_amount\",\n \"budget_currency_code\",\n \"budget_end_date\",\n \"budget_policy\",\n \"budget_start_date\",\n \"creation_date\",\n \"in_budget\",\n \"name\",\n \"profile_id\",\n \"serving_status\",\n \"state\"\n from \"postgres\".\"public\".\"amazon_ads_portfolio_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__product_ad_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__product_ad_history_tmp", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/tmp/stg_amazon_ads__product_ad_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_amazon_ads__product_ad_history_tmp.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__product_ad_history_tmp", "fqn": ["amazon_ads", "staging", "tmp", "stg_amazon_ads__product_ad_history_tmp"], "alias": "stg_amazon_ads__product_ad_history_tmp", "checksum": {"name": "sha256", "checksum": "1387de6d7f9a296cdda6ab62ea06544ec1cfd6e62e39ff4759534b76a97d6cef"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450499.8310518, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__product_ad_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\n{% if var('amazon_ads_union_schemas', []) | length > 0 or var('amazon_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='product_ad_history', \n database_variable='amazon_ads_database', \n schema_variable='amazon_ads_schema', \n default_database=target.database,\n default_schema='amazon_ads',\n default_variable='product_ad_history',\n union_schema_variable='amazon_ads_union_schemas',\n union_database_variable='amazon_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='amazon_ads_sources',\n single_source_name='amazon_ads',\n single_table_name='product_ad_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["amazon_ads", "product_ad_history"], ["amazon_ads", "product_ad_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.amazon_ads.amazon_ads.product_ad_history"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/tmp/stg_amazon_ads__product_ad_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: amazon_ads_product_ad_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: amazon_ads_product_ad_history_data\n\n\n select\n \"id\",\n \"last_updated_date\",\n \"_fivetran_synced\",\n \"ad_group_id\",\n \"asin\",\n \"campaign_id\",\n \"creation_date\",\n \"serving_status\",\n \"sku\",\n \"state\"\n from \"postgres\".\"public\".\"amazon_ads_product_ad_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.int_amazon_ads__portfolio_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "int_amazon_ads__portfolio_history", "resource_type": "model", "package_name": "amazon_ads", "path": "intermediate/int_amazon_ads__portfolio_history.sql", "original_file_path": "models/intermediate/int_amazon_ads__portfolio_history.sql", "unique_id": "model.amazon_ads.int_amazon_ads__portfolio_history", "fqn": ["amazon_ads", "intermediate", "int_amazon_ads__portfolio_history"], "alias": "int_amazon_ads__portfolio_history", "checksum": {"name": "sha256", "checksum": "4adc8889e2f5adf01f24c7c5676b17c9dbb7877004cc9f2bcb1770ecf3f41ecf"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450499.8428628, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"int_amazon_ads__portfolio_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\n{# This intermediate model creates a dummy portfolio table if the user does not use portfolios. \nIf they are using them, the normal portfolio_history will be used. #}\n\nwith portfolios as (\n select\n {% if var('amazon_ads__portfolio_history_enabled', True) %}\n *\n from {{ ref('stg_amazon_ads__portfolio_history') }}\n where is_most_recent_record = True\n {% else %}\n cast(null as {{ dbt.type_string() }}) as source_relation,\n {# uses the columns macro from the source package to populate column names #}\n {%- set columns = amazon_ads.get_portfolio_history_columns() -%}\n {% for column in columns %}\n {# set null for each column #}\n {%- if column['name'] == 'id' -%}\n cast(null as {{ dbt.type_string() }}) as portfolio_id\n {%- elif column['name'] == 'name' -%}\n cast(null as {{ dbt.type_string() }}) as portfolio_name\n {%- elif column['name'] == 'profile_id' -%}\n cast(null as {{ dbt.type_string() }}) as profile_id\n {%- else -%}\n cast(null as {{ column['datatype'] }}) as {{ column['name'] }}\n {%- endif -%}\n {# add comma if not the last column #}\n {%- if not loop.last -%} , {% endif -%}\n {% endfor %}\n {% endif %}\n)\n\nselect * \nfrom portfolios", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__portfolio_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": ["model.amazon_ads.stg_amazon_ads__portfolio_history"]}, "compiled_path": "target/compiled/amazon_ads/models/intermediate/int_amazon_ads__portfolio_history.sql", "compiled": true, "compiled_code": "\n\n\n\nwith portfolios as (\n select\n \n *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__portfolio_history\"\n where is_most_recent_record = True\n \n)\n\nselect * \nfrom portfolios", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.twitter_ads__promoted_tweet_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "twitter_ads__promoted_tweet_report", "resource_type": "model", "package_name": "twitter_ads", "path": "twitter_ads__promoted_tweet_report.sql", "original_file_path": "models/twitter_ads__promoted_tweet_report.sql", "unique_id": "model.twitter_ads.twitter_ads__promoted_tweet_report", "fqn": ["twitter_ads", "twitter_ads__promoted_tweet_report"], "alias": "twitter_ads__promoted_tweet_report", "checksum": {"name": "sha256", "checksum": "802120de116735b628336b7181c12ee82ad9900d5bff25cd5eb2fa6d7582ef21"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the account, campaign, line item (ad group), and promoted tweet level, within a placement in Twitter.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "The name of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_id": {"name": "line_item_id", "description": "The ID of the related line item (ad group).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_name": {"name": "line_item_name", "description": "The ID of the related line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "promoted_tweet_id": {"name": "promoted_tweet_id", "description": "The ID of the promoted tweet that the URL appeared in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tweet_id": {"name": "tweet_id", "description": "The ID of the tweet that the URL appeared in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tweet_name": {"name": "tweet_name", "description": "The name, if provided, of the tweet that the URL appeared in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "full_text": {"name": "full_text", "description": "The full text of the tweet that the URL appeared in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The currency all metrics for the account are set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the promoted tweet + URL on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the promoted tweet + URL on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend for the promoted tweet + URL on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend_micro": {"name": "spend_micro", "description": "The spend, in micros, for the tweet + URL on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The URL clicks for the promoted tweet + URL on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "approval_status": {"name": "approval_status", "description": "The approval status of the promoted tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The timestamp the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.created_at"]}, "is_deleted": {"name": "is_deleted", "description": "Whether the record has been deleted or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.deleted"]}, "promoted_tweet_status": {"name": "promoted_tweet_status", "description": "The status of the promoted tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "The status of the tweet's campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_status": {"name": "line_item_status", "description": "The status of the tweet's line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The timestamp the account was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.updated_at"]}, "language": {"name": "language", "description": "Two-letter language code of the tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions_sale_amount": {"name": "total_conversions_sale_amount", "description": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/twitter.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.022831, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__promoted_tweet_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\nwith report as (\n\n select \n *,\n {# Let's sum up conversions into general fields for ease of use #}\n {{ var('twitter_ads__conversion_fields') | join(' + ') if var('twitter_ads__conversion_fields') else 0 }} as total_conversions,\n {{ var('twitter_ads__conversion_sale_amount_fields') | join(' + ') if var('twitter_ads__conversion_sale_amount_fields') else 0 }} as total_conversions_sale_amount\n\n from {{ ref('stg_twitter_ads__promoted_tweet_report') }}\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_twitter_ads__campaign_history') }}\n where is_latest_version\n),\n\naccounts as (\n\n select *\n from {{ ref('stg_twitter_ads__account_history') }}\n where is_latest_version\n),\n\nline_items as (\n\n select *\n from {{ ref('stg_twitter_ads__line_item_history') }}\n where is_latest_version\n),\n\npromoted_tweets as (\n\n select *\n from {{ ref('stg_twitter_ads__promoted_tweet_history') }}\n where is_latest_version\n),\n\ntweets as (\n\n select *\n from {{ ref('stg_twitter_ads__tweet') }}\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n line_items.line_item_id,\n line_items.name as line_item_name,\n report.promoted_tweet_id,\n promoted_tweets.tweet_id,\n tweets.name as tweet_name,\n tweets.full_text,\n promoted_tweets.is_deleted,\n promoted_tweets.entity_status as promoted_tweet_status,\n campaigns.entity_status as campaign_status,\n line_items.entity_status as line_item_status,\n tweets.language,\n campaigns.currency,\n promoted_tweets.approval_status,\n promoted_tweets.created_timestamp,\n promoted_tweets.updated_timestamp,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n {# Persist all of the customizable fields #}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='twitter_ads__promoted_tweet_report_passthrough_metrics') }}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_sale_amount_fields', transform='sum', coalesce_with=0, except_variable='twitter_ads__promoted_tweet_report_passthrough_metrics') }}\n {{ fivetran_utils.persist_pass_through_columns('twitter_ads__promoted_tweet_report_passthrough_metrics', transform='sum') }}\n\n from report \n left join promoted_tweets \n on report.promoted_tweet_id = promoted_tweets.promoted_tweet_id\n and report.source_relation = promoted_tweets.source_relation\n left join tweets\n on promoted_tweets.tweet_id = tweets.tweet_id\n and promoted_tweets.source_relation = tweets.source_relation\n left join line_items\n on promoted_tweets.line_item_id = line_items.line_item_id\n and promoted_tweets.source_relation = line_items.source_relation\n left join campaigns \n on line_items.campaign_id = campaigns.campaign_id\n and line_items.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n\n {{ dbt_utils.group_by(22) }}\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__promoted_tweet_report", "package": null, "version": null}, {"name": "stg_twitter_ads__campaign_history", "package": null, "version": null}, {"name": "stg_twitter_ads__account_history", "package": null, "version": null}, {"name": "stg_twitter_ads__line_item_history", "package": null, "version": null}, {"name": "stg_twitter_ads__promoted_tweet_history", "package": null, "version": null}, {"name": "stg_twitter_ads__tweet", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.twitter_ads_persist_pass_through_columns", "macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_report", "model.twitter_ads.stg_twitter_ads__campaign_history", "model.twitter_ads.stg_twitter_ads__account_history", "model.twitter_ads.stg_twitter_ads__line_item_history", "model.twitter_ads.stg_twitter_ads__promoted_tweet_history", "model.twitter_ads.stg_twitter_ads__tweet"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter_ads__promoted_tweet_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select \n *,\n \n conversion_purchases_metric + conversion_custom_metric as total_conversions,\n conversion_purchases_sale_amount + conversion_custom_sale_amount as total_conversions_sale_amount\n\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_report\"\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_history\"\n where is_latest_version\n),\n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__account_history\"\n where is_latest_version\n),\n\nline_items as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_history\"\n where is_latest_version\n),\n\npromoted_tweets as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_history\"\n where is_latest_version\n),\n\ntweets as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__tweet\"\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n line_items.line_item_id,\n line_items.name as line_item_name,\n report.promoted_tweet_id,\n promoted_tweets.tweet_id,\n tweets.name as tweet_name,\n tweets.full_text,\n promoted_tweets.is_deleted,\n promoted_tweets.entity_status as promoted_tweet_status,\n campaigns.entity_status as campaign_status,\n line_items.entity_status as line_item_status,\n tweets.language,\n campaigns.currency,\n promoted_tweets.approval_status,\n promoted_tweets.created_timestamp,\n promoted_tweets.updated_timestamp,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n \n \n\n\n\n \n \n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_metric, 0)) as conversion_purchases_metric\n \n \n \n , sum(coalesce(conversion_custom_metric, 0)) as conversion_custom_metric\n \n \n\n\n\n \n\n\n\n \n \n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_sale_amount, 0)) as conversion_purchases_sale_amount\n \n \n \n , sum(coalesce(conversion_custom_sale_amount, 0)) as conversion_custom_sale_amount\n \n \n\n\n\n \n\n\n\n\n\n from report \n left join promoted_tweets \n on report.promoted_tweet_id = promoted_tweets.promoted_tweet_id\n and report.source_relation = promoted_tweets.source_relation\n left join tweets\n on promoted_tweets.tweet_id = tweets.tweet_id\n and promoted_tweets.source_relation = tweets.source_relation\n left join line_items\n on promoted_tweets.line_item_id = line_items.line_item_id\n and promoted_tweets.source_relation = line_items.source_relation\n left join campaigns \n on line_items.campaign_id = campaigns.campaign_id\n and line_items.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.twitter_ads__campaign_region_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "twitter_ads__campaign_region_report", "resource_type": "model", "package_name": "twitter_ads", "path": "twitter_ads__campaign_region_report.sql", "original_file_path": "models/twitter_ads__campaign_region_report.sql", "unique_id": "model.twitter_ads.twitter_ads__campaign_region_report", "fqn": ["twitter_ads", "twitter_ads__campaign_region_report"], "alias": "twitter_ads__campaign_region_report", "checksum": {"name": "sha256", "checksum": "5f324ec1e35b16869876699808bd8666b9e07ada850bd88a940b6757665a21cf"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the account and campaign level, within a placement in Twitter.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country": {"name": "country", "description": "Long-form name of the country being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.country"]}, "region": {"name": "region", "description": "Long-form name of the geopgraphic region being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.region"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks on that date. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions on that date. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend on that date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend_micro": {"name": "spend_micro", "description": "The amount of spend, in micros, on that date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The number of URL clicks on that date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "The name of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_created_timestamp": {"name": "campaign_created_timestamp", "description": "The timestamp the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.created_at"]}, "campaign_currency": {"name": "campaign_currency", "description": "The currency all metrics for the account are set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_campaign_deleted": {"name": "is_campaign_deleted", "description": "Whether the record has been deleted or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.deleted"]}, "campaign_end_timestamp": {"name": "campaign_end_timestamp", "description": "The time the campaign will end", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "The status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_frequency_cap": {"name": "campaign_frequency_cap", "description": "The maximum number of times an ad could be delivered to a user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_campaign_servable": {"name": "is_campaign_servable", "description": "Whether the campaign is in a state to be actively served to users.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_campaign_standard_delivery": {"name": "is_campaign_standard_delivery", "description": "Whether standard delivery is enabled (vs accelerated delivery).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_start_timestamp": {"name": "campaign_start_timestamp", "description": "The time the campaign will start.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_updated_timestamp": {"name": "campaign_updated_timestamp", "description": "The timestamp the account was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.updated_at"]}, "campaign_funding_instrument_id": {"name": "campaign_funding_instrument_id", "description": "Reference to the funding instrument.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_daily_budget_amount": {"name": "campaign_daily_budget_amount", "description": "The daily budget amount to be allocated to the campaign. The currency associated with the specified funding instrument will be used.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_total_budget_amount": {"name": "campaign_total_budget_amount", "description": "The total budget amount to be allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions_sale_amount": {"name": "total_conversions_sale_amount", "description": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/twitter.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.0336723, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_region_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True) and var('twitter_ads__using_campaign_regions_report', False)) }}\n\nwith report as (\n\n select \n *,\n {# Let's sum up conversions into general fields for ease of use #}\n {{ var('twitter_ads__conversion_fields') | join(' + ') if var('twitter_ads__conversion_fields') else 0 }} as total_conversions,\n {{ var('twitter_ads__conversion_sale_amount_fields') | join(' + ') if var('twitter_ads__conversion_sale_amount_fields') else 0 }} as total_conversions_sale_amount\n\n from {{ ref('stg_twitter_ads__campaign_regions_report') }}\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_twitter_ads__campaign_history') }}\n where is_latest_version\n),\n\naccounts as (\n\n select *\n from {{ ref('stg_twitter_ads__account_history') }}\n where is_latest_version\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.region,\n report.country,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n report.campaign_id,\n campaigns.campaign_name,\n campaigns.is_deleted as is_campaign_deleted,\n campaigns.entity_status as campaign_status,\n campaigns.currency as campaign_currency,\n campaigns.is_servable as is_campaign_servable,\n campaigns.is_standard_delivery as is_campaign_standard_delivery,\n campaigns.frequency_cap as campaign_frequency_cap,\n campaigns.start_timestamp as campaign_start_timestamp,\n campaigns.end_timestamp as campaign_end_timestamp,\n campaigns.created_timestamp as campaign_created_timestamp,\n campaigns.updated_timestamp as campaign_updated_timestamp,\n campaigns.funding_instrument_id as campaign_funding_instrument_id,\n campaigns.daily_budget_amount as campaign_daily_budget_amount,\n campaigns.total_budget_amount as campaign_total_budget_amount,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n {# Persist all of the customizable fields #}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_fields', transform='sum', coalesce_with=0) }}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_sale_amount_fields', transform='sum', coalesce_with=0) }}\n {{ fivetran_utils.persist_pass_through_columns('twitter_ads__campaign_regions_report_passthrough_metrics', transform='sum') }}\n\n from report \n left join campaigns \n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n\n {{ dbt_utils.group_by(22) }}\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_regions_report", "package": null, "version": null}, {"name": "stg_twitter_ads__campaign_history", "package": null, "version": null}, {"name": "stg_twitter_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.twitter_ads_persist_pass_through_columns", "macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_regions_report", "model.twitter_ads.stg_twitter_ads__campaign_history", "model.twitter_ads.stg_twitter_ads__account_history"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter_ads__campaign_region_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select \n *,\n \n conversion_purchases_metric + conversion_custom_metric as total_conversions,\n conversion_purchases_sale_amount + conversion_custom_sale_amount as total_conversions_sale_amount\n\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_regions_report\"\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_history\"\n where is_latest_version\n),\n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__account_history\"\n where is_latest_version\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.region,\n report.country,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n report.campaign_id,\n campaigns.campaign_name,\n campaigns.is_deleted as is_campaign_deleted,\n campaigns.entity_status as campaign_status,\n campaigns.currency as campaign_currency,\n campaigns.is_servable as is_campaign_servable,\n campaigns.is_standard_delivery as is_campaign_standard_delivery,\n campaigns.frequency_cap as campaign_frequency_cap,\n campaigns.start_timestamp as campaign_start_timestamp,\n campaigns.end_timestamp as campaign_end_timestamp,\n campaigns.created_timestamp as campaign_created_timestamp,\n campaigns.updated_timestamp as campaign_updated_timestamp,\n campaigns.funding_instrument_id as campaign_funding_instrument_id,\n campaigns.daily_budget_amount as campaign_daily_budget_amount,\n campaigns.total_budget_amount as campaign_total_budget_amount,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n \n \n\n\n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_metric, 0)) as conversion_purchases_metric\n \n \n \n , sum(coalesce(conversion_custom_metric, 0)) as conversion_custom_metric\n \n \n\n\n\n \n\n\n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_sale_amount, 0)) as conversion_purchases_sale_amount\n \n \n \n , sum(coalesce(conversion_custom_sale_amount, 0)) as conversion_custom_sale_amount\n \n \n\n\n\n \n\n\n\n\n\n from report \n left join campaigns \n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.twitter_ads__account_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "twitter_ads__account_report", "resource_type": "model", "package_name": "twitter_ads", "path": "twitter_ads__account_report.sql", "original_file_path": "models/twitter_ads__account_report.sql", "unique_id": "model.twitter_ads.twitter_ads__account_report", "fqn": ["twitter_ads", "twitter_ads__account_report"], "alias": "twitter_ads__account_report", "checksum": {"name": "sha256", "checksum": "5cbe68fd857b25e8022c923542748da6bdb26b0c8d9ae39ab62a31c1961fc4c6"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the account level, within a placement in Twitter.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "spend_micro": {"name": "spend_micro", "description": "The spend (in micros) for the account on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend for the account on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for th account on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the account on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The url clicks for the account on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "approval_status": {"name": "approval_status", "description": "The approval status of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "business_id": {"name": "business_id", "description": "The ID of the related business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "business_name": {"name": "business_name", "description": "The name of the related business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The timestamp the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.created_at"]}, "is_deleted": {"name": "is_deleted", "description": "Whether the record has been deleted or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.deleted"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "Name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "industry_type": {"name": "industry_type", "description": "The industry of the accounts.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone": {"name": "timezone", "description": "The timezone the account is set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone_switched_timestamp": {"name": "timezone_switched_timestamp", "description": "The timestamp the account's timezone was last changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The timestamp the account was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.updated_at"]}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions_sale_amount": {"name": "total_conversions_sale_amount", "description": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/twitter.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.0172524, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__account_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\nwith accounts as (\n\n select *\n from {{ ref('stg_twitter_ads__account_history') }}\n where is_latest_version\n),\n\npromoted_tweet_report as (\n \n select \n *,\n {# Let's sum up conversions into general fields for ease of use #}\n {{ var('twitter_ads__conversion_fields') | join(' + ') if var('twitter_ads__conversion_fields') else 0 }} as total_conversions,\n {{ var('twitter_ads__conversion_sale_amount_fields') | join(' + ') if var('twitter_ads__conversion_sale_amount_fields') else 0 }} as total_conversions_sale_amount\n\n from {{ ref('stg_twitter_ads__promoted_tweet_report') }}\n),\n\nrollup_report as (\n\n select \n source_relation,\n date_day,\n account_id,\n placement,\n sum(clicks) as clicks, \n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(spend_micro) as spend_micro,\n sum(url_clicks) as url_clicks,\n sum(total_conversions) as total_conversions,\n sum(total_conversions_sale_amount) as total_conversions_sale_amount\n\n {# Persist all of the customizable fields #}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='twitter_ads__promoted_tweet_report_passthrough_metrics') }}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_sale_amount_fields', transform='sum', coalesce_with=0, except_variable='twitter_ads__promoted_tweet_report_passthrough_metrics') }}\n {{ fivetran_utils.persist_pass_through_columns('twitter_ads__promoted_tweet_report_passthrough_metrics', transform='sum') }}\n \n from promoted_tweet_report\n {{ dbt_utils.group_by(4) }}\n\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n accounts.is_deleted,\n accounts.timezone,\n accounts.industry_type,\n accounts.approval_status,\n accounts.business_name,\n accounts.business_id,\n accounts.created_timestamp,\n accounts.updated_timestamp,\n accounts.timezone_switched_timestamp,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n {# Persist all of the customizable fields #}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='twitter_ads__promoted_tweet_report_passthrough_metrics') }}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_sale_amount_fields', transform='sum', coalesce_with=0, except_variable='twitter_ads__promoted_tweet_report_passthrough_metrics') }}\n {{ fivetran_utils.persist_pass_through_columns('twitter_ads__promoted_tweet_report_passthrough_metrics', transform='sum') }}\n\n from rollup_report as report\n left join accounts \n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n\n {{ dbt_utils.group_by(14) }}\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__account_history", "package": null, "version": null}, {"name": "stg_twitter_ads__promoted_tweet_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.twitter_ads_persist_pass_through_columns", "macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.twitter_ads.stg_twitter_ads__account_history", "model.twitter_ads.stg_twitter_ads__promoted_tweet_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter_ads__account_report.sql", "compiled": true, "compiled_code": "\n\nwith accounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__account_history\"\n where is_latest_version\n),\n\npromoted_tweet_report as (\n \n select \n *,\n \n conversion_purchases_metric + conversion_custom_metric as total_conversions,\n conversion_purchases_sale_amount + conversion_custom_sale_amount as total_conversions_sale_amount\n\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_report\"\n),\n\nrollup_report as (\n\n select \n source_relation,\n date_day,\n account_id,\n placement,\n sum(clicks) as clicks, \n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(spend_micro) as spend_micro,\n sum(url_clicks) as url_clicks,\n sum(total_conversions) as total_conversions,\n sum(total_conversions_sale_amount) as total_conversions_sale_amount\n\n \n \n\n\n\n \n \n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_metric, 0)) as conversion_purchases_metric\n \n \n \n , sum(coalesce(conversion_custom_metric, 0)) as conversion_custom_metric\n \n \n\n\n\n \n\n\n\n \n \n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_sale_amount, 0)) as conversion_purchases_sale_amount\n \n \n \n , sum(coalesce(conversion_custom_sale_amount, 0)) as conversion_custom_sale_amount\n \n \n\n\n\n \n\n\n\n\n \n from promoted_tweet_report\n group by 1,2,3,4\n\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n accounts.is_deleted,\n accounts.timezone,\n accounts.industry_type,\n accounts.approval_status,\n accounts.business_name,\n accounts.business_id,\n accounts.created_timestamp,\n accounts.updated_timestamp,\n accounts.timezone_switched_timestamp,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n \n \n\n\n\n \n \n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_metric, 0)) as conversion_purchases_metric\n \n \n \n , sum(coalesce(conversion_custom_metric, 0)) as conversion_custom_metric\n \n \n\n\n\n \n\n\n\n \n \n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_sale_amount, 0)) as conversion_purchases_sale_amount\n \n \n \n , sum(coalesce(conversion_custom_sale_amount, 0)) as conversion_custom_sale_amount\n \n \n\n\n\n \n\n\n\n\n\n from rollup_report as report\n left join accounts \n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.twitter_ads__campaign_country_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "twitter_ads__campaign_country_report", "resource_type": "model", "package_name": "twitter_ads", "path": "twitter_ads__campaign_country_report.sql", "original_file_path": "models/twitter_ads__campaign_country_report.sql", "unique_id": "model.twitter_ads.twitter_ads__campaign_country_report", "fqn": ["twitter_ads", "twitter_ads__campaign_country_report"], "alias": "twitter_ads__campaign_country_report", "checksum": {"name": "sha256", "checksum": "8e653901f4ed7ea5c76734f30ba2bba6750afa61f84fc699c0597552a6e14f4c"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the account and campaign level, within a placement in Twitter.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country": {"name": "country", "description": "Long-form name of the country being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.country"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks on that date. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions on that date. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend on that date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend_micro": {"name": "spend_micro", "description": "The amount of spend, in micros, on that date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The number of URL clicks on that date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "The name of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_created_timestamp": {"name": "campaign_created_timestamp", "description": "The timestamp the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.created_at"]}, "campaign_currency": {"name": "campaign_currency", "description": "The currency all metrics for the account are set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_campaign_deleted": {"name": "is_campaign_deleted", "description": "Whether the record has been deleted or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.deleted"]}, "campaign_end_timestamp": {"name": "campaign_end_timestamp", "description": "The time the campaign will end", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "The status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_frequency_cap": {"name": "campaign_frequency_cap", "description": "The maximum number of times an ad could be delivered to a user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_campaign_servable": {"name": "is_campaign_servable", "description": "Whether the campaign is in a state to be actively served to users.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_campaign_standard_delivery": {"name": "is_campaign_standard_delivery", "description": "Whether standard delivery is enabled (vs accelerated delivery).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_start_timestamp": {"name": "campaign_start_timestamp", "description": "The time the campaign will start.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_updated_timestamp": {"name": "campaign_updated_timestamp", "description": "The timestamp the account was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.updated_at"]}, "campaign_funding_instrument_id": {"name": "campaign_funding_instrument_id", "description": "Reference to the funding instrument.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_daily_budget_amount": {"name": "campaign_daily_budget_amount", "description": "The daily budget amount to be allocated to the campaign. The currency associated with the specified funding instrument will be used.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_total_budget_amount": {"name": "campaign_total_budget_amount", "description": "The total budget amount to be allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions_sale_amount": {"name": "total_conversions_sale_amount", "description": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/twitter.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.0315666, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_country_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True) and var('twitter_ads__using_campaign_locations_report', False)) }}\n\nwith report as (\n\n select \n *,\n {# Let's sum up conversions into general fields for ease of use #}\n {{ var('twitter_ads__conversion_fields') | join(' + ') if var('twitter_ads__conversion_fields') else 0 }} as total_conversions,\n {{ var('twitter_ads__conversion_sale_amount_fields') | join(' + ') if var('twitter_ads__conversion_sale_amount_fields') else 0 }} as total_conversions_sale_amount\n\n from {{ ref('stg_twitter_ads__campaign_locations_report') }}\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_twitter_ads__campaign_history') }}\n where is_latest_version\n),\n\naccounts as (\n\n select *\n from {{ ref('stg_twitter_ads__account_history') }}\n where is_latest_version\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.country,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n report.campaign_id,\n campaigns.campaign_name,\n campaigns.is_deleted as is_campaign_deleted,\n campaigns.entity_status as campaign_status,\n campaigns.currency as campaign_currency,\n campaigns.is_servable as is_campaign_servable,\n campaigns.is_standard_delivery as is_campaign_standard_delivery,\n campaigns.frequency_cap as campaign_frequency_cap,\n campaigns.start_timestamp as campaign_start_timestamp,\n campaigns.end_timestamp as campaign_end_timestamp,\n campaigns.created_timestamp as campaign_created_timestamp,\n campaigns.updated_timestamp as campaign_updated_timestamp,\n campaigns.funding_instrument_id as campaign_funding_instrument_id,\n campaigns.daily_budget_amount as campaign_daily_budget_amount,\n campaigns.total_budget_amount as campaign_total_budget_amount,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n {# Persist all of the customizable fields #}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_fields', transform='sum', coalesce_with=0) }}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_sale_amount_fields', transform='sum', coalesce_with=0) }}\n {{ fivetran_utils.persist_pass_through_columns('twitter_ads__campaign_locations_report_passthrough_metrics', transform='sum') }}\n\n from report \n left join campaigns \n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n\n {{ dbt_utils.group_by(21) }}\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_locations_report", "package": null, "version": null}, {"name": "stg_twitter_ads__campaign_history", "package": null, "version": null}, {"name": "stg_twitter_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.twitter_ads_persist_pass_through_columns", "macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_locations_report", "model.twitter_ads.stg_twitter_ads__campaign_history", "model.twitter_ads.stg_twitter_ads__account_history"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter_ads__campaign_country_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select \n *,\n \n conversion_purchases_metric + conversion_custom_metric as total_conversions,\n conversion_purchases_sale_amount + conversion_custom_sale_amount as total_conversions_sale_amount\n\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_locations_report\"\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_history\"\n where is_latest_version\n),\n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__account_history\"\n where is_latest_version\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.country,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n report.campaign_id,\n campaigns.campaign_name,\n campaigns.is_deleted as is_campaign_deleted,\n campaigns.entity_status as campaign_status,\n campaigns.currency as campaign_currency,\n campaigns.is_servable as is_campaign_servable,\n campaigns.is_standard_delivery as is_campaign_standard_delivery,\n campaigns.frequency_cap as campaign_frequency_cap,\n campaigns.start_timestamp as campaign_start_timestamp,\n campaigns.end_timestamp as campaign_end_timestamp,\n campaigns.created_timestamp as campaign_created_timestamp,\n campaigns.updated_timestamp as campaign_updated_timestamp,\n campaigns.funding_instrument_id as campaign_funding_instrument_id,\n campaigns.daily_budget_amount as campaign_daily_budget_amount,\n campaigns.total_budget_amount as campaign_total_budget_amount,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n \n \n\n\n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_metric, 0)) as conversion_purchases_metric\n \n \n \n , sum(coalesce(conversion_custom_metric, 0)) as conversion_custom_metric\n \n \n\n\n\n \n\n\n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_sale_amount, 0)) as conversion_purchases_sale_amount\n \n \n \n , sum(coalesce(conversion_custom_sale_amount, 0)) as conversion_custom_sale_amount\n \n \n\n\n\n \n\n\n\n\n\n from report \n left join campaigns \n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.twitter_ads__url_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "twitter_ads__url_report", "resource_type": "model", "package_name": "twitter_ads", "path": "twitter_ads__url_report.sql", "original_file_path": "models/twitter_ads__url_report.sql", "unique_id": "model.twitter_ads.twitter_ads__url_report", "fqn": ["twitter_ads", "twitter_ads__url_report"], "alias": "twitter_ads__url_report", "checksum": {"name": "sha256", "checksum": "cc59a82d5690a3359dc4223b4a07254449ccb6a5d1e16191bf4d9a9534edabfd"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the account, campaign, line item (ad group), promoted tweet, and url level, within a placement in Twitter.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "The name of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_id": {"name": "line_item_id", "description": "The ID of the related line item (ad group).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_name": {"name": "line_item_name", "description": "The ID of the related line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "promoted_tweet_id": {"name": "promoted_tweet_id", "description": "The ID of the promoted tweet that the URL appeared in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tweet_id": {"name": "tweet_id", "description": "The ID of the tweet that the URL appeared in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tweet_name": {"name": "tweet_name", "description": "The name, if provided, of the tweet that the URL appeared in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tweet_full_text": {"name": "tweet_full_text", "description": "The full text of the tweet that the URL appeared in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_host": {"name": "url_host", "description": "The URL host of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_path": {"name": "url_path", "description": "The URL path of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_source": {"name": "utm_source", "description": "The utm_source parameter of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_medium": {"name": "utm_medium", "description": "The utm_medium parameter of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_campaign": {"name": "utm_campaign", "description": "The utm_campaign parameter of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_content": {"name": "utm_content", "description": "The utm_content parameter of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_term": {"name": "utm_term", "description": "The utm_term parameter of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "display_url": {"name": "display_url", "description": "The URL as it will be displayed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "expanded_url": {"name": "expanded_url", "description": "The fully expanded URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The currency all metrics for the account are set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the promoted tweet + URL on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the promoted tweet + URL on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend for the promoted tweet + URL on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend_micro": {"name": "spend_micro", "description": "The spend, in micros, for the tweet + URL on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The URL clicks for the promoted tweet + URL on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions_sale_amount": {"name": "total_conversions_sale_amount", "description": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/twitter.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.0257258, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__url_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\nwith report as (\n\n select \n *,\n {# Let's sum up conversions into general fields for ease of use #}\n {{ var('twitter_ads__conversion_fields') | join(' + ') if var('twitter_ads__conversion_fields') else 0 }} as total_conversions,\n {{ var('twitter_ads__conversion_sale_amount_fields') | join(' + ') if var('twitter_ads__conversion_sale_amount_fields') else 0 }} as total_conversions_sale_amount\n\n from {{ ref('stg_twitter_ads__promoted_tweet_report') }}\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_twitter_ads__campaign_history') }}\n where is_latest_version\n),\n\naccounts as (\n\n select *\n from {{ ref('stg_twitter_ads__account_history') }}\n where is_latest_version\n),\n\nline_items as (\n\n select *\n from {{ ref('stg_twitter_ads__line_item_history') }}\n where is_latest_version\n),\n\npromoted_tweets as (\n\n select *\n from {{ ref('stg_twitter_ads__promoted_tweet_history') }}\n where is_latest_version\n),\n\ntweets as (\n\n select *\n from {{ ref('stg_twitter_ads__tweet') }}\n),\n\ntweet_url as (\n\n select *\n from {{ ref('stg_twitter_ads__tweet_url') }}\n where index = 0\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n line_items.line_item_id,\n line_items.name as line_item_name,\n report.promoted_tweet_id,\n promoted_tweets.tweet_id,\n tweets.name as tweet_name,\n tweets.full_text as tweet_full_text,\n tweet_url.base_url,\n tweet_url.url_host,\n tweet_url.url_path,\n tweet_url.utm_source,\n tweet_url.utm_medium,\n tweet_url.utm_campaign,\n tweet_url.utm_content,\n tweet_url.utm_term,\n tweet_url.expanded_url,\n tweet_url.display_url,\n campaigns.currency,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n {# Persist all of the customizable fields #}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='twitter_ads__promoted_tweet_report_passthrough_metrics') }}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_sale_amount_fields', transform='sum', coalesce_with=0, except_variable='twitter_ads__promoted_tweet_report_passthrough_metrics') }}\n {{ fivetran_utils.persist_pass_through_columns('twitter_ads__promoted_tweet_report_passthrough_metrics', transform='sum') }}\n\n from report \n left join promoted_tweets \n on report.promoted_tweet_id = promoted_tweets.promoted_tweet_id\n and report.source_relation = promoted_tweets.source_relation\n left join tweet_url \n on promoted_tweets.tweet_id = tweet_url.tweet_id\n and promoted_tweets.source_relation = tweet_url.source_relation\n left join tweets\n on promoted_tweets.tweet_id = tweets.tweet_id\n and promoted_tweets.source_relation = tweets.source_relation\n left join line_items\n on promoted_tweets.line_item_id = line_items.line_item_id\n and promoted_tweets.source_relation = line_items.source_relation\n left join campaigns \n on line_items.campaign_id = campaigns.campaign_id\n and line_items.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n \n {% if var('ad_reporting__url_report__using_null_filter', True) %}\n where tweet_url.expanded_url is not null\n {% endif %}\n\n {{ dbt_utils.group_by(24) }}\n\n \n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__promoted_tweet_report", "package": null, "version": null}, {"name": "stg_twitter_ads__campaign_history", "package": null, "version": null}, {"name": "stg_twitter_ads__account_history", "package": null, "version": null}, {"name": "stg_twitter_ads__line_item_history", "package": null, "version": null}, {"name": "stg_twitter_ads__promoted_tweet_history", "package": null, "version": null}, {"name": "stg_twitter_ads__tweet", "package": null, "version": null}, {"name": "stg_twitter_ads__tweet_url", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.twitter_ads_persist_pass_through_columns", "macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_report", "model.twitter_ads.stg_twitter_ads__campaign_history", "model.twitter_ads.stg_twitter_ads__account_history", "model.twitter_ads.stg_twitter_ads__line_item_history", "model.twitter_ads.stg_twitter_ads__promoted_tweet_history", "model.twitter_ads.stg_twitter_ads__tweet", "model.twitter_ads.stg_twitter_ads__tweet_url"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter_ads__url_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select \n *,\n \n conversion_purchases_metric + conversion_custom_metric as total_conversions,\n conversion_purchases_sale_amount + conversion_custom_sale_amount as total_conversions_sale_amount\n\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_report\"\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_history\"\n where is_latest_version\n),\n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__account_history\"\n where is_latest_version\n),\n\nline_items as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_history\"\n where is_latest_version\n),\n\npromoted_tweets as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_history\"\n where is_latest_version\n),\n\ntweets as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__tweet\"\n),\n\ntweet_url as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__tweet_url\"\n where index = 0\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n line_items.line_item_id,\n line_items.name as line_item_name,\n report.promoted_tweet_id,\n promoted_tweets.tweet_id,\n tweets.name as tweet_name,\n tweets.full_text as tweet_full_text,\n tweet_url.base_url,\n tweet_url.url_host,\n tweet_url.url_path,\n tweet_url.utm_source,\n tweet_url.utm_medium,\n tweet_url.utm_campaign,\n tweet_url.utm_content,\n tweet_url.utm_term,\n tweet_url.expanded_url,\n tweet_url.display_url,\n campaigns.currency,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n \n \n\n\n\n \n \n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_metric, 0)) as conversion_purchases_metric\n \n \n \n , sum(coalesce(conversion_custom_metric, 0)) as conversion_custom_metric\n \n \n\n\n\n \n\n\n\n \n \n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_sale_amount, 0)) as conversion_purchases_sale_amount\n \n \n \n , sum(coalesce(conversion_custom_sale_amount, 0)) as conversion_custom_sale_amount\n \n \n\n\n\n \n\n\n\n\n\n from report \n left join promoted_tweets \n on report.promoted_tweet_id = promoted_tweets.promoted_tweet_id\n and report.source_relation = promoted_tweets.source_relation\n left join tweet_url \n on promoted_tweets.tweet_id = tweet_url.tweet_id\n and promoted_tweets.source_relation = tweet_url.source_relation\n left join tweets\n on promoted_tweets.tweet_id = tweets.tweet_id\n and promoted_tweets.source_relation = tweets.source_relation\n left join line_items\n on promoted_tweets.line_item_id = line_items.line_item_id\n and promoted_tweets.source_relation = line_items.source_relation\n left join campaigns \n on line_items.campaign_id = campaigns.campaign_id\n and line_items.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n \n \n where tweet_url.expanded_url is not null\n \n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24\n\n \n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.twitter_ads__line_item_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "twitter_ads__line_item_report", "resource_type": "model", "package_name": "twitter_ads", "path": "twitter_ads__line_item_report.sql", "original_file_path": "models/twitter_ads__line_item_report.sql", "unique_id": "model.twitter_ads.twitter_ads__line_item_report", "fqn": ["twitter_ads", "twitter_ads__line_item_report"], "alias": "twitter_ads__line_item_report", "checksum": {"name": "sha256", "checksum": "cdde5ad082dcf2e5848646fbad87c8efb5540f8a5db0f61e95c7dba5aab28eb7"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the account, campaign, and line item (ad group) level, within a placement in Twitter.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the line item's campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the line item's campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks on that date. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions on that date. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_id": {"name": "line_item_id", "description": "The ID of the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_name": {"name": "line_item_name", "description": "The name of the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend on that date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend_micro": {"name": "spend_micro", "description": "The amount of spend, in micros, on that date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The number of URL clicks on that date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "The name of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_domain": {"name": "advertiser_domain", "description": "The website domain for this advertiser, without the protocol specification.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_user_id": {"name": "advertiser_user_id", "description": "The Twitter user identifier for the handle promoting the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_type": {"name": "bid_type", "description": "The bidding mechanism.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_unit": {"name": "bid_unit", "description": "The bid unit for this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "charge_by": {"name": "charge_by", "description": "The unit to charge this line item by.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The timestamp the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.created_at"]}, "creative_source": {"name": "creative_source", "description": "The source of the creatives for the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The currency in which metrics will be reported.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_deleted": {"name": "is_deleted", "description": "Whether the record has been deleted or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.deleted"]}, "end_timestamp": {"name": "end_timestamp", "description": "The timestamp at which the line item will stop being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_status": {"name": "line_item_status", "description": "The status of the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "The status of the line item's related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective": {"name": "objective", "description": "The campaign objective for this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "optimization": {"name": "optimization", "description": "The optimization setting to use with this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "primary_web_event_tag": {"name": "primary_web_event_tag", "description": "The identifier of the primary web event tag. Allows more accurate tracking of engagements for the campaign pertaining to this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "product_type": {"name": "product_type", "description": "The type of promoted product that this line item will contain.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_timestamp": {"name": "start_timestamp", "description": "The timestamp at which the line item will start being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The timestamp the account was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.updated_at"]}, "bid_amount": {"name": "bid_amount", "description": "The bid amount to be associated with this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_budget_amount": {"name": "total_budget_amount", "description": "The total budget amount to be allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "target_cpa": {"name": "target_cpa", "description": "The target cost per acquisition for the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions_sale_amount": {"name": "total_conversions_sale_amount", "description": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/twitter.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.0138855, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__line_item_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\nwith report as (\n\n select \n *,\n {# Let's sum up conversions into general fields for ease of use #}\n {{ var('twitter_ads__conversion_fields') | join(' + ') if var('twitter_ads__conversion_fields') else 0 }} as total_conversions,\n {{ var('twitter_ads__conversion_sale_amount_fields') | join(' + ') if var('twitter_ads__conversion_sale_amount_fields') else 0 }} as total_conversions_sale_amount\n\n from {{ ref('stg_twitter_ads__line_item_report') }}\n),\n\nline_items as (\n\n select *\n from {{ ref('stg_twitter_ads__line_item_history') }}\n where is_latest_version\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_twitter_ads__campaign_history') }}\n where is_latest_version\n),\n\naccounts as (\n\n select *\n from {{ ref('stg_twitter_ads__account_history') }}\n where is_latest_version\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n line_items.campaign_id,\n campaigns.campaign_name,\n report.line_item_id,\n line_items.name as line_item_name,\n line_items.is_deleted,\n line_items.entity_status as line_item_status,\n campaigns.entity_status as campaign_status,\n line_items.currency,\n line_items.advertiser_domain,\n line_items.advertiser_user_id,\n line_items.bid_type,\n line_items.bid_unit,\n line_items.charge_by,\n line_items.objective,\n line_items.optimization,\n line_items.product_type,\n line_items.primary_web_event_tag,\n line_items.creative_source,\n line_items.start_timestamp,\n line_items.end_timestamp,\n line_items.created_timestamp,\n line_items.updated_timestamp,\n line_items.target_cpa,\n line_items.total_budget_amount,\n line_items.bid_amount,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n {# Persist all of the customizable fields #}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='twitter_ads__line_item_report_passthrough_metrics') }}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_sale_amount_fields', transform='sum', coalesce_with=0, except_variable='twitter_ads__line_item_report_passthrough_metrics') }}\n {{ fivetran_utils.persist_pass_through_columns('twitter_ads__line_item_report_passthrough_metrics', transform='sum')}}\n\n from report \n left join line_items\n on report.line_item_id = line_items.line_item_id\n and report.source_relation = line_items.source_relation\n left join campaigns \n on line_items.campaign_id = campaigns.campaign_id\n and line_items.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n\n {{ dbt_utils.group_by(30) }}\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__line_item_report", "package": null, "version": null}, {"name": "stg_twitter_ads__line_item_history", "package": null, "version": null}, {"name": "stg_twitter_ads__campaign_history", "package": null, "version": null}, {"name": "stg_twitter_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.twitter_ads_persist_pass_through_columns", "macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.twitter_ads.stg_twitter_ads__line_item_report", "model.twitter_ads.stg_twitter_ads__line_item_history", "model.twitter_ads.stg_twitter_ads__campaign_history", "model.twitter_ads.stg_twitter_ads__account_history"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter_ads__line_item_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select \n *,\n \n conversion_purchases_metric + conversion_custom_metric as total_conversions,\n conversion_purchases_sale_amount + conversion_custom_sale_amount as total_conversions_sale_amount\n\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_report\"\n),\n\nline_items as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_history\"\n where is_latest_version\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_history\"\n where is_latest_version\n),\n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__account_history\"\n where is_latest_version\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n line_items.campaign_id,\n campaigns.campaign_name,\n report.line_item_id,\n line_items.name as line_item_name,\n line_items.is_deleted,\n line_items.entity_status as line_item_status,\n campaigns.entity_status as campaign_status,\n line_items.currency,\n line_items.advertiser_domain,\n line_items.advertiser_user_id,\n line_items.bid_type,\n line_items.bid_unit,\n line_items.charge_by,\n line_items.objective,\n line_items.optimization,\n line_items.product_type,\n line_items.primary_web_event_tag,\n line_items.creative_source,\n line_items.start_timestamp,\n line_items.end_timestamp,\n line_items.created_timestamp,\n line_items.updated_timestamp,\n line_items.target_cpa,\n line_items.total_budget_amount,\n line_items.bid_amount,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n \n \n\n\n\n \n \n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_metric, 0)) as conversion_purchases_metric\n \n \n \n , sum(coalesce(conversion_custom_metric, 0)) as conversion_custom_metric\n \n \n\n\n\n \n\n\n\n \n \n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_sale_amount, 0)) as conversion_purchases_sale_amount\n \n \n \n , sum(coalesce(conversion_custom_sale_amount, 0)) as conversion_custom_sale_amount\n \n \n\n\n\n \n\n\n\n\n\n from report \n left join line_items\n on report.line_item_id = line_items.line_item_id\n and report.source_relation = line_items.source_relation\n left join campaigns \n on line_items.campaign_id = campaigns.campaign_id\n and line_items.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.twitter_ads__keyword_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "twitter_ads__keyword_report", "resource_type": "model", "package_name": "twitter_ads", "path": "twitter_ads__keyword_report.sql", "original_file_path": "models/twitter_ads__keyword_report.sql", "unique_id": "model.twitter_ads.twitter_ads__keyword_report", "fqn": ["twitter_ads", "twitter_ads__keyword_report"], "alias": "twitter_ads__keyword_report", "checksum": {"name": "sha256", "checksum": "58e23c6e46746a3a61028882c9d0c88fb19b447092dcc2a211b3694168c22435"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the account, campaign, line item (ad group), and keyword level, within a placement in Twitter.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend_micro": {"name": "spend_micro", "description": "The spend for the line item + keyword on that day, in micros and in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend for the line item + keyword on that day in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the line item + keyword on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the line item + keyword on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The url clicks for the line item + keyword on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword": {"name": "keyword", "description": "The keyword whose performance is being tracked.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_id": {"name": "keyword_id", "description": "Unique key of the table built from the combination of 'account_id', 'line_item_id', 'segment', and 'placement' fields.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "Name of the associated account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_id": {"name": "line_item_id", "description": "The ID of the related line item (ad group).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_name": {"name": "line_item_name", "description": "The ID of the related line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The currency all metrics for the account are set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions_sale_amount": {"name": "total_conversions_sale_amount", "description": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/twitter.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.0189185, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__keyword_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__twitter_ads_enabled','twitter_ads__using_keywords'])) }}\n\nwith report as (\n\n select \n *,\n {# Let's sum up conversions into general fields for ease of use #}\n {{ var('twitter_ads__conversion_fields') | join(' + ') if var('twitter_ads__conversion_fields') else 0 }} as total_conversions,\n {{ var('twitter_ads__conversion_sale_amount_fields') | join(' + ') if var('twitter_ads__conversion_sale_amount_fields') else 0 }} as total_conversions_sale_amount\n\n from {{ ref('stg_twitter_ads__line_item_keywords_report') }}\n),\n\nline_items as (\n\n select *\n from {{ ref('stg_twitter_ads__line_item_history') }}\n where is_latest_version\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_twitter_ads__campaign_history') }}\n where is_latest_version\n),\n\naccounts as (\n\n select *\n from {{ ref('stg_twitter_ads__account_history') }}\n where is_latest_version\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n line_items.campaign_id,\n campaigns.campaign_name,\n report.line_item_id,\n line_items.name as line_item_name,\n report.keyword_id,\n report.keyword,\n line_items.currency,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='twitter_ads__line_item_keywords_report_passthrough_metrics') }}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_sale_amount_fields', transform='sum', coalesce_with=0, except_variable='twitter_ads__line_item_keywords_report_passthrough_metrics') }}\n {{ fivetran_utils.persist_pass_through_columns('twitter_ads__line_item_keywords_report_passthrough_metrics', transform='sum')}}\n\n from report \n left join line_items\n on report.line_item_id = line_items.line_item_id\n and report.source_relation = line_items.source_relation\n left join campaigns \n on line_items.campaign_id = campaigns.campaign_id\n and line_items.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n\n {{ dbt_utils.group_by(12) }}\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__line_item_keywords_report", "package": null, "version": null}, {"name": "stg_twitter_ads__line_item_history", "package": null, "version": null}, {"name": "stg_twitter_ads__campaign_history", "package": null, "version": null}, {"name": "stg_twitter_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.twitter_ads.twitter_ads_persist_pass_through_columns", "macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.twitter_ads.stg_twitter_ads__line_item_keywords_report", "model.twitter_ads.stg_twitter_ads__line_item_history", "model.twitter_ads.stg_twitter_ads__campaign_history", "model.twitter_ads.stg_twitter_ads__account_history"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter_ads__keyword_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select \n *,\n \n conversion_purchases_metric + conversion_custom_metric as total_conversions,\n conversion_purchases_sale_amount + conversion_custom_sale_amount as total_conversions_sale_amount\n\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_keywords_report\"\n),\n\nline_items as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_history\"\n where is_latest_version\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_history\"\n where is_latest_version\n),\n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__account_history\"\n where is_latest_version\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n line_items.campaign_id,\n campaigns.campaign_name,\n report.line_item_id,\n line_items.name as line_item_name,\n report.keyword_id,\n report.keyword,\n line_items.currency,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n \n\n\n\n \n \n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_metric, 0)) as conversion_purchases_metric\n \n \n \n , sum(coalesce(conversion_custom_metric, 0)) as conversion_custom_metric\n \n \n\n\n\n \n\n\n\n \n \n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_sale_amount, 0)) as conversion_purchases_sale_amount\n \n \n \n , sum(coalesce(conversion_custom_sale_amount, 0)) as conversion_custom_sale_amount\n \n \n\n\n\n \n\n\n\n\n\n from report \n left join line_items\n on report.line_item_id = line_items.line_item_id\n and report.source_relation = line_items.source_relation\n left join campaigns \n on line_items.campaign_id = campaigns.campaign_id\n and line_items.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.twitter_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "twitter_ads__campaign_report", "resource_type": "model", "package_name": "twitter_ads", "path": "twitter_ads__campaign_report.sql", "original_file_path": "models/twitter_ads__campaign_report.sql", "unique_id": "model.twitter_ads.twitter_ads__campaign_report", "fqn": ["twitter_ads", "twitter_ads__campaign_report"], "alias": "twitter_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "83ec21dd1a14f586c35629703d9cbf532a15fa7177f64484d284c1a897e11370"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the account and campaign level, within a placement in Twitter.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks on that date. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions on that date. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend on that date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend_micro": {"name": "spend_micro", "description": "The amount of spend, in micros, on that date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The number of URL clicks on that date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "The name of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The timestamp the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.created_at"]}, "currency": {"name": "currency", "description": "The currency all metrics for the account are set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_deleted": {"name": "is_deleted", "description": "Whether the record has been deleted or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.deleted"]}, "end_timestamp": {"name": "end_timestamp", "description": "The time the campaign will end", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "The status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "frequency_cap": {"name": "frequency_cap", "description": "The maximum number of times an ad could be delivered to a user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_servable": {"name": "is_servable", "description": "Whether the campaign is in a state to be actively served to users.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_standard_delivery": {"name": "is_standard_delivery", "description": "Whether standard delivery is enabled (vs accelerated delivery).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_timestamp": {"name": "start_timestamp", "description": "The time the campaign will start.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The timestamp the account was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.updated_at"]}, "funding_instrument_id": {"name": "funding_instrument_id", "description": "Reference to the funding instrument.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_amount": {"name": "daily_budget_amount", "description": "The daily budget amount to be allocated to the campaign. The currency associated with the specified funding instrument will be used.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_budget_amount": {"name": "total_budget_amount", "description": "The total budget amount to be allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions_sale_amount": {"name": "total_conversions_sale_amount", "description": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/twitter.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.007622, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\nwith report as (\n\n select \n *,\n {# Let's sum up conversions into general fields for ease of use #}\n {{ var('twitter_ads__conversion_fields') | join(' + ') if var('twitter_ads__conversion_fields') else 0 }} as total_conversions,\n {{ var('twitter_ads__conversion_sale_amount_fields') | join(' + ') if var('twitter_ads__conversion_sale_amount_fields') else 0 }} as total_conversions_sale_amount\n\n from {{ ref('stg_twitter_ads__campaign_report') }}\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_twitter_ads__campaign_history') }}\n where is_latest_version\n),\n\naccounts as (\n\n select *\n from {{ ref('stg_twitter_ads__account_history') }}\n where is_latest_version\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n report.campaign_id,\n campaigns.campaign_name,\n campaigns.is_deleted,\n campaigns.entity_status as campaign_status,\n campaigns.currency,\n campaigns.is_servable,\n campaigns.is_standard_delivery,\n campaigns.frequency_cap,\n campaigns.start_timestamp,\n campaigns.end_timestamp,\n campaigns.created_timestamp,\n campaigns.updated_timestamp,\n campaigns.funding_instrument_id,\n campaigns.daily_budget_amount,\n campaigns.total_budget_amount,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n {# Persist all of the customizable fields #}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='twitter_ads__campaign_report_passthrough_metrics') }}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_sale_amount_fields', transform='sum', coalesce_with=0, except_variable='twitter_ads__campaign_report_passthrough_metrics') }}\n {{ fivetran_utils.persist_pass_through_columns('twitter_ads__campaign_report_passthrough_metrics', transform='sum') }}\n\n from report \n left join campaigns \n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n\n {{ dbt_utils.group_by(20) }}\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_report", "package": null, "version": null}, {"name": "stg_twitter_ads__campaign_history", "package": null, "version": null}, {"name": "stg_twitter_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.twitter_ads_persist_pass_through_columns", "macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_report", "model.twitter_ads.stg_twitter_ads__campaign_history", "model.twitter_ads.stg_twitter_ads__account_history"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select \n *,\n \n conversion_purchases_metric + conversion_custom_metric as total_conversions,\n conversion_purchases_sale_amount + conversion_custom_sale_amount as total_conversions_sale_amount\n\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_report\"\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_history\"\n where is_latest_version\n),\n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__account_history\"\n where is_latest_version\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n report.campaign_id,\n campaigns.campaign_name,\n campaigns.is_deleted,\n campaigns.entity_status as campaign_status,\n campaigns.currency,\n campaigns.is_servable,\n campaigns.is_standard_delivery,\n campaigns.frequency_cap,\n campaigns.start_timestamp,\n campaigns.end_timestamp,\n campaigns.created_timestamp,\n campaigns.updated_timestamp,\n campaigns.funding_instrument_id,\n campaigns.daily_budget_amount,\n campaigns.total_budget_amount,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n \n \n\n\n\n \n \n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_metric, 0)) as conversion_purchases_metric\n \n \n \n , sum(coalesce(conversion_custom_metric, 0)) as conversion_custom_metric\n \n \n\n\n\n \n\n\n\n \n \n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_sale_amount, 0)) as conversion_purchases_sale_amount\n \n \n \n , sum(coalesce(conversion_custom_sale_amount, 0)) as conversion_custom_sale_amount\n \n \n\n\n\n \n\n\n\n\n\n from report \n left join campaigns \n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__tweet": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__tweet", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/stg_twitter_ads__tweet.sql", "original_file_path": "models/staging/stg_twitter_ads__tweet.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__tweet", "fqn": ["twitter_ads", "staging", "stg_twitter_ads__tweet"], "alias": "stg_twitter_ads__tweet", "checksum": {"name": "sha256", "checksum": "f44ddbd038fa677e6699ec2e0bd57abc62c9bc82cdb3c35bcc13775e041a4c7f"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a tweet, promoted or not.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tweet_id": {"name": "tweet_id", "description": "Unique identifier of the tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "If provided, the non-public title of the tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "full_text": {"name": "full_text", "description": "Full text of the tweet's content.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "language": {"name": "language", "description": "Two-letter language code of the tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/staging/stg_twitter_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.1085956, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__tweet\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_twitter_ads__tweet_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_twitter_ads__tweet_tmp')),\n staging_columns=get_tweet_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='twitter_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n account_id,\n id as tweet_id,\n name,\n full_text,\n lang as language\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__tweet_tmp", "package": null, "version": null}, {"name": "stg_twitter_ads__tweet_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.get_tweet_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.twitter_ads.stg_twitter_ads__tweet_tmp"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads__tweet.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__tweet_tmp\"\n),\n\nfields as (\n\n select\n \n account_id as account_id,\n full_text as full_text,\n id as id,\n lang as lang,\n name as name\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n account_id,\n id as tweet_id,\n name,\n full_text,\n lang as language\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__campaign_locations_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_locations_report", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/stg_twitter_ads__campaign_locations_report.sql", "original_file_path": "models/staging/stg_twitter_ads__campaign_locations_report.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_locations_report", "fqn": ["twitter_ads", "staging", "stg_twitter_ads__campaign_locations_report"], "alias": "stg_twitter_ads__campaign_locations_report", "checksum": {"name": "sha256", "checksum": "191eb2293aa0a2287a28ccc9f0b0493aaaf17a5f74a5c95ea02d9f9b6699a6ea"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the performance of an ad campaign on a given day in a specific country, for its placement in Twitter.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "country": {"name": "country", "description": "Long-form name of the country being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.country"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend_micro": {"name": "spend_micro", "description": "The spend for the campaign on that day, in micros and in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend for the campaign on that day in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the campaign on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the campaign on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The url clicks for the campaign on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/staging/stg_twitter_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.1099463, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_locations_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True) and var('twitter_ads__using_campaign_locations_report', False)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_twitter_ads__campaign_locations_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_twitter_ads__campaign_locations_report_tmp')),\n staging_columns=get_campaign_locations_report_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='twitter_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n {{ dbt.date_trunc('day', 'date') }} as date_day,\n -- Most people have country stored in segment_name, but some will have it in segment still\n coalesce(segment_name, segment) as country,\n account_id,\n campaign_id,\n placement,\n clicks,\n impressions,\n billed_charge_local_micro as spend_micro,\n round(billed_charge_local_micro / 1000000.0,2) as spend,\n url_clicks\n\n {% for conversion in var('twitter_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {% for conversion_value in var('twitter_ads__conversion_sale_amount_fields', []) %}\n , coalesce(cast({{ conversion_value }} as {{ dbt.type_float() }}), 0) as {{ conversion_value }}\n {% endfor %}\n\n {{ twitter_ads_fill_pass_through_columns(pass_through_fields=var('twitter_ads__campaign_locations_report_passthrough_metrics')) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_locations_report_tmp", "package": null, "version": null}, {"name": "stg_twitter_ads__campaign_locations_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.get_campaign_locations_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.date_trunc", "macro.dbt.type_bigint", "macro.dbt.type_float", "macro.twitter_ads.twitter_ads_fill_pass_through_columns"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_locations_report_tmp"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads__campaign_locations_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_locations_report_tmp\"\n),\n\nfields as (\n\n select\n \n cast(null as TEXT) as segment_name,\n segment as segment,\n account_id as account_id,\n billed_charge_local_micro as billed_charge_local_micro,\n campaign_id as campaign_id,\n clicks as clicks,\n date as date,\n impressions as impressions,\n placement as placement,\n url_clicks as url_clicks,\n cast(null as TEXT) as conversion_purchases_metric,\n cast(null as TEXT) as conversion_custom_metric,\n cast(null as TEXT) as conversion_purchases_sale_amount,\n cast(null as TEXT) as conversion_custom_sale_amount\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n date_trunc('day', date) as date_day,\n -- Most people have country stored in segment_name, but some will have it in segment still\n coalesce(segment_name, segment) as country,\n account_id,\n campaign_id,\n placement,\n clicks,\n impressions,\n billed_charge_local_micro as spend_micro,\n round(billed_charge_local_micro / 1000000.0,2) as spend,\n url_clicks\n\n \n , coalesce(cast(conversion_purchases_metric as bigint), 0) as conversion_purchases_metric\n \n , coalesce(cast(conversion_custom_metric as bigint), 0) as conversion_custom_metric\n \n\n \n , coalesce(cast(conversion_purchases_sale_amount as float), 0) as conversion_purchases_sale_amount\n \n , coalesce(cast(conversion_custom_sale_amount as float), 0) as conversion_custom_sale_amount\n \n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__campaign_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_history", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/stg_twitter_ads__campaign_history.sql", "original_file_path": "models/staging/stg_twitter_ads__campaign_history.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_history", "fqn": ["twitter_ads", "staging", "stg_twitter_ads__campaign_history"], "alias": "stg_twitter_ads__campaign_history", "checksum": {"name": "sha256", "checksum": "17165a900060941f71e86d9994fd591f729816f7561f67b20089babd72a5ca23"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of each campaign. The versions can be differentiated by the updated_at timestamp.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The timestamp the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.created_at"]}, "currency": {"name": "currency", "description": "The currency all metrics for the account are set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_amount_local_micro": {"name": "daily_budget_amount_local_micro", "description": "The daily budget amount to be allocated to the campaign, in micros. The currency associated with the specified funding instrument will be used.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_deleted": {"name": "is_deleted", "description": "Whether the record has been deleted or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.deleted"]}, "duration_in_days": {"name": "duration_in_days", "description": "The time period within which the frequency_cap is achieved.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_timestamp": {"name": "end_timestamp", "description": "The time the campaign will end", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "entity_status": {"name": "entity_status", "description": "The status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "frequency_cap": {"name": "frequency_cap", "description": "The maximum number of times an ad could be delivered to a user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_servable": {"name": "is_servable", "description": "Whether the campaign is in a state to be actively served to users.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_standard_delivery": {"name": "is_standard_delivery", "description": "Whether standard delivery is enabled (vs accelerated delivery).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_timestamp": {"name": "start_timestamp", "description": "The time the campaign will start.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_budget_amount_local_micro": {"name": "total_budget_amount_local_micro", "description": "The total budget amount to be allocated to the campaign, in micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The timestamp the account was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.updated_at"]}, "is_latest_version": {"name": "is_latest_version", "description": "Whether the record is the most latest version for the campaign", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "funding_instrument_id": {"name": "funding_instrument_id", "description": "Reference to the funding instrument.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_amount": {"name": "daily_budget_amount", "description": "The daily budget amount to be allocated to the campaign. The currency associated with the specified funding instrument will be used.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_budget_amount": {"name": "total_budget_amount", "description": "The total budget amount to be allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/staging/stg_twitter_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.0968013, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\nwith source as (\n\n select *\n from {{ ref('stg_twitter_ads__campaign_history_tmp') }}\n\n),\n\nfields as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_twitter_ads__campaign_history_tmp')),\n staging_columns=get_campaign_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='twitter_ads') }}\n\n from source\n\n), \n\nfinal as (\n\n select\n source_relation,\n account_id,\n created_at as created_timestamp,\n currency,\n daily_budget_amount_local_micro,\n deleted as is_deleted,\n duration_in_days,\n end_time as end_timestamp,\n entity_status,\n frequency_cap,\n funding_instrument_id,\n id as campaign_id,\n name as campaign_name,\n servable as is_servable,\n standard_delivery as is_standard_delivery,\n start_time as start_timestamp,\n total_budget_amount_local_micro,\n updated_at as updated_timestamp,\n round(daily_budget_amount_local_micro / 1000000.0,2) as daily_budget_amount,\n round(total_budget_amount_local_micro / 1000000.0,2) as total_budget_amount,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='twitter_ads') }} order by updated_at desc) = 1 as is_latest_version\n \n from fields \n)\n\nselect * from final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_history_tmp", "package": null, "version": null}, {"name": "stg_twitter_ads__campaign_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.get_campaign_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_history_tmp"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads__campaign_history.sql", "compiled": true, "compiled_code": "\n\nwith source as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_history_tmp\"\n\n),\n\nfields as (\n\n select\n \n \n account_id as account_id,\n created_at as created_at,\n currency as currency,\n daily_budget_amount_local_micro as daily_budget_amount_local_micro,\n deleted as deleted,\n duration_in_days as duration_in_days,\n end_time as end_time,\n entity_status as entity_status,\n frequency_cap as frequency_cap,\n funding_instrument_id as funding_instrument_id,\n id as id,\n name as name,\n servable as servable,\n standard_delivery as standard_delivery,\n start_time as start_time,\n total_budget_amount_local_micro as total_budget_amount_local_micro,\n updated_at as updated_at\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from source\n\n), \n\nfinal as (\n\n select\n source_relation,\n account_id,\n created_at as created_timestamp,\n currency,\n daily_budget_amount_local_micro,\n deleted as is_deleted,\n duration_in_days,\n end_time as end_timestamp,\n entity_status,\n frequency_cap,\n funding_instrument_id,\n id as campaign_id,\n name as campaign_name,\n servable as is_servable,\n standard_delivery as is_standard_delivery,\n start_time as start_timestamp,\n total_budget_amount_local_micro,\n updated_at as updated_timestamp,\n round(daily_budget_amount_local_micro / 1000000.0,2) as daily_budget_amount,\n round(total_budget_amount_local_micro / 1000000.0,2) as total_budget_amount,\n row_number() over (partition by id order by updated_at desc) = 1 as is_latest_version\n \n from fields \n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__promoted_tweet_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__promoted_tweet_history", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/stg_twitter_ads__promoted_tweet_history.sql", "original_file_path": "models/staging/stg_twitter_ads__promoted_tweet_history.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__promoted_tweet_history", "fqn": ["twitter_ads", "staging", "stg_twitter_ads__promoted_tweet_history"], "alias": "stg_twitter_ads__promoted_tweet_history", "checksum": {"name": "sha256", "checksum": "8118737cecd53a75a6f648e6df4e5b7cc89c138a2948ee655f6553182b59b8fb"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of each promoted tweet. The versions can be differentiated by the updated_at timestamp.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "approval_status": {"name": "approval_status", "description": "The approval status of the promoted tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The timestamp the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.created_at"]}, "is_deleted": {"name": "is_deleted", "description": "Whether the record has been deleted or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.deleted"]}, "entity_status": {"name": "entity_status", "description": "The status of the promoted tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "promoted_tweet_id": {"name": "promoted_tweet_id", "description": "The ID of the promoted tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_id": {"name": "line_item_id", "description": "The ID of the related line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tweet_id": {"name": "tweet_id", "description": "The ID of the related tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The timestamp the account was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.updated_at"]}, "is_latest_version": {"name": "is_latest_version", "description": "Whether the record is the most latest version for the promoted tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/staging/stg_twitter_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.1006374, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\nwith source as (\n\n select *\n from {{ ref('stg_twitter_ads__promoted_tweet_history_tmp') }}\n\n),\n\nfields as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_twitter_ads__promoted_tweet_history_tmp')),\n staging_columns=get_promoted_tweet_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='twitter_ads') }}\n\n from source\n\n), \n\nfinal as (\n\n select\n source_relation,\n approval_status,\n created_at as created_timestamp,\n deleted as is_deleted,\n entity_status,\n id as promoted_tweet_id,\n line_item_id,\n tweet_id,\n updated_at as updated_timestamp,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='twitter_ads') }} order by updated_at desc) = 1 as is_latest_version\n from fields \n)\n\nselect * from final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__promoted_tweet_history_tmp", "package": null, "version": null}, {"name": "stg_twitter_ads__promoted_tweet_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.get_promoted_tweet_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_history_tmp"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads__promoted_tweet_history.sql", "compiled": true, "compiled_code": "\n\nwith source as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_history_tmp\"\n\n),\n\nfields as (\n\n select\n \n \n approval_status as approval_status,\n created_at as created_at,\n deleted as deleted,\n entity_status as entity_status,\n id as id,\n line_item_id as line_item_id,\n tweet_id as tweet_id,\n updated_at as updated_at\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from source\n\n), \n\nfinal as (\n\n select\n source_relation,\n approval_status,\n created_at as created_timestamp,\n deleted as is_deleted,\n entity_status,\n id as promoted_tweet_id,\n line_item_id,\n tweet_id,\n updated_at as updated_timestamp,\n row_number() over (partition by id order by updated_at desc) = 1 as is_latest_version\n from fields \n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__tweet_url": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__tweet_url", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/stg_twitter_ads__tweet_url.sql", "original_file_path": "models/staging/stg_twitter_ads__tweet_url.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__tweet_url", "fqn": ["twitter_ads", "staging", "stg_twitter_ads__tweet_url"], "alias": "stg_twitter_ads__tweet_url", "checksum": {"name": "sha256", "checksum": "4364ab7bb2a22dedd69405b107ffa5af41e873ff7a73d84868bdc72e8b045c99"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a URL used in a tweet.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "display_url": {"name": "display_url", "description": "The URL as it will be displayed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "expanded_url": {"name": "expanded_url", "description": "The fully expanded URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "index": {"name": "index", "description": "The index of the URL within the tweet (ie if there are multiple URLs)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "indices": {"name": "indices", "description": "The start and end point of where the URL is placed in the tweet text.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tweet_id": {"name": "tweet_id", "description": "The ID of the related tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url": {"name": "url", "description": "The 't.co' shortened URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_host": {"name": "url_host", "description": "The URL host of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_path": {"name": "url_path", "description": "The URL path of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_source": {"name": "utm_source", "description": "The utm_source parameter of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_medium": {"name": "utm_medium", "description": "The utm_medium parameter of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_campaign": {"name": "utm_campaign", "description": "The utm_campaign parameter of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_content": {"name": "utm_content", "description": "The utm_content parameter of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_term": {"name": "utm_term", "description": "The utm_term parameter of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/staging/stg_twitter_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.1038206, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__tweet_url\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\nwith source as (\n\n select *\n from {{ ref('stg_twitter_ads__tweet_url_tmp') }}\n\n),\n\nfields as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_twitter_ads__tweet_url_tmp')),\n staging_columns=get_tweet_url_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='twitter_ads') }}\n\n from source\n\n), \n\nfinal as (\n\n select\n source_relation,\n display_url,\n expanded_url,\n index,\n indices,\n tweet_id,\n url,\n {{ dbt.split_part('expanded_url', \"'?'\", 1) }} as base_url,\n {{ dbt_utils.get_url_host('expanded_url') }} as url_host,\n '/' || {{ dbt_utils.get_url_path('expanded_url') }} as url_path,\n {{ twitter_ads.twitter_ads_extract_url_parameter('expanded_url', 'utm_source') }} as utm_source,\n {{ twitter_ads.twitter_ads_extract_url_parameter('expanded_url', 'utm_medium') }} as utm_medium,\n {{ twitter_ads.twitter_ads_extract_url_parameter('expanded_url', 'utm_campaign') }} as utm_campaign,\n {{ twitter_ads.twitter_ads_extract_url_parameter('expanded_url', 'utm_content') }} as utm_content,\n {{ twitter_ads.twitter_ads_extract_url_parameter('expanded_url', 'utm_term') }} as utm_term\n \n from fields\n\n)\n\nselect * from final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__tweet_url_tmp", "package": null, "version": null}, {"name": "stg_twitter_ads__tweet_url_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.get_tweet_url_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.split_part", "macro.dbt_utils.get_url_host", "macro.dbt_utils.get_url_path", "macro.twitter_ads.twitter_ads_extract_url_parameter"], "nodes": ["model.twitter_ads.stg_twitter_ads__tweet_url_tmp"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads__tweet_url.sql", "compiled": true, "compiled_code": "\n\nwith source as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__tweet_url_tmp\"\n\n),\n\nfields as (\n\n select\n \n \n display_url as display_url,\n expanded_url as expanded_url,\n index as index,\n indices as indices,\n tweet_id as tweet_id,\n url as url\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from source\n\n), \n\nfinal as (\n\n select\n source_relation,\n display_url,\n expanded_url,\n index,\n indices,\n tweet_id,\n url,\n \n\n \n \n\n split_part(\n expanded_url,\n '?',\n 1\n )\n\n\n \n\n as base_url,\n \n \n cast(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n \n\n replace(\n \n\n replace(\n \n\n replace(\n expanded_url,\n 'android-app://',\n ''\n )\n\n\n,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n '/',\n 1\n )\n\n\n \n\n,\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_host,\n '/' || \n \n cast(\n\n \n \n\n split_part(\n \n\n right(\n \n\n replace(\n \n\n replace(\n expanded_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n \n\n length(\n \n\n replace(\n \n\n replace(\n expanded_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n )-coalesce(\n nullif(\n\n position(\n '/' in \n\n replace(\n \n\n replace(\n expanded_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ), 0),\n \n\n position(\n '?' in \n\n replace(\n \n\n replace(\n expanded_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ) - 1\n )\n ),\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_path,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n expanded_url,\n 'utm_source=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_source,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n expanded_url,\n 'utm_medium=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_medium,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n expanded_url,\n 'utm_campaign=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_campaign,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n expanded_url,\n 'utm_content=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_content,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n expanded_url,\n 'utm_term=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_term\n \n from fields\n\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__campaign_regions_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_regions_report", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/stg_twitter_ads__campaign_regions_report.sql", "original_file_path": "models/staging/stg_twitter_ads__campaign_regions_report.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_regions_report", "fqn": ["twitter_ads", "staging", "stg_twitter_ads__campaign_regions_report"], "alias": "stg_twitter_ads__campaign_regions_report", "checksum": {"name": "sha256", "checksum": "bc5b0673bae61d7618e8eaa0297de05496241e3b7c13fbe832cab74041fd04ac"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the performance of an ad campaign on a given day in a specific geographic region, for its placement in Twitter.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "country": {"name": "country", "description": "Long-form name of the country being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.country"]}, "region": {"name": "region", "description": "Long-form name of the geopgraphic region being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.region"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend_micro": {"name": "spend_micro", "description": "The spend for the campaign on that day, in micros and in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend for the campaign on that day in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the campaign on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the campaign on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The url clicks for the campaign on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/staging/stg_twitter_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.1113265, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_regions_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True) and var('twitter_ads__using_campaign_regions_report', False)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_twitter_ads__campaign_regions_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_twitter_ads__campaign_regions_report_tmp')),\n staging_columns=get_campaign_regions_report_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='twitter_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n {{ dbt.date_trunc('day', 'date') }} as date_day,\n -- Most people have region stored in segment_name, but some will have it in segment still\n coalesce(segment_name, segment) as region,\n case when lower(location_type) = 'countries' then location_name else null end as country,\n account_id,\n campaign_id,\n placement,\n clicks,\n impressions,\n billed_charge_local_micro as spend_micro,\n round(billed_charge_local_micro / 1000000.0,2) as spend,\n url_clicks\n\n {% for conversion in var('twitter_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {% for conversion_value in var('twitter_ads__conversion_sale_amount_fields', []) %}\n , coalesce(cast({{ conversion_value }} as {{ dbt.type_float() }}), 0) as {{ conversion_value }}\n {% endfor %}\n\n {{ twitter_ads_fill_pass_through_columns(pass_through_fields=var('twitter_ads__campaign_regions_report_passthrough_metrics')) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_regions_report_tmp", "package": null, "version": null}, {"name": "stg_twitter_ads__campaign_regions_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.get_campaign_regions_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.date_trunc", "macro.dbt.type_bigint", "macro.dbt.type_float", "macro.twitter_ads.twitter_ads_fill_pass_through_columns"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_regions_report_tmp"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads__campaign_regions_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_regions_report_tmp\"\n),\n\nfields as (\n\n select\n \n location_name as location_name,\n location_type as location_type,\n segment as segment,\n cast(null as TEXT) as segment_name,\n account_id as account_id,\n billed_charge_local_micro as billed_charge_local_micro,\n campaign_id as campaign_id,\n clicks as clicks,\n date as date,\n impressions as impressions,\n placement as placement,\n url_clicks as url_clicks,\n cast(null as TEXT) as conversion_purchases_metric,\n cast(null as TEXT) as conversion_custom_metric,\n cast(null as TEXT) as conversion_purchases_sale_amount,\n cast(null as TEXT) as conversion_custom_sale_amount\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n date_trunc('day', date) as date_day,\n -- Most people have region stored in segment_name, but some will have it in segment still\n coalesce(segment_name, segment) as region,\n case when lower(location_type) = 'countries' then location_name else null end as country,\n account_id,\n campaign_id,\n placement,\n clicks,\n impressions,\n billed_charge_local_micro as spend_micro,\n round(billed_charge_local_micro / 1000000.0,2) as spend,\n url_clicks\n\n \n , coalesce(cast(conversion_purchases_metric as bigint), 0) as conversion_purchases_metric\n \n , coalesce(cast(conversion_custom_metric as bigint), 0) as conversion_custom_metric\n \n\n \n , coalesce(cast(conversion_purchases_sale_amount as float), 0) as conversion_purchases_sale_amount\n \n , coalesce(cast(conversion_custom_sale_amount as float), 0) as conversion_custom_sale_amount\n \n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__line_item_keywords_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__line_item_keywords_report", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/stg_twitter_ads__line_item_keywords_report.sql", "original_file_path": "models/staging/stg_twitter_ads__line_item_keywords_report.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__line_item_keywords_report", "fqn": ["twitter_ads", "staging", "stg_twitter_ads__line_item_keywords_report"], "alias": "stg_twitter_ads__line_item_keywords_report", "checksum": {"name": "sha256", "checksum": "b05a1c4b50494ecd1af123902748a7cfe06997855d09471ece28b9fe384f9253"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the performance of a line item (ad group) and keyword combination on a given day, for its placement in Twitter.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "keyword_id": {"name": "keyword_id", "description": "Unique key of the table built from the combination of 'account_id', 'line_item_id','segment', and 'placement' fields.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend_micro": {"name": "spend_micro", "description": "The spend for the line item + keyword on that day, in micros and in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend for the line item + keyword on that day in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the line item + keyword on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the line item + keyword on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_id": {"name": "line_item_id", "description": "The ID of the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The url clicks for the line item + keyword on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword": {"name": "keyword", "description": "The keyword whose performance is being tracked.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/staging/stg_twitter_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.1076908, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_keywords_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__twitter_ads_enabled','twitter_ads__using_keywords'])) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_twitter_ads__line_item_keywords_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_twitter_ads__line_item_keywords_report_tmp')),\n staging_columns=get_line_item_keywords_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='twitter_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n {{ dbt.date_trunc('day', 'date') }} as date_day,\n {{ dbt_utils.generate_surrogate_key(['account_id', 'line_item_id','segment','placement']) }} as keyword_id,\n account_id,\n line_item_id,\n segment as keyword,\n placement,\n clicks,\n impressions,\n billed_charge_local_micro as spend_micro,\n round(billed_charge_local_micro / 1000000.0,2) as spend,\n url_clicks\n\n {% for conversion in var('twitter_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {% for conversion_value in var('twitter_ads__conversion_sale_amount_fields', []) %}\n , coalesce(cast({{ conversion_value }} as {{ dbt.type_float() }}), 0) as {{ conversion_value }}\n {% endfor %}\n\n {{ twitter_ads_fill_pass_through_columns(pass_through_fields=var('twitter_ads__line_item_keywords_report_passthrough_metrics'), except=(var('twitter_ads__conversion_fields') + var('twitter_ads__conversion_sale_amount_fields'))) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__line_item_keywords_report_tmp", "package": null, "version": null}, {"name": "stg_twitter_ads__line_item_keywords_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.twitter_ads.get_line_item_keywords_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.date_trunc", "macro.dbt_utils.generate_surrogate_key", "macro.dbt.type_bigint", "macro.dbt.type_float", "macro.twitter_ads.twitter_ads_fill_pass_through_columns"], "nodes": ["model.twitter_ads.stg_twitter_ads__line_item_keywords_report_tmp"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads__line_item_keywords_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_keywords_report_tmp\"\n),\n\nfields as (\n\n select\n \n account_id as account_id,\n billed_charge_local_micro as billed_charge_local_micro,\n clicks as clicks,\n date as date,\n impressions as impressions,\n line_item_id as line_item_id,\n placement as placement,\n segment as segment,\n url_clicks as url_clicks,\n conversion_purchases_metric as conversion_purchases_metric,\n conversion_custom_metric as conversion_custom_metric,\n conversion_purchases_sale_amount as conversion_purchases_sale_amount,\n conversion_custom_sale_amount as conversion_custom_sale_amount\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date_trunc('day', date) as date_day,\n md5(cast(coalesce(cast(account_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(line_item_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(segment as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(placement as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as keyword_id,\n account_id,\n line_item_id,\n segment as keyword,\n placement,\n clicks,\n impressions,\n billed_charge_local_micro as spend_micro,\n round(billed_charge_local_micro / 1000000.0,2) as spend,\n url_clicks\n\n \n , coalesce(cast(conversion_purchases_metric as bigint), 0) as conversion_purchases_metric\n \n , coalesce(cast(conversion_custom_metric as bigint), 0) as conversion_custom_metric\n \n\n \n , coalesce(cast(conversion_purchases_sale_amount as float), 0) as conversion_purchases_sale_amount\n \n , coalesce(cast(conversion_custom_sale_amount as float), 0) as conversion_custom_sale_amount\n \n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__line_item_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__line_item_report", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/stg_twitter_ads__line_item_report.sql", "original_file_path": "models/staging/stg_twitter_ads__line_item_report.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__line_item_report", "fqn": ["twitter_ads", "staging", "stg_twitter_ads__line_item_report"], "alias": "stg_twitter_ads__line_item_report", "checksum": {"name": "sha256", "checksum": "cb1bb859ec2f322aafab0990b554675f60a15f15e1342015388f3a2ae8ab9217"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the performance of a line item (ad group) on a given day, for its placement in Twitter.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend_micro": {"name": "spend_micro", "description": "The spend for the line item on that day, in micros and in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend for the line item on that day in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the line item on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the line item on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_id": {"name": "line_item_id", "description": "The ID of the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The url clicks for the line item on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/staging/stg_twitter_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.10636, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_twitter_ads__line_item_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_twitter_ads__line_item_report_tmp')),\n staging_columns=get_line_item_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='twitter_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n {{ dbt.date_trunc('day', 'date') }} as date_day,\n account_id,\n line_item_id,\n placement,\n clicks,\n impressions,\n billed_charge_local_micro as spend_micro,\n round(billed_charge_local_micro / 1000000.0,2) as spend,\n url_clicks\n\n {% for conversion in var('twitter_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {% for conversion_value in var('twitter_ads__conversion_sale_amount_fields', []) %}\n , coalesce(cast({{ conversion_value }} as {{ dbt.type_float() }}), 0) as {{ conversion_value }}\n {% endfor %}\n\n {{ twitter_ads_fill_pass_through_columns(pass_through_fields=var('twitter_ads__line_item_report_passthrough_metrics'), except=(var('twitter_ads__conversion_fields') + var('twitter_ads__conversion_sale_amount_fields'))) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__line_item_report_tmp", "package": null, "version": null}, {"name": "stg_twitter_ads__line_item_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.get_line_item_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.date_trunc", "macro.dbt.type_bigint", "macro.dbt.type_float", "macro.twitter_ads.twitter_ads_fill_pass_through_columns"], "nodes": ["model.twitter_ads.stg_twitter_ads__line_item_report_tmp"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads__line_item_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_report_tmp\"\n),\n\nfields as (\n\n select\n \n account_id as account_id,\n billed_charge_local_micro as billed_charge_local_micro,\n clicks as clicks,\n date as date,\n impressions as impressions,\n line_item_id as line_item_id,\n placement as placement,\n url_clicks as url_clicks,\n conversion_purchases_metric as conversion_purchases_metric,\n conversion_custom_metric as conversion_custom_metric,\n conversion_purchases_sale_amount as conversion_purchases_sale_amount,\n conversion_custom_sale_amount as conversion_custom_sale_amount\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date_trunc('day', date) as date_day,\n account_id,\n line_item_id,\n placement,\n clicks,\n impressions,\n billed_charge_local_micro as spend_micro,\n round(billed_charge_local_micro / 1000000.0,2) as spend,\n url_clicks\n\n \n , coalesce(cast(conversion_purchases_metric as bigint), 0) as conversion_purchases_metric\n \n , coalesce(cast(conversion_custom_metric as bigint), 0) as conversion_custom_metric\n \n\n \n , coalesce(cast(conversion_purchases_sale_amount as float), 0) as conversion_purchases_sale_amount\n \n , coalesce(cast(conversion_custom_sale_amount as float), 0) as conversion_custom_sale_amount\n \n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__line_item_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__line_item_history", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/stg_twitter_ads__line_item_history.sql", "original_file_path": "models/staging/stg_twitter_ads__line_item_history.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__line_item_history", "fqn": ["twitter_ads", "staging", "stg_twitter_ads__line_item_history"], "alias": "stg_twitter_ads__line_item_history", "checksum": {"name": "sha256", "checksum": "97caf5a88a09db388dcf010a7a578512546d72e9f80f5c84a12a57f013dc2c99"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of each line item. The versions can be differentiated by the updated_at timestamp.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "advertiser_domain": {"name": "advertiser_domain", "description": "The website domain for this advertiser, without the protocol specification.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_user_id": {"name": "advertiser_user_id", "description": "The Twitter user identifier for the handle promoting the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "automatically_select_bid": {"name": "automatically_select_bid", "description": "Whether automatically optimize bidding is enabled based on daily budget and campaign flight dates.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_amount_local_micro": {"name": "bid_amount_local_micro", "description": "The bid amount to be associated with this line item, in micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_type": {"name": "bid_type", "description": "The bidding mechanism.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_unit": {"name": "bid_unit", "description": "The bid unit for this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "charge_by": {"name": "charge_by", "description": "The unit to charge this line item by.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The timestamp the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.created_at"]}, "creative_source": {"name": "creative_source", "description": "The source of the creatives for the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The currency in which metrics will be reported.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_deleted": {"name": "is_deleted", "description": "Whether the record has been deleted or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.deleted"]}, "end_timestamp": {"name": "end_timestamp", "description": "The timestamp at which the line item will stop being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "entity_status": {"name": "entity_status", "description": "The status of the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_id": {"name": "line_item_id", "description": "The ID of the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective": {"name": "objective", "description": "The campaign objective for this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "optimization": {"name": "optimization", "description": "The optimization setting to use with this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "primary_web_event_tag": {"name": "primary_web_event_tag", "description": "The identifier of the primary web event tag. Allows more accurate tracking of engagements for the campaign pertaining to this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "product_type": {"name": "product_type", "description": "The type of promoted product that this line item will contain.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_timestamp": {"name": "start_timestamp", "description": "The timestamp at which the line item will start being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "target_cpa_local_micro": {"name": "target_cpa_local_micro", "description": "The target cost per acquisition for the line item, in micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_budget_amount_local_micro": {"name": "total_budget_amount_local_micro", "description": "The total budget amount to be allocated to the line item, in micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The timestamp the account was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.updated_at"]}, "is_latest_version": {"name": "is_latest_version", "description": "Whether the record is the most latest version for the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_amount": {"name": "bid_amount", "description": "The bid amount to be associated with this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_budget_amount": {"name": "total_budget_amount", "description": "The total budget amount to be allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "target_cpa": {"name": "target_cpa", "description": "The target cost per acquisition for the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/staging/stg_twitter_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.099603, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\nwith source as (\n\n select *\n from {{ ref('stg_twitter_ads__line_item_history_tmp') }}\n\n),\n\nfields as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_twitter_ads__line_item_history_tmp')),\n staging_columns=get_line_item_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='twitter_ads') }}\n\n from source\n\n), \n\nfinal as (\n\n select\n source_relation,\n advertiser_domain,\n advertiser_user_id,\n automatically_select_bid,\n bid_amount_local_micro,\n bid_type,\n bid_unit,\n campaign_id,\n charge_by,\n created_at as created_timestamp,\n creative_source,\n currency,\n deleted as is_deleted,\n end_time as end_timestamp,\n entity_status,\n id as line_item_id,\n name,\n objective,\n optimization,\n primary_web_event_tag,\n product_type,\n start_time as start_timestamp,\n target_cpa_local_micro,\n total_budget_amount_local_micro,\n updated_at as updated_timestamp,\n round(bid_amount_local_micro / 1000000.0,2) as bid_amount,\n round(total_budget_amount_local_micro / 1000000.0,2) as total_budget_amount,\n round(target_cpa_local_micro / 1000000.0,2) as target_cpa,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='twitter_ads') }} order by updated_at desc) = 1 as is_latest_version\n \n from fields \n)\n\nselect * from final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__line_item_history_tmp", "package": null, "version": null}, {"name": "stg_twitter_ads__line_item_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.get_line_item_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.twitter_ads.stg_twitter_ads__line_item_history_tmp"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads__line_item_history.sql", "compiled": true, "compiled_code": "\n\nwith source as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_history_tmp\"\n\n),\n\nfields as (\n\n select\n \n \n advertiser_domain as advertiser_domain,\n advertiser_user_id as advertiser_user_id,\n automatically_select_bid as automatically_select_bid,\n bid_amount_local_micro as bid_amount_local_micro,\n bid_type as bid_type,\n bid_unit as bid_unit,\n campaign_id as campaign_id,\n charge_by as charge_by,\n created_at as created_at,\n creative_source as creative_source,\n currency as currency,\n deleted as deleted,\n end_time as end_time,\n entity_status as entity_status,\n id as id,\n name as name,\n objective as objective,\n optimization as optimization,\n primary_web_event_tag as primary_web_event_tag,\n product_type as product_type,\n start_time as start_time,\n target_cpa_local_micro as target_cpa_local_micro,\n total_budget_amount_local_micro as total_budget_amount_local_micro,\n updated_at as updated_at\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from source\n\n), \n\nfinal as (\n\n select\n source_relation,\n advertiser_domain,\n advertiser_user_id,\n automatically_select_bid,\n bid_amount_local_micro,\n bid_type,\n bid_unit,\n campaign_id,\n charge_by,\n created_at as created_timestamp,\n creative_source,\n currency,\n deleted as is_deleted,\n end_time as end_timestamp,\n entity_status,\n id as line_item_id,\n name,\n objective,\n optimization,\n primary_web_event_tag,\n product_type,\n start_time as start_timestamp,\n target_cpa_local_micro,\n total_budget_amount_local_micro,\n updated_at as updated_timestamp,\n round(bid_amount_local_micro / 1000000.0,2) as bid_amount,\n round(total_budget_amount_local_micro / 1000000.0,2) as total_budget_amount,\n round(target_cpa_local_micro / 1000000.0,2) as target_cpa,\n row_number() over (partition by id order by updated_at desc) = 1 as is_latest_version\n \n from fields \n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__account_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__account_history", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/stg_twitter_ads__account_history.sql", "original_file_path": "models/staging/stg_twitter_ads__account_history.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__account_history", "fqn": ["twitter_ads", "staging", "stg_twitter_ads__account_history"], "alias": "stg_twitter_ads__account_history", "checksum": {"name": "sha256", "checksum": "c9a8e8307bddb360a513b911534c09794c479aead05f714bee34eda6784a8ab5"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of each account. The versions can be differentiated by the updated_at timestamp.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "approval_status": {"name": "approval_status", "description": "The approval status of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "business_id": {"name": "business_id", "description": "The ID of the related business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "business_name": {"name": "business_name", "description": "The name of the related business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The timestamp the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.created_at"]}, "is_deleted": {"name": "is_deleted", "description": "Whether the record has been deleted or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.deleted"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "industry_type": {"name": "industry_type", "description": "The industry of the accounts.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone": {"name": "timezone", "description": "The timezone the account is set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone_switched_timestamp": {"name": "timezone_switched_timestamp", "description": "The timestamp the account's timezone was last changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The timestamp the account was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.updated_at"]}, "is_latest_version": {"name": "is_latest_version", "description": "Whether the record is the most latest version for the account", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "salt": {"name": "salt", "description": "The random encryption key used to hash data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/staging/stg_twitter_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.0938513, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__account_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\nwith source as (\n\n select *\n from {{ ref('stg_twitter_ads__account_history_tmp') }}\n\n),\n\nfields as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_twitter_ads__account_history_tmp')),\n staging_columns=get_account_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='twitter_ads') }}\n\n from source\n\n), \n\nfinal as (\n\n select\n source_relation,\n approval_status,\n business_id,\n business_name,\n created_at as created_timestamp,\n deleted as is_deleted,\n id as account_id,\n industry_type,\n name,\n salt,\n timezone,\n timezone_switch_at as timezone_switched_timestamp,\n updated_at as updated_timestamp,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='twitter_ads') }} order by updated_at desc) = 1 as is_latest_version\n \n from fields \n)\n\nselect * from final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__account_history_tmp", "package": null, "version": null}, {"name": "stg_twitter_ads__account_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.get_account_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.twitter_ads.stg_twitter_ads__account_history_tmp"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads__account_history.sql", "compiled": true, "compiled_code": "\n\nwith source as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__account_history_tmp\"\n\n),\n\nfields as (\n\n select\n \n \n approval_status as approval_status,\n business_id as business_id,\n business_name as business_name,\n created_at as created_at,\n deleted as deleted,\n id as id,\n industry_type as industry_type,\n name as name,\n salt as salt,\n timezone as timezone,\n timezone_switch_at as timezone_switch_at,\n updated_at as updated_at\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from source\n\n), \n\nfinal as (\n\n select\n source_relation,\n approval_status,\n business_id,\n business_name,\n created_at as created_timestamp,\n deleted as is_deleted,\n id as account_id,\n industry_type,\n name,\n salt,\n timezone,\n timezone_switch_at as timezone_switched_timestamp,\n updated_at as updated_timestamp,\n row_number() over (partition by id order by updated_at desc) = 1 as is_latest_version\n \n from fields \n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__promoted_tweet_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__promoted_tweet_report", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/stg_twitter_ads__promoted_tweet_report.sql", "original_file_path": "models/staging/stg_twitter_ads__promoted_tweet_report.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__promoted_tweet_report", "fqn": ["twitter_ads", "staging", "stg_twitter_ads__promoted_tweet_report"], "alias": "stg_twitter_ads__promoted_tweet_report", "checksum": {"name": "sha256", "checksum": "f9bd68ae048ddee9112129fb5cb7ed1e2a54dc671fa76bcc659ce9e3e3b53032"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the performance of a promoted tweet on a given day, in the tweet's defined placement.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend_micro": {"name": "spend_micro", "description": "The spend (in micros) for the promoted tweet on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend for the promoted tweet on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the promoted tweet on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the promoted tweet on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "promoted_tweet_id": {"name": "promoted_tweet_id", "description": "The ID of the related promoted tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The url clicks for the promoted tweet on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/staging/stg_twitter_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.101938, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\nwith source as (\n\n select *\n from {{ ref('stg_twitter_ads__promoted_tweet_report_tmp') }}\n\n),\n\nrenamed as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_twitter_ads__promoted_tweet_report_tmp')),\n staging_columns=get_promoted_tweet_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='twitter_ads') }}\n\n from source\n\n), spend_calc as (\n\n select\n source_relation,\n {{ dbt.date_trunc('day', 'date') }} as date_day,\n account_id,\n promoted_tweet_id,\n placement,\n clicks as clicks,\n impressions as impressions,\n billed_charge_local_micro as spend_micro,\n round(billed_charge_local_micro / 1000000.0,2) as spend,\n url_clicks as url_clicks\n\n {% for conversion in var('twitter_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {% for conversion_value in var('twitter_ads__conversion_sale_amount_fields', []) %}\n , coalesce(cast({{ conversion_value }} as {{ dbt.type_float() }}), 0) as {{ conversion_value }}\n {% endfor %}\n\n {{ twitter_ads_fill_pass_through_columns(pass_through_fields=var('twitter_ads__promoted_tweet_report_passthrough_metrics'), except=(var('twitter_ads__conversion_fields') + var('twitter_ads__conversion_sale_amount_fields'))) }}\n\n from renamed\n\n)\n\nselect * from spend_calc", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__promoted_tweet_report_tmp", "package": null, "version": null}, {"name": "stg_twitter_ads__promoted_tweet_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.get_promoted_tweet_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.date_trunc", "macro.dbt.type_bigint", "macro.dbt.type_float", "macro.twitter_ads.twitter_ads_fill_pass_through_columns"], "nodes": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_report_tmp"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads__promoted_tweet_report.sql", "compiled": true, "compiled_code": "\n\nwith source as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_report_tmp\"\n\n),\n\nrenamed as (\n\n select\n \n \n account_id as account_id,\n billed_charge_local_micro as billed_charge_local_micro,\n clicks as clicks,\n date as date,\n impressions as impressions,\n placement as placement,\n promoted_tweet_id as promoted_tweet_id,\n url_clicks as url_clicks,\n cast(null as TEXT) as conversion_purchases_metric,\n cast(null as TEXT) as conversion_custom_metric,\n cast(null as TEXT) as conversion_purchases_sale_amount,\n cast(null as TEXT) as conversion_custom_sale_amount\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from source\n\n), spend_calc as (\n\n select\n source_relation,\n date_trunc('day', date) as date_day,\n account_id,\n promoted_tweet_id,\n placement,\n clicks as clicks,\n impressions as impressions,\n billed_charge_local_micro as spend_micro,\n round(billed_charge_local_micro / 1000000.0,2) as spend,\n url_clicks as url_clicks\n\n \n , coalesce(cast(conversion_purchases_metric as bigint), 0) as conversion_purchases_metric\n \n , coalesce(cast(conversion_custom_metric as bigint), 0) as conversion_custom_metric\n \n\n \n , coalesce(cast(conversion_purchases_sale_amount as float), 0) as conversion_purchases_sale_amount\n \n , coalesce(cast(conversion_custom_sale_amount as float), 0) as conversion_custom_sale_amount\n \n\n \n\n\n\n\n\n from renamed\n\n)\n\nselect * from spend_calc", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_report", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/stg_twitter_ads__campaign_report.sql", "original_file_path": "models/staging/stg_twitter_ads__campaign_report.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_report", "fqn": ["twitter_ads", "staging", "stg_twitter_ads__campaign_report"], "alias": "stg_twitter_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "76d7fdb8023d658e157e94401c53ef41619b3287f0e037e26534a5ade1e809b2"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the performance of an ad campaign on a given day, for its placement in Twitter.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend_micro": {"name": "spend_micro", "description": "The spend for the campaign on that day, in micros and in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend for the campaign on that day in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the campaign on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the campaign on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The url clicks for the campaign on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/staging/stg_twitter_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.1051114, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_twitter_ads__campaign_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_twitter_ads__campaign_report_tmp')),\n staging_columns=get_campaign_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='twitter_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n {{ dbt.date_trunc('day', 'date') }} as date_day,\n account_id,\n campaign_id,\n placement,\n clicks,\n impressions,\n billed_charge_local_micro as spend_micro,\n round(billed_charge_local_micro / 1000000.0,2) as spend,\n url_clicks\n\n\n {% for conversion in var('twitter_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {% for conversion_value in var('twitter_ads__conversion_sale_amount_fields', []) %}\n , coalesce(cast({{ conversion_value }} as {{ dbt.type_float() }}), 0) as {{ conversion_value }}\n {% endfor %}\n\n {{ twitter_ads_fill_pass_through_columns(pass_through_fields=var('twitter_ads__campaign_report_passthrough_metrics'), except=(var('twitter_ads__conversion_fields') + var('twitter_ads__conversion_sale_amount_fields'))) }}\n \n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_report_tmp", "package": null, "version": null}, {"name": "stg_twitter_ads__campaign_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.get_campaign_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.date_trunc", "macro.dbt.type_bigint", "macro.dbt.type_float", "macro.twitter_ads.twitter_ads_fill_pass_through_columns"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_report_tmp"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_report_tmp\"\n),\n\nfields as (\n\n select\n \n account_id as account_id,\n billed_charge_local_micro as billed_charge_local_micro,\n campaign_id as campaign_id,\n clicks as clicks,\n date as date,\n impressions as impressions,\n placement as placement,\n url_clicks as url_clicks,\n conversion_purchases_metric as conversion_purchases_metric,\n conversion_custom_metric as conversion_custom_metric,\n conversion_purchases_sale_amount as conversion_purchases_sale_amount,\n conversion_custom_sale_amount as conversion_custom_sale_amount\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date_trunc('day', date) as date_day,\n account_id,\n campaign_id,\n placement,\n clicks,\n impressions,\n billed_charge_local_micro as spend_micro,\n round(billed_charge_local_micro / 1000000.0,2) as spend,\n url_clicks\n\n\n \n , coalesce(cast(conversion_purchases_metric as bigint), 0) as conversion_purchases_metric\n \n , coalesce(cast(conversion_custom_metric as bigint), 0) as conversion_custom_metric\n \n\n \n , coalesce(cast(conversion_purchases_sale_amount as float), 0) as conversion_purchases_sale_amount\n \n , coalesce(cast(conversion_custom_sale_amount as float), 0) as conversion_custom_sale_amount\n \n\n \n\n\n\n\n \n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__campaign_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_report_tmp", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/tmp/stg_twitter_ads__campaign_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_twitter_ads__campaign_report_tmp.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_report_tmp", "fqn": ["twitter_ads", "staging", "tmp", "stg_twitter_ads__campaign_report_tmp"], "alias": "stg_twitter_ads__campaign_report_tmp", "checksum": {"name": "sha256", "checksum": "0072c0adb43b3b76afe3e8ff0983919dc78e180e9121aa61da9aa010673188bf"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450500.3943825, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\n{% if var('twitter_ads_union_schemas', []) | length > 0 or var('twitter_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_report',\n database_variable='twitter_ads_database',\n schema_variable='twitter_ads_schema',\n default_database=target.database,\n default_schema='twitter_ads',\n default_variable='campaign_report',\n union_schema_variable='twitter_ads_union_schemas',\n union_database_variable='twitter_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='twitter_ads_sources',\n single_source_name='twitter_ads',\n single_table_name='campaign_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["twitter_ads", "campaign_report"], ["twitter_ads", "campaign_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.twitter_ads.twitter_ads.campaign_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/tmp/stg_twitter_ads__campaign_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: twitter_ads_campaign_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: twitter_campaign_report_data\n\n\n select\n \"account_id\",\n \"campaign_id\",\n \"date\",\n \"placement\",\n \"_fivetran_synced\",\n \"app_clicks\",\n \"billed_charge_local_micro\",\n \"billed_engagements\",\n \"card_engagements\",\n \"carousel_swipes\",\n \"clicks\",\n \"conversion_custom_metric\",\n \"conversion_custom_order_quantity\",\n \"conversion_custom_order_quantity_engagement\",\n \"conversion_custom_order_quantity_view\",\n \"conversion_custom_post_engagement\",\n \"conversion_custom_post_view\",\n \"conversion_custom_sale_amount\",\n \"conversion_custom_sale_amount_engagement\",\n \"conversion_custom_sale_amount_view\",\n \"conversion_downloads_metric\",\n \"conversion_downloads_order_quantity\",\n \"conversion_downloads_order_quantity_engagement\",\n \"conversion_downloads_order_quantity_view\",\n \"conversion_downloads_post_engagement\",\n \"conversion_downloads_post_view\",\n \"conversion_downloads_sale_amount\",\n \"conversion_downloads_sale_amount_engagement\",\n \"conversion_downloads_sale_amount_view\",\n \"conversion_purchases_assisted\",\n \"conversion_purchases_metric\",\n \"conversion_purchases_order_quantity\",\n \"conversion_purchases_order_quantity_engagement\",\n \"conversion_purchases_order_quantity_view\",\n \"conversion_purchases_post_engagement\",\n \"conversion_purchases_post_view\",\n \"conversion_purchases_sale_amount\",\n \"conversion_purchases_sale_amount_engagement\",\n \"conversion_purchases_sale_amount_view\",\n \"conversion_sign_ups_assisted\",\n \"conversion_sign_ups_metric\",\n \"conversion_sign_ups_order_quantity\",\n \"conversion_sign_ups_order_quantity_engagement\",\n \"conversion_sign_ups_order_quantity_view\",\n \"conversion_sign_ups_post_engagement\",\n \"conversion_sign_ups_post_view\",\n \"conversion_sign_ups_sale_amount\",\n \"conversion_sign_ups_sale_amount_engagement\",\n \"conversion_sign_ups_sale_amount_view\",\n \"conversion_site_visits_metric\",\n \"conversion_site_visits_order_quantity\",\n \"conversion_site_visits_order_quantity_engagement\",\n \"conversion_site_visits_order_quantity_view\",\n \"conversion_site_visits_post_engagement\",\n \"conversion_site_visits_post_view\",\n \"conversion_site_visits_sale_amount\",\n \"conversion_site_visits_sale_amount_engagement\",\n \"conversion_site_visits_sale_amount_view\",\n \"engagements\",\n \"follows\",\n \"impressions\",\n \"likes\",\n \"media_engagements\",\n \"media_views\",\n \"mobile_conversion_achievements_unlocked_assisted\",\n \"mobile_conversion_achievements_unlocked_order_quantity\",\n \"mobile_conversion_achievements_unlocked_post_engagement\",\n \"mobile_conversion_achievements_unlocked_post_view\",\n \"mobile_conversion_achievements_unlocked_sale_amount\",\n \"mobile_conversion_add_to_carts_assisted\",\n \"mobile_conversion_add_to_carts_order_quantity\",\n \"mobile_conversion_add_to_carts_post_engagement\",\n \"mobile_conversion_add_to_carts_post_view\",\n \"mobile_conversion_add_to_carts_sale_amount\",\n \"mobile_conversion_add_to_wishlists_assisted\",\n \"mobile_conversion_add_to_wishlists_order_quantity\",\n \"mobile_conversion_add_to_wishlists_post_engagement\",\n \"mobile_conversion_add_to_wishlists_post_view\",\n \"mobile_conversion_add_to_wishlists_sale_amount\",\n \"mobile_conversion_checkouts_initiated_assisted\",\n \"mobile_conversion_checkouts_initiated_order_quantity\",\n \"mobile_conversion_checkouts_initiated_post_engagement\",\n \"mobile_conversion_checkouts_initiated_post_view\",\n \"mobile_conversion_checkouts_initiated_sale_amount\",\n \"mobile_conversion_content_views_assisted\",\n \"mobile_conversion_content_views_order_quantity\",\n \"mobile_conversion_content_views_post_engagement\",\n \"mobile_conversion_content_views_post_view\",\n \"mobile_conversion_content_views_sale_amount\",\n \"mobile_conversion_downloads_order_quantity\",\n \"mobile_conversion_downloads_post_engagement\",\n \"mobile_conversion_downloads_post_view\",\n \"mobile_conversion_downloads_sale_amount\",\n \"mobile_conversion_installs_assisted\",\n \"mobile_conversion_installs_order_quantity\",\n \"mobile_conversion_installs_post_engagement\",\n \"mobile_conversion_installs_post_view\",\n \"mobile_conversion_installs_sale_amount\",\n \"mobile_conversion_invites_assisted\",\n \"mobile_conversion_invites_order_quantity\",\n \"mobile_conversion_invites_post_engagement\",\n \"mobile_conversion_invites_post_view\",\n \"mobile_conversion_invites_sale_amount\",\n \"mobile_conversion_key_page_views_post_engagement\",\n \"mobile_conversion_key_page_views_post_view\",\n \"mobile_conversion_levels_achieved_assisted\",\n \"mobile_conversion_levels_achieved_order_quantity\",\n \"mobile_conversion_levels_achieved_post_engagement\",\n \"mobile_conversion_levels_achieved_post_view\",\n \"mobile_conversion_levels_achieved_sale_amount\",\n \"mobile_conversion_lifetime_value_achievements_unlocked_metric\",\n \"mobile_conversion_lifetime_value_achievements_unlocked_order_qu\",\n \"mobile_conversion_lifetime_value_achievements_unlocked_sale_amo\",\n \"mobile_conversion_lifetime_value_add_to_carts_metric\",\n \"mobile_conversion_lifetime_value_add_to_carts_order_quantity\",\n \"mobile_conversion_lifetime_value_add_to_carts_sale_amount\",\n \"mobile_conversion_lifetime_value_add_to_wishlists_metric\",\n \"mobile_conversion_lifetime_value_add_to_wishlists_order_quantit\",\n \"mobile_conversion_lifetime_value_add_to_wishlists_sale_amount\",\n \"mobile_conversion_lifetime_value_checkouts_initiated_metric\",\n \"mobile_conversion_lifetime_value_checkouts_initiated_order_quan\",\n \"mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun\",\n \"mobile_conversion_lifetime_value_content_views_metric\",\n \"mobile_conversion_lifetime_value_content_views_order_quantity\",\n \"mobile_conversion_lifetime_value_content_views_sale_amount\",\n \"mobile_conversion_lifetime_value_invites_metric\",\n \"mobile_conversion_lifetime_value_invites_order_quantity\",\n \"mobile_conversion_lifetime_value_invites_sale_amount\",\n \"mobile_conversion_lifetime_value_levels_achieved_metric\",\n \"mobile_conversion_lifetime_value_levels_achieved_order_quantity\",\n \"mobile_conversion_lifetime_value_levels_achieved_sale_amount\",\n \"mobile_conversion_lifetime_value_logins_metric\",\n \"mobile_conversion_lifetime_value_logins_order_quantity\",\n \"mobile_conversion_lifetime_value_logins_sale_amount\",\n \"mobile_conversion_lifetime_value_payment_info_additions_metric\",\n \"mobile_conversion_lifetime_value_payment_info_additions_order_q\",\n \"mobile_conversion_lifetime_value_payment_info_additions_sale_am\",\n \"mobile_conversion_lifetime_value_purchases_metric\",\n \"mobile_conversion_lifetime_value_purchases_order_quantity\",\n \"mobile_conversion_lifetime_value_purchases_sale_amount\",\n \"mobile_conversion_lifetime_value_rates_metric\",\n \"mobile_conversion_lifetime_value_rates_order_quantity\",\n \"mobile_conversion_lifetime_value_rates_sale_amount\",\n \"mobile_conversion_lifetime_value_reservations_metric\",\n \"mobile_conversion_lifetime_value_reservations_order_quantity\",\n \"mobile_conversion_lifetime_value_reservations_sale_amount\",\n \"mobile_conversion_lifetime_value_searches_metric\",\n \"mobile_conversion_lifetime_value_searches_order_quantity\",\n \"mobile_conversion_lifetime_value_searches_sale_amount\",\n \"mobile_conversion_lifetime_value_shares_metric\",\n \"mobile_conversion_lifetime_value_shares_order_quantity\",\n \"mobile_conversion_lifetime_value_shares_sale_amount\",\n \"mobile_conversion_lifetime_value_sign_ups_metric\",\n \"mobile_conversion_lifetime_value_sign_ups_order_quantity\",\n \"mobile_conversion_lifetime_value_sign_ups_sale_amount\",\n \"mobile_conversion_lifetime_value_spent_credits_metric\",\n \"mobile_conversion_lifetime_value_spent_credits_order_quantity\",\n \"mobile_conversion_lifetime_value_spent_credits_sale_amount\",\n \"mobile_conversion_lifetime_value_tutorials_completed_metric\",\n \"mobile_conversion_lifetime_value_tutorials_completed_order_quan\",\n \"mobile_conversion_lifetime_value_tutorials_completed_sale_amoun\",\n \"mobile_conversion_lifetime_value_updates_metric\",\n \"mobile_conversion_lifetime_value_updates_order_quantity\",\n \"mobile_conversion_lifetime_value_updates_sale_amount\",\n \"mobile_conversion_logins_assisted\",\n \"mobile_conversion_logins_order_quantity\",\n \"mobile_conversion_logins_post_engagement\",\n \"mobile_conversion_logins_post_view\",\n \"mobile_conversion_logins_sale_amount\",\n \"mobile_conversion_payment_info_additions_assisted\",\n \"mobile_conversion_payment_info_additions_order_quantity\",\n \"mobile_conversion_payment_info_additions_post_engagement\",\n \"mobile_conversion_payment_info_additions_post_view\",\n \"mobile_conversion_payment_info_additions_sale_amount\",\n \"mobile_conversion_purchases_assisted\",\n \"mobile_conversion_purchases_order_quantity\",\n \"mobile_conversion_purchases_post_engagement\",\n \"mobile_conversion_purchases_post_view\",\n \"mobile_conversion_purchases_sale_amount\",\n \"mobile_conversion_rates_assisted\",\n \"mobile_conversion_rates_order_quantity\",\n \"mobile_conversion_rates_post_engagement\",\n \"mobile_conversion_rates_post_view\",\n \"mobile_conversion_rates_sale_amount\",\n \"mobile_conversion_re_engages_assisted\",\n \"mobile_conversion_re_engages_order_quantity\",\n \"mobile_conversion_re_engages_post_engagement\",\n \"mobile_conversion_re_engages_post_view\",\n \"mobile_conversion_re_engages_sale_amount\",\n \"mobile_conversion_reservations_assisted\",\n \"mobile_conversion_reservations_order_quantity\",\n \"mobile_conversion_reservations_post_engagement\",\n \"mobile_conversion_reservations_post_view\",\n \"mobile_conversion_reservations_sale_amount\",\n \"mobile_conversion_searches_assisted\",\n \"mobile_conversion_searches_order_quantity\",\n \"mobile_conversion_searches_post_engagement\",\n \"mobile_conversion_searches_post_view\",\n \"mobile_conversion_searches_sale_amount\",\n \"mobile_conversion_shares_assisted\",\n \"mobile_conversion_shares_order_quantity\",\n \"mobile_conversion_shares_post_engagement\",\n \"mobile_conversion_shares_post_view\",\n \"mobile_conversion_shares_sale_amount\",\n \"mobile_conversion_sign_ups_assisted\",\n \"mobile_conversion_sign_ups_order_quantity\",\n \"mobile_conversion_sign_ups_post_engagement\",\n \"mobile_conversion_sign_ups_post_view\",\n \"mobile_conversion_sign_ups_sale_amount\",\n \"mobile_conversion_site_visits_order_quantity\",\n \"mobile_conversion_site_visits_post_engagement\",\n \"mobile_conversion_site_visits_post_view\",\n \"mobile_conversion_site_visits_sale_amount\",\n \"mobile_conversion_spent_credits_assisted\",\n \"mobile_conversion_spent_credits_order_quantity\",\n \"mobile_conversion_spent_credits_post_engagement\",\n \"mobile_conversion_spent_credits_post_view\",\n \"mobile_conversion_spent_credits_sale_amount\",\n \"mobile_conversion_tutorials_completed_assisted\",\n \"mobile_conversion_tutorials_completed_order_quantity\",\n \"mobile_conversion_tutorials_completed_post_engagement\",\n \"mobile_conversion_tutorials_completed_post_view\",\n \"mobile_conversion_tutorials_completed_sale_amount\",\n \"mobile_conversion_updates_assisted\",\n \"mobile_conversion_updates_order_quantity\",\n \"mobile_conversion_updates_post_engagement\",\n \"mobile_conversion_updates_post_view\",\n \"mobile_conversion_updates_sale_amount\",\n \"poll_card_vote\",\n \"qualified_impressions\",\n \"replies\",\n \"retweets\",\n \"tweets_send\",\n \"unfollows\",\n \"url_clicks\",\n \"video_3_s_100_pct_views\",\n \"video_6_s_views\",\n \"video_content_starts\",\n \"video_cta_clicks\",\n \"video_mrc_views\",\n \"video_total_views\",\n \"video_views_100\",\n \"video_views_25\",\n \"video_views_50\",\n \"video_views_75\",\n \"mobile_conversion_installs_skan_post_engagement\",\n \"mobile_conversion_installs_skan_post_view\",\n \"mobile_conversion_purchases_skan_post_engagement\",\n \"mobile_conversion_purchases_skan_post_view\",\n \"video_15_s_views\",\n \"auto_created_conversion_landing_page_view\",\n \"auto_created_conversion_session\"\n from \"postgres\".\"public\".\"twitter_campaign_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__campaign_regions_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_regions_report_tmp", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/tmp/stg_twitter_ads__campaign_regions_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_twitter_ads__campaign_regions_report_tmp.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_regions_report_tmp", "fqn": ["twitter_ads", "staging", "tmp", "stg_twitter_ads__campaign_regions_report_tmp"], "alias": "stg_twitter_ads__campaign_regions_report_tmp", "checksum": {"name": "sha256", "checksum": "af8f97be11b9863514221eb9b89275237bf8d97ae2448f6754be0c07c6d020b1"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450500.4055357, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_regions_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True) and var('twitter_ads__using_campaign_regions_report', False)) }}\n\n{% if var('twitter_ads_union_schemas', []) | length > 0 or var('twitter_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_regions_report',\n database_variable='twitter_ads_database',\n schema_variable='twitter_ads_schema',\n default_database=target.database,\n default_schema='twitter_ads',\n default_variable='campaign_regions_report',\n union_schema_variable='twitter_ads_union_schemas',\n union_database_variable='twitter_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='twitter_ads_sources',\n single_source_name='twitter_ads',\n single_table_name='campaign_regions_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["twitter_ads", "campaign_regions_report"], ["twitter_ads", "campaign_regions_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.twitter_ads.twitter_ads.campaign_regions_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/tmp/stg_twitter_ads__campaign_regions_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: twitter_ads_campaign_regions_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: twitter_campaign_regions_report_data\n\n\n select\n \"location_name\",\n \"location_type\",\n \"segment\",\n \"account_id\",\n \"billed_charge_local_micro\",\n \"campaign_id\",\n \"clicks\",\n \"date\",\n \"impressions\",\n \"placement\",\n \"url_clicks\"\n from \"postgres\".\"public\".\"twitter_campaign_regions_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__campaign_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_history_tmp", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/tmp/stg_twitter_ads__campaign_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_twitter_ads__campaign_history_tmp.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_history_tmp", "fqn": ["twitter_ads", "staging", "tmp", "stg_twitter_ads__campaign_history_tmp"], "alias": "stg_twitter_ads__campaign_history_tmp", "checksum": {"name": "sha256", "checksum": "652243666d352210eee5e8da1167c8d298ec3174a6dfb45b0c13d8848a69fa60"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450500.4169865, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\n{% if var('twitter_ads_union_schemas', []) | length > 0 or var('twitter_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_history',\n database_variable='twitter_ads_database',\n schema_variable='twitter_ads_schema',\n default_database=target.database,\n default_schema='twitter_ads',\n default_variable='campaign_history',\n union_schema_variable='twitter_ads_union_schemas',\n union_database_variable='twitter_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='twitter_ads_sources',\n single_source_name='twitter_ads',\n single_table_name='campaign_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["twitter_ads", "campaign_history"], ["twitter_ads", "campaign_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.twitter_ads.twitter_ads.campaign_history"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/tmp/stg_twitter_ads__campaign_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: twitter_ads_campaign_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: twitter_campaign_history_data\n\n\n select\n \"_fivetran_synced\",\n \"account_id\",\n \"created_at\",\n \"currency\",\n \"daily_budget_amount_local_micro\",\n \"deleted\",\n \"duration_in_days\",\n \"end_time\",\n \"entity_status\",\n \"frequency_cap\",\n \"funding_instrument_id\",\n \"id\",\n \"name\",\n \"servable\",\n \"standard_delivery\",\n \"start_time\",\n \"total_budget_amount_local_micro\",\n \"updated_at\"\n from \"postgres\".\"public\".\"twitter_campaign_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__line_item_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__line_item_history_tmp", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/tmp/stg_twitter_ads__line_item_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_twitter_ads__line_item_history_tmp.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__line_item_history_tmp", "fqn": ["twitter_ads", "staging", "tmp", "stg_twitter_ads__line_item_history_tmp"], "alias": "stg_twitter_ads__line_item_history_tmp", "checksum": {"name": "sha256", "checksum": "aa6f33a38e0e41976bd71b53581fb8e6b011ff6731c4d5762216db610901d6c8"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450500.4289033, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\n{% if var('twitter_ads_union_schemas', []) | length > 0 or var('twitter_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='line_item_history',\n database_variable='twitter_ads_database',\n schema_variable='twitter_ads_schema',\n default_database=target.database,\n default_schema='twitter_ads',\n default_variable='line_item_history',\n union_schema_variable='twitter_ads_union_schemas',\n union_database_variable='twitter_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='twitter_ads_sources',\n single_source_name='twitter_ads',\n single_table_name='line_item_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["twitter_ads", "line_item_history"], ["twitter_ads", "line_item_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.twitter_ads.twitter_ads.line_item_history"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/tmp/stg_twitter_ads__line_item_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: twitter_ads_line_item_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: twitter_line_item_history_data\n\n\n select\n \"advertiser_domain\",\n \"advertiser_user_id\",\n \"automatically_select_bid\",\n \"bid_amount_local_micro\",\n \"bid_type\",\n \"bid_unit\",\n \"campaign_id\",\n \"charge_by\",\n \"created_at\",\n \"creative_source\",\n \"currency\",\n \"deleted\",\n \"end_time\",\n \"entity_status\",\n \"id\",\n \"name\",\n \"objective\",\n \"optimization\",\n \"primary_web_event_tag\",\n \"product_type\",\n \"start_time\",\n \"target_cpa_local_micro\",\n \"total_budget_amount_local_micro\",\n \"updated_at\"\n from \"postgres\".\"public\".\"twitter_line_item_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__promoted_tweet_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__promoted_tweet_report_tmp", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/tmp/stg_twitter_ads__promoted_tweet_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_twitter_ads__promoted_tweet_report_tmp.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__promoted_tweet_report_tmp", "fqn": ["twitter_ads", "staging", "tmp", "stg_twitter_ads__promoted_tweet_report_tmp"], "alias": "stg_twitter_ads__promoted_tweet_report_tmp", "checksum": {"name": "sha256", "checksum": "b48edb66ac4ecc607561780165aff356fed7b33b088ab56bbb7be341f6e055e6"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450500.4395819, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\n{% if var('twitter_ads_union_schemas', []) | length > 0 or var('twitter_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='promoted_tweet_report',\n database_variable='twitter_ads_database',\n schema_variable='twitter_ads_schema',\n default_database=target.database,\n default_schema='twitter_ads',\n default_variable='promoted_tweet_report',\n union_schema_variable='twitter_ads_union_schemas',\n union_database_variable='twitter_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='twitter_ads_sources',\n single_source_name='twitter_ads',\n single_table_name='promoted_tweet_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["twitter_ads", "promoted_tweet_report"], ["twitter_ads", "promoted_tweet_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.twitter_ads.twitter_ads.promoted_tweet_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/tmp/stg_twitter_ads__promoted_tweet_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: twitter_ads_promoted_tweet_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: twitter_promoted_tweet_report_data\n\n\n select\n \"_fivetran_synced\",\n \"account_id\",\n \"billed_charge_local_micro\",\n \"clicks\",\n \"date\",\n \"impressions\",\n \"promoted_tweet_id\",\n \"url_clicks\",\n \"placement\"\n from \"postgres\".\"public\".\"twitter_promoted_tweet_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__campaign_locations_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_locations_report_tmp", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/tmp/stg_twitter_ads__campaign_locations_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_twitter_ads__campaign_locations_report_tmp.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_locations_report_tmp", "fqn": ["twitter_ads", "staging", "tmp", "stg_twitter_ads__campaign_locations_report_tmp"], "alias": "stg_twitter_ads__campaign_locations_report_tmp", "checksum": {"name": "sha256", "checksum": "250038b9407c673ec77955785b7f46d875a8a5082091778347c7383d93231d53"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450500.4504106, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_locations_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True) and var('twitter_ads__using_campaign_locations_report', False)) }}\n\n{% if var('twitter_ads_union_schemas', []) | length > 0 or var('twitter_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_locations_report',\n database_variable='twitter_ads_database',\n schema_variable='twitter_ads_schema',\n default_database=target.database,\n default_schema='twitter_ads',\n default_variable='campaign_locations_report',\n union_schema_variable='twitter_ads_union_schemas',\n union_database_variable='twitter_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='twitter_ads_sources',\n single_source_name='twitter_ads',\n single_table_name='campaign_locations_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["twitter_ads", "campaign_locations_report"], ["twitter_ads", "campaign_locations_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.twitter_ads.twitter_ads.campaign_locations_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/tmp/stg_twitter_ads__campaign_locations_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: twitter_ads_campaign_locations_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: twitter_campaign_locations_report_data\n\n\n select\n \"segment\",\n \"account_id\",\n \"billed_charge_local_micro\",\n \"campaign_id\",\n \"clicks\",\n \"date\",\n \"impressions\",\n \"placement\",\n \"url_clicks\"\n from \"postgres\".\"public\".\"twitter_campaign_locations_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__line_item_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__line_item_report_tmp", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/tmp/stg_twitter_ads__line_item_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_twitter_ads__line_item_report_tmp.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__line_item_report_tmp", "fqn": ["twitter_ads", "staging", "tmp", "stg_twitter_ads__line_item_report_tmp"], "alias": "stg_twitter_ads__line_item_report_tmp", "checksum": {"name": "sha256", "checksum": "18977c917618a00edb2b2371945c7543897dcff2ad185487eac00ed5a62b0359"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450500.4614165, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\n{% if var('twitter_ads_union_schemas', []) | length > 0 or var('twitter_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='line_item_report',\n database_variable='twitter_ads_database',\n schema_variable='twitter_ads_schema',\n default_database=target.database,\n default_schema='twitter_ads',\n default_variable='line_item_report',\n union_schema_variable='twitter_ads_union_schemas',\n union_database_variable='twitter_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='twitter_ads_sources',\n single_source_name='twitter_ads',\n single_table_name='line_item_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["twitter_ads", "line_item_report"], ["twitter_ads", "line_item_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.twitter_ads.twitter_ads.line_item_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/tmp/stg_twitter_ads__line_item_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: twitter_ads_line_item_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: twitter_line_item_report_data\n\n\n select\n \"account_id\",\n \"date\",\n \"line_item_id\",\n \"placement\",\n \"_fivetran_synced\",\n \"app_clicks\",\n \"billed_charge_local_micro\",\n \"billed_engagements\",\n \"card_engagements\",\n \"carousel_swipes\",\n \"clicks\",\n \"conversion_custom_metric\",\n \"conversion_custom_order_quantity\",\n \"conversion_custom_order_quantity_engagement\",\n \"conversion_custom_order_quantity_view\",\n \"conversion_custom_post_engagement\",\n \"conversion_custom_post_view\",\n \"conversion_custom_sale_amount\",\n \"conversion_custom_sale_amount_engagement\",\n \"conversion_custom_sale_amount_view\",\n \"conversion_downloads_metric\",\n \"conversion_downloads_order_quantity\",\n \"conversion_downloads_order_quantity_engagement\",\n \"conversion_downloads_order_quantity_view\",\n \"conversion_downloads_post_engagement\",\n \"conversion_downloads_post_view\",\n \"conversion_downloads_sale_amount\",\n \"conversion_downloads_sale_amount_engagement\",\n \"conversion_downloads_sale_amount_view\",\n \"conversion_purchases_assisted\",\n \"conversion_purchases_metric\",\n \"conversion_purchases_order_quantity\",\n \"conversion_purchases_order_quantity_engagement\",\n \"conversion_purchases_order_quantity_view\",\n \"conversion_purchases_post_engagement\",\n \"conversion_purchases_post_view\",\n \"conversion_purchases_sale_amount\",\n \"conversion_purchases_sale_amount_engagement\",\n \"conversion_purchases_sale_amount_view\",\n \"conversion_sign_ups_assisted\",\n \"conversion_sign_ups_metric\",\n \"conversion_sign_ups_order_quantity\",\n \"conversion_sign_ups_order_quantity_engagement\",\n \"conversion_sign_ups_order_quantity_view\",\n \"conversion_sign_ups_post_engagement\",\n \"conversion_sign_ups_post_view\",\n \"conversion_sign_ups_sale_amount\",\n \"conversion_sign_ups_sale_amount_engagement\",\n \"conversion_sign_ups_sale_amount_view\",\n \"conversion_site_visits_metric\",\n \"conversion_site_visits_order_quantity\",\n \"conversion_site_visits_order_quantity_engagement\",\n \"conversion_site_visits_order_quantity_view\",\n \"conversion_site_visits_post_engagement\",\n \"conversion_site_visits_post_view\",\n \"conversion_site_visits_sale_amount\",\n \"conversion_site_visits_sale_amount_engagement\",\n \"conversion_site_visits_sale_amount_view\",\n \"engagements\",\n \"follows\",\n \"impressions\",\n \"likes\",\n \"media_engagements\",\n \"media_views\",\n \"mobile_conversion_achievements_unlocked_assisted\",\n \"mobile_conversion_achievements_unlocked_order_quantity\",\n \"mobile_conversion_achievements_unlocked_post_engagement\",\n \"mobile_conversion_achievements_unlocked_post_view\",\n \"mobile_conversion_achievements_unlocked_sale_amount\",\n \"mobile_conversion_add_to_carts_assisted\",\n \"mobile_conversion_add_to_carts_order_quantity\",\n \"mobile_conversion_add_to_carts_post_engagement\",\n \"mobile_conversion_add_to_carts_post_view\",\n \"mobile_conversion_add_to_carts_sale_amount\",\n \"mobile_conversion_add_to_wishlists_assisted\",\n \"mobile_conversion_add_to_wishlists_order_quantity\",\n \"mobile_conversion_add_to_wishlists_post_engagement\",\n \"mobile_conversion_add_to_wishlists_post_view\",\n \"mobile_conversion_add_to_wishlists_sale_amount\",\n \"mobile_conversion_checkouts_initiated_assisted\",\n \"mobile_conversion_checkouts_initiated_order_quantity\",\n \"mobile_conversion_checkouts_initiated_post_engagement\",\n \"mobile_conversion_checkouts_initiated_post_view\",\n \"mobile_conversion_checkouts_initiated_sale_amount\",\n \"mobile_conversion_content_views_assisted\",\n \"mobile_conversion_content_views_order_quantity\",\n \"mobile_conversion_content_views_post_engagement\",\n \"mobile_conversion_content_views_post_view\",\n \"mobile_conversion_content_views_sale_amount\",\n \"mobile_conversion_downloads_order_quantity\",\n \"mobile_conversion_downloads_post_engagement\",\n \"mobile_conversion_downloads_post_view\",\n \"mobile_conversion_downloads_sale_amount\",\n \"mobile_conversion_installs_assisted\",\n \"mobile_conversion_installs_order_quantity\",\n \"mobile_conversion_installs_post_engagement\",\n \"mobile_conversion_installs_post_view\",\n \"mobile_conversion_installs_sale_amount\",\n \"mobile_conversion_invites_assisted\",\n \"mobile_conversion_invites_order_quantity\",\n \"mobile_conversion_invites_post_engagement\",\n \"mobile_conversion_invites_post_view\",\n \"mobile_conversion_invites_sale_amount\",\n \"mobile_conversion_key_page_views_post_engagement\",\n \"mobile_conversion_key_page_views_post_view\",\n \"mobile_conversion_levels_achieved_assisted\",\n \"mobile_conversion_levels_achieved_order_quantity\",\n \"mobile_conversion_levels_achieved_post_engagement\",\n \"mobile_conversion_levels_achieved_post_view\",\n \"mobile_conversion_levels_achieved_sale_amount\",\n \"mobile_conversion_lifetime_value_achievements_unlocked_metric\",\n \"mobile_conversion_lifetime_value_achievements_unlocked_order_qu\",\n \"mobile_conversion_lifetime_value_achievements_unlocked_sale_amo\",\n \"mobile_conversion_lifetime_value_add_to_carts_metric\",\n \"mobile_conversion_lifetime_value_add_to_carts_order_quantity\",\n \"mobile_conversion_lifetime_value_add_to_carts_sale_amount\",\n \"mobile_conversion_lifetime_value_add_to_wishlists_metric\",\n \"mobile_conversion_lifetime_value_add_to_wishlists_order_quantit\",\n \"mobile_conversion_lifetime_value_add_to_wishlists_sale_amount\",\n \"mobile_conversion_lifetime_value_checkouts_initiated_metric\",\n \"mobile_conversion_lifetime_value_checkouts_initiated_order_quan\",\n \"mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun\",\n \"mobile_conversion_lifetime_value_content_views_metric\",\n \"mobile_conversion_lifetime_value_content_views_order_quantity\",\n \"mobile_conversion_lifetime_value_content_views_sale_amount\",\n \"mobile_conversion_lifetime_value_invites_metric\",\n \"mobile_conversion_lifetime_value_invites_order_quantity\",\n \"mobile_conversion_lifetime_value_invites_sale_amount\",\n \"mobile_conversion_lifetime_value_levels_achieved_metric\",\n \"mobile_conversion_lifetime_value_levels_achieved_order_quantity\",\n \"mobile_conversion_lifetime_value_levels_achieved_sale_amount\",\n \"mobile_conversion_lifetime_value_logins_metric\",\n \"mobile_conversion_lifetime_value_logins_order_quantity\",\n \"mobile_conversion_lifetime_value_logins_sale_amount\",\n \"mobile_conversion_lifetime_value_payment_info_additions_metric\",\n \"mobile_conversion_lifetime_value_payment_info_additions_order_q\",\n \"mobile_conversion_lifetime_value_payment_info_additions_sale_am\",\n \"mobile_conversion_lifetime_value_purchases_metric\",\n \"mobile_conversion_lifetime_value_purchases_order_quantity\",\n \"mobile_conversion_lifetime_value_purchases_sale_amount\",\n \"mobile_conversion_lifetime_value_rates_metric\",\n \"mobile_conversion_lifetime_value_rates_order_quantity\",\n \"mobile_conversion_lifetime_value_rates_sale_amount\",\n \"mobile_conversion_lifetime_value_reservations_metric\",\n \"mobile_conversion_lifetime_value_reservations_order_quantity\",\n \"mobile_conversion_lifetime_value_reservations_sale_amount\",\n \"mobile_conversion_lifetime_value_searches_metric\",\n \"mobile_conversion_lifetime_value_searches_order_quantity\",\n \"mobile_conversion_lifetime_value_searches_sale_amount\",\n \"mobile_conversion_lifetime_value_shares_metric\",\n \"mobile_conversion_lifetime_value_shares_order_quantity\",\n \"mobile_conversion_lifetime_value_shares_sale_amount\",\n \"mobile_conversion_lifetime_value_sign_ups_metric\",\n \"mobile_conversion_lifetime_value_sign_ups_order_quantity\",\n \"mobile_conversion_lifetime_value_sign_ups_sale_amount\",\n \"mobile_conversion_lifetime_value_spent_credits_metric\",\n \"mobile_conversion_lifetime_value_spent_credits_order_quantity\",\n \"mobile_conversion_lifetime_value_spent_credits_sale_amount\",\n \"mobile_conversion_lifetime_value_tutorials_completed_metric\",\n \"mobile_conversion_lifetime_value_tutorials_completed_order_quan\",\n \"mobile_conversion_lifetime_value_tutorials_completed_sale_amoun\",\n \"mobile_conversion_lifetime_value_updates_metric\",\n \"mobile_conversion_lifetime_value_updates_order_quantity\",\n \"mobile_conversion_lifetime_value_updates_sale_amount\",\n \"mobile_conversion_logins_assisted\",\n \"mobile_conversion_logins_order_quantity\",\n \"mobile_conversion_logins_post_engagement\",\n \"mobile_conversion_logins_post_view\",\n \"mobile_conversion_logins_sale_amount\",\n \"mobile_conversion_payment_info_additions_assisted\",\n \"mobile_conversion_payment_info_additions_order_quantity\",\n \"mobile_conversion_payment_info_additions_post_engagement\",\n \"mobile_conversion_payment_info_additions_post_view\",\n \"mobile_conversion_payment_info_additions_sale_amount\",\n \"mobile_conversion_purchases_assisted\",\n \"mobile_conversion_purchases_order_quantity\",\n \"mobile_conversion_purchases_post_engagement\",\n \"mobile_conversion_purchases_post_view\",\n \"mobile_conversion_purchases_sale_amount\",\n \"mobile_conversion_rates_assisted\",\n \"mobile_conversion_rates_order_quantity\",\n \"mobile_conversion_rates_post_engagement\",\n \"mobile_conversion_rates_post_view\",\n \"mobile_conversion_rates_sale_amount\",\n \"mobile_conversion_re_engages_assisted\",\n \"mobile_conversion_re_engages_order_quantity\",\n \"mobile_conversion_re_engages_post_engagement\",\n \"mobile_conversion_re_engages_post_view\",\n \"mobile_conversion_re_engages_sale_amount\",\n \"mobile_conversion_reservations_assisted\",\n \"mobile_conversion_reservations_order_quantity\",\n \"mobile_conversion_reservations_post_engagement\",\n \"mobile_conversion_reservations_post_view\",\n \"mobile_conversion_reservations_sale_amount\",\n \"mobile_conversion_searches_assisted\",\n \"mobile_conversion_searches_order_quantity\",\n \"mobile_conversion_searches_post_engagement\",\n \"mobile_conversion_searches_post_view\",\n \"mobile_conversion_searches_sale_amount\",\n \"mobile_conversion_shares_assisted\",\n \"mobile_conversion_shares_order_quantity\",\n \"mobile_conversion_shares_post_engagement\",\n \"mobile_conversion_shares_post_view\",\n \"mobile_conversion_shares_sale_amount\",\n \"mobile_conversion_sign_ups_assisted\",\n \"mobile_conversion_sign_ups_order_quantity\",\n \"mobile_conversion_sign_ups_post_engagement\",\n \"mobile_conversion_sign_ups_post_view\",\n \"mobile_conversion_sign_ups_sale_amount\",\n \"mobile_conversion_site_visits_order_quantity\",\n \"mobile_conversion_site_visits_post_engagement\",\n \"mobile_conversion_site_visits_post_view\",\n \"mobile_conversion_site_visits_sale_amount\",\n \"mobile_conversion_spent_credits_assisted\",\n \"mobile_conversion_spent_credits_order_quantity\",\n \"mobile_conversion_spent_credits_post_engagement\",\n \"mobile_conversion_spent_credits_post_view\",\n \"mobile_conversion_spent_credits_sale_amount\",\n \"mobile_conversion_tutorials_completed_assisted\",\n \"mobile_conversion_tutorials_completed_order_quantity\",\n \"mobile_conversion_tutorials_completed_post_engagement\",\n \"mobile_conversion_tutorials_completed_post_view\",\n \"mobile_conversion_tutorials_completed_sale_amount\",\n \"mobile_conversion_updates_assisted\",\n \"mobile_conversion_updates_order_quantity\",\n \"mobile_conversion_updates_post_engagement\",\n \"mobile_conversion_updates_post_view\",\n \"mobile_conversion_updates_sale_amount\",\n \"poll_card_vote\",\n \"qualified_impressions\",\n \"replies\",\n \"retweets\",\n \"tweets_send\",\n \"unfollows\",\n \"url_clicks\",\n \"video_3_s_100_pct_views\",\n \"video_6_s_views\",\n \"video_content_starts\",\n \"video_cta_clicks\",\n \"video_mrc_views\",\n \"video_total_views\",\n \"video_views_100\",\n \"video_views_25\",\n \"video_views_50\",\n \"video_views_75\",\n \"mobile_conversion_installs_skan_post_engagement\",\n \"mobile_conversion_installs_skan_post_view\",\n \"mobile_conversion_purchases_skan_post_engagement\",\n \"mobile_conversion_purchases_skan_post_view\",\n \"video_15_s_views\",\n \"auto_created_conversion_landing_page_view\",\n \"auto_created_conversion_session\"\n from \"postgres\".\"public\".\"twitter_line_item_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__account_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__account_history_tmp", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/tmp/stg_twitter_ads__account_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_twitter_ads__account_history_tmp.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__account_history_tmp", "fqn": ["twitter_ads", "staging", "tmp", "stg_twitter_ads__account_history_tmp"], "alias": "stg_twitter_ads__account_history_tmp", "checksum": {"name": "sha256", "checksum": "fbdce56610b1d55177125431103ff0a3329cec21827266bc1c4b852d13bf48b2"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450500.4737654, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__account_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\n{% if var('twitter_ads_union_schemas', []) | length > 0 or var('twitter_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='account_history', \n database_variable='twitter_ads_database', \n schema_variable='twitter_ads_schema', \n default_database=target.database,\n default_schema='twitter_ads',\n default_variable='account_history',\n union_schema_variable='twitter_ads_union_schemas',\n union_database_variable='twitter_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='twitter_ads_sources',\n single_source_name='twitter_ads',\n single_table_name='account_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["twitter_ads", "account_history"], ["twitter_ads", "account_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.twitter_ads.twitter_ads.account_history"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/tmp/stg_twitter_ads__account_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: twitter_ads_account_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: twitter_account_history_data\n\n\n select\n \"_fivetran_synced\",\n \"approval_status\",\n \"business_id\",\n \"business_name\",\n \"created_at\",\n \"deleted\",\n \"id\",\n \"industry_type\",\n \"name\",\n \"salt\",\n \"timezone\",\n \"timezone_switch_at\",\n \"updated_at\"\n from \"postgres\".\"public\".\"twitter_account_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__promoted_tweet_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__promoted_tweet_history_tmp", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/tmp/stg_twitter_ads__promoted_tweet_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_twitter_ads__promoted_tweet_history_tmp.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__promoted_tweet_history_tmp", "fqn": ["twitter_ads", "staging", "tmp", "stg_twitter_ads__promoted_tweet_history_tmp"], "alias": "stg_twitter_ads__promoted_tweet_history_tmp", "checksum": {"name": "sha256", "checksum": "194a9c37fbc2f8c998914c8c8cd6a2a6f7309764fe335ad4da371765d9334bf7"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450500.4842386, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\n{% if var('twitter_ads_union_schemas', []) | length > 0 or var('twitter_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='promoted_tweet_history',\n database_variable='twitter_ads_database',\n schema_variable='twitter_ads_schema',\n default_database=target.database,\n default_schema='twitter_ads',\n default_variable='promoted_tweet_history',\n union_schema_variable='twitter_ads_union_schemas',\n union_database_variable='twitter_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='twitter_ads_sources',\n single_source_name='twitter_ads',\n single_table_name='promoted_tweet_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["twitter_ads", "promoted_tweet_history"], ["twitter_ads", "promoted_tweet_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.twitter_ads.twitter_ads.promoted_tweet_history"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/tmp/stg_twitter_ads__promoted_tweet_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: twitter_ads_promoted_tweet_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: twitter_promoted_tweet_history_data\n\n\n select\n \"_fivetran_synced\",\n \"approval_status\",\n \"created_at\",\n \"deleted\",\n \"entity_status\",\n \"id\",\n \"line_item_id\",\n \"tweet_id\",\n \"updated_at\"\n from \"postgres\".\"public\".\"twitter_promoted_tweet_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__line_item_keywords_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__line_item_keywords_report_tmp", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/tmp/stg_twitter_ads__line_item_keywords_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_twitter_ads__line_item_keywords_report_tmp.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__line_item_keywords_report_tmp", "fqn": ["twitter_ads", "staging", "tmp", "stg_twitter_ads__line_item_keywords_report_tmp"], "alias": "stg_twitter_ads__line_item_keywords_report_tmp", "checksum": {"name": "sha256", "checksum": "9be92960644cac6c631e79794d470796ba61396b181cf3519c58c6c44c2c4570"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450500.4949641, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_keywords_report_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__twitter_ads_enabled','twitter_ads__using_keywords'])) }}\n\n{% if var('twitter_ads_union_schemas', []) | length > 0 or var('twitter_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='line_item_keywords_report',\n database_variable='twitter_ads_database',\n schema_variable='twitter_ads_schema',\n default_database=target.database,\n default_schema='twitter_ads',\n default_variable='line_item_keywords_report',\n union_schema_variable='twitter_ads_union_schemas',\n union_database_variable='twitter_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='twitter_ads_sources',\n single_source_name='twitter_ads',\n single_table_name='line_item_keywords_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["twitter_ads", "line_item_keywords_report"], ["twitter_ads", "line_item_keywords_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.twitter_ads.twitter_ads.line_item_keywords_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/tmp/stg_twitter_ads__line_item_keywords_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: twitter_ads_line_item_keywords_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: twitter_line_item_keywords_report_data\n\n\n select\n \"account_id\",\n \"date\",\n \"line_item_id\",\n \"placement\",\n \"segment\",\n \"_fivetran_synced\",\n \"app_clicks\",\n \"billed_charge_local_micro\",\n \"billed_engagements\",\n \"card_engagements\",\n \"carousel_swipes\",\n \"clicks\",\n \"conversion_custom_metric\",\n \"conversion_custom_order_quantity\",\n \"conversion_custom_order_quantity_engagement\",\n \"conversion_custom_order_quantity_view\",\n \"conversion_custom_post_engagement\",\n \"conversion_custom_post_view\",\n \"conversion_custom_sale_amount\",\n \"conversion_custom_sale_amount_engagement\",\n \"conversion_custom_sale_amount_view\",\n \"conversion_downloads_metric\",\n \"conversion_downloads_order_quantity\",\n \"conversion_downloads_order_quantity_engagement\",\n \"conversion_downloads_order_quantity_view\",\n \"conversion_downloads_post_engagement\",\n \"conversion_downloads_post_view\",\n \"conversion_downloads_sale_amount\",\n \"conversion_downloads_sale_amount_engagement\",\n \"conversion_downloads_sale_amount_view\",\n \"conversion_purchases_assisted\",\n \"conversion_purchases_metric\",\n \"conversion_purchases_order_quantity\",\n \"conversion_purchases_order_quantity_engagement\",\n \"conversion_purchases_order_quantity_view\",\n \"conversion_purchases_post_engagement\",\n \"conversion_purchases_post_view\",\n \"conversion_purchases_sale_amount\",\n \"conversion_purchases_sale_amount_engagement\",\n \"conversion_purchases_sale_amount_view\",\n \"conversion_sign_ups_assisted\",\n \"conversion_sign_ups_metric\",\n \"conversion_sign_ups_order_quantity\",\n \"conversion_sign_ups_order_quantity_engagement\",\n \"conversion_sign_ups_order_quantity_view\",\n \"conversion_sign_ups_post_engagement\",\n \"conversion_sign_ups_post_view\",\n \"conversion_sign_ups_sale_amount\",\n \"conversion_sign_ups_sale_amount_engagement\",\n \"conversion_sign_ups_sale_amount_view\",\n \"conversion_site_visits_metric\",\n \"conversion_site_visits_order_quantity\",\n \"conversion_site_visits_order_quantity_engagement\",\n \"conversion_site_visits_order_quantity_view\",\n \"conversion_site_visits_post_engagement\",\n \"conversion_site_visits_post_view\",\n \"conversion_site_visits_sale_amount\",\n \"conversion_site_visits_sale_amount_engagement\",\n \"conversion_site_visits_sale_amount_view\",\n \"engagements\",\n \"follows\",\n \"impressions\",\n \"likes\",\n \"media_engagements\",\n \"media_views\",\n \"mobile_conversion_achievements_unlocked_assisted\",\n \"mobile_conversion_achievements_unlocked_order_quantity\",\n \"mobile_conversion_achievements_unlocked_post_engagement\",\n \"mobile_conversion_achievements_unlocked_post_view\",\n \"mobile_conversion_achievements_unlocked_sale_amount\",\n \"mobile_conversion_add_to_carts_assisted\",\n \"mobile_conversion_add_to_carts_order_quantity\",\n \"mobile_conversion_add_to_carts_post_engagement\",\n \"mobile_conversion_add_to_carts_post_view\",\n \"mobile_conversion_add_to_carts_sale_amount\",\n \"mobile_conversion_add_to_wishlists_assisted\",\n \"mobile_conversion_add_to_wishlists_order_quantity\",\n \"mobile_conversion_add_to_wishlists_post_engagement\",\n \"mobile_conversion_add_to_wishlists_post_view\",\n \"mobile_conversion_add_to_wishlists_sale_amount\",\n \"mobile_conversion_checkouts_initiated_assisted\",\n \"mobile_conversion_checkouts_initiated_order_quantity\",\n \"mobile_conversion_checkouts_initiated_post_engagement\",\n \"mobile_conversion_checkouts_initiated_post_view\",\n \"mobile_conversion_checkouts_initiated_sale_amount\",\n \"mobile_conversion_content_views_assisted\",\n \"mobile_conversion_content_views_order_quantity\",\n \"mobile_conversion_content_views_post_engagement\",\n \"mobile_conversion_content_views_post_view\",\n \"mobile_conversion_content_views_sale_amount\",\n \"mobile_conversion_downloads_order_quantity\",\n \"mobile_conversion_downloads_post_engagement\",\n \"mobile_conversion_downloads_post_view\",\n \"mobile_conversion_downloads_sale_amount\",\n \"mobile_conversion_installs_assisted\",\n \"mobile_conversion_installs_order_quantity\",\n \"mobile_conversion_installs_post_engagement\",\n \"mobile_conversion_installs_post_view\",\n \"mobile_conversion_installs_sale_amount\",\n \"mobile_conversion_installs_skan_post_engagement\",\n \"mobile_conversion_installs_skan_post_view\",\n \"mobile_conversion_invites_assisted\",\n \"mobile_conversion_invites_order_quantity\",\n \"mobile_conversion_invites_post_engagement\",\n \"mobile_conversion_invites_post_view\",\n \"mobile_conversion_invites_sale_amount\",\n \"mobile_conversion_key_page_views_post_engagement\",\n \"mobile_conversion_key_page_views_post_view\",\n \"mobile_conversion_levels_achieved_assisted\",\n \"mobile_conversion_levels_achieved_order_quantity\",\n \"mobile_conversion_levels_achieved_post_engagement\",\n \"mobile_conversion_levels_achieved_post_view\",\n \"mobile_conversion_levels_achieved_sale_amount\",\n \"mobile_conversion_lifetime_value_achievements_unlocked_metric\",\n \"mobile_conversion_lifetime_value_achievements_unlocked_order_qu\",\n \"mobile_conversion_lifetime_value_achievements_unlocked_sale_amo\",\n \"mobile_conversion_lifetime_value_add_to_carts_metric\",\n \"mobile_conversion_lifetime_value_add_to_carts_order_quantity\",\n \"mobile_conversion_lifetime_value_add_to_carts_sale_amount\",\n \"mobile_conversion_lifetime_value_add_to_wishlists_metric\",\n \"mobile_conversion_lifetime_value_add_to_wishlists_order_quantit\",\n \"mobile_conversion_lifetime_value_add_to_wishlists_sale_amount\",\n \"mobile_conversion_lifetime_value_checkouts_initiated_metric\",\n \"mobile_conversion_lifetime_value_checkouts_initiated_order_quan\",\n \"mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun\",\n \"mobile_conversion_lifetime_value_content_views_metric\",\n \"mobile_conversion_lifetime_value_content_views_order_quantity\",\n \"mobile_conversion_lifetime_value_content_views_sale_amount\",\n \"mobile_conversion_lifetime_value_invites_metric\",\n \"mobile_conversion_lifetime_value_invites_order_quantity\",\n \"mobile_conversion_lifetime_value_invites_sale_amount\",\n \"mobile_conversion_lifetime_value_levels_achieved_metric\",\n \"mobile_conversion_lifetime_value_levels_achieved_order_quantity\",\n \"mobile_conversion_lifetime_value_levels_achieved_sale_amount\",\n \"mobile_conversion_lifetime_value_logins_metric\",\n \"mobile_conversion_lifetime_value_logins_order_quantity\",\n \"mobile_conversion_lifetime_value_logins_sale_amount\",\n \"mobile_conversion_lifetime_value_payment_info_additions_metric\",\n \"mobile_conversion_lifetime_value_payment_info_additions_order_q\",\n \"mobile_conversion_lifetime_value_payment_info_additions_sale_am\",\n \"mobile_conversion_lifetime_value_purchases_metric\",\n \"mobile_conversion_lifetime_value_purchases_order_quantity\",\n \"mobile_conversion_lifetime_value_purchases_sale_amount\",\n \"mobile_conversion_lifetime_value_rates_metric\",\n \"mobile_conversion_lifetime_value_rates_order_quantity\",\n \"mobile_conversion_lifetime_value_rates_sale_amount\",\n \"mobile_conversion_lifetime_value_reservations_metric\",\n \"mobile_conversion_lifetime_value_reservations_order_quantity\",\n \"mobile_conversion_lifetime_value_reservations_sale_amount\",\n \"mobile_conversion_lifetime_value_searches_metric\",\n \"mobile_conversion_lifetime_value_searches_order_quantity\",\n \"mobile_conversion_lifetime_value_searches_sale_amount\",\n \"mobile_conversion_lifetime_value_shares_metric\",\n \"mobile_conversion_lifetime_value_shares_order_quantity\",\n \"mobile_conversion_lifetime_value_shares_sale_amount\",\n \"mobile_conversion_lifetime_value_sign_ups_metric\",\n \"mobile_conversion_lifetime_value_sign_ups_order_quantity\",\n \"mobile_conversion_lifetime_value_sign_ups_sale_amount\",\n \"mobile_conversion_lifetime_value_spent_credits_metric\",\n \"mobile_conversion_lifetime_value_spent_credits_order_quantity\",\n \"mobile_conversion_lifetime_value_spent_credits_sale_amount\",\n \"mobile_conversion_lifetime_value_tutorials_completed_metric\",\n \"mobile_conversion_lifetime_value_tutorials_completed_order_quan\",\n \"mobile_conversion_lifetime_value_tutorials_completed_sale_amoun\",\n \"mobile_conversion_lifetime_value_updates_metric\",\n \"mobile_conversion_lifetime_value_updates_order_quantity\",\n \"mobile_conversion_lifetime_value_updates_sale_amount\",\n \"mobile_conversion_logins_assisted\",\n \"mobile_conversion_logins_order_quantity\",\n \"mobile_conversion_logins_post_engagement\",\n \"mobile_conversion_logins_post_view\",\n \"mobile_conversion_logins_sale_amount\",\n \"mobile_conversion_payment_info_additions_assisted\",\n \"mobile_conversion_payment_info_additions_order_quantity\",\n \"mobile_conversion_payment_info_additions_post_engagement\",\n \"mobile_conversion_payment_info_additions_post_view\",\n \"mobile_conversion_payment_info_additions_sale_amount\",\n \"mobile_conversion_purchases_assisted\",\n \"mobile_conversion_purchases_order_quantity\",\n \"mobile_conversion_purchases_post_engagement\",\n \"mobile_conversion_purchases_post_view\",\n \"mobile_conversion_purchases_sale_amount\",\n \"mobile_conversion_purchases_skan_post_engagement\",\n \"mobile_conversion_purchases_skan_post_view\",\n \"mobile_conversion_rates_assisted\",\n \"mobile_conversion_rates_order_quantity\",\n \"mobile_conversion_rates_post_engagement\",\n \"mobile_conversion_rates_post_view\",\n \"mobile_conversion_rates_sale_amount\",\n \"mobile_conversion_re_engages_assisted\",\n \"mobile_conversion_re_engages_order_quantity\",\n \"mobile_conversion_re_engages_post_engagement\",\n \"mobile_conversion_re_engages_post_view\",\n \"mobile_conversion_re_engages_sale_amount\",\n \"mobile_conversion_reservations_assisted\",\n \"mobile_conversion_reservations_order_quantity\",\n \"mobile_conversion_reservations_post_engagement\",\n \"mobile_conversion_reservations_post_view\",\n \"mobile_conversion_reservations_sale_amount\",\n \"mobile_conversion_searches_assisted\",\n \"mobile_conversion_searches_order_quantity\",\n \"mobile_conversion_searches_post_engagement\",\n \"mobile_conversion_searches_post_view\",\n \"mobile_conversion_searches_sale_amount\",\n \"mobile_conversion_shares_assisted\",\n \"mobile_conversion_shares_order_quantity\",\n \"mobile_conversion_shares_post_engagement\",\n \"mobile_conversion_shares_post_view\",\n \"mobile_conversion_shares_sale_amount\",\n \"mobile_conversion_sign_ups_assisted\",\n \"mobile_conversion_sign_ups_order_quantity\",\n \"mobile_conversion_sign_ups_post_engagement\",\n \"mobile_conversion_sign_ups_post_view\",\n \"mobile_conversion_sign_ups_sale_amount\",\n \"mobile_conversion_site_visits_order_quantity\",\n \"mobile_conversion_site_visits_post_engagement\",\n \"mobile_conversion_site_visits_post_view\",\n \"mobile_conversion_site_visits_sale_amount\",\n \"mobile_conversion_spent_credits_assisted\",\n \"mobile_conversion_spent_credits_order_quantity\",\n \"mobile_conversion_spent_credits_post_engagement\",\n \"mobile_conversion_spent_credits_post_view\",\n \"mobile_conversion_spent_credits_sale_amount\",\n \"mobile_conversion_tutorials_completed_assisted\",\n \"mobile_conversion_tutorials_completed_order_quantity\",\n \"mobile_conversion_tutorials_completed_post_engagement\",\n \"mobile_conversion_tutorials_completed_post_view\",\n \"mobile_conversion_tutorials_completed_sale_amount\",\n \"mobile_conversion_updates_assisted\",\n \"mobile_conversion_updates_order_quantity\",\n \"mobile_conversion_updates_post_engagement\",\n \"mobile_conversion_updates_post_view\",\n \"mobile_conversion_updates_sale_amount\",\n \"poll_card_vote\",\n \"qualified_impressions\",\n \"replies\",\n \"retweets\",\n \"tweets_send\",\n \"unfollows\",\n \"url_clicks\",\n \"video_15_s_views\",\n \"video_3_s_100_pct_views\",\n \"video_6_s_views\",\n \"video_content_starts\",\n \"video_cta_clicks\",\n \"video_total_views\",\n \"video_views_100\",\n \"video_views_25\",\n \"video_views_50\",\n \"video_views_75\"\n from \"postgres\".\"public\".\"twitter_line_item_keywords_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__tweet_url_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__tweet_url_tmp", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/tmp/stg_twitter_ads__tweet_url_tmp.sql", "original_file_path": "models/staging/tmp/stg_twitter_ads__tweet_url_tmp.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__tweet_url_tmp", "fqn": ["twitter_ads", "staging", "tmp", "stg_twitter_ads__tweet_url_tmp"], "alias": "stg_twitter_ads__tweet_url_tmp", "checksum": {"name": "sha256", "checksum": "a48de17d2405d27d360ed8e3d34984fa75638653c23cbd2e5caaf2c13651460f"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450500.5072496, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__tweet_url_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\n{% if var('twitter_ads_union_schemas', []) | length > 0 or var('twitter_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='tweet_url',\n database_variable='twitter_ads_database',\n schema_variable='twitter_ads_schema',\n default_database=target.database,\n default_schema='twitter_ads',\n default_variable='tweet_url',\n union_schema_variable='twitter_ads_union_schemas',\n union_database_variable='twitter_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='twitter_ads_sources',\n single_source_name='twitter_ads',\n single_table_name='tweet_url'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["twitter_ads", "tweet_url"], ["twitter_ads", "tweet_url"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.twitter_ads.twitter_ads.tweet_url"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/tmp/stg_twitter_ads__tweet_url_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: twitter_ads_tweet_url_identifier\n -- database: postgres \n -- schema: public\n -- identifier: twitter_tweet_url_data\n\n\n select\n \"_fivetran_synced\",\n \"display_url\",\n \"expanded_url\",\n \"index\",\n \"indices\",\n \"tweet_id\",\n \"url\"\n from \"postgres\".\"public\".\"twitter_tweet_url_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__tweet_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__tweet_tmp", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/tmp/stg_twitter_ads__tweet_tmp.sql", "original_file_path": "models/staging/tmp/stg_twitter_ads__tweet_tmp.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__tweet_tmp", "fqn": ["twitter_ads", "staging", "tmp", "stg_twitter_ads__tweet_tmp"], "alias": "stg_twitter_ads__tweet_tmp", "checksum": {"name": "sha256", "checksum": "02451ebf2b9df4e25513839dacdab686cc64ca5d7373ee1532df6ad49ba2a1f7"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450500.5179496, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__tweet_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\n{% if var('twitter_ads_union_schemas', []) | length > 0 or var('twitter_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='tweet',\n database_variable='twitter_ads_database',\n schema_variable='twitter_ads_schema',\n default_database=target.database,\n default_schema='twitter_ads',\n default_variable='tweet',\n union_schema_variable='twitter_ads_union_schemas',\n union_database_variable='twitter_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='twitter_ads_sources',\n single_source_name='twitter_ads',\n single_table_name='tweet'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["twitter_ads", "tweet"], ["twitter_ads", "tweet"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.twitter_ads.twitter_ads.tweet"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/tmp/stg_twitter_ads__tweet_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: twitter_ads_tweet_identifier\n -- database: postgres \n -- schema: public\n -- identifier: twitter_tweet_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"account_id\",\n \"card_uri\",\n \"coordinates_coordinates\",\n \"coordinates_type\",\n \"created_at\",\n \"favorite_count\",\n \"favorited\",\n \"followers\",\n \"full_text\",\n \"geo_coordinates\",\n \"geo_type\",\n \"in_reply_to_screen_name\",\n \"in_reply_to_status_id\",\n \"in_reply_to_user_id\",\n \"lang\",\n \"media_key\",\n \"retweet_count\",\n \"retweeted\",\n \"source\",\n \"truncated\",\n \"tweet_type\",\n \"user_id\",\n \"name\"\n from \"postgres\".\"public\".\"twitter_tweet_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.ad_reporting__keyword_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "ad_reporting__keyword_report", "resource_type": "model", "package_name": "ad_reporting", "path": "ad_reporting__keyword_report.sql", "original_file_path": "models/ad_reporting__keyword_report.sql", "unique_id": "model.ad_reporting.ad_reporting__keyword_report", "fqn": ["ad_reporting", "ad_reporting__keyword_report"], "alias": "ad_reporting__keyword_report", "checksum": {"name": "sha256", "checksum": "ed5e69f41036f0af7af5037ebe26b0456a3dca8ff9b775c919d18f1c35156bb2"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents daily metrics by keyword, ad group, campaign and account.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.date_day"]}, "platform": {"name": "platform", "description": "The ad platform associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.platform"]}, "account_id": {"name": "account_id", "description": "The ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_id"]}, "account_name": {"name": "account_name", "description": "The name of the account, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID representing the campaign, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.campaign_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID representing the ad group, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the ad group, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.ad_group_name"]}, "keyword_id": {"name": "keyword_id", "description": "The ID representing the keyword, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.keyword_id"]}, "keyword_text": {"name": "keyword_text", "description": "The keyword text.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.keyword_text"]}, "keyword_match_type": {"name": "keyword_match_type", "description": "The keyword match type associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.keyword_match_type"]}, "clicks": {"name": "clicks", "description": "The count of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.clicks"]}, "impressions": {"name": "impressions", "description": "The count of impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.impressions"]}, "spend": {"name": "spend", "description": "The cost of the ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.spend"]}, "conversions": {"name": "conversions", "description": "The count of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The monetary value of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "ad_reporting://models/ad_reporting_models.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.3601274, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__keyword_report\"", "raw_code": "{% set include_list = ['amazon_ads', 'apple_search_ads', 'google_ads', 'microsoft_ads'] %}\n{% do include_list.append('pinterest_ads') if var('pinterest__using_keywords', true) %}\n{% do include_list.append('twitter_ads') if var('twitter_ads__using_keywords', true) %}\n\n{% set enabled_packages = get_enabled_packages(include=include_list)%}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith base as (\n\n select *\n from {{ ref('int_ad_reporting__keyword_report') }}\n),\n\naggregated as (\n \n select\n source_relation,\n date_day,\n platform,\n account_id,\n account_name,\n campaign_id,\n campaign_name,\n ad_group_id,\n ad_group_name,\n keyword_id,\n keyword_text,\n keyword_match_type,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value\n\n {{ ad_reporting_persist_pass_through_columns(pass_through_variable='ad_reporting__keyword_passthrough_metrics', transform = 'sum', alias_fields=['conversions', 'conversions_value']) }}\n\n from base\n {{ dbt_utils.group_by(12) }}\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_ad_reporting__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.ad_reporting_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.ad_reporting.int_ad_reporting__keyword_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting__keyword_report.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\nwith __dbt__cte__int_ad_reporting__keyword_report as (\n\n\n\n\n\n\n\nwith\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__keyword_report\"\n\n),\n\n\n\ngoogle_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(criterion_id as TEXT) as keyword_id\n\n \n ,cast(keyword_match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__keyword_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_name as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__keyword_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_value as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__keyword_report\"\n\n),\n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(line_item_id as TEXT) as ad_group_id\n\n \n ,cast(line_item_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(null as TEXT) as keyword_match_type\n\n \n ,cast(keyword as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__keyword_report\"\n\n), \n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__keyword_report\"\n\n), \n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from twitter_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n), base as (\n\n select *\n from __dbt__cte__int_ad_reporting__keyword_report\n),\n\naggregated as (\n \n select\n source_relation,\n date_day,\n platform,\n account_id,\n account_name,\n campaign_id,\n campaign_name,\n ad_group_id,\n ad_group_name,\n keyword_id,\n keyword_text,\n keyword_match_type,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value\n\n \n\n\n\n\n\n from base\n group by 1,2,3,4,5,6,7,8,9,10,11,12\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.ad_reporting.int_ad_reporting__keyword_report", "sql": " __dbt__cte__int_ad_reporting__keyword_report as (\n\n\n\n\n\n\n\nwith\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__keyword_report\"\n\n),\n\n\n\ngoogle_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(criterion_id as TEXT) as keyword_id\n\n \n ,cast(keyword_match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__keyword_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_name as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__keyword_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_value as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__keyword_report\"\n\n),\n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(line_item_id as TEXT) as ad_group_id\n\n \n ,cast(line_item_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(null as TEXT) as keyword_match_type\n\n \n ,cast(keyword as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__keyword_report\"\n\n), \n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__keyword_report\"\n\n), \n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from twitter_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.ad_reporting__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "ad_reporting__campaign_report", "resource_type": "model", "package_name": "ad_reporting", "path": "ad_reporting__campaign_report.sql", "original_file_path": "models/ad_reporting__campaign_report.sql", "unique_id": "model.ad_reporting.ad_reporting__campaign_report", "fqn": ["ad_reporting", "ad_reporting__campaign_report"], "alias": "ad_reporting__campaign_report", "checksum": {"name": "sha256", "checksum": "47f504069deefb56c5c643f6189cde8184fdc3c802242edfeb182e4010ad4323"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents daily metrics by campaign and account.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.date_day"]}, "platform": {"name": "platform", "description": "The ad platform associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.platform"]}, "account_id": {"name": "account_id", "description": "The ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_id"]}, "account_name": {"name": "account_name", "description": "The name of the account, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID representing the campaign, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.campaign_name"]}, "clicks": {"name": "clicks", "description": "The count of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.clicks"]}, "impressions": {"name": "impressions", "description": "The count of impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.impressions"]}, "spend": {"name": "spend", "description": "The cost of the ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.spend"]}, "conversions": {"name": "conversions", "description": "The count of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The monetary value of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "ad_reporting://models/ad_reporting_models.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.3588183, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__campaign_report\"", "raw_code": "{% set enabled_packages = get_enabled_packages() %}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith base as (\n\n select *\n from {{ ref('int_ad_reporting__campaign_report') }}\n),\n\naggregated as (\n \n select\n source_relation,\n date_day,\n platform,\n account_id,\n account_name,\n campaign_id,\n campaign_name,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value\n\n {{ ad_reporting_persist_pass_through_columns(pass_through_variable='ad_reporting__campaign_passthrough_metrics', transform = 'sum', alias_fields=['conversions', 'conversions_value']) }}\n\n from base\n {{ dbt_utils.group_by(7) }}\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_ad_reporting__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.ad_reporting_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.ad_reporting.int_ad_reporting__campaign_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting__campaign_report.sql", "compiled": true, "compiled_code": "\n\n\nwith __dbt__cte__int_ad_reporting__campaign_report as (\n\n\n\nwith\n\n\nfacebook_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__campaign_report\"\n\n),\n\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__campaign_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_report\"\n\n),\n\n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__campaign_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__campaign_group_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__campaign_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_report\"\n\n),\n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__campaign_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__campaign_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n), base as (\n\n select *\n from __dbt__cte__int_ad_reporting__campaign_report\n),\n\naggregated as (\n \n select\n source_relation,\n date_day,\n platform,\n account_id,\n account_name,\n campaign_id,\n campaign_name,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value\n\n \n\n\n\n\n\n from base\n group by 1,2,3,4,5,6,7\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.ad_reporting.int_ad_reporting__campaign_report", "sql": " __dbt__cte__int_ad_reporting__campaign_report as (\n\n\n\nwith\n\n\nfacebook_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__campaign_report\"\n\n),\n\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__campaign_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_report\"\n\n),\n\n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__campaign_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__campaign_group_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__campaign_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_report\"\n\n),\n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__campaign_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__campaign_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.ad_reporting__monthly_campaign_country_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "ad_reporting__monthly_campaign_country_report", "resource_type": "model", "package_name": "ad_reporting", "path": "ad_reporting__monthly_campaign_country_report.sql", "original_file_path": "models/ad_reporting__monthly_campaign_country_report.sql", "unique_id": "model.ad_reporting.ad_reporting__monthly_campaign_country_report", "fqn": ["ad_reporting", "ad_reporting__monthly_campaign_country_report"], "alias": "ad_reporting__monthly_campaign_country_report", "checksum": {"name": "sha256", "checksum": "65092884ae2e8e9de1d891358ddbb6cc362d4c56fd32fb63ab3d44328c144590"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents monthly metrics by campaign and country. Country names are standardized to ISO-3166 names.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.source_relation"]}, "date_month": {"name": "date_month", "description": "Month of the record, truncated to the first day of the month.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "platform": {"name": "platform", "description": "The ad platform associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.platform"]}, "account_id": {"name": "account_id", "description": "The ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_id"]}, "account_name": {"name": "account_name", "description": "The name of the account, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID representing the campaign, if present in the source data. Facebook Ads presents country data only at the account level and will have a null value for this field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign, if present in the source data. Facebook Ads presents country data only at the account level and will have a value of `Account-level` for this field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.clicks"]}, "impressions": {"name": "impressions", "description": "The count of impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.impressions"]}, "spend": {"name": "spend", "description": "The cost of the ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.spend"]}, "conversions": {"name": "conversions", "description": "The count of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The monetary value of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions_value"]}, "country": {"name": "country", "description": "Standardized ISO-3166 name of the country where the campaign was served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country_code": {"name": "country_code", "description": "ISO-3166 two-letter code of the country where the campaign was served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "global_region": {"name": "global_region", "description": "Greater global region in which the country is located.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "ad_reporting://models/ad_reporting_models.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.3652208, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__monthly_campaign_country_report\"", "raw_code": "{% set include_list = [] %}\n{% do include_list.append('facebook_ads') if var('facebook_ads__using_demographics_country', false) %}\n{% do include_list.append('linkedin_ads') if var('linkedin_ads__using_geo', true) and var('linkedin_ads__using_monthly_ad_analytics_by_member_country', true) %}\n{% do include_list.append('microsoft_ads') if var('microsoft_ads__using_geographic_daily_report', false) %}\n{% do include_list.append('pinterest_ads') if var('pinterest__using_pin_promotion_targeting_report', true) and var('pinterest__using_targeting_geo', true) %}\n{% do include_list.append('reddit_ads') if var('reddit_ads__using_campaign_country_report', true) %}\n{% do include_list.append('snapchat_ads') if var('snapchat_ads__using_campaign_country_report', false) %}\n{% do include_list.append('tiktok_ads') if var('tiktok_ads__using_campaign_country_report', true) %}\n{% do include_list.append('twitter_ads') if var('twitter_ads__using_campaign_locations_report', false) %}\n\n{% set enabled_packages = get_enabled_packages(include=include_list)%}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith base as (\n\n select *\n from {{ ref('int_ad_reporting__monthly_campaign_country_report') }}\n),\n\ncountry_mapping as (\n\n select *\n from {{ ref('int_ad_reporting__country_mapping') }}\n),\n\n{# Before grabbing the country codes or names for platforms that only provide the codes, let's standardize the existing country names #}\nstandardize_country_names as (\n\n select \n base.*,\n coalesce(country_mapping.country_name, base.country) as standardized_alt_country_name\n\n from base \n left join country_mapping\n on base.country = country_mapping.alternative_country_name\n),\n\n{# Now grab the country names for platforms that only provide codes and vice versa #}\nmap_countries_and_codes as (\n\n select \n standardize_country_names.*,\n coalesce(standardize_country_names.standardized_alt_country_name, country_mapping.country_name) as standardized_country,\n coalesce(standardize_country_names.country_code, country_mapping.country_code) as standardized_country_code,\n country_mapping.global_region\n\n from standardize_country_names \n left join country_mapping\n on standardize_country_names.standardized_alt_country_name = country_mapping.country_name\n or standardize_country_names.country_code = country_mapping.country_code\n),\n\naggregated as (\n \n select\n source_relation,\n cast({{ dbt.date_trunc(\"month\", \"date_day\") }} as date) as date_month,\n platform,\n account_id,\n account_name,\n campaign_id,\n campaign_name,\n standardized_country as country,\n standardized_country_code as country_code,\n global_region,\n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n\n {{ ad_reporting_persist_pass_through_columns(pass_through_variable='ad_reporting__country_passthrough_metrics', transform = 'sum', alias_fields=['conversions', 'conversions_value']) }}\n\n from map_countries_and_codes\n {{ dbt_utils.group_by(10) }}\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_ad_reporting__monthly_campaign_country_report", "package": null, "version": null}, {"name": "int_ad_reporting__country_mapping", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.dbt.date_trunc", "macro.ad_reporting.ad_reporting_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.ad_reporting.int_ad_reporting__monthly_campaign_country_report", "model.ad_reporting.int_ad_reporting__country_mapping"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting__monthly_campaign_country_report.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n\n\n\n\n\n\nwith __dbt__cte__int_ad_reporting__monthly_campaign_country_report as (\n\n\n\n\n\n\n\n\n\n\n\n\n\nwith \n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(null as TEXT) as campaign_id\n\n \n ,cast('Account-level' as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(null as TEXT) as country\n\n \n ,cast(replace(country, 'unknown', 'Unknown') as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__country_report\"\n\n),\n\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_month)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(replace(country_name, 'Hong Kong SAR', 'Hong Kong SAR China') as TEXT) as country\n\n \n ,cast(null as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__monthly_campaign_country_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(country as TEXT) as country\n\n \n ,cast(null as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_country_report\"\n\n),\n\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(replace(country_name, 'U.S.', 'United States') as TEXT) as country\n\n \n ,cast(country_id as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_country_report\"\n\n),\n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(null as TEXT) as country\n\n \n ,cast(country as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__campaign_country_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(null as TEXT) as country\n\n \n ,cast(country as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_country_report\"\n\n),\n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(country_name as TEXT) as country\n\n \n ,cast(country_code as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__campaign_country_report\"\n\n),\n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(country as TEXT) as country\n\n \n ,cast(null as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_country_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from facebook_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n), __dbt__cte__int_ad_reporting__country_mapping as (\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nwith create_country_mapping as (\n select\n 'Afghanistan' as country_name,\n '' as alternative_country_name,\n 'AF' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n '\u00c5land Islands' as country_name,\n '' as alternative_country_name,\n 'AX' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Albania' as country_name,\n '' as alternative_country_name,\n 'AL' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Algeria' as country_name,\n '' as alternative_country_name,\n 'DZ' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'American Samoa' as country_name,\n '' as alternative_country_name,\n 'AS' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Andorra' as country_name,\n '' as alternative_country_name,\n 'AD' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Angola' as country_name,\n '' as alternative_country_name,\n 'AO' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Anguilla' as country_name,\n '' as alternative_country_name,\n 'AI' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Antarctica' as country_name,\n '' as alternative_country_name,\n 'AQ' as country_code,\n '' as global_region\n\n union all \n \n select\n 'Antigua and Barbuda' as country_name,\n '' as alternative_country_name,\n 'AG' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Argentina' as country_name,\n '' as alternative_country_name,\n 'AR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Armenia' as country_name,\n '' as alternative_country_name,\n 'AM' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Aruba' as country_name,\n '' as alternative_country_name,\n 'AW' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Australia' as country_name,\n '' as alternative_country_name,\n 'AU' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Austria' as country_name,\n '' as alternative_country_name,\n 'AT' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Azerbaijan' as country_name,\n '' as alternative_country_name,\n 'AZ' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Bahamas' as country_name,\n '' as alternative_country_name,\n 'BS' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Bahrain' as country_name,\n '' as alternative_country_name,\n 'BH' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Bangladesh' as country_name,\n '' as alternative_country_name,\n 'BD' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Barbados' as country_name,\n '' as alternative_country_name,\n 'BB' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Belarus' as country_name,\n '' as alternative_country_name,\n 'BY' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Belgium' as country_name,\n '' as alternative_country_name,\n 'BE' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Belize' as country_name,\n '' as alternative_country_name,\n 'BZ' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Benin' as country_name,\n '' as alternative_country_name,\n 'BJ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Bermuda' as country_name,\n '' as alternative_country_name,\n 'BM' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'Bhutan' as country_name,\n '' as alternative_country_name,\n 'BT' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Bolivia (Plurinational State of)' as country_name,\n 'Bolivia' as alternative_country_name,\n 'BO' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Bonaire, Sint Eustatius and Saba' as country_name,\n '' as alternative_country_name,\n 'BQ' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Bosnia and Herzegovina' as country_name,\n '' as alternative_country_name,\n 'BA' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Botswana' as country_name,\n '' as alternative_country_name,\n 'BW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Bouvet Island' as country_name,\n '' as alternative_country_name,\n 'BV' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Brazil' as country_name,\n '' as alternative_country_name,\n 'BR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'British Indian Ocean Territory' as country_name,\n '' as alternative_country_name,\n 'IO' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Brunei Darussalam' as country_name,\n 'Brunei' as alternative_country_name,\n 'BN' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Bulgaria' as country_name,\n '' as alternative_country_name,\n 'BG' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Burkina Faso' as country_name,\n '' as alternative_country_name,\n 'BF' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Burundi' as country_name,\n '' as alternative_country_name,\n 'BI' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Cabo Verde' as country_name,\n 'Cape Verde' as alternative_country_name,\n 'CV' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Cambodia' as country_name,\n '' as alternative_country_name,\n 'KH' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Cameroon' as country_name,\n '' as alternative_country_name,\n 'CM' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Canada' as country_name,\n '' as alternative_country_name,\n 'CA' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'Cayman Islands' as country_name,\n '' as alternative_country_name,\n 'KY' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Central African Republic' as country_name,\n '' as alternative_country_name,\n 'CF' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Chad' as country_name,\n '' as alternative_country_name,\n 'TD' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Chile' as country_name,\n '' as alternative_country_name,\n 'CL' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'China' as country_name,\n '' as alternative_country_name,\n 'CN' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Christmas Island' as country_name,\n '' as alternative_country_name,\n 'CX' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Cocos (Keeling) Islands' as country_name,\n '' as alternative_country_name,\n 'CC' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Colombia' as country_name,\n '' as alternative_country_name,\n 'CO' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Comoros' as country_name,\n '' as alternative_country_name,\n 'KM' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Congo' as country_name,\n 'Republic of the Congo' as alternative_country_name,\n 'CG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Congo, Democratic Republic of the' as country_name,\n 'Democratic Republic of the Congo' as alternative_country_name,\n 'CD' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Cook Islands' as country_name,\n '' as alternative_country_name,\n 'CK' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Costa Rica' as country_name,\n '' as alternative_country_name,\n 'CR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'C\u00f4te d''Ivoire' as country_name,\n 'Cote d''Ivoire' as alternative_country_name,\n 'CI' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Croatia' as country_name,\n '' as alternative_country_name,\n 'HR' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Cuba' as country_name,\n '' as alternative_country_name,\n 'CU' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Cura\u00e7ao' as country_name,\n '' as alternative_country_name,\n 'CW' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Cyprus' as country_name,\n '' as alternative_country_name,\n 'CY' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Czechia' as country_name,\n 'Czech Republic' as alternative_country_name,\n 'CZ' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Denmark' as country_name,\n '' as alternative_country_name,\n 'DK' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Djibouti' as country_name,\n '' as alternative_country_name,\n 'DJ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Dominica' as country_name,\n '' as alternative_country_name,\n 'DM' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Dominican Republic' as country_name,\n '' as alternative_country_name,\n 'DO' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Ecuador' as country_name,\n '' as alternative_country_name,\n 'EC' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Egypt' as country_name,\n '' as alternative_country_name,\n 'EG' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'El Salvador' as country_name,\n '' as alternative_country_name,\n 'SV' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Equatorial Guinea' as country_name,\n '' as alternative_country_name,\n 'GQ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Eritrea' as country_name,\n '' as alternative_country_name,\n 'ER' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Estonia' as country_name,\n '' as alternative_country_name,\n 'EE' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Eswatini' as country_name,\n '' as alternative_country_name,\n 'SZ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Ethiopia' as country_name,\n '' as alternative_country_name,\n 'ET' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Falkland Islands (Malvinas)' as country_name,\n '' as alternative_country_name,\n 'FK' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Faroe Islands' as country_name,\n '' as alternative_country_name,\n 'FO' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Fiji' as country_name,\n '' as alternative_country_name,\n 'FJ' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'Finland' as country_name,\n '' as alternative_country_name,\n 'FI' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'France' as country_name,\n '' as alternative_country_name,\n 'FR' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'French Guiana' as country_name,\n '' as alternative_country_name,\n 'GF' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'French Polynesia' as country_name,\n '' as alternative_country_name,\n 'PF' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'French Southern Territories' as country_name,\n '' as alternative_country_name,\n 'TF' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Gabon' as country_name,\n '' as alternative_country_name,\n 'GA' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Gambia' as country_name,\n '' as alternative_country_name,\n 'GM' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Georgia' as country_name,\n '' as alternative_country_name,\n 'GE' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Germany' as country_name,\n '' as alternative_country_name,\n 'DE' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Ghana' as country_name,\n '' as alternative_country_name,\n 'GH' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Gibraltar' as country_name,\n '' as alternative_country_name,\n 'GI' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Greece' as country_name,\n '' as alternative_country_name,\n 'GR' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Greenland' as country_name,\n '' as alternative_country_name,\n 'GL' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'Grenada' as country_name,\n '' as alternative_country_name,\n 'GD' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Guadeloupe' as country_name,\n '' as alternative_country_name,\n 'GP' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Guam' as country_name,\n '' as alternative_country_name,\n 'GU' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Guatemala' as country_name,\n '' as alternative_country_name,\n 'GT' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Guernsey' as country_name,\n '' as alternative_country_name,\n 'GG' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Guinea' as country_name,\n '' as alternative_country_name,\n 'GN' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Guinea-Bissau' as country_name,\n '' as alternative_country_name,\n 'GW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Guyana' as country_name,\n '' as alternative_country_name,\n 'GY' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Haiti' as country_name,\n '' as alternative_country_name,\n 'HT' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Heard Island and McDonald Islands' as country_name,\n '' as alternative_country_name,\n 'HM' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Holy See' as country_name,\n '' as alternative_country_name,\n 'VA' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Honduras' as country_name,\n '' as alternative_country_name,\n 'HN' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Hong Kong' as country_name,\n 'Hong Kong SAR China' as alternative_country_name,\n 'HK' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Hungary' as country_name,\n '' as alternative_country_name,\n 'HU' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Iceland' as country_name,\n '' as alternative_country_name,\n 'IS' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'India' as country_name,\n '' as alternative_country_name,\n 'IN' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Indonesia' as country_name,\n '' as alternative_country_name,\n 'ID' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Iran (Islamic Republic of)' as country_name,\n 'Iran' as alternative_country_name,\n 'IR' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Iraq' as country_name,\n '' as alternative_country_name,\n 'IQ' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Ireland' as country_name,\n '' as alternative_country_name,\n 'IE' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Isle of Man' as country_name,\n '' as alternative_country_name,\n 'IM' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Israel' as country_name,\n '' as alternative_country_name,\n 'IL' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Italy' as country_name,\n '' as alternative_country_name,\n 'IT' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Jamaica' as country_name,\n '' as alternative_country_name,\n 'JM' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Japan' as country_name,\n '' as alternative_country_name,\n 'JP' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Jersey' as country_name,\n '' as alternative_country_name,\n 'JE' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Jordan' as country_name,\n '' as alternative_country_name,\n 'JO' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Kazakhstan' as country_name,\n '' as alternative_country_name,\n 'KZ' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Kenya' as country_name,\n '' as alternative_country_name,\n 'KE' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Kiribati' as country_name,\n '' as alternative_country_name,\n 'KI' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Korea (Democratic People''s Republic of)' as country_name,\n '' as alternative_country_name,\n 'KP' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Korea, Republic of' as country_name,\n 'South Korea' as alternative_country_name,\n 'KR' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Kuwait' as country_name,\n '' as alternative_country_name,\n 'KW' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Kyrgyzstan' as country_name,\n '' as alternative_country_name,\n 'KG' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Lao People''s Democratic Republic' as country_name,\n 'Laos' as alternative_country_name,\n 'LA' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Latvia' as country_name,\n '' as alternative_country_name,\n 'LV' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Lebanon' as country_name,\n '' as alternative_country_name,\n 'LB' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Lesotho' as country_name,\n '' as alternative_country_name,\n 'LS' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Liberia' as country_name,\n '' as alternative_country_name,\n 'LR' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Libya' as country_name,\n '' as alternative_country_name,\n 'LY' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'Liechtenstein' as country_name,\n '' as alternative_country_name,\n 'LI' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Lithuania' as country_name,\n '' as alternative_country_name,\n 'LT' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Luxembourg' as country_name,\n '' as alternative_country_name,\n 'LU' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Macao' as country_name,\n 'Macau' as alternative_country_name,\n 'MO' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Madagascar' as country_name,\n '' as alternative_country_name,\n 'MG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Malawi' as country_name,\n '' as alternative_country_name,\n 'MW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Malaysia' as country_name,\n '' as alternative_country_name,\n 'MY' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Maldives' as country_name,\n '' as alternative_country_name,\n 'MV' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Mali' as country_name,\n '' as alternative_country_name,\n 'ML' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Malta' as country_name,\n '' as alternative_country_name,\n 'MT' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Marshall Islands' as country_name,\n '' as alternative_country_name,\n 'MH' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Martinique' as country_name,\n '' as alternative_country_name,\n 'MQ' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Mauritania' as country_name,\n '' as alternative_country_name,\n 'MR' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Mauritius' as country_name,\n '' as alternative_country_name,\n 'MU' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Mayotte' as country_name,\n '' as alternative_country_name,\n 'YT' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Mexico' as country_name,\n '' as alternative_country_name,\n 'MX' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Micronesia (Federated States of)' as country_name,\n 'Micronesia' as alternative_country_name,\n 'FM' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Moldova, Republic of' as country_name,\n 'Moldova' as alternative_country_name,\n 'MD' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Monaco' as country_name,\n '' as alternative_country_name,\n 'MC' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Mongolia' as country_name,\n '' as alternative_country_name,\n 'MN' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Montenegro' as country_name,\n '' as alternative_country_name,\n 'ME' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Montserrat' as country_name,\n '' as alternative_country_name,\n 'MS' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Morocco' as country_name,\n '' as alternative_country_name,\n 'MA' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'Mozambique' as country_name,\n '' as alternative_country_name,\n 'MZ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Myanmar' as country_name,\n '' as alternative_country_name,\n 'MM' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Namibia' as country_name,\n '' as alternative_country_name,\n '' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Nauru' as country_name,\n '' as alternative_country_name,\n 'NR' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Nepal' as country_name,\n '' as alternative_country_name,\n 'NP' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Netherlands (Kingdom of the)' as country_name,\n 'Netherlands' as alternative_country_name,\n 'NL' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'New Caledonia' as country_name,\n '' as alternative_country_name,\n 'NC' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'New Zealand' as country_name,\n '' as alternative_country_name,\n 'NZ' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Nicaragua' as country_name,\n '' as alternative_country_name,\n 'NI' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Niger' as country_name,\n '' as alternative_country_name,\n 'NE' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Nigeria' as country_name,\n '' as alternative_country_name,\n 'NG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Niue' as country_name,\n '' as alternative_country_name,\n 'NU' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Norfolk Island' as country_name,\n '' as alternative_country_name,\n 'NF' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'North Macedonia' as country_name,\n '' as alternative_country_name,\n 'MK' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Northern Mariana Islands' as country_name,\n '' as alternative_country_name,\n 'MP' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Norway' as country_name,\n '' as alternative_country_name,\n 'NO' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Oman' as country_name,\n '' as alternative_country_name,\n 'OM' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Pakistan' as country_name,\n '' as alternative_country_name,\n 'PK' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Palau' as country_name,\n '' as alternative_country_name,\n 'PW' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Palestine, State of' as country_name,\n '' as alternative_country_name,\n 'PS' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Panama' as country_name,\n '' as alternative_country_name,\n 'PA' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Papua New Guinea' as country_name,\n '' as alternative_country_name,\n 'PG' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'Paraguay' as country_name,\n '' as alternative_country_name,\n 'PY' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Peru' as country_name,\n '' as alternative_country_name,\n 'PE' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Philippines' as country_name,\n '' as alternative_country_name,\n 'PH' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Pitcairn' as country_name,\n '' as alternative_country_name,\n 'PN' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Poland' as country_name,\n '' as alternative_country_name,\n 'PL' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Portugal' as country_name,\n '' as alternative_country_name,\n 'PT' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Puerto Rico' as country_name,\n '' as alternative_country_name,\n 'PR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Qatar' as country_name,\n '' as alternative_country_name,\n 'QA' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'R\u00e9union' as country_name,\n 'Reunion' as alternative_country_name,\n 'RE' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Romania' as country_name,\n '' as alternative_country_name,\n 'RO' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Russian Federation' as country_name,\n 'Russia' as alternative_country_name,\n 'RU' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Rwanda' as country_name,\n '' as alternative_country_name,\n 'RW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Saint Barth\u00e9lemy' as country_name,\n 'St. Barth\u00e9lemy' as alternative_country_name,\n 'BL' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Saint Helena, Ascension and Tristan da Cunha' as country_name,\n 'St. Helena, Ascension and Tristan da Cunha' as alternative_country_name,\n 'SH' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Saint Kitts and Nevis' as country_name,\n 'St. Kitts and Nevis' as alternative_country_name,\n 'KN' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Saint Lucia' as country_name,\n 'St. Lucia' as alternative_country_name,\n 'LC' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Saint Martin (French part)' as country_name,\n 'St. Martin (French part)' as alternative_country_name,\n 'MF' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Saint Pierre and Miquelon' as country_name,\n 'St. Pierre and Miquelon' as alternative_country_name,\n 'PM' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'Saint Vincent and the Grenadines' as country_name,\n 'St. Vincent and the Grenadines' as alternative_country_name,\n 'VC' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Samoa' as country_name,\n '' as alternative_country_name,\n 'WS' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'San Marino' as country_name,\n '' as alternative_country_name,\n 'SM' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Sao Tome and Principe' as country_name,\n 'S\u00e3o Tom\u00e9 and Principe' as alternative_country_name,\n 'ST' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Saudi Arabia' as country_name,\n '' as alternative_country_name,\n 'SA' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Senegal' as country_name,\n '' as alternative_country_name,\n 'SN' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Serbia' as country_name,\n '' as alternative_country_name,\n 'RS' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Seychelles' as country_name,\n '' as alternative_country_name,\n 'SC' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Sierra Leone' as country_name,\n '' as alternative_country_name,\n 'SL' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Singapore' as country_name,\n '' as alternative_country_name,\n 'SG' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Sint Maarten (Dutch part)' as country_name,\n '' as alternative_country_name,\n 'SX' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Slovakia' as country_name,\n '' as alternative_country_name,\n 'SK' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Slovenia' as country_name,\n '' as alternative_country_name,\n 'SI' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Solomon Islands' as country_name,\n '' as alternative_country_name,\n 'SB' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'Somalia' as country_name,\n '' as alternative_country_name,\n 'SO' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'South Africa' as country_name,\n '' as alternative_country_name,\n 'ZA' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'South Georgia and the South Sandwich Islands' as country_name,\n '' as alternative_country_name,\n 'GS' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'South Sudan' as country_name,\n '' as alternative_country_name,\n 'SS' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Spain' as country_name,\n '' as alternative_country_name,\n 'ES' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Sri Lanka' as country_name,\n '' as alternative_country_name,\n 'LK' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Sudan' as country_name,\n '' as alternative_country_name,\n 'SD' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'Suriname' as country_name,\n '' as alternative_country_name,\n 'SR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Svalbard and Jan Mayen' as country_name,\n '' as alternative_country_name,\n 'SJ' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Sweden' as country_name,\n '' as alternative_country_name,\n 'SE' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Switzerland' as country_name,\n '' as alternative_country_name,\n 'CH' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Syrian Arab Republic' as country_name,\n '' as alternative_country_name,\n 'SY' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Taiwan, Province of China' as country_name,\n 'Taiwan' as alternative_country_name,\n 'TW' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Tajikistan' as country_name,\n '' as alternative_country_name,\n 'TJ' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Tanzania, United Republic of' as country_name,\n 'Tanzania' as alternative_country_name,\n 'TZ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Thailand' as country_name,\n '' as alternative_country_name,\n 'TH' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Timor-Leste' as country_name,\n '' as alternative_country_name,\n 'TL' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Togo' as country_name,\n '' as alternative_country_name,\n 'TG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Tokelau' as country_name,\n '' as alternative_country_name,\n 'TK' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Tonga' as country_name,\n '' as alternative_country_name,\n 'TO' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Trinidad and Tobago' as country_name,\n '' as alternative_country_name,\n 'TT' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Tunisia' as country_name,\n '' as alternative_country_name,\n 'TN' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'T\u00fcrkiye' as country_name,\n 'Turkey' as alternative_country_name,\n 'TR' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Turkmenistan' as country_name,\n '' as alternative_country_name,\n 'TM' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Turks and Caicos Islands' as country_name,\n '' as alternative_country_name,\n 'TC' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Tuvalu' as country_name,\n '' as alternative_country_name,\n 'TV' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Uganda' as country_name,\n '' as alternative_country_name,\n 'UG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Ukraine' as country_name,\n '' as alternative_country_name,\n 'UA' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'United Arab Emirates' as country_name,\n '' as alternative_country_name,\n 'AE' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'United Kingdom of Great Britain and Northern Ireland' as country_name,\n 'United Kingdom' as alternative_country_name,\n 'GB' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'United States of America' as country_name,\n 'United States' as alternative_country_name,\n 'US' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'United States Minor Outlying Islands' as country_name,\n '' as alternative_country_name,\n 'UM' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Uruguay' as country_name,\n '' as alternative_country_name,\n 'UY' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Uzbekistan' as country_name,\n '' as alternative_country_name,\n 'UZ' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Vanuatu' as country_name,\n '' as alternative_country_name,\n 'VU' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'Venezuela (Bolivarian Republic of)' as country_name,\n 'Venezuela' as alternative_country_name,\n 'VE' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Viet Nam' as country_name,\n 'Vietnam' as alternative_country_name,\n 'VN' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Virgin Islands (British)' as country_name,\n 'British Virgin Islands' as alternative_country_name,\n 'VG' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Virgin Islands (U.S.)' as country_name,\n '' as alternative_country_name,\n 'VI' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Wallis and Futuna' as country_name,\n '' as alternative_country_name,\n 'WF' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Western Sahara' as country_name,\n '' as alternative_country_name,\n 'EH' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'Yemen' as country_name,\n '' as alternative_country_name,\n 'YE' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Zambia' as country_name,\n '' as alternative_country_name,\n 'ZM' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Zimbabwe' as country_name,\n '' as alternative_country_name,\n 'ZW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Kosovo' as country_name,\n '' as alternative_country_name,\n 'XK' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Unknown' as country_name,\n '' as alternative_country_name,\n 'Unknown' as country_code,\n 'Unknown' as global_region\n\n \n \n), \n\nfinal as (\n\n select \n country_name,\n case when alternative_country_name = '' then null else alternative_country_name end as alternative_country_name,\n country_code,\n global_region\n from create_country_mapping\n)\n\nselect *\nfrom final\n), base as (\n\n select *\n from __dbt__cte__int_ad_reporting__monthly_campaign_country_report\n),\n\ncountry_mapping as (\n\n select *\n from __dbt__cte__int_ad_reporting__country_mapping\n),\n\n\nstandardize_country_names as (\n\n select \n base.*,\n coalesce(country_mapping.country_name, base.country) as standardized_alt_country_name\n\n from base \n left join country_mapping\n on base.country = country_mapping.alternative_country_name\n),\n\n\nmap_countries_and_codes as (\n\n select \n standardize_country_names.*,\n coalesce(standardize_country_names.standardized_alt_country_name, country_mapping.country_name) as standardized_country,\n coalesce(standardize_country_names.country_code, country_mapping.country_code) as standardized_country_code,\n country_mapping.global_region\n\n from standardize_country_names \n left join country_mapping\n on standardize_country_names.standardized_alt_country_name = country_mapping.country_name\n or standardize_country_names.country_code = country_mapping.country_code\n),\n\naggregated as (\n \n select\n source_relation,\n cast(date_trunc('month', date_day) as date) as date_month,\n platform,\n account_id,\n account_name,\n campaign_id,\n campaign_name,\n standardized_country as country,\n standardized_country_code as country_code,\n global_region,\n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n\n \n\n\n\n\n\n from map_countries_and_codes\n group by 1,2,3,4,5,6,7,8,9,10\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.ad_reporting.int_ad_reporting__monthly_campaign_country_report", "sql": " __dbt__cte__int_ad_reporting__monthly_campaign_country_report as (\n\n\n\n\n\n\n\n\n\n\n\n\n\nwith \n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(null as TEXT) as campaign_id\n\n \n ,cast('Account-level' as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(null as TEXT) as country\n\n \n ,cast(replace(country, 'unknown', 'Unknown') as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__country_report\"\n\n),\n\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_month)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(replace(country_name, 'Hong Kong SAR', 'Hong Kong SAR China') as TEXT) as country\n\n \n ,cast(null as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__monthly_campaign_country_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(country as TEXT) as country\n\n \n ,cast(null as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_country_report\"\n\n),\n\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(replace(country_name, 'U.S.', 'United States') as TEXT) as country\n\n \n ,cast(country_id as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_country_report\"\n\n),\n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(null as TEXT) as country\n\n \n ,cast(country as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__campaign_country_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(null as TEXT) as country\n\n \n ,cast(country as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_country_report\"\n\n),\n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(country_name as TEXT) as country\n\n \n ,cast(country_code as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__campaign_country_report\"\n\n),\n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(country as TEXT) as country\n\n \n ,cast(null as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_country_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from facebook_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n)"}, {"id": "model.ad_reporting.int_ad_reporting__country_mapping", "sql": " __dbt__cte__int_ad_reporting__country_mapping as (\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nwith create_country_mapping as (\n select\n 'Afghanistan' as country_name,\n '' as alternative_country_name,\n 'AF' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n '\u00c5land Islands' as country_name,\n '' as alternative_country_name,\n 'AX' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Albania' as country_name,\n '' as alternative_country_name,\n 'AL' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Algeria' as country_name,\n '' as alternative_country_name,\n 'DZ' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'American Samoa' as country_name,\n '' as alternative_country_name,\n 'AS' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Andorra' as country_name,\n '' as alternative_country_name,\n 'AD' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Angola' as country_name,\n '' as alternative_country_name,\n 'AO' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Anguilla' as country_name,\n '' as alternative_country_name,\n 'AI' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Antarctica' as country_name,\n '' as alternative_country_name,\n 'AQ' as country_code,\n '' as global_region\n\n union all \n \n select\n 'Antigua and Barbuda' as country_name,\n '' as alternative_country_name,\n 'AG' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Argentina' as country_name,\n '' as alternative_country_name,\n 'AR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Armenia' as country_name,\n '' as alternative_country_name,\n 'AM' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Aruba' as country_name,\n '' as alternative_country_name,\n 'AW' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Australia' as country_name,\n '' as alternative_country_name,\n 'AU' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Austria' as country_name,\n '' as alternative_country_name,\n 'AT' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Azerbaijan' as country_name,\n '' as alternative_country_name,\n 'AZ' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Bahamas' as country_name,\n '' as alternative_country_name,\n 'BS' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Bahrain' as country_name,\n '' as alternative_country_name,\n 'BH' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Bangladesh' as country_name,\n '' as alternative_country_name,\n 'BD' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Barbados' as country_name,\n '' as alternative_country_name,\n 'BB' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Belarus' as country_name,\n '' as alternative_country_name,\n 'BY' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Belgium' as country_name,\n '' as alternative_country_name,\n 'BE' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Belize' as country_name,\n '' as alternative_country_name,\n 'BZ' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Benin' as country_name,\n '' as alternative_country_name,\n 'BJ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Bermuda' as country_name,\n '' as alternative_country_name,\n 'BM' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'Bhutan' as country_name,\n '' as alternative_country_name,\n 'BT' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Bolivia (Plurinational State of)' as country_name,\n 'Bolivia' as alternative_country_name,\n 'BO' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Bonaire, Sint Eustatius and Saba' as country_name,\n '' as alternative_country_name,\n 'BQ' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Bosnia and Herzegovina' as country_name,\n '' as alternative_country_name,\n 'BA' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Botswana' as country_name,\n '' as alternative_country_name,\n 'BW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Bouvet Island' as country_name,\n '' as alternative_country_name,\n 'BV' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Brazil' as country_name,\n '' as alternative_country_name,\n 'BR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'British Indian Ocean Territory' as country_name,\n '' as alternative_country_name,\n 'IO' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Brunei Darussalam' as country_name,\n 'Brunei' as alternative_country_name,\n 'BN' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Bulgaria' as country_name,\n '' as alternative_country_name,\n 'BG' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Burkina Faso' as country_name,\n '' as alternative_country_name,\n 'BF' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Burundi' as country_name,\n '' as alternative_country_name,\n 'BI' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Cabo Verde' as country_name,\n 'Cape Verde' as alternative_country_name,\n 'CV' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Cambodia' as country_name,\n '' as alternative_country_name,\n 'KH' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Cameroon' as country_name,\n '' as alternative_country_name,\n 'CM' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Canada' as country_name,\n '' as alternative_country_name,\n 'CA' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'Cayman Islands' as country_name,\n '' as alternative_country_name,\n 'KY' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Central African Republic' as country_name,\n '' as alternative_country_name,\n 'CF' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Chad' as country_name,\n '' as alternative_country_name,\n 'TD' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Chile' as country_name,\n '' as alternative_country_name,\n 'CL' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'China' as country_name,\n '' as alternative_country_name,\n 'CN' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Christmas Island' as country_name,\n '' as alternative_country_name,\n 'CX' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Cocos (Keeling) Islands' as country_name,\n '' as alternative_country_name,\n 'CC' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Colombia' as country_name,\n '' as alternative_country_name,\n 'CO' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Comoros' as country_name,\n '' as alternative_country_name,\n 'KM' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Congo' as country_name,\n 'Republic of the Congo' as alternative_country_name,\n 'CG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Congo, Democratic Republic of the' as country_name,\n 'Democratic Republic of the Congo' as alternative_country_name,\n 'CD' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Cook Islands' as country_name,\n '' as alternative_country_name,\n 'CK' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Costa Rica' as country_name,\n '' as alternative_country_name,\n 'CR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'C\u00f4te d''Ivoire' as country_name,\n 'Cote d''Ivoire' as alternative_country_name,\n 'CI' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Croatia' as country_name,\n '' as alternative_country_name,\n 'HR' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Cuba' as country_name,\n '' as alternative_country_name,\n 'CU' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Cura\u00e7ao' as country_name,\n '' as alternative_country_name,\n 'CW' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Cyprus' as country_name,\n '' as alternative_country_name,\n 'CY' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Czechia' as country_name,\n 'Czech Republic' as alternative_country_name,\n 'CZ' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Denmark' as country_name,\n '' as alternative_country_name,\n 'DK' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Djibouti' as country_name,\n '' as alternative_country_name,\n 'DJ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Dominica' as country_name,\n '' as alternative_country_name,\n 'DM' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Dominican Republic' as country_name,\n '' as alternative_country_name,\n 'DO' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Ecuador' as country_name,\n '' as alternative_country_name,\n 'EC' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Egypt' as country_name,\n '' as alternative_country_name,\n 'EG' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'El Salvador' as country_name,\n '' as alternative_country_name,\n 'SV' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Equatorial Guinea' as country_name,\n '' as alternative_country_name,\n 'GQ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Eritrea' as country_name,\n '' as alternative_country_name,\n 'ER' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Estonia' as country_name,\n '' as alternative_country_name,\n 'EE' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Eswatini' as country_name,\n '' as alternative_country_name,\n 'SZ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Ethiopia' as country_name,\n '' as alternative_country_name,\n 'ET' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Falkland Islands (Malvinas)' as country_name,\n '' as alternative_country_name,\n 'FK' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Faroe Islands' as country_name,\n '' as alternative_country_name,\n 'FO' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Fiji' as country_name,\n '' as alternative_country_name,\n 'FJ' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'Finland' as country_name,\n '' as alternative_country_name,\n 'FI' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'France' as country_name,\n '' as alternative_country_name,\n 'FR' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'French Guiana' as country_name,\n '' as alternative_country_name,\n 'GF' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'French Polynesia' as country_name,\n '' as alternative_country_name,\n 'PF' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'French Southern Territories' as country_name,\n '' as alternative_country_name,\n 'TF' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Gabon' as country_name,\n '' as alternative_country_name,\n 'GA' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Gambia' as country_name,\n '' as alternative_country_name,\n 'GM' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Georgia' as country_name,\n '' as alternative_country_name,\n 'GE' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Germany' as country_name,\n '' as alternative_country_name,\n 'DE' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Ghana' as country_name,\n '' as alternative_country_name,\n 'GH' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Gibraltar' as country_name,\n '' as alternative_country_name,\n 'GI' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Greece' as country_name,\n '' as alternative_country_name,\n 'GR' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Greenland' as country_name,\n '' as alternative_country_name,\n 'GL' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'Grenada' as country_name,\n '' as alternative_country_name,\n 'GD' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Guadeloupe' as country_name,\n '' as alternative_country_name,\n 'GP' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Guam' as country_name,\n '' as alternative_country_name,\n 'GU' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Guatemala' as country_name,\n '' as alternative_country_name,\n 'GT' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Guernsey' as country_name,\n '' as alternative_country_name,\n 'GG' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Guinea' as country_name,\n '' as alternative_country_name,\n 'GN' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Guinea-Bissau' as country_name,\n '' as alternative_country_name,\n 'GW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Guyana' as country_name,\n '' as alternative_country_name,\n 'GY' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Haiti' as country_name,\n '' as alternative_country_name,\n 'HT' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Heard Island and McDonald Islands' as country_name,\n '' as alternative_country_name,\n 'HM' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Holy See' as country_name,\n '' as alternative_country_name,\n 'VA' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Honduras' as country_name,\n '' as alternative_country_name,\n 'HN' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Hong Kong' as country_name,\n 'Hong Kong SAR China' as alternative_country_name,\n 'HK' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Hungary' as country_name,\n '' as alternative_country_name,\n 'HU' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Iceland' as country_name,\n '' as alternative_country_name,\n 'IS' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'India' as country_name,\n '' as alternative_country_name,\n 'IN' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Indonesia' as country_name,\n '' as alternative_country_name,\n 'ID' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Iran (Islamic Republic of)' as country_name,\n 'Iran' as alternative_country_name,\n 'IR' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Iraq' as country_name,\n '' as alternative_country_name,\n 'IQ' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Ireland' as country_name,\n '' as alternative_country_name,\n 'IE' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Isle of Man' as country_name,\n '' as alternative_country_name,\n 'IM' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Israel' as country_name,\n '' as alternative_country_name,\n 'IL' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Italy' as country_name,\n '' as alternative_country_name,\n 'IT' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Jamaica' as country_name,\n '' as alternative_country_name,\n 'JM' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Japan' as country_name,\n '' as alternative_country_name,\n 'JP' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Jersey' as country_name,\n '' as alternative_country_name,\n 'JE' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Jordan' as country_name,\n '' as alternative_country_name,\n 'JO' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Kazakhstan' as country_name,\n '' as alternative_country_name,\n 'KZ' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Kenya' as country_name,\n '' as alternative_country_name,\n 'KE' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Kiribati' as country_name,\n '' as alternative_country_name,\n 'KI' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Korea (Democratic People''s Republic of)' as country_name,\n '' as alternative_country_name,\n 'KP' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Korea, Republic of' as country_name,\n 'South Korea' as alternative_country_name,\n 'KR' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Kuwait' as country_name,\n '' as alternative_country_name,\n 'KW' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Kyrgyzstan' as country_name,\n '' as alternative_country_name,\n 'KG' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Lao People''s Democratic Republic' as country_name,\n 'Laos' as alternative_country_name,\n 'LA' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Latvia' as country_name,\n '' as alternative_country_name,\n 'LV' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Lebanon' as country_name,\n '' as alternative_country_name,\n 'LB' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Lesotho' as country_name,\n '' as alternative_country_name,\n 'LS' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Liberia' as country_name,\n '' as alternative_country_name,\n 'LR' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Libya' as country_name,\n '' as alternative_country_name,\n 'LY' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'Liechtenstein' as country_name,\n '' as alternative_country_name,\n 'LI' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Lithuania' as country_name,\n '' as alternative_country_name,\n 'LT' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Luxembourg' as country_name,\n '' as alternative_country_name,\n 'LU' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Macao' as country_name,\n 'Macau' as alternative_country_name,\n 'MO' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Madagascar' as country_name,\n '' as alternative_country_name,\n 'MG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Malawi' as country_name,\n '' as alternative_country_name,\n 'MW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Malaysia' as country_name,\n '' as alternative_country_name,\n 'MY' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Maldives' as country_name,\n '' as alternative_country_name,\n 'MV' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Mali' as country_name,\n '' as alternative_country_name,\n 'ML' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Malta' as country_name,\n '' as alternative_country_name,\n 'MT' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Marshall Islands' as country_name,\n '' as alternative_country_name,\n 'MH' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Martinique' as country_name,\n '' as alternative_country_name,\n 'MQ' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Mauritania' as country_name,\n '' as alternative_country_name,\n 'MR' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Mauritius' as country_name,\n '' as alternative_country_name,\n 'MU' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Mayotte' as country_name,\n '' as alternative_country_name,\n 'YT' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Mexico' as country_name,\n '' as alternative_country_name,\n 'MX' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Micronesia (Federated States of)' as country_name,\n 'Micronesia' as alternative_country_name,\n 'FM' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Moldova, Republic of' as country_name,\n 'Moldova' as alternative_country_name,\n 'MD' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Monaco' as country_name,\n '' as alternative_country_name,\n 'MC' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Mongolia' as country_name,\n '' as alternative_country_name,\n 'MN' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Montenegro' as country_name,\n '' as alternative_country_name,\n 'ME' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Montserrat' as country_name,\n '' as alternative_country_name,\n 'MS' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Morocco' as country_name,\n '' as alternative_country_name,\n 'MA' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'Mozambique' as country_name,\n '' as alternative_country_name,\n 'MZ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Myanmar' as country_name,\n '' as alternative_country_name,\n 'MM' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Namibia' as country_name,\n '' as alternative_country_name,\n '' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Nauru' as country_name,\n '' as alternative_country_name,\n 'NR' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Nepal' as country_name,\n '' as alternative_country_name,\n 'NP' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Netherlands (Kingdom of the)' as country_name,\n 'Netherlands' as alternative_country_name,\n 'NL' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'New Caledonia' as country_name,\n '' as alternative_country_name,\n 'NC' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'New Zealand' as country_name,\n '' as alternative_country_name,\n 'NZ' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Nicaragua' as country_name,\n '' as alternative_country_name,\n 'NI' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Niger' as country_name,\n '' as alternative_country_name,\n 'NE' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Nigeria' as country_name,\n '' as alternative_country_name,\n 'NG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Niue' as country_name,\n '' as alternative_country_name,\n 'NU' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Norfolk Island' as country_name,\n '' as alternative_country_name,\n 'NF' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'North Macedonia' as country_name,\n '' as alternative_country_name,\n 'MK' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Northern Mariana Islands' as country_name,\n '' as alternative_country_name,\n 'MP' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Norway' as country_name,\n '' as alternative_country_name,\n 'NO' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Oman' as country_name,\n '' as alternative_country_name,\n 'OM' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Pakistan' as country_name,\n '' as alternative_country_name,\n 'PK' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Palau' as country_name,\n '' as alternative_country_name,\n 'PW' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Palestine, State of' as country_name,\n '' as alternative_country_name,\n 'PS' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Panama' as country_name,\n '' as alternative_country_name,\n 'PA' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Papua New Guinea' as country_name,\n '' as alternative_country_name,\n 'PG' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'Paraguay' as country_name,\n '' as alternative_country_name,\n 'PY' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Peru' as country_name,\n '' as alternative_country_name,\n 'PE' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Philippines' as country_name,\n '' as alternative_country_name,\n 'PH' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Pitcairn' as country_name,\n '' as alternative_country_name,\n 'PN' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Poland' as country_name,\n '' as alternative_country_name,\n 'PL' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Portugal' as country_name,\n '' as alternative_country_name,\n 'PT' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Puerto Rico' as country_name,\n '' as alternative_country_name,\n 'PR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Qatar' as country_name,\n '' as alternative_country_name,\n 'QA' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'R\u00e9union' as country_name,\n 'Reunion' as alternative_country_name,\n 'RE' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Romania' as country_name,\n '' as alternative_country_name,\n 'RO' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Russian Federation' as country_name,\n 'Russia' as alternative_country_name,\n 'RU' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Rwanda' as country_name,\n '' as alternative_country_name,\n 'RW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Saint Barth\u00e9lemy' as country_name,\n 'St. Barth\u00e9lemy' as alternative_country_name,\n 'BL' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Saint Helena, Ascension and Tristan da Cunha' as country_name,\n 'St. Helena, Ascension and Tristan da Cunha' as alternative_country_name,\n 'SH' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Saint Kitts and Nevis' as country_name,\n 'St. Kitts and Nevis' as alternative_country_name,\n 'KN' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Saint Lucia' as country_name,\n 'St. Lucia' as alternative_country_name,\n 'LC' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Saint Martin (French part)' as country_name,\n 'St. Martin (French part)' as alternative_country_name,\n 'MF' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Saint Pierre and Miquelon' as country_name,\n 'St. Pierre and Miquelon' as alternative_country_name,\n 'PM' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'Saint Vincent and the Grenadines' as country_name,\n 'St. Vincent and the Grenadines' as alternative_country_name,\n 'VC' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Samoa' as country_name,\n '' as alternative_country_name,\n 'WS' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'San Marino' as country_name,\n '' as alternative_country_name,\n 'SM' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Sao Tome and Principe' as country_name,\n 'S\u00e3o Tom\u00e9 and Principe' as alternative_country_name,\n 'ST' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Saudi Arabia' as country_name,\n '' as alternative_country_name,\n 'SA' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Senegal' as country_name,\n '' as alternative_country_name,\n 'SN' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Serbia' as country_name,\n '' as alternative_country_name,\n 'RS' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Seychelles' as country_name,\n '' as alternative_country_name,\n 'SC' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Sierra Leone' as country_name,\n '' as alternative_country_name,\n 'SL' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Singapore' as country_name,\n '' as alternative_country_name,\n 'SG' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Sint Maarten (Dutch part)' as country_name,\n '' as alternative_country_name,\n 'SX' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Slovakia' as country_name,\n '' as alternative_country_name,\n 'SK' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Slovenia' as country_name,\n '' as alternative_country_name,\n 'SI' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Solomon Islands' as country_name,\n '' as alternative_country_name,\n 'SB' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'Somalia' as country_name,\n '' as alternative_country_name,\n 'SO' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'South Africa' as country_name,\n '' as alternative_country_name,\n 'ZA' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'South Georgia and the South Sandwich Islands' as country_name,\n '' as alternative_country_name,\n 'GS' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'South Sudan' as country_name,\n '' as alternative_country_name,\n 'SS' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Spain' as country_name,\n '' as alternative_country_name,\n 'ES' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Sri Lanka' as country_name,\n '' as alternative_country_name,\n 'LK' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Sudan' as country_name,\n '' as alternative_country_name,\n 'SD' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'Suriname' as country_name,\n '' as alternative_country_name,\n 'SR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Svalbard and Jan Mayen' as country_name,\n '' as alternative_country_name,\n 'SJ' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Sweden' as country_name,\n '' as alternative_country_name,\n 'SE' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Switzerland' as country_name,\n '' as alternative_country_name,\n 'CH' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Syrian Arab Republic' as country_name,\n '' as alternative_country_name,\n 'SY' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Taiwan, Province of China' as country_name,\n 'Taiwan' as alternative_country_name,\n 'TW' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Tajikistan' as country_name,\n '' as alternative_country_name,\n 'TJ' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Tanzania, United Republic of' as country_name,\n 'Tanzania' as alternative_country_name,\n 'TZ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Thailand' as country_name,\n '' as alternative_country_name,\n 'TH' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Timor-Leste' as country_name,\n '' as alternative_country_name,\n 'TL' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Togo' as country_name,\n '' as alternative_country_name,\n 'TG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Tokelau' as country_name,\n '' as alternative_country_name,\n 'TK' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Tonga' as country_name,\n '' as alternative_country_name,\n 'TO' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Trinidad and Tobago' as country_name,\n '' as alternative_country_name,\n 'TT' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Tunisia' as country_name,\n '' as alternative_country_name,\n 'TN' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'T\u00fcrkiye' as country_name,\n 'Turkey' as alternative_country_name,\n 'TR' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Turkmenistan' as country_name,\n '' as alternative_country_name,\n 'TM' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Turks and Caicos Islands' as country_name,\n '' as alternative_country_name,\n 'TC' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Tuvalu' as country_name,\n '' as alternative_country_name,\n 'TV' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Uganda' as country_name,\n '' as alternative_country_name,\n 'UG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Ukraine' as country_name,\n '' as alternative_country_name,\n 'UA' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'United Arab Emirates' as country_name,\n '' as alternative_country_name,\n 'AE' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'United Kingdom of Great Britain and Northern Ireland' as country_name,\n 'United Kingdom' as alternative_country_name,\n 'GB' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'United States of America' as country_name,\n 'United States' as alternative_country_name,\n 'US' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'United States Minor Outlying Islands' as country_name,\n '' as alternative_country_name,\n 'UM' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Uruguay' as country_name,\n '' as alternative_country_name,\n 'UY' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Uzbekistan' as country_name,\n '' as alternative_country_name,\n 'UZ' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Vanuatu' as country_name,\n '' as alternative_country_name,\n 'VU' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'Venezuela (Bolivarian Republic of)' as country_name,\n 'Venezuela' as alternative_country_name,\n 'VE' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Viet Nam' as country_name,\n 'Vietnam' as alternative_country_name,\n 'VN' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Virgin Islands (British)' as country_name,\n 'British Virgin Islands' as alternative_country_name,\n 'VG' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Virgin Islands (U.S.)' as country_name,\n '' as alternative_country_name,\n 'VI' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Wallis and Futuna' as country_name,\n '' as alternative_country_name,\n 'WF' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Western Sahara' as country_name,\n '' as alternative_country_name,\n 'EH' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'Yemen' as country_name,\n '' as alternative_country_name,\n 'YE' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Zambia' as country_name,\n '' as alternative_country_name,\n 'ZM' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Zimbabwe' as country_name,\n '' as alternative_country_name,\n 'ZW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Kosovo' as country_name,\n '' as alternative_country_name,\n 'XK' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Unknown' as country_name,\n '' as alternative_country_name,\n 'Unknown' as country_code,\n 'Unknown' as global_region\n\n \n \n), \n\nfinal as (\n\n select \n country_name,\n case when alternative_country_name = '' then null else alternative_country_name end as alternative_country_name,\n country_code,\n global_region\n from create_country_mapping\n)\n\nselect *\nfrom final\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.ad_reporting__monthly_campaign_region_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "ad_reporting__monthly_campaign_region_report", "resource_type": "model", "package_name": "ad_reporting", "path": "ad_reporting__monthly_campaign_region_report.sql", "original_file_path": "models/ad_reporting__monthly_campaign_region_report.sql", "unique_id": "model.ad_reporting.ad_reporting__monthly_campaign_region_report", "fqn": ["ad_reporting", "ad_reporting__monthly_campaign_region_report"], "alias": "ad_reporting__monthly_campaign_region_report", "checksum": {"name": "sha256", "checksum": "d6e6628a75863cadc3046d2ae284a5dfc95bf22f4c1162608a6672e7b2409fac"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents monthly metrics by campaign and region (state, province, metropolitan area, etc.) provided by each platform.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.source_relation"]}, "date_month": {"name": "date_month", "description": "Month of the record, truncated to the first day of the month.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "platform": {"name": "platform", "description": "The ad platform associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.platform"]}, "account_id": {"name": "account_id", "description": "The ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_id"]}, "account_name": {"name": "account_name", "description": "The name of the account, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID representing the campaign, if present in the source data. Facebook Ads presents country data only at the account level and will have a null value for this field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign, if present in the source data. Facebook Ads presents country data only at the account level and will have a value of `Account-level` for this field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.clicks"]}, "impressions": {"name": "impressions", "description": "The count of impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.impressions"]}, "spend": {"name": "spend", "description": "The cost of the ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.spend"]}, "conversions": {"name": "conversions", "description": "The count of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The monetary value of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions_value"]}, "region": {"name": "region", "description": "Region the ad was served in. The formatting may vary across platforms. This may be a state, province, metropolitan area, etc. Snapchat Ads provides this as a two-letter abbreviation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "ad_reporting://models/ad_reporting_models.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.366314, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__monthly_campaign_region_report\"", "raw_code": "{% set include_list = [] %}\n{% do include_list.append('facebook_ads') if var('facebook_ads__using_demographics_region', false) %}\n{% do include_list.append('linkedin_ads') if var('linkedin_ads__using_geo', true) and var('linkedin_ads__using_monthly_ad_analytics_by_member_region', true) %}\n{% do include_list.append('microsoft_ads') if var('microsoft_ads__using_geographic_daily_report', false) %}\n{% do include_list.append('pinterest_ads') if var('pinterest__using_pin_promotion_targeting_report', true) and var('pinterest__using_targeting_geo_region', true) %}\n{% do include_list.append('snapchat_ads') if var('snapchat_ads__using_campaign_region_report', false) %}\n{% do include_list.append('twitter_ads') if var('twitter_ads__using_campaign_regions_report', false) %}\n\n{% set enabled_packages = get_enabled_packages(include=include_list)%}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith base as (\n\n select *\n from {{ ref('int_ad_reporting__monthly_campaign_region_report') }}\n),\n\naggregated as (\n \n select\n source_relation,\n cast({{ dbt.date_trunc(\"month\", \"date_day\") }} as date) as date_month,\n platform,\n account_id,\n account_name,\n campaign_id,\n campaign_name,\n region,\n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n\n {{ ad_reporting_persist_pass_through_columns(pass_through_variable='ad_reporting__country_passthrough_metrics', transform = 'sum', alias_fields=['conversions', 'conversions_value']) }}\n\n from base\n {{ dbt_utils.group_by(8) }}\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_ad_reporting__monthly_campaign_region_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.dbt.date_trunc", "macro.ad_reporting.ad_reporting_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.ad_reporting.int_ad_reporting__monthly_campaign_region_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting__monthly_campaign_region_report.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n\n\n\n\nwith __dbt__cte__int_ad_reporting__monthly_campaign_region_report as (\n\n\n\n\n\n\n\n\n\n\n\nwith \n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(null as TEXT) as campaign_id\n\n \n ,cast('Account-level' as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__region_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_month)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region_name as TEXT) as region\n\n \n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__monthly_campaign_region_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_region_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region_name as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_region_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(replace(region, 'UNKNOWN', 'Unknown') as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_region_report\"\n\n),\n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_region_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from facebook_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from twitter_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n), base as (\n\n select *\n from __dbt__cte__int_ad_reporting__monthly_campaign_region_report\n),\n\naggregated as (\n \n select\n source_relation,\n cast(date_trunc('month', date_day) as date) as date_month,\n platform,\n account_id,\n account_name,\n campaign_id,\n campaign_name,\n region,\n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n\n \n\n\n\n\n\n from base\n group by 1,2,3,4,5,6,7,8\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.ad_reporting.int_ad_reporting__monthly_campaign_region_report", "sql": " __dbt__cte__int_ad_reporting__monthly_campaign_region_report as (\n\n\n\n\n\n\n\n\n\n\n\nwith \n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(null as TEXT) as campaign_id\n\n \n ,cast('Account-level' as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__region_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_month)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region_name as TEXT) as region\n\n \n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__monthly_campaign_region_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_region_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region_name as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_region_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(replace(region, 'UNKNOWN', 'Unknown') as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_region_report\"\n\n),\n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_region_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from facebook_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from twitter_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.ad_reporting__url_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "ad_reporting__url_report", "resource_type": "model", "package_name": "ad_reporting", "path": "ad_reporting__url_report.sql", "original_file_path": "models/ad_reporting__url_report.sql", "unique_id": "model.ad_reporting.ad_reporting__url_report", "fqn": ["ad_reporting", "ad_reporting__url_report"], "alias": "ad_reporting__url_report", "checksum": {"name": "sha256", "checksum": "7c8639ff09989134503970ae52f1be403409a4ebc28fe5abced5f93000c4945f"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents daily metrics by URL (and if applicable, URL UTM parameters), ad group, campaign and account.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.date_day"]}, "platform": {"name": "platform", "description": "The ad platform associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.platform"]}, "account_id": {"name": "account_id", "description": "The ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_id"]}, "account_name": {"name": "account_name", "description": "The name of the account, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID representing the campaign, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.campaign_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID representing the ad group, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the ad group, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.ad_group_name"]}, "base_url": {"name": "base_url", "description": "The base url of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.base_url"]}, "url_host": {"name": "url_host", "description": "The URL host of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.url_host"]}, "url_path": {"name": "url_path", "description": "The URL path of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.url_path"]}, "utm_source": {"name": "utm_source", "description": "The utm_source parameter of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.utm_source"]}, "utm_medium": {"name": "utm_medium", "description": "The utm_medium parameter of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.utm_medium"]}, "utm_campaign": {"name": "utm_campaign", "description": "The utm_campaign parameter of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.utm_campaign"]}, "utm_content": {"name": "utm_content", "description": "The utm_content parameter of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.utm_content"]}, "utm_term": {"name": "utm_term", "description": "The utm_term parameter of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.utm_term"]}, "clicks": {"name": "clicks", "description": "The count of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.clicks"]}, "impressions": {"name": "impressions", "description": "The count of impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.impressions"]}, "spend": {"name": "spend", "description": "The cost of the ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.spend"]}, "conversions": {"name": "conversions", "description": "The count of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The monetary value of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "ad_reporting://models/ad_reporting_models.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.363688, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__url_report\"", "raw_code": "{% set enabled_packages = get_enabled_packages(exclude=['amazon_ads', 'apple_search_ads']) %}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith base as (\n\n select *\n from {{ ref('int_ad_reporting__url_report') }}\n),\n\naggregated as (\n \n select\n source_relation,\n date_day, \n platform,\n account_id, \n account_name, \n campaign_id,\n campaign_name,\n ad_group_id,\n ad_group_name,\n base_url,\n url_host,\n url_path,\n utm_source,\n utm_medium,\n utm_campaign,\n utm_content,\n utm_term,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value\n\n {{ ad_reporting_persist_pass_through_columns(pass_through_variable='ad_reporting__ad_passthrough_metrics', transform = 'sum', alias_fields=['conversions', 'conversions_value']) }}\n\n from base\n {{ dbt_utils.group_by(17) }}\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_ad_reporting__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.ad_reporting_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.ad_reporting.int_ad_reporting__url_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting__url_report.sql", "compiled": true, "compiled_code": "\n\n\nwith __dbt__cte__int_ad_reporting__url_report as (\n\n\n\nwith\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__url_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__url_report\"\n\n),\n\n\n\n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_set_id as TEXT) as ad_group_id\n\n \n ,cast(ad_set_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__url_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as ad_group_id\n\n \n ,cast(campaign_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__url_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__url_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(ad_squad_id as TEXT) as ad_group_id\n\n \n ,cast(ad_squad_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__url_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__url_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(line_item_id as TEXT) as ad_group_id\n\n \n ,cast(line_item_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__url_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__url_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n), base as (\n\n select *\n from __dbt__cte__int_ad_reporting__url_report\n),\n\naggregated as (\n \n select\n source_relation,\n date_day, \n platform,\n account_id, \n account_name, \n campaign_id,\n campaign_name,\n ad_group_id,\n ad_group_name,\n base_url,\n url_host,\n url_path,\n utm_source,\n utm_medium,\n utm_campaign,\n utm_content,\n utm_term,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value\n\n \n\n\n\n\n\n from base\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.ad_reporting.int_ad_reporting__url_report", "sql": " __dbt__cte__int_ad_reporting__url_report as (\n\n\n\nwith\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__url_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__url_report\"\n\n),\n\n\n\n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_set_id as TEXT) as ad_group_id\n\n \n ,cast(ad_set_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__url_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as ad_group_id\n\n \n ,cast(campaign_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__url_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__url_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(ad_squad_id as TEXT) as ad_group_id\n\n \n ,cast(ad_squad_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__url_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__url_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(line_item_id as TEXT) as ad_group_id\n\n \n ,cast(line_item_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__url_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__url_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.ad_reporting__ad_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "ad_reporting__ad_report", "resource_type": "model", "package_name": "ad_reporting", "path": "ad_reporting__ad_report.sql", "original_file_path": "models/ad_reporting__ad_report.sql", "unique_id": "model.ad_reporting.ad_reporting__ad_report", "fqn": ["ad_reporting", "ad_reporting__ad_report"], "alias": "ad_reporting__ad_report", "checksum": {"name": "sha256", "checksum": "e6b430f3190b08e886e772e6e0a64656688e5834eba257d80c1ad1e756bba2bb"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents daily metrics by ad, ad group, campaign and account.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.date_day"]}, "platform": {"name": "platform", "description": "The ad platform associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.platform"]}, "account_id": {"name": "account_id", "description": "The ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_id"]}, "account_name": {"name": "account_name", "description": "The name of the account, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID representing the campaign, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.campaign_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID representing the ad group, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the ad group, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.ad_group_name"]}, "ad_id": {"name": "ad_id", "description": "The ID representing the ad, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.ad_id"]}, "ad_name": {"name": "ad_name", "description": "The name of the ad, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.ad_name"]}, "clicks": {"name": "clicks", "description": "The count of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.clicks"]}, "impressions": {"name": "impressions", "description": "The count of impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.impressions"]}, "spend": {"name": "spend", "description": "The cost of the ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.spend"]}, "conversions": {"name": "conversions", "description": "The count of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The monetary value of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "ad_reporting://models/ad_reporting_models.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.3576658, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__ad_report\"", "raw_code": "{% set enabled_packages = get_enabled_packages() %}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith base as (\n\n select *\n from {{ ref('int_ad_reporting__ad_report') }}\n),\n\naggregated as (\n \n select\n source_relation,\n date_day,\n platform,\n account_id,\n account_name,\n campaign_id,\n campaign_name,\n ad_group_id,\n ad_group_name,\n ad_id,\n ad_name,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value\n \n {{ ad_reporting_persist_pass_through_columns(pass_through_variable='ad_reporting__ad_passthrough_metrics', transform = 'sum', alias_fields=['conversions', 'conversions_value']) }}\n\n from base\n {{ dbt_utils.group_by(11) }}\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_ad_reporting__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.ad_reporting_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.ad_reporting.int_ad_reporting__ad_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting__ad_report.sql", "compiled": true, "compiled_code": "\n\n\nwith __dbt__cte__int_ad_reporting__ad_report as (\n\n\n\nwith\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__ad_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__ad_report\"\n\n),\n\n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__ad_report\"\n\n),\n\n\n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_set_id as TEXT) as ad_group_id\n\n \n ,cast(ad_set_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__ad_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as ad_group_id\n\n \n ,cast(campaign_name as TEXT) as ad_group_name\n\n \n ,cast(creative_id as TEXT) as ad_id\n\n \n ,cast(null as TEXT) as ad_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__creative_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(pin_promotion_id as TEXT) as ad_id\n\n \n ,cast(pin_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__pin_promotion_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(ad_squad_id as TEXT) as ad_group_id\n\n \n ,cast(ad_squad_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__ad_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__ad_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(line_item_id as TEXT) as ad_group_id\n\n \n ,cast(line_item_name as TEXT) as ad_group_name\n\n \n ,cast(promoted_tweet_id as TEXT) as ad_id\n\n \n ,cast(tweet_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__promoted_tweet_report\"\n\n), \n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(advertised_asin as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__ad_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__ad_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n), base as (\n\n select *\n from __dbt__cte__int_ad_reporting__ad_report\n),\n\naggregated as (\n \n select\n source_relation,\n date_day,\n platform,\n account_id,\n account_name,\n campaign_id,\n campaign_name,\n ad_group_id,\n ad_group_name,\n ad_id,\n ad_name,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value\n \n \n\n\n\n\n\n from base\n group by 1,2,3,4,5,6,7,8,9,10,11\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.ad_reporting.int_ad_reporting__ad_report", "sql": " __dbt__cte__int_ad_reporting__ad_report as (\n\n\n\nwith\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__ad_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__ad_report\"\n\n),\n\n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__ad_report\"\n\n),\n\n\n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_set_id as TEXT) as ad_group_id\n\n \n ,cast(ad_set_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__ad_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as ad_group_id\n\n \n ,cast(campaign_name as TEXT) as ad_group_name\n\n \n ,cast(creative_id as TEXT) as ad_id\n\n \n ,cast(null as TEXT) as ad_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__creative_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(pin_promotion_id as TEXT) as ad_id\n\n \n ,cast(pin_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__pin_promotion_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(ad_squad_id as TEXT) as ad_group_id\n\n \n ,cast(ad_squad_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__ad_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__ad_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(line_item_id as TEXT) as ad_group_id\n\n \n ,cast(line_item_name as TEXT) as ad_group_name\n\n \n ,cast(promoted_tweet_id as TEXT) as ad_id\n\n \n ,cast(tweet_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__promoted_tweet_report\"\n\n), \n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(advertised_asin as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__ad_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__ad_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.ad_reporting__account_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "ad_reporting__account_report", "resource_type": "model", "package_name": "ad_reporting", "path": "ad_reporting__account_report.sql", "original_file_path": "models/ad_reporting__account_report.sql", "unique_id": "model.ad_reporting.ad_reporting__account_report", "fqn": ["ad_reporting", "ad_reporting__account_report"], "alias": "ad_reporting__account_report", "checksum": {"name": "sha256", "checksum": "a3d1d911b21f4d4230c39ce69de3f963ea9f911ad1edfd14a4a5d40939333b54"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents daily metrics by account.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.date_day"]}, "platform": {"name": "platform", "description": "The ad platform associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.platform"]}, "account_id": {"name": "account_id", "description": "The ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_id"]}, "account_name": {"name": "account_name", "description": "The name of the account, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_name"]}, "clicks": {"name": "clicks", "description": "The count of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.clicks"]}, "impressions": {"name": "impressions", "description": "The count of impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.impressions"]}, "spend": {"name": "spend", "description": "The cost of the ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.spend"]}, "conversions": {"name": "conversions", "description": "The count of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The monetary value of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "ad_reporting://models/ad_reporting_models.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.3550975, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__account_report\"", "raw_code": "{% set enabled_packages = get_enabled_packages() %}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith base as (\n\n select *\n from {{ ref('int_ad_reporting__account_report') }}\n),\n\naggregated as (\n \n select\n source_relation,\n date_day,\n platform,\n account_id,\n account_name,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value\n\n {{ ad_reporting_persist_pass_through_columns(pass_through_variable='ad_reporting__account_passthrough_metrics', transform = 'sum', alias_fields=['conversions', 'conversions_value']) }}\n\n from base\n {{ dbt_utils.group_by(5) }}\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_ad_reporting__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.ad_reporting_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.ad_reporting.int_ad_reporting__account_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting__account_report.sql", "compiled": true, "compiled_code": "\n\n\nwith __dbt__cte__int_ad_reporting__account_report as (\n\n\n\nwith\n\n\nfacebook_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__account_report\"\n\n),\n\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__account_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__account_report\"\n\n),\n\n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__organization_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__account_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__advertiser_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__account_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__advertiser_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__account_report\"\n\n),\n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__account_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__account_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n), base as (\n\n select *\n from __dbt__cte__int_ad_reporting__account_report\n),\n\naggregated as (\n \n select\n source_relation,\n date_day,\n platform,\n account_id,\n account_name,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value\n\n \n\n\n\n\n\n from base\n group by 1,2,3,4,5\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.ad_reporting.int_ad_reporting__account_report", "sql": " __dbt__cte__int_ad_reporting__account_report as (\n\n\n\nwith\n\n\nfacebook_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__account_report\"\n\n),\n\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__account_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__account_report\"\n\n),\n\n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__organization_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__account_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__advertiser_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__account_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__advertiser_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__account_report\"\n\n),\n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__account_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__account_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.ad_reporting__ad_group_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "ad_reporting__ad_group_report", "resource_type": "model", "package_name": "ad_reporting", "path": "ad_reporting__ad_group_report.sql", "original_file_path": "models/ad_reporting__ad_group_report.sql", "unique_id": "model.ad_reporting.ad_reporting__ad_group_report", "fqn": ["ad_reporting", "ad_reporting__ad_group_report"], "alias": "ad_reporting__ad_group_report", "checksum": {"name": "sha256", "checksum": "5c0b5972fa79e21e67f7d5d0ff510424b54604dc214e1b978d22bc45b6b5b51d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents daily metrics by ad group, campaign and account.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.date_day"]}, "platform": {"name": "platform", "description": "The ad platform associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.platform"]}, "account_id": {"name": "account_id", "description": "The ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_id"]}, "account_name": {"name": "account_name", "description": "The name of the account, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID representing the campaign, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.campaign_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID representing the ad group, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the ad group, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.ad_group_name"]}, "clicks": {"name": "clicks", "description": "The count of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.clicks"]}, "impressions": {"name": "impressions", "description": "The count of impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.impressions"]}, "spend": {"name": "spend", "description": "The cost of the ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.spend"]}, "conversions": {"name": "conversions", "description": "The count of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The monetary value of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "ad_reporting://models/ad_reporting_models.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.3563795, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__ad_group_report\"", "raw_code": "{% set enabled_packages = get_enabled_packages() %}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith base as (\n\n select *\n from {{ ref('int_ad_reporting__ad_group_report') }}\n),\n\naggregated as (\n \n select\n source_relation,\n date_day,\n platform,\n account_id,\n account_name,\n campaign_id,\n campaign_name,\n ad_group_id,\n ad_group_name,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value\n\n {{ ad_reporting_persist_pass_through_columns(pass_through_variable='ad_reporting__ad_group_passthrough_metrics', transform = 'sum', alias_fields=['conversions', 'conversions_value']) }}\n\n from base\n {{ dbt_utils.group_by(9) }}\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_ad_reporting__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.ad_reporting_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.ad_reporting.int_ad_reporting__ad_group_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting__ad_group_report.sql", "compiled": true, "compiled_code": "\n\n\nwith __dbt__cte__int_ad_reporting__ad_group_report as (\n\n\n\nwith\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__ad_group_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__ad_group_report\"\n\n),\n\n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__ad_group_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as ad_group_id\n\n \n ,cast(campaign_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__campaign_report\"\n\n),\n\n\n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_set_id as TEXT) as ad_group_id\n\n \n ,cast(ad_set_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__ad_set_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__ad_group_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(ad_squad_id as TEXT) as ad_group_id\n\n \n ,cast(ad_squad_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__ad_squad_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__ad_group_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(line_item_id as TEXT) as ad_group_id\n\n \n ,cast(line_item_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__line_item_report\"\n\n), \n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__ad_group_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__ad_group_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n), base as (\n\n select *\n from __dbt__cte__int_ad_reporting__ad_group_report\n),\n\naggregated as (\n \n select\n source_relation,\n date_day,\n platform,\n account_id,\n account_name,\n campaign_id,\n campaign_name,\n ad_group_id,\n ad_group_name,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value\n\n \n\n\n\n\n\n from base\n group by 1,2,3,4,5,6,7,8,9\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.ad_reporting.int_ad_reporting__ad_group_report", "sql": " __dbt__cte__int_ad_reporting__ad_group_report as (\n\n\n\nwith\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__ad_group_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__ad_group_report\"\n\n),\n\n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__ad_group_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as ad_group_id\n\n \n ,cast(campaign_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__campaign_report\"\n\n),\n\n\n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_set_id as TEXT) as ad_group_id\n\n \n ,cast(ad_set_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__ad_set_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__ad_group_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(ad_squad_id as TEXT) as ad_group_id\n\n \n ,cast(ad_squad_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__ad_squad_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__ad_group_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(line_item_id as TEXT) as ad_group_id\n\n \n ,cast(line_item_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__line_item_report\"\n\n), \n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__ad_group_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__ad_group_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.ad_reporting__search_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "ad_reporting__search_report", "resource_type": "model", "package_name": "ad_reporting", "path": "ad_reporting__search_report.sql", "original_file_path": "models/ad_reporting__search_report.sql", "unique_id": "model.ad_reporting.ad_reporting__search_report", "fqn": ["ad_reporting", "ad_reporting__search_report"], "alias": "ad_reporting__search_report", "checksum": {"name": "sha256", "checksum": "dd9f2cfde264c525665cddabb05ff7562dfd3c40754a9c4bfd6cfd71540654f4"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents daily metrics by search query, ad group, campaign and account.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.date_day"]}, "platform": {"name": "platform", "description": "The ad platform associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.platform"]}, "account_id": {"name": "account_id", "description": "The ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_id"]}, "account_name": {"name": "account_name", "description": "The name of the account, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID representing the campaign, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.campaign_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID representing the ad group, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the ad group, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.ad_group_name"]}, "keyword_id": {"name": "keyword_id", "description": "The ID representing the keyword, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.keyword_id"]}, "keyword_text": {"name": "keyword_text", "description": "The keyword text.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.keyword_text"]}, "search_query": {"name": "search_query", "description": "The search query text.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.search_query"]}, "search_match_type": {"name": "search_match_type", "description": "The search match type associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.search_match_type"]}, "clicks": {"name": "clicks", "description": "The count of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.clicks"]}, "impressions": {"name": "impressions", "description": "The count of impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.impressions"]}, "spend": {"name": "spend", "description": "The cost of the ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.spend"]}, "conversions": {"name": "conversions", "description": "The count of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The monetary value of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "ad_reporting://models/ad_reporting_models.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.3621895, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__search_report\"", "raw_code": "{% set include_list = ['amazon_ads', 'microsoft_ads'] %}\n{% do include_list.append('apple_search_ads') if var('apple_search_ads__using_search_terms', true) %}\n{% do include_list.append('google_ads') if var('google_ads__using_search_term_keyword_stats', true) %}\n\n{% set enabled_packages = get_enabled_packages(include=include_list)%}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith base as (\n\n select *\n from {{ ref('int_ad_reporting__search_report') }}\n),\n\naggregated as (\n \n select\n source_relation,\n date_day,\n platform,\n account_id,\n account_name,\n campaign_id,\n campaign_name,\n ad_group_id,\n ad_group_name,\n keyword_id,\n keyword_text,\n search_query,\n search_match_type,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value\n\n {{ ad_reporting_persist_pass_through_columns(pass_through_variable='ad_reporting__search_passthrough_metrics', transform = 'sum', alias_fields=['conversions', 'conversions_value']) }}\n\n from base\n {{ dbt_utils.group_by(13) }}\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_ad_reporting__search_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.ad_reporting_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.ad_reporting.int_ad_reporting__search_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting__search_report.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\nwith __dbt__cte__int_ad_reporting__search_report as (\n\n\n\n\n\n\n\nwith \n\nmicrosoft_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(keyword_name as TEXT) as keyword_text\n\n \n ,cast(match_type as TEXT) as search_match_type\n\n \n ,cast(search_query as TEXT) as search_query\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__search_report\"\n\n), \n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(match_type as TEXT) as search_match_type\n\n \n ,cast(search_term_text as TEXT) as search_query\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__search_term_report\"\n\n), \n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(match_type as TEXT) as search_match_type\n\n \n ,cast(search_term as TEXT) as search_query\n\n \n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__search_report\"\n\n), \n\n\n\ngoogle_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(criterion_id as TEXT) as keyword_id\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(search_term_match_type as TEXT) as search_match_type\n\n \n ,cast(search_term as TEXT) as search_query\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__search_term_report\"\n\n), \n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from microsoft_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n), base as (\n\n select *\n from __dbt__cte__int_ad_reporting__search_report\n),\n\naggregated as (\n \n select\n source_relation,\n date_day,\n platform,\n account_id,\n account_name,\n campaign_id,\n campaign_name,\n ad_group_id,\n ad_group_name,\n keyword_id,\n keyword_text,\n search_query,\n search_match_type,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value\n\n \n\n\n\n\n\n from base\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.ad_reporting.int_ad_reporting__search_report", "sql": " __dbt__cte__int_ad_reporting__search_report as (\n\n\n\n\n\n\n\nwith \n\nmicrosoft_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(keyword_name as TEXT) as keyword_text\n\n \n ,cast(match_type as TEXT) as search_match_type\n\n \n ,cast(search_query as TEXT) as search_query\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__search_report\"\n\n), \n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(match_type as TEXT) as search_match_type\n\n \n ,cast(search_term_text as TEXT) as search_query\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__search_term_report\"\n\n), \n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(match_type as TEXT) as search_match_type\n\n \n ,cast(search_term as TEXT) as search_query\n\n \n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__search_report\"\n\n), \n\n\n\ngoogle_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(criterion_id as TEXT) as keyword_id\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(search_term_match_type as TEXT) as search_match_type\n\n \n ,cast(search_term as TEXT) as search_query\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__search_term_report\"\n\n), \n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from microsoft_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.int_ad_reporting__url_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "int_ad_reporting__url_report", "resource_type": "model", "package_name": "ad_reporting", "path": "intermediate/int_ad_reporting__url_report.sql", "original_file_path": "models/intermediate/int_ad_reporting__url_report.sql", "unique_id": "model.ad_reporting.int_ad_reporting__url_report", "fqn": ["ad_reporting", "intermediate", "int_ad_reporting__url_report"], "alias": "int_ad_reporting__url_report", "checksum": {"name": "sha256", "checksum": "c63f2f7ced76a775e88dcbd14c6a40b18cfd4597438584de7e9e93353f635fc7"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450500.656936, "relation_name": null, "raw_code": "{% set enabled_packages = get_enabled_packages(exclude=['amazon_ads', 'apple_search_ads']) %}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith\n{% for package in ['google_ads', 'microsoft_ads'] %}\n{% if package in enabled_packages %}\n{{ package }} as (\n {{ get_query(\n platform=package,\n report_type='url',\n relation=ref(package ~ '__url_report')\n ) }}\n),\n{% endif %}\n{% endfor %}\n\n{% if 'facebook_ads' in enabled_packages %}\nfacebook_ads as (\n\n {{ get_query(\n platform='facebook_ads', \n report_type='url', \n field_mapping={\n 'ad_group_id': 'ad_set_id',\n 'ad_group_name': 'ad_set_name'\n },\n relation=ref('facebook_ads__url_report')\n ) }}\n),\n{% endif %}\n\n{% if 'linkedin_ads' in enabled_packages %}\nlinkedin_ads as (\n\n {{ get_query(\n platform='linkedin_ads', \n report_type='url', \n field_mapping={\n 'campaign_id': 'campaign_group_id',\n 'campaign_name': 'campaign_group_name',\n 'ad_group_id': 'campaign_id',\n 'ad_group_name': 'campaign_name',\n 'spend': 'cost',\n 'conversions': 'total_conversions',\n 'conversions_value': 'conversion_value_in_local_currency'\n },\n relation=ref('linkedin_ads__url_report')\n ) }}\n),\n{% endif %}\n\n{% if 'pinterest_ads' in enabled_packages %}\npinterest_ads as (\n\n {{ get_query(\n platform='pinterest_ads', \n report_type='url', \n field_mapping={\n 'account_id': 'advertiser_id',\n 'account_name': 'advertiser_name',\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_value'\n },\n relation=ref('pinterest_ads__url_report')\n ) }}\n),\n{% endif %}\n\n{% if 'snapchat_ads' in enabled_packages %}\nsnapchat_ads as (\n\n {{ get_query(\n platform='snapchat_ads', \n report_type='url', \n field_mapping={\n 'account_id': 'ad_account_id',\n 'account_name': 'ad_account_name',\n 'ad_group_id': 'ad_squad_id',\n 'ad_group_name': 'ad_squad_name',\n 'clicks':'swipes',\n 'conversions': 'total_conversions',\n 'conversions_value': 'conversion_purchases_value'\n },\n relation=ref('snapchat_ads__url_report')\n ) }}\n), \n{% endif %}\n\n{% if 'tiktok_ads' in enabled_packages %}\ntiktok_ads as (\n\n {{ get_query(\n platform='tiktok_ads', \n report_type='url', \n field_mapping={\n 'account_id': 'advertiser_id',\n 'account_name': 'advertiser_name',\n 'conversions': 'conversion',\n 'conversions_value': 'total_conversion_value'\n },\n relation=ref('tiktok_ads__url_report')\n ) }}\n), \n{% endif %}\n\n{% if 'twitter_ads' in enabled_packages %}\ntwitter_ads as (\n\n {{ get_query(\n platform='twitter_ads', \n report_type='url', \n field_mapping={\n 'ad_group_id': 'line_item_id',\n 'ad_group_name': 'line_item_name',\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_sale_amount'\n },\n relation=ref('twitter_ads__url_report')\n ) }}\n), \n{% endif %}\n\n{% if 'reddit_ads' in enabled_packages %}\nreddit_ads as (\n\n {{ get_query(\n platform='reddit_ads', \n report_type='url', \n field_mapping={\n 'account_name': 'null',\n 'conversions_value': 'total_value'\n },\n relation=ref('reddit_ads__url_report')\n ) }}\n),\n{% endif %}\n\nunioned as (\n\n {{ union_ctes(ctes=enabled_packages)}}\n)\n\nselect *\nfrom unioned", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__url_report", "package": null, "version": null}, {"name": "microsoft_ads__url_report", "package": null, "version": null}, {"name": "facebook_ads__url_report", "package": null, "version": null}, {"name": "linkedin_ads__url_report", "package": null, "version": null}, {"name": "pinterest_ads__url_report", "package": null, "version": null}, {"name": "snapchat_ads__url_report", "package": null, "version": null}, {"name": "tiktok_ads__url_report", "package": null, "version": null}, {"name": "twitter_ads__url_report", "package": null, "version": null}, {"name": "reddit_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.get_query", "macro.ad_reporting.union_ctes"], "nodes": ["model.google_ads.google_ads__url_report", "model.microsoft_ads.microsoft_ads__url_report", "model.facebook_ads.facebook_ads__url_report", "model.linkedin.linkedin_ads__url_report", "model.pinterest.pinterest_ads__url_report", "model.snapchat_ads.snapchat_ads__url_report", "model.tiktok_ads.tiktok_ads__url_report", "model.twitter_ads.twitter_ads__url_report", "model.reddit_ads.reddit_ads__url_report"]}, "compiled_path": "target/compiled/ad_reporting/models/intermediate/int_ad_reporting__url_report.sql", "compiled": true, "compiled_code": "\n\n\nwith\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__url_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__url_report\"\n\n),\n\n\n\n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_set_id as TEXT) as ad_group_id\n\n \n ,cast(ad_set_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__url_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as ad_group_id\n\n \n ,cast(campaign_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__url_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__url_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(ad_squad_id as TEXT) as ad_group_id\n\n \n ,cast(ad_squad_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__url_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__url_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(line_item_id as TEXT) as ad_group_id\n\n \n ,cast(line_item_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__url_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__url_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.int_ad_reporting__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "int_ad_reporting__campaign_report", "resource_type": "model", "package_name": "ad_reporting", "path": "intermediate/int_ad_reporting__campaign_report.sql", "original_file_path": "models/intermediate/int_ad_reporting__campaign_report.sql", "unique_id": "model.ad_reporting.int_ad_reporting__campaign_report", "fqn": ["ad_reporting", "intermediate", "int_ad_reporting__campaign_report"], "alias": "int_ad_reporting__campaign_report", "checksum": {"name": "sha256", "checksum": "f758d9e24adfea761b4ef99282c19d7048a334cf62c21373c7c661101d1dccf4"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450500.7925916, "relation_name": null, "raw_code": "{% set enabled_packages = get_enabled_packages() %}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith\n{% for package in ['facebook_ads', 'google_ads', 'microsoft_ads'] %}\n{% if package in enabled_packages %}\n{{ package }} as (\n {{ get_query(\n platform=package,\n report_type='campaign',\n relation=ref(package ~ '__campaign_report')\n ) }}\n),\n{% endif %}\n{% endfor %}\n\n{% if 'apple_search_ads' in enabled_packages %}\napple_search_ads as (\n\n {{ get_query(\n platform='apple_search_ads', \n report_type='campaign', \n field_mapping={\n 'account_id': 'organization_id',\n 'account_name': 'organization_name',\n 'clicks': 'taps',\n 'conversions': 'tap_installs',\n 'conversions_value': 'null'\n },\n relation=ref('apple_search_ads__campaign_report')\n ) }}\n),\n{% endif %}\n\n{% if 'linkedin_ads' in enabled_packages %}\nlinkedin_ads as (\n\n {{ get_query(\n platform='linkedin_ads', \n report_type='campaign', \n field_mapping={\n 'campaign_id': 'campaign_group_id',\n 'campaign_name': 'campaign_group_name',\n 'spend': 'cost',\n 'conversions': 'total_conversions',\n 'conversions_value': 'conversion_value_in_local_currency'\n },\n relation=ref('linkedin_ads__campaign_group_report')\n ) }}\n),\n{% endif %}\n\n{% if 'pinterest_ads' in enabled_packages %}\npinterest_ads as (\n\n {{ get_query(\n platform='pinterest_ads', \n report_type='campaign', \n field_mapping={\n 'account_id': 'advertiser_id',\n 'account_name': 'advertiser_name',\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_value'\n },\n relation=ref('pinterest_ads__campaign_report')\n ) }}\n),\n{% endif %}\n\n{% if 'snapchat_ads' in enabled_packages %}\nsnapchat_ads as (\n\n {{ get_query(\n platform='snapchat_ads', \n report_type='campaign', \n field_mapping={\n 'account_id': 'ad_account_id',\n 'account_name': 'ad_account_name',\n 'clicks':'swipes',\n 'conversions': 'total_conversions',\n 'conversions_value': 'conversion_purchases_value'\n },\n relation=ref('snapchat_ads__campaign_report')\n ) }}\n), \n{% endif %}\n\n{% if 'tiktok_ads' in enabled_packages %}\ntiktok_ads as (\n\n {{ get_query(\n platform='tiktok_ads', \n report_type='campaign', \n field_mapping={\n 'account_id': 'advertiser_id',\n 'account_name': 'advertiser_name',\n 'conversions': 'conversion',\n 'conversions_value': 'total_conversion_value'\n },\n relation=ref('tiktok_ads__campaign_report')\n ) }}\n), \n{% endif %}\n\n{% if 'twitter_ads' in enabled_packages %}\ntwitter_ads as (\n\n {{ get_query(\n platform='twitter_ads', \n report_type='campaign', \n field_mapping={\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_sale_amount'\n },\n relation=ref('twitter_ads__campaign_report')\n ) }}\n),\n{% endif %}\n\n{% if 'amazon_ads' in enabled_packages %}\namazon_ads as (\n\n {{ get_query(\n platform='amazon_ads', \n report_type='campaign', \n field_mapping={\n 'spend': 'cost',\n 'conversions': 'purchases_30_d',\n 'conversions_value': 'sales_30_d'\n },\n relation=ref('amazon_ads__campaign_report')\n ) }}\n), \n{% endif %}\n\n{% if 'reddit_ads' in enabled_packages %}\nreddit_ads as (\n\n {{ get_query(\n platform='reddit_ads', \n report_type='campaign', \n field_mapping={\n 'account_name': 'null',\n 'conversions_value': 'total_value'\n },\n relation=ref('reddit_ads__campaign_report')\n ) }}\n),\n{% endif %}\n\nunioned as (\n\n {{ union_ctes(ctes=enabled_packages)}}\n)\n\nselect *\nfrom unioned", "doc_blocks": [], "language": "sql", "refs": [{"name": "facebook_ads__campaign_report", "package": null, "version": null}, {"name": "google_ads__campaign_report", "package": null, "version": null}, {"name": "microsoft_ads__campaign_report", "package": null, "version": null}, {"name": "apple_search_ads__campaign_report", "package": null, "version": null}, {"name": "linkedin_ads__campaign_group_report", "package": null, "version": null}, {"name": "pinterest_ads__campaign_report", "package": null, "version": null}, {"name": "snapchat_ads__campaign_report", "package": null, "version": null}, {"name": "tiktok_ads__campaign_report", "package": null, "version": null}, {"name": "twitter_ads__campaign_report", "package": null, "version": null}, {"name": "amazon_ads__campaign_report", "package": null, "version": null}, {"name": "reddit_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.get_query", "macro.ad_reporting.union_ctes"], "nodes": ["model.facebook_ads.facebook_ads__campaign_report", "model.google_ads.google_ads__campaign_report", "model.microsoft_ads.microsoft_ads__campaign_report", "model.apple_search_ads.apple_search_ads__campaign_report", "model.linkedin.linkedin_ads__campaign_group_report", "model.pinterest.pinterest_ads__campaign_report", "model.snapchat_ads.snapchat_ads__campaign_report", "model.tiktok_ads.tiktok_ads__campaign_report", "model.twitter_ads.twitter_ads__campaign_report", "model.amazon_ads.amazon_ads__campaign_report", "model.reddit_ads.reddit_ads__campaign_report"]}, "compiled_path": "target/compiled/ad_reporting/models/intermediate/int_ad_reporting__campaign_report.sql", "compiled": true, "compiled_code": "\n\n\nwith\n\n\nfacebook_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__campaign_report\"\n\n),\n\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__campaign_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_report\"\n\n),\n\n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__campaign_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__campaign_group_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__campaign_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_report\"\n\n),\n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__campaign_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__campaign_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.int_ad_reporting__monthly_campaign_country_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "int_ad_reporting__monthly_campaign_country_report", "resource_type": "model", "package_name": "ad_reporting", "path": "intermediate/int_ad_reporting__monthly_campaign_country_report.sql", "original_file_path": "models/intermediate/int_ad_reporting__monthly_campaign_country_report.sql", "unique_id": "model.ad_reporting.int_ad_reporting__monthly_campaign_country_report", "fqn": ["ad_reporting", "intermediate", "int_ad_reporting__monthly_campaign_country_report"], "alias": "int_ad_reporting__monthly_campaign_country_report", "checksum": {"name": "sha256", "checksum": "cfd5531fcebdd124447f1d86a32b6ccb47e4c52fd923507523f404d0845f1f7d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450500.853232, "relation_name": null, "raw_code": "{% set include_list = [] %}\n{% do include_list.append('facebook_ads') if var('facebook_ads__using_demographics_country', false) %}\n{% do include_list.append('linkedin_ads') if var('linkedin_ads__using_geo', true) and var('linkedin_ads__using_monthly_ad_analytics_by_member_country', true) %}\n{% do include_list.append('microsoft_ads') if var('microsoft_ads__using_geographic_daily_report', false) %}\n{% do include_list.append('pinterest_ads') if var('pinterest__using_pin_promotion_targeting_report', true) and var('pinterest__using_targeting_geo', true) %}\n{% do include_list.append('reddit_ads') if var('reddit_ads__using_campaign_country_report', true) %}\n{% do include_list.append('snapchat_ads') if var('snapchat_ads__using_campaign_country_report', false) %}\n{% do include_list.append('tiktok_ads') if var('tiktok_ads__using_campaign_country_report', true) %}\n{% do include_list.append('twitter_ads') if var('twitter_ads__using_campaign_locations_report', false) %}\n\n{% set enabled_packages = get_enabled_packages(include=include_list) %}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith \n{% if 'facebook_ads' in enabled_packages %}\nfacebook_ads as (\n\n {{ get_query(\n platform='facebook_ads', \n report_type='country', \n field_mapping={\n 'campaign_id': 'null',\n 'campaign_name': \"'Account-level'\",\n 'conversions_value': 'null',\n 'country': 'null',\n 'country_code': \"replace(country, 'unknown', 'Unknown')\"\n },\n relation=ref('facebook_ads__country_report')\n ) }}\n),\n{% endif %}\n\n{% if 'linkedin_ads' in enabled_packages %}\n{# Linkedin sends Hong Kong as Hong Kong SAR while others send it as Hong Kong SAR China or Hong Kong #}\nlinkedin_ads as (\n\n {{ get_query(\n platform='linkedin_ads', \n report_type='country', \n field_mapping={\n 'campaign_id': 'campaign_group_id',\n 'campaign_name': 'campaign_group_name',\n 'spend': 'cost',\n 'conversions': 'total_conversions',\n 'conversions_value': 'conversion_value_in_local_currency',\n 'country': \"replace(country_name, 'Hong Kong SAR', 'Hong Kong SAR China')\",\n 'country_code': 'null'\n },\n relation=ref('linkedin_ads__monthly_campaign_country_report')\n ) }}\n),\n{% endif %}\n\n{% if 'microsoft_ads' in enabled_packages %}\nmicrosoft_ads as (\n\n {{ get_query(\n platform='microsoft_ads', \n report_type='country', \n field_mapping={\n 'country_code': 'null'\n },\n relation=ref('microsoft_ads__campaign_country_report')\n ) }}\n),\n{% endif %}\n\n{% if 'pinterest_ads' in enabled_packages %}\n{# Pinterest Ads labels the United States as U.S. #}\npinterest_ads as (\n\n {{ get_query(\n platform='pinterest_ads', \n report_type='country', \n field_mapping={\n 'account_id': 'advertiser_id',\n 'account_name': 'advertiser_name',\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_value',\n 'country_code': 'country_id',\n 'country': \"replace(country_name, 'U.S.', 'United States')\"\n },\n relation=ref('pinterest_ads__campaign_country_report')\n ) }}\n),\n{% endif %}\n\n{% if 'reddit_ads' in enabled_packages %}\nreddit_ads as (\n\n {{ get_query(\n platform='reddit_ads', \n report_type='country', \n field_mapping={\n 'account_name': 'null',\n 'conversions_value': 'total_value',\n 'country': 'null',\n 'country_code': 'country'\n },\n relation=ref('reddit_ads__campaign_country_report')\n ) }}\n),\n{% endif %}\n\n{% if 'snapchat_ads' in enabled_packages %}\nsnapchat_ads as (\n\n {{ get_query(\n platform='snapchat_ads', \n report_type='country', \n field_mapping={\n 'account_id': 'ad_account_id',\n 'account_name': 'ad_account_name',\n 'clicks': 'swipes',\n 'conversions': 'total_conversions',\n 'conversions_value': 'conversion_purchases_value',\n 'country': 'null',\n 'country_code': 'country'\n },\n relation=ref('snapchat_ads__campaign_country_report')\n ) }}\n),\n{% endif %}\n\n{% if 'tiktok_ads' in enabled_packages %}\ntiktok_ads as (\n\n {{ get_query(\n platform='tiktok_ads', \n report_type='country', \n field_mapping={\n 'account_id': 'advertiser_id',\n 'account_name': 'advertiser_name',\n 'conversions': 'conversion',\n 'conversions_value': 'null',\n 'country': 'country_name' if var('tiktok_ads__using_location', true) else 'null',\n 'country_code': 'country_code'\n },\n relation=ref('tiktok_ads__campaign_country_report')\n ) }}\n),\n{% endif %}\n\n{% if 'twitter_ads' in enabled_packages %}\ntwitter_ads as (\n\n {{ get_query(\n platform='twitter_ads', \n report_type='country', \n field_mapping={\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_sale_amount',\n 'country_code': 'null'\n },\n relation=ref('twitter_ads__campaign_country_report')\n ) }}\n),\n{% endif %}\n\nunioned as (\n\n {{ union_ctes(ctes=enabled_packages) }}\n)\n\nselect *\nfrom unioned", "doc_blocks": [], "language": "sql", "refs": [{"name": "facebook_ads__country_report", "package": null, "version": null}, {"name": "linkedin_ads__monthly_campaign_country_report", "package": null, "version": null}, {"name": "microsoft_ads__campaign_country_report", "package": null, "version": null}, {"name": "pinterest_ads__campaign_country_report", "package": null, "version": null}, {"name": "reddit_ads__campaign_country_report", "package": null, "version": null}, {"name": "snapchat_ads__campaign_country_report", "package": null, "version": null}, {"name": "tiktok_ads__campaign_country_report", "package": null, "version": null}, {"name": "twitter_ads__campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.get_query", "macro.ad_reporting.union_ctes"], "nodes": ["model.facebook_ads.facebook_ads__country_report", "model.linkedin.linkedin_ads__monthly_campaign_country_report", "model.microsoft_ads.microsoft_ads__campaign_country_report", "model.pinterest.pinterest_ads__campaign_country_report", "model.reddit_ads.reddit_ads__campaign_country_report", "model.snapchat_ads.snapchat_ads__campaign_country_report", "model.tiktok_ads.tiktok_ads__campaign_country_report", "model.twitter_ads.twitter_ads__campaign_country_report"]}, "compiled_path": "target/compiled/ad_reporting/models/intermediate/int_ad_reporting__monthly_campaign_country_report.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n\n\n\n\n\n\nwith \n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(null as TEXT) as campaign_id\n\n \n ,cast('Account-level' as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(null as TEXT) as country\n\n \n ,cast(replace(country, 'unknown', 'Unknown') as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__country_report\"\n\n),\n\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_month)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(replace(country_name, 'Hong Kong SAR', 'Hong Kong SAR China') as TEXT) as country\n\n \n ,cast(null as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__monthly_campaign_country_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(country as TEXT) as country\n\n \n ,cast(null as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_country_report\"\n\n),\n\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(replace(country_name, 'U.S.', 'United States') as TEXT) as country\n\n \n ,cast(country_id as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_country_report\"\n\n),\n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(null as TEXT) as country\n\n \n ,cast(country as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__campaign_country_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(null as TEXT) as country\n\n \n ,cast(country as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_country_report\"\n\n),\n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(country_name as TEXT) as country\n\n \n ,cast(country_code as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__campaign_country_report\"\n\n),\n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(country as TEXT) as country\n\n \n ,cast(null as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_country_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from facebook_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.int_ad_reporting__ad_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "int_ad_reporting__ad_report", "resource_type": "model", "package_name": "ad_reporting", "path": "intermediate/int_ad_reporting__ad_report.sql", "original_file_path": "models/intermediate/int_ad_reporting__ad_report.sql", "unique_id": "model.ad_reporting.int_ad_reporting__ad_report", "fqn": ["ad_reporting", "intermediate", "int_ad_reporting__ad_report"], "alias": "int_ad_reporting__ad_report", "checksum": {"name": "sha256", "checksum": "6d1386977154c816977a1aaeab27907c687d107db030acfdf5f5696b28f097ec"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450500.9132824, "relation_name": null, "raw_code": "{% set enabled_packages = get_enabled_packages() %}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith\n{% for package in ['google_ads', 'microsoft_ads'] %}\n{% if package in enabled_packages %}\n{{ package }} as (\n {{ get_query(\n platform=package,\n report_type='ad',\n relation=ref(package ~ '__ad_report')\n ) }}\n),\n{% endif %}\n{% endfor %}\n\n{% if 'apple_search_ads' in enabled_packages %}\napple_search_ads as (\n\n {{ get_query(\n platform='apple_search_ads', \n report_type='ad', \n field_mapping={\n 'account_id': 'organization_id',\n 'account_name': 'organization_name',\n 'clicks': 'taps',\n 'conversions': 'tap_installs',\n 'conversions_value': 'null'\n },\n relation=ref('apple_search_ads__ad_report')\n ) }}\n),\n{% endif %}\n\n{% if 'facebook_ads' in enabled_packages %}\nfacebook_ads as (\n\n {{ get_query(\n platform='facebook_ads', \n report_type='ad', \n field_mapping={\n 'ad_group_id': 'ad_set_id',\n 'ad_group_name': 'ad_set_name'\n },\n relation=ref('facebook_ads__ad_report')\n ) }}\n),\n{% endif %}\n\n{% if 'linkedin_ads' in enabled_packages %}\nlinkedin_ads as (\n\n {{ get_query(\n platform='linkedin_ads', \n report_type='ad', \n field_mapping={\n 'campaign_id': 'campaign_group_id',\n 'campaign_name': 'campaign_group_name',\n 'ad_group_id': 'campaign_id',\n 'ad_group_name': 'campaign_name',\n 'ad_id': 'creative_id',\n 'ad_name': 'null',\n 'spend': 'cost',\n 'conversions': 'total_conversions',\n 'conversions_value': 'conversion_value_in_local_currency'\n },\n relation=ref('linkedin_ads__creative_report')\n ) }}\n),\n{% endif %}\n\n{% if 'pinterest_ads' in enabled_packages %}\npinterest_ads as (\n\n {{ get_query(\n platform='pinterest_ads', \n report_type='ad', \n field_mapping={\n 'account_id': 'advertiser_id',\n 'account_name': 'advertiser_name',\n 'ad_id': 'pin_promotion_id',\n 'ad_name': 'pin_name',\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_value'\n },\n relation=ref('pinterest_ads__pin_promotion_report')\n ) }}\n),\n{% endif %}\n\n{% if 'snapchat_ads' in enabled_packages %}\nsnapchat_ads as (\n\n {{ get_query(\n platform='snapchat_ads', \n report_type='ad', \n field_mapping={\n 'account_id': 'ad_account_id',\n 'account_name': 'ad_account_name',\n 'campaign_id': 'campaign_id',\n 'campaign_name': 'campaign_name',\n 'ad_group_id': 'ad_squad_id',\n 'ad_group_name': 'ad_squad_name',\n 'clicks':'swipes',\n 'conversions': 'total_conversions',\n 'conversions_value': 'conversion_purchases_value'\n },\n relation=ref('snapchat_ads__ad_report')\n ) }}\n), \n{% endif %}\n\n{% if 'tiktok_ads' in enabled_packages %}\ntiktok_ads as (\n\n {{ get_query(\n platform='tiktok_ads', \n report_type='ad', \n field_mapping={\n 'account_id': 'advertiser_id',\n 'account_name': 'advertiser_name',\n 'conversions': 'conversion',\n 'conversions_value': 'total_conversion_value'\n },\n relation=ref('tiktok_ads__ad_report')\n ) }}\n), \n{% endif %}\n\n{% if 'twitter_ads' in enabled_packages %}\ntwitter_ads as (\n\n {{ get_query(\n platform='twitter_ads', \n report_type='ad', \n field_mapping={\n 'ad_group_id': 'line_item_id',\n 'ad_group_name': 'line_item_name',\n 'ad_id': 'promoted_tweet_id',\n 'ad_name': 'tweet_name',\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_sale_amount'\n },\n relation=ref('twitter_ads__promoted_tweet_report')\n ) }}\n), \n{% endif %}\n\n{% if 'amazon_ads' in enabled_packages %}\namazon_ads as (\n\n {{ get_query(\n platform='amazon_ads', \n report_type='ad', \n field_mapping={\n 'spend': 'cost',\n 'ad_name': 'advertised_asin',\n 'conversions': 'purchases_30_d',\n 'conversions_value': 'sales_30_d'\n },\n relation=ref('amazon_ads__ad_report')\n ) }}\n), \n{% endif %}\n\n{% if 'reddit_ads' in enabled_packages %}\nreddit_ads as (\n\n {{ get_query(\n platform='reddit_ads', \n report_type='ad', \n field_mapping={\n 'account_name': 'null',\n 'conversions_value': 'total_value'\n },\n relation=ref('reddit_ads__ad_report')\n ) }}\n),\n{% endif %}\n\nunioned as (\n\n {{ union_ctes(ctes=enabled_packages)}}\n)\n\nselect *\nfrom unioned", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__ad_report", "package": null, "version": null}, {"name": "microsoft_ads__ad_report", "package": null, "version": null}, {"name": "apple_search_ads__ad_report", "package": null, "version": null}, {"name": "facebook_ads__ad_report", "package": null, "version": null}, {"name": "linkedin_ads__creative_report", "package": null, "version": null}, {"name": "pinterest_ads__pin_promotion_report", "package": null, "version": null}, {"name": "snapchat_ads__ad_report", "package": null, "version": null}, {"name": "tiktok_ads__ad_report", "package": null, "version": null}, {"name": "twitter_ads__promoted_tweet_report", "package": null, "version": null}, {"name": "amazon_ads__ad_report", "package": null, "version": null}, {"name": "reddit_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.get_query", "macro.ad_reporting.union_ctes"], "nodes": ["model.google_ads.google_ads__ad_report", "model.microsoft_ads.microsoft_ads__ad_report", "model.apple_search_ads.apple_search_ads__ad_report", "model.facebook_ads.facebook_ads__ad_report", "model.linkedin.linkedin_ads__creative_report", "model.pinterest.pinterest_ads__pin_promotion_report", "model.snapchat_ads.snapchat_ads__ad_report", "model.tiktok_ads.tiktok_ads__ad_report", "model.twitter_ads.twitter_ads__promoted_tweet_report", "model.amazon_ads.amazon_ads__ad_report", "model.reddit_ads.reddit_ads__ad_report"]}, "compiled_path": "target/compiled/ad_reporting/models/intermediate/int_ad_reporting__ad_report.sql", "compiled": true, "compiled_code": "\n\n\nwith\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__ad_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__ad_report\"\n\n),\n\n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__ad_report\"\n\n),\n\n\n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_set_id as TEXT) as ad_group_id\n\n \n ,cast(ad_set_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__ad_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as ad_group_id\n\n \n ,cast(campaign_name as TEXT) as ad_group_name\n\n \n ,cast(creative_id as TEXT) as ad_id\n\n \n ,cast(null as TEXT) as ad_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__creative_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(pin_promotion_id as TEXT) as ad_id\n\n \n ,cast(pin_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__pin_promotion_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(ad_squad_id as TEXT) as ad_group_id\n\n \n ,cast(ad_squad_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__ad_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__ad_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(line_item_id as TEXT) as ad_group_id\n\n \n ,cast(line_item_name as TEXT) as ad_group_name\n\n \n ,cast(promoted_tweet_id as TEXT) as ad_id\n\n \n ,cast(tweet_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__promoted_tweet_report\"\n\n), \n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(advertised_asin as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__ad_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__ad_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.int_ad_reporting__search_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "int_ad_reporting__search_report", "resource_type": "model", "package_name": "ad_reporting", "path": "intermediate/int_ad_reporting__search_report.sql", "original_file_path": "models/intermediate/int_ad_reporting__search_report.sql", "unique_id": "model.ad_reporting.int_ad_reporting__search_report", "fqn": ["ad_reporting", "intermediate", "int_ad_reporting__search_report"], "alias": "int_ad_reporting__search_report", "checksum": {"name": "sha256", "checksum": "1ebb6fcb26e81ccdda3af0ee23a398dc8851d2954837e422bde162be20a5f809"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450500.9926555, "relation_name": null, "raw_code": "{% set include_list = ['amazon_ads', 'microsoft_ads'] %}\n{% do include_list.append('apple_search_ads') if var('apple_search_ads__using_search_terms', true) %}\n{% do include_list.append('google_ads') if var('google_ads__using_search_term_keyword_stats', true) %}\n\n{% set enabled_packages = get_enabled_packages(include=include_list)%}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith \n{% if 'microsoft_ads' in enabled_packages %}\nmicrosoft_ads as (\n\n {{ get_query(\n platform='microsoft_ads', \n report_type='search', \n field_mapping={\n 'keyword_text': 'keyword_name',\n 'search_match_type': 'match_type'\n },\n relation=ref('microsoft_ads__search_report')\n ) }}\n), \n{% endif %}\n\n{% if 'apple_search_ads' in enabled_packages and var('apple_search_ads__using_search_terms', True) %}\napple_search_ads as (\n\n {{ get_query(\n platform='apple_search_ads', \n report_type='search', \n field_mapping={\n 'account_id': 'organization_id',\n 'account_name': 'organization_name',\n 'search_match_type': 'match_type',\n 'search_query': 'search_term_text',\n 'clicks': 'taps',\n 'conversions': 'tap_installs',\n 'conversions_value': 'null'\n },\n relation=ref('apple_search_ads__search_term_report')\n ) }}\n), \n{% endif %}\n\n{% if 'amazon_ads' in enabled_packages %}\namazon_ads as (\n\n {{ get_query(\n platform='amazon_ads', \n report_type='search', \n field_mapping={\n 'spend': 'cost',\n 'search_match_type': 'match_type',\n 'search_query': 'search_term',\n 'conversions': 'purchases_30_d',\n 'conversions_value': 'sales_30_d'\n },\n relation=ref('amazon_ads__search_report')\n ) }}\n), \n{% endif %}\n\n{% if 'google_ads' in enabled_packages and var('google_ads__using_search_term_keyword_stats', True) %}\ngoogle_ads as (\n\n {{ get_query(\n platform='google_ads', \n report_type='search', \n field_mapping={\n 'search_match_type': 'search_term_match_type',\n 'search_query': 'search_term',\n 'keyword_id': 'criterion_id'\n },\n relation=ref('google_ads__search_term_report')\n ) }}\n), \n{% endif %}\n\nunioned as (\n\n {{ union_ctes(ctes=enabled_packages)}}\n)\n\nselect *\nfrom unioned", "doc_blocks": [], "language": "sql", "refs": [{"name": "microsoft_ads__search_report", "package": null, "version": null}, {"name": "apple_search_ads__search_term_report", "package": null, "version": null}, {"name": "amazon_ads__search_report", "package": null, "version": null}, {"name": "google_ads__search_term_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.get_query", "macro.ad_reporting.union_ctes"], "nodes": ["model.microsoft_ads.microsoft_ads__search_report", "model.apple_search_ads.apple_search_ads__search_term_report", "model.amazon_ads.amazon_ads__search_report", "model.google_ads.google_ads__search_term_report"]}, "compiled_path": "target/compiled/ad_reporting/models/intermediate/int_ad_reporting__search_report.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\nwith \n\nmicrosoft_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(keyword_name as TEXT) as keyword_text\n\n \n ,cast(match_type as TEXT) as search_match_type\n\n \n ,cast(search_query as TEXT) as search_query\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__search_report\"\n\n), \n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(match_type as TEXT) as search_match_type\n\n \n ,cast(search_term_text as TEXT) as search_query\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__search_term_report\"\n\n), \n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(match_type as TEXT) as search_match_type\n\n \n ,cast(search_term as TEXT) as search_query\n\n \n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__search_report\"\n\n), \n\n\n\ngoogle_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(criterion_id as TEXT) as keyword_id\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(search_term_match_type as TEXT) as search_match_type\n\n \n ,cast(search_term as TEXT) as search_query\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__search_term_report\"\n\n), \n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from microsoft_ads\n\n\n\n\n)\n\nselect *\nfrom unioned", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.int_ad_reporting__keyword_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "int_ad_reporting__keyword_report", "resource_type": "model", "package_name": "ad_reporting", "path": "intermediate/int_ad_reporting__keyword_report.sql", "original_file_path": "models/intermediate/int_ad_reporting__keyword_report.sql", "unique_id": "model.ad_reporting.int_ad_reporting__keyword_report", "fqn": ["ad_reporting", "intermediate", "int_ad_reporting__keyword_report"], "alias": "int_ad_reporting__keyword_report", "checksum": {"name": "sha256", "checksum": "a840534875fd3dfd970e0a3ee9275ef0319534cf53eccc118c52ad5d09fef430"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450501.0338988, "relation_name": null, "raw_code": "{% set include_list = ['amazon_ads', 'apple_search_ads', 'google_ads', 'microsoft_ads'] %}\n{% do include_list.append('pinterest_ads') if var('pinterest__using_keywords', true) %}\n{% do include_list.append('twitter_ads') if var('twitter_ads__using_keywords', true) %}\n\n{% set enabled_packages = get_enabled_packages(include=include_list)%}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith\n{% if 'apple_search_ads' in enabled_packages %}\napple_search_ads as (\n\n {{ get_query(\n platform='apple_search_ads', \n report_type='keyword', \n field_mapping={\n 'account_id': 'organization_id',\n 'account_name': 'organization_name',\n 'keyword_match_type': 'match_type',\n 'clicks': 'taps',\n 'conversions': 'tap_installs',\n 'conversions_value': 'null'\n },\n relation=ref('apple_search_ads__keyword_report')\n ) }}\n),\n{% endif %}\n\n{% if 'google_ads' in enabled_packages %}\ngoogle_ads as (\n\n {{ get_query(\n platform='google_ads', \n report_type='keyword', \n field_mapping={\n 'keyword_id': 'criterion_id',\n },\n relation=ref('google_ads__keyword_report')\n ) }}\n),\n{% endif %}\n\n{% if 'microsoft_ads' in enabled_packages %}\nmicrosoft_ads as (\n\n {{ get_query(\n platform='microsoft_ads', \n report_type='keyword', \n field_mapping={\n 'keyword_text': 'keyword_name',\n 'keyword_match_type': 'match_type'\n },\n relation=ref('microsoft_ads__keyword_report')\n ) }}\n),\n{% endif %}\n\n{% if 'pinterest_ads' in enabled_packages and var('pinterest__using_keywords', True) %}\npinterest_ads as (\n\n {{ get_query(\n platform='pinterest_ads', \n report_type='keyword', \n field_mapping={\n 'account_id': 'advertiser_id',\n 'account_name': 'advertiser_name',\n 'keyword_text': 'keyword_value',\n 'keyword_match_type': 'match_type',\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_value'\n },\n relation=ref('pinterest_ads__keyword_report')\n ) }}\n),\n{% endif %}\n\n{% if 'twitter_ads' in enabled_packages and var('twitter_ads__using_keywords', True) %}\ntwitter_ads as (\n\n {{ get_query(\n platform='twitter_ads', \n report_type='keyword', \n field_mapping={\n 'ad_group_id': 'line_item_id',\n 'ad_group_name': 'line_item_name',\n 'keyword_id': 'keyword_id',\n 'keyword_text': 'keyword',\n 'keyword_match_type': 'null',\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_sale_amount'\n },\n relation=ref('twitter_ads__keyword_report')\n ) }}\n), \n{% endif %}\n\n{% if 'amazon_ads' in enabled_packages %}\namazon_ads as (\n\n {{ get_query(\n platform='amazon_ads', \n report_type='keyword', \n field_mapping={\n 'spend': 'cost',\n 'keyword_match_type': 'match_type',\n 'conversions': 'purchases_30_d',\n 'conversions_value': 'sales_30_d'\n },\n relation=ref('amazon_ads__keyword_report')\n ) }}\n), \n{% endif %}\n\nunioned as (\n\n {{ union_ctes(ctes=enabled_packages)}}\n)\n\nselect *\nfrom unioned", "doc_blocks": [], "language": "sql", "refs": [{"name": "apple_search_ads__keyword_report", "package": null, "version": null}, {"name": "google_ads__keyword_report", "package": null, "version": null}, {"name": "microsoft_ads__keyword_report", "package": null, "version": null}, {"name": "pinterest_ads__keyword_report", "package": null, "version": null}, {"name": "twitter_ads__keyword_report", "package": null, "version": null}, {"name": "amazon_ads__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.get_query", "macro.ad_reporting.union_ctes"], "nodes": ["model.apple_search_ads.apple_search_ads__keyword_report", "model.google_ads.google_ads__keyword_report", "model.microsoft_ads.microsoft_ads__keyword_report", "model.pinterest.pinterest_ads__keyword_report", "model.twitter_ads.twitter_ads__keyword_report", "model.amazon_ads.amazon_ads__keyword_report"]}, "compiled_path": "target/compiled/ad_reporting/models/intermediate/int_ad_reporting__keyword_report.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\nwith\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__keyword_report\"\n\n),\n\n\n\ngoogle_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(criterion_id as TEXT) as keyword_id\n\n \n ,cast(keyword_match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__keyword_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_name as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__keyword_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_value as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__keyword_report\"\n\n),\n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(line_item_id as TEXT) as ad_group_id\n\n \n ,cast(line_item_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(null as TEXT) as keyword_match_type\n\n \n ,cast(keyword as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__keyword_report\"\n\n), \n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__keyword_report\"\n\n), \n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from twitter_ads\n\n\n\n\n)\n\nselect *\nfrom unioned", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.int_ad_reporting__ad_group_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "int_ad_reporting__ad_group_report", "resource_type": "model", "package_name": "ad_reporting", "path": "intermediate/int_ad_reporting__ad_group_report.sql", "original_file_path": "models/intermediate/int_ad_reporting__ad_group_report.sql", "unique_id": "model.ad_reporting.int_ad_reporting__ad_group_report", "fqn": ["ad_reporting", "intermediate", "int_ad_reporting__ad_group_report"], "alias": "int_ad_reporting__ad_group_report", "checksum": {"name": "sha256", "checksum": "8a12689ca84a50414015e9702b5c5235072abee340617dd7c8d4560160690123"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450501.201321, "relation_name": null, "raw_code": "{% set enabled_packages = get_enabled_packages() %}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith\n{% for package in ['google_ads', 'microsoft_ads'] %}\n{% if package in enabled_packages %}\n{{ package }} as (\n {{ get_query(\n platform=package,\n report_type='ad_group',\n relation=ref(package ~ '__ad_group_report')\n ) }}\n),\n{% endif %}\n{% endfor %}\n\n{% if 'apple_search_ads' in enabled_packages %}\napple_search_ads as (\n\n {{ get_query(\n platform='apple_search_ads', \n report_type='ad_group', \n field_mapping={\n 'account_id': 'organization_id',\n 'account_name': 'organization_name',\n 'clicks': 'taps',\n 'conversions': 'tap_installs',\n 'conversions_value': 'null'\n },\n relation=ref('apple_search_ads__ad_group_report')\n ) }}\n),\n{% endif %}\n\n{% if 'linkedin_ads' in enabled_packages %}\nlinkedin_ads as (\n\n {{ get_query(\n platform='linkedin_ads', \n report_type='ad_group', \n field_mapping={\n 'campaign_id': 'campaign_group_id',\n 'campaign_name': 'campaign_group_name',\n 'ad_group_id': 'campaign_id',\n 'ad_group_name': 'campaign_name',\n 'spend': 'cost',\n 'conversions': 'total_conversions',\n 'conversions_value': 'conversion_value_in_local_currency'\n },\n relation=ref('linkedin_ads__campaign_report')\n ) }}\n),\n{% endif %}\n\n{% if 'facebook_ads' in enabled_packages %}\nfacebook_ads as (\n\n {{ get_query(\n platform='facebook_ads', \n report_type='ad_group', \n field_mapping={\n 'ad_group_id': 'ad_set_id',\n 'ad_group_name': 'ad_set_name'\n },\n relation=ref('facebook_ads__ad_set_report')\n ) }}\n),\n{% endif %}\n\n{% if 'pinterest_ads' in enabled_packages %}\npinterest_ads as (\n\n {{ get_query(\n platform='pinterest_ads', \n report_type='ad_group', \n field_mapping={\n 'account_id': 'advertiser_id',\n 'account_name': 'advertiser_name',\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_value'\n },\n relation=ref('pinterest_ads__ad_group_report')\n ) }}\n),\n{% endif %}\n\n{% if 'snapchat_ads' in enabled_packages %}\nsnapchat_ads as (\n\n {{ get_query(\n platform='snapchat_ads', \n report_type='ad_group', \n field_mapping={\n 'account_id': 'ad_account_id',\n 'account_name': 'ad_account_name',\n 'ad_group_id': 'ad_squad_id',\n 'ad_group_name': 'ad_squad_name',\n 'clicks':'swipes',\n 'conversions': 'total_conversions',\n 'conversions_value': 'conversion_purchases_value'\n },\n relation=ref('snapchat_ads__ad_squad_report')\n ) }}\n), \n{% endif %}\n\n{% if 'tiktok_ads' in enabled_packages %}\ntiktok_ads as (\n\n {{ get_query(\n platform='tiktok_ads', \n report_type='ad_group', \n field_mapping={\n 'account_id': 'advertiser_id',\n 'account_name': 'advertiser_name',\n 'conversions': 'conversion',\n 'conversions_value': 'total_conversion_value'\n },\n relation=ref('tiktok_ads__ad_group_report')\n ) }}\n), \n{% endif %}\n\n{% if 'twitter_ads' in enabled_packages %}\ntwitter_ads as (\n\n {{ get_query(\n platform='twitter_ads', \n report_type='ad_group', \n field_mapping={\n 'ad_group_id': 'line_item_id',\n 'ad_group_name': 'line_item_name',\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_sale_amount'\n },\n relation=ref('twitter_ads__line_item_report')\n ) }}\n), \n{% endif %}\n\n{% if 'amazon_ads' in enabled_packages %}\namazon_ads as (\n\n {{ get_query(\n platform='amazon_ads', \n report_type='ad_group', \n field_mapping={\n 'spend': 'cost',\n 'conversions': 'purchases_30_d',\n 'conversions_value': 'sales_30_d'\n },\n relation=ref('amazon_ads__ad_group_report')\n ) }}\n), \n{% endif %}\n\n{% if 'reddit_ads' in enabled_packages %}\nreddit_ads as (\n\n {{ get_query(\n platform='reddit_ads', \n report_type='ad_group', \n field_mapping={\n 'account_name': 'null',\n 'conversions_value': 'total_value'\n },\n relation=ref('reddit_ads__ad_group_report')\n ) }}\n),\n{% endif %}\n\nunioned as (\n\n {{ union_ctes(ctes=enabled_packages)}}\n)\n\nselect *\nfrom unioned", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__ad_group_report", "package": null, "version": null}, {"name": "microsoft_ads__ad_group_report", "package": null, "version": null}, {"name": "apple_search_ads__ad_group_report", "package": null, "version": null}, {"name": "linkedin_ads__campaign_report", "package": null, "version": null}, {"name": "facebook_ads__ad_set_report", "package": null, "version": null}, {"name": "pinterest_ads__ad_group_report", "package": null, "version": null}, {"name": "snapchat_ads__ad_squad_report", "package": null, "version": null}, {"name": "tiktok_ads__ad_group_report", "package": null, "version": null}, {"name": "twitter_ads__line_item_report", "package": null, "version": null}, {"name": "amazon_ads__ad_group_report", "package": null, "version": null}, {"name": "reddit_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.get_query", "macro.ad_reporting.union_ctes"], "nodes": ["model.google_ads.google_ads__ad_group_report", "model.microsoft_ads.microsoft_ads__ad_group_report", "model.apple_search_ads.apple_search_ads__ad_group_report", "model.linkedin.linkedin_ads__campaign_report", "model.facebook_ads.facebook_ads__ad_set_report", "model.pinterest.pinterest_ads__ad_group_report", "model.snapchat_ads.snapchat_ads__ad_squad_report", "model.tiktok_ads.tiktok_ads__ad_group_report", "model.twitter_ads.twitter_ads__line_item_report", "model.amazon_ads.amazon_ads__ad_group_report", "model.reddit_ads.reddit_ads__ad_group_report"]}, "compiled_path": "target/compiled/ad_reporting/models/intermediate/int_ad_reporting__ad_group_report.sql", "compiled": true, "compiled_code": "\n\n\nwith\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__ad_group_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__ad_group_report\"\n\n),\n\n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__ad_group_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as ad_group_id\n\n \n ,cast(campaign_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__campaign_report\"\n\n),\n\n\n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_set_id as TEXT) as ad_group_id\n\n \n ,cast(ad_set_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__ad_set_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__ad_group_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(ad_squad_id as TEXT) as ad_group_id\n\n \n ,cast(ad_squad_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__ad_squad_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__ad_group_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(line_item_id as TEXT) as ad_group_id\n\n \n ,cast(line_item_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__line_item_report\"\n\n), \n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__ad_group_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__ad_group_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.int_ad_reporting__account_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "int_ad_reporting__account_report", "resource_type": "model", "package_name": "ad_reporting", "path": "intermediate/int_ad_reporting__account_report.sql", "original_file_path": "models/intermediate/int_ad_reporting__account_report.sql", "unique_id": "model.ad_reporting.int_ad_reporting__account_report", "fqn": ["ad_reporting", "intermediate", "int_ad_reporting__account_report"], "alias": "int_ad_reporting__account_report", "checksum": {"name": "sha256", "checksum": "0888451c5db29c06c94538869fb662db70307f0ea0d25a82974ed3e53bb18809"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450501.27165, "relation_name": null, "raw_code": "{% set enabled_packages = get_enabled_packages() %}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith\n{% for package in ['facebook_ads', 'google_ads', 'microsoft_ads'] %}\n{% if package in enabled_packages %}\n{{ package }} as (\n {{ get_query(\n platform=package,\n report_type='account',\n relation=ref(package ~ '__account_report')\n ) }}\n),\n{% endif %}\n{% endfor %}\n\n{% if 'apple_search_ads' in enabled_packages %}\napple_search_ads as (\n\n {{ get_query(\n platform='apple_search_ads', \n report_type='account', \n field_mapping={\n 'account_id': 'organization_id',\n 'account_name': 'organization_name',\n 'clicks': 'taps',\n 'conversions': 'tap_installs',\n 'conversions_value': 'null'\n },\n relation=ref('apple_search_ads__organization_report')\n ) }}\n),\n{% endif %}\n\n{% if 'linkedin_ads' in enabled_packages %}\nlinkedin_ads as (\n\n {{ get_query(\n platform='linkedin_ads', \n report_type='account', \n field_mapping={\n 'spend': 'cost',\n 'conversions': 'total_conversions',\n 'conversions_value': 'conversion_value_in_local_currency'\n },\n relation=ref('linkedin_ads__account_report')\n ) }}\n),\n{% endif %}\n\n{% if 'pinterest_ads' in enabled_packages %}\npinterest_ads as (\n\n {{ get_query(\n platform='pinterest_ads', \n report_type='account', \n field_mapping={\n 'account_id': 'advertiser_id',\n 'account_name': 'advertiser_name',\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_value'\n },\n relation=ref('pinterest_ads__advertiser_report')\n ) }}\n),\n{% endif %}\n\n{% if 'snapchat_ads' in enabled_packages %}\nsnapchat_ads as (\n\n {{ get_query(\n platform='snapchat_ads', \n report_type='account', \n field_mapping={\n 'account_id': 'ad_account_id',\n 'account_name': 'ad_account_name',\n 'clicks':'swipes',\n 'conversions': 'total_conversions',\n 'conversions_value': 'conversion_purchases_value'\n },\n relation=ref('snapchat_ads__account_report')\n ) }}\n), \n{% endif %}\n\n{% if 'tiktok_ads' in enabled_packages %}\ntiktok_ads as (\n\n {{ get_query(\n platform='tiktok_ads', \n report_type='account', \n field_mapping={\n 'account_id': 'advertiser_id',\n 'account_name': 'advertiser_name',\n 'conversions': 'conversion',\n 'conversions_value': 'total_conversion_value'\n },\n relation=ref('tiktok_ads__advertiser_report')\n ) }}\n), \n{% endif %}\n\n{% if 'twitter_ads' in enabled_packages %}\ntwitter_ads as (\n\n {{ get_query(\n platform='twitter_ads', \n report_type='account', \n field_mapping={\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_sale_amount'\n },\n relation=ref('twitter_ads__account_report')\n ) }}\n),\n{% endif %}\n\n{% if 'amazon_ads' in enabled_packages %}\namazon_ads as (\n\n {{ get_query(\n platform='amazon_ads', \n report_type='account', \n field_mapping={\n 'spend': 'cost',\n 'conversions': 'purchases_30_d',\n 'conversions_value': 'sales_30_d'\n },\n relation=ref('amazon_ads__account_report')\n ) }}\n), \n{% endif %}\n\n{% if 'reddit_ads' in enabled_packages %}\nreddit_ads as (\n\n {{ get_query(\n platform='reddit_ads', \n report_type='account', \n field_mapping={\n 'account_name': 'null',\n 'conversions_value': 'total_value'\n },\n relation=ref('reddit_ads__account_report')\n ) }}\n),\n{% endif %}\n\nunioned as (\n\n {{ union_ctes(ctes=enabled_packages)}}\n)\n\nselect *\nfrom unioned", "doc_blocks": [], "language": "sql", "refs": [{"name": "facebook_ads__account_report", "package": null, "version": null}, {"name": "google_ads__account_report", "package": null, "version": null}, {"name": "microsoft_ads__account_report", "package": null, "version": null}, {"name": "apple_search_ads__organization_report", "package": null, "version": null}, {"name": "linkedin_ads__account_report", "package": null, "version": null}, {"name": "pinterest_ads__advertiser_report", "package": null, "version": null}, {"name": "snapchat_ads__account_report", "package": null, "version": null}, {"name": "tiktok_ads__advertiser_report", "package": null, "version": null}, {"name": "twitter_ads__account_report", "package": null, "version": null}, {"name": "amazon_ads__account_report", "package": null, "version": null}, {"name": "reddit_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.get_query", "macro.ad_reporting.union_ctes"], "nodes": ["model.facebook_ads.facebook_ads__account_report", "model.google_ads.google_ads__account_report", "model.microsoft_ads.microsoft_ads__account_report", "model.apple_search_ads.apple_search_ads__organization_report", "model.linkedin.linkedin_ads__account_report", "model.pinterest.pinterest_ads__advertiser_report", "model.snapchat_ads.snapchat_ads__account_report", "model.tiktok_ads.tiktok_ads__advertiser_report", "model.twitter_ads.twitter_ads__account_report", "model.amazon_ads.amazon_ads__account_report", "model.reddit_ads.reddit_ads__account_report"]}, "compiled_path": "target/compiled/ad_reporting/models/intermediate/int_ad_reporting__account_report.sql", "compiled": true, "compiled_code": "\n\n\nwith\n\n\nfacebook_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__account_report\"\n\n),\n\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__account_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__account_report\"\n\n),\n\n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__organization_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__account_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__advertiser_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__account_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__advertiser_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__account_report\"\n\n),\n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__account_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__account_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.int_ad_reporting__monthly_campaign_region_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "int_ad_reporting__monthly_campaign_region_report", "resource_type": "model", "package_name": "ad_reporting", "path": "intermediate/int_ad_reporting__monthly_campaign_region_report.sql", "original_file_path": "models/intermediate/int_ad_reporting__monthly_campaign_region_report.sql", "unique_id": "model.ad_reporting.int_ad_reporting__monthly_campaign_region_report", "fqn": ["ad_reporting", "intermediate", "int_ad_reporting__monthly_campaign_region_report"], "alias": "int_ad_reporting__monthly_campaign_region_report", "checksum": {"name": "sha256", "checksum": "b25f2a0f68c0aa291121032a4c6ecc278b9dd3ee41428ccd82a1ca270e82e3f7"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450501.3250966, "relation_name": null, "raw_code": "{% set include_list = [] %}\n{% do include_list.append('facebook_ads') if var('facebook_ads__using_demographics_region', false) %}\n{% do include_list.append('linkedin_ads') if var('linkedin_ads__using_geo', true) and var('linkedin_ads__using_monthly_ad_analytics_by_member_region', true) %}\n{% do include_list.append('microsoft_ads') if var('microsoft_ads__using_geographic_daily_report', false) %}\n{% do include_list.append('pinterest_ads') if var('pinterest__using_pin_promotion_targeting_report', true) and var('pinterest__using_targeting_geo_region', true) %}\n{% do include_list.append('snapchat_ads') if var('snapchat_ads__using_campaign_region_report', false) %}\n{% do include_list.append('twitter_ads') if var('twitter_ads__using_campaign_regions_report', false) %}\n\n{% set enabled_packages = get_enabled_packages(include=include_list) %}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith \n{% if 'facebook_ads' in enabled_packages %}\nfacebook_ads as (\n\n {{ get_query(\n platform='facebook_ads', \n report_type='region', \n field_mapping={\n 'campaign_id': 'null',\n 'campaign_name': \"'Account-level'\",\n 'conversions_value': 'null'\n },\n relation=ref('facebook_ads__region_report')\n ) }}\n),\n{% endif %}\n\n{% if 'linkedin_ads' in enabled_packages %}\nlinkedin_ads as (\n\n {{ get_query(\n platform='linkedin_ads', \n report_type='region', \n field_mapping={\n 'campaign_id': 'campaign_group_id',\n 'campaign_name': 'campaign_group_name',\n 'spend': 'cost',\n 'conversions': 'total_conversions',\n 'conversions_value': 'conversion_value_in_local_currency',\n 'region': 'region_name'\n },\n relation=ref('linkedin_ads__monthly_campaign_region_report')\n ) }}\n),\n{% endif %}\n\n{% if 'microsoft_ads' in enabled_packages %}\nmicrosoft_ads as (\n\n {{ get_query(\n platform='microsoft_ads', \n report_type='region',\n relation=ref('microsoft_ads__campaign_region_report')\n ) }}\n),\n{% endif %}\n\n{% if 'pinterest_ads' in enabled_packages %}\npinterest_ads as (\n\n {{ get_query(\n platform='pinterest_ads', \n report_type='region', \n field_mapping={\n 'account_id': 'advertiser_id',\n 'account_name': 'advertiser_name',\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_value',\n 'region': 'region_name'\n },\n relation=ref('pinterest_ads__campaign_region_report')\n ) }}\n),\n{% endif %}\n\n{% if 'snapchat_ads' in enabled_packages %}\nsnapchat_ads as (\n\n {{ get_query(\n platform='snapchat_ads', \n report_type='region', \n field_mapping={\n 'account_id': 'ad_account_id',\n 'account_name': 'ad_account_name',\n 'clicks':'swipes',\n 'conversions': 'total_conversions',\n 'conversions_value': 'conversion_purchases_value',\n 'region': \"replace(region, 'UNKNOWN', 'Unknown')\"\n },\n relation=ref('snapchat_ads__campaign_region_report')\n ) }}\n),\n{% endif %}\n\n{% if 'twitter_ads' in enabled_packages %}\ntwitter_ads as (\n\n {{ get_query(\n platform='twitter_ads', \n report_type='region', \n field_mapping={\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_sale_amount'\n },\n relation=ref('twitter_ads__campaign_region_report')\n ) }}\n),\n{% endif %}\n\nunioned as (\n\n {{ union_ctes(ctes=enabled_packages) }}\n)\n\nselect *\nfrom unioned", "doc_blocks": [], "language": "sql", "refs": [{"name": "facebook_ads__region_report", "package": null, "version": null}, {"name": "linkedin_ads__monthly_campaign_region_report", "package": null, "version": null}, {"name": "microsoft_ads__campaign_region_report", "package": null, "version": null}, {"name": "pinterest_ads__campaign_region_report", "package": null, "version": null}, {"name": "snapchat_ads__campaign_region_report", "package": null, "version": null}, {"name": "twitter_ads__campaign_region_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.get_query", "macro.ad_reporting.union_ctes"], "nodes": ["model.facebook_ads.facebook_ads__region_report", "model.linkedin.linkedin_ads__monthly_campaign_region_report", "model.microsoft_ads.microsoft_ads__campaign_region_report", "model.pinterest.pinterest_ads__campaign_region_report", "model.snapchat_ads.snapchat_ads__campaign_region_report", "model.twitter_ads.twitter_ads__campaign_region_report"]}, "compiled_path": "target/compiled/ad_reporting/models/intermediate/int_ad_reporting__monthly_campaign_region_report.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n\n\n\n\nwith \n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(null as TEXT) as campaign_id\n\n \n ,cast('Account-level' as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__region_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_month)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region_name as TEXT) as region\n\n \n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__monthly_campaign_region_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_region_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region_name as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_region_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(replace(region, 'UNKNOWN', 'Unknown') as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_region_report\"\n\n),\n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_region_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from facebook_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from twitter_ads\n\n\n\n\n)\n\nselect *\nfrom unioned", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.int_ad_reporting__country_mapping": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "int_ad_reporting__country_mapping", "resource_type": "model", "package_name": "ad_reporting", "path": "intermediate/utils/int_ad_reporting__country_mapping.sql", "original_file_path": "models/intermediate/utils/int_ad_reporting__country_mapping.sql", "unique_id": "model.ad_reporting.int_ad_reporting__country_mapping", "fqn": ["ad_reporting", "intermediate", "utils", "int_ad_reporting__country_mapping"], "alias": "int_ad_reporting__country_mapping", "checksum": {"name": "sha256", "checksum": "79c0fa52a1c1be3d360f10450fd5c55be983a737907b610a84c71bcae2b7cf9d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450501.3697515, "relation_name": null, "raw_code": "{% set include_list = [] %}\n{% do include_list.append('facebook_ads') if var('facebook_ads__using_demographics_country', false) %}\n{% do include_list.append('linkedin_ads') if var('linkedin_ads__using_geo', true) and var('linkedin_ads__using_monthly_ad_analytics_by_member_country', true) %}\n{% do include_list.append('microsoft_ads') if var('microsoft_ads__using_geographic_daily_report', false) %}\n{% do include_list.append('pinterest_ads') if var('pinterest__using_pin_promotion_targeting_report', true) and var('pinterest__using_targeting_geo', true) %}\n{% do include_list.append('reddit_ads') if var('reddit_ads__using_campaign_country_report', true) %}\n{% do include_list.append('snapchat_ads') if var('snapchat_ads__using_campaign_country_report', false) %}\n{% do include_list.append('tiktok_ads') if var('tiktok_ads__using_campaign_country_report', true) %}\n{% do include_list.append('twitter_ads') if var('twitter_ads__using_campaign_locations_report', false) %}\n\n{% set enabled_packages = get_enabled_packages(include=include_list)%}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\n{% set country_mapping = [\n {'country_name': 'Afghanistan', 'alternative_country_name': '', 'country_code': 'AF', 'global_region': 'Southern Asia'},\n {'country_name': '\u00c5land Islands', 'alternative_country_name': '', 'country_code': 'AX', 'global_region': 'Northern Europe'},\n {'country_name': 'Albania', 'alternative_country_name': '', 'country_code': 'AL', 'global_region': 'Southern Europe'},\n {'country_name': 'Algeria', 'alternative_country_name': '', 'country_code': 'DZ', 'global_region': 'Northern Africa'},\n {'country_name': 'American Samoa', 'alternative_country_name': '', 'country_code': 'AS', 'global_region': 'Polynesia'},\n {'country_name': 'Andorra', 'alternative_country_name': '', 'country_code': 'AD', 'global_region': 'Southern Europe'},\n {'country_name': 'Angola', 'alternative_country_name': '', 'country_code': 'AO', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Anguilla', 'alternative_country_name': '', 'country_code': 'AI', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Antarctica', 'alternative_country_name': '', 'country_code': 'AQ', 'global_region': ''},\n {'country_name': 'Antigua and Barbuda', 'alternative_country_name': '', 'country_code': 'AG', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Argentina', 'alternative_country_name': '', 'country_code': 'AR', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Armenia', 'alternative_country_name': '', 'country_code': 'AM', 'global_region': 'Western Asia'},\n {'country_name': 'Aruba', 'alternative_country_name': '', 'country_code': 'AW', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Australia', 'alternative_country_name': '', 'country_code': 'AU', 'global_region': 'Australia and New Zealand'},\n {'country_name': 'Austria', 'alternative_country_name': '', 'country_code': 'AT', 'global_region': 'Western Europe'},\n {'country_name': 'Azerbaijan', 'alternative_country_name': '', 'country_code': 'AZ', 'global_region': 'Western Asia'},\n {'country_name': 'Bahamas', 'alternative_country_name': '', 'country_code': 'BS', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Bahrain', 'alternative_country_name': '', 'country_code': 'BH', 'global_region': 'Western Asia'},\n {'country_name': 'Bangladesh', 'alternative_country_name': '', 'country_code': 'BD', 'global_region': 'Southern Asia'},\n {'country_name': 'Barbados', 'alternative_country_name': '', 'country_code': 'BB', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Belarus', 'alternative_country_name': '', 'country_code': 'BY', 'global_region': 'Eastern Europe'},\n {'country_name': 'Belgium', 'alternative_country_name': '', 'country_code': 'BE', 'global_region': 'Western Europe'},\n {'country_name': 'Belize', 'alternative_country_name': '', 'country_code': 'BZ', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Benin', 'alternative_country_name': '', 'country_code': 'BJ', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Bermuda', 'alternative_country_name': '', 'country_code': 'BM', 'global_region': 'Northern America'},\n {'country_name': 'Bhutan', 'alternative_country_name': '', 'country_code': 'BT', 'global_region': 'Southern Asia'},\n {'country_name': 'Bolivia (Plurinational State of)', 'alternative_country_name': 'Bolivia', 'country_code': 'BO', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Bonaire, Sint Eustatius and Saba', 'alternative_country_name': '', 'country_code': 'BQ', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Bosnia and Herzegovina', 'alternative_country_name': '', 'country_code': 'BA', 'global_region': 'Southern Europe'},\n {'country_name': 'Botswana', 'alternative_country_name': '', 'country_code': 'BW', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Bouvet Island', 'alternative_country_name': '', 'country_code': 'BV', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Brazil', 'alternative_country_name': '', 'country_code': 'BR', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'British Indian Ocean Territory', 'alternative_country_name': '', 'country_code': 'IO', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Brunei Darussalam', 'alternative_country_name': 'Brunei', 'country_code': 'BN', 'global_region': 'South-eastern Asia'},\n {'country_name': 'Bulgaria', 'alternative_country_name': '', 'country_code': 'BG', 'global_region': 'Eastern Europe'},\n {'country_name': 'Burkina Faso', 'alternative_country_name': '', 'country_code': 'BF', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Burundi', 'alternative_country_name': '', 'country_code': 'BI', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Cabo Verde', 'alternative_country_name': 'Cape Verde', 'country_code': 'CV', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Cambodia', 'alternative_country_name': '', 'country_code': 'KH', 'global_region': 'South-eastern Asia'},\n {'country_name': 'Cameroon', 'alternative_country_name': '', 'country_code': 'CM', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Canada', 'alternative_country_name': '', 'country_code': 'CA', 'global_region': 'Northern America'},\n {'country_name': 'Cayman Islands', 'alternative_country_name': '', 'country_code': 'KY', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Central African Republic', 'alternative_country_name': '', 'country_code': 'CF', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Chad', 'alternative_country_name': '', 'country_code': 'TD', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Chile', 'alternative_country_name': '', 'country_code': 'CL', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'China', 'alternative_country_name': '', 'country_code': 'CN', 'global_region': 'Eastern Asia'},\n {'country_name': 'Christmas Island', 'alternative_country_name': '', 'country_code': 'CX', 'global_region': 'Australia and New Zealand'},\n {'country_name': 'Cocos (Keeling) Islands', 'alternative_country_name': '', 'country_code': 'CC', 'global_region': 'Australia and New Zealand'},\n {'country_name': 'Colombia', 'alternative_country_name': '', 'country_code': 'CO', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Comoros', 'alternative_country_name': '', 'country_code': 'KM', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Congo', 'alternative_country_name': 'Republic of the Congo', 'country_code': 'CG', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Congo, Democratic Republic of the', 'alternative_country_name': 'Democratic Republic of the Congo', 'country_code': 'CD', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Cook Islands', 'alternative_country_name': '', 'country_code': 'CK', 'global_region': 'Polynesia'},\n {'country_name': 'Costa Rica', 'alternative_country_name': '', 'country_code': 'CR', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': \"C\u00f4te d'Ivoire\", 'alternative_country_name': \"Cote d'Ivoire\", 'country_code': 'CI', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Croatia', 'alternative_country_name': '', 'country_code': 'HR', 'global_region': 'Southern Europe'},\n {'country_name': 'Cuba', 'alternative_country_name': '', 'country_code': 'CU', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Cura\u00e7ao', 'alternative_country_name': '', 'country_code': 'CW', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Cyprus', 'alternative_country_name': '', 'country_code': 'CY', 'global_region': 'Western Asia'},\n {'country_name': 'Czechia', 'alternative_country_name': 'Czech Republic', 'country_code': 'CZ', 'global_region': 'Eastern Europe'},\n {'country_name': 'Denmark', 'alternative_country_name': '', 'country_code': 'DK', 'global_region': 'Northern Europe'},\n {'country_name': 'Djibouti', 'alternative_country_name': '', 'country_code': 'DJ', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Dominica', 'alternative_country_name': '', 'country_code': 'DM', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Dominican Republic', 'alternative_country_name': '', 'country_code': 'DO', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Ecuador', 'alternative_country_name': '', 'country_code': 'EC', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Egypt', 'alternative_country_name': '', 'country_code': 'EG', 'global_region': 'Northern Africa'},\n {'country_name': 'El Salvador', 'alternative_country_name': '', 'country_code': 'SV', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Equatorial Guinea', 'alternative_country_name': '', 'country_code': 'GQ', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Eritrea', 'alternative_country_name': '', 'country_code': 'ER', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Estonia', 'alternative_country_name': '', 'country_code': 'EE', 'global_region': 'Northern Europe'},\n {'country_name': 'Eswatini', 'alternative_country_name': '', 'country_code': 'SZ', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Ethiopia', 'alternative_country_name': '', 'country_code': 'ET', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Falkland Islands (Malvinas)', 'alternative_country_name': '', 'country_code': 'FK', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Faroe Islands', 'alternative_country_name': '', 'country_code': 'FO', 'global_region': 'Northern Europe'},\n {'country_name': 'Fiji', 'alternative_country_name': '', 'country_code': 'FJ', 'global_region': 'Melanesia'},\n {'country_name': 'Finland', 'alternative_country_name': '', 'country_code': 'FI', 'global_region': 'Northern Europe'},\n {'country_name': 'France', 'alternative_country_name': '', 'country_code': 'FR', 'global_region': 'Western Europe'},\n {'country_name': 'French Guiana', 'alternative_country_name': '', 'country_code': 'GF', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'French Polynesia', 'alternative_country_name': '', 'country_code': 'PF', 'global_region': 'Polynesia'},\n {'country_name': 'French Southern Territories', 'alternative_country_name': '', 'country_code': 'TF', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Gabon', 'alternative_country_name': '', 'country_code': 'GA', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Gambia', 'alternative_country_name': '', 'country_code': 'GM', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Georgia', 'alternative_country_name': '', 'country_code': 'GE', 'global_region': 'Western Asia'},\n {'country_name': 'Germany', 'alternative_country_name': '', 'country_code': 'DE', 'global_region': 'Western Europe'},\n {'country_name': 'Ghana', 'alternative_country_name': '', 'country_code': 'GH', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Gibraltar', 'alternative_country_name': '', 'country_code': 'GI', 'global_region': 'Southern Europe'},\n {'country_name': 'Greece', 'alternative_country_name': '', 'country_code': 'GR', 'global_region': 'Southern Europe'},\n {'country_name': 'Greenland', 'alternative_country_name': '', 'country_code': 'GL', 'global_region': 'Northern America'},\n {'country_name': 'Grenada', 'alternative_country_name': '', 'country_code': 'GD', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Guadeloupe', 'alternative_country_name': '', 'country_code': 'GP', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Guam', 'alternative_country_name': '', 'country_code': 'GU', 'global_region': 'Micronesia'},\n {'country_name': 'Guatemala', 'alternative_country_name': '', 'country_code': 'GT', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Guernsey', 'alternative_country_name': '', 'country_code': 'GG', 'global_region': 'Northern Europe'},\n {'country_name': 'Guinea', 'alternative_country_name': '', 'country_code': 'GN', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Guinea-Bissau', 'alternative_country_name': '', 'country_code': 'GW', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Guyana', 'alternative_country_name': '', 'country_code': 'GY', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Haiti', 'alternative_country_name': '', 'country_code': 'HT', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Heard Island and McDonald Islands', 'alternative_country_name': '', 'country_code': 'HM', 'global_region': 'Australia and New Zealand'},\n {'country_name': 'Holy See', 'alternative_country_name': '', 'country_code': 'VA', 'global_region': 'Southern Europe'},\n {'country_name': 'Honduras', 'alternative_country_name': '', 'country_code': 'HN', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Hong Kong', 'alternative_country_name': 'Hong Kong SAR China', 'country_code': 'HK', 'global_region': 'Eastern Asia'},\n {'country_name': 'Hungary', 'alternative_country_name': '', 'country_code': 'HU', 'global_region': 'Eastern Europe'},\n {'country_name': 'Iceland', 'alternative_country_name': '', 'country_code': 'IS', 'global_region': 'Northern Europe'},\n {'country_name': 'India', 'alternative_country_name': '', 'country_code': 'IN', 'global_region': 'Southern Asia'},\n {'country_name': 'Indonesia', 'alternative_country_name': '', 'country_code': 'ID', 'global_region': 'South-eastern Asia'},\n {'country_name': 'Iran (Islamic Republic of)', 'alternative_country_name': 'Iran', 'country_code': 'IR', 'global_region': 'Southern Asia'},\n {'country_name': 'Iraq', 'alternative_country_name': '', 'country_code': 'IQ', 'global_region': 'Western Asia'},\n {'country_name': 'Ireland', 'alternative_country_name': '', 'country_code': 'IE', 'global_region': 'Northern Europe'},\n {'country_name': 'Isle of Man', 'alternative_country_name': '', 'country_code': 'IM', 'global_region': 'Northern Europe'},\n {'country_name': 'Israel', 'alternative_country_name': '', 'country_code': 'IL', 'global_region': 'Western Asia'},\n {'country_name': 'Italy', 'alternative_country_name': '', 'country_code': 'IT', 'global_region': 'Southern Europe'},\n {'country_name': 'Jamaica', 'alternative_country_name': '', 'country_code': 'JM', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Japan', 'alternative_country_name': '', 'country_code': 'JP', 'global_region': 'Eastern Asia'},\n {'country_name': 'Jersey', 'alternative_country_name': '', 'country_code': 'JE', 'global_region': 'Northern Europe'},\n {'country_name': 'Jordan', 'alternative_country_name': '', 'country_code': 'JO', 'global_region': 'Western Asia'},\n {'country_name': 'Kazakhstan', 'alternative_country_name': '', 'country_code': 'KZ', 'global_region': 'Central Asia'},\n {'country_name': 'Kenya', 'alternative_country_name': '', 'country_code': 'KE', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Kiribati', 'alternative_country_name': '', 'country_code': 'KI', 'global_region': 'Micronesia'},\n {'country_name': \"Korea (Democratic People's Republic of)\", 'alternative_country_name': '', 'country_code': 'KP', 'global_region': 'Eastern Asia'},\n {'country_name': 'Korea, Republic of', 'alternative_country_name': 'South Korea', 'country_code': 'KR', 'global_region': 'Eastern Asia'},\n {'country_name': 'Kuwait', 'alternative_country_name': '', 'country_code': 'KW', 'global_region': 'Western Asia'},\n {'country_name': 'Kyrgyzstan', 'alternative_country_name': '', 'country_code': 'KG', 'global_region': 'Central Asia'},\n {'country_name': \"Lao People's Democratic Republic\", 'alternative_country_name': 'Laos', 'country_code': 'LA', 'global_region': 'South-eastern Asia'},\n {'country_name': 'Latvia', 'alternative_country_name': '', 'country_code': 'LV', 'global_region': 'Northern Europe'},\n {'country_name': 'Lebanon', 'alternative_country_name': '', 'country_code': 'LB', 'global_region': 'Western Asia'},\n {'country_name': 'Lesotho', 'alternative_country_name': '', 'country_code': 'LS', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Liberia', 'alternative_country_name': '', 'country_code': 'LR', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Libya', 'alternative_country_name': '', 'country_code': 'LY', 'global_region': 'Northern Africa'},\n {'country_name': 'Liechtenstein', 'alternative_country_name': '', 'country_code': 'LI', 'global_region': 'Western Europe'},\n {'country_name': 'Lithuania', 'alternative_country_name': '', 'country_code': 'LT', 'global_region': 'Northern Europe'},\n {'country_name': 'Luxembourg', 'alternative_country_name': '', 'country_code': 'LU', 'global_region': 'Western Europe'},\n {'country_name': 'Macao', 'alternative_country_name': 'Macau', 'country_code': 'MO', 'global_region': 'Eastern Asia'},\n {'country_name': 'Madagascar', 'alternative_country_name': '', 'country_code': 'MG', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Malawi', 'alternative_country_name': '', 'country_code': 'MW', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Malaysia', 'alternative_country_name': '', 'country_code': 'MY', 'global_region': 'South-eastern Asia'},\n {'country_name': 'Maldives', 'alternative_country_name': '', 'country_code': 'MV', 'global_region': 'Southern Asia'},\n {'country_name': 'Mali', 'alternative_country_name': '', 'country_code': 'ML', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Malta', 'alternative_country_name': '', 'country_code': 'MT', 'global_region': 'Southern Europe'},\n {'country_name': 'Marshall Islands', 'alternative_country_name': '', 'country_code': 'MH', 'global_region': 'Micronesia'},\n {'country_name': 'Martinique', 'alternative_country_name': '', 'country_code': 'MQ', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Mauritania', 'alternative_country_name': '', 'country_code': 'MR', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Mauritius', 'alternative_country_name': '', 'country_code': 'MU', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Mayotte', 'alternative_country_name': '', 'country_code': 'YT', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Mexico', 'alternative_country_name': '', 'country_code': 'MX', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Micronesia (Federated States of)', 'alternative_country_name': 'Micronesia', 'country_code': 'FM', 'global_region': 'Micronesia'},\n {'country_name': 'Moldova, Republic of', 'alternative_country_name': 'Moldova', 'country_code': 'MD', 'global_region': 'Eastern Europe'},\n {'country_name': 'Monaco', 'alternative_country_name': '', 'country_code': 'MC', 'global_region': 'Western Europe'},\n {'country_name': 'Mongolia', 'alternative_country_name': '', 'country_code': 'MN', 'global_region': 'Eastern Asia'},\n {'country_name': 'Montenegro', 'alternative_country_name': '', 'country_code': 'ME', 'global_region': 'Southern Europe'},\n {'country_name': 'Montserrat', 'alternative_country_name': '', 'country_code': 'MS', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Morocco', 'alternative_country_name': '', 'country_code': 'MA', 'global_region': 'Northern Africa'},\n {'country_name': 'Mozambique', 'alternative_country_name': '', 'country_code': 'MZ', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Myanmar', 'alternative_country_name': '', 'country_code': 'MM', 'global_region': 'South-eastern Asia'},\n {'country_name': 'Namibia', 'alternative_country_name': '', 'country_code': '', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Nauru', 'alternative_country_name': '', 'country_code': 'NR', 'global_region': 'Micronesia'},\n {'country_name': 'Nepal', 'alternative_country_name': '', 'country_code': 'NP', 'global_region': 'Southern Asia'},\n {'country_name': 'Netherlands (Kingdom of the)', 'alternative_country_name': 'Netherlands', 'country_code': 'NL', 'global_region': 'Western Europe'},\n {'country_name': 'New Caledonia', 'alternative_country_name': '', 'country_code': 'NC', 'global_region': 'Melanesia'},\n {'country_name': 'New Zealand', 'alternative_country_name': '', 'country_code': 'NZ', 'global_region': 'Australia and New Zealand'},\n {'country_name': 'Nicaragua', 'alternative_country_name': '', 'country_code': 'NI', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Niger', 'alternative_country_name': '', 'country_code': 'NE', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Nigeria', 'alternative_country_name': '', 'country_code': 'NG', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Niue', 'alternative_country_name': '', 'country_code': 'NU', 'global_region': 'Polynesia'},\n {'country_name': 'Norfolk Island', 'alternative_country_name': '', 'country_code': 'NF', 'global_region': 'Australia and New Zealand'},\n {'country_name': 'North Macedonia', 'alternative_country_name': '', 'country_code': 'MK', 'global_region': 'Southern Europe'},\n {'country_name': 'Northern Mariana Islands', 'alternative_country_name': '', 'country_code': 'MP', 'global_region': 'Micronesia'},\n {'country_name': 'Norway', 'alternative_country_name': '', 'country_code': 'NO', 'global_region': 'Northern Europe'},\n {'country_name': 'Oman', 'alternative_country_name': '', 'country_code': 'OM', 'global_region': 'Western Asia'},\n {'country_name': 'Pakistan', 'alternative_country_name': '', 'country_code': 'PK', 'global_region': 'Southern Asia'},\n {'country_name': 'Palau', 'alternative_country_name': '', 'country_code': 'PW', 'global_region': 'Micronesia'},\n {'country_name': 'Palestine, State of', 'alternative_country_name': '', 'country_code': 'PS', 'global_region': 'Western Asia'},\n {'country_name': 'Panama', 'alternative_country_name': '', 'country_code': 'PA', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Papua New Guinea', 'alternative_country_name': '', 'country_code': 'PG', 'global_region': 'Melanesia'},\n {'country_name': 'Paraguay', 'alternative_country_name': '', 'country_code': 'PY', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Peru', 'alternative_country_name': '', 'country_code': 'PE', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Philippines', 'alternative_country_name': '', 'country_code': 'PH', 'global_region': 'South-eastern Asia'},\n {'country_name': 'Pitcairn', 'alternative_country_name': '', 'country_code': 'PN', 'global_region': 'Polynesia'},\n {'country_name': 'Poland', 'alternative_country_name': '', 'country_code': 'PL', 'global_region': 'Eastern Europe'},\n {'country_name': 'Portugal', 'alternative_country_name': '', 'country_code': 'PT', 'global_region': 'Southern Europe'},\n {'country_name': 'Puerto Rico', 'alternative_country_name': '', 'country_code': 'PR', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Qatar', 'alternative_country_name': '', 'country_code': 'QA', 'global_region': 'Western Asia'},\n {'country_name': 'R\u00e9union', 'alternative_country_name': 'Reunion', 'country_code': 'RE', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Romania', 'alternative_country_name': '', 'country_code': 'RO', 'global_region': 'Eastern Europe'},\n {'country_name': 'Russian Federation', 'alternative_country_name': 'Russia', 'country_code': 'RU', 'global_region': 'Eastern Europe'},\n {'country_name': 'Rwanda', 'alternative_country_name': '', 'country_code': 'RW', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Saint Barth\u00e9lemy', 'alternative_country_name': 'St. Barth\u00e9lemy', 'country_code': 'BL', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Saint Helena, Ascension and Tristan da Cunha', 'alternative_country_name': 'St. Helena, Ascension and Tristan da Cunha', 'country_code': 'SH', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Saint Kitts and Nevis', 'alternative_country_name': 'St. Kitts and Nevis', 'country_code': 'KN', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Saint Lucia', 'alternative_country_name': 'St. Lucia', 'country_code': 'LC', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Saint Martin (French part)', 'alternative_country_name': 'St. Martin (French part)', 'country_code': 'MF', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Saint Pierre and Miquelon', 'alternative_country_name': 'St. Pierre and Miquelon', 'country_code': 'PM', 'global_region': 'Northern America'},\n {'country_name': 'Saint Vincent and the Grenadines', 'alternative_country_name': 'St. Vincent and the Grenadines', 'country_code': 'VC', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Samoa', 'alternative_country_name': '', 'country_code': 'WS', 'global_region': 'Polynesia'},\n {'country_name': 'San Marino', 'alternative_country_name': '', 'country_code': 'SM', 'global_region': 'Southern Europe'},\n {'country_name': 'Sao Tome and Principe', 'alternative_country_name': 'S\u00e3o Tom\u00e9 and Principe', 'country_code': 'ST', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Saudi Arabia', 'alternative_country_name': '', 'country_code': 'SA', 'global_region': 'Western Asia'},\n {'country_name': 'Senegal', 'alternative_country_name': '', 'country_code': 'SN', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Serbia', 'alternative_country_name': '', 'country_code': 'RS', 'global_region': 'Southern Europe'},\n {'country_name': 'Seychelles', 'alternative_country_name': '', 'country_code': 'SC', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Sierra Leone', 'alternative_country_name': '', 'country_code': 'SL', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Singapore', 'alternative_country_name': '', 'country_code': 'SG', 'global_region': 'South-eastern Asia'},\n {'country_name': 'Sint Maarten (Dutch part)', 'alternative_country_name': '', 'country_code': 'SX', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Slovakia', 'alternative_country_name': '', 'country_code': 'SK', 'global_region': 'Eastern Europe'},\n {'country_name': 'Slovenia', 'alternative_country_name': '', 'country_code': 'SI', 'global_region': 'Southern Europe'},\n {'country_name': 'Solomon Islands', 'alternative_country_name': '', 'country_code': 'SB', 'global_region': 'Melanesia'},\n {'country_name': 'Somalia', 'alternative_country_name': '', 'country_code': 'SO', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'South Africa', 'alternative_country_name': '', 'country_code': 'ZA', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'South Georgia and the South Sandwich Islands', 'alternative_country_name': '', 'country_code': 'GS', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'South Sudan', 'alternative_country_name': '', 'country_code': 'SS', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Spain', 'alternative_country_name': '', 'country_code': 'ES', 'global_region': 'Southern Europe'},\n {'country_name': 'Sri Lanka', 'alternative_country_name': '', 'country_code': 'LK', 'global_region': 'Southern Asia'},\n {'country_name': 'Sudan', 'alternative_country_name': '', 'country_code': 'SD', 'global_region': 'Northern Africa'},\n {'country_name': 'Suriname', 'alternative_country_name': '', 'country_code': 'SR', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Svalbard and Jan Mayen', 'alternative_country_name': '', 'country_code': 'SJ', 'global_region': 'Northern Europe'},\n {'country_name': 'Sweden', 'alternative_country_name': '', 'country_code': 'SE', 'global_region': 'Northern Europe'},\n {'country_name': 'Switzerland', 'alternative_country_name': '', 'country_code': 'CH', 'global_region': 'Western Europe'},\n {'country_name': 'Syrian Arab Republic', 'alternative_country_name': '', 'country_code': 'SY', 'global_region': 'Western Asia'},\n {'country_name': 'Taiwan, Province of China', 'alternative_country_name': 'Taiwan', 'country_code': 'TW', 'global_region': 'Eastern Asia'},\n {'country_name': 'Tajikistan', 'alternative_country_name': '', 'country_code': 'TJ', 'global_region': 'Central Asia'},\n {'country_name': 'Tanzania, United Republic of', 'alternative_country_name': 'Tanzania', 'country_code': 'TZ', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Thailand', 'alternative_country_name': '', 'country_code': 'TH', 'global_region': 'South-eastern Asia'},\n {'country_name': 'Timor-Leste', 'alternative_country_name': '', 'country_code': 'TL', 'global_region': 'South-eastern Asia'},\n {'country_name': 'Togo', 'alternative_country_name': '', 'country_code': 'TG', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Tokelau', 'alternative_country_name': '', 'country_code': 'TK', 'global_region': 'Polynesia'},\n {'country_name': 'Tonga', 'alternative_country_name': '', 'country_code': 'TO', 'global_region': 'Polynesia'},\n {'country_name': 'Trinidad and Tobago', 'alternative_country_name': '', 'country_code': 'TT', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Tunisia', 'alternative_country_name': '', 'country_code': 'TN', 'global_region': 'Northern Africa'},\n {'country_name': 'T\u00fcrkiye', 'alternative_country_name': 'Turkey', 'country_code': 'TR', 'global_region': 'Western Asia'},\n {'country_name': 'Turkmenistan', 'alternative_country_name': '', 'country_code': 'TM', 'global_region': 'Central Asia'},\n {'country_name': 'Turks and Caicos Islands', 'alternative_country_name': '', 'country_code': 'TC', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Tuvalu', 'alternative_country_name': '', 'country_code': 'TV', 'global_region': 'Polynesia'},\n {'country_name': 'Uganda', 'alternative_country_name': '', 'country_code': 'UG', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Ukraine', 'alternative_country_name': '', 'country_code': 'UA', 'global_region': 'Eastern Europe'},\n {'country_name': 'United Arab Emirates', 'alternative_country_name': '', 'country_code': 'AE', 'global_region': 'Western Asia'},\n {'country_name': 'United Kingdom of Great Britain and Northern Ireland', 'alternative_country_name': 'United Kingdom', 'country_code': 'GB', 'global_region': 'Northern Europe'},\n {'country_name': 'United States of America', 'alternative_country_name': 'United States', 'country_code': 'US', 'global_region': 'Northern America'},\n {'country_name': 'United States Minor Outlying Islands', 'alternative_country_name': '', 'country_code': 'UM', 'global_region': 'Micronesia'},\n {'country_name': 'Uruguay', 'alternative_country_name': '', 'country_code': 'UY', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Uzbekistan', 'alternative_country_name': '', 'country_code': 'UZ', 'global_region': 'Central Asia'},\n {'country_name': 'Vanuatu', 'alternative_country_name': '', 'country_code': 'VU', 'global_region': 'Melanesia'},\n {'country_name': 'Venezuela (Bolivarian Republic of)', 'alternative_country_name': 'Venezuela', 'country_code': 'VE', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Viet Nam', 'alternative_country_name': 'Vietnam', 'country_code': 'VN', 'global_region': 'South-eastern Asia'},\n {'country_name': 'Virgin Islands (British)', 'alternative_country_name': 'British Virgin Islands', 'country_code': 'VG', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Virgin Islands (U.S.)', 'alternative_country_name': '', 'country_code': 'VI', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Wallis and Futuna', 'alternative_country_name': '', 'country_code': 'WF', 'global_region': 'Polynesia'},\n {'country_name': 'Western Sahara', 'alternative_country_name': '', 'country_code': 'EH', 'global_region': 'Northern Africa'},\n {'country_name': 'Yemen', 'alternative_country_name': '', 'country_code': 'YE', 'global_region': 'Western Asia'},\n {'country_name': 'Zambia', 'alternative_country_name': '', 'country_code': 'ZM', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Zimbabwe', 'alternative_country_name': '', 'country_code': 'ZW', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Kosovo', 'alternative_country_name': '', 'country_code': 'XK', 'global_region': 'Southern Europe'},\n {'country_name': 'Unknown', 'alternative_country_name': '', 'country_code': 'Unknown', 'global_region': 'Unknown'}\n] %}\n\n{# \nPostgres requires double single quotes '' to escape a single quote in a string\nThe other warehouses use a backslash \\ to escape a single quote in a string\n#}\n\nwith create_country_mapping as (\n {%- for country in country_mapping %}\n select\n '{{ country.country_name | replace(\"'\", \"\\\\'\") if target.type != \"postgres\" else country.country_name | replace(\"'\", \"''\") }}' as country_name,\n '{{ country.alternative_country_name | replace(\"'\", \"\\\\'\") if target.type != \"postgres\" else country.alternative_country_name | replace(\"'\", \"''\") }}' as alternative_country_name,\n '{{ country.country_code }}' as country_code,\n '{{ country.global_region }}' as global_region\n\n {% if not loop.last %} union all {% endif %}\n {% endfor %}\n), \n\nfinal as (\n\n select \n country_name,\n case when alternative_country_name = '' then null else alternative_country_name end as alternative_country_name,\n country_code,\n global_region\n from create_country_mapping\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled"], "nodes": []}, "compiled_path": "target/compiled/ad_reporting/models/intermediate/utils/int_ad_reporting__country_mapping.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nwith create_country_mapping as (\n select\n 'Afghanistan' as country_name,\n '' as alternative_country_name,\n 'AF' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n '\u00c5land Islands' as country_name,\n '' as alternative_country_name,\n 'AX' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Albania' as country_name,\n '' as alternative_country_name,\n 'AL' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Algeria' as country_name,\n '' as alternative_country_name,\n 'DZ' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'American Samoa' as country_name,\n '' as alternative_country_name,\n 'AS' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Andorra' as country_name,\n '' as alternative_country_name,\n 'AD' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Angola' as country_name,\n '' as alternative_country_name,\n 'AO' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Anguilla' as country_name,\n '' as alternative_country_name,\n 'AI' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Antarctica' as country_name,\n '' as alternative_country_name,\n 'AQ' as country_code,\n '' as global_region\n\n union all \n \n select\n 'Antigua and Barbuda' as country_name,\n '' as alternative_country_name,\n 'AG' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Argentina' as country_name,\n '' as alternative_country_name,\n 'AR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Armenia' as country_name,\n '' as alternative_country_name,\n 'AM' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Aruba' as country_name,\n '' as alternative_country_name,\n 'AW' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Australia' as country_name,\n '' as alternative_country_name,\n 'AU' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Austria' as country_name,\n '' as alternative_country_name,\n 'AT' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Azerbaijan' as country_name,\n '' as alternative_country_name,\n 'AZ' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Bahamas' as country_name,\n '' as alternative_country_name,\n 'BS' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Bahrain' as country_name,\n '' as alternative_country_name,\n 'BH' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Bangladesh' as country_name,\n '' as alternative_country_name,\n 'BD' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Barbados' as country_name,\n '' as alternative_country_name,\n 'BB' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Belarus' as country_name,\n '' as alternative_country_name,\n 'BY' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Belgium' as country_name,\n '' as alternative_country_name,\n 'BE' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Belize' as country_name,\n '' as alternative_country_name,\n 'BZ' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Benin' as country_name,\n '' as alternative_country_name,\n 'BJ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Bermuda' as country_name,\n '' as alternative_country_name,\n 'BM' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'Bhutan' as country_name,\n '' as alternative_country_name,\n 'BT' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Bolivia (Plurinational State of)' as country_name,\n 'Bolivia' as alternative_country_name,\n 'BO' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Bonaire, Sint Eustatius and Saba' as country_name,\n '' as alternative_country_name,\n 'BQ' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Bosnia and Herzegovina' as country_name,\n '' as alternative_country_name,\n 'BA' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Botswana' as country_name,\n '' as alternative_country_name,\n 'BW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Bouvet Island' as country_name,\n '' as alternative_country_name,\n 'BV' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Brazil' as country_name,\n '' as alternative_country_name,\n 'BR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'British Indian Ocean Territory' as country_name,\n '' as alternative_country_name,\n 'IO' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Brunei Darussalam' as country_name,\n 'Brunei' as alternative_country_name,\n 'BN' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Bulgaria' as country_name,\n '' as alternative_country_name,\n 'BG' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Burkina Faso' as country_name,\n '' as alternative_country_name,\n 'BF' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Burundi' as country_name,\n '' as alternative_country_name,\n 'BI' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Cabo Verde' as country_name,\n 'Cape Verde' as alternative_country_name,\n 'CV' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Cambodia' as country_name,\n '' as alternative_country_name,\n 'KH' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Cameroon' as country_name,\n '' as alternative_country_name,\n 'CM' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Canada' as country_name,\n '' as alternative_country_name,\n 'CA' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'Cayman Islands' as country_name,\n '' as alternative_country_name,\n 'KY' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Central African Republic' as country_name,\n '' as alternative_country_name,\n 'CF' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Chad' as country_name,\n '' as alternative_country_name,\n 'TD' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Chile' as country_name,\n '' as alternative_country_name,\n 'CL' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'China' as country_name,\n '' as alternative_country_name,\n 'CN' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Christmas Island' as country_name,\n '' as alternative_country_name,\n 'CX' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Cocos (Keeling) Islands' as country_name,\n '' as alternative_country_name,\n 'CC' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Colombia' as country_name,\n '' as alternative_country_name,\n 'CO' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Comoros' as country_name,\n '' as alternative_country_name,\n 'KM' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Congo' as country_name,\n 'Republic of the Congo' as alternative_country_name,\n 'CG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Congo, Democratic Republic of the' as country_name,\n 'Democratic Republic of the Congo' as alternative_country_name,\n 'CD' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Cook Islands' as country_name,\n '' as alternative_country_name,\n 'CK' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Costa Rica' as country_name,\n '' as alternative_country_name,\n 'CR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'C\u00f4te d''Ivoire' as country_name,\n 'Cote d''Ivoire' as alternative_country_name,\n 'CI' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Croatia' as country_name,\n '' as alternative_country_name,\n 'HR' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Cuba' as country_name,\n '' as alternative_country_name,\n 'CU' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Cura\u00e7ao' as country_name,\n '' as alternative_country_name,\n 'CW' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Cyprus' as country_name,\n '' as alternative_country_name,\n 'CY' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Czechia' as country_name,\n 'Czech Republic' as alternative_country_name,\n 'CZ' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Denmark' as country_name,\n '' as alternative_country_name,\n 'DK' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Djibouti' as country_name,\n '' as alternative_country_name,\n 'DJ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Dominica' as country_name,\n '' as alternative_country_name,\n 'DM' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Dominican Republic' as country_name,\n '' as alternative_country_name,\n 'DO' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Ecuador' as country_name,\n '' as alternative_country_name,\n 'EC' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Egypt' as country_name,\n '' as alternative_country_name,\n 'EG' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'El Salvador' as country_name,\n '' as alternative_country_name,\n 'SV' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Equatorial Guinea' as country_name,\n '' as alternative_country_name,\n 'GQ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Eritrea' as country_name,\n '' as alternative_country_name,\n 'ER' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Estonia' as country_name,\n '' as alternative_country_name,\n 'EE' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Eswatini' as country_name,\n '' as alternative_country_name,\n 'SZ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Ethiopia' as country_name,\n '' as alternative_country_name,\n 'ET' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Falkland Islands (Malvinas)' as country_name,\n '' as alternative_country_name,\n 'FK' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Faroe Islands' as country_name,\n '' as alternative_country_name,\n 'FO' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Fiji' as country_name,\n '' as alternative_country_name,\n 'FJ' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'Finland' as country_name,\n '' as alternative_country_name,\n 'FI' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'France' as country_name,\n '' as alternative_country_name,\n 'FR' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'French Guiana' as country_name,\n '' as alternative_country_name,\n 'GF' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'French Polynesia' as country_name,\n '' as alternative_country_name,\n 'PF' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'French Southern Territories' as country_name,\n '' as alternative_country_name,\n 'TF' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Gabon' as country_name,\n '' as alternative_country_name,\n 'GA' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Gambia' as country_name,\n '' as alternative_country_name,\n 'GM' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Georgia' as country_name,\n '' as alternative_country_name,\n 'GE' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Germany' as country_name,\n '' as alternative_country_name,\n 'DE' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Ghana' as country_name,\n '' as alternative_country_name,\n 'GH' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Gibraltar' as country_name,\n '' as alternative_country_name,\n 'GI' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Greece' as country_name,\n '' as alternative_country_name,\n 'GR' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Greenland' as country_name,\n '' as alternative_country_name,\n 'GL' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'Grenada' as country_name,\n '' as alternative_country_name,\n 'GD' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Guadeloupe' as country_name,\n '' as alternative_country_name,\n 'GP' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Guam' as country_name,\n '' as alternative_country_name,\n 'GU' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Guatemala' as country_name,\n '' as alternative_country_name,\n 'GT' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Guernsey' as country_name,\n '' as alternative_country_name,\n 'GG' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Guinea' as country_name,\n '' as alternative_country_name,\n 'GN' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Guinea-Bissau' as country_name,\n '' as alternative_country_name,\n 'GW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Guyana' as country_name,\n '' as alternative_country_name,\n 'GY' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Haiti' as country_name,\n '' as alternative_country_name,\n 'HT' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Heard Island and McDonald Islands' as country_name,\n '' as alternative_country_name,\n 'HM' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Holy See' as country_name,\n '' as alternative_country_name,\n 'VA' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Honduras' as country_name,\n '' as alternative_country_name,\n 'HN' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Hong Kong' as country_name,\n 'Hong Kong SAR China' as alternative_country_name,\n 'HK' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Hungary' as country_name,\n '' as alternative_country_name,\n 'HU' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Iceland' as country_name,\n '' as alternative_country_name,\n 'IS' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'India' as country_name,\n '' as alternative_country_name,\n 'IN' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Indonesia' as country_name,\n '' as alternative_country_name,\n 'ID' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Iran (Islamic Republic of)' as country_name,\n 'Iran' as alternative_country_name,\n 'IR' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Iraq' as country_name,\n '' as alternative_country_name,\n 'IQ' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Ireland' as country_name,\n '' as alternative_country_name,\n 'IE' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Isle of Man' as country_name,\n '' as alternative_country_name,\n 'IM' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Israel' as country_name,\n '' as alternative_country_name,\n 'IL' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Italy' as country_name,\n '' as alternative_country_name,\n 'IT' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Jamaica' as country_name,\n '' as alternative_country_name,\n 'JM' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Japan' as country_name,\n '' as alternative_country_name,\n 'JP' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Jersey' as country_name,\n '' as alternative_country_name,\n 'JE' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Jordan' as country_name,\n '' as alternative_country_name,\n 'JO' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Kazakhstan' as country_name,\n '' as alternative_country_name,\n 'KZ' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Kenya' as country_name,\n '' as alternative_country_name,\n 'KE' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Kiribati' as country_name,\n '' as alternative_country_name,\n 'KI' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Korea (Democratic People''s Republic of)' as country_name,\n '' as alternative_country_name,\n 'KP' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Korea, Republic of' as country_name,\n 'South Korea' as alternative_country_name,\n 'KR' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Kuwait' as country_name,\n '' as alternative_country_name,\n 'KW' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Kyrgyzstan' as country_name,\n '' as alternative_country_name,\n 'KG' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Lao People''s Democratic Republic' as country_name,\n 'Laos' as alternative_country_name,\n 'LA' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Latvia' as country_name,\n '' as alternative_country_name,\n 'LV' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Lebanon' as country_name,\n '' as alternative_country_name,\n 'LB' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Lesotho' as country_name,\n '' as alternative_country_name,\n 'LS' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Liberia' as country_name,\n '' as alternative_country_name,\n 'LR' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Libya' as country_name,\n '' as alternative_country_name,\n 'LY' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'Liechtenstein' as country_name,\n '' as alternative_country_name,\n 'LI' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Lithuania' as country_name,\n '' as alternative_country_name,\n 'LT' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Luxembourg' as country_name,\n '' as alternative_country_name,\n 'LU' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Macao' as country_name,\n 'Macau' as alternative_country_name,\n 'MO' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Madagascar' as country_name,\n '' as alternative_country_name,\n 'MG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Malawi' as country_name,\n '' as alternative_country_name,\n 'MW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Malaysia' as country_name,\n '' as alternative_country_name,\n 'MY' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Maldives' as country_name,\n '' as alternative_country_name,\n 'MV' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Mali' as country_name,\n '' as alternative_country_name,\n 'ML' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Malta' as country_name,\n '' as alternative_country_name,\n 'MT' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Marshall Islands' as country_name,\n '' as alternative_country_name,\n 'MH' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Martinique' as country_name,\n '' as alternative_country_name,\n 'MQ' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Mauritania' as country_name,\n '' as alternative_country_name,\n 'MR' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Mauritius' as country_name,\n '' as alternative_country_name,\n 'MU' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Mayotte' as country_name,\n '' as alternative_country_name,\n 'YT' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Mexico' as country_name,\n '' as alternative_country_name,\n 'MX' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Micronesia (Federated States of)' as country_name,\n 'Micronesia' as alternative_country_name,\n 'FM' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Moldova, Republic of' as country_name,\n 'Moldova' as alternative_country_name,\n 'MD' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Monaco' as country_name,\n '' as alternative_country_name,\n 'MC' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Mongolia' as country_name,\n '' as alternative_country_name,\n 'MN' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Montenegro' as country_name,\n '' as alternative_country_name,\n 'ME' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Montserrat' as country_name,\n '' as alternative_country_name,\n 'MS' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Morocco' as country_name,\n '' as alternative_country_name,\n 'MA' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'Mozambique' as country_name,\n '' as alternative_country_name,\n 'MZ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Myanmar' as country_name,\n '' as alternative_country_name,\n 'MM' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Namibia' as country_name,\n '' as alternative_country_name,\n '' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Nauru' as country_name,\n '' as alternative_country_name,\n 'NR' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Nepal' as country_name,\n '' as alternative_country_name,\n 'NP' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Netherlands (Kingdom of the)' as country_name,\n 'Netherlands' as alternative_country_name,\n 'NL' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'New Caledonia' as country_name,\n '' as alternative_country_name,\n 'NC' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'New Zealand' as country_name,\n '' as alternative_country_name,\n 'NZ' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Nicaragua' as country_name,\n '' as alternative_country_name,\n 'NI' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Niger' as country_name,\n '' as alternative_country_name,\n 'NE' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Nigeria' as country_name,\n '' as alternative_country_name,\n 'NG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Niue' as country_name,\n '' as alternative_country_name,\n 'NU' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Norfolk Island' as country_name,\n '' as alternative_country_name,\n 'NF' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'North Macedonia' as country_name,\n '' as alternative_country_name,\n 'MK' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Northern Mariana Islands' as country_name,\n '' as alternative_country_name,\n 'MP' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Norway' as country_name,\n '' as alternative_country_name,\n 'NO' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Oman' as country_name,\n '' as alternative_country_name,\n 'OM' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Pakistan' as country_name,\n '' as alternative_country_name,\n 'PK' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Palau' as country_name,\n '' as alternative_country_name,\n 'PW' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Palestine, State of' as country_name,\n '' as alternative_country_name,\n 'PS' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Panama' as country_name,\n '' as alternative_country_name,\n 'PA' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Papua New Guinea' as country_name,\n '' as alternative_country_name,\n 'PG' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'Paraguay' as country_name,\n '' as alternative_country_name,\n 'PY' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Peru' as country_name,\n '' as alternative_country_name,\n 'PE' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Philippines' as country_name,\n '' as alternative_country_name,\n 'PH' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Pitcairn' as country_name,\n '' as alternative_country_name,\n 'PN' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Poland' as country_name,\n '' as alternative_country_name,\n 'PL' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Portugal' as country_name,\n '' as alternative_country_name,\n 'PT' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Puerto Rico' as country_name,\n '' as alternative_country_name,\n 'PR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Qatar' as country_name,\n '' as alternative_country_name,\n 'QA' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'R\u00e9union' as country_name,\n 'Reunion' as alternative_country_name,\n 'RE' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Romania' as country_name,\n '' as alternative_country_name,\n 'RO' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Russian Federation' as country_name,\n 'Russia' as alternative_country_name,\n 'RU' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Rwanda' as country_name,\n '' as alternative_country_name,\n 'RW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Saint Barth\u00e9lemy' as country_name,\n 'St. Barth\u00e9lemy' as alternative_country_name,\n 'BL' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Saint Helena, Ascension and Tristan da Cunha' as country_name,\n 'St. Helena, Ascension and Tristan da Cunha' as alternative_country_name,\n 'SH' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Saint Kitts and Nevis' as country_name,\n 'St. Kitts and Nevis' as alternative_country_name,\n 'KN' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Saint Lucia' as country_name,\n 'St. Lucia' as alternative_country_name,\n 'LC' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Saint Martin (French part)' as country_name,\n 'St. Martin (French part)' as alternative_country_name,\n 'MF' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Saint Pierre and Miquelon' as country_name,\n 'St. Pierre and Miquelon' as alternative_country_name,\n 'PM' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'Saint Vincent and the Grenadines' as country_name,\n 'St. Vincent and the Grenadines' as alternative_country_name,\n 'VC' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Samoa' as country_name,\n '' as alternative_country_name,\n 'WS' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'San Marino' as country_name,\n '' as alternative_country_name,\n 'SM' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Sao Tome and Principe' as country_name,\n 'S\u00e3o Tom\u00e9 and Principe' as alternative_country_name,\n 'ST' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Saudi Arabia' as country_name,\n '' as alternative_country_name,\n 'SA' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Senegal' as country_name,\n '' as alternative_country_name,\n 'SN' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Serbia' as country_name,\n '' as alternative_country_name,\n 'RS' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Seychelles' as country_name,\n '' as alternative_country_name,\n 'SC' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Sierra Leone' as country_name,\n '' as alternative_country_name,\n 'SL' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Singapore' as country_name,\n '' as alternative_country_name,\n 'SG' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Sint Maarten (Dutch part)' as country_name,\n '' as alternative_country_name,\n 'SX' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Slovakia' as country_name,\n '' as alternative_country_name,\n 'SK' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Slovenia' as country_name,\n '' as alternative_country_name,\n 'SI' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Solomon Islands' as country_name,\n '' as alternative_country_name,\n 'SB' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'Somalia' as country_name,\n '' as alternative_country_name,\n 'SO' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'South Africa' as country_name,\n '' as alternative_country_name,\n 'ZA' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'South Georgia and the South Sandwich Islands' as country_name,\n '' as alternative_country_name,\n 'GS' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'South Sudan' as country_name,\n '' as alternative_country_name,\n 'SS' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Spain' as country_name,\n '' as alternative_country_name,\n 'ES' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Sri Lanka' as country_name,\n '' as alternative_country_name,\n 'LK' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Sudan' as country_name,\n '' as alternative_country_name,\n 'SD' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'Suriname' as country_name,\n '' as alternative_country_name,\n 'SR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Svalbard and Jan Mayen' as country_name,\n '' as alternative_country_name,\n 'SJ' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Sweden' as country_name,\n '' as alternative_country_name,\n 'SE' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Switzerland' as country_name,\n '' as alternative_country_name,\n 'CH' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Syrian Arab Republic' as country_name,\n '' as alternative_country_name,\n 'SY' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Taiwan, Province of China' as country_name,\n 'Taiwan' as alternative_country_name,\n 'TW' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Tajikistan' as country_name,\n '' as alternative_country_name,\n 'TJ' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Tanzania, United Republic of' as country_name,\n 'Tanzania' as alternative_country_name,\n 'TZ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Thailand' as country_name,\n '' as alternative_country_name,\n 'TH' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Timor-Leste' as country_name,\n '' as alternative_country_name,\n 'TL' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Togo' as country_name,\n '' as alternative_country_name,\n 'TG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Tokelau' as country_name,\n '' as alternative_country_name,\n 'TK' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Tonga' as country_name,\n '' as alternative_country_name,\n 'TO' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Trinidad and Tobago' as country_name,\n '' as alternative_country_name,\n 'TT' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Tunisia' as country_name,\n '' as alternative_country_name,\n 'TN' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'T\u00fcrkiye' as country_name,\n 'Turkey' as alternative_country_name,\n 'TR' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Turkmenistan' as country_name,\n '' as alternative_country_name,\n 'TM' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Turks and Caicos Islands' as country_name,\n '' as alternative_country_name,\n 'TC' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Tuvalu' as country_name,\n '' as alternative_country_name,\n 'TV' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Uganda' as country_name,\n '' as alternative_country_name,\n 'UG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Ukraine' as country_name,\n '' as alternative_country_name,\n 'UA' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'United Arab Emirates' as country_name,\n '' as alternative_country_name,\n 'AE' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'United Kingdom of Great Britain and Northern Ireland' as country_name,\n 'United Kingdom' as alternative_country_name,\n 'GB' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'United States of America' as country_name,\n 'United States' as alternative_country_name,\n 'US' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'United States Minor Outlying Islands' as country_name,\n '' as alternative_country_name,\n 'UM' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Uruguay' as country_name,\n '' as alternative_country_name,\n 'UY' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Uzbekistan' as country_name,\n '' as alternative_country_name,\n 'UZ' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Vanuatu' as country_name,\n '' as alternative_country_name,\n 'VU' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'Venezuela (Bolivarian Republic of)' as country_name,\n 'Venezuela' as alternative_country_name,\n 'VE' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Viet Nam' as country_name,\n 'Vietnam' as alternative_country_name,\n 'VN' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Virgin Islands (British)' as country_name,\n 'British Virgin Islands' as alternative_country_name,\n 'VG' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Virgin Islands (U.S.)' as country_name,\n '' as alternative_country_name,\n 'VI' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Wallis and Futuna' as country_name,\n '' as alternative_country_name,\n 'WF' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Western Sahara' as country_name,\n '' as alternative_country_name,\n 'EH' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'Yemen' as country_name,\n '' as alternative_country_name,\n 'YE' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Zambia' as country_name,\n '' as alternative_country_name,\n 'ZM' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Zimbabwe' as country_name,\n '' as alternative_country_name,\n 'ZW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Kosovo' as country_name,\n '' as alternative_country_name,\n 'XK' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Unknown' as country_name,\n '' as alternative_country_name,\n 'Unknown' as country_code,\n 'Unknown' as global_region\n\n \n \n), \n\nfinal as (\n\n select \n country_name,\n case when alternative_country_name = '' then null else alternative_country_name end as alternative_country_name,\n country_code,\n global_region\n from create_country_mapping\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.metricflow_time_spine": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "metricflow_time_spine", "resource_type": "model", "package_name": "ad_reporting", "path": "semantic_models/metricflow_time_spine.sql", "original_file_path": "models/semantic_models/metricflow_time_spine.sql", "unique_id": "model.ad_reporting.metricflow_time_spine", "fqn": ["ad_reporting", "semantic_models", "metricflow_time_spine"], "alias": "metricflow_time_spine", "checksum": {"name": "sha256", "checksum": "e34af24277da865ee1d3e4f5f7934421f4e02bdfb744f69db208b85fb7e604f3"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Metricflow time spine", "columns": {"date_day": {"name": "date_day", "description": "", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": "day", "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "ad_reporting://models/semantic_models/ad_reporting__ad_report.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.4895182, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"metricflow_time_spine\"", "raw_code": "{{ config(enabled=var('ad_reporting__metricflow_time_spine_enabled', True)) }}\nwith \n\ndays as (\n {{ ad_reporting.fivetran_get_base_dates(n_dateparts=365*10, datepart=\"day\") }}\n\n),\n\ncast_to_date as (\n\n select \n cast(date_day as date) as date_day\n \n from days\n\n)\n\nselect * from cast_to_date", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.fivetran_get_base_dates"], "nodes": []}, "compiled_path": "target/compiled/ad_reporting/models/semantic_models/metricflow_time_spine.sql", "compiled": true, "compiled_code": "\nwith \n\ndays as (\n with\n date_spine as (\n\n \n\n \n with\n rawdata as (\n\n \n\n \n\n with\n p as (\n select 0 as generated_number\n union all\n select 1\n ),\n unioned as (\n\n select\n\n \n p0.generated_number * power(2, 0)\n + \n \n p1.generated_number * power(2, 1)\n + \n \n p2.generated_number * power(2, 2)\n + \n \n p3.generated_number * power(2, 3)\n + \n \n p4.generated_number * power(2, 4)\n + \n \n p5.generated_number * power(2, 5)\n + \n \n p6.generated_number * power(2, 6)\n + \n \n p7.generated_number * power(2, 7)\n + \n \n p8.generated_number * power(2, 8)\n + \n \n p9.generated_number * power(2, 9)\n + \n \n p10.generated_number * power(2, 10)\n + \n \n p11.generated_number * power(2, 11)\n \n \n + 1 as generated_number\n\n from\n\n \n p as p0 cross join \n \n p as p1 cross join \n \n p as p2 cross join \n \n p as p3 cross join \n \n p as p4 cross join \n \n p as p5 cross join \n \n p as p6 cross join \n \n p as p7 cross join \n \n p as p8 cross join \n \n p as p9 cross join \n \n p as p10 cross join \n \n p as p11 \n \n\n )\n\n select *\n from unioned\n where generated_number <= 3651\n order by generated_number\n\n\n\n ),\n\n all_periods as (\n\n select\n (\n \n\n \n\n cast(cast(\n cast(now() as timestamp)\n at time zone 'UTC' at time zone 'America/Los_Angeles'\n as timestamp\n ) as date) + ((interval '1 day') * (-3650))\n\n + ((interval '1 day') * ((row_number() over (order by 1) - 1)))\n\n\n ) as date_day\n from rawdata\n\n ),\n\n filtered as (\n\n select * from all_periods where date_day <= cast(\n\n cast(cast(\n cast(now() as timestamp)\n at time zone 'UTC' at time zone 'America/Los_Angeles'\n as timestamp\n ) as date) + ((interval '1 day') * (1))\n\n as date)\n\n )\n\n select *\n from filtered\n\n\n\n )\n select\n cast(d.date_day as timestamp) as date_day\n from date_spine d\n\n\n),\n\ncast_to_date as (\n\n select \n cast(date_day as date) as date_day\n \n from days\n\n)\n\nselect * from cast_to_date", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": {"standard_granularity_column": "date_day", "custom_granularities": []}}, "model.tiktok_ads.tiktok_ads__url_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "tiktok_ads__url_report", "resource_type": "model", "package_name": "tiktok_ads", "path": "tiktok_ads__url_report.sql", "original_file_path": "models/tiktok_ads__url_report.sql", "unique_id": "model.tiktok_ads.tiktok_ads__url_report", "fqn": ["tiktok_ads", "tiktok_ads__url_report"], "alias": "tiktok_ads__url_report", "checksum": {"name": "sha256", "checksum": "111d54116b4eb5bdc6b3e6051a14d0995e745a075025dc614c51e807ce555bf0"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the URL level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "Day of record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_id": {"name": "ad_id", "description": "Ad ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_name": {"name": "ad_name", "description": "Ad name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_name": {"name": "advertiser_name", "description": "Advertiser name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "Advertiser ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the `landing page url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_host": {"name": "url_host", "description": "The URL host of the ad, extracted from the `landing page url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_path": {"name": "url_path", "description": "The URL path of the ad, extracted from the `landing page url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_source": {"name": "utm_source", "description": "The utm_source parameter of the ad, extracted from the `landing page url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_medium": {"name": "utm_medium", "description": "The utm_medium parameter of the ad, extracted from the `landing page url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_campaign": {"name": "utm_campaign", "description": "The utm_campaign parameter of the ad, extracted from the `landing page url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_content": {"name": "utm_content", "description": "The utm_content parameter of the ad, extracted from the `landing page url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_term": {"name": "utm_term", "description": "The utm_term parameter of the ad, extracted from the `landing page url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "audience_type": {"name": "audience_type", "description": "Audience Type", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget": {"name": "budget", "description": "Ad budget. Returns 0.0 when Campaign Budget Optimization (budget_optimize_switch) is on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "category": {"name": "category", "description": "Ad group category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "gender": {"name": "gender", "description": "Gender that you want to target.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Advertiser's currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reach": {"name": "reach", "description": "The number of unique users who saw your ads at least once. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion": {"name": "conversion", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "likes": {"name": "likes", "description": "The number of likes your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "comments": {"name": "comments", "description": "The number of comments your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "The number of shares that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_visits": {"name": "profile_visits", "description": "The number of profile visits that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "follows": {"name": "follows", "description": "The number of follows that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_2_s": {"name": "video_watched_2_s", "description": "The number of times your video played for at least 2 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_6_s": {"name": "video_watched_6_s", "description": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_25": {"name": "video_views_p_25", "description": "The number of times your video was played at 25% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_50": {"name": "video_views_p_50", "description": "The number of times your video was played at 50% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_75": {"name": "video_views_p_75", "description": "The number of times your video was played at 75% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion": {"name": "real_time_conversion", "description": "Number of times your ad resulted in the optimization event you selected.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_purchase_value": {"name": "total_purchase_value", "description": "The total value of purchase events that occurred in your app that were recorded by your measurement partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_sales_lead_value": {"name": "total_sales_lead_value", "description": "The monetary worth or potential value assigned to a lead generated through ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversion_value": {"name": "total_conversion_value", "description": "The accumulated value of `total_purchase_value` and `total_sales_lead_value`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_cpc": {"name": "daily_cpc", "description": "The average amount of money you've spent on a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_cpm": {"name": "daily_cpm", "description": "The average amount of money you've spent per 1,000 impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_ctr": {"name": "daily_ctr", "description": "The percentage of times people saw your ad and performed a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.609987, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__url_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\nwith hourly as (\n \n select *\n from {{ ref('stg_tiktok_ads__ad_report_hourly') }}\n), \n\nads as (\n\n select *\n from {{ ref('stg_tiktok_ads__ad_history') }}\n where is_most_recent_record\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_tiktok_ads__ad_group_history') }}\n where is_most_recent_record\n), \n\nadvertiser as (\n\n select *\n from {{ ref('stg_tiktok_ads__advertiser') }}\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_tiktok_ads__campaign_history') }}\n where is_most_recent_record\n), \n\naggregated as (\n\n select\n hourly.source_relation,\n cast(hourly.stat_time_hour as date) as date_day,\n ad_groups.advertiser_id,\n advertiser.advertiser_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n ad_groups.ad_group_id,\n ad_groups.ad_group_name,\n hourly.ad_id,\n ads.ad_name,\n ads.base_url,\n ads.url_host,\n ads.url_path,\n ads.utm_source,\n ads.utm_medium,\n ads.utm_campaign,\n ads.utm_content,\n ads.utm_term,\n advertiser.currency,\n ad_groups.category,\n ad_groups.gender,\n ad_groups.audience_type,\n ad_groups.budget,\n sum(hourly.impressions) as impressions,\n sum(hourly.clicks) as clicks,\n sum(hourly.spend) as spend,\n sum(hourly.reach) as reach,\n sum(hourly.conversion) as conversion,\n sum(hourly.likes) as likes,\n sum(hourly.comments) as comments,\n sum(hourly.shares) as shares,\n sum(hourly.profile_visits) as profile_visits,\n sum(hourly.follows) as follows,\n sum(hourly.video_watched_2_s) as video_watched_2_s,\n sum(hourly.video_watched_6_s) as video_watched_6_s,\n sum(hourly.video_views_p_25) as video_views_p_25,\n sum(hourly.video_views_p_50) as video_views_p_50, \n sum(hourly.video_views_p_75) as video_views_p_75,\n sum(hourly.real_time_conversion) as real_time_conversion,\n sum(hourly.total_purchase_value) as total_purchase_value,\n sum(hourly.total_sales_lead_value) as total_sales_lead_value,\n sum(hourly.total_purchase_value + hourly.total_sales_lead_value) as total_conversion_value,\n sum(hourly.spend)/nullif(sum(hourly.clicks),0) as daily_cpc,\n (sum(hourly.spend)/nullif(sum(hourly.impressions),0))*1000 as daily_cpm,\n (sum(hourly.clicks)/nullif(sum(hourly.impressions),0))*100 as daily_ctr\n\n {{ tiktok_ads_persist_pass_through_columns(pass_through_variable='tiktok_ads__ad_hourly_passthrough_metrics', identifier='hourly', transform='sum', coalesce_with=0, exclude_fields=['real_time_conversion','total_purchase_value','total_sales_lead_value']) }}\n\n from hourly\n left join ads\n on hourly.ad_id = ads.ad_id\n and hourly.source_relation = ads.source_relation\n left join ad_groups \n on ads.ad_group_id = ad_groups.ad_group_id\n and ads.source_relation = ad_groups.source_relation\n left join advertiser\n on ads.advertiser_id = advertiser.advertiser_id\n and ads.source_relation = advertiser.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n\n {% if var('ad_reporting__url_report__using_null_filter', True) %}\n -- We are filtering for only ads where url fields are populated.\n where ads.landing_page_url is not null\n {% endif %}\n\n {{ dbt_utils.group_by(23) }}\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__ad_report_hourly", "package": null, "version": null}, {"name": "stg_tiktok_ads__ad_history", "package": null, "version": null}, {"name": "stg_tiktok_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_tiktok_ads__advertiser", "package": null, "version": null}, {"name": "stg_tiktok_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.tiktok_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__ad_report_hourly", "model.tiktok_ads.stg_tiktok_ads__ad_history", "model.tiktok_ads.stg_tiktok_ads__ad_group_history", "model.tiktok_ads.stg_tiktok_ads__advertiser", "model.tiktok_ads.stg_tiktok_ads__campaign_history"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads__url_report.sql", "compiled": true, "compiled_code": "\n\nwith hourly as (\n \n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_report_hourly\"\n), \n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_history\"\n where is_most_recent_record\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_group_history\"\n where is_most_recent_record\n), \n\nadvertiser as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__advertiser\"\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_history\"\n where is_most_recent_record\n), \n\naggregated as (\n\n select\n hourly.source_relation,\n cast(hourly.stat_time_hour as date) as date_day,\n ad_groups.advertiser_id,\n advertiser.advertiser_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n ad_groups.ad_group_id,\n ad_groups.ad_group_name,\n hourly.ad_id,\n ads.ad_name,\n ads.base_url,\n ads.url_host,\n ads.url_path,\n ads.utm_source,\n ads.utm_medium,\n ads.utm_campaign,\n ads.utm_content,\n ads.utm_term,\n advertiser.currency,\n ad_groups.category,\n ad_groups.gender,\n ad_groups.audience_type,\n ad_groups.budget,\n sum(hourly.impressions) as impressions,\n sum(hourly.clicks) as clicks,\n sum(hourly.spend) as spend,\n sum(hourly.reach) as reach,\n sum(hourly.conversion) as conversion,\n sum(hourly.likes) as likes,\n sum(hourly.comments) as comments,\n sum(hourly.shares) as shares,\n sum(hourly.profile_visits) as profile_visits,\n sum(hourly.follows) as follows,\n sum(hourly.video_watched_2_s) as video_watched_2_s,\n sum(hourly.video_watched_6_s) as video_watched_6_s,\n sum(hourly.video_views_p_25) as video_views_p_25,\n sum(hourly.video_views_p_50) as video_views_p_50, \n sum(hourly.video_views_p_75) as video_views_p_75,\n sum(hourly.real_time_conversion) as real_time_conversion,\n sum(hourly.total_purchase_value) as total_purchase_value,\n sum(hourly.total_sales_lead_value) as total_sales_lead_value,\n sum(hourly.total_purchase_value + hourly.total_sales_lead_value) as total_conversion_value,\n sum(hourly.spend)/nullif(sum(hourly.clicks),0) as daily_cpc,\n (sum(hourly.spend)/nullif(sum(hourly.impressions),0))*1000 as daily_cpm,\n (sum(hourly.clicks)/nullif(sum(hourly.impressions),0))*100 as daily_ctr\n\n \n\n\n\n\n\n from hourly\n left join ads\n on hourly.ad_id = ads.ad_id\n and hourly.source_relation = ads.source_relation\n left join ad_groups \n on ads.ad_group_id = ad_groups.ad_group_id\n and ads.source_relation = ad_groups.source_relation\n left join advertiser\n on ads.advertiser_id = advertiser.advertiser_id\n and ads.source_relation = advertiser.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n\n \n -- We are filtering for only ads where url fields are populated.\n where ads.landing_page_url is not null\n \n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.tiktok_ads__advertiser_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "tiktok_ads__advertiser_report", "resource_type": "model", "package_name": "tiktok_ads", "path": "tiktok_ads__advertiser_report.sql", "original_file_path": "models/tiktok_ads__advertiser_report.sql", "unique_id": "model.tiktok_ads.tiktok_ads__advertiser_report", "fqn": ["tiktok_ads", "tiktok_ads__advertiser_report"], "alias": "tiktok_ads__advertiser_report", "checksum": {"name": "sha256", "checksum": "7c9f50bf4266f414588d3fe4787002b6a8e28bdf4fbf3d8e4979b42921f4ebeb"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the account level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "Day of record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_name": {"name": "advertiser_name", "description": "Advertiser name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "Advertiser ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Advertiser's currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reach": {"name": "reach", "description": "The number of unique users who saw your ads at least once. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion": {"name": "conversion", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "likes": {"name": "likes", "description": "The number of likes your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "comments": {"name": "comments", "description": "The number of comments your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "The number of shares that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_visits": {"name": "profile_visits", "description": "The number of profile visits that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "follows": {"name": "follows", "description": "The number of follows that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_2_s": {"name": "video_watched_2_s", "description": "The number of times your video played for at least 2 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_6_s": {"name": "video_watched_6_s", "description": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_25": {"name": "video_views_p_25", "description": "The number of times your video was played at 25% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_50": {"name": "video_views_p_50", "description": "The number of times your video was played at 50% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_75": {"name": "video_views_p_75", "description": "The number of times your video was played at 75% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion": {"name": "real_time_conversion", "description": "Number of times your ad resulted in the optimization event you selected.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_purchase_value": {"name": "total_purchase_value", "description": "The total value of purchase events that occurred in your app that were recorded by your measurement partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_sales_lead_value": {"name": "total_sales_lead_value", "description": "The monetary worth or potential value assigned to a lead generated through ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversion_value": {"name": "total_conversion_value", "description": "The accumulated value of `total_purchase_value` and `total_sales_lead_value`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_cpc": {"name": "daily_cpc", "description": "The average amount of money you've spent on a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_cpm": {"name": "daily_cpm", "description": "The average amount of money you've spent per 1,000 impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_ctr": {"name": "daily_ctr", "description": "The percentage of times people saw your ad and performed a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.6002424, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__advertiser_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\nwith hourly as (\n \n select *\n from {{ ref('stg_tiktok_ads__ad_report_hourly') }}\n),\n\nadvertiser as (\n\n select *\n from {{ ref('stg_tiktok_ads__advertiser') }}\n), \n\nads as (\n\n select *\n from {{ ref('stg_tiktok_ads__ad_history') }}\n where is_most_recent_record\n), \n\njoined as (\n\n select\n hourly.source_relation,\n cast(hourly.stat_time_hour as date) as date_day,\n ads.advertiser_id,\n advertiser.advertiser_name,\n advertiser.currency,\n sum(hourly.clicks) as clicks,\n sum(hourly.impressions) as impressions,\n sum(hourly.spend) as spend,\n sum(hourly.reach) as reach,\n sum(hourly.conversion) as conversion,\n sum(hourly.likes) as likes,\n sum(hourly.comments) as comments,\n sum(hourly.shares) as shares,\n sum(hourly.profile_visits) as profile_visits,\n sum(hourly.follows) as follows,\n sum(hourly.video_watched_2_s) as video_watched_2_s, \n sum(hourly.video_watched_6_s) as video_watched_6_s, \n sum(hourly.video_views_p_25) as video_views_p_25, \n sum(hourly.video_views_p_50) as video_views_p_50,\n sum(hourly.video_views_p_75) as video_views_p_75,\n sum(hourly.real_time_conversion) as real_time_conversion,\n sum(hourly.total_purchase_value) as total_purchase_value,\n sum(hourly.total_sales_lead_value) as total_sales_lead_value,\n sum(hourly.total_purchase_value + hourly.total_sales_lead_value) as total_conversion_value,\n sum(hourly.spend)/nullif(sum(hourly.clicks),0) as daily_cpc,\n (sum(hourly.spend)/nullif(sum(hourly.impressions),0))*1000 as daily_cpm,\n (sum(hourly.clicks)/nullif(sum(hourly.impressions),0))*100 as daily_ctr\n\n {{ tiktok_ads_persist_pass_through_columns(pass_through_variable='tiktok_ads__ad_hourly_passthrough_metrics', identifier='hourly', transform='sum', coalesce_with=0, exclude_fields=['real_time_conversion','total_purchase_value','total_sales_lead_value']) }} \n\n from hourly\n left join ads\n on hourly.ad_id = ads.ad_id\n and hourly.source_relation = ads.source_relation\n left join advertiser\n on ads.advertiser_id = advertiser.advertiser_id\n and ads.source_relation = advertiser.source_relation\n {{ dbt_utils.group_by(5) }}\n\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__ad_report_hourly", "package": null, "version": null}, {"name": "stg_tiktok_ads__advertiser", "package": null, "version": null}, {"name": "stg_tiktok_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.tiktok_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__ad_report_hourly", "model.tiktok_ads.stg_tiktok_ads__advertiser", "model.tiktok_ads.stg_tiktok_ads__ad_history"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads__advertiser_report.sql", "compiled": true, "compiled_code": "\n\nwith hourly as (\n \n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_report_hourly\"\n),\n\nadvertiser as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__advertiser\"\n), \n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_history\"\n where is_most_recent_record\n), \n\njoined as (\n\n select\n hourly.source_relation,\n cast(hourly.stat_time_hour as date) as date_day,\n ads.advertiser_id,\n advertiser.advertiser_name,\n advertiser.currency,\n sum(hourly.clicks) as clicks,\n sum(hourly.impressions) as impressions,\n sum(hourly.spend) as spend,\n sum(hourly.reach) as reach,\n sum(hourly.conversion) as conversion,\n sum(hourly.likes) as likes,\n sum(hourly.comments) as comments,\n sum(hourly.shares) as shares,\n sum(hourly.profile_visits) as profile_visits,\n sum(hourly.follows) as follows,\n sum(hourly.video_watched_2_s) as video_watched_2_s, \n sum(hourly.video_watched_6_s) as video_watched_6_s, \n sum(hourly.video_views_p_25) as video_views_p_25, \n sum(hourly.video_views_p_50) as video_views_p_50,\n sum(hourly.video_views_p_75) as video_views_p_75,\n sum(hourly.real_time_conversion) as real_time_conversion,\n sum(hourly.total_purchase_value) as total_purchase_value,\n sum(hourly.total_sales_lead_value) as total_sales_lead_value,\n sum(hourly.total_purchase_value + hourly.total_sales_lead_value) as total_conversion_value,\n sum(hourly.spend)/nullif(sum(hourly.clicks),0) as daily_cpc,\n (sum(hourly.spend)/nullif(sum(hourly.impressions),0))*1000 as daily_cpm,\n (sum(hourly.clicks)/nullif(sum(hourly.impressions),0))*100 as daily_ctr\n\n \n\n\n\n \n\n from hourly\n left join ads\n on hourly.ad_id = ads.ad_id\n and hourly.source_relation = ads.source_relation\n left join advertiser\n on ads.advertiser_id = advertiser.advertiser_id\n and ads.source_relation = advertiser.source_relation\n group by 1,2,3,4,5\n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.tiktok_ads__ad_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "tiktok_ads__ad_report", "resource_type": "model", "package_name": "tiktok_ads", "path": "tiktok_ads__ad_report.sql", "original_file_path": "models/tiktok_ads__ad_report.sql", "unique_id": "model.tiktok_ads.tiktok_ads__ad_report", "fqn": ["tiktok_ads", "tiktok_ads__ad_report"], "alias": "tiktok_ads__ad_report", "checksum": {"name": "sha256", "checksum": "96cdb8811bdb2de448852af698a0c6a326da73d5fb59d10efb15e86ed82b7e54"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the ad level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "Day of record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_id": {"name": "ad_id", "description": "Ad ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_name": {"name": "ad_name", "description": "Ad name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_name": {"name": "advertiser_name", "description": "Advertiser name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "Advertiser ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "audience_type": {"name": "audience_type", "description": "Audience Type", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget": {"name": "budget", "description": "Ad budget. Returns 0.0 when Campaign Budget Optimization (budget_optimize_switch) is on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "category": {"name": "category", "description": "Ad group category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "gender": {"name": "gender", "description": "Gender that you want to target.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Advertiser's currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reach": {"name": "reach", "description": "The number of unique users who saw your ads at least once. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion": {"name": "conversion", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "likes": {"name": "likes", "description": "The number of likes your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "comments": {"name": "comments", "description": "The number of comments your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "The number of shares that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_visits": {"name": "profile_visits", "description": "The number of profile visits that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "follows": {"name": "follows", "description": "The number of follows that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_2_s": {"name": "video_watched_2_s", "description": "The number of times your video played for at least 2 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_6_s": {"name": "video_watched_6_s", "description": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_25": {"name": "video_views_p_25", "description": "The number of times your video was played at 25% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_50": {"name": "video_views_p_50", "description": "The number of times your video was played at 50% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_75": {"name": "video_views_p_75", "description": "The number of times your video was played at 75% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion": {"name": "real_time_conversion", "description": "Number of times your ad resulted in the optimization event you selected.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_purchase_value": {"name": "total_purchase_value", "description": "The total value of purchase events that occurred in your app that were recorded by your measurement partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_sales_lead_value": {"name": "total_sales_lead_value", "description": "The monetary worth or potential value assigned to a lead generated through ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversion_value": {"name": "total_conversion_value", "description": "The accumulated value of `total_purchase_value` and `total_sales_lead_value`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_cpc": {"name": "daily_cpc", "description": "The average amount of money you've spent on a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_cpm": {"name": "daily_cpm", "description": "The average amount of money you've spent per 1,000 impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_ctr": {"name": "daily_ctr", "description": "The percentage of times people saw your ad and performed a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.6034184, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__ad_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\nwith hourly as (\n \n select *\n from {{ ref('stg_tiktok_ads__ad_report_hourly') }}\n), \n\nads as (\n\n select *\n from {{ ref('stg_tiktok_ads__ad_history') }}\n where is_most_recent_record\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_tiktok_ads__ad_group_history') }}\n where is_most_recent_record\n), \n\nadvertiser as (\n\n select *\n from {{ ref('stg_tiktok_ads__advertiser') }}\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_tiktok_ads__campaign_history') }}\n where is_most_recent_record\n),\n\naggregated as (\n\n select\n hourly.source_relation,\n cast(hourly.stat_time_hour as date) as date_day,\n ad_groups.advertiser_id,\n advertiser.advertiser_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n ad_groups.ad_group_id,\n ad_groups.ad_group_name,\n hourly.ad_id,\n ads.ad_name,\n advertiser.currency,\n ad_groups.category,\n ad_groups.gender,\n ad_groups.audience_type,\n ad_groups.budget,\n sum(hourly.impressions) as impressions,\n sum(hourly.clicks) as clicks,\n sum(hourly.spend) as spend,\n sum(hourly.reach) as reach,\n sum(hourly.conversion) as conversion,\n sum(hourly.likes) as likes,\n sum(hourly.comments) as comments,\n sum(hourly.shares) as shares,\n sum(hourly.profile_visits) as profile_visits,\n sum(hourly.follows) as follows,\n sum(hourly.video_watched_2_s) as video_watched_2_s,\n sum(hourly.video_watched_6_s) as video_watched_6_s,\n sum(hourly.video_views_p_25) as video_views_p_25,\n sum(hourly.video_views_p_50) as video_views_p_50, \n sum(hourly.video_views_p_75) as video_views_p_75,\n sum(hourly.real_time_conversion) as real_time_conversion,\n sum(hourly.total_purchase_value) as total_purchase_value,\n sum(hourly.total_sales_lead_value) as total_sales_lead_value,\n sum(hourly.total_purchase_value + hourly.total_sales_lead_value) as total_conversion_value,\n sum(hourly.spend)/nullif(sum(hourly.clicks),0) as daily_cpc,\n (sum(hourly.spend)/nullif(sum(hourly.impressions),0))*1000 as daily_cpm,\n (sum(hourly.clicks)/nullif(sum(hourly.impressions),0))*100 as daily_ctr\n\n {{ tiktok_ads_persist_pass_through_columns(pass_through_variable='tiktok_ads__ad_hourly_passthrough_metrics', identifier='hourly', transform='sum', coalesce_with=0, exclude_fields=['real_time_conversion','total_purchase_value','total_sales_lead_value']) }} \n\n from hourly\n left join ads\n on hourly.ad_id = ads.ad_id\n and hourly.source_relation = ads.source_relation\n left join ad_groups \n on ads.ad_group_id = ad_groups.ad_group_id\n and ads.source_relation = ad_groups.source_relation\n left join advertiser\n on ads.advertiser_id = advertiser.advertiser_id\n and ads.source_relation = advertiser.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n {{ dbt_utils.group_by(15) }}\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__ad_report_hourly", "package": null, "version": null}, {"name": "stg_tiktok_ads__ad_history", "package": null, "version": null}, {"name": "stg_tiktok_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_tiktok_ads__advertiser", "package": null, "version": null}, {"name": "stg_tiktok_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.tiktok_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__ad_report_hourly", "model.tiktok_ads.stg_tiktok_ads__ad_history", "model.tiktok_ads.stg_tiktok_ads__ad_group_history", "model.tiktok_ads.stg_tiktok_ads__advertiser", "model.tiktok_ads.stg_tiktok_ads__campaign_history"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads__ad_report.sql", "compiled": true, "compiled_code": "\n\nwith hourly as (\n \n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_report_hourly\"\n), \n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_history\"\n where is_most_recent_record\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_group_history\"\n where is_most_recent_record\n), \n\nadvertiser as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__advertiser\"\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_history\"\n where is_most_recent_record\n),\n\naggregated as (\n\n select\n hourly.source_relation,\n cast(hourly.stat_time_hour as date) as date_day,\n ad_groups.advertiser_id,\n advertiser.advertiser_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n ad_groups.ad_group_id,\n ad_groups.ad_group_name,\n hourly.ad_id,\n ads.ad_name,\n advertiser.currency,\n ad_groups.category,\n ad_groups.gender,\n ad_groups.audience_type,\n ad_groups.budget,\n sum(hourly.impressions) as impressions,\n sum(hourly.clicks) as clicks,\n sum(hourly.spend) as spend,\n sum(hourly.reach) as reach,\n sum(hourly.conversion) as conversion,\n sum(hourly.likes) as likes,\n sum(hourly.comments) as comments,\n sum(hourly.shares) as shares,\n sum(hourly.profile_visits) as profile_visits,\n sum(hourly.follows) as follows,\n sum(hourly.video_watched_2_s) as video_watched_2_s,\n sum(hourly.video_watched_6_s) as video_watched_6_s,\n sum(hourly.video_views_p_25) as video_views_p_25,\n sum(hourly.video_views_p_50) as video_views_p_50, \n sum(hourly.video_views_p_75) as video_views_p_75,\n sum(hourly.real_time_conversion) as real_time_conversion,\n sum(hourly.total_purchase_value) as total_purchase_value,\n sum(hourly.total_sales_lead_value) as total_sales_lead_value,\n sum(hourly.total_purchase_value + hourly.total_sales_lead_value) as total_conversion_value,\n sum(hourly.spend)/nullif(sum(hourly.clicks),0) as daily_cpc,\n (sum(hourly.spend)/nullif(sum(hourly.impressions),0))*1000 as daily_cpm,\n (sum(hourly.clicks)/nullif(sum(hourly.impressions),0))*100 as daily_ctr\n\n \n\n\n\n \n\n from hourly\n left join ads\n on hourly.ad_id = ads.ad_id\n and hourly.source_relation = ads.source_relation\n left join ad_groups \n on ads.ad_group_id = ad_groups.ad_group_id\n and ads.source_relation = ad_groups.source_relation\n left join advertiser\n on ads.advertiser_id = advertiser.advertiser_id\n and ads.source_relation = advertiser.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.tiktok_ads__ad_group_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "tiktok_ads__ad_group_report", "resource_type": "model", "package_name": "tiktok_ads", "path": "tiktok_ads__ad_group_report.sql", "original_file_path": "models/tiktok_ads__ad_group_report.sql", "unique_id": "model.tiktok_ads.tiktok_ads__ad_group_report", "fqn": ["tiktok_ads", "tiktok_ads__ad_group_report"], "alias": "tiktok_ads__ad_group_report", "checksum": {"name": "sha256", "checksum": "eb74f033f70d89b58811f2c8dba2eeed6ec976cc61f3d92d387385dd60fcd077"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the ad group level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "Day of record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "Advertiser ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_name": {"name": "advertiser_name", "description": "Advertiser name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Advertiser's currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "audience_type": {"name": "audience_type", "description": "Audience Type", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget": {"name": "budget", "description": "Ad budget. Returns 0.0 when Campaign Budget Optimization (budget_optimize_switch) is on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "category": {"name": "category", "description": "Ad group category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "gender": {"name": "gender", "description": "Gender that you want to target.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reach": {"name": "reach", "description": "The number of unique users who saw your ads at least once. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion": {"name": "conversion", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "likes": {"name": "likes", "description": "The number of likes your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "comments": {"name": "comments", "description": "The number of comments your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "The number of shares that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_visits": {"name": "profile_visits", "description": "The number of profile visits that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "follows": {"name": "follows", "description": "The number of follows that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_2_s": {"name": "video_watched_2_s", "description": "The number of times your video played for at least 2 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_6_s": {"name": "video_watched_6_s", "description": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_25": {"name": "video_views_p_25", "description": "The number of times your video was played at 25% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_50": {"name": "video_views_p_50", "description": "The number of times your video was played at 50% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_75": {"name": "video_views_p_75", "description": "The number of times your video was played at 75% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion": {"name": "real_time_conversion", "description": "Number of times your ad resulted in the optimization event you selected.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_purchase_value": {"name": "total_purchase_value", "description": "The total value of purchase events that occurred in your app that were recorded by your measurement partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_sales_lead_value": {"name": "total_sales_lead_value", "description": "The monetary worth or potential value assigned to a lead generated through ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversion_value": {"name": "total_conversion_value", "description": "The accumulated value of `total_purchase_value` and `total_sales_lead_value`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_cpc": {"name": "daily_cpc", "description": "The average amount of money you've spent on a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_cpm": {"name": "daily_cpm", "description": "The average amount of money you've spent per 1,000 impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_ctr": {"name": "daily_ctr", "description": "The percentage of times people saw your ad and performed a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.6055295, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__ad_group_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\nwith hourly as (\n \n select *\n from {{ ref('stg_tiktok_ads__ad_group_report_hourly') }}\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_tiktok_ads__ad_group_history') }}\n where is_most_recent_record\n), \n\nadvertiser as (\n\n select *\n from {{ ref('stg_tiktok_ads__advertiser') }}\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_tiktok_ads__campaign_history') }}\n where is_most_recent_record\n), \n\naggregated as (\n\n select\n hourly.source_relation,\n cast(hourly.stat_time_hour as date) as date_day,\n ad_groups.advertiser_id,\n advertiser.advertiser_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n hourly.ad_group_id,\n ad_groups.ad_group_name,\n advertiser.currency, \n ad_groups.category,\n ad_groups.gender,\n ad_groups.audience_type,\n ad_groups.budget,\n sum(hourly.impressions) as impressions,\n sum(hourly.clicks) as clicks,\n sum(hourly.spend) as spend,\n sum(hourly.reach) as reach,\n sum(hourly.conversion) as conversion,\n sum(hourly.likes) as likes,\n sum(hourly.comments) as comments,\n sum(hourly.shares) as shares,\n sum(hourly.profile_visits) as profile_visits,\n sum(hourly.follows) as follows,\n sum(hourly.video_watched_2_s) as video_watched_2_s,\n sum(hourly.video_watched_6_s) as video_watched_6_s,\n sum(hourly.video_views_p_25) as video_views_p_25,\n sum(hourly.video_views_p_50) as video_views_p_50, \n sum(hourly.video_views_p_75) as video_views_p_75,\n sum(hourly.real_time_conversion) as real_time_conversion,\n sum(hourly.total_purchase_value) as total_purchase_value,\n sum(hourly.total_sales_lead_value) as total_sales_lead_value, \n sum(hourly.total_purchase_value + hourly.total_sales_lead_value) as total_conversion_value, \n sum(hourly.spend)/nullif(sum(hourly.clicks),0) as daily_cpc,\n (sum(hourly.spend)/nullif(sum(hourly.impressions),0))*1000 as daily_cpm,\n (sum(hourly.clicks)/nullif(sum(hourly.impressions),0))*100 as daily_ctr\n \n {{ tiktok_ads_persist_pass_through_columns(pass_through_variable='tiktok_ads__ad_group_hourly_passthrough_metrics', identifier='hourly', transform='sum', coalesce_with=0, exclude_fields=['real_time_conversion','total_purchase_value','total_sales_lead_value']) }} \n\n from hourly\n left join ad_groups \n on hourly.ad_group_id = ad_groups.ad_group_id\n and hourly.source_relation = ad_groups.source_relation\n left join advertiser\n on ad_groups.advertiser_id = advertiser.advertiser_id\n and ad_groups.source_relation = advertiser.source_relation\n left join campaigns\n on ad_groups.campaign_id = campaigns.campaign_id\n and ad_groups.source_relation = campaigns.source_relation\n {{ dbt_utils.group_by(13) }}\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__ad_group_report_hourly", "package": null, "version": null}, {"name": "stg_tiktok_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_tiktok_ads__advertiser", "package": null, "version": null}, {"name": "stg_tiktok_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.tiktok_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly", "model.tiktok_ads.stg_tiktok_ads__ad_group_history", "model.tiktok_ads.stg_tiktok_ads__advertiser", "model.tiktok_ads.stg_tiktok_ads__campaign_history"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads__ad_group_report.sql", "compiled": true, "compiled_code": "\n\nwith hourly as (\n \n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_group_report_hourly\"\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_group_history\"\n where is_most_recent_record\n), \n\nadvertiser as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__advertiser\"\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_history\"\n where is_most_recent_record\n), \n\naggregated as (\n\n select\n hourly.source_relation,\n cast(hourly.stat_time_hour as date) as date_day,\n ad_groups.advertiser_id,\n advertiser.advertiser_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n hourly.ad_group_id,\n ad_groups.ad_group_name,\n advertiser.currency, \n ad_groups.category,\n ad_groups.gender,\n ad_groups.audience_type,\n ad_groups.budget,\n sum(hourly.impressions) as impressions,\n sum(hourly.clicks) as clicks,\n sum(hourly.spend) as spend,\n sum(hourly.reach) as reach,\n sum(hourly.conversion) as conversion,\n sum(hourly.likes) as likes,\n sum(hourly.comments) as comments,\n sum(hourly.shares) as shares,\n sum(hourly.profile_visits) as profile_visits,\n sum(hourly.follows) as follows,\n sum(hourly.video_watched_2_s) as video_watched_2_s,\n sum(hourly.video_watched_6_s) as video_watched_6_s,\n sum(hourly.video_views_p_25) as video_views_p_25,\n sum(hourly.video_views_p_50) as video_views_p_50, \n sum(hourly.video_views_p_75) as video_views_p_75,\n sum(hourly.real_time_conversion) as real_time_conversion,\n sum(hourly.total_purchase_value) as total_purchase_value,\n sum(hourly.total_sales_lead_value) as total_sales_lead_value, \n sum(hourly.total_purchase_value + hourly.total_sales_lead_value) as total_conversion_value, \n sum(hourly.spend)/nullif(sum(hourly.clicks),0) as daily_cpc,\n (sum(hourly.spend)/nullif(sum(hourly.impressions),0))*1000 as daily_cpm,\n (sum(hourly.clicks)/nullif(sum(hourly.impressions),0))*100 as daily_ctr\n \n \n\n\n\n \n\n from hourly\n left join ad_groups \n on hourly.ad_group_id = ad_groups.ad_group_id\n and hourly.source_relation = ad_groups.source_relation\n left join advertiser\n on ad_groups.advertiser_id = advertiser.advertiser_id\n and ad_groups.source_relation = advertiser.source_relation\n left join campaigns\n on ad_groups.campaign_id = campaigns.campaign_id\n and ad_groups.source_relation = campaigns.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.tiktok_ads__campaign_country_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "tiktok_ads__campaign_country_report", "resource_type": "model", "package_name": "tiktok_ads", "path": "tiktok_ads__campaign_country_report.sql", "original_file_path": "models/tiktok_ads__campaign_country_report.sql", "unique_id": "model.tiktok_ads.tiktok_ads__campaign_country_report", "fqn": ["tiktok_ads", "tiktok_ads__campaign_country_report"], "alias": "tiktok_ads__campaign_country_report", "checksum": {"name": "sha256", "checksum": "d087032d06148805138428857c2f6e6f7336f1c048d0ec36f2ae8b7a0aa89ef2"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of a campaign at the country/geographic region level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The reporting date for the campaign data (in YYYY-MM-DD format).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Unique identifier for the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "Name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_type": {"name": "campaign_type", "description": "Type/category of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp when the campaign was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country_code": {"name": "country_code", "description": "Audience country or region code.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "Unique identifier for the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_name": {"name": "advertiser_name", "description": "Name of the advertiser account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Currency in which spend and cost metrics are reported.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective_type": {"name": "objective_type", "description": "Objective type of the campaign (e.g., conversions, traffic).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Current status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "split_test_variable": {"name": "split_test_variable", "description": "Split Test variables. Optional values; TARGETING, BIDDING_OPTIMIZATION, CREATIVE.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget": {"name": "budget", "description": "Total budget allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_mode": {"name": "budget_mode", "description": "Budget pacing mode (e.g., daily, total).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion": {"name": "conversion", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_cpc": {"name": "daily_cpc", "description": "The average amount of money you've spent on a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_cpm": {"name": "daily_cpm", "description": "The average amount of money you've spent per 1,000 impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_ctr": {"name": "daily_ctr", "description": "The percentage of times people saw your ad and performed a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion": {"name": "real_time_conversion", "description": "Number of times your ad resulted in the optimization event you selected.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country_name": {"name": "country_name", "description": "Human-readable name of the geographic region associated with the country code.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "location_id": {"name": "location_id", "description": "TikTok's identifier for the country-level location record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "parent_location_id": {"name": "parent_location_id", "description": "Identifier of the parent region, enabling hierarchical rollups (city to province to country).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "has_support_below_18": {"name": "has_support_below_18", "description": "Whether the location supports targeting users under 18. Used for compliance with age-restricted ad targeting rules.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.6133854, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__campaign_country_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true) and var('tiktok_ads__using_campaign_country_report', true)) }}\n\nwith country_report as (\n \n select *\n from {{ ref('stg_tiktok_ads__campaign_country_report') }}\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_tiktok_ads__campaign_history') }}\n where is_most_recent_record\n), \n\nadvertiser as (\n\n select *\n from {{ ref('stg_tiktok_ads__advertiser') }}\n),\n\n{% if var('tiktok_ads__using_location', true) %}\nlocations as (\n\n select *\n from {{ ref('stg_tiktok_ads__location') }}\n where upper(region_level) = 'COUNTRY'\n),\n{% endif %}\n\naggregated as (\n\n select\n country_report.source_relation,\n country_report.stat_time_day as date_day,\n country_report.campaign_id,\n campaigns.campaign_name,\n campaigns.campaign_type,\n campaigns.created_at,\n country_report.country_code,\n advertiser.advertiser_id,\n advertiser.advertiser_name,\n advertiser.currency,\n campaigns.objective_type,\n campaigns.status,\n campaigns.split_test_variable,\n campaigns.budget,\n campaigns.budget_mode,\n {% if var('tiktok_ads__using_location', true) %}\n locations.region_name as country_name,\n locations.location_id,\n locations.parent_location_id,\n locations.has_support_below_18,\n {% endif %}\n sum(country_report.clicks) as clicks,\n sum(country_report.impressions) as impressions,\n sum(country_report.spend) as spend,\n sum(country_report.conversion) as conversion,\n sum(country_report.spend)/nullif(sum(country_report.clicks),0) as daily_cpc,\n (sum(country_report.spend)/nullif(sum(country_report.impressions),0))*1000 as daily_cpm,\n (sum(country_report.clicks)/nullif(sum(country_report.impressions),0))*100 as daily_ctr,\n sum(country_report.real_time_conversion) as real_time_conversion\n\n {{ tiktok_ads_persist_pass_through_columns(pass_through_variable='tiktok_ads__campaign_country_report_passthrough_metrics', identifier='country_report', transform='sum', coalesce_with=0) }} \n\n from country_report\n left join campaigns\n on country_report.campaign_id = campaigns.campaign_id\n and country_report.source_relation = campaigns.source_relation\n left join advertiser\n on campaigns.advertiser_id = advertiser.advertiser_id\n and campaigns.source_relation = advertiser.source_relation\n {% if var('tiktok_ads__using_location', true) %}\n left join locations\n on country_report.country_code = locations.country_code\n and campaigns.advertiser_id = locations.advertiser_id\n and country_report.source_relation = locations.source_relation\n {% endif %}\n\n {{ dbt_utils.group_by(n=15 + (4 if var('tiktok_ads__using_location', true) else 0)) }}\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__campaign_country_report", "package": null, "version": null}, {"name": "stg_tiktok_ads__campaign_history", "package": null, "version": null}, {"name": "stg_tiktok_ads__advertiser", "package": null, "version": null}, {"name": "stg_tiktok_ads__location", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.tiktok_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__campaign_country_report", "model.tiktok_ads.stg_tiktok_ads__campaign_history", "model.tiktok_ads.stg_tiktok_ads__advertiser", "model.tiktok_ads.stg_tiktok_ads__location"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads__campaign_country_report.sql", "compiled": true, "compiled_code": "\n\nwith country_report as (\n \n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_country_report\"\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_history\"\n where is_most_recent_record\n), \n\nadvertiser as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__advertiser\"\n),\n\n\nlocations as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__location\"\n where upper(region_level) = 'COUNTRY'\n),\n\n\naggregated as (\n\n select\n country_report.source_relation,\n country_report.stat_time_day as date_day,\n country_report.campaign_id,\n campaigns.campaign_name,\n campaigns.campaign_type,\n campaigns.created_at,\n country_report.country_code,\n advertiser.advertiser_id,\n advertiser.advertiser_name,\n advertiser.currency,\n campaigns.objective_type,\n campaigns.status,\n campaigns.split_test_variable,\n campaigns.budget,\n campaigns.budget_mode,\n \n locations.region_name as country_name,\n locations.location_id,\n locations.parent_location_id,\n locations.has_support_below_18,\n \n sum(country_report.clicks) as clicks,\n sum(country_report.impressions) as impressions,\n sum(country_report.spend) as spend,\n sum(country_report.conversion) as conversion,\n sum(country_report.spend)/nullif(sum(country_report.clicks),0) as daily_cpc,\n (sum(country_report.spend)/nullif(sum(country_report.impressions),0))*1000 as daily_cpm,\n (sum(country_report.clicks)/nullif(sum(country_report.impressions),0))*100 as daily_ctr,\n sum(country_report.real_time_conversion) as real_time_conversion\n\n \n\n\n\n \n\n from country_report\n left join campaigns\n on country_report.campaign_id = campaigns.campaign_id\n and country_report.source_relation = campaigns.source_relation\n left join advertiser\n on campaigns.advertiser_id = advertiser.advertiser_id\n and campaigns.source_relation = advertiser.source_relation\n \n left join locations\n on country_report.country_code = locations.country_code\n and campaigns.advertiser_id = locations.advertiser_id\n and country_report.source_relation = locations.source_relation\n \n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.tiktok_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "tiktok_ads__campaign_report", "resource_type": "model", "package_name": "tiktok_ads", "path": "tiktok_ads__campaign_report.sql", "original_file_path": "models/tiktok_ads__campaign_report.sql", "unique_id": "model.tiktok_ads.tiktok_ads__campaign_report", "fqn": ["tiktok_ads", "tiktok_ads__campaign_report"], "alias": "tiktok_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "e75c84c275540e79dfd7403d86098d7ff4dfff6d8f009ed93f6cce561564de08"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance at the campaign level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "Day of record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Advertiser's currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "Advertiser ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_name": {"name": "advertiser_name", "description": "Advertiser name", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reach": {"name": "reach", "description": "The number of unique users who saw your ads at least once. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion": {"name": "conversion", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "likes": {"name": "likes", "description": "The number of likes your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "comments": {"name": "comments", "description": "The number of comments your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "The number of shares that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_visits": {"name": "profile_visits", "description": "The number of profile visits that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "follows": {"name": "follows", "description": "The number of follows that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_2_s": {"name": "video_watched_2_s", "description": "The number of times your video played for at least 2 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_6_s": {"name": "video_watched_6_s", "description": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_25": {"name": "video_views_p_25", "description": "The number of times your video was played at 25% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_50": {"name": "video_views_p_50", "description": "The number of times your video was played at 50% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_75": {"name": "video_views_p_75", "description": "The number of times your video was played at 75% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion": {"name": "real_time_conversion", "description": "Number of times your ad resulted in the optimization event you selected.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_purchase_value": {"name": "total_purchase_value", "description": "The total value of purchase events that occurred in your app that were recorded by your measurement partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_sales_lead_value": {"name": "total_sales_lead_value", "description": "The monetary worth or potential value assigned to a lead generated through ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversion_value": {"name": "total_conversion_value", "description": "The accumulated value of `total_purchase_value` and `total_sales_lead_value`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_cpc": {"name": "daily_cpc", "description": "The average amount of money you've spent on a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_cpm": {"name": "daily_cpm", "description": "The average amount of money you've spent per 1,000 impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_ctr": {"name": "daily_ctr", "description": "The percentage of times people saw your ad and performed a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.6073737, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\nwith hourly as (\n \n select *\n from {{ ref('stg_tiktok_ads__campaign_report_hourly') }}\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_tiktok_ads__campaign_history') }}\n where is_most_recent_record\n), \n\nadvertiser as (\n\n select *\n from {{ ref('stg_tiktok_ads__advertiser') }}\n), \n\naggregated as (\n\n select\n hourly.source_relation,\n cast(hourly.stat_time_hour as date) as date_day,\n advertiser.advertiser_id,\n advertiser.advertiser_name,\n hourly.campaign_id,\n campaigns.campaign_name,\n advertiser.currency,\n sum(hourly.impressions) as impressions,\n sum(hourly.clicks) as clicks,\n sum(hourly.spend) as spend,\n sum(hourly.reach) as reach,\n sum(hourly.conversion) as conversion,\n sum(hourly.likes) as likes,\n sum(hourly.comments) as comments,\n sum(hourly.shares) as shares,\n sum(hourly.profile_visits) as profile_visits,\n sum(hourly.follows) as follows,\n sum(hourly.video_watched_2_s) as video_watched_2_s,\n sum(hourly.video_watched_6_s) as video_watched_6_s,\n sum(hourly.video_views_p_25) as video_views_p_25,\n sum(hourly.video_views_p_50) as video_views_p_50, \n sum(hourly.video_views_p_75) as video_views_p_75,\n sum(hourly.real_time_conversion) as real_time_conversion,\n sum(hourly.total_purchase_value) as total_purchase_value,\n sum(hourly.total_sales_lead_value) as total_sales_lead_value,\n sum(hourly.total_purchase_value + hourly.total_sales_lead_value) as total_conversion_value,\n sum(hourly.spend)/nullif(sum(hourly.clicks),0) as daily_cpc,\n (sum(hourly.spend)/nullif(sum(hourly.impressions),0))*1000 as daily_cpm,\n (sum(hourly.clicks)/nullif(sum(hourly.impressions),0))*100 as daily_ctr\n\n {{ tiktok_ads_persist_pass_through_columns(pass_through_variable='tiktok_ads__campaign_hourly_passthrough_metrics', identifier='hourly', transform='sum', coalesce_with=0, exclude_fields=['real_time_conversion','total_purchase_value','total_sales_lead_value']) }} \n\n from hourly\n left join campaigns\n on hourly.campaign_id = campaigns.campaign_id\n and hourly.source_relation = campaigns.source_relation\n left join advertiser\n on campaigns.advertiser_id = advertiser.advertiser_id\n and campaigns.source_relation = advertiser.source_relation\n {{ dbt_utils.group_by(7) }}\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__campaign_report_hourly", "package": null, "version": null}, {"name": "stg_tiktok_ads__campaign_history", "package": null, "version": null}, {"name": "stg_tiktok_ads__advertiser", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.tiktok_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly", "model.tiktok_ads.stg_tiktok_ads__campaign_history", "model.tiktok_ads.stg_tiktok_ads__advertiser"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith hourly as (\n \n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_report_hourly\"\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_history\"\n where is_most_recent_record\n), \n\nadvertiser as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__advertiser\"\n), \n\naggregated as (\n\n select\n hourly.source_relation,\n cast(hourly.stat_time_hour as date) as date_day,\n advertiser.advertiser_id,\n advertiser.advertiser_name,\n hourly.campaign_id,\n campaigns.campaign_name,\n advertiser.currency,\n sum(hourly.impressions) as impressions,\n sum(hourly.clicks) as clicks,\n sum(hourly.spend) as spend,\n sum(hourly.reach) as reach,\n sum(hourly.conversion) as conversion,\n sum(hourly.likes) as likes,\n sum(hourly.comments) as comments,\n sum(hourly.shares) as shares,\n sum(hourly.profile_visits) as profile_visits,\n sum(hourly.follows) as follows,\n sum(hourly.video_watched_2_s) as video_watched_2_s,\n sum(hourly.video_watched_6_s) as video_watched_6_s,\n sum(hourly.video_views_p_25) as video_views_p_25,\n sum(hourly.video_views_p_50) as video_views_p_50, \n sum(hourly.video_views_p_75) as video_views_p_75,\n sum(hourly.real_time_conversion) as real_time_conversion,\n sum(hourly.total_purchase_value) as total_purchase_value,\n sum(hourly.total_sales_lead_value) as total_sales_lead_value,\n sum(hourly.total_purchase_value + hourly.total_sales_lead_value) as total_conversion_value,\n sum(hourly.spend)/nullif(sum(hourly.clicks),0) as daily_cpc,\n (sum(hourly.spend)/nullif(sum(hourly.impressions),0))*1000 as daily_cpm,\n (sum(hourly.clicks)/nullif(sum(hourly.impressions),0))*100 as daily_ctr\n\n \n\n\n\n \n\n from hourly\n left join campaigns\n on hourly.campaign_id = campaigns.campaign_id\n and hourly.source_relation = campaigns.source_relation\n left join advertiser\n on campaigns.advertiser_id = advertiser.advertiser_id\n and campaigns.source_relation = advertiser.source_relation\n group by 1,2,3,4,5,6,7\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__campaign_report_hourly", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/stg_tiktok_ads__campaign_report_hourly.sql", "original_file_path": "models/staging/stg_tiktok_ads__campaign_report_hourly.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly", "fqn": ["tiktok_ads", "staging", "stg_tiktok_ads__campaign_report_hourly"], "alias": "stg_tiktok_ads__campaign_report_hourly", "checksum": {"name": "sha256", "checksum": "470f2426231bd6a8ae7e3aaddb73990f6a291cbf4d808eb94b98da7173ae0028"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represent data for each campaign for each hour.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "Campaign id", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "stat_time_hour": {"name": "stat_time_hour", "description": "Hour of activity", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_conversion": {"name": "cost_per_conversion", "description": "The average amount of money you've spent on a conversion. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpc": {"name": "cpc", "description": "The average amount of money you've spent on a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_play_actions": {"name": "video_play_actions", "description": "The number of times your video starts to play. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_rate": {"name": "conversion_rate", "description": "The percentage of results you received out of all the clicks of your ads. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_75": {"name": "video_views_p_75", "description": "The number of times your video was played at 75% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_50": {"name": "video_views_p_50", "description": "The number of times your video was played at 50% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of times your ads were on screen.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "comments": {"name": "comments", "description": "The number of comments your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion": {"name": "conversion", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "The number of shares your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks on your ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_25": {"name": "video_views_p_25", "description": "The number of times your video was played at 25% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reach": {"name": "reach", "description": "The number of unique users who saw your ads at least once. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "average_video_play": {"name": "average_video_play", "description": "The average time your video was played per single video view, including any time spent replaying the video.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "average_video_play_per_user": {"name": "average_video_play_per_user", "description": "The average time per user your video was played per single video view, including any time spent replaying the video.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_visits": {"name": "profile_visits", "description": "The number of profile visits the ad drove during the campaign. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpm": {"name": "cpm", "description": "The average amount of money you've spent per 1,000 impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ctr": {"name": "ctr", "description": "The percentage of times people saw your ad and performed a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_2_s": {"name": "video_watched_2_s", "description": "The number of times your video played for at least 2 seconds. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "follows": {"name": "follows", "description": "The number of new followers that were gained within 1 day of a user seeing a paid ad. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_6_s": {"name": "video_watched_6_s", "description": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The estimated total amount of money you've spent on your campaign, ad group or ad during its schedule.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "likes": {"name": "likes", "description": "The number of likes your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion": {"name": "real_time_conversion", "description": "Number of times your ad resulted in the optimization event you selected.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_purchase_value": {"name": "total_purchase_value", "description": "The total value of purchase events that occurred in your app that were recorded by your measurement partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_sales_lead_value": {"name": "total_sales_lead_value", "description": "The monetary worth or potential value assigned to a lead generated through ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/staging/stg_tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.6682844, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_report_hourly\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_tiktok_ads__campaign_report_hourly_tmp') }}\n), \n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_tiktok_ads__campaign_report_hourly_tmp')),\n staging_columns=get_campaign_report_hourly_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='tiktok_ads') }}\n\n from base\n), \n\nfinal as (\n\n select\n source_relation, \n campaign_id,\n cast(stat_time_hour as {{ dbt.type_timestamp() }}) as stat_time_hour,\n cpc, \n cpm,\n ctr,\n coalesce(impressions, 0) as impressions,\n coalesce(clicks, 0) as clicks, \n coalesce(spend, 0) as spend, \n reach,\n coalesce(conversion, 0) as conversion,\n cost_per_conversion,\n conversion_rate,\n coalesce(likes, 0) as likes,\n coalesce(comments, 0) as comments,\n coalesce(shares, 0) as shares,\n coalesce(profile_visits, 0) as profile_visits,\n coalesce(follows, 0) as follows,\n coalesce(video_play_actions, 0) as video_play_actions,\n coalesce(video_watched_2_s, 0) as video_watched_2_s,\n coalesce(video_watched_6_s, 0) as video_watched_6_s,\n coalesce(video_views_p_25, 0) as video_views_p_25,\n coalesce(video_views_p_50, 0) as video_views_p_50,\n coalesce(video_views_p_75, 0) as video_views_p_75,\n average_video_play,\n average_video_play_per_user,\n coalesce(real_time_conversion, 0) as real_time_conversion,\n coalesce(total_purchase_value, 0) as total_purchase_value,\n coalesce(total_sales_lead_value, 0) as total_sales_lead_value\n\n {{ tiktok_ads_fill_pass_through_columns(pass_through_fields=var('tiktok_ads__campaign_hourly_passthrough_metrics'), except_fields=[\"real_time_conversion\", \"total_purchase_value\", \"total_sales_lead_value\"]) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__campaign_report_hourly_tmp", "package": null, "version": null}, {"name": "stg_tiktok_ads__campaign_report_hourly_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.get_campaign_report_hourly_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.tiktok_ads.tiktok_ads_fill_pass_through_columns"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly_tmp"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads__campaign_report_hourly.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_report_hourly_tmp\"\n), \n\nfields as (\n\n select\n \n campaign_id as campaign_id,\n average_video_play as average_video_play,\n average_video_play_per_user as average_video_play_per_user,\n clicks as clicks,\n comments as comments,\n conversion as conversion,\n conversion_rate as conversion_rate,\n cost_per_conversion as cost_per_conversion,\n cpc as cpc,\n cpm as cpm,\n ctr as ctr,\n follows as follows,\n impressions as impressions,\n likes as likes,\n profile_visits as profile_visits,\n reach as reach,\n real_time_conversion as real_time_conversion,\n shares as shares,\n spend as spend,\n stat_time_hour as stat_time_hour,\n total_purchase_value as total_purchase_value,\n total_sales_lead_value as total_sales_lead_value,\n video_play_actions as video_play_actions,\n video_views_p_25 as video_views_p_25,\n video_views_p_50 as video_views_p_50,\n video_views_p_75 as video_views_p_75,\n video_watched_2_s as video_watched_2_s,\n video_watched_6_s as video_watched_6_s\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n), \n\nfinal as (\n\n select\n source_relation, \n campaign_id,\n cast(stat_time_hour as timestamp) as stat_time_hour,\n cpc, \n cpm,\n ctr,\n coalesce(impressions, 0) as impressions,\n coalesce(clicks, 0) as clicks, \n coalesce(spend, 0) as spend, \n reach,\n coalesce(conversion, 0) as conversion,\n cost_per_conversion,\n conversion_rate,\n coalesce(likes, 0) as likes,\n coalesce(comments, 0) as comments,\n coalesce(shares, 0) as shares,\n coalesce(profile_visits, 0) as profile_visits,\n coalesce(follows, 0) as follows,\n coalesce(video_play_actions, 0) as video_play_actions,\n coalesce(video_watched_2_s, 0) as video_watched_2_s,\n coalesce(video_watched_6_s, 0) as video_watched_6_s,\n coalesce(video_views_p_25, 0) as video_views_p_25,\n coalesce(video_views_p_50, 0) as video_views_p_50,\n coalesce(video_views_p_75, 0) as video_views_p_75,\n average_video_play,\n average_video_play_per_user,\n coalesce(real_time_conversion, 0) as real_time_conversion,\n coalesce(total_purchase_value, 0) as total_purchase_value,\n coalesce(total_sales_lead_value, 0) as total_sales_lead_value\n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_group_report_hourly", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/stg_tiktok_ads__ad_group_report_hourly.sql", "original_file_path": "models/staging/stg_tiktok_ads__ad_group_report_hourly.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly", "fqn": ["tiktok_ads", "staging", "stg_tiktok_ads__ad_group_report_hourly"], "alias": "stg_tiktok_ads__ad_group_report_hourly", "checksum": {"name": "sha256", "checksum": "54901d7642fa03ed211b240bcde6e04f7868eb5e6141e84148096046193918b1"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents data for each ad group for each hour.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group id", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "stat_time_hour": {"name": "stat_time_hour", "description": "Hour of activity", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_conversion": {"name": "cost_per_conversion", "description": "The average amount of money you've spent on a conversion. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpc": {"name": "cpc", "description": "The average amount of money you've spent on a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_play_actions": {"name": "video_play_actions", "description": "The number of times your video starts to play. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_rate": {"name": "conversion_rate", "description": "The percentage of results you received out of all the clicks of your ads. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_75": {"name": "video_views_p_75", "description": "The number of times your video was played at 75% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_50": {"name": "video_views_p_50", "description": "The number of times your video was played at 50% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of times your ads were on screen.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "comments": {"name": "comments", "description": "The number of comments your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion": {"name": "conversion", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "The number of shares your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks on your ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_25": {"name": "video_views_p_25", "description": "The number of times your video was played at 25% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reach": {"name": "reach", "description": "The number of unique users who saw your ads at least once. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "average_video_play": {"name": "average_video_play", "description": "The average time your video was played per single video view, including any time spent replaying the video.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "average_video_play_per_user": {"name": "average_video_play_per_user", "description": "The average time per user your video was played per single video view, including any time spent replaying the video.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_visits": {"name": "profile_visits", "description": "The number of profile visits the ad drove during the campaign. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpm": {"name": "cpm", "description": "The average amount of money you've spent per 1,000 impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ctr": {"name": "ctr", "description": "The percentage of times people saw your ad and performed a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_2_s": {"name": "video_watched_2_s", "description": "The number of times your video played for at least 2 seconds. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "follows": {"name": "follows", "description": "The number of new followers that were gained within 1 day of a user seeing a paid ad. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_6_s": {"name": "video_watched_6_s", "description": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The estimated total amount of money you've spent on your campaign, ad group or ad during its schedule.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "likes": {"name": "likes", "description": "The number of likes your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion": {"name": "real_time_conversion", "description": "Number of times your ad resulted in the optimization event you selected.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_purchase_value": {"name": "total_purchase_value", "description": "The total value of purchase events that occurred in your app that were recorded by your measurement partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_sales_lead_value": {"name": "total_sales_lead_value", "description": "The monetary worth or potential value assigned to a lead generated through ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/staging/stg_tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.6664495, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_group_report_hourly\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_tiktok_ads__ad_group_report_hourly_tmp') }}\n), \n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_tiktok_ads__ad_group_report_hourly_tmp')),\n staging_columns=get_ad_group_report_hourly_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='tiktok_ads') }}\n\n from base\n), \n\nfinal as (\n\n select\n source_relation, \n adgroup_id as ad_group_id,\n cast(stat_time_hour as {{ dbt.type_timestamp() }}) as stat_time_hour, \n cpc, \n cpm, \n ctr, \n coalesce(impressions, 0) as impressions,\n coalesce(clicks, 0) as clicks, \n coalesce(spend, 0) as spend, \n coalesce(reach, 0) as reach, \n coalesce(conversion, 0) as conversion, \n cost_per_conversion, \n conversion_rate, \n coalesce(likes, 0) as likes,\n coalesce(comments, 0) as comments,\n coalesce(shares, 0) as shares,\n coalesce(profile_visits, 0) as profile_visits,\n coalesce(follows, 0) as follows,\n coalesce(video_play_actions, 0) as video_play_actions,\n coalesce(video_watched_2_s, 0) as video_watched_2_s,\n coalesce(video_watched_6_s, 0) as video_watched_6_s,\n coalesce(video_views_p_25, 0) as video_views_p_25,\n coalesce(video_views_p_50, 0) as video_views_p_50,\n coalesce(video_views_p_75, 0) as video_views_p_75,\n average_video_play, \n average_video_play_per_user,\n coalesce(real_time_conversion, 0) as real_time_conversion,\n coalesce(total_purchase_value, 0) as total_purchase_value,\n coalesce(total_sales_lead_value, 0) as total_sales_lead_value\n\n {{ tiktok_ads_fill_pass_through_columns(pass_through_fields=var('tiktok_ads__ad_group_hourly_passthrough_metrics'), except_fields=[\"real_time_conversion\", \"total_purchase_value\", \"total_sales_lead_value\"]) }}\n\n from fields\n) \n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__ad_group_report_hourly_tmp", "package": null, "version": null}, {"name": "stg_tiktok_ads__ad_group_report_hourly_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.get_ad_group_report_hourly_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.tiktok_ads.tiktok_ads_fill_pass_through_columns"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly_tmp"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads__ad_group_report_hourly.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_group_report_hourly_tmp\"\n), \n\nfields as (\n\n select\n \n adgroup_id as adgroup_id,\n average_video_play as average_video_play,\n average_video_play_per_user as average_video_play_per_user,\n clicks as clicks,\n comments as comments,\n conversion as conversion,\n conversion_rate as conversion_rate,\n cost_per_conversion as cost_per_conversion,\n cpc as cpc,\n cpm as cpm,\n ctr as ctr,\n follows as follows,\n impressions as impressions,\n likes as likes,\n profile_visits as profile_visits,\n reach as reach,\n real_time_conversion as real_time_conversion,\n shares as shares,\n spend as spend,\n stat_time_hour as stat_time_hour,\n total_purchase_value as total_purchase_value,\n total_sales_lead_value as total_sales_lead_value,\n video_play_actions as video_play_actions,\n video_views_p_25 as video_views_p_25,\n video_views_p_50 as video_views_p_50,\n video_views_p_75 as video_views_p_75,\n video_watched_2_s as video_watched_2_s,\n video_watched_6_s as video_watched_6_s\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n), \n\nfinal as (\n\n select\n source_relation, \n adgroup_id as ad_group_id,\n cast(stat_time_hour as timestamp) as stat_time_hour, \n cpc, \n cpm, \n ctr, \n coalesce(impressions, 0) as impressions,\n coalesce(clicks, 0) as clicks, \n coalesce(spend, 0) as spend, \n coalesce(reach, 0) as reach, \n coalesce(conversion, 0) as conversion, \n cost_per_conversion, \n conversion_rate, \n coalesce(likes, 0) as likes,\n coalesce(comments, 0) as comments,\n coalesce(shares, 0) as shares,\n coalesce(profile_visits, 0) as profile_visits,\n coalesce(follows, 0) as follows,\n coalesce(video_play_actions, 0) as video_play_actions,\n coalesce(video_watched_2_s, 0) as video_watched_2_s,\n coalesce(video_watched_6_s, 0) as video_watched_6_s,\n coalesce(video_views_p_25, 0) as video_views_p_25,\n coalesce(video_views_p_50, 0) as video_views_p_50,\n coalesce(video_views_p_75, 0) as video_views_p_75,\n average_video_play, \n average_video_play_per_user,\n coalesce(real_time_conversion, 0) as real_time_conversion,\n coalesce(total_purchase_value, 0) as total_purchase_value,\n coalesce(total_sales_lead_value, 0) as total_sales_lead_value\n\n \n\n\n\n\n\n from fields\n) \n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__campaign_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__campaign_history", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/stg_tiktok_ads__campaign_history.sql", "original_file_path": "models/staging/stg_tiktok_ads__campaign_history.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__campaign_history", "fqn": ["tiktok_ads", "staging", "stg_tiktok_ads__campaign_history"], "alias": "stg_tiktok_ads__campaign_history", "checksum": {"name": "sha256", "checksum": "4150c478d9bbb6b2eed471c77d81b6da4a4b0b09611c95bf468fe3819e19878a"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents data for each campaign.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Time the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "Advertiser ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_type": {"name": "campaign_type", "description": "Campaign Type, indicates the campaign is a regular campaign or iOS 14 campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "split_test_variable": {"name": "split_test_variable", "description": "Split Test variables. Optional values; TARGETING, BIDDING_OPTIMIZATION, CREATIVE.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget": {"name": "budget", "description": "Campaign budget", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_mode": {"name": "budget_mode", "description": "Budget type", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Time at which the campaign was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_new_structure": {"name": "is_new_structure", "description": "Whether the campaign is a new structure (for the same campaign, the structure of campaign, adgroups and ads are the same)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective_type": {"name": "objective_type", "description": "Advertising objective.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "opt_status": {"name": "opt_status", "description": "Operation status.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Campaign status.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Whether record is the most recent one for this particular grain.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/staging/stg_tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.660632, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_tiktok_ads__campaign_history_tmp') }}\n), \n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_tiktok_ads__campaign_history_tmp')),\n staging_columns=get_campaign_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='tiktok_ads') }}\n\n from base\n), \n\nfinal as (\n\n select\n source_relation, \n campaign_id,\n cast(updated_at as {{ dbt.type_timestamp() }}) as updated_at,\n advertiser_id,\n campaign_name,\n campaign_type,\n split_test_variable,\n objective_type,\n status,\n budget,\n budget_mode,\n create_time as created_at,\n is_new_structure,\n row_number() over (partition by campaign_id {{ fivetran_utils.partition_by_source_relation(package_name='tiktok_ads') }} order by updated_at desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__campaign_history_tmp", "package": null, "version": null}, {"name": "stg_tiktok_ads__campaign_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.get_campaign_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__campaign_history_tmp"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads__campaign_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_history_tmp\"\n), \n\nfields as (\n\n select\n \n advertiser_id as advertiser_id,\n campaign_id as campaign_id,\n cast(null as TEXT) as campaign_name,\n cast(null as TEXT) as campaign_type,\n cast(null as TEXT) as split_test_variable,\n updated_at as updated_at,\n cast(null as TEXT) as objective_type,\n cast(null as TEXT) as status,\n cast(null as numeric(28,6)) as budget,\n cast(null as TEXT) as budget_mode,\n create_time as create_time,\n is_new_structure as is_new_structure\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n), \n\nfinal as (\n\n select\n source_relation, \n campaign_id,\n cast(updated_at as timestamp) as updated_at,\n advertiser_id,\n campaign_name,\n campaign_type,\n split_test_variable,\n objective_type,\n status,\n budget,\n budget_mode,\n create_time as created_at,\n is_new_structure,\n row_number() over (partition by campaign_id order by updated_at desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__ad_group_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_group_history", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/stg_tiktok_ads__ad_group_history.sql", "original_file_path": "models/staging/stg_tiktok_ads__ad_group_history.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_group_history", "fqn": ["tiktok_ads", "staging", "stg_tiktok_ads__ad_group_history"], "alias": "stg_tiktok_ads__ad_group_history", "checksum": {"name": "sha256", "checksum": "5676fd9b7fbbc245617ef817c360ada6ef3a839e76ad70686afe900ca8bcd942"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents data for each ad group.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Time the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "Advertiser ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "action_categories": {"name": "action_categories", "description": "IDs of the action categories (behaviors) that you want to target.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The Ad group's campaign ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "action_days": {"name": "action_days", "description": "Action days", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name. Character limit is 512 and cannot contain emoji.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "age_groups": {"name": "age_groups", "description": "Age groups you want to target.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "audience_type": {"name": "audience_type", "description": "Audience Type", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget": {"name": "budget", "description": "Ad budget. Returns 0.0 when Campaign Budget Optimization (budget_optimize_switch) is on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "category": {"name": "category", "description": "Ad group category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "display_name": {"name": "display_name", "description": "Display name of ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "interest_category": {"name": "interest_category", "description": "Interest classification. If the interest is specified, users that do not meet interest target will be excluded during delivery.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "frequency": {"name": "frequency", "description": "frequency, together with frequency_schedule, controls how often people see your ad (only available for REACH ads). For example, frequency = 2 frequency_schedule = 3 means \"show ads no more than twice every 3 day\".\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "frequency_schedule": {"name": "frequency_schedule", "description": "frequency, together with frequency, controls how often people see your ad (only available for REACH ads).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "gender": {"name": "gender", "description": "Gender that you want to target.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "landing_page_url": {"name": "landing_page_url", "description": "Landing page URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "languages": {"name": "languages", "description": "Codes of the languages that you want to target.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Whether record is the most recent one for this particular grain.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/staging/stg_tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.6564136, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_group_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_tiktok_ads__ad_group_history_tmp') }}\n), \n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_tiktok_ads__ad_group_history_tmp')),\n staging_columns=get_ad_group_history_columns()\n )\n }}\n\n \n {{ fivetran_utils.apply_source_relation(package_name='tiktok_ads') }}\n\n from base\n), \n\nfinal as (\n\n select\n source_relation,\n adgroup_id as ad_group_id,\n cast(updated_at as {{ dbt.type_timestamp() }}) as updated_at,\n advertiser_id,\n campaign_id,\n action_days,\n action_categories,\n adgroup_name as ad_group_name,\n age_groups,\n audience_type,\n budget,\n category,\n display_name,\n interest_category_v_2 as interest_category,\n frequency,\n frequency_schedule,\n gender,\n languages, \n landing_page_url,\n row_number() over (partition by adgroup_id {{ fivetran_utils.partition_by_source_relation(package_name='tiktok_ads') }} order by updated_at desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__ad_group_history_tmp", "package": null, "version": null}, {"name": "stg_tiktok_ads__ad_group_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.get_ad_group_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__ad_group_history_tmp"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads__ad_group_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_group_history_tmp\"\n), \n\nfields as (\n\n select\n \n action_days as action_days,\n adgroup_id as adgroup_id,\n adgroup_name as adgroup_name,\n advertiser_id as advertiser_id,\n audience_type as audience_type,\n budget as budget,\n campaign_id as campaign_id,\n category as category,\n display_name as display_name,\n frequency as frequency,\n frequency_schedule as frequency_schedule,\n gender as gender,\n landing_page_url as landing_page_url,\n updated_at as updated_at,\n interest_category_v_2 as interest_category_v_2,\n action_categories as action_categories,\n age_groups as age_groups,\n languages as languages\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n), \n\nfinal as (\n\n select\n source_relation,\n adgroup_id as ad_group_id,\n cast(updated_at as timestamp) as updated_at,\n advertiser_id,\n campaign_id,\n action_days,\n action_categories,\n adgroup_name as ad_group_name,\n age_groups,\n audience_type,\n budget,\n category,\n display_name,\n interest_category_v_2 as interest_category,\n frequency,\n frequency_schedule,\n gender,\n languages, \n landing_page_url,\n row_number() over (partition by adgroup_id order by updated_at desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_report_hourly", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/stg_tiktok_ads__ad_report_hourly.sql", "original_file_path": "models/staging/stg_tiktok_ads__ad_report_hourly.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly", "fqn": ["tiktok_ads", "staging", "stg_tiktok_ads__ad_report_hourly"], "alias": "stg_tiktok_ads__ad_report_hourly", "checksum": {"name": "sha256", "checksum": "cbf1e4e059485aabb414c2c80e2241f229e758f029ddaa25f72aeadf757569e1"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents data for each ad for each hour.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "ad_id": {"name": "ad_id", "description": "Ad id", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "stat_time_hour": {"name": "stat_time_hour", "description": "Hour of activity", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_conversion": {"name": "cost_per_conversion", "description": "The average amount of money you've spent on a conversion. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpc": {"name": "cpc", "description": "The average amount of money you've spent on a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_play_actions": {"name": "video_play_actions", "description": "The number of times your video starts to play. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_rate": {"name": "conversion_rate", "description": "The percentage of results you received out of all the clicks of your ads. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_75": {"name": "video_views_p_75", "description": "The number of times your video was played at 75% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_50": {"name": "video_views_p_50", "description": "The number of times your video was played at 50% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of times your ads were on screen.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "comments": {"name": "comments", "description": "The number of comments your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion": {"name": "conversion", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "The number of shares your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks on your ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_25": {"name": "video_views_p_25", "description": "The number of times your video was played at 25% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reach": {"name": "reach", "description": "The number of unique users who saw your ads at least once. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "average_video_play": {"name": "average_video_play", "description": "The average time your video was played per single video view, including any time spent replaying the video.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "average_video_play_per_user": {"name": "average_video_play_per_user", "description": "The average time per user your video was played per single video view, including any time spent replaying the video.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_visits": {"name": "profile_visits", "description": "The number of profile visits the ad drove during the campaign. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpm": {"name": "cpm", "description": "The average amount of money you've spent per 1,000 impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ctr": {"name": "ctr", "description": "The percentage of times people saw your ad and performed a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_2_s": {"name": "video_watched_2_s", "description": "The number of times your video played for at least 2 seconds. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "follows": {"name": "follows", "description": "The number of new followers that were gained within 1 day of a user seeing a paid ad. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_6_s": {"name": "video_watched_6_s", "description": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The estimated total amount of money you've spent on your campaign, ad group or ad during its schedule.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "likes": {"name": "likes", "description": "The number of likes your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion": {"name": "real_time_conversion", "description": "Number of times your ad resulted in the optimization event you selected.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_purchase_value": {"name": "total_purchase_value", "description": "The total value of purchase events that occurred in your app that were recorded by your measurement partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_sales_lead_value": {"name": "total_sales_lead_value", "description": "The monetary worth or potential value assigned to a lead generated through ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/staging/stg_tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.6646194, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_report_hourly\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_tiktok_ads__ad_report_hourly_tmp') }}\n), \n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_tiktok_ads__ad_report_hourly_tmp')),\n staging_columns=get_ad_report_hourly_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='tiktok_ads') }}\n\n from base\n), \n\nfinal as (\n\n select\n source_relation, \n ad_id, \n cast(stat_time_hour as {{ dbt.type_timestamp() }}) as stat_time_hour, \n cpc, \n cpm, \n ctr, \n coalesce(impressions, 0) as impressions,\n coalesce(clicks, 0) as clicks, \n coalesce(spend, 0) as spend, \n reach, \n coalesce(conversion, 0) as conversion,\n cost_per_conversion, \n conversion_rate, \n coalesce(likes, 0) as likes,\n coalesce(comments, 0) as comments,\n coalesce(shares, 0) as shares,\n coalesce(profile_visits, 0) as profile_visits,\n coalesce(follows, 0) as follows,\n coalesce(video_play_actions, 0) as video_play_actions,\n coalesce(video_watched_2_s, 0) as video_watched_2_s,\n coalesce(video_watched_6_s, 0) as video_watched_6_s,\n coalesce(video_views_p_25, 0) as video_views_p_25,\n coalesce(video_views_p_50, 0) as video_views_p_50,\n coalesce(video_views_p_75, 0) as video_views_p_75,\n average_video_play, \n average_video_play_per_user,\n coalesce(real_time_conversion, 0) as real_time_conversion,\n coalesce(total_purchase_value, 0) as total_purchase_value,\n coalesce(total_sales_lead_value, 0) as total_sales_lead_value\n\n {{ tiktok_ads_fill_pass_through_columns(pass_through_fields=var('tiktok_ads__ad_hourly_passthrough_metrics'), except_fields=[\"real_time_conversion\", \"total_purchase_value\", \"total_sales_lead_value\"]) }}\n\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__ad_report_hourly_tmp", "package": null, "version": null}, {"name": "stg_tiktok_ads__ad_report_hourly_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.get_ad_report_hourly_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.tiktok_ads.tiktok_ads_fill_pass_through_columns"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__ad_report_hourly_tmp"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads__ad_report_hourly.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_report_hourly_tmp\"\n), \n\nfields as (\n\n select\n \n ad_id as ad_id,\n average_video_play as average_video_play,\n average_video_play_per_user as average_video_play_per_user,\n clicks as clicks,\n comments as comments,\n conversion as conversion,\n conversion_rate as conversion_rate,\n cost_per_conversion as cost_per_conversion,\n cpc as cpc,\n cpm as cpm,\n ctr as ctr,\n follows as follows,\n impressions as impressions,\n likes as likes,\n profile_visits as profile_visits,\n real_time_conversion as real_time_conversion,\n reach as reach,\n shares as shares,\n spend as spend,\n stat_time_hour as stat_time_hour,\n total_purchase_value as total_purchase_value,\n total_sales_lead_value as total_sales_lead_value,\n video_play_actions as video_play_actions,\n video_views_p_25 as video_views_p_25,\n video_views_p_50 as video_views_p_50,\n video_views_p_75 as video_views_p_75,\n video_watched_2_s as video_watched_2_s,\n video_watched_6_s as video_watched_6_s\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n), \n\nfinal as (\n\n select\n source_relation, \n ad_id, \n cast(stat_time_hour as timestamp) as stat_time_hour, \n cpc, \n cpm, \n ctr, \n coalesce(impressions, 0) as impressions,\n coalesce(clicks, 0) as clicks, \n coalesce(spend, 0) as spend, \n reach, \n coalesce(conversion, 0) as conversion,\n cost_per_conversion, \n conversion_rate, \n coalesce(likes, 0) as likes,\n coalesce(comments, 0) as comments,\n coalesce(shares, 0) as shares,\n coalesce(profile_visits, 0) as profile_visits,\n coalesce(follows, 0) as follows,\n coalesce(video_play_actions, 0) as video_play_actions,\n coalesce(video_watched_2_s, 0) as video_watched_2_s,\n coalesce(video_watched_6_s, 0) as video_watched_6_s,\n coalesce(video_views_p_25, 0) as video_views_p_25,\n coalesce(video_views_p_50, 0) as video_views_p_50,\n coalesce(video_views_p_75, 0) as video_views_p_75,\n average_video_play, \n average_video_play_per_user,\n coalesce(real_time_conversion, 0) as real_time_conversion,\n coalesce(total_purchase_value, 0) as total_purchase_value,\n coalesce(total_sales_lead_value, 0) as total_sales_lead_value\n\n \n\n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__location": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__location", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/stg_tiktok_ads__location.sql", "original_file_path": "models/staging/stg_tiktok_ads__location.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__location", "fqn": ["tiktok_ads", "staging", "stg_tiktok_ads__location"], "alias": "stg_tiktok_ads__location", "checksum": {"name": "sha256", "checksum": "06cd540070e809f43ea77d6287466e34bd102e06935b1c2b71fed36959084422"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Reference table of geographic regions and locations available for TikTok Ads targeting. Each record represents a location, such as a country, province, or city.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "location_id": {"name": "location_id", "description": "Unique identifier for the geographic region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "Advertiser ID associated with this location record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country_code": {"name": "country_code", "description": "Two-letter ISO country code for the location.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "region_name": {"name": "region_name", "description": "Human-readable name of the geographic region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "region_level": {"name": "region_level", "description": "Reporting granularity of the location (e.g. COUNTRY, PROVINCE, CITY).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "area_type": {"name": "area_type", "description": "Classification of the location, such as administrative region or media market.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "parent_location_id": {"name": "parent_location_id", "description": "Identifier of the parent region, enabling hierarchical rollups (city to state to country).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "has_support_below_18": {"name": "has_support_below_18", "description": "Whether the location supports targeting users under 18. Used for compliance with age-restricted ad targeting rules.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp indicating when the record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/staging/stg_tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.6714268, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__location\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true) and var('tiktok_ads__using_location', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_tiktok_ads__location_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_tiktok_ads__location_tmp')),\n staging_columns=get_location_columns()\n )\n }}\n\n {{ fivetran_utils.apply_source_relation(package_name='tiktok_ads') }}\n\n from base\n\n),\n\nfinal as (\n\n select\n source_relation,\n region_id as location_id,\n advertiser_id,\n country_code,\n region_name,\n region_level,\n area_type,\n parent_id as parent_location_id,\n support_below_18 as has_support_below_18,\n _fivetran_synced\n\n from fields\n\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__location_tmp", "package": null, "version": null}, {"name": "stg_tiktok_ads__location_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.get_location_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__location_tmp"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads__location.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__location_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n advertiser_id as advertiser_id,\n area_type as area_type,\n country_code as country_code,\n parent_id as parent_id,\n region_id as region_id,\n region_level as region_level,\n region_name as region_name,\n support_below_18 as support_below_18\n\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n\n),\n\nfinal as (\n\n select\n source_relation,\n region_id as location_id,\n advertiser_id,\n country_code,\n region_name,\n region_level,\n area_type,\n parent_id as parent_location_id,\n support_below_18 as has_support_below_18,\n _fivetran_synced\n\n from fields\n\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__ad_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_history", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/stg_tiktok_ads__ad_history.sql", "original_file_path": "models/staging/stg_tiktok_ads__ad_history.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_history", "fqn": ["tiktok_ads", "staging", "stg_tiktok_ads__ad_history"], "alias": "stg_tiktok_ads__ad_history", "checksum": {"name": "sha256", "checksum": "61d9b9aee00a11a281e60bdc013c5621b99cda848362f504aa7e827bb87abc0a"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents data for each ad.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "ad_id": {"name": "ad_id", "description": "Ad ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Time the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "Advertiser ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the `landing page url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_name": {"name": "ad_name", "description": "Ad Name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "call_to_action": {"name": "call_to_action", "description": "Call to action values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_tracking_url": {"name": "click_tracking_url", "description": "Click monitoring URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impression_tracking_url": {"name": "impression_tracking_url", "description": "Display monitoring URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "landing_page_url": {"name": "landing_page_url", "description": "Landing page URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_host": {"name": "url_host", "description": "The URL host of the ad, extracted from the `landing_page_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_path": {"name": "url_path", "description": "The URL path of the ad, extracted from the `landing_page_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_source": {"name": "utm_source", "description": "The utm_source parameter of the ad, extracted from the `landing_page_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_medium": {"name": "utm_medium", "description": "The utm_medium parameter of the ad, extracted from the `landing_page_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_campaign": {"name": "utm_campaign", "description": "The utm_campaign parameter of the ad, extracted from the `landing_page_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_content": {"name": "utm_content", "description": "The utm_content parameter of the ad, extracted from the `landing_page_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_term": {"name": "utm_term", "description": "The utm_term parameter of the ad, extracted from the `landing_page_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Whether record is the most recent one for this particular grain.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/staging/stg_tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.6587205, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_tiktok_ads__ad_history_tmp') }}\n), \n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_tiktok_ads__ad_history_tmp')),\n staging_columns=get_ad_history_columns()\n )\n }}\n\n \n {{ fivetran_utils.apply_source_relation(package_name='tiktok_ads') }}\n\n from base\n), \n\nfinal as (\n\n select\n source_relation, \n ad_id,\n cast(updated_at as {{ dbt.type_timestamp() }}) as updated_at,\n adgroup_id as ad_group_id,\n advertiser_id,\n campaign_id,\n ad_name,\n call_to_action,\n click_tracking_url,\n impression_tracking_url,\n {{ dbt.split_part('landing_page_url', \"'?'\", 1) }} as base_url,\n {{ dbt_utils.get_url_host('landing_page_url') }} as url_host,\n '/' || {{ dbt_utils.get_url_path('landing_page_url') }} as url_path,\n {{ tiktok_ads.tiktok_ads_extract_url_parameter('landing_page_url', 'utm_source') }} as utm_source,\n {{ tiktok_ads.tiktok_ads_extract_url_parameter('landing_page_url', 'utm_medium') }} as utm_medium,\n {{ tiktok_ads.tiktok_ads_extract_url_parameter('landing_page_url', 'utm_campaign') }} as utm_campaign,\n {{ tiktok_ads.tiktok_ads_extract_url_parameter('landing_page_url', 'utm_content') }} as utm_content,\n {{ tiktok_ads.tiktok_ads_extract_url_parameter('landing_page_url', 'utm_term') }} as utm_term,\n landing_page_url,\n row_number() over (partition by ad_id {{ fivetran_utils.partition_by_source_relation(package_name='tiktok_ads') }} order by updated_at desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__ad_history_tmp", "package": null, "version": null}, {"name": "stg_tiktok_ads__ad_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.get_ad_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.split_part", "macro.dbt_utils.get_url_host", "macro.dbt_utils.get_url_path", "macro.tiktok_ads.tiktok_ads_extract_url_parameter", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__ad_history_tmp"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads__ad_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_history_tmp\"\n), \n\nfields as (\n\n select\n \n ad_id as ad_id,\n ad_name as ad_name,\n adgroup_id as adgroup_id,\n advertiser_id as advertiser_id,\n call_to_action as call_to_action,\n campaign_id as campaign_id,\n click_tracking_url as click_tracking_url,\n impression_tracking_url as impression_tracking_url,\n landing_page_url as landing_page_url,\n updated_at as updated_at\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n), \n\nfinal as (\n\n select\n source_relation, \n ad_id,\n cast(updated_at as timestamp) as updated_at,\n adgroup_id as ad_group_id,\n advertiser_id,\n campaign_id,\n ad_name,\n call_to_action,\n click_tracking_url,\n impression_tracking_url,\n \n\n \n \n\n split_part(\n landing_page_url,\n '?',\n 1\n )\n\n\n \n\n as base_url,\n \n \n cast(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n \n\n replace(\n \n\n replace(\n \n\n replace(\n landing_page_url,\n 'android-app://',\n ''\n )\n\n\n,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n '/',\n 1\n )\n\n\n \n\n,\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_host,\n '/' || \n \n cast(\n\n \n \n\n split_part(\n \n\n right(\n \n\n replace(\n \n\n replace(\n landing_page_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n \n\n length(\n \n\n replace(\n \n\n replace(\n landing_page_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n )-coalesce(\n nullif(\n\n position(\n '/' in \n\n replace(\n \n\n replace(\n landing_page_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ), 0),\n \n\n position(\n '?' in \n\n replace(\n \n\n replace(\n landing_page_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ) - 1\n )\n ),\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_path,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n landing_page_url,\n 'utm_source=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_source,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n landing_page_url,\n 'utm_medium=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_medium,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n landing_page_url,\n 'utm_campaign=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_campaign,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n landing_page_url,\n 'utm_content=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_content,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n landing_page_url,\n 'utm_term=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_term,\n landing_page_url,\n row_number() over (partition by ad_id order by updated_at desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__advertiser": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__advertiser", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/stg_tiktok_ads__advertiser.sql", "original_file_path": "models/staging/stg_tiktok_ads__advertiser.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__advertiser", "fqn": ["tiktok_ads", "staging", "stg_tiktok_ads__advertiser"], "alias": "stg_tiktok_ads__advertiser", "checksum": {"name": "sha256", "checksum": "dd3c4766397d970d33230ade1f53d18f1985d2b74e44676fd02d9fef11df9cae"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents data for each advertiser.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "advertiser_id": {"name": "advertiser_id", "description": "Advertiser ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "address": {"name": "address", "description": "Advertiser address information", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "balance": {"name": "balance", "description": "Account available balance", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "company": {"name": "company", "description": "Advertiser's company name", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "contacter": {"name": "contacter", "description": "Contact Person", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country": {"name": "country", "description": "The advertiser's country", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "create_time": {"name": "create_time", "description": "Advertiser's create time", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Type of currency used by advertisers", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "description": {"name": "description", "description": "Brand description, i.e. promotional content", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "email": {"name": "email", "description": "Advertiser contact email, desensitised data", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "industry": {"name": "industry", "description": "Advertiser industry category", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "language": {"name": "language", "description": "Language used by advertisers", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "license_no": {"name": "license_no", "description": "License number", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "license_url": {"name": "license_url", "description": "License preview address, the link is valid for an hour by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_name": {"name": "advertiser_name", "description": "Advertiser name", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cellphone_number": {"name": "cellphone_number", "description": "Contact mobile number, desensitised data", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "telephone_number": {"name": "telephone_number", "description": "Fixed phone number, desensitised data", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone": {"name": "timezone", "description": "Ad account time zone including GMT offset", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/staging/stg_tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.652517, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__advertiser\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_tiktok_ads__advertiser_tmp') }}\n), \n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_tiktok_ads__advertiser_tmp')),\n staging_columns=get_advertiser_columns()\n )\n }}\n\n \n {{ fivetran_utils.apply_source_relation(package_name='tiktok_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as advertiser_id, \n address, \n balance, \n company, \n contacter, \n country, \n currency, \n description, \n email, \n industry, \n language,\n name as advertiser_name, \n coalesce(cellphone_number, phone_number) as cellphone_number, \n coalesce(telephone_number, telephone) as telephone_number,\n timezone\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__advertiser_tmp", "package": null, "version": null}, {"name": "stg_tiktok_ads__advertiser_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.get_advertiser_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__advertiser_tmp"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads__advertiser.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__advertiser_tmp\"\n), \n\nfields as (\n\n select\n \n address as address,\n balance as balance,\n cellphone_number as cellphone_number,\n company as company,\n contacter as contacter,\n country as country,\n currency as currency,\n description as description,\n email as email,\n id as id,\n industry as industry,\n language as language,\n name as name,\n cast(null as TEXT) as phone_number,\n cast(null as TEXT) as telephone,\n telephone_number as telephone_number,\n timezone as timezone\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as advertiser_id, \n address, \n balance, \n company, \n contacter, \n country, \n currency, \n description, \n email, \n industry, \n language,\n name as advertiser_name, \n coalesce(cellphone_number, phone_number) as cellphone_number, \n coalesce(telephone_number, telephone) as telephone_number,\n timezone\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__campaign_country_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__campaign_country_report", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/stg_tiktok_ads__campaign_country_report.sql", "original_file_path": "models/staging/stg_tiktok_ads__campaign_country_report.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__campaign_country_report", "fqn": ["tiktok_ads", "staging", "stg_tiktok_ads__campaign_country_report"], "alias": "stg_tiktok_ads__campaign_country_report", "checksum": {"name": "sha256", "checksum": "b213b92f39600ca626b1aa96c44a205548115fb3c254275f1567eff1e40b1cb1"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record provides country-level reporting metrics at the campaign level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp indicating when the record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Unique identifier of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "Total number of times users clicked on ads within the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion": {"name": "conversion", "description": "Number of attributed conversions from ads in the campaign based on the TikTok attribution model.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_rate": {"name": "conversion_rate", "description": "Ratio of conversions to impressions, calculated as conversions divided by impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_conversion": {"name": "cost_per_conversion", "description": "Average cost per conversion, calculated as total spend divided by conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country_code": {"name": "country_code", "description": "Audience country or region code.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpc": {"name": "cpc", "description": "Cost per click, calculated as spend divided by the number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpm": {"name": "cpm", "description": "Cost per thousand impressions, calculated as (spend / impressions) * 1000.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ctr": {"name": "ctr", "description": "Click-through rate, calculated as clicks divided by impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "Total number of times ads in the campaign were shown.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion": {"name": "real_time_conversion", "description": "Number of real-time conversions tracked by TikTok.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "Total amount spent for the campaign in the account currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "stat_time_day": {"name": "stat_time_day", "description": "The reporting date for the campaign data (in YYYY-MM-DD format).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/staging/stg_tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.6697805, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_country_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true) and var('tiktok_ads__using_campaign_country_report', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_tiktok_ads__campaign_country_report_tmp') }}\n), \n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_tiktok_ads__campaign_country_report_tmp')),\n staging_columns=get_campaign_country_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='tiktok_ads') }}\n\n from base\n), \n\nfinal as (\n\n select\n campaign_id,\n cast(stat_time_day as date) as stat_time_day,\n country_code,\n coalesce(clicks, 0) as clicks,\n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(conversion, 0) as conversion,\n coalesce(conversion_rate, 0) as conversion_rate,\n coalesce(cost_per_conversion, 0) as cost_per_conversion,\n coalesce(cpc, 0) as cpc,\n coalesce(cpm, 0) as cpm,\n coalesce(ctr, 0) as ctr,\n coalesce(real_time_conversion, 0) as real_time_conversion,\n source_relation,\n _fivetran_synced\n\n {{ tiktok_ads_fill_pass_through_columns(pass_through_fields=var('tiktok_ads__campaign_country_report_passthrough_metrics')) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__campaign_country_report_tmp", "package": null, "version": null}, {"name": "stg_tiktok_ads__campaign_country_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.get_campaign_country_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.tiktok_ads.tiktok_ads_fill_pass_through_columns"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__campaign_country_report_tmp"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads__campaign_country_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_country_report_tmp\"\n), \n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n campaign_id as campaign_id,\n clicks as clicks,\n conversion as conversion,\n conversion_rate as conversion_rate,\n cost_per_conversion as cost_per_conversion,\n country_code as country_code,\n cpc as cpc,\n cpm as cpm,\n ctr as ctr,\n impressions as impressions,\n real_time_conversion as real_time_conversion,\n spend as spend,\n stat_time_day as stat_time_day\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n), \n\nfinal as (\n\n select\n campaign_id,\n cast(stat_time_day as date) as stat_time_day,\n country_code,\n coalesce(clicks, 0) as clicks,\n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(conversion, 0) as conversion,\n coalesce(conversion_rate, 0) as conversion_rate,\n coalesce(cost_per_conversion, 0) as cost_per_conversion,\n coalesce(cpc, 0) as cpc,\n coalesce(cpm, 0) as cpm,\n coalesce(ctr, 0) as ctr,\n coalesce(real_time_conversion, 0) as real_time_conversion,\n source_relation,\n _fivetran_synced\n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__campaign_country_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__campaign_country_report_tmp", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/tmp/stg_tiktok_ads__campaign_country_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_tiktok_ads__campaign_country_report_tmp.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__campaign_country_report_tmp", "fqn": ["tiktok_ads", "staging", "tmp", "stg_tiktok_ads__campaign_country_report_tmp"], "alias": "stg_tiktok_ads__campaign_country_report_tmp", "checksum": {"name": "sha256", "checksum": "d7c90de674bcf5ae74eea872980ca47acdd5d4c0162743943c4263f6fe6b742b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450501.8898075, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_country_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true) and var('tiktok_ads__using_campaign_country_report', true)) }}\n\n{% if var('tiktok_ads_union_schemas', []) | length > 0 or var('tiktok_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_country_report', \n database_variable='tiktok_ads_database', \n schema_variable='tiktok_ads_schema', \n default_database=target.database,\n default_schema='tiktok_ads',\n default_variable='campaign_country_report',\n union_schema_variable='tiktok_ads_union_schemas',\n union_database_variable='tiktok_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='tiktok_ads_sources',\n single_source_name='tiktok_ads',\n single_table_name='campaign_country_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tiktok_ads", "campaign_country_report"], ["tiktok_ads", "campaign_country_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.tiktok_ads.tiktok_ads.campaign_country_report"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/tmp/stg_tiktok_ads__campaign_country_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: tiktok_ads_campaign_country_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: tiktok_campaign_country_report_data\n\n\n select\n \"_fivetran_synced\",\n \"campaign_id\",\n \"clicks\",\n \"conversion\",\n \"conversion_rate\",\n \"cost_per_conversion\",\n \"country_code\",\n \"cpc\",\n \"cpm\",\n \"ctr\",\n \"impressions\",\n \"real_time_conversion\",\n \"spend\",\n \"stat_time_day\"\n from \"postgres\".\"public\".\"tiktok_campaign_country_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__ad_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_history_tmp", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/tmp/stg_tiktok_ads__ad_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_tiktok_ads__ad_history_tmp.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_history_tmp", "fqn": ["tiktok_ads", "staging", "tmp", "stg_tiktok_ads__ad_history_tmp"], "alias": "stg_tiktok_ads__ad_history_tmp", "checksum": {"name": "sha256", "checksum": "d76353ca8b7ba780137ee13960485104668306f62d03d5a9d55abac6143a4987"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450501.9013672, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\n{% if var('tiktok_ads_union_schemas', []) | length > 0 or var('tiktok_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_history', \n database_variable='tiktok_ads_database', \n schema_variable='tiktok_ads_schema', \n default_database=target.database,\n default_schema='tiktok_ads',\n default_variable='ad_history',\n union_schema_variable='tiktok_ads_union_schemas',\n union_database_variable='tiktok_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='tiktok_ads_sources',\n single_source_name='tiktok_ads',\n single_table_name='ad_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tiktok_ads", "ad_history"], ["tiktok_ads", "ad_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.tiktok_ads.tiktok_ads.ad_history"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/tmp/stg_tiktok_ads__ad_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: tiktok_ads_ad_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: tiktok_ad_history_data\n\n\n select\n \"ad_id\",\n \"updated_at\",\n \"advertiser_id\",\n \"adgroup_id\",\n \"campaign_id\",\n \"create_time\",\n \"ad_name\",\n \"call_to_action\",\n \"secondary_status\",\n \"operation_status\",\n \"ad_text\",\n \"video_id\",\n \"app_name\",\n \"deeplink\",\n \"landing_page_url\",\n \"display_name\",\n \"profile_image_url\",\n \"impression_tracking_url\",\n \"click_tracking_url\",\n \"playable_url\",\n \"is_aco\",\n \"creative_authorized\",\n \"is_new_structure\",\n \"image_ids\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"tiktok_ad_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_report_hourly_tmp", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/tmp/stg_tiktok_ads__ad_report_hourly_tmp.sql", "original_file_path": "models/staging/tmp/stg_tiktok_ads__ad_report_hourly_tmp.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly_tmp", "fqn": ["tiktok_ads", "staging", "tmp", "stg_tiktok_ads__ad_report_hourly_tmp"], "alias": "stg_tiktok_ads__ad_report_hourly_tmp", "checksum": {"name": "sha256", "checksum": "2ffc850c7e67b4403ab60cf8557ae13120fb2c7fddf74b9dc0985ca0ce4a2b9b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450501.9123325, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_report_hourly_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\n{% if var('tiktok_ads_union_schemas', []) | length > 0 or var('tiktok_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_report_hourly', \n database_variable='tiktok_ads_database', \n schema_variable='tiktok_ads_schema', \n default_database=target.database,\n default_schema='tiktok_ads',\n default_variable='ad_report_hourly',\n union_schema_variable='tiktok_ads_union_schemas',\n union_database_variable='tiktok_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='tiktok_ads_sources',\n single_source_name='tiktok_ads',\n single_table_name='ad_report_hourly'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tiktok_ads", "ad_report_hourly"], ["tiktok_ads", "ad_report_hourly"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.tiktok_ads.tiktok_ads.ad_report_hourly"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/tmp/stg_tiktok_ads__ad_report_hourly_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: tiktok_ads_ad_report_hourly_identifier\n -- database: postgres \n -- schema: public\n -- identifier: tiktok_ad_report_hourly_data\n\n\n select\n \"ad_id\",\n \"stat_time_hour\",\n \"cost_per_conversion\",\n \"cpc\",\n \"video_play_actions\",\n \"conversion_rate\",\n \"video_views_p_75\",\n \"result\",\n \"video_views_p_50\",\n \"impressions\",\n \"comments\",\n \"real_time_cost_per_result\",\n \"conversion\",\n \"real_time_result\",\n \"video_views_p_100\",\n \"shares\",\n \"real_time_conversion_rate\",\n \"cost_per_secondary_goal_result\",\n \"secondary_goal_result_rate\",\n \"clicks\",\n \"cost_per_1000_reached\",\n \"video_views_p_25\",\n \"reach\",\n \"real_time_cost_per_conversion\",\n \"profile_visits_rate\",\n \"average_video_play\",\n \"profile_visits\",\n \"cpm\",\n \"ctr\",\n \"video_watched_2_s\",\n \"follows\",\n \"result_rate\",\n \"video_watched_6_s\",\n \"secondary_goal_result\",\n \"cost_per_result\",\n \"average_video_play_per_user\",\n \"real_time_result_rate\",\n \"spend\",\n \"likes\",\n \"real_time_conversion\",\n \"total_purchase_value\",\n \"total_sales_lead_value\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"tiktok_ad_report_hourly_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__campaign_report_hourly_tmp", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/tmp/stg_tiktok_ads__campaign_report_hourly_tmp.sql", "original_file_path": "models/staging/tmp/stg_tiktok_ads__campaign_report_hourly_tmp.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly_tmp", "fqn": ["tiktok_ads", "staging", "tmp", "stg_tiktok_ads__campaign_report_hourly_tmp"], "alias": "stg_tiktok_ads__campaign_report_hourly_tmp", "checksum": {"name": "sha256", "checksum": "8f0d1df15c93f581ab3b02e1e96dda529a30a45194dc90b794f65aa40e57c51d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450501.924787, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_report_hourly_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\n{% if var('tiktok_ads_union_schemas', []) | length > 0 or var('tiktok_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_report_hourly', \n database_variable='tiktok_ads_database', \n schema_variable='tiktok_ads_schema', \n default_database=target.database,\n default_schema='tiktok_ads',\n default_variable='campaign_report_hourly',\n union_schema_variable='tiktok_ads_union_schemas',\n union_database_variable='tiktok_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='tiktok_ads_sources',\n single_source_name='tiktok_ads',\n single_table_name='campaign_report_hourly'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tiktok_ads", "campaign_report_hourly"], ["tiktok_ads", "campaign_report_hourly"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.tiktok_ads.tiktok_ads.campaign_report_hourly"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/tmp/stg_tiktok_ads__campaign_report_hourly_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: tiktok_ads_campaign_report_hourly_identifier\n -- database: postgres \n -- schema: public\n -- identifier: tiktok_campaign_report_hourly_data\n\n\n select\n \"campaign_id\",\n \"stat_time_hour\",\n \"cost_per_conversion\",\n \"cpc\",\n \"video_play_actions\",\n \"conversion_rate\",\n \"video_views_p_75\",\n \"result\",\n \"video_views_p_50\",\n \"impressions\",\n \"comments\",\n \"real_time_cost_per_result\",\n \"conversion\",\n \"real_time_result\",\n \"video_views_p_100\",\n \"shares\",\n \"real_time_conversion_rate\",\n \"cost_per_secondary_goal_result\",\n \"secondary_goal_result_rate\",\n \"clicks\",\n \"cost_per_1000_reached\",\n \"video_views_p_25\",\n \"reach\",\n \"real_time_cost_per_conversion\",\n \"profile_visits_rate\",\n \"average_video_play\",\n \"profile_visits\",\n \"cpm\",\n \"ctr\",\n \"video_watched_2_s\",\n \"follows\",\n \"result_rate\",\n \"video_watched_6_s\",\n \"secondary_goal_result\",\n \"cost_per_result\",\n \"average_video_play_per_user\",\n \"real_time_result_rate\",\n \"spend\",\n \"likes\",\n \"real_time_conversion\",\n \"total_purchase_value\",\n \"total_sales_lead_value\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"tiktok_campaign_report_hourly_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_group_report_hourly_tmp", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/tmp/stg_tiktok_ads__ad_group_report_hourly_tmp.sql", "original_file_path": "models/staging/tmp/stg_tiktok_ads__ad_group_report_hourly_tmp.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly_tmp", "fqn": ["tiktok_ads", "staging", "tmp", "stg_tiktok_ads__ad_group_report_hourly_tmp"], "alias": "stg_tiktok_ads__ad_group_report_hourly_tmp", "checksum": {"name": "sha256", "checksum": "bab55a30e8f6e36f8a23e50fddedd7e74660fba6ee0502c57569cb89c02ced96"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450501.9354544, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_group_report_hourly_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\n{% if var('tiktok_ads_union_schemas', []) | length > 0 or var('tiktok_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='adgroup_report_hourly', \n database_variable='tiktok_ads_database', \n schema_variable='tiktok_ads_schema', \n default_database=target.database,\n default_schema='tiktok_ads',\n default_variable='adgroup_report_hourly',\n union_schema_variable='tiktok_ads_union_schemas',\n union_database_variable='tiktok_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='tiktok_ads_sources',\n single_source_name='tiktok_ads',\n single_table_name='adgroup_report_hourly'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tiktok_ads", "adgroup_report_hourly"], ["tiktok_ads", "adgroup_report_hourly"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.tiktok_ads.tiktok_ads.adgroup_report_hourly"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/tmp/stg_tiktok_ads__ad_group_report_hourly_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: tiktok_ads_adgroup_report_hourly_identifier\n -- database: postgres \n -- schema: public\n -- identifier: tiktok_adgroup_report_hourly_data\n\n\n select\n \"adgroup_id\",\n \"stat_time_hour\",\n \"cost_per_conversion\",\n \"cpc\",\n \"video_play_actions\",\n \"conversion_rate\",\n \"video_views_p_75\",\n \"result\",\n \"video_views_p_50\",\n \"impressions\",\n \"comments\",\n \"real_time_cost_per_result\",\n \"conversion\",\n \"real_time_result\",\n \"video_views_p_100\",\n \"shares\",\n \"real_time_conversion_rate\",\n \"cost_per_secondary_goal_result\",\n \"secondary_goal_result_rate\",\n \"clicks\",\n \"cost_per_1000_reached\",\n \"video_views_p_25\",\n \"reach\",\n \"real_time_cost_per_conversion\",\n \"profile_visits_rate\",\n \"average_video_play\",\n \"profile_visits\",\n \"cpm\",\n \"ctr\",\n \"video_watched_2_s\",\n \"follows\",\n \"result_rate\",\n \"video_watched_6_s\",\n \"secondary_goal_result\",\n \"cost_per_result\",\n \"average_video_play_per_user\",\n \"real_time_result_rate\",\n \"spend\",\n \"likes\",\n \"real_time_conversion\",\n \"total_purchase_value\",\n \"total_sales_lead_value\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"tiktok_adgroup_report_hourly_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__ad_group_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_group_history_tmp", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/tmp/stg_tiktok_ads__ad_group_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_tiktok_ads__ad_group_history_tmp.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_group_history_tmp", "fqn": ["tiktok_ads", "staging", "tmp", "stg_tiktok_ads__ad_group_history_tmp"], "alias": "stg_tiktok_ads__ad_group_history_tmp", "checksum": {"name": "sha256", "checksum": "b38c0d2158c9d862fd3f9adb72ef9bf957323e73e7d544907751eb5eb645f111"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450501.9461694, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_group_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\n{% if var('tiktok_ads_union_schemas', []) | length > 0 or var('tiktok_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='adgroup_history', \n database_variable='tiktok_ads_database', \n schema_variable='tiktok_ads_schema', \n default_database=target.database,\n default_schema='tiktok_ads',\n default_variable='adgroup_history',\n union_schema_variable='tiktok_ads_union_schemas',\n union_database_variable='tiktok_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='tiktok_ads_sources',\n single_source_name='tiktok_ads',\n single_table_name='adgroup_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tiktok_ads", "adgroup_history"], ["tiktok_ads", "adgroup_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.tiktok_ads.tiktok_ads.adgroup_history"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/tmp/stg_tiktok_ads__ad_group_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: tiktok_ads_adgroup_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: tiktok_adgroup_history_data\n\n\n select\n \"adgroup_id\",\n \"updated_at\",\n \"advertiser_id\",\n \"campaign_id\",\n \"create_time\",\n \"adgroup_name\",\n \"placement_type\",\n \"profile_image\",\n \"landing_page_url\",\n \"display_name\",\n \"app_type\",\n \"app_download_url\",\n \"app_name\",\n \"optimization_event\",\n \"secondary_optimization_event\",\n \"creative_material_mode\",\n \"audience_type\",\n \"gender\",\n \"min_android_version\",\n \"min_ios_version\",\n \"budget_mode\",\n \"schedule_type\",\n \"dayparting\",\n \"optimization_goal\",\n \"cpv_video_duration\",\n \"pacing\",\n \"billing_event\",\n \"bid_type\",\n \"deep_bid_type\",\n \"impression_tracking_url\",\n \"click_tracking_url\",\n \"secondary_status\",\n \"operation_status\",\n \"statistic_type\",\n \"video_download\",\n \"open_url\",\n \"open_url_type\",\n \"fallback_type\",\n \"budget\",\n \"bid_price\",\n \"conversion_bid_price\",\n \"deep_cpa_bid\",\n \"schedule_start_time\",\n \"schedule_end_time\",\n \"app_id\",\n \"pixel_id\",\n \"inventory_filter_enabled\",\n \"is_hfss\",\n \"is_new_structure\",\n \"category\",\n \"is_comment_disable\",\n \"skip_learning_phase\",\n \"frequency\",\n \"frequency_schedule\",\n \"action_days\",\n \"audience\",\n \"excluded_audience\",\n \"location\",\n \"interest_category_v_2\",\n \"pangle_block_app_list_id\",\n \"action_categories\",\n \"placements\",\n \"keywords\",\n \"age_groups\",\n \"languages\",\n \"operating_systems\",\n \"network_types\",\n \"carriers\",\n \"video_actions\",\n \"package\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"tiktok_adgroup_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__campaign_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__campaign_history_tmp", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/tmp/stg_tiktok_ads__campaign_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_tiktok_ads__campaign_history_tmp.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__campaign_history_tmp", "fqn": ["tiktok_ads", "staging", "tmp", "stg_tiktok_ads__campaign_history_tmp"], "alias": "stg_tiktok_ads__campaign_history_tmp", "checksum": {"name": "sha256", "checksum": "6aad4015833b55cf8121d550e86f4df7cc8853a448289028af58708b11a0c6e8"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450501.956786, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\n{% if var('tiktok_ads_union_schemas', []) | length > 0 or var('tiktok_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_history', \n database_variable='tiktok_ads_database', \n schema_variable='tiktok_ads_schema', \n default_database=target.database,\n default_schema='tiktok_ads',\n default_variable='campaign_history',\n union_schema_variable='tiktok_ads_union_schemas',\n union_database_variable='tiktok_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='tiktok_ads_sources',\n single_source_name='tiktok_ads',\n single_table_name='campaign_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tiktok_ads", "campaign_history"], ["tiktok_ads", "campaign_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.tiktok_ads.tiktok_ads.campaign_history"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/tmp/stg_tiktok_ads__campaign_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: tiktok_ads_campaign_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: tiktok_campaign_history_data\n\n\n select\n \"ad_id\",\n \"updated_at\",\n \"advertiser_id\",\n \"adgroup_id\",\n \"campaign_id\",\n \"create_time\",\n \"ad_name\",\n \"call_to_action\",\n \"secondary_status\",\n \"operation_status\",\n \"ad_text\",\n \"video_id\",\n \"app_name\",\n \"deeplink\",\n \"landing_page_url\",\n \"display_name\",\n \"profile_image_url\",\n \"impression_tracking_url\",\n \"click_tracking_url\",\n \"playable_url\",\n \"is_aco\",\n \"creative_authorized\",\n \"is_new_structure\",\n \"image_ids\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"tiktok_campaign_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__advertiser_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__advertiser_tmp", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/tmp/stg_tiktok_ads__advertiser_tmp.sql", "original_file_path": "models/staging/tmp/stg_tiktok_ads__advertiser_tmp.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__advertiser_tmp", "fqn": ["tiktok_ads", "staging", "tmp", "stg_tiktok_ads__advertiser_tmp"], "alias": "stg_tiktok_ads__advertiser_tmp", "checksum": {"name": "sha256", "checksum": "5f1de765650326643e68812b269762c3f2c47180c3e09568f1eef19d7fcba35d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450501.9689786, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__advertiser_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\n{% if var('tiktok_ads_union_schemas', []) | length > 0 or var('tiktok_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='advertiser', \n database_variable='tiktok_ads_database', \n schema_variable='tiktok_ads_schema', \n default_database=target.database,\n default_schema='tiktok_ads',\n default_variable='advertiser',\n union_schema_variable='tiktok_ads_union_schemas',\n union_database_variable='tiktok_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='tiktok_ads_sources',\n single_source_name='tiktok_ads',\n single_table_name='advertiser'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tiktok_ads", "advertiser"], ["tiktok_ads", "advertiser"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.tiktok_ads.tiktok_ads.advertiser"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/tmp/stg_tiktok_ads__advertiser_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: tiktok_ads_advertiser_identifier\n -- database: postgres \n -- schema: public\n -- identifier: tiktok_advertiser_data\n\n\n select\n \"id\",\n \"name\",\n \"address\",\n \"company\",\n \"contacter\",\n \"country\",\n \"currency\",\n \"description\",\n \"email\",\n \"industry\",\n \"license_no\",\n \"license_url\",\n \"promotion_area\",\n \"rejected_reason\",\n \"role\",\n \"status\",\n \"telephone_number\",\n \"timezone\",\n \"balance\",\n \"create_time\",\n \"language\",\n \"cellphone_number\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"tiktok_advertiser_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__location_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__location_tmp", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/tmp/stg_tiktok_ads__location_tmp.sql", "original_file_path": "models/staging/tmp/stg_tiktok_ads__location_tmp.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__location_tmp", "fqn": ["tiktok_ads", "staging", "tmp", "stg_tiktok_ads__location_tmp"], "alias": "stg_tiktok_ads__location_tmp", "checksum": {"name": "sha256", "checksum": "ffbfb89c7e57d42b17ae65f6363427e816399474288f39c880f340e8f88f410e"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450501.9793665, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__location_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true) and var('tiktok_ads__using_location', true)) }}\n\n{% if var('tiktok_ads_union_schemas', []) | length > 0 or var('tiktok_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='location',\n database_variable='tiktok_ads_database',\n schema_variable='tiktok_ads_schema',\n default_database=target.database,\n default_schema='tiktok_ads',\n default_variable='location',\n union_schema_variable='tiktok_ads_union_schemas',\n union_database_variable='tiktok_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='tiktok_ads_sources',\n single_source_name='tiktok_ads',\n single_table_name='location'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tiktok_ads", "location"], ["tiktok_ads", "location"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.tiktok_ads.tiktok_ads.location"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/tmp/stg_tiktok_ads__location_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: tiktok_ads_location_identifier\n -- database: postgres \n -- schema: public\n -- identifier: tiktok_location_data\n\n\n select\n \"_fivetran_synced\",\n \"advertiser_id\",\n \"area_type\",\n \"country_code\",\n \"parent_id\",\n \"region_id\",\n \"region_level\",\n \"region_name\",\n \"support_below_18\"\n from \"postgres\".\"public\".\"tiktok_location_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.microsoft_ads__keyword_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__keyword_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "microsoft_ads__keyword_report.sql", "original_file_path": "models/microsoft_ads__keyword_report.sql", "unique_id": "model.microsoft_ads.microsoft_ads__keyword_report", "fqn": ["microsoft_ads", "microsoft_ads__keyword_report"], "alias": "microsoft_ads__keyword_report", "checksum": {"name": "sha256", "checksum": "5caa9c62f3f31d211af7ef8bc54eefdfb404b9b2a4798462c02f16d2a550556d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily clicks, impressions, spend (and if applicable other passthrough metrics) of ads by keyword, ad, ad group, campaign, account, device os, device type, network and currency code.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_name": {"name": "account_name", "description": "The name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_name"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "ad_name": {"name": "ad_name", "description": "The name of the corresponding ad; `title_part_1` is used as the default ad name but you may customize this by using the `microsoft_ads__ad_name_selector` variable. For more information, refer to the [README](https://github.com/fivetran/dbt_microsoft_ads/blob/main/README.md#change-how-ad-name-is-determined).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_name"]}, "ad_id": {"name": "ad_id", "description": "The ID of the corresponding ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_id"]}, "keyword_name": {"name": "keyword_name", "description": "The keyword(s) associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.keyword_name"]}, "keyword_id": {"name": "keyword_id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.keyword_id"]}, "match_type": {"name": "match_type", "description": "The match type associated with this record; values contain but may not be limited to 'Broad', 'Exact', 'Phrase'. Please refer to Microsoft Ad's [documentation](https://help.ads.microsoft.com/#apex/ads/en/50822/1).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.match_type"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_value": {"name": "all_conversions_value", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.7679505, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__keyword_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_microsoft_ads__keyword_daily_report') }}\n\n), \n\nkeywords as (\n\n select *\n from {{ ref('stg_microsoft_ads__keyword_history') }}\n where is_most_recent_record = True\n),\n\nads as (\n\n select *\n from {{ ref('stg_microsoft_ads__ad_history') }}\n where is_most_recent_record = True\n\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_microsoft_ads__ad_group_history') }}\n where is_most_recent_record = True\n\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_microsoft_ads__campaign_history') }}\n where is_most_recent_record = True\n\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_microsoft_ads__account_history') }}\n where is_most_recent_record = True\n\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n ads.ad_name,\n report.ad_id,\n keywords.keyword_name,\n report.keyword_id,\n keywords.match_type,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n {{ microsoft_ads_persist_pass_through_columns(pass_through_variable='microsoft_ads__keyword_passthrough_metrics', transform='sum', coalesce_with=0, exclude_fields=['conversions', 'conversions_value', 'all_conversions', 'all_conversions_value']) }}\n\n from report\n left join ads\n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join keywords\n on report.keyword_id = keywords.keyword_id\n and report.source_relation = keywords.source_relation\n {{ dbt_utils.group_by(17) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__keyword_daily_report", "package": null, "version": null}, {"name": "stg_microsoft_ads__keyword_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__ad_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__campaign_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.microsoft_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__keyword_daily_report", "model.microsoft_ads.stg_microsoft_ads__keyword_history", "model.microsoft_ads.stg_microsoft_ads__ad_history", "model.microsoft_ads.stg_microsoft_ads__ad_group_history", "model.microsoft_ads.stg_microsoft_ads__campaign_history", "model.microsoft_ads.stg_microsoft_ads__account_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads__keyword_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__keyword_daily_report\"\n\n), \n\nkeywords as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__keyword_history\"\n where is_most_recent_record = True\n),\n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_history\"\n where is_most_recent_record = True\n\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_group_history\"\n where is_most_recent_record = True\n\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_history\"\n where is_most_recent_record = True\n\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_history\"\n where is_most_recent_record = True\n\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n ads.ad_name,\n report.ad_id,\n keywords.keyword_name,\n report.keyword_id,\n keywords.match_type,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n \n\n\n\n\n\n from report\n left join ads\n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join keywords\n on report.keyword_id = keywords.keyword_id\n and report.source_relation = keywords.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.microsoft_ads__url_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__url_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "microsoft_ads__url_report.sql", "original_file_path": "models/microsoft_ads__url_report.sql", "unique_id": "model.microsoft_ads.microsoft_ads__url_report", "fqn": ["microsoft_ads", "microsoft_ads__url_report"], "alias": "microsoft_ads__url_report", "checksum": {"name": "sha256", "checksum": "bcb01e337414f8df64f53bb8bb07447c355b82b9cbf25cdaee56341a38672440"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily clicks, impressions, spend (and if applicable other passthrough metrics) of ads by ad, ad group, campaign, account, ad type, device os, device type, network, currency code, url and utm parameters.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_name": {"name": "account_name", "description": "The name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_name"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "ad_name": {"name": "ad_name", "description": "The name of the corresponding ad; `title_part_1` is used as the default ad name but you may customize this by using the `microsoft_ads__ad_name_selector` variable. For more information, refer to the [README](https://github.com/fivetran/dbt_microsoft_ads/blob/main/README.md#change-how-ad-name-is-determined).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_name"]}, "ad_id": {"name": "ad_id", "description": "The ID of the corresponding ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_id"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the `final_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_host": {"name": "url_host", "description": "The URL host of the ad, extracted from the `final_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_path": {"name": "url_path", "description": "The URL path of the ad, extracted from the `final_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_source": {"name": "utm_source", "description": "The site that sent traffic to your page. Microsoft Advertising sets this to Bing; extracted from the `final_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_medium": {"name": "utm_medium", "description": "Which channel was used. Microsoft Advertising sets this to cp; extracted from the `final_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_campaign": {"name": "utm_campaign", "description": "Which campaign the keyword came from; extracted from the `final_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_content": {"name": "utm_content", "description": "Which ad group the keyword came from; extracted from the `final_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_term": {"name": "utm_term", "description": "Which keyword brought people to your website; extracted from the `final_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_value": {"name": "all_conversions_value", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.7714174, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__url_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_microsoft_ads__ad_daily_report') }}\n\n), \n\nads as (\n\n select *\n from {{ ref('stg_microsoft_ads__ad_history') }}\n where is_most_recent_record = True\n\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_microsoft_ads__ad_group_history') }}\n where is_most_recent_record = True\n\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_microsoft_ads__campaign_history') }}\n where is_most_recent_record = True\n\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_microsoft_ads__account_history') }}\n where is_most_recent_record = True\n\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n ads.ad_name,\n report.ad_id,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n {{ dbt.split_part('ads.final_url', \"'?'\", 1) }} as base_url,\n {{ dbt_utils.get_url_host('ads.final_url') }} as url_host,\n '/' || {{ dbt_utils.get_url_path('ads.final_url') }} as url_path,\n\n {% if var('microsoft_ads_auto_tagging_enabled', false) %}\n\n coalesce( {{ microsoft_ads.microsoft_ads_extract_url_parameter('ads.final_url', 'utm_source') }} , 'Bing') as utm_source,\n coalesce( {{ microsoft_ads.microsoft_ads_extract_url_parameter('ads.final_url', 'utm_medium') }}, 'cpc') as utm_medium,\n coalesce( {{ microsoft_ads.microsoft_ads_extract_url_parameter('ads.final_url', 'utm_campaign') }}, campaigns.campaign_name) as utm_campaign,\n coalesce( {{ microsoft_ads.microsoft_ads_extract_url_parameter('ads.final_url', 'utm_content') }}, ad_groups.ad_group_name) as utm_content,\n {% else %}\n\n {{ microsoft_ads.microsoft_ads_extract_url_parameter('ads.final_url', 'utm_source') }} as utm_source,\n {{ microsoft_ads.microsoft_ads_extract_url_parameter('ads.final_url', 'utm_medium') }} as utm_medium,\n {{ microsoft_ads.microsoft_ads_extract_url_parameter('ads.final_url', 'utm_campaign') }} as utm_campaign,\n {{ microsoft_ads.microsoft_ads_extract_url_parameter('ads.final_url', 'utm_content') }} as utm_content,\n {% endif %}\n\n {{ microsoft_ads.microsoft_ads_extract_url_parameter('ads.final_url', 'utm_term') }} as utm_term,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n {{ microsoft_ads_persist_pass_through_columns(pass_through_variable='microsoft_ads__ad_passthrough_metrics', transform='sum', coalesce_with=0, exclude_fields=['conversions', 'conversions_value', 'all_conversions', 'all_conversions_value']) }}\n\n from report\n left join ads\n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n {{ dbt_utils.group_by(22) }}\n), \n\nfiltered as (\n\n select * \n from joined\n\n {% if var('ad_reporting__url_report__using_null_filter', True) %}\n where base_url is not null\n {% endif %}\n)\n\nselect *\nfrom filtered", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__ad_daily_report", "package": null, "version": null}, {"name": "stg_microsoft_ads__ad_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__campaign_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.split_part", "macro.dbt_utils.get_url_host", "macro.dbt_utils.get_url_path", "macro.microsoft_ads.microsoft_ads_extract_url_parameter", "macro.microsoft_ads.microsoft_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__ad_daily_report", "model.microsoft_ads.stg_microsoft_ads__ad_history", "model.microsoft_ads.stg_microsoft_ads__ad_group_history", "model.microsoft_ads.stg_microsoft_ads__campaign_history", "model.microsoft_ads.stg_microsoft_ads__account_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads__url_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_daily_report\"\n\n), \n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_history\"\n where is_most_recent_record = True\n\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_group_history\"\n where is_most_recent_record = True\n\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_history\"\n where is_most_recent_record = True\n\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_history\"\n where is_most_recent_record = True\n\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n ads.ad_name,\n report.ad_id,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n \n\n \n \n\n split_part(\n ads.final_url,\n '?',\n 1\n )\n\n\n \n\n as base_url,\n \n \n cast(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n \n\n replace(\n \n\n replace(\n \n\n replace(\n ads.final_url,\n 'android-app://',\n ''\n )\n\n\n,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n '/',\n 1\n )\n\n\n \n\n,\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_host,\n '/' || \n \n cast(\n\n \n \n\n split_part(\n \n\n right(\n \n\n replace(\n \n\n replace(\n ads.final_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n \n\n length(\n \n\n replace(\n \n\n replace(\n ads.final_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n )-coalesce(\n nullif(\n\n position(\n '/' in \n\n replace(\n \n\n replace(\n ads.final_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ), 0),\n \n\n position(\n '?' in \n\n replace(\n \n\n replace(\n ads.final_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ) - 1\n )\n ),\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_path,\n\n \n\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n ads.final_url,\n 'utm_source=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_source,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n ads.final_url,\n 'utm_medium=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_medium,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n ads.final_url,\n 'utm_campaign=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_campaign,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n ads.final_url,\n 'utm_content=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_content,\n \n\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n ads.final_url,\n 'utm_term=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_term,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n \n\n\n\n\n\n from report\n left join ads\n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22\n), \n\nfiltered as (\n\n select * \n from joined\n\n \n where base_url is not null\n \n)\n\nselect *\nfrom filtered", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.microsoft_ads__account_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__account_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "microsoft_ads__account_report.sql", "original_file_path": "models/microsoft_ads__account_report.sql", "unique_id": "model.microsoft_ads.microsoft_ads__account_report", "fqn": ["microsoft_ads", "microsoft_ads__account_report"], "alias": "microsoft_ads__account_report", "checksum": {"name": "sha256", "checksum": "a1f9fa8dd6e85c9184c2e1c68a72c93d27996f919373a1f32672b64ff5415d63"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily clicks, impressions, spend (and if applicable other passthrough metrics) of ads by account, account timezone, device os, device type, network and currency code.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_name": {"name": "account_name", "description": "The name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_name"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "account_timezone": {"name": "account_timezone", "description": "The time zone associated with this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_timezone"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.7608848, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__account_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_microsoft_ads__account_daily_report') }}\n\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_microsoft_ads__account_history') }}\n where is_most_recent_record = True\n)\n\n, joined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_name,\n report.account_id,\n accounts.time_zone as account_timezone,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions\n -- all_conversion_value is not available for the account_report\n\n {{ microsoft_ads_persist_pass_through_columns(pass_through_variable='microsoft_ads__account_passthrough_metrics', transform='sum', coalesce_with=0, exclude_fields=['conversions_value', 'conversions', 'all_conversions']) }} \n \n from report\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n {{ dbt_utils.group_by(9) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__account_daily_report", "package": null, "version": null}, {"name": "stg_microsoft_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.microsoft_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__account_daily_report", "model.microsoft_ads.stg_microsoft_ads__account_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads__account_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_daily_report\"\n\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_history\"\n where is_most_recent_record = True\n)\n\n, joined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_name,\n report.account_id,\n accounts.time_zone as account_timezone,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions\n -- all_conversion_value is not available for the account_report\n\n \n\n\n\n \n \n from report\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n group by 1,2,3,4,5,6,7,8,9\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.microsoft_ads__campaign_country_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__campaign_country_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "microsoft_ads__campaign_country_report.sql", "original_file_path": "models/microsoft_ads__campaign_country_report.sql", "unique_id": "model.microsoft_ads.microsoft_ads__campaign_country_report", "fqn": ["microsoft_ads", "microsoft_ads__campaign_country_report"], "alias": "microsoft_ads__campaign_country_report", "checksum": {"name": "sha256", "checksum": "c26ac1733a8ad10f1f3e8def7d5fbae25b93a1fe18e749869554590a6f35fa7f"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads by country, account, campaign, campaign type, campaign timezone, campaign status, device os, device type, network, and currency code.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "country": {"name": "country", "description": "The country or region where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.country"]}, "account_name": {"name": "account_name", "description": "The name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_name"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "campaign_type": {"name": "campaign_type", "description": "The campaign type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaigntype?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_type"]}, "campaign_timezone": {"name": "campaign_timezone", "description": "The time zone associated with this campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_timezone"]}, "campaign_status": {"name": "campaign_status", "description": "The status of this campaign; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaignstatus?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_status"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "location_id": {"name": "location_id", "description": "The Microsoft Advertising identifier of the location where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.location_id"]}, "goal": {"name": "goal", "description": "The name of the goal you set for the conversions you want, meaning actions customers take after clicking your ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.goal"]}, "geo_language": {"name": "geo_language", "description": "The language of the publisher where the ad was shown.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_budget": {"name": "campaign_budget", "description": "The amount to spend daily across all campaigns that share the budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget"]}, "campaign_budget_id": {"name": "campaign_budget_id", "description": "The unique Microsoft Advertising identifier of the budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget_id"]}, "campaign_budget_type": {"name": "campaign_budget_type", "description": "The budget type determines the pace at which the budget is spent throughout the day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget_type"]}, "campaign_language": {"name": "campaign_language", "description": "The language that the associated ad was viewed in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.language"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_value": {"name": "all_conversions_value", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.7748508, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_country_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True) and var('microsoft_ads__using_geographic_daily_report', False)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_microsoft_ads__geographic_daily_report') }}\n\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_microsoft_ads__campaign_history') }}\n where is_most_recent_record = True\n\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_microsoft_ads__account_history') }}\n where is_most_recent_record = True\n\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n report.country,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n campaigns.type as campaign_type,\n campaigns.time_zone as campaign_timezone,\n campaigns.status as campaign_status,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n report.location_id,\n report.goal,\n report.language as geo_language,\n campaigns.budget as campaign_budget,\n campaigns.budget_id as campaign_budget_id,\n campaigns.budget_type as campaign_budget_type,\n campaigns.language as campaign_language,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n {{ microsoft_ads_persist_pass_through_columns(pass_through_variable='microsoft_ads__geographic_passthrough_metrics', transform='sum', coalesce_with=0) }} \n\n from report\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n {{ dbt_utils.group_by(21) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__geographic_daily_report", "package": null, "version": null}, {"name": "stg_microsoft_ads__campaign_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.microsoft_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__geographic_daily_report", "model.microsoft_ads.stg_microsoft_ads__campaign_history", "model.microsoft_ads.stg_microsoft_ads__account_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads__campaign_country_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__geographic_daily_report\"\n\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_history\"\n where is_most_recent_record = True\n\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_history\"\n where is_most_recent_record = True\n\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n report.country,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n campaigns.type as campaign_type,\n campaigns.time_zone as campaign_timezone,\n campaigns.status as campaign_status,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n report.location_id,\n report.goal,\n report.language as geo_language,\n campaigns.budget as campaign_budget,\n campaigns.budget_id as campaign_budget_id,\n campaigns.budget_type as campaign_budget_type,\n campaigns.language as campaign_language,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n \n\n\n\n \n\n from report\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.microsoft_ads__campaign_region_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__campaign_region_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "microsoft_ads__campaign_region_report.sql", "original_file_path": "models/microsoft_ads__campaign_region_report.sql", "unique_id": "model.microsoft_ads.microsoft_ads__campaign_region_report", "fqn": ["microsoft_ads", "microsoft_ads__campaign_region_report"], "alias": "microsoft_ads__campaign_region_report", "checksum": {"name": "sha256", "checksum": "9c372c18809334e3e4e875e4f7a73dd6f2ebd8a73e3b66c308ed6a498ec6f281"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads by state or region, account, campaign, campaign type, campaign timezone, campaign status, device os, device type, network, and currency code.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "region": {"name": "region", "description": "The state or geographic region where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.state"]}, "country": {"name": "country", "description": "The country or region where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.country"]}, "account_name": {"name": "account_name", "description": "The name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_name"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "campaign_type": {"name": "campaign_type", "description": "The campaign type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaigntype?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_type"]}, "campaign_timezone": {"name": "campaign_timezone", "description": "The time zone associated with this campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_timezone"]}, "campaign_status": {"name": "campaign_status", "description": "The status of this campaign; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaignstatus?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_status"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "location_id": {"name": "location_id", "description": "The Microsoft Advertising identifier of the location where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.location_id"]}, "goal": {"name": "goal", "description": "The name of the goal you set for the conversions you want, meaning actions customers take after clicking your ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.goal"]}, "geo_language": {"name": "geo_language", "description": "The language of the publisher where the ad was shown.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_budget": {"name": "campaign_budget", "description": "The amount to spend daily across all campaigns that share the budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget"]}, "campaign_budget_id": {"name": "campaign_budget_id", "description": "The unique Microsoft Advertising identifier of the budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget_id"]}, "campaign_budget_type": {"name": "campaign_budget_type", "description": "The budget type determines the pace at which the budget is spent throughout the day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget_type"]}, "campaign_language": {"name": "campaign_language", "description": "The language that the associated ad was viewed in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.language"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_value": {"name": "all_conversions_value", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.7768955, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_region_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True) and var('microsoft_ads__using_geographic_daily_report', False)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_microsoft_ads__geographic_daily_report') }}\n\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_microsoft_ads__campaign_history') }}\n where is_most_recent_record = True\n\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_microsoft_ads__account_history') }}\n where is_most_recent_record = True\n\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n report.region,\n report.country,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n campaigns.type as campaign_type,\n campaigns.time_zone as campaign_timezone,\n campaigns.status as campaign_status,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n report.location_id,\n report.goal,\n report.language as geo_language,\n campaigns.budget as campaign_budget,\n campaigns.budget_id as campaign_budget_id,\n campaigns.budget_type as campaign_budget_type,\n campaigns.language as campaign_language,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n {{ microsoft_ads_persist_pass_through_columns(pass_through_variable='microsoft_ads__geographic_passthrough_metrics', transform='sum', coalesce_with=0) }} \n\n from report\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n {{ dbt_utils.group_by(22) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__geographic_daily_report", "package": null, "version": null}, {"name": "stg_microsoft_ads__campaign_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.microsoft_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__geographic_daily_report", "model.microsoft_ads.stg_microsoft_ads__campaign_history", "model.microsoft_ads.stg_microsoft_ads__account_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads__campaign_region_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__geographic_daily_report\"\n\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_history\"\n where is_most_recent_record = True\n\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_history\"\n where is_most_recent_record = True\n\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n report.region,\n report.country,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n campaigns.type as campaign_type,\n campaigns.time_zone as campaign_timezone,\n campaigns.status as campaign_status,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n report.location_id,\n report.goal,\n report.language as geo_language,\n campaigns.budget as campaign_budget,\n campaigns.budget_id as campaign_budget_id,\n campaigns.budget_type as campaign_budget_type,\n campaigns.language as campaign_language,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n \n\n\n\n \n\n from report\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.microsoft_ads__ad_group_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__ad_group_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "microsoft_ads__ad_group_report.sql", "original_file_path": "models/microsoft_ads__ad_group_report.sql", "unique_id": "model.microsoft_ads.microsoft_ads__ad_group_report", "fqn": ["microsoft_ads", "microsoft_ads__ad_group_report"], "alias": "microsoft_ads__ad_group_report", "checksum": {"name": "sha256", "checksum": "cf9dc9bb7f8eb119c9c39add58869c116d443774ca6597f17f69f599709d48a3"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily clicks, impressions, spend (and if applicable other passthrough metrics) of ads by ad group, campaign, account, device os, device type, network and currency code.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_name": {"name": "account_name", "description": "The name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_name"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_value": {"name": "all_conversions_value", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.7626808, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__ad_group_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_microsoft_ads__ad_group_daily_report') }}\n\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_microsoft_ads__ad_group_history') }}\n where is_most_recent_record = True\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_microsoft_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\naccounts as (\n\n select *\n from {{ ref('stg_microsoft_ads__account_history') }}\n where is_most_recent_record = True\n),\n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value, \n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n {{ microsoft_ads_persist_pass_through_columns(pass_through_variable='microsoft_ads__ad_group_passthrough_metrics', transform='sum', coalesce_with=0, exclude_fields=['conversions', 'conversions_value', 'all_conversions', 'all_conversions_value']) }} \n from report\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n {{ dbt_utils.group_by(12) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__ad_group_daily_report", "package": null, "version": null}, {"name": "stg_microsoft_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__campaign_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.microsoft_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report", "model.microsoft_ads.stg_microsoft_ads__ad_group_history", "model.microsoft_ads.stg_microsoft_ads__campaign_history", "model.microsoft_ads.stg_microsoft_ads__account_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads__ad_group_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_group_daily_report\"\n\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_group_history\"\n where is_most_recent_record = True\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_history\"\n where is_most_recent_record = True\n),\n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value, \n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n \n\n\n\n \n from report\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.microsoft_ads__ad_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__ad_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "microsoft_ads__ad_report.sql", "original_file_path": "models/microsoft_ads__ad_report.sql", "unique_id": "model.microsoft_ads.microsoft_ads__ad_report", "fqn": ["microsoft_ads", "microsoft_ads__ad_report"], "alias": "microsoft_ads__ad_report", "checksum": {"name": "sha256", "checksum": "6ae8dbf67fb1306668d52910df6589e56bec50877fdb4967466bbb684aa69b02"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily clicks, impressions, spend (and if applicable other passthrough metrics) of ads by ad, ad group, campaign, account, ad type, device os, device type, network and currency code.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_name": {"name": "account_name", "description": "The name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_name"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "ad_name": {"name": "ad_name", "description": "The name of the corresponding ad; `title_part_1` is used as the default ad name but you may customize this by using the `microsoft_ads__ad_name_selector` variable. For more information, refer to the [README](https://github.com/fivetran/dbt_microsoft_ads/blob/main/README.md#change-how-ad-name-is-determined).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_name"]}, "ad_id": {"name": "ad_id", "description": "The ID of the corresponding ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_id"]}, "ad_type": {"name": "ad_type", "description": "The ad type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/adtype?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_type"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_value": {"name": "all_conversions_value", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.7642107, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__ad_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_microsoft_ads__ad_daily_report') }}\n\n), \n\nads as (\n\n select *\n from {{ ref('stg_microsoft_ads__ad_history') }}\n where is_most_recent_record = True\n\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_microsoft_ads__ad_group_history') }}\n where is_most_recent_record = True\n\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_microsoft_ads__campaign_history') }}\n where is_most_recent_record = True\n\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_microsoft_ads__account_history') }}\n where is_most_recent_record = True\n\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n ads.ad_name,\n report.ad_id,\n ads.type as ad_type,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n {{ microsoft_ads_persist_pass_through_columns(pass_through_variable='microsoft_ads__ad_passthrough_metrics', transform='sum', coalesce_with=0, exclude_fields=['conversions', 'conversions_value', 'all_conversions', 'all_conversions_value']) }} \n\n from report\n left join ads\n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n {{ dbt_utils.group_by(15) }}\n\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__ad_daily_report", "package": null, "version": null}, {"name": "stg_microsoft_ads__ad_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__campaign_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.microsoft_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__ad_daily_report", "model.microsoft_ads.stg_microsoft_ads__ad_history", "model.microsoft_ads.stg_microsoft_ads__ad_group_history", "model.microsoft_ads.stg_microsoft_ads__campaign_history", "model.microsoft_ads.stg_microsoft_ads__account_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads__ad_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_daily_report\"\n\n), \n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_history\"\n where is_most_recent_record = True\n\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_group_history\"\n where is_most_recent_record = True\n\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_history\"\n where is_most_recent_record = True\n\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_history\"\n where is_most_recent_record = True\n\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n ads.ad_name,\n report.ad_id,\n ads.type as ad_type,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n \n\n\n\n \n\n from report\n left join ads\n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15\n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.microsoft_ads__search_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__search_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "microsoft_ads__search_report.sql", "original_file_path": "models/microsoft_ads__search_report.sql", "unique_id": "model.microsoft_ads.microsoft_ads__search_report", "fqn": ["microsoft_ads", "microsoft_ads__search_report"], "alias": "microsoft_ads__search_report", "checksum": {"name": "sha256", "checksum": "6c95ed70f275580780a9635cc1d758b21fc4e145c31bb996cd58682116b89656"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily clicks, impressions, spend (and if applicable other passthrough metrics) of ads by search query, keyword, ad, ad group, campaign, account, device os, device type and network.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_name": {"name": "account_name", "description": "The name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_name"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "ad_name": {"name": "ad_name", "description": "The name of the corresponding ad; `title_part_1` is used as the default ad name but you may customize this by using the `microsoft_ads__ad_name_selector` variable. For more information, refer to the [README](https://github.com/fivetran/dbt_microsoft_ads/blob/main/README.md#change-how-ad-name-is-determined).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_name"]}, "ad_id": {"name": "ad_id", "description": "The ID of the corresponding ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_id"]}, "keyword_name": {"name": "keyword_name", "description": "The keyword(s) associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.keyword_name"]}, "keyword_id": {"name": "keyword_id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.keyword_id"]}, "match_type": {"name": "match_type", "description": "The match type associated with this record; values contain but may not be limited to 'Broad', 'Exact', 'Phrase'. Please refer to Microsoft Ad's [documentation](https://help.ads.microsoft.com/#apex/ads/en/50822/1).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.match_type"]}, "search_query": {"name": "search_query", "description": "The search query string associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.search_query"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_value": {"name": "all_conversions_value", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.7695856, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__search_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_microsoft_ads__search_daily_report') }}\n\n), \n\nkeywords as (\n\n select *\n from {{ ref('stg_microsoft_ads__keyword_history') }}\n where is_most_recent_record = True\n),\n\nads as (\n\n select *\n from {{ ref('stg_microsoft_ads__ad_history') }}\n where is_most_recent_record = True\n\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_microsoft_ads__ad_group_history') }}\n where is_most_recent_record = True\n\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_microsoft_ads__campaign_history') }}\n where is_most_recent_record = True\n\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_microsoft_ads__account_history') }}\n where is_most_recent_record = True\n\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n ads.ad_name,\n report.ad_id,\n report.keyword_id,\n keywords.keyword_name,\n coalesce(report.delivered_match_type, report.bid_match_type) as match_type,\n report.search_query,\n report.device_os,\n report.device_type,\n report.network,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n {{ microsoft_ads_persist_pass_through_columns(pass_through_variable='microsoft_ads__search_passthrough_metrics', transform='sum', coalesce_with=0, exclude_fields=['conversions', 'conversions_value', 'all_conversions', 'all_conversions_value']) }}\n\n from report\n left join ads\n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join keywords\n on report.keyword_id = keywords.keyword_id\n and report.source_relation = keywords.source_relation\n {{ dbt_utils.group_by(17) }}\n\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__search_daily_report", "package": null, "version": null}, {"name": "stg_microsoft_ads__keyword_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__ad_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__campaign_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.microsoft_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__search_daily_report", "model.microsoft_ads.stg_microsoft_ads__keyword_history", "model.microsoft_ads.stg_microsoft_ads__ad_history", "model.microsoft_ads.stg_microsoft_ads__ad_group_history", "model.microsoft_ads.stg_microsoft_ads__campaign_history", "model.microsoft_ads.stg_microsoft_ads__account_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads__search_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__search_daily_report\"\n\n), \n\nkeywords as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__keyword_history\"\n where is_most_recent_record = True\n),\n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_history\"\n where is_most_recent_record = True\n\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_group_history\"\n where is_most_recent_record = True\n\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_history\"\n where is_most_recent_record = True\n\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_history\"\n where is_most_recent_record = True\n\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n ads.ad_name,\n report.ad_id,\n report.keyword_id,\n keywords.keyword_name,\n coalesce(report.delivered_match_type, report.bid_match_type) as match_type,\n report.search_query,\n report.device_os,\n report.device_type,\n report.network,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n \n\n\n\n\n\n from report\n left join ads\n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join keywords\n on report.keyword_id = keywords.keyword_id\n and report.source_relation = keywords.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17\n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.microsoft_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__campaign_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "microsoft_ads__campaign_report.sql", "original_file_path": "models/microsoft_ads__campaign_report.sql", "unique_id": "model.microsoft_ads.microsoft_ads__campaign_report", "fqn": ["microsoft_ads", "microsoft_ads__campaign_report"], "alias": "microsoft_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "8d5964101af657167486f7e609012d7a5882ce6c6d60aab7075075bff2829929"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily clicks, impressions, spend (and if applicable other passthrough metrics) of ads by campaign, account, campaign type, campaign timezone, campaign status, device os, device type, network and currency code.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_name": {"name": "account_name", "description": "The name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_name"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "campaign_type": {"name": "campaign_type", "description": "The campaign type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaigntype?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_type"]}, "campaign_timezone": {"name": "campaign_timezone", "description": "The time zone associated with this campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_timezone"]}, "campaign_status": {"name": "campaign_status", "description": "The status of this campaign; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaignstatus?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_status"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_value": {"name": "all_conversions_value", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.7659645, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_microsoft_ads__campaign_daily_report') }}\n\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_microsoft_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\naccounts as (\n\n select *\n from {{ ref('stg_microsoft_ads__account_history') }}\n where is_most_recent_record = True\n),\n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n campaigns.type as campaign_type,\n campaigns.time_zone as campaign_timezone,\n campaigns.status as campaign_status,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n {{ microsoft_ads_persist_pass_through_columns(pass_through_variable='microsoft_ads__campaign_passthrough_metrics', transform='sum', coalesce_with=0, exclude_fields=['conversions', 'conversions_value', 'all_conversions', 'all_conversions_value']) }} \n\n from report\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n {{ dbt_utils.group_by(13) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__campaign_daily_report", "package": null, "version": null}, {"name": "stg_microsoft_ads__campaign_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.microsoft_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__campaign_daily_report", "model.microsoft_ads.stg_microsoft_ads__campaign_history", "model.microsoft_ads.stg_microsoft_ads__account_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_daily_report\"\n\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_history\"\n where is_most_recent_record = True\n),\n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n campaigns.type as campaign_type,\n campaigns.time_zone as campaign_timezone,\n campaigns.status as campaign_status,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n \n\n\n\n \n\n from report\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__account_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__account_history", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/stg_microsoft_ads__account_history.sql", "original_file_path": "models/staging/stg_microsoft_ads__account_history.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__account_history", "fqn": ["microsoft_ads", "staging", "stg_microsoft_ads__account_history"], "alias": "stg_microsoft_ads__account_history", "checksum": {"name": "sha256", "checksum": "da2473dc4540e08bcb7f17e397c2243d024dff18acd657774c50906912688ab2"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a version of one or more Microsoft accounts.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "account_name": {"name": "account_name", "description": "The name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_name"]}, "modified_at": {"name": "modified_at", "description": "The time each version of the object was last modified, i.e. when that version of the object was 'created'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.modified_at"]}, "time_zone": {"name": "time_zone", "description": "The time zone associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.time_zone"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/staging/stg_microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.8372283, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_microsoft_ads__account_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_microsoft_ads__account_history_tmp')),\n staging_columns=get_account_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='microsoft_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as account_id,\n name as account_name,\n last_modified_time as modified_at,\n time_zone,\n currency_code,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='microsoft_ads') }} order by last_modified_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__account_history_tmp", "package": null, "version": null}, {"name": "stg_microsoft_ads__account_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.get_account_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__account_history_tmp"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads__account_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_history_tmp\"\n),\n\nfields as (\n\n select\n \n id as id,\n name as name,\n last_modified_time as last_modified_time,\n time_zone as time_zone,\n currency_code as currency_code\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as account_id,\n name as account_name,\n last_modified_time as modified_at,\n time_zone,\n currency_code,\n row_number() over (partition by id order by last_modified_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_group_daily_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/stg_microsoft_ads__ad_group_daily_report.sql", "original_file_path": "models/staging/stg_microsoft_ads__ad_group_daily_report.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report", "fqn": ["microsoft_ads", "staging", "stg_microsoft_ads__ad_group_daily_report"], "alias": "stg_microsoft_ads__ad_group_daily_report", "checksum": {"name": "sha256", "checksum": "9f0ee61715ffc7c14eee054e789aa199218eac607923372c713f84a58a044611"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance by account, campaign, ad group and all non-metric columns.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "language": {"name": "language", "description": "The language that the associated ad was viewed in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.language"]}, "ad_distribution": {"name": "ad_distribution", "description": "The distribution medium associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_distribution"]}, "bid_match_type": {"name": "bid_match_type", "description": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.bid_match_type"]}, "delivered_match_type": {"name": "delivered_match_type", "description": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.delivered_match_type"]}, "top_vs_other": {"name": "top_vs_other", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_value": {"name": "all_conversions_value", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/staging/stg_microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.842885, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_group_daily_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_microsoft_ads__ad_group_daily_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_microsoft_ads__ad_group_daily_report_tmp')),\n staging_columns=get_ad_group_daily_report_columns()\n )\n }}\n\n \n {{ fivetran_utils.apply_source_relation(package_name='microsoft_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n account_id,\n campaign_id,\n ad_group_id,\n currency_code,\n device_os,\n device_type,\n network,\n language,\n ad_distribution,\n bid_match_type,\n delivered_match_type,\n top_vs_other,\n coalesce(clicks, 0) as clicks, \n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(coalesce(cast(conversions_qualified as {{ dbt.type_int() }}), cast(conversions as {{ dbt.type_int() }})), 0) as conversions,\n coalesce(cast(revenue as {{ dbt.type_float() }}), 0) as conversions_value,\n coalesce(coalesce(cast(all_conversions_qualified as {{ dbt.type_int() }}), cast(all_conversions as {{ dbt.type_int() }})), 0) as all_conversions,\n -- sometimes this field comes in as a string\n coalesce(cast(replace(cast(all_revenue as {{ dbt.type_string() }}), ',', '') as {{ dbt.type_float() }}), 0) as all_conversions_value\n\n {{ microsoft_ads_fill_pass_through_columns(pass_through_fields=var('microsoft_ads__ad_group_passthrough_metrics'), except=['conversions', 'conversions_value', 'all_conversions', 'all_conversions_value']) }}\n\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__ad_group_daily_report_tmp", "package": null, "version": null}, {"name": "stg_microsoft_ads__ad_group_daily_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.get_ad_group_daily_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_int", "macro.dbt.type_float", "macro.dbt.type_string", "macro.microsoft_ads.microsoft_ads_fill_pass_through_columns"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report_tmp"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads__ad_group_daily_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_group_daily_report_tmp\"\n),\n\nfields as (\n\n select\n \n account_id as account_id,\n ad_distribution as ad_distribution,\n ad_group_id as ad_group_id,\n bid_match_type as bid_match_type,\n campaign_id as campaign_id,\n clicks as clicks,\n currency_code as currency_code,\n date as date,\n delivered_match_type as delivered_match_type,\n device_os as device_os,\n device_type as device_type,\n impressions as impressions,\n language as language,\n network as network,\n spend as spend,\n top_vs_other as top_vs_other,\n conversions_qualified as conversions_qualified,\n conversions as conversions,\n revenue as revenue,\n all_conversions as all_conversions,\n all_conversions_qualified as all_conversions_qualified,\n all_revenue as all_revenue\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n account_id,\n campaign_id,\n ad_group_id,\n currency_code,\n device_os,\n device_type,\n network,\n language,\n ad_distribution,\n bid_match_type,\n delivered_match_type,\n top_vs_other,\n coalesce(clicks, 0) as clicks, \n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(coalesce(cast(conversions_qualified as integer), cast(conversions as integer)), 0) as conversions,\n coalesce(cast(revenue as float), 0) as conversions_value,\n coalesce(coalesce(cast(all_conversions_qualified as integer), cast(all_conversions as integer)), 0) as all_conversions,\n -- sometimes this field comes in as a string\n coalesce(cast(replace(cast(all_revenue as TEXT), ',', '') as float), 0) as all_conversions_value\n\n \n\n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__campaign_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__campaign_history", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/stg_microsoft_ads__campaign_history.sql", "original_file_path": "models/staging/stg_microsoft_ads__campaign_history.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__campaign_history", "fqn": ["microsoft_ads", "staging", "stg_microsoft_ads__campaign_history"], "alias": "stg_microsoft_ads__campaign_history", "checksum": {"name": "sha256", "checksum": "7461d5314266a94c55972efcd85eef49a8b57e73185294279d3bb5bcc21c3d2d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a version of one or more Microsoft campaigns.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_name"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "modified_at": {"name": "modified_at", "description": "The time each version of the object was last modified, i.e. when that version of the object was 'created'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.modified_at"]}, "type": {"name": "type", "description": "The campaign type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaigntype?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_type"]}, "time_zone": {"name": "time_zone", "description": "The time zone associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.time_zone"]}, "status": {"name": "status", "description": "The status of this campaign; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaignstatus?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_status"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.is_most_recent_record"]}, "budget": {"name": "budget", "description": "The amount to spend daily across all campaigns that share the budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget"]}, "budget_id": {"name": "budget_id", "description": "The unique Microsoft Advertising identifier of the budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget_id"]}, "budget_type": {"name": "budget_type", "description": "The budget type determines the pace at which the budget is spent throughout the day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget_type"]}, "language": {"name": "language", "description": "The language that the associated ad was viewed in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.language"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/staging/stg_microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.8486464, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_microsoft_ads__campaign_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_microsoft_ads__campaign_history_tmp')),\n staging_columns=get_campaign_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='microsoft_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as campaign_id,\n name as campaign_name,\n account_id,\n modified_time as modified_at,\n type,\n time_zone,\n status,\n budget,\n budget_id,\n budget_type,\n language,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='microsoft_ads') }} order by modified_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__campaign_history_tmp", "package": null, "version": null}, {"name": "stg_microsoft_ads__campaign_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.get_campaign_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__campaign_history_tmp"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads__campaign_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_history_tmp\"\n),\n\nfields as (\n\n select\n \n id as id,\n name as name,\n account_id as account_id,\n modified_time as modified_time,\n type as type,\n time_zone as time_zone,\n status as status,\n cast(null as float) as budget,\n cast(null as integer) as budget_id,\n cast(null as TEXT) as budget_type,\n cast(null as TEXT) as language\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as campaign_id,\n name as campaign_name,\n account_id,\n modified_time as modified_at,\n type,\n time_zone,\n status,\n budget,\n budget_id,\n budget_type,\n language,\n row_number() over (partition by id order by modified_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__campaign_daily_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__campaign_daily_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/stg_microsoft_ads__campaign_daily_report.sql", "original_file_path": "models/staging/stg_microsoft_ads__campaign_daily_report.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__campaign_daily_report", "fqn": ["microsoft_ads", "staging", "stg_microsoft_ads__campaign_daily_report"], "alias": "stg_microsoft_ads__campaign_daily_report", "checksum": {"name": "sha256", "checksum": "dd0603c20a49298dd1f5bd5a29ae83481f0750ce5571e9347659bd74a19c7664"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance by account, campaign and all non-metric columns.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "ad_distribution": {"name": "ad_distribution", "description": "The distribution medium associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_distribution"]}, "bid_match_type": {"name": "bid_match_type", "description": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.bid_match_type"]}, "delivered_match_type": {"name": "delivered_match_type", "description": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.delivered_match_type"]}, "top_vs_other": {"name": "top_vs_other", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "budget_association_status": {"name": "budget_association_status", "description": "Indicates whether or not the campaign is currently spending from the budget mentioned in the BudgetName column. The possible values are `Current` and `Ended`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget_association_status"]}, "budget_name": {"name": "budget_name", "description": "The name of the budget. This column will be empty for unshared budgets.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget_name"]}, "budget_status": {"name": "budget_status", "description": "The budget status. The possible values are `Active` and `Deleted`. This column will be empty for unshared budgets.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget_status"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_value": {"name": "all_conversions_value", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/staging/stg_microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.8508081, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_daily_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_microsoft_ads__campaign_daily_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_microsoft_ads__campaign_daily_report_tmp')),\n staging_columns=get_campaign_daily_report_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='microsoft_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n account_id,\n campaign_id,\n currency_code,\n device_os,\n device_type,\n network,\n ad_distribution,\n bid_match_type,\n delivered_match_type,\n top_vs_other,\n budget_association_status,\n budget_name,\n budget_status,\n coalesce(clicks, 0) as clicks, \n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(coalesce(cast(conversions_qualified as {{ dbt.type_int() }}), cast(conversions as {{ dbt.type_int() }})), 0) as conversions,\n coalesce(cast(revenue as {{ dbt.type_float() }}), 0) as conversions_value,\n coalesce(coalesce(cast(all_conversions_qualified as {{ dbt.type_int() }}), cast(all_conversions as {{ dbt.type_int() }})), 0) as all_conversions,\n -- sometimes this field comes in as a string\n coalesce(cast(replace(cast(all_revenue as {{ dbt.type_string() }}), ',', '') as {{ dbt.type_float() }}), 0) as all_conversions_value\n\n {{ microsoft_ads_fill_pass_through_columns(pass_through_fields=var('microsoft_ads__campaign_passthrough_metrics'), except=['conversions', 'conversions_value', 'all_conversions', 'all_conversions_value']) }}\n\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__campaign_daily_report_tmp", "package": null, "version": null}, {"name": "stg_microsoft_ads__campaign_daily_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.get_campaign_daily_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_int", "macro.dbt.type_float", "macro.dbt.type_string", "macro.microsoft_ads.microsoft_ads_fill_pass_through_columns"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__campaign_daily_report_tmp"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads__campaign_daily_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_daily_report_tmp\"\n),\n\nfields as (\n\n select\n \n account_id as account_id,\n ad_distribution as ad_distribution,\n bid_match_type as bid_match_type,\n campaign_id as campaign_id,\n clicks as clicks,\n currency_code as currency_code,\n date as date,\n delivered_match_type as delivered_match_type,\n device_os as device_os,\n device_type as device_type,\n impressions as impressions,\n network as network,\n spend as spend,\n top_vs_other as top_vs_other,\n budget_association_status as budget_association_status,\n budget_name as budget_name,\n cast(null as TEXT) as budget_status,\n conversions_qualified as conversions_qualified,\n conversions as conversions,\n revenue as revenue,\n all_conversions as all_conversions,\n all_conversions_qualified as all_conversions_qualified,\n all_revenue as all_revenue\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n account_id,\n campaign_id,\n currency_code,\n device_os,\n device_type,\n network,\n ad_distribution,\n bid_match_type,\n delivered_match_type,\n top_vs_other,\n budget_association_status,\n budget_name,\n budget_status,\n coalesce(clicks, 0) as clicks, \n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(coalesce(cast(conversions_qualified as integer), cast(conversions as integer)), 0) as conversions,\n coalesce(cast(revenue as float), 0) as conversions_value,\n coalesce(coalesce(cast(all_conversions_qualified as integer), cast(all_conversions as integer)), 0) as all_conversions,\n -- sometimes this field comes in as a string\n coalesce(cast(replace(cast(all_revenue as TEXT), ',', '') as float), 0) as all_conversions_value\n\n \n\n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__ad_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_history", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/stg_microsoft_ads__ad_history.sql", "original_file_path": "models/staging/stg_microsoft_ads__ad_history.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_history", "fqn": ["microsoft_ads", "staging", "stg_microsoft_ads__ad_history"], "alias": "stg_microsoft_ads__ad_history", "checksum": {"name": "sha256", "checksum": "e2052bcacc3f50d7a028ea50cd4c95b47fe9dba75ab5e4d9c7d49e40e27d6ac5"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a version of one or more Microsoft ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "ad_id": {"name": "ad_id", "description": "The ID of the corresponding ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_id"]}, "ad_name": {"name": "ad_name", "description": "The name of the corresponding ad; `title_part_1` is used as the default ad name but you may customize this by using the `microsoft_ads__ad_name_selector` variable. For more information, refer to the [README](https://github.com/fivetran/dbt_microsoft_ads/blob/main/README.md#change-how-ad-name-is-determined).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_name"]}, "final_url": {"name": "final_url", "description": "The full URL that the ad links to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.final_url"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "modified_at": {"name": "modified_at", "description": "The time each version of the object was last modified, i.e. when that version of the object was 'created'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.modified_at"]}, "status": {"name": "status", "description": "The status of this ad; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/adstatus?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_status"]}, "type": {"name": "type", "description": "The ad type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/adtype?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_type"]}, "title": {"name": "title", "description": "The title of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.title"]}, "title_part_1": {"name": "title_part_1", "description": "Part 1 of the title.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.title_part_1"]}, "title_part_2": {"name": "title_part_2", "description": "Part 2 of the title.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.title_part_2"]}, "title_part_3": {"name": "title_part_3", "description": "Part 3 of the title.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.title_part_3"]}, "domain": {"name": "domain", "description": "The associated domain that the ad links to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.domain"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/staging/stg_microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.8447297, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_microsoft_ads__ad_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_microsoft_ads__ad_history_tmp')),\n staging_columns=get_ad_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='microsoft_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as ad_id,\n {{ var('microsoft_ads__ad_name_selector', 'title_part_1') }} as ad_name,\n title,\n title_part_1,\n title_part_2,\n title_part_3,\n final_url,\n domain,\n ad_group_id,\n modified_time as modified_at,\n status,\n type,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='microsoft_ads') }} order by modified_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__ad_history_tmp", "package": null, "version": null}, {"name": "stg_microsoft_ads__ad_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.get_ad_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__ad_history_tmp"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads__ad_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_history_tmp\"\n),\n\nfields as (\n\n select\n \n id as id,\n title as title,\n title_part_1 as title_part_1,\n title_part_2 as title_part_2,\n title_part_3 as title_part_3,\n final_url as final_url,\n ad_group_id as ad_group_id,\n modified_time as modified_time,\n status as status,\n type as type,\n domain as domain\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as ad_id,\n title_part_1 as ad_name,\n title,\n title_part_1,\n title_part_2,\n title_part_3,\n final_url,\n domain,\n ad_group_id,\n modified_time as modified_at,\n status,\n type,\n row_number() over (partition by id order by modified_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__geographic_daily_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__geographic_daily_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/stg_microsoft_ads__geographic_daily_report.sql", "original_file_path": "models/staging/stg_microsoft_ads__geographic_daily_report.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__geographic_daily_report", "fqn": ["microsoft_ads", "staging", "stg_microsoft_ads__geographic_daily_report"], "alias": "stg_microsoft_ads__geographic_daily_report", "checksum": {"name": "sha256", "checksum": "6ed8f9ebeab28bb8bfbe642e75ee4e6d8874171d67926a8bb68adbd804e485cd"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance segmented by geographic location and related attributes.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "country": {"name": "country", "description": "The country or region where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.country"]}, "region": {"name": "region", "description": "The state or geographic region where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.state"]}, "county": {"name": "county", "description": "The county where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.county"]}, "postal_code": {"name": "postal_code", "description": "The postal code where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.postal_code"]}, "city": {"name": "city", "description": "The city where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.city"]}, "metro_area": {"name": "metro_area", "description": "The metro area (Microsoft Market Area in the United States) where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.metro_area"]}, "location_type": {"name": "location_type", "description": "The location type used to deliver ads. Values include \"Physical location\" and \"Location of interest\". \n\n\"Physical location\" indicates the user was in the corresponding City, Country, MetroArea, or State. \"Location of interest\" indicates the user was searching for or viewing pages about the location.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.location_type"]}, "most_specific_location": {"name": "most_specific_location", "description": "The most specific location used to deliver ads. If postal code is available, it is prioritized; otherwise, it may match city or country/region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.most_specific_location"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "language": {"name": "language", "description": "The language of the publisher where the ad was shown.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_distribution": {"name": "ad_distribution", "description": "The distribution medium associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_distribution"]}, "bid_match_type": {"name": "bid_match_type", "description": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.bid_match_type"]}, "delivered_match_type": {"name": "delivered_match_type", "description": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.delivered_match_type"]}, "top_vs_other": {"name": "top_vs_other", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "goal": {"name": "goal", "description": "The name of the goal you set for the conversions you want, meaning actions customers take after clicking your ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.goal"]}, "location_id": {"name": "location_id", "description": "The Microsoft Advertising identifier of the location where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.location_id"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_value": {"name": "all_conversions_value", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/staging/stg_microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.8595612, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__geographic_daily_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True) and var('microsoft_ads__using_geographic_daily_report', False)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_microsoft_ads__geographic_daily_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_microsoft_ads__geographic_daily_report_tmp')),\n staging_columns=get_geographic_daily_report_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='microsoft_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n date as date_day,\n account_id,\n campaign_id,\n ad_group_id,\n country,\n state as region,\n county,\n postal_code,\n city,\n metro_area,\n location_id,\n location_type,\n most_specific_location,\n currency_code,\n device_os,\n device_type,\n network,\n language,\n ad_distribution,\n bid_match_type,\n delivered_match_type,\n top_vs_other,\n goal,\n coalesce(clicks, 0) as clicks, \n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(coalesce(cast(conversions_qualified as {{ dbt.type_int() }}), cast(conversions as {{ dbt.type_int() }})), 0) as conversions,\n coalesce(cast(revenue as {{ dbt.type_float() }}), 0) as conversions_value,\n coalesce(coalesce(cast(all_conversions_qualified as {{ dbt.type_int() }}), cast(all_conversions as {{ dbt.type_int() }})), 0) as all_conversions,\n -- sometimes this field comes in as a string\n coalesce(cast(replace(cast(all_revenue as {{ dbt.type_string() }}), ',', '') as {{ dbt.type_float() }}), 0) as all_conversions_value\n\n {{ microsoft_ads_fill_pass_through_columns(pass_through_fields=var('microsoft_ads__geographic_passthrough_metrics')) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__geographic_daily_report_tmp", "package": null, "version": null}, {"name": "stg_microsoft_ads__geographic_daily_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.get_geographic_daily_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_int", "macro.dbt.type_float", "macro.dbt.type_string", "macro.microsoft_ads.microsoft_ads_fill_pass_through_columns"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__geographic_daily_report_tmp"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads__geographic_daily_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__geographic_daily_report_tmp\"\n),\n\nfields as (\n\n select\n \n account_id as account_id,\n ad_distribution as ad_distribution,\n ad_group_id as ad_group_id,\n all_conversions as all_conversions,\n all_conversions_qualified as all_conversions_qualified,\n all_revenue as all_revenue,\n bid_match_type as bid_match_type,\n campaign_id as campaign_id,\n city as city,\n clicks as clicks,\n conversions as conversions,\n conversions_qualified as conversions_qualified,\n country as country,\n county as county,\n currency_code as currency_code,\n date as date,\n delivered_match_type as delivered_match_type,\n device_os as device_os,\n device_type as device_type,\n goal as goal,\n impressions as impressions,\n language as language,\n location_id as location_id,\n location_type as location_type,\n metro_area as metro_area,\n cast(null as TEXT) as most_specific_location,\n network as network,\n postal_code as postal_code,\n spend as spend,\n state as state,\n top_vs_other as top_vs_other,\n revenue as revenue\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n date as date_day,\n account_id,\n campaign_id,\n ad_group_id,\n country,\n state as region,\n county,\n postal_code,\n city,\n metro_area,\n location_id,\n location_type,\n most_specific_location,\n currency_code,\n device_os,\n device_type,\n network,\n language,\n ad_distribution,\n bid_match_type,\n delivered_match_type,\n top_vs_other,\n goal,\n coalesce(clicks, 0) as clicks, \n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(coalesce(cast(conversions_qualified as integer), cast(conversions as integer)), 0) as conversions,\n coalesce(cast(revenue as float), 0) as conversions_value,\n coalesce(coalesce(cast(all_conversions_qualified as integer), cast(all_conversions as integer)), 0) as all_conversions,\n -- sometimes this field comes in as a string\n coalesce(cast(replace(cast(all_revenue as TEXT), ',', '') as float), 0) as all_conversions_value\n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__ad_group_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_group_history", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/stg_microsoft_ads__ad_group_history.sql", "original_file_path": "models/staging/stg_microsoft_ads__ad_group_history.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_group_history", "fqn": ["microsoft_ads", "staging", "stg_microsoft_ads__ad_group_history"], "alias": "stg_microsoft_ads__ad_group_history", "checksum": {"name": "sha256", "checksum": "9e0c0dde6eb512f014f1b37633a9cec7f4eef47fec9a8b55c1541f0ed964852c"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a version of one or more Microsoft ad groups.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "modified_at": {"name": "modified_at", "description": "The time each version of the object was last modified, i.e. when that version of the object was 'created'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.modified_at"]}, "start_date": {"name": "start_date", "description": "The date in which an ad group starts running.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.start_date"]}, "end_date": {"name": "end_date", "description": "The date in which this ad group will no longer run.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.end_date"]}, "status": {"name": "status", "description": "The status of this ad group; see the following [documentation](https://help.ads.microsoft.com/apex/index/3/en/53094) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_status"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/staging/stg_microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.8408344, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_group_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_microsoft_ads__ad_group_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_microsoft_ads__ad_group_history_tmp')),\n staging_columns=get_ad_group_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='microsoft_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as ad_group_id,\n name as ad_group_name,\n campaign_id,\n modified_time as modified_at,\n start_date,\n end_date,\n status,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='microsoft_ads') }} order by modified_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__ad_group_history_tmp", "package": null, "version": null}, {"name": "stg_microsoft_ads__ad_group_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.get_ad_group_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__ad_group_history_tmp"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads__ad_group_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_group_history_tmp\"\n),\n\nfields as (\n\n select\n \n id as id,\n name as name,\n campaign_id as campaign_id,\n modified_time as modified_time,\n start_date as start_date,\n end_date as end_date,\n status as status\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as ad_group_id,\n name as ad_group_name,\n campaign_id,\n modified_time as modified_at,\n start_date,\n end_date,\n status,\n row_number() over (partition by id order by modified_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__keyword_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__keyword_history", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/stg_microsoft_ads__keyword_history.sql", "original_file_path": "models/staging/stg_microsoft_ads__keyword_history.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__keyword_history", "fqn": ["microsoft_ads", "staging", "stg_microsoft_ads__keyword_history"], "alias": "stg_microsoft_ads__keyword_history", "checksum": {"name": "sha256", "checksum": "44aa410989b246765c4a57e2faafe8294baa5041a493d3f1e927c6869e8ef953"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a version of one or more Microsoft keywords.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "keyword_id": {"name": "keyword_id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.keyword_id"]}, "keyword_name": {"name": "keyword_name", "description": "The keyword(s) associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.keyword_name"]}, "modified_at": {"name": "modified_at", "description": "The time each version of the object was last modified, i.e. when that version of the object was 'created'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.modified_at"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "match_type": {"name": "match_type", "description": "The match type associated with this record; values contain but may not be limited to 'Broad', 'Exact', 'Phrase'. Please refer to Microsoft Ad's [documentation](https://help.ads.microsoft.com/#apex/ads/en/50822/1).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.match_type"]}, "status": {"name": "status", "description": "The status of this keyword; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/keywordstatus?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.keyword_status"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/staging/stg_microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.8523562, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__keyword_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_microsoft_ads__keyword_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_microsoft_ads__keyword_history_tmp')),\n staging_columns=get_keyword_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='microsoft_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as keyword_id,\n name as keyword_name,\n modified_time as modified_at,\n ad_group_id,\n match_type,\n status,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='microsoft_ads') }} order by modified_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__keyword_history_tmp", "package": null, "version": null}, {"name": "stg_microsoft_ads__keyword_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.get_keyword_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__keyword_history_tmp"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads__keyword_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__keyword_history_tmp\"\n),\n\nfields as (\n\n select\n \n id as id,\n name as name,\n modified_time as modified_time,\n ad_group_id as ad_group_id,\n match_type as match_type,\n status as status\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as keyword_id,\n name as keyword_name,\n modified_time as modified_at,\n ad_group_id,\n match_type,\n status,\n row_number() over (partition by id order by modified_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__search_daily_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__search_daily_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/stg_microsoft_ads__search_daily_report.sql", "original_file_path": "models/staging/stg_microsoft_ads__search_daily_report.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__search_daily_report", "fqn": ["microsoft_ads", "staging", "stg_microsoft_ads__search_daily_report"], "alias": "stg_microsoft_ads__search_daily_report", "checksum": {"name": "sha256", "checksum": "51ca576a5612d5524b635ee465d36727a75d06e284313ace521de8593a6d35a0"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance by account, campaign, ad group, ad, keyword and all non-metric columns.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "ad_id": {"name": "ad_id", "description": "The ID of the corresponding ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_id"]}, "keyword_id": {"name": "keyword_id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.keyword_id"]}, "search_query": {"name": "search_query", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "language": {"name": "language", "description": "The language that the associated ad was viewed in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.language"]}, "ad_distribution": {"name": "ad_distribution", "description": "The distribution medium associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_distribution"]}, "bid_match_type": {"name": "bid_match_type", "description": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.bid_match_type"]}, "delivered_match_type": {"name": "delivered_match_type", "description": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.delivered_match_type"]}, "top_vs_other": {"name": "top_vs_other", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_value": {"name": "all_conversions_value", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/staging/stg_microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.8567502, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__search_daily_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_microsoft_ads__search_daily_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_microsoft_ads__search_daily_report_tmp')),\n staging_columns=get_search_daily_report_columns()\n )\n }}\n\n \n {{ fivetran_utils.apply_source_relation(package_name='microsoft_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n account_id,\n campaign_id,\n ad_group_id,\n ad_id,\n keyword_id,\n search_query,\n device_os,\n device_type,\n network,\n language,\n bid_match_type,\n delivered_match_type,\n top_vs_other,\n coalesce(clicks, 0) as clicks, \n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(coalesce(cast(conversions_qualified as {{ dbt.type_int() }}), cast(conversions as {{ dbt.type_int() }})), 0) as conversions,\n coalesce(cast(revenue as {{ dbt.type_float() }}), 0) as conversions_value,\n coalesce(coalesce(cast(all_conversions_qualified as {{ dbt.type_int() }}), cast(all_conversions as {{ dbt.type_int() }})), 0) as all_conversions,\n -- sometimes this field comes in as a string\n coalesce(cast(replace(cast(all_revenue as {{ dbt.type_string() }}), ',', '') as {{ dbt.type_float() }}), 0) as all_conversions_value\n\n {{ microsoft_ads_fill_pass_through_columns(pass_through_fields=var('microsoft_ads__search_passthrough_metrics'), except=['conversions', 'conversions_value', 'all_conversions', 'all_conversions_value']) }}\n\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__search_daily_report_tmp", "package": null, "version": null}, {"name": "stg_microsoft_ads__search_daily_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.get_search_daily_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_int", "macro.dbt.type_float", "macro.dbt.type_string", "macro.microsoft_ads.microsoft_ads_fill_pass_through_columns"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__search_daily_report_tmp"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads__search_daily_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__search_daily_report_tmp\"\n),\n\nfields as (\n\n select\n \n account_id as account_id,\n ad_group_id as ad_group_id,\n ad_id as ad_id,\n bid_match_type as bid_match_type,\n campaign_id as campaign_id,\n clicks as clicks,\n date as date,\n delivered_match_type as delivered_match_type,\n device_os as device_os,\n device_type as device_type,\n impressions as impressions,\n keyword_id as keyword_id,\n language as language,\n network as network,\n search_query as search_query,\n spend as spend,\n top_vs_other as top_vs_other,\n conversions_qualified as conversions_qualified,\n conversions as conversions,\n revenue as revenue,\n all_conversions as all_conversions,\n all_conversions_qualified as all_conversions_qualified,\n all_revenue as all_revenue\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n account_id,\n campaign_id,\n ad_group_id,\n ad_id,\n keyword_id,\n search_query,\n device_os,\n device_type,\n network,\n language,\n bid_match_type,\n delivered_match_type,\n top_vs_other,\n coalesce(clicks, 0) as clicks, \n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(coalesce(cast(conversions_qualified as integer), cast(conversions as integer)), 0) as conversions,\n coalesce(cast(revenue as float), 0) as conversions_value,\n coalesce(coalesce(cast(all_conversions_qualified as integer), cast(all_conversions as integer)), 0) as all_conversions,\n -- sometimes this field comes in as a string\n coalesce(cast(replace(cast(all_revenue as TEXT), ',', '') as float), 0) as all_conversions_value\n\n \n\n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__account_daily_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__account_daily_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/stg_microsoft_ads__account_daily_report.sql", "original_file_path": "models/staging/stg_microsoft_ads__account_daily_report.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__account_daily_report", "fqn": ["microsoft_ads", "staging", "stg_microsoft_ads__account_daily_report"], "alias": "stg_microsoft_ads__account_daily_report", "checksum": {"name": "sha256", "checksum": "1c54b56f644cf726024d377ec3f743d37978ada685cfde1906015f843afb4e95"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance by account and all non-metric columns.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "ad_distribution": {"name": "ad_distribution", "description": "The distribution medium associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_distribution"]}, "bid_match_type": {"name": "bid_match_type", "description": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.bid_match_type"]}, "delivered_match_type": {"name": "delivered_match_type", "description": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.delivered_match_type"]}, "top_vs_other": {"name": "top_vs_other", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/staging/stg_microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.8391492, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_daily_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_microsoft_ads__account_daily_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_microsoft_ads__account_daily_report_tmp')),\n staging_columns=get_account_daily_report_columns()\n )\n }}\n\n \n {{ fivetran_utils.apply_source_relation(package_name='microsoft_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n account_id,\n device_os,\n device_type,\n network,\n currency_code, \n ad_distribution,\n bid_match_type,\n delivered_match_type,\n top_vs_other,\n coalesce(clicks, 0) as clicks, \n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(coalesce(cast(conversions_qualified as {{ dbt.type_int() }}), cast(conversions as {{ dbt.type_int() }})), 0) as conversions,\n coalesce(cast(revenue as {{ dbt.type_float() }}), 0) as conversions_value,\n coalesce(cast(all_conversions_qualified as {{ dbt.type_int() }}), 0) as all_conversions \n -- this report does not have an all_revenue or an all_conversions field\n\n {{ microsoft_ads_fill_pass_through_columns(pass_through_fields=var('microsoft_ads__account_passthrough_metrics'), except=['conversions', 'conversions_value', 'all_conversions']) }}\n\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__account_daily_report_tmp", "package": null, "version": null}, {"name": "stg_microsoft_ads__account_daily_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.get_account_daily_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_int", "macro.dbt.type_float", "macro.microsoft_ads.microsoft_ads_fill_pass_through_columns"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__account_daily_report_tmp"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads__account_daily_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_daily_report_tmp\"\n),\n\nfields as (\n\n select\n \n account_id as account_id,\n ad_distribution as ad_distribution,\n bid_match_type as bid_match_type,\n clicks as clicks,\n currency_code as currency_code,\n date as date,\n delivered_match_type as delivered_match_type,\n device_os as device_os,\n device_type as device_type,\n impressions as impressions,\n network as network,\n spend as spend,\n top_vs_other as top_vs_other,\n conversions_qualified as conversions_qualified,\n conversions as conversions,\n revenue as revenue,\n all_conversions_qualified as all_conversions_qualified\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n account_id,\n device_os,\n device_type,\n network,\n currency_code, \n ad_distribution,\n bid_match_type,\n delivered_match_type,\n top_vs_other,\n coalesce(clicks, 0) as clicks, \n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(coalesce(cast(conversions_qualified as integer), cast(conversions as integer)), 0) as conversions,\n coalesce(cast(revenue as float), 0) as conversions_value,\n coalesce(cast(all_conversions_qualified as integer), 0) as all_conversions \n -- this report does not have an all_revenue or an all_conversions field\n\n \n\n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__keyword_daily_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__keyword_daily_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/stg_microsoft_ads__keyword_daily_report.sql", "original_file_path": "models/staging/stg_microsoft_ads__keyword_daily_report.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__keyword_daily_report", "fqn": ["microsoft_ads", "staging", "stg_microsoft_ads__keyword_daily_report"], "alias": "stg_microsoft_ads__keyword_daily_report", "checksum": {"name": "sha256", "checksum": "f792964990f9e62a112f2db3bbd75da5d623c56af7effd0c8ca36b550b0a9526"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance by account, campaign, ad group, ad, keyword and all non-metric columns.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "ad_id": {"name": "ad_id", "description": "The ID of the corresponding ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_id"]}, "keyword_id": {"name": "keyword_id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.keyword_id"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "language": {"name": "language", "description": "The language that the associated ad was viewed in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.language"]}, "ad_distribution": {"name": "ad_distribution", "description": "The distribution medium associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_distribution"]}, "bid_match_type": {"name": "bid_match_type", "description": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.bid_match_type"]}, "delivered_match_type": {"name": "delivered_match_type", "description": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.delivered_match_type"]}, "top_vs_other": {"name": "top_vs_other", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_value": {"name": "all_conversions_value", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/staging/stg_microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.8545768, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__keyword_daily_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_microsoft_ads__keyword_daily_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_microsoft_ads__keyword_daily_report_tmp')),\n staging_columns=get_keyword_daily_report_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='microsoft_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n account_id,\n campaign_id,\n ad_group_id,\n ad_id,\n keyword_id,\n currency_code,\n device_os,\n device_type,\n network,\n language,\n ad_distribution,\n bid_match_type,\n delivered_match_type,\n top_vs_other,\n coalesce(clicks, 0) as clicks, \n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(coalesce(cast(conversions_qualified as {{ dbt.type_int() }}), cast(conversions as {{ dbt.type_int() }})), 0) as conversions,\n coalesce(cast(revenue as {{ dbt.type_float() }}), 0) as conversions_value,\n coalesce(coalesce(cast(all_conversions_qualified as {{ dbt.type_int() }}), cast(all_conversions as {{ dbt.type_int() }})), 0) as all_conversions,\n -- sometimes this field comes in as a string\n coalesce(cast(replace(cast(all_revenue as {{ dbt.type_string() }}), ',', '') as {{ dbt.type_float() }}), 0) as all_conversions_value\n\n {{ microsoft_ads_fill_pass_through_columns(pass_through_fields=var('microsoft_ads__keyword_passthrough_metrics'), except=['conversions', 'conversions_value', 'all_conversions', 'all_conversions_value']) }}\n \n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__keyword_daily_report_tmp", "package": null, "version": null}, {"name": "stg_microsoft_ads__keyword_daily_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.get_keyword_daily_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_int", "macro.dbt.type_float", "macro.dbt.type_string", "macro.microsoft_ads.microsoft_ads_fill_pass_through_columns"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__keyword_daily_report_tmp"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads__keyword_daily_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__keyword_daily_report_tmp\"\n),\n\nfields as (\n\n select\n \n account_id as account_id,\n ad_distribution as ad_distribution,\n ad_group_id as ad_group_id,\n ad_id as ad_id,\n bid_match_type as bid_match_type,\n campaign_id as campaign_id,\n clicks as clicks,\n currency_code as currency_code,\n date as date,\n delivered_match_type as delivered_match_type,\n device_os as device_os,\n device_type as device_type,\n impressions as impressions,\n keyword_id as keyword_id,\n language as language,\n network as network,\n spend as spend,\n top_vs_other as top_vs_other,\n conversions_qualified as conversions_qualified,\n conversions as conversions,\n revenue as revenue,\n all_conversions as all_conversions,\n all_conversions_qualified as all_conversions_qualified,\n all_revenue as all_revenue\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n account_id,\n campaign_id,\n ad_group_id,\n ad_id,\n keyword_id,\n currency_code,\n device_os,\n device_type,\n network,\n language,\n ad_distribution,\n bid_match_type,\n delivered_match_type,\n top_vs_other,\n coalesce(clicks, 0) as clicks, \n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(coalesce(cast(conversions_qualified as integer), cast(conversions as integer)), 0) as conversions,\n coalesce(cast(revenue as float), 0) as conversions_value,\n coalesce(coalesce(cast(all_conversions_qualified as integer), cast(all_conversions as integer)), 0) as all_conversions,\n -- sometimes this field comes in as a string\n coalesce(cast(replace(cast(all_revenue as TEXT), ',', '') as float), 0) as all_conversions_value\n\n \n\n\n\n\n \n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__ad_daily_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_daily_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/stg_microsoft_ads__ad_daily_report.sql", "original_file_path": "models/staging/stg_microsoft_ads__ad_daily_report.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_daily_report", "fqn": ["microsoft_ads", "staging", "stg_microsoft_ads__ad_daily_report"], "alias": "stg_microsoft_ads__ad_daily_report", "checksum": {"name": "sha256", "checksum": "6d31980f62cd2bfcaa8a3596e06bede4405ff2112189201fce0243e5b2b233af"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance by account, campaign, ad group, ad and all non-metric columns.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "ad_id": {"name": "ad_id", "description": "The ID of the corresponding ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_id"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "language": {"name": "language", "description": "The language that the associated ad was viewed in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.language"]}, "ad_distribution": {"name": "ad_distribution", "description": "The distribution medium associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_distribution"]}, "bid_match_type": {"name": "bid_match_type", "description": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.bid_match_type"]}, "delivered_match_type": {"name": "delivered_match_type", "description": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.delivered_match_type"]}, "top_vs_other": {"name": "top_vs_other", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_value": {"name": "all_conversions_value", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/staging/stg_microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450505.8468864, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_daily_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_microsoft_ads__ad_daily_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_microsoft_ads__ad_daily_report_tmp')),\n staging_columns=get_ad_daily_report_columns()\n )\n }}\n\n \n {{ fivetran_utils.apply_source_relation(package_name='microsoft_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n account_id,\n campaign_id,\n ad_group_id,\n ad_id,\n currency_code,\n device_os,\n device_type,\n network,\n language,\n ad_distribution,\n bid_match_type,\n delivered_match_type,\n top_vs_other,\n coalesce(clicks, 0) as clicks, \n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(coalesce(cast(conversions_qualified as {{ dbt.type_int() }}), cast(conversions as {{ dbt.type_int() }})), 0) as conversions,\n coalesce(cast(revenue as {{ dbt.type_float() }}), 0) as conversions_value,\n coalesce(coalesce(cast(all_conversions_qualified as {{ dbt.type_int() }}), cast(all_conversions as {{ dbt.type_int() }})), 0) as all_conversions,\n -- sometimes this field comes in as a string\n coalesce(cast(replace(cast(all_revenue as {{ dbt.type_string() }}), ',', '') as {{ dbt.type_float() }}), 0) as all_conversions_value\n\n {{ microsoft_ads_fill_pass_through_columns(pass_through_fields=var('microsoft_ads__ad_passthrough_metrics'), except=['conversions', 'conversions_value', 'all_conversions', 'all_conversions_value']) }}\n\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__ad_daily_report_tmp", "package": null, "version": null}, {"name": "stg_microsoft_ads__ad_daily_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.get_ad_daily_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_int", "macro.dbt.type_float", "macro.dbt.type_string", "macro.microsoft_ads.microsoft_ads_fill_pass_through_columns"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__ad_daily_report_tmp"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads__ad_daily_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_daily_report_tmp\"\n),\n\nfields as (\n\n select\n \n account_id as account_id,\n ad_distribution as ad_distribution,\n ad_group_id as ad_group_id,\n ad_id as ad_id,\n bid_match_type as bid_match_type,\n campaign_id as campaign_id,\n clicks as clicks,\n currency_code as currency_code,\n date as date,\n delivered_match_type as delivered_match_type,\n device_os as device_os,\n device_type as device_type,\n impressions as impressions,\n language as language,\n network as network,\n spend as spend,\n top_vs_other as top_vs_other,\n conversions_qualified as conversions_qualified,\n conversions as conversions,\n revenue as revenue,\n all_conversions as all_conversions,\n all_conversions_qualified as all_conversions_qualified,\n all_revenue as all_revenue\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n account_id,\n campaign_id,\n ad_group_id,\n ad_id,\n currency_code,\n device_os,\n device_type,\n network,\n language,\n ad_distribution,\n bid_match_type,\n delivered_match_type,\n top_vs_other,\n coalesce(clicks, 0) as clicks, \n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(coalesce(cast(conversions_qualified as integer), cast(conversions as integer)), 0) as conversions,\n coalesce(cast(revenue as float), 0) as conversions_value,\n coalesce(coalesce(cast(all_conversions_qualified as integer), cast(all_conversions as integer)), 0) as all_conversions,\n -- sometimes this field comes in as a string\n coalesce(cast(replace(cast(all_revenue as TEXT), ',', '') as float), 0) as all_conversions_value\n\n \n\n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__campaign_daily_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__campaign_daily_report_tmp", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/tmp/stg_microsoft_ads__campaign_daily_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_microsoft_ads__campaign_daily_report_tmp.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__campaign_daily_report_tmp", "fqn": ["microsoft_ads", "staging", "tmp", "stg_microsoft_ads__campaign_daily_report_tmp"], "alias": "stg_microsoft_ads__campaign_daily_report_tmp", "checksum": {"name": "sha256", "checksum": "f5818c23e17da9b3c048c225cb76fe74f2d1d93c62b3d5ae60f50ce35c29fbcd"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450502.5468202, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_daily_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\n{% if var('microsoft_ads_union_schemas', []) | length > 0 or var('microsoft_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_performance_daily_report', \n database_variable='microsoft_ads_database', \n schema_variable='microsoft_ads_schema', \n default_database=target.database,\n default_schema='microsoft_ads',\n default_variable='campaign_performance_daily_report',\n union_schema_variable='microsoft_ads_union_schemas',\n union_database_variable='microsoft_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='microsoft_ads_sources',\n single_source_name='microsoft_ads',\n single_table_name='campaign_performance_daily_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["microsoft_ads", "campaign_performance_daily_report"], ["microsoft_ads", "campaign_performance_daily_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.microsoft_ads.microsoft_ads.campaign_performance_daily_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/tmp/stg_microsoft_ads__campaign_daily_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: microsoft_ads_campaign_performance_daily_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: microsoft_ads_campaign_performance_daily_report_data\n\n\n select\n \"date\",\n \"account_id\",\n \"campaign_id\",\n \"currency_code\",\n \"device_os\",\n \"device_type\",\n \"network\",\n \"ad_distribution\",\n \"bid_match_type\",\n \"delivered_match_type\",\n \"top_vs_other\",\n \"budget_association_status\",\n \"budget_name\",\n \"clicks\",\n \"impressions\",\n \"spend\",\n \"conversions_qualified\",\n \"conversions\",\n \"revenue\",\n \"all_conversions_qualified\",\n \"all_conversions\",\n \"all_revenue\"\n from \"postgres\".\"public\".\"microsoft_ads_campaign_performance_daily_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__ad_group_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_group_history_tmp", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/tmp/stg_microsoft_ads__ad_group_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_microsoft_ads__ad_group_history_tmp.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_group_history_tmp", "fqn": ["microsoft_ads", "staging", "tmp", "stg_microsoft_ads__ad_group_history_tmp"], "alias": "stg_microsoft_ads__ad_group_history_tmp", "checksum": {"name": "sha256", "checksum": "ee363544afb12a8c7cce0fb6b29796d00dcaae9ea60a190b54cb35154df6e7ad"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450502.5576525, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_group_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\n{% if var('microsoft_ads_union_schemas', []) | length > 0 or var('microsoft_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_group_history', \n database_variable='microsoft_ads_database', \n schema_variable='microsoft_ads_schema', \n default_database=target.database,\n default_schema='microsoft_ads',\n default_variable='ad_group_history',\n union_schema_variable='microsoft_ads_union_schemas',\n union_database_variable='microsoft_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='microsoft_ads_sources',\n single_source_name='microsoft_ads',\n single_table_name='ad_group_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["microsoft_ads", "ad_group_history"], ["microsoft_ads", "ad_group_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.microsoft_ads.microsoft_ads.ad_group_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/tmp/stg_microsoft_ads__ad_group_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: microsoft_ads_ad_group_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: microsoft_ads_ad_group_history_data\n\n\n select\n \"id\",\n \"name\",\n \"campaign_id\",\n \"modified_time\",\n \"start_date\",\n \"end_date\",\n \"status\"\n from \"postgres\".\"public\".\"microsoft_ads_ad_group_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__account_daily_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__account_daily_report_tmp", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/tmp/stg_microsoft_ads__account_daily_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_microsoft_ads__account_daily_report_tmp.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__account_daily_report_tmp", "fqn": ["microsoft_ads", "staging", "tmp", "stg_microsoft_ads__account_daily_report_tmp"], "alias": "stg_microsoft_ads__account_daily_report_tmp", "checksum": {"name": "sha256", "checksum": "e7b1c1bf466d3ea1cba1ad13c0f37d9d35d24bb6e07581387b0f1c09114d7ed9"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450502.5692766, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_daily_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\n{% if var('microsoft_ads_union_schemas', []) | length > 0 or var('microsoft_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='account_performance_daily_report', \n database_variable='microsoft_ads_database', \n schema_variable='microsoft_ads_schema', \n default_database=target.database,\n default_schema='microsoft_ads',\n default_variable='account_performance_daily_report',\n union_schema_variable='microsoft_ads_union_schemas',\n union_database_variable='microsoft_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='microsoft_ads_sources',\n single_source_name='microsoft_ads',\n single_table_name='account_performance_daily_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["microsoft_ads", "account_performance_daily_report"], ["microsoft_ads", "account_performance_daily_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.microsoft_ads.microsoft_ads.account_performance_daily_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/tmp/stg_microsoft_ads__account_daily_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: microsoft_ads_account_performance_daily_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: microsoft_ads_account_performance_daily_report_data\n\n\n select\n \"date\",\n \"account_id\",\n \"device_os\",\n \"device_type\",\n \"network\",\n \"currency_code\",\n \"ad_distribution\",\n \"bid_match_type\",\n \"delivered_match_type\",\n \"top_vs_other\",\n \"clicks\",\n \"impressions\",\n \"spend\",\n \"conversions_qualified\",\n \"conversions\",\n \"revenue\",\n \"all_conversions_qualified\"\n from \"postgres\".\"public\".\"microsoft_ads_account_performance_daily_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__search_daily_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__search_daily_report_tmp", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/tmp/stg_microsoft_ads__search_daily_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_microsoft_ads__search_daily_report_tmp.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__search_daily_report_tmp", "fqn": ["microsoft_ads", "staging", "tmp", "stg_microsoft_ads__search_daily_report_tmp"], "alias": "stg_microsoft_ads__search_daily_report_tmp", "checksum": {"name": "sha256", "checksum": "b404f0b72b048f657f909482bccbd385efdd8ee703ebce1ae8113ecdc7d2ea0e"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450502.5797966, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__search_daily_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\n{% if var('microsoft_ads_union_schemas', []) | length > 0 or var('microsoft_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='search_query_performance_daily_report', \n database_variable='microsoft_ads_database', \n schema_variable='microsoft_ads_schema', \n default_database=target.database,\n default_schema='microsoft_ads',\n default_variable='search_query_performance_daily_report',\n union_schema_variable='microsoft_ads_union_schemas',\n union_database_variable='microsoft_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='microsoft_ads_sources',\n single_source_name='microsoft_ads',\n single_table_name='search_query_performance_daily_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["microsoft_ads", "search_query_performance_daily_report"], ["microsoft_ads", "search_query_performance_daily_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.microsoft_ads.microsoft_ads.search_query_performance_daily_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/tmp/stg_microsoft_ads__search_daily_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: microsoft_ads_search_query_performance_daily_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: microsoft_ads_search_performance_daily_report_data\n\n\n select\n \"date\",\n \"account_id\",\n \"campaign_id\",\n \"ad_group_id\",\n \"ad_id\",\n \"keyword_id\",\n \"search_query\",\n \"device_os\",\n \"device_type\",\n \"network\",\n \"language\",\n \"bid_match_type\",\n \"delivered_match_type\",\n \"top_vs_other\",\n \"clicks\",\n \"impressions\",\n \"spend\",\n \"conversions_qualified\",\n \"conversions\",\n \"revenue\",\n \"all_conversions_qualified\",\n \"all_conversions\",\n \"all_revenue\"\n from \"postgres\".\"public\".\"microsoft_ads_search_performance_daily_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__account_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__account_history_tmp", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/tmp/stg_microsoft_ads__account_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_microsoft_ads__account_history_tmp.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__account_history_tmp", "fqn": ["microsoft_ads", "staging", "tmp", "stg_microsoft_ads__account_history_tmp"], "alias": "stg_microsoft_ads__account_history_tmp", "checksum": {"name": "sha256", "checksum": "af8658e1da86e23fc4c953aeab5c66bf3be3dbc5a324ad6c1a2fff4c083341ef"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450502.5902677, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\n{% if var('microsoft_ads_union_schemas', []) | length > 0 or var('microsoft_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='account_history', \n database_variable='microsoft_ads_database', \n schema_variable='microsoft_ads_schema', \n default_database=target.database,\n default_schema='microsoft_ads',\n default_variable='account_history',\n union_schema_variable='microsoft_ads_union_schemas',\n union_database_variable='microsoft_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='microsoft_ads_sources',\n single_source_name='microsoft_ads',\n single_table_name='account_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["microsoft_ads", "account_history"], ["microsoft_ads", "account_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.microsoft_ads.microsoft_ads.account_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/tmp/stg_microsoft_ads__account_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: microsoft_ads_account_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: microsoft_ads_account_history_data\n\n\n select\n \"id\",\n \"name\",\n \"last_modified_time\",\n \"time_zone\",\n \"currency_code\"\n from \"postgres\".\"public\".\"microsoft_ads_account_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__ad_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_history_tmp", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/tmp/stg_microsoft_ads__ad_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_microsoft_ads__ad_history_tmp.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_history_tmp", "fqn": ["microsoft_ads", "staging", "tmp", "stg_microsoft_ads__ad_history_tmp"], "alias": "stg_microsoft_ads__ad_history_tmp", "checksum": {"name": "sha256", "checksum": "00b2b4fb3306482edbb9b6451aa4255365e2c539d8fea3f319bb504daeb1d084"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450502.6020029, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\n{% if var('microsoft_ads_union_schemas', []) | length > 0 or var('microsoft_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_history', \n database_variable='microsoft_ads_database', \n schema_variable='microsoft_ads_schema', \n default_database=target.database,\n default_schema='microsoft_ads',\n default_variable='ad_history',\n union_schema_variable='microsoft_ads_union_schemas',\n union_database_variable='microsoft_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='microsoft_ads_sources',\n single_source_name='microsoft_ads',\n single_table_name='ad_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["microsoft_ads", "ad_history"], ["microsoft_ads", "ad_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.microsoft_ads.microsoft_ads.ad_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/tmp/stg_microsoft_ads__ad_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: microsoft_ads_ad_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: microsoft_ads_ad_history_data\n\n\n select\n \"id\",\n \"title_part_1\",\n \"final_url\",\n \"ad_group_id\",\n \"modified_time\",\n \"status\",\n \"type\",\n \"title\",\n \"title_part_2\",\n \"title_part_3\",\n \"domain\"\n from \"postgres\".\"public\".\"microsoft_ads_ad_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__geographic_daily_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__geographic_daily_report_tmp", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/tmp/stg_microsoft_ads__geographic_daily_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_microsoft_ads__geographic_daily_report_tmp.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__geographic_daily_report_tmp", "fqn": ["microsoft_ads", "staging", "tmp", "stg_microsoft_ads__geographic_daily_report_tmp"], "alias": "stg_microsoft_ads__geographic_daily_report_tmp", "checksum": {"name": "sha256", "checksum": "448e861c1c46f666a4c37927b47200bea6e131f129c44099b27727641d4c45e0"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450502.6123886, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__geographic_daily_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True) and var('microsoft_ads__using_geographic_daily_report', False)) }}\n\n{% if var('microsoft_ads_union_schemas', []) | length > 0 or var('microsoft_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='geographic_performance_daily_report', \n database_variable='microsoft_ads_database', \n schema_variable='microsoft_ads_schema', \n default_database=target.database,\n default_schema='microsoft_ads',\n default_variable='geographic_performance_daily_report',\n union_schema_variable='microsoft_ads_union_schemas',\n union_database_variable='microsoft_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='microsoft_ads_sources',\n single_source_name='microsoft_ads',\n single_table_name='geographic_performance_daily_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["microsoft_ads", "geographic_performance_daily_report"], ["microsoft_ads", "geographic_performance_daily_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.microsoft_ads.microsoft_ads.geographic_performance_daily_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/tmp/stg_microsoft_ads__geographic_daily_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: microsoft_ads_geographic_performance_daily_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: microsoft_ads_geographic_performance_daily_report_data\n\n\n select\n \"account_id\",\n \"ad_distribution\",\n \"ad_group_id\",\n \"all_conversions\",\n \"all_conversions_qualified\",\n \"all_revenue\",\n \"bid_match_type\",\n \"campaign_id\",\n \"city\",\n \"clicks\",\n \"conversions\",\n \"conversions_qualified\",\n \"country\",\n \"county\",\n \"currency_code\",\n \"date\",\n \"delivered_match_type\",\n \"device_os\",\n \"device_type\",\n \"impressions\",\n \"language\",\n \"location_type\",\n \"metro_area\",\n \"postal_code\",\n \"network\",\n \"spend\",\n \"state\",\n \"top_vs_other\",\n \"revenue\",\n \"location_id\",\n \"goal\"\n from \"postgres\".\"public\".\"microsoft_ads_geographic_performance_daily_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__keyword_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__keyword_history_tmp", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/tmp/stg_microsoft_ads__keyword_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_microsoft_ads__keyword_history_tmp.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__keyword_history_tmp", "fqn": ["microsoft_ads", "staging", "tmp", "stg_microsoft_ads__keyword_history_tmp"], "alias": "stg_microsoft_ads__keyword_history_tmp", "checksum": {"name": "sha256", "checksum": "7018bb69ea16d01c0d4058c247f2acf02fc00721162d400ad7dc6aa0bf03d52b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450502.6232774, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__keyword_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\n{% if var('microsoft_ads_union_schemas', []) | length > 0 or var('microsoft_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='keyword_history', \n database_variable='microsoft_ads_database', \n schema_variable='microsoft_ads_schema', \n default_database=target.database,\n default_schema='microsoft_ads',\n default_variable='keyword_history',\n union_schema_variable='microsoft_ads_union_schemas',\n union_database_variable='microsoft_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='microsoft_ads_sources',\n single_source_name='microsoft_ads',\n single_table_name='keyword_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["microsoft_ads", "keyword_history"], ["microsoft_ads", "keyword_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.microsoft_ads.microsoft_ads.keyword_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/tmp/stg_microsoft_ads__keyword_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: microsoft_ads_keyword_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: microsoft_ads_keyword_history_data\n\n\n select\n \"id\",\n \"name\",\n \"modified_time\",\n \"ad_group_id\",\n \"match_type\",\n \"status\"\n from \"postgres\".\"public\".\"microsoft_ads_keyword_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__keyword_daily_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__keyword_daily_report_tmp", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/tmp/stg_microsoft_ads__keyword_daily_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_microsoft_ads__keyword_daily_report_tmp.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__keyword_daily_report_tmp", "fqn": ["microsoft_ads", "staging", "tmp", "stg_microsoft_ads__keyword_daily_report_tmp"], "alias": "stg_microsoft_ads__keyword_daily_report_tmp", "checksum": {"name": "sha256", "checksum": "fe1cfcdb222c28cf6591752bba489265600111b2009a60656013e522e869601c"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450502.6339166, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__keyword_daily_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\n{% if var('microsoft_ads_union_schemas', []) | length > 0 or var('microsoft_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='keyword_performance_daily_report', \n database_variable='microsoft_ads_database', \n schema_variable='microsoft_ads_schema', \n default_database=target.database,\n default_schema='microsoft_ads',\n default_variable='keyword_performance_daily_report',\n union_schema_variable='microsoft_ads_union_schemas',\n union_database_variable='microsoft_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='microsoft_ads_sources',\n single_source_name='microsoft_ads',\n single_table_name='keyword_performance_daily_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["microsoft_ads", "keyword_performance_daily_report"], ["microsoft_ads", "keyword_performance_daily_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.microsoft_ads.microsoft_ads.keyword_performance_daily_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/tmp/stg_microsoft_ads__keyword_daily_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: microsoft_ads_keyword_performance_daily_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: microsoft_ads_keyword_performance_daily_report_data\n\n\n select\n \"date\",\n \"account_id\",\n \"campaign_id\",\n \"ad_group_id\",\n \"ad_id\",\n \"keyword_id\",\n \"currency_code\",\n \"device_os\",\n \"device_type\",\n \"network\",\n \"language\",\n \"ad_distribution\",\n \"bid_match_type\",\n \"delivered_match_type\",\n \"top_vs_other\",\n \"clicks\",\n \"impressions\",\n \"spend\",\n \"conversions_qualified\",\n \"conversions\",\n \"revenue\",\n \"all_conversions_qualified\",\n \"all_conversions\",\n \"all_revenue\"\n from \"postgres\".\"public\".\"microsoft_ads_keyword_performance_daily_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_group_daily_report_tmp", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/tmp/stg_microsoft_ads__ad_group_daily_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_microsoft_ads__ad_group_daily_report_tmp.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report_tmp", "fqn": ["microsoft_ads", "staging", "tmp", "stg_microsoft_ads__ad_group_daily_report_tmp"], "alias": "stg_microsoft_ads__ad_group_daily_report_tmp", "checksum": {"name": "sha256", "checksum": "8eea854174b248a328c1b5af00c1d47fda20097fc33408ebd744fe15c40b3b26"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450502.6460435, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_group_daily_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\n{% if var('microsoft_ads_union_schemas', []) | length > 0 or var('microsoft_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_group_performance_daily_report', \n database_variable='microsoft_ads_database', \n schema_variable='microsoft_ads_schema', \n default_database=target.database,\n default_schema='microsoft_ads',\n default_variable='ad_group_performance_daily_report',\n union_schema_variable='microsoft_ads_union_schemas',\n union_database_variable='microsoft_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='microsoft_ads_sources',\n single_source_name='microsoft_ads',\n single_table_name='ad_group_performance_daily_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["microsoft_ads", "ad_group_performance_daily_report"], ["microsoft_ads", "ad_group_performance_daily_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.microsoft_ads.microsoft_ads.ad_group_performance_daily_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/tmp/stg_microsoft_ads__ad_group_daily_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: microsoft_ads_ad_group_performance_daily_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: microsoft_ads_ad_group_performance_daily_report_data\n\n\n select\n \"date\",\n \"account_id\",\n \"campaign_id\",\n \"ad_group_id\",\n \"currency_code\",\n \"device_os\",\n \"device_type\",\n \"network\",\n \"language\",\n \"ad_distribution\",\n \"bid_match_type\",\n \"delivered_match_type\",\n \"top_vs_other\",\n \"clicks\",\n \"impressions\",\n \"spend\",\n \"conversions_qualified\",\n \"conversions\",\n \"revenue\",\n \"all_conversions_qualified\",\n \"all_conversions\",\n \"all_revenue\"\n from \"postgres\".\"public\".\"microsoft_ads_ad_group_performance_daily_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__campaign_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__campaign_history_tmp", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/tmp/stg_microsoft_ads__campaign_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_microsoft_ads__campaign_history_tmp.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__campaign_history_tmp", "fqn": ["microsoft_ads", "staging", "tmp", "stg_microsoft_ads__campaign_history_tmp"], "alias": "stg_microsoft_ads__campaign_history_tmp", "checksum": {"name": "sha256", "checksum": "73d4c9217b2e85b0531633e5953c18acd7000789153c12cda9025f2496dc9334"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450502.6566608, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\n{% if var('microsoft_ads_union_schemas', []) | length > 0 or var('microsoft_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_history', \n database_variable='microsoft_ads_database', \n schema_variable='microsoft_ads_schema', \n default_database=target.database,\n default_schema='microsoft_ads',\n default_variable='campaign_history',\n union_schema_variable='microsoft_ads_union_schemas',\n union_database_variable='microsoft_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='microsoft_ads_sources',\n single_source_name='microsoft_ads',\n single_table_name='campaign_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["microsoft_ads", "campaign_history"], ["microsoft_ads", "campaign_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.microsoft_ads.microsoft_ads.campaign_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/tmp/stg_microsoft_ads__campaign_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: microsoft_ads_campaign_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: microsoft_ads_campaign_history_data\n\n\n select\n \"id\",\n \"name\",\n \"account_id\",\n \"modified_time\",\n \"type\",\n \"time_zone\",\n \"status\"\n from \"postgres\".\"public\".\"microsoft_ads_campaign_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__ad_daily_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_daily_report_tmp", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/tmp/stg_microsoft_ads__ad_daily_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_microsoft_ads__ad_daily_report_tmp.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_daily_report_tmp", "fqn": ["microsoft_ads", "staging", "tmp", "stg_microsoft_ads__ad_daily_report_tmp"], "alias": "stg_microsoft_ads__ad_daily_report_tmp", "checksum": {"name": "sha256", "checksum": "53ae857c1a40e5c2fe4278290f5254cd73494922f7b107dd35468aac806f1f81"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450502.6672268, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_daily_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\n{% if var('microsoft_ads_union_schemas', []) | length > 0 or var('microsoft_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_performance_daily_report', \n database_variable='microsoft_ads_database', \n schema_variable='microsoft_ads_schema', \n default_database=target.database,\n default_schema='microsoft_ads',\n default_variable='ad_performance_daily_report',\n union_schema_variable='microsoft_ads_union_schemas',\n union_database_variable='microsoft_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='microsoft_ads_sources',\n single_source_name='microsoft_ads',\n single_table_name='ad_performance_daily_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["microsoft_ads", "ad_performance_daily_report"], ["microsoft_ads", "ad_performance_daily_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.microsoft_ads.microsoft_ads.ad_performance_daily_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/tmp/stg_microsoft_ads__ad_daily_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: microsoft_ads_ad_performance_daily_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: microsoft_ads_ad_performance_daily_report_data\n\n\n select\n \"date\",\n \"account_id\",\n \"campaign_id\",\n \"ad_group_id\",\n \"ad_id\",\n \"currency_code\",\n \"device_os\",\n \"device_type\",\n \"network\",\n \"language\",\n \"ad_distribution\",\n \"bid_match_type\",\n \"delivered_match_type\",\n \"top_vs_other\",\n \"clicks\",\n \"impressions\",\n \"spend\",\n \"conversions_qualified\",\n \"conversions\",\n \"revenue\",\n \"all_conversions_qualified\",\n \"all_conversions\",\n \"all_revenue\"\n from \"postgres\".\"public\".\"microsoft_ads_ad_performance_daily_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.facebook_ads__region_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "facebook_ads__region_report", "resource_type": "model", "package_name": "facebook_ads", "path": "facebook_ads__region_report.sql", "original_file_path": "models/facebook_ads__region_report.sql", "unique_id": "model.facebook_ads.facebook_ads__region_report", "fqn": ["facebook_ads", "facebook_ads__region_report"], "alias": "facebook_ads__region_report", "checksum": {"name": "sha256", "checksum": "59a7a9ad922476e93025d8ad6a811f7080ae9eb1d2e4c48aed3f8dfae99798fa"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Facebook account at the region level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "The name of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the ad in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total number of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_purchase_conversions": {"name": "onsite_conversion_purchase_conversions", "description": "Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_lead_grouped_conversions": {"name": "onsite_conversion_lead_grouped_conversions", "description": "Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_purchase_conversions": {"name": "offsite_conversion_fb_pixel_purchase_conversions", "description": "Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_lead_conversions": {"name": "offsite_conversion_fb_pixel_lead_conversions", "description": "Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_custom_conversions": {"name": "offsite_conversion_fb_pixel_custom_conversions", "description": "Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_business_country_code": {"name": "account_business_country_code", "description": "Country code of business associated to account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_business_state": {"name": "account_business_state", "description": "State abbreviation for business address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_currency": {"name": "account_currency", "description": "Currency associated with account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_timezone": {"name": "account_timezone", "description": "Timezone associated with account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_timezone_offset_hours_utc": {"name": "account_timezone_offset_hours_utc", "description": "Time zone difference from UTC.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_min_daily_budget": {"name": "account_min_daily_budget", "description": "The minimum daily budget for this Ad Account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "region_id": {"name": "region_id", "description": "Fivetran-generated unique ID of the geographic region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.region_id"]}, "region": {"name": "region", "description": "Geographic region whose ad performance is being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.region"]}, "frequency": {"name": "frequency", "description": "The average number of times each person saw your ads; it is calculated as impressions divided by reach.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.frequency"]}, "reach": {"name": "reach", "description": "The number of people who saw any content from your Page or about your Page. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.reach"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/facebook.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450506.0418189, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__region_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True) and var('facebook_ads__using_demographics_region', False)) }}\n\nwith accounts as (\n\n select *\n from {{ ref('stg_facebook_ads__account_history') }}\n where is_most_recent_record = true\n\n),\n\ndemographics_region as (\n\n select *\n from {{ ref('stg_facebook_ads__demographics_region') }}\n),\n\ndemographics_region_actions as (\n\n select *\n from {{ ref('stg_facebook_ads__demographics_region_actions') }}\n),\n\nregion_conversions as (\n\n select\n source_relation,\n account_id,\n region_id,\n date_day,\n sum(conversions) as conversions\n\n {% for action_type in var('facebook_ads__conversion_action_types') %}\n ,sum(case when \n {% if action_type.name %}\n action_type = '{{ action_type.name }}'\n {% elif action_type.pattern %}\n action_type like '{{ action_type.pattern }}'\n {% endif %}\n\n {% if action_type.where_sql %}\n and {{ action_type.where_sql }}\n {% endif %}\n then conversions else 0 end) \n as {{ facebook_action_slug(action_type) }}_conversions\n {% endfor %}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='facebook_ads__demographics_region_actions_passthrough_metrics', transform='sum') }}\n\n from demographics_region_actions\n {% if var('facebook_ads__conversion_action_types') -%}\n where \n {# Limit conversions to the chosen action types #}\n {% for action_type in var('facebook_ads__conversion_action_types') -%}\n (\n {%- if action_type.name -%}\n action_type = '{{ action_type.name }}'\n {%- elif action_type.pattern -%}\n action_type like '{{ action_type.pattern }}'\n {%- endif -%}\n\n {% if action_type.where_sql %}\n and {{ action_type.where_sql }}\n {%- endif -%}\n ) {% if not loop.last %} or {% endif %}\n {%- endfor %}\n {% endif %}\n {{ dbt_utils.group_by(n=4) }}\n),\n\njoined as (\n\n select \n demographics_region.source_relation,\n demographics_region.date_day,\n demographics_region.region_id,\n demographics_region.region,\n demographics_region.account_id,\n accounts.account_name,\n accounts.business_state as account_business_state,\n accounts.business_country_code as account_business_country_code,\n accounts.timezone_name as account_timezone,\n accounts.timezone_offset_hours_utc as account_timezone_offset_hours_utc,\n accounts.currency as account_currency,\n accounts.min_daily_budget as account_min_daily_budget,\n\n sum(demographics_region.impressions) as impressions,\n sum(demographics_region.clicks) as clicks,\n sum(demographics_region.spend) as spend,\n sum(demographics_region.reach) as reach,\n sum(demographics_region.frequency) as frequency,\n sum(coalesce(region_conversions.conversions, 0)) as conversions\n\n {% for action_type in var('facebook_ads__conversion_action_types') %}\n , sum(coalesce(region_conversions.{{ facebook_action_slug(action_type) }}_conversions, 0)) \n as {{ facebook_action_slug(action_type) }}_conversions\n {% endfor %}\n\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__demographics_region_passthrough_metrics', transform = 'sum', coalesce_with=0) }}\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__demographics_region_actions_passthrough_metrics', transform = 'sum', coalesce_with=0) }}\n \n from demographics_region\n left join region_conversions\n on demographics_region.region_id = region_conversions.region_id\n and demographics_region.account_id = region_conversions.account_id\n and demographics_region.date_day = region_conversions.date_day\n and demographics_region.source_relation = region_conversions.source_relation\n left join accounts\n on demographics_region.account_id = accounts.account_id\n and demographics_region.source_relation = accounts.source_relation\n {{ dbt_utils.group_by(n=12) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__account_history", "package": null, "version": null}, {"name": "stg_facebook_ads__demographics_region", "package": null, "version": null}, {"name": "stg_facebook_ads__demographics_region_actions", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.facebook_action_slug", "macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by", "macro.facebook_ads.facebook_ads_persist_pass_through_columns"], "nodes": ["model.facebook_ads.stg_facebook_ads__account_history", "model.facebook_ads.stg_facebook_ads__demographics_region", "model.facebook_ads.stg_facebook_ads__demographics_region_actions"]}, "compiled_path": "target/compiled/facebook_ads/models/facebook_ads__region_report.sql", "compiled": true, "compiled_code": "\n\nwith accounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__account_history\"\n where is_most_recent_record = true\n\n),\n\ndemographics_region as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_region\"\n),\n\ndemographics_region_actions as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_region_actions\"\n),\n\nregion_conversions as (\n\n select\n source_relation,\n account_id,\n region_id,\n date_day,\n sum(conversions) as conversions\n\n \n ,sum(case when \n \n action_type = 'onsite_conversion.purchase'\n \n\n \n then conversions else 0 end) \n as onsite_conversion_purchase_conversions\n \n ,sum(case when \n \n action_type = 'onsite_conversion.lead_grouped'\n \n\n \n then conversions else 0 end) \n as onsite_conversion_lead_grouped_conversions\n \n ,sum(case when \n \n action_type = 'offsite_conversion.fb_pixel_purchase'\n \n\n \n then conversions else 0 end) \n as offsite_conversion_fb_pixel_purchase_conversions\n \n ,sum(case when \n \n action_type = 'offsite_conversion.fb_pixel_lead'\n \n\n \n then conversions else 0 end) \n as offsite_conversion_fb_pixel_lead_conversions\n \n ,sum(case when \n \n action_type = 'offsite_conversion.fb_pixel_custom'\n \n\n \n then conversions else 0 end) \n as offsite_conversion_fb_pixel_custom_conversions\n \n\n \n\n\n\n\n\n from demographics_region_actions\n where \n \n (action_type = 'onsite_conversion.purchase') or (action_type = 'onsite_conversion.lead_grouped') or (action_type = 'offsite_conversion.fb_pixel_purchase') or (action_type = 'offsite_conversion.fb_pixel_lead') or (action_type = 'offsite_conversion.fb_pixel_custom') \n \n group by 1,2,3,4\n),\n\njoined as (\n\n select \n demographics_region.source_relation,\n demographics_region.date_day,\n demographics_region.region_id,\n demographics_region.region,\n demographics_region.account_id,\n accounts.account_name,\n accounts.business_state as account_business_state,\n accounts.business_country_code as account_business_country_code,\n accounts.timezone_name as account_timezone,\n accounts.timezone_offset_hours_utc as account_timezone_offset_hours_utc,\n accounts.currency as account_currency,\n accounts.min_daily_budget as account_min_daily_budget,\n\n sum(demographics_region.impressions) as impressions,\n sum(demographics_region.clicks) as clicks,\n sum(demographics_region.spend) as spend,\n sum(demographics_region.reach) as reach,\n sum(demographics_region.frequency) as frequency,\n sum(coalesce(region_conversions.conversions, 0)) as conversions\n\n \n , sum(coalesce(region_conversions.onsite_conversion_purchase_conversions, 0)) \n as onsite_conversion_purchase_conversions\n \n , sum(coalesce(region_conversions.onsite_conversion_lead_grouped_conversions, 0)) \n as onsite_conversion_lead_grouped_conversions\n \n , sum(coalesce(region_conversions.offsite_conversion_fb_pixel_purchase_conversions, 0)) \n as offsite_conversion_fb_pixel_purchase_conversions\n \n , sum(coalesce(region_conversions.offsite_conversion_fb_pixel_lead_conversions, 0)) \n as offsite_conversion_fb_pixel_lead_conversions\n \n , sum(coalesce(region_conversions.offsite_conversion_fb_pixel_custom_conversions, 0)) \n as offsite_conversion_fb_pixel_custom_conversions\n \n\n \n\n\n\n\n \n\n\n\n\n \n from demographics_region\n left join region_conversions\n on demographics_region.region_id = region_conversions.region_id\n and demographics_region.account_id = region_conversions.account_id\n and demographics_region.date_day = region_conversions.date_day\n and demographics_region.source_relation = region_conversions.source_relation\n left join accounts\n on demographics_region.account_id = accounts.account_id\n and demographics_region.source_relation = accounts.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.facebook_ads__country_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "facebook_ads__country_report", "resource_type": "model", "package_name": "facebook_ads", "path": "facebook_ads__country_report.sql", "original_file_path": "models/facebook_ads__country_report.sql", "unique_id": "model.facebook_ads.facebook_ads__country_report", "fqn": ["facebook_ads", "facebook_ads__country_report"], "alias": "facebook_ads__country_report", "checksum": {"name": "sha256", "checksum": "2862f381c757daac6b0aaca571ed71851b0d08a083fab52c43182299a1385a06"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Facebook account at the country level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "The name of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the ad in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total number of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_purchase_conversions": {"name": "onsite_conversion_purchase_conversions", "description": "Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_lead_grouped_conversions": {"name": "onsite_conversion_lead_grouped_conversions", "description": "Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_purchase_conversions": {"name": "offsite_conversion_fb_pixel_purchase_conversions", "description": "Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_lead_conversions": {"name": "offsite_conversion_fb_pixel_lead_conversions", "description": "Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_custom_conversions": {"name": "offsite_conversion_fb_pixel_custom_conversions", "description": "Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_business_country_code": {"name": "account_business_country_code", "description": "Country code of business associated to account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_currency": {"name": "account_currency", "description": "Currency associated with account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_timezone": {"name": "account_timezone", "description": "Timezone associated with account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_timezone_offset_hours_utc": {"name": "account_timezone_offset_hours_utc", "description": "Time zone difference from UTC.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_min_daily_budget": {"name": "account_min_daily_budget", "description": "The minimum daily budget for this Ad Account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country_id": {"name": "country_id", "description": "Fivetran-generated unique ID of the country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.country_id"]}, "country": {"name": "country", "description": "Country whose ad performance is being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.country"]}, "frequency": {"name": "frequency", "description": "The average number of times each person saw your ads; it is calculated as impressions divided by reach.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.frequency"]}, "reach": {"name": "reach", "description": "The number of people who saw any content from your Page or about your Page. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.reach"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/facebook.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450506.0399332, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__country_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True) and var('facebook_ads__using_demographics_country', False)) }}\n\nwith accounts as (\n\n select *\n from {{ ref('stg_facebook_ads__account_history') }}\n where is_most_recent_record = true\n),\n\ndemographics_country as (\n\n select *\n from {{ ref('stg_facebook_ads__demographics_country') }}\n),\n\ndemographics_country_actions as (\n\n select *\n from {{ ref('stg_facebook_ads__demographics_country_actions') }}\n),\n\ncountry_conversions as (\n\n select\n source_relation,\n account_id,\n country_id,\n date_day,\n sum(conversions) as conversions\n\n {% for action_type in var('facebook_ads__conversion_action_types') %}\n ,sum(case when \n {% if action_type.name %}\n action_type = '{{ action_type.name }}'\n {% elif action_type.pattern %}\n action_type like '{{ action_type.pattern }}'\n {% endif %}\n\n {% if action_type.where_sql %}\n and {{ action_type.where_sql }}\n {% endif %}\n then conversions else 0 end) \n as {{ facebook_action_slug(action_type) }}_conversions\n {% endfor %}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='facebook_ads__demographics_country_actions_passthrough_metrics', transform='sum') }}\n\n from demographics_country_actions\n {% if var('facebook_ads__conversion_action_types') -%}\n where \n {# Limit conversions to the chosen action types #}\n {% for action_type in var('facebook_ads__conversion_action_types') -%}\n (\n {%- if action_type.name -%}\n action_type = '{{ action_type.name }}'\n {%- elif action_type.pattern -%}\n action_type like '{{ action_type.pattern }}'\n {%- endif -%}\n\n {% if action_type.where_sql %}\n and {{ action_type.where_sql }}\n {%- endif -%}\n ) {% if not loop.last %} or {% endif %}\n {%- endfor %}\n {% endif %}\n {{ dbt_utils.group_by(n=4) }}\n),\n\njoined as (\n\n select \n demographics_country.source_relation,\n demographics_country.date_day,\n demographics_country.country_id,\n demographics_country.country,\n demographics_country.account_id,\n accounts.account_name,\n accounts.business_country_code as account_business_country_code,\n accounts.timezone_name as account_timezone,\n accounts.timezone_offset_hours_utc as account_timezone_offset_hours_utc,\n accounts.currency as account_currency,\n accounts.min_daily_budget as account_min_daily_budget,\n\n sum(demographics_country.impressions) as impressions,\n sum(demographics_country.clicks) as clicks,\n sum(demographics_country.spend) as spend,\n sum(demographics_country.reach) as reach,\n sum(demographics_country.frequency) as frequency,\n sum(coalesce(country_conversions.conversions, 0)) as conversions\n \n {% for action_type in var('facebook_ads__conversion_action_types') %}\n , sum(coalesce(country_conversions.{{ facebook_action_slug(action_type) }}_conversions, 0)) \n as {{ facebook_action_slug(action_type) }}_conversions\n {% endfor %}\n\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__demographics_country_passthrough_metrics', transform = 'sum', coalesce_with=0) }}\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__demographics_country_actions_passthrough_metrics', transform = 'sum', coalesce_with=0) }}\n \n from demographics_country\n left join country_conversions\n on demographics_country.country_id = country_conversions.country_id\n and demographics_country.account_id = country_conversions.account_id\n and demographics_country.date_day = country_conversions.date_day\n and demographics_country.source_relation = country_conversions.source_relation\n left join accounts\n on demographics_country.account_id = accounts.account_id\n and demographics_country.source_relation = accounts.source_relation\n {{ dbt_utils.group_by(n=11) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__account_history", "package": null, "version": null}, {"name": "stg_facebook_ads__demographics_country", "package": null, "version": null}, {"name": "stg_facebook_ads__demographics_country_actions", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.facebook_action_slug", "macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by", "macro.facebook_ads.facebook_ads_persist_pass_through_columns"], "nodes": ["model.facebook_ads.stg_facebook_ads__account_history", "model.facebook_ads.stg_facebook_ads__demographics_country", "model.facebook_ads.stg_facebook_ads__demographics_country_actions"]}, "compiled_path": "target/compiled/facebook_ads/models/facebook_ads__country_report.sql", "compiled": true, "compiled_code": "\n\nwith accounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__account_history\"\n where is_most_recent_record = true\n),\n\ndemographics_country as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_country\"\n),\n\ndemographics_country_actions as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_country_actions\"\n),\n\ncountry_conversions as (\n\n select\n source_relation,\n account_id,\n country_id,\n date_day,\n sum(conversions) as conversions\n\n \n ,sum(case when \n \n action_type = 'onsite_conversion.purchase'\n \n\n \n then conversions else 0 end) \n as onsite_conversion_purchase_conversions\n \n ,sum(case when \n \n action_type = 'onsite_conversion.lead_grouped'\n \n\n \n then conversions else 0 end) \n as onsite_conversion_lead_grouped_conversions\n \n ,sum(case when \n \n action_type = 'offsite_conversion.fb_pixel_purchase'\n \n\n \n then conversions else 0 end) \n as offsite_conversion_fb_pixel_purchase_conversions\n \n ,sum(case when \n \n action_type = 'offsite_conversion.fb_pixel_lead'\n \n\n \n then conversions else 0 end) \n as offsite_conversion_fb_pixel_lead_conversions\n \n ,sum(case when \n \n action_type = 'offsite_conversion.fb_pixel_custom'\n \n\n \n then conversions else 0 end) \n as offsite_conversion_fb_pixel_custom_conversions\n \n\n \n\n\n\n\n\n from demographics_country_actions\n where \n \n (action_type = 'onsite_conversion.purchase') or (action_type = 'onsite_conversion.lead_grouped') or (action_type = 'offsite_conversion.fb_pixel_purchase') or (action_type = 'offsite_conversion.fb_pixel_lead') or (action_type = 'offsite_conversion.fb_pixel_custom') \n \n group by 1,2,3,4\n),\n\njoined as (\n\n select \n demographics_country.source_relation,\n demographics_country.date_day,\n demographics_country.country_id,\n demographics_country.country,\n demographics_country.account_id,\n accounts.account_name,\n accounts.business_country_code as account_business_country_code,\n accounts.timezone_name as account_timezone,\n accounts.timezone_offset_hours_utc as account_timezone_offset_hours_utc,\n accounts.currency as account_currency,\n accounts.min_daily_budget as account_min_daily_budget,\n\n sum(demographics_country.impressions) as impressions,\n sum(demographics_country.clicks) as clicks,\n sum(demographics_country.spend) as spend,\n sum(demographics_country.reach) as reach,\n sum(demographics_country.frequency) as frequency,\n sum(coalesce(country_conversions.conversions, 0)) as conversions\n \n \n , sum(coalesce(country_conversions.onsite_conversion_purchase_conversions, 0)) \n as onsite_conversion_purchase_conversions\n \n , sum(coalesce(country_conversions.onsite_conversion_lead_grouped_conversions, 0)) \n as onsite_conversion_lead_grouped_conversions\n \n , sum(coalesce(country_conversions.offsite_conversion_fb_pixel_purchase_conversions, 0)) \n as offsite_conversion_fb_pixel_purchase_conversions\n \n , sum(coalesce(country_conversions.offsite_conversion_fb_pixel_lead_conversions, 0)) \n as offsite_conversion_fb_pixel_lead_conversions\n \n , sum(coalesce(country_conversions.offsite_conversion_fb_pixel_custom_conversions, 0)) \n as offsite_conversion_fb_pixel_custom_conversions\n \n\n \n\n\n\n\n \n\n\n\n\n \n from demographics_country\n left join country_conversions\n on demographics_country.country_id = country_conversions.country_id\n and demographics_country.account_id = country_conversions.account_id\n and demographics_country.date_day = country_conversions.date_day\n and demographics_country.source_relation = country_conversions.source_relation\n left join accounts\n on demographics_country.account_id = accounts.account_id\n and demographics_country.source_relation = accounts.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.facebook_ads__url_tags": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "facebook_ads__url_tags", "resource_type": "model", "package_name": "facebook_ads", "path": "facebook_ads__url_tags.sql", "original_file_path": "models/facebook_ads__url_tags.sql", "unique_id": "model.facebook_ads.facebook_ads__url_tags", "fqn": ["facebook_ads", "facebook_ads__url_tags"], "alias": "facebook_ads__url_tags", "checksum": {"name": "sha256", "checksum": "be1a1246670d2244b717944ccfdf111ab84af2e43cff2c092c16dc160f6b6b23"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record is a unique combination of creative_id and corresponding key, value, type contained in the url_tags field", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "_fivetran_id": {"name": "_fivetran_id", "description": "The unique fivetran ID for this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_id": {"name": "creative_id", "description": "The associated creative_id for this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "key": {"name": "key", "description": "The url tag object name e.g. utm_source associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "value": {"name": "value", "description": "The value assigned to the url tag object associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "type": {"name": "type", "description": "The type assigned to the url tag object e.g. 'AD_VIDEO'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/facebook.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450506.037431, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__url_tags\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_facebook_ads__creative_history') }}\n where is_most_recent_record = true\n), \n\nrequired_fields as (\n\n select\n source_relation,\n _fivetran_id,\n creative_id,\n url_tags\n from base\n where url_tags is not null\n), \n\n{{ get_url_tags_query(\n output_cte_name='fields', \n url_tags_datatype=get_column_datatype('stg_facebook_ads__creative_history', 'url_tags')\n) }} \n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__creative_history", "package": null, "version": null}, {"name": "stg_facebook_ads__creative_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.get_column_datatype", "macro.facebook_ads.get_url_tags_query"], "nodes": ["model.facebook_ads.stg_facebook_ads__creative_history"]}, "compiled_path": "target/compiled/facebook_ads/models/facebook_ads__url_tags.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__creative_history\"\n where is_most_recent_record = true\n), \n\nrequired_fields as (\n\n select\n source_relation,\n _fivetran_id,\n creative_id,\n url_tags\n from base\n where url_tags is not null\n), \n\n\n\n unnested as (\n select\n source_relation,\n _fivetran_id,\n creative_id,\n url_tag_element\n from required_fields\n cross join lateral json_array_elements(replace(trim(url_tags::text, '\"'),'\\\\','')::json) as url_tag_element\n\n where url_tags is not null\n ),\n\n fields as (\n select\n source_relation,\n _fivetran_id,\n creative_id,\n url_tag_element->>'key' as key,\n url_tag_element->>'value' as value,\n url_tag_element->>'type' as type\n from unnested\n ) \n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.facebook_ads__ad_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "facebook_ads__ad_report", "resource_type": "model", "package_name": "facebook_ads", "path": "facebook_ads__ad_report.sql", "original_file_path": "models/facebook_ads__ad_report.sql", "unique_id": "model.facebook_ads.facebook_ads__ad_report", "fqn": ["facebook_ads", "facebook_ads__ad_report"], "alias": "facebook_ads__ad_report", "checksum": {"name": "sha256", "checksum": "81dfc61680d6a483c03c8e8df33e0c2d3ac3687dfc0abf03543aaa0100ef050f"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Facebook ad.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "The name of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_set_id": {"name": "ad_set_id", "description": "The ID of the related ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_set_name": {"name": "ad_set_name", "description": "The name of the related ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_id": {"name": "ad_id", "description": "The ID of the related ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_name": {"name": "ad_name", "description": "The name of the related ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the ad in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total number of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions_value": {"name": "conversions_value", "description": "Total monetary value of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_purchase_conversions": {"name": "onsite_conversion_purchase_conversions", "description": "Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_lead_grouped_conversions": {"name": "onsite_conversion_lead_grouped_conversions", "description": "Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_purchase_conversions": {"name": "offsite_conversion_fb_pixel_purchase_conversions", "description": "Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_lead_conversions": {"name": "offsite_conversion_fb_pixel_lead_conversions", "description": "Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_custom_conversions": {"name": "offsite_conversion_fb_pixel_custom_conversions", "description": "Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_purchase_conversions_value": {"name": "onsite_conversion_purchase_conversions_value", "description": "Monetary value of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_lead_grouped_conversions_value": {"name": "onsite_conversion_lead_grouped_conversions_value", "description": "Monetary value of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_purchase_conversions_value": {"name": "offsite_conversion_fb_pixel_purchase_conversions_value", "description": "Monetary value of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_lead_conversions_value": {"name": "offsite_conversion_fb_pixel_lead_conversions_value", "description": "Monetary value of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_custom_conversions_value": {"name": "offsite_conversion_fb_pixel_custom_conversions_value", "description": "Monetary value of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_domain": {"name": "conversion_domain", "description": "The domain you've configured the ad to convert to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/facebook.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450506.0284185, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__ad_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_facebook_ads__basic_ad') }}\n\n), \n\nconversion_report as (\n\n select *\n from {{ ref('int_facebook_ads__conversions') }}\n\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_facebook_ads__account_history') }}\n where is_most_recent_record = true\n\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_facebook_ads__campaign_history') }}\n where is_most_recent_record = true\n\n),\n\nad_sets as (\n\n select *\n from {{ ref('stg_facebook_ads__ad_set_history') }}\n where is_most_recent_record = true\n\n),\n\nads as (\n\n select *\n from {{ ref('stg_facebook_ads__ad_history') }}\n where is_most_recent_record = true\n\n),\n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n accounts.account_id,\n accounts.account_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n ad_sets.ad_set_id,\n ad_sets.ad_set_name,\n ads.ad_id,\n ads.ad_name,\n ads.conversion_domain,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(coalesce(conversion_report.conversions, 0)) as conversions,\n sum(coalesce(conversion_report.conversions_value, 0)) as conversions_value\n\n {% for action_type in var('facebook_ads__conversion_action_types') %}\n , sum(coalesce(conversion_report.{{ facebook_action_slug(action_type) }}_conversions, 0)) \n as {{ facebook_action_slug(action_type) }}_conversions\n , sum(coalesce(conversion_report.{{ facebook_action_slug(action_type) }}_conversions_value, 0)) \n as {{ facebook_action_slug(action_type) }}_conversions_value\n {% endfor %}\n\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_passthrough_metrics', transform = 'sum', exclude_fields=['conversions', 'conversions_value']) }}\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_actions_passthrough_metrics', transform = 'sum', coalesce_with=0) }}\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_action_values_passthrough_metrics', transform = 'sum', coalesce_with=0) }}\n\n from report \n left join conversion_report\n on report.date_day = conversion_report.date_day\n and report.ad_id = conversion_report.ad_id\n and report.source_relation = conversion_report.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join ads \n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n left join ad_sets\n on ads.ad_set_id = ad_sets.ad_set_id\n and ads.source_relation = ad_sets.source_relation\n {{ dbt_utils.group_by(11) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__basic_ad", "package": null, "version": null}, {"name": "int_facebook_ads__conversions", "package": null, "version": null}, {"name": "stg_facebook_ads__account_history", "package": null, "version": null}, {"name": "stg_facebook_ads__campaign_history", "package": null, "version": null}, {"name": "stg_facebook_ads__ad_set_history", "package": null, "version": null}, {"name": "stg_facebook_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.facebook_action_slug", "macro.facebook_ads.facebook_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.facebook_ads.stg_facebook_ads__basic_ad", "model.facebook_ads.int_facebook_ads__conversions", "model.facebook_ads.stg_facebook_ads__account_history", "model.facebook_ads.stg_facebook_ads__campaign_history", "model.facebook_ads.stg_facebook_ads__ad_set_history", "model.facebook_ads.stg_facebook_ads__ad_history"]}, "compiled_path": "target/compiled/facebook_ads/models/facebook_ads__ad_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad\"\n\n), \n\nconversion_report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"int_facebook_ads__conversions\"\n\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__account_history\"\n where is_most_recent_record = true\n\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__campaign_history\"\n where is_most_recent_record = true\n\n),\n\nad_sets as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_set_history\"\n where is_most_recent_record = true\n\n),\n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_history\"\n where is_most_recent_record = true\n\n),\n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n accounts.account_id,\n accounts.account_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n ad_sets.ad_set_id,\n ad_sets.ad_set_name,\n ads.ad_id,\n ads.ad_name,\n ads.conversion_domain,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(coalesce(conversion_report.conversions, 0)) as conversions,\n sum(coalesce(conversion_report.conversions_value, 0)) as conversions_value\n\n \n , sum(coalesce(conversion_report.onsite_conversion_purchase_conversions, 0)) \n as onsite_conversion_purchase_conversions\n , sum(coalesce(conversion_report.onsite_conversion_purchase_conversions_value, 0)) \n as onsite_conversion_purchase_conversions_value\n \n , sum(coalesce(conversion_report.onsite_conversion_lead_grouped_conversions, 0)) \n as onsite_conversion_lead_grouped_conversions\n , sum(coalesce(conversion_report.onsite_conversion_lead_grouped_conversions_value, 0)) \n as onsite_conversion_lead_grouped_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_purchase_conversions, 0)) \n as offsite_conversion_fb_pixel_purchase_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_purchase_conversions_value, 0)) \n as offsite_conversion_fb_pixel_purchase_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_lead_conversions, 0)) \n as offsite_conversion_fb_pixel_lead_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_lead_conversions_value, 0)) \n as offsite_conversion_fb_pixel_lead_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_custom_conversions, 0)) \n as offsite_conversion_fb_pixel_custom_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_custom_conversions_value, 0)) \n as offsite_conversion_fb_pixel_custom_conversions_value\n \n\n \n\n\n\n\n \n\n\n\n\n \n\n\n\n\n\n from report \n left join conversion_report\n on report.date_day = conversion_report.date_day\n and report.ad_id = conversion_report.ad_id\n and report.source_relation = conversion_report.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join ads \n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n left join ad_sets\n on ads.ad_set_id = ad_sets.ad_set_id\n and ads.source_relation = ad_sets.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.facebook_ads__account_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "facebook_ads__account_report", "resource_type": "model", "package_name": "facebook_ads", "path": "facebook_ads__account_report.sql", "original_file_path": "models/facebook_ads__account_report.sql", "unique_id": "model.facebook_ads.facebook_ads__account_report", "fqn": ["facebook_ads", "facebook_ads__account_report"], "alias": "facebook_ads__account_report", "checksum": {"name": "sha256", "checksum": "7f53bab8030336e9baf746b14d2cc04979910150d71bc9bae18e6f447a220a35"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Facebook account.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "The name of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the ad in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total number of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions_value": {"name": "conversions_value", "description": "Total monetary value of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_purchase_conversions": {"name": "onsite_conversion_purchase_conversions", "description": "Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_lead_grouped_conversions": {"name": "onsite_conversion_lead_grouped_conversions", "description": "Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_purchase_conversions": {"name": "offsite_conversion_fb_pixel_purchase_conversions", "description": "Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_lead_conversions": {"name": "offsite_conversion_fb_pixel_lead_conversions", "description": "Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_custom_conversions": {"name": "offsite_conversion_fb_pixel_custom_conversions", "description": "Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_purchase_conversions_value": {"name": "onsite_conversion_purchase_conversions_value", "description": "Monetary value of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_lead_grouped_conversions_value": {"name": "onsite_conversion_lead_grouped_conversions_value", "description": "Monetary value of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_purchase_conversions_value": {"name": "offsite_conversion_fb_pixel_purchase_conversions_value", "description": "Monetary value of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_lead_conversions_value": {"name": "offsite_conversion_fb_pixel_lead_conversions_value", "description": "Monetary value of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_custom_conversions_value": {"name": "offsite_conversion_fb_pixel_custom_conversions_value", "description": "Monetary value of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_status": {"name": "account_status", "description": "Current status of account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "business_country_code": {"name": "business_country_code", "description": "Country code of business associated to account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The time account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Currency associated with account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone_name": {"name": "timezone_name", "description": "Timezone associated with account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/facebook.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450506.036574, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__account_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_facebook_ads__basic_ad') }}\n\n), \n\nconversion_report as (\n\n select *\n from {{ ref('int_facebook_ads__conversions') }}\n\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_facebook_ads__account_history') }}\n where is_most_recent_record = true\n\n),\n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n accounts.account_id,\n accounts.account_name,\n accounts.account_status,\n accounts.business_country_code,\n accounts.created_at,\n accounts.currency,\n accounts.timezone_name,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(coalesce(conversion_report.conversions, 0)) as conversions,\n sum(coalesce(conversion_report.conversions_value, 0)) as conversions_value\n \n {% for action_type in var('facebook_ads__conversion_action_types') %}\n , sum(coalesce(conversion_report.{{ facebook_action_slug(action_type) }}_conversions, 0)) \n as {{ facebook_action_slug(action_type) }}_conversions\n , sum(coalesce(conversion_report.{{ facebook_action_slug(action_type) }}_conversions_value, 0)) \n as {{ facebook_action_slug(action_type) }}_conversions_value\n {% endfor %}\n\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_passthrough_metrics', transform = 'sum', exclude_fields=['conversions', 'conversions_value']) }}\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_actions_passthrough_metrics', transform = 'sum', coalesce_with=0) }}\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_action_values_passthrough_metrics', transform = 'sum', coalesce_with=0) }}\n\n from report \n left join conversion_report\n on report.date_day = conversion_report.date_day\n and report.ad_id = conversion_report.ad_id\n and report.source_relation = conversion_report.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n {{ dbt_utils.group_by(9) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__basic_ad", "package": null, "version": null}, {"name": "int_facebook_ads__conversions", "package": null, "version": null}, {"name": "stg_facebook_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.facebook_action_slug", "macro.facebook_ads.facebook_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.facebook_ads.stg_facebook_ads__basic_ad", "model.facebook_ads.int_facebook_ads__conversions", "model.facebook_ads.stg_facebook_ads__account_history"]}, "compiled_path": "target/compiled/facebook_ads/models/facebook_ads__account_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad\"\n\n), \n\nconversion_report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"int_facebook_ads__conversions\"\n\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__account_history\"\n where is_most_recent_record = true\n\n),\n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n accounts.account_id,\n accounts.account_name,\n accounts.account_status,\n accounts.business_country_code,\n accounts.created_at,\n accounts.currency,\n accounts.timezone_name,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(coalesce(conversion_report.conversions, 0)) as conversions,\n sum(coalesce(conversion_report.conversions_value, 0)) as conversions_value\n \n \n , sum(coalesce(conversion_report.onsite_conversion_purchase_conversions, 0)) \n as onsite_conversion_purchase_conversions\n , sum(coalesce(conversion_report.onsite_conversion_purchase_conversions_value, 0)) \n as onsite_conversion_purchase_conversions_value\n \n , sum(coalesce(conversion_report.onsite_conversion_lead_grouped_conversions, 0)) \n as onsite_conversion_lead_grouped_conversions\n , sum(coalesce(conversion_report.onsite_conversion_lead_grouped_conversions_value, 0)) \n as onsite_conversion_lead_grouped_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_purchase_conversions, 0)) \n as offsite_conversion_fb_pixel_purchase_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_purchase_conversions_value, 0)) \n as offsite_conversion_fb_pixel_purchase_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_lead_conversions, 0)) \n as offsite_conversion_fb_pixel_lead_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_lead_conversions_value, 0)) \n as offsite_conversion_fb_pixel_lead_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_custom_conversions, 0)) \n as offsite_conversion_fb_pixel_custom_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_custom_conversions_value, 0)) \n as offsite_conversion_fb_pixel_custom_conversions_value\n \n\n \n\n\n\n\n \n\n\n\n\n \n\n\n\n\n\n from report \n left join conversion_report\n on report.date_day = conversion_report.date_day\n and report.ad_id = conversion_report.ad_id\n and report.source_relation = conversion_report.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n group by 1,2,3,4,5,6,7,8,9\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.facebook_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "facebook_ads__campaign_report", "resource_type": "model", "package_name": "facebook_ads", "path": "facebook_ads__campaign_report.sql", "original_file_path": "models/facebook_ads__campaign_report.sql", "unique_id": "model.facebook_ads.facebook_ads__campaign_report", "fqn": ["facebook_ads", "facebook_ads__campaign_report"], "alias": "facebook_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "9467f89f25c96f2d90b7ece00a6db15bea95b3b99cf867cc74f25f34428b34b5"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Facebook campaign.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "The name of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the ad in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total number of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions_value": {"name": "conversions_value", "description": "Total monetary value of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_purchase_conversions": {"name": "onsite_conversion_purchase_conversions", "description": "Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_lead_grouped_conversions": {"name": "onsite_conversion_lead_grouped_conversions", "description": "Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_purchase_conversions": {"name": "offsite_conversion_fb_pixel_purchase_conversions", "description": "Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_lead_conversions": {"name": "offsite_conversion_fb_pixel_lead_conversions", "description": "Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_custom_conversions": {"name": "offsite_conversion_fb_pixel_custom_conversions", "description": "Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_purchase_conversions_value": {"name": "onsite_conversion_purchase_conversions_value", "description": "Monetary value of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_lead_grouped_conversions_value": {"name": "onsite_conversion_lead_grouped_conversions_value", "description": "Monetary value of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_purchase_conversions_value": {"name": "offsite_conversion_fb_pixel_purchase_conversions_value", "description": "Monetary value of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_lead_conversions_value": {"name": "offsite_conversion_fb_pixel_lead_conversions_value", "description": "Monetary value of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_custom_conversions_value": {"name": "offsite_conversion_fb_pixel_custom_conversions_value", "description": "Monetary value of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_at": {"name": "start_at", "description": "Timestamp of designated campaign start time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_at": {"name": "end_at", "description": "Timestamp of designated campaign end time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget": {"name": "daily_budget", "description": "Daily budget of campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_remaining": {"name": "budget_remaining", "description": "Remaining budget of campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lifetime_budget": {"name": "lifetime_budget", "description": "Lifetime budget of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Status values are - 'ACTIVE', 'PAUSED', 'DELETED', 'ARCHIVED'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/facebook.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450506.033911, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_facebook_ads__basic_ad') }}\n\n), \n\nconversion_report as (\n\n select *\n from {{ ref('int_facebook_ads__conversions') }}\n\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_facebook_ads__account_history') }}\n where is_most_recent_record = true\n\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_facebook_ads__campaign_history') }}\n where is_most_recent_record = true\n\n),\n\nads as (\n\n select *\n from {{ ref('stg_facebook_ads__ad_history') }}\n where is_most_recent_record = true\n\n),\n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n accounts.account_id,\n accounts.account_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.start_at,\n campaigns.end_at,\n campaigns.status,\n campaigns.daily_budget,\n campaigns.lifetime_budget,\n campaigns.budget_remaining,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend, \n sum(coalesce(conversion_report.conversions, 0)) as conversions,\n sum(coalesce(conversion_report.conversions_value, 0)) as conversions_value\n\n {% for action_type in var('facebook_ads__conversion_action_types') %}\n , sum(coalesce(conversion_report.{{ facebook_action_slug(action_type) }}_conversions, 0)) \n as {{ facebook_action_slug(action_type) }}_conversions\n , sum(coalesce(conversion_report.{{ facebook_action_slug(action_type) }}_conversions_value, 0)) \n as {{ facebook_action_slug(action_type) }}_conversions_value\n {% endfor %}\n\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_passthrough_metrics', transform = 'sum', exclude_fields=['conversions', 'conversions_value']) }}\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_actions_passthrough_metrics', transform = 'sum', coalesce_with=0) }}\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_action_values_passthrough_metrics', transform = 'sum', coalesce_with=0) }}\n\n from report \n left join conversion_report\n on report.date_day = conversion_report.date_day\n and report.ad_id = conversion_report.ad_id\n and report.source_relation = conversion_report.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join ads \n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n {{ dbt_utils.group_by(12) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__basic_ad", "package": null, "version": null}, {"name": "int_facebook_ads__conversions", "package": null, "version": null}, {"name": "stg_facebook_ads__account_history", "package": null, "version": null}, {"name": "stg_facebook_ads__campaign_history", "package": null, "version": null}, {"name": "stg_facebook_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.facebook_action_slug", "macro.facebook_ads.facebook_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.facebook_ads.stg_facebook_ads__basic_ad", "model.facebook_ads.int_facebook_ads__conversions", "model.facebook_ads.stg_facebook_ads__account_history", "model.facebook_ads.stg_facebook_ads__campaign_history", "model.facebook_ads.stg_facebook_ads__ad_history"]}, "compiled_path": "target/compiled/facebook_ads/models/facebook_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad\"\n\n), \n\nconversion_report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"int_facebook_ads__conversions\"\n\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__account_history\"\n where is_most_recent_record = true\n\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__campaign_history\"\n where is_most_recent_record = true\n\n),\n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_history\"\n where is_most_recent_record = true\n\n),\n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n accounts.account_id,\n accounts.account_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.start_at,\n campaigns.end_at,\n campaigns.status,\n campaigns.daily_budget,\n campaigns.lifetime_budget,\n campaigns.budget_remaining,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend, \n sum(coalesce(conversion_report.conversions, 0)) as conversions,\n sum(coalesce(conversion_report.conversions_value, 0)) as conversions_value\n\n \n , sum(coalesce(conversion_report.onsite_conversion_purchase_conversions, 0)) \n as onsite_conversion_purchase_conversions\n , sum(coalesce(conversion_report.onsite_conversion_purchase_conversions_value, 0)) \n as onsite_conversion_purchase_conversions_value\n \n , sum(coalesce(conversion_report.onsite_conversion_lead_grouped_conversions, 0)) \n as onsite_conversion_lead_grouped_conversions\n , sum(coalesce(conversion_report.onsite_conversion_lead_grouped_conversions_value, 0)) \n as onsite_conversion_lead_grouped_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_purchase_conversions, 0)) \n as offsite_conversion_fb_pixel_purchase_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_purchase_conversions_value, 0)) \n as offsite_conversion_fb_pixel_purchase_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_lead_conversions, 0)) \n as offsite_conversion_fb_pixel_lead_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_lead_conversions_value, 0)) \n as offsite_conversion_fb_pixel_lead_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_custom_conversions, 0)) \n as offsite_conversion_fb_pixel_custom_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_custom_conversions_value, 0)) \n as offsite_conversion_fb_pixel_custom_conversions_value\n \n\n \n\n\n\n\n \n\n\n\n\n \n\n\n\n\n\n from report \n left join conversion_report\n on report.date_day = conversion_report.date_day\n and report.ad_id = conversion_report.ad_id\n and report.source_relation = conversion_report.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join ads \n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.facebook_ads__ad_set_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "facebook_ads__ad_set_report", "resource_type": "model", "package_name": "facebook_ads", "path": "facebook_ads__ad_set_report.sql", "original_file_path": "models/facebook_ads__ad_set_report.sql", "unique_id": "model.facebook_ads.facebook_ads__ad_set_report", "fqn": ["facebook_ads", "facebook_ads__ad_set_report"], "alias": "facebook_ads__ad_set_report", "checksum": {"name": "sha256", "checksum": "e545a86e76ab522dc6764200b0f24e19a6dcc3733a0091452eed450c032ecfb7"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Facebook ad set.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "The name of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_set_id": {"name": "ad_set_id", "description": "The ID of the related ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_set_name": {"name": "ad_set_name", "description": "The name of the related ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the ad in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total number of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions_value": {"name": "conversions_value", "description": "Total monetary value of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_purchase_conversions": {"name": "onsite_conversion_purchase_conversions", "description": "Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_lead_grouped_conversions": {"name": "onsite_conversion_lead_grouped_conversions", "description": "Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_purchase_conversions": {"name": "offsite_conversion_fb_pixel_purchase_conversions", "description": "Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_lead_conversions": {"name": "offsite_conversion_fb_pixel_lead_conversions", "description": "Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_custom_conversions": {"name": "offsite_conversion_fb_pixel_custom_conversions", "description": "Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_purchase_conversions_value": {"name": "onsite_conversion_purchase_conversions_value", "description": "Monetary value of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_lead_grouped_conversions_value": {"name": "onsite_conversion_lead_grouped_conversions_value", "description": "Monetary value of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_purchase_conversions_value": {"name": "offsite_conversion_fb_pixel_purchase_conversions_value", "description": "Monetary value of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_lead_conversions_value": {"name": "offsite_conversion_fb_pixel_lead_conversions_value", "description": "Monetary value of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_custom_conversions_value": {"name": "offsite_conversion_fb_pixel_custom_conversions_value", "description": "Monetary value of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "optimization_goal": {"name": "optimization_goal", "description": "The optimization goal this ad set is using. Possible values defined [here](https://developers.facebook.com/docs/marketing-api/reference/ad-campaign/#fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_at": {"name": "start_at", "description": "Timestamp of designated ad set start time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_at": {"name": "end_at", "description": "Timestamp of designated ad set end time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_strategy": {"name": "bid_strategy", "description": "Bid strategy values are - 'LOWEST_COST_WITHOUT_CAP', 'LOWEST_COST_WITH_BID_CAP', 'COST_CAP', 'LOWEST_COST_WITH_MIN_ROAS'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget": {"name": "daily_budget", "description": "Daily budget of ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_remaining": {"name": "budget_remaining", "description": "Remaining budget of ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/facebook.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450506.030971, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__ad_set_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_facebook_ads__basic_ad') }}\n\n), \n\nconversion_report as (\n\n select *\n from {{ ref('int_facebook_ads__conversions') }}\n\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_facebook_ads__account_history') }}\n where is_most_recent_record = true\n\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_facebook_ads__campaign_history') }}\n where is_most_recent_record = true\n\n),\n\nad_sets as (\n\n select *\n from {{ ref('stg_facebook_ads__ad_set_history') }}\n where is_most_recent_record = true\n\n),\n\nads as (\n\n select *\n from {{ ref('stg_facebook_ads__ad_history') }}\n where is_most_recent_record = true\n\n),\n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n accounts.account_id,\n accounts.account_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n ad_sets.ad_set_id,\n ad_sets.ad_set_name,\n ad_sets.start_at,\n ad_sets.end_at,\n ad_sets.bid_strategy,\n ad_sets.daily_budget,\n ad_sets.budget_remaining,\n ad_sets.optimization_goal,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend, \n sum(coalesce(conversion_report.conversions, 0)) as conversions,\n sum(coalesce(conversion_report.conversions_value, 0)) as conversions_value\n\n {% for action_type in var('facebook_ads__conversion_action_types') %}\n , sum(coalesce(conversion_report.{{ facebook_action_slug(action_type) }}_conversions, 0)) \n as {{ facebook_action_slug(action_type) }}_conversions\n , sum(coalesce(conversion_report.{{ facebook_action_slug(action_type) }}_conversions_value, 0)) \n as {{ facebook_action_slug(action_type) }}_conversions_value\n {% endfor %}\n\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_passthrough_metrics', transform = 'sum', exclude_fields=['conversions', 'conversions_value']) }}\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_actions_passthrough_metrics', transform = 'sum', coalesce_with=0) }}\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_action_values_passthrough_metrics', transform = 'sum', coalesce_with=0) }}\n\n from report \n left join conversion_report\n on report.date_day = conversion_report.date_day\n and report.ad_id = conversion_report.ad_id\n and report.source_relation = conversion_report.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join ads \n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n left join ad_sets\n on ads.ad_set_id = ad_sets.ad_set_id\n and ads.source_relation = ad_sets.source_relation\n {{ dbt_utils.group_by(14) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__basic_ad", "package": null, "version": null}, {"name": "int_facebook_ads__conversions", "package": null, "version": null}, {"name": "stg_facebook_ads__account_history", "package": null, "version": null}, {"name": "stg_facebook_ads__campaign_history", "package": null, "version": null}, {"name": "stg_facebook_ads__ad_set_history", "package": null, "version": null}, {"name": "stg_facebook_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.facebook_action_slug", "macro.facebook_ads.facebook_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.facebook_ads.stg_facebook_ads__basic_ad", "model.facebook_ads.int_facebook_ads__conversions", "model.facebook_ads.stg_facebook_ads__account_history", "model.facebook_ads.stg_facebook_ads__campaign_history", "model.facebook_ads.stg_facebook_ads__ad_set_history", "model.facebook_ads.stg_facebook_ads__ad_history"]}, "compiled_path": "target/compiled/facebook_ads/models/facebook_ads__ad_set_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad\"\n\n), \n\nconversion_report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"int_facebook_ads__conversions\"\n\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__account_history\"\n where is_most_recent_record = true\n\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__campaign_history\"\n where is_most_recent_record = true\n\n),\n\nad_sets as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_set_history\"\n where is_most_recent_record = true\n\n),\n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_history\"\n where is_most_recent_record = true\n\n),\n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n accounts.account_id,\n accounts.account_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n ad_sets.ad_set_id,\n ad_sets.ad_set_name,\n ad_sets.start_at,\n ad_sets.end_at,\n ad_sets.bid_strategy,\n ad_sets.daily_budget,\n ad_sets.budget_remaining,\n ad_sets.optimization_goal,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend, \n sum(coalesce(conversion_report.conversions, 0)) as conversions,\n sum(coalesce(conversion_report.conversions_value, 0)) as conversions_value\n\n \n , sum(coalesce(conversion_report.onsite_conversion_purchase_conversions, 0)) \n as onsite_conversion_purchase_conversions\n , sum(coalesce(conversion_report.onsite_conversion_purchase_conversions_value, 0)) \n as onsite_conversion_purchase_conversions_value\n \n , sum(coalesce(conversion_report.onsite_conversion_lead_grouped_conversions, 0)) \n as onsite_conversion_lead_grouped_conversions\n , sum(coalesce(conversion_report.onsite_conversion_lead_grouped_conversions_value, 0)) \n as onsite_conversion_lead_grouped_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_purchase_conversions, 0)) \n as offsite_conversion_fb_pixel_purchase_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_purchase_conversions_value, 0)) \n as offsite_conversion_fb_pixel_purchase_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_lead_conversions, 0)) \n as offsite_conversion_fb_pixel_lead_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_lead_conversions_value, 0)) \n as offsite_conversion_fb_pixel_lead_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_custom_conversions, 0)) \n as offsite_conversion_fb_pixel_custom_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_custom_conversions_value, 0)) \n as offsite_conversion_fb_pixel_custom_conversions_value\n \n\n \n\n\n\n\n \n\n\n\n\n \n\n\n\n\n\n from report \n left join conversion_report\n on report.date_day = conversion_report.date_day\n and report.ad_id = conversion_report.ad_id\n and report.source_relation = conversion_report.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join ads \n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n left join ad_sets\n on ads.ad_set_id = ad_sets.ad_set_id\n and ads.source_relation = ad_sets.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.facebook_ads__url_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "facebook_ads__url_report", "resource_type": "model", "package_name": "facebook_ads", "path": "facebook_ads__url_report.sql", "original_file_path": "models/facebook_ads__url_report.sql", "unique_id": "model.facebook_ads.facebook_ads__url_report", "fqn": ["facebook_ads", "facebook_ads__url_report"], "alias": "facebook_ads__url_report", "checksum": {"name": "sha256", "checksum": "7e33ea42888d8ba3f2245a510727e771b2fe9983949833f60337c27d1e795347"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Facebook ad at the URL level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "The name of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_set_id": {"name": "ad_set_id", "description": "The ID of the related ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_set_name": {"name": "ad_set_name", "description": "The name of the related ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_id": {"name": "ad_id", "description": "The ID of the related ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_name": {"name": "ad_name", "description": "The name of the related ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_id": {"name": "creative_id", "description": "The ID of the related creative.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_name": {"name": "creative_name", "description": "The name of the related creative.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the page_link and template_page_link.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_host": {"name": "url_host", "description": "The URL host of the ad, extracted from the page_link and template_page_link.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_path": {"name": "url_path", "description": "The URL path of the ad, extracted from the page_link and template_page_link.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_source": {"name": "utm_source", "description": "The utm_source parameter of the ad, extracted from the page_link and template_page_link.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_medium": {"name": "utm_medium", "description": "The utm_medium parameter of the ad, extracted from the page_link and template_page_link.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_campaign": {"name": "utm_campaign", "description": "The utm_campaign parameter of the ad, extracted from the page_link and template_page_link.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_content": {"name": "utm_content", "description": "The utm_content parameter of the ad, extracted from the page_link and template_page_link.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_term": {"name": "utm_term", "description": "The utm_term parameter of the ad, extracted from the page_link and template_page_link.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the ad in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total number of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions_value": {"name": "conversions_value", "description": "Total monetary value of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_purchase_conversions": {"name": "onsite_conversion_purchase_conversions", "description": "Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_lead_grouped_conversions": {"name": "onsite_conversion_lead_grouped_conversions", "description": "Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_purchase_conversions": {"name": "offsite_conversion_fb_pixel_purchase_conversions", "description": "Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_lead_conversions": {"name": "offsite_conversion_fb_pixel_lead_conversions", "description": "Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_custom_conversions": {"name": "offsite_conversion_fb_pixel_custom_conversions", "description": "Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_purchase_conversions_value": {"name": "onsite_conversion_purchase_conversions_value", "description": "Monetary value of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_lead_grouped_conversions_value": {"name": "onsite_conversion_lead_grouped_conversions_value", "description": "Monetary value of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_purchase_conversions_value": {"name": "offsite_conversion_fb_pixel_purchase_conversions_value", "description": "Monetary value of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_lead_conversions_value": {"name": "offsite_conversion_fb_pixel_lead_conversions_value", "description": "Monetary value of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_custom_conversions_value": {"name": "offsite_conversion_fb_pixel_custom_conversions_value", "description": "Monetary value of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/facebook.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450506.0263422, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__url_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_facebook_ads__basic_ad') }}\n\n), \n\nconversion_report as (\n\n select *\n from {{ ref('int_facebook_ads__conversions') }}\n\n), \n\ncreatives as (\n\n select *\n from {{ ref('int_facebook_ads__creative_history') }}\n\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_facebook_ads__account_history') }}\n where is_most_recent_record = true\n\n), \n\nads as (\n\n select *\n from {{ ref('stg_facebook_ads__ad_history') }}\n where is_most_recent_record = true\n\n), \n\nad_sets as (\n\n select *\n from {{ ref('stg_facebook_ads__ad_set_history') }}\n where is_most_recent_record = true\n\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_facebook_ads__campaign_history') }}\n where is_most_recent_record = true\n\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_id,\n accounts.account_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n ad_sets.ad_set_id,\n ad_sets.ad_set_name,\n ads.ad_id,\n ads.ad_name,\n creatives.creative_id,\n creatives.creative_name,\n creatives.base_url,\n creatives.url_host,\n creatives.url_path,\n creatives.utm_source,\n creatives.utm_medium,\n creatives.utm_campaign,\n creatives.utm_content,\n creatives.utm_term,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(coalesce(conversion_report.conversions, 0)) as conversions,\n sum(coalesce(conversion_report.conversions_value, 0)) as conversions_value\n\n {% for action_type in var('facebook_ads__conversion_action_types') %}\n , sum(coalesce(conversion_report.{{ facebook_action_slug(action_type) }}_conversions, 0)) \n as {{ facebook_action_slug(action_type) }}_conversions\n , sum(coalesce(conversion_report.{{ facebook_action_slug(action_type) }}_conversions_value, 0)) \n as {{ facebook_action_slug(action_type) }}_conversions_value\n {% endfor %}\n\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_passthrough_metrics', transform = 'sum', exclude_fields=['conversions', 'conversions_value']) }}\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_actions_passthrough_metrics', transform = 'sum', coalesce_with=0) }}\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_action_values_passthrough_metrics', transform = 'sum', coalesce_with=0) }}\n\n from report\n left join conversion_report\n on report.date_day = conversion_report.date_day\n and report.ad_id = conversion_report.ad_id\n and report.source_relation = conversion_report.source_relation\n left join ads \n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join creatives\n on ads.creative_id = creatives.creative_id\n and ads.source_relation = creatives.source_relation\n left join ad_sets\n on ads.ad_set_id = ad_sets.ad_set_id\n and ads.source_relation = ad_sets.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation \n\n {% if var('ad_reporting__url_report__using_null_filter', True) %}\n where creatives.url is not null\n {% endif %}\n \n {{ dbt_utils.group_by(20) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__basic_ad", "package": null, "version": null}, {"name": "int_facebook_ads__conversions", "package": null, "version": null}, {"name": "int_facebook_ads__creative_history", "package": null, "version": null}, {"name": "stg_facebook_ads__account_history", "package": null, "version": null}, {"name": "stg_facebook_ads__ad_history", "package": null, "version": null}, {"name": "stg_facebook_ads__ad_set_history", "package": null, "version": null}, {"name": "stg_facebook_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.facebook_action_slug", "macro.facebook_ads.facebook_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.facebook_ads.stg_facebook_ads__basic_ad", "model.facebook_ads.int_facebook_ads__conversions", "model.facebook_ads.int_facebook_ads__creative_history", "model.facebook_ads.stg_facebook_ads__account_history", "model.facebook_ads.stg_facebook_ads__ad_history", "model.facebook_ads.stg_facebook_ads__ad_set_history", "model.facebook_ads.stg_facebook_ads__campaign_history"]}, "compiled_path": "target/compiled/facebook_ads/models/facebook_ads__url_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad\"\n\n), \n\nconversion_report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"int_facebook_ads__conversions\"\n\n), \n\ncreatives as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"int_facebook_ads__creative_history\"\n\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__account_history\"\n where is_most_recent_record = true\n\n), \n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_history\"\n where is_most_recent_record = true\n\n), \n\nad_sets as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_set_history\"\n where is_most_recent_record = true\n\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__campaign_history\"\n where is_most_recent_record = true\n\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_id,\n accounts.account_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n ad_sets.ad_set_id,\n ad_sets.ad_set_name,\n ads.ad_id,\n ads.ad_name,\n creatives.creative_id,\n creatives.creative_name,\n creatives.base_url,\n creatives.url_host,\n creatives.url_path,\n creatives.utm_source,\n creatives.utm_medium,\n creatives.utm_campaign,\n creatives.utm_content,\n creatives.utm_term,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(coalesce(conversion_report.conversions, 0)) as conversions,\n sum(coalesce(conversion_report.conversions_value, 0)) as conversions_value\n\n \n , sum(coalesce(conversion_report.onsite_conversion_purchase_conversions, 0)) \n as onsite_conversion_purchase_conversions\n , sum(coalesce(conversion_report.onsite_conversion_purchase_conversions_value, 0)) \n as onsite_conversion_purchase_conversions_value\n \n , sum(coalesce(conversion_report.onsite_conversion_lead_grouped_conversions, 0)) \n as onsite_conversion_lead_grouped_conversions\n , sum(coalesce(conversion_report.onsite_conversion_lead_grouped_conversions_value, 0)) \n as onsite_conversion_lead_grouped_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_purchase_conversions, 0)) \n as offsite_conversion_fb_pixel_purchase_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_purchase_conversions_value, 0)) \n as offsite_conversion_fb_pixel_purchase_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_lead_conversions, 0)) \n as offsite_conversion_fb_pixel_lead_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_lead_conversions_value, 0)) \n as offsite_conversion_fb_pixel_lead_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_custom_conversions, 0)) \n as offsite_conversion_fb_pixel_custom_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_custom_conversions_value, 0)) \n as offsite_conversion_fb_pixel_custom_conversions_value\n \n\n \n\n\n\n\n \n\n\n\n\n \n\n\n\n\n\n from report\n left join conversion_report\n on report.date_day = conversion_report.date_day\n and report.ad_id = conversion_report.ad_id\n and report.source_relation = conversion_report.source_relation\n left join ads \n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join creatives\n on ads.creative_id = creatives.creative_id\n and ads.source_relation = creatives.source_relation\n left join ad_sets\n on ads.ad_set_id = ad_sets.ad_set_id\n and ads.source_relation = ad_sets.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation \n\n \n where creatives.url is not null\n \n \n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__demographics_region": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_region", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/stg_facebook_ads__demographics_region.sql", "original_file_path": "models/staging/stg_facebook_ads__demographics_region.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_region", "fqn": ["facebook_ads", "staging", "stg_facebook_ads__demographics_region"], "alias": "stg_facebook_ads__demographics_region", "checksum": {"name": "sha256", "checksum": "82f834b8444667ed1e2a4b98546198a786b246e3815a89b3f057055908d67c34"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Ads report segmented by geographic region.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "region_id": {"name": "region_id", "description": "Fivetran-generated unique ID of the geographic region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.region_id"]}, "region": {"name": "region", "description": "Geographic region whose ad performance is being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.region"]}, "date_day": {"name": "date_day", "description": "The date of the reported performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.date"]}, "account_id": {"name": "account_id", "description": "The ID of the ad account that this ad belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.account_id"]}, "impressions": {"name": "impressions", "description": "The number of impressions the ads had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.impressions"]}, "clicks": {"name": "clicks", "description": "The number of clicks on links to select destinations or experiences, on or off Facebook-owned properties. Inline link clicks use a fixed 1-day-click attribution window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.inline_link_clicks"]}, "spend": {"name": "spend", "description": "Ad spend in a given day for the breakdown.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.spend"]}, "reach": {"name": "reach", "description": "The number of people who saw any content from your Page or about your Page. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.reach"]}, "frequency": {"name": "frequency", "description": "The average number of times each person saw your ads; it is calculated as impressions divided by reach.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.frequency"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/staging/stg_facebook_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450506.1038663, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_region\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True) and var('facebook_ads__using_demographics_region', False)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_facebook_ads__demographics_region_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_facebook_ads__demographics_region_tmp')),\n staging_columns=get_demographics_region_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='facebook_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_id as region_id,\n region,\n date as date_day,\n cast(account_id as {{ dbt.type_bigint() }}) as account_id,\n impressions,\n coalesce(inline_link_clicks,0) as clicks,\n spend,\n reach,\n frequency\n\n {{ fivetran_utils.fill_pass_through_columns('facebook_ads__demographics_region_passthrough_metrics') }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": ["doc.facebook_ads.demographics_region"], "language": "sql", "refs": [{"name": "stg_facebook_ads__demographics_region_tmp", "package": null, "version": null}, {"name": "stg_facebook_ads__demographics_region_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.get_demographics_region_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_bigint", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.facebook_ads.stg_facebook_ads__demographics_region_tmp"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads__demographics_region.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_region_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_id as _fivetran_id,\n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n date as date,\n frequency as frequency,\n impressions as impressions,\n inline_link_clicks as inline_link_clicks,\n reach as reach,\n region as region,\n spend as spend\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_id as region_id,\n region,\n date as date_day,\n cast(account_id as bigint) as account_id,\n impressions,\n coalesce(inline_link_clicks,0) as clicks,\n spend,\n reach,\n frequency\n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__basic_ad_action_values": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__basic_ad_action_values", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/stg_facebook_ads__basic_ad_action_values.sql", "original_file_path": "models/staging/stg_facebook_ads__basic_ad_action_values.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__basic_ad_action_values", "fqn": ["facebook_ads", "staging", "stg_facebook_ads__basic_ad_action_values"], "alias": "stg_facebook_ads__basic_ad_action_values", "checksum": {"name": "sha256", "checksum": "a2dacbc7f99fcbb8c408c96134cddbb5d0d873eeebf2e50e713a03331d3c5aeb"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily conversion values associated with an ad in Facebook. This is the prebuilt `basic_ad` report broken down by `action_type` and `action_values` Include more conversion value metrics by configuring the `facebook_ads__basic_ad_action_values_passthrough_metrics` variable.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "action_type": {"name": "action_type", "description": "The kind of actions taken on your ad, Page, app or event after your ad was served to someone, even if they didn't click on it. Action types include Page likes, app installs, conversions, event responses and more. Actions prepended by app_custom_event come from mobile app events and actions prepended by offsite_conversion come from the Facebook Pixel.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_id": {"name": "ad_id", "description": "The ID of the ad the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_id": {"name": "_fivetran_id", "description": "Unique record identifier.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the reported performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "index": {"name": "index", "description": "Index reflecting the `action_type` tracked for this ad on this day. A primary key created by Fivetran utilized for tracking data, specifically when there are multiple rows associated with a single row in the parent table.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.index"]}, "conversions_value": {"name": "conversions_value", "description": "Monetary value associated with the conversion action using the default attribution window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/staging/stg_facebook_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450506.1011004, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad_action_values\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_facebook_ads__basic_ad_action_values_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_facebook_ads__basic_ad_action_values_tmp')),\n staging_columns=get_basic_ad_action_values_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='facebook_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n lower(action_type) as action_type,\n cast(ad_id as {{ dbt.type_bigint() }}) as ad_id,\n _fivetran_id,\n date as date_day,\n index,\n cast(coalesce(value, 0) as {{ dbt.type_float() }}) as conversions_value\n\n {{ facebook_ads_fill_pass_through_columns(var('facebook_ads__basic_ad_action_values_passthrough_metrics')) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__basic_ad_action_values_tmp", "package": null, "version": null}, {"name": "stg_facebook_ads__basic_ad_action_values_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.get_basic_ad_action_values_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_bigint", "macro.dbt.type_float", "macro.facebook_ads.facebook_ads_fill_pass_through_columns"], "nodes": ["model.facebook_ads.stg_facebook_ads__basic_ad_action_values_tmp"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads__basic_ad_action_values.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad_action_values_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_id as _fivetran_id,\n _fivetran_synced as _fivetran_synced,\n action_type as action_type,\n ad_id as ad_id,\n date as date,\n index as index,\n value as value\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n lower(action_type) as action_type,\n cast(ad_id as bigint) as ad_id,\n _fivetran_id,\n date as date_day,\n index,\n cast(coalesce(value, 0) as float) as conversions_value\n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__basic_ad": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__basic_ad", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/stg_facebook_ads__basic_ad.sql", "original_file_path": "models/staging/stg_facebook_ads__basic_ad.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__basic_ad", "fqn": ["facebook_ads", "staging", "stg_facebook_ads__basic_ad"], "alias": "stg_facebook_ads__basic_ad", "checksum": {"name": "sha256", "checksum": "bf40f829575a18b972c2952619a78bbb095da53ddb4b2b29d6f6111696184e1f"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of an ad in Facebook.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "ad_id": {"name": "ad_id", "description": "The ID of the ad the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_name": {"name": "ad_name", "description": "Name of the ad the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_set_name": {"name": "ad_set_name", "description": "Name of the ad set the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the reported performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the ad account that this ad belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the ad in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reach": {"name": "reach", "description": "The number of people who saw any content from your Page or about your Page. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "frequency": {"name": "frequency", "description": "The average number of times each person saw your ad; it is calculated as impressions divided by reach.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/staging/stg_facebook_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450506.0994477, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_facebook_ads__basic_ad_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_facebook_ads__basic_ad_tmp')),\n staging_columns=get_basic_ad_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='facebook_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(ad_id as {{ dbt.type_bigint() }}) as ad_id,\n ad_name,\n adset_name as ad_set_name,\n date as date_day,\n cast(account_id as {{ dbt.type_bigint() }}) as account_id,\n impressions,\n coalesce(inline_link_clicks,0) as clicks,\n spend\n\n {# \n Reach and Frequency are not included in downstream models by default, though they are included in the staging model.\n The below ensures that users can add Reach and Frequency to downstream models with the `facebook_ads__basic_ad_passthrough_metrics` variable\n while avoiding duplicate column errors.\n #}\n {%- set check = [] %}\n {%- for field in var('facebook_ads__basic_ad_passthrough_metrics') -%}\n {%- set field_name = field.alias|default(field.name)|lower %}\n {% if field_name in ['reach', 'frequency'] %}\n {% do check.append(field_name) %}\n {% endif %}\n {%- endfor %}\n\n {%- for metric in ['reach', 'frequency'] -%}\n {% if metric not in check %}\n , {{ metric }}\n {% endif %}\n {%- endfor %}\n\n {{ fivetran_utils.fill_pass_through_columns('facebook_ads__basic_ad_passthrough_metrics') }}\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__basic_ad_tmp", "package": null, "version": null}, {"name": "stg_facebook_ads__basic_ad_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.get_basic_ad_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_bigint", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.facebook_ads.stg_facebook_ads__basic_ad_tmp"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads__basic_ad.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad_tmp\"\n),\n\nfields as (\n\n select\n \n ad_id as ad_id,\n cast(null as TEXT) as ad_name,\n cast(null as TEXT) as adset_name,\n date as date,\n account_id as account_id,\n impressions as impressions,\n inline_link_clicks as inline_link_clicks,\n spend as spend,\n cast(null as integer) as reach,\n cast(null as float) as frequency\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(ad_id as bigint) as ad_id,\n ad_name,\n adset_name as ad_set_name,\n date as date_day,\n cast(account_id as bigint) as account_id,\n impressions,\n coalesce(inline_link_clicks,0) as clicks,\n spend\n\n \n , reach\n \n , frequency\n \n\n \n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__campaign_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__campaign_history", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/stg_facebook_ads__campaign_history.sql", "original_file_path": "models/staging/stg_facebook_ads__campaign_history.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__campaign_history", "fqn": ["facebook_ads", "staging", "stg_facebook_ads__campaign_history"], "alias": "stg_facebook_ads__campaign_history", "checksum": {"name": "sha256", "checksum": "5ef367b9564e77882c479fca7b0d2e0818e42ab3520bce20a0f4b9f29c6bedb4"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table reflects a Facebook campaign.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the ad account that this campaign belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record. All records should have this value set to True given we filter on it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.is_most_recent_record"]}, "updated_at": {"name": "updated_at", "description": "The timestamp of the last update of a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.updated_time"]}, "created_at": {"name": "created_at", "description": "The time the campaign was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_at": {"name": "start_at", "description": "Timestamp of designated campaign start time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_at": {"name": "end_at", "description": "Timestamp of designated campaign end time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget": {"name": "daily_budget", "description": "Daily budget of campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_remaining": {"name": "budget_remaining", "description": "Remaining budget of campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lifetime_budget": {"name": "lifetime_budget", "description": "Lifetime budget of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Status values are - 'ACTIVE', 'PAUSED', 'DELETED', 'ARCHIVED'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/staging/stg_facebook_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450506.0964956, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__campaign_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_facebook_ads__campaign_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_facebook_ads__campaign_history_tmp')),\n staging_columns=get_campaign_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='facebook_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n updated_time as updated_at,\n created_time as created_at,\n cast(account_id as {{ dbt.type_bigint() }}) as account_id,\n cast(id as {{ dbt.type_bigint() }}) as campaign_id,\n name as campaign_name,\n start_time as start_at,\n stop_time as end_at,\n status,\n daily_budget,\n lifetime_budget,\n budget_remaining,\n case when id is null and updated_time is null \n then row_number() over ({{ fivetran_utils.partition_by_source_relation(package_name='facebook_ads', has_other_partitions='no') }} order by source_relation)\n else row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='facebook_ads') }} order by updated_time desc) end = 1 as is_most_recent_record\n from fields\n\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__campaign_history_tmp", "package": null, "version": null}, {"name": "stg_facebook_ads__campaign_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.get_campaign_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_bigint", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.facebook_ads.stg_facebook_ads__campaign_history_tmp"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads__campaign_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__campaign_history_tmp\"\n),\n\nfields as (\n\n select\n \n updated_time as updated_time,\n cast(null as timestamp) as created_time,\n account_id as account_id,\n id as id,\n name as name,\n cast(null as timestamp) as start_time,\n cast(null as timestamp) as stop_time,\n cast(null as TEXT) as status,\n cast(null as integer) as daily_budget,\n cast(null as integer) as lifetime_budget,\n cast(null as float) as budget_remaining\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n updated_time as updated_at,\n created_time as created_at,\n cast(account_id as bigint) as account_id,\n cast(id as bigint) as campaign_id,\n name as campaign_name,\n start_time as start_at,\n stop_time as end_at,\n status,\n daily_budget,\n lifetime_budget,\n budget_remaining,\n case when id is null and updated_time is null \n then row_number() over ( order by source_relation)\n else row_number() over (partition by id order by updated_time desc) end = 1 as is_most_recent_record\n from fields\n\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__demographics_region_actions": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_region_actions", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/stg_facebook_ads__demographics_region_actions.sql", "original_file_path": "models/staging/stg_facebook_ads__demographics_region_actions.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_region_actions", "fqn": ["facebook_ads", "staging", "stg_facebook_ads__demographics_region_actions"], "alias": "stg_facebook_ads__demographics_region_actions", "checksum": {"name": "sha256", "checksum": "18a9293bfee09d01e281194bc2d9f24067cfa6a35fed86b7588d752c3cc4d202"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents daily conversion performance by geographic region. This is the prebuilt `demographics_region` report broken down by `action_type`.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "region_id": {"name": "region_id", "description": "Fivetran-generated unique ID of the geographic region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.region_id"]}, "action_type": {"name": "action_type", "description": "The kind of actions taken on your ad, Page, app or event after your ad was served to someone, even if they didn't click on it. Action types include Page likes, app installs, conversions, event responses and more.\nActions prepended by `app_custom_event` come from mobile app events and actions prepended by `offsite_conversion` come from the Facebook Pixel.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.action_type"]}, "account_id": {"name": "account_id", "description": "The ID of the ad account that this ad belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.account_id"]}, "date_day": {"name": "date_day", "description": "The date of the reported performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.date"]}, "index": {"name": "index", "description": "Index reflecting the `action_type` tracked for this ad on this day. A primary key created by Fivetran utilized for tracking data, specifically when there are multiple rows associated with a single row in the parent table.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.index"]}, "conversions": {"name": "conversions", "description": "Conversion metric value using the default attribution window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.conversions"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/staging/stg_facebook_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450506.1047695, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_region_actions\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True) and var('facebook_ads__using_demographics_region', False)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_facebook_ads__demographics_region_actions_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_facebook_ads__demographics_region_actions_tmp')),\n staging_columns=get_demographics_region_actions_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='facebook_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_id as region_id,\n lower(action_type) as action_type,\n cast(account_id as {{ dbt.type_bigint() }}) as account_id,\n date as date_day,\n index,\n cast(coalesce(value, 0) as {{ dbt.type_float() }}) as conversions\n\n {{ fivetran_utils.fill_pass_through_columns('facebook_ads__demographics_region_actions_passthrough_metrics') }}\n \n from fields\n)\n\nselect *\nfrom final", "doc_blocks": ["doc.facebook_ads.demographics_region_actions"], "language": "sql", "refs": [{"name": "stg_facebook_ads__demographics_region_actions_tmp", "package": null, "version": null}, {"name": "stg_facebook_ads__demographics_region_actions_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.get_demographics_region_actions_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_bigint", "macro.dbt.type_float", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.facebook_ads.stg_facebook_ads__demographics_region_actions_tmp"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads__demographics_region_actions.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_region_actions_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_id as _fivetran_id,\n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n action_type as action_type,\n date as date,\n index as index,\n value as value\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_id as region_id,\n lower(action_type) as action_type,\n cast(account_id as bigint) as account_id,\n date as date_day,\n index,\n cast(coalesce(value, 0) as float) as conversions\n\n \n\n\n\n\n \n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__ad_set_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__ad_set_history", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/stg_facebook_ads__ad_set_history.sql", "original_file_path": "models/staging/stg_facebook_ads__ad_set_history.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__ad_set_history", "fqn": ["facebook_ads", "staging", "stg_facebook_ads__ad_set_history"], "alias": "stg_facebook_ads__ad_set_history", "checksum": {"name": "sha256", "checksum": "98dd6376b043f5cfffe8c5ef166e2df3a440e37e2e08616afbab73fdba6f01e7"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table reflects a Facebook ad set.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "ad_set_id": {"name": "ad_set_id", "description": "The ID of the ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the ad account that this ad set belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Ad campaign that contains this ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_set_name": {"name": "ad_set_name", "description": "The name of the ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record. All records should have this value set to True given we filter on it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.is_most_recent_record"]}, "updated_at": {"name": "updated_at", "description": "The timestamp of the last update of a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.updated_time"]}, "start_at": {"name": "start_at", "description": "Timestamp of designated ad set start time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_at": {"name": "end_at", "description": "Timestamp of designated ad set end time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_strategy": {"name": "bid_strategy", "description": "Bid strategy values are - 'LOWEST_COST_WITHOUT_CAP', 'LOWEST_COST_WITH_BID_CAP', 'COST_CAP', 'LOWEST_COST_WITH_MIN_ROAS'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget": {"name": "daily_budget", "description": "Daily budget of ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_remaining": {"name": "budget_remaining", "description": "Remaining budget of ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Status values are - 'ACTIVE', 'PAUSED', 'DELETED', 'ARCHIVED'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "optimization_goal": {"name": "optimization_goal", "description": "The optimization goal this ad set is using. Possible values defined [here](https://developers.facebook.com/docs/marketing-api/reference/ad-campaign/#fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/staging/stg_facebook_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450506.095288, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_set_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_facebook_ads__ad_set_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_facebook_ads__ad_set_history_tmp')),\n staging_columns=get_ad_set_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='facebook_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n updated_time as updated_at,\n cast(id as {{ dbt.type_bigint() }}) as ad_set_id,\n name as ad_set_name,\n cast(account_id as {{ dbt.type_bigint() }}) as account_id,\n cast(campaign_id as {{ dbt.type_bigint() }}) as campaign_id,\n start_time as start_at,\n end_time as end_at,\n bid_strategy,\n daily_budget,\n budget_remaining,\n status,\n optimization_goal,\n case when id is null and updated_time is null\n then row_number() over ({{ fivetran_utils.partition_by_source_relation(package_name='facebook_ads', has_other_partitions='no') }} order by source_relation)\n else row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='facebook_ads') }} order by updated_time desc) end = 1 as is_most_recent_record\n from fields\n\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__ad_set_history_tmp", "package": null, "version": null}, {"name": "stg_facebook_ads__ad_set_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.get_ad_set_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_bigint", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.facebook_ads.stg_facebook_ads__ad_set_history_tmp"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads__ad_set_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_set_history_tmp\"\n),\n\nfields as (\n\n select\n \n updated_time as updated_time,\n id as id,\n name as name,\n account_id as account_id,\n campaign_id as campaign_id,\n cast(null as timestamp) as start_time,\n cast(null as timestamp) as end_time,\n cast(null as TEXT) as bid_strategy,\n cast(null as integer) as daily_budget,\n cast(null as integer) as budget_remaining,\n cast(null as TEXT) as status,\n cast(null as TEXT) as optimization_goal\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n updated_time as updated_at,\n cast(id as bigint) as ad_set_id,\n name as ad_set_name,\n cast(account_id as bigint) as account_id,\n cast(campaign_id as bigint) as campaign_id,\n start_time as start_at,\n end_time as end_at,\n bid_strategy,\n daily_budget,\n budget_remaining,\n status,\n optimization_goal,\n case when id is null and updated_time is null\n then row_number() over ( order by source_relation)\n else row_number() over (partition by id order by updated_time desc) end = 1 as is_most_recent_record\n from fields\n\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__account_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__account_history", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/stg_facebook_ads__account_history.sql", "original_file_path": "models/staging/stg_facebook_ads__account_history.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__account_history", "fqn": ["facebook_ads", "staging", "stg_facebook_ads__account_history"], "alias": "stg_facebook_ads__account_history", "checksum": {"name": "sha256", "checksum": "936c72fe6b609d970df117e52fb81fa68eea6bb804d75a3f33a9ce6535d3f606"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table reflects a Facebook ad account.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The ID of the ad account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "Name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record. All records should have this value set to True given we filter on it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.is_most_recent_record"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._fivetran_synced"]}, "account_status": {"name": "account_status", "description": "Current status of account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "business_country_code": {"name": "business_country_code", "description": "Country code of business associated to account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The time account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Currency associated with account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone_name": {"name": "timezone_name", "description": "Timezone associated with account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone_offset_hours_utc": {"name": "timezone_offset_hours_utc", "description": "Time zone difference from UTC.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "business_state": {"name": "business_state", "description": "State abbreviation for business address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "min_daily_budget": {"name": "min_daily_budget", "description": "The minimum daily budget for this Ad Account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/staging/stg_facebook_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450506.0929086, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__account_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_facebook_ads__account_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_facebook_ads__account_history_tmp')),\n staging_columns=get_account_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='facebook_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as {{ dbt.type_bigint() }}) as account_id,\n _fivetran_synced,\n name as account_name,\n account_status,\n business_country_code,\n business_state,\n created_time as created_at,\n currency,\n timezone_name,\n timezone_offset_hours_utc,\n min_daily_budget,\n case when id is null and _fivetran_synced is null \n then row_number() over ({{ fivetran_utils.partition_by_source_relation(package_name='facebook_ads', has_other_partitions='no') }} order by source_relation)\n else row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='facebook_ads') }} order by _fivetran_synced desc) end = 1 as is_most_recent_record\n from fields\n\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__account_history_tmp", "package": null, "version": null}, {"name": "stg_facebook_ads__account_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.get_account_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_bigint", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.facebook_ads.stg_facebook_ads__account_history_tmp"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads__account_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__account_history_tmp\"\n),\n\nfields as (\n\n select\n \n id as id,\n _fivetran_synced as _fivetran_synced,\n name as name,\n cast(null as TEXT) as account_status,\n cast(null as TEXT) as business_country_code,\n cast(null as timestamp) as created_time,\n cast(null as TEXT) as currency,\n cast(null as TEXT) as timezone_name,\n cast(null as float) as timezone_offset_hours_utc,\n cast(null as TEXT) as business_state,\n cast(null as integer) as min_daily_budget\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as bigint) as account_id,\n _fivetran_synced,\n name as account_name,\n account_status,\n business_country_code,\n business_state,\n created_time as created_at,\n currency,\n timezone_name,\n timezone_offset_hours_utc,\n min_daily_budget,\n case when id is null and _fivetran_synced is null \n then row_number() over ( order by source_relation)\n else row_number() over (partition by id order by _fivetran_synced desc) end = 1 as is_most_recent_record\n from fields\n\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__creative_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__creative_history", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/stg_facebook_ads__creative_history.sql", "original_file_path": "models/staging/stg_facebook_ads__creative_history.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__creative_history", "fqn": ["facebook_ads", "staging", "stg_facebook_ads__creative_history"], "alias": "stg_facebook_ads__creative_history", "checksum": {"name": "sha256", "checksum": "05b1d4f44ebda09ce746772876fa1f67345bc78ef704709cbeca45b0ee8984db"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table reflects a Facebook creative.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "_fivetran_id": {"name": "_fivetran_id", "description": "Unique record identifier", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._fivetran_synced"]}, "creative_id": {"name": "creative_id", "description": "Unique ID for an ad creative.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "Ad account ID for the account this ad creative belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_name": {"name": "creative_name", "description": "Name of this ad creative as seen in the ad account's library.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_tags": {"name": "url_tags", "description": "A set of query string parameters which will replace or be appended to urls clicked from page post ads, message of the post, and canvas app install creatives only.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Indicates whether a record is the most recent version of that record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "page_link": {"name": "page_link", "description": "Link for the page.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "template_page_link": {"name": "template_page_link", "description": "URL destination of Facebook dynamic ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "asset_feed_spec_link_urls": {"name": "asset_feed_spec_link_urls", "description": "Link to the asset feed spec", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "object_story_link_data_child_attachments": {"name": "object_story_link_data_child_attachments", "description": "Link of the object story child attachments", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "object_story_link_data_caption": {"name": "object_story_link_data_caption", "description": "Link of the object story caption", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "object_story_link_data_description": {"name": "object_story_link_data_description", "description": "Link of the object story description", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "object_story_link_data_link": {"name": "object_story_link_data_link", "description": "Link of the object story link", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "object_story_link_data_message": {"name": "object_story_link_data_message", "description": "Link of the object story message", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "template_app_link_spec_ios": {"name": "template_app_link_spec_ios", "description": "Link of the object story spec for ios", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "template_app_link_spec_ipad": {"name": "template_app_link_spec_ipad", "description": "Link of the template app spec for ipad", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "template_app_link_spec_android": {"name": "template_app_link_spec_android", "description": "Link of the template app for android", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "template_app_link_spec_iphone": {"name": "template_app_link_spec_iphone", "description": "Link of the template app for iphone", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/staging/stg_facebook_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450506.0983121, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__creative_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_facebook_ads__creative_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_facebook_ads__creative_history_tmp')),\n staging_columns=get_creative_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='facebook_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n _fivetran_id,\n _fivetran_synced,\n cast(id as {{ dbt.type_bigint() }}) as creative_id,\n cast(account_id as {{ dbt.type_bigint() }}) as account_id,\n name as creative_name,\n page_link,\n template_page_link,\n url_tags,\n asset_feed_spec_link_urls,\n object_story_link_data_child_attachments,\n object_story_link_data_caption, \n object_story_link_data_description, \n object_story_link_data_link, \n object_story_link_data_message,\n template_app_link_spec_ios,\n template_app_link_spec_ipad,\n template_app_link_spec_android,\n template_app_link_spec_iphone,\n case when id is null and _fivetran_synced is null \n then row_number() over ({{ fivetran_utils.partition_by_source_relation(package_name='facebook_ads', has_other_partitions='no') }} order by source_relation)\n else row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='facebook_ads') }} order by _fivetran_synced desc) end = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__creative_history_tmp", "package": null, "version": null}, {"name": "stg_facebook_ads__creative_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.get_creative_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_bigint", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.facebook_ads.stg_facebook_ads__creative_history_tmp"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads__creative_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__creative_history_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_id as _fivetran_id,\n _fivetran_synced as _fivetran_synced,\n id as id,\n account_id as account_id,\n name as name,\n page_link as page_link,\n template_page_link as template_page_link,\n url_tags as url_tags,\n asset_feed_spec_link_urls as asset_feed_spec_link_urls,\n object_story_link_data_child_attachments as object_story_link_data_child_attachments,\n object_story_link_data_caption as object_story_link_data_caption,\n object_story_link_data_description as object_story_link_data_description,\n object_story_link_data_link as object_story_link_data_link,\n object_story_link_data_message as object_story_link_data_message,\n cast(null as TEXT) as template_app_link_spec_android,\n template_app_link_spec_ios as template_app_link_spec_ios,\n cast(null as TEXT) as template_app_link_spec_ipad,\n cast(null as TEXT) as template_app_link_spec_iphone\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n _fivetran_id,\n _fivetran_synced,\n cast(id as bigint) as creative_id,\n cast(account_id as bigint) as account_id,\n name as creative_name,\n page_link,\n template_page_link,\n url_tags,\n asset_feed_spec_link_urls,\n object_story_link_data_child_attachments,\n object_story_link_data_caption, \n object_story_link_data_description, \n object_story_link_data_link, \n object_story_link_data_message,\n template_app_link_spec_ios,\n template_app_link_spec_ipad,\n template_app_link_spec_android,\n template_app_link_spec_iphone,\n case when id is null and _fivetran_synced is null \n then row_number() over ( order by source_relation)\n else row_number() over (partition by id order by _fivetran_synced desc) end = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__basic_ad_actions": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__basic_ad_actions", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/stg_facebook_ads__basic_ad_actions.sql", "original_file_path": "models/staging/stg_facebook_ads__basic_ad_actions.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__basic_ad_actions", "fqn": ["facebook_ads", "staging", "stg_facebook_ads__basic_ad_actions"], "alias": "stg_facebook_ads__basic_ad_actions", "checksum": {"name": "sha256", "checksum": "9cc32f6a7277d26d6c60ce62ef9328ae1c23838de7b973ef45195e2660dab424"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily conversion performance of an ad in Facebook. This is the prebuilt `basic_ad` report broken down by `action_type`. Include more conversion value metrics by configuring the `facebook_ads__basic_ad_actions_passthrough_metrics` variable.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "action_type": {"name": "action_type", "description": "The kind of actions taken on your ad, Page, app or event after your ad was served to someone, even if they didn't click on it. Action types include Page likes, app installs, conversions, event responses and more. Actions prepended by app_custom_event come from mobile app events and actions prepended by offsite_conversion come from the Facebook Pixel.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_id": {"name": "ad_id", "description": "The ID of the ad the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_id": {"name": "_fivetran_id", "description": "Unique record identifier.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the reported performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "index": {"name": "index", "description": "Index reflecting the `action_type` tracked for this ad on this day. A primary key created by Fivetran utilized for tracking data, specifically when there are multiple rows associated with a single row in the parent table.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.index"]}, "conversions": {"name": "conversions", "description": "Conversion metric value using the default attribution window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/staging/stg_facebook_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450506.1002743, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad_actions\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_facebook_ads__basic_ad_actions_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_facebook_ads__basic_ad_actions_tmp')),\n staging_columns=get_basic_ad_actions_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='facebook_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n lower(action_type) as action_type,\n cast(ad_id as {{ dbt.type_bigint() }}) as ad_id,\n _fivetran_id,\n date as date_day,\n index,\n cast(coalesce(value, 0) as {{ dbt.type_float() }}) as conversions\n\n {{ facebook_ads_fill_pass_through_columns(var('facebook_ads__basic_ad_actions_passthrough_metrics')) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__basic_ad_actions_tmp", "package": null, "version": null}, {"name": "stg_facebook_ads__basic_ad_actions_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.get_basic_ad_actions_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_bigint", "macro.dbt.type_float", "macro.facebook_ads.facebook_ads_fill_pass_through_columns"], "nodes": ["model.facebook_ads.stg_facebook_ads__basic_ad_actions_tmp"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads__basic_ad_actions.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad_actions_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_id as _fivetran_id,\n _fivetran_synced as _fivetran_synced,\n action_type as action_type,\n ad_id as ad_id,\n date as date,\n index as index,\n value as value\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n lower(action_type) as action_type,\n cast(ad_id as bigint) as ad_id,\n _fivetran_id,\n date as date_day,\n index,\n cast(coalesce(value, 0) as float) as conversions\n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__demographics_country_actions": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_country_actions", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/stg_facebook_ads__demographics_country_actions.sql", "original_file_path": "models/staging/stg_facebook_ads__demographics_country_actions.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_country_actions", "fqn": ["facebook_ads", "staging", "stg_facebook_ads__demographics_country_actions"], "alias": "stg_facebook_ads__demographics_country_actions", "checksum": {"name": "sha256", "checksum": "a32a28a34b991e871c2d249caa10d0e74c0aabb88027eafdc59b1e0a924f1410"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents daily conversion performance by country. This is the prebuilt `demographics_country` report broken down by `action_type`.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "country_id": {"name": "country_id", "description": "Fivetran-generated unique ID of the country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.country_id"]}, "action_type": {"name": "action_type", "description": "The kind of actions taken on your ad, Page, app or event after your ad was served to someone, even if they didn't click on it. Action types include Page likes, app installs, conversions, event responses and more.\nActions prepended by `app_custom_event` come from mobile app events and actions prepended by `offsite_conversion` come from the Facebook Pixel.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.action_type"]}, "account_id": {"name": "account_id", "description": "The ID of the ad account that this ad belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.account_id"]}, "date_day": {"name": "date_day", "description": "The date of the reported performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.date"]}, "index": {"name": "index", "description": "Index reflecting the `action_type` tracked for this ad on this day. A primary key created by Fivetran utilized for tracking data, specifically when there are multiple rows associated with a single row in the parent table.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.index"]}, "conversions": {"name": "conversions", "description": "Conversion metric value using the default attribution window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.conversions"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/staging/stg_facebook_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450506.102932, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_country_actions\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True) and var('facebook_ads__using_demographics_country', False)) }}\n\n\nwith base as (\n\n select * \n from {{ ref('stg_facebook_ads__demographics_country_actions_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_facebook_ads__demographics_country_actions_tmp')),\n staging_columns=get_demographics_country_actions_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='facebook_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_id as country_id,\n lower(action_type) as action_type,\n cast(account_id as {{ dbt.type_bigint() }}) as account_id,\n date as date_day,\n index,\n cast(coalesce(value, 0) as {{ dbt.type_float() }}) as conversions\n\n {{ facebook_ads_fill_pass_through_columns(var('facebook_ads__demographics_country_actions_passthrough_metrics')) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": ["doc.facebook_ads.demographics_country_actions"], "language": "sql", "refs": [{"name": "stg_facebook_ads__demographics_country_actions_tmp", "package": null, "version": null}, {"name": "stg_facebook_ads__demographics_country_actions_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.get_demographics_country_actions_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_bigint", "macro.dbt.type_float", "macro.facebook_ads.facebook_ads_fill_pass_through_columns"], "nodes": ["model.facebook_ads.stg_facebook_ads__demographics_country_actions_tmp"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads__demographics_country_actions.sql", "compiled": true, "compiled_code": "\n\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_country_actions_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_id as _fivetran_id,\n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n action_type as action_type,\n date as date,\n index as index,\n value as value\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_id as country_id,\n lower(action_type) as action_type,\n cast(account_id as bigint) as account_id,\n date as date_day,\n index,\n cast(coalesce(value, 0) as float) as conversions\n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__demographics_country": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_country", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/stg_facebook_ads__demographics_country.sql", "original_file_path": "models/staging/stg_facebook_ads__demographics_country.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_country", "fqn": ["facebook_ads", "staging", "stg_facebook_ads__demographics_country"], "alias": "stg_facebook_ads__demographics_country", "checksum": {"name": "sha256", "checksum": "f1122fa466ae80aac897aa51a2cc4487a06f723dc3215e50d7ef106c505f4fbc"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Ads report segmented by country.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "country_id": {"name": "country_id", "description": "Fivetran-generated unique ID of the country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.country_id"]}, "country": {"name": "country", "description": "Country whose ad performance is being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.country"]}, "date_day": {"name": "date_day", "description": "The date of the reported performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.date"]}, "account_id": {"name": "account_id", "description": "The ID of the ad account that this ad belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.account_id"]}, "impressions": {"name": "impressions", "description": "The number of impressions the ads had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.impressions"]}, "clicks": {"name": "clicks", "description": "The number of clicks on links to select destinations or experiences, on or off Facebook-owned properties. Inline link clicks use a fixed 1-day-click attribution window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.inline_link_clicks"]}, "spend": {"name": "spend", "description": "Ad spend in a given day for the breakdown.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.spend"]}, "reach": {"name": "reach", "description": "The number of people who saw any content from your Page or about your Page. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.reach"]}, "frequency": {"name": "frequency", "description": "The average number of times each person saw your ads; it is calculated as impressions divided by reach.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.frequency"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/staging/stg_facebook_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450506.102108, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_country\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True) and var('facebook_ads__using_demographics_country', False)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_facebook_ads__demographics_country_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_facebook_ads__demographics_country_tmp')),\n staging_columns=get_demographics_country_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='facebook_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_id as country_id,\n country,\n date as date_day,\n cast(account_id as {{ dbt.type_bigint() }}) as account_id,\n impressions,\n coalesce(inline_link_clicks,0) as clicks,\n spend,\n reach,\n frequency\n\n {{ fivetran_utils.fill_pass_through_columns('facebook_ads__demographics_country_passthrough_metrics') }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": ["doc.facebook_ads.demographics_country"], "language": "sql", "refs": [{"name": "stg_facebook_ads__demographics_country_tmp", "package": null, "version": null}, {"name": "stg_facebook_ads__demographics_country_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.get_demographics_country_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_bigint", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.facebook_ads.stg_facebook_ads__demographics_country_tmp"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads__demographics_country.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_country_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_id as _fivetran_id,\n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n country as country,\n date as date,\n frequency as frequency,\n impressions as impressions,\n inline_link_clicks as inline_link_clicks,\n reach as reach,\n spend as spend\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_id as country_id,\n country,\n date as date_day,\n cast(account_id as bigint) as account_id,\n impressions,\n coalesce(inline_link_clicks,0) as clicks,\n spend,\n reach,\n frequency\n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__ad_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__ad_history", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/stg_facebook_ads__ad_history.sql", "original_file_path": "models/staging/stg_facebook_ads__ad_history.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__ad_history", "fqn": ["facebook_ads", "staging", "stg_facebook_ads__ad_history"], "alias": "stg_facebook_ads__ad_history", "checksum": {"name": "sha256", "checksum": "7b4781c1c06ac20de9b76bf5f9660372f7aee2af096a1ffdde33ff25bdd523e2"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table reflects a Facebook ad.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "ad_id": {"name": "ad_id", "description": "The ID of this ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the ad account that this ad belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_set_id": {"name": "ad_set_id", "description": "ID of the ad set that contains the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Ad campaign that contains this ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_id": {"name": "creative_id", "description": "The ID of the ad creative to be used by this ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_name": {"name": "ad_name", "description": "Name of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record. All records should have this value set to True given we filter on it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.is_most_recent_record"]}, "updated_at": {"name": "updated_at", "description": "The timestamp of the last update of a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.updated_time"]}, "conversion_domain": {"name": "conversion_domain", "description": "The domain you've configured the ad to convert to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/staging/stg_facebook_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450506.0939949, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_facebook_ads__ad_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_facebook_ads__ad_history_tmp')),\n staging_columns=get_ad_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='facebook_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n updated_time as updated_at,\n cast(id as {{ dbt.type_bigint() }}) as ad_id,\n name as ad_name,\n cast(account_id as {{ dbt.type_bigint() }}) as account_id,\n cast(ad_set_id as {{ dbt.type_bigint() }}) as ad_set_id, \n cast(campaign_id as {{ dbt.type_bigint() }}) as campaign_id,\n cast(creative_id as {{ dbt.type_bigint() }}) as creative_id,\n conversion_domain,\n case when id is null and updated_time is null \n then row_number() over ({{ fivetran_utils.partition_by_source_relation(package_name='facebook_ads', has_other_partitions='no') }} order by source_relation)\n else row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='facebook_ads') }} order by updated_time desc) end = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__ad_history_tmp", "package": null, "version": null}, {"name": "stg_facebook_ads__ad_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.get_ad_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_bigint", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.facebook_ads.stg_facebook_ads__ad_history_tmp"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads__ad_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_history_tmp\"\n),\n\nfields as (\n\n select\n \n updated_time as updated_time,\n id as id,\n name as name,\n account_id as account_id,\n ad_set_id as ad_set_id,\n campaign_id as campaign_id,\n creative_id as creative_id,\n cast(null as TEXT) as conversion_domain\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n updated_time as updated_at,\n cast(id as bigint) as ad_id,\n name as ad_name,\n cast(account_id as bigint) as account_id,\n cast(ad_set_id as bigint) as ad_set_id, \n cast(campaign_id as bigint) as campaign_id,\n cast(creative_id as bigint) as creative_id,\n conversion_domain,\n case when id is null and updated_time is null \n then row_number() over ( order by source_relation)\n else row_number() over (partition by id order by updated_time desc) end = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__ad_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__ad_history_tmp", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/tmp/stg_facebook_ads__ad_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_facebook_ads__ad_history_tmp.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__ad_history_tmp", "fqn": ["facebook_ads", "staging", "tmp", "stg_facebook_ads__ad_history_tmp"], "alias": "stg_facebook_ads__ad_history_tmp", "checksum": {"name": "sha256", "checksum": "69640d599f14b45980f0aab445077ded703a9c0a89ae6f5d5274c1133c3078fc"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.1836355, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\n{% if var('facebook_ads_union_schemas', []) | length > 0 or var('facebook_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_history', \n database_variable='facebook_ads_database', \n schema_variable='facebook_ads_schema', \n default_database=target.database,\n default_schema='facebook_ads',\n default_variable='ad_history',\n union_schema_variable='facebook_ads_union_schemas',\n union_database_variable='facebook_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='facebook_ads_sources',\n single_source_name='facebook_ads',\n single_table_name='ad_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["facebook_ads", "ad_history"], ["facebook_ads", "ad_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.facebook_ads.facebook_ads.ad_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/tmp/stg_facebook_ads__ad_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: facebook_ads_ad_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: facebook_ads_ad_history_data\n\n\n select\n \"id\",\n \"account_id\",\n \"ad_set_id\",\n \"campaign_id\",\n \"creative_id\",\n \"name\",\n \"_fivetran_synced\",\n \"updated_time\"\n from \"postgres\".\"public\".\"facebook_ads_ad_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__campaign_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__campaign_history_tmp", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/tmp/stg_facebook_ads__campaign_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_facebook_ads__campaign_history_tmp.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__campaign_history_tmp", "fqn": ["facebook_ads", "staging", "tmp", "stg_facebook_ads__campaign_history_tmp"], "alias": "stg_facebook_ads__campaign_history_tmp", "checksum": {"name": "sha256", "checksum": "93f4b670d7de16d0852812bbdc76f92951a444bb846e9600f969030f47d3d227"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.1948972, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__campaign_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\n{% if var('facebook_ads_union_schemas', []) | length > 0 or var('facebook_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_history', \n database_variable='facebook_ads_database', \n schema_variable='facebook_ads_schema', \n default_database=target.database,\n default_schema='facebook_ads',\n default_variable='campaign_history',\n union_schema_variable='facebook_ads_union_schemas',\n union_database_variable='facebook_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='facebook_ads_sources',\n single_source_name='facebook_ads',\n single_table_name='campaign_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["facebook_ads", "campaign_history"], ["facebook_ads", "campaign_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.facebook_ads.facebook_ads.campaign_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/tmp/stg_facebook_ads__campaign_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: facebook_ads_campaign_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: facebook_ads_campaign_history_data\n\n\n select\n \"id\",\n \"account_id\",\n \"name\",\n \"_fivetran_synced\",\n \"updated_time\"\n from \"postgres\".\"public\".\"facebook_ads_campaign_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__demographics_country_actions_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_country_actions_tmp", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/tmp/stg_facebook_ads__demographics_country_actions_tmp.sql", "original_file_path": "models/staging/tmp/stg_facebook_ads__demographics_country_actions_tmp.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_country_actions_tmp", "fqn": ["facebook_ads", "staging", "tmp", "stg_facebook_ads__demographics_country_actions_tmp"], "alias": "stg_facebook_ads__demographics_country_actions_tmp", "checksum": {"name": "sha256", "checksum": "8dfb0b1ce0fe86bfbbb485dc152bf9b0449e5c9a24eec0a75db043f0bf0373e3"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.205618, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_country_actions_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True) and var('facebook_ads__using_demographics_country', False)) }}\n\n{% if var('facebook_ads_union_schemas', []) | length > 0 or var('facebook_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='demographics_country_actions', \n database_variable='facebook_ads_database', \n schema_variable='facebook_ads_schema', \n default_database=target.database,\n default_schema='facebook_ads',\n default_variable='demographics_country_actions',\n union_schema_variable='facebook_ads_union_schemas',\n union_database_variable='facebook_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='facebook_ads_sources',\n single_source_name='facebook_ads',\n single_table_name='demographics_country_actions'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["facebook_ads", "demographics_country_actions"], ["facebook_ads", "demographics_country_actions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.facebook_ads.facebook_ads.demographics_country_actions"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/tmp/stg_facebook_ads__demographics_country_actions_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: facebook_ads_demographics_country_actions_identifier\n -- database: postgres \n -- schema: public\n -- identifier: facebook_ads_demographics_country_actions_data\n\n\n select\n \"_fivetran_id\",\n \"_fivetran_synced\",\n \"account_id\",\n \"action_type\",\n \"date\",\n \"index\",\n \"inline\",\n \"value\"\n from \"postgres\".\"public\".\"facebook_ads_demographics_country_actions_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__demographics_region_actions_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_region_actions_tmp", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/tmp/stg_facebook_ads__demographics_region_actions_tmp.sql", "original_file_path": "models/staging/tmp/stg_facebook_ads__demographics_region_actions_tmp.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_region_actions_tmp", "fqn": ["facebook_ads", "staging", "tmp", "stg_facebook_ads__demographics_region_actions_tmp"], "alias": "stg_facebook_ads__demographics_region_actions_tmp", "checksum": {"name": "sha256", "checksum": "994c905bf51c38640efe529fcc79faf062914943fe300f86191831d1757ae62e"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.2165904, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_region_actions_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True) and var('facebook_ads__using_demographics_region', False)) }}\n\n{% if var('facebook_ads_union_schemas', []) | length > 0 or var('facebook_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='demographics_region_actions', \n database_variable='facebook_ads_database', \n schema_variable='facebook_ads_schema', \n default_database=target.database,\n default_schema='facebook_ads',\n default_variable='demographics_region_actions',\n union_schema_variable='facebook_ads_union_schemas',\n union_database_variable='facebook_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='facebook_ads_sources',\n single_source_name='facebook_ads',\n single_table_name='demographics_region_actions'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["facebook_ads", "demographics_region_actions"], ["facebook_ads", "demographics_region_actions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.facebook_ads.facebook_ads.demographics_region_actions"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/tmp/stg_facebook_ads__demographics_region_actions_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: facebook_ads_demographics_region_actions_identifier\n -- database: postgres \n -- schema: public\n -- identifier: facebook_ads_demographics_region_actions_data\n\n\n select\n \"_fivetran_id\",\n \"_fivetran_synced\",\n \"account_id\",\n \"action_type\",\n \"date\",\n \"index\",\n \"value\"\n from \"postgres\".\"public\".\"facebook_ads_demographics_region_actions_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__basic_ad_actions_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__basic_ad_actions_tmp", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/tmp/stg_facebook_ads__basic_ad_actions_tmp.sql", "original_file_path": "models/staging/tmp/stg_facebook_ads__basic_ad_actions_tmp.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__basic_ad_actions_tmp", "fqn": ["facebook_ads", "staging", "tmp", "stg_facebook_ads__basic_ad_actions_tmp"], "alias": "stg_facebook_ads__basic_ad_actions_tmp", "checksum": {"name": "sha256", "checksum": "514f7a0a69d9cae69d9fa81d64c6105bd9b9c4b3775e595ba1a53fcf489b4866"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.229021, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad_actions_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\n{% if var('facebook_ads_union_schemas', []) | length > 0 or var('facebook_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='basic_ad_actions', \n database_variable='facebook_ads_database', \n schema_variable='facebook_ads_schema', \n default_database=target.database,\n default_schema='facebook_ads',\n default_variable='basic_ad_actions',\n union_schema_variable='facebook_ads_union_schemas',\n union_database_variable='facebook_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='facebook_ads_sources',\n single_source_name='facebook_ads',\n single_table_name='basic_ad_actions'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["facebook_ads", "basic_ad_actions"], ["facebook_ads", "basic_ad_actions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.facebook_ads.facebook_ads.basic_ad_actions"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/tmp/stg_facebook_ads__basic_ad_actions_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: facebook_ads_basic_ad_actions_identifier\n -- database: postgres \n -- schema: public\n -- identifier: facebook_ads_basic_ad_actions_data\n\n\n select\n \"_fivetran_id\",\n \"ad_id\",\n \"date\",\n \"index\",\n \"_1_d_view\",\n \"_7_d_click\",\n \"_fivetran_synced\",\n \"action_type\",\n \"inline\",\n \"value\"\n from \"postgres\".\"public\".\"facebook_ads_basic_ad_actions_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__basic_ad_action_values_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__basic_ad_action_values_tmp", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/tmp/stg_facebook_ads__basic_ad_action_values_tmp.sql", "original_file_path": "models/staging/tmp/stg_facebook_ads__basic_ad_action_values_tmp.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__basic_ad_action_values_tmp", "fqn": ["facebook_ads", "staging", "tmp", "stg_facebook_ads__basic_ad_action_values_tmp"], "alias": "stg_facebook_ads__basic_ad_action_values_tmp", "checksum": {"name": "sha256", "checksum": "1dff437225c41f2eddacd2cb6f83c2ea12e2884f343977919260333d2db745f8"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.2396052, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad_action_values_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\n{% if var('facebook_ads_union_schemas', []) | length > 0 or var('facebook_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='basic_ad_action_values', \n database_variable='facebook_ads_database', \n schema_variable='facebook_ads_schema', \n default_database=target.database,\n default_schema='facebook_ads',\n default_variable='basic_ad_action_values',\n union_schema_variable='facebook_ads_union_schemas',\n union_database_variable='facebook_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='facebook_ads_sources',\n single_source_name='facebook_ads',\n single_table_name='basic_ad_action_values'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["facebook_ads", "basic_ad_action_values"], ["facebook_ads", "basic_ad_action_values"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.facebook_ads.facebook_ads.basic_ad_action_values"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/tmp/stg_facebook_ads__basic_ad_action_values_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: facebook_ads_basic_ad_action_values_identifier\n -- database: postgres \n -- schema: public\n -- identifier: facebook_ads_basic_ad_action_values_data\n\n\n select\n \"ad_id\",\n \"date\",\n \"_fivetran_id\",\n \"index\",\n \"action_type\",\n \"value\",\n \"_fivetran_synced\",\n \"_7_d_click\"\n from \"postgres\".\"public\".\"facebook_ads_basic_ad_action_values_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__ad_set_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__ad_set_history_tmp", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/tmp/stg_facebook_ads__ad_set_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_facebook_ads__ad_set_history_tmp.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__ad_set_history_tmp", "fqn": ["facebook_ads", "staging", "tmp", "stg_facebook_ads__ad_set_history_tmp"], "alias": "stg_facebook_ads__ad_set_history_tmp", "checksum": {"name": "sha256", "checksum": "4ed7d93ef5f59c0db18901ddd8d77efa81fc4e8a4b1583cec148247b882a5dbe"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.2500818, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_set_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\n{% if var('facebook_ads_union_schemas', []) | length > 0 or var('facebook_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_set_history', \n database_variable='facebook_ads_database', \n schema_variable='facebook_ads_schema', \n default_database=target.database,\n default_schema='facebook_ads',\n default_variable='ad_set_history',\n union_schema_variable='facebook_ads_union_schemas',\n union_database_variable='facebook_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='facebook_ads_sources',\n single_source_name='facebook_ads',\n single_table_name='ad_set_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["facebook_ads", "ad_set_history"], ["facebook_ads", "ad_set_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.facebook_ads.facebook_ads.ad_set_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/tmp/stg_facebook_ads__ad_set_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: facebook_ads_ad_set_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: facebook_ads_ad_set_history_data\n\n\n select\n \"id\",\n \"account_id\",\n \"campaign_id\",\n \"name\",\n \"_fivetran_synced\",\n \"updated_time\"\n from \"postgres\".\"public\".\"facebook_ads_ad_set_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__demographics_region_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_region_tmp", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/tmp/stg_facebook_ads__demographics_region_tmp.sql", "original_file_path": "models/staging/tmp/stg_facebook_ads__demographics_region_tmp.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_region_tmp", "fqn": ["facebook_ads", "staging", "tmp", "stg_facebook_ads__demographics_region_tmp"], "alias": "stg_facebook_ads__demographics_region_tmp", "checksum": {"name": "sha256", "checksum": "4735bf5587e892abc9a7e1fabed2fd018811c4cbd5e20ee808e1892177ef0d2f"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.2617764, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_region_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True) and var('facebook_ads__using_demographics_region', False)) }}\n\n{% if var('facebook_ads_union_schemas', []) | length > 0 or var('facebook_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='demographics_region', \n database_variable='facebook_ads_database', \n schema_variable='facebook_ads_schema', \n default_database=target.database,\n default_schema='facebook_ads',\n default_variable='demographics_region',\n union_schema_variable='facebook_ads_union_schemas',\n union_database_variable='facebook_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='facebook_ads_sources',\n single_source_name='facebook_ads',\n single_table_name='demographics_region'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["facebook_ads", "demographics_region"], ["facebook_ads", "demographics_region"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.facebook_ads.facebook_ads.demographics_region"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/tmp/stg_facebook_ads__demographics_region_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: facebook_ads_demographics_region_identifier\n -- database: postgres \n -- schema: public\n -- identifier: facebook_ads_demographics_region_data\n\n\n select\n \"_fivetran_id\",\n \"_fivetran_synced\",\n \"account_id\",\n \"date\",\n \"frequency\",\n \"impressions\",\n \"inline_link_clicks\",\n \"reach\",\n \"region\",\n \"spend\"\n from \"postgres\".\"public\".\"facebook_ads_demographics_region_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__creative_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__creative_history_tmp", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/tmp/stg_facebook_ads__creative_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_facebook_ads__creative_history_tmp.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__creative_history_tmp", "fqn": ["facebook_ads", "staging", "tmp", "stg_facebook_ads__creative_history_tmp"], "alias": "stg_facebook_ads__creative_history_tmp", "checksum": {"name": "sha256", "checksum": "50f98f7303f7c5381a2bfae92d4b8dbf2eec68b77a6b4b2a1db0fa31bf21d20d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.2723715, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__creative_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\n{% if var('facebook_ads_union_schemas', []) | length > 0 or var('facebook_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='creative_history', \n database_variable='facebook_ads_database', \n schema_variable='facebook_ads_schema', \n default_database=target.database,\n default_schema='facebook_ads',\n default_variable='creative_history',\n union_schema_variable='facebook_ads_union_schemas',\n union_database_variable='facebook_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='facebook_ads_sources',\n single_source_name='facebook_ads',\n single_table_name='creative_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["facebook_ads", "creative_history"], ["facebook_ads", "creative_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.facebook_ads.facebook_ads.creative_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/tmp/stg_facebook_ads__creative_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: facebook_ads_creative_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: facebook_ads_creative_history_data\n\n\n select\n \"page_link\",\n \"template_page_link\",\n \"id\",\n \"account_id\",\n \"name\",\n \"url_tags\",\n \"_fivetran_synced\",\n \"asset_feed_spec_link_urls\",\n \"object_story_link_data_child_attachments\",\n \"object_story_link_data_caption\",\n \"object_story_link_data_description\",\n \"object_story_link_data_link\",\n \"object_story_link_data_message\",\n \"template_app_link_spec_ios\",\n \"_fivetran_id\"\n from \"postgres\".\"public\".\"facebook_ads_creative_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__basic_ad_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__basic_ad_tmp", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/tmp/stg_facebook_ads__basic_ad_tmp.sql", "original_file_path": "models/staging/tmp/stg_facebook_ads__basic_ad_tmp.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__basic_ad_tmp", "fqn": ["facebook_ads", "staging", "tmp", "stg_facebook_ads__basic_ad_tmp"], "alias": "stg_facebook_ads__basic_ad_tmp", "checksum": {"name": "sha256", "checksum": "94115712a5fc6cee54d504d75bb69b64fb1282cafa80759e6677361bae908644"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.2829716, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\n{% if var('facebook_ads_union_schemas', []) | length > 0 or var('facebook_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='basic_ad', \n database_variable='facebook_ads_database', \n schema_variable='facebook_ads_schema', \n default_database=target.database,\n default_schema='facebook_ads',\n default_variable='basic_ad',\n union_schema_variable='facebook_ads_union_schemas',\n union_database_variable='facebook_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='facebook_ads_sources',\n single_source_name='facebook_ads',\n single_table_name='basic_ad'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["facebook_ads", "basic_ad"], ["facebook_ads", "basic_ad"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.facebook_ads.facebook_ads.basic_ad"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/tmp/stg_facebook_ads__basic_ad_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: facebook_ads_basic_ad_identifier\n -- database: postgres \n -- schema: public\n -- identifier: facebook_ads_basic_ad_data\n\n\n select\n \"ad_id\",\n \"date\",\n \"account_id\",\n \"impressions\",\n \"inline_link_clicks\",\n \"spend\"\n from \"postgres\".\"public\".\"facebook_ads_basic_ad_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__account_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__account_history_tmp", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/tmp/stg_facebook_ads__account_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_facebook_ads__account_history_tmp.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__account_history_tmp", "fqn": ["facebook_ads", "staging", "tmp", "stg_facebook_ads__account_history_tmp"], "alias": "stg_facebook_ads__account_history_tmp", "checksum": {"name": "sha256", "checksum": "da6da5831a90053d0a41979c7ccf895e84dddd31a98990e43f01667f205219ee"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.2935653, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__account_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\n{% if var('facebook_ads_union_schemas', []) | length > 0 or var('facebook_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='account_history', \n database_variable='facebook_ads_database', \n schema_variable='facebook_ads_schema', \n default_database=target.database,\n default_schema='facebook_ads',\n default_variable='account_history',\n union_schema_variable='facebook_ads_union_schemas',\n union_database_variable='facebook_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='facebook_ads_sources',\n single_source_name='facebook_ads',\n single_table_name='account_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["facebook_ads", "account_history"], ["facebook_ads", "account_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.facebook_ads.facebook_ads.account_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/tmp/stg_facebook_ads__account_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: facebook_ads_account_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: facebook_ads_account_history_data\n\n\n select\n \"id\",\n \"name\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"facebook_ads_account_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__demographics_country_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_country_tmp", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/tmp/stg_facebook_ads__demographics_country_tmp.sql", "original_file_path": "models/staging/tmp/stg_facebook_ads__demographics_country_tmp.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_country_tmp", "fqn": ["facebook_ads", "staging", "tmp", "stg_facebook_ads__demographics_country_tmp"], "alias": "stg_facebook_ads__demographics_country_tmp", "checksum": {"name": "sha256", "checksum": "d3ae294701936a8efcc7d31324439af136dc33fca0f4e87cf27301f13f863587"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.305388, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_country_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True) and var('facebook_ads__using_demographics_country', False)) }}\n\n{% if var('facebook_ads_union_schemas', []) | length > 0 or var('facebook_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='demographics_country', \n database_variable='facebook_ads_database', \n schema_variable='facebook_ads_schema', \n default_database=target.database,\n default_schema='facebook_ads',\n default_variable='demographics_country',\n union_schema_variable='facebook_ads_union_schemas',\n union_database_variable='facebook_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='facebook_ads_sources',\n single_source_name='facebook_ads',\n single_table_name='demographics_country'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["facebook_ads", "demographics_country"], ["facebook_ads", "demographics_country"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.facebook_ads.facebook_ads.demographics_country"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/tmp/stg_facebook_ads__demographics_country_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: facebook_ads_demographics_country_identifier\n -- database: postgres \n -- schema: public\n -- identifier: facebook_ads_demographics_country_data\n\n\n select\n \"_fivetran_id\",\n \"_fivetran_synced\",\n \"account_id\",\n \"country\",\n \"date\",\n \"frequency\",\n \"impressions\",\n \"inline_link_clicks\",\n \"reach\",\n \"spend\"\n from \"postgres\".\"public\".\"facebook_ads_demographics_country_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.int_facebook_ads__creative_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "int_facebook_ads__creative_history", "resource_type": "model", "package_name": "facebook_ads", "path": "intermediate/int_facebook_ads__creative_history.sql", "original_file_path": "models/intermediate/int_facebook_ads__creative_history.sql", "unique_id": "model.facebook_ads.int_facebook_ads__creative_history", "fqn": ["facebook_ads", "intermediate", "int_facebook_ads__creative_history"], "alias": "int_facebook_ads__creative_history", "checksum": {"name": "sha256", "checksum": "15eac1da0274e1755906e0ea1571247593eaa71e9d42bb376695fe152d30e38d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.3161302, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"int_facebook_ads__creative_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\n{% set url_field = \"coalesce(page_link,template_page_link)\" %}\n\nwith base as (\n\n select *\n from {{ ref('stg_facebook_ads__creative_history') }}\n where is_most_recent_record = true\n\n), \n\nurl_tags as (\n\n select *\n from {{ ref('facebook_ads__url_tags') }}\n), \n\nurl_tags_pivoted as (\n\n select \n source_relation,\n _fivetran_id,\n creative_id,\n min(case when key = 'utm_source' then value end) as utm_source,\n min(case when key = 'utm_medium' then value end) as utm_medium,\n min(case when key = 'utm_campaign' then value end) as utm_campaign,\n min(case when key = 'utm_content' then value end) as utm_content,\n min(case when key = 'utm_term' then value end) as utm_term\n from url_tags\n group by 1,2,3\n\n), \n\nfields as (\n\n select\n base.source_relation,\n base._fivetran_id,\n base.creative_id,\n base.account_id,\n base.creative_name,\n {{ url_field }} as url,\n {{ dbt.split_part(url_field, \"'?'\", 1) }} as base_url,\n {{ dbt_utils.get_url_host(url_field) }} as url_host,\n '/' || {{ dbt_utils.get_url_path(url_field) }} as url_path,\n coalesce(url_tags_pivoted.utm_source, {{ facebook_ads.facebook_ads_extract_url_parameter(url_field, 'utm_source') }}) as utm_source,\n coalesce(url_tags_pivoted.utm_medium, {{ facebook_ads.facebook_ads_extract_url_parameter(url_field, 'utm_medium') }}) as utm_medium,\n coalesce(url_tags_pivoted.utm_campaign, {{ facebook_ads.facebook_ads_extract_url_parameter(url_field, 'utm_campaign') }}) as utm_campaign,\n coalesce(url_tags_pivoted.utm_content, {{ facebook_ads.facebook_ads_extract_url_parameter(url_field, 'utm_content') }}) as utm_content,\n coalesce(url_tags_pivoted.utm_term, {{ facebook_ads.facebook_ads_extract_url_parameter(url_field, 'utm_term') }}) as utm_term\n from base\n left join url_tags_pivoted\n on base._fivetran_id = url_tags_pivoted._fivetran_id\n and base.source_relation = url_tags_pivoted.source_relation\n and base.creative_id = url_tags_pivoted.creative_id\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__creative_history", "package": null, "version": null}, {"name": "facebook_ads__url_tags", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.split_part", "macro.dbt_utils.get_url_host", "macro.dbt_utils.get_url_path", "macro.facebook_ads.facebook_ads_extract_url_parameter"], "nodes": ["model.facebook_ads.stg_facebook_ads__creative_history", "model.facebook_ads.facebook_ads__url_tags"]}, "compiled_path": "target/compiled/facebook_ads/models/intermediate/int_facebook_ads__creative_history.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__creative_history\"\n where is_most_recent_record = true\n\n), \n\nurl_tags as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__url_tags\"\n), \n\nurl_tags_pivoted as (\n\n select \n source_relation,\n _fivetran_id,\n creative_id,\n min(case when key = 'utm_source' then value end) as utm_source,\n min(case when key = 'utm_medium' then value end) as utm_medium,\n min(case when key = 'utm_campaign' then value end) as utm_campaign,\n min(case when key = 'utm_content' then value end) as utm_content,\n min(case when key = 'utm_term' then value end) as utm_term\n from url_tags\n group by 1,2,3\n\n), \n\nfields as (\n\n select\n base.source_relation,\n base._fivetran_id,\n base.creative_id,\n base.account_id,\n base.creative_name,\n coalesce(page_link,template_page_link) as url,\n \n\n \n \n\n split_part(\n coalesce(page_link,template_page_link),\n '?',\n 1\n )\n\n\n \n\n as base_url,\n \n \n cast(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n \n\n replace(\n \n\n replace(\n \n\n replace(\n coalesce(page_link,template_page_link),\n 'android-app://',\n ''\n )\n\n\n,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n '/',\n 1\n )\n\n\n \n\n,\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_host,\n '/' || \n \n cast(\n\n \n \n\n split_part(\n \n\n right(\n \n\n replace(\n \n\n replace(\n coalesce(page_link,template_page_link),\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n \n\n length(\n \n\n replace(\n \n\n replace(\n coalesce(page_link,template_page_link),\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n )-coalesce(\n nullif(\n\n position(\n '/' in \n\n replace(\n \n\n replace(\n coalesce(page_link,template_page_link),\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ), 0),\n \n\n position(\n '?' in \n\n replace(\n \n\n replace(\n coalesce(page_link,template_page_link),\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ) - 1\n )\n ),\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_path,\n coalesce(url_tags_pivoted.utm_source, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n coalesce(page_link,template_page_link),\n 'utm_source=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_source,\n coalesce(url_tags_pivoted.utm_medium, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n coalesce(page_link,template_page_link),\n 'utm_medium=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_medium,\n coalesce(url_tags_pivoted.utm_campaign, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n coalesce(page_link,template_page_link),\n 'utm_campaign=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_campaign,\n coalesce(url_tags_pivoted.utm_content, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n coalesce(page_link,template_page_link),\n 'utm_content=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_content,\n coalesce(url_tags_pivoted.utm_term, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n coalesce(page_link,template_page_link),\n 'utm_term=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_term\n from base\n left join url_tags_pivoted\n on base._fivetran_id = url_tags_pivoted._fivetran_id\n and base.source_relation = url_tags_pivoted.source_relation\n and base.creative_id = url_tags_pivoted.creative_id\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.int_facebook_ads__conversions": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "int_facebook_ads__conversions", "resource_type": "model", "package_name": "facebook_ads", "path": "intermediate/int_facebook_ads__conversions.sql", "original_file_path": "models/intermediate/int_facebook_ads__conversions.sql", "unique_id": "model.facebook_ads.int_facebook_ads__conversions", "fqn": ["facebook_ads", "intermediate", "int_facebook_ads__conversions"], "alias": "int_facebook_ads__conversions", "checksum": {"name": "sha256", "checksum": "3b28dc1b86305818d7e44672dc80b693b1269a333c0c022b78ceedda739771cc"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783450503.3398154, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"int_facebook_ads__conversions\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith actions_report as (\n\n select *\n from {{ ref('stg_facebook_ads__basic_ad_actions') }}\n),\n\naction_values_report as (\n\n select *\n from {{ ref('stg_facebook_ads__basic_ad_action_values') }}\n),\n\naction_metrics as (\n\n select\n source_relation,\n ad_id,\n date_day,\n sum(conversions) as conversions\n\n {% for action_type in var('facebook_ads__conversion_action_types') %}\n ,sum(case when \n {% if action_type.name %}\n action_type = '{{ action_type.name }}'\n {% elif action_type.pattern %}\n action_type like '{{ action_type.pattern }}'\n {% endif %}\n\n {% if action_type.where_sql %}\n and {{ action_type.where_sql }}\n {% endif %}\n then conversions else 0 end) \n as {{ facebook_action_slug(action_type) }}_conversions\n {% endfor %}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_actions_passthrough_metrics', transform='sum') }}\n\n from actions_report\n {% if var('facebook_ads__conversion_action_types') -%}\n where \n {# Limit conversions to the chosen action types #}\n {% for action_type in var('facebook_ads__conversion_action_types') -%}\n (\n {%- if action_type.name -%}\n action_type = '{{ action_type.name }}'\n {%- elif action_type.pattern -%}\n action_type like '{{ action_type.pattern }}'\n {%- endif -%}\n\n {% if action_type.where_sql %}\n and {{ action_type.where_sql }}\n {%- endif -%}\n ) {% if not loop.last %} or {% endif %}\n {%- endfor %}\n {% endif %}\n group by 1,2,3\n),\n\naction_value_metrics as (\n\n select\n source_relation,\n ad_id,\n date_day,\n sum(conversions_value) as conversions_value\n\n {% for action_type in var('facebook_ads__conversion_action_types') %}\n ,sum(case when \n {% if action_type.name %}\n action_type = '{{ action_type.name }}'\n {% elif action_type.pattern %}\n action_type like '{{ action_type.pattern }}'\n {% endif %}\n\n {% if action_type.where_sql %}\n and {{ action_type.where_sql }}\n {% endif %}\n then conversions_value else 0 end) \n as {{ facebook_action_slug(action_type) }}_conversions_value\n {% endfor %}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_action_values_passthrough_metrics', transform='sum') }}\n\n from action_values_report\n {% if var('facebook_ads__conversion_action_types') -%}\n where \n {# Limit conversions to the chosen action types #}\n {% for action_type in var('facebook_ads__conversion_action_types') -%}\n (\n {%- if action_type.name -%}\n action_type = '{{ action_type.name }}'\n {%- elif action_type.pattern -%}\n action_type like '{{ action_type.pattern }}'\n {%- endif -%}\n\n {% if action_type.where_sql %}\n and {{ action_type.where_sql }}\n {%- endif -%}\n ) {% if not loop.last %} or {% endif %}\n {%- endfor %}\n {% endif %}\n\n group by 1,2,3\n),\n\nmetrics_join as (\n\n select\n action_metrics.source_relation,\n action_metrics.ad_id,\n action_metrics.date_day,\n action_metrics.conversions,\n action_value_metrics.conversions_value\n \n {% for action_type in var('facebook_ads__conversion_action_types') %}\n ,{{ facebook_action_slug(action_type) }}_conversions\n ,{{ facebook_action_slug(action_type) }}_conversions_value\n {% endfor %}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_actions_passthrough_metrics', identifier='action_metrics') }}\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_action_values_passthrough_metrics', identifier='action_value_metrics') }}\n\n from action_metrics \n left join action_value_metrics\n on action_metrics.source_relation = action_value_metrics.source_relation\n and action_metrics.ad_id = action_value_metrics.ad_id\n and action_metrics.date_day = action_value_metrics.date_day\n)\n\nselect * \nfrom metrics_join", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__basic_ad_actions", "package": null, "version": null}, {"name": "stg_facebook_ads__basic_ad_action_values", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.facebook_action_slug", "macro.fivetran_utils.persist_pass_through_columns"], "nodes": ["model.facebook_ads.stg_facebook_ads__basic_ad_actions", "model.facebook_ads.stg_facebook_ads__basic_ad_action_values"]}, "compiled_path": "target/compiled/facebook_ads/models/intermediate/int_facebook_ads__conversions.sql", "compiled": true, "compiled_code": "\n\nwith actions_report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad_actions\"\n),\n\naction_values_report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad_action_values\"\n),\n\naction_metrics as (\n\n select\n source_relation,\n ad_id,\n date_day,\n sum(conversions) as conversions\n\n \n ,sum(case when \n \n action_type = 'onsite_conversion.purchase'\n \n\n \n then conversions else 0 end) \n as onsite_conversion_purchase_conversions\n \n ,sum(case when \n \n action_type = 'onsite_conversion.lead_grouped'\n \n\n \n then conversions else 0 end) \n as onsite_conversion_lead_grouped_conversions\n \n ,sum(case when \n \n action_type = 'offsite_conversion.fb_pixel_purchase'\n \n\n \n then conversions else 0 end) \n as offsite_conversion_fb_pixel_purchase_conversions\n \n ,sum(case when \n \n action_type = 'offsite_conversion.fb_pixel_lead'\n \n\n \n then conversions else 0 end) \n as offsite_conversion_fb_pixel_lead_conversions\n \n ,sum(case when \n \n action_type = 'offsite_conversion.fb_pixel_custom'\n \n\n \n then conversions else 0 end) \n as offsite_conversion_fb_pixel_custom_conversions\n \n\n \n\n\n\n\n\n from actions_report\n where \n \n (action_type = 'onsite_conversion.purchase') or (action_type = 'onsite_conversion.lead_grouped') or (action_type = 'offsite_conversion.fb_pixel_purchase') or (action_type = 'offsite_conversion.fb_pixel_lead') or (action_type = 'offsite_conversion.fb_pixel_custom') \n \n group by 1,2,3\n),\n\naction_value_metrics as (\n\n select\n source_relation,\n ad_id,\n date_day,\n sum(conversions_value) as conversions_value\n\n \n ,sum(case when \n \n action_type = 'onsite_conversion.purchase'\n \n\n \n then conversions_value else 0 end) \n as onsite_conversion_purchase_conversions_value\n \n ,sum(case when \n \n action_type = 'onsite_conversion.lead_grouped'\n \n\n \n then conversions_value else 0 end) \n as onsite_conversion_lead_grouped_conversions_value\n \n ,sum(case when \n \n action_type = 'offsite_conversion.fb_pixel_purchase'\n \n\n \n then conversions_value else 0 end) \n as offsite_conversion_fb_pixel_purchase_conversions_value\n \n ,sum(case when \n \n action_type = 'offsite_conversion.fb_pixel_lead'\n \n\n \n then conversions_value else 0 end) \n as offsite_conversion_fb_pixel_lead_conversions_value\n \n ,sum(case when \n \n action_type = 'offsite_conversion.fb_pixel_custom'\n \n\n \n then conversions_value else 0 end) \n as offsite_conversion_fb_pixel_custom_conversions_value\n \n\n \n\n\n\n\n\n from action_values_report\n where \n \n (action_type = 'onsite_conversion.purchase') or (action_type = 'onsite_conversion.lead_grouped') or (action_type = 'offsite_conversion.fb_pixel_purchase') or (action_type = 'offsite_conversion.fb_pixel_lead') or (action_type = 'offsite_conversion.fb_pixel_custom') \n \n\n group by 1,2,3\n),\n\nmetrics_join as (\n\n select\n action_metrics.source_relation,\n action_metrics.ad_id,\n action_metrics.date_day,\n action_metrics.conversions,\n action_value_metrics.conversions_value\n \n \n ,onsite_conversion_purchase_conversions\n ,onsite_conversion_purchase_conversions_value\n \n ,onsite_conversion_lead_grouped_conversions\n ,onsite_conversion_lead_grouped_conversions_value\n \n ,offsite_conversion_fb_pixel_purchase_conversions\n ,offsite_conversion_fb_pixel_purchase_conversions_value\n \n ,offsite_conversion_fb_pixel_lead_conversions\n ,offsite_conversion_fb_pixel_lead_conversions_value\n \n ,offsite_conversion_fb_pixel_custom_conversions\n ,offsite_conversion_fb_pixel_custom_conversions_value\n \n\n \n\n\n\n\n \n\n\n\n\n\n from action_metrics \n left join action_value_metrics\n on action_metrics.source_relation = action_value_metrics.source_relation\n and action_metrics.ad_id = action_value_metrics.ad_id\n and action_metrics.date_day = action_value_metrics.date_day\n)\n\nselect * \nfrom metrics_join", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "test.linkedin.not_null_linkedin_ads__account_report_account_id.0c34ea1842": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__account_report_account_id", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__account_report_account_id.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__account_report_account_id.0c34ea1842", "fqn": ["linkedin", "not_null_linkedin_ads__account_report_account_id"], "alias": "not_null_linkedin_ads__account_report_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.5700386, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__account_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__account_report_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__account_report\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.linkedin_ads__account_report", "attached_node": "model.linkedin.linkedin_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('linkedin_ads__account_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_linkedin_ads__account_report_date_day.c4b33f8f53": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__account_report_date_day", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__account_report_date_day.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__account_report_date_day.c4b33f8f53", "fqn": ["linkedin", "not_null_linkedin_ads__account_report_date_day"], "alias": "not_null_linkedin_ads__account_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.5729682, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__account_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__account_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__account_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.linkedin_ads__account_report", "attached_node": "model.linkedin.linkedin_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('linkedin_ads__account_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_linkedin_ads__campaign_report_date_day.8d320b88b1": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__campaign_report_date_day", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__campaign_report_date_day.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__campaign_report_date_day.8d320b88b1", "fqn": ["linkedin", "not_null_linkedin_ads__campaign_report_date_day"], "alias": "not_null_linkedin_ads__campaign_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.575469, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__campaign_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__campaign_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__campaign_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.linkedin_ads__campaign_report", "attached_node": "model.linkedin.linkedin_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('linkedin_ads__campaign_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_linkedin_ads__campaign_report_campaign_id.bf43964b15": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__campaign_report_campaign_id.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__campaign_report_campaign_id.bf43964b15", "fqn": ["linkedin", "not_null_linkedin_ads__campaign_report_campaign_id"], "alias": "not_null_linkedin_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.5780826, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__campaign_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.linkedin_ads__campaign_report", "attached_node": "model.linkedin.linkedin_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('linkedin_ads__campaign_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_linkedin_ads__campaign_group_report_date_day.2676a1f76b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__campaign_group_report_date_day", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__campaign_group_report_date_day.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__campaign_group_report_date_day.2676a1f76b", "fqn": ["linkedin", "not_null_linkedin_ads__campaign_group_report_date_day"], "alias": "not_null_linkedin_ads__campaign_group_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.5805984, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__campaign_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__campaign_group_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__campaign_group_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__campaign_group_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.linkedin_ads__campaign_group_report", "attached_node": "model.linkedin.linkedin_ads__campaign_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('linkedin_ads__campaign_group_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_linkedin_ads__campaign_group_report_campaign_group_id.39b448cdaf": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__campaign_group_report_campaign_group_id", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__campaign_group_report_campaign_group_id.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__campaign_group_report_campaign_group_id.39b448cdaf", "fqn": ["linkedin", "not_null_linkedin_ads__campaign_group_report_campaign_group_id"], "alias": "not_null_linkedin_ads__campaign_group_report_campaign_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.5830107, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__campaign_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__campaign_group_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__campaign_group_report_campaign_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__campaign_group_report\"\nwhere campaign_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_group_id", "file_key_name": "models.linkedin_ads__campaign_group_report", "attached_node": "model.linkedin.linkedin_ads__campaign_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_group_id", "model": "{{ get_where_subquery(ref('linkedin_ads__campaign_group_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_linkedin_ads__creative_report_date_day.0c6338b020": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__creative_report_date_day", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__creative_report_date_day.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__creative_report_date_day.0c6338b020", "fqn": ["linkedin", "not_null_linkedin_ads__creative_report_date_day"], "alias": "not_null_linkedin_ads__creative_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.5854647, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__creative_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__creative_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__creative_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__creative_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.linkedin_ads__creative_report", "attached_node": "model.linkedin.linkedin_ads__creative_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('linkedin_ads__creative_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_linkedin_ads__creative_report_creative_id.096d93f889": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__creative_report_creative_id", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__creative_report_creative_id.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__creative_report_creative_id.096d93f889", "fqn": ["linkedin", "not_null_linkedin_ads__creative_report_creative_id"], "alias": "not_null_linkedin_ads__creative_report_creative_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.5880344, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__creative_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__creative_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__creative_report_creative_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect creative_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__creative_report\"\nwhere creative_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "creative_id", "file_key_name": "models.linkedin_ads__creative_report", "attached_node": "model.linkedin.linkedin_ads__creative_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "creative_id", "model": "{{ get_where_subquery(ref('linkedin_ads__creative_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_linkedin_ads__url_report_date_day.48b540f315": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__url_report_date_day", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__url_report_date_day.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__url_report_date_day.48b540f315", "fqn": ["linkedin", "not_null_linkedin_ads__url_report_date_day"], "alias": "not_null_linkedin_ads__url_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.5905063, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__url_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__url_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__url_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.linkedin_ads__url_report", "attached_node": "model.linkedin.linkedin_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('linkedin_ads__url_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_linkedin_ads__url_report_creative_id.83967fe9d2": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__url_report_creative_id", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__url_report_creative_id.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__url_report_creative_id.83967fe9d2", "fqn": ["linkedin", "not_null_linkedin_ads__url_report_creative_id"], "alias": "not_null_linkedin_ads__url_report_creative_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.5929039, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__url_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__url_report_creative_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect creative_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__url_report\"\nwhere creative_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "creative_id", "file_key_name": "models.linkedin_ads__url_report", "attached_node": "model.linkedin.linkedin_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "creative_id", "model": "{{ get_where_subquery(ref('linkedin_ads__url_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_linkedin_ads__url_report_click_uri.81534087cb": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__url_report_click_uri", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__url_report_click_uri.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__url_report_click_uri.81534087cb", "fqn": ["linkedin", "not_null_linkedin_ads__url_report_click_uri"], "alias": "not_null_linkedin_ads__url_report_click_uri", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"enabled": true}, "created_at": 1783450503.5962424, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(enabled=True) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__url_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__url_report_click_uri.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect click_uri\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__url_report\"\nwhere click_uri is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "click_uri", "file_key_name": "models.linkedin_ads__url_report", "attached_node": "model.linkedin.linkedin_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "click_uri", "model": "{{ get_where_subquery(ref('linkedin_ads__url_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_linkedin_ads__monthly_campaign_country_report_date_month.ab0a8d3050": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__monthly_campaign_country_report_date_month", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__monthly_e69e063829cf5fc29a5efbeea1ded0b2.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__monthly_campaign_country_report_date_month.ab0a8d3050", "fqn": ["linkedin", "not_null_linkedin_ads__monthly_campaign_country_report_date_month"], "alias": "not_null_linkedin_ads__monthly_e69e063829cf5fc29a5efbeea1ded0b2", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_linkedin_ads__monthly_e69e063829cf5fc29a5efbeea1ded0b2", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_linkedin_ads__monthly_e69e063829cf5fc29a5efbeea1ded0b2"}, "created_at": 1783450503.5987422, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_linkedin_ads__monthly_e69e063829cf5fc29a5efbeea1ded0b2\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__monthly_campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__monthly_campaign_country_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__monthly_e69e063829cf5fc29a5efbeea1ded0b2.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_month\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__monthly_campaign_country_report\"\nwhere date_month is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_month", "file_key_name": "models.linkedin_ads__monthly_campaign_country_report", "attached_node": "model.linkedin.linkedin_ads__monthly_campaign_country_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_month", "model": "{{ get_where_subquery(ref('linkedin_ads__monthly_campaign_country_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_linkedin_ads__monthly_campaign_country_report_campaign_id.4624641c1c": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__monthly_campaign_country_report_campaign_id", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__monthly_0837b859b384a25b2df1c63ff671b24d.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__monthly_campaign_country_report_campaign_id.4624641c1c", "fqn": ["linkedin", "not_null_linkedin_ads__monthly_campaign_country_report_campaign_id"], "alias": "not_null_linkedin_ads__monthly_0837b859b384a25b2df1c63ff671b24d", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_linkedin_ads__monthly_0837b859b384a25b2df1c63ff671b24d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_linkedin_ads__monthly_0837b859b384a25b2df1c63ff671b24d"}, "created_at": 1783450503.60131, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_linkedin_ads__monthly_0837b859b384a25b2df1c63ff671b24d\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__monthly_campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__monthly_campaign_country_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__monthly_0837b859b384a25b2df1c63ff671b24d.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__monthly_campaign_country_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.linkedin_ads__monthly_campaign_country_report", "attached_node": "model.linkedin.linkedin_ads__monthly_campaign_country_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('linkedin_ads__monthly_campaign_country_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_linkedin_ads__monthly_campaign_region_report_date_month.4fd809085e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__monthly_campaign_region_report_date_month", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__monthly_52b93cb419209deea0ecea8aeddd6fe8.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__monthly_campaign_region_report_date_month.4fd809085e", "fqn": ["linkedin", "not_null_linkedin_ads__monthly_campaign_region_report_date_month"], "alias": "not_null_linkedin_ads__monthly_52b93cb419209deea0ecea8aeddd6fe8", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_linkedin_ads__monthly_52b93cb419209deea0ecea8aeddd6fe8", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_linkedin_ads__monthly_52b93cb419209deea0ecea8aeddd6fe8"}, "created_at": 1783450503.6037657, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_linkedin_ads__monthly_52b93cb419209deea0ecea8aeddd6fe8\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__monthly_campaign_region_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__monthly_campaign_region_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__monthly_52b93cb419209deea0ecea8aeddd6fe8.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_month\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__monthly_campaign_region_report\"\nwhere date_month is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_month", "file_key_name": "models.linkedin_ads__monthly_campaign_region_report", "attached_node": "model.linkedin.linkedin_ads__monthly_campaign_region_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_month", "model": "{{ get_where_subquery(ref('linkedin_ads__monthly_campaign_region_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_linkedin_ads__monthly_campaign_region_report_campaign_id.5884bc5d68": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__monthly_campaign_region_report_campaign_id", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__monthly_d8d2fb9356c0edb46ee9b89812dc2020.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__monthly_campaign_region_report_campaign_id.5884bc5d68", "fqn": ["linkedin", "not_null_linkedin_ads__monthly_campaign_region_report_campaign_id"], "alias": "not_null_linkedin_ads__monthly_d8d2fb9356c0edb46ee9b89812dc2020", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_linkedin_ads__monthly_d8d2fb9356c0edb46ee9b89812dc2020", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_linkedin_ads__monthly_d8d2fb9356c0edb46ee9b89812dc2020"}, "created_at": 1783450503.6061482, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_linkedin_ads__monthly_d8d2fb9356c0edb46ee9b89812dc2020\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__monthly_campaign_region_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__monthly_campaign_region_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__monthly_d8d2fb9356c0edb46ee9b89812dc2020.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__monthly_campaign_region_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.linkedin_ads__monthly_campaign_region_report", "attached_node": "model.linkedin.linkedin_ads__monthly_campaign_region_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('linkedin_ads__monthly_campaign_region_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_creative_creative_id.062abfe14b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_linkedin_ads__ad_analytics_by_creative_creative_id", "resource_type": "test", "package_name": "linkedin", "path": "not_null_stg_linkedin_ads__ad_analytics_by_creative_creative_id.sql", "original_file_path": "models/staging/stg_linkedin.yml", "unique_id": "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_creative_creative_id.062abfe14b", "fqn": ["linkedin", "staging", "not_null_stg_linkedin_ads__ad_analytics_by_creative_creative_id"], "alias": "not_null_stg_linkedin_ads__ad_analytics_by_creative_creative_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.621137, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__ad_analytics_by_creative", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_creative"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin.yml/not_null_stg_linkedin_ads__ad_analytics_by_creative_creative_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect creative_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_creative\"\nwhere creative_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "creative_id", "file_key_name": "models.stg_linkedin_ads__ad_analytics_by_creative", "attached_node": "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "creative_id", "model": "{{ get_where_subquery(ref('stg_linkedin_ads__ad_analytics_by_creative')) }}"}, "namespace": null}}, "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_creative_date_day.cb81bc4766": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_linkedin_ads__ad_analytics_by_creative_date_day", "resource_type": "test", "package_name": "linkedin", "path": "not_null_stg_linkedin_ads__ad_analytics_by_creative_date_day.sql", "original_file_path": "models/staging/stg_linkedin.yml", "unique_id": "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_creative_date_day.cb81bc4766", "fqn": ["linkedin", "staging", "not_null_stg_linkedin_ads__ad_analytics_by_creative_date_day"], "alias": "not_null_stg_linkedin_ads__ad_analytics_by_creative_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.6237838, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__ad_analytics_by_creative", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_creative"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin.yml/not_null_stg_linkedin_ads__ad_analytics_by_creative_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_creative\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_linkedin_ads__ad_analytics_by_creative", "attached_node": "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_linkedin_ads__ad_analytics_by_creative')) }}"}, "namespace": null}}, "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_campaign_campaign_id.d6ae242f1a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_linkedin_ads__ad_analytics_by_campaign_campaign_id", "resource_type": "test", "package_name": "linkedin", "path": "not_null_stg_linkedin_ads__ad_analytics_by_campaign_campaign_id.sql", "original_file_path": "models/staging/stg_linkedin.yml", "unique_id": "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_campaign_campaign_id.d6ae242f1a", "fqn": ["linkedin", "staging", "not_null_stg_linkedin_ads__ad_analytics_by_campaign_campaign_id"], "alias": "not_null_stg_linkedin_ads__ad_analytics_by_campaign_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.6262572, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__ad_analytics_by_campaign", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin.yml/not_null_stg_linkedin_ads__ad_analytics_by_campaign_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_campaign\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_linkedin_ads__ad_analytics_by_campaign", "attached_node": "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_linkedin_ads__ad_analytics_by_campaign')) }}"}, "namespace": null}}, "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_campaign_date_day.ef97bed766": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_linkedin_ads__ad_analytics_by_campaign_date_day", "resource_type": "test", "package_name": "linkedin", "path": "not_null_stg_linkedin_ads__ad_analytics_by_campaign_date_day.sql", "original_file_path": "models/staging/stg_linkedin.yml", "unique_id": "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_campaign_date_day.ef97bed766", "fqn": ["linkedin", "staging", "not_null_stg_linkedin_ads__ad_analytics_by_campaign_date_day"], "alias": "not_null_stg_linkedin_ads__ad_analytics_by_campaign_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.6287262, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__ad_analytics_by_campaign", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin.yml/not_null_stg_linkedin_ads__ad_analytics_by_campaign_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_campaign\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_linkedin_ads__ad_analytics_by_campaign", "attached_node": "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_linkedin_ads__ad_analytics_by_campaign')) }}"}, "namespace": null}}, "test.linkedin.not_null_stg_linkedin_ads__creative_history_creative_id.4d51d55474": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_linkedin_ads__creative_history_creative_id", "resource_type": "test", "package_name": "linkedin", "path": "not_null_stg_linkedin_ads__creative_history_creative_id.sql", "original_file_path": "models/staging/stg_linkedin.yml", "unique_id": "test.linkedin.not_null_stg_linkedin_ads__creative_history_creative_id.4d51d55474", "fqn": ["linkedin", "staging", "not_null_stg_linkedin_ads__creative_history_creative_id"], "alias": "not_null_stg_linkedin_ads__creative_history_creative_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.6311371, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__creative_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.stg_linkedin_ads__creative_history"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin.yml/not_null_stg_linkedin_ads__creative_history_creative_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect creative_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__creative_history\"\nwhere creative_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "creative_id", "file_key_name": "models.stg_linkedin_ads__creative_history", "attached_node": "model.linkedin.stg_linkedin_ads__creative_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "creative_id", "model": "{{ get_where_subquery(ref('stg_linkedin_ads__creative_history')) }}"}, "namespace": null}}, "test.linkedin.not_null_stg_linkedin_ads__campaign_history_campaign_id.b026971ca2": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_linkedin_ads__campaign_history_campaign_id", "resource_type": "test", "package_name": "linkedin", "path": "not_null_stg_linkedin_ads__campaign_history_campaign_id.sql", "original_file_path": "models/staging/stg_linkedin.yml", "unique_id": "test.linkedin.not_null_stg_linkedin_ads__campaign_history_campaign_id.b026971ca2", "fqn": ["linkedin", "staging", "not_null_stg_linkedin_ads__campaign_history_campaign_id"], "alias": "not_null_stg_linkedin_ads__campaign_history_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.6336114, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.stg_linkedin_ads__campaign_history"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin.yml/not_null_stg_linkedin_ads__campaign_history_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_history\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_linkedin_ads__campaign_history", "attached_node": "model.linkedin.stg_linkedin_ads__campaign_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_linkedin_ads__campaign_history')) }}"}, "namespace": null}}, "test.linkedin.not_null_stg_linkedin_ads__campaign_history_version_tag.64954cc469": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_linkedin_ads__campaign_history_version_tag", "resource_type": "test", "package_name": "linkedin", "path": "not_null_stg_linkedin_ads__campaign_history_version_tag.sql", "original_file_path": "models/staging/stg_linkedin.yml", "unique_id": "test.linkedin.not_null_stg_linkedin_ads__campaign_history_version_tag.64954cc469", "fqn": ["linkedin", "staging", "not_null_stg_linkedin_ads__campaign_history_version_tag"], "alias": "not_null_stg_linkedin_ads__campaign_history_version_tag", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.6361094, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.stg_linkedin_ads__campaign_history"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin.yml/not_null_stg_linkedin_ads__campaign_history_version_tag.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect version_tag\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_history\"\nwhere version_tag is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "version_tag", "file_key_name": "models.stg_linkedin_ads__campaign_history", "attached_node": "model.linkedin.stg_linkedin_ads__campaign_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "version_tag", "model": "{{ get_where_subquery(ref('stg_linkedin_ads__campaign_history')) }}"}, "namespace": null}}, "test.linkedin.not_null_stg_linkedin_ads__campaign_group_history_campaign_group_id.3888f3777d": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_linkedin_ads__campaign_group_history_campaign_group_id", "resource_type": "test", "package_name": "linkedin", "path": "not_null_stg_linkedin_ads__cam_ff659fc451955e2142e65b7eefd44f9a.sql", "original_file_path": "models/staging/stg_linkedin.yml", "unique_id": "test.linkedin.not_null_stg_linkedin_ads__campaign_group_history_campaign_group_id.3888f3777d", "fqn": ["linkedin", "staging", "not_null_stg_linkedin_ads__campaign_group_history_campaign_group_id"], "alias": "not_null_stg_linkedin_ads__cam_ff659fc451955e2142e65b7eefd44f9a", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_linkedin_ads__cam_ff659fc451955e2142e65b7eefd44f9a", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_linkedin_ads__cam_ff659fc451955e2142e65b7eefd44f9a"}, "created_at": 1783450503.6385376, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_linkedin_ads__cam_ff659fc451955e2142e65b7eefd44f9a\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__campaign_group_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.stg_linkedin_ads__campaign_group_history"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin.yml/not_null_stg_linkedin_ads__cam_ff659fc451955e2142e65b7eefd44f9a.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_group_history\"\nwhere campaign_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_group_id", "file_key_name": "models.stg_linkedin_ads__campaign_group_history", "attached_node": "model.linkedin.stg_linkedin_ads__campaign_group_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_group_id", "model": "{{ get_where_subquery(ref('stg_linkedin_ads__campaign_group_history')) }}"}, "namespace": null}}, "test.linkedin.not_null_stg_linkedin_ads__campaign_group_history_last_modified_at.a716e2a7ea": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_linkedin_ads__campaign_group_history_last_modified_at", "resource_type": "test", "package_name": "linkedin", "path": "not_null_stg_linkedin_ads__cam_2e7858c2b570943ef2af34e42f5302bd.sql", "original_file_path": "models/staging/stg_linkedin.yml", "unique_id": "test.linkedin.not_null_stg_linkedin_ads__campaign_group_history_last_modified_at.a716e2a7ea", "fqn": ["linkedin", "staging", "not_null_stg_linkedin_ads__campaign_group_history_last_modified_at"], "alias": "not_null_stg_linkedin_ads__cam_2e7858c2b570943ef2af34e42f5302bd", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_linkedin_ads__cam_2e7858c2b570943ef2af34e42f5302bd", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_linkedin_ads__cam_2e7858c2b570943ef2af34e42f5302bd"}, "created_at": 1783450503.6409311, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_linkedin_ads__cam_2e7858c2b570943ef2af34e42f5302bd\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__campaign_group_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.stg_linkedin_ads__campaign_group_history"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin.yml/not_null_stg_linkedin_ads__cam_2e7858c2b570943ef2af34e42f5302bd.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect last_modified_at\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_group_history\"\nwhere last_modified_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "last_modified_at", "file_key_name": "models.stg_linkedin_ads__campaign_group_history", "attached_node": "model.linkedin.stg_linkedin_ads__campaign_group_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "last_modified_at", "model": "{{ get_where_subquery(ref('stg_linkedin_ads__campaign_group_history')) }}"}, "namespace": null}}, "test.linkedin.not_null_stg_linkedin_ads__account_history_account_id.a9fa7f93c0": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_linkedin_ads__account_history_account_id", "resource_type": "test", "package_name": "linkedin", "path": "not_null_stg_linkedin_ads__account_history_account_id.sql", "original_file_path": "models/staging/stg_linkedin.yml", "unique_id": "test.linkedin.not_null_stg_linkedin_ads__account_history_account_id.a9fa7f93c0", "fqn": ["linkedin", "staging", "not_null_stg_linkedin_ads__account_history_account_id"], "alias": "not_null_stg_linkedin_ads__account_history_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.643309, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.stg_linkedin_ads__account_history"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin.yml/not_null_stg_linkedin_ads__account_history_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__account_history\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.stg_linkedin_ads__account_history", "attached_node": "model.linkedin.stg_linkedin_ads__account_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('stg_linkedin_ads__account_history')) }}"}, "namespace": null}}, "test.linkedin.not_null_stg_linkedin_ads__account_history_version_tag.58c46c5d81": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_linkedin_ads__account_history_version_tag", "resource_type": "test", "package_name": "linkedin", "path": "not_null_stg_linkedin_ads__account_history_version_tag.sql", "original_file_path": "models/staging/stg_linkedin.yml", "unique_id": "test.linkedin.not_null_stg_linkedin_ads__account_history_version_tag.58c46c5d81", "fqn": ["linkedin", "staging", "not_null_stg_linkedin_ads__account_history_version_tag"], "alias": "not_null_stg_linkedin_ads__account_history_version_tag", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.6458454, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.stg_linkedin_ads__account_history"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin.yml/not_null_stg_linkedin_ads__account_history_version_tag.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect version_tag\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__account_history\"\nwhere version_tag is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "version_tag", "file_key_name": "models.stg_linkedin_ads__account_history", "attached_node": "model.linkedin.stg_linkedin_ads__account_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "version_tag", "model": "{{ get_where_subquery(ref('stg_linkedin_ads__account_history')) }}"}, "namespace": null}}, "test.linkedin.not_null_stg_linkedin_ads__geo_geo_id.a9fc61210c": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_linkedin_ads__geo_geo_id", "resource_type": "test", "package_name": "linkedin", "path": "not_null_stg_linkedin_ads__geo_geo_id.sql", "original_file_path": "models/staging/stg_linkedin.yml", "unique_id": "test.linkedin.not_null_stg_linkedin_ads__geo_geo_id.a9fc61210c", "fqn": ["linkedin", "staging", "not_null_stg_linkedin_ads__geo_geo_id"], "alias": "not_null_stg_linkedin_ads__geo_geo_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.648248, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__geo", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.stg_linkedin_ads__geo"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin.yml/not_null_stg_linkedin_ads__geo_geo_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect geo_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__geo\"\nwhere geo_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "geo_id", "file_key_name": "models.stg_linkedin_ads__geo", "attached_node": "model.linkedin.stg_linkedin_ads__geo", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "geo_id", "model": "{{ get_where_subquery(ref('stg_linkedin_ads__geo')) }}"}, "namespace": null}}, "test.linkedin.not_null_stg_linkedin_ads__monthly_ad_analytics_by_country_date_month.553fe89e70": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_linkedin_ads__monthly_ad_analytics_by_country_date_month", "resource_type": "test", "package_name": "linkedin", "path": "not_null_stg_linkedin_ads__mon_02cf32e2b626ecead73883f0f8c85f37.sql", "original_file_path": "models/staging/stg_linkedin.yml", "unique_id": "test.linkedin.not_null_stg_linkedin_ads__monthly_ad_analytics_by_country_date_month.553fe89e70", "fqn": ["linkedin", "staging", "not_null_stg_linkedin_ads__monthly_ad_analytics_by_country_date_month"], "alias": "not_null_stg_linkedin_ads__mon_02cf32e2b626ecead73883f0f8c85f37", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_linkedin_ads__mon_02cf32e2b626ecead73883f0f8c85f37", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_linkedin_ads__mon_02cf32e2b626ecead73883f0f8c85f37"}, "created_at": 1783450503.650702, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_linkedin_ads__mon_02cf32e2b626ecead73883f0f8c85f37\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__monthly_ad_analytics_by_country", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin.yml/not_null_stg_linkedin_ads__mon_02cf32e2b626ecead73883f0f8c85f37.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_month\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__monthly_ad_analytics_by_country\"\nwhere date_month is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_month", "file_key_name": "models.stg_linkedin_ads__monthly_ad_analytics_by_country", "attached_node": "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_month", "model": "{{ get_where_subquery(ref('stg_linkedin_ads__monthly_ad_analytics_by_country')) }}"}, "namespace": null}}, "test.linkedin.not_null_stg_linkedin_ads__monthly_ad_analytics_by_region_date_month.d065ed2b78": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_linkedin_ads__monthly_ad_analytics_by_region_date_month", "resource_type": "test", "package_name": "linkedin", "path": "not_null_stg_linkedin_ads__mon_57eb656cab457d14853c1e72854cab3d.sql", "original_file_path": "models/staging/stg_linkedin.yml", "unique_id": "test.linkedin.not_null_stg_linkedin_ads__monthly_ad_analytics_by_region_date_month.d065ed2b78", "fqn": ["linkedin", "staging", "not_null_stg_linkedin_ads__monthly_ad_analytics_by_region_date_month"], "alias": "not_null_stg_linkedin_ads__mon_57eb656cab457d14853c1e72854cab3d", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_linkedin_ads__mon_57eb656cab457d14853c1e72854cab3d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_linkedin_ads__mon_57eb656cab457d14853c1e72854cab3d"}, "created_at": 1783450503.653091, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_linkedin_ads__mon_57eb656cab457d14853c1e72854cab3d\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__monthly_ad_analytics_by_region", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin.yml/not_null_stg_linkedin_ads__mon_57eb656cab457d14853c1e72854cab3d.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_month\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__monthly_ad_analytics_by_region\"\nwhere date_month is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_month", "file_key_name": "models.stg_linkedin_ads__monthly_ad_analytics_by_region", "attached_node": "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_month", "model": "{{ get_where_subquery(ref('stg_linkedin_ads__monthly_ad_analytics_by_region')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_ad_group_id.60febec6b5": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_apple_search_ads__ad_group_report_ad_group_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_apple_search_ads__ad_group_report_ad_group_id.sql", "original_file_path": "models/apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_ad_group_id.60febec6b5", "fqn": ["apple_search_ads", "not_null_apple_search_ads__ad_group_report_ad_group_id"], "alias": "not_null_apple_search_ads__ad_group_report_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.9265788, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "apple_search_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_group_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__ad_group_report_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__ad_group_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.apple_search_ads__ad_group_report", "attached_node": "model.apple_search_ads.apple_search_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('apple_search_ads__ad_group_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_date_day.e6ffb30b3c": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_apple_search_ads__ad_group_report_date_day", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_apple_search_ads__ad_group_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_date_day.e6ffb30b3c", "fqn": ["apple_search_ads", "not_null_apple_search_ads__ad_group_report_date_day"], "alias": "not_null_apple_search_ads__ad_group_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.929188, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "apple_search_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_group_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__ad_group_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__ad_group_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.apple_search_ads__ad_group_report", "attached_node": "model.apple_search_ads.apple_search_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__ad_group_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_apple_search_ads__ad_report_ad_id.0ab2c5075c": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_apple_search_ads__ad_report_ad_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_apple_search_ads__ad_report_ad_id.sql", "original_file_path": "models/apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_report_ad_id.0ab2c5075c", "fqn": ["apple_search_ads", "not_null_apple_search_ads__ad_report_ad_id"], "alias": "not_null_apple_search_ads__ad_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.931659, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "apple_search_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__ad_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__ad_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.apple_search_ads__ad_report", "attached_node": "model.apple_search_ads.apple_search_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('apple_search_ads__ad_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_apple_search_ads__ad_report_date_day.b86c049e17": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_apple_search_ads__ad_report_date_day", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_apple_search_ads__ad_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_report_date_day.b86c049e17", "fqn": ["apple_search_ads", "not_null_apple_search_ads__ad_report_date_day"], "alias": "not_null_apple_search_ads__ad_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.9341428, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "apple_search_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__ad_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__ad_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.apple_search_ads__ad_report", "attached_node": "model.apple_search_ads.apple_search_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__ad_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_apple_search_ads__campaign_report_campaign_id.e26ed1e146": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_apple_search_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_apple_search_ads__campaign_report_campaign_id.sql", "original_file_path": "models/apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_apple_search_ads__campaign_report_campaign_id.e26ed1e146", "fqn": ["apple_search_ads", "not_null_apple_search_ads__campaign_report_campaign_id"], "alias": "not_null_apple_search_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.936574, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "apple_search_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__campaign_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.apple_search_ads__campaign_report", "attached_node": "model.apple_search_ads.apple_search_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('apple_search_ads__campaign_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_apple_search_ads__campaign_report_date_day.35652b8d1a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_apple_search_ads__campaign_report_date_day", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_apple_search_ads__campaign_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_apple_search_ads__campaign_report_date_day.35652b8d1a", "fqn": ["apple_search_ads", "not_null_apple_search_ads__campaign_report_date_day"], "alias": "not_null_apple_search_ads__campaign_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.938987, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "apple_search_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__campaign_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__campaign_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__campaign_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.apple_search_ads__campaign_report", "attached_node": "model.apple_search_ads.apple_search_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__campaign_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_apple_search_ads__keyword_report_keyword_id.ea493710db": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_apple_search_ads__keyword_report_keyword_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_apple_search_ads__keyword_report_keyword_id.sql", "original_file_path": "models/apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_apple_search_ads__keyword_report_keyword_id.ea493710db", "fqn": ["apple_search_ads", "not_null_apple_search_ads__keyword_report_keyword_id"], "alias": "not_null_apple_search_ads__keyword_report_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.941486, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "apple_search_ads__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__keyword_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__keyword_report_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__keyword_report\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.apple_search_ads__keyword_report", "attached_node": "model.apple_search_ads.apple_search_ads__keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('apple_search_ads__keyword_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_apple_search_ads__keyword_report_date_day.3dec8d0e82": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_apple_search_ads__keyword_report_date_day", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_apple_search_ads__keyword_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_apple_search_ads__keyword_report_date_day.3dec8d0e82", "fqn": ["apple_search_ads", "not_null_apple_search_ads__keyword_report_date_day"], "alias": "not_null_apple_search_ads__keyword_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.944026, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "apple_search_ads__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__keyword_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__keyword_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__keyword_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.apple_search_ads__keyword_report", "attached_node": "model.apple_search_ads.apple_search_ads__keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__keyword_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_apple_search_ads__organization_report_organization_id.b6cf7d69f8": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_apple_search_ads__organization_report_organization_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_apple_search_ads__organization_report_organization_id.sql", "original_file_path": "models/apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_apple_search_ads__organization_report_organization_id.b6cf7d69f8", "fqn": ["apple_search_ads", "not_null_apple_search_ads__organization_report_organization_id"], "alias": "not_null_apple_search_ads__organization_report_organization_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.9464822, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "apple_search_ads__organization_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__organization_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__organization_report_organization_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect organization_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__organization_report\"\nwhere organization_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "organization_id", "file_key_name": "models.apple_search_ads__organization_report", "attached_node": "model.apple_search_ads.apple_search_ads__organization_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "organization_id", "model": "{{ get_where_subquery(ref('apple_search_ads__organization_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_apple_search_ads__organization_report_date_day.5784fed523": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_apple_search_ads__organization_report_date_day", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_apple_search_ads__organization_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_apple_search_ads__organization_report_date_day.5784fed523", "fqn": ["apple_search_ads", "not_null_apple_search_ads__organization_report_date_day"], "alias": "not_null_apple_search_ads__organization_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.9488976, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "apple_search_ads__organization_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__organization_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__organization_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__organization_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.apple_search_ads__organization_report", "attached_node": "model.apple_search_ads.apple_search_ads__organization_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__organization_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_apple_search_ads__search_term_report_date_day.1bc3b0d57c": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_apple_search_ads__search_term_report_date_day", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_apple_search_ads__search_term_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_apple_search_ads__search_term_report_date_day.1bc3b0d57c", "fqn": ["apple_search_ads", "not_null_apple_search_ads__search_term_report_date_day"], "alias": "not_null_apple_search_ads__search_term_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.951336, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "apple_search_ads__search_term_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__search_term_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__search_term_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__search_term_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.apple_search_ads__search_term_report", "attached_node": "model.apple_search_ads.apple_search_ads__search_term_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__search_term_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_apple_search_ads__search_term_report_search_term_text.aecc7447f7": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_apple_search_ads__search_term_report_search_term_text", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_apple_search_ads__search_term_report_search_term_text.sql", "original_file_path": "models/apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_apple_search_ads__search_term_report_search_term_text.aecc7447f7", "fqn": ["apple_search_ads", "not_null_apple_search_ads__search_term_report_search_term_text"], "alias": "not_null_apple_search_ads__search_term_report_search_term_text", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.9537761, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "apple_search_ads__search_term_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__search_term_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__search_term_report_search_term_text.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect search_term_text\nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__search_term_report\"\nwhere search_term_text is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "search_term_text", "file_key_name": "models.apple_search_ads__search_term_report", "attached_node": "model.apple_search_ads.apple_search_ads__search_term_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "search_term_text", "model": "{{ get_where_subquery(ref('apple_search_ads__search_term_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__ad_group_history_modified_at", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__ad_group_history_modified_at.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__ad_group_history_modified_at"], "alias": "not_null_stg_apple_search_ads__ad_group_history_modified_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.996275, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_group_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_group_history"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_group_history_modified_at.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect modified_at\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_group_history\"\nwhere modified_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "modified_at", "file_key_name": "models.stg_apple_search_ads__ad_group_history", "attached_node": "model.apple_search_ads.stg_apple_search_ads__ad_group_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "modified_at", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_group_history')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__ad_group_history_ad_group_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__ad_group_history_ad_group_id.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__ad_group_history_ad_group_id"], "alias": "not_null_stg_apple_search_ads__ad_group_history_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450503.9990418, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_group_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_group_history"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_group_history_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_group_history\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_apple_search_ads__ad_group_history", "attached_node": "model.apple_search_ads.stg_apple_search_ads__ad_group_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_group_history')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__ad_group_report_ad_group_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__ad_group_report_ad_group_id.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__ad_group_report_ad_group_id"], "alias": "not_null_stg_apple_search_ads__ad_group_report_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.0016685, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_group_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_group_report_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_group_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_apple_search_ads__ad_group_report", "attached_node": "model.apple_search_ads.stg_apple_search_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_group_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__ad_group_report_date_day", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__ad_group_report_date_day.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__ad_group_report_date_day"], "alias": "not_null_stg_apple_search_ads__ad_group_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.0041218, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_group_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_group_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_group_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__ad_group_report", "attached_node": "model.apple_search_ads.stg_apple_search_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_group_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__ad_history_modified_at", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__ad_history_modified_at.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__ad_history_modified_at"], "alias": "not_null_stg_apple_search_ads__ad_history_modified_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.006586, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_history"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_history_modified_at.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect modified_at\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_history\"\nwhere modified_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "modified_at", "file_key_name": "models.stg_apple_search_ads__ad_history", "attached_node": "model.apple_search_ads.stg_apple_search_ads__ad_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "modified_at", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_history')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__ad_history_ad_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__ad_history_ad_id.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__ad_history_ad_id"], "alias": "not_null_stg_apple_search_ads__ad_history_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.0090663, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_history"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_history_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_history\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_apple_search_ads__ad_history", "attached_node": "model.apple_search_ads.stg_apple_search_ads__ad_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_history')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__ad_report_date_day", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__ad_report_date_day.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__ad_report_date_day"], "alias": "not_null_stg_apple_search_ads__ad_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.0115209, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__ad_report", "attached_node": "model.apple_search_ads.stg_apple_search_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__ad_report_ad_group_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__ad_report_ad_group_id.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__ad_report_ad_group_id"], "alias": "not_null_stg_apple_search_ads__ad_report_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.014045, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_report_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_apple_search_ads__ad_report", "attached_node": "model.apple_search_ads.stg_apple_search_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__ad_report_ad_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__ad_report_ad_id.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__ad_report_ad_id"], "alias": "not_null_stg_apple_search_ads__ad_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.0164812, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_apple_search_ads__ad_report", "attached_node": "model.apple_search_ads.stg_apple_search_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__campaign_history_modified_at", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__campaign_history_modified_at.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__campaign_history_modified_at"], "alias": "not_null_stg_apple_search_ads__campaign_history_modified_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.0189722, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__campaign_history"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__campaign_history_modified_at.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect modified_at\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_history\"\nwhere modified_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "modified_at", "file_key_name": "models.stg_apple_search_ads__campaign_history", "attached_node": "model.apple_search_ads.stg_apple_search_ads__campaign_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "modified_at", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_history')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__campaign_history_campaign_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__campaign_history_campaign_id.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__campaign_history_campaign_id"], "alias": "not_null_stg_apple_search_ads__campaign_history_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.0215056, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__campaign_history"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__campaign_history_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_history\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_apple_search_ads__campaign_history", "attached_node": "model.apple_search_ads.stg_apple_search_ads__campaign_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_history')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__campaign_report_campaign_id.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__campaign_report_campaign_id"], "alias": "not_null_stg_apple_search_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.0240967, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__campaign_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_apple_search_ads__campaign_report", "attached_node": "model.apple_search_ads.stg_apple_search_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__campaign_report_date_day", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__campaign_report_date_day.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__campaign_report_date_day"], "alias": "not_null_stg_apple_search_ads__campaign_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.0266533, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__campaign_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__campaign_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__campaign_report", "attached_node": "model.apple_search_ads.stg_apple_search_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__keyword_history_modified_at", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__keyword_history_modified_at.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__keyword_history_modified_at"], "alias": "not_null_stg_apple_search_ads__keyword_history_modified_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.0290945, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__keyword_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__keyword_history"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__keyword_history_modified_at.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect modified_at\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__keyword_history\"\nwhere modified_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "modified_at", "file_key_name": "models.stg_apple_search_ads__keyword_history", "attached_node": "model.apple_search_ads.stg_apple_search_ads__keyword_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "modified_at", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_history')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__keyword_history_keyword_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__keyword_history_keyword_id.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__keyword_history_keyword_id"], "alias": "not_null_stg_apple_search_ads__keyword_history_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.0315204, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__keyword_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__keyword_history"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__keyword_history_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__keyword_history\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.stg_apple_search_ads__keyword_history", "attached_node": "model.apple_search_ads.stg_apple_search_ads__keyword_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_history')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__keyword_report_keyword_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__keyword_report_keyword_id.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__keyword_report_keyword_id"], "alias": "not_null_stg_apple_search_ads__keyword_report_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.0339484, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__keyword_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__keyword_report_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__keyword_report\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.stg_apple_search_ads__keyword_report", "attached_node": "model.apple_search_ads.stg_apple_search_ads__keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__keyword_report_date_day", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__keyword_report_date_day.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__keyword_report_date_day"], "alias": "not_null_stg_apple_search_ads__keyword_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.0364907, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__keyword_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__keyword_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__keyword_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__keyword_report", "attached_node": "model.apple_search_ads.stg_apple_search_ads__keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__organization_organization_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__organization_organization_id.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__organization_organization_id"], "alias": "not_null_stg_apple_search_ads__organization_organization_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.0390122, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__organization", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__organization"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__organization_organization_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect organization_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__organization\"\nwhere organization_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "organization_id", "file_key_name": "models.stg_apple_search_ads__organization", "attached_node": "model.apple_search_ads.stg_apple_search_ads__organization", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "organization_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__organization')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__search_term_report__fivetran_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__search_term_report__fivetran_id.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__search_term_report__fivetran_id"], "alias": "not_null_stg_apple_search_ads__search_term_report__fivetran_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.0414565, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__search_term_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__search_term_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__search_term_report__fivetran_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect _fivetran_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__search_term_report\"\nwhere _fivetran_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "_fivetran_id", "file_key_name": "models.stg_apple_search_ads__search_term_report", "attached_node": "model.apple_search_ads.stg_apple_search_ads__search_term_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_fivetran_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__search_term_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__search_term_report_date_day", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__search_term_report_date_day.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__search_term_report_date_day"], "alias": "not_null_stg_apple_search_ads__search_term_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.0438678, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__search_term_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__search_term_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__search_term_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__search_term_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__search_term_report", "attached_node": "model.apple_search_ads.stg_apple_search_ads__search_term_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__search_term_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_reddit_ads__account_report_date_day.7b43e6cb90": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_reddit_ads__account_report_date_day", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_reddit_ads__account_report_date_day.sql", "original_file_path": "models/reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_reddit_ads__account_report_date_day.7b43e6cb90", "fqn": ["reddit_ads", "not_null_reddit_ads__account_report_date_day"], "alias": "not_null_reddit_ads__account_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.085652, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "reddit_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.reddit_ads__account_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads.yml/not_null_reddit_ads__account_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__account_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.reddit_ads__account_report", "attached_node": "model.reddit_ads.reddit_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('reddit_ads__account_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_reddit_ads__account_report_account_id.16f11188c5": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_reddit_ads__account_report_account_id", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_reddit_ads__account_report_account_id.sql", "original_file_path": "models/reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_reddit_ads__account_report_account_id.16f11188c5", "fqn": ["reddit_ads", "not_null_reddit_ads__account_report_account_id"], "alias": "not_null_reddit_ads__account_report_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.0882685, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "reddit_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.reddit_ads__account_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads.yml/not_null_reddit_ads__account_report_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__account_report\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.reddit_ads__account_report", "attached_node": "model.reddit_ads.reddit_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('reddit_ads__account_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_reddit_ads__ad_group_report_date_day.6463e6f6f7": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_reddit_ads__ad_group_report_date_day", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_reddit_ads__ad_group_report_date_day.sql", "original_file_path": "models/reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_reddit_ads__ad_group_report_date_day.6463e6f6f7", "fqn": ["reddit_ads", "not_null_reddit_ads__ad_group_report_date_day"], "alias": "not_null_reddit_ads__ad_group_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.0907626, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "reddit_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.reddit_ads__ad_group_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads.yml/not_null_reddit_ads__ad_group_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__ad_group_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.reddit_ads__ad_group_report", "attached_node": "model.reddit_ads.reddit_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('reddit_ads__ad_group_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_reddit_ads__ad_group_report_ad_group_id.057bd60604": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_reddit_ads__ad_group_report_ad_group_id", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_reddit_ads__ad_group_report_ad_group_id.sql", "original_file_path": "models/reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_reddit_ads__ad_group_report_ad_group_id.057bd60604", "fqn": ["reddit_ads", "not_null_reddit_ads__ad_group_report_ad_group_id"], "alias": "not_null_reddit_ads__ad_group_report_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.0931702, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "reddit_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.reddit_ads__ad_group_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads.yml/not_null_reddit_ads__ad_group_report_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__ad_group_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.reddit_ads__ad_group_report", "attached_node": "model.reddit_ads.reddit_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('reddit_ads__ad_group_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_reddit_ads__ad_report_date_day.608b21c69a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_reddit_ads__ad_report_date_day", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_reddit_ads__ad_report_date_day.sql", "original_file_path": "models/reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_reddit_ads__ad_report_date_day.608b21c69a", "fqn": ["reddit_ads", "not_null_reddit_ads__ad_report_date_day"], "alias": "not_null_reddit_ads__ad_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.0956914, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "reddit_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.reddit_ads__ad_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads.yml/not_null_reddit_ads__ad_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__ad_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.reddit_ads__ad_report", "attached_node": "model.reddit_ads.reddit_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('reddit_ads__ad_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_reddit_ads__ad_report_ad_id.1da054a14e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_reddit_ads__ad_report_ad_id", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_reddit_ads__ad_report_ad_id.sql", "original_file_path": "models/reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_reddit_ads__ad_report_ad_id.1da054a14e", "fqn": ["reddit_ads", "not_null_reddit_ads__ad_report_ad_id"], "alias": "not_null_reddit_ads__ad_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.0980988, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "reddit_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.reddit_ads__ad_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads.yml/not_null_reddit_ads__ad_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__ad_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.reddit_ads__ad_report", "attached_node": "model.reddit_ads.reddit_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('reddit_ads__ad_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_reddit_ads__campaign_report_date_day.f79cca4131": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_reddit_ads__campaign_report_date_day", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_reddit_ads__campaign_report_date_day.sql", "original_file_path": "models/reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_reddit_ads__campaign_report_date_day.f79cca4131", "fqn": ["reddit_ads", "not_null_reddit_ads__campaign_report_date_day"], "alias": "not_null_reddit_ads__campaign_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.1005313, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "reddit_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.reddit_ads__campaign_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads.yml/not_null_reddit_ads__campaign_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__campaign_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.reddit_ads__campaign_report", "attached_node": "model.reddit_ads.reddit_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('reddit_ads__campaign_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_reddit_ads__campaign_report_campaign_id.f5491a0b49": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_reddit_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_reddit_ads__campaign_report_campaign_id.sql", "original_file_path": "models/reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_reddit_ads__campaign_report_campaign_id.f5491a0b49", "fqn": ["reddit_ads", "not_null_reddit_ads__campaign_report_campaign_id"], "alias": "not_null_reddit_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.1029332, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "reddit_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.reddit_ads__campaign_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads.yml/not_null_reddit_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.reddit_ads__campaign_report", "attached_node": "model.reddit_ads.reddit_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('reddit_ads__campaign_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_reddit_ads__url_report_date_day.4b0f6363da": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_reddit_ads__url_report_date_day", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_reddit_ads__url_report_date_day.sql", "original_file_path": "models/reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_reddit_ads__url_report_date_day.4b0f6363da", "fqn": ["reddit_ads", "not_null_reddit_ads__url_report_date_day"], "alias": "not_null_reddit_ads__url_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.1053247, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "reddit_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.reddit_ads__url_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads.yml/not_null_reddit_ads__url_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__url_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.reddit_ads__url_report", "attached_node": "model.reddit_ads.reddit_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('reddit_ads__url_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_reddit_ads__url_report_ad_id.8ff83da2b0": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_reddit_ads__url_report_ad_id", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_reddit_ads__url_report_ad_id.sql", "original_file_path": "models/reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_reddit_ads__url_report_ad_id.8ff83da2b0", "fqn": ["reddit_ads", "not_null_reddit_ads__url_report_ad_id"], "alias": "not_null_reddit_ads__url_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.1078558, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "reddit_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.reddit_ads__url_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads.yml/not_null_reddit_ads__url_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__url_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.reddit_ads__url_report", "attached_node": "model.reddit_ads.reddit_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('reddit_ads__url_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_reddit_ads__url_report_base_url.2f585bebcb": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_reddit_ads__url_report_base_url", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_reddit_ads__url_report_base_url.sql", "original_file_path": "models/reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_reddit_ads__url_report_base_url.2f585bebcb", "fqn": ["reddit_ads", "not_null_reddit_ads__url_report_base_url"], "alias": "not_null_reddit_ads__url_report_base_url", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"enabled": true}, "created_at": 1783450504.1112735, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(enabled=True) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "reddit_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.reddit_ads__url_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads.yml/not_null_reddit_ads__url_report_base_url.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect base_url\nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__url_report\"\nwhere base_url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "base_url", "file_key_name": "models.reddit_ads__url_report", "attached_node": "model.reddit_ads.reddit_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "base_url", "model": "{{ get_where_subquery(ref('reddit_ads__url_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_stg_reddit_ads__account_account_id.512f0b8078": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_reddit_ads__account_account_id", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_stg_reddit_ads__account_account_id.sql", "original_file_path": "models/staging/stg_reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_stg_reddit_ads__account_account_id.512f0b8078", "fqn": ["reddit_ads", "staging", "not_null_stg_reddit_ads__account_account_id"], "alias": "not_null_stg_reddit_ads__account_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.1709867, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__account", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.stg_reddit_ads__account"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads.yml/not_null_stg_reddit_ads__account_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.stg_reddit_ads__account", "attached_node": "model.reddit_ads.stg_reddit_ads__account", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('stg_reddit_ads__account')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_stg_reddit_ads__account_report_account_id.1f2a0195de": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_reddit_ads__account_report_account_id", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_stg_reddit_ads__account_report_account_id.sql", "original_file_path": "models/staging/stg_reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_stg_reddit_ads__account_report_account_id.1f2a0195de", "fqn": ["reddit_ads", "staging", "not_null_stg_reddit_ads__account_report_account_id"], "alias": "not_null_stg_reddit_ads__account_report_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.1737545, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.stg_reddit_ads__account_report"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads.yml/not_null_stg_reddit_ads__account_report_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account_report\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.stg_reddit_ads__account_report", "attached_node": "model.reddit_ads.stg_reddit_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('stg_reddit_ads__account_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_stg_reddit_ads__ad_ad_id.40188b63dd": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_reddit_ads__ad_ad_id", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_stg_reddit_ads__ad_ad_id.sql", "original_file_path": "models/staging/stg_reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_stg_reddit_ads__ad_ad_id.40188b63dd", "fqn": ["reddit_ads", "staging", "not_null_stg_reddit_ads__ad_ad_id"], "alias": "not_null_stg_reddit_ads__ad_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.1762476, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__ad", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.stg_reddit_ads__ad"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads.yml/not_null_stg_reddit_ads__ad_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_reddit_ads__ad", "attached_node": "model.reddit_ads.stg_reddit_ads__ad", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_reddit_ads__ad')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_stg_reddit_ads__ad_report_ad_id.c4af84b857": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_reddit_ads__ad_report_ad_id", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_stg_reddit_ads__ad_report_ad_id.sql", "original_file_path": "models/staging/stg_reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_stg_reddit_ads__ad_report_ad_id.c4af84b857", "fqn": ["reddit_ads", "staging", "not_null_stg_reddit_ads__ad_report_ad_id"], "alias": "not_null_stg_reddit_ads__ad_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.1787555, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.stg_reddit_ads__ad_report"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads.yml/not_null_stg_reddit_ads__ad_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_reddit_ads__ad_report", "attached_node": "model.reddit_ads.stg_reddit_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_reddit_ads__ad_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_stg_reddit_ads__ad_group_ad_group_id.65795d8dc2": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_reddit_ads__ad_group_ad_group_id", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_stg_reddit_ads__ad_group_ad_group_id.sql", "original_file_path": "models/staging/stg_reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_stg_reddit_ads__ad_group_ad_group_id.65795d8dc2", "fqn": ["reddit_ads", "staging", "not_null_stg_reddit_ads__ad_group_ad_group_id"], "alias": "not_null_stg_reddit_ads__ad_group_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.1812494, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__ad_group", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.stg_reddit_ads__ad_group"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads.yml/not_null_stg_reddit_ads__ad_group_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_reddit_ads__ad_group", "attached_node": "model.reddit_ads.stg_reddit_ads__ad_group", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_reddit_ads__ad_group')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_stg_reddit_ads__ad_group_report_ad_group_id.9836cd084d": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_reddit_ads__ad_group_report_ad_group_id", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_stg_reddit_ads__ad_group_report_ad_group_id.sql", "original_file_path": "models/staging/stg_reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_stg_reddit_ads__ad_group_report_ad_group_id.9836cd084d", "fqn": ["reddit_ads", "staging", "not_null_stg_reddit_ads__ad_group_report_ad_group_id"], "alias": "not_null_stg_reddit_ads__ad_group_report_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.1837358, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.stg_reddit_ads__ad_group_report"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads.yml/not_null_stg_reddit_ads__ad_group_report_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_reddit_ads__ad_group_report", "attached_node": "model.reddit_ads.stg_reddit_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_reddit_ads__ad_group_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_stg_reddit_ads__campaign_campaign_id.f3f24e4682": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_reddit_ads__campaign_campaign_id", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_stg_reddit_ads__campaign_campaign_id.sql", "original_file_path": "models/staging/stg_reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_stg_reddit_ads__campaign_campaign_id.f3f24e4682", "fqn": ["reddit_ads", "staging", "not_null_stg_reddit_ads__campaign_campaign_id"], "alias": "not_null_stg_reddit_ads__campaign_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.186276, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__campaign", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.stg_reddit_ads__campaign"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads.yml/not_null_stg_reddit_ads__campaign_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_reddit_ads__campaign", "attached_node": "model.reddit_ads.stg_reddit_ads__campaign", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_reddit_ads__campaign')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_stg_reddit_ads__campaign_report_campaign_id.c717612b4f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_reddit_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_stg_reddit_ads__campaign_report_campaign_id.sql", "original_file_path": "models/staging/stg_reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_stg_reddit_ads__campaign_report_campaign_id.c717612b4f", "fqn": ["reddit_ads", "staging", "not_null_stg_reddit_ads__campaign_report_campaign_id"], "alias": "not_null_stg_reddit_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.1887355, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.stg_reddit_ads__campaign_report"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads.yml/not_null_stg_reddit_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_reddit_ads__campaign_report", "attached_node": "model.reddit_ads.stg_reddit_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_reddit_ads__campaign_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__account_report_date_day.688d7ed260": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__account_report_date_day", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__account_report_date_day.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__account_report_date_day.688d7ed260", "fqn": ["snapchat_ads", "not_null_snapchat_ads__account_report_date_day"], "alias": "not_null_snapchat_ads__account_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.223105, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__account_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__account_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__account_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.snapchat_ads__account_report", "attached_node": "model.snapchat_ads.snapchat_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('snapchat_ads__account_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__account_report_ad_account_id.589c81966b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__account_report_ad_account_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__account_report_ad_account_id.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__account_report_ad_account_id.589c81966b", "fqn": ["snapchat_ads", "not_null_snapchat_ads__account_report_ad_account_id"], "alias": "not_null_snapchat_ads__account_report_ad_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "warn", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"severity": "warn"}, "created_at": 1783450504.2261956, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(severity=\"warn\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__account_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__account_report_ad_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__account_report\"\nwhere ad_account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_account_id", "file_key_name": "models.snapchat_ads__account_report", "attached_node": "model.snapchat_ads.snapchat_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_account_id", "model": "{{ get_where_subquery(ref('snapchat_ads__account_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__ad_report_date_day.7c5350c8fe": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__ad_report_date_day", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__ad_report_date_day.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__ad_report_date_day.7c5350c8fe", "fqn": ["snapchat_ads", "not_null_snapchat_ads__ad_report_date_day"], "alias": "not_null_snapchat_ads__ad_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.2286918, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__ad_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__ad_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__ad_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.snapchat_ads__ad_report", "attached_node": "model.snapchat_ads.snapchat_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('snapchat_ads__ad_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__ad_report_ad_id.9000850744": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__ad_report_ad_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__ad_report_ad_id.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__ad_report_ad_id.9000850744", "fqn": ["snapchat_ads", "not_null_snapchat_ads__ad_report_ad_id"], "alias": "not_null_snapchat_ads__ad_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.2311106, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__ad_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__ad_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__ad_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.snapchat_ads__ad_report", "attached_node": "model.snapchat_ads.snapchat_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('snapchat_ads__ad_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__campaign_report_date_day.4e4e31223b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__campaign_report_date_day", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__campaign_report_date_day.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__campaign_report_date_day.4e4e31223b", "fqn": ["snapchat_ads", "not_null_snapchat_ads__campaign_report_date_day"], "alias": "not_null_snapchat_ads__campaign_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.2335374, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__campaign_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__campaign_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.snapchat_ads__campaign_report", "attached_node": "model.snapchat_ads.snapchat_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('snapchat_ads__campaign_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__campaign_report_campaign_id.19fd7135ac": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__campaign_report_campaign_id.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__campaign_report_campaign_id.19fd7135ac", "fqn": ["snapchat_ads", "not_null_snapchat_ads__campaign_report_campaign_id"], "alias": "not_null_snapchat_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.2360487, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__campaign_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.snapchat_ads__campaign_report", "attached_node": "model.snapchat_ads.snapchat_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('snapchat_ads__campaign_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__ad_squad_report_date_day.39118ca639": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__ad_squad_report_date_day", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__ad_squad_report_date_day.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__ad_squad_report_date_day.39118ca639", "fqn": ["snapchat_ads", "not_null_snapchat_ads__ad_squad_report_date_day"], "alias": "not_null_snapchat_ads__ad_squad_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.2384636, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__ad_squad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__ad_squad_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__ad_squad_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__ad_squad_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.snapchat_ads__ad_squad_report", "attached_node": "model.snapchat_ads.snapchat_ads__ad_squad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('snapchat_ads__ad_squad_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__ad_squad_report_ad_squad_id.424c0bbffe": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__ad_squad_report_ad_squad_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__ad_squad_report_ad_squad_id.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__ad_squad_report_ad_squad_id.424c0bbffe", "fqn": ["snapchat_ads", "not_null_snapchat_ads__ad_squad_report_ad_squad_id"], "alias": "not_null_snapchat_ads__ad_squad_report_ad_squad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.240877, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__ad_squad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__ad_squad_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__ad_squad_report_ad_squad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_squad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__ad_squad_report\"\nwhere ad_squad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_squad_id", "file_key_name": "models.snapchat_ads__ad_squad_report", "attached_node": "model.snapchat_ads.snapchat_ads__ad_squad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_squad_id", "model": "{{ get_where_subquery(ref('snapchat_ads__ad_squad_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__url_report_date_day.bcbe87a7f6": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__url_report_date_day", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__url_report_date_day.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__url_report_date_day.bcbe87a7f6", "fqn": ["snapchat_ads", "not_null_snapchat_ads__url_report_date_day"], "alias": "not_null_snapchat_ads__url_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.2432659, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__url_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__url_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__url_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.snapchat_ads__url_report", "attached_node": "model.snapchat_ads.snapchat_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('snapchat_ads__url_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__url_report_ad_id.ecbdfc0d78": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__url_report_ad_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__url_report_ad_id.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__url_report_ad_id.ecbdfc0d78", "fqn": ["snapchat_ads", "not_null_snapchat_ads__url_report_ad_id"], "alias": "not_null_snapchat_ads__url_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.2456872, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__url_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__url_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__url_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.snapchat_ads__url_report", "attached_node": "model.snapchat_ads.snapchat_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('snapchat_ads__url_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__url_report_base_url.15676dc1de": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__url_report_base_url", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__url_report_base_url.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__url_report_base_url.15676dc1de", "fqn": ["snapchat_ads", "not_null_snapchat_ads__url_report_base_url"], "alias": "not_null_snapchat_ads__url_report_base_url", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"enabled": true}, "created_at": 1783450504.2491226, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(enabled=True) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__url_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__url_report_base_url.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect base_url\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__url_report\"\nwhere base_url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "base_url", "file_key_name": "models.snapchat_ads__url_report", "attached_node": "model.snapchat_ads.snapchat_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "base_url", "model": "{{ get_where_subquery(ref('snapchat_ads__url_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_date_day.b946d6ae47": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__campaign_country_report_date_day", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__campaign_country_report_date_day.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_date_day.b946d6ae47", "fqn": ["snapchat_ads", "not_null_snapchat_ads__campaign_country_report_date_day"], "alias": "not_null_snapchat_ads__campaign_country_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.2516234, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__campaign_country_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__campaign_country_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_country_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.snapchat_ads__campaign_country_report", "attached_node": "model.snapchat_ads.snapchat_ads__campaign_country_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('snapchat_ads__campaign_country_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_campaign_id.33fe016201": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__campaign_country_report_campaign_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__campaign_country_report_campaign_id.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_campaign_id.33fe016201", "fqn": ["snapchat_ads", "not_null_snapchat_ads__campaign_country_report_campaign_id"], "alias": "not_null_snapchat_ads__campaign_country_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.2540293, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__campaign_country_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__campaign_country_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_country_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.snapchat_ads__campaign_country_report", "attached_node": "model.snapchat_ads.snapchat_ads__campaign_country_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('snapchat_ads__campaign_country_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_country.332a585832": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__campaign_country_report_country", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__campaign_country_report_country.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_country.332a585832", "fqn": ["snapchat_ads", "not_null_snapchat_ads__campaign_country_report_country"], "alias": "not_null_snapchat_ads__campaign_country_report_country", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.256475, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__campaign_country_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__campaign_country_report_country.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect country\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_country_report\"\nwhere country is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "country", "file_key_name": "models.snapchat_ads__campaign_country_report", "attached_node": "model.snapchat_ads.snapchat_ads__campaign_country_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "country", "model": "{{ get_where_subquery(ref('snapchat_ads__campaign_country_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_date_day.3d3ad303c4": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__campaign_region_report_date_day", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__campaign_region_report_date_day.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_date_day.3d3ad303c4", "fqn": ["snapchat_ads", "not_null_snapchat_ads__campaign_region_report_date_day"], "alias": "not_null_snapchat_ads__campaign_region_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.2590125, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__campaign_region_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__campaign_region_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__campaign_region_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_region_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.snapchat_ads__campaign_region_report", "attached_node": "model.snapchat_ads.snapchat_ads__campaign_region_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('snapchat_ads__campaign_region_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_campaign_id.9b92b4f074": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__campaign_region_report_campaign_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__campaign_region_report_campaign_id.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_campaign_id.9b92b4f074", "fqn": ["snapchat_ads", "not_null_snapchat_ads__campaign_region_report_campaign_id"], "alias": "not_null_snapchat_ads__campaign_region_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.2614424, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__campaign_region_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__campaign_region_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__campaign_region_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_region_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.snapchat_ads__campaign_region_report", "attached_node": "model.snapchat_ads.snapchat_ads__campaign_region_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('snapchat_ads__campaign_region_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_region.041579919a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__campaign_region_report_region", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__campaign_region_report_region.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_region.041579919a", "fqn": ["snapchat_ads", "not_null_snapchat_ads__campaign_region_report_region"], "alias": "not_null_snapchat_ads__campaign_region_report_region", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.2638721, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__campaign_region_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__campaign_region_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__campaign_region_report_region.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect region\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_region_report\"\nwhere region is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "region", "file_key_name": "models.snapchat_ads__campaign_region_report", "attached_node": "model.snapchat_ads.snapchat_ads__campaign_region_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "region", "model": "{{ get_where_subquery(ref('snapchat_ads__campaign_region_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__ad_account_history__fivetran_synced.2d5dd77824": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__ad_account_history__fivetran_synced", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__ad_account_history__fivetran_synced.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__ad_account_history__fivetran_synced.2d5dd77824", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__ad_account_history__fivetran_synced"], "alias": "not_null_stg_snapchat_ads__ad_account_history__fivetran_synced", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.3182123, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_account_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__ad_account_history__fivetran_synced.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect _fivetran_synced\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_account_history\"\nwhere _fivetran_synced is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "_fivetran_synced", "file_key_name": "models.stg_snapchat_ads__ad_account_history", "attached_node": "model.snapchat_ads.stg_snapchat_ads__ad_account_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_fivetran_synced", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__ad_account_history')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__ad_account_history_ad_account_id.426d71d605": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__ad_account_history_ad_account_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__ad_account_history_ad_account_id.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__ad_account_history_ad_account_id.426d71d605", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__ad_account_history_ad_account_id"], "alias": "not_null_stg_snapchat_ads__ad_account_history_ad_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.3208535, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_account_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__ad_account_history_ad_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_account_history\"\nwhere ad_account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_account_id", "file_key_name": "models.stg_snapchat_ads__ad_account_history", "attached_node": "model.snapchat_ads.stg_snapchat_ads__ad_account_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_account_id", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__ad_account_history')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__ad_history__fivetran_synced.1607c70fda": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__ad_history__fivetran_synced", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__ad_history__fivetran_synced.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__ad_history__fivetran_synced.1607c70fda", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__ad_history__fivetran_synced"], "alias": "not_null_stg_snapchat_ads__ad_history__fivetran_synced", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.3233016, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__ad_history__fivetran_synced.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect _fivetran_synced\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_history\"\nwhere _fivetran_synced is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "_fivetran_synced", "file_key_name": "models.stg_snapchat_ads__ad_history", "attached_node": "model.snapchat_ads.stg_snapchat_ads__ad_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_fivetran_synced", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__ad_history')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__ad_history_ad_id.e9d367fd15": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__ad_history_ad_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__ad_history_ad_id.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__ad_history_ad_id.e9d367fd15", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__ad_history_ad_id"], "alias": "not_null_stg_snapchat_ads__ad_history_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.325749, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__ad_history_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_history\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_snapchat_ads__ad_history", "attached_node": "model.snapchat_ads.stg_snapchat_ads__ad_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__ad_history')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__ad_hourly_report_ad_id.7e763de19d": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__ad_hourly_report_ad_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__ad_hourly_report_ad_id.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__ad_hourly_report_ad_id.7e763de19d", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__ad_hourly_report_ad_id"], "alias": "not_null_stg_snapchat_ads__ad_hourly_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.3282502, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_hourly_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_hourly_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__ad_hourly_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_hourly_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_snapchat_ads__ad_hourly_report", "attached_node": "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__ad_hourly_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__ad_hourly_report_date_hour.666cda1cd7": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__ad_hourly_report_date_hour", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__ad_hourly_report_date_hour.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__ad_hourly_report_date_hour.666cda1cd7", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__ad_hourly_report_date_hour"], "alias": "not_null_stg_snapchat_ads__ad_hourly_report_date_hour", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.330723, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_hourly_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_hourly_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__ad_hourly_report_date_hour.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_hour\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_hourly_report\"\nwhere date_hour is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_hour", "file_key_name": "models.stg_snapchat_ads__ad_hourly_report", "attached_node": "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_hour", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__ad_hourly_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_history__fivetran_synced.7ed7d105ae": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__ad_squad_history__fivetran_synced", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__ad_squad_history__fivetran_synced.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_history__fivetran_synced.7ed7d105ae", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__ad_squad_history__fivetran_synced"], "alias": "not_null_stg_snapchat_ads__ad_squad_history__fivetran_synced", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.333132, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_squad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__ad_squad_history__fivetran_synced.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect _fivetran_synced\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_history\"\nwhere _fivetran_synced is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "_fivetran_synced", "file_key_name": "models.stg_snapchat_ads__ad_squad_history", "attached_node": "model.snapchat_ads.stg_snapchat_ads__ad_squad_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_fivetran_synced", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__ad_squad_history')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_history_ad_squad_id.71c7122278": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__ad_squad_history_ad_squad_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__ad_squad_history_ad_squad_id.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_history_ad_squad_id.71c7122278", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__ad_squad_history_ad_squad_id"], "alias": "not_null_stg_snapchat_ads__ad_squad_history_ad_squad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.335547, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_squad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__ad_squad_history_ad_squad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_squad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_history\"\nwhere ad_squad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_squad_id", "file_key_name": "models.stg_snapchat_ads__ad_squad_history", "attached_node": "model.snapchat_ads.stg_snapchat_ads__ad_squad_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_squad_id", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__ad_squad_history')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_hourly_report_ad_squad_id.ab16aa72c9": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__ad_squad_hourly_report_ad_squad_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__ad_squad_hourly_report_ad_squad_id.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_hourly_report_ad_squad_id.ab16aa72c9", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__ad_squad_hourly_report_ad_squad_id"], "alias": "not_null_stg_snapchat_ads__ad_squad_hourly_report_ad_squad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.3380308, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_squad_hourly_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__ad_squad_hourly_report_ad_squad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_squad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_hourly_report\"\nwhere ad_squad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_squad_id", "file_key_name": "models.stg_snapchat_ads__ad_squad_hourly_report", "attached_node": "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_squad_id", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__ad_squad_hourly_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_hourly_report_date_hour.6f0b63a9cb": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__ad_squad_hourly_report_date_hour", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__ad_squad_hourly_report_date_hour.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_hourly_report_date_hour.6f0b63a9cb", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__ad_squad_hourly_report_date_hour"], "alias": "not_null_stg_snapchat_ads__ad_squad_hourly_report_date_hour", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.3404703, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_squad_hourly_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__ad_squad_hourly_report_date_hour.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_hour\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_hourly_report\"\nwhere date_hour is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_hour", "file_key_name": "models.stg_snapchat_ads__ad_squad_hourly_report", "attached_node": "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_hour", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__ad_squad_hourly_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_history__fivetran_synced.55bc48b3ec": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__campaign_history__fivetran_synced", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__campaign_history__fivetran_synced.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_history__fivetran_synced.55bc48b3ec", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__campaign_history__fivetran_synced"], "alias": "not_null_stg_snapchat_ads__campaign_history__fivetran_synced", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.3429039, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__campaign_history__fivetran_synced.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect _fivetran_synced\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_history\"\nwhere _fivetran_synced is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "_fivetran_synced", "file_key_name": "models.stg_snapchat_ads__campaign_history", "attached_node": "model.snapchat_ads.stg_snapchat_ads__campaign_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_fivetran_synced", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__campaign_history')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_history_campaign_id.f74a0fb8c0": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__campaign_history_campaign_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__campaign_history_campaign_id.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_history_campaign_id.f74a0fb8c0", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__campaign_history_campaign_id"], "alias": "not_null_stg_snapchat_ads__campaign_history_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.345309, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__campaign_history_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_history\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_snapchat_ads__campaign_history", "attached_node": "model.snapchat_ads.stg_snapchat_ads__campaign_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__campaign_history')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_hourly_report_campaign_id.f255c38a3e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__campaign_hourly_report_campaign_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__campaign_hourly_report_campaign_id.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_hourly_report_campaign_id.f255c38a3e", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__campaign_hourly_report_campaign_id"], "alias": "not_null_stg_snapchat_ads__campaign_hourly_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.3477428, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_hourly_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__campaign_hourly_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_hourly_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_snapchat_ads__campaign_hourly_report", "attached_node": "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__campaign_hourly_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_hourly_report_date_hour.0bc4218ac8": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__campaign_hourly_report_date_hour", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__campaign_hourly_report_date_hour.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_hourly_report_date_hour.0bc4218ac8", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__campaign_hourly_report_date_hour"], "alias": "not_null_stg_snapchat_ads__campaign_hourly_report_date_hour", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.3502643, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_hourly_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__campaign_hourly_report_date_hour.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_hour\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_hourly_report\"\nwhere date_hour is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_hour", "file_key_name": "models.stg_snapchat_ads__campaign_hourly_report", "attached_node": "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_hour", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__campaign_hourly_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__creative_history__fivetran_synced.b9c95b4380": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__creative_history__fivetran_synced", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__creative_history__fivetran_synced.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__creative_history__fivetran_synced.b9c95b4380", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__creative_history__fivetran_synced"], "alias": "not_null_stg_snapchat_ads__creative_history__fivetran_synced", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.3527193, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__creative_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__creative_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__creative_history__fivetran_synced.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect _fivetran_synced\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_history\"\nwhere _fivetran_synced is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "_fivetran_synced", "file_key_name": "models.stg_snapchat_ads__creative_history", "attached_node": "model.snapchat_ads.stg_snapchat_ads__creative_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_fivetran_synced", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__creative_history')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__creative_history_creative_id.09c83690f4": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__creative_history_creative_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__creative_history_creative_id.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__creative_history_creative_id.09c83690f4", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__creative_history_creative_id"], "alias": "not_null_stg_snapchat_ads__creative_history_creative_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.3551412, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__creative_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__creative_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__creative_history_creative_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect creative_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_history\"\nwhere creative_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "creative_id", "file_key_name": "models.stg_snapchat_ads__creative_history", "attached_node": "model.snapchat_ads.stg_snapchat_ads__creative_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "creative_id", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__creative_history')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__creative_url_tag_history_creative_id.7ff6bb9c1b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__creative_url_tag_history_creative_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__creative_url_tag_history_creative_id.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__creative_url_tag_history_creative_id.7ff6bb9c1b", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__creative_url_tag_history_creative_id"], "alias": "not_null_stg_snapchat_ads__creative_url_tag_history_creative_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.3576624, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__creative_url_tag_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__creative_url_tag_history_creative_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect creative_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_url_tag_history\"\nwhere creative_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "creative_id", "file_key_name": "models.stg_snapchat_ads__creative_url_tag_history", "attached_node": "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "creative_id", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__creative_url_tag_history')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_campaign_id.1b07be54fe": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__campaign_geo_country_daily_report_campaign_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__cam_c531bc4cfae6ac93ea3b7f505e38db6f.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_campaign_id.1b07be54fe", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__campaign_geo_country_daily_report_campaign_id"], "alias": "not_null_stg_snapchat_ads__cam_c531bc4cfae6ac93ea3b7f505e38db6f", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_snapchat_ads__cam_c531bc4cfae6ac93ea3b7f505e38db6f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_snapchat_ads__cam_c531bc4cfae6ac93ea3b7f505e38db6f"}, "created_at": 1783450504.3602405, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_snapchat_ads__cam_c531bc4cfae6ac93ea3b7f505e38db6f\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_geo_country_daily_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__cam_c531bc4cfae6ac93ea3b7f505e38db6f.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_geo_country_daily_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_snapchat_ads__campaign_geo_country_daily_report", "attached_node": "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__campaign_geo_country_daily_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_country.34db53b159": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__campaign_geo_country_daily_report_country", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__cam_409ae8ef0a41706ac936bf4e5d45ebc0.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_country.34db53b159", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__campaign_geo_country_daily_report_country"], "alias": "not_null_stg_snapchat_ads__cam_409ae8ef0a41706ac936bf4e5d45ebc0", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_snapchat_ads__cam_409ae8ef0a41706ac936bf4e5d45ebc0", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_snapchat_ads__cam_409ae8ef0a41706ac936bf4e5d45ebc0"}, "created_at": 1783450504.3627527, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_snapchat_ads__cam_409ae8ef0a41706ac936bf4e5d45ebc0\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_geo_country_daily_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__cam_409ae8ef0a41706ac936bf4e5d45ebc0.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect country\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_geo_country_daily_report\"\nwhere country is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "country", "file_key_name": "models.stg_snapchat_ads__campaign_geo_country_daily_report", "attached_node": "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "country", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__campaign_geo_country_daily_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_date_day.d3d7dd7af1": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__campaign_geo_country_daily_report_date_day", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__cam_95bf2c1bccb5bb16d3b01c6875d4e36b.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_date_day.d3d7dd7af1", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__campaign_geo_country_daily_report_date_day"], "alias": "not_null_stg_snapchat_ads__cam_95bf2c1bccb5bb16d3b01c6875d4e36b", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_snapchat_ads__cam_95bf2c1bccb5bb16d3b01c6875d4e36b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_snapchat_ads__cam_95bf2c1bccb5bb16d3b01c6875d4e36b"}, "created_at": 1783450504.365199, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_snapchat_ads__cam_95bf2c1bccb5bb16d3b01c6875d4e36b\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_geo_country_daily_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__cam_95bf2c1bccb5bb16d3b01c6875d4e36b.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_geo_country_daily_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_snapchat_ads__campaign_geo_country_daily_report", "attached_node": "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__campaign_geo_country_daily_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_campaign_id.99fbccb78d": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__campaign_geo_region_daily_report_campaign_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__cam_530712a440410eb91fb3d99e8431a9f8.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_campaign_id.99fbccb78d", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__campaign_geo_region_daily_report_campaign_id"], "alias": "not_null_stg_snapchat_ads__cam_530712a440410eb91fb3d99e8431a9f8", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_snapchat_ads__cam_530712a440410eb91fb3d99e8431a9f8", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_snapchat_ads__cam_530712a440410eb91fb3d99e8431a9f8"}, "created_at": 1783450504.3677044, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_snapchat_ads__cam_530712a440410eb91fb3d99e8431a9f8\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_geo_region_daily_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__cam_530712a440410eb91fb3d99e8431a9f8.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_geo_region_daily_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_snapchat_ads__campaign_geo_region_daily_report", "attached_node": "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__campaign_geo_region_daily_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_region.44327f07bf": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__campaign_geo_region_daily_report_region", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__cam_cf0d460ca2173737e9e44f3e224da27b.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_region.44327f07bf", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__campaign_geo_region_daily_report_region"], "alias": "not_null_stg_snapchat_ads__cam_cf0d460ca2173737e9e44f3e224da27b", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_snapchat_ads__cam_cf0d460ca2173737e9e44f3e224da27b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_snapchat_ads__cam_cf0d460ca2173737e9e44f3e224da27b"}, "created_at": 1783450504.3707597, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_snapchat_ads__cam_cf0d460ca2173737e9e44f3e224da27b\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_geo_region_daily_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__cam_cf0d460ca2173737e9e44f3e224da27b.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect region\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_geo_region_daily_report\"\nwhere region is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "region", "file_key_name": "models.stg_snapchat_ads__campaign_geo_region_daily_report", "attached_node": "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "region", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__campaign_geo_region_daily_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_date_day.eec50e6826": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__campaign_geo_region_daily_report_date_day", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__cam_d9fbe46cdf21c0531cc37d0e0d471c95.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_date_day.eec50e6826", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__campaign_geo_region_daily_report_date_day"], "alias": "not_null_stg_snapchat_ads__cam_d9fbe46cdf21c0531cc37d0e0d471c95", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_snapchat_ads__cam_d9fbe46cdf21c0531cc37d0e0d471c95", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_snapchat_ads__cam_d9fbe46cdf21c0531cc37d0e0d471c95"}, "created_at": 1783450504.3732219, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_snapchat_ads__cam_d9fbe46cdf21c0531cc37d0e0d471c95\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_geo_region_daily_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__cam_d9fbe46cdf21c0531cc37d0e0d471c95.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_geo_region_daily_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_snapchat_ads__campaign_geo_region_daily_report", "attached_node": "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__campaign_geo_region_daily_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__url_report_date_day.b09048037e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__url_report_date_day", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__url_report_date_day.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__url_report_date_day.b09048037e", "fqn": ["pinterest", "not_null_pinterest_ads__url_report_date_day"], "alias": "not_null_pinterest_ads__url_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.4114704, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__url_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__url_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__url_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.pinterest_ads__url_report", "attached_node": "model.pinterest.pinterest_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('pinterest_ads__url_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__url_report_destination_url.0bb7f30502": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__url_report_destination_url", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__url_report_destination_url.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__url_report_destination_url.0bb7f30502", "fqn": ["pinterest", "not_null_pinterest_ads__url_report_destination_url"], "alias": "not_null_pinterest_ads__url_report_destination_url", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"enabled": true}, "created_at": 1783450504.4147294, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(enabled=True) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__url_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__url_report_destination_url.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect destination_url\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__url_report\"\nwhere destination_url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "destination_url", "file_key_name": "models.pinterest_ads__url_report", "attached_node": "model.pinterest.pinterest_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "destination_url", "model": "{{ get_where_subquery(ref('pinterest_ads__url_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__url_report_pin_promotion_id.0da711ad6a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__url_report_pin_promotion_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__url_report_pin_promotion_id.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__url_report_pin_promotion_id.0da711ad6a", "fqn": ["pinterest", "not_null_pinterest_ads__url_report_pin_promotion_id"], "alias": "not_null_pinterest_ads__url_report_pin_promotion_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.5344322, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__url_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__url_report_pin_promotion_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect pin_promotion_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__url_report\"\nwhere pin_promotion_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "pin_promotion_id", "file_key_name": "models.pinterest_ads__url_report", "attached_node": "model.pinterest.pinterest_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "pin_promotion_id", "model": "{{ get_where_subquery(ref('pinterest_ads__url_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__ad_group_report_date_day.ed7c27b8a7": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__ad_group_report_date_day", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__ad_group_report_date_day.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__ad_group_report_date_day.ed7c27b8a7", "fqn": ["pinterest", "not_null_pinterest_ads__ad_group_report_date_day"], "alias": "not_null_pinterest_ads__ad_group_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.5370352, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__ad_group_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__ad_group_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__ad_group_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.pinterest_ads__ad_group_report", "attached_node": "model.pinterest.pinterest_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('pinterest_ads__ad_group_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__ad_group_report_ad_group_id.134f9ac6c2": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__ad_group_report_ad_group_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__ad_group_report_ad_group_id.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__ad_group_report_ad_group_id.134f9ac6c2", "fqn": ["pinterest", "not_null_pinterest_ads__ad_group_report_ad_group_id"], "alias": "not_null_pinterest_ads__ad_group_report_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.5395067, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__ad_group_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__ad_group_report_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__ad_group_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.pinterest_ads__ad_group_report", "attached_node": "model.pinterest.pinterest_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('pinterest_ads__ad_group_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__campaign_report_date_day.10ac8272bf": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__campaign_report_date_day", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__campaign_report_date_day.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__campaign_report_date_day.10ac8272bf", "fqn": ["pinterest", "not_null_pinterest_ads__campaign_report_date_day"], "alias": "not_null_pinterest_ads__campaign_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.541951, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__campaign_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__campaign_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.pinterest_ads__campaign_report", "attached_node": "model.pinterest.pinterest_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('pinterest_ads__campaign_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__campaign_report_campaign_id.8001ea60f2": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__campaign_report_campaign_id.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__campaign_report_campaign_id.8001ea60f2", "fqn": ["pinterest", "not_null_pinterest_ads__campaign_report_campaign_id"], "alias": "not_null_pinterest_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.5444741, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__campaign_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.pinterest_ads__campaign_report", "attached_node": "model.pinterest.pinterest_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('pinterest_ads__campaign_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__advertiser_report_date_day.aedeceeeca": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__advertiser_report_date_day", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__advertiser_report_date_day.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__advertiser_report_date_day.aedeceeeca", "fqn": ["pinterest", "not_null_pinterest_ads__advertiser_report_date_day"], "alias": "not_null_pinterest_ads__advertiser_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.5469015, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__advertiser_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__advertiser_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__advertiser_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__advertiser_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.pinterest_ads__advertiser_report", "attached_node": "model.pinterest.pinterest_ads__advertiser_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('pinterest_ads__advertiser_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__advertiser_report_advertiser_id.13380f0672": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__advertiser_report_advertiser_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__advertiser_report_advertiser_id.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__advertiser_report_advertiser_id.13380f0672", "fqn": ["pinterest", "not_null_pinterest_ads__advertiser_report_advertiser_id"], "alias": "not_null_pinterest_ads__advertiser_report_advertiser_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.549308, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__advertiser_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__advertiser_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__advertiser_report_advertiser_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect advertiser_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__advertiser_report\"\nwhere advertiser_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "advertiser_id", "file_key_name": "models.pinterest_ads__advertiser_report", "attached_node": "model.pinterest.pinterest_ads__advertiser_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "advertiser_id", "model": "{{ get_where_subquery(ref('pinterest_ads__advertiser_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__keyword_report_date_day.23130e9fba": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__keyword_report_date_day", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__keyword_report_date_day.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__keyword_report_date_day.23130e9fba", "fqn": ["pinterest", "not_null_pinterest_ads__keyword_report_date_day"], "alias": "not_null_pinterest_ads__keyword_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.551762, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__keyword_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__keyword_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__keyword_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.pinterest_ads__keyword_report", "attached_node": "model.pinterest.pinterest_ads__keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('pinterest_ads__keyword_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__keyword_report_keyword_id.0d73460198": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__keyword_report_keyword_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__keyword_report_keyword_id.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__keyword_report_keyword_id.0d73460198", "fqn": ["pinterest", "not_null_pinterest_ads__keyword_report_keyword_id"], "alias": "not_null_pinterest_ads__keyword_report_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.5542727, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__keyword_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__keyword_report_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__keyword_report\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.pinterest_ads__keyword_report", "attached_node": "model.pinterest.pinterest_ads__keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('pinterest_ads__keyword_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__pin_promotion_report_date_day.3128d28cfd": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__pin_promotion_report_date_day", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__pin_promotion_report_date_day.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__pin_promotion_report_date_day.3128d28cfd", "fqn": ["pinterest", "not_null_pinterest_ads__pin_promotion_report_date_day"], "alias": "not_null_pinterest_ads__pin_promotion_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.5567412, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__pin_promotion_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__pin_promotion_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__pin_promotion_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__pin_promotion_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.pinterest_ads__pin_promotion_report", "attached_node": "model.pinterest.pinterest_ads__pin_promotion_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('pinterest_ads__pin_promotion_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__pin_promotion_report_pin_promotion_id.2540e0a561": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__pin_promotion_report_pin_promotion_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__pin_promotion_report_pin_promotion_id.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__pin_promotion_report_pin_promotion_id.2540e0a561", "fqn": ["pinterest", "not_null_pinterest_ads__pin_promotion_report_pin_promotion_id"], "alias": "not_null_pinterest_ads__pin_promotion_report_pin_promotion_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.559136, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__pin_promotion_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__pin_promotion_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__pin_promotion_report_pin_promotion_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect pin_promotion_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__pin_promotion_report\"\nwhere pin_promotion_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "pin_promotion_id", "file_key_name": "models.pinterest_ads__pin_promotion_report", "attached_node": "model.pinterest.pinterest_ads__pin_promotion_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "pin_promotion_id", "model": "{{ get_where_subquery(ref('pinterest_ads__pin_promotion_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__campaign_country_report_date_day.a9da473d38": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__campaign_country_report_date_day", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__campaign_country_report_date_day.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__campaign_country_report_date_day.a9da473d38", "fqn": ["pinterest", "not_null_pinterest_ads__campaign_country_report_date_day"], "alias": "not_null_pinterest_ads__campaign_country_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.561745, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__campaign_country_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__campaign_country_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_country_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.pinterest_ads__campaign_country_report", "attached_node": "model.pinterest.pinterest_ads__campaign_country_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('pinterest_ads__campaign_country_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__campaign_country_report_campaign_id.9b1d309d2b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__campaign_country_report_campaign_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__campaign_country_report_campaign_id.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__campaign_country_report_campaign_id.9b1d309d2b", "fqn": ["pinterest", "not_null_pinterest_ads__campaign_country_report_campaign_id"], "alias": "not_null_pinterest_ads__campaign_country_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.5645864, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__campaign_country_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__campaign_country_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_country_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.pinterest_ads__campaign_country_report", "attached_node": "model.pinterest.pinterest_ads__campaign_country_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('pinterest_ads__campaign_country_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__campaign_region_report_date_day.e81588bc6e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__campaign_region_report_date_day", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__campaign_region_report_date_day.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__campaign_region_report_date_day.e81588bc6e", "fqn": ["pinterest", "not_null_pinterest_ads__campaign_region_report_date_day"], "alias": "not_null_pinterest_ads__campaign_region_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.5670214, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__campaign_region_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__campaign_region_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__campaign_region_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_region_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.pinterest_ads__campaign_region_report", "attached_node": "model.pinterest.pinterest_ads__campaign_region_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('pinterest_ads__campaign_region_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__campaign_region_report_campaign_id.1a64423d71": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__campaign_region_report_campaign_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__campaign_region_report_campaign_id.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__campaign_region_report_campaign_id.1a64423d71", "fqn": ["pinterest", "not_null_pinterest_ads__campaign_region_report_campaign_id"], "alias": "not_null_pinterest_ads__campaign_region_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.5694513, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__campaign_region_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__campaign_region_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__campaign_region_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_region_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.pinterest_ads__campaign_region_report", "attached_node": "model.pinterest.pinterest_ads__campaign_region_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('pinterest_ads__campaign_region_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__ad_group_history_ad_group_id.220c6220be": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__ad_group_history_ad_group_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__ad_group_history_ad_group_id.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__ad_group_history_ad_group_id.220c6220be", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__ad_group_history_ad_group_id"], "alias": "not_null_stg_pinterest_ads__ad_group_history_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.6226954, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__ad_group_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__ad_group_history"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__ad_group_history_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__ad_group_history\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_pinterest_ads__ad_group_history", "attached_node": "model.pinterest.stg_pinterest_ads__ad_group_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__ad_group_history')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__campaign_history_campaign_id.60cb10d341": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__campaign_history_campaign_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__campaign_history_campaign_id.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__campaign_history_campaign_id.60cb10d341", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__campaign_history_campaign_id"], "alias": "not_null_stg_pinterest_ads__campaign_history_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.6253, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__campaign_history"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__campaign_history_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_history\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_pinterest_ads__campaign_history", "attached_node": "model.pinterest.stg_pinterest_ads__campaign_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__campaign_history')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_history_pin_promotion_id.171995cd34": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__pin_promotion_history_pin_promotion_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__pi_5cf03dfc3d2615f9d68ae62d55aa2b8f.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_history_pin_promotion_id.171995cd34", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__pin_promotion_history_pin_promotion_id"], "alias": "not_null_stg_pinterest_ads__pi_5cf03dfc3d2615f9d68ae62d55aa2b8f", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_pinterest_ads__pi_5cf03dfc3d2615f9d68ae62d55aa2b8f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_pinterest_ads__pi_5cf03dfc3d2615f9d68ae62d55aa2b8f"}, "created_at": 1783450504.6278095, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_pinterest_ads__pi_5cf03dfc3d2615f9d68ae62d55aa2b8f\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__pin_promotion_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__pin_promotion_history"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__pi_5cf03dfc3d2615f9d68ae62d55aa2b8f.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect pin_promotion_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_history\"\nwhere pin_promotion_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "pin_promotion_id", "file_key_name": "models.stg_pinterest_ads__pin_promotion_history", "attached_node": "model.pinterest.stg_pinterest_ads__pin_promotion_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "pin_promotion_id", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__pin_promotion_history')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_report_date_day.ed272212a1": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__pin_promotion_report_date_day", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__pin_promotion_report_date_day.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_report_date_day.ed272212a1", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__pin_promotion_report_date_day"], "alias": "not_null_stg_pinterest_ads__pin_promotion_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.6303322, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__pin_promotion_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__pin_promotion_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__pin_promotion_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_pinterest_ads__pin_promotion_report", "attached_node": "model.pinterest.stg_pinterest_ads__pin_promotion_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__pin_promotion_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_report_pin_promotion_id.9c3c9f71ab": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__pin_promotion_report_pin_promotion_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__pi_d0985f4b7b2bc6d5ec7f384cc03d6f4b.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_report_pin_promotion_id.9c3c9f71ab", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__pin_promotion_report_pin_promotion_id"], "alias": "not_null_stg_pinterest_ads__pi_d0985f4b7b2bc6d5ec7f384cc03d6f4b", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_pinterest_ads__pi_d0985f4b7b2bc6d5ec7f384cc03d6f4b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_pinterest_ads__pi_d0985f4b7b2bc6d5ec7f384cc03d6f4b"}, "created_at": 1783450504.6327965, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_pinterest_ads__pi_d0985f4b7b2bc6d5ec7f384cc03d6f4b\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__pin_promotion_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__pin_promotion_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__pi_d0985f4b7b2bc6d5ec7f384cc03d6f4b.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect pin_promotion_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_report\"\nwhere pin_promotion_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "pin_promotion_id", "file_key_name": "models.stg_pinterest_ads__pin_promotion_report", "attached_node": "model.pinterest.stg_pinterest_ads__pin_promotion_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "pin_promotion_id", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__pin_promotion_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__ad_group_report_date_day.80e8904c4c": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__ad_group_report_date_day", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__ad_group_report_date_day.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__ad_group_report_date_day.80e8904c4c", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__ad_group_report_date_day"], "alias": "not_null_stg_pinterest_ads__ad_group_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.635201, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__ad_group_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__ad_group_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__ad_group_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_pinterest_ads__ad_group_report", "attached_node": "model.pinterest.stg_pinterest_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__ad_group_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__ad_group_report_ad_group_id.bb8cf3c471": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__ad_group_report_ad_group_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__ad_group_report_ad_group_id.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__ad_group_report_ad_group_id.bb8cf3c471", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__ad_group_report_ad_group_id"], "alias": "not_null_stg_pinterest_ads__ad_group_report_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.6376612, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__ad_group_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__ad_group_report_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__ad_group_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_pinterest_ads__ad_group_report", "attached_node": "model.pinterest.stg_pinterest_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__ad_group_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__advertiser_history_advertiser_id.7d24f665fb": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__advertiser_history_advertiser_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__advertiser_history_advertiser_id.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__advertiser_history_advertiser_id.7d24f665fb", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__advertiser_history_advertiser_id"], "alias": "not_null_stg_pinterest_ads__advertiser_history_advertiser_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.640077, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__advertiser_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__advertiser_history"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__advertiser_history_advertiser_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect advertiser_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_history\"\nwhere advertiser_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "advertiser_id", "file_key_name": "models.stg_pinterest_ads__advertiser_history", "attached_node": "model.pinterest.stg_pinterest_ads__advertiser_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "advertiser_id", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__advertiser_history')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__advertiser_report_date_day.153bd03c95": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__advertiser_report_date_day", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__advertiser_report_date_day.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__advertiser_report_date_day.153bd03c95", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__advertiser_report_date_day"], "alias": "not_null_stg_pinterest_ads__advertiser_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.6428838, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__advertiser_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__advertiser_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__advertiser_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_pinterest_ads__advertiser_report", "attached_node": "model.pinterest.stg_pinterest_ads__advertiser_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__advertiser_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__advertiser_report_advertiser_id.1b16ed73ff": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__advertiser_report_advertiser_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__advertiser_report_advertiser_id.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__advertiser_report_advertiser_id.1b16ed73ff", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__advertiser_report_advertiser_id"], "alias": "not_null_stg_pinterest_ads__advertiser_report_advertiser_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.6453698, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__advertiser_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__advertiser_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__advertiser_report_advertiser_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect advertiser_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_report\"\nwhere advertiser_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "advertiser_id", "file_key_name": "models.stg_pinterest_ads__advertiser_report", "attached_node": "model.pinterest.stg_pinterest_ads__advertiser_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "advertiser_id", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__advertiser_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__campaign_report_date_day.7ef5fb1238": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__campaign_report_date_day", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__campaign_report_date_day.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__campaign_report_date_day.7ef5fb1238", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__campaign_report_date_day"], "alias": "not_null_stg_pinterest_ads__campaign_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.64792, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__campaign_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__campaign_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_pinterest_ads__campaign_report", "attached_node": "model.pinterest.stg_pinterest_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__campaign_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__campaign_report_campaign_id.a287eba0fc": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__campaign_report_campaign_id.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__campaign_report_campaign_id.a287eba0fc", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__campaign_report_campaign_id"], "alias": "not_null_stg_pinterest_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.6503499, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__campaign_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_pinterest_ads__campaign_report", "attached_node": "model.pinterest.stg_pinterest_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__campaign_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__keyword_history_keyword_id.246889377a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__keyword_history_keyword_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__keyword_history_keyword_id.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__keyword_history_keyword_id.246889377a", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__keyword_history_keyword_id"], "alias": "not_null_stg_pinterest_ads__keyword_history_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.652901, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__keyword_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__keyword_history"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__keyword_history_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__keyword_history\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.stg_pinterest_ads__keyword_history", "attached_node": "model.pinterest.stg_pinterest_ads__keyword_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__keyword_history')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__keyword_report_date_day.9937216300": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__keyword_report_date_day", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__keyword_report_date_day.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__keyword_report_date_day.9937216300", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__keyword_report_date_day"], "alias": "not_null_stg_pinterest_ads__keyword_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.655312, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__keyword_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__keyword_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__keyword_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_pinterest_ads__keyword_report", "attached_node": "model.pinterest.stg_pinterest_ads__keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__keyword_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__keyword_report_keyword_id.5f00679c48": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__keyword_report_keyword_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__keyword_report_keyword_id.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__keyword_report_keyword_id.5f00679c48", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__keyword_report_keyword_id"], "alias": "not_null_stg_pinterest_ads__keyword_report_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.6577475, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__keyword_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__keyword_report_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__keyword_report\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.stg_pinterest_ads__keyword_report", "attached_node": "model.pinterest.stg_pinterest_ads__keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__keyword_report')) }}"}, "namespace": null}}, "test.google_ads.not_null_google_ads__url_report_base_url.e3578c0f72": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_google_ads__url_report_base_url", "resource_type": "test", "package_name": "google_ads", "path": "not_null_google_ads__url_report_base_url.sql", "original_file_path": "models/google_ads.yml", "unique_id": "test.google_ads.not_null_google_ads__url_report_base_url.e3578c0f72", "fqn": ["google_ads", "not_null_google_ads__url_report_base_url"], "alias": "not_null_google_ads__url_report_base_url", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"enabled": true}, "created_at": 1783450504.708264, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(enabled=True) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.google_ads__url_report"]}, "compiled_path": "target/compiled/google_ads/models/google_ads.yml/not_null_google_ads__url_report_base_url.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect base_url\nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__url_report\"\nwhere base_url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "base_url", "file_key_name": "models.google_ads__url_report", "attached_node": "model.google_ads.google_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "base_url", "model": "{{ get_where_subquery(ref('google_ads__url_report')) }}"}, "namespace": null}}, "test.google_ads.not_null_google_ads__account_report_account_id.abb0985422": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_google_ads__account_report_account_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_google_ads__account_report_account_id.sql", "original_file_path": "models/google_ads.yml", "unique_id": "test.google_ads.not_null_google_ads__account_report_account_id.abb0985422", "fqn": ["google_ads", "not_null_google_ads__account_report_account_id"], "alias": "not_null_google_ads__account_report_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.7110128, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.google_ads__account_report"]}, "compiled_path": "target/compiled/google_ads/models/google_ads.yml/not_null_google_ads__account_report_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__account_report\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.google_ads__account_report", "attached_node": "model.google_ads.google_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('google_ads__account_report')) }}"}, "namespace": null}}, "test.google_ads.not_null_google_ads__ad_group_report_ad_group_id.c186523c0c": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_google_ads__ad_group_report_ad_group_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_google_ads__ad_group_report_ad_group_id.sql", "original_file_path": "models/google_ads.yml", "unique_id": "test.google_ads.not_null_google_ads__ad_group_report_ad_group_id.c186523c0c", "fqn": ["google_ads", "not_null_google_ads__ad_group_report_ad_group_id"], "alias": "not_null_google_ads__ad_group_report_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.7134736, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.google_ads__ad_group_report"]}, "compiled_path": "target/compiled/google_ads/models/google_ads.yml/not_null_google_ads__ad_group_report_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__ad_group_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.google_ads__ad_group_report", "attached_node": "model.google_ads.google_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('google_ads__ad_group_report')) }}"}, "namespace": null}}, "test.google_ads.not_null_google_ads__ad_report_ad_id.7bd6a287ad": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_google_ads__ad_report_ad_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_google_ads__ad_report_ad_id.sql", "original_file_path": "models/google_ads.yml", "unique_id": "test.google_ads.not_null_google_ads__ad_report_ad_id.7bd6a287ad", "fqn": ["google_ads", "not_null_google_ads__ad_report_ad_id"], "alias": "not_null_google_ads__ad_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.7159183, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.google_ads__ad_report"]}, "compiled_path": "target/compiled/google_ads/models/google_ads.yml/not_null_google_ads__ad_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__ad_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.google_ads__ad_report", "attached_node": "model.google_ads.google_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('google_ads__ad_report')) }}"}, "namespace": null}}, "test.google_ads.not_null_google_ads__campaign_report_campaign_id.cc6694fa0e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_google_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_google_ads__campaign_report_campaign_id.sql", "original_file_path": "models/google_ads.yml", "unique_id": "test.google_ads.not_null_google_ads__campaign_report_campaign_id.cc6694fa0e", "fqn": ["google_ads", "not_null_google_ads__campaign_report_campaign_id"], "alias": "not_null_google_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.7183535, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.google_ads__campaign_report"]}, "compiled_path": "target/compiled/google_ads/models/google_ads.yml/not_null_google_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.google_ads__campaign_report", "attached_node": "model.google_ads.google_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('google_ads__campaign_report')) }}"}, "namespace": null}}, "test.google_ads.not_null_google_ads__keyword_report_criterion_id.4cab66a055": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_google_ads__keyword_report_criterion_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_google_ads__keyword_report_criterion_id.sql", "original_file_path": "models/google_ads.yml", "unique_id": "test.google_ads.not_null_google_ads__keyword_report_criterion_id.4cab66a055", "fqn": ["google_ads", "not_null_google_ads__keyword_report_criterion_id"], "alias": "not_null_google_ads__keyword_report_criterion_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.7208252, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.google_ads__keyword_report"]}, "compiled_path": "target/compiled/google_ads/models/google_ads.yml/not_null_google_ads__keyword_report_criterion_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect criterion_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__keyword_report\"\nwhere criterion_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "criterion_id", "file_key_name": "models.google_ads__keyword_report", "attached_node": "model.google_ads.google_ads__keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "criterion_id", "model": "{{ get_where_subquery(ref('google_ads__keyword_report')) }}"}, "namespace": null}}, "test.google_ads.unique_google_ads__campaign_bid_modifiers_report_bid_modifier_report_key.d68443174a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "unique_google_ads__campaign_bid_modifiers_report_bid_modifier_report_key", "resource_type": "test", "package_name": "google_ads", "path": "unique_google_ads__campaign_bi_91883b1465a6678a36c4106b02a8ae1e.sql", "original_file_path": "models/google_ads.yml", "unique_id": "test.google_ads.unique_google_ads__campaign_bid_modifiers_report_bid_modifier_report_key.d68443174a", "fqn": ["google_ads", "unique_google_ads__campaign_bid_modifiers_report_bid_modifier_report_key"], "alias": "unique_google_ads__campaign_bi_91883b1465a6678a36c4106b02a8ae1e", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "unique_google_ads__campaign_bi_91883b1465a6678a36c4106b02a8ae1e", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "unique_google_ads__campaign_bi_91883b1465a6678a36c4106b02a8ae1e"}, "created_at": 1783450504.723357, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}{{ config(alias=\"unique_google_ads__campaign_bi_91883b1465a6678a36c4106b02a8ae1e\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__campaign_bid_modifiers_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.google_ads__campaign_bid_modifiers_report"]}, "compiled_path": "target/compiled/google_ads/models/google_ads.yml/unique_google_ads__campaign_bi_91883b1465a6678a36c4106b02a8ae1e.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n bid_modifier_report_key as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__campaign_bid_modifiers_report\"\nwhere bid_modifier_report_key is not null\ngroup by bid_modifier_report_key\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "bid_modifier_report_key", "file_key_name": "models.google_ads__campaign_bid_modifiers_report", "attached_node": "model.google_ads.google_ads__campaign_bid_modifiers_report", "test_metadata": {"name": "unique", "kwargs": {"column_name": "bid_modifier_report_key", "model": "{{ get_where_subquery(ref('google_ads__campaign_bid_modifiers_report')) }}"}, "namespace": null}}, "test.google_ads.not_null_google_ads__campaign_bid_modifiers_report_bid_modifier_report_key.746ae8cfa3": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_google_ads__campaign_bid_modifiers_report_bid_modifier_report_key", "resource_type": "test", "package_name": "google_ads", "path": "not_null_google_ads__campaign__7623adbff6c2c83eee0c27709c46d7ac.sql", "original_file_path": "models/google_ads.yml", "unique_id": "test.google_ads.not_null_google_ads__campaign_bid_modifiers_report_bid_modifier_report_key.746ae8cfa3", "fqn": ["google_ads", "not_null_google_ads__campaign_bid_modifiers_report_bid_modifier_report_key"], "alias": "not_null_google_ads__campaign__7623adbff6c2c83eee0c27709c46d7ac", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_google_ads__campaign__7623adbff6c2c83eee0c27709c46d7ac", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_google_ads__campaign__7623adbff6c2c83eee0c27709c46d7ac"}, "created_at": 1783450504.725802, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_google_ads__campaign__7623adbff6c2c83eee0c27709c46d7ac\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__campaign_bid_modifiers_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.google_ads__campaign_bid_modifiers_report"]}, "compiled_path": "target/compiled/google_ads/models/google_ads.yml/not_null_google_ads__campaign__7623adbff6c2c83eee0c27709c46d7ac.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect bid_modifier_report_key\nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__campaign_bid_modifiers_report\"\nwhere bid_modifier_report_key is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "bid_modifier_report_key", "file_key_name": "models.google_ads__campaign_bid_modifiers_report", "attached_node": "model.google_ads.google_ads__campaign_bid_modifiers_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "bid_modifier_report_key", "model": "{{ get_where_subquery(ref('google_ads__campaign_bid_modifiers_report')) }}"}, "namespace": null}}, "test.google_ads.not_null_google_ads__campaign_bid_modifiers_report_campaign_id.68d212d025": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_google_ads__campaign_bid_modifiers_report_campaign_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_google_ads__campaign_bid_modifiers_report_campaign_id.sql", "original_file_path": "models/google_ads.yml", "unique_id": "test.google_ads.not_null_google_ads__campaign_bid_modifiers_report_campaign_id.68d212d025", "fqn": ["google_ads", "not_null_google_ads__campaign_bid_modifiers_report_campaign_id"], "alias": "not_null_google_ads__campaign_bid_modifiers_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.7282662, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__campaign_bid_modifiers_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.google_ads__campaign_bid_modifiers_report"]}, "compiled_path": "target/compiled/google_ads/models/google_ads.yml/not_null_google_ads__campaign_bid_modifiers_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__campaign_bid_modifiers_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.google_ads__campaign_bid_modifiers_report", "attached_node": "model.google_ads.google_ads__campaign_bid_modifiers_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('google_ads__campaign_bid_modifiers_report')) }}"}, "namespace": null}}, "test.google_ads.unique_google_ads__campaign_budget_diagnostics_report_budget_diagnostics_report_key.ca90f632f4": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "unique_google_ads__campaign_budget_diagnostics_report_budget_diagnostics_report_key", "resource_type": "test", "package_name": "google_ads", "path": "unique_google_ads__campaign_bu_1ddc6b7b2afd945b69982edba695581f.sql", "original_file_path": "models/google_ads.yml", "unique_id": "test.google_ads.unique_google_ads__campaign_budget_diagnostics_report_budget_diagnostics_report_key.ca90f632f4", "fqn": ["google_ads", "unique_google_ads__campaign_budget_diagnostics_report_budget_diagnostics_report_key"], "alias": "unique_google_ads__campaign_bu_1ddc6b7b2afd945b69982edba695581f", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "unique_google_ads__campaign_bu_1ddc6b7b2afd945b69982edba695581f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "unique_google_ads__campaign_bu_1ddc6b7b2afd945b69982edba695581f"}, "created_at": 1783450504.7307644, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}{{ config(alias=\"unique_google_ads__campaign_bu_1ddc6b7b2afd945b69982edba695581f\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__campaign_budget_diagnostics_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.google_ads__campaign_budget_diagnostics_report"]}, "compiled_path": "target/compiled/google_ads/models/google_ads.yml/unique_google_ads__campaign_bu_1ddc6b7b2afd945b69982edba695581f.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n budget_diagnostics_report_key as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__campaign_budget_diagnostics_report\"\nwhere budget_diagnostics_report_key is not null\ngroup by budget_diagnostics_report_key\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "budget_diagnostics_report_key", "file_key_name": "models.google_ads__campaign_budget_diagnostics_report", "attached_node": "model.google_ads.google_ads__campaign_budget_diagnostics_report", "test_metadata": {"name": "unique", "kwargs": {"column_name": "budget_diagnostics_report_key", "model": "{{ get_where_subquery(ref('google_ads__campaign_budget_diagnostics_report')) }}"}, "namespace": null}}, "test.google_ads.not_null_google_ads__campaign_budget_diagnostics_report_budget_diagnostics_report_key.c2c4d80aab": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_google_ads__campaign_budget_diagnostics_report_budget_diagnostics_report_key", "resource_type": "test", "package_name": "google_ads", "path": "not_null_google_ads__campaign__c82c9250f20cdabf740824419677e5af.sql", "original_file_path": "models/google_ads.yml", "unique_id": "test.google_ads.not_null_google_ads__campaign_budget_diagnostics_report_budget_diagnostics_report_key.c2c4d80aab", "fqn": ["google_ads", "not_null_google_ads__campaign_budget_diagnostics_report_budget_diagnostics_report_key"], "alias": "not_null_google_ads__campaign__c82c9250f20cdabf740824419677e5af", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_google_ads__campaign__c82c9250f20cdabf740824419677e5af", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_google_ads__campaign__c82c9250f20cdabf740824419677e5af"}, "created_at": 1783450504.733306, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_google_ads__campaign__c82c9250f20cdabf740824419677e5af\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__campaign_budget_diagnostics_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.google_ads__campaign_budget_diagnostics_report"]}, "compiled_path": "target/compiled/google_ads/models/google_ads.yml/not_null_google_ads__campaign__c82c9250f20cdabf740824419677e5af.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect budget_diagnostics_report_key\nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__campaign_budget_diagnostics_report\"\nwhere budget_diagnostics_report_key is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "budget_diagnostics_report_key", "file_key_name": "models.google_ads__campaign_budget_diagnostics_report", "attached_node": "model.google_ads.google_ads__campaign_budget_diagnostics_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "budget_diagnostics_report_key", "model": "{{ get_where_subquery(ref('google_ads__campaign_budget_diagnostics_report')) }}"}, "namespace": null}}, "test.google_ads.not_null_google_ads__campaign_budget_diagnostics_report_campaign_id.9a579bd702": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_google_ads__campaign_budget_diagnostics_report_campaign_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_google_ads__campaign__f0d04e6e07a495e7a3b44b3343e487e2.sql", "original_file_path": "models/google_ads.yml", "unique_id": "test.google_ads.not_null_google_ads__campaign_budget_diagnostics_report_campaign_id.9a579bd702", "fqn": ["google_ads", "not_null_google_ads__campaign_budget_diagnostics_report_campaign_id"], "alias": "not_null_google_ads__campaign__f0d04e6e07a495e7a3b44b3343e487e2", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_google_ads__campaign__f0d04e6e07a495e7a3b44b3343e487e2", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_google_ads__campaign__f0d04e6e07a495e7a3b44b3343e487e2"}, "created_at": 1783450504.735788, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_google_ads__campaign__f0d04e6e07a495e7a3b44b3343e487e2\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__campaign_budget_diagnostics_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.google_ads__campaign_budget_diagnostics_report"]}, "compiled_path": "target/compiled/google_ads/models/google_ads.yml/not_null_google_ads__campaign__f0d04e6e07a495e7a3b44b3343e487e2.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__campaign_budget_diagnostics_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.google_ads__campaign_budget_diagnostics_report", "attached_node": "model.google_ads.google_ads__campaign_budget_diagnostics_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('google_ads__campaign_budget_diagnostics_report')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__account_history_account_id.5ca373f51f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__account_history_account_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__account_history_account_id.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__account_history_account_id.5ca373f51f", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__account_history_account_id"], "alias": "not_null_stg_google_ads__account_history_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.7627096, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__account_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__account_history_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.stg_google_ads__account_history", "attached_node": "model.google_ads.stg_google_ads__account_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('stg_google_ads__account_history')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__ad_group_history_ad_group_id.f6c7c939be": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__ad_group_history_ad_group_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__ad_group_history_ad_group_id.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__ad_group_history_ad_group_id.f6c7c939be", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__ad_group_history_ad_group_id"], "alias": "not_null_stg_google_ads__ad_group_history_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.7653449, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_group_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__ad_group_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__ad_group_history_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_history\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_google_ads__ad_group_history", "attached_node": "model.google_ads.stg_google_ads__ad_group_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_google_ads__ad_group_history')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__ad_history_ad_id.8c23c38248": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__ad_history_ad_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__ad_history_ad_id.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__ad_history_ad_id.8c23c38248", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__ad_history_ad_id"], "alias": "not_null_stg_google_ads__ad_history_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.7678318, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__ad_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__ad_history_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_history\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_google_ads__ad_history", "attached_node": "model.google_ads.stg_google_ads__ad_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_google_ads__ad_history')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__ad_stats_date_day.9a43c0fce4": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__ad_stats_date_day", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__ad_stats_date_day.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__ad_stats_date_day.9a43c0fce4", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__ad_stats_date_day"], "alias": "not_null_stg_google_ads__ad_stats_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.7702653, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_stats", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__ad_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__ad_stats_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_stats\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_google_ads__ad_stats", "attached_node": "model.google_ads.stg_google_ads__ad_stats", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_google_ads__ad_stats')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__ad_stats_ad_id.2612d83cc8": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__ad_stats_ad_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__ad_stats_ad_id.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__ad_stats_ad_id.2612d83cc8", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__ad_stats_ad_id"], "alias": "not_null_stg_google_ads__ad_stats_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.772722, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_stats", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__ad_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__ad_stats_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_stats\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_google_ads__ad_stats", "attached_node": "model.google_ads.stg_google_ads__ad_stats", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_google_ads__ad_stats')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__campaign_history_campaign_id.fa0c825e75": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__campaign_history_campaign_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__campaign_history_campaign_id.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__campaign_history_campaign_id.fa0c825e75", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__campaign_history_campaign_id"], "alias": "not_null_stg_google_ads__campaign_history_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.7752426, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__campaign_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__campaign_history_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_google_ads__campaign_history", "attached_node": "model.google_ads.stg_google_ads__campaign_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_google_ads__campaign_history')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__ad_group_criterion_history_criterion_id.7a0a8b8476": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__ad_group_criterion_history_criterion_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__ad_gr_fa51ec93a9a1e739108966cace6ed031.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__ad_group_criterion_history_criterion_id.7a0a8b8476", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__ad_group_criterion_history_criterion_id"], "alias": "not_null_stg_google_ads__ad_gr_fa51ec93a9a1e739108966cace6ed031", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_google_ads__ad_gr_fa51ec93a9a1e739108966cace6ed031", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_google_ads__ad_gr_fa51ec93a9a1e739108966cace6ed031"}, "created_at": 1783450504.7777843, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_google_ads__ad_gr_fa51ec93a9a1e739108966cace6ed031\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_group_criterion_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__ad_group_criterion_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__ad_gr_fa51ec93a9a1e739108966cace6ed031.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect criterion_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_criterion_history\"\nwhere criterion_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "criterion_id", "file_key_name": "models.stg_google_ads__ad_group_criterion_history", "attached_node": "model.google_ads.stg_google_ads__ad_group_criterion_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "criterion_id", "model": "{{ get_where_subquery(ref('stg_google_ads__ad_group_criterion_history')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__ad_group_stats_date_day.3c6a221786": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__ad_group_stats_date_day", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__ad_group_stats_date_day.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__ad_group_stats_date_day.3c6a221786", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__ad_group_stats_date_day"], "alias": "not_null_stg_google_ads__ad_group_stats_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.7802284, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_group_stats", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__ad_group_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__ad_group_stats_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_stats\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_google_ads__ad_group_stats", "attached_node": "model.google_ads.stg_google_ads__ad_group_stats", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_google_ads__ad_group_stats')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__ad_group_stats_ad_group_id.a8d430f077": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__ad_group_stats_ad_group_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__ad_group_stats_ad_group_id.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__ad_group_stats_ad_group_id.a8d430f077", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__ad_group_stats_ad_group_id"], "alias": "not_null_stg_google_ads__ad_group_stats_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.782696, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_group_stats", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__ad_group_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__ad_group_stats_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_stats\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_google_ads__ad_group_stats", "attached_node": "model.google_ads.stg_google_ads__ad_group_stats", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_google_ads__ad_group_stats')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__campaign_stats_date_day.dc097fd76b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__campaign_stats_date_day", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__campaign_stats_date_day.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__campaign_stats_date_day.dc097fd76b", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__campaign_stats_date_day"], "alias": "not_null_stg_google_ads__campaign_stats_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.785245, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_stats", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__campaign_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__campaign_stats_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_stats\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_google_ads__campaign_stats", "attached_node": "model.google_ads.stg_google_ads__campaign_stats", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_google_ads__campaign_stats')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__campaign_stats_campaign_id.11587fa10f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__campaign_stats_campaign_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__campaign_stats_campaign_id.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__campaign_stats_campaign_id.11587fa10f", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__campaign_stats_campaign_id"], "alias": "not_null_stg_google_ads__campaign_stats_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.7877104, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_stats", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__campaign_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__campaign_stats_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_stats\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_google_ads__campaign_stats", "attached_node": "model.google_ads.stg_google_ads__campaign_stats", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_google_ads__campaign_stats')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__keyword_stats_date_day.a9da72f74d": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__keyword_stats_date_day", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__keyword_stats_date_day.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__keyword_stats_date_day.a9da72f74d", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__keyword_stats_date_day"], "alias": "not_null_stg_google_ads__keyword_stats_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.790138, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__keyword_stats", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__keyword_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__keyword_stats_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__keyword_stats\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_google_ads__keyword_stats", "attached_node": "model.google_ads.stg_google_ads__keyword_stats", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_google_ads__keyword_stats')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__keyword_stats_keyword_id.f0945d6cf0": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__keyword_stats_keyword_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__keyword_stats_keyword_id.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__keyword_stats_keyword_id.f0945d6cf0", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__keyword_stats_keyword_id"], "alias": "not_null_stg_google_ads__keyword_stats_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.7925975, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__keyword_stats", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__keyword_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__keyword_stats_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__keyword_stats\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.stg_google_ads__keyword_stats", "attached_node": "model.google_ads.stg_google_ads__keyword_stats", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('stg_google_ads__keyword_stats')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__account_stats_account_id.2a9da5417b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__account_stats_account_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__account_stats_account_id.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__account_stats_account_id.2a9da5417b", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__account_stats_account_id"], "alias": "not_null_stg_google_ads__account_stats_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.7950385, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__account_stats", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__account_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__account_stats_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_stats\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.stg_google_ads__account_stats", "attached_node": "model.google_ads.stg_google_ads__account_stats", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('stg_google_ads__account_stats')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__account_stats_date_day.57ac8772d5": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__account_stats_date_day", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__account_stats_date_day.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__account_stats_date_day.57ac8772d5", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__account_stats_date_day"], "alias": "not_null_stg_google_ads__account_stats_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.797594, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__account_stats", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__account_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__account_stats_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_stats\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_google_ads__account_stats", "attached_node": "model.google_ads.stg_google_ads__account_stats", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_google_ads__account_stats')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__search_term_keyword_stats_date_day.3ff55abd88": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__search_term_keyword_stats_date_day", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__search_term_keyword_stats_date_day.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__search_term_keyword_stats_date_day.3ff55abd88", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__search_term_keyword_stats_date_day"], "alias": "not_null_stg_google_ads__search_term_keyword_stats_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.8000486, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__search_term_keyword_stats", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__search_term_keyword_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__search_term_keyword_stats_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__search_term_keyword_stats\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_google_ads__search_term_keyword_stats", "attached_node": "model.google_ads.stg_google_ads__search_term_keyword_stats", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_google_ads__search_term_keyword_stats')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__search_term_keyword_stats_search_term_id.0019238ba2": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__search_term_keyword_stats_search_term_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__searc_9f4ce7ddcf9a513878be3f94abd0ade5.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__search_term_keyword_stats_search_term_id.0019238ba2", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__search_term_keyword_stats_search_term_id"], "alias": "not_null_stg_google_ads__searc_9f4ce7ddcf9a513878be3f94abd0ade5", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_google_ads__searc_9f4ce7ddcf9a513878be3f94abd0ade5", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_google_ads__searc_9f4ce7ddcf9a513878be3f94abd0ade5"}, "created_at": 1783450504.8025358, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_google_ads__searc_9f4ce7ddcf9a513878be3f94abd0ade5\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__search_term_keyword_stats", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__search_term_keyword_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__searc_9f4ce7ddcf9a513878be3f94abd0ade5.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect search_term_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__search_term_keyword_stats\"\nwhere search_term_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "search_term_id", "file_key_name": "models.stg_google_ads__search_term_keyword_stats", "attached_node": "model.google_ads.stg_google_ads__search_term_keyword_stats", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "search_term_id", "model": "{{ get_where_subquery(ref('stg_google_ads__search_term_keyword_stats')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__campaign_bid_modifier_history_campaign_id.c7e1e11f33": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__campaign_bid_modifier_history_campaign_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__campa_1f2e9490d197c28f3463cea8a54acb04.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__campaign_bid_modifier_history_campaign_id.c7e1e11f33", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__campaign_bid_modifier_history_campaign_id"], "alias": "not_null_stg_google_ads__campa_1f2e9490d197c28f3463cea8a54acb04", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_google_ads__campa_1f2e9490d197c28f3463cea8a54acb04", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_google_ads__campa_1f2e9490d197c28f3463cea8a54acb04"}, "created_at": 1783450504.8049679, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_google_ads__campa_1f2e9490d197c28f3463cea8a54acb04\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_bid_modifier_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__campaign_bid_modifier_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__campa_1f2e9490d197c28f3463cea8a54acb04.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_bid_modifier_history\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_google_ads__campaign_bid_modifier_history", "attached_node": "model.google_ads.stg_google_ads__campaign_bid_modifier_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_google_ads__campaign_bid_modifier_history')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__campaign_budget_history_campaign_id.730c3d8025": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__campaign_budget_history_campaign_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__campaign_budget_history_campaign_id.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__campaign_budget_history_campaign_id.730c3d8025", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__campaign_budget_history_campaign_id"], "alias": "not_null_stg_google_ads__campaign_budget_history_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.8075004, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_budget_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__campaign_budget_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__campaign_budget_history_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_budget_history\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_google_ads__campaign_budget_history", "attached_node": "model.google_ads.stg_google_ads__campaign_budget_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_google_ads__campaign_budget_history')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__campaign_criterion_history_criterion_id.ade9d1fdbd": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__campaign_criterion_history_criterion_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__campa_07090dc61c9469df9efaefd00736d6f8.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__campaign_criterion_history_criterion_id.ade9d1fdbd", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__campaign_criterion_history_criterion_id"], "alias": "not_null_stg_google_ads__campa_07090dc61c9469df9efaefd00736d6f8", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_google_ads__campa_07090dc61c9469df9efaefd00736d6f8", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_google_ads__campa_07090dc61c9469df9efaefd00736d6f8"}, "created_at": 1783450504.8099482, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_google_ads__campa_07090dc61c9469df9efaefd00736d6f8\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_criterion_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__campaign_criterion_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__campa_07090dc61c9469df9efaefd00736d6f8.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect criterion_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_criterion_history\"\nwhere criterion_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "criterion_id", "file_key_name": "models.stg_google_ads__campaign_criterion_history", "attached_node": "model.google_ads.stg_google_ads__campaign_criterion_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "criterion_id", "model": "{{ get_where_subquery(ref('stg_google_ads__campaign_criterion_history')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__campaign_bidding_strategy_history_campaign_id.7efbcd0291": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__campaign_bidding_strategy_history_campaign_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__campa_9334ed317d472e4773126e30548eff86.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__campaign_bidding_strategy_history_campaign_id.7efbcd0291", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__campaign_bidding_strategy_history_campaign_id"], "alias": "not_null_stg_google_ads__campa_9334ed317d472e4773126e30548eff86", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_google_ads__campa_9334ed317d472e4773126e30548eff86", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_google_ads__campa_9334ed317d472e4773126e30548eff86"}, "created_at": 1783450504.812368, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_google_ads__campa_9334ed317d472e4773126e30548eff86\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_bidding_strategy_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__campaign_bidding_strategy_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__campa_9334ed317d472e4773126e30548eff86.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_bidding_strategy_history\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_google_ads__campaign_bidding_strategy_history", "attached_node": "model.google_ads.stg_google_ads__campaign_bidding_strategy_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_google_ads__campaign_bidding_strategy_history')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_amazon_ads__account_report_profile_id.87fb8dbe66": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_amazon_ads__account_report_profile_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_amazon_ads__account_report_profile_id.sql", "original_file_path": "models/amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_amazon_ads__account_report_profile_id.87fb8dbe66", "fqn": ["amazon_ads", "not_null_amazon_ads__account_report_profile_id"], "alias": "not_null_amazon_ads__account_report_profile_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.8965397, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "amazon_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.amazon_ads__account_report"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads.yml/not_null_amazon_ads__account_report_profile_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect profile_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__account_report\"\nwhere profile_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "profile_id", "file_key_name": "models.amazon_ads__account_report", "attached_node": "model.amazon_ads.amazon_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "profile_id", "model": "{{ get_where_subquery(ref('amazon_ads__account_report')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_amazon_ads__account_report_account_id.83adef7061": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_amazon_ads__account_report_account_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_amazon_ads__account_report_account_id.sql", "original_file_path": "models/amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_amazon_ads__account_report_account_id.83adef7061", "fqn": ["amazon_ads", "not_null_amazon_ads__account_report_account_id"], "alias": "not_null_amazon_ads__account_report_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.8992507, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "amazon_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.amazon_ads__account_report"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads.yml/not_null_amazon_ads__account_report_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__account_report\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.amazon_ads__account_report", "attached_node": "model.amazon_ads.amazon_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('amazon_ads__account_report')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_amazon_ads__ad_group_report_ad_group_id.8a23dc123a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_amazon_ads__ad_group_report_ad_group_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_amazon_ads__ad_group_report_ad_group_id.sql", "original_file_path": "models/amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_amazon_ads__ad_group_report_ad_group_id.8a23dc123a", "fqn": ["amazon_ads", "not_null_amazon_ads__ad_group_report_ad_group_id"], "alias": "not_null_amazon_ads__ad_group_report_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.9017322, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "amazon_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.amazon_ads__ad_group_report"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads.yml/not_null_amazon_ads__ad_group_report_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__ad_group_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.amazon_ads__ad_group_report", "attached_node": "model.amazon_ads.amazon_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('amazon_ads__ad_group_report')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_amazon_ads__ad_report_ad_id.93728159b3": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_amazon_ads__ad_report_ad_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_amazon_ads__ad_report_ad_id.sql", "original_file_path": "models/amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_amazon_ads__ad_report_ad_id.93728159b3", "fqn": ["amazon_ads", "not_null_amazon_ads__ad_report_ad_id"], "alias": "not_null_amazon_ads__ad_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.9041681, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "amazon_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.amazon_ads__ad_report"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads.yml/not_null_amazon_ads__ad_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__ad_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.amazon_ads__ad_report", "attached_node": "model.amazon_ads.amazon_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('amazon_ads__ad_report')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_amazon_ads__campaign_report_campaign_id.a9cabadd7c": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_amazon_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_amazon_ads__campaign_report_campaign_id.sql", "original_file_path": "models/amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_amazon_ads__campaign_report_campaign_id.a9cabadd7c", "fqn": ["amazon_ads", "not_null_amazon_ads__campaign_report_campaign_id"], "alias": "not_null_amazon_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.9066498, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "amazon_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.amazon_ads__campaign_report"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads.yml/not_null_amazon_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.amazon_ads__campaign_report", "attached_node": "model.amazon_ads.amazon_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('amazon_ads__campaign_report')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_amazon_ads__portfolio_report_profile_id.1a910441c6": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_amazon_ads__portfolio_report_profile_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_amazon_ads__portfolio_report_profile_id.sql", "original_file_path": "models/amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_amazon_ads__portfolio_report_profile_id.1a910441c6", "fqn": ["amazon_ads", "not_null_amazon_ads__portfolio_report_profile_id"], "alias": "not_null_amazon_ads__portfolio_report_profile_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.9091883, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "amazon_ads__portfolio_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.amazon_ads__portfolio_report"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads.yml/not_null_amazon_ads__portfolio_report_profile_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect profile_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__portfolio_report\"\nwhere profile_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "profile_id", "file_key_name": "models.amazon_ads__portfolio_report", "attached_node": "model.amazon_ads.amazon_ads__portfolio_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "profile_id", "model": "{{ get_where_subquery(ref('amazon_ads__portfolio_report')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_amazon_ads__keyword_report_keyword_id.303f680e4a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_amazon_ads__keyword_report_keyword_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_amazon_ads__keyword_report_keyword_id.sql", "original_file_path": "models/amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_amazon_ads__keyword_report_keyword_id.303f680e4a", "fqn": ["amazon_ads", "not_null_amazon_ads__keyword_report_keyword_id"], "alias": "not_null_amazon_ads__keyword_report_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.9116566, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "amazon_ads__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.amazon_ads__keyword_report"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads.yml/not_null_amazon_ads__keyword_report_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__keyword_report\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.amazon_ads__keyword_report", "attached_node": "model.amazon_ads.amazon_ads__keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('amazon_ads__keyword_report')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_amazon_ads__search_report_search_term.3c23d4658a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_amazon_ads__search_report_search_term", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_amazon_ads__search_report_search_term.sql", "original_file_path": "models/amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_amazon_ads__search_report_search_term.3c23d4658a", "fqn": ["amazon_ads", "not_null_amazon_ads__search_report_search_term"], "alias": "not_null_amazon_ads__search_report_search_term", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.9140809, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "amazon_ads__search_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.amazon_ads__search_report"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads.yml/not_null_amazon_ads__search_report_search_term.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect search_term\nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__search_report\"\nwhere search_term is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "search_term", "file_key_name": "models.amazon_ads__search_report", "attached_node": "model.amazon_ads.amazon_ads__search_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "search_term", "model": "{{ get_where_subquery(ref('amazon_ads__search_report')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_stg_amazon_ads__ad_group_history_ad_group_id.6b524b990b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_amazon_ads__ad_group_history_ad_group_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_stg_amazon_ads__ad_group_history_ad_group_id.sql", "original_file_path": "models/staging/stg_amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_stg_amazon_ads__ad_group_history_ad_group_id.6b524b990b", "fqn": ["amazon_ads", "staging", "not_null_stg_amazon_ads__ad_group_history_ad_group_id"], "alias": "not_null_stg_amazon_ads__ad_group_history_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.957261, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__ad_group_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.stg_amazon_ads__ad_group_history"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads.yml/not_null_stg_amazon_ads__ad_group_history_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__ad_group_history\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_amazon_ads__ad_group_history", "attached_node": "model.amazon_ads.stg_amazon_ads__ad_group_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_amazon_ads__ad_group_history')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_stg_amazon_ads__ad_group_level_report_ad_group_id.ee4ef641c3": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_amazon_ads__ad_group_level_report_ad_group_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_stg_amazon_ads__ad_group_level_report_ad_group_id.sql", "original_file_path": "models/staging/stg_amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_stg_amazon_ads__ad_group_level_report_ad_group_id.ee4ef641c3", "fqn": ["amazon_ads", "staging", "not_null_stg_amazon_ads__ad_group_level_report_ad_group_id"], "alias": "not_null_stg_amazon_ads__ad_group_level_report_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.959976, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__ad_group_level_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.stg_amazon_ads__ad_group_level_report"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads.yml/not_null_stg_amazon_ads__ad_group_level_report_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__ad_group_level_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_amazon_ads__ad_group_level_report", "attached_node": "model.amazon_ads.stg_amazon_ads__ad_group_level_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_amazon_ads__ad_group_level_report')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_stg_amazon_ads__advertised_product_report_ad_id.307c6bc8d4": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_amazon_ads__advertised_product_report_ad_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_stg_amazon_ads__advertised_product_report_ad_id.sql", "original_file_path": "models/staging/stg_amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_stg_amazon_ads__advertised_product_report_ad_id.307c6bc8d4", "fqn": ["amazon_ads", "staging", "not_null_stg_amazon_ads__advertised_product_report_ad_id"], "alias": "not_null_stg_amazon_ads__advertised_product_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.962456, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__advertised_product_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.stg_amazon_ads__advertised_product_report"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads.yml/not_null_stg_amazon_ads__advertised_product_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__advertised_product_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_amazon_ads__advertised_product_report", "attached_node": "model.amazon_ads.stg_amazon_ads__advertised_product_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_amazon_ads__advertised_product_report')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_stg_amazon_ads__campaign_history_campaign_id.49e395897c": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_amazon_ads__campaign_history_campaign_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_stg_amazon_ads__campaign_history_campaign_id.sql", "original_file_path": "models/staging/stg_amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_stg_amazon_ads__campaign_history_campaign_id.49e395897c", "fqn": ["amazon_ads", "staging", "not_null_stg_amazon_ads__campaign_history_campaign_id"], "alias": "not_null_stg_amazon_ads__campaign_history_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.9649034, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.stg_amazon_ads__campaign_history"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads.yml/not_null_stg_amazon_ads__campaign_history_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_history\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_amazon_ads__campaign_history", "attached_node": "model.amazon_ads.stg_amazon_ads__campaign_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_amazon_ads__campaign_history')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_stg_amazon_ads__campaign_level_report_campaign_id.1efec68194": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_amazon_ads__campaign_level_report_campaign_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_stg_amazon_ads__campaign_level_report_campaign_id.sql", "original_file_path": "models/staging/stg_amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_stg_amazon_ads__campaign_level_report_campaign_id.1efec68194", "fqn": ["amazon_ads", "staging", "not_null_stg_amazon_ads__campaign_level_report_campaign_id"], "alias": "not_null_stg_amazon_ads__campaign_level_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.967377, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__campaign_level_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.stg_amazon_ads__campaign_level_report"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads.yml/not_null_stg_amazon_ads__campaign_level_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_level_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_amazon_ads__campaign_level_report", "attached_node": "model.amazon_ads.stg_amazon_ads__campaign_level_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_amazon_ads__campaign_level_report')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_stg_amazon_ads__keyword_history_keyword_id.f21f6add6e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_amazon_ads__keyword_history_keyword_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_stg_amazon_ads__keyword_history_keyword_id.sql", "original_file_path": "models/staging/stg_amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_stg_amazon_ads__keyword_history_keyword_id.f21f6add6e", "fqn": ["amazon_ads", "staging", "not_null_stg_amazon_ads__keyword_history_keyword_id"], "alias": "not_null_stg_amazon_ads__keyword_history_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.9699447, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__keyword_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.stg_amazon_ads__keyword_history"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads.yml/not_null_stg_amazon_ads__keyword_history_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__keyword_history\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.stg_amazon_ads__keyword_history", "attached_node": "model.amazon_ads.stg_amazon_ads__keyword_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('stg_amazon_ads__keyword_history')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_stg_amazon_ads__portfolio_history_portfolio_id.e22bb2ba02": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_amazon_ads__portfolio_history_portfolio_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_stg_amazon_ads__portfolio_history_portfolio_id.sql", "original_file_path": "models/staging/stg_amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_stg_amazon_ads__portfolio_history_portfolio_id.e22bb2ba02", "fqn": ["amazon_ads", "staging", "not_null_stg_amazon_ads__portfolio_history_portfolio_id"], "alias": "not_null_stg_amazon_ads__portfolio_history_portfolio_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.9723501, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__portfolio_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.stg_amazon_ads__portfolio_history"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads.yml/not_null_stg_amazon_ads__portfolio_history_portfolio_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect portfolio_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__portfolio_history\"\nwhere portfolio_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "portfolio_id", "file_key_name": "models.stg_amazon_ads__portfolio_history", "attached_node": "model.amazon_ads.stg_amazon_ads__portfolio_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "portfolio_id", "model": "{{ get_where_subquery(ref('stg_amazon_ads__portfolio_history')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_stg_amazon_ads__product_ad_history_ad_id.8744ab1cd8": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_amazon_ads__product_ad_history_ad_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_stg_amazon_ads__product_ad_history_ad_id.sql", "original_file_path": "models/staging/stg_amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_stg_amazon_ads__product_ad_history_ad_id.8744ab1cd8", "fqn": ["amazon_ads", "staging", "not_null_stg_amazon_ads__product_ad_history_ad_id"], "alias": "not_null_stg_amazon_ads__product_ad_history_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.9747987, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__product_ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.stg_amazon_ads__product_ad_history"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads.yml/not_null_stg_amazon_ads__product_ad_history_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__product_ad_history\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_amazon_ads__product_ad_history", "attached_node": "model.amazon_ads.stg_amazon_ads__product_ad_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_amazon_ads__product_ad_history')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_stg_amazon_ads__profile_profile_id.bd192c102b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_amazon_ads__profile_profile_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_stg_amazon_ads__profile_profile_id.sql", "original_file_path": "models/staging/stg_amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_stg_amazon_ads__profile_profile_id.bd192c102b", "fqn": ["amazon_ads", "staging", "not_null_stg_amazon_ads__profile_profile_id"], "alias": "not_null_stg_amazon_ads__profile_profile_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.9772356, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__profile", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.stg_amazon_ads__profile"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads.yml/not_null_stg_amazon_ads__profile_profile_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect profile_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__profile\"\nwhere profile_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "profile_id", "file_key_name": "models.stg_amazon_ads__profile", "attached_node": "model.amazon_ads.stg_amazon_ads__profile", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "profile_id", "model": "{{ get_where_subquery(ref('stg_amazon_ads__profile')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_stg_amazon_ads__targeting_keyword_report_keyword_id.101a3299d7": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_amazon_ads__targeting_keyword_report_keyword_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_stg_amazon_ads__targeting_keyword_report_keyword_id.sql", "original_file_path": "models/staging/stg_amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_stg_amazon_ads__targeting_keyword_report_keyword_id.101a3299d7", "fqn": ["amazon_ads", "staging", "not_null_stg_amazon_ads__targeting_keyword_report_keyword_id"], "alias": "not_null_stg_amazon_ads__targeting_keyword_report_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450504.979792, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__targeting_keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.stg_amazon_ads__targeting_keyword_report"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads.yml/not_null_stg_amazon_ads__targeting_keyword_report_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__targeting_keyword_report\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.stg_amazon_ads__targeting_keyword_report", "attached_node": "model.amazon_ads.stg_amazon_ads__targeting_keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('stg_amazon_ads__targeting_keyword_report')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_stg_amazon_ads__search_term_ad_keyword_report_search_term.ef04af3b06": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_amazon_ads__search_term_ad_keyword_report_search_term", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_stg_amazon_ads__searc_f003e4b73838d347c57dd6506254bcfe.sql", "original_file_path": "models/staging/stg_amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_stg_amazon_ads__search_term_ad_keyword_report_search_term.ef04af3b06", "fqn": ["amazon_ads", "staging", "not_null_stg_amazon_ads__search_term_ad_keyword_report_search_term"], "alias": "not_null_stg_amazon_ads__searc_f003e4b73838d347c57dd6506254bcfe", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_amazon_ads__searc_f003e4b73838d347c57dd6506254bcfe", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_amazon_ads__searc_f003e4b73838d347c57dd6506254bcfe"}, "created_at": 1783450504.9822383, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_amazon_ads__searc_f003e4b73838d347c57dd6506254bcfe\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__search_term_ad_keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads.yml/not_null_stg_amazon_ads__searc_f003e4b73838d347c57dd6506254bcfe.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect search_term\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__search_term_ad_keyword_report\"\nwhere search_term is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "search_term", "file_key_name": "models.stg_amazon_ads__search_term_ad_keyword_report", "attached_node": "model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "search_term", "model": "{{ get_where_subquery(ref('stg_amazon_ads__search_term_ad_keyword_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__campaign_report_campaign_id.03b1c451b8": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__campaign_report_campaign_id.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__campaign_report_campaign_id.03b1c451b8", "fqn": ["twitter_ads", "not_null_twitter_ads__campaign_report_campaign_id"], "alias": "not_null_twitter_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.0348537, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__campaign_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.twitter_ads__campaign_report", "attached_node": "model.twitter_ads.twitter_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('twitter_ads__campaign_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__campaign_report_date_day.2b30b279b0": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__campaign_report_date_day", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__campaign_report_date_day.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__campaign_report_date_day.2b30b279b0", "fqn": ["twitter_ads", "not_null_twitter_ads__campaign_report_date_day"], "alias": "not_null_twitter_ads__campaign_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.0374699, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__campaign_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__campaign_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.twitter_ads__campaign_report", "attached_node": "model.twitter_ads.twitter_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('twitter_ads__campaign_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__campaign_report_placement.c66d252e82": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__campaign_report_placement", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__campaign_report_placement.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__campaign_report_placement.c66d252e82", "fqn": ["twitter_ads", "not_null_twitter_ads__campaign_report_placement"], "alias": "not_null_twitter_ads__campaign_report_placement", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.0399702, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__campaign_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__campaign_report_placement.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect placement\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_report\"\nwhere placement is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "placement", "file_key_name": "models.twitter_ads__campaign_report", "attached_node": "model.twitter_ads.twitter_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "placement", "model": "{{ get_where_subquery(ref('twitter_ads__campaign_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__line_item_report_date_day.86c934e8ce": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__line_item_report_date_day", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__line_item_report_date_day.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__line_item_report_date_day.86c934e8ce", "fqn": ["twitter_ads", "not_null_twitter_ads__line_item_report_date_day"], "alias": "not_null_twitter_ads__line_item_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.0423748, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__line_item_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__line_item_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__line_item_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__line_item_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.twitter_ads__line_item_report", "attached_node": "model.twitter_ads.twitter_ads__line_item_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('twitter_ads__line_item_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__line_item_report_line_item_id.0462d58211": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__line_item_report_line_item_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__line_item_report_line_item_id.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__line_item_report_line_item_id.0462d58211", "fqn": ["twitter_ads", "not_null_twitter_ads__line_item_report_line_item_id"], "alias": "not_null_twitter_ads__line_item_report_line_item_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.0448263, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__line_item_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__line_item_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__line_item_report_line_item_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect line_item_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__line_item_report\"\nwhere line_item_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "line_item_id", "file_key_name": "models.twitter_ads__line_item_report", "attached_node": "model.twitter_ads.twitter_ads__line_item_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "line_item_id", "model": "{{ get_where_subquery(ref('twitter_ads__line_item_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__line_item_report_placement.f103369312": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__line_item_report_placement", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__line_item_report_placement.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__line_item_report_placement.f103369312", "fqn": ["twitter_ads", "not_null_twitter_ads__line_item_report_placement"], "alias": "not_null_twitter_ads__line_item_report_placement", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.047265, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__line_item_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__line_item_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__line_item_report_placement.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect placement\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__line_item_report\"\nwhere placement is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "placement", "file_key_name": "models.twitter_ads__line_item_report", "attached_node": "model.twitter_ads.twitter_ads__line_item_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "placement", "model": "{{ get_where_subquery(ref('twitter_ads__line_item_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__account_report_date_day.84896c5846": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__account_report_date_day", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__account_report_date_day.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__account_report_date_day.84896c5846", "fqn": ["twitter_ads", "not_null_twitter_ads__account_report_date_day"], "alias": "not_null_twitter_ads__account_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.0501354, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__account_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__account_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__account_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.twitter_ads__account_report", "attached_node": "model.twitter_ads.twitter_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('twitter_ads__account_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__account_report_placement.157dcb6194": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__account_report_placement", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__account_report_placement.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__account_report_placement.157dcb6194", "fqn": ["twitter_ads", "not_null_twitter_ads__account_report_placement"], "alias": "not_null_twitter_ads__account_report_placement", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.0526004, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__account_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__account_report_placement.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect placement\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__account_report\"\nwhere placement is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "placement", "file_key_name": "models.twitter_ads__account_report", "attached_node": "model.twitter_ads.twitter_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "placement", "model": "{{ get_where_subquery(ref('twitter_ads__account_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__account_report_account_id.90d5808908": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__account_report_account_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__account_report_account_id.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__account_report_account_id.90d5808908", "fqn": ["twitter_ads", "not_null_twitter_ads__account_report_account_id"], "alias": "not_null_twitter_ads__account_report_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.0550234, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__account_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__account_report_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__account_report\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.twitter_ads__account_report", "attached_node": "model.twitter_ads.twitter_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('twitter_ads__account_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__keyword_report_date_day.e0ce90c1ec": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__keyword_report_date_day", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__keyword_report_date_day.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__keyword_report_date_day.e0ce90c1ec", "fqn": ["twitter_ads", "not_null_twitter_ads__keyword_report_date_day"], "alias": "not_null_twitter_ads__keyword_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.057467, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__keyword_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__keyword_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__keyword_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.twitter_ads__keyword_report", "attached_node": "model.twitter_ads.twitter_ads__keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('twitter_ads__keyword_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__keyword_report_keyword_id.91efa0a538": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__keyword_report_keyword_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__keyword_report_keyword_id.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__keyword_report_keyword_id.91efa0a538", "fqn": ["twitter_ads", "not_null_twitter_ads__keyword_report_keyword_id"], "alias": "not_null_twitter_ads__keyword_report_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.0598693, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__keyword_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__keyword_report_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__keyword_report\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.twitter_ads__keyword_report", "attached_node": "model.twitter_ads.twitter_ads__keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('twitter_ads__keyword_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__promoted_tweet_report_placement.d89c9b27e5": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__promoted_tweet_report_placement", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__promoted_tweet_report_placement.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__promoted_tweet_report_placement.d89c9b27e5", "fqn": ["twitter_ads", "not_null_twitter_ads__promoted_tweet_report_placement"], "alias": "not_null_twitter_ads__promoted_tweet_report_placement", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.0623584, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__promoted_tweet_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__promoted_tweet_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__promoted_tweet_report_placement.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect placement\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__promoted_tweet_report\"\nwhere placement is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "placement", "file_key_name": "models.twitter_ads__promoted_tweet_report", "attached_node": "model.twitter_ads.twitter_ads__promoted_tweet_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "placement", "model": "{{ get_where_subquery(ref('twitter_ads__promoted_tweet_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__promoted_tweet_report_promoted_tweet_id.5df08e154e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__promoted_tweet_report_promoted_tweet_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__promoted_tweet_report_promoted_tweet_id.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__promoted_tweet_report_promoted_tweet_id.5df08e154e", "fqn": ["twitter_ads", "not_null_twitter_ads__promoted_tweet_report_promoted_tweet_id"], "alias": "not_null_twitter_ads__promoted_tweet_report_promoted_tweet_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.064783, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__promoted_tweet_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__promoted_tweet_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__promoted_tweet_report_promoted_tweet_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect promoted_tweet_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__promoted_tweet_report\"\nwhere promoted_tweet_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "promoted_tweet_id", "file_key_name": "models.twitter_ads__promoted_tweet_report", "attached_node": "model.twitter_ads.twitter_ads__promoted_tweet_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "promoted_tweet_id", "model": "{{ get_where_subquery(ref('twitter_ads__promoted_tweet_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__url_report_date_day.33fcb7e04b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__url_report_date_day", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__url_report_date_day.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__url_report_date_day.33fcb7e04b", "fqn": ["twitter_ads", "not_null_twitter_ads__url_report_date_day"], "alias": "not_null_twitter_ads__url_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.0672164, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__url_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__url_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__url_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.twitter_ads__url_report", "attached_node": "model.twitter_ads.twitter_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('twitter_ads__url_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__url_report_placement.92ca3b192e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__url_report_placement", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__url_report_placement.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__url_report_placement.92ca3b192e", "fqn": ["twitter_ads", "not_null_twitter_ads__url_report_placement"], "alias": "not_null_twitter_ads__url_report_placement", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.069664, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__url_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__url_report_placement.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect placement\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__url_report\"\nwhere placement is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "placement", "file_key_name": "models.twitter_ads__url_report", "attached_node": "model.twitter_ads.twitter_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "placement", "model": "{{ get_where_subquery(ref('twitter_ads__url_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__url_report_promoted_tweet_id.d690f99143": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__url_report_promoted_tweet_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__url_report_promoted_tweet_id.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__url_report_promoted_tweet_id.d690f99143", "fqn": ["twitter_ads", "not_null_twitter_ads__url_report_promoted_tweet_id"], "alias": "not_null_twitter_ads__url_report_promoted_tweet_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.0722024, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__url_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__url_report_promoted_tweet_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect promoted_tweet_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__url_report\"\nwhere promoted_tweet_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "promoted_tweet_id", "file_key_name": "models.twitter_ads__url_report", "attached_node": "model.twitter_ads.twitter_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "promoted_tweet_id", "model": "{{ get_where_subquery(ref('twitter_ads__url_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__url_report_base_url.dfd7ab549e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__url_report_base_url", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__url_report_base_url.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__url_report_base_url.dfd7ab549e", "fqn": ["twitter_ads", "not_null_twitter_ads__url_report_base_url"], "alias": "not_null_twitter_ads__url_report_base_url", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"enabled": true}, "created_at": 1783450505.075535, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(enabled=True) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__url_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__url_report_base_url.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect base_url\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__url_report\"\nwhere base_url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "base_url", "file_key_name": "models.twitter_ads__url_report", "attached_node": "model.twitter_ads.twitter_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "base_url", "model": "{{ get_where_subquery(ref('twitter_ads__url_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__campaign_country_report_campaign_id.d08c7d25a2": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__campaign_country_report_campaign_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__campaign_country_report_campaign_id.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__campaign_country_report_campaign_id.d08c7d25a2", "fqn": ["twitter_ads", "not_null_twitter_ads__campaign_country_report_campaign_id"], "alias": "not_null_twitter_ads__campaign_country_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.0780246, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__campaign_country_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__campaign_country_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_country_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.twitter_ads__campaign_country_report", "attached_node": "model.twitter_ads.twitter_ads__campaign_country_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('twitter_ads__campaign_country_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__campaign_country_report_date_day.33eabfbcaa": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__campaign_country_report_date_day", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__campaign_country_report_date_day.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__campaign_country_report_date_day.33eabfbcaa", "fqn": ["twitter_ads", "not_null_twitter_ads__campaign_country_report_date_day"], "alias": "not_null_twitter_ads__campaign_country_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.0805047, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__campaign_country_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__campaign_country_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_country_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.twitter_ads__campaign_country_report", "attached_node": "model.twitter_ads.twitter_ads__campaign_country_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('twitter_ads__campaign_country_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__campaign_country_report_placement.3a4c65b9c5": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__campaign_country_report_placement", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__campaign_country_report_placement.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__campaign_country_report_placement.3a4c65b9c5", "fqn": ["twitter_ads", "not_null_twitter_ads__campaign_country_report_placement"], "alias": "not_null_twitter_ads__campaign_country_report_placement", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.0830235, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__campaign_country_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__campaign_country_report_placement.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect placement\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_country_report\"\nwhere placement is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "placement", "file_key_name": "models.twitter_ads__campaign_country_report", "attached_node": "model.twitter_ads.twitter_ads__campaign_country_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "placement", "model": "{{ get_where_subquery(ref('twitter_ads__campaign_country_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__campaign_region_report_campaign_id.c06b8be032": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__campaign_region_report_campaign_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__campaign_region_report_campaign_id.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__campaign_region_report_campaign_id.c06b8be032", "fqn": ["twitter_ads", "not_null_twitter_ads__campaign_region_report_campaign_id"], "alias": "not_null_twitter_ads__campaign_region_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.0854616, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__campaign_region_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__campaign_region_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__campaign_region_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_region_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.twitter_ads__campaign_region_report", "attached_node": "model.twitter_ads.twitter_ads__campaign_region_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('twitter_ads__campaign_region_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__campaign_region_report_date_day.884ad86a28": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__campaign_region_report_date_day", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__campaign_region_report_date_day.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__campaign_region_report_date_day.884ad86a28", "fqn": ["twitter_ads", "not_null_twitter_ads__campaign_region_report_date_day"], "alias": "not_null_twitter_ads__campaign_region_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.0878787, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__campaign_region_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__campaign_region_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__campaign_region_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_region_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.twitter_ads__campaign_region_report", "attached_node": "model.twitter_ads.twitter_ads__campaign_region_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('twitter_ads__campaign_region_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__campaign_region_report_placement.e6fb374bf5": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__campaign_region_report_placement", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__campaign_region_report_placement.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__campaign_region_report_placement.e6fb374bf5", "fqn": ["twitter_ads", "not_null_twitter_ads__campaign_region_report_placement"], "alias": "not_null_twitter_ads__campaign_region_report_placement", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.090308, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__campaign_region_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__campaign_region_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__campaign_region_report_placement.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect placement\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_region_report\"\nwhere placement is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "placement", "file_key_name": "models.twitter_ads__campaign_region_report", "attached_node": "model.twitter_ads.twitter_ads__campaign_region_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "placement", "model": "{{ get_where_subquery(ref('twitter_ads__campaign_region_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__account_history_account_id.66fb3601e2": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__account_history_account_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__account_history_account_id.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__account_history_account_id.66fb3601e2", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__account_history_account_id"], "alias": "not_null_stg_twitter_ads__account_history_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.1124487, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__account_history"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__account_history_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__account_history\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.stg_twitter_ads__account_history", "attached_node": "model.twitter_ads.stg_twitter_ads__account_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('stg_twitter_ads__account_history')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__campaign_history_campaign_id.51218487ce": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__campaign_history_campaign_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__campaign_history_campaign_id.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__campaign_history_campaign_id.51218487ce", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__campaign_history_campaign_id"], "alias": "not_null_stg_twitter_ads__campaign_history_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.1150005, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_history"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__campaign_history_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_history\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_twitter_ads__campaign_history", "attached_node": "model.twitter_ads.stg_twitter_ads__campaign_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_twitter_ads__campaign_history')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__line_item_history_line_item_id.2cef040809": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__line_item_history_line_item_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__line_item_history_line_item_id.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__line_item_history_line_item_id.2cef040809", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__line_item_history_line_item_id"], "alias": "not_null_stg_twitter_ads__line_item_history_line_item_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.1174736, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__line_item_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__line_item_history"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__line_item_history_line_item_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect line_item_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_history\"\nwhere line_item_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "line_item_id", "file_key_name": "models.stg_twitter_ads__line_item_history", "attached_node": "model.twitter_ads.stg_twitter_ads__line_item_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "line_item_id", "model": "{{ get_where_subquery(ref('stg_twitter_ads__line_item_history')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_history_promoted_tweet_id.f447a1cd09": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__promoted_tweet_history_promoted_tweet_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__prom_b9fd075f90e22952cf35b8a246a98976.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_history_promoted_tweet_id.f447a1cd09", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__promoted_tweet_history_promoted_tweet_id"], "alias": "not_null_stg_twitter_ads__prom_b9fd075f90e22952cf35b8a246a98976", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_twitter_ads__prom_b9fd075f90e22952cf35b8a246a98976", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_twitter_ads__prom_b9fd075f90e22952cf35b8a246a98976"}, "created_at": 1783450505.120028, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_twitter_ads__prom_b9fd075f90e22952cf35b8a246a98976\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__promoted_tweet_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_history"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__prom_b9fd075f90e22952cf35b8a246a98976.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect promoted_tweet_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_history\"\nwhere promoted_tweet_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "promoted_tweet_id", "file_key_name": "models.stg_twitter_ads__promoted_tweet_history", "attached_node": "model.twitter_ads.stg_twitter_ads__promoted_tweet_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "promoted_tweet_id", "model": "{{ get_where_subquery(ref('stg_twitter_ads__promoted_tweet_history')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_date_day.c4c46a5894": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__promoted_tweet_report_date_day", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__promoted_tweet_report_date_day.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_date_day.c4c46a5894", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__promoted_tweet_report_date_day"], "alias": "not_null_stg_twitter_ads__promoted_tweet_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.1225, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__promoted_tweet_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__promoted_tweet_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_twitter_ads__promoted_tweet_report", "attached_node": "model.twitter_ads.stg_twitter_ads__promoted_tweet_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_twitter_ads__promoted_tweet_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_promoted_tweet_id.6028694598": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__promoted_tweet_report_promoted_tweet_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__prom_46616b936836e80f58bf2b489d5247aa.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_promoted_tweet_id.6028694598", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__promoted_tweet_report_promoted_tweet_id"], "alias": "not_null_stg_twitter_ads__prom_46616b936836e80f58bf2b489d5247aa", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_twitter_ads__prom_46616b936836e80f58bf2b489d5247aa", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_twitter_ads__prom_46616b936836e80f58bf2b489d5247aa"}, "created_at": 1783450505.1249785, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_twitter_ads__prom_46616b936836e80f58bf2b489d5247aa\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__promoted_tweet_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__prom_46616b936836e80f58bf2b489d5247aa.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect promoted_tweet_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_report\"\nwhere promoted_tweet_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "promoted_tweet_id", "file_key_name": "models.stg_twitter_ads__promoted_tweet_report", "attached_node": "model.twitter_ads.stg_twitter_ads__promoted_tweet_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "promoted_tweet_id", "model": "{{ get_where_subquery(ref('stg_twitter_ads__promoted_tweet_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_placement.c1b1f648b3": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__promoted_tweet_report_placement", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__promoted_tweet_report_placement.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_placement.c1b1f648b3", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__promoted_tweet_report_placement"], "alias": "not_null_stg_twitter_ads__promoted_tweet_report_placement", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.1274142, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__promoted_tweet_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__promoted_tweet_report_placement.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect placement\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_report\"\nwhere placement is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "placement", "file_key_name": "models.stg_twitter_ads__promoted_tweet_report", "attached_node": "model.twitter_ads.stg_twitter_ads__promoted_tweet_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "placement", "model": "{{ get_where_subquery(ref('stg_twitter_ads__promoted_tweet_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__tweet_url_index.e998fb67be": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__tweet_url_index", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__tweet_url_index.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__tweet_url_index.e998fb67be", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__tweet_url_index"], "alias": "not_null_stg_twitter_ads__tweet_url_index", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.1298752, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__tweet_url", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__tweet_url"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__tweet_url_index.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect index\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__tweet_url\"\nwhere index is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "index", "file_key_name": "models.stg_twitter_ads__tweet_url", "attached_node": "model.twitter_ads.stg_twitter_ads__tweet_url", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "index", "model": "{{ get_where_subquery(ref('stg_twitter_ads__tweet_url')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__tweet_url_tweet_id.f7e1670218": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__tweet_url_tweet_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__tweet_url_tweet_id.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__tweet_url_tweet_id.f7e1670218", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__tweet_url_tweet_id"], "alias": "not_null_stg_twitter_ads__tweet_url_tweet_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.1324148, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__tweet_url", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__tweet_url"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__tweet_url_tweet_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect tweet_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__tweet_url\"\nwhere tweet_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "tweet_id", "file_key_name": "models.stg_twitter_ads__tweet_url", "attached_node": "model.twitter_ads.stg_twitter_ads__tweet_url", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tweet_id", "model": "{{ get_where_subquery(ref('stg_twitter_ads__tweet_url')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_date_day.053c09786c": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__campaign_report_date_day", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__campaign_report_date_day.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_date_day.053c09786c", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__campaign_report_date_day"], "alias": "not_null_stg_twitter_ads__campaign_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.1348608, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__campaign_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_twitter_ads__campaign_report", "attached_node": "model.twitter_ads.stg_twitter_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_twitter_ads__campaign_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_campaign_id.a63b62981f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__campaign_report_campaign_id.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_campaign_id.a63b62981f", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__campaign_report_campaign_id"], "alias": "not_null_stg_twitter_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.1372724, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_twitter_ads__campaign_report", "attached_node": "model.twitter_ads.stg_twitter_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_twitter_ads__campaign_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_placement.5067d8c4f4": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__campaign_report_placement", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__campaign_report_placement.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_placement.5067d8c4f4", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__campaign_report_placement"], "alias": "not_null_stg_twitter_ads__campaign_report_placement", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.1397245, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__campaign_report_placement.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect placement\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_report\"\nwhere placement is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "placement", "file_key_name": "models.stg_twitter_ads__campaign_report", "attached_node": "model.twitter_ads.stg_twitter_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "placement", "model": "{{ get_where_subquery(ref('stg_twitter_ads__campaign_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_date_day.0f4d8cc8fe": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__line_item_report_date_day", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__line_item_report_date_day.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_date_day.0f4d8cc8fe", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__line_item_report_date_day"], "alias": "not_null_stg_twitter_ads__line_item_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.1427364, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__line_item_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__line_item_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__line_item_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_twitter_ads__line_item_report", "attached_node": "model.twitter_ads.stg_twitter_ads__line_item_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_twitter_ads__line_item_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_line_item_id.9f5a4860b7": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__line_item_report_line_item_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__line_item_report_line_item_id.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_line_item_id.9f5a4860b7", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__line_item_report_line_item_id"], "alias": "not_null_stg_twitter_ads__line_item_report_line_item_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.1451683, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__line_item_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__line_item_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__line_item_report_line_item_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect line_item_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_report\"\nwhere line_item_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "line_item_id", "file_key_name": "models.stg_twitter_ads__line_item_report", "attached_node": "model.twitter_ads.stg_twitter_ads__line_item_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "line_item_id", "model": "{{ get_where_subquery(ref('stg_twitter_ads__line_item_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_placement.cd7e77e0eb": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__line_item_report_placement", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__line_item_report_placement.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_placement.cd7e77e0eb", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__line_item_report_placement"], "alias": "not_null_stg_twitter_ads__line_item_report_placement", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.147604, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__line_item_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__line_item_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__line_item_report_placement.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect placement\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_report\"\nwhere placement is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "placement", "file_key_name": "models.stg_twitter_ads__line_item_report", "attached_node": "model.twitter_ads.stg_twitter_ads__line_item_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "placement", "model": "{{ get_where_subquery(ref('stg_twitter_ads__line_item_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__line_item_keywords_report_keyword_id.e5f015e9ec": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__line_item_keywords_report_keyword_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__line_item_keywords_report_keyword_id.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__line_item_keywords_report_keyword_id.e5f015e9ec", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__line_item_keywords_report_keyword_id"], "alias": "not_null_stg_twitter_ads__line_item_keywords_report_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.150026, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__line_item_keywords_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__line_item_keywords_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__line_item_keywords_report_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_keywords_report\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.stg_twitter_ads__line_item_keywords_report", "attached_node": "model.twitter_ads.stg_twitter_ads__line_item_keywords_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('stg_twitter_ads__line_item_keywords_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__line_item_keywords_report_date_day.c7e7155b13": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__line_item_keywords_report_date_day", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__line_item_keywords_report_date_day.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__line_item_keywords_report_date_day.c7e7155b13", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__line_item_keywords_report_date_day"], "alias": "not_null_stg_twitter_ads__line_item_keywords_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.152474, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__line_item_keywords_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__line_item_keywords_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__line_item_keywords_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_keywords_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_twitter_ads__line_item_keywords_report", "attached_node": "model.twitter_ads.stg_twitter_ads__line_item_keywords_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_twitter_ads__line_item_keywords_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__tweet_tweet_id.a0427f37cd": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__tweet_tweet_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__tweet_tweet_id.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__tweet_tweet_id.a0427f37cd", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__tweet_tweet_id"], "alias": "not_null_stg_twitter_ads__tweet_tweet_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.2778237, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__tweet", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__tweet"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__tweet_tweet_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect tweet_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__tweet\"\nwhere tweet_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "tweet_id", "file_key_name": "models.stg_twitter_ads__tweet", "attached_node": "model.twitter_ads.stg_twitter_ads__tweet", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tweet_id", "model": "{{ get_where_subquery(ref('stg_twitter_ads__tweet')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_country.8bc44f6e39": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__campaign_locations_report_country", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__campaign_locations_report_country.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_country.8bc44f6e39", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__campaign_locations_report_country"], "alias": "not_null_stg_twitter_ads__campaign_locations_report_country", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.28036, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_locations_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_locations_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__campaign_locations_report_country.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect country\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_locations_report\"\nwhere country is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "country", "file_key_name": "models.stg_twitter_ads__campaign_locations_report", "attached_node": "model.twitter_ads.stg_twitter_ads__campaign_locations_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "country", "model": "{{ get_where_subquery(ref('stg_twitter_ads__campaign_locations_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_date_day.bf69378746": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__campaign_locations_report_date_day", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__campaign_locations_report_date_day.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_date_day.bf69378746", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__campaign_locations_report_date_day"], "alias": "not_null_stg_twitter_ads__campaign_locations_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.2828467, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_locations_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_locations_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__campaign_locations_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_locations_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_twitter_ads__campaign_locations_report", "attached_node": "model.twitter_ads.stg_twitter_ads__campaign_locations_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_twitter_ads__campaign_locations_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_campaign_id.e1ddc306c2": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__campaign_locations_report_campaign_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__campaign_locations_report_campaign_id.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_campaign_id.e1ddc306c2", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__campaign_locations_report_campaign_id"], "alias": "not_null_stg_twitter_ads__campaign_locations_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.285363, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_locations_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_locations_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__campaign_locations_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_locations_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_twitter_ads__campaign_locations_report", "attached_node": "model.twitter_ads.stg_twitter_ads__campaign_locations_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_twitter_ads__campaign_locations_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_placement.638fb0cf03": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__campaign_locations_report_placement", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__campaign_locations_report_placement.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_placement.638fb0cf03", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__campaign_locations_report_placement"], "alias": "not_null_stg_twitter_ads__campaign_locations_report_placement", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.2878425, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_locations_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_locations_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__campaign_locations_report_placement.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect placement\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_locations_report\"\nwhere placement is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "placement", "file_key_name": "models.stg_twitter_ads__campaign_locations_report", "attached_node": "model.twitter_ads.stg_twitter_ads__campaign_locations_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "placement", "model": "{{ get_where_subquery(ref('stg_twitter_ads__campaign_locations_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__campaign_regions_report_region.7b8b6fd555": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__campaign_regions_report_region", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__campaign_regions_report_region.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__campaign_regions_report_region.7b8b6fd555", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__campaign_regions_report_region"], "alias": "not_null_stg_twitter_ads__campaign_regions_report_region", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.2902923, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_regions_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_regions_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__campaign_regions_report_region.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect region\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_regions_report\"\nwhere region is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "region", "file_key_name": "models.stg_twitter_ads__campaign_regions_report", "attached_node": "model.twitter_ads.stg_twitter_ads__campaign_regions_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "region", "model": "{{ get_where_subquery(ref('stg_twitter_ads__campaign_regions_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__campaign_regions_report_date_day.e7f9f99776": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__campaign_regions_report_date_day", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__campaign_regions_report_date_day.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__campaign_regions_report_date_day.e7f9f99776", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__campaign_regions_report_date_day"], "alias": "not_null_stg_twitter_ads__campaign_regions_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.2927516, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_regions_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_regions_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__campaign_regions_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_regions_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_twitter_ads__campaign_regions_report", "attached_node": "model.twitter_ads.stg_twitter_ads__campaign_regions_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_twitter_ads__campaign_regions_report')) }}"}, "namespace": null}}, "test.ad_reporting.not_null_ad_reporting__account_report_account_id.316a64c022": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_ad_reporting__account_report_account_id", "resource_type": "test", "package_name": "ad_reporting", "path": "not_null_ad_reporting__account_report_account_id.sql", "original_file_path": "models/ad_reporting_models.yml", "unique_id": "test.ad_reporting.not_null_ad_reporting__account_report_account_id.316a64c022", "fqn": ["ad_reporting", "not_null_ad_reporting__account_report_account_id"], "alias": "not_null_ad_reporting__account_report_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "warn", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"severity": "warn"}, "created_at": 1783450505.3675506, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(severity=\"warn\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "ad_reporting__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.ad_reporting.ad_reporting__account_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting_models.yml/not_null_ad_reporting__account_report_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__account_report\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.ad_reporting__account_report", "attached_node": "model.ad_reporting.ad_reporting__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('ad_reporting__account_report')) }}"}, "namespace": null}}, "test.ad_reporting.not_null_ad_reporting__ad_group_report_ad_group_id.963e17e842": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_ad_reporting__ad_group_report_ad_group_id", "resource_type": "test", "package_name": "ad_reporting", "path": "not_null_ad_reporting__ad_group_report_ad_group_id.sql", "original_file_path": "models/ad_reporting_models.yml", "unique_id": "test.ad_reporting.not_null_ad_reporting__ad_group_report_ad_group_id.963e17e842", "fqn": ["ad_reporting", "not_null_ad_reporting__ad_group_report_ad_group_id"], "alias": "not_null_ad_reporting__ad_group_report_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.3702412, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "ad_reporting__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.ad_reporting.ad_reporting__ad_group_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting_models.yml/not_null_ad_reporting__ad_group_report_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__ad_group_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.ad_reporting__ad_group_report", "attached_node": "model.ad_reporting.ad_reporting__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('ad_reporting__ad_group_report')) }}"}, "namespace": null}}, "test.ad_reporting.not_null_ad_reporting__ad_report_ad_id.f3eb210152": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_ad_reporting__ad_report_ad_id", "resource_type": "test", "package_name": "ad_reporting", "path": "not_null_ad_reporting__ad_report_ad_id.sql", "original_file_path": "models/ad_reporting_models.yml", "unique_id": "test.ad_reporting.not_null_ad_reporting__ad_report_ad_id.f3eb210152", "fqn": ["ad_reporting", "not_null_ad_reporting__ad_report_ad_id"], "alias": "not_null_ad_reporting__ad_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.3727329, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "ad_reporting__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.ad_reporting.ad_reporting__ad_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting_models.yml/not_null_ad_reporting__ad_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__ad_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.ad_reporting__ad_report", "attached_node": "model.ad_reporting.ad_reporting__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('ad_reporting__ad_report')) }}"}, "namespace": null}}, "test.ad_reporting.not_null_ad_reporting__campaign_report_campaign_id.1cfaa7698b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_ad_reporting__campaign_report_campaign_id", "resource_type": "test", "package_name": "ad_reporting", "path": "not_null_ad_reporting__campaign_report_campaign_id.sql", "original_file_path": "models/ad_reporting_models.yml", "unique_id": "test.ad_reporting.not_null_ad_reporting__campaign_report_campaign_id.1cfaa7698b", "fqn": ["ad_reporting", "not_null_ad_reporting__campaign_report_campaign_id"], "alias": "not_null_ad_reporting__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.3751526, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "ad_reporting__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.ad_reporting.ad_reporting__campaign_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting_models.yml/not_null_ad_reporting__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.ad_reporting__campaign_report", "attached_node": "model.ad_reporting.ad_reporting__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('ad_reporting__campaign_report')) }}"}, "namespace": null}}, "test.ad_reporting.not_null_ad_reporting__keyword_report_keyword_id.51a45fb334": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_ad_reporting__keyword_report_keyword_id", "resource_type": "test", "package_name": "ad_reporting", "path": "not_null_ad_reporting__keyword_report_keyword_id.sql", "original_file_path": "models/ad_reporting_models.yml", "unique_id": "test.ad_reporting.not_null_ad_reporting__keyword_report_keyword_id.51a45fb334", "fqn": ["ad_reporting", "not_null_ad_reporting__keyword_report_keyword_id"], "alias": "not_null_ad_reporting__keyword_report_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.377614, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "ad_reporting__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.ad_reporting.ad_reporting__keyword_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting_models.yml/not_null_ad_reporting__keyword_report_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__keyword_report\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.ad_reporting__keyword_report", "attached_node": "model.ad_reporting.ad_reporting__keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('ad_reporting__keyword_report')) }}"}, "namespace": null}}, "test.ad_reporting.not_null_ad_reporting__search_report_search_query.ee2f0fcafb": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_ad_reporting__search_report_search_query", "resource_type": "test", "package_name": "ad_reporting", "path": "not_null_ad_reporting__search_report_search_query.sql", "original_file_path": "models/ad_reporting_models.yml", "unique_id": "test.ad_reporting.not_null_ad_reporting__search_report_search_query.ee2f0fcafb", "fqn": ["ad_reporting", "not_null_ad_reporting__search_report_search_query"], "alias": "not_null_ad_reporting__search_report_search_query", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.3801558, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "ad_reporting__search_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.ad_reporting.ad_reporting__search_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting_models.yml/not_null_ad_reporting__search_report_search_query.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect search_query\nfrom \"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__search_report\"\nwhere search_query is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "search_query", "file_key_name": "models.ad_reporting__search_report", "attached_node": "model.ad_reporting.ad_reporting__search_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "search_query", "model": "{{ get_where_subquery(ref('ad_reporting__search_report')) }}"}, "namespace": null}}, "test.ad_reporting.not_null_ad_reporting__url_report_base_url.a29864e5b6": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_ad_reporting__url_report_base_url", "resource_type": "test", "package_name": "ad_reporting", "path": "not_null_ad_reporting__url_report_base_url.sql", "original_file_path": "models/ad_reporting_models.yml", "unique_id": "test.ad_reporting.not_null_ad_reporting__url_report_base_url.a29864e5b6", "fqn": ["ad_reporting", "not_null_ad_reporting__url_report_base_url"], "alias": "not_null_ad_reporting__url_report_base_url", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"enabled": true}, "created_at": 1783450505.3833663, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(enabled=True) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "ad_reporting__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.ad_reporting.ad_reporting__url_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting_models.yml/not_null_ad_reporting__url_report_base_url.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect base_url\nfrom \"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__url_report\"\nwhere base_url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "base_url", "file_key_name": "models.ad_reporting__url_report", "attached_node": "model.ad_reporting.ad_reporting__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "base_url", "model": "{{ get_where_subquery(ref('ad_reporting__url_report')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_tiktok_ads__advertiser_report_date_day.1276998c99": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_tiktok_ads__advertiser_report_date_day", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_tiktok_ads__advertiser_report_date_day.sql", "original_file_path": "models/tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_tiktok_ads__advertiser_report_date_day.1276998c99", "fqn": ["tiktok_ads", "not_null_tiktok_ads__advertiser_report_date_day"], "alias": "not_null_tiktok_ads__advertiser_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.6145928, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "tiktok_ads__advertiser_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.tiktok_ads__advertiser_report"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads.yml/not_null_tiktok_ads__advertiser_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__advertiser_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.tiktok_ads__advertiser_report", "attached_node": "model.tiktok_ads.tiktok_ads__advertiser_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('tiktok_ads__advertiser_report')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_tiktok_ads__advertiser_report_advertiser_id.f956c568ce": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_tiktok_ads__advertiser_report_advertiser_id", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_tiktok_ads__advertiser_report_advertiser_id.sql", "original_file_path": "models/tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_tiktok_ads__advertiser_report_advertiser_id.f956c568ce", "fqn": ["tiktok_ads", "not_null_tiktok_ads__advertiser_report_advertiser_id"], "alias": "not_null_tiktok_ads__advertiser_report_advertiser_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.6171663, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "tiktok_ads__advertiser_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.tiktok_ads__advertiser_report"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads.yml/not_null_tiktok_ads__advertiser_report_advertiser_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect advertiser_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__advertiser_report\"\nwhere advertiser_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "advertiser_id", "file_key_name": "models.tiktok_ads__advertiser_report", "attached_node": "model.tiktok_ads.tiktok_ads__advertiser_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "advertiser_id", "model": "{{ get_where_subquery(ref('tiktok_ads__advertiser_report')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_tiktok_ads__ad_report_date_day.d61ee4a5ed": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_tiktok_ads__ad_report_date_day", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_tiktok_ads__ad_report_date_day.sql", "original_file_path": "models/tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_tiktok_ads__ad_report_date_day.d61ee4a5ed", "fqn": ["tiktok_ads", "not_null_tiktok_ads__ad_report_date_day"], "alias": "not_null_tiktok_ads__ad_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.6196191, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "tiktok_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.tiktok_ads__ad_report"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads.yml/not_null_tiktok_ads__ad_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__ad_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.tiktok_ads__ad_report", "attached_node": "model.tiktok_ads.tiktok_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('tiktok_ads__ad_report')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_tiktok_ads__ad_report_ad_id.2d8166e707": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_tiktok_ads__ad_report_ad_id", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_tiktok_ads__ad_report_ad_id.sql", "original_file_path": "models/tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_tiktok_ads__ad_report_ad_id.2d8166e707", "fqn": ["tiktok_ads", "not_null_tiktok_ads__ad_report_ad_id"], "alias": "not_null_tiktok_ads__ad_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.6226401, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "tiktok_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.tiktok_ads__ad_report"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads.yml/not_null_tiktok_ads__ad_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__ad_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.tiktok_ads__ad_report", "attached_node": "model.tiktok_ads.tiktok_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('tiktok_ads__ad_report')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_tiktok_ads__ad_group_report_date_day.e39164964e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_tiktok_ads__ad_group_report_date_day", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_tiktok_ads__ad_group_report_date_day.sql", "original_file_path": "models/tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_tiktok_ads__ad_group_report_date_day.e39164964e", "fqn": ["tiktok_ads", "not_null_tiktok_ads__ad_group_report_date_day"], "alias": "not_null_tiktok_ads__ad_group_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.6250837, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "tiktok_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.tiktok_ads__ad_group_report"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads.yml/not_null_tiktok_ads__ad_group_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__ad_group_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.tiktok_ads__ad_group_report", "attached_node": "model.tiktok_ads.tiktok_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('tiktok_ads__ad_group_report')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_tiktok_ads__ad_group_report_ad_group_id.17fb8710f4": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_tiktok_ads__ad_group_report_ad_group_id", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_tiktok_ads__ad_group_report_ad_group_id.sql", "original_file_path": "models/tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_tiktok_ads__ad_group_report_ad_group_id.17fb8710f4", "fqn": ["tiktok_ads", "not_null_tiktok_ads__ad_group_report_ad_group_id"], "alias": "not_null_tiktok_ads__ad_group_report_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.627521, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "tiktok_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.tiktok_ads__ad_group_report"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads.yml/not_null_tiktok_ads__ad_group_report_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__ad_group_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.tiktok_ads__ad_group_report", "attached_node": "model.tiktok_ads.tiktok_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('tiktok_ads__ad_group_report')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_tiktok_ads__campaign_report_date_day.3807b0e836": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_tiktok_ads__campaign_report_date_day", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_tiktok_ads__campaign_report_date_day.sql", "original_file_path": "models/tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_tiktok_ads__campaign_report_date_day.3807b0e836", "fqn": ["tiktok_ads", "not_null_tiktok_ads__campaign_report_date_day"], "alias": "not_null_tiktok_ads__campaign_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.6299715, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "tiktok_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.tiktok_ads__campaign_report"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads.yml/not_null_tiktok_ads__campaign_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__campaign_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.tiktok_ads__campaign_report", "attached_node": "model.tiktok_ads.tiktok_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('tiktok_ads__campaign_report')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_tiktok_ads__campaign_report_campaign_id.8a2b0c8ef8": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_tiktok_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_tiktok_ads__campaign_report_campaign_id.sql", "original_file_path": "models/tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_tiktok_ads__campaign_report_campaign_id.8a2b0c8ef8", "fqn": ["tiktok_ads", "not_null_tiktok_ads__campaign_report_campaign_id"], "alias": "not_null_tiktok_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.632525, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "tiktok_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.tiktok_ads__campaign_report"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads.yml/not_null_tiktok_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.tiktok_ads__campaign_report", "attached_node": "model.tiktok_ads.tiktok_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('tiktok_ads__campaign_report')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_tiktok_ads__url_report_date_day.d593573eff": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_tiktok_ads__url_report_date_day", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_tiktok_ads__url_report_date_day.sql", "original_file_path": "models/tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_tiktok_ads__url_report_date_day.d593573eff", "fqn": ["tiktok_ads", "not_null_tiktok_ads__url_report_date_day"], "alias": "not_null_tiktok_ads__url_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.6349623, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "tiktok_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.tiktok_ads__url_report"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads.yml/not_null_tiktok_ads__url_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__url_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.tiktok_ads__url_report", "attached_node": "model.tiktok_ads.tiktok_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('tiktok_ads__url_report')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_tiktok_ads__url_report_ad_id.6c41067bd0": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_tiktok_ads__url_report_ad_id", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_tiktok_ads__url_report_ad_id.sql", "original_file_path": "models/tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_tiktok_ads__url_report_ad_id.6c41067bd0", "fqn": ["tiktok_ads", "not_null_tiktok_ads__url_report_ad_id"], "alias": "not_null_tiktok_ads__url_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.6373553, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "tiktok_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.tiktok_ads__url_report"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads.yml/not_null_tiktok_ads__url_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__url_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.tiktok_ads__url_report", "attached_node": "model.tiktok_ads.tiktok_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('tiktok_ads__url_report')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_tiktok_ads__url_report_base_url.37afef2e1b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_tiktok_ads__url_report_base_url", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_tiktok_ads__url_report_base_url.sql", "original_file_path": "models/tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_tiktok_ads__url_report_base_url.37afef2e1b", "fqn": ["tiktok_ads", "not_null_tiktok_ads__url_report_base_url"], "alias": "not_null_tiktok_ads__url_report_base_url", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"enabled": true}, "created_at": 1783450505.640591, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(enabled=True) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "tiktok_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.tiktok_ads__url_report"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads.yml/not_null_tiktok_ads__url_report_base_url.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect base_url\nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__url_report\"\nwhere base_url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "base_url", "file_key_name": "models.tiktok_ads__url_report", "attached_node": "model.tiktok_ads.tiktok_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "base_url", "model": "{{ get_where_subquery(ref('tiktok_ads__url_report')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_tiktok_ads__campaign_country_report_date_day.c68c1bd379": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_tiktok_ads__campaign_country_report_date_day", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_tiktok_ads__campaign_country_report_date_day.sql", "original_file_path": "models/tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_tiktok_ads__campaign_country_report_date_day.c68c1bd379", "fqn": ["tiktok_ads", "not_null_tiktok_ads__campaign_country_report_date_day"], "alias": "not_null_tiktok_ads__campaign_country_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.6430647, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "tiktok_ads__campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.tiktok_ads__campaign_country_report"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads.yml/not_null_tiktok_ads__campaign_country_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__campaign_country_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.tiktok_ads__campaign_country_report", "attached_node": "model.tiktok_ads.tiktok_ads__campaign_country_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('tiktok_ads__campaign_country_report')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_tiktok_ads__campaign_country_report_campaign_id.f439b91d6d": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_tiktok_ads__campaign_country_report_campaign_id", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_tiktok_ads__campaign_country_report_campaign_id.sql", "original_file_path": "models/tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_tiktok_ads__campaign_country_report_campaign_id.f439b91d6d", "fqn": ["tiktok_ads", "not_null_tiktok_ads__campaign_country_report_campaign_id"], "alias": "not_null_tiktok_ads__campaign_country_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.6456523, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "tiktok_ads__campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.tiktok_ads__campaign_country_report"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads.yml/not_null_tiktok_ads__campaign_country_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__campaign_country_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.tiktok_ads__campaign_country_report", "attached_node": "model.tiktok_ads.tiktok_ads__campaign_country_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('tiktok_ads__campaign_country_report')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_stg_tiktok_ads__advertiser_advertiser_id.5deab92def": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_tiktok_ads__advertiser_advertiser_id", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_stg_tiktok_ads__advertiser_advertiser_id.sql", "original_file_path": "models/staging/stg_tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_stg_tiktok_ads__advertiser_advertiser_id.5deab92def", "fqn": ["tiktok_ads", "staging", "not_null_stg_tiktok_ads__advertiser_advertiser_id"], "alias": "not_null_stg_tiktok_ads__advertiser_advertiser_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.672451, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__advertiser", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__advertiser"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads.yml/not_null_stg_tiktok_ads__advertiser_advertiser_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect advertiser_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__advertiser\"\nwhere advertiser_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "advertiser_id", "file_key_name": "models.stg_tiktok_ads__advertiser", "attached_node": "model.tiktok_ads.stg_tiktok_ads__advertiser", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "advertiser_id", "model": "{{ get_where_subquery(ref('stg_tiktok_ads__advertiser')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_history_ad_group_id.04778d7fad": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_tiktok_ads__ad_group_history_ad_group_id", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_stg_tiktok_ads__ad_group_history_ad_group_id.sql", "original_file_path": "models/staging/stg_tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_history_ad_group_id.04778d7fad", "fqn": ["tiktok_ads", "staging", "not_null_stg_tiktok_ads__ad_group_history_ad_group_id"], "alias": "not_null_stg_tiktok_ads__ad_group_history_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.6749084, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__ad_group_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__ad_group_history"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads.yml/not_null_stg_tiktok_ads__ad_group_history_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_group_history\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_tiktok_ads__ad_group_history", "attached_node": "model.tiktok_ads.stg_tiktok_ads__ad_group_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_tiktok_ads__ad_group_history')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_stg_tiktok_ads__ad_history_ad_id.4ffd05b23a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_tiktok_ads__ad_history_ad_id", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_stg_tiktok_ads__ad_history_ad_id.sql", "original_file_path": "models/staging/stg_tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_stg_tiktok_ads__ad_history_ad_id.4ffd05b23a", "fqn": ["tiktok_ads", "staging", "not_null_stg_tiktok_ads__ad_history_ad_id"], "alias": "not_null_stg_tiktok_ads__ad_history_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.6773388, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__ad_history"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads.yml/not_null_stg_tiktok_ads__ad_history_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_history\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_tiktok_ads__ad_history", "attached_node": "model.tiktok_ads.stg_tiktok_ads__ad_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_tiktok_ads__ad_history')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_history_campaign_id.7f9147d1e1": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_tiktok_ads__campaign_history_campaign_id", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_stg_tiktok_ads__campaign_history_campaign_id.sql", "original_file_path": "models/staging/stg_tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_history_campaign_id.7f9147d1e1", "fqn": ["tiktok_ads", "staging", "not_null_stg_tiktok_ads__campaign_history_campaign_id"], "alias": "not_null_stg_tiktok_ads__campaign_history_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.6799343, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__campaign_history"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads.yml/not_null_stg_tiktok_ads__campaign_history_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_history\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_tiktok_ads__campaign_history", "attached_node": "model.tiktok_ads.stg_tiktok_ads__campaign_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_tiktok_ads__campaign_history')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_stg_tiktok_ads__ad_report_hourly_ad_id.ee84d783ed": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_tiktok_ads__ad_report_hourly_ad_id", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_stg_tiktok_ads__ad_report_hourly_ad_id.sql", "original_file_path": "models/staging/stg_tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_stg_tiktok_ads__ad_report_hourly_ad_id.ee84d783ed", "fqn": ["tiktok_ads", "staging", "not_null_stg_tiktok_ads__ad_report_hourly_ad_id"], "alias": "not_null_stg_tiktok_ads__ad_report_hourly_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.682342, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__ad_report_hourly", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__ad_report_hourly"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads.yml/not_null_stg_tiktok_ads__ad_report_hourly_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_report_hourly\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_tiktok_ads__ad_report_hourly", "attached_node": "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_tiktok_ads__ad_report_hourly')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_stg_tiktok_ads__ad_report_hourly_stat_time_hour.9e2a2dca81": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_tiktok_ads__ad_report_hourly_stat_time_hour", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_stg_tiktok_ads__ad_report_hourly_stat_time_hour.sql", "original_file_path": "models/staging/stg_tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_stg_tiktok_ads__ad_report_hourly_stat_time_hour.9e2a2dca81", "fqn": ["tiktok_ads", "staging", "not_null_stg_tiktok_ads__ad_report_hourly_stat_time_hour"], "alias": "not_null_stg_tiktok_ads__ad_report_hourly_stat_time_hour", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.6847732, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__ad_report_hourly", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__ad_report_hourly"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads.yml/not_null_stg_tiktok_ads__ad_report_hourly_stat_time_hour.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect stat_time_hour\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_report_hourly\"\nwhere stat_time_hour is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "stat_time_hour", "file_key_name": "models.stg_tiktok_ads__ad_report_hourly", "attached_node": "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "stat_time_hour", "model": "{{ get_where_subquery(ref('stg_tiktok_ads__ad_report_hourly')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_report_hourly_ad_group_id.8da17119f1": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_tiktok_ads__ad_group_report_hourly_ad_group_id", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_stg_tiktok_ads__ad_group_report_hourly_ad_group_id.sql", "original_file_path": "models/staging/stg_tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_report_hourly_ad_group_id.8da17119f1", "fqn": ["tiktok_ads", "staging", "not_null_stg_tiktok_ads__ad_group_report_hourly_ad_group_id"], "alias": "not_null_stg_tiktok_ads__ad_group_report_hourly_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.6871753, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__ad_group_report_hourly", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads.yml/not_null_stg_tiktok_ads__ad_group_report_hourly_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_group_report_hourly\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_tiktok_ads__ad_group_report_hourly", "attached_node": "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_tiktok_ads__ad_group_report_hourly')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_report_hourly_stat_time_hour.ca4b495127": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_tiktok_ads__ad_group_report_hourly_stat_time_hour", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_stg_tiktok_ads__ad_group_report_hourly_stat_time_hour.sql", "original_file_path": "models/staging/stg_tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_report_hourly_stat_time_hour.ca4b495127", "fqn": ["tiktok_ads", "staging", "not_null_stg_tiktok_ads__ad_group_report_hourly_stat_time_hour"], "alias": "not_null_stg_tiktok_ads__ad_group_report_hourly_stat_time_hour", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.6896803, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__ad_group_report_hourly", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads.yml/not_null_stg_tiktok_ads__ad_group_report_hourly_stat_time_hour.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect stat_time_hour\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_group_report_hourly\"\nwhere stat_time_hour is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "stat_time_hour", "file_key_name": "models.stg_tiktok_ads__ad_group_report_hourly", "attached_node": "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "stat_time_hour", "model": "{{ get_where_subquery(ref('stg_tiktok_ads__ad_group_report_hourly')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_report_hourly_campaign_id.ef898379fb": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_tiktok_ads__campaign_report_hourly_campaign_id", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_stg_tiktok_ads__campaign_report_hourly_campaign_id.sql", "original_file_path": "models/staging/stg_tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_report_hourly_campaign_id.ef898379fb", "fqn": ["tiktok_ads", "staging", "not_null_stg_tiktok_ads__campaign_report_hourly_campaign_id"], "alias": "not_null_stg_tiktok_ads__campaign_report_hourly_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.6920729, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__campaign_report_hourly", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads.yml/not_null_stg_tiktok_ads__campaign_report_hourly_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_report_hourly\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_tiktok_ads__campaign_report_hourly", "attached_node": "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_tiktok_ads__campaign_report_hourly')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_report_hourly_stat_time_hour.e75e13184c": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_tiktok_ads__campaign_report_hourly_stat_time_hour", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_stg_tiktok_ads__campaign_report_hourly_stat_time_hour.sql", "original_file_path": "models/staging/stg_tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_report_hourly_stat_time_hour.e75e13184c", "fqn": ["tiktok_ads", "staging", "not_null_stg_tiktok_ads__campaign_report_hourly_stat_time_hour"], "alias": "not_null_stg_tiktok_ads__campaign_report_hourly_stat_time_hour", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.694445, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__campaign_report_hourly", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads.yml/not_null_stg_tiktok_ads__campaign_report_hourly_stat_time_hour.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect stat_time_hour\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_report_hourly\"\nwhere stat_time_hour is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "stat_time_hour", "file_key_name": "models.stg_tiktok_ads__campaign_report_hourly", "attached_node": "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "stat_time_hour", "model": "{{ get_where_subquery(ref('stg_tiktok_ads__campaign_report_hourly')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_microsoft_ads__account_report_account_id.f88e46157e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_microsoft_ads__account_report_account_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_microsoft_ads__account_report_account_id.sql", "original_file_path": "models/microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_microsoft_ads__account_report_account_id.f88e46157e", "fqn": ["microsoft_ads", "not_null_microsoft_ads__account_report_account_id"], "alias": "not_null_microsoft_ads__account_report_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.7781236, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "microsoft_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.microsoft_ads__account_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads.yml/not_null_microsoft_ads__account_report_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__account_report\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.microsoft_ads__account_report", "attached_node": "model.microsoft_ads.microsoft_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('microsoft_ads__account_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_microsoft_ads__ad_group_report_ad_group_id.1974ec5ab9": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_microsoft_ads__ad_group_report_ad_group_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_microsoft_ads__ad_group_report_ad_group_id.sql", "original_file_path": "models/microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_microsoft_ads__ad_group_report_ad_group_id.1974ec5ab9", "fqn": ["microsoft_ads", "not_null_microsoft_ads__ad_group_report_ad_group_id"], "alias": "not_null_microsoft_ads__ad_group_report_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.780775, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "microsoft_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.microsoft_ads__ad_group_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads.yml/not_null_microsoft_ads__ad_group_report_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__ad_group_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.microsoft_ads__ad_group_report", "attached_node": "model.microsoft_ads.microsoft_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('microsoft_ads__ad_group_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_microsoft_ads__ad_report_ad_id.b089709125": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_microsoft_ads__ad_report_ad_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_microsoft_ads__ad_report_ad_id.sql", "original_file_path": "models/microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_microsoft_ads__ad_report_ad_id.b089709125", "fqn": ["microsoft_ads", "not_null_microsoft_ads__ad_report_ad_id"], "alias": "not_null_microsoft_ads__ad_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.7832456, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "microsoft_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.microsoft_ads__ad_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads.yml/not_null_microsoft_ads__ad_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__ad_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.microsoft_ads__ad_report", "attached_node": "model.microsoft_ads.microsoft_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('microsoft_ads__ad_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_microsoft_ads__campaign_report_campaign_id.67aa50e1f8": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_microsoft_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_microsoft_ads__campaign_report_campaign_id.sql", "original_file_path": "models/microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_microsoft_ads__campaign_report_campaign_id.67aa50e1f8", "fqn": ["microsoft_ads", "not_null_microsoft_ads__campaign_report_campaign_id"], "alias": "not_null_microsoft_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.7857475, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "microsoft_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.microsoft_ads__campaign_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads.yml/not_null_microsoft_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.microsoft_ads__campaign_report", "attached_node": "model.microsoft_ads.microsoft_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('microsoft_ads__campaign_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_microsoft_ads__keyword_report_keyword_id.da1d648d3b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_microsoft_ads__keyword_report_keyword_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_microsoft_ads__keyword_report_keyword_id.sql", "original_file_path": "models/microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_microsoft_ads__keyword_report_keyword_id.da1d648d3b", "fqn": ["microsoft_ads", "not_null_microsoft_ads__keyword_report_keyword_id"], "alias": "not_null_microsoft_ads__keyword_report_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.7882414, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "microsoft_ads__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.microsoft_ads__keyword_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads.yml/not_null_microsoft_ads__keyword_report_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__keyword_report\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.microsoft_ads__keyword_report", "attached_node": "model.microsoft_ads.microsoft_ads__keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('microsoft_ads__keyword_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_microsoft_ads__search_report_search_query.fa3625d66d": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_microsoft_ads__search_report_search_query", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_microsoft_ads__search_report_search_query.sql", "original_file_path": "models/microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_microsoft_ads__search_report_search_query.fa3625d66d", "fqn": ["microsoft_ads", "not_null_microsoft_ads__search_report_search_query"], "alias": "not_null_microsoft_ads__search_report_search_query", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.790657, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "microsoft_ads__search_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.microsoft_ads__search_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads.yml/not_null_microsoft_ads__search_report_search_query.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect search_query\nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__search_report\"\nwhere search_query is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "search_query", "file_key_name": "models.microsoft_ads__search_report", "attached_node": "model.microsoft_ads.microsoft_ads__search_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "search_query", "model": "{{ get_where_subquery(ref('microsoft_ads__search_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_microsoft_ads__url_report_base_url.c1af50307a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_microsoft_ads__url_report_base_url", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_microsoft_ads__url_report_base_url.sql", "original_file_path": "models/microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_microsoft_ads__url_report_base_url.c1af50307a", "fqn": ["microsoft_ads", "not_null_microsoft_ads__url_report_base_url"], "alias": "not_null_microsoft_ads__url_report_base_url", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"enabled": true}, "created_at": 1783450505.7938328, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(enabled=True) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "microsoft_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.microsoft_ads__url_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads.yml/not_null_microsoft_ads__url_report_base_url.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect base_url\nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__url_report\"\nwhere base_url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "base_url", "file_key_name": "models.microsoft_ads__url_report", "attached_node": "model.microsoft_ads.microsoft_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "base_url", "model": "{{ get_where_subquery(ref('microsoft_ads__url_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_microsoft_ads__campaign_country_report_account_id.9d9807033d": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_microsoft_ads__campaign_country_report_account_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_microsoft_ads__campaign_country_report_account_id.sql", "original_file_path": "models/microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_microsoft_ads__campaign_country_report_account_id.9d9807033d", "fqn": ["microsoft_ads", "not_null_microsoft_ads__campaign_country_report_account_id"], "alias": "not_null_microsoft_ads__campaign_country_report_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.7963314, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "microsoft_ads__campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.microsoft_ads__campaign_country_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads.yml/not_null_microsoft_ads__campaign_country_report_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_country_report\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.microsoft_ads__campaign_country_report", "attached_node": "model.microsoft_ads.microsoft_ads__campaign_country_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('microsoft_ads__campaign_country_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_microsoft_ads__campaign_country_report_campaign_id.10b01e8782": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_microsoft_ads__campaign_country_report_campaign_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_microsoft_ads__campaign_country_report_campaign_id.sql", "original_file_path": "models/microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_microsoft_ads__campaign_country_report_campaign_id.10b01e8782", "fqn": ["microsoft_ads", "not_null_microsoft_ads__campaign_country_report_campaign_id"], "alias": "not_null_microsoft_ads__campaign_country_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.799281, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "microsoft_ads__campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.microsoft_ads__campaign_country_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads.yml/not_null_microsoft_ads__campaign_country_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_country_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.microsoft_ads__campaign_country_report", "attached_node": "model.microsoft_ads.microsoft_ads__campaign_country_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('microsoft_ads__campaign_country_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_microsoft_ads__campaign_region_report_account_id.b3a2b47986": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_microsoft_ads__campaign_region_report_account_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_microsoft_ads__campaign_region_report_account_id.sql", "original_file_path": "models/microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_microsoft_ads__campaign_region_report_account_id.b3a2b47986", "fqn": ["microsoft_ads", "not_null_microsoft_ads__campaign_region_report_account_id"], "alias": "not_null_microsoft_ads__campaign_region_report_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.801758, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "microsoft_ads__campaign_region_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.microsoft_ads__campaign_region_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads.yml/not_null_microsoft_ads__campaign_region_report_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_region_report\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.microsoft_ads__campaign_region_report", "attached_node": "model.microsoft_ads.microsoft_ads__campaign_region_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('microsoft_ads__campaign_region_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_microsoft_ads__campaign_region_report_campaign_id.b1d4f5a20f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_microsoft_ads__campaign_region_report_campaign_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_microsoft_ads__campaign_region_report_campaign_id.sql", "original_file_path": "models/microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_microsoft_ads__campaign_region_report_campaign_id.b1d4f5a20f", "fqn": ["microsoft_ads", "not_null_microsoft_ads__campaign_region_report_campaign_id"], "alias": "not_null_microsoft_ads__campaign_region_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.8041837, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "microsoft_ads__campaign_region_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.microsoft_ads__campaign_region_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads.yml/not_null_microsoft_ads__campaign_region_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_region_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.microsoft_ads__campaign_region_report", "attached_node": "model.microsoft_ads.microsoft_ads__campaign_region_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('microsoft_ads__campaign_region_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_stg_microsoft_ads__account_history_account_id.cc273ee54e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_microsoft_ads__account_history_account_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_stg_microsoft_ads__account_history_account_id.sql", "original_file_path": "models/staging/stg_microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_stg_microsoft_ads__account_history_account_id.cc273ee54e", "fqn": ["microsoft_ads", "staging", "not_null_stg_microsoft_ads__account_history_account_id"], "alias": "not_null_stg_microsoft_ads__account_history_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.8607311, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__account_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads.yml/not_null_stg_microsoft_ads__account_history_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_history\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.stg_microsoft_ads__account_history", "attached_node": "model.microsoft_ads.stg_microsoft_ads__account_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('stg_microsoft_ads__account_history')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_stg_microsoft_ads__account_daily_report_account_id.b17f45fe79": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_microsoft_ads__account_daily_report_account_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_stg_microsoft_ads__account_daily_report_account_id.sql", "original_file_path": "models/staging/stg_microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_stg_microsoft_ads__account_daily_report_account_id.b17f45fe79", "fqn": ["microsoft_ads", "staging", "not_null_stg_microsoft_ads__account_daily_report_account_id"], "alias": "not_null_stg_microsoft_ads__account_daily_report_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.9799438, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__account_daily_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__account_daily_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads.yml/not_null_stg_microsoft_ads__account_daily_report_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_daily_report\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.stg_microsoft_ads__account_daily_report", "attached_node": "model.microsoft_ads.stg_microsoft_ads__account_daily_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('stg_microsoft_ads__account_daily_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_stg_microsoft_ads__ad_group_history_ad_group_id.c8353342b7": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_microsoft_ads__ad_group_history_ad_group_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_stg_microsoft_ads__ad_group_history_ad_group_id.sql", "original_file_path": "models/staging/stg_microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_stg_microsoft_ads__ad_group_history_ad_group_id.c8353342b7", "fqn": ["microsoft_ads", "staging", "not_null_stg_microsoft_ads__ad_group_history_ad_group_id"], "alias": "not_null_stg_microsoft_ads__ad_group_history_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.9824347, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__ad_group_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__ad_group_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads.yml/not_null_stg_microsoft_ads__ad_group_history_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_group_history\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_microsoft_ads__ad_group_history", "attached_node": "model.microsoft_ads.stg_microsoft_ads__ad_group_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_microsoft_ads__ad_group_history')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_stg_microsoft_ads__ad_group_daily_report_ad_group_id.3e03e6eff7": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_microsoft_ads__ad_group_daily_report_ad_group_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_stg_microsoft_ads__ad_group_daily_report_ad_group_id.sql", "original_file_path": "models/staging/stg_microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_stg_microsoft_ads__ad_group_daily_report_ad_group_id.3e03e6eff7", "fqn": ["microsoft_ads", "staging", "not_null_stg_microsoft_ads__ad_group_daily_report_ad_group_id"], "alias": "not_null_stg_microsoft_ads__ad_group_daily_report_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.9848773, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__ad_group_daily_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads.yml/not_null_stg_microsoft_ads__ad_group_daily_report_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_group_daily_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_microsoft_ads__ad_group_daily_report", "attached_node": "model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_microsoft_ads__ad_group_daily_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_stg_microsoft_ads__ad_history_ad_id.6d02c26574": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_microsoft_ads__ad_history_ad_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_stg_microsoft_ads__ad_history_ad_id.sql", "original_file_path": "models/staging/stg_microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_stg_microsoft_ads__ad_history_ad_id.6d02c26574", "fqn": ["microsoft_ads", "staging", "not_null_stg_microsoft_ads__ad_history_ad_id"], "alias": "not_null_stg_microsoft_ads__ad_history_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.9874446, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__ad_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads.yml/not_null_stg_microsoft_ads__ad_history_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_history\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_microsoft_ads__ad_history", "attached_node": "model.microsoft_ads.stg_microsoft_ads__ad_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_microsoft_ads__ad_history')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_stg_microsoft_ads__ad_daily_report_ad_id.1ed6689aa8": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_microsoft_ads__ad_daily_report_ad_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_stg_microsoft_ads__ad_daily_report_ad_id.sql", "original_file_path": "models/staging/stg_microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_stg_microsoft_ads__ad_daily_report_ad_id.1ed6689aa8", "fqn": ["microsoft_ads", "staging", "not_null_stg_microsoft_ads__ad_daily_report_ad_id"], "alias": "not_null_stg_microsoft_ads__ad_daily_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.989937, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__ad_daily_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__ad_daily_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads.yml/not_null_stg_microsoft_ads__ad_daily_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_daily_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_microsoft_ads__ad_daily_report", "attached_node": "model.microsoft_ads.stg_microsoft_ads__ad_daily_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_microsoft_ads__ad_daily_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_stg_microsoft_ads__campaign_history_campaign_id.ee080a2122": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_microsoft_ads__campaign_history_campaign_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_stg_microsoft_ads__campaign_history_campaign_id.sql", "original_file_path": "models/staging/stg_microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_stg_microsoft_ads__campaign_history_campaign_id.ee080a2122", "fqn": ["microsoft_ads", "staging", "not_null_stg_microsoft_ads__campaign_history_campaign_id"], "alias": "not_null_stg_microsoft_ads__campaign_history_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.99246, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__campaign_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads.yml/not_null_stg_microsoft_ads__campaign_history_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_history\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_microsoft_ads__campaign_history", "attached_node": "model.microsoft_ads.stg_microsoft_ads__campaign_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_microsoft_ads__campaign_history')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_stg_microsoft_ads__campaign_daily_report_campaign_id.8ac0418e84": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_microsoft_ads__campaign_daily_report_campaign_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_stg_microsoft_ads__campaign_daily_report_campaign_id.sql", "original_file_path": "models/staging/stg_microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_stg_microsoft_ads__campaign_daily_report_campaign_id.8ac0418e84", "fqn": ["microsoft_ads", "staging", "not_null_stg_microsoft_ads__campaign_daily_report_campaign_id"], "alias": "not_null_stg_microsoft_ads__campaign_daily_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.9948924, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__campaign_daily_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__campaign_daily_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads.yml/not_null_stg_microsoft_ads__campaign_daily_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_daily_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_microsoft_ads__campaign_daily_report", "attached_node": "model.microsoft_ads.stg_microsoft_ads__campaign_daily_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_microsoft_ads__campaign_daily_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_stg_microsoft_ads__keyword_history_keyword_id.19164a6209": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_microsoft_ads__keyword_history_keyword_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_stg_microsoft_ads__keyword_history_keyword_id.sql", "original_file_path": "models/staging/stg_microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_stg_microsoft_ads__keyword_history_keyword_id.19164a6209", "fqn": ["microsoft_ads", "staging", "not_null_stg_microsoft_ads__keyword_history_keyword_id"], "alias": "not_null_stg_microsoft_ads__keyword_history_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450505.9976377, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__keyword_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__keyword_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads.yml/not_null_stg_microsoft_ads__keyword_history_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__keyword_history\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.stg_microsoft_ads__keyword_history", "attached_node": "model.microsoft_ads.stg_microsoft_ads__keyword_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('stg_microsoft_ads__keyword_history')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_stg_microsoft_ads__keyword_daily_report_keyword_id.e16b8c5047": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_microsoft_ads__keyword_daily_report_keyword_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_stg_microsoft_ads__keyword_daily_report_keyword_id.sql", "original_file_path": "models/staging/stg_microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_stg_microsoft_ads__keyword_daily_report_keyword_id.e16b8c5047", "fqn": ["microsoft_ads", "staging", "not_null_stg_microsoft_ads__keyword_daily_report_keyword_id"], "alias": "not_null_stg_microsoft_ads__keyword_daily_report_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450506.000068, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__keyword_daily_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__keyword_daily_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads.yml/not_null_stg_microsoft_ads__keyword_daily_report_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__keyword_daily_report\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.stg_microsoft_ads__keyword_daily_report", "attached_node": "model.microsoft_ads.stg_microsoft_ads__keyword_daily_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('stg_microsoft_ads__keyword_daily_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_stg_microsoft_ads__search_daily_report_search_query.57f687adcc": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_microsoft_ads__search_daily_report_search_query", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_stg_microsoft_ads__search_daily_report_search_query.sql", "original_file_path": "models/staging/stg_microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_stg_microsoft_ads__search_daily_report_search_query.57f687adcc", "fqn": ["microsoft_ads", "staging", "not_null_stg_microsoft_ads__search_daily_report_search_query"], "alias": "not_null_stg_microsoft_ads__search_daily_report_search_query", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450506.00253, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__search_daily_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__search_daily_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads.yml/not_null_stg_microsoft_ads__search_daily_report_search_query.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect search_query\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__search_daily_report\"\nwhere search_query is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "search_query", "file_key_name": "models.stg_microsoft_ads__search_daily_report", "attached_node": "model.microsoft_ads.stg_microsoft_ads__search_daily_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "search_query", "model": "{{ get_where_subquery(ref('stg_microsoft_ads__search_daily_report')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_facebook_ads__url_report_base_url.b7757e50be": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_facebook_ads__url_report_base_url", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_facebook_ads__url_report_base_url.sql", "original_file_path": "models/facebook.yml", "unique_id": "test.facebook_ads.not_null_facebook_ads__url_report_base_url.b7757e50be", "fqn": ["facebook_ads", "not_null_facebook_ads__url_report_base_url"], "alias": "not_null_facebook_ads__url_report_base_url", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"enabled": true}, "created_at": 1783450506.0437684, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(enabled=True) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "facebook_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.facebook_ads__url_report"]}, "compiled_path": "target/compiled/facebook_ads/models/facebook.yml/not_null_facebook_ads__url_report_base_url.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect base_url\nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__url_report\"\nwhere base_url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "base_url", "file_key_name": "models.facebook_ads__url_report", "attached_node": "model.facebook_ads.facebook_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "base_url", "model": "{{ get_where_subquery(ref('facebook_ads__url_report')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_facebook_ads__ad_report_ad_id.3811d9c238": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_facebook_ads__ad_report_ad_id", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_facebook_ads__ad_report_ad_id.sql", "original_file_path": "models/facebook.yml", "unique_id": "test.facebook_ads.not_null_facebook_ads__ad_report_ad_id.3811d9c238", "fqn": ["facebook_ads", "not_null_facebook_ads__ad_report_ad_id"], "alias": "not_null_facebook_ads__ad_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450506.0464137, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "facebook_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.facebook_ads__ad_report"]}, "compiled_path": "target/compiled/facebook_ads/models/facebook.yml/not_null_facebook_ads__ad_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__ad_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.facebook_ads__ad_report", "attached_node": "model.facebook_ads.facebook_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('facebook_ads__ad_report')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_facebook_ads__ad_set_report_ad_set_id.1ac870f5e4": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_facebook_ads__ad_set_report_ad_set_id", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_facebook_ads__ad_set_report_ad_set_id.sql", "original_file_path": "models/facebook.yml", "unique_id": "test.facebook_ads.not_null_facebook_ads__ad_set_report_ad_set_id.1ac870f5e4", "fqn": ["facebook_ads", "not_null_facebook_ads__ad_set_report_ad_set_id"], "alias": "not_null_facebook_ads__ad_set_report_ad_set_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450506.0489948, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "facebook_ads__ad_set_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.facebook_ads__ad_set_report"]}, "compiled_path": "target/compiled/facebook_ads/models/facebook.yml/not_null_facebook_ads__ad_set_report_ad_set_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_set_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__ad_set_report\"\nwhere ad_set_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_set_id", "file_key_name": "models.facebook_ads__ad_set_report", "attached_node": "model.facebook_ads.facebook_ads__ad_set_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_set_id", "model": "{{ get_where_subquery(ref('facebook_ads__ad_set_report')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_facebook_ads__campaign_report_campaign_id.d4f96d8d21": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_facebook_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_facebook_ads__campaign_report_campaign_id.sql", "original_file_path": "models/facebook.yml", "unique_id": "test.facebook_ads.not_null_facebook_ads__campaign_report_campaign_id.d4f96d8d21", "fqn": ["facebook_ads", "not_null_facebook_ads__campaign_report_campaign_id"], "alias": "not_null_facebook_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450506.0514827, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "facebook_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.facebook_ads__campaign_report"]}, "compiled_path": "target/compiled/facebook_ads/models/facebook.yml/not_null_facebook_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.facebook_ads__campaign_report", "attached_node": "model.facebook_ads.facebook_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('facebook_ads__campaign_report')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_facebook_ads__account_report_account_id.9be02b4024": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_facebook_ads__account_report_account_id", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_facebook_ads__account_report_account_id.sql", "original_file_path": "models/facebook.yml", "unique_id": "test.facebook_ads.not_null_facebook_ads__account_report_account_id.9be02b4024", "fqn": ["facebook_ads", "not_null_facebook_ads__account_report_account_id"], "alias": "not_null_facebook_ads__account_report_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450506.0539207, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "facebook_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.facebook_ads__account_report"]}, "compiled_path": "target/compiled/facebook_ads/models/facebook.yml/not_null_facebook_ads__account_report_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__account_report\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.facebook_ads__account_report", "attached_node": "model.facebook_ads.facebook_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('facebook_ads__account_report')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_facebook_ads__url_tags__fivetran_id.151d9515f3": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_facebook_ads__url_tags__fivetran_id", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_facebook_ads__url_tags__fivetran_id.sql", "original_file_path": "models/facebook.yml", "unique_id": "test.facebook_ads.not_null_facebook_ads__url_tags__fivetran_id.151d9515f3", "fqn": ["facebook_ads", "not_null_facebook_ads__url_tags__fivetran_id"], "alias": "not_null_facebook_ads__url_tags__fivetran_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450506.0563457, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "facebook_ads__url_tags", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.facebook_ads__url_tags"]}, "compiled_path": "target/compiled/facebook_ads/models/facebook.yml/not_null_facebook_ads__url_tags__fivetran_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect _fivetran_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__url_tags\"\nwhere _fivetran_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "_fivetran_id", "file_key_name": "models.facebook_ads__url_tags", "attached_node": "model.facebook_ads.facebook_ads__url_tags", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_fivetran_id", "model": "{{ get_where_subquery(ref('facebook_ads__url_tags')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_stg_facebook_ads__account_history_account_id.f1cf38c40f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_facebook_ads__account_history_account_id", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_stg_facebook_ads__account_history_account_id.sql", "original_file_path": "models/staging/stg_facebook_ads.yml", "unique_id": "test.facebook_ads.not_null_stg_facebook_ads__account_history_account_id.f1cf38c40f", "fqn": ["facebook_ads", "staging", "not_null_stg_facebook_ads__account_history_account_id"], "alias": "not_null_stg_facebook_ads__account_history_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450506.1059208, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.stg_facebook_ads__account_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads.yml/not_null_stg_facebook_ads__account_history_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__account_history\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.stg_facebook_ads__account_history", "attached_node": "model.facebook_ads.stg_facebook_ads__account_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('stg_facebook_ads__account_history')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_stg_facebook_ads__account_history__fivetran_synced.0570e35e1f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_facebook_ads__account_history__fivetran_synced", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_stg_facebook_ads__account_history__fivetran_synced.sql", "original_file_path": "models/staging/stg_facebook_ads.yml", "unique_id": "test.facebook_ads.not_null_stg_facebook_ads__account_history__fivetran_synced.0570e35e1f", "fqn": ["facebook_ads", "staging", "not_null_stg_facebook_ads__account_history__fivetran_synced"], "alias": "not_null_stg_facebook_ads__account_history__fivetran_synced", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450506.1085007, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.stg_facebook_ads__account_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads.yml/not_null_stg_facebook_ads__account_history__fivetran_synced.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect _fivetran_synced\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__account_history\"\nwhere _fivetran_synced is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "_fivetran_synced", "file_key_name": "models.stg_facebook_ads__account_history", "attached_node": "model.facebook_ads.stg_facebook_ads__account_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_fivetran_synced", "model": "{{ get_where_subquery(ref('stg_facebook_ads__account_history')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_stg_facebook_ads__ad_history_ad_id.11429d3064": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_facebook_ads__ad_history_ad_id", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_stg_facebook_ads__ad_history_ad_id.sql", "original_file_path": "models/staging/stg_facebook_ads.yml", "unique_id": "test.facebook_ads.not_null_stg_facebook_ads__ad_history_ad_id.11429d3064", "fqn": ["facebook_ads", "staging", "not_null_stg_facebook_ads__ad_history_ad_id"], "alias": "not_null_stg_facebook_ads__ad_history_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450506.1110492, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.stg_facebook_ads__ad_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads.yml/not_null_stg_facebook_ads__ad_history_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_history\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_facebook_ads__ad_history", "attached_node": "model.facebook_ads.stg_facebook_ads__ad_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_facebook_ads__ad_history')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_stg_facebook_ads__ad_history_updated_at.250a5a84e4": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_facebook_ads__ad_history_updated_at", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_stg_facebook_ads__ad_history_updated_at.sql", "original_file_path": "models/staging/stg_facebook_ads.yml", "unique_id": "test.facebook_ads.not_null_stg_facebook_ads__ad_history_updated_at.250a5a84e4", "fqn": ["facebook_ads", "staging", "not_null_stg_facebook_ads__ad_history_updated_at"], "alias": "not_null_stg_facebook_ads__ad_history_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450506.11366, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.stg_facebook_ads__ad_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads.yml/not_null_stg_facebook_ads__ad_history_updated_at.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect updated_at\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_history\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "models.stg_facebook_ads__ad_history", "attached_node": "model.facebook_ads.stg_facebook_ads__ad_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(ref('stg_facebook_ads__ad_history')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_stg_facebook_ads__ad_set_history_ad_set_id.e19a1df1bb": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_facebook_ads__ad_set_history_ad_set_id", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_stg_facebook_ads__ad_set_history_ad_set_id.sql", "original_file_path": "models/staging/stg_facebook_ads.yml", "unique_id": "test.facebook_ads.not_null_stg_facebook_ads__ad_set_history_ad_set_id.e19a1df1bb", "fqn": ["facebook_ads", "staging", "not_null_stg_facebook_ads__ad_set_history_ad_set_id"], "alias": "not_null_stg_facebook_ads__ad_set_history_ad_set_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450506.116136, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__ad_set_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.stg_facebook_ads__ad_set_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads.yml/not_null_stg_facebook_ads__ad_set_history_ad_set_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_set_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_set_history\"\nwhere ad_set_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_set_id", "file_key_name": "models.stg_facebook_ads__ad_set_history", "attached_node": "model.facebook_ads.stg_facebook_ads__ad_set_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_set_id", "model": "{{ get_where_subquery(ref('stg_facebook_ads__ad_set_history')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_stg_facebook_ads__ad_set_history_updated_at.ef7fafe0fa": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_facebook_ads__ad_set_history_updated_at", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_stg_facebook_ads__ad_set_history_updated_at.sql", "original_file_path": "models/staging/stg_facebook_ads.yml", "unique_id": "test.facebook_ads.not_null_stg_facebook_ads__ad_set_history_updated_at.ef7fafe0fa", "fqn": ["facebook_ads", "staging", "not_null_stg_facebook_ads__ad_set_history_updated_at"], "alias": "not_null_stg_facebook_ads__ad_set_history_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450506.1186259, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__ad_set_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.stg_facebook_ads__ad_set_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads.yml/not_null_stg_facebook_ads__ad_set_history_updated_at.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect updated_at\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_set_history\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "models.stg_facebook_ads__ad_set_history", "attached_node": "model.facebook_ads.stg_facebook_ads__ad_set_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(ref('stg_facebook_ads__ad_set_history')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_stg_facebook_ads__campaign_history_campaign_id.1ca7a83852": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_facebook_ads__campaign_history_campaign_id", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_stg_facebook_ads__campaign_history_campaign_id.sql", "original_file_path": "models/staging/stg_facebook_ads.yml", "unique_id": "test.facebook_ads.not_null_stg_facebook_ads__campaign_history_campaign_id.1ca7a83852", "fqn": ["facebook_ads", "staging", "not_null_stg_facebook_ads__campaign_history_campaign_id"], "alias": "not_null_stg_facebook_ads__campaign_history_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450506.1210642, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.stg_facebook_ads__campaign_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads.yml/not_null_stg_facebook_ads__campaign_history_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__campaign_history\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_facebook_ads__campaign_history", "attached_node": "model.facebook_ads.stg_facebook_ads__campaign_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_facebook_ads__campaign_history')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_stg_facebook_ads__campaign_history_updated_at.9e59f99270": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_facebook_ads__campaign_history_updated_at", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_stg_facebook_ads__campaign_history_updated_at.sql", "original_file_path": "models/staging/stg_facebook_ads.yml", "unique_id": "test.facebook_ads.not_null_stg_facebook_ads__campaign_history_updated_at.9e59f99270", "fqn": ["facebook_ads", "staging", "not_null_stg_facebook_ads__campaign_history_updated_at"], "alias": "not_null_stg_facebook_ads__campaign_history_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450506.1235156, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.stg_facebook_ads__campaign_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads.yml/not_null_stg_facebook_ads__campaign_history_updated_at.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect updated_at\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__campaign_history\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "models.stg_facebook_ads__campaign_history", "attached_node": "model.facebook_ads.stg_facebook_ads__campaign_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(ref('stg_facebook_ads__campaign_history')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_stg_facebook_ads__creative_history__fivetran_synced.3b0593cb4f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_facebook_ads__creative_history__fivetran_synced", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_stg_facebook_ads__creative_history__fivetran_synced.sql", "original_file_path": "models/staging/stg_facebook_ads.yml", "unique_id": "test.facebook_ads.not_null_stg_facebook_ads__creative_history__fivetran_synced.3b0593cb4f", "fqn": ["facebook_ads", "staging", "not_null_stg_facebook_ads__creative_history__fivetran_synced"], "alias": "not_null_stg_facebook_ads__creative_history__fivetran_synced", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450506.1260278, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__creative_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.stg_facebook_ads__creative_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads.yml/not_null_stg_facebook_ads__creative_history__fivetran_synced.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect _fivetran_synced\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__creative_history\"\nwhere _fivetran_synced is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "_fivetran_synced", "file_key_name": "models.stg_facebook_ads__creative_history", "attached_node": "model.facebook_ads.stg_facebook_ads__creative_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_fivetran_synced", "model": "{{ get_where_subquery(ref('stg_facebook_ads__creative_history')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_stg_facebook_ads__creative_history_creative_id.eb4d804261": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_facebook_ads__creative_history_creative_id", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_stg_facebook_ads__creative_history_creative_id.sql", "original_file_path": "models/staging/stg_facebook_ads.yml", "unique_id": "test.facebook_ads.not_null_stg_facebook_ads__creative_history_creative_id.eb4d804261", "fqn": ["facebook_ads", "staging", "not_null_stg_facebook_ads__creative_history_creative_id"], "alias": "not_null_stg_facebook_ads__creative_history_creative_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450506.1284752, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__creative_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.stg_facebook_ads__creative_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads.yml/not_null_stg_facebook_ads__creative_history_creative_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect creative_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__creative_history\"\nwhere creative_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "creative_id", "file_key_name": "models.stg_facebook_ads__creative_history", "attached_node": "model.facebook_ads.stg_facebook_ads__creative_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "creative_id", "model": "{{ get_where_subquery(ref('stg_facebook_ads__creative_history')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_stg_facebook_ads__basic_ad_ad_id.2611b250fc": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_facebook_ads__basic_ad_ad_id", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_stg_facebook_ads__basic_ad_ad_id.sql", "original_file_path": "models/staging/stg_facebook_ads.yml", "unique_id": "test.facebook_ads.not_null_stg_facebook_ads__basic_ad_ad_id.2611b250fc", "fqn": ["facebook_ads", "staging", "not_null_stg_facebook_ads__basic_ad_ad_id"], "alias": "not_null_stg_facebook_ads__basic_ad_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450506.1309087, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__basic_ad", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.stg_facebook_ads__basic_ad"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads.yml/not_null_stg_facebook_ads__basic_ad_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_facebook_ads__basic_ad", "attached_node": "model.facebook_ads.stg_facebook_ads__basic_ad", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_facebook_ads__basic_ad')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_stg_facebook_ads__basic_ad_account_id.d06f6d861b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_facebook_ads__basic_ad_account_id", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_stg_facebook_ads__basic_ad_account_id.sql", "original_file_path": "models/staging/stg_facebook_ads.yml", "unique_id": "test.facebook_ads.not_null_stg_facebook_ads__basic_ad_account_id.d06f6d861b", "fqn": ["facebook_ads", "staging", "not_null_stg_facebook_ads__basic_ad_account_id"], "alias": "not_null_stg_facebook_ads__basic_ad_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783450506.1333013, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__basic_ad", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.stg_facebook_ads__basic_ad"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads.yml/not_null_stg_facebook_ads__basic_ad_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.stg_facebook_ads__basic_ad", "attached_node": "model.facebook_ads.stg_facebook_ads__basic_ad", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('stg_facebook_ads__basic_ad')) }}"}, "namespace": null}}}, "sources": {"source.linkedin.linkedin_ads.ad_analytics_by_creative": {"database": "postgres", "schema": "public", "name": "ad_analytics_by_creative", "resource_type": "source", "package_name": "linkedin", "path": "models/staging/src_linkedin.yml", "original_file_path": "models/staging/src_linkedin.yml", "unique_id": "source.linkedin.linkedin_ads.ad_analytics_by_creative", "fqn": ["linkedin", "staging", "linkedin_ads", "ad_analytics_by_creative"], "source_name": "linkedin_ads", "source_description": "", "loader": "fivetran", "identifier": "linkedin_ad_analytics_by_creative_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents the daily performance of ads at the creative level.", "columns": {"creative_id": {"name": "creative_id", "description": "The ID of the related creative.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "day": {"name": "day", "description": "The day of the activity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_in_local_currency": {"name": "cost_in_local_currency", "description": "The cost of the ads in the local currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_in_usd": {"name": "cost_in_usd", "description": "The cost of the ads in the USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"linkedin_ad_analytics_by_creative_data\"", "created_at": 1783450506.165101, "unrendered_database": "{% if target.type != 'spark'%}{{ var('linkedin_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('linkedin_ads_schema', 'linkedin_ads') }}", "doc_blocks": []}, "source.linkedin.linkedin_ads.creative_history": {"database": "postgres", "schema": "public", "name": "creative_history", "resource_type": "source", "package_name": "linkedin", "path": "models/staging/src_linkedin.yml", "original_file_path": "models/staging/src_linkedin.yml", "unique_id": "source.linkedin.linkedin_ads.creative_history", "fqn": ["linkedin", "staging", "linkedin_ads", "creative_history"], "source_name": "linkedin_ads", "source_description": "", "loader": "fivetran", "identifier": "linkedin_ad_creative_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a 'version' of a creative.", "columns": {"id": {"name": "id", "description": "Unique internal ID representing the creative.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_time": {"name": "last_modified_time", "description": "The timestamp of when the version was updated (Linkedin Ads pre-January 2023 API Update).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_at": {"name": "last_modified_at", "description": "The timestamp of when the version was updated (Linkedin Ads post-January 2023 API Update).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_time": {"name": "created_time", "description": "The timestamp of when the creative was created (Linkedin Ads pre-January 2023 API Update).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp of when the creative was created (Linkedin Ads post-January 2023 API Update).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign the creative belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_uri": {"name": "click_uri", "description": "Deprecated url field. Please refer to the text_ad_landing_page and spotlight_landing_page fields for relevant landing page information.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "text_ad_landing_page": {"name": "text_ad_landing_page", "description": "The URL where the member should be redirected to, on clicking the text ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spotlight_landing_page": {"name": "spotlight_landing_page", "description": "The URL where the member should be redirected to, on clicking the spotlight ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "intended_status": {"name": "intended_status", "description": "ACTIVE - Creative creation is complete and creative is available for review and serve.\nPAUSED - Creative creation is complete and creative is current, but should temporarily not be served. This status is not valid upon creation.\nDRAFT - Creative creation is incomplete and may still be edited.\nARCHIVED - Creative creation is complete, but creative should not be served and should be separated from non-archived creatives in any UI.\nCANCELED - Creative is permanently canceled.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"linkedin_ad_creative_history_data\"", "created_at": 1783450506.1672666, "unrendered_database": "{% if target.type != 'spark'%}{{ var('linkedin_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('linkedin_ads_schema', 'linkedin_ads') }}", "doc_blocks": []}, "source.linkedin.linkedin_ads.campaign_history": {"database": "postgres", "schema": "public", "name": "campaign_history", "resource_type": "source", "package_name": "linkedin", "path": "models/staging/src_linkedin.yml", "original_file_path": "models/staging/src_linkedin.yml", "unique_id": "source.linkedin.linkedin_ads.campaign_history", "fqn": ["linkedin", "staging", "linkedin_ads", "campaign_history"], "source_name": "linkedin_ads", "source_description": "", "loader": "fivetran", "identifier": "linkedin_ad_campaign_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a 'version' of a campaign.", "columns": {"id": {"name": "id", "description": "Unique internal ID representing the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_time": {"name": "last_modified_time", "description": "The timestamp of when the version was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the account the campaign belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_id": {"name": "campaign_group_id", "description": "The ID of the campaign group the campaign belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_time": {"name": "created_time", "description": "The timestamp of when the campaign was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "A label for the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "version_tag": {"name": "version_tag", "description": "An integer representation of the version of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "audience_expansion_enabled": {"name": "audience_expansion_enabled", "description": "Boolean (default=false) representing whether Audience Expansion is enabled for the campaign provides query expansion for certain targeting criteria.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_type": {"name": "cost_type", "description": "CPM - Cost per thousand advertising impressions. If type=SPONSORED_INMAILS; cost per send(CPS) is measured as CPM x 1000.\nCPC- Cost per individual click on the associated link.\nCPV- Cost per view for video ads.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_selection": {"name": "creative_selection", "description": "ROUND_ROBIN - Rotate through available creatives to serve them as evenly as possible.\nOPTIMIZED (default) - Bias selection taking into account such as expected performance. Not available for Message and Conversation Ads (type=SPONSORED_INMAILS).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_amount": {"name": "daily_budget_amount", "description": "Maximum amount to spend per day UTC. The amount of money as a real number string.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_currency_code": {"name": "daily_budget_currency_code", "description": "ISO currency code. The currency must match that of the parent account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "format": {"name": "format", "description": "The ad format on the campaign level. See https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads/campaign-formats?view=li-lms-2022-07", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "locale_country": {"name": "locale_country", "description": "Locale of the campaign. An uppercase two-letter country code as defined by ISO-3166.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "locale_language": {"name": "locale_language", "description": "Locale of the campaign. A lowercase two-letter language code as defined by ISO-639.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective_type": {"name": "objective_type", "description": "Campaign Objective type values. Click [here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ad-budget-pricing-type-combinations?view=li-lms-2022-07) for Campaign Objective descriptions. One of: - BRAND_AWARENESS - ENGAGEMENT - JOB_APPLICANTS - LEAD_GENERATION - WEBSITE_CONVERSIONS - WEBSITE_VISITS - VIDEO_VIEWS\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_delivery_enabled": {"name": "offsite_delivery_enabled", "description": "Boolean indicating if this campaign to allowed to be served on the LinkedIn Audience Network to extend the reach of your campaign by delivering ads beyond the LinkedIn feed to members on third-party apps and sites.\t(default will be \"True\" from June 30, 2022)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "optimization_target_type": {"name": "optimization_target_type", "description": "Determines how this campaign is optimized for spending. If this is not set, there is no optimization. Refer to the documentation here. Default = 'NONE'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_start": {"name": "run_schedule_start", "description": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the inclusive (greater than or equal to) value in which to start the range.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_end": {"name": "run_schedule_end", "description": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the exclusive (strictly less than) value in which to end the range, if provided.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "ACTIVE - Denotes that the campaign is fully servable.\nPAUSED - Denotes that the campaign meets all requirements to be served, but temporarily should not be.\nARCHIVED - Denotes that the campaign is presently inactive, and should mostly be hidden in the UI until un-archived.\nCOMPLETED - Denotes that the campaign has reached a specified budgetary or chronological limit.\nCANCELED - Denotes that the campaign has been permanently canceled, such as when an advertising account is permanently closed.\nDRAFT - Denotes that the campaign is still being edited and not eligible for serving. Some validation will be postponed until the campaign is activated.\nPENDING_DELETION - Denotes that the campaign has been requested to be deleted that is currently pending.\nREMOVED - Denotes that the campaign was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "type": {"name": "type", "description": "TEXT_AD - Text-based ads that show up in the right column or top of the page on LinkedIn.\nSPONSORED_UPDATES - Native ads that promote a company's content updates in the LinkedIn feed.\nSPONSORED_INMAILS - Personalized messages with a call-to-action button delivered to a LinkedIn's member inbox.\nDYNAMIC - Ads that are dynamically personalized.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "unit_cost_amount": {"name": "unit_cost_amount", "description": "This value is used as one of the following: amount to bid (for manual bidding), amount which is the target cost (for target cost bidding) per click, impression, or other event depending on the pricing model, or cost cap (for cost cap bidding). The amount of money as a real number string. The amount should be non-negative if the bidding strategy is manual, target cost, or cost cap bidding. The default is 0 with the currency code set to match that of the associated account.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "unit_cost_currency_code": {"name": "unit_cost_currency_code", "description": "Amount to bid per click, impression, or other event depending on the pricing model. The default is 0 with the currency code set to match that of the associated account. ISO currency code.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"linkedin_ad_campaign_history_data\"", "created_at": 1783450506.1681552, "unrendered_database": "{% if target.type != 'spark'%}{{ var('linkedin_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('linkedin_ads_schema', 'linkedin_ads') }}", "doc_blocks": []}, "source.linkedin.linkedin_ads.campaign_group_history": {"database": "postgres", "schema": "public", "name": "campaign_group_history", "resource_type": "source", "package_name": "linkedin", "path": "models/staging/src_linkedin.yml", "original_file_path": "models/staging/src_linkedin.yml", "unique_id": "source.linkedin.linkedin_ads.campaign_group_history", "fqn": ["linkedin", "staging", "linkedin_ads", "campaign_group_history"], "source_name": "linkedin_ads", "source_description": "", "loader": "fivetran", "identifier": "linkedin_ad_campaign_group_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a 'version' of a campaign group.", "columns": {"id": {"name": "id", "description": "Unique internal ID representing the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_time": {"name": "last_modified_time", "description": "The timestamp of when the version was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the account the campaign group belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_time": {"name": "created_time", "description": "The timestamp of when the campaign group was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "A label for the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "backfilled": {"name": "backfilled", "description": "Flag that denotes whether the campaign group was created organically or to backfill existing campaigns. This is a read-only field set by the system. Default = false", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_start": {"name": "run_schedule_start", "description": "Represents the inclusive (greater than or equal to) date when to start running the associated campaigns under this campaign group. This field is required.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_end": {"name": "run_schedule_end", "description": "Represents the exclusive (strictly less than) date when to stop running the associated campaigns under this campaign group. If this field is unset, it indicates an open range with no end date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Status of campaign group. Possible values are: ACTIVE - Denotes that the campaign group is capable of serving ads, subject to run date and budget limitations (as well as any other limitations at the account or campaign level). ARCHIVED - Denotes that the campaign group is presently inactive, and should mostly be hidden in the UI until un-archived. CANCELLED - Denotes that the campaign group has been permanently canceled and cannot be reactivated. Not a settable status. DRAFT - Denotes that the campaign group is in a preliminary state and should temporarily not be served. PAUSED - Denotes that the campaign group meets all requirements to be served, but temporarily should not be. PENDING_DELETION - Denotes that the campaign group has been requested to be deleted that is currently pending. REMOVED - Denoted that the campaign group was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"linkedin_ad_campaign_group_history_data\"", "created_at": 1783450506.1688445, "unrendered_database": "{% if target.type != 'spark'%}{{ var('linkedin_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('linkedin_ads_schema', 'linkedin_ads') }}", "doc_blocks": []}, "source.linkedin.linkedin_ads.account_history": {"database": "postgres", "schema": "public", "name": "account_history", "resource_type": "source", "package_name": "linkedin", "path": "models/staging/src_linkedin.yml", "original_file_path": "models/staging/src_linkedin.yml", "unique_id": "source.linkedin.linkedin_ads.account_history", "fqn": ["linkedin", "staging", "linkedin_ads", "account_history"], "source_name": "linkedin_ads", "source_description": "", "loader": "fivetran", "identifier": "linkedin_ad_account_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a 'version' of an account.", "columns": {"id": {"name": "id", "description": "Unique internal ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_time": {"name": "last_modified_time", "description": "The timestamp of when the version was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_time": {"name": "created_time", "description": "The timestamp of when the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "A label for the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "version_tag": {"name": "version_tag", "description": "An integer representation of the version of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "notified_on_campaign_optimization": {"name": "notified_on_campaign_optimization", "description": "Boolean (default=false) indicating if the campaign contact is notified about campaign optimization opportunities", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "notified_on_creative_approval": {"name": "notified_on_creative_approval", "description": "Boolean (default=false) indicating if the creative contact is notified when a creative has been reviewed and approved", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "notified_on_creative_rejection": {"name": "notified_on_creative_rejection", "description": "Boolean (default=false) indicating if the creative contact is notified when a creative has been rejected due to content", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "notified_on_end_of_campaign": {"name": "notified_on_end_of_campaign", "description": "Boolean (default=false) indicating if the campaign contact is notified when an associated campaign has been completed", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "ACTIVE - Account is active; this is the default state\nCANCELLED - Account has been permanently cancelled\nDRAFT - Account is in draft status, meaning it's not yet fully set up and it is not serving\nPENDING_DELETION - Denotes that the account has been requested to be deleted that is currently pending\nREMOVED - Denotes that the account was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "type": {"name": "type", "description": "BUSINESS - This is the only value allowed when creating accounts through the API.\nENTERPRISE - This value cannot be used to create accounts through the API and is reserved for accounts created by LinkedIn's internal ad operations systems.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"linkedin_ad_account_history_data\"", "created_at": 1783450506.1695259, "unrendered_database": "{% if target.type != 'spark'%}{{ var('linkedin_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('linkedin_ads_schema', 'linkedin_ads') }}", "doc_blocks": []}, "source.linkedin.linkedin_ads.ad_analytics_by_campaign": {"database": "postgres", "schema": "public", "name": "ad_analytics_by_campaign", "resource_type": "source", "package_name": "linkedin", "path": "models/staging/src_linkedin.yml", "original_file_path": "models/staging/src_linkedin.yml", "unique_id": "source.linkedin.linkedin_ads.ad_analytics_by_campaign", "fqn": ["linkedin", "staging", "linkedin_ads", "ad_analytics_by_campaign"], "source_name": "linkedin_ads", "source_description": "", "loader": "fivetran", "identifier": "linkedin_ad_analytics_by_campaign_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents the daily performance of ads at the campaign level.", "columns": {"campaign_id": {"name": "campaign_id", "description": "The ID of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "day": {"name": "day", "description": "The day of the activity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_in_local_currency": {"name": "cost_in_local_currency", "description": "The cost of the ads in the local currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_in_usd": {"name": "cost_in_usd", "description": "The cost of the ads in the USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"linkedin_ad_analytics_by_campaign_data\"", "created_at": 1783450506.1701787, "unrendered_database": "{% if target.type != 'spark'%}{{ var('linkedin_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('linkedin_ads_schema', 'linkedin_ads') }}", "doc_blocks": []}, "source.linkedin.linkedin_ads.geo": {"database": "postgres", "schema": "public", "name": "geo", "resource_type": "source", "package_name": "linkedin", "path": "models/staging/src_linkedin.yml", "original_file_path": "models/staging/src_linkedin.yml", "unique_id": "source.linkedin.linkedin_ads.geo", "fqn": ["linkedin", "staging", "linkedin_ads", "geo"], "source_name": "linkedin_ads", "source_description": "", "loader": "fivetran", "identifier": "linkedin_geo_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Contains geographic data for LinkedIn Ads, including IDs and names of locations.", "columns": {"id": {"name": "id", "description": "Unique identifier for the geographic entity, used for joins in reporting tables.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "value": {"name": "value", "description": "Name of the geographic entity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"linkedin_geo_data\"", "created_at": 1783450506.1708548, "unrendered_database": "{% if target.type != 'spark'%}{{ var('linkedin_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('linkedin_ads_schema', 'linkedin_ads') }}", "doc_blocks": []}, "source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_country": {"database": "postgres", "schema": "public", "name": "monthly_ad_analytics_by_member_country", "resource_type": "source", "package_name": "linkedin", "path": "models/staging/src_linkedin.yml", "original_file_path": "models/staging/src_linkedin.yml", "unique_id": "source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_country", "fqn": ["linkedin", "staging", "linkedin_ads", "monthly_ad_analytics_by_member_country"], "source_name": "linkedin_ads", "source_description": "", "loader": "fivetran", "identifier": "linkedin_monthly_ad_analytics_by_member_country_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Monthly LinkedIn Ads performance metrics aggregated by member country and campaign.", "columns": {"campaign_id": {"name": "campaign_id", "description": "Identifier of the LinkedIn Ads campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "month": {"name": "month", "description": "Month of the reporting data, aliased as `date_month`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "member_country": {"name": "member_country", "description": "ID representing the country of the LinkedIn members who interacted with the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_in_local_currency": {"name": "cost_in_local_currency", "description": "The cost of the ads in the local currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_in_usd": {"name": "cost_in_usd", "description": "The cost of the ads in the USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"linkedin_monthly_ad_analytics_by_member_country_data\"", "created_at": 1783450506.1715236, "unrendered_database": "{% if target.type != 'spark'%}{{ var('linkedin_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('linkedin_ads_schema', 'linkedin_ads') }}", "doc_blocks": []}, "source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_region": {"database": "postgres", "schema": "public", "name": "monthly_ad_analytics_by_member_region", "resource_type": "source", "package_name": "linkedin", "path": "models/staging/src_linkedin.yml", "original_file_path": "models/staging/src_linkedin.yml", "unique_id": "source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_region", "fqn": ["linkedin", "staging", "linkedin_ads", "monthly_ad_analytics_by_member_region"], "source_name": "linkedin_ads", "source_description": "", "loader": "fivetran", "identifier": "linkedin_monthly_ad_analytics_by_member_region_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Monthly LinkedIn Ads performance metrics aggregated by member region and campaign.", "columns": {"campaign_id": {"name": "campaign_id", "description": "Identifier of the LinkedIn Ads campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "month": {"name": "month", "description": "Month of the reporting data, aliased as `date_month`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "member_region": {"name": "member_region", "description": "ID representing the region of the LinkedIn members who interacted with the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_in_local_currency": {"name": "cost_in_local_currency", "description": "The cost of the ads in the local currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_in_usd": {"name": "cost_in_usd", "description": "The cost of the ads in the USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"linkedin_monthly_ad_analytics_by_member_region_data\"", "created_at": 1783450506.172206, "unrendered_database": "{% if target.type != 'spark'%}{{ var('linkedin_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('linkedin_ads_schema', 'linkedin_ads') }}", "doc_blocks": []}, "source.apple_search_ads.apple_search_ads.ad_group_history": {"database": "postgres", "schema": "public", "name": "ad_group_history", "resource_type": "source", "package_name": "apple_search_ads", "path": "models/staging/src_apple_search_ads.yml", "original_file_path": "models/staging/src_apple_search_ads.yml", "unique_id": "source.apple_search_ads.apple_search_ads.ad_group_history", "fqn": ["apple_search_ads", "staging", "apple_search_ads", "ad_group_history"], "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "apple_search_ad_group_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of an ad group in Apple Search Ads.", "columns": {"modification_time": {"name": "modification_time", "description": "Timestamp of when the ad group object was last modified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "id": {"name": "id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_time": {"name": "start_time", "description": "Timestamp of designated ad group start time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_time": {"name": "end_time", "description": "The designated ad group end time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Ad group name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The current status of the ad group, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"apple_search_ad_group_history_data\"", "created_at": 1783450506.1728673, "unrendered_database": "{% if target.type != 'spark' %}{{ var('apple_search_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('apple_search_ads_schema', 'apple_search_ads') }}", "doc_blocks": []}, "source.apple_search_ads.apple_search_ads.ad_group_report": {"database": "postgres", "schema": "public", "name": "ad_group_report", "resource_type": "source", "package_name": "apple_search_ads", "path": "models/staging/src_apple_search_ads.yml", "original_file_path": "models/staging/src_apple_search_ads.yml", "unique_id": "source.apple_search_ads.apple_search_ads.ad_group_report", "fqn": ["apple_search_ads", "staging", "apple_search_ads", "ad_group_report"], "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "apple_search_ad_group_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of an ad group in Apple Search Ads.", "columns": {"ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "local_spend_amount": {"name": "local_spend_amount", "description": "The sum of costs associated with the number of impressions served; Spend is measured in the currency used in the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"apple_search_ad_group_report_data\"", "created_at": 1783450506.173547, "unrendered_database": "{% if target.type != 'spark' %}{{ var('apple_search_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('apple_search_ads_schema', 'apple_search_ads') }}", "doc_blocks": []}, "source.apple_search_ads.apple_search_ads.ad_history": {"database": "postgres", "schema": "public", "name": "ad_history", "resource_type": "source", "package_name": "apple_search_ads", "path": "models/staging/src_apple_search_ads.yml", "original_file_path": "models/staging/src_apple_search_ads.yml", "unique_id": "source.apple_search_ads.apple_search_ads.ad_history", "fqn": ["apple_search_ads", "staging", "apple_search_ads", "ad_history"], "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "apple_search_ad_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of an ad in Apple Search Ads.", "columns": {"creation_time": {"name": "creation_time", "description": "Timestamp of when ad was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "modification_time": {"name": "modification_time", "description": "Timestamp of when the ad object was last modified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "org_id": {"name": "org_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Ad name associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "id": {"name": "id", "description": "Ad ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The current status of the ad, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"apple_search_ad_history_data\"", "created_at": 1783450506.1741827, "unrendered_database": "{% if target.type != 'spark' %}{{ var('apple_search_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('apple_search_ads_schema', 'apple_search_ads') }}", "doc_blocks": []}, "source.apple_search_ads.apple_search_ads.ad_level_report": {"database": "postgres", "schema": "public", "name": "ad_level_report", "resource_type": "source", "package_name": "apple_search_ads", "path": "models/staging/src_apple_search_ads.yml", "original_file_path": "models/staging/src_apple_search_ads.yml", "unique_id": "source.apple_search_ads.apple_search_ads.ad_level_report", "fqn": ["apple_search_ads", "staging", "apple_search_ads", "ad_level_report"], "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "apple_search_ad_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of an ad in Apple Search Ads.", "columns": {"date": {"name": "date", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_id": {"name": "ad_id", "description": "Ad ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "local_spend_amount": {"name": "local_spend_amount", "description": "The sum of costs associated with the number of impressions served; Spend is measured in the currency used in the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"apple_search_ad_report_data\"", "created_at": 1783450506.1748738, "unrendered_database": "{% if target.type != 'spark' %}{{ var('apple_search_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('apple_search_ads_schema', 'apple_search_ads') }}", "doc_blocks": []}, "source.apple_search_ads.apple_search_ads.campaign_history": {"database": "postgres", "schema": "public", "name": "campaign_history", "resource_type": "source", "package_name": "apple_search_ads", "path": "models/staging/src_apple_search_ads.yml", "original_file_path": "models/staging/src_apple_search_ads.yml", "unique_id": "source.apple_search_ads.apple_search_ads.campaign_history", "fqn": ["apple_search_ads", "staging", "apple_search_ads", "campaign_history"], "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "apple_search_campaign_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of a campaign in Apple Search Ads.", "columns": {"modification_time": {"name": "modification_time", "description": "Timestamp of when the campaign object was last modified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "id": {"name": "id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_time": {"name": "start_time", "description": "The designated ad group start time (ad group with the earliest start time associated with this campaign).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_time": {"name": "end_time", "description": "The designated campaign end time (ad group with the latest start time associated with this campaign).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Campaign name for the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The current status of the campaign, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"apple_search_campaign_history_data\"", "created_at": 1783450506.1755285, "unrendered_database": "{% if target.type != 'spark' %}{{ var('apple_search_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('apple_search_ads_schema', 'apple_search_ads') }}", "doc_blocks": []}, "source.apple_search_ads.apple_search_ads.campaign_report": {"database": "postgres", "schema": "public", "name": "campaign_report", "resource_type": "source", "package_name": "apple_search_ads", "path": "models/staging/src_apple_search_ads.yml", "original_file_path": "models/staging/src_apple_search_ads.yml", "unique_id": "source.apple_search_ads.apple_search_ads.campaign_report", "fqn": ["apple_search_ads", "staging", "apple_search_ads", "campaign_report"], "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "apple_search_campaign_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of a campaign in Apple Search Ads.", "columns": {"id": {"name": "id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "local_spend_amount": {"name": "local_spend_amount", "description": "The sum of costs associated with the number of impressions served; Spend is measured in the currency used in the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"apple_search_campaign_report_data\"", "created_at": 1783450506.1762228, "unrendered_database": "{% if target.type != 'spark' %}{{ var('apple_search_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('apple_search_ads_schema', 'apple_search_ads') }}", "doc_blocks": []}, "source.apple_search_ads.apple_search_ads.keyword_history": {"database": "postgres", "schema": "public", "name": "keyword_history", "resource_type": "source", "package_name": "apple_search_ads", "path": "models/staging/src_apple_search_ads.yml", "original_file_path": "models/staging/src_apple_search_ads.yml", "unique_id": "source.apple_search_ads.apple_search_ads.keyword_history", "fqn": ["apple_search_ads", "staging", "apple_search_ads", "keyword_history"], "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "apple_search_keyword_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of a keyword in Apple Search Ads.", "columns": {"modification_time": {"name": "modification_time", "description": "Timestamp of when the keyword object was last modified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "id": {"name": "id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_amount": {"name": "bid_amount", "description": "The bid amount to display your ad for the matching text value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_currency": {"name": "bid_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; EXACT or BROAD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The current status of the keyword, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "text": {"name": "text", "description": "The word or phrase to match in user searches, to show respective ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"apple_search_keyword_history_data\"", "created_at": 1783450506.1768842, "unrendered_database": "{% if target.type != 'spark' %}{{ var('apple_search_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('apple_search_ads_schema', 'apple_search_ads') }}", "doc_blocks": []}, "source.apple_search_ads.apple_search_ads.keyword_report": {"database": "postgres", "schema": "public", "name": "keyword_report", "resource_type": "source", "package_name": "apple_search_ads", "path": "models/staging/src_apple_search_ads.yml", "original_file_path": "models/staging/src_apple_search_ads.yml", "unique_id": "source.apple_search_ads.apple_search_ads.keyword_report", "fqn": ["apple_search_ads", "staging", "apple_search_ads", "keyword_report"], "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "apple_search_keyword_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of a keyword in Apple Search Ads.", "columns": {"id": {"name": "id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "local_spend_amount": {"name": "local_spend_amount", "description": "The sum of costs associated with the number of impressions served; Spend is measured in the currency used in the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"apple_search_keyword_report_data\"", "created_at": 1783450506.1775572, "unrendered_database": "{% if target.type != 'spark' %}{{ var('apple_search_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('apple_search_ads_schema', 'apple_search_ads') }}", "doc_blocks": []}, "source.apple_search_ads.apple_search_ads.organization": {"database": "postgres", "schema": "public", "name": "organization", "resource_type": "source", "package_name": "apple_search_ads", "path": "models/staging/src_apple_search_ads.yml", "original_file_path": "models/staging/src_apple_search_ads.yml", "unique_id": "source.apple_search_ads.apple_search_ads.organization", "fqn": ["apple_search_ads", "staging", "apple_search_ads", "organization"], "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "apple_search_organization_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents an organization in Apple Search Ads.", "columns": {"organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Specified currency for respective organization.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "payment_model": {"name": "payment_model", "description": "Values include 'LOC', 'PAYG' or (payment method hasn't been set).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "organization_name": {"name": "organization_name", "description": "Name of organization.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "time_zone": {"name": "time_zone", "description": "Organization default timezone; values can be ORTZ or UTC.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"apple_search_organization_data\"", "created_at": 1783450506.178168, "unrendered_database": "{% if target.type != 'spark' %}{{ var('apple_search_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('apple_search_ads_schema', 'apple_search_ads') }}", "doc_blocks": []}, "source.apple_search_ads.apple_search_ads.search_term_report": {"database": "postgres", "schema": "public", "name": "search_term_report", "resource_type": "source", "package_name": "apple_search_ads", "path": "models/staging/src_apple_search_ads.yml", "original_file_path": "models/staging/src_apple_search_ads.yml", "unique_id": "source.apple_search_ads.apple_search_ads.search_term_report", "fqn": ["apple_search_ads", "staging", "apple_search_ads", "search_term_report"], "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "apple_search_search_term_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of a search term in Apple Search Ads.", "columns": {"_fivetran_id": {"name": "_fivetran_id", "description": "A Fivetran internal unique id that helps us avoid duplicate rows in primary keyless tables.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_amount_amount": {"name": "bid_amount_amount", "description": "The bid amount to display your ad for the matching text value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_amount_currency": {"name": "bid_amount_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword": {"name": "keyword", "description": "The word or phrase to match in user searches, to show respective ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_display_status": {"name": "keyword_display_status", "description": "The keyword display status can either be ACTIVE or PAUSED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_id": {"name": "keyword_id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "local_spend_amount": {"name": "local_spend_amount", "description": "The sum of costs associated with the number of impressions served; Spend is measured in the currency used in the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; values include EXACT, BROAD or AUTO.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "search_term_source": {"name": "search_term_source", "description": "The search term source can either be TARGETED or AUTO; if this value is AUTO so will match_type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "search_term_text": {"name": "search_term_text", "description": "The word or phrase to match of user searches.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"apple_search_search_term_report_data\"", "created_at": 1783450506.1788983, "unrendered_database": "{% if target.type != 'spark' %}{{ var('apple_search_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('apple_search_ads_schema', 'apple_search_ads') }}", "doc_blocks": []}, "source.reddit_ads.reddit_ads.business_account": {"database": "postgres", "schema": "public", "name": "business_account", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.business_account", "fqn": ["reddit_ads", "staging", "reddit_ads", "business_account"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_business_account_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents information about an account.", "columns": {"id": {"name": "id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "attribution_type": {"name": "attribution_type", "description": "Attribution type: \"CLICK_THROUGH_CONVERSION\", \"VIEW_THROUGH_CONVERSION\", or \"ALL_CONVERSION\".\nCLICK_THROUGH_CONVERSION: A user clicked on your ad and then completed the conversion action on your site. \nVIEW_THROUGH_CONVERSION: A user saw your ad and did not click it, but did complete the conversion action on your site.\nALL_CONVERSION: Combination of both.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.attribution_type"]}, "click_attribution_window": {"name": "click_attribution_window", "description": "Determines how long after clicking on your ad you count that user\u2019s actions as a conversion. \"DAY\", \"WEEK\", or \"MONTH\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_attribution_window"]}, "created_at": {"name": "created_at", "description": "Time that the respective record (ad, ad group, campaign, post, etc) was created. ISO-8601 timestamp.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.created_at"]}, "currency": {"name": "currency", "description": "The currency this account uses (ISO-4217)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.currency"]}, "time_zone_id": {"name": "time_zone_id", "description": "The time zone id preference for this account", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.time_zone_id"]}, "view_attribution_window": {"name": "view_attribution_window", "description": "Determines how long after viewing on your ad you count that user\u2019s actions as a conversion. \"DAY\", \"WEEK\", or \"MONTH\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_attribution_window"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_business_account_data\"", "created_at": 1783450506.1802316, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": []}, "source.reddit_ads.reddit_ads.account_report": {"database": "postgres", "schema": "public", "name": "account_report", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.account_report", "fqn": ["reddit_ads", "staging", "reddit_ads", "account_report"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_account_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a summary of events for each given date and account.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "conversion_roas": {"name": "conversion_roas", "description": "Return on ad spend for purchases for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.conversion_roas"]}, "cpc": {"name": "cpc", "description": "The cost-per-click for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.cpc"]}, "ctr": {"name": "ctr", "description": "The click-through-rate for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ctr"]}, "date": {"name": "date", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "ecpm": {"name": "ecpm", "description": "The effective CPM for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ecpm"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "region": {"name": "region", "description": "The region (US state or UK country) targeted for the reports", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.region"]}, "spend": {"name": "spend", "description": "The amount (in microcurrency) spent for this report period in Ad Account's currency, as defined [here](https://ads-api.reddit.com/docs/#tag/Reporting/paths/~1api~1v2.0~1accounts~1{account_id}~1reports/get)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.spend"]}, "video_started": {"name": "video_started", "description": "The number of times the ad was served and the video began playing", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_started"]}, "video_watched_25_percent": {"name": "video_watched_25_percent", "description": "The number of times the ad was served and at least 25% of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_25_percent"]}, "video_watched_3_seconds": {"name": "video_watched_3_seconds", "description": "The number of times the ad was served and at least 3 seconds of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_3_seconds"]}, "video_watched_50_percent": {"name": "video_watched_50_percent", "description": "The number of times the ad was served and at least 50% of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_50_percent"]}, "video_watched_5_seconds": {"name": "video_watched_5_seconds", "description": "The number of times the ad was served and at least 5 seconds of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_5_seconds"]}, "video_watched_75_percent": {"name": "video_watched_75_percent", "description": "The number of times the ad was served and at least 75% of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_75_percent"]}, "viewer_comments": {"name": "viewer_comments", "description": "The number of times a user saw the post, and also commented on it. We count per view + comment combination (similar to a conversion)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.viewer_comments"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_account_report_data\"", "created_at": 1783450506.180962, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": []}, "source.reddit_ads.reddit_ads.ad": {"database": "postgres", "schema": "public", "name": "ad", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.ad", "fqn": ["reddit_ads", "staging", "reddit_ads", "ad"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_ad_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents information about each ad.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "click_url": {"name": "click_url", "description": "The destination url, or the website address, that a visitor goes to when they click on the ad", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_url"]}, "configured_status": {"name": "configured_status", "description": "The status configured by the account owner. \"ACTIVE\", \"PAUSED\", \"ARCHIVED\", \"DELETED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.configured_status"]}, "effective_status": {"name": "effective_status", "description": "The calculated status determining the real status of this entity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.effective_status"]}, "id": {"name": "id", "description": "The ID of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_id"]}, "is_processing": {"name": "is_processing", "description": "Whether or not effective status is processing", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.is_processing"]}, "name": {"name": "name", "description": "Name of ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_name"]}, "post_id": {"name": "post_id", "description": "The ID of the post.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.post_id"]}, "post_url": {"name": "post_url", "description": "The URL belonging to the post.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.post_url"]}, "rejection_reason": {"name": "rejection_reason", "description": "Reason why entity was rejected.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.rejection_reason"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_ad_data\"", "created_at": 1783450506.1816478, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": []}, "source.reddit_ads.reddit_ads.ad_report": {"database": "postgres", "schema": "public", "name": "ad_report", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.ad_report", "fqn": ["reddit_ads", "staging", "reddit_ads", "ad_report"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_ad_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a summary of events for each given date and ad.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "ad_id": {"name": "ad_id", "description": "The ID of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_id"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "conversion_roas": {"name": "conversion_roas", "description": "Return on ad spend for purchases for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.conversion_roas"]}, "cpc": {"name": "cpc", "description": "The cost-per-click for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.cpc"]}, "ctr": {"name": "ctr", "description": "The click-through-rate for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ctr"]}, "date": {"name": "date", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "ecpm": {"name": "ecpm", "description": "The effective CPM for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ecpm"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "region": {"name": "region", "description": "The region (US state or UK country) targeted for the reports", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.region"]}, "spend": {"name": "spend", "description": "The amount (in microcurrency) spent for this report period in Ad Account's currency, as defined [here](https://ads-api.reddit.com/docs/#tag/Reporting/paths/~1api~1v2.0~1accounts~1{account_id}~1reports/get)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.spend"]}, "video_started": {"name": "video_started", "description": "The number of times the ad was served and the video began playing", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_started"]}, "video_watched_25_percent": {"name": "video_watched_25_percent", "description": "The number of times the ad was served and at least 25% of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_25_percent"]}, "video_watched_3_seconds": {"name": "video_watched_3_seconds", "description": "The number of times the ad was served and at least 3 seconds of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_3_seconds"]}, "video_watched_50_percent": {"name": "video_watched_50_percent", "description": "The number of times the ad was served and at least 50% of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_50_percent"]}, "video_watched_5_seconds": {"name": "video_watched_5_seconds", "description": "The number of times the ad was served and at least 5 seconds of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_5_seconds"]}, "video_watched_75_percent": {"name": "video_watched_75_percent", "description": "The number of times the ad was served and at least 75% of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_75_percent"]}, "viewer_comments": {"name": "viewer_comments", "description": "The number of times a user saw the post, and also commented on it. We count per view + comment combination (similar to a conversion)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.viewer_comments"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_ad_report_data\"", "created_at": 1783450506.1823454, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": []}, "source.reddit_ads.reddit_ads.ad_group": {"database": "postgres", "schema": "public", "name": "ad_group", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.ad_group", "fqn": ["reddit_ads", "staging", "reddit_ads", "ad_group"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_ad_group_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents information about each ad group.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "bid_strategy": {"name": "bid_strategy", "description": "The bid strategy for this entity. \"MAXIMIZE_VOLUME\", \"MANUAL_BIDDING\", or \"BIDLESS\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.bid_strategy"]}, "bid_value": {"name": "bid_value", "description": "The amount to pay in microcurrency per bidding event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.bid_value"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "configured_status": {"name": "configured_status", "description": "The status configured by the account owner. \"ACTIVE\", \"PAUSED\", \"ARCHIVED\", \"DELETED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.configured_status"]}, "effective_status": {"name": "effective_status", "description": "The calculated status determining the real status of this entity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.effective_status"]}, "end_time": {"name": "end_time", "description": "When the entity will stop delivering.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.end_time"]}, "expand_targeting": {"name": "expand_targeting", "description": "Boolean that when selected, allows Reddit to expand your targeting to maximize your results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.expand_targeting"]}, "goal_type": {"name": "goal_type", "description": "The type of goal for the entity. \"IMPRESSIONS\", \"PERCENTAGE\", \"CLICKS\", \"CONVERSIONS\", \"LIFETIME_SPEND\", \"DAILY_SPEND\", or \"VIDEO_VIEWABLE_IMPRESSIONS\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.goal_type"]}, "goal_value": {"name": "goal_value", "description": "The value used to determine the goal has been met. This is measured in microcurrency for monetary goals types.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.goal_value"]}, "id": {"name": "id", "description": "The ID of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_id"]}, "is_processing": {"name": "is_processing", "description": "Whether or not effective status is processing", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.is_processing"]}, "name": {"name": "name", "description": "Name of ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_name"]}, "optimization_strategy_type": {"name": "optimization_strategy_type", "description": "The strategy to use when optimizing the delivery of an ad. \"DOWNSTREAM_CONVERSIONS\" or \"APP_INSTALLS\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.optimization_strategy_type"]}, "start_time": {"name": "start_time", "description": "When the entity will begin to deliver.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.start_time"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_ad_group_data\"", "created_at": 1783450506.1837823, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": []}, "source.reddit_ads.reddit_ads.ad_group_report": {"database": "postgres", "schema": "public", "name": "ad_group_report", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.ad_group_report", "fqn": ["reddit_ads", "staging", "reddit_ads", "ad_group_report"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_ad_group_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a summary of events for each given date and ad group.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_id"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "conversion_roas": {"name": "conversion_roas", "description": "Return on ad spend for purchases for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.conversion_roas"]}, "cpc": {"name": "cpc", "description": "The cost-per-click for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.cpc"]}, "ctr": {"name": "ctr", "description": "The click-through-rate for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ctr"]}, "date": {"name": "date", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "ecpm": {"name": "ecpm", "description": "The effective CPM for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ecpm"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "region": {"name": "region", "description": "The region (US state or UK country) targeted for the reports", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.region"]}, "spend": {"name": "spend", "description": "The amount (in microcurrency) spent for this report period in Ad Account's currency, as defined [here](https://ads-api.reddit.com/docs/#tag/Reporting/paths/~1api~1v2.0~1accounts~1{account_id}~1reports/get)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.spend"]}, "video_started": {"name": "video_started", "description": "The number of times the ad was served and the video began playing", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_started"]}, "video_watched_25_percent": {"name": "video_watched_25_percent", "description": "The number of times the ad was served and at least 25% of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_25_percent"]}, "video_watched_3_seconds": {"name": "video_watched_3_seconds", "description": "The number of times the ad was served and at least 3 seconds of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_3_seconds"]}, "video_watched_50_percent": {"name": "video_watched_50_percent", "description": "The number of times the ad was served and at least 50% of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_50_percent"]}, "video_watched_5_seconds": {"name": "video_watched_5_seconds", "description": "The number of times the ad was served and at least 5 seconds of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_5_seconds"]}, "video_watched_75_percent": {"name": "video_watched_75_percent", "description": "The number of times the ad was served and at least 75% of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_75_percent"]}, "viewer_comments": {"name": "viewer_comments", "description": "The number of times a user saw the post, and also commented on it. We count per view + comment combination (similar to a conversion)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.viewer_comments"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_ad_group_report_data\"", "created_at": 1783450506.1844954, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": []}, "source.reddit_ads.reddit_ads.campaign": {"database": "postgres", "schema": "public", "name": "campaign", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.campaign", "fqn": ["reddit_ads", "staging", "reddit_ads", "campaign"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_campaign_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents information about each campaign.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "configured_status": {"name": "configured_status", "description": "The status configured by the account owner. \"ACTIVE\", \"PAUSED\", \"ARCHIVED\", \"DELETED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.configured_status"]}, "effective_status": {"name": "effective_status", "description": "The calculated status determining the real status of this entity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.effective_status"]}, "funding_instrument_id": {"name": "funding_instrument_id", "description": "Campaign level funding instrument id", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.funding_instrument_id"]}, "id": {"name": "id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "is_processing": {"name": "is_processing", "description": "Whether or not effective status is processing", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.is_processing"]}, "name": {"name": "name", "description": "Name of campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_name"]}, "objective": {"name": "objective", "description": "The objective type of a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.objective"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_campaign_data\"", "created_at": 1783450506.1851401, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": []}, "source.reddit_ads.reddit_ads.campaign_report": {"database": "postgres", "schema": "public", "name": "campaign_report", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.campaign_report", "fqn": ["reddit_ads", "staging", "reddit_ads", "campaign_report"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_campaign_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a summary of events for each given date and campaign.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "conversion_roas": {"name": "conversion_roas", "description": "Return on ad spend for purchases for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.conversion_roas"]}, "cpc": {"name": "cpc", "description": "The cost-per-click for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.cpc"]}, "ctr": {"name": "ctr", "description": "The click-through-rate for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ctr"]}, "date": {"name": "date", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "ecpm": {"name": "ecpm", "description": "The effective CPM for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ecpm"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "region": {"name": "region", "description": "The region (US state or UK country) targeted for the reports", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.region"]}, "spend": {"name": "spend", "description": "The amount (in microcurrency) spent for this report period in Ad Account's currency, as defined [here](https://ads-api.reddit.com/docs/#tag/Reporting/paths/~1api~1v2.0~1accounts~1{account_id}~1reports/get)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.spend"]}, "video_started": {"name": "video_started", "description": "The number of times the ad was served and the video began playing", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_started"]}, "video_watched_25_percent": {"name": "video_watched_25_percent", "description": "The number of times the ad was served and at least 25% of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_25_percent"]}, "video_watched_3_seconds": {"name": "video_watched_3_seconds", "description": "The number of times the ad was served and at least 3 seconds of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_3_seconds"]}, "video_watched_50_percent": {"name": "video_watched_50_percent", "description": "The number of times the ad was served and at least 50% of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_50_percent"]}, "video_watched_5_seconds": {"name": "video_watched_5_seconds", "description": "The number of times the ad was served and at least 5 seconds of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_5_seconds"]}, "video_watched_75_percent": {"name": "video_watched_75_percent", "description": "The number of times the ad was served and at least 75% of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_75_percent"]}, "viewer_comments": {"name": "viewer_comments", "description": "The number of times a user saw the post, and also commented on it. We count per view + comment combination (similar to a conversion)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.viewer_comments"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_campaign_report_data\"", "created_at": 1783450506.185851, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": []}, "source.reddit_ads.reddit_ads.account_conversions_report": {"database": "postgres", "schema": "public", "name": "account_conversions_report", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.account_conversions_report", "fqn": ["reddit_ads", "staging", "reddit_ads", "account_conversions_report"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_account_conversions", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Provides a summary of conversion events at the account level, aggregating key metrics by event and day.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "date": {"name": "date", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "event_name": {"name": "event_name", "description": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.event_name"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "avg_value": {"name": "avg_value", "description": "The average value of conversions over a given period.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.avg_value"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "click_through_conversion_attribution_window_month": {"name": "click_through_conversion_attribution_window_month", "description": "[DEPRECATED] This column has been deprecated as of August 2025 in favor of the `clicks` column. The total click-through conversions attributed, for the given month-long window.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "views": {"name": "views", "description": "The number of views detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.views"]}, "view_through_conversion_attribution_window_month": {"name": "view_through_conversion_attribution_window_month", "description": "[DEPRECATED] This column has been deprecated as of August 2025 in favor of the `views` column. The total view-through conversions attributed, for the given month-long window.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_through_conversion_attribution_window_day": {"name": "click_through_conversion_attribution_window_day", "description": "The total click-through conversions attributed, for the given day-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion_attribution_window_day"]}, "click_through_conversion_attribution_window_week": {"name": "click_through_conversion_attribution_window_week", "description": "The total click-through conversions attributed, for the given week-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion_attribution_window_week"]}, "view_through_conversion_attribution_window_day": {"name": "view_through_conversion_attribution_window_day", "description": "The total click-through conversions attributed, for the given day-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion_attribution_window_day"]}, "view_through_conversion_attribution_window_week": {"name": "view_through_conversion_attribution_window_week", "description": "The total click-through conversions attributed, for the given week-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion_attribution_window_week"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_account_conversions\"", "created_at": 1783450506.1865742, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": ["doc.reddit_ads.account_conversions_report"]}, "source.reddit_ads.reddit_ads.ad_group_conversions_report": {"database": "postgres", "schema": "public", "name": "ad_group_conversions_report", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.ad_group_conversions_report", "fqn": ["reddit_ads", "staging", "reddit_ads", "ad_group_conversions_report"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_ad_group_conversions", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Provides a summary of conversion events at the ad group level, aggregating key metrics by event and day.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_id"]}, "date": {"name": "date", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "event_name": {"name": "event_name", "description": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.event_name"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "avg_value": {"name": "avg_value", "description": "The average value of conversions over a given period.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.avg_value"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "click_through_conversion_attribution_window_month": {"name": "click_through_conversion_attribution_window_month", "description": "[DEPRECATED] This column has been deprecated as of August 2025 in favor of the `clicks` column. The total click-through conversions attributed, for the given month-long window.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "views": {"name": "views", "description": "The number of views detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.views"]}, "view_through_conversion_attribution_window_month": {"name": "view_through_conversion_attribution_window_month", "description": "[DEPRECATED] This column has been deprecated as of August 2025 in favor of the `views` column. The total view-through conversions attributed, for the given month-long window.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_through_conversion_attribution_window_day": {"name": "click_through_conversion_attribution_window_day", "description": "The total click-through conversions attributed, for the given day-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion_attribution_window_day"]}, "click_through_conversion_attribution_window_week": {"name": "click_through_conversion_attribution_window_week", "description": "The total click-through conversions attributed, for the given week-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion_attribution_window_week"]}, "view_through_conversion_attribution_window_day": {"name": "view_through_conversion_attribution_window_day", "description": "The total click-through conversions attributed, for the given day-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion_attribution_window_day"]}, "view_through_conversion_attribution_window_week": {"name": "view_through_conversion_attribution_window_week", "description": "The total click-through conversions attributed, for the given week-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion_attribution_window_week"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_ad_group_conversions\"", "created_at": 1783450506.1872451, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": ["doc.reddit_ads.ad_group_conversions_report"]}, "source.reddit_ads.reddit_ads.ad_conversions_report": {"database": "postgres", "schema": "public", "name": "ad_conversions_report", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.ad_conversions_report", "fqn": ["reddit_ads", "staging", "reddit_ads", "ad_conversions_report"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_ad_conversions", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Provides a summary of conversion events at the individual ad level, aggregating key metrics by event and day.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "ad_id": {"name": "ad_id", "description": "The ID of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_id"]}, "date": {"name": "date", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "event_name": {"name": "event_name", "description": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.event_name"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "avg_value": {"name": "avg_value", "description": "The average value of conversions over a given period.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.avg_value"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "click_through_conversion_attribution_window_month": {"name": "click_through_conversion_attribution_window_month", "description": "[DEPRECATED] This column has been deprecated as of August 2025 in favor of the `clicks` column. The total click-through conversions attributed, for the given month-long window.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "views": {"name": "views", "description": "The number of views detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.views"]}, "view_through_conversion_attribution_window_month": {"name": "view_through_conversion_attribution_window_month", "description": "[DEPRECATED] This column has been deprecated as of August 2025 in favor of the `views` column. The total view-through conversions attributed, for the given month-long window.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_through_conversion_attribution_window_day": {"name": "click_through_conversion_attribution_window_day", "description": "The total click-through conversions attributed, for the given day-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion_attribution_window_day"]}, "click_through_conversion_attribution_window_week": {"name": "click_through_conversion_attribution_window_week", "description": "The total click-through conversions attributed, for the given week-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion_attribution_window_week"]}, "view_through_conversion_attribution_window_day": {"name": "view_through_conversion_attribution_window_day", "description": "The total click-through conversions attributed, for the given day-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion_attribution_window_day"]}, "view_through_conversion_attribution_window_week": {"name": "view_through_conversion_attribution_window_week", "description": "The total click-through conversions attributed, for the given week-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion_attribution_window_week"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_ad_conversions\"", "created_at": 1783450506.1879325, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": ["doc.reddit_ads.ad_conversions_report"]}, "source.reddit_ads.reddit_ads.campaign_conversions_report": {"database": "postgres", "schema": "public", "name": "campaign_conversions_report", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.campaign_conversions_report", "fqn": ["reddit_ads", "staging", "reddit_ads", "campaign_conversions_report"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_campaign_conversions", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Provides a summary of conversion events at the campaign level, aggregating key metrics by event and day.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "date": {"name": "date", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "event_name": {"name": "event_name", "description": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.event_name"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "avg_value": {"name": "avg_value", "description": "The average value of conversions over a given period.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.avg_value"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "click_through_conversion_attribution_window_month": {"name": "click_through_conversion_attribution_window_month", "description": "[DEPRECATED] This column has been deprecated as of August 2025 in favor of the `clicks` column. The total click-through conversions attributed, for the given month-long window.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "views": {"name": "views", "description": "The number of views detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.views"]}, "view_through_conversion_attribution_window_month": {"name": "view_through_conversion_attribution_window_month", "description": "[DEPRECATED] This column has been deprecated as of August 2025 in favor of the `views` column. The total view-through conversions attributed, for the given month-long window.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_through_conversion_attribution_window_day": {"name": "click_through_conversion_attribution_window_day", "description": "The total click-through conversions attributed, for the given day-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion_attribution_window_day"]}, "click_through_conversion_attribution_window_week": {"name": "click_through_conversion_attribution_window_week", "description": "The total click-through conversions attributed, for the given week-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion_attribution_window_week"]}, "view_through_conversion_attribution_window_day": {"name": "view_through_conversion_attribution_window_day", "description": "The total click-through conversions attributed, for the given day-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion_attribution_window_day"]}, "view_through_conversion_attribution_window_week": {"name": "view_through_conversion_attribution_window_week", "description": "The total click-through conversions attributed, for the given week-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion_attribution_window_week"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_campaign_conversions\"", "created_at": 1783450506.1886137, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": ["doc.reddit_ads.campaign_conversions_report"]}, "source.reddit_ads.reddit_ads.campaign_country_report": {"database": "postgres", "schema": "public", "name": "campaign_country_report", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.campaign_country_report", "fqn": ["reddit_ads", "staging", "reddit_ads", "campaign_country_report"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_campaign_country_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a summary of events at the date, country, and campaign level.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "country": {"name": "country", "description": "The country associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.country"]}, "date": {"name": "date", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "region": {"name": "region", "description": "The region (US state or UK country) targeted for the reports", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.region"]}, "spend": {"name": "spend", "description": "The amount (in microcurrency) spent for this report period in Ad Account's currency, as defined [here](https://ads-api.reddit.com/docs/#tag/Reporting/paths/~1api~1v2.0~1accounts~1{account_id}~1reports/get)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.spend"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_campaign_country_report_data\"", "created_at": 1783450506.189273, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": ["doc.reddit_ads.campaign_country_report"]}, "source.reddit_ads.reddit_ads.campaign_country_conversions_report": {"database": "postgres", "schema": "public", "name": "campaign_country_conversions_report", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.campaign_country_conversions_report", "fqn": ["reddit_ads", "staging", "reddit_ads", "campaign_country_conversions_report"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_campaign_country_conversions_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Provides a summary of conversion events at the campaign and country level, aggregating key metrics by event and day such as view-through and click-through conversions.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "country": {"name": "country", "description": "The country associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.country"]}, "date": {"name": "date", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "event_name": {"name": "event_name", "description": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.event_name"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "click_through_conversion_attribution_window_month": {"name": "click_through_conversion_attribution_window_month", "description": "[DEPRECATED] This column has been deprecated as of August 2025 in favor of the `clicks` column. The total click-through conversions attributed, for the given month-long window.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "views": {"name": "views", "description": "The number of views detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.views"]}, "view_through_conversion_attribution_window_month": {"name": "view_through_conversion_attribution_window_month", "description": "[DEPRECATED] This column has been deprecated as of August 2025 in favor of the `views` column. The total view-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_campaign_country_conversions_report_data\"", "created_at": 1783450506.1899254, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": ["doc.reddit_ads.campaign_country_conversions_report"]}, "source.snapchat_ads.snapchat_ads.ad_account_history": {"database": "postgres", "schema": "public", "name": "ad_account_history", "resource_type": "source", "package_name": "snapchat_ads", "path": "models/staging/src_snapchat.yml", "original_file_path": "models/staging/src_snapchat.yml", "unique_id": "source.snapchat_ads.snapchat_ads.ad_account_history", "fqn": ["snapchat_ads", "staging", "snapchat_ads", "ad_account_history"], "source_name": "snapchat_ads", "source_description": "", "loader": "Fivetran", "identifier": "snapchat_ad_account_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents a historic version of an ad account in Snapchat.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}, "id": {"name": "id", "description": "The ID of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser": {"name": "advertiser", "description": "Name of advertiser", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Currency used by account", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Created at timestamp", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone": {"name": "timezone", "description": "Account timezone", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"snapchat_ad_account_history_data\"", "created_at": 1783450506.1905704, "unrendered_database": "{% if target.type != 'spark'%}{{ var('snapchat_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('snapchat_ads_schema', 'snapchat_ads') }}", "doc_blocks": []}, "source.snapchat_ads.snapchat_ads.ad_history": {"database": "postgres", "schema": "public", "name": "ad_history", "resource_type": "source", "package_name": "snapchat_ads", "path": "models/staging/src_snapchat.yml", "original_file_path": "models/staging/src_snapchat.yml", "unique_id": "source.snapchat_ads.snapchat_ads.ad_history", "fqn": ["snapchat_ads", "staging", "snapchat_ads", "ad_history"], "source_name": "snapchat_ads", "source_description": "", "loader": "Fivetran", "identifier": "snapchat_ad_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents a historic version of an ad in Snapchat.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}, "id": {"name": "id", "description": "The ID of the ad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_squad_id": {"name": "ad_squad_id", "description": "The ID of the related ad squad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_id": {"name": "creative_id", "description": "The ID of the related creative in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the ad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Created at timestamp", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"snapchat_ad_history_data\"", "created_at": 1783450506.1911824, "unrendered_database": "{% if target.type != 'spark'%}{{ var('snapchat_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('snapchat_ads_schema', 'snapchat_ads') }}", "doc_blocks": []}, "source.snapchat_ads.snapchat_ads.ad_hourly_report": {"database": "postgres", "schema": "public", "name": "ad_hourly_report", "resource_type": "source", "package_name": "snapchat_ads", "path": "models/staging/src_snapchat.yml", "original_file_path": "models/staging/src_snapchat.yml", "unique_id": "source.snapchat_ads.snapchat_ads.ad_hourly_report", "fqn": ["snapchat_ads", "staging", "snapchat_ads", "ad_hourly_report"], "source_name": "snapchat_ads", "source_description": "", "loader": "Fivetran", "identifier": "snapchat_ad_hourly_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents an hourly performance summary for an ad in Snapchat.", "columns": {"ad_id": {"name": "ad_id", "description": "The ID of the ad that the report relates to in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "The hour that the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_1": {"name": "attachment_quartile_1", "description": "Number of times your Long Form Video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_2": {"name": "attachment_quartile_2", "description": "Number of times your Long Form Video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_3": {"name": "attachment_quartile_3", "description": "Number of times your Long Form Video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_total_view_time_millis": {"name": "attachment_total_view_time_millis", "description": "Total time Snapchatters spent on the attachment (HH:MM:SS)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_view_completion": {"name": "attachment_view_completion", "description": "The number of times your Long Form Video was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_1": {"name": "quartile_1", "description": "The number of times your video ad was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_2": {"name": "quartile_2", "description": "The number of times your video ad was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_3": {"name": "quartile_3", "description": "The number of times your video ad was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "saves": {"name": "saves", "description": "Number of times an ad was saved to Memories", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "Number of times an ad was shared in a Chat or Story", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "screen_time_millis": {"name": "screen_time_millis", "description": "The number of milli seconds spent watching your ad across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views": {"name": "video_views", "description": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_completion": {"name": "view_completion", "description": "The number of times your video ad was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_time_millis": {"name": "view_time_millis", "description": "The number of milli seconds spent watching your ad across all users reached.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions for an ad in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend in microdollars for an ad in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes for an ad in the hour of the record. Swipes are when your ad was swiped up on or the CTA was tapped to view the attachment below.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases attributed to an ad in the hour of the record (microcurrency in Ad Account's currency).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases attributed to an ad in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_add_billing": {"name": "conversion_add_billing", "description": "Total number of attributed \"ADD_BILLING\" conversion events for an ad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_save": {"name": "conversion_save", "description": "Total number of attributed \"SAVE\" conversion events for an ad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_add_cart": {"name": "conversion_add_cart", "description": "Total number of attributed \"ADD_CART\" conversion events for an ad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups": {"name": "conversion_sign_ups", "description": "Total number of attributed \"SIGN_UP\" conversion events for an ad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_start_checkout": {"name": "conversion_start_checkout", "description": "Total number of attributed \"START_CHECKOUT\" conversion events for an ad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_searches": {"name": "conversion_searches", "description": "Total number of attributed \"SEARCH\" conversion events for an ad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_view_content": {"name": "conversion_view_content", "description": "Total number of attributed \"VIEW_CONTENT\" conversion events for an ad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_app_opens": {"name": "conversion_app_opens", "description": "Total number of attributed \"APP_OPEN\" conversion events for an ad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_level_completes": {"name": "conversion_level_completes", "description": "Total number of attributed \"LEVEL_COMPLETE\" conversion events for an ad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_page_views": {"name": "conversion_page_views", "description": "Total number of attributed \"PAGE_VIEW\" conversion events for an ad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"snapchat_ad_hourly_report_data\"", "created_at": 1783450506.191966, "unrendered_database": "{% if target.type != 'spark'%}{{ var('snapchat_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('snapchat_ads_schema', 'snapchat_ads') }}", "doc_blocks": []}, "source.snapchat_ads.snapchat_ads.ad_squad_history": {"database": "postgres", "schema": "public", "name": "ad_squad_history", "resource_type": "source", "package_name": "snapchat_ads", "path": "models/staging/src_snapchat.yml", "original_file_path": "models/staging/src_snapchat.yml", "unique_id": "source.snapchat_ads.snapchat_ads.ad_squad_history", "fqn": ["snapchat_ads", "staging", "snapchat_ads", "ad_squad_history"], "source_name": "snapchat_ads", "source_description": "", "loader": "Fivetran", "identifier": "snapchat_ad_squad_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents a historic version of an ad squad in Snapchat.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}, "id": {"name": "id", "description": "The ID of the ad squad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Created at timestamp.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the ad squad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"snapchat_ad_squad_history_data\"", "created_at": 1783450506.192627, "unrendered_database": "{% if target.type != 'spark'%}{{ var('snapchat_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('snapchat_ads_schema', 'snapchat_ads') }}", "doc_blocks": []}, "source.snapchat_ads.snapchat_ads.ad_squad_hourly_report": {"database": "postgres", "schema": "public", "name": "ad_squad_hourly_report", "resource_type": "source", "package_name": "snapchat_ads", "path": "models/staging/src_snapchat.yml", "original_file_path": "models/staging/src_snapchat.yml", "unique_id": "source.snapchat_ads.snapchat_ads.ad_squad_hourly_report", "fqn": ["snapchat_ads", "staging", "snapchat_ads", "ad_squad_hourly_report"], "source_name": "snapchat_ads", "source_description": "", "loader": "Fivetran", "identifier": "snapchat_ad_squad_hourly_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents an hourly performance summary for each ad squad.", "columns": {"ad_squad_id": {"name": "ad_squad_id", "description": "ID of the ad squad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "The hour that the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_1": {"name": "attachment_quartile_1", "description": "Number of times your Long Form Video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_2": {"name": "attachment_quartile_2", "description": "Number of times your Long Form Video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_3": {"name": "attachment_quartile_3", "description": "Number of times your Long Form Video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_total_view_time_millis": {"name": "attachment_total_view_time_millis", "description": "Total time Snapchatters spent on the attachment (HH:MM:SS)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_view_completion": {"name": "attachment_view_completion", "description": "The number of times your Long Form Video was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_1": {"name": "quartile_1", "description": "The number of times your video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_2": {"name": "quartile_2", "description": "The number of times your video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_3": {"name": "quartile_3", "description": "The number of times your video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "saves": {"name": "saves", "description": "Number of times components of the ad squad were saved to Memories", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "Number of times components of the ad squad were shared in a Chat or Story", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "screen_time_millis": {"name": "screen_time_millis", "description": "The number of milli seconds spent watching your ad squad across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views": {"name": "video_views", "description": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_completion": {"name": "view_completion", "description": "The number of times your video was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_time_millis": {"name": "view_time_millis", "description": "The number of milli seconds spent watching your ad squad across all users reached.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions for an ad squad in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend in microdollars for an ad squad in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes for an ad squad in the hour of the record. Swipes are when your ad was swiped up on or the CTA was tapped to view the attachment below.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases attributed to an ad squad in the hour of the record (microcurrency in Ad Account's currency).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases attributed to an ad squad in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_add_billing": {"name": "conversion_add_billing", "description": "Total number of attributed \"ADD_BILLING\" conversion events for an ad squad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_save": {"name": "conversion_save", "description": "Total number of attributed \"SAVE\" conversion events for an ad squad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_add_cart": {"name": "conversion_add_cart", "description": "Total number of attributed \"ADD_CART\" conversion events for an ad squad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups": {"name": "conversion_sign_ups", "description": "Total number of attributed \"SIGN_UP\" conversion events for an ad squad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_start_checkout": {"name": "conversion_start_checkout", "description": "Total number of attributed \"START_CHECKOUT\" conversion events for an ad squad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_searches": {"name": "conversion_searches", "description": "Total number of attributed \"SEARCH\" conversion events for an ad squad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_view_content": {"name": "conversion_view_content", "description": "Total number of attributed \"VIEW_CONTENT\" conversion events for an ad squad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_app_opens": {"name": "conversion_app_opens", "description": "Total number of attributed \"APP_OPEN\" conversion events for an ad squad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_level_completes": {"name": "conversion_level_completes", "description": "Total number of attributed \"LEVEL_COMPLETE\" conversion events for an ad squad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_page_views": {"name": "conversion_page_views", "description": "Total number of attributed \"PAGE_VIEW\" conversion events for an ad squad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"snapchat_ad_squad_hourly_report_data\"", "created_at": 1783450506.1933386, "unrendered_database": "{% if target.type != 'spark'%}{{ var('snapchat_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('snapchat_ads_schema', 'snapchat_ads') }}", "doc_blocks": []}, "source.snapchat_ads.snapchat_ads.campaign_history": {"database": "postgres", "schema": "public", "name": "campaign_history", "resource_type": "source", "package_name": "snapchat_ads", "path": "models/staging/src_snapchat.yml", "original_file_path": "models/staging/src_snapchat.yml", "unique_id": "source.snapchat_ads.snapchat_ads.campaign_history", "fqn": ["snapchat_ads", "staging", "snapchat_ads", "campaign_history"], "source_name": "snapchat_ads", "source_description": "", "loader": "Fivetran", "identifier": "snapchat_campaign_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents a historic version of a campaign in Snapchat.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}, "id": {"name": "id", "description": "The name of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Created at timestamp.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_id": {"name": "ad_account_id", "description": "The ID of the related ad account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_micro": {"name": "daily_budget_micro", "description": "Daily Spend Cap (micro-currency)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_time": {"name": "start_time", "description": "Start time", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_time": {"name": "end_time", "description": "End time", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lifetime_spend_cap_micro": {"name": "lifetime_spend_cap_micro", "description": "Lifetime spend cap for the campaign (microcurrency)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Campaign status (ACTIVE, PAUSED)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective": {"name": "objective", "description": "Objective of the Campaign (BRAND_AWARENESS (default), APP_CONVERSION, APP_INSTALL, etc)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"snapchat_campaign_history_data\"", "created_at": 1783450506.1939785, "unrendered_database": "{% if target.type != 'spark'%}{{ var('snapchat_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('snapchat_ads_schema', 'snapchat_ads') }}", "doc_blocks": []}, "source.snapchat_ads.snapchat_ads.campaign_hourly_report": {"database": "postgres", "schema": "public", "name": "campaign_hourly_report", "resource_type": "source", "package_name": "snapchat_ads", "path": "models/staging/src_snapchat.yml", "original_file_path": "models/staging/src_snapchat.yml", "unique_id": "source.snapchat_ads.snapchat_ads.campaign_hourly_report", "fqn": ["snapchat_ads", "staging", "snapchat_ads", "campaign_hourly_report"], "source_name": "snapchat_ads", "source_description": "", "loader": "Fivetran", "identifier": "snapchat_campaign_hourly_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents an hourly performance summary for each campaign.", "columns": {"campaign_id": {"name": "campaign_id", "description": "ID of campaign", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "The hour that the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_1": {"name": "attachment_quartile_1", "description": "Number of times your Long Form Video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_2": {"name": "attachment_quartile_2", "description": "Number of times your Long Form Video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_3": {"name": "attachment_quartile_3", "description": "Number of times your Long Form Video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_total_view_time_millis": {"name": "attachment_total_view_time_millis", "description": "Total time Snapchatters spent on the attachment (HH:MM:SS)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_view_completion": {"name": "attachment_view_completion", "description": "The number of times your Long Form Video was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_1": {"name": "quartile_1", "description": "The number of times your video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_2": {"name": "quartile_2", "description": "The number of times your video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_3": {"name": "quartile_3", "description": "The number of times your video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "saves": {"name": "saves", "description": "Number of times components of the campaign were saved to Memories", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "Number of times components of the campaign were shared in a Chat or Story", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "screen_time_millis": {"name": "screen_time_millis", "description": "The number of milli seconds spent watching your campaign across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views": {"name": "video_views", "description": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_completion": {"name": "view_completion", "description": "The number of times your video was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_time_millis": {"name": "view_time_millis", "description": "The number of milli seconds spent watching your campaign across all users reached.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions for a campaign in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend in microdollars for a campaign in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes for a campaign in the hour of the record. Swipes are when your ad was swiped up on or the CTA was tapped to view the attachment below.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases attributed to a campaign in the hour of the record (microcurrency in Ad Account's currency).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases attributed to a campaign in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_add_billing": {"name": "conversion_add_billing", "description": "Total number of attributed \"ADD_BILLING\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_save": {"name": "conversion_save", "description": "Total number of attributed \"SAVE\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_add_cart": {"name": "conversion_add_cart", "description": "Total number of attributed \"ADD_CART\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups": {"name": "conversion_sign_ups", "description": "Total number of attributed \"SIGN_UP\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_start_checkout": {"name": "conversion_start_checkout", "description": "Total number of attributed \"START_CHECKOUT\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_searches": {"name": "conversion_searches", "description": "Total number of attributed \"SEARCH\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_view_content": {"name": "conversion_view_content", "description": "Total number of attributed \"VIEW_CONTENT\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_app_opens": {"name": "conversion_app_opens", "description": "Total number of attributed \"APP_OPEN\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_level_completes": {"name": "conversion_level_completes", "description": "Total number of attributed \"LEVEL_COMPLETE\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_page_views": {"name": "conversion_page_views", "description": "Total number of attributed \"PAGE_VIEW\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"snapchat_campaign_hourly_report_data\"", "created_at": 1783450506.1947398, "unrendered_database": "{% if target.type != 'spark'%}{{ var('snapchat_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('snapchat_ads_schema', 'snapchat_ads') }}", "doc_blocks": []}, "source.snapchat_ads.snapchat_ads.creative_history": {"database": "postgres", "schema": "public", "name": "creative_history", "resource_type": "source", "package_name": "snapchat_ads", "path": "models/staging/src_snapchat.yml", "original_file_path": "models/staging/src_snapchat.yml", "unique_id": "source.snapchat_ads.snapchat_ads.creative_history", "fqn": ["snapchat_ads", "staging", "snapchat_ads", "creative_history"], "source_name": "snapchat_ads", "source_description": "", "loader": "Fivetran", "identifier": "snapchat_creative_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents a historic version of a creative in Snapchat.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}, "id": {"name": "id", "description": "The ID of the creative in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Created at timestamp.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_id": {"name": "ad_account_id", "description": "The ID of the related ad account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the creative in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "web_view_url": {"name": "web_view_url", "description": "The URL of the creative if the creative is of type 'web view'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"snapchat_creative_history_data\"", "created_at": 1783450506.1953433, "unrendered_database": "{% if target.type != 'spark'%}{{ var('snapchat_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('snapchat_ads_schema', 'snapchat_ads') }}", "doc_blocks": []}, "source.snapchat_ads.snapchat_ads.creative_url_tag_history": {"database": "postgres", "schema": "public", "name": "creative_url_tag_history", "resource_type": "source", "package_name": "snapchat_ads", "path": "models/staging/src_snapchat.yml", "original_file_path": "models/staging/src_snapchat.yml", "unique_id": "source.snapchat_ads.snapchat_ads.creative_url_tag_history", "fqn": ["snapchat_ads", "staging", "snapchat_ads", "creative_url_tag_history"], "source_name": "snapchat_ads", "source_description": "", "loader": "Fivetran", "identifier": "snapchat_creative_url_tag_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents a URL parameter key-value pair for a creative in Snapchat.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}, "creative_id": {"name": "creative_id", "description": "The ID of the related creative in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Created at timestamp.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "key": {"name": "key", "description": "The URL parameter key, i.e. UTM_SOURCE.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "value": {"name": "value", "description": "The URL parameter value, i.e. Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"snapchat_creative_url_tag_history_data\"", "created_at": 1783450506.1959715, "unrendered_database": "{% if target.type != 'spark'%}{{ var('snapchat_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('snapchat_ads_schema', 'snapchat_ads') }}", "doc_blocks": []}, "source.snapchat_ads.snapchat_ads.campaign_geo_country_daily_report": {"database": "postgres", "schema": "public", "name": "campaign_geo_country_daily_report", "resource_type": "source", "package_name": "snapchat_ads", "path": "models/staging/src_snapchat.yml", "original_file_path": "models/staging/src_snapchat.yml", "unique_id": "source.snapchat_ads.snapchat_ads.campaign_geo_country_daily_report", "fqn": ["snapchat_ads", "staging", "snapchat_ads", "campaign_geo_country_daily_report"], "source_name": "snapchat_ads", "source_description": "", "loader": "Fivetran", "identifier": "snapchat_campaign_geo_country_daily_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a daily performance summary per country for each campaign.", "columns": {"campaign_id": {"name": "campaign_id", "description": "ID of campaign", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "The day that the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country": {"name": "country", "description": "The country that the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_1": {"name": "attachment_quartile_1", "description": "Number of times your Long Form Video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_2": {"name": "attachment_quartile_2", "description": "Number of times your Long Form Video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_3": {"name": "attachment_quartile_3", "description": "Number of times your Long Form Video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_total_view_time_millis": {"name": "attachment_total_view_time_millis", "description": "Total time Snapchatters spent on the attachment (HH:MM:SS)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_view_completion": {"name": "attachment_view_completion", "description": "The number of times your Long Form Video was viewed to completion (97%)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_1": {"name": "quartile_1", "description": "The number of times your video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_2": {"name": "quartile_2", "description": "The number of times your video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_3": {"name": "quartile_3", "description": "The number of times your video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "saves": {"name": "saves", "description": "Number of times components of the campaign were saved to Memories", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "Number of times components of the campaign were shared in a Chat or Story", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "screen_time_millis": {"name": "screen_time_millis", "description": "The number of milli seconds spent watching your campaign across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views": {"name": "video_views", "description": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_completion": {"name": "view_completion", "description": "The number of times your video campaign was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_time_millis": {"name": "view_time_millis", "description": "The number of milli seconds spent watching your campaign across all users reached.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions for a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend in microdollars for a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes for a campaign. Swipes are when your ad was swiped up on or the CTA was tapped to view the attachment below.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases attributed to a campaign (microcurrency in Ad Account's currency).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases attributed to a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_add_billing": {"name": "conversion_add_billing", "description": "Total number of attributed \"ADD_BILLING\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_save": {"name": "conversion_save", "description": "Total number of attributed \"SAVE\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_add_cart": {"name": "conversion_add_cart", "description": "Total number of attributed \"ADD_CART\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups": {"name": "conversion_sign_ups", "description": "Total number of attributed \"SIGN_UP\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_start_checkout": {"name": "conversion_start_checkout", "description": "Total number of attributed \"START_CHECKOUT\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_searches": {"name": "conversion_searches", "description": "Total number of attributed \"SEARCH\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_view_content": {"name": "conversion_view_content", "description": "Total number of attributed \"VIEW_CONTENT\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_app_opens": {"name": "conversion_app_opens", "description": "Total number of attributed \"APP_OPEN\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_level_completes": {"name": "conversion_level_completes", "description": "Total number of attributed \"LEVEL_COMPLETE\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_page_views": {"name": "conversion_page_views", "description": "Total number of attributed \"PAGE_VIEW\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"snapchat_campaign_geo_country_daily_report_data\"", "created_at": 1783450506.19673, "unrendered_database": "{% if target.type != 'spark'%}{{ var('snapchat_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('snapchat_ads_schema', 'snapchat_ads') }}", "doc_blocks": []}, "source.snapchat_ads.snapchat_ads.campaign_geo_region_daily_report": {"database": "postgres", "schema": "public", "name": "campaign_geo_region_daily_report", "resource_type": "source", "package_name": "snapchat_ads", "path": "models/staging/src_snapchat.yml", "original_file_path": "models/staging/src_snapchat.yml", "unique_id": "source.snapchat_ads.snapchat_ads.campaign_geo_region_daily_report", "fqn": ["snapchat_ads", "staging", "snapchat_ads", "campaign_geo_region_daily_report"], "source_name": "snapchat_ads", "source_description": "", "loader": "Fivetran", "identifier": "snapchat_campaign_geo_region_daily_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a daily performance summary per each region for each campaign.", "columns": {"campaign_id": {"name": "campaign_id", "description": "ID of campaign", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "The day that the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "region": {"name": "region", "description": "The region that the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_1": {"name": "attachment_quartile_1", "description": "Number of times your Long Form Video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_2": {"name": "attachment_quartile_2", "description": "Number of times your Long Form Video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_3": {"name": "attachment_quartile_3", "description": "Number of times your Long Form Video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_total_view_time_millis": {"name": "attachment_total_view_time_millis", "description": "Total time Snapchatters spent on the attachment (HH:MM:SS)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_view_completion": {"name": "attachment_view_completion", "description": "The number of times your Long Form Video was viewed to completion (97%)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_1": {"name": "quartile_1", "description": "The number of times your video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_2": {"name": "quartile_2", "description": "The number of times your video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_3": {"name": "quartile_3", "description": "The number of times your video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "saves": {"name": "saves", "description": "Number of times components of the campaign were saved to Memories", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "Number of times components of the campaign were shared in a Chat or Story", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "screen_time_millis": {"name": "screen_time_millis", "description": "The number of milli seconds spent watching your campaign across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views": {"name": "video_views", "description": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_completion": {"name": "view_completion", "description": "The number of times your video was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_time_millis": {"name": "view_time_millis", "description": "The number of milli seconds spent watching your campaign across all users reached.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions for a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend in microdollars for a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes for a campaign. Swipes are when your ad was swiped up on or the CTA was tapped to view the attachment below.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases attributed to a campaign (microcurrency in Ad Account's currency).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases attributed to a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_add_billing": {"name": "conversion_add_billing", "description": "Total number of attributed \"ADD_BILLING\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_save": {"name": "conversion_save", "description": "Total number of attributed \"SAVE\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_add_cart": {"name": "conversion_add_cart", "description": "Total number of attributed \"ADD_CART\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups": {"name": "conversion_sign_ups", "description": "Total number of attributed \"SIGN_UP\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_start_checkout": {"name": "conversion_start_checkout", "description": "Total number of attributed \"START_CHECKOUT\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_searches": {"name": "conversion_searches", "description": "Total number of attributed \"SEARCH\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_view_content": {"name": "conversion_view_content", "description": "Total number of attributed \"VIEW_CONTENT\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_app_opens": {"name": "conversion_app_opens", "description": "Total number of attributed \"APP_OPEN\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_level_completes": {"name": "conversion_level_completes", "description": "Total number of attributed \"LEVEL_COMPLETE\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_page_views": {"name": "conversion_page_views", "description": "Total number of attributed \"PAGE_VIEW\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"snapchat_campaign_geo_region_daily_report_data\"", "created_at": 1783450506.1975012, "unrendered_database": "{% if target.type != 'spark'%}{{ var('snapchat_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('snapchat_ads_schema', 'snapchat_ads') }}", "doc_blocks": []}, "source.pinterest.pinterest_ads.pin_promotion_report": {"database": "postgres", "schema": "public", "name": "pin_promotion_report", "resource_type": "source", "package_name": "pinterest", "path": "models/staging/src_pinterest_ads.yml", "original_file_path": "models/staging/src_pinterest_ads.yml", "unique_id": "source.pinterest.pinterest_ads.pin_promotion_report", "fqn": ["pinterest", "staging", "pinterest_ads", "pin_promotion_report"], "source_name": "pinterest_ads", "source_description": "", "loader": "Fivetran", "identifier": "pinterest_pin_promotion_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of a Pinterest Pin promotion.", "columns": {"date": {"name": "date", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "pin_promotion_id": {"name": "pin_promotion_id", "description": "The ID of the related Pin promotion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.pin_promotion_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}, "impression_1": {"name": "impression_1", "description": "The number of paid pin impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impression_1"]}, "impression_2": {"name": "impression_2", "description": "The number of earned pin impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impression_2"]}, "clickthrough_1": {"name": "clickthrough_1", "description": "The number of paid pin clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clickthrough_1"]}, "clickthrough_2": {"name": "clickthrough_2", "description": "The number of earned outbound clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clickthrough_2"]}, "spend_in_micro_dollar": {"name": "spend_in_micro_dollar", "description": "The amount of spend in micro dollars that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend_in_micro_dollar"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value_in_micro_dollar": {"name": "total_conversions_value_in_micro_dollar", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. The value is expressed in microdollars, where one microdollar is one-millionth of a US dollar. Example: If the total order value from conversions is $50,000, this would be represented as 50,000,000,000 microdollars.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value_in_micro_dollar"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"pinterest_pin_promotion_report_data\"", "created_at": 1783450506.1981575, "unrendered_database": "{% if target.type != 'spark'%}{{ var('pinterest_ads_database', var('pinterest_database',target.database)) }}{% endif %}", "unrendered_schema": "{{ var('pinterest_ads_schema', var('pinterest_schema', 'pinterest_ads')) }}", "doc_blocks": []}, "source.pinterest.pinterest_ads.pin_promotion_history": {"database": "postgres", "schema": "public", "name": "pin_promotion_history", "resource_type": "source", "package_name": "pinterest", "path": "models/staging/src_pinterest_ads.yml", "original_file_path": "models/staging/src_pinterest_ads.yml", "unique_id": "source.pinterest.pinterest_ads.pin_promotion_history", "fqn": ["pinterest", "staging", "pinterest_ads", "pin_promotion_history"], "source_name": "pinterest_ads", "source_description": "", "loader": "Fivetran", "identifier": "pinterest_pin_promotion_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of a Pinterest Pin promotion.", "columns": {"id": {"name": "id", "description": "The ID of the related Pin promotion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.pin_promotion_id"]}, "ad_account_id": {"name": "ad_account_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_account_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "created_time": {"name": "created_time", "description": "Pin creation time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "destination_url": {"name": "destination_url", "description": "Pin destination URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Pin promotion name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pin_id": {"name": "pin_id", "description": "Original pin ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The status of the Pin promotion. One of \"ACTIVE\", \"ARCHIVED\", \"PAUSED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_type": {"name": "creative_type", "description": "The creative type. \nOne of \"APP\", \"APP_VIDEO\", \"BOARD\", \"CAROUSEL\", \"CINEMATIC\", \"COMMERCE\", \"MAX_VIDEO\", \"NATIVE_VIDEO\", \"REGULAR\", \n\"SEARCH_PROMINENCE\", \"SEARCH_PROMINENCE_CAROUSEL\", \"SHOPPING\", \"SHOP_THE_PIN\", \"THIRD_PARTY\", or \"VIDEO\".\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"pinterest_pin_promotion_history_data\"", "created_at": 1783450506.1988018, "unrendered_database": "{% if target.type != 'spark'%}{{ var('pinterest_ads_database', var('pinterest_database',target.database)) }}{% endif %}", "unrendered_schema": "{{ var('pinterest_ads_schema', var('pinterest_schema', 'pinterest_ads')) }}", "doc_blocks": []}, "source.pinterest.pinterest_ads.campaign_history": {"database": "postgres", "schema": "public", "name": "campaign_history", "resource_type": "source", "package_name": "pinterest", "path": "models/staging/src_pinterest_ads.yml", "original_file_path": "models/staging/src_pinterest_ads.yml", "unique_id": "source.pinterest.pinterest_ads.campaign_history", "fqn": ["pinterest", "staging", "pinterest_ads", "campaign_history"], "source_name": "pinterest_ads", "source_description": "", "loader": "Fivetran", "identifier": "pinterest_campaign_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of a Pinterest Campaign.", "columns": {"id": {"name": "id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "created_time": {"name": "created_time", "description": "Campaign creation time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "name": {"name": "name", "description": "Campaign name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The status of the Campaign. One of \"ACTIVE\", \"ARCHIVED\", \"PAUSED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "default_ad_group_budget_in_micro_currency": {"name": "default_ad_group_budget_in_micro_currency", "description": "When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_automated_campaign": {"name": "is_automated_campaign", "description": "Specifies whether the campaign was created in the automated campaign flow", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_campaign_budget_optimization": {"name": "is_campaign_budget_optimization", "description": "Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_flexible_daily_budgets": {"name": "is_flexible_daily_budgets", "description": "Determine if a campaign has flexible daily budgets setup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_time": {"name": "start_time", "description": "Timestamp when the campaign became active or was scheduled to start.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_time": {"name": "end_time", "description": "Timestamp when the campaign ended or is scheduled to end.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_spend_cap": {"name": "budget_spend_cap", "description": "Maximum amount allowed to be spent over a specified budget period for the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lifetime_spend_cap": {"name": "lifetime_spend_cap", "description": "Total maximum spend allowed across the entire lifespan of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective_type": {"name": "objective_type", "description": "The primary goal of the campaign (e.g., brand awareness, conversions, video views).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"pinterest_campaign_history_data\"", "created_at": 1783450506.1994636, "unrendered_database": "{% if target.type != 'spark'%}{{ var('pinterest_ads_database', var('pinterest_database',target.database)) }}{% endif %}", "unrendered_schema": "{{ var('pinterest_ads_schema', var('pinterest_schema', 'pinterest_ads')) }}", "doc_blocks": []}, "source.pinterest.pinterest_ads.ad_group_history": {"database": "postgres", "schema": "public", "name": "ad_group_history", "resource_type": "source", "package_name": "pinterest", "path": "models/staging/src_pinterest_ads.yml", "original_file_path": "models/staging/src_pinterest_ads.yml", "unique_id": "source.pinterest.pinterest_ads.ad_group_history", "fqn": ["pinterest", "staging", "pinterest_ads", "ad_group_history"], "source_name": "pinterest_ads", "source_description": "", "loader": "Fivetran", "identifier": "pinterest_ad_group_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of a Pinterest Ad Group.", "columns": {"id": {"name": "id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "ad_account_id": {"name": "ad_account_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_account_id"]}, "created_time": {"name": "created_time", "description": "Ad group creation time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Ad group name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The status of the Ad group. One of \"ACTIVE\", \"ARCHIVED\", \"PAUSED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_time": {"name": "start_time", "description": "Ad group start time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_time": {"name": "end_time", "description": "Ad group end time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pacing_delivery_type": {"name": "pacing_delivery_type", "description": "Ad group pacing delivery type. With ACCELERATED, an ad group budget is spent as fast as possible. With STANDARD, an ad group budget is spent smoothly over a day. When using CBO, only the STANDARD pacing delivery type is allowed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement_group": {"name": "placement_group", "description": "The placement group. \"ALL\", \"SEARCH\", \"BROWSE\", or \"OTHER\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "summary_status": {"name": "summary_status", "description": "Summary status. \"RUNNING\", \"PAUSED\", \"NOT_STARTED\", \"COMPLETED\", \"ADVERTISER_DISABLED\", \"ARCHIVED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"pinterest_ad_group_history_data\"", "created_at": 1783450506.2001352, "unrendered_database": "{% if target.type != 'spark'%}{{ var('pinterest_ads_database', var('pinterest_database',target.database)) }}{% endif %}", "unrendered_schema": "{{ var('pinterest_ads_schema', var('pinterest_schema', 'pinterest_ads')) }}", "doc_blocks": []}, "source.pinterest.pinterest_ads.ad_group_report": {"database": "postgres", "schema": "public", "name": "ad_group_report", "resource_type": "source", "package_name": "pinterest", "path": "models/staging/src_pinterest_ads.yml", "original_file_path": "models/staging/src_pinterest_ads.yml", "unique_id": "source.pinterest.pinterest_ads.ad_group_report", "fqn": ["pinterest", "staging", "pinterest_ads", "ad_group_report"], "source_name": "pinterest_ads", "source_description": "", "loader": "Fivetran", "identifier": "pinterest_ad_group_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of a Pinterest ad group.", "columns": {"date": {"name": "date", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "Name of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_status": {"name": "ad_group_status", "description": "Status of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}, "impression_1": {"name": "impression_1", "description": "The number of paid pin impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impression_1"]}, "impression_2": {"name": "impression_2", "description": "The number of earned pin impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impression_2"]}, "clickthrough_1": {"name": "clickthrough_1", "description": "The number of paid pin clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clickthrough_1"]}, "clickthrough_2": {"name": "clickthrough_2", "description": "The number of earned outbound clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clickthrough_2"]}, "spend_in_micro_dollar": {"name": "spend_in_micro_dollar", "description": "The amount of spend in micro dollars that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend_in_micro_dollar"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value_in_micro_dollar": {"name": "total_conversions_value_in_micro_dollar", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. The value is expressed in microdollars, where one microdollar is one-millionth of a US dollar. Example: If the total order value from conversions is $50,000, this would be represented as 50,000,000,000 microdollars.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value_in_micro_dollar"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"pinterest_ad_group_report_data\"", "created_at": 1783450506.2008271, "unrendered_database": "{% if target.type != 'spark'%}{{ var('pinterest_ads_database', var('pinterest_database',target.database)) }}{% endif %}", "unrendered_schema": "{{ var('pinterest_ads_schema', var('pinterest_schema', 'pinterest_ads')) }}", "doc_blocks": []}, "source.pinterest.pinterest_ads.advertiser_history": {"database": "postgres", "schema": "public", "name": "advertiser_history", "resource_type": "source", "package_name": "pinterest", "path": "models/staging/src_pinterest_ads.yml", "original_file_path": "models/staging/src_pinterest_ads.yml", "unique_id": "source.pinterest.pinterest_ads.advertiser_history", "fqn": ["pinterest", "staging", "pinterest_ads", "advertiser_history"], "source_name": "pinterest_ads", "source_description": "", "loader": "Fivetran", "identifier": "pinterest_advertiser_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of a Pinterest advertiser.", "columns": {"id": {"name": "id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "name": {"name": "name", "description": "Name of the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country": {"name": "country", "description": "The country code where the advertiser is located.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_time": {"name": "created_time", "description": "Timestamp of when a record was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.created_at"]}, "currency": {"name": "currency", "description": "The currency code which the a", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_time": {"name": "updated_time", "description": "Timestamp of when a record was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.updated_at"]}, "owner_username": {"name": "owner_username", "description": "Advertiser's username.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "owner_user_id": {"name": "owner_user_id", "description": "Unique identifier of the owner user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "permissions": {"name": "permissions", "description": "The permissions associated with this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"pinterest_advertiser_history_data\"", "created_at": 1783450506.2014742, "unrendered_database": "{% if target.type != 'spark'%}{{ var('pinterest_ads_database', var('pinterest_database',target.database)) }}{% endif %}", "unrendered_schema": "{{ var('pinterest_ads_schema', var('pinterest_schema', 'pinterest_ads')) }}", "doc_blocks": []}, "source.pinterest.pinterest_ads.advertiser_report": {"database": "postgres", "schema": "public", "name": "advertiser_report", "resource_type": "source", "package_name": "pinterest", "path": "models/staging/src_pinterest_ads.yml", "original_file_path": "models/staging/src_pinterest_ads.yml", "unique_id": "source.pinterest.pinterest_ads.advertiser_report", "fqn": ["pinterest", "staging", "pinterest_ads", "advertiser_report"], "source_name": "pinterest_ads", "source_description": "", "loader": "Fivetran", "identifier": "pinterest_advertiser_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of a Pinterest advertiser.", "columns": {"date": {"name": "date", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}, "impression_1": {"name": "impression_1", "description": "The number of paid pin impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impression_1"]}, "impression_2": {"name": "impression_2", "description": "The number of earned pin impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impression_2"]}, "clickthrough_1": {"name": "clickthrough_1", "description": "The number of paid pin clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clickthrough_1"]}, "clickthrough_2": {"name": "clickthrough_2", "description": "The number of earned outbound clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clickthrough_2"]}, "spend_in_micro_dollar": {"name": "spend_in_micro_dollar", "description": "The amount of spend in micro dollars that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend_in_micro_dollar"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value_in_micro_dollar": {"name": "total_conversions_value_in_micro_dollar", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. The value is expressed in microdollars, where one microdollar is one-millionth of a US dollar. Example: If the total order value from conversions is $50,000, this would be represented as 50,000,000,000 microdollars.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value_in_micro_dollar"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"pinterest_advertiser_report_data\"", "created_at": 1783450506.2021105, "unrendered_database": "{% if target.type != 'spark'%}{{ var('pinterest_ads_database', var('pinterest_database',target.database)) }}{% endif %}", "unrendered_schema": "{{ var('pinterest_ads_schema', var('pinterest_schema', 'pinterest_ads')) }}", "doc_blocks": []}, "source.pinterest.pinterest_ads.campaign_report": {"database": "postgres", "schema": "public", "name": "campaign_report", "resource_type": "source", "package_name": "pinterest", "path": "models/staging/src_pinterest_ads.yml", "original_file_path": "models/staging/src_pinterest_ads.yml", "unique_id": "source.pinterest.pinterest_ads.campaign_report", "fqn": ["pinterest", "staging", "pinterest_ads", "campaign_report"], "source_name": "pinterest_ads", "source_description": "", "loader": "Fivetran", "identifier": "pinterest_campaign_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of a Pinterest campaign.", "columns": {"date": {"name": "date", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "Name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "Status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}, "impression_1": {"name": "impression_1", "description": "The number of paid pin impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impression_1"]}, "impression_2": {"name": "impression_2", "description": "The number of earned pin impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impression_2"]}, "clickthrough_1": {"name": "clickthrough_1", "description": "The number of paid pin clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clickthrough_1"]}, "clickthrough_2": {"name": "clickthrough_2", "description": "The number of earned outbound clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clickthrough_2"]}, "spend_in_micro_dollar": {"name": "spend_in_micro_dollar", "description": "The amount of spend in micro dollars that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend_in_micro_dollar"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value_in_micro_dollar": {"name": "total_conversions_value_in_micro_dollar", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. The value is expressed in microdollars, where one microdollar is one-millionth of a US dollar. Example: If the total order value from conversions is $50,000, this would be represented as 50,000,000,000 microdollars.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value_in_micro_dollar"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"pinterest_campaign_report_data\"", "created_at": 1783450506.202813, "unrendered_database": "{% if target.type != 'spark'%}{{ var('pinterest_ads_database', var('pinterest_database',target.database)) }}{% endif %}", "unrendered_schema": "{{ var('pinterest_ads_schema', var('pinterest_schema', 'pinterest_ads')) }}", "doc_blocks": []}, "source.pinterest.pinterest_ads.keyword_history": {"database": "postgres", "schema": "public", "name": "keyword_history", "resource_type": "source", "package_name": "pinterest", "path": "models/staging/src_pinterest_ads.yml", "original_file_path": "models/staging/src_pinterest_ads.yml", "unique_id": "source.pinterest.pinterest_ads.keyword_history", "fqn": ["pinterest", "staging", "pinterest_ads", "keyword_history"], "source_name": "pinterest_ads", "source_description": "", "loader": "Fivetran", "identifier": "pinterest_keyword_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of a Pinterest keyword.", "columns": {"id": {"name": "id", "description": "Unique identifier of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "value": {"name": "value", "description": "The text value that makes upd the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_id": {"name": "_fivetran_id", "description": "The unique identifier of the record within the Fivetran synced table.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "archived": {"name": "archived", "description": "Boolean indicating if the keyword is archived.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid": {"name": "bid", "description": "Bid amount set for the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "match_type": {"name": "match_type", "description": "Type of match the keyword is tied to. Either Exact or Broad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "parent_type": {"name": "parent_type", "description": "Identifier of what grain the parent type is. Ad group or campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"pinterest_keyword_history_data\"", "created_at": 1783450506.2034633, "unrendered_database": "{% if target.type != 'spark'%}{{ var('pinterest_ads_database', var('pinterest_database',target.database)) }}{% endif %}", "unrendered_schema": "{{ var('pinterest_ads_schema', var('pinterest_schema', 'pinterest_ads')) }}", "doc_blocks": []}, "source.pinterest.pinterest_ads.keyword_report": {"database": "postgres", "schema": "public", "name": "keyword_report", "resource_type": "source", "package_name": "pinterest", "path": "models/staging/src_pinterest_ads.yml", "original_file_path": "models/staging/src_pinterest_ads.yml", "unique_id": "source.pinterest.pinterest_ads.keyword_report", "fqn": ["pinterest", "staging", "pinterest_ads", "keyword_report"], "source_name": "pinterest_ads", "source_description": "", "loader": "Fivetran", "identifier": "pinterest_keyword_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of a Pinterest key word.", "columns": {"date": {"name": "date", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "keyword_id": {"name": "keyword_id", "description": "Unique identifier of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pin_promotion_id": {"name": "pin_promotion_id", "description": "The ID of the related Pin promotion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.pin_promotion_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "Name of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_status": {"name": "ad_group_status", "description": "Status of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}, "impression_1": {"name": "impression_1", "description": "The number of paid pin impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impression_1"]}, "impression_2": {"name": "impression_2", "description": "The number of earned pin impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impression_2"]}, "clickthrough_1": {"name": "clickthrough_1", "description": "The number of paid pin clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clickthrough_1"]}, "clickthrough_2": {"name": "clickthrough_2", "description": "The number of earned outbound clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clickthrough_2"]}, "spend_in_micro_dollar": {"name": "spend_in_micro_dollar", "description": "The amount of spend in micro dollars that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend_in_micro_dollar"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value_in_micro_dollar": {"name": "total_conversions_value_in_micro_dollar", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. The value is expressed in microdollars, where one microdollar is one-millionth of a US dollar. Example: If the total order value from conversions is $50,000, this would be represented as 50,000,000,000 microdollars.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value_in_micro_dollar"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"pinterest_keyword_report_data\"", "created_at": 1783450506.2041209, "unrendered_database": "{% if target.type != 'spark'%}{{ var('pinterest_ads_database', var('pinterest_database',target.database)) }}{% endif %}", "unrendered_schema": "{{ var('pinterest_ads_schema', var('pinterest_schema', 'pinterest_ads')) }}", "doc_blocks": []}, "source.pinterest.pinterest_ads.pin_promotion_targeting_report": {"database": "postgres", "schema": "public", "name": "pin_promotion_targeting_report", "resource_type": "source", "package_name": "pinterest", "path": "models/staging/src_pinterest_ads.yml", "original_file_path": "models/staging/src_pinterest_ads.yml", "unique_id": "source.pinterest.pinterest_ads.pin_promotion_targeting_report", "fqn": ["pinterest", "staging", "pinterest_ads", "pin_promotion_targeting_report"], "source_name": "pinterest_ads", "source_description": "", "loader": "Fivetran", "identifier": "pinterest_pin_promotion_targeting_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Contains performance metrics for promoted Pins segmented by applied targeting criteria, including targeting type, value, and related campaign metadata.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}, "date": {"name": "date", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "targeting_type": {"name": "targeting_type", "description": "Reporting targeting type for ads. Possible values 'KEYWORD', 'APPTYPE', 'GENDER', 'LOCATION', 'PLACEMENT', 'COUNTRY', 'TARGETED_INTEREST', 'PINNER_INTEREST', 'AUDIENCE_INCLUDE', 'GEO', 'AGE_BUCKET', 'REGION', 'QUIZ_RESULT', 'AGE_BUCKET_AND_GENDER'", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "targeting_value": {"name": "targeting_value", "description": "The specific value applied within the targeting type (e.g., 'Fashion' for interest, 'New York' for location).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "pin_promotion_id": {"name": "pin_promotion_id", "description": "The ID of the related Pin promotion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.pin_promotion_id"]}, "clickthrough_1": {"name": "clickthrough_1", "description": "The number of paid pin clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clickthrough_1"]}, "clickthrough_2": {"name": "clickthrough_2", "description": "The number of earned outbound clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clickthrough_2"]}, "impression_1": {"name": "impression_1", "description": "The number of paid pin impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impression_1"]}, "impression_2": {"name": "impression_2", "description": "The number of earned pin impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impression_2"]}, "spend_in_micro_dollar": {"name": "spend_in_micro_dollar", "description": "The amount of spend in micro dollars that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend_in_micro_dollar"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value_in_micro_dollar": {"name": "total_conversions_value_in_micro_dollar", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. The value is expressed in microdollars, where one microdollar is one-millionth of a US dollar. Example: If the total order value from conversions is $50,000, this would be represented as 50,000,000,000 microdollars.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value_in_micro_dollar"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"pinterest_pin_promotion_targeting_report_data\"", "created_at": 1783450506.2047963, "unrendered_database": "{% if target.type != 'spark'%}{{ var('pinterest_ads_database', var('pinterest_database',target.database)) }}{% endif %}", "unrendered_schema": "{{ var('pinterest_ads_schema', var('pinterest_schema', 'pinterest_ads')) }}", "doc_blocks": []}, "source.pinterest.pinterest_ads.targeting_geo": {"database": "postgres", "schema": "public", "name": "targeting_geo", "resource_type": "source", "package_name": "pinterest", "path": "models/staging/src_pinterest_ads.yml", "original_file_path": "models/staging/src_pinterest_ads.yml", "unique_id": "source.pinterest.pinterest_ads.targeting_geo", "fqn": ["pinterest", "staging", "pinterest_ads", "targeting_geo"], "source_name": "pinterest_ads", "source_description": "", "loader": "Fivetran", "identifier": "pinterest_targeting_geo_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Maps country targeting values used in campaigns, including standardized names and associated location codes.", "columns": {"country_id": {"name": "country_id", "description": "The ID of the targeted country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.country_id"]}, "country_name": {"name": "country_name", "description": "The name of the targeted country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"pinterest_targeting_geo_data\"", "created_at": 1783450506.205387, "unrendered_database": "{% if target.type != 'spark'%}{{ var('pinterest_ads_database', var('pinterest_database',target.database)) }}{% endif %}", "unrendered_schema": "{{ var('pinterest_ads_schema', var('pinterest_schema', 'pinterest_ads')) }}", "doc_blocks": []}, "source.pinterest.pinterest_ads.targeting_geo_region": {"database": "postgres", "schema": "public", "name": "targeting_geo_region", "resource_type": "source", "package_name": "pinterest", "path": "models/staging/src_pinterest_ads.yml", "original_file_path": "models/staging/src_pinterest_ads.yml", "unique_id": "source.pinterest.pinterest_ads.targeting_geo_region", "fqn": ["pinterest", "staging", "pinterest_ads", "targeting_geo_region"], "source_name": "pinterest_ads", "source_description": "", "loader": "Fivetran", "identifier": "pinterest_targeting_geo_region_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Maps region targeting values used in campaigns, including standardized names and associated location codes.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}, "country_id": {"name": "country_id", "description": "The ID of the targeted country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.country_id"]}, "region_id": {"name": "region_id", "description": "The ID of the targeted region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.region_id"]}, "region_name": {"name": "region_name", "description": "The ID of the targeted region.\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"pinterest_targeting_geo_region_data\"", "created_at": 1783450506.2059958, "unrendered_database": "{% if target.type != 'spark'%}{{ var('pinterest_ads_database', var('pinterest_database',target.database)) }}{% endif %}", "unrendered_schema": "{{ var('pinterest_ads_schema', var('pinterest_schema', 'pinterest_ads')) }}", "doc_blocks": []}, "source.google_ads.google_ads.ad_stats": {"database": "postgres", "schema": "public", "name": "ad_stats", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.ad_stats", "fqn": ["google_ads", "staging", "google_ads", "ad_stats"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_ad_stats_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of an ad in Google Ads broken down to the ad network, device type, and ad group criterion.", "columns": {"customer_id": {"name": "customer_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "date": {"name": "date", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "ad_group": {"name": "ad_group", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "ad_id": {"name": "ad_id", "description": "The ID of the Ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "ad_network_type": {"name": "ad_network_type", "description": "The Google Ad network type used across the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_network_type"]}, "device": {"name": "device", "description": "Account ad performance per unique device where the ads were served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.device"]}, "keyword_ad_group_criterion": {"name": "keyword_ad_group_criterion", "description": "The ad group which the keyword criterion resides.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "cost_micros": {"name": "cost_micros", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_ad_stats_data\"", "created_at": 1783450506.2067065, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.google_ads.google_ads.ad_history": {"database": "postgres", "schema": "public", "name": "ad_history", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.ad_history", "fqn": ["google_ads", "staging", "google_ads", "ad_history"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_ad_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of an ad in Google Ads.", "columns": {"ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "id": {"name": "id", "description": "The ID of the Ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_id"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "display_url": {"name": "display_url", "description": "The display url of the ad that is being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "type": {"name": "type", "description": "The type of the ad in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_type"]}, "status": {"name": "status", "description": "Status of the Ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_status"]}, "final_urls": {"name": "final_urls", "description": "A list of urls that are used for the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean representing whether the state of the record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_ad_history_data\"", "created_at": 1783450506.2073286, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.google_ads.google_ads.ad_group_history": {"database": "postgres", "schema": "public", "name": "ad_group_history", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.ad_group_history", "fqn": ["google_ads", "staging", "google_ads", "ad_group_history"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_ad_group_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of an ad group in Google Ads.", "columns": {"id": {"name": "id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "type": {"name": "type", "description": "The type of the ad group in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_type"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_name"]}, "name": {"name": "name", "description": "The name of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_name"]}, "status": {"name": "status", "description": "Status of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_status"]}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean representing whether the state of the record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_ad_group_history_data\"", "created_at": 1783450506.2079613, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.google_ads.google_ads.campaign_history": {"database": "postgres", "schema": "public", "name": "campaign_history", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.campaign_history", "fqn": ["google_ads", "staging", "google_ads", "campaign_history"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_campaign_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of a campaign in Google Ads.", "columns": {"id": {"name": "id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "ad_network_type": {"name": "ad_network_type", "description": "The Google Ad network type used across the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_network_type"]}, "advertising_channel_type": {"name": "advertising_channel_type", "description": "The type of advertising channel being used by the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertising_channel_subtype": {"name": "advertising_channel_subtype", "description": "The advertising channel subtype that is being used by the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_date": {"name": "start_date", "description": "The start date of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_date_time": {"name": "start_date_time", "description": "The start date and time of the campaign as a timestamp.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_date": {"name": "end_date", "description": "The end date of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_date_time": {"name": "end_date_time", "description": "The end date and time of the campaign as a timestamp.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "serving_status": {"name": "serving_status", "description": "Status of the ads and how they are currently being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "General status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tracking_url_template": {"name": "tracking_url_template", "description": "The tracking url template being used throughout the campaign ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "device": {"name": "device", "description": "Account ad performance per unique device where the ads were served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.device"]}, "name": {"name": "name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_name"]}, "customer_id": {"name": "customer_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean representing whether the state of the record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_campaign_history_data\"", "created_at": 1783450506.2086315, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.google_ads.google_ads.account_history": {"database": "postgres", "schema": "public", "name": "account_history", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.account_history", "fqn": ["google_ads", "staging", "google_ads", "account_history"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_account_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a historical version of an account in Google Ads.", "columns": {"id": {"name": "id", "description": "The ID of the Account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.account_id"]}, "currency_code": {"name": "currency_code", "description": "The currency of the spend reported.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "auto_tagging_enabled": {"name": "auto_tagging_enabled", "description": "Boolean indicating if auto tagging is enabled on the account ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "time_zone": {"name": "time_zone", "description": "The time zone of the account ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "descriptive_name": {"name": "descriptive_name", "description": "The descriptive name of the Customer account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.account_descriptive_name"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean representing whether the state of the record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_account_history_data\"", "created_at": 1783450506.2092428, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.google_ads.google_ads.ad_group_criterion_history": {"database": "postgres", "schema": "public", "name": "ad_group_criterion_history", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.ad_group_criterion_history", "fqn": ["google_ads", "staging", "google_ads", "ad_group_criterion_history"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_ad_group_criterion_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a historical version of an ad group criterion in Google Ads.", "columns": {"id": {"name": "id", "description": "Unique identifier of the ad group criterion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "base_campaign_id": {"name": "base_campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "type": {"name": "type", "description": "The type of ad group criterion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The current status of the ad group criterion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_match_type": {"name": "keyword_match_type", "description": "The match type which dictate how closely the keyword needs to match with the user's search query so that the ad can be considered for the auction.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_text": {"name": "keyword_text", "description": "The text used within the keyword criterion that is being matched against.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean representing whether the state of the record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_ad_group_criterion_history_data\"", "created_at": 1783450506.209927, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.google_ads.google_ads.ad_group_stats": {"database": "postgres", "schema": "public", "name": "ad_group_stats", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.ad_group_stats", "fqn": ["google_ads", "staging", "google_ads", "ad_group_stats"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_ad_group_stats_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of an ad group in Google Ads broken down to the ad network and device type.", "columns": {"customer_id": {"name": "customer_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "date": {"name": "date", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "id": {"name": "id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "ad_network_type": {"name": "ad_network_type", "description": "The Google Ad network type used across the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_network_type"]}, "device": {"name": "device", "description": "Account ad performance per unique device where the ads were served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.device"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "cost_micros": {"name": "cost_micros", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_ad_group_stats_data\"", "created_at": 1783450506.210592, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.google_ads.google_ads.campaign_stats": {"database": "postgres", "schema": "public", "name": "campaign_stats", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.campaign_stats", "fqn": ["google_ads", "staging", "google_ads", "campaign_stats"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_campaign_stats_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of a campaign in Google Ads broken down to the ad network and device type.", "columns": {"customer_id": {"name": "customer_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "date": {"name": "date", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "id": {"name": "id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "cost_micros": {"name": "cost_micros", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_campaign_stats_data\"", "created_at": 1783450506.211212, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.google_ads.google_ads.keyword_stats": {"database": "postgres", "schema": "public", "name": "keyword_stats", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.keyword_stats", "fqn": ["google_ads", "staging", "google_ads", "keyword_stats"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_keyword_stats_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of a keyword in Google Ads.", "columns": {"customer_id": {"name": "customer_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "date": {"name": "date", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "_fivetran_id": {"name": "_fivetran_id", "description": "The unique ID of the keyword record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "ad_group_criterion_criterion_id": {"name": "ad_group_criterion_criterion_id", "description": "Reference to the ad group criterion used for the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "cost_micros": {"name": "cost_micros", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_keyword_stats_data\"", "created_at": 1783450506.2118711, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.google_ads.google_ads.account_stats": {"database": "postgres", "schema": "public", "name": "account_stats", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.account_stats", "fqn": ["google_ads", "staging", "google_ads", "account_stats"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_account_stats_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of an account in Google Ads broken down to the ad network and device type.", "columns": {"customer_id": {"name": "customer_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "date": {"name": "date", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "ad_network_type": {"name": "ad_network_type", "description": "The Google Ad network type used across the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_network_type"]}, "device": {"name": "device", "description": "Account ad performance per unique device where the ads were served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.device"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "cost_micros": {"name": "cost_micros", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_account_stats_data\"", "created_at": 1783450506.2125206, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.google_ads.google_ads.search_term_keyword_stats": {"database": "postgres", "schema": "public", "name": "search_term_keyword_stats", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.search_term_keyword_stats", "fqn": ["google_ads", "staging", "google_ads", "search_term_keyword_stats"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_search_term_keyword_stats_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of a search term (including associated tracked keywords) in Google Ads.", "columns": {"customer_id": {"name": "customer_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "date": {"name": "date", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "_fivetran_id": {"name": "_fivetran_id", "description": "Unique ID used by Fivetran to sync and dedupe data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads._fivetran_id"]}, "resource_name": {"name": "resource_name", "description": "The resource name of the search term view. Search term view resource names have the form: `customers/{customer_id}/searchTermViews/{campaign_id}~{ad_group_id}~{URL-base64_search_term}`", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.resource_name"]}, "search_term": {"name": "search_term", "description": "A word or set of words a person enters when searching on Google or one of Google's Search Network sites", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.search_term"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "search_term_match_type": {"name": "search_term_match_type", "description": "How closely the search terms that triggered your ads on Google are related to the actual keywords in your account. Can be `BROAD` ,`EXACT`, `PHRASE`, `UNKNOWN`, or `UNSPECIFIED`.\n\nSee more details [here](https://support.google.com/google-ads/answer/7478529?sjid=15681083914881504235-NC&visit_id=638760377693438101-1187740487&rd=1).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.search_term_match_type"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "keyword_ad_group_criterion": {"name": "keyword_ad_group_criterion", "description": "The resource name of the keyword's ad group criterion. Ad group criterion resource names have the form: `customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}`", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.keyword_ad_group_criterion"]}, "status": {"name": "status", "description": "Indicates whether the search term is currently one of your targeted or excluded keywords. Possible values: `ADDED`, `ADDED_EXCLUDED`, `EXCLUDED`, `NONE`, `UNKNOWN`, or `UNSPECIFIED`", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.search_term_status"]}, "info_text": {"name": "info_text", "description": "The text of the keyword (at most 80 characters and 10 words).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.info_text"]}, "conversions_from_interactions_value_per_interaction": {"name": "conversions_from_interactions_value_per_interaction", "description": "The value of conversions from interactions divided by the number of ad interactions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_from_interactions_value_per_interaction"]}, "average_cpc": {"name": "average_cpc", "description": "Average cost-per-click. The average amount that you've been charged for a click on your ad. Average cost-per-click (avg. CPC) is calculated by dividing the total cost of your clicks by the total number of clicks. See more details [here](https://support.google.com/google-ads/answer/14074?hl=en&ref_topic=24937&sjid=15681083914881504235-NC).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.average_cpc"]}, "ctr": {"name": "ctr", "description": "The click-through rate. A ratio showing how often people who see your ad or free product listing end up clicking it. See more details [here](https://support.google.com/google-ads/answer/2615875?hl=en&ref_topic=24937&sjid=15681083914881504235-NC).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ctr"]}, "conversions_from_interactions_rate": {"name": "conversions_from_interactions_rate", "description": "Conversions from interactions divided by the number of ad interactions (such as clicks for text ads or views for video ads).\n\nSee more details [here](https://support.google.com/google-ads/answer/2684489?hl=en&ref_topic=24937&sjid=15681083914881504235-NC).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_from_interactions_rate"]}, "cost_micros": {"name": "cost_micros", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_search_term_keyword_stats_data\"", "created_at": 1783450506.2132313, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.google_ads.google_ads.campaign_bid_modifier_history": {"database": "postgres", "schema": "public", "name": "campaign_bid_modifier_history", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.campaign_bid_modifier_history", "fqn": ["google_ads", "staging", "google_ads", "campaign_bid_modifier_history"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_campaign_bid_modifier_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a historical version of a campaign bid modifier in Google Ads.", "columns": {"campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "criterion_id": {"name": "criterion_id", "description": "Unique identifier of the criterion that the bid modifier is applied to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_modifier": {"name": "bid_modifier", "description": "The modifier applied to the bid for this criterion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "interaction_type": {"name": "interaction_type", "description": "The type of interaction for the bid modifier.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "interaction_event_types": {"name": "interaction_event_types", "description": "The event types for the interaction.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean representing whether the state of the record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_campaign_bid_modifier_history_data\"", "created_at": 1783450506.2138765, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.google_ads.google_ads.campaign_budget_history": {"database": "postgres", "schema": "public", "name": "campaign_budget_history", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.campaign_budget_history", "fqn": ["google_ads", "staging", "google_ads", "campaign_budget_history"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_campaign_budget_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a historical version of a campaign budget in Google Ads.", "columns": {"id": {"name": "id", "description": "Unique identifier of the budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "amount_micros": {"name": "amount_micros", "description": "The daily budget amount in micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "delivery_method": {"name": "delivery_method", "description": "The delivery method for the budget (STANDARD or ACCELERATED).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "explicitly_shared": {"name": "explicitly_shared", "description": "Boolean indicating if the budget is explicitly shared across campaigns.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reference_count": {"name": "reference_count", "description": "The number of campaigns using this budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The status of the budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "has_recommended_budget": {"name": "has_recommended_budget", "description": "Boolean indicating if Google has a recommended budget for this campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "period": {"name": "period", "description": "The budget period (e.g., DAILY, LIFETIME).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "recommended_budget_amount_micros": {"name": "recommended_budget_amount_micros", "description": "Google's recommended daily budget amount in micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_amount_micros": {"name": "total_amount_micros", "description": "The total budget amount in micros for lifetime budgets.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "type": {"name": "type", "description": "The type of budget (DAILY, LIFETIME, etc.).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean representing whether the state of the record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_campaign_budget_history_data\"", "created_at": 1783450506.2145388, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.google_ads.google_ads.campaign_criterion_history": {"database": "postgres", "schema": "public", "name": "campaign_criterion_history", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.campaign_criterion_history", "fqn": ["google_ads", "staging", "google_ads", "campaign_criterion_history"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_campaign_criterion_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a historical version of a campaign criterion in Google Ads.", "columns": {"id": {"name": "id", "description": "Unique identifier of the campaign criterion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "geo_target_constant_id": {"name": "geo_target_constant_id", "description": "The geographic target constant ID for location targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_device_id": {"name": "mobile_device_id", "description": "The mobile device constant ID for mobile device targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "operating_system_version_id": {"name": "operating_system_version_id", "description": "The operating system version constant ID for OS targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "topic_constant_id": {"name": "topic_constant_id", "description": "The topic constant ID for topic targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "user_interest_id": {"name": "user_interest_id", "description": "The user interest constant ID for interest targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "user_list_id": {"name": "user_list_id", "description": "The user list ID for audience targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "age_range_type": {"name": "age_range_type", "description": "The age range type for demographic targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_modifier": {"name": "bid_modifier", "description": "The bid modifier applied to this criterion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "carrier_country_code": {"name": "carrier_country_code", "description": "The country code for carrier targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "carrier_name": {"name": "carrier_name", "description": "The carrier name for carrier targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "content_label_type": {"name": "content_label_type", "description": "The content label type for content exclusion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "device_type": {"name": "device_type", "description": "The device type for targeting (MOBILE, DESKTOP, TABLET).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "display_name": {"name": "display_name", "description": "The display name of the criterion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "gender_type": {"name": "gender_type", "description": "The gender type for demographic targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "income_range_type": {"name": "income_range_type", "description": "The income range type for demographic targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ip_block_ip_address": {"name": "ip_block_ip_address", "description": "The IP address for IP block targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "negative": {"name": "negative", "description": "Boolean indicating if this is a negative criterion (exclusion).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_match_type": {"name": "keyword_match_type", "description": "The match type for keyword targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_text": {"name": "keyword_text", "description": "The keyword text for keyword targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "language_code": {"name": "language_code", "description": "The language code for language targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "language_name": {"name": "language_name", "description": "The language name for language targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_app_category_constant_id": {"name": "mobile_app_category_constant_id", "description": "The mobile app category constant ID for app category targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_app_category_constant_name": {"name": "mobile_app_category_constant_name", "description": "The mobile app category name for app category targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_application_app_id": {"name": "mobile_application_app_id", "description": "The mobile application app ID for app targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_application_name": {"name": "mobile_application_name", "description": "The mobile application name for app targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "parental_status_type": {"name": "parental_status_type", "description": "The parental status type for demographic targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement_url": {"name": "placement_url", "description": "The placement URL for placement targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The status of the criterion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "type": {"name": "type", "description": "The type of criterion (e.g., KEYWORD, PLACEMENT, AUDIENCE).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "youtube_channel_id": {"name": "youtube_channel_id", "description": "The YouTube channel ID for YouTube channel targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "youtube_video_id": {"name": "youtube_video_id", "description": "The YouTube video ID for YouTube video targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean representing whether the state of the record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_campaign_criterion_history_data\"", "created_at": 1783450506.2152827, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.google_ads.google_ads.campaign_bidding_strategy_history": {"database": "postgres", "schema": "public", "name": "campaign_bidding_strategy_history", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.campaign_bidding_strategy_history", "fqn": ["google_ads", "staging", "google_ads", "campaign_bidding_strategy_history"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_campaign_bidding_strategy_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a historical version of a campaign bidding strategy in Google Ads.", "columns": {"campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "cpc_bid_ceiling_micros": {"name": "cpc_bid_ceiling_micros", "description": "The maximum cost per click bid in micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpc_bid_floor_micros": {"name": "cpc_bid_floor_micros", "description": "The minimum cost per click bid in micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "enhanced_cpc": {"name": "enhanced_cpc", "description": "Boolean indicating if enhanced CPC is enabled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "enhanced_cpc_enabled": {"name": "enhanced_cpc_enabled", "description": "Boolean indicating if enhanced CPC is enabled (alternative field).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "location": {"name": "location", "description": "The location for location-based bidding strategies.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "location_fraction_micros": {"name": "location_fraction_micros", "description": "The location fraction for location-based strategies in micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "manual_cpa": {"name": "manual_cpa", "description": "Manual cost per acquisition setting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "manual_cpm": {"name": "manual_cpm", "description": "Manual cost per mille setting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "manual_cpv": {"name": "manual_cpv", "description": "Manual cost per view setting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the bidding strategy.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The status of the bidding strategy.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "target_cpa_micros": {"name": "target_cpa_micros", "description": "Target cost per acquisition in micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "target_cpm": {"name": "target_cpm", "description": "Target cost per mille.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "target_roas": {"name": "target_roas", "description": "Target return on ad spend.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "type": {"name": "type", "description": "The type of bidding strategy (MANUAL_CPC, TARGET_CPA, etc.).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean representing whether the state of the record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_campaign_bidding_strategy_history_data\"", "created_at": 1783450506.2159898, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.amazon_ads.amazon_ads.ad_group_history": {"database": "postgres", "schema": "public", "name": "ad_group_history", "resource_type": "source", "package_name": "amazon_ads", "path": "models/staging/src_amazon_ads.yml", "original_file_path": "models/staging/src_amazon_ads.yml", "unique_id": "source.amazon_ads.amazon_ads.ad_group_history", "fqn": ["amazon_ads", "staging", "amazon_ads", "ad_group_history"], "source_name": "amazon_ads", "source_description": "", "loader": "Fivetran", "identifier": "amazon_ads_ad_group_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents an ad group in Amazon Ads.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads._fivetran_synced"]}, "id": {"name": "id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "name": {"name": "name", "description": "The name of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "creation_date": {"name": "creation_date", "description": "The date of creation of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.creation_date"]}, "default_bid": {"name": "default_bid", "description": "The date of creation of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.default_bid"]}, "last_updated_date": {"name": "last_updated_date", "description": "Date of last update to record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.last_updated_date"]}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"amazon_ads_ad_group_history_data\"", "created_at": 1783450506.2166364, "unrendered_database": "{% if target.type != 'spark'%}{{ var('amazon_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('amazon_ads_schema', 'amazon_ads') }}", "doc_blocks": []}, "source.amazon_ads.amazon_ads.ad_group_level_report": {"database": "postgres", "schema": "public", "name": "ad_group_level_report", "resource_type": "source", "package_name": "amazon_ads", "path": "models/staging/src_amazon_ads.yml", "original_file_path": "models/staging/src_amazon_ads.yml", "unique_id": "source.amazon_ads.amazon_ads.ad_group_level_report", "fqn": ["amazon_ads", "staging", "amazon_ads", "ad_group_level_report"], "source_name": "amazon_ads", "source_description": "", "loader": "Fivetran", "identifier": "amazon_ads_ad_group_level_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents the daily performance by Amazon ad group.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads._fivetran_synced"]}, "date": {"name": "date", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "campaign_bidding_strategy": {"name": "campaign_bidding_strategy", "description": "The bidding strategy associated with a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_bidding_strategy"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"amazon_ads_ad_group_level_report_data\"", "created_at": 1783450506.2172585, "unrendered_database": "{% if target.type != 'spark'%}{{ var('amazon_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('amazon_ads_schema', 'amazon_ads') }}", "doc_blocks": []}, "source.amazon_ads.amazon_ads.advertised_product_report": {"database": "postgres", "schema": "public", "name": "advertised_product_report", "resource_type": "source", "package_name": "amazon_ads", "path": "models/staging/src_amazon_ads.yml", "original_file_path": "models/staging/src_amazon_ads.yml", "unique_id": "source.amazon_ads.amazon_ads.advertised_product_report", "fqn": ["amazon_ads", "staging", "amazon_ads", "advertised_product_report"], "source_name": "amazon_ads", "source_description": "", "loader": "Fivetran", "identifier": "amazon_ads_advertised_product_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Advertised product reports contain performance data for products that are advertised as part of your campaigns.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads._fivetran_synced"]}, "date": {"name": "date", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "ad_id": {"name": "ad_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "advertised_asin": {"name": "advertised_asin", "description": "The ASIN associated to an advertised product.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.advertised_asin"]}, "advertised_sku": {"name": "advertised_sku", "description": "The SKU being advertised.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.advertised_sku"]}, "campaign_budget_amount": {"name": "campaign_budget_amount", "description": "Total budget allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_amount"]}, "campaign_budget_currency_code": {"name": "campaign_budget_currency_code", "description": "The currency code associated with the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_currency_code"]}, "campaign_budget_type": {"name": "campaign_budget_type", "description": "One of: daily or lifetime.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_type"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"amazon_ads_advertised_product_report_data\"", "created_at": 1783450506.2179258, "unrendered_database": "{% if target.type != 'spark'%}{{ var('amazon_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('amazon_ads_schema', 'amazon_ads') }}", "doc_blocks": []}, "source.amazon_ads.amazon_ads.campaign_history": {"database": "postgres", "schema": "public", "name": "campaign_history", "resource_type": "source", "package_name": "amazon_ads", "path": "models/staging/src_amazon_ads.yml", "original_file_path": "models/staging/src_amazon_ads.yml", "unique_id": "source.amazon_ads.amazon_ads.campaign_history", "fqn": ["amazon_ads", "staging", "amazon_ads", "campaign_history"], "source_name": "amazon_ads", "source_description": "", "loader": "Fivetran", "identifier": "amazon_ads_campaign_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a campaign in Amazon Ads.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads._fivetran_synced"]}, "id": {"name": "id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "name": {"name": "name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_name"]}, "creation_date": {"name": "creation_date", "description": "The date of creation of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.creation_date"]}, "last_updated_date": {"name": "last_updated_date", "description": "Date of last update to record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.last_updated_date"]}, "portfolio_id": {"name": "portfolio_id", "description": "The ID of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_id"]}, "bidding_strategy": {"name": "bidding_strategy", "description": "The bidding strategy associated with a campaign (legacyForSales, autoForSales, or manual.)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget": {"name": "budget", "description": "The budget for the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_type": {"name": "budget_type", "description": "One of: daily or lifetime.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_type"]}, "effective_budget": {"name": "effective_budget", "description": "Adjusted budget for the campaign that has been impacted by a budget rule.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_date": {"name": "end_date", "description": "The end date of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_id": {"name": "profile_id", "description": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.profile_id"]}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "start_date": {"name": "start_date", "description": "The start date of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}, "targeting_type": {"name": "targeting_type", "description": "The type of targeting used for the campaign, either manual or auto.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"amazon_ads_campaign_history_data\"", "created_at": 1783450506.2193284, "unrendered_database": "{% if target.type != 'spark'%}{{ var('amazon_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('amazon_ads_schema', 'amazon_ads') }}", "doc_blocks": []}, "source.amazon_ads.amazon_ads.campaign_level_report": {"database": "postgres", "schema": "public", "name": "campaign_level_report", "resource_type": "source", "package_name": "amazon_ads", "path": "models/staging/src_amazon_ads.yml", "original_file_path": "models/staging/src_amazon_ads.yml", "unique_id": "source.amazon_ads.amazon_ads.campaign_level_report", "fqn": ["amazon_ads", "staging", "amazon_ads", "campaign_level_report"], "source_name": "amazon_ads", "source_description": "", "loader": "Fivetran", "identifier": "amazon_ads_campaign_level_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents the daily performance by Amazon campaign.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads._fivetran_synced"]}, "date": {"name": "date", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "campaign_applicable_budget_rule_id": {"name": "campaign_applicable_budget_rule_id", "description": "The ID associated to the active budget rule for a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_applicable_budget_rule_id"]}, "campaign_applicable_budget_rule_name": {"name": "campaign_applicable_budget_rule_name", "description": "The name associated to the active budget rule for a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_applicable_budget_rule_name"]}, "campaign_bidding_strategy": {"name": "campaign_bidding_strategy", "description": "The bidding strategy associated with a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_bidding_strategy"]}, "campaign_budget_amount": {"name": "campaign_budget_amount", "description": "Total budget allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_amount"]}, "campaign_budget_currency_code": {"name": "campaign_budget_currency_code", "description": "The currency code associated with the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_currency_code"]}, "campaign_budget_type": {"name": "campaign_budget_type", "description": "One of: daily or lifetime.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_type"]}, "campaign_rule_based_budget_amount": {"name": "campaign_rule_based_budget_amount", "description": "The value of the rule-based budget for a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_rule_based_budget_amount"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"amazon_ads_campaign_level_report_data\"", "created_at": 1783450506.2200024, "unrendered_database": "{% if target.type != 'spark'%}{{ var('amazon_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('amazon_ads_schema', 'amazon_ads') }}", "doc_blocks": []}, "source.amazon_ads.amazon_ads.keyword_history": {"database": "postgres", "schema": "public", "name": "keyword_history", "resource_type": "source", "package_name": "amazon_ads", "path": "models/staging/src_amazon_ads.yml", "original_file_path": "models/staging/src_amazon_ads.yml", "unique_id": "source.amazon_ads.amazon_ads.keyword_history", "fqn": ["amazon_ads", "staging", "amazon_ads", "keyword_history"], "source_name": "amazon_ads", "source_description": "", "loader": "Fivetran", "identifier": "amazon_ads_keyword_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a keyword in Amazon Ads.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads._fivetran_synced"]}, "id": {"name": "id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_id"]}, "last_updated_date": {"name": "last_updated_date", "description": "Date of last update to record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.last_updated_date"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "bid": {"name": "bid", "description": "Bid associated with this keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.bid_keyword"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "creation_date": {"name": "creation_date", "description": "The date of creation of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.creation_date"]}, "keyword_text": {"name": "keyword_text", "description": "The exact text for the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "match_type": {"name": "match_type", "description": "One of (broad, exact, or phrase.)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_match_type"]}, "native_language_keyword": {"name": "native_language_keyword", "description": "The unlocalized keyword text in the preferred locale of the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "native_language_locale": {"name": "native_language_locale", "description": "The preferred language locale of the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"amazon_ads_keyword_history_data\"", "created_at": 1783450506.220659, "unrendered_database": "{% if target.type != 'spark'%}{{ var('amazon_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('amazon_ads_schema', 'amazon_ads') }}", "doc_blocks": []}, "source.amazon_ads.amazon_ads.portfolio_history": {"database": "postgres", "schema": "public", "name": "portfolio_history", "resource_type": "source", "package_name": "amazon_ads", "path": "models/staging/src_amazon_ads.yml", "original_file_path": "models/staging/src_amazon_ads.yml", "unique_id": "source.amazon_ads.amazon_ads.portfolio_history", "fqn": ["amazon_ads", "staging", "amazon_ads", "portfolio_history"], "source_name": "amazon_ads", "source_description": "", "loader": "Fivetran", "identifier": "amazon_ads_portfolio_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a portfolio in Amazon Ads.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads._fivetran_synced"]}, "id": {"name": "id", "description": "The ID of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_id"]}, "name": {"name": "name", "description": "The name of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_name"]}, "last_updated_date": {"name": "last_updated_date", "description": "Date of last update to record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.last_updated_date"]}, "creation_date": {"name": "creation_date", "description": "The date of creation of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.creation_date"]}, "budget_amount": {"name": "budget_amount", "description": "The budget amount associated with the portfolio. Cannot be null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_currency_code": {"name": "budget_currency_code", "description": "The currency used for all monetary values for entities under this profile. Cannot be null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_end_date": {"name": "budget_end_date", "description": "The end date after which the budget is no longer applied. Optional if policy is set to dateRange or monthlyRecurring.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_start_date": {"name": "budget_start_date", "description": "The starting date in YYYYMMDD format to which the budget is applied. Required if policy is set to dateRange. Not specified if policy is set to monthlyRecurring. Note that the starting date for monthlyRecurring is the date when the policy is set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_policy": {"name": "budget_policy", "description": "The budget policy. Set to dateRange to specify a budget for a specific period of time. Set to monthlyRecurring to specify a budget that is automatically renewed at the beginning of each month. Cannot be null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "in_budget": {"name": "in_budget", "description": "Indicates the current budget status of the portfolio. Set to true if the portfolio is in budget, set to false if the portfolio is out of budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_id": {"name": "profile_id", "description": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.profile_id"]}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"amazon_ads_portfolio_history_data\"", "created_at": 1783450506.2214215, "unrendered_database": "{% if target.type != 'spark'%}{{ var('amazon_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('amazon_ads_schema', 'amazon_ads') }}", "doc_blocks": []}, "source.amazon_ads.amazon_ads.product_ad_history": {"database": "postgres", "schema": "public", "name": "product_ad_history", "resource_type": "source", "package_name": "amazon_ads", "path": "models/staging/src_amazon_ads.yml", "original_file_path": "models/staging/src_amazon_ads.yml", "unique_id": "source.amazon_ads.amazon_ads.product_ad_history", "fqn": ["amazon_ads", "staging", "amazon_ads", "product_ad_history"], "source_name": "amazon_ads", "source_description": "", "loader": "Fivetran", "identifier": "amazon_ads_product_ad_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a product in Amazon Ads.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads._fivetran_synced"]}, "id": {"name": "id", "description": "The ID of the Ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_id"]}, "last_updated_date": {"name": "last_updated_date", "description": "Date of last update to record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.last_updated_date"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "asin": {"name": "asin", "description": "The Amazon Standard Identification Number (ASIN) associated with the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creation_date": {"name": "creation_date", "description": "The date of creation of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.creation_date"]}, "sku": {"name": "sku", "description": "The product SKU associated with the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"amazon_ads_product_ad_history_data\"", "created_at": 1783450506.2220557, "unrendered_database": "{% if target.type != 'spark'%}{{ var('amazon_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('amazon_ads_schema', 'amazon_ads') }}", "doc_blocks": []}, "source.amazon_ads.amazon_ads.profile": {"database": "postgres", "schema": "public", "name": "profile", "resource_type": "source", "package_name": "amazon_ads", "path": "models/staging/src_amazon_ads.yml", "original_file_path": "models/staging/src_amazon_ads.yml", "unique_id": "source.amazon_ads.amazon_ads.profile", "fqn": ["amazon_ads", "staging", "amazon_ads", "profile"], "source_name": "amazon_ads", "source_description": "", "loader": "Fivetran", "identifier": "amazon_ads_profile_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a profile. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean created by Fivetran to indicate whether the record has been deleted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads._fivetran_synced"]}, "id": {"name": "id", "description": "ID of the profile.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplace.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_marketplace_string_id": {"name": "account_marketplace_string_id", "description": "The identifier of the marketplace to which the account is associated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "Account Name. Not currently populated for sellers.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_sub_type": {"name": "account_sub_type", "description": "The account subtype.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_type": {"name": "account_type", "description": "One of seller, vendor, or agency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_valid_payment_method": {"name": "account_valid_payment_method", "description": "For Vendors, this returns if the Advertiser has set up a valid payment method.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country_code": {"name": "country_code", "description": "The code for a given country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency_code": {"name": "currency_code", "description": "The currency used for all monetary values for entities under this profile.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget": {"name": "daily_budget", "description": "Daily budget for Sponsored Product campaigns for seller type accounts.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone": {"name": "timezone", "description": "The time zone used for all date-based campaign management and reporting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"amazon_ads_profile_data\"", "created_at": 1783450506.2227457, "unrendered_database": "{% if target.type != 'spark'%}{{ var('amazon_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('amazon_ads_schema', 'amazon_ads') }}", "doc_blocks": []}, "source.amazon_ads.amazon_ads.targeting_keyword_report": {"database": "postgres", "schema": "public", "name": "targeting_keyword_report", "resource_type": "source", "package_name": "amazon_ads", "path": "models/staging/src_amazon_ads.yml", "original_file_path": "models/staging/src_amazon_ads.yml", "unique_id": "source.amazon_ads.amazon_ads.targeting_keyword_report", "fqn": ["amazon_ads", "staging", "amazon_ads", "targeting_keyword_report"], "source_name": "amazon_ads", "source_description": "", "loader": "Fivetran", "identifier": "amazon_ads_targeting_keyword_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Targeting reports contain performance metrics broken down by both targeting expressions and keywords.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads._fivetran_synced"]}, "date": {"name": "date", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "ad_keyword_status": {"name": "ad_keyword_status", "description": "Current status of a keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_keyword_status"]}, "campaign_budget_amount": {"name": "campaign_budget_amount", "description": "Total budget allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_amount"]}, "campaign_budget_currency_code": {"name": "campaign_budget_currency_code", "description": "The currency code associated with the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_currency_code"]}, "campaign_budget_type": {"name": "campaign_budget_type", "description": "One of: daily or lifetime.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_type"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "keyword_bid": {"name": "keyword_bid", "description": "Bid associated with a keyword or targeting expression.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_bid"]}, "keyword_id": {"name": "keyword_id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_id"]}, "keyword_type": {"name": "keyword_type", "description": "Type of matching for the keyword used in bid. One of: BROAD, PHRASE, or EXACT.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_type"]}, "match_type": {"name": "match_type", "description": "Type of matching for the keyword used in bid. One of: BROAD, PHRASE, or EXACT.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.match_type"]}, "targeting": {"name": "targeting", "description": "A string representation of the expression object used in the targeting clause.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.targeting"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"amazon_ads_targeting_keyword_report_data\"", "created_at": 1783450506.223408, "unrendered_database": "{% if target.type != 'spark'%}{{ var('amazon_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('amazon_ads_schema', 'amazon_ads') }}", "doc_blocks": []}, "source.amazon_ads.amazon_ads.search_term_ad_keyword_report": {"database": "postgres", "schema": "public", "name": "search_term_ad_keyword_report", "resource_type": "source", "package_name": "amazon_ads", "path": "models/staging/src_amazon_ads.yml", "original_file_path": "models/staging/src_amazon_ads.yml", "unique_id": "source.amazon_ads.amazon_ads.search_term_ad_keyword_report", "fqn": ["amazon_ads", "staging", "amazon_ads", "search_term_ad_keyword_report"], "source_name": "amazon_ads", "source_description": "", "loader": "Fivetran", "identifier": "amazon_ads_search_term_ad_keyword_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Search term reports contain search term performance metrics broken down by targeting expressions and keywords.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads._fivetran_synced"]}, "date": {"name": "date", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "keyword_id": {"name": "keyword_id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_id"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "campaign_budget_amount": {"name": "campaign_budget_amount", "description": "Total budget allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_amount"]}, "campaign_budget_currency_code": {"name": "campaign_budget_currency_code", "description": "The currency code associated with the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_currency_code"]}, "campaign_budget_type": {"name": "campaign_budget_type", "description": "One of: daily or lifetime.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_type"]}, "keyword_bid": {"name": "keyword_bid", "description": "Bid associated with a keyword or targeting expression.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_bid"]}, "search_term": {"name": "search_term", "description": "The search term used by the customer.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.search_term"]}, "targeting": {"name": "targeting", "description": "A string representation of the expression object used in the targeting clause.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.targeting"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"amazon_ads_search_term_ad_keyword_report_data\"", "created_at": 1783450506.224058, "unrendered_database": "{% if target.type != 'spark'%}{{ var('amazon_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('amazon_ads_schema', 'amazon_ads') }}", "doc_blocks": []}, "source.twitter_ads.twitter_ads.account_history": {"database": "postgres", "schema": "public", "name": "account_history", "resource_type": "source", "package_name": "twitter_ads", "path": "models/staging/src_twitter_ads.yml", "original_file_path": "models/staging/src_twitter_ads.yml", "unique_id": "source.twitter_ads.twitter_ads.account_history", "fqn": ["twitter_ads", "staging", "twitter_ads", "account_history"], "source_name": "twitter_ads", "source_description": "", "loader": "fivetran", "identifier": "twitter_account_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of each account. The versions can be differentiated by the updated_at timestamp.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads._fivetran_synced"]}, "approval_status": {"name": "approval_status", "description": "The approval status of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "business_id": {"name": "business_id", "description": "The ID of the related business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "business_name": {"name": "business_name", "description": "The name of the related business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.created_at"]}, "deleted": {"name": "deleted", "description": "Whether the record has been deleted or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.deleted"]}, "id": {"name": "id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "industry_type": {"name": "industry_type", "description": "The industry of the accounts.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone": {"name": "timezone", "description": "The timezone the account is set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone_switch_at": {"name": "timezone_switch_at", "description": "The timestamp the account's timezone was last changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "The timestamp the account was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.updated_at"]}, "salt": {"name": "salt", "description": "The random encryption key used to has data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"twitter_account_history_data\"", "created_at": 1783450506.2247396, "unrendered_database": "{% if target.type != 'spark'%}{{ var('twitter_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('twitter_ads_schema', 'twitter_ads') }}", "doc_blocks": []}, "source.twitter_ads.twitter_ads.campaign_history": {"database": "postgres", "schema": "public", "name": "campaign_history", "resource_type": "source", "package_name": "twitter_ads", "path": "models/staging/src_twitter_ads.yml", "original_file_path": "models/staging/src_twitter_ads.yml", "unique_id": "source.twitter_ads.twitter_ads.campaign_history", "fqn": ["twitter_ads", "staging", "twitter_ads", "campaign_history"], "source_name": "twitter_ads", "source_description": "", "loader": "fivetran", "identifier": "twitter_campaign_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of each campaign. The versions can be differentiated by the updated_at timestamp.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.created_at"]}, "currency": {"name": "currency", "description": "The currently all metrics for the account are set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_amount_local_micro": {"name": "daily_budget_amount_local_micro", "description": "The daily budget amount to be allocated to the campaign. The currency associated with the specified funding instrument will be used.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "deleted": {"name": "deleted", "description": "Whether the record has been deleted or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.deleted"]}, "duration_in_days": {"name": "duration_in_days", "description": "The time period within which the frequency_cap is achieved.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_time": {"name": "end_time", "description": "The time the campaign will end", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "entity_status": {"name": "entity_status", "description": "The status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "frequency_cap": {"name": "frequency_cap", "description": "The maximum number of times an ad could be delivered to a user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "servable": {"name": "servable", "description": "Whether the campaign is in a state to be actively served to users.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "standard_delivery": {"name": "standard_delivery", "description": "Whether standard delivery is enabled (vs accelerated delivery).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_time": {"name": "start_time", "description": "The time the campaign will start.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_budget_amount_local_micro": {"name": "total_budget_amount_local_micro", "description": "The total budget amount to be allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "The timestamp the account was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.updated_at"]}, "funding_instrument_id": {"name": "funding_instrument_id", "description": "Reference to the funding instrument.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"twitter_campaign_history_data\"", "created_at": 1783450506.2254589, "unrendered_database": "{% if target.type != 'spark'%}{{ var('twitter_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('twitter_ads_schema', 'twitter_ads') }}", "doc_blocks": []}, "source.twitter_ads.twitter_ads.line_item_history": {"database": "postgres", "schema": "public", "name": "line_item_history", "resource_type": "source", "package_name": "twitter_ads", "path": "models/staging/src_twitter_ads.yml", "original_file_path": "models/staging/src_twitter_ads.yml", "unique_id": "source.twitter_ads.twitter_ads.line_item_history", "fqn": ["twitter_ads", "staging", "twitter_ads", "line_item_history"], "source_name": "twitter_ads", "source_description": "", "loader": "fivetran", "identifier": "twitter_line_item_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of each line item. The versions can be differentiated by the updated_at timestamp.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads._fivetran_synced"]}, "advertiser_domain": {"name": "advertiser_domain", "description": "The website domain for this advertiser, without the protocol specification.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_user_id": {"name": "advertiser_user_id", "description": "The Twitter user identifier for the handle promoting the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "automatically_select_bid": {"name": "automatically_select_bid", "description": "Whether automatically optimize bidding is enabled based on daily budget and campaign flight dates.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_amount_local_micro": {"name": "bid_amount_local_micro", "description": "The bid amount to be associated with this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_type": {"name": "bid_type", "description": "The bidding mechanism.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_unit": {"name": "bid_unit", "description": "The bid unit for this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "charge_by": {"name": "charge_by", "description": "The unit to charge this line item by.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.created_at"]}, "creative_source": {"name": "creative_source", "description": "The source of the creatives for the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The currency in which metrics will be reported.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "deleted": {"name": "deleted", "description": "Whether the record has been deleted or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.deleted"]}, "end_time": {"name": "end_time", "description": "The timestamp at which the line item will stop being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "entity_status": {"name": "entity_status", "description": "The status of the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The ID of the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective": {"name": "objective", "description": "The campaign objective for this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "optimization": {"name": "optimization", "description": "The optimization setting to use with this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "primary_web_event_tag": {"name": "primary_web_event_tag", "description": "The identifier of the primary web event tag. Allows more accurate tracking of engagements for the campaign pertaining to this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "product_type": {"name": "product_type", "description": "The type of promoted product that this line item will contain.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_time": {"name": "start_time", "description": "The timestamp at which the line item will start being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "target_cpa_local_micro": {"name": "target_cpa_local_micro", "description": "The target cost per acquisition for the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_budget_amount_local_micro": {"name": "total_budget_amount_local_micro", "description": "The total budget amount to be allocated to the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "The timestamp the account was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.updated_at"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"twitter_line_item_history_data\"", "created_at": 1783450506.2261598, "unrendered_database": "{% if target.type != 'spark'%}{{ var('twitter_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('twitter_ads_schema', 'twitter_ads') }}", "doc_blocks": []}, "source.twitter_ads.twitter_ads.promoted_tweet_history": {"database": "postgres", "schema": "public", "name": "promoted_tweet_history", "resource_type": "source", "package_name": "twitter_ads", "path": "models/staging/src_twitter_ads.yml", "original_file_path": "models/staging/src_twitter_ads.yml", "unique_id": "source.twitter_ads.twitter_ads.promoted_tweet_history", "fqn": ["twitter_ads", "staging", "twitter_ads", "promoted_tweet_history"], "source_name": "twitter_ads", "source_description": "", "loader": "fivetran", "identifier": "twitter_promoted_tweet_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of each promoted tweet. The versions can be differentiated by the updated_at timestamp.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads._fivetran_synced"]}, "approval_status": {"name": "approval_status", "description": "The approval status of the promoted tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.created_at"]}, "deleted": {"name": "deleted", "description": "Whether the record has been deleted or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.deleted"]}, "entity_status": {"name": "entity_status", "description": "The status of the promoted tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The ID of the promoted tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_id": {"name": "line_item_id", "description": "The ID of the related line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tweet_id": {"name": "tweet_id", "description": "The ID of the related tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "The timestamp the account was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.updated_at"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"twitter_promoted_tweet_history_data\"", "created_at": 1783450506.2268057, "unrendered_database": "{% if target.type != 'spark'%}{{ var('twitter_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('twitter_ads_schema', 'twitter_ads') }}", "doc_blocks": []}, "source.twitter_ads.twitter_ads.tweet_url": {"database": "postgres", "schema": "public", "name": "tweet_url", "resource_type": "source", "package_name": "twitter_ads", "path": "models/staging/src_twitter_ads.yml", "original_file_path": "models/staging/src_twitter_ads.yml", "unique_id": "source.twitter_ads.twitter_ads.tweet_url", "fqn": ["twitter_ads", "staging", "twitter_ads", "tweet_url"], "source_name": "twitter_ads", "source_description": "", "loader": "fivetran", "identifier": "twitter_tweet_url_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a URL used in a tweet.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads._fivetran_synced"]}, "display_url": {"name": "display_url", "description": "The URL as it will be displayed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "expanded_url": {"name": "expanded_url", "description": "The fully expanded URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "index": {"name": "index", "description": "The index of the URL within the tweet (ie if there are multiple URLs in the tweet).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "indices": {"name": "indices", "description": "The start and end point of where the URL is placed in the tweet text.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tweet_id": {"name": "tweet_id", "description": "The ID of the related tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url": {"name": "url", "description": "The 't.co' shortened URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"twitter_tweet_url_data\"", "created_at": 1783450506.227435, "unrendered_database": "{% if target.type != 'spark'%}{{ var('twitter_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('twitter_ads_schema', 'twitter_ads') }}", "doc_blocks": []}, "source.twitter_ads.twitter_ads.promoted_tweet_report": {"database": "postgres", "schema": "public", "name": "promoted_tweet_report", "resource_type": "source", "package_name": "twitter_ads", "path": "models/staging/src_twitter_ads.yml", "original_file_path": "models/staging/src_twitter_ads.yml", "unique_id": "source.twitter_ads.twitter_ads.promoted_tweet_report", "fqn": ["twitter_ads", "staging", "twitter_ads", "promoted_tweet_report"], "source_name": "twitter_ads", "source_description": "", "loader": "fivetran", "identifier": "twitter_promoted_tweet_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the performance of a promoted tweet on a given day, in its defined placement.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "billed_charge_local_micro": {"name": "billed_charge_local_micro", "description": "The spend for the promoted tweet on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the promoted tweet on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the promoted tweet on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "promoted_tweet_id": {"name": "promoted_tweet_id", "description": "The ID of the related promoted tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The url clicks for the promoted tweet on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_assisted": {"name": "mobile_conversion_payment_info_additions_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_post_engagement": {"name": "mobile_conversion_payment_info_additions_post_engagement", "description": "Number of **post-engagement** mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_post_view": {"name": "mobile_conversion_payment_info_additions_post_view", "description": "Number of **post-view** mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_assisted": {"name": "mobile_conversion_add_to_wishlists_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_post_engagement": {"name": "mobile_conversion_add_to_wishlists_post_engagement", "description": "Number of **post-engagement** mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_post_view": {"name": "mobile_conversion_add_to_wishlists_post_view", "description": "Number of **post-view** mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_assisted": {"name": "mobile_conversion_add_to_carts_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_post_engagement": {"name": "mobile_conversion_add_to_carts_post_engagement", "description": "Number of **post-engagement** mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_post_view": {"name": "mobile_conversion_add_to_carts_post_view", "description": "Number of **post-view** mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups_metric": {"name": "conversion_sign_ups_metric", "description": "Total number of sign ups. This is the same as the sum of post views, post engagements and assisted sign ups. This is also the sum of website and mobile app sign ups", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_assisted": {"name": "mobile_conversion_checkouts_initiated_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_post_engagement": {"name": "mobile_conversion_checkouts_initiated_post_engagement", "description": "Number of **post-engagement** mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_post_view": {"name": "mobile_conversion_checkouts_initiated_post_view", "description": "Number of **post-view** mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_assisted": {"name": "mobile_conversion_searches_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_post_engagement": {"name": "mobile_conversion_searches_post_engagement", "description": "Number of **post-engagement** mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_post_view": {"name": "mobile_conversion_searches_post_view", "description": "Number of **post-view** mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_assisted": {"name": "mobile_conversion_content_views_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_post_engagement": {"name": "mobile_conversion_content_views_post_engagement", "description": "Number of **post-engagement** mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_post_view": {"name": "mobile_conversion_content_views_post_view", "description": "Number of **post-view** mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_sale_amount": {"name": "mobile_conversion_payment_info_additions_sale_amount", "description": "The sale amount corresponding to mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_sale_amount": {"name": "mobile_conversion_add_to_wishlists_sale_amount", "description": "The sale amount corresponding to mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_sale_amount": {"name": "mobile_conversion_add_to_carts_sale_amount", "description": "The sale amount corresponding to mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups_sale_amount": {"name": "conversion_sign_ups_sale_amount", "description": "The sale amount corresponding to sign ups.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_sale_amount": {"name": "mobile_conversion_checkouts_initiated_sale_amount", "description": "The sale amount corresponding to mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_sale_amount": {"name": "mobile_conversion_searches_sale_amount", "description": "The sale amount corresponding to mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_sale_amount": {"name": "mobile_conversion_content_views_sale_amount", "description": "The sale amount corresponding to mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"twitter_promoted_tweet_report_data\"", "created_at": 1783450506.2282138, "unrendered_database": "{% if target.type != 'spark'%}{{ var('twitter_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('twitter_ads_schema', 'twitter_ads') }}", "doc_blocks": []}, "source.twitter_ads.twitter_ads.tweet": {"database": "postgres", "schema": "public", "name": "tweet", "resource_type": "source", "package_name": "twitter_ads", "path": "models/staging/src_twitter_ads.yml", "original_file_path": "models/staging/src_twitter_ads.yml", "unique_id": "source.twitter_ads.twitter_ads.tweet", "fqn": ["twitter_ads", "staging", "twitter_ads", "tweet"], "source_name": "twitter_ads", "source_description": "", "loader": "fivetran", "identifier": "twitter_tweet_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a tweet, promoted or not.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "id": {"name": "id", "description": "Unique identifier of the tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "If provided, the non-public title of the tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "full_text": {"name": "full_text", "description": "Full text of the tweet's content.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lang": {"name": "lang", "description": "Two-letter language code of the tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"twitter_tweet_data\"", "created_at": 1783450506.2288463, "unrendered_database": "{% if target.type != 'spark'%}{{ var('twitter_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('twitter_ads_schema', 'twitter_ads') }}", "doc_blocks": []}, "source.twitter_ads.twitter_ads.campaign_report": {"database": "postgres", "schema": "public", "name": "campaign_report", "resource_type": "source", "package_name": "twitter_ads", "path": "models/staging/src_twitter_ads.yml", "original_file_path": "models/staging/src_twitter_ads.yml", "unique_id": "source.twitter_ads.twitter_ads.campaign_report", "fqn": ["twitter_ads", "staging", "twitter_ads", "campaign_report"], "source_name": "twitter_ads", "source_description": "", "loader": "fivetran", "identifier": "twitter_campaign_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the performance of an ad campaign on a given day.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "billed_charge_local_micro": {"name": "billed_charge_local_micro", "description": "The spend for the campaign on that day, in micros and in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the campaign on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the campaign on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the ad campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The url clicks for the campaign on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_assisted": {"name": "mobile_conversion_payment_info_additions_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_post_engagement": {"name": "mobile_conversion_payment_info_additions_post_engagement", "description": "Number of **post-engagement** mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_post_view": {"name": "mobile_conversion_payment_info_additions_post_view", "description": "Number of **post-view** mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_assisted": {"name": "mobile_conversion_add_to_wishlists_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_post_engagement": {"name": "mobile_conversion_add_to_wishlists_post_engagement", "description": "Number of **post-engagement** mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_post_view": {"name": "mobile_conversion_add_to_wishlists_post_view", "description": "Number of **post-view** mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_assisted": {"name": "mobile_conversion_add_to_carts_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_post_engagement": {"name": "mobile_conversion_add_to_carts_post_engagement", "description": "Number of **post-engagement** mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_post_view": {"name": "mobile_conversion_add_to_carts_post_view", "description": "Number of **post-view** mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups_metric": {"name": "conversion_sign_ups_metric", "description": "Total number of sign ups. This is the same as the sum of post views, post engagements and assisted sign ups. This is also the sum of website and mobile app sign ups", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_assisted": {"name": "mobile_conversion_checkouts_initiated_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_post_engagement": {"name": "mobile_conversion_checkouts_initiated_post_engagement", "description": "Number of **post-engagement** mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_post_view": {"name": "mobile_conversion_checkouts_initiated_post_view", "description": "Number of **post-view** mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_assisted": {"name": "mobile_conversion_searches_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_post_engagement": {"name": "mobile_conversion_searches_post_engagement", "description": "Number of **post-engagement** mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_post_view": {"name": "mobile_conversion_searches_post_view", "description": "Number of **post-view** mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_assisted": {"name": "mobile_conversion_content_views_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_post_engagement": {"name": "mobile_conversion_content_views_post_engagement", "description": "Number of **post-engagement** mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_post_view": {"name": "mobile_conversion_content_views_post_view", "description": "Number of **post-view** mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_sale_amount": {"name": "mobile_conversion_payment_info_additions_sale_amount", "description": "The sale amount corresponding to mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_sale_amount": {"name": "mobile_conversion_add_to_wishlists_sale_amount", "description": "The sale amount corresponding to mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_sale_amount": {"name": "mobile_conversion_add_to_carts_sale_amount", "description": "The sale amount corresponding to mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups_sale_amount": {"name": "conversion_sign_ups_sale_amount", "description": "The sale amount corresponding to sign ups.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_sale_amount": {"name": "mobile_conversion_checkouts_initiated_sale_amount", "description": "The sale amount corresponding to mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_sale_amount": {"name": "mobile_conversion_searches_sale_amount", "description": "The sale amount corresponding to mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_sale_amount": {"name": "mobile_conversion_content_views_sale_amount", "description": "The sale amount corresponding to mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"twitter_campaign_report_data\"", "created_at": 1783450506.2296257, "unrendered_database": "{% if target.type != 'spark'%}{{ var('twitter_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('twitter_ads_schema', 'twitter_ads') }}", "doc_blocks": []}, "source.twitter_ads.twitter_ads.line_item_report": {"database": "postgres", "schema": "public", "name": "line_item_report", "resource_type": "source", "package_name": "twitter_ads", "path": "models/staging/src_twitter_ads.yml", "original_file_path": "models/staging/src_twitter_ads.yml", "unique_id": "source.twitter_ads.twitter_ads.line_item_report", "fqn": ["twitter_ads", "staging", "twitter_ads", "line_item_report"], "source_name": "twitter_ads", "source_description": "", "loader": "fivetran", "identifier": "twitter_line_item_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the performance of a line item (ad group) on a given day.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "billed_charge_local_micro": {"name": "billed_charge_local_micro", "description": "The spend for the line item on that day, in micros and in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the line item on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the line item on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_id": {"name": "line_item_id", "description": "The ID of the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The url clicks for the line item on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_assisted": {"name": "mobile_conversion_payment_info_additions_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_post_engagement": {"name": "mobile_conversion_payment_info_additions_post_engagement", "description": "Number of **post-engagement** mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_post_view": {"name": "mobile_conversion_payment_info_additions_post_view", "description": "Number of **post-view** mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_assisted": {"name": "mobile_conversion_add_to_wishlists_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_post_engagement": {"name": "mobile_conversion_add_to_wishlists_post_engagement", "description": "Number of **post-engagement** mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_post_view": {"name": "mobile_conversion_add_to_wishlists_post_view", "description": "Number of **post-view** mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_assisted": {"name": "mobile_conversion_add_to_carts_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_post_engagement": {"name": "mobile_conversion_add_to_carts_post_engagement", "description": "Number of **post-engagement** mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_post_view": {"name": "mobile_conversion_add_to_carts_post_view", "description": "Number of **post-view** mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups_metric": {"name": "conversion_sign_ups_metric", "description": "Total number of sign ups. This is the same as the sum of post views, post engagements and assisted sign ups. This is also the sum of website and mobile app sign ups", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_assisted": {"name": "mobile_conversion_checkouts_initiated_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_post_engagement": {"name": "mobile_conversion_checkouts_initiated_post_engagement", "description": "Number of **post-engagement** mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_post_view": {"name": "mobile_conversion_checkouts_initiated_post_view", "description": "Number of **post-view** mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_assisted": {"name": "mobile_conversion_searches_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_post_engagement": {"name": "mobile_conversion_searches_post_engagement", "description": "Number of **post-engagement** mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_post_view": {"name": "mobile_conversion_searches_post_view", "description": "Number of **post-view** mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_assisted": {"name": "mobile_conversion_content_views_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_post_engagement": {"name": "mobile_conversion_content_views_post_engagement", "description": "Number of **post-engagement** mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_post_view": {"name": "mobile_conversion_content_views_post_view", "description": "Number of **post-view** mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_sale_amount": {"name": "mobile_conversion_payment_info_additions_sale_amount", "description": "The sale amount corresponding to mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_sale_amount": {"name": "mobile_conversion_add_to_wishlists_sale_amount", "description": "The sale amount corresponding to mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_sale_amount": {"name": "mobile_conversion_add_to_carts_sale_amount", "description": "The sale amount corresponding to mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups_sale_amount": {"name": "conversion_sign_ups_sale_amount", "description": "The sale amount corresponding to sign ups.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_sale_amount": {"name": "mobile_conversion_checkouts_initiated_sale_amount", "description": "The sale amount corresponding to mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_sale_amount": {"name": "mobile_conversion_searches_sale_amount", "description": "The sale amount corresponding to mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_sale_amount": {"name": "mobile_conversion_content_views_sale_amount", "description": "The sale amount corresponding to mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"twitter_line_item_report_data\"", "created_at": 1783450506.2304296, "unrendered_database": "{% if target.type != 'spark'%}{{ var('twitter_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('twitter_ads_schema', 'twitter_ads') }}", "doc_blocks": []}, "source.twitter_ads.twitter_ads.line_item_keywords_report": {"database": "postgres", "schema": "public", "name": "line_item_keywords_report", "resource_type": "source", "package_name": "twitter_ads", "path": "models/staging/src_twitter_ads.yml", "original_file_path": "models/staging/src_twitter_ads.yml", "unique_id": "source.twitter_ads.twitter_ads.line_item_keywords_report", "fqn": ["twitter_ads", "staging", "twitter_ads", "line_item_keywords_report"], "source_name": "twitter_ads", "source_description": "", "loader": "fivetran", "identifier": "twitter_line_item_keywords_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the performance of a line item (ad group) and keyword combination on a given day.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "billed_charge_local_micro": {"name": "billed_charge_local_micro", "description": "The spend for the line item + keyword on that day, in micros and in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the line item + keyword on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the line item + keyword on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_id": {"name": "line_item_id", "description": "The ID of the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The url clicks for the line item + keyword on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "segment": {"name": "segment", "description": "The keyword whose performance is being tracked.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_assisted": {"name": "mobile_conversion_payment_info_additions_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_post_engagement": {"name": "mobile_conversion_payment_info_additions_post_engagement", "description": "Number of **post-engagement** mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_post_view": {"name": "mobile_conversion_payment_info_additions_post_view", "description": "Number of **post-view** mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_assisted": {"name": "mobile_conversion_add_to_wishlists_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_post_engagement": {"name": "mobile_conversion_add_to_wishlists_post_engagement", "description": "Number of **post-engagement** mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_post_view": {"name": "mobile_conversion_add_to_wishlists_post_view", "description": "Number of **post-view** mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_assisted": {"name": "mobile_conversion_add_to_carts_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_post_engagement": {"name": "mobile_conversion_add_to_carts_post_engagement", "description": "Number of **post-engagement** mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_post_view": {"name": "mobile_conversion_add_to_carts_post_view", "description": "Number of **post-view** mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups_metric": {"name": "conversion_sign_ups_metric", "description": "Total number of sign ups. This is the same as the sum of post views, post engagements and assisted sign ups. This is also the sum of website and mobile app sign ups", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_assisted": {"name": "mobile_conversion_checkouts_initiated_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_post_engagement": {"name": "mobile_conversion_checkouts_initiated_post_engagement", "description": "Number of **post-engagement** mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_post_view": {"name": "mobile_conversion_checkouts_initiated_post_view", "description": "Number of **post-view** mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_assisted": {"name": "mobile_conversion_searches_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_post_engagement": {"name": "mobile_conversion_searches_post_engagement", "description": "Number of **post-engagement** mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_post_view": {"name": "mobile_conversion_searches_post_view", "description": "Number of **post-view** mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_assisted": {"name": "mobile_conversion_content_views_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_post_engagement": {"name": "mobile_conversion_content_views_post_engagement", "description": "Number of **post-engagement** mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_post_view": {"name": "mobile_conversion_content_views_post_view", "description": "Number of **post-view** mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_sale_amount": {"name": "mobile_conversion_payment_info_additions_sale_amount", "description": "The sale amount corresponding to mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_sale_amount": {"name": "mobile_conversion_add_to_wishlists_sale_amount", "description": "The sale amount corresponding to mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_sale_amount": {"name": "mobile_conversion_add_to_carts_sale_amount", "description": "The sale amount corresponding to mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups_sale_amount": {"name": "conversion_sign_ups_sale_amount", "description": "The sale amount corresponding to sign ups.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_sale_amount": {"name": "mobile_conversion_checkouts_initiated_sale_amount", "description": "The sale amount corresponding to mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_sale_amount": {"name": "mobile_conversion_searches_sale_amount", "description": "The sale amount corresponding to mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_sale_amount": {"name": "mobile_conversion_content_views_sale_amount", "description": "The sale amount corresponding to mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"twitter_line_item_keywords_report_data\"", "created_at": 1783450506.231266, "unrendered_database": "{% if target.type != 'spark'%}{{ var('twitter_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('twitter_ads_schema', 'twitter_ads') }}", "doc_blocks": []}, "source.twitter_ads.twitter_ads.campaign_locations_report": {"database": "postgres", "schema": "public", "name": "campaign_locations_report", "resource_type": "source", "package_name": "twitter_ads", "path": "models/staging/src_twitter_ads.yml", "original_file_path": "models/staging/src_twitter_ads.yml", "unique_id": "source.twitter_ads.twitter_ads.campaign_locations_report", "fqn": ["twitter_ads", "staging", "twitter_ads", "campaign_locations_report"], "source_name": "twitter_ads", "source_description": "", "loader": "fivetran", "identifier": "twitter_campaign_locations_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the performance of an ad campaign on a given day in a specific country.", "columns": {"segment_name": {"name": "segment_name", "description": "Long-form name of the country being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.country"]}, "segment": {"name": "segment", "description": "(DEPRECATED IN JUNE 2023) Long-form name of the country being reported on. Coalesced with the newer `segment_name` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "billed_charge_local_micro": {"name": "billed_charge_local_micro", "description": "The spend for the campaign on that day, in micros and in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the campaign on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the campaign on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the ad campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The url clicks for the campaign on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_assisted": {"name": "mobile_conversion_payment_info_additions_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_post_engagement": {"name": "mobile_conversion_payment_info_additions_post_engagement", "description": "Number of **post-engagement** mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_post_view": {"name": "mobile_conversion_payment_info_additions_post_view", "description": "Number of **post-view** mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_assisted": {"name": "mobile_conversion_add_to_wishlists_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_post_engagement": {"name": "mobile_conversion_add_to_wishlists_post_engagement", "description": "Number of **post-engagement** mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_post_view": {"name": "mobile_conversion_add_to_wishlists_post_view", "description": "Number of **post-view** mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_assisted": {"name": "mobile_conversion_add_to_carts_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_post_engagement": {"name": "mobile_conversion_add_to_carts_post_engagement", "description": "Number of **post-engagement** mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_post_view": {"name": "mobile_conversion_add_to_carts_post_view", "description": "Number of **post-view** mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups_metric": {"name": "conversion_sign_ups_metric", "description": "Total number of sign ups. This is the same as the sum of post views, post engagements and assisted sign ups. This is also the sum of website and mobile app sign ups", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_assisted": {"name": "mobile_conversion_checkouts_initiated_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_post_engagement": {"name": "mobile_conversion_checkouts_initiated_post_engagement", "description": "Number of **post-engagement** mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_post_view": {"name": "mobile_conversion_checkouts_initiated_post_view", "description": "Number of **post-view** mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_assisted": {"name": "mobile_conversion_searches_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_post_engagement": {"name": "mobile_conversion_searches_post_engagement", "description": "Number of **post-engagement** mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_post_view": {"name": "mobile_conversion_searches_post_view", "description": "Number of **post-view** mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_assisted": {"name": "mobile_conversion_content_views_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_post_engagement": {"name": "mobile_conversion_content_views_post_engagement", "description": "Number of **post-engagement** mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_post_view": {"name": "mobile_conversion_content_views_post_view", "description": "Number of **post-view** mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_sale_amount": {"name": "mobile_conversion_payment_info_additions_sale_amount", "description": "The sale amount corresponding to mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_sale_amount": {"name": "mobile_conversion_add_to_wishlists_sale_amount", "description": "The sale amount corresponding to mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_sale_amount": {"name": "mobile_conversion_add_to_carts_sale_amount", "description": "The sale amount corresponding to mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups_sale_amount": {"name": "conversion_sign_ups_sale_amount", "description": "The sale amount corresponding to sign ups.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_sale_amount": {"name": "mobile_conversion_checkouts_initiated_sale_amount", "description": "The sale amount corresponding to mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_sale_amount": {"name": "mobile_conversion_searches_sale_amount", "description": "The sale amount corresponding to mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_sale_amount": {"name": "mobile_conversion_content_views_sale_amount", "description": "The sale amount corresponding to mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"twitter_campaign_locations_report_data\"", "created_at": 1783450506.232079, "unrendered_database": "{% if target.type != 'spark'%}{{ var('twitter_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('twitter_ads_schema', 'twitter_ads') }}", "doc_blocks": []}, "source.twitter_ads.twitter_ads.campaign_regions_report": {"database": "postgres", "schema": "public", "name": "campaign_regions_report", "resource_type": "source", "package_name": "twitter_ads", "path": "models/staging/src_twitter_ads.yml", "original_file_path": "models/staging/src_twitter_ads.yml", "unique_id": "source.twitter_ads.twitter_ads.campaign_regions_report", "fqn": ["twitter_ads", "staging", "twitter_ads", "campaign_regions_report"], "source_name": "twitter_ads", "source_description": "", "loader": "fivetran", "identifier": "twitter_campaign_regions_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the performance of an ad campaign on a given day in a specific geographic region.", "columns": {"segment_name": {"name": "segment_name", "description": "Long-form name of the geopgraphic region being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.region"]}, "segment": {"name": "segment", "description": "(DEPRECATED IN JUNE 2023) Long-form name of the geographic region being reported on. Coalesced with the newer `segment_name` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "location_type": {"name": "location_type", "description": "Type of umbrella `LOCATION`. Likely to be `COUNTRIES`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "location_name": {"name": "location_name", "description": "Name of the umbrella `LOCATION`. Likely to be the country name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "billed_charge_local_micro": {"name": "billed_charge_local_micro", "description": "The spend for the campaign on that day, in micros and in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the campaign on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the campaign on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the ad campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The url clicks for the campaign on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_assisted": {"name": "mobile_conversion_payment_info_additions_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_post_engagement": {"name": "mobile_conversion_payment_info_additions_post_engagement", "description": "Number of **post-engagement** mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_post_view": {"name": "mobile_conversion_payment_info_additions_post_view", "description": "Number of **post-view** mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_assisted": {"name": "mobile_conversion_add_to_wishlists_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_post_engagement": {"name": "mobile_conversion_add_to_wishlists_post_engagement", "description": "Number of **post-engagement** mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_post_view": {"name": "mobile_conversion_add_to_wishlists_post_view", "description": "Number of **post-view** mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_assisted": {"name": "mobile_conversion_add_to_carts_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_post_engagement": {"name": "mobile_conversion_add_to_carts_post_engagement", "description": "Number of **post-engagement** mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_post_view": {"name": "mobile_conversion_add_to_carts_post_view", "description": "Number of **post-view** mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups_metric": {"name": "conversion_sign_ups_metric", "description": "Total number of sign ups. This is the same as the sum of post views, post engagements and assisted sign ups. This is also the sum of website and mobile app sign ups", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_assisted": {"name": "mobile_conversion_checkouts_initiated_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_post_engagement": {"name": "mobile_conversion_checkouts_initiated_post_engagement", "description": "Number of **post-engagement** mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_post_view": {"name": "mobile_conversion_checkouts_initiated_post_view", "description": "Number of **post-view** mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_assisted": {"name": "mobile_conversion_searches_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_post_engagement": {"name": "mobile_conversion_searches_post_engagement", "description": "Number of **post-engagement** mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_post_view": {"name": "mobile_conversion_searches_post_view", "description": "Number of **post-view** mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_assisted": {"name": "mobile_conversion_content_views_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_post_engagement": {"name": "mobile_conversion_content_views_post_engagement", "description": "Number of **post-engagement** mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_post_view": {"name": "mobile_conversion_content_views_post_view", "description": "Number of **post-view** mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_sale_amount": {"name": "mobile_conversion_payment_info_additions_sale_amount", "description": "The sale amount corresponding to mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_sale_amount": {"name": "mobile_conversion_add_to_wishlists_sale_amount", "description": "The sale amount corresponding to mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_sale_amount": {"name": "mobile_conversion_add_to_carts_sale_amount", "description": "The sale amount corresponding to mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups_sale_amount": {"name": "conversion_sign_ups_sale_amount", "description": "The sale amount corresponding to sign ups.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_sale_amount": {"name": "mobile_conversion_checkouts_initiated_sale_amount", "description": "The sale amount corresponding to mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_sale_amount": {"name": "mobile_conversion_searches_sale_amount", "description": "The sale amount corresponding to mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_sale_amount": {"name": "mobile_conversion_content_views_sale_amount", "description": "The sale amount corresponding to mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"twitter_campaign_regions_report_data\"", "created_at": 1783450506.2329292, "unrendered_database": "{% if target.type != 'spark'%}{{ var('twitter_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('twitter_ads_schema', 'twitter_ads') }}", "doc_blocks": []}, "source.tiktok_ads.tiktok_ads.advertiser": {"database": "postgres", "schema": "public", "name": "advertiser", "resource_type": "source", "package_name": "tiktok_ads", "path": "models/staging/src_tiktok_ads.yml", "original_file_path": "models/staging/src_tiktok_ads.yml", "unique_id": "source.tiktok_ads.tiktok_ads.advertiser", "fqn": ["tiktok_ads", "staging", "tiktok_ads", "advertiser"], "source_name": "tiktok_ads", "source_description": "", "loader": "fivetran", "identifier": "tiktok_advertiser_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents data for one advertiser.", "columns": {"id": {"name": "id", "description": "Advertiser ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "address": {"name": "address", "description": "Advertiser address information", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "balance": {"name": "balance", "description": "Account available balance", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cellphone_number": {"name": "cellphone_number", "description": "Contact mobile number, desensitised data. This is the newest version of the field `phone_number`, which was renamed after the Tiktok Ads v1.3 API release.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "company": {"name": "company", "description": "Advertiser's company name", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "contacter": {"name": "contacter", "description": "Contact Person", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country": {"name": "country", "description": "The advertiser's country", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "create_time": {"name": "create_time", "description": "Advertiser's create time", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Type of currency used by advertisers", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "description": {"name": "description", "description": "Brand description, i.e. promotional content", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "email": {"name": "email", "description": "Advertiser contact email, desensitised data", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "industry": {"name": "industry", "description": "Advertiser industry category", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "language": {"name": "language", "description": "Language used by advertisers", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "license_no": {"name": "license_no", "description": "License number", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "license_url": {"name": "license_url", "description": "License preview address, the link is valid for an hour by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Advertiser name", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "phone_number": {"name": "phone_number", "description": "Contact mobile number, desensitised data. IMPORTANT: This field will not be populated for connectors utilizing the Tiktok Ads v1.3 API version, as the column was renamed. The new column name is `cellphone_number`.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "promotion_area": {"name": "promotion_area", "description": "Operation area", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reason": {"name": "reason", "description": "Reason for rejection", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "role": {"name": "role", "description": "Advertiser role", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Advertiser status", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "telephone": {"name": "telephone", "description": "Fixed phone number, desensitised data IMPORTANT: This field will not be populated for connectors utilizing the Tiktok Ads v1.3 API version, as the column was renamed. The new column name is `telephone_number`.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "telephone_number": {"name": "telephone_number", "description": "Fixed phone number, desensitised data This is the newest version of the field `telephone`, which was renamed after the Tiktok Ads v1.3 API release.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone": {"name": "timezone", "description": "Ad account time zone including GMT offset", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"tiktok_advertiser_data\"", "created_at": 1783450506.2336683, "unrendered_database": "{% if target.type != 'spark' %}{{var('tiktok_ads_database', target.database)}}{% endif %}", "unrendered_schema": "{{var('tiktok_ads_schema', 'tiktok_ads')}}", "doc_blocks": []}, "source.tiktok_ads.tiktok_ads.campaign_history": {"database": "postgres", "schema": "public", "name": "campaign_history", "resource_type": "source", "package_name": "tiktok_ads", "path": "models/staging/src_tiktok_ads.yml", "original_file_path": "models/staging/src_tiktok_ads.yml", "unique_id": "source.tiktok_ads.tiktok_ads.campaign_history", "fqn": ["tiktok_ads", "staging", "tiktok_ads", "campaign_history"], "source_name": "tiktok_ads", "source_description": "", "loader": "fivetran", "identifier": "tiktok_campaign_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of a TikTok campaign.", "columns": {"campaign_id": {"name": "campaign_id", "description": "Campaign ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Time the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "Advertiser ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget": {"name": "budget", "description": "Campaign budget", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_mode": {"name": "budget_mode", "description": "Budget type", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_type": {"name": "campaign_type", "description": "Campaign Type, indicates the campaign is a regular campaign or iOS 14 campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "create_time": {"name": "create_time", "description": "Time at which the campaign was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_new_structure": {"name": "is_new_structure", "description": "Whether the campaign is a new structure (for the same campaign, the structure of campaign, adgroups and ads are the same)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective_type": {"name": "objective_type", "description": "Advertising objective.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "opt_status": {"name": "opt_status", "description": "Operation status.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Campaign status", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "split_test_variable": {"name": "split_test_variable", "description": "Split Test variables. Optional values; TARGETING, BIDDING_OPTIMIZATION , CREATIVE.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"tiktok_campaign_history_data\"", "created_at": 1783450506.234316, "unrendered_database": "{% if target.type != 'spark' %}{{var('tiktok_ads_database', target.database)}}{% endif %}", "unrendered_schema": "{{var('tiktok_ads_schema', 'tiktok_ads')}}", "doc_blocks": []}, "source.tiktok_ads.tiktok_ads.adgroup_history": {"database": "postgres", "schema": "public", "name": "adgroup_history", "resource_type": "source", "package_name": "tiktok_ads", "path": "models/staging/src_tiktok_ads.yml", "original_file_path": "models/staging/src_tiktok_ads.yml", "unique_id": "source.tiktok_ads.tiktok_ads.adgroup_history", "fqn": ["tiktok_ads", "staging", "tiktok_ads", "adgroup_history"], "source_name": "tiktok_ads", "source_description": "", "loader": "fivetran", "identifier": "tiktok_adgroup_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of a TikTok ad group.", "columns": {"adgroup_id": {"name": "adgroup_id", "description": "Ad group ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Time the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "Advertiser ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The Ad group's campaign ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "action_categories": {"name": "action_categories", "description": "IDs of the action categories (behaviors) that you want to target.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "action_days": {"name": "action_days", "description": "The number of days of the time period to include action from.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "adgroup_name": {"name": "adgroup_name", "description": "Ad group name. Character limit is 512 and cannot contain emoji.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "age_groups": {"name": "age_groups", "description": "Age groups you want to target. This is the newest version of the field `age`, which was renamed after the Tiktok Ads v1.3 API release.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "android_osv": {"name": "android_osv", "description": "Minimum Android version.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "app_download_url": {"name": "app_download_url", "description": "App download link", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "app_id": {"name": "app_id", "description": "The Application id of the promoted app", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "app_name": {"name": "app_name", "description": "App name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "app_type": {"name": "app_type", "description": "App type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "audience": {"name": "audience", "description": "A list of audience IDs.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "audience_type": {"name": "audience_type", "description": "Audience Type", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid": {"name": "bid", "description": "CPC, CPM bidding, oCPM learning bidding", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_type": {"name": "bid_type", "description": "Bidding Strategy", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "billing_event": {"name": "billing_event", "description": "Bid method.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget": {"name": "budget", "description": "Ad budget. Returns 0.0 when Campaign Budget Optimization (budget_optimize_switch) is on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_mode": {"name": "budget_mode", "description": "Budget mode. This field will be ignored when Campaign Budget Optimization (budget_optimize_switch) is enabled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "carriers": {"name": "carriers", "description": "Carriers that you want to target.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "category": {"name": "category", "description": "Ad group category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_tracking_url": {"name": "click_tracking_url", "description": "Click monitoring URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "connection_type": {"name": "connection_type", "description": "Device connection types that you want to target. Default; unlimited.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_bid": {"name": "conversion_bid", "description": "oCPM conversion bid", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpv_video_duration": {"name": "cpv_video_duration", "description": "Video playback duration, required if optimize_goal is VIDEO_VIEW. Allowed values; SIX_SECONDS (video playback 6s), TWO_SECONDS (video playback 2s)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_material_mode": {"name": "creative_material_mode", "description": "Creative delivery mode.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "dayparting": {"name": "dayparting", "description": "Ad delivery period, the default is always and the format is 48 * 7 character string, represented by 0 or 1. > That is, with half an hour as the minimum granularity, a day (24 hours) is divided by the minimum granularity(30 mins) from Monday to Sunday. Resulting in a 48*7 format.0 represents not to be delivered, 1 represents delivery. no transmission, full transmission 0, full transmission 1 all represent full time delivery", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "deep_bid_type": {"name": "deep_bid_type", "description": "Bidding strategy for in-app events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "deep_cpabid": {"name": "deep_cpabid", "description": "Deep bid", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "deep_external_action": {"name": "deep_external_action", "description": "Deep conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "display_name": {"name": "display_name", "description": "Display name of ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "enable_inventory_filter": {"name": "enable_inventory_filter", "description": "Inventory filtering (Unsafe videos will not be displayed).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "excluded_audience": {"name": "excluded_audience", "description": "A list of audience ID to be excluded.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_action": {"name": "external_action", "description": "Conversion event for the ad group. It is required when the promoted object is an app with tracking urls, or when pixel_id is specified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "fallback_type": {"name": "fallback_type", "description": "Fallback Type. If the audience do not have the app installed, you can have them fall back to install the app, or to view a specific web page. Not applicable for Deferred Deeplink. Allowed values; APP_INSTALL, WEBSITE, UNSET. If website is chosen, you need to specify the url via landing_page_url field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "frequency": {"name": "frequency", "description": "frequency, together with frequency_schedule, controls how often people see your ad (only available for REACH ads). For example, frequency = 2 frequency_schedule = 3 means \"show ads no more than twice every 3 day\".\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "frequency_schedule": {"name": "frequency_schedule", "description": "frequency, together with frequency, controls how often people see your ad (only available for REACH ads).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "gender": {"name": "gender", "description": "Gender that you want to target.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impression_tracking_url": {"name": "impression_tracking_url", "description": "Display monitoring URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "interest_category_v2": {"name": "interest_category_v2", "description": "Interest classification. If the interest is specified, users that do not meet interest target will be excluded during delivery.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ios_osv": {"name": "ios_osv", "description": "Minimum iOS version.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_comment_disable": {"name": "is_comment_disable", "description": "Whether to allow comments on your ads on TikTok, Vigo, Helo.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_hfss": {"name": "is_hfss", "description": "Whether the promoted content is HFSS foods (foods that are high in fat, salt, or sugar).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_new_structure": {"name": "is_new_structure", "description": "Whether the campaign is a new structure.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keywords": {"name": "keywords", "description": "Keywords used.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "landing_page_url": {"name": "landing_page_url", "description": "Landing page URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "languages": {"name": "languages", "description": "Codes of the languages that you want to target.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "location": {"name": "location", "description": "IDs of the locations that you want to target.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "open_url": {"name": "open_url", "description": "The specific location where you want your audience to go if they have your app installed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "open_url_type": {"name": "open_url_type", "description": "The open URL type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "operation_system": {"name": "operation_system", "description": "Device operating systems that you want to target.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "opt_status": {"name": "opt_status", "description": "Operation status.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "optimize_goal": {"name": "optimize_goal", "description": "Optimization goal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pacing": {"name": "pacing", "description": "You can choose between PACING_MODE_SMOOTH and PACING_MODE_FAST. For PACING_MODE_SMOOTH, the budget is allocated evenly within the scheduled time. PACING_MODE_FAST would consume budget and produce results as soon as possible. \n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "package": {"name": "package", "description": "Package name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pangle_block_app_list_id": {"name": "pangle_block_app_list_id", "description": "Pangle app block list ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pixel_id": {"name": "pixel_id", "description": "Pixel ID. Only application for landing pages.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "The apps where you want to deliver your ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement_type": {"name": "placement_type", "description": "Placement type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_image": {"name": "profile_image", "description": "Avatar URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "schedule_end_time": {"name": "schedule_end_time", "description": "Ad delivery end time (UTC+0). Format should be YYYY-MM-DD HH:MM:SS", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "schedule_start_time": {"name": "schedule_start_time", "description": "Ad delivery start time (UTC+0). Format should be YYYY-MM-DD HH:MM:SS", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "schedule_type": {"name": "schedule_type", "description": "The schedule type, which can be either SCHEDULE_START_END or SCHEDULE_FROM_NOW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "skip_learning_phase": {"name": "skip_learning_phase", "description": "Whether to skip the learning stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "statistic_type": {"name": "statistic_type", "description": "conversion bid statistic type", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Ad group status", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_actions": {"name": "video_actions", "description": "Number of video actions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_download": {"name": "video_download", "description": "Whether users can download your video ads on TikTok(cannot be updated once created).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"tiktok_adgroup_history_data\"", "created_at": 1783450506.235275, "unrendered_database": "{% if target.type != 'spark' %}{{var('tiktok_ads_database', target.database)}}{% endif %}", "unrendered_schema": "{{var('tiktok_ads_schema', 'tiktok_ads')}}", "doc_blocks": []}, "source.tiktok_ads.tiktok_ads.ad_history": {"database": "postgres", "schema": "public", "name": "ad_history", "resource_type": "source", "package_name": "tiktok_ads", "path": "models/staging/src_tiktok_ads.yml", "original_file_path": "models/staging/src_tiktok_ads.yml", "unique_id": "source.tiktok_ads.tiktok_ads.ad_history", "fqn": ["tiktok_ads", "staging", "tiktok_ads", "ad_history"], "source_name": "tiktok_ads", "source_description": "", "loader": "fivetran", "identifier": "tiktok_ad_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of a TikTok ad.", "columns": {"ad_id": {"name": "ad_id", "description": "Ad ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Time the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "adgroup_id": {"name": "adgroup_id", "description": "Ad group ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "Advertiser ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_name": {"name": "ad_name", "description": "Ad Name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_text": {"name": "ad_text", "description": "The ad text.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "app_name": {"name": "app_name", "description": "The display name of app download ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "call_to_action": {"name": "call_to_action", "description": "Call to action values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_tracking_url": {"name": "click_tracking_url", "description": "Click monitoring URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "create_time": {"name": "create_time", "description": "Time at which the ad was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "display_name": {"name": "display_name", "description": "The display name of landing page or pure exposure ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "image_ids": {"name": "image_ids", "description": "A list of image IDs.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impression_tracking_url": {"name": "impression_tracking_url", "description": "Display monitoring URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_aco": {"name": "is_aco", "description": "Whether the ad is an automated ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_creative_authorized": {"name": "is_creative_authorized", "description": "Whether you grant displaying some of your ads in our TikTok For Business Creative Center. Only valid for non-US advertisers, the default value is false.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_new_structure": {"name": "is_new_structure", "description": "Whether the campaign is a new structure.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "landing_page_url": {"name": "landing_page_url", "description": "Landing page URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "open_url": {"name": "open_url", "description": "The specific location where you want your audience to go if they have your app installed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "opt_status": {"name": "opt_status", "description": "Operation status.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "playable_url": {"name": "playable_url", "description": "Playable material url.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_image": {"name": "profile_image", "description": "Avatar URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Ad status.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_id": {"name": "video_id", "description": "The video ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"tiktok_ad_history_data\"", "created_at": 1783450506.2360284, "unrendered_database": "{% if target.type != 'spark' %}{{var('tiktok_ads_database', target.database)}}{% endif %}", "unrendered_schema": "{{var('tiktok_ads_schema', 'tiktok_ads')}}", "doc_blocks": []}, "source.tiktok_ads.tiktok_ads.ad_report_hourly": {"database": "postgres", "schema": "public", "name": "ad_report_hourly", "resource_type": "source", "package_name": "tiktok_ads", "path": "models/staging/src_tiktok_ads.yml", "original_file_path": "models/staging/src_tiktok_ads.yml", "unique_id": "source.tiktok_ads.tiktok_ads.ad_report_hourly", "fqn": ["tiktok_ads", "staging", "tiktok_ads", "ad_report_hourly"], "source_name": "tiktok_ads", "source_description": "", "loader": "fivetran", "identifier": "tiktok_ad_report_hourly_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents data for each ad for each hour.", "columns": {"ad_id": {"name": "ad_id", "description": "Ad id", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "stat_time_hour": {"name": "stat_time_hour", "description": "Hour of activity", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_conversion": {"name": "cost_per_conversion", "description": "The average amount of money you've spent on a conversion. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion": {"name": "real_time_conversion", "description": "The number of times your ad achieved an outcome, based on the objective and settings you selected. (The total count is based on when the conversion actually happened.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpc": {"name": "cpc", "description": "The average amount of money you've spent on a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_play_actions": {"name": "video_play_actions", "description": "The number of times your video starts to play. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_rate": {"name": "conversion_rate", "description": "The percentage of results you received out of all the clicks of your ads. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_75": {"name": "video_views_p_75", "description": "The number of times your video was played at 75% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "result": {"name": "result", "description": "The number of times your ad achieved an outcome, based on the optimization goal you selected. As one campaign may have a number of different optimization goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view the results. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_50": {"name": "video_views_p_50", "description": "The number of times your video was played at 50% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of times your ads were on screen.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "comments": {"name": "comments", "description": "The number of comments your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_cost_per_result": {"name": "real_time_cost_per_result", "description": "As a campaign may have different optimization goals, the total number of result is not supported in campaign section now, please go to the ad group section to view the cost per Result. (The total count is based on when the conversion actually happened.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion": {"name": "conversion", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_result": {"name": "real_time_result", "description": "The number of times your ad achieved an outcome, based on the optimization goal you selected. As a campaign may have different optimization goals, the total number of result is not supported in campaign section now , Please go to the ad group section to view the result. (The total count is based on when the conversion actually happened.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_view_p_100": {"name": "video_view_p_100", "description": "The number of times your video was played at 100% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "The number of shares your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion_rate": {"name": "real_time_conversion_rate", "description": "The percentage of results you received out of all the clicks of your ads. (The total count is based on when the conversion actually happened.)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_secondary_goal_result": {"name": "cost_per_secondary_goal_result", "description": "The average cost for each secondary goal result from your adverts. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "secondary_goal_result_rate": {"name": "secondary_goal_result_rate", "description": "The percentage of secondary goal results you achieved out of all of the installs of your adverts. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. The total count is calculated based on the time each ad impression occurred.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks on your ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_1000_reached": {"name": "cost_per_1000_reached", "description": "The average cost to reach 1,000 unique users. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_25": {"name": "video_views_p_25", "description": "The number of times your video was played at 25% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reach": {"name": "reach", "description": "The number of unique users who saw your ads at least once. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_cost_per_conversion": {"name": "real_time_cost_per_conversion", "description": "The average amount of money you've spent on a conversion. (The total count is based on when the conversion actually happened.)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_visits_rate": {"name": "profile_visits_rate", "description": "The rate of profile visits per impression the paid ad drove during the campaign. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "average_video_play": {"name": "average_video_play", "description": "The average time your video was played per single video view, including any time spent replaying the video.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_visits": {"name": "profile_visits", "description": "The number of profile visits the ad drove during the campaign. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpm": {"name": "cpm", "description": "The average amount of money you've spent per 1,000 impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ctr": {"name": "ctr", "description": "The percentage of times people saw your ad and performed a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_2_s": {"name": "video_watched_2_s", "description": "The number of times your video played for at least 2 seconds. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "follows": {"name": "follows", "description": "The number of new followers that were gained within 1 day of a user seeing a paid ad. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "result_rate": {"name": "result_rate", "description": "The percentage of results you achieved out of all of the views/clicks on your ads. As one campaign may have a number of different optimization goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view the result rate. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_6_s": {"name": "video_watched_6_s", "description": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "secondary_goal_result": {"name": "secondary_goal_result", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_result": {"name": "cost_per_result", "description": "The average cost for each result from your ads. As one campaign may have a number of different optimization goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view the cost per result. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "average_video_play_per_user": {"name": "average_video_play_per_user", "description": "The average time your video was played per person, including any time spent replaying the video. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_result_rate": {"name": "real_time_result_rate", "description": "As a campaign may have different optimization goals, the total number of result is not supported in campaign section now ,Please go to the ad group section to view the Result Rate. (The total count is based on when the conversion actually happened.)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The estimated total amount of money you've spent on your campaign, ad group or ad during its schedule.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "likes": {"name": "likes", "description": "The number of likes your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_purchase_value": {"name": "total_purchase_value", "description": "The total value of purchase events that occurred in your app that were recorded by your measurement partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_sales_lead_value": {"name": "total_sales_lead_value", "description": "The monetary worth or potential value assigned to a lead generated through ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"tiktok_ad_report_hourly_data\"", "created_at": 1783450506.236827, "unrendered_database": "{% if target.type != 'spark' %}{{var('tiktok_ads_database', target.database)}}{% endif %}", "unrendered_schema": "{{var('tiktok_ads_schema', 'tiktok_ads')}}", "doc_blocks": []}, "source.tiktok_ads.tiktok_ads.campaign_report_hourly": {"database": "postgres", "schema": "public", "name": "campaign_report_hourly", "resource_type": "source", "package_name": "tiktok_ads", "path": "models/staging/src_tiktok_ads.yml", "original_file_path": "models/staging/src_tiktok_ads.yml", "unique_id": "source.tiktok_ads.tiktok_ads.campaign_report_hourly", "fqn": ["tiktok_ads", "staging", "tiktok_ads", "campaign_report_hourly"], "source_name": "tiktok_ads", "source_description": "", "loader": "fivetran", "identifier": "tiktok_campaign_report_hourly_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents data for each campaign for each hour.", "columns": {"campaign_id": {"name": "campaign_id", "description": "Campaign id", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "stat_time_hour": {"name": "stat_time_hour", "description": "Hour of activity", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_conversion": {"name": "cost_per_conversion", "description": "The average amount of money you've spent on a conversion. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion": {"name": "real_time_conversion", "description": "The number of times your ad achieved an outcome, based on the objective and settings you selected. (The total count is based on when the conversion actually happened.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpc": {"name": "cpc", "description": "The average amount of money you've spent on a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_play_actions": {"name": "video_play_actions", "description": "The number of times your video starts to play. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_rate": {"name": "conversion_rate", "description": "The percentage of results you received out of all the clicks of your ads. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_75": {"name": "video_views_p_75", "description": "The number of times your video was played at 75% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "result": {"name": "result", "description": "The number of times your ad achieved an outcome, based on the optimization goal you selected. As one campaign may have a number of different optimization goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view the results. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_50": {"name": "video_views_p_50", "description": "The number of times your video was played at 50% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of times your ads were on screen.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "comments": {"name": "comments", "description": "The number of comments your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_cost_per_result": {"name": "real_time_cost_per_result", "description": "As a campaign may have different optimization goals, the total number of result is not supported in campaign section now, please go to the ad group section to view the cost per Result. (The total count is based on when the conversion actually happened.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion": {"name": "conversion", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_result": {"name": "real_time_result", "description": "The number of times your ad achieved an outcome, based on the optimization goal you selected. As a campaign may have different optimization goals, the total number of result is not supported in campaign section now , Please go to the ad group section to view the result. (The total count is based on when the conversion actually happened.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_view_p_100": {"name": "video_view_p_100", "description": "The number of times your video was played at 100% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "The number of shares your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion_rate": {"name": "real_time_conversion_rate", "description": "The percentage of results you received out of all the clicks of your ads. (The total count is based on when the conversion actually happened.)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_secondary_goal_result": {"name": "cost_per_secondary_goal_result", "description": "The average cost for each secondary goal result from your adverts. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "secondary_goal_result_rate": {"name": "secondary_goal_result_rate", "description": "The percentage of secondary goal results you achieved out of all of the installs of your adverts. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. The total count is calculated based on the time each ad impression occurred.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks on your ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_1000_reached": {"name": "cost_per_1000_reached", "description": "The average cost to reach 1,000 unique users. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_25": {"name": "video_views_p_25", "description": "The number of times your video was played at 25% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reach": {"name": "reach", "description": "The number of unique users who saw your ads at least once. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_cost_per_conversion": {"name": "real_time_cost_per_conversion", "description": "The average amount of money you've spent on a conversion. (The total count is based on when the conversion actually happened.)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_visits_rate": {"name": "profile_visits_rate", "description": "The rate of profile visits per impression the paid ad drove during the campaign. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "average_video_play": {"name": "average_video_play", "description": "The average time your video was played per single video view, including any time spent replaying the video.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_visits": {"name": "profile_visits", "description": "The number of profile visits the ad drove during the campaign. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpm": {"name": "cpm", "description": "The average amount of money you've spent per 1,000 impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ctr": {"name": "ctr", "description": "The percentage of times people saw your ad and performed a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_2_s": {"name": "video_watched_2_s", "description": "The number of times your video played for at least 2 seconds. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "follows": {"name": "follows", "description": "The number of new followers that were gained within 1 day of a user seeing a paid ad. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "result_rate": {"name": "result_rate", "description": "The percentage of results you achieved out of all of the views/clicks on your ads. As one campaign may have a number of different optimization goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view the result rate. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_6_s": {"name": "video_watched_6_s", "description": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "secondary_goal_result": {"name": "secondary_goal_result", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_result": {"name": "cost_per_result", "description": "The average cost for each result from your ads. As one campaign may have a number of different optimization goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view the cost per result. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "average_video_play_per_user": {"name": "average_video_play_per_user", "description": "The average time your video was played per person, including any time spent replaying the video. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_result_rate": {"name": "real_time_result_rate", "description": "As a campaign may have different optimization goals, the total number of result is not supported in campaign section now ,Please go to the ad group section to view the Result Rate. (The total count is based on when the conversion actually happened.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The estimated total amount of money you've spent on your campaign, ad group or ad during its schedule.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "likes": {"name": "likes", "description": "The number of likes your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_purchase_value": {"name": "total_purchase_value", "description": "The total value of purchase events that occurred in your app that were recorded by your measurement partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_sales_lead_value": {"name": "total_sales_lead_value", "description": "The monetary worth or potential value assigned to a lead generated through ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"tiktok_campaign_report_hourly_data\"", "created_at": 1783450506.2376666, "unrendered_database": "{% if target.type != 'spark' %}{{var('tiktok_ads_database', target.database)}}{% endif %}", "unrendered_schema": "{{var('tiktok_ads_schema', 'tiktok_ads')}}", "doc_blocks": []}, "source.tiktok_ads.tiktok_ads.adgroup_report_hourly": {"database": "postgres", "schema": "public", "name": "adgroup_report_hourly", "resource_type": "source", "package_name": "tiktok_ads", "path": "models/staging/src_tiktok_ads.yml", "original_file_path": "models/staging/src_tiktok_ads.yml", "unique_id": "source.tiktok_ads.tiktok_ads.adgroup_report_hourly", "fqn": ["tiktok_ads", "staging", "tiktok_ads", "adgroup_report_hourly"], "source_name": "tiktok_ads", "source_description": "", "loader": "fivetran", "identifier": "tiktok_adgroup_report_hourly_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents data for each ad group for each hour.", "columns": {"adgroup_id": {"name": "adgroup_id", "description": "Ad group id", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "stat_time_hour": {"name": "stat_time_hour", "description": "Hour of activity", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_conversion": {"name": "cost_per_conversion", "description": "The average amount of money you've spent on a conversion. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion": {"name": "real_time_conversion", "description": "The number of times your ad achieved an outcome, based on the objective and settings you selected. (The total count is based on when the conversion actually happened.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpc": {"name": "cpc", "description": "The average amount of money you've spent on a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_play_actions": {"name": "video_play_actions", "description": "The number of times your video starts to play. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_rate": {"name": "conversion_rate", "description": "The percentage of results you received out of all the clicks of your ads. (The total count is calculated based on the time each ad impression occurred.)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_75": {"name": "video_views_p_75", "description": "The number of times your video was played at 75% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "result": {"name": "result", "description": "The number of times your ad achieved an outcome, based on the optimization goal you selected. As one campaign may have a number of different optimization goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view the results. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_50": {"name": "video_views_p_50", "description": "The number of times your video was played at 50% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of times your ads were on screen.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "comments": {"name": "comments", "description": "The number of comments your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_cost_per_result": {"name": "real_time_cost_per_result", "description": "As a campaign may have different optimization goals, the total number of result is not supported in campaign section now, please go to the ad group section to view the cost per Result. (The total count is based on when the conversion actually happened.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion": {"name": "conversion", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_result": {"name": "real_time_result", "description": "The number of times your ad achieved an outcome, based on the optimization goal you selected. As a campaign may have different optimization goals, the total number of result is not supported in campaign section now , Please go to the ad group section to view the result. (The total count is based on when the conversion actually happened.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_view_p_100": {"name": "video_view_p_100", "description": "The number of times your video was played at 100% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "The number of shares your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion_rate": {"name": "real_time_conversion_rate", "description": "The percentage of results you received out of all the clicks of your ads. (The total count is based on when the conversion actually happened.)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_secondary_goal_result": {"name": "cost_per_secondary_goal_result", "description": "The average cost for each secondary goal result from your adverts. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "secondary_goal_result_rate": {"name": "secondary_goal_result_rate", "description": "The percentage of secondary goal results you achieved out of all of the installs of your adverts. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. The total count is calculated based on the time each ad impression occurred.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks on your ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_1000_reached": {"name": "cost_per_1000_reached", "description": "The average cost to reach 1,000 unique users. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_25": {"name": "video_views_p_25", "description": "The number of times your video was played at 25% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reach": {"name": "reach", "description": "The number of unique users who saw your ads at least once. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_cost_per_conversion": {"name": "real_time_cost_per_conversion", "description": "The average amount of money you've spent on a conversion. (The total count is based on when the conversion actually happened.)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_visits_rate": {"name": "profile_visits_rate", "description": "The rate of profile visits per impression the paid ad drove during the campaign. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "average_video_play": {"name": "average_video_play", "description": "The average time your video was played per single video view, including any time spent replaying the video.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_visits": {"name": "profile_visits", "description": "The number of profile visits the ad drove during the campaign. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpm": {"name": "cpm", "description": "The average amount of money you've spent per 1,000 impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ctr": {"name": "ctr", "description": "The percentage of times people saw your ad and performed a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_2_s": {"name": "video_watched_2_s", "description": "The number of times your video played for at least 2 seconds. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "follows": {"name": "follows", "description": "The number of new followers that were gained within 1 day of a user seeing a paid ad. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "result_rate": {"name": "result_rate", "description": "The percentage of results you achieved out of all of the views/clicks on your ads. As one campaign may have a number of different optimization goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view the result rate. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_6_s": {"name": "video_watched_6_s", "description": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "secondary_goal_result": {"name": "secondary_goal_result", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_result": {"name": "cost_per_result", "description": "The average cost for each result from your ads. As one campaign may have a number of different optimization goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view the cost per result. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "average_video_play_per_user": {"name": "average_video_play_per_user", "description": "The average time your video was played per person, including any time spent replaying the video. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_result_rate": {"name": "real_time_result_rate", "description": "As a campaign may have different optimization goals, the total number of result is not supported in campaign section now ,Please go to the ad group section to view the Result Rate. (The total count is based on when the conversion actually happened.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The estimated total amount of money you've spent on your campaign, ad group or ad during its schedule.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "likes": {"name": "likes", "description": "The number of likes your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_purchase_value": {"name": "total_purchase_value", "description": "The total value of purchase events that occurred in your app that were recorded by your measurement partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_sales_lead_value": {"name": "total_sales_lead_value", "description": "The monetary worth or potential value assigned to a lead generated through ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"tiktok_adgroup_report_hourly_data\"", "created_at": 1783450506.2384684, "unrendered_database": "{% if target.type != 'spark' %}{{var('tiktok_ads_database', target.database)}}{% endif %}", "unrendered_schema": "{{var('tiktok_ads_schema', 'tiktok_ads')}}", "doc_blocks": []}, "source.tiktok_ads.tiktok_ads.campaign_country_report": {"database": "postgres", "schema": "public", "name": "campaign_country_report", "resource_type": "source", "package_name": "tiktok_ads", "path": "models/staging/src_tiktok_ads.yml", "original_file_path": "models/staging/src_tiktok_ads.yml", "unique_id": "source.tiktok_ads.tiktok_ads.campaign_country_report", "fqn": ["tiktok_ads", "staging", "tiktok_ads", "campaign_country_report"], "source_name": "tiktok_ads", "source_description": "", "loader": "fivetran", "identifier": "tiktok_campaign_country_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record provides country-level reporting metrics at the campaign level.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp indicating when the record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Unique identifier of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "Total number of times users clicked on ads within the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion": {"name": "conversion", "description": "Number of attributed conversions from ads in the campaign based on the TikTok attribution model.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_rate": {"name": "conversion_rate", "description": "Ratio of conversions to impressions, calculated as conversions divided by impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_conversion": {"name": "cost_per_conversion", "description": "Average cost per conversion, calculated as total spend divided by conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country_code": {"name": "country_code", "description": "Audience country or region code.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpc": {"name": "cpc", "description": "Cost per click, calculated as spend divided by the number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpm": {"name": "cpm", "description": "Cost per thousand impressions, calculated as (spend / impressions) * 1000.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ctr": {"name": "ctr", "description": "Click-through rate, calculated as clicks divided by impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "Total number of times ads in the campaign were shown.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion": {"name": "real_time_conversion", "description": "Number of real-time conversions tracked by TikTok.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "Total amount spent for the campaign in the account currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "stat_time_day": {"name": "stat_time_day", "description": "The reporting date for the campaign data (in YYYY-MM-DD format).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"tiktok_campaign_country_report_data\"", "created_at": 1783450506.2391543, "unrendered_database": "{% if target.type != 'spark' %}{{var('tiktok_ads_database', target.database)}}{% endif %}", "unrendered_schema": "{{var('tiktok_ads_schema', 'tiktok_ads')}}", "doc_blocks": []}, "source.tiktok_ads.tiktok_ads.location": {"database": "postgres", "schema": "public", "name": "location", "resource_type": "source", "package_name": "tiktok_ads", "path": "models/staging/src_tiktok_ads.yml", "original_file_path": "models/staging/src_tiktok_ads.yml", "unique_id": "source.tiktok_ads.tiktok_ads.location", "fqn": ["tiktok_ads", "staging", "tiktok_ads", "location"], "source_name": "tiktok_ads", "source_description": "", "loader": "fivetran", "identifier": "tiktok_location_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Reference table of geographic regions and locations available for TikTok Ads targeting. Each record represents a location, such as a country, province, or city.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp indicating when the record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "region_id": {"name": "region_id", "description": "Unique identifier for the geographic region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "Advertiser ID associated with this location record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country_code": {"name": "country_code", "description": "Two-letter ISO country code for the location.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "region_name": {"name": "region_name", "description": "Human-readable name of the geographic region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "region_level": {"name": "region_level", "description": "Reporting granularity of the location (e.g. COUNTRY, PROVINCE, CITY).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "area_type": {"name": "area_type", "description": "Classification of the location, such as administrative region or media market.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "parent_id": {"name": "parent_id", "description": "Identifier of the parent region, enabling hierarchical rollups (city to province to country).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "support_below_18": {"name": "support_below_18", "description": "Whether the location supports targeting users under 18. Used for compliance with age-restricted ad targeting rules.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"tiktok_location_data\"", "created_at": 1783450506.239812, "unrendered_database": "{% if target.type != 'spark' %}{{var('tiktok_ads_database', target.database)}}{% endif %}", "unrendered_schema": "{{var('tiktok_ads_schema', 'tiktok_ads')}}", "doc_blocks": []}, "source.microsoft_ads.microsoft_ads.account_history": {"database": "postgres", "schema": "public", "name": "account_history", "resource_type": "source", "package_name": "microsoft_ads", "path": "models/staging/src_microsoft_ads.yml", "original_file_path": "models/staging/src_microsoft_ads.yml", "unique_id": "source.microsoft_ads.microsoft_ads.account_history", "fqn": ["microsoft_ads", "staging", "microsoft_ads", "account_history"], "source_name": "microsoft_ads", "source_description": "", "loader": "Fivetran", "identifier": "microsoft_ads_account_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents a version of one or more Microsoft accounts.", "columns": {"id": {"name": "id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "name": {"name": "name", "description": "The name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_name"]}, "last_modified_time": {"name": "last_modified_time", "description": "The time each version of the object was last modified, i.e. when that version of the object was 'created'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.modified_at"]}, "time_zone": {"name": "time_zone", "description": "The time zone associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.time_zone"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_account_history_data\"", "created_at": 1783450506.2404468, "unrendered_database": "{% if target.type != 'spark'%}{{ var('microsoft_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('microsoft_ads_schema', 'bingads') }}", "doc_blocks": []}, "source.microsoft_ads.microsoft_ads.account_performance_daily_report": {"database": "postgres", "schema": "public", "name": "account_performance_daily_report", "resource_type": "source", "package_name": "microsoft_ads", "path": "models/staging/src_microsoft_ads.yml", "original_file_path": "models/staging/src_microsoft_ads.yml", "unique_id": "source.microsoft_ads.microsoft_ads.account_performance_daily_report", "fqn": ["microsoft_ads", "staging", "microsoft_ads", "account_performance_daily_report"], "source_name": "microsoft_ads", "source_description": "", "loader": "Fivetran", "identifier": "microsoft_ads_account_performance_daily_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents the daily performance by account and all non-metric columns.", "columns": {"date": {"name": "date", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "ad_distribution": {"name": "ad_distribution", "description": "The distribution medium associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_distribution"]}, "bid_match_type": {"name": "bid_match_type", "description": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.bid_match_type"]}, "delivered_match_type": {"name": "delivered_match_type", "description": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.delivered_match_type"]}, "top_vs_other": {"name": "top_vs_other", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions_qualified": {"name": "conversions_qualified", "description": "Number of [conversions](https://learn.microsoft.com/en-us/advertising/reporting-service/conversionperformancereportcolumn?view=bingads-13#conversionsqualified), measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions_qualified"]}, "conversions": {"name": "conversions", "description": "(Deprecated in 2022 in favor of `conversions_qualified`) Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions_src"]}, "revenue": {"name": "revenue", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions_qualified": {"name": "all_conversions_qualified", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions_qualified"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_account_performance_daily_report_data\"", "created_at": 1783450506.2411263, "unrendered_database": "{% if target.type != 'spark'%}{{ var('microsoft_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('microsoft_ads_schema', 'bingads') }}", "doc_blocks": []}, "source.microsoft_ads.microsoft_ads.ad_group_history": {"database": "postgres", "schema": "public", "name": "ad_group_history", "resource_type": "source", "package_name": "microsoft_ads", "path": "models/staging/src_microsoft_ads.yml", "original_file_path": "models/staging/src_microsoft_ads.yml", "unique_id": "source.microsoft_ads.microsoft_ads.ad_group_history", "fqn": ["microsoft_ads", "staging", "microsoft_ads", "ad_group_history"], "source_name": "microsoft_ads", "source_description": "", "loader": "Fivetran", "identifier": "microsoft_ads_ad_group_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents a version of one or more Microsoft ad groups.", "columns": {"id": {"name": "id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "name": {"name": "name", "description": "The name of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "modified_time": {"name": "modified_time", "description": "The time each version of the object was last modified, i.e. when that version of the object was 'created'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.modified_at"]}, "start_date": {"name": "start_date", "description": "The date in which an ad group starts running.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.start_date"]}, "end_date": {"name": "end_date", "description": "The date in which this ad group will no longer run.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.end_date"]}, "status": {"name": "status", "description": "The status of this ad group; see the following [documentation](https://help.ads.microsoft.com/apex/index/3/en/53094) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_status"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_ad_group_history_data\"", "created_at": 1783450506.2417753, "unrendered_database": "{% if target.type != 'spark'%}{{ var('microsoft_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('microsoft_ads_schema', 'bingads') }}", "doc_blocks": []}, "source.microsoft_ads.microsoft_ads.ad_group_performance_daily_report": {"database": "postgres", "schema": "public", "name": "ad_group_performance_daily_report", "resource_type": "source", "package_name": "microsoft_ads", "path": "models/staging/src_microsoft_ads.yml", "original_file_path": "models/staging/src_microsoft_ads.yml", "unique_id": "source.microsoft_ads.microsoft_ads.ad_group_performance_daily_report", "fqn": ["microsoft_ads", "staging", "microsoft_ads", "ad_group_performance_daily_report"], "source_name": "microsoft_ads", "source_description": "", "loader": "Fivetran", "identifier": "microsoft_ads_ad_group_performance_daily_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents the daily performance by account, campaign, ad group and all non-metric columns.", "columns": {"date": {"name": "date", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "language": {"name": "language", "description": "The language that the associated ad was viewed in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.language"]}, "ad_distribution": {"name": "ad_distribution", "description": "The distribution medium associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_distribution"]}, "bid_match_type": {"name": "bid_match_type", "description": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.bid_match_type"]}, "delivered_match_type": {"name": "delivered_match_type", "description": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.delivered_match_type"]}, "top_vs_other": {"name": "top_vs_other", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions_qualified": {"name": "conversions_qualified", "description": "Number of [conversions](https://learn.microsoft.com/en-us/advertising/reporting-service/conversionperformancereportcolumn?view=bingads-13#conversionsqualified), measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions_qualified"]}, "conversions": {"name": "conversions", "description": "(Deprecated in 2022 in favor of `conversions_qualified`) Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions_src"]}, "revenue": {"name": "revenue", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions_qualified": {"name": "all_conversions_qualified", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions_qualified"]}, "all_conversions": {"name": "all_conversions", "description": "(Deprecated in 2022 in favor of `conversions_qualified`)\nNumber of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions_src"]}, "all_revenue": {"name": "all_revenue", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_ad_group_performance_daily_report_data\"", "created_at": 1783450506.24252, "unrendered_database": "{% if target.type != 'spark'%}{{ var('microsoft_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('microsoft_ads_schema', 'bingads') }}", "doc_blocks": []}, "source.microsoft_ads.microsoft_ads.ad_history": {"database": "postgres", "schema": "public", "name": "ad_history", "resource_type": "source", "package_name": "microsoft_ads", "path": "models/staging/src_microsoft_ads.yml", "original_file_path": "models/staging/src_microsoft_ads.yml", "unique_id": "source.microsoft_ads.microsoft_ads.ad_history", "fqn": ["microsoft_ads", "staging", "microsoft_ads", "ad_history"], "source_name": "microsoft_ads", "source_description": "", "loader": "Fivetran", "identifier": "microsoft_ads_ad_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents a version of one or more Microsoft ads.", "columns": {"id": {"name": "id", "description": "The ID of the corresponding ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "modified_time": {"name": "modified_time", "description": "The time each version of the object was last modified, i.e. when that version of the object was 'created'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.modified_at"]}, "status": {"name": "status", "description": "The status of this ad; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/adstatus?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_status"]}, "type": {"name": "type", "description": "The ad type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/adtype?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_type"]}, "title": {"name": "title", "description": "The title of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.title"]}, "title_part_1": {"name": "title_part_1", "description": "Part 1 of the title.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.title_part_1"]}, "title_part_2": {"name": "title_part_2", "description": "Part 2 of the title.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.title_part_2"]}, "title_part_3": {"name": "title_part_3", "description": "Part 3 of the title.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.title_part_3"]}, "final_url": {"name": "final_url", "description": "The full URL that the ad links to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.final_url"]}, "domain": {"name": "domain", "description": "The associated domain that the ad links to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.domain"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_ad_history_data\"", "created_at": 1783450506.2431703, "unrendered_database": "{% if target.type != 'spark'%}{{ var('microsoft_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('microsoft_ads_schema', 'bingads') }}", "doc_blocks": []}, "source.microsoft_ads.microsoft_ads.ad_performance_daily_report": {"database": "postgres", "schema": "public", "name": "ad_performance_daily_report", "resource_type": "source", "package_name": "microsoft_ads", "path": "models/staging/src_microsoft_ads.yml", "original_file_path": "models/staging/src_microsoft_ads.yml", "unique_id": "source.microsoft_ads.microsoft_ads.ad_performance_daily_report", "fqn": ["microsoft_ads", "staging", "microsoft_ads", "ad_performance_daily_report"], "source_name": "microsoft_ads", "source_description": "", "loader": "Fivetran", "identifier": "microsoft_ads_ad_performance_daily_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents the daily performance by account, campaign, ad group, ad and all non-metric columns.", "columns": {"date": {"name": "date", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "ad_id": {"name": "ad_id", "description": "The ID of the corresponding ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_id"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "language": {"name": "language", "description": "The language that the associated ad was viewed in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.language"]}, "ad_distribution": {"name": "ad_distribution", "description": "The distribution medium associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_distribution"]}, "bid_match_type": {"name": "bid_match_type", "description": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.bid_match_type"]}, "delivered_match_type": {"name": "delivered_match_type", "description": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.delivered_match_type"]}, "top_vs_other": {"name": "top_vs_other", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions_qualified": {"name": "conversions_qualified", "description": "Number of [conversions](https://learn.microsoft.com/en-us/advertising/reporting-service/conversionperformancereportcolumn?view=bingads-13#conversionsqualified), measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions_qualified"]}, "conversions": {"name": "conversions", "description": "(Deprecated in 2022 in favor of `conversions_qualified`) Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions_src"]}, "revenue": {"name": "revenue", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions_qualified": {"name": "all_conversions_qualified", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions_qualified"]}, "all_conversions": {"name": "all_conversions", "description": "(Deprecated in 2022 in favor of `conversions_qualified`)\nNumber of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions_src"]}, "all_revenue": {"name": "all_revenue", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_ad_performance_daily_report_data\"", "created_at": 1783450506.2438955, "unrendered_database": "{% if target.type != 'spark'%}{{ var('microsoft_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('microsoft_ads_schema', 'bingads') }}", "doc_blocks": []}, "source.microsoft_ads.microsoft_ads.campaign_history": {"database": "postgres", "schema": "public", "name": "campaign_history", "resource_type": "source", "package_name": "microsoft_ads", "path": "models/staging/src_microsoft_ads.yml", "original_file_path": "models/staging/src_microsoft_ads.yml", "unique_id": "source.microsoft_ads.microsoft_ads.campaign_history", "fqn": ["microsoft_ads", "staging", "microsoft_ads", "campaign_history"], "source_name": "microsoft_ads", "source_description": "", "loader": "Fivetran", "identifier": "microsoft_ads_campaign_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents a version of one or more Microsoft campaigns.", "columns": {"id": {"name": "id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "name": {"name": "name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_name"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "modified_time": {"name": "modified_time", "description": "The time each version of the object was last modified, i.e. when that version of the object was 'created'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.modified_at"]}, "type": {"name": "type", "description": "The campaign type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaigntype?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_type"]}, "time_zone": {"name": "time_zone", "description": "The time zone associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.time_zone"]}, "status": {"name": "status", "description": "The status of this campaign; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaignstatus?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_status"]}, "budget": {"name": "budget", "description": "The amount to spend daily across all campaigns that share the budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget"]}, "budget_id": {"name": "budget_id", "description": "The unique Microsoft Advertising identifier of the budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget_id"]}, "budget_type": {"name": "budget_type", "description": "The budget type determines the pace at which the budget is spent throughout the day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget_type"]}, "language": {"name": "language", "description": "The language that the associated ad was viewed in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.language"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_campaign_history_data\"", "created_at": 1783450506.2445645, "unrendered_database": "{% if target.type != 'spark'%}{{ var('microsoft_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('microsoft_ads_schema', 'bingads') }}", "doc_blocks": []}, "source.microsoft_ads.microsoft_ads.campaign_performance_daily_report": {"database": "postgres", "schema": "public", "name": "campaign_performance_daily_report", "resource_type": "source", "package_name": "microsoft_ads", "path": "models/staging/src_microsoft_ads.yml", "original_file_path": "models/staging/src_microsoft_ads.yml", "unique_id": "source.microsoft_ads.microsoft_ads.campaign_performance_daily_report", "fqn": ["microsoft_ads", "staging", "microsoft_ads", "campaign_performance_daily_report"], "source_name": "microsoft_ads", "source_description": "", "loader": "Fivetran", "identifier": "microsoft_ads_campaign_performance_daily_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents the daily performance by account, campaign and all non-metric columns.", "columns": {"date": {"name": "date", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "ad_distribution": {"name": "ad_distribution", "description": "The distribution medium associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_distribution"]}, "bid_match_type": {"name": "bid_match_type", "description": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.bid_match_type"]}, "delivered_match_type": {"name": "delivered_match_type", "description": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.delivered_match_type"]}, "top_vs_other": {"name": "top_vs_other", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "budget_association_status": {"name": "budget_association_status", "description": "Indicates whether or not the campaign is currently spending from the budget mentioned in the BudgetName column. The possible values are `Current` and `Ended`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget_association_status"]}, "budget_name": {"name": "budget_name", "description": "The name of the budget. This column will be empty for unshared budgets.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget_name"]}, "budget_status": {"name": "budget_status", "description": "The budget status. The possible values are `Active` and `Deleted`. This column will be empty for unshared budgets.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget_status"]}, "conversions_qualified": {"name": "conversions_qualified", "description": "Number of [conversions](https://learn.microsoft.com/en-us/advertising/reporting-service/conversionperformancereportcolumn?view=bingads-13#conversionsqualified), measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions_qualified"]}, "conversions": {"name": "conversions", "description": "(Deprecated in 2022 in favor of `conversions_qualified`) Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions_src"]}, "revenue": {"name": "revenue", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions_qualified": {"name": "all_conversions_qualified", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions_qualified"]}, "all_conversions": {"name": "all_conversions", "description": "(Deprecated in 2022 in favor of `conversions_qualified`)\nNumber of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions_src"]}, "all_revenue": {"name": "all_revenue", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_campaign_performance_daily_report_data\"", "created_at": 1783450506.2457685, "unrendered_database": "{% if target.type != 'spark'%}{{ var('microsoft_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('microsoft_ads_schema', 'bingads') }}", "doc_blocks": []}, "source.microsoft_ads.microsoft_ads.keyword_history": {"database": "postgres", "schema": "public", "name": "keyword_history", "resource_type": "source", "package_name": "microsoft_ads", "path": "models/staging/src_microsoft_ads.yml", "original_file_path": "models/staging/src_microsoft_ads.yml", "unique_id": "source.microsoft_ads.microsoft_ads.keyword_history", "fqn": ["microsoft_ads", "staging", "microsoft_ads", "keyword_history"], "source_name": "microsoft_ads", "source_description": "", "loader": "Fivetran", "identifier": "microsoft_ads_keyword_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents a version of one or more Microsoft keywords.", "columns": {"id": {"name": "id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.keyword_id"]}, "name": {"name": "name", "description": "The keyword(s) associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.keyword_name"]}, "modified_time": {"name": "modified_time", "description": "The time each version of the object was last modified, i.e. when that version of the object was 'created'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.modified_at"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "match_type": {"name": "match_type", "description": "The match type associated with this record; values contain but may not be limited to 'Broad', 'Exact', 'Phrase'. Please refer to Microsoft Ad's [documentation](https://help.ads.microsoft.com/#apex/ads/en/50822/1).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.match_type"]}, "status": {"name": "status", "description": "The status of this keyword; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/keywordstatus?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.keyword_status"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_keyword_history_data\"", "created_at": 1783450506.2464182, "unrendered_database": "{% if target.type != 'spark'%}{{ var('microsoft_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('microsoft_ads_schema', 'bingads') }}", "doc_blocks": []}, "source.microsoft_ads.microsoft_ads.keyword_performance_daily_report": {"database": "postgres", "schema": "public", "name": "keyword_performance_daily_report", "resource_type": "source", "package_name": "microsoft_ads", "path": "models/staging/src_microsoft_ads.yml", "original_file_path": "models/staging/src_microsoft_ads.yml", "unique_id": "source.microsoft_ads.microsoft_ads.keyword_performance_daily_report", "fqn": ["microsoft_ads", "staging", "microsoft_ads", "keyword_performance_daily_report"], "source_name": "microsoft_ads", "source_description": "", "loader": "Fivetran", "identifier": "microsoft_ads_keyword_performance_daily_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents the daily performance by account, campaign, ad group, ad, keyword and all non-metric columns.", "columns": {"date": {"name": "date", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "ad_id": {"name": "ad_id", "description": "The ID of the corresponding ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_id"]}, "keyword_id": {"name": "keyword_id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.keyword_id"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "language": {"name": "language", "description": "The language that the associated ad was viewed in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.language"]}, "ad_distribution": {"name": "ad_distribution", "description": "The distribution medium associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_distribution"]}, "bid_match_type": {"name": "bid_match_type", "description": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.bid_match_type"]}, "delivered_match_type": {"name": "delivered_match_type", "description": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.delivered_match_type"]}, "top_vs_other": {"name": "top_vs_other", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions_qualified": {"name": "conversions_qualified", "description": "Number of [conversions](https://learn.microsoft.com/en-us/advertising/reporting-service/conversionperformancereportcolumn?view=bingads-13#conversionsqualified), measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions_qualified"]}, "conversions": {"name": "conversions", "description": "(Deprecated in 2022 in favor of `conversions_qualified`) Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions_src"]}, "revenue": {"name": "revenue", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions_qualified": {"name": "all_conversions_qualified", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions_qualified"]}, "all_conversions": {"name": "all_conversions", "description": "(Deprecated in 2022 in favor of `conversions_qualified`)\nNumber of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions_src"]}, "all_revenue": {"name": "all_revenue", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_keyword_performance_daily_report_data\"", "created_at": 1783450506.2471182, "unrendered_database": "{% if target.type != 'spark'%}{{ var('microsoft_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('microsoft_ads_schema', 'bingads') }}", "doc_blocks": []}, "source.microsoft_ads.microsoft_ads.search_query_performance_daily_report": {"database": "postgres", "schema": "public", "name": "search_query_performance_daily_report", "resource_type": "source", "package_name": "microsoft_ads", "path": "models/staging/src_microsoft_ads.yml", "original_file_path": "models/staging/src_microsoft_ads.yml", "unique_id": "source.microsoft_ads.microsoft_ads.search_query_performance_daily_report", "fqn": ["microsoft_ads", "staging", "microsoft_ads", "search_query_performance_daily_report"], "source_name": "microsoft_ads", "source_description": "", "loader": "Fivetran", "identifier": "microsoft_ads_search_performance_daily_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents the daily performance by account, campaign, ad group, ad, keyword and all non-metric columns.", "columns": {"date": {"name": "date", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "ad_id": {"name": "ad_id", "description": "The ID of the corresponding ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_id"]}, "keyword_id": {"name": "keyword_id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.keyword_id"]}, "search_query": {"name": "search_query", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "language": {"name": "language", "description": "The language that the associated ad was viewed in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.language"]}, "ad_distribution": {"name": "ad_distribution", "description": "The distribution medium associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_distribution"]}, "bid_match_type": {"name": "bid_match_type", "description": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.bid_match_type"]}, "delivered_match_type": {"name": "delivered_match_type", "description": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.delivered_match_type"]}, "top_vs_other": {"name": "top_vs_other", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions_qualified": {"name": "conversions_qualified", "description": "Number of [conversions](https://learn.microsoft.com/en-us/advertising/reporting-service/conversionperformancereportcolumn?view=bingads-13#conversionsqualified), measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions_qualified"]}, "conversions": {"name": "conversions", "description": "(Deprecated in 2022 in favor of `conversions_qualified`) Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions_src"]}, "revenue": {"name": "revenue", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions_qualified": {"name": "all_conversions_qualified", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions_qualified"]}, "all_conversions": {"name": "all_conversions", "description": "(Deprecated in 2022 in favor of `conversions_qualified`)\nNumber of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions_src"]}, "all_revenue": {"name": "all_revenue", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_search_performance_daily_report_data\"", "created_at": 1783450506.2478557, "unrendered_database": "{% if target.type != 'spark'%}{{ var('microsoft_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('microsoft_ads_schema', 'bingads') }}", "doc_blocks": []}, "source.microsoft_ads.microsoft_ads.geographic_performance_daily_report": {"database": "postgres", "schema": "public", "name": "geographic_performance_daily_report", "resource_type": "source", "package_name": "microsoft_ads", "path": "models/staging/src_microsoft_ads.yml", "original_file_path": "models/staging/src_microsoft_ads.yml", "unique_id": "source.microsoft_ads.microsoft_ads.geographic_performance_daily_report", "fqn": ["microsoft_ads", "staging", "microsoft_ads", "geographic_performance_daily_report"], "source_name": "microsoft_ads", "source_description": "", "loader": "Fivetran", "identifier": "microsoft_ads_geographic_performance_daily_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents the daily performance by geographic metrics.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "ad_distribution": {"name": "ad_distribution", "description": "The distribution medium associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_distribution"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_qualified": {"name": "all_conversions_qualified", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions_qualified"]}, "all_revenue": {"name": "all_revenue", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}, "bid_match_type": {"name": "bid_match_type", "description": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.bid_match_type"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "city": {"name": "city", "description": "The city where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.city"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_qualified": {"name": "conversions_qualified", "description": "Number of [conversions](https://learn.microsoft.com/en-us/advertising/reporting-service/conversionperformancereportcolumn?view=bingads-13#conversionsqualified), measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions_qualified"]}, "country": {"name": "country", "description": "The country or region where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.country"]}, "county": {"name": "county", "description": "The county where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.county"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "date": {"name": "date", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "delivered_match_type": {"name": "delivered_match_type", "description": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.delivered_match_type"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "goal": {"name": "goal", "description": "The name of the goal you set for the conversions you want, meaning actions customers take after clicking your ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.goal"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "language": {"name": "language", "description": "The language of the publisher where the ad was shown.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "location_type": {"name": "location_type", "description": "The location type used to deliver ads. Values include \"Physical location\" and \"Location of interest\". \n\n\"Physical location\" indicates the user was in the corresponding City, Country, MetroArea, or State. \"Location of interest\" indicates the user was searching for or viewing pages about the location.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.location_type"]}, "metro_area": {"name": "metro_area", "description": "The metro area (Microsoft Market Area in the United States) where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.metro_area"]}, "most_specific_location": {"name": "most_specific_location", "description": "The most specific location used to deliver ads. If postal code is available, it is prioritized; otherwise, it may match city or country/region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.most_specific_location"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "postal_code": {"name": "postal_code", "description": "The postal code where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.postal_code"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "state": {"name": "state", "description": "The state or geographic region where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.state"]}, "top_vs_other": {"name": "top_vs_other", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "revenue": {"name": "revenue", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_geographic_performance_daily_report_data\"", "created_at": 1783450506.2487094, "unrendered_database": "{% if target.type != 'spark'%}{{ var('microsoft_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('microsoft_ads_schema', 'bingads') }}", "doc_blocks": []}, "source.facebook_ads.facebook_ads.account_history": {"database": "postgres", "schema": "public", "name": "account_history", "resource_type": "source", "package_name": "facebook_ads", "path": "models/staging/src_facebook_ads.yml", "original_file_path": "models/staging/src_facebook_ads.yml", "unique_id": "source.facebook_ads.facebook_ads.account_history", "fqn": ["facebook_ads", "staging", "facebook_ads", "account_history"], "source_name": "facebook_ads", "source_description": "", "loader": "Fivetran", "identifier": "facebook_ads_account_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table reflects a version of a Facebook ad account.", "columns": {"id": {"name": "id", "description": "The ID of the ad account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._fivetran_synced"]}, "account_status": {"name": "account_status", "description": "Current status of account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "business_country_code": {"name": "business_country_code", "description": "Country code of business associated to account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_time": {"name": "created_time", "description": "The time account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Currency associated with account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone_name": {"name": "timezone_name", "description": "Timezone associated with account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "business_state": {"name": "business_state", "description": "State abbreviation for business address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone_offset_hours_utc": {"name": "timezone_offset_hours_utc", "description": "Time zone difference from UTC.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "min_daily_budget": {"name": "min_daily_budget", "description": "The minimum daily budget for this Ad Account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"facebook_ads_account_history_data\"", "created_at": 1783450506.2493827, "unrendered_database": "{% if target.type != 'spark' %}{{ var('facebook_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('facebook_ads_schema', 'facebook_ads') }}", "doc_blocks": []}, "source.facebook_ads.facebook_ads.ad_history": {"database": "postgres", "schema": "public", "name": "ad_history", "resource_type": "source", "package_name": "facebook_ads", "path": "models/staging/src_facebook_ads.yml", "original_file_path": "models/staging/src_facebook_ads.yml", "unique_id": "source.facebook_ads.facebook_ads.ad_history", "fqn": ["facebook_ads", "staging", "facebook_ads", "ad_history"], "source_name": "facebook_ads", "source_description": "", "loader": "Fivetran", "identifier": "facebook_ads_ad_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table reflects a version of a Facebook ad.", "columns": {"id": {"name": "id", "description": "The ID of this ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the ad account that this ad belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_set_id": {"name": "ad_set_id", "description": "ID of the ad set that contains the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Ad campaign that contains this ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_id": {"name": "creative_id", "description": "The ID of the ad creative to be used by this ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Name of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._fivetran_synced"]}, "updated_time": {"name": "updated_time", "description": "The timestamp of the last update of a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.updated_time"]}, "conversion_domain": {"name": "conversion_domain", "description": "The domain you've configured the ad to convert to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"facebook_ads_ad_history_data\"", "created_at": 1783450506.2500503, "unrendered_database": "{% if target.type != 'spark' %}{{ var('facebook_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('facebook_ads_schema', 'facebook_ads') }}", "doc_blocks": []}, "source.facebook_ads.facebook_ads.ad_set_history": {"database": "postgres", "schema": "public", "name": "ad_set_history", "resource_type": "source", "package_name": "facebook_ads", "path": "models/staging/src_facebook_ads.yml", "original_file_path": "models/staging/src_facebook_ads.yml", "unique_id": "source.facebook_ads.facebook_ads.ad_set_history", "fqn": ["facebook_ads", "staging", "facebook_ads", "ad_set_history"], "source_name": "facebook_ads", "source_description": "", "loader": "Fivetran", "identifier": "facebook_ads_ad_set_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table reflects a version of a Facebook ad set.", "columns": {"id": {"name": "id", "description": "The ID of the ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the ad account that this ad set belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Ad campaign that contains this ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._fivetran_synced"]}, "updated_time": {"name": "updated_time", "description": "The timestamp of the last update of a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.updated_time"]}, "start_time": {"name": "start_time", "description": "Timestamp of designated ad set start time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_time": {"name": "end_time", "description": "Timestamp of designated ad set end time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_strategy": {"name": "bid_strategy", "description": "Bid strategy values are - 'LOWEST_COST_WITHOUT_CAP', 'LOWEST_COST_WITH_BID_CAP', 'COST_CAP', 'LOWEST_COST_WITH_MIN_ROAS'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget": {"name": "daily_budget", "description": "Daily budget of ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_remaining": {"name": "budget_remaining", "description": "Remaining budget of ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Status values are - 'ACTIVE', 'PAUSED', 'DELETED', 'ARCHIVED'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "optimization_goal": {"name": "optimization_goal", "description": "The optimization goal this ad set is using. Possible values defined [here](https://developers.facebook.com/docs/marketing-api/reference/ad-campaign/#fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"facebook_ads_ad_set_history_data\"", "created_at": 1783450506.2507682, "unrendered_database": "{% if target.type != 'spark' %}{{ var('facebook_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('facebook_ads_schema', 'facebook_ads') }}", "doc_blocks": []}, "source.facebook_ads.facebook_ads.basic_ad": {"database": "postgres", "schema": "public", "name": "basic_ad", "resource_type": "source", "package_name": "facebook_ads", "path": "models/staging/src_facebook_ads.yml", "original_file_path": "models/staging/src_facebook_ads.yml", "unique_id": "source.facebook_ads.facebook_ads.basic_ad", "fqn": ["facebook_ads", "staging", "facebook_ads", "basic_ad"], "source_name": "facebook_ads", "source_description": "", "loader": "Fivetran", "identifier": "facebook_ads_basic_ad_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of an ad in Facebook.", "columns": {"ad_id": {"name": "ad_id", "description": "The ID of the ad the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_name": {"name": "ad_name", "description": "Name of the ad the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "adset_name": {"name": "adset_name", "description": "Name of the ad set the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "The date of the reported performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the ad account that this ad belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "inline_link_clicks": {"name": "inline_link_clicks", "description": "The number of clicks the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the ad in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reach": {"name": "reach", "description": "The number of people who saw any content from your Page or about your Page. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "frequency": {"name": "frequency", "description": "The average number of times each person saw your ad; it is calculated as impressions divided by reach.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"facebook_ads_basic_ad_data\"", "created_at": 1783450506.251436, "unrendered_database": "{% if target.type != 'spark' %}{{ var('facebook_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('facebook_ads_schema', 'facebook_ads') }}", "doc_blocks": []}, "source.facebook_ads.facebook_ads.basic_ad_actions": {"database": "postgres", "schema": "public", "name": "basic_ad_actions", "resource_type": "source", "package_name": "facebook_ads", "path": "models/staging/src_facebook_ads.yml", "original_file_path": "models/staging/src_facebook_ads.yml", "unique_id": "source.facebook_ads.facebook_ads.basic_ad_actions", "fqn": ["facebook_ads", "staging", "facebook_ads", "basic_ad_actions"], "source_name": "facebook_ads", "source_description": "", "loader": "Fivetran", "identifier": "facebook_ads_basic_ad_actions_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily conversion performance of an ad in Facebook. This is the prebuilt `basic_ad` report broken down by `action_type`.", "columns": {"_1_d_view": {"name": "_1_d_view", "description": "Conversion metric value using an attribution window of \"1 day after viewing the ad\". Not included in downstream models by default, but can be added using the `facebook_ads__basic_ad_actions_passthrough_metrics` var.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_7_d_click": {"name": "_7_d_click", "description": "Conversion metric value using an attribution window of \"7 days after clicking the ad\". Not included in downstream models by default, but can be added using the `facebook_ads__basic_ad_actions_passthrough_metrics` var.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_28_d_click": {"name": "_28_d_click", "description": "Conversion metric value using an attribution window of \"28 days after clicking the ad\". Deprecated by Facebook due to digital privacy initiatives. Not included in downstream models by default, but can be added using the `facebook_ads__basic_ad_actions_passthrough_metrics` var.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_id": {"name": "_fivetran_id", "description": "Unique record identifier.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._fivetran_synced"]}, "action_type": {"name": "action_type", "description": "The kind of actions taken on your ad, Page, app or event after your ad was served to someone, even if they didn't click on it. Action types include Page likes, app installs, conversions, event responses and more. Actions prepended by app_custom_event come from mobile app events and actions prepended by offsite_conversion come from the Facebook Pixel.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_id": {"name": "ad_id", "description": "The ID of the ad the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "The date of the reported performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "index": {"name": "index", "description": "Index reflecting the `action_type` tracked for this ad on this day. A primary key created by Fivetran utilized for tracking data, specifically when there are multiple rows associated with a single row in the parent table.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.index"]}, "inline": {"name": "inline", "description": "Conversion metric value using the attribution window that occurs on the ad itself. Not included in downstream models by default, but can be added using the `facebook_ads__basic_ad_actions_passthrough_metrics` var.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "value": {"name": "value", "description": "Conversion metric value using the default attribution window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"facebook_ads_basic_ad_actions_data\"", "created_at": 1783450506.2521179, "unrendered_database": "{% if target.type != 'spark' %}{{ var('facebook_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('facebook_ads_schema', 'facebook_ads') }}", "doc_blocks": []}, "source.facebook_ads.facebook_ads.basic_ad_action_values": {"database": "postgres", "schema": "public", "name": "basic_ad_action_values", "resource_type": "source", "package_name": "facebook_ads", "path": "models/staging/src_facebook_ads.yml", "original_file_path": "models/staging/src_facebook_ads.yml", "unique_id": "source.facebook_ads.facebook_ads.basic_ad_action_values", "fqn": ["facebook_ads", "staging", "facebook_ads", "basic_ad_action_values"], "source_name": "facebook_ads", "source_description": "", "loader": "Fivetran", "identifier": "facebook_ads_basic_ad_action_values_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": null, "external": null, "description": "Each record represents the daily conversion values associated with an ad in Facebook. This is the prebuilt `basic_ad` report broken down by `action_type` and `action_value`.", "columns": {"_7_d_click": {"name": "_7_d_click", "description": "Conversion metric value using an attribution window of \"7 days after clicking the ad\". Not included in downstream models by default, but can be added using the `facebook_ads__basic_ad_actions_passthrough_metrics` var.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_id": {"name": "_fivetran_id", "description": "Unique record identifier.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._fivetran_synced"]}, "action_type": {"name": "action_type", "description": "The kind of actions taken on your ad, Page, app or event after your ad was served to someone, even if they didn't click on it. Action types include Page likes, app installs, conversions, event responses and more. Actions prepended by app_custom_event come from mobile app events and actions prepended by offsite_conversion come from the Facebook Pixel.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_id": {"name": "ad_id", "description": "The ID of the ad the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "The date of the reported performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "index": {"name": "index", "description": "Index reflecting the `action_type` tracked for this ad on this day. A primary key created by Fivetran utilized for tracking data, specifically when there are multiple rows associated with a single row in the parent table.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.index"]}, "value": {"name": "value", "description": "Monetary value associated with the convesion action using the default attribution window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": null, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": null, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"facebook_ads_basic_ad_action_values_data\"", "created_at": 1783450506.2526116, "unrendered_database": "{% if target.type != 'spark' %}{{ var('facebook_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('facebook_ads_schema', 'facebook_ads') }}", "doc_blocks": []}, "source.facebook_ads.facebook_ads.campaign_history": {"database": "postgres", "schema": "public", "name": "campaign_history", "resource_type": "source", "package_name": "facebook_ads", "path": "models/staging/src_facebook_ads.yml", "original_file_path": "models/staging/src_facebook_ads.yml", "unique_id": "source.facebook_ads.facebook_ads.campaign_history", "fqn": ["facebook_ads", "staging", "facebook_ads", "campaign_history"], "source_name": "facebook_ads", "source_description": "", "loader": "Fivetran", "identifier": "facebook_ads_campaign_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table reflects a version of a Facebook campaign.", "columns": {"id": {"name": "id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the ad account that this campaign belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._fivetran_synced"]}, "updated_time": {"name": "updated_time", "description": "The timestamp of the last update of a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.updated_time"]}, "created_time": {"name": "created_time", "description": "The time the campaign was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_time": {"name": "start_time", "description": "Timestamp of designated campaign start time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "stop_time": {"name": "stop_time", "description": "Timestamp of designated campaign end time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget": {"name": "daily_budget", "description": "Daily budget of campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_remaining": {"name": "budget_remaining", "description": "Remaining budget of campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lifetime_budget": {"name": "lifetime_budget", "description": "Lifetime budget of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Status values are - 'ACTIVE', 'PAUSED', 'DELETED', 'ARCHIVED'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"facebook_ads_campaign_history_data\"", "created_at": 1783450506.2532678, "unrendered_database": "{% if target.type != 'spark' %}{{ var('facebook_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('facebook_ads_schema', 'facebook_ads') }}", "doc_blocks": []}, "source.facebook_ads.facebook_ads.creative_history": {"database": "postgres", "schema": "public", "name": "creative_history", "resource_type": "source", "package_name": "facebook_ads", "path": "models/staging/src_facebook_ads.yml", "original_file_path": "models/staging/src_facebook_ads.yml", "unique_id": "source.facebook_ads.facebook_ads.creative_history", "fqn": ["facebook_ads", "staging", "facebook_ads", "creative_history"], "source_name": "facebook_ads", "source_description": "", "loader": "Fivetran", "identifier": "facebook_ads_creative_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table reflects a version of a Facebook creative.", "columns": {"_fivetran_id": {"name": "_fivetran_id", "description": "Unique record identifier", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "page_link": {"name": "page_link", "description": "URL destination of Facebook ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "template_page_link": {"name": "template_page_link", "description": "URL destination of Facebook dynamic ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "id": {"name": "id", "description": "Unique ID for an ad creative.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "Ad account ID for the account this ad creative belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Name of this ad creative as seen in the ad account's library.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_tags": {"name": "url_tags", "description": "A set of query string parameters which will replace or be appended to urls clicked from page post ads, message of the post, and canvas app install creatives only.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._fivetran_synced"]}, "asset_feed_spec_link_urls": {"name": "asset_feed_spec_link_urls", "description": "Link to the asset feed spec", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "object_story_link_data_child_attachments": {"name": "object_story_link_data_child_attachments", "description": "Link of the object story child attachments", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "object_story_link_data_caption": {"name": "object_story_link_data_caption", "description": "Link of the object story caption", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "object_story_link_data_description": {"name": "object_story_link_data_description", "description": "Link of the object story description", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "object_story_link_data_link": {"name": "object_story_link_data_link", "description": "Link of the object story link", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "object_story_link_data_message": {"name": "object_story_link_data_message", "description": "Link of the object story message", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "template_app_link_spec_ios": {"name": "template_app_link_spec_ios", "description": "Link of the object story spec for ios", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "template_app_link_spec_ipad": {"name": "template_app_link_spec_ipad", "description": "Link of the template app spec for ipad", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "template_app_link_spec_android": {"name": "template_app_link_spec_android", "description": "Link of the template app for android", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "template_app_link_spec_iphone": {"name": "template_app_link_spec_iphone", "description": "Link of the template app for iphone", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"facebook_ads_creative_history_data\"", "created_at": 1783450506.2539997, "unrendered_database": "{% if target.type != 'spark' %}{{ var('facebook_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('facebook_ads_schema', 'facebook_ads') }}", "doc_blocks": []}, "source.facebook_ads.facebook_ads.demographics_country": {"database": "postgres", "schema": "public", "name": "demographics_country", "resource_type": "source", "package_name": "facebook_ads", "path": "models/staging/src_facebook_ads.yml", "original_file_path": "models/staging/src_facebook_ads.yml", "unique_id": "source.facebook_ads.facebook_ads.demographics_country", "fqn": ["facebook_ads", "staging", "facebook_ads", "demographics_country"], "source_name": "facebook_ads", "source_description": "", "loader": "Fivetran", "identifier": "facebook_ads_demographics_country_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Ads report segmented by country.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the ad account that this ad belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.account_id"]}, "date": {"name": "date", "description": "The date of the reported performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.date"]}, "_fivetran_id": {"name": "_fivetran_id", "description": "Fivetran-generated unique ID of the country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.country_id"]}, "country": {"name": "country", "description": "Country whose ad performance is being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.country"]}, "impressions": {"name": "impressions", "description": "The number of impressions the ads had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.impressions"]}, "inline_link_clicks": {"name": "inline_link_clicks", "description": "The number of clicks on links to select destinations or experiences, on or off Facebook-owned properties. Inline link clicks use a fixed 1-day-click attribution window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.inline_link_clicks"]}, "reach": {"name": "reach", "description": "The number of people who saw any content from your Page or about your Page. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.reach"]}, "cost_per_inline_link_click": {"name": "cost_per_inline_link_click", "description": "The average cost of each inline link click. Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.cost_per_inline_link_click"]}, "cpc": {"name": "cpc", "description": "The average cost for each click (all). Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.cpc"]}, "cpm": {"name": "cpm", "description": "The average cost for 1,000 impressions. Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.cpm"]}, "ctr": {"name": "ctr", "description": "The percentage of times people saw your ad and performed a click (all). Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.ctr"]}, "frequency": {"name": "frequency", "description": "The average number of times each person saw your ads; it is calculated as impressions divided by reach.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.frequency"]}, "spend": {"name": "spend", "description": "Ad spend in a given day for the breakdown.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.spend"]}, "inline_link_click_ctr": {"name": "inline_link_click_ctr", "description": "The percentage of time people saw your ads and performed an inline link click. Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.inline_link_click_ctr"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"facebook_ads_demographics_country_data\"", "created_at": 1783450506.2546816, "unrendered_database": "{% if target.type != 'spark' %}{{ var('facebook_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('facebook_ads_schema', 'facebook_ads') }}", "doc_blocks": ["doc.facebook_ads.demographics_country"]}, "source.facebook_ads.facebook_ads.demographics_country_actions": {"database": "postgres", "schema": "public", "name": "demographics_country_actions", "resource_type": "source", "package_name": "facebook_ads", "path": "models/staging/src_facebook_ads.yml", "original_file_path": "models/staging/src_facebook_ads.yml", "unique_id": "source.facebook_ads.facebook_ads.demographics_country_actions", "fqn": ["facebook_ads", "staging", "facebook_ads", "demographics_country_actions"], "source_name": "facebook_ads", "source_description": "", "loader": "Fivetran", "identifier": "facebook_ads_demographics_country_actions_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents daily conversion performance by country. This is the prebuilt `demographics_country` report broken down by `action_type`.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the ad account that this ad belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.account_id"]}, "date": {"name": "date", "description": "The date of the reported performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.date"]}, "_fivetran_id": {"name": "_fivetran_id", "description": "Fivetran-generated unique ID of the country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.country_id"]}, "index": {"name": "index", "description": "Index reflecting the `action_type` tracked for this ad on this day. A primary key created by Fivetran utilized for tracking data, specifically when there are multiple rows associated with a single row in the parent table.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.index"]}, "action_type": {"name": "action_type", "description": "The kind of actions taken on your ad, Page, app or event after your ad was served to someone, even if they didn't click on it. Action types include Page likes, app installs, conversions, event responses and more.\nActions prepended by `app_custom_event` come from mobile app events and actions prepended by `offsite_conversion` come from the Facebook Pixel.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.action_type"]}, "value": {"name": "value", "description": "Conversion metric value using the default attribution window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.conversions"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._fivetran_synced"]}, "inline": {"name": "inline", "description": "Conversion metric value using the attribution window that occurs on the ad itself. Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.inline"]}, "_7_d_click": {"name": "_7_d_click", "description": "Conversion metric value using an attribution window of \"7 days after clicking the ad\". Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._7_d_click"]}, "_1_d_view": {"name": "_1_d_view", "description": "Conversion metric value using an attribution window of \"1 day after viewing the ad\". Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._1_d_view"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"facebook_ads_demographics_country_actions_data\"", "created_at": 1783450506.2553122, "unrendered_database": "{% if target.type != 'spark' %}{{ var('facebook_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('facebook_ads_schema', 'facebook_ads') }}", "doc_blocks": ["doc.facebook_ads.demographics_country_actions"]}, "source.facebook_ads.facebook_ads.demographics_region": {"database": "postgres", "schema": "public", "name": "demographics_region", "resource_type": "source", "package_name": "facebook_ads", "path": "models/staging/src_facebook_ads.yml", "original_file_path": "models/staging/src_facebook_ads.yml", "unique_id": "source.facebook_ads.facebook_ads.demographics_region", "fqn": ["facebook_ads", "staging", "facebook_ads", "demographics_region"], "source_name": "facebook_ads", "source_description": "", "loader": "Fivetran", "identifier": "facebook_ads_demographics_region_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Ads report segmented by geographic region.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the ad account that this ad belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.account_id"]}, "date": {"name": "date", "description": "The date of the reported performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.date"]}, "_fivetran_id": {"name": "_fivetran_id", "description": "Fivetran-generated unique ID of the geographic region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.region_id"]}, "region": {"name": "region", "description": "Geographic region whose ad performance is being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.region"]}, "impressions": {"name": "impressions", "description": "The number of impressions the ads had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.impressions"]}, "inline_link_clicks": {"name": "inline_link_clicks", "description": "The number of clicks on links to select destinations or experiences, on or off Facebook-owned properties. Inline link clicks use a fixed 1-day-click attribution window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.inline_link_clicks"]}, "reach": {"name": "reach", "description": "The number of people who saw any content from your Page or about your Page. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.reach"]}, "cost_per_inline_link_click": {"name": "cost_per_inline_link_click", "description": "The average cost of each inline link click. Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.cost_per_inline_link_click"]}, "cpc": {"name": "cpc", "description": "The average cost for each click (all). Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.cpc"]}, "cpm": {"name": "cpm", "description": "The average cost for 1,000 impressions. Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.cpm"]}, "ctr": {"name": "ctr", "description": "The percentage of times people saw your ad and performed a click (all). Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.ctr"]}, "frequency": {"name": "frequency", "description": "The average number of times each person saw your ads; it is calculated as impressions divided by reach.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.frequency"]}, "spend": {"name": "spend", "description": "Ad spend in a given day for the breakdown.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.spend"]}, "inline_link_click_ctr": {"name": "inline_link_click_ctr", "description": "The percentage of time people saw your ads and performed an inline link click. Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.inline_link_click_ctr"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"facebook_ads_demographics_region_data\"", "created_at": 1783450506.255989, "unrendered_database": "{% if target.type != 'spark' %}{{ var('facebook_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('facebook_ads_schema', 'facebook_ads') }}", "doc_blocks": ["doc.facebook_ads.demographics_region"]}, "source.facebook_ads.facebook_ads.demographics_region_actions": {"database": "postgres", "schema": "public", "name": "demographics_region_actions", "resource_type": "source", "package_name": "facebook_ads", "path": "models/staging/src_facebook_ads.yml", "original_file_path": "models/staging/src_facebook_ads.yml", "unique_id": "source.facebook_ads.facebook_ads.demographics_region_actions", "fqn": ["facebook_ads", "staging", "facebook_ads", "demographics_region_actions"], "source_name": "facebook_ads", "source_description": "", "loader": "Fivetran", "identifier": "facebook_ads_demographics_region_actions_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents daily conversion performance by geographic region. This is the prebuilt `demographics_region` report broken down by `action_type`.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the ad account that this ad belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.account_id"]}, "date": {"name": "date", "description": "The date of the reported performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.date"]}, "_fivetran_id": {"name": "_fivetran_id", "description": "Fivetran-generated unique ID of the geographic region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.region_id"]}, "index": {"name": "index", "description": "Index reflecting the `action_type` tracked for this ad on this day. A primary key created by Fivetran utilized for tracking data, specifically when there are multiple rows associated with a single row in the parent table.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.index"]}, "action_type": {"name": "action_type", "description": "The kind of actions taken on your ad, Page, app or event after your ad was served to someone, even if they didn't click on it. Action types include Page likes, app installs, conversions, event responses and more.\nActions prepended by `app_custom_event` come from mobile app events and actions prepended by `offsite_conversion` come from the Facebook Pixel.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.action_type"]}, "value": {"name": "value", "description": "Conversion metric value using the default attribution window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.conversions"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._fivetran_synced"]}, "inline": {"name": "inline", "description": "Conversion metric value using the attribution window that occurs on the ad itself. Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.inline"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"facebook_ads_demographics_region_actions_data\"", "created_at": 1783450506.2566378, "unrendered_database": "{% if target.type != 'spark' %}{{ var('facebook_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('facebook_ads_schema', 'facebook_ads') }}", "doc_blocks": ["doc.facebook_ads.demographics_region_actions"]}}, "macros": {"macro.dbt_postgres.postgres__get_catalog_relations": {"name": "postgres__get_catalog_relations", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "unique_id": "macro.dbt_postgres.postgres__get_catalog_relations", "macro_sql": "{% macro postgres__get_catalog_relations(information_schema, relations) -%}\n {%- call statement('catalog', fetch_result=True) -%}\n\n {#\n If the user has multiple databases set and the first one is wrong, this will fail.\n But we won't fail in the case where there are multiple quoting-difference-only dbs, which is better.\n #}\n {% set database = information_schema.database %}\n {{ adapter.verify_database(database) }}\n\n select\n '{{ database }}' as table_database,\n sch.nspname as table_schema,\n tbl.relname as table_name,\n case tbl.relkind\n when 'v' then 'VIEW'\n when 'm' then 'MATERIALIZED VIEW'\n else 'BASE TABLE'\n end as table_type,\n tbl_desc.description as table_comment,\n col.attname as column_name,\n col.attnum as column_index,\n pg_catalog.format_type(col.atttypid, col.atttypmod) as column_type,\n col_desc.description as column_comment,\n pg_get_userbyid(tbl.relowner) as table_owner\n\n from pg_catalog.pg_namespace sch\n join pg_catalog.pg_class tbl on tbl.relnamespace = sch.oid\n join pg_catalog.pg_attribute col on col.attrelid = tbl.oid\n left outer join pg_catalog.pg_description tbl_desc on (tbl_desc.objoid = tbl.oid and tbl_desc.objsubid = 0)\n left outer join pg_catalog.pg_description col_desc on (col_desc.objoid = tbl.oid and col_desc.objsubid = col.attnum)\n where (\n {%- for relation in relations -%}\n {%- if relation.identifier -%}\n (upper(sch.nspname) = upper('{{ relation.schema }}') and\n upper(tbl.relname) = upper('{{ relation.identifier }}'))\n {%- else-%}\n upper(sch.nspname) = upper('{{ relation.schema }}')\n {%- endif -%}\n {%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n )\n and not pg_is_other_temp_schema(sch.oid) -- not a temporary schema belonging to another session\n and tbl.relpersistence in ('p', 'u') -- [p]ermanent table or [u]nlogged table. Exclude [t]emporary tables\n and tbl.relkind in ('r', 'v', 'f', 'p', 'm') -- o[r]dinary table, [v]iew, [f]oreign table, [p]artitioned table, [m]aterialized view. Other values are [i]ndex, [S]equence, [c]omposite type, [t]OAST table\n and col.attnum > 0 -- negative numbers are used for system columns such as oid\n and not col.attisdropped -- column as not been dropped\n\n order by\n sch.nspname,\n tbl.relname,\n col.attnum\n\n {%- endcall -%}\n\n {{ return(load_result('catalog').table) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "relations", "type": null, "description": ""}], "created_at": 1783450492.2179422, "supported_languages": null}, "macro.dbt_postgres.postgres__get_catalog": {"name": "postgres__get_catalog", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "unique_id": "macro.dbt_postgres.postgres__get_catalog", "macro_sql": "{% macro postgres__get_catalog(information_schema, schemas) -%}\n {%- set relations = [] -%}\n {%- for schema in schemas -%}\n {%- set dummy = relations.append({'schema': schema}) -%}\n {%- endfor -%}\n {{ return(postgres__get_catalog_relations(information_schema, relations)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_catalog_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "schemas", "type": null, "description": ""}], "created_at": 1783450492.2186975, "supported_languages": null}, "macro.dbt_postgres.postgres__current_timestamp": {"name": "postgres__current_timestamp", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__current_timestamp", "macro_sql": "{% macro postgres__current_timestamp() -%}\n now()\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.219128, "supported_languages": null}, "macro.dbt_postgres.postgres__snapshot_string_as_time": {"name": "postgres__snapshot_string_as_time", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__snapshot_string_as_time", "macro_sql": "{% macro postgres__snapshot_string_as_time(timestamp) -%}\n {%- set result = \"'\" ~ timestamp ~ \"'::timestamp without time zone\" -%}\n {{ return(result) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "timestamp", "type": null, "description": ""}], "created_at": 1783450492.2195208, "supported_languages": null}, "macro.dbt_postgres.postgres__snapshot_get_time": {"name": "postgres__snapshot_get_time", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__snapshot_get_time", "macro_sql": "{% macro postgres__snapshot_get_time() -%}\n {{ current_timestamp() }}::timestamp without time zone\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.2197437, "supported_languages": null}, "macro.dbt_postgres.postgres__current_timestamp_backcompat": {"name": "postgres__current_timestamp_backcompat", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__current_timestamp_backcompat", "macro_sql": "{% macro postgres__current_timestamp_backcompat() %}\n current_timestamp::{{ type_timestamp() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.2199655, "supported_languages": null}, "macro.dbt_postgres.postgres__current_timestamp_in_utc_backcompat": {"name": "postgres__current_timestamp_in_utc_backcompat", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__current_timestamp_in_utc_backcompat", "macro_sql": "{% macro postgres__current_timestamp_in_utc_backcompat() %}\n (current_timestamp at time zone 'utc')::{{ type_timestamp() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.2201848, "supported_languages": null}, "macro.dbt_postgres.postgres__get_relations": {"name": "postgres__get_relations", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations.sql", "original_file_path": "macros/relations.sql", "unique_id": "macro.dbt_postgres.postgres__get_relations", "macro_sql": "{% macro postgres__get_relations() -%}\n\n {#\n -- in pg_depend, objid is the dependent, refobjid is the referenced object\n -- > a pg_depend entry indicates that the referenced object cannot be\n -- > dropped without also dropping the dependent object.\n #}\n\n {%- call statement('relations', fetch_result=True) -%}\n select distinct\n dependent_namespace.nspname as dependent_schema,\n dependent_class.relname as dependent_name,\n referenced_namespace.nspname as referenced_schema,\n referenced_class.relname as referenced_name\n\n -- Query for views: views are entries in pg_class with an entry in pg_rewrite, but we avoid\n -- a seq scan on pg_rewrite by leveraging the fact there is an \"internal\" row in pg_depend for\n -- the view...\n from pg_class as dependent_class\n join pg_namespace as dependent_namespace on dependent_namespace.oid = dependent_class.relnamespace\n join pg_depend as dependent_depend on dependent_depend.refobjid = dependent_class.oid\n and dependent_depend.classid = 'pg_rewrite'::regclass\n and dependent_depend.refclassid = 'pg_class'::regclass\n and dependent_depend.deptype = 'i'\n\n -- ... and via pg_depend (that has a row per column, hence the need for \"distinct\" above, and\n -- making sure to exclude the internal row to avoid a view appearing to depend on itself)...\n join pg_depend as joining_depend on joining_depend.objid = dependent_depend.objid\n and joining_depend.classid = 'pg_rewrite'::regclass\n and joining_depend.refclassid = 'pg_class'::regclass\n and joining_depend.refobjid != dependent_depend.refobjid\n\n -- ... we can find the tables they query from in pg_class, but excluding system tables. Note we\n -- don't need need to exclude _dependent_ system tables, because they only query from other\n -- system tables, and so are automatically excluded by excluding _referenced_ system tables\n join pg_class as referenced_class on referenced_class.oid = joining_depend.refobjid\n join pg_namespace as referenced_namespace on referenced_namespace.oid = referenced_class.relnamespace\n and referenced_namespace.nspname != 'information_schema'\n and referenced_namespace.nspname not like 'pg\\_%'\n\n order by\n dependent_schema, dependent_name, referenced_schema, referenced_name;\n\n {%- endcall -%}\n\n {{ return(load_result('relations').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.2211587, "supported_languages": null}, "macro.dbt_postgres.postgres_get_relations": {"name": "postgres_get_relations", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations.sql", "original_file_path": "macros/relations.sql", "unique_id": "macro.dbt_postgres.postgres_get_relations", "macro_sql": "{% macro postgres_get_relations() %}\n {{ return(postgres__get_relations()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.2214441, "supported_languages": null}, "macro.dbt_postgres.postgres__create_table_as": {"name": "postgres__create_table_as", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__create_table_as", "macro_sql": "{% macro postgres__create_table_as(temporary, relation, sql) -%}\n {%- set unlogged = config.get('unlogged', default=false) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n\n create {% if temporary -%}\n temporary\n {%- elif unlogged -%}\n unlogged\n {%- endif %} table {{ relation }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced %}\n {{ get_assert_columns_equivalent(sql) }}\n {% endif -%}\n {% if contract_config.enforced and (not temporary) -%}\n {{ get_table_columns_and_constraints() }} ;\n insert into {{ relation }} (\n {{ adapter.dispatch('get_column_names', 'dbt')() }}\n )\n {%- set sql = get_select_subquery(sql) %}\n {% else %}\n as\n {% endif %}\n (\n {{ sql }}\n );\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent", "macro.dbt.get_table_columns_and_constraints", "macro.dbt.default__get_column_names", "macro.dbt.get_select_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "temporary", "type": null, "description": ""}, {"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.225891, "supported_languages": null}, "macro.dbt_postgres.postgres__get_create_index_sql": {"name": "postgres__get_create_index_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_create_index_sql", "macro_sql": "{% macro postgres__get_create_index_sql(relation, index_dict) -%}\n {%- set index_config = adapter.parse_index(index_dict) -%}\n {%- set comma_separated_columns = \", \".join(index_config.columns) -%}\n {%- set index_name = index_config.render(relation) -%}\n\n create {% if index_config.unique -%}\n unique\n {%- endif %} index if not exists\n \"{{ index_name }}\"\n on {{ relation }} {% if index_config.type -%}\n using {{ index_config.type }}\n {%- endif %}\n ({{ comma_separated_columns }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "index_dict", "type": null, "description": ""}], "created_at": 1783450492.2268944, "supported_languages": null}, "macro.dbt_postgres.postgres__create_schema": {"name": "postgres__create_schema", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__create_schema", "macro_sql": "{% macro postgres__create_schema(relation) -%}\n {% if relation.database -%}\n {{ adapter.verify_database(relation.database) }}\n {%- endif -%}\n {%- call statement('create_schema') -%}\n create schema if not exists {{ relation.without_identifier().include(database=False) }}\n {%- endcall -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.2275336, "supported_languages": null}, "macro.dbt_postgres.postgres__drop_schema": {"name": "postgres__drop_schema", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__drop_schema", "macro_sql": "{% macro postgres__drop_schema(relation) -%}\n {% if relation.database -%}\n {{ adapter.verify_database(relation.database) }}\n {%- endif -%}\n {%- call statement('drop_schema') -%}\n drop schema if exists {{ relation.without_identifier().include(database=False) }} cascade\n {%- endcall -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.2281485, "supported_languages": null}, "macro.dbt_postgres.postgres__get_columns_in_relation": {"name": "postgres__get_columns_in_relation", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_columns_in_relation", "macro_sql": "{% macro postgres__get_columns_in_relation(relation) -%}\n {% call statement('get_columns_in_relation', fetch_result=True) %}\n select\n column_name,\n data_type,\n character_maximum_length,\n numeric_precision,\n numeric_scale\n\n from {{ relation.information_schema('columns') }}\n where table_name = '{{ relation.identifier }}'\n {% if relation.schema %}\n and table_schema = '{{ relation.schema }}'\n {% endif %}\n order by ordinal_position\n\n {% endcall %}\n {% set table = load_result('get_columns_in_relation').table %}\n {{ return(sql_convert_columns_in_relation(table)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.sql_convert_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.229087, "supported_languages": null}, "macro.dbt_postgres.postgres__list_relations_without_caching": {"name": "postgres__list_relations_without_caching", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__list_relations_without_caching", "macro_sql": "{% macro postgres__list_relations_without_caching(schema_relation) %}\n {% call statement('list_relations_without_caching', fetch_result=True) -%}\n select\n '{{ schema_relation.database }}' as database,\n tablename as name,\n schemaname as schema,\n 'table' as type\n from pg_tables\n where schemaname ilike '{{ schema_relation.schema }}'\n union all\n select\n '{{ schema_relation.database }}' as database,\n viewname as name,\n schemaname as schema,\n 'view' as type\n from pg_views\n where schemaname ilike '{{ schema_relation.schema }}'\n union all\n select\n '{{ schema_relation.database }}' as database,\n matviewname as name,\n schemaname as schema,\n 'materialized_view' as type\n from pg_matviews\n where schemaname ilike '{{ schema_relation.schema }}'\n {% endcall %}\n {{ return(load_result('list_relations_without_caching').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_relation", "type": null, "description": ""}], "created_at": 1783450492.2299578, "supported_languages": null}, "macro.dbt_postgres.postgres__information_schema_name": {"name": "postgres__information_schema_name", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__information_schema_name", "macro_sql": "{% macro postgres__information_schema_name(database) -%}\n {% if database_name -%}\n {{ adapter.verify_database(database_name) }}\n {%- endif -%}\n information_schema\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}], "created_at": 1783450492.230305, "supported_languages": null}, "macro.dbt_postgres.postgres__list_schemas": {"name": "postgres__list_schemas", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__list_schemas", "macro_sql": "{% macro postgres__list_schemas(database) %}\n {% if database -%}\n {{ adapter.verify_database(database) }}\n {%- endif -%}\n {% call statement('list_schemas', fetch_result=True, auto_begin=False) %}\n select distinct nspname from pg_namespace\n {% endcall %}\n {{ return(load_result('list_schemas').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}], "created_at": 1783450492.2309954, "supported_languages": null}, "macro.dbt_postgres.postgres__check_schema_exists": {"name": "postgres__check_schema_exists", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__check_schema_exists", "macro_sql": "{% macro postgres__check_schema_exists(information_schema, schema) -%}\n {% if information_schema.database -%}\n {{ adapter.verify_database(information_schema.database) }}\n {%- endif -%}\n {% call statement('check_schema_exists', fetch_result=True, auto_begin=False) %}\n select count(*) from pg_namespace where nspname = '{{ schema }}'\n {% endcall %}\n {{ return(load_result('check_schema_exists').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "schema", "type": null, "description": ""}], "created_at": 1783450492.231772, "supported_languages": null}, "macro.dbt_postgres.postgres__make_relation_with_suffix": {"name": "postgres__make_relation_with_suffix", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__make_relation_with_suffix", "macro_sql": "{% macro postgres__make_relation_with_suffix(base_relation, suffix, dstring) %}\n {% if dstring %}\n {% set dt = modules.datetime.datetime.now() %}\n {% set dtstring = dt.strftime(\"%H%M%S%f\") %}\n {% set suffix = suffix ~ dtstring %}\n {% endif %}\n {% set suffix_length = suffix|length %}\n {% set relation_max_name_length = base_relation.relation_max_name_length() %}\n {% if suffix_length > relation_max_name_length %}\n {% do exceptions.raise_compiler_error('Relation suffix is too long (' ~ suffix_length ~ ' characters). Maximum length is ' ~ relation_max_name_length ~ ' characters.') %}\n {% endif %}\n {% set identifier = base_relation.identifier[:relation_max_name_length - suffix_length] ~ suffix %}\n\n {{ return(base_relation.incorporate(path={\"identifier\": identifier })) }}\n\n {% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}, {"name": "dstring", "type": null, "description": ""}], "created_at": 1783450492.23338, "supported_languages": null}, "macro.dbt_postgres.postgres__make_intermediate_relation": {"name": "postgres__make_intermediate_relation", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__make_intermediate_relation", "macro_sql": "{% macro postgres__make_intermediate_relation(base_relation, suffix) %}\n {{ return(postgres__make_relation_with_suffix(base_relation, suffix, dstring=False)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_relation_with_suffix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1783450492.2337928, "supported_languages": null}, "macro.dbt_postgres.postgres__make_temp_relation": {"name": "postgres__make_temp_relation", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__make_temp_relation", "macro_sql": "{% macro postgres__make_temp_relation(base_relation, suffix) %}\n {% set temp_relation = postgres__make_relation_with_suffix(base_relation, suffix, dstring=True) %}\n {{ return(temp_relation.incorporate(path={\"schema\": none,\n \"database\": none})) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_relation_with_suffix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1783450492.2344255, "supported_languages": null}, "macro.dbt_postgres.postgres__make_backup_relation": {"name": "postgres__make_backup_relation", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__make_backup_relation", "macro_sql": "{% macro postgres__make_backup_relation(base_relation, backup_relation_type, suffix) %}\n {% set backup_relation = postgres__make_relation_with_suffix(base_relation, suffix, dstring=False) %}\n {{ return(backup_relation.incorporate(type=backup_relation_type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_relation_with_suffix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "backup_relation_type", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1783450492.2349575, "supported_languages": null}, "macro.dbt_postgres.postgres_escape_comment": {"name": "postgres_escape_comment", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres_escape_comment", "macro_sql": "{% macro postgres_escape_comment(comment) -%}\n {% if comment is not string %}\n {% do exceptions.raise_compiler_error('cannot escape a non-string: ' ~ comment) %}\n {% endif %}\n {%- set magic = '$dbt_comment_literal_block$' -%}\n {%- if magic in comment -%}\n {%- do exceptions.raise_compiler_error('The string ' ~ magic ~ ' is not allowed in comments.') -%}\n {%- endif -%}\n {{ magic }}{{ comment }}{{ magic }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "comment", "type": null, "description": ""}], "created_at": 1783450492.235812, "supported_languages": null}, "macro.dbt_postgres.postgres__alter_relation_comment": {"name": "postgres__alter_relation_comment", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__alter_relation_comment", "macro_sql": "{% macro postgres__alter_relation_comment(relation, comment) %}\n {% set escaped_comment = postgres_escape_comment(comment) %}\n {% if relation.type == 'materialized_view' -%}\n {% set relation_type = \"materialized view\" %}\n {%- else -%}\n {%- set relation_type = relation.type -%}\n {%- endif -%}\n comment on {{ relation_type }} {{ relation }} is {{ escaped_comment }};\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres_escape_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "comment", "type": null, "description": ""}], "created_at": 1783450492.2365828, "supported_languages": null}, "macro.dbt_postgres.postgres__alter_column_comment": {"name": "postgres__alter_column_comment", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__alter_column_comment", "macro_sql": "{% macro postgres__alter_column_comment(relation, column_dict) %}\n {% set existing_columns = adapter.get_columns_in_relation(relation) | map(attribute=\"name\") | list %}\n {% for column_name in column_dict if (column_name in existing_columns) %}\n {% set comment = column_dict[column_name]['description'] %}\n {% set escaped_comment = postgres_escape_comment(comment) %}\n comment on column {{ relation }}.{{ adapter.quote(column_name) if column_dict[column_name]['quote'] else column_name }} is {{ escaped_comment }};\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres_escape_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "column_dict", "type": null, "description": ""}], "created_at": 1783450492.2378588, "supported_languages": null}, "macro.dbt_postgres.postgres__get_show_grant_sql": {"name": "postgres__get_show_grant_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_show_grant_sql", "macro_sql": "\n\n{%- macro postgres__get_show_grant_sql(relation) -%}\n select grantee, privilege_type\n from {{ relation.information_schema('role_table_grants') }}\n where grantor = current_role\n and grantee != current_role\n and table_schema = '{{ relation.schema }}'\n and table_name = '{{ relation.identifier }}'\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.238264, "supported_languages": null}, "macro.dbt_postgres.postgres__copy_grants": {"name": "postgres__copy_grants", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__copy_grants", "macro_sql": "{% macro postgres__copy_grants() %}\n {{ return(False) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.2385292, "supported_languages": null}, "macro.dbt_postgres.postgres__get_show_indexes_sql": {"name": "postgres__get_show_indexes_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_show_indexes_sql", "macro_sql": "{% macro postgres__get_show_indexes_sql(relation) %}\n select\n i.relname as name,\n m.amname as method,\n ix.indisunique as \"unique\",\n array_to_string(array_agg(a.attname), ',') as column_names\n from pg_index ix\n join pg_class i\n on i.oid = ix.indexrelid\n join pg_am m\n on m.oid=i.relam\n join pg_class t\n on t.oid = ix.indrelid\n join pg_namespace n\n on n.oid = t.relnamespace\n join pg_attribute a\n on a.attrelid = t.oid\n and a.attnum = ANY(ix.indkey)\n where t.relname = '{{ relation.identifier }}'\n and n.nspname = '{{ relation.schema }}'\n and t.relkind in ('r', 'm')\n group by 1, 2, 3\n order by 1, 2, 3\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.2388783, "supported_languages": null}, "macro.dbt_postgres.postgres__get_drop_index_sql": {"name": "postgres__get_drop_index_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_drop_index_sql", "macro_sql": "\n\n\n{%- macro postgres__get_drop_index_sql(relation, index_name) -%}\n drop index if exists \"{{ relation.schema }}\".\"{{ index_name }}\"\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "index_name", "type": null, "description": ""}], "created_at": 1783450492.2391684, "supported_languages": null}, "macro.dbt_postgres.postgres__listagg": {"name": "postgres__listagg", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "unique_id": "macro.dbt_postgres.postgres__listagg", "macro_sql": "{% macro postgres__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n {% if limit_num -%}\n array_to_string(\n (array_agg(\n {{ measure }}\n {% if order_by_clause -%}\n {{ order_by_clause }}\n {%- endif %}\n ))[1:{{ limit_num }}],\n {{ delimiter_text }}\n )\n {%- else %}\n string_agg(\n {{ measure }},\n {{ delimiter_text }}\n {% if order_by_clause -%}\n {{ order_by_clause }}\n {%- endif %}\n )\n {%- endif %}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "measure", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "order_by_clause", "type": null, "description": ""}, {"name": "limit_num", "type": null, "description": ""}], "created_at": 1783450492.240219, "supported_languages": null}, "macro.dbt_postgres.postgres__any_value": {"name": "postgres__any_value", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "unique_id": "macro.dbt_postgres.postgres__any_value", "macro_sql": "{% macro postgres__any_value(expression) -%}\n\n min({{ expression }})\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1783450492.2405465, "supported_languages": null}, "macro.dbt_postgres.postgres__last_day": {"name": "postgres__last_day", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt_postgres.postgres__last_day", "macro_sql": "{% macro postgres__last_day(date, datepart) -%}\n\n {%- if datepart == 'quarter' -%}\n -- postgres dateadd does not support quarter interval.\n cast(\n {{dbt.dateadd('day', '-1',\n dbt.dateadd('month', '3', dbt.date_trunc(datepart, date))\n )}}\n as date)\n {%- else -%}\n {{dbt.default_last_day(date, datepart)}}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.date_trunc", "macro.dbt.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783450492.2414963, "supported_languages": null}, "macro.dbt_postgres.postgres__dateadd": {"name": "postgres__dateadd", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "unique_id": "macro.dbt_postgres.postgres__dateadd", "macro_sql": "{% macro postgres__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n {{ from_date_or_timestamp }} + ((interval '1 {{ datepart }}') * ({{ interval }}))\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_date_or_timestamp", "type": null, "description": ""}], "created_at": 1783450492.241927, "supported_languages": null}, "macro.dbt_postgres.postgres__datediff": {"name": "postgres__datediff", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "unique_id": "macro.dbt_postgres.postgres__datediff", "macro_sql": "{% macro postgres__datediff(first_date, second_date, datepart) -%}\n\n {% if datepart == 'year' %}\n (date_part('year', ({{second_date}})::date) - date_part('year', ({{first_date}})::date))\n {% elif datepart == 'quarter' %}\n ({{ datediff(first_date, second_date, 'year') }} * 4 + date_part('quarter', ({{second_date}})::date) - date_part('quarter', ({{first_date}})::date))\n {% elif datepart == 'month' %}\n ({{ datediff(first_date, second_date, 'year') }} * 12 + date_part('month', ({{second_date}})::date) - date_part('month', ({{first_date}})::date))\n {% elif datepart == 'day' %}\n (({{second_date}})::date - ({{first_date}})::date)\n {% elif datepart == 'week' %}\n ({{ datediff(first_date, second_date, 'day') }} / 7 + case\n when date_part('dow', ({{first_date}})::timestamp) <= date_part('dow', ({{second_date}})::timestamp) then\n case when {{first_date}} <= {{second_date}} then 0 else -1 end\n else\n case when {{first_date}} <= {{second_date}} then 1 else 0 end\n end)\n {% elif datepart == 'hour' %}\n ({{ datediff(first_date, second_date, 'day') }} * 24 + date_part('hour', ({{second_date}})::timestamp) - date_part('hour', ({{first_date}})::timestamp))\n {% elif datepart == 'minute' %}\n ({{ datediff(first_date, second_date, 'hour') }} * 60 + date_part('minute', ({{second_date}})::timestamp) - date_part('minute', ({{first_date}})::timestamp))\n {% elif datepart == 'second' %}\n ({{ datediff(first_date, second_date, 'minute') }} * 60 + floor(date_part('second', ({{second_date}})::timestamp)) - floor(date_part('second', ({{first_date}})::timestamp)))\n {% elif datepart == 'millisecond' %}\n ({{ datediff(first_date, second_date, 'minute') }} * 60000 + floor(date_part('millisecond', ({{second_date}})::timestamp)) - floor(date_part('millisecond', ({{first_date}})::timestamp)))\n {% elif datepart == 'microsecond' %}\n ({{ datediff(first_date, second_date, 'minute') }} * 60000000 + floor(date_part('microsecond', ({{second_date}})::timestamp)) - floor(date_part('microsecond', ({{first_date}})::timestamp)))\n {% else %}\n {{ exceptions.raise_compiler_error(\"Unsupported datepart for macro datediff in postgres: {!r}\".format(datepart)) }}\n {% endif %}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783450492.2459733, "supported_languages": null}, "macro.dbt_postgres.postgres__split_part": {"name": "postgres__split_part", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt_postgres.postgres__split_part", "macro_sql": "{% macro postgres__split_part(string_text, delimiter_text, part_number) %}\n\n {% if part_number >= 0 %}\n {{ dbt.default__split_part(string_text, delimiter_text, part_number) }}\n {% else %}\n {{ dbt._split_part_negative(string_text, delimiter_text, part_number) }}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__split_part", "macro.dbt._split_part_negative"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string_text", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "part_number", "type": null, "description": ""}], "created_at": 1783450492.2468088, "supported_languages": null}, "macro.dbt_postgres.postgres__get_incremental_default_sql": {"name": "postgres__get_incremental_default_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/materializations/incremental_strategies.sql", "original_file_path": "macros/materializations/incremental_strategies.sql", "unique_id": "macro.dbt_postgres.postgres__get_incremental_default_sql", "macro_sql": "{% macro postgres__get_incremental_default_sql(arg_dict) %}\n\n {% if arg_dict[\"unique_key\"] %}\n {% do return(get_incremental_delete_insert_sql(arg_dict)) %}\n {% else %}\n {% do return(get_incremental_append_sql(arg_dict)) %}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_incremental_delete_insert_sql", "macro.dbt.get_incremental_append_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1783450492.2476816, "supported_languages": null}, "macro.dbt_postgres.postgres__get_incremental_microbatch_sql": {"name": "postgres__get_incremental_microbatch_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/materializations/incremental_strategies.sql", "original_file_path": "macros/materializations/incremental_strategies.sql", "unique_id": "macro.dbt_postgres.postgres__get_incremental_microbatch_sql", "macro_sql": "{% macro postgres__get_incremental_microbatch_sql(arg_dict) %}\n\n {% if arg_dict[\"unique_key\"] %}\n {% do return(adapter.dispatch('get_incremental_merge_sql', 'dbt')(arg_dict)) %}\n {% else %}\n {{ exceptions.raise_compiler_error(\"dbt-postgres 'microbatch' requires a `unique_key` config\") }}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_incremental_merge_sql", "macro.dbt.default__get_incremental_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1783450492.248322, "supported_languages": null}, "macro.dbt_postgres.postgres__snapshot_merge_sql": {"name": "postgres__snapshot_merge_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/materializations/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshot_merge.sql", "unique_id": "macro.dbt_postgres.postgres__snapshot_merge_sql", "macro_sql": "{% macro postgres__snapshot_merge_sql(target, source, insert_cols) -%}\n {%- set insert_cols_csv = insert_cols | join(', ') -%}\n\n {%- set columns = config.get(\"snapshot_table_column_names\") or get_snapshot_table_column_names() -%}\n\n update {{ target }}\n set {{ columns.dbt_valid_to }} = DBT_INTERNAL_SOURCE.{{ columns.dbt_valid_to }}\n from {{ source }} as DBT_INTERNAL_SOURCE\n where DBT_INTERNAL_SOURCE.{{ columns.dbt_scd_id }}::text = {{ target }}.{{ columns.dbt_scd_id }}::text\n and DBT_INTERNAL_SOURCE.dbt_change_type::text in ('update'::text, 'delete'::text)\n {% if config.get(\"dbt_valid_to_current\") %}\n and ({{ target }}.{{ columns.dbt_valid_to }} = {{ config.get('dbt_valid_to_current') }} or {{ target }}.{{ columns.dbt_valid_to }} is null);\n {% else %}\n and {{ target }}.{{ columns.dbt_valid_to }} is null;\n {% endif %}\n\n\n insert into {{ target }} ({{ insert_cols_csv }})\n select {% for column in insert_cols -%}\n DBT_INTERNAL_SOURCE.{{ column }} {%- if not loop.last %}, {%- endif %}\n {%- endfor %}\n from {{ source }} as DBT_INTERNAL_SOURCE\n where DBT_INTERNAL_SOURCE.dbt_change_type::text = 'insert'::text;\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_snapshot_table_column_names"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "insert_cols", "type": null, "description": ""}], "created_at": 1783450492.2505314, "supported_languages": null}, "macro.dbt_postgres.postgres__formatted_scalar_function_args_sql": {"name": "postgres__formatted_scalar_function_args_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt_postgres.postgres__formatted_scalar_function_args_sql", "macro_sql": "{% macro postgres__formatted_scalar_function_args_sql() %}\n {% set args = [] %}\n {% for arg in model.arguments -%}\n {% set default_value = arg.get('default_value', none) %}\n {% if default_value != none %}\n {%- do args.append(arg.name ~ ' ' ~ arg.data_type ~ ' DEFAULT ' ~ default_value) -%}\n {% else %}\n {%- do args.append(arg.name ~ ' ' ~ arg.data_type) -%}\n {% endif %}\n {%- endfor %}\n {{ args | join(', ') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.2519045, "supported_languages": null}, "macro.dbt_postgres.postgres__describe_materialized_view": {"name": "postgres__describe_materialized_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/describe.sql", "original_file_path": "macros/relations/materialized_view/describe.sql", "unique_id": "macro.dbt_postgres.postgres__describe_materialized_view", "macro_sql": "{% macro postgres__describe_materialized_view(relation) %}\n -- for now just get the indexes, we don't need the name or the query yet\n {% set _indexes = run_query(get_show_indexes_sql(relation)) %}\n {% do return({'indexes': _indexes}) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.get_show_indexes_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.2525063, "supported_languages": null}, "macro.dbt_postgres.postgres__drop_materialized_view": {"name": "postgres__drop_materialized_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/drop.sql", "original_file_path": "macros/relations/materialized_view/drop.sql", "unique_id": "macro.dbt_postgres.postgres__drop_materialized_view", "macro_sql": "{% macro postgres__drop_materialized_view(relation) -%}\n drop materialized view if exists {{ relation }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.2527955, "supported_languages": null}, "macro.dbt_postgres.postgres__refresh_materialized_view": {"name": "postgres__refresh_materialized_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/refresh.sql", "original_file_path": "macros/relations/materialized_view/refresh.sql", "unique_id": "macro.dbt_postgres.postgres__refresh_materialized_view", "macro_sql": "{% macro postgres__refresh_materialized_view(relation) %}\n refresh materialized view {{ relation }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.2530768, "supported_languages": null}, "macro.dbt_postgres.postgres__get_rename_materialized_view_sql": {"name": "postgres__get_rename_materialized_view_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/rename.sql", "original_file_path": "macros/relations/materialized_view/rename.sql", "unique_id": "macro.dbt_postgres.postgres__get_rename_materialized_view_sql", "macro_sql": "{% macro postgres__get_rename_materialized_view_sql(relation, new_name) %}\n alter materialized view {{ relation }} rename to {{ new_name }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1783450492.2535665, "supported_languages": null}, "macro.dbt_postgres.postgres__get_create_materialized_view_as_sql": {"name": "postgres__get_create_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/create.sql", "original_file_path": "macros/relations/materialized_view/create.sql", "unique_id": "macro.dbt_postgres.postgres__get_create_materialized_view_as_sql", "macro_sql": "{% macro postgres__get_create_materialized_view_as_sql(relation, sql) %}\n create materialized view if not exists {{ relation }} as {{ sql }};\n\n {% for _index_dict in config.get('indexes', []) -%}\n {{- get_create_index_sql(relation, _index_dict) -}}{{ ';' if not loop.last else \"\" }}\n {%- endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.2543876, "supported_languages": null}, "macro.dbt_postgres.postgres__get_alter_materialized_view_as_sql": {"name": "postgres__get_alter_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt_postgres.postgres__get_alter_materialized_view_as_sql", "macro_sql": "{% macro postgres__get_alter_materialized_view_as_sql(\n relation,\n configuration_changes,\n sql,\n existing_relation,\n backup_relation,\n intermediate_relation\n) %}\n\n -- apply a full refresh immediately if needed\n {% if configuration_changes.requires_full_refresh %}\n\n {{ get_replace_sql(existing_relation, relation, sql) }}\n\n -- otherwise apply individual changes as needed\n {% else %}\n\n {{ postgres__update_indexes_on_materialized_view(relation, configuration_changes.indexes) }}\n\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_replace_sql", "macro.dbt_postgres.postgres__update_indexes_on_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "configuration_changes", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}, {"name": "existing_relation", "type": null, "description": ""}, {"name": "backup_relation", "type": null, "description": ""}, {"name": "intermediate_relation", "type": null, "description": ""}], "created_at": 1783450492.2554758, "supported_languages": null}, "macro.dbt_postgres.postgres__update_indexes_on_materialized_view": {"name": "postgres__update_indexes_on_materialized_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt_postgres.postgres__update_indexes_on_materialized_view", "macro_sql": "\n\n\n{%- macro postgres__update_indexes_on_materialized_view(relation, index_changes) -%}\n {{- log(\"Applying UPDATE INDEXES to: \" ~ relation) -}}\n\n {%- for _index_change in index_changes -%}\n {%- set _index = _index_change.context -%}\n\n {%- if _index_change.action == \"drop\" -%}\n\n {{ postgres__get_drop_index_sql(relation, _index.name) }}\n\n {%- elif _index_change.action == \"create\" -%}\n\n {{ postgres__get_create_index_sql(relation, _index.as_node_config) }}\n\n {%- endif -%}\n\t{{ ';' if not loop.last else \"\" }}\n\n {%- endfor -%}\n\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_drop_index_sql", "macro.dbt_postgres.postgres__get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "index_changes", "type": null, "description": ""}], "created_at": 1783450492.2565424, "supported_languages": null}, "macro.dbt_postgres.postgres__get_materialized_view_configuration_changes": {"name": "postgres__get_materialized_view_configuration_changes", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt_postgres.postgres__get_materialized_view_configuration_changes", "macro_sql": "{% macro postgres__get_materialized_view_configuration_changes(existing_relation, new_config) %}\n {% set _existing_materialized_view = postgres__describe_materialized_view(existing_relation) %}\n {% set _configuration_changes = existing_relation.get_materialized_view_config_change_collection(_existing_materialized_view, new_config.model) %}\n {% do return(_configuration_changes) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__describe_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "existing_relation", "type": null, "description": ""}, {"name": "new_config", "type": null, "description": ""}], "created_at": 1783450492.2571228, "supported_languages": null}, "macro.dbt_postgres.postgres__get_replace_view_sql": {"name": "postgres__get_replace_view_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt_postgres.postgres__get_replace_view_sql", "macro_sql": "{% macro postgres__get_replace_view_sql(relation, sql) -%}\n\n {%- set sql_header = config.get('sql_header', none) -%}\n {{ sql_header if sql_header is not none }}\n\n create or replace view {{ relation }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced %}\n {{ get_assert_columns_equivalent(sql) }}\n {%- endif %}\n as (\n {{ sql }}\n );\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.2581463, "supported_languages": null}, "macro.dbt_postgres.postgres__drop_view": {"name": "postgres__drop_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/view/drop.sql", "original_file_path": "macros/relations/view/drop.sql", "unique_id": "macro.dbt_postgres.postgres__drop_view", "macro_sql": "{% macro postgres__drop_view(relation) -%}\n drop view if exists {{ relation }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.2584584, "supported_languages": null}, "macro.dbt_postgres.postgres__get_rename_view_sql": {"name": "postgres__get_rename_view_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/view/rename.sql", "original_file_path": "macros/relations/view/rename.sql", "unique_id": "macro.dbt_postgres.postgres__get_rename_view_sql", "macro_sql": "{% macro postgres__get_rename_view_sql(relation, new_name) %}\n alter view {{ relation }} rename to {{ new_name }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1783450492.2588422, "supported_languages": null}, "macro.dbt_postgres.postgres__get_replace_table_sql": {"name": "postgres__get_replace_table_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/table/replace.sql", "original_file_path": "macros/relations/table/replace.sql", "unique_id": "macro.dbt_postgres.postgres__get_replace_table_sql", "macro_sql": "{% macro postgres__get_replace_table_sql(relation, sql) -%}\n\n {%- set sql_header = config.get('sql_header', none) -%}\n {{ sql_header if sql_header is not none }}\n\n create or replace table {{ relation }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced %}\n {{ get_assert_columns_equivalent(sql) }}\n {{ get_table_columns_and_constraints() }}\n {%- set sql = get_select_subquery(sql) %}\n {% endif %}\n as (\n {{ sql }}\n );\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent", "macro.dbt.get_table_columns_and_constraints", "macro.dbt.get_select_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.2600768, "supported_languages": null}, "macro.dbt_postgres.postgres__drop_table": {"name": "postgres__drop_table", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/table/drop.sql", "original_file_path": "macros/relations/table/drop.sql", "unique_id": "macro.dbt_postgres.postgres__drop_table", "macro_sql": "{% macro postgres__drop_table(relation) -%}\n drop table if exists {{ relation }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.2603705, "supported_languages": null}, "macro.dbt_postgres.postgres__get_rename_table_sql": {"name": "postgres__get_rename_table_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/table/rename.sql", "original_file_path": "macros/relations/table/rename.sql", "unique_id": "macro.dbt_postgres.postgres__get_rename_table_sql", "macro_sql": "{% macro postgres__get_rename_table_sql(relation, new_name) %}\n alter table {{ relation }} rename to {{ new_name }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1783450492.2607381, "supported_languages": null}, "macro.dbt.type_string": {"name": "type_string", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_string", "macro_sql": "\n\n{%- macro type_string() -%}\n {{ return(adapter.dispatch('type_string', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.262003, "supported_languages": null}, "macro.dbt.default__type_string": {"name": "default__type_string", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_string", "macro_sql": "{% macro default__type_string() %}\n {{ return(api.Column.translate_type(\"string\")) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.2623131, "supported_languages": null}, "macro.dbt.type_timestamp": {"name": "type_timestamp", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_timestamp", "macro_sql": "\n\n{%- macro type_timestamp() -%}\n {{ return(adapter.dispatch('type_timestamp', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.2626522, "supported_languages": null}, "macro.dbt.default__type_timestamp": {"name": "default__type_timestamp", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_timestamp", "macro_sql": "{% macro default__type_timestamp() %}\n {{ return(api.Column.translate_type(\"timestamp\")) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.2629511, "supported_languages": null}, "macro.dbt.type_float": {"name": "type_float", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_float", "macro_sql": "\n\n{%- macro type_float() -%}\n {{ return(adapter.dispatch('type_float', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.2633657, "supported_languages": null}, "macro.dbt.default__type_float": {"name": "default__type_float", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_float", "macro_sql": "{% macro default__type_float() %}\n {{ return(api.Column.translate_type(\"float\")) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.2636921, "supported_languages": null}, "macro.dbt.type_numeric": {"name": "type_numeric", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_numeric", "macro_sql": "\n\n{%- macro type_numeric() -%}\n {{ return(adapter.dispatch('type_numeric', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.264011, "supported_languages": null}, "macro.dbt.default__type_numeric": {"name": "default__type_numeric", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_numeric", "macro_sql": "{% macro default__type_numeric() %}\n {{ return(api.Column.numeric_type(\"numeric\", 28, 6)) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.2643604, "supported_languages": null}, "macro.dbt.type_bigint": {"name": "type_bigint", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_bigint", "macro_sql": "\n\n{%- macro type_bigint() -%}\n {{ return(adapter.dispatch('type_bigint', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.2647061, "supported_languages": null}, "macro.dbt.default__type_bigint": {"name": "default__type_bigint", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_bigint", "macro_sql": "{% macro default__type_bigint() %}\n {{ return(api.Column.translate_type(\"bigint\")) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.2650077, "supported_languages": null}, "macro.dbt.type_int": {"name": "type_int", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_int", "macro_sql": "\n\n{%- macro type_int() -%}\n {{ return(adapter.dispatch('type_int', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.265329, "supported_languages": null}, "macro.dbt.default__type_int": {"name": "default__type_int", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_int", "macro_sql": "{%- macro default__type_int() -%}\n {{ return(api.Column.translate_type(\"integer\")) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.2656376, "supported_languages": null}, "macro.dbt.type_boolean": {"name": "type_boolean", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_boolean", "macro_sql": "\n\n{%- macro type_boolean() -%}\n {{ return(adapter.dispatch('type_boolean', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_boolean"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.2659545, "supported_languages": null}, "macro.dbt.default__type_boolean": {"name": "default__type_boolean", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_boolean", "macro_sql": "{%- macro default__type_boolean() -%}\n {{ return(api.Column.translate_type(\"boolean\")) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.2662363, "supported_languages": null}, "macro.dbt.string_literal": {"name": "string_literal", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/literal.sql", "original_file_path": "macros/utils/literal.sql", "unique_id": "macro.dbt.string_literal", "macro_sql": "{%- macro string_literal(value) -%}\n {{ return(adapter.dispatch('string_literal', 'dbt') (value)) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__string_literal"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "value", "type": null, "description": ""}], "created_at": 1783450492.266735, "supported_languages": null}, "macro.dbt.default__string_literal": {"name": "default__string_literal", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/literal.sql", "original_file_path": "macros/utils/literal.sql", "unique_id": "macro.dbt.default__string_literal", "macro_sql": "{% macro default__string_literal(value) -%}\n '{{ value }}'\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "value", "type": null, "description": ""}], "created_at": 1783450492.266953, "supported_languages": null}, "macro.dbt.safe_cast": {"name": "safe_cast", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/safe_cast.sql", "original_file_path": "macros/utils/safe_cast.sql", "unique_id": "macro.dbt.safe_cast", "macro_sql": "{% macro safe_cast(field, type) %}\n {{ return(adapter.dispatch('safe_cast', 'dbt') (field, type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1783450492.2675266, "supported_languages": null}, "macro.dbt.default__safe_cast": {"name": "default__safe_cast", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/safe_cast.sql", "original_file_path": "macros/utils/safe_cast.sql", "unique_id": "macro.dbt.default__safe_cast", "macro_sql": "{% macro default__safe_cast(field, type) %}\n {# most databases don't support this function yet\n so we just need to use cast #}\n cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1783450492.2678158, "supported_languages": null}, "macro.dbt.cast": {"name": "cast", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/cast.sql", "original_file_path": "macros/utils/cast.sql", "unique_id": "macro.dbt.cast", "macro_sql": "{% macro cast(field, type) %}\n {{ return(adapter.dispatch('cast', 'dbt') (field, type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1783450492.268337, "supported_languages": null}, "macro.dbt.default__cast": {"name": "default__cast", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/cast.sql", "original_file_path": "macros/utils/cast.sql", "unique_id": "macro.dbt.default__cast", "macro_sql": "{% macro default__cast(field, type) %}\n cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1783450492.268631, "supported_languages": null}, "macro.dbt.get_powers_of_two": {"name": "get_powers_of_two", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/generate_series.sql", "original_file_path": "macros/utils/generate_series.sql", "unique_id": "macro.dbt.get_powers_of_two", "macro_sql": "{% macro get_powers_of_two(upper_bound) %}\n {{ return(adapter.dispatch('get_powers_of_two', 'dbt')(upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1783450492.2694602, "supported_languages": null}, "macro.dbt.default__get_powers_of_two": {"name": "default__get_powers_of_two", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/generate_series.sql", "original_file_path": "macros/utils/generate_series.sql", "unique_id": "macro.dbt.default__get_powers_of_two", "macro_sql": "{% macro default__get_powers_of_two(upper_bound) %}\n\n {% if upper_bound <= 0 %}\n {{ exceptions.raise_compiler_error(\"upper bound must be positive\") }}\n {% endif %}\n\n {% for _ in range(1, 100) %}\n {% if upper_bound <= 2 ** loop.index %}{{ return(loop.index) }}{% endif %}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1783450492.270365, "supported_languages": null}, "macro.dbt.generate_series": {"name": "generate_series", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/generate_series.sql", "original_file_path": "macros/utils/generate_series.sql", "unique_id": "macro.dbt.generate_series", "macro_sql": "{% macro generate_series(upper_bound) %}\n {{ return(adapter.dispatch('generate_series', 'dbt')(upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_series"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1783450492.270763, "supported_languages": null}, "macro.dbt.default__generate_series": {"name": "default__generate_series", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/generate_series.sql", "original_file_path": "macros/utils/generate_series.sql", "unique_id": "macro.dbt.default__generate_series", "macro_sql": "{% macro default__generate_series(upper_bound) %}\n\n {% set n = dbt.get_powers_of_two(upper_bound) %}\n\n with p as (\n select 0 as generated_number union all select 1\n ), unioned as (\n\n select\n\n {% for i in range(n) %}\n p{{i}}.generated_number * power(2, {{i}})\n {% if not loop.last %} + {% endif %}\n {% endfor %}\n + 1\n as generated_number\n\n from\n\n {% for i in range(n) %}\n p as p{{i}}\n {% if not loop.last %} cross join {% endif %}\n {% endfor %}\n\n )\n\n select *\n from unioned\n where generated_number <= {{upper_bound}}\n order by generated_number\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1783450492.271793, "supported_languages": null}, "macro.dbt.date_trunc": {"name": "date_trunc", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_trunc.sql", "original_file_path": "macros/utils/date_trunc.sql", "unique_id": "macro.dbt.date_trunc", "macro_sql": "{% macro date_trunc(datepart, date) -%}\n {{ return(adapter.dispatch('date_trunc', 'dbt') (datepart, date)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "date", "type": null, "description": ""}], "created_at": 1783450492.272332, "supported_languages": null}, "macro.dbt.default__date_trunc": {"name": "default__date_trunc", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_trunc.sql", "original_file_path": "macros/utils/date_trunc.sql", "unique_id": "macro.dbt.default__date_trunc", "macro_sql": "{% macro default__date_trunc(datepart, date) -%}\n date_trunc('{{datepart}}', {{date}})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "date", "type": null, "description": ""}], "created_at": 1783450492.272622, "supported_languages": null}, "macro.dbt.listagg": {"name": "listagg", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "unique_id": "macro.dbt.listagg", "macro_sql": "{% macro listagg(measure, delimiter_text=\"','\", order_by_clause=none, limit_num=none) -%}\n {{ return(adapter.dispatch('listagg', 'dbt') (measure, delimiter_text, order_by_clause, limit_num)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__listagg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "measure", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "order_by_clause", "type": null, "description": ""}, {"name": "limit_num", "type": null, "description": ""}], "created_at": 1783450492.2734709, "supported_languages": null}, "macro.dbt.default__listagg": {"name": "default__listagg", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "unique_id": "macro.dbt.default__listagg", "macro_sql": "{% macro default__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n {% if limit_num -%}\n array_to_string(\n array_slice(\n array_agg(\n {{ measure }}\n ){% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n ,0\n ,{{ limit_num }}\n ),\n {{ delimiter_text }}\n )\n {%- else %}\n listagg(\n {{ measure }},\n {{ delimiter_text }}\n )\n {% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n {%- endif %}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "measure", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "order_by_clause", "type": null, "description": ""}, {"name": "limit_num", "type": null, "description": ""}], "created_at": 1783450492.2742953, "supported_languages": null}, "macro.dbt.replace": {"name": "replace", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/replace.sql", "original_file_path": "macros/utils/replace.sql", "unique_id": "macro.dbt.replace", "macro_sql": "{% macro replace(field, old_chars, new_chars) -%}\n {{ return(adapter.dispatch('replace', 'dbt') (field, old_chars, new_chars)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__replace"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "old_chars", "type": null, "description": ""}, {"name": "new_chars", "type": null, "description": ""}], "created_at": 1783450492.2749088, "supported_languages": null}, "macro.dbt.default__replace": {"name": "default__replace", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/replace.sql", "original_file_path": "macros/utils/replace.sql", "unique_id": "macro.dbt.default__replace", "macro_sql": "{% macro default__replace(field, old_chars, new_chars) %}\n\n replace(\n {{ field }},\n {{ old_chars }},\n {{ new_chars }}\n )\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "old_chars", "type": null, "description": ""}, {"name": "new_chars", "type": null, "description": ""}], "created_at": 1783450492.2752516, "supported_languages": null}, "macro.dbt.any_value": {"name": "any_value", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "unique_id": "macro.dbt.any_value", "macro_sql": "{% macro any_value(expression) -%}\n {{ return(adapter.dispatch('any_value', 'dbt') (expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__any_value"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1783450492.2757552, "supported_languages": null}, "macro.dbt.default__any_value": {"name": "default__any_value", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "unique_id": "macro.dbt.default__any_value", "macro_sql": "{% macro default__any_value(expression) -%}\n\n any_value({{ expression }})\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1783450492.275975, "supported_languages": null}, "macro.dbt.except": {"name": "except", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/except.sql", "original_file_path": "macros/utils/except.sql", "unique_id": "macro.dbt.except", "macro_sql": "{% macro except() %}\n {{ return(adapter.dispatch('except', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.2764254, "supported_languages": null}, "macro.dbt.default__except": {"name": "default__except", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/except.sql", "original_file_path": "macros/utils/except.sql", "unique_id": "macro.dbt.default__except", "macro_sql": "{% macro default__except() %}\n\n except\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.2765942, "supported_languages": null}, "macro.dbt.last_day": {"name": "last_day", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt.last_day", "macro_sql": "{% macro last_day(date, datepart) %}\n {{ return(adapter.dispatch('last_day', 'dbt') (date, datepart)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783450492.2771907, "supported_languages": null}, "macro.dbt.default_last_day": {"name": "default_last_day", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt.default_last_day", "macro_sql": "\n\n{%- macro default_last_day(date, datepart) -%}\n cast(\n {{dbt.dateadd('day', '-1',\n dbt.dateadd(datepart, '1', dbt.date_trunc(datepart, date))\n )}}\n as date)\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783450492.2777376, "supported_languages": null}, "macro.dbt.default__last_day": {"name": "default__last_day", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt.default__last_day", "macro_sql": "{% macro default__last_day(date, datepart) -%}\n {{dbt.default_last_day(date, datepart)}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783450492.2780368, "supported_languages": null}, "macro.dbt.date": {"name": "date", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date.sql", "original_file_path": "macros/utils/date.sql", "unique_id": "macro.dbt.date", "macro_sql": "{% macro date(year, month, day) %}\n {{ return(adapter.dispatch('date', 'dbt') (year, month, day)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__date"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "year", "type": null, "description": ""}, {"name": "month", "type": null, "description": ""}, {"name": "day", "type": null, "description": ""}], "created_at": 1783450492.278778, "supported_languages": null}, "macro.dbt.default__date": {"name": "default__date", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date.sql", "original_file_path": "macros/utils/date.sql", "unique_id": "macro.dbt.default__date", "macro_sql": "{% macro default__date(year, month, day) -%}\n {%- set dt = modules.datetime.date(year, month, day) -%}\n {%- set iso_8601_formatted_date = dt.strftime('%Y-%m-%d') -%}\n to_date('{{ iso_8601_formatted_date }}', 'YYYY-MM-DD')\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "year", "type": null, "description": ""}, {"name": "month", "type": null, "description": ""}, {"name": "day", "type": null, "description": ""}], "created_at": 1783450492.2793365, "supported_languages": null}, "macro.dbt.array_concat": {"name": "array_concat", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_concat.sql", "original_file_path": "macros/utils/array_concat.sql", "unique_id": "macro.dbt.array_concat", "macro_sql": "{% macro array_concat(array_1, array_2) -%}\n {{ return(adapter.dispatch('array_concat', 'dbt')(array_1, array_2)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__array_concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "array_1", "type": null, "description": ""}, {"name": "array_2", "type": null, "description": ""}], "created_at": 1783450492.2798822, "supported_languages": null}, "macro.dbt.default__array_concat": {"name": "default__array_concat", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_concat.sql", "original_file_path": "macros/utils/array_concat.sql", "unique_id": "macro.dbt.default__array_concat", "macro_sql": "{% macro default__array_concat(array_1, array_2) -%}\n array_cat({{ array_1 }}, {{ array_2 }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "array_1", "type": null, "description": ""}, {"name": "array_2", "type": null, "description": ""}], "created_at": 1783450492.2801547, "supported_languages": null}, "macro.dbt.get_intervals_between": {"name": "get_intervals_between", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_spine.sql", "original_file_path": "macros/utils/date_spine.sql", "unique_id": "macro.dbt.get_intervals_between", "macro_sql": "{% macro get_intervals_between(start_date, end_date, datepart) -%}\n {{ return(adapter.dispatch('get_intervals_between', 'dbt')(start_date, end_date, datepart)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_intervals_between"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783450492.281082, "supported_languages": null}, "macro.dbt.default__get_intervals_between": {"name": "default__get_intervals_between", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_spine.sql", "original_file_path": "macros/utils/date_spine.sql", "unique_id": "macro.dbt.default__get_intervals_between", "macro_sql": "{% macro default__get_intervals_between(start_date, end_date, datepart) -%}\n {%- call statement('get_intervals_between', fetch_result=True) %}\n\n select {{ dbt.datediff(start_date, end_date, datepart) }}\n\n {%- endcall -%}\n\n {%- set value_list = load_result('get_intervals_between') -%}\n\n {%- if value_list and value_list['data'] -%}\n {%- set values = value_list['data'] | map(attribute=0) | list %}\n {{ return(values[0]) }}\n {%- else -%}\n {{ return(1) }}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783450492.282264, "supported_languages": null}, "macro.dbt.date_spine": {"name": "date_spine", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_spine.sql", "original_file_path": "macros/utils/date_spine.sql", "unique_id": "macro.dbt.date_spine", "macro_sql": "{% macro date_spine(datepart, start_date, end_date) %}\n {{ return(adapter.dispatch('date_spine', 'dbt')(datepart, start_date, end_date)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1783450492.282741, "supported_languages": null}, "macro.dbt.default__date_spine": {"name": "default__date_spine", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_spine.sql", "original_file_path": "macros/utils/date_spine.sql", "unique_id": "macro.dbt.default__date_spine", "macro_sql": "{% macro default__date_spine(datepart, start_date, end_date) %}\n\n\n {# call as follows:\n\n date_spine(\n \"day\",\n \"to_date('01/01/2016', 'mm/dd/yyyy')\",\n \"dbt.dateadd(week, 1, current_date)\"\n ) #}\n\n\n with rawdata as (\n\n {{dbt.generate_series(\n dbt.get_intervals_between(start_date, end_date, datepart)\n )}}\n\n ),\n\n all_periods as (\n\n select (\n {{\n dbt.dateadd(\n datepart,\n \"row_number() over (order by 1) - 1\",\n start_date\n )\n }}\n ) as date_{{datepart}}\n from rawdata\n\n ),\n\n filtered as (\n\n select *\n from all_periods\n where date_{{datepart}} <= {{ end_date }}\n\n )\n\n select * from filtered\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.generate_series", "macro.dbt.get_intervals_between", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1783450492.2834501, "supported_languages": null}, "macro.dbt.dateadd": {"name": "dateadd", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "unique_id": "macro.dbt.dateadd", "macro_sql": "{% macro dateadd(datepart, interval, from_date_or_timestamp) %}\n {{ return(adapter.dispatch('dateadd', 'dbt')(datepart, interval, from_date_or_timestamp)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_date_or_timestamp", "type": null, "description": ""}], "created_at": 1783450492.284052, "supported_languages": null}, "macro.dbt.default__dateadd": {"name": "default__dateadd", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "unique_id": "macro.dbt.default__dateadd", "macro_sql": "{% macro default__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n dateadd(\n {{ datepart }},\n {{ interval }},\n {{ from_date_or_timestamp }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_date_or_timestamp", "type": null, "description": ""}], "created_at": 1783450492.2843838, "supported_languages": null}, "macro.dbt.cast_bool_to_text": {"name": "cast_bool_to_text", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/cast_bool_to_text.sql", "original_file_path": "macros/utils/cast_bool_to_text.sql", "unique_id": "macro.dbt.cast_bool_to_text", "macro_sql": "{% macro cast_bool_to_text(field) %}\n {{ adapter.dispatch('cast_bool_to_text', 'dbt') (field) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1783450492.2848678, "supported_languages": null}, "macro.dbt.default__cast_bool_to_text": {"name": "default__cast_bool_to_text", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/cast_bool_to_text.sql", "original_file_path": "macros/utils/cast_bool_to_text.sql", "unique_id": "macro.dbt.default__cast_bool_to_text", "macro_sql": "{% macro default__cast_bool_to_text(field) %}\n cast({{ field }} as {{ api.Column.translate_type('string') }})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1783450492.2851894, "supported_languages": null}, "macro.dbt.array_append": {"name": "array_append", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_append.sql", "original_file_path": "macros/utils/array_append.sql", "unique_id": "macro.dbt.array_append", "macro_sql": "{% macro array_append(array, new_element) -%}\n {{ return(adapter.dispatch('array_append', 'dbt')(array, new_element)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__array_append"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "array", "type": null, "description": ""}, {"name": "new_element", "type": null, "description": ""}], "created_at": 1783450492.285742, "supported_languages": null}, "macro.dbt.default__array_append": {"name": "default__array_append", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_append.sql", "original_file_path": "macros/utils/array_append.sql", "unique_id": "macro.dbt.default__array_append", "macro_sql": "{% macro default__array_append(array, new_element) -%}\n array_append({{ array }}, {{ new_element }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "array", "type": null, "description": ""}, {"name": "new_element", "type": null, "description": ""}], "created_at": 1783450492.2860165, "supported_languages": null}, "macro.dbt.concat": {"name": "concat", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/concat.sql", "original_file_path": "macros/utils/concat.sql", "unique_id": "macro.dbt.concat", "macro_sql": "{% macro concat(fields) -%}\n {{ return(adapter.dispatch('concat', 'dbt')(fields)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "fields", "type": null, "description": ""}], "created_at": 1783450492.2865164, "supported_languages": null}, "macro.dbt.default__concat": {"name": "default__concat", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/concat.sql", "original_file_path": "macros/utils/concat.sql", "unique_id": "macro.dbt.default__concat", "macro_sql": "{% macro default__concat(fields) -%}\n {{ fields|join(' || ') }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "fields", "type": null, "description": ""}], "created_at": 1783450492.2867742, "supported_languages": null}, "macro.dbt.bool_or": {"name": "bool_or", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/bool_or.sql", "original_file_path": "macros/utils/bool_or.sql", "unique_id": "macro.dbt.bool_or", "macro_sql": "{% macro bool_or(expression) -%}\n {{ return(adapter.dispatch('bool_or', 'dbt') (expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__bool_or"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1783450492.2875392, "supported_languages": null}, "macro.dbt.default__bool_or": {"name": "default__bool_or", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/bool_or.sql", "original_file_path": "macros/utils/bool_or.sql", "unique_id": "macro.dbt.default__bool_or", "macro_sql": "{% macro default__bool_or(expression) -%}\n\n bool_or({{ expression }})\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1783450492.2877624, "supported_languages": null}, "macro.dbt.hash": {"name": "hash", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/hash.sql", "original_file_path": "macros/utils/hash.sql", "unique_id": "macro.dbt.hash", "macro_sql": "{% macro hash(field) -%}\n {{ return(adapter.dispatch('hash', 'dbt') (field)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__hash"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1783450492.2882447, "supported_languages": null}, "macro.dbt.default__hash": {"name": "default__hash", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/hash.sql", "original_file_path": "macros/utils/hash.sql", "unique_id": "macro.dbt.default__hash", "macro_sql": "{% macro default__hash(field) -%}\n md5(cast({{ field }} as {{ api.Column.translate_type('string') }}))\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1783450492.2885838, "supported_languages": null}, "macro.dbt.array_construct": {"name": "array_construct", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_construct.sql", "original_file_path": "macros/utils/array_construct.sql", "unique_id": "macro.dbt.array_construct", "macro_sql": "{% macro array_construct(inputs=[], data_type=api.Column.translate_type('integer')) -%}\n {{ return(adapter.dispatch('array_construct', 'dbt')(inputs, data_type)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__array_construct"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "inputs", "type": null, "description": ""}, {"name": "data_type", "type": null, "description": ""}], "created_at": 1783450492.289277, "supported_languages": null}, "macro.dbt.default__array_construct": {"name": "default__array_construct", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_construct.sql", "original_file_path": "macros/utils/array_construct.sql", "unique_id": "macro.dbt.default__array_construct", "macro_sql": "{% macro default__array_construct(inputs, data_type) -%}\n {% if inputs|length > 0 %}\n array[ {{ inputs|join(' , ') }} ]\n {% else %}\n array[]::{{data_type}}[]\n {% endif %}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "inputs", "type": null, "description": ""}, {"name": "data_type", "type": null, "description": ""}], "created_at": 1783450492.2897778, "supported_languages": null}, "macro.dbt.right": {"name": "right", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/right.sql", "original_file_path": "macros/utils/right.sql", "unique_id": "macro.dbt.right", "macro_sql": "{% macro right(string_text, length_expression) -%}\n {{ return(adapter.dispatch('right', 'dbt') (string_text, length_expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__right"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string_text", "type": null, "description": ""}, {"name": "length_expression", "type": null, "description": ""}], "created_at": 1783450492.2903132, "supported_languages": null}, "macro.dbt.default__right": {"name": "default__right", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/right.sql", "original_file_path": "macros/utils/right.sql", "unique_id": "macro.dbt.default__right", "macro_sql": "{% macro default__right(string_text, length_expression) %}\n\n right(\n {{ string_text }},\n {{ length_expression }}\n )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string_text", "type": null, "description": ""}, {"name": "length_expression", "type": null, "description": ""}], "created_at": 1783450492.2906117, "supported_languages": null}, "macro.dbt.escape_single_quotes": {"name": "escape_single_quotes", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/escape_single_quotes.sql", "original_file_path": "macros/utils/escape_single_quotes.sql", "unique_id": "macro.dbt.escape_single_quotes", "macro_sql": "{% macro escape_single_quotes(expression) %}\n {{ return(adapter.dispatch('escape_single_quotes', 'dbt') (expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__escape_single_quotes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1783450492.2911274, "supported_languages": null}, "macro.dbt.default__escape_single_quotes": {"name": "default__escape_single_quotes", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/escape_single_quotes.sql", "original_file_path": "macros/utils/escape_single_quotes.sql", "unique_id": "macro.dbt.default__escape_single_quotes", "macro_sql": "{% macro default__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\",\"''\") }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1783450492.2914264, "supported_languages": null}, "macro.dbt.datediff": {"name": "datediff", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "unique_id": "macro.dbt.datediff", "macro_sql": "{% macro datediff(first_date, second_date, datepart) %}\n {{ return(adapter.dispatch('datediff', 'dbt')(first_date, second_date, datepart)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783450492.2920175, "supported_languages": null}, "macro.dbt.default__datediff": {"name": "default__datediff", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "unique_id": "macro.dbt.default__datediff", "macro_sql": "{% macro default__datediff(first_date, second_date, datepart) -%}\n\n datediff(\n {{ datepart }},\n {{ first_date }},\n {{ second_date }}\n )\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783450492.292352, "supported_languages": null}, "macro.dbt.intersect": {"name": "intersect", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/intersect.sql", "original_file_path": "macros/utils/intersect.sql", "unique_id": "macro.dbt.intersect", "macro_sql": "{% macro intersect() %}\n {{ return(adapter.dispatch('intersect', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__intersect"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.2928107, "supported_languages": null}, "macro.dbt.default__intersect": {"name": "default__intersect", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/intersect.sql", "original_file_path": "macros/utils/intersect.sql", "unique_id": "macro.dbt.default__intersect", "macro_sql": "{% macro default__intersect() %}\n\n intersect\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.2929726, "supported_languages": null}, "macro.dbt.equals": {"name": "equals", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/equals.sql", "original_file_path": "macros/utils/equals.sql", "unique_id": "macro.dbt.equals", "macro_sql": "{% macro equals(expr1, expr2) %}\n {{ return(adapter.dispatch('equals', 'dbt') (expr1, expr2)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__equals"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expr1", "type": null, "description": ""}, {"name": "expr2", "type": null, "description": ""}], "created_at": 1783450492.2935936, "supported_languages": null}, "macro.dbt.default__equals": {"name": "default__equals", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/equals.sql", "original_file_path": "macros/utils/equals.sql", "unique_id": "macro.dbt.default__equals", "macro_sql": "{% macro default__equals(expr1, expr2) -%}\n{%- if adapter.behavior.enable_truthy_nulls_equals_macro.no_warn %}\n case when (({{ expr1 }} = {{ expr2 }}) or ({{ expr1 }} is null and {{ expr2 }} is null))\n then 0\n else 1\n end = 0\n{%- else -%}\n ({{ expr1 }} = {{ expr2 }})\n{%- endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expr1", "type": null, "description": ""}, {"name": "expr2", "type": null, "description": ""}], "created_at": 1783450492.2942913, "supported_languages": null}, "macro.dbt.split_part": {"name": "split_part", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt.split_part", "macro_sql": "{% macro split_part(string_text, delimiter_text, part_number) %}\n {{ return(adapter.dispatch('split_part', 'dbt') (string_text, delimiter_text, part_number)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__split_part"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string_text", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "part_number", "type": null, "description": ""}], "created_at": 1783450492.2950048, "supported_languages": null}, "macro.dbt.default__split_part": {"name": "default__split_part", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt.default__split_part", "macro_sql": "{% macro default__split_part(string_text, delimiter_text, part_number) %}\n\n split_part(\n {{ string_text }},\n {{ delimiter_text }},\n {{ part_number }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string_text", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "part_number", "type": null, "description": ""}], "created_at": 1783450492.2953477, "supported_languages": null}, "macro.dbt._split_part_negative": {"name": "_split_part_negative", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt._split_part_negative", "macro_sql": "{% macro _split_part_negative(string_text, delimiter_text, part_number) %}\n\n split_part(\n {{ string_text }},\n {{ delimiter_text }},\n length({{ string_text }})\n - length(\n replace({{ string_text }}, {{ delimiter_text }}, '')\n ) + 2 + {{ part_number }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string_text", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "part_number", "type": null, "description": ""}], "created_at": 1783450492.2958238, "supported_languages": null}, "macro.dbt.length": {"name": "length", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/length.sql", "original_file_path": "macros/utils/length.sql", "unique_id": "macro.dbt.length", "macro_sql": "{% macro length(expression) -%}\n {{ return(adapter.dispatch('length', 'dbt') (expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__length"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1783450492.2963052, "supported_languages": null}, "macro.dbt.default__length": {"name": "default__length", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/length.sql", "original_file_path": "macros/utils/length.sql", "unique_id": "macro.dbt.default__length", "macro_sql": "{% macro default__length(expression) %}\n\n length(\n {{ expression }}\n )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1783450492.2965543, "supported_languages": null}, "macro.dbt.position": {"name": "position", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/position.sql", "original_file_path": "macros/utils/position.sql", "unique_id": "macro.dbt.position", "macro_sql": "{% macro position(substring_text, string_text) -%}\n {{ return(adapter.dispatch('position', 'dbt') (substring_text, string_text)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__position"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "substring_text", "type": null, "description": ""}, {"name": "string_text", "type": null, "description": ""}], "created_at": 1783450492.2970881, "supported_languages": null}, "macro.dbt.default__position": {"name": "default__position", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/position.sql", "original_file_path": "macros/utils/position.sql", "unique_id": "macro.dbt.default__position", "macro_sql": "{% macro default__position(substring_text, string_text) %}\n\n position(\n {{ substring_text }} in {{ string_text }}\n )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "substring_text", "type": null, "description": ""}, {"name": "string_text", "type": null, "description": ""}], "created_at": 1783450492.2973628, "supported_languages": null}, "macro.dbt.default__test_unique": {"name": "default__test_unique", "resource_type": "macro", "package_name": "dbt", "path": "macros/generic_test_sql/unique.sql", "original_file_path": "macros/generic_test_sql/unique.sql", "unique_id": "macro.dbt.default__test_unique", "macro_sql": "{% macro default__test_unique(model, column_name) %}\n\nselect\n {{ column_name }} as unique_field,\n count(*) as n_records\n\nfrom {{ model }}\nwhere {{ column_name }} is not null\ngroup by {{ column_name }}\nhaving count(*) > 1\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}], "created_at": 1783450492.2978387, "supported_languages": null}, "macro.dbt.default__test_not_null": {"name": "default__test_not_null", "resource_type": "macro", "package_name": "dbt", "path": "macros/generic_test_sql/not_null.sql", "original_file_path": "macros/generic_test_sql/not_null.sql", "unique_id": "macro.dbt.default__test_not_null", "macro_sql": "{% macro default__test_not_null(model, column_name) %}\n\n{% set column_list = '*' if should_store_failures() else column_name %}\n\nselect {{ column_list }}\nfrom {{ model }}\nwhere {{ column_name }} is null\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.should_store_failures"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}], "created_at": 1783450492.2984312, "supported_languages": null}, "macro.dbt.default__test_relationships": {"name": "default__test_relationships", "resource_type": "macro", "package_name": "dbt", "path": "macros/generic_test_sql/relationships.sql", "original_file_path": "macros/generic_test_sql/relationships.sql", "unique_id": "macro.dbt.default__test_relationships", "macro_sql": "{% macro default__test_relationships(model, column_name, to, field) %}\n\nwith child as (\n select {{ column_name }} as from_field\n from {{ model }}\n where {{ column_name }} is not null\n),\n\nparent as (\n select {{ field }} as to_field\n from {{ to }}\n)\n\nselect\n from_field\n\nfrom child\nleft join parent\n on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "to", "type": null, "description": ""}, {"name": "field", "type": null, "description": ""}], "created_at": 1783450492.2989938, "supported_languages": null}, "macro.dbt.default__test_accepted_values": {"name": "default__test_accepted_values", "resource_type": "macro", "package_name": "dbt", "path": "macros/generic_test_sql/accepted_values.sql", "original_file_path": "macros/generic_test_sql/accepted_values.sql", "unique_id": "macro.dbt.default__test_accepted_values", "macro_sql": "{% macro default__test_accepted_values(model, column_name, values, quote=True) %}\n\nwith all_values as (\n\n select\n {{ column_name }} as value_field,\n count(*) as n_records\n\n from {{ model }}\n group by {{ column_name }}\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n {% for value in values -%}\n {% if quote -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif -%}\n {%- if not loop.last -%},{%- endif %}\n {%- endfor %}\n)\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "values", "type": null, "description": ""}, {"name": "quote", "type": null, "description": ""}], "created_at": 1783450492.299991, "supported_languages": null}, "macro.dbt.copy_grants": {"name": "copy_grants", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.copy_grants", "macro_sql": "{% macro copy_grants() %}\n {{ return(adapter.dispatch('copy_grants', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__copy_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.3019948, "supported_languages": null}, "macro.dbt.default__copy_grants": {"name": "default__copy_grants", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__copy_grants", "macro_sql": "{% macro default__copy_grants() %}\n {{ return(True) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.3022387, "supported_languages": null}, "macro.dbt.support_multiple_grantees_per_dcl_statement": {"name": "support_multiple_grantees_per_dcl_statement", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.support_multiple_grantees_per_dcl_statement", "macro_sql": "{% macro support_multiple_grantees_per_dcl_statement() %}\n {{ return(adapter.dispatch('support_multiple_grantees_per_dcl_statement', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__support_multiple_grantees_per_dcl_statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.3025923, "supported_languages": null}, "macro.dbt.default__support_multiple_grantees_per_dcl_statement": {"name": "default__support_multiple_grantees_per_dcl_statement", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__support_multiple_grantees_per_dcl_statement", "macro_sql": "\n\n{%- macro default__support_multiple_grantees_per_dcl_statement() -%}\n {{ return(True) }}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.3029132, "supported_languages": null}, "macro.dbt.should_revoke": {"name": "should_revoke", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.should_revoke", "macro_sql": "{% macro should_revoke(existing_relation, full_refresh_mode=True) %}\n\n {% if not existing_relation %}\n {#-- The table doesn't already exist, so no grants to copy over --#}\n {{ return(False) }}\n {% elif full_refresh_mode %}\n {#-- The object is being REPLACED -- whether grants are copied over depends on the value of user config --#}\n {{ return(copy_grants()) }}\n {% else %}\n {#-- The table is being merged/upserted/inserted -- grants will be carried over --#}\n {{ return(True) }}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.copy_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "existing_relation", "type": null, "description": ""}, {"name": "full_refresh_mode", "type": null, "description": ""}], "created_at": 1783450492.3036063, "supported_languages": null}, "macro.dbt.get_show_grant_sql": {"name": "get_show_grant_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.get_show_grant_sql", "macro_sql": "{% macro get_show_grant_sql(relation) %}\n {{ return(adapter.dispatch(\"get_show_grant_sql\", \"dbt\")(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_show_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.3039773, "supported_languages": null}, "macro.dbt.default__get_show_grant_sql": {"name": "default__get_show_grant_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_show_grant_sql", "macro_sql": "{% macro default__get_show_grant_sql(relation) %}\n show grants on {{ relation.render() }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.304225, "supported_languages": null}, "macro.dbt.get_grant_sql": {"name": "get_grant_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.get_grant_sql", "macro_sql": "{% macro get_grant_sql(relation, privilege, grantees) %}\n {{ return(adapter.dispatch('get_grant_sql', 'dbt')(relation, privilege, grantees)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "privilege", "type": null, "description": ""}, {"name": "grantees", "type": null, "description": ""}], "created_at": 1783450492.3046875, "supported_languages": null}, "macro.dbt.default__get_grant_sql": {"name": "default__get_grant_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_grant_sql", "macro_sql": "\n\n{%- macro default__get_grant_sql(relation, privilege, grantees) -%}\n grant {{ privilege }} on {{ relation.render() }} to {{ grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "privilege", "type": null, "description": ""}, {"name": "grantees", "type": null, "description": ""}], "created_at": 1783450492.3051004, "supported_languages": null}, "macro.dbt.get_revoke_sql": {"name": "get_revoke_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.get_revoke_sql", "macro_sql": "{% macro get_revoke_sql(relation, privilege, grantees) %}\n {{ return(adapter.dispatch('get_revoke_sql', 'dbt')(relation, privilege, grantees)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_revoke_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "privilege", "type": null, "description": ""}, {"name": "grantees", "type": null, "description": ""}], "created_at": 1783450492.3055747, "supported_languages": null}, "macro.dbt.default__get_revoke_sql": {"name": "default__get_revoke_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_revoke_sql", "macro_sql": "\n\n{%- macro default__get_revoke_sql(relation, privilege, grantees) -%}\n revoke {{ privilege }} on {{ relation.render() }} from {{ grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "privilege", "type": null, "description": ""}, {"name": "grantees", "type": null, "description": ""}], "created_at": 1783450492.3059866, "supported_languages": null}, "macro.dbt.get_dcl_statement_list": {"name": "get_dcl_statement_list", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.get_dcl_statement_list", "macro_sql": "{% macro get_dcl_statement_list(relation, grant_config, get_dcl_macro) %}\n {{ return(adapter.dispatch('get_dcl_statement_list', 'dbt')(relation, grant_config, get_dcl_macro)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_dcl_statement_list"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "grant_config", "type": null, "description": ""}, {"name": "get_dcl_macro", "type": null, "description": ""}], "created_at": 1783450492.3064473, "supported_languages": null}, "macro.dbt.default__get_dcl_statement_list": {"name": "default__get_dcl_statement_list", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_dcl_statement_list", "macro_sql": "\n\n{%- macro default__get_dcl_statement_list(relation, grant_config, get_dcl_macro) -%}\n {#\n -- Unpack grant_config into specific privileges and the set of users who need them granted/revoked.\n -- Depending on whether this database supports multiple grantees per statement, pass in the list of\n -- all grantees per privilege, or (if not) template one statement per privilege-grantee pair.\n -- `get_dcl_macro` will be either `get_grant_sql` or `get_revoke_sql`\n #}\n {%- set dcl_statements = [] -%}\n {%- for privilege, grantees in grant_config.items() %}\n {%- if support_multiple_grantees_per_dcl_statement() and grantees -%}\n {%- set dcl = get_dcl_macro(relation, privilege, grantees) -%}\n {%- do dcl_statements.append(dcl) -%}\n {%- else -%}\n {%- for grantee in grantees -%}\n {% set dcl = get_dcl_macro(relation, privilege, [grantee]) %}\n {%- do dcl_statements.append(dcl) -%}\n {% endfor -%}\n {%- endif -%}\n {%- endfor -%}\n {{ return(dcl_statements) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.support_multiple_grantees_per_dcl_statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "grant_config", "type": null, "description": ""}, {"name": "get_dcl_macro", "type": null, "description": ""}], "created_at": 1783450492.3077724, "supported_languages": null}, "macro.dbt.call_dcl_statements": {"name": "call_dcl_statements", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.call_dcl_statements", "macro_sql": "{% macro call_dcl_statements(dcl_statement_list) %}\n {{ return(adapter.dispatch(\"call_dcl_statements\", \"dbt\")(dcl_statement_list)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__call_dcl_statements"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "dcl_statement_list", "type": null, "description": ""}], "created_at": 1783450492.308145, "supported_languages": null}, "macro.dbt.default__call_dcl_statements": {"name": "default__call_dcl_statements", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__call_dcl_statements", "macro_sql": "{% macro default__call_dcl_statements(dcl_statement_list) %}\n {#\n -- By default, supply all grant + revoke statements in a single semicolon-separated block,\n -- so that they're all processed together.\n\n -- Some databases do not support this. Those adapters will need to override this macro\n -- to run each statement individually.\n #}\n {% call statement('grants') %}\n {% for dcl_statement in dcl_statement_list %}\n {{ dcl_statement }};\n {% endfor %}\n {% endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "dcl_statement_list", "type": null, "description": ""}], "created_at": 1783450492.308651, "supported_languages": null}, "macro.dbt.apply_grants": {"name": "apply_grants", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.apply_grants", "macro_sql": "{% macro apply_grants(relation, grant_config, should_revoke) %}\n {{ return(adapter.dispatch(\"apply_grants\", \"dbt\")(relation, grant_config, should_revoke)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__apply_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "grant_config", "type": null, "description": ""}, {"name": "should_revoke", "type": null, "description": ""}], "created_at": 1783450492.309098, "supported_languages": null}, "macro.dbt.default__apply_grants": {"name": "default__apply_grants", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__apply_grants", "macro_sql": "{% macro default__apply_grants(relation, grant_config, should_revoke=True) %}\n {#-- If grant_config is {} or None, this is a no-op --#}\n {% if grant_config %}\n {% if should_revoke %}\n {#-- We think previous grants may have carried over --#}\n {#-- Show current grants and calculate diffs --#}\n {% set current_grants_table = run_query(get_show_grant_sql(relation)) %}\n {% set current_grants_dict = adapter.standardize_grants_dict(current_grants_table) %}\n {% set needs_granting = diff_of_two_dicts(grant_config, current_grants_dict) %}\n {% set needs_revoking = diff_of_two_dicts(current_grants_dict, grant_config) %}\n {% if not (needs_granting or needs_revoking) %}\n {{ log('On ' ~ relation.render() ~': All grants are in place, no revocation or granting needed.')}}\n {% endif %}\n {% else %}\n {#-- We don't think there's any chance of previous grants having carried over. --#}\n {#-- Jump straight to granting what the user has configured. --#}\n {% set needs_revoking = {} %}\n {% set needs_granting = grant_config %}\n {% endif %}\n {% if needs_granting or needs_revoking %}\n {% set revoke_statement_list = get_dcl_statement_list(relation, needs_revoking, get_revoke_sql) %}\n {% set grant_statement_list = get_dcl_statement_list(relation, needs_granting, get_grant_sql) %}\n {% set dcl_statement_list = revoke_statement_list + grant_statement_list %}\n {% if dcl_statement_list %}\n {{ call_dcl_statements(dcl_statement_list) }}\n {% endif %}\n {% endif %}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.get_show_grant_sql", "macro.dbt.get_dcl_statement_list", "macro.dbt.call_dcl_statements"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "grant_config", "type": null, "description": ""}, {"name": "should_revoke", "type": null, "description": ""}], "created_at": 1783450492.3114905, "supported_languages": null}, "macro.dbt.get_create_index_sql": {"name": "get_create_index_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.get_create_index_sql", "macro_sql": "{% macro get_create_index_sql(relation, index_dict) -%}\n {{ return(adapter.dispatch('get_create_index_sql', 'dbt')(relation, index_dict)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "index_dict", "type": null, "description": ""}], "created_at": 1783450492.3124313, "supported_languages": null}, "macro.dbt.default__get_create_index_sql": {"name": "default__get_create_index_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.default__get_create_index_sql", "macro_sql": "{% macro default__get_create_index_sql(relation, index_dict) -%}\n {% do return(None) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "index_dict", "type": null, "description": ""}], "created_at": 1783450492.3127162, "supported_languages": null}, "macro.dbt.create_indexes": {"name": "create_indexes", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.create_indexes", "macro_sql": "{% macro create_indexes(relation) -%}\n {{ adapter.dispatch('create_indexes', 'dbt')(relation) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.3130283, "supported_languages": null}, "macro.dbt.default__create_indexes": {"name": "default__create_indexes", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.default__create_indexes", "macro_sql": "{% macro default__create_indexes(relation) -%}\n {%- set _indexes = config.get('indexes', default=[]) -%}\n\n {% for _index_dict in _indexes %}\n {% set create_index_sql = get_create_index_sql(relation, _index_dict) %}\n {% if create_index_sql %}\n {% do run_query(create_index_sql) %}\n {% endif %}\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_create_index_sql", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.313827, "supported_languages": null}, "macro.dbt.get_drop_index_sql": {"name": "get_drop_index_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.get_drop_index_sql", "macro_sql": "{% macro get_drop_index_sql(relation, index_name) -%}\n {{ adapter.dispatch('get_drop_index_sql', 'dbt')(relation, index_name) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_drop_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "index_name", "type": null, "description": ""}], "created_at": 1783450492.3141897, "supported_languages": null}, "macro.dbt.default__get_drop_index_sql": {"name": "default__get_drop_index_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.default__get_drop_index_sql", "macro_sql": "{% macro default__get_drop_index_sql(relation, index_name) -%}\n {{ exceptions.raise_compiler_error(\"`get_drop_index_sql has not been implemented for this adapter.\") }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "index_name", "type": null, "description": ""}], "created_at": 1783450492.3144891, "supported_languages": null}, "macro.dbt.get_show_indexes_sql": {"name": "get_show_indexes_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.get_show_indexes_sql", "macro_sql": "{% macro get_show_indexes_sql(relation) -%}\n {{ adapter.dispatch('get_show_indexes_sql', 'dbt')(relation) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_show_indexes_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.314808, "supported_languages": null}, "macro.dbt.default__get_show_indexes_sql": {"name": "default__get_show_indexes_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.default__get_show_indexes_sql", "macro_sql": "{% macro default__get_show_indexes_sql(relation) -%}\n {{ exceptions.raise_compiler_error(\"`get_show_indexes_sql has not been implemented for this adapter.\") }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.3150635, "supported_languages": null}, "macro.dbt.get_columns_in_relation": {"name": "get_columns_in_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_columns_in_relation", "macro_sql": "{% macro get_columns_in_relation(relation) -%}\n {{ return(adapter.dispatch('get_columns_in_relation', 'dbt')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.317177, "supported_languages": null}, "macro.dbt.default__get_columns_in_relation": {"name": "default__get_columns_in_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__get_columns_in_relation", "macro_sql": "{% macro default__get_columns_in_relation(relation) -%}\n {{ exceptions.raise_not_implemented(\n 'get_columns_in_relation macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.31752, "supported_languages": null}, "macro.dbt.sql_convert_columns_in_relation": {"name": "sql_convert_columns_in_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.sql_convert_columns_in_relation", "macro_sql": "{% macro sql_convert_columns_in_relation(table) -%}\n {% set columns = [] %}\n {% for row in table %}\n {% do columns.append(api.Column(*row)) %}\n {% endfor %}\n {{ return(columns) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table", "type": null, "description": ""}], "created_at": 1783450492.31812, "supported_languages": null}, "macro.dbt.get_list_of_column_names": {"name": "get_list_of_column_names", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_list_of_column_names", "macro_sql": "\n\n{%- macro get_list_of_column_names(columns) -%}\n {% set col_names = [] %}\n {% for col in columns %}\n {% do col_names.append(col.name) %}\n {% endfor %}\n {{ return(col_names) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "columns", "type": null, "description": ""}], "created_at": 1783450492.318697, "supported_languages": null}, "macro.dbt.get_empty_subquery_sql": {"name": "get_empty_subquery_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_empty_subquery_sql", "macro_sql": "{% macro get_empty_subquery_sql(select_sql, select_sql_header=none) -%}\n {{ return(adapter.dispatch('get_empty_subquery_sql', 'dbt')(select_sql, select_sql_header)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_empty_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "select_sql", "type": null, "description": ""}, {"name": "select_sql_header", "type": null, "description": ""}], "created_at": 1783450492.3191133, "supported_languages": null}, "macro.dbt.default__get_empty_subquery_sql": {"name": "default__get_empty_subquery_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__get_empty_subquery_sql", "macro_sql": "{% macro default__get_empty_subquery_sql(select_sql, select_sql_header=none) %}\n {%- if select_sql_header is not none -%}\n {{ select_sql_header }}\n {%- endif -%}\n select * from (\n {{ select_sql }}\n ) as __dbt_sbq\n where false\n limit 0\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "select_sql", "type": null, "description": ""}, {"name": "select_sql_header", "type": null, "description": ""}], "created_at": 1783450492.319547, "supported_languages": null}, "macro.dbt.get_empty_schema_sql": {"name": "get_empty_schema_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_empty_schema_sql", "macro_sql": "{% macro get_empty_schema_sql(columns) -%}\n {{ return(adapter.dispatch('get_empty_schema_sql', 'dbt')(columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_empty_schema_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "columns", "type": null, "description": ""}], "created_at": 1783450492.319997, "supported_languages": null}, "macro.dbt.default__get_empty_schema_sql": {"name": "default__get_empty_schema_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__get_empty_schema_sql", "macro_sql": "{% macro default__get_empty_schema_sql(columns) %}\n {%- set col_err = [] -%}\n {%- set col_naked_numeric = [] -%}\n select\n {% for i in columns %}\n {%- set col = columns[i] -%}\n {%- if col['data_type'] is not defined -%}\n {%- do col_err.append(col['name']) -%}\n {#-- If this column's type is just 'numeric' then it is missing precision/scale, raise a warning --#}\n {%- elif col['data_type'].strip().lower() in ('numeric', 'decimal', 'number') -%}\n {%- do col_naked_numeric.append(col['name']) -%}\n {%- endif -%}\n {% set col_name = adapter.quote(col['name']) if col.get('quote') else col['name'] %}\n {{ cast('null', col['data_type']) }} as {{ col_name }}{{ \", \" if not loop.last }}\n {%- endfor -%}\n {%- if (col_err | length) > 0 -%}\n {{ exceptions.column_type_missing(column_names=col_err) }}\n {%- elif (col_naked_numeric | length) > 0 -%}\n {{ exceptions.warn(\"Detected columns with numeric type and unspecified precision/scale, this can lead to unintended rounding: \" ~ col_naked_numeric ~ \"`\") }}\n {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "columns", "type": null, "description": ""}], "created_at": 1783450492.3222187, "supported_languages": null}, "macro.dbt.get_column_schema_from_query": {"name": "get_column_schema_from_query", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_column_schema_from_query", "macro_sql": "{% macro get_column_schema_from_query(select_sql, select_sql_header=none) -%}\n {% set columns = [] %}\n {# -- Using an 'empty subquery' here to get the same schema as the given select_sql statement, without necessitating a data scan.#}\n {% set sql = get_empty_subquery_sql(select_sql, select_sql_header) %}\n {% set column_schema = adapter.get_column_schema_from_query(sql) %}\n {{ return(column_schema) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_empty_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "select_sql", "type": null, "description": ""}, {"name": "select_sql_header", "type": null, "description": ""}], "created_at": 1783450492.3229005, "supported_languages": null}, "macro.dbt.get_columns_in_query": {"name": "get_columns_in_query", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_columns_in_query", "macro_sql": "{% macro get_columns_in_query(select_sql) -%}\n {{ return(adapter.dispatch('get_columns_in_query', 'dbt')(select_sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "select_sql", "type": null, "description": ""}], "created_at": 1783450492.3232577, "supported_languages": null}, "macro.dbt.default__get_columns_in_query": {"name": "default__get_columns_in_query", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__get_columns_in_query", "macro_sql": "{% macro default__get_columns_in_query(select_sql) %}\n {% call statement('get_columns_in_query', fetch_result=True, auto_begin=False) -%}\n {{ get_empty_subquery_sql(select_sql) }}\n {% endcall %}\n {{ return(load_result('get_columns_in_query').table.columns | map(attribute='name') | list) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.get_empty_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "select_sql", "type": null, "description": ""}], "created_at": 1783450492.3239279, "supported_languages": null}, "macro.dbt.alter_column_type": {"name": "alter_column_type", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.alter_column_type", "macro_sql": "{% macro alter_column_type(relation, column_name, new_column_type) -%}\n {{ return(adapter.dispatch('alter_column_type', 'dbt')(relation, column_name, new_column_type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "new_column_type", "type": null, "description": ""}], "created_at": 1783450492.3243637, "supported_languages": null}, "macro.dbt.default__alter_column_type": {"name": "default__alter_column_type", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__alter_column_type", "macro_sql": "{% macro default__alter_column_type(relation, column_name, new_column_type) -%}\n {#\n 1. Create a new column (w/ temp name and correct type)\n 2. Copy data over to it\n 3. Drop the existing column (cascade!)\n 4. Rename the new column to existing column\n #}\n {%- set tmp_column = column_name + \"__dbt_alter\" -%}\n\n {% call statement('alter_column_type') %}\n alter table {{ relation.render() }} add column {{ adapter.quote(tmp_column) }} {{ new_column_type }};\n update {{ relation.render() }} set {{ adapter.quote(tmp_column) }} = {{ adapter.quote(column_name) }};\n alter table {{ relation.render() }} drop column {{ adapter.quote(column_name) }} cascade;\n alter table {{ relation.render() }} rename column {{ adapter.quote(tmp_column) }} to {{ adapter.quote(column_name) }}\n {% endcall %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "new_column_type", "type": null, "description": ""}], "created_at": 1783450492.3256636, "supported_languages": null}, "macro.dbt.alter_relation_add_remove_columns": {"name": "alter_relation_add_remove_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.alter_relation_add_remove_columns", "macro_sql": "{% macro alter_relation_add_remove_columns(relation, add_columns = none, remove_columns = none) -%}\n {{ return(adapter.dispatch('alter_relation_add_remove_columns', 'dbt')(relation, add_columns, remove_columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__alter_relation_add_remove_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "add_columns", "type": null, "description": ""}, {"name": "remove_columns", "type": null, "description": ""}], "created_at": 1783450492.326163, "supported_languages": null}, "macro.dbt.default__alter_relation_add_remove_columns": {"name": "default__alter_relation_add_remove_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__alter_relation_add_remove_columns", "macro_sql": "{% macro default__alter_relation_add_remove_columns(relation, add_columns, remove_columns) %}\n\n {% if add_columns is none %}\n {% set add_columns = [] %}\n {% endif %}\n {% if remove_columns is none %}\n {% set remove_columns = [] %}\n {% endif %}\n\n {% set sql -%}\n\n alter {{ relation.type }} {{ relation.render() }}\n\n {% for column in add_columns %}\n add column {{ column.quoted }} {{ column.expanded_data_type }}{{ ',' if not loop.last }}\n {% endfor %}{{ ',' if add_columns and remove_columns }}\n\n {% for column in remove_columns %}\n drop column {{ column.quoted }}{{ ',' if not loop.last }}\n {% endfor %}\n\n {%- endset -%}\n\n {% do run_query(sql) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "add_columns", "type": null, "description": ""}, {"name": "remove_columns", "type": null, "description": ""}], "created_at": 1783450492.3277385, "supported_languages": null}, "macro.dbt.current_timestamp": {"name": "current_timestamp", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.current_timestamp", "macro_sql": "{%- macro current_timestamp() -%}\n {{ adapter.dispatch('current_timestamp', 'dbt')() }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt_postgres.postgres__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.3286374, "supported_languages": null}, "macro.dbt.default__current_timestamp": {"name": "default__current_timestamp", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.default__current_timestamp", "macro_sql": "{% macro default__current_timestamp() -%}\n {{ exceptions.raise_not_implemented(\n 'current_timestamp macro not implemented for adapter ' + adapter.type()) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.3289437, "supported_languages": null}, "macro.dbt.snapshot_get_time": {"name": "snapshot_get_time", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.snapshot_get_time", "macro_sql": "\n\n{%- macro snapshot_get_time() -%}\n {{ adapter.dispatch('snapshot_get_time', 'dbt')() }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt_postgres.postgres__snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.3292298, "supported_languages": null}, "macro.dbt.default__snapshot_get_time": {"name": "default__snapshot_get_time", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.default__snapshot_get_time", "macro_sql": "{% macro default__snapshot_get_time() %}\n {{ current_timestamp() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.3294675, "supported_languages": null}, "macro.dbt.get_snapshot_get_time_data_type": {"name": "get_snapshot_get_time_data_type", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.get_snapshot_get_time_data_type", "macro_sql": "{% macro get_snapshot_get_time_data_type() %}\n {% set snapshot_time = adapter.dispatch('snapshot_get_time', 'dbt')() %}\n {% set time_data_type_sql = 'select ' ~ snapshot_time ~ ' as dbt_snapshot_time' %}\n {% set snapshot_time_column_schema = get_column_schema_from_query(time_data_type_sql) %}\n {% set time_data_type = snapshot_time_column_schema[0].dtype %}\n {{ return(time_data_type or none) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.snapshot_get_time", "macro.dbt_postgres.postgres__snapshot_get_time", "macro.dbt.get_column_schema_from_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.3302655, "supported_languages": null}, "macro.dbt.current_timestamp_backcompat": {"name": "current_timestamp_backcompat", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.current_timestamp_backcompat", "macro_sql": "{% macro current_timestamp_backcompat() %}\n {{ return(adapter.dispatch('current_timestamp_backcompat', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__current_timestamp_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.3306189, "supported_languages": null}, "macro.dbt.default__current_timestamp_backcompat": {"name": "default__current_timestamp_backcompat", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.default__current_timestamp_backcompat", "macro_sql": "{% macro default__current_timestamp_backcompat() %}\n current_timestamp::timestamp\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.3307798, "supported_languages": null}, "macro.dbt.current_timestamp_in_utc_backcompat": {"name": "current_timestamp_in_utc_backcompat", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.current_timestamp_in_utc_backcompat", "macro_sql": "{% macro current_timestamp_in_utc_backcompat() %}\n {{ return(adapter.dispatch('current_timestamp_in_utc_backcompat', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__current_timestamp_in_utc_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.3312056, "supported_languages": null}, "macro.dbt.default__current_timestamp_in_utc_backcompat": {"name": "default__current_timestamp_in_utc_backcompat", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.default__current_timestamp_in_utc_backcompat", "macro_sql": "{% macro default__current_timestamp_in_utc_backcompat() %}\n {{ return(adapter.dispatch('current_timestamp_backcompat', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.current_timestamp_backcompat", "macro.dbt_postgres.postgres__current_timestamp_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.3315535, "supported_languages": null}, "macro.dbt.get_show_sql": {"name": "get_show_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/show.sql", "original_file_path": "macros/adapters/show.sql", "unique_id": "macro.dbt.get_show_sql", "macro_sql": "{% macro get_show_sql(compiled_code, sql_header, limit) -%}\n {%- if sql_header is not none -%}\n {{ sql_header }}\n {%- endif %}\n {{ get_limit_subquery_sql(compiled_code, limit) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_limit_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "compiled_code", "type": null, "description": ""}, {"name": "sql_header", "type": null, "description": ""}, {"name": "limit", "type": null, "description": ""}], "created_at": 1783450492.3322759, "supported_languages": null}, "macro.dbt.get_limit_subquery_sql": {"name": "get_limit_subquery_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/show.sql", "original_file_path": "macros/adapters/show.sql", "unique_id": "macro.dbt.get_limit_subquery_sql", "macro_sql": "\n{%- macro get_limit_subquery_sql(sql, limit) -%}\n {{ adapter.dispatch('get_limit_sql', 'dbt')(sql, limit) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__get_limit_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}, {"name": "limit", "type": null, "description": ""}], "created_at": 1783450492.3326578, "supported_languages": null}, "macro.dbt.default__get_limit_sql": {"name": "default__get_limit_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/show.sql", "original_file_path": "macros/adapters/show.sql", "unique_id": "macro.dbt.default__get_limit_sql", "macro_sql": "{% macro default__get_limit_sql(sql, limit) %}\n {{ sql }}\n {% if limit is not none %}\n limit {{ limit }}\n {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}, {"name": "limit", "type": null, "description": ""}], "created_at": 1783450492.3330314, "supported_languages": null}, "macro.dbt.get_catalog_relations": {"name": "get_catalog_relations", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_catalog_relations", "macro_sql": "{% macro get_catalog_relations(information_schema, relations) -%}\n {{ return(adapter.dispatch('get_catalog_relations', 'dbt')(information_schema, relations)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_catalog_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "relations", "type": null, "description": ""}], "created_at": 1783450492.3346636, "supported_languages": null}, "macro.dbt.default__get_catalog_relations": {"name": "default__get_catalog_relations", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_catalog_relations", "macro_sql": "{% macro default__get_catalog_relations(information_schema, relations) -%}\n {% set typename = adapter.type() %}\n {% set msg -%}\n get_catalog_relations not implemented for {{ typename }}\n {%- endset %}\n\n {{ exceptions.raise_compiler_error(msg) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "relations", "type": null, "description": ""}], "created_at": 1783450492.335186, "supported_languages": null}, "macro.dbt.get_catalog": {"name": "get_catalog", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_catalog", "macro_sql": "{% macro get_catalog(information_schema, schemas) -%}\n {{ return(adapter.dispatch('get_catalog', 'dbt')(information_schema, schemas)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_catalog"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "schemas", "type": null, "description": ""}], "created_at": 1783450492.3356123, "supported_languages": null}, "macro.dbt.default__get_catalog": {"name": "default__get_catalog", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_catalog", "macro_sql": "{% macro default__get_catalog(information_schema, schemas) -%}\n\n {% set typename = adapter.type() %}\n {% set msg -%}\n get_catalog not implemented for {{ typename }}\n {%- endset %}\n\n {{ exceptions.raise_compiler_error(msg) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "schemas", "type": null, "description": ""}], "created_at": 1783450492.3362136, "supported_languages": null}, "macro.dbt.information_schema_name": {"name": "information_schema_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.information_schema_name", "macro_sql": "{% macro information_schema_name(database) %}\n {{ return(adapter.dispatch('information_schema_name', 'dbt')(database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__information_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}], "created_at": 1783450492.3366091, "supported_languages": null}, "macro.dbt.default__information_schema_name": {"name": "default__information_schema_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__information_schema_name", "macro_sql": "{% macro default__information_schema_name(database) -%}\n {%- if database -%}\n {{ database }}.INFORMATION_SCHEMA\n {%- else -%}\n INFORMATION_SCHEMA\n {%- endif -%}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}], "created_at": 1783450492.3369253, "supported_languages": null}, "macro.dbt.list_schemas": {"name": "list_schemas", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.list_schemas", "macro_sql": "{% macro list_schemas(database) -%}\n {{ return(adapter.dispatch('list_schemas', 'dbt')(database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__list_schemas"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}], "created_at": 1783450492.337274, "supported_languages": null}, "macro.dbt.default__list_schemas": {"name": "default__list_schemas", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__list_schemas", "macro_sql": "{% macro default__list_schemas(database) -%}\n {% set sql %}\n select distinct schema_name\n from {{ information_schema_name(database) }}.SCHEMATA\n where catalog_name ilike '{{ database }}'\n {% endset %}\n {{ return(run_query(sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.information_schema_name", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}], "created_at": 1783450492.3377721, "supported_languages": null}, "macro.dbt.check_schema_exists": {"name": "check_schema_exists", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.check_schema_exists", "macro_sql": "{% macro check_schema_exists(information_schema, schema) -%}\n {{ return(adapter.dispatch('check_schema_exists', 'dbt')(information_schema, schema)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__check_schema_exists"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "schema", "type": null, "description": ""}], "created_at": 1783450492.338172, "supported_languages": null}, "macro.dbt.default__check_schema_exists": {"name": "default__check_schema_exists", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__check_schema_exists", "macro_sql": "{% macro default__check_schema_exists(information_schema, schema) -%}\n {% set sql -%}\n select count(*)\n from {{ information_schema.replace(information_schema_view='SCHEMATA') }}\n where catalog_name='{{ information_schema.database }}'\n and schema_name='{{ schema }}'\n {%- endset %}\n {{ return(run_query(sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.replace", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "schema", "type": null, "description": ""}], "created_at": 1783450492.338883, "supported_languages": null}, "macro.dbt.list_relations_without_caching": {"name": "list_relations_without_caching", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.list_relations_without_caching", "macro_sql": "{% macro list_relations_without_caching(schema_relation) %}\n {{ return(adapter.dispatch('list_relations_without_caching', 'dbt')(schema_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__list_relations_without_caching"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_relation", "type": null, "description": ""}], "created_at": 1783450492.3392484, "supported_languages": null}, "macro.dbt.default__list_relations_without_caching": {"name": "default__list_relations_without_caching", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__list_relations_without_caching", "macro_sql": "{% macro default__list_relations_without_caching(schema_relation) %}\n {{ exceptions.raise_not_implemented(\n 'list_relations_without_caching macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_relation", "type": null, "description": ""}], "created_at": 1783450492.33959, "supported_languages": null}, "macro.dbt.list_function_relations_without_caching": {"name": "list_function_relations_without_caching", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.list_function_relations_without_caching", "macro_sql": "{% macro list_function_relations_without_caching(schema_relation) %}\n {{ return(adapter.dispatch('list_function_relations_without_caching', 'dbt')(schema_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__list_function_relations_without_caching"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_relation", "type": null, "description": ""}], "created_at": 1783450492.3399518, "supported_languages": null}, "macro.dbt.default__list_function_relations_without_caching": {"name": "default__list_function_relations_without_caching", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__list_function_relations_without_caching", "macro_sql": "{% macro default__list_function_relations_without_caching(schema_relation) %}\n {{ exceptions.raise_not_implemented(\n 'list_function_relations_without_caching macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_relation", "type": null, "description": ""}], "created_at": 1783450492.340269, "supported_languages": null}, "macro.dbt.get_catalog_for_single_relation": {"name": "get_catalog_for_single_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_catalog_for_single_relation", "macro_sql": "{% macro get_catalog_for_single_relation(relation) %}\n {{ return(adapter.dispatch('get_catalog_for_single_relation', 'dbt')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_catalog_for_single_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.34065, "supported_languages": null}, "macro.dbt.default__get_catalog_for_single_relation": {"name": "default__get_catalog_for_single_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_catalog_for_single_relation", "macro_sql": "{% macro default__get_catalog_for_single_relation(relation) %}\n {{ exceptions.raise_not_implemented(\n 'get_catalog_for_single_relation macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.34097, "supported_languages": null}, "macro.dbt.get_relations": {"name": "get_relations", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_relations", "macro_sql": "{% macro get_relations() %}\n {{ return(adapter.dispatch('get_relations', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.3412943, "supported_languages": null}, "macro.dbt.default__get_relations": {"name": "default__get_relations", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_relations", "macro_sql": "{% macro default__get_relations() %}\n {{ exceptions.raise_not_implemented(\n 'get_relations macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.341617, "supported_languages": null}, "macro.dbt.get_relation_last_modified": {"name": "get_relation_last_modified", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_relation_last_modified", "macro_sql": "{% macro get_relation_last_modified(information_schema, relations) %}\n {{ return(adapter.dispatch('get_relation_last_modified', 'dbt')(information_schema, relations)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_relation_last_modified"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "relations", "type": null, "description": ""}], "created_at": 1783450492.3420196, "supported_languages": null}, "macro.dbt.default__get_relation_last_modified": {"name": "default__get_relation_last_modified", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_relation_last_modified", "macro_sql": "{% macro default__get_relation_last_modified(information_schema, relations) %}\n {{ exceptions.raise_not_implemented(\n 'get_relation_last_modified macro not implemented for adapter ' + adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "relations", "type": null, "description": ""}], "created_at": 1783450492.3423555, "supported_languages": null}, "macro.dbt.make_intermediate_relation": {"name": "make_intermediate_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.make_intermediate_relation", "macro_sql": "{% macro make_intermediate_relation(base_relation, suffix='__dbt_tmp') %}\n {{ return(adapter.dispatch('make_intermediate_relation', 'dbt')(base_relation, suffix)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_intermediate_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1783450492.3436646, "supported_languages": null}, "macro.dbt.default__make_intermediate_relation": {"name": "default__make_intermediate_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__make_intermediate_relation", "macro_sql": "{% macro default__make_intermediate_relation(base_relation, suffix) %}\n {{ return(default__make_temp_relation(base_relation, suffix)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1783450492.3439977, "supported_languages": null}, "macro.dbt.make_temp_relation": {"name": "make_temp_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.make_temp_relation", "macro_sql": "{% macro make_temp_relation(base_relation, suffix='__dbt_tmp') %}\n {#-- This ensures microbatch batches get unique temp relations to avoid clobbering --#}\n {% if suffix == '__dbt_tmp' and model.batch %}\n {% set suffix = suffix ~ '_' ~ model.batch.id %}\n {% endif %}\n\n {{ return(adapter.dispatch('make_temp_relation', 'dbt')(base_relation, suffix)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1783450492.3447714, "supported_languages": null}, "macro.dbt.default__make_temp_relation": {"name": "default__make_temp_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__make_temp_relation", "macro_sql": "{% macro default__make_temp_relation(base_relation, suffix) %}\n {%- set temp_identifier = base_relation.identifier ~ suffix -%}\n {%- set temp_relation = base_relation.incorporate(\n path={\"identifier\": temp_identifier}) -%}\n\n {{ return(temp_relation) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1783450492.3453445, "supported_languages": null}, "macro.dbt.make_backup_relation": {"name": "make_backup_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.make_backup_relation", "macro_sql": "{% macro make_backup_relation(base_relation, backup_relation_type, suffix='__dbt_backup') %}\n {{ return(adapter.dispatch('make_backup_relation', 'dbt')(base_relation, backup_relation_type, suffix)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_backup_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "backup_relation_type", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1783450492.3458438, "supported_languages": null}, "macro.dbt.default__make_backup_relation": {"name": "default__make_backup_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__make_backup_relation", "macro_sql": "{% macro default__make_backup_relation(base_relation, backup_relation_type, suffix) %}\n {%- set backup_identifier = base_relation.identifier ~ suffix -%}\n {%- set backup_relation = base_relation.incorporate(\n path={\"identifier\": backup_identifier},\n type=backup_relation_type\n ) -%}\n {{ return(backup_relation) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "backup_relation_type", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1783450492.3466043, "supported_languages": null}, "macro.dbt.truncate_relation": {"name": "truncate_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.truncate_relation", "macro_sql": "{% macro truncate_relation(relation) -%}\n {{ return(adapter.dispatch('truncate_relation', 'dbt')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__truncate_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.3469636, "supported_languages": null}, "macro.dbt.default__truncate_relation": {"name": "default__truncate_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__truncate_relation", "macro_sql": "{% macro default__truncate_relation(relation) -%}\n {% call statement('truncate_relation') -%}\n truncate table {{ relation.render() }}\n {%- endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.3473208, "supported_languages": null}, "macro.dbt.get_or_create_relation": {"name": "get_or_create_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.get_or_create_relation", "macro_sql": "{% macro get_or_create_relation(database, schema, identifier, type) -%}\n {{ return(adapter.dispatch('get_or_create_relation', 'dbt')(database, schema, identifier, type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_or_create_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}, {"name": "schema", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1783450492.3478105, "supported_languages": null}, "macro.dbt.default__get_or_create_relation": {"name": "default__get_or_create_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__get_or_create_relation", "macro_sql": "{% macro default__get_or_create_relation(database, schema, identifier, type) %}\n {%- set target_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) %}\n\n {% if target_relation %}\n {% do return([true, target_relation]) %}\n {% endif %}\n\n {%- set new_relation = api.Relation.create(\n database=database,\n schema=schema,\n identifier=identifier,\n type=type\n ) -%}\n {% do return([false, new_relation]) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}, {"name": "schema", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1783450492.3488665, "supported_languages": null}, "macro.dbt.load_cached_relation": {"name": "load_cached_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.load_cached_relation", "macro_sql": "{% macro load_cached_relation(relation) %}\n {% do return(adapter.get_relation(\n database=relation.database,\n schema=relation.schema,\n identifier=relation.identifier\n )) -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.3493063, "supported_languages": null}, "macro.dbt.load_relation": {"name": "load_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.load_relation", "macro_sql": "{% macro load_relation(relation) %}\n {{ return(load_cached_relation(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.3496125, "supported_languages": null}, "macro.dbt.create_schema": {"name": "create_schema", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "unique_id": "macro.dbt.create_schema", "macro_sql": "{% macro create_schema(relation) -%}\n {{ adapter.dispatch('create_schema', 'dbt')(relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__create_schema"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.3502226, "supported_languages": null}, "macro.dbt.default__create_schema": {"name": "default__create_schema", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "unique_id": "macro.dbt.default__create_schema", "macro_sql": "{% macro default__create_schema(relation) -%}\n {%- call statement('create_schema') -%}\n create schema if not exists {{ relation.without_identifier() }}\n {% endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.3506143, "supported_languages": null}, "macro.dbt.drop_schema": {"name": "drop_schema", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "unique_id": "macro.dbt.drop_schema", "macro_sql": "{% macro drop_schema(relation) -%}\n {{ adapter.dispatch('drop_schema', 'dbt')(relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__drop_schema"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.3509364, "supported_languages": null}, "macro.dbt.default__drop_schema": {"name": "default__drop_schema", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "unique_id": "macro.dbt.default__drop_schema", "macro_sql": "{% macro default__drop_schema(relation) -%}\n {%- call statement('drop_schema') -%}\n drop schema if exists {{ relation.without_identifier() }} cascade\n {% endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.3512967, "supported_languages": null}, "macro.dbt.collect_freshness": {"name": "collect_freshness", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "unique_id": "macro.dbt.collect_freshness", "macro_sql": "{% macro collect_freshness(source, loaded_at_field, filter) %}\n {{ return(adapter.dispatch('collect_freshness', 'dbt')(source, loaded_at_field, filter))}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source", "type": null, "description": ""}, {"name": "loaded_at_field", "type": null, "description": ""}, {"name": "filter", "type": null, "description": ""}], "created_at": 1783450492.352173, "supported_languages": null}, "macro.dbt.default__collect_freshness": {"name": "default__collect_freshness", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "unique_id": "macro.dbt.default__collect_freshness", "macro_sql": "{% macro default__collect_freshness(source, loaded_at_field, filter) %}\n {% call statement('collect_freshness', fetch_result=True, auto_begin=False) -%}\n select\n max({{ loaded_at_field }}) as max_loaded_at,\n {{ current_timestamp() }} as snapshotted_at\n from {{ source }}\n {% if filter %}\n where {{ filter }}\n {% endif %}\n {% endcall %}\n {{ return(load_result('collect_freshness')) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source", "type": null, "description": ""}, {"name": "loaded_at_field", "type": null, "description": ""}, {"name": "filter", "type": null, "description": ""}], "created_at": 1783450492.353004, "supported_languages": null}, "macro.dbt.collect_freshness_custom_sql": {"name": "collect_freshness_custom_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "unique_id": "macro.dbt.collect_freshness_custom_sql", "macro_sql": "{% macro collect_freshness_custom_sql(source, loaded_at_query) %}\n {{ return(adapter.dispatch('collect_freshness_custom_sql', 'dbt')(source, loaded_at_query))}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__collect_freshness_custom_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source", "type": null, "description": ""}, {"name": "loaded_at_query", "type": null, "description": ""}], "created_at": 1783450492.3534296, "supported_languages": null}, "macro.dbt.default__collect_freshness_custom_sql": {"name": "default__collect_freshness_custom_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "unique_id": "macro.dbt.default__collect_freshness_custom_sql", "macro_sql": "{% macro default__collect_freshness_custom_sql(source, loaded_at_query) %}\n {% call statement('collect_freshness_custom_sql', fetch_result=True, auto_begin=False) -%}\n with source_query as (\n {{ loaded_at_query }}\n )\n select\n (select * from source_query) as max_loaded_at,\n {{ current_timestamp() }} as snapshotted_at\n {% endcall %}\n {{ return(load_result('collect_freshness_custom_sql')) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source", "type": null, "description": ""}, {"name": "loaded_at_query", "type": null, "description": ""}], "created_at": 1783450492.3540502, "supported_languages": null}, "macro.dbt.alter_column_comment": {"name": "alter_column_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.alter_column_comment", "macro_sql": "{% macro alter_column_comment(relation, column_dict) -%}\n {{ return(adapter.dispatch('alter_column_comment', 'dbt')(relation, column_dict)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "column_dict", "type": null, "description": ""}], "created_at": 1783450492.3552794, "supported_languages": null}, "macro.dbt.default__alter_column_comment": {"name": "default__alter_column_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.default__alter_column_comment", "macro_sql": "{% macro default__alter_column_comment(relation, column_dict) -%}\n {{ exceptions.raise_not_implemented(\n 'alter_column_comment macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "column_dict", "type": null, "description": ""}], "created_at": 1783450492.3557494, "supported_languages": null}, "macro.dbt.alter_relation_comment": {"name": "alter_relation_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.alter_relation_comment", "macro_sql": "{% macro alter_relation_comment(relation, relation_comment) -%}\n {{ return(adapter.dispatch('alter_relation_comment', 'dbt')(relation, relation_comment)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__alter_relation_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "relation_comment", "type": null, "description": ""}], "created_at": 1783450492.3561523, "supported_languages": null}, "macro.dbt.default__alter_relation_comment": {"name": "default__alter_relation_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.default__alter_relation_comment", "macro_sql": "{% macro default__alter_relation_comment(relation, relation_comment) -%}\n {{ exceptions.raise_not_implemented(\n 'alter_relation_comment macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "relation_comment", "type": null, "description": ""}], "created_at": 1783450492.3565025, "supported_languages": null}, "macro.dbt.persist_docs": {"name": "persist_docs", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.persist_docs", "macro_sql": "{% macro persist_docs(relation, model, for_relation=true, for_columns=true) -%}\n {{ return(adapter.dispatch('persist_docs', 'dbt')(relation, model, for_relation, for_columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "model", "type": null, "description": ""}, {"name": "for_relation", "type": null, "description": ""}, {"name": "for_columns", "type": null, "description": ""}], "created_at": 1783450492.3570192, "supported_languages": null}, "macro.dbt.validate_doc_columns": {"name": "validate_doc_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.validate_doc_columns", "macro_sql": "{% macro validate_doc_columns(relation, column_dict, existing_column_names) %}\n {% set existing_lower = existing_column_names | map(\"lower\") | list %}\n {% set missing = [] %}\n {% set filtered = {} %}\n {% for col_name in column_dict %}\n {% set is_quoted = column_dict[col_name]['quote'] %}\n {% if is_quoted %}\n {% set present = col_name in existing_column_names %}\n {% else %}\n {% set present = col_name | lower in existing_lower %}\n {% endif %}\n {% if present %}\n {% do filtered.update({col_name: column_dict[col_name]}) %}\n {% else %}\n {% do missing.append(col_name) %}\n {% endif %}\n {% endfor %}\n {% if missing | length > 0 %}\n {{ exceptions.warn(\"In relation \" ~ relation.render() ~ \": The following columns are specified in the schema but are not present in the database: \" ~ missing | join(\", \")) }}\n {% endif %}\n {{ return(filtered) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "column_dict", "type": null, "description": ""}, {"name": "existing_column_names", "type": null, "description": ""}], "created_at": 1783450492.359077, "supported_languages": null}, "macro.dbt.default__persist_docs": {"name": "default__persist_docs", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.default__persist_docs", "macro_sql": "{% macro default__persist_docs(relation, model, for_relation, for_columns) -%}\n {% if for_relation and config.persist_relation_docs() and model.description %}\n {% do run_query(alter_relation_comment(relation, model.description)) %}\n {% endif %}\n\n {% if for_columns and config.persist_column_docs() and model.columns %}\n {% set existing_columns = adapter.get_columns_in_relation(relation) | map(attribute=\"name\") | list %}\n {% set filtered_columns = validate_doc_columns(relation, model.columns, existing_columns) %}\n {% set alter_comment_sql = alter_column_comment(relation, filtered_columns) %}\n {% if alter_comment_sql and alter_comment_sql | trim | length > 0 %}\n {% do run_query(alter_comment_sql) %}\n {% endif %}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.alter_relation_comment", "macro.dbt.validate_doc_columns", "macro.dbt.alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "model", "type": null, "description": ""}, {"name": "for_relation", "type": null, "description": ""}, {"name": "for_columns", "type": null, "description": ""}], "created_at": 1783450492.3607044, "supported_languages": null}, "macro.dbt.validate_sql": {"name": "validate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/validate_sql.sql", "original_file_path": "macros/adapters/validate_sql.sql", "unique_id": "macro.dbt.validate_sql", "macro_sql": "{% macro validate_sql(sql) -%}\n {{ return(adapter.dispatch('validate_sql', 'dbt')(sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__validate_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.3612602, "supported_languages": null}, "macro.dbt.default__validate_sql": {"name": "default__validate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/validate_sql.sql", "original_file_path": "macros/adapters/validate_sql.sql", "unique_id": "macro.dbt.default__validate_sql", "macro_sql": "{% macro default__validate_sql(sql) -%}\n {% call statement('validate_sql') -%}\n explain {{ sql }}\n {% endcall %}\n {{ return(load_result('validate_sql')) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.361727, "supported_languages": null}, "macro.dbt.convert_datetime": {"name": "convert_datetime", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "unique_id": "macro.dbt.convert_datetime", "macro_sql": "{% macro convert_datetime(date_str, date_fmt) %}\n\n {% set error_msg -%}\n The provided partition date '{{ date_str }}' does not match the expected format '{{ date_fmt }}'\n {%- endset %}\n\n {% set res = try_or_compiler_error(error_msg, modules.datetime.datetime.strptime, date_str.strip(), date_fmt) %}\n {{ return(res) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "date_str", "type": null, "description": ""}, {"name": "date_fmt", "type": null, "description": ""}], "created_at": 1783450492.3631403, "supported_languages": null}, "macro.dbt.dates_in_range": {"name": "dates_in_range", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "unique_id": "macro.dbt.dates_in_range", "macro_sql": "{% macro dates_in_range(start_date_str, end_date_str=none, in_fmt=\"%Y%m%d\", out_fmt=\"%Y%m%d\") %}\n {% set end_date_str = start_date_str if end_date_str is none else end_date_str %}\n\n {% set start_date = convert_datetime(start_date_str, in_fmt) %}\n {% set end_date = convert_datetime(end_date_str, in_fmt) %}\n\n {% set day_count = (end_date - start_date).days %}\n {% if day_count < 0 %}\n {% set msg -%}\n Partition start date is after the end date ({{ start_date }}, {{ end_date }})\n {%- endset %}\n\n {{ exceptions.raise_compiler_error(msg, model) }}\n {% endif %}\n\n {% set date_list = [] %}\n {% for i in range(0, day_count + 1) %}\n {% set the_date = (modules.datetime.timedelta(days=i) + start_date) %}\n {% if not out_fmt %}\n {% set _ = date_list.append(the_date) %}\n {% else %}\n {% set _ = date_list.append(the_date.strftime(out_fmt)) %}\n {% endif %}\n {% endfor %}\n\n {{ return(date_list) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.convert_datetime"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date_str", "type": null, "description": ""}, {"name": "end_date_str", "type": null, "description": ""}, {"name": "in_fmt", "type": null, "description": ""}, {"name": "out_fmt", "type": null, "description": ""}], "created_at": 1783450492.3654633, "supported_languages": null}, "macro.dbt.partition_range": {"name": "partition_range", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "unique_id": "macro.dbt.partition_range", "macro_sql": "{% macro partition_range(raw_partition_date, date_fmt='%Y%m%d') %}\n {% set partition_range = (raw_partition_date | string).split(\",\") %}\n\n {% if (partition_range | length) == 1 %}\n {% set start_date = partition_range[0] %}\n {% set end_date = none %}\n {% elif (partition_range | length) == 2 %}\n {% set start_date = partition_range[0] %}\n {% set end_date = partition_range[1] %}\n {% else %}\n {{ exceptions.raise_compiler_error(\"Invalid partition time. Expected format: {Start Date}[,{End Date}]. Got: \" ~ raw_partition_date) }}\n {% endif %}\n\n {{ return(dates_in_range(start_date, end_date, in_fmt=date_fmt)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.dates_in_range"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "raw_partition_date", "type": null, "description": ""}, {"name": "date_fmt", "type": null, "description": ""}], "created_at": 1783450492.3670247, "supported_languages": null}, "macro.dbt.py_current_timestring": {"name": "py_current_timestring", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "unique_id": "macro.dbt.py_current_timestring", "macro_sql": "{% macro py_current_timestring() %}\n {% set dt = modules.datetime.datetime.now() %}\n {% do return(dt.strftime(\"%Y%m%d%H%M%S%f\")) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.3674965, "supported_languages": null}, "macro.dbt.statement": {"name": "statement", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "unique_id": "macro.dbt.statement", "macro_sql": "\n{%- macro statement(name=None, fetch_result=False, auto_begin=True, language='sql') -%}\n {%- if execute: -%}\n {%- set compiled_code = caller() -%}\n\n {%- if name == 'main' -%}\n {{ log('Writing runtime {} for node \"{}\"'.format(language, model['unique_id'])) }}\n {{ write(compiled_code) }}\n {%- endif -%}\n {%- if language == 'sql'-%}\n {%- set res, table = adapter.execute(compiled_code, auto_begin=auto_begin, fetch=fetch_result) -%}\n {%- elif language == 'python' -%}\n {%- set res = submit_python_job(model, compiled_code) -%}\n {#-- TODO: What should table be for python models? --#}\n {%- set table = None -%}\n {%- else -%}\n {% do exceptions.raise_compiler_error(\"statement macro didn't get supported language\") %}\n {%- endif -%}\n\n {%- if name is not none -%}\n {{ store_result(name, response=res, agate_table=table) }}\n {%- endif -%}\n\n {%- endif -%}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "name", "type": null, "description": ""}, {"name": "fetch_result", "type": null, "description": ""}, {"name": "auto_begin", "type": null, "description": ""}, {"name": "language", "type": null, "description": ""}], "created_at": 1783450492.3699744, "supported_languages": null}, "macro.dbt.noop_statement": {"name": "noop_statement", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "unique_id": "macro.dbt.noop_statement", "macro_sql": "{% macro noop_statement(name=None, message=None, code=None, rows_affected=None, res=None) -%}\n {%- set sql = caller() -%}\n\n {%- if name == 'main' -%}\n {{ log('Writing runtime SQL for node \"{}\"'.format(model['unique_id'])) }}\n {{ write(sql) }}\n {%- endif -%}\n\n {%- if name is not none -%}\n {{ store_raw_result(name, message=message, code=code, rows_affected=rows_affected, agate_table=res) }}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "name", "type": null, "description": ""}, {"name": "message", "type": null, "description": ""}, {"name": "code", "type": null, "description": ""}, {"name": "rows_affected", "type": null, "description": ""}, {"name": "res", "type": null, "description": ""}], "created_at": 1783450492.3711119, "supported_languages": null}, "macro.dbt.run_query": {"name": "run_query", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "unique_id": "macro.dbt.run_query", "macro_sql": "{% macro run_query(sql) %}\n {% call statement(\"run_query_statement\", fetch_result=true, auto_begin=false) %}\n {{ sql }}\n {% endcall %}\n\n {% do return(load_result(\"run_query_statement\").table) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.3717055, "supported_languages": null}, "macro.dbt.set_sql_header": {"name": "set_sql_header", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "unique_id": "macro.dbt.set_sql_header", "macro_sql": "{% macro set_sql_header(config) -%}\n {{ config.set('sql_header', caller()) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "config", "type": null, "description": ""}], "created_at": 1783450492.372281, "supported_languages": null}, "macro.dbt.should_full_refresh": {"name": "should_full_refresh", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "unique_id": "macro.dbt.should_full_refresh", "macro_sql": "{% macro should_full_refresh() %}\n {% set config_full_refresh = config.get('full_refresh') %}\n {% if config_full_refresh is none %}\n {% set config_full_refresh = flags.FULL_REFRESH %}\n {% endif %}\n {% do return(config_full_refresh) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.372893, "supported_languages": null}, "macro.dbt.should_store_failures": {"name": "should_store_failures", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "unique_id": "macro.dbt.should_store_failures", "macro_sql": "{% macro should_store_failures() %}\n {% set config_store_failures = config.get('store_failures') %}\n {% if config_store_failures is none %}\n {% set config_store_failures = flags.STORE_FAILURES %}\n {% endif %}\n {% do return(config_store_failures) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.3735058, "supported_languages": null}, "macro.dbt.run_hooks": {"name": "run_hooks", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.run_hooks", "macro_sql": "{% macro run_hooks(hooks, inside_transaction=True) %}\n {% for hook in hooks | selectattr('transaction', 'equalto', inside_transaction) %}\n {% if not inside_transaction and loop.first %}\n {% call statement(auto_begin=inside_transaction) %}\n commit;\n {% endcall %}\n {% endif %}\n {% set rendered = render(hook.get('sql')) | trim %}\n {% if (rendered | length) > 0 %}\n {% call statement(auto_begin=inside_transaction) %}\n {{ rendered }}\n {% endcall %}\n {% endif %}\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "hooks", "type": null, "description": ""}, {"name": "inside_transaction", "type": null, "description": ""}], "created_at": 1783450492.3751717, "supported_languages": null}, "macro.dbt.make_hook_config": {"name": "make_hook_config", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.make_hook_config", "macro_sql": "{% macro make_hook_config(sql, inside_transaction) %}\n {{ tojson({\"sql\": sql, \"transaction\": inside_transaction}) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}, {"name": "inside_transaction", "type": null, "description": ""}], "created_at": 1783450492.3755856, "supported_languages": null}, "macro.dbt.before_begin": {"name": "before_begin", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.before_begin", "macro_sql": "{% macro before_begin(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.375878, "supported_languages": null}, "macro.dbt.in_transaction": {"name": "in_transaction", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.in_transaction", "macro_sql": "{% macro in_transaction(sql) %}\n {{ make_hook_config(sql, inside_transaction=True) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.3761723, "supported_languages": null}, "macro.dbt.after_commit": {"name": "after_commit", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.after_commit", "macro_sql": "{% macro after_commit(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.3764844, "supported_languages": null}, "macro.dbt.materialization_view_default": {"name": "materialization_view_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/view.sql", "original_file_path": "macros/materializations/models/view.sql", "unique_id": "macro.dbt.materialization_view_default", "macro_sql": "{%- materialization view, default -%}\n\n {%- set existing_relation = load_cached_relation(this) -%}\n {%- set target_relation = this.incorporate(type='view') -%}\n {%- set intermediate_relation = make_intermediate_relation(target_relation) -%}\n\n -- the intermediate_relation should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation\n {%- set preexisting_intermediate_relation = load_cached_relation(intermediate_relation) -%}\n /*\n This relation (probably) doesn't exist yet. If it does exist, it's a leftover from\n a previous run, and we're going to try to drop it immediately. At the end of this\n materialization, we're going to rename the \"existing_relation\" to this identifier,\n and then we're going to drop it. In order to make sure we run the correct one of:\n - drop view ...\n - drop table ...\n\n We need to set the type of this relation to be the type of the existing_relation, if it exists,\n or else \"view\" as a sane default if it does not. Note that if the existing_relation does not\n exist, then there is nothing to move out of the way and subsequentally drop. In that case,\n this relation will be effectively unused.\n */\n {%- set backup_relation_type = 'view' if existing_relation is none else existing_relation.type -%}\n {%- set backup_relation = make_backup_relation(target_relation, backup_relation_type) -%}\n -- as above, the backup_relation should not already exist\n {%- set preexisting_backup_relation = load_cached_relation(backup_relation) -%}\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- drop the temp relations if they exist already in the database\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_view_as_sql(intermediate_relation, sql) }}\n {%- endcall %}\n\n -- cleanup\n -- move the existing view out of the way\n {% if existing_relation is not none %}\n /* Do the equivalent of rename_if_exists. 'existing_relation' could have been dropped\n since the variable was first set. */\n {% set existing_relation = load_cached_relation(existing_relation) %}\n {% if existing_relation is not none %}\n {{ adapter.rename_relation(existing_relation, backup_relation) }}\n {% endif %}\n {% endif %}\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n {{ drop_relation_if_exists(backup_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization -%}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.run_hooks", "macro.dbt.drop_relation_if_exists", "macro.dbt.statement", "macro.dbt.get_create_view_as_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1783450492.380733, "supported_languages": ["sql"]}, "macro.dbt.materialization_materialized_view_default": {"name": "materialization_materialized_view_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialization_materialized_view_default", "macro_sql": "{% materialization materialized_view, default %}\n {% set existing_relation = load_cached_relation(this) %}\n {% set target_relation = this.incorporate(type=this.MaterializedView) %}\n {% set intermediate_relation = make_intermediate_relation(target_relation) %}\n {% set backup_relation_type = target_relation.MaterializedView if existing_relation is none else existing_relation.type %}\n {% set backup_relation = make_backup_relation(target_relation, backup_relation_type) %}\n\n {{ materialized_view_setup(backup_relation, intermediate_relation, pre_hooks) }}\n\n {% set build_sql = materialized_view_get_build_sql(existing_relation, target_relation, backup_relation, intermediate_relation) %}\n\n {% if build_sql == '' %}\n {{ materialized_view_execute_no_op(target_relation) }}\n {% else %}\n {{ materialized_view_execute_build_sql(build_sql, existing_relation, target_relation, post_hooks) }}\n {% endif %}\n\n {{ materialized_view_teardown(backup_relation, intermediate_relation, post_hooks) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.materialized_view_setup", "macro.dbt.materialized_view_get_build_sql", "macro.dbt.materialized_view_execute_no_op", "macro.dbt.materialized_view_execute_build_sql", "macro.dbt.materialized_view_teardown"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1783450492.383766, "supported_languages": ["sql"]}, "macro.dbt.materialized_view_setup": {"name": "materialized_view_setup", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_setup", "macro_sql": "{% macro materialized_view_setup(backup_relation, intermediate_relation, pre_hooks) %}\n\n -- backup_relation and intermediate_relation should not already exist in the database\n -- it's possible these exist because of a previous run that exited unexpectedly\n {% set preexisting_backup_relation = load_cached_relation(backup_relation) %}\n {% set preexisting_intermediate_relation = load_cached_relation(intermediate_relation) %}\n\n -- drop the temp relations if they exist already in the database\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "backup_relation", "type": null, "description": ""}, {"name": "intermediate_relation", "type": null, "description": ""}, {"name": "pre_hooks", "type": null, "description": ""}], "created_at": 1783450492.3845472, "supported_languages": null}, "macro.dbt.materialized_view_teardown": {"name": "materialized_view_teardown", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_teardown", "macro_sql": "{% macro materialized_view_teardown(backup_relation, intermediate_relation, post_hooks) %}\n\n -- drop the temp relations if they exist to leave the database clean for the next run\n {{ drop_relation_if_exists(backup_relation) }}\n {{ drop_relation_if_exists(intermediate_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "backup_relation", "type": null, "description": ""}, {"name": "intermediate_relation", "type": null, "description": ""}, {"name": "post_hooks", "type": null, "description": ""}], "created_at": 1783450492.3850496, "supported_languages": null}, "macro.dbt.materialized_view_get_build_sql": {"name": "materialized_view_get_build_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_get_build_sql", "macro_sql": "{% macro materialized_view_get_build_sql(existing_relation, target_relation, backup_relation, intermediate_relation) %}\n\n {% set full_refresh_mode = should_full_refresh() %}\n\n -- determine the scenario we're in: create, full_refresh, alter, refresh data\n {% if existing_relation is none %}\n {% set build_sql = get_create_materialized_view_as_sql(target_relation, sql) %}\n {% elif full_refresh_mode or not existing_relation.is_materialized_view %}\n {% set build_sql = get_replace_sql(existing_relation, target_relation, sql) %}\n {% else %}\n\n -- get config options\n {% set on_configuration_change = config.get('on_configuration_change') %}\n {% set configuration_changes = get_materialized_view_configuration_changes(existing_relation, config) %}\n\n {% if configuration_changes is none %}\n {% set build_sql = refresh_materialized_view(target_relation) %}\n\n {% elif on_configuration_change == 'apply' %}\n {% set build_sql = get_alter_materialized_view_as_sql(target_relation, configuration_changes, sql, existing_relation, backup_relation, intermediate_relation) %}\n {% elif on_configuration_change == 'continue' %}\n {% set build_sql = '' %}\n {{ exceptions.warn(\"Configuration changes were identified and `on_configuration_change` was set to `continue` for `\" ~ target_relation.render() ~ \"`\") }}\n {% elif on_configuration_change == 'fail' %}\n {{ exceptions.raise_fail_fast_error(\"Configuration changes were identified and `on_configuration_change` was set to `fail` for `\" ~ target_relation.render() ~ \"`\") }}\n\n {% else %}\n -- this only happens if the user provides a value other than `apply`, 'skip', 'fail'\n {{ exceptions.raise_compiler_error(\"Unexpected configuration scenario\") }}\n\n {% endif %}\n\n {% endif %}\n\n {% do return(build_sql) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.should_full_refresh", "macro.dbt.get_create_materialized_view_as_sql", "macro.dbt.get_replace_sql", "macro.dbt.get_materialized_view_configuration_changes", "macro.dbt.refresh_materialized_view", "macro.dbt.get_alter_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "existing_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}, {"name": "backup_relation", "type": null, "description": ""}, {"name": "intermediate_relation", "type": null, "description": ""}], "created_at": 1783450492.3876164, "supported_languages": null}, "macro.dbt.materialized_view_execute_no_op": {"name": "materialized_view_execute_no_op", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_execute_no_op", "macro_sql": "{% macro materialized_view_execute_no_op(target_relation) %}\n {% do store_raw_result(\n name=\"main\",\n message=\"skip \" ~ target_relation,\n code=\"skip\",\n rows_affected=\"-1\"\n ) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}], "created_at": 1783450492.3880796, "supported_languages": null}, "macro.dbt.materialized_view_execute_build_sql": {"name": "materialized_view_execute_build_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_execute_build_sql", "macro_sql": "{% macro materialized_view_execute_build_sql(build_sql, existing_relation, target_relation, post_hooks) %}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set grant_config = config.get('grants') %}\n\n {% call statement(name=\"main\") %}\n {{ build_sql }}\n {% endcall %}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "build_sql", "type": null, "description": ""}, {"name": "existing_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}, {"name": "post_hooks", "type": null, "description": ""}], "created_at": 1783450492.38935, "supported_languages": null}, "macro.dbt.materialization_table_default": {"name": "materialization_table_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table.sql", "original_file_path": "macros/materializations/models/table.sql", "unique_id": "macro.dbt.materialization_table_default", "macro_sql": "{% materialization table, default %}\n\n {%- set existing_relation = load_cached_relation(this) -%}\n {%- set target_relation = this.incorporate(type='table') %}\n {%- set intermediate_relation = make_intermediate_relation(target_relation) -%}\n -- the intermediate_relation should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation\n {%- set preexisting_intermediate_relation = load_cached_relation(intermediate_relation) -%}\n /*\n See ../view/view.sql for more information about this relation.\n */\n {%- set backup_relation_type = 'table' if existing_relation is none else existing_relation.type -%}\n {%- set backup_relation = make_backup_relation(target_relation, backup_relation_type) -%}\n -- as above, the backup_relation should not already exist\n {%- set preexisting_backup_relation = load_cached_relation(backup_relation) -%}\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n\n -- drop the temp relations if they exist already in the database\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_table_as_sql(False, intermediate_relation, sql) }}\n {%- endcall %}\n\n {% do create_indexes(intermediate_relation) %}\n\n -- cleanup\n {% if existing_relation is not none %}\n /* Do the equivalent of rename_if_exists. 'existing_relation' could have been dropped\n since the variable was first set. */\n {% set existing_relation = load_cached_relation(existing_relation) %}\n {% if existing_relation is not none %}\n {{ adapter.rename_relation(existing_relation, backup_relation) }}\n {% endif %}\n {% endif %}\n\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n -- finally, drop the existing/backup relation after the commit\n {{ drop_relation_if_exists(backup_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.get_create_table_as_sql", "macro.dbt.create_indexes", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1783450492.3934221, "supported_languages": ["sql"]}, "macro.dbt.incremental_validate_on_schema_change": {"name": "incremental_validate_on_schema_change", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.incremental_validate_on_schema_change", "macro_sql": "{% macro incremental_validate_on_schema_change(on_schema_change, default='ignore') %}\n\n {% if on_schema_change not in ['sync_all_columns', 'append_new_columns', 'fail', 'ignore'] %}\n\n {% set log_message = 'Invalid value for on_schema_change (%s) specified. Setting default value of %s.' % (on_schema_change, default) %}\n {% do log(log_message) %}\n\n {{ return(default) }}\n\n {% else %}\n\n {{ return(on_schema_change) }}\n\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "on_schema_change", "type": null, "description": ""}, {"name": "default", "type": null, "description": ""}], "created_at": 1783450492.3958209, "supported_languages": null}, "macro.dbt.check_for_schema_changes": {"name": "check_for_schema_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.check_for_schema_changes", "macro_sql": "{% macro check_for_schema_changes(source_relation, target_relation) %}\n {{ return(adapter.dispatch('check_for_schema_changes', 'dbt')(source_relation, target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__check_for_schema_changes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1783450492.3962414, "supported_languages": null}, "macro.dbt.default__check_for_schema_changes": {"name": "default__check_for_schema_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.default__check_for_schema_changes", "macro_sql": "{% macro default__check_for_schema_changes(source_relation, target_relation) %}\n\n {% set schema_changed = False %}\n\n {%- set source_columns = adapter.get_columns_in_relation(source_relation) -%}\n {%- set target_columns = adapter.get_columns_in_relation(target_relation) -%}\n {%- set source_not_in_target = diff_columns(source_columns, target_columns) -%}\n {%- set target_not_in_source = diff_columns(target_columns, source_columns) -%}\n\n {% set new_target_types = diff_column_data_types(source_columns, target_columns) %}\n\n {% if source_not_in_target != [] %}\n {% set schema_changed = True %}\n {% elif target_not_in_source != [] or new_target_types != [] %}\n {% set schema_changed = True %}\n {% elif new_target_types != [] %}\n {% set schema_changed = True %}\n {% endif %}\n\n {% set changes_dict = {\n 'schema_changed': schema_changed,\n 'source_not_in_target': source_not_in_target,\n 'target_not_in_source': target_not_in_source,\n 'source_columns': source_columns,\n 'target_columns': target_columns,\n 'new_target_types': new_target_types\n } %}\n\n {% set msg %}\n In {{ target_relation }}:\n Schema changed: {{ schema_changed }}\n Source columns not in target: {{ source_not_in_target }}\n Target columns not in source: {{ target_not_in_source }}\n New column types: {{ new_target_types }}\n {% endset %}\n\n {% do log(msg) %}\n\n {{ return(changes_dict) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.diff_columns", "macro.dbt.diff_column_data_types"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1783450492.3987126, "supported_languages": null}, "macro.dbt.sync_column_schemas": {"name": "sync_column_schemas", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.sync_column_schemas", "macro_sql": "{% macro sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n {{ return(adapter.dispatch('sync_column_schemas', 'dbt')(on_schema_change, target_relation, schema_changes_dict)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__sync_column_schemas"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "on_schema_change", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}, {"name": "schema_changes_dict", "type": null, "description": ""}], "created_at": 1783450492.3991866, "supported_languages": null}, "macro.dbt.default__sync_column_schemas": {"name": "default__sync_column_schemas", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.default__sync_column_schemas", "macro_sql": "{% macro default__sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n\n {%- set add_to_target_arr = schema_changes_dict['source_not_in_target'] -%}\n {%- set remove_from_target_arr = schema_changes_dict['target_not_in_source'] -%}\n {%- set new_target_types = schema_changes_dict['new_target_types'] -%}\n\n {%- if on_schema_change == 'append_new_columns'-%}\n {%- if add_to_target_arr | length > 0 -%}\n {%- do alter_relation_add_remove_columns(target_relation, add_to_target_arr, none) -%}\n {%- endif -%}\n\n {% elif on_schema_change == 'sync_all_columns' %}\n\n {% if add_to_target_arr | length > 0 or remove_from_target_arr | length > 0 %}\n {%- do alter_relation_add_remove_columns(target_relation, add_to_target_arr, remove_from_target_arr) -%}\n {% endif %}\n\n {% if new_target_types != [] %}\n {% for ntt in new_target_types %}\n {% set column_name = ntt['column_name'] %}\n {% set new_type = ntt['new_type'] %}\n {% do alter_column_type(target_relation, column_name, new_type) %}\n {% endfor %}\n {% endif %}\n\n {% endif %}\n\n {% set schema_change_message %}\n In {{ target_relation }}:\n Schema change approach: {{ on_schema_change }}\n Columns added: {{ add_to_target_arr }}\n Columns removed: {{ remove_from_target_arr }}\n Data types changed: {{ new_target_types }}\n {% endset %}\n\n {% do log(schema_change_message) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.alter_relation_add_remove_columns", "macro.dbt.alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "on_schema_change", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}, {"name": "schema_changes_dict", "type": null, "description": ""}], "created_at": 1783450492.4015126, "supported_languages": null}, "macro.dbt.process_schema_changes": {"name": "process_schema_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.process_schema_changes", "macro_sql": "{% macro process_schema_changes(on_schema_change, source_relation, target_relation) %}\n {{ return(adapter.dispatch('process_schema_changes', 'dbt')(on_schema_change, source_relation, target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__process_schema_changes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "on_schema_change", "type": null, "description": ""}, {"name": "source_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1783450492.4019842, "supported_languages": null}, "macro.dbt.default__process_schema_changes": {"name": "default__process_schema_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.default__process_schema_changes", "macro_sql": "{% macro default__process_schema_changes(on_schema_change, source_relation, target_relation) %}\n\n {% if on_schema_change == 'ignore' %}\n\n {{ return({}) }}\n\n {% else %}\n\n {% set schema_changes_dict = check_for_schema_changes(source_relation, target_relation) %}\n\n {% if schema_changes_dict['schema_changed'] %}\n\n {% if on_schema_change == 'fail' %}\n\n {% set fail_msg %}\n The source and target schemas on this incremental model are out of sync!\n They can be reconciled in several ways:\n - set the `on_schema_change` config to either append_new_columns or sync_all_columns, depending on your situation.\n - Re-run the incremental model with `full_refresh: True` to update the target schema.\n - update the schema manually and re-run the process.\n\n Additional troubleshooting context:\n Source columns not in target: {{ schema_changes_dict['source_not_in_target'] }}\n Target columns not in source: {{ schema_changes_dict['target_not_in_source'] }}\n New column types: {{ schema_changes_dict['new_target_types'] }}\n {% endset %}\n\n {% do exceptions.raise_compiler_error(fail_msg) %}\n\n {# -- unless we ignore, run the sync operation per the config #}\n {% else %}\n\n {% do sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n\n {% endif %}\n\n {% endif %}\n\n {{ return(schema_changes_dict['source_columns']) }}\n\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.check_for_schema_changes", "macro.dbt.sync_column_schemas"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "on_schema_change", "type": null, "description": ""}, {"name": "source_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1783450492.4036307, "supported_languages": null}, "macro.dbt.get_merge_sql": {"name": "get_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.get_merge_sql", "macro_sql": "{% macro get_merge_sql(target, source, unique_key, dest_columns, incremental_predicates=none) -%}\n -- back compat for old kwarg name\n {% set incremental_predicates = kwargs.get('predicates', incremental_predicates) %}\n {{ adapter.dispatch('get_merge_sql', 'dbt')(target, source, unique_key, dest_columns, incremental_predicates) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "unique_key", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}, {"name": "incremental_predicates", "type": null, "description": ""}], "created_at": 1783450492.405742, "supported_languages": null}, "macro.dbt.get_merge_unique_key_match": {"name": "get_merge_unique_key_match", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.get_merge_unique_key_match", "macro_sql": "{% macro get_merge_unique_key_match(source_unique_key, target_unique_key) %}\n {{ return(adapter.dispatch('get_merge_unique_key_match', 'dbt')(source_unique_key, target_unique_key)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_merge_unique_key_match"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_unique_key", "type": null, "description": ""}, {"name": "target_unique_key", "type": null, "description": ""}], "created_at": 1783450492.4061565, "supported_languages": null}, "macro.dbt.default__get_merge_unique_key_match": {"name": "default__get_merge_unique_key_match", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.default__get_merge_unique_key_match", "macro_sql": "{% macro default__get_merge_unique_key_match(source_unique_key, target_unique_key) -%}\n {{ return(equals(source_unique_key, target_unique_key) | trim) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.equals"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_unique_key", "type": null, "description": ""}, {"name": "target_unique_key", "type": null, "description": ""}], "created_at": 1783450492.406523, "supported_languages": null}, "macro.dbt.default__get_merge_sql": {"name": "default__get_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.default__get_merge_sql", "macro_sql": "{% macro default__get_merge_sql(target, source, unique_key, dest_columns, incremental_predicates=none) -%}\n {%- set predicates = [] if incremental_predicates is none else [] + incremental_predicates -%}\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n {%- set merge_update_columns = config.get('merge_update_columns') -%}\n {%- set merge_exclude_columns = config.get('merge_exclude_columns') -%}\n {%- set update_columns = get_merge_update_columns(merge_update_columns, merge_exclude_columns, dest_columns) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {% if unique_key %}\n {% if unique_key is sequence and unique_key is not mapping and unique_key is not string %}\n {% for key in unique_key %}\n {% set this_key_match %}\n DBT_INTERNAL_SOURCE.{{ key }} = DBT_INTERNAL_DEST.{{ key }}\n {% endset %}\n {% do predicates.append(this_key_match) %}\n {% endfor %}\n {% else %}\n {% set source_unique_key = (\"DBT_INTERNAL_SOURCE.\" ~ unique_key) | trim %}\n {% set target_unique_key = (\"DBT_INTERNAL_DEST.\" ~ unique_key) | trim %}\n {% set unique_key_match = get_merge_unique_key_match(source_unique_key, target_unique_key) %}\n {% do predicates.append(unique_key_match) %}\n {% endif %}\n {% else %}\n {% do predicates.append('FALSE') %}\n {% endif %}\n\n {{ sql_header if sql_header is not none }}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on {{\"(\" ~ predicates | join(\") and (\") ~ \")\"}}\n\n {% if unique_key %}\n when matched then update set\n {% for column_name in update_columns -%}\n {{ column_name }} = DBT_INTERNAL_SOURCE.{{ column_name }}\n {%- if not loop.last %}, {%- endif %}\n {%- endfor %}\n {% endif %}\n\n when not matched then insert\n ({{ dest_cols_csv }})\n values\n ({{ dest_cols_csv }})\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv", "macro.dbt.get_merge_update_columns", "macro.dbt.get_merge_unique_key_match"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "unique_key", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}, {"name": "incremental_predicates", "type": null, "description": ""}], "created_at": 1783450492.4099233, "supported_languages": null}, "macro.dbt.get_delete_insert_merge_sql": {"name": "get_delete_insert_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.get_delete_insert_merge_sql", "macro_sql": "{% macro get_delete_insert_merge_sql(target, source, unique_key, dest_columns, incremental_predicates) -%}\n {{ adapter.dispatch('get_delete_insert_merge_sql', 'dbt')(target, source, unique_key, dest_columns, incremental_predicates) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "unique_key", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}, {"name": "incremental_predicates", "type": null, "description": ""}], "created_at": 1783450492.4108872, "supported_languages": null}, "macro.dbt.default__get_delete_insert_merge_sql": {"name": "default__get_delete_insert_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.default__get_delete_insert_merge_sql", "macro_sql": "{% macro default__get_delete_insert_merge_sql(target, source, unique_key, dest_columns, incremental_predicates) -%}\n\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n\n {% if unique_key %}\n {% if unique_key is string %}\n {% set unique_key = [unique_key] %}\n {% endif %}\n\n {%- set unique_key_str = unique_key|join(', ') -%}\n\n delete from {{ target }} as DBT_INTERNAL_DEST\n where ({{ unique_key_str }}) in (\n select distinct {{ unique_key_str }}\n from {{ source }} as DBT_INTERNAL_SOURCE\n )\n {%- if incremental_predicates %}\n {% for predicate in incremental_predicates %}\n and {{ predicate }}\n {% endfor %}\n {%- endif -%};\n\n {% endif %}\n\n insert into {{ target }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ source }}\n )\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "unique_key", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}, {"name": "incremental_predicates", "type": null, "description": ""}], "created_at": 1783450492.412309, "supported_languages": null}, "macro.dbt.get_insert_overwrite_merge_sql": {"name": "get_insert_overwrite_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.get_insert_overwrite_merge_sql", "macro_sql": "{% macro get_insert_overwrite_merge_sql(target, source, dest_columns, predicates, include_sql_header=false) -%}\n {{ adapter.dispatch('get_insert_overwrite_merge_sql', 'dbt')(target, source, dest_columns, predicates, include_sql_header) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_insert_overwrite_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}, {"name": "predicates", "type": null, "description": ""}, {"name": "include_sql_header", "type": null, "description": ""}], "created_at": 1783450492.4128532, "supported_languages": null}, "macro.dbt.default__get_insert_overwrite_merge_sql": {"name": "default__get_insert_overwrite_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.default__get_insert_overwrite_merge_sql", "macro_sql": "{% macro default__get_insert_overwrite_merge_sql(target, source, dest_columns, predicates, include_sql_header) -%}\n {#-- The only time include_sql_header is True: --#}\n {#-- BigQuery + insert_overwrite strategy + \"static\" partitions config --#}\n {#-- We should consider including the sql header at the materialization level instead --#}\n\n {%- set predicates = [] if predicates is none else [] + predicates -%}\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none and include_sql_header }}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on FALSE\n\n when not matched by source\n {% if predicates %} and {{ predicates | join(' and ') }} {% endif %}\n then delete\n\n when not matched then insert\n ({{ dest_cols_csv }})\n values\n ({{ dest_cols_csv }})\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}, {"name": "predicates", "type": null, "description": ""}, {"name": "include_sql_header", "type": null, "description": ""}], "created_at": 1783450492.4141295, "supported_languages": null}, "macro.dbt.materialization_incremental_default": {"name": "materialization_incremental_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/incremental.sql", "original_file_path": "macros/materializations/models/incremental/incremental.sql", "unique_id": "macro.dbt.materialization_incremental_default", "macro_sql": "{% materialization incremental, default -%}\n\n -- relations\n {%- set existing_relation = load_cached_relation(this) -%}\n {%- set target_relation = this.incorporate(type='table') -%}\n {%- set temp_relation = make_temp_relation(target_relation)-%}\n {%- set intermediate_relation = make_intermediate_relation(target_relation)-%}\n {%- set backup_relation_type = 'table' if existing_relation is none else existing_relation.type -%}\n {%- set backup_relation = make_backup_relation(target_relation, backup_relation_type) -%}\n\n -- configs\n {%- set unique_key = config.get('unique_key') -%}\n {%- set full_refresh_mode = (should_full_refresh() or existing_relation.is_view) -%}\n {%- set on_schema_change = incremental_validate_on_schema_change(config.get('on_schema_change'), default='ignore') -%}\n\n -- the temp_ and backup_ relations should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation. This has to happen before\n -- BEGIN, in a separate transaction\n {%- set preexisting_intermediate_relation = load_cached_relation(intermediate_relation)-%}\n {%- set preexisting_backup_relation = load_cached_relation(backup_relation) -%}\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set to_drop = [] %}\n\n {% set incremental_strategy = config.get('incremental_strategy') or 'default' %}\n {% set strategy_sql_macro_func = adapter.get_incremental_strategy_macro(context, incremental_strategy) %}\n\n {% if existing_relation is none %}\n {% set build_sql = get_create_table_as_sql(False, target_relation, sql) %}\n {% set relation_for_indexes = target_relation %}\n {% elif full_refresh_mode %}\n {% set build_sql = get_create_table_as_sql(False, intermediate_relation, sql) %}\n {% set relation_for_indexes = intermediate_relation %}\n {% set need_swap = true %}\n {% else %}\n {% do run_query(get_create_table_as_sql(True, temp_relation, sql)) %}\n {% set relation_for_indexes = temp_relation %}\n {% set contract_config = config.get('contract') %}\n {% if not contract_config or not contract_config.enforced %}\n {% do adapter.expand_target_column_types(\n from_relation=temp_relation,\n to_relation=target_relation) %}\n {% endif %}\n {#-- Process schema changes. Returns dict of changes if successful. Use source columns for upserting/merging --#}\n {% set dest_columns = process_schema_changes(on_schema_change, temp_relation, existing_relation) %}\n {% if not dest_columns %}\n {% set dest_columns = adapter.get_columns_in_relation(existing_relation) %}\n {% endif %}\n\n {#-- Get the incremental_strategy, the macro to use for the strategy, and build the sql --#}\n {% set incremental_predicates = config.get('predicates', none) or config.get('incremental_predicates', none) %}\n {% set strategy_arg_dict = ({'target_relation': target_relation, 'temp_relation': temp_relation, 'unique_key': unique_key, 'dest_columns': dest_columns, 'incremental_predicates': incremental_predicates }) %}\n {% set build_sql = strategy_sql_macro_func(strategy_arg_dict) %}\n\n {% endif %}\n\n {% call statement(\"main\") %}\n {{ build_sql }}\n {% endcall %}\n\n {% if existing_relation is none or existing_relation.is_view or should_full_refresh() %}\n {% do create_indexes(relation_for_indexes) %}\n {% endif %}\n\n {% if need_swap %}\n {% do adapter.rename_relation(target_relation, backup_relation) %}\n {% do adapter.rename_relation(intermediate_relation, target_relation) %}\n {% do to_drop.append(backup_relation) %}\n {% endif %}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {% do adapter.commit() %}\n\n {% for rel in to_drop %}\n {% do adapter.drop_relation(rel) %}\n {% endfor %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_temp_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.should_full_refresh", "macro.dbt.incremental_validate_on_schema_change", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.get_create_table_as_sql", "macro.dbt.run_query", "macro.dbt.process_schema_changes", "macro.dbt.statement", "macro.dbt.create_indexes", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1783450492.4225152, "supported_languages": ["sql"]}, "macro.dbt.get_incremental_append_sql": {"name": "get_incremental_append_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_append_sql", "macro_sql": "{% macro get_incremental_append_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_append_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_incremental_append_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1783450492.423878, "supported_languages": null}, "macro.dbt.default__get_incremental_append_sql": {"name": "default__get_incremental_append_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_append_sql", "macro_sql": "{% macro default__get_incremental_append_sql(arg_dict) %}\n\n {% do return(get_insert_into_sql(arg_dict[\"target_relation\"], arg_dict[\"temp_relation\"], arg_dict[\"dest_columns\"])) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_insert_into_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1783450492.424353, "supported_languages": null}, "macro.dbt.get_incremental_delete_insert_sql": {"name": "get_incremental_delete_insert_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_delete_insert_sql", "macro_sql": "{% macro get_incremental_delete_insert_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_delete_insert_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_incremental_delete_insert_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1783450492.4247506, "supported_languages": null}, "macro.dbt.default__get_incremental_delete_insert_sql": {"name": "default__get_incremental_delete_insert_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_delete_insert_sql", "macro_sql": "{% macro default__get_incremental_delete_insert_sql(arg_dict) %}\n\n {% do return(get_delete_insert_merge_sql(arg_dict[\"target_relation\"], arg_dict[\"temp_relation\"], arg_dict[\"unique_key\"], arg_dict[\"dest_columns\"], arg_dict[\"incremental_predicates\"])) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1783450492.42532, "supported_languages": null}, "macro.dbt.get_incremental_merge_sql": {"name": "get_incremental_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_merge_sql", "macro_sql": "{% macro get_incremental_merge_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_merge_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_incremental_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1783450492.4257073, "supported_languages": null}, "macro.dbt.default__get_incremental_merge_sql": {"name": "default__get_incremental_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_merge_sql", "macro_sql": "{% macro default__get_incremental_merge_sql(arg_dict) %}\n\n {% do return(get_merge_sql(arg_dict[\"target_relation\"], arg_dict[\"temp_relation\"], arg_dict[\"unique_key\"], arg_dict[\"dest_columns\"], arg_dict[\"incremental_predicates\"])) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1783450492.4262748, "supported_languages": null}, "macro.dbt.get_incremental_insert_overwrite_sql": {"name": "get_incremental_insert_overwrite_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_insert_overwrite_sql", "macro_sql": "{% macro get_incremental_insert_overwrite_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_insert_overwrite_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_incremental_insert_overwrite_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1783450492.4266574, "supported_languages": null}, "macro.dbt.default__get_incremental_insert_overwrite_sql": {"name": "default__get_incremental_insert_overwrite_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_insert_overwrite_sql", "macro_sql": "{% macro default__get_incremental_insert_overwrite_sql(arg_dict) %}\n\n {% do return(get_insert_overwrite_merge_sql(arg_dict[\"target_relation\"], arg_dict[\"temp_relation\"], arg_dict[\"dest_columns\"], arg_dict[\"incremental_predicates\"])) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_insert_overwrite_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1783450492.4271595, "supported_languages": null}, "macro.dbt.get_incremental_default_sql": {"name": "get_incremental_default_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_default_sql", "macro_sql": "{% macro get_incremental_default_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_default_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_incremental_default_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1783450492.4275403, "supported_languages": null}, "macro.dbt.default__get_incremental_default_sql": {"name": "default__get_incremental_default_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_default_sql", "macro_sql": "{% macro default__get_incremental_default_sql(arg_dict) %}\n\n {% do return(get_incremental_append_sql(arg_dict)) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_incremental_append_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1783450492.4278352, "supported_languages": null}, "macro.dbt.get_incremental_microbatch_sql": {"name": "get_incremental_microbatch_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_microbatch_sql", "macro_sql": "{% macro get_incremental_microbatch_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_microbatch_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_incremental_microbatch_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1783450492.428195, "supported_languages": null}, "macro.dbt.default__get_incremental_microbatch_sql": {"name": "default__get_incremental_microbatch_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_microbatch_sql", "macro_sql": "{% macro default__get_incremental_microbatch_sql(arg_dict) %}\n\n {{ exceptions.raise_not_implemented('microbatch materialization strategy not implemented for adapter ' + adapter.type()) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1783450492.4285355, "supported_languages": null}, "macro.dbt.get_insert_into_sql": {"name": "get_insert_into_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_insert_into_sql", "macro_sql": "{% macro get_insert_into_sql(target_relation, temp_relation, dest_columns) %}\n\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n\n insert into {{ target_relation }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ temp_relation }}\n )\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}, {"name": "temp_relation", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}], "created_at": 1783450492.4290774, "supported_languages": null}, "macro.dbt.get_quoted_csv": {"name": "get_quoted_csv", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.get_quoted_csv", "macro_sql": "{% macro get_quoted_csv(column_names) %}\n\n {% set quoted = [] %}\n {% for col in column_names -%}\n {%- do quoted.append(adapter.quote(col)) -%}\n {%- endfor %}\n\n {%- set dest_cols_csv = quoted | join(', ') -%}\n {{ return(dest_cols_csv) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column_names", "type": null, "description": ""}], "created_at": 1783450492.4306924, "supported_languages": null}, "macro.dbt.diff_columns": {"name": "diff_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.diff_columns", "macro_sql": "{% macro diff_columns(source_columns, target_columns) %}\n\n {% set result = [] %}\n {% set source_names = source_columns | map(attribute = 'column') | list %}\n {% set target_names = target_columns | map(attribute = 'column') | list %}\n\n {# --check whether the name attribute exists in the target - this does not perform a data type check #}\n {% for sc in source_columns %}\n {% if sc.name not in target_names %}\n {{ result.append(sc) }}\n {% endif %}\n {% endfor %}\n\n {{ return(result) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_columns", "type": null, "description": ""}, {"name": "target_columns", "type": null, "description": ""}], "created_at": 1783450492.4318867, "supported_languages": null}, "macro.dbt.diff_column_data_types": {"name": "diff_column_data_types", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.diff_column_data_types", "macro_sql": "{% macro diff_column_data_types(source_columns, target_columns) %}\n {{ return(adapter.dispatch('diff_column_data_types', 'dbt')(source_columns, target_columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__diff_column_data_types"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_columns", "type": null, "description": ""}, {"name": "target_columns", "type": null, "description": ""}], "created_at": 1783450492.43231, "supported_languages": null}, "macro.dbt.default__diff_column_data_types": {"name": "default__diff_column_data_types", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.default__diff_column_data_types", "macro_sql": "{% macro default__diff_column_data_types(source_columns, target_columns) %}\n {% set result = [] %}\n {% for sc in source_columns %}\n {% set tc = target_columns | selectattr(\"name\", \"equalto\", sc.name) | list | first %}\n {% if tc %}\n {% if sc.expanded_data_type != tc.expanded_data_type and not sc.can_expand_to(other_column=tc) %}\n {{ result.append( { 'column_name': tc.name, 'new_type': sc.expanded_data_type } ) }}\n {% endif %}\n {% endif %}\n {% endfor %}\n\n {{ return(result) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_columns", "type": null, "description": ""}, {"name": "target_columns", "type": null, "description": ""}], "created_at": 1783450492.4336488, "supported_languages": null}, "macro.dbt.get_merge_update_columns": {"name": "get_merge_update_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.get_merge_update_columns", "macro_sql": "{% macro get_merge_update_columns(merge_update_columns, merge_exclude_columns, dest_columns) %}\n {{ return(adapter.dispatch('get_merge_update_columns', 'dbt')(merge_update_columns, merge_exclude_columns, dest_columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_merge_update_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "merge_update_columns", "type": null, "description": ""}, {"name": "merge_exclude_columns", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}], "created_at": 1783450492.4341109, "supported_languages": null}, "macro.dbt.default__get_merge_update_columns": {"name": "default__get_merge_update_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.default__get_merge_update_columns", "macro_sql": "{% macro default__get_merge_update_columns(merge_update_columns, merge_exclude_columns, dest_columns) %}\n {%- set default_cols = dest_columns | map(attribute=\"quoted\") | list -%}\n\n {%- if merge_update_columns and merge_exclude_columns -%}\n {{ exceptions.raise_compiler_error(\n 'Model cannot specify merge_update_columns and merge_exclude_columns. Please update model to use only one config'\n )}}\n {%- elif merge_update_columns -%}\n {%- set update_columns = merge_update_columns -%}\n {%- elif merge_exclude_columns -%}\n {%- set update_columns = [] -%}\n {%- for column in dest_columns -%}\n {% if column.column | lower not in merge_exclude_columns | map(\"lower\") | list %}\n {%- do update_columns.append(column.quoted) -%}\n {% endif %}\n {%- endfor -%}\n {%- else -%}\n {%- set update_columns = default_cols -%}\n {%- endif -%}\n\n {{ return(update_columns) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "merge_update_columns", "type": null, "description": ""}, {"name": "merge_exclude_columns", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}], "created_at": 1783450492.4355574, "supported_languages": null}, "macro.dbt.is_incremental": {"name": "is_incremental", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/is_incremental.sql", "original_file_path": "macros/materializations/models/incremental/is_incremental.sql", "unique_id": "macro.dbt.is_incremental", "macro_sql": "{% macro is_incremental() %}\n {#-- do not run introspective queries in parsing #}\n {% if not execute %}\n {{ return(False) }}\n {% else %}\n {% set relation = adapter.get_relation(this.database, this.schema, this.table) %}\n {{ return(relation is not none\n and relation.type == 'table'\n and model.config.materialized == 'incremental'\n and not should_full_refresh()) }}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.should_full_refresh"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.4366848, "supported_languages": null}, "macro.dbt.can_clone_table": {"name": "can_clone_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/can_clone_table.sql", "original_file_path": "macros/materializations/models/clone/can_clone_table.sql", "unique_id": "macro.dbt.can_clone_table", "macro_sql": "{% macro can_clone_table() %}\n {{ return(adapter.dispatch('can_clone_table', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__can_clone_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.4371464, "supported_languages": null}, "macro.dbt.default__can_clone_table": {"name": "default__can_clone_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/can_clone_table.sql", "original_file_path": "macros/materializations/models/clone/can_clone_table.sql", "unique_id": "macro.dbt.default__can_clone_table", "macro_sql": "{% macro default__can_clone_table() %}\n {{ return(False) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.4373825, "supported_languages": null}, "macro.dbt.create_or_replace_clone": {"name": "create_or_replace_clone", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/create_or_replace_clone.sql", "original_file_path": "macros/materializations/models/clone/create_or_replace_clone.sql", "unique_id": "macro.dbt.create_or_replace_clone", "macro_sql": "{% macro create_or_replace_clone(this_relation, defer_relation) %}\n {{ return(adapter.dispatch('create_or_replace_clone', 'dbt')(this_relation, defer_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_or_replace_clone"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "this_relation", "type": null, "description": ""}, {"name": "defer_relation", "type": null, "description": ""}], "created_at": 1783450492.4379423, "supported_languages": null}, "macro.dbt.default__create_or_replace_clone": {"name": "default__create_or_replace_clone", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/create_or_replace_clone.sql", "original_file_path": "macros/materializations/models/clone/create_or_replace_clone.sql", "unique_id": "macro.dbt.default__create_or_replace_clone", "macro_sql": "{% macro default__create_or_replace_clone(this_relation, defer_relation) %}\n create or replace table {{ this_relation.render() }} clone {{ defer_relation.render() }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "this_relation", "type": null, "description": ""}, {"name": "defer_relation", "type": null, "description": ""}], "created_at": 1783450492.438277, "supported_languages": null}, "macro.dbt.materialization_clone_default": {"name": "materialization_clone_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/clone.sql", "original_file_path": "macros/materializations/models/clone/clone.sql", "unique_id": "macro.dbt.materialization_clone_default", "macro_sql": "{%- materialization clone, default -%}\n\n {%- set relations = {'relations': []} -%}\n\n {%- if not defer_relation -%}\n -- nothing to do\n {{ log(\"No relation found in state manifest for \" ~ model.unique_id, info=True) }}\n {{ return(relations) }}\n {%- endif -%}\n\n {%- set existing_relation = load_cached_relation(this) -%}\n\n {%- if existing_relation and not flags.FULL_REFRESH -%}\n -- noop!\n {{ log(\"Relation \" ~ existing_relation ~ \" already exists\", info=True) }}\n {{ return(relations) }}\n {%- endif -%}\n\n {%- set other_existing_relation = load_cached_relation(defer_relation) -%}\n\n -- If this is a database that can do zero-copy cloning of tables, and the other relation is a table, then this will be a table\n -- Otherwise, this will be a view\n\n {% set can_clone_table = can_clone_table() %}\n {%- set grant_config = config.get('grants') -%}\n\n {%- if other_existing_relation and other_existing_relation.type == 'table' and can_clone_table -%}\n\n {%- set target_relation = this.incorporate(type='table') -%}\n {% if existing_relation is not none and not existing_relation.is_table %}\n {{ log(\"Dropping relation \" ~ existing_relation.render() ~ \" because it is of type \" ~ existing_relation.type) }}\n {{ drop_relation_if_exists(existing_relation) }}\n {% endif %}\n\n -- as a general rule, data platforms that can clone tables can also do atomic 'create or replace'\n {% if target_relation.database == defer_relation.database and\n target_relation.schema == defer_relation.schema and\n target_relation.identifier == defer_relation.identifier %}\n {{ log(\"Target relation and defer relation are the same, skipping clone for relation: \" ~ target_relation.render()) }}\n {% else %}\n {% call statement('main') %}\n {{ create_or_replace_clone(target_relation, defer_relation) }}\n {% endcall %}\n {% endif %}\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n {% do persist_docs(target_relation, model) %}\n\n {{ return({'relations': [target_relation]}) }}\n\n {%- else -%}\n\n {%- set target_relation = this.incorporate(type='view') -%}\n\n -- reuse the view materialization\n -- TODO: support actual dispatch for materialization macros\n -- Tracking ticket: https://github.com/dbt-labs/dbt-core/issues/7799\n {% set search_name = \"materialization_view_\" ~ adapter.type() %}\n {% if not search_name in context %}\n {% set search_name = \"materialization_view_default\" %}\n {% endif %}\n {% set materialization_macro = context[search_name] %}\n {% set relations = materialization_macro() %}\n {{ return(relations) }}\n\n {%- endif -%}\n\n{%- endmaterialization -%}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.can_clone_table", "macro.dbt.drop_relation_if_exists", "macro.dbt.statement", "macro.dbt.create_or_replace_clone", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1783450492.443381, "supported_languages": ["sql"]}, "macro.dbt.function_execute_build_sql": {"name": "function_execute_build_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/helpers.sql", "original_file_path": "macros/materializations/functions/helpers.sql", "unique_id": "macro.dbt.function_execute_build_sql", "macro_sql": "{% macro function_execute_build_sql(build_sql, existing_relation, target_relation) %}\n {{ return(adapter.dispatch('function_execute_build_sql', 'dbt')(build_sql, existing_relation, target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__function_execute_build_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "build_sql", "type": null, "description": ""}, {"name": "existing_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1783450492.4441402, "supported_languages": null}, "macro.dbt.default__function_execute_build_sql": {"name": "default__function_execute_build_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/helpers.sql", "original_file_path": "macros/materializations/functions/helpers.sql", "unique_id": "macro.dbt.default__function_execute_build_sql", "macro_sql": "{% macro default__function_execute_build_sql(build_sql, existing_relation, target_relation) %}\n\n {% set grant_config = config.get('grants') %}\n\n {% call statement(name=\"main\") %}\n {{ build_sql }}\n {% endcall %}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ adapter.commit() }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "build_sql", "type": null, "description": ""}, {"name": "existing_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1783450492.4451833, "supported_languages": null}, "macro.dbt.materialization_function_default": {"name": "materialization_function_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/function.sql", "original_file_path": "macros/materializations/functions/function.sql", "unique_id": "macro.dbt.materialization_function_default", "macro_sql": "{% materialization function, default, supported_languages=['sql', 'python', 'javascript'] %}\n {% set existing_relation = load_cached_relation(this) %}\n {% set target_relation = this.incorporate(type=this.Function) %}\n\n {{ run_hooks(pre_hooks) }}\n\n {% set function_config = this.get_function_config(model) %}\n {% set macro_name = this.get_function_macro_name(function_config) %}\n\n {# Doing this aliasing of adapter.dispatch is a hacky way to disable the static analysis of actually calling adapter.dispatch #}\n {# This is necessary because the static analysis breaks being able to dynamically pass a macro_name #}\n {% set _dispatch = adapter.dispatch %}\n\n {% set build_sql = _dispatch(macro_name, 'dbt')(target_relation) %}\n {{ function_execute_build_sql(build_sql, existing_relation, target_relation) }}\n {{ run_hooks(post_hooks) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.run_hooks", "macro.dbt.function_execute_build_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1783450492.4470053, "supported_languages": ["sql", "python", "javascript"]}, "macro.dbt.get_aggregate_function_create_replace_signature": {"name": "get_aggregate_function_create_replace_signature", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.get_aggregate_function_create_replace_signature", "macro_sql": "{% macro get_aggregate_function_create_replace_signature(target_relation) %}\n {{ return(adapter.dispatch('get_aggregate_function_create_replace_signature', 'dbt')(target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_aggregate_function_create_replace_signature"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}], "created_at": 1783450492.4482157, "supported_languages": null}, "macro.dbt.default__get_aggregate_function_create_replace_signature": {"name": "default__get_aggregate_function_create_replace_signature", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.default__get_aggregate_function_create_replace_signature", "macro_sql": "{% macro default__get_aggregate_function_create_replace_signature(target_relation) %}\n CREATE OR REPLACE AGGREGATE FUNCTION {{ target_relation.render() }} ({{ get_formatted_aggregate_function_args()}})\n RETURNS {{ model.returns.data_type }}\n {{ get_function_language_specifier() }}\n {{ get_aggregate_function_volatility_specifier() }}\n {% if model.get('language') == 'python' %}\n {{ get_function_python_options() }}\n {% endif %}\n AS\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_formatted_aggregate_function_args", "macro.dbt.get_function_language_specifier", "macro.dbt.get_aggregate_function_volatility_specifier", "macro.dbt.get_function_python_options"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}], "created_at": 1783450492.4489427, "supported_languages": null}, "macro.dbt.get_formatted_aggregate_function_args": {"name": "get_formatted_aggregate_function_args", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.get_formatted_aggregate_function_args", "macro_sql": "{% macro get_formatted_aggregate_function_args() %}\n {{ return(adapter.dispatch('get_formatted_aggregate_function_args', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_formatted_aggregate_function_args"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.4492753, "supported_languages": null}, "macro.dbt.default__get_formatted_aggregate_function_args": {"name": "default__get_formatted_aggregate_function_args", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.default__get_formatted_aggregate_function_args", "macro_sql": "{% macro default__get_formatted_aggregate_function_args() %}\n {# conveniently we can reuse the sql scalar function args #}\n {{ formatted_scalar_function_args_sql() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.formatted_scalar_function_args_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.44953, "supported_languages": null}, "macro.dbt.get_function_language_specifier": {"name": "get_function_language_specifier", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.get_function_language_specifier", "macro_sql": "{% macro get_function_language_specifier() %}\n {{ return(adapter.dispatch('get_function_language_specifier', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_function_language_specifier"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.4498568, "supported_languages": null}, "macro.dbt.default__get_function_language_specifier": {"name": "default__get_function_language_specifier", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.default__get_function_language_specifier", "macro_sql": "{% macro default__get_function_language_specifier() %}\n {% set language = model.get('language') %}\n {% if language == 'sql' %}\n {# generally you dont need to specify the language for sql functions #}\n {% elif language == 'python' %}\n LANGUAGE PYTHON\n {% elif language == 'javascript' %}\n LANGUAGE js\n {% else %}\n {{ 'LANGUAGE ' ~ language.upper() }}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.4506006, "supported_languages": null}, "macro.dbt.get_aggregate_function_volatility_specifier": {"name": "get_aggregate_function_volatility_specifier", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.get_aggregate_function_volatility_specifier", "macro_sql": "{% macro get_aggregate_function_volatility_specifier() %}\n {{ return(adapter.dispatch('get_aggregate_function_volatility_specifier', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_aggregate_function_volatility_specifier"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.4509337, "supported_languages": null}, "macro.dbt.default__get_aggregate_function_volatility_specifier": {"name": "default__get_aggregate_function_volatility_specifier", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.default__get_aggregate_function_volatility_specifier", "macro_sql": "{% macro default__get_aggregate_function_volatility_specifier() %}\n {{ scalar_function_volatility_sql() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.scalar_function_volatility_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.4511478, "supported_languages": null}, "macro.dbt.get_function_python_options": {"name": "get_function_python_options", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.get_function_python_options", "macro_sql": "{% macro get_function_python_options() %}\n {{ return(adapter.dispatch('get_function_python_options', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_function_python_options"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.4514945, "supported_languages": null}, "macro.dbt.default__get_function_python_options": {"name": "default__get_function_python_options", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.default__get_function_python_options", "macro_sql": "{% macro default__get_function_python_options() %}\n RUNTIME_VERSION = '{{ model.config.get('runtime_version') }}'\n HANDLER = '{{ model.config.get('entry_point') }}'\n {% set packages = model.config.get('packages', []) %}\n {% if packages %}\n PACKAGES = ('{{ packages | join(\"','\") }}')\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.4522233, "supported_languages": null}, "macro.dbt.scalar_function_sql": {"name": "scalar_function_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.scalar_function_sql", "macro_sql": "{% macro scalar_function_sql(target_relation) %}\n {{ return(adapter.dispatch('scalar_function_sql', 'dbt')(target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__scalar_function_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}], "created_at": 1783450492.4537365, "supported_languages": null}, "macro.dbt.default__scalar_function_sql": {"name": "default__scalar_function_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__scalar_function_sql", "macro_sql": "{% macro default__scalar_function_sql(target_relation) %}\n {{ scalar_function_create_replace_signature_sql(target_relation) }}\n {{ scalar_function_body_sql() }};\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.scalar_function_create_replace_signature_sql", "macro.dbt.scalar_function_body_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}], "created_at": 1783450492.454145, "supported_languages": null}, "macro.dbt.scalar_function_create_replace_signature_sql": {"name": "scalar_function_create_replace_signature_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.scalar_function_create_replace_signature_sql", "macro_sql": "{% macro scalar_function_create_replace_signature_sql(target_relation) %}\n {{ return(adapter.dispatch('scalar_function_create_replace_signature_sql', 'dbt')(target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__scalar_function_create_replace_signature_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}], "created_at": 1783450492.4545288, "supported_languages": null}, "macro.dbt.default__scalar_function_create_replace_signature_sql": {"name": "default__scalar_function_create_replace_signature_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__scalar_function_create_replace_signature_sql", "macro_sql": "{% macro default__scalar_function_create_replace_signature_sql(target_relation) %}\n CREATE OR REPLACE FUNCTION {{ target_relation.render() }} ({{ formatted_scalar_function_args_sql()}})\n RETURNS {{ model.returns.data_type }}\n {{ scalar_function_volatility_sql() }}\n AS\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.formatted_scalar_function_args_sql", "macro.dbt.scalar_function_volatility_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}], "created_at": 1783450492.4549525, "supported_languages": null}, "macro.dbt.formatted_scalar_function_args_sql": {"name": "formatted_scalar_function_args_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.formatted_scalar_function_args_sql", "macro_sql": "{% macro formatted_scalar_function_args_sql() %}\n {{ return(adapter.dispatch('formatted_scalar_function_args_sql', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__formatted_scalar_function_args_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.4552886, "supported_languages": null}, "macro.dbt.formatted_scalar_function_args_javascript": {"name": "formatted_scalar_function_args_javascript", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.formatted_scalar_function_args_javascript", "macro_sql": "{% macro formatted_scalar_function_args_javascript() %}\n {{ return(adapter.dispatch('formatted_scalar_function_args_javascript', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__formatted_scalar_function_args_javascript"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.4556348, "supported_languages": null}, "macro.dbt.default__formatted_scalar_function_args_sql": {"name": "default__formatted_scalar_function_args_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__formatted_scalar_function_args_sql", "macro_sql": "{% macro default__formatted_scalar_function_args_sql() %}\n {% set args = [] %}\n {% for arg in model.arguments -%}\n {%- do args.append(arg.name ~ ' ' ~ arg.data_type) -%}\n {%- endfor %}\n {{ args | join(', ') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.4562607, "supported_languages": null}, "macro.dbt.default__formatted_scalar_function_args_javascript": {"name": "default__formatted_scalar_function_args_javascript", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__formatted_scalar_function_args_javascript", "macro_sql": "{% macro default__formatted_scalar_function_args_javascript() %}\n {% set msg = \"formatted_scalar_function_args_javascript not implemented for adapter \" ~ adapter.type() %}\n {% do exceptions.raise_compiler_error(msg) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.4566803, "supported_languages": null}, "macro.dbt.scalar_function_body_sql": {"name": "scalar_function_body_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.scalar_function_body_sql", "macro_sql": "{% macro scalar_function_body_sql() %}\n {{ return(adapter.dispatch('scalar_function_body_sql', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__scalar_function_body_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.4570065, "supported_languages": null}, "macro.dbt.default__scalar_function_body_sql": {"name": "default__scalar_function_body_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__scalar_function_body_sql", "macro_sql": "{% macro default__scalar_function_body_sql() %}\n $$\n {{ model.compiled_code }}\n $$ LANGUAGE SQL\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.4572184, "supported_languages": null}, "macro.dbt.scalar_function_volatility_sql": {"name": "scalar_function_volatility_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.scalar_function_volatility_sql", "macro_sql": "{% macro scalar_function_volatility_sql() %}\n {{ return(adapter.dispatch('scalar_function_volatility_sql', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__scalar_function_volatility_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.4575677, "supported_languages": null}, "macro.dbt.scalar_function_volatility_javascript": {"name": "scalar_function_volatility_javascript", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.scalar_function_volatility_javascript", "macro_sql": "{% macro scalar_function_volatility_javascript() %}\n {{ return(adapter.dispatch('scalar_function_volatility_javascript', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__scalar_function_volatility_javascript"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.457896, "supported_languages": null}, "macro.dbt.default__scalar_function_volatility_javascript": {"name": "default__scalar_function_volatility_javascript", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__scalar_function_volatility_javascript", "macro_sql": "{% macro default__scalar_function_volatility_javascript() %}\n {% set volatility = model.config.get('volatility') %}\n {% if volatility != none %}\n {% set msg = \"Volatility is not supported by \" ~ adapter.type() ~ \" in javascript UDF and will be ignored\" %}\n {% do exceptions.warn(msg) %}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.4585903, "supported_languages": null}, "macro.dbt.default__scalar_function_volatility_sql": {"name": "default__scalar_function_volatility_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__scalar_function_volatility_sql", "macro_sql": "{% macro default__scalar_function_volatility_sql() %}\n {% set volatility = model.config.get('volatility') %}\n {% if volatility == 'deterministic' %}\n IMMUTABLE\n {% elif volatility == 'stable' %}\n STABLE\n {% elif volatility == 'non-deterministic' %}\n VOLATILE\n {% elif volatility != none %}\n {# This shouldn't happen unless a new volatility is invented #}\n {% do unsupported_volatility_warning(volatility) %}\n {% endif %}\n {# If no volatility is set, don't add anything and let the data warehouse default it #}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.unsupported_volatility_warning"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.4593873, "supported_languages": null}, "macro.dbt.unsupported_volatility_warning": {"name": "unsupported_volatility_warning", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.unsupported_volatility_warning", "macro_sql": "{% macro unsupported_volatility_warning(volatility) %}\n {{ return(adapter.dispatch('unsupported_volatility_warning', 'dbt')(volatility)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__unsupported_volatility_warning"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "volatility", "type": null, "description": ""}], "created_at": 1783450492.459765, "supported_languages": null}, "macro.dbt.default__unsupported_volatility_warning": {"name": "default__unsupported_volatility_warning", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__unsupported_volatility_warning", "macro_sql": "{% macro default__unsupported_volatility_warning(volatility) %}\n {% set msg = \"Found `\" ~ volatility ~ \"` volatility specified on function `\" ~ model.name ~ \"`. This volatility is not supported by \" ~ adapter.type() ~ \", and will be ignored\" %}\n {% do exceptions.warn(msg) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "volatility", "type": null, "description": ""}], "created_at": 1783450492.4602716, "supported_languages": null}, "macro.dbt.create_columns": {"name": "create_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.create_columns", "macro_sql": "{% macro create_columns(relation, columns) %}\n {{ adapter.dispatch('create_columns', 'dbt')(relation, columns) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "columns", "type": null, "description": ""}], "created_at": 1783450492.4641302, "supported_languages": null}, "macro.dbt.default__create_columns": {"name": "default__create_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__create_columns", "macro_sql": "{% macro default__create_columns(relation, columns) %}\n {% for column in columns %}\n {% call statement() %}\n alter table {{ relation.render() }} add column {{ adapter.quote(column.name) }} {{ column.expanded_data_type }};\n {% endcall %}\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "columns", "type": null, "description": ""}], "created_at": 1783450492.4649, "supported_languages": null}, "macro.dbt.post_snapshot": {"name": "post_snapshot", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.post_snapshot", "macro_sql": "{% macro post_snapshot(staging_relation) %}\n {{ adapter.dispatch('post_snapshot', 'dbt')(staging_relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "staging_relation", "type": null, "description": ""}], "created_at": 1783450492.465237, "supported_languages": null}, "macro.dbt.default__post_snapshot": {"name": "default__post_snapshot", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__post_snapshot", "macro_sql": "{% macro default__post_snapshot(staging_relation) %}\n {# no-op #}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "staging_relation", "type": null, "description": ""}], "created_at": 1783450492.4654446, "supported_languages": null}, "macro.dbt.get_true_sql": {"name": "get_true_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.get_true_sql", "macro_sql": "{% macro get_true_sql() %}\n {{ adapter.dispatch('get_true_sql', 'dbt')() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_true_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.4657466, "supported_languages": null}, "macro.dbt.default__get_true_sql": {"name": "default__get_true_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__get_true_sql", "macro_sql": "{% macro default__get_true_sql() %}\n {{ return('TRUE') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.465986, "supported_languages": null}, "macro.dbt.snapshot_staging_table": {"name": "snapshot_staging_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.snapshot_staging_table", "macro_sql": "{% macro snapshot_staging_table(strategy, source_sql, target_relation) -%}\n {{ adapter.dispatch('snapshot_staging_table', 'dbt')(strategy, source_sql, target_relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__snapshot_staging_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "strategy", "type": null, "description": ""}, {"name": "source_sql", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1783450492.4663897, "supported_languages": null}, "macro.dbt.get_snapshot_table_column_names": {"name": "get_snapshot_table_column_names", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.get_snapshot_table_column_names", "macro_sql": "{% macro get_snapshot_table_column_names() %}\n {{ return({'dbt_valid_to': 'dbt_valid_to', 'dbt_valid_from': 'dbt_valid_from', 'dbt_scd_id': 'dbt_scd_id', 'dbt_updated_at': 'dbt_updated_at', 'dbt_is_deleted': 'dbt_is_deleted'}) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.4668953, "supported_languages": null}, "macro.dbt.default__snapshot_staging_table": {"name": "default__snapshot_staging_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__snapshot_staging_table", "macro_sql": "{% macro default__snapshot_staging_table(strategy, source_sql, target_relation) -%}\n {% set columns = config.get('snapshot_table_column_names') or get_snapshot_table_column_names() %}\n {% if strategy.hard_deletes == 'new_record' %}\n {% set new_scd_id = snapshot_hash_arguments([columns.dbt_scd_id, snapshot_get_time()]) %}\n {% endif %}\n with snapshot_query as (\n\n {{ source_sql }}\n\n ),\n\n snapshotted_data as (\n\n select *, {{ unique_key_fields(strategy.unique_key) }}\n from {{ target_relation }}\n where\n {% if config.get('dbt_valid_to_current') %}\n\t\t{% set source_unique_key = columns.dbt_valid_to | trim %}\n\t\t{% set target_unique_key = config.get('dbt_valid_to_current') | trim %}\n\n\t\t{# The exact equals semantics between NULL values depends on the current behavior flag set. Also, update records if the source field is null #}\n ( {{ equals(source_unique_key, target_unique_key) }} or {{ source_unique_key }} is null )\n {% else %}\n {{ columns.dbt_valid_to }} is null\n {% endif %}\n\n ),\n\n insertions_source_data as (\n\n select *, {{ unique_key_fields(strategy.unique_key) }},\n {{ strategy.updated_at }} as {{ columns.dbt_updated_at }},\n {{ strategy.updated_at }} as {{ columns.dbt_valid_from }},\n {{ get_dbt_valid_to_current(strategy, columns) }},\n {{ strategy.scd_id }} as {{ columns.dbt_scd_id }}\n\n from snapshot_query\n ),\n\n updates_source_data as (\n\n select *, {{ unique_key_fields(strategy.unique_key) }},\n {{ strategy.updated_at }} as {{ columns.dbt_updated_at }},\n {{ strategy.updated_at }} as {{ columns.dbt_valid_from }},\n {{ strategy.updated_at }} as {{ columns.dbt_valid_to }}\n\n from snapshot_query\n ),\n\n {%- if strategy.hard_deletes == 'invalidate' or strategy.hard_deletes == 'new_record' %}\n\n deletes_source_data as (\n\n select *, {{ unique_key_fields(strategy.unique_key) }}\n from snapshot_query\n ),\n {% endif %}\n\n insertions as (\n\n select\n 'insert' as dbt_change_type,\n source_data.*\n {%- if strategy.hard_deletes == 'new_record' -%}\n ,'False' as {{ columns.dbt_is_deleted }}\n {%- endif %}\n\n from insertions_source_data as source_data\n left outer join snapshotted_data\n on {{ unique_key_join_on(strategy.unique_key, \"snapshotted_data\", \"source_data\") }}\n where {{ unique_key_is_null(strategy.unique_key, \"snapshotted_data\") }}\n or ({{ unique_key_is_not_null(strategy.unique_key, \"snapshotted_data\") }} and (\n {{ strategy.row_changed }} {%- if strategy.hard_deletes == 'new_record' -%} or snapshotted_data.{{ columns.dbt_is_deleted }} = 'True' {% endif %}\n )\n\n )\n\n ),\n\n updates as (\n\n select\n 'update' as dbt_change_type,\n source_data.*,\n snapshotted_data.{{ columns.dbt_scd_id }}\n {%- if strategy.hard_deletes == 'new_record' -%}\n , snapshotted_data.{{ columns.dbt_is_deleted }}\n {%- endif %}\n\n from updates_source_data as source_data\n join snapshotted_data\n on {{ unique_key_join_on(strategy.unique_key, \"snapshotted_data\", \"source_data\") }}\n where (\n {{ strategy.row_changed }} {%- if strategy.hard_deletes == 'new_record' -%} or snapshotted_data.{{ columns.dbt_is_deleted }} = 'True' {% endif %}\n )\n )\n\n {%- if strategy.hard_deletes == 'invalidate' or strategy.hard_deletes == 'new_record' %}\n ,\n deletes as (\n\n select\n 'delete' as dbt_change_type,\n source_data.*,\n {{ snapshot_get_time() }} as {{ columns.dbt_valid_from }},\n {{ snapshot_get_time() }} as {{ columns.dbt_updated_at }},\n {{ snapshot_get_time() }} as {{ columns.dbt_valid_to }},\n snapshotted_data.{{ columns.dbt_scd_id }}\n {%- if strategy.hard_deletes == 'new_record' -%}\n , snapshotted_data.{{ columns.dbt_is_deleted }}\n {%- endif %}\n from snapshotted_data\n left join deletes_source_data as source_data\n on {{ unique_key_join_on(strategy.unique_key, \"snapshotted_data\", \"source_data\") }}\n where {{ unique_key_is_null(strategy.unique_key, \"source_data\") }}\n\n {%- if strategy.hard_deletes == 'new_record' %}\n and not (\n --avoid updating the record's valid_to if the latest entry is marked as deleted\n snapshotted_data.{{ columns.dbt_is_deleted }} = 'True'\n and\n {% if config.get('dbt_valid_to_current') -%}\n snapshotted_data.{{ columns.dbt_valid_to }} = {{ config.get('dbt_valid_to_current') }}\n {%- else -%}\n snapshotted_data.{{ columns.dbt_valid_to }} is null\n {%- endif %}\n )\n {%- endif %}\n )\n {%- endif %}\n\n {%- if strategy.hard_deletes == 'new_record' %}\n {% set snapshotted_cols = get_list_of_column_names(get_columns_in_relation(target_relation)) %}\n {% set source_sql_cols = get_column_schema_from_query(source_sql) %}\n ,\n deletion_records as (\n\n select\n 'insert' as dbt_change_type,\n {#/*\n If a column has been added to the source it won't yet exist in the\n snapshotted table so we insert a null value as a placeholder for the column.\n */#}\n {%- for col in source_sql_cols -%}\n {%- if col.name in snapshotted_cols -%}\n snapshotted_data.{{ adapter.quote(col.column) }},\n {%- else -%}\n {{ safe_cast('NULL', col.dtype) }} as {{ adapter.quote(col.column) }},\n {%- endif -%}\n {% endfor -%}\n {%- if strategy.unique_key | is_list -%}\n {%- for key in strategy.unique_key -%}\n snapshotted_data.{{ key }} as dbt_unique_key_{{ loop.index }},\n {% endfor -%}\n {%- else -%}\n snapshotted_data.dbt_unique_key as dbt_unique_key,\n {% endif -%}\n {{ snapshot_get_time() }} as {{ columns.dbt_valid_from }},\n {{ snapshot_get_time() }} as {{ columns.dbt_updated_at }},\n snapshotted_data.{{ columns.dbt_valid_to }} as {{ columns.dbt_valid_to }},\n {{ new_scd_id }} as {{ columns.dbt_scd_id }},\n 'True' as {{ columns.dbt_is_deleted }}\n from snapshotted_data\n left join deletes_source_data as source_data\n on {{ unique_key_join_on(strategy.unique_key, \"snapshotted_data\", \"source_data\") }}\n where {{ unique_key_is_null(strategy.unique_key, \"source_data\") }}\n and not (\n --avoid inserting a new record if the latest one is marked as deleted\n snapshotted_data.{{ columns.dbt_is_deleted }} = 'True'\n and\n {% if config.get('dbt_valid_to_current') -%}\n snapshotted_data.{{ columns.dbt_valid_to }} = {{ config.get('dbt_valid_to_current') }}\n {%- else -%}\n snapshotted_data.{{ columns.dbt_valid_to }} is null\n {%- endif %}\n )\n\n )\n {%- endif %}\n\n select * from insertions\n union all\n select * from updates\n {%- if strategy.hard_deletes == 'invalidate' or strategy.hard_deletes == 'new_record' %}\n union all\n select * from deletes\n {%- endif %}\n {%- if strategy.hard_deletes == 'new_record' %}\n union all\n select * from deletion_records\n {%- endif %}\n\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_snapshot_table_column_names", "macro.dbt.snapshot_hash_arguments", "macro.dbt.snapshot_get_time", "macro.dbt.unique_key_fields", "macro.dbt.equals", "macro.dbt.get_dbt_valid_to_current", "macro.dbt.unique_key_join_on", "macro.dbt.unique_key_is_null", "macro.dbt.unique_key_is_not_null", "macro.dbt.get_list_of_column_names", "macro.dbt.get_columns_in_relation", "macro.dbt.get_column_schema_from_query", "macro.dbt.safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "strategy", "type": null, "description": ""}, {"name": "source_sql", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1783450492.4757316, "supported_languages": null}, "macro.dbt.build_snapshot_table": {"name": "build_snapshot_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.build_snapshot_table", "macro_sql": "{% macro build_snapshot_table(strategy, sql) -%}\n {{ adapter.dispatch('build_snapshot_table', 'dbt')(strategy, sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__build_snapshot_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "strategy", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.476161, "supported_languages": null}, "macro.dbt.default__build_snapshot_table": {"name": "default__build_snapshot_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__build_snapshot_table", "macro_sql": "{% macro default__build_snapshot_table(strategy, sql) %}\n {% set columns = config.get('snapshot_table_column_names') or get_snapshot_table_column_names() %}\n\n select *,\n {{ strategy.scd_id }} as {{ columns.dbt_scd_id }},\n {{ strategy.updated_at }} as {{ columns.dbt_updated_at }},\n {{ strategy.updated_at }} as {{ columns.dbt_valid_from }},\n {{ get_dbt_valid_to_current(strategy, columns) }}\n {%- if strategy.hard_deletes == 'new_record' -%}\n , 'False' as {{ columns.dbt_is_deleted }}\n {% endif -%}\n from (\n {{ sql }}\n ) sbq\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_snapshot_table_column_names", "macro.dbt.get_dbt_valid_to_current"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "strategy", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.4771876, "supported_languages": null}, "macro.dbt.build_snapshot_staging_table": {"name": "build_snapshot_staging_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.build_snapshot_staging_table", "macro_sql": "{% macro build_snapshot_staging_table(strategy, sql, target_relation) %}\n {% set temp_relation = make_temp_relation(target_relation) %}\n\n {% set select = snapshot_staging_table(strategy, sql, target_relation) %}\n\n {% call statement('build_snapshot_staging_relation') %}\n {{ create_table_as(True, temp_relation, select) }}\n {% endcall %}\n\n {% do return(temp_relation) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.make_temp_relation", "macro.dbt.snapshot_staging_table", "macro.dbt.statement", "macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "strategy", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1783450492.4780402, "supported_languages": null}, "macro.dbt.get_updated_at_column_data_type": {"name": "get_updated_at_column_data_type", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.get_updated_at_column_data_type", "macro_sql": "{% macro get_updated_at_column_data_type(snapshot_sql) %}\n {% set snapshot_sql_column_schema = get_column_schema_from_query(snapshot_sql) %}\n {% set dbt_updated_at_data_type = null %}\n {% set ns = namespace() -%} {#-- handle for-loop scoping with a namespace --#}\n {% set ns.dbt_updated_at_data_type = null -%}\n {% for column in snapshot_sql_column_schema %}\n {% if ((column.column == 'dbt_updated_at') or (column.column == 'DBT_UPDATED_AT')) %}\n {% set ns.dbt_updated_at_data_type = column.dtype %}\n {% endif %}\n {% endfor %}\n {{ return(ns.dbt_updated_at_data_type or none) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_column_schema_from_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "snapshot_sql", "type": null, "description": ""}], "created_at": 1783450492.4792087, "supported_languages": null}, "macro.dbt.check_time_data_types": {"name": "check_time_data_types", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.check_time_data_types", "macro_sql": "{% macro check_time_data_types(sql) %}\n {% set dbt_updated_at_data_type = get_updated_at_column_data_type(sql) %}\n {% set snapshot_get_time_data_type = get_snapshot_get_time_data_type() %}\n {% if snapshot_get_time_data_type is not none and dbt_updated_at_data_type is not none and snapshot_get_time_data_type != dbt_updated_at_data_type %}\n {% if exceptions.warn_snapshot_timestamp_data_types %}\n {{ exceptions.warn_snapshot_timestamp_data_types(snapshot_get_time_data_type, dbt_updated_at_data_type) }}\n {% endif %}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_updated_at_column_data_type", "macro.dbt.get_snapshot_get_time_data_type"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.480048, "supported_languages": null}, "macro.dbt.get_dbt_valid_to_current": {"name": "get_dbt_valid_to_current", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.get_dbt_valid_to_current", "macro_sql": "{% macro get_dbt_valid_to_current(strategy, columns) %}\n {% set dbt_valid_to_current = config.get('dbt_valid_to_current') or \"null\" %}\n coalesce(nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}), {{dbt_valid_to_current}})\n as {{ columns.dbt_valid_to }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "strategy", "type": null, "description": ""}, {"name": "columns", "type": null, "description": ""}], "created_at": 1783450492.480617, "supported_languages": null}, "macro.dbt.unique_key_fields": {"name": "unique_key_fields", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.unique_key_fields", "macro_sql": "{% macro unique_key_fields(unique_key) %}\n {% if unique_key | is_list %}\n {% for key in unique_key %}\n {{ key }} as dbt_unique_key_{{ loop.index }}\n {%- if not loop.last %} , {%- endif %}\n {% endfor %}\n {% else %}\n {{ unique_key }} as dbt_unique_key\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "unique_key", "type": null, "description": ""}], "created_at": 1783450492.4812932, "supported_languages": null}, "macro.dbt.unique_key_join_on": {"name": "unique_key_join_on", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.unique_key_join_on", "macro_sql": "{% macro unique_key_join_on(unique_key, identifier, from_identifier) %}\n {% if unique_key | is_list %}\n {% for key in unique_key %}\n\t {% set source_unique_key = (identifier ~ \".dbt_unique_key_\" ~ loop.index) | trim %}\n\t {% set target_unique_key = (from_identifier ~ \".dbt_unique_key_\" ~ loop.index) | trim %}\n\t {{ equals(source_unique_key, target_unique_key) }}\n {%- if not loop.last %} and {%- endif %}\n {% endfor %}\n {% else %}\n {{ identifier }}.dbt_unique_key = {{ from_identifier }}.dbt_unique_key\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.equals"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "unique_key", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "from_identifier", "type": null, "description": ""}], "created_at": 1783450492.4824383, "supported_languages": null}, "macro.dbt.unique_key_is_null": {"name": "unique_key_is_null", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.unique_key_is_null", "macro_sql": "{% macro unique_key_is_null(unique_key, identifier) %}\n {% if unique_key | is_list %}\n {{ identifier }}.dbt_unique_key_1 is null\n {% else %}\n {{ identifier }}.dbt_unique_key is null\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "unique_key", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}], "created_at": 1783450492.4828613, "supported_languages": null}, "macro.dbt.unique_key_is_not_null": {"name": "unique_key_is_not_null", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.unique_key_is_not_null", "macro_sql": "{% macro unique_key_is_not_null(unique_key, identifier) %}\n {% if unique_key | is_list %}\n {{ identifier }}.dbt_unique_key_1 is not null\n {% else %}\n {{ identifier }}.dbt_unique_key is not null\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "unique_key", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}], "created_at": 1783450492.4834325, "supported_languages": null}, "macro.dbt.strategy_dispatch": {"name": "strategy_dispatch", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.strategy_dispatch", "macro_sql": "{% macro strategy_dispatch(name) -%}\n{% set original_name = name %}\n {% if '.' in name %}\n {% set package_name, name = name.split(\".\", 1) %}\n {% else %}\n {% set package_name = none %}\n {% endif %}\n\n {% if package_name is none %}\n {% set package_context = context %}\n {% elif package_name in context %}\n {% set package_context = context[package_name] %}\n {% else %}\n {% set error_msg %}\n Could not find package '{{package_name}}', called with '{{original_name}}'\n {% endset %}\n {{ exceptions.raise_compiler_error(error_msg | trim) }}\n {% endif %}\n\n {%- set search_name = 'snapshot_' ~ name ~ '_strategy' -%}\n\n {% if search_name not in package_context %}\n {% set error_msg %}\n The specified strategy macro '{{name}}' was not found in package '{{ package_name }}'\n {% endset %}\n {{ exceptions.raise_compiler_error(error_msg | trim) }}\n {% endif %}\n {{ return(package_context[search_name]) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "name", "type": null, "description": ""}], "created_at": 1783450492.4874225, "supported_languages": null}, "macro.dbt.snapshot_hash_arguments": {"name": "snapshot_hash_arguments", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_hash_arguments", "macro_sql": "{% macro snapshot_hash_arguments(args) -%}\n {{ adapter.dispatch('snapshot_hash_arguments', 'dbt')(args) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "args", "type": null, "description": ""}], "created_at": 1783450492.487763, "supported_languages": null}, "macro.dbt.default__snapshot_hash_arguments": {"name": "default__snapshot_hash_arguments", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.default__snapshot_hash_arguments", "macro_sql": "{% macro default__snapshot_hash_arguments(args) -%}\n md5({%- for arg in args -%}\n coalesce(cast({{ arg }} as varchar ), '')\n {% if not loop.last %} || '|' || {% endif %}\n {%- endfor -%})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "args", "type": null, "description": ""}], "created_at": 1783450492.4882061, "supported_languages": null}, "macro.dbt.snapshot_timestamp_strategy": {"name": "snapshot_timestamp_strategy", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_timestamp_strategy", "macro_sql": "{% macro snapshot_timestamp_strategy(node, snapshotted_rel, current_rel, model_config, target_exists) %}\n {# The model_config parameter is no longer used, but is passed in anyway for compatibility. #}\n {% set primary_key = config.get('unique_key') %}\n {% set updated_at = config.get('updated_at') %}\n {% set hard_deletes = adapter.get_hard_deletes_behavior(config) %}\n {% set invalidate_hard_deletes = hard_deletes == 'invalidate' %}\n {% set columns = config.get(\"snapshot_table_column_names\") or get_snapshot_table_column_names() %}\n\n {#/*\n The snapshot relation might not have an {{ updated_at }} value if the\n snapshot strategy is changed from `check` to `timestamp`. We\n should use a dbt-created column for the comparison in the snapshot\n table instead of assuming that the user-supplied {{ updated_at }}\n will be present in the historical data.\n\n See https://github.com/dbt-labs/dbt-core/issues/2350\n */ #}\n {% set row_changed_expr -%}\n ({{ snapshotted_rel }}.{{ columns.dbt_valid_from }} < {{ current_rel }}.{{ updated_at }})\n {%- endset %}\n\n {% set scd_args = api.Relation.scd_args(primary_key, updated_at) %}\n {% set scd_id_expr = snapshot_hash_arguments(scd_args) %}\n\n {% do return({\n \"unique_key\": primary_key,\n \"updated_at\": updated_at,\n \"row_changed\": row_changed_expr,\n \"scd_id\": scd_id_expr,\n \"invalidate_hard_deletes\": invalidate_hard_deletes,\n \"hard_deletes\": hard_deletes\n }) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_snapshot_table_column_names", "macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "node", "type": null, "description": ""}, {"name": "snapshotted_rel", "type": null, "description": ""}, {"name": "current_rel", "type": null, "description": ""}, {"name": "model_config", "type": null, "description": ""}, {"name": "target_exists", "type": null, "description": ""}], "created_at": 1783450492.4902217, "supported_languages": null}, "macro.dbt.snapshot_string_as_time": {"name": "snapshot_string_as_time", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_string_as_time", "macro_sql": "{% macro snapshot_string_as_time(timestamp) -%}\n {{ adapter.dispatch('snapshot_string_as_time', 'dbt')(timestamp) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__snapshot_string_as_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "timestamp", "type": null, "description": ""}], "created_at": 1783450492.4905782, "supported_languages": null}, "macro.dbt.default__snapshot_string_as_time": {"name": "default__snapshot_string_as_time", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.default__snapshot_string_as_time", "macro_sql": "{% macro default__snapshot_string_as_time(timestamp) %}\n {% do exceptions.raise_not_implemented(\n 'snapshot_string_as_time macro not implemented for adapter '+adapter.type()\n ) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "timestamp", "type": null, "description": ""}], "created_at": 1783450492.4909177, "supported_languages": null}, "macro.dbt.snapshot_check_all_get_existing_columns": {"name": "snapshot_check_all_get_existing_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_check_all_get_existing_columns", "macro_sql": "{% macro snapshot_check_all_get_existing_columns(node, target_exists, check_cols_config) -%}\n {%- if not target_exists -%}\n {#-- no table yet -> return whatever the query does --#}\n {{ return((false, query_columns)) }}\n {%- endif -%}\n\n {#-- handle any schema changes --#}\n {%- set target_relation = adapter.get_relation(database=node.database, schema=node.schema, identifier=node.alias) -%}\n\n {% if check_cols_config == 'all' %}\n {%- set query_columns = get_columns_in_query(node['compiled_code']) -%}\n\n {% elif check_cols_config is iterable and (check_cols_config | length) > 0 %}\n {#-- query for proper casing/quoting, to support comparison below --#}\n {%- set select_check_cols_from_target -%}\n {#-- N.B. The whitespace below is necessary to avoid edge case issue with comments --#}\n {#-- See: https://github.com/dbt-labs/dbt-core/issues/6781 --#}\n select {{ check_cols_config | join(', ') }} from (\n {{ node['compiled_code'] }}\n ) subq\n {%- endset -%}\n {% set query_columns = get_columns_in_query(select_check_cols_from_target) %}\n\n {% else %}\n {% do exceptions.raise_compiler_error(\"Invalid value for 'check_cols': \" ~ check_cols_config) %}\n {% endif %}\n\n {%- set existing_cols = adapter.get_columns_in_relation(target_relation) | map(attribute = 'name') | list -%}\n {%- set ns = namespace() -%} {#-- handle for-loop scoping with a namespace --#}\n {%- set ns.column_added = false -%}\n\n {%- set intersection = [] -%}\n {%- for col in query_columns -%}\n {%- if col in existing_cols -%}\n {%- do intersection.append(adapter.quote(col)) -%}\n {%- else -%}\n {% set ns.column_added = true %}\n {%- endif -%}\n {%- endfor -%}\n {{ return((ns.column_added, intersection)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "node", "type": null, "description": ""}, {"name": "target_exists", "type": null, "description": ""}, {"name": "check_cols_config", "type": null, "description": ""}], "created_at": 1783450492.4937506, "supported_languages": null}, "macro.dbt.snapshot_check_strategy": {"name": "snapshot_check_strategy", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_check_strategy", "macro_sql": "{% macro snapshot_check_strategy(node, snapshotted_rel, current_rel, model_config, target_exists) %}\n {# The model_config parameter is no longer used, but is passed in anyway for compatibility. #}\n {% set check_cols_config = config.get('check_cols') %}\n {% set primary_key = config.get('unique_key') %}\n {% set hard_deletes = adapter.get_hard_deletes_behavior(config) %}\n {% set invalidate_hard_deletes = hard_deletes == 'invalidate' %}\n {% set updated_at = config.get('updated_at') or snapshot_get_time() %}\n\n {% set column_added = false %}\n\n {% set column_added, check_cols = snapshot_check_all_get_existing_columns(node, target_exists, check_cols_config) %}\n\n {%- set row_changed_expr -%}\n (\n {%- if column_added -%}\n {{ get_true_sql() }}\n {%- else -%}\n {%- for col in check_cols -%}\n {{ snapshotted_rel }}.{{ col }} != {{ current_rel }}.{{ col }}\n or\n (\n (({{ snapshotted_rel }}.{{ col }} is null) and not ({{ current_rel }}.{{ col }} is null))\n or\n ((not {{ snapshotted_rel }}.{{ col }} is null) and ({{ current_rel }}.{{ col }} is null))\n )\n {%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n {%- endif -%}\n )\n {%- endset %}\n\n {% set scd_args = api.Relation.scd_args(primary_key, updated_at) %}\n {% set scd_id_expr = snapshot_hash_arguments(scd_args) %}\n\n {% do return({\n \"unique_key\": primary_key,\n \"updated_at\": updated_at,\n \"row_changed\": row_changed_expr,\n \"scd_id\": scd_id_expr,\n \"invalidate_hard_deletes\": invalidate_hard_deletes,\n \"hard_deletes\": hard_deletes\n }) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.snapshot_get_time", "macro.dbt.snapshot_check_all_get_existing_columns", "macro.dbt.get_true_sql", "macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "node", "type": null, "description": ""}, {"name": "snapshotted_rel", "type": null, "description": ""}, {"name": "current_rel", "type": null, "description": ""}, {"name": "model_config", "type": null, "description": ""}, {"name": "target_exists", "type": null, "description": ""}], "created_at": 1783450492.4965992, "supported_languages": null}, "macro.dbt.materialization_snapshot_default": {"name": "materialization_snapshot_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/snapshot.sql", "original_file_path": "macros/materializations/snapshots/snapshot.sql", "unique_id": "macro.dbt.materialization_snapshot_default", "macro_sql": "{% materialization snapshot, default %}\n\n {%- set target_table = model.get('alias', model.get('name')) -%}\n\n {%- set strategy_name = config.get('strategy') -%}\n {%- set unique_key = config.get('unique_key') %}\n -- grab current tables grants config for comparision later on\n {%- set grant_config = config.get('grants') -%}\n\n {% set target_relation_exists, target_relation = get_or_create_relation(\n database=model.database,\n schema=model.schema,\n identifier=target_table,\n type='table') -%}\n\n {%- if not target_relation.is_table -%}\n {% do exceptions.relation_wrong_type(target_relation, 'table') %}\n {%- endif -%}\n\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set strategy_macro = strategy_dispatch(strategy_name) %}\n {# The model['config'] parameter below is no longer used, but passing anyway for compatibility #}\n {# It was a dictionary of config, instead of the config object from the context #}\n {% set strategy = strategy_macro(model, \"snapshotted_data\", \"source_data\", model['config'], target_relation_exists) %}\n\n {% if not target_relation_exists %}\n\n {% set build_sql = build_snapshot_table(strategy, model['compiled_code']) %}\n {% set build_or_select_sql = build_sql %}\n {% set final_sql = create_table_as(False, target_relation, build_sql) %}\n\n {% else %}\n\n {% set columns = config.get(\"snapshot_table_column_names\") or get_snapshot_table_column_names() %}\n\n {{ adapter.assert_valid_snapshot_target_given_strategy(target_relation, columns, strategy) }}\n\n {% set build_or_select_sql = snapshot_staging_table(strategy, sql, target_relation) %}\n {% set staging_table = build_snapshot_staging_table(strategy, sql, target_relation) %}\n\n -- this may no-op if the database does not require column expansion\n {% do adapter.expand_target_column_types(from_relation=staging_table,\n to_relation=target_relation) %}\n\n {% set remove_columns = ['dbt_change_type', 'DBT_CHANGE_TYPE', 'dbt_unique_key', 'DBT_UNIQUE_KEY'] %}\n {% if unique_key | is_list %}\n {% for key in strategy.unique_key %}\n {{ remove_columns.append('dbt_unique_key_' + loop.index|string) }}\n {{ remove_columns.append('DBT_UNIQUE_KEY_' + loop.index|string) }}\n {% endfor %}\n {% endif %}\n\n {% set missing_columns = adapter.get_missing_columns(staging_table, target_relation)\n | rejectattr('name', 'in', remove_columns)\n | list %}\n\n {% do create_columns(target_relation, missing_columns) %}\n\n {% set source_columns = adapter.get_columns_in_relation(staging_table)\n | rejectattr('name', 'in', remove_columns)\n | list %}\n\n {% set quoted_source_columns = [] %}\n {% for column in source_columns %}\n {% do quoted_source_columns.append(adapter.quote(column.name)) %}\n {% endfor %}\n\n {% set final_sql = snapshot_merge_sql(\n target = target_relation,\n source = staging_table,\n insert_cols = quoted_source_columns\n )\n %}\n\n {% endif %}\n\n\n {{ check_time_data_types(build_or_select_sql) }}\n\n {% call statement('main') %}\n {{ final_sql }}\n {% endcall %}\n\n {% set should_revoke = should_revoke(target_relation_exists, full_refresh_mode=False) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if not target_relation_exists %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n {% if staging_table is defined %}\n {% do post_snapshot(staging_table) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.get_or_create_relation", "macro.dbt.run_hooks", "macro.dbt.strategy_dispatch", "macro.dbt.build_snapshot_table", "macro.dbt.create_table_as", "macro.dbt.get_snapshot_table_column_names", "macro.dbt.snapshot_staging_table", "macro.dbt.build_snapshot_staging_table", "macro.dbt.create_columns", "macro.dbt.snapshot_merge_sql", "macro.dbt.check_time_data_types", "macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes", "macro.dbt.post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1783450492.5044525, "supported_languages": ["sql"]}, "macro.dbt.snapshot_merge_sql": {"name": "snapshot_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "unique_id": "macro.dbt.snapshot_merge_sql", "macro_sql": "{% macro snapshot_merge_sql(target, source, insert_cols) -%}\n {{ adapter.dispatch('snapshot_merge_sql', 'dbt')(target, source, insert_cols) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__snapshot_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "insert_cols", "type": null, "description": ""}], "created_at": 1783450492.5053208, "supported_languages": null}, "macro.dbt.default__snapshot_merge_sql": {"name": "default__snapshot_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "unique_id": "macro.dbt.default__snapshot_merge_sql", "macro_sql": "{% macro default__snapshot_merge_sql(target, source, insert_cols) -%}\n {%- set insert_cols_csv = insert_cols | join(', ') -%}\n\n {%- set columns = config.get(\"snapshot_table_column_names\") or get_snapshot_table_column_names() -%}\n\n merge into {{ target.render() }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on DBT_INTERNAL_SOURCE.{{ columns.dbt_scd_id }} = DBT_INTERNAL_DEST.{{ columns.dbt_scd_id }}\n\n when matched\n {% if config.get(\"dbt_valid_to_current\") %}\n\t{% set source_unique_key = (\"DBT_INTERNAL_DEST.\" ~ columns.dbt_valid_to) | trim %}\n\t{% set target_unique_key = config.get('dbt_valid_to_current') | trim %}\n\tand ({{ equals(source_unique_key, target_unique_key) }} or {{ source_unique_key }} is null)\n\n {% else %}\n and DBT_INTERNAL_DEST.{{ columns.dbt_valid_to }} is null\n {% endif %}\n and DBT_INTERNAL_SOURCE.dbt_change_type in ('update', 'delete')\n then update\n set {{ columns.dbt_valid_to }} = DBT_INTERNAL_SOURCE.{{ columns.dbt_valid_to }}\n\n when not matched\n and DBT_INTERNAL_SOURCE.dbt_change_type = 'insert'\n then insert ({{ insert_cols_csv }})\n values ({{ insert_cols_csv }})\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_snapshot_table_column_names", "macro.dbt.equals"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "insert_cols", "type": null, "description": ""}], "created_at": 1783450492.5069532, "supported_languages": null}, "macro.dbt.get_test_sql": {"name": "get_test_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "unique_id": "macro.dbt.get_test_sql", "macro_sql": "{% macro get_test_sql(main_sql, fail_calc, warn_if, error_if, limit) -%}\n {{ adapter.dispatch('get_test_sql', 'dbt')(main_sql, fail_calc, warn_if, error_if, limit) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "main_sql", "type": null, "description": ""}, {"name": "fail_calc", "type": null, "description": ""}, {"name": "warn_if", "type": null, "description": ""}, {"name": "error_if", "type": null, "description": ""}, {"name": "limit", "type": null, "description": ""}], "created_at": 1783450492.5079663, "supported_languages": null}, "macro.dbt.default__get_test_sql": {"name": "default__get_test_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "unique_id": "macro.dbt.default__get_test_sql", "macro_sql": "{% macro default__get_test_sql(main_sql, fail_calc, warn_if, error_if, limit) -%}\n select\n {{ fail_calc }} as failures,\n {{ fail_calc }} {{ warn_if }} as should_warn,\n {{ fail_calc }} {{ error_if }} as should_error\n from (\n {{ main_sql }}\n {{ \"limit \" ~ limit if limit != none }}\n ) dbt_internal_test\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "main_sql", "type": null, "description": ""}, {"name": "fail_calc", "type": null, "description": ""}, {"name": "warn_if", "type": null, "description": ""}, {"name": "error_if", "type": null, "description": ""}, {"name": "limit", "type": null, "description": ""}], "created_at": 1783450492.5085878, "supported_languages": null}, "macro.dbt.get_unit_test_sql": {"name": "get_unit_test_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "unique_id": "macro.dbt.get_unit_test_sql", "macro_sql": "{% macro get_unit_test_sql(main_sql, expected_fixture_sql, expected_column_names) -%}\n {{ adapter.dispatch('get_unit_test_sql', 'dbt')(main_sql, expected_fixture_sql, expected_column_names) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_unit_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "main_sql", "type": null, "description": ""}, {"name": "expected_fixture_sql", "type": null, "description": ""}, {"name": "expected_column_names", "type": null, "description": ""}], "created_at": 1783450492.5089917, "supported_languages": null}, "macro.dbt.default__get_unit_test_sql": {"name": "default__get_unit_test_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "unique_id": "macro.dbt.default__get_unit_test_sql", "macro_sql": "{% macro default__get_unit_test_sql(main_sql, expected_fixture_sql, expected_column_names) -%}\n-- Build actual result given inputs\nwith dbt_internal_unit_test_actual as (\n select\n {% for expected_column_name in expected_column_names %}{{expected_column_name}}{% if not loop.last -%},{% endif %}{%- endfor -%}, {{ dbt.string_literal(\"actual\") }} as {{ adapter.quote(\"actual_or_expected\") }}\n from (\n {{ main_sql }}\n ) _dbt_internal_unit_test_actual\n),\n-- Build expected result\ndbt_internal_unit_test_expected as (\n select\n {% for expected_column_name in expected_column_names %}{{expected_column_name}}{% if not loop.last -%}, {% endif %}{%- endfor -%}, {{ dbt.string_literal(\"expected\") }} as {{ adapter.quote(\"actual_or_expected\") }}\n from (\n {{ expected_fixture_sql }}\n ) _dbt_internal_unit_test_expected\n)\n-- Union actual and expected results\nselect * from dbt_internal_unit_test_actual\nunion all\nselect * from dbt_internal_unit_test_expected\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.string_literal"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "main_sql", "type": null, "description": ""}, {"name": "expected_fixture_sql", "type": null, "description": ""}, {"name": "expected_column_names", "type": null, "description": ""}], "created_at": 1783450492.5102234, "supported_languages": null}, "macro.dbt.materialization_unit_default": {"name": "materialization_unit_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/unit.sql", "original_file_path": "macros/materializations/tests/unit.sql", "unique_id": "macro.dbt.materialization_unit_default", "macro_sql": "{%- materialization unit, default -%}\n\n {% set relations = [] %}\n {% set sql_header = config.get('sql_header') if flags.REQUIRE_SQL_HEADER_IN_TEST_CONFIGS else none %}\n\n {% set expected_rows = config.get('expected_rows') %}\n {% set expected_sql = config.get('expected_sql') %}\n {% set tested_expected_column_names = expected_rows[0].keys() if (expected_rows | length ) > 0 else get_columns_in_query(sql) %}\n\n {%- set target_relation = this.incorporate(type='table') -%}\n {%- set temp_relation = make_temp_relation(target_relation)-%}\n {% do run_query(get_create_table_as_sql(True, temp_relation, get_empty_subquery_sql(sql))) %}\n {%- set columns_in_relation = adapter.get_columns_in_relation(temp_relation) -%}\n {%- set column_name_to_data_types = {} -%}\n {%- set column_name_to_quoted = {} -%}\n {%- for column in columns_in_relation -%}\n {%- do column_name_to_data_types.update({column.name|lower: column.data_type}) -%}\n {%- do column_name_to_quoted.update({column.name|lower: column.quoted}) -%}\n {%- endfor -%}\n\n {%- set expected_column_names_quoted = [] -%}\n {%- for column_name in tested_expected_column_names -%}\n {%- do expected_column_names_quoted.append(column_name_to_quoted[column_name|lower]) -%}\n {%- endfor -%}\n\n {% if not expected_sql %}\n {% set expected_sql = get_expected_sql(expected_rows, column_name_to_data_types, column_name_to_quoted) %}\n {% endif %}\n {% set unit_test_sql = get_unit_test_sql(sql, expected_sql, expected_column_names_quoted) %}\n\n {% call statement('main', fetch_result=True) -%}\n\n {% if sql_header %}{{ sql_header }}{% endif %}\n {{ unit_test_sql }}\n\n {%- endcall %}\n\n {% do adapter.drop_relation(temp_relation) %}\n\n {{ return({'relations': relations}) }}\n\n{%- endmaterialization -%}", "depends_on": {"macros": ["macro.dbt.get_columns_in_query", "macro.dbt.make_temp_relation", "macro.dbt.run_query", "macro.dbt.get_create_table_as_sql", "macro.dbt.get_empty_subquery_sql", "macro.dbt.get_expected_sql", "macro.dbt.get_unit_test_sql", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1783450492.5141726, "supported_languages": ["sql"]}, "macro.dbt.materialization_test_default": {"name": "materialization_test_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/test.sql", "original_file_path": "macros/materializations/tests/test.sql", "unique_id": "macro.dbt.materialization_test_default", "macro_sql": "{%- materialization test, default -%}\n\n {% set relations = [] %}\n {% set limit = config.get('limit') %}\n {% set sql_header = config.get('sql_header') if flags.REQUIRE_SQL_HEADER_IN_TEST_CONFIGS else none %}\n\n {% set sql_with_limit %}\n {{ get_limit_subquery_sql(sql, limit) }}\n {% endset %}\n\n {% if should_store_failures() %}\n\n {% set identifier = model['alias'] %}\n {% set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) %}\n\n {% set store_failures_as = config.get('store_failures_as') %}\n -- if `--store-failures` is invoked via command line and `store_failures_as` is not set,\n -- config.get('store_failures_as', 'table') returns None, not 'table'\n {% if store_failures_as == none %}{% set store_failures_as = 'table' %}{% endif %}\n {% if store_failures_as not in ['table', 'view'] %}\n {{ exceptions.raise_compiler_error(\n \"'\" ~ store_failures_as ~ \"' is not a valid value for `store_failures_as`. \"\n \"Accepted values are: ['ephemeral', 'table', 'view']\"\n ) }}\n {% endif %}\n\n {% set target_relation = api.Relation.create(\n identifier=identifier, schema=schema, database=database, type=store_failures_as) -%} %}\n\n {% if old_relation %}\n {% do adapter.drop_relation(old_relation) %}\n {% endif %}\n\n {% call statement(auto_begin=True) %}\n {% if sql_header %}{{ sql_header }}{% endif %}\n {{ get_create_sql(target_relation, sql_with_limit) }}\n {% endcall %}\n\n {% do relations.append(target_relation) %}\n\n {# Since the test failures have already been saved to the database, reuse that result rather than querying again #}\n {% set main_sql %}\n select *\n from {{ target_relation }}\n {% endset %}\n\n {{ adapter.commit() }}\n\n {% else %}\n\n {% set main_sql = sql_with_limit %}\n\n {% endif %}\n\n {% set fail_calc = config.get('fail_calc') %}\n {% set warn_if = config.get('warn_if') %}\n {% set error_if = config.get('error_if') %}\n\n {% call statement('main', fetch_result=True) -%}\n\n {% if sql_header %}{{ sql_header }}{% endif %}\n {# The limit has already been included above, and we do not want to duplicate it again. We also want to be safe for macro overrides treating `limit` as a required parameter. #}\n {{ get_test_sql(main_sql, fail_calc, warn_if, error_if, limit=none)}}\n\n {%- endcall %}\n\n {{ return({'relations': relations}) }}\n\n{%- endmaterialization -%}", "depends_on": {"macros": ["macro.dbt.get_limit_subquery_sql", "macro.dbt.should_store_failures", "macro.dbt.statement", "macro.dbt.get_create_sql", "macro.dbt.get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1783450492.5190787, "supported_languages": ["sql"]}, "macro.dbt.get_where_subquery": {"name": "get_where_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "unique_id": "macro.dbt.get_where_subquery", "macro_sql": "{% macro get_where_subquery(relation) -%}\n {% do return(adapter.dispatch('get_where_subquery', 'dbt')(relation)) %}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_where_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.519731, "supported_languages": null}, "macro.dbt.default__get_where_subquery": {"name": "default__get_where_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "unique_id": "macro.dbt.default__get_where_subquery", "macro_sql": "{% macro default__get_where_subquery(relation) -%}\n {% set where = config.get('where', '') %}\n {% if where %}\n {%- set filtered -%}\n (select * from {{ relation }} where {{ where }}) dbt_subquery\n {%- endset -%}\n {% do return(filtered) %}\n {%- else -%}\n {% do return(relation) %}\n {%- endif -%}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.5205057, "supported_languages": null}, "macro.dbt.materialization_seed_default": {"name": "materialization_seed_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/seed.sql", "original_file_path": "macros/materializations/seeds/seed.sql", "unique_id": "macro.dbt.materialization_seed_default", "macro_sql": "{% materialization seed, default %}\n\n {%- set identifier = model['alias'] -%}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n\n {%- set exists_as_table = (old_relation is not none and old_relation.is_table) -%}\n {%- set exists_as_view = (old_relation is not none and old_relation.is_view) -%}\n\n {%- set grant_config = config.get('grants') -%}\n {%- set agate_table = load_agate_table() -%}\n -- grab current tables grants config for comparison later on\n\n {%- do store_result('agate_table', response='OK', agate_table=agate_table) -%}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% set create_table_sql = \"\" %}\n {% if exists_as_view %}\n {{ exceptions.raise_compiler_error(\"Cannot seed to '{}', it is a view\".format(old_relation.render())) }}\n {% elif exists_as_table %}\n {% set create_table_sql = reset_csv_table(model, full_refresh_mode, old_relation, agate_table) %}\n {% else %}\n {% set create_table_sql = create_csv_table(model, agate_table) %}\n {% endif %}\n\n {% set code = 'CREATE' if full_refresh_mode else 'INSERT' %}\n {% set rows_affected = (agate_table.rows | length) %}\n {% set sql = \"\" %}\n {% if rows_affected > 0 %}\n {% set sql = load_csv_rows(model, agate_table) %}\n {% endif %}\n\n {% call noop_statement('main', code ~ ' ' ~ rows_affected, code, rows_affected) %}\n {{ get_csv_sql(create_table_sql, sql) }};\n {% endcall %}\n\n {% set target_relation = this.incorporate(type='table') %}\n\n {% set should_revoke = should_revoke(old_relation, full_refresh_mode) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if full_refresh_mode or not exists_as_table %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.should_full_refresh", "macro.dbt.run_hooks", "macro.dbt.reset_csv_table", "macro.dbt.create_csv_table", "macro.dbt.load_csv_rows", "macro.dbt.noop_statement", "macro.dbt.get_csv_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1783450492.5255044, "supported_languages": ["sql"]}, "macro.dbt.create_csv_table": {"name": "create_csv_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.create_csv_table", "macro_sql": "{% macro create_csv_table(model, agate_table) -%}\n {{ adapter.dispatch('create_csv_table', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "agate_table", "type": null, "description": ""}], "created_at": 1783450492.5272763, "supported_languages": null}, "macro.dbt.default__create_csv_table": {"name": "default__create_csv_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__create_csv_table", "macro_sql": "{% macro default__create_csv_table(model, agate_table) %}\n {%- set column_override = model['config'].get('column_types', {}) -%}\n {%- set quote_seed_column = model['config'].get('quote_columns', None) -%}\n\n {% set sql %}\n create table {{ this.render() }} (\n {%- for col_name in agate_table.column_names -%}\n {%- set inferred_type = adapter.convert_type(agate_table, loop.index0) -%}\n {%- set type = column_override.get(col_name, inferred_type) -%}\n {%- set column_name = (col_name | string) -%}\n {{ adapter.quote_seed_column(column_name, quote_seed_column) }} {{ type }} {%- if not loop.last -%}, {%- endif -%}\n {%- endfor -%}\n )\n {% endset %}\n\n {% call statement('_') -%}\n {{ sql }}\n {%- endcall %}\n\n {{ return(sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "agate_table", "type": null, "description": ""}], "created_at": 1783450492.5290213, "supported_languages": null}, "macro.dbt.reset_csv_table": {"name": "reset_csv_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.reset_csv_table", "macro_sql": "{% macro reset_csv_table(model, full_refresh, old_relation, agate_table) -%}\n {{ adapter.dispatch('reset_csv_table', 'dbt')(model, full_refresh, old_relation, agate_table) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__reset_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "full_refresh", "type": null, "description": ""}, {"name": "old_relation", "type": null, "description": ""}, {"name": "agate_table", "type": null, "description": ""}], "created_at": 1783450492.5294924, "supported_languages": null}, "macro.dbt.default__reset_csv_table": {"name": "default__reset_csv_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__reset_csv_table", "macro_sql": "{% macro default__reset_csv_table(model, full_refresh, old_relation, agate_table) %}\n {% set sql = \"\" %}\n {% if full_refresh %}\n {{ adapter.drop_relation(old_relation) }}\n {% set sql = create_csv_table(model, agate_table) %}\n {% else %}\n {{ adapter.truncate_relation(old_relation) }}\n {% set sql = \"truncate table \" ~ old_relation.render() %}\n {% endif %}\n\n {{ return(sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "full_refresh", "type": null, "description": ""}, {"name": "old_relation", "type": null, "description": ""}, {"name": "agate_table", "type": null, "description": ""}], "created_at": 1783450492.530453, "supported_languages": null}, "macro.dbt.get_csv_sql": {"name": "get_csv_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.get_csv_sql", "macro_sql": "{% macro get_csv_sql(create_or_truncate_sql, insert_sql) %}\n {{ adapter.dispatch('get_csv_sql', 'dbt')(create_or_truncate_sql, insert_sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_csv_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "create_or_truncate_sql", "type": null, "description": ""}, {"name": "insert_sql", "type": null, "description": ""}], "created_at": 1783450492.5308323, "supported_languages": null}, "macro.dbt.default__get_csv_sql": {"name": "default__get_csv_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__get_csv_sql", "macro_sql": "{% macro default__get_csv_sql(create_or_truncate_sql, insert_sql) %}\n {{ create_or_truncate_sql }};\n -- dbt seed --\n {{ insert_sql }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "create_or_truncate_sql", "type": null, "description": ""}, {"name": "insert_sql", "type": null, "description": ""}], "created_at": 1783450492.531104, "supported_languages": null}, "macro.dbt.get_binding_char": {"name": "get_binding_char", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.get_binding_char", "macro_sql": "{% macro get_binding_char() -%}\n {{ adapter.dispatch('get_binding_char', 'dbt')() }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.5313876, "supported_languages": null}, "macro.dbt.default__get_binding_char": {"name": "default__get_binding_char", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__get_binding_char", "macro_sql": "{% macro default__get_binding_char() %}\n {{ return('%s') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.5316541, "supported_languages": null}, "macro.dbt.get_batch_size": {"name": "get_batch_size", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.get_batch_size", "macro_sql": "{% macro get_batch_size() -%}\n {{ return(adapter.dispatch('get_batch_size', 'dbt')()) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_batch_size"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.5319712, "supported_languages": null}, "macro.dbt.default__get_batch_size": {"name": "default__get_batch_size", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__get_batch_size", "macro_sql": "{% macro default__get_batch_size() %}\n {{ return(10000) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.5322058, "supported_languages": null}, "macro.dbt.get_seed_column_quoted_csv": {"name": "get_seed_column_quoted_csv", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.get_seed_column_quoted_csv", "macro_sql": "{% macro get_seed_column_quoted_csv(model, column_names) %}\n {%- set quote_seed_column = model['config'].get('quote_columns', None) -%}\n {% set quoted = [] %}\n {% for col in column_names -%}\n {%- do quoted.append(adapter.quote_seed_column(col, quote_seed_column)) -%}\n {%- endfor %}\n\n {%- set dest_cols_csv = quoted | join(', ') -%}\n {{ return(dest_cols_csv) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_names", "type": null, "description": ""}], "created_at": 1783450492.5332336, "supported_languages": null}, "macro.dbt.load_csv_rows": {"name": "load_csv_rows", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.load_csv_rows", "macro_sql": "{% macro load_csv_rows(model, agate_table) -%}\n {{ adapter.dispatch('load_csv_rows', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__load_csv_rows"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "agate_table", "type": null, "description": ""}], "created_at": 1783450492.5336125, "supported_languages": null}, "macro.dbt.default__load_csv_rows": {"name": "default__load_csv_rows", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__load_csv_rows", "macro_sql": "{% macro default__load_csv_rows(model, agate_table) %}\n\n {% set batch_size = get_batch_size() %}\n\n {% set cols_sql = get_seed_column_quoted_csv(model, agate_table.column_names) %}\n {% set bindings = [] %}\n\n {% set statements = [] %}\n\n {% for chunk in agate_table.rows | batch(batch_size) %}\n {% set bindings = [] %}\n\n {% for row in chunk %}\n {% do bindings.extend(row) %}\n {% endfor %}\n\n {% set sql %}\n insert into {{ this.render() }} ({{ cols_sql }}) values\n {% for row in chunk -%}\n ({%- for column in agate_table.column_names -%}\n {{ get_binding_char() }}\n {%- if not loop.last%},{%- endif %}\n {%- endfor -%})\n {%- if not loop.last%},{%- endif %}\n {%- endfor %}\n {% endset %}\n\n {% do adapter.add_query(sql, bindings=bindings, abridge_sql_log=True) %}\n\n {% if loop.index0 == 0 %}\n {% do statements.append(sql) %}\n {% endif %}\n {% endfor %}\n\n {# Return SQL so we can render it out into the compiled files #}\n {{ return(statements[0]) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_batch_size", "macro.dbt.get_seed_column_quoted_csv", "macro.dbt.get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "agate_table", "type": null, "description": ""}], "created_at": 1783450492.5359685, "supported_languages": null}, "macro.dbt.get_drop_backup_sql": {"name": "get_drop_backup_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop_backup.sql", "original_file_path": "macros/relations/drop_backup.sql", "unique_id": "macro.dbt.get_drop_backup_sql", "macro_sql": "{%- macro get_drop_backup_sql(relation) -%}\n {{- log('Applying DROP BACKUP to: ' ~ relation) -}}\n {{- adapter.dispatch('get_drop_backup_sql', 'dbt')(relation) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_drop_backup_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.5365934, "supported_languages": null}, "macro.dbt.default__get_drop_backup_sql": {"name": "default__get_drop_backup_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop_backup.sql", "original_file_path": "macros/relations/drop_backup.sql", "unique_id": "macro.dbt.default__get_drop_backup_sql", "macro_sql": "{%- macro default__get_drop_backup_sql(relation) -%}\n\n -- get the standard backup name\n {% set backup_relation = make_backup_relation(relation, relation.type) %}\n\n {{ get_drop_sql(backup_relation) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.make_backup_relation", "macro.dbt.get_drop_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.537007, "supported_languages": null}, "macro.dbt.get_create_intermediate_sql": {"name": "get_create_intermediate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create_intermediate.sql", "original_file_path": "macros/relations/create_intermediate.sql", "unique_id": "macro.dbt.get_create_intermediate_sql", "macro_sql": "{%- macro get_create_intermediate_sql(relation, sql) -%}\n {{- log('Applying CREATE INTERMEDIATE to: ' ~ relation) -}}\n {{- adapter.dispatch('get_create_intermediate_sql', 'dbt')(relation, sql) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_create_intermediate_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.537664, "supported_languages": null}, "macro.dbt.default__get_create_intermediate_sql": {"name": "default__get_create_intermediate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create_intermediate.sql", "original_file_path": "macros/relations/create_intermediate.sql", "unique_id": "macro.dbt.default__get_create_intermediate_sql", "macro_sql": "{%- macro default__get_create_intermediate_sql(relation, sql) -%}\n\n -- get the standard intermediate name\n {% set intermediate_relation = make_intermediate_relation(relation) %}\n\n -- drop any pre-existing intermediate\n {{ get_drop_sql(intermediate_relation) }};\n\n {{ get_create_sql(intermediate_relation, sql) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.make_intermediate_relation", "macro.dbt.get_drop_sql", "macro.dbt.get_create_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.5381558, "supported_languages": null}, "macro.dbt.get_replace_sql": {"name": "get_replace_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/replace.sql", "original_file_path": "macros/relations/replace.sql", "unique_id": "macro.dbt.get_replace_sql", "macro_sql": "{% macro get_replace_sql(existing_relation, target_relation, sql) %}\n {{- log('Applying REPLACE to: ' ~ existing_relation) -}}\n {{- adapter.dispatch('get_replace_sql', 'dbt')(existing_relation, target_relation, sql) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_replace_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "existing_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.5391793, "supported_languages": null}, "macro.dbt.default__get_replace_sql": {"name": "default__get_replace_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/replace.sql", "original_file_path": "macros/relations/replace.sql", "unique_id": "macro.dbt.default__get_replace_sql", "macro_sql": "{% macro default__get_replace_sql(existing_relation, target_relation, sql) %}\n\n {# /* use a create or replace statement if possible */ #}\n\n {% set is_replaceable = existing_relation.type == target_relation.type and existing_relation.can_be_replaced %}\n\n {% if is_replaceable and existing_relation.is_view %}\n {{ get_replace_view_sql(target_relation, sql) }}\n\n {% elif is_replaceable and existing_relation.is_table %}\n {{ get_replace_table_sql(target_relation, sql) }}\n\n {% elif is_replaceable and existing_relation.is_materialized_view %}\n {{ get_replace_materialized_view_sql(target_relation, sql) }}\n\n {# /* a create or replace statement is not possible, so try to stage and/or backup to be safe */ #}\n\n {# /* create target_relation as an intermediate relation, then swap it out with the existing one using a backup */ #}\n {%- elif target_relation.can_be_renamed and existing_relation.can_be_renamed -%}\n {{ get_create_intermediate_sql(target_relation, sql) }};\n {{ get_create_backup_sql(existing_relation) }};\n {{ get_rename_intermediate_sql(target_relation) }};\n {{ get_drop_backup_sql(existing_relation) }}\n\n {# /* create target_relation as an intermediate relation, then swap it out with the existing one without using a backup */ #}\n {%- elif target_relation.can_be_renamed -%}\n {{ get_create_intermediate_sql(target_relation, sql) }};\n {{ get_drop_sql(existing_relation) }};\n {{ get_rename_intermediate_sql(target_relation) }}\n\n {# /* create target_relation in place by first backing up the existing relation */ #}\n {%- elif existing_relation.can_be_renamed -%}\n {{ get_create_backup_sql(existing_relation) }};\n {{ get_create_sql(target_relation, sql) }};\n {{ get_drop_backup_sql(existing_relation) }}\n\n {# /* no renaming is allowed, so just drop and create */ #}\n {%- else -%}\n {{ get_drop_sql(existing_relation) }};\n {{ get_create_sql(target_relation, sql) }}\n\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_replace_view_sql", "macro.dbt.get_replace_table_sql", "macro.dbt.get_replace_materialized_view_sql", "macro.dbt.get_create_intermediate_sql", "macro.dbt.get_create_backup_sql", "macro.dbt.get_rename_intermediate_sql", "macro.dbt.get_drop_backup_sql", "macro.dbt.get_drop_sql", "macro.dbt.get_create_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "existing_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.5415173, "supported_languages": null}, "macro.dbt.get_rename_intermediate_sql": {"name": "get_rename_intermediate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename_intermediate.sql", "original_file_path": "macros/relations/rename_intermediate.sql", "unique_id": "macro.dbt.get_rename_intermediate_sql", "macro_sql": "{%- macro get_rename_intermediate_sql(relation) -%}\n {{- log('Applying RENAME INTERMEDIATE to: ' ~ relation) -}}\n {{- adapter.dispatch('get_rename_intermediate_sql', 'dbt')(relation) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_rename_intermediate_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.5421152, "supported_languages": null}, "macro.dbt.default__get_rename_intermediate_sql": {"name": "default__get_rename_intermediate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename_intermediate.sql", "original_file_path": "macros/relations/rename_intermediate.sql", "unique_id": "macro.dbt.default__get_rename_intermediate_sql", "macro_sql": "{%- macro default__get_rename_intermediate_sql(relation) -%}\n\n -- get the standard intermediate name\n {% set intermediate_relation = make_intermediate_relation(relation) %}\n\n {{ get_rename_sql(intermediate_relation, relation.identifier) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.make_intermediate_relation", "macro.dbt.get_rename_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.5425467, "supported_languages": null}, "macro.dbt.get_drop_sql": {"name": "get_drop_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.get_drop_sql", "macro_sql": "{%- macro get_drop_sql(relation) -%}\n {{- log('Applying DROP to: ' ~ relation) -}}\n {{- adapter.dispatch('get_drop_sql', 'dbt')(relation) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_drop_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.543367, "supported_languages": null}, "macro.dbt.default__get_drop_sql": {"name": "default__get_drop_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.default__get_drop_sql", "macro_sql": "{%- macro default__get_drop_sql(relation) -%}\n\n {%- if relation.is_view -%}\n {{ drop_view(relation) }}\n\n {%- elif relation.is_table -%}\n {{ drop_table(relation) }}\n\n {%- elif relation.is_materialized_view -%}\n {{ drop_materialized_view(relation) }}\n\n {%- else -%}\n drop {{ relation.type }} if exists {{ relation.render() }} cascade\n\n {%- endif -%}\n\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.drop_view", "macro.dbt.drop_table", "macro.dbt.drop_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.5441332, "supported_languages": null}, "macro.dbt.drop_relation": {"name": "drop_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.drop_relation", "macro_sql": "{% macro drop_relation(relation) -%}\n {{ return(adapter.dispatch('drop_relation', 'dbt')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__drop_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.5445127, "supported_languages": null}, "macro.dbt.default__drop_relation": {"name": "default__drop_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.default__drop_relation", "macro_sql": "{% macro default__drop_relation(relation) -%}\n {% call statement('drop_relation', auto_begin=False) -%}\n {{ get_drop_sql(relation) }}\n {%- endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.get_drop_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.5449085, "supported_languages": null}, "macro.dbt.drop_relation_if_exists": {"name": "drop_relation_if_exists", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.drop_relation_if_exists", "macro_sql": "{% macro drop_relation_if_exists(relation) %}\n {% if relation is not none %}\n {{ adapter.drop_relation(relation) }}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.5452895, "supported_languages": null}, "macro.dbt.drop_schema_named": {"name": "drop_schema_named", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/schema.sql", "original_file_path": "macros/relations/schema.sql", "unique_id": "macro.dbt.drop_schema_named", "macro_sql": "{% macro drop_schema_named(schema_name) %}\n {{ return(adapter.dispatch('drop_schema_named', 'dbt') (schema_name)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__drop_schema_named"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_name", "type": null, "description": ""}], "created_at": 1783450492.5458133, "supported_languages": null}, "macro.dbt.default__drop_schema_named": {"name": "default__drop_schema_named", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/schema.sql", "original_file_path": "macros/relations/schema.sql", "unique_id": "macro.dbt.default__drop_schema_named", "macro_sql": "{% macro default__drop_schema_named(schema_name) %}\n {% set schema_relation = api.Relation.create(schema=schema_name) %}\n {{ adapter.drop_schema(schema_relation) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_name", "type": null, "description": ""}], "created_at": 1783450492.5463398, "supported_languages": null}, "macro.dbt.get_create_backup_sql": {"name": "get_create_backup_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create_backup.sql", "original_file_path": "macros/relations/create_backup.sql", "unique_id": "macro.dbt.get_create_backup_sql", "macro_sql": "{%- macro get_create_backup_sql(relation) -%}\n {{- log('Applying CREATE BACKUP to: ' ~ relation) -}}\n {{- adapter.dispatch('get_create_backup_sql', 'dbt')(relation) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_create_backup_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.5469463, "supported_languages": null}, "macro.dbt.default__get_create_backup_sql": {"name": "default__get_create_backup_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create_backup.sql", "original_file_path": "macros/relations/create_backup.sql", "unique_id": "macro.dbt.default__get_create_backup_sql", "macro_sql": "{%- macro default__get_create_backup_sql(relation) -%}\n\n -- get the standard backup name\n {% set backup_relation = make_backup_relation(relation, relation.type) %}\n\n -- drop any pre-existing backup\n {{ get_drop_sql(backup_relation) }};\n\n {{ get_rename_sql(relation, backup_relation.identifier) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.make_backup_relation", "macro.dbt.get_drop_sql", "macro.dbt.get_rename_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.5474813, "supported_languages": null}, "macro.dbt.get_rename_sql": {"name": "get_rename_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename.sql", "original_file_path": "macros/relations/rename.sql", "unique_id": "macro.dbt.get_rename_sql", "macro_sql": "{%- macro get_rename_sql(relation, new_name) -%}\n {{- log('Applying RENAME to: ' ~ relation) -}}\n {{- adapter.dispatch('get_rename_sql', 'dbt')(relation, new_name) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_rename_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1783450492.5483694, "supported_languages": null}, "macro.dbt.default__get_rename_sql": {"name": "default__get_rename_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename.sql", "original_file_path": "macros/relations/rename.sql", "unique_id": "macro.dbt.default__get_rename_sql", "macro_sql": "{%- macro default__get_rename_sql(relation, new_name) -%}\n\n {%- if relation.is_view -%}\n {{ get_rename_view_sql(relation, new_name) }}\n\n {%- elif relation.is_table -%}\n {{ get_rename_table_sql(relation, new_name) }}\n\n {%- elif relation.is_materialized_view -%}\n {{ get_rename_materialized_view_sql(relation, new_name) }}\n\n {%- else -%}\n {{- exceptions.raise_compiler_error(\"`get_rename_sql` has not been implemented for: \" ~ relation.type ) -}}\n\n {%- endif -%}\n\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.get_rename_view_sql", "macro.dbt.get_rename_table_sql", "macro.dbt.get_rename_materialized_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1783450492.549256, "supported_languages": null}, "macro.dbt.rename_relation": {"name": "rename_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename.sql", "original_file_path": "macros/relations/rename.sql", "unique_id": "macro.dbt.rename_relation", "macro_sql": "{% macro rename_relation(from_relation, to_relation) -%}\n {{ return(adapter.dispatch('rename_relation', 'dbt')(from_relation, to_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__rename_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from_relation", "type": null, "description": ""}, {"name": "to_relation", "type": null, "description": ""}], "created_at": 1783450492.5498524, "supported_languages": null}, "macro.dbt.default__rename_relation": {"name": "default__rename_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename.sql", "original_file_path": "macros/relations/rename.sql", "unique_id": "macro.dbt.default__rename_relation", "macro_sql": "{% macro default__rename_relation(from_relation, to_relation) -%}\n {% set target_name = adapter.quote_as_configured(to_relation.identifier, 'identifier') %}\n {% call statement('rename_relation') -%}\n alter table {{ from_relation.render() }} rename to {{ target_name }}\n {%- endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from_relation", "type": null, "description": ""}, {"name": "to_relation", "type": null, "description": ""}], "created_at": 1783450492.5505576, "supported_languages": null}, "macro.dbt.get_create_sql": {"name": "get_create_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create.sql", "original_file_path": "macros/relations/create.sql", "unique_id": "macro.dbt.get_create_sql", "macro_sql": "{%- macro get_create_sql(relation, sql) -%}\n {{- log('Applying CREATE to: ' ~ relation) -}}\n {{- adapter.dispatch('get_create_sql', 'dbt')(relation, sql) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_create_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.5512786, "supported_languages": null}, "macro.dbt.default__get_create_sql": {"name": "default__get_create_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create.sql", "original_file_path": "macros/relations/create.sql", "unique_id": "macro.dbt.default__get_create_sql", "macro_sql": "{%- macro default__get_create_sql(relation, sql) -%}\n\n {%- if relation.is_view -%}\n {{ get_create_view_as_sql(relation, sql) }}\n\n {%- elif relation.is_table -%}\n {{ get_create_table_as_sql(False, relation, sql) }}\n\n {%- elif relation.is_materialized_view -%}\n {{ get_create_materialized_view_as_sql(relation, sql) }}\n\n {%- else -%}\n {{- exceptions.raise_compiler_error(\"`get_create_sql` has not been implemented for: \" ~ relation.type ) -}}\n\n {%- endif -%}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.get_create_view_as_sql", "macro.dbt.get_create_table_as_sql", "macro.dbt.get_create_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.5521698, "supported_languages": null}, "macro.dbt.get_replace_materialized_view_sql": {"name": "get_replace_materialized_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/replace.sql", "original_file_path": "macros/relations/materialized_view/replace.sql", "unique_id": "macro.dbt.get_replace_materialized_view_sql", "macro_sql": "{% macro get_replace_materialized_view_sql(relation, sql) %}\n {{- adapter.dispatch('get_replace_materialized_view_sql', 'dbt')(relation, sql) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_replace_materialized_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.552707, "supported_languages": null}, "macro.dbt.default__get_replace_materialized_view_sql": {"name": "default__get_replace_materialized_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/replace.sql", "original_file_path": "macros/relations/materialized_view/replace.sql", "unique_id": "macro.dbt.default__get_replace_materialized_view_sql", "macro_sql": "{% macro default__get_replace_materialized_view_sql(relation, sql) %}\n {{ exceptions.raise_compiler_error(\n \"`get_replace_materialized_view_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.553005, "supported_languages": null}, "macro.dbt.drop_materialized_view": {"name": "drop_materialized_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/drop.sql", "original_file_path": "macros/relations/materialized_view/drop.sql", "unique_id": "macro.dbt.drop_materialized_view", "macro_sql": "{% macro drop_materialized_view(relation) -%}\n {{- adapter.dispatch('drop_materialized_view', 'dbt')(relation) -}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__drop_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.5534923, "supported_languages": null}, "macro.dbt.default__drop_materialized_view": {"name": "default__drop_materialized_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/drop.sql", "original_file_path": "macros/relations/materialized_view/drop.sql", "unique_id": "macro.dbt.default__drop_materialized_view", "macro_sql": "{% macro default__drop_materialized_view(relation) -%}\n drop materialized view if exists {{ relation.render() }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.5537434, "supported_languages": null}, "macro.dbt.refresh_materialized_view": {"name": "refresh_materialized_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/refresh.sql", "original_file_path": "macros/relations/materialized_view/refresh.sql", "unique_id": "macro.dbt.refresh_materialized_view", "macro_sql": "{% macro refresh_materialized_view(relation) %}\n {{- log('Applying REFRESH to: ' ~ relation) -}}\n {{- adapter.dispatch('refresh_materialized_view', 'dbt')(relation) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__refresh_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.5543077, "supported_languages": null}, "macro.dbt.default__refresh_materialized_view": {"name": "default__refresh_materialized_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/refresh.sql", "original_file_path": "macros/relations/materialized_view/refresh.sql", "unique_id": "macro.dbt.default__refresh_materialized_view", "macro_sql": "{% macro default__refresh_materialized_view(relation) %}\n {{ exceptions.raise_compiler_error(\"`refresh_materialized_view` has not been implemented for this adapter.\") }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.5546, "supported_languages": null}, "macro.dbt.get_rename_materialized_view_sql": {"name": "get_rename_materialized_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/rename.sql", "original_file_path": "macros/relations/materialized_view/rename.sql", "unique_id": "macro.dbt.get_rename_materialized_view_sql", "macro_sql": "{% macro get_rename_materialized_view_sql(relation, new_name) %}\n {{- adapter.dispatch('get_rename_materialized_view_sql', 'dbt')(relation, new_name) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_rename_materialized_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1783450492.5550976, "supported_languages": null}, "macro.dbt.default__get_rename_materialized_view_sql": {"name": "default__get_rename_materialized_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/rename.sql", "original_file_path": "macros/relations/materialized_view/rename.sql", "unique_id": "macro.dbt.default__get_rename_materialized_view_sql", "macro_sql": "{% macro default__get_rename_materialized_view_sql(relation, new_name) %}\n {{ exceptions.raise_compiler_error(\n \"`get_rename_materialized_view_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1783450492.555853, "supported_languages": null}, "macro.dbt.get_create_materialized_view_as_sql": {"name": "get_create_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/create.sql", "original_file_path": "macros/relations/materialized_view/create.sql", "unique_id": "macro.dbt.get_create_materialized_view_as_sql", "macro_sql": "{% macro get_create_materialized_view_as_sql(relation, sql) -%}\n {{- adapter.dispatch('get_create_materialized_view_as_sql', 'dbt')(relation, sql) -}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_create_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.556355, "supported_languages": null}, "macro.dbt.default__get_create_materialized_view_as_sql": {"name": "default__get_create_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/create.sql", "original_file_path": "macros/relations/materialized_view/create.sql", "unique_id": "macro.dbt.default__get_create_materialized_view_as_sql", "macro_sql": "{% macro default__get_create_materialized_view_as_sql(relation, sql) -%}\n {{ exceptions.raise_compiler_error(\n \"`get_create_materialized_view_as_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.5566633, "supported_languages": null}, "macro.dbt.get_alter_materialized_view_as_sql": {"name": "get_alter_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt.get_alter_materialized_view_as_sql", "macro_sql": "{% macro get_alter_materialized_view_as_sql(\n relation,\n configuration_changes,\n sql,\n existing_relation,\n backup_relation,\n intermediate_relation\n) %}\n {{- log('Applying ALTER to: ' ~ relation) -}}\n {{- adapter.dispatch('get_alter_materialized_view_as_sql', 'dbt')(\n relation,\n configuration_changes,\n sql,\n existing_relation,\n backup_relation,\n intermediate_relation\n ) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_alter_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "configuration_changes", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}, {"name": "existing_relation", "type": null, "description": ""}, {"name": "backup_relation", "type": null, "description": ""}, {"name": "intermediate_relation", "type": null, "description": ""}], "created_at": 1783450492.557642, "supported_languages": null}, "macro.dbt.default__get_alter_materialized_view_as_sql": {"name": "default__get_alter_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt.default__get_alter_materialized_view_as_sql", "macro_sql": "{% macro default__get_alter_materialized_view_as_sql(\n relation,\n configuration_changes,\n sql,\n existing_relation,\n backup_relation,\n intermediate_relation\n) %}\n {{ exceptions.raise_compiler_error(\"Materialized views have not been implemented for this adapter.\") }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "configuration_changes", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}, {"name": "existing_relation", "type": null, "description": ""}, {"name": "backup_relation", "type": null, "description": ""}, {"name": "intermediate_relation", "type": null, "description": ""}], "created_at": 1783450492.5580113, "supported_languages": null}, "macro.dbt.get_materialized_view_configuration_changes": {"name": "get_materialized_view_configuration_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt.get_materialized_view_configuration_changes", "macro_sql": "{% macro get_materialized_view_configuration_changes(existing_relation, new_config) %}\n /* {#\n It's recommended that configuration changes be formatted as follows:\n {\"\": [{\"action\": \"\", \"context\": ...}]}\n\n For example:\n {\n \"indexes\": [\n {\"action\": \"drop\", \"context\": \"index_abc\"},\n {\"action\": \"create\", \"context\": {\"columns\": [\"column_1\", \"column_2\"], \"type\": \"hash\", \"unique\": True}},\n ],\n }\n\n Either way, `get_materialized_view_configuration_changes` needs to align with `get_alter_materialized_view_as_sql`.\n #} */\n {{- log('Determining configuration changes on: ' ~ existing_relation) -}}\n {%- do return(adapter.dispatch('get_materialized_view_configuration_changes', 'dbt')(existing_relation, new_config)) -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_materialized_view_configuration_changes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "existing_relation", "type": null, "description": ""}, {"name": "new_config", "type": null, "description": ""}], "created_at": 1783450492.5585885, "supported_languages": null}, "macro.dbt.default__get_materialized_view_configuration_changes": {"name": "default__get_materialized_view_configuration_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt.default__get_materialized_view_configuration_changes", "macro_sql": "{% macro default__get_materialized_view_configuration_changes(existing_relation, new_config) %}\n {{ exceptions.raise_compiler_error(\"Materialized views have not been implemented for this adapter.\") }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "existing_relation", "type": null, "description": ""}, {"name": "new_config", "type": null, "description": ""}], "created_at": 1783450492.558893, "supported_languages": null}, "macro.dbt.get_replace_view_sql": {"name": "get_replace_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.get_replace_view_sql", "macro_sql": "{% macro get_replace_view_sql(relation, sql) %}\n {{- adapter.dispatch('get_replace_view_sql', 'dbt')(relation, sql) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_replace_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.5598426, "supported_languages": null}, "macro.dbt.default__get_replace_view_sql": {"name": "default__get_replace_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.default__get_replace_view_sql", "macro_sql": "{% macro default__get_replace_view_sql(relation, sql) %}\n {{ exceptions.raise_compiler_error(\n \"`get_replace_view_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.5601354, "supported_languages": null}, "macro.dbt.create_or_replace_view": {"name": "create_or_replace_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.create_or_replace_view", "macro_sql": "{% macro create_or_replace_view() %}\n {%- set identifier = model['alias'] -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set exists_as_view = (old_relation is not none and old_relation.is_view) -%}\n\n {%- set target_relation = api.Relation.create(\n identifier=identifier, schema=schema, database=database,\n type='view') -%}\n {% set grant_config = config.get('grants') %}\n\n {{ run_hooks(pre_hooks) }}\n\n -- If there's a table with the same name and we weren't told to full refresh,\n -- that's an error. If we were told to full refresh, drop it. This behavior differs\n -- for Snowflake and BigQuery, so multiple dispatch is used.\n {%- if old_relation is not none and old_relation.is_table -%}\n {{ handle_existing_table(should_full_refresh(), old_relation) }}\n {%- endif -%}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_view_as_sql(target_relation, sql) }}\n {%- endcall %}\n\n {% set should_revoke = should_revoke(exists_as_view, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {{ run_hooks(post_hooks) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.handle_existing_table", "macro.dbt.should_full_refresh", "macro.dbt.statement", "macro.dbt.get_create_view_as_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.5622911, "supported_languages": null}, "macro.dbt.handle_existing_table": {"name": "handle_existing_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.handle_existing_table", "macro_sql": "{% macro handle_existing_table(full_refresh, old_relation) %}\n {{ adapter.dispatch('handle_existing_table', 'dbt')(full_refresh, old_relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__handle_existing_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "full_refresh", "type": null, "description": ""}, {"name": "old_relation", "type": null, "description": ""}], "created_at": 1783450492.5627487, "supported_languages": null}, "macro.dbt.default__handle_existing_table": {"name": "default__handle_existing_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.default__handle_existing_table", "macro_sql": "{% macro default__handle_existing_table(full_refresh, old_relation) %}\n {{ log(\"Dropping relation \" ~ old_relation.render() ~ \" because it is of type \" ~ old_relation.type) }}\n {{ adapter.drop_relation(old_relation) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "full_refresh", "type": null, "description": ""}, {"name": "old_relation", "type": null, "description": ""}], "created_at": 1783450492.5632145, "supported_languages": null}, "macro.dbt.drop_view": {"name": "drop_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/drop.sql", "original_file_path": "macros/relations/view/drop.sql", "unique_id": "macro.dbt.drop_view", "macro_sql": "{% macro drop_view(relation) -%}\n {{- adapter.dispatch('drop_view', 'dbt')(relation) -}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__drop_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.5637147, "supported_languages": null}, "macro.dbt.default__drop_view": {"name": "default__drop_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/drop.sql", "original_file_path": "macros/relations/view/drop.sql", "unique_id": "macro.dbt.default__drop_view", "macro_sql": "{% macro default__drop_view(relation) -%}\n drop view if exists {{ relation.render() }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.563965, "supported_languages": null}, "macro.dbt.get_rename_view_sql": {"name": "get_rename_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/rename.sql", "original_file_path": "macros/relations/view/rename.sql", "unique_id": "macro.dbt.get_rename_view_sql", "macro_sql": "{% macro get_rename_view_sql(relation, new_name) %}\n {{- adapter.dispatch('get_rename_view_sql', 'dbt')(relation, new_name) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_rename_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1783450492.564487, "supported_languages": null}, "macro.dbt.default__get_rename_view_sql": {"name": "default__get_rename_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/rename.sql", "original_file_path": "macros/relations/view/rename.sql", "unique_id": "macro.dbt.default__get_rename_view_sql", "macro_sql": "{% macro default__get_rename_view_sql(relation, new_name) %}\n {{ exceptions.raise_compiler_error(\n \"`get_rename_view_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1783450492.5648825, "supported_languages": null}, "macro.dbt.get_create_view_as_sql": {"name": "get_create_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/create.sql", "original_file_path": "macros/relations/view/create.sql", "unique_id": "macro.dbt.get_create_view_as_sql", "macro_sql": "{% macro get_create_view_as_sql(relation, sql) -%}\n {{ adapter.dispatch('get_create_view_as_sql', 'dbt')(relation, sql) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_create_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.5655959, "supported_languages": null}, "macro.dbt.default__get_create_view_as_sql": {"name": "default__get_create_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/create.sql", "original_file_path": "macros/relations/view/create.sql", "unique_id": "macro.dbt.default__get_create_view_as_sql", "macro_sql": "{% macro default__get_create_view_as_sql(relation, sql) -%}\n {{ return(create_view_as(relation, sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.565914, "supported_languages": null}, "macro.dbt.create_view_as": {"name": "create_view_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/create.sql", "original_file_path": "macros/relations/view/create.sql", "unique_id": "macro.dbt.create_view_as", "macro_sql": "{% macro create_view_as(relation, sql) -%}\n {{ adapter.dispatch('create_view_as', 'dbt')(relation, sql) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.5662663, "supported_languages": null}, "macro.dbt.default__create_view_as": {"name": "default__create_view_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/create.sql", "original_file_path": "macros/relations/view/create.sql", "unique_id": "macro.dbt.default__create_view_as", "macro_sql": "{% macro default__create_view_as(relation, sql) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n create view {{ relation.render() }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced %}\n {{ get_assert_columns_equivalent(sql) }}\n {%- endif %}\n as (\n {{ sql }}\n );\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.5671377, "supported_languages": null}, "macro.dbt.get_replace_table_sql": {"name": "get_replace_table_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/replace.sql", "original_file_path": "macros/relations/table/replace.sql", "unique_id": "macro.dbt.get_replace_table_sql", "macro_sql": "{% macro get_replace_table_sql(relation, sql) %}\n {{- adapter.dispatch('get_replace_table_sql', 'dbt')(relation, sql) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_replace_table_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.567668, "supported_languages": null}, "macro.dbt.default__get_replace_table_sql": {"name": "default__get_replace_table_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/replace.sql", "original_file_path": "macros/relations/table/replace.sql", "unique_id": "macro.dbt.default__get_replace_table_sql", "macro_sql": "{% macro default__get_replace_table_sql(relation, sql) %}\n {{ exceptions.raise_compiler_error(\n \"`get_replace_table_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.5679593, "supported_languages": null}, "macro.dbt.drop_table": {"name": "drop_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/drop.sql", "original_file_path": "macros/relations/table/drop.sql", "unique_id": "macro.dbt.drop_table", "macro_sql": "{% macro drop_table(relation) -%}\n {{- adapter.dispatch('drop_table', 'dbt')(relation) -}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__drop_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.5684373, "supported_languages": null}, "macro.dbt.default__drop_table": {"name": "default__drop_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/drop.sql", "original_file_path": "macros/relations/table/drop.sql", "unique_id": "macro.dbt.default__drop_table", "macro_sql": "{% macro default__drop_table(relation) -%}\n drop table if exists {{ relation.render() }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.5686896, "supported_languages": null}, "macro.dbt.get_rename_table_sql": {"name": "get_rename_table_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/rename.sql", "original_file_path": "macros/relations/table/rename.sql", "unique_id": "macro.dbt.get_rename_table_sql", "macro_sql": "{% macro get_rename_table_sql(relation, new_name) %}\n {{- adapter.dispatch('get_rename_table_sql', 'dbt')(relation, new_name) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_rename_table_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1783450492.56918, "supported_languages": null}, "macro.dbt.default__get_rename_table_sql": {"name": "default__get_rename_table_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/rename.sql", "original_file_path": "macros/relations/table/rename.sql", "unique_id": "macro.dbt.default__get_rename_table_sql", "macro_sql": "{% macro default__get_rename_table_sql(relation, new_name) %}\n {{ exceptions.raise_compiler_error(\n \"`get_rename_table_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1783450492.5695117, "supported_languages": null}, "macro.dbt.get_create_table_as_sql": {"name": "get_create_table_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.get_create_table_as_sql", "macro_sql": "{% macro get_create_table_as_sql(temporary, relation, sql) -%}\n {{ adapter.dispatch('get_create_table_as_sql', 'dbt')(temporary, relation, sql) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_create_table_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "temporary", "type": null, "description": ""}, {"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.570653, "supported_languages": null}, "macro.dbt.default__get_create_table_as_sql": {"name": "default__get_create_table_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.default__get_create_table_as_sql", "macro_sql": "{% macro default__get_create_table_as_sql(temporary, relation, sql) -%}\n {{ return(create_table_as(temporary, relation, sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "temporary", "type": null, "description": ""}, {"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.5710156, "supported_languages": null}, "macro.dbt.create_table_as": {"name": "create_table_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.create_table_as", "macro_sql": "{% macro create_table_as(temporary, relation, compiled_code, language='sql') -%}\n {# backward compatibility for create_table_as that does not support language #}\n {% if language == \"sql\" %}\n {{ adapter.dispatch('create_table_as', 'dbt')(temporary, relation, compiled_code)}}\n {% else %}\n {{ adapter.dispatch('create_table_as', 'dbt')(temporary, relation, compiled_code, language) }}\n {% endif %}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "temporary", "type": null, "description": ""}, {"name": "relation", "type": null, "description": ""}, {"name": "compiled_code", "type": null, "description": ""}, {"name": "language", "type": null, "description": ""}], "created_at": 1783450492.5719645, "supported_languages": null}, "macro.dbt.default__create_table_as": {"name": "default__create_table_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.default__create_table_as", "macro_sql": "{% macro default__create_table_as(temporary, relation, sql) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n\n create {% if temporary: -%}temporary{%- endif %} table\n {{ relation.include(database=(not temporary), schema=(not temporary)) }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced and (not temporary) %}\n {{ get_assert_columns_equivalent(sql) }}\n {{ get_table_columns_and_constraints() }}\n {%- set sql = get_select_subquery(sql) %}\n {% endif %}\n as (\n {{ sql }}\n );\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent", "macro.dbt.get_table_columns_and_constraints", "macro.dbt.get_select_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "temporary", "type": null, "description": ""}, {"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.5733092, "supported_languages": null}, "macro.dbt.default__get_column_names": {"name": "default__get_column_names", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.default__get_column_names", "macro_sql": "{% macro default__get_column_names() %}\n {#- loop through user_provided_columns to get column names -#}\n {%- set user_provided_columns = model['columns'] -%}\n {%- for i in user_provided_columns %}\n {%- set col = user_provided_columns[i] -%}\n {%- set col_name = adapter.quote(col['name']) if col.get('quote') else col['name'] -%}\n {{ col_name }}{{ \", \" if not loop.last }}\n {%- endfor -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.5742164, "supported_languages": null}, "macro.dbt.get_select_subquery": {"name": "get_select_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.get_select_subquery", "macro_sql": "{% macro get_select_subquery(sql) %}\n {{ return(adapter.dispatch('get_select_subquery', 'dbt')(sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_select_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.5746017, "supported_languages": null}, "macro.dbt.default__get_select_subquery": {"name": "default__get_select_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.default__get_select_subquery", "macro_sql": "{% macro default__get_select_subquery(sql) %}\n select {{ adapter.dispatch('get_column_names', 'dbt')() }}\n from (\n {{ sql }}\n ) as model_subq\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_column_names"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.5749574, "supported_languages": null}, "macro.dbt.get_table_columns_and_constraints": {"name": "get_table_columns_and_constraints", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.get_table_columns_and_constraints", "macro_sql": "{%- macro get_table_columns_and_constraints() -%}\n {{ adapter.dispatch('get_table_columns_and_constraints', 'dbt')() }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__get_table_columns_and_constraints"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.5763626, "supported_languages": null}, "macro.dbt.default__get_table_columns_and_constraints": {"name": "default__get_table_columns_and_constraints", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.default__get_table_columns_and_constraints", "macro_sql": "{% macro default__get_table_columns_and_constraints() -%}\n {{ return(table_columns_and_constraints()) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.table_columns_and_constraints"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.5766277, "supported_languages": null}, "macro.dbt.table_columns_and_constraints": {"name": "table_columns_and_constraints", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.table_columns_and_constraints", "macro_sql": "{% macro table_columns_and_constraints() %}\n {# loop through user_provided_columns to create DDL with data types and constraints #}\n {%- set raw_column_constraints = adapter.render_raw_columns_constraints(raw_columns=model['columns']) -%}\n {%- set raw_model_constraints = adapter.render_raw_model_constraints(raw_constraints=model['constraints']) -%}\n (\n {% for c in raw_column_constraints -%}\n {{ c }}{{ \",\" if not loop.last or raw_model_constraints }}\n {% endfor %}\n {% for c in raw_model_constraints -%}\n {{ c }}{{ \",\" if not loop.last }}\n {% endfor -%}\n )\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.5776758, "supported_languages": null}, "macro.dbt.get_assert_columns_equivalent": {"name": "get_assert_columns_equivalent", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.get_assert_columns_equivalent", "macro_sql": "\n\n{%- macro get_assert_columns_equivalent(sql) -%}\n {{ adapter.dispatch('get_assert_columns_equivalent', 'dbt')(sql) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__get_assert_columns_equivalent"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.5780056, "supported_languages": null}, "macro.dbt.default__get_assert_columns_equivalent": {"name": "default__get_assert_columns_equivalent", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.default__get_assert_columns_equivalent", "macro_sql": "{% macro default__get_assert_columns_equivalent(sql) -%}\n {{ return(assert_columns_equivalent(sql)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.assert_columns_equivalent"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.578277, "supported_languages": null}, "macro.dbt.assert_columns_equivalent": {"name": "assert_columns_equivalent", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.assert_columns_equivalent", "macro_sql": "{% macro assert_columns_equivalent(sql) %}\n\n {#-- First ensure the user has defined 'columns' in yaml specification --#}\n {%- set user_defined_columns = model['columns'] -%}\n {%- if not user_defined_columns -%}\n {{ exceptions.raise_contract_error([], []) }}\n {%- endif -%}\n\n {#-- Obtain the column schema provided by sql file. #}\n {%- set sql_file_provided_columns = get_column_schema_from_query(sql, config.get('sql_header', none)) -%}\n {#--Obtain the column schema provided by the schema file by generating an 'empty schema' query from the model's columns. #}\n {%- set schema_file_provided_columns = get_column_schema_from_query(get_empty_schema_sql(user_defined_columns)) -%}\n\n {#-- create dictionaries with name and formatted data type and strings for exception #}\n {%- set sql_columns = format_columns(sql_file_provided_columns) -%}\n {%- set yaml_columns = format_columns(schema_file_provided_columns) -%}\n\n {%- if sql_columns|length != yaml_columns|length -%}\n {%- do exceptions.raise_contract_error(yaml_columns, sql_columns) -%}\n {%- endif -%}\n\n {%- for sql_col in sql_columns -%}\n {%- set yaml_col = [] -%}\n {%- for this_col in yaml_columns -%}\n {%- if this_col['name'] == sql_col['name'] -%}\n {%- do yaml_col.append(this_col) -%}\n {%- break -%}\n {%- endif -%}\n {%- endfor -%}\n {%- if not yaml_col -%}\n {#-- Column with name not found in yaml #}\n {%- do exceptions.raise_contract_error(yaml_columns, sql_columns) -%}\n {%- endif -%}\n {%- if sql_col['formatted'] != yaml_col[0]['formatted'] -%}\n {#-- Column data types don't match #}\n {%- do exceptions.raise_contract_error(yaml_columns, sql_columns) -%}\n {%- endif -%}\n {%- endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_column_schema_from_query", "macro.dbt.get_empty_schema_sql", "macro.dbt.format_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1783450492.5807517, "supported_languages": null}, "macro.dbt.format_columns": {"name": "format_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.format_columns", "macro_sql": "{% macro format_columns(columns) %}\n {% set formatted_columns = [] %}\n {% for column in columns %}\n {%- set formatted_column = adapter.dispatch('format_column', 'dbt')(column) -%}\n {%- do formatted_columns.append(formatted_column) -%}\n {% endfor %}\n {{ return(formatted_columns) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__format_column"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "columns", "type": null, "description": ""}], "created_at": 1783450492.5815172, "supported_languages": null}, "macro.dbt.default__format_column": {"name": "default__format_column", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.default__format_column", "macro_sql": "{% macro default__format_column(column) -%}\n {% set data_type = column.dtype %}\n {% set formatted = column.column.lower() ~ \" \" ~ data_type %}\n {{ return({'name': column.name, 'data_type': data_type, 'formatted': formatted}) }}\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}], "created_at": 1783450492.5821671, "supported_languages": null}, "macro.dbt.generate_database_name": {"name": "generate_database_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "unique_id": "macro.dbt.generate_database_name", "macro_sql": "{% macro generate_database_name(custom_database_name=none, node=none) -%}\n {% do return(adapter.dispatch('generate_database_name', 'dbt')(custom_database_name, node)) %}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_database_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_database_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1783450492.5828853, "supported_languages": null}, "macro.dbt.default__generate_database_name": {"name": "default__generate_database_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "unique_id": "macro.dbt.default__generate_database_name", "macro_sql": "{% macro default__generate_database_name(custom_database_name=none, node=none) -%}\n {%- set default_database = target.database -%}\n {%- if custom_database_name is none -%}\n\n {{ default_database }}\n\n {%- else -%}\n\n {{ custom_database_name }}\n\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_database_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1783450492.5833886, "supported_languages": null}, "macro.dbt.generate_schema_name": {"name": "generate_schema_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "unique_id": "macro.dbt.generate_schema_name", "macro_sql": "{% macro generate_schema_name(custom_schema_name=none, node=none) -%}\n {{ return(adapter.dispatch('generate_schema_name', 'dbt')(custom_schema_name, node)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_schema_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1783450492.584218, "supported_languages": null}, "macro.dbt.default__generate_schema_name": {"name": "default__generate_schema_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "unique_id": "macro.dbt.default__generate_schema_name", "macro_sql": "{% macro default__generate_schema_name(custom_schema_name, node) -%}\n\n {%- set default_schema = target.schema -%}\n {%- if custom_schema_name is none -%}\n\n {{ default_schema }}\n\n {%- else -%}\n\n {{ default_schema }}_{{ custom_schema_name | trim }}\n\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_schema_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1783450492.584864, "supported_languages": null}, "macro.dbt.generate_schema_name_for_env": {"name": "generate_schema_name_for_env", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "unique_id": "macro.dbt.generate_schema_name_for_env", "macro_sql": "{% macro generate_schema_name_for_env(custom_schema_name, node) -%}\n\n {%- set default_schema = target.schema -%}\n {%- if target.name == 'prod' and custom_schema_name is not none -%}\n\n {{ custom_schema_name | trim }}\n\n {%- else -%}\n\n {{ default_schema }}\n\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_schema_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1783450492.5854418, "supported_languages": null}, "macro.dbt.generate_latest_version_pointer_alias": {"name": "generate_latest_version_pointer_alias", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_latest_version_pointer_alias.sql", "original_file_path": "macros/get_custom_name/get_latest_version_pointer_alias.sql", "unique_id": "macro.dbt.generate_latest_version_pointer_alias", "macro_sql": "{% macro generate_latest_version_pointer_alias(custom_alias_name=none, node=none) -%}\n {% do return(adapter.dispatch('generate_latest_version_pointer_alias', 'dbt')(custom_alias_name, node)) %}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_latest_version_pointer_alias"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_alias_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1783450492.5861154, "supported_languages": null}, "macro.dbt.default__generate_latest_version_pointer_alias": {"name": "default__generate_latest_version_pointer_alias", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_latest_version_pointer_alias.sql", "original_file_path": "macros/get_custom_name/get_latest_version_pointer_alias.sql", "unique_id": "macro.dbt.default__generate_latest_version_pointer_alias", "macro_sql": "{% macro default__generate_latest_version_pointer_alias(custom_alias_name=none, node=none) -%}\n {%- if custom_alias_name -%}\n {{ custom_alias_name | trim }}\n {%- else -%}\n {{ node.name }}\n {%- endif -%}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_alias_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1783450492.586566, "supported_languages": null}, "macro.dbt.generate_alias_name": {"name": "generate_alias_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "unique_id": "macro.dbt.generate_alias_name", "macro_sql": "{% macro generate_alias_name(custom_alias_name=none, node=none) -%}\n {% do return(adapter.dispatch('generate_alias_name', 'dbt')(custom_alias_name, node)) %}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_alias_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_alias_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1783450492.5872512, "supported_languages": null}, "macro.dbt.default__generate_alias_name": {"name": "default__generate_alias_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "unique_id": "macro.dbt.default__generate_alias_name", "macro_sql": "{% macro default__generate_alias_name(custom_alias_name=none, node=none) -%}\n\n {%- if custom_alias_name -%}\n\n {{ custom_alias_name | trim }}\n\n {%- elif node.version -%}\n\n {{ return(node.name ~ \"_v\" ~ (node.version | replace(\".\", \"_\"))) }}\n\n {%- else -%}\n\n {{ node.name }}\n\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_alias_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1783450492.588009, "supported_languages": null}, "macro.dbt.resolve_model_name": {"name": "resolve_model_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.resolve_model_name", "macro_sql": "{% macro resolve_model_name(input_model_name) %}\n {{ return(adapter.dispatch('resolve_model_name', 'dbt')(input_model_name)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__resolve_model_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "input_model_name", "type": null, "description": ""}], "created_at": 1783450492.5895274, "supported_languages": null}, "macro.dbt.default__resolve_model_name": {"name": "default__resolve_model_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.default__resolve_model_name", "macro_sql": "\n\n{%- macro default__resolve_model_name(input_model_name) -%}\n {{ input_model_name | string | replace('\"', '\\\"') }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "input_model_name", "type": null, "description": ""}], "created_at": 1783450492.589836, "supported_languages": null}, "macro.dbt.build_ref_function": {"name": "build_ref_function", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.build_ref_function", "macro_sql": "{% macro build_ref_function(model) %}\n\n {%- set ref_dict = {} -%}\n {%- for _ref in model.refs -%}\n {% set _ref_args = [_ref.get('package'), _ref['name']] if _ref.get('package') else [_ref['name'],] %}\n {%- set resolved = ref(*_ref_args, v=_ref.get('version')) -%}\n\n {#\n We want to get the string of the returned relation by calling .render() in order to skip sample/empty\n mode rendering logic. However, people override the default ref macro, and often return a string instead\n of a relation (like the ref macro does by default). Thus, to make sure we dont blow things up, we have\n to ensure the resolved relation has a .render() method.\n #}\n {%- if resolved.render is defined and resolved.render is callable -%}\n {%- set resolved = resolved.render() -%}\n {%- endif -%}\n\n {%- if _ref.get('version') -%}\n {% do _ref_args.extend([\"v\" ~ _ref['version']]) %}\n {%- endif -%}\n {%- do ref_dict.update({_ref_args | join('.'): resolve_model_name(resolved)}) -%}\n {%- endfor -%}\n\ndef ref(*args, **kwargs):\n refs = {{ ref_dict | tojson }}\n key = '.'.join(args)\n version = kwargs.get(\"v\") or kwargs.get(\"version\")\n if version:\n key += f\".v{version}\"\n dbt_load_df_function = kwargs.get(\"dbt_load_df_function\")\n return dbt_load_df_function(refs[key])\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.resolve_model_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}], "created_at": 1783450492.591678, "supported_languages": null}, "macro.dbt.build_source_function": {"name": "build_source_function", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.build_source_function", "macro_sql": "{% macro build_source_function(model) %}\n\n {%- set source_dict = {} -%}\n {%- for _source in model.sources -%}\n {%- set resolved = source(*_source) -%}\n {%- do source_dict.update({_source | join('.'): resolve_model_name(resolved)}) -%}\n {%- endfor -%}\n\ndef source(*args, dbt_load_df_function):\n sources = {{ source_dict | tojson }}\n key = '.'.join(args)\n return dbt_load_df_function(sources[key])\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.resolve_model_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}], "created_at": 1783450492.5924783, "supported_languages": null}, "macro.dbt.build_config_dict": {"name": "build_config_dict", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.build_config_dict", "macro_sql": "{% macro build_config_dict(model) %}\n {%- set config_dict = {} -%}\n {% set config_dbt_used = zip(model.config.config_keys_used, model.config.config_keys_defaults) | list %}\n {%- for key, default in config_dbt_used -%}\n {# weird type testing with enum, would be much easier to write this logic in Python! #}\n {%- if key == \"language\" -%}\n {%- set value = \"python\" -%}\n {%- endif -%}\n {%- set value = model.config.get(key, default) -%}\n {%- do config_dict.update({key: value}) -%}\n {%- endfor -%}\n {# Handle dbt.config.meta_get() calls - use separate dict to avoid overwriting native configs #}\n {%- set meta_dict = {} -%}\n {%- if model.config.meta_keys_used -%}\n {% set meta_dbt_used = zip(model.config.meta_keys_used, model.config.meta_keys_defaults) | list %}\n {%- for key, default in meta_dbt_used -%}\n {%- if model.config.meta and key in model.config.meta -%}\n {%- set value = model.config.meta[key] -%}\n {%- else -%}\n {%- set value = default -%}\n {%- endif -%}\n {%- do meta_dict.update({key: value}) -%}\n {%- endfor -%}\n {%- endif -%}\nconfig_dict = {{ config_dict }}\nmeta_dict = {{ meta_dict }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}], "created_at": 1783450492.594674, "supported_languages": null}, "macro.dbt.py_script_postfix": {"name": "py_script_postfix", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.py_script_postfix", "macro_sql": "{% macro py_script_postfix(model) %}\n# This part is user provided model code\n# you will need to copy the next section to run the code\n# COMMAND ----------\n# this part is dbt logic for get ref work, do not modify\n\n{{ build_ref_function(model ) }}\n{{ build_source_function(model ) }}\n{{ build_config_dict(model) }}\n\nclass config:\n def __init__(self, *args, **kwargs):\n pass\n\n @staticmethod\n def get(key, default=None):\n return config_dict.get(key, default)\n\n @staticmethod\n def meta_get(key, default=None):\n return meta_dict.get(key, default)\n\nclass this:\n \"\"\"dbt.this() or dbt.this.identifier\"\"\"\n database = \"{{ this.database }}\"\n schema = \"{{ this.schema }}\"\n identifier = \"{{ this.identifier }}\"\n {% set this_relation_name = resolve_model_name(this) %}\n def __repr__(self):\n return '{{ this_relation_name }}'\n\n\nclass dbtObj:\n def __init__(self, load_df_function) -> None:\n self.source = lambda *args: source(*args, dbt_load_df_function=load_df_function)\n self.ref = lambda *args, **kwargs: ref(*args, **kwargs, dbt_load_df_function=load_df_function)\n self.config = config\n self.this = this()\n self.is_incremental = {{ is_incremental() }}\n\n# COMMAND ----------\n{{py_script_comment()}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.build_ref_function", "macro.dbt.build_source_function", "macro.dbt.build_config_dict", "macro.dbt.resolve_model_name", "macro.dbt.is_incremental", "macro.dbt.py_script_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}], "created_at": 1783450492.5957067, "supported_languages": null}, "macro.dbt.py_script_comment": {"name": "py_script_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.py_script_comment", "macro_sql": "{%macro py_script_comment()%}\n{%endmacro%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.5958667, "supported_languages": null}, "macro.dbt.get_fixture_sql": {"name": "get_fixture_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/unit_test_sql/get_fixture_sql.sql", "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", "unique_id": "macro.dbt.get_fixture_sql", "macro_sql": "{% macro get_fixture_sql(rows, column_name_to_data_types) %}\n-- Fixture for {{ model.name }}\n{% set default_row = {} %}\n\n{%- if not column_name_to_data_types -%}\n{#-- Use defer_relation IFF it is available in the manifest and 'this' is missing from the database --#}\n{%- set this_or_defer_relation = defer_relation if (defer_relation and not load_relation(this)) else this -%}\n{%- set columns_in_relation = adapter.get_columns_in_relation(this_or_defer_relation) -%}\n\n{%- set column_name_to_data_types = {} -%}\n{%- set column_name_to_quoted = {} -%}\n{%- for column in columns_in_relation -%}\n\n{#-- This needs to be a case-insensitive comparison --#}\n{%- do column_name_to_data_types.update({column.name|lower: column.data_type}) -%}\n{%- do column_name_to_quoted.update({column.name|lower: column.quoted}) -%}\n{%- endfor -%}\n{%- endif -%}\n\n{%- if not column_name_to_data_types -%}\n {{ exceptions.raise_compiler_error(\"Not able to get columns for unit test '\" ~ model.name ~ \"' from relation \" ~ this ~ \" because the relation doesn't exist\") }}\n{%- endif -%}\n\n{%- for column_name, column_type in column_name_to_data_types.items() -%}\n {%- do default_row.update({column_name: (safe_cast(\"null\", column_type) | trim )}) -%}\n{%- endfor -%}\n\n{{ validate_fixture_rows(rows, row_number) }}\n\n{%- for row in rows -%}\n{%- set formatted_row = format_row(row, column_name_to_data_types) -%}\n{%- set default_row_copy = default_row.copy() -%}\n{%- do default_row_copy.update(formatted_row) -%}\nselect\n{%- for column_name, column_value in default_row_copy.items() %} {{ column_value }} as {{ column_name_to_quoted[column_name] }}{% if not loop.last -%}, {%- endif %}\n{%- endfor %}\n{%- if not loop.last %}\nunion all\n{% endif %}\n{%- endfor -%}\n\n{%- if (rows | length) == 0 -%}\n select\n {%- for column_name, column_value in default_row.items() %} {{ column_value }} as {{ column_name_to_quoted[column_name] }}{% if not loop.last -%},{%- endif %}\n {%- endfor %}\n limit 0\n{%- endif -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.load_relation", "macro.dbt.safe_cast", "macro.dbt.validate_fixture_rows", "macro.dbt.format_row"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "rows", "type": null, "description": ""}, {"name": "column_name_to_data_types", "type": null, "description": ""}], "created_at": 1783450492.6007934, "supported_languages": null}, "macro.dbt.get_expected_sql": {"name": "get_expected_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/unit_test_sql/get_fixture_sql.sql", "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", "unique_id": "macro.dbt.get_expected_sql", "macro_sql": "{% macro get_expected_sql(rows, column_name_to_data_types, column_name_to_quoted) %}\n\n{%- if (rows | length) == 0 -%}\n select * from dbt_internal_unit_test_actual\n limit 0\n{%- else -%}\n{%- for row in rows -%}\n{%- set formatted_row = format_row(row, column_name_to_data_types) -%}\nselect\n{%- for column_name, column_value in formatted_row.items() %} {{ column_value }} as {{ column_name_to_quoted[column_name] }}{% if not loop.last -%}, {%- endif %}\n{%- endfor %}\n{%- if not loop.last %}\nunion all\n{% endif %}\n{%- endfor -%}\n{%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.format_row"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "rows", "type": null, "description": ""}, {"name": "column_name_to_data_types", "type": null, "description": ""}, {"name": "column_name_to_quoted", "type": null, "description": ""}], "created_at": 1783450492.6019392, "supported_languages": null}, "macro.dbt.format_row": {"name": "format_row", "resource_type": "macro", "package_name": "dbt", "path": "macros/unit_test_sql/get_fixture_sql.sql", "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", "unique_id": "macro.dbt.format_row", "macro_sql": "\n\n{%- macro format_row(row, column_name_to_data_types) -%}\n {#-- generate case-insensitive formatted row --#}\n {% set formatted_row = {} %}\n {%- for column_name, column_value in row.items() -%}\n {% set column_name = column_name|lower %}\n\n {%- if column_name not in column_name_to_data_types %}\n {#-- if user-provided row contains column name that relation does not contain, raise an error --#}\n {% set fixture_name = \"expected output\" if model.resource_type == 'unit_test' else (\"'\" ~ model.name ~ \"'\") %}\n {{ exceptions.raise_compiler_error(\n \"Invalid column name: '\" ~ column_name ~ \"' in unit test fixture for \" ~ fixture_name ~ \".\"\n \"\\nAccepted columns for \" ~ fixture_name ~ \" are: \" ~ (column_name_to_data_types.keys()|list)\n ) }}\n {%- endif -%}\n\n {%- set column_type = column_name_to_data_types[column_name] %}\n\n {#-- For string fixture values, strip varchar length to prevent silent truncation (GH-11974) --#}\n {%- if column_value is string and 'varying' in column_type -%}\n {%- set column_type = column_type.split('(')[0] -%}\n {%- endif -%}\n\n {#-- sanitize column_value: wrap yaml strings in quotes, apply cast --#}\n {%- set column_value_clean = column_value -%}\n {%- if column_value is string -%}\n {%- set column_value_clean = dbt.string_literal(dbt.escape_single_quotes(column_value)) -%}\n {%- elif column_value is none -%}\n {%- set column_value_clean = 'null' -%}\n {%- endif -%}\n\n {%- set row_update = {column_name: safe_cast(column_value_clean, column_type) } -%}\n {%- do formatted_row.update(row_update) -%}\n {%- endfor -%}\n {{ return(formatted_row) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.string_literal", "macro.dbt.escape_single_quotes", "macro.dbt.safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "row", "type": null, "description": ""}, {"name": "column_name_to_data_types", "type": null, "description": ""}], "created_at": 1783450492.6044302, "supported_languages": null}, "macro.dbt.validate_fixture_rows": {"name": "validate_fixture_rows", "resource_type": "macro", "package_name": "dbt", "path": "macros/unit_test_sql/get_fixture_sql.sql", "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", "unique_id": "macro.dbt.validate_fixture_rows", "macro_sql": "{%- macro validate_fixture_rows(rows, row_number) -%}\n {{ return(adapter.dispatch('validate_fixture_rows', 'dbt')(rows, row_number)) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__validate_fixture_rows"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "rows", "type": null, "description": ""}, {"name": "row_number", "type": null, "description": ""}], "created_at": 1783450492.6048496, "supported_languages": null}, "macro.dbt.default__validate_fixture_rows": {"name": "default__validate_fixture_rows", "resource_type": "macro", "package_name": "dbt", "path": "macros/unit_test_sql/get_fixture_sql.sql", "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", "unique_id": "macro.dbt.default__validate_fixture_rows", "macro_sql": "{%- macro default__validate_fixture_rows(rows, row_number) -%}\n {# This is an abstract method for adapter overrides as needed #}\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "rows", "type": null, "description": ""}, {"name": "row_number", "type": null, "description": ""}], "created_at": 1783450492.605047, "supported_languages": null}, "macro.dbt.test_unique": {"name": "test_unique", "resource_type": "macro", "package_name": "dbt", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "unique_id": "macro.dbt.test_unique", "macro_sql": "{% test unique(model, column_name) %}\n {% set macro = adapter.dispatch('test_unique', 'dbt') %}\n {{ macro(model, column_name) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt.default__test_unique"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.6058965, "supported_languages": null}, "macro.dbt.test_not_null": {"name": "test_not_null", "resource_type": "macro", "package_name": "dbt", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "unique_id": "macro.dbt.test_not_null", "macro_sql": "{% test not_null(model, column_name) %}\n {% set macro = adapter.dispatch('test_not_null', 'dbt') %}\n {{ macro(model, column_name) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt.default__test_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.6063762, "supported_languages": null}, "macro.dbt.test_accepted_values": {"name": "test_accepted_values", "resource_type": "macro", "package_name": "dbt", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "unique_id": "macro.dbt.test_accepted_values", "macro_sql": "{% test accepted_values(model, column_name, values, quote=True) %}\n {% set macro = adapter.dispatch('test_accepted_values', 'dbt') %}\n {{ macro(model, column_name, values, quote) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt.default__test_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.6069815, "supported_languages": null}, "macro.dbt.test_relationships": {"name": "test_relationships", "resource_type": "macro", "package_name": "dbt", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "unique_id": "macro.dbt.test_relationships", "macro_sql": "{% test relationships(model, column_name, to, field) %}\n {% set macro = adapter.dispatch('test_relationships', 'dbt') %}\n {{ macro(model, column_name, to, field) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt.default__test_relationships"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.6075633, "supported_languages": null}, "macro.linkedin.linkedin_ads_persist_pass_through_columns": {"name": "linkedin_ads_persist_pass_through_columns", "resource_type": "macro", "package_name": "linkedin", "path": "macros/linkedin_ads_persist_pass_through_columns.sql", "original_file_path": "macros/linkedin_ads_persist_pass_through_columns.sql", "unique_id": "macro.linkedin.linkedin_ads_persist_pass_through_columns", "macro_sql": "{% macro linkedin_ads_persist_pass_through_columns(pass_through_variable, identifier=none, transform='', coalesce_with=none, except_variable=none, exclude_fields=[]) %}\n\n{% set except_fields = [] %}\n{% if except_variable is not none %}\n {# Start creating list of fields to exclude #}\n {% for item in var(except_variable) %}\n {% do except_fields.append(item.name) %}\n {% endfor %}\n{% endif %}\n\n{% for field in exclude_fields %}\n {% do except_fields.append(field) %}\n{% endfor %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n {% set field_name = field.alias|default(field.name)|lower if field is mapping else field|lower %}\n \n {% if field_name not in except_fields %}\n , {{ transform ~ '(' ~ ('coalesce(' if coalesce_with is not none else '') ~ (identifier ~ '.' if identifier else '') ~ field_name ~ ((', ' ~ coalesce_with ~ ')') if coalesce_with is not none else '') ~ ')' }} as {{ field_name }}\n {% endif %}\n\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "transform", "type": null, "description": ""}, {"name": "coalesce_with", "type": null, "description": ""}, {"name": "except_variable", "type": null, "description": ""}, {"name": "exclude_fields", "type": null, "description": ""}], "created_at": 1783450492.6102798, "supported_languages": null}, "macro.linkedin.linkedin_ads_extract_url_parameter": {"name": "linkedin_ads_extract_url_parameter", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/linkedin_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/linkedin_ads_extract_url_parameters.sql", "unique_id": "macro.linkedin.linkedin_ads_extract_url_parameter", "macro_sql": "{% macro linkedin_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ return(adapter.dispatch('linkedin_ads_extract_url_parameter', 'linkedin') (field, url_parameter)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.linkedin.default__linkedin_ads_extract_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450492.6109333, "supported_languages": null}, "macro.linkedin.default__linkedin_ads_extract_url_parameter": {"name": "default__linkedin_ads_extract_url_parameter", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/linkedin_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/linkedin_ads_extract_url_parameters.sql", "unique_id": "macro.linkedin.default__linkedin_ads_extract_url_parameter", "macro_sql": "{% macro default__linkedin_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ dbt_utils.get_url_parameter(field, url_parameter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450492.6112366, "supported_languages": null}, "macro.linkedin.spark__linkedin_ads_extract_url_parameter": {"name": "spark__linkedin_ads_extract_url_parameter", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/linkedin_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/linkedin_ads_extract_url_parameters.sql", "unique_id": "macro.linkedin.spark__linkedin_ads_extract_url_parameter", "macro_sql": "{% macro spark__linkedin_ads_extract_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"=([^&]+)'\" -%}\nnullif(regexp_extract({{ field }}, {{ formatted_url_parameter }}, 1), '')\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450492.611668, "supported_languages": null}, "macro.linkedin.get_monthly_ad_analytics_by_member_region_columns": {"name": "get_monthly_ad_analytics_by_member_region_columns", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/get_monthly_ad_analytics_by_member_region_columns.sql", "original_file_path": "macros/staging/get_monthly_ad_analytics_by_member_region_columns.sql", "unique_id": "macro.linkedin.get_monthly_ad_analytics_by_member_region_columns", "macro_sql": "{% macro get_monthly_ad_analytics_by_member_region_columns() %}\n\n{% set columns = [\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"month\", \"datatype\": dbt.type_string(), \"alias\": \"date_month\"},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"member_region\", \"datatype\": dbt.type_int()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversion_value_in_local_currency\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"cost_in_local_currency\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"cost_in_usd\", \"datatype\": dbt.type_numeric()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('linkedin_ads__conversion_fields')) }}\n\n{{ linkedin_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('linkedin_ads__monthly_ad_analytics_by_member_region_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_numeric", "macro.fivetran_utils.add_pass_through_columns", "macro.linkedin.linkedin_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.6140068, "supported_languages": null}, "macro.linkedin.linkedin_ads_fill_pass_through_columns": {"name": "linkedin_ads_fill_pass_through_columns", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/linkedin_ads_fill_pass_through_columns.sql", "original_file_path": "macros/staging/linkedin_ads_fill_pass_through_columns.sql", "unique_id": "macro.linkedin.linkedin_ads_fill_pass_through_columns", "macro_sql": "{% macro linkedin_ads_fill_pass_through_columns(pass_through_fields, except=[]) %}\n\n{% if pass_through_fields %}\n {% for field in pass_through_fields %}\n {% if (field.alias if field.alias else field.name) not in except %}\n {% if field.transform_sql %}\n , coalesce(cast({{ field.transform_sql }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% else %}\n , coalesce(cast({{ field.alias if field.alias else field.name }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% endif %}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}], "created_at": 1783450492.6156785, "supported_languages": null}, "macro.linkedin.get_geo_columns": {"name": "get_geo_columns", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/get_geo_columns.sql", "original_file_path": "macros/staging/get_geo_columns.sql", "unique_id": "macro.linkedin.get_geo_columns", "macro_sql": "{% macro get_geo_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"value\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.6164467, "supported_languages": null}, "macro.linkedin.get_account_history_columns": {"name": "get_account_history_columns", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/get_account_history_columns.sql", "original_file_path": "macros/staging/get_account_history_columns.sql", "unique_id": "macro.linkedin.get_account_history_columns", "macro_sql": "{% macro get_account_history_columns() %}\n\n{% set columns = [\n {\"name\": \"created_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"last_modified_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"version_tag\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.6181872, "supported_languages": null}, "macro.linkedin.get_creative_history_columns": {"name": "get_creative_history_columns", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/get_creative_history_columns.sql", "original_file_path": "macros/staging/get_creative_history_columns.sql", "unique_id": "macro.linkedin.get_creative_history_columns", "macro_sql": "{% macro get_creative_history_columns() %}\n\n{% set columns = [\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"click_uri\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"last_modified_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_modified_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"intended_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"text_ad_landing_page\", \"datatype\": dbt.type_string()},\n {\"name\": \"spotlight_landing_page\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.6204872, "supported_languages": null}, "macro.linkedin.date_from_month_string": {"name": "date_from_month_string", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/date_from_month_string.sql", "original_file_path": "macros/staging/date_from_month_string.sql", "unique_id": "macro.linkedin.date_from_month_string", "macro_sql": "{% macro date_from_month_string(month_str) %}\n {{ return(adapter.dispatch('date_from_month_string', 'linkedin')(month_str)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.linkedin.default__date_from_month_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "month_str", "type": null, "description": ""}], "created_at": 1783450492.6211, "supported_languages": null}, "macro.linkedin.default__date_from_month_string": {"name": "default__date_from_month_string", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/date_from_month_string.sql", "original_file_path": "macros/staging/date_from_month_string.sql", "unique_id": "macro.linkedin.default__date_from_month_string", "macro_sql": "{% macro default__date_from_month_string(month_str) %}\n to_date(\n split_part({{ month_str }}, '-', 1) || '-' || lpad(split_part({{ month_str }}, '-', 2), 2, '0') || '-01',\n 'YYYY-MM-DD'\n )\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "month_str", "type": null, "description": ""}], "created_at": 1783450492.6213667, "supported_languages": null}, "macro.linkedin.bigquery__date_from_month_string": {"name": "bigquery__date_from_month_string", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/date_from_month_string.sql", "original_file_path": "macros/staging/date_from_month_string.sql", "unique_id": "macro.linkedin.bigquery__date_from_month_string", "macro_sql": "{% macro bigquery__date_from_month_string(month_str) %}\n parse_date('%Y-%m-%d', concat(split({{ month_str }}, '-')[offset(0)], '-', lpad(split({{ month_str }}, '-')[offset(1)], 2, '0'), '-01'))\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "month_str", "type": null, "description": ""}], "created_at": 1783450492.6216505, "supported_languages": null}, "macro.linkedin.databricks__date_from_month_string": {"name": "databricks__date_from_month_string", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/date_from_month_string.sql", "original_file_path": "macros/staging/date_from_month_string.sql", "unique_id": "macro.linkedin.databricks__date_from_month_string", "macro_sql": "{% macro databricks__date_from_month_string(month_str) %}\n to_date(\n concat(split({{ month_str }}, '-')[0], '-', lpad(split({{ month_str }}, '-')[1], 2, '0'), '-01')\n )\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "month_str", "type": null, "description": ""}], "created_at": 1783450492.6219068, "supported_languages": null}, "macro.linkedin.get_ad_analytics_by_creative_columns": {"name": "get_ad_analytics_by_creative_columns", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/get_ad_analytics_by_creative_columns.sql", "original_file_path": "macros/staging/get_ad_analytics_by_creative_columns.sql", "unique_id": "macro.linkedin.get_ad_analytics_by_creative_columns", "macro_sql": "{% macro get_ad_analytics_by_creative_columns() %}\n\n{% set columns = [\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"cost_in_local_currency\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"cost_in_usd\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"creative_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"day\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversion_value_in_local_currency\", \"datatype\": dbt.type_numeric()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('linkedin_ads__conversion_fields')) }}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ linkedin_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('linkedin_ads__creative_passthrough_metrics'), except_fields=(var('linkedin_ads__conversion_fields') + ['conversion_value_in_local_currency'])) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_numeric", "macro.dbt.type_timestamp", "macro.fivetran_utils.add_pass_through_columns", "macro.linkedin.linkedin_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.6240823, "supported_languages": null}, "macro.linkedin.linkedin_ads_add_pass_through_columns": {"name": "linkedin_ads_add_pass_through_columns", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/linkedin_ads_add_pass_through_columns.sql", "original_file_path": "macros/staging/linkedin_ads_add_pass_through_columns.sql", "unique_id": "macro.linkedin.linkedin_ads_add_pass_through_columns", "macro_sql": "{% macro linkedin_ads_add_pass_through_columns(base_columns, pass_through_fields, except_fields=[]) %}\n\n{% if pass_through_fields %}\n {% for column in pass_through_fields %}\n\n {% if column is mapping %}\n {% set col_name = column.alias|default(column.name)|lower %}\n \n {% if col_name not in except_fields %}\n {% if column.alias %}\n {% do base_columns.append({ \"name\": column.name, \"alias\": column.alias, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% else %}\n {% do base_columns.append({ \"name\": column.name, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% else %}\n {% if column|lower not in except_fields %}\n {% do base_columns.append({ \"name\": column, \"datatype\": dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_columns", "type": null, "description": ""}, {"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except_fields", "type": null, "description": ""}], "created_at": 1783450492.6266086, "supported_languages": null}, "macro.linkedin.get_monthly_ad_analytics_by_member_country_columns": {"name": "get_monthly_ad_analytics_by_member_country_columns", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/get_monthly_ad_analytics_by_member_country_columns.sql", "original_file_path": "macros/staging/get_monthly_ad_analytics_by_member_country_columns.sql", "unique_id": "macro.linkedin.get_monthly_ad_analytics_by_member_country_columns", "macro_sql": "{% macro get_monthly_ad_analytics_by_member_country_columns() %}\n\n{% set columns = [\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"month\", \"datatype\": dbt.type_string(), \"alias\": \"date_month\"},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"member_country\", \"datatype\": dbt.type_int()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversion_value_in_local_currency\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"cost_in_local_currency\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"cost_in_usd\", \"datatype\": dbt.type_numeric()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('linkedin_ads__conversion_fields')) }}\n\n{{ linkedin_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('linkedin_ads__monthly_ad_analytics_by_member_country_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_numeric", "macro.fivetran_utils.add_pass_through_columns", "macro.linkedin.linkedin_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.6288202, "supported_languages": null}, "macro.linkedin.get_campaign_group_history_columns": {"name": "get_campaign_group_history_columns", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/get_campaign_group_history_columns.sql", "original_file_path": "macros/staging/get_campaign_group_history_columns.sql", "unique_id": "macro.linkedin.get_campaign_group_history_columns", "macro_sql": "{% macro get_campaign_group_history_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"backfilled\", \"datatype\": \"boolean\"},\n {\"name\": \"created_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"last_modified_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"run_schedule_end\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"run_schedule_start\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.630746, "supported_languages": null}, "macro.linkedin.get_campaign_history_columns": {"name": "get_campaign_history_columns", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/get_campaign_history_columns.sql", "original_file_path": "macros/staging/get_campaign_history_columns.sql", "unique_id": "macro.linkedin.get_campaign_history_columns", "macro_sql": "{% macro get_campaign_history_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"audience_expansion_enabled\", \"datatype\": \"boolean\"},\n {\"name\": \"campaign_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"cost_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"creative_selection\", \"datatype\": dbt.type_string()},\n {\"name\": \"daily_budget_amount\", \"datatype\": dbt.type_float()},\n {\"name\": \"daily_budget_currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"format\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"last_modified_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"locale_country\", \"datatype\": dbt.type_string()},\n {\"name\": \"locale_language\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"objective_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"offsite_delivery_enabled\", \"datatype\": \"boolean\"},\n {\"name\": \"optimization_target_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"run_schedule_end\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"run_schedule_start\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"unit_cost_amount\", \"datatype\": dbt.type_float()},\n {\"name\": \"unit_cost_currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"version_tag\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.6352282, "supported_languages": null}, "macro.linkedin.get_ad_analytics_by_campaign_columns": {"name": "get_ad_analytics_by_campaign_columns", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/get_ad_analytics_by_campaign_columns.sql", "original_file_path": "macros/staging/get_ad_analytics_by_campaign_columns.sql", "unique_id": "macro.linkedin.get_ad_analytics_by_campaign_columns", "macro_sql": "{% macro get_ad_analytics_by_campaign_columns() %}\n\n{% set columns = [\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"cost_in_local_currency\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"cost_in_usd\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"day\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversion_value_in_local_currency\", \"datatype\": dbt.type_numeric()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('linkedin_ads__conversion_fields')) }}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ linkedin_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('linkedin_ads__campaign_passthrough_metrics'), except_fields=(var('linkedin_ads__conversion_fields') + ['conversion_value_in_local_currency'])) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_numeric", "macro.dbt.type_timestamp", "macro.fivetran_utils.add_pass_through_columns", "macro.linkedin.linkedin_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.6373913, "supported_languages": null}, "macro.apple_search_ads.apple_search_ads_persist_pass_through_columns": {"name": "apple_search_ads_persist_pass_through_columns", "resource_type": "macro", "package_name": "apple_search_ads", "path": "macros/apple_search_ads_persist_pass_through_columns.sql", "original_file_path": "macros/apple_search_ads_persist_pass_through_columns.sql", "unique_id": "macro.apple_search_ads.apple_search_ads_persist_pass_through_columns", "macro_sql": "{% macro apple_search_ads_persist_pass_through_columns(pass_through_variable, identifier=none, transform='', coalesce_with=none, exclude_fields=[]) %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n {% set field_name = field.alias|default(field.name)|lower if field is mapping else field %}\n {% if field_name not in exclude_fields %}\n , {{ transform ~ '(' ~ ('coalesce(' if coalesce_with is not none else '') ~ (identifier ~ '.' if identifier else '') ~ field_name ~ ((', ' ~ coalesce_with ~ ')') if coalesce_with is not none else '') ~ ')' }} as {{ field_name }}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "transform", "type": null, "description": ""}, {"name": "coalesce_with", "type": null, "description": ""}, {"name": "exclude_fields", "type": null, "description": ""}], "created_at": 1783450492.6392584, "supported_languages": null}, "macro.apple_search_ads.get_campaign_report_columns": {"name": "get_campaign_report_columns", "resource_type": "macro", "package_name": "apple_search_ads", "path": "macros/staging/get_campaign_report_columns.sql", "original_file_path": "macros/staging/get_campaign_report_columns.sql", "unique_id": "macro.apple_search_ads.get_campaign_report_columns", "macro_sql": "{% macro get_campaign_report_columns() %}\n\n{% set columns = [\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"local_spend_amount\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"local_spend_currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"new_downloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"redownloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"taps\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_installs\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_new_downloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_redownloads\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ apple_search_ads_add_pass_through_columns(\n base_columns=columns,\n pass_through_fields=var('apple_search_ads__campaign_passthrough_metrics'),\n except_fields=['conversions']\n ) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_numeric", "macro.dbt.type_string", "macro.apple_search_ads.apple_search_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.6419525, "supported_languages": null}, "macro.apple_search_ads.apple_search_ads_fill_pass_through_columns": {"name": "apple_search_ads_fill_pass_through_columns", "resource_type": "macro", "package_name": "apple_search_ads", "path": "macros/staging/apple_search_ads_fill_passthrough_columns.sql", "original_file_path": "macros/staging/apple_search_ads_fill_passthrough_columns.sql", "unique_id": "macro.apple_search_ads.apple_search_ads_fill_pass_through_columns", "macro_sql": "{% macro apple_search_ads_fill_pass_through_columns(pass_through_fields, except=[]) %}\n\n{% if pass_through_fields %}\n {% for field in pass_through_fields %}\n {% if (field.alias if field.alias else field.name) not in except %}\n {% if field.transform_sql %}\n , coalesce(cast({{ field.transform_sql }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% else %}\n , coalesce(cast({{ field.alias if field.alias else field.name }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% endif %}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}], "created_at": 1783450492.6436238, "supported_languages": null}, "macro.apple_search_ads.apple_search_ads_add_pass_through_columns": {"name": "apple_search_ads_add_pass_through_columns", "resource_type": "macro", "package_name": "apple_search_ads", "path": "macros/staging/apple_search_ads_add_pass_through_columns.sql", "original_file_path": "macros/staging/apple_search_ads_add_pass_through_columns.sql", "unique_id": "macro.apple_search_ads.apple_search_ads_add_pass_through_columns", "macro_sql": "{% macro apple_search_ads_add_pass_through_columns(base_columns, pass_through_fields, except_fields=[]) %}\n\n{% if pass_through_fields %}\n {% for column in pass_through_fields %}\n\n {% if column is mapping %}\n {% set col_name = column.alias|default(column.name)|lower %}\n \n {% if col_name not in except_fields %}\n {% if column.alias %}\n {% do base_columns.append({ \"name\": column.name, \"alias\": column.alias, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% else %}\n {% do base_columns.append({ \"name\": column.name, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% else %}\n {% if column|lower not in except_fields %}\n {% do base_columns.append({ \"name\": column, \"datatype\": dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_columns", "type": null, "description": ""}, {"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except_fields", "type": null, "description": ""}], "created_at": 1783450492.6461475, "supported_languages": null}, "macro.apple_search_ads.get_keyword_report_columns": {"name": "get_keyword_report_columns", "resource_type": "macro", "package_name": "apple_search_ads", "path": "macros/staging/get_keyword_report_columns.sql", "original_file_path": "macros/staging/get_keyword_report_columns.sql", "unique_id": "macro.apple_search_ads.get_keyword_report_columns", "macro_sql": "{% macro get_keyword_report_columns() %}\n\n{% set columns = [\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"local_spend_amount\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"local_spend_currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"new_downloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"redownloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"taps\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_installs\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_new_downloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_redownloads\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ apple_search_ads_add_pass_through_columns(\n base_columns=columns,\n pass_through_fields=var('apple_search_ads__keyword_passthrough_metrics'),\n except_fields=['conversions']\n ) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_numeric", "macro.dbt.type_string", "macro.apple_search_ads.apple_search_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.6488364, "supported_languages": null}, "macro.apple_search_ads.get_ad_history_columns": {"name": "get_ad_history_columns", "resource_type": "macro", "package_name": "apple_search_ads", "path": "macros/staging/get_ad_history_columns.sql", "original_file_path": "macros/staging/get_ad_history_columns.sql", "unique_id": "macro.apple_search_ads.get_ad_history_columns", "macro_sql": "{% macro get_ad_history_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"creation_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"modification_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"org_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.6506026, "supported_languages": null}, "macro.apple_search_ads.get_ad_group_report_columns": {"name": "get_ad_group_report_columns", "resource_type": "macro", "package_name": "apple_search_ads", "path": "macros/staging/get_ad_group_report_columns.sql", "original_file_path": "macros/staging/get_ad_group_report_columns.sql", "unique_id": "macro.apple_search_ads.get_ad_group_report_columns", "macro_sql": "{% macro get_ad_group_report_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"local_spend_amount\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"local_spend_currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"new_downloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"redownloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"taps\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_installs\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_new_downloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_redownloads\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ apple_search_ads_add_pass_through_columns(\n base_columns=columns,\n pass_through_fields=var('apple_search_ads__ad_group_passthrough_metrics'),\n except_fields=['conversions']\n ) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_numeric", "macro.dbt.type_string", "macro.apple_search_ads.apple_search_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.6532772, "supported_languages": null}, "macro.apple_search_ads.get_organization_columns": {"name": "get_organization_columns", "resource_type": "macro", "package_name": "apple_search_ads", "path": "macros/staging/get_organization_columns.sql", "original_file_path": "macros/staging/get_organization_columns.sql", "unique_id": "macro.apple_search_ads.get_organization_columns", "macro_sql": "{% macro get_organization_columns() %}\n\n{% set columns = [\n {\"name\": \"currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"payment_model\", \"datatype\": dbt.type_string()},\n {\"name\": \"time_zone\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.654566, "supported_languages": null}, "macro.apple_search_ads.get_search_term_report_columns": {"name": "get_search_term_report_columns", "resource_type": "macro", "package_name": "apple_search_ads", "path": "macros/staging/get_search_term_report_columns.sql", "original_file_path": "macros/staging/get_search_term_report_columns.sql", "unique_id": "macro.apple_search_ads.get_search_term_report_columns", "macro_sql": "{% macro get_search_term_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_group_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"bid_amount_amount\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"bid_amount_currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"keyword\", \"datatype\": dbt.type_string()},\n {\"name\": \"keyword_display_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"keyword_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"local_spend_amount\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"local_spend_currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"new_downloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"redownloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"search_term_source\", \"datatype\": dbt.type_string()},\n {\"name\": \"search_term_text\", \"datatype\": dbt.type_string()},\n {\"name\": \"taps\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_installs\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_new_downloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_redownloads\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ apple_search_ads_add_pass_through_columns(\n base_columns=columns,\n pass_through_fields=var('apple_search_ads__search_term_passthrough_metrics'),\n except_fields=['conversions']\n ) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int", "macro.dbt.type_numeric", "macro.apple_search_ads.apple_search_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.6594532, "supported_languages": null}, "macro.apple_search_ads.get_keyword_history_columns": {"name": "get_keyword_history_columns", "resource_type": "macro", "package_name": "apple_search_ads", "path": "macros/staging/get_keyword_history_columns.sql", "original_file_path": "macros/staging/get_keyword_history_columns.sql", "unique_id": "macro.apple_search_ads.get_keyword_history_columns", "macro_sql": "{% macro get_keyword_history_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"bid_amount\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"bid_currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"modification_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"text\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_numeric", "macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.6613805, "supported_languages": null}, "macro.apple_search_ads.get_ad_level_report_columns": {"name": "get_ad_level_report_columns", "resource_type": "macro", "package_name": "apple_search_ads", "path": "macros/staging/get_ad_level_report_columns.sql", "original_file_path": "macros/staging/get_ad_level_report_columns.sql", "unique_id": "macro.apple_search_ads.get_ad_level_report_columns", "macro_sql": "{% macro get_ad_level_report_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"local_spend_amount\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"local_spend_currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"new_downloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"redownloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"taps\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_installs\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_new_downloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_redownloads\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ apple_search_ads_add_pass_through_columns(\n base_columns=columns,\n pass_through_fields=var('apple_search_ads__ad_passthrough_metrics'),\n except_fields=['conversions']\n ) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_numeric", "macro.dbt.type_string", "macro.apple_search_ads.apple_search_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.6643395, "supported_languages": null}, "macro.apple_search_ads.get_campaign_history_columns": {"name": "get_campaign_history_columns", "resource_type": "macro", "package_name": "apple_search_ads", "path": "macros/staging/get_campaign_history_columns.sql", "original_file_path": "macros/staging/get_campaign_history_columns.sql", "unique_id": "macro.apple_search_ads.get_campaign_history_columns", "macro_sql": "{% macro get_campaign_history_columns() %}\n\n{% set columns = [\n {\"name\": \"end_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"modification_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"organization_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"start_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.6659389, "supported_languages": null}, "macro.apple_search_ads.get_ad_group_history_columns": {"name": "get_ad_group_history_columns", "resource_type": "macro", "package_name": "apple_search_ads", "path": "macros/staging/get_ad_group_history_columns.sql", "original_file_path": "macros/staging/get_ad_group_history_columns.sql", "unique_id": "macro.apple_search_ads.get_ad_group_history_columns", "macro_sql": "{% macro get_ad_group_history_columns() %}\n\n{% set columns = [\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"end_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"modification_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"organization_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"start_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.6677294, "supported_languages": null}, "macro.reddit_ads.reddit_ads_persist_pass_through_columns": {"name": "reddit_ads_persist_pass_through_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/reddit_ads_persist_pass_through_columns.sql", "original_file_path": "macros/reddit_ads_persist_pass_through_columns.sql", "unique_id": "macro.reddit_ads.reddit_ads_persist_pass_through_columns", "macro_sql": "{% macro reddit_ads_persist_pass_through_columns(pass_through_variable, identifier=none, transform='', coalesce_with=none, alias_fields=[]) %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n {% set field_name = field.alias|default(field.name)|lower if field is mapping else field %}\n , {{ transform ~ '(cast(' ~ ('coalesce(' if coalesce_with is not none else '') ~ (identifier ~ '.' if identifier else '') ~ field_name ~ ((', ' ~ coalesce_with ~ ')') if coalesce_with is not none else '') ~ ' as ' ~ dbt.type_float() ~ '))' }} \n as {{ field_name ~ ('_c' if field_name in alias_fields else '') }}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "transform", "type": null, "description": ""}, {"name": "coalesce_with", "type": null, "description": ""}, {"name": "alias_fields", "type": null, "description": ""}], "created_at": 1783450492.6697416, "supported_languages": null}, "macro.reddit_ads.reddit_ads_extract_url_parameter": {"name": "reddit_ads_extract_url_parameter", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/reddit_ads_extract_url_parameters.sql", "original_file_path": "macros/reddit_ads_extract_url_parameters.sql", "unique_id": "macro.reddit_ads.reddit_ads_extract_url_parameter", "macro_sql": "{% macro reddit_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ return(adapter.dispatch('reddit_ads_extract_url_parameter', 'reddit_ads') (field, url_parameter)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.reddit_ads.default__reddit_ads_extract_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450492.670368, "supported_languages": null}, "macro.reddit_ads.default__reddit_ads_extract_url_parameter": {"name": "default__reddit_ads_extract_url_parameter", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/reddit_ads_extract_url_parameters.sql", "original_file_path": "macros/reddit_ads_extract_url_parameters.sql", "unique_id": "macro.reddit_ads.default__reddit_ads_extract_url_parameter", "macro_sql": "{% macro default__reddit_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ dbt_utils.get_url_parameter(field, url_parameter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450492.670774, "supported_languages": null}, "macro.reddit_ads.spark__reddit_ads_extract_url_parameter": {"name": "spark__reddit_ads_extract_url_parameter", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/reddit_ads_extract_url_parameters.sql", "original_file_path": "macros/reddit_ads_extract_url_parameters.sql", "unique_id": "macro.reddit_ads.spark__reddit_ads_extract_url_parameter", "macro_sql": "{% macro spark__reddit_ads_extract_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"=([^&]+)'\" -%}\nnullif(regexp_extract({{ field }}, {{ formatted_url_parameter }}, 1), '')\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450492.6711898, "supported_languages": null}, "macro.reddit_ads.get_campaign_report_columns": {"name": "get_campaign_report_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/get_campaign_report_columns.sql", "original_file_path": "macros/staging/get_campaign_report_columns.sql", "unique_id": "macro.reddit_ads.get_campaign_report_columns", "macro_sql": "{% macro get_campaign_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"region\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend\", \"datatype\": dbt.type_int()}\n] %}\n\n{% if target.type in ('bigquery', 'spark', 'databricks') %}\n {{ columns.append( {\"name\": 'date', \"datatype\": \"date\", \"quote\": True, \"alias\": \"date_day\" } ) }}\n\n{% else %}\n {{ columns.append( {\"name\": 'date', \"datatype\": \"date\", \"alias\": \"date_day\"} ) }}\n\n{% endif %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('reddit_ads__campaign_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.6740649, "supported_languages": null}, "macro.reddit_ads.get_account_report_columns": {"name": "get_account_report_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/get_account_report_columns.sql", "original_file_path": "macros/staging/get_account_report_columns.sql", "unique_id": "macro.reddit_ads.get_account_report_columns", "macro_sql": "{% macro get_account_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"region\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend\", \"datatype\": dbt.type_int()}\n] %}\n\n{% if target.type in ('bigquery', 'spark', 'databricks') %}\n {{ columns.append( {\"name\": 'date', \"datatype\": \"date\", \"quote\": True, \"alias\": \"date_day\" } ) }}\n\n{% else %}\n {{ columns.append( {\"name\": 'date', \"datatype\": \"date\", \"alias\": \"date_day\"} ) }}\n\n{% endif %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('reddit_ads__account_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.676775, "supported_languages": null}, "macro.reddit_ads.get_ad_group_report_columns": {"name": "get_ad_group_report_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/get_ad_group_report_columns.sql", "original_file_path": "macros/staging/get_ad_group_report_columns.sql", "unique_id": "macro.reddit_ads.get_ad_group_report_columns", "macro_sql": "{% macro get_ad_group_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_string()}, \n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"region\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend\", \"datatype\": dbt.type_int()}\n] %}\n\n{% if target.type in ('bigquery', 'spark', 'databricks') %}\n {{ columns.append( {\"name\": 'date', \"datatype\": \"date\", \"quote\": True, \"alias\": \"date_day\" } ) }}\n\n{% else %}\n {{ columns.append( {\"name\": 'date', \"datatype\": \"date\", \"alias\": \"date_day\"} ) }}\n\n{% endif %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('reddit_ads__ad_group_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.6797817, "supported_languages": null}, "macro.reddit_ads.get_campaign_conversions_report_columns": {"name": "get_campaign_conversions_report_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/get_campaign_conversions_report_columns.sql", "original_file_path": "macros/staging/get_campaign_conversions_report_columns.sql", "unique_id": "macro.reddit_ads.get_campaign_conversions_report_columns", "macro_sql": "{% macro get_campaign_conversions_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"click_through_conversion_attribution_window_month\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"event_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"total_items\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_value\", \"datatype\": dbt.type_int()},\n {\"name\": \"views\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_through_conversion_attribution_window_month\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('reddit_ads__campaign_conversions_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.682188, "supported_languages": null}, "macro.reddit_ads.get_campaign_country_report_columns": {"name": "get_campaign_country_report_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/get_campaign_country_report_columns.sql", "original_file_path": "macros/staging/get_campaign_country_report_columns.sql", "unique_id": "macro.reddit_ads.get_campaign_country_report_columns", "macro_sql": "{% macro get_campaign_country_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"country\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"region\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend\", \"datatype\": dbt.type_int()}\n] %}\n\n{% if target.type in ('bigquery', 'spark', 'databricks') %}\n {{ columns.append( {\"name\": 'date', \"datatype\": \"date\", \"quote\": True, \"alias\": \"date_day\" } ) }}\n\n{% else %}\n {{ columns.append( {\"name\": 'date', \"datatype\": \"date\", \"alias\": \"date_day\"} ) }}\n\n{% endif %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('reddit_ads__campaign_country_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.685202, "supported_languages": null}, "macro.reddit_ads.get_ad_group_conversions_report_columns": {"name": "get_ad_group_conversions_report_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/get_ad_group_conversions_report_columns.sql", "original_file_path": "macros/staging/get_ad_group_conversions_report_columns.sql", "unique_id": "macro.reddit_ads.get_ad_group_conversions_report_columns", "macro_sql": "{% macro get_ad_group_conversions_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"click_through_conversion_attribution_window_month\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"event_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"total_items\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_value\", \"datatype\": dbt.type_int()},\n {\"name\": \"views\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_through_conversion_attribution_window_month\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('reddit_ads__ad_group_conversions_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.6876833, "supported_languages": null}, "macro.reddit_ads.get_account_columns": {"name": "get_account_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/get_account_columns.sql", "original_file_path": "macros/staging/get_account_columns.sql", "unique_id": "macro.reddit_ads.get_account_columns", "macro_sql": "{% macro get_account_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"attribution_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"click_attribution_window\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"time_zone_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"view_attribution_window\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.6894681, "supported_languages": null}, "macro.reddit_ads.get_campaign_columns": {"name": "get_campaign_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/get_campaign_columns.sql", "original_file_path": "macros/staging/get_campaign_columns.sql", "unique_id": "macro.reddit_ads.get_campaign_columns", "macro_sql": "{% macro get_campaign_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"configured_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"effective_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"funding_instrument_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_processing\", \"datatype\": \"boolean\"},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"objective\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.6913648, "supported_languages": null}, "macro.reddit_ads.get_account_conversions_report_columns": {"name": "get_account_conversions_report_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/get_account_conversions_report_columns.sql", "original_file_path": "macros/staging/get_account_conversions_report_columns.sql", "unique_id": "macro.reddit_ads.get_account_conversions_report_columns", "macro_sql": "{% macro get_account_conversions_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"click_through_conversion_attribution_window_month\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"event_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"total_items\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_value\", \"datatype\": dbt.type_int()},\n {\"name\": \"views\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_through_conversion_attribution_window_month\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('reddit_ads__account_conversions_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.693637, "supported_languages": null}, "macro.reddit_ads.get_ad_conversions_report_columns": {"name": "get_ad_conversions_report_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/get_ad_conversions_report_columns.sql", "original_file_path": "macros/staging/get_ad_conversions_report_columns.sql", "unique_id": "macro.reddit_ads.get_ad_conversions_report_columns", "macro_sql": "{% macro get_ad_conversions_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"click_through_conversion_attribution_window_month\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"event_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"total_items\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_value\", \"datatype\": dbt.type_int()},\n {\"name\": \"views\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_through_conversion_attribution_window_month\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('reddit_ads__ad_conversions_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.6960423, "supported_languages": null}, "macro.reddit_ads.get_campaign_country_conversions_report_columns": {"name": "get_campaign_country_conversions_report_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/get_campaign_country_conversions_report_columns.sql", "original_file_path": "macros/staging/get_campaign_country_conversions_report_columns.sql", "unique_id": "macro.reddit_ads.get_campaign_country_conversions_report_columns", "macro_sql": "{% macro get_campaign_country_conversions_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"avg_value\", \"datatype\": dbt.type_float()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"click_through_conversion_attribution_window_month\", \"datatype\": dbt.type_int()},\n {\"name\": \"country\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"event_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"total_items\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_value\", \"datatype\": dbt.type_int()},\n {\"name\": \"views\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_through_conversion_attribution_window_month\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('reddit_ads__campaign_country_conversions_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_float", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.6987844, "supported_languages": null}, "macro.reddit_ads.get_ad_columns": {"name": "get_ad_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/get_ad_columns.sql", "original_file_path": "macros/staging/get_ad_columns.sql", "unique_id": "macro.reddit_ads.get_ad_columns", "macro_sql": "{% macro get_ad_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"click_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"configured_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"effective_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_processing\", \"datatype\": \"boolean\"},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"post_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"post_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"rejection_reason\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.7013328, "supported_languages": null}, "macro.reddit_ads.get_ad_group_columns": {"name": "get_ad_group_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/get_ad_group_columns.sql", "original_file_path": "macros/staging/get_ad_group_columns.sql", "unique_id": "macro.reddit_ads.get_ad_group_columns", "macro_sql": "{% macro get_ad_group_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"bid_strategy\", \"datatype\": dbt.type_string()},\n {\"name\": \"bid_value\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"configured_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"effective_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"end_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"expand_targeting\", \"datatype\": \"boolean\"},\n {\"name\": \"goal_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"goal_value\", \"datatype\": dbt.type_int()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_processing\", \"datatype\": \"boolean\"},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"optimization_strategy_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"start_time\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.704491, "supported_languages": null}, "macro.reddit_ads.get_ad_report_columns": {"name": "get_ad_report_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/get_ad_report_columns.sql", "original_file_path": "macros/staging/get_ad_report_columns.sql", "unique_id": "macro.reddit_ads.get_ad_report_columns", "macro_sql": "{% macro get_ad_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"region\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend\", \"datatype\": dbt.type_int()}\n] %}\n\n{% if target.type in ('bigquery', 'spark', 'databricks') %}\n {{ columns.append( {\"name\": 'date', \"datatype\": \"date\", \"quote\": True, \"alias\": \"date_day\" } ) }}\n\n{% else %}\n {{ columns.append( {\"name\": \"date\", \"datatype\": \"date\", \"alias\": \"date_day\"} ) }}\n\n{% endif %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('reddit_ads__ad_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.707284, "supported_languages": null}, "macro.reddit_ads.convert_microcurrency": {"name": "convert_microcurrency", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/convert_microcurrency.sql", "original_file_path": "macros/staging/convert_microcurrency.sql", "unique_id": "macro.reddit_ads.convert_microcurrency", "macro_sql": "{% macro convert_microcurrency(value) %}\n {{ return(adapter.dispatch('convert_microcurrency', 'reddit_ads') (value)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.reddit_ads.default__convert_microcurrency"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "value", "type": null, "description": ""}], "created_at": 1783450492.7078269, "supported_languages": null}, "macro.reddit_ads.default__convert_microcurrency": {"name": "default__convert_microcurrency", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/convert_microcurrency.sql", "original_file_path": "macros/staging/convert_microcurrency.sql", "unique_id": "macro.reddit_ads.default__convert_microcurrency", "macro_sql": "{% macro default__convert_microcurrency(value) %}\n coalesce(cast({{ value }} as {{ dbt.type_numeric() }}) / cast(1000000 as {{ dbt.type_numeric() }}), 0)\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "value", "type": null, "description": ""}], "created_at": 1783450492.708181, "supported_languages": null}, "macro.snapchat_ads.snapchat_ads_extract_url_parameter": {"name": "snapchat_ads_extract_url_parameter", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/snapchat_ads_extract_url_parameters.sql", "original_file_path": "macros/snapchat_ads_extract_url_parameters.sql", "unique_id": "macro.snapchat_ads.snapchat_ads_extract_url_parameter", "macro_sql": "{% macro snapchat_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ return(adapter.dispatch('snapchat_ads_extract_url_parameter', 'snapchat_ads') (field, url_parameter)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.snapchat_ads.default__snapchat_ads_extract_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450492.7088141, "supported_languages": null}, "macro.snapchat_ads.default__snapchat_ads_extract_url_parameter": {"name": "default__snapchat_ads_extract_url_parameter", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/snapchat_ads_extract_url_parameters.sql", "original_file_path": "macros/snapchat_ads_extract_url_parameters.sql", "unique_id": "macro.snapchat_ads.default__snapchat_ads_extract_url_parameter", "macro_sql": "{% macro default__snapchat_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ dbt_utils.get_url_parameter(field, url_parameter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450492.7091146, "supported_languages": null}, "macro.snapchat_ads.spark__snapchat_ads_extract_url_parameter": {"name": "spark__snapchat_ads_extract_url_parameter", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/snapchat_ads_extract_url_parameters.sql", "original_file_path": "macros/snapchat_ads_extract_url_parameters.sql", "unique_id": "macro.snapchat_ads.spark__snapchat_ads_extract_url_parameter", "macro_sql": "{% macro spark__snapchat_ads_extract_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"=([^&]+)'\" -%}\nnullif(regexp_extract({{ field }}, {{ formatted_url_parameter }}, 1), '')\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450492.7095337, "supported_languages": null}, "macro.snapchat_ads.snapchat_ads_persist_pass_through_columns": {"name": "snapchat_ads_persist_pass_through_columns", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/snapchat_ads_persist_pass_through_columns.sql", "original_file_path": "macros/snapchat_ads_persist_pass_through_columns.sql", "unique_id": "macro.snapchat_ads.snapchat_ads_persist_pass_through_columns", "macro_sql": "{% macro snapchat_ads_persist_pass_through_columns(pass_through_variable, identifier=none, transform='', coalesce_with=none, except_variable=none, exclude_fields=[]) %}\n\n{% set except_fields = [] %}\n{% if except_variable is not none %}\n {# Start creating list of fields to exclude #}\n {% for item in var(except_variable) %}\n {% do except_fields.append(item.name) %}\n {% endfor %}\n{% endif %}\n\n{% for field in exclude_fields %}\n {% do except_fields.append(field) %}\n{% endfor %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n {% set field_name = field.alias|default(field.name)|lower if field is mapping else field|lower %}\n \n {% if field_name not in except_fields %}\n , {{ transform ~ '(' ~ ('coalesce(' if coalesce_with is not none else '') ~ (identifier ~ '.' if identifier else '') ~ field_name ~ ((', ' ~ coalesce_with ~ ')') if coalesce_with is not none else '') ~ ')' }} as {{ field_name }}\n {% endif %}\n\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "transform", "type": null, "description": ""}, {"name": "coalesce_with", "type": null, "description": ""}, {"name": "except_variable", "type": null, "description": ""}, {"name": "exclude_fields", "type": null, "description": ""}], "created_at": 1783450492.7122679, "supported_languages": null}, "macro.snapchat_ads.get_ad_squad_history_columns": {"name": "get_ad_squad_history_columns", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/staging/get_ad_squad_history_columns.sql", "original_file_path": "macros/staging/get_ad_squad_history_columns.sql", "unique_id": "macro.snapchat_ads.get_ad_squad_history_columns", "macro_sql": "{% macro get_ad_squad_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.713826, "supported_languages": null}, "macro.snapchat_ads.get_ad_history_columns": {"name": "get_ad_history_columns", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/staging/get_ad_history_columns.sql", "original_file_path": "macros/staging/get_ad_history_columns.sql", "unique_id": "macro.snapchat_ads.get_ad_history_columns", "macro_sql": "{% macro get_ad_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ad_squad_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"creative_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.7154734, "supported_languages": null}, "macro.snapchat_ads.get_ad_account_history_columns": {"name": "get_ad_account_history_columns", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/staging/get_ad_account_history_columns.sql", "original_file_path": "macros/staging/get_ad_account_history_columns.sql", "unique_id": "macro.snapchat_ads.get_ad_account_history_columns", "macro_sql": "{% macro get_ad_account_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"advertiser\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"timezone\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.717434, "supported_languages": null}, "macro.snapchat_ads.snapchat_ads_fill_pass_through_columns": {"name": "snapchat_ads_fill_pass_through_columns", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/staging/snapchat_ads_fill_pass_through_columns.sql", "original_file_path": "macros/staging/snapchat_ads_fill_pass_through_columns.sql", "unique_id": "macro.snapchat_ads.snapchat_ads_fill_pass_through_columns", "macro_sql": "{% macro snapchat_ads_fill_pass_through_columns(pass_through_fields, except=[]) %}\n\n{% if pass_through_fields %}\n {% for field in pass_through_fields %}\n {% if (field.alias if field.alias else field.name) not in except %}\n {% if field.transform_sql %}\n , coalesce(cast({{ field.transform_sql }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% else %}\n , coalesce(cast({{ field.alias if field.alias else field.name }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% endif %}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}], "created_at": 1783450492.71907, "supported_languages": null}, "macro.snapchat_ads.get_campaign_geo_region_daily_report_columns": {"name": "get_campaign_geo_region_daily_report_columns", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/staging/get_campaign_geo_region_daily_report_columns.sql", "original_file_path": "macros/staging/get_campaign_geo_region_daily_report_columns.sql", "unique_id": "macro.snapchat_ads.get_campaign_geo_region_daily_report_columns", "macro_sql": "{% macro get_campaign_geo_region_daily_report_columns() %}\n\n{% set columns = [\n {\"name\": \"attachment_quartile_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_quartile_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_quartile_3\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_total_view_time_millis\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_view_completion\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"region\", \"datatype\": dbt.type_string()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"quartile_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"quartile_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"quartile_3\", \"datatype\": dbt.type_int()},\n {\"name\": \"saves\", \"datatype\": dbt.type_int()},\n {\"name\": \"screen_time_millis\", \"datatype\": dbt.type_int()},\n {\"name\": \"shares\", \"datatype\": dbt.type_int()},\n {\"name\": \"spend\", \"datatype\": dbt.type_int()},\n {\"name\": \"swipes\", \"datatype\": dbt.type_int()},\n {\"name\": \"video_views\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_completion\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_time_millis\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversion_purchases_value\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('snapchat_ads__conversion_fields')) }}\n\n{{ snapchat_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('snapchat_ads__campaign_daily_region_report_passthrough_metrics')) }}\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.fivetran_utils.add_pass_through_columns", "macro.snapchat_ads.snapchat_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.7234616, "supported_languages": null}, "macro.snapchat_ads.get_creative_history_columns": {"name": "get_creative_history_columns", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/staging/get_creative_history_columns.sql", "original_file_path": "macros/staging/get_creative_history_columns.sql", "unique_id": "macro.snapchat_ads.get_creative_history_columns", "macro_sql": "{% macro get_creative_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ad_account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"web_view_url\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.725056, "supported_languages": null}, "macro.snapchat_ads.get_ad_squad_hourly_report_columns": {"name": "get_ad_squad_hourly_report_columns", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/staging/get_ad_squad_hourly_report_columns.sql", "original_file_path": "macros/staging/get_ad_squad_hourly_report_columns.sql", "unique_id": "macro.snapchat_ads.get_ad_squad_hourly_report_columns", "macro_sql": "{% macro get_ad_squad_hourly_report_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_squad_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"attachment_quartile_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_quartile_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_quartile_3\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_total_view_time_millis\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_view_completion\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"quartile_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"quartile_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"quartile_3\", \"datatype\": dbt.type_int()},\n {\"name\": \"saves\", \"datatype\": dbt.type_int()},\n {\"name\": \"screen_time_millis\", \"datatype\": dbt.type_int()},\n {\"name\": \"shares\", \"datatype\": dbt.type_int()},\n {\"name\": \"spend\", \"datatype\": dbt.type_int()},\n {\"name\": \"swipes\", \"datatype\": dbt.type_int()},\n {\"name\": \"video_views\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_completion\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_time_millis\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversion_purchases_value\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('snapchat_ads__conversion_fields')) }}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ snapchat_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('snapchat_ads__ad_squad_hourly_passthrough_metrics'), except_fields=(var('snapchat_ads__conversion_fields') + ['conversion_purchases_value'])) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.fivetran_utils.add_pass_through_columns", "macro.snapchat_ads.snapchat_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.7293153, "supported_languages": null}, "macro.snapchat_ads.get_campaign_hourly_report_columns": {"name": "get_campaign_hourly_report_columns", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/staging/get_campaign_hourly_report_columns.sql", "original_file_path": "macros/staging/get_campaign_hourly_report_columns.sql", "unique_id": "macro.snapchat_ads.get_campaign_hourly_report_columns", "macro_sql": "{% macro get_campaign_hourly_report_columns() %}\n\n{% set columns = [\n {\"name\": \"attachment_quartile_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_quartile_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_quartile_3\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_total_view_time_millis\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_view_completion\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"quartile_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"quartile_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"quartile_3\", \"datatype\": dbt.type_int()},\n {\"name\": \"saves\", \"datatype\": dbt.type_int()},\n {\"name\": \"screen_time_millis\", \"datatype\": dbt.type_int()},\n {\"name\": \"shares\", \"datatype\": dbt.type_int()},\n {\"name\": \"spend\", \"datatype\": dbt.type_int()},\n {\"name\": \"swipes\", \"datatype\": dbt.type_int()},\n {\"name\": \"video_views\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_completion\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_time_millis\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversion_purchases_value\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('snapchat_ads__conversion_fields')) }}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ snapchat_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('snapchat_ads__campaign_hourly_report_passthrough_metrics'), except_fields=(var('snapchat_ads__conversion_fields') + ['conversion_purchases_value'])) }}\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.fivetran_utils.add_pass_through_columns", "macro.snapchat_ads.snapchat_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.7336159, "supported_languages": null}, "macro.snapchat_ads.get_campaign_geo_country_daily_report_columns": {"name": "get_campaign_geo_country_daily_report_columns", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/staging/get_campaign_geo_country_daily_report_columns.sql", "original_file_path": "macros/staging/get_campaign_geo_country_daily_report_columns.sql", "unique_id": "macro.snapchat_ads.get_campaign_geo_country_daily_report_columns", "macro_sql": "{% macro get_campaign_geo_country_daily_report_columns() %}\n\n{% set columns = [\n {\"name\": \"attachment_quartile_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_quartile_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_quartile_3\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_total_view_time_millis\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_view_completion\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"country\", \"datatype\": dbt.type_string()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"quartile_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"quartile_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"quartile_3\", \"datatype\": dbt.type_int()},\n {\"name\": \"saves\", \"datatype\": dbt.type_int()},\n {\"name\": \"screen_time_millis\", \"datatype\": dbt.type_int()},\n {\"name\": \"shares\", \"datatype\": dbt.type_int()},\n {\"name\": \"spend\", \"datatype\": dbt.type_int()},\n {\"name\": \"swipes\", \"datatype\": dbt.type_int()},\n {\"name\": \"video_views\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_completion\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_time_millis\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversion_purchases_value\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('snapchat_ads__conversion_fields')) }}\n\n{{ snapchat_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('snapchat_ads__campaign_daily_country_report_passthrough_metrics')) }}\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.fivetran_utils.add_pass_through_columns", "macro.snapchat_ads.snapchat_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.7379422, "supported_languages": null}, "macro.snapchat_ads.snapchat_ads_add_pass_through_columns": {"name": "snapchat_ads_add_pass_through_columns", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/staging/snapchat_ads_add_pass_through_columns.sql", "original_file_path": "macros/staging/snapchat_ads_add_pass_through_columns.sql", "unique_id": "macro.snapchat_ads.snapchat_ads_add_pass_through_columns", "macro_sql": "{% macro snapchat_ads_add_pass_through_columns(base_columns, pass_through_fields, except_fields=[]) %}\n\n{% if pass_through_fields %}\n {% for column in pass_through_fields %}\n\n {% if column is mapping %}\n {% set col_name = column.alias|default(column.name)|lower %}\n \n {% if col_name not in except_fields %}\n {% if column.alias %}\n {% do base_columns.append({ \"name\": column.name, \"alias\": column.alias, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% else %}\n {% do base_columns.append({ \"name\": column.name, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% else %}\n {% if column|lower not in except_fields %}\n {% do base_columns.append({ \"name\": column, \"datatype\": dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_columns", "type": null, "description": ""}, {"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except_fields", "type": null, "description": ""}], "created_at": 1783450492.7404625, "supported_languages": null}, "macro.snapchat_ads.get_creative_url_tag_history_columns": {"name": "get_creative_url_tag_history_columns", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/staging/get_creative_url_tag_history_columns.sql", "original_file_path": "macros/staging/get_creative_url_tag_history_columns.sql", "unique_id": "macro.snapchat_ads.get_creative_url_tag_history_columns", "macro_sql": "{% macro get_creative_url_tag_history_columns() %}\n\n{% set columns = [\n {\"name\": \"creative_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"key\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"value\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.741587, "supported_languages": null}, "macro.snapchat_ads.get_ad_hourly_report_columns": {"name": "get_ad_hourly_report_columns", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/staging/get_ad_hourly_report_columns.sql", "original_file_path": "macros/staging/get_ad_hourly_report_columns.sql", "unique_id": "macro.snapchat_ads.get_ad_hourly_report_columns", "macro_sql": "{% macro get_ad_hourly_report_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"attachment_quartile_1\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"attachment_quartile_2\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"attachment_quartile_3\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"attachment_total_view_time_millis\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"attachment_view_completion\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"quartile_1\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"quartile_2\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"quartile_3\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"saves\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"screen_time_millis\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"shares\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"spend\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"swipes\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_views\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"view_completion\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"view_time_millis\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"conversion_purchases_value\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('snapchat_ads__conversion_fields')) }}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ snapchat_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('snapchat_ads__ad_hourly_passthrough_metrics'), except_fields=(var('snapchat_ads__conversion_fields') + ['conversion_purchases_value'])) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_numeric", "macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns", "macro.snapchat_ads.snapchat_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.7459624, "supported_languages": null}, "macro.snapchat_ads.get_campaign_history_columns": {"name": "get_campaign_history_columns", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/staging/get_campaign_history_columns.sql", "original_file_path": "macros/staging/get_campaign_history_columns.sql", "unique_id": "macro.snapchat_ads.get_campaign_history_columns", "macro_sql": "{% macro get_campaign_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ad_account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"daily_budget_micro\", \"datatype\": dbt.type_int()},\n {\"name\": \"start_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"end_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"lifetime_spend_cap_micro\", \"datatype\": dbt.type_int()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"objective\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.7484226, "supported_languages": null}, "macro.pinterest.pinterest_ads_persist_pass_through_columns": {"name": "pinterest_ads_persist_pass_through_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/pinterest_ads_persist_pass_through_columns.sql", "original_file_path": "macros/pinterest_ads_persist_pass_through_columns.sql", "unique_id": "macro.pinterest.pinterest_ads_persist_pass_through_columns", "macro_sql": "{% macro pinterest_ads_persist_pass_through_columns(pass_through_variable, identifier=none, transform='', coalesce_with=none, exclude_fields=[]) %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n {% set field_name = field.alias|default(field.name)|lower if field is mapping else field %}\n {% if field_name not in exclude_fields %}\n , {{ transform ~ '(' ~ ('coalesce(' if coalesce_with is not none else '') ~ (identifier ~ '.' if identifier else '') ~ field_name ~ ((', ' ~ coalesce_with ~ ')') if coalesce_with is not none else '') ~ ')' }} as {{ field_name }}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "transform", "type": null, "description": ""}, {"name": "coalesce_with", "type": null, "description": ""}, {"name": "exclude_fields", "type": null, "description": ""}], "created_at": 1783450492.7502656, "supported_languages": null}, "macro.pinterest.get_campaign_report_columns": {"name": "get_campaign_report_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/get_campaign_report_columns.sql", "original_file_path": "macros/staging/get_campaign_report_columns.sql", "unique_id": "macro.pinterest.get_campaign_report_columns", "macro_sql": "{% macro get_campaign_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"advertiser_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"clickthrough_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"clickthrough_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impression_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"impression_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"spend_in_micro_dollar\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions_quantity\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions_value_in_micro_dollar\", \"datatype\": dbt.type_int()}\n] %}\n\n{# Make backwards compatible in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ pinterest_ads_add_passthrough_columns(base_columns=columns, pass_through_fields=var('pinterest__campaign_report_passthrough_metrics'), except_fields=['total_conversions', \"total_conversions_quantity\", \"total_conversions_value_in_micro_dollar\"]) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.pinterest.pinterest_ads_add_passthrough_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.7533865, "supported_languages": null}, "macro.pinterest.get_pin_promotion_history_columns": {"name": "get_pin_promotion_history_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/get_pin_promotion_history_columns.sql", "original_file_path": "macros/staging/get_pin_promotion_history_columns.sql", "unique_id": "macro.pinterest.get_pin_promotion_history_columns", "macro_sql": "{% macro get_pin_promotion_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"android_deep_link\", \"datatype\": dbt.type_string()},\n {\"name\": \"click_tracking_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"creative_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"destination_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ios_deep_link\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_pin_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"is_removable\", \"datatype\": \"boolean\"},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"pin_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"review_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"view_tracking_url\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.7568922, "supported_languages": null}, "macro.pinterest.get_advertiser_history_columns": {"name": "get_advertiser_history_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/get_advertiser_history_columns.sql", "original_file_path": "macros/staging/get_advertiser_history_columns.sql", "unique_id": "macro.pinterest.get_advertiser_history_columns", "macro_sql": "{% macro get_advertiser_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"country\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"owner_user_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"owner_username\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"permissions\", \"datatype\": dbt.type_string(), \"quote\": True, \"alias\": \"advertiser_permissions\"},\n {\"name\": \"updated_time\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.759141, "supported_languages": null}, "macro.pinterest.get_pin_promotion_report_columns": {"name": "get_pin_promotion_report_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/get_pin_promotion_report_columns.sql", "original_file_path": "macros/staging/get_pin_promotion_report_columns.sql", "unique_id": "macro.pinterest.get_pin_promotion_report_columns", "macro_sql": "{% macro get_pin_promotion_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"advertiser_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clickthrough_1\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"clickthrough_2\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impression_1\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"impression_2\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"pin_promotion_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend_in_micro_dollar\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"total_conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions_quantity\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions_value_in_micro_dollar\", \"datatype\": dbt.type_int()}\n] %}\n\n{# Make backwards compatible in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ pinterest_ads_add_passthrough_columns(base_columns=columns, pass_through_fields=var('pinterest__pin_promotion_report_passthrough_metrics'), except_fields=['total_conversions', \"total_conversions_quantity\", \"total_conversions_value_in_micro_dollar\"]) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_numeric", "macro.dbt.type_int", "macro.pinterest.pinterest_ads_add_passthrough_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.7623408, "supported_languages": null}, "macro.pinterest.get_keyword_report_columns": {"name": "get_keyword_report_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/get_keyword_report_columns.sql", "original_file_path": "macros/staging/get_keyword_report_columns.sql", "unique_id": "macro.pinterest.get_keyword_report_columns", "macro_sql": "{% macro get_keyword_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"advertiser_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clickthrough_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"clickthrough_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impression_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"impression_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"keyword_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"pin_promotion_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend_in_micro_dollar\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions_quantity\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions_value_in_micro_dollar\", \"datatype\": dbt.type_int()}\n] %}\n\n{# Make backwards compatible in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ pinterest_ads_add_passthrough_columns(base_columns=columns, pass_through_fields=var('pinterest__keyword_report_passthrough_metrics'), except_fields=['total_conversions', \"total_conversions_quantity\", \"total_conversions_value_in_micro_dollar\"]) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.pinterest.pinterest_ads_add_passthrough_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.7660115, "supported_languages": null}, "macro.pinterest.pinterest_ads_extract_url_parameter": {"name": "pinterest_ads_extract_url_parameter", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/pinterest_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/pinterest_ads_extract_url_parameters.sql", "unique_id": "macro.pinterest.pinterest_ads_extract_url_parameter", "macro_sql": "{% macro pinterest_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ return(adapter.dispatch('pinterest_ads_extract_url_parameter', 'pinterest') (field, url_parameter)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.pinterest.default__pinterest_ads_extract_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450492.7666616, "supported_languages": null}, "macro.pinterest.default__pinterest_ads_extract_url_parameter": {"name": "default__pinterest_ads_extract_url_parameter", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/pinterest_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/pinterest_ads_extract_url_parameters.sql", "unique_id": "macro.pinterest.default__pinterest_ads_extract_url_parameter", "macro_sql": "{% macro default__pinterest_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ dbt_utils.get_url_parameter(field, url_parameter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450492.7669663, "supported_languages": null}, "macro.pinterest.spark__pinterest_ads_extract_url_parameter": {"name": "spark__pinterest_ads_extract_url_parameter", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/pinterest_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/pinterest_ads_extract_url_parameters.sql", "unique_id": "macro.pinterest.spark__pinterest_ads_extract_url_parameter", "macro_sql": "{% macro spark__pinterest_ads_extract_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"=([^&]+)'\" -%}\nnullif(regexp_extract({{ field }}, {{ formatted_url_parameter }}, 1), '')\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450492.7673612, "supported_languages": null}, "macro.pinterest.get_targeting_geo_columns": {"name": "get_targeting_geo_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/get_targeting_geo_columns.sql", "original_file_path": "macros/staging/get_targeting_geo_columns.sql", "unique_id": "macro.pinterest.get_targeting_geo_columns", "macro_sql": "{% macro get_targeting_geo_columns() %}\n\n{% set columns = [\n {\"name\": \"country_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"country_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.7682955, "supported_languages": null}, "macro.pinterest.get_advertiser_report_columns": {"name": "get_advertiser_report_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/get_advertiser_report_columns.sql", "original_file_path": "macros/staging/get_advertiser_report_columns.sql", "unique_id": "macro.pinterest.get_advertiser_report_columns", "macro_sql": "{% macro get_advertiser_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"advertiser_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clickthrough_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"clickthrough_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impression_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"impression_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"spend_in_micro_dollar\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions_quantity\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions_value_in_micro_dollar\", \"datatype\": dbt.type_int()}\n] %}\n\n{# Make backwards compatible in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ pinterest_ads_add_passthrough_columns(base_columns=columns, pass_through_fields=var('pinterest__advertiser_report_passthrough_metrics'), except_fields=['total_conversions', \"total_conversions_quantity\", \"total_conversions_value_in_micro_dollar\"]) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.pinterest.pinterest_ads_add_passthrough_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.7714412, "supported_languages": null}, "macro.pinterest.get_ad_group_report_columns": {"name": "get_ad_group_report_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/get_ad_group_report_columns.sql", "original_file_path": "macros/staging/get_ad_group_report_columns.sql", "unique_id": "macro.pinterest.get_ad_group_report_columns", "macro_sql": "{% macro get_ad_group_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"advertiser_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clickthrough_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"clickthrough_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impression_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"impression_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"spend_in_micro_dollar\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions_quantity\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions_value_in_micro_dollar\", \"datatype\": dbt.type_int()}\n] %}\n\n{# Make backwards compatible in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ pinterest_ads_add_passthrough_columns(base_columns=columns, pass_through_fields=var('pinterest__ad_group_report_passthrough_metrics'), except_fields=['total_conversions', \"total_conversions_quantity\", \"total_conversions_value_in_micro_dollar\"]) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.pinterest.pinterest_ads_add_passthrough_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.7747288, "supported_languages": null}, "macro.pinterest.get_pin_promotion_targeting_report_columns": {"name": "get_pin_promotion_targeting_report_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/get_pin_promotion_targeting_report_columns.sql", "original_file_path": "macros/staging/get_pin_promotion_targeting_report_columns.sql", "unique_id": "macro.pinterest.get_pin_promotion_targeting_report_columns", "macro_sql": "{% macro get_pin_promotion_targeting_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"targeting_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"targeting_value\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"advertiser_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"pin_promotion_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clickthrough_1\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"clickthrough_2\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"impression_1\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"impression_2\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"spend_in_micro_dollar\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"total_conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions_quantity\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions_value_in_micro_dollar\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ pinterest_ads_add_passthrough_columns(base_columns=columns, pass_through_fields=var('pinterest__pin_promotion_targeting_report_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_numeric", "macro.dbt.type_int", "macro.pinterest.pinterest_ads_add_passthrough_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.777988, "supported_languages": null}, "macro.pinterest.get_keyword_history_columns": {"name": "get_keyword_history_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/get_keyword_history_columns.sql", "original_file_path": "macros/staging/get_keyword_history_columns.sql", "unique_id": "macro.pinterest.get_keyword_history_columns", "macro_sql": "{% macro get_keyword_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"advertiser_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"archived\", \"datatype\": \"boolean\"},\n {\"name\": \"bid\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"parent_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"value\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.7802262, "supported_languages": null}, "macro.pinterest.pinterest_ads_add_passthrough_columns": {"name": "pinterest_ads_add_passthrough_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/pinterest_ads_add_passthrough_columns.sql", "original_file_path": "macros/staging/pinterest_ads_add_passthrough_columns.sql", "unique_id": "macro.pinterest.pinterest_ads_add_passthrough_columns", "macro_sql": "{% macro pinterest_ads_add_passthrough_columns(base_columns, pass_through_fields, except_fields=[]) %}\t\n\n{% if pass_through_fields %}\t\n {% for column in pass_through_fields %}\t\n\n {% if column is mapping %}\t\n {% set col_name = column.alias|default(column.name)|lower %}\t\n\n {% if col_name not in except_fields %}\t\n {% if column.alias %}\t\n {% do base_columns.append({ \"name\": column.name, \"alias\": column.alias, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\t\n {% else %}\t\n {% do base_columns.append({ \"name\": column.name, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\t\n {% endif %}\t\n {% endif %}\t\n\n {% else %}\t\n {% if column|lower not in except_fields %}\t\n {% do base_columns.append({ \"name\": column, \"datatype\": dbt.type_string()}) %}\t\n {% endif %}\t\n {% endif %}\t\n\n {% endfor %}\t\n{% endif %}\t\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_columns", "type": null, "description": ""}, {"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except_fields", "type": null, "description": ""}], "created_at": 1783450492.7827592, "supported_languages": null}, "macro.pinterest.get_targeting_geo_region_columns": {"name": "get_targeting_geo_region_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/get_targeting_geo_region_columns.sql", "original_file_path": "macros/staging/get_targeting_geo_region_columns.sql", "unique_id": "macro.pinterest.get_targeting_geo_region_columns", "macro_sql": "{% macro get_targeting_geo_region_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"country_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"region_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"region_name\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.7838805, "supported_languages": null}, "macro.pinterest.get_campaign_history_columns": {"name": "get_campaign_history_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/get_campaign_history_columns.sql", "original_file_path": "macros/staging/get_campaign_history_columns.sql", "unique_id": "macro.pinterest.get_campaign_history_columns", "macro_sql": "{% macro get_campaign_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"created_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"default_ad_group_budget_in_micro_currency\", \"datatype\": dbt.type_int()},\n {\"name\": \"is_automated_campaign\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"is_campaign_budget_optimization\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"is_flexible_daily_budgets\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"advertiser_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"start_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"end_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"budget_spend_cap\", \"datatype\": dbt.type_int()},\n {\"name\": \"lifetime_spend_cap\", \"datatype\": dbt.type_int()},\n {\"name\": \"objective_type\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_boolean", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.7868435, "supported_languages": null}, "macro.pinterest.get_ad_group_history_columns": {"name": "get_ad_group_history_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/get_ad_group_history_columns.sql", "original_file_path": "macros/staging/get_ad_group_history_columns.sql", "unique_id": "macro.pinterest.get_ad_group_history_columns", "macro_sql": "{% macro get_ad_group_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"end_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"pacing_delivery_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"placement_group\", \"datatype\": dbt.type_string()},\n {\"name\": \"start_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"summary_status\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.789282, "supported_languages": null}, "macro.pinterest.pinterest_ads_fill_pass_through_columns": {"name": "pinterest_ads_fill_pass_through_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/pinterest_ads_fill_pass_through_columns.sql", "original_file_path": "macros/staging/pinterest_ads_fill_pass_through_columns.sql", "unique_id": "macro.pinterest.pinterest_ads_fill_pass_through_columns", "macro_sql": "{% macro pinterest_ads_fill_pass_through_columns(pass_through_fields, except=[]) %}\t\n\n{% if pass_through_fields %}\t\n {% for field in pass_through_fields %}\t\n {% if (field.alias if field.alias else field.name) not in except %}\t\n {% if field.transform_sql %}\t\n , coalesce(cast({{ field.transform_sql }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\t\n {% else %}\t\n , coalesce(cast({{ field.alias if field.alias else field.name }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\t\n {% endif %}\t\n {% endif %}\t\n {% endfor %}\t\n{% endif %}\t\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}], "created_at": 1783450492.7909288, "supported_languages": null}, "macro.google_ads.google_ads_persist_pass_through_columns": {"name": "google_ads_persist_pass_through_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/google_ads_persist_pass_through_columns.sql", "original_file_path": "macros/google_ads_persist_pass_through_columns.sql", "unique_id": "macro.google_ads.google_ads_persist_pass_through_columns", "macro_sql": "{% macro google_ads_persist_pass_through_columns(pass_through_variable, identifier=none, transform='', coalesce_with=none, exclude_fields=[]) %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n {% set field_name = field.alias|default(field.name)|lower if field is mapping else field %}\n {% if field_name not in exclude_fields %}\n , {{ transform ~ '(' ~ ('coalesce(' if coalesce_with is not none else '') ~ (identifier ~ '.' if identifier else '') ~ field_name ~ ((', ' ~ coalesce_with ~ ')') if coalesce_with is not none else '') ~ ')' }} as {{ field_name }}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "transform", "type": null, "description": ""}, {"name": "coalesce_with", "type": null, "description": ""}, {"name": "exclude_fields", "type": null, "description": ""}], "created_at": 1783450492.792782, "supported_languages": null}, "macro.google_ads.get_threshold_high_lows": {"name": "get_threshold_high_lows", "resource_type": "macro", "package_name": "google_ads", "path": "macros/get_threshold_high_lows.sql", "original_file_path": "macros/get_threshold_high_lows.sql", "unique_id": "macro.google_ads.get_threshold_high_lows", "macro_sql": "{% macro get_threshold_high_lows() %}\n {{ return(adapter.dispatch('get_threshold_high_lows', 'google_ads')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.google_ads.default__get_threshold_high_lows"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.7935252, "supported_languages": null}, "macro.google_ads.default__get_threshold_high_lows": {"name": "default__get_threshold_high_lows", "resource_type": "macro", "package_name": "google_ads", "path": "macros/get_threshold_high_lows.sql", "original_file_path": "macros/get_threshold_high_lows.sql", "unique_id": "macro.google_ads.default__get_threshold_high_lows", "macro_sql": "{% macro default__get_threshold_high_lows() %}\n {%- set diagnostic_thresholds = {\n 'cpc': {\n 'low': var('google_ads__cpc_low', 1.0),\n 'high': var('google_ads__cpc_high', 3.0)\n },\n 'ctr': {\n 'low': var('google_ads__ctr_low', 0.015),\n 'high': var('google_ads__ctr_high', 0.03)\n },\n 'spend': {\n 'low': var('google_ads__spend_low', 100.0),\n 'high': var('google_ads__spend_high', 500.0)\n },\n 'bid_modifier': {\n 'low': var('google_ads__bid_modifier_low', 0.7),\n 'high': var('google_ads__bid_modifier_high', 1.5)\n },\n 'budget': {\n 'low': var('google_ads__budget_low', 0.75),\n 'high': var('google_ads__budget_high', 0.95)\n },\n 'location_targeting': {\n 'low': var('google_ads__location_targeting_low', 5.0),\n 'high': var('google_ads__location_targeting_high', 50.0)\n }\n } -%}\n\n {{ return(diagnostic_thresholds) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.795741, "supported_languages": null}, "macro.google_ads.get_campaign_criterion_history_columns": {"name": "get_campaign_criterion_history_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_campaign_criterion_history_columns.sql", "original_file_path": "macros/staging/get_campaign_criterion_history_columns.sql", "unique_id": "macro.google_ads.get_campaign_criterion_history_columns", "macro_sql": "{% macro get_campaign_criterion_history_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"geo_target_constant_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"mobile_device_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"operating_system_version_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"topic_constant_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"user_interest_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"user_list_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"age_range_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"bid_modifier\", \"datatype\": dbt.type_float()},\n {\"name\": \"carrier_country_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"carrier_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"content_label_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"display_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"gender_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"income_range_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"ip_block_ip_address\", \"datatype\": dbt.type_string()},\n {\"name\": \"negative\", \"datatype\": \"boolean\"},\n {\"name\": \"keyword_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"keyword_text\", \"datatype\": dbt.type_string()},\n {\"name\": \"language_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"language_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"mobile_app_category_constant_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"mobile_app_category_constant_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"mobile_application_app_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"mobile_application_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"parental_status_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"placement_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"youtube_channel_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"youtube_video_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.802281, "supported_languages": null}, "macro.google_ads.get_keyword_stats_columns": {"name": "get_keyword_stats_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_keyword_stats_columns.sql", "original_file_path": "macros/staging/get_keyword_stats_columns.sql", "unique_id": "macro.google_ads.get_keyword_stats_columns", "macro_sql": "{% macro get_keyword_stats_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ad_group_criterion_criterion_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_network_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"cost_micros\", \"datatype\": dbt.type_int()},\n {\"name\": \"customer_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"device\", \"datatype\": dbt.type_string()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions_value\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_through_conversions\", \"datatype\": dbt.type_int()}\n] %}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ google_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('google_ads__keyword_stats_passthrough_metrics'), except_fields=['conversions', \"conversions_value\", \"view_through_conversions\"]) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.google_ads.google_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.805607, "supported_languages": null}, "macro.google_ads.google_ads_fill_pass_through_columns": {"name": "google_ads_fill_pass_through_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/google_ads_fill_pass_through_columns.sql", "original_file_path": "macros/staging/google_ads_fill_pass_through_columns.sql", "unique_id": "macro.google_ads.google_ads_fill_pass_through_columns", "macro_sql": "{% macro google_ads_fill_pass_through_columns(pass_through_fields, except=[]) %}\n\n{% if pass_through_fields %}\n {% for field in pass_through_fields %}\n {% if (field.alias if field.alias else field.name) not in except %}\n {% if field.transform_sql %}\n , coalesce(cast({{ field.transform_sql }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% else %}\n , coalesce(cast({{ field.alias if field.alias else field.name }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% endif %}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}], "created_at": 1783450492.8072822, "supported_languages": null}, "macro.google_ads.get_campaign_bidding_strategy_history_columns": {"name": "get_campaign_bidding_strategy_history_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_campaign_bidding_strategy_history_columns.sql", "original_file_path": "macros/staging/get_campaign_bidding_strategy_history_columns.sql", "unique_id": "macro.google_ads.get_campaign_bidding_strategy_history_columns", "macro_sql": "{% macro get_campaign_bidding_strategy_history_columns() %}\n\n{% set columns = [\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"cpc_bid_ceiling_micros\", \"datatype\": dbt.type_int()},\n {\"name\": \"cpc_bid_floor_micros\", \"datatype\": dbt.type_int()},\n {\"name\": \"enhanced_cpc\", \"datatype\": \"boolean\"},\n {\"name\": \"enhanced_cpc_enabled\", \"datatype\": \"boolean\"},\n {\"name\": \"location\", \"datatype\": dbt.type_string()},\n {\"name\": \"location_fraction_micros\", \"datatype\": dbt.type_int()},\n {\"name\": \"manual_cpa\", \"datatype\": dbt.type_float()},\n {\"name\": \"manual_cpm\", \"datatype\": dbt.type_float()},\n {\"name\": \"manual_cpv\", \"datatype\": dbt.type_float()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"target_cpa_micros\", \"datatype\": dbt.type_int()},\n {\"name\": \"target_cpm\", \"datatype\": dbt.type_float()},\n {\"name\": \"target_roas\", \"datatype\": dbt.type_float()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.810606, "supported_languages": null}, "macro.google_ads.google_ads_extract_url_parameter": {"name": "google_ads_extract_url_parameter", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/google_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/google_ads_extract_url_parameters.sql", "unique_id": "macro.google_ads.google_ads_extract_url_parameter", "macro_sql": "{% macro google_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ return(adapter.dispatch('google_ads_extract_url_parameter', 'google_ads') (field, url_parameter)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.google_ads.default__google_ads_extract_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450492.8112354, "supported_languages": null}, "macro.google_ads.default__google_ads_extract_url_parameter": {"name": "default__google_ads_extract_url_parameter", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/google_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/google_ads_extract_url_parameters.sql", "unique_id": "macro.google_ads.default__google_ads_extract_url_parameter", "macro_sql": "{% macro default__google_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ dbt_utils.get_url_parameter(field, url_parameter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450492.8115604, "supported_languages": null}, "macro.google_ads.spark__google_ads_extract_url_parameter": {"name": "spark__google_ads_extract_url_parameter", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/google_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/google_ads_extract_url_parameters.sql", "unique_id": "macro.google_ads.spark__google_ads_extract_url_parameter", "macro_sql": "{% macro spark__google_ads_extract_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"=([^&]+)'\" -%}\nnullif(regexp_extract({{ field }}, {{ formatted_url_parameter }}, 1), '')\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450492.8119617, "supported_languages": null}, "macro.google_ads.get_ad_history_columns": {"name": "get_ad_history_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_ad_history_columns.sql", "original_file_path": "macros/staging/get_ad_history_columns.sql", "unique_id": "macro.google_ads.get_ad_history_columns", "macro_sql": "{% macro get_ad_history_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"display_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"final_urls\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.8138657, "supported_languages": null}, "macro.google_ads.get_ad_stats_columns": {"name": "get_ad_stats_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_ad_stats_columns.sql", "original_file_path": "macros/staging/get_ad_stats_columns.sql", "unique_id": "macro.google_ads.get_ad_stats_columns", "macro_sql": "{% macro get_ad_stats_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_group\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_network_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"cost_micros\", \"datatype\": dbt.type_int()},\n {\"name\": \"customer_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"device\", \"datatype\": dbt.type_string()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"keyword_ad_group_criterion\", \"datatype\": dbt.type_string()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions_value\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_through_conversions\", \"datatype\": dbt.type_int()}\n] %}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ google_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('google_ads__ad_stats_passthrough_metrics'), except_fields=['conversions', \"conversions_value\", \"view_through_conversions\"]) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int", "macro.google_ads.google_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.8171322, "supported_languages": null}, "macro.google_ads.get_account_history_columns": {"name": "get_account_history_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_account_history_columns.sql", "original_file_path": "macros/staging/get_account_history_columns.sql", "unique_id": "macro.google_ads.get_account_history_columns", "macro_sql": "{% macro get_account_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"auto_tagging_enabled\", \"datatype\": \"boolean\"},\n {\"name\": \"currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"descriptive_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"time_zone\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.8188624, "supported_languages": null}, "macro.google_ads.get_ad_group_stats_columns": {"name": "get_ad_group_stats_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_ad_group_stats_columns.sql", "original_file_path": "macros/staging/get_ad_group_stats_columns.sql", "unique_id": "macro.google_ads.get_ad_group_stats_columns", "macro_sql": "{% macro get_ad_group_stats_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ad_network_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"cost_micros\", \"datatype\": dbt.type_int()},\n {\"name\": \"customer_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"device\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions_value\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_through_conversions\", \"datatype\": dbt.type_int()}\n] %}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ google_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('google_ads__ad_group_stats_passthrough_metrics'), except_fields=['conversions', \"conversions_value\", \"view_through_conversions\"]) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.google_ads.google_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.8220224, "supported_languages": null}, "macro.google_ads.get_campaign_bid_modifier_history_columns": {"name": "get_campaign_bid_modifier_history_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_campaign_bid_modifier_history_columns.sql", "original_file_path": "macros/staging/get_campaign_bid_modifier_history_columns.sql", "unique_id": "macro.google_ads.get_campaign_bid_modifier_history_columns", "macro_sql": "{% macro get_campaign_bid_modifier_history_columns() %}\n\n{% set columns = [\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"criterion_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"bid_modifier\", \"datatype\": dbt.type_float()},\n {\"name\": \"interaction_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"interaction_event_types\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_float", "macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.8236434, "supported_languages": null}, "macro.google_ads.google_ads_add_pass_through_columns": {"name": "google_ads_add_pass_through_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/google_ads_add_pass_through_columns.sql", "original_file_path": "macros/staging/google_ads_add_pass_through_columns.sql", "unique_id": "macro.google_ads.google_ads_add_pass_through_columns", "macro_sql": "{% macro google_ads_add_pass_through_columns(base_columns, pass_through_fields, except_fields=[]) %}\n\n{% if pass_through_fields %}\n {% for column in pass_through_fields %}\n\n {% if column is mapping %}\n {% set col_name = column.alias|default(column.name)|lower %}\n \n {% if col_name not in except_fields %}\n {% if column.alias %}\n {% do base_columns.append({ \"name\": column.name, \"alias\": column.alias, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% else %}\n {% do base_columns.append({ \"name\": column.name, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% else %}\n {% if column|lower not in except_fields %}\n {% do base_columns.append({ \"name\": column, \"datatype\": dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_columns", "type": null, "description": ""}, {"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except_fields", "type": null, "description": ""}], "created_at": 1783450492.8261237, "supported_languages": null}, "macro.google_ads.get_ad_group_criterion_history_columns": {"name": "get_ad_group_criterion_history_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_ad_group_criterion_history_columns.sql", "original_file_path": "macros/staging/get_ad_group_criterion_history_columns.sql", "unique_id": "macro.google_ads.get_ad_group_criterion_history_columns", "macro_sql": "{% macro get_ad_group_criterion_history_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"base_campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"keyword_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"keyword_text\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.8281898, "supported_languages": null}, "macro.google_ads.get_campaign_budget_history_columns": {"name": "get_campaign_budget_history_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_campaign_budget_history_columns.sql", "original_file_path": "macros/staging/get_campaign_budget_history_columns.sql", "unique_id": "macro.google_ads.get_campaign_budget_history_columns", "macro_sql": "{% macro get_campaign_budget_history_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"amount_micros\", \"datatype\": dbt.type_int()},\n {\"name\": \"delivery_method\", \"datatype\": dbt.type_string()},\n {\"name\": \"explicitly_shared\", \"datatype\": \"boolean\"},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"reference_count\", \"datatype\": dbt.type_int()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"has_recommended_budget\", \"datatype\": \"boolean\"},\n {\"name\": \"period\", \"datatype\": dbt.type_string()},\n {\"name\": \"recommended_budget_amount_micros\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_amount_micros\", \"datatype\": dbt.type_int()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.8310363, "supported_languages": null}, "macro.google_ads.get_search_term_keyword_stats_columns": {"name": "get_search_term_keyword_stats_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_search_term_keyword_stats_columns.sql", "original_file_path": "macros/staging/get_search_term_keyword_stats_columns.sql", "unique_id": "macro.google_ads.get_search_term_keyword_stats_columns", "macro_sql": "{% macro get_search_term_keyword_stats_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_float()},\n {\"name\": \"conversions_value\", \"datatype\": dbt.type_float()},\n {\"name\": \"cost_micros\", \"datatype\": dbt.type_int()},\n {\"name\": \"customer_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"info_text\", \"datatype\": dbt.type_string()},\n {\"name\": \"keyword_ad_group_criterion\", \"datatype\": dbt.type_string()},\n {\"name\": \"search_term\", \"datatype\": dbt.type_string()},\n {\"name\": \"search_term_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"view_through_conversions\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ google_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('google_ads__search_term_keyword_stats_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_float", "macro.google_ads.google_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.8344648, "supported_languages": null}, "macro.google_ads.get_campaign_stats_columns": {"name": "get_campaign_stats_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_campaign_stats_columns.sql", "original_file_path": "macros/staging/get_campaign_stats_columns.sql", "unique_id": "macro.google_ads.get_campaign_stats_columns", "macro_sql": "{% macro get_campaign_stats_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ad_network_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"cost_micros\", \"datatype\": dbt.type_int()},\n {\"name\": \"customer_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"device\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions_value\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_through_conversions\", \"datatype\": dbt.type_int()}\n] %}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ google_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('google_ads__campaign_stats_passthrough_metrics'), except_fields=['conversions', \"conversions_value\", \"view_through_conversions\"]) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.google_ads.google_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.8373835, "supported_languages": null}, "macro.google_ads.get_campaign_history_columns": {"name": "get_campaign_history_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_campaign_history_columns.sql", "original_file_path": "macros/staging/get_campaign_history_columns.sql", "unique_id": "macro.google_ads.get_campaign_history_columns", "macro_sql": "{% macro get_campaign_history_columns() %}\n\n{% set columns = [\n {\"name\": \"advertising_channel_subtype\", \"datatype\": dbt.type_string()},\n {\"name\": \"advertising_channel_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"customer_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"end_date\", \"datatype\": dbt.type_string()},\n {\"name\": \"end_date_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"serving_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"start_date\", \"datatype\": dbt.type_string()},\n {\"name\": \"start_date_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"tracking_url_template\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.8401132, "supported_languages": null}, "macro.google_ads.get_ad_group_history_columns": {"name": "get_ad_group_history_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_ad_group_history_columns.sql", "original_file_path": "macros/staging/get_ad_group_history_columns.sql", "unique_id": "macro.google_ads.get_ad_group_history_columns", "macro_sql": "{% macro get_ad_group_history_columns() %}\n\n{% set columns = [\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.8418646, "supported_languages": null}, "macro.google_ads.get_account_stats_columns": {"name": "get_account_stats_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_account_stats_columns.sql", "original_file_path": "macros/staging/get_account_stats_columns.sql", "unique_id": "macro.google_ads.get_account_stats_columns", "macro_sql": "{% macro get_account_stats_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ad_network_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"cost_micros\", \"datatype\": dbt.type_int()},\n {\"name\": \"customer_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"device\", \"datatype\": dbt.type_string()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions_value\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_through_conversions\", \"datatype\": dbt.type_int()}\n] %}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ google_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('google_ads__account_stats_passthrough_metrics'), except_fields=['conversions', \"conversions_value\", \"view_through_conversions\"]) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.google_ads.google_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.8446312, "supported_languages": null}, "macro.amazon_ads.amazon_ads_persist_pass_through_columns": {"name": "amazon_ads_persist_pass_through_columns", "resource_type": "macro", "package_name": "amazon_ads", "path": "macros/amazon_ads_persist_pass_through_columns.sql", "original_file_path": "macros/amazon_ads_persist_pass_through_columns.sql", "unique_id": "macro.amazon_ads.amazon_ads_persist_pass_through_columns", "macro_sql": "{% macro amazon_ads_persist_pass_through_columns(pass_through_variable, identifier=none, transform='', coalesce_with=none, exclude_fields=[]) %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n {% set field_name = field.alias|default(field.name)|lower if field is mapping else field %}\n {% if field_name not in exclude_fields %}\n , {{ transform ~ '(' ~ ('coalesce(' if coalesce_with is not none else '') ~ (identifier ~ '.' if identifier else '') ~ field_name ~ ((', ' ~ coalesce_with ~ ')') if coalesce_with is not none else '') ~ ')' }} as {{ field_name }}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "transform", "type": null, "description": ""}, {"name": "coalesce_with", "type": null, "description": ""}, {"name": "exclude_fields", "type": null, "description": ""}], "created_at": 1783450492.8464887, "supported_languages": null}, "macro.amazon_ads.amazon_ads_add_pass_through_columns": {"name": "amazon_ads_add_pass_through_columns", "resource_type": "macro", "package_name": "amazon_ads", "path": "macros/staging/amazon_ads_add_pass_though_columns.sql", "original_file_path": "macros/staging/amazon_ads_add_pass_though_columns.sql", "unique_id": "macro.amazon_ads.amazon_ads_add_pass_through_columns", "macro_sql": "{% macro amazon_ads_add_pass_through_columns(base_columns, pass_through_fields, except_fields=[]) %}\n\n{% if pass_through_fields %}\n {% for column in pass_through_fields %}\n \n {% if column is mapping %}\n {% set col_name = column.alias|default(column.name)|lower %}\n\n {% if col_name not in except_fields %}\n {% if column.alias %}\n {% do base_columns.append({ \"name\": column.name, \"alias\": column.alias, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% else %}\n {% do base_columns.append({ \"name\": column.name, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% else %}\n {% if column|lower not in except_fields %}\n {% do base_columns.append({ \"name\": column, \"datatype\": dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_columns", "type": null, "description": ""}, {"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except_fields", "type": null, "description": ""}], "created_at": 1783450492.8490922, "supported_languages": null}, "macro.amazon_ads.get_advertised_product_report_columns": {"name": "get_advertised_product_report_columns", "resource_type": "macro", "package_name": "amazon_ads", "path": "macros/staging/get_advertised_product_report_columns.sql", "original_file_path": "macros/staging/get_advertised_product_report_columns.sql", "unique_id": "macro.amazon_ads.get_advertised_product_report_columns", "macro_sql": "{% macro get_advertised_product_report_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"advertised_asin\", \"datatype\": dbt.type_string()},\n {\"name\": \"advertised_sku\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_budget_amount\", \"datatype\": dbt.type_float()},\n {\"name\": \"campaign_budget_currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_budget_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"cost\", \"datatype\": dbt.type_float()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"purchases_30_d\", \"datatype\": dbt.type_int()},\n {\"name\": \"sales_30_d\", \"datatype\": dbt.type_float()}\n] %}\n\n{# Add backwards compatibility if conversion metrics were added via passthrough columns prior to them being brought in by default #}\n{{ amazon_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('amazon_ads__advertised_product_passthrough_metrics'), except_fields=['purchases_30_d', 'sales_30_d']) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_float", "macro.amazon_ads.amazon_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.8521938, "supported_languages": null}, "macro.amazon_ads.get_ad_group_level_report_columns": {"name": "get_ad_group_level_report_columns", "resource_type": "macro", "package_name": "amazon_ads", "path": "macros/staging/get_ad_group_level_report_columns.sql", "original_file_path": "macros/staging/get_ad_group_level_report_columns.sql", "unique_id": "macro.amazon_ads.get_ad_group_level_report_columns", "macro_sql": "{% macro get_ad_group_level_report_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_bidding_strategy\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"cost\", \"datatype\": dbt.type_float()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"purchases_30_d\", \"datatype\": dbt.type_int()},\n {\"name\": \"sales_30_d\", \"datatype\": dbt.type_float()}\n] %}\n\n{# Add backwards compatibility if conversion metrics were added via passthrough columns prior to them being brought in by default #}\n{{ amazon_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('amazon_ads__ad_group_passthrough_metrics'), except_fields=['purchases_30_d', 'sales_30_d']) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_float", "macro.amazon_ads.amazon_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.8542612, "supported_languages": null}, "macro.amazon_ads.amazon_ads_fill_pass_through_columns": {"name": "amazon_ads_fill_pass_through_columns", "resource_type": "macro", "package_name": "amazon_ads", "path": "macros/staging/amazon_ads_fill_pass_through_columns.sql", "original_file_path": "macros/staging/amazon_ads_fill_pass_through_columns.sql", "unique_id": "macro.amazon_ads.amazon_ads_fill_pass_through_columns", "macro_sql": "{% macro amazon_ads_fill_pass_through_columns(pass_through_fields, except=[]) %}\n\n{% if pass_through_fields %}\n {% for field in pass_through_fields %}\n {% if (field.alias if field.alias else field.name) not in except %}\n {% if field.transform_sql %}\n , coalesce(cast({{ field.transform_sql }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% else %}\n , coalesce(cast({{ field.alias if field.alias else field.name }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% endif %}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}], "created_at": 1783450492.8559196, "supported_languages": null}, "macro.amazon_ads.get_search_term_ad_keyword_report_columns": {"name": "get_search_term_ad_keyword_report_columns", "resource_type": "macro", "package_name": "amazon_ads", "path": "macros/staging/get_search_term_ad_keyword_report_columns.sql", "original_file_path": "macros/staging/get_search_term_ad_keyword_report_columns.sql", "unique_id": "macro.amazon_ads.get_search_term_ad_keyword_report_columns", "macro_sql": "{% macro get_search_term_ad_keyword_report_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_keyword_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_budget_amount\", \"datatype\": dbt.type_float()},\n {\"name\": \"campaign_budget_currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_budget_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"cost\", \"datatype\": dbt.type_float()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"keyword_bid\", \"datatype\": dbt.type_float()},\n {\"name\": \"keyword_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"search_term\", \"datatype\": dbt.type_string()},\n {\"name\": \"targeting\", \"datatype\": dbt.type_string()},\n {\"name\": \"purchases_30_d\", \"datatype\": dbt.type_int()},\n {\"name\": \"sales_30_d\", \"datatype\": dbt.type_float()}\n] %}\n\n{# Add backwards compatibility if conversion metrics were added via passthrough columns prior to them being brought in by default #}\n{{ amazon_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('amazon_ads__search_term_ad_keyword_passthrough_metrics'), except_fields=['purchases_30_d', 'sales_30_d']) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_float", "macro.amazon_ads.amazon_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.8592873, "supported_languages": null}, "macro.amazon_ads.get_product_ad_history_columns": {"name": "get_product_ad_history_columns", "resource_type": "macro", "package_name": "amazon_ads", "path": "macros/staging/get_product_ad_history_columns.sql", "original_file_path": "macros/staging/get_product_ad_history_columns.sql", "unique_id": "macro.amazon_ads.get_product_ad_history_columns", "macro_sql": "{% macro get_product_ad_history_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"asin\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"creation_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_updated_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"serving_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"sku\", \"datatype\": dbt.type_string()},\n {\"name\": \"state\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.8612218, "supported_languages": null}, "macro.amazon_ads.get_portfolio_history_columns": {"name": "get_portfolio_history_columns", "resource_type": "macro", "package_name": "amazon_ads", "path": "macros/staging/get_portfolio_history_columns.sql", "original_file_path": "macros/staging/get_portfolio_history_columns.sql", "unique_id": "macro.amazon_ads.get_portfolio_history_columns", "macro_sql": "{% macro get_portfolio_history_columns() %}\n\n{% set columns = [\n {\"name\": \"budget_amount\", \"datatype\": dbt.type_float()},\n {\"name\": \"budget_currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"budget_end_date\", \"datatype\": \"date\"},\n {\"name\": \"budget_policy\", \"datatype\": dbt.type_string()},\n {\"name\": \"budget_start_date\", \"datatype\": \"date\"},\n {\"name\": \"creation_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"in_budget\", \"datatype\": \"boolean\"},\n {\"name\": \"last_updated_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"profile_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"serving_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"state\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_float", "macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.8637705, "supported_languages": null}, "macro.amazon_ads.get_campaign_level_report_columns": {"name": "get_campaign_level_report_columns", "resource_type": "macro", "package_name": "amazon_ads", "path": "macros/staging/get_campaign_level_report_columns.sql", "original_file_path": "macros/staging/get_campaign_level_report_columns.sql", "unique_id": "macro.amazon_ads.get_campaign_level_report_columns", "macro_sql": "{% macro get_campaign_level_report_columns() %}\n\n{% set columns = [\n {\"name\": \"campaign_applicable_budget_rule_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_applicable_budget_rule_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_bidding_strategy\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_budget_amount\", \"datatype\": dbt.type_float()},\n {\"name\": \"campaign_budget_currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_budget_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_rule_based_budget_amount\", \"datatype\": dbt.type_float()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"cost\", \"datatype\": dbt.type_float()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"purchases_30_d\", \"datatype\": dbt.type_int()},\n {\"name\": \"sales_30_d\", \"datatype\": dbt.type_float()}\n] %}\n\n{# Add backwards compatibility if conversion metrics were added via passthrough columns prior to them being brought in by default #}\n{{ amazon_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('amazon_ads__campaign_passthrough_metrics'), except_fields=['purchases_30_d', 'sales_30_d']) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_float", "macro.dbt.type_int", "macro.amazon_ads.amazon_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.8668473, "supported_languages": null}, "macro.amazon_ads.get_keyword_history_columns": {"name": "get_keyword_history_columns", "resource_type": "macro", "package_name": "amazon_ads", "path": "macros/staging/get_keyword_history_columns.sql", "original_file_path": "macros/staging/get_keyword_history_columns.sql", "unique_id": "macro.amazon_ads.get_keyword_history_columns", "macro_sql": "{% macro get_keyword_history_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"bid\", \"datatype\": dbt.type_float()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"creation_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"keyword_text\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_updated_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"native_language_keyword\", \"datatype\": dbt.type_string()},\n {\"name\": \"serving_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"state\", \"datatype\": dbt.type_string()},\n {\"name\": \"native_language_locale\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_float", "macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.869281, "supported_languages": null}, "macro.amazon_ads.get_targeting_keyword_report_columns": {"name": "get_targeting_keyword_report_columns", "resource_type": "macro", "package_name": "amazon_ads", "path": "macros/staging/get_targeting_keyword_report_columns.sql", "original_file_path": "macros/staging/get_targeting_keyword_report_columns.sql", "unique_id": "macro.amazon_ads.get_targeting_keyword_report_columns", "macro_sql": "{% macro get_targeting_keyword_report_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_keyword_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_budget_amount\", \"datatype\": dbt.type_float()},\n {\"name\": \"campaign_budget_currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_budget_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"cost\", \"datatype\": dbt.type_float()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"keyword_bid\", \"datatype\": dbt.type_float()},\n {\"name\": \"keyword_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"keyword_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"targeting\", \"datatype\": dbt.type_string()},\n {\"name\": \"purchases_30_d\", \"datatype\": dbt.type_int()},\n {\"name\": \"sales_30_d\", \"datatype\": dbt.type_float()}\n] %}\n\n{# Add backwards compatibility if conversion metrics were added via passthrough columns prior to them being brought in by default #}\n{{ amazon_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('amazon_ads__targeting_keyword_passthrough_metrics'), except_fields=['purchases_30_d', 'sales_30_d']) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_float", "macro.amazon_ads.amazon_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.872935, "supported_languages": null}, "macro.amazon_ads.get_profile_columns": {"name": "get_profile_columns", "resource_type": "macro", "package_name": "amazon_ads", "path": "macros/staging/get_profile_columns.sql", "original_file_path": "macros/staging/get_profile_columns.sql", "unique_id": "macro.amazon_ads.get_profile_columns", "macro_sql": "{% macro get_profile_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"account_marketplace_string_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"account_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"account_sub_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"account_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"account_valid_payment_method\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"country_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"daily_budget\", \"datatype\": dbt.type_int()},\n {\"name\": \"timezone\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_boolean"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.8753762, "supported_languages": null}, "macro.amazon_ads.get_campaign_history_columns": {"name": "get_campaign_history_columns", "resource_type": "macro", "package_name": "amazon_ads", "path": "macros/staging/get_campaign_history_columns.sql", "original_file_path": "macros/staging/get_campaign_history_columns.sql", "unique_id": "macro.amazon_ads.get_campaign_history_columns", "macro_sql": "{% macro get_campaign_history_columns() %}\n\n{% set columns = [\n {\"name\": \"bidding_strategy\", \"datatype\": dbt.type_string()},\n {\"name\": \"creation_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"end_date\", \"datatype\": \"date\"},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_updated_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"portfolio_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"profile_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"serving_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"start_date\", \"datatype\": \"date\"},\n {\"name\": \"state\", \"datatype\": dbt.type_string()},\n {\"name\": \"targeting_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"budget\", \"datatype\": dbt.type_float()},\n {\"name\": \"budget_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"effective_budget\", \"datatype\": dbt.type_float()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.8782797, "supported_languages": null}, "macro.amazon_ads.get_ad_group_history_columns": {"name": "get_ad_group_history_columns", "resource_type": "macro", "package_name": "amazon_ads", "path": "macros/staging/get_ad_group_history_columns.sql", "original_file_path": "macros/staging/get_ad_group_history_columns.sql", "unique_id": "macro.amazon_ads.get_ad_group_history_columns", "macro_sql": "{% macro get_ad_group_history_columns() %}\n\n{% set columns = [\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"creation_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"default_bid\", \"datatype\": dbt.type_float()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_updated_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"serving_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"state\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.dbt.type_float", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.8800495, "supported_languages": null}, "macro.dbt_utils.safe_add": {"name": "safe_add", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "unique_id": "macro.dbt_utils.safe_add", "macro_sql": "{%- macro safe_add(field_list) -%}\n {{ return(adapter.dispatch('safe_add', 'dbt_utils')(field_list)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__safe_add"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1783450492.8807144, "supported_languages": null}, "macro.dbt_utils.default__safe_add": {"name": "default__safe_add", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "unique_id": "macro.dbt_utils.default__safe_add", "macro_sql": "\n\n{%- macro default__safe_add(field_list) -%}\n\n{%- if field_list is not iterable or field_list is string or field_list is mapping -%}\n\n{%- set error_message = '\nWarning: the `safe_add` macro now takes a single list argument instead of \\\nstring arguments. The {}.{} model triggered this warning. \\\n'.format(model.package_name, model.name) -%}\n\n{%- do exceptions.warn(error_message) -%}\n\n{%- endif -%}\n\n{% set fields = [] %}\n\n{%- for field in field_list -%}\n\n {% do fields.append(\"coalesce(\" ~ field ~ \", 0)\") %}\n\n{%- endfor -%}\n\n{{ fields|join(' +\\n ') }}\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1783450492.8817818, "supported_languages": null}, "macro.dbt_utils.get_filtered_columns_in_relation": {"name": "get_filtered_columns_in_relation", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "unique_id": "macro.dbt_utils.get_filtered_columns_in_relation", "macro_sql": "{% macro get_filtered_columns_in_relation(from, except=[]) -%}\n {{ return(adapter.dispatch('get_filtered_columns_in_relation', 'dbt_utils')(from, except)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}], "created_at": 1783450492.8825598, "supported_languages": null}, "macro.dbt_utils.default__get_filtered_columns_in_relation": {"name": "default__get_filtered_columns_in_relation", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "unique_id": "macro.dbt_utils.default__get_filtered_columns_in_relation", "macro_sql": "{% macro default__get_filtered_columns_in_relation(from, except=[]) -%}\n {%- do dbt_utils._is_relation(from, 'get_filtered_columns_in_relation') -%}\n {%- do dbt_utils._is_ephemeral(from, 'get_filtered_columns_in_relation') -%}\n\n {# -- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n {%- if not execute -%}\n {{ return([]) }}\n {% endif %}\n\n {%- set include_cols = [] %}\n {%- set cols = adapter.get_columns_in_relation(from) -%}\n {%- set except = except | map(\"lower\") | list %}\n {%- for col in cols -%}\n {%- if col.column|lower not in except -%}\n {% do include_cols.append(col.column) %}\n {%- endif %}\n {%- endfor %}\n\n {{ return(include_cols) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}], "created_at": 1783450492.8839774, "supported_languages": null}, "macro.dbt_utils.nullcheck_table": {"name": "nullcheck_table", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "unique_id": "macro.dbt_utils.nullcheck_table", "macro_sql": "{% macro nullcheck_table(relation) %}\n {{ return(adapter.dispatch('nullcheck_table', 'dbt_utils')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.884562, "supported_languages": null}, "macro.dbt_utils.default__nullcheck_table": {"name": "default__nullcheck_table", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "unique_id": "macro.dbt_utils.default__nullcheck_table", "macro_sql": "{% macro default__nullcheck_table(relation) %}\n\n {%- do dbt_utils._is_relation(relation, 'nullcheck_table') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'nullcheck_table') -%}\n {% set cols = adapter.get_columns_in_relation(relation) %}\n\n select {{ dbt_utils.nullcheck(cols) }}\n from {{relation}}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783450492.885234, "supported_languages": null}, "macro.dbt_utils.deduplicate": {"name": "deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.deduplicate", "macro_sql": "{%- macro deduplicate(relation, partition_by, order_by) -%}\n {{ return(adapter.dispatch('deduplicate', 'dbt_utils')(relation, partition_by, order_by)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.postgres__deduplicate"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}], "created_at": 1783450492.8863053, "supported_languages": null}, "macro.dbt_utils.default__deduplicate": {"name": "default__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.default__deduplicate", "macro_sql": "\n\n{%- macro default__deduplicate(relation, partition_by, order_by) -%}\n\n with row_numbered as (\n select\n _inner.*,\n row_number() over (\n partition by {{ partition_by }}\n order by {{ order_by }}\n ) as rn\n from {{ relation }} as _inner\n )\n\n select\n distinct data.*\n from {{ relation }} as data\n {#\n -- Not all DBs will support natural joins but the ones that do include:\n -- Oracle, MySQL, SQLite, Redshift, Teradata, Materialize, Databricks\n -- Apache Spark, SingleStore, Vertica\n -- Those that do not appear to support natural joins include:\n -- SQLServer, Trino, Presto, Rockset, Athena\n #}\n natural join row_numbered\n where row_numbered.rn = 1\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}], "created_at": 1783450492.8867493, "supported_languages": null}, "macro.dbt_utils.redshift__deduplicate": {"name": "redshift__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.redshift__deduplicate", "macro_sql": "{% macro redshift__deduplicate(relation, partition_by, order_by) -%}\n\n select *\n from {{ relation }} as tt\n qualify\n row_number() over (\n partition by {{ partition_by }}\n order by {{ order_by }}\n ) = 1\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}], "created_at": 1783450492.887088, "supported_languages": null}, "macro.dbt_utils.postgres__deduplicate": {"name": "postgres__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.postgres__deduplicate", "macro_sql": "\n{%- macro postgres__deduplicate(relation, partition_by, order_by) -%}\n\n select\n distinct on ({{ partition_by }}) *\n from {{ relation }}\n order by {{ partition_by }}{{ ',' ~ order_by }}\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}], "created_at": 1783450492.8874922, "supported_languages": null}, "macro.dbt_utils.snowflake__deduplicate": {"name": "snowflake__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.snowflake__deduplicate", "macro_sql": "\n{%- macro snowflake__deduplicate(relation, partition_by, order_by) -%}\n\n select *\n from {{ relation }}\n qualify\n row_number() over (\n partition by {{ partition_by }}\n order by {{ order_by }}\n ) = 1\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}], "created_at": 1783450492.8878307, "supported_languages": null}, "macro.dbt_utils.databricks__deduplicate": {"name": "databricks__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.databricks__deduplicate", "macro_sql": "\n{%- macro databricks__deduplicate(relation, partition_by, order_by) -%}\n\n select *\n from {{ relation }}\n qualify\n row_number() over (\n partition by {{ partition_by }}\n order by {{ order_by }}\n ) = 1\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}], "created_at": 1783450492.8882673, "supported_languages": null}, "macro.dbt_utils.bigquery__deduplicate": {"name": "bigquery__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.bigquery__deduplicate", "macro_sql": "\n{%- macro bigquery__deduplicate(relation, partition_by, order_by) -%}\n\n select unique.*\n from (\n select\n array_agg (\n original\n order by {{ order_by }}\n limit 1\n )[offset(0)] unique\n from {{ relation }} original\n group by {{ partition_by }}\n )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}], "created_at": 1783450492.8886418, "supported_languages": null}, "macro.dbt_utils.get_tables_by_prefix_sql": {"name": "get_tables_by_prefix_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "unique_id": "macro.dbt_utils.get_tables_by_prefix_sql", "macro_sql": "{% macro get_tables_by_prefix_sql(schema, prefix, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_tables_by_prefix_sql', 'dbt_utils')(schema, prefix, exclude, database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783450492.8893564, "supported_languages": null}, "macro.dbt_utils.default__get_tables_by_prefix_sql": {"name": "default__get_tables_by_prefix_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "unique_id": "macro.dbt_utils.default__get_tables_by_prefix_sql", "macro_sql": "{% macro default__get_tables_by_prefix_sql(schema, prefix, exclude='', database=target.database) %}\n\n {{ dbt_utils.get_tables_by_pattern_sql(\n schema_pattern = schema,\n table_pattern = prefix ~ '%',\n exclude = exclude,\n database = database\n ) }}\n \n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783450492.88993, "supported_languages": null}, "macro.dbt_utils.get_powers_of_two": {"name": "get_powers_of_two", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "unique_id": "macro.dbt_utils.get_powers_of_two", "macro_sql": "{% macro get_powers_of_two(upper_bound) %}\n {{ return(adapter.dispatch('get_powers_of_two', 'dbt_utils')(upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1783450492.8907678, "supported_languages": null}, "macro.dbt_utils.default__get_powers_of_two": {"name": "default__get_powers_of_two", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "unique_id": "macro.dbt_utils.default__get_powers_of_two", "macro_sql": "{% macro default__get_powers_of_two(upper_bound) %}\n\n {% if upper_bound <= 0 %}\n {{ exceptions.raise_compiler_error(\"upper bound must be positive\") }}\n {% endif %}\n\n {% for _ in range(1, 100) %}\n {% if upper_bound <= 2 ** loop.index %}{{ return(loop.index) }}{% endif %}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1783450492.8915827, "supported_languages": null}, "macro.dbt_utils.generate_series": {"name": "generate_series", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "unique_id": "macro.dbt_utils.generate_series", "macro_sql": "{% macro generate_series(upper_bound) %}\n {{ return(adapter.dispatch('generate_series', 'dbt_utils')(upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__generate_series"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1783450492.891957, "supported_languages": null}, "macro.dbt_utils.default__generate_series": {"name": "default__generate_series", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "unique_id": "macro.dbt_utils.default__generate_series", "macro_sql": "{% macro default__generate_series(upper_bound) %}\n\n {% set n = dbt_utils.get_powers_of_two(upper_bound) %}\n\n with p as (\n select 0 as generated_number union all select 1\n ), unioned as (\n\n select\n\n {% for i in range(n) %}\n p{{i}}.generated_number * power(2, {{i}})\n {% if not loop.last %} + {% endif %}\n {% endfor %}\n + 1\n as generated_number\n\n from\n\n {% for i in range(n) %}\n p as p{{i}}\n {% if not loop.last %} cross join {% endif %}\n {% endfor %}\n\n )\n\n select *\n from unioned\n where generated_number <= {{upper_bound}}\n order by generated_number\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1783450492.8929715, "supported_languages": null}, "macro.dbt_utils.safe_divide": {"name": "safe_divide", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_divide.sql", "original_file_path": "macros/sql/safe_divide.sql", "unique_id": "macro.dbt_utils.safe_divide", "macro_sql": "{% macro safe_divide(numerator, denominator) -%}\n {{ return(adapter.dispatch('safe_divide', 'dbt_utils')(numerator, denominator)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__safe_divide"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "numerator", "type": null, "description": ""}, {"name": "denominator", "type": null, "description": ""}], "created_at": 1783450492.893529, "supported_languages": null}, "macro.dbt_utils.default__safe_divide": {"name": "default__safe_divide", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_divide.sql", "original_file_path": "macros/sql/safe_divide.sql", "unique_id": "macro.dbt_utils.default__safe_divide", "macro_sql": "{% macro default__safe_divide(numerator, denominator) %}\n ( {{ numerator }} ) / nullif( ( {{ denominator }} ), 0)\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "numerator", "type": null, "description": ""}, {"name": "denominator", "type": null, "description": ""}], "created_at": 1783450492.8938022, "supported_languages": null}, "macro.dbt_utils.get_query_results_as_dict": {"name": "get_query_results_as_dict", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "unique_id": "macro.dbt_utils.get_query_results_as_dict", "macro_sql": "{% macro get_query_results_as_dict(query) %}\n {{ return(adapter.dispatch('get_query_results_as_dict', 'dbt_utils')(query)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_query_results_as_dict"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "query", "type": null, "description": ""}], "created_at": 1783450492.8944583, "supported_languages": null}, "macro.dbt_utils.default__get_query_results_as_dict": {"name": "default__get_query_results_as_dict", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "unique_id": "macro.dbt_utils.default__get_query_results_as_dict", "macro_sql": "{% macro default__get_query_results_as_dict(query) %}\n\n{# This macro returns a dictionary of the form {column_name: (tuple_of_results)} #}\n\n {%- call statement('get_query_results', fetch_result=True,auto_begin=false) -%}\n\n {{ query }}\n\n {%- endcall -%}\n\n {% set sql_results={} %}\n\n {%- if execute -%}\n {% set sql_results_table = load_result('get_query_results').table.columns %}\n {% for column_name, column in sql_results_table.items() %}\n {% do sql_results.update({column_name: column.values()}) %}\n {% endfor %}\n {%- endif -%}\n\n {{ return(sql_results) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "query", "type": null, "description": ""}], "created_at": 1783450492.895621, "supported_languages": null}, "macro.dbt_utils.get_relations_by_pattern": {"name": "get_relations_by_pattern", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "unique_id": "macro.dbt_utils.get_relations_by_pattern", "macro_sql": "{% macro get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_relations_by_pattern', 'dbt_utils')(schema_pattern, table_pattern, exclude, database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783450492.8965325, "supported_languages": null}, "macro.dbt_utils.default__get_relations_by_pattern": {"name": "default__get_relations_by_pattern", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "unique_id": "macro.dbt_utils.default__get_relations_by_pattern", "macro_sql": "{% macro default__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {%- call statement('get_tables', fetch_result=True) %}\n\n {{ dbt_utils.get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude, database) }}\n\n {%- endcall -%}\n\n {%- set table_list = load_result('get_tables') -%}\n\n {%- if table_list and table_list['table'] -%}\n {%- set tbl_relations = [] -%}\n {%- for row in table_list['table'] -%}\n {%- set tbl_relation = api.Relation.create(\n database=database,\n schema=row.table_schema,\n identifier=row.table_name,\n type=row.table_type\n ) -%}\n {%- do tbl_relations.append(tbl_relation) -%}\n {%- endfor -%}\n\n {{ return(tbl_relations) }}\n {%- else -%}\n {{ return([]) }}\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783450492.8982787, "supported_languages": null}, "macro.dbt_utils.nullcheck": {"name": "nullcheck", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "unique_id": "macro.dbt_utils.nullcheck", "macro_sql": "{% macro nullcheck(cols) %}\n {{ return(adapter.dispatch('nullcheck', 'dbt_utils')(cols)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "cols", "type": null, "description": ""}], "created_at": 1783450492.8989015, "supported_languages": null}, "macro.dbt_utils.default__nullcheck": {"name": "default__nullcheck", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "unique_id": "macro.dbt_utils.default__nullcheck", "macro_sql": "{% macro default__nullcheck(cols) %}\n{%- for col in cols %}\n\n {% if col.is_string() -%}\n\n nullif({{col.name}},'') as {{col.name}}\n\n {%- else -%}\n\n {{col.name}}\n\n {%- endif -%}\n\n{%- if not loop.last -%} , {%- endif -%}\n\n{%- endfor -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "cols", "type": null, "description": ""}], "created_at": 1783450492.8995872, "supported_languages": null}, "macro.dbt_utils.get_single_value": {"name": "get_single_value", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_single_value.sql", "original_file_path": "macros/sql/get_single_value.sql", "unique_id": "macro.dbt_utils.get_single_value", "macro_sql": "{% macro get_single_value(query, default=none) %}\n {{ return(adapter.dispatch('get_single_value', 'dbt_utils')(query, default)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_single_value"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "query", "type": null, "description": ""}, {"name": "default", "type": null, "description": ""}], "created_at": 1783450492.900346, "supported_languages": null}, "macro.dbt_utils.default__get_single_value": {"name": "default__get_single_value", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_single_value.sql", "original_file_path": "macros/sql/get_single_value.sql", "unique_id": "macro.dbt_utils.default__get_single_value", "macro_sql": "{% macro default__get_single_value(query, default) %}\n\n{# This macro returns the (0, 0) record in a query, i.e. the first row of the first column #}\n\n {%- call statement('get_query_result', fetch_result=True, auto_begin=false) -%}\n\n {{ query }}\n\n {%- endcall -%}\n\n {%- if execute -%}\n\n {% set r = load_result('get_query_result').table.columns[0].values() %}\n {% if r | length == 0 %}\n {% do print('Query `' ~ query ~ '` returned no rows. Using the default value: ' ~ default) %}\n {% set sql_result = default %}\n {% else %}\n {% set sql_result = r[0] %}\n {% endif %}\n \n {%- else -%}\n \n {% set sql_result = default %}\n \n {%- endif -%}\n\n {% do return(sql_result) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "query", "type": null, "description": ""}, {"name": "default", "type": null, "description": ""}], "created_at": 1783450492.9017992, "supported_languages": null}, "macro.dbt_utils.generate_surrogate_key": {"name": "generate_surrogate_key", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_surrogate_key.sql", "original_file_path": "macros/sql/generate_surrogate_key.sql", "unique_id": "macro.dbt_utils.generate_surrogate_key", "macro_sql": "{%- macro generate_surrogate_key(field_list) -%}\n {{ return(adapter.dispatch('generate_surrogate_key', 'dbt_utils')(field_list)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__generate_surrogate_key"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1783450492.9025137, "supported_languages": null}, "macro.dbt_utils.default__generate_surrogate_key": {"name": "default__generate_surrogate_key", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_surrogate_key.sql", "original_file_path": "macros/sql/generate_surrogate_key.sql", "unique_id": "macro.dbt_utils.default__generate_surrogate_key", "macro_sql": "\n\n{%- macro default__generate_surrogate_key(field_list) -%}\n\n{%- if var('surrogate_key_treat_nulls_as_empty_strings', False) -%}\n {%- set default_null_value = \"\" -%}\n{%- else -%}\n {%- set default_null_value = '_dbt_utils_surrogate_key_null_' -%}\n{%- endif -%}\n\n{%- set fields = [] -%}\n\n{%- for field in field_list -%}\n\n {%- do fields.append(\n \"coalesce(cast(\" ~ field ~ \" as \" ~ dbt.type_string() ~ \"), '\" ~ default_null_value ~\"')\"\n ) -%}\n\n {%- if not loop.last %}\n {%- do fields.append(\"'-'\") -%}\n {%- endif -%}\n\n{%- endfor -%}\n\n{{ dbt.hash(dbt.concat(fields)) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.hash", "macro.dbt.concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1783450492.9037554, "supported_languages": null}, "macro.dbt_utils.get_intervals_between": {"name": "get_intervals_between", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "unique_id": "macro.dbt_utils.get_intervals_between", "macro_sql": "{% macro get_intervals_between(start_date, end_date, datepart) -%}\n {{ return(adapter.dispatch('get_intervals_between', 'dbt_utils')(start_date, end_date, datepart)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_intervals_between"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783450492.9046757, "supported_languages": null}, "macro.dbt_utils.default__get_intervals_between": {"name": "default__get_intervals_between", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "unique_id": "macro.dbt_utils.default__get_intervals_between", "macro_sql": "{% macro default__get_intervals_between(start_date, end_date, datepart) -%}\n {%- call statement('get_intervals_between', fetch_result=True) %}\n\n select {{ dbt.datediff(start_date, end_date, datepart) }}\n\n {%- endcall -%}\n\n {%- set value_list = load_result('get_intervals_between') -%}\n\n {%- if value_list and value_list['data'] -%}\n {%- set values = value_list['data'] | map(attribute=0) | list %}\n {{ return(values[0]) }}\n {%- else -%}\n {{ return(1) }}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783450492.905835, "supported_languages": null}, "macro.dbt_utils.date_spine": {"name": "date_spine", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "unique_id": "macro.dbt_utils.date_spine", "macro_sql": "{% macro date_spine(datepart, start_date, end_date) %}\n {{ return(adapter.dispatch('date_spine', 'dbt_utils')(datepart, start_date, end_date)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1783450492.9062872, "supported_languages": null}, "macro.dbt_utils.default__date_spine": {"name": "default__date_spine", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "unique_id": "macro.dbt_utils.default__date_spine", "macro_sql": "{% macro default__date_spine(datepart, start_date, end_date) %}\n\n\n{# call as follows:\n\ndate_spine(\n \"day\",\n \"to_date('01/01/2016', 'mm/dd/yyyy')\",\n \"dbt.dateadd(week, 1, current_date)\"\n) #}\n\n\nwith rawdata as (\n\n {{dbt_utils.generate_series(\n dbt_utils.get_intervals_between(start_date, end_date, datepart)\n )}}\n\n),\n\nall_periods as (\n\n select (\n {{\n dbt.dateadd(\n datepart,\n \"row_number() over (order by generated_number) - 1\",\n start_date\n )\n }}\n ) as date_{{datepart}}\n from rawdata\n\n),\n\nfiltered as (\n\n select *\n from all_periods\n where date_{{datepart}} <= {{ end_date }}\n\n)\n\nselect * from filtered\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.generate_series", "macro.dbt_utils.get_intervals_between", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1783450492.9069924, "supported_languages": null}, "macro.dbt_utils.get_relations_by_prefix": {"name": "get_relations_by_prefix", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "unique_id": "macro.dbt_utils.get_relations_by_prefix", "macro_sql": "{% macro get_relations_by_prefix(schema, prefix, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_relations_by_prefix', 'dbt_utils')(schema, prefix, exclude, database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_prefix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783450492.9079025, "supported_languages": null}, "macro.dbt_utils.default__get_relations_by_prefix": {"name": "default__get_relations_by_prefix", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "unique_id": "macro.dbt_utils.default__get_relations_by_prefix", "macro_sql": "{% macro default__get_relations_by_prefix(schema, prefix, exclude='', database=target.database) %}\n\n {%- call statement('get_tables', fetch_result=True) %}\n\n {{ dbt_utils.get_tables_by_prefix_sql(schema, prefix, exclude, database) }}\n\n {%- endcall -%}\n\n {%- set table_list = load_result('get_tables') -%}\n\n {%- if table_list and table_list['table'] -%}\n {%- set tbl_relations = [] -%}\n {%- for row in table_list['table'] -%}\n {%- set tbl_relation = api.Relation.create(\n database=database,\n schema=row.table_schema,\n identifier=row.table_name,\n type=row.table_type\n ) -%}\n {%- do tbl_relations.append(tbl_relation) -%}\n {%- endfor -%}\n\n {{ return(tbl_relations) }}\n {%- else -%}\n {{ return([]) }}\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783450492.909673, "supported_languages": null}, "macro.dbt_utils.union_relations": {"name": "union_relations", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "unique_id": "macro.dbt_utils.union_relations", "macro_sql": "{%- macro union_relations(relations, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation', where=none) -%}\n {{ return(adapter.dispatch('union_relations', 'dbt_utils')(relations, column_override, include, exclude, source_column_name, where)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__union_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relations", "type": null, "description": ""}, {"name": "column_override", "type": null, "description": ""}, {"name": "include", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "source_column_name", "type": null, "description": ""}, {"name": "where", "type": null, "description": ""}], "created_at": 1783450492.911703, "supported_languages": null}, "macro.dbt_utils.default__union_relations": {"name": "default__union_relations", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "unique_id": "macro.dbt_utils.default__union_relations", "macro_sql": "\n\n{%- macro default__union_relations(relations, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation', where=none) -%}\n\n {%- if exclude and include -%}\n {{ exceptions.raise_compiler_error(\"Both an exclude and include list were provided to the `union` macro. Only one is allowed\") }}\n {%- endif -%}\n\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. -#}\n {%- if not execute %}\n {{ return('') }}\n {% endif -%}\n\n {%- set column_override = column_override if column_override is not none else {} -%}\n\n {%- set relation_columns = {} -%}\n {%- set column_superset = {} -%}\n {%- set all_excludes = [] -%}\n {%- set all_includes = [] -%}\n\n {%- if exclude -%}\n {%- for exc in exclude -%}\n {%- do all_excludes.append(exc | lower) -%}\n {%- endfor -%}\n {%- endif -%}\n\n {%- if include -%}\n {%- for inc in include -%}\n {%- do all_includes.append(inc | lower) -%}\n {%- endfor -%}\n {%- endif -%}\n\n {%- for relation in relations -%}\n\n {%- do relation_columns.update({relation: []}) -%}\n\n {%- do dbt_utils._is_relation(relation, 'union_relations') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'union_relations') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) -%}\n {%- for col in cols -%}\n\n {#- If an exclude list was provided and the column is in the list, do nothing -#}\n {%- if exclude and col.column | lower in all_excludes -%}\n\n {#- If an include list was provided and the column is not in the list, do nothing -#}\n {%- elif include and col.column | lower not in all_includes -%}\n\n {#- Otherwise add the column to the column superset -#}\n {%- else -%}\n\n {#- update the list of columns in this relation -#}\n {%- do relation_columns[relation].append(col.column) -%}\n\n {%- if col.column in column_superset -%}\n\n {%- set stored = column_superset[col.column] -%}\n {%- if col.is_string() and stored.is_string() and col.string_size() > stored.string_size() -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif %}\n\n {%- else -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif -%}\n\n {%- endif -%}\n\n {%- endfor -%}\n {%- endfor -%}\n\n {%- set ordered_column_names = column_superset.keys() -%}\n {%- set dbt_command = flags.WHICH -%}\n\n\n {% if dbt_command in ['run', 'build'] %}\n {% if (include | length > 0 or exclude | length > 0) and not column_superset.keys() %}\n {%- set relations_string -%}\n {%- for relation in relations -%}\n {{ relation.name }}\n {%- if not loop.last %}, {% endif -%}\n {%- endfor -%}\n {%- endset -%}\n\n {%- set error_message -%}\n There were no columns found to union for relations {{ relations_string }}\n {%- endset -%}\n\n {{ exceptions.raise_compiler_error(error_message) }}\n {%- endif -%}\n {%- endif -%}\n\n {%- for relation in relations %}\n\n (\n select\n\n {%- if source_column_name is not none %}\n cast({{ dbt.string_literal(relation.render()) }} as {{ dbt.type_string() }}) as {{ source_column_name }},\n {%- endif %}\n\n /* No columns from any of the relations.\n This star is only output during dbt compile, and exists to keep SQLFluff happy. */\n {% if dbt_command == 'compile' and ordered_column_names|length == 0 %}\n *\n {% endif %}\n\n {% for col_name in ordered_column_names -%}\n\n {%- set col = column_superset[col_name] %}\n {%- set col_type = column_override.get(col.column, col.data_type) %}\n {%- set col_name = adapter.quote(col_name) if col_name in relation_columns[relation] else 'null' %}\n cast({{ col_name }} as {{ col_type }}) as {{ col.quoted }} {% if not loop.last %},{% endif -%}\n\n {%- endfor %}\n\n from {{ relation }}\n\n {% if where -%}\n where {{ where }}\n {%- endif %}\n )\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n\n {%- endfor -%}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.string_literal", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relations", "type": null, "description": ""}, {"name": "column_override", "type": null, "description": ""}, {"name": "include", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "source_column_name", "type": null, "description": ""}, {"name": "where", "type": null, "description": ""}], "created_at": 1783450492.918648, "supported_languages": null}, "macro.dbt_utils.get_tables_by_pattern_sql": {"name": "get_tables_by_pattern_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils.get_tables_by_pattern_sql", "macro_sql": "{% macro get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_tables_by_pattern_sql', 'dbt_utils')\n (schema_pattern, table_pattern, exclude, database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783450492.920175, "supported_languages": null}, "macro.dbt_utils.default__get_tables_by_pattern_sql": {"name": "default__get_tables_by_pattern_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils.default__get_tables_by_pattern_sql", "macro_sql": "{% macro default__get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n select distinct\n table_schema as {{ adapter.quote('table_schema') }},\n table_name as {{ adapter.quote('table_name') }},\n {{ dbt_utils.get_table_types_sql() }}\n from {{ database }}.information_schema.tables\n where table_schema ilike '{{ schema_pattern }}'\n and table_name ilike '{{ table_pattern }}'\n and table_name not ilike '{{ exclude }}'\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783450492.9209075, "supported_languages": null}, "macro.dbt_utils.redshift__get_tables_by_pattern_sql": {"name": "redshift__get_tables_by_pattern_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils.redshift__get_tables_by_pattern_sql", "macro_sql": "{% macro redshift__get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {% set sql %}\n select distinct\n table_schema as {{ adapter.quote('table_schema') }},\n table_name as {{ adapter.quote('table_name') }},\n {{ dbt_utils.get_table_types_sql() }}\n from \"{{ database }}\".\"information_schema\".\"tables\"\n where table_schema ilike '{{ schema_pattern }}'\n and table_name ilike '{{ table_pattern }}'\n and table_name not ilike '{{ exclude }}'\n union all\n select distinct\n schemaname as {{ adapter.quote('table_schema') }},\n tablename as {{ adapter.quote('table_name') }},\n 'external' as {{ adapter.quote('table_type') }}\n from svv_external_tables\n where redshift_database_name = '{{ database }}'\n and schemaname ilike '{{ schema_pattern }}'\n and table_name ilike '{{ table_pattern }}'\n and table_name not ilike '{{ exclude }}'\n {% endset %}\n\n {{ return(sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783450492.922223, "supported_languages": null}, "macro.dbt_utils.bigquery__get_tables_by_pattern_sql": {"name": "bigquery__get_tables_by_pattern_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils.bigquery__get_tables_by_pattern_sql", "macro_sql": "{% macro bigquery__get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {% if '%' in schema_pattern %}\n {% set schemata=dbt_utils._bigquery__get_matching_schemata(schema_pattern, database) %}\n {% else %}\n {% set schemata=[schema_pattern] %}\n {% endif %}\n\n {% set sql %}\n {% for schema in schemata %}\n select distinct\n table_schema,\n table_name,\n {{ dbt_utils.get_table_types_sql() }}\n\n from {{ adapter.quote(database) }}.{{ schema }}.INFORMATION_SCHEMA.TABLES\n where lower(table_name) like lower ('{{ table_pattern }}')\n and lower(table_name) not like lower ('{{ exclude }}')\n\n {% if not loop.last %} union all {% endif %}\n\n {% endfor %}\n {% endset %}\n\n {{ return(sql) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._bigquery__get_matching_schemata", "macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783450492.923627, "supported_languages": null}, "macro.dbt_utils._bigquery__get_matching_schemata": {"name": "_bigquery__get_matching_schemata", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils._bigquery__get_matching_schemata", "macro_sql": "{% macro _bigquery__get_matching_schemata(schema_pattern, database) %}\n {% if execute %}\n\n {% set sql %}\n select schema_name from {{ adapter.quote(database) }}.INFORMATION_SCHEMA.SCHEMATA\n where lower(schema_name) like lower('{{ schema_pattern }}')\n {% endset %}\n\n {% set results=run_query(sql) %}\n\n {% set schemata=results.columns['schema_name'].values() %}\n\n {{ return(schemata) }}\n\n {% else %}\n\n {{ return([]) }}\n\n {% endif %}\n\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783450492.9246516, "supported_languages": null}, "macro.dbt_utils.group_by": {"name": "group_by", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "unique_id": "macro.dbt_utils.group_by", "macro_sql": "{%- macro group_by(n) -%}\n {{ return(adapter.dispatch('group_by', 'dbt_utils')(n)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__group_by"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "n", "type": null, "description": ""}], "created_at": 1783450492.9251802, "supported_languages": null}, "macro.dbt_utils.default__group_by": {"name": "default__group_by", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "unique_id": "macro.dbt_utils.default__group_by", "macro_sql": "\n\n{%- macro default__group_by(n) -%}\n\n group by {% for i in range(1, n + 1) -%}\n {{ i }}{{ ',' if not loop.last }} \n {%- endfor -%}\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "n", "type": null, "description": ""}], "created_at": 1783450492.9256933, "supported_languages": null}, "macro.dbt_utils.get_table_types_sql": {"name": "get_table_types_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "unique_id": "macro.dbt_utils.get_table_types_sql", "macro_sql": "{%- macro get_table_types_sql() -%}\n {{ return(adapter.dispatch('get_table_types_sql', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt_utils.postgres__get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.9262843, "supported_languages": null}, "macro.dbt_utils.default__get_table_types_sql": {"name": "default__get_table_types_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "unique_id": "macro.dbt_utils.default__get_table_types_sql", "macro_sql": "{% macro default__get_table_types_sql() %}\n case table_type\n when 'BASE TABLE' then 'table'\n when 'EXTERNAL TABLE' then 'external'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as {{ adapter.quote('table_type') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.926587, "supported_languages": null}, "macro.dbt_utils.postgres__get_table_types_sql": {"name": "postgres__get_table_types_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "unique_id": "macro.dbt_utils.postgres__get_table_types_sql", "macro_sql": "{% macro postgres__get_table_types_sql() %}\n case table_type\n when 'BASE TABLE' then 'table'\n when 'FOREIGN' then 'external'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as {{ adapter.quote('table_type') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.9268577, "supported_languages": null}, "macro.dbt_utils.databricks__get_table_types_sql": {"name": "databricks__get_table_types_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "unique_id": "macro.dbt_utils.databricks__get_table_types_sql", "macro_sql": "{% macro databricks__get_table_types_sql() %}\n case table_type\n when 'MANAGED' then 'table'\n when 'BASE TABLE' then 'table'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as {{ adapter.quote('table_type') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450492.927127, "supported_languages": null}, "macro.dbt_utils.degrees_to_radians": {"name": "degrees_to_radians", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "unique_id": "macro.dbt_utils.degrees_to_radians", "macro_sql": "{% macro degrees_to_radians(degrees) -%}\n acos(-1) * {{degrees}} / 180\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "degrees", "type": null, "description": ""}], "created_at": 1783450492.9279606, "supported_languages": null}, "macro.dbt_utils.haversine_distance": {"name": "haversine_distance", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "unique_id": "macro.dbt_utils.haversine_distance", "macro_sql": "{% macro haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n {{ return(adapter.dispatch('haversine_distance', 'dbt_utils')(lat1,lon1,lat2,lon2,unit)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__haversine_distance"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "lat1", "type": null, "description": ""}, {"name": "lon1", "type": null, "description": ""}, {"name": "lat2", "type": null, "description": ""}, {"name": "lon2", "type": null, "description": ""}, {"name": "unit", "type": null, "description": ""}], "created_at": 1783450492.928513, "supported_languages": null}, "macro.dbt_utils.default__haversine_distance": {"name": "default__haversine_distance", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "unique_id": "macro.dbt_utils.default__haversine_distance", "macro_sql": "{% macro default__haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n{%- if unit == 'mi' %}\n {% set conversion_rate = 1 %}\n{% elif unit == 'km' %}\n {% set conversion_rate = 1.60934 %}\n{% else %}\n {{ exceptions.raise_compiler_error(\"unit input must be one of 'mi' or 'km'. Got \" ~ unit) }}\n{% endif %}\n\n 2 * 3961 * asin(sqrt(power((sin(radians(({{ lat2 }} - {{ lat1 }}) / 2))), 2) +\n cos(radians({{lat1}})) * cos(radians({{lat2}})) *\n power((sin(radians(({{ lon2 }} - {{ lon1 }}) / 2))), 2))) * {{ conversion_rate }}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "lat1", "type": null, "description": ""}, {"name": "lon1", "type": null, "description": ""}, {"name": "lat2", "type": null, "description": ""}, {"name": "lon2", "type": null, "description": ""}, {"name": "unit", "type": null, "description": ""}], "created_at": 1783450492.9297392, "supported_languages": null}, "macro.dbt_utils.bigquery__haversine_distance": {"name": "bigquery__haversine_distance", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "unique_id": "macro.dbt_utils.bigquery__haversine_distance", "macro_sql": "{% macro bigquery__haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n{% set radians_lat1 = dbt_utils.degrees_to_radians(lat1) %}\n{% set radians_lat2 = dbt_utils.degrees_to_radians(lat2) %}\n{% set radians_lon1 = dbt_utils.degrees_to_radians(lon1) %}\n{% set radians_lon2 = dbt_utils.degrees_to_radians(lon2) %}\n{%- if unit == 'mi' %}\n {% set conversion_rate = 1 %}\n{% elif unit == 'km' %}\n {% set conversion_rate = 1.60934 %}\n{% else %}\n {{ exceptions.raise_compiler_error(\"unit input must be one of 'mi' or 'km'. Got \" ~ unit) }}\n{% endif %}\n 2 * 3961 * asin(sqrt(power(sin(({{ radians_lat2 }} - {{ radians_lat1 }}) / 2), 2) +\n cos({{ radians_lat1 }}) * cos({{ radians_lat2 }}) *\n power(sin(({{ radians_lon2 }} - {{ radians_lon1 }}) / 2), 2))) * {{ conversion_rate }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.degrees_to_radians"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "lat1", "type": null, "description": ""}, {"name": "lon1", "type": null, "description": ""}, {"name": "lat2", "type": null, "description": ""}, {"name": "lon2", "type": null, "description": ""}, {"name": "unit", "type": null, "description": ""}], "created_at": 1783450492.9313085, "supported_languages": null}, "macro.dbt_utils.safe_subtract": {"name": "safe_subtract", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_subtract.sql", "original_file_path": "macros/sql/safe_subtract.sql", "unique_id": "macro.dbt_utils.safe_subtract", "macro_sql": "{%- macro safe_subtract(field_list) -%}\n {{ return(adapter.dispatch('safe_subtract', 'dbt_utils')(field_list)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__safe_subtract"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1783450492.9319634, "supported_languages": null}, "macro.dbt_utils.default__safe_subtract": {"name": "default__safe_subtract", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_subtract.sql", "original_file_path": "macros/sql/safe_subtract.sql", "unique_id": "macro.dbt_utils.default__safe_subtract", "macro_sql": "\n\n{%- macro default__safe_subtract(field_list) -%}\n\n{%- if field_list is not iterable or field_list is string or field_list is mapping -%}\n\n{%- set error_message = '\nWarning: the `safe_subtract` macro takes a single list argument instead of \\\nstring arguments. The {}.{} model triggered this warning. \\\n'.format(model.package_name, model.name) -%}\n\n{%- do exceptions.raise_compiler_error(error_message) -%}\n\n{%- endif -%}\n\n{% set fields = [] %}\n\n{%- for field in field_list -%}\n\n {% do fields.append(\"coalesce(\" ~ field ~ \", 0)\") %}\n\n{%- endfor -%}\n\n{{ fields|join(' -\\n ') }}\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1783450492.9330297, "supported_languages": null}, "macro.dbt_utils.get_column_values": {"name": "get_column_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "unique_id": "macro.dbt_utils.get_column_values", "macro_sql": "{% macro get_column_values(table, column, order_by='count(*) desc', max_records=none, default=none, where=none) -%}\n {{ return(adapter.dispatch('get_column_values', 'dbt_utils')(table, column, order_by, max_records, default, where)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_column_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table", "type": null, "description": ""}, {"name": "column", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}, {"name": "max_records", "type": null, "description": ""}, {"name": "default", "type": null, "description": ""}, {"name": "where", "type": null, "description": ""}], "created_at": 1783450492.9343631, "supported_languages": null}, "macro.dbt_utils.default__get_column_values": {"name": "default__get_column_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "unique_id": "macro.dbt_utils.default__get_column_values", "macro_sql": "{% macro default__get_column_values(table, column, order_by='count(*) desc', max_records=none, default=none, where=none) -%}\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n {%- if not execute -%}\n {% set default = [] if not default %}\n {{ return(default) }}\n {% endif %}\n\n {%- do dbt_utils._is_ephemeral(table, 'get_column_values') -%}\n\n {# Not all relations are tables. Renaming for internal clarity without breaking functionality for anyone using named arguments #}\n {# TODO: Change the method signature in a future 0.x.0 release #}\n {%- set target_relation = table -%}\n\n {# adapter.load_relation is a convenience wrapper to avoid building a Relation when we already have one #}\n {% set relation_exists = (load_relation(target_relation)) is not none %}\n\n {%- call statement('get_column_values', fetch_result=true) %}\n\n {%- if not relation_exists and default is none -%}\n\n {{ exceptions.raise_compiler_error(\"In get_column_values(): relation \" ~ target_relation ~ \" does not exist and no default value was provided.\") }}\n\n {%- elif not relation_exists and default is not none -%}\n\n {{ log(\"Relation \" ~ target_relation ~ \" does not exist. Returning the default value: \" ~ default) }}\n\n {{ return(default) }}\n\n {%- else -%}\n\n\n select\n {{ column }} as value\n\n from {{ target_relation }}\n\n {% if where is not none %}\n where {{ where }}\n {% endif %}\n\n group by {{ column }}\n order by {{ order_by }}\n\n {% if max_records is not none %}\n limit {{ max_records }}\n {% endif %}\n\n {% endif %}\n\n {%- endcall -%}\n\n {%- set value_list = load_result('get_column_values') -%}\n\n {%- if value_list and value_list['data'] -%}\n {%- set values = value_list['data'] | map(attribute=0) | list %}\n {{ return(values) }}\n {%- else -%}\n {{ return(default) }}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_ephemeral", "macro.dbt.load_relation", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table", "type": null, "description": ""}, {"name": "column", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}, {"name": "max_records", "type": null, "description": ""}, {"name": "default", "type": null, "description": ""}, {"name": "where", "type": null, "description": ""}], "created_at": 1783450492.9372852, "supported_languages": null}, "macro.dbt_utils.width_bucket": {"name": "width_bucket", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "unique_id": "macro.dbt_utils.width_bucket", "macro_sql": "{% macro width_bucket(expr, min_value, max_value, num_buckets) %}\n {{ return(adapter.dispatch('width_bucket', 'dbt_utils') (expr, min_value, max_value, num_buckets)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__width_bucket"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expr", "type": null, "description": ""}, {"name": "min_value", "type": null, "description": ""}, {"name": "max_value", "type": null, "description": ""}, {"name": "num_buckets", "type": null, "description": ""}], "created_at": 1783450492.9381347, "supported_languages": null}, "macro.dbt_utils.default__width_bucket": {"name": "default__width_bucket", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "unique_id": "macro.dbt_utils.default__width_bucket", "macro_sql": "{% macro default__width_bucket(expr, min_value, max_value, num_buckets) -%}\n\n {% set bin_size -%}\n (( {{ max_value }} - {{ min_value }} ) / {{ num_buckets }} )\n {%- endset %}\n (\n -- to break ties when the amount is eaxtly at the bucket egde\n case\n when\n mod(\n {{ dbt.safe_cast(expr, dbt.type_numeric() ) }},\n {{ dbt.safe_cast(bin_size, dbt.type_numeric() ) }}\n ) = 0\n then 1\n else 0\n end\n ) +\n -- Anything over max_value goes the N+1 bucket\n least(\n ceil(\n ({{ expr }} - {{ min_value }})/{{ bin_size }}\n ),\n {{ num_buckets }} + 1\n )\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.safe_cast", "macro.dbt.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expr", "type": null, "description": ""}, {"name": "min_value", "type": null, "description": ""}, {"name": "max_value", "type": null, "description": ""}, {"name": "num_buckets", "type": null, "description": ""}], "created_at": 1783450492.9390388, "supported_languages": null}, "macro.dbt_utils.snowflake__width_bucket": {"name": "snowflake__width_bucket", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "unique_id": "macro.dbt_utils.snowflake__width_bucket", "macro_sql": "{% macro snowflake__width_bucket(expr, min_value, max_value, num_buckets) %}\n width_bucket({{ expr }}, {{ min_value }}, {{ max_value }}, {{ num_buckets }} )\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expr", "type": null, "description": ""}, {"name": "min_value", "type": null, "description": ""}, {"name": "max_value", "type": null, "description": ""}, {"name": "num_buckets", "type": null, "description": ""}], "created_at": 1783450492.9394388, "supported_languages": null}, "macro.dbt_utils.star": {"name": "star", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "unique_id": "macro.dbt_utils.star", "macro_sql": "{% macro star(from, relation_alias=False, except=[], prefix='', suffix='', quote_identifiers=True, unquote_aliases=False, rename={}) -%}\r\n {{ return(adapter.dispatch('star', 'dbt_utils')(from, relation_alias, except, prefix, suffix, quote_identifiers, unquote_aliases, rename)) }}\r\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__star"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from", "type": null, "description": ""}, {"name": "relation_alias", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}, {"name": "quote_identifiers", "type": null, "description": ""}, {"name": "unquote_aliases", "type": null, "description": ""}, {"name": "rename", "type": null, "description": ""}], "created_at": 1783450492.9410324, "supported_languages": null}, "macro.dbt_utils.default__star": {"name": "default__star", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "unique_id": "macro.dbt_utils.default__star", "macro_sql": "{% macro default__star(from, relation_alias=False, except=[], prefix='', suffix='', quote_identifiers=True, unquote_aliases=False, rename={}) -%}\r\n {%- do dbt_utils._is_relation(from, 'star') -%}\r\n {%- do dbt_utils._is_ephemeral(from, 'star') -%}\r\n\r\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\r\n {%- if not execute -%}\r\n {% do return('*') %}\r\n {%- endif -%}\r\n\r\n {% set cols = dbt_utils.get_filtered_columns_in_relation(from, except) %}\r\n\r\n {%- set rename_lower = {} -%}\r\n {%- for key, val in rename.items() -%}\r\n {%- do rename_lower.update({key.lower(): val}) -%}\r\n {%- endfor -%}\r\n\r\n {%- if cols|length <= 0 -%}\r\n {% if flags.WHICH == 'compile' %}\r\n {% set response %}\r\n*\r\n/* No columns were returned. Maybe the relation doesn't exist yet\r\nor all columns were excluded. This star is only output during\r\ndbt compile, and exists to keep SQLFluff happy. */\r\n {% endset %}\r\n {% do return(response) %}\r\n {% else %}\r\n {% do return(\"/* no columns returned from star() macro */\") %}\r\n {% endif %}\r\n {%- else -%}\r\n {%- for col in cols %}\r\n {%- if relation_alias %}{{ relation_alias }}.{% else %}{%- endif -%}\r\n {%- if quote_identifiers -%}\r\n {{ adapter.quote(col)|trim }}\r\n {%- if col.lower() in rename_lower %} as {{ rename_lower[col.lower()] }}\r\n {%- elif unquote_aliases %} as {{ (prefix ~ col ~ suffix)|trim }}\r\n {%- elif prefix!='' or suffix!='' %} as {{ adapter.quote(prefix ~ col ~ suffix)|trim }}\r\n {%- endif -%}\r\n {%- else -%}\r\n {{ col|trim }}\r\n {%- if col.lower() in rename_lower %} as {{ rename_lower[col.lower()] }}\r\n {%- elif prefix!='' or suffix!='' %} as {{ (prefix ~ col ~ suffix)|trim }}\r\n {%- endif -%}\r\n {%- endif -%}\r\n {%- if not loop.last %},{{ '\\n ' }}{%- endif -%}\r\n {%- endfor -%}\r\n {% endif %}\r\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from", "type": null, "description": ""}, {"name": "relation_alias", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}, {"name": "quote_identifiers", "type": null, "description": ""}, {"name": "unquote_aliases", "type": null, "description": ""}, {"name": "rename", "type": null, "description": ""}], "created_at": 1783450492.944903, "supported_languages": null}, "macro.dbt_utils.pivot": {"name": "pivot", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "unique_id": "macro.dbt_utils.pivot", "macro_sql": "{% macro pivot(column,\n values,\n alias=True,\n agg='sum',\n cmp='=',\n prefix='',\n suffix='',\n then_value=1,\n else_value=0,\n quote_identifiers=True,\n distinct=False) %}\n {{ return(adapter.dispatch('pivot', 'dbt_utils')(column, values, alias, agg, cmp, prefix, suffix, then_value, else_value, quote_identifiers, distinct)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__pivot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}, {"name": "values", "type": null, "description": ""}, {"name": "alias", "type": null, "description": ""}, {"name": "agg", "type": null, "description": ""}, {"name": "cmp", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}, {"name": "then_value", "type": null, "description": ""}, {"name": "else_value", "type": null, "description": ""}, {"name": "quote_identifiers", "type": null, "description": ""}, {"name": "distinct", "type": null, "description": ""}], "created_at": 1783450492.946446, "supported_languages": null}, "macro.dbt_utils.default__pivot": {"name": "default__pivot", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "unique_id": "macro.dbt_utils.default__pivot", "macro_sql": "{% macro default__pivot(column,\n values,\n alias=True,\n agg='sum',\n cmp='=',\n prefix='',\n suffix='',\n then_value=1,\n else_value=0,\n quote_identifiers=True,\n distinct=False) %}\n {% for value in values %}\n {{ agg }}(\n {% if distinct %} distinct {% endif %}\n case\n when {{ column }} {{ cmp }} '{{ dbt.escape_single_quotes(value) }}'\n then {{ then_value }}\n else {{ else_value }}\n end\n )\n {% if alias %}\n {% if quote_identifiers %}\n as {{ adapter.quote(prefix ~ value ~ suffix) }}\n {% else %}\n as {{ dbt_utils.slugify(prefix ~ value ~ suffix) }}\n {% endif %}\n {% endif %}\n {% if not loop.last %},{% endif %}\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.escape_single_quotes", "macro.dbt_utils.slugify"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}, {"name": "values", "type": null, "description": ""}, {"name": "alias", "type": null, "description": ""}, {"name": "agg", "type": null, "description": ""}, {"name": "cmp", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}, {"name": "then_value", "type": null, "description": ""}, {"name": "else_value", "type": null, "description": ""}, {"name": "quote_identifiers", "type": null, "description": ""}, {"name": "distinct", "type": null, "description": ""}], "created_at": 1783450492.94807, "supported_languages": null}, "macro.dbt_utils.surrogate_key": {"name": "surrogate_key", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "unique_id": "macro.dbt_utils.surrogate_key", "macro_sql": "{%- macro surrogate_key(field_list) -%}\n {% set frustrating_jinja_feature = varargs %}\n {{ return(adapter.dispatch('surrogate_key', 'dbt_utils')(field_list, *varargs)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__surrogate_key"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1783450492.9487414, "supported_languages": null}, "macro.dbt_utils.default__surrogate_key": {"name": "default__surrogate_key", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "unique_id": "macro.dbt_utils.default__surrogate_key", "macro_sql": "\n\n{%- macro default__surrogate_key(field_list) -%}\n\n{%- set error_message = '\nWarning: `dbt_utils.surrogate_key` has been replaced by \\\n`dbt_utils.generate_surrogate_key`. The new macro treats null values \\\ndifferently to empty strings. To restore the behaviour of the original \\\nmacro, add a global variable in dbt_project.yml called \\\n`surrogate_key_treat_nulls_as_empty_strings` to your \\\ndbt_project.yml file with a value of True. \\\nThe {}.{} model triggered this warning. \\\n'.format(model.package_name, model.name) -%}\n\n{%- do exceptions.raise_compiler_error(error_message) -%}\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1783450492.949198, "supported_languages": null}, "macro.dbt_utils.unpivot": {"name": "unpivot", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "unique_id": "macro.dbt_utils.unpivot", "macro_sql": "{% macro unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value', quote_identifiers=False) -%}\n {{ return(adapter.dispatch('unpivot', 'dbt_utils')(relation, cast_to, exclude, remove, field_name, value_name, quote_identifiers)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__unpivot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "cast_to", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "remove", "type": null, "description": ""}, {"name": "field_name", "type": null, "description": ""}, {"name": "value_name", "type": null, "description": ""}, {"name": "quote_identifiers", "type": null, "description": ""}], "created_at": 1783450492.9506774, "supported_languages": null}, "macro.dbt_utils.default__unpivot": {"name": "default__unpivot", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "unique_id": "macro.dbt_utils.default__unpivot", "macro_sql": "{% macro default__unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value', quote_identifiers=False) -%}\n\n {% if not relation %}\n {{ exceptions.raise_compiler_error(\"Error: argument `relation` is required for `unpivot` macro.\") }}\n {% endif %}\n\n {%- set exclude = exclude if exclude is not none else [] %}\n {%- set remove = remove if remove is not none else [] %}\n\n {%- set include_cols = [] %}\n\n {%- set table_columns = {} %}\n\n {%- do table_columns.update({relation: []}) %}\n\n {%- do dbt_utils._is_relation(relation, 'unpivot') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'unpivot') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) %}\n\n {%- for col in cols -%}\n {%- if col.column.lower() not in remove|map('lower') and col.column.lower() not in exclude|map('lower') -%}\n {% do include_cols.append(col) %}\n {%- endif %}\n {%- endfor %}\n\n\n {%- for col in include_cols -%}\n {%- set current_col_name = adapter.quote(col.column) if quote_identifiers else col.column -%}\n select\n {%- for exclude_col in exclude %}\n {{ adapter.quote(exclude_col) if quote_identifiers else exclude_col }},\n {%- endfor %}\n\n cast('{{ col.column }}' as {{ dbt.type_string() }}) as {{ adapter.quote(field_name) if quote_identifiers else field_name }},\n cast( {% if col.data_type == 'boolean' %}\n {{ dbt.cast_bool_to_text(current_col_name) }}\n {% else %}\n {{ current_col_name }}\n {% endif %}\n as {{ cast_to }}) as {{ adapter.quote(value_name) if quote_identifiers else value_name }}\n\n from {{ relation }}\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n {%- endfor -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.type_string", "macro.dbt.cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "cast_to", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "remove", "type": null, "description": ""}, {"name": "field_name", "type": null, "description": ""}, {"name": "value_name", "type": null, "description": ""}, {"name": "quote_identifiers", "type": null, "description": ""}], "created_at": 1783450492.9546323, "supported_languages": null}, "macro.dbt_utils.test_not_null_proportion": {"name": "test_not_null_proportion", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "unique_id": "macro.dbt_utils.test_not_null_proportion", "macro_sql": "{% macro test_not_null_proportion(model, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_not_null_proportion', 'dbt_utils')(model, group_by_columns, **kwargs)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_not_null_proportion"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1783450492.9555469, "supported_languages": null}, "macro.dbt_utils.default__test_not_null_proportion": {"name": "default__test_not_null_proportion", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "unique_id": "macro.dbt_utils.default__test_not_null_proportion", "macro_sql": "{% macro default__test_not_null_proportion(model, group_by_columns) %}\n\n{% set column_name = kwargs.get('column_name', kwargs.get('arg')) %}\n{% set at_least = kwargs.get('at_least', kwargs.get('arg')) %}\n{% set at_most = kwargs.get('at_most', kwargs.get('arg', 1)) %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\nwith validation as (\n select\n {{select_gb_cols}}\n sum(case when {{ column_name }} is null then 0 else 1 end) / cast(count(*) as {{ dbt.type_numeric() }}) as not_null_proportion\n from {{ model }}\n {{groupby_gb_cols}}\n),\nvalidation_errors as (\n select\n {{select_gb_cols}}\n not_null_proportion\n from validation\n where not_null_proportion < {{ at_least }} or not_null_proportion > {{ at_most }}\n)\nselect\n *\nfrom validation_errors\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1783450492.9571676, "supported_languages": null}, "macro.dbt_utils.test_at_least_one": {"name": "test_at_least_one", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "unique_id": "macro.dbt_utils.test_at_least_one", "macro_sql": "{% test at_least_one(model, column_name, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_at_least_one', 'dbt_utils')(model, column_name, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_at_least_one"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1783450492.9580739, "supported_languages": null}, "macro.dbt_utils.default__test_at_least_one": {"name": "default__test_at_least_one", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "unique_id": "macro.dbt_utils.default__test_at_least_one", "macro_sql": "{% macro default__test_at_least_one(model, column_name, group_by_columns) %}\n\n{% set pruned_cols = [column_name] %}\n\n{% if group_by_columns|length() > 0 %}\n\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n {% set pruned_cols = group_by_columns %}\n\n {% if column_name not in pruned_cols %}\n {% do pruned_cols.append(column_name) %}\n {% endif %}\n\n{% endif %}\n\n{% set select_pruned_cols = pruned_cols|join(' ,') %}\n\nselect *\nfrom (\n with pruned_rows as (\n select\n {{ select_pruned_cols }}\n from {{ model }}\n {% if group_by_columns|length() == 0 %}\n where {{ column_name }} is not null\n limit 1\n {% endif %}\n )\n select\n {# In TSQL, subquery aggregate columns need aliases #}\n {# thus: a filler col name, 'filler_column' #}\n {{select_gb_cols}}\n count({{ column_name }}) as filler_column\n\n from pruned_rows\n\n {{groupby_gb_cols}}\n\n having count({{ column_name }}) = 0\n\n) validation_errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1783450492.9597569, "supported_languages": null}, "macro.dbt_utils.test_mutually_exclusive_ranges": {"name": "test_mutually_exclusive_ranges", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "unique_id": "macro.dbt_utils.test_mutually_exclusive_ranges", "macro_sql": "{% test mutually_exclusive_ranges(model, lower_bound_column, upper_bound_column, partition_by=None, gaps='allowed', zero_length_range_allowed=False) %}\n {{ return(adapter.dispatch('test_mutually_exclusive_ranges', 'dbt_utils')(model, lower_bound_column, upper_bound_column, partition_by, gaps, zero_length_range_allowed)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_mutually_exclusive_ranges"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "lower_bound_column", "type": null, "description": ""}, {"name": "upper_bound_column", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "gaps", "type": null, "description": ""}, {"name": "zero_length_range_allowed", "type": null, "description": ""}], "created_at": 1783450492.961253, "supported_languages": null}, "macro.dbt_utils.default__test_mutually_exclusive_ranges": {"name": "default__test_mutually_exclusive_ranges", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "unique_id": "macro.dbt_utils.default__test_mutually_exclusive_ranges", "macro_sql": "{% macro default__test_mutually_exclusive_ranges(model, lower_bound_column, upper_bound_column, partition_by=None, gaps='allowed', zero_length_range_allowed=False) %}\n{% if gaps == 'not_allowed' %}\n {% set allow_gaps_operator='=' %}\n {% set allow_gaps_operator_in_words='equal_to' %}\n{% elif gaps == 'allowed' %}\n {% set allow_gaps_operator='<=' %}\n {% set allow_gaps_operator_in_words='less_than_or_equal_to' %}\n{% elif gaps == 'required' %}\n {% set allow_gaps_operator='<' %}\n {% set allow_gaps_operator_in_words='less_than' %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`gaps` argument for mutually_exclusive_ranges test must be one of ['not_allowed', 'allowed', 'required'] Got: '\" ~ gaps ~\"'.'\"\n ) }}\n{% endif %}\n{% if not zero_length_range_allowed %}\n {% set allow_zero_length_operator='<' %}\n {% set allow_zero_length_operator_in_words='less_than' %}\n{% elif zero_length_range_allowed %}\n {% set allow_zero_length_operator='<=' %}\n {% set allow_zero_length_operator_in_words='less_than_or_equal_to' %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`zero_length_range_allowed` argument for mutually_exclusive_ranges test must be one of [true, false] Got: '\" ~ zero_length_range_allowed ~\"'.'\"\n ) }}\n{% endif %}\n\n{% set partition_clause=\"partition by \" ~ partition_by if partition_by else '' %}\n\nwith window_functions as (\n\n select\n {% if partition_by %}\n {{ partition_by }} as partition_by_col,\n {% endif %}\n {{ lower_bound_column }} as lower_bound,\n {{ upper_bound_column }} as upper_bound,\n\n lead({{ lower_bound_column }}) over (\n {{ partition_clause }}\n order by {{ lower_bound_column }}, {{ upper_bound_column }}\n ) as next_lower_bound,\n\n row_number() over (\n {{ partition_clause }}\n order by {{ lower_bound_column }} desc, {{ upper_bound_column }} desc\n ) = 1 as is_last_record\n\n from {{ model }}\n\n),\n\ncalc as (\n -- We want to return records where one of our assumptions fails, so we'll use\n -- the `not` function with `and` statements so we can write our assumptions more cleanly\n select\n *,\n\n -- For each record: lower_bound should be < upper_bound.\n -- Coalesce it to return an error on the null case (implicit assumption\n -- these columns are not_null)\n coalesce(\n lower_bound {{ allow_zero_length_operator }} upper_bound,\n false\n ) as lower_bound_{{ allow_zero_length_operator_in_words }}_upper_bound,\n\n -- For each record: upper_bound {{ allow_gaps_operator }} the next lower_bound.\n -- Coalesce it to handle null cases for the last record.\n coalesce(\n upper_bound {{ allow_gaps_operator }} next_lower_bound,\n is_last_record,\n false\n ) as upper_bound_{{ allow_gaps_operator_in_words }}_next_lower_bound\n\n from window_functions\n\n),\n\nvalidation_errors as (\n\n select\n *\n from calc\n\n where not(\n -- THE FOLLOWING SHOULD BE TRUE --\n lower_bound_{{ allow_zero_length_operator_in_words }}_upper_bound\n and upper_bound_{{ allow_gaps_operator_in_words }}_next_lower_bound\n )\n)\n\nselect * from validation_errors\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "lower_bound_column", "type": null, "description": ""}, {"name": "upper_bound_column", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "gaps", "type": null, "description": ""}, {"name": "zero_length_range_allowed", "type": null, "description": ""}], "created_at": 1783450492.9642239, "supported_languages": null}, "macro.dbt_utils.test_expression_is_true": {"name": "test_expression_is_true", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "unique_id": "macro.dbt_utils.test_expression_is_true", "macro_sql": "{% test expression_is_true(model, expression, column_name=None) %}\n {{ return(adapter.dispatch('test_expression_is_true', 'dbt_utils')(model, expression, column_name)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "expression", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}], "created_at": 1783450492.9649558, "supported_languages": null}, "macro.dbt_utils.default__test_expression_is_true": {"name": "default__test_expression_is_true", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "unique_id": "macro.dbt_utils.default__test_expression_is_true", "macro_sql": "{% macro default__test_expression_is_true(model, expression, column_name) %}\n\n{% set column_list = '*' if should_store_failures() else \"1\" %}\n\nselect\n {{ column_list }}\nfrom {{ model }}\n{% if column_name is none %}\nwhere not({{ expression }})\n{%- else %}\nwhere not({{ column_name }} {{ expression }})\n{%- endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.should_store_failures"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "expression", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}], "created_at": 1783450492.9656928, "supported_languages": null}, "macro.dbt_utils.test_not_accepted_values": {"name": "test_not_accepted_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "unique_id": "macro.dbt_utils.test_not_accepted_values", "macro_sql": "{% test not_accepted_values(model, column_name, values, quote=True) %}\n {{ return(adapter.dispatch('test_not_accepted_values', 'dbt_utils')(model, column_name, values, quote)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_not_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "values", "type": null, "description": ""}, {"name": "quote", "type": null, "description": ""}], "created_at": 1783450492.9664836, "supported_languages": null}, "macro.dbt_utils.default__test_not_accepted_values": {"name": "default__test_not_accepted_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "unique_id": "macro.dbt_utils.default__test_not_accepted_values", "macro_sql": "{% macro default__test_not_accepted_values(model, column_name, values, quote=True) %}\nwith all_values as (\n\n select distinct\n {{ column_name }} as value_field\n\n from {{ model }}\n\n),\n\nvalidation_errors as (\n\n select\n value_field\n\n from all_values\n where value_field in (\n {% for value in values -%}\n {% if quote -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif -%}\n {%- if not loop.last -%},{%- endif %}\n {%- endfor %}\n )\n\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "values", "type": null, "description": ""}, {"name": "quote", "type": null, "description": ""}], "created_at": 1783450492.967229, "supported_languages": null}, "macro.dbt_utils.test_relationships_where": {"name": "test_relationships_where", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "unique_id": "macro.dbt_utils.test_relationships_where", "macro_sql": "{% test relationships_where(model, column_name, to, field, from_condition=\"1=1\", to_condition=\"1=1\") %}\n {{ return(adapter.dispatch('test_relationships_where', 'dbt_utils')(model, column_name, to, field, from_condition, to_condition)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_relationships_where"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "to", "type": null, "description": ""}, {"name": "field", "type": null, "description": ""}, {"name": "from_condition", "type": null, "description": ""}, {"name": "to_condition", "type": null, "description": ""}], "created_at": 1783450492.9681184, "supported_languages": null}, "macro.dbt_utils.default__test_relationships_where": {"name": "default__test_relationships_where", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "unique_id": "macro.dbt_utils.default__test_relationships_where", "macro_sql": "{% macro default__test_relationships_where(model, column_name, to, field, from_condition=\"1=1\", to_condition=\"1=1\") %}\n\n{# T-SQL has no boolean data type so we use 1=1 which returns TRUE #}\n{# ref https://stackoverflow.com/a/7170753/3842610 #}\n\nwith left_table as (\n\n select\n {{column_name}} as id\n\n from {{model}}\n\n where {{column_name}} is not null\n and {{from_condition}}\n\n),\n\nright_table as (\n\n select\n {{field}} as id\n\n from {{to}}\n\n where {{field}} is not null\n and {{to_condition}}\n\n),\n\nexceptions as (\n\n select\n left_table.id,\n right_table.id as right_id\n\n from left_table\n\n left join right_table\n on left_table.id = right_table.id\n\n where right_table.id is null\n\n)\n\nselect * from exceptions\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "to", "type": null, "description": ""}, {"name": "field", "type": null, "description": ""}, {"name": "from_condition", "type": null, "description": ""}, {"name": "to_condition", "type": null, "description": ""}], "created_at": 1783450492.9687953, "supported_languages": null}, "macro.dbt_utils.test_fewer_rows_than": {"name": "test_fewer_rows_than", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "unique_id": "macro.dbt_utils.test_fewer_rows_than", "macro_sql": "{% test fewer_rows_than(model, compare_model, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_fewer_rows_than', 'dbt_utils')(model, compare_model, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_fewer_rows_than"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "compare_model", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1783450492.9698467, "supported_languages": null}, "macro.dbt_utils.default__test_fewer_rows_than": {"name": "default__test_fewer_rows_than", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "unique_id": "macro.dbt_utils.default__test_fewer_rows_than", "macro_sql": "{% macro default__test_fewer_rows_than(model, compare_model, group_by_columns) %}\n\n{{ config(fail_calc = 'sum(coalesce(row_count_delta, 0))') }}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set join_gb_cols %}\n {% for c in group_by_columns %}\n and a.{{c}} = b.{{c}}\n {% endfor %}\n {% endset %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n{#-- We must add a fake join key in case additional grouping variables are not provided --#}\n{#-- Redshift does not allow for dynamically created join conditions (e.g. full join on 1 = 1 --#}\n{#-- The same logic is used in equal_rowcount. In case of changes, maintain consistent logic --#}\n{% set group_by_columns = ['id_dbtutils_test_fewer_rows_than'] + group_by_columns %}\n{% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n\n\nwith a as (\n\n select \n {{select_gb_cols}}\n 1 as id_dbtutils_test_fewer_rows_than,\n count(*) as count_our_model \n from {{ model }}\n {{ groupby_gb_cols }}\n\n),\nb as (\n\n select \n {{select_gb_cols}}\n 1 as id_dbtutils_test_fewer_rows_than,\n count(*) as count_comparison_model \n from {{ compare_model }}\n {{ groupby_gb_cols }}\n\n),\ncounts as (\n\n select\n\n {% for c in group_by_columns -%}\n a.{{c}} as {{c}}_a,\n b.{{c}} as {{c}}_b,\n {% endfor %}\n\n count_our_model,\n count_comparison_model\n from a\n full join b on \n a.id_dbtutils_test_fewer_rows_than = b.id_dbtutils_test_fewer_rows_than\n {{ join_gb_cols }}\n\n),\nfinal as (\n\n select *,\n case\n -- fail the test if we have more rows than the reference model and return the row count delta\n when count_our_model > count_comparison_model then (count_our_model - count_comparison_model)\n -- fail the test if they are the same number\n when count_our_model = count_comparison_model then 1\n -- pass the test if the delta is positive (i.e. return the number 0)\n else 0\n end as row_count_delta\n from counts\n\n)\n\nselect * from final\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "compare_model", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1783450492.9719424, "supported_languages": null}, "macro.dbt_utils.test_equal_rowcount": {"name": "test_equal_rowcount", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "unique_id": "macro.dbt_utils.test_equal_rowcount", "macro_sql": "{% test equal_rowcount(model, compare_model, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_equal_rowcount', 'dbt_utils')(model, compare_model, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_equal_rowcount"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "compare_model", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1783450492.9730556, "supported_languages": null}, "macro.dbt_utils.default__test_equal_rowcount": {"name": "default__test_equal_rowcount", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "unique_id": "macro.dbt_utils.default__test_equal_rowcount", "macro_sql": "{% macro default__test_equal_rowcount(model, compare_model, group_by_columns) %}\n\n{#-- Needs to be set at parse time, before we return '' below --#}\n{{ config(fail_calc = 'sum(coalesce(diff_count, 0))') }}\n\n{#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n{%- if not execute -%}\n {{ return('') }}\n{% endif %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(', ') + ', ' %}\n {% set join_gb_cols %}\n {% for c in group_by_columns %}\n and a.{{c}} = b.{{c}}\n {% endfor %}\n {% endset %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n{#-- We must add a fake join key in case additional grouping variables are not provided --#}\n{#-- Redshift does not allow for dynamically created join conditions (e.g. full join on 1 = 1 --#}\n{#-- The same logic is used in fewer_rows_than. In case of changes, maintain consistent logic --#}\n{% set group_by_columns = ['id_dbtutils_test_equal_rowcount'] + group_by_columns %}\n{% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n\nwith a as (\n\n select \n {{select_gb_cols}}\n 1 as id_dbtutils_test_equal_rowcount,\n count(*) as count_a \n from {{ model }}\n {{groupby_gb_cols}}\n\n\n),\nb as (\n\n select \n {{select_gb_cols}}\n 1 as id_dbtutils_test_equal_rowcount,\n count(*) as count_b \n from {{ compare_model }}\n {{groupby_gb_cols}}\n\n),\nfinal as (\n\n select\n \n {% for c in group_by_columns -%}\n a.{{c}} as {{c}}_a,\n b.{{c}} as {{c}}_b,\n {% endfor %}\n\n count_a,\n count_b,\n abs(count_a - count_b) as diff_count\n\n from a\n full join b\n on\n a.id_dbtutils_test_equal_rowcount = b.id_dbtutils_test_equal_rowcount\n {{join_gb_cols}}\n\n\n)\n\nselect * from final\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "compare_model", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1783450492.9751682, "supported_languages": null}, "macro.dbt_utils.test_not_empty_string": {"name": "test_not_empty_string", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_empty_string.sql", "original_file_path": "macros/generic_tests/not_empty_string.sql", "unique_id": "macro.dbt_utils.test_not_empty_string", "macro_sql": "{% test not_empty_string(model, column_name, trim_whitespace=true) %}\n\n {{ return(adapter.dispatch('test_not_empty_string', 'dbt_utils')(model, column_name, trim_whitespace)) }}\n\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_not_empty_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "trim_whitespace", "type": null, "description": ""}], "created_at": 1783450492.9759068, "supported_languages": null}, "macro.dbt_utils.default__test_not_empty_string": {"name": "default__test_not_empty_string", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_empty_string.sql", "original_file_path": "macros/generic_tests/not_empty_string.sql", "unique_id": "macro.dbt_utils.default__test_not_empty_string", "macro_sql": "{% macro default__test_not_empty_string(model, column_name, trim_whitespace=true) %}\n\n with\n \n all_values as (\n\n select \n\n\n {% if trim_whitespace == true -%}\n\n trim({{ column_name }}) as {{ column_name }}\n\n {%- else -%}\n\n {{ column_name }}\n\n {%- endif %}\n \n from {{ model }}\n\n ),\n\n errors as (\n\n select * from all_values\n where {{ column_name }} = ''\n\n )\n\n select * from errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "trim_whitespace", "type": null, "description": ""}], "created_at": 1783450492.9765208, "supported_languages": null}, "macro.dbt_utils.test_cardinality_equality": {"name": "test_cardinality_equality", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "unique_id": "macro.dbt_utils.test_cardinality_equality", "macro_sql": "{% test cardinality_equality(model, column_name, to, field) %}\n {{ return(adapter.dispatch('test_cardinality_equality', 'dbt_utils')(model, column_name, to, field)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_cardinality_equality"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "to", "type": null, "description": ""}, {"name": "field", "type": null, "description": ""}], "created_at": 1783450492.9772344, "supported_languages": null}, "macro.dbt_utils.default__test_cardinality_equality": {"name": "default__test_cardinality_equality", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "unique_id": "macro.dbt_utils.default__test_cardinality_equality", "macro_sql": "{% macro default__test_cardinality_equality(model, column_name, to, field) %}\n\n{# T-SQL does not let you use numbers as aliases for columns #}\n{# Thus, no \"GROUP BY 1\" #}\n\nwith table_a as (\nselect\n {{ column_name }},\n count(*) as num_rows\nfrom {{ model }}\ngroup by {{ column_name }}\n),\n\ntable_b as (\nselect\n {{ field }},\n count(*) as num_rows\nfrom {{ to }}\ngroup by {{ field }}\n),\n\nexcept_a as (\n select *\n from table_a\n {{ dbt.except() }}\n select *\n from table_b\n),\n\nexcept_b as (\n select *\n from table_b\n {{ dbt.except() }}\n select *\n from table_a\n),\n\nunioned as (\n select *\n from except_a\n union all\n select *\n from except_b\n)\n\nselect *\nfrom unioned\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "to", "type": null, "description": ""}, {"name": "field", "type": null, "description": ""}], "created_at": 1783450492.9779248, "supported_languages": null}, "macro.dbt_utils.test_sequential_values": {"name": "test_sequential_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "unique_id": "macro.dbt_utils.test_sequential_values", "macro_sql": "{% test sequential_values(model, column_name, interval=1, datepart=None, group_by_columns = []) %}\n\n {{ return(adapter.dispatch('test_sequential_values', 'dbt_utils')(model, column_name, interval, datepart, group_by_columns)) }}\n\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_sequential_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1783450492.9789426, "supported_languages": null}, "macro.dbt_utils.default__test_sequential_values": {"name": "default__test_sequential_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "unique_id": "macro.dbt_utils.default__test_sequential_values", "macro_sql": "{% macro default__test_sequential_values(model, column_name, interval=1, datepart=None, group_by_columns = []) %}\n\n{% set previous_column_name = \"previous_\" ~ dbt_utils.slugify(column_name) %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(',') + ', ' %}\n {% set partition_gb_cols = 'partition by ' + group_by_columns|join(',') %}\n{% endif %}\n\nwith windowed as (\n\n select\n {{ select_gb_cols }}\n {{ column_name }},\n lag({{ column_name }}) over (\n {{partition_gb_cols}}\n order by {{ column_name }}\n ) as {{ previous_column_name }}\n from {{ model }}\n),\n\nvalidation_errors as (\n select\n *\n from windowed\n {% if datepart %}\n where not(cast({{ column_name }} as {{ dbt.type_timestamp() }})= cast({{ dbt.dateadd(datepart, interval, previous_column_name) }} as {{ dbt.type_timestamp() }}))\n {% else %}\n where not({{ column_name }} = {{ previous_column_name }} + {{ interval }})\n {% endif %}\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.slugify", "macro.dbt.type_timestamp", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1783450492.9807253, "supported_languages": null}, "macro.dbt_utils.test_recency": {"name": "test_recency", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "unique_id": "macro.dbt_utils.test_recency", "macro_sql": "{% test recency(model, field, datepart, interval, ignore_time_component=False, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_recency', 'dbt_utils')(model, field, datepart, interval, ignore_time_component, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_recency"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "field", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "ignore_time_component", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1783450492.9817743, "supported_languages": null}, "macro.dbt_utils.default__test_recency": {"name": "default__test_recency", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "unique_id": "macro.dbt_utils.default__test_recency", "macro_sql": "{% macro default__test_recency(model, field, datepart, interval, ignore_time_component, group_by_columns) %}\n\n{% set empty_invocation = flags.EMPTY is defined and flags.EMPTY %}\n\n{% set threshold = 'cast(' ~ dbt.dateadd(datepart, interval * -1, dbt.current_timestamp()) ~ ' as ' ~ ('date' if ignore_time_component else dbt.type_timestamp()) ~ ')' %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n\nwith recency as (\n\n select \n\n {{ select_gb_cols }}\n {% if ignore_time_component %}\n cast(max({{ field }}) as date) as most_recent\n {%- else %}\n max({{ field }}) as most_recent\n {%- endif %}\n\n from {{ model }}\n\n {{ groupby_gb_cols }}\n\n)\n\nselect\n\n {{ select_gb_cols }}\n most_recent,\n {{ threshold }} as threshold\n\nfrom recency\nwhere most_recent < {{ threshold }}\n{%- if not empty_invocation %}\n or most_recent is null\n{%- endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.current_timestamp", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "field", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "ignore_time_component", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1783450492.9837353, "supported_languages": null}, "macro.dbt_utils.test_equality": {"name": "test_equality", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "unique_id": "macro.dbt_utils.test_equality", "macro_sql": "{% test equality(model, compare_model, compare_columns=None, exclude_columns=None, precision = None) %}\n {{ return(adapter.dispatch('test_equality', 'dbt_utils')(model, compare_model, compare_columns, exclude_columns, precision)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_equality"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "compare_model", "type": null, "description": ""}, {"name": "compare_columns", "type": null, "description": ""}, {"name": "exclude_columns", "type": null, "description": ""}, {"name": "precision", "type": null, "description": ""}], "created_at": 1783450492.9858835, "supported_languages": null}, "macro.dbt_utils.default__test_equality": {"name": "default__test_equality", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "unique_id": "macro.dbt_utils.default__test_equality", "macro_sql": "{% macro default__test_equality(model, compare_model, compare_columns=None, exclude_columns=None, precision = None) %}\n\n{%- if compare_columns and exclude_columns -%}\n {{ exceptions.raise_compiler_error(\"Both a compare and an ignore list were provided to the `equality` macro. Only one is allowed\") }}\n{%- endif -%}\n\n{% set set_diff %}\n count(*) + coalesce(abs(\n sum(case when which_diff = 'a_minus_b' then 1 else 0 end) -\n sum(case when which_diff = 'b_minus_a' then 1 else 0 end)\n ), 0)\n{% endset %}\n\n{#-- Needs to be set at parse time, before we return '' below --#}\n{{ config(fail_calc = set_diff) }}\n\n{#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n{%- if not execute -%}\n {{ return('') }}\n{% endif %}\n\n\n\n-- setup\n{%- do dbt_utils._is_relation(model, 'test_equality') -%}\n\n{# Ensure there are no extra columns in the compare_model vs model #}\n{%- if not compare_columns -%}\n {%- do dbt_utils._is_ephemeral(model, 'test_equality') -%}\n {%- do dbt_utils._is_ephemeral(compare_model, 'test_equality') -%}\n\n {%- set model_columns = adapter.get_columns_in_relation(model) -%}\n {%- set compare_model_columns = adapter.get_columns_in_relation(compare_model) -%}\n\n\n {%- if exclude_columns -%}\n {#-- Lower case ignore columns for easier comparison --#}\n {%- set exclude_columns = exclude_columns | map(\"lower\") | list %}\n\n {# Filter out the excluded columns #}\n {%- set include_columns = [] %}\n {%- set include_model_columns = [] %}\n {%- for column in model_columns -%}\n {%- if column.name | lower not in exclude_columns -%}\n {% do include_columns.append(column) %}\n {%- endif %}\n {%- endfor %}\n {%- for column in compare_model_columns -%}\n {%- if column.name | lower not in exclude_columns -%}\n {% do include_model_columns.append(column) %}\n {%- endif %}\n {%- endfor %}\n\n {%- set compare_columns_set = set(include_columns | map(attribute='quoted') | map(\"lower\")) %}\n {%- set compare_model_columns_set = set(include_model_columns | map(attribute='quoted') | map(\"lower\")) %}\n {%- else -%}\n {%- set compare_columns_set = set(model_columns | map(attribute='quoted') | map(\"lower\")) %}\n {%- set compare_model_columns_set = set(compare_model_columns | map(attribute='quoted') | map(\"lower\")) %}\n {%- endif -%}\n\n {% if compare_columns_set != compare_model_columns_set %}\n {{ exceptions.raise_compiler_error(compare_model ~\" has less columns than \" ~ model ~ \", please ensure they have the same columns or use the `compare_columns` or `exclude_columns` arguments to subset them.\") }}\n {% endif %}\n\n\n{% endif %}\n\n{%- if not precision -%}\n {%- if not compare_columns -%}\n {# \n You cannot get the columns in an ephemeral model (due to not existing in the information schema),\n so if the user does not provide an explicit list of columns we must error in the case it is ephemeral\n #}\n {%- do dbt_utils._is_ephemeral(model, 'test_equality') -%}\n {%- set compare_columns = adapter.get_columns_in_relation(model)-%}\n\n {%- if exclude_columns -%}\n {#-- Lower case ignore columns for easier comparison --#}\n {%- set exclude_columns = exclude_columns | map(\"lower\") | list %}\n\n {# Filter out the excluded columns #}\n {%- set include_columns = [] %}\n {%- for column in compare_columns -%}\n {%- if column.name | lower not in exclude_columns -%}\n {% do include_columns.append(column) %}\n {%- endif %}\n {%- endfor %}\n\n {%- set compare_columns = include_columns | map(attribute='quoted') %}\n {%- else -%} {# Compare columns provided #}\n {%- set compare_columns = compare_columns | map(attribute='quoted') %}\n {%- endif -%}\n {%- endif -%}\n\n {% set compare_cols_csv = compare_columns | join(', ') %}\n\n{% else %} {# Precision required #}\n {#-\n If rounding is required, we need to get the types, so it cannot be ephemeral even if they provide column names\n -#}\n {%- do dbt_utils._is_ephemeral(model, 'test_equality') -%}\n {%- set columns = adapter.get_columns_in_relation(model) -%}\n\n {% set columns_list = [] %}\n {%- for col in columns -%}\n {%- if (\n (col.name|lower in compare_columns|map('lower') or not compare_columns) and\n (col.name|lower not in exclude_columns|map('lower') or not exclude_columns)\n ) -%}\n {# Databricks double type is not picked up by any number type checks in dbt #}\n {%- if col.is_float() or col.is_numeric() or col.data_type == 'double' -%}\n {# Cast is required due to postgres not having round for a double precision number #}\n {%- do columns_list.append('round(cast(' ~ col.quoted ~ ' as ' ~ dbt.type_numeric() ~ '),' ~ precision ~ ') as ' ~ col.quoted) -%}\n {%- else -%} {# Non-numeric type #}\n {%- do columns_list.append(col.quoted) -%}\n {%- endif -%}\n {% endif %}\n {%- endfor -%}\n\n {% set compare_cols_csv = columns_list | join(', ') %}\n\n{% endif %}\n\nwith a as (\n\n select * from {{ model }}\n\n),\n\nb as (\n\n select * from {{ compare_model }}\n\n),\n\na_minus_b as (\n\n select {{compare_cols_csv}} from a\n {{ dbt.except() }}\n select {{compare_cols_csv}} from b\n\n),\n\nb_minus_a as (\n\n select {{compare_cols_csv}} from b\n {{ dbt.except() }}\n select {{compare_cols_csv}} from a\n\n),\n\nunioned as (\n\n select 'a_minus_b' as which_diff, a_minus_b.* from a_minus_b\n union all\n select 'b_minus_a' as which_diff, b_minus_a.* from b_minus_a\n\n)\n\nselect * from unioned\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.type_numeric", "macro.dbt.except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "compare_model", "type": null, "description": ""}, {"name": "compare_columns", "type": null, "description": ""}, {"name": "exclude_columns", "type": null, "description": ""}, {"name": "precision", "type": null, "description": ""}], "created_at": 1783450492.9936664, "supported_languages": null}, "macro.dbt_utils.test_unique_combination_of_columns": {"name": "test_unique_combination_of_columns", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "unique_id": "macro.dbt_utils.test_unique_combination_of_columns", "macro_sql": "{% test unique_combination_of_columns(model, combination_of_columns, quote_columns=false) %}\n {{ return(adapter.dispatch('test_unique_combination_of_columns', 'dbt_utils')(model, combination_of_columns, quote_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_unique_combination_of_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "combination_of_columns", "type": null, "description": ""}, {"name": "quote_columns", "type": null, "description": ""}], "created_at": 1783450492.994554, "supported_languages": null}, "macro.dbt_utils.default__test_unique_combination_of_columns": {"name": "default__test_unique_combination_of_columns", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "unique_id": "macro.dbt_utils.default__test_unique_combination_of_columns", "macro_sql": "{% macro default__test_unique_combination_of_columns(model, combination_of_columns, quote_columns=false) %}\n\n{% if not quote_columns %}\n {%- set column_list=combination_of_columns %}\n{% elif quote_columns %}\n {%- set column_list=[] %}\n {% for column in combination_of_columns -%}\n {% do column_list.append( adapter.quote(column) ) %}\n {%- endfor %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`quote_columns` argument for unique_combination_of_columns test must be one of [True, False] Got: '\" ~ quote ~\"'.'\"\n ) }}\n{% endif %}\n\n{%- set columns_csv=column_list | join(', ') %}\n\n\nwith validation_errors as (\n\n select\n {{ columns_csv }}\n from {{ model }}\n group by {{ columns_csv }}\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "combination_of_columns", "type": null, "description": ""}, {"name": "quote_columns", "type": null, "description": ""}], "created_at": 1783450492.9958353, "supported_languages": null}, "macro.dbt_utils.test_accepted_range": {"name": "test_accepted_range", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "unique_id": "macro.dbt_utils.test_accepted_range", "macro_sql": "{% test accepted_range(model, column_name, min_value=none, max_value=none, inclusive=true) %}\n {{ return(adapter.dispatch('test_accepted_range', 'dbt_utils')(model, column_name, min_value, max_value, inclusive)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_accepted_range"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "min_value", "type": null, "description": ""}, {"name": "max_value", "type": null, "description": ""}, {"name": "inclusive", "type": null, "description": ""}], "created_at": 1783450492.9967446, "supported_languages": null}, "macro.dbt_utils.default__test_accepted_range": {"name": "default__test_accepted_range", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "unique_id": "macro.dbt_utils.default__test_accepted_range", "macro_sql": "{% macro default__test_accepted_range(model, column_name, min_value=none, max_value=none, inclusive=true) %}\n\nwith meet_condition as(\n select *\n from {{ model }}\n),\n\nvalidation_errors as (\n select *\n from meet_condition\n where\n -- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds\n 1 = 2\n\n {%- if min_value is not none %}\n -- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule.\n or not {{ column_name }} > {{- \"=\" if inclusive }} {{ min_value }}\n {%- endif %}\n\n {%- if max_value is not none %}\n -- records with a value <= max_value are permitted. The `not` flips this to find records that don't meet the rule.\n or not {{ column_name }} < {{- \"=\" if inclusive }} {{ max_value }}\n {%- endif %}\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "min_value", "type": null, "description": ""}, {"name": "max_value", "type": null, "description": ""}, {"name": "inclusive", "type": null, "description": ""}], "created_at": 1783450492.9976764, "supported_languages": null}, "macro.dbt_utils.test_not_constant": {"name": "test_not_constant", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "unique_id": "macro.dbt_utils.test_not_constant", "macro_sql": "{% test not_constant(model, column_name, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_not_constant', 'dbt_utils')(model, column_name, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_not_constant"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1783450492.9984505, "supported_languages": null}, "macro.dbt_utils.default__test_not_constant": {"name": "default__test_not_constant", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "unique_id": "macro.dbt_utils.default__test_not_constant", "macro_sql": "{% macro default__test_not_constant(model, column_name, group_by_columns) %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n\nselect\n {# In TSQL, subquery aggregate columns need aliases #}\n {# thus: a filler col name, 'filler_column' #}\n {{select_gb_cols}}\n count(distinct {{ column_name }}) as filler_column\n\nfrom {{ model }}\n\n {{groupby_gb_cols}}\n\nhaving count(distinct {{ column_name }}) = 1\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1783450492.999343, "supported_languages": null}, "macro.dbt_utils.get_url_path": {"name": "get_url_path", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "unique_id": "macro.dbt_utils.get_url_path", "macro_sql": "{% macro get_url_path(field) -%}\n {{ return(adapter.dispatch('get_url_path', 'dbt_utils')(field)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_url_path"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1783450492.999996, "supported_languages": null}, "macro.dbt_utils.default__get_url_path": {"name": "default__get_url_path", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "unique_id": "macro.dbt_utils.default__get_url_path", "macro_sql": "{% macro default__get_url_path(field) -%}\n\n {%- set stripped_url =\n dbt.replace(\n dbt.replace(field, \"'http://'\", \"''\"), \"'https://'\", \"''\")\n -%}\n\n {%- set first_slash_pos -%}\n coalesce(\n nullif({{ dbt.position(\"'/'\", stripped_url) }}, 0),\n {{ dbt.position(\"'?'\", stripped_url) }} - 1\n )\n {%- endset -%}\n\n {%- set parsed_path =\n dbt.split_part(\n dbt.right(\n stripped_url,\n dbt.length(stripped_url) ~ \"-\" ~ first_slash_pos\n ),\n \"'?'\", 1\n )\n -%}\n\n {{ dbt.safe_cast(\n parsed_path,\n dbt.type_string()\n )}}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.replace", "macro.dbt.position", "macro.dbt.split_part", "macro.dbt.right", "macro.dbt.length", "macro.dbt.safe_cast", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1783450493.001224, "supported_languages": null}, "macro.dbt_utils.get_url_host": {"name": "get_url_host", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "unique_id": "macro.dbt_utils.get_url_host", "macro_sql": "{% macro get_url_host(field) -%}\n {{ return(adapter.dispatch('get_url_host', 'dbt_utils')(field)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_url_host"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1783450493.0018086, "supported_languages": null}, "macro.dbt_utils.default__get_url_host": {"name": "default__get_url_host", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "unique_id": "macro.dbt_utils.default__get_url_host", "macro_sql": "{% macro default__get_url_host(field) -%}\n\n{%- set parsed =\n dbt.split_part(\n dbt.split_part(\n dbt.replace(\n dbt.replace(\n dbt.replace(field, \"'android-app://'\", \"''\"\n ), \"'http://'\", \"''\"\n ), \"'https://'\", \"''\"\n ), \"'/'\", 1\n ), \"'?'\", 1\n )\n\n-%}\n\n\n {{ dbt.safe_cast(\n parsed,\n dbt.type_string()\n )}}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.split_part", "macro.dbt.replace", "macro.dbt.safe_cast", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1783450493.0027761, "supported_languages": null}, "macro.dbt_utils.get_url_parameter": {"name": "get_url_parameter", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "unique_id": "macro.dbt_utils.get_url_parameter", "macro_sql": "{% macro get_url_parameter(field, url_parameter) -%}\n {{ return(adapter.dispatch('get_url_parameter', 'dbt_utils')(field, url_parameter)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450493.0033538, "supported_languages": null}, "macro.dbt_utils.default__get_url_parameter": {"name": "default__get_url_parameter", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "unique_id": "macro.dbt_utils.default__get_url_parameter", "macro_sql": "{% macro default__get_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"='\" -%}\n\n{%- set split = dbt.split_part(dbt.split_part(field, formatted_url_parameter, 2), \"'&'\", 1) -%}\n\nnullif({{ split }},'')\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.split_part"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450493.0039985, "supported_languages": null}, "macro.dbt_utils.pretty_time": {"name": "pretty_time", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "unique_id": "macro.dbt_utils.pretty_time", "macro_sql": "{% macro pretty_time(format='%H:%M:%S') %}\n {{ return(adapter.dispatch('pretty_time', 'dbt_utils')(format)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "format", "type": null, "description": ""}], "created_at": 1783450493.0045526, "supported_languages": null}, "macro.dbt_utils.default__pretty_time": {"name": "default__pretty_time", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "unique_id": "macro.dbt_utils.default__pretty_time", "macro_sql": "{% macro default__pretty_time(format='%H:%M:%S') %}\n {{ return(modules.datetime.datetime.now().strftime(format)) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "format", "type": null, "description": ""}], "created_at": 1783450493.0050373, "supported_languages": null}, "macro.dbt_utils.log_info": {"name": "log_info", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "unique_id": "macro.dbt_utils.log_info", "macro_sql": "{% macro log_info(message) %}\n {{ return(adapter.dispatch('log_info', 'dbt_utils')(message)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__log_info"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "message", "type": null, "description": ""}], "created_at": 1783450493.0056252, "supported_languages": null}, "macro.dbt_utils.default__log_info": {"name": "default__log_info", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "unique_id": "macro.dbt_utils.default__log_info", "macro_sql": "{% macro default__log_info(message) %}\n {{ log(dbt_utils.pretty_log_format(message), info=True) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "message", "type": null, "description": ""}], "created_at": 1783450493.0059786, "supported_languages": null}, "macro.dbt_utils._is_ephemeral": {"name": "_is_ephemeral", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/_is_ephemeral.sql", "original_file_path": "macros/jinja_helpers/_is_ephemeral.sql", "unique_id": "macro.dbt_utils._is_ephemeral", "macro_sql": "{% macro _is_ephemeral(obj, macro) %}\n {%- if obj.is_cte -%}\n {% set ephemeral_prefix = api.Relation.add_ephemeral_prefix('') %}\n {% if obj.name.startswith(ephemeral_prefix) %}\n {% set model_name = obj.name[(ephemeral_prefix|length):] %}\n {% else %}\n {% set model_name = obj.name %}\n {%- endif -%}\n {% set error_message %}\nThe `{{ macro }}` macro cannot be used with ephemeral models, as it relies on the information schema.\n\n`{{ model_name }}` is an ephemeral model. Consider making it a view or table instead.\n {% endset %}\n {%- do exceptions.raise_compiler_error(error_message) -%}\n {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "obj", "type": null, "description": ""}, {"name": "macro", "type": null, "description": ""}], "created_at": 1783450493.0073552, "supported_languages": null}, "macro.dbt_utils.pretty_log_format": {"name": "pretty_log_format", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "unique_id": "macro.dbt_utils.pretty_log_format", "macro_sql": "{% macro pretty_log_format(message) %}\n {{ return(adapter.dispatch('pretty_log_format', 'dbt_utils')(message)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "message", "type": null, "description": ""}], "created_at": 1783450493.007881, "supported_languages": null}, "macro.dbt_utils.default__pretty_log_format": {"name": "default__pretty_log_format", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "unique_id": "macro.dbt_utils.default__pretty_log_format", "macro_sql": "{% macro default__pretty_log_format(message) %}\n {{ return( dbt_utils.pretty_time() ~ ' + ' ~ message) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "message", "type": null, "description": ""}], "created_at": 1783450493.00821, "supported_languages": null}, "macro.dbt_utils._is_relation": {"name": "_is_relation", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/_is_relation.sql", "original_file_path": "macros/jinja_helpers/_is_relation.sql", "unique_id": "macro.dbt_utils._is_relation", "macro_sql": "{% macro _is_relation(obj, macro) %}\n {%- if not (obj is mapping and obj.get('metadata', {}).get('type', '').endswith('Relation')) -%}\n {%- do exceptions.raise_compiler_error(\"Macro \" ~ macro ~ \" expected a Relation but received the value: \" ~ obj) -%}\n {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "obj", "type": null, "description": ""}, {"name": "macro", "type": null, "description": ""}], "created_at": 1783450493.0090659, "supported_languages": null}, "macro.dbt_utils.slugify": {"name": "slugify", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/slugify.sql", "original_file_path": "macros/jinja_helpers/slugify.sql", "unique_id": "macro.dbt_utils.slugify", "macro_sql": "{% macro slugify(string) %}\n\n{% if not string %}\n{{ return('') }}\n{% endif %}\n\n{#- Lower case the string -#}\n{% set string = string | lower %}\n{#- Replace spaces and dashes with underscores -#}\n{% set string = modules.re.sub('[ -]+', '_', string) %}\n{#- Only take letters, numbers, and underscores -#}\n{% set string = modules.re.sub('[^a-z0-9_]+', '', string) %}\n{#- Prepends \"_\" if string begins with a number -#}\n{% set string = modules.re.sub('^[0-9]', '_' + string[0], string) %}\n\n{{ return(string) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}], "created_at": 1783450493.0105472, "supported_languages": null}, "macro.twitter_ads.twitter_ads_persist_pass_through_columns": {"name": "twitter_ads_persist_pass_through_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/twitter_ads_persist_pass_through_columns.sql", "original_file_path": "macros/twitter_ads_persist_pass_through_columns.sql", "unique_id": "macro.twitter_ads.twitter_ads_persist_pass_through_columns", "macro_sql": "{% macro twitter_ads_persist_pass_through_columns(pass_through_variable, identifier=none, transform='', coalesce_with=none, except_variable=none, exclude_fields=[]) %}\n\n{% set except_fields = [] %}\n{% if except_variable is not none %}\n {# Start creating list of fields to exclude #}\n {% for item in var(except_variable) %}\n {% do except_fields.append(item.name) %}\n {% endfor %}\n{% endif %}\n\n{% for field in exclude_fields %}\n {% do except_fields.append(field) %}\n{% endfor %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n {% if field not in except_fields %}\n , {{ transform ~ '(' ~ ('coalesce(' if coalesce_with is not none else '') ~ (identifier ~ '.' if identifier else '') ~ field ~ ((', ' ~ coalesce_with ~ ')') if coalesce_with is not none else '') ~ ')' }} as {{ field }}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "transform", "type": null, "description": ""}, {"name": "coalesce_with", "type": null, "description": ""}, {"name": "except_variable", "type": null, "description": ""}, {"name": "exclude_fields", "type": null, "description": ""}], "created_at": 1783450493.0130415, "supported_languages": null}, "macro.twitter_ads.get_account_history_columns": {"name": "get_account_history_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/staging_columns.sql", "original_file_path": "macros/staging/staging_columns.sql", "unique_id": "macro.twitter_ads.get_account_history_columns", "macro_sql": "{% macro get_account_history_columns() %}\n\n{% set columns = [\n {\"name\": \"approval_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"business_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"business_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"industry_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"salt\", \"datatype\": dbt.type_string()},\n {\"name\": \"timezone\", \"datatype\": dbt.type_string()},\n {\"name\": \"timezone_switch_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.017144, "supported_languages": null}, "macro.twitter_ads.get_campaign_history_columns": {"name": "get_campaign_history_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/staging_columns.sql", "original_file_path": "macros/staging/staging_columns.sql", "unique_id": "macro.twitter_ads.get_campaign_history_columns", "macro_sql": "{% macro get_campaign_history_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"daily_budget_amount_local_micro\", \"datatype\": dbt.type_int()},\n {\"name\": \"deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"duration_in_days\", \"datatype\": dbt.type_int()},\n {\"name\": \"end_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"entity_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"frequency_cap\", \"datatype\": dbt.type_int()},\n {\"name\": \"funding_instrument_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"servable\", \"datatype\": \"boolean\"},\n {\"name\": \"standard_delivery\", \"datatype\": \"boolean\"},\n {\"name\": \"start_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"total_budget_amount_local_micro\", \"datatype\": dbt.type_int()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.020021, "supported_languages": null}, "macro.twitter_ads.get_line_item_history_columns": {"name": "get_line_item_history_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/staging_columns.sql", "original_file_path": "macros/staging/staging_columns.sql", "unique_id": "macro.twitter_ads.get_line_item_history_columns", "macro_sql": "{% macro get_line_item_history_columns() %}\n\n{% set columns = [\n {\"name\": \"advertiser_domain\", \"datatype\": dbt.type_string()},\n {\"name\": \"advertiser_user_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"automatically_select_bid\", \"datatype\": \"boolean\"},\n {\"name\": \"bid_amount_local_micro\", \"datatype\": dbt.type_int()},\n {\"name\": \"bid_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"bid_unit\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"charge_by\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"creative_source\", \"datatype\": dbt.type_string()},\n {\"name\": \"currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"end_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"entity_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"objective\", \"datatype\": dbt.type_string()},\n {\"name\": \"optimization\", \"datatype\": dbt.type_string()},\n {\"name\": \"primary_web_event_tag\", \"datatype\": dbt.type_string()},\n {\"name\": \"product_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"start_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"target_cpa_local_micro\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_budget_amount_local_micro\", \"datatype\": dbt.type_int()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.0238087, "supported_languages": null}, "macro.twitter_ads.get_promoted_tweet_history_columns": {"name": "get_promoted_tweet_history_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/staging_columns.sql", "original_file_path": "macros/staging/staging_columns.sql", "unique_id": "macro.twitter_ads.get_promoted_tweet_history_columns", "macro_sql": "{% macro get_promoted_tweet_history_columns() %}\n\n{% set columns = [\n {\"name\": \"approval_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"entity_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"line_item_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"tweet_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.0253081, "supported_languages": null}, "macro.twitter_ads.get_tweet_url_columns": {"name": "get_tweet_url_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/staging_columns.sql", "original_file_path": "macros/staging/staging_columns.sql", "unique_id": "macro.twitter_ads.get_tweet_url_columns", "macro_sql": "{% macro get_tweet_url_columns() %}\n\n{% set columns = [\n {\"name\": \"display_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"expanded_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"index\", \"datatype\": dbt.type_int()},\n {\"name\": \"indices\", \"datatype\": dbt.type_string()},\n {\"name\": \"tweet_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"url\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.0265265, "supported_languages": null}, "macro.twitter_ads.get_promoted_tweet_report_columns": {"name": "get_promoted_tweet_report_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/staging_columns.sql", "original_file_path": "macros/staging/staging_columns.sql", "unique_id": "macro.twitter_ads.get_promoted_tweet_report_columns", "macro_sql": "{% macro get_promoted_tweet_report_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"billed_charge_local_micro\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"placement\", \"datatype\": dbt.type_string()},\n {\"name\": \"promoted_tweet_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"url_clicks\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('twitter_ads__conversion_fields')) }}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('twitter_ads__conversion_sale_amount_fields')) }}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ twitter_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('twitter_ads__promoted_tweet_report_passthrough_metrics'), except_fields=(var('twitter_ads__conversion_fields') + var('twitter_ads__conversion_sale_amount_fields'))) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.fivetran_utils.add_pass_through_columns", "macro.twitter_ads.twitter_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.0286555, "supported_languages": null}, "macro.twitter_ads.get_campaign_report_columns": {"name": "get_campaign_report_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/get_campaign_report_columns.sql", "original_file_path": "macros/staging/get_campaign_report_columns.sql", "unique_id": "macro.twitter_ads.get_campaign_report_columns", "macro_sql": "{% macro get_campaign_report_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"billed_charge_local_micro\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"placement\", \"datatype\": dbt.type_string()},\n {\"name\": \"url_clicks\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('twitter_ads__conversion_fields')) }}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('twitter_ads__conversion_sale_amount_fields')) }}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ twitter_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('twitter_ads__campaign_report_passthrough_metrics'), except_fields=(var('twitter_ads__conversion_fields') + var('twitter_ads__conversion_sale_amount_fields'))) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.fivetran_utils.add_pass_through_columns", "macro.twitter_ads.twitter_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.0311284, "supported_languages": null}, "macro.twitter_ads.get_campaign_locations_report_columns": {"name": "get_campaign_locations_report_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/get_campaign_locations_report_columns.sql", "original_file_path": "macros/staging/get_campaign_locations_report_columns.sql", "unique_id": "macro.twitter_ads.get_campaign_locations_report_columns", "macro_sql": "{% macro get_campaign_locations_report_columns() %}\n\n{% set columns = [\n {\"name\": \"segment_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"segment\", \"datatype\": dbt.type_string()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"billed_charge_local_micro\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"placement\", \"datatype\": dbt.type_string()},\n {\"name\": \"url_clicks\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('twitter_ads__conversion_fields')) }}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('twitter_ads__conversion_sale_amount_fields')) }}\n\n{{ twitter_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('twitter_ads__campaign_locations_report_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.fivetran_utils.add_pass_through_columns", "macro.twitter_ads.twitter_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.0337386, "supported_languages": null}, "macro.twitter_ads.get_tweet_columns": {"name": "get_tweet_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/get_tweet_columns.sql", "original_file_path": "macros/staging/get_tweet_columns.sql", "unique_id": "macro.twitter_ads.get_tweet_columns", "macro_sql": "{% macro get_tweet_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"full_text\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"lang\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.0350995, "supported_languages": null}, "macro.twitter_ads.get_campaign_regions_report_columns": {"name": "get_campaign_regions_report_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/get_campaign_regions_report_columns.sql", "original_file_path": "macros/staging/get_campaign_regions_report_columns.sql", "unique_id": "macro.twitter_ads.get_campaign_regions_report_columns", "macro_sql": "{% macro get_campaign_regions_report_columns() %}\n\n{% set columns = [\n {\"name\": \"location_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"location_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"segment\", \"datatype\": dbt.type_string()},\n {\"name\": \"segment_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"billed_charge_local_micro\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"placement\", \"datatype\": dbt.type_string()},\n {\"name\": \"url_clicks\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('twitter_ads__conversion_fields')) }}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('twitter_ads__conversion_sale_amount_fields')) }}\n\n{{ twitter_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('twitter_ads__campaign_regions_report_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.fivetran_utils.add_pass_through_columns", "macro.twitter_ads.twitter_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.0380511, "supported_languages": null}, "macro.twitter_ads.twitter_ads_add_pass_through_columns": {"name": "twitter_ads_add_pass_through_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/twitter_ads_add_pass_through_columns.sql", "original_file_path": "macros/staging/twitter_ads_add_pass_through_columns.sql", "unique_id": "macro.twitter_ads.twitter_ads_add_pass_through_columns", "macro_sql": "{% macro twitter_ads_add_pass_through_columns(base_columns, pass_through_fields, except_fields=[]) %}\n\n{% if pass_through_fields %}\n {% for column in pass_through_fields %}\n\n {% if column is mapping %}\n {% set col_name = column.alias|default(column.name)|lower %}\n \n {% if col_name not in except_fields %}\n {% if column.alias %}\n {% do base_columns.append({ \"name\": column.name, \"alias\": column.alias, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% else %}\n {% do base_columns.append({ \"name\": column.name, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% else %}\n {% if column|lower not in except_fields %}\n {% do base_columns.append({ \"name\": column, \"datatype\": dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_columns", "type": null, "description": ""}, {"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except_fields", "type": null, "description": ""}], "created_at": 1783450493.0405376, "supported_languages": null}, "macro.twitter_ads.twitter_ads_fill_pass_through_columns": {"name": "twitter_ads_fill_pass_through_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/twitter_ads_fill_pass_through_columns.sql", "original_file_path": "macros/staging/twitter_ads_fill_pass_through_columns.sql", "unique_id": "macro.twitter_ads.twitter_ads_fill_pass_through_columns", "macro_sql": "{% macro twitter_ads_fill_pass_through_columns(pass_through_fields, except=[]) %}\n\n{% if pass_through_fields %}\n {% for field in pass_through_fields %}\n {% if (field.alias if field.alias else field.name) not in except %}\n {% if field.transform_sql %}\n , coalesce(cast({{ field.transform_sql }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% else %}\n , coalesce(cast({{ field.alias if field.alias else field.name }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% endif %}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}], "created_at": 1783450493.042173, "supported_languages": null}, "macro.twitter_ads.twitter_ads_extract_url_parameter": {"name": "twitter_ads_extract_url_parameter", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/twitter_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/twitter_ads_extract_url_parameters.sql", "unique_id": "macro.twitter_ads.twitter_ads_extract_url_parameter", "macro_sql": "{% macro twitter_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ return(adapter.dispatch('twitter_ads_extract_url_parameter', 'twitter_ads') (field, url_parameter)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.twitter_ads.default__twitter_ads_extract_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450493.0428073, "supported_languages": null}, "macro.twitter_ads.default__twitter_ads_extract_url_parameter": {"name": "default__twitter_ads_extract_url_parameter", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/twitter_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/twitter_ads_extract_url_parameters.sql", "unique_id": "macro.twitter_ads.default__twitter_ads_extract_url_parameter", "macro_sql": "{% macro default__twitter_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ dbt_utils.get_url_parameter(field, url_parameter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450493.043108, "supported_languages": null}, "macro.twitter_ads.spark__twitter_ads_extract_url_parameter": {"name": "spark__twitter_ads_extract_url_parameter", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/twitter_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/twitter_ads_extract_url_parameters.sql", "unique_id": "macro.twitter_ads.spark__twitter_ads_extract_url_parameter", "macro_sql": "{% macro spark__twitter_ads_extract_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"=([^&]+)'\" -%}\nnullif(regexp_extract({{ field }}, {{ formatted_url_parameter }}, 1), '')\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450493.0435286, "supported_languages": null}, "macro.twitter_ads.get_line_item_report_columns": {"name": "get_line_item_report_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/get_line_item_report_columns.sql", "original_file_path": "macros/staging/get_line_item_report_columns.sql", "unique_id": "macro.twitter_ads.get_line_item_report_columns", "macro_sql": "{% macro get_line_item_report_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"billed_charge_local_micro\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"line_item_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"placement\", \"datatype\": dbt.type_string()},\n {\"name\": \"url_clicks\", \"datatype\": dbt.type_int()},\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('twitter_ads__conversion_fields')) }}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('twitter_ads__conversion_sale_amount_fields')) }}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ twitter_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('twitter_ads__line_item_report_passthrough_metrics'), except_fields=(var('twitter_ads__conversion_fields') + var('twitter_ads__conversion_sale_amount_fields'))) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.fivetran_utils.add_pass_through_columns", "macro.twitter_ads.twitter_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.046051, "supported_languages": null}, "macro.twitter_ads.get_line_item_keywords_report_columns": {"name": "get_line_item_keywords_report_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/get_line_item_keywords_report_columns.sql", "original_file_path": "macros/staging/get_line_item_keywords_report_columns.sql", "unique_id": "macro.twitter_ads.get_line_item_keywords_report_columns", "macro_sql": "{% macro get_line_item_keywords_report_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"billed_charge_local_micro\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"line_item_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"placement\", \"datatype\": dbt.type_string()},\n {\"name\": \"segment\", \"datatype\": dbt.type_string()},\n {\"name\": \"url_clicks\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('twitter_ads__conversion_fields')) }}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('twitter_ads__conversion_sale_amount_fields')) }}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ twitter_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('twitter_ads__line_item_keywords_report_passthrough_metrics'), except_fields=(var('twitter_ads__conversion_fields') + var('twitter_ads__conversion_sale_amount_fields'))) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.fivetran_utils.add_pass_through_columns", "macro.twitter_ads.twitter_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.0488377, "supported_languages": null}, "macro.fivetran_utils.try_cast": {"name": "try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.try_cast", "macro_sql": "{% macro try_cast(field, type) %}\n {{ adapter.dispatch('try_cast', 'fivetran_utils') (field, type) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__try_cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1783450493.0497928, "supported_languages": null}, "macro.fivetran_utils.default__try_cast": {"name": "default__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.default__try_cast", "macro_sql": "{% macro default__try_cast(field, type) %}\n {# most databases don't support this function yet\n so we just need to use cast #}\n cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1783450493.0500774, "supported_languages": null}, "macro.fivetran_utils.redshift__try_cast": {"name": "redshift__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.redshift__try_cast", "macro_sql": "{% macro redshift__try_cast(field, type) %}\n{%- if type == 'numeric' -%}\n\n case\n when trim({{field}}) ~ '^(0|[1-9][0-9]*)$' then trim({{field}})\n else null\n end::{{type}}\n\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"non-numeric datatypes are not currently supported\") }}\n\n{% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1783450493.0506403, "supported_languages": null}, "macro.fivetran_utils.postgres__try_cast": {"name": "postgres__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.postgres__try_cast", "macro_sql": "{% macro postgres__try_cast(field, type) %}\n{%- if type == 'numeric' -%}\n\n case\n when replace(cast({{field}} as varchar),cast(' ' as varchar),cast('' as varchar)) ~ '^(0|[1-9][0-9]*)$' \n then replace(cast({{field}} as varchar),cast(' ' as varchar),cast('' as varchar))\n else null\n end::{{type}}\n\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"non-numeric datatypes are not currently supported\") }}\n\n{% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1783450493.0511968, "supported_languages": null}, "macro.fivetran_utils.snowflake__try_cast": {"name": "snowflake__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.snowflake__try_cast", "macro_sql": "{% macro snowflake__try_cast(field, type) %}\n try_cast(cast({{field}} as varchar) as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1783450493.0514867, "supported_languages": null}, "macro.fivetran_utils.bigquery__try_cast": {"name": "bigquery__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.bigquery__try_cast", "macro_sql": "{% macro bigquery__try_cast(field, type) %}\n safe_cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1783450493.0517514, "supported_languages": null}, "macro.fivetran_utils.spark__try_cast": {"name": "spark__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.spark__try_cast", "macro_sql": "{% macro spark__try_cast(field, type) %}\n try_cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1783450493.0520144, "supported_languages": null}, "macro.fivetran_utils.sqlserver__try_cast": {"name": "sqlserver__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.sqlserver__try_cast", "macro_sql": "{% macro sqlserver__try_cast(field, type) %}\n try_cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1783450493.0522842, "supported_languages": null}, "macro.fivetran_utils.union_relations": {"name": "union_relations", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_relations.sql", "original_file_path": "macros/union_relations.sql", "unique_id": "macro.fivetran_utils.union_relations", "macro_sql": "{%- macro union_relations(relations, aliases=none, column_override=none, include=[], exclude=[], source_column_name=none) -%}\n\n {%- if exclude and include -%}\n {{ exceptions.raise_compiler_error(\"Both an exclude and include list were provided to the `union` macro. Only one is allowed\") }}\n {%- endif -%}\n\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. -#}\n {%- if not execute %}\n {{ return('') }}\n {% endif -%}\n\n {%- set column_override = column_override if column_override is not none else {} -%}\n {%- set source_column_name = source_column_name if source_column_name is not none else '_dbt_source_relation' -%}\n\n {%- set relation_columns = {} -%}\n {%- set column_superset = {} -%}\n\n {%- for relation in relations -%}\n\n {%- do relation_columns.update({relation: []}) -%}\n\n {%- do dbt_utils._is_relation(relation, 'union_relations') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) -%}\n {%- for col in cols -%}\n\n {#- If an exclude list was provided and the column is in the list, do nothing -#}\n {%- if exclude and col.column in exclude -%}\n\n {#- If an include list was provided and the column is not in the list, do nothing -#}\n {%- elif include and col.column not in include -%}\n\n {#- Otherwise add the column to the column superset -#}\n {%- else -%}\n\n {#- update the list of columns in this relation -#}\n {%- do relation_columns[relation].append(col.column) -%}\n\n {%- if col.column in column_superset -%}\n\n {%- set stored = column_superset[col.column] -%}\n {%- if col.is_string() and stored.is_string() and col.string_size() > stored.string_size() -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif %}\n\n {%- else -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif -%}\n\n {%- endif -%}\n\n {%- endfor -%}\n {%- endfor -%}\n\n {%- set ordered_column_names = column_superset.keys() -%}\n\n {%- for relation in relations %}\n\n (\n select\n\n cast({{ dbt.string_literal(relation) }} as {{ dbt.type_string() }}) as {{ source_column_name }},\n {% for col_name in ordered_column_names -%}\n\n {%- set col = column_superset[col_name] %}\n {%- set col_type = column_override.get(col.column, col.data_type) %}\n {%- set col_name = adapter.quote(col_name) if col_name in relation_columns[relation] else 'null' %}\n cast({{ col_name }} as {{ col_type }}) as {{ col.quoted }} {% if not loop.last %},{% endif -%}\n\n {%- endfor %}\n\n from {{ aliases[loop.index0] if aliases else relation }}\n )\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n\n {%- endfor -%}\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt.string_literal", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relations", "type": null, "description": ""}, {"name": "aliases", "type": null, "description": ""}, {"name": "column_override", "type": null, "description": ""}, {"name": "include", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "source_column_name", "type": null, "description": ""}], "created_at": 1783450493.0578592, "supported_languages": null}, "macro.fivetran_utils.union_tables": {"name": "union_tables", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_relations.sql", "original_file_path": "macros/union_relations.sql", "unique_id": "macro.fivetran_utils.union_tables", "macro_sql": "{%- macro union_tables(tables, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_table') -%}\n\n {%- do exceptions.warn(\"Warning: the `union_tables` macro is no longer supported and will be deprecated in a future release of dbt-utils. Use the `union_relations` macro instead\") -%}\n\n {{ return(dbt_utils.union_relations(tables, column_override, include, exclude, source_column_name)) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt_utils.union_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "tables", "type": null, "description": ""}, {"name": "column_override", "type": null, "description": ""}, {"name": "include", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "source_column_name", "type": null, "description": ""}], "created_at": 1783450493.0585663, "supported_languages": null}, "macro.fivetran_utils.pivot_json_extract": {"name": "pivot_json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/pivot_json_extract.sql", "original_file_path": "macros/pivot_json_extract.sql", "unique_id": "macro.fivetran_utils.pivot_json_extract", "macro_sql": "{% macro pivot_json_extract(string, list_of_properties) %}\n\n{%- for property in list_of_properties -%}\n{%- if property is mapping -%}\nreplace( {{ fivetran_utils.json_extract(string, property.name) }}, '\"', '') as {{ property.alias if property.alias else property.name | replace(' ', '_') | replace('.', '_') | lower }}\n\n{%- else -%}\nreplace( {{ fivetran_utils.json_extract(string, property) }}, '\"', '') as {{ property | replace(' ', '_') | lower }}\n\n{%- endif -%}\n{%- if not loop.last -%},{%- endif %}\n{% endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.json_extract"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "list_of_properties", "type": null, "description": ""}], "created_at": 1783450493.0599916, "supported_languages": null}, "macro.fivetran_utils.calculated_fields": {"name": "calculated_fields", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/calculated_fields.sql", "original_file_path": "macros/calculated_fields.sql", "unique_id": "macro.fivetran_utils.calculated_fields", "macro_sql": "{% macro calculated_fields(variable) -%}\n\n{% if var(variable, none) %}\n {% for field in var(variable) %}\n , {{ field.transform_sql }} as {{ field.name }} \n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "variable", "type": null, "description": ""}], "created_at": 1783450493.0607145, "supported_languages": null}, "macro.fivetran_utils.collect_freshness": {"name": "collect_freshness", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/collect_freshness.sql", "original_file_path": "macros/collect_freshness.sql", "unique_id": "macro.fivetran_utils.collect_freshness", "macro_sql": "{% macro collect_freshness(source, loaded_at_field, filter) %}\n {{ return(adapter.dispatch('collect_freshness')(source, loaded_at_field, filter))}}\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source", "type": null, "description": ""}, {"name": "loaded_at_field", "type": null, "description": ""}, {"name": "filter", "type": null, "description": ""}], "created_at": 1783450493.0616138, "supported_languages": null}, "macro.fivetran_utils.default__collect_freshness": {"name": "default__collect_freshness", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/collect_freshness.sql", "original_file_path": "macros/collect_freshness.sql", "unique_id": "macro.fivetran_utils.default__collect_freshness", "macro_sql": "{% macro default__collect_freshness(source, loaded_at_field, filter) %}\n {% call statement('collect_freshness', fetch_result=True, auto_begin=False) -%}\n\n {%- set enabled_array = [] -%}\n {% for node in graph.sources.values() %}\n {% if node.identifier == source.identifier %}\n {% if (node.meta['is_enabled'] | default(true)) %}\n {%- do enabled_array.append(1) -%}\n {% endif %}\n {% endif %}\n {% endfor %}\n {% set is_enabled = (enabled_array != []) %}\n\n select\n {% if is_enabled %}\n max({{ loaded_at_field }})\n {% else %} \n {{ current_timestamp() }} {% endif %} as max_loaded_at,\n {{ current_timestamp() }} as snapshotted_at\n\n {% if is_enabled %}\n from {{ source }}\n {% if filter %}\n where {{ filter }}\n {% endif %}\n {% endif %}\n\n {% endcall %}\n\n {% if dbt_version.split('.') | map('int') | list >= [1, 5, 0] %}\n {{ return(load_result('collect_freshness')) }}\n {% else %}\n {{ return(load_result('collect_freshness').table) }}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source", "type": null, "description": ""}, {"name": "loaded_at_field", "type": null, "description": ""}, {"name": "filter", "type": null, "description": ""}], "created_at": 1783450493.0639505, "supported_languages": null}, "macro.fivetran_utils.snowflake_seed_data": {"name": "snowflake_seed_data", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/snowflake_seed_data.sql", "original_file_path": "macros/snowflake_seed_data.sql", "unique_id": "macro.fivetran_utils.snowflake_seed_data", "macro_sql": "{% macro snowflake_seed_data(seed_name) %}\n\n{% if target.type == 'snowflake' %}\n{{ return(ref(seed_name ~ '_snowflake')) }}\n{% else %}\n{{ return(ref(seed_name)) }}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "seed_name", "type": null, "description": ""}], "created_at": 1783450493.0647018, "supported_languages": null}, "macro.fivetran_utils.json_extract": {"name": "json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.json_extract", "macro_sql": "{% macro json_extract(string, string_path) -%}\n\n{{ adapter.dispatch('json_extract', 'fivetran_utils') (string, string_path) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__json_extract"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1783450493.0654733, "supported_languages": null}, "macro.fivetran_utils.default__json_extract": {"name": "default__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.default__json_extract", "macro_sql": "{% macro default__json_extract(string, string_path) %}\n\n json_extract_path_text({{string}}, {{ \"'\" ~ string_path ~ \"'\" }} )\n \n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1783450493.0657892, "supported_languages": null}, "macro.fivetran_utils.snowflake__json_extract": {"name": "snowflake__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.snowflake__json_extract", "macro_sql": "{% macro snowflake__json_extract(string, string_path) %}\n\n json_extract_path_text(try_parse_json( {{string}} ), {{ \"'\" ~ string_path ~ \"'\" }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1783450493.0661035, "supported_languages": null}, "macro.fivetran_utils.redshift__json_extract": {"name": "redshift__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.redshift__json_extract", "macro_sql": "{% macro redshift__json_extract(string, string_path) %}\n\n case when is_valid_json( {{string}} ) then json_extract_path_text({{string}}, {{ \"'\" ~ string_path ~ \"'\" }} ) else null end\n \n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1783450493.0664697, "supported_languages": null}, "macro.fivetran_utils.bigquery__json_extract": {"name": "bigquery__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.bigquery__json_extract", "macro_sql": "{% macro bigquery__json_extract(string, string_path) %}\n\n json_extract_scalar({{string}}, {{ \"'$.\" ~ string_path ~ \"'\" }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1783450493.0667884, "supported_languages": null}, "macro.fivetran_utils.postgres__json_extract": {"name": "postgres__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.postgres__json_extract", "macro_sql": "{% macro postgres__json_extract(string, string_path) %}\n\n {{string}}::json->>{{\"'\" ~ string_path ~ \"'\" }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1783450493.0670977, "supported_languages": null}, "macro.fivetran_utils.enabled_vars": {"name": "enabled_vars", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/enabled_vars.sql", "original_file_path": "macros/enabled_vars.sql", "unique_id": "macro.fivetran_utils.enabled_vars", "macro_sql": "{% macro enabled_vars(vars) %}\n\n{% for v in vars %}\n \n {% if var(v, True) == False %}\n {{ return(False) }}\n {% endif %}\n\n{% endfor %}\n\n{{ return(True) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "vars", "type": null, "description": ""}], "created_at": 1783450493.0678637, "supported_languages": null}, "macro.fivetran_utils.union_data": {"name": "union_data", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_data.sql", "original_file_path": "macros/union_data.sql", "unique_id": "macro.fivetran_utils.union_data", "macro_sql": "{%- macro union_data(table_identifier, database_variable, schema_variable, default_database, default_schema, default_variable, union_schema_variable='union_schemas', union_database_variable='union_databases') -%}\n\n{{ adapter.dispatch('union_data', 'fivetran_utils') (\n table_identifier, \n database_variable, \n schema_variable, \n default_database, \n default_schema, \n default_variable,\n union_schema_variable,\n union_database_variable\n ) }}\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.fivetran_utils.default__union_data"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_identifier", "type": null, "description": ""}, {"name": "database_variable", "type": null, "description": ""}, {"name": "schema_variable", "type": null, "description": ""}, {"name": "default_database", "type": null, "description": ""}, {"name": "default_schema", "type": null, "description": ""}, {"name": "default_variable", "type": null, "description": ""}, {"name": "union_schema_variable", "type": null, "description": ""}, {"name": "union_database_variable", "type": null, "description": ""}], "created_at": 1783450493.0700188, "supported_languages": null}, "macro.fivetran_utils.default__union_data": {"name": "default__union_data", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_data.sql", "original_file_path": "macros/union_data.sql", "unique_id": "macro.fivetran_utils.default__union_data", "macro_sql": "{%- macro default__union_data(\n table_identifier, \n database_variable, \n schema_variable, \n default_database, \n default_schema, \n default_variable,\n union_schema_variable,\n union_database_variable\n ) -%}\n\n{%- if var(union_schema_variable, none) -%}\n\n {%- set relations = [] -%}\n \n {%- if var(union_schema_variable) is string -%}\n {%- set trimmed = var(union_schema_variable)|trim('[')|trim(']') -%}\n {%- set schemas = trimmed.split(',')|map('trim',\" \")|map('trim','\"')|map('trim',\"'\") -%}\n {%- else -%}\n {%- set schemas = var(union_schema_variable) -%}\n {%- endif -%}\n\n {%- for schema in var(union_schema_variable) -%}\n {%- set relation=adapter.get_relation(\n database=source(schema, table_identifier).database if var('has_defined_sources', false) else var(database_variable, default_database),\n schema=source(schema, table_identifier).schema if var('has_defined_sources', false) else schema,\n identifier=source(schema, table_identifier).identifier if var('has_defined_sources', false) else table_identifier\n ) -%}\n \n {%- set relation_exists=relation is not none -%}\n\n {%- if relation_exists -%}\n {%- do relations.append(relation) -%}\n {%- endif -%}\n\n {%- endfor -%}\n \n {%- if relations != [] -%}\n {{ dbt_utils.union_relations(relations) }}\n {%- else -%}\n {% if execute and not var('fivetran__remove_empty_table_warnings', false) -%}\n {{ exceptions.warn(\"\\n\\nPlease be aware: The \" ~ table_identifier|upper ~ \" table was not found in your \" ~ default_schema|upper ~ \" schema(s). The Fivetran dbt package will create a completely empty \" ~ table_identifier|upper ~ \" staging model as to not break downstream transformations. To turn off these warnings, set the `fivetran__remove_empty_table_warnings` variable to TRUE (see https://github.com/fivetran/dbt_fivetran_utils/tree/releases/v0.4.latest#union_data-source for details).\\n\") }}\n {% endif -%}\n select \n cast(null as {{ dbt.type_string() }}) as _dbt_source_relation\n limit 0\n {%- endif -%}\n\n{%- elif var(union_database_variable, none) -%}\n\n {%- set relations = [] -%}\n\n {%- for database in var(union_database_variable) -%}\n {%- set relation=adapter.get_relation(\n database=source(schema, table_identifier).database if var('has_defined_sources', false) else database,\n schema=source(schema, table_identifier).schema if var('has_defined_sources', false) else var(schema_variable, default_schema),\n identifier=source(schema, table_identifier).identifier if var('has_defined_sources', false) else table_identifier\n ) -%}\n\n {%- set relation_exists=relation is not none -%}\n\n {%- if relation_exists -%}\n {%- do relations.append(relation) -%}\n {%- endif -%}\n\n {%- endfor -%}\n\n {%- if relations != [] -%}\n {{ dbt_utils.union_relations(relations) }}\n {%- else -%}\n {% if execute and not var('fivetran__remove_empty_table_warnings', false) -%}\n {{ exceptions.warn(\"\\n\\nPlease be aware: The \" ~ table_identifier|upper ~ \" table was not found in your \" ~ default_schema|upper ~ \" schema(s). The Fivetran dbt package will create a completely empty \" ~ table_identifier|upper ~ \" staging model as to not break downstream transformations. To turn off these warnings, set the `fivetran__remove_empty_table_warnings` variable to TRUE (see https://github.com/fivetran/dbt_fivetran_utils/tree/releases/v0.4.latest#union_data-source for details).\\n\") }}\n {% endif -%}\n select \n cast(null as {{ dbt.type_string() }}) as _dbt_source_relation\n limit 0\n {%- endif -%}\n\n{%- else -%}\n {% set exception_schemas = {\"linkedin_company_pages\": \"linkedin_pages\", \"instagram_business_pages\": \"instagram_business\"} %}\n {% set relation = namespace(value=\"\") %}\n {% if default_schema in exception_schemas.keys() %}\n {% for corrected_schema_name in exception_schemas.items() %} \n {% if default_schema in corrected_schema_name %}\n {# In order for this macro to effectively work within upstream integration tests (mainly used by the Fivetran dbt package maintainers), this identifier variable selection is required to use the macro with different identifier names. #}\n {% set identifier_var = corrected_schema_name[1] + \"_\" + table_identifier + \"_identifier\" %}\n {%- set relation.value=adapter.get_relation(\n database=source(corrected_schema_name[1], table_identifier).database,\n schema=source(corrected_schema_name[1], table_identifier).schema,\n identifier=var(identifier_var, table_identifier)\n ) -%}\n {% endif %}\n {% endfor %}\n {% else %}\n {# In order for this macro to effectively work within upstream integration tests (mainly used by the Fivetran dbt package maintainers), this identifier variable selection is required to use the macro with different identifier names. #}\n {% set identifier_var = default_schema + \"_\" + table_identifier + \"_identifier\" %}\n {# Unfortunately the Twitter Organic identifiers were misspelled. As such, we will need to account for this in the model. This will be adjusted in the Twitter Organic package, but to ensure backwards compatibility, this needs to be included. #}\n {% if var(identifier_var, none) is none %} \n {% set identifier_var = default_schema + \"_\" + table_identifier + \"_identifer\" %}\n {% endif %}\n {%- set relation.value=adapter.get_relation(\n database=source(default_schema, table_identifier).database,\n schema=source(default_schema, table_identifier).schema,\n identifier=var(identifier_var, table_identifier)\n ) -%}\n {% endif %}\n{%- set table_exists=relation.value is not none -%}\n\n{%- if table_exists -%}\n select * \n from {{ relation.value }}\n{%- else -%}\n {% if execute and not var('fivetran__remove_empty_table_warnings', false) -%}\n {{ exceptions.warn(\"\\n\\nPlease be aware: The \" ~ table_identifier|upper ~ \" table was not found in your \" ~ default_schema|upper ~ \" schema(s). The Fivetran dbt package will create a completely empty \" ~ table_identifier|upper ~ \" staging model as to not break downstream transformations. To turn off these warnings, set the `fivetran__remove_empty_table_warnings` variable to TRUE (see https://github.com/fivetran/dbt_fivetran_utils/tree/releases/v0.4.latest#union_data-source for details).\\n\") }}\n {% endif -%}\n select \n cast(null as {{ dbt.type_string() }}) as _dbt_source_relation\n limit 0\n{%- endif -%}\n{%- endif -%}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt_utils.union_relations", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_identifier", "type": null, "description": ""}, {"name": "database_variable", "type": null, "description": ""}, {"name": "schema_variable", "type": null, "description": ""}, {"name": "default_database", "type": null, "description": ""}, {"name": "default_schema", "type": null, "description": ""}, {"name": "default_variable", "type": null, "description": ""}, {"name": "union_schema_variable", "type": null, "description": ""}, {"name": "union_database_variable", "type": null, "description": ""}], "created_at": 1783450493.0786767, "supported_languages": null}, "macro.fivetran_utils.empty_variable_warning": {"name": "empty_variable_warning", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/empty_variable_warning.sql", "original_file_path": "macros/empty_variable_warning.sql", "unique_id": "macro.fivetran_utils.empty_variable_warning", "macro_sql": "{% macro empty_variable_warning(variable, downstream_model) %}\n\n{% if not var(variable) %}\n{{ log(\n \"\"\"\n Warning: You have passed an empty list to the \"\"\" ~ variable ~ \"\"\".\n As a result, you won't see the history of any columns in the \"\"\" ~ downstream_model ~ \"\"\" model.\n \"\"\",\n info=True\n) }}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "variable", "type": null, "description": ""}, {"name": "downstream_model", "type": null, "description": ""}], "created_at": 1783450493.0794988, "supported_languages": null}, "macro.fivetran_utils.string_agg": {"name": "string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.string_agg", "macro_sql": "{% macro string_agg(field_to_agg, delimiter) -%}\n\n{{ adapter.dispatch('string_agg', 'fivetran_utils') (field_to_agg, delimiter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__string_agg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}, {"name": "delimiter", "type": null, "description": ""}], "created_at": 1783450493.080134, "supported_languages": null}, "macro.fivetran_utils.default__string_agg": {"name": "default__string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.default__string_agg", "macro_sql": "{% macro default__string_agg(field_to_agg, delimiter) %}\n string_agg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}, {"name": "delimiter", "type": null, "description": ""}], "created_at": 1783450493.0804257, "supported_languages": null}, "macro.fivetran_utils.snowflake__string_agg": {"name": "snowflake__string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.snowflake__string_agg", "macro_sql": "{% macro snowflake__string_agg(field_to_agg, delimiter) %}\n listagg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}, {"name": "delimiter", "type": null, "description": ""}], "created_at": 1783450493.0806978, "supported_languages": null}, "macro.fivetran_utils.redshift__string_agg": {"name": "redshift__string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.redshift__string_agg", "macro_sql": "{% macro redshift__string_agg(field_to_agg, delimiter) %}\n listagg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}, {"name": "delimiter", "type": null, "description": ""}], "created_at": 1783450493.0809646, "supported_languages": null}, "macro.fivetran_utils.spark__string_agg": {"name": "spark__string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.spark__string_agg", "macro_sql": "{% macro spark__string_agg(field_to_agg, delimiter) %}\n -- collect set will remove duplicates\n replace(replace(replace(cast( collect_set({{ field_to_agg }}) as string), '[', ''), ']', ''), ', ', {{ delimiter }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}, {"name": "delimiter", "type": null, "description": ""}], "created_at": 1783450493.0812364, "supported_languages": null}, "macro.fivetran_utils.array_agg": {"name": "array_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "unique_id": "macro.fivetran_utils.array_agg", "macro_sql": "{% macro array_agg(field_to_agg) -%}\n\n{{ adapter.dispatch('array_agg', 'fivetran_utils') (field_to_agg) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__array_agg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}], "created_at": 1783450493.0817354, "supported_languages": null}, "macro.fivetran_utils.default__array_agg": {"name": "default__array_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "unique_id": "macro.fivetran_utils.default__array_agg", "macro_sql": "{% macro default__array_agg(field_to_agg) %}\n array_agg({{ field_to_agg }})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}], "created_at": 1783450493.0819495, "supported_languages": null}, "macro.fivetran_utils.redshift__array_agg": {"name": "redshift__array_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "unique_id": "macro.fivetran_utils.redshift__array_agg", "macro_sql": "{% macro redshift__array_agg(field_to_agg) %}\n listagg({{ field_to_agg }}, ',')\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}], "created_at": 1783450493.082157, "supported_languages": null}, "macro.fivetran_utils.extract_url_parameter": {"name": "extract_url_parameter", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/extract_url_parameter.sql", "original_file_path": "macros/extract_url_parameter.sql", "unique_id": "macro.fivetran_utils.extract_url_parameter", "macro_sql": "{% macro extract_url_parameter(field, url_parameter) -%}\n\n{{ adapter.dispatch('extract_url_parameter', 'fivetran_utils') (field, url_parameter) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__extract_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450493.0827463, "supported_languages": null}, "macro.fivetran_utils.default__extract_url_parameter": {"name": "default__extract_url_parameter", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/extract_url_parameter.sql", "original_file_path": "macros/extract_url_parameter.sql", "unique_id": "macro.fivetran_utils.default__extract_url_parameter", "macro_sql": "{% macro default__extract_url_parameter(field, url_parameter) -%}\n\n{{ dbt_utils.get_url_parameter(field, url_parameter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450493.0830464, "supported_languages": null}, "macro.fivetran_utils.spark__extract_url_parameter": {"name": "spark__extract_url_parameter", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/extract_url_parameter.sql", "original_file_path": "macros/extract_url_parameter.sql", "unique_id": "macro.fivetran_utils.spark__extract_url_parameter", "macro_sql": "{% macro spark__extract_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"=([^&]+)'\" -%}\nnullif(regexp_extract({{ field }}, {{ formatted_url_parameter }}, 1), '')\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450493.0834644, "supported_languages": null}, "macro.fivetran_utils.fivetran_date_spine": {"name": "fivetran_date_spine", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fivetran_date_spine.sql", "original_file_path": "macros/fivetran_date_spine.sql", "unique_id": "macro.fivetran_utils.fivetran_date_spine", "macro_sql": "{% macro fivetran_date_spine(datepart, start_date, end_date) -%}\n\n{{ return(adapter.dispatch('fivetran_date_spine', 'fivetran_utils') (datepart, start_date, end_date)) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__fivetran_date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1783450493.0843894, "supported_languages": null}, "macro.fivetran_utils.default__fivetran_date_spine": {"name": "default__fivetran_date_spine", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fivetran_date_spine.sql", "original_file_path": "macros/fivetran_date_spine.sql", "unique_id": "macro.fivetran_utils.default__fivetran_date_spine", "macro_sql": "{% macro default__fivetran_date_spine(datepart, start_date, end_date) %}\n\n {{ dbt_utils.date_spine(datepart, start_date, end_date) }}\n \n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1783450493.0847645, "supported_languages": null}, "macro.fivetran_utils.sqlserver__fivetran_date_spine": {"name": "sqlserver__fivetran_date_spine", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fivetran_date_spine.sql", "original_file_path": "macros/fivetran_date_spine.sql", "unique_id": "macro.fivetran_utils.sqlserver__fivetran_date_spine", "macro_sql": "{% macro sqlserver__fivetran_date_spine(datepart, start_date, end_date) -%}\n\n {% set date_spine_query %}\n with\n\n l0 as (\n\n select c\n from (select 1 union all select 1) as d(c)\n\n ),\n l1 as (\n\n select\n 1 as c\n from l0 as a\n cross join l0 as b\n\n ),\n\n l2 as (\n\n select 1 as c\n from l1 as a\n cross join l1 as b\n ),\n\n l3 as (\n\n select 1 as c\n from l2 as a\n cross join l2 as b\n ),\n\n l4 as (\n\n select 1 as c\n from l3 as a\n cross join l3 as b\n ),\n\n l5 as (\n\n select 1 as c\n from l4 as a\n cross join l4 as b\n ),\n\n nums as (\n\n select row_number() over (order by (select null)) as rownum\n from l5\n ),\n\n rawdata as (\n\n select top ({{dbt.datediff(start_date, end_date, datepart)}}) rownum -1 as n\n from nums\n order by rownum\n ),\n\n all_periods as (\n\n select (\n {{\n dbt.dateadd(\n datepart,\n 'n',\n start_date\n )\n }}\n ) as date_{{datepart}}\n from rawdata\n ),\n\n filtered as (\n\n select *\n from all_periods\n where date_{{datepart}} <= {{ end_date }}\n\n )\n\n select * from filtered\n order by 1\n\n {% endset %}\n\n {% set results = run_query(date_spine_query) %}\n\n {% if execute %}\n\n {% set results_list = results.columns[0].values() %}\n \n {% else %}\n\n {% set results_list = [] %}\n\n {% endif %}\n\n {%- for date_field in results_list %}\n select cast('{{ date_field }}' as date) as date_{{datepart}} {{ 'union all ' if not loop.last else '' }}\n {% endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.datediff", "macro.dbt.dateadd", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1783450493.0864775, "supported_languages": null}, "macro.fivetran_utils.add_dbt_source_relation": {"name": "add_dbt_source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/add_dbt_source_relation.sql", "original_file_path": "macros/add_dbt_source_relation.sql", "unique_id": "macro.fivetran_utils.add_dbt_source_relation", "macro_sql": "{% macro add_dbt_source_relation() %}\n\n{% if var('union_schemas', none) or var('union_databases', none) %}\n, _dbt_source_relation\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.0870018, "supported_languages": null}, "macro.fivetran_utils.percentile": {"name": "percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.percentile", "macro_sql": "{% macro percentile(percentile_field, partition_field, percent) -%}\n\n{{ adapter.dispatch('percentile', 'fivetran_utils') (percentile_field, partition_field, percent) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__percentile"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "percentile_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "percent", "type": null, "description": ""}], "created_at": 1783450493.0877993, "supported_languages": null}, "macro.fivetran_utils.default__percentile": {"name": "default__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.default__percentile", "macro_sql": "{% macro default__percentile(percentile_field, partition_field, percent) %}\n\n percentile_cont( \n {{ percent }} )\n within group ( order by {{ percentile_field }} )\n over ( partition by {{ partition_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "percentile_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "percent", "type": null, "description": ""}], "created_at": 1783450493.0881388, "supported_languages": null}, "macro.fivetran_utils.redshift__percentile": {"name": "redshift__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.redshift__percentile", "macro_sql": "{% macro redshift__percentile(percentile_field, partition_field, percent) %}\n\n percentile_cont( \n {{ percent }} )\n within group ( order by {{ percentile_field }} )\n over ( partition by {{ partition_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "percentile_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "percent", "type": null, "description": ""}], "created_at": 1783450493.0884912, "supported_languages": null}, "macro.fivetran_utils.bigquery__percentile": {"name": "bigquery__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.bigquery__percentile", "macro_sql": "{% macro bigquery__percentile(percentile_field, partition_field, percent) %}\n\n percentile_cont( \n {{ percentile_field }}, \n {{ percent }}) \n over (partition by {{ partition_field }} \n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "percentile_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "percent", "type": null, "description": ""}], "created_at": 1783450493.088821, "supported_languages": null}, "macro.fivetran_utils.postgres__percentile": {"name": "postgres__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.postgres__percentile", "macro_sql": "{% macro postgres__percentile(percentile_field, partition_field, percent) %}\n\n percentile_cont( \n {{ percent }} )\n within group ( order by {{ percentile_field }} )\n /* have to group by partition field */\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "percentile_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "percent", "type": null, "description": ""}], "created_at": 1783450493.089111, "supported_languages": null}, "macro.fivetran_utils.spark__percentile": {"name": "spark__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.spark__percentile", "macro_sql": "{% macro spark__percentile(percentile_field, partition_field, percent) %}\n\n percentile( \n {{ percentile_field }}, \n {{ percent }}) \n over (partition by {{ partition_field }} \n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "percentile_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "percent", "type": null, "description": ""}], "created_at": 1783450493.0894556, "supported_languages": null}, "macro.fivetran_utils.union_relations_custom": {"name": "union_relations_custom", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_relations_custom.sql", "original_file_path": "macros/union_relations_custom.sql", "unique_id": "macro.fivetran_utils.union_relations_custom", "macro_sql": "{%- macro union_relations_custom(relations, aliases=none, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation', where=none) -%}\n {{ return(adapter.dispatch('union_relations_custom', 'fivetran_utils')(relations, aliases, column_override, include, exclude, source_column_name, where)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__union_relations_custom"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relations", "type": null, "description": ""}, {"name": "aliases", "type": null, "description": ""}, {"name": "column_override", "type": null, "description": ""}, {"name": "include", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "source_column_name", "type": null, "description": ""}, {"name": "where", "type": null, "description": ""}], "created_at": 1783450493.0915303, "supported_languages": null}, "macro.fivetran_utils.default__union_relations_custom": {"name": "default__union_relations_custom", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_relations_custom.sql", "original_file_path": "macros/union_relations_custom.sql", "unique_id": "macro.fivetran_utils.default__union_relations_custom", "macro_sql": "\n\n{%- macro default__union_relations_custom(relations, aliases=none, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation', where=none) -%}\n\n {%- if exclude and include -%}\n {{ exceptions.raise_compiler_error(\"Both an exclude and include list were provided to the `union` macro. Only one is allowed\") }}\n {%- endif -%}\n\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. -#}\n {%- if not execute %}\n {{ return('') }}\n {% endif -%}\n\n {%- set column_override = column_override if column_override is not none else {} -%}\n\n {%- set relation_columns = {} -%}\n {%- set column_superset = {} -%}\n {%- set all_excludes = [] -%}\n {%- set all_includes = [] -%}\n\n {%- if exclude -%}\n {%- for exc in exclude -%}\n {%- do all_excludes.append(exc | lower) -%}\n {%- endfor -%}\n {%- endif -%}\n\n {%- if include -%}\n {%- for inc in include -%}\n {%- do all_includes.append(inc | lower) -%}\n {%- endfor -%}\n {%- endif -%}\n\n {%- for relation in relations -%}\n\n {%- do relation_columns.update({relation: []}) -%}\n\n {%- do dbt_utils._is_relation(relation, 'union_relations_custom') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'union_relations_custom') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) -%}\n {%- for col in cols -%}\n\n {#- If an exclude list was provided and the column is in the list, do nothing -#}\n {%- if exclude and col.column | lower in all_excludes -%}\n\n {#- If an include list was provided and the column is not in the list, do nothing -#}\n {%- elif include and col.column | lower not in all_includes -%}\n\n {#- Otherwise add the column to the column superset -#}\n {%- else -%}\n\n {#- update the list of columns in this relation -#}\n {%- do relation_columns[relation].append(col.column) -%}\n\n {%- if col.column in column_superset -%}\n\n {%- set stored = column_superset[col.column] -%}\n {%- if col.is_string() and stored.is_string() and col.string_size() > stored.string_size() -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif %}\n\n {%- else -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif -%}\n\n {%- endif -%}\n\n {%- endfor -%}\n {%- endfor -%}\n\n {%- set ordered_column_names = column_superset.keys() -%}\n {%- set dbt_command = flags.WHICH -%}\n\n\n {% if dbt_command in ['run', 'build'] %}\n {% if (include | length > 0 or exclude | length > 0) and not column_superset.keys() %}\n {%- set relations_string -%}\n {%- for relation in relations -%}\n {{ relation.name }}\n {%- if not loop.last %}, {% endif -%}\n {%- endfor -%}\n {%- endset -%}\n\n {%- set error_message -%}\n There were no columns found to union for relations {{ relations_string }}\n {%- endset -%}\n\n {{ exceptions.raise_compiler_error(error_message) }}\n {%- endif -%}\n {%- endif -%}\n\n {%- for relation in relations %}\n\n (\n select\n\n {%- if source_column_name is not none %}\n {# dbt_utils union_relations includes the table in the source_relation. For Fivetran dbt package purposes the table should not be included in the source relation. #}\n cast({{ dbt.string_literal(relation.database ~ '.' ~ relation.schema) }} as {{ dbt.type_string() }}) as {{ source_column_name }},\n {%- endif %}\n\n {% for col_name in ordered_column_names -%}\n\n {%- set col = column_superset[col_name] %}\n {%- set col_type = column_override.get(col.column, col.data_type) %}\n {%- set col_name = adapter.quote(col_name) if col_name in relation_columns[relation] else 'null' %}\n cast({{ col_name }} as {{ col_type }}) as {{ col.quoted }} {% if not loop.last %},{% endif -%}\n\n {%- endfor %}\n \n {# This alias is a change from dbt_utils union_relations code. Avoids errors if the table is named a reserved keyword #}\n from {{ aliases[loop.index0] if aliases else relation }} as unioned_relation_{{ loop.index }}\n\n {% if where -%}\n where {{ where }}\n {%- endif %}\n )\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n\n {%- endfor -%}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.string_literal", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relations", "type": null, "description": ""}, {"name": "aliases", "type": null, "description": ""}, {"name": "column_override", "type": null, "description": ""}, {"name": "include", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "source_column_name", "type": null, "description": ""}, {"name": "where", "type": null, "description": ""}], "created_at": 1783450493.0983727, "supported_languages": null}, "macro.fivetran_utils.apply_source_relation": {"name": "apply_source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/apply_source_relation.sql", "original_file_path": "macros/apply_source_relation.sql", "unique_id": "macro.fivetran_utils.apply_source_relation", "macro_sql": "{% macro apply_source_relation(package_name, use_package_prefix=true) -%}\n\n{{ adapter.dispatch('apply_source_relation', 'fivetran_utils') (package_name, use_package_prefix) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__apply_source_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "package_name", "type": null, "description": ""}, {"name": "use_package_prefix", "type": null, "description": ""}], "created_at": 1783450493.0992315, "supported_languages": null}, "macro.fivetran_utils.default__apply_source_relation": {"name": "default__apply_source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/apply_source_relation.sql", "original_file_path": "macros/apply_source_relation.sql", "unique_id": "macro.fivetran_utils.default__apply_source_relation", "macro_sql": "{% macro default__apply_source_relation(package_name, use_package_prefix=true) -%}\n\n{% set sources_var = package_name ~ '_sources' %}\n{% set database_var = package_name ~ '_database' %}\n{% set schema_var = package_name ~ '_schema' %}\n\n{% if use_package_prefix %}\n {% set union_schemas_var = package_name ~ '_union_schemas' %}\n {% set union_databases_var = package_name ~ '_union_databases' %}\n{% else %}\n {% set union_schemas_var = 'union_schemas' %}\n {% set union_databases_var = 'union_databases' %}\n{% endif %}\n\n{% if var(sources_var, []) | length > 0 %}\n, _dbt_source_relation as source_relation\n{% elif var(union_schemas_var, []) | length > 0 or var(union_databases_var, []) | length > 0 %}\n{{ fivetran_utils.source_relation(union_schema_variable=union_schemas_var, union_database_variable=union_databases_var) }}\n{% else %}\n{% set database = var(database_var, target.database) %}\n{% set schema = var(schema_var, package_name) %}\n, cast('{{ database ~ \".\" ~ schema }}' as {{ dbt.type_string() }}) as source_relation\n{% endif %}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.source_relation", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "package_name", "type": null, "description": ""}, {"name": "use_package_prefix", "type": null, "description": ""}], "created_at": 1783450493.1013465, "supported_languages": null}, "macro.fivetran_utils.source_relation": {"name": "source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/source_relation.sql", "original_file_path": "macros/source_relation.sql", "unique_id": "macro.fivetran_utils.source_relation", "macro_sql": "{% macro source_relation(union_schema_variable='union_schemas', union_database_variable='union_databases') -%}\n\n{{ adapter.dispatch('source_relation', 'fivetran_utils') (union_schema_variable, union_database_variable) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__source_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "union_schema_variable", "type": null, "description": ""}, {"name": "union_database_variable", "type": null, "description": ""}], "created_at": 1783450493.102083, "supported_languages": null}, "macro.fivetran_utils.default__source_relation": {"name": "default__source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/source_relation.sql", "original_file_path": "macros/source_relation.sql", "unique_id": "macro.fivetran_utils.default__source_relation", "macro_sql": "{% macro default__source_relation(union_schema_variable, union_database_variable) %}\n\n{% if var(union_schema_variable, none) %}\n, case\n {% for schema in var(union_schema_variable) %}\n when lower(replace(replace(_dbt_source_relation,'\"',''),'`','')) like '%.{{ schema|lower }}.%' then '{{ schema|lower }}'\n {% endfor %}\n end as source_relation\n{% elif var(union_database_variable, none) %}\n, case\n {% for database in var(union_database_variable) %}\n when lower(replace(replace(_dbt_source_relation,'\"',''),'`','')) like '%{{ database|lower }}.%' then '{{ database|lower }}'\n {% endfor %}\n end as source_relation\n{% else %}\n, cast('' as {{ dbt.type_string() }}) as source_relation\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "union_schema_variable", "type": null, "description": ""}, {"name": "union_database_variable", "type": null, "description": ""}], "created_at": 1783450493.1031969, "supported_languages": null}, "macro.fivetran_utils.fill_staging_columns": {"name": "fill_staging_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fill_staging_columns.sql", "original_file_path": "macros/fill_staging_columns.sql", "unique_id": "macro.fivetran_utils.fill_staging_columns", "macro_sql": "{% macro fill_staging_columns(source_columns, staging_columns) %}\n\n{%- set source_column_names = source_columns|map(attribute='name')|map('lower')|list -%}\n{%- set using_source_casing = var('fivetran_using_source_casing', false) -%}\n\n{%- for column in staging_columns %}\n {%- if column.name|lower in source_column_names %}\n {%- if using_source_casing %}\n {%- set column_alias = column.alias if 'alias' in column else column.name %}\n {{ adapter.quote(column.name) }} as {{ adapter.quote(column_alias|upper if target.type == 'snowflake' else column_alias) }}\n {%- else %}\n {{ fivetran_utils.quote_column(column) }} as\n {%- if 'alias' in column %} {{ column.alias }}{% else %} {{ fivetran_utils.quote_column(column) }}{% endif %}\n {%- endif %}\n {%- else %}\n cast(null as {{ column.datatype }}) as\n {%- if 'alias' in column %} {{ column.alias }}{% else %} {{ fivetran_utils.quote_column(column) }}{% endif %}\n {%- endif %}{{ ',' if not loop.last }}\n{%- endfor %}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.quote_column"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_columns", "type": null, "description": ""}, {"name": "staging_columns", "type": null, "description": ""}], "created_at": 1783450493.1060076, "supported_languages": null}, "macro.fivetran_utils.quote_column": {"name": "quote_column", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fill_staging_columns.sql", "original_file_path": "macros/fill_staging_columns.sql", "unique_id": "macro.fivetran_utils.quote_column", "macro_sql": "{% macro quote_column(column) %}\n {%- if 'quote' in column %}\n {%- if column.quote %}\n {%- if target.type in ('bigquery', 'spark', 'databricks') %}\n `{{ column.name }}`\n {%- elif target.type == 'snowflake' %}\n \"{{ column.name | upper }}\"\n {%- else %}\n \"{{ column.name }}\"\n {%- endif %}\n {%- else %}{{ column.name }}\n {%- endif %}\n {%- else %}{{ column.name }}\n {%- endif %}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}], "created_at": 1783450493.1070619, "supported_languages": null}, "macro.fivetran_utils.first_value": {"name": "first_value", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "unique_id": "macro.fivetran_utils.first_value", "macro_sql": "{% macro first_value(first_value_field, partition_field, order_by_field, order=\"asc\") -%}\n\n{{ adapter.dispatch('first_value', 'fivetran_utils') (first_value_field, partition_field, order_by_field, order) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__first_value"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_value_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "order_by_field", "type": null, "description": ""}, {"name": "order", "type": null, "description": ""}], "created_at": 1783450493.1078198, "supported_languages": null}, "macro.fivetran_utils.default__first_value": {"name": "default__first_value", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "unique_id": "macro.fivetran_utils.default__first_value", "macro_sql": "{% macro default__first_value(first_value_field, partition_field, order_by_field, order=\"asc\") %}\n\n first_value( {{ first_value_field }} ignore nulls ) over (partition by {{ partition_field }} order by {{ order_by_field }} {{ order }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_value_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "order_by_field", "type": null, "description": ""}, {"name": "order", "type": null, "description": ""}], "created_at": 1783450493.1082354, "supported_languages": null}, "macro.fivetran_utils.redshift__first_value": {"name": "redshift__first_value", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "unique_id": "macro.fivetran_utils.redshift__first_value", "macro_sql": "{% macro redshift__first_value(first_value_field, partition_field, order_by_field, order=\"asc\") %}\n\n first_value( {{ first_value_field }} ignore nulls ) over (partition by {{ partition_field }} order by {{ order_by_field }} {{ order }} , {{ partition_field }} rows unbounded preceding )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_value_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "order_by_field", "type": null, "description": ""}, {"name": "order", "type": null, "description": ""}], "created_at": 1783450493.1087031, "supported_languages": null}, "macro.fivetran_utils.ceiling": {"name": "ceiling", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "unique_id": "macro.fivetran_utils.ceiling", "macro_sql": "{% macro ceiling(num) -%}\n\n{{ adapter.dispatch('ceiling', 'fivetran_utils') (num) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__ceiling"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "num", "type": null, "description": ""}], "created_at": 1783450493.109173, "supported_languages": null}, "macro.fivetran_utils.default__ceiling": {"name": "default__ceiling", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "unique_id": "macro.fivetran_utils.default__ceiling", "macro_sql": "{% macro default__ceiling(num) %}\n ceiling({{ num }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "num", "type": null, "description": ""}], "created_at": 1783450493.1093838, "supported_languages": null}, "macro.fivetran_utils.snowflake__ceiling": {"name": "snowflake__ceiling", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "unique_id": "macro.fivetran_utils.snowflake__ceiling", "macro_sql": "{% macro snowflake__ceiling(num) %}\n ceil({{ num }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "num", "type": null, "description": ""}], "created_at": 1783450493.1096144, "supported_languages": null}, "macro.fivetran_utils.json_parse": {"name": "json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.json_parse", "macro_sql": "{% macro json_parse(string, string_path) -%}\n\n{{ adapter.dispatch('json_parse', 'fivetran_utils') (string, string_path) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__json_parse"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1783450493.1107256, "supported_languages": null}, "macro.fivetran_utils.default__json_parse": {"name": "default__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.default__json_parse", "macro_sql": "{% macro default__json_parse(string, string_path) %}\n\n json_extract_path_text({{string}}, {%- for s in string_path -%}'{{ s }}'{%- if not loop.last -%},{%- endif -%}{%- endfor -%} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1783450493.1116366, "supported_languages": null}, "macro.fivetran_utils.redshift__json_parse": {"name": "redshift__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.redshift__json_parse", "macro_sql": "{% macro redshift__json_parse(string, string_path) %}\n\n json_extract_path_text({{string}}, {%- for s in string_path -%}'{{ s }}'{%- if not loop.last -%},{%- endif -%}{%- endfor -%} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1783450493.1121242, "supported_languages": null}, "macro.fivetran_utils.bigquery__json_parse": {"name": "bigquery__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.bigquery__json_parse", "macro_sql": "{% macro bigquery__json_parse(string, string_path) %}\n\n \n json_extract_scalar({{string}}, '$.{%- for s in string_path -%}{{ s }}{%- if not loop.last -%}.{%- endif -%}{%- endfor -%} ')\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1783450493.1126158, "supported_languages": null}, "macro.fivetran_utils.postgres__json_parse": {"name": "postgres__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.postgres__json_parse", "macro_sql": "{% macro postgres__json_parse(string, string_path) %}\n\n {{string}}::json #>> '{ {%- for s in string_path -%}{{ s }}{%- if not loop.last -%},{%- endif -%}{%- endfor -%} }'\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1783450493.1130795, "supported_languages": null}, "macro.fivetran_utils.snowflake__json_parse": {"name": "snowflake__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.snowflake__json_parse", "macro_sql": "{% macro snowflake__json_parse(string, string_path) %}\n\n parse_json( {{string}} ) {%- for s in string_path -%}{% if s is number %}[{{ s }}]{% else %}['{{ s }}']{% endif %}{%- endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1783450493.1136165, "supported_languages": null}, "macro.fivetran_utils.spark__json_parse": {"name": "spark__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.spark__json_parse", "macro_sql": "{% macro spark__json_parse(string, string_path) %}\n\n {{string}} : {%- for s in string_path -%}{% if s is number %}[{{ s }}]{% else %}['{{ s }}']{% endif %}{%- endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1783450493.1141412, "supported_languages": null}, "macro.fivetran_utils.sqlserver__json_parse": {"name": "sqlserver__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.sqlserver__json_parse", "macro_sql": "{% macro sqlserver__json_parse(string, string_path) %}\n\n json_value({{string}}, '$.{%- for s in string_path -%}{{ s }}{%- if not loop.last -%}.{%- endif -%}{%- endfor -%} ')\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1783450493.1146314, "supported_languages": null}, "macro.fivetran_utils.dummy_coalesce_value": {"name": "dummy_coalesce_value", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/dummy_coalesce_value.sql", "original_file_path": "macros/dummy_coalesce_value.sql", "unique_id": "macro.fivetran_utils.dummy_coalesce_value", "macro_sql": "{% macro dummy_coalesce_value(column) %}\n\n{% set coalesce_value = {\n 'STRING': \"'DUMMY_STRING'\",\n 'BOOLEAN': 'null',\n 'INT': 999999999,\n 'FLOAT': 999999999.99,\n 'TIMESTAMP': 'cast(\"2099-12-31\" as timestamp)',\n 'DATE': 'cast(\"2099-12-31\" as date)',\n} %}\n\n{% if column.is_float() %}\n{{ return(coalesce_value['FLOAT']) }}\n\n{% elif column.is_numeric() %}\n{{ return(coalesce_value['INT']) }}\n\n{% elif column.is_string() %}\n{{ return(coalesce_value['STRING']) }}\n\n{% elif column.data_type|lower == 'boolean' %}\n{{ return(coalesce_value['BOOLEAN']) }}\n\n{% elif 'timestamp' in column.data_type|lower %}\n{{ return(coalesce_value['TIMESTAMP']) }}\n\n{% elif 'date' in column.data_type|lower %}\n{{ return(coalesce_value['DATE']) }}\n\n{% elif 'int' in column.data_type|lower %}\n{{ return(coalesce_value['INT']) }}\n\n{% endif %}\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}], "created_at": 1783450493.1171699, "supported_languages": null}, "macro.fivetran_utils.wrap_in_quotes": {"name": "wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.wrap_in_quotes", "macro_sql": "{%- macro wrap_in_quotes(object_to_quote) -%}\n\n{{ return(adapter.dispatch('wrap_in_quotes', 'fivetran_utils')(object_to_quote)) }}\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.fivetran_utils.postgres__wrap_in_quotes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "object_to_quote", "type": null, "description": ""}], "created_at": 1783450493.1178186, "supported_languages": null}, "macro.fivetran_utils.default__wrap_in_quotes": {"name": "default__wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.default__wrap_in_quotes", "macro_sql": "{%- macro default__wrap_in_quotes(object_to_quote) -%}\n{# bigquery, spark, databricks #}\n `{{ object_to_quote }}`\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "object_to_quote", "type": null, "description": ""}], "created_at": 1783450493.1180487, "supported_languages": null}, "macro.fivetran_utils.snowflake__wrap_in_quotes": {"name": "snowflake__wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.snowflake__wrap_in_quotes", "macro_sql": "{%- macro snowflake__wrap_in_quotes(object_to_quote) -%}\n \"{{ object_to_quote | upper }}\"\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "object_to_quote", "type": null, "description": ""}], "created_at": 1783450493.1182802, "supported_languages": null}, "macro.fivetran_utils.redshift__wrap_in_quotes": {"name": "redshift__wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.redshift__wrap_in_quotes", "macro_sql": "{%- macro redshift__wrap_in_quotes(object_to_quote) -%}\n \"{{ object_to_quote }}\"\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "object_to_quote", "type": null, "description": ""}], "created_at": 1783450493.118512, "supported_languages": null}, "macro.fivetran_utils.postgres__wrap_in_quotes": {"name": "postgres__wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.postgres__wrap_in_quotes", "macro_sql": "{%- macro postgres__wrap_in_quotes(object_to_quote) -%}\n \"{{ object_to_quote }}\"\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "object_to_quote", "type": null, "description": ""}], "created_at": 1783450493.1187243, "supported_languages": null}, "macro.fivetran_utils.add_pass_through_columns": {"name": "add_pass_through_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/add_pass_through_columns.sql", "original_file_path": "macros/add_pass_through_columns.sql", "unique_id": "macro.fivetran_utils.add_pass_through_columns", "macro_sql": "{% macro add_pass_through_columns(base_columns, pass_through_var) %}\n\n {% if pass_through_var %}\n\n {% for column in pass_through_var %}\n\n {% if column is mapping %}\n\n {% if column.alias %}\n\n {% do base_columns.append({ \"name\": column.name, \"alias\": column.alias, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n\n {% else %}\n\n {% do base_columns.append({ \"name\": column.name, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n \n {% endif %}\n\n {% else %}\n\n {% do base_columns.append({ \"name\": column, \"datatype\": dbt.type_string()}) %}\n\n {% endif %}\n\n {% endfor %}\n\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_columns", "type": null, "description": ""}, {"name": "pass_through_var", "type": null, "description": ""}], "created_at": 1783450493.120748, "supported_languages": null}, "macro.fivetran_utils.timestamp_diff": {"name": "timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.timestamp_diff", "macro_sql": "{% macro timestamp_diff(first_date, second_date, datepart) %}\n {{ adapter.dispatch('timestamp_diff', 'fivetran_utils')(first_date, second_date, datepart) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__timestamp_diff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783450493.12215, "supported_languages": null}, "macro.fivetran_utils.default__timestamp_diff": {"name": "default__timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.default__timestamp_diff", "macro_sql": "{% macro default__timestamp_diff(first_date, second_date, datepart) %}\n\n datediff(\n {{ datepart }},\n {{ first_date }},\n {{ second_date }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783450493.1225064, "supported_languages": null}, "macro.fivetran_utils.redshift__timestamp_diff": {"name": "redshift__timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.redshift__timestamp_diff", "macro_sql": "{% macro redshift__timestamp_diff(first_date, second_date, datepart) %}\n\n datediff(\n {{ datepart }},\n {{ first_date }},\n {{ second_date }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783450493.122841, "supported_languages": null}, "macro.fivetran_utils.bigquery__timestamp_diff": {"name": "bigquery__timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.bigquery__timestamp_diff", "macro_sql": "{% macro bigquery__timestamp_diff(first_date, second_date, datepart) %}\n\n timestamp_diff(\n {{second_date}},\n {{first_date}},\n {{datepart}}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783450493.1231608, "supported_languages": null}, "macro.fivetran_utils.postgres__timestamp_diff": {"name": "postgres__timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.postgres__timestamp_diff", "macro_sql": "{% macro postgres__timestamp_diff(first_date, second_date, datepart) %}\n\n {% if datepart == 'year' %}\n (date_part('year', ({{second_date}})::date) - date_part('year', ({{first_date}})::date))\n {% elif datepart == 'quarter' %}\n ({{ dbt.datediff(first_date, second_date, 'year') }} * 4 + date_part('quarter', ({{second_date}})::date) - date_part('quarter', ({{first_date}})::date))\n {% elif datepart == 'month' %}\n ({{ dbt.datediff(first_date, second_date, 'year') }} * 12 + date_part('month', ({{second_date}})::date) - date_part('month', ({{first_date}})::date))\n {% elif datepart == 'day' %}\n (({{second_date}})::date - ({{first_date}})::date)\n {% elif datepart == 'week' %}\n ({{ dbt.datediff(first_date, second_date, 'day') }} / 7 + case\n when date_part('dow', ({{first_date}})::timestamp) <= date_part('dow', ({{second_date}})::timestamp) then\n case when {{first_date}} <= {{second_date}} then 0 else -1 end\n else\n case when {{first_date}} <= {{second_date}} then 1 else 0 end\n end)\n {% elif datepart == 'hour' %}\n ({{ dbt.datediff(first_date, second_date, 'day') }} * 24 + date_part('hour', ({{second_date}})::timestamp) - date_part('hour', ({{first_date}})::timestamp))\n {% elif datepart == 'minute' %}\n ({{ dbt.datediff(first_date, second_date, 'hour') }} * 60 + date_part('minute', ({{second_date}})::timestamp) - date_part('minute', ({{first_date}})::timestamp))\n {% elif datepart == 'second' %}\n ({{ dbt.datediff(first_date, second_date, 'minute') }} * 60 + floor(date_part('second', ({{second_date}})::timestamp)) - floor(date_part('second', ({{first_date}})::timestamp)))\n {% elif datepart == 'millisecond' %}\n ({{ dbt.datediff(first_date, second_date, 'minute') }} * 60000 + floor(date_part('millisecond', ({{second_date}})::timestamp)) - floor(date_part('millisecond', ({{first_date}})::timestamp)))\n {% elif datepart == 'microsecond' %}\n ({{ dbt.datediff(first_date, second_date, 'minute') }} * 60000000 + floor(date_part('microsecond', ({{second_date}})::timestamp)) - floor(date_part('microsecond', ({{first_date}})::timestamp)))\n {% else %}\n {{ exceptions.raise_compiler_error(\"Unsupported datepart for macro datediff in postgres: {!r}\".format(datepart)) }}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783450493.126456, "supported_languages": null}, "macro.fivetran_utils.max_bool": {"name": "max_bool", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "unique_id": "macro.fivetran_utils.max_bool", "macro_sql": "{% macro max_bool(boolean_field) -%}\n\n{{ adapter.dispatch('max_bool', 'fivetran_utils') (boolean_field) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__max_bool"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "boolean_field", "type": null, "description": ""}], "created_at": 1783450493.1270025, "supported_languages": null}, "macro.fivetran_utils.default__max_bool": {"name": "default__max_bool", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "unique_id": "macro.fivetran_utils.default__max_bool", "macro_sql": "{% macro default__max_bool(boolean_field) %}\n\n bool_or( {{ boolean_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "boolean_field", "type": null, "description": ""}], "created_at": 1783450493.1272185, "supported_languages": null}, "macro.fivetran_utils.snowflake__max_bool": {"name": "snowflake__max_bool", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "unique_id": "macro.fivetran_utils.snowflake__max_bool", "macro_sql": "{% macro snowflake__max_bool(boolean_field) %}\n\n max( {{ boolean_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "boolean_field", "type": null, "description": ""}], "created_at": 1783450493.1274471, "supported_languages": null}, "macro.fivetran_utils.bigquery__max_bool": {"name": "bigquery__max_bool", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "unique_id": "macro.fivetran_utils.bigquery__max_bool", "macro_sql": "{% macro bigquery__max_bool(boolean_field) %}\n\n max( {{ boolean_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "boolean_field", "type": null, "description": ""}], "created_at": 1783450493.1276574, "supported_languages": null}, "macro.fivetran_utils.fill_pass_through_columns": {"name": "fill_pass_through_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fill_pass_through_columns.sql", "original_file_path": "macros/fill_pass_through_columns.sql", "unique_id": "macro.fivetran_utils.fill_pass_through_columns", "macro_sql": "{% macro fill_pass_through_columns(pass_through_variable) %}\n\n{% if var(pass_through_variable) %}\n {% for field in var(pass_through_variable) %}\n {% if field is mapping %}\n {% if field.transform_sql %}\n , {{ field.transform_sql }} as {{ field.alias if field.alias else field.name }}\n {% else %}\n , {{ field.alias if field.alias else field.name }}\n {% endif %}\n {% else %}\n , {{ field }}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}], "created_at": 1783450493.1289635, "supported_languages": null}, "macro.fivetran_utils.seed_data_helper": {"name": "seed_data_helper", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/seed_data_helper.sql", "original_file_path": "macros/seed_data_helper.sql", "unique_id": "macro.fivetran_utils.seed_data_helper", "macro_sql": "{% macro seed_data_helper(seed_name, warehouses) %}\n\n{% if target.type in warehouses %}\n {% for w in warehouses %}\n {% if target.type == w %}\n {{ return(ref(seed_name ~ \"_\" ~ w ~ \"\")) }}\n {% endif %}\n {% endfor %}\n{% else %}\n{{ return(ref(seed_name)) }}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "seed_name", "type": null, "description": ""}, {"name": "warehouses", "type": null, "description": ""}], "created_at": 1783450493.130027, "supported_languages": null}, "macro.fivetran_utils.remove_prefix_from_columns": {"name": "remove_prefix_from_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/remove_prefix_from_columns.sql", "original_file_path": "macros/remove_prefix_from_columns.sql", "unique_id": "macro.fivetran_utils.remove_prefix_from_columns", "macro_sql": "{% macro remove_prefix_from_columns(columns, prefix='', exclude=[]) %}\n\n {%- for col in columns if col.name not in exclude -%}\n {%- if col.name[:prefix|length]|lower == prefix -%}\n {{ col.name }} as {{ col.name[prefix|length:] }}\n {%- else -%}\n {{ col.name }}\n {%- endif -%}\n {%- if not loop.last -%},{%- endif %}\n {% endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "columns", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}], "created_at": 1783450493.1311834, "supported_languages": null}, "macro.fivetran_utils.timestamp_add": {"name": "timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.timestamp_add", "macro_sql": "{% macro timestamp_add(datepart, interval, from_timestamp) -%}\n\n{{ adapter.dispatch('timestamp_add', 'fivetran_utils') (datepart, interval, from_timestamp) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__timestamp_add"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_timestamp", "type": null, "description": ""}], "created_at": 1783450493.1319542, "supported_languages": null}, "macro.fivetran_utils.default__timestamp_add": {"name": "default__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.default__timestamp_add", "macro_sql": "{% macro default__timestamp_add(datepart, interval, from_timestamp) %}\n\n timestampadd(\n {{ datepart }},\n {{ interval }},\n {{ from_timestamp }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_timestamp", "type": null, "description": ""}], "created_at": 1783450493.1322854, "supported_languages": null}, "macro.fivetran_utils.bigquery__timestamp_add": {"name": "bigquery__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.bigquery__timestamp_add", "macro_sql": "{% macro bigquery__timestamp_add(datepart, interval, from_timestamp) %}\n\n timestamp_add({{ from_timestamp }}, interval {{ interval }} {{ datepart }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_timestamp", "type": null, "description": ""}], "created_at": 1783450493.1327283, "supported_languages": null}, "macro.fivetran_utils.redshift__timestamp_add": {"name": "redshift__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.redshift__timestamp_add", "macro_sql": "{% macro redshift__timestamp_add(datepart, interval, from_timestamp) %}\n\n dateadd(\n {{ datepart }},\n {{ interval }},\n {{ from_timestamp }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_timestamp", "type": null, "description": ""}], "created_at": 1783450493.1330552, "supported_languages": null}, "macro.fivetran_utils.postgres__timestamp_add": {"name": "postgres__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.postgres__timestamp_add", "macro_sql": "{% macro postgres__timestamp_add(datepart, interval, from_timestamp) %}\n\n {{ from_timestamp }} + ((interval '1 {{ datepart }}') * ({{ interval }}))\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_timestamp", "type": null, "description": ""}], "created_at": 1783450493.1333735, "supported_languages": null}, "macro.fivetran_utils.spark__timestamp_add": {"name": "spark__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.spark__timestamp_add", "macro_sql": "{% macro spark__timestamp_add(datepart, interval, from_timestamp) %}\n\n {{ dbt.dateadd(datepart, interval, from_timestamp) }}\n \n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_timestamp", "type": null, "description": ""}], "created_at": 1783450493.13374, "supported_languages": null}, "macro.fivetran_utils.enabled_vars_one_true": {"name": "enabled_vars_one_true", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/enabled_vars_one_true.sql", "original_file_path": "macros/enabled_vars_one_true.sql", "unique_id": "macro.fivetran_utils.enabled_vars_one_true", "macro_sql": "{% macro enabled_vars_one_true(vars) %}\n\n{% for v in vars %}\n \n {% if var(v, False) == True %}\n {{ return(True) }}\n {% endif %}\n\n{% endfor %}\n\n{{ return(False) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "vars", "type": null, "description": ""}], "created_at": 1783450493.1344926, "supported_languages": null}, "macro.fivetran_utils.union_connections": {"name": "union_connections", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_connections.sql", "original_file_path": "macros/union_connections.sql", "unique_id": "macro.fivetran_utils.union_connections", "macro_sql": "{% macro union_connections(connection_dictionary, single_source_name, single_table_name, default_identifier=single_table_name) %}\n\n{{ adapter.dispatch('union_connections', 'fivetran_utils') (connection_dictionary, single_source_name, single_table_name, default_identifier) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__union_connections"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "connection_dictionary", "type": null, "description": ""}, {"name": "single_source_name", "type": null, "description": ""}, {"name": "single_table_name", "type": null, "description": ""}, {"name": "default_identifier", "type": null, "description": ""}], "created_at": 1783450493.1359098, "supported_languages": null}, "macro.fivetran_utils.default__union_connections": {"name": "default__union_connections", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_connections.sql", "original_file_path": "macros/union_connections.sql", "unique_id": "macro.fivetran_utils.default__union_connections", "macro_sql": "{% macro default__union_connections(connection_dictionary, single_source_name, single_table_name, default_identifier=single_table_name) %}\n\n{%- set exception_warning = \"\\n\\nPlease be aware: The \" ~ single_source_name|upper ~ \".\" ~ single_table_name|upper ~ \" table was not found in your schema(s). The Fivetran Data Model will create a completely empty staging model as to not break downstream transformations. To turn off these warnings, set the `fivetran__remove_empty_table_warnings` variable to TRUE (see https://github.com/fivetran/dbt_fivetran_utils/tree/releases/v0.4.latest#union_connections-source for details).\\n\"%}\n{%- set using_empty_table_warnings = (execute and not var('fivetran__remove_empty_table_warnings', false)) %}\n{%- set connections = var(connection_dictionary, []) %}\n{%- set using_unioning = connections | length > 0 %}\n{%- set identifier_var = single_source_name + \"_\" + single_table_name + \"_identifier\" %}\n\n{%- if using_unioning %}\n{# For unioning #}\n {%- set relations = [] -%}\n {%- for connection in connections -%}\n\n {% if var('has_defined_sources', false) %}\n {%- set database = source(connection.name, single_table_name).database %}\n {%- set schema = source(connection.name, single_table_name).schema %}\n {%- set identifier = source(connection.name, single_table_name).identifier %}\n {%- else %}\n {%- set database = connection.database if connection.database else target.database %}\n {%- set schema = connection.schema if connection.schema else single_source_name %}\n {%- set identifier = var(identifier_var, default_identifier) %}\n {%- endif %}\n \n {%- set relation=adapter.get_relation(\n database=database,\n schema=schema,\n identifier=identifier\n )\n -%}\n\n {%- if relation is not none -%}\n {%- do relations.append(relation) -%}\n {%- endif -%}\n\n -- ** Values passed to adapter.get_relation:\n {{ '-- database: ' ~ database }}\n {{ '-- schema: ' ~ schema }}\n {{ '-- identifier: ' ~ identifier ~ '\\n' }}\n\n {%- endfor -%}\n\n {%- if relations | length > 0 -%}\n {{ fivetran_utils.union_relations_custom(relations, source_column_name='_dbt_source_relation') }}\n\n {%- else -%}\n {{ exceptions.warn(exception_warning) if using_empty_table_warnings }}\n\n select\n cast(null as {{ dbt.type_string() }}) as _dbt_source_relation\n limit {{ '0' if target.type != 'redshift' else '1' }}\n {%- endif -%}\n\n{% else %}\n{# Not unioning #}\n\n {%- set database = source(single_source_name, single_table_name).database %}\n {%- set schema = source(single_source_name, single_table_name).schema %}\n {%- set identifier = var(identifier_var, default_identifier) %}\n\n {%- set relation=adapter.get_relation(\n database=database,\n schema=schema,\n identifier=identifier\n )\n -%}\n\n -- ** Values passed to adapter.get_relation:\n {{ '-- full-identifier_var: ' ~ identifier_var }}\n {{ '-- database: ' ~ database }} \n {{ '-- schema: ' ~ schema }}\n {{ '-- identifier: ' ~ identifier ~ '\\n' }}\n\n {% if relation is not none -%}\n select\n {{ dbt_utils.star(from=source(single_source_name, single_table_name)) }}\n from {{ source(single_source_name, single_table_name) }} as source_table\n\n {% else %}\n {{ exceptions.warn(exception_warning) if using_empty_table_warnings }}\n\n select\n cast(null as {{ dbt.type_string() }}) as _dbt_source_relation\n limit {{ '0' if target.type != 'redshift' else '1' }}\n {%- endif -%}\n{% endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.union_relations_custom", "macro.dbt.type_string", "macro.dbt_utils.star"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "connection_dictionary", "type": null, "description": ""}, {"name": "single_source_name", "type": null, "description": ""}, {"name": "single_table_name", "type": null, "description": ""}, {"name": "default_identifier", "type": null, "description": ""}], "created_at": 1783450493.1412659, "supported_languages": null}, "macro.fivetran_utils.partition_by_source_relation": {"name": "partition_by_source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/partition_by_source_relation.sql", "original_file_path": "macros/partition_by_source_relation.sql", "unique_id": "macro.fivetran_utils.partition_by_source_relation", "macro_sql": "{% macro partition_by_source_relation(package_name, has_other_partitions='yes', alias=None, package_prefix_union_variable=true) %}\n {{ return(adapter.dispatch('partition_by_source_relation', 'fivetran_utils')(package_name, has_other_partitions, alias, package_prefix_union_variable)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__partition_by_source_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "package_name", "type": null, "description": ""}, {"name": "has_other_partitions", "type": null, "description": ""}, {"name": "alias", "type": null, "description": ""}, {"name": "package_prefix_union_variable", "type": null, "description": ""}], "created_at": 1783450493.1423013, "supported_languages": null}, "macro.fivetran_utils.default__partition_by_source_relation": {"name": "default__partition_by_source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/partition_by_source_relation.sql", "original_file_path": "macros/partition_by_source_relation.sql", "unique_id": "macro.fivetran_utils.default__partition_by_source_relation", "macro_sql": "{% macro default__partition_by_source_relation(package_name, has_other_partitions='yes', alias=None, package_prefix_union_variable=true) -%}\n\n{%- if package_prefix_union_variable %}\n {%- set union_schemas_var = package_name ~ '_union_schemas' -%}\n {%- set union_databases_var = package_name ~ '_union_databases' -%}\n{%- else %}\n {%- set union_schemas_var = 'union_schemas' -%}\n {%- set union_databases_var = 'union_databases' -%}\n{%- endif -%}\n\n{%- set is_unioning = var(union_schemas_var, [])|length > 1 or var(union_databases_var, [])|length > 1 or var(package_name ~ '_sources', [])|length > 1 -%}\n{%- set prefix = '' if alias is none else alias ~ '.' -%}\n\n{%- if has_other_partitions == 'no' -%}\n {{- 'partition by ' ~ prefix ~ 'source_relation' if is_unioning else '' -}}\n{%- else -%}\n {{- ', ' ~ prefix ~ 'source_relation' if is_unioning else '' -}}\n{%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "package_name", "type": null, "description": ""}, {"name": "has_other_partitions", "type": null, "description": ""}, {"name": "alias", "type": null, "description": ""}, {"name": "package_prefix_union_variable", "type": null, "description": ""}], "created_at": 1783450493.1441221, "supported_languages": null}, "macro.fivetran_utils.persist_pass_through_columns": {"name": "persist_pass_through_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/persist_pass_through_columns.sql", "original_file_path": "macros/persist_pass_through_columns.sql", "unique_id": "macro.fivetran_utils.persist_pass_through_columns", "macro_sql": "{% macro persist_pass_through_columns(pass_through_variable, identifier=none, transform='') %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n , {{ transform ~ '(' ~ (identifier ~ '.' if identifier else '') ~ (field.alias if field.alias else field.name) ~ ')' }} as {{ field.alias if field.alias else field.name }}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "transform", "type": null, "description": ""}], "created_at": 1783450493.1453476, "supported_languages": null}, "macro.fivetran_utils.drop_schemas_automation": {"name": "drop_schemas_automation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/drop_schemas_automation.sql", "original_file_path": "macros/drop_schemas_automation.sql", "unique_id": "macro.fivetran_utils.drop_schemas_automation", "macro_sql": "{% macro drop_schemas_automation(drop_target_schema=true) %}\n {{ return(adapter.dispatch('drop_schemas_automation', 'fivetran_utils')(drop_target_schema)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__drop_schemas_automation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "drop_target_schema", "type": null, "description": ""}], "created_at": 1783450493.1461768, "supported_languages": null}, "macro.fivetran_utils.default__drop_schemas_automation": {"name": "default__drop_schemas_automation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/drop_schemas_automation.sql", "original_file_path": "macros/drop_schemas_automation.sql", "unique_id": "macro.fivetran_utils.default__drop_schemas_automation", "macro_sql": "{% macro default__drop_schemas_automation(drop_target_schema=true) %}\n\n{% set fetch_list_sql %}\n {% if target.type not in ('databricks', 'spark') %}\n select schema_name\n from \n {{ wrap_in_quotes(target.database) }}.INFORMATION_SCHEMA.SCHEMATA\n where lower(schema_name) like '{{ target.schema | lower }}{%- if not drop_target_schema -%}_{%- endif -%}%'\n {% else %}\n SHOW SCHEMAS LIKE '{{ target.schema }}{%- if not drop_target_schema -%}_{%- endif -%}*'\n {% endif %}\n{% endset %}\n\n{% set results = run_query(fetch_list_sql) %}\n\n{% if execute %}\n {% set results_list = results.columns[0].values() %}\n{% else %}\n {% set results_list = [] %}\n{% endif %}\n\n{% for schema_to_drop in results_list %}\n {% do adapter.drop_schema(api.Relation.create(database=target.database, schema=schema_to_drop)) %}\n {{ print('Schema ' ~ schema_to_drop ~ ' successfully dropped from the ' ~ target.database ~ ' database.\\n')}}\n{% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.wrap_in_quotes", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "drop_target_schema", "type": null, "description": ""}], "created_at": 1783450493.148129, "supported_languages": null}, "macro.ad_reporting.get_query": {"name": "get_query", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/get_query.sql", "original_file_path": "macros/get_query.sql", "unique_id": "macro.ad_reporting.get_query", "macro_sql": "{% macro get_query(platform=None, report_type=None, field_mapping=None, relation=None) %}\n\n{%- set consistent_fields = ['spend', 'impressions', 'clicks', 'conversions', 'conversions_value'] -%}\n{%- set account_fields = ['account_id', 'account_name'] -%}\n{%- set campaign_fields = ['campaign_id', 'campaign_name'] -%}\n{%- set ad_group_fields = ['ad_group_id', 'ad_group_name'] -%}\n{%- set ad_fields = ['ad_id', 'ad_name'] -%}\n{%- set url_fields = ['base_url', 'url_host', 'url_path', 'utm_source', 'utm_medium', 'utm_campaign', 'utm_content', 'utm_term'] -%}\n{%- set keyword_fields = ['keyword_id','keyword_text','keyword_match_type'] -%}\n{%- set search_fields = ['keyword_id', 'keyword_text', 'search_match_type', 'search_query'] -%}\n{%- set country_fields = ['country', 'country_code'] -%}\n{%- set region_fields = ['region'] -%}\n\n{%- if field_mapping is not none -%}\n{%- set fields = field_mapping.keys() -%}\n{%- endif -%}\n\n{%- set final_fields_superset={} -%}\n\n{#- Add the consistent_fields and account_fields to all reports regardless of type -#}\n{%- if report_type -%}\n {%- for consistent_field in consistent_fields -%}\n {%- do final_fields_superset.update({consistent_field: consistent_field}) -%}\n {%- endfor -%}\n {%- for account_field in account_fields -%}\n {%- do final_fields_superset.update({account_field: account_field}) -%}\n {%- endfor -%}\n{%- endif -%}\n\n{#- For account level reports and lower, add account_fields -#}\n{%- if report_type in ['campaign', 'ad_group', 'ad', 'url', 'keyword', 'search', 'account', 'country', 'region'] -%}\n {%- for account_field in account_fields -%}\n {#- When campaign_passthrough_metrics are defined, add them too but only to the ad_group report_type -#}\n {%- if report_type == 'account' and var('ad_reporting__account_passthrough_metrics', []) -%}\n {% set account_passthrough_metric_array_of_dicts = var('ad_reporting__account_passthrough_metrics') %}\n {%- for account_passthrough_metric_dict in account_passthrough_metric_array_of_dicts -%}\n {%- for account_passthrough_metric_value in account_passthrough_metric_dict.values() -%}\n\n {#- Add _c suffix if conversions are present in the passthrough metrics -#}\n {%- if account_passthrough_metric_value == 'conversions' or account_passthrough_metric_value == 'conversions_value' -%}\n {%- do final_fields_superset.update({account_passthrough_metric_value ~ '_c': account_passthrough_metric_value}) -%}\n {%- else -%}\n {%- do final_fields_superset.update({account_passthrough_metric_value: account_passthrough_metric_value}) -%}\n {%- endif -%}\n\n {%- endfor -%}\n {%- endfor -%}\n {%- endif -%}\n {%- do final_fields_superset.update({account_field: account_field}) -%}\n {%- endfor -%}\n{%- endif -%}\n\n{#- For campaign level reports and lower, add campaign_fields -#}\n{%- if report_type in ['campaign', 'ad_group', 'ad', 'url', 'keyword', 'search', 'country', 'region'] -%}\n {%- for campaign_field in campaign_fields -%}\n {#- When campaign_passthrough_metrics are defined, add them too but only to the ad_group report_type -#}\n {%- if report_type == 'campaign' and var('ad_reporting__campaign_passthrough_metrics', []) -%}\n {% set campaign_passthrough_metric_array_of_dicts = var('ad_reporting__campaign_passthrough_metrics') %}\n {%- for campaign_passthrough_metric_dict in campaign_passthrough_metric_array_of_dicts -%}\n {%- for campaign_passthrough_metric_value in campaign_passthrough_metric_dict.values() -%}\n\n {#- Add _c suffix if conversions are present in the passthrough metrics -#}\n {%- if campaign_passthrough_metric_value == 'conversions' or campaign_passthrough_metric_value == 'conversions_value' -%}\n {%- do final_fields_superset.update({campaign_passthrough_metric_value ~ '_c': campaign_passthrough_metric_value}) -%}\n {%- else -%}\n {%- do final_fields_superset.update({campaign_passthrough_metric_value: campaign_passthrough_metric_value}) -%}\n {%- endif -%}\n\n {%- endfor -%}\n {%- endfor -%}\n {%- endif -%}\n {%- do final_fields_superset.update({campaign_field: campaign_field}) -%}\n {%- endfor -%}\n{%- endif -%}\n\n{#- For ad_group level reports, equivalent and lower, add ad_group_fields -#}\n{%- if report_type in ['ad_group', 'ad', 'url', 'keyword', 'search'] -%}\n {%- for ad_group_field in ad_group_fields -%}\n {#- When ad_group_passthrough_metrics are defined, add them too but only to the ad_group report_type -#}\n {%- if report_type == 'ad_group' and var('ad_reporting__ad_group_passthrough_metrics', []) -%}\n {% set ad_group_passthrough_metric_array_of_dicts = var('ad_reporting__ad_group_passthrough_metrics') %}\n {%- for ad_group_passthrough_metric_dict in ad_group_passthrough_metric_array_of_dicts -%}\n {%- for ad_group_passthrough_metric_value in ad_group_passthrough_metric_dict.values() -%}\n\n {#- Add _c suffix if conversions are present in the passthrough metrics -#}\n {%- if ad_group_passthrough_metric_value == 'conversions' or ad_group_passthrough_metric_value == 'conversions_value' -%}\n {%- do final_fields_superset.update({ad_group_passthrough_metric_value ~ '_c': ad_group_passthrough_metric_value}) -%}\n {%- else -%}\n {%- do final_fields_superset.update({ad_group_passthrough_metric_value: ad_group_passthrough_metric_value}) -%}\n {%- endif -%}\n\n {%- endfor -%}\n {%- endfor -%}\n {%- endif -%}\n {%- do final_fields_superset.update({ad_group_field: ad_group_field}) -%}\n {%- endfor -%}\n{%- endif -%}\n\n{#- For ad reports, add ad_fields and ad_passthrough_metrics (if any) -#}\n{%- if report_type == 'ad' -%}\n {%- if var('ad_reporting__ad_passthrough_metrics', []) -%}\n {%- set ad_passthrough_metrics_values = [] -%}\n {%- set ad_passthrough_metrics_array_of_dicts = var('ad_reporting__ad_passthrough_metrics') -%}\n {%- for ad_passthrough_metrics_dict in ad_passthrough_metrics_array_of_dicts -%}\n {%- for _, value in ad_passthrough_metrics_dict.items() -%}\n {%- do ad_passthrough_metrics_values.append(value) -%}\n {%- endfor -%}\n {%- endfor -%}\n {%- set combined_ad_fields = ad_fields + ad_passthrough_metrics_values -%}\n {%- else -%}\n {%- set combined_ad_fields = ad_fields -%}\n {%- endif -%}\n {%- for ad_field in combined_ad_fields -%}\n\n {#- Add _c suffix if conversions are present in the passthrough metrics -#}\n {%- if ad_field == 'conversions' or ad_field == 'conversions_value' -%}\n {%- do final_fields_superset.update({ad_field ~ '_c': ad_field}) -%}\n {%- else -%}\n {%- do final_fields_superset.update({ad_field: ad_field}) -%}\n {%- endif -%}\n\n {%- endfor -%}\n{%- endif -%}\n\n{#- For url level reports, add ad_fields and ad_passthrough_metrics (if any) -#}\n{%- if report_type == 'url' -%}\n {%- if var('ad_reporting__ad_passthrough_metrics', []) -%}\n {%- set ad_passthrough_metrics_values = [] -%}\n {%- set ad_passthrough_metrics_array_of_dicts = var('ad_reporting__ad_passthrough_metrics') -%}\n {%- for ad_passthrough_metrics_dict in ad_passthrough_metrics_array_of_dicts -%}\n {%- for _, value in ad_passthrough_metrics_dict.items() -%}\n {%- do ad_passthrough_metrics_values.append(value) -%}\n {%- endfor -%}\n {%- endfor -%}\n {%- set combined_ad_fields = url_fields + ad_passthrough_metrics_values -%}\n {%- else -%}\n {%- set combined_ad_fields = url_fields -%}\n {%- endif -%}\n {%- for ad_field in combined_ad_fields -%}\n\n {#- Add _c suffix if conversions are present in the passthrough metrics -#}\n {%- if ad_field == 'conversions' or ad_field == 'conversions_value' -%}\n {%- do final_fields_superset.update({ad_field ~ '_c': ad_field}) -%}\n {%- else -%}\n {%- do final_fields_superset.update({ad_field: ad_field}) -%}\n {%- endif -%}\n\n {%- endfor -%}\n{%- endif -%}\n\n{#- For keyword level reports, add keyword_fields and keyword_passthrough_metrics (if any) -#}\n{%- if report_type == 'keyword' -%}\n {%- if var('ad_reporting__keyword_passthrough_metrics', []) -%}\n {%- set keyword_passthrough_metrics_values = [] -%}\n {%- set keyword_passthrough_metrics_array_of_dicts = var('ad_reporting__keyword_passthrough_metrics') -%}\n {%- for keyword_passthrough_metrics_dict in keyword_passthrough_metrics_array_of_dicts -%}\n {%- for _, value in keyword_passthrough_metrics_dict.items() -%}\n {%- do keyword_passthrough_metrics_values.append(value) -%}\n\n {%- endfor -%}\n {%- endfor -%}\n {%- set combined_keyword_fields = keyword_fields + keyword_passthrough_metrics_values -%}\n {%- else -%}\n {%- set combined_keyword_fields = keyword_fields -%}\n {%- endif -%}\n {%- for keyword_field in combined_keyword_fields -%}\n\n {#- Add _c suffix if conversions are present in the passthrough metrics -#}\n {%- if keyword_field == 'conversions' or keyword_field == 'conversions_value' -%}\n {%- do final_fields_superset.update({keyword_field ~ '_c': keyword_field}) -%}\n {%- else -%}\n {%- do final_fields_superset.update({keyword_field: keyword_field}) -%}\n {%- endif -%}\n\n {%- endfor -%}\n{%- endif -%}\n\n{#- For search level reports, add search_fields and search_passthrough_metrics (if any) -#}\n{%- if report_type == 'search' -%}\n {%- if var('ad_reporting__search_passthrough_metrics',[]) -%}\n {%- set search_passthrough_metrics_values = [] -%}\n {%- set search_passthrough_metrics_array_of_dicts = var('ad_reporting__search_passthrough_metrics') -%}\n {%- for search_passthrough_metrics_dict in search_passthrough_metrics_array_of_dicts -%}\n {%- for _, value in search_passthrough_metrics_dict.items() -%}\n {%- do search_passthrough_metrics_values.append(value) -%}\n\n {%- endfor -%}\n {%- endfor -%}\n {%- set combined_search_fields = search_fields + search_passthrough_metrics_values -%}\n {%- else -%}\n {%- set combined_search_fields = search_fields -%}\n {%- endif -%}\n {%- for search_field in combined_search_fields -%}\n\n {#- Add _c suffix if conversions are present in the passthrough metrics -#}\n {%- if search_field == 'conversions' or search_field == 'conversions_value' -%}\n {%- do final_fields_superset.update({search_field ~ '_c': search_field}) -%}\n {%- else -%}\n {%- do final_fields_superset.update({search_field: search_field}) -%}\n {%- endif -%}\n\n {%- endfor -%}\n{%- endif -%}\n\n{#- For country level reports and lower (currently not passing to region but perhaps in the future), add country_fields and country_passthrough_metrics -#}\n{%- if report_type == 'country' -%}\n {%- for country_field in country_fields -%}\n {%- if var('ad_reporting__country_passthrough_metrics', []) -%}\n {% set country_passthrough_metric_array_of_dicts = var('ad_reporting__country_passthrough_metrics') %}\n {%- for country_passthrough_metric_dict in country_passthrough_metric_array_of_dicts -%}\n {%- for country_passthrough_metric_value in country_passthrough_metric_dict.values() -%}\n\n {%- do final_fields_superset.update({country_passthrough_metric_value: country_passthrough_metric_value}) -%}\n\n {%- endfor -%}\n {%- endfor -%}\n {%- endif -%}\n {%- do final_fields_superset.update({country_field: country_field}) -%}\n {%- endfor -%}\n{%- endif -%}\n\n{#- For region-level reports, add region_fields and region_passthrough_metrics (if any) -#}\n{%- if report_type == 'region' -%}\n {%- if var('ad_reporting__region_passthrough_metrics',[]) -%}\n {%- set region_passthrough_metrics_values = [] -%}\n {%- set region_passthrough_metrics_array_of_dicts = var('ad_reporting__region_passthrough_metrics') -%}\n {%- for region_passthrough_metrics_dict in region_passthrough_metrics_array_of_dicts -%}\n {%- for _, value in region_passthrough_metrics_dict.items() -%}\n {%- do region_passthrough_metrics_values.append(value) -%}\n\n {%- endfor -%}\n {%- endfor -%}\n {%- set combined_region_fields = region_fields + region_passthrough_metrics_values -%}\n {%- else -%}\n {%- set combined_region_fields = region_fields -%}\n {%- endif -%}\n {%- for region_field in combined_region_fields -%}\n\n {%- do final_fields_superset.update({region_field: region_field}) -%}\n\n {%- endfor -%}\n{%- endif -%}\n\n{%- if field_mapping is not none -%}\n {%- for field in fields -%}\n {%- do final_fields_superset.update({field:field_mapping[field]}) -%}\n {%- endfor -%}\n{%- endif -%}\n\nselect \n source_relation,\n {{ get_date_from_timestamp('date_month' if platform == 'linkedin_ads' and report_type in ('country', 'region') else 'date_day') }} as date_day,\n cast( '{{ platform }}' as {{ dbt.type_string() }}) as platform,\n\n {% for field in final_fields_superset.keys()|sort()|reject('equalto', 'date_month') -%}\n {% if field in consistent_fields and field not in ['spend', 'conversions', 'conversions_value'] -%}\n cast({{ final_fields_superset[field] }} as {{ dbt.type_int() }}) as {{ field }}\n\n {% elif field in ['spend', 'conversions', 'conversions_value'] -%}\n cast({{ final_fields_superset[field] }} as {{ dbt.type_float() }}) as {{ field }}\n\n {% elif '_id' in field or '_name' in field or 'url' in field or 'utm' in field or field in ['keyword_match_type', 'keyword_text', 'search_match_type', 'search_query', 'country', 'country_code', 'region'] -%}\n cast({{ final_fields_superset[field] }} as {{ dbt.type_string() }}) as {{ field }}\n\n {# This is the case for the rest of fields (passthrough_metrics) #}\n {% else %}\n cast({{ final_fields_superset[field] }} as {{ dbt.type_float() }}) as {{ field }}\n {% endif -%}\n {%- if not loop.last -%},{%- endif -%}\n {%- endfor %}\nfrom {{ relation }}\n{% endmacro %}", "depends_on": {"macros": ["macro.ad_reporting.get_date_from_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.dbt.type_float"]}, "description": "This macro compiles the final query with all aliasing and casting incorporated.", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": "ad_reporting://macros/macros_docs.yml", "arguments": [{"name": "platform", "type": "string", "description": "Specifies the platform for the CTE; this value should match exactly one value for the `all_packages` variable within `macros/get_enabled_packages.sql`.\n"}, {"name": "report_type", "type": "string", "description": "Specifies the report type and should map to the respective model; could take on one of the following values ['account', 'campaign', 'ad_group', 'ad', 'url', 'keyword', 'search'].\n"}, {"name": "field_mapping", "type": null, "description": "A dictionary that specifies any column name overriding as necessary since standard names in Ad Reporting may map to a different name as it appears natively within each platform. Each key will have exactly one corresponding string value; if a value is NULL then it will map to the string 'null'.\n"}, {"name": "relation", "type": null, "description": "This is a reference to the upstream model that the query will be selecting from; an example argument would look like this: relation=ref('tiktok_ads__advertiser_report').\n"}], "created_at": 1783450505.5739694, "supported_languages": null}, "macro.ad_reporting.is_enabled": {"name": "is_enabled", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/is_enabled.sql", "original_file_path": "macros/is_enabled.sql", "unique_id": "macro.ad_reporting.is_enabled", "macro_sql": "{% macro is_enabled(enabled_packages) %}\n\n{% if enabled_packages != [] %}\n {% set is_enabled = True %}\n{% else %}\n {% set is_enabled = False %}\n{% endif %}\n{{ return(is_enabled) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "This macro takes in a list of packages and determines if there is at least one package, if there is, it returns True, else false.", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": "ad_reporting://macros/macros_docs.yml", "arguments": [{"name": "enabled_packages", "type": "list[string]", "description": "List of packages enabled where each package name is a string."}], "created_at": 1783450505.5752935, "supported_languages": null}, "macro.ad_reporting.union_ctes": {"name": "union_ctes", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/union_ctes.sql", "original_file_path": "macros/union_ctes.sql", "unique_id": "macro.ad_reporting.union_ctes", "macro_sql": "{% macro union_ctes(ctes=[]) %}\n\n{% for cte in ctes %}\nselect * from {{ cte }}\n\n{% if not loop.last -%}\n union all\n{% endif -%}\n\n{% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "This macro allows for the unioning (union all) of specified CTEs.", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": "ad_reporting://macros/macros_docs.yml", "arguments": [{"name": "ctes", "type": "optional[list[string]]", "description": "List of strings for CTE names"}], "created_at": 1783450505.5761375, "supported_languages": null}, "macro.ad_reporting.get_date_from_timestamp": {"name": "get_date_from_timestamp", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/get_date_from_timestamp.sql", "original_file_path": "macros/get_date_from_timestamp.sql", "unique_id": "macro.ad_reporting.get_date_from_timestamp", "macro_sql": "{% macro get_date_from_timestamp(column) %}\n {{ return(adapter.dispatch('get_date_from_timestamp') (column)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.ad_reporting.default__get_date_from_timestamp"]}, "description": "This macro takes a column of type timestamp or forces the column into a timestamp (depending on the data warehouse) and extracts the date in the format of e.g. 2022-01-01.", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": "ad_reporting://macros/macros_docs.yml", "arguments": [{"name": "column", "type": "string", "description": "Specifies the column of type timestamp to extract the date from."}], "created_at": 1783450505.570758, "supported_languages": null}, "macro.ad_reporting.default__get_date_from_timestamp": {"name": "default__get_date_from_timestamp", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/get_date_from_timestamp.sql", "original_file_path": "macros/get_date_from_timestamp.sql", "unique_id": "macro.ad_reporting.default__get_date_from_timestamp", "macro_sql": "{% macro default__get_date_from_timestamp(column) %}\n date({{column}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}], "created_at": 1783450493.1729412, "supported_languages": null}, "macro.ad_reporting.bigquery__get_date_from_timestamp": {"name": "bigquery__get_date_from_timestamp", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/get_date_from_timestamp.sql", "original_file_path": "macros/get_date_from_timestamp.sql", "unique_id": "macro.ad_reporting.bigquery__get_date_from_timestamp", "macro_sql": "{% macro bigquery__get_date_from_timestamp(column) %}\n\n cast({{column}} as date)\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}], "created_at": 1783450493.173148, "supported_languages": null}, "macro.ad_reporting.spark__get_date_from_timestamp": {"name": "spark__get_date_from_timestamp", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/get_date_from_timestamp.sql", "original_file_path": "macros/get_date_from_timestamp.sql", "unique_id": "macro.ad_reporting.spark__get_date_from_timestamp", "macro_sql": "{% macro spark__get_date_from_timestamp(column) %}\n\n to_date(to_timestamp({{ column }}),'yyyyMMdd')\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}], "created_at": 1783450493.173356, "supported_languages": null}, "macro.ad_reporting.snowflake__get_date_from_timestamp": {"name": "snowflake__get_date_from_timestamp", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/get_date_from_timestamp.sql", "original_file_path": "macros/get_date_from_timestamp.sql", "unique_id": "macro.ad_reporting.snowflake__get_date_from_timestamp", "macro_sql": "{% macro snowflake__get_date_from_timestamp(column) %}\n\n to_date(to_timestamp({{ column }}))\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}], "created_at": 1783450493.1735864, "supported_languages": null}, "macro.ad_reporting.get_enabled_packages": {"name": "get_enabled_packages", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/get_enabled_packages.sql", "original_file_path": "macros/get_enabled_packages.sql", "unique_id": "macro.ad_reporting.get_enabled_packages", "macro_sql": "{% macro get_enabled_packages(exclude=none, include=none) %}\n\n{%- if exclude and include -%}\n {{ exceptions.raise_compiler_error(\"Both an exclude and include list were provided `get_enabled_packages` macro. Only one is allowed\") }}\n{%- endif -%}\n\n{% set all_packages = [\n 'amazon_ads',\n 'apple_search_ads', \n 'facebook_ads', \n 'google_ads', \n 'linkedin_ads',\n 'microsoft_ads', \n 'pinterest_ads',\n 'snapchat_ads',\n 'tiktok_ads',\n 'twitter_ads',\n 'reddit_ads'] %}\n\n{% set enabled_packages = [] %}\n\n{% if include != [] %}\n {% for package in all_packages if var('ad_reporting__' ~ package ~ '_enabled', True) %}\n {% if include is not none %}\n {{ enabled_packages.append(package) if package in include }}\n {% elif exclude is not none %}\n {{ enabled_packages.append(package) if package not in exclude }}\n {% else %}\n {{ enabled_packages.append(package) }}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{{ return(enabled_packages) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "This macro evaluates all `ad_reporting___enabled` variables in the user's `dbt_project.yml` and returns a list of packages that are enabled.", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": "ad_reporting://macros/macros_docs.yml", "arguments": [{"name": "exclude", "type": "optional[list[string]]", "description": "This argument is optional and is the list of platforms to exclude in the enabled package evaluation."}, {"name": "include", "type": "optional[list[string]]", "description": "This argument is optional and is the list of platforms to include in the enabled package evaluation."}], "created_at": 1783450505.5723648, "supported_languages": null}, "macro.ad_reporting.ad_reporting_persist_pass_through_columns": {"name": "ad_reporting_persist_pass_through_columns", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/ad_reporting_persist_pass_through_columns.sql", "original_file_path": "macros/ad_reporting_persist_pass_through_columns.sql", "unique_id": "macro.ad_reporting.ad_reporting_persist_pass_through_columns", "macro_sql": "{% macro ad_reporting_persist_pass_through_columns(pass_through_variable, identifier=none, transform='', coalesce_with=none, alias_fields=[]) %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n {% set field_name = field.alias|default(field.name)|lower if field is mapping else field %}\n , {{ transform ~ '(' ~ ('coalesce(' if coalesce_with is not none else '') ~ (identifier ~ '.' if identifier else '') ~ field_name ~ ('_c' if field_name in alias_fields else '') ~ ((', ' ~ coalesce_with ~ ')') if coalesce_with is not none else '') ~ ')' }} \n as {{ field_name ~ ('_c' if field_name in alias_fields else '') }}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "transform", "type": null, "description": ""}, {"name": "coalesce_with", "type": null, "description": ""}, {"name": "alias_fields", "type": null, "description": ""}], "created_at": 1783450493.1778383, "supported_languages": null}, "macro.ad_reporting.fivetran_convert_timezone": {"name": "fivetran_convert_timezone", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_convert_timezone.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_convert_timezone.sql", "unique_id": "macro.ad_reporting.fivetran_convert_timezone", "macro_sql": "{%- macro fivetran_convert_timezone(column, target_tz=None, source_tz=None) -%}\n {%- set source_tz = \"UTC\" if not source_tz else source_tz -%}\n {%- set target_tz = var(\"dbt_date:time_zone\") if not target_tz else target_tz -%}\n {{ return(adapter.dispatch('fivetran_convert_timezone', 'ad_reporting') (column, target_tz, source_tz)) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.ad_reporting.postgres__fivetran_convert_timezone"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}, {"name": "target_tz", "type": null, "description": ""}, {"name": "source_tz", "type": null, "description": ""}], "created_at": 1783450493.1790957, "supported_languages": null}, "macro.ad_reporting.default__fivetran_convert_timezone": {"name": "default__fivetran_convert_timezone", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_convert_timezone.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_convert_timezone.sql", "unique_id": "macro.ad_reporting.default__fivetran_convert_timezone", "macro_sql": "{% macro default__fivetran_convert_timezone(column, target_tz, source_tz) -%}\n convert_timezone(\n '{{ source_tz }}',\n '{{ target_tz }}',\n cast({{ column }} as {{ dbt.type_timestamp() }})\n )\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}, {"name": "target_tz", "type": null, "description": ""}, {"name": "source_tz", "type": null, "description": ""}], "created_at": 1783450493.1795266, "supported_languages": null}, "macro.ad_reporting.bigquery__fivetran_convert_timezone": {"name": "bigquery__fivetran_convert_timezone", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_convert_timezone.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_convert_timezone.sql", "unique_id": "macro.ad_reporting.bigquery__fivetran_convert_timezone", "macro_sql": "{%- macro bigquery__fivetran_convert_timezone(column, target_tz, source_tz=None) -%}\n timestamp(datetime({{ column }}, '{{ target_tz}}'))\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}, {"name": "target_tz", "type": null, "description": ""}, {"name": "source_tz", "type": null, "description": ""}], "created_at": 1783450493.17984, "supported_languages": null}, "macro.ad_reporting.postgres__fivetran_convert_timezone": {"name": "postgres__fivetran_convert_timezone", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_convert_timezone.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_convert_timezone.sql", "unique_id": "macro.ad_reporting.postgres__fivetran_convert_timezone", "macro_sql": "{% macro postgres__fivetran_convert_timezone(column, target_tz, source_tz) -%}\n cast(\n cast({{ column }} as {{ dbt.type_timestamp() }})\n at time zone '{{ source_tz }}' at time zone '{{ target_tz }}'\n as {{ dbt.type_timestamp() }}\n )\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}, {"name": "target_tz", "type": null, "description": ""}, {"name": "source_tz", "type": null, "description": ""}], "created_at": 1783450493.1803045, "supported_languages": null}, "macro.ad_reporting.redshift__fivetran_convert_timezone": {"name": "redshift__fivetran_convert_timezone", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_convert_timezone.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_convert_timezone.sql", "unique_id": "macro.ad_reporting.redshift__fivetran_convert_timezone", "macro_sql": "{%- macro redshift__fivetran_convert_timezone(column, target_tz, source_tz) -%}\n {{ return(ad_reporting.default__fivetran_convert_timezone(column, target_tz, source_tz)) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.ad_reporting.default__fivetran_convert_timezone"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}, {"name": "target_tz", "type": null, "description": ""}, {"name": "source_tz", "type": null, "description": ""}], "created_at": 1783450493.1807935, "supported_languages": null}, "macro.ad_reporting.duckdb__fivetran_convert_timezone": {"name": "duckdb__fivetran_convert_timezone", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_convert_timezone.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_convert_timezone.sql", "unique_id": "macro.ad_reporting.duckdb__fivetran_convert_timezone", "macro_sql": "{% macro duckdb__fivetran_convert_timezone(column, target_tz, source_tz) -%}\n {{ return(ad_reporting.postgres__fivetran_convert_timezone(column, target_tz, source_tz)) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.ad_reporting.postgres__fivetran_convert_timezone"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}, {"name": "target_tz", "type": null, "description": ""}, {"name": "source_tz", "type": null, "description": ""}], "created_at": 1783450493.1811638, "supported_languages": null}, "macro.ad_reporting.spark__fivetran_convert_timezone": {"name": "spark__fivetran_convert_timezone", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_convert_timezone.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_convert_timezone.sql", "unique_id": "macro.ad_reporting.spark__fivetran_convert_timezone", "macro_sql": "{%- macro spark__fivetran_convert_timezone(column, target_tz, source_tz) -%}\n from_utc_timestamp(\n to_utc_timestamp({{ column }}, '{{ source_tz }}'), '{{ target_tz }}'\n )\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}, {"name": "target_tz", "type": null, "description": ""}, {"name": "source_tz", "type": null, "description": ""}], "created_at": 1783450493.1815119, "supported_languages": null}, "macro.ad_reporting.fivetran_now": {"name": "fivetran_now", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_now.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_now.sql", "unique_id": "macro.ad_reporting.fivetran_now", "macro_sql": "{%- macro fivetran_now(tz=None) -%}\n {{ return(adapter.dispatch('fivetran_now', 'ad_reporting') (tz)) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.ad_reporting.default__fivetran_now"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "tz", "type": null, "description": ""}], "created_at": 1783450493.182021, "supported_languages": null}, "macro.ad_reporting.default__fivetran_now": {"name": "default__fivetran_now", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_now.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_now.sql", "unique_id": "macro.ad_reporting.default__fivetran_now", "macro_sql": "{%- macro default__fivetran_now(tz=None) -%} \n {{ ad_reporting.fivetran_convert_timezone(dbt.current_timestamp(), tz) }}\n{%- endmacro -%}", "depends_on": {"macros": ["macro.ad_reporting.fivetran_convert_timezone", "macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "tz", "type": null, "description": ""}], "created_at": 1783450493.1823437, "supported_languages": null}, "macro.ad_reporting.fivetran_today": {"name": "fivetran_today", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_today.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_today.sql", "unique_id": "macro.ad_reporting.fivetran_today", "macro_sql": "{%- macro fivetran_today(tz=None) -%}\n {{ return(adapter.dispatch('fivetran_today', 'ad_reporting') (tz)) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.ad_reporting.default__fivetran_today"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "tz", "type": null, "description": ""}], "created_at": 1783450493.1828566, "supported_languages": null}, "macro.ad_reporting.default__fivetran_today": {"name": "default__fivetran_today", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_today.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_today.sql", "unique_id": "macro.ad_reporting.default__fivetran_today", "macro_sql": "{%- macro default__fivetran_today(tz=None) -%}\n cast({{ ad_reporting.fivetran_now(tz) }} as date)\n{%- endmacro -%}", "depends_on": {"macros": ["macro.ad_reporting.fivetran_now"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "tz", "type": null, "description": ""}], "created_at": 1783450493.1831403, "supported_languages": null}, "macro.ad_reporting.fivetran_get_intervals_between": {"name": "fivetran_get_intervals_between", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_get_intervals_between.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_get_intervals_between.sql", "unique_id": "macro.ad_reporting.fivetran_get_intervals_between", "macro_sql": "{% macro fivetran_get_intervals_between(start_date, end_date, datepart) -%}\n {{ return(adapter.dispatch('fivetran_get_intervals_between', 'ad_reporting') (start_date, end_date, datepart)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.ad_reporting.default__fivetran_get_intervals_between"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783450493.183858, "supported_languages": null}, "macro.ad_reporting.default__fivetran_get_intervals_between": {"name": "default__fivetran_get_intervals_between", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_get_intervals_between.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_get_intervals_between.sql", "unique_id": "macro.ad_reporting.default__fivetran_get_intervals_between", "macro_sql": "{% macro default__fivetran_get_intervals_between(start_date, end_date, datepart) -%}\n {%- call statement(\"fivetran_get_intervals_between\", fetch_result=True) %}\n\n select {{ dbt.datediff(start_date, end_date, datepart) }}\n\n {%- endcall -%}\n\n {%- set value_list = load_result(\"fivetran_get_intervals_between\") -%}\n\n {%- if value_list and value_list[\"data\"] -%}\n {%- set values = value_list[\"data\"] | map(attribute=0) | list %}\n {{ return(values[0]) }}\n {%- else -%} {{ return(1) }}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783450493.185021, "supported_languages": null}, "macro.ad_reporting.fivetran_date_spine": {"name": "fivetran_date_spine", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_date_spine.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_date_spine.sql", "unique_id": "macro.ad_reporting.fivetran_date_spine", "macro_sql": "{% macro fivetran_date_spine(datepart, start_date, end_date) %}\n {{ return(adapter.dispatch('fivetran_date_spine', 'ad_reporting') (datepart, start_date, end_date)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.ad_reporting.default__fivetran_date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1783450493.1857564, "supported_languages": null}, "macro.ad_reporting.default__fivetran_date_spine": {"name": "default__fivetran_date_spine", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_date_spine.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_date_spine.sql", "unique_id": "macro.ad_reporting.default__fivetran_date_spine", "macro_sql": "{% macro default__fivetran_date_spine(datepart, start_date, end_date) %}\n\n {# call as follows:\n\nfivetran_date_spine(\n \"day\",\n \"to_date('01/01/2016', 'mm/dd/yyyy')\",\n \"dbt.dateadd(week, 1, current_date)\"\n) #}\n with\n rawdata as (\n\n {{\n ad_reporting.fivetran_generate_series(\n ad_reporting.fivetran_get_intervals_between(start_date, end_date, datepart)\n )\n }}\n\n ),\n\n all_periods as (\n\n select\n (\n {{\n dbt.dateadd(\n datepart,\n \"(row_number() over (order by 1) - 1)\",\n start_date,\n )\n }}\n ) as date_{{ datepart }}\n from rawdata\n\n ),\n\n filtered as (\n\n select * from all_periods where date_{{ datepart }} <= {{ end_date }}\n\n )\n\n select *\n from filtered\n\n{% endmacro %}", "depends_on": {"macros": ["macro.ad_reporting.fivetran_generate_series", "macro.ad_reporting.fivetran_get_intervals_between", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1783450493.1864862, "supported_languages": null}, "macro.ad_reporting.fivetran_get_base_dates": {"name": "fivetran_get_base_dates", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_get_base_dates.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_get_base_dates.sql", "unique_id": "macro.ad_reporting.fivetran_get_base_dates", "macro_sql": "{% macro fivetran_get_base_dates(start_date=None, end_date=None, n_dateparts=None, datepart=\"day\") %}\n {{ return(adapter.dispatch('fivetran_get_base_dates', 'ad_reporting') (start_date, end_date, n_dateparts, datepart)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.ad_reporting.default__fivetran_get_base_dates"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}, {"name": "n_dateparts", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783450493.1876152, "supported_languages": null}, "macro.ad_reporting.default__fivetran_get_base_dates": {"name": "default__fivetran_get_base_dates", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_get_base_dates.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_get_base_dates.sql", "unique_id": "macro.ad_reporting.default__fivetran_get_base_dates", "macro_sql": "{% macro default__fivetran_get_base_dates(start_date, end_date, n_dateparts, datepart) %}\n\n {%- if start_date and end_date -%}\n {%- set start_date = (\n \"cast('\" ~ start_date ~ \"' as \" ~ dbt.type_timestamp() ~ \")\"\n ) -%}\n {%- set end_date = (\n \"cast('\" ~ end_date ~ \"' as \" ~ dbt.type_timestamp() ~ \")\"\n ) -%}\n\n {%- elif n_dateparts and datepart -%}\n\n {%- set start_date = dbt.dateadd(\n datepart, -1 * n_dateparts, ad_reporting.fivetran_today()\n ) -%}\n {%- set end_date = ad_reporting.fivetran_tomorrow() -%}\n {%- endif -%}\n\n with\n date_spine as (\n\n {{\n ad_reporting.fivetran_date_spine(\n datepart=datepart,\n start_date=start_date,\n end_date=end_date,\n )\n }}\n\n )\n select\n cast(d.date_{{ datepart }} as {{ dbt.type_timestamp() }}) as date_{{ datepart }}\n from date_spine d\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.dateadd", "macro.ad_reporting.fivetran_today", "macro.ad_reporting.fivetran_tomorrow", "macro.ad_reporting.fivetran_date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}, {"name": "n_dateparts", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783450493.1892147, "supported_languages": null}, "macro.ad_reporting.bigquery__fivetran_get_base_dates": {"name": "bigquery__fivetran_get_base_dates", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_get_base_dates.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_get_base_dates.sql", "unique_id": "macro.ad_reporting.bigquery__fivetran_get_base_dates", "macro_sql": "{% macro bigquery__fivetran_get_base_dates(start_date, end_date, n_dateparts, datepart) %}\n\n {%- if start_date and end_date -%}\n {%- set start_date = \"cast('\" ~ start_date ~ \"' as datetime )\" -%}\n {%- set end_date = \"cast('\" ~ end_date ~ \"' as datetime )\" -%}\n\n {%- elif n_dateparts and datepart -%}\n\n {%- set start_date = dbt.dateadd(\n datepart, -1 * n_dateparts, ad_reporting.fivetran_today()\n ) -%}\n {%- set end_date = ad_reporting.fivetran_tomorrow() -%}\n {%- endif -%}\n\n with\n date_spine as (\n\n {{\n ad_reporting.fivetran_date_spine(\n datepart=datepart,\n start_date=start_date,\n end_date=end_date,\n )\n }}\n\n )\n select\n cast(d.date_{{ datepart }} as {{ dbt.type_timestamp() }}) as date_{{ datepart }}\n from date_spine d\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.dateadd", "macro.ad_reporting.fivetran_today", "macro.ad_reporting.fivetran_tomorrow", "macro.ad_reporting.fivetran_date_spine", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}, {"name": "n_dateparts", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783450493.1905658, "supported_languages": null}, "macro.ad_reporting.fivetran_tomorrow": {"name": "fivetran_tomorrow", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_tomorrow.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_tomorrow.sql", "unique_id": "macro.ad_reporting.fivetran_tomorrow", "macro_sql": "{%- macro fivetran_tomorrow(date=None, tz=None) -%}\n {{ return(adapter.dispatch('fivetran_tomorrow', 'ad_reporting') (date, tz)) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.ad_reporting.default__fivetran_tomorrow"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "date", "type": null, "description": ""}, {"name": "tz", "type": null, "description": ""}], "created_at": 1783450493.1911435, "supported_languages": null}, "macro.ad_reporting.default__fivetran_tomorrow": {"name": "default__fivetran_tomorrow", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_tomorrow.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_tomorrow.sql", "unique_id": "macro.ad_reporting.default__fivetran_tomorrow", "macro_sql": "{%- macro default__fivetran_tomorrow(date=None, tz=None) -%}\n {{ ad_reporting.fivetran_n_days_away(1, date, tz) }}\n{%- endmacro -%}", "depends_on": {"macros": ["macro.ad_reporting.fivetran_n_days_away"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "date", "type": null, "description": ""}, {"name": "tz", "type": null, "description": ""}], "created_at": 1783450493.1915305, "supported_languages": null}, "macro.ad_reporting.fivetran_n_days_away": {"name": "fivetran_n_days_away", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_n_days_away.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_n_days_away.sql", "unique_id": "macro.ad_reporting.fivetran_n_days_away", "macro_sql": "{%- macro fivetran_n_days_away(n, date=None, tz=None) -%}\n {{ return(adapter.dispatch('fivetran_n_days_away', 'ad_reporting') (n, date, tz)) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.ad_reporting.default__fivetran_n_days_away"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "n", "type": null, "description": ""}, {"name": "date", "type": null, "description": ""}, {"name": "tz", "type": null, "description": ""}], "created_at": 1783450493.1921349, "supported_languages": null}, "macro.ad_reporting.default__fivetran_n_days_away": {"name": "default__fivetran_n_days_away", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_n_days_away.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_n_days_away.sql", "unique_id": "macro.ad_reporting.default__fivetran_n_days_away", "macro_sql": "{%- macro default__fivetran_n_days_away(n, date=None, tz=None) -%}\n {{ ad_reporting.fivetran_n_days_ago(-1 * n, date, tz) }}\n{%- endmacro -%}", "depends_on": {"macros": ["macro.ad_reporting.fivetran_n_days_ago"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "n", "type": null, "description": ""}, {"name": "date", "type": null, "description": ""}, {"name": "tz", "type": null, "description": ""}], "created_at": 1783450493.1925645, "supported_languages": null}, "macro.ad_reporting.fivetran_n_days_ago": {"name": "fivetran_n_days_ago", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_n_days_ago.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_n_days_ago.sql", "unique_id": "macro.ad_reporting.fivetran_n_days_ago", "macro_sql": "{%- macro fivetran_n_days_ago(n, date=None, tz=None) -%}\n {{ return(adapter.dispatch('fivetran_n_days_ago', 'ad_reporting') (n, date, tz)) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.ad_reporting.default__fivetran_n_days_ago"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "n", "type": null, "description": ""}, {"name": "date", "type": null, "description": ""}, {"name": "tz", "type": null, "description": ""}], "created_at": 1783450493.1931887, "supported_languages": null}, "macro.ad_reporting.default__fivetran_n_days_ago": {"name": "default__fivetran_n_days_ago", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_n_days_ago.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_n_days_ago.sql", "unique_id": "macro.ad_reporting.default__fivetran_n_days_ago", "macro_sql": "{%- macro default__fivetran_n_days_ago(n, date=None, tz=None) -%}\n {%-set dt = date if date else ad_reporting.fivetran_today(tz) -%}\n {%- set n = n|int -%}\n cast({{ dbt.dateadd('day', -1 * n, dt) }} as date)\n{%- endmacro -%}", "depends_on": {"macros": ["macro.ad_reporting.fivetran_today", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "n", "type": null, "description": ""}, {"name": "date", "type": null, "description": ""}, {"name": "tz", "type": null, "description": ""}], "created_at": 1783450493.1938822, "supported_languages": null}, "macro.ad_reporting.fivetran_get_powers_of_two": {"name": "fivetran_get_powers_of_two", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_get_powers_of_two.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_get_powers_of_two.sql", "unique_id": "macro.ad_reporting.fivetran_get_powers_of_two", "macro_sql": "{% macro fivetran_get_powers_of_two(upper_bound) %}\n {{ return(adapter.dispatch('fivetran_get_powers_of_two', 'ad_reporting') (upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.ad_reporting.default__fivetran_get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1783450493.1944828, "supported_languages": null}, "macro.ad_reporting.default__fivetran_get_powers_of_two": {"name": "default__fivetran_get_powers_of_two", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_get_powers_of_two.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_get_powers_of_two.sql", "unique_id": "macro.ad_reporting.default__fivetran_get_powers_of_two", "macro_sql": "{% macro default__fivetran_get_powers_of_two(upper_bound) %}\n\n {% if upper_bound <= 0 %}\n {{ exceptions.raise_compiler_error(\"upper bound must be positive\") }}\n {% endif %}\n\n {% for _ in range(1, 100) %}\n {% if upper_bound <= 2**loop.index %} {{ return(loop.index) }}{% endif %}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1783450493.1952724, "supported_languages": null}, "macro.ad_reporting.fivetran_generate_series": {"name": "fivetran_generate_series", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_generate_series.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_generate_series.sql", "unique_id": "macro.ad_reporting.fivetran_generate_series", "macro_sql": "{% macro fivetran_generate_series(upper_bound) %}\n {{ return(adapter.dispatch('fivetran_generate_series', 'ad_reporting') (upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.ad_reporting.default__fivetran_generate_series"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1783450493.1959534, "supported_languages": null}, "macro.ad_reporting.default__fivetran_generate_series": {"name": "default__fivetran_generate_series", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_generate_series.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_generate_series.sql", "unique_id": "macro.ad_reporting.default__fivetran_generate_series", "macro_sql": "{% macro default__fivetran_generate_series(upper_bound) %}\n\n {% set n = ad_reporting.fivetran_get_powers_of_two(upper_bound) %}\n\n with\n p as (\n select 0 as generated_number\n union all\n select 1\n ),\n unioned as (\n\n select\n\n {% for i in range(n) %}\n p{{ i }}.generated_number * power(2, {{ i }})\n {% if not loop.last %} + {% endif %}\n {% endfor %}\n + 1 as generated_number\n\n from\n\n {% for i in range(n) %}\n p as p{{ i }} {% if not loop.last %} cross join {% endif %}\n {% endfor %}\n\n )\n\n select *\n from unioned\n where generated_number <= {{ upper_bound }}\n order by generated_number\n\n{% endmacro %}", "depends_on": {"macros": ["macro.ad_reporting.fivetran_get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1783450493.1969938, "supported_languages": null}, "macro.tiktok_ads.tiktok_ads_persist_pass_through_columns": {"name": "tiktok_ads_persist_pass_through_columns", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/tiktok_ads_persist_pass_through_columns.sql", "original_file_path": "macros/tiktok_ads_persist_pass_through_columns.sql", "unique_id": "macro.tiktok_ads.tiktok_ads_persist_pass_through_columns", "macro_sql": "{% macro tiktok_ads_persist_pass_through_columns(pass_through_variable, identifier=none, transform='', coalesce_with=none, exclude_fields=[]) %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n {% set field_name = field.alias|default(field.name)|lower if field is mapping else field %}\n {% if field_name not in exclude_fields %}\n , {{ transform ~ '(' ~ ('coalesce(' if coalesce_with is not none else '') ~ (identifier ~ '.' if identifier else '') ~ field_name ~ ((', ' ~ coalesce_with ~ ')') if coalesce_with is not none else '') ~ ')' }} as {{ field_name }}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "transform", "type": null, "description": ""}, {"name": "coalesce_with", "type": null, "description": ""}, {"name": "exclude_fields", "type": null, "description": ""}], "created_at": 1783450493.1988442, "supported_languages": null}, "macro.tiktok_ads.get_advertiser_columns": {"name": "get_advertiser_columns", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/staging/get_advertiser_columns.sql", "original_file_path": "macros/staging/get_advertiser_columns.sql", "unique_id": "macro.tiktok_ads.get_advertiser_columns", "macro_sql": "{% macro get_advertiser_columns() %}\n\n{% set columns = [\n {\"name\": \"address\", \"datatype\": dbt.type_string()},\n {\"name\": \"balance\", \"datatype\": dbt.type_float()},\n {\"name\": \"cellphone_number\", \"datatype\": dbt.type_string()},\n {\"name\": \"company\", \"datatype\": dbt.type_string()},\n {\"name\": \"contacter\", \"datatype\": dbt.type_string()},\n {\"name\": \"country\", \"datatype\": dbt.type_string()},\n {\"name\": \"currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"email\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"industry\", \"datatype\": dbt.type_string()},\n {\"name\": \"language\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"phone_number\", \"datatype\": dbt.type_string()},\n {\"name\": \"telephone\", \"datatype\": dbt.type_string()},\n {\"name\": \"telephone_number\", \"datatype\": dbt.type_string()},\n {\"name\": \"timezone\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_float", "macro.dbt.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.202223, "supported_languages": null}, "macro.tiktok_ads.tiktok_ads_extract_url_parameter": {"name": "tiktok_ads_extract_url_parameter", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/staging/tiktok_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/tiktok_ads_extract_url_parameters.sql", "unique_id": "macro.tiktok_ads.tiktok_ads_extract_url_parameter", "macro_sql": "{% macro tiktok_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ return(adapter.dispatch('tiktok_ads_extract_url_parameter', 'tiktok_ads') (field, url_parameter)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.tiktok_ads.default__tiktok_ads_extract_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450493.202872, "supported_languages": null}, "macro.tiktok_ads.default__tiktok_ads_extract_url_parameter": {"name": "default__tiktok_ads_extract_url_parameter", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/staging/tiktok_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/tiktok_ads_extract_url_parameters.sql", "unique_id": "macro.tiktok_ads.default__tiktok_ads_extract_url_parameter", "macro_sql": "{% macro default__tiktok_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ dbt_utils.get_url_parameter(field, url_parameter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450493.2031722, "supported_languages": null}, "macro.tiktok_ads.spark__tiktok_ads_extract_url_parameter": {"name": "spark__tiktok_ads_extract_url_parameter", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/staging/tiktok_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/tiktok_ads_extract_url_parameters.sql", "unique_id": "macro.tiktok_ads.spark__tiktok_ads_extract_url_parameter", "macro_sql": "{% macro spark__tiktok_ads_extract_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"=([^&]+)'\" -%}\nnullif(regexp_extract({{ field }}, {{ formatted_url_parameter }}, 1), '')\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450493.2035904, "supported_languages": null}, "macro.tiktok_ads.get_ad_report_hourly_columns": {"name": "get_ad_report_hourly_columns", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/staging/get_ad_report_hourly_columns.sql", "original_file_path": "macros/staging/get_ad_report_hourly_columns.sql", "unique_id": "macro.tiktok_ads.get_ad_report_hourly_columns", "macro_sql": "{% macro get_ad_report_hourly_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_id\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"average_video_play\", \"datatype\": dbt.type_float()},\n {\"name\": \"average_video_play_per_user\", \"datatype\": dbt.type_float()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"comments\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"conversion\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversion_rate\", \"datatype\": dbt.type_float()},\n {\"name\": \"cost_per_conversion\", \"datatype\": dbt.type_float()},\n {\"name\": \"cpc\", \"datatype\": dbt.type_float()},\n {\"name\": \"cpm\", \"datatype\": dbt.type_float()},\n {\"name\": \"ctr\", \"datatype\": dbt.type_float()},\n {\"name\": \"follows\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"likes\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"profile_visits\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"real_time_conversion\", \"datatype\": dbt.type_int()},\n {\"name\": \"reach\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"shares\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"spend\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"stat_time_hour\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"total_purchase_value\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"total_sales_lead_value\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_play_actions\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_views_p_25\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_views_p_50\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_views_p_75\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_watched_2_s\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_watched_6_s\", \"datatype\": dbt.type_numeric()}\n] %}\n \n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ tiktok_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('tiktok_ads__ad_hourly_passthrough_metrics'), except_fields=[\"real_time_conversion\", \"total_purchase_value\", \"total_sales_lead_value\"]) }}\n\n{{ return(columns) }} \n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_numeric", "macro.dbt.type_float", "macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.tiktok_ads.tiktok_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.2091317, "supported_languages": null}, "macro.tiktok_ads.get_ad_history_columns": {"name": "get_ad_history_columns", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/staging/get_ad_history_columns.sql", "original_file_path": "macros/staging/get_ad_history_columns.sql", "unique_id": "macro.tiktok_ads.get_ad_history_columns", "macro_sql": "{% macro get_ad_history_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_id\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"ad_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"adgroup_id\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"advertiser_id\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"call_to_action\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"click_tracking_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"impression_tracking_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"landing_page_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_numeric", "macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.2112663, "supported_languages": null}, "macro.tiktok_ads.get_location_columns": {"name": "get_location_columns", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/staging/get_location_columns.sql", "original_file_path": "macros/staging/get_location_columns.sql", "unique_id": "macro.tiktok_ads.get_location_columns", "macro_sql": "{% macro get_location_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"advertiser_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"area_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"country_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"parent_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"region_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"region_level\", \"datatype\": dbt.type_string()},\n {\"name\": \"region_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"support_below_18\", \"datatype\": dbt.type_boolean()} \n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_boolean"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.2131896, "supported_languages": null}, "macro.tiktok_ads.get_campaign_country_report_columns": {"name": "get_campaign_country_report_columns", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/staging/get_campaign_country_report_columns.sql", "original_file_path": "macros/staging/get_campaign_country_report_columns.sql", "unique_id": "macro.tiktok_ads.get_campaign_country_report_columns", "macro_sql": "{% macro get_campaign_country_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversion\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversion_rate\", \"datatype\": dbt.type_float()},\n {\"name\": \"cost_per_conversion\", \"datatype\": dbt.type_float()},\n {\"name\": \"country_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"cpc\", \"datatype\": dbt.type_float()},\n {\"name\": \"cpm\", \"datatype\": dbt.type_float()},\n {\"name\": \"ctr\", \"datatype\": dbt.type_float()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"real_time_conversion\", \"datatype\": dbt.type_int()},\n {\"name\": \"spend\", \"datatype\": dbt.type_float()},\n {\"name\": \"stat_time_day\", \"datatype\": dbt.type_timestamp()}\n] %}\n{{ tiktok_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('tiktok_ads__campaign_country_report_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_float", "macro.dbt.type_string", "macro.tiktok_ads.tiktok_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.2161264, "supported_languages": null}, "macro.tiktok_ads.get_campaign_report_hourly_columns": {"name": "get_campaign_report_hourly_columns", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/staging/get_campaign_report_hourly_columns.sql", "original_file_path": "macros/staging/get_campaign_report_hourly_columns.sql", "unique_id": "macro.tiktok_ads.get_campaign_report_hourly_columns", "macro_sql": "{% macro get_campaign_report_hourly_columns() %}\n\n{% set columns = [\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"average_video_play\", \"datatype\": dbt.type_float()},\n {\"name\": \"average_video_play_per_user\", \"datatype\": dbt.type_float()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"comments\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"conversion\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversion_rate\", \"datatype\": dbt.type_float()},\n {\"name\": \"cost_per_conversion\", \"datatype\": dbt.type_float()},\n {\"name\": \"cpc\", \"datatype\": dbt.type_float()},\n {\"name\": \"cpm\", \"datatype\": dbt.type_float()},\n {\"name\": \"ctr\", \"datatype\": dbt.type_float()},\n {\"name\": \"follows\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"likes\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"profile_visits\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"reach\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"real_time_conversion\", \"datatype\": dbt.type_int()},\n {\"name\": \"shares\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"spend\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"stat_time_hour\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"total_purchase_value\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"total_sales_lead_value\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_play_actions\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_views_p_25\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_views_p_50\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_views_p_75\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_watched_2_s\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_watched_6_s\", \"datatype\": dbt.type_numeric()}\n] %}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ tiktok_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('tiktok_ads__campaign_hourly_passthrough_metrics'), except_fields=[\"real_time_conversion\", \"total_purchase_value\", \"total_sales_lead_value\"]) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_numeric", "macro.dbt.type_float", "macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.tiktok_ads.tiktok_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.2215462, "supported_languages": null}, "macro.tiktok_ads.tiktok_ads_fill_pass_through_columns": {"name": "tiktok_ads_fill_pass_through_columns", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/staging/tiktok_ads_fill_pass_through_columns.sql", "original_file_path": "macros/staging/tiktok_ads_fill_pass_through_columns.sql", "unique_id": "macro.tiktok_ads.tiktok_ads_fill_pass_through_columns", "macro_sql": "{% macro tiktok_ads_fill_pass_through_columns(pass_through_fields, except_fields=[]) %}\n\n{% if pass_through_fields %}\n {% for field in pass_through_fields %}\n {% if (field.alias if field.alias else field.name) not in except_fields %}\n {% if field.transform_sql %}\n , coalesce(cast({{ field.transform_sql }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% else %}\n , coalesce(cast({{ field.alias if field.alias else field.name }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% endif %}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except_fields", "type": null, "description": ""}], "created_at": 1783450493.223213, "supported_languages": null}, "macro.tiktok_ads.tiktok_ads_add_pass_through_columns": {"name": "tiktok_ads_add_pass_through_columns", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/staging/tiktok_ads_add_pass_through_columns.sql", "original_file_path": "macros/staging/tiktok_ads_add_pass_through_columns.sql", "unique_id": "macro.tiktok_ads.tiktok_ads_add_pass_through_columns", "macro_sql": "{% macro tiktok_ads_add_pass_through_columns(base_columns, pass_through_fields, except_fields=[]) %}\n\n{% if pass_through_fields %}\n {% for column in pass_through_fields %}\n\n {% if column is mapping %}\n {% set col_name = column.alias|default(column.name)|lower %}\n\n {% if col_name not in except_fields %}\n {% if column.alias %}\n {% do base_columns.append({ \"name\": column.name, \"alias\": column.alias, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% else %}\n {% do base_columns.append({ \"name\": column.name, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% else %}\n {% if column|lower not in except_fields %}\n {% do base_columns.append({ \"name\": column, \"datatype\": dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_columns", "type": null, "description": ""}, {"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except_fields", "type": null, "description": ""}], "created_at": 1783450493.2257054, "supported_languages": null}, "macro.tiktok_ads.get_ad_group_report_hourly_columns": {"name": "get_ad_group_report_hourly_columns", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/staging/get_ad_group_report_hourly_columns.sql", "original_file_path": "macros/staging/get_ad_group_report_hourly_columns.sql", "unique_id": "macro.tiktok_ads.get_ad_group_report_hourly_columns", "macro_sql": "{% macro get_ad_group_report_hourly_columns() %}\n\n{% set columns = [\n {\"name\": \"adgroup_id\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"average_video_play\", \"datatype\": dbt.type_float()},\n {\"name\": \"average_video_play_per_user\", \"datatype\": dbt.type_float()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"comments\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"conversion\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversion_rate\", \"datatype\": dbt.type_float()},\n {\"name\": \"cost_per_conversion\", \"datatype\": dbt.type_float()},\n {\"name\": \"cpc\", \"datatype\": dbt.type_float()},\n {\"name\": \"cpm\", \"datatype\": dbt.type_float()},\n {\"name\": \"ctr\", \"datatype\": dbt.type_float()},\n {\"name\": \"follows\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"likes\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"profile_visits\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"reach\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"real_time_conversion\", \"datatype\": dbt.type_int()},\n {\"name\": \"shares\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"spend\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"stat_time_hour\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"total_purchase_value\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"total_sales_lead_value\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_play_actions\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_views_p_25\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_views_p_50\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_views_p_75\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_watched_2_s\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_watched_6_s\", \"datatype\": dbt.type_numeric()}\n] %}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ tiktok_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('tiktok_ads__ad_group_hourly_passthrough_metrics'), except_fields=[\"real_time_conversion\", \"total_purchase_value\", \"total_sales_lead_value\"]) }}\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_numeric", "macro.dbt.type_float", "macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.tiktok_ads.tiktok_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.2311609, "supported_languages": null}, "macro.tiktok_ads.get_campaign_history_columns": {"name": "get_campaign_history_columns", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/staging/get_campaign_history_columns.sql", "original_file_path": "macros/staging/get_campaign_history_columns.sql", "unique_id": "macro.tiktok_ads.get_campaign_history_columns", "macro_sql": "{% macro get_campaign_history_columns() %}\n\n{% set columns = [\n {\"name\": \"advertiser_id\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"campaign_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"split_test_variable\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"objective_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"budget\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"budget_mode\", \"datatype\": dbt.type_string()},\n {\"name\": \"create_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"is_new_structure\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_numeric", "macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.2336347, "supported_languages": null}, "macro.tiktok_ads.get_ad_group_history_columns": {"name": "get_ad_group_history_columns", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/staging/get_ad_group_history_columns.sql", "original_file_path": "macros/staging/get_ad_group_history_columns.sql", "unique_id": "macro.tiktok_ads.get_ad_group_history_columns", "macro_sql": "{% macro get_ad_group_history_columns() %}\n\n{% set columns = [\n {\"name\": \"action_days\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"adgroup_id\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"adgroup_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"advertiser_id\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"audience_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"budget\", \"datatype\": dbt.type_float()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"category\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"display_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"frequency\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"frequency_schedule\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"gender\", \"datatype\": dbt.type_string()},\n {\"name\": \"landing_page_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"interest_category_v_2\", \"datatype\": dbt.type_string()},\n {\"name\": \"action_categories\", \"datatype\": dbt.type_string()},\n {\"name\": \"age_groups\", \"datatype\": dbt.type_string()},\n {\"name\": \"languages\", \"datatype\": dbt.type_string()}\n\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_numeric", "macro.dbt.type_string", "macro.dbt.type_float", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.237041, "supported_languages": null}, "macro.microsoft_ads.microsoft_ads_persist_pass_through_columns": {"name": "microsoft_ads_persist_pass_through_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/microsoft_ads_persist_pass_through_columns.sql", "original_file_path": "macros/microsoft_ads_persist_pass_through_columns.sql", "unique_id": "macro.microsoft_ads.microsoft_ads_persist_pass_through_columns", "macro_sql": "{% macro microsoft_ads_persist_pass_through_columns(pass_through_variable, identifier=none, transform='', coalesce_with=none, exclude_fields=[]) %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n {% set field_name = field.alias|default(field.name)|lower if field is mapping else field %}\n {% set original_name = field.name if field is mapping else field %}\n \n {% if field_name not in exclude_fields and original_name not in exclude_fields %}\n , {{ transform ~ '(' ~ ('coalesce(' if coalesce_with is not none else '') ~ (identifier ~ '.' if identifier else '') ~ field_name ~ ((', ' ~ coalesce_with ~ ')') if coalesce_with is not none else '') ~ ')' }} as {{ field_name }}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "transform", "type": null, "description": ""}, {"name": "coalesce_with", "type": null, "description": ""}, {"name": "exclude_fields", "type": null, "description": ""}], "created_at": 1783450493.2391033, "supported_languages": null}, "macro.microsoft_ads.microsoft_ads_extract_url_parameter": {"name": "microsoft_ads_extract_url_parameter", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/microsoft_ads_extract_url_parameters.sql", "original_file_path": "macros/microsoft_ads_extract_url_parameters.sql", "unique_id": "macro.microsoft_ads.microsoft_ads_extract_url_parameter", "macro_sql": "{% macro microsoft_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ return(adapter.dispatch('microsoft_ads_extract_url_parameter', 'microsoft_ads') (field, url_parameter)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.microsoft_ads.default__microsoft_ads_extract_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450493.239741, "supported_languages": null}, "macro.microsoft_ads.default__microsoft_ads_extract_url_parameter": {"name": "default__microsoft_ads_extract_url_parameter", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/microsoft_ads_extract_url_parameters.sql", "original_file_path": "macros/microsoft_ads_extract_url_parameters.sql", "unique_id": "macro.microsoft_ads.default__microsoft_ads_extract_url_parameter", "macro_sql": "{% macro default__microsoft_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ dbt_utils.get_url_parameter(field, url_parameter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450493.2400386, "supported_languages": null}, "macro.microsoft_ads.spark__microsoft_ads_extract_url_parameter": {"name": "spark__microsoft_ads_extract_url_parameter", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/microsoft_ads_extract_url_parameters.sql", "original_file_path": "macros/microsoft_ads_extract_url_parameters.sql", "unique_id": "macro.microsoft_ads.spark__microsoft_ads_extract_url_parameter", "macro_sql": "{% macro spark__microsoft_ads_extract_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"=([^&]+)'\" -%}\nnullif(regexp_extract({{ field }}, {{ formatted_url_parameter }}, 1), '')\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450493.2404492, "supported_languages": null}, "macro.microsoft_ads.get_ad_daily_report_columns": {"name": "get_ad_daily_report_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/staging/get_ad_daily_report_columns.sql", "original_file_path": "macros/staging/get_ad_daily_report_columns.sql", "unique_id": "macro.microsoft_ads.get_ad_daily_report_columns", "macro_sql": "{% macro get_ad_daily_report_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_distribution\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"bid_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"delivered_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_os\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"language\", \"datatype\": dbt.type_string()},\n {\"name\": \"network\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"top_vs_other\", \"datatype\": dbt.type_string()},\n {\"name\": \"conversions_qualified\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"revenue\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"all_conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"all_conversions_qualified\", \"datatype\": dbt.type_int()},\n {\"name\": \"all_revenue\", \"datatype\": dbt.type_numeric()}\n] %} \n\n{{ microsoft_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('microsoft_ads__ad_passthrough_metrics'), except_fields=['conversions_qualified', 'conversions', 'revenue', 'all_conversions_qualified', 'all_conversions', 'all_revenue']) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_numeric", "macro.microsoft_ads.microsoft_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.2455046, "supported_languages": null}, "macro.microsoft_ads.get_ad_group_daily_report_columns": {"name": "get_ad_group_daily_report_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/staging/get_ad_group_daily_report_columns.sql", "original_file_path": "macros/staging/get_ad_group_daily_report_columns.sql", "unique_id": "macro.microsoft_ads.get_ad_group_daily_report_columns", "macro_sql": "{% macro get_ad_group_daily_report_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_distribution\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"bid_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"delivered_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_os\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"language\", \"datatype\": dbt.type_string()},\n {\"name\": \"network\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"top_vs_other\", \"datatype\": dbt.type_string()},\n {\"name\": \"conversions_qualified\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"revenue\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"all_conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"all_conversions_qualified\", \"datatype\": dbt.type_int()},\n {\"name\": \"all_revenue\", \"datatype\": dbt.type_numeric()}\n] %} \n\n{{ microsoft_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('microsoft_ads__ad_group_passthrough_metrics'), except_fields=['conversions_qualified', 'conversions', 'revenue', 'all_conversions_qualified', 'all_conversions', 'all_revenue']) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_numeric", "macro.microsoft_ads.microsoft_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.2499032, "supported_languages": null}, "macro.microsoft_ads.microsoft_ads_fill_pass_through_columns": {"name": "microsoft_ads_fill_pass_through_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/staging/microsoft_ads_fill_pass_through_columns.sql", "original_file_path": "macros/staging/microsoft_ads_fill_pass_through_columns.sql", "unique_id": "macro.microsoft_ads.microsoft_ads_fill_pass_through_columns", "macro_sql": "{% macro microsoft_ads_fill_pass_through_columns(pass_through_fields, except=[]) %}\n\n{% if pass_through_fields %}\n {% for field in pass_through_fields %}\n {% if (field.alias if field.alias else field.name) not in except %}\n {% if field.transform_sql %}\n , coalesce(cast({{ field.transform_sql }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% else %}\n , coalesce(cast({{ field.alias if field.alias else field.name }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% endif %}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}], "created_at": 1783450493.2515435, "supported_languages": null}, "macro.microsoft_ads.get_ad_history_columns": {"name": "get_ad_history_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/staging/get_ad_history_columns.sql", "original_file_path": "macros/staging/get_ad_history_columns.sql", "unique_id": "macro.microsoft_ads.get_ad_history_columns", "macro_sql": "{% macro get_ad_history_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"title\", \"datatype\": dbt.type_string()},\n {\"name\": \"title_part_1\", \"datatype\": dbt.type_string()},\n {\"name\": \"title_part_2\", \"datatype\": dbt.type_string()},\n {\"name\": \"title_part_3\", \"datatype\": dbt.type_string()},\n {\"name\": \"final_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"modified_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"domain\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.2538035, "supported_languages": null}, "macro.microsoft_ads.get_account_history_columns": {"name": "get_account_history_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/staging/get_account_history_columns.sql", "original_file_path": "macros/staging/get_account_history_columns.sql", "unique_id": "macro.microsoft_ads.get_account_history_columns", "macro_sql": "{% macro get_account_history_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_modified_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"time_zone\", \"datatype\": dbt.type_string()},\n {\"name\": \"currency_code\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.2550585, "supported_languages": null}, "macro.microsoft_ads.get_keyword_daily_report_columns": {"name": "get_keyword_daily_report_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/staging/get_keyword_daily_report_columns.sql", "original_file_path": "macros/staging/get_keyword_daily_report_columns.sql", "unique_id": "macro.microsoft_ads.get_keyword_daily_report_columns", "macro_sql": "{% macro get_keyword_daily_report_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_distribution\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"bid_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"delivered_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_os\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"keyword_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"language\", \"datatype\": dbt.type_string()},\n {\"name\": \"network\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"top_vs_other\", \"datatype\": dbt.type_string()},\n {\"name\": \"conversions_qualified\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"revenue\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"all_conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"all_conversions_qualified\", \"datatype\": dbt.type_int()},\n {\"name\": \"all_revenue\", \"datatype\": dbt.type_numeric()}\n] %}\n\n{{ microsoft_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('microsoft_ads__keyword_passthrough_metrics'), except_fields=['conversions_qualified', 'conversions', 'revenue', 'all_conversions_qualified', 'all_conversions', 'all_revenue']) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_numeric", "macro.microsoft_ads.microsoft_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.259799, "supported_languages": null}, "macro.microsoft_ads.get_keyword_history_columns": {"name": "get_keyword_history_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/staging/get_keyword_history_columns.sql", "original_file_path": "macros/staging/get_keyword_history_columns.sql", "unique_id": "macro.microsoft_ads.get_keyword_history_columns", "macro_sql": "{% macro get_keyword_history_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"modified_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.2612782, "supported_languages": null}, "macro.microsoft_ads.get_geographic_daily_report_columns": {"name": "get_geographic_daily_report_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/staging/get_geographic_daily_report_columns.sql", "original_file_path": "macros/staging/get_geographic_daily_report_columns.sql", "unique_id": "macro.microsoft_ads.get_geographic_daily_report_columns", "macro_sql": "{% macro get_geographic_daily_report_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_distribution\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"all_conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"all_conversions_qualified\", \"datatype\": dbt.type_float()},\n {\"name\": \"all_revenue\", \"datatype\": dbt.type_float()},\n {\"name\": \"bid_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"city\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions_qualified\", \"datatype\": dbt.type_float()},\n {\"name\": \"country\", \"datatype\": dbt.type_string()},\n {\"name\": \"county\", \"datatype\": dbt.type_string()},\n {\"name\": \"currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"delivered_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_os\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"goal\", \"datatype\": dbt.type_string()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"language\", \"datatype\": dbt.type_string()},\n {\"name\": \"location_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"location_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"metro_area\", \"datatype\": dbt.type_string()},\n {\"name\": \"most_specific_location\", \"datatype\": dbt.type_string()},\n {\"name\": \"network\", \"datatype\": dbt.type_string()},\n {\"name\": \"postal_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend\", \"datatype\": dbt.type_float()},\n {\"name\": \"state\", \"datatype\": dbt.type_string()},\n {\"name\": \"top_vs_other\", \"datatype\": dbt.type_string()},\n {\"name\": \"revenue\", \"datatype\": dbt.type_float()}\n] %}\n\n{{ microsoft_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('microsoft_ads__geographic_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_float", "macro.microsoft_ads.microsoft_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.2671733, "supported_languages": null}, "macro.microsoft_ads.microsoft_ads_add_pass_through_columns": {"name": "microsoft_ads_add_pass_through_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/staging/microsoft_ads_add_pass_through_columns.sql", "original_file_path": "macros/staging/microsoft_ads_add_pass_through_columns.sql", "unique_id": "macro.microsoft_ads.microsoft_ads_add_pass_through_columns", "macro_sql": "{% macro microsoft_ads_add_pass_through_columns(base_columns, pass_through_fields, except_fields=[]) %}\n\n{% if pass_through_fields %}\n {% for column in pass_through_fields %}\n\n {% if column is mapping %}\n {% set col_name = column.alias|default(column.name)|lower %}\n\n {% if col_name not in except_fields %}\n {% if column.alias %}\n {% do base_columns.append({ \"name\": column.name, \"alias\": column.alias, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% else %}\n {% do base_columns.append({ \"name\": column.name, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% else %}\n {% if column|lower not in except_fields %}\n {% do base_columns.append({ \"name\": column, \"datatype\": dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_columns", "type": null, "description": ""}, {"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except_fields", "type": null, "description": ""}], "created_at": 1783450493.269694, "supported_languages": null}, "macro.microsoft_ads.get_search_daily_report_columns": {"name": "get_search_daily_report_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/staging/get_search_daily_report_columns.sql", "original_file_path": "macros/staging/get_search_daily_report_columns.sql", "unique_id": "macro.microsoft_ads.get_search_daily_report_columns", "macro_sql": "{% macro get_search_daily_report_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"bid_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"delivered_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_os\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"keyword_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"language\", \"datatype\": dbt.type_string()},\n {\"name\": \"network\", \"datatype\": dbt.type_string()},\n {\"name\": \"search_query\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"top_vs_other\", \"datatype\": dbt.type_string()},\n {\"name\": \"conversions_qualified\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"revenue\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"all_conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"all_conversions_qualified\", \"datatype\": dbt.type_int()},\n {\"name\": \"all_revenue\", \"datatype\": dbt.type_numeric()}\n] %}\n\n{{ microsoft_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('microsoft_ads__search_passthrough_metrics'), except_fields=['conversions_qualified', 'conversions', 'revenue', 'all_conversions_qualified', 'all_conversions', 'all_revenue']) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_numeric", "macro.microsoft_ads.microsoft_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.27427, "supported_languages": null}, "macro.microsoft_ads.get_campaign_daily_report_columns": {"name": "get_campaign_daily_report_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/staging/get_campaign_daily_report_columns.sql", "original_file_path": "macros/staging/get_campaign_daily_report_columns.sql", "unique_id": "macro.microsoft_ads.get_campaign_daily_report_columns", "macro_sql": "{% macro get_campaign_daily_report_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_distribution\", \"datatype\": dbt.type_string()},\n {\"name\": \"bid_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"delivered_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_os\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"network\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"top_vs_other\", \"datatype\": dbt.type_string()},\n {\"name\": \"budget_association_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"budget_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"budget_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"conversions_qualified\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"revenue\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"all_conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"all_conversions_qualified\", \"datatype\": dbt.type_int()},\n {\"name\": \"all_revenue\", \"datatype\": dbt.type_numeric()}\n] %} \n\n{{ microsoft_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('microsoft_ads__campaign_passthrough_metrics'), except_fields=['conversions_qualified', 'conversions', 'revenue', 'all_conversions_qualified', 'all_conversions', 'all_revenue']) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_numeric", "macro.microsoft_ads.microsoft_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.278891, "supported_languages": null}, "macro.microsoft_ads.get_campaign_history_columns": {"name": "get_campaign_history_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/staging/get_campaign_history_columns.sql", "original_file_path": "macros/staging/get_campaign_history_columns.sql", "unique_id": "macro.microsoft_ads.get_campaign_history_columns", "macro_sql": "{% macro get_campaign_history_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"modified_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"time_zone\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"budget\", \"datatype\": dbt.type_float()},\n {\"name\": \"budget_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"budget_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"language\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.2811317, "supported_languages": null}, "macro.microsoft_ads.get_account_daily_report_columns": {"name": "get_account_daily_report_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/staging/get_account_daily_report_columns.sql", "original_file_path": "macros/staging/get_account_daily_report_columns.sql", "unique_id": "macro.microsoft_ads.get_account_daily_report_columns", "macro_sql": "{% macro get_account_daily_report_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_distribution\", \"datatype\": dbt.type_string()},\n {\"name\": \"bid_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"delivered_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_os\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"network\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"top_vs_other\", \"datatype\": dbt.type_string()},\n {\"name\": \"conversions_qualified\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"revenue\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"all_conversions_qualified\", \"datatype\": dbt.type_int()}\n] %} \n\n{{ microsoft_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('microsoft_ads__account_passthrough_metrics'), except_fields=['conversions_qualified', 'conversions', 'revenue', 'all_conversions_qualified']) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_numeric", "macro.microsoft_ads.microsoft_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.2847137, "supported_languages": null}, "macro.microsoft_ads.get_ad_group_history_columns": {"name": "get_ad_group_history_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/staging/get_ad_group_history_columns.sql", "original_file_path": "macros/staging/get_ad_group_history_columns.sql", "unique_id": "macro.microsoft_ads.get_ad_group_history_columns", "macro_sql": "{% macro get_ad_group_history_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"modified_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"start_date\", \"datatype\": \"date\"},\n {\"name\": \"end_date\", \"datatype\": \"date\"},\n {\"name\": \"status\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.2862709, "supported_languages": null}, "macro.spark_utils.get_tables": {"name": "get_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.get_tables", "macro_sql": "{% macro get_tables(table_regex_pattern='.*') %}\n\n {% set tables = [] %}\n {% for database in spark__list_schemas('not_used') %}\n {% for table in spark__list_relations_without_caching(database[0]) %}\n {% set db_tablename = database[0] ~ \".\" ~ table[1] %}\n {% set is_match = modules.re.match(table_regex_pattern, db_tablename) %}\n {% if is_match %}\n {% call statement('table_detail', fetch_result=True) -%}\n describe extended {{ db_tablename }}\n {% endcall %}\n\n {% set table_type = load_result('table_detail').table|reverse|selectattr(0, 'in', ('type', 'TYPE', 'Type'))|first %}\n {% if table_type[1]|lower != 'view' %}\n {{ tables.append(db_tablename) }}\n {% endif %}\n {% endif %}\n {% endfor %}\n {% endfor %}\n {{ return(tables) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_regex_pattern", "type": null, "description": ""}], "created_at": 1783450493.2896445, "supported_languages": null}, "macro.spark_utils.get_delta_tables": {"name": "get_delta_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.get_delta_tables", "macro_sql": "{% macro get_delta_tables(table_regex_pattern='.*') %}\n\n {% set delta_tables = [] %}\n {% for db_tablename in get_tables(table_regex_pattern) %}\n {% call statement('table_detail', fetch_result=True) -%}\n describe extended {{ db_tablename }}\n {% endcall %}\n\n {% set table_type = load_result('table_detail').table|reverse|selectattr(0, 'in', ('provider', 'PROVIDER', 'Provider'))|first %}\n {% if table_type[1]|lower == 'delta' %}\n {{ delta_tables.append(db_tablename) }}\n {% endif %}\n {% endfor %}\n {{ return(delta_tables) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.get_tables", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_regex_pattern", "type": null, "description": ""}], "created_at": 1783450493.2910893, "supported_languages": null}, "macro.spark_utils.get_statistic_columns": {"name": "get_statistic_columns", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.get_statistic_columns", "macro_sql": "{% macro get_statistic_columns(table) %}\n\n {% call statement('input_columns', fetch_result=True) %}\n SHOW COLUMNS IN {{ table }}\n {% endcall %}\n {% set input_columns = load_result('input_columns').table %}\n\n {% set output_columns = [] %}\n {% for column in input_columns %}\n {% call statement('column_information', fetch_result=True) %}\n DESCRIBE TABLE {{ table }} `{{ column[0] }}`\n {% endcall %}\n {% if not load_result('column_information').table[1][1].startswith('struct') and not load_result('column_information').table[1][1].startswith('array') %}\n {{ output_columns.append('`' ~ column[0] ~ '`') }}\n {% endif %}\n {% endfor %}\n {{ return(output_columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table", "type": null, "description": ""}], "created_at": 1783450493.2927825, "supported_languages": null}, "macro.spark_utils.spark_optimize_delta_tables": {"name": "spark_optimize_delta_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.spark_optimize_delta_tables", "macro_sql": "{% macro spark_optimize_delta_tables(table_regex_pattern='.*') %}\n\n {% for table in get_delta_tables(table_regex_pattern) %}\n {% set start=modules.datetime.datetime.now() %}\n {% set message_prefix=loop.index ~ \" of \" ~ loop.length %}\n {{ dbt_utils.log_info(message_prefix ~ \" Optimizing \" ~ table) }}\n {% do run_query(\"optimize \" ~ table) %}\n {% set end=modules.datetime.datetime.now() %}\n {% set total_seconds = (end - start).total_seconds() | round(2) %}\n {{ dbt_utils.log_info(message_prefix ~ \" Finished \" ~ table ~ \" in \" ~ total_seconds ~ \"s\") }}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.get_delta_tables", "macro.dbt_utils.log_info", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_regex_pattern", "type": null, "description": ""}], "created_at": 1783450493.2941804, "supported_languages": null}, "macro.spark_utils.spark_vacuum_delta_tables": {"name": "spark_vacuum_delta_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.spark_vacuum_delta_tables", "macro_sql": "{% macro spark_vacuum_delta_tables(table_regex_pattern='.*') %}\n\n {% for table in get_delta_tables(table_regex_pattern) %}\n {% set start=modules.datetime.datetime.now() %}\n {% set message_prefix=loop.index ~ \" of \" ~ loop.length %}\n {{ dbt_utils.log_info(message_prefix ~ \" Vacuuming \" ~ table) }}\n {% do run_query(\"vacuum \" ~ table) %}\n {% set end=modules.datetime.datetime.now() %}\n {% set total_seconds = (end - start).total_seconds() | round(2) %}\n {{ dbt_utils.log_info(message_prefix ~ \" Finished \" ~ table ~ \" in \" ~ total_seconds ~ \"s\") }}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.get_delta_tables", "macro.dbt_utils.log_info", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_regex_pattern", "type": null, "description": ""}], "created_at": 1783450493.295597, "supported_languages": null}, "macro.spark_utils.spark_analyze_tables": {"name": "spark_analyze_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.spark_analyze_tables", "macro_sql": "{% macro spark_analyze_tables(table_regex_pattern='.*') %}\n\n {% for table in get_tables(table_regex_pattern) %}\n {% set start=modules.datetime.datetime.now() %}\n {% set columns = get_statistic_columns(table) | join(',') %}\n {% set message_prefix=loop.index ~ \" of \" ~ loop.length %}\n {{ dbt_utils.log_info(message_prefix ~ \" Analyzing \" ~ table) }}\n {% if columns != '' %}\n {% do run_query(\"analyze table \" ~ table ~ \" compute statistics for columns \" ~ columns) %}\n {% endif %}\n {% set end=modules.datetime.datetime.now() %}\n {% set total_seconds = (end - start).total_seconds() | round(2) %}\n {{ dbt_utils.log_info(message_prefix ~ \" Finished \" ~ table ~ \" in \" ~ total_seconds ~ \"s\") }}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.get_tables", "macro.spark_utils.get_statistic_columns", "macro.dbt_utils.log_info", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_regex_pattern", "type": null, "description": ""}], "created_at": 1783450493.2973144, "supported_languages": null}, "macro.spark_utils.assert_not_null": {"name": "assert_not_null", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/etc/assert_not_null.sql", "original_file_path": "macros/etc/assert_not_null.sql", "unique_id": "macro.spark_utils.assert_not_null", "macro_sql": "{% macro assert_not_null(function, arg) -%}\n {{ return(adapter.dispatch('assert_not_null', 'spark_utils')(function, arg)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.spark_utils.default__assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "function", "type": null, "description": ""}, {"name": "arg", "type": null, "description": ""}], "created_at": 1783450493.2979145, "supported_languages": null}, "macro.spark_utils.default__assert_not_null": {"name": "default__assert_not_null", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/etc/assert_not_null.sql", "original_file_path": "macros/etc/assert_not_null.sql", "unique_id": "macro.spark_utils.default__assert_not_null", "macro_sql": "{% macro default__assert_not_null(function, arg) %}\n\n coalesce({{function}}({{arg}}), nvl2({{function}}({{arg}}), assert_true({{function}}({{arg}}) is not null), null))\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "function", "type": null, "description": ""}, {"name": "arg", "type": null, "description": ""}], "created_at": 1783450493.2983143, "supported_languages": null}, "macro.spark_utils.spark__get_relations_by_pattern": {"name": "spark__get_relations_by_pattern", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "unique_id": "macro.spark_utils.spark__get_relations_by_pattern", "macro_sql": "{% macro spark__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {%- call statement('get_tables', fetch_result=True) %}\n\n show table extended in {{ schema_pattern }} like '{{ table_pattern }}'\n\n {%- endcall -%}\n\n {%- set table_list = load_result('get_tables') -%}\n\n {%- if table_list and table_list['table'] -%}\n {%- set tbl_relations = [] -%}\n {%- for row in table_list['table'] -%}\n {%- set tbl_relation = api.Relation.create(\n database=None,\n schema=row[0],\n identifier=row[1],\n type=('view' if 'Type: VIEW' in row[3] else 'table')\n ) -%}\n {%- do tbl_relations.append(tbl_relation) -%}\n {%- endfor -%}\n\n {{ return(tbl_relations) }}\n {%- else -%}\n {{ return([]) }}\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783450493.3005726, "supported_languages": null}, "macro.spark_utils.spark__get_relations_by_prefix": {"name": "spark__get_relations_by_prefix", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "unique_id": "macro.spark_utils.spark__get_relations_by_prefix", "macro_sql": "{% macro spark__get_relations_by_prefix(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {% set table_pattern = table_pattern ~ '*' %}\n {{ return(spark_utils.spark__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783450493.3012064, "supported_languages": null}, "macro.spark_utils.spark__get_tables_by_pattern": {"name": "spark__get_tables_by_pattern", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "unique_id": "macro.spark_utils.spark__get_tables_by_pattern", "macro_sql": "{% macro spark__get_tables_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(spark_utils.spark__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783450493.3017535, "supported_languages": null}, "macro.spark_utils.spark__get_tables_by_prefix": {"name": "spark__get_tables_by_prefix", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "unique_id": "macro.spark_utils.spark__get_tables_by_prefix", "macro_sql": "{% macro spark__get_tables_by_prefix(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(spark_utils.spark__get_relations_by_prefix(schema_pattern, table_pattern, exclude='', database=target.database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_prefix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783450493.302274, "supported_languages": null}, "macro.spark_utils.spark__current_timestamp": {"name": "spark__current_timestamp", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "unique_id": "macro.spark_utils.spark__current_timestamp", "macro_sql": "{% macro spark__current_timestamp() %}\n current_timestamp()\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.3025465, "supported_languages": null}, "macro.spark_utils.spark__current_timestamp_in_utc": {"name": "spark__current_timestamp_in_utc", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "unique_id": "macro.spark_utils.spark__current_timestamp_in_utc", "macro_sql": "{% macro spark__current_timestamp_in_utc() %}\n unix_timestamp()\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.3027031, "supported_languages": null}, "macro.spark_utils.spark__type_numeric": {"name": "spark__type_numeric", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/datatypes.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/datatypes.sql", "unique_id": "macro.spark_utils.spark__type_numeric", "macro_sql": "{% macro spark__type_numeric() %}\n decimal(28, 6)\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.3029282, "supported_languages": null}, "macro.spark_utils.spark__dateadd": {"name": "spark__dateadd", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/dateadd.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/dateadd.sql", "unique_id": "macro.spark_utils.spark__dateadd", "macro_sql": "{% macro spark__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n {%- set clock_component -%}\n {# make sure the dates + timestamps are real, otherwise raise an error asap #}\n to_unix_timestamp({{ spark_utils.assert_not_null('to_timestamp', from_date_or_timestamp) }})\n - to_unix_timestamp({{ spark_utils.assert_not_null('date', from_date_or_timestamp) }})\n {%- endset -%}\n\n {%- if datepart in ['day', 'week'] -%}\n \n {%- set multiplier = 7 if datepart == 'week' else 1 -%}\n\n to_timestamp(\n to_unix_timestamp(\n date_add(\n {{ spark_utils.assert_not_null('date', from_date_or_timestamp) }},\n cast({{interval}} * {{multiplier}} as int)\n )\n ) + {{clock_component}}\n )\n\n {%- elif datepart in ['month', 'quarter', 'year'] -%}\n \n {%- set multiplier -%} \n {%- if datepart == 'month' -%} 1\n {%- elif datepart == 'quarter' -%} 3\n {%- elif datepart == 'year' -%} 12\n {%- endif -%}\n {%- endset -%}\n\n to_timestamp(\n to_unix_timestamp(\n add_months(\n {{ spark_utils.assert_not_null('date', from_date_or_timestamp) }},\n cast({{interval}} * {{multiplier}} as int)\n )\n ) + {{clock_component}}\n )\n\n {%- elif datepart in ('hour', 'minute', 'second', 'millisecond', 'microsecond') -%}\n \n {%- set multiplier -%} \n {%- if datepart == 'hour' -%} 3600\n {%- elif datepart == 'minute' -%} 60\n {%- elif datepart == 'second' -%} 1\n {%- elif datepart == 'millisecond' -%} (1/1000000)\n {%- elif datepart == 'microsecond' -%} (1/1000000)\n {%- endif -%}\n {%- endset -%}\n\n to_timestamp(\n {{ spark_utils.assert_not_null('to_unix_timestamp', from_date_or_timestamp) }}\n + cast({{interval}} * {{multiplier}} as int)\n )\n\n {%- else -%}\n\n {{ exceptions.raise_compiler_error(\"macro dateadd not implemented for datepart ~ '\" ~ datepart ~ \"' ~ on Spark\") }}\n\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_date_or_timestamp", "type": null, "description": ""}], "created_at": 1783450493.3067043, "supported_languages": null}, "macro.spark_utils.spark__concat": {"name": "spark__concat", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/concat.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/concat.sql", "unique_id": "macro.spark_utils.spark__concat", "macro_sql": "{% macro spark__concat(fields) -%}\n concat({{ fields|join(', ') }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "fields", "type": null, "description": ""}], "created_at": 1783450493.3070743, "supported_languages": null}, "macro.spark_utils.spark__datediff": {"name": "spark__datediff", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/datediff.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/datediff.sql", "unique_id": "macro.spark_utils.spark__datediff", "macro_sql": "{% macro spark__datediff(first_date, second_date, datepart) %}\n\n {%- if datepart in ['day', 'week', 'month', 'quarter', 'year'] -%}\n \n {# make sure the dates are real, otherwise raise an error asap #}\n {% set first_date = spark_utils.assert_not_null('date', first_date) %}\n {% set second_date = spark_utils.assert_not_null('date', second_date) %}\n \n {%- endif -%}\n \n {%- if datepart == 'day' -%}\n \n datediff({{second_date}}, {{first_date}})\n \n {%- elif datepart == 'week' -%}\n \n case when {{first_date}} < {{second_date}}\n then floor(datediff({{second_date}}, {{first_date}})/7)\n else ceil(datediff({{second_date}}, {{first_date}})/7)\n end\n \n -- did we cross a week boundary (Sunday)?\n + case\n when {{first_date}} < {{second_date}} and dayofweek({{second_date}}) < dayofweek({{first_date}}) then 1\n when {{first_date}} > {{second_date}} and dayofweek({{second_date}}) > dayofweek({{first_date}}) then -1\n else 0 end\n\n {%- elif datepart == 'month' -%}\n\n case when {{first_date}} < {{second_date}}\n then floor(months_between(date({{second_date}}), date({{first_date}})))\n else ceil(months_between(date({{second_date}}), date({{first_date}})))\n end\n \n -- did we cross a month boundary?\n + case\n when {{first_date}} < {{second_date}} and dayofmonth({{second_date}}) < dayofmonth({{first_date}}) then 1\n when {{first_date}} > {{second_date}} and dayofmonth({{second_date}}) > dayofmonth({{first_date}}) then -1\n else 0 end\n \n {%- elif datepart == 'quarter' -%}\n \n case when {{first_date}} < {{second_date}}\n then floor(months_between(date({{second_date}}), date({{first_date}}))/3)\n else ceil(months_between(date({{second_date}}), date({{first_date}}))/3)\n end\n \n -- did we cross a quarter boundary?\n + case\n when {{first_date}} < {{second_date}} and (\n (dayofyear({{second_date}}) - (quarter({{second_date}}) * 365/4))\n < (dayofyear({{first_date}}) - (quarter({{first_date}}) * 365/4))\n ) then 1\n when {{first_date}} > {{second_date}} and (\n (dayofyear({{second_date}}) - (quarter({{second_date}}) * 365/4))\n > (dayofyear({{first_date}}) - (quarter({{first_date}}) * 365/4))\n ) then -1\n else 0 end\n\n {%- elif datepart == 'year' -%}\n \n year({{second_date}}) - year({{first_date}})\n\n {%- elif datepart in ('hour', 'minute', 'second', 'millisecond', 'microsecond') -%}\n \n {%- set divisor -%} \n {%- if datepart == 'hour' -%} 3600\n {%- elif datepart == 'minute' -%} 60\n {%- elif datepart == 'second' -%} 1\n {%- elif datepart == 'millisecond' -%} (1/1000)\n {%- elif datepart == 'microsecond' -%} (1/1000000)\n {%- endif -%}\n {%- endset -%}\n\n case when {{first_date}} < {{second_date}}\n then ceil((\n {# make sure the timestamps are real, otherwise raise an error asap #}\n {{ spark_utils.assert_not_null('to_unix_timestamp', spark_utils.assert_not_null('to_timestamp', second_date)) }}\n - {{ spark_utils.assert_not_null('to_unix_timestamp', spark_utils.assert_not_null('to_timestamp', first_date)) }}\n ) / {{divisor}})\n else floor((\n {{ spark_utils.assert_not_null('to_unix_timestamp', spark_utils.assert_not_null('to_timestamp', second_date)) }}\n - {{ spark_utils.assert_not_null('to_unix_timestamp', spark_utils.assert_not_null('to_timestamp', first_date)) }}\n ) / {{divisor}})\n end\n \n {% if datepart == 'millisecond' %}\n + cast(date_format({{second_date}}, 'SSS') as int)\n - cast(date_format({{first_date}}, 'SSS') as int)\n {% endif %}\n \n {% if datepart == 'microsecond' %} \n {% set capture_str = '[0-9]{4}-[0-9]{2}-[0-9]{2}.[0-9]{2}:[0-9]{2}:[0-9]{2}.([0-9]{6})' %}\n -- Spark doesn't really support microseconds, so this is a massive hack!\n -- It will only work if the timestamp-string is of the format\n -- 'yyyy-MM-dd-HH mm.ss.SSSSSS'\n + cast(regexp_extract({{second_date}}, '{{capture_str}}', 1) as int)\n - cast(regexp_extract({{first_date}}, '{{capture_str}}', 1) as int) \n {% endif %}\n\n {%- else -%}\n\n {{ exceptions.raise_compiler_error(\"macro datediff not implemented for datepart ~ '\" ~ datepart ~ \"' ~ on Spark\") }}\n\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783450493.3138685, "supported_languages": null}, "macro.spark_utils.spark__split_part": {"name": "spark__split_part", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/split_part.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/split_part.sql", "unique_id": "macro.spark_utils.spark__split_part", "macro_sql": "{% macro spark__split_part(string_text, delimiter_text, part_number) %}\n\n {% set delimiter_expr %}\n \n -- escape if starts with a special character\n case when regexp_extract({{ delimiter_text }}, '([^A-Za-z0-9])(.*)', 1) != '_'\n then concat('\\\\', {{ delimiter_text }})\n else {{ delimiter_text }} end\n \n {% endset %}\n\n {% set split_part_expr %}\n \n split(\n {{ string_text }},\n {{ delimiter_expr }}\n )[({{ part_number - 1 }})]\n \n {% endset %}\n \n {{ return(split_part_expr) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string_text", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "part_number", "type": null, "description": ""}], "created_at": 1783450493.3148522, "supported_languages": null}, "macro.spark_utils.spark__convert_timezone": {"name": "spark__convert_timezone", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/snowplow/convert_timezone.sql", "original_file_path": "macros/snowplow/convert_timezone.sql", "unique_id": "macro.spark_utils.spark__convert_timezone", "macro_sql": "{% macro spark__convert_timezone(in_tz, out_tz, in_timestamp) %}\n from_utc_timestamp(to_utc_timestamp({{in_timestamp}}, {{in_tz}}), {{out_tz}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "in_tz", "type": null, "description": ""}, {"name": "out_tz", "type": null, "description": ""}, {"name": "in_timestamp", "type": null, "description": ""}], "created_at": 1783450493.3152664, "supported_languages": null}, "macro.facebook_ads.facebook_ads_extract_url_parameter": {"name": "facebook_ads_extract_url_parameter", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/facebook_ads_extract_url_parameters.sql", "original_file_path": "macros/facebook_ads_extract_url_parameters.sql", "unique_id": "macro.facebook_ads.facebook_ads_extract_url_parameter", "macro_sql": "{% macro facebook_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ return(adapter.dispatch('facebook_ads_extract_url_parameter', 'facebook_ads') (field, url_parameter)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.facebook_ads.default__facebook_ads_extract_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450493.315909, "supported_languages": null}, "macro.facebook_ads.default__facebook_ads_extract_url_parameter": {"name": "default__facebook_ads_extract_url_parameter", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/facebook_ads_extract_url_parameters.sql", "original_file_path": "macros/facebook_ads_extract_url_parameters.sql", "unique_id": "macro.facebook_ads.default__facebook_ads_extract_url_parameter", "macro_sql": "{% macro default__facebook_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ dbt_utils.get_url_parameter(field, url_parameter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450493.3162093, "supported_languages": null}, "macro.facebook_ads.spark__facebook_ads_extract_url_parameter": {"name": "spark__facebook_ads_extract_url_parameter", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/facebook_ads_extract_url_parameters.sql", "original_file_path": "macros/facebook_ads_extract_url_parameters.sql", "unique_id": "macro.facebook_ads.spark__facebook_ads_extract_url_parameter", "macro_sql": "{% macro spark__facebook_ads_extract_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"=([^&]+)'\" -%}\nnullif(regexp_extract({{ field }}, {{ formatted_url_parameter }}, 1), '')\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783450493.3166249, "supported_languages": null}, "macro.facebook_ads.get_url_tags_query": {"name": "get_url_tags_query", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/get_url_tag_query.sql", "original_file_path": "macros/get_url_tag_query.sql", "unique_id": "macro.facebook_ads.get_url_tags_query", "macro_sql": "\n\n{%- macro get_url_tags_query(output_cte_name, url_tags_datatype) %}\n {{ return(adapter.dispatch('get_url_tags_query', 'facebook_ads') (output_cte_name, url_tags_datatype)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.facebook_ads.postgres__get_url_tags_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "output_cte_name", "type": null, "description": ""}, {"name": "url_tags_datatype", "type": null, "description": ""}], "created_at": 1783450493.3178926, "supported_languages": null}, "macro.facebook_ads.default__get_url_tags_query": {"name": "default__get_url_tags_query", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/get_url_tag_query.sql", "original_file_path": "macros/get_url_tag_query.sql", "unique_id": "macro.facebook_ads.default__get_url_tags_query", "macro_sql": "\n\n{%- macro default__get_url_tags_query(output_cte_name, url_tags_datatype) %}\n\n {{ output_cte_name }} as (\n select\n source_relation,\n _fivetran_id,\n creative_id,\n cast(null as {{ dbt.type_string() }}) as key,\n cast(null as {{ dbt.type_string() }}) as value,\n cast(null as {{ dbt.type_string() }}) as type\n from unnested\n )\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "output_cte_name", "type": null, "description": ""}, {"name": "url_tags_datatype", "type": null, "description": ""}], "created_at": 1783450493.3183534, "supported_languages": null}, "macro.facebook_ads.bigquery__get_url_tags_query": {"name": "bigquery__get_url_tags_query", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/get_url_tag_query.sql", "original_file_path": "macros/get_url_tag_query.sql", "unique_id": "macro.facebook_ads.bigquery__get_url_tags_query", "macro_sql": "\n\n{%- macro bigquery__get_url_tags_query(output_cte_name, url_tags_datatype) %}\n\n {%- set is_native_json = url_tags_datatype == 'json' %}\n\n unnested as (\n select\n source_relation,\n _fivetran_id,\n creative_id,\n url_tag_element\n from required_fields,\n\n {%- if is_native_json %}\n unnest(json_extract_array(url_tags)) as url_tag_element\n {%- else %}\n unnest(json_extract_array(replace(trim(url_tags, '\"'),'\\\\',''))) as url_tag_element\n {%- endif %}\n\n where url_tags is not null\n ),\n\n {{ output_cte_name }} as (\n select\n source_relation,\n _fivetran_id,\n creative_id,\n json_extract_scalar(url_tag_element, '$.key') as key,\n json_extract_scalar(url_tag_element, '$.value') as value,\n json_extract_scalar(url_tag_element, '$.type') as type\n from unnested\n )\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "output_cte_name", "type": null, "description": ""}, {"name": "url_tags_datatype", "type": null, "description": ""}], "created_at": 1783450493.3189259, "supported_languages": null}, "macro.facebook_ads.postgres__get_url_tags_query": {"name": "postgres__get_url_tags_query", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/get_url_tag_query.sql", "original_file_path": "macros/get_url_tag_query.sql", "unique_id": "macro.facebook_ads.postgres__get_url_tags_query", "macro_sql": "\n\n{%- macro postgres__get_url_tags_query(output_cte_name, url_tags_datatype) %}\n\n {%- set is_native_json = url_tags_datatype in ('json', 'jsonb') %}\n\n unnested as (\n select\n source_relation,\n _fivetran_id,\n creative_id,\n url_tag_element\n from required_fields\n\n {%- if is_native_json %}\n cross join lateral {{ url_tags_datatype }}_array_elements(url_tags) as url_tag_element -- use json_array_elements or jsonb_array_elements based on datatype\n {%- else %}\n cross join lateral json_array_elements(replace(trim(url_tags::text, '\"'),'\\\\','')::json) as url_tag_element\n {%- endif %}\n\n where url_tags is not null\n ),\n\n {{ output_cte_name }} as (\n select\n source_relation,\n _fivetran_id,\n creative_id,\n url_tag_element->>'key' as key,\n url_tag_element->>'value' as value,\n url_tag_element->>'type' as type\n from unnested\n )\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "output_cte_name", "type": null, "description": ""}, {"name": "url_tags_datatype", "type": null, "description": ""}], "created_at": 1783450493.3195672, "supported_languages": null}, "macro.facebook_ads.redshift__get_url_tags_query": {"name": "redshift__get_url_tags_query", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/get_url_tag_query.sql", "original_file_path": "macros/get_url_tag_query.sql", "unique_id": "macro.facebook_ads.redshift__get_url_tags_query", "macro_sql": "\n\n{%- macro redshift__get_url_tags_query(output_cte_name, url_tags_datatype) %}\n\n {%- set is_native_json = url_tags_datatype == 'super' %}\n\n url_tags as (\n select\n source_relation,\n _fivetran_id,\n creative_id,\n {{ 'url_tags' if is_native_json else 'json_parse(url_tags)' }} as parsed_url_tags\n from required_fields\n where url_tags is not null\n ),\n\n {{ output_cte_name }} as (\n select\n ut.source_relation,\n ut._fivetran_id,\n ut.creative_id,\n element.key::varchar as key,\n element.value::varchar as value,\n element.type::varchar as type\n from url_tags as ut\n cross join ut.parsed_url_tags as element\n )\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "output_cte_name", "type": null, "description": ""}, {"name": "url_tags_datatype", "type": null, "description": ""}], "created_at": 1783450493.320054, "supported_languages": null}, "macro.facebook_ads.snowflake__get_url_tags_query": {"name": "snowflake__get_url_tags_query", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/get_url_tag_query.sql", "original_file_path": "macros/get_url_tag_query.sql", "unique_id": "macro.facebook_ads.snowflake__get_url_tags_query", "macro_sql": "\n\n{%- macro snowflake__get_url_tags_query(output_cte_name, url_tags_datatype) %}\n\n {%- set is_native_json = url_tags_datatype in ('variant', 'object', 'array') %}\n\n {{ output_cte_name }} as (\n select\n source_relation,\n _fivetran_id,\n creative_id,\n url_tags.value:key::string as key,\n url_tags.value:value::string as value,\n url_tags.value:type::string as type\n from required_fields,\n lateral flatten(input => {{ 'url_tags' if is_native_json else 'parse_json(url_tags)' }}) as url_tags\n where url_tags is not null\n )\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "output_cte_name", "type": null, "description": ""}, {"name": "url_tags_datatype", "type": null, "description": ""}], "created_at": 1783450493.3206127, "supported_languages": null}, "macro.facebook_ads.spark__get_url_tags_query": {"name": "spark__get_url_tags_query", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/get_url_tag_query.sql", "original_file_path": "macros/get_url_tag_query.sql", "unique_id": "macro.facebook_ads.spark__get_url_tags_query", "macro_sql": "\n\n{%- macro spark__get_url_tags_query(output_cte_name, url_tags_datatype) %}\n {# JSON datatype not supported by Fivetran so no need to check datatype. #}\n\n cleaned_fields as (\n select\n source_relation,\n _fivetran_id,\n creative_id,\n explode(from_json(url_tags, 'array>')) as url_tags\n from required_fields\n where url_tags is not null\n ),\n\n {{ output_cte_name }} as (\n select\n source_relation,\n _fivetran_id,\n creative_id,\n url_tags.key as key,\n url_tags.value as value,\n url_tags.type as type\n from cleaned_fields\n )\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "output_cte_name", "type": null, "description": ""}, {"name": "url_tags_datatype", "type": null, "description": ""}], "created_at": 1783450493.320916, "supported_languages": null}, "macro.facebook_ads.facebook_action_slug": {"name": "facebook_action_slug", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/facebook_action_slug.sql", "original_file_path": "macros/facebook_action_slug.sql", "unique_id": "macro.facebook_ads.facebook_action_slug", "macro_sql": "{% macro facebook_action_slug(action_type) -%}\n {%- set raw_label = action_type.name if action_type.name else action_type.pattern -%}\n {# replace dots and other separators with underscores before slugifying #}\n {%- set cleaned = raw_label | replace('.', '_') -%}\n\n {{- dbt_utils.slugify(cleaned) -}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.slugify"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "action_type", "type": null, "description": ""}], "created_at": 1783450493.3216383, "supported_languages": null}, "macro.facebook_ads.facebook_ads_persist_pass_through_columns": {"name": "facebook_ads_persist_pass_through_columns", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/facebook_ads_persist_pass_through_columns.sql", "original_file_path": "macros/facebook_ads_persist_pass_through_columns.sql", "unique_id": "macro.facebook_ads.facebook_ads_persist_pass_through_columns", "macro_sql": "{% macro facebook_ads_persist_pass_through_columns(pass_through_variable, identifier=none, transform='', coalesce_with=none, exclude_fields=[]) %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n {% set field_name = field.alias|default(field.name)|lower if field is mapping else field %}\n {% if field_name not in exclude_fields %}\n , {{ transform ~ '(cast(' ~ ('coalesce(' if coalesce_with is not none else '') ~ (identifier ~ '.' if identifier else '') ~ field_name ~ ((', ' ~ coalesce_with ~ ')') if coalesce_with is not none else '') ~ ' as ' ~ dbt.type_float() ~ '))' }} as {{ field_name }}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "transform", "type": null, "description": ""}, {"name": "coalesce_with", "type": null, "description": ""}, {"name": "exclude_fields", "type": null, "description": ""}], "created_at": 1783450493.3236625, "supported_languages": null}, "macro.facebook_ads.get_column_datatype": {"name": "get_column_datatype", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/get_column_datatype.sql", "original_file_path": "macros/get_column_datatype.sql", "unique_id": "macro.facebook_ads.get_column_datatype", "macro_sql": "{% macro get_column_datatype(table_name, column_name) -%}\n {{ return(adapter.dispatch('get_column_datatype', 'facebook_ads')(table_name, column_name)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.facebook_ads.default__get_column_datatype"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_name", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}], "created_at": 1783450493.3242586, "supported_languages": null}, "macro.facebook_ads.default__get_column_datatype": {"name": "default__get_column_datatype", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/get_column_datatype.sql", "original_file_path": "macros/get_column_datatype.sql", "unique_id": "macro.facebook_ads.default__get_column_datatype", "macro_sql": "{% macro default__get_column_datatype(table_name, column_name) %}\n {%- set columns = adapter.get_columns_in_relation(ref(table_name)) -%}\n {%- for col in columns if col.name == column_name -%}\n {{ return(col.dtype | lower) }}\n {%- endfor -%}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_name", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}], "created_at": 1783450493.324884, "supported_languages": null}, "macro.facebook_ads.get_demographics_region_actions_columns": {"name": "get_demographics_region_actions_columns", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/staging/get_demographics_region_actions_columns.sql", "original_file_path": "macros/staging/get_demographics_region_actions_columns.sql", "unique_id": "macro.facebook_ads.get_demographics_region_actions_columns", "macro_sql": "{% macro get_demographics_region_actions_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"action_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"index\", \"datatype\": dbt.type_int()},\n {\"name\": \"value\", \"datatype\": dbt.type_float()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('facebook_ads__demographics_region_actions_passthrough_metrics')) }} \n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_float", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.3266554, "supported_languages": null}, "macro.facebook_ads.get_basic_ad_columns": {"name": "get_basic_ad_columns", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/staging/get_basic_ad_columns.sql", "original_file_path": "macros/staging/get_basic_ad_columns.sql", "unique_id": "macro.facebook_ads.get_basic_ad_columns", "macro_sql": "{% macro get_basic_ad_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"adset_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"inline_link_clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"spend\", \"datatype\": dbt.type_float()},\n {\"name\": \"reach\", \"datatype\": dbt.type_int()},\n {\"name\": \"frequency\", \"datatype\": dbt.type_float()}\n] %}\n\n{# \n Reach and Frequency are not included in downstream models by default, though they are included in the staging model.\n The below ensures that users can add Reach and Frequency to downstream models with the `facebook_ads__basic_ad_passthrough_metrics` variable\n while avoiding duplicate column errors.\n #}\n{% set unique_passthrough = [] %}\n{% for field in var('facebook_ads__basic_ad_passthrough_metrics') %}\n {% if (field.alias if field.alias else field.name)|lower not in ('reach', 'frequency') %}\n {% do unique_passthrough.append({\"name\": field.name, \"alias\": field.alias}) %}\n {% endif %}\n{% endfor %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, unique_passthrough) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int", "macro.dbt.type_float", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.3297913, "supported_languages": null}, "macro.facebook_ads.get_ad_history_columns": {"name": "get_ad_history_columns", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/staging/get_ad_history_columns.sql", "original_file_path": "macros/staging/get_ad_history_columns.sql", "unique_id": "macro.facebook_ads.get_ad_history_columns", "macro_sql": "{% macro get_ad_history_columns() %}\n\n{% set columns = [\n {\"name\": \"updated_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_set_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"creative_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversion_domain\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.3315632, "supported_languages": null}, "macro.facebook_ads.get_ad_set_history_columns": {"name": "get_ad_set_history_columns", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/staging/get_ad_set_history_columns.sql", "original_file_path": "macros/staging/get_ad_set_history_columns.sql", "unique_id": "macro.facebook_ads.get_ad_set_history_columns", "macro_sql": "{% macro get_ad_set_history_columns() %}\n\n{% set columns = [\n {\"name\": \"updated_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"start_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"end_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"bid_strategy\", \"datatype\": dbt.type_string()},\n {\"name\": \"daily_budget\", \"datatype\": dbt.type_int()},\n {\"name\": \"budget_remaining\", \"datatype\": dbt.type_int()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"optimization_goal\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.3339531, "supported_languages": null}, "macro.facebook_ads.get_account_history_columns": {"name": "get_account_history_columns", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/staging/get_account_history_columns.sql", "original_file_path": "macros/staging/get_account_history_columns.sql", "unique_id": "macro.facebook_ads.get_account_history_columns", "macro_sql": "{% macro get_account_history_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"account_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"business_country_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"timezone_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"timezone_offset_hours_utc\", \"datatype\": dbt.type_float()},\n {\"name\": \"business_state\", \"datatype\": dbt.type_string()},\n {\"name\": \"min_daily_budget\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.3362057, "supported_languages": null}, "macro.facebook_ads.get_creative_history_columns": {"name": "get_creative_history_columns", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/staging/get_creative_history_columns.sql", "original_file_path": "macros/staging/get_creative_history_columns.sql", "unique_id": "macro.facebook_ads.get_creative_history_columns", "macro_sql": "{% macro get_creative_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"page_link\", \"datatype\": dbt.type_string()},\n {\"name\": \"template_page_link\", \"datatype\": dbt.type_string()},\n {\"name\": \"url_tags\", \"datatype\": dbt.type_string()},\n {\"name\": \"asset_feed_spec_link_urls\", \"datatype\": dbt.type_string()},\n {\"name\": \"object_story_link_data_child_attachments\", \"datatype\": dbt.type_string()},\n {\"name\": \"object_story_link_data_caption\", \"datatype\": dbt.type_string()},\n {\"name\": \"object_story_link_data_description\", \"datatype\": dbt.type_string()},\n {\"name\": \"object_story_link_data_link\", \"datatype\": dbt.type_string()},\n {\"name\": \"object_story_link_data_message\", \"datatype\": dbt.type_string()},\n {\"name\": \"template_app_link_spec_android\", \"datatype\": dbt.type_string()},\n {\"name\": \"template_app_link_spec_ios\", \"datatype\": dbt.type_string()},\n {\"name\": \"template_app_link_spec_ipad\", \"datatype\": dbt.type_string()},\n {\"name\": \"template_app_link_spec_iphone\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.339724, "supported_languages": null}, "macro.facebook_ads.get_demographics_country_actions_columns": {"name": "get_demographics_country_actions_columns", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/staging/get_demographics_country_actions_columns.sql", "original_file_path": "macros/staging/get_demographics_country_actions_columns.sql", "unique_id": "macro.facebook_ads.get_demographics_country_actions_columns", "macro_sql": "{% macro get_demographics_country_actions_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"action_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"index\", \"datatype\": dbt.type_int()},\n {\"name\": \"value\", \"datatype\": dbt.type_float()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('facebook_ads__demographics_country_actions_passthrough_metrics')) }} \n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_float", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.3414907, "supported_languages": null}, "macro.facebook_ads.facebook_ads_fill_pass_through_columns": {"name": "facebook_ads_fill_pass_through_columns", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/staging/facebook_ads_fill_pass_through_columns.sql", "original_file_path": "macros/staging/facebook_ads_fill_pass_through_columns.sql", "unique_id": "macro.facebook_ads.facebook_ads_fill_pass_through_columns", "macro_sql": "{% macro facebook_ads_fill_pass_through_columns(pass_through_fields) %}\n\n{% if pass_through_fields %}\n {% for field in pass_through_fields %}\n {% if field.transform_sql %}\n , coalesce(cast({{ field.transform_sql }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% else %}\n , coalesce(cast({{ field.alias if field.alias else field.name }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_fields", "type": null, "description": ""}], "created_at": 1783450493.3428187, "supported_languages": null}, "macro.facebook_ads.get_demographics_region_columns": {"name": "get_demographics_region_columns", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/staging/get_demographics_region_columns.sql", "original_file_path": "macros/staging/get_demographics_region_columns.sql", "unique_id": "macro.facebook_ads.get_demographics_region_columns", "macro_sql": "{% macro get_demographics_region_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"frequency\", \"datatype\": dbt.type_float()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"inline_link_clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"reach\", \"datatype\": dbt.type_int()},\n {\"name\": \"region\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend\", \"datatype\": dbt.type_float()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('facebook_ads__demographics_region_passthrough_metrics')) }} \n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_float", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.3450449, "supported_languages": null}, "macro.facebook_ads.get_basic_ad_actions_columns": {"name": "get_basic_ad_actions_columns", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/staging/get_basic_ad_actions_columns.sql", "original_file_path": "macros/staging/get_basic_ad_actions_columns.sql", "unique_id": "macro.facebook_ads.get_basic_ad_actions_columns", "macro_sql": "{% macro get_basic_ad_actions_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"action_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"index\", \"datatype\": dbt.type_int()},\n {\"name\": \"value\", \"datatype\": dbt.type_float()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('facebook_ads__basic_ad_actions_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_float", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.3467913, "supported_languages": null}, "macro.facebook_ads.get_campaign_history_columns": {"name": "get_campaign_history_columns", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/staging/get_campaign_history_columns.sql", "original_file_path": "macros/staging/get_campaign_history_columns.sql", "unique_id": "macro.facebook_ads.get_campaign_history_columns", "macro_sql": "{% macro get_campaign_history_columns() %}\n\n{% set columns = [\n {\"name\": \"updated_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"created_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"start_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"stop_time\", \"datatype\": dbt.type_timestamp()}, \n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"daily_budget\", \"datatype\": dbt.type_int()},\n {\"name\": \"lifetime_budget\", \"datatype\": dbt.type_int()},\n {\"name\": \"budget_remaining\", \"datatype\": dbt.type_float()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.349154, "supported_languages": null}, "macro.facebook_ads.get_demographics_country_columns": {"name": "get_demographics_country_columns", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/staging/get_demographics_country_columns.sql", "original_file_path": "macros/staging/get_demographics_country_columns.sql", "unique_id": "macro.facebook_ads.get_demographics_country_columns", "macro_sql": "{% macro get_demographics_country_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"country\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"frequency\", \"datatype\": dbt.type_float()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"inline_link_clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"reach\", \"datatype\": dbt.type_int()},\n {\"name\": \"spend\", \"datatype\": dbt.type_float()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('facebook_ads__demographics_country_passthrough_metrics')) }} \n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_float", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.3513708, "supported_languages": null}, "macro.facebook_ads.get_basic_ad_action_values_columns": {"name": "get_basic_ad_action_values_columns", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/staging/get_basic_ad_action_values_columns.sql", "original_file_path": "macros/staging/get_basic_ad_action_values_columns.sql", "unique_id": "macro.facebook_ads.get_basic_ad_action_values_columns", "macro_sql": "{% macro get_basic_ad_action_values_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"action_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"index\", \"datatype\": dbt.type_int()},\n {\"name\": \"value\", \"datatype\": dbt.type_float()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('facebook_ads__basic_ad_action_values_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_float", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783450493.353106, "supported_languages": null}}, "docs": {"doc.dbt.__overview__": {"name": "__overview__", "resource_type": "doc", "package_name": "dbt", "path": "overview.md", "original_file_path": "docs/overview.md", "unique_id": "doc.dbt.__overview__", "block_contents": "### Welcome!\n\nWelcome to the auto-generated documentation for your dbt project!\n\n### Navigation\n\nYou can use the `Project` and `Database` navigation tabs on the left side of the window to explore the models\nin your project.\n\n#### Project Tab\nThe `Project` tab mirrors the directory structure of your dbt project. In this tab, you can see all of the\nmodels defined in your dbt project, as well as models imported from dbt packages.\n\n#### Database Tab\nThe `Database` tab also exposes your models, but in a format that looks more like a database explorer. This view\nshows relations (tables and views) grouped into database schemas. Note that ephemeral models are _not_ shown\nin this interface, as they do not exist in the database.\n\n### Graph Exploration\nYou can click the blue icon on the bottom-right corner of the page to view the lineage graph of your models.\n\nOn model pages, you'll see the immediate parents and children of the model you're exploring. By clicking the `Expand`\nbutton at the top-right of this lineage pane, you'll be able to see all of the models that are used to build,\nor are built from, the model you're exploring.\n\nOnce expanded, you'll be able to use the `--select` and `--exclude` model selection syntax to filter the\nmodels in the graph. For more information on model selection, check out the [dbt docs](https://docs.getdbt.com/docs/model-selection-syntax).\n\nNote that you can also right-click on models to interactively filter and explore the graph.\n\n---\n\n### More information\n\n- [What is dbt](https://docs.getdbt.com/docs/introduction)?\n- Read the [dbt viewpoint](https://docs.getdbt.com/docs/viewpoint)\n- [Installation](https://docs.getdbt.com/docs/installation)\n- Join the [dbt Community](https://www.getdbt.com/community/) for questions and discussion"}, "doc.linkedin.source_relation": {"name": "source_relation", "resource_type": "doc", "package_name": "linkedin", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.linkedin.source_relation", "block_contents": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "doc.apple_search_ads.source_relation": {"name": "source_relation", "resource_type": "doc", "package_name": "apple_search_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.apple_search_ads.source_relation", "block_contents": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "doc.apple_search_ads.conversions": {"name": "conversions", "resource_type": "doc", "package_name": "apple_search_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.apple_search_ads.conversions", "block_contents": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025."}, "doc.apple_search_ads.new_downloads": {"name": "new_downloads", "resource_type": "doc", "package_name": "apple_search_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.apple_search_ads.new_downloads", "block_contents": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025."}, "doc.apple_search_ads.redownloads": {"name": "redownloads", "resource_type": "doc", "package_name": "apple_search_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.apple_search_ads.redownloads", "block_contents": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025."}, "doc.apple_search_ads.tap_installs": {"name": "tap_installs", "resource_type": "doc", "package_name": "apple_search_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.apple_search_ads.tap_installs", "block_contents": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field."}, "doc.apple_search_ads.tap_new_downloads": {"name": "tap_new_downloads", "resource_type": "doc", "package_name": "apple_search_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.apple_search_ads.tap_new_downloads", "block_contents": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field."}, "doc.apple_search_ads.tap_redownloads": {"name": "tap_redownloads", "resource_type": "doc", "package_name": "apple_search_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.apple_search_ads.tap_redownloads", "block_contents": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field."}, "doc.apple_search_ads.total_downloads": {"name": "total_downloads", "resource_type": "doc", "package_name": "apple_search_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.apple_search_ads.total_downloads", "block_contents": "The sum of `new_downloads` and `redownloads`. Following the [release](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) of Apple Search Ads API v5, the package will sunset this field by April 2025. Please refer to its replacement, `tap_total_downloads`, instead."}, "doc.apple_search_ads.tap_total_downloads": {"name": "tap_total_downloads", "resource_type": "doc", "package_name": "apple_search_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.apple_search_ads.tap_total_downloads", "block_contents": "The sum of `tap_new_downloads` and `tap_redownloads`. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `total_downloads` field."}, "doc.reddit_ads._fivetran_synced": {"name": "_fivetran_synced", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads._fivetran_synced", "block_contents": "Timestamp of when Fivetran synced a record."}, "doc.reddit_ads.account_conversions_report": {"name": "account_conversions_report", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.account_conversions_report", "block_contents": "Provides a summary of conversion events at the account level, aggregating key metrics by event and day."}, "doc.reddit_ads.account_id": {"name": "account_id", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.account_id", "block_contents": "The ID of the account."}, "doc.reddit_ads.ad_conversions_report": {"name": "ad_conversions_report", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.ad_conversions_report", "block_contents": "Provides a summary of conversion events at the individual ad level, aggregating key metrics by event and day."}, "doc.reddit_ads.ad_group_conversions_report": {"name": "ad_group_conversions_report", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.ad_group_conversions_report", "block_contents": "Provides a summary of conversion events at the ad group level, aggregating key metrics by event and day."}, "doc.reddit_ads.ad_group_id": {"name": "ad_group_id", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.ad_group_id", "block_contents": "The ID of the ad group."}, "doc.reddit_ads.ad_group_name": {"name": "ad_group_name", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.ad_group_name", "block_contents": "Name of ad group."}, "doc.reddit_ads.ad_id": {"name": "ad_id", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.ad_id", "block_contents": "The ID of the ad."}, "doc.reddit_ads.ad_name": {"name": "ad_name", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.ad_name", "block_contents": "Name of ad."}, "doc.reddit_ads.attribution_type": {"name": "attribution_type", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.attribution_type", "block_contents": "Attribution type: \"CLICK_THROUGH_CONVERSION\", \"VIEW_THROUGH_CONVERSION\", or \"ALL_CONVERSION\".\nCLICK_THROUGH_CONVERSION: A user clicked on your ad and then completed the conversion action on your site. \nVIEW_THROUGH_CONVERSION: A user saw your ad and did not click it, but did complete the conversion action on your site.\nALL_CONVERSION: Combination of both."}, "doc.reddit_ads.avg_value": {"name": "avg_value", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.avg_value", "block_contents": "The average value of conversions over a given period."}, "doc.reddit_ads.bid_strategy": {"name": "bid_strategy", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.bid_strategy", "block_contents": "The bid strategy for this entity. \"MAXIMIZE_VOLUME\", \"MANUAL_BIDDING\", or \"BIDLESS\""}, "doc.reddit_ads.bid_value": {"name": "bid_value", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.bid_value", "block_contents": "The amount to pay in microcurrency per bidding event."}, "doc.reddit_ads.campaign_conversions_report": {"name": "campaign_conversions_report", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.campaign_conversions_report", "block_contents": "Provides a summary of conversion events at the campaign level, aggregating key metrics by event and day."}, "doc.reddit_ads.campaign_country_conversions_report": {"name": "campaign_country_conversions_report", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.campaign_country_conversions_report", "block_contents": "Provides a summary of conversion events at the campaign and country level, aggregating key metrics by event and day such as view-through and click-through conversions."}, "doc.reddit_ads.campaign_country_report": {"name": "campaign_country_report", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.campaign_country_report", "block_contents": "Each record represents a summary of events at the date, country, and campaign level."}, "doc.reddit_ads.campaign_id": {"name": "campaign_id", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.campaign_id", "block_contents": "The ID of the campaign."}, "doc.reddit_ads.campaign_name": {"name": "campaign_name", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.campaign_name", "block_contents": "Name of campaign."}, "doc.reddit_ads.click_attribution_window": {"name": "click_attribution_window", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.click_attribution_window", "block_contents": "Determines how long after clicking on your ad you count that user\u2019s actions as a conversion. \"DAY\", \"WEEK\", or \"MONTH\""}, "doc.reddit_ads.click_through_conversion_attribution_window_day": {"name": "click_through_conversion_attribution_window_day", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.click_through_conversion_attribution_window_day", "block_contents": "The total click-through conversions attributed, for the given day-long window. Not included by the package by default."}, "doc.reddit_ads.click_through_conversion": {"name": "click_through_conversion", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.click_through_conversion", "block_contents": "The total click-through conversions attributed, for the given month-long window."}, "doc.reddit_ads.click_through_conversion_attribution_window_week": {"name": "click_through_conversion_attribution_window_week", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.click_through_conversion_attribution_window_week", "block_contents": "The total click-through conversions attributed, for the given week-long window. Not included by the package by default."}, "doc.reddit_ads.click_url": {"name": "click_url", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.click_url", "block_contents": "The destination url, or the website address, that a visitor goes to when they click on the ad"}, "doc.reddit_ads.clicks": {"name": "clicks", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.clicks", "block_contents": "The number of clicks detected for this report period"}, "doc.reddit_ads.configured_status": {"name": "configured_status", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.configured_status", "block_contents": "The status configured by the account owner. \"ACTIVE\", \"PAUSED\", \"ARCHIVED\", \"DELETED\""}, "doc.reddit_ads.conversion_roas": {"name": "conversion_roas", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.conversion_roas", "block_contents": "Return on ad spend for purchases for this period"}, "doc.reddit_ads.country": {"name": "country", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.country", "block_contents": "The country associated with the record."}, "doc.reddit_ads.cpc": {"name": "cpc", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.cpc", "block_contents": "The cost-per-click for this period"}, "doc.reddit_ads.created_at": {"name": "created_at", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.created_at", "block_contents": "Time that the respective record (ad, ad group, campaign, post, etc) was created. ISO-8601 timestamp."}, "doc.reddit_ads.ctr": {"name": "ctr", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.ctr", "block_contents": "The click-through-rate for this period"}, "doc.reddit_ads.currency": {"name": "currency", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.currency", "block_contents": "The currency this account uses (ISO-4217)"}, "doc.reddit_ads.date": {"name": "date", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.date", "block_contents": "YYYY-MM-DD formatted date"}, "doc.reddit_ads.date_day": {"name": "date_day", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.date_day", "block_contents": "YYYY-MM-DD formatted date"}, "doc.reddit_ads.ecpm": {"name": "ecpm", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.ecpm", "block_contents": "The effective CPM for this period"}, "doc.reddit_ads.effective_status": {"name": "effective_status", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.effective_status", "block_contents": "The calculated status determining the real status of this entity."}, "doc.reddit_ads.end_time": {"name": "end_time", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.end_time", "block_contents": "When the entity will stop delivering."}, "doc.reddit_ads.event_name": {"name": "event_name", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.event_name", "block_contents": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset."}, "doc.reddit_ads.expand_targeting": {"name": "expand_targeting", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.expand_targeting", "block_contents": "Boolean that when selected, allows Reddit to expand your targeting to maximize your results."}, "doc.reddit_ads.funding_instrument_id": {"name": "funding_instrument_id", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.funding_instrument_id", "block_contents": "Campaign level funding instrument id"}, "doc.reddit_ads.goal_type": {"name": "goal_type", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.goal_type", "block_contents": "The type of goal for the entity. \"IMPRESSIONS\", \"PERCENTAGE\", \"CLICKS\", \"CONVERSIONS\", \"LIFETIME_SPEND\", \"DAILY_SPEND\", or \"VIDEO_VIEWABLE_IMPRESSIONS\""}, "doc.reddit_ads.goal_value": {"name": "goal_value", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.goal_value", "block_contents": "The value used to determine the goal has been met. This is measured in microcurrency for monetary goals types."}, "doc.reddit_ads.impressions": {"name": "impressions", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.impressions", "block_contents": "The number of impressions served for this report period"}, "doc.reddit_ads.is_processing": {"name": "is_processing", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.is_processing", "block_contents": "Whether or not effective status is processing"}, "doc.reddit_ads.objective": {"name": "objective", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.objective", "block_contents": "The objective type of a campaign."}, "doc.reddit_ads.optimization_strategy_type": {"name": "optimization_strategy_type", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.optimization_strategy_type", "block_contents": "The strategy to use when optimizing the delivery of an ad. \"DOWNSTREAM_CONVERSIONS\" or \"APP_INSTALLS\""}, "doc.reddit_ads.post_id": {"name": "post_id", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.post_id", "block_contents": "The ID of the post."}, "doc.reddit_ads.post_url": {"name": "post_url", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.post_url", "block_contents": "The URL belonging to the post."}, "doc.reddit_ads.region": {"name": "region", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.region", "block_contents": "The region (US state or UK country) targeted for the reports"}, "doc.reddit_ads.rejection_reason": {"name": "rejection_reason", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.rejection_reason", "block_contents": "Reason why entity was rejected."}, "doc.reddit_ads.source_relation": {"name": "source_relation", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.source_relation", "block_contents": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "doc.reddit_ads.spend": {"name": "spend", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.spend", "block_contents": "The amount (in microcurrency) spent for this report period in Ad Account's currency, as defined [here](https://ads-api.reddit.com/docs/#tag/Reporting/paths/~1api~1v2.0~1accounts~1{account_id}~1reports/get)"}, "doc.reddit_ads.start_time": {"name": "start_time", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.start_time", "block_contents": "When the entity will begin to deliver."}, "doc.reddit_ads.stg_reddit_ads__account_conversions_report": {"name": "stg_reddit_ads__account_conversions_report", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.stg_reddit_ads__account_conversions_report", "block_contents": "Provides a summary of conversion events at the account level, aggregating key metrics by event and day such as view-through and click-through conversions."}, "doc.reddit_ads.stg_reddit_ads__ad_conversions_report": {"name": "stg_reddit_ads__ad_conversions_report", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.stg_reddit_ads__ad_conversions_report", "block_contents": "Provides a summary of conversion events at the individual ad level, aggregating key metrics by event and day such as view-through and click-through conversions."}, "doc.reddit_ads.stg_reddit_ads__ad_group_conversions_report": {"name": "stg_reddit_ads__ad_group_conversions_report", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.stg_reddit_ads__ad_group_conversions_report", "block_contents": "Provides a summary of conversion events at the ad group level, aggregating key metrics by event and day such as view-through and click-through conversions."}, "doc.reddit_ads.stg_reddit_ads__campaign_conversions_report": {"name": "stg_reddit_ads__campaign_conversions_report", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.stg_reddit_ads__campaign_conversions_report", "block_contents": "Provides a summary of conversion events at the campaign level, aggregating key metrics by event and day such as view-through and click-through conversions."}, "doc.reddit_ads.time_zone_id": {"name": "time_zone_id", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.time_zone_id", "block_contents": "The time zone id preference for this account"}, "doc.reddit_ads.total_items": {"name": "total_items", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.total_items", "block_contents": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion."}, "doc.reddit_ads.total_value": {"name": "total_value", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.total_value", "block_contents": "The total monetary value associated with a conversion event."}, "doc.reddit_ads.video_started": {"name": "video_started", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.video_started", "block_contents": "The number of times the ad was served and the video began playing"}, "doc.reddit_ads.video_watched_25_percent": {"name": "video_watched_25_percent", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.video_watched_25_percent", "block_contents": "The number of times the ad was served and at least 25% of the video has played"}, "doc.reddit_ads.video_watched_3_seconds": {"name": "video_watched_3_seconds", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.video_watched_3_seconds", "block_contents": "The number of times the ad was served and at least 3 seconds of the video has played"}, "doc.reddit_ads.video_watched_50_percent": {"name": "video_watched_50_percent", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.video_watched_50_percent", "block_contents": "The number of times the ad was served and at least 50% of the video has played"}, "doc.reddit_ads.video_watched_5_seconds": {"name": "video_watched_5_seconds", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.video_watched_5_seconds", "block_contents": "The number of times the ad was served and at least 5 seconds of the video has played"}, "doc.reddit_ads.video_watched_75_percent": {"name": "video_watched_75_percent", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.video_watched_75_percent", "block_contents": "The number of times the ad was served and at least 75% of the video has played"}, "doc.reddit_ads.view_attribution_window": {"name": "view_attribution_window", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.view_attribution_window", "block_contents": "Determines how long after viewing on your ad you count that user\u2019s actions as a conversion. \"DAY\", \"WEEK\", or \"MONTH\""}, "doc.reddit_ads.view_through_conversion_attribution_window_day": {"name": "view_through_conversion_attribution_window_day", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.view_through_conversion_attribution_window_day", "block_contents": "The total click-through conversions attributed, for the given day-long window. Not included by the package by default."}, "doc.reddit_ads.view_through_conversion": {"name": "view_through_conversion", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.view_through_conversion", "block_contents": "The total view-through conversions attributed, for the given month-long window."}, "doc.reddit_ads.view_through_conversion_attribution_window_week": {"name": "view_through_conversion_attribution_window_week", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.view_through_conversion_attribution_window_week", "block_contents": "The total click-through conversions attributed, for the given week-long window. Not included by the package by default."}, "doc.reddit_ads.viewer_comments": {"name": "viewer_comments", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.viewer_comments", "block_contents": "The number of times a user saw the post, and also commented on it. We count per view + comment combination (similar to a conversion)"}, "doc.reddit_ads.views": {"name": "views", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.views", "block_contents": "The number of views detected for this report period"}, "doc.snapchat_ads._fivetran_synced": {"name": "_fivetran_synced", "resource_type": "doc", "package_name": "snapchat_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.snapchat_ads._fivetran_synced", "block_contents": "When the record was last synced by Fivetran."}, "doc.snapchat_ads.is_most_recent_record": {"name": "is_most_recent_record", "resource_type": "doc", "package_name": "snapchat_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.snapchat_ads.is_most_recent_record", "block_contents": "Boolean representing whether a record is the most recent version of that record."}, "doc.snapchat_ads.source_relation": {"name": "source_relation", "resource_type": "doc", "package_name": "snapchat_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.snapchat_ads.source_relation", "block_contents": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "doc.pinterest._fivetran_synced": {"name": "_fivetran_synced", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest._fivetran_synced", "block_contents": "Timestamp of when a record was last synced."}, "doc.pinterest.is_most_recent_record": {"name": "is_most_recent_record", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.is_most_recent_record", "block_contents": "Boolean representing whether the record is the most recent version of the object."}, "doc.pinterest.date_day": {"name": "date_day", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.date_day", "block_contents": "The performance date of the record."}, "doc.pinterest.ad_group_id": {"name": "ad_group_id", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.ad_group_id", "block_contents": "The ID of the related Ad group."}, "doc.pinterest.country_id": {"name": "country_id", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.country_id", "block_contents": "The ID of the targeted country."}, "doc.pinterest.region_id": {"name": "region_id", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.region_id", "block_contents": "The ID of the targeted region."}, "doc.pinterest.pin_promotion_id": {"name": "pin_promotion_id", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.pin_promotion_id", "block_contents": "The ID of the related Pin promotion."}, "doc.pinterest.campaign_id": {"name": "campaign_id", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.campaign_id", "block_contents": "The ID of the related Campaign."}, "doc.pinterest.ad_account_id": {"name": "ad_account_id", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.ad_account_id", "block_contents": "The ID of the related Advertiser."}, "doc.pinterest.advertiser_id": {"name": "advertiser_id", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.advertiser_id", "block_contents": "The ID of the related Advertiser."}, "doc.pinterest.impressions": {"name": "impressions", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.impressions", "block_contents": "The number of paid and earned impressions that occurred on the day of the record."}, "doc.pinterest.clicks": {"name": "clicks", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.clicks", "block_contents": "The number of paid and earned clicks that occurred on the day of the record."}, "doc.pinterest.spend": {"name": "spend", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.spend", "block_contents": "The amount of spend that occurred on the day of the record."}, "doc.pinterest.updated_at": {"name": "updated_at", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.updated_at", "block_contents": "Timestamp of when a record was last updated."}, "doc.pinterest.created_at": {"name": "created_at", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.created_at", "block_contents": "Timestamp of when a record was created."}, "doc.pinterest.spend_in_micro_dollar": {"name": "spend_in_micro_dollar", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.spend_in_micro_dollar", "block_contents": "The amount of spend in micro dollars that occurred on the day of the record."}, "doc.pinterest.clickthrough_1": {"name": "clickthrough_1", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.clickthrough_1", "block_contents": "The number of paid pin clicks that occurred on the day of the record."}, "doc.pinterest.clickthrough_2": {"name": "clickthrough_2", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.clickthrough_2", "block_contents": "The number of earned outbound clicks that occurred on the day of the record."}, "doc.pinterest.impression_1": {"name": "impression_1", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.impression_1", "block_contents": "The number of paid pin impressions that occurred on the day of the record."}, "doc.pinterest.impression_2": {"name": "impression_2", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.impression_2", "block_contents": "The number of earned pin impressions that occurred on the day of the record."}, "doc.pinterest.source_relation": {"name": "source_relation", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.source_relation", "block_contents": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "doc.pinterest.total_conversions": {"name": "total_conversions", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.total_conversions", "block_contents": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "doc.pinterest.total_conversions_quantity": {"name": "total_conversions_quantity", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.total_conversions_quantity", "block_contents": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "doc.pinterest.total_conversions_value_in_micro_dollar": {"name": "total_conversions_value_in_micro_dollar", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.total_conversions_value_in_micro_dollar", "block_contents": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. The value is expressed in microdollars, where one microdollar is one-millionth of a US dollar. Example: If the total order value from conversions is $50,000, this would be represented as 50,000,000,000 microdollars."}, "doc.pinterest.total_conversions_value": {"name": "total_conversions_value", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.total_conversions_value", "block_contents": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}, "doc.google_ads._fivetran_id": {"name": "_fivetran_id", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads._fivetran_id", "block_contents": "Unique ID used by Fivetran to sync and dedupe data."}, "doc.google_ads._fivetran_synced": {"name": "_fivetran_synced", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads._fivetran_synced", "block_contents": "Timestamp of when a record was last synced."}, "doc.google_ads.account_descriptive_name": {"name": "account_descriptive_name", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.account_descriptive_name", "block_contents": "The descriptive name of the Customer account."}, "doc.google_ads.ad_group_id": {"name": "ad_group_id", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.ad_group_id", "block_contents": "The ID of the AdGroup."}, "doc.google_ads.ad_group_name": {"name": "ad_group_name", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.ad_group_name", "block_contents": "The name of the AdGroup."}, "doc.google_ads.ad_group_status": {"name": "ad_group_status", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.ad_group_status", "block_contents": "Status of the ad group."}, "doc.google_ads.campaign_id": {"name": "campaign_id", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.campaign_id", "block_contents": "The ID of the Campaign."}, "doc.google_ads.ad_id": {"name": "ad_id", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.ad_id", "block_contents": "The ID of the Ad."}, "doc.google_ads.account_id": {"name": "account_id", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.account_id", "block_contents": "The ID of the Account."}, "doc.google_ads.ad_status": {"name": "ad_status", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.ad_status", "block_contents": "Status of the Ad."}, "doc.google_ads.campaign_name": {"name": "campaign_name", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.campaign_name", "block_contents": "The name of the Campaign."}, "doc.google_ads.campaign_status": {"name": "campaign_status", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.campaign_status", "block_contents": "Status of the Campaign."}, "doc.google_ads.clicks": {"name": "clicks", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.clicks", "block_contents": "The number of clicks."}, "doc.google_ads.conversions": {"name": "conversions", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.conversions", "block_contents": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business."}, "doc.google_ads.conversions_value": {"name": "conversions_value", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.conversions_value", "block_contents": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful."}, "doc.google_ads.view_through_conversions": {"name": "view_through_conversions", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.view_through_conversions", "block_contents": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column."}, "doc.google_ads.cost": {"name": "cost", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.cost", "block_contents": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "doc.google_ads.date": {"name": "date", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.date", "block_contents": "The date being reported on."}, "doc.google_ads.effective_final_url": {"name": "effective_final_url", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.effective_final_url", "block_contents": "Effective final URL of the impressions."}, "doc.google_ads.external_customer_id": {"name": "external_customer_id", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.external_customer_id", "block_contents": "The Customer ID."}, "doc.google_ads.impressions": {"name": "impressions", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.impressions", "block_contents": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "doc.google_ads.criteria_id": {"name": "criteria_id", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.criteria_id", "block_contents": "The Criterion ID."}, "doc.google_ads.gcl_id": {"name": "gcl_id", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.gcl_id", "block_contents": "The Google Click ID."}, "doc.google_ads.criteria": {"name": "criteria", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.criteria", "block_contents": "Descriptive string for the Criterion."}, "doc.google_ads.criteria_destination_url": {"name": "criteria_destination_url", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.criteria_destination_url", "block_contents": "Destination URL of the criterion that triggered ads."}, "doc.google_ads.criteria_type": {"name": "criteria_type", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.criteria_type", "block_contents": "The type of the Criterion."}, "doc.google_ads.base_url": {"name": "base_url", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.base_url", "block_contents": "The base URL of the ad, extracted from the `final_urls`."}, "doc.google_ads.url_host": {"name": "url_host", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.url_host", "block_contents": "The URL host of the ad, extracted from the `final_urls`."}, "doc.google_ads.url_path": {"name": "url_path", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.url_path", "block_contents": "The URL path of the ad, extracted from the `final_urls`."}, "doc.google_ads.utm_source": {"name": "utm_source", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.utm_source", "block_contents": "The utm_source parameter of the ad, extracted from the `final_urls`."}, "doc.google_ads.utm_medium": {"name": "utm_medium", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.utm_medium", "block_contents": "The utm_medium parameter of the ad, extracted from the `final_urls`."}, "doc.google_ads.utm_campaign": {"name": "utm_campaign", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.utm_campaign", "block_contents": "The utm_campaign parameter of the ad, extracted from the `final_urls`."}, "doc.google_ads.utm_content": {"name": "utm_content", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.utm_content", "block_contents": "The utm_content parameter of the ad, extracted from the `final_urls`."}, "doc.google_ads.utm_term": {"name": "utm_term", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.utm_term", "block_contents": "The utm_term parameter of the ad, extracted from the `final_urls`."}, "doc.google_ads.updated_at": {"name": "updated_at", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.updated_at", "block_contents": "Timestamp of when the record was last updated in Google Ads."}, "doc.google_ads.ad_type": {"name": "ad_type", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.ad_type", "block_contents": "The type of the ad in Google Ads."}, "doc.google_ads.ad_group_type": {"name": "ad_group_type", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.ad_group_type", "block_contents": "The type of the ad group in Google Ads."}, "doc.google_ads.is_most_recent_record": {"name": "is_most_recent_record", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.is_most_recent_record", "block_contents": "Boolean representing whether the record is the most recent version of the object."}, "doc.google_ads.ad_network_type": {"name": "ad_network_type", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.ad_network_type", "block_contents": "The Google Ad network type used across the account."}, "doc.google_ads.device": {"name": "device", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.device", "block_contents": "Account ad performance per unique device where the ads were served."}, "doc.google_ads.source_relation": {"name": "source_relation", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.source_relation", "block_contents": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "doc.google_ads.resource_name": {"name": "resource_name", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.resource_name", "block_contents": "The resource name of the search term view. Search term view resource names have the form: `customers/{customer_id}/searchTermViews/{campaign_id}~{ad_group_id}~{URL-base64_search_term}`"}, "doc.google_ads.keyword_ad_group_criterion": {"name": "keyword_ad_group_criterion", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.keyword_ad_group_criterion", "block_contents": "The resource name of the keyword's ad group criterion. Ad group criterion resource names have the form: `customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}`"}, "doc.google_ads.search_term": {"name": "search_term", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.search_term", "block_contents": "A word or set of words a person enters when searching on Google or one of Google's Search Network sites"}, "doc.google_ads.search_term_match_type": {"name": "search_term_match_type", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.search_term_match_type", "block_contents": "How closely the search terms that triggered your ads on Google are related to the actual keywords in your account. Can be `BROAD` ,`EXACT`, `PHRASE`, `UNKNOWN`, or `UNSPECIFIED`.\n\nSee more details [here](https://support.google.com/google-ads/answer/7478529?sjid=15681083914881504235-NC&visit_id=638760377693438101-1187740487&rd=1)."}, "doc.google_ads.absolute_top_impression_percentage": {"name": "absolute_top_impression_percentage", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.absolute_top_impression_percentage", "block_contents": "Search absolute top impression share is the percentage of your Search ad impressions that are shown in the most prominent Search position. See more details [here](https://support.google.com/google-ads/answer/7501826?sjid=15681083914881504235-NC)."}, "doc.google_ads.top_impression_percentage": {"name": "top_impression_percentage", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.top_impression_percentage", "block_contents": "The percent of your ad impressions that are shown adjacent to the top organic search results. See more details [here](https://support.google.com/google-ads/answer/7501826?sjid=15681083914881504235-NC)."}, "doc.google_ads.search_term_status": {"name": "search_term_status", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.search_term_status", "block_contents": "Indicates whether the search term is currently one of your targeted or excluded keywords. Possible values: `ADDED`, `ADDED_EXCLUDED`, `EXCLUDED`, `NONE`, `UNKNOWN`, or `UNSPECIFIED`"}, "doc.google_ads.info_text": {"name": "info_text", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.info_text", "block_contents": "The text of the keyword (at most 80 characters and 10 words)."}, "doc.google_ads.conversions_from_interactions_value_per_interaction": {"name": "conversions_from_interactions_value_per_interaction", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.conversions_from_interactions_value_per_interaction", "block_contents": "The value of conversions from interactions divided by the number of ad interactions."}, "doc.google_ads.average_cpc": {"name": "average_cpc", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.average_cpc", "block_contents": "Average cost-per-click. The average amount that you've been charged for a click on your ad. Average cost-per-click (avg. CPC) is calculated by dividing the total cost of your clicks by the total number of clicks. See more details [here](https://support.google.com/google-ads/answer/14074?hl=en&ref_topic=24937&sjid=15681083914881504235-NC)."}, "doc.google_ads.ctr": {"name": "ctr", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.ctr", "block_contents": "The click-through rate. A ratio showing how often people who see your ad or free product listing end up clicking it. See more details [here](https://support.google.com/google-ads/answer/2615875?hl=en&ref_topic=24937&sjid=15681083914881504235-NC)."}, "doc.google_ads.conversions_from_interactions_rate": {"name": "conversions_from_interactions_rate", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.conversions_from_interactions_rate", "block_contents": "Conversions from interactions divided by the number of ad interactions (such as clicks for text ads or views for video ads).\n\nSee more details [here](https://support.google.com/google-ads/answer/2684489?hl=en&ref_topic=24937&sjid=15681083914881504235-NC)."}, "doc.amazon_ads._fivetran_deleted": {"name": "_fivetran_deleted", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads._fivetran_deleted", "block_contents": "Boolean created by Fivetran to indicate whether the record has been deleted."}, "doc.amazon_ads._fivetran_id": {"name": "_fivetran_id", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads._fivetran_id", "block_contents": "Unique ID used by Fivetran to sync and dedupe data."}, "doc.amazon_ads._fivetran_synced": {"name": "_fivetran_synced", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads._fivetran_synced", "block_contents": "Timestamp of when a record was last synced."}, "doc.amazon_ads.account_id": {"name": "account_id", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.account_id", "block_contents": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces."}, "doc.amazon_ads.account_name": {"name": "account_name", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.account_name", "block_contents": "Account Name. Not currently populated for sellers."}, "doc.amazon_ads.ad_group_id": {"name": "ad_group_id", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.ad_group_id", "block_contents": "The ID of the AdGroup."}, "doc.amazon_ads.ad_group_name": {"name": "ad_group_name", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.ad_group_name", "block_contents": "The name of the AdGroup."}, "doc.amazon_ads.ad_id": {"name": "ad_id", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.ad_id", "block_contents": "The ID of the Ad."}, "doc.amazon_ads.ad_keyword_status": {"name": "ad_keyword_status", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.ad_keyword_status", "block_contents": "Current status of a keyword."}, "doc.amazon_ads.advertised_asin": {"name": "advertised_asin", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.advertised_asin", "block_contents": "The ASIN associated to an advertised product."}, "doc.amazon_ads.advertised_sku": {"name": "advertised_sku", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.advertised_sku", "block_contents": "The SKU being advertised."}, "doc.amazon_ads.bid_keyword": {"name": "bid_keyword", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.bid_keyword", "block_contents": "Bid associated with this keyword."}, "doc.amazon_ads.campaign_applicable_budget_rule_id": {"name": "campaign_applicable_budget_rule_id", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.campaign_applicable_budget_rule_id", "block_contents": "The ID associated to the active budget rule for a campaign."}, "doc.amazon_ads.campaign_applicable_budget_rule_name": {"name": "campaign_applicable_budget_rule_name", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.campaign_applicable_budget_rule_name", "block_contents": "The name associated to the active budget rule for a campaign."}, "doc.amazon_ads.campaign_bidding_strategy": {"name": "campaign_bidding_strategy", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.campaign_bidding_strategy", "block_contents": "The bidding strategy associated with a campaign."}, "doc.amazon_ads.campaign_budget_amount": {"name": "campaign_budget_amount", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.campaign_budget_amount", "block_contents": "Total budget allocated to the campaign."}, "doc.amazon_ads.campaign_budget_currency_code": {"name": "campaign_budget_currency_code", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.campaign_budget_currency_code", "block_contents": "The currency code associated with the campaign."}, "doc.amazon_ads.campaign_budget_type": {"name": "campaign_budget_type", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.campaign_budget_type", "block_contents": "One of: daily or lifetime."}, "doc.amazon_ads.campaign_id": {"name": "campaign_id", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.campaign_id", "block_contents": "The ID of the Campaign."}, "doc.amazon_ads.campaign_name": {"name": "campaign_name", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.campaign_name", "block_contents": "The name of the Campaign."}, "doc.amazon_ads.campaign_rule_based_budget_amount": {"name": "campaign_rule_based_budget_amount", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.campaign_rule_based_budget_amount", "block_contents": "The value of the rule-based budget for a campaign."}, "doc.amazon_ads.clicks": {"name": "clicks", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.clicks", "block_contents": "Total number of ad clicks."}, "doc.amazon_ads.cost": {"name": "cost", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.cost", "block_contents": "Total cost of ad clicks."}, "doc.amazon_ads.country_code": {"name": "country_code", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.country_code", "block_contents": "The code for a given country."}, "doc.amazon_ads.creation_date": {"name": "creation_date", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.creation_date", "block_contents": "The date of creation of the record."}, "doc.amazon_ads.currency_code": {"name": "currency_code", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.currency_code", "block_contents": "The currency used for all monetary values for entities under this profile."}, "doc.amazon_ads.default_bid": {"name": "default_bid", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.default_bid", "block_contents": "The date of creation of the record."}, "doc.amazon_ads.impressions": {"name": "impressions", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.impressions", "block_contents": "Total number of ad impressions."}, "doc.amazon_ads.is_most_recent_record": {"name": "is_most_recent_record", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.is_most_recent_record", "block_contents": "Boolean indicating whether record was the most recent instance."}, "doc.amazon_ads.keyword_bid": {"name": "keyword_bid", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.keyword_bid", "block_contents": "Bid associated with a keyword or targeting expression."}, "doc.amazon_ads.keyword_id": {"name": "keyword_id", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.keyword_id", "block_contents": "The ID of the keyword."}, "doc.amazon_ads.keyword_match_type": {"name": "keyword_match_type", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.keyword_match_type", "block_contents": "One of (broad, exact, or phrase.)"}, "doc.amazon_ads.keyword_text": {"name": "keyword_text", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.keyword_text", "block_contents": "The exact text for the keyword."}, "doc.amazon_ads.keyword_type": {"name": "keyword_type", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.keyword_type", "block_contents": "Type of matching for the keyword used in bid. One of: BROAD, PHRASE, or EXACT."}, "doc.amazon_ads.last_updated_date": {"name": "last_updated_date", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.last_updated_date", "block_contents": "Date of last update to record."}, "doc.amazon_ads.match_type": {"name": "match_type", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.match_type", "block_contents": "Type of matching for the keyword used in bid. One of: BROAD, PHRASE, or EXACT."}, "doc.amazon_ads.negative_keyword_id": {"name": "negative_keyword_id", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.negative_keyword_id", "block_contents": "The ID of the negative keyword."}, "doc.amazon_ads.portfolio_id": {"name": "portfolio_id", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.portfolio_id", "block_contents": "The ID of the Portfolio."}, "doc.amazon_ads.portfolio_name": {"name": "portfolio_name", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.portfolio_name", "block_contents": "The name of the Portfolio."}, "doc.amazon_ads.profile_id": {"name": "profile_id", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.profile_id", "block_contents": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace."}, "doc.amazon_ads.report_date": {"name": "report_date", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.report_date", "block_contents": "The date of the report."}, "doc.amazon_ads.search_term": {"name": "search_term", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.search_term", "block_contents": "The search term used by the customer."}, "doc.amazon_ads.serving_status": {"name": "serving_status", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.serving_status", "block_contents": "The current serving status of the record."}, "doc.amazon_ads.state": {"name": "state", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.state", "block_contents": "The state of the record (enabled, paused, or archived)."}, "doc.amazon_ads.targeting": {"name": "targeting", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.targeting", "block_contents": "A string representation of the expression object used in the targeting clause."}, "doc.amazon_ads.source_relation": {"name": "source_relation", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.source_relation", "block_contents": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "doc.amazon_ads.purchases_30_d": {"name": "purchases_30_d", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.purchases_30_d", "block_contents": "Number of attributed conversion events occurring within 30 days of an ad click."}, "doc.amazon_ads.sales_30_d": {"name": "sales_30_d", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.sales_30_d", "block_contents": "Total value of sales occurring within 30 days of an ad click."}, "doc.twitter_ads._fivetran_synced": {"name": "_fivetran_synced", "resource_type": "doc", "package_name": "twitter_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.twitter_ads._fivetran_synced", "block_contents": "When the record was last synced by Fivetran."}, "doc.twitter_ads.created_at": {"name": "created_at", "resource_type": "doc", "package_name": "twitter_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.twitter_ads.created_at", "block_contents": "The timestamp the account was created."}, "doc.twitter_ads.updated_at": {"name": "updated_at", "resource_type": "doc", "package_name": "twitter_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.twitter_ads.updated_at", "block_contents": "The timestamp the account was last updated."}, "doc.twitter_ads.deleted": {"name": "deleted", "resource_type": "doc", "package_name": "twitter_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.twitter_ads.deleted", "block_contents": "Whether the record has been deleted or not."}, "doc.twitter_ads.source_relation": {"name": "source_relation", "resource_type": "doc", "package_name": "twitter_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.twitter_ads.source_relation", "block_contents": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "doc.twitter_ads.country": {"name": "country", "resource_type": "doc", "package_name": "twitter_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.twitter_ads.country", "block_contents": "Long-form name of the country being reported on."}, "doc.twitter_ads.region": {"name": "region", "resource_type": "doc", "package_name": "twitter_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.twitter_ads.region", "block_contents": "Long-form name of the geopgraphic region being reported on."}, "doc.ad_reporting.account_id": {"name": "account_id", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.account_id", "block_contents": "The ID representing the account."}, "doc.ad_reporting.account_name": {"name": "account_name", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.account_name", "block_contents": "The name of the account, if present in the source data."}, "doc.ad_reporting.ad_group_id": {"name": "ad_group_id", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.ad_group_id", "block_contents": "The ID representing the ad group, if present in the source data."}, "doc.ad_reporting.ad_group_name": {"name": "ad_group_name", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.ad_group_name", "block_contents": "The name of the ad group, if present in the source data."}, "doc.ad_reporting.ad_id": {"name": "ad_id", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.ad_id", "block_contents": "The ID representing the ad, if present in the source data."}, "doc.ad_reporting.ad_name": {"name": "ad_name", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.ad_name", "block_contents": "The name of the ad, if present in the source data."}, "doc.ad_reporting.base_url": {"name": "base_url", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.base_url", "block_contents": "The base url of the ad."}, "doc.ad_reporting.campaign_id": {"name": "campaign_id", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.campaign_id", "block_contents": "The ID representing the campaign, if present in the source data."}, "doc.ad_reporting.campaign_name": {"name": "campaign_name", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.campaign_name", "block_contents": "The name of the campaign, if present in the source data."}, "doc.ad_reporting.clicks": {"name": "clicks", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.clicks", "block_contents": "The count of clicks."}, "doc.ad_reporting.conversions": {"name": "conversions", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.conversions", "block_contents": "The count of attributed conversion events."}, "doc.ad_reporting.conversions_value": {"name": "conversions_value", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.conversions_value", "block_contents": "The monetary value of attributed conversion events."}, "doc.ad_reporting.date_day": {"name": "date_day", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.date_day", "block_contents": "The date of the report."}, "doc.ad_reporting.impressions": {"name": "impressions", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.impressions", "block_contents": "The count of impressions."}, "doc.ad_reporting.keyword_id": {"name": "keyword_id", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.keyword_id", "block_contents": "The ID representing the keyword, if present in the source data."}, "doc.ad_reporting.keyword_match_type": {"name": "keyword_match_type", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.keyword_match_type", "block_contents": "The keyword match type associated with this record."}, "doc.ad_reporting.keyword_text": {"name": "keyword_text", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.keyword_text", "block_contents": "The keyword text."}, "doc.ad_reporting.platform": {"name": "platform", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.platform", "block_contents": "The ad platform associated with this record."}, "doc.ad_reporting.search_match_type": {"name": "search_match_type", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.search_match_type", "block_contents": "The search match type associated with this record."}, "doc.ad_reporting.search_query": {"name": "search_query", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.search_query", "block_contents": "The search query text."}, "doc.ad_reporting.spend": {"name": "spend", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.spend", "block_contents": "The cost of the ads."}, "doc.ad_reporting.url_host": {"name": "url_host", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.url_host", "block_contents": "The URL host of the ad."}, "doc.ad_reporting.url_path": {"name": "url_path", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.url_path", "block_contents": "The URL path of the ad."}, "doc.ad_reporting.utm_campaign": {"name": "utm_campaign", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.utm_campaign", "block_contents": "The utm_campaign parameter of the ad."}, "doc.ad_reporting.utm_content": {"name": "utm_content", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.utm_content", "block_contents": "The utm_content parameter of the ad."}, "doc.ad_reporting.utm_medium": {"name": "utm_medium", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.utm_medium", "block_contents": "The utm_medium parameter of the ad."}, "doc.ad_reporting.utm_source": {"name": "utm_source", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.utm_source", "block_contents": "The utm_source parameter of the ad."}, "doc.ad_reporting.utm_term": {"name": "utm_term", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.utm_term", "block_contents": "The utm_term parameter of the ad."}, "doc.ad_reporting.source_relation": {"name": "source_relation", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.source_relation", "block_contents": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "doc.tiktok_ads.source_relation": {"name": "source_relation", "resource_type": "doc", "package_name": "tiktok_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.tiktok_ads.source_relation", "block_contents": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "doc.microsoft_ads.account_id": {"name": "account_id", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.account_id", "block_contents": "The ID of the account."}, "doc.microsoft_ads.account_name": {"name": "account_name", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.account_name", "block_contents": "The name of the account."}, "doc.microsoft_ads.account_timezone": {"name": "account_timezone", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.account_timezone", "block_contents": "The time zone associated with this account."}, "doc.microsoft_ads.ad_distribution": {"name": "ad_distribution", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.ad_distribution", "block_contents": "The distribution medium associated with this record."}, "doc.microsoft_ads.ad_id": {"name": "ad_id", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.ad_id", "block_contents": "The ID of the corresponding ad."}, "doc.microsoft_ads.ad_group_status": {"name": "ad_group_status", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.ad_group_status", "block_contents": "The status of this ad group; see the following [documentation](https://help.ads.microsoft.com/apex/index/3/en/53094) for more information on values and definitions."}, "doc.microsoft_ads.ad_name": {"name": "ad_name", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.ad_name", "block_contents": "The name of the corresponding ad; `title_part_1` is used as the default ad name but you may customize this by using the `microsoft_ads__ad_name_selector` variable. For more information, refer to the [README](https://github.com/fivetran/dbt_microsoft_ads/blob/main/README.md#change-how-ad-name-is-determined)."}, "doc.microsoft_ads.ad_group_id": {"name": "ad_group_id", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.ad_group_id", "block_contents": "The ID of the corresponding ad group."}, "doc.microsoft_ads.ad_group_name": {"name": "ad_group_name", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.ad_group_name", "block_contents": "The name of the corresponding ad group."}, "doc.microsoft_ads.ad_status": {"name": "ad_status", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.ad_status", "block_contents": "The status of this ad; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/adstatus?view=bingads-13) for more information on values and definitions."}, "doc.microsoft_ads.ad_type": {"name": "ad_type", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.ad_type", "block_contents": "The ad type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/adtype?view=bingads-13) for more information on values and definitions."}, "doc.microsoft_ads.bid_match_type": {"name": "bid_match_type", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.bid_match_type", "block_contents": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "doc.microsoft_ads.budget": {"name": "budget", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.budget", "block_contents": "The amount to spend daily across all campaigns that share the budget."}, "doc.microsoft_ads.budget_id": {"name": "budget_id", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.budget_id", "block_contents": "The unique Microsoft Advertising identifier of the budget."}, "doc.microsoft_ads.budget_type": {"name": "budget_type", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.budget_type", "block_contents": "The budget type determines the pace at which the budget is spent throughout the day."}, "doc.microsoft_ads.budget_association_status": {"name": "budget_association_status", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.budget_association_status", "block_contents": "Indicates whether or not the campaign is currently spending from the budget mentioned in the BudgetName column. The possible values are `Current` and `Ended`."}, "doc.microsoft_ads.budget_name": {"name": "budget_name", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.budget_name", "block_contents": "The name of the budget. This column will be empty for unshared budgets."}, "doc.microsoft_ads.budget_status": {"name": "budget_status", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.budget_status", "block_contents": "The budget status. The possible values are `Active` and `Deleted`. This column will be empty for unshared budgets."}, "doc.microsoft_ads.campaign_id": {"name": "campaign_id", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.campaign_id", "block_contents": "The ID of the campaign."}, "doc.microsoft_ads.campaign_name": {"name": "campaign_name", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.campaign_name", "block_contents": "The name of the campaign."}, "doc.microsoft_ads.campaign_status": {"name": "campaign_status", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.campaign_status", "block_contents": "The status of this campaign; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaignstatus?view=bingads-13) for more information on values and definitions."}, "doc.microsoft_ads.campaign_timezone": {"name": "campaign_timezone", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.campaign_timezone", "block_contents": "The time zone associated with this campaign."}, "doc.microsoft_ads.campaign_type": {"name": "campaign_type", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.campaign_type", "block_contents": "The campaign type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaigntype?view=bingads-13) for more information on values and definitions."}, "doc.microsoft_ads.clicks": {"name": "clicks", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.clicks", "block_contents": "The number of clicks that occurred by the grain of the report."}, "doc.microsoft_ads.conversions_qualified": {"name": "conversions_qualified", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.conversions_qualified", "block_contents": "Number of [conversions](https://learn.microsoft.com/en-us/advertising/reporting-service/conversionperformancereportcolumn?view=bingads-13#conversionsqualified), measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "doc.microsoft_ads.conversions": {"name": "conversions", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.conversions", "block_contents": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "doc.microsoft_ads.conversions_src": {"name": "conversions_src", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.conversions_src", "block_contents": "(Deprecated in 2022 in favor of `conversions_qualified`) Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "doc.microsoft_ads.revenue": {"name": "revenue", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.revenue", "block_contents": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "doc.microsoft_ads.all_conversions": {"name": "all_conversions", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.all_conversions", "block_contents": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "doc.microsoft_ads.all_conversions_qualified": {"name": "all_conversions_qualified", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.all_conversions_qualified", "block_contents": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}, "doc.microsoft_ads.all_conversions_src": {"name": "all_conversions_src", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.all_conversions_src", "block_contents": "(Deprecated in 2022 in favor of `conversions_qualified`)\nNumber of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}, "doc.microsoft_ads.all_revenue": {"name": "all_revenue", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.all_revenue", "block_contents": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}, "doc.microsoft_ads.currency_code": {"name": "currency_code", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.currency_code", "block_contents": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "doc.microsoft_ads.date_day": {"name": "date_day", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.date_day", "block_contents": "The date of the performance report."}, "doc.microsoft_ads.delivered_match_type": {"name": "delivered_match_type", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.delivered_match_type", "block_contents": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "doc.microsoft_ads.device_os": {"name": "device_os", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.device_os", "block_contents": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "doc.microsoft_ads.device_type": {"name": "device_type", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.device_type", "block_contents": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "doc.microsoft_ads.end_date": {"name": "end_date", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.end_date", "block_contents": "The date in which this ad group will no longer run."}, "doc.microsoft_ads.final_url": {"name": "final_url", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.final_url", "block_contents": "The full URL that the ad links to."}, "doc.microsoft_ads.impressions": {"name": "impressions", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.impressions", "block_contents": "The number of impressions that occurred by the grain of the report."}, "doc.microsoft_ads.is_most_recent_record": {"name": "is_most_recent_record", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.is_most_recent_record", "block_contents": "Boolean representing whether a record is the most recent version of that record."}, "doc.microsoft_ads.keyword_id": {"name": "keyword_id", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.keyword_id", "block_contents": "The ID of the keyword."}, "doc.microsoft_ads.keyword_name": {"name": "keyword_name", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.keyword_name", "block_contents": "The keyword(s) associated with this record."}, "doc.microsoft_ads.keyword_status": {"name": "keyword_status", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.keyword_status", "block_contents": "The status of this keyword; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/keywordstatus?view=bingads-13) for more information on values and definitions."}, "doc.microsoft_ads.language": {"name": "language", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.language", "block_contents": "The language that the associated ad was viewed in."}, "doc.microsoft_ads.match_type": {"name": "match_type", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.match_type", "block_contents": "The match type associated with this record; values contain but may not be limited to 'Broad', 'Exact', 'Phrase'. Please refer to Microsoft Ad's [documentation](https://help.ads.microsoft.com/#apex/ads/en/50822/1)."}, "doc.microsoft_ads.modified_at": {"name": "modified_at", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.modified_at", "block_contents": "The time each version of the object was last modified, i.e. when that version of the object was 'created'."}, "doc.microsoft_ads.network": {"name": "network", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.network", "block_contents": "The network associated with this record."}, "doc.microsoft_ads.search_query": {"name": "search_query", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.search_query", "block_contents": "The search query string associated with this record."}, "doc.microsoft_ads.spend": {"name": "spend", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.spend", "block_contents": "The amount of spend that occurred by the grain of the report."}, "doc.microsoft_ads.start_date": {"name": "start_date", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.start_date", "block_contents": "The date in which an ad group starts running."}, "doc.microsoft_ads.time_zone": {"name": "time_zone", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.time_zone", "block_contents": "The time zone associated with this record."}, "doc.microsoft_ads.top_vs_other": {"name": "top_vs_other", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.top_vs_other", "block_contents": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009)."}, "doc.microsoft_ads.source_relation": {"name": "source_relation", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.source_relation", "block_contents": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "doc.microsoft_ads.title": {"name": "title", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.title", "block_contents": "The title of the ad."}, "doc.microsoft_ads.title_part_1": {"name": "title_part_1", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.title_part_1", "block_contents": "Part 1 of the title."}, "doc.microsoft_ads.title_part_2": {"name": "title_part_2", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.title_part_2", "block_contents": "Part 2 of the title."}, "doc.microsoft_ads.title_part_3": {"name": "title_part_3", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.title_part_3", "block_contents": "Part 3 of the title."}, "doc.microsoft_ads.domain": {"name": "domain", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.domain", "block_contents": "The associated domain that the ad links to."}, "doc.microsoft_ads.city": {"name": "city", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.city", "block_contents": "The city where the user was physically located when they clicked the ad."}, "doc.microsoft_ads.county": {"name": "county", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.county", "block_contents": "The county where the user was physically located when they clicked the ad."}, "doc.microsoft_ads.country": {"name": "country", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.country", "block_contents": "The country or region where the user was physically located when they clicked the ad."}, "doc.microsoft_ads.goal": {"name": "goal", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.goal", "block_contents": "The name of the goal you set for the conversions you want, meaning actions customers take after clicking your ad."}, "doc.microsoft_ads.location_id": {"name": "location_id", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.location_id", "block_contents": "The Microsoft Advertising identifier of the location where the user was physically located when they clicked the ad."}, "doc.microsoft_ads.location_type": {"name": "location_type", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.location_type", "block_contents": "The location type used to deliver ads. Values include \"Physical location\" and \"Location of interest\". \n\n\"Physical location\" indicates the user was in the corresponding City, Country, MetroArea, or State. \"Location of interest\" indicates the user was searching for or viewing pages about the location."}, "doc.microsoft_ads.metro_area": {"name": "metro_area", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.metro_area", "block_contents": "The metro area (Microsoft Market Area in the United States) where the user was physically located when they clicked the ad."}, "doc.microsoft_ads.most_specific_location": {"name": "most_specific_location", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.most_specific_location", "block_contents": "The most specific location used to deliver ads. If postal code is available, it is prioritized; otherwise, it may match city or country/region."}, "doc.microsoft_ads.postal_code": {"name": "postal_code", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.postal_code", "block_contents": "The postal code where the user was physically located when they clicked the ad."}, "doc.microsoft_ads.state": {"name": "state", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.state", "block_contents": "The state or geographic region where the user was physically located when they clicked the ad."}, "doc.facebook_ads._fivetran_synced": {"name": "_fivetran_synced", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads._fivetran_synced", "block_contents": "When the record was last synced by Fivetran."}, "doc.facebook_ads.is_most_recent_record": {"name": "is_most_recent_record", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.is_most_recent_record", "block_contents": "Boolean representing whether a record is the most recent version of that record. All records should have this value set to True given we filter on it."}, "doc.facebook_ads.updated_time": {"name": "updated_time", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.updated_time", "block_contents": "The timestamp of the last update of a record."}, "doc.facebook_ads.source_relation": {"name": "source_relation", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.source_relation", "block_contents": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "doc.facebook_ads.demographics_country": {"name": "demographics_country", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.demographics_country", "block_contents": "Ads report segmented by country."}, "doc.facebook_ads.country_id": {"name": "country_id", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.country_id", "block_contents": "Fivetran-generated unique ID of the country."}, "doc.facebook_ads.region_id": {"name": "region_id", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.region_id", "block_contents": "Fivetran-generated unique ID of the geographic region."}, "doc.facebook_ads.account_id": {"name": "account_id", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.account_id", "block_contents": "The ID of the ad account that this ad belongs to."}, "doc.facebook_ads.cost_per_inline_link_click": {"name": "cost_per_inline_link_click", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.cost_per_inline_link_click", "block_contents": "The average cost of each inline link click. Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics)."}, "doc.facebook_ads.country": {"name": "country", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.country", "block_contents": "Country whose ad performance is being reported on."}, "doc.facebook_ads.cpc": {"name": "cpc", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.cpc", "block_contents": "The average cost for each click (all). Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics)."}, "doc.facebook_ads.cpm": {"name": "cpm", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.cpm", "block_contents": "The average cost for 1,000 impressions. Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics)."}, "doc.facebook_ads.ctr": {"name": "ctr", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.ctr", "block_contents": "The percentage of times people saw your ad and performed a click (all). Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics)."}, "doc.facebook_ads.date": {"name": "date", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.date", "block_contents": "The date of the reported performance."}, "doc.facebook_ads.frequency": {"name": "frequency", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.frequency", "block_contents": "The average number of times each person saw your ads; it is calculated as impressions divided by reach."}, "doc.facebook_ads.impressions": {"name": "impressions", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.impressions", "block_contents": "The number of impressions the ads had on the given day."}, "doc.facebook_ads.inline_link_click_ctr": {"name": "inline_link_click_ctr", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.inline_link_click_ctr", "block_contents": "The percentage of time people saw your ads and performed an inline link click. Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics)."}, "doc.facebook_ads.inline_link_clicks": {"name": "inline_link_clicks", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.inline_link_clicks", "block_contents": "The number of clicks on links to select destinations or experiences, on or off Facebook-owned properties. Inline link clicks use a fixed 1-day-click attribution window."}, "doc.facebook_ads.reach": {"name": "reach", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.reach", "block_contents": "The number of people who saw any content from your Page or about your Page. This metric is estimated."}, "doc.facebook_ads.spend": {"name": "spend", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.spend", "block_contents": "Ad spend in a given day for the breakdown."}, "doc.facebook_ads.demographics_country_actions": {"name": "demographics_country_actions", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.demographics_country_actions", "block_contents": "Each record represents daily conversion performance by country. This is the prebuilt `demographics_country` report broken down by `action_type`."}, "doc.facebook_ads._1_d_view": {"name": "_1_d_view", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads._1_d_view", "block_contents": "Conversion metric value using an attribution window of \"1 day after viewing the ad\". Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics)."}, "doc.facebook_ads._7_d_click": {"name": "_7_d_click", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads._7_d_click", "block_contents": "Conversion metric value using an attribution window of \"7 days after clicking the ad\". Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics)."}, "doc.facebook_ads.index": {"name": "index", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.index", "block_contents": "Index reflecting the `action_type` tracked for this ad on this day. A primary key created by Fivetran utilized for tracking data, specifically when there are multiple rows associated with a single row in the parent table."}, "doc.facebook_ads.action_type": {"name": "action_type", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.action_type", "block_contents": "The kind of actions taken on your ad, Page, app or event after your ad was served to someone, even if they didn't click on it. Action types include Page likes, app installs, conversions, event responses and more.\nActions prepended by `app_custom_event` come from mobile app events and actions prepended by `offsite_conversion` come from the Facebook Pixel."}, "doc.facebook_ads.conversions": {"name": "conversions", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.conversions", "block_contents": "Conversion metric value using the default attribution window."}, "doc.facebook_ads.inline": {"name": "inline", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.inline", "block_contents": "Conversion metric value using the attribution window that occurs on the ad itself. Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics)."}, "doc.facebook_ads.region": {"name": "region", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.region", "block_contents": "Geographic region whose ad performance is being reported on."}, "doc.facebook_ads.demographics_region": {"name": "demographics_region", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.demographics_region", "block_contents": "Ads report segmented by geographic region."}, "doc.facebook_ads.demographics_region_actions": {"name": "demographics_region_actions", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.demographics_region_actions", "block_contents": "Each record represents daily conversion performance by geographic region. This is the prebuilt `demographics_region` report broken down by `action_type`."}}, "exposures": {}, "metrics": {"metric.ad_reporting.active_ads": {"name": "active_ads", "resource_type": "metric", "package_name": "ad_reporting", "path": "metrics/ad_reporting__ad_report_metrics.yml", "original_file_path": "models/metrics/ad_reporting__ad_report_metrics.yml", "unique_id": "metric.ad_reporting.active_ads", "fqn": ["ad_reporting", "metrics", "active_ads"], "description": "Count of ads witth spend > 0.", "label": "Active Ads (Fivetran)", "type": "simple", "type_params": {"measure": {"name": "active_ads", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}, "input_measures": [{"name": "active_ads", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}], "numerator": null, "denominator": null, "expr": null, "window": null, "grain_to_date": null, "metrics": [], "conversion_type_params": null, "cumulative_type_params": null, "metric_aggregation_params": null}, "filter": {"where_filters": [{"where_sql_template": "{{Dimension('ad__spend')}} > 0\n"}]}, "metadata": null, "time_granularity": null, "meta": {}, "tags": [], "config": {"enabled": true, "group": null, "meta": {}}, "unrendered_config": {}, "sources": [], "depends_on": {"macros": [], "nodes": ["semantic_model.ad_reporting.ad_report"]}, "refs": [], "metrics": [], "created_at": 1783450505.4765573, "group": null}, "metric.ad_reporting.avg_spend_nonzero": {"name": "avg_spend_nonzero", "resource_type": "metric", "package_name": "ad_reporting", "path": "metrics/ad_reporting__ad_report_metrics.yml", "original_file_path": "models/metrics/ad_reporting__ad_report_metrics.yml", "unique_id": "metric.ad_reporting.avg_spend_nonzero", "fqn": ["ad_reporting", "metrics", "avg_spend_nonzero"], "description": "Average ad spend, ignores zero-spend days.", "label": "Avg Spend Non-Zero (Fivetran)", "type": "simple", "type_params": {"measure": {"name": "avg_spend_nonzero", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}, "input_measures": [{"name": "avg_spend_nonzero", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}], "numerator": null, "denominator": null, "expr": null, "window": null, "grain_to_date": null, "metrics": [], "conversion_type_params": null, "cumulative_type_params": null, "metric_aggregation_params": null}, "filter": {"where_filters": [{"where_sql_template": "{{Dimension('ad__spend')}} > 0\n"}]}, "metadata": null, "time_granularity": null, "meta": {}, "tags": [], "config": {"enabled": true, "group": null, "meta": {}}, "unrendered_config": {}, "sources": [], "depends_on": {"macros": [], "nodes": ["semantic_model.ad_reporting.ad_report"]}, "refs": [], "metrics": [], "created_at": 1783450505.4778233, "group": null}, "metric.ad_reporting.avg_spend": {"name": "avg_spend", "resource_type": "metric", "package_name": "ad_reporting", "path": "metrics/ad_reporting__ad_report_metrics.yml", "original_file_path": "models/metrics/ad_reporting__ad_report_metrics.yml", "unique_id": "metric.ad_reporting.avg_spend", "fqn": ["ad_reporting", "metrics", "avg_spend"], "description": "Average ad spend, does not ignore zero-spend days.", "label": "Avg Spend (Fivetran)", "type": "simple", "type_params": {"measure": {"name": "avg_spend", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}, "input_measures": [{"name": "avg_spend", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}], "numerator": null, "denominator": null, "expr": null, "window": null, "grain_to_date": null, "metrics": [], "conversion_type_params": null, "cumulative_type_params": null, "metric_aggregation_params": null}, "filter": null, "metadata": null, "time_granularity": null, "meta": {}, "tags": [], "config": {"enabled": true, "group": null, "meta": {}}, "unrendered_config": {}, "sources": [], "depends_on": {"macros": [], "nodes": ["semantic_model.ad_reporting.ad_report"]}, "refs": [], "metrics": [], "created_at": 1783450505.4788907, "group": null}, "metric.ad_reporting.clicks": {"name": "clicks", "resource_type": "metric", "package_name": "ad_reporting", "path": "metrics/ad_reporting__ad_report_metrics.yml", "original_file_path": "models/metrics/ad_reporting__ad_report_metrics.yml", "unique_id": "metric.ad_reporting.clicks", "fqn": ["ad_reporting", "metrics", "clicks"], "description": "Total clicks", "label": "Ad Clicks (Fivetran)", "type": "simple", "type_params": {"measure": {"name": "clicks", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}, "input_measures": [{"name": "clicks", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}], "numerator": null, "denominator": null, "expr": null, "window": null, "grain_to_date": null, "metrics": [], "conversion_type_params": null, "cumulative_type_params": null, "metric_aggregation_params": null}, "filter": null, "metadata": null, "time_granularity": null, "meta": {}, "tags": [], "config": {"enabled": true, "group": null, "meta": {}}, "unrendered_config": {}, "sources": [], "depends_on": {"macros": [], "nodes": ["semantic_model.ad_reporting.ad_report"]}, "refs": [], "metrics": [], "created_at": 1783450505.4796138, "group": null}, "metric.ad_reporting.impressions": {"name": "impressions", "resource_type": "metric", "package_name": "ad_reporting", "path": "metrics/ad_reporting__ad_report_metrics.yml", "original_file_path": "models/metrics/ad_reporting__ad_report_metrics.yml", "unique_id": "metric.ad_reporting.impressions", "fqn": ["ad_reporting", "metrics", "impressions"], "description": "Total impressions", "label": "Ad Impressions (Fivetran)", "type": "simple", "type_params": {"measure": {"name": "impressions", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}, "input_measures": [{"name": "impressions", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}], "numerator": null, "denominator": null, "expr": null, "window": null, "grain_to_date": null, "metrics": [], "conversion_type_params": null, "cumulative_type_params": null, "metric_aggregation_params": null}, "filter": null, "metadata": null, "time_granularity": null, "meta": {}, "tags": [], "config": {"enabled": true, "group": null, "meta": {}}, "unrendered_config": {}, "sources": [], "depends_on": {"macros": [], "nodes": ["semantic_model.ad_reporting.ad_report"]}, "refs": [], "metrics": [], "created_at": 1783450505.4803138, "group": null}, "metric.ad_reporting.spend": {"name": "spend", "resource_type": "metric", "package_name": "ad_reporting", "path": "metrics/ad_reporting__ad_report_metrics.yml", "original_file_path": "models/metrics/ad_reporting__ad_report_metrics.yml", "unique_id": "metric.ad_reporting.spend", "fqn": ["ad_reporting", "metrics", "spend"], "description": "Total spend (in currency of individual platforms)", "label": "Ad Spend (Fivetran)", "type": "simple", "type_params": {"measure": {"name": "ad_spend", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}, "input_measures": [{"name": "ad_spend", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}], "numerator": null, "denominator": null, "expr": null, "window": null, "grain_to_date": null, "metrics": [], "conversion_type_params": null, "cumulative_type_params": null, "metric_aggregation_params": null}, "filter": null, "metadata": null, "time_granularity": null, "meta": {}, "tags": [], "config": {"enabled": true, "group": null, "meta": {}}, "unrendered_config": {}, "sources": [], "depends_on": {"macros": [], "nodes": ["semantic_model.ad_reporting.ad_report"]}, "refs": [], "metrics": [], "created_at": 1783450505.481586, "group": null}, "metric.ad_reporting.clickthrough_rate": {"name": "clickthrough_rate", "resource_type": "metric", "package_name": "ad_reporting", "path": "metrics/ad_reporting__ad_report_metrics.yml", "original_file_path": "models/metrics/ad_reporting__ad_report_metrics.yml", "unique_id": "metric.ad_reporting.clickthrough_rate", "fqn": ["ad_reporting", "metrics", "clickthrough_rate"], "description": "Percentage of impressions that did convert into clicks.", "label": "Ad Clickthrough Rate (Fivetran)", "type": "derived", "type_params": {"measure": null, "input_measures": [{"name": "clicks", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}, {"name": "impressions", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}], "numerator": null, "denominator": null, "expr": "clicks/impressions", "window": null, "grain_to_date": null, "metrics": [{"name": "clicks", "filter": null, "alias": null, "offset_window": null, "offset_to_grain": null}, {"name": "impressions", "filter": null, "alias": null, "offset_window": null, "offset_to_grain": null}], "conversion_type_params": null, "cumulative_type_params": null, "metric_aggregation_params": null}, "filter": null, "metadata": null, "time_granularity": null, "meta": {}, "tags": [], "config": {"enabled": true, "group": null, "meta": {}}, "unrendered_config": {}, "sources": [], "depends_on": {"macros": [], "nodes": ["metric.ad_reporting.clicks", "metric.ad_reporting.impressions"]}, "refs": [], "metrics": [], "created_at": 1783450505.48569, "group": null}, "metric.ad_reporting.cost_per_click": {"name": "cost_per_click", "resource_type": "metric", "package_name": "ad_reporting", "path": "metrics/ad_reporting__ad_report_metrics.yml", "original_file_path": "models/metrics/ad_reporting__ad_report_metrics.yml", "unique_id": "metric.ad_reporting.cost_per_click", "fqn": ["ad_reporting", "metrics", "cost_per_click"], "description": "The ratio of spend to clicks", "label": "Average Ad Cost Per Click (Fivetran)", "type": "derived", "type_params": {"measure": null, "input_measures": [{"name": "clicks", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}, {"name": "ad_spend", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}], "numerator": null, "denominator": null, "expr": "spend/clicks", "window": null, "grain_to_date": null, "metrics": [{"name": "clicks", "filter": null, "alias": null, "offset_window": null, "offset_to_grain": null}, {"name": "spend", "filter": null, "alias": null, "offset_window": null, "offset_to_grain": null}], "conversion_type_params": null, "cumulative_type_params": null, "metric_aggregation_params": null}, "filter": null, "metadata": null, "time_granularity": null, "meta": {}, "tags": [], "config": {"enabled": true, "group": null, "meta": {}}, "unrendered_config": {}, "sources": [], "depends_on": {"macros": [], "nodes": ["metric.ad_reporting.clicks", "metric.ad_reporting.spend"]}, "refs": [], "metrics": [], "created_at": 1783450505.4871511, "group": null}, "metric.ad_reporting.bounce_rate": {"name": "bounce_rate", "resource_type": "metric", "package_name": "ad_reporting", "path": "metrics/ad_reporting__ad_report_metrics.yml", "original_file_path": "models/metrics/ad_reporting__ad_report_metrics.yml", "unique_id": "metric.ad_reporting.bounce_rate", "fqn": ["ad_reporting", "metrics", "bounce_rate"], "description": "Percentage of impressions that did not convert into clicks.", "label": "Average Ad Bounce Rate (Fivetran)", "type": "derived", "type_params": {"measure": null, "input_measures": [{"name": "impressions", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}, {"name": "clicks", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}], "numerator": null, "denominator": null, "expr": "impressions - clicks/impressions", "window": null, "grain_to_date": null, "metrics": [{"name": "impressions", "filter": null, "alias": null, "offset_window": null, "offset_to_grain": null}, {"name": "clicks", "filter": null, "alias": null, "offset_window": null, "offset_to_grain": null}], "conversion_type_params": null, "cumulative_type_params": null, "metric_aggregation_params": null}, "filter": null, "metadata": null, "time_granularity": null, "meta": {}, "tags": [], "config": {"enabled": true, "group": null, "meta": {}}, "unrendered_config": {}, "sources": [], "depends_on": {"macros": [], "nodes": ["metric.ad_reporting.impressions", "metric.ad_reporting.clicks"]}, "refs": [], "metrics": [], "created_at": 1783450505.488607, "group": null}}, "groups": {}, "selectors": {}, "disabled": {"test.ad_reporting_integration_tests.vertical_account_conversion_comparison": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "vertical_account_conversion_comparison", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "integrity/vertical_account_conversion_comparison.sql", "original_file_path": "tests/integrity/vertical_account_conversion_comparison.sql", "unique_id": "test.ad_reporting_integration_tests.vertical_account_conversion_comparison", "fqn": ["ad_reporting_integration_tests", "integrity", "vertical_account_conversion_comparison"], "alias": "vertical_account_conversion_comparison", "checksum": {"name": "sha256", "checksum": "57b9bb083ae74c65396e514010d4ff7b4b7d3dfda42f201745c084ac4a471ff5"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783450494.5619063, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith account_report as (\n\n select \n platform,\n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__account_report\n group by 1\n),\n\namazon_ads as (\n\n select \n sum(coalesce(purchases_30_d,0)) as conversions,\n sum(coalesce(sales_30_d,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.amazon_ads__account_report\n),\n\napple_search_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(0) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.apple_search_ads__organization_report\n),\n\nlinkedin_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(conversion_value_in_local_currency,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.linkedin_ads__account_report\n),\n\npinterest_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(total_conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.pinterest_ads__advertiser_report\n),\n\nsnapchat_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(conversion_purchases_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.snapchat_ads__account_report\n),\n\ntiktok_ads as (\n\n select \n sum(coalesce(conversion,0)) as conversions,\n sum(coalesce(total_conversion_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.tiktok_ads__advertiser_report\n),\n\ntwitter_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(total_conversions_sale_amount,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.twitter_ads__account_report\n),\n\ngoogle_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.google_ads__account_report\n),\n\nfacebook_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.facebook_ads__account_report\n),\n\nmicrosoft_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.microsoft_ads__account_report\n),\n\nreddit_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(total_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.reddit_ads__account_report\n)\n\nselect \n 'amazon_ads' as platform\nfrom account_report\njoin amazon_ads\n on account_report.platform = 'amazon_ads'\nwhere abs(amazon_ads.conversions - account_report.conversions) >= .01\n or abs(amazon_ads.conversions_value - account_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'apple_search_ads' as platform\nfrom account_report\njoin apple_search_ads\n on account_report.platform = 'apple_search_ads'\nwhere abs(apple_search_ads.conversions - account_report.conversions) >= .01\n or abs(apple_search_ads.conversions_value - account_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'linkedin_ads' as platform\nfrom account_report\njoin linkedin_ads\n on account_report.platform = 'linkedin_ads'\nwhere abs(linkedin_ads.conversions - account_report.conversions) >= .01\n or abs(linkedin_ads.conversions_value - account_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'pinterest_ads' as platform\nfrom account_report\njoin pinterest_ads\n on account_report.platform = 'pinterest_ads'\nwhere abs(pinterest_ads.conversions - account_report.conversions) >= .01\n or abs(pinterest_ads.conversions_value - account_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'snapchat_ads' as platform\nfrom account_report\njoin snapchat_ads\n on account_report.platform = 'snapchat_ads'\nwhere abs(snapchat_ads.conversions - account_report.conversions) >= .01\n or abs(snapchat_ads.conversions_value - account_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'tiktok_ads' as platform\nfrom account_report\njoin tiktok_ads\n on account_report.platform = 'tiktok_ads'\nwhere abs(tiktok_ads.conversions - account_report.conversions) >= .01\n or abs(tiktok_ads.conversions_value - account_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'twitter_ads' as platform\nfrom account_report\njoin twitter_ads\n on account_report.platform = 'twitter_ads'\nwhere abs(twitter_ads.conversions - account_report.conversions) >= .01\n or abs(twitter_ads.conversions_value - account_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'google_ads' as platform\nfrom account_report\njoin google_ads\n on account_report.platform = 'google_ads'\nwhere abs(google_ads.conversions - account_report.conversions) >= .01\n or abs(google_ads.conversions_value - account_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'facebook_ads' as platform\nfrom account_report\njoin facebook_ads\n on account_report.platform = 'facebook_ads'\nwhere abs(facebook_ads.conversions - account_report.conversions) >= .01\n or abs(facebook_ads.conversions_value - account_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'microsoft_ads' as platform\nfrom account_report\njoin microsoft_ads\n on account_report.platform = 'microsoft_ads'\nwhere abs(microsoft_ads.conversions - account_report.conversions) >= .01\n or abs(microsoft_ads.conversions_value - account_report.conversions_value) >= .01\nunion all \n\nselect \n 'reddit_ads' as platform\nfrom account_report\njoin reddit_ads\n on account_report.platform = 'reddit_ads'\nwhere abs(reddit_ads.conversions - account_report.conversions) >= .01\n or abs(reddit_ads.conversions_value - account_report.conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.vertical_ad_conversion_comparison": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "vertical_ad_conversion_comparison", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "integrity/vertical_ad_conversion_comparison.sql", "original_file_path": "tests/integrity/vertical_ad_conversion_comparison.sql", "unique_id": "test.ad_reporting_integration_tests.vertical_ad_conversion_comparison", "fqn": ["ad_reporting_integration_tests", "integrity", "vertical_ad_conversion_comparison"], "alias": "vertical_ad_conversion_comparison", "checksum": {"name": "sha256", "checksum": "7f8fd97c6322443922e9cb51443d95326effdcdbb4a8e7e479eb80154b6ec9d8"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783450494.5979924, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith ad_report as (\n\n select \n platform,\n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__ad_report\n group by 1\n),\n\namazon_ads as (\n\n select \n sum(coalesce(purchases_30_d,0)) as conversions,\n sum(coalesce(sales_30_d,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.amazon_ads__ad_report\n),\n\napple_search_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(0) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.apple_search_ads__ad_report\n),\n\nlinkedin_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(conversion_value_in_local_currency,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.linkedin_ads__creative_report\n),\n\npinterest_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(total_conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.pinterest_ads__pin_promotion_report\n),\n\nsnapchat_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(conversion_purchases_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.snapchat_ads__ad_report\n),\n\ntiktok_ads as (\n\n select \n sum(coalesce(conversion,0)) as conversions,\n sum(coalesce(total_conversion_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.tiktok_ads__ad_report\n),\n\ntwitter_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(total_conversions_sale_amount,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.twitter_ads__promoted_tweet_report\n),\n\ngoogle_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.google_ads__ad_report\n),\n\nfacebook_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.facebook_ads__ad_report\n),\n\nmicrosoft_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.microsoft_ads__ad_report\n),\n\nreddit_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(total_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.reddit_ads__ad_report\n)\n\nselect \n 'amazon_ads' as platform\nfrom ad_report\njoin amazon_ads\n on ad_report.platform = 'amazon_ads'\nwhere abs(amazon_ads.conversions - ad_report.conversions) >= .01\n or abs(amazon_ads.conversions_value - ad_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'apple_search_ads' as platform\nfrom ad_report\njoin apple_search_ads\n on ad_report.platform = 'apple_search_ads'\nwhere abs(apple_search_ads.conversions - ad_report.conversions) >= .01\n or abs(apple_search_ads.conversions_value - ad_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'linkedin_ads' as platform\nfrom ad_report\njoin linkedin_ads\n on ad_report.platform = 'linkedin_ads'\nwhere abs(linkedin_ads.conversions - ad_report.conversions) >= .01\n or abs(linkedin_ads.conversions_value - ad_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'pinterest_ads' as platform\nfrom ad_report\njoin pinterest_ads\n on ad_report.platform = 'pinterest_ads'\nwhere abs(pinterest_ads.conversions - ad_report.conversions) >= .01\n or abs(pinterest_ads.conversions_value - ad_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'snapchat_ads' as platform\nfrom ad_report\njoin snapchat_ads\n on ad_report.platform = 'snapchat_ads'\nwhere abs(snapchat_ads.conversions - ad_report.conversions) >= .01\n or abs(snapchat_ads.conversions_value - ad_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'tiktok_ads' as platform\nfrom ad_report\njoin tiktok_ads\n on ad_report.platform = 'tiktok_ads'\nwhere abs(tiktok_ads.conversions - ad_report.conversions) >= .01\n or abs(tiktok_ads.conversions_value - ad_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'twitter_ads' as platform\nfrom ad_report\njoin twitter_ads\n on ad_report.platform = 'twitter_ads'\nwhere abs(twitter_ads.conversions - ad_report.conversions) >= .01\n or abs(twitter_ads.conversions_value - ad_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'google_ads' as platform\nfrom ad_report\njoin google_ads\n on ad_report.platform = 'google_ads'\nwhere abs(google_ads.conversions - ad_report.conversions) >= .01\n or abs(google_ads.conversions_value - ad_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'facebook_ads' as platform\nfrom ad_report\njoin facebook_ads\n on ad_report.platform = 'facebook_ads'\nwhere abs(facebook_ads.conversions - ad_report.conversions) >= .01\n or abs(facebook_ads.conversions_value - ad_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'microsoft_ads' as platform\nfrom ad_report\njoin microsoft_ads\n on ad_report.platform = 'microsoft_ads'\nwhere abs(microsoft_ads.conversions - ad_report.conversions) >= .01\n or abs(microsoft_ads.conversions_value - ad_report.conversions_value) >= .01\nunion all \n\nselect \n 'reddit_ads' as platform\nfrom ad_report\njoin reddit_ads\n on ad_report.platform = 'reddit_ads'\nwhere abs(reddit_ads.conversions - ad_report.conversions) >= .01\n or abs(reddit_ads.conversions_value - ad_report.conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.vertical_country_comparison": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "vertical_country_comparison", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "integrity/vertical_country_comparison.sql", "original_file_path": "tests/integrity/vertical_country_comparison.sql", "unique_id": "test.ad_reporting_integration_tests.vertical_country_comparison", "fqn": ["ad_reporting_integration_tests", "integrity", "vertical_country_comparison"], "alias": "vertical_country_comparison", "checksum": {"name": "sha256", "checksum": "5cc3f26b83d10248a64c00b99cd0cf5918ffa873e49deeda22d1389bf185be09"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783450494.6060245, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\n{% set include_list = [] %}\n{% do include_list.append('facebook_ads') if var('facebook_ads__using_demographics_country', false) %}\n{% do include_list.append('linkedin_ads') if var('linkedin_ads__using_geo', true) and var('linkedin_ads__using_monthly_ad_analytics_by_member_country', true) %}\n{% do include_list.append('microsoft_ads') if var('microsoft_ads__using_geographic_daily_report', false) %}\n{% do include_list.append('pinterest_ads') if var('pinterest__using_pin_promotion_targeting_report', true) and var('pinterest__using_targeting_geo', true) %}\n{% do include_list.append('reddit_ads') if var('reddit_ads__using_campaign_country_report', true) %}\n{% do include_list.append('snapchat_ads') if var('snapchat_ads__using_campaign_country_report', false) %}\n{% do include_list.append('tiktok_ads') if var('tiktok_ads__using_campaign_country_report', true) %}\n{% do include_list.append('twitter_ads') if var('twitter_ads__using_campaign_locations_report', false) %}\n\n{% set enabled_packages = ad_reporting.get_enabled_packages(include=include_list) %}\n\nwith report as (\n\n select \n platform,\n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__monthly_campaign_country_report\n group by 1\n),\n\n{% if 'linkedin_ads' in enabled_packages %}\nlinkedin_ads as (\n\n select \n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(cost, 0)) as spend,\n sum(coalesce(total_conversions, 0)) as conversions,\n sum(coalesce(conversion_value_in_local_currency, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.linkedin_ads__monthly_campaign_country_report\n),\n{% endif %}\n\n{% if 'pinterest_ads' in enabled_packages %}\npinterest_ads as (\n\n select \n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(total_conversions, 0)) as conversions,\n sum(coalesce(total_conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.pinterest_ads__campaign_country_report\n),\n{% endif %}\n\n{% if 'snapchat_ads' in enabled_packages %}\nsnapchat_ads as (\n\n select \n sum(coalesce(swipes, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(total_conversions, 0)) as conversions,\n sum(coalesce(conversion_purchases_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.snapchat_ads__campaign_country_report\n),\n{% endif %}\n\n{% if 'tiktok_ads' in enabled_packages %}\ntiktok_ads as (\n\n select \n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversion, 0)) as conversions,\n 0 as conversions_value\n from {{ target.schema }}_ad_reporting_dev.tiktok_ads__campaign_country_report\n),\n{% endif %}\n\n{% if 'twitter_ads' in enabled_packages %}\ntwitter_ads as (\n\n select \n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(total_conversions, 0)) as conversions,\n sum(coalesce(total_conversions_sale_amount, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.twitter_ads__campaign_country_report\n),\n{% endif %}\n\n{% if 'facebook_ads' in enabled_packages %}\nfacebook_ads as (\n\n select \n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n 0 as conversions_value\n from {{ target.schema }}_ad_reporting_dev.facebook_ads__country_report\n),\n{% endif %}\n\n{% if 'microsoft_ads' in enabled_packages %}\nmicrosoft_ads as (\n\n select \n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.microsoft_ads__campaign_country_report\n),\n{% endif %}\n\n{% if 'reddit_ads' in enabled_packages %}\nreddit_ads as (\n\n select \n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(total_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.reddit_ads__campaign_country_report\n),\n{% endif %}\n\n{% set metrics = ['clicks', 'impressions', 'spend', 'conversions', 'conversions_value'] %}\n\nfinal as (\n{% for platform in enabled_packages %}\n select \n '{{ platform }}' as platform \n {% for metric in metrics %}\n , report.{{ metric }} as ad_reporting_{{ metric }}\n , {{ platform }}.{{ metric }} as platform_{{ metric }}\n {% endfor %}\n from report\n join {{ platform }}\n on report.platform = '{{ platform }}'\n where \n {% for metric in metrics %}\n abs({{ platform }}.{{ metric }} - report.{{ metric }}) >= .01\n {% if not loop.last %} or {% endif %}\n {% endfor %}\n \n {% if not loop.last %} union all {% endif %}\n\n{% endfor %}\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.vertical_region_comparison": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "vertical_region_comparison", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "integrity/vertical_region_comparison.sql", "original_file_path": "tests/integrity/vertical_region_comparison.sql", "unique_id": "test.ad_reporting_integration_tests.vertical_region_comparison", "fqn": ["ad_reporting_integration_tests", "integrity", "vertical_region_comparison"], "alias": "vertical_region_comparison", "checksum": {"name": "sha256", "checksum": "4c20a841eda0e338eaa7dbbc2db644ce0d28413b94e69fd38a48f0109e790914"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783450494.6296039, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\n{% set include_list = [] %}\n{% do include_list.append('facebook_ads') if var('facebook_ads__using_demographics_region', false) %}\n{% do include_list.append('linkedin_ads') if var('linkedin_ads__using_geo', true) and var('linkedin_ads__using_monthly_ad_analytics_by_member_region', true) %}\n{% do include_list.append('microsoft_ads') if var('microsoft_ads__using_geographic_daily_report', false) %}\n{% do include_list.append('pinterest_ads') if var('pinterest__using_pin_promotion_targeting_report', true) and var('pinterest__using_targeting_geo_region', true) %}\n{% do include_list.append('snapchat_ads') if var('snapchat_ads__using_campaign_region_report', false) %}\n{% do include_list.append('twitter_ads') if var('twitter_ads__using_campaign_regions_report', false) %}\n\n{% set enabled_packages = ad_reporting.get_enabled_packages(include=include_list) %}\n\nwith report as (\n\n select \n platform,\n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__monthly_campaign_region_report\n group by 1\n),\n\n{% if 'linkedin_ads' in enabled_packages %}\nlinkedin_ads as (\n\n select \n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(cost, 0)) as spend,\n sum(coalesce(total_conversions, 0)) as conversions,\n sum(coalesce(conversion_value_in_local_currency, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.linkedin_ads__monthly_campaign_region_report\n),\n{% endif %}\n\n{% if 'pinterest_ads' in enabled_packages %}\npinterest_ads as (\n\n select \n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(total_conversions, 0)) as conversions,\n sum(coalesce(total_conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.pinterest_ads__campaign_region_report\n),\n{% endif %}\n\n{% if 'snapchat_ads' in enabled_packages %}\nsnapchat_ads as (\n\n select \n sum(coalesce(swipes, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(total_conversions, 0)) as conversions,\n sum(coalesce(conversion_purchases_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.snapchat_ads__campaign_region_report\n),\n{% endif %}\n\n{% if 'twitter_ads' in enabled_packages %}\ntwitter_ads as (\n\n select \n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(total_conversions, 0)) as conversions,\n sum(coalesce(total_conversions_sale_amount, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.twitter_ads__campaign_region_report\n),\n{% endif %}\n\n{% if 'facebook_ads' in enabled_packages %}\nfacebook_ads as (\n\n select \n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n 0 as conversions_value\n from {{ target.schema }}_ad_reporting_dev.facebook_ads__region_report\n),\n{% endif %}\n\n{% if 'microsoft_ads' in enabled_packages %}\nmicrosoft_ads as (\n\n select \n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.microsoft_ads__campaign_region_report\n),\n{% endif %}\n\n{% set metrics = ['clicks', 'impressions', 'spend', 'conversions', 'conversions_value'] %}\n\nfinal as (\n{% for platform in enabled_packages %}\n select \n '{{ platform }}' as platform\n {% for metric in metrics %}\n , report.{{ metric }} as ad_reporting_{{ metric }}\n , {{ platform }}.{{ metric }} as platform_{{ metric }}\n {% endfor %}\n from report\n join {{ platform }}\n on report.platform = '{{ platform }}'\n where \n {% for metric in metrics %}\n abs({{ platform }}.{{ metric }} - report.{{ metric }}) >= .01\n {% if not loop.last %} or {% endif %}\n {% endfor %}\n \n {% if not loop.last %} union all {% endif %}\n\n{% endfor %}\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.vertical_search_conversion_comparison": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "vertical_search_conversion_comparison", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "integrity/vertical_search_conversion_comparison.sql", "original_file_path": "tests/integrity/vertical_search_conversion_comparison.sql", "unique_id": "test.ad_reporting_integration_tests.vertical_search_conversion_comparison", "fqn": ["ad_reporting_integration_tests", "integrity", "vertical_search_conversion_comparison"], "alias": "vertical_search_conversion_comparison", "checksum": {"name": "sha256", "checksum": "455347e442899fb453e8590442067346f02fcc500eef5dabf5e9e7e6078576bc"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783450494.6466436, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith search_report as (\n\n select \n platform,\n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__search_report\n group by 1\n),\n\namazon_ads as (\n\n select \n sum(coalesce(purchases_30_d,0)) as conversions,\n sum(coalesce(sales_30_d,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.amazon_ads__search_report\n),\n\n{% if var('apple_search_ads__using_search_terms', true ) %}\napple_search_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(0) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.apple_search_ads__search_term_report\n),\n{% endif %}\n\n{% if var('google_ads__using_search_term_keyword_stats', true ) %}\ngoogle_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.google_ads__search_term_report\n),\n{% endif %}\n\nmicrosoft_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.microsoft_ads__search_report\n)\n\nselect \n 'amazon_ads' as platform\nfrom search_report\njoin amazon_ads\n on search_report.platform = 'amazon_ads'\nwhere abs(amazon_ads.conversions - search_report.conversions) >= .01\n or abs(amazon_ads.conversions_value - search_report.conversions_value) >= .01\n\nunion all \n\n{% if var('apple_search_ads__using_search_terms', true ) %}\nselect \n 'apple_search_ads' as platform\nfrom search_report\njoin apple_search_ads\n on search_report.platform = 'apple_search_ads'\nwhere abs(apple_search_ads.conversions - search_report.conversions) >= .01\n or abs(apple_search_ads.conversions_value - search_report.conversions_value) >= .01\n\nunion all \n{% endif %}\n\n{% if var('google_ads__using_search_term_keyword_stats', true ) %}\nselect \n 'google_ads' as platform\nfrom search_report\njoin google_ads\n on search_report.platform = 'google_ads'\nwhere abs(google_ads.conversions - search_report.conversions) >= .01\n or abs(google_ads.conversions_value - search_report.conversions_value) >= .01\n\nunion all \n{% endif %}\n\nselect \n 'microsoft_ads' as platform\nfrom search_report\njoin microsoft_ads\n on search_report.platform = 'microsoft_ads'\nwhere abs(microsoft_ads.conversions - search_report.conversions) >= .01\n or abs(microsoft_ads.conversions_value - search_report.conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.vertical_campaign_conversion_comparison": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "vertical_campaign_conversion_comparison", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "integrity/vertical_campaign_conversion_comparison.sql", "original_file_path": "tests/integrity/vertical_campaign_conversion_comparison.sql", "unique_id": "test.ad_reporting_integration_tests.vertical_campaign_conversion_comparison", "fqn": ["ad_reporting_integration_tests", "integrity", "vertical_campaign_conversion_comparison"], "alias": "vertical_campaign_conversion_comparison", "checksum": {"name": "sha256", "checksum": "bf3ee3807ad294a3727806fd3ae81194d3ddb74a5c7f42e7917343179c0ef9a0"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783450494.654639, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith campaign_report as (\n\n select \n platform,\n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__campaign_report\n group by 1\n),\n\namazon_ads as (\n\n select \n sum(coalesce(purchases_30_d,0)) as conversions,\n sum(coalesce(sales_30_d,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.amazon_ads__campaign_report\n),\n\napple_search_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(0) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.apple_search_ads__campaign_report\n),\n\nlinkedin_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(conversion_value_in_local_currency,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.linkedin_ads__campaign_group_report\n),\n\npinterest_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(total_conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.pinterest_ads__advertiser_report\n),\n\nsnapchat_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(conversion_purchases_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.snapchat_ads__campaign_report\n),\n\ntiktok_ads as (\n\n select \n sum(coalesce(conversion,0)) as conversions,\n sum(coalesce(total_conversion_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.tiktok_ads__campaign_report\n),\n\ntwitter_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(total_conversions_sale_amount,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.twitter_ads__campaign_report\n),\n\ngoogle_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.google_ads__campaign_report\n),\n\nfacebook_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.facebook_ads__campaign_report\n),\n\nmicrosoft_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.microsoft_ads__campaign_report\n),\n\nreddit_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(total_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.reddit_ads__campaign_report\n)\n\nselect \n 'amazon_ads' as platform\nfrom campaign_report\njoin amazon_ads\n on campaign_report.platform = 'amazon_ads'\nwhere abs(amazon_ads.conversions - campaign_report.conversions) >= .01\n or abs(amazon_ads.conversions_value - campaign_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'apple_search_ads' as platform\nfrom campaign_report\njoin apple_search_ads\n on campaign_report.platform = 'apple_search_ads'\nwhere abs(apple_search_ads.conversions - campaign_report.conversions) >= .01\n or abs(apple_search_ads.conversions_value - campaign_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'linkedin_ads' as platform\nfrom campaign_report\njoin linkedin_ads\n on campaign_report.platform = 'linkedin_ads'\nwhere abs(linkedin_ads.conversions - campaign_report.conversions) >= .01\n or abs(linkedin_ads.conversions_value - campaign_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'pinterest_ads' as platform\nfrom campaign_report\njoin pinterest_ads\n on campaign_report.platform = 'pinterest_ads'\nwhere abs(pinterest_ads.conversions - campaign_report.conversions) >= .01\n or abs(pinterest_ads.conversions_value - campaign_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'snapchat_ads' as platform\nfrom campaign_report\njoin snapchat_ads\n on campaign_report.platform = 'snapchat_ads'\nwhere abs(snapchat_ads.conversions - campaign_report.conversions) >= .01\n or abs(snapchat_ads.conversions_value - campaign_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'tiktok_ads' as platform\nfrom campaign_report\njoin tiktok_ads\n on campaign_report.platform = 'tiktok_ads'\nwhere abs(tiktok_ads.conversions - campaign_report.conversions) >= .01\n or abs(tiktok_ads.conversions_value - campaign_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'twitter_ads' as platform\nfrom campaign_report\njoin twitter_ads\n on campaign_report.platform = 'twitter_ads'\nwhere abs(twitter_ads.conversions - campaign_report.conversions) >= .01\n or abs(twitter_ads.conversions_value - campaign_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'google_ads' as platform\nfrom campaign_report\njoin google_ads\n on campaign_report.platform = 'google_ads'\nwhere abs(google_ads.conversions - campaign_report.conversions) >= .01\n or abs(google_ads.conversions_value - campaign_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'facebook_ads' as platform\nfrom campaign_report\njoin facebook_ads\n on campaign_report.platform = 'facebook_ads'\nwhere abs(facebook_ads.conversions - campaign_report.conversions) >= .01\n or abs(facebook_ads.conversions_value - campaign_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'microsoft_ads' as platform\nfrom campaign_report\njoin microsoft_ads\n on campaign_report.platform = 'microsoft_ads'\nwhere abs(microsoft_ads.conversions - campaign_report.conversions) >= .01\n or abs(microsoft_ads.conversions_value - campaign_report.conversions_value) >= .01\nunion all \n\nselect \n 'reddit_ads' as platform\nfrom campaign_report\njoin reddit_ads\n on campaign_report.platform = 'reddit_ads'\nwhere abs(reddit_ads.conversions - campaign_report.conversions) >= .01\n or abs(reddit_ads.conversions_value - campaign_report.conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.vertical_url_conversion_comparison": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "vertical_url_conversion_comparison", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "integrity/vertical_url_conversion_comparison.sql", "original_file_path": "tests/integrity/vertical_url_conversion_comparison.sql", "unique_id": "test.ad_reporting_integration_tests.vertical_url_conversion_comparison", "fqn": ["ad_reporting_integration_tests", "integrity", "vertical_url_conversion_comparison"], "alias": "vertical_url_conversion_comparison", "checksum": {"name": "sha256", "checksum": "8e983eccee223b9bc9f4e614398ef59e6316834b962e35b4b3be07191d744655"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783450494.6624217, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith url_report as (\n\n select \n platform,\n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__url_report\n group by 1\n),\n\nlinkedin_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(conversion_value_in_local_currency,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.linkedin_ads__url_report\n),\n\npinterest_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(total_conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.pinterest_ads__url_report\n),\n\nsnapchat_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(conversion_purchases_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.snapchat_ads__url_report\n),\n\ntiktok_ads as (\n\n select \n sum(coalesce(conversion,0)) as conversions,\n sum(coalesce(total_conversion_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.tiktok_ads__url_report\n),\n\ntwitter_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(total_conversions_sale_amount,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.twitter_ads__url_report\n),\n\ngoogle_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.google_ads__url_report\n),\n\nfacebook_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.facebook_ads__url_report\n),\n\nmicrosoft_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.microsoft_ads__url_report\n),\n\nreddit_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(total_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.reddit_ads__url_report\n)\n\nselect \n 'linkedin_ads' as platform\nfrom url_report\njoin linkedin_ads\n on url_report.platform = 'linkedin_ads'\nwhere abs(linkedin_ads.conversions - url_report.conversions) >= .01\n or abs(linkedin_ads.conversions_value - url_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'pinterest_ads' as platform\nfrom url_report\njoin pinterest_ads\n on url_report.platform = 'pinterest_ads'\nwhere abs(pinterest_ads.conversions - url_report.conversions) >= .01\n or abs(pinterest_ads.conversions_value - url_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'snapchat_ads' as platform\nfrom url_report\njoin snapchat_ads\n on url_report.platform = 'snapchat_ads'\nwhere abs(snapchat_ads.conversions - url_report.conversions) >= .01\n or abs(snapchat_ads.conversions_value - url_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'tiktok_ads' as platform\nfrom url_report\njoin tiktok_ads\n on url_report.platform = 'tiktok_ads'\nwhere abs(tiktok_ads.conversions - url_report.conversions) >= .01\n or abs(tiktok_ads.conversions_value - url_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'twitter_ads' as platform\nfrom url_report\njoin twitter_ads\n on url_report.platform = 'twitter_ads'\nwhere abs(twitter_ads.conversions - url_report.conversions) >= .01\n or abs(twitter_ads.conversions_value - url_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'google_ads' as platform\nfrom url_report\njoin google_ads\n on url_report.platform = 'google_ads'\nwhere abs(google_ads.conversions - url_report.conversions) >= .01\n or abs(google_ads.conversions_value - url_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'facebook_ads' as platform\nfrom url_report\njoin facebook_ads\n on url_report.platform = 'facebook_ads'\nwhere abs(facebook_ads.conversions - url_report.conversions) >= .01\n or abs(facebook_ads.conversions_value - url_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'microsoft_ads' as platform\nfrom url_report\njoin microsoft_ads\n on url_report.platform = 'microsoft_ads'\nwhere abs(microsoft_ads.conversions - url_report.conversions) >= .01\n or abs(microsoft_ads.conversions_value - url_report.conversions_value) >= .01\nunion all \n\nselect \n 'reddit_ads' as platform\nfrom url_report\njoin reddit_ads\n on url_report.platform = 'reddit_ads'\nwhere abs(reddit_ads.conversions - url_report.conversions) >= .01\n or abs(reddit_ads.conversions_value - url_report.conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.vertical_keyword_conversion_comparison": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "vertical_keyword_conversion_comparison", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "integrity/vertical_keyword_conversion_comparison.sql", "original_file_path": "tests/integrity/vertical_keyword_conversion_comparison.sql", "unique_id": "test.ad_reporting_integration_tests.vertical_keyword_conversion_comparison", "fqn": ["ad_reporting_integration_tests", "integrity", "vertical_keyword_conversion_comparison"], "alias": "vertical_keyword_conversion_comparison", "checksum": {"name": "sha256", "checksum": "bc0ff953564ed7cb181759c8a353c52373643912ececc8bfe4617a1375418f98"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783450494.6706047, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith keyword_report as (\n\n select \n platform,\n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__keyword_report\n group by 1\n),\n\namazon_ads as (\n\n select \n sum(coalesce(purchases_30_d,0)) as conversions,\n sum(coalesce(sales_30_d,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.amazon_ads__keyword_report\n),\n\napple_search_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(0) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.apple_search_ads__keyword_report\n),\n\npinterest_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(total_conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.pinterest_ads__keyword_report\n),\n\n{% if var('twitter_ads__using_keywords', true ) %}\ntwitter_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(total_conversions_sale_amount,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.twitter_ads__keyword_report\n),\n{% endif %}\n\ngoogle_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.google_ads__keyword_report\n),\n\nmicrosoft_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.microsoft_ads__keyword_report\n)\n\nselect \n 'amazon_ads' as platform\nfrom keyword_report\njoin amazon_ads\n on keyword_report.platform = 'amazon_ads'\nwhere abs(amazon_ads.conversions - keyword_report.conversions) >= .01\n or abs(amazon_ads.conversions_value - keyword_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'apple_search_ads' as platform\nfrom keyword_report\njoin apple_search_ads\n on keyword_report.platform = 'apple_search_ads'\nwhere abs(apple_search_ads.conversions - keyword_report.conversions) >= .01\n or abs(apple_search_ads.conversions_value - keyword_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'pinterest_ads' as platform\nfrom keyword_report\njoin pinterest_ads\n on keyword_report.platform = 'pinterest_ads'\nwhere abs(pinterest_ads.conversions - keyword_report.conversions) >= .01\n or abs(pinterest_ads.conversions_value - keyword_report.conversions_value) >= .01\n\nunion all \n\n{% if var('twitter_ads__using_keywords', true ) %}\nselect \n 'twitter_ads' as platform\nfrom keyword_report\njoin twitter_ads\n on keyword_report.platform = 'twitter_ads'\nwhere abs(twitter_ads.conversions - keyword_report.conversions) >= .01\n or abs(twitter_ads.conversions_value - keyword_report.conversions_value) >= .01\n\nunion all \n{% endif %}\n\nselect \n 'google_ads' as platform\nfrom keyword_report\njoin google_ads\n on keyword_report.platform = 'google_ads'\nwhere abs(google_ads.conversions - keyword_report.conversions) >= .01\n or abs(google_ads.conversions_value - keyword_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'microsoft_ads' as platform\nfrom keyword_report\njoin microsoft_ads\n on keyword_report.platform = 'microsoft_ads'\nwhere abs(microsoft_ads.conversions - keyword_report.conversions) >= .01\n or abs(microsoft_ads.conversions_value - keyword_report.conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.vertical_ad_group_conversion_comparison": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "vertical_ad_group_conversion_comparison", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "integrity/vertical_ad_group_conversion_comparison.sql", "original_file_path": "tests/integrity/vertical_ad_group_conversion_comparison.sql", "unique_id": "test.ad_reporting_integration_tests.vertical_ad_group_conversion_comparison", "fqn": ["ad_reporting_integration_tests", "integrity", "vertical_ad_group_conversion_comparison"], "alias": "vertical_ad_group_conversion_comparison", "checksum": {"name": "sha256", "checksum": "2c9ebd9e3c28fa0b98399ce898ccb4f5ac5075e45607a882f1d08e037a7458e4"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783450494.6784263, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith ad_group_report as (\n\n select \n platform,\n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__ad_group_report\n group by 1\n),\n\namazon_ads as (\n\n select \n sum(coalesce(purchases_30_d,0)) as conversions,\n sum(coalesce(sales_30_d,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.amazon_ads__ad_group_report\n),\n\napple_search_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(0) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.apple_search_ads__ad_group_report\n),\n\nlinkedin_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(conversion_value_in_local_currency,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.linkedin_ads__campaign_report\n),\n\npinterest_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(total_conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.pinterest_ads__ad_group_report\n),\n\nsnapchat_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(conversion_purchases_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.snapchat_ads__ad_squad_report\n),\n\ntiktok_ads as (\n\n select \n sum(coalesce(conversion,0)) as conversions,\n sum(coalesce(total_conversion_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.tiktok_ads__ad_group_report\n),\n\ntwitter_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(total_conversions_sale_amount,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.twitter_ads__line_item_report\n),\n\ngoogle_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.google_ads__ad_group_report\n),\n\nfacebook_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.facebook_ads__ad_set_report\n),\n\nmicrosoft_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.microsoft_ads__ad_group_report\n),\n\nreddit_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(total_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.reddit_ads__ad_group_report\n)\n\nselect \n 'amazon_ads' as platform\nfrom ad_group_report\njoin amazon_ads\n on ad_group_report.platform = 'amazon_ads'\nwhere abs(amazon_ads.conversions - ad_group_report.conversions) >= .01\n or abs(amazon_ads.conversions_value - ad_group_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'apple_search_ads' as platform\nfrom ad_group_report\njoin apple_search_ads\n on ad_group_report.platform = 'apple_search_ads'\nwhere abs(apple_search_ads.conversions - ad_group_report.conversions) >= .01\n or abs(apple_search_ads.conversions_value - ad_group_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'linkedin_ads' as platform\nfrom ad_group_report\njoin linkedin_ads\n on ad_group_report.platform = 'linkedin_ads'\nwhere abs(linkedin_ads.conversions - ad_group_report.conversions) >= .01\n or abs(linkedin_ads.conversions_value - ad_group_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'pinterest_ads' as platform\nfrom ad_group_report\njoin pinterest_ads\n on ad_group_report.platform = 'pinterest_ads'\nwhere abs(pinterest_ads.conversions - ad_group_report.conversions) >= .01\n or abs(pinterest_ads.conversions_value - ad_group_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'snapchat_ads' as platform\nfrom ad_group_report\njoin snapchat_ads\n on ad_group_report.platform = 'snapchat_ads'\nwhere abs(snapchat_ads.conversions - ad_group_report.conversions) >= .01\n or abs(snapchat_ads.conversions_value - ad_group_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'tiktok_ads' as platform\nfrom ad_group_report\njoin tiktok_ads\n on ad_group_report.platform = 'tiktok_ads'\nwhere abs(tiktok_ads.conversions - ad_group_report.conversions) >= .01\n or abs(tiktok_ads.conversions_value - ad_group_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'twitter_ads' as platform\nfrom ad_group_report\njoin twitter_ads\n on ad_group_report.platform = 'twitter_ads'\nwhere abs(twitter_ads.conversions - ad_group_report.conversions) >= .01\n or abs(twitter_ads.conversions_value - ad_group_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'google_ads' as platform\nfrom ad_group_report\njoin google_ads\n on ad_group_report.platform = 'google_ads'\nwhere abs(google_ads.conversions - ad_group_report.conversions) >= .01\n or abs(google_ads.conversions_value - ad_group_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'facebook_ads' as platform\nfrom ad_group_report\njoin facebook_ads\n on ad_group_report.platform = 'facebook_ads'\nwhere abs(facebook_ads.conversions - ad_group_report.conversions) >= .01\n or abs(facebook_ads.conversions_value - ad_group_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'microsoft_ads' as platform\nfrom ad_group_report\njoin microsoft_ads\n on ad_group_report.platform = 'microsoft_ads'\nwhere abs(microsoft_ads.conversions - ad_group_report.conversions) >= .01\n or abs(microsoft_ads.conversions_value - ad_group_report.conversions_value) >= .01\nunion all \n\nselect \n 'reddit_ads' as platform\nfrom ad_group_report\njoin reddit_ads\n on ad_group_report.platform = 'reddit_ads'\nwhere abs(reddit_ads.conversions - ad_group_report.conversions) >= .01\n or abs(reddit_ads.conversions_value - ad_group_report.conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.consistency_search_report": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_search_report", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "consistency/consistency_search_report.sql", "original_file_path": "tests/consistency/consistency_search_report.sql", "unique_id": "test.ad_reporting_integration_tests.consistency_search_report", "fqn": ["ad_reporting_integration_tests", "consistency", "consistency_search_report"], "alias": "consistency_search_report", "checksum": {"name": "sha256", "checksum": "0a8736340def1f3e8054365db1965679e70b307159a5564d69ebb9de71633542"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783450494.6861415, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith prod as (\n select\n search_query,\n keyword_id,\n sum(clicks) as clicks, \n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_prod.ad_reporting__search_report\n group by 1,2\n),\n\ndev as (\n select\n search_query,\n keyword_id,\n sum(clicks) as clicks, \n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__search_report\n group by 1,2\n),\n\nfinal as (\n select \n prod.search_query,\n prod.keyword_id,\n prod.clicks as prod_clicks,\n dev.clicks as dev_clicks,\n prod.impressions as prod_impressions,\n dev.impressions as dev_impressions,\n prod.spend as prod_spend,\n dev.spend as dev_spend,\n prod.conversions as prod_conversions,\n dev.conversions as dev_conversions,\n prod.conversions_value as prod_conversions_value,\n dev.conversions_value as dev_conversions_value\n from prod\n full outer join dev \n on dev.search_query = prod.search_query\n and dev.keyword_id = prod.keyword_id\n\n)\n\nselect *\nfrom final\nwhere\n abs(prod_clicks - dev_clicks) >= .01\n or abs(prod_impressions - dev_impressions) >= .01\n or abs(prod_spend - dev_spend) >= .01\n or abs(prod_conversions - dev_conversions) >= .01\n or abs(prod_conversions_value - dev_conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.consistency_ad_report": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_ad_report", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "consistency/consistency_ad_report.sql", "original_file_path": "tests/consistency/consistency_ad_report.sql", "unique_id": "test.ad_reporting_integration_tests.consistency_ad_report", "fqn": ["ad_reporting_integration_tests", "consistency", "consistency_ad_report"], "alias": "consistency_ad_report", "checksum": {"name": "sha256", "checksum": "681023f92d44ff4e10e0536ca6cc76450b6b15333672229939964358bfcdd6c3"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783450494.69215, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith prod as (\n select\n ad_id,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_prod.ad_reporting__ad_report\n group by 1\n),\n\ndev as (\n select\n ad_id,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__ad_report\n group by 1\n),\n\nfinal as (\n select \n prod.ad_id,\n prod.clicks as prod_clicks,\n dev.clicks as dev_clicks,\n prod.impressions as prod_impressions,\n dev.impressions as dev_impressions,\n prod.spend as prod_spend,\n dev.spend as dev_spend,\n prod.conversions as prod_conversions,\n dev.conversions as dev_conversions,\n prod.conversions_value as prod_conversions_value,\n dev.conversions_value as dev_conversions_value\n from prod\n full outer join dev \n on dev.ad_id = prod.ad_id\n)\n\nselect *\nfrom final\nwhere\n abs(prod_clicks - dev_clicks) >= .01\n or abs(prod_impressions - dev_impressions) >= .01\n or abs(prod_spend - dev_spend) >= .01\n or abs(prod_conversions - dev_conversions) >= .01\n or abs(prod_conversions_value - dev_conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.consistency_keyword_report": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_keyword_report", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "consistency/consistency_keyword_report.sql", "original_file_path": "tests/consistency/consistency_keyword_report.sql", "unique_id": "test.ad_reporting_integration_tests.consistency_keyword_report", "fqn": ["ad_reporting_integration_tests", "consistency", "consistency_keyword_report"], "alias": "consistency_keyword_report", "checksum": {"name": "sha256", "checksum": "299ee4c16c9f9da9cfd29217e7acfe1415180d539330705c0cf580bfe552e98f"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783450494.6990523, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith prod as (\n select\n keyword_id,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_prod.ad_reporting__keyword_report\n group by 1\n),\n\ndev as (\n select\n keyword_id,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__keyword_report\n group by 1\n),\n\nfinal as (\n select \n prod.keyword_id,\n prod.clicks as prod_clicks,\n dev.clicks as dev_clicks,\n prod.impressions as prod_impressions,\n dev.impressions as dev_impressions,\n prod.spend as prod_spend,\n dev.spend as dev_spend,\n prod.conversions as prod_conversions,\n dev.conversions as dev_conversions,\n prod.conversions_value as prod_conversions_value,\n dev.conversions_value as dev_conversions_value\n from prod\n full outer join dev \n on dev.keyword_id = prod.keyword_id\n)\n\nselect *\nfrom final\nwhere\n abs(prod_clicks - dev_clicks) >= .01\n or abs(prod_impressions - dev_impressions) >= .01\n or abs(prod_spend - dev_spend) >= .01\n or abs(prod_conversions - dev_conversions) >= .01\n or abs(prod_conversions_value - dev_conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.consistency_country_report": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_country_report", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "consistency/consistency_country_report.sql", "original_file_path": "tests/consistency/consistency_country_report.sql", "unique_id": "test.ad_reporting_integration_tests.consistency_country_report", "fqn": ["ad_reporting_integration_tests", "consistency", "consistency_country_report"], "alias": "consistency_country_report", "checksum": {"name": "sha256", "checksum": "ad26133bf62129ef597cf899fa1a2da1e8581735a65134809cb4c87931800b52"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783450494.705216, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith prod as (\n select\n country,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_prod.ad_reporting__monthly_campaign_country_report\n group by 1\n),\n\ndev as (\n select\n country,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__monthly_campaign_country_report\n group by 1\n),\n\nfinal as (\n select \n prod.country,\n prod.clicks as prod_clicks,\n dev.clicks as dev_clicks,\n prod.impressions as prod_impressions,\n dev.impressions as dev_impressions,\n prod.spend as prod_spend,\n dev.spend as dev_spend,\n prod.conversions as prod_conversions,\n dev.conversions as dev_conversions,\n prod.conversions_value as prod_conversions_value,\n dev.conversions_value as dev_conversions_value\n from prod\n full outer join dev \n on dev.country = prod.country\n)\n\nselect *\nfrom final\nwhere\n abs(prod_clicks - dev_clicks) >= .01\n or abs(prod_impressions - dev_impressions) >= .01\n or abs(prod_spend - dev_spend) >= .01\n or abs(prod_conversions - dev_conversions) >= .01\n or abs(prod_conversions_value - dev_conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.consistency_account_report": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_account_report", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "consistency/consistency_account_report.sql", "original_file_path": "tests/consistency/consistency_account_report.sql", "unique_id": "test.ad_reporting_integration_tests.consistency_account_report", "fqn": ["ad_reporting_integration_tests", "consistency", "consistency_account_report"], "alias": "consistency_account_report", "checksum": {"name": "sha256", "checksum": "0de4c0637a88825ac30e745ab7371f0cbfb459617aff9f679d39a1ebc9674cb0"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783450494.7111554, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith prod as (\n select\n account_id,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_prod.ad_reporting__account_report\n group by 1\n),\n\ndev as (\n select\n account_id,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__account_report\n group by 1\n),\n\nfinal as (\n select \n prod.account_id,\n prod.clicks as prod_clicks,\n dev.clicks as dev_clicks,\n prod.impressions as prod_impressions,\n dev.impressions as dev_impressions,\n prod.spend as prod_spend,\n dev.spend as dev_spend,\n prod.conversions as prod_conversions,\n dev.conversions as dev_conversions,\n prod.conversions_value as prod_conversions_value,\n dev.conversions_value as dev_conversions_value\n from prod\n full outer join dev \n on dev.account_id = prod.account_id\n)\n\nselect *\nfrom final\nwhere\n abs(prod_clicks - dev_clicks) >= .01\n or abs(prod_impressions - dev_impressions) >= .01\n or abs(prod_spend - dev_spend) >= .01\n or abs(prod_conversions - dev_conversions) >= .01\n or abs(prod_conversions_value - dev_conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.consistency_url_report": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_url_report", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "consistency/consistency_url_report.sql", "original_file_path": "tests/consistency/consistency_url_report.sql", "unique_id": "test.ad_reporting_integration_tests.consistency_url_report", "fqn": ["ad_reporting_integration_tests", "consistency", "consistency_url_report"], "alias": "consistency_url_report", "checksum": {"name": "sha256", "checksum": "594cfdbbe03e55c3bc0880461ace3130bf69292547d97b51566fda108f59ae45"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783450494.7171705, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith prod as (\n select\n base_url,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_prod.ad_reporting__url_report\n group by 1\n),\n\ndev as (\n select\n base_url,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__url_report\n group by 1\n),\n\nfinal as (\n select \n prod.base_url,\n prod.clicks as prod_clicks,\n dev.clicks as dev_clicks,\n prod.impressions as prod_impressions,\n dev.impressions as dev_impressions,\n prod.spend as prod_spend,\n dev.spend as dev_spend,\n prod.conversions as prod_conversions,\n dev.conversions as dev_conversions,\n prod.conversions_value as prod_conversions_value,\n dev.conversions_value as dev_conversions_value\n from prod\n full outer join dev \n on dev.base_url = prod.base_url\n)\n\nselect *\nfrom final\nwhere\n abs(prod_clicks - dev_clicks) >= .01\n or abs(prod_impressions - dev_impressions) >= .01\n or abs(prod_spend - dev_spend) >= .01\n or abs(prod_conversions - dev_conversions) >= .01\n or abs(prod_conversions_value - dev_conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.consistency_ad_group_report": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_ad_group_report", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "consistency/consistency_ad_group_report.sql", "original_file_path": "tests/consistency/consistency_ad_group_report.sql", "unique_id": "test.ad_reporting_integration_tests.consistency_ad_group_report", "fqn": ["ad_reporting_integration_tests", "consistency", "consistency_ad_group_report"], "alias": "consistency_ad_group_report", "checksum": {"name": "sha256", "checksum": "47fc74626d8e9bdc30cc6771942884f5f329e215963c979e36499c65d9bac231"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783450494.724218, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith prod as (\n select\n ad_group_id,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_prod.ad_reporting__ad_group_report\n group by 1\n),\n\ndev as (\n select\n ad_group_id,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__ad_group_report\n group by 1\n),\n\nfinal as (\n select \n prod.ad_group_id,\n prod.clicks as prod_clicks,\n dev.clicks as dev_clicks,\n prod.impressions as prod_impressions,\n dev.impressions as dev_impressions,\n prod.spend as prod_spend,\n dev.spend as dev_spend,\n prod.conversions as prod_conversions,\n dev.conversions as dev_conversions,\n prod.conversions_value as prod_conversions_value,\n dev.conversions_value as dev_conversions_value\n from prod\n full outer join dev \n on dev.ad_group_id = prod.ad_group_id\n)\n\nselect *\nfrom final\nwhere\n abs(prod_clicks - dev_clicks) >= .01\n or abs(prod_impressions - dev_impressions) >= .01\n or abs(prod_spend - dev_spend) >= .01\n or abs(prod_conversions - dev_conversions) >= .01\n or abs(prod_conversions_value - dev_conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.consistency_campaign_report": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_campaign_report", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "consistency/consistency_campaign_report.sql", "original_file_path": "tests/consistency/consistency_campaign_report.sql", "unique_id": "test.ad_reporting_integration_tests.consistency_campaign_report", "fqn": ["ad_reporting_integration_tests", "consistency", "consistency_campaign_report"], "alias": "consistency_campaign_report", "checksum": {"name": "sha256", "checksum": "25b51911dc3c16537f3ae06c7bdab67a7df6d4a4025e8de5a9b963a8fbe609a9"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783450494.7302814, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith prod as (\n select\n campaign_id,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_prod.ad_reporting__campaign_report\n group by 1\n),\n\ndev as (\n select\n campaign_id,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__campaign_report\n group by 1\n),\n\nfinal as (\n select \n prod.campaign_id,\n prod.clicks as prod_clicks,\n dev.clicks as dev_clicks,\n prod.impressions as prod_impressions,\n dev.impressions as dev_impressions,\n prod.spend as prod_spend,\n dev.spend as dev_spend,\n prod.conversions as prod_conversions,\n dev.conversions as dev_conversions,\n prod.conversions_value as prod_conversions_value,\n dev.conversions_value as dev_conversions_value\n from prod\n full outer join dev \n on dev.campaign_id = prod.campaign_id\n)\n\nselect *\nfrom final\nwhere\n abs(prod_clicks - dev_clicks) >= .01\n or abs(prod_impressions - dev_impressions) >= .01\n or abs(prod_spend - dev_spend) >= .01\n or abs(prod_conversions - dev_conversions) >= .01\n or abs(prod_conversions_value - dev_conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.consistency_region_report": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_region_report", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "consistency/consistency_region_report.sql", "original_file_path": "tests/consistency/consistency_region_report.sql", "unique_id": "test.ad_reporting_integration_tests.consistency_region_report", "fqn": ["ad_reporting_integration_tests", "consistency", "consistency_region_report"], "alias": "consistency_region_report", "checksum": {"name": "sha256", "checksum": "c2321b26c74a7274ff00fa09cf9834d332e333bbbd60e123684b02398eb5f064"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783450494.7363014, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith prod as (\n select\n region,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_prod.ad_reporting__monthly_campaign_region_report\n group by 1\n),\n\ndev as (\n select\n region,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__monthly_campaign_region_report\n group by 1\n),\n\nfinal as (\n select \n prod.region,\n prod.clicks as prod_clicks,\n dev.clicks as dev_clicks,\n prod.impressions as prod_impressions,\n dev.impressions as dev_impressions,\n prod.spend as prod_spend,\n dev.spend as dev_spend,\n prod.conversions as prod_conversions,\n dev.conversions as dev_conversions,\n prod.conversions_value as prod_conversions_value,\n dev.conversions_value as dev_conversions_value\n from prod\n full outer join dev \n on dev.region = prod.region\n)\n\nselect *\nfrom final\nwhere\n abs(prod_clicks - dev_clicks) >= .01\n or abs(prod_impressions - dev_impressions) >= .01\n or abs(prod_spend - dev_spend) >= .01\n or abs(prod_conversions - dev_conversions) >= .01\n or abs(prod_conversions_value - dev_conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "source.reddit_ads.reddit_ads.account": [{"database": "postgres", "schema": "public", "name": "account", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.account", "fqn": ["reddit_ads", "staging", "reddit_ads", "account"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_account_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents information about an account.", "columns": {"id": {"name": "id", "description": "{{ doc(\"account_id\") }}", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attribution_type": {"name": "attribution_type", "description": "{{ doc(\"attribution_type\") }}", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_attribution_window": {"name": "click_attribution_window", "description": "{{ doc(\"click_attribution_window\") }}", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "{{ doc(\"created_at\") }}", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "{{ doc(\"currency\") }}", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "time_zone_id": {"name": "time_zone_id", "description": "{{ doc(\"time_zone_id\") }}", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_attribution_window": {"name": "view_attribution_window", "description": "{{ doc(\"view_attribution_window\") }}", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": false, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": false, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_account_data\"", "created_at": 1783450506.1796002, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": []}]}, "parent_map": {"seed.ad_reporting_integration_tests.twitter_campaign_locations_report_data": [], "seed.ad_reporting_integration_tests.apple_search_ad_history_data": [], "seed.ad_reporting_integration_tests.snapchat_ad_hourly_report_data": [], "seed.ad_reporting_integration_tests.linkedin_ad_account_history_data": [], "seed.ad_reporting_integration_tests.google_ads_account_history_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_campaign_performance_daily_report_data": [], "seed.ad_reporting_integration_tests.tiktok_advertiser_data": [], "seed.ad_reporting_integration_tests.amazon_ads_targeting_keyword_report_data": [], "seed.ad_reporting_integration_tests.snapchat_creative_url_tag_history_data": [], "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_actions_data": [], "seed.ad_reporting_integration_tests.amazon_ads_ad_group_history_data": [], "seed.ad_reporting_integration_tests.reddit_ads_campaign_data": [], "seed.ad_reporting_integration_tests.apple_search_ad_report_data": [], "seed.ad_reporting_integration_tests.reddit_ads_ad_group_report_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_geographic_performance_daily_report_data": [], "seed.ad_reporting_integration_tests.twitter_promoted_tweet_report_data": [], "seed.ad_reporting_integration_tests.snapchat_creative_history_data": [], "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_data": [], "seed.ad_reporting_integration_tests.google_ads_ad_group_criterion_history_data": [], "seed.ad_reporting_integration_tests.amazon_ads_portfolio_history_data": [], "seed.ad_reporting_integration_tests.apple_search_organization_data": [], "seed.ad_reporting_integration_tests.twitter_campaign_history_data": [], "seed.ad_reporting_integration_tests.linkedin_monthly_ad_analytics_by_member_region_data": [], "seed.ad_reporting_integration_tests.apple_search_campaign_history_data": [], "seed.ad_reporting_integration_tests.pinterest_campaign_report_data": [], "seed.ad_reporting_integration_tests.snapchat_campaign_history_data": [], "seed.ad_reporting_integration_tests.twitter_account_report_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_account_history_data": [], "seed.ad_reporting_integration_tests.snapchat_campaign_hourly_report_data": [], "seed.ad_reporting_integration_tests.facebook_ads_account_history_data": [], "seed.ad_reporting_integration_tests.apple_search_search_term_report_data": [], "seed.ad_reporting_integration_tests.linkedin_monthly_ad_analytics_by_member_country_data": [], "seed.ad_reporting_integration_tests.twitter_promoted_tweet_history_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_search_performance_daily_report_data": [], "seed.ad_reporting_integration_tests.reddit_ads_campaign_report_data": [], "seed.ad_reporting_integration_tests.facebook_ads_demographics_region_actions_data": [], "seed.ad_reporting_integration_tests.twitter_campaign_regions_report_data": [], "seed.ad_reporting_integration_tests.reddit_ads_campaign_country_conversions_report_data": [], "seed.ad_reporting_integration_tests.google_ads_search_term_keyword_stats_data": [], "seed.ad_reporting_integration_tests.snapchat_ad_history_data": [], "seed.ad_reporting_integration_tests.reddit_ads_ad_report_data": [], "seed.ad_reporting_integration_tests.google_ads_campaign_bidding_strategy_history_data": [], "seed.ad_reporting_integration_tests.google_ads_campaign_budget_history_data": [], "seed.ad_reporting_integration_tests.reddit_ads_ad_conversions": [], "seed.ad_reporting_integration_tests.tiktok_location_data": [], "seed.ad_reporting_integration_tests.pinterest_advertiser_report_data": [], "seed.ad_reporting_integration_tests.snapchat_ad_squad_history_data": [], "seed.ad_reporting_integration_tests.twitter_tweet_url_data": [], "seed.ad_reporting_integration_tests.linkedin_ad_creative_history_data": [], "seed.ad_reporting_integration_tests.amazon_ads_search_term_ad_keyword_report_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_ad_group_history_data": [], "seed.ad_reporting_integration_tests.facebook_ads_demographics_region_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_ad_performance_daily_report_data": [], "seed.ad_reporting_integration_tests.apple_search_keyword_history_data": [], "seed.ad_reporting_integration_tests.reddit_ads_account_data": [], "seed.ad_reporting_integration_tests.linkedin_ad_campaign_group_history_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_keyword_performance_daily_report_data": [], "seed.ad_reporting_integration_tests.google_ads_ad_group_history_data": [], "seed.ad_reporting_integration_tests.amazon_ads_profile_data": [], "seed.ad_reporting_integration_tests.pinterest_campaign_history_data": [], "seed.ad_reporting_integration_tests.twitter_line_item_report_data": [], "seed.ad_reporting_integration_tests.google_ads_campaign_stats_data": [], "seed.ad_reporting_integration_tests.twitter_line_item_history_data": [], "seed.ad_reporting_integration_tests.google_ads_ad_stats_data": [], "seed.ad_reporting_integration_tests.reddit_ads_account_conversions": [], "seed.ad_reporting_integration_tests.google_ads_account_stats_data": [], "seed.ad_reporting_integration_tests.snapchat_campaign_geo_country_daily_report_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_ad_group_performance_daily_report_data": [], "seed.ad_reporting_integration_tests.amazon_ads_product_ad_history_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_ad_history_data": [], "seed.ad_reporting_integration_tests.reddit_ads_campaign_country_report_data": [], "seed.ad_reporting_integration_tests.facebook_ads_ad_history_data": [], "seed.ad_reporting_integration_tests.pinterest_ad_group_report_data": [], "seed.ad_reporting_integration_tests.twitter_campaign_report_data": [], "seed.ad_reporting_integration_tests.facebook_ads_ad_set_history_data": [], "seed.ad_reporting_integration_tests.snapchat_campaign_geo_region_daily_report_data": [], "seed.ad_reporting_integration_tests.pinterest_pin_promotion_history_data": [], "seed.ad_reporting_integration_tests.amazon_ads_ad_group_level_report_data": [], "seed.ad_reporting_integration_tests.twitter_line_item_keywords_report_data": [], "seed.ad_reporting_integration_tests.twitter_tweet_data": [], "seed.ad_reporting_integration_tests.tiktok_campaign_country_report_data": [], "seed.ad_reporting_integration_tests.facebook_ads_creative_history_data": [], "seed.ad_reporting_integration_tests.facebook_ads_campaign_history_data": [], "seed.ad_reporting_integration_tests.amazon_ads_campaign_level_report_data": [], "seed.ad_reporting_integration_tests.google_ads_ad_group_stats_data": [], "seed.ad_reporting_integration_tests.apple_search_keyword_report_data": [], "seed.ad_reporting_integration_tests.tiktok_campaign_report_hourly_data": [], "seed.ad_reporting_integration_tests.amazon_ads_advertised_product_report_data": [], "seed.ad_reporting_integration_tests.twitter_account_history_data": [], "seed.ad_reporting_integration_tests.apple_search_ad_group_history_data": [], "seed.ad_reporting_integration_tests.tiktok_adgroup_history_data": [], "seed.ad_reporting_integration_tests.apple_search_campaign_report_data": [], "seed.ad_reporting_integration_tests.reddit_ads_ad_data": [], "seed.ad_reporting_integration_tests.snapchat_ad_squad_hourly_report_data": [], "seed.ad_reporting_integration_tests.linkedin_ad_analytics_by_campaign_data": [], "seed.ad_reporting_integration_tests.snapchat_ad_account_history_data": [], "seed.ad_reporting_integration_tests.tiktok_ad_history_data": [], "seed.ad_reporting_integration_tests.linkedin_ad_analytics_by_creative_data": [], "seed.ad_reporting_integration_tests.reddit_ads_account_report_data": [], "seed.ad_reporting_integration_tests.reddit_ads_ad_group_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_campaign_history_data": [], "seed.ad_reporting_integration_tests.pinterest_pin_promotion_report_data": [], "seed.ad_reporting_integration_tests.pinterest_targeting_geo_data": [], "seed.ad_reporting_integration_tests.linkedin_geo_data": [], "seed.ad_reporting_integration_tests.linkedin_ad_campaign_history_data": [], "seed.ad_reporting_integration_tests.tiktok_campaign_history_data": [], "seed.ad_reporting_integration_tests.google_ads_ad_history_data": [], "seed.ad_reporting_integration_tests.google_ads_campaign_criterion_history_data": [], "seed.ad_reporting_integration_tests.google_ads_campaign_bid_modifier_history_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_account_performance_daily_report_data": [], "seed.ad_reporting_integration_tests.tiktok_adgroup_report_hourly_data": [], "seed.ad_reporting_integration_tests.google_ads_keyword_stats_data": [], "seed.ad_reporting_integration_tests.pinterest_keyword_report_data": [], "seed.ad_reporting_integration_tests.google_ads_campaign_history_data": [], "seed.ad_reporting_integration_tests.pinterest_keyword_history_data": [], "seed.ad_reporting_integration_tests.pinterest_ad_group_history_data": [], "seed.ad_reporting_integration_tests.pinterest_advertiser_history_data": [], "seed.ad_reporting_integration_tests.amazon_ads_campaign_history_data": [], "seed.ad_reporting_integration_tests.facebook_ads_demographics_country_data": [], "seed.ad_reporting_integration_tests.reddit_ads_campaign_conversions": [], "seed.ad_reporting_integration_tests.facebook_ads_demographics_country_actions_data": [], "seed.ad_reporting_integration_tests.apple_search_ad_group_report_data": [], "seed.ad_reporting_integration_tests.reddit_ads_business_account_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_keyword_history_data": [], "seed.ad_reporting_integration_tests.amazon_ads_keyword_history_data": [], "seed.ad_reporting_integration_tests.pinterest_pin_promotion_targeting_report_data": [], "seed.ad_reporting_integration_tests.reddit_ads_ad_group_conversions": [], "seed.ad_reporting_integration_tests.tiktok_ad_report_hourly_data": [], "seed.ad_reporting_integration_tests.pinterest_targeting_geo_region_data": [], "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_action_values_data": [], "model.linkedin.linkedin_ads__creative_report": ["model.linkedin.stg_linkedin_ads__account_history", "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative", "model.linkedin.stg_linkedin_ads__campaign_group_history", "model.linkedin.stg_linkedin_ads__campaign_history", "model.linkedin.stg_linkedin_ads__creative_history"], "model.linkedin.linkedin_ads__campaign_report": ["model.linkedin.stg_linkedin_ads__account_history", "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign", "model.linkedin.stg_linkedin_ads__campaign_group_history", "model.linkedin.stg_linkedin_ads__campaign_history"], "model.linkedin.linkedin_ads__monthly_campaign_region_report": ["model.linkedin.stg_linkedin_ads__account_history", "model.linkedin.stg_linkedin_ads__campaign_group_history", "model.linkedin.stg_linkedin_ads__campaign_history", "model.linkedin.stg_linkedin_ads__geo", "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region"], "model.linkedin.linkedin_ads__monthly_campaign_country_report": ["model.linkedin.stg_linkedin_ads__account_history", "model.linkedin.stg_linkedin_ads__campaign_group_history", "model.linkedin.stg_linkedin_ads__campaign_history", "model.linkedin.stg_linkedin_ads__geo", "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country"], "model.linkedin.linkedin_ads__account_report": ["model.linkedin.stg_linkedin_ads__account_history", "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign", "model.linkedin.stg_linkedin_ads__campaign_history"], "model.linkedin.linkedin_ads__campaign_group_report": ["model.linkedin.stg_linkedin_ads__account_history", "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign", "model.linkedin.stg_linkedin_ads__campaign_group_history", "model.linkedin.stg_linkedin_ads__campaign_history"], "model.linkedin.linkedin_ads__url_report": ["model.linkedin.stg_linkedin_ads__account_history", "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative", "model.linkedin.stg_linkedin_ads__campaign_group_history", "model.linkedin.stg_linkedin_ads__campaign_history", "model.linkedin.stg_linkedin_ads__creative_history"], "model.linkedin.stg_linkedin_ads__geo": ["model.linkedin.stg_linkedin_ads__geo_tmp"], "model.linkedin.stg_linkedin_ads__account_history": ["model.linkedin.stg_linkedin_ads__account_history_tmp"], "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_creative_tmp"], "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country": ["model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country_tmp"], "model.linkedin.stg_linkedin_ads__campaign_group_history": ["model.linkedin.stg_linkedin_ads__campaign_group_history_tmp"], "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region": ["model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region_tmp"], "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign_tmp"], "model.linkedin.stg_linkedin_ads__campaign_history": ["model.linkedin.stg_linkedin_ads__campaign_history_tmp"], "model.linkedin.stg_linkedin_ads__creative_history": ["model.linkedin.stg_linkedin_ads__creative_history_tmp"], "model.linkedin.stg_linkedin_ads__creative_history_tmp": ["source.linkedin.linkedin_ads.creative_history"], "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region_tmp": ["source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_region"], "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country_tmp": ["source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_country"], "model.linkedin.stg_linkedin_ads__campaign_history_tmp": ["source.linkedin.linkedin_ads.campaign_history"], "model.linkedin.stg_linkedin_ads__campaign_group_history_tmp": ["source.linkedin.linkedin_ads.campaign_group_history"], "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign_tmp": ["source.linkedin.linkedin_ads.ad_analytics_by_campaign"], "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative_tmp": ["source.linkedin.linkedin_ads.ad_analytics_by_creative"], "model.linkedin.stg_linkedin_ads__geo_tmp": ["source.linkedin.linkedin_ads.geo"], "model.linkedin.stg_linkedin_ads__account_history_tmp": ["source.linkedin.linkedin_ads.account_history"], "model.apple_search_ads.apple_search_ads__campaign_report": ["model.apple_search_ads.stg_apple_search_ads__campaign_history", "model.apple_search_ads.stg_apple_search_ads__campaign_report", "model.apple_search_ads.stg_apple_search_ads__organization"], "model.apple_search_ads.apple_search_ads__organization_report": ["model.apple_search_ads.stg_apple_search_ads__campaign_history", "model.apple_search_ads.stg_apple_search_ads__campaign_report", "model.apple_search_ads.stg_apple_search_ads__organization"], "model.apple_search_ads.apple_search_ads__search_term_report": ["model.apple_search_ads.stg_apple_search_ads__campaign_history", "model.apple_search_ads.stg_apple_search_ads__organization", "model.apple_search_ads.stg_apple_search_ads__search_term_report"], "model.apple_search_ads.apple_search_ads__ad_report": ["model.apple_search_ads.stg_apple_search_ads__ad_group_history", "model.apple_search_ads.stg_apple_search_ads__ad_history", "model.apple_search_ads.stg_apple_search_ads__ad_report", "model.apple_search_ads.stg_apple_search_ads__campaign_history", "model.apple_search_ads.stg_apple_search_ads__organization"], "model.apple_search_ads.apple_search_ads__keyword_report": ["model.apple_search_ads.stg_apple_search_ads__ad_group_history", "model.apple_search_ads.stg_apple_search_ads__campaign_history", "model.apple_search_ads.stg_apple_search_ads__keyword_history", "model.apple_search_ads.stg_apple_search_ads__keyword_report", "model.apple_search_ads.stg_apple_search_ads__organization"], "model.apple_search_ads.apple_search_ads__ad_group_report": ["model.apple_search_ads.stg_apple_search_ads__ad_group_history", "model.apple_search_ads.stg_apple_search_ads__ad_group_report", "model.apple_search_ads.stg_apple_search_ads__campaign_history", "model.apple_search_ads.stg_apple_search_ads__organization"], "model.apple_search_ads.stg_apple_search_ads__ad_group_history": ["model.apple_search_ads.stg_apple_search_ads__ad_group_history_tmp"], "model.apple_search_ads.stg_apple_search_ads__keyword_history": ["model.apple_search_ads.stg_apple_search_ads__keyword_history_tmp"], "model.apple_search_ads.stg_apple_search_ads__keyword_report": ["model.apple_search_ads.stg_apple_search_ads__keyword_report_tmp"], "model.apple_search_ads.stg_apple_search_ads__campaign_report": ["model.apple_search_ads.stg_apple_search_ads__campaign_report_tmp"], "model.apple_search_ads.stg_apple_search_ads__search_term_report": ["model.apple_search_ads.stg_apple_search_ads__search_term_report_tmp"], "model.apple_search_ads.stg_apple_search_ads__campaign_history": ["model.apple_search_ads.stg_apple_search_ads__campaign_history_tmp"], "model.apple_search_ads.stg_apple_search_ads__ad_report": ["model.apple_search_ads.stg_apple_search_ads__ad_report_tmp"], "model.apple_search_ads.stg_apple_search_ads__ad_history": ["model.apple_search_ads.stg_apple_search_ads__ad_history_tmp"], "model.apple_search_ads.stg_apple_search_ads__ad_group_report": ["model.apple_search_ads.stg_apple_search_ads__ad_group_report_tmp"], "model.apple_search_ads.stg_apple_search_ads__organization": ["model.apple_search_ads.stg_apple_search_ads__organization_tmp"], "model.apple_search_ads.stg_apple_search_ads__ad_group_history_tmp": ["source.apple_search_ads.apple_search_ads.ad_group_history"], "model.apple_search_ads.stg_apple_search_ads__campaign_report_tmp": ["source.apple_search_ads.apple_search_ads.campaign_report"], "model.apple_search_ads.stg_apple_search_ads__campaign_history_tmp": ["source.apple_search_ads.apple_search_ads.campaign_history"], "model.apple_search_ads.stg_apple_search_ads__keyword_history_tmp": ["source.apple_search_ads.apple_search_ads.keyword_history"], "model.apple_search_ads.stg_apple_search_ads__search_term_report_tmp": ["source.apple_search_ads.apple_search_ads.search_term_report"], "model.apple_search_ads.stg_apple_search_ads__keyword_report_tmp": ["source.apple_search_ads.apple_search_ads.keyword_report"], "model.apple_search_ads.stg_apple_search_ads__ad_history_tmp": ["source.apple_search_ads.apple_search_ads.ad_history"], "model.apple_search_ads.stg_apple_search_ads__ad_report_tmp": ["source.apple_search_ads.apple_search_ads.ad_level_report"], "model.apple_search_ads.stg_apple_search_ads__ad_group_report_tmp": ["source.apple_search_ads.apple_search_ads.ad_group_report"], "model.apple_search_ads.stg_apple_search_ads__organization_tmp": ["source.apple_search_ads.apple_search_ads.organization"], "model.reddit_ads.reddit_ads__campaign_report": ["model.reddit_ads.stg_reddit_ads__account", "model.reddit_ads.stg_reddit_ads__campaign", "model.reddit_ads.stg_reddit_ads__campaign_conversions_report", "model.reddit_ads.stg_reddit_ads__campaign_report"], "model.reddit_ads.reddit_ads__campaign_country_report": ["model.reddit_ads.stg_reddit_ads__account", "model.reddit_ads.stg_reddit_ads__campaign", "model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report", "model.reddit_ads.stg_reddit_ads__campaign_country_report"], "model.reddit_ads.reddit_ads__url_report": ["model.reddit_ads.stg_reddit_ads__account", "model.reddit_ads.stg_reddit_ads__ad", "model.reddit_ads.stg_reddit_ads__ad_conversions_report", "model.reddit_ads.stg_reddit_ads__ad_group", "model.reddit_ads.stg_reddit_ads__ad_report", "model.reddit_ads.stg_reddit_ads__campaign"], "model.reddit_ads.reddit_ads__account_report": ["model.reddit_ads.stg_reddit_ads__account", "model.reddit_ads.stg_reddit_ads__account_conversions_report", "model.reddit_ads.stg_reddit_ads__account_report"], "model.reddit_ads.reddit_ads__ad_report": ["model.reddit_ads.stg_reddit_ads__account", "model.reddit_ads.stg_reddit_ads__ad", "model.reddit_ads.stg_reddit_ads__ad_conversions_report", "model.reddit_ads.stg_reddit_ads__ad_group", "model.reddit_ads.stg_reddit_ads__ad_report", "model.reddit_ads.stg_reddit_ads__campaign"], "model.reddit_ads.reddit_ads__ad_group_report": ["model.reddit_ads.stg_reddit_ads__account", "model.reddit_ads.stg_reddit_ads__ad_group", "model.reddit_ads.stg_reddit_ads__ad_group_conversions_report", "model.reddit_ads.stg_reddit_ads__ad_group_report", "model.reddit_ads.stg_reddit_ads__campaign"], "model.reddit_ads.stg_reddit_ads__ad_group": ["model.reddit_ads.stg_reddit_ads__ad_group_tmp"], "model.reddit_ads.stg_reddit_ads__ad_report": ["model.reddit_ads.stg_reddit_ads__ad_report_tmp"], "model.reddit_ads.stg_reddit_ads__ad_conversions_report": ["model.reddit_ads.stg_reddit_ads__ad_conversions_report_tmp"], "model.reddit_ads.stg_reddit_ads__campaign": ["model.reddit_ads.stg_reddit_ads__campaign_tmp"], "model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report": ["model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report_tmp"], "model.reddit_ads.stg_reddit_ads__campaign_report": ["model.reddit_ads.stg_reddit_ads__campaign_report_tmp"], "model.reddit_ads.stg_reddit_ads__ad": ["model.reddit_ads.stg_reddit_ads__ad_tmp"], "model.reddit_ads.stg_reddit_ads__account_conversions_report": ["model.reddit_ads.stg_reddit_ads__account_conversions_report_tmp"], "model.reddit_ads.stg_reddit_ads__account_report": ["model.reddit_ads.stg_reddit_ads__account_report_tmp"], "model.reddit_ads.stg_reddit_ads__campaign_conversions_report": ["model.reddit_ads.stg_reddit_ads__campaign_conversions_report_tmp"], "model.reddit_ads.stg_reddit_ads__ad_group_conversions_report": ["model.reddit_ads.stg_reddit_ads__ad_group_conversions_report_tmp"], "model.reddit_ads.stg_reddit_ads__ad_group_report": ["model.reddit_ads.stg_reddit_ads__ad_group_report_tmp"], "model.reddit_ads.stg_reddit_ads__campaign_country_report": ["model.reddit_ads.stg_reddit_ads__campaign_country_report_tmp"], "model.reddit_ads.stg_reddit_ads__account": ["model.reddit_ads.stg_reddit_ads__account_tmp"], "model.reddit_ads.stg_reddit_ads__ad_conversions_report_tmp": ["source.reddit_ads.reddit_ads.ad_conversions_report"], "model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report_tmp": ["source.reddit_ads.reddit_ads.campaign_country_conversions_report"], "model.reddit_ads.stg_reddit_ads__account_report_tmp": ["source.reddit_ads.reddit_ads.account_report"], "model.reddit_ads.stg_reddit_ads__campaign_report_tmp": ["source.reddit_ads.reddit_ads.campaign_report"], "model.reddit_ads.stg_reddit_ads__ad_group_conversions_report_tmp": ["source.reddit_ads.reddit_ads.ad_group_conversions_report"], "model.reddit_ads.stg_reddit_ads__ad_tmp": ["source.reddit_ads.reddit_ads.ad"], "model.reddit_ads.stg_reddit_ads__campaign_country_report_tmp": ["source.reddit_ads.reddit_ads.campaign_country_report"], "model.reddit_ads.stg_reddit_ads__account_tmp": ["source.reddit_ads.reddit_ads.business_account"], "model.reddit_ads.stg_reddit_ads__campaign_tmp": ["source.reddit_ads.reddit_ads.campaign"], "model.reddit_ads.stg_reddit_ads__ad_group_report_tmp": ["source.reddit_ads.reddit_ads.ad_group_report"], "model.reddit_ads.stg_reddit_ads__account_conversions_report_tmp": ["source.reddit_ads.reddit_ads.account_conversions_report"], "model.reddit_ads.stg_reddit_ads__ad_group_tmp": ["source.reddit_ads.reddit_ads.ad_group"], "model.reddit_ads.stg_reddit_ads__campaign_conversions_report_tmp": ["source.reddit_ads.reddit_ads.campaign_conversions_report"], "model.reddit_ads.stg_reddit_ads__ad_report_tmp": ["source.reddit_ads.reddit_ads.ad_report"], "model.snapchat_ads.snapchat_ads__campaign_report": ["model.snapchat_ads.stg_snapchat_ads__ad_account_history", "model.snapchat_ads.stg_snapchat_ads__campaign_history", "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report"], "model.snapchat_ads.snapchat_ads__url_report": ["model.snapchat_ads.snapchat_ads__creative_history_prep", "model.snapchat_ads.stg_snapchat_ads__ad_account_history", "model.snapchat_ads.stg_snapchat_ads__ad_history", "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report", "model.snapchat_ads.stg_snapchat_ads__ad_squad_history", "model.snapchat_ads.stg_snapchat_ads__campaign_history"], "model.snapchat_ads.snapchat_ads__campaign_country_report": ["model.snapchat_ads.stg_snapchat_ads__ad_account_history", "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report", "model.snapchat_ads.stg_snapchat_ads__campaign_history"], "model.snapchat_ads.snapchat_ads__campaign_region_report": ["model.snapchat_ads.stg_snapchat_ads__ad_account_history", "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report", "model.snapchat_ads.stg_snapchat_ads__campaign_history"], "model.snapchat_ads.snapchat_ads__ad_squad_report": ["model.snapchat_ads.stg_snapchat_ads__ad_account_history", "model.snapchat_ads.stg_snapchat_ads__ad_squad_history", "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report", "model.snapchat_ads.stg_snapchat_ads__campaign_history"], "model.snapchat_ads.snapchat_ads__ad_report": ["model.snapchat_ads.snapchat_ads__creative_history_prep", "model.snapchat_ads.stg_snapchat_ads__ad_account_history", "model.snapchat_ads.stg_snapchat_ads__ad_history", "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report", "model.snapchat_ads.stg_snapchat_ads__ad_squad_history", "model.snapchat_ads.stg_snapchat_ads__campaign_history"], "model.snapchat_ads.snapchat_ads__account_report": ["model.snapchat_ads.stg_snapchat_ads__ad_account_history", "model.snapchat_ads.stg_snapchat_ads__ad_history", "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report", "model.snapchat_ads.stg_snapchat_ads__ad_squad_history", "model.snapchat_ads.stg_snapchat_ads__campaign_history"], "model.snapchat_ads.stg_snapchat_ads__creative_history": ["model.snapchat_ads.stg_snapchat_ads__creative_history_tmp"], "model.snapchat_ads.stg_snapchat_ads__ad_squad_history": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_history_tmp"], "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report": ["model.snapchat_ads.stg_snapchat_ads__ad_hourly_report_tmp"], "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report_tmp"], "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report_tmp"], "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report_tmp"], "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history": ["model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history_tmp"], "model.snapchat_ads.stg_snapchat_ads__ad_account_history": ["model.snapchat_ads.stg_snapchat_ads__ad_account_history_tmp"], "model.snapchat_ads.stg_snapchat_ads__campaign_history": ["model.snapchat_ads.stg_snapchat_ads__campaign_history_tmp"], "model.snapchat_ads.stg_snapchat_ads__ad_history": ["model.snapchat_ads.stg_snapchat_ads__ad_history_tmp"], "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report": ["model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report_tmp"], "model.snapchat_ads.stg_snapchat_ads__ad_squad_history_tmp": ["source.snapchat_ads.snapchat_ads.ad_squad_history"], "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report_tmp": ["source.snapchat_ads.snapchat_ads.campaign_geo_country_daily_report"], "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history_tmp": ["source.snapchat_ads.snapchat_ads.creative_url_tag_history"], "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report_tmp": ["source.snapchat_ads.snapchat_ads.ad_squad_hourly_report"], "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report_tmp": ["source.snapchat_ads.snapchat_ads.campaign_hourly_report"], "model.snapchat_ads.stg_snapchat_ads__campaign_history_tmp": ["source.snapchat_ads.snapchat_ads.campaign_history"], "model.snapchat_ads.stg_snapchat_ads__ad_account_history_tmp": ["source.snapchat_ads.snapchat_ads.ad_account_history"], "model.snapchat_ads.stg_snapchat_ads__ad_history_tmp": ["source.snapchat_ads.snapchat_ads.ad_history"], "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report_tmp": ["source.snapchat_ads.snapchat_ads.campaign_geo_region_daily_report"], "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report_tmp": ["source.snapchat_ads.snapchat_ads.ad_hourly_report"], "model.snapchat_ads.stg_snapchat_ads__creative_history_tmp": ["source.snapchat_ads.snapchat_ads.creative_history"], "model.snapchat_ads.snapchat_ads__creative_history_prep": ["model.snapchat_ads.stg_snapchat_ads__creative_history", "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history"], "model.pinterest.pinterest_ads__campaign_region_report": ["model.pinterest.stg_pinterest_ads__advertiser_history", "model.pinterest.stg_pinterest_ads__campaign_history", "model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report", "model.pinterest.stg_pinterest_ads__targeting_geo", "model.pinterest.stg_pinterest_ads__targeting_geo_region"], "model.pinterest.pinterest_ads__keyword_report": ["model.pinterest.stg_pinterest_ads__ad_group_history", "model.pinterest.stg_pinterest_ads__advertiser_history", "model.pinterest.stg_pinterest_ads__campaign_history", "model.pinterest.stg_pinterest_ads__keyword_history", "model.pinterest.stg_pinterest_ads__keyword_report"], "model.pinterest.pinterest_ads__advertiser_report": ["model.pinterest.stg_pinterest_ads__advertiser_history", "model.pinterest.stg_pinterest_ads__advertiser_report"], "model.pinterest.pinterest_ads__url_report": ["model.pinterest.stg_pinterest_ads__ad_group_history", "model.pinterest.stg_pinterest_ads__advertiser_history", "model.pinterest.stg_pinterest_ads__campaign_history", "model.pinterest.stg_pinterest_ads__pin_promotion_history", "model.pinterest.stg_pinterest_ads__pin_promotion_report"], "model.pinterest.pinterest_ads__campaign_report": ["model.pinterest.stg_pinterest_ads__advertiser_history", "model.pinterest.stg_pinterest_ads__campaign_history", "model.pinterest.stg_pinterest_ads__campaign_report"], "model.pinterest.pinterest_ads__campaign_country_report": ["model.pinterest.stg_pinterest_ads__advertiser_history", "model.pinterest.stg_pinterest_ads__campaign_history", "model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report", "model.pinterest.stg_pinterest_ads__targeting_geo"], "model.pinterest.pinterest_ads__pin_promotion_report": ["model.pinterest.stg_pinterest_ads__ad_group_history", "model.pinterest.stg_pinterest_ads__advertiser_history", "model.pinterest.stg_pinterest_ads__campaign_history", "model.pinterest.stg_pinterest_ads__pin_promotion_history", "model.pinterest.stg_pinterest_ads__pin_promotion_report"], "model.pinterest.pinterest_ads__ad_group_report": ["model.pinterest.stg_pinterest_ads__ad_group_history", "model.pinterest.stg_pinterest_ads__ad_group_report", "model.pinterest.stg_pinterest_ads__advertiser_history", "model.pinterest.stg_pinterest_ads__campaign_history"], "model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report": ["model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report_tmp"], "model.pinterest.stg_pinterest_ads__pin_promotion_report": ["model.pinterest.stg_pinterest_ads__pin_promotion_report_tmp"], "model.pinterest.stg_pinterest_ads__ad_group_history": ["model.pinterest.stg_pinterest_ads__ad_group_history_tmp"], "model.pinterest.stg_pinterest_ads__targeting_geo_region": ["model.pinterest.stg_pinterest_ads__targeting_geo_region_tmp"], "model.pinterest.stg_pinterest_ads__campaign_report": ["model.pinterest.stg_pinterest_ads__campaign_report_tmp"], "model.pinterest.stg_pinterest_ads__advertiser_history": ["model.pinterest.stg_pinterest_ads__advertiser_history_tmp"], "model.pinterest.stg_pinterest_ads__campaign_history": ["model.pinterest.stg_pinterest_ads__campaign_history_tmp"], "model.pinterest.stg_pinterest_ads__keyword_history": ["model.pinterest.stg_pinterest_ads__keyword_history_tmp"], "model.pinterest.stg_pinterest_ads__advertiser_report": ["model.pinterest.stg_pinterest_ads__advertiser_report_tmp"], "model.pinterest.stg_pinterest_ads__pin_promotion_history": ["model.pinterest.stg_pinterest_ads__pin_promotion_history_tmp"], "model.pinterest.stg_pinterest_ads__targeting_geo": ["model.pinterest.stg_pinterest_ads__targeting_geo_tmp"], "model.pinterest.stg_pinterest_ads__keyword_report": ["model.pinterest.stg_pinterest_ads__keyword_report_tmp"], "model.pinterest.stg_pinterest_ads__ad_group_report": ["model.pinterest.stg_pinterest_ads__ad_group_report_tmp"], "model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report_tmp": ["source.pinterest.pinterest_ads.pin_promotion_targeting_report"], "model.pinterest.stg_pinterest_ads__ad_group_report_tmp": ["source.pinterest.pinterest_ads.ad_group_report"], "model.pinterest.stg_pinterest_ads__pin_promotion_history_tmp": ["source.pinterest.pinterest_ads.pin_promotion_history"], "model.pinterest.stg_pinterest_ads__campaign_report_tmp": ["source.pinterest.pinterest_ads.campaign_report"], "model.pinterest.stg_pinterest_ads__advertiser_history_tmp": ["source.pinterest.pinterest_ads.advertiser_history"], "model.pinterest.stg_pinterest_ads__keyword_history_tmp": ["source.pinterest.pinterest_ads.keyword_history"], "model.pinterest.stg_pinterest_ads__pin_promotion_report_tmp": ["source.pinterest.pinterest_ads.pin_promotion_report"], "model.pinterest.stg_pinterest_ads__advertiser_report_tmp": ["source.pinterest.pinterest_ads.advertiser_report"], "model.pinterest.stg_pinterest_ads__ad_group_history_tmp": ["source.pinterest.pinterest_ads.ad_group_history"], "model.pinterest.stg_pinterest_ads__targeting_geo_region_tmp": ["source.pinterest.pinterest_ads.targeting_geo_region"], "model.pinterest.stg_pinterest_ads__campaign_history_tmp": ["source.pinterest.pinterest_ads.campaign_history"], "model.pinterest.stg_pinterest_ads__targeting_geo_tmp": ["source.pinterest.pinterest_ads.targeting_geo"], "model.pinterest.stg_pinterest_ads__keyword_report_tmp": ["source.pinterest.pinterest_ads.keyword_report"], "model.google_ads.google_ads__search_term_report": ["model.google_ads.int_google_ads__campaigns_accounts", "model.google_ads.stg_google_ads__ad_group_history", "model.google_ads.stg_google_ads__search_term_keyword_stats"], "model.google_ads.google_ads__ad_report": ["model.google_ads.int_google_ads__campaigns_accounts", "model.google_ads.stg_google_ads__ad_group_history", "model.google_ads.stg_google_ads__ad_history", "model.google_ads.stg_google_ads__ad_stats"], "model.google_ads.google_ads__ad_group_report": ["model.google_ads.int_google_ads__campaigns_accounts", "model.google_ads.stg_google_ads__ad_group_history", "model.google_ads.stg_google_ads__ad_group_stats"], "model.google_ads.google_ads__account_report": ["model.google_ads.stg_google_ads__account_history", "model.google_ads.stg_google_ads__account_stats"], "model.google_ads.google_ads__campaign_bid_modifiers_report": ["model.google_ads.int_google_ads__campaigns_accounts", "model.google_ads.stg_google_ads__campaign_bid_modifier_history", "model.google_ads.stg_google_ads__campaign_bidding_strategy_history", "model.google_ads.stg_google_ads__campaign_criterion_history", "model.google_ads.stg_google_ads__campaign_stats"], "model.google_ads.google_ads__campaign_budget_diagnostics_report": ["model.google_ads.google_ads__campaign_report", "model.google_ads.stg_google_ads__campaign_bidding_strategy_history", "model.google_ads.stg_google_ads__campaign_budget_history", "model.google_ads.stg_google_ads__campaign_criterion_history"], "model.google_ads.google_ads__url_report": ["model.google_ads.int_google_ads__campaigns_accounts", "model.google_ads.stg_google_ads__ad_group_history", "model.google_ads.stg_google_ads__ad_history", "model.google_ads.stg_google_ads__ad_stats"], "model.google_ads.google_ads__campaign_report": ["model.google_ads.int_google_ads__campaigns_accounts", "model.google_ads.stg_google_ads__campaign_stats"], "model.google_ads.google_ads__keyword_report": ["model.google_ads.int_google_ads__campaigns_accounts", "model.google_ads.stg_google_ads__ad_group_criterion_history", "model.google_ads.stg_google_ads__ad_group_history", "model.google_ads.stg_google_ads__keyword_stats"], "model.google_ads.stg_google_ads__account_stats": ["model.google_ads.stg_google_ads__account_stats_tmp"], "model.google_ads.stg_google_ads__ad_group_stats": ["model.google_ads.stg_google_ads__ad_group_stats_tmp"], "model.google_ads.stg_google_ads__account_history": ["model.google_ads.stg_google_ads__account_history_tmp"], "model.google_ads.stg_google_ads__ad_group_history": ["model.google_ads.stg_google_ads__ad_group_history_tmp"], "model.google_ads.stg_google_ads__campaign_stats": ["model.google_ads.stg_google_ads__campaign_stats_tmp"], "model.google_ads.stg_google_ads__campaign_budget_history": ["model.google_ads.stg_google_ads__campaign_budget_history_tmp"], "model.google_ads.stg_google_ads__campaign_bid_modifier_history": ["model.google_ads.stg_google_ads__campaign_bid_modifier_history_tmp"], "model.google_ads.stg_google_ads__keyword_stats": ["model.google_ads.stg_google_ads__keyword_stats_tmp"], "model.google_ads.stg_google_ads__ad_stats": ["model.google_ads.stg_google_ads__ad_stats_tmp"], "model.google_ads.stg_google_ads__ad_history": ["model.google_ads.stg_google_ads__ad_history_tmp"], "model.google_ads.stg_google_ads__ad_group_criterion_history": ["model.google_ads.stg_google_ads__ad_group_criterion_history_tmp"], "model.google_ads.stg_google_ads__search_term_keyword_stats": ["model.google_ads.stg_google_ads__search_term_keyword_stats_tmp"], "model.google_ads.stg_google_ads__campaign_bidding_strategy_history": ["model.google_ads.stg_google_ads__campaign_bidding_strategy_history_tmp"], "model.google_ads.stg_google_ads__campaign_criterion_history": ["model.google_ads.stg_google_ads__campaign_criterion_history_tmp"], "model.google_ads.stg_google_ads__campaign_history": ["model.google_ads.stg_google_ads__campaign_history_tmp"], "model.google_ads.stg_google_ads__ad_group_criterion_history_tmp": ["source.google_ads.google_ads.ad_group_criterion_history"], "model.google_ads.stg_google_ads__campaign_budget_history_tmp": ["source.google_ads.google_ads.campaign_budget_history"], "model.google_ads.stg_google_ads__campaign_stats_tmp": ["source.google_ads.google_ads.campaign_stats"], "model.google_ads.stg_google_ads__campaign_history_tmp": ["source.google_ads.google_ads.campaign_history"], "model.google_ads.stg_google_ads__account_stats_tmp": ["source.google_ads.google_ads.account_stats"], "model.google_ads.stg_google_ads__campaign_bid_modifier_history_tmp": ["source.google_ads.google_ads.campaign_bid_modifier_history"], "model.google_ads.stg_google_ads__search_term_keyword_stats_tmp": ["source.google_ads.google_ads.search_term_keyword_stats"], "model.google_ads.stg_google_ads__ad_group_stats_tmp": ["source.google_ads.google_ads.ad_group_stats"], "model.google_ads.stg_google_ads__campaign_criterion_history_tmp": ["source.google_ads.google_ads.campaign_criterion_history"], "model.google_ads.stg_google_ads__keyword_stats_tmp": ["source.google_ads.google_ads.keyword_stats"], "model.google_ads.stg_google_ads__ad_history_tmp": ["source.google_ads.google_ads.ad_history"], "model.google_ads.stg_google_ads__campaign_bidding_strategy_history_tmp": ["source.google_ads.google_ads.campaign_bidding_strategy_history"], "model.google_ads.stg_google_ads__account_history_tmp": ["source.google_ads.google_ads.account_history"], "model.google_ads.stg_google_ads__ad_group_history_tmp": ["source.google_ads.google_ads.ad_group_history"], "model.google_ads.stg_google_ads__ad_stats_tmp": ["source.google_ads.google_ads.ad_stats"], "model.google_ads.int_google_ads__campaigns_accounts": ["model.google_ads.stg_google_ads__account_history", "model.google_ads.stg_google_ads__campaign_history"], "model.amazon_ads.amazon_ads__search_report": ["model.amazon_ads.int_amazon_ads__portfolio_history", "model.amazon_ads.stg_amazon_ads__ad_group_history", "model.amazon_ads.stg_amazon_ads__campaign_history", "model.amazon_ads.stg_amazon_ads__keyword_history", "model.amazon_ads.stg_amazon_ads__profile", "model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report"], "model.amazon_ads.amazon_ads__campaign_report": ["model.amazon_ads.int_amazon_ads__portfolio_history", "model.amazon_ads.stg_amazon_ads__campaign_history", "model.amazon_ads.stg_amazon_ads__campaign_level_report", "model.amazon_ads.stg_amazon_ads__profile"], "model.amazon_ads.amazon_ads__account_report": ["model.amazon_ads.stg_amazon_ads__campaign_history", "model.amazon_ads.stg_amazon_ads__campaign_level_report", "model.amazon_ads.stg_amazon_ads__profile"], "model.amazon_ads.amazon_ads__portfolio_report": ["model.amazon_ads.stg_amazon_ads__campaign_history", "model.amazon_ads.stg_amazon_ads__campaign_level_report", "model.amazon_ads.stg_amazon_ads__portfolio_history", "model.amazon_ads.stg_amazon_ads__profile"], "model.amazon_ads.amazon_ads__keyword_report": ["model.amazon_ads.int_amazon_ads__portfolio_history", "model.amazon_ads.stg_amazon_ads__ad_group_history", "model.amazon_ads.stg_amazon_ads__campaign_history", "model.amazon_ads.stg_amazon_ads__keyword_history", "model.amazon_ads.stg_amazon_ads__profile", "model.amazon_ads.stg_amazon_ads__targeting_keyword_report"], "model.amazon_ads.amazon_ads__ad_report": ["model.amazon_ads.int_amazon_ads__portfolio_history", "model.amazon_ads.stg_amazon_ads__ad_group_history", "model.amazon_ads.stg_amazon_ads__advertised_product_report", "model.amazon_ads.stg_amazon_ads__campaign_history", "model.amazon_ads.stg_amazon_ads__product_ad_history", "model.amazon_ads.stg_amazon_ads__profile"], "model.amazon_ads.amazon_ads__ad_group_report": ["model.amazon_ads.int_amazon_ads__portfolio_history", "model.amazon_ads.stg_amazon_ads__ad_group_history", "model.amazon_ads.stg_amazon_ads__ad_group_level_report", "model.amazon_ads.stg_amazon_ads__campaign_history", "model.amazon_ads.stg_amazon_ads__profile"], "model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report": ["model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report_tmp"], "model.amazon_ads.stg_amazon_ads__ad_group_history": ["model.amazon_ads.stg_amazon_ads__ad_group_history_tmp"], "model.amazon_ads.stg_amazon_ads__portfolio_history": ["model.amazon_ads.stg_amazon_ads__portfolio_history_tmp"], "model.amazon_ads.stg_amazon_ads__campaign_history": ["model.amazon_ads.stg_amazon_ads__campaign_history_tmp"], "model.amazon_ads.stg_amazon_ads__ad_group_level_report": ["model.amazon_ads.stg_amazon_ads__ad_group_level_report_tmp"], "model.amazon_ads.stg_amazon_ads__targeting_keyword_report": ["model.amazon_ads.stg_amazon_ads__targeting_keyword_report_tmp"], "model.amazon_ads.stg_amazon_ads__advertised_product_report": ["model.amazon_ads.stg_amazon_ads__advertised_product_report_tmp"], "model.amazon_ads.stg_amazon_ads__keyword_history": ["model.amazon_ads.stg_amazon_ads__keyword_history_tmp"], "model.amazon_ads.stg_amazon_ads__campaign_level_report": ["model.amazon_ads.stg_amazon_ads__campaign_level_report_tmp"], "model.amazon_ads.stg_amazon_ads__profile": ["model.amazon_ads.stg_amazon_ads__profile_tmp"], "model.amazon_ads.stg_amazon_ads__product_ad_history": ["model.amazon_ads.stg_amazon_ads__product_ad_history_tmp"], "model.amazon_ads.stg_amazon_ads__keyword_history_tmp": ["source.amazon_ads.amazon_ads.keyword_history"], "model.amazon_ads.stg_amazon_ads__campaign_history_tmp": ["source.amazon_ads.amazon_ads.campaign_history"], "model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report_tmp": ["source.amazon_ads.amazon_ads.search_term_ad_keyword_report"], "model.amazon_ads.stg_amazon_ads__campaign_level_report_tmp": ["source.amazon_ads.amazon_ads.campaign_level_report"], "model.amazon_ads.stg_amazon_ads__profile_tmp": ["source.amazon_ads.amazon_ads.profile"], "model.amazon_ads.stg_amazon_ads__ad_group_history_tmp": ["source.amazon_ads.amazon_ads.ad_group_history"], "model.amazon_ads.stg_amazon_ads__targeting_keyword_report_tmp": ["source.amazon_ads.amazon_ads.targeting_keyword_report"], "model.amazon_ads.stg_amazon_ads__advertised_product_report_tmp": ["source.amazon_ads.amazon_ads.advertised_product_report"], "model.amazon_ads.stg_amazon_ads__ad_group_level_report_tmp": ["source.amazon_ads.amazon_ads.ad_group_level_report"], "model.amazon_ads.stg_amazon_ads__portfolio_history_tmp": ["source.amazon_ads.amazon_ads.portfolio_history"], "model.amazon_ads.stg_amazon_ads__product_ad_history_tmp": ["source.amazon_ads.amazon_ads.product_ad_history"], "model.amazon_ads.int_amazon_ads__portfolio_history": ["model.amazon_ads.stg_amazon_ads__portfolio_history"], "model.twitter_ads.twitter_ads__promoted_tweet_report": ["model.twitter_ads.stg_twitter_ads__account_history", "model.twitter_ads.stg_twitter_ads__campaign_history", "model.twitter_ads.stg_twitter_ads__line_item_history", "model.twitter_ads.stg_twitter_ads__promoted_tweet_history", "model.twitter_ads.stg_twitter_ads__promoted_tweet_report", "model.twitter_ads.stg_twitter_ads__tweet"], "model.twitter_ads.twitter_ads__campaign_region_report": ["model.twitter_ads.stg_twitter_ads__account_history", "model.twitter_ads.stg_twitter_ads__campaign_history", "model.twitter_ads.stg_twitter_ads__campaign_regions_report"], "model.twitter_ads.twitter_ads__account_report": ["model.twitter_ads.stg_twitter_ads__account_history", "model.twitter_ads.stg_twitter_ads__promoted_tweet_report"], "model.twitter_ads.twitter_ads__campaign_country_report": ["model.twitter_ads.stg_twitter_ads__account_history", "model.twitter_ads.stg_twitter_ads__campaign_history", "model.twitter_ads.stg_twitter_ads__campaign_locations_report"], "model.twitter_ads.twitter_ads__url_report": ["model.twitter_ads.stg_twitter_ads__account_history", "model.twitter_ads.stg_twitter_ads__campaign_history", "model.twitter_ads.stg_twitter_ads__line_item_history", "model.twitter_ads.stg_twitter_ads__promoted_tweet_history", "model.twitter_ads.stg_twitter_ads__promoted_tweet_report", "model.twitter_ads.stg_twitter_ads__tweet", "model.twitter_ads.stg_twitter_ads__tweet_url"], "model.twitter_ads.twitter_ads__line_item_report": ["model.twitter_ads.stg_twitter_ads__account_history", "model.twitter_ads.stg_twitter_ads__campaign_history", "model.twitter_ads.stg_twitter_ads__line_item_history", "model.twitter_ads.stg_twitter_ads__line_item_report"], "model.twitter_ads.twitter_ads__keyword_report": ["model.twitter_ads.stg_twitter_ads__account_history", "model.twitter_ads.stg_twitter_ads__campaign_history", "model.twitter_ads.stg_twitter_ads__line_item_history", "model.twitter_ads.stg_twitter_ads__line_item_keywords_report"], "model.twitter_ads.twitter_ads__campaign_report": ["model.twitter_ads.stg_twitter_ads__account_history", "model.twitter_ads.stg_twitter_ads__campaign_history", "model.twitter_ads.stg_twitter_ads__campaign_report"], "model.twitter_ads.stg_twitter_ads__tweet": ["model.twitter_ads.stg_twitter_ads__tweet_tmp"], "model.twitter_ads.stg_twitter_ads__campaign_locations_report": ["model.twitter_ads.stg_twitter_ads__campaign_locations_report_tmp"], "model.twitter_ads.stg_twitter_ads__campaign_history": ["model.twitter_ads.stg_twitter_ads__campaign_history_tmp"], "model.twitter_ads.stg_twitter_ads__promoted_tweet_history": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_history_tmp"], "model.twitter_ads.stg_twitter_ads__tweet_url": ["model.twitter_ads.stg_twitter_ads__tweet_url_tmp"], "model.twitter_ads.stg_twitter_ads__campaign_regions_report": ["model.twitter_ads.stg_twitter_ads__campaign_regions_report_tmp"], "model.twitter_ads.stg_twitter_ads__line_item_keywords_report": ["model.twitter_ads.stg_twitter_ads__line_item_keywords_report_tmp"], "model.twitter_ads.stg_twitter_ads__line_item_report": ["model.twitter_ads.stg_twitter_ads__line_item_report_tmp"], "model.twitter_ads.stg_twitter_ads__line_item_history": ["model.twitter_ads.stg_twitter_ads__line_item_history_tmp"], "model.twitter_ads.stg_twitter_ads__account_history": ["model.twitter_ads.stg_twitter_ads__account_history_tmp"], "model.twitter_ads.stg_twitter_ads__promoted_tweet_report": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_report_tmp"], "model.twitter_ads.stg_twitter_ads__campaign_report": ["model.twitter_ads.stg_twitter_ads__campaign_report_tmp"], "model.twitter_ads.stg_twitter_ads__campaign_report_tmp": ["source.twitter_ads.twitter_ads.campaign_report"], "model.twitter_ads.stg_twitter_ads__campaign_regions_report_tmp": ["source.twitter_ads.twitter_ads.campaign_regions_report"], "model.twitter_ads.stg_twitter_ads__campaign_history_tmp": ["source.twitter_ads.twitter_ads.campaign_history"], "model.twitter_ads.stg_twitter_ads__line_item_history_tmp": ["source.twitter_ads.twitter_ads.line_item_history"], "model.twitter_ads.stg_twitter_ads__promoted_tweet_report_tmp": ["source.twitter_ads.twitter_ads.promoted_tweet_report"], "model.twitter_ads.stg_twitter_ads__campaign_locations_report_tmp": ["source.twitter_ads.twitter_ads.campaign_locations_report"], "model.twitter_ads.stg_twitter_ads__line_item_report_tmp": ["source.twitter_ads.twitter_ads.line_item_report"], "model.twitter_ads.stg_twitter_ads__account_history_tmp": ["source.twitter_ads.twitter_ads.account_history"], "model.twitter_ads.stg_twitter_ads__promoted_tweet_history_tmp": ["source.twitter_ads.twitter_ads.promoted_tweet_history"], "model.twitter_ads.stg_twitter_ads__line_item_keywords_report_tmp": ["source.twitter_ads.twitter_ads.line_item_keywords_report"], "model.twitter_ads.stg_twitter_ads__tweet_url_tmp": ["source.twitter_ads.twitter_ads.tweet_url"], "model.twitter_ads.stg_twitter_ads__tweet_tmp": ["source.twitter_ads.twitter_ads.tweet"], "model.ad_reporting.ad_reporting__keyword_report": ["model.ad_reporting.int_ad_reporting__keyword_report"], "model.ad_reporting.ad_reporting__campaign_report": ["model.ad_reporting.int_ad_reporting__campaign_report"], "model.ad_reporting.ad_reporting__monthly_campaign_country_report": ["model.ad_reporting.int_ad_reporting__country_mapping", "model.ad_reporting.int_ad_reporting__monthly_campaign_country_report"], "model.ad_reporting.ad_reporting__monthly_campaign_region_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_region_report"], "model.ad_reporting.ad_reporting__url_report": ["model.ad_reporting.int_ad_reporting__url_report"], "model.ad_reporting.ad_reporting__ad_report": ["model.ad_reporting.int_ad_reporting__ad_report"], "model.ad_reporting.ad_reporting__account_report": ["model.ad_reporting.int_ad_reporting__account_report"], "model.ad_reporting.ad_reporting__ad_group_report": ["model.ad_reporting.int_ad_reporting__ad_group_report"], "model.ad_reporting.ad_reporting__search_report": ["model.ad_reporting.int_ad_reporting__search_report"], "model.ad_reporting.int_ad_reporting__url_report": ["model.facebook_ads.facebook_ads__url_report", "model.google_ads.google_ads__url_report", "model.linkedin.linkedin_ads__url_report", "model.microsoft_ads.microsoft_ads__url_report", "model.pinterest.pinterest_ads__url_report", "model.reddit_ads.reddit_ads__url_report", "model.snapchat_ads.snapchat_ads__url_report", "model.tiktok_ads.tiktok_ads__url_report", "model.twitter_ads.twitter_ads__url_report"], "model.ad_reporting.int_ad_reporting__campaign_report": ["model.amazon_ads.amazon_ads__campaign_report", "model.apple_search_ads.apple_search_ads__campaign_report", "model.facebook_ads.facebook_ads__campaign_report", "model.google_ads.google_ads__campaign_report", "model.linkedin.linkedin_ads__campaign_group_report", "model.microsoft_ads.microsoft_ads__campaign_report", "model.pinterest.pinterest_ads__campaign_report", "model.reddit_ads.reddit_ads__campaign_report", "model.snapchat_ads.snapchat_ads__campaign_report", "model.tiktok_ads.tiktok_ads__campaign_report", "model.twitter_ads.twitter_ads__campaign_report"], "model.ad_reporting.int_ad_reporting__monthly_campaign_country_report": ["model.facebook_ads.facebook_ads__country_report", "model.linkedin.linkedin_ads__monthly_campaign_country_report", "model.microsoft_ads.microsoft_ads__campaign_country_report", "model.pinterest.pinterest_ads__campaign_country_report", "model.reddit_ads.reddit_ads__campaign_country_report", "model.snapchat_ads.snapchat_ads__campaign_country_report", "model.tiktok_ads.tiktok_ads__campaign_country_report", "model.twitter_ads.twitter_ads__campaign_country_report"], "model.ad_reporting.int_ad_reporting__ad_report": ["model.amazon_ads.amazon_ads__ad_report", "model.apple_search_ads.apple_search_ads__ad_report", "model.facebook_ads.facebook_ads__ad_report", "model.google_ads.google_ads__ad_report", "model.linkedin.linkedin_ads__creative_report", "model.microsoft_ads.microsoft_ads__ad_report", "model.pinterest.pinterest_ads__pin_promotion_report", "model.reddit_ads.reddit_ads__ad_report", "model.snapchat_ads.snapchat_ads__ad_report", "model.tiktok_ads.tiktok_ads__ad_report", "model.twitter_ads.twitter_ads__promoted_tweet_report"], "model.ad_reporting.int_ad_reporting__search_report": ["model.amazon_ads.amazon_ads__search_report", "model.apple_search_ads.apple_search_ads__search_term_report", "model.google_ads.google_ads__search_term_report", "model.microsoft_ads.microsoft_ads__search_report"], "model.ad_reporting.int_ad_reporting__keyword_report": ["model.amazon_ads.amazon_ads__keyword_report", "model.apple_search_ads.apple_search_ads__keyword_report", "model.google_ads.google_ads__keyword_report", "model.microsoft_ads.microsoft_ads__keyword_report", "model.pinterest.pinterest_ads__keyword_report", "model.twitter_ads.twitter_ads__keyword_report"], "model.ad_reporting.int_ad_reporting__ad_group_report": ["model.amazon_ads.amazon_ads__ad_group_report", "model.apple_search_ads.apple_search_ads__ad_group_report", "model.facebook_ads.facebook_ads__ad_set_report", "model.google_ads.google_ads__ad_group_report", "model.linkedin.linkedin_ads__campaign_report", "model.microsoft_ads.microsoft_ads__ad_group_report", "model.pinterest.pinterest_ads__ad_group_report", "model.reddit_ads.reddit_ads__ad_group_report", "model.snapchat_ads.snapchat_ads__ad_squad_report", "model.tiktok_ads.tiktok_ads__ad_group_report", "model.twitter_ads.twitter_ads__line_item_report"], "model.ad_reporting.int_ad_reporting__account_report": ["model.amazon_ads.amazon_ads__account_report", "model.apple_search_ads.apple_search_ads__organization_report", "model.facebook_ads.facebook_ads__account_report", "model.google_ads.google_ads__account_report", "model.linkedin.linkedin_ads__account_report", "model.microsoft_ads.microsoft_ads__account_report", "model.pinterest.pinterest_ads__advertiser_report", "model.reddit_ads.reddit_ads__account_report", "model.snapchat_ads.snapchat_ads__account_report", "model.tiktok_ads.tiktok_ads__advertiser_report", "model.twitter_ads.twitter_ads__account_report"], "model.ad_reporting.int_ad_reporting__monthly_campaign_region_report": ["model.facebook_ads.facebook_ads__region_report", "model.linkedin.linkedin_ads__monthly_campaign_region_report", "model.microsoft_ads.microsoft_ads__campaign_region_report", "model.pinterest.pinterest_ads__campaign_region_report", "model.snapchat_ads.snapchat_ads__campaign_region_report", "model.twitter_ads.twitter_ads__campaign_region_report"], "model.ad_reporting.int_ad_reporting__country_mapping": [], "model.ad_reporting.metricflow_time_spine": [], "model.tiktok_ads.tiktok_ads__url_report": ["model.tiktok_ads.stg_tiktok_ads__ad_group_history", "model.tiktok_ads.stg_tiktok_ads__ad_history", "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly", "model.tiktok_ads.stg_tiktok_ads__advertiser", "model.tiktok_ads.stg_tiktok_ads__campaign_history"], "model.tiktok_ads.tiktok_ads__advertiser_report": ["model.tiktok_ads.stg_tiktok_ads__ad_history", "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly", "model.tiktok_ads.stg_tiktok_ads__advertiser"], "model.tiktok_ads.tiktok_ads__ad_report": ["model.tiktok_ads.stg_tiktok_ads__ad_group_history", "model.tiktok_ads.stg_tiktok_ads__ad_history", "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly", "model.tiktok_ads.stg_tiktok_ads__advertiser", "model.tiktok_ads.stg_tiktok_ads__campaign_history"], "model.tiktok_ads.tiktok_ads__ad_group_report": ["model.tiktok_ads.stg_tiktok_ads__ad_group_history", "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly", "model.tiktok_ads.stg_tiktok_ads__advertiser", "model.tiktok_ads.stg_tiktok_ads__campaign_history"], "model.tiktok_ads.tiktok_ads__campaign_country_report": ["model.tiktok_ads.stg_tiktok_ads__advertiser", "model.tiktok_ads.stg_tiktok_ads__campaign_country_report", "model.tiktok_ads.stg_tiktok_ads__campaign_history", "model.tiktok_ads.stg_tiktok_ads__location"], "model.tiktok_ads.tiktok_ads__campaign_report": ["model.tiktok_ads.stg_tiktok_ads__advertiser", "model.tiktok_ads.stg_tiktok_ads__campaign_history", "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly"], "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly": ["model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly_tmp"], "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly": ["model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly_tmp"], "model.tiktok_ads.stg_tiktok_ads__campaign_history": ["model.tiktok_ads.stg_tiktok_ads__campaign_history_tmp"], "model.tiktok_ads.stg_tiktok_ads__ad_group_history": ["model.tiktok_ads.stg_tiktok_ads__ad_group_history_tmp"], "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly": ["model.tiktok_ads.stg_tiktok_ads__ad_report_hourly_tmp"], "model.tiktok_ads.stg_tiktok_ads__location": ["model.tiktok_ads.stg_tiktok_ads__location_tmp"], "model.tiktok_ads.stg_tiktok_ads__ad_history": ["model.tiktok_ads.stg_tiktok_ads__ad_history_tmp"], "model.tiktok_ads.stg_tiktok_ads__advertiser": ["model.tiktok_ads.stg_tiktok_ads__advertiser_tmp"], "model.tiktok_ads.stg_tiktok_ads__campaign_country_report": ["model.tiktok_ads.stg_tiktok_ads__campaign_country_report_tmp"], "model.tiktok_ads.stg_tiktok_ads__campaign_country_report_tmp": ["source.tiktok_ads.tiktok_ads.campaign_country_report"], "model.tiktok_ads.stg_tiktok_ads__ad_history_tmp": ["source.tiktok_ads.tiktok_ads.ad_history"], "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly_tmp": ["source.tiktok_ads.tiktok_ads.ad_report_hourly"], "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly_tmp": ["source.tiktok_ads.tiktok_ads.campaign_report_hourly"], "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly_tmp": ["source.tiktok_ads.tiktok_ads.adgroup_report_hourly"], "model.tiktok_ads.stg_tiktok_ads__ad_group_history_tmp": ["source.tiktok_ads.tiktok_ads.adgroup_history"], "model.tiktok_ads.stg_tiktok_ads__campaign_history_tmp": ["source.tiktok_ads.tiktok_ads.campaign_history"], "model.tiktok_ads.stg_tiktok_ads__advertiser_tmp": ["source.tiktok_ads.tiktok_ads.advertiser"], "model.tiktok_ads.stg_tiktok_ads__location_tmp": ["source.tiktok_ads.tiktok_ads.location"], "model.microsoft_ads.microsoft_ads__keyword_report": ["model.microsoft_ads.stg_microsoft_ads__account_history", "model.microsoft_ads.stg_microsoft_ads__ad_group_history", "model.microsoft_ads.stg_microsoft_ads__ad_history", "model.microsoft_ads.stg_microsoft_ads__campaign_history", "model.microsoft_ads.stg_microsoft_ads__keyword_daily_report", "model.microsoft_ads.stg_microsoft_ads__keyword_history"], "model.microsoft_ads.microsoft_ads__url_report": ["model.microsoft_ads.stg_microsoft_ads__account_history", "model.microsoft_ads.stg_microsoft_ads__ad_daily_report", "model.microsoft_ads.stg_microsoft_ads__ad_group_history", "model.microsoft_ads.stg_microsoft_ads__ad_history", "model.microsoft_ads.stg_microsoft_ads__campaign_history"], "model.microsoft_ads.microsoft_ads__account_report": ["model.microsoft_ads.stg_microsoft_ads__account_daily_report", "model.microsoft_ads.stg_microsoft_ads__account_history"], "model.microsoft_ads.microsoft_ads__campaign_country_report": ["model.microsoft_ads.stg_microsoft_ads__account_history", "model.microsoft_ads.stg_microsoft_ads__campaign_history", "model.microsoft_ads.stg_microsoft_ads__geographic_daily_report"], "model.microsoft_ads.microsoft_ads__campaign_region_report": ["model.microsoft_ads.stg_microsoft_ads__account_history", "model.microsoft_ads.stg_microsoft_ads__campaign_history", "model.microsoft_ads.stg_microsoft_ads__geographic_daily_report"], "model.microsoft_ads.microsoft_ads__ad_group_report": ["model.microsoft_ads.stg_microsoft_ads__account_history", "model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report", "model.microsoft_ads.stg_microsoft_ads__ad_group_history", "model.microsoft_ads.stg_microsoft_ads__campaign_history"], "model.microsoft_ads.microsoft_ads__ad_report": ["model.microsoft_ads.stg_microsoft_ads__account_history", "model.microsoft_ads.stg_microsoft_ads__ad_daily_report", "model.microsoft_ads.stg_microsoft_ads__ad_group_history", "model.microsoft_ads.stg_microsoft_ads__ad_history", "model.microsoft_ads.stg_microsoft_ads__campaign_history"], "model.microsoft_ads.microsoft_ads__search_report": ["model.microsoft_ads.stg_microsoft_ads__account_history", "model.microsoft_ads.stg_microsoft_ads__ad_group_history", "model.microsoft_ads.stg_microsoft_ads__ad_history", "model.microsoft_ads.stg_microsoft_ads__campaign_history", "model.microsoft_ads.stg_microsoft_ads__keyword_history", "model.microsoft_ads.stg_microsoft_ads__search_daily_report"], "model.microsoft_ads.microsoft_ads__campaign_report": ["model.microsoft_ads.stg_microsoft_ads__account_history", "model.microsoft_ads.stg_microsoft_ads__campaign_daily_report", "model.microsoft_ads.stg_microsoft_ads__campaign_history"], "model.microsoft_ads.stg_microsoft_ads__account_history": ["model.microsoft_ads.stg_microsoft_ads__account_history_tmp"], "model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report": ["model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report_tmp"], "model.microsoft_ads.stg_microsoft_ads__campaign_history": ["model.microsoft_ads.stg_microsoft_ads__campaign_history_tmp"], "model.microsoft_ads.stg_microsoft_ads__campaign_daily_report": ["model.microsoft_ads.stg_microsoft_ads__campaign_daily_report_tmp"], "model.microsoft_ads.stg_microsoft_ads__ad_history": ["model.microsoft_ads.stg_microsoft_ads__ad_history_tmp"], "model.microsoft_ads.stg_microsoft_ads__geographic_daily_report": ["model.microsoft_ads.stg_microsoft_ads__geographic_daily_report_tmp"], "model.microsoft_ads.stg_microsoft_ads__ad_group_history": ["model.microsoft_ads.stg_microsoft_ads__ad_group_history_tmp"], "model.microsoft_ads.stg_microsoft_ads__keyword_history": ["model.microsoft_ads.stg_microsoft_ads__keyword_history_tmp"], "model.microsoft_ads.stg_microsoft_ads__search_daily_report": ["model.microsoft_ads.stg_microsoft_ads__search_daily_report_tmp"], "model.microsoft_ads.stg_microsoft_ads__account_daily_report": ["model.microsoft_ads.stg_microsoft_ads__account_daily_report_tmp"], "model.microsoft_ads.stg_microsoft_ads__keyword_daily_report": ["model.microsoft_ads.stg_microsoft_ads__keyword_daily_report_tmp"], "model.microsoft_ads.stg_microsoft_ads__ad_daily_report": ["model.microsoft_ads.stg_microsoft_ads__ad_daily_report_tmp"], "model.microsoft_ads.stg_microsoft_ads__campaign_daily_report_tmp": ["source.microsoft_ads.microsoft_ads.campaign_performance_daily_report"], "model.microsoft_ads.stg_microsoft_ads__ad_group_history_tmp": ["source.microsoft_ads.microsoft_ads.ad_group_history"], "model.microsoft_ads.stg_microsoft_ads__account_daily_report_tmp": ["source.microsoft_ads.microsoft_ads.account_performance_daily_report"], "model.microsoft_ads.stg_microsoft_ads__search_daily_report_tmp": ["source.microsoft_ads.microsoft_ads.search_query_performance_daily_report"], "model.microsoft_ads.stg_microsoft_ads__account_history_tmp": ["source.microsoft_ads.microsoft_ads.account_history"], "model.microsoft_ads.stg_microsoft_ads__ad_history_tmp": ["source.microsoft_ads.microsoft_ads.ad_history"], "model.microsoft_ads.stg_microsoft_ads__geographic_daily_report_tmp": ["source.microsoft_ads.microsoft_ads.geographic_performance_daily_report"], "model.microsoft_ads.stg_microsoft_ads__keyword_history_tmp": ["source.microsoft_ads.microsoft_ads.keyword_history"], "model.microsoft_ads.stg_microsoft_ads__keyword_daily_report_tmp": ["source.microsoft_ads.microsoft_ads.keyword_performance_daily_report"], "model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report_tmp": ["source.microsoft_ads.microsoft_ads.ad_group_performance_daily_report"], "model.microsoft_ads.stg_microsoft_ads__campaign_history_tmp": ["source.microsoft_ads.microsoft_ads.campaign_history"], "model.microsoft_ads.stg_microsoft_ads__ad_daily_report_tmp": ["source.microsoft_ads.microsoft_ads.ad_performance_daily_report"], "model.facebook_ads.facebook_ads__region_report": ["model.facebook_ads.stg_facebook_ads__account_history", "model.facebook_ads.stg_facebook_ads__demographics_region", "model.facebook_ads.stg_facebook_ads__demographics_region_actions"], "model.facebook_ads.facebook_ads__country_report": ["model.facebook_ads.stg_facebook_ads__account_history", "model.facebook_ads.stg_facebook_ads__demographics_country", "model.facebook_ads.stg_facebook_ads__demographics_country_actions"], "model.facebook_ads.facebook_ads__url_tags": ["model.facebook_ads.stg_facebook_ads__creative_history"], "model.facebook_ads.facebook_ads__ad_report": ["model.facebook_ads.int_facebook_ads__conversions", "model.facebook_ads.stg_facebook_ads__account_history", "model.facebook_ads.stg_facebook_ads__ad_history", "model.facebook_ads.stg_facebook_ads__ad_set_history", "model.facebook_ads.stg_facebook_ads__basic_ad", "model.facebook_ads.stg_facebook_ads__campaign_history"], "model.facebook_ads.facebook_ads__account_report": ["model.facebook_ads.int_facebook_ads__conversions", "model.facebook_ads.stg_facebook_ads__account_history", "model.facebook_ads.stg_facebook_ads__basic_ad"], "model.facebook_ads.facebook_ads__campaign_report": ["model.facebook_ads.int_facebook_ads__conversions", "model.facebook_ads.stg_facebook_ads__account_history", "model.facebook_ads.stg_facebook_ads__ad_history", "model.facebook_ads.stg_facebook_ads__basic_ad", "model.facebook_ads.stg_facebook_ads__campaign_history"], "model.facebook_ads.facebook_ads__ad_set_report": ["model.facebook_ads.int_facebook_ads__conversions", "model.facebook_ads.stg_facebook_ads__account_history", "model.facebook_ads.stg_facebook_ads__ad_history", "model.facebook_ads.stg_facebook_ads__ad_set_history", "model.facebook_ads.stg_facebook_ads__basic_ad", "model.facebook_ads.stg_facebook_ads__campaign_history"], "model.facebook_ads.facebook_ads__url_report": ["model.facebook_ads.int_facebook_ads__conversions", "model.facebook_ads.int_facebook_ads__creative_history", "model.facebook_ads.stg_facebook_ads__account_history", "model.facebook_ads.stg_facebook_ads__ad_history", "model.facebook_ads.stg_facebook_ads__ad_set_history", "model.facebook_ads.stg_facebook_ads__basic_ad", "model.facebook_ads.stg_facebook_ads__campaign_history"], "model.facebook_ads.stg_facebook_ads__demographics_region": ["model.facebook_ads.stg_facebook_ads__demographics_region_tmp"], "model.facebook_ads.stg_facebook_ads__basic_ad_action_values": ["model.facebook_ads.stg_facebook_ads__basic_ad_action_values_tmp"], "model.facebook_ads.stg_facebook_ads__basic_ad": ["model.facebook_ads.stg_facebook_ads__basic_ad_tmp"], "model.facebook_ads.stg_facebook_ads__campaign_history": ["model.facebook_ads.stg_facebook_ads__campaign_history_tmp"], "model.facebook_ads.stg_facebook_ads__demographics_region_actions": ["model.facebook_ads.stg_facebook_ads__demographics_region_actions_tmp"], "model.facebook_ads.stg_facebook_ads__ad_set_history": ["model.facebook_ads.stg_facebook_ads__ad_set_history_tmp"], "model.facebook_ads.stg_facebook_ads__account_history": ["model.facebook_ads.stg_facebook_ads__account_history_tmp"], "model.facebook_ads.stg_facebook_ads__creative_history": ["model.facebook_ads.stg_facebook_ads__creative_history_tmp"], "model.facebook_ads.stg_facebook_ads__basic_ad_actions": ["model.facebook_ads.stg_facebook_ads__basic_ad_actions_tmp"], "model.facebook_ads.stg_facebook_ads__demographics_country_actions": ["model.facebook_ads.stg_facebook_ads__demographics_country_actions_tmp"], "model.facebook_ads.stg_facebook_ads__demographics_country": ["model.facebook_ads.stg_facebook_ads__demographics_country_tmp"], "model.facebook_ads.stg_facebook_ads__ad_history": ["model.facebook_ads.stg_facebook_ads__ad_history_tmp"], "model.facebook_ads.stg_facebook_ads__ad_history_tmp": ["source.facebook_ads.facebook_ads.ad_history"], "model.facebook_ads.stg_facebook_ads__campaign_history_tmp": ["source.facebook_ads.facebook_ads.campaign_history"], "model.facebook_ads.stg_facebook_ads__demographics_country_actions_tmp": ["source.facebook_ads.facebook_ads.demographics_country_actions"], "model.facebook_ads.stg_facebook_ads__demographics_region_actions_tmp": ["source.facebook_ads.facebook_ads.demographics_region_actions"], "model.facebook_ads.stg_facebook_ads__basic_ad_actions_tmp": ["source.facebook_ads.facebook_ads.basic_ad_actions"], "model.facebook_ads.stg_facebook_ads__basic_ad_action_values_tmp": ["source.facebook_ads.facebook_ads.basic_ad_action_values"], "model.facebook_ads.stg_facebook_ads__ad_set_history_tmp": ["source.facebook_ads.facebook_ads.ad_set_history"], "model.facebook_ads.stg_facebook_ads__demographics_region_tmp": ["source.facebook_ads.facebook_ads.demographics_region"], "model.facebook_ads.stg_facebook_ads__creative_history_tmp": ["source.facebook_ads.facebook_ads.creative_history"], "model.facebook_ads.stg_facebook_ads__basic_ad_tmp": ["source.facebook_ads.facebook_ads.basic_ad"], "model.facebook_ads.stg_facebook_ads__account_history_tmp": ["source.facebook_ads.facebook_ads.account_history"], "model.facebook_ads.stg_facebook_ads__demographics_country_tmp": ["source.facebook_ads.facebook_ads.demographics_country"], "model.facebook_ads.int_facebook_ads__creative_history": ["model.facebook_ads.facebook_ads__url_tags", "model.facebook_ads.stg_facebook_ads__creative_history"], "model.facebook_ads.int_facebook_ads__conversions": ["model.facebook_ads.stg_facebook_ads__basic_ad_action_values", "model.facebook_ads.stg_facebook_ads__basic_ad_actions"], "test.linkedin.not_null_linkedin_ads__account_report_account_id.0c34ea1842": ["model.linkedin.linkedin_ads__account_report"], "test.linkedin.not_null_linkedin_ads__account_report_date_day.c4b33f8f53": ["model.linkedin.linkedin_ads__account_report"], "test.linkedin.not_null_linkedin_ads__campaign_report_date_day.8d320b88b1": ["model.linkedin.linkedin_ads__campaign_report"], "test.linkedin.not_null_linkedin_ads__campaign_report_campaign_id.bf43964b15": ["model.linkedin.linkedin_ads__campaign_report"], "test.linkedin.not_null_linkedin_ads__campaign_group_report_date_day.2676a1f76b": ["model.linkedin.linkedin_ads__campaign_group_report"], "test.linkedin.not_null_linkedin_ads__campaign_group_report_campaign_group_id.39b448cdaf": ["model.linkedin.linkedin_ads__campaign_group_report"], "test.linkedin.not_null_linkedin_ads__creative_report_date_day.0c6338b020": ["model.linkedin.linkedin_ads__creative_report"], "test.linkedin.not_null_linkedin_ads__creative_report_creative_id.096d93f889": ["model.linkedin.linkedin_ads__creative_report"], "test.linkedin.not_null_linkedin_ads__url_report_date_day.48b540f315": ["model.linkedin.linkedin_ads__url_report"], "test.linkedin.not_null_linkedin_ads__url_report_creative_id.83967fe9d2": ["model.linkedin.linkedin_ads__url_report"], "test.linkedin.not_null_linkedin_ads__url_report_click_uri.81534087cb": ["model.linkedin.linkedin_ads__url_report"], "test.linkedin.not_null_linkedin_ads__monthly_campaign_country_report_date_month.ab0a8d3050": ["model.linkedin.linkedin_ads__monthly_campaign_country_report"], "test.linkedin.not_null_linkedin_ads__monthly_campaign_country_report_campaign_id.4624641c1c": ["model.linkedin.linkedin_ads__monthly_campaign_country_report"], "test.linkedin.not_null_linkedin_ads__monthly_campaign_region_report_date_month.4fd809085e": ["model.linkedin.linkedin_ads__monthly_campaign_region_report"], "test.linkedin.not_null_linkedin_ads__monthly_campaign_region_report_campaign_id.5884bc5d68": ["model.linkedin.linkedin_ads__monthly_campaign_region_report"], "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_creative_creative_id.062abfe14b": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_creative"], "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_creative_date_day.cb81bc4766": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_creative"], "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_campaign_campaign_id.d6ae242f1a": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign"], "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_campaign_date_day.ef97bed766": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign"], "test.linkedin.not_null_stg_linkedin_ads__creative_history_creative_id.4d51d55474": ["model.linkedin.stg_linkedin_ads__creative_history"], "test.linkedin.not_null_stg_linkedin_ads__campaign_history_campaign_id.b026971ca2": ["model.linkedin.stg_linkedin_ads__campaign_history"], "test.linkedin.not_null_stg_linkedin_ads__campaign_history_version_tag.64954cc469": ["model.linkedin.stg_linkedin_ads__campaign_history"], "test.linkedin.not_null_stg_linkedin_ads__campaign_group_history_campaign_group_id.3888f3777d": ["model.linkedin.stg_linkedin_ads__campaign_group_history"], "test.linkedin.not_null_stg_linkedin_ads__campaign_group_history_last_modified_at.a716e2a7ea": ["model.linkedin.stg_linkedin_ads__campaign_group_history"], "test.linkedin.not_null_stg_linkedin_ads__account_history_account_id.a9fa7f93c0": ["model.linkedin.stg_linkedin_ads__account_history"], "test.linkedin.not_null_stg_linkedin_ads__account_history_version_tag.58c46c5d81": ["model.linkedin.stg_linkedin_ads__account_history"], "test.linkedin.not_null_stg_linkedin_ads__geo_geo_id.a9fc61210c": ["model.linkedin.stg_linkedin_ads__geo"], "test.linkedin.not_null_stg_linkedin_ads__monthly_ad_analytics_by_country_date_month.553fe89e70": ["model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country"], "test.linkedin.not_null_stg_linkedin_ads__monthly_ad_analytics_by_region_date_month.d065ed2b78": ["model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region"], "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_ad_group_id.60febec6b5": ["model.apple_search_ads.apple_search_ads__ad_group_report"], "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_date_day.e6ffb30b3c": ["model.apple_search_ads.apple_search_ads__ad_group_report"], "test.apple_search_ads.not_null_apple_search_ads__ad_report_ad_id.0ab2c5075c": ["model.apple_search_ads.apple_search_ads__ad_report"], "test.apple_search_ads.not_null_apple_search_ads__ad_report_date_day.b86c049e17": ["model.apple_search_ads.apple_search_ads__ad_report"], "test.apple_search_ads.not_null_apple_search_ads__campaign_report_campaign_id.e26ed1e146": ["model.apple_search_ads.apple_search_ads__campaign_report"], "test.apple_search_ads.not_null_apple_search_ads__campaign_report_date_day.35652b8d1a": ["model.apple_search_ads.apple_search_ads__campaign_report"], "test.apple_search_ads.not_null_apple_search_ads__keyword_report_keyword_id.ea493710db": ["model.apple_search_ads.apple_search_ads__keyword_report"], "test.apple_search_ads.not_null_apple_search_ads__keyword_report_date_day.3dec8d0e82": ["model.apple_search_ads.apple_search_ads__keyword_report"], "test.apple_search_ads.not_null_apple_search_ads__organization_report_organization_id.b6cf7d69f8": ["model.apple_search_ads.apple_search_ads__organization_report"], "test.apple_search_ads.not_null_apple_search_ads__organization_report_date_day.5784fed523": ["model.apple_search_ads.apple_search_ads__organization_report"], "test.apple_search_ads.not_null_apple_search_ads__search_term_report_date_day.1bc3b0d57c": ["model.apple_search_ads.apple_search_ads__search_term_report"], "test.apple_search_ads.not_null_apple_search_ads__search_term_report_search_term_text.aecc7447f7": ["model.apple_search_ads.apple_search_ads__search_term_report"], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f": ["model.apple_search_ads.stg_apple_search_ads__ad_group_history"], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7": ["model.apple_search_ads.stg_apple_search_ads__ad_group_history"], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1": ["model.apple_search_ads.stg_apple_search_ads__ad_group_report"], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b": ["model.apple_search_ads.stg_apple_search_ads__ad_group_report"], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d": ["model.apple_search_ads.stg_apple_search_ads__ad_history"], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a": ["model.apple_search_ads.stg_apple_search_ads__ad_history"], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8": ["model.apple_search_ads.stg_apple_search_ads__ad_report"], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f": ["model.apple_search_ads.stg_apple_search_ads__ad_report"], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58": ["model.apple_search_ads.stg_apple_search_ads__ad_report"], "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9": ["model.apple_search_ads.stg_apple_search_ads__campaign_history"], "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8": ["model.apple_search_ads.stg_apple_search_ads__campaign_history"], "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728": ["model.apple_search_ads.stg_apple_search_ads__campaign_report"], "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3": ["model.apple_search_ads.stg_apple_search_ads__campaign_report"], "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287": ["model.apple_search_ads.stg_apple_search_ads__keyword_history"], "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2": ["model.apple_search_ads.stg_apple_search_ads__keyword_history"], "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e": ["model.apple_search_ads.stg_apple_search_ads__keyword_report"], "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928": ["model.apple_search_ads.stg_apple_search_ads__keyword_report"], "test.apple_search_ads.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb": ["model.apple_search_ads.stg_apple_search_ads__organization"], "test.apple_search_ads.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad": ["model.apple_search_ads.stg_apple_search_ads__search_term_report"], "test.apple_search_ads.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302": ["model.apple_search_ads.stg_apple_search_ads__search_term_report"], "test.reddit_ads.not_null_reddit_ads__account_report_date_day.7b43e6cb90": ["model.reddit_ads.reddit_ads__account_report"], "test.reddit_ads.not_null_reddit_ads__account_report_account_id.16f11188c5": ["model.reddit_ads.reddit_ads__account_report"], "test.reddit_ads.not_null_reddit_ads__ad_group_report_date_day.6463e6f6f7": ["model.reddit_ads.reddit_ads__ad_group_report"], "test.reddit_ads.not_null_reddit_ads__ad_group_report_ad_group_id.057bd60604": ["model.reddit_ads.reddit_ads__ad_group_report"], "test.reddit_ads.not_null_reddit_ads__ad_report_date_day.608b21c69a": ["model.reddit_ads.reddit_ads__ad_report"], "test.reddit_ads.not_null_reddit_ads__ad_report_ad_id.1da054a14e": ["model.reddit_ads.reddit_ads__ad_report"], "test.reddit_ads.not_null_reddit_ads__campaign_report_date_day.f79cca4131": ["model.reddit_ads.reddit_ads__campaign_report"], "test.reddit_ads.not_null_reddit_ads__campaign_report_campaign_id.f5491a0b49": ["model.reddit_ads.reddit_ads__campaign_report"], "test.reddit_ads.not_null_reddit_ads__url_report_date_day.4b0f6363da": ["model.reddit_ads.reddit_ads__url_report"], "test.reddit_ads.not_null_reddit_ads__url_report_ad_id.8ff83da2b0": ["model.reddit_ads.reddit_ads__url_report"], "test.reddit_ads.not_null_reddit_ads__url_report_base_url.2f585bebcb": ["model.reddit_ads.reddit_ads__url_report"], "test.reddit_ads.not_null_stg_reddit_ads__account_account_id.512f0b8078": ["model.reddit_ads.stg_reddit_ads__account"], "test.reddit_ads.not_null_stg_reddit_ads__account_report_account_id.1f2a0195de": ["model.reddit_ads.stg_reddit_ads__account_report"], "test.reddit_ads.not_null_stg_reddit_ads__ad_ad_id.40188b63dd": ["model.reddit_ads.stg_reddit_ads__ad"], "test.reddit_ads.not_null_stg_reddit_ads__ad_report_ad_id.c4af84b857": ["model.reddit_ads.stg_reddit_ads__ad_report"], "test.reddit_ads.not_null_stg_reddit_ads__ad_group_ad_group_id.65795d8dc2": ["model.reddit_ads.stg_reddit_ads__ad_group"], "test.reddit_ads.not_null_stg_reddit_ads__ad_group_report_ad_group_id.9836cd084d": ["model.reddit_ads.stg_reddit_ads__ad_group_report"], "test.reddit_ads.not_null_stg_reddit_ads__campaign_campaign_id.f3f24e4682": ["model.reddit_ads.stg_reddit_ads__campaign"], "test.reddit_ads.not_null_stg_reddit_ads__campaign_report_campaign_id.c717612b4f": ["model.reddit_ads.stg_reddit_ads__campaign_report"], "test.snapchat_ads.not_null_snapchat_ads__account_report_date_day.688d7ed260": ["model.snapchat_ads.snapchat_ads__account_report"], "test.snapchat_ads.not_null_snapchat_ads__account_report_ad_account_id.589c81966b": ["model.snapchat_ads.snapchat_ads__account_report"], "test.snapchat_ads.not_null_snapchat_ads__ad_report_date_day.7c5350c8fe": ["model.snapchat_ads.snapchat_ads__ad_report"], "test.snapchat_ads.not_null_snapchat_ads__ad_report_ad_id.9000850744": ["model.snapchat_ads.snapchat_ads__ad_report"], "test.snapchat_ads.not_null_snapchat_ads__campaign_report_date_day.4e4e31223b": ["model.snapchat_ads.snapchat_ads__campaign_report"], "test.snapchat_ads.not_null_snapchat_ads__campaign_report_campaign_id.19fd7135ac": ["model.snapchat_ads.snapchat_ads__campaign_report"], "test.snapchat_ads.not_null_snapchat_ads__ad_squad_report_date_day.39118ca639": ["model.snapchat_ads.snapchat_ads__ad_squad_report"], "test.snapchat_ads.not_null_snapchat_ads__ad_squad_report_ad_squad_id.424c0bbffe": ["model.snapchat_ads.snapchat_ads__ad_squad_report"], "test.snapchat_ads.not_null_snapchat_ads__url_report_date_day.bcbe87a7f6": ["model.snapchat_ads.snapchat_ads__url_report"], "test.snapchat_ads.not_null_snapchat_ads__url_report_ad_id.ecbdfc0d78": ["model.snapchat_ads.snapchat_ads__url_report"], "test.snapchat_ads.not_null_snapchat_ads__url_report_base_url.15676dc1de": ["model.snapchat_ads.snapchat_ads__url_report"], "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_date_day.b946d6ae47": ["model.snapchat_ads.snapchat_ads__campaign_country_report"], "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_campaign_id.33fe016201": ["model.snapchat_ads.snapchat_ads__campaign_country_report"], "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_country.332a585832": ["model.snapchat_ads.snapchat_ads__campaign_country_report"], "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_date_day.3d3ad303c4": ["model.snapchat_ads.snapchat_ads__campaign_region_report"], "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_campaign_id.9b92b4f074": ["model.snapchat_ads.snapchat_ads__campaign_region_report"], "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_region.041579919a": ["model.snapchat_ads.snapchat_ads__campaign_region_report"], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_account_history__fivetran_synced.2d5dd77824": ["model.snapchat_ads.stg_snapchat_ads__ad_account_history"], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_account_history_ad_account_id.426d71d605": ["model.snapchat_ads.stg_snapchat_ads__ad_account_history"], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_history__fivetran_synced.1607c70fda": ["model.snapchat_ads.stg_snapchat_ads__ad_history"], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_history_ad_id.e9d367fd15": ["model.snapchat_ads.stg_snapchat_ads__ad_history"], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_hourly_report_ad_id.7e763de19d": ["model.snapchat_ads.stg_snapchat_ads__ad_hourly_report"], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_hourly_report_date_hour.666cda1cd7": ["model.snapchat_ads.stg_snapchat_ads__ad_hourly_report"], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_history__fivetran_synced.7ed7d105ae": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_history"], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_history_ad_squad_id.71c7122278": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_history"], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_hourly_report_ad_squad_id.ab16aa72c9": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report"], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_hourly_report_date_hour.6f0b63a9cb": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report"], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_history__fivetran_synced.55bc48b3ec": ["model.snapchat_ads.stg_snapchat_ads__campaign_history"], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_history_campaign_id.f74a0fb8c0": ["model.snapchat_ads.stg_snapchat_ads__campaign_history"], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_hourly_report_campaign_id.f255c38a3e": ["model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report"], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_hourly_report_date_hour.0bc4218ac8": ["model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report"], "test.snapchat_ads.not_null_stg_snapchat_ads__creative_history__fivetran_synced.b9c95b4380": ["model.snapchat_ads.stg_snapchat_ads__creative_history"], "test.snapchat_ads.not_null_stg_snapchat_ads__creative_history_creative_id.09c83690f4": ["model.snapchat_ads.stg_snapchat_ads__creative_history"], "test.snapchat_ads.not_null_stg_snapchat_ads__creative_url_tag_history_creative_id.7ff6bb9c1b": ["model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history"], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_campaign_id.1b07be54fe": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report"], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_country.34db53b159": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report"], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_date_day.d3d7dd7af1": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report"], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_campaign_id.99fbccb78d": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report"], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_region.44327f07bf": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report"], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_date_day.eec50e6826": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report"], "test.pinterest.not_null_pinterest_ads__url_report_date_day.b09048037e": ["model.pinterest.pinterest_ads__url_report"], "test.pinterest.not_null_pinterest_ads__url_report_destination_url.0bb7f30502": ["model.pinterest.pinterest_ads__url_report"], "test.pinterest.not_null_pinterest_ads__url_report_pin_promotion_id.0da711ad6a": ["model.pinterest.pinterest_ads__url_report"], "test.pinterest.not_null_pinterest_ads__ad_group_report_date_day.ed7c27b8a7": ["model.pinterest.pinterest_ads__ad_group_report"], "test.pinterest.not_null_pinterest_ads__ad_group_report_ad_group_id.134f9ac6c2": ["model.pinterest.pinterest_ads__ad_group_report"], "test.pinterest.not_null_pinterest_ads__campaign_report_date_day.10ac8272bf": ["model.pinterest.pinterest_ads__campaign_report"], "test.pinterest.not_null_pinterest_ads__campaign_report_campaign_id.8001ea60f2": ["model.pinterest.pinterest_ads__campaign_report"], "test.pinterest.not_null_pinterest_ads__advertiser_report_date_day.aedeceeeca": ["model.pinterest.pinterest_ads__advertiser_report"], "test.pinterest.not_null_pinterest_ads__advertiser_report_advertiser_id.13380f0672": ["model.pinterest.pinterest_ads__advertiser_report"], "test.pinterest.not_null_pinterest_ads__keyword_report_date_day.23130e9fba": ["model.pinterest.pinterest_ads__keyword_report"], "test.pinterest.not_null_pinterest_ads__keyword_report_keyword_id.0d73460198": ["model.pinterest.pinterest_ads__keyword_report"], "test.pinterest.not_null_pinterest_ads__pin_promotion_report_date_day.3128d28cfd": ["model.pinterest.pinterest_ads__pin_promotion_report"], "test.pinterest.not_null_pinterest_ads__pin_promotion_report_pin_promotion_id.2540e0a561": ["model.pinterest.pinterest_ads__pin_promotion_report"], "test.pinterest.not_null_pinterest_ads__campaign_country_report_date_day.a9da473d38": ["model.pinterest.pinterest_ads__campaign_country_report"], "test.pinterest.not_null_pinterest_ads__campaign_country_report_campaign_id.9b1d309d2b": ["model.pinterest.pinterest_ads__campaign_country_report"], "test.pinterest.not_null_pinterest_ads__campaign_region_report_date_day.e81588bc6e": ["model.pinterest.pinterest_ads__campaign_region_report"], "test.pinterest.not_null_pinterest_ads__campaign_region_report_campaign_id.1a64423d71": ["model.pinterest.pinterest_ads__campaign_region_report"], "test.pinterest.not_null_stg_pinterest_ads__ad_group_history_ad_group_id.220c6220be": ["model.pinterest.stg_pinterest_ads__ad_group_history"], "test.pinterest.not_null_stg_pinterest_ads__campaign_history_campaign_id.60cb10d341": ["model.pinterest.stg_pinterest_ads__campaign_history"], "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_history_pin_promotion_id.171995cd34": ["model.pinterest.stg_pinterest_ads__pin_promotion_history"], "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_report_date_day.ed272212a1": ["model.pinterest.stg_pinterest_ads__pin_promotion_report"], "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_report_pin_promotion_id.9c3c9f71ab": ["model.pinterest.stg_pinterest_ads__pin_promotion_report"], "test.pinterest.not_null_stg_pinterest_ads__ad_group_report_date_day.80e8904c4c": ["model.pinterest.stg_pinterest_ads__ad_group_report"], "test.pinterest.not_null_stg_pinterest_ads__ad_group_report_ad_group_id.bb8cf3c471": ["model.pinterest.stg_pinterest_ads__ad_group_report"], "test.pinterest.not_null_stg_pinterest_ads__advertiser_history_advertiser_id.7d24f665fb": ["model.pinterest.stg_pinterest_ads__advertiser_history"], "test.pinterest.not_null_stg_pinterest_ads__advertiser_report_date_day.153bd03c95": ["model.pinterest.stg_pinterest_ads__advertiser_report"], "test.pinterest.not_null_stg_pinterest_ads__advertiser_report_advertiser_id.1b16ed73ff": ["model.pinterest.stg_pinterest_ads__advertiser_report"], "test.pinterest.not_null_stg_pinterest_ads__campaign_report_date_day.7ef5fb1238": ["model.pinterest.stg_pinterest_ads__campaign_report"], "test.pinterest.not_null_stg_pinterest_ads__campaign_report_campaign_id.a287eba0fc": ["model.pinterest.stg_pinterest_ads__campaign_report"], "test.pinterest.not_null_stg_pinterest_ads__keyword_history_keyword_id.246889377a": ["model.pinterest.stg_pinterest_ads__keyword_history"], "test.pinterest.not_null_stg_pinterest_ads__keyword_report_date_day.9937216300": ["model.pinterest.stg_pinterest_ads__keyword_report"], "test.pinterest.not_null_stg_pinterest_ads__keyword_report_keyword_id.5f00679c48": ["model.pinterest.stg_pinterest_ads__keyword_report"], "test.google_ads.not_null_google_ads__url_report_base_url.e3578c0f72": ["model.google_ads.google_ads__url_report"], "test.google_ads.not_null_google_ads__account_report_account_id.abb0985422": ["model.google_ads.google_ads__account_report"], "test.google_ads.not_null_google_ads__ad_group_report_ad_group_id.c186523c0c": ["model.google_ads.google_ads__ad_group_report"], "test.google_ads.not_null_google_ads__ad_report_ad_id.7bd6a287ad": ["model.google_ads.google_ads__ad_report"], "test.google_ads.not_null_google_ads__campaign_report_campaign_id.cc6694fa0e": ["model.google_ads.google_ads__campaign_report"], "test.google_ads.not_null_google_ads__keyword_report_criterion_id.4cab66a055": ["model.google_ads.google_ads__keyword_report"], "test.google_ads.unique_google_ads__campaign_bid_modifiers_report_bid_modifier_report_key.d68443174a": ["model.google_ads.google_ads__campaign_bid_modifiers_report"], "test.google_ads.not_null_google_ads__campaign_bid_modifiers_report_bid_modifier_report_key.746ae8cfa3": ["model.google_ads.google_ads__campaign_bid_modifiers_report"], "test.google_ads.not_null_google_ads__campaign_bid_modifiers_report_campaign_id.68d212d025": ["model.google_ads.google_ads__campaign_bid_modifiers_report"], "test.google_ads.unique_google_ads__campaign_budget_diagnostics_report_budget_diagnostics_report_key.ca90f632f4": ["model.google_ads.google_ads__campaign_budget_diagnostics_report"], "test.google_ads.not_null_google_ads__campaign_budget_diagnostics_report_budget_diagnostics_report_key.c2c4d80aab": ["model.google_ads.google_ads__campaign_budget_diagnostics_report"], "test.google_ads.not_null_google_ads__campaign_budget_diagnostics_report_campaign_id.9a579bd702": ["model.google_ads.google_ads__campaign_budget_diagnostics_report"], "test.google_ads.not_null_stg_google_ads__account_history_account_id.5ca373f51f": ["model.google_ads.stg_google_ads__account_history"], "test.google_ads.not_null_stg_google_ads__ad_group_history_ad_group_id.f6c7c939be": ["model.google_ads.stg_google_ads__ad_group_history"], "test.google_ads.not_null_stg_google_ads__ad_history_ad_id.8c23c38248": ["model.google_ads.stg_google_ads__ad_history"], "test.google_ads.not_null_stg_google_ads__ad_stats_date_day.9a43c0fce4": ["model.google_ads.stg_google_ads__ad_stats"], "test.google_ads.not_null_stg_google_ads__ad_stats_ad_id.2612d83cc8": ["model.google_ads.stg_google_ads__ad_stats"], "test.google_ads.not_null_stg_google_ads__campaign_history_campaign_id.fa0c825e75": ["model.google_ads.stg_google_ads__campaign_history"], "test.google_ads.not_null_stg_google_ads__ad_group_criterion_history_criterion_id.7a0a8b8476": ["model.google_ads.stg_google_ads__ad_group_criterion_history"], "test.google_ads.not_null_stg_google_ads__ad_group_stats_date_day.3c6a221786": ["model.google_ads.stg_google_ads__ad_group_stats"], "test.google_ads.not_null_stg_google_ads__ad_group_stats_ad_group_id.a8d430f077": ["model.google_ads.stg_google_ads__ad_group_stats"], "test.google_ads.not_null_stg_google_ads__campaign_stats_date_day.dc097fd76b": ["model.google_ads.stg_google_ads__campaign_stats"], "test.google_ads.not_null_stg_google_ads__campaign_stats_campaign_id.11587fa10f": ["model.google_ads.stg_google_ads__campaign_stats"], "test.google_ads.not_null_stg_google_ads__keyword_stats_date_day.a9da72f74d": ["model.google_ads.stg_google_ads__keyword_stats"], "test.google_ads.not_null_stg_google_ads__keyword_stats_keyword_id.f0945d6cf0": ["model.google_ads.stg_google_ads__keyword_stats"], "test.google_ads.not_null_stg_google_ads__account_stats_account_id.2a9da5417b": ["model.google_ads.stg_google_ads__account_stats"], "test.google_ads.not_null_stg_google_ads__account_stats_date_day.57ac8772d5": ["model.google_ads.stg_google_ads__account_stats"], "test.google_ads.not_null_stg_google_ads__search_term_keyword_stats_date_day.3ff55abd88": ["model.google_ads.stg_google_ads__search_term_keyword_stats"], "test.google_ads.not_null_stg_google_ads__search_term_keyword_stats_search_term_id.0019238ba2": ["model.google_ads.stg_google_ads__search_term_keyword_stats"], "test.google_ads.not_null_stg_google_ads__campaign_bid_modifier_history_campaign_id.c7e1e11f33": ["model.google_ads.stg_google_ads__campaign_bid_modifier_history"], "test.google_ads.not_null_stg_google_ads__campaign_budget_history_campaign_id.730c3d8025": ["model.google_ads.stg_google_ads__campaign_budget_history"], "test.google_ads.not_null_stg_google_ads__campaign_criterion_history_criterion_id.ade9d1fdbd": ["model.google_ads.stg_google_ads__campaign_criterion_history"], "test.google_ads.not_null_stg_google_ads__campaign_bidding_strategy_history_campaign_id.7efbcd0291": ["model.google_ads.stg_google_ads__campaign_bidding_strategy_history"], "test.amazon_ads.not_null_amazon_ads__account_report_profile_id.87fb8dbe66": ["model.amazon_ads.amazon_ads__account_report"], "test.amazon_ads.not_null_amazon_ads__account_report_account_id.83adef7061": ["model.amazon_ads.amazon_ads__account_report"], "test.amazon_ads.not_null_amazon_ads__ad_group_report_ad_group_id.8a23dc123a": ["model.amazon_ads.amazon_ads__ad_group_report"], "test.amazon_ads.not_null_amazon_ads__ad_report_ad_id.93728159b3": ["model.amazon_ads.amazon_ads__ad_report"], "test.amazon_ads.not_null_amazon_ads__campaign_report_campaign_id.a9cabadd7c": ["model.amazon_ads.amazon_ads__campaign_report"], "test.amazon_ads.not_null_amazon_ads__portfolio_report_profile_id.1a910441c6": ["model.amazon_ads.amazon_ads__portfolio_report"], "test.amazon_ads.not_null_amazon_ads__keyword_report_keyword_id.303f680e4a": ["model.amazon_ads.amazon_ads__keyword_report"], "test.amazon_ads.not_null_amazon_ads__search_report_search_term.3c23d4658a": ["model.amazon_ads.amazon_ads__search_report"], "test.amazon_ads.not_null_stg_amazon_ads__ad_group_history_ad_group_id.6b524b990b": ["model.amazon_ads.stg_amazon_ads__ad_group_history"], "test.amazon_ads.not_null_stg_amazon_ads__ad_group_level_report_ad_group_id.ee4ef641c3": ["model.amazon_ads.stg_amazon_ads__ad_group_level_report"], "test.amazon_ads.not_null_stg_amazon_ads__advertised_product_report_ad_id.307c6bc8d4": ["model.amazon_ads.stg_amazon_ads__advertised_product_report"], "test.amazon_ads.not_null_stg_amazon_ads__campaign_history_campaign_id.49e395897c": ["model.amazon_ads.stg_amazon_ads__campaign_history"], "test.amazon_ads.not_null_stg_amazon_ads__campaign_level_report_campaign_id.1efec68194": ["model.amazon_ads.stg_amazon_ads__campaign_level_report"], "test.amazon_ads.not_null_stg_amazon_ads__keyword_history_keyword_id.f21f6add6e": ["model.amazon_ads.stg_amazon_ads__keyword_history"], "test.amazon_ads.not_null_stg_amazon_ads__portfolio_history_portfolio_id.e22bb2ba02": ["model.amazon_ads.stg_amazon_ads__portfolio_history"], "test.amazon_ads.not_null_stg_amazon_ads__product_ad_history_ad_id.8744ab1cd8": ["model.amazon_ads.stg_amazon_ads__product_ad_history"], "test.amazon_ads.not_null_stg_amazon_ads__profile_profile_id.bd192c102b": ["model.amazon_ads.stg_amazon_ads__profile"], "test.amazon_ads.not_null_stg_amazon_ads__targeting_keyword_report_keyword_id.101a3299d7": ["model.amazon_ads.stg_amazon_ads__targeting_keyword_report"], "test.amazon_ads.not_null_stg_amazon_ads__search_term_ad_keyword_report_search_term.ef04af3b06": ["model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report"], "test.twitter_ads.not_null_twitter_ads__campaign_report_campaign_id.03b1c451b8": ["model.twitter_ads.twitter_ads__campaign_report"], "test.twitter_ads.not_null_twitter_ads__campaign_report_date_day.2b30b279b0": ["model.twitter_ads.twitter_ads__campaign_report"], "test.twitter_ads.not_null_twitter_ads__campaign_report_placement.c66d252e82": ["model.twitter_ads.twitter_ads__campaign_report"], "test.twitter_ads.not_null_twitter_ads__line_item_report_date_day.86c934e8ce": ["model.twitter_ads.twitter_ads__line_item_report"], "test.twitter_ads.not_null_twitter_ads__line_item_report_line_item_id.0462d58211": ["model.twitter_ads.twitter_ads__line_item_report"], "test.twitter_ads.not_null_twitter_ads__line_item_report_placement.f103369312": ["model.twitter_ads.twitter_ads__line_item_report"], "test.twitter_ads.not_null_twitter_ads__account_report_date_day.84896c5846": ["model.twitter_ads.twitter_ads__account_report"], "test.twitter_ads.not_null_twitter_ads__account_report_placement.157dcb6194": ["model.twitter_ads.twitter_ads__account_report"], "test.twitter_ads.not_null_twitter_ads__account_report_account_id.90d5808908": ["model.twitter_ads.twitter_ads__account_report"], "test.twitter_ads.not_null_twitter_ads__keyword_report_date_day.e0ce90c1ec": ["model.twitter_ads.twitter_ads__keyword_report"], "test.twitter_ads.not_null_twitter_ads__keyword_report_keyword_id.91efa0a538": ["model.twitter_ads.twitter_ads__keyword_report"], "test.twitter_ads.not_null_twitter_ads__promoted_tweet_report_placement.d89c9b27e5": ["model.twitter_ads.twitter_ads__promoted_tweet_report"], "test.twitter_ads.not_null_twitter_ads__promoted_tweet_report_promoted_tweet_id.5df08e154e": ["model.twitter_ads.twitter_ads__promoted_tweet_report"], "test.twitter_ads.not_null_twitter_ads__url_report_date_day.33fcb7e04b": ["model.twitter_ads.twitter_ads__url_report"], "test.twitter_ads.not_null_twitter_ads__url_report_placement.92ca3b192e": ["model.twitter_ads.twitter_ads__url_report"], "test.twitter_ads.not_null_twitter_ads__url_report_promoted_tweet_id.d690f99143": ["model.twitter_ads.twitter_ads__url_report"], "test.twitter_ads.not_null_twitter_ads__url_report_base_url.dfd7ab549e": ["model.twitter_ads.twitter_ads__url_report"], "test.twitter_ads.not_null_twitter_ads__campaign_country_report_campaign_id.d08c7d25a2": ["model.twitter_ads.twitter_ads__campaign_country_report"], "test.twitter_ads.not_null_twitter_ads__campaign_country_report_date_day.33eabfbcaa": ["model.twitter_ads.twitter_ads__campaign_country_report"], "test.twitter_ads.not_null_twitter_ads__campaign_country_report_placement.3a4c65b9c5": ["model.twitter_ads.twitter_ads__campaign_country_report"], "test.twitter_ads.not_null_twitter_ads__campaign_region_report_campaign_id.c06b8be032": ["model.twitter_ads.twitter_ads__campaign_region_report"], "test.twitter_ads.not_null_twitter_ads__campaign_region_report_date_day.884ad86a28": ["model.twitter_ads.twitter_ads__campaign_region_report"], "test.twitter_ads.not_null_twitter_ads__campaign_region_report_placement.e6fb374bf5": ["model.twitter_ads.twitter_ads__campaign_region_report"], "test.twitter_ads.not_null_stg_twitter_ads__account_history_account_id.66fb3601e2": ["model.twitter_ads.stg_twitter_ads__account_history"], "test.twitter_ads.not_null_stg_twitter_ads__campaign_history_campaign_id.51218487ce": ["model.twitter_ads.stg_twitter_ads__campaign_history"], "test.twitter_ads.not_null_stg_twitter_ads__line_item_history_line_item_id.2cef040809": ["model.twitter_ads.stg_twitter_ads__line_item_history"], "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_history_promoted_tweet_id.f447a1cd09": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_history"], "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_date_day.c4c46a5894": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_report"], "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_promoted_tweet_id.6028694598": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_report"], "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_placement.c1b1f648b3": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_report"], "test.twitter_ads.not_null_stg_twitter_ads__tweet_url_index.e998fb67be": ["model.twitter_ads.stg_twitter_ads__tweet_url"], "test.twitter_ads.not_null_stg_twitter_ads__tweet_url_tweet_id.f7e1670218": ["model.twitter_ads.stg_twitter_ads__tweet_url"], "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_date_day.053c09786c": ["model.twitter_ads.stg_twitter_ads__campaign_report"], "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_campaign_id.a63b62981f": ["model.twitter_ads.stg_twitter_ads__campaign_report"], "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_placement.5067d8c4f4": ["model.twitter_ads.stg_twitter_ads__campaign_report"], "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_date_day.0f4d8cc8fe": ["model.twitter_ads.stg_twitter_ads__line_item_report"], "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_line_item_id.9f5a4860b7": ["model.twitter_ads.stg_twitter_ads__line_item_report"], "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_placement.cd7e77e0eb": ["model.twitter_ads.stg_twitter_ads__line_item_report"], "test.twitter_ads.not_null_stg_twitter_ads__line_item_keywords_report_keyword_id.e5f015e9ec": ["model.twitter_ads.stg_twitter_ads__line_item_keywords_report"], "test.twitter_ads.not_null_stg_twitter_ads__line_item_keywords_report_date_day.c7e7155b13": ["model.twitter_ads.stg_twitter_ads__line_item_keywords_report"], "test.twitter_ads.not_null_stg_twitter_ads__tweet_tweet_id.a0427f37cd": ["model.twitter_ads.stg_twitter_ads__tweet"], "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_country.8bc44f6e39": ["model.twitter_ads.stg_twitter_ads__campaign_locations_report"], "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_date_day.bf69378746": ["model.twitter_ads.stg_twitter_ads__campaign_locations_report"], "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_campaign_id.e1ddc306c2": ["model.twitter_ads.stg_twitter_ads__campaign_locations_report"], "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_placement.638fb0cf03": ["model.twitter_ads.stg_twitter_ads__campaign_locations_report"], "test.twitter_ads.not_null_stg_twitter_ads__campaign_regions_report_region.7b8b6fd555": ["model.twitter_ads.stg_twitter_ads__campaign_regions_report"], "test.twitter_ads.not_null_stg_twitter_ads__campaign_regions_report_date_day.e7f9f99776": ["model.twitter_ads.stg_twitter_ads__campaign_regions_report"], "test.ad_reporting.not_null_ad_reporting__account_report_account_id.316a64c022": ["model.ad_reporting.ad_reporting__account_report"], "test.ad_reporting.not_null_ad_reporting__ad_group_report_ad_group_id.963e17e842": ["model.ad_reporting.ad_reporting__ad_group_report"], "test.ad_reporting.not_null_ad_reporting__ad_report_ad_id.f3eb210152": ["model.ad_reporting.ad_reporting__ad_report"], "test.ad_reporting.not_null_ad_reporting__campaign_report_campaign_id.1cfaa7698b": ["model.ad_reporting.ad_reporting__campaign_report"], "test.ad_reporting.not_null_ad_reporting__keyword_report_keyword_id.51a45fb334": ["model.ad_reporting.ad_reporting__keyword_report"], "test.ad_reporting.not_null_ad_reporting__search_report_search_query.ee2f0fcafb": ["model.ad_reporting.ad_reporting__search_report"], "test.ad_reporting.not_null_ad_reporting__url_report_base_url.a29864e5b6": ["model.ad_reporting.ad_reporting__url_report"], "test.tiktok_ads.not_null_tiktok_ads__advertiser_report_date_day.1276998c99": ["model.tiktok_ads.tiktok_ads__advertiser_report"], "test.tiktok_ads.not_null_tiktok_ads__advertiser_report_advertiser_id.f956c568ce": ["model.tiktok_ads.tiktok_ads__advertiser_report"], "test.tiktok_ads.not_null_tiktok_ads__ad_report_date_day.d61ee4a5ed": ["model.tiktok_ads.tiktok_ads__ad_report"], "test.tiktok_ads.not_null_tiktok_ads__ad_report_ad_id.2d8166e707": ["model.tiktok_ads.tiktok_ads__ad_report"], "test.tiktok_ads.not_null_tiktok_ads__ad_group_report_date_day.e39164964e": ["model.tiktok_ads.tiktok_ads__ad_group_report"], "test.tiktok_ads.not_null_tiktok_ads__ad_group_report_ad_group_id.17fb8710f4": ["model.tiktok_ads.tiktok_ads__ad_group_report"], "test.tiktok_ads.not_null_tiktok_ads__campaign_report_date_day.3807b0e836": ["model.tiktok_ads.tiktok_ads__campaign_report"], "test.tiktok_ads.not_null_tiktok_ads__campaign_report_campaign_id.8a2b0c8ef8": ["model.tiktok_ads.tiktok_ads__campaign_report"], "test.tiktok_ads.not_null_tiktok_ads__url_report_date_day.d593573eff": ["model.tiktok_ads.tiktok_ads__url_report"], "test.tiktok_ads.not_null_tiktok_ads__url_report_ad_id.6c41067bd0": ["model.tiktok_ads.tiktok_ads__url_report"], "test.tiktok_ads.not_null_tiktok_ads__url_report_base_url.37afef2e1b": ["model.tiktok_ads.tiktok_ads__url_report"], "test.tiktok_ads.not_null_tiktok_ads__campaign_country_report_date_day.c68c1bd379": ["model.tiktok_ads.tiktok_ads__campaign_country_report"], "test.tiktok_ads.not_null_tiktok_ads__campaign_country_report_campaign_id.f439b91d6d": ["model.tiktok_ads.tiktok_ads__campaign_country_report"], "test.tiktok_ads.not_null_stg_tiktok_ads__advertiser_advertiser_id.5deab92def": ["model.tiktok_ads.stg_tiktok_ads__advertiser"], "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_history_ad_group_id.04778d7fad": ["model.tiktok_ads.stg_tiktok_ads__ad_group_history"], "test.tiktok_ads.not_null_stg_tiktok_ads__ad_history_ad_id.4ffd05b23a": ["model.tiktok_ads.stg_tiktok_ads__ad_history"], "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_history_campaign_id.7f9147d1e1": ["model.tiktok_ads.stg_tiktok_ads__campaign_history"], "test.tiktok_ads.not_null_stg_tiktok_ads__ad_report_hourly_ad_id.ee84d783ed": ["model.tiktok_ads.stg_tiktok_ads__ad_report_hourly"], "test.tiktok_ads.not_null_stg_tiktok_ads__ad_report_hourly_stat_time_hour.9e2a2dca81": ["model.tiktok_ads.stg_tiktok_ads__ad_report_hourly"], "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_report_hourly_ad_group_id.8da17119f1": ["model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly"], "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_report_hourly_stat_time_hour.ca4b495127": ["model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly"], "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_report_hourly_campaign_id.ef898379fb": ["model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly"], "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_report_hourly_stat_time_hour.e75e13184c": ["model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly"], "test.microsoft_ads.not_null_microsoft_ads__account_report_account_id.f88e46157e": ["model.microsoft_ads.microsoft_ads__account_report"], "test.microsoft_ads.not_null_microsoft_ads__ad_group_report_ad_group_id.1974ec5ab9": ["model.microsoft_ads.microsoft_ads__ad_group_report"], "test.microsoft_ads.not_null_microsoft_ads__ad_report_ad_id.b089709125": ["model.microsoft_ads.microsoft_ads__ad_report"], "test.microsoft_ads.not_null_microsoft_ads__campaign_report_campaign_id.67aa50e1f8": ["model.microsoft_ads.microsoft_ads__campaign_report"], "test.microsoft_ads.not_null_microsoft_ads__keyword_report_keyword_id.da1d648d3b": ["model.microsoft_ads.microsoft_ads__keyword_report"], "test.microsoft_ads.not_null_microsoft_ads__search_report_search_query.fa3625d66d": ["model.microsoft_ads.microsoft_ads__search_report"], "test.microsoft_ads.not_null_microsoft_ads__url_report_base_url.c1af50307a": ["model.microsoft_ads.microsoft_ads__url_report"], "test.microsoft_ads.not_null_microsoft_ads__campaign_country_report_account_id.9d9807033d": ["model.microsoft_ads.microsoft_ads__campaign_country_report"], "test.microsoft_ads.not_null_microsoft_ads__campaign_country_report_campaign_id.10b01e8782": ["model.microsoft_ads.microsoft_ads__campaign_country_report"], "test.microsoft_ads.not_null_microsoft_ads__campaign_region_report_account_id.b3a2b47986": ["model.microsoft_ads.microsoft_ads__campaign_region_report"], "test.microsoft_ads.not_null_microsoft_ads__campaign_region_report_campaign_id.b1d4f5a20f": ["model.microsoft_ads.microsoft_ads__campaign_region_report"], "test.microsoft_ads.not_null_stg_microsoft_ads__account_history_account_id.cc273ee54e": ["model.microsoft_ads.stg_microsoft_ads__account_history"], "test.microsoft_ads.not_null_stg_microsoft_ads__account_daily_report_account_id.b17f45fe79": ["model.microsoft_ads.stg_microsoft_ads__account_daily_report"], "test.microsoft_ads.not_null_stg_microsoft_ads__ad_group_history_ad_group_id.c8353342b7": ["model.microsoft_ads.stg_microsoft_ads__ad_group_history"], "test.microsoft_ads.not_null_stg_microsoft_ads__ad_group_daily_report_ad_group_id.3e03e6eff7": ["model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report"], "test.microsoft_ads.not_null_stg_microsoft_ads__ad_history_ad_id.6d02c26574": ["model.microsoft_ads.stg_microsoft_ads__ad_history"], "test.microsoft_ads.not_null_stg_microsoft_ads__ad_daily_report_ad_id.1ed6689aa8": ["model.microsoft_ads.stg_microsoft_ads__ad_daily_report"], "test.microsoft_ads.not_null_stg_microsoft_ads__campaign_history_campaign_id.ee080a2122": ["model.microsoft_ads.stg_microsoft_ads__campaign_history"], "test.microsoft_ads.not_null_stg_microsoft_ads__campaign_daily_report_campaign_id.8ac0418e84": ["model.microsoft_ads.stg_microsoft_ads__campaign_daily_report"], "test.microsoft_ads.not_null_stg_microsoft_ads__keyword_history_keyword_id.19164a6209": ["model.microsoft_ads.stg_microsoft_ads__keyword_history"], "test.microsoft_ads.not_null_stg_microsoft_ads__keyword_daily_report_keyword_id.e16b8c5047": ["model.microsoft_ads.stg_microsoft_ads__keyword_daily_report"], "test.microsoft_ads.not_null_stg_microsoft_ads__search_daily_report_search_query.57f687adcc": ["model.microsoft_ads.stg_microsoft_ads__search_daily_report"], "test.facebook_ads.not_null_facebook_ads__url_report_base_url.b7757e50be": ["model.facebook_ads.facebook_ads__url_report"], "test.facebook_ads.not_null_facebook_ads__ad_report_ad_id.3811d9c238": ["model.facebook_ads.facebook_ads__ad_report"], "test.facebook_ads.not_null_facebook_ads__ad_set_report_ad_set_id.1ac870f5e4": ["model.facebook_ads.facebook_ads__ad_set_report"], "test.facebook_ads.not_null_facebook_ads__campaign_report_campaign_id.d4f96d8d21": ["model.facebook_ads.facebook_ads__campaign_report"], "test.facebook_ads.not_null_facebook_ads__account_report_account_id.9be02b4024": ["model.facebook_ads.facebook_ads__account_report"], "test.facebook_ads.not_null_facebook_ads__url_tags__fivetran_id.151d9515f3": ["model.facebook_ads.facebook_ads__url_tags"], "test.facebook_ads.not_null_stg_facebook_ads__account_history_account_id.f1cf38c40f": ["model.facebook_ads.stg_facebook_ads__account_history"], "test.facebook_ads.not_null_stg_facebook_ads__account_history__fivetran_synced.0570e35e1f": ["model.facebook_ads.stg_facebook_ads__account_history"], "test.facebook_ads.not_null_stg_facebook_ads__ad_history_ad_id.11429d3064": ["model.facebook_ads.stg_facebook_ads__ad_history"], "test.facebook_ads.not_null_stg_facebook_ads__ad_history_updated_at.250a5a84e4": ["model.facebook_ads.stg_facebook_ads__ad_history"], "test.facebook_ads.not_null_stg_facebook_ads__ad_set_history_ad_set_id.e19a1df1bb": ["model.facebook_ads.stg_facebook_ads__ad_set_history"], "test.facebook_ads.not_null_stg_facebook_ads__ad_set_history_updated_at.ef7fafe0fa": ["model.facebook_ads.stg_facebook_ads__ad_set_history"], "test.facebook_ads.not_null_stg_facebook_ads__campaign_history_campaign_id.1ca7a83852": ["model.facebook_ads.stg_facebook_ads__campaign_history"], "test.facebook_ads.not_null_stg_facebook_ads__campaign_history_updated_at.9e59f99270": ["model.facebook_ads.stg_facebook_ads__campaign_history"], "test.facebook_ads.not_null_stg_facebook_ads__creative_history__fivetran_synced.3b0593cb4f": ["model.facebook_ads.stg_facebook_ads__creative_history"], "test.facebook_ads.not_null_stg_facebook_ads__creative_history_creative_id.eb4d804261": ["model.facebook_ads.stg_facebook_ads__creative_history"], "test.facebook_ads.not_null_stg_facebook_ads__basic_ad_ad_id.2611b250fc": ["model.facebook_ads.stg_facebook_ads__basic_ad"], "test.facebook_ads.not_null_stg_facebook_ads__basic_ad_account_id.d06f6d861b": ["model.facebook_ads.stg_facebook_ads__basic_ad"], "source.linkedin.linkedin_ads.ad_analytics_by_creative": [], "source.linkedin.linkedin_ads.creative_history": [], "source.linkedin.linkedin_ads.campaign_history": [], "source.linkedin.linkedin_ads.campaign_group_history": [], "source.linkedin.linkedin_ads.account_history": [], "source.linkedin.linkedin_ads.ad_analytics_by_campaign": [], "source.linkedin.linkedin_ads.geo": [], "source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_country": [], "source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_region": [], "source.apple_search_ads.apple_search_ads.ad_group_history": [], "source.apple_search_ads.apple_search_ads.ad_group_report": [], "source.apple_search_ads.apple_search_ads.ad_history": [], "source.apple_search_ads.apple_search_ads.ad_level_report": [], "source.apple_search_ads.apple_search_ads.campaign_history": [], "source.apple_search_ads.apple_search_ads.campaign_report": [], "source.apple_search_ads.apple_search_ads.keyword_history": [], "source.apple_search_ads.apple_search_ads.keyword_report": [], "source.apple_search_ads.apple_search_ads.organization": [], "source.apple_search_ads.apple_search_ads.search_term_report": [], "source.reddit_ads.reddit_ads.business_account": [], "source.reddit_ads.reddit_ads.account_report": [], "source.reddit_ads.reddit_ads.ad": [], "source.reddit_ads.reddit_ads.ad_report": [], "source.reddit_ads.reddit_ads.ad_group": [], "source.reddit_ads.reddit_ads.ad_group_report": [], "source.reddit_ads.reddit_ads.campaign": [], "source.reddit_ads.reddit_ads.campaign_report": [], "source.reddit_ads.reddit_ads.account_conversions_report": [], "source.reddit_ads.reddit_ads.ad_group_conversions_report": [], "source.reddit_ads.reddit_ads.ad_conversions_report": [], "source.reddit_ads.reddit_ads.campaign_conversions_report": [], "source.reddit_ads.reddit_ads.campaign_country_report": [], "source.reddit_ads.reddit_ads.campaign_country_conversions_report": [], "source.snapchat_ads.snapchat_ads.ad_account_history": [], "source.snapchat_ads.snapchat_ads.ad_history": [], "source.snapchat_ads.snapchat_ads.ad_hourly_report": [], "source.snapchat_ads.snapchat_ads.ad_squad_history": [], "source.snapchat_ads.snapchat_ads.ad_squad_hourly_report": [], "source.snapchat_ads.snapchat_ads.campaign_history": [], "source.snapchat_ads.snapchat_ads.campaign_hourly_report": [], "source.snapchat_ads.snapchat_ads.creative_history": [], "source.snapchat_ads.snapchat_ads.creative_url_tag_history": [], "source.snapchat_ads.snapchat_ads.campaign_geo_country_daily_report": [], "source.snapchat_ads.snapchat_ads.campaign_geo_region_daily_report": [], "source.pinterest.pinterest_ads.pin_promotion_report": [], "source.pinterest.pinterest_ads.pin_promotion_history": [], "source.pinterest.pinterest_ads.campaign_history": [], "source.pinterest.pinterest_ads.ad_group_history": [], "source.pinterest.pinterest_ads.ad_group_report": [], "source.pinterest.pinterest_ads.advertiser_history": [], "source.pinterest.pinterest_ads.advertiser_report": [], "source.pinterest.pinterest_ads.campaign_report": [], "source.pinterest.pinterest_ads.keyword_history": [], "source.pinterest.pinterest_ads.keyword_report": [], "source.pinterest.pinterest_ads.pin_promotion_targeting_report": [], "source.pinterest.pinterest_ads.targeting_geo": [], "source.pinterest.pinterest_ads.targeting_geo_region": [], "source.google_ads.google_ads.ad_stats": [], "source.google_ads.google_ads.ad_history": [], "source.google_ads.google_ads.ad_group_history": [], "source.google_ads.google_ads.campaign_history": [], "source.google_ads.google_ads.account_history": [], "source.google_ads.google_ads.ad_group_criterion_history": [], "source.google_ads.google_ads.ad_group_stats": [], "source.google_ads.google_ads.campaign_stats": [], "source.google_ads.google_ads.keyword_stats": [], "source.google_ads.google_ads.account_stats": [], "source.google_ads.google_ads.search_term_keyword_stats": [], "source.google_ads.google_ads.campaign_bid_modifier_history": [], "source.google_ads.google_ads.campaign_budget_history": [], "source.google_ads.google_ads.campaign_criterion_history": [], "source.google_ads.google_ads.campaign_bidding_strategy_history": [], "source.amazon_ads.amazon_ads.ad_group_history": [], "source.amazon_ads.amazon_ads.ad_group_level_report": [], "source.amazon_ads.amazon_ads.advertised_product_report": [], "source.amazon_ads.amazon_ads.campaign_history": [], "source.amazon_ads.amazon_ads.campaign_level_report": [], "source.amazon_ads.amazon_ads.keyword_history": [], "source.amazon_ads.amazon_ads.portfolio_history": [], "source.amazon_ads.amazon_ads.product_ad_history": [], "source.amazon_ads.amazon_ads.profile": [], "source.amazon_ads.amazon_ads.targeting_keyword_report": [], "source.amazon_ads.amazon_ads.search_term_ad_keyword_report": [], "source.twitter_ads.twitter_ads.account_history": [], "source.twitter_ads.twitter_ads.campaign_history": [], "source.twitter_ads.twitter_ads.line_item_history": [], "source.twitter_ads.twitter_ads.promoted_tweet_history": [], "source.twitter_ads.twitter_ads.tweet_url": [], "source.twitter_ads.twitter_ads.promoted_tweet_report": [], "source.twitter_ads.twitter_ads.tweet": [], "source.twitter_ads.twitter_ads.campaign_report": [], "source.twitter_ads.twitter_ads.line_item_report": [], "source.twitter_ads.twitter_ads.line_item_keywords_report": [], "source.twitter_ads.twitter_ads.campaign_locations_report": [], "source.twitter_ads.twitter_ads.campaign_regions_report": [], "source.tiktok_ads.tiktok_ads.advertiser": [], "source.tiktok_ads.tiktok_ads.campaign_history": [], "source.tiktok_ads.tiktok_ads.adgroup_history": [], "source.tiktok_ads.tiktok_ads.ad_history": [], "source.tiktok_ads.tiktok_ads.ad_report_hourly": [], "source.tiktok_ads.tiktok_ads.campaign_report_hourly": [], "source.tiktok_ads.tiktok_ads.adgroup_report_hourly": [], "source.tiktok_ads.tiktok_ads.campaign_country_report": [], "source.tiktok_ads.tiktok_ads.location": [], "source.microsoft_ads.microsoft_ads.account_history": [], "source.microsoft_ads.microsoft_ads.account_performance_daily_report": [], "source.microsoft_ads.microsoft_ads.ad_group_history": [], "source.microsoft_ads.microsoft_ads.ad_group_performance_daily_report": [], "source.microsoft_ads.microsoft_ads.ad_history": [], "source.microsoft_ads.microsoft_ads.ad_performance_daily_report": [], "source.microsoft_ads.microsoft_ads.campaign_history": [], "source.microsoft_ads.microsoft_ads.campaign_performance_daily_report": [], "source.microsoft_ads.microsoft_ads.keyword_history": [], "source.microsoft_ads.microsoft_ads.keyword_performance_daily_report": [], "source.microsoft_ads.microsoft_ads.search_query_performance_daily_report": [], "source.microsoft_ads.microsoft_ads.geographic_performance_daily_report": [], "source.facebook_ads.facebook_ads.account_history": [], "source.facebook_ads.facebook_ads.ad_history": [], "source.facebook_ads.facebook_ads.ad_set_history": [], "source.facebook_ads.facebook_ads.basic_ad": [], "source.facebook_ads.facebook_ads.basic_ad_actions": [], "source.facebook_ads.facebook_ads.basic_ad_action_values": [], "source.facebook_ads.facebook_ads.campaign_history": [], "source.facebook_ads.facebook_ads.creative_history": [], "source.facebook_ads.facebook_ads.demographics_country": [], "source.facebook_ads.facebook_ads.demographics_country_actions": [], "source.facebook_ads.facebook_ads.demographics_region": [], "source.facebook_ads.facebook_ads.demographics_region_actions": [], "metric.ad_reporting.active_ads": ["semantic_model.ad_reporting.ad_report"], "metric.ad_reporting.avg_spend_nonzero": ["semantic_model.ad_reporting.ad_report"], "metric.ad_reporting.avg_spend": ["semantic_model.ad_reporting.ad_report"], "metric.ad_reporting.clicks": ["semantic_model.ad_reporting.ad_report"], "metric.ad_reporting.impressions": ["semantic_model.ad_reporting.ad_report"], "metric.ad_reporting.spend": ["semantic_model.ad_reporting.ad_report"], "metric.ad_reporting.clickthrough_rate": ["metric.ad_reporting.clicks", "metric.ad_reporting.impressions"], "metric.ad_reporting.cost_per_click": ["metric.ad_reporting.clicks", "metric.ad_reporting.spend"], "metric.ad_reporting.bounce_rate": ["metric.ad_reporting.clicks", "metric.ad_reporting.impressions"], "semantic_model.ad_reporting.ad_report": ["model.ad_reporting.ad_reporting__ad_report"]}, "child_map": {"seed.ad_reporting_integration_tests.twitter_campaign_locations_report_data": [], "seed.ad_reporting_integration_tests.apple_search_ad_history_data": [], "seed.ad_reporting_integration_tests.snapchat_ad_hourly_report_data": [], "seed.ad_reporting_integration_tests.linkedin_ad_account_history_data": [], "seed.ad_reporting_integration_tests.google_ads_account_history_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_campaign_performance_daily_report_data": [], "seed.ad_reporting_integration_tests.tiktok_advertiser_data": [], "seed.ad_reporting_integration_tests.amazon_ads_targeting_keyword_report_data": [], "seed.ad_reporting_integration_tests.snapchat_creative_url_tag_history_data": [], "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_actions_data": [], "seed.ad_reporting_integration_tests.amazon_ads_ad_group_history_data": [], "seed.ad_reporting_integration_tests.reddit_ads_campaign_data": [], "seed.ad_reporting_integration_tests.apple_search_ad_report_data": [], "seed.ad_reporting_integration_tests.reddit_ads_ad_group_report_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_geographic_performance_daily_report_data": [], "seed.ad_reporting_integration_tests.twitter_promoted_tweet_report_data": [], "seed.ad_reporting_integration_tests.snapchat_creative_history_data": [], "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_data": [], "seed.ad_reporting_integration_tests.google_ads_ad_group_criterion_history_data": [], "seed.ad_reporting_integration_tests.amazon_ads_portfolio_history_data": [], "seed.ad_reporting_integration_tests.apple_search_organization_data": [], "seed.ad_reporting_integration_tests.twitter_campaign_history_data": [], "seed.ad_reporting_integration_tests.linkedin_monthly_ad_analytics_by_member_region_data": [], "seed.ad_reporting_integration_tests.apple_search_campaign_history_data": [], "seed.ad_reporting_integration_tests.pinterest_campaign_report_data": [], "seed.ad_reporting_integration_tests.snapchat_campaign_history_data": [], "seed.ad_reporting_integration_tests.twitter_account_report_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_account_history_data": [], "seed.ad_reporting_integration_tests.snapchat_campaign_hourly_report_data": [], "seed.ad_reporting_integration_tests.facebook_ads_account_history_data": [], "seed.ad_reporting_integration_tests.apple_search_search_term_report_data": [], "seed.ad_reporting_integration_tests.linkedin_monthly_ad_analytics_by_member_country_data": [], "seed.ad_reporting_integration_tests.twitter_promoted_tweet_history_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_search_performance_daily_report_data": [], "seed.ad_reporting_integration_tests.reddit_ads_campaign_report_data": [], "seed.ad_reporting_integration_tests.facebook_ads_demographics_region_actions_data": [], "seed.ad_reporting_integration_tests.twitter_campaign_regions_report_data": [], "seed.ad_reporting_integration_tests.reddit_ads_campaign_country_conversions_report_data": [], "seed.ad_reporting_integration_tests.google_ads_search_term_keyword_stats_data": [], "seed.ad_reporting_integration_tests.snapchat_ad_history_data": [], "seed.ad_reporting_integration_tests.reddit_ads_ad_report_data": [], "seed.ad_reporting_integration_tests.google_ads_campaign_bidding_strategy_history_data": [], "seed.ad_reporting_integration_tests.google_ads_campaign_budget_history_data": [], "seed.ad_reporting_integration_tests.reddit_ads_ad_conversions": [], "seed.ad_reporting_integration_tests.tiktok_location_data": [], "seed.ad_reporting_integration_tests.pinterest_advertiser_report_data": [], "seed.ad_reporting_integration_tests.snapchat_ad_squad_history_data": [], "seed.ad_reporting_integration_tests.twitter_tweet_url_data": [], "seed.ad_reporting_integration_tests.linkedin_ad_creative_history_data": [], "seed.ad_reporting_integration_tests.amazon_ads_search_term_ad_keyword_report_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_ad_group_history_data": [], "seed.ad_reporting_integration_tests.facebook_ads_demographics_region_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_ad_performance_daily_report_data": [], "seed.ad_reporting_integration_tests.apple_search_keyword_history_data": [], "seed.ad_reporting_integration_tests.reddit_ads_account_data": [], "seed.ad_reporting_integration_tests.linkedin_ad_campaign_group_history_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_keyword_performance_daily_report_data": [], "seed.ad_reporting_integration_tests.google_ads_ad_group_history_data": [], "seed.ad_reporting_integration_tests.amazon_ads_profile_data": [], "seed.ad_reporting_integration_tests.pinterest_campaign_history_data": [], "seed.ad_reporting_integration_tests.twitter_line_item_report_data": [], "seed.ad_reporting_integration_tests.google_ads_campaign_stats_data": [], "seed.ad_reporting_integration_tests.twitter_line_item_history_data": [], "seed.ad_reporting_integration_tests.google_ads_ad_stats_data": [], "seed.ad_reporting_integration_tests.reddit_ads_account_conversions": [], "seed.ad_reporting_integration_tests.google_ads_account_stats_data": [], "seed.ad_reporting_integration_tests.snapchat_campaign_geo_country_daily_report_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_ad_group_performance_daily_report_data": [], "seed.ad_reporting_integration_tests.amazon_ads_product_ad_history_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_ad_history_data": [], "seed.ad_reporting_integration_tests.reddit_ads_campaign_country_report_data": [], "seed.ad_reporting_integration_tests.facebook_ads_ad_history_data": [], "seed.ad_reporting_integration_tests.pinterest_ad_group_report_data": [], "seed.ad_reporting_integration_tests.twitter_campaign_report_data": [], "seed.ad_reporting_integration_tests.facebook_ads_ad_set_history_data": [], "seed.ad_reporting_integration_tests.snapchat_campaign_geo_region_daily_report_data": [], "seed.ad_reporting_integration_tests.pinterest_pin_promotion_history_data": [], "seed.ad_reporting_integration_tests.amazon_ads_ad_group_level_report_data": [], "seed.ad_reporting_integration_tests.twitter_line_item_keywords_report_data": [], "seed.ad_reporting_integration_tests.twitter_tweet_data": [], "seed.ad_reporting_integration_tests.tiktok_campaign_country_report_data": [], "seed.ad_reporting_integration_tests.facebook_ads_creative_history_data": [], "seed.ad_reporting_integration_tests.facebook_ads_campaign_history_data": [], "seed.ad_reporting_integration_tests.amazon_ads_campaign_level_report_data": [], "seed.ad_reporting_integration_tests.google_ads_ad_group_stats_data": [], "seed.ad_reporting_integration_tests.apple_search_keyword_report_data": [], "seed.ad_reporting_integration_tests.tiktok_campaign_report_hourly_data": [], "seed.ad_reporting_integration_tests.amazon_ads_advertised_product_report_data": [], "seed.ad_reporting_integration_tests.twitter_account_history_data": [], "seed.ad_reporting_integration_tests.apple_search_ad_group_history_data": [], "seed.ad_reporting_integration_tests.tiktok_adgroup_history_data": [], "seed.ad_reporting_integration_tests.apple_search_campaign_report_data": [], "seed.ad_reporting_integration_tests.reddit_ads_ad_data": [], "seed.ad_reporting_integration_tests.snapchat_ad_squad_hourly_report_data": [], "seed.ad_reporting_integration_tests.linkedin_ad_analytics_by_campaign_data": [], "seed.ad_reporting_integration_tests.snapchat_ad_account_history_data": [], "seed.ad_reporting_integration_tests.tiktok_ad_history_data": [], "seed.ad_reporting_integration_tests.linkedin_ad_analytics_by_creative_data": [], "seed.ad_reporting_integration_tests.reddit_ads_account_report_data": [], "seed.ad_reporting_integration_tests.reddit_ads_ad_group_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_campaign_history_data": [], "seed.ad_reporting_integration_tests.pinterest_pin_promotion_report_data": [], "seed.ad_reporting_integration_tests.pinterest_targeting_geo_data": [], "seed.ad_reporting_integration_tests.linkedin_geo_data": [], "seed.ad_reporting_integration_tests.linkedin_ad_campaign_history_data": [], "seed.ad_reporting_integration_tests.tiktok_campaign_history_data": [], "seed.ad_reporting_integration_tests.google_ads_ad_history_data": [], "seed.ad_reporting_integration_tests.google_ads_campaign_criterion_history_data": [], "seed.ad_reporting_integration_tests.google_ads_campaign_bid_modifier_history_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_account_performance_daily_report_data": [], "seed.ad_reporting_integration_tests.tiktok_adgroup_report_hourly_data": [], "seed.ad_reporting_integration_tests.google_ads_keyword_stats_data": [], "seed.ad_reporting_integration_tests.pinterest_keyword_report_data": [], "seed.ad_reporting_integration_tests.google_ads_campaign_history_data": [], "seed.ad_reporting_integration_tests.pinterest_keyword_history_data": [], "seed.ad_reporting_integration_tests.pinterest_ad_group_history_data": [], "seed.ad_reporting_integration_tests.pinterest_advertiser_history_data": [], "seed.ad_reporting_integration_tests.amazon_ads_campaign_history_data": [], "seed.ad_reporting_integration_tests.facebook_ads_demographics_country_data": [], "seed.ad_reporting_integration_tests.reddit_ads_campaign_conversions": [], "seed.ad_reporting_integration_tests.facebook_ads_demographics_country_actions_data": [], "seed.ad_reporting_integration_tests.apple_search_ad_group_report_data": [], "seed.ad_reporting_integration_tests.reddit_ads_business_account_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_keyword_history_data": [], "seed.ad_reporting_integration_tests.amazon_ads_keyword_history_data": [], "seed.ad_reporting_integration_tests.pinterest_pin_promotion_targeting_report_data": [], "seed.ad_reporting_integration_tests.reddit_ads_ad_group_conversions": [], "seed.ad_reporting_integration_tests.tiktok_ad_report_hourly_data": [], "seed.ad_reporting_integration_tests.pinterest_targeting_geo_region_data": [], "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_action_values_data": [], "model.linkedin.linkedin_ads__creative_report": ["model.ad_reporting.int_ad_reporting__ad_report", "test.linkedin.not_null_linkedin_ads__creative_report_creative_id.096d93f889", "test.linkedin.not_null_linkedin_ads__creative_report_date_day.0c6338b020"], "model.linkedin.linkedin_ads__campaign_report": ["model.ad_reporting.int_ad_reporting__ad_group_report", "test.linkedin.not_null_linkedin_ads__campaign_report_campaign_id.bf43964b15", "test.linkedin.not_null_linkedin_ads__campaign_report_date_day.8d320b88b1"], "model.linkedin.linkedin_ads__monthly_campaign_region_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_region_report", "test.linkedin.not_null_linkedin_ads__monthly_campaign_region_report_campaign_id.5884bc5d68", "test.linkedin.not_null_linkedin_ads__monthly_campaign_region_report_date_month.4fd809085e"], "model.linkedin.linkedin_ads__monthly_campaign_country_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_country_report", "test.linkedin.not_null_linkedin_ads__monthly_campaign_country_report_campaign_id.4624641c1c", "test.linkedin.not_null_linkedin_ads__monthly_campaign_country_report_date_month.ab0a8d3050"], "model.linkedin.linkedin_ads__account_report": ["model.ad_reporting.int_ad_reporting__account_report", "test.linkedin.not_null_linkedin_ads__account_report_account_id.0c34ea1842", "test.linkedin.not_null_linkedin_ads__account_report_date_day.c4b33f8f53"], "model.linkedin.linkedin_ads__campaign_group_report": ["model.ad_reporting.int_ad_reporting__campaign_report", "test.linkedin.not_null_linkedin_ads__campaign_group_report_campaign_group_id.39b448cdaf", "test.linkedin.not_null_linkedin_ads__campaign_group_report_date_day.2676a1f76b"], "model.linkedin.linkedin_ads__url_report": ["model.ad_reporting.int_ad_reporting__url_report", "test.linkedin.not_null_linkedin_ads__url_report_click_uri.81534087cb", "test.linkedin.not_null_linkedin_ads__url_report_creative_id.83967fe9d2", "test.linkedin.not_null_linkedin_ads__url_report_date_day.48b540f315"], "model.linkedin.stg_linkedin_ads__geo": ["model.linkedin.linkedin_ads__monthly_campaign_country_report", "model.linkedin.linkedin_ads__monthly_campaign_region_report", "test.linkedin.not_null_stg_linkedin_ads__geo_geo_id.a9fc61210c"], "model.linkedin.stg_linkedin_ads__account_history": ["model.linkedin.linkedin_ads__account_report", "model.linkedin.linkedin_ads__campaign_group_report", "model.linkedin.linkedin_ads__campaign_report", "model.linkedin.linkedin_ads__creative_report", "model.linkedin.linkedin_ads__monthly_campaign_country_report", "model.linkedin.linkedin_ads__monthly_campaign_region_report", "model.linkedin.linkedin_ads__url_report", "test.linkedin.not_null_stg_linkedin_ads__account_history_account_id.a9fa7f93c0", "test.linkedin.not_null_stg_linkedin_ads__account_history_version_tag.58c46c5d81"], "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative": ["model.linkedin.linkedin_ads__creative_report", "model.linkedin.linkedin_ads__url_report", "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_creative_creative_id.062abfe14b", "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_creative_date_day.cb81bc4766"], "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country": ["model.linkedin.linkedin_ads__monthly_campaign_country_report", "test.linkedin.not_null_stg_linkedin_ads__monthly_ad_analytics_by_country_date_month.553fe89e70"], "model.linkedin.stg_linkedin_ads__campaign_group_history": ["model.linkedin.linkedin_ads__campaign_group_report", "model.linkedin.linkedin_ads__campaign_report", "model.linkedin.linkedin_ads__creative_report", "model.linkedin.linkedin_ads__monthly_campaign_country_report", "model.linkedin.linkedin_ads__monthly_campaign_region_report", "model.linkedin.linkedin_ads__url_report", "test.linkedin.not_null_stg_linkedin_ads__campaign_group_history_campaign_group_id.3888f3777d", "test.linkedin.not_null_stg_linkedin_ads__campaign_group_history_last_modified_at.a716e2a7ea"], "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region": ["model.linkedin.linkedin_ads__monthly_campaign_region_report", "test.linkedin.not_null_stg_linkedin_ads__monthly_ad_analytics_by_region_date_month.d065ed2b78"], "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign": ["model.linkedin.linkedin_ads__account_report", "model.linkedin.linkedin_ads__campaign_group_report", "model.linkedin.linkedin_ads__campaign_report", "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_campaign_campaign_id.d6ae242f1a", "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_campaign_date_day.ef97bed766"], "model.linkedin.stg_linkedin_ads__campaign_history": ["model.linkedin.linkedin_ads__account_report", "model.linkedin.linkedin_ads__campaign_group_report", "model.linkedin.linkedin_ads__campaign_report", "model.linkedin.linkedin_ads__creative_report", "model.linkedin.linkedin_ads__monthly_campaign_country_report", "model.linkedin.linkedin_ads__monthly_campaign_region_report", "model.linkedin.linkedin_ads__url_report", "test.linkedin.not_null_stg_linkedin_ads__campaign_history_campaign_id.b026971ca2", "test.linkedin.not_null_stg_linkedin_ads__campaign_history_version_tag.64954cc469"], "model.linkedin.stg_linkedin_ads__creative_history": ["model.linkedin.linkedin_ads__creative_report", "model.linkedin.linkedin_ads__url_report", "test.linkedin.not_null_stg_linkedin_ads__creative_history_creative_id.4d51d55474"], "model.linkedin.stg_linkedin_ads__creative_history_tmp": ["model.linkedin.stg_linkedin_ads__creative_history"], "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region_tmp": ["model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region"], "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country_tmp": ["model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country"], "model.linkedin.stg_linkedin_ads__campaign_history_tmp": ["model.linkedin.stg_linkedin_ads__campaign_history"], "model.linkedin.stg_linkedin_ads__campaign_group_history_tmp": ["model.linkedin.stg_linkedin_ads__campaign_group_history"], "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign_tmp": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign"], "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative_tmp": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_creative"], "model.linkedin.stg_linkedin_ads__geo_tmp": ["model.linkedin.stg_linkedin_ads__geo"], "model.linkedin.stg_linkedin_ads__account_history_tmp": ["model.linkedin.stg_linkedin_ads__account_history"], "model.apple_search_ads.apple_search_ads__campaign_report": ["model.ad_reporting.int_ad_reporting__campaign_report", "test.apple_search_ads.not_null_apple_search_ads__campaign_report_campaign_id.e26ed1e146", "test.apple_search_ads.not_null_apple_search_ads__campaign_report_date_day.35652b8d1a"], "model.apple_search_ads.apple_search_ads__organization_report": ["model.ad_reporting.int_ad_reporting__account_report", "test.apple_search_ads.not_null_apple_search_ads__organization_report_date_day.5784fed523", "test.apple_search_ads.not_null_apple_search_ads__organization_report_organization_id.b6cf7d69f8"], "model.apple_search_ads.apple_search_ads__search_term_report": ["model.ad_reporting.int_ad_reporting__search_report", "test.apple_search_ads.not_null_apple_search_ads__search_term_report_date_day.1bc3b0d57c", "test.apple_search_ads.not_null_apple_search_ads__search_term_report_search_term_text.aecc7447f7"], "model.apple_search_ads.apple_search_ads__ad_report": ["model.ad_reporting.int_ad_reporting__ad_report", "test.apple_search_ads.not_null_apple_search_ads__ad_report_ad_id.0ab2c5075c", "test.apple_search_ads.not_null_apple_search_ads__ad_report_date_day.b86c049e17"], "model.apple_search_ads.apple_search_ads__keyword_report": ["model.ad_reporting.int_ad_reporting__keyword_report", "test.apple_search_ads.not_null_apple_search_ads__keyword_report_date_day.3dec8d0e82", "test.apple_search_ads.not_null_apple_search_ads__keyword_report_keyword_id.ea493710db"], "model.apple_search_ads.apple_search_ads__ad_group_report": ["model.ad_reporting.int_ad_reporting__ad_group_report", "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_ad_group_id.60febec6b5", "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_date_day.e6ffb30b3c"], "model.apple_search_ads.stg_apple_search_ads__ad_group_history": ["model.apple_search_ads.apple_search_ads__ad_group_report", "model.apple_search_ads.apple_search_ads__ad_report", "model.apple_search_ads.apple_search_ads__keyword_report", "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7", "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f"], "model.apple_search_ads.stg_apple_search_ads__keyword_history": ["model.apple_search_ads.apple_search_ads__keyword_report", "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2", "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287"], "model.apple_search_ads.stg_apple_search_ads__keyword_report": ["model.apple_search_ads.apple_search_ads__keyword_report", "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928", "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e"], "model.apple_search_ads.stg_apple_search_ads__campaign_report": ["model.apple_search_ads.apple_search_ads__campaign_report", "model.apple_search_ads.apple_search_ads__organization_report", "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728", "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3"], "model.apple_search_ads.stg_apple_search_ads__search_term_report": ["model.apple_search_ads.apple_search_ads__search_term_report", "test.apple_search_ads.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad", "test.apple_search_ads.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302"], "model.apple_search_ads.stg_apple_search_ads__campaign_history": ["model.apple_search_ads.apple_search_ads__ad_group_report", "model.apple_search_ads.apple_search_ads__ad_report", "model.apple_search_ads.apple_search_ads__campaign_report", "model.apple_search_ads.apple_search_ads__keyword_report", "model.apple_search_ads.apple_search_ads__organization_report", "model.apple_search_ads.apple_search_ads__search_term_report", "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8", "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9"], "model.apple_search_ads.stg_apple_search_ads__ad_report": ["model.apple_search_ads.apple_search_ads__ad_report", "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f", "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58", "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8"], "model.apple_search_ads.stg_apple_search_ads__ad_history": ["model.apple_search_ads.apple_search_ads__ad_report", "test.apple_search_ads.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a", "test.apple_search_ads.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d"], "model.apple_search_ads.stg_apple_search_ads__ad_group_report": ["model.apple_search_ads.apple_search_ads__ad_group_report", "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1", "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b"], "model.apple_search_ads.stg_apple_search_ads__organization": ["model.apple_search_ads.apple_search_ads__ad_group_report", "model.apple_search_ads.apple_search_ads__ad_report", "model.apple_search_ads.apple_search_ads__campaign_report", "model.apple_search_ads.apple_search_ads__keyword_report", "model.apple_search_ads.apple_search_ads__organization_report", "model.apple_search_ads.apple_search_ads__search_term_report", "test.apple_search_ads.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb"], "model.apple_search_ads.stg_apple_search_ads__ad_group_history_tmp": ["model.apple_search_ads.stg_apple_search_ads__ad_group_history"], "model.apple_search_ads.stg_apple_search_ads__campaign_report_tmp": ["model.apple_search_ads.stg_apple_search_ads__campaign_report"], "model.apple_search_ads.stg_apple_search_ads__campaign_history_tmp": ["model.apple_search_ads.stg_apple_search_ads__campaign_history"], "model.apple_search_ads.stg_apple_search_ads__keyword_history_tmp": ["model.apple_search_ads.stg_apple_search_ads__keyword_history"], "model.apple_search_ads.stg_apple_search_ads__search_term_report_tmp": ["model.apple_search_ads.stg_apple_search_ads__search_term_report"], "model.apple_search_ads.stg_apple_search_ads__keyword_report_tmp": ["model.apple_search_ads.stg_apple_search_ads__keyword_report"], "model.apple_search_ads.stg_apple_search_ads__ad_history_tmp": ["model.apple_search_ads.stg_apple_search_ads__ad_history"], "model.apple_search_ads.stg_apple_search_ads__ad_report_tmp": ["model.apple_search_ads.stg_apple_search_ads__ad_report"], "model.apple_search_ads.stg_apple_search_ads__ad_group_report_tmp": ["model.apple_search_ads.stg_apple_search_ads__ad_group_report"], "model.apple_search_ads.stg_apple_search_ads__organization_tmp": ["model.apple_search_ads.stg_apple_search_ads__organization"], "model.reddit_ads.reddit_ads__campaign_report": ["model.ad_reporting.int_ad_reporting__campaign_report", "test.reddit_ads.not_null_reddit_ads__campaign_report_campaign_id.f5491a0b49", "test.reddit_ads.not_null_reddit_ads__campaign_report_date_day.f79cca4131"], "model.reddit_ads.reddit_ads__campaign_country_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_country_report"], "model.reddit_ads.reddit_ads__url_report": ["model.ad_reporting.int_ad_reporting__url_report", "test.reddit_ads.not_null_reddit_ads__url_report_ad_id.8ff83da2b0", "test.reddit_ads.not_null_reddit_ads__url_report_base_url.2f585bebcb", "test.reddit_ads.not_null_reddit_ads__url_report_date_day.4b0f6363da"], "model.reddit_ads.reddit_ads__account_report": ["model.ad_reporting.int_ad_reporting__account_report", "test.reddit_ads.not_null_reddit_ads__account_report_account_id.16f11188c5", "test.reddit_ads.not_null_reddit_ads__account_report_date_day.7b43e6cb90"], "model.reddit_ads.reddit_ads__ad_report": ["model.ad_reporting.int_ad_reporting__ad_report", "test.reddit_ads.not_null_reddit_ads__ad_report_ad_id.1da054a14e", "test.reddit_ads.not_null_reddit_ads__ad_report_date_day.608b21c69a"], "model.reddit_ads.reddit_ads__ad_group_report": ["model.ad_reporting.int_ad_reporting__ad_group_report", "test.reddit_ads.not_null_reddit_ads__ad_group_report_ad_group_id.057bd60604", "test.reddit_ads.not_null_reddit_ads__ad_group_report_date_day.6463e6f6f7"], "model.reddit_ads.stg_reddit_ads__ad_group": ["model.reddit_ads.reddit_ads__ad_group_report", "model.reddit_ads.reddit_ads__ad_report", "model.reddit_ads.reddit_ads__url_report", "test.reddit_ads.not_null_stg_reddit_ads__ad_group_ad_group_id.65795d8dc2"], "model.reddit_ads.stg_reddit_ads__ad_report": ["model.reddit_ads.reddit_ads__ad_report", "model.reddit_ads.reddit_ads__url_report", "test.reddit_ads.not_null_stg_reddit_ads__ad_report_ad_id.c4af84b857"], "model.reddit_ads.stg_reddit_ads__ad_conversions_report": ["model.reddit_ads.reddit_ads__ad_report", "model.reddit_ads.reddit_ads__url_report"], "model.reddit_ads.stg_reddit_ads__campaign": ["model.reddit_ads.reddit_ads__ad_group_report", "model.reddit_ads.reddit_ads__ad_report", "model.reddit_ads.reddit_ads__campaign_country_report", "model.reddit_ads.reddit_ads__campaign_report", "model.reddit_ads.reddit_ads__url_report", "test.reddit_ads.not_null_stg_reddit_ads__campaign_campaign_id.f3f24e4682"], "model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report": ["model.reddit_ads.reddit_ads__campaign_country_report"], "model.reddit_ads.stg_reddit_ads__campaign_report": ["model.reddit_ads.reddit_ads__campaign_report", "test.reddit_ads.not_null_stg_reddit_ads__campaign_report_campaign_id.c717612b4f"], "model.reddit_ads.stg_reddit_ads__ad": ["model.reddit_ads.reddit_ads__ad_report", "model.reddit_ads.reddit_ads__url_report", "test.reddit_ads.not_null_stg_reddit_ads__ad_ad_id.40188b63dd"], "model.reddit_ads.stg_reddit_ads__account_conversions_report": ["model.reddit_ads.reddit_ads__account_report"], "model.reddit_ads.stg_reddit_ads__account_report": ["model.reddit_ads.reddit_ads__account_report", "test.reddit_ads.not_null_stg_reddit_ads__account_report_account_id.1f2a0195de"], "model.reddit_ads.stg_reddit_ads__campaign_conversions_report": ["model.reddit_ads.reddit_ads__campaign_report"], "model.reddit_ads.stg_reddit_ads__ad_group_conversions_report": ["model.reddit_ads.reddit_ads__ad_group_report"], "model.reddit_ads.stg_reddit_ads__ad_group_report": ["model.reddit_ads.reddit_ads__ad_group_report", "test.reddit_ads.not_null_stg_reddit_ads__ad_group_report_ad_group_id.9836cd084d"], "model.reddit_ads.stg_reddit_ads__campaign_country_report": ["model.reddit_ads.reddit_ads__campaign_country_report"], "model.reddit_ads.stg_reddit_ads__account": ["model.reddit_ads.reddit_ads__account_report", "model.reddit_ads.reddit_ads__ad_group_report", "model.reddit_ads.reddit_ads__ad_report", "model.reddit_ads.reddit_ads__campaign_country_report", "model.reddit_ads.reddit_ads__campaign_report", "model.reddit_ads.reddit_ads__url_report", "test.reddit_ads.not_null_stg_reddit_ads__account_account_id.512f0b8078"], "model.reddit_ads.stg_reddit_ads__ad_conversions_report_tmp": ["model.reddit_ads.stg_reddit_ads__ad_conversions_report"], "model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report_tmp": ["model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report"], "model.reddit_ads.stg_reddit_ads__account_report_tmp": ["model.reddit_ads.stg_reddit_ads__account_report"], "model.reddit_ads.stg_reddit_ads__campaign_report_tmp": ["model.reddit_ads.stg_reddit_ads__campaign_report"], "model.reddit_ads.stg_reddit_ads__ad_group_conversions_report_tmp": ["model.reddit_ads.stg_reddit_ads__ad_group_conversions_report"], "model.reddit_ads.stg_reddit_ads__ad_tmp": ["model.reddit_ads.stg_reddit_ads__ad"], "model.reddit_ads.stg_reddit_ads__campaign_country_report_tmp": ["model.reddit_ads.stg_reddit_ads__campaign_country_report"], "model.reddit_ads.stg_reddit_ads__account_tmp": ["model.reddit_ads.stg_reddit_ads__account"], "model.reddit_ads.stg_reddit_ads__campaign_tmp": ["model.reddit_ads.stg_reddit_ads__campaign"], "model.reddit_ads.stg_reddit_ads__ad_group_report_tmp": ["model.reddit_ads.stg_reddit_ads__ad_group_report"], "model.reddit_ads.stg_reddit_ads__account_conversions_report_tmp": ["model.reddit_ads.stg_reddit_ads__account_conversions_report"], "model.reddit_ads.stg_reddit_ads__ad_group_tmp": ["model.reddit_ads.stg_reddit_ads__ad_group"], "model.reddit_ads.stg_reddit_ads__campaign_conversions_report_tmp": ["model.reddit_ads.stg_reddit_ads__campaign_conversions_report"], "model.reddit_ads.stg_reddit_ads__ad_report_tmp": ["model.reddit_ads.stg_reddit_ads__ad_report"], "model.snapchat_ads.snapchat_ads__campaign_report": ["model.ad_reporting.int_ad_reporting__campaign_report", "test.snapchat_ads.not_null_snapchat_ads__campaign_report_campaign_id.19fd7135ac", "test.snapchat_ads.not_null_snapchat_ads__campaign_report_date_day.4e4e31223b"], "model.snapchat_ads.snapchat_ads__url_report": ["model.ad_reporting.int_ad_reporting__url_report", "test.snapchat_ads.not_null_snapchat_ads__url_report_ad_id.ecbdfc0d78", "test.snapchat_ads.not_null_snapchat_ads__url_report_base_url.15676dc1de", "test.snapchat_ads.not_null_snapchat_ads__url_report_date_day.bcbe87a7f6"], "model.snapchat_ads.snapchat_ads__campaign_country_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_country_report", "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_campaign_id.33fe016201", "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_country.332a585832", "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_date_day.b946d6ae47"], "model.snapchat_ads.snapchat_ads__campaign_region_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_region_report", "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_campaign_id.9b92b4f074", "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_date_day.3d3ad303c4", "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_region.041579919a"], "model.snapchat_ads.snapchat_ads__ad_squad_report": ["model.ad_reporting.int_ad_reporting__ad_group_report", "test.snapchat_ads.not_null_snapchat_ads__ad_squad_report_ad_squad_id.424c0bbffe", "test.snapchat_ads.not_null_snapchat_ads__ad_squad_report_date_day.39118ca639"], "model.snapchat_ads.snapchat_ads__ad_report": ["model.ad_reporting.int_ad_reporting__ad_report", "test.snapchat_ads.not_null_snapchat_ads__ad_report_ad_id.9000850744", "test.snapchat_ads.not_null_snapchat_ads__ad_report_date_day.7c5350c8fe"], "model.snapchat_ads.snapchat_ads__account_report": ["model.ad_reporting.int_ad_reporting__account_report", "test.snapchat_ads.not_null_snapchat_ads__account_report_ad_account_id.589c81966b", "test.snapchat_ads.not_null_snapchat_ads__account_report_date_day.688d7ed260"], "model.snapchat_ads.stg_snapchat_ads__creative_history": ["model.snapchat_ads.snapchat_ads__creative_history_prep", "test.snapchat_ads.not_null_stg_snapchat_ads__creative_history__fivetran_synced.b9c95b4380", "test.snapchat_ads.not_null_stg_snapchat_ads__creative_history_creative_id.09c83690f4"], "model.snapchat_ads.stg_snapchat_ads__ad_squad_history": ["model.snapchat_ads.snapchat_ads__account_report", "model.snapchat_ads.snapchat_ads__ad_report", "model.snapchat_ads.snapchat_ads__ad_squad_report", "model.snapchat_ads.snapchat_ads__url_report", "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_history__fivetran_synced.7ed7d105ae", "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_history_ad_squad_id.71c7122278"], "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report": ["model.snapchat_ads.snapchat_ads__account_report", "model.snapchat_ads.snapchat_ads__ad_report", "model.snapchat_ads.snapchat_ads__url_report", "test.snapchat_ads.not_null_stg_snapchat_ads__ad_hourly_report_ad_id.7e763de19d", "test.snapchat_ads.not_null_stg_snapchat_ads__ad_hourly_report_date_hour.666cda1cd7"], "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report": ["model.snapchat_ads.snapchat_ads__campaign_region_report", "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_campaign_id.99fbccb78d", "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_date_day.eec50e6826", "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_region.44327f07bf"], "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report": ["model.snapchat_ads.snapchat_ads__campaign_country_report", "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_campaign_id.1b07be54fe", "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_country.34db53b159", "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_date_day.d3d7dd7af1"], "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report": ["model.snapchat_ads.snapchat_ads__ad_squad_report", "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_hourly_report_ad_squad_id.ab16aa72c9", "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_hourly_report_date_hour.6f0b63a9cb"], "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history": ["model.snapchat_ads.snapchat_ads__creative_history_prep", "test.snapchat_ads.not_null_stg_snapchat_ads__creative_url_tag_history_creative_id.7ff6bb9c1b"], "model.snapchat_ads.stg_snapchat_ads__ad_account_history": ["model.snapchat_ads.snapchat_ads__account_report", "model.snapchat_ads.snapchat_ads__ad_report", "model.snapchat_ads.snapchat_ads__ad_squad_report", "model.snapchat_ads.snapchat_ads__campaign_country_report", "model.snapchat_ads.snapchat_ads__campaign_region_report", "model.snapchat_ads.snapchat_ads__campaign_report", "model.snapchat_ads.snapchat_ads__url_report", "test.snapchat_ads.not_null_stg_snapchat_ads__ad_account_history__fivetran_synced.2d5dd77824", "test.snapchat_ads.not_null_stg_snapchat_ads__ad_account_history_ad_account_id.426d71d605"], "model.snapchat_ads.stg_snapchat_ads__campaign_history": ["model.snapchat_ads.snapchat_ads__account_report", "model.snapchat_ads.snapchat_ads__ad_report", "model.snapchat_ads.snapchat_ads__ad_squad_report", "model.snapchat_ads.snapchat_ads__campaign_country_report", "model.snapchat_ads.snapchat_ads__campaign_region_report", "model.snapchat_ads.snapchat_ads__campaign_report", "model.snapchat_ads.snapchat_ads__url_report", "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_history__fivetran_synced.55bc48b3ec", "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_history_campaign_id.f74a0fb8c0"], "model.snapchat_ads.stg_snapchat_ads__ad_history": ["model.snapchat_ads.snapchat_ads__account_report", "model.snapchat_ads.snapchat_ads__ad_report", "model.snapchat_ads.snapchat_ads__url_report", "test.snapchat_ads.not_null_stg_snapchat_ads__ad_history__fivetran_synced.1607c70fda", "test.snapchat_ads.not_null_stg_snapchat_ads__ad_history_ad_id.e9d367fd15"], "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report": ["model.snapchat_ads.snapchat_ads__campaign_report", "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_hourly_report_campaign_id.f255c38a3e", "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_hourly_report_date_hour.0bc4218ac8"], "model.snapchat_ads.stg_snapchat_ads__ad_squad_history_tmp": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_history"], "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report_tmp": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report"], "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history_tmp": ["model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history"], "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report_tmp": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report"], "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report_tmp": ["model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report"], "model.snapchat_ads.stg_snapchat_ads__campaign_history_tmp": ["model.snapchat_ads.stg_snapchat_ads__campaign_history"], "model.snapchat_ads.stg_snapchat_ads__ad_account_history_tmp": ["model.snapchat_ads.stg_snapchat_ads__ad_account_history"], "model.snapchat_ads.stg_snapchat_ads__ad_history_tmp": ["model.snapchat_ads.stg_snapchat_ads__ad_history"], "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report_tmp": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report"], "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report_tmp": ["model.snapchat_ads.stg_snapchat_ads__ad_hourly_report"], "model.snapchat_ads.stg_snapchat_ads__creative_history_tmp": ["model.snapchat_ads.stg_snapchat_ads__creative_history"], "model.snapchat_ads.snapchat_ads__creative_history_prep": ["model.snapchat_ads.snapchat_ads__ad_report", "model.snapchat_ads.snapchat_ads__url_report"], "model.pinterest.pinterest_ads__campaign_region_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_region_report", "test.pinterest.not_null_pinterest_ads__campaign_region_report_campaign_id.1a64423d71", "test.pinterest.not_null_pinterest_ads__campaign_region_report_date_day.e81588bc6e"], "model.pinterest.pinterest_ads__keyword_report": ["model.ad_reporting.int_ad_reporting__keyword_report", "test.pinterest.not_null_pinterest_ads__keyword_report_date_day.23130e9fba", "test.pinterest.not_null_pinterest_ads__keyword_report_keyword_id.0d73460198"], "model.pinterest.pinterest_ads__advertiser_report": ["model.ad_reporting.int_ad_reporting__account_report", "test.pinterest.not_null_pinterest_ads__advertiser_report_advertiser_id.13380f0672", "test.pinterest.not_null_pinterest_ads__advertiser_report_date_day.aedeceeeca"], "model.pinterest.pinterest_ads__url_report": ["model.ad_reporting.int_ad_reporting__url_report", "test.pinterest.not_null_pinterest_ads__url_report_date_day.b09048037e", "test.pinterest.not_null_pinterest_ads__url_report_destination_url.0bb7f30502", "test.pinterest.not_null_pinterest_ads__url_report_pin_promotion_id.0da711ad6a"], "model.pinterest.pinterest_ads__campaign_report": ["model.ad_reporting.int_ad_reporting__campaign_report", "test.pinterest.not_null_pinterest_ads__campaign_report_campaign_id.8001ea60f2", "test.pinterest.not_null_pinterest_ads__campaign_report_date_day.10ac8272bf"], "model.pinterest.pinterest_ads__campaign_country_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_country_report", "test.pinterest.not_null_pinterest_ads__campaign_country_report_campaign_id.9b1d309d2b", "test.pinterest.not_null_pinterest_ads__campaign_country_report_date_day.a9da473d38"], "model.pinterest.pinterest_ads__pin_promotion_report": ["model.ad_reporting.int_ad_reporting__ad_report", "test.pinterest.not_null_pinterest_ads__pin_promotion_report_date_day.3128d28cfd", "test.pinterest.not_null_pinterest_ads__pin_promotion_report_pin_promotion_id.2540e0a561"], "model.pinterest.pinterest_ads__ad_group_report": ["model.ad_reporting.int_ad_reporting__ad_group_report", "test.pinterest.not_null_pinterest_ads__ad_group_report_ad_group_id.134f9ac6c2", "test.pinterest.not_null_pinterest_ads__ad_group_report_date_day.ed7c27b8a7"], "model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report": ["model.pinterest.pinterest_ads__campaign_country_report", "model.pinterest.pinterest_ads__campaign_region_report"], "model.pinterest.stg_pinterest_ads__pin_promotion_report": ["model.pinterest.pinterest_ads__pin_promotion_report", "model.pinterest.pinterest_ads__url_report", "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_report_date_day.ed272212a1", "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_report_pin_promotion_id.9c3c9f71ab"], "model.pinterest.stg_pinterest_ads__ad_group_history": ["model.pinterest.pinterest_ads__ad_group_report", "model.pinterest.pinterest_ads__keyword_report", "model.pinterest.pinterest_ads__pin_promotion_report", "model.pinterest.pinterest_ads__url_report", "test.pinterest.not_null_stg_pinterest_ads__ad_group_history_ad_group_id.220c6220be"], "model.pinterest.stg_pinterest_ads__targeting_geo_region": ["model.pinterest.pinterest_ads__campaign_region_report"], "model.pinterest.stg_pinterest_ads__campaign_report": ["model.pinterest.pinterest_ads__campaign_report", "test.pinterest.not_null_stg_pinterest_ads__campaign_report_campaign_id.a287eba0fc", "test.pinterest.not_null_stg_pinterest_ads__campaign_report_date_day.7ef5fb1238"], "model.pinterest.stg_pinterest_ads__advertiser_history": ["model.pinterest.pinterest_ads__ad_group_report", "model.pinterest.pinterest_ads__advertiser_report", "model.pinterest.pinterest_ads__campaign_country_report", "model.pinterest.pinterest_ads__campaign_region_report", "model.pinterest.pinterest_ads__campaign_report", "model.pinterest.pinterest_ads__keyword_report", "model.pinterest.pinterest_ads__pin_promotion_report", "model.pinterest.pinterest_ads__url_report", "test.pinterest.not_null_stg_pinterest_ads__advertiser_history_advertiser_id.7d24f665fb"], "model.pinterest.stg_pinterest_ads__campaign_history": ["model.pinterest.pinterest_ads__ad_group_report", "model.pinterest.pinterest_ads__campaign_country_report", "model.pinterest.pinterest_ads__campaign_region_report", "model.pinterest.pinterest_ads__campaign_report", "model.pinterest.pinterest_ads__keyword_report", "model.pinterest.pinterest_ads__pin_promotion_report", "model.pinterest.pinterest_ads__url_report", "test.pinterest.not_null_stg_pinterest_ads__campaign_history_campaign_id.60cb10d341"], "model.pinterest.stg_pinterest_ads__keyword_history": ["model.pinterest.pinterest_ads__keyword_report", "test.pinterest.not_null_stg_pinterest_ads__keyword_history_keyword_id.246889377a"], "model.pinterest.stg_pinterest_ads__advertiser_report": ["model.pinterest.pinterest_ads__advertiser_report", "test.pinterest.not_null_stg_pinterest_ads__advertiser_report_advertiser_id.1b16ed73ff", "test.pinterest.not_null_stg_pinterest_ads__advertiser_report_date_day.153bd03c95"], "model.pinterest.stg_pinterest_ads__pin_promotion_history": ["model.pinterest.pinterest_ads__pin_promotion_report", "model.pinterest.pinterest_ads__url_report", "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_history_pin_promotion_id.171995cd34"], "model.pinterest.stg_pinterest_ads__targeting_geo": ["model.pinterest.pinterest_ads__campaign_country_report", "model.pinterest.pinterest_ads__campaign_region_report"], "model.pinterest.stg_pinterest_ads__keyword_report": ["model.pinterest.pinterest_ads__keyword_report", "test.pinterest.not_null_stg_pinterest_ads__keyword_report_date_day.9937216300", "test.pinterest.not_null_stg_pinterest_ads__keyword_report_keyword_id.5f00679c48"], "model.pinterest.stg_pinterest_ads__ad_group_report": ["model.pinterest.pinterest_ads__ad_group_report", "test.pinterest.not_null_stg_pinterest_ads__ad_group_report_ad_group_id.bb8cf3c471", "test.pinterest.not_null_stg_pinterest_ads__ad_group_report_date_day.80e8904c4c"], "model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report_tmp": ["model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report"], "model.pinterest.stg_pinterest_ads__ad_group_report_tmp": ["model.pinterest.stg_pinterest_ads__ad_group_report"], "model.pinterest.stg_pinterest_ads__pin_promotion_history_tmp": ["model.pinterest.stg_pinterest_ads__pin_promotion_history"], "model.pinterest.stg_pinterest_ads__campaign_report_tmp": ["model.pinterest.stg_pinterest_ads__campaign_report"], "model.pinterest.stg_pinterest_ads__advertiser_history_tmp": ["model.pinterest.stg_pinterest_ads__advertiser_history"], "model.pinterest.stg_pinterest_ads__keyword_history_tmp": ["model.pinterest.stg_pinterest_ads__keyword_history"], "model.pinterest.stg_pinterest_ads__pin_promotion_report_tmp": ["model.pinterest.stg_pinterest_ads__pin_promotion_report"], "model.pinterest.stg_pinterest_ads__advertiser_report_tmp": ["model.pinterest.stg_pinterest_ads__advertiser_report"], "model.pinterest.stg_pinterest_ads__ad_group_history_tmp": ["model.pinterest.stg_pinterest_ads__ad_group_history"], "model.pinterest.stg_pinterest_ads__targeting_geo_region_tmp": ["model.pinterest.stg_pinterest_ads__targeting_geo_region"], "model.pinterest.stg_pinterest_ads__campaign_history_tmp": ["model.pinterest.stg_pinterest_ads__campaign_history"], "model.pinterest.stg_pinterest_ads__targeting_geo_tmp": ["model.pinterest.stg_pinterest_ads__targeting_geo"], "model.pinterest.stg_pinterest_ads__keyword_report_tmp": ["model.pinterest.stg_pinterest_ads__keyword_report"], "model.google_ads.google_ads__search_term_report": ["model.ad_reporting.int_ad_reporting__search_report"], "model.google_ads.google_ads__ad_report": ["model.ad_reporting.int_ad_reporting__ad_report", "test.google_ads.not_null_google_ads__ad_report_ad_id.7bd6a287ad"], "model.google_ads.google_ads__ad_group_report": ["model.ad_reporting.int_ad_reporting__ad_group_report", "test.google_ads.not_null_google_ads__ad_group_report_ad_group_id.c186523c0c"], "model.google_ads.google_ads__account_report": ["model.ad_reporting.int_ad_reporting__account_report", "test.google_ads.not_null_google_ads__account_report_account_id.abb0985422"], "model.google_ads.google_ads__campaign_bid_modifiers_report": ["test.google_ads.not_null_google_ads__campaign_bid_modifiers_report_bid_modifier_report_key.746ae8cfa3", "test.google_ads.not_null_google_ads__campaign_bid_modifiers_report_campaign_id.68d212d025", "test.google_ads.unique_google_ads__campaign_bid_modifiers_report_bid_modifier_report_key.d68443174a"], "model.google_ads.google_ads__campaign_budget_diagnostics_report": ["test.google_ads.not_null_google_ads__campaign_budget_diagnostics_report_budget_diagnostics_report_key.c2c4d80aab", "test.google_ads.not_null_google_ads__campaign_budget_diagnostics_report_campaign_id.9a579bd702", "test.google_ads.unique_google_ads__campaign_budget_diagnostics_report_budget_diagnostics_report_key.ca90f632f4"], "model.google_ads.google_ads__url_report": ["model.ad_reporting.int_ad_reporting__url_report", "test.google_ads.not_null_google_ads__url_report_base_url.e3578c0f72"], "model.google_ads.google_ads__campaign_report": ["model.ad_reporting.int_ad_reporting__campaign_report", "model.google_ads.google_ads__campaign_budget_diagnostics_report", "test.google_ads.not_null_google_ads__campaign_report_campaign_id.cc6694fa0e"], "model.google_ads.google_ads__keyword_report": ["model.ad_reporting.int_ad_reporting__keyword_report", "test.google_ads.not_null_google_ads__keyword_report_criterion_id.4cab66a055"], "model.google_ads.stg_google_ads__account_stats": ["model.google_ads.google_ads__account_report", "test.google_ads.not_null_stg_google_ads__account_stats_account_id.2a9da5417b", "test.google_ads.not_null_stg_google_ads__account_stats_date_day.57ac8772d5"], "model.google_ads.stg_google_ads__ad_group_stats": ["model.google_ads.google_ads__ad_group_report", "test.google_ads.not_null_stg_google_ads__ad_group_stats_ad_group_id.a8d430f077", "test.google_ads.not_null_stg_google_ads__ad_group_stats_date_day.3c6a221786"], "model.google_ads.stg_google_ads__account_history": ["model.google_ads.google_ads__account_report", "model.google_ads.int_google_ads__campaigns_accounts", "test.google_ads.not_null_stg_google_ads__account_history_account_id.5ca373f51f"], "model.google_ads.stg_google_ads__ad_group_history": ["model.google_ads.google_ads__ad_group_report", "model.google_ads.google_ads__ad_report", "model.google_ads.google_ads__keyword_report", "model.google_ads.google_ads__search_term_report", "model.google_ads.google_ads__url_report", "test.google_ads.not_null_stg_google_ads__ad_group_history_ad_group_id.f6c7c939be"], "model.google_ads.stg_google_ads__campaign_stats": ["model.google_ads.google_ads__campaign_bid_modifiers_report", "model.google_ads.google_ads__campaign_report", "test.google_ads.not_null_stg_google_ads__campaign_stats_campaign_id.11587fa10f", "test.google_ads.not_null_stg_google_ads__campaign_stats_date_day.dc097fd76b"], "model.google_ads.stg_google_ads__campaign_budget_history": ["model.google_ads.google_ads__campaign_budget_diagnostics_report", "test.google_ads.not_null_stg_google_ads__campaign_budget_history_campaign_id.730c3d8025"], "model.google_ads.stg_google_ads__campaign_bid_modifier_history": ["model.google_ads.google_ads__campaign_bid_modifiers_report", "test.google_ads.not_null_stg_google_ads__campaign_bid_modifier_history_campaign_id.c7e1e11f33"], "model.google_ads.stg_google_ads__keyword_stats": ["model.google_ads.google_ads__keyword_report", "test.google_ads.not_null_stg_google_ads__keyword_stats_date_day.a9da72f74d", "test.google_ads.not_null_stg_google_ads__keyword_stats_keyword_id.f0945d6cf0"], "model.google_ads.stg_google_ads__ad_stats": ["model.google_ads.google_ads__ad_report", "model.google_ads.google_ads__url_report", "test.google_ads.not_null_stg_google_ads__ad_stats_ad_id.2612d83cc8", "test.google_ads.not_null_stg_google_ads__ad_stats_date_day.9a43c0fce4"], "model.google_ads.stg_google_ads__ad_history": ["model.google_ads.google_ads__ad_report", "model.google_ads.google_ads__url_report", "test.google_ads.not_null_stg_google_ads__ad_history_ad_id.8c23c38248"], "model.google_ads.stg_google_ads__ad_group_criterion_history": ["model.google_ads.google_ads__keyword_report", "test.google_ads.not_null_stg_google_ads__ad_group_criterion_history_criterion_id.7a0a8b8476"], "model.google_ads.stg_google_ads__search_term_keyword_stats": ["model.google_ads.google_ads__search_term_report", "test.google_ads.not_null_stg_google_ads__search_term_keyword_stats_date_day.3ff55abd88", "test.google_ads.not_null_stg_google_ads__search_term_keyword_stats_search_term_id.0019238ba2"], "model.google_ads.stg_google_ads__campaign_bidding_strategy_history": ["model.google_ads.google_ads__campaign_bid_modifiers_report", "model.google_ads.google_ads__campaign_budget_diagnostics_report", "test.google_ads.not_null_stg_google_ads__campaign_bidding_strategy_history_campaign_id.7efbcd0291"], "model.google_ads.stg_google_ads__campaign_criterion_history": ["model.google_ads.google_ads__campaign_bid_modifiers_report", "model.google_ads.google_ads__campaign_budget_diagnostics_report", "test.google_ads.not_null_stg_google_ads__campaign_criterion_history_criterion_id.ade9d1fdbd"], "model.google_ads.stg_google_ads__campaign_history": ["model.google_ads.int_google_ads__campaigns_accounts", "test.google_ads.not_null_stg_google_ads__campaign_history_campaign_id.fa0c825e75"], "model.google_ads.stg_google_ads__ad_group_criterion_history_tmp": ["model.google_ads.stg_google_ads__ad_group_criterion_history"], "model.google_ads.stg_google_ads__campaign_budget_history_tmp": ["model.google_ads.stg_google_ads__campaign_budget_history"], "model.google_ads.stg_google_ads__campaign_stats_tmp": ["model.google_ads.stg_google_ads__campaign_stats"], "model.google_ads.stg_google_ads__campaign_history_tmp": ["model.google_ads.stg_google_ads__campaign_history"], "model.google_ads.stg_google_ads__account_stats_tmp": ["model.google_ads.stg_google_ads__account_stats"], "model.google_ads.stg_google_ads__campaign_bid_modifier_history_tmp": ["model.google_ads.stg_google_ads__campaign_bid_modifier_history"], "model.google_ads.stg_google_ads__search_term_keyword_stats_tmp": ["model.google_ads.stg_google_ads__search_term_keyword_stats"], "model.google_ads.stg_google_ads__ad_group_stats_tmp": ["model.google_ads.stg_google_ads__ad_group_stats"], "model.google_ads.stg_google_ads__campaign_criterion_history_tmp": ["model.google_ads.stg_google_ads__campaign_criterion_history"], "model.google_ads.stg_google_ads__keyword_stats_tmp": ["model.google_ads.stg_google_ads__keyword_stats"], "model.google_ads.stg_google_ads__ad_history_tmp": ["model.google_ads.stg_google_ads__ad_history"], "model.google_ads.stg_google_ads__campaign_bidding_strategy_history_tmp": ["model.google_ads.stg_google_ads__campaign_bidding_strategy_history"], "model.google_ads.stg_google_ads__account_history_tmp": ["model.google_ads.stg_google_ads__account_history"], "model.google_ads.stg_google_ads__ad_group_history_tmp": ["model.google_ads.stg_google_ads__ad_group_history"], "model.google_ads.stg_google_ads__ad_stats_tmp": ["model.google_ads.stg_google_ads__ad_stats"], "model.google_ads.int_google_ads__campaigns_accounts": ["model.google_ads.google_ads__ad_group_report", "model.google_ads.google_ads__ad_report", "model.google_ads.google_ads__campaign_bid_modifiers_report", "model.google_ads.google_ads__campaign_report", "model.google_ads.google_ads__keyword_report", "model.google_ads.google_ads__search_term_report", "model.google_ads.google_ads__url_report"], "model.amazon_ads.amazon_ads__search_report": ["model.ad_reporting.int_ad_reporting__search_report", "test.amazon_ads.not_null_amazon_ads__search_report_search_term.3c23d4658a"], "model.amazon_ads.amazon_ads__campaign_report": ["model.ad_reporting.int_ad_reporting__campaign_report", "test.amazon_ads.not_null_amazon_ads__campaign_report_campaign_id.a9cabadd7c"], "model.amazon_ads.amazon_ads__account_report": ["model.ad_reporting.int_ad_reporting__account_report", "test.amazon_ads.not_null_amazon_ads__account_report_account_id.83adef7061", "test.amazon_ads.not_null_amazon_ads__account_report_profile_id.87fb8dbe66"], "model.amazon_ads.amazon_ads__portfolio_report": ["test.amazon_ads.not_null_amazon_ads__portfolio_report_profile_id.1a910441c6"], "model.amazon_ads.amazon_ads__keyword_report": ["model.ad_reporting.int_ad_reporting__keyword_report", "test.amazon_ads.not_null_amazon_ads__keyword_report_keyword_id.303f680e4a"], "model.amazon_ads.amazon_ads__ad_report": ["model.ad_reporting.int_ad_reporting__ad_report", "test.amazon_ads.not_null_amazon_ads__ad_report_ad_id.93728159b3"], "model.amazon_ads.amazon_ads__ad_group_report": ["model.ad_reporting.int_ad_reporting__ad_group_report", "test.amazon_ads.not_null_amazon_ads__ad_group_report_ad_group_id.8a23dc123a"], "model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report": ["model.amazon_ads.amazon_ads__search_report", "test.amazon_ads.not_null_stg_amazon_ads__search_term_ad_keyword_report_search_term.ef04af3b06"], "model.amazon_ads.stg_amazon_ads__ad_group_history": ["model.amazon_ads.amazon_ads__ad_group_report", "model.amazon_ads.amazon_ads__ad_report", "model.amazon_ads.amazon_ads__keyword_report", "model.amazon_ads.amazon_ads__search_report", "test.amazon_ads.not_null_stg_amazon_ads__ad_group_history_ad_group_id.6b524b990b"], "model.amazon_ads.stg_amazon_ads__portfolio_history": ["model.amazon_ads.amazon_ads__portfolio_report", "model.amazon_ads.int_amazon_ads__portfolio_history", "test.amazon_ads.not_null_stg_amazon_ads__portfolio_history_portfolio_id.e22bb2ba02"], "model.amazon_ads.stg_amazon_ads__campaign_history": ["model.amazon_ads.amazon_ads__account_report", "model.amazon_ads.amazon_ads__ad_group_report", "model.amazon_ads.amazon_ads__ad_report", "model.amazon_ads.amazon_ads__campaign_report", "model.amazon_ads.amazon_ads__keyword_report", "model.amazon_ads.amazon_ads__portfolio_report", "model.amazon_ads.amazon_ads__search_report", "test.amazon_ads.not_null_stg_amazon_ads__campaign_history_campaign_id.49e395897c"], "model.amazon_ads.stg_amazon_ads__ad_group_level_report": ["model.amazon_ads.amazon_ads__ad_group_report", "test.amazon_ads.not_null_stg_amazon_ads__ad_group_level_report_ad_group_id.ee4ef641c3"], "model.amazon_ads.stg_amazon_ads__targeting_keyword_report": ["model.amazon_ads.amazon_ads__keyword_report", "test.amazon_ads.not_null_stg_amazon_ads__targeting_keyword_report_keyword_id.101a3299d7"], "model.amazon_ads.stg_amazon_ads__advertised_product_report": ["model.amazon_ads.amazon_ads__ad_report", "test.amazon_ads.not_null_stg_amazon_ads__advertised_product_report_ad_id.307c6bc8d4"], "model.amazon_ads.stg_amazon_ads__keyword_history": ["model.amazon_ads.amazon_ads__keyword_report", "model.amazon_ads.amazon_ads__search_report", "test.amazon_ads.not_null_stg_amazon_ads__keyword_history_keyword_id.f21f6add6e"], "model.amazon_ads.stg_amazon_ads__campaign_level_report": ["model.amazon_ads.amazon_ads__account_report", "model.amazon_ads.amazon_ads__campaign_report", "model.amazon_ads.amazon_ads__portfolio_report", "test.amazon_ads.not_null_stg_amazon_ads__campaign_level_report_campaign_id.1efec68194"], "model.amazon_ads.stg_amazon_ads__profile": ["model.amazon_ads.amazon_ads__account_report", "model.amazon_ads.amazon_ads__ad_group_report", "model.amazon_ads.amazon_ads__ad_report", "model.amazon_ads.amazon_ads__campaign_report", "model.amazon_ads.amazon_ads__keyword_report", "model.amazon_ads.amazon_ads__portfolio_report", "model.amazon_ads.amazon_ads__search_report", "test.amazon_ads.not_null_stg_amazon_ads__profile_profile_id.bd192c102b"], "model.amazon_ads.stg_amazon_ads__product_ad_history": ["model.amazon_ads.amazon_ads__ad_report", "test.amazon_ads.not_null_stg_amazon_ads__product_ad_history_ad_id.8744ab1cd8"], "model.amazon_ads.stg_amazon_ads__keyword_history_tmp": ["model.amazon_ads.stg_amazon_ads__keyword_history"], "model.amazon_ads.stg_amazon_ads__campaign_history_tmp": ["model.amazon_ads.stg_amazon_ads__campaign_history"], "model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report_tmp": ["model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report"], "model.amazon_ads.stg_amazon_ads__campaign_level_report_tmp": ["model.amazon_ads.stg_amazon_ads__campaign_level_report"], "model.amazon_ads.stg_amazon_ads__profile_tmp": ["model.amazon_ads.stg_amazon_ads__profile"], "model.amazon_ads.stg_amazon_ads__ad_group_history_tmp": ["model.amazon_ads.stg_amazon_ads__ad_group_history"], "model.amazon_ads.stg_amazon_ads__targeting_keyword_report_tmp": ["model.amazon_ads.stg_amazon_ads__targeting_keyword_report"], "model.amazon_ads.stg_amazon_ads__advertised_product_report_tmp": ["model.amazon_ads.stg_amazon_ads__advertised_product_report"], "model.amazon_ads.stg_amazon_ads__ad_group_level_report_tmp": ["model.amazon_ads.stg_amazon_ads__ad_group_level_report"], "model.amazon_ads.stg_amazon_ads__portfolio_history_tmp": ["model.amazon_ads.stg_amazon_ads__portfolio_history"], "model.amazon_ads.stg_amazon_ads__product_ad_history_tmp": ["model.amazon_ads.stg_amazon_ads__product_ad_history"], "model.amazon_ads.int_amazon_ads__portfolio_history": ["model.amazon_ads.amazon_ads__ad_group_report", "model.amazon_ads.amazon_ads__ad_report", "model.amazon_ads.amazon_ads__campaign_report", "model.amazon_ads.amazon_ads__keyword_report", "model.amazon_ads.amazon_ads__search_report"], "model.twitter_ads.twitter_ads__promoted_tweet_report": ["model.ad_reporting.int_ad_reporting__ad_report", "test.twitter_ads.not_null_twitter_ads__promoted_tweet_report_placement.d89c9b27e5", "test.twitter_ads.not_null_twitter_ads__promoted_tweet_report_promoted_tweet_id.5df08e154e"], "model.twitter_ads.twitter_ads__campaign_region_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_region_report", "test.twitter_ads.not_null_twitter_ads__campaign_region_report_campaign_id.c06b8be032", "test.twitter_ads.not_null_twitter_ads__campaign_region_report_date_day.884ad86a28", "test.twitter_ads.not_null_twitter_ads__campaign_region_report_placement.e6fb374bf5"], "model.twitter_ads.twitter_ads__account_report": ["model.ad_reporting.int_ad_reporting__account_report", "test.twitter_ads.not_null_twitter_ads__account_report_account_id.90d5808908", "test.twitter_ads.not_null_twitter_ads__account_report_date_day.84896c5846", "test.twitter_ads.not_null_twitter_ads__account_report_placement.157dcb6194"], "model.twitter_ads.twitter_ads__campaign_country_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_country_report", "test.twitter_ads.not_null_twitter_ads__campaign_country_report_campaign_id.d08c7d25a2", "test.twitter_ads.not_null_twitter_ads__campaign_country_report_date_day.33eabfbcaa", "test.twitter_ads.not_null_twitter_ads__campaign_country_report_placement.3a4c65b9c5"], "model.twitter_ads.twitter_ads__url_report": ["model.ad_reporting.int_ad_reporting__url_report", "test.twitter_ads.not_null_twitter_ads__url_report_base_url.dfd7ab549e", "test.twitter_ads.not_null_twitter_ads__url_report_date_day.33fcb7e04b", "test.twitter_ads.not_null_twitter_ads__url_report_placement.92ca3b192e", "test.twitter_ads.not_null_twitter_ads__url_report_promoted_tweet_id.d690f99143"], "model.twitter_ads.twitter_ads__line_item_report": ["model.ad_reporting.int_ad_reporting__ad_group_report", "test.twitter_ads.not_null_twitter_ads__line_item_report_date_day.86c934e8ce", "test.twitter_ads.not_null_twitter_ads__line_item_report_line_item_id.0462d58211", "test.twitter_ads.not_null_twitter_ads__line_item_report_placement.f103369312"], "model.twitter_ads.twitter_ads__keyword_report": ["model.ad_reporting.int_ad_reporting__keyword_report", "test.twitter_ads.not_null_twitter_ads__keyword_report_date_day.e0ce90c1ec", "test.twitter_ads.not_null_twitter_ads__keyword_report_keyword_id.91efa0a538"], "model.twitter_ads.twitter_ads__campaign_report": ["model.ad_reporting.int_ad_reporting__campaign_report", "test.twitter_ads.not_null_twitter_ads__campaign_report_campaign_id.03b1c451b8", "test.twitter_ads.not_null_twitter_ads__campaign_report_date_day.2b30b279b0", "test.twitter_ads.not_null_twitter_ads__campaign_report_placement.c66d252e82"], "model.twitter_ads.stg_twitter_ads__tweet": ["model.twitter_ads.twitter_ads__promoted_tweet_report", "model.twitter_ads.twitter_ads__url_report", "test.twitter_ads.not_null_stg_twitter_ads__tweet_tweet_id.a0427f37cd"], "model.twitter_ads.stg_twitter_ads__campaign_locations_report": ["model.twitter_ads.twitter_ads__campaign_country_report", "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_campaign_id.e1ddc306c2", "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_country.8bc44f6e39", "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_date_day.bf69378746", "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_placement.638fb0cf03"], "model.twitter_ads.stg_twitter_ads__campaign_history": ["model.twitter_ads.twitter_ads__campaign_country_report", "model.twitter_ads.twitter_ads__campaign_region_report", "model.twitter_ads.twitter_ads__campaign_report", "model.twitter_ads.twitter_ads__keyword_report", "model.twitter_ads.twitter_ads__line_item_report", "model.twitter_ads.twitter_ads__promoted_tweet_report", "model.twitter_ads.twitter_ads__url_report", "test.twitter_ads.not_null_stg_twitter_ads__campaign_history_campaign_id.51218487ce"], "model.twitter_ads.stg_twitter_ads__promoted_tweet_history": ["model.twitter_ads.twitter_ads__promoted_tweet_report", "model.twitter_ads.twitter_ads__url_report", "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_history_promoted_tweet_id.f447a1cd09"], "model.twitter_ads.stg_twitter_ads__tweet_url": ["model.twitter_ads.twitter_ads__url_report", "test.twitter_ads.not_null_stg_twitter_ads__tweet_url_index.e998fb67be", "test.twitter_ads.not_null_stg_twitter_ads__tweet_url_tweet_id.f7e1670218"], "model.twitter_ads.stg_twitter_ads__campaign_regions_report": ["model.twitter_ads.twitter_ads__campaign_region_report", "test.twitter_ads.not_null_stg_twitter_ads__campaign_regions_report_date_day.e7f9f99776", "test.twitter_ads.not_null_stg_twitter_ads__campaign_regions_report_region.7b8b6fd555"], "model.twitter_ads.stg_twitter_ads__line_item_keywords_report": ["model.twitter_ads.twitter_ads__keyword_report", "test.twitter_ads.not_null_stg_twitter_ads__line_item_keywords_report_date_day.c7e7155b13", "test.twitter_ads.not_null_stg_twitter_ads__line_item_keywords_report_keyword_id.e5f015e9ec"], "model.twitter_ads.stg_twitter_ads__line_item_report": ["model.twitter_ads.twitter_ads__line_item_report", "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_date_day.0f4d8cc8fe", "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_line_item_id.9f5a4860b7", "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_placement.cd7e77e0eb"], "model.twitter_ads.stg_twitter_ads__line_item_history": ["model.twitter_ads.twitter_ads__keyword_report", "model.twitter_ads.twitter_ads__line_item_report", "model.twitter_ads.twitter_ads__promoted_tweet_report", "model.twitter_ads.twitter_ads__url_report", "test.twitter_ads.not_null_stg_twitter_ads__line_item_history_line_item_id.2cef040809"], "model.twitter_ads.stg_twitter_ads__account_history": ["model.twitter_ads.twitter_ads__account_report", "model.twitter_ads.twitter_ads__campaign_country_report", "model.twitter_ads.twitter_ads__campaign_region_report", "model.twitter_ads.twitter_ads__campaign_report", "model.twitter_ads.twitter_ads__keyword_report", "model.twitter_ads.twitter_ads__line_item_report", "model.twitter_ads.twitter_ads__promoted_tweet_report", "model.twitter_ads.twitter_ads__url_report", "test.twitter_ads.not_null_stg_twitter_ads__account_history_account_id.66fb3601e2"], "model.twitter_ads.stg_twitter_ads__promoted_tweet_report": ["model.twitter_ads.twitter_ads__account_report", "model.twitter_ads.twitter_ads__promoted_tweet_report", "model.twitter_ads.twitter_ads__url_report", "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_date_day.c4c46a5894", "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_placement.c1b1f648b3", "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_promoted_tweet_id.6028694598"], "model.twitter_ads.stg_twitter_ads__campaign_report": ["model.twitter_ads.twitter_ads__campaign_report", "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_campaign_id.a63b62981f", "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_date_day.053c09786c", "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_placement.5067d8c4f4"], "model.twitter_ads.stg_twitter_ads__campaign_report_tmp": ["model.twitter_ads.stg_twitter_ads__campaign_report"], "model.twitter_ads.stg_twitter_ads__campaign_regions_report_tmp": ["model.twitter_ads.stg_twitter_ads__campaign_regions_report"], "model.twitter_ads.stg_twitter_ads__campaign_history_tmp": ["model.twitter_ads.stg_twitter_ads__campaign_history"], "model.twitter_ads.stg_twitter_ads__line_item_history_tmp": ["model.twitter_ads.stg_twitter_ads__line_item_history"], "model.twitter_ads.stg_twitter_ads__promoted_tweet_report_tmp": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_report"], "model.twitter_ads.stg_twitter_ads__campaign_locations_report_tmp": ["model.twitter_ads.stg_twitter_ads__campaign_locations_report"], "model.twitter_ads.stg_twitter_ads__line_item_report_tmp": ["model.twitter_ads.stg_twitter_ads__line_item_report"], "model.twitter_ads.stg_twitter_ads__account_history_tmp": ["model.twitter_ads.stg_twitter_ads__account_history"], "model.twitter_ads.stg_twitter_ads__promoted_tweet_history_tmp": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_history"], "model.twitter_ads.stg_twitter_ads__line_item_keywords_report_tmp": ["model.twitter_ads.stg_twitter_ads__line_item_keywords_report"], "model.twitter_ads.stg_twitter_ads__tweet_url_tmp": ["model.twitter_ads.stg_twitter_ads__tweet_url"], "model.twitter_ads.stg_twitter_ads__tweet_tmp": ["model.twitter_ads.stg_twitter_ads__tweet"], "model.ad_reporting.ad_reporting__keyword_report": ["test.ad_reporting.not_null_ad_reporting__keyword_report_keyword_id.51a45fb334"], "model.ad_reporting.ad_reporting__campaign_report": ["test.ad_reporting.not_null_ad_reporting__campaign_report_campaign_id.1cfaa7698b"], "model.ad_reporting.ad_reporting__monthly_campaign_country_report": [], "model.ad_reporting.ad_reporting__monthly_campaign_region_report": [], "model.ad_reporting.ad_reporting__url_report": ["test.ad_reporting.not_null_ad_reporting__url_report_base_url.a29864e5b6"], "model.ad_reporting.ad_reporting__ad_report": ["semantic_model.ad_reporting.ad_report", "test.ad_reporting.not_null_ad_reporting__ad_report_ad_id.f3eb210152"], "model.ad_reporting.ad_reporting__account_report": ["test.ad_reporting.not_null_ad_reporting__account_report_account_id.316a64c022"], "model.ad_reporting.ad_reporting__ad_group_report": ["test.ad_reporting.not_null_ad_reporting__ad_group_report_ad_group_id.963e17e842"], "model.ad_reporting.ad_reporting__search_report": ["test.ad_reporting.not_null_ad_reporting__search_report_search_query.ee2f0fcafb"], "model.ad_reporting.int_ad_reporting__url_report": ["model.ad_reporting.ad_reporting__url_report"], "model.ad_reporting.int_ad_reporting__campaign_report": ["model.ad_reporting.ad_reporting__campaign_report"], "model.ad_reporting.int_ad_reporting__monthly_campaign_country_report": ["model.ad_reporting.ad_reporting__monthly_campaign_country_report"], "model.ad_reporting.int_ad_reporting__ad_report": ["model.ad_reporting.ad_reporting__ad_report"], "model.ad_reporting.int_ad_reporting__search_report": ["model.ad_reporting.ad_reporting__search_report"], "model.ad_reporting.int_ad_reporting__keyword_report": ["model.ad_reporting.ad_reporting__keyword_report"], "model.ad_reporting.int_ad_reporting__ad_group_report": ["model.ad_reporting.ad_reporting__ad_group_report"], "model.ad_reporting.int_ad_reporting__account_report": ["model.ad_reporting.ad_reporting__account_report"], "model.ad_reporting.int_ad_reporting__monthly_campaign_region_report": ["model.ad_reporting.ad_reporting__monthly_campaign_region_report"], "model.ad_reporting.int_ad_reporting__country_mapping": ["model.ad_reporting.ad_reporting__monthly_campaign_country_report"], "model.ad_reporting.metricflow_time_spine": [], "model.tiktok_ads.tiktok_ads__url_report": ["model.ad_reporting.int_ad_reporting__url_report", "test.tiktok_ads.not_null_tiktok_ads__url_report_ad_id.6c41067bd0", "test.tiktok_ads.not_null_tiktok_ads__url_report_base_url.37afef2e1b", "test.tiktok_ads.not_null_tiktok_ads__url_report_date_day.d593573eff"], "model.tiktok_ads.tiktok_ads__advertiser_report": ["model.ad_reporting.int_ad_reporting__account_report", "test.tiktok_ads.not_null_tiktok_ads__advertiser_report_advertiser_id.f956c568ce", "test.tiktok_ads.not_null_tiktok_ads__advertiser_report_date_day.1276998c99"], "model.tiktok_ads.tiktok_ads__ad_report": ["model.ad_reporting.int_ad_reporting__ad_report", "test.tiktok_ads.not_null_tiktok_ads__ad_report_ad_id.2d8166e707", "test.tiktok_ads.not_null_tiktok_ads__ad_report_date_day.d61ee4a5ed"], "model.tiktok_ads.tiktok_ads__ad_group_report": ["model.ad_reporting.int_ad_reporting__ad_group_report", "test.tiktok_ads.not_null_tiktok_ads__ad_group_report_ad_group_id.17fb8710f4", "test.tiktok_ads.not_null_tiktok_ads__ad_group_report_date_day.e39164964e"], "model.tiktok_ads.tiktok_ads__campaign_country_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_country_report", "test.tiktok_ads.not_null_tiktok_ads__campaign_country_report_campaign_id.f439b91d6d", "test.tiktok_ads.not_null_tiktok_ads__campaign_country_report_date_day.c68c1bd379"], "model.tiktok_ads.tiktok_ads__campaign_report": ["model.ad_reporting.int_ad_reporting__campaign_report", "test.tiktok_ads.not_null_tiktok_ads__campaign_report_campaign_id.8a2b0c8ef8", "test.tiktok_ads.not_null_tiktok_ads__campaign_report_date_day.3807b0e836"], "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly": ["model.tiktok_ads.tiktok_ads__campaign_report", "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_report_hourly_campaign_id.ef898379fb", "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_report_hourly_stat_time_hour.e75e13184c"], "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly": ["model.tiktok_ads.tiktok_ads__ad_group_report", "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_report_hourly_ad_group_id.8da17119f1", "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_report_hourly_stat_time_hour.ca4b495127"], "model.tiktok_ads.stg_tiktok_ads__campaign_history": ["model.tiktok_ads.tiktok_ads__ad_group_report", "model.tiktok_ads.tiktok_ads__ad_report", "model.tiktok_ads.tiktok_ads__campaign_country_report", "model.tiktok_ads.tiktok_ads__campaign_report", "model.tiktok_ads.tiktok_ads__url_report", "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_history_campaign_id.7f9147d1e1"], "model.tiktok_ads.stg_tiktok_ads__ad_group_history": ["model.tiktok_ads.tiktok_ads__ad_group_report", "model.tiktok_ads.tiktok_ads__ad_report", "model.tiktok_ads.tiktok_ads__url_report", "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_history_ad_group_id.04778d7fad"], "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly": ["model.tiktok_ads.tiktok_ads__ad_report", "model.tiktok_ads.tiktok_ads__advertiser_report", "model.tiktok_ads.tiktok_ads__url_report", "test.tiktok_ads.not_null_stg_tiktok_ads__ad_report_hourly_ad_id.ee84d783ed", "test.tiktok_ads.not_null_stg_tiktok_ads__ad_report_hourly_stat_time_hour.9e2a2dca81"], "model.tiktok_ads.stg_tiktok_ads__location": ["model.tiktok_ads.tiktok_ads__campaign_country_report"], "model.tiktok_ads.stg_tiktok_ads__ad_history": ["model.tiktok_ads.tiktok_ads__ad_report", "model.tiktok_ads.tiktok_ads__advertiser_report", "model.tiktok_ads.tiktok_ads__url_report", "test.tiktok_ads.not_null_stg_tiktok_ads__ad_history_ad_id.4ffd05b23a"], "model.tiktok_ads.stg_tiktok_ads__advertiser": ["model.tiktok_ads.tiktok_ads__ad_group_report", "model.tiktok_ads.tiktok_ads__ad_report", "model.tiktok_ads.tiktok_ads__advertiser_report", "model.tiktok_ads.tiktok_ads__campaign_country_report", "model.tiktok_ads.tiktok_ads__campaign_report", "model.tiktok_ads.tiktok_ads__url_report", "test.tiktok_ads.not_null_stg_tiktok_ads__advertiser_advertiser_id.5deab92def"], "model.tiktok_ads.stg_tiktok_ads__campaign_country_report": ["model.tiktok_ads.tiktok_ads__campaign_country_report"], "model.tiktok_ads.stg_tiktok_ads__campaign_country_report_tmp": ["model.tiktok_ads.stg_tiktok_ads__campaign_country_report"], "model.tiktok_ads.stg_tiktok_ads__ad_history_tmp": ["model.tiktok_ads.stg_tiktok_ads__ad_history"], "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly_tmp": ["model.tiktok_ads.stg_tiktok_ads__ad_report_hourly"], "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly_tmp": ["model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly"], "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly_tmp": ["model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly"], "model.tiktok_ads.stg_tiktok_ads__ad_group_history_tmp": ["model.tiktok_ads.stg_tiktok_ads__ad_group_history"], "model.tiktok_ads.stg_tiktok_ads__campaign_history_tmp": ["model.tiktok_ads.stg_tiktok_ads__campaign_history"], "model.tiktok_ads.stg_tiktok_ads__advertiser_tmp": ["model.tiktok_ads.stg_tiktok_ads__advertiser"], "model.tiktok_ads.stg_tiktok_ads__location_tmp": ["model.tiktok_ads.stg_tiktok_ads__location"], "model.microsoft_ads.microsoft_ads__keyword_report": ["model.ad_reporting.int_ad_reporting__keyword_report", "test.microsoft_ads.not_null_microsoft_ads__keyword_report_keyword_id.da1d648d3b"], "model.microsoft_ads.microsoft_ads__url_report": ["model.ad_reporting.int_ad_reporting__url_report", "test.microsoft_ads.not_null_microsoft_ads__url_report_base_url.c1af50307a"], "model.microsoft_ads.microsoft_ads__account_report": ["model.ad_reporting.int_ad_reporting__account_report", "test.microsoft_ads.not_null_microsoft_ads__account_report_account_id.f88e46157e"], "model.microsoft_ads.microsoft_ads__campaign_country_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_country_report", "test.microsoft_ads.not_null_microsoft_ads__campaign_country_report_account_id.9d9807033d", "test.microsoft_ads.not_null_microsoft_ads__campaign_country_report_campaign_id.10b01e8782"], "model.microsoft_ads.microsoft_ads__campaign_region_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_region_report", "test.microsoft_ads.not_null_microsoft_ads__campaign_region_report_account_id.b3a2b47986", "test.microsoft_ads.not_null_microsoft_ads__campaign_region_report_campaign_id.b1d4f5a20f"], "model.microsoft_ads.microsoft_ads__ad_group_report": ["model.ad_reporting.int_ad_reporting__ad_group_report", "test.microsoft_ads.not_null_microsoft_ads__ad_group_report_ad_group_id.1974ec5ab9"], "model.microsoft_ads.microsoft_ads__ad_report": ["model.ad_reporting.int_ad_reporting__ad_report", "test.microsoft_ads.not_null_microsoft_ads__ad_report_ad_id.b089709125"], "model.microsoft_ads.microsoft_ads__search_report": ["model.ad_reporting.int_ad_reporting__search_report", "test.microsoft_ads.not_null_microsoft_ads__search_report_search_query.fa3625d66d"], "model.microsoft_ads.microsoft_ads__campaign_report": ["model.ad_reporting.int_ad_reporting__campaign_report", "test.microsoft_ads.not_null_microsoft_ads__campaign_report_campaign_id.67aa50e1f8"], "model.microsoft_ads.stg_microsoft_ads__account_history": ["model.microsoft_ads.microsoft_ads__account_report", "model.microsoft_ads.microsoft_ads__ad_group_report", "model.microsoft_ads.microsoft_ads__ad_report", "model.microsoft_ads.microsoft_ads__campaign_country_report", "model.microsoft_ads.microsoft_ads__campaign_region_report", "model.microsoft_ads.microsoft_ads__campaign_report", "model.microsoft_ads.microsoft_ads__keyword_report", "model.microsoft_ads.microsoft_ads__search_report", "model.microsoft_ads.microsoft_ads__url_report", "test.microsoft_ads.not_null_stg_microsoft_ads__account_history_account_id.cc273ee54e"], "model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report": ["model.microsoft_ads.microsoft_ads__ad_group_report", "test.microsoft_ads.not_null_stg_microsoft_ads__ad_group_daily_report_ad_group_id.3e03e6eff7"], "model.microsoft_ads.stg_microsoft_ads__campaign_history": ["model.microsoft_ads.microsoft_ads__ad_group_report", "model.microsoft_ads.microsoft_ads__ad_report", "model.microsoft_ads.microsoft_ads__campaign_country_report", "model.microsoft_ads.microsoft_ads__campaign_region_report", "model.microsoft_ads.microsoft_ads__campaign_report", "model.microsoft_ads.microsoft_ads__keyword_report", "model.microsoft_ads.microsoft_ads__search_report", "model.microsoft_ads.microsoft_ads__url_report", "test.microsoft_ads.not_null_stg_microsoft_ads__campaign_history_campaign_id.ee080a2122"], "model.microsoft_ads.stg_microsoft_ads__campaign_daily_report": ["model.microsoft_ads.microsoft_ads__campaign_report", "test.microsoft_ads.not_null_stg_microsoft_ads__campaign_daily_report_campaign_id.8ac0418e84"], "model.microsoft_ads.stg_microsoft_ads__ad_history": ["model.microsoft_ads.microsoft_ads__ad_report", "model.microsoft_ads.microsoft_ads__keyword_report", "model.microsoft_ads.microsoft_ads__search_report", "model.microsoft_ads.microsoft_ads__url_report", "test.microsoft_ads.not_null_stg_microsoft_ads__ad_history_ad_id.6d02c26574"], "model.microsoft_ads.stg_microsoft_ads__geographic_daily_report": ["model.microsoft_ads.microsoft_ads__campaign_country_report", "model.microsoft_ads.microsoft_ads__campaign_region_report"], "model.microsoft_ads.stg_microsoft_ads__ad_group_history": ["model.microsoft_ads.microsoft_ads__ad_group_report", "model.microsoft_ads.microsoft_ads__ad_report", "model.microsoft_ads.microsoft_ads__keyword_report", "model.microsoft_ads.microsoft_ads__search_report", "model.microsoft_ads.microsoft_ads__url_report", "test.microsoft_ads.not_null_stg_microsoft_ads__ad_group_history_ad_group_id.c8353342b7"], "model.microsoft_ads.stg_microsoft_ads__keyword_history": ["model.microsoft_ads.microsoft_ads__keyword_report", "model.microsoft_ads.microsoft_ads__search_report", "test.microsoft_ads.not_null_stg_microsoft_ads__keyword_history_keyword_id.19164a6209"], "model.microsoft_ads.stg_microsoft_ads__search_daily_report": ["model.microsoft_ads.microsoft_ads__search_report", "test.microsoft_ads.not_null_stg_microsoft_ads__search_daily_report_search_query.57f687adcc"], "model.microsoft_ads.stg_microsoft_ads__account_daily_report": ["model.microsoft_ads.microsoft_ads__account_report", "test.microsoft_ads.not_null_stg_microsoft_ads__account_daily_report_account_id.b17f45fe79"], "model.microsoft_ads.stg_microsoft_ads__keyword_daily_report": ["model.microsoft_ads.microsoft_ads__keyword_report", "test.microsoft_ads.not_null_stg_microsoft_ads__keyword_daily_report_keyword_id.e16b8c5047"], "model.microsoft_ads.stg_microsoft_ads__ad_daily_report": ["model.microsoft_ads.microsoft_ads__ad_report", "model.microsoft_ads.microsoft_ads__url_report", "test.microsoft_ads.not_null_stg_microsoft_ads__ad_daily_report_ad_id.1ed6689aa8"], "model.microsoft_ads.stg_microsoft_ads__campaign_daily_report_tmp": ["model.microsoft_ads.stg_microsoft_ads__campaign_daily_report"], "model.microsoft_ads.stg_microsoft_ads__ad_group_history_tmp": ["model.microsoft_ads.stg_microsoft_ads__ad_group_history"], "model.microsoft_ads.stg_microsoft_ads__account_daily_report_tmp": ["model.microsoft_ads.stg_microsoft_ads__account_daily_report"], "model.microsoft_ads.stg_microsoft_ads__search_daily_report_tmp": ["model.microsoft_ads.stg_microsoft_ads__search_daily_report"], "model.microsoft_ads.stg_microsoft_ads__account_history_tmp": ["model.microsoft_ads.stg_microsoft_ads__account_history"], "model.microsoft_ads.stg_microsoft_ads__ad_history_tmp": ["model.microsoft_ads.stg_microsoft_ads__ad_history"], "model.microsoft_ads.stg_microsoft_ads__geographic_daily_report_tmp": ["model.microsoft_ads.stg_microsoft_ads__geographic_daily_report"], "model.microsoft_ads.stg_microsoft_ads__keyword_history_tmp": ["model.microsoft_ads.stg_microsoft_ads__keyword_history"], "model.microsoft_ads.stg_microsoft_ads__keyword_daily_report_tmp": ["model.microsoft_ads.stg_microsoft_ads__keyword_daily_report"], "model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report_tmp": ["model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report"], "model.microsoft_ads.stg_microsoft_ads__campaign_history_tmp": ["model.microsoft_ads.stg_microsoft_ads__campaign_history"], "model.microsoft_ads.stg_microsoft_ads__ad_daily_report_tmp": ["model.microsoft_ads.stg_microsoft_ads__ad_daily_report"], "model.facebook_ads.facebook_ads__region_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_region_report"], "model.facebook_ads.facebook_ads__country_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_country_report"], "model.facebook_ads.facebook_ads__url_tags": ["model.facebook_ads.int_facebook_ads__creative_history", "test.facebook_ads.not_null_facebook_ads__url_tags__fivetran_id.151d9515f3"], "model.facebook_ads.facebook_ads__ad_report": ["model.ad_reporting.int_ad_reporting__ad_report", "test.facebook_ads.not_null_facebook_ads__ad_report_ad_id.3811d9c238"], "model.facebook_ads.facebook_ads__account_report": ["model.ad_reporting.int_ad_reporting__account_report", "test.facebook_ads.not_null_facebook_ads__account_report_account_id.9be02b4024"], "model.facebook_ads.facebook_ads__campaign_report": ["model.ad_reporting.int_ad_reporting__campaign_report", "test.facebook_ads.not_null_facebook_ads__campaign_report_campaign_id.d4f96d8d21"], "model.facebook_ads.facebook_ads__ad_set_report": ["model.ad_reporting.int_ad_reporting__ad_group_report", "test.facebook_ads.not_null_facebook_ads__ad_set_report_ad_set_id.1ac870f5e4"], "model.facebook_ads.facebook_ads__url_report": ["model.ad_reporting.int_ad_reporting__url_report", "test.facebook_ads.not_null_facebook_ads__url_report_base_url.b7757e50be"], "model.facebook_ads.stg_facebook_ads__demographics_region": ["model.facebook_ads.facebook_ads__region_report"], "model.facebook_ads.stg_facebook_ads__basic_ad_action_values": ["model.facebook_ads.int_facebook_ads__conversions"], "model.facebook_ads.stg_facebook_ads__basic_ad": ["model.facebook_ads.facebook_ads__account_report", "model.facebook_ads.facebook_ads__ad_report", "model.facebook_ads.facebook_ads__ad_set_report", "model.facebook_ads.facebook_ads__campaign_report", "model.facebook_ads.facebook_ads__url_report", "test.facebook_ads.not_null_stg_facebook_ads__basic_ad_account_id.d06f6d861b", "test.facebook_ads.not_null_stg_facebook_ads__basic_ad_ad_id.2611b250fc"], "model.facebook_ads.stg_facebook_ads__campaign_history": ["model.facebook_ads.facebook_ads__ad_report", "model.facebook_ads.facebook_ads__ad_set_report", "model.facebook_ads.facebook_ads__campaign_report", "model.facebook_ads.facebook_ads__url_report", "test.facebook_ads.not_null_stg_facebook_ads__campaign_history_campaign_id.1ca7a83852", "test.facebook_ads.not_null_stg_facebook_ads__campaign_history_updated_at.9e59f99270"], "model.facebook_ads.stg_facebook_ads__demographics_region_actions": ["model.facebook_ads.facebook_ads__region_report"], "model.facebook_ads.stg_facebook_ads__ad_set_history": ["model.facebook_ads.facebook_ads__ad_report", "model.facebook_ads.facebook_ads__ad_set_report", "model.facebook_ads.facebook_ads__url_report", "test.facebook_ads.not_null_stg_facebook_ads__ad_set_history_ad_set_id.e19a1df1bb", "test.facebook_ads.not_null_stg_facebook_ads__ad_set_history_updated_at.ef7fafe0fa"], "model.facebook_ads.stg_facebook_ads__account_history": ["model.facebook_ads.facebook_ads__account_report", "model.facebook_ads.facebook_ads__ad_report", "model.facebook_ads.facebook_ads__ad_set_report", "model.facebook_ads.facebook_ads__campaign_report", "model.facebook_ads.facebook_ads__country_report", "model.facebook_ads.facebook_ads__region_report", "model.facebook_ads.facebook_ads__url_report", "test.facebook_ads.not_null_stg_facebook_ads__account_history__fivetran_synced.0570e35e1f", "test.facebook_ads.not_null_stg_facebook_ads__account_history_account_id.f1cf38c40f"], "model.facebook_ads.stg_facebook_ads__creative_history": ["model.facebook_ads.facebook_ads__url_tags", "model.facebook_ads.int_facebook_ads__creative_history", "test.facebook_ads.not_null_stg_facebook_ads__creative_history__fivetran_synced.3b0593cb4f", "test.facebook_ads.not_null_stg_facebook_ads__creative_history_creative_id.eb4d804261"], "model.facebook_ads.stg_facebook_ads__basic_ad_actions": ["model.facebook_ads.int_facebook_ads__conversions"], "model.facebook_ads.stg_facebook_ads__demographics_country_actions": ["model.facebook_ads.facebook_ads__country_report"], "model.facebook_ads.stg_facebook_ads__demographics_country": ["model.facebook_ads.facebook_ads__country_report"], "model.facebook_ads.stg_facebook_ads__ad_history": ["model.facebook_ads.facebook_ads__ad_report", "model.facebook_ads.facebook_ads__ad_set_report", "model.facebook_ads.facebook_ads__campaign_report", "model.facebook_ads.facebook_ads__url_report", "test.facebook_ads.not_null_stg_facebook_ads__ad_history_ad_id.11429d3064", "test.facebook_ads.not_null_stg_facebook_ads__ad_history_updated_at.250a5a84e4"], "model.facebook_ads.stg_facebook_ads__ad_history_tmp": ["model.facebook_ads.stg_facebook_ads__ad_history"], "model.facebook_ads.stg_facebook_ads__campaign_history_tmp": ["model.facebook_ads.stg_facebook_ads__campaign_history"], "model.facebook_ads.stg_facebook_ads__demographics_country_actions_tmp": ["model.facebook_ads.stg_facebook_ads__demographics_country_actions"], "model.facebook_ads.stg_facebook_ads__demographics_region_actions_tmp": ["model.facebook_ads.stg_facebook_ads__demographics_region_actions"], "model.facebook_ads.stg_facebook_ads__basic_ad_actions_tmp": ["model.facebook_ads.stg_facebook_ads__basic_ad_actions"], "model.facebook_ads.stg_facebook_ads__basic_ad_action_values_tmp": ["model.facebook_ads.stg_facebook_ads__basic_ad_action_values"], "model.facebook_ads.stg_facebook_ads__ad_set_history_tmp": ["model.facebook_ads.stg_facebook_ads__ad_set_history"], "model.facebook_ads.stg_facebook_ads__demographics_region_tmp": ["model.facebook_ads.stg_facebook_ads__demographics_region"], "model.facebook_ads.stg_facebook_ads__creative_history_tmp": ["model.facebook_ads.stg_facebook_ads__creative_history"], "model.facebook_ads.stg_facebook_ads__basic_ad_tmp": ["model.facebook_ads.stg_facebook_ads__basic_ad"], "model.facebook_ads.stg_facebook_ads__account_history_tmp": ["model.facebook_ads.stg_facebook_ads__account_history"], "model.facebook_ads.stg_facebook_ads__demographics_country_tmp": ["model.facebook_ads.stg_facebook_ads__demographics_country"], "model.facebook_ads.int_facebook_ads__creative_history": ["model.facebook_ads.facebook_ads__url_report"], "model.facebook_ads.int_facebook_ads__conversions": ["model.facebook_ads.facebook_ads__account_report", "model.facebook_ads.facebook_ads__ad_report", "model.facebook_ads.facebook_ads__ad_set_report", "model.facebook_ads.facebook_ads__campaign_report", "model.facebook_ads.facebook_ads__url_report"], "test.linkedin.not_null_linkedin_ads__account_report_account_id.0c34ea1842": [], "test.linkedin.not_null_linkedin_ads__account_report_date_day.c4b33f8f53": [], "test.linkedin.not_null_linkedin_ads__campaign_report_date_day.8d320b88b1": [], "test.linkedin.not_null_linkedin_ads__campaign_report_campaign_id.bf43964b15": [], "test.linkedin.not_null_linkedin_ads__campaign_group_report_date_day.2676a1f76b": [], "test.linkedin.not_null_linkedin_ads__campaign_group_report_campaign_group_id.39b448cdaf": [], "test.linkedin.not_null_linkedin_ads__creative_report_date_day.0c6338b020": [], "test.linkedin.not_null_linkedin_ads__creative_report_creative_id.096d93f889": [], "test.linkedin.not_null_linkedin_ads__url_report_date_day.48b540f315": [], "test.linkedin.not_null_linkedin_ads__url_report_creative_id.83967fe9d2": [], "test.linkedin.not_null_linkedin_ads__url_report_click_uri.81534087cb": [], "test.linkedin.not_null_linkedin_ads__monthly_campaign_country_report_date_month.ab0a8d3050": [], "test.linkedin.not_null_linkedin_ads__monthly_campaign_country_report_campaign_id.4624641c1c": [], "test.linkedin.not_null_linkedin_ads__monthly_campaign_region_report_date_month.4fd809085e": [], "test.linkedin.not_null_linkedin_ads__monthly_campaign_region_report_campaign_id.5884bc5d68": [], "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_creative_creative_id.062abfe14b": [], "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_creative_date_day.cb81bc4766": [], "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_campaign_campaign_id.d6ae242f1a": [], "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_campaign_date_day.ef97bed766": [], "test.linkedin.not_null_stg_linkedin_ads__creative_history_creative_id.4d51d55474": [], "test.linkedin.not_null_stg_linkedin_ads__campaign_history_campaign_id.b026971ca2": [], "test.linkedin.not_null_stg_linkedin_ads__campaign_history_version_tag.64954cc469": [], "test.linkedin.not_null_stg_linkedin_ads__campaign_group_history_campaign_group_id.3888f3777d": [], "test.linkedin.not_null_stg_linkedin_ads__campaign_group_history_last_modified_at.a716e2a7ea": [], "test.linkedin.not_null_stg_linkedin_ads__account_history_account_id.a9fa7f93c0": [], "test.linkedin.not_null_stg_linkedin_ads__account_history_version_tag.58c46c5d81": [], "test.linkedin.not_null_stg_linkedin_ads__geo_geo_id.a9fc61210c": [], "test.linkedin.not_null_stg_linkedin_ads__monthly_ad_analytics_by_country_date_month.553fe89e70": [], "test.linkedin.not_null_stg_linkedin_ads__monthly_ad_analytics_by_region_date_month.d065ed2b78": [], "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_ad_group_id.60febec6b5": [], "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_date_day.e6ffb30b3c": [], "test.apple_search_ads.not_null_apple_search_ads__ad_report_ad_id.0ab2c5075c": [], "test.apple_search_ads.not_null_apple_search_ads__ad_report_date_day.b86c049e17": [], "test.apple_search_ads.not_null_apple_search_ads__campaign_report_campaign_id.e26ed1e146": [], "test.apple_search_ads.not_null_apple_search_ads__campaign_report_date_day.35652b8d1a": [], "test.apple_search_ads.not_null_apple_search_ads__keyword_report_keyword_id.ea493710db": [], "test.apple_search_ads.not_null_apple_search_ads__keyword_report_date_day.3dec8d0e82": [], "test.apple_search_ads.not_null_apple_search_ads__organization_report_organization_id.b6cf7d69f8": [], "test.apple_search_ads.not_null_apple_search_ads__organization_report_date_day.5784fed523": [], "test.apple_search_ads.not_null_apple_search_ads__search_term_report_date_day.1bc3b0d57c": [], "test.apple_search_ads.not_null_apple_search_ads__search_term_report_search_term_text.aecc7447f7": [], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f": [], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7": [], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1": [], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b": [], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d": [], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a": [], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8": [], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f": [], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58": [], "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9": [], "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8": [], "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728": [], "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3": [], "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287": [], "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2": [], "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e": [], "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928": [], "test.apple_search_ads.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb": [], "test.apple_search_ads.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad": [], "test.apple_search_ads.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302": [], "test.reddit_ads.not_null_reddit_ads__account_report_date_day.7b43e6cb90": [], "test.reddit_ads.not_null_reddit_ads__account_report_account_id.16f11188c5": [], "test.reddit_ads.not_null_reddit_ads__ad_group_report_date_day.6463e6f6f7": [], "test.reddit_ads.not_null_reddit_ads__ad_group_report_ad_group_id.057bd60604": [], "test.reddit_ads.not_null_reddit_ads__ad_report_date_day.608b21c69a": [], "test.reddit_ads.not_null_reddit_ads__ad_report_ad_id.1da054a14e": [], "test.reddit_ads.not_null_reddit_ads__campaign_report_date_day.f79cca4131": [], "test.reddit_ads.not_null_reddit_ads__campaign_report_campaign_id.f5491a0b49": [], "test.reddit_ads.not_null_reddit_ads__url_report_date_day.4b0f6363da": [], "test.reddit_ads.not_null_reddit_ads__url_report_ad_id.8ff83da2b0": [], "test.reddit_ads.not_null_reddit_ads__url_report_base_url.2f585bebcb": [], "test.reddit_ads.not_null_stg_reddit_ads__account_account_id.512f0b8078": [], "test.reddit_ads.not_null_stg_reddit_ads__account_report_account_id.1f2a0195de": [], "test.reddit_ads.not_null_stg_reddit_ads__ad_ad_id.40188b63dd": [], "test.reddit_ads.not_null_stg_reddit_ads__ad_report_ad_id.c4af84b857": [], "test.reddit_ads.not_null_stg_reddit_ads__ad_group_ad_group_id.65795d8dc2": [], "test.reddit_ads.not_null_stg_reddit_ads__ad_group_report_ad_group_id.9836cd084d": [], "test.reddit_ads.not_null_stg_reddit_ads__campaign_campaign_id.f3f24e4682": [], "test.reddit_ads.not_null_stg_reddit_ads__campaign_report_campaign_id.c717612b4f": [], "test.snapchat_ads.not_null_snapchat_ads__account_report_date_day.688d7ed260": [], "test.snapchat_ads.not_null_snapchat_ads__account_report_ad_account_id.589c81966b": [], "test.snapchat_ads.not_null_snapchat_ads__ad_report_date_day.7c5350c8fe": [], "test.snapchat_ads.not_null_snapchat_ads__ad_report_ad_id.9000850744": [], "test.snapchat_ads.not_null_snapchat_ads__campaign_report_date_day.4e4e31223b": [], "test.snapchat_ads.not_null_snapchat_ads__campaign_report_campaign_id.19fd7135ac": [], "test.snapchat_ads.not_null_snapchat_ads__ad_squad_report_date_day.39118ca639": [], "test.snapchat_ads.not_null_snapchat_ads__ad_squad_report_ad_squad_id.424c0bbffe": [], "test.snapchat_ads.not_null_snapchat_ads__url_report_date_day.bcbe87a7f6": [], "test.snapchat_ads.not_null_snapchat_ads__url_report_ad_id.ecbdfc0d78": [], "test.snapchat_ads.not_null_snapchat_ads__url_report_base_url.15676dc1de": [], "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_date_day.b946d6ae47": [], "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_campaign_id.33fe016201": [], "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_country.332a585832": [], "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_date_day.3d3ad303c4": [], "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_campaign_id.9b92b4f074": [], "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_region.041579919a": [], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_account_history__fivetran_synced.2d5dd77824": [], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_account_history_ad_account_id.426d71d605": [], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_history__fivetran_synced.1607c70fda": [], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_history_ad_id.e9d367fd15": [], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_hourly_report_ad_id.7e763de19d": [], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_hourly_report_date_hour.666cda1cd7": [], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_history__fivetran_synced.7ed7d105ae": [], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_history_ad_squad_id.71c7122278": [], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_hourly_report_ad_squad_id.ab16aa72c9": [], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_hourly_report_date_hour.6f0b63a9cb": [], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_history__fivetran_synced.55bc48b3ec": [], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_history_campaign_id.f74a0fb8c0": [], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_hourly_report_campaign_id.f255c38a3e": [], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_hourly_report_date_hour.0bc4218ac8": [], "test.snapchat_ads.not_null_stg_snapchat_ads__creative_history__fivetran_synced.b9c95b4380": [], "test.snapchat_ads.not_null_stg_snapchat_ads__creative_history_creative_id.09c83690f4": [], "test.snapchat_ads.not_null_stg_snapchat_ads__creative_url_tag_history_creative_id.7ff6bb9c1b": [], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_campaign_id.1b07be54fe": [], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_country.34db53b159": [], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_date_day.d3d7dd7af1": [], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_campaign_id.99fbccb78d": [], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_region.44327f07bf": [], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_date_day.eec50e6826": [], "test.pinterest.not_null_pinterest_ads__url_report_date_day.b09048037e": [], "test.pinterest.not_null_pinterest_ads__url_report_destination_url.0bb7f30502": [], "test.pinterest.not_null_pinterest_ads__url_report_pin_promotion_id.0da711ad6a": [], "test.pinterest.not_null_pinterest_ads__ad_group_report_date_day.ed7c27b8a7": [], "test.pinterest.not_null_pinterest_ads__ad_group_report_ad_group_id.134f9ac6c2": [], "test.pinterest.not_null_pinterest_ads__campaign_report_date_day.10ac8272bf": [], "test.pinterest.not_null_pinterest_ads__campaign_report_campaign_id.8001ea60f2": [], "test.pinterest.not_null_pinterest_ads__advertiser_report_date_day.aedeceeeca": [], "test.pinterest.not_null_pinterest_ads__advertiser_report_advertiser_id.13380f0672": [], "test.pinterest.not_null_pinterest_ads__keyword_report_date_day.23130e9fba": [], "test.pinterest.not_null_pinterest_ads__keyword_report_keyword_id.0d73460198": [], "test.pinterest.not_null_pinterest_ads__pin_promotion_report_date_day.3128d28cfd": [], "test.pinterest.not_null_pinterest_ads__pin_promotion_report_pin_promotion_id.2540e0a561": [], "test.pinterest.not_null_pinterest_ads__campaign_country_report_date_day.a9da473d38": [], "test.pinterest.not_null_pinterest_ads__campaign_country_report_campaign_id.9b1d309d2b": [], "test.pinterest.not_null_pinterest_ads__campaign_region_report_date_day.e81588bc6e": [], "test.pinterest.not_null_pinterest_ads__campaign_region_report_campaign_id.1a64423d71": [], "test.pinterest.not_null_stg_pinterest_ads__ad_group_history_ad_group_id.220c6220be": [], "test.pinterest.not_null_stg_pinterest_ads__campaign_history_campaign_id.60cb10d341": [], "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_history_pin_promotion_id.171995cd34": [], "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_report_date_day.ed272212a1": [], "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_report_pin_promotion_id.9c3c9f71ab": [], "test.pinterest.not_null_stg_pinterest_ads__ad_group_report_date_day.80e8904c4c": [], "test.pinterest.not_null_stg_pinterest_ads__ad_group_report_ad_group_id.bb8cf3c471": [], "test.pinterest.not_null_stg_pinterest_ads__advertiser_history_advertiser_id.7d24f665fb": [], "test.pinterest.not_null_stg_pinterest_ads__advertiser_report_date_day.153bd03c95": [], "test.pinterest.not_null_stg_pinterest_ads__advertiser_report_advertiser_id.1b16ed73ff": [], "test.pinterest.not_null_stg_pinterest_ads__campaign_report_date_day.7ef5fb1238": [], "test.pinterest.not_null_stg_pinterest_ads__campaign_report_campaign_id.a287eba0fc": [], "test.pinterest.not_null_stg_pinterest_ads__keyword_history_keyword_id.246889377a": [], "test.pinterest.not_null_stg_pinterest_ads__keyword_report_date_day.9937216300": [], "test.pinterest.not_null_stg_pinterest_ads__keyword_report_keyword_id.5f00679c48": [], "test.google_ads.not_null_google_ads__url_report_base_url.e3578c0f72": [], "test.google_ads.not_null_google_ads__account_report_account_id.abb0985422": [], "test.google_ads.not_null_google_ads__ad_group_report_ad_group_id.c186523c0c": [], "test.google_ads.not_null_google_ads__ad_report_ad_id.7bd6a287ad": [], "test.google_ads.not_null_google_ads__campaign_report_campaign_id.cc6694fa0e": [], "test.google_ads.not_null_google_ads__keyword_report_criterion_id.4cab66a055": [], "test.google_ads.unique_google_ads__campaign_bid_modifiers_report_bid_modifier_report_key.d68443174a": [], "test.google_ads.not_null_google_ads__campaign_bid_modifiers_report_bid_modifier_report_key.746ae8cfa3": [], "test.google_ads.not_null_google_ads__campaign_bid_modifiers_report_campaign_id.68d212d025": [], "test.google_ads.unique_google_ads__campaign_budget_diagnostics_report_budget_diagnostics_report_key.ca90f632f4": [], "test.google_ads.not_null_google_ads__campaign_budget_diagnostics_report_budget_diagnostics_report_key.c2c4d80aab": [], "test.google_ads.not_null_google_ads__campaign_budget_diagnostics_report_campaign_id.9a579bd702": [], "test.google_ads.not_null_stg_google_ads__account_history_account_id.5ca373f51f": [], "test.google_ads.not_null_stg_google_ads__ad_group_history_ad_group_id.f6c7c939be": [], "test.google_ads.not_null_stg_google_ads__ad_history_ad_id.8c23c38248": [], "test.google_ads.not_null_stg_google_ads__ad_stats_date_day.9a43c0fce4": [], "test.google_ads.not_null_stg_google_ads__ad_stats_ad_id.2612d83cc8": [], "test.google_ads.not_null_stg_google_ads__campaign_history_campaign_id.fa0c825e75": [], "test.google_ads.not_null_stg_google_ads__ad_group_criterion_history_criterion_id.7a0a8b8476": [], "test.google_ads.not_null_stg_google_ads__ad_group_stats_date_day.3c6a221786": [], "test.google_ads.not_null_stg_google_ads__ad_group_stats_ad_group_id.a8d430f077": [], "test.google_ads.not_null_stg_google_ads__campaign_stats_date_day.dc097fd76b": [], "test.google_ads.not_null_stg_google_ads__campaign_stats_campaign_id.11587fa10f": [], "test.google_ads.not_null_stg_google_ads__keyword_stats_date_day.a9da72f74d": [], "test.google_ads.not_null_stg_google_ads__keyword_stats_keyword_id.f0945d6cf0": [], "test.google_ads.not_null_stg_google_ads__account_stats_account_id.2a9da5417b": [], "test.google_ads.not_null_stg_google_ads__account_stats_date_day.57ac8772d5": [], "test.google_ads.not_null_stg_google_ads__search_term_keyword_stats_date_day.3ff55abd88": [], "test.google_ads.not_null_stg_google_ads__search_term_keyword_stats_search_term_id.0019238ba2": [], "test.google_ads.not_null_stg_google_ads__campaign_bid_modifier_history_campaign_id.c7e1e11f33": [], "test.google_ads.not_null_stg_google_ads__campaign_budget_history_campaign_id.730c3d8025": [], "test.google_ads.not_null_stg_google_ads__campaign_criterion_history_criterion_id.ade9d1fdbd": [], "test.google_ads.not_null_stg_google_ads__campaign_bidding_strategy_history_campaign_id.7efbcd0291": [], "test.amazon_ads.not_null_amazon_ads__account_report_profile_id.87fb8dbe66": [], "test.amazon_ads.not_null_amazon_ads__account_report_account_id.83adef7061": [], "test.amazon_ads.not_null_amazon_ads__ad_group_report_ad_group_id.8a23dc123a": [], "test.amazon_ads.not_null_amazon_ads__ad_report_ad_id.93728159b3": [], "test.amazon_ads.not_null_amazon_ads__campaign_report_campaign_id.a9cabadd7c": [], "test.amazon_ads.not_null_amazon_ads__portfolio_report_profile_id.1a910441c6": [], "test.amazon_ads.not_null_amazon_ads__keyword_report_keyword_id.303f680e4a": [], "test.amazon_ads.not_null_amazon_ads__search_report_search_term.3c23d4658a": [], "test.amazon_ads.not_null_stg_amazon_ads__ad_group_history_ad_group_id.6b524b990b": [], "test.amazon_ads.not_null_stg_amazon_ads__ad_group_level_report_ad_group_id.ee4ef641c3": [], "test.amazon_ads.not_null_stg_amazon_ads__advertised_product_report_ad_id.307c6bc8d4": [], "test.amazon_ads.not_null_stg_amazon_ads__campaign_history_campaign_id.49e395897c": [], "test.amazon_ads.not_null_stg_amazon_ads__campaign_level_report_campaign_id.1efec68194": [], "test.amazon_ads.not_null_stg_amazon_ads__keyword_history_keyword_id.f21f6add6e": [], "test.amazon_ads.not_null_stg_amazon_ads__portfolio_history_portfolio_id.e22bb2ba02": [], "test.amazon_ads.not_null_stg_amazon_ads__product_ad_history_ad_id.8744ab1cd8": [], "test.amazon_ads.not_null_stg_amazon_ads__profile_profile_id.bd192c102b": [], "test.amazon_ads.not_null_stg_amazon_ads__targeting_keyword_report_keyword_id.101a3299d7": [], "test.amazon_ads.not_null_stg_amazon_ads__search_term_ad_keyword_report_search_term.ef04af3b06": [], "test.twitter_ads.not_null_twitter_ads__campaign_report_campaign_id.03b1c451b8": [], "test.twitter_ads.not_null_twitter_ads__campaign_report_date_day.2b30b279b0": [], "test.twitter_ads.not_null_twitter_ads__campaign_report_placement.c66d252e82": [], "test.twitter_ads.not_null_twitter_ads__line_item_report_date_day.86c934e8ce": [], "test.twitter_ads.not_null_twitter_ads__line_item_report_line_item_id.0462d58211": [], "test.twitter_ads.not_null_twitter_ads__line_item_report_placement.f103369312": [], "test.twitter_ads.not_null_twitter_ads__account_report_date_day.84896c5846": [], "test.twitter_ads.not_null_twitter_ads__account_report_placement.157dcb6194": [], "test.twitter_ads.not_null_twitter_ads__account_report_account_id.90d5808908": [], "test.twitter_ads.not_null_twitter_ads__keyword_report_date_day.e0ce90c1ec": [], "test.twitter_ads.not_null_twitter_ads__keyword_report_keyword_id.91efa0a538": [], "test.twitter_ads.not_null_twitter_ads__promoted_tweet_report_placement.d89c9b27e5": [], "test.twitter_ads.not_null_twitter_ads__promoted_tweet_report_promoted_tweet_id.5df08e154e": [], "test.twitter_ads.not_null_twitter_ads__url_report_date_day.33fcb7e04b": [], "test.twitter_ads.not_null_twitter_ads__url_report_placement.92ca3b192e": [], "test.twitter_ads.not_null_twitter_ads__url_report_promoted_tweet_id.d690f99143": [], "test.twitter_ads.not_null_twitter_ads__url_report_base_url.dfd7ab549e": [], "test.twitter_ads.not_null_twitter_ads__campaign_country_report_campaign_id.d08c7d25a2": [], "test.twitter_ads.not_null_twitter_ads__campaign_country_report_date_day.33eabfbcaa": [], "test.twitter_ads.not_null_twitter_ads__campaign_country_report_placement.3a4c65b9c5": [], "test.twitter_ads.not_null_twitter_ads__campaign_region_report_campaign_id.c06b8be032": [], "test.twitter_ads.not_null_twitter_ads__campaign_region_report_date_day.884ad86a28": [], "test.twitter_ads.not_null_twitter_ads__campaign_region_report_placement.e6fb374bf5": [], "test.twitter_ads.not_null_stg_twitter_ads__account_history_account_id.66fb3601e2": [], "test.twitter_ads.not_null_stg_twitter_ads__campaign_history_campaign_id.51218487ce": [], "test.twitter_ads.not_null_stg_twitter_ads__line_item_history_line_item_id.2cef040809": [], "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_history_promoted_tweet_id.f447a1cd09": [], "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_date_day.c4c46a5894": [], "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_promoted_tweet_id.6028694598": [], "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_placement.c1b1f648b3": [], "test.twitter_ads.not_null_stg_twitter_ads__tweet_url_index.e998fb67be": [], "test.twitter_ads.not_null_stg_twitter_ads__tweet_url_tweet_id.f7e1670218": [], "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_date_day.053c09786c": [], "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_campaign_id.a63b62981f": [], "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_placement.5067d8c4f4": [], "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_date_day.0f4d8cc8fe": [], "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_line_item_id.9f5a4860b7": [], "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_placement.cd7e77e0eb": [], "test.twitter_ads.not_null_stg_twitter_ads__line_item_keywords_report_keyword_id.e5f015e9ec": [], "test.twitter_ads.not_null_stg_twitter_ads__line_item_keywords_report_date_day.c7e7155b13": [], "test.twitter_ads.not_null_stg_twitter_ads__tweet_tweet_id.a0427f37cd": [], "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_country.8bc44f6e39": [], "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_date_day.bf69378746": [], "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_campaign_id.e1ddc306c2": [], "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_placement.638fb0cf03": [], "test.twitter_ads.not_null_stg_twitter_ads__campaign_regions_report_region.7b8b6fd555": [], "test.twitter_ads.not_null_stg_twitter_ads__campaign_regions_report_date_day.e7f9f99776": [], "test.ad_reporting.not_null_ad_reporting__account_report_account_id.316a64c022": [], "test.ad_reporting.not_null_ad_reporting__ad_group_report_ad_group_id.963e17e842": [], "test.ad_reporting.not_null_ad_reporting__ad_report_ad_id.f3eb210152": [], "test.ad_reporting.not_null_ad_reporting__campaign_report_campaign_id.1cfaa7698b": [], "test.ad_reporting.not_null_ad_reporting__keyword_report_keyword_id.51a45fb334": [], "test.ad_reporting.not_null_ad_reporting__search_report_search_query.ee2f0fcafb": [], "test.ad_reporting.not_null_ad_reporting__url_report_base_url.a29864e5b6": [], "test.tiktok_ads.not_null_tiktok_ads__advertiser_report_date_day.1276998c99": [], "test.tiktok_ads.not_null_tiktok_ads__advertiser_report_advertiser_id.f956c568ce": [], "test.tiktok_ads.not_null_tiktok_ads__ad_report_date_day.d61ee4a5ed": [], "test.tiktok_ads.not_null_tiktok_ads__ad_report_ad_id.2d8166e707": [], "test.tiktok_ads.not_null_tiktok_ads__ad_group_report_date_day.e39164964e": [], "test.tiktok_ads.not_null_tiktok_ads__ad_group_report_ad_group_id.17fb8710f4": [], "test.tiktok_ads.not_null_tiktok_ads__campaign_report_date_day.3807b0e836": [], "test.tiktok_ads.not_null_tiktok_ads__campaign_report_campaign_id.8a2b0c8ef8": [], "test.tiktok_ads.not_null_tiktok_ads__url_report_date_day.d593573eff": [], "test.tiktok_ads.not_null_tiktok_ads__url_report_ad_id.6c41067bd0": [], "test.tiktok_ads.not_null_tiktok_ads__url_report_base_url.37afef2e1b": [], "test.tiktok_ads.not_null_tiktok_ads__campaign_country_report_date_day.c68c1bd379": [], "test.tiktok_ads.not_null_tiktok_ads__campaign_country_report_campaign_id.f439b91d6d": [], "test.tiktok_ads.not_null_stg_tiktok_ads__advertiser_advertiser_id.5deab92def": [], "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_history_ad_group_id.04778d7fad": [], "test.tiktok_ads.not_null_stg_tiktok_ads__ad_history_ad_id.4ffd05b23a": [], "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_history_campaign_id.7f9147d1e1": [], "test.tiktok_ads.not_null_stg_tiktok_ads__ad_report_hourly_ad_id.ee84d783ed": [], "test.tiktok_ads.not_null_stg_tiktok_ads__ad_report_hourly_stat_time_hour.9e2a2dca81": [], "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_report_hourly_ad_group_id.8da17119f1": [], "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_report_hourly_stat_time_hour.ca4b495127": [], "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_report_hourly_campaign_id.ef898379fb": [], "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_report_hourly_stat_time_hour.e75e13184c": [], "test.microsoft_ads.not_null_microsoft_ads__account_report_account_id.f88e46157e": [], "test.microsoft_ads.not_null_microsoft_ads__ad_group_report_ad_group_id.1974ec5ab9": [], "test.microsoft_ads.not_null_microsoft_ads__ad_report_ad_id.b089709125": [], "test.microsoft_ads.not_null_microsoft_ads__campaign_report_campaign_id.67aa50e1f8": [], "test.microsoft_ads.not_null_microsoft_ads__keyword_report_keyword_id.da1d648d3b": [], "test.microsoft_ads.not_null_microsoft_ads__search_report_search_query.fa3625d66d": [], "test.microsoft_ads.not_null_microsoft_ads__url_report_base_url.c1af50307a": [], "test.microsoft_ads.not_null_microsoft_ads__campaign_country_report_account_id.9d9807033d": [], "test.microsoft_ads.not_null_microsoft_ads__campaign_country_report_campaign_id.10b01e8782": [], "test.microsoft_ads.not_null_microsoft_ads__campaign_region_report_account_id.b3a2b47986": [], "test.microsoft_ads.not_null_microsoft_ads__campaign_region_report_campaign_id.b1d4f5a20f": [], "test.microsoft_ads.not_null_stg_microsoft_ads__account_history_account_id.cc273ee54e": [], "test.microsoft_ads.not_null_stg_microsoft_ads__account_daily_report_account_id.b17f45fe79": [], "test.microsoft_ads.not_null_stg_microsoft_ads__ad_group_history_ad_group_id.c8353342b7": [], "test.microsoft_ads.not_null_stg_microsoft_ads__ad_group_daily_report_ad_group_id.3e03e6eff7": [], "test.microsoft_ads.not_null_stg_microsoft_ads__ad_history_ad_id.6d02c26574": [], "test.microsoft_ads.not_null_stg_microsoft_ads__ad_daily_report_ad_id.1ed6689aa8": [], "test.microsoft_ads.not_null_stg_microsoft_ads__campaign_history_campaign_id.ee080a2122": [], "test.microsoft_ads.not_null_stg_microsoft_ads__campaign_daily_report_campaign_id.8ac0418e84": [], "test.microsoft_ads.not_null_stg_microsoft_ads__keyword_history_keyword_id.19164a6209": [], "test.microsoft_ads.not_null_stg_microsoft_ads__keyword_daily_report_keyword_id.e16b8c5047": [], "test.microsoft_ads.not_null_stg_microsoft_ads__search_daily_report_search_query.57f687adcc": [], "test.facebook_ads.not_null_facebook_ads__url_report_base_url.b7757e50be": [], "test.facebook_ads.not_null_facebook_ads__ad_report_ad_id.3811d9c238": [], "test.facebook_ads.not_null_facebook_ads__ad_set_report_ad_set_id.1ac870f5e4": [], "test.facebook_ads.not_null_facebook_ads__campaign_report_campaign_id.d4f96d8d21": [], "test.facebook_ads.not_null_facebook_ads__account_report_account_id.9be02b4024": [], "test.facebook_ads.not_null_facebook_ads__url_tags__fivetran_id.151d9515f3": [], "test.facebook_ads.not_null_stg_facebook_ads__account_history_account_id.f1cf38c40f": [], "test.facebook_ads.not_null_stg_facebook_ads__account_history__fivetran_synced.0570e35e1f": [], "test.facebook_ads.not_null_stg_facebook_ads__ad_history_ad_id.11429d3064": [], "test.facebook_ads.not_null_stg_facebook_ads__ad_history_updated_at.250a5a84e4": [], "test.facebook_ads.not_null_stg_facebook_ads__ad_set_history_ad_set_id.e19a1df1bb": [], "test.facebook_ads.not_null_stg_facebook_ads__ad_set_history_updated_at.ef7fafe0fa": [], "test.facebook_ads.not_null_stg_facebook_ads__campaign_history_campaign_id.1ca7a83852": [], "test.facebook_ads.not_null_stg_facebook_ads__campaign_history_updated_at.9e59f99270": [], "test.facebook_ads.not_null_stg_facebook_ads__creative_history__fivetran_synced.3b0593cb4f": [], "test.facebook_ads.not_null_stg_facebook_ads__creative_history_creative_id.eb4d804261": [], "test.facebook_ads.not_null_stg_facebook_ads__basic_ad_ad_id.2611b250fc": [], "test.facebook_ads.not_null_stg_facebook_ads__basic_ad_account_id.d06f6d861b": [], "source.linkedin.linkedin_ads.ad_analytics_by_creative": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_creative_tmp"], "source.linkedin.linkedin_ads.creative_history": ["model.linkedin.stg_linkedin_ads__creative_history_tmp"], "source.linkedin.linkedin_ads.campaign_history": ["model.linkedin.stg_linkedin_ads__campaign_history_tmp"], "source.linkedin.linkedin_ads.campaign_group_history": ["model.linkedin.stg_linkedin_ads__campaign_group_history_tmp"], "source.linkedin.linkedin_ads.account_history": ["model.linkedin.stg_linkedin_ads__account_history_tmp"], "source.linkedin.linkedin_ads.ad_analytics_by_campaign": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign_tmp"], "source.linkedin.linkedin_ads.geo": ["model.linkedin.stg_linkedin_ads__geo_tmp"], "source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_country": ["model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country_tmp"], "source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_region": ["model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region_tmp"], "source.apple_search_ads.apple_search_ads.ad_group_history": ["model.apple_search_ads.stg_apple_search_ads__ad_group_history_tmp"], "source.apple_search_ads.apple_search_ads.ad_group_report": ["model.apple_search_ads.stg_apple_search_ads__ad_group_report_tmp"], "source.apple_search_ads.apple_search_ads.ad_history": ["model.apple_search_ads.stg_apple_search_ads__ad_history_tmp"], "source.apple_search_ads.apple_search_ads.ad_level_report": ["model.apple_search_ads.stg_apple_search_ads__ad_report_tmp"], "source.apple_search_ads.apple_search_ads.campaign_history": ["model.apple_search_ads.stg_apple_search_ads__campaign_history_tmp"], "source.apple_search_ads.apple_search_ads.campaign_report": ["model.apple_search_ads.stg_apple_search_ads__campaign_report_tmp"], "source.apple_search_ads.apple_search_ads.keyword_history": ["model.apple_search_ads.stg_apple_search_ads__keyword_history_tmp"], "source.apple_search_ads.apple_search_ads.keyword_report": ["model.apple_search_ads.stg_apple_search_ads__keyword_report_tmp"], "source.apple_search_ads.apple_search_ads.organization": ["model.apple_search_ads.stg_apple_search_ads__organization_tmp"], "source.apple_search_ads.apple_search_ads.search_term_report": ["model.apple_search_ads.stg_apple_search_ads__search_term_report_tmp"], "source.reddit_ads.reddit_ads.business_account": ["model.reddit_ads.stg_reddit_ads__account_tmp"], "source.reddit_ads.reddit_ads.account_report": ["model.reddit_ads.stg_reddit_ads__account_report_tmp"], "source.reddit_ads.reddit_ads.ad": ["model.reddit_ads.stg_reddit_ads__ad_tmp"], "source.reddit_ads.reddit_ads.ad_report": ["model.reddit_ads.stg_reddit_ads__ad_report_tmp"], "source.reddit_ads.reddit_ads.ad_group": ["model.reddit_ads.stg_reddit_ads__ad_group_tmp"], "source.reddit_ads.reddit_ads.ad_group_report": ["model.reddit_ads.stg_reddit_ads__ad_group_report_tmp"], "source.reddit_ads.reddit_ads.campaign": ["model.reddit_ads.stg_reddit_ads__campaign_tmp"], "source.reddit_ads.reddit_ads.campaign_report": ["model.reddit_ads.stg_reddit_ads__campaign_report_tmp"], "source.reddit_ads.reddit_ads.account_conversions_report": ["model.reddit_ads.stg_reddit_ads__account_conversions_report_tmp"], "source.reddit_ads.reddit_ads.ad_group_conversions_report": ["model.reddit_ads.stg_reddit_ads__ad_group_conversions_report_tmp"], "source.reddit_ads.reddit_ads.ad_conversions_report": ["model.reddit_ads.stg_reddit_ads__ad_conversions_report_tmp"], "source.reddit_ads.reddit_ads.campaign_conversions_report": ["model.reddit_ads.stg_reddit_ads__campaign_conversions_report_tmp"], "source.reddit_ads.reddit_ads.campaign_country_report": ["model.reddit_ads.stg_reddit_ads__campaign_country_report_tmp"], "source.reddit_ads.reddit_ads.campaign_country_conversions_report": ["model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report_tmp"], "source.snapchat_ads.snapchat_ads.ad_account_history": ["model.snapchat_ads.stg_snapchat_ads__ad_account_history_tmp"], "source.snapchat_ads.snapchat_ads.ad_history": ["model.snapchat_ads.stg_snapchat_ads__ad_history_tmp"], "source.snapchat_ads.snapchat_ads.ad_hourly_report": ["model.snapchat_ads.stg_snapchat_ads__ad_hourly_report_tmp"], "source.snapchat_ads.snapchat_ads.ad_squad_history": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_history_tmp"], "source.snapchat_ads.snapchat_ads.ad_squad_hourly_report": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report_tmp"], "source.snapchat_ads.snapchat_ads.campaign_history": ["model.snapchat_ads.stg_snapchat_ads__campaign_history_tmp"], "source.snapchat_ads.snapchat_ads.campaign_hourly_report": ["model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report_tmp"], "source.snapchat_ads.snapchat_ads.creative_history": ["model.snapchat_ads.stg_snapchat_ads__creative_history_tmp"], "source.snapchat_ads.snapchat_ads.creative_url_tag_history": ["model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history_tmp"], "source.snapchat_ads.snapchat_ads.campaign_geo_country_daily_report": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report_tmp"], "source.snapchat_ads.snapchat_ads.campaign_geo_region_daily_report": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report_tmp"], "source.pinterest.pinterest_ads.pin_promotion_report": ["model.pinterest.stg_pinterest_ads__pin_promotion_report_tmp"], "source.pinterest.pinterest_ads.pin_promotion_history": ["model.pinterest.stg_pinterest_ads__pin_promotion_history_tmp"], "source.pinterest.pinterest_ads.campaign_history": ["model.pinterest.stg_pinterest_ads__campaign_history_tmp"], "source.pinterest.pinterest_ads.ad_group_history": ["model.pinterest.stg_pinterest_ads__ad_group_history_tmp"], "source.pinterest.pinterest_ads.ad_group_report": ["model.pinterest.stg_pinterest_ads__ad_group_report_tmp"], "source.pinterest.pinterest_ads.advertiser_history": ["model.pinterest.stg_pinterest_ads__advertiser_history_tmp"], "source.pinterest.pinterest_ads.advertiser_report": ["model.pinterest.stg_pinterest_ads__advertiser_report_tmp"], "source.pinterest.pinterest_ads.campaign_report": ["model.pinterest.stg_pinterest_ads__campaign_report_tmp"], "source.pinterest.pinterest_ads.keyword_history": ["model.pinterest.stg_pinterest_ads__keyword_history_tmp"], "source.pinterest.pinterest_ads.keyword_report": ["model.pinterest.stg_pinterest_ads__keyword_report_tmp"], "source.pinterest.pinterest_ads.pin_promotion_targeting_report": ["model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report_tmp"], "source.pinterest.pinterest_ads.targeting_geo": ["model.pinterest.stg_pinterest_ads__targeting_geo_tmp"], "source.pinterest.pinterest_ads.targeting_geo_region": ["model.pinterest.stg_pinterest_ads__targeting_geo_region_tmp"], "source.google_ads.google_ads.ad_stats": ["model.google_ads.stg_google_ads__ad_stats_tmp"], "source.google_ads.google_ads.ad_history": ["model.google_ads.stg_google_ads__ad_history_tmp"], "source.google_ads.google_ads.ad_group_history": ["model.google_ads.stg_google_ads__ad_group_history_tmp"], "source.google_ads.google_ads.campaign_history": ["model.google_ads.stg_google_ads__campaign_history_tmp"], "source.google_ads.google_ads.account_history": ["model.google_ads.stg_google_ads__account_history_tmp"], "source.google_ads.google_ads.ad_group_criterion_history": ["model.google_ads.stg_google_ads__ad_group_criterion_history_tmp"], "source.google_ads.google_ads.ad_group_stats": ["model.google_ads.stg_google_ads__ad_group_stats_tmp"], "source.google_ads.google_ads.campaign_stats": ["model.google_ads.stg_google_ads__campaign_stats_tmp"], "source.google_ads.google_ads.keyword_stats": ["model.google_ads.stg_google_ads__keyword_stats_tmp"], "source.google_ads.google_ads.account_stats": ["model.google_ads.stg_google_ads__account_stats_tmp"], "source.google_ads.google_ads.search_term_keyword_stats": ["model.google_ads.stg_google_ads__search_term_keyword_stats_tmp"], "source.google_ads.google_ads.campaign_bid_modifier_history": ["model.google_ads.stg_google_ads__campaign_bid_modifier_history_tmp"], "source.google_ads.google_ads.campaign_budget_history": ["model.google_ads.stg_google_ads__campaign_budget_history_tmp"], "source.google_ads.google_ads.campaign_criterion_history": ["model.google_ads.stg_google_ads__campaign_criterion_history_tmp"], "source.google_ads.google_ads.campaign_bidding_strategy_history": ["model.google_ads.stg_google_ads__campaign_bidding_strategy_history_tmp"], "source.amazon_ads.amazon_ads.ad_group_history": ["model.amazon_ads.stg_amazon_ads__ad_group_history_tmp"], "source.amazon_ads.amazon_ads.ad_group_level_report": ["model.amazon_ads.stg_amazon_ads__ad_group_level_report_tmp"], "source.amazon_ads.amazon_ads.advertised_product_report": ["model.amazon_ads.stg_amazon_ads__advertised_product_report_tmp"], "source.amazon_ads.amazon_ads.campaign_history": ["model.amazon_ads.stg_amazon_ads__campaign_history_tmp"], "source.amazon_ads.amazon_ads.campaign_level_report": ["model.amazon_ads.stg_amazon_ads__campaign_level_report_tmp"], "source.amazon_ads.amazon_ads.keyword_history": ["model.amazon_ads.stg_amazon_ads__keyword_history_tmp"], "source.amazon_ads.amazon_ads.portfolio_history": ["model.amazon_ads.stg_amazon_ads__portfolio_history_tmp"], "source.amazon_ads.amazon_ads.product_ad_history": ["model.amazon_ads.stg_amazon_ads__product_ad_history_tmp"], "source.amazon_ads.amazon_ads.profile": ["model.amazon_ads.stg_amazon_ads__profile_tmp"], "source.amazon_ads.amazon_ads.targeting_keyword_report": ["model.amazon_ads.stg_amazon_ads__targeting_keyword_report_tmp"], "source.amazon_ads.amazon_ads.search_term_ad_keyword_report": ["model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report_tmp"], "source.twitter_ads.twitter_ads.account_history": ["model.twitter_ads.stg_twitter_ads__account_history_tmp"], "source.twitter_ads.twitter_ads.campaign_history": ["model.twitter_ads.stg_twitter_ads__campaign_history_tmp"], "source.twitter_ads.twitter_ads.line_item_history": ["model.twitter_ads.stg_twitter_ads__line_item_history_tmp"], "source.twitter_ads.twitter_ads.promoted_tweet_history": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_history_tmp"], "source.twitter_ads.twitter_ads.tweet_url": ["model.twitter_ads.stg_twitter_ads__tweet_url_tmp"], "source.twitter_ads.twitter_ads.promoted_tweet_report": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_report_tmp"], "source.twitter_ads.twitter_ads.tweet": ["model.twitter_ads.stg_twitter_ads__tweet_tmp"], "source.twitter_ads.twitter_ads.campaign_report": ["model.twitter_ads.stg_twitter_ads__campaign_report_tmp"], "source.twitter_ads.twitter_ads.line_item_report": ["model.twitter_ads.stg_twitter_ads__line_item_report_tmp"], "source.twitter_ads.twitter_ads.line_item_keywords_report": ["model.twitter_ads.stg_twitter_ads__line_item_keywords_report_tmp"], "source.twitter_ads.twitter_ads.campaign_locations_report": ["model.twitter_ads.stg_twitter_ads__campaign_locations_report_tmp"], "source.twitter_ads.twitter_ads.campaign_regions_report": ["model.twitter_ads.stg_twitter_ads__campaign_regions_report_tmp"], "source.tiktok_ads.tiktok_ads.advertiser": ["model.tiktok_ads.stg_tiktok_ads__advertiser_tmp"], "source.tiktok_ads.tiktok_ads.campaign_history": ["model.tiktok_ads.stg_tiktok_ads__campaign_history_tmp"], "source.tiktok_ads.tiktok_ads.adgroup_history": ["model.tiktok_ads.stg_tiktok_ads__ad_group_history_tmp"], "source.tiktok_ads.tiktok_ads.ad_history": ["model.tiktok_ads.stg_tiktok_ads__ad_history_tmp"], "source.tiktok_ads.tiktok_ads.ad_report_hourly": ["model.tiktok_ads.stg_tiktok_ads__ad_report_hourly_tmp"], "source.tiktok_ads.tiktok_ads.campaign_report_hourly": ["model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly_tmp"], "source.tiktok_ads.tiktok_ads.adgroup_report_hourly": ["model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly_tmp"], "source.tiktok_ads.tiktok_ads.campaign_country_report": ["model.tiktok_ads.stg_tiktok_ads__campaign_country_report_tmp"], "source.tiktok_ads.tiktok_ads.location": ["model.tiktok_ads.stg_tiktok_ads__location_tmp"], "source.microsoft_ads.microsoft_ads.account_history": ["model.microsoft_ads.stg_microsoft_ads__account_history_tmp"], "source.microsoft_ads.microsoft_ads.account_performance_daily_report": ["model.microsoft_ads.stg_microsoft_ads__account_daily_report_tmp"], "source.microsoft_ads.microsoft_ads.ad_group_history": ["model.microsoft_ads.stg_microsoft_ads__ad_group_history_tmp"], "source.microsoft_ads.microsoft_ads.ad_group_performance_daily_report": ["model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report_tmp"], "source.microsoft_ads.microsoft_ads.ad_history": ["model.microsoft_ads.stg_microsoft_ads__ad_history_tmp"], "source.microsoft_ads.microsoft_ads.ad_performance_daily_report": ["model.microsoft_ads.stg_microsoft_ads__ad_daily_report_tmp"], "source.microsoft_ads.microsoft_ads.campaign_history": ["model.microsoft_ads.stg_microsoft_ads__campaign_history_tmp"], "source.microsoft_ads.microsoft_ads.campaign_performance_daily_report": ["model.microsoft_ads.stg_microsoft_ads__campaign_daily_report_tmp"], "source.microsoft_ads.microsoft_ads.keyword_history": ["model.microsoft_ads.stg_microsoft_ads__keyword_history_tmp"], "source.microsoft_ads.microsoft_ads.keyword_performance_daily_report": ["model.microsoft_ads.stg_microsoft_ads__keyword_daily_report_tmp"], "source.microsoft_ads.microsoft_ads.search_query_performance_daily_report": ["model.microsoft_ads.stg_microsoft_ads__search_daily_report_tmp"], "source.microsoft_ads.microsoft_ads.geographic_performance_daily_report": ["model.microsoft_ads.stg_microsoft_ads__geographic_daily_report_tmp"], "source.facebook_ads.facebook_ads.account_history": ["model.facebook_ads.stg_facebook_ads__account_history_tmp"], "source.facebook_ads.facebook_ads.ad_history": ["model.facebook_ads.stg_facebook_ads__ad_history_tmp"], "source.facebook_ads.facebook_ads.ad_set_history": ["model.facebook_ads.stg_facebook_ads__ad_set_history_tmp"], "source.facebook_ads.facebook_ads.basic_ad": ["model.facebook_ads.stg_facebook_ads__basic_ad_tmp"], "source.facebook_ads.facebook_ads.basic_ad_actions": ["model.facebook_ads.stg_facebook_ads__basic_ad_actions_tmp"], "source.facebook_ads.facebook_ads.basic_ad_action_values": ["model.facebook_ads.stg_facebook_ads__basic_ad_action_values_tmp"], "source.facebook_ads.facebook_ads.campaign_history": ["model.facebook_ads.stg_facebook_ads__campaign_history_tmp"], "source.facebook_ads.facebook_ads.creative_history": ["model.facebook_ads.stg_facebook_ads__creative_history_tmp"], "source.facebook_ads.facebook_ads.demographics_country": ["model.facebook_ads.stg_facebook_ads__demographics_country_tmp"], "source.facebook_ads.facebook_ads.demographics_country_actions": ["model.facebook_ads.stg_facebook_ads__demographics_country_actions_tmp"], "source.facebook_ads.facebook_ads.demographics_region": ["model.facebook_ads.stg_facebook_ads__demographics_region_tmp"], "source.facebook_ads.facebook_ads.demographics_region_actions": ["model.facebook_ads.stg_facebook_ads__demographics_region_actions_tmp"], "metric.ad_reporting.active_ads": [], "metric.ad_reporting.avg_spend_nonzero": [], "metric.ad_reporting.avg_spend": [], "metric.ad_reporting.clicks": ["metric.ad_reporting.bounce_rate", "metric.ad_reporting.clickthrough_rate", "metric.ad_reporting.cost_per_click"], "metric.ad_reporting.impressions": ["metric.ad_reporting.bounce_rate", "metric.ad_reporting.clickthrough_rate"], "metric.ad_reporting.spend": ["metric.ad_reporting.cost_per_click"], "metric.ad_reporting.clickthrough_rate": [], "metric.ad_reporting.cost_per_click": [], "metric.ad_reporting.bounce_rate": [], "semantic_model.ad_reporting.ad_report": ["metric.ad_reporting.active_ads", "metric.ad_reporting.avg_spend", "metric.ad_reporting.avg_spend_nonzero", "metric.ad_reporting.clicks", "metric.ad_reporting.impressions", "metric.ad_reporting.spend"]}, "group_map": {}, "saved_queries": {}, "semantic_models": {"semantic_model.ad_reporting.ad_report": {"name": "ad_report", "resource_type": "semantic_model", "package_name": "ad_reporting", "path": "semantic_models/ad_reporting__ad_report.yml", "original_file_path": "models/semantic_models/ad_reporting__ad_report.yml", "unique_id": "semantic_model.ad_reporting.ad_report", "fqn": ["ad_reporting", "semantic_models", "ad_report"], "model": "ref('ad_reporting__ad_report')", "node_relation": {"alias": "ad_reporting__ad_report", "schema_name": "public_ad_reporting_dev", "database": "postgres", "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__ad_report\""}, "description": "Each record represents daily metrics by ad, ad group, campaign and account.", "label": null, "defaults": null, "entities": [], "measures": [{"name": "ad_spend", "agg": "sum", "description": null, "label": null, "create_metric": false, "expr": "spend", "agg_params": null, "non_additive_dimension": null, "agg_time_dimension": "date_day", "config": {"meta": {}}}, {"name": "impressions", "agg": "sum", "description": null, "label": null, "create_metric": false, "expr": "impressions", "agg_params": null, "non_additive_dimension": null, "agg_time_dimension": "date_day", "config": {"meta": {}}}, {"name": "avg_spend", "agg": "average", "description": null, "label": null, "create_metric": false, "expr": "spend", "agg_params": null, "non_additive_dimension": null, "agg_time_dimension": "date_day", "config": {"meta": {}}}, {"name": "clicks", "agg": "sum", "description": null, "label": null, "create_metric": false, "expr": "clicks", "agg_params": null, "non_additive_dimension": null, "agg_time_dimension": "date_day", "config": {"meta": {}}}, {"name": "active_ads", "agg": "count_distinct", "description": null, "label": null, "create_metric": false, "expr": "ad_id", "agg_params": null, "non_additive_dimension": null, "agg_time_dimension": "date_day", "config": {"meta": {}}}, {"name": "avg_spend_nonzero", "agg": "average", "description": null, "label": null, "create_metric": false, "expr": "spend", "agg_params": null, "non_additive_dimension": null, "agg_time_dimension": "date_day", "config": {"meta": {}}}], "dimensions": [{"name": "spend", "type": "categorical", "description": null, "label": null, "is_partition": false, "type_params": null, "expr": null, "metadata": null, "config": {"meta": {}}}, {"name": "account_name", "type": "categorical", "description": null, "label": null, "is_partition": false, "type_params": null, "expr": null, "metadata": null, "config": {"meta": {}}}, {"name": "ad_name", "type": "categorical", "description": null, "label": null, "is_partition": false, "type_params": null, "expr": null, "metadata": null, "config": {"meta": {}}}, {"name": "date_day", "type": "time", "description": null, "label": null, "is_partition": false, "type_params": {"time_granularity": "day", "validity_params": null}, "expr": null, "metadata": null, "config": {"meta": {}}}, {"name": "campaign_name", "type": "categorical", "description": null, "label": null, "is_partition": false, "type_params": null, "expr": null, "metadata": null, "config": {"meta": {}}}, {"name": "campaign_id", "type": "categorical", "description": null, "label": null, "is_partition": false, "type_params": null, "expr": null, "metadata": null, "config": {"meta": {}}}, {"name": "account_id", "type": "categorical", "description": null, "label": null, "is_partition": false, "type_params": null, "expr": null, "metadata": null, "config": {"meta": {}}}, {"name": "ad_id", "type": "categorical", "description": null, "label": null, "is_partition": false, "type_params": null, "expr": null, "metadata": null, "config": {"meta": {}}}, {"name": "platform", "type": "categorical", "description": null, "label": null, "is_partition": false, "type_params": null, "expr": null, "metadata": null, "config": {"meta": {}}}, {"name": "ad_group_id", "type": "categorical", "description": null, "label": null, "is_partition": false, "type_params": null, "expr": null, "metadata": null, "config": {"meta": {}}}, {"name": "ad_group_name", "type": "categorical", "description": null, "label": null, "is_partition": false, "type_params": null, "expr": null, "metadata": null, "config": {"meta": {}}}], "metadata": null, "depends_on": {"macros": [], "nodes": ["model.ad_reporting.ad_reporting__ad_report"]}, "refs": [{"name": "ad_reporting__ad_report", "package": null, "version": null}], "created_at": 1783450505.5537186, "config": {"enabled": true, "group": null, "meta": {}}, "unrendered_config": {}, "primary_entity": "ad", "group": null}}, "unit_tests": {}, "functions": {}} \ No newline at end of file +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v12.json", "dbt_version": "1.11.12", "generated_at": "2026-07-10T18:31:04.916902Z", "invocation_id": "a9547dfa-e1b4-4424-8d6d-fa6496702378", "invocation_started_at": "2026-07-10T18:30:09.058438+00:00", "env": {}, "project_name": "ad_reporting_integration_tests", "project_id": "9bf57d857f8bb3abf75f1b334ad30f3c", "user_id": null, "send_anonymous_usage_stats": false, "adapter_type": "postgres", "quoting": {"database": true, "schema": true, "identifier": true, "column": null}, "run_started_at": "2026-07-10T18:30:09.058686+00:00"}, "nodes": {"seed.ad_reporting_integration_tests.twitter_campaign_locations_report_data": {"database": "postgres", "schema": "public", "name": "twitter_campaign_locations_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "twitter_campaign_locations_report_data.csv", "original_file_path": "seeds/twitter_campaign_locations_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.twitter_campaign_locations_report_data", "fqn": ["ad_reporting_integration_tests", "twitter_campaign_locations_report_data"], "alias": "twitter_campaign_locations_report_data", "checksum": {"name": "sha256", "checksum": "a43a6e4dabfcdb8168f1ce9855d872e91ee69ce2d0df2f319dc7210222040556"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.4980066, "relation_name": "\"postgres\".\"public\".\"twitter_campaign_locations_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.apple_search_ad_history_data": {"database": "postgres", "schema": "public", "name": "apple_search_ad_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "apple_search_ad_history_data.csv", "original_file_path": "seeds/apple_search_ad_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.apple_search_ad_history_data", "fqn": ["ad_reporting_integration_tests", "apple_search_ad_history_data"], "alias": "apple_search_ad_history_data", "checksum": {"name": "sha256", "checksum": "e9e1a65339d24d616ce16ea8ee3cc902473a1b5048789ad338c4ba6ca57fe8e0"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"creation_time": "timestamp", "modification_time": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"creation_time": "timestamp", "modification_time": "timestamp"}}, "created_at": 1783708213.5057425, "relation_name": "\"postgres\".\"public\".\"apple_search_ad_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.snapchat_ad_hourly_report_data": {"database": "postgres", "schema": "public", "name": "snapchat_ad_hourly_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "snapchat_ad_hourly_report_data.csv", "original_file_path": "seeds/snapchat_ad_hourly_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.snapchat_ad_hourly_report_data", "fqn": ["ad_reporting_integration_tests", "snapchat_ad_hourly_report_data"], "alias": "snapchat_ad_hourly_report_data", "checksum": {"name": "sha256", "checksum": "44942448ec2f5fdab1d102948af6724bc9d10970c6d760cd5b9eb778a16aa12b"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"date": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"date": "timestamp"}}, "created_at": 1783708213.509185, "relation_name": "\"postgres\".\"public\".\"snapchat_ad_hourly_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.linkedin_ad_account_history_data": {"database": "postgres", "schema": "public", "name": "linkedin_ad_account_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "linkedin_ad_account_history_data.csv", "original_file_path": "seeds/linkedin_ad_account_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.linkedin_ad_account_history_data", "fqn": ["ad_reporting_integration_tests", "linkedin_ad_account_history_data"], "alias": "linkedin_ad_account_history_data", "checksum": {"name": "sha256", "checksum": "f57fbb5e5a881a56457ed9b37150ec111e83e2e43deff5cc82891125ef61bc1d"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"created_time": "timestamp", "last_modified_time": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"created_time": "timestamp", "last_modified_time": "timestamp"}}, "created_at": 1783708213.512719, "relation_name": "\"postgres\".\"public\".\"linkedin_ad_account_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_account_history_data": {"database": "postgres", "schema": "public", "name": "google_ads_account_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_account_history_data.csv", "original_file_path": "seeds/google_ads_account_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_account_history_data", "fqn": ["ad_reporting_integration_tests", "google_ads_account_history_data"], "alias": "google_ads_account_history_data", "checksum": {"name": "sha256", "checksum": "bf0559a512f089514aa67964b7ae5aef0fee8deb6e0874c01e853ed78dd7883d"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.5161529, "relation_name": "\"postgres\".\"public\".\"google_ads_account_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.microsoft_ads_campaign_performance_daily_report_data": {"database": "postgres", "schema": "public", "name": "microsoft_ads_campaign_performance_daily_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "microsoft_ads_campaign_performance_daily_report_data.csv", "original_file_path": "seeds/microsoft_ads_campaign_performance_daily_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_campaign_performance_daily_report_data", "fqn": ["ad_reporting_integration_tests", "microsoft_ads_campaign_performance_daily_report_data"], "alias": "microsoft_ads_campaign_performance_daily_report_data", "checksum": {"name": "sha256", "checksum": "d8dd92f23ecc97f6845e6b06977edfa44f0cc2a255aec5849b19449b6f294b57"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "bigint", "campaign_id": "bigint", "spend": "float"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "spend": "float"}}, "created_at": 1783708213.5194855, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_campaign_performance_daily_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.tiktok_advertiser_data": {"database": "postgres", "schema": "public", "name": "tiktok_advertiser_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "tiktok_advertiser_data.csv", "original_file_path": "seeds/tiktok_advertiser_data.csv", "unique_id": "seed.ad_reporting_integration_tests.tiktok_advertiser_data", "fqn": ["ad_reporting_integration_tests", "tiktok_advertiser_data"], "alias": "tiktok_advertiser_data", "checksum": {"name": "sha256", "checksum": "d85541c61ba67dc5ec46124b93d9484b43554ca4aa6e7582e52cbdb04fd5287b"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.5228415, "relation_name": "\"postgres\".\"public\".\"tiktok_advertiser_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.amazon_ads_targeting_keyword_report_data": {"database": "postgres", "schema": "public", "name": "amazon_ads_targeting_keyword_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "amazon_ads_targeting_keyword_report_data.csv", "original_file_path": "seeds/amazon_ads_targeting_keyword_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_targeting_keyword_report_data", "fqn": ["ad_reporting_integration_tests", "amazon_ads_targeting_keyword_report_data"], "alias": "amazon_ads_targeting_keyword_report_data", "checksum": {"name": "sha256", "checksum": "465149df01ea42da88e6faab29bc91faaed75d50c2e04cece5c7a4a442e31994"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "campaign_budget_amount": "float", "keyword_bid": "float"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"_fivetran_synced": "timestamp", "campaign_budget_amount": "float", "keyword_bid": "float"}}, "created_at": 1783708213.526192, "relation_name": "\"postgres\".\"public\".\"amazon_ads_targeting_keyword_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.snapchat_creative_url_tag_history_data": {"database": "postgres", "schema": "public", "name": "snapchat_creative_url_tag_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "snapchat_creative_url_tag_history_data.csv", "original_file_path": "seeds/snapchat_creative_url_tag_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.snapchat_creative_url_tag_history_data", "fqn": ["ad_reporting_integration_tests", "snapchat_creative_url_tag_history_data"], "alias": "snapchat_creative_url_tag_history_data", "checksum": {"name": "sha256", "checksum": "c5e8dbafad038e142209d2145532d5d5e762922bf4fe44535901b46cd9797dcc"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.5295854, "relation_name": "\"postgres\".\"public\".\"snapchat_creative_url_tag_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_actions_data": {"database": "postgres", "schema": "public", "name": "facebook_ads_basic_ad_actions_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "facebook_ads_basic_ad_actions_data.csv", "original_file_path": "seeds/facebook_ads_basic_ad_actions_data.csv", "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_actions_data", "fqn": ["ad_reporting_integration_tests", "facebook_ads_basic_ad_actions_data"], "alias": "facebook_ads_basic_ad_actions_data", "checksum": {"name": "sha256", "checksum": "ed0977ee47305aeb99778125280a699f5a7f0d6d36f7f115ff53c737b6c929ca"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"value": "float", "inline": "float", "_1_d_view": "float", "_7_d_click": "float"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"value": "float", "inline": "float", "_1_d_view": "float", "_7_d_click": "float"}}, "created_at": 1783708213.532919, "relation_name": "\"postgres\".\"public\".\"facebook_ads_basic_ad_actions_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.amazon_ads_ad_group_history_data": {"database": "postgres", "schema": "public", "name": "amazon_ads_ad_group_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "amazon_ads_ad_group_history_data.csv", "original_file_path": "seeds/amazon_ads_ad_group_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_ad_group_history_data", "fqn": ["ad_reporting_integration_tests", "amazon_ads_ad_group_history_data"], "alias": "amazon_ads_ad_group_history_data", "checksum": {"name": "sha256", "checksum": "45753ff9cf086544b805b76303478c515ead8870e4ad9ae3988de8cae6befdde"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.5362513, "relation_name": "\"postgres\".\"public\".\"amazon_ads_ad_group_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_campaign_data": {"database": "postgres", "schema": "public", "name": "reddit_ads_campaign_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_campaign_data.csv", "original_file_path": "seeds/reddit_ads_campaign_data.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_campaign_data", "fqn": ["ad_reporting_integration_tests", "reddit_ads_campaign_data"], "alias": "reddit_ads_campaign_data", "checksum": {"name": "sha256", "checksum": "726c8b03bd81f57203df064ff66dd74bbdae559b8d7e1175c214ec06da819881"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "varchar(255)", "id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}", "id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783708213.539542, "relation_name": "\"postgres\".\"public\".\"reddit_ads_campaign_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.apple_search_ad_report_data": {"database": "postgres", "schema": "public", "name": "apple_search_ad_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "apple_search_ad_report_data.csv", "original_file_path": "seeds/apple_search_ad_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.apple_search_ad_report_data", "fqn": ["ad_reporting_integration_tests", "apple_search_ad_report_data"], "alias": "apple_search_ad_report_data", "checksum": {"name": "sha256", "checksum": "8936d63dc5f422a1d45a934fad9be37c2ab56047a4ba67eaaf7f64830d9de563"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.5429046, "relation_name": "\"postgres\".\"public\".\"apple_search_ad_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_ad_group_report_data": {"database": "postgres", "schema": "public", "name": "reddit_ads_ad_group_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_ad_group_report_data.csv", "original_file_path": "seeds/reddit_ads_ad_group_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_ad_group_report_data", "fqn": ["ad_reporting_integration_tests", "reddit_ads_ad_group_report_data"], "alias": "reddit_ads_ad_group_report_data", "checksum": {"name": "sha256", "checksum": "18a4e6c21b4b4c6248b681cc49bad5d0d12171a2d0a699ca99af864737d40817"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "varchar(255)", "ad_group_id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}", "ad_group_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783708213.5462253, "relation_name": "\"postgres\".\"public\".\"reddit_ads_ad_group_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.microsoft_ads_geographic_performance_daily_report_data": {"database": "postgres", "schema": "public", "name": "microsoft_ads_geographic_performance_daily_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "microsoft_ads_geographic_performance_daily_report_data.csv", "original_file_path": "seeds/microsoft_ads_geographic_performance_daily_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_geographic_performance_daily_report_data", "fqn": ["ad_reporting_integration_tests", "microsoft_ads_geographic_performance_daily_report_data"], "alias": "microsoft_ads_geographic_performance_daily_report_data", "checksum": {"name": "sha256", "checksum": "5d2d0ccecc1cf02ec73c3a5652ac26f41c9da96d9141034c5ed2e8c48b1524e4"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "bigint", "campaign_id": "bigint", "ad_group_id": "bigint", "location_id": "bigint", "clicks": "integer", "impressions": "integer", "spend": "numeric", "conversions_qualified": "integer", "conversions": "integer", "revenue": "numeric", "all_conversions_qualified": "integer", "all_conversions": "integer", "all_revenue": "numeric"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "location_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "clicks": "integer", "impressions": "integer", "spend": "numeric", "conversions_qualified": "integer", "conversions": "integer", "revenue": "numeric", "all_conversions_qualified": "integer", "all_conversions": "integer", "all_revenue": "numeric"}}, "created_at": 1783708213.5498009, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_geographic_performance_daily_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.twitter_promoted_tweet_report_data": {"database": "postgres", "schema": "public", "name": "twitter_promoted_tweet_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "twitter_promoted_tweet_report_data.csv", "original_file_path": "seeds/twitter_promoted_tweet_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.twitter_promoted_tweet_report_data", "fqn": ["ad_reporting_integration_tests", "twitter_promoted_tweet_report_data"], "alias": "twitter_promoted_tweet_report_data", "checksum": {"name": "sha256", "checksum": "481c6351831987ef3e159d6ae4f98a7f8d9a231125e99178fd01d1fbc906f0e5"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.5531857, "relation_name": "\"postgres\".\"public\".\"twitter_promoted_tweet_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.snapchat_creative_history_data": {"database": "postgres", "schema": "public", "name": "snapchat_creative_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "snapchat_creative_history_data.csv", "original_file_path": "seeds/snapchat_creative_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.snapchat_creative_history_data", "fqn": ["ad_reporting_integration_tests", "snapchat_creative_history_data"], "alias": "snapchat_creative_history_data", "checksum": {"name": "sha256", "checksum": "40505e1e47b59c850371007584560a03172120f078da2c81c6712aea77d868a8"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.5571651, "relation_name": "\"postgres\".\"public\".\"snapchat_creative_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_data": {"database": "postgres", "schema": "public", "name": "facebook_ads_basic_ad_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "facebook_ads_basic_ad_data.csv", "original_file_path": "seeds/facebook_ads_basic_ad_data.csv", "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_data", "fqn": ["ad_reporting_integration_tests", "facebook_ads_basic_ad_data"], "alias": "facebook_ads_basic_ad_data", "checksum": {"name": "sha256", "checksum": "66b31e24edd0ba75d3fee6ad4c1522fd9b43417943aac398f1c92f5076ba7ac0"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"ad_id": "bigint", "account_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"ad_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "account_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.5604713, "relation_name": "\"postgres\".\"public\".\"facebook_ads_basic_ad_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_ad_group_criterion_history_data": {"database": "postgres", "schema": "public", "name": "google_ads_ad_group_criterion_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_ad_group_criterion_history_data.csv", "original_file_path": "seeds/google_ads_ad_group_criterion_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_ad_group_criterion_history_data", "fqn": ["ad_reporting_integration_tests", "google_ads_ad_group_criterion_history_data"], "alias": "google_ads_ad_group_criterion_history_data", "checksum": {"name": "sha256", "checksum": "ba922f14e5ead32ec131a2d000bede63d45f504b6c27fc84534b4bf56fc019f2"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "base_campaign_id": "bigint", "ad_group_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "base_campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.5638492, "relation_name": "\"postgres\".\"public\".\"google_ads_ad_group_criterion_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.amazon_ads_portfolio_history_data": {"database": "postgres", "schema": "public", "name": "amazon_ads_portfolio_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "amazon_ads_portfolio_history_data.csv", "original_file_path": "seeds/amazon_ads_portfolio_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_portfolio_history_data", "fqn": ["ad_reporting_integration_tests", "amazon_ads_portfolio_history_data"], "alias": "amazon_ads_portfolio_history_data", "checksum": {"name": "sha256", "checksum": "f35ce3ea8cd6309e50535134b9375861995eb6cda4e215efc0b170cae03a3eee"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.5671408, "relation_name": "\"postgres\".\"public\".\"amazon_ads_portfolio_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.apple_search_organization_data": {"database": "postgres", "schema": "public", "name": "apple_search_organization_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "apple_search_organization_data.csv", "original_file_path": "seeds/apple_search_organization_data.csv", "unique_id": "seed.ad_reporting_integration_tests.apple_search_organization_data", "fqn": ["ad_reporting_integration_tests", "apple_search_organization_data"], "alias": "apple_search_organization_data", "checksum": {"name": "sha256", "checksum": "bbb5878ab9c07bd1f391181a8321ea50476f37d25f36fd1d66e58d513336699c"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.570338, "relation_name": "\"postgres\".\"public\".\"apple_search_organization_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.twitter_campaign_history_data": {"database": "postgres", "schema": "public", "name": "twitter_campaign_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "twitter_campaign_history_data.csv", "original_file_path": "seeds/twitter_campaign_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.twitter_campaign_history_data", "fqn": ["ad_reporting_integration_tests", "twitter_campaign_history_data"], "alias": "twitter_campaign_history_data", "checksum": {"name": "sha256", "checksum": "3d5c2b36e3c3bbbefb4a60469db1471ae01fe82c65d167bd062fb947d617b247"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.573602, "relation_name": "\"postgres\".\"public\".\"twitter_campaign_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.linkedin_monthly_ad_analytics_by_member_region_data": {"database": "postgres", "schema": "public", "name": "linkedin_monthly_ad_analytics_by_member_region_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "linkedin_monthly_ad_analytics_by_member_region_data.csv", "original_file_path": "seeds/linkedin_monthly_ad_analytics_by_member_region_data.csv", "unique_id": "seed.ad_reporting_integration_tests.linkedin_monthly_ad_analytics_by_member_region_data", "fqn": ["ad_reporting_integration_tests", "linkedin_monthly_ad_analytics_by_member_region_data"], "alias": "linkedin_monthly_ad_analytics_by_member_region_data", "checksum": {"name": "sha256", "checksum": "b19d48623e7c44b6c8cee56674b210f34c1a3dc65aa5637fd72f0aa4da191686"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"cost_in_local_currency": "numeric", "cost_in_usd": "numeric"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"cost_in_local_currency": "numeric", "cost_in_usd": "numeric"}}, "created_at": 1783708213.57716, "relation_name": "\"postgres\".\"public\".\"linkedin_monthly_ad_analytics_by_member_region_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.apple_search_campaign_history_data": {"database": "postgres", "schema": "public", "name": "apple_search_campaign_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "apple_search_campaign_history_data.csv", "original_file_path": "seeds/apple_search_campaign_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.apple_search_campaign_history_data", "fqn": ["ad_reporting_integration_tests", "apple_search_campaign_history_data"], "alias": "apple_search_campaign_history_data", "checksum": {"name": "sha256", "checksum": "67a15ad12127dc164bd5fa76ea29db9ca3be5f483960039d16f24acc886fbe62"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp"}}, "created_at": 1783708213.5806413, "relation_name": "\"postgres\".\"public\".\"apple_search_campaign_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.pinterest_campaign_report_data": {"database": "postgres", "schema": "public", "name": "pinterest_campaign_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "pinterest_campaign_report_data.csv", "original_file_path": "seeds/pinterest_campaign_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.pinterest_campaign_report_data", "fqn": ["ad_reporting_integration_tests", "pinterest_campaign_report_data"], "alias": "pinterest_campaign_report_data", "checksum": {"name": "sha256", "checksum": "047f3d50be337f92c4385d27515012017b627cdf9834cecf020fa0b29ce2935d"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"campaign_id": "bigint", "advertiser_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"campaign_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "advertiser_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.5839899, "relation_name": "\"postgres\".\"public\".\"pinterest_campaign_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.snapchat_campaign_history_data": {"database": "postgres", "schema": "public", "name": "snapchat_campaign_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "snapchat_campaign_history_data.csv", "original_file_path": "seeds/snapchat_campaign_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.snapchat_campaign_history_data", "fqn": ["ad_reporting_integration_tests", "snapchat_campaign_history_data"], "alias": "snapchat_campaign_history_data", "checksum": {"name": "sha256", "checksum": "640eb2ec082938ad70c430a6b3441711f6fed19eb6e28d7622f03294e92e5b70"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.5873494, "relation_name": "\"postgres\".\"public\".\"snapchat_campaign_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.twitter_account_report_data": {"database": "postgres", "schema": "public", "name": "twitter_account_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "twitter_account_report_data.csv", "original_file_path": "seeds/twitter_account_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.twitter_account_report_data", "fqn": ["ad_reporting_integration_tests", "twitter_account_report_data"], "alias": "twitter_account_report_data", "checksum": {"name": "sha256", "checksum": "d1364362cbe48a00e05e628fac71d48e151ee2c5394b44c6000765ea069fa154"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.5905159, "relation_name": "\"postgres\".\"public\".\"twitter_account_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.microsoft_ads_account_history_data": {"database": "postgres", "schema": "public", "name": "microsoft_ads_account_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "microsoft_ads_account_history_data.csv", "original_file_path": "seeds/microsoft_ads_account_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_account_history_data", "fqn": ["ad_reporting_integration_tests", "microsoft_ads_account_history_data"], "alias": "microsoft_ads_account_history_data", "checksum": {"name": "sha256", "checksum": "282800342d5306132bdc208ee361599831ae8566b4639cd5c3bea492062e4b78"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"name": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"name": "{{ 'string' if target.type in ['bigquery','spark', 'databricks'] else 'varchar' }}"}}, "created_at": 1783708213.5937986, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_account_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.snapchat_campaign_hourly_report_data": {"database": "postgres", "schema": "public", "name": "snapchat_campaign_hourly_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "snapchat_campaign_hourly_report_data.csv", "original_file_path": "seeds/snapchat_campaign_hourly_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.snapchat_campaign_hourly_report_data", "fqn": ["ad_reporting_integration_tests", "snapchat_campaign_hourly_report_data"], "alias": "snapchat_campaign_hourly_report_data", "checksum": {"name": "sha256", "checksum": "90145700bcd091f7cfe9fa88155e2473a36b674778ec51ed934c6876ec23e91f"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.597093, "relation_name": "\"postgres\".\"public\".\"snapchat_campaign_hourly_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.facebook_ads_account_history_data": {"database": "postgres", "schema": "public", "name": "facebook_ads_account_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "facebook_ads_account_history_data.csv", "original_file_path": "seeds/facebook_ads_account_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_account_history_data", "fqn": ["ad_reporting_integration_tests", "facebook_ads_account_history_data"], "alias": "facebook_ads_account_history_data", "checksum": {"name": "sha256", "checksum": "92f318955a317f351b928ce94de43eae07f29dc3cadbd0f1a26e62fdba1dc4b1"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "name": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "name": "{{ 'string' if target.type in ['bigquery','spark', 'databricks'] else 'varchar' }}"}}, "created_at": 1783708213.6003394, "relation_name": "\"postgres\".\"public\".\"facebook_ads_account_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.apple_search_search_term_report_data": {"database": "postgres", "schema": "public", "name": "apple_search_search_term_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "apple_search_search_term_report_data.csv", "original_file_path": "seeds/apple_search_search_term_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.apple_search_search_term_report_data", "fqn": ["ad_reporting_integration_tests", "apple_search_search_term_report_data"], "alias": "apple_search_search_term_report_data", "checksum": {"name": "sha256", "checksum": "add5f0a4ebd076182acceb2710596c581a32c7aa738b57bc1bdda58cc8013f4d"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.603711, "relation_name": "\"postgres\".\"public\".\"apple_search_search_term_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.linkedin_monthly_ad_analytics_by_member_country_data": {"database": "postgres", "schema": "public", "name": "linkedin_monthly_ad_analytics_by_member_country_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "linkedin_monthly_ad_analytics_by_member_country_data.csv", "original_file_path": "seeds/linkedin_monthly_ad_analytics_by_member_country_data.csv", "unique_id": "seed.ad_reporting_integration_tests.linkedin_monthly_ad_analytics_by_member_country_data", "fqn": ["ad_reporting_integration_tests", "linkedin_monthly_ad_analytics_by_member_country_data"], "alias": "linkedin_monthly_ad_analytics_by_member_country_data", "checksum": {"name": "sha256", "checksum": "19558c13da1351432b3c99c154c10436b047f101efdfd26ccd884b4bb0983e23"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"cost_in_local_currency": "numeric", "cost_in_usd": "numeric"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"cost_in_local_currency": "numeric", "cost_in_usd": "numeric"}}, "created_at": 1783708213.6069596, "relation_name": "\"postgres\".\"public\".\"linkedin_monthly_ad_analytics_by_member_country_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.twitter_promoted_tweet_history_data": {"database": "postgres", "schema": "public", "name": "twitter_promoted_tweet_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "twitter_promoted_tweet_history_data.csv", "original_file_path": "seeds/twitter_promoted_tweet_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.twitter_promoted_tweet_history_data", "fqn": ["ad_reporting_integration_tests", "twitter_promoted_tweet_history_data"], "alias": "twitter_promoted_tweet_history_data", "checksum": {"name": "sha256", "checksum": "ec5e3be3c75b17b07893e9e7c21a4e0b8d5a820a73d3306fd94ec59935714690"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"tweet_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"tweet_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.6103406, "relation_name": "\"postgres\".\"public\".\"twitter_promoted_tweet_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.microsoft_ads_search_performance_daily_report_data": {"database": "postgres", "schema": "public", "name": "microsoft_ads_search_performance_daily_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "microsoft_ads_search_performance_daily_report_data.csv", "original_file_path": "seeds/microsoft_ads_search_performance_daily_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_search_performance_daily_report_data", "fqn": ["ad_reporting_integration_tests", "microsoft_ads_search_performance_daily_report_data"], "alias": "microsoft_ads_search_performance_daily_report_data", "checksum": {"name": "sha256", "checksum": "cfca4231aed334aed35468aa7062db63e1c93cf514a26311ab1dd4b68991c32c"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "bigint", "campaign_id": "bigint", "ad_group_id": "bigint", "ad_id": "bigint", "keyword_id": "bigint", "spend": "float"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "keyword_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "spend": "float"}}, "created_at": 1783708213.6137285, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_search_performance_daily_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_campaign_report_data": {"database": "postgres", "schema": "public", "name": "reddit_ads_campaign_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_campaign_report_data.csv", "original_file_path": "seeds/reddit_ads_campaign_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_campaign_report_data", "fqn": ["ad_reporting_integration_tests", "reddit_ads_campaign_report_data"], "alias": "reddit_ads_campaign_report_data", "checksum": {"name": "sha256", "checksum": "73d181faba6c8451dcb1b7cc04f028642990fd68fbd13c2e84f952f0fa1b424e"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "varchar(255)", "campaign_id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}", "campaign_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783708213.6172104, "relation_name": "\"postgres\".\"public\".\"reddit_ads_campaign_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.facebook_ads_demographics_region_actions_data": {"database": "postgres", "schema": "public", "name": "facebook_ads_demographics_region_actions_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "facebook_ads_demographics_region_actions_data.csv", "original_file_path": "seeds/facebook_ads_demographics_region_actions_data.csv", "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_demographics_region_actions_data", "fqn": ["ad_reporting_integration_tests", "facebook_ads_demographics_region_actions_data"], "alias": "facebook_ads_demographics_region_actions_data", "checksum": {"name": "sha256", "checksum": "f0035514fc50a70b1fc9c381f76dae211c6af46f0918bc2faeeb0c64a55fca86"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"value": "float", "account_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"value": "float", "account_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.6205585, "relation_name": "\"postgres\".\"public\".\"facebook_ads_demographics_region_actions_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.twitter_campaign_regions_report_data": {"database": "postgres", "schema": "public", "name": "twitter_campaign_regions_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "twitter_campaign_regions_report_data.csv", "original_file_path": "seeds/twitter_campaign_regions_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.twitter_campaign_regions_report_data", "fqn": ["ad_reporting_integration_tests", "twitter_campaign_regions_report_data"], "alias": "twitter_campaign_regions_report_data", "checksum": {"name": "sha256", "checksum": "2dfd7bcf02925a8c7c922b70298fa1fc36a18991ac0e54b3c6e7170657766fbe"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.6238046, "relation_name": "\"postgres\".\"public\".\"twitter_campaign_regions_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_campaign_country_conversions_report_data": {"database": "postgres", "schema": "public", "name": "reddit_ads_campaign_country_conversions_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_campaign_country_conversions_report_data.csv", "original_file_path": "seeds/reddit_ads_campaign_country_conversions_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_campaign_country_conversions_report_data", "fqn": ["ad_reporting_integration_tests", "reddit_ads_campaign_country_conversions_report_data"], "alias": "reddit_ads_campaign_country_conversions_report_data", "checksum": {"name": "sha256", "checksum": "5959f914e44cb2fa507bf4b6ccd688949fd3eab4d22a37cd1bbc2f556d872c1a"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "varchar(255)", "campaign_id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}", "campaign_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783708213.6270363, "relation_name": "\"postgres\".\"public\".\"reddit_ads_campaign_country_conversions_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_search_term_keyword_stats_data": {"database": "postgres", "schema": "public", "name": "google_ads_search_term_keyword_stats_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_search_term_keyword_stats_data.csv", "original_file_path": "seeds/google_ads_search_term_keyword_stats_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_search_term_keyword_stats_data", "fqn": ["ad_reporting_integration_tests", "google_ads_search_term_keyword_stats_data"], "alias": "google_ads_search_term_keyword_stats_data", "checksum": {"name": "sha256", "checksum": "a4622d48da3123b5911e71c541e8ae6688986412895b4b7e5c5a4f0076a1de32"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"ad_group_id": "bigint", "customer_id": "bigint", "campaign_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"ad_group_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "customer_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.630493, "relation_name": "\"postgres\".\"public\".\"google_ads_search_term_keyword_stats_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.snapchat_ad_history_data": {"database": "postgres", "schema": "public", "name": "snapchat_ad_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "snapchat_ad_history_data.csv", "original_file_path": "seeds/snapchat_ad_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.snapchat_ad_history_data", "fqn": ["ad_reporting_integration_tests", "snapchat_ad_history_data"], "alias": "snapchat_ad_history_data", "checksum": {"name": "sha256", "checksum": "839c0910ff6ff3cff2580bd9144223132dd1d87f003aeea329e47ba858a2dc23"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.6339302, "relation_name": "\"postgres\".\"public\".\"snapchat_ad_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_ad_report_data": {"database": "postgres", "schema": "public", "name": "reddit_ads_ad_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_ad_report_data.csv", "original_file_path": "seeds/reddit_ads_ad_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_ad_report_data", "fqn": ["ad_reporting_integration_tests", "reddit_ads_ad_report_data"], "alias": "reddit_ads_ad_report_data", "checksum": {"name": "sha256", "checksum": "14c3bf5b4e2b66f5971ba77839d88bdabbef2a61b57a373335303973d27d5d33"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "varchar(255)", "ad_id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}", "ad_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783708213.6372209, "relation_name": "\"postgres\".\"public\".\"reddit_ads_ad_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_campaign_bidding_strategy_history_data": {"database": "postgres", "schema": "public", "name": "google_ads_campaign_bidding_strategy_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_campaign_bidding_strategy_history_data.csv", "original_file_path": "seeds/google_ads_campaign_bidding_strategy_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_campaign_bidding_strategy_history_data", "fqn": ["ad_reporting_integration_tests", "google_ads_campaign_bidding_strategy_history_data"], "alias": "google_ads_campaign_bidding_strategy_history_data", "checksum": {"name": "sha256", "checksum": "1ff6557e91357c6b0cab43955a219229ead32acd59041553883a53a2fd03de64"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"campaign_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.6405082, "relation_name": "\"postgres\".\"public\".\"google_ads_campaign_bidding_strategy_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_campaign_budget_history_data": {"database": "postgres", "schema": "public", "name": "google_ads_campaign_budget_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_campaign_budget_history_data.csv", "original_file_path": "seeds/google_ads_campaign_budget_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_campaign_budget_history_data", "fqn": ["ad_reporting_integration_tests", "google_ads_campaign_budget_history_data"], "alias": "google_ads_campaign_budget_history_data", "checksum": {"name": "sha256", "checksum": "b9a93b7679f9d4cecb51e8ed0e62790395550e378560dd4e61cc288fd7cb9577"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "campaign_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.643842, "relation_name": "\"postgres\".\"public\".\"google_ads_campaign_budget_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_ad_conversions": {"database": "postgres", "schema": "public", "name": "reddit_ads_ad_conversions", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_ad_conversions.csv", "original_file_path": "seeds/reddit_ads_ad_conversions.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_ad_conversions", "fqn": ["ad_reporting_integration_tests", "reddit_ads_ad_conversions"], "alias": "reddit_ads_ad_conversions", "checksum": {"name": "sha256", "checksum": "f8dc29b5b9935791c50d28c5e986c6a02a96e518997a32f49cf6eac4cdac1131"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "varchar(255)", "ad_id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}", "ad_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783708213.6472676, "relation_name": "\"postgres\".\"public\".\"reddit_ads_ad_conversions\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.tiktok_location_data": {"database": "postgres", "schema": "public", "name": "tiktok_location_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "tiktok_location_data.csv", "original_file_path": "seeds/tiktok_location_data.csv", "unique_id": "seed.ad_reporting_integration_tests.tiktok_location_data", "fqn": ["ad_reporting_integration_tests", "tiktok_location_data"], "alias": "tiktok_location_data", "checksum": {"name": "sha256", "checksum": "11b0d0525a88b79939364e96c1b93a2043887b476fffa452ba3d319a770a11ce"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.6504993, "relation_name": "\"postgres\".\"public\".\"tiktok_location_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.pinterest_advertiser_report_data": {"database": "postgres", "schema": "public", "name": "pinterest_advertiser_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "pinterest_advertiser_report_data.csv", "original_file_path": "seeds/pinterest_advertiser_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.pinterest_advertiser_report_data", "fqn": ["ad_reporting_integration_tests", "pinterest_advertiser_report_data"], "alias": "pinterest_advertiser_report_data", "checksum": {"name": "sha256", "checksum": "a99af28ad8c13e82c3a8693cdf7dbda30af34de7c8ddaabe887e0944c22776fa"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"advertiser_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"advertiser_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.6537502, "relation_name": "\"postgres\".\"public\".\"pinterest_advertiser_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.snapchat_ad_squad_history_data": {"database": "postgres", "schema": "public", "name": "snapchat_ad_squad_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "snapchat_ad_squad_history_data.csv", "original_file_path": "seeds/snapchat_ad_squad_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.snapchat_ad_squad_history_data", "fqn": ["ad_reporting_integration_tests", "snapchat_ad_squad_history_data"], "alias": "snapchat_ad_squad_history_data", "checksum": {"name": "sha256", "checksum": "0e83ca691f2153480e7b63173f1c7ed8c38c0dc247d41a6f2fd46afc1e5963b1"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.6569886, "relation_name": "\"postgres\".\"public\".\"snapchat_ad_squad_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.twitter_tweet_url_data": {"database": "postgres", "schema": "public", "name": "twitter_tweet_url_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "twitter_tweet_url_data.csv", "original_file_path": "seeds/twitter_tweet_url_data.csv", "unique_id": "seed.ad_reporting_integration_tests.twitter_tweet_url_data", "fqn": ["ad_reporting_integration_tests", "twitter_tweet_url_data"], "alias": "twitter_tweet_url_data", "checksum": {"name": "sha256", "checksum": "b8d1d342fc9dbfa624f40d04facabf144039ecdb099b6a8d6b4232c980b80896"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"tweet_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"tweet_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.6603262, "relation_name": "\"postgres\".\"public\".\"twitter_tweet_url_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.linkedin_ad_creative_history_data": {"database": "postgres", "schema": "public", "name": "linkedin_ad_creative_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "linkedin_ad_creative_history_data.csv", "original_file_path": "seeds/linkedin_ad_creative_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.linkedin_ad_creative_history_data", "fqn": ["ad_reporting_integration_tests", "linkedin_ad_creative_history_data"], "alias": "linkedin_ad_creative_history_data", "checksum": {"name": "sha256", "checksum": "f505b76fba655f34214388f03f53ccfb83225b27d502874865d4daef6954fde8"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"created_time": "timestamp", "intended_status": "varchar", "last_modified_at": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"created_time": "timestamp", "intended_status": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar' }}", "last_modified_at": "timestamp"}}, "created_at": 1783708213.6637733, "relation_name": "\"postgres\".\"public\".\"linkedin_ad_creative_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.amazon_ads_search_term_ad_keyword_report_data": {"database": "postgres", "schema": "public", "name": "amazon_ads_search_term_ad_keyword_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "amazon_ads_search_term_ad_keyword_report_data.csv", "original_file_path": "seeds/amazon_ads_search_term_ad_keyword_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_search_term_ad_keyword_report_data", "fqn": ["ad_reporting_integration_tests", "amazon_ads_search_term_ad_keyword_report_data"], "alias": "amazon_ads_search_term_ad_keyword_report_data", "checksum": {"name": "sha256", "checksum": "72e0151237f3fc67bea3d517f7ef50c94ce494d2c0017fced4e1287623639722"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "campaign_budget_amount": "float", "keyword_bid": "float"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"_fivetran_synced": "timestamp", "campaign_budget_amount": "float", "keyword_bid": "float"}}, "created_at": 1783708213.6671634, "relation_name": "\"postgres\".\"public\".\"amazon_ads_search_term_ad_keyword_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.microsoft_ads_ad_group_history_data": {"database": "postgres", "schema": "public", "name": "microsoft_ads_ad_group_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "microsoft_ads_ad_group_history_data.csv", "original_file_path": "seeds/microsoft_ads_ad_group_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_ad_group_history_data", "fqn": ["ad_reporting_integration_tests", "microsoft_ads_ad_group_history_data"], "alias": "microsoft_ads_ad_group_history_data", "checksum": {"name": "sha256", "checksum": "6ec441a72afc08dbb3fc86b36eef0fe6926e2ff19ff3b3f77847fb0697a24c12"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "campaign_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.670476, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_ad_group_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.facebook_ads_demographics_region_data": {"database": "postgres", "schema": "public", "name": "facebook_ads_demographics_region_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "facebook_ads_demographics_region_data.csv", "original_file_path": "seeds/facebook_ads_demographics_region_data.csv", "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_demographics_region_data", "fqn": ["ad_reporting_integration_tests", "facebook_ads_demographics_region_data"], "alias": "facebook_ads_demographics_region_data", "checksum": {"name": "sha256", "checksum": "5aef14230a97cdedea2acf6185654a97c8fe0e0617c72cc1f9ab3f197bc12b8c"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.6739159, "relation_name": "\"postgres\".\"public\".\"facebook_ads_demographics_region_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.microsoft_ads_ad_performance_daily_report_data": {"database": "postgres", "schema": "public", "name": "microsoft_ads_ad_performance_daily_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "microsoft_ads_ad_performance_daily_report_data.csv", "original_file_path": "seeds/microsoft_ads_ad_performance_daily_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_ad_performance_daily_report_data", "fqn": ["ad_reporting_integration_tests", "microsoft_ads_ad_performance_daily_report_data"], "alias": "microsoft_ads_ad_performance_daily_report_data", "checksum": {"name": "sha256", "checksum": "2604c0155fbc98a0fba96b1c3805547be469d6b740f9f9b0763bdc55b7b01443"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "bigint", "campaign_id": "bigint", "ad_group_id": "bigint", "ad_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.6773849, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_ad_performance_daily_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.apple_search_keyword_history_data": {"database": "postgres", "schema": "public", "name": "apple_search_keyword_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "apple_search_keyword_history_data.csv", "original_file_path": "seeds/apple_search_keyword_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.apple_search_keyword_history_data", "fqn": ["ad_reporting_integration_tests", "apple_search_keyword_history_data"], "alias": "apple_search_keyword_history_data", "checksum": {"name": "sha256", "checksum": "a6d53cd4951594b21214e60bf51503907ee364eac04c7d24a19dc490cc7d818c"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"modification_time": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"modification_time": "timestamp"}}, "created_at": 1783708213.680725, "relation_name": "\"postgres\".\"public\".\"apple_search_keyword_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_account_data": {"database": "postgres", "schema": "public", "name": "reddit_ads_account_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_account_data.csv", "original_file_path": "seeds/reddit_ads_account_data.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_account_data", "fqn": ["ad_reporting_integration_tests", "reddit_ads_account_data"], "alias": "reddit_ads_account_data", "checksum": {"name": "sha256", "checksum": "4d672f0080db8e51bd896c8fe9a56a0f2e6cb4fe175ae3a55713449532cd6a67"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783708213.684004, "relation_name": "\"postgres\".\"public\".\"reddit_ads_account_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.linkedin_ad_campaign_group_history_data": {"database": "postgres", "schema": "public", "name": "linkedin_ad_campaign_group_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "linkedin_ad_campaign_group_history_data.csv", "original_file_path": "seeds/linkedin_ad_campaign_group_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.linkedin_ad_campaign_group_history_data", "fqn": ["ad_reporting_integration_tests", "linkedin_ad_campaign_group_history_data"], "alias": "linkedin_ad_campaign_group_history_data", "checksum": {"name": "sha256", "checksum": "48aeff219340dccafbdb2de6c0086e94cca22a741c15ad8ce23f1e207fa15fd2"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"created_time": "timestamp", "last_modified_time": "timestamp", "account_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"created_time": "timestamp", "last_modified_time": "timestamp", "account_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.6873531, "relation_name": "\"postgres\".\"public\".\"linkedin_ad_campaign_group_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.microsoft_ads_keyword_performance_daily_report_data": {"database": "postgres", "schema": "public", "name": "microsoft_ads_keyword_performance_daily_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "microsoft_ads_keyword_performance_daily_report_data.csv", "original_file_path": "seeds/microsoft_ads_keyword_performance_daily_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_keyword_performance_daily_report_data", "fqn": ["ad_reporting_integration_tests", "microsoft_ads_keyword_performance_daily_report_data"], "alias": "microsoft_ads_keyword_performance_daily_report_data", "checksum": {"name": "sha256", "checksum": "480b49ad514d8c5d9021bce2cfcef259a8ee3d9123b12314e1a63c670cc37688"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "bigint", "campaign_id": "bigint", "ad_group_id": "bigint", "ad_id": "bigint", "keyword_id": "bigint", "spend": "float"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "keyword_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "spend": "float"}}, "created_at": 1783708213.6908753, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_keyword_performance_daily_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_ad_group_history_data": {"database": "postgres", "schema": "public", "name": "google_ads_ad_group_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_ad_group_history_data.csv", "original_file_path": "seeds/google_ads_ad_group_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_ad_group_history_data", "fqn": ["ad_reporting_integration_tests", "google_ads_ad_group_history_data"], "alias": "google_ads_ad_group_history_data", "checksum": {"name": "sha256", "checksum": "82518353626bed4214f1dea514b77c97c96da2e4c7253734c3268e55111e67ce"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"campaign_id": "bigint", "id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.6942585, "relation_name": "\"postgres\".\"public\".\"google_ads_ad_group_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.amazon_ads_profile_data": {"database": "postgres", "schema": "public", "name": "amazon_ads_profile_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "amazon_ads_profile_data.csv", "original_file_path": "seeds/amazon_ads_profile_data.csv", "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_profile_data", "fqn": ["ad_reporting_integration_tests", "amazon_ads_profile_data"], "alias": "amazon_ads_profile_data", "checksum": {"name": "sha256", "checksum": "bf98315483844e348320dc4d774059cb5229ef48b495aebace17dd04520d160b"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.697512, "relation_name": "\"postgres\".\"public\".\"amazon_ads_profile_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.pinterest_campaign_history_data": {"database": "postgres", "schema": "public", "name": "pinterest_campaign_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "pinterest_campaign_history_data.csv", "original_file_path": "seeds/pinterest_campaign_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.pinterest_campaign_history_data", "fqn": ["ad_reporting_integration_tests", "pinterest_campaign_history_data"], "alias": "pinterest_campaign_history_data", "checksum": {"name": "sha256", "checksum": "6ffcb6b6cd42022cfd0189ef3d54920158b7b45db1dffdf47463731ad14c4ec0"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "advertiser_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "advertiser_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.700772, "relation_name": "\"postgres\".\"public\".\"pinterest_campaign_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.twitter_line_item_report_data": {"database": "postgres", "schema": "public", "name": "twitter_line_item_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "twitter_line_item_report_data.csv", "original_file_path": "seeds/twitter_line_item_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.twitter_line_item_report_data", "fqn": ["ad_reporting_integration_tests", "twitter_line_item_report_data"], "alias": "twitter_line_item_report_data", "checksum": {"name": "sha256", "checksum": "4cef1efaf56e236366e68ccc814c5da3ddf3d2504ab3f156d5f4da1918c0bed6"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.7040975, "relation_name": "\"postgres\".\"public\".\"twitter_line_item_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_campaign_stats_data": {"database": "postgres", "schema": "public", "name": "google_ads_campaign_stats_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_campaign_stats_data.csv", "original_file_path": "seeds/google_ads_campaign_stats_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_campaign_stats_data", "fqn": ["ad_reporting_integration_tests", "google_ads_campaign_stats_data"], "alias": "google_ads_campaign_stats_data", "checksum": {"name": "sha256", "checksum": "f8ffb40c33a31cdd4185ed5e956cfdaff9736054806ef3f9da5cf6f036ef7d0d"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"customer_id": "bigint", "id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"customer_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.707347, "relation_name": "\"postgres\".\"public\".\"google_ads_campaign_stats_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.twitter_line_item_history_data": {"database": "postgres", "schema": "public", "name": "twitter_line_item_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "twitter_line_item_history_data.csv", "original_file_path": "seeds/twitter_line_item_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.twitter_line_item_history_data", "fqn": ["ad_reporting_integration_tests", "twitter_line_item_history_data"], "alias": "twitter_line_item_history_data", "checksum": {"name": "sha256", "checksum": "e7c5ac79c6915f530670f98c6f7cd9ad80be52a5b2c5bd810ad3fff6c7041bd2"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.7105927, "relation_name": "\"postgres\".\"public\".\"twitter_line_item_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_ad_stats_data": {"database": "postgres", "schema": "public", "name": "google_ads_ad_stats_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_ad_stats_data.csv", "original_file_path": "seeds/google_ads_ad_stats_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_ad_stats_data", "fqn": ["ad_reporting_integration_tests", "google_ads_ad_stats_data"], "alias": "google_ads_ad_stats_data", "checksum": {"name": "sha256", "checksum": "417738f961255266f49a15548d2e7b278713c32c28c766b10b9d038613cf35fb"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"customer_id": "bigint", "ad_id": "bigint", "campaign_id": "bigint", "ad_group_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"customer_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.7138627, "relation_name": "\"postgres\".\"public\".\"google_ads_ad_stats_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_account_conversions": {"database": "postgres", "schema": "public", "name": "reddit_ads_account_conversions", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_account_conversions.csv", "original_file_path": "seeds/reddit_ads_account_conversions.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_account_conversions", "fqn": ["ad_reporting_integration_tests", "reddit_ads_account_conversions"], "alias": "reddit_ads_account_conversions", "checksum": {"name": "sha256", "checksum": "4eb70e9496b0dcf31186020f33f9d19c67576af11b0e6c46300ffa2dde4e286a"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783708213.7172034, "relation_name": "\"postgres\".\"public\".\"reddit_ads_account_conversions\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_account_stats_data": {"database": "postgres", "schema": "public", "name": "google_ads_account_stats_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_account_stats_data.csv", "original_file_path": "seeds/google_ads_account_stats_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_account_stats_data", "fqn": ["ad_reporting_integration_tests", "google_ads_account_stats_data"], "alias": "google_ads_account_stats_data", "checksum": {"name": "sha256", "checksum": "d6b21f0858465ed0937e45a56e864fa023280d4e9a343e3e8442764386717ff7"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.7205536, "relation_name": "\"postgres\".\"public\".\"google_ads_account_stats_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.snapchat_campaign_geo_country_daily_report_data": {"database": "postgres", "schema": "public", "name": "snapchat_campaign_geo_country_daily_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "snapchat_campaign_geo_country_daily_report_data.csv", "original_file_path": "seeds/snapchat_campaign_geo_country_daily_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.snapchat_campaign_geo_country_daily_report_data", "fqn": ["ad_reporting_integration_tests", "snapchat_campaign_geo_country_daily_report_data"], "alias": "snapchat_campaign_geo_country_daily_report_data", "checksum": {"name": "sha256", "checksum": "af259d9acfb0b0f341d54d23c5adc6e8ab0a5e367fbb0a2e452ec175066f78c3"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.7237377, "relation_name": "\"postgres\".\"public\".\"snapchat_campaign_geo_country_daily_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.microsoft_ads_ad_group_performance_daily_report_data": {"database": "postgres", "schema": "public", "name": "microsoft_ads_ad_group_performance_daily_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "microsoft_ads_ad_group_performance_daily_report_data.csv", "original_file_path": "seeds/microsoft_ads_ad_group_performance_daily_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_ad_group_performance_daily_report_data", "fqn": ["ad_reporting_integration_tests", "microsoft_ads_ad_group_performance_daily_report_data"], "alias": "microsoft_ads_ad_group_performance_daily_report_data", "checksum": {"name": "sha256", "checksum": "d61e016b59c5195471adaeb79fccfad355d611af16f7f301f4754dc14d4e7aad"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "bigint", "campaign_id": "bigint", "ad_group_id": "bigint", "spend": "float"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "spend": "float"}}, "created_at": 1783708213.727174, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_ad_group_performance_daily_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.amazon_ads_product_ad_history_data": {"database": "postgres", "schema": "public", "name": "amazon_ads_product_ad_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "amazon_ads_product_ad_history_data.csv", "original_file_path": "seeds/amazon_ads_product_ad_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_product_ad_history_data", "fqn": ["ad_reporting_integration_tests", "amazon_ads_product_ad_history_data"], "alias": "amazon_ads_product_ad_history_data", "checksum": {"name": "sha256", "checksum": "7efed04b5599f1f2a4e8db33b56eb1f43c6ed27a77a504c7f8b7d628aac37749"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.7304695, "relation_name": "\"postgres\".\"public\".\"amazon_ads_product_ad_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.microsoft_ads_ad_history_data": {"database": "postgres", "schema": "public", "name": "microsoft_ads_ad_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "microsoft_ads_ad_history_data.csv", "original_file_path": "seeds/microsoft_ads_ad_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_ad_history_data", "fqn": ["ad_reporting_integration_tests", "microsoft_ads_ad_history_data"], "alias": "microsoft_ads_ad_history_data", "checksum": {"name": "sha256", "checksum": "a8362c38b31cc6baf6c67809ddc20dc7fe47ffeb49e49d9ee44e2236a7f2db86"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "ad_group_id": "bigint", "modified_time": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "modified_time": "timestamp"}}, "created_at": 1783708213.7339468, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_ad_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_campaign_country_report_data": {"database": "postgres", "schema": "public", "name": "reddit_ads_campaign_country_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_campaign_country_report_data.csv", "original_file_path": "seeds/reddit_ads_campaign_country_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_campaign_country_report_data", "fqn": ["ad_reporting_integration_tests", "reddit_ads_campaign_country_report_data"], "alias": "reddit_ads_campaign_country_report_data", "checksum": {"name": "sha256", "checksum": "05af71513b9c24fbb69372f27ad8d73ed815d75a03cfa01e59c7a4ce3a7e124f"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "varchar(255)", "campaign_id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}", "campaign_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783708213.7372913, "relation_name": "\"postgres\".\"public\".\"reddit_ads_campaign_country_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.facebook_ads_ad_history_data": {"database": "postgres", "schema": "public", "name": "facebook_ads_ad_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "facebook_ads_ad_history_data.csv", "original_file_path": "seeds/facebook_ads_ad_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_ad_history_data", "fqn": ["ad_reporting_integration_tests", "facebook_ads_ad_history_data"], "alias": "facebook_ads_ad_history_data", "checksum": {"name": "sha256", "checksum": "95c960d78745b1652034ba4da5cc2a7d5b923e816a81c90360f1b28588b7befd"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "account_id": "bigint", "ad_set_id": "bigint", "campaign_id": "bigint", "creative_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "account_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "ad_set_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "creative_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.7406642, "relation_name": "\"postgres\".\"public\".\"facebook_ads_ad_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.pinterest_ad_group_report_data": {"database": "postgres", "schema": "public", "name": "pinterest_ad_group_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "pinterest_ad_group_report_data.csv", "original_file_path": "seeds/pinterest_ad_group_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.pinterest_ad_group_report_data", "fqn": ["ad_reporting_integration_tests", "pinterest_ad_group_report_data"], "alias": "pinterest_ad_group_report_data", "checksum": {"name": "sha256", "checksum": "ca2133d8c675b7b10abe2ba021f5dced5769f7469bc9ed910929ed564f9e33d3"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"campaign_id": "bigint", "ad_group_id": "bigint", "advertiser_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"campaign_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "advertiser_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.7440073, "relation_name": "\"postgres\".\"public\".\"pinterest_ad_group_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.twitter_campaign_report_data": {"database": "postgres", "schema": "public", "name": "twitter_campaign_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "twitter_campaign_report_data.csv", "original_file_path": "seeds/twitter_campaign_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.twitter_campaign_report_data", "fqn": ["ad_reporting_integration_tests", "twitter_campaign_report_data"], "alias": "twitter_campaign_report_data", "checksum": {"name": "sha256", "checksum": "bb3bdaea68e1bc903cb5b3a3e507926b43009e0f52ec2f867a97e7276cef81bb"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.747281, "relation_name": "\"postgres\".\"public\".\"twitter_campaign_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.facebook_ads_ad_set_history_data": {"database": "postgres", "schema": "public", "name": "facebook_ads_ad_set_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "facebook_ads_ad_set_history_data.csv", "original_file_path": "seeds/facebook_ads_ad_set_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_ad_set_history_data", "fqn": ["ad_reporting_integration_tests", "facebook_ads_ad_set_history_data"], "alias": "facebook_ads_ad_set_history_data", "checksum": {"name": "sha256", "checksum": "da4e6b48f3feaa4bd2c3783b125909a14c5317b3c1484b4f6af5d7c1d88f5bd7"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "account_id": "bigint", "campaign_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "account_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.7506633, "relation_name": "\"postgres\".\"public\".\"facebook_ads_ad_set_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.snapchat_campaign_geo_region_daily_report_data": {"database": "postgres", "schema": "public", "name": "snapchat_campaign_geo_region_daily_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "snapchat_campaign_geo_region_daily_report_data.csv", "original_file_path": "seeds/snapchat_campaign_geo_region_daily_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.snapchat_campaign_geo_region_daily_report_data", "fqn": ["ad_reporting_integration_tests", "snapchat_campaign_geo_region_daily_report_data"], "alias": "snapchat_campaign_geo_region_daily_report_data", "checksum": {"name": "sha256", "checksum": "38911055198ead8cd7d5ddbc08d9e1cacabc92916c41a38d1dd8d845f5859dc6"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.7539384, "relation_name": "\"postgres\".\"public\".\"snapchat_campaign_geo_region_daily_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.pinterest_pin_promotion_history_data": {"database": "postgres", "schema": "public", "name": "pinterest_pin_promotion_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "pinterest_pin_promotion_history_data.csv", "original_file_path": "seeds/pinterest_pin_promotion_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.pinterest_pin_promotion_history_data", "fqn": ["ad_reporting_integration_tests", "pinterest_pin_promotion_history_data"], "alias": "pinterest_pin_promotion_history_data", "checksum": {"name": "sha256", "checksum": "ac9ca6b81cebffa2e22e24f03afe41f6e31dd683b1532df5a40fcb7700a2d854"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "ad_group_id": "bigint", "pin_id": "bigint", "ad_account_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "pin_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "ad_account_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.757219, "relation_name": "\"postgres\".\"public\".\"pinterest_pin_promotion_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.amazon_ads_ad_group_level_report_data": {"database": "postgres", "schema": "public", "name": "amazon_ads_ad_group_level_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "amazon_ads_ad_group_level_report_data.csv", "original_file_path": "seeds/amazon_ads_ad_group_level_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_ad_group_level_report_data", "fqn": ["ad_reporting_integration_tests", "amazon_ads_ad_group_level_report_data"], "alias": "amazon_ads_ad_group_level_report_data", "checksum": {"name": "sha256", "checksum": "b8d7399c22df2187d6518c6db0d9125b6c93172cf23200a8cbc365d43532d2ba"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.7604604, "relation_name": "\"postgres\".\"public\".\"amazon_ads_ad_group_level_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.twitter_line_item_keywords_report_data": {"database": "postgres", "schema": "public", "name": "twitter_line_item_keywords_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "twitter_line_item_keywords_report_data.csv", "original_file_path": "seeds/twitter_line_item_keywords_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.twitter_line_item_keywords_report_data", "fqn": ["ad_reporting_integration_tests", "twitter_line_item_keywords_report_data"], "alias": "twitter_line_item_keywords_report_data", "checksum": {"name": "sha256", "checksum": "80107d8a67ce63a986c2e1a4d7af8d1e6572053a11e20e7df98f5d42e0da690e"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.7636962, "relation_name": "\"postgres\".\"public\".\"twitter_line_item_keywords_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.twitter_tweet_data": {"database": "postgres", "schema": "public", "name": "twitter_tweet_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "twitter_tweet_data.csv", "original_file_path": "seeds/twitter_tweet_data.csv", "unique_id": "seed.ad_reporting_integration_tests.twitter_tweet_data", "fqn": ["ad_reporting_integration_tests", "twitter_tweet_data"], "alias": "twitter_tweet_data", "checksum": {"name": "sha256", "checksum": "7e28de3484a806b3428f4898e035364e2a282ef5819cfe895f8c94f6455e726f"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.7668571, "relation_name": "\"postgres\".\"public\".\"twitter_tweet_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.tiktok_campaign_country_report_data": {"database": "postgres", "schema": "public", "name": "tiktok_campaign_country_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "tiktok_campaign_country_report_data.csv", "original_file_path": "seeds/tiktok_campaign_country_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.tiktok_campaign_country_report_data", "fqn": ["ad_reporting_integration_tests", "tiktok_campaign_country_report_data"], "alias": "tiktok_campaign_country_report_data", "checksum": {"name": "sha256", "checksum": "7139e115150333f6e01069b15397e98ef2ce066ae81c9ea881faa47b159773a0"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.7700002, "relation_name": "\"postgres\".\"public\".\"tiktok_campaign_country_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.facebook_ads_creative_history_data": {"database": "postgres", "schema": "public", "name": "facebook_ads_creative_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "facebook_ads_creative_history_data.csv", "original_file_path": "seeds/facebook_ads_creative_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_creative_history_data", "fqn": ["ad_reporting_integration_tests", "facebook_ads_creative_history_data"], "alias": "facebook_ads_creative_history_data", "checksum": {"name": "path", "checksum": "seeds/facebook_ads_creative_history_data.csv"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"page_link": "varchar", "template_page_link": "varchar", "id": "bigint", "account_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"page_link": "{{ 'string' if target.type in ['bigquery','spark', 'databricks'] else 'varchar' }}", "template_page_link": "{{ 'string' if target.type in ['bigquery','spark', 'databricks'] else 'varchar' }}", "id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "account_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.7733026, "relation_name": "\"postgres\".\"public\".\"facebook_ads_creative_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.facebook_ads_campaign_history_data": {"database": "postgres", "schema": "public", "name": "facebook_ads_campaign_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "facebook_ads_campaign_history_data.csv", "original_file_path": "seeds/facebook_ads_campaign_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_campaign_history_data", "fqn": ["ad_reporting_integration_tests", "facebook_ads_campaign_history_data"], "alias": "facebook_ads_campaign_history_data", "checksum": {"name": "sha256", "checksum": "1dfd8244efe7c32be5fb93c8417575d79670225092a28cab9da03d0ad7773432"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "account_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "account_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.7767532, "relation_name": "\"postgres\".\"public\".\"facebook_ads_campaign_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.amazon_ads_campaign_level_report_data": {"database": "postgres", "schema": "public", "name": "amazon_ads_campaign_level_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "amazon_ads_campaign_level_report_data.csv", "original_file_path": "seeds/amazon_ads_campaign_level_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_campaign_level_report_data", "fqn": ["ad_reporting_integration_tests", "amazon_ads_campaign_level_report_data"], "alias": "amazon_ads_campaign_level_report_data", "checksum": {"name": "sha256", "checksum": "12c4efc842123e0085f28a11922eba7cb83bd04770a5657c839a8a7b048a9616"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "campaign_budget_amount": "float"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"_fivetran_synced": "timestamp", "campaign_budget_amount": "float"}}, "created_at": 1783708213.7801464, "relation_name": "\"postgres\".\"public\".\"amazon_ads_campaign_level_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_ad_group_stats_data": {"database": "postgres", "schema": "public", "name": "google_ads_ad_group_stats_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_ad_group_stats_data.csv", "original_file_path": "seeds/google_ads_ad_group_stats_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_ad_group_stats_data", "fqn": ["ad_reporting_integration_tests", "google_ads_ad_group_stats_data"], "alias": "google_ads_ad_group_stats_data", "checksum": {"name": "sha256", "checksum": "d3ac6d88466ebf8fca7753e60be01dfa615a8e9b654da4d91fab8ee59c6c7cf0"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"customer_id": "bigint", "campaign_id": "bigint", "id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"customer_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.7834477, "relation_name": "\"postgres\".\"public\".\"google_ads_ad_group_stats_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.apple_search_keyword_report_data": {"database": "postgres", "schema": "public", "name": "apple_search_keyword_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "apple_search_keyword_report_data.csv", "original_file_path": "seeds/apple_search_keyword_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.apple_search_keyword_report_data", "fqn": ["ad_reporting_integration_tests", "apple_search_keyword_report_data"], "alias": "apple_search_keyword_report_data", "checksum": {"name": "sha256", "checksum": "926fe237ceaaa3e17d15621afcd737bcfe4fa9400d38ec6ec81e71ed64a6f179"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.786669, "relation_name": "\"postgres\".\"public\".\"apple_search_keyword_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.tiktok_campaign_report_hourly_data": {"database": "postgres", "schema": "public", "name": "tiktok_campaign_report_hourly_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "tiktok_campaign_report_hourly_data.csv", "original_file_path": "seeds/tiktok_campaign_report_hourly_data.csv", "unique_id": "seed.ad_reporting_integration_tests.tiktok_campaign_report_hourly_data", "fqn": ["ad_reporting_integration_tests", "tiktok_campaign_report_hourly_data"], "alias": "tiktok_campaign_report_hourly_data", "checksum": {"name": "sha256", "checksum": "044dcc02e6136b1ae73b46072bf99073245fbe5cc6832a52884300fcd2425278"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.79021, "relation_name": "\"postgres\".\"public\".\"tiktok_campaign_report_hourly_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.amazon_ads_advertised_product_report_data": {"database": "postgres", "schema": "public", "name": "amazon_ads_advertised_product_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "amazon_ads_advertised_product_report_data.csv", "original_file_path": "seeds/amazon_ads_advertised_product_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_advertised_product_report_data", "fqn": ["ad_reporting_integration_tests", "amazon_ads_advertised_product_report_data"], "alias": "amazon_ads_advertised_product_report_data", "checksum": {"name": "sha256", "checksum": "a4e7228789e73cea87c629d75d3940ce2d21dada457eccc0c753f02a610c1439"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "campaign_budget_amount": "float"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"_fivetran_synced": "timestamp", "campaign_budget_amount": "float"}}, "created_at": 1783708213.793539, "relation_name": "\"postgres\".\"public\".\"amazon_ads_advertised_product_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.twitter_account_history_data": {"database": "postgres", "schema": "public", "name": "twitter_account_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "twitter_account_history_data.csv", "original_file_path": "seeds/twitter_account_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.twitter_account_history_data", "fqn": ["ad_reporting_integration_tests", "twitter_account_history_data"], "alias": "twitter_account_history_data", "checksum": {"name": "sha256", "checksum": "e880da5ea30536301dbb19627aa818f454eceae2b8bd10e40cada659e4585d64"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"name": "varchar"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"name": "{{ 'string' if target.type in ['bigquery','spark', 'databricks'] else 'varchar' }}"}}, "created_at": 1783708213.7968328, "relation_name": "\"postgres\".\"public\".\"twitter_account_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.apple_search_ad_group_history_data": {"database": "postgres", "schema": "public", "name": "apple_search_ad_group_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "apple_search_ad_group_history_data.csv", "original_file_path": "seeds/apple_search_ad_group_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.apple_search_ad_group_history_data", "fqn": ["ad_reporting_integration_tests", "apple_search_ad_group_history_data"], "alias": "apple_search_ad_group_history_data", "checksum": {"name": "sha256", "checksum": "6940c04c90cc94b46d8a36bf1b3701cbd64d75b298222e26819aaf6460ddf984"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"modification_time": "timestamp", "start_time": "timestamp", "end_time": "timestamp"}}, "created_at": 1783708213.800156, "relation_name": "\"postgres\".\"public\".\"apple_search_ad_group_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.tiktok_adgroup_history_data": {"database": "postgres", "schema": "public", "name": "tiktok_adgroup_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "tiktok_adgroup_history_data.csv", "original_file_path": "seeds/tiktok_adgroup_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.tiktok_adgroup_history_data", "fqn": ["ad_reporting_integration_tests", "tiktok_adgroup_history_data"], "alias": "tiktok_adgroup_history_data", "checksum": {"name": "sha256", "checksum": "639ab801e23bda0eab7fc62a605781f2f926f1ef2bd935f12af67e56d9ffeb89"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.803379, "relation_name": "\"postgres\".\"public\".\"tiktok_adgroup_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.apple_search_campaign_report_data": {"database": "postgres", "schema": "public", "name": "apple_search_campaign_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "apple_search_campaign_report_data.csv", "original_file_path": "seeds/apple_search_campaign_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.apple_search_campaign_report_data", "fqn": ["ad_reporting_integration_tests", "apple_search_campaign_report_data"], "alias": "apple_search_campaign_report_data", "checksum": {"name": "sha256", "checksum": "3c46e3723ddc97efb7c195a1036f10a700aa4656c300da7c82ff0bfdf7ef7736"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.8066106, "relation_name": "\"postgres\".\"public\".\"apple_search_campaign_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_ad_data": {"database": "postgres", "schema": "public", "name": "reddit_ads_ad_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_ad_data.csv", "original_file_path": "seeds/reddit_ads_ad_data.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_ad_data", "fqn": ["ad_reporting_integration_tests", "reddit_ads_ad_data"], "alias": "reddit_ads_ad_data", "checksum": {"name": "sha256", "checksum": "3c60814303d77bfb7b387e026b59ea6f6db7ae316bcb3a8c5b84b50e706d9d59"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "varchar(255)", "ad_group_id": "varchar(255)", "campaign_id": "varchar(255)", "id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}", "ad_group_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}", "campaign_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}", "id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783708213.8098698, "relation_name": "\"postgres\".\"public\".\"reddit_ads_ad_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.snapchat_ad_squad_hourly_report_data": {"database": "postgres", "schema": "public", "name": "snapchat_ad_squad_hourly_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "snapchat_ad_squad_hourly_report_data.csv", "original_file_path": "seeds/snapchat_ad_squad_hourly_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.snapchat_ad_squad_hourly_report_data", "fqn": ["ad_reporting_integration_tests", "snapchat_ad_squad_hourly_report_data"], "alias": "snapchat_ad_squad_hourly_report_data", "checksum": {"name": "sha256", "checksum": "4bcd58c89168843edd94874f95222804c28b5b3571d66dbb194a498a0f8f85b7"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.8131278, "relation_name": "\"postgres\".\"public\".\"snapchat_ad_squad_hourly_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.linkedin_ad_analytics_by_campaign_data": {"database": "postgres", "schema": "public", "name": "linkedin_ad_analytics_by_campaign_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "linkedin_ad_analytics_by_campaign_data.csv", "original_file_path": "seeds/linkedin_ad_analytics_by_campaign_data.csv", "unique_id": "seed.ad_reporting_integration_tests.linkedin_ad_analytics_by_campaign_data", "fqn": ["ad_reporting_integration_tests", "linkedin_ad_analytics_by_campaign_data"], "alias": "linkedin_ad_analytics_by_campaign_data", "checksum": {"name": "sha256", "checksum": "a6b72fcf11043561ec04bae0035659363e992cd11f8ed5376f056b7f4e5b5b32"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"day": "timestamp", "external_website_conversions": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"day": "timestamp", "external_website_conversions": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.816335, "relation_name": "\"postgres\".\"public\".\"linkedin_ad_analytics_by_campaign_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.snapchat_ad_account_history_data": {"database": "postgres", "schema": "public", "name": "snapchat_ad_account_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "snapchat_ad_account_history_data.csv", "original_file_path": "seeds/snapchat_ad_account_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.snapchat_ad_account_history_data", "fqn": ["ad_reporting_integration_tests", "snapchat_ad_account_history_data"], "alias": "snapchat_ad_account_history_data", "checksum": {"name": "sha256", "checksum": "0e1f3a58ee6a4863bb59fbd30c286606f0de77040fbb2903ab312e5d248454cb"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.8195336, "relation_name": "\"postgres\".\"public\".\"snapchat_ad_account_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.tiktok_ad_history_data": {"database": "postgres", "schema": "public", "name": "tiktok_ad_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "tiktok_ad_history_data.csv", "original_file_path": "seeds/tiktok_ad_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.tiktok_ad_history_data", "fqn": ["ad_reporting_integration_tests", "tiktok_ad_history_data"], "alias": "tiktok_ad_history_data", "checksum": {"name": "sha256", "checksum": "a5977d1a4315d2bffbdb7be9c73345ce724324c20407af4cab3afae24f0fca34"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.8227758, "relation_name": "\"postgres\".\"public\".\"tiktok_ad_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.linkedin_ad_analytics_by_creative_data": {"database": "postgres", "schema": "public", "name": "linkedin_ad_analytics_by_creative_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "linkedin_ad_analytics_by_creative_data.csv", "original_file_path": "seeds/linkedin_ad_analytics_by_creative_data.csv", "unique_id": "seed.ad_reporting_integration_tests.linkedin_ad_analytics_by_creative_data", "fqn": ["ad_reporting_integration_tests", "linkedin_ad_analytics_by_creative_data"], "alias": "linkedin_ad_analytics_by_creative_data", "checksum": {"name": "sha256", "checksum": "b5958b032b3396d36be3b8e4e7664029927e507034d9a7e5f2e7045e8366cc24"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"day": "timestamp", "external_website_conversions": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"day": "timestamp", "external_website_conversions": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.8260052, "relation_name": "\"postgres\".\"public\".\"linkedin_ad_analytics_by_creative_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_account_report_data": {"database": "postgres", "schema": "public", "name": "reddit_ads_account_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_account_report_data.csv", "original_file_path": "seeds/reddit_ads_account_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_account_report_data", "fqn": ["ad_reporting_integration_tests", "reddit_ads_account_report_data"], "alias": "reddit_ads_account_report_data", "checksum": {"name": "sha256", "checksum": "82b98a76c07069e7752621a8ce85c1a613bcbcbb4be084c7f3b6d25fbf10a6c6"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783708213.829297, "relation_name": "\"postgres\".\"public\".\"reddit_ads_account_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_ad_group_data": {"database": "postgres", "schema": "public", "name": "reddit_ads_ad_group_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_ad_group_data.csv", "original_file_path": "seeds/reddit_ads_ad_group_data.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_ad_group_data", "fqn": ["ad_reporting_integration_tests", "reddit_ads_ad_group_data"], "alias": "reddit_ads_ad_group_data", "checksum": {"name": "sha256", "checksum": "854e1b14702e4e7d1d455e8d47bb6356e3970c7baac2b1a2e1aafbb129233a62"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "varchar(255)", "campaign_id": "varchar(255)", "id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}", "campaign_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}", "id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783708213.8325968, "relation_name": "\"postgres\".\"public\".\"reddit_ads_ad_group_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.microsoft_ads_campaign_history_data": {"database": "postgres", "schema": "public", "name": "microsoft_ads_campaign_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "microsoft_ads_campaign_history_data.csv", "original_file_path": "seeds/microsoft_ads_campaign_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_campaign_history_data", "fqn": ["ad_reporting_integration_tests", "microsoft_ads_campaign_history_data"], "alias": "microsoft_ads_campaign_history_data", "checksum": {"name": "sha256", "checksum": "b713e54ffdbc25d2260c83c5a17eb48d98bde788bcdb5b62defa9cca936cb552"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.8359253, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_campaign_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.pinterest_pin_promotion_report_data": {"database": "postgres", "schema": "public", "name": "pinterest_pin_promotion_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "pinterest_pin_promotion_report_data.csv", "original_file_path": "seeds/pinterest_pin_promotion_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.pinterest_pin_promotion_report_data", "fqn": ["ad_reporting_integration_tests", "pinterest_pin_promotion_report_data"], "alias": "pinterest_pin_promotion_report_data", "checksum": {"name": "sha256", "checksum": "d38f800761cda64662a51255e2c98a4c0dffa9ace704960d44d666aead38cdf1"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"pin_promotion_id": "bigint", "ad_group_id": "bigint", "campaign_id": "bigint", "advertiser_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"pin_promotion_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "advertiser_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.839213, "relation_name": "\"postgres\".\"public\".\"pinterest_pin_promotion_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.pinterest_targeting_geo_data": {"database": "postgres", "schema": "public", "name": "pinterest_targeting_geo_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "pinterest_targeting_geo_data.csv", "original_file_path": "seeds/pinterest_targeting_geo_data.csv", "unique_id": "seed.ad_reporting_integration_tests.pinterest_targeting_geo_data", "fqn": ["ad_reporting_integration_tests", "pinterest_targeting_geo_data"], "alias": "pinterest_targeting_geo_data", "checksum": {"name": "sha256", "checksum": "9130c7ec5fe59ea386e827a20c461b54d5654be5790f6c38ff0feaf541285704"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.842463, "relation_name": "\"postgres\".\"public\".\"pinterest_targeting_geo_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.linkedin_geo_data": {"database": "postgres", "schema": "public", "name": "linkedin_geo_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "linkedin_geo_data.csv", "original_file_path": "seeds/linkedin_geo_data.csv", "unique_id": "seed.ad_reporting_integration_tests.linkedin_geo_data", "fqn": ["ad_reporting_integration_tests", "linkedin_geo_data"], "alias": "linkedin_geo_data", "checksum": {"name": "sha256", "checksum": "ca6ca7996af617f0c6faf0e04eac12e4fefe184cd23dd1e39605e48eb67b272a"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.8456855, "relation_name": "\"postgres\".\"public\".\"linkedin_geo_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.linkedin_ad_campaign_history_data": {"database": "postgres", "schema": "public", "name": "linkedin_ad_campaign_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "linkedin_ad_campaign_history_data.csv", "original_file_path": "seeds/linkedin_ad_campaign_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.linkedin_ad_campaign_history_data", "fqn": ["ad_reporting_integration_tests", "linkedin_ad_campaign_history_data"], "alias": "linkedin_ad_campaign_history_data", "checksum": {"name": "sha256", "checksum": "6d9dc155f63100a6555d22bf221ef2d037492984e4206518b68e17e0acb3b00a"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"created_time": "timestamp", "last_modified_time": "timestamp", "account_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"created_time": "timestamp", "last_modified_time": "timestamp", "account_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.8490427, "relation_name": "\"postgres\".\"public\".\"linkedin_ad_campaign_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.tiktok_campaign_history_data": {"database": "postgres", "schema": "public", "name": "tiktok_campaign_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "tiktok_campaign_history_data.csv", "original_file_path": "seeds/tiktok_campaign_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.tiktok_campaign_history_data", "fqn": ["ad_reporting_integration_tests", "tiktok_campaign_history_data"], "alias": "tiktok_campaign_history_data", "checksum": {"name": "sha256", "checksum": "ed72ea1d488112201d4226b6c4b88bee861b84446a4d4f7d31abb6719c38b612"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.8523078, "relation_name": "\"postgres\".\"public\".\"tiktok_campaign_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_ad_history_data": {"database": "postgres", "schema": "public", "name": "google_ads_ad_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_ad_history_data.csv", "original_file_path": "seeds/google_ads_ad_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_ad_history_data", "fqn": ["ad_reporting_integration_tests", "google_ads_ad_history_data"], "alias": "google_ads_ad_history_data", "checksum": {"name": "sha256", "checksum": "d75e5e99b2a5e2c3cecf248666c708c739a75cdee2cd66068fc893d9fe7ad635"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"ad_group_id": "bigint", "id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"ad_group_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.8555307, "relation_name": "\"postgres\".\"public\".\"google_ads_ad_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_campaign_criterion_history_data": {"database": "postgres", "schema": "public", "name": "google_ads_campaign_criterion_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_campaign_criterion_history_data.csv", "original_file_path": "seeds/google_ads_campaign_criterion_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_campaign_criterion_history_data", "fqn": ["ad_reporting_integration_tests", "google_ads_campaign_criterion_history_data"], "alias": "google_ads_campaign_criterion_history_data", "checksum": {"name": "sha256", "checksum": "6fde1012cf65b170fe7b3863249880e3df00dbe04faec341cb95c73330e2bef7"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "campaign_id": "bigint", "geo_target_constant_id": "bigint", "mobile_device_id": "bigint", "operating_system_version_id": "bigint", "topic_constant_id": "bigint", "user_interest_id": "bigint", "user_list_id": "bigint", "mobile_app_category_constant_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "geo_target_constant_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "mobile_device_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "operating_system_version_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "topic_constant_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "user_interest_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "user_list_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "mobile_app_category_constant_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.8589776, "relation_name": "\"postgres\".\"public\".\"google_ads_campaign_criterion_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_campaign_bid_modifier_history_data": {"database": "postgres", "schema": "public", "name": "google_ads_campaign_bid_modifier_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_campaign_bid_modifier_history_data.csv", "original_file_path": "seeds/google_ads_campaign_bid_modifier_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_campaign_bid_modifier_history_data", "fqn": ["ad_reporting_integration_tests", "google_ads_campaign_bid_modifier_history_data"], "alias": "google_ads_campaign_bid_modifier_history_data", "checksum": {"name": "sha256", "checksum": "984b02e59affadd44c34165e437e4fd94f7f738cbea727e30c6d4f48b1b2256a"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"campaign_id": "bigint", "criterion_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "criterion_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.8623822, "relation_name": "\"postgres\".\"public\".\"google_ads_campaign_bid_modifier_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.microsoft_ads_account_performance_daily_report_data": {"database": "postgres", "schema": "public", "name": "microsoft_ads_account_performance_daily_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "microsoft_ads_account_performance_daily_report_data.csv", "original_file_path": "seeds/microsoft_ads_account_performance_daily_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_account_performance_daily_report_data", "fqn": ["ad_reporting_integration_tests", "microsoft_ads_account_performance_daily_report_data"], "alias": "microsoft_ads_account_performance_daily_report_data", "checksum": {"name": "sha256", "checksum": "407268e863d1ec81e7450ec40910c1be3f6c3e898b3c5878f407f26b55429240"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "bigint", "spend": "float"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "spend": "float"}}, "created_at": 1783708213.8658028, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_account_performance_daily_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.tiktok_adgroup_report_hourly_data": {"database": "postgres", "schema": "public", "name": "tiktok_adgroup_report_hourly_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "tiktok_adgroup_report_hourly_data.csv", "original_file_path": "seeds/tiktok_adgroup_report_hourly_data.csv", "unique_id": "seed.ad_reporting_integration_tests.tiktok_adgroup_report_hourly_data", "fqn": ["ad_reporting_integration_tests", "tiktok_adgroup_report_hourly_data"], "alias": "tiktok_adgroup_report_hourly_data", "checksum": {"name": "sha256", "checksum": "9c037b120447cb51b8413ddc2c93f0f5f009e8500b3bcc37b23c5086ef743fe7"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.8690329, "relation_name": "\"postgres\".\"public\".\"tiktok_adgroup_report_hourly_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_keyword_stats_data": {"database": "postgres", "schema": "public", "name": "google_ads_keyword_stats_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_keyword_stats_data.csv", "original_file_path": "seeds/google_ads_keyword_stats_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_keyword_stats_data", "fqn": ["ad_reporting_integration_tests", "google_ads_keyword_stats_data"], "alias": "google_ads_keyword_stats_data", "checksum": {"name": "sha256", "checksum": "e4745703dd19dabf77a7df047ced6c1c56966ad8552d2f67676bcfd4ff36c94f"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"customer_id": "bigint", "campaign_id": "bigint", "ad_group_id": "bigint", "ad_group_criterion_criterion_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"customer_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_criterion_criterion_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.8723211, "relation_name": "\"postgres\".\"public\".\"google_ads_keyword_stats_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.pinterest_keyword_report_data": {"database": "postgres", "schema": "public", "name": "pinterest_keyword_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "pinterest_keyword_report_data.csv", "original_file_path": "seeds/pinterest_keyword_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.pinterest_keyword_report_data", "fqn": ["ad_reporting_integration_tests", "pinterest_keyword_report_data"], "alias": "pinterest_keyword_report_data", "checksum": {"name": "sha256", "checksum": "51ad505e0c3419b86759141226d3a5cc8b18aa07d35cb0212c2fbfbfadb17a31"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"keyword_id": "bigint", "pin_promotion_id": "bigint", "ad_group_id": "bigint", "campaign_id": "bigint", "advertiser_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"keyword_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "pin_promotion_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "advertiser_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.875682, "relation_name": "\"postgres\".\"public\".\"pinterest_keyword_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.google_ads_campaign_history_data": {"database": "postgres", "schema": "public", "name": "google_ads_campaign_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "google_ads_campaign_history_data.csv", "original_file_path": "seeds/google_ads_campaign_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.google_ads_campaign_history_data", "fqn": ["ad_reporting_integration_tests", "google_ads_campaign_history_data"], "alias": "google_ads_campaign_history_data", "checksum": {"name": "sha256", "checksum": "54db8f4f5a51eae1af9391b9b74c4b847485e82c382a25ebc1b4a727640825e5"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"customer_id": "bigint", "id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"customer_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.8792474, "relation_name": "\"postgres\".\"public\".\"google_ads_campaign_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.pinterest_keyword_history_data": {"database": "postgres", "schema": "public", "name": "pinterest_keyword_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "pinterest_keyword_history_data.csv", "original_file_path": "seeds/pinterest_keyword_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.pinterest_keyword_history_data", "fqn": ["ad_reporting_integration_tests", "pinterest_keyword_history_data"], "alias": "pinterest_keyword_history_data", "checksum": {"name": "sha256", "checksum": "c2bee861548c505642cb588c90a9e97ce95b77d8246448031bb9225bc5e2db84"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "campaign_id": "bigint", "ad_group_id": "bigint", "advertiser_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "advertiser_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.8826132, "relation_name": "\"postgres\".\"public\".\"pinterest_keyword_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.pinterest_ad_group_history_data": {"database": "postgres", "schema": "public", "name": "pinterest_ad_group_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "pinterest_ad_group_history_data.csv", "original_file_path": "seeds/pinterest_ad_group_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.pinterest_ad_group_history_data", "fqn": ["ad_reporting_integration_tests", "pinterest_ad_group_history_data"], "alias": "pinterest_ad_group_history_data", "checksum": {"name": "sha256", "checksum": "1dd6628bd824b4b3626bff8bd0a8f7c5eadfbadfa0319f24e2dffa7f16ca9d0c"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "campaign_id": "bigint", "ad_account_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "campaign_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}", "ad_account_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.885958, "relation_name": "\"postgres\".\"public\".\"pinterest_ad_group_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.pinterest_advertiser_history_data": {"database": "postgres", "schema": "public", "name": "pinterest_advertiser_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "pinterest_advertiser_history_data.csv", "original_file_path": "seeds/pinterest_advertiser_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.pinterest_advertiser_history_data", "fqn": ["ad_reporting_integration_tests", "pinterest_advertiser_history_data"], "alias": "pinterest_advertiser_history_data", "checksum": {"name": "sha256", "checksum": "d301cef7c69c7e1571a0df75ddbd36147977d804380dbbb528a8db432c9e7e5b"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.8892772, "relation_name": "\"postgres\".\"public\".\"pinterest_advertiser_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.amazon_ads_campaign_history_data": {"database": "postgres", "schema": "public", "name": "amazon_ads_campaign_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "amazon_ads_campaign_history_data.csv", "original_file_path": "seeds/amazon_ads_campaign_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_campaign_history_data", "fqn": ["ad_reporting_integration_tests", "amazon_ads_campaign_history_data"], "alias": "amazon_ads_campaign_history_data", "checksum": {"name": "sha256", "checksum": "0f20a7204beca4248a325978992ffd60e0fe986c633790b2bd032754d77c5184"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.8924751, "relation_name": "\"postgres\".\"public\".\"amazon_ads_campaign_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.facebook_ads_demographics_country_data": {"database": "postgres", "schema": "public", "name": "facebook_ads_demographics_country_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "facebook_ads_demographics_country_data.csv", "original_file_path": "seeds/facebook_ads_demographics_country_data.csv", "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_demographics_country_data", "fqn": ["ad_reporting_integration_tests", "facebook_ads_demographics_country_data"], "alias": "facebook_ads_demographics_country_data", "checksum": {"name": "sha256", "checksum": "c147c99cc41b96b6ec0d35f8c9963c46bd8d06e4d50f4ba62e59eae5268b0b94"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.8957803, "relation_name": "\"postgres\".\"public\".\"facebook_ads_demographics_country_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_campaign_conversions": {"database": "postgres", "schema": "public", "name": "reddit_ads_campaign_conversions", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_campaign_conversions.csv", "original_file_path": "seeds/reddit_ads_campaign_conversions.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_campaign_conversions", "fqn": ["ad_reporting_integration_tests", "reddit_ads_campaign_conversions"], "alias": "reddit_ads_campaign_conversions", "checksum": {"name": "sha256", "checksum": "ca700b6314c329f81da024b4c8c262a7c22a17ea3660ba8094c1686871ee5091"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "varchar(255)", "campaign_id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}", "campaign_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783708213.899073, "relation_name": "\"postgres\".\"public\".\"reddit_ads_campaign_conversions\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.facebook_ads_demographics_country_actions_data": {"database": "postgres", "schema": "public", "name": "facebook_ads_demographics_country_actions_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "facebook_ads_demographics_country_actions_data.csv", "original_file_path": "seeds/facebook_ads_demographics_country_actions_data.csv", "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_demographics_country_actions_data", "fqn": ["ad_reporting_integration_tests", "facebook_ads_demographics_country_actions_data"], "alias": "facebook_ads_demographics_country_actions_data", "checksum": {"name": "sha256", "checksum": "1c9bcd0559769f07cd2beded81b7305a10b9c1887d7ced00332da8102063ecb5"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"value": "float", "account_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"value": "float", "account_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.9023545, "relation_name": "\"postgres\".\"public\".\"facebook_ads_demographics_country_actions_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.apple_search_ad_group_report_data": {"database": "postgres", "schema": "public", "name": "apple_search_ad_group_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "apple_search_ad_group_report_data.csv", "original_file_path": "seeds/apple_search_ad_group_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.apple_search_ad_group_report_data", "fqn": ["ad_reporting_integration_tests", "apple_search_ad_group_report_data"], "alias": "apple_search_ad_group_report_data", "checksum": {"name": "sha256", "checksum": "1afb930ba3bc99a582e1d9e2c6595b033bd9399e80a047f964b075903cb0437f"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.9055622, "relation_name": "\"postgres\".\"public\".\"apple_search_ad_group_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_business_account_data": {"database": "postgres", "schema": "public", "name": "reddit_ads_business_account_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_business_account_data.csv", "original_file_path": "seeds/reddit_ads_business_account_data.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_business_account_data", "fqn": ["ad_reporting_integration_tests", "reddit_ads_business_account_data"], "alias": "reddit_ads_business_account_data", "checksum": {"name": "sha256", "checksum": "2fc3cf9d4be251e4e448f3e09ddb92f2c2c96c1fca52ef4f112dd62ff7278a25"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783708213.9090753, "relation_name": "\"postgres\".\"public\".\"reddit_ads_business_account_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.microsoft_ads_keyword_history_data": {"database": "postgres", "schema": "public", "name": "microsoft_ads_keyword_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "microsoft_ads_keyword_history_data.csv", "original_file_path": "seeds/microsoft_ads_keyword_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.microsoft_ads_keyword_history_data", "fqn": ["ad_reporting_integration_tests", "microsoft_ads_keyword_history_data"], "alias": "microsoft_ads_keyword_history_data", "checksum": {"name": "sha256", "checksum": "e736b54737adad8174d44a89eab9a6b720326744bff802fda870f585c86e7511"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"id": "bigint", "ad_group_id": "bigint", "modified_time": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "ad_group_id": "{{ 'INT64' if target.type == 'bigquery' else 'bigint' }}", "modified_time": "timestamp"}}, "created_at": 1783708213.9123921, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_keyword_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.amazon_ads_keyword_history_data": {"database": "postgres", "schema": "public", "name": "amazon_ads_keyword_history_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "amazon_ads_keyword_history_data.csv", "original_file_path": "seeds/amazon_ads_keyword_history_data.csv", "unique_id": "seed.ad_reporting_integration_tests.amazon_ads_keyword_history_data", "fqn": ["ad_reporting_integration_tests", "amazon_ads_keyword_history_data"], "alias": "amazon_ads_keyword_history_data", "checksum": {"name": "sha256", "checksum": "a76f88aeb6ebf78cec10fe06d07479eace29a79b9afa52b3278e32f65964dc33"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.915623, "relation_name": "\"postgres\".\"public\".\"amazon_ads_keyword_history_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.pinterest_pin_promotion_targeting_report_data": {"database": "postgres", "schema": "public", "name": "pinterest_pin_promotion_targeting_report_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "pinterest_pin_promotion_targeting_report_data.csv", "original_file_path": "seeds/pinterest_pin_promotion_targeting_report_data.csv", "unique_id": "seed.ad_reporting_integration_tests.pinterest_pin_promotion_targeting_report_data", "fqn": ["ad_reporting_integration_tests", "pinterest_pin_promotion_targeting_report_data"], "alias": "pinterest_pin_promotion_targeting_report_data", "checksum": {"name": "sha256", "checksum": "8e9b12428773578820ca562018bfbe2a42b5a12d19105428bbd222272daa9413"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"campaign_id": "bigint"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"campaign_id": "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"}}, "created_at": 1783708213.918861, "relation_name": "\"postgres\".\"public\".\"pinterest_pin_promotion_targeting_report_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.reddit_ads_ad_group_conversions": {"database": "postgres", "schema": "public", "name": "reddit_ads_ad_group_conversions", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "reddit_ads_ad_group_conversions.csv", "original_file_path": "seeds/reddit_ads_ad_group_conversions.csv", "unique_id": "seed.ad_reporting_integration_tests.reddit_ads_ad_group_conversions", "fqn": ["ad_reporting_integration_tests", "reddit_ads_ad_group_conversions"], "alias": "reddit_ads_ad_group_conversions", "checksum": {"name": "sha256", "checksum": "4289f878ef2942b8ddba332bc3b8a830dc22af6f0fa480fbedb78ec7f9549ac3"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"account_id": "varchar(255)", "ad_group_id": "varchar(255)"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}", "column_types": {"account_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}", "ad_group_id": "{{ 'string' if target.type in ['bigquery','spark','databricks'] else 'varchar(255)' }}"}}, "created_at": 1783708213.9222894, "relation_name": "\"postgres\".\"public\".\"reddit_ads_ad_group_conversions\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.tiktok_ad_report_hourly_data": {"database": "postgres", "schema": "public", "name": "tiktok_ad_report_hourly_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "tiktok_ad_report_hourly_data.csv", "original_file_path": "seeds/tiktok_ad_report_hourly_data.csv", "unique_id": "seed.ad_reporting_integration_tests.tiktok_ad_report_hourly_data", "fqn": ["ad_reporting_integration_tests", "tiktok_ad_report_hourly_data"], "alias": "tiktok_ad_report_hourly_data", "checksum": {"name": "sha256", "checksum": "22559e87d6e55c6731d1ce33e793304f522ec0f6c5ae461ac6dbcca9c4333a5b"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.9255364, "relation_name": "\"postgres\".\"public\".\"tiktok_ad_report_hourly_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.pinterest_targeting_geo_region_data": {"database": "postgres", "schema": "public", "name": "pinterest_targeting_geo_region_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "pinterest_targeting_geo_region_data.csv", "original_file_path": "seeds/pinterest_targeting_geo_region_data.csv", "unique_id": "seed.ad_reporting_integration_tests.pinterest_targeting_geo_region_data", "fqn": ["ad_reporting_integration_tests", "pinterest_targeting_geo_region_data"], "alias": "pinterest_targeting_geo_region_data", "checksum": {"name": "sha256", "checksum": "68a1178fe36de4fd24be28fb76f4a65cefda5a355fff1a2620eaf87cecce5f85"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.9286828, "relation_name": "\"postgres\".\"public\".\"pinterest_targeting_geo_region_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_action_values_data": {"database": "postgres", "schema": "public", "name": "facebook_ads_basic_ad_action_values_data", "resource_type": "seed", "package_name": "ad_reporting_integration_tests", "path": "facebook_ads_basic_ad_action_values_data.csv", "original_file_path": "seeds/facebook_ads_basic_ad_action_values_data.csv", "unique_id": "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_action_values_data", "fqn": ["ad_reporting_integration_tests", "facebook_ads_basic_ad_action_values_data"], "alias": "facebook_ads_basic_ad_action_values_data", "checksum": {"name": "sha256", "checksum": "77e70b5d122d72d83aa7bfa30799d4164dadcbbed0d2e514c55afacb1a968aa4"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "seed", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": false, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "delimiter": ",", "quote_columns": false}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": false, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"docs": {"show": false}, "quote_columns": "{{ target.type in ('redshift') or var('fivetran_using_source_casing', false) }}"}, "created_at": 1783708213.9318295, "relation_name": "\"postgres\".\"public\".\"facebook_ads_basic_ad_action_values_data\"", "raw_code": "", "doc_blocks": [], "root_path": "/home/runner/work/dbt_ad_reporting/dbt_ad_reporting/integration_tests", "depends_on": {"macros": []}}, "model.linkedin.linkedin_ads__creative_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "linkedin_ads__creative_report", "resource_type": "model", "package_name": "linkedin", "path": "linkedin_ads__creative_report.sql", "original_file_path": "models/linkedin_ads__creative_report.sql", "unique_id": "model.linkedin.linkedin_ads__creative_report", "fqn": ["linkedin", "linkedin_ads__creative_report"], "alias": "linkedin_ads__creative_report", "checksum": {"name": "sha256", "checksum": "69eb85190bc0a22e63b16c2e102534f2d948699875e0ac59addd4de5e7713b74"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the creative level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}, "account_name": {"name": "account_name", "description": "A label for the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "Unique internal ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The day of the activity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost": {"name": "cost", "description": "The cost of the ads in the local currency or USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_name": {"name": "campaign_group_name", "description": "A label for the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_id": {"name": "campaign_group_id", "description": "Unique internal ID representing the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "A label for the creative's campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Unique internal ID representing the creative's campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_id": {"name": "creative_id", "description": "Unique internal ID representing the creative.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_at": {"name": "last_modified_at", "description": "The timestamp of when the version was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp of when the creative was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_status": {"name": "creative_status", "description": "ACTIVE - Creative creation is complete and creative is available for review and serve.\nPAUSED - Creative creation is complete and creative is current, but should temporarily not be served. This status is not valid upon creation.\nDRAFT - Creative creation is incomplete and may still be edited.\nARCHIVED - Creative creation is complete, but creative should not be served and should be separated from non-archived creatives in any UI.\nCANCELED - Creative is permanently canceled.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_uri": {"name": "click_uri", "description": "The URL where the member should be redirected to, on clicking the text ad or spotlight ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_uri_type": {"name": "click_uri_type", "description": "Will either be `text_ad`, `spotlight`, or `null` to indicate the origin of the click_uri.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_status": {"name": "campaign_group_status", "description": "Status of campaign's campaign group. Possible values are: ACTIVE - Denotes that the campaign group is capable of serving ads, subject to run date and budget limitations (as well as any other limitations at the account or campaign level). ARCHIVED - Denotes that the campaign group is presently inactive, and should mostly be hidden in the UI until un-archived. CANCELLED - Denotes that the campaign group has been permanently canceled and cannot be reactivated. Not a settable status. DRAFT - Denotes that the campaign group is in a preliminary state and should temporarily not be served. PAUSED - Denotes that the campaign group meets all requirements to be served, but temporarily should not be. PENDING_DELETION - Denotes that the campaign group has been requested to be deleted that is currently pending. REMOVED - Denoted that the campaign group was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "ACTIVE - Denotes that the campaign is fully servable.\nPAUSED - Denotes that the campaign meets all requirements to be served, but temporarily should not be.\nARCHIVED - Denotes that the campaign is presently inactive, and should mostly be hidden in the UI until un-archived.\nCOMPLETED - Denotes that the campaign has reached a specified budgetary or chronological limit.\nCANCELED - Denotes that the campaign has been permanently canceled, such as when an advertising account is permanently closed.\nDRAFT - Denotes that the campaign is still being edited and not eligible for serving. Some validation will be postponed until the campaign is activated.\nPENDING_DELETION - Denotes that the campaign has been requested to be deleted that is currently pending.\nREMOVED - Denotes that the campaign was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency, on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "The total conversions being brought in the conversion fields you select in your `linkedin_ads__conversion_fields`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.7147446, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__creative_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\nwith creative as (\n\n select *\n from {{ ref('stg_linkedin_ads__creative_history') }}\n where is_latest_version\n),\n\ncampaign as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_history') }}\n where is_latest_version\n),\n\ncampaign_group as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_group_history') }}\n where is_latest_version\n),\n\naccount as (\n\n select *\n from {{ ref('stg_linkedin_ads__account_history') }}\n where is_latest_version\n),\n\nreport as (\n\n select *,\n {% if var('linkedin_ads__conversion_fields', none) %}\n {{ var('linkedin_ads__conversion_fields') | join(' + ') }} as total_conversions\n {% else %}\n 0 as total_conversions\n {% endif %}\n from {{ ref('stg_linkedin_ads__ad_analytics_by_creative') }}\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.creative_id,\n campaign.campaign_id,\n campaign.campaign_name,\n campaign_group.campaign_group_id,\n campaign_group.campaign_group_name,\n account.account_id,\n account.account_name,\n creative.click_uri,\n creative.click_uri_type,\n creative.status as creative_status,\n campaign.status as campaign_status,\n campaign_group.status as campaign_group_status,\n account.currency,\n creative.last_modified_at,\n creative.created_at,\n sum(report.total_conversions) as total_conversions,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.cost) as cost,\n sum(coalesce(report.conversion_value_in_local_currency, 0)) as conversion_value_in_local_currency \n\n {{ linkedin_ads_persist_pass_through_columns(pass_through_variable='linkedin_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='linkedin_ads__creative_passthrough_metrics', exclude_fields=['conversion_value_in_local_currency']) }}\n\n {{ linkedin_ads_persist_pass_through_columns(pass_through_variable='linkedin_ads__creative_passthrough_metrics', transform='sum', exclude_fields=['conversion_value_in_local_currency']) }}\n\n from report \n left join creative \n on report.creative_id = creative.creative_id\n and report.source_relation = creative.source_relation\n left join campaign \n on creative.campaign_id = campaign.campaign_id\n and creative.source_relation = campaign.source_relation\n left join campaign_group\n on campaign.campaign_group_id = campaign_group.campaign_group_id\n and campaign.source_relation = campaign_group.source_relation\n left join account \n on campaign.account_id = account.account_id\n and campaign.source_relation = account.source_relation\n\n {{ dbt_utils.group_by(17) }}\n\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__creative_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__campaign_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__campaign_group_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__account_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__ad_analytics_by_creative", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.linkedin.linkedin_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.linkedin.stg_linkedin_ads__creative_history", "model.linkedin.stg_linkedin_ads__campaign_history", "model.linkedin.stg_linkedin_ads__campaign_group_history", "model.linkedin.stg_linkedin_ads__account_history", "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative"]}, "compiled_path": "target/compiled/linkedin/models/linkedin_ads__creative_report.sql", "compiled": true, "compiled_code": "\n\nwith creative as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__creative_history\"\n where is_latest_version\n),\n\ncampaign as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_history\"\n where is_latest_version\n),\n\ncampaign_group as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_group_history\"\n where is_latest_version\n),\n\naccount as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__account_history\"\n where is_latest_version\n),\n\nreport as (\n\n select *,\n \n external_website_conversions + one_click_leads as total_conversions\n \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_creative\"\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.creative_id,\n campaign.campaign_id,\n campaign.campaign_name,\n campaign_group.campaign_group_id,\n campaign_group.campaign_group_name,\n account.account_id,\n account.account_name,\n creative.click_uri,\n creative.click_uri_type,\n creative.status as creative_status,\n campaign.status as campaign_status,\n campaign_group.status as campaign_group_status,\n account.currency,\n creative.last_modified_at,\n creative.created_at,\n sum(report.total_conversions) as total_conversions,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.cost) as cost,\n sum(coalesce(report.conversion_value_in_local_currency, 0)) as conversion_value_in_local_currency \n\n \n\n\n\n \n \n\n\n\n \n\n\n\n \n \n \n \n , sum(coalesce(external_website_conversions, 0)) as external_website_conversions\n \n\n \n \n \n \n , sum(coalesce(one_click_leads, 0)) as one_click_leads\n \n\n \n\n\n\n\n \n\n\n\n\n\n \n\n\n\n\n\n\n from report \n left join creative \n on report.creative_id = creative.creative_id\n and report.source_relation = creative.source_relation\n left join campaign \n on creative.campaign_id = campaign.campaign_id\n and creative.source_relation = campaign.source_relation\n left join campaign_group\n on campaign.campaign_group_id = campaign_group.campaign_group_id\n and campaign.source_relation = campaign_group.source_relation\n left join account \n on campaign.account_id = account.account_id\n and campaign.source_relation = account.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17\n\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.linkedin_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "linkedin_ads__campaign_report", "resource_type": "model", "package_name": "linkedin", "path": "linkedin_ads__campaign_report.sql", "original_file_path": "models/linkedin_ads__campaign_report.sql", "unique_id": "model.linkedin.linkedin_ads__campaign_report", "fqn": ["linkedin", "linkedin_ads__campaign_report"], "alias": "linkedin_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "db37ff0d37bbd8c514396c692c9addcdd6c4d1e3fb1ba7bdb7a67c44678bbdaf"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the campaign level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}, "account_name": {"name": "account_name", "description": "A label for the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "Unique internal ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The day of the activity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost": {"name": "cost", "description": "The cost of the ads in the local currency or USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_name": {"name": "campaign_group_name", "description": "A label for the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_id": {"name": "campaign_group_id", "description": "Unique internal ID representing the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "A label for the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Unique internal ID representing the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_status": {"name": "campaign_group_status", "description": "Status of campaign's campaign group. Possible values are: ACTIVE - Denotes that the campaign group is capable of serving ads, subject to run date and budget limitations (as well as any other limitations at the account or campaign level). ARCHIVED - Denotes that the campaign group is presently inactive, and should mostly be hidden in the UI until un-archived. CANCELLED - Denotes that the campaign group has been permanently canceled and cannot be reactivated. Not a settable status. DRAFT - Denotes that the campaign group is in a preliminary state and should temporarily not be served. PAUSED - Denotes that the campaign group meets all requirements to be served, but temporarily should not be. PENDING_DELETION - Denotes that the campaign group has been requested to be deleted that is currently pending. REMOVED - Denoted that the campaign group was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_at": {"name": "last_modified_at", "description": "The timestamp of when the version was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp of when the campaign was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "version_tag": {"name": "version_tag", "description": "An integer representation of the version of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_audience_expansion_enabled": {"name": "is_audience_expansion_enabled", "description": "Boolean (default=false) representing whether Audience Expansion is enabled for the campaign provides query expansion for certain targeting criteria.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_type": {"name": "cost_type", "description": "CPM - Cost per thousand advertising impressions. If type=SPONSORED_INMAILS; cost per send(CPS) is measured as CPM x 1000.\nCPC- Cost per individual click on the associated link.\nCPV- Cost per view for video ads.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_selection": {"name": "creative_selection", "description": "ROUND_ROBIN - Rotate through available creatives to serve them as evenly as possible.\nOPTIMIZED (default) - Bias selection taking into account such as expected performance. Not available for Message and Conversation Ads (type=SPONSORED_INMAILS).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_amount": {"name": "daily_budget_amount", "description": "Maximum amount to spend per day UTC. The amount of money as a real number string.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_currency_code": {"name": "daily_budget_currency_code", "description": "ISO currency code. The currency must match that of the parent account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "format": {"name": "format", "description": "The ad format on the campaign level. See https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads/campaign-formats?view=li-lms-2022-07", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "locale_country": {"name": "locale_country", "description": "Locale of the campaign. An uppercase two-letter country code as defined by ISO-3166.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "locale_language": {"name": "locale_language", "description": "Locale of the campaign. A lowercase two-letter language code as defined by ISO-639.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective_type": {"name": "objective_type", "description": "Campaign Objective type values. Click [here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ad-budget-pricing-type-combinations?view=li-lms-2022-07) for Campaign Objective descriptions. One of: - BRAND_AWARENESS - ENGAGEMENT - JOB_APPLICANTS - LEAD_GENERATION - WEBSITE_CONVERSIONS - WEBSITE_VISITS - VIDEO_VIEWS\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_offsite_delivery_enabled": {"name": "is_offsite_delivery_enabled", "description": "Boolean indicating if this campaign to allowed to be served on the LinkedIn Audience Network to extend the reach of your campaign by delivering ads beyond the LinkedIn feed to members on third-party apps and sites.\t(default will be \"True\" from June 30, 2022)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "optimization_target_type": {"name": "optimization_target_type", "description": "Determines how this campaign is optimized for spending. If this is not set, there is no optimization. Refer to the documentation here. Default = 'NONE'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_start_at": {"name": "run_schedule_start_at", "description": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the inclusive (greater than or equal to) value in which to start the range.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_end_at": {"name": "run_schedule_end_at", "description": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the exclusive (strictly less than) value in which to end the range, if provided.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "ACTIVE - Denotes that the campaign is fully servable.\nPAUSED - Denotes that the campaign meets all requirements to be served, but temporarily should not be.\nARCHIVED - Denotes that the campaign is presently inactive, and should mostly be hidden in the UI until un-archived.\nCOMPLETED - Denotes that the campaign has reached a specified budgetary or chronological limit.\nCANCELED - Denotes that the campaign has been permanently canceled, such as when an advertising account is permanently closed.\nDRAFT - Denotes that the campaign is still being edited and not eligible for serving. Some validation will be postponed until the campaign is activated.\nPENDING_DELETION - Denotes that the campaign has been requested to be deleted that is currently pending.\nREMOVED - Denotes that the campaign was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "type": {"name": "type", "description": "TEXT_AD - Text-based ads that show up in the right column or top of the page on LinkedIn.\nSPONSORED_UPDATES - Native ads that promote a company's content updates in the LinkedIn feed.\nSPONSORED_INMAILS - Personalized messages with a call-to-action button delivered to a LinkedIn's member inbox.\nDYNAMIC - Ads that are dynamically personalized.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "unit_cost_amount": {"name": "unit_cost_amount", "description": "This value is used as one of the following: amount to bid (for manual bidding), amount which is the target cost (for target cost bidding) per click, impression, or other event depending on the pricing model, or cost cap (for cost cap bidding). The amount of money as a real number string. The amount should be non-negative if the bidding strategy is manual, target cost, or cost cap bidding. The default is 0 with the currency code set to match that of the associated account.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "unit_cost_currency_code": {"name": "unit_cost_currency_code", "description": "Amount to bid per click, impression, or other event depending on the pricing model. The default is 0 with the currency code set to match that of the associated account. ISO currency code.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency, on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "The total conversions being brought in the conversion fields you select in your `linkedin_ads__conversion_fields`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.709838, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\nwith campaign as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_history') }}\n where is_latest_version\n),\n\ncampaign_group as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_group_history') }}\n where is_latest_version\n),\n\naccount as (\n\n select *\n from {{ ref('stg_linkedin_ads__account_history') }}\n where is_latest_version\n),\n\nreport as (\n\n select *,\n {% if var('linkedin_ads__conversion_fields', none) %}\n {{ var('linkedin_ads__conversion_fields') | join(' + ') }} as total_conversions\n {% else %}\n 0 as total_conversions\n {% endif %}\n from {{ ref('stg_linkedin_ads__ad_analytics_by_campaign') }}\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.campaign_id,\n campaign.campaign_name,\n campaign.version_tag,\n campaign_group.campaign_group_id,\n campaign_group.campaign_group_name,\n account.account_id,\n account.account_name,\n campaign.status as campaign_status,\n campaign_group.status as campaign_group_status,\n campaign.type,\n campaign.cost_type,\n campaign.creative_selection,\n campaign.daily_budget_amount,\n campaign.daily_budget_currency_code,\n campaign.unit_cost_amount,\n campaign.unit_cost_currency_code,\n account.currency,\n campaign.format,\n campaign.locale_country,\n campaign.locale_language,\n campaign.objective_type,\n campaign.optimization_target_type,\n campaign.is_audience_expansion_enabled,\n campaign.is_offsite_delivery_enabled,\n campaign.run_schedule_start_at,\n campaign.run_schedule_end_at,\n campaign.last_modified_at,\n campaign.created_at,\n sum(report.total_conversions) as total_conversions,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.cost) as cost,\n sum(coalesce(report.conversion_value_in_local_currency, 0)) as conversion_value_in_local_currency\n\n {{ linkedin_ads_persist_pass_through_columns(pass_through_variable='linkedin_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='linkedin_ads__campaign_passthrough_metrics', exclude_fields=['conversion_value_in_local_currency']) }}\n \n {{ linkedin_ads_persist_pass_through_columns(pass_through_variable='linkedin_ads__campaign_passthrough_metrics', transform='sum', exclude_fields=['conversion_value_in_local_currency']) }}\n\n from report \n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join campaign_group\n on campaign.campaign_group_id = campaign_group.campaign_group_id\n and campaign.source_relation = campaign_group.source_relation\n left join account \n on campaign.account_id = account.account_id\n and campaign.source_relation = account.source_relation\n\n {{ dbt_utils.group_by(30) }}\n\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__campaign_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__campaign_group_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__account_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__ad_analytics_by_campaign", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.linkedin.linkedin_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.linkedin.stg_linkedin_ads__campaign_history", "model.linkedin.stg_linkedin_ads__campaign_group_history", "model.linkedin.stg_linkedin_ads__account_history", "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign"]}, "compiled_path": "target/compiled/linkedin/models/linkedin_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith campaign as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_history\"\n where is_latest_version\n),\n\ncampaign_group as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_group_history\"\n where is_latest_version\n),\n\naccount as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__account_history\"\n where is_latest_version\n),\n\nreport as (\n\n select *,\n \n external_website_conversions + one_click_leads as total_conversions\n \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_campaign\"\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.campaign_id,\n campaign.campaign_name,\n campaign.version_tag,\n campaign_group.campaign_group_id,\n campaign_group.campaign_group_name,\n account.account_id,\n account.account_name,\n campaign.status as campaign_status,\n campaign_group.status as campaign_group_status,\n campaign.type,\n campaign.cost_type,\n campaign.creative_selection,\n campaign.daily_budget_amount,\n campaign.daily_budget_currency_code,\n campaign.unit_cost_amount,\n campaign.unit_cost_currency_code,\n account.currency,\n campaign.format,\n campaign.locale_country,\n campaign.locale_language,\n campaign.objective_type,\n campaign.optimization_target_type,\n campaign.is_audience_expansion_enabled,\n campaign.is_offsite_delivery_enabled,\n campaign.run_schedule_start_at,\n campaign.run_schedule_end_at,\n campaign.last_modified_at,\n campaign.created_at,\n sum(report.total_conversions) as total_conversions,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.cost) as cost,\n sum(coalesce(report.conversion_value_in_local_currency, 0)) as conversion_value_in_local_currency\n\n \n\n\n\n \n \n\n\n\n \n\n\n\n \n \n \n \n , sum(coalesce(external_website_conversions, 0)) as external_website_conversions\n \n\n \n \n \n \n , sum(coalesce(one_click_leads, 0)) as one_click_leads\n \n\n \n\n\n\n \n \n\n\n\n\n\n \n\n\n\n\n\n\n from report \n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join campaign_group\n on campaign.campaign_group_id = campaign_group.campaign_group_id\n and campaign.source_relation = campaign_group.source_relation\n left join account \n on campaign.account_id = account.account_id\n and campaign.source_relation = account.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30\n\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.linkedin_ads__monthly_campaign_region_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "linkedin_ads__monthly_campaign_region_report", "resource_type": "model", "package_name": "linkedin", "path": "linkedin_ads__monthly_campaign_region_report.sql", "original_file_path": "models/linkedin_ads__monthly_campaign_region_report.sql", "unique_id": "model.linkedin.linkedin_ads__monthly_campaign_region_report", "fqn": ["linkedin", "linkedin_ads__monthly_campaign_region_report"], "alias": "linkedin_ads__monthly_campaign_region_report", "checksum": {"name": "sha256", "checksum": "1a6720d282a78b77ab1c2c085d87830bd056ca8d05f4247015f4fdd7e0203e56"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the monthly performance of a campaign at the country level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}, "account_name": {"name": "account_name", "description": "A label for the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "Unique internal ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_month": {"name": "date_month", "description": "The month of the activity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "region_name": {"name": "region_name", "description": "Name of the region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost": {"name": "cost", "description": "The cost of the ads in the local currency or USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_name": {"name": "campaign_group_name", "description": "A label for the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_id": {"name": "campaign_group_id", "description": "Unique internal ID representing the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "A label for the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Unique internal ID representing the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_status": {"name": "campaign_group_status", "description": "Status of campaign's campaign group. Possible values are: ACTIVE - Denotes that the campaign group is capable of serving ads, subject to run date and budget limitations (as well as any other limitations at the account or campaign level). ARCHIVED - Denotes that the campaign group is presently inactive, and should mostly be hidden in the UI until un-archived. CANCELLED - Denotes that the campaign group has been permanently canceled and cannot be reactivated. Not a settable status. DRAFT - Denotes that the campaign group is in a preliminary state and should temporarily not be served. PAUSED - Denotes that the campaign group meets all requirements to be served, but temporarily should not be. PENDING_DELETION - Denotes that the campaign group has been requested to be deleted that is currently pending. REMOVED - Denoted that the campaign group was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_at": {"name": "last_modified_at", "description": "The timestamp of when the version was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp of when the campaign was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "version_tag": {"name": "version_tag", "description": "An integer representation of the version of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_audience_expansion_enabled": {"name": "is_audience_expansion_enabled", "description": "Boolean (default=false) representing whether Audience Expansion is enabled for the campaign provides query expansion for certain targeting criteria.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_type": {"name": "cost_type", "description": "CPM - Cost per thousand advertising impressions. If type=SPONSORED_INMAILS; cost per send(CPS) is measured as CPM x 1000.\nCPC- Cost per individual click on the associated link.\nCPV- Cost per view for video ads.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_selection": {"name": "creative_selection", "description": "ROUND_ROBIN - Rotate through available creatives to serve them as evenly as possible.\nOPTIMIZED (default) - Bias selection taking into account such as expected performance. Not available for Message and Conversation Ads (type=SPONSORED_INMAILS).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_amount": {"name": "daily_budget_amount", "description": "Maximum amount to spend per day UTC. The amount of money as a real number string.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_currency_code": {"name": "daily_budget_currency_code", "description": "ISO currency code. The currency must match that of the parent account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "format": {"name": "format", "description": "The ad format on the campaign level. See https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads/campaign-formats?view=li-lms-2022-07", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_locale_country": {"name": "campaign_locale_country", "description": "Locale of the campaign. An uppercase two-letter country code as defined by ISO-3166.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_locale_language": {"name": "campaign_locale_language", "description": "Locale of the campaign. A lowercase two-letter language code as defined by ISO-639.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective_type": {"name": "objective_type", "description": "Campaign Objective type values. Click [here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ad-budget-pricing-type-combinations?view=li-lms-2022-07) for Campaign Objective descriptions. One of: - BRAND_AWARENESS - ENGAGEMENT - JOB_APPLICANTS - LEAD_GENERATION - WEBSITE_CONVERSIONS - WEBSITE_VISITS - VIDEO_VIEWS\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_offsite_delivery_enabled": {"name": "is_offsite_delivery_enabled", "description": "Boolean indicating if this campaign to allowed to be served on the LinkedIn Audience Network to extend the reach of your campaign by delivering ads beyond the LinkedIn feed to members on third-party apps and sites.\t(default will be \"True\" from June 30, 2022)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "optimization_target_type": {"name": "optimization_target_type", "description": "Determines how this campaign is optimized for spending. If this is not set, there is no optimization. Refer to the documentation here. Default = 'NONE'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_start_at": {"name": "run_schedule_start_at", "description": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the inclusive (greater than or equal to) value in which to start the range.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_end_at": {"name": "run_schedule_end_at", "description": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the exclusive (strictly less than) value in which to end the range, if provided.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "ACTIVE - Denotes that the campaign is fully servable.\nPAUSED - Denotes that the campaign meets all requirements to be served, but temporarily should not be.\nARCHIVED - Denotes that the campaign is presently inactive, and should mostly be hidden in the UI until un-archived.\nCOMPLETED - Denotes that the campaign has reached a specified budgetary or chronological limit.\nCANCELED - Denotes that the campaign has been permanently canceled, such as when an advertising account is permanently closed.\nDRAFT - Denotes that the campaign is still being edited and not eligible for serving. Some validation will be postponed until the campaign is activated.\nPENDING_DELETION - Denotes that the campaign has been requested to be deleted that is currently pending.\nREMOVED - Denotes that the campaign was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_type": {"name": "campaign_type", "description": "TEXT_AD - Text-based ads that show up in the right column or top of the page on LinkedIn.\nSPONSORED_UPDATES - Native ads that promote a company's content updates in the LinkedIn feed.\nSPONSORED_INMAILS - Personalized messages with a call-to-action button delivered to a LinkedIn's member inbox.\nDYNAMIC - Ads that are dynamically personalized.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "unit_cost_amount": {"name": "unit_cost_amount", "description": "This value is used as one of the following: amount to bid (for manual bidding), amount which is the target cost (for target cost bidding) per click, impression, or other event depending on the pricing model, or cost cap (for cost cap bidding). The amount of money as a real number string. The amount should be non-negative if the bidding strategy is manual, target cost, or cost cap bidding. The default is 0 with the currency code set to match that of the associated account.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "unit_cost_currency_code": {"name": "unit_cost_currency_code", "description": "Amount to bid per click, impression, or other event depending on the pricing model. The default is 0 with the currency code set to match that of the associated account. ISO currency code.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_currency": {"name": "account_currency", "description": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency, on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "The total conversions being brought in the conversion fields you select in your `linkedin_ads__conversion_fields`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.7260454, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__monthly_campaign_region_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__linkedin_ads_enabled','linkedin_ads__using_geo','linkedin_ads__using_monthly_ad_analytics_by_member_region'])) }}\n\nwith campaign as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_history') }}\n where is_latest_version\n),\n\ncampaign_group as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_group_history') }}\n where is_latest_version\n),\n\naccount as (\n\n select *\n from {{ ref('stg_linkedin_ads__account_history') }}\n where is_latest_version\n),\n\ngeo as (\n\n select *\n from {{ ref('stg_linkedin_ads__geo') }}\n),\n\nreport as (\n\n select *,\n {% if var('linkedin_ads__conversion_fields', none) %}\n {{ var('linkedin_ads__conversion_fields') | join(' + ') }} as total_conversions\n {% else %}\n 0 as total_conversions\n {% endif %}\n from {{ ref('stg_linkedin_ads__monthly_ad_analytics_by_region') }}\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_month,\n geo.value as region_name,\n report.campaign_id,\n campaign.campaign_name,\n campaign.version_tag,\n campaign_group.campaign_group_id,\n campaign_group.campaign_group_name,\n account.account_id,\n account.account_name,\n campaign.status as campaign_status,\n campaign_group.status as campaign_group_status,\n campaign.type as campaign_type,\n campaign.cost_type,\n campaign.creative_selection,\n campaign.daily_budget_amount,\n campaign.daily_budget_currency_code,\n campaign.unit_cost_amount,\n campaign.unit_cost_currency_code,\n account.currency as account_currency,\n campaign.format,\n campaign.locale_country as campaign_locale_country,\n campaign.locale_language as campaign_locale_language,\n campaign.objective_type,\n campaign.optimization_target_type,\n campaign.is_audience_expansion_enabled,\n campaign.is_offsite_delivery_enabled,\n campaign.run_schedule_start_at,\n campaign.run_schedule_end_at,\n campaign.last_modified_at,\n campaign.created_at,\n sum(report.total_conversions) as total_conversions,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.cost) as cost,\n sum(coalesce(report.conversion_value_in_local_currency, 0)) as conversion_value_in_local_currency\n\n {{ linkedin_ads_persist_pass_through_columns(pass_through_variable='linkedin_ads__conversion_fields', transform='sum', coalesce_with=0) }}\n \n {{ linkedin_ads_persist_pass_through_columns(pass_through_variable='linkedin_ads__monthly_ad_analytics_by_member_region_passthrough_metrics', transform='sum') }}\n\n from report\n left join geo\n on geo.geo_id = report.member_region_geo_id\n and report.source_relation = report.source_relation\n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join campaign_group\n on campaign.campaign_group_id = campaign_group.campaign_group_id\n and campaign.source_relation = campaign_group.source_relation\n left join account \n on campaign.account_id = account.account_id\n and campaign.source_relation = account.source_relation\n\n {{ dbt_utils.group_by(31) }}\n\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__campaign_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__campaign_group_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__account_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__geo", "package": null, "version": null}, {"name": "stg_linkedin_ads__monthly_ad_analytics_by_region", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.linkedin.linkedin_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.linkedin.stg_linkedin_ads__campaign_history", "model.linkedin.stg_linkedin_ads__campaign_group_history", "model.linkedin.stg_linkedin_ads__account_history", "model.linkedin.stg_linkedin_ads__geo", "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region"]}, "compiled_path": "target/compiled/linkedin/models/linkedin_ads__monthly_campaign_region_report.sql", "compiled": true, "compiled_code": "\n\nwith campaign as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_history\"\n where is_latest_version\n),\n\ncampaign_group as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_group_history\"\n where is_latest_version\n),\n\naccount as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__account_history\"\n where is_latest_version\n),\n\ngeo as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__geo\"\n),\n\nreport as (\n\n select *,\n \n external_website_conversions + one_click_leads as total_conversions\n \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__monthly_ad_analytics_by_region\"\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_month,\n geo.value as region_name,\n report.campaign_id,\n campaign.campaign_name,\n campaign.version_tag,\n campaign_group.campaign_group_id,\n campaign_group.campaign_group_name,\n account.account_id,\n account.account_name,\n campaign.status as campaign_status,\n campaign_group.status as campaign_group_status,\n campaign.type as campaign_type,\n campaign.cost_type,\n campaign.creative_selection,\n campaign.daily_budget_amount,\n campaign.daily_budget_currency_code,\n campaign.unit_cost_amount,\n campaign.unit_cost_currency_code,\n account.currency as account_currency,\n campaign.format,\n campaign.locale_country as campaign_locale_country,\n campaign.locale_language as campaign_locale_language,\n campaign.objective_type,\n campaign.optimization_target_type,\n campaign.is_audience_expansion_enabled,\n campaign.is_offsite_delivery_enabled,\n campaign.run_schedule_start_at,\n campaign.run_schedule_end_at,\n campaign.last_modified_at,\n campaign.created_at,\n sum(report.total_conversions) as total_conversions,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.cost) as cost,\n sum(coalesce(report.conversion_value_in_local_currency, 0)) as conversion_value_in_local_currency\n\n \n\n\n\n\n\n\n\n \n \n \n \n , sum(coalesce(external_website_conversions, 0)) as external_website_conversions\n \n\n \n \n \n \n , sum(coalesce(one_click_leads, 0)) as one_click_leads\n \n\n \n\n\n\n \n \n\n\n\n\n\n\n\n\n\n\n from report\n left join geo\n on geo.geo_id = report.member_region_geo_id\n and report.source_relation = report.source_relation\n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join campaign_group\n on campaign.campaign_group_id = campaign_group.campaign_group_id\n and campaign.source_relation = campaign_group.source_relation\n left join account \n on campaign.account_id = account.account_id\n and campaign.source_relation = account.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31\n\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.linkedin_ads__monthly_campaign_country_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "linkedin_ads__monthly_campaign_country_report", "resource_type": "model", "package_name": "linkedin", "path": "linkedin_ads__monthly_campaign_country_report.sql", "original_file_path": "models/linkedin_ads__monthly_campaign_country_report.sql", "unique_id": "model.linkedin.linkedin_ads__monthly_campaign_country_report", "fqn": ["linkedin", "linkedin_ads__monthly_campaign_country_report"], "alias": "linkedin_ads__monthly_campaign_country_report", "checksum": {"name": "sha256", "checksum": "f101c7eb060e5d296a9ceaf70fa5646a5f13e85f5acf1d35253b46d2d9f61327"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the monthly performance of a campaign at the country level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}, "account_name": {"name": "account_name", "description": "A label for the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "Unique internal ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_month": {"name": "date_month", "description": "The month of the activity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country_name": {"name": "country_name", "description": "Name of the country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost": {"name": "cost", "description": "The cost of the ads in the local currency or USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_name": {"name": "campaign_group_name", "description": "A label for the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_id": {"name": "campaign_group_id", "description": "Unique internal ID representing the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "A label for the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Unique internal ID representing the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_status": {"name": "campaign_group_status", "description": "Status of campaign's campaign group. Possible values are: ACTIVE - Denotes that the campaign group is capable of serving ads, subject to run date and budget limitations (as well as any other limitations at the account or campaign level). ARCHIVED - Denotes that the campaign group is presently inactive, and should mostly be hidden in the UI until un-archived. CANCELLED - Denotes that the campaign group has been permanently canceled and cannot be reactivated. Not a settable status. DRAFT - Denotes that the campaign group is in a preliminary state and should temporarily not be served. PAUSED - Denotes that the campaign group meets all requirements to be served, but temporarily should not be. PENDING_DELETION - Denotes that the campaign group has been requested to be deleted that is currently pending. REMOVED - Denoted that the campaign group was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_at": {"name": "last_modified_at", "description": "The timestamp of when the version was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp of when the campaign was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "version_tag": {"name": "version_tag", "description": "An integer representation of the version of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_audience_expansion_enabled": {"name": "is_audience_expansion_enabled", "description": "Boolean (default=false) representing whether Audience Expansion is enabled for the campaign provides query expansion for certain targeting criteria.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_type": {"name": "cost_type", "description": "CPM - Cost per thousand advertising impressions. If type=SPONSORED_INMAILS; cost per send(CPS) is measured as CPM x 1000.\nCPC- Cost per individual click on the associated link.\nCPV- Cost per view for video ads.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_selection": {"name": "creative_selection", "description": "ROUND_ROBIN - Rotate through available creatives to serve them as evenly as possible.\nOPTIMIZED (default) - Bias selection taking into account such as expected performance. Not available for Message and Conversation Ads (type=SPONSORED_INMAILS).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_amount": {"name": "daily_budget_amount", "description": "Maximum amount to spend per day UTC. The amount of money as a real number string.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_currency_code": {"name": "daily_budget_currency_code", "description": "ISO currency code. The currency must match that of the parent account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "format": {"name": "format", "description": "The ad format on the campaign level. See https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads/campaign-formats?view=li-lms-2022-07", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_locale_country": {"name": "campaign_locale_country", "description": "Locale of the campaign. An uppercase two-letter country code as defined by ISO-3166.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_locale_language": {"name": "campaign_locale_language", "description": "Locale of the campaign. A lowercase two-letter language code as defined by ISO-639.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective_type": {"name": "objective_type", "description": "Campaign Objective type values. Click [here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ad-budget-pricing-type-combinations?view=li-lms-2022-07) for Campaign Objective descriptions. One of: - BRAND_AWARENESS - ENGAGEMENT - JOB_APPLICANTS - LEAD_GENERATION - WEBSITE_CONVERSIONS - WEBSITE_VISITS - VIDEO_VIEWS\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_offsite_delivery_enabled": {"name": "is_offsite_delivery_enabled", "description": "Boolean indicating if this campaign to allowed to be served on the LinkedIn Audience Network to extend the reach of your campaign by delivering ads beyond the LinkedIn feed to members on third-party apps and sites.\t(default will be \"True\" from June 30, 2022)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "optimization_target_type": {"name": "optimization_target_type", "description": "Determines how this campaign is optimized for spending. If this is not set, there is no optimization. Refer to the documentation here. Default = 'NONE'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_start_at": {"name": "run_schedule_start_at", "description": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the inclusive (greater than or equal to) value in which to start the range.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_end_at": {"name": "run_schedule_end_at", "description": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the exclusive (strictly less than) value in which to end the range, if provided.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "ACTIVE - Denotes that the campaign is fully servable.\nPAUSED - Denotes that the campaign meets all requirements to be served, but temporarily should not be.\nARCHIVED - Denotes that the campaign is presently inactive, and should mostly be hidden in the UI until un-archived.\nCOMPLETED - Denotes that the campaign has reached a specified budgetary or chronological limit.\nCANCELED - Denotes that the campaign has been permanently canceled, such as when an advertising account is permanently closed.\nDRAFT - Denotes that the campaign is still being edited and not eligible for serving. Some validation will be postponed until the campaign is activated.\nPENDING_DELETION - Denotes that the campaign has been requested to be deleted that is currently pending.\nREMOVED - Denotes that the campaign was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_type": {"name": "campaign_type", "description": "TEXT_AD - Text-based ads that show up in the right column or top of the page on LinkedIn.\nSPONSORED_UPDATES - Native ads that promote a company's content updates in the LinkedIn feed.\nSPONSORED_INMAILS - Personalized messages with a call-to-action button delivered to a LinkedIn's member inbox.\nDYNAMIC - Ads that are dynamically personalized.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "unit_cost_amount": {"name": "unit_cost_amount", "description": "This value is used as one of the following: amount to bid (for manual bidding), amount which is the target cost (for target cost bidding) per click, impression, or other event depending on the pricing model, or cost cap (for cost cap bidding). The amount of money as a real number string. The amount should be non-negative if the bidding strategy is manual, target cost, or cost cap bidding. The default is 0 with the currency code set to match that of the associated account.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "unit_cost_currency_code": {"name": "unit_cost_currency_code", "description": "Amount to bid per click, impression, or other event depending on the pricing model. The default is 0 with the currency code set to match that of the associated account. ISO currency code.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_currency": {"name": "account_currency", "description": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency, on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "The total conversions being brought in the conversion fields you select in your `linkedin_ads__conversion_fields`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.723459, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__monthly_campaign_country_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__linkedin_ads_enabled','linkedin_ads__using_geo','linkedin_ads__using_monthly_ad_analytics_by_member_country'])) }}\n\nwith campaign as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_history') }}\n where is_latest_version\n),\n\ncampaign_group as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_group_history') }}\n where is_latest_version\n),\n\naccount as (\n\n select *\n from {{ ref('stg_linkedin_ads__account_history') }}\n where is_latest_version\n),\n\ngeo as (\n\n select *\n from {{ ref('stg_linkedin_ads__geo') }}\n),\n\nreport as (\n\n select *,\n {% if var('linkedin_ads__conversion_fields', none) %}\n {{ var('linkedin_ads__conversion_fields') | join(' + ') }} as total_conversions\n {% else %}\n 0 as total_conversions\n {% endif %}\n from {{ ref('stg_linkedin_ads__monthly_ad_analytics_by_country') }}\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_month,\n geo.value as country_name,\n report.campaign_id,\n campaign.campaign_name,\n campaign.version_tag,\n campaign_group.campaign_group_id,\n campaign_group.campaign_group_name,\n account.account_id,\n account.account_name,\n campaign.status as campaign_status,\n campaign_group.status as campaign_group_status,\n campaign.type as campaign_type,\n campaign.cost_type,\n campaign.creative_selection,\n campaign.daily_budget_amount,\n campaign.daily_budget_currency_code,\n campaign.unit_cost_amount,\n campaign.unit_cost_currency_code,\n account.currency as account_currency,\n campaign.format,\n campaign.locale_country as campaign_locale_country,\n campaign.locale_language as campaign_locale_language,\n campaign.objective_type,\n campaign.optimization_target_type,\n campaign.is_audience_expansion_enabled,\n campaign.is_offsite_delivery_enabled,\n campaign.run_schedule_start_at,\n campaign.run_schedule_end_at,\n campaign.last_modified_at,\n campaign.created_at,\n sum(report.total_conversions) as total_conversions,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.cost) as cost,\n sum(coalesce(report.conversion_value_in_local_currency, 0)) as conversion_value_in_local_currency\n\n {{ linkedin_ads_persist_pass_through_columns(pass_through_variable='linkedin_ads__conversion_fields', transform='sum', coalesce_with=0) }}\n \n {{ linkedin_ads_persist_pass_through_columns(pass_through_variable='linkedin_ads__monthly_ad_analytics_by_member_country_passthrough_metrics', transform='sum') }}\n\n from report \n left join geo\n on geo.geo_id = report.member_country_geo_id\n and report.source_relation = report.source_relation\n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join campaign_group\n on campaign.campaign_group_id = campaign_group.campaign_group_id\n and campaign.source_relation = campaign_group.source_relation\n left join account \n on campaign.account_id = account.account_id\n and campaign.source_relation = account.source_relation\n\n {{ dbt_utils.group_by(31) }}\n\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__campaign_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__campaign_group_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__account_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__geo", "package": null, "version": null}, {"name": "stg_linkedin_ads__monthly_ad_analytics_by_country", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.linkedin.linkedin_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.linkedin.stg_linkedin_ads__campaign_history", "model.linkedin.stg_linkedin_ads__campaign_group_history", "model.linkedin.stg_linkedin_ads__account_history", "model.linkedin.stg_linkedin_ads__geo", "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country"]}, "compiled_path": "target/compiled/linkedin/models/linkedin_ads__monthly_campaign_country_report.sql", "compiled": true, "compiled_code": "\n\nwith campaign as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_history\"\n where is_latest_version\n),\n\ncampaign_group as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_group_history\"\n where is_latest_version\n),\n\naccount as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__account_history\"\n where is_latest_version\n),\n\ngeo as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__geo\"\n),\n\nreport as (\n\n select *,\n \n external_website_conversions + one_click_leads as total_conversions\n \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__monthly_ad_analytics_by_country\"\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_month,\n geo.value as country_name,\n report.campaign_id,\n campaign.campaign_name,\n campaign.version_tag,\n campaign_group.campaign_group_id,\n campaign_group.campaign_group_name,\n account.account_id,\n account.account_name,\n campaign.status as campaign_status,\n campaign_group.status as campaign_group_status,\n campaign.type as campaign_type,\n campaign.cost_type,\n campaign.creative_selection,\n campaign.daily_budget_amount,\n campaign.daily_budget_currency_code,\n campaign.unit_cost_amount,\n campaign.unit_cost_currency_code,\n account.currency as account_currency,\n campaign.format,\n campaign.locale_country as campaign_locale_country,\n campaign.locale_language as campaign_locale_language,\n campaign.objective_type,\n campaign.optimization_target_type,\n campaign.is_audience_expansion_enabled,\n campaign.is_offsite_delivery_enabled,\n campaign.run_schedule_start_at,\n campaign.run_schedule_end_at,\n campaign.last_modified_at,\n campaign.created_at,\n sum(report.total_conversions) as total_conversions,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.cost) as cost,\n sum(coalesce(report.conversion_value_in_local_currency, 0)) as conversion_value_in_local_currency\n\n \n\n\n\n\n\n\n\n \n \n \n \n , sum(coalesce(external_website_conversions, 0)) as external_website_conversions\n \n\n \n \n \n \n , sum(coalesce(one_click_leads, 0)) as one_click_leads\n \n\n \n\n\n\n \n \n\n\n\n\n\n\n\n\n\n\n from report \n left join geo\n on geo.geo_id = report.member_country_geo_id\n and report.source_relation = report.source_relation\n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join campaign_group\n on campaign.campaign_group_id = campaign_group.campaign_group_id\n and campaign.source_relation = campaign_group.source_relation\n left join account \n on campaign.account_id = account.account_id\n and campaign.source_relation = account.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31\n\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.linkedin_ads__account_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "linkedin_ads__account_report", "resource_type": "model", "package_name": "linkedin", "path": "linkedin_ads__account_report.sql", "original_file_path": "models/linkedin_ads__account_report.sql", "unique_id": "model.linkedin.linkedin_ads__account_report", "fqn": ["linkedin", "linkedin_ads__account_report"], "alias": "linkedin_ads__account_report", "checksum": {"name": "sha256", "checksum": "7a41431883d88c0a39ba361aed8802d1c9111e356f2897d83b474a497496d6da"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the account level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}, "account_name": {"name": "account_name", "description": "A label for the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "Unique internal ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The day of the activity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost": {"name": "cost", "description": "The cost of the ads in the local currency or USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_at": {"name": "last_modified_at", "description": "The timestamp of when the version was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp of when the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "version_tag": {"name": "version_tag", "description": "An integer representation of the version of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "ACTIVE - Account is active; this is the default state\nCANCELLED - Account has been permanently cancelled\nDRAFT - Account is in draft status, meaning it's not yet fully set up and it is not serving\nPENDING_DELETION - Denotes that the account has been requested to be deleted that is currently pending\nREMOVED - Denotes that the account was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "type": {"name": "type", "description": "BUSINESS - This is the only value allowed when creating accounts through the API.\nENTERPRISE - This value cannot be used to create accounts through the API and is reserved for accounts created by LinkedIn's internal ad operations systems.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency, on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "The total conversions being brought in the conversion fields you select in your `linkedin_ads__conversion_fields`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.700791, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__account_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\nwith account as (\n\n select *\n from {{ ref('stg_linkedin_ads__account_history') }}\n where is_latest_version\n),\n\ncampaign as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_history') }}\n where is_latest_version\n),\n\nreport as (\n\n select *,\n {% if var('linkedin_ads__conversion_fields', none) %}\n {{ var('linkedin_ads__conversion_fields') | join(' + ') }} as total_conversions\n {% else %}\n 0 as total_conversions\n {% endif %}\n from {{ ref('stg_linkedin_ads__ad_analytics_by_campaign') }}\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n account.account_id,\n account.account_name,\n account.version_tag,\n account.currency,\n account.status,\n account.type,\n account.last_modified_at,\n account.created_at,\n sum(report.total_conversions) as total_conversions,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.cost) as cost,\n sum(coalesce(report.conversion_value_in_local_currency, 0)) as conversion_value_in_local_currency\n\n {{ linkedin_ads_persist_pass_through_columns(pass_through_variable='linkedin_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='linkedin_ads__campaign_passthrough_metrics', exclude_fields=['conversion_value_in_local_currency']) }}\n \n {{ linkedin_ads_persist_pass_through_columns(pass_through_variable='linkedin_ads__campaign_passthrough_metrics', transform='sum', exclude_fields=['conversion_value_in_local_currency']) }}\n\n from report \n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join account \n on campaign.account_id = account.account_id\n and campaign.source_relation = account.source_relation\n\n {{ dbt_utils.group_by(10) }}\n\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__account_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__campaign_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__ad_analytics_by_campaign", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.linkedin.linkedin_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.linkedin.stg_linkedin_ads__account_history", "model.linkedin.stg_linkedin_ads__campaign_history", "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign"]}, "compiled_path": "target/compiled/linkedin/models/linkedin_ads__account_report.sql", "compiled": true, "compiled_code": "\n\nwith account as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__account_history\"\n where is_latest_version\n),\n\ncampaign as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_history\"\n where is_latest_version\n),\n\nreport as (\n\n select *,\n \n external_website_conversions + one_click_leads as total_conversions\n \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_campaign\"\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n account.account_id,\n account.account_name,\n account.version_tag,\n account.currency,\n account.status,\n account.type,\n account.last_modified_at,\n account.created_at,\n sum(report.total_conversions) as total_conversions,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.cost) as cost,\n sum(coalesce(report.conversion_value_in_local_currency, 0)) as conversion_value_in_local_currency\n\n \n\n\n\n \n \n\n\n\n \n\n\n\n \n \n \n \n , sum(coalesce(external_website_conversions, 0)) as external_website_conversions\n \n\n \n \n \n \n , sum(coalesce(one_click_leads, 0)) as one_click_leads\n \n\n \n\n\n\n \n \n\n\n\n\n\n \n\n\n\n\n\n\n from report \n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join account \n on campaign.account_id = account.account_id\n and campaign.source_relation = account.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10\n\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.linkedin_ads__campaign_group_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "linkedin_ads__campaign_group_report", "resource_type": "model", "package_name": "linkedin", "path": "linkedin_ads__campaign_group_report.sql", "original_file_path": "models/linkedin_ads__campaign_group_report.sql", "unique_id": "model.linkedin.linkedin_ads__campaign_group_report", "fqn": ["linkedin", "linkedin_ads__campaign_group_report"], "alias": "linkedin_ads__campaign_group_report", "checksum": {"name": "sha256", "checksum": "6779ecaffd04d2f0d0bb9d8de21809f90a53ed6d8e9d0b5a481e1b4d99c125f2"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the campaign group level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}, "account_name": {"name": "account_name", "description": "A label for the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "Unique internal ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The day of the activity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost": {"name": "cost", "description": "The cost of the ads in the local currency or USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_name": {"name": "campaign_group_name", "description": "A label for the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_id": {"name": "campaign_group_id", "description": "Unique internal ID representing the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_at": {"name": "last_modified_at", "description": "The timestamp of when the version was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp of when the campaign group was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_backfilled": {"name": "is_backfilled", "description": "Flag that denotes whether the campaign group was created organically or to backfill existing campaigns. This is a read-only field set by the system. Default = false.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_start_at": {"name": "run_schedule_start_at", "description": "Represents the inclusive (greater than or equal to) date when to start running the associated campaigns under this campaign group. This field is required.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_end_at": {"name": "run_schedule_end_at", "description": "Represents the exclusive (strictly less than) date when to stop running the associated campaigns under this campaign group. If this field is unset, it indicates an open range with no end date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Status of campaign group. Possible values are: ACTIVE - Denotes that the campaign group is capable of serving ads, subject to run date and budget limitations (as well as any other limitations at the account or campaign level). ARCHIVED - Denotes that the campaign group is presently inactive, and should mostly be hidden in the UI until un-archived. CANCELLED - Denotes that the campaign group has been permanently canceled and cannot be reactivated. Not a settable status. DRAFT - Denotes that the campaign group is in a preliminary state and should temporarily not be served. PAUSED - Denotes that the campaign group meets all requirements to be served, but temporarily should not be. PENDING_DELETION - Denotes that the campaign group has been requested to be deleted that is currently pending. REMOVED - Denoted that the campaign group was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency, on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "The total conversions being brought in the conversion fields you select in your `linkedin_ads__conversion_fields`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.7116814, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__campaign_group_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\nwith campaign_group as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_group_history') }}\n where is_latest_version\n),\n\ncampaign as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_history') }}\n where is_latest_version\n),\n\naccount as (\n\n select *\n from {{ ref('stg_linkedin_ads__account_history') }}\n where is_latest_version\n),\n\nreport as (\n\n select *,\n {% if var('linkedin_ads__conversion_fields', none) %}\n {{ var('linkedin_ads__conversion_fields') | join(' + ') }} as total_conversions\n {% else %}\n 0 as total_conversions\n {% endif %}\n from {{ ref('stg_linkedin_ads__ad_analytics_by_campaign') }}\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n campaign_group.campaign_group_id,\n campaign_group.campaign_group_name,\n account.account_id,\n account.account_name,\n campaign_group.status,\n account.currency,\n campaign_group.is_backfilled,\n campaign_group.run_schedule_start_at,\n campaign_group.run_schedule_end_at,\n campaign_group.last_modified_at,\n campaign_group.created_at,\n sum(report.total_conversions) as total_conversions,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.cost) as cost,\n sum(coalesce(report.conversion_value_in_local_currency, 0)) as conversion_value_in_local_currency\n\n {{ linkedin_ads_persist_pass_through_columns(pass_through_variable='linkedin_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='linkedin_ads__campaign_passthrough_metrics', exclude_fields=['conversion_value_in_local_currency']) }}\n\n {{ linkedin_ads_persist_pass_through_columns(pass_through_variable='linkedin_ads__campaign_passthrough_metrics', transform='sum', exclude_fields=['conversion_value_in_local_currency']) }}\n\n from report \n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join campaign_group\n on campaign.campaign_group_id = campaign_group.campaign_group_id\n and campaign.source_relation = campaign_group.source_relation\n left join account \n on campaign.account_id = account.account_id\n and campaign.source_relation = account.source_relation\n\n {{ dbt_utils.group_by(13) }}\n\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__campaign_group_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__campaign_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__account_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__ad_analytics_by_campaign", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.linkedin.linkedin_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.linkedin.stg_linkedin_ads__campaign_group_history", "model.linkedin.stg_linkedin_ads__campaign_history", "model.linkedin.stg_linkedin_ads__account_history", "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign"]}, "compiled_path": "target/compiled/linkedin/models/linkedin_ads__campaign_group_report.sql", "compiled": true, "compiled_code": "\n\nwith campaign_group as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_group_history\"\n where is_latest_version\n),\n\ncampaign as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_history\"\n where is_latest_version\n),\n\naccount as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__account_history\"\n where is_latest_version\n),\n\nreport as (\n\n select *,\n \n external_website_conversions + one_click_leads as total_conversions\n \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_campaign\"\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n campaign_group.campaign_group_id,\n campaign_group.campaign_group_name,\n account.account_id,\n account.account_name,\n campaign_group.status,\n account.currency,\n campaign_group.is_backfilled,\n campaign_group.run_schedule_start_at,\n campaign_group.run_schedule_end_at,\n campaign_group.last_modified_at,\n campaign_group.created_at,\n sum(report.total_conversions) as total_conversions,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.cost) as cost,\n sum(coalesce(report.conversion_value_in_local_currency, 0)) as conversion_value_in_local_currency\n\n \n\n\n\n \n \n\n\n\n \n\n\n\n \n \n \n \n , sum(coalesce(external_website_conversions, 0)) as external_website_conversions\n \n\n \n \n \n \n , sum(coalesce(one_click_leads, 0)) as one_click_leads\n \n\n \n\n\n\n\n \n\n\n\n\n\n \n\n\n\n\n\n\n from report \n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join campaign_group\n on campaign.campaign_group_id = campaign_group.campaign_group_id\n and campaign.source_relation = campaign_group.source_relation\n left join account \n on campaign.account_id = account.account_id\n and campaign.source_relation = account.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13\n\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.linkedin_ads__url_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "linkedin_ads__url_report", "resource_type": "model", "package_name": "linkedin", "path": "linkedin_ads__url_report.sql", "original_file_path": "models/linkedin_ads__url_report.sql", "unique_id": "model.linkedin.linkedin_ads__url_report", "fqn": ["linkedin", "linkedin_ads__url_report"], "alias": "linkedin_ads__url_report", "checksum": {"name": "sha256", "checksum": "8e023b4ed38d8a2914262e47ea0bcb43312398adbab36df8774dd7eecef77b7d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the url level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}, "account_name": {"name": "account_name", "description": "A label for the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "Unique internal ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The day of the activity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost": {"name": "cost", "description": "The cost of the ads in the local currency or USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_name": {"name": "campaign_group_name", "description": "A label for the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_id": {"name": "campaign_group_id", "description": "Unique internal ID representing the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_id": {"name": "creative_id", "description": "Unique internal ID representing the creative.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_uri": {"name": "click_uri", "description": "The URL where the member should be redirected to, on clicking the text ad or spotlight ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_uri_type": {"name": "click_uri_type", "description": "Will either be `text_ad`, `spotlight`, or `null` to indicate the origin of the click_uri.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_host": {"name": "url_host", "description": "The URL host of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_path": {"name": "url_path", "description": "The URL path of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_source": {"name": "utm_source", "description": "The utm_source parameter of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_medium": {"name": "utm_medium", "description": "The utm_medium parameter of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_campaign": {"name": "utm_campaign", "description": "The utm_campaign parameter of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_content": {"name": "utm_content", "description": "The utm_content parameter of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_term": {"name": "utm_term", "description": "The utm_term parameter of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "A label for the creative's campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Unique internal ID representing the creative's campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency, on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "The total conversions being brought in the conversion fields you select in your `linkedin_ads__conversion_fields`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.719274, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__url_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\nwith creative as (\n\n select *\n from {{ ref('stg_linkedin_ads__creative_history') }}\n where is_latest_version\n),\n\ncampaign as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_history') }}\n where is_latest_version\n),\n\ncampaign_group as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_group_history') }}\n where is_latest_version\n),\n\naccount as (\n\n select *\n from {{ ref('stg_linkedin_ads__account_history') }}\n where is_latest_version\n),\n\nreport as (\n\n select *,\n {% if var('linkedin_ads__conversion_fields', none) %}\n {{ var('linkedin_ads__conversion_fields') | join(' + ') }} as total_conversions\n {% else %}\n 0 as total_conversions\n {% endif %}\n from {{ ref('stg_linkedin_ads__ad_analytics_by_creative') }}\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n creative.click_uri,\n creative.click_uri_type,\n creative.base_url,\n creative.url_host,\n creative.url_path,\n creative.utm_source,\n creative.utm_medium,\n creative.utm_campaign,\n creative.utm_content,\n creative.utm_term,\n report.creative_id,\n campaign.campaign_id,\n campaign.campaign_name,\n campaign_group.campaign_group_id,\n campaign_group.campaign_group_name,\n account.account_id,\n account.account_name,\n account.currency,\n sum(report.total_conversions) as total_conversions,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.cost) as cost,\n sum(coalesce(report.conversion_value_in_local_currency, 0)) as conversion_value_in_local_currency\n\n {{ linkedin_ads_persist_pass_through_columns(pass_through_variable='linkedin_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='linkedin_ads__creative_passthrough_metrics', exclude_fields=['conversion_value_in_local_currency']) }}\n\n {{ linkedin_ads_persist_pass_through_columns(pass_through_variable='linkedin_ads__creative_passthrough_metrics', transform='sum', exclude_fields=['conversion_value_in_local_currency']) }}\n\n from report \n left join creative \n on report.creative_id = creative.creative_id\n and report.source_relation = creative.source_relation\n left join campaign \n on creative.campaign_id = campaign.campaign_id\n and creative.source_relation = campaign.source_relation\n left join campaign_group\n on campaign.campaign_group_id = campaign_group.campaign_group_id\n and campaign.source_relation = campaign_group.source_relation\n left join account \n on campaign.account_id = account.account_id\n and campaign.source_relation = account.source_relation\n\n {% if var('ad_reporting__url_report__using_null_filter', True) %}\n where creative.click_uri is not null\n {% endif %}\n\n {{ dbt_utils.group_by(20) }}\n\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__creative_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__campaign_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__campaign_group_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__account_history", "package": null, "version": null}, {"name": "stg_linkedin_ads__ad_analytics_by_creative", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.linkedin.linkedin_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.linkedin.stg_linkedin_ads__creative_history", "model.linkedin.stg_linkedin_ads__campaign_history", "model.linkedin.stg_linkedin_ads__campaign_group_history", "model.linkedin.stg_linkedin_ads__account_history", "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative"]}, "compiled_path": "target/compiled/linkedin/models/linkedin_ads__url_report.sql", "compiled": true, "compiled_code": "\n\nwith creative as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__creative_history\"\n where is_latest_version\n),\n\ncampaign as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_history\"\n where is_latest_version\n),\n\ncampaign_group as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_group_history\"\n where is_latest_version\n),\n\naccount as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__account_history\"\n where is_latest_version\n),\n\nreport as (\n\n select *,\n \n external_website_conversions + one_click_leads as total_conversions\n \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_creative\"\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n creative.click_uri,\n creative.click_uri_type,\n creative.base_url,\n creative.url_host,\n creative.url_path,\n creative.utm_source,\n creative.utm_medium,\n creative.utm_campaign,\n creative.utm_content,\n creative.utm_term,\n report.creative_id,\n campaign.campaign_id,\n campaign.campaign_name,\n campaign_group.campaign_group_id,\n campaign_group.campaign_group_name,\n account.account_id,\n account.account_name,\n account.currency,\n sum(report.total_conversions) as total_conversions,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.cost) as cost,\n sum(coalesce(report.conversion_value_in_local_currency, 0)) as conversion_value_in_local_currency\n\n \n\n\n\n \n \n\n\n\n \n\n\n\n \n \n \n \n , sum(coalesce(external_website_conversions, 0)) as external_website_conversions\n \n\n \n \n \n \n , sum(coalesce(one_click_leads, 0)) as one_click_leads\n \n\n \n\n\n\n\n \n\n\n\n\n\n \n\n\n\n\n\n\n from report \n left join creative \n on report.creative_id = creative.creative_id\n and report.source_relation = creative.source_relation\n left join campaign \n on creative.campaign_id = campaign.campaign_id\n and creative.source_relation = campaign.source_relation\n left join campaign_group\n on campaign.campaign_group_id = campaign_group.campaign_group_id\n and campaign.source_relation = campaign_group.source_relation\n left join account \n on campaign.account_id = account.account_id\n and campaign.source_relation = account.source_relation\n\n \n where creative.click_uri is not null\n \n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20\n\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__geo": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__geo", "resource_type": "model", "package_name": "linkedin", "path": "staging/stg_linkedin_ads__geo.sql", "original_file_path": "models/staging/stg_linkedin_ads__geo.sql", "unique_id": "model.linkedin.stg_linkedin_ads__geo", "fqn": ["linkedin", "staging", "stg_linkedin_ads__geo"], "alias": "stg_linkedin_ads__geo", "checksum": {"name": "sha256", "checksum": "1221c12cde0473dad3e0c17877ace55b91e7799d52d957ecc56a01029f5bc0a4"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Contains geographic data for LinkedIn Ads, including IDs and names of locations.", "columns": {"geo_id": {"name": "geo_id", "description": "Unique identifier for the geographic entity, used for joins in reporting tables.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "value": {"name": "value", "description": "Name of the geographic entity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/staging/stg_linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.8478909, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__geo\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__linkedin_ads_enabled','linkedin_ads__using_geo'])) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_linkedin_ads__geo_tmp') }}\n),\n\nmacro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_linkedin_ads__geo_tmp')),\n staging_columns=get_geo_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='linkedin_ads') }}\n\n from base\n),\n\nfields as (\n \n select \n source_relation,\n id as geo_id,\n value\n from macro\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__geo_tmp", "package": null, "version": null}, {"name": "stg_linkedin_ads__geo_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.linkedin.get_geo_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.linkedin.stg_linkedin_ads__geo_tmp"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin_ads__geo.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__geo_tmp\"\n),\n\nmacro as (\n\n select\n \n id as id,\n value as value\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfields as (\n \n select \n source_relation,\n id as geo_id,\n value\n from macro\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__account_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__account_history", "resource_type": "model", "package_name": "linkedin", "path": "staging/stg_linkedin_ads__account_history.sql", "original_file_path": "models/staging/stg_linkedin_ads__account_history.sql", "unique_id": "model.linkedin.stg_linkedin_ads__account_history", "fqn": ["linkedin", "staging", "stg_linkedin_ads__account_history"], "alias": "stg_linkedin_ads__account_history", "checksum": {"name": "sha256", "checksum": "aec5ac772fcfb96cf146e71d9bee6e5c4ad90cdf6594de9464a26205f63fa627"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a 'version' of an account.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}, "account_id": {"name": "account_id", "description": "Unique internal ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_at": {"name": "last_modified_at", "description": "The timestamp of when the version was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp of when the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "A label for the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "version_tag": {"name": "version_tag", "description": "An integer representation of the version of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "ACTIVE - Account is active; this is the default state\nCANCELLED - Account has been permanently cancelled\nDRAFT - Account is in draft status, meaning it's not yet fully set up and it is not serving\nPENDING_DELETION - Denotes that the account has been requested to be deleted that is currently pending\nREMOVED - Denotes that the account was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "type": {"name": "type", "description": "BUSINESS - This is the only value allowed when creating accounts through the API.\nENTERPRISE - This value cannot be used to create accounts through the API and is reserved for accounts created by LinkedIn's internal ad operations systems.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_latest_version": {"name": "is_latest_version", "description": "Boolean of whether the record is the latest version of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/staging/stg_linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.8465278, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__account_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_linkedin_ads__account_history_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_linkedin_ads__account_history_tmp')),\n staging_columns=get_account_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='linkedin_ads') }}\n\n from base\n\n), fields as (\n\n select \n source_relation,\n id as account_id,\n name as account_name,\n currency,\n cast(version_tag as numeric) as version_tag,\n status,\n type,\n cast(last_modified_time as {{ dbt.type_timestamp() }}) as last_modified_at,\n cast(created_time as {{ dbt.type_timestamp() }}) as created_at,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='linkedin_ads') }} order by last_modified_time desc) = 1 as is_latest_version\n\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__account_history_tmp", "package": null, "version": null}, {"name": "stg_linkedin_ads__account_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.linkedin.get_account_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.linkedin.stg_linkedin_ads__account_history_tmp"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin_ads__account_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__account_history_tmp\"\n\n), macro as (\n\n select\n \n created_time as created_time,\n currency as currency,\n id as id,\n last_modified_time as last_modified_time,\n name as name,\n cast(null as TEXT) as status,\n cast(null as TEXT) as type,\n version_tag as version_tag\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n\n), fields as (\n\n select \n source_relation,\n id as account_id,\n name as account_name,\n currency,\n cast(version_tag as numeric) as version_tag,\n status,\n type,\n cast(last_modified_time as timestamp) as last_modified_at,\n cast(created_time as timestamp) as created_at,\n row_number() over (partition by id order by last_modified_time desc) = 1 as is_latest_version\n\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__ad_analytics_by_creative", "resource_type": "model", "package_name": "linkedin", "path": "staging/stg_linkedin_ads__ad_analytics_by_creative.sql", "original_file_path": "models/staging/stg_linkedin_ads__ad_analytics_by_creative.sql", "unique_id": "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative", "fqn": ["linkedin", "staging", "stg_linkedin_ads__ad_analytics_by_creative"], "alias": "stg_linkedin_ads__ad_analytics_by_creative", "checksum": {"name": "sha256", "checksum": "258989351017d31f229836fda56eb8122d48e1212fc0b544b3863af53c938c57"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the creative level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}, "creative_id": {"name": "creative_id", "description": "The ID of the related creative.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The day of the activity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost": {"name": "cost", "description": "The cost of the ads in the local currency or USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/staging/stg_linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.8396897, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_creative\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_linkedin_ads__ad_analytics_by_creative_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_linkedin_ads__ad_analytics_by_creative_tmp')),\n staging_columns=get_ad_analytics_by_creative_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='linkedin_ads') }}\n\n from base\n\n), fields as (\n\n select\n source_relation,\n {{ dbt.date_trunc('day', 'day') }} as date_day,\n creative_id,\n clicks, \n impressions,\n {% if var('linkedin_ads__use_local_currency', false) %}\n cost_in_local_currency as cost,\n {% else %}\n cost_in_usd as cost,\n {% endif %}\n\n coalesce(cast(conversion_value_in_local_currency as {{ dbt.type_float() }}), 0) as conversion_value_in_local_currency\n\n {% for conversion in var('linkedin_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {{ linkedin_ads_fill_pass_through_columns(pass_through_fields=var('linkedin_ads__creative_passthrough_metrics'), except=(var('linkedin_ads__conversion_fields') + ['conversion_value_in_local_currency'])) }}\n\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__ad_analytics_by_creative_tmp", "package": null, "version": null}, {"name": "stg_linkedin_ads__ad_analytics_by_creative_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.linkedin.get_ad_analytics_by_creative_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.date_trunc", "macro.dbt.type_float", "macro.dbt.type_bigint", "macro.linkedin.linkedin_ads_fill_pass_through_columns"], "nodes": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_creative_tmp"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin_ads__ad_analytics_by_creative.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_creative_tmp\"\n\n), macro as (\n\n select\n \n clicks as clicks,\n cost_in_local_currency as cost_in_local_currency,\n cost_in_usd as cost_in_usd,\n creative_id as creative_id,\n day as day,\n impressions as impressions,\n conversion_value_in_local_currency as conversion_value_in_local_currency,\n external_website_conversions as external_website_conversions,\n one_click_leads as one_click_leads\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n\n), fields as (\n\n select\n source_relation,\n date_trunc('day', day) as date_day,\n creative_id,\n clicks, \n impressions,\n \n cost_in_usd as cost,\n \n\n coalesce(cast(conversion_value_in_local_currency as float), 0) as conversion_value_in_local_currency\n\n \n , coalesce(cast(external_website_conversions as bigint), 0) as external_website_conversions\n \n , coalesce(cast(one_click_leads as bigint), 0) as one_click_leads\n \n\n \n\n\n\n\n\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__monthly_ad_analytics_by_country", "resource_type": "model", "package_name": "linkedin", "path": "staging/stg_linkedin_ads__monthly_ad_analytics_by_country.sql", "original_file_path": "models/staging/stg_linkedin_ads__monthly_ad_analytics_by_country.sql", "unique_id": "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country", "fqn": ["linkedin", "staging", "stg_linkedin_ads__monthly_ad_analytics_by_country"], "alias": "stg_linkedin_ads__monthly_ad_analytics_by_country", "checksum": {"name": "sha256", "checksum": "6800a7412b3c37a568dda7d759a63a685f06fd9ed83b8051de2c122b5b493cac"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Monthly LinkedIn Ads performance metrics aggregated by member country and campaign.", "columns": {"campaign_id": {"name": "campaign_id", "description": "Identifier of the LinkedIn Ads campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_month": {"name": "date_month", "description": "Month of the reporting data, aliased as `date_month`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "member_country_geo_id": {"name": "member_country_geo_id", "description": "ID representing the country of the LinkedIn members who interacted with the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost": {"name": "cost", "description": "The cost of the ads in the local currency or USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/staging/stg_linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.8493237, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__monthly_ad_analytics_by_country\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__linkedin_ads_enabled','linkedin_ads__using_monthly_ad_analytics_by_member_country'])) }}\n\n\nwith base as (\n\n select * \n from {{ ref('stg_linkedin_ads__monthly_ad_analytics_by_country_tmp') }}\n),\n\nmacro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_linkedin_ads__monthly_ad_analytics_by_country_tmp')),\n staging_columns=get_monthly_ad_analytics_by_member_country_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='linkedin_ads') }}\n\n from base\n),\n\nfields as (\n \n select \n source_relation,\n {{ linkedin.date_from_month_string('date_month') }} as date_month, --Renamed in macros/get_monthly_ad_analytics_by_member_country_columns to avoid reserved word error.\n campaign_id,\n member_country as member_country_geo_id,\n clicks,\n impressions,\n {% if var('linkedin_ads__use_local_currency', false) %}\n cost_in_local_currency as cost,\n {% else %}\n cost_in_usd as cost,\n {% endif %}\n\n coalesce(cast(conversion_value_in_local_currency as {{ dbt.type_float() }}), 0) as conversion_value_in_local_currency\n\n {% for conversion in var('linkedin_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {{ linkedin_ads_fill_pass_through_columns(pass_through_fields=var('linkedin_ads__monthly_ad_analytics_by_member_country_passthrough_metrics')) }}\n\n from macro\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__monthly_ad_analytics_by_country_tmp", "package": null, "version": null}, {"name": "stg_linkedin_ads__monthly_ad_analytics_by_country_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.linkedin.get_monthly_ad_analytics_by_member_country_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.linkedin.date_from_month_string", "macro.dbt.type_float", "macro.dbt.type_bigint", "macro.linkedin.linkedin_ads_fill_pass_through_columns"], "nodes": ["model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country_tmp"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin_ads__monthly_ad_analytics_by_country.sql", "compiled": true, "compiled_code": "\n\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__monthly_ad_analytics_by_country_tmp\"\n),\n\nmacro as (\n\n select\n \n campaign_id as campaign_id,\n month as date_month,\n clicks as clicks,\n member_country as member_country,\n impressions as impressions,\n conversion_value_in_local_currency as conversion_value_in_local_currency,\n cost_in_local_currency as cost_in_local_currency,\n cost_in_usd as cost_in_usd,\n cast(null as TEXT) as external_website_conversions,\n one_click_leads as one_click_leads\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfields as (\n \n select \n source_relation,\n \n to_date(\n split_part(date_month, '-', 1) || '-' || lpad(split_part(date_month, '-', 2), 2, '0') || '-01',\n 'YYYY-MM-DD'\n )\n as date_month, --Renamed in macros/get_monthly_ad_analytics_by_member_country_columns to avoid reserved word error.\n campaign_id,\n member_country as member_country_geo_id,\n clicks,\n impressions,\n \n cost_in_usd as cost,\n \n\n coalesce(cast(conversion_value_in_local_currency as float), 0) as conversion_value_in_local_currency\n\n \n , coalesce(cast(external_website_conversions as bigint), 0) as external_website_conversions\n \n , coalesce(cast(one_click_leads as bigint), 0) as one_click_leads\n \n\n \n\n\n\n\n\n from macro\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__campaign_group_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__campaign_group_history", "resource_type": "model", "package_name": "linkedin", "path": "staging/stg_linkedin_ads__campaign_group_history.sql", "original_file_path": "models/staging/stg_linkedin_ads__campaign_group_history.sql", "unique_id": "model.linkedin.stg_linkedin_ads__campaign_group_history", "fqn": ["linkedin", "staging", "stg_linkedin_ads__campaign_group_history"], "alias": "stg_linkedin_ads__campaign_group_history", "checksum": {"name": "sha256", "checksum": "85ab26909f26df04974f18915d71cb4983c525c726de25286f81dbe2f86df7b1"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a 'version' of a campaign group.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}, "campaign_group_id": {"name": "campaign_group_id", "description": "Unique internal ID representing the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_at": {"name": "last_modified_at", "description": "The timestamp of when the version was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the account the campaign group belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp of when the campaign group was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_name": {"name": "campaign_group_name", "description": "A label for the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_backfilled": {"name": "is_backfilled", "description": "Flag that denotes whether the campaign group was created organically or to backfill existing campaigns. This is a read-only field set by the system. Default = false.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_start_at": {"name": "run_schedule_start_at", "description": "Represents the inclusive (greater than or equal to) date when to start running the associated campaigns under this campaign group. This field is required.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_end_at": {"name": "run_schedule_end_at", "description": "Represents the exclusive (strictly less than) date when to stop running the associated campaigns under this campaign group. If this field is unset, it indicates an open range with no end date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Status of campaign group. Possible values are: ACTIVE - Denotes that the campaign group is capable of serving ads, subject to run date and budget limitations (as well as any other limitations at the account or campaign level). ARCHIVED - Denotes that the campaign group is presently inactive, and should mostly be hidden in the UI until un-archived. CANCELLED - Denotes that the campaign group has been permanently canceled and cannot be reactivated. Not a settable status. DRAFT - Denotes that the campaign group is in a preliminary state and should temporarily not be served. PAUSED - Denotes that the campaign group meets all requirements to be served, but temporarily should not be. PENDING_DELETION - Denotes that the campaign group has been requested to be deleted that is currently pending. REMOVED - Denoted that the campaign group was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_latest_version": {"name": "is_latest_version", "description": "Boolean of whether the record is the latest version of the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/staging/stg_linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.8454692, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_group_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_group_history_tmp') }}\n\n), macro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_linkedin_ads__campaign_group_history_tmp')),\n staging_columns=get_campaign_group_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='linkedin_ads') }}\n\n from base\n\n), fields as (\n\n select \n source_relation,\n id as campaign_group_id,\n name as campaign_group_name,\n account_id,\n status,\n backfilled as is_backfilled,\n cast(run_schedule_start as {{ dbt.type_timestamp() }}) as run_schedule_start_at,\n cast(run_schedule_end as {{ dbt.type_timestamp() }}) as run_schedule_end_at,\n cast(last_modified_time as {{ dbt.type_timestamp() }}) as last_modified_at,\n cast(created_time as {{ dbt.type_timestamp() }}) as created_at,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='linkedin_ads') }} order by last_modified_time desc) = 1 as is_latest_version\n\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__campaign_group_history_tmp", "package": null, "version": null}, {"name": "stg_linkedin_ads__campaign_group_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.linkedin.get_campaign_group_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.linkedin.stg_linkedin_ads__campaign_group_history_tmp"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin_ads__campaign_group_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_group_history_tmp\"\n\n), macro as (\n\n select\n \n account_id as account_id,\n cast(null as boolean) as backfilled,\n created_time as created_time,\n id as id,\n last_modified_time as last_modified_time,\n name as name,\n cast(null as timestamp) as run_schedule_end,\n cast(null as timestamp) as run_schedule_start,\n cast(null as TEXT) as status\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n\n), fields as (\n\n select \n source_relation,\n id as campaign_group_id,\n name as campaign_group_name,\n account_id,\n status,\n backfilled as is_backfilled,\n cast(run_schedule_start as timestamp) as run_schedule_start_at,\n cast(run_schedule_end as timestamp) as run_schedule_end_at,\n cast(last_modified_time as timestamp) as last_modified_at,\n cast(created_time as timestamp) as created_at,\n row_number() over (partition by id order by last_modified_time desc) = 1 as is_latest_version\n\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__monthly_ad_analytics_by_region", "resource_type": "model", "package_name": "linkedin", "path": "staging/stg_linkedin_ads__monthly_ad_analytics_by_region.sql", "original_file_path": "models/staging/stg_linkedin_ads__monthly_ad_analytics_by_region.sql", "unique_id": "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region", "fqn": ["linkedin", "staging", "stg_linkedin_ads__monthly_ad_analytics_by_region"], "alias": "stg_linkedin_ads__monthly_ad_analytics_by_region", "checksum": {"name": "sha256", "checksum": "baa3e923e89b6696432bf4371c693c059fcde08530c24edaa58ca417e93351dc"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Monthly LinkedIn Ads performance metrics aggregated by member region and campaign.", "columns": {"campaign_id": {"name": "campaign_id", "description": "Identifier of the LinkedIn Ads campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_month": {"name": "date_month", "description": "Month of the reporting data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "member_region_geo_id": {"name": "member_region_geo_id", "description": "ID representing the region of the LinkedIn members who interacted with the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost": {"name": "cost", "description": "The cost of the ads in the local currency or USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/staging/stg_linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.8506646, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__monthly_ad_analytics_by_region\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__linkedin_ads_enabled','linkedin_ads__using_monthly_ad_analytics_by_member_region'])) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_linkedin_ads__monthly_ad_analytics_by_region_tmp') }}\n),\n\nmacro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_linkedin_ads__monthly_ad_analytics_by_region_tmp')),\n staging_columns=get_monthly_ad_analytics_by_member_region_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='linkedin_ads') }}\n\n from base\n),\n\nfields as (\n \n select \n source_relation,\n {{ linkedin.date_from_month_string('date_month') }} as date_month, --Renamed in macros/get_monthly_ad_analytics_by_member_region_columns to avoid reserved word error.\n campaign_id,\n member_region as member_region_geo_id,\n impressions,\n clicks,\n {% if var('linkedin_ads__use_local_currency', false) %}\n cost_in_local_currency as cost,\n {% else %}\n cost_in_usd as cost,\n {% endif %}\n\n coalesce(cast(conversion_value_in_local_currency as {{ dbt.type_float() }}), 0) as conversion_value_in_local_currency\n\n {% for conversion in var('linkedin_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {{ linkedin_ads_fill_pass_through_columns(pass_through_fields=var('linkedin_ads__monthly_ad_analytics_by_member_region_passthrough_metrics')) }}\n\n from macro\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__monthly_ad_analytics_by_region_tmp", "package": null, "version": null}, {"name": "stg_linkedin_ads__monthly_ad_analytics_by_region_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.linkedin.get_monthly_ad_analytics_by_member_region_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.linkedin.date_from_month_string", "macro.dbt.type_float", "macro.dbt.type_bigint", "macro.linkedin.linkedin_ads_fill_pass_through_columns"], "nodes": ["model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region_tmp"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin_ads__monthly_ad_analytics_by_region.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__monthly_ad_analytics_by_region_tmp\"\n),\n\nmacro as (\n\n select\n \n campaign_id as campaign_id,\n month as date_month,\n clicks as clicks,\n member_region as member_region,\n impressions as impressions,\n conversion_value_in_local_currency as conversion_value_in_local_currency,\n cost_in_local_currency as cost_in_local_currency,\n cost_in_usd as cost_in_usd,\n cast(null as TEXT) as external_website_conversions,\n one_click_leads as one_click_leads\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfields as (\n \n select \n source_relation,\n \n to_date(\n split_part(date_month, '-', 1) || '-' || lpad(split_part(date_month, '-', 2), 2, '0') || '-01',\n 'YYYY-MM-DD'\n )\n as date_month, --Renamed in macros/get_monthly_ad_analytics_by_member_region_columns to avoid reserved word error.\n campaign_id,\n member_region as member_region_geo_id,\n impressions,\n clicks,\n \n cost_in_usd as cost,\n \n\n coalesce(cast(conversion_value_in_local_currency as float), 0) as conversion_value_in_local_currency\n\n \n , coalesce(cast(external_website_conversions as bigint), 0) as external_website_conversions\n \n , coalesce(cast(one_click_leads as bigint), 0) as one_click_leads\n \n\n \n\n\n\n\n\n from macro\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__ad_analytics_by_campaign", "resource_type": "model", "package_name": "linkedin", "path": "staging/stg_linkedin_ads__ad_analytics_by_campaign.sql", "original_file_path": "models/staging/stg_linkedin_ads__ad_analytics_by_campaign.sql", "unique_id": "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign", "fqn": ["linkedin", "staging", "stg_linkedin_ads__ad_analytics_by_campaign"], "alias": "stg_linkedin_ads__ad_analytics_by_campaign", "checksum": {"name": "sha256", "checksum": "de85d23d6e9b62034c498617e7d73ddd6dae14686f4f959af33da1a431c49e6b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the campaign level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related creative.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The day of the activity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost": {"name": "cost", "description": "The cost of the ads in the local currency or USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/staging/stg_linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.8407319, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_campaign\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_linkedin_ads__ad_analytics_by_campaign_tmp') }}\n),\n\nmacro as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_linkedin_ads__ad_analytics_by_campaign_tmp')),\n staging_columns=get_ad_analytics_by_campaign_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='linkedin_ads') }}\n\n from base\n),\n\nfields as (\n \n select \n source_relation,\n {{ dbt.date_trunc('day', 'day') }} as date_day,\n campaign_id,\n clicks,\n impressions,\n {% if var('linkedin_ads__use_local_currency', false) %}\n cost_in_local_currency as cost,\n {% else %}\n cost_in_usd as cost,\n {% endif %}\n\n coalesce(cast(conversion_value_in_local_currency as {{ dbt.type_float() }}), 0) as conversion_value_in_local_currency\n\n {% for conversion in var('linkedin_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {{ linkedin_ads_fill_pass_through_columns(pass_through_fields=var('linkedin_ads__campaign_passthrough_metrics'), except=(var('linkedin_ads__conversion_fields') + ['conversion_value_in_local_currency'])) }}\n\n from macro\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__ad_analytics_by_campaign_tmp", "package": null, "version": null}, {"name": "stg_linkedin_ads__ad_analytics_by_campaign_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.linkedin.get_ad_analytics_by_campaign_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.date_trunc", "macro.dbt.type_float", "macro.dbt.type_bigint", "macro.linkedin.linkedin_ads_fill_pass_through_columns"], "nodes": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign_tmp"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin_ads__ad_analytics_by_campaign.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_campaign_tmp\"\n),\n\nmacro as (\n\n select\n \n campaign_id as campaign_id,\n clicks as clicks,\n cost_in_local_currency as cost_in_local_currency,\n cost_in_usd as cost_in_usd,\n day as day,\n impressions as impressions,\n conversion_value_in_local_currency as conversion_value_in_local_currency,\n external_website_conversions as external_website_conversions,\n one_click_leads as one_click_leads\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfields as (\n \n select \n source_relation,\n date_trunc('day', day) as date_day,\n campaign_id,\n clicks,\n impressions,\n \n cost_in_usd as cost,\n \n\n coalesce(cast(conversion_value_in_local_currency as float), 0) as conversion_value_in_local_currency\n\n \n , coalesce(cast(external_website_conversions as bigint), 0) as external_website_conversions\n \n , coalesce(cast(one_click_leads as bigint), 0) as one_click_leads\n \n\n \n\n\n\n\n\n from macro\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__campaign_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__campaign_history", "resource_type": "model", "package_name": "linkedin", "path": "staging/stg_linkedin_ads__campaign_history.sql", "original_file_path": "models/staging/stg_linkedin_ads__campaign_history.sql", "unique_id": "model.linkedin.stg_linkedin_ads__campaign_history", "fqn": ["linkedin", "staging", "stg_linkedin_ads__campaign_history"], "alias": "stg_linkedin_ads__campaign_history", "checksum": {"name": "sha256", "checksum": "7d24a6ac6d669b02833174e3275e267a94e1f497857d73bd63408dc2aae3fb86"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a 'version' of a campaign.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "Unique internal ID representing the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_at": {"name": "last_modified_at", "description": "The timestamp of when the version was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the account the campaign belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_id": {"name": "campaign_group_id", "description": "The ID of the campaign group the campaign belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp of when the campaign was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "A label for the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "version_tag": {"name": "version_tag", "description": "An integer representation of the version of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_audience_expansion_enabled": {"name": "is_audience_expansion_enabled", "description": "Boolean (default=false) representing whether Audience Expansion is enabled for the campaign provides query expansion for certain targeting criteria.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_type": {"name": "cost_type", "description": "CPM - Cost per thousand advertising impressions. If type=SPONSORED_INMAILS; cost per send(CPS) is measured as CPM x 1000.\nCPC- Cost per individual click on the associated link.\nCPV- Cost per view for video ads.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_selection": {"name": "creative_selection", "description": "ROUND_ROBIN - Rotate through available creatives to serve them as evenly as possible.\nOPTIMIZED (default) - Bias selection taking into account such as expected performance. Not available for Message and Conversation Ads (type=SPONSORED_INMAILS).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_amount": {"name": "daily_budget_amount", "description": "Maximum amount to spend per day UTC. The amount of money as a real number string.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_currency_code": {"name": "daily_budget_currency_code", "description": "ISO currency code. The currency must match that of the parent account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "format": {"name": "format", "description": "The ad format on the campaign level. See https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads/campaign-formats?view=li-lms-2022-07", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "locale_country": {"name": "locale_country", "description": "Locale of the campaign. An uppercase two-letter country code as defined by ISO-3166.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "locale_language": {"name": "locale_language", "description": "Locale of the campaign. A lowercase two-letter language code as defined by ISO-639.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective_type": {"name": "objective_type", "description": "Campaign Objective type values. Click [here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ad-budget-pricing-type-combinations?view=li-lms-2022-07) for Campaign Objective descriptions. One of: - BRAND_AWARENESS - ENGAGEMENT - JOB_APPLICANTS - LEAD_GENERATION - WEBSITE_CONVERSIONS - WEBSITE_VISITS - VIDEO_VIEWS\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_offsite_delivery_enabled": {"name": "is_offsite_delivery_enabled", "description": "Boolean indicating if this campaign to allowed to be served on the LinkedIn Audience Network to extend the reach of your campaign by delivering ads beyond the LinkedIn feed to members on third-party apps and sites.\t(default will be \"True\" from June 30, 2022)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "optimization_target_type": {"name": "optimization_target_type", "description": "Determines how this campaign is optimized for spending. If this is not set, there is no optimization. Refer to the documentation here. Default = 'NONE'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_start_at": {"name": "run_schedule_start_at", "description": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the inclusive (greater than or equal to) value in which to start the range.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_end_at": {"name": "run_schedule_end_at", "description": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the exclusive (strictly less than) value in which to end the range, if provided.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "ACTIVE - Denotes that the campaign is fully servable.\nPAUSED - Denotes that the campaign meets all requirements to be served, but temporarily should not be.\nARCHIVED - Denotes that the campaign is presently inactive, and should mostly be hidden in the UI until un-archived.\nCOMPLETED - Denotes that the campaign has reached a specified budgetary or chronological limit.\nCANCELED - Denotes that the campaign has been permanently canceled, such as when an advertising account is permanently closed.\nDRAFT - Denotes that the campaign is still being edited and not eligible for serving. Some validation will be postponed until the campaign is activated.\nPENDING_DELETION - Denotes that the campaign has been requested to be deleted that is currently pending.\nREMOVED - Denotes that the campaign was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "type": {"name": "type", "description": "TEXT_AD - Text-based ads that show up in the right column or top of the page on LinkedIn.\nSPONSORED_UPDATES - Native ads that promote a company's content updates in the LinkedIn feed.\nSPONSORED_INMAILS - Personalized messages with a call-to-action button delivered to a LinkedIn's member inbox.\nDYNAMIC - Ads that are dynamically personalized.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "unit_cost_amount": {"name": "unit_cost_amount", "description": "This value is used as one of the following: amount to bid (for manual bidding), amount which is the target cost (for target cost bidding) per click, impression, or other event depending on the pricing model, or cost cap (for cost cap bidding). The amount of money as a real number string. The amount should be non-negative if the bidding strategy is manual, target cost, or cost cap bidding. The default is 0 with the currency code set to match that of the associated account.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "unit_cost_currency_code": {"name": "unit_cost_currency_code", "description": "Amount to bid per click, impression, or other event depending on the pricing model. The default is 0 with the currency code set to match that of the associated account. ISO currency code.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_latest_version": {"name": "is_latest_version", "description": "Boolean of whether the record is the latest version of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/staging/stg_linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.8443356, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_linkedin_ads__campaign_history_tmp') }}\n\n), macro as (\n\n select \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_linkedin_ads__campaign_history_tmp')),\n staging_columns=get_campaign_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='linkedin_ads') }}\n\n from base\n\n), fields as (\n\n select \n source_relation,\n id as campaign_id,\n name as campaign_name,\n cast(version_tag as numeric) as version_tag,\n campaign_group_id,\n account_id,\n status,\n type,\n cost_type,\n creative_selection,\n daily_budget_amount,\n daily_budget_currency_code,\n unit_cost_amount,\n unit_cost_currency_code,\n format,\n locale_country,\n locale_language,\n objective_type,\n optimization_target_type,\n audience_expansion_enabled as is_audience_expansion_enabled,\n offsite_delivery_enabled as is_offsite_delivery_enabled,\n cast(run_schedule_start as {{ dbt.type_timestamp() }}) as run_schedule_start_at,\n cast(run_schedule_end as {{ dbt.type_timestamp() }}) as run_schedule_end_at,\n cast(last_modified_time as {{ dbt.type_timestamp() }}) as last_modified_at,\n cast(created_time as {{ dbt.type_timestamp() }}) as created_at,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='linkedin_ads') }} order by last_modified_time desc) = 1 as is_latest_version\n\n from macro\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__campaign_history_tmp", "package": null, "version": null}, {"name": "stg_linkedin_ads__campaign_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.linkedin.get_campaign_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.linkedin.stg_linkedin_ads__campaign_history_tmp"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin_ads__campaign_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_history_tmp\"\n\n), macro as (\n\n select \n \n account_id as account_id,\n cast(null as boolean) as audience_expansion_enabled,\n campaign_group_id as campaign_group_id,\n cast(null as TEXT) as cost_type,\n created_time as created_time,\n cast(null as TEXT) as creative_selection,\n cast(null as float) as daily_budget_amount,\n cast(null as TEXT) as daily_budget_currency_code,\n cast(null as TEXT) as format,\n id as id,\n last_modified_time as last_modified_time,\n cast(null as TEXT) as locale_country,\n cast(null as TEXT) as locale_language,\n name as name,\n cast(null as TEXT) as objective_type,\n cast(null as boolean) as offsite_delivery_enabled,\n cast(null as TEXT) as optimization_target_type,\n cast(null as timestamp) as run_schedule_end,\n cast(null as timestamp) as run_schedule_start,\n cast(null as TEXT) as status,\n cast(null as TEXT) as type,\n cast(null as float) as unit_cost_amount,\n cast(null as TEXT) as unit_cost_currency_code,\n version_tag as version_tag\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n\n), fields as (\n\n select \n source_relation,\n id as campaign_id,\n name as campaign_name,\n cast(version_tag as numeric) as version_tag,\n campaign_group_id,\n account_id,\n status,\n type,\n cost_type,\n creative_selection,\n daily_budget_amount,\n daily_budget_currency_code,\n unit_cost_amount,\n unit_cost_currency_code,\n format,\n locale_country,\n locale_language,\n objective_type,\n optimization_target_type,\n audience_expansion_enabled as is_audience_expansion_enabled,\n offsite_delivery_enabled as is_offsite_delivery_enabled,\n cast(run_schedule_start as timestamp) as run_schedule_start_at,\n cast(run_schedule_end as timestamp) as run_schedule_end_at,\n cast(last_modified_time as timestamp) as last_modified_at,\n cast(created_time as timestamp) as created_at,\n row_number() over (partition by id order by last_modified_time desc) = 1 as is_latest_version\n\n from macro\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__creative_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__creative_history", "resource_type": "model", "package_name": "linkedin", "path": "staging/stg_linkedin_ads__creative_history.sql", "original_file_path": "models/staging/stg_linkedin_ads__creative_history.sql", "unique_id": "model.linkedin.stg_linkedin_ads__creative_history", "fqn": ["linkedin", "staging", "stg_linkedin_ads__creative_history"], "alias": "stg_linkedin_ads__creative_history", "checksum": {"name": "sha256", "checksum": "a79dff162816c27339bd552a3ab2e2e8a4a997fa274cdc39c2429ea5b711d9c1"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a 'version' of a creative.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.linkedin.source_relation"]}, "creative_id": {"name": "creative_id", "description": "Unique internal ID representing the creative.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_at": {"name": "last_modified_at", "description": "The timestamp of when the version was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp of when the creative was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign the creative belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "ACTIVE - Creative creation is complete and creative is available for review and serve.\nPAUSED - Creative creation is complete and creative is current, but should temporarily not be served. This status is not valid upon creation.\nDRAFT - Creative creation is incomplete and may still be edited.\nARCHIVED - Creative creation is complete, but creative should not be served and should be separated from non-archived creatives in any UI.\nCANCELED - Creative is permanently canceled.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_uri": {"name": "click_uri", "description": "The URL where the member should be redirected to, on clicking the text ad or spotlight ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_uri_type": {"name": "click_uri_type", "description": "Will either be `text_ad`, `spotlight`, or `null` to indicate the origin of the click_uri.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_host": {"name": "url_host", "description": "The URL host of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_path": {"name": "url_path", "description": "The URL path of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_source": {"name": "utm_source", "description": "The utm_source parameter of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_medium": {"name": "utm_medium", "description": "The utm_medium parameter of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_campaign": {"name": "utm_campaign", "description": "The utm_campaign parameter of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_content": {"name": "utm_content", "description": "The utm_content parameter of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_term": {"name": "utm_term", "description": "The utm_term parameter of the ad, extracted from the `click_uri`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_latest_version": {"name": "is_latest_version", "description": "Boolean of whether the record is the latest version of the creative.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "linkedin://models/staging/stg_linkedin.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.8425398, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__creative_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_linkedin_ads__creative_history_tmp') }}\n\n), macro as (\n\n select \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_linkedin_ads__creative_history_tmp')),\n staging_columns=get_creative_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='linkedin_ads') }}\n\n from base\n\n), fields as (\n\n select\n source_relation,\n id as creative_id,\n campaign_id,\n coalesce(status, intended_status) as status,\n coalesce(text_ad_landing_page, spotlight_landing_page, click_uri) as click_uri,\n cast(coalesce(last_modified_time, last_modified_at) as {{ dbt.type_timestamp() }}) as last_modified_at,\n cast(coalesce(created_time, created_at) as {{ dbt.type_timestamp() }}) as created_at,\n case when text_ad_landing_page is not null then 'text_ad'\n when spotlight_landing_page is not null then 'spotlight'\n else cast(null as {{ dbt.type_string() }})\n end as click_uri_type\n\n from macro\n\n), url_fields as (\n\n select \n *,\n row_number() over (partition by creative_id {{ fivetran_utils.partition_by_source_relation(package_name='linkedin_ads') }} order by last_modified_at desc) = 1 as is_latest_version,\n {{ dbt.split_part('click_uri', \"'?'\", 1) }} as base_url,\n {{ dbt_utils.get_url_host('click_uri') }} as url_host,\n '/' || {{ dbt_utils.get_url_path('click_uri') }} as url_path,\n {{ linkedin.linkedin_ads_extract_url_parameter('click_uri', 'utm_source') }} as utm_source,\n {{ linkedin.linkedin_ads_extract_url_parameter('click_uri', 'utm_medium') }} as utm_medium,\n {{ linkedin.linkedin_ads_extract_url_parameter('click_uri', 'utm_campaign') }} as utm_campaign,\n {{ linkedin.linkedin_ads_extract_url_parameter('click_uri', 'utm_content') }} as utm_content,\n {{ linkedin.linkedin_ads_extract_url_parameter('click_uri', 'utm_term') }} as utm_term\n \n from fields\n)\n\nselect *\nfrom url_fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__creative_history_tmp", "package": null, "version": null}, {"name": "stg_linkedin_ads__creative_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.linkedin.get_creative_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.fivetran_utils.partition_by_source_relation", "macro.dbt.split_part", "macro.dbt_utils.get_url_host", "macro.dbt_utils.get_url_path", "macro.linkedin.linkedin_ads_extract_url_parameter"], "nodes": ["model.linkedin.stg_linkedin_ads__creative_history_tmp"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin_ads__creative_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__creative_history_tmp\"\n\n), macro as (\n\n select \n \n campaign_id as campaign_id,\n click_uri as click_uri,\n created_time as created_time,\n cast(null as timestamp) as created_at,\n id as id,\n cast(null as timestamp) as last_modified_time,\n last_modified_at as last_modified_at,\n intended_status as intended_status,\n cast(null as TEXT) as status,\n text_ad_landing_page as text_ad_landing_page,\n spotlight_landing_page as spotlight_landing_page\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n\n), fields as (\n\n select\n source_relation,\n id as creative_id,\n campaign_id,\n coalesce(status, intended_status) as status,\n coalesce(text_ad_landing_page, spotlight_landing_page, click_uri) as click_uri,\n cast(coalesce(last_modified_time, last_modified_at) as timestamp) as last_modified_at,\n cast(coalesce(created_time, created_at) as timestamp) as created_at,\n case when text_ad_landing_page is not null then 'text_ad'\n when spotlight_landing_page is not null then 'spotlight'\n else cast(null as TEXT)\n end as click_uri_type\n\n from macro\n\n), url_fields as (\n\n select \n *,\n row_number() over (partition by creative_id order by last_modified_at desc) = 1 as is_latest_version,\n \n\n \n \n\n split_part(\n click_uri,\n '?',\n 1\n )\n\n\n \n\n as base_url,\n \n \n cast(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n \n\n replace(\n \n\n replace(\n \n\n replace(\n click_uri,\n 'android-app://',\n ''\n )\n\n\n,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n '/',\n 1\n )\n\n\n \n\n,\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_host,\n '/' || \n \n cast(\n\n \n \n\n split_part(\n \n\n right(\n \n\n replace(\n \n\n replace(\n click_uri,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n \n\n length(\n \n\n replace(\n \n\n replace(\n click_uri,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n )-coalesce(\n nullif(\n\n position(\n '/' in \n\n replace(\n \n\n replace(\n click_uri,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ), 0),\n \n\n position(\n '?' in \n\n replace(\n \n\n replace(\n click_uri,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ) - 1\n )\n ),\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_path,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n click_uri,\n 'utm_source=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_source,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n click_uri,\n 'utm_medium=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_medium,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n click_uri,\n 'utm_campaign=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_campaign,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n click_uri,\n 'utm_content=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_content,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n click_uri,\n 'utm_term=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_term\n \n from fields\n)\n\nselect *\nfrom url_fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__creative_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__creative_history_tmp", "resource_type": "model", "package_name": "linkedin", "path": "staging/tmp/stg_linkedin_ads__creative_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_linkedin_ads__creative_history_tmp.sql", "unique_id": "model.linkedin.stg_linkedin_ads__creative_history_tmp", "fqn": ["linkedin", "staging", "tmp", "stg_linkedin_ads__creative_history_tmp"], "alias": "stg_linkedin_ads__creative_history_tmp", "checksum": {"name": "sha256", "checksum": "fd1cc520fe4579912f65b134232b4d5bf726daf453c1da0777c8028624a02cf8"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708214.5605962, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__creative_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\n{% if var('linkedin_ads_union_schemas', []) | length > 0 or var('linkedin_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='creative_history', \n database_variable='linkedin_ads_database', \n schema_variable='linkedin_ads_schema', \n default_database=target.database,\n default_schema='linkedin_ads',\n default_variable='creative_history',\n union_schema_variable='linkedin_ads_union_schemas',\n union_database_variable='linkedin_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='linkedin_ads_sources',\n single_source_name='linkedin_ads',\n single_table_name='creative_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["linkedin_ads", "creative_history"], ["linkedin_ads", "creative_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.linkedin.linkedin_ads.creative_history"]}, "compiled_path": "target/compiled/linkedin/models/staging/tmp/stg_linkedin_ads__creative_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: linkedin_ads_creative_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: linkedin_ad_creative_history_data\n\n\n select\n \"id\",\n \"campaign_id\",\n \"intended_status\",\n \"click_uri\",\n \"last_modified_at\",\n \"created_time\",\n \"text_ad_landing_page\",\n \"spotlight_landing_page\"\n from \"postgres\".\"public\".\"linkedin_ad_creative_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__monthly_ad_analytics_by_region_tmp", "resource_type": "model", "package_name": "linkedin", "path": "staging/tmp/stg_linkedin_ads__monthly_ad_analytics_by_region_tmp.sql", "original_file_path": "models/staging/tmp/stg_linkedin_ads__monthly_ad_analytics_by_region_tmp.sql", "unique_id": "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region_tmp", "fqn": ["linkedin", "staging", "tmp", "stg_linkedin_ads__monthly_ad_analytics_by_region_tmp"], "alias": "stg_linkedin_ads__monthly_ad_analytics_by_region_tmp", "checksum": {"name": "sha256", "checksum": "c31760953d01e16bb31502d9af249627b67dd2ce525fde53b4b61444a31a33df"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708214.5882597, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__monthly_ad_analytics_by_region_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__linkedin_ads_enabled','linkedin_ads__using_monthly_ad_analytics_by_member_region'])) }}\n\n{% if var('linkedin_ads_union_schemas', []) | length > 0 or var('linkedin_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='monthly_ad_analytics_by_member_region', \n database_variable='linkedin_ads_database', \n schema_variable='linkedin_ads_schema', \n default_database=target.database,\n default_schema='linkedin_ads',\n default_variable='monthly_ad_analytics_by_member_region',\n union_schema_variable='linkedin_ads_union_schemas',\n union_database_variable='linkedin_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='linkedin_ads_sources',\n single_source_name='linkedin_ads',\n single_table_name='monthly_ad_analytics_by_member_region'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["linkedin_ads", "monthly_ad_analytics_by_member_region"], ["linkedin_ads", "monthly_ad_analytics_by_member_region"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_region"]}, "compiled_path": "target/compiled/linkedin/models/staging/tmp/stg_linkedin_ads__monthly_ad_analytics_by_region_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: linkedin_ads_monthly_ad_analytics_by_member_region_identifier\n -- database: postgres \n -- schema: public\n -- identifier: linkedin_monthly_ad_analytics_by_member_region_data\n\n\n select\n \"campaign_id\",\n \"month\",\n \"clicks\",\n \"member_region\",\n \"impressions\",\n \"conversion_value_in_local_currency\",\n \"cost_in_local_currency\",\n \"cost_in_usd\",\n \"external_website_post_click_conversions\",\n \"one_click_leads\"\n from \"postgres\".\"public\".\"linkedin_monthly_ad_analytics_by_member_region_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__monthly_ad_analytics_by_country_tmp", "resource_type": "model", "package_name": "linkedin", "path": "staging/tmp/stg_linkedin_ads__monthly_ad_analytics_by_country_tmp.sql", "original_file_path": "models/staging/tmp/stg_linkedin_ads__monthly_ad_analytics_by_country_tmp.sql", "unique_id": "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country_tmp", "fqn": ["linkedin", "staging", "tmp", "stg_linkedin_ads__monthly_ad_analytics_by_country_tmp"], "alias": "stg_linkedin_ads__monthly_ad_analytics_by_country_tmp", "checksum": {"name": "sha256", "checksum": "d7adfb77dfbc5702ba5035e14b627d73aa58f6ff1203b19cc491ee798edbb35b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708214.599703, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__monthly_ad_analytics_by_country_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__linkedin_ads_enabled','linkedin_ads__using_monthly_ad_analytics_by_member_country'])) }}\n\n{% if var('linkedin_ads_union_schemas', []) | length > 0 or var('linkedin_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='monthly_ad_analytics_by_member_country', \n database_variable='linkedin_ads_database', \n schema_variable='linkedin_ads_schema', \n default_database=target.database,\n default_schema='linkedin_ads',\n default_variable='monthly_ad_analytics_by_member_country',\n union_schema_variable='linkedin_ads_union_schemas',\n union_database_variable='linkedin_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='linkedin_ads_sources',\n single_source_name='linkedin_ads',\n single_table_name='monthly_ad_analytics_by_member_country'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["linkedin_ads", "monthly_ad_analytics_by_member_country"], ["linkedin_ads", "monthly_ad_analytics_by_member_country"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_country"]}, "compiled_path": "target/compiled/linkedin/models/staging/tmp/stg_linkedin_ads__monthly_ad_analytics_by_country_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: linkedin_ads_monthly_ad_analytics_by_member_country_identifier\n -- database: postgres \n -- schema: public\n -- identifier: linkedin_monthly_ad_analytics_by_member_country_data\n\n\n select\n \"campaign_id\",\n \"month\",\n \"clicks\",\n \"member_country\",\n \"impressions\",\n \"conversion_value_in_local_currency\",\n \"cost_in_local_currency\",\n \"cost_in_usd\",\n \"external_website_post_click_conversions\",\n \"one_click_leads\"\n from \"postgres\".\"public\".\"linkedin_monthly_ad_analytics_by_member_country_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__campaign_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__campaign_history_tmp", "resource_type": "model", "package_name": "linkedin", "path": "staging/tmp/stg_linkedin_ads__campaign_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_linkedin_ads__campaign_history_tmp.sql", "unique_id": "model.linkedin.stg_linkedin_ads__campaign_history_tmp", "fqn": ["linkedin", "staging", "tmp", "stg_linkedin_ads__campaign_history_tmp"], "alias": "stg_linkedin_ads__campaign_history_tmp", "checksum": {"name": "sha256", "checksum": "bc1edc91d94917f69a7d0507b7d8cd60631d4c540be484aba8dbedfb557f5e8d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708214.6105912, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\n{% if var('linkedin_ads_union_schemas', []) | length > 0 or var('linkedin_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_history', \n database_variable='linkedin_ads_database', \n schema_variable='linkedin_ads_schema', \n default_database=target.database,\n default_schema='linkedin_ads',\n default_variable='campaign_history',\n union_schema_variable='linkedin_ads_union_schemas',\n union_database_variable='linkedin_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='linkedin_ads_sources',\n single_source_name='linkedin_ads',\n single_table_name='campaign_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["linkedin_ads", "campaign_history"], ["linkedin_ads", "campaign_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.linkedin.linkedin_ads.campaign_history"]}, "compiled_path": "target/compiled/linkedin/models/staging/tmp/stg_linkedin_ads__campaign_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: linkedin_ads_campaign_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: linkedin_ad_campaign_history_data\n\n\n select\n \"id\",\n \"last_modified_time\",\n \"account_id\",\n \"campaign_group_id\",\n \"created_time\",\n \"name\",\n \"version_tag\"\n from \"postgres\".\"public\".\"linkedin_ad_campaign_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__campaign_group_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__campaign_group_history_tmp", "resource_type": "model", "package_name": "linkedin", "path": "staging/tmp/stg_linkedin_ads__campaign_group_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_linkedin_ads__campaign_group_history_tmp.sql", "unique_id": "model.linkedin.stg_linkedin_ads__campaign_group_history_tmp", "fqn": ["linkedin", "staging", "tmp", "stg_linkedin_ads__campaign_group_history_tmp"], "alias": "stg_linkedin_ads__campaign_group_history_tmp", "checksum": {"name": "sha256", "checksum": "b605a15de4553e52fbe54dcd6ef80f4c9d824c888f3f95510a31f43d1f8b079d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708214.6213143, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_group_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\n{% if var('linkedin_ads_union_schemas', []) | length > 0 or var('linkedin_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_group_history', \n database_variable='linkedin_ads_database', \n schema_variable='linkedin_ads_schema', \n default_database=target.database,\n default_schema='linkedin_ads',\n default_variable='campaign_group_history',\n union_schema_variable='linkedin_ads_union_schemas',\n union_database_variable='linkedin_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='linkedin_ads_sources',\n single_source_name='linkedin_ads',\n single_table_name='campaign_group_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["linkedin_ads", "campaign_group_history"], ["linkedin_ads", "campaign_group_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.linkedin.linkedin_ads.campaign_group_history"]}, "compiled_path": "target/compiled/linkedin/models/staging/tmp/stg_linkedin_ads__campaign_group_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: linkedin_ads_campaign_group_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: linkedin_ad_campaign_group_history_data\n\n\n select\n \"id\",\n \"last_modified_time\",\n \"account_id\",\n \"created_time\",\n \"name\"\n from \"postgres\".\"public\".\"linkedin_ad_campaign_group_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__ad_analytics_by_campaign_tmp", "resource_type": "model", "package_name": "linkedin", "path": "staging/tmp/stg_linkedin_ads__ad_analytics_by_campaign_tmp.sql", "original_file_path": "models/staging/tmp/stg_linkedin_ads__ad_analytics_by_campaign_tmp.sql", "unique_id": "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign_tmp", "fqn": ["linkedin", "staging", "tmp", "stg_linkedin_ads__ad_analytics_by_campaign_tmp"], "alias": "stg_linkedin_ads__ad_analytics_by_campaign_tmp", "checksum": {"name": "sha256", "checksum": "d946f554a7c5847ab30fe093d4ec7cb14e1f023119b3b085a701ae982429df67"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708214.6326585, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_campaign_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\n{% if var('linkedin_ads_union_schemas', []) | length > 0 or var('linkedin_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_analytics_by_campaign', \n database_variable='linkedin_ads_database', \n schema_variable='linkedin_ads_schema', \n default_database=target.database,\n default_schema='linkedin_ads',\n default_variable='ad_analytics_by_campaign',\n union_schema_variable='linkedin_ads_union_schemas',\n union_database_variable='linkedin_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='linkedin_ads_sources',\n single_source_name='linkedin_ads',\n single_table_name='ad_analytics_by_campaign'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["linkedin_ads", "ad_analytics_by_campaign"], ["linkedin_ads", "ad_analytics_by_campaign"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.linkedin.linkedin_ads.ad_analytics_by_campaign"]}, "compiled_path": "target/compiled/linkedin/models/staging/tmp/stg_linkedin_ads__ad_analytics_by_campaign_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: linkedin_ads_ad_analytics_by_campaign_identifier\n -- database: postgres \n -- schema: public\n -- identifier: linkedin_ad_analytics_by_campaign_data\n\n\n select\n \"campaign_id\",\n \"day\",\n \"_fivetran_synced\",\n \"action_clicks\",\n \"ad_unit_clicks\",\n \"approximate_unique_impressions\",\n \"card_clicks\",\n \"card_impressions\",\n \"clicks\",\n \"comment_likes\",\n \"comments\",\n \"company_page_clicks\",\n \"conversion_value_in_local_currency\",\n \"cost_in_local_currency\",\n \"cost_in_usd\",\n \"external_website_conversions\",\n \"external_website_post_click_conversions\",\n \"external_website_post_view_conversions\",\n \"follows\",\n \"full_screen_plays\",\n \"impressions\",\n \"landing_page_clicks\",\n \"lead_generation_mail_contact_info_shares\",\n \"lead_generation_mail_interested_clicks\",\n \"likes\",\n \"one_click_lead_form_opens\",\n \"one_click_leads\",\n \"opens\",\n \"other_engagements\",\n \"shares\",\n \"text_url_clicks\",\n \"total_engagements\",\n \"video_completions\",\n \"video_first_quartile_completions\",\n \"video_midpoint_completions\",\n \"video_starts\",\n \"video_third_quartile_completions\",\n \"video_views\",\n \"viral_card_clicks\",\n \"viral_card_impressions\",\n \"viral_clicks\",\n \"viral_comment_likes\",\n \"viral_comments\",\n \"viral_company_page_clicks\",\n \"viral_external_website_conversions\",\n \"viral_external_website_post_click_conversions\",\n \"viral_external_website_post_view_conversions\",\n \"viral_follows\",\n \"viral_full_screen_plays\",\n \"viral_impressions\",\n \"viral_landing_page_clicks\",\n \"viral_likes\",\n \"viral_one_click_lead_form_opens\",\n \"viral_one_click_leads\",\n \"viral_other_engagements\",\n \"viral_shares\",\n \"viral_total_engagements\",\n \"viral_video_completions\",\n \"viral_video_first_quartile_completions\",\n \"viral_video_midpoint_completions\",\n \"viral_video_starts\",\n \"viral_video_third_quartile_completions\",\n \"viral_video_views\"\n from \"postgres\".\"public\".\"linkedin_ad_analytics_by_campaign_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__ad_analytics_by_creative_tmp", "resource_type": "model", "package_name": "linkedin", "path": "staging/tmp/stg_linkedin_ads__ad_analytics_by_creative_tmp.sql", "original_file_path": "models/staging/tmp/stg_linkedin_ads__ad_analytics_by_creative_tmp.sql", "unique_id": "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative_tmp", "fqn": ["linkedin", "staging", "tmp", "stg_linkedin_ads__ad_analytics_by_creative_tmp"], "alias": "stg_linkedin_ads__ad_analytics_by_creative_tmp", "checksum": {"name": "sha256", "checksum": "a8a4b5756b29bedf77a7aa6360892e3a8959373f92fd7ba1e3d6acfeb9ca97e9"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708214.7116153, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_creative_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\n{% if var('linkedin_ads_union_schemas', []) | length > 0 or var('linkedin_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_analytics_by_creative', \n database_variable='linkedin_ads_database', \n schema_variable='linkedin_ads_schema', \n default_database=target.database,\n default_schema='linkedin_ads',\n default_variable='ad_analytics_by_creative',\n union_schema_variable='linkedin_ads_union_schemas',\n union_database_variable='linkedin_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='linkedin_ads_sources',\n single_source_name='linkedin_ads',\n single_table_name='ad_analytics_by_creative'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["linkedin_ads", "ad_analytics_by_creative"], ["linkedin_ads", "ad_analytics_by_creative"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.linkedin.linkedin_ads.ad_analytics_by_creative"]}, "compiled_path": "target/compiled/linkedin/models/staging/tmp/stg_linkedin_ads__ad_analytics_by_creative_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: linkedin_ads_ad_analytics_by_creative_identifier\n -- database: postgres \n -- schema: public\n -- identifier: linkedin_ad_analytics_by_creative_data\n\n\n select\n \"creative_id\",\n \"day\",\n \"action_clicks\",\n \"card_clicks\",\n \"ad_unit_clicks\",\n \"landing_page_clicks\",\n \"clicks\",\n \"approximate_unique_impressions\",\n \"impressions\",\n \"card_impressions\",\n \"cost_in_local_currency\",\n \"cost_in_usd\",\n \"comment_likes\",\n \"comments\",\n \"company_page_clicks\",\n \"conversion_value_in_local_currency\",\n \"external_website_conversions\",\n \"external_website_post_click_conversions\",\n \"external_website_post_view_conversions\",\n \"follows\",\n \"full_screen_plays\",\n \"lead_generation_mail_contact_info_shares\",\n \"lead_generation_mail_interested_clicks\",\n \"likes\",\n \"one_click_lead_form_opens\",\n \"one_click_leads\",\n \"opens\",\n \"other_engagements\",\n \"shares\",\n \"text_url_clicks\",\n \"total_engagements\",\n \"video_completions\",\n \"video_first_quartile_completions\",\n \"video_midpoint_completions\",\n \"video_starts\",\n \"video_third_quartile_completions\",\n \"video_views\",\n \"viral_card_clicks\",\n \"viral_card_impressions\",\n \"viral_clicks\",\n \"viral_comment_likes\",\n \"viral_comments\",\n \"viral_company_page_clicks\",\n \"viral_external_website_conversions\",\n \"viral_external_website_post_click_conversions\",\n \"viral_external_website_post_view_conversions\",\n \"viral_follows\",\n \"viral_full_screen_plays\",\n \"viral_impressions\",\n \"viral_landing_page_clicks\",\n \"viral_likes\",\n \"viral_one_click_lead_form_opens\",\n \"viral_one_click_leads\",\n \"viral_other_engagements\",\n \"viral_shares\",\n \"viral_total_engagements\",\n \"viral_video_completions\",\n \"viral_video_first_quartile_completions\",\n \"viral_video_midpoint_completions\",\n \"viral_video_starts\",\n \"viral_video_third_quartile_completions\",\n \"viral_video_views\"\n from \"postgres\".\"public\".\"linkedin_ad_analytics_by_creative_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__geo_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__geo_tmp", "resource_type": "model", "package_name": "linkedin", "path": "staging/tmp/stg_linkedin_ads__geo_tmp.sql", "original_file_path": "models/staging/tmp/stg_linkedin_ads__geo_tmp.sql", "unique_id": "model.linkedin.stg_linkedin_ads__geo_tmp", "fqn": ["linkedin", "staging", "tmp", "stg_linkedin_ads__geo_tmp"], "alias": "stg_linkedin_ads__geo_tmp", "checksum": {"name": "sha256", "checksum": "9fb4f226ca36de5ebcf4b3a948a0be2f1ec8ab8665305fe20fbdf8b00fce119c"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708214.7225547, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__geo_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__linkedin_ads_enabled','linkedin_ads__using_geo'])) }}\n\n{% if var('linkedin_ads_union_schemas', []) | length > 0 or var('linkedin_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='geo', \n database_variable='linkedin_ads_database', \n schema_variable='linkedin_ads_schema', \n default_database=target.database,\n default_schema='linkedin_ads',\n default_variable='geo',\n union_schema_variable='linkedin_ads_union_schemas',\n union_database_variable='linkedin_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='linkedin_ads_sources',\n single_source_name='linkedin_ads',\n single_table_name='geo'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["linkedin_ads", "geo"], ["linkedin_ads", "geo"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.linkedin.linkedin_ads.geo"]}, "compiled_path": "target/compiled/linkedin/models/staging/tmp/stg_linkedin_ads__geo_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: linkedin_ads_geo_identifier\n -- database: postgres \n -- schema: public\n -- identifier: linkedin_geo_data\n\n\n select\n \"_fivetran_synced\",\n \"id\",\n \"value\"\n from \"postgres\".\"public\".\"linkedin_geo_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.linkedin.stg_linkedin_ads__account_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_linkedin_ads__account_history_tmp", "resource_type": "model", "package_name": "linkedin", "path": "staging/tmp/stg_linkedin_ads__account_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_linkedin_ads__account_history_tmp.sql", "unique_id": "model.linkedin.stg_linkedin_ads__account_history_tmp", "fqn": ["linkedin", "staging", "tmp", "stg_linkedin_ads__account_history_tmp"], "alias": "stg_linkedin_ads__account_history_tmp", "checksum": {"name": "sha256", "checksum": "7e37cd7a9d5af1e81073ee77b0a8262328883bdb1f27cc7381c28a0d34eef705"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "view", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708214.7334707, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__account_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__linkedin_ads_enabled', True)) }}\n\n{% if var('linkedin_ads_union_schemas', []) | length > 0 or var('linkedin_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='account_history', \n database_variable='linkedin_ads_database', \n schema_variable='linkedin_ads_schema', \n default_database=target.database,\n default_schema='linkedin_ads',\n default_variable='account_history',\n union_schema_variable='linkedin_ads_union_schemas',\n union_database_variable='linkedin_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='linkedin_ads_sources',\n single_source_name='linkedin_ads',\n single_table_name='account_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["linkedin_ads", "account_history"], ["linkedin_ads", "account_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.linkedin.linkedin_ads.account_history"]}, "compiled_path": "target/compiled/linkedin/models/staging/tmp/stg_linkedin_ads__account_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: linkedin_ads_account_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: linkedin_ad_account_history_data\n\n\n select\n \"id\",\n \"last_modified_time\",\n \"created_time\",\n \"name\",\n \"currency\",\n \"version_tag\"\n from \"postgres\".\"public\".\"linkedin_ad_account_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.apple_search_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "apple_search_ads__campaign_report", "resource_type": "model", "package_name": "apple_search_ads", "path": "apple_search_ads__campaign_report.sql", "original_file_path": "models/apple_search_ads__campaign_report.sql", "unique_id": "model.apple_search_ads.apple_search_ads__campaign_report", "fqn": ["apple_search_ads", "apple_search_ads__campaign_report"], "alias": "apple_search_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "a443a3a34a1d5275915454391a282a9bacc5bc167f407cbb770a0e70d68d5e0b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily ad performance of each campaign.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "The status of the campaign associted with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_at": {"name": "start_at", "description": "The start timestamp of this campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_at": {"name": "end_at", "description": "The end timestamp of this campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "taps": {"name": "taps", "description": "Number of taps on campaign on given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "total_downloads": {"name": "total_downloads", "description": "The sum of `new_downloads` and `redownloads`. Following the [release](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) of Apple Search Ads API v5, the package will sunset this field by April 2025. Please refer to its replacement, `tap_total_downloads`, instead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.total_downloads"]}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "The number of impressions of campaign in a given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on campaign in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}, "tap_total_downloads": {"name": "tap_total_downloads", "description": "The sum of `tap_new_downloads` and `tap_redownloads`. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `total_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_total_downloads"]}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.1227865, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith report as (\n \n select *\n from {{ ref('stg_apple_search_ads__campaign_report') }}\n\n), \n\ncampaign as (\n\n select *\n from {{ ref('stg_apple_search_ads__campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ ref('stg_apple_search_ads__organization') }}\n\n), \n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n campaign.organization_id,\n organization.organization_name,\n report.campaign_id, \n campaign.campaign_name, \n report.currency,\n campaign.campaign_status,\n campaign.start_at,\n campaign.end_at,\n sum(report.taps) as taps,\n sum(report.new_downloads) as new_downloads, -- this will be deprecated shortly; please reference tap_new_downloads instead\n sum(report.tap_new_downloads) as tap_new_downloads,\n sum(report.redownloads) as redownloads, -- this will be deprecated shortly; please reference tap_redownloads instead\n sum(report.tap_redownloads) as tap_redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads, -- this will be deprecated shortly; please reference tap_total_downloads instead\n sum(report.tap_new_downloads + report.tap_redownloads) as tap_total_downloads,\n sum(report.conversions) as conversions, -- this will be deprecated shortly; please reference tap_installs instead\n sum(report.tap_installs) as tap_installs,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ apple_search_ads_persist_pass_through_columns(\n pass_through_variable = 'apple_search_ads__campaign_passthrough_metrics',\n identifier = 'report',\n transform = 'sum',\n coalesce_with = 0,\n exclude_fields = ['conversions']) }}\n\n from report\n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join organization \n on campaign.organization_id = organization.organization_id\n and campaign.source_relation = organization.source_relation\n {{ dbt_utils.group_by(10) }}\n)\n\nselect * \nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__campaign_report", "package": null, "version": null}, {"name": "stg_apple_search_ads__campaign_history", "package": null, "version": null}, {"name": "stg_apple_search_ads__organization", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.apple_search_ads.apple_search_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__campaign_report", "model.apple_search_ads.stg_apple_search_ads__campaign_history", "model.apple_search_ads.stg_apple_search_ads__organization"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n \n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_report\"\n\n), \n\ncampaign as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_history\"\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__organization\"\n\n), \n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n campaign.organization_id,\n organization.organization_name,\n report.campaign_id, \n campaign.campaign_name, \n report.currency,\n campaign.campaign_status,\n campaign.start_at,\n campaign.end_at,\n sum(report.taps) as taps,\n sum(report.new_downloads) as new_downloads, -- this will be deprecated shortly; please reference tap_new_downloads instead\n sum(report.tap_new_downloads) as tap_new_downloads,\n sum(report.redownloads) as redownloads, -- this will be deprecated shortly; please reference tap_redownloads instead\n sum(report.tap_redownloads) as tap_redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads, -- this will be deprecated shortly; please reference tap_total_downloads instead\n sum(report.tap_new_downloads + report.tap_redownloads) as tap_total_downloads,\n sum(report.conversions) as conversions, -- this will be deprecated shortly; please reference tap_installs instead\n sum(report.tap_installs) as tap_installs,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n\n from report\n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join organization \n on campaign.organization_id = organization.organization_id\n and campaign.source_relation = organization.source_relation\n group by 1,2,3,4,5,6,7,8,9,10\n)\n\nselect * \nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.apple_search_ads__organization_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "apple_search_ads__organization_report", "resource_type": "model", "package_name": "apple_search_ads", "path": "apple_search_ads__organization_report.sql", "original_file_path": "models/apple_search_ads__organization_report.sql", "unique_id": "model.apple_search_ads.apple_search_ads__organization_report", "fqn": ["apple_search_ads", "apple_search_ads__organization_report"], "alias": "apple_search_ads__organization_report", "checksum": {"name": "sha256", "checksum": "ba10c795b24331bf59d8424b2810137469a91aa0a6bdc9e1d6905a82507e8f50"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily ad performance of each organization.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "taps": {"name": "taps", "description": "Number of taps on organization on given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "total_downloads": {"name": "total_downloads", "description": "The sum of `new_downloads` and `redownloads`. Following the [release](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) of Apple Search Ads API v5, the package will sunset this field by April 2025. Please refer to its replacement, `tap_total_downloads`, instead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.total_downloads"]}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "The number of impressions of organization in a given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on organization in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}, "tap_total_downloads": {"name": "tap_total_downloads", "description": "The sum of `tap_new_downloads` and `tap_redownloads`. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `total_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_total_downloads"]}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.1271007, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__organization_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith report as (\n \n select *\n from {{ ref('stg_apple_search_ads__campaign_report') }}\n), \n\ncampaign as (\n\n select *\n from {{ ref('stg_apple_search_ads__campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ ref('stg_apple_search_ads__organization') }}\n), \n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n organization.organization_id,\n organization.organization_name,\n organization.currency,\n sum(report.taps) as taps,\n sum(report.new_downloads) as new_downloads, -- this will be deprecated shortly; please reference tap_new_downloads instead\n sum(report.tap_new_downloads) as tap_new_downloads,\n sum(report.redownloads) as redownloads, -- this will be deprecated shortly; please reference tap_redownloads instead\n sum(report.tap_redownloads) as tap_redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads, -- this will be deprecated shortly; please reference tap_total_downloads instead\n sum(report.tap_new_downloads + report.tap_redownloads) as tap_total_downloads,\n sum(report.conversions) as conversions, -- this will be deprecated shortly; please reference tap_installs instead\n sum(report.tap_installs) as tap_installs,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ apple_search_ads_persist_pass_through_columns(\n pass_through_variable = 'apple_search_ads__campaign_passthrough_metrics',\n identifier = 'report',\n transform = 'sum',\n coalesce_with = 0,\n exclude_fields = ['conversions']) }}\n\n from report\n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join organization \n on campaign.organization_id = organization.organization_id\n and campaign.source_relation = organization.source_relation\n {{ dbt_utils.group_by(5) }}\n)\n\nselect * \nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__campaign_report", "package": null, "version": null}, {"name": "stg_apple_search_ads__campaign_history", "package": null, "version": null}, {"name": "stg_apple_search_ads__organization", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.apple_search_ads.apple_search_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__campaign_report", "model.apple_search_ads.stg_apple_search_ads__campaign_history", "model.apple_search_ads.stg_apple_search_ads__organization"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__organization_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n \n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_report\"\n), \n\ncampaign as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_history\"\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__organization\"\n), \n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n organization.organization_id,\n organization.organization_name,\n organization.currency,\n sum(report.taps) as taps,\n sum(report.new_downloads) as new_downloads, -- this will be deprecated shortly; please reference tap_new_downloads instead\n sum(report.tap_new_downloads) as tap_new_downloads,\n sum(report.redownloads) as redownloads, -- this will be deprecated shortly; please reference tap_redownloads instead\n sum(report.tap_redownloads) as tap_redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads, -- this will be deprecated shortly; please reference tap_total_downloads instead\n sum(report.tap_new_downloads + report.tap_redownloads) as tap_total_downloads,\n sum(report.conversions) as conversions, -- this will be deprecated shortly; please reference tap_installs instead\n sum(report.tap_installs) as tap_installs,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n\n from report\n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join organization \n on campaign.organization_id = organization.organization_id\n and campaign.source_relation = organization.source_relation\n group by 1,2,3,4,5\n)\n\nselect * \nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.apple_search_ads__search_term_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "apple_search_ads__search_term_report", "resource_type": "model", "package_name": "apple_search_ads", "path": "apple_search_ads__search_term_report.sql", "original_file_path": "models/apple_search_ads__search_term_report.sql", "unique_id": "model.apple_search_ads.apple_search_ads__search_term_report", "fqn": ["apple_search_ads", "apple_search_ads__search_term_report"], "alias": "apple_search_ads__search_term_report", "checksum": {"name": "sha256", "checksum": "98d501c53b4a2365853fb0fb71c02ec018fe2d27429802bd781138e91000cadf"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily ad performance of each search term, only includes records with search term values.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; EXACT or BROAD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "search_term_text": {"name": "search_term_text", "description": "Search term text.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "taps": {"name": "taps", "description": "Number of taps on organization on given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "total_downloads": {"name": "total_downloads", "description": "The sum of `new_downloads` and `redownloads`. Following the [release](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) of Apple Search Ads API v5, the package will sunset this field by April 2025. Please refer to its replacement, `tap_total_downloads`, instead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.total_downloads"]}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "The number of impressions of organization in a given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on organization in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_id": {"name": "keyword_id", "description": "Creative set name associatd with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_text": {"name": "keyword_text", "description": "Creative set ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}, "tap_total_downloads": {"name": "tap_total_downloads", "description": "The sum of `tap_new_downloads` and `tap_redownloads`. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `total_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_total_downloads"]}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.129119, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__search_term_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__apple_search_ads_enabled','apple_search_ads__using_search_terms'])) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_apple_search_ads__search_term_report') }}\n), \n\ncampaign as (\n\n select *\n from {{ ref('stg_apple_search_ads__campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ ref('stg_apple_search_ads__organization') }}\n), \n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n organization.organization_id,\n organization.organization_name,\n report.campaign_id, \n campaign.campaign_name, \n report.ad_group_id,\n report.ad_group_name,\n report.keyword_id,\n report.keyword_text,\n report.search_term_text,\n report.match_type,\n report.currency,\n sum(report.taps) as taps,\n sum(report.new_downloads) as new_downloads, -- this will be deprecated shortly; please reference tap_new_downloads instead\n sum(report.tap_new_downloads) as tap_new_downloads,\n sum(report.redownloads) as redownloads, -- this will be deprecated shortly; please reference tap_redownloads instead\n sum(report.tap_redownloads) as tap_redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads, -- this will be deprecated shortly; please reference tap_total_downloads instead\n sum(report.tap_new_downloads + report.tap_redownloads) as tap_total_downloads,\n sum(report.conversions) as conversions, -- this will be deprecated shortly; please reference tap_installs instead\n sum(report.tap_installs) as tap_installs,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ apple_search_ads_persist_pass_through_columns(\n pass_through_variable = 'apple_search_ads__search_term_passthrough_metrics',\n identifier = 'report',\n transform = 'sum',\n coalesce_with = 0,\n exclude_fields = ['conversions']) }}\n\n from report\n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join organization \n on campaign.organization_id = organization.organization_id\n and campaign.source_relation = organization.source_relation\n where report.search_term_text is not null\n {{ dbt_utils.group_by(13) }}\n)\n\nselect * \nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__search_term_report", "package": null, "version": null}, {"name": "stg_apple_search_ads__campaign_history", "package": null, "version": null}, {"name": "stg_apple_search_ads__organization", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.apple_search_ads.apple_search_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__search_term_report", "model.apple_search_ads.stg_apple_search_ads__campaign_history", "model.apple_search_ads.stg_apple_search_ads__organization"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__search_term_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__search_term_report\"\n), \n\ncampaign as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_history\"\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__organization\"\n), \n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n organization.organization_id,\n organization.organization_name,\n report.campaign_id, \n campaign.campaign_name, \n report.ad_group_id,\n report.ad_group_name,\n report.keyword_id,\n report.keyword_text,\n report.search_term_text,\n report.match_type,\n report.currency,\n sum(report.taps) as taps,\n sum(report.new_downloads) as new_downloads, -- this will be deprecated shortly; please reference tap_new_downloads instead\n sum(report.tap_new_downloads) as tap_new_downloads,\n sum(report.redownloads) as redownloads, -- this will be deprecated shortly; please reference tap_redownloads instead\n sum(report.tap_redownloads) as tap_redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads, -- this will be deprecated shortly; please reference tap_total_downloads instead\n sum(report.tap_new_downloads + report.tap_redownloads) as tap_total_downloads,\n sum(report.conversions) as conversions, -- this will be deprecated shortly; please reference tap_installs instead\n sum(report.tap_installs) as tap_installs,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n\n from report\n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join organization \n on campaign.organization_id = organization.organization_id\n and campaign.source_relation = organization.source_relation\n where report.search_term_text is not null\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13\n)\n\nselect * \nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.apple_search_ads__ad_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "apple_search_ads__ad_report", "resource_type": "model", "package_name": "apple_search_ads", "path": "apple_search_ads__ad_report.sql", "original_file_path": "models/apple_search_ads__ad_report.sql", "unique_id": "model.apple_search_ads.apple_search_ads__ad_report", "fqn": ["apple_search_ads", "apple_search_ads__ad_report"], "alias": "apple_search_ads__ad_report", "checksum": {"name": "sha256", "checksum": "2c764edf06023a27bc7eabd60ee108f65cd1d61a2a0c88fdec90f37236ad1c8e"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily ad performance of each ad.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_id": {"name": "ad_id", "description": "Ad ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_name": {"name": "ad_name", "description": "Ad name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_status": {"name": "ad_status", "description": "The status of the ad associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "taps": {"name": "taps", "description": "Number of taps on ad group on given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "total_downloads": {"name": "total_downloads", "description": "The sum of `new_downloads` and `redownloads`. Following the [release](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) of Apple Search Ads API v5, the package will sunset this field by April 2025. Please refer to its replacement, `tap_total_downloads`, instead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.total_downloads"]}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "The number of impressions of ad group in a given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on ad group in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}, "tap_total_downloads": {"name": "tap_total_downloads", "description": "The sum of `tap_new_downloads` and `tap_redownloads`. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `total_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_total_downloads"]}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.1212127, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__ad_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_apple_search_ads__ad_report') }}\n), \n\nad as (\n\n select * \n from {{ ref('stg_apple_search_ads__ad_history') }}\n where is_most_recent_record = True\n), \n\nad_group as (\n\n select * \n from {{ ref('stg_apple_search_ads__ad_group_history') }}\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from {{ ref('stg_apple_search_ads__campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ ref('stg_apple_search_ads__organization') }}\n), \n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n organization.organization_id,\n organization.organization_name,\n report.campaign_id, \n campaign.campaign_name, \n report.ad_group_id,\n ad_group.ad_group_name,\n report.ad_id,\n ad.ad_name,\n report.currency,\n ad.ad_status,\n sum(report.taps) as taps,\n sum(report.new_downloads) as new_downloads, -- this will be deprecated shortly; please reference tap_new_downloads instead\n sum(report.tap_new_downloads) as tap_new_downloads,\n sum(report.redownloads) as redownloads, -- this will be deprecated shortly; please reference tap_redownloads instead\n sum(report.tap_redownloads) as tap_redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads, -- this will be deprecated shortly; please reference tap_total_downloads instead\n sum(report.tap_new_downloads + report.tap_redownloads) as tap_total_downloads,\n sum(report.conversions) as conversions, -- this will be deprecated shortly; please reference tap_installs instead\n sum(report.tap_installs) as tap_installs,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ apple_search_ads_persist_pass_through_columns(\n pass_through_variable = 'apple_search_ads__ad_passthrough_metrics',\n identifier = 'report',\n transform = 'sum',\n coalesce_with = 0,\n exclude_fields = ['conversions']) }}\n\n from report\n left join ad \n on report.ad_id = ad.ad_id\n and report.source_relation = ad.source_relation\n left join ad_group \n on report.ad_group_id = ad_group.ad_group_id\n and report.source_relation = ad_group.source_relation\n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join organization \n on ad.organization_id = organization.organization_id\n and ad.source_relation = organization.source_relation\n {{ dbt_utils.group_by(12) }}\n)\n\nselect * \nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_report", "package": null, "version": null}, {"name": "stg_apple_search_ads__ad_history", "package": null, "version": null}, {"name": "stg_apple_search_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_apple_search_ads__campaign_history", "package": null, "version": null}, {"name": "stg_apple_search_ads__organization", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.apple_search_ads.apple_search_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_report", "model.apple_search_ads.stg_apple_search_ads__ad_history", "model.apple_search_ads.stg_apple_search_ads__ad_group_history", "model.apple_search_ads.stg_apple_search_ads__campaign_history", "model.apple_search_ads.stg_apple_search_ads__organization"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__ad_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_report\"\n), \n\nad as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_history\"\n where is_most_recent_record = True\n), \n\nad_group as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_history\"\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__organization\"\n), \n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n organization.organization_id,\n organization.organization_name,\n report.campaign_id, \n campaign.campaign_name, \n report.ad_group_id,\n ad_group.ad_group_name,\n report.ad_id,\n ad.ad_name,\n report.currency,\n ad.ad_status,\n sum(report.taps) as taps,\n sum(report.new_downloads) as new_downloads, -- this will be deprecated shortly; please reference tap_new_downloads instead\n sum(report.tap_new_downloads) as tap_new_downloads,\n sum(report.redownloads) as redownloads, -- this will be deprecated shortly; please reference tap_redownloads instead\n sum(report.tap_redownloads) as tap_redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads, -- this will be deprecated shortly; please reference tap_total_downloads instead\n sum(report.tap_new_downloads + report.tap_redownloads) as tap_total_downloads,\n sum(report.conversions) as conversions, -- this will be deprecated shortly; please reference tap_installs instead\n sum(report.tap_installs) as tap_installs,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n\n from report\n left join ad \n on report.ad_id = ad.ad_id\n and report.source_relation = ad.source_relation\n left join ad_group \n on report.ad_group_id = ad_group.ad_group_id\n and report.source_relation = ad_group.source_relation\n left join campaign \n on report.campaign_id = campaign.campaign_id\n and report.source_relation = campaign.source_relation\n left join organization \n on ad.organization_id = organization.organization_id\n and ad.source_relation = organization.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12\n)\n\nselect * \nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.apple_search_ads__keyword_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "apple_search_ads__keyword_report", "resource_type": "model", "package_name": "apple_search_ads", "path": "apple_search_ads__keyword_report.sql", "original_file_path": "models/apple_search_ads__keyword_report.sql", "unique_id": "model.apple_search_ads.apple_search_ads__keyword_report", "fqn": ["apple_search_ads", "apple_search_ads__keyword_report"], "alias": "apple_search_ads__keyword_report", "checksum": {"name": "sha256", "checksum": "f2be26f2c5201a53fa11d8663fa3d732c837a28cbda667ca542380b90bc4a2e8"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily ad performance of each creative set.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_id": {"name": "keyword_id", "description": "Creative set name associatd with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_text": {"name": "keyword_text", "description": "Creative set ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; EXACT or BROAD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_status": {"name": "keyword_status", "description": "The status of the keyword associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "taps": {"name": "taps", "description": "Number of taps on keyword on given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "total_downloads": {"name": "total_downloads", "description": "The sum of `new_downloads` and `redownloads`. Following the [release](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) of Apple Search Ads API v5, the package will sunset this field by April 2025. Please refer to its replacement, `tap_total_downloads`, instead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.total_downloads"]}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "The number of impressions of keyword in a given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on keyword in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}, "tap_total_downloads": {"name": "tap_total_downloads", "description": "The sum of `tap_new_downloads` and `tap_redownloads`. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `total_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_total_downloads"]}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.125775, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__keyword_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_apple_search_ads__keyword_report') }}\n), \n\nkeyword as (\n\n select *\n from {{ ref('stg_apple_search_ads__keyword_history') }}\n where is_most_recent_record = True\n), \n\nad_group as (\n\n select *\n from {{ ref('stg_apple_search_ads__ad_group_history') }}\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from {{ ref('stg_apple_search_ads__campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ ref('stg_apple_search_ads__organization') }}\n), \n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n organization.organization_id,\n organization.organization_name,\n campaign.campaign_id, \n campaign.campaign_name, \n ad_group.ad_group_id,\n ad_group.ad_group_name,\n report.keyword_id,\n keyword.keyword_text,\n keyword.match_type,\n report.currency,\n keyword.keyword_status,\n sum(report.taps) as taps,\n sum(report.new_downloads) as new_downloads, -- this will be deprecated shortly; please reference tap_new_downloads instead\n sum(report.tap_new_downloads) as tap_new_downloads,\n sum(report.redownloads) as redownloads, -- this will be deprecated shortly; please reference tap_redownloads instead\n sum(report.tap_redownloads) as tap_redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads, -- this will be deprecated shortly; please reference tap_total_downloads instead\n sum(report.tap_new_downloads + report.tap_redownloads) as tap_total_downloads,\n sum(report.conversions) as conversions, -- this will be deprecated shortly; please reference tap_installs instead\n sum(report.tap_installs) as tap_installs,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ apple_search_ads_persist_pass_through_columns(\n pass_through_variable = 'apple_search_ads__keyword_passthrough_metrics',\n identifier = 'report',\n transform = 'sum',\n coalesce_with = 0,\n exclude_fields = ['conversions']) }}\n\n from report\n left join keyword \n on report.keyword_id = keyword.keyword_id\n and report.source_relation = keyword.source_relation\n left join ad_group \n on keyword.ad_group_id = ad_group.ad_group_id\n and keyword.source_relation = ad_group.source_relation\n left join campaign \n on ad_group.campaign_id = campaign.campaign_id\n and ad_group.source_relation = campaign.source_relation\n left join organization \n on ad_group.organization_id = organization.organization_id\n and ad_group.source_relation = organization.source_relation\n {{ dbt_utils.group_by(13) }}\n)\n\nselect * \nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__keyword_report", "package": null, "version": null}, {"name": "stg_apple_search_ads__keyword_history", "package": null, "version": null}, {"name": "stg_apple_search_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_apple_search_ads__campaign_history", "package": null, "version": null}, {"name": "stg_apple_search_ads__organization", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.apple_search_ads.apple_search_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__keyword_report", "model.apple_search_ads.stg_apple_search_ads__keyword_history", "model.apple_search_ads.stg_apple_search_ads__ad_group_history", "model.apple_search_ads.stg_apple_search_ads__campaign_history", "model.apple_search_ads.stg_apple_search_ads__organization"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__keyword_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__keyword_report\"\n), \n\nkeyword as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__keyword_history\"\n where is_most_recent_record = True\n), \n\nad_group as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_history\"\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__organization\"\n), \n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n organization.organization_id,\n organization.organization_name,\n campaign.campaign_id, \n campaign.campaign_name, \n ad_group.ad_group_id,\n ad_group.ad_group_name,\n report.keyword_id,\n keyword.keyword_text,\n keyword.match_type,\n report.currency,\n keyword.keyword_status,\n sum(report.taps) as taps,\n sum(report.new_downloads) as new_downloads, -- this will be deprecated shortly; please reference tap_new_downloads instead\n sum(report.tap_new_downloads) as tap_new_downloads,\n sum(report.redownloads) as redownloads, -- this will be deprecated shortly; please reference tap_redownloads instead\n sum(report.tap_redownloads) as tap_redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads, -- this will be deprecated shortly; please reference tap_total_downloads instead\n sum(report.tap_new_downloads + report.tap_redownloads) as tap_total_downloads,\n sum(report.conversions) as conversions, -- this will be deprecated shortly; please reference tap_installs instead\n sum(report.tap_installs) as tap_installs,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n\n from report\n left join keyword \n on report.keyword_id = keyword.keyword_id\n and report.source_relation = keyword.source_relation\n left join ad_group \n on keyword.ad_group_id = ad_group.ad_group_id\n and keyword.source_relation = ad_group.source_relation\n left join campaign \n on ad_group.campaign_id = campaign.campaign_id\n and ad_group.source_relation = campaign.source_relation\n left join organization \n on ad_group.organization_id = organization.organization_id\n and ad_group.source_relation = organization.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13\n)\n\nselect * \nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.apple_search_ads__ad_group_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "apple_search_ads__ad_group_report", "resource_type": "model", "package_name": "apple_search_ads", "path": "apple_search_ads__ad_group_report.sql", "original_file_path": "models/apple_search_ads__ad_group_report.sql", "unique_id": "model.apple_search_ads.apple_search_ads__ad_group_report", "fqn": ["apple_search_ads", "apple_search_ads__ad_group_report"], "alias": "apple_search_ads__ad_group_report", "checksum": {"name": "sha256", "checksum": "143293addca99cbc932d856cec5e337bd8658eed58d340d4c00a7cd109773935"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily ad performance of each ad group.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "organization_name": {"name": "organization_name", "description": "Organization name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_status": {"name": "ad_group_status", "description": "The status of the ad group associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_at": {"name": "start_at", "description": "The start timestamp for this ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_at": {"name": "end_at", "description": "The end timestamp for this ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "Date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "taps": {"name": "taps", "description": "Number of taps on ad group on given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "total_downloads": {"name": "total_downloads", "description": "The sum of `new_downloads` and `redownloads`. Following the [release](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) of Apple Search Ads API v5, the package will sunset this field by April 2025. Please refer to its replacement, `tap_total_downloads`, instead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.total_downloads"]}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "The number of impressions of ad group in a given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on ad group in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}, "tap_total_downloads": {"name": "tap_total_downloads", "description": "The sum of `tap_new_downloads` and `tap_redownloads`. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `total_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_total_downloads"]}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.1185358, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__ad_group_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_apple_search_ads__ad_group_report') }}\n), \n\nad_group as (\n\n select * \n from {{ ref('stg_apple_search_ads__ad_group_history') }}\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from {{ ref('stg_apple_search_ads__campaign_history') }}\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from {{ ref('stg_apple_search_ads__organization') }}\n), \n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n organization.organization_id,\n organization.organization_name,\n campaign.campaign_id, \n campaign.campaign_name, \n report.ad_group_id,\n ad_group.ad_group_name,\n report.currency,\n ad_group.ad_group_status,\n ad_group.start_at, \n ad_group.end_at,\n sum(report.taps) as taps,\n sum(report.new_downloads) as new_downloads, -- this will be deprecated shortly; please reference tap_new_downloads instead\n sum(report.tap_new_downloads) as tap_new_downloads,\n sum(report.redownloads) as redownloads, -- this will be deprecated shortly; please reference tap_redownloads instead\n sum(report.tap_redownloads) as tap_redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads, -- this will be deprecated shortly; please reference tap_total_downloads instead\n sum(report.tap_new_downloads + report.tap_redownloads) as tap_total_downloads,\n sum(report.conversions) as conversions, -- this will be deprecated shortly; please reference tap_installs instead\n sum(report.tap_installs) as tap_installs,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n {{ apple_search_ads_persist_pass_through_columns(\n pass_through_variable = 'apple_search_ads__ad_group_passthrough_metrics',\n identifier = 'report',\n transform = 'sum',\n coalesce_with = 0,\n exclude_fields = ['conversions']) }}\n\n from report\n left join ad_group \n on report.ad_group_id = ad_group.ad_group_id\n and report.source_relation = ad_group.source_relation\n left join campaign \n on ad_group.campaign_id = campaign.campaign_id\n and ad_group.source_relation = campaign.source_relation\n left join organization \n on ad_group.organization_id = organization.organization_id\n and ad_group.source_relation = organization.source_relation\n {{ dbt_utils.group_by(12) }}\n)\n\nselect * \nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_group_report", "package": null, "version": null}, {"name": "stg_apple_search_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_apple_search_ads__campaign_history", "package": null, "version": null}, {"name": "stg_apple_search_ads__organization", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.apple_search_ads.apple_search_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_group_report", "model.apple_search_ads.stg_apple_search_ads__ad_group_history", "model.apple_search_ads.stg_apple_search_ads__campaign_history", "model.apple_search_ads.stg_apple_search_ads__organization"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads__ad_group_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_group_report\"\n), \n\nad_group as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\ncampaign as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_history\"\n where is_most_recent_record = True\n), \n\norganization as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__organization\"\n), \n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n organization.organization_id,\n organization.organization_name,\n campaign.campaign_id, \n campaign.campaign_name, \n report.ad_group_id,\n ad_group.ad_group_name,\n report.currency,\n ad_group.ad_group_status,\n ad_group.start_at, \n ad_group.end_at,\n sum(report.taps) as taps,\n sum(report.new_downloads) as new_downloads, -- this will be deprecated shortly; please reference tap_new_downloads instead\n sum(report.tap_new_downloads) as tap_new_downloads,\n sum(report.redownloads) as redownloads, -- this will be deprecated shortly; please reference tap_redownloads instead\n sum(report.tap_redownloads) as tap_redownloads,\n sum(report.new_downloads + report.redownloads) as total_downloads, -- this will be deprecated shortly; please reference tap_total_downloads instead\n sum(report.tap_new_downloads + report.tap_redownloads) as tap_total_downloads,\n sum(report.conversions) as conversions, -- this will be deprecated shortly; please reference tap_installs instead\n sum(report.tap_installs) as tap_installs,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend\n\n \n\n\n\n\n\n from report\n left join ad_group \n on report.ad_group_id = ad_group.ad_group_id\n and report.source_relation = ad_group.source_relation\n left join campaign \n on ad_group.campaign_id = campaign.campaign_id\n and ad_group.source_relation = campaign.source_relation\n left join organization \n on ad_group.organization_id = organization.organization_id\n and ad_group.source_relation = organization.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12\n)\n\nselect * \nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__ad_group_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_group_history", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/stg_apple_search_ads__ad_group_history.sql", "original_file_path": "models/staging/stg_apple_search_ads__ad_group_history.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_group_history", "fqn": ["apple_search_ads", "staging", "stg_apple_search_ads__ad_group_history"], "alias": "stg_apple_search_ads__ad_group_history", "checksum": {"name": "sha256", "checksum": "d28835e6041fe9a60999e589d81356dc623ae33b79f5f9035ca286d19f3f39ba"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of an ad group in Apple Search Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "modified_at": {"name": "modified_at", "description": "Timestamp of when the ad group object was last modified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean indicating whether record was the most recent instance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_at": {"name": "start_at", "description": "The designated ad group start time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_at": {"name": "end_at", "description": "The designated ad group end time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The current status of the ad group, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/staging/stg_apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.187012, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_group_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_apple_search_ads__ad_group_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_apple_search_ads__ad_group_history_tmp')),\n staging_columns=get_ad_group_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='apple_search_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n modification_time as modified_at,\n organization_id,\n campaign_id,\n name as ad_group_name,\n id as ad_group_id,\n status as ad_group_status,\n start_time as start_at,\n end_time as end_at,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='apple_search_ads') }} order by modification_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_group_history_tmp", "package": null, "version": null}, {"name": "stg_apple_search_ads__ad_group_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.apple_search_ads.get_ad_group_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_group_history_tmp"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads__ad_group_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_group_history_tmp\"\n),\n\nfields as (\n\n select\n \n campaign_id as campaign_id,\n end_time as end_time,\n id as id,\n modification_time as modification_time,\n name as name,\n organization_id as organization_id,\n start_time as start_time,\n status as status\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n modification_time as modified_at,\n organization_id,\n campaign_id,\n name as ad_group_name,\n id as ad_group_id,\n status as ad_group_status,\n start_time as start_at,\n end_time as end_at,\n row_number() over (partition by id order by modification_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__keyword_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__keyword_history", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/stg_apple_search_ads__keyword_history.sql", "original_file_path": "models/staging/stg_apple_search_ads__keyword_history.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__keyword_history", "fqn": ["apple_search_ads", "staging", "stg_apple_search_ads__keyword_history"], "alias": "stg_apple_search_ads__keyword_history", "checksum": {"name": "sha256", "checksum": "d3607fcd2c05eadb450186eb6c056c3f6b99e72226bbf1aeafda59a7fd1b6e45"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of a keyword in Apple Search Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "modified_at": {"name": "modified_at", "description": "Timestamp of when the keyword object was last modified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_id": {"name": "keyword_id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_amount": {"name": "bid_amount", "description": "The bid amount to display your ad for the matching text value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_currency": {"name": "bid_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; EXACT or BROAD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The current status of the keyword, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_text": {"name": "keyword_text", "description": "The word or phrase to match in user searches, to show respective ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/staging/stg_apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.1941419, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__keyword_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_apple_search_ads__keyword_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_apple_search_ads__keyword_history_tmp')),\n staging_columns=get_keyword_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='apple_search_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n modification_time as modified_at,\n campaign_id,\n ad_group_id,\n id as keyword_id,\n bid_amount, \n bid_currency,\n match_type,\n status as keyword_status,\n text as keyword_text,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='apple_search_ads') }} order by modification_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__keyword_history_tmp", "package": null, "version": null}, {"name": "stg_apple_search_ads__keyword_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.apple_search_ads.get_keyword_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__keyword_history_tmp"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads__keyword_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__keyword_history_tmp\"\n),\n\nfields as (\n\n select\n \n ad_group_id as ad_group_id,\n bid_amount as bid_amount,\n bid_currency as bid_currency,\n campaign_id as campaign_id,\n id as id,\n match_type as match_type,\n modification_time as modification_time,\n status as status,\n text as text\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n modification_time as modified_at,\n campaign_id,\n ad_group_id,\n id as keyword_id,\n bid_amount, \n bid_currency,\n match_type,\n status as keyword_status,\n text as keyword_text,\n row_number() over (partition by id order by modification_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__keyword_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__keyword_report", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/stg_apple_search_ads__keyword_report.sql", "original_file_path": "models/staging/stg_apple_search_ads__keyword_report.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__keyword_report", "fqn": ["apple_search_ads", "staging", "stg_apple_search_ads__keyword_report"], "alias": "stg_apple_search_ads__keyword_report", "checksum": {"name": "sha256", "checksum": "50f0ddc5757e5d570c398d37a4c787d706fa02c99ddadf2f06ec1f854839475d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a keyword in Apple Search Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "keyword_id": {"name": "keyword_id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The sum of costs associated with the number of impressions served; Spend is measured in the currency used in the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/staging/stg_apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.1953256, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__keyword_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_apple_search_ads__keyword_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_apple_search_ads__keyword_report_tmp')),\n staging_columns=get_keyword_report_columns()\n )\n }} \n \n {{ fivetran_utils.apply_source_relation(package_name='apple_search_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n id as keyword_id,\n impressions,\n local_spend_amount as spend,\n local_spend_currency as currency,\n coalesce(conversions, tap_installs) as conversions, \n coalesce(tap_installs, conversions) as tap_installs,\n coalesce(new_downloads, tap_new_downloads) as new_downloads,\n coalesce(tap_new_downloads, new_downloads) as tap_new_downloads,\n coalesce(redownloads, tap_redownloads) as redownloads,\n coalesce(tap_redownloads, redownloads) as tap_redownloads,\n taps\n\n {{ apple_search_ads_fill_pass_through_columns(\n pass_through_fields=var('apple_search_ads__keyword_passthrough_metrics'),\n except=['conversions']) }}\n\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__keyword_report_tmp", "package": null, "version": null}, {"name": "stg_apple_search_ads__keyword_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.apple_search_ads.get_keyword_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.apple_search_ads.apple_search_ads_fill_pass_through_columns"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__keyword_report_tmp"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads__keyword_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__keyword_report_tmp\"\n),\n\nfields as (\n\n select\n \n date as date,\n id as id,\n conversions as conversions,\n impressions as impressions,\n local_spend_amount as local_spend_amount,\n local_spend_currency as local_spend_currency,\n new_downloads as new_downloads,\n redownloads as redownloads,\n taps as taps,\n tap_installs as tap_installs,\n tap_new_downloads as tap_new_downloads,\n tap_redownloads as tap_redownloads \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n id as keyword_id,\n impressions,\n local_spend_amount as spend,\n local_spend_currency as currency,\n coalesce(conversions, tap_installs) as conversions, \n coalesce(tap_installs, conversions) as tap_installs,\n coalesce(new_downloads, tap_new_downloads) as new_downloads,\n coalesce(tap_new_downloads, new_downloads) as tap_new_downloads,\n coalesce(redownloads, tap_redownloads) as redownloads,\n coalesce(tap_redownloads, redownloads) as tap_redownloads,\n taps\n\n \n\n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__campaign_report", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/stg_apple_search_ads__campaign_report.sql", "original_file_path": "models/staging/stg_apple_search_ads__campaign_report.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__campaign_report", "fqn": ["apple_search_ads", "staging", "stg_apple_search_ads__campaign_report"], "alias": "stg_apple_search_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "22b08c44b9acff0431ba1f4ebea355752f8d1ca96353bed27a4b8fa4509439b7"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a campaign in Apple Search Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The sum of costs associated with the number of impressions served; Spend is measured in the currency used in the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/staging/stg_apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.19297, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_apple_search_ads__campaign_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_apple_search_ads__campaign_report_tmp')),\n staging_columns=get_campaign_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='apple_search_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n id as campaign_id,\n impressions,\n local_spend_amount as spend,\n local_spend_currency as currency,\n coalesce(conversions, tap_installs) as conversions, \n coalesce(tap_installs, conversions) as tap_installs,\n coalesce(new_downloads, tap_new_downloads) as new_downloads,\n coalesce(tap_new_downloads, new_downloads) as tap_new_downloads,\n coalesce(redownloads, tap_redownloads) as redownloads,\n coalesce(tap_redownloads, redownloads) as tap_redownloads,\n taps\n\n {{ apple_search_ads_fill_pass_through_columns(\n pass_through_fields=var('apple_search_ads__campaign_passthrough_metrics'),\n except=['conversions']) }}\n\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__campaign_report_tmp", "package": null, "version": null}, {"name": "stg_apple_search_ads__campaign_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.apple_search_ads.get_campaign_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.apple_search_ads.apple_search_ads_fill_pass_through_columns"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__campaign_report_tmp"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_report_tmp\"\n),\n\nfields as (\n\n select\n \n date as date,\n id as id,\n conversions as conversions,\n impressions as impressions,\n local_spend_amount as local_spend_amount,\n local_spend_currency as local_spend_currency,\n new_downloads as new_downloads,\n redownloads as redownloads,\n taps as taps,\n tap_installs as tap_installs,\n tap_new_downloads as tap_new_downloads,\n tap_redownloads as tap_redownloads\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n id as campaign_id,\n impressions,\n local_spend_amount as spend,\n local_spend_currency as currency,\n coalesce(conversions, tap_installs) as conversions, \n coalesce(tap_installs, conversions) as tap_installs,\n coalesce(new_downloads, tap_new_downloads) as new_downloads,\n coalesce(tap_new_downloads, new_downloads) as tap_new_downloads,\n coalesce(redownloads, tap_redownloads) as redownloads,\n coalesce(tap_redownloads, redownloads) as tap_redownloads,\n taps\n\n \n\n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__search_term_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__search_term_report", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/stg_apple_search_ads__search_term_report.sql", "original_file_path": "models/staging/stg_apple_search_ads__search_term_report.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__search_term_report", "fqn": ["apple_search_ads", "staging", "stg_apple_search_ads__search_term_report"], "alias": "stg_apple_search_ads__search_term_report", "checksum": {"name": "sha256", "checksum": "4431d47543deacdca5eceb02e472423f250b5283a6e3b827e9d6092a3a230e43"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a search term in Apple Search Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "_fivetran_id": {"name": "_fivetran_id", "description": "A Fivetran internal unique id that helps us avoid duplicate rows in primary keyless tables.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_format": {"name": "ad_format", "description": "Format of creative set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_amount": {"name": "bid_amount", "description": "The bid amount to display your ad for the matching text value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_currency": {"name": "bid_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_text": {"name": "keyword_text", "description": "The word or phrase to match in user searches, to show respective ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_display_status": {"name": "keyword_display_status", "description": "The keyword display status can either be ACTIVE or PAUSED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_id": {"name": "keyword_id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The sum of costs associated with the number of impressions served; Spend is measured in the currency used in the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; values include EXACT, BROAD or AUTO.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "search_term_source": {"name": "search_term_source", "description": "The search term source can either be TARGETED or AUTO; if this value is AUTO so will match_type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "search_term_text": {"name": "search_term_text", "description": "The word or phrase to match of user searches.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/staging/stg_apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.1982236, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__search_term_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__apple_search_ads_enabled','apple_search_ads__using_search_terms'])) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_apple_search_ads__search_term_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_apple_search_ads__search_term_report_tmp')),\n staging_columns=get_search_term_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='apple_search_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n _fivetran_id,\n campaign_id,\n ad_group_id,\n ad_group_name,\n bid_amount_amount as bid_amount,\n bid_amount_currency as bid_currency,\n keyword as keyword_text,\n keyword_display_status,\n keyword_id,\n local_spend_amount as spend,\n local_spend_currency as currency,\n match_type,\n search_term_source,\n search_term_text,\n impressions,\n taps,\n coalesce(conversions, tap_installs) as conversions, \n coalesce(tap_installs, conversions) as tap_installs,\n coalesce(new_downloads, tap_new_downloads) as new_downloads,\n coalesce(tap_new_downloads, new_downloads) as tap_new_downloads,\n coalesce(redownloads, tap_redownloads) as redownloads,\n coalesce(tap_redownloads, redownloads) as tap_redownloads\n\n {{ apple_search_ads_fill_pass_through_columns(\n pass_through_fields=var('apple_search_ads__search_term_passthrough_metrics'),\n except=['conversions']) }}\n\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__search_term_report_tmp", "package": null, "version": null}, {"name": "stg_apple_search_ads__search_term_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.apple_search_ads.get_search_term_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.apple_search_ads.apple_search_ads_fill_pass_through_columns"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__search_term_report_tmp"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads__search_term_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__search_term_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_id as _fivetran_id,\n ad_group_deleted as ad_group_deleted,\n ad_group_id as ad_group_id,\n ad_group_name as ad_group_name,\n bid_amount_amount as bid_amount_amount,\n bid_amount_currency as bid_amount_currency,\n campaign_id as campaign_id,\n date as date,\n deleted as deleted,\n conversions as conversions,\n impressions as impressions,\n keyword as keyword,\n keyword_display_status as keyword_display_status,\n keyword_id as keyword_id,\n local_spend_amount as local_spend_amount,\n local_spend_currency as local_spend_currency,\n match_type as match_type,\n new_downloads as new_downloads,\n redownloads as redownloads,\n search_term_source as search_term_source,\n search_term_text as search_term_text,\n taps as taps,\n tap_installs as tap_installs,\n tap_new_downloads as tap_new_downloads,\n tap_redownloads as tap_redownloads\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n _fivetran_id,\n campaign_id,\n ad_group_id,\n ad_group_name,\n bid_amount_amount as bid_amount,\n bid_amount_currency as bid_currency,\n keyword as keyword_text,\n keyword_display_status,\n keyword_id,\n local_spend_amount as spend,\n local_spend_currency as currency,\n match_type,\n search_term_source,\n search_term_text,\n impressions,\n taps,\n coalesce(conversions, tap_installs) as conversions, \n coalesce(tap_installs, conversions) as tap_installs,\n coalesce(new_downloads, tap_new_downloads) as new_downloads,\n coalesce(tap_new_downloads, new_downloads) as tap_new_downloads,\n coalesce(redownloads, tap_redownloads) as redownloads,\n coalesce(tap_redownloads, redownloads) as tap_redownloads\n\n \n\n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__campaign_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__campaign_history", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/stg_apple_search_ads__campaign_history.sql", "original_file_path": "models/staging/stg_apple_search_ads__campaign_history.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__campaign_history", "fqn": ["apple_search_ads", "staging", "stg_apple_search_ads__campaign_history"], "alias": "stg_apple_search_ads__campaign_history", "checksum": {"name": "sha256", "checksum": "811e8cac6c9d16842fc234b3f9b553739bf877cf94d1bd1c32c0459652719ca9"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of a campaign in Apple Search Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "modified_at": {"name": "modified_at", "description": "Timestamp of when the campaign object was last modified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_at": {"name": "start_at", "description": "The designated ad group start time (ad group with the earliest start time associated with this campaign).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_at": {"name": "end_at", "description": "The designated campaign end time (ad group with the latest start time associated with this campaign).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name for the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The current status of the campaign, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/staging/stg_apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.1917799, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_apple_search_ads__campaign_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_apple_search_ads__campaign_history_tmp')),\n staging_columns=get_campaign_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='apple_search_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n modification_time as modified_at,\n organization_id,\n name as campaign_name,\n id as campaign_id,\n status as campaign_status,\n start_time as start_at,\n end_time as end_at,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='apple_search_ads') }} order by modification_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__campaign_history_tmp", "package": null, "version": null}, {"name": "stg_apple_search_ads__campaign_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.apple_search_ads.get_campaign_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__campaign_history_tmp"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads__campaign_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_history_tmp\"\n),\n\nfields as (\n\n select\n \n end_time as end_time,\n id as id,\n modification_time as modification_time,\n name as name,\n organization_id as organization_id,\n start_time as start_time,\n status as status\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n modification_time as modified_at,\n organization_id,\n name as campaign_name,\n id as campaign_id,\n status as campaign_status,\n start_time as start_at,\n end_time as end_at,\n row_number() over (partition by id order by modification_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__ad_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_report", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/stg_apple_search_ads__ad_report.sql", "original_file_path": "models/staging/stg_apple_search_ads__ad_report.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_report", "fqn": ["apple_search_ads", "staging", "stg_apple_search_ads__ad_report"], "alias": "stg_apple_search_ads__ad_report", "checksum": {"name": "sha256", "checksum": "58a74d74b050dd4c8cbbc4bbc1c4fb5ae40d849567d84037d3f91e02da72fc40"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of an ad in Apple Search Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_id": {"name": "ad_id", "description": "Ad ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The sum of costs associated with the number of impressions served; Spend is measured in the currency used in the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/staging/stg_apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.1906939, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_apple_search_ads__ad_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_apple_search_ads__ad_report_tmp')),\n staging_columns=get_ad_level_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='apple_search_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n campaign_id,\n ad_group_id,\n ad_id,\n impressions,\n local_spend_amount as spend,\n local_spend_currency as currency,\n coalesce(conversions, tap_installs) as conversions, \n coalesce(tap_installs, conversions) as tap_installs,\n coalesce(new_downloads, tap_new_downloads) as new_downloads,\n coalesce(tap_new_downloads, new_downloads) as tap_new_downloads,\n coalesce(redownloads, tap_redownloads) as redownloads,\n coalesce(tap_redownloads, redownloads) as tap_redownloads,\n taps\n\n {{ apple_search_ads_fill_pass_through_columns(\n pass_through_fields=var('apple_search_ads__ad_passthrough_metrics'),\n except=['conversions']) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_report_tmp", "package": null, "version": null}, {"name": "stg_apple_search_ads__ad_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.apple_search_ads.get_ad_level_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.apple_search_ads.apple_search_ads_fill_pass_through_columns"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_report_tmp"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads__ad_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_report_tmp\"\n),\n\nfields as (\n\n select\n \n ad_group_id as ad_group_id,\n ad_id as ad_id,\n campaign_id as campaign_id,\n date as date,\n conversions as conversions,\n impressions as impressions,\n local_spend_amount as local_spend_amount,\n local_spend_currency as local_spend_currency,\n new_downloads as new_downloads,\n redownloads as redownloads,\n taps as taps,\n tap_installs as tap_installs,\n tap_new_downloads as tap_new_downloads,\n tap_redownloads as tap_redownloads\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n campaign_id,\n ad_group_id,\n ad_id,\n impressions,\n local_spend_amount as spend,\n local_spend_currency as currency,\n coalesce(conversions, tap_installs) as conversions, \n coalesce(tap_installs, conversions) as tap_installs,\n coalesce(new_downloads, tap_new_downloads) as new_downloads,\n coalesce(tap_new_downloads, new_downloads) as tap_new_downloads,\n coalesce(redownloads, tap_redownloads) as redownloads,\n coalesce(tap_redownloads, redownloads) as tap_redownloads,\n taps\n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__ad_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_history", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/stg_apple_search_ads__ad_history.sql", "original_file_path": "models/staging/stg_apple_search_ads__ad_history.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_history", "fqn": ["apple_search_ads", "staging", "stg_apple_search_ads__ad_history"], "alias": "stg_apple_search_ads__ad_history", "checksum": {"name": "sha256", "checksum": "ec8551f5ea5fc3a9c70339824c8891445e2c0b6e1a08a34bb702c76e75331511"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of an ad in Apple Search Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "created_at": {"name": "created_at", "description": "Timestamp of when ad was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "modified_at": {"name": "modified_at", "description": "Timestamp of when the ad object was last modified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_name": {"name": "ad_name", "description": "Ad name associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_id": {"name": "ad_id", "description": "Ad ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_status": {"name": "ad_status", "description": "The current status of the ad, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/staging/stg_apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.189381, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_apple_search_ads__ad_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_apple_search_ads__ad_history_tmp')),\n staging_columns=get_ad_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='apple_search_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n creation_time as created_at,\n modification_time as modified_at,\n org_id as organization_id,\n campaign_id,\n ad_group_id,\n name as ad_name,\n id as ad_id,\n status as ad_status, \n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='apple_search_ads') }} order by modification_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_history_tmp", "package": null, "version": null}, {"name": "stg_apple_search_ads__ad_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.apple_search_ads.get_ad_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_history_tmp"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads__ad_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_history_tmp\"\n),\n\nfields as (\n\n select\n \n ad_group_id as ad_group_id,\n campaign_id as campaign_id,\n creation_time as creation_time,\n id as id,\n modification_time as modification_time,\n name as name,\n org_id as org_id,\n status as status\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n creation_time as created_at,\n modification_time as modified_at,\n org_id as organization_id,\n campaign_id,\n ad_group_id,\n name as ad_name,\n id as ad_id,\n status as ad_status, \n row_number() over (partition by id order by modification_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__ad_group_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_group_report", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/stg_apple_search_ads__ad_group_report.sql", "original_file_path": "models/staging/stg_apple_search_ads__ad_group_report.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_group_report", "fqn": ["apple_search_ads", "staging", "stg_apple_search_ads__ad_group_report"], "alias": "stg_apple_search_ads__ad_group_report", "checksum": {"name": "sha256", "checksum": "0874ddfd3985298c7f9f31959c72f44b89683e07e9508d29a2fcf6332e317db8"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of an ad group in Apple Search Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The sum of costs associated with the number of impressions served. Spend is measured in the currency used in the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/staging/stg_apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.1883435, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_group_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_apple_search_ads__ad_group_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_apple_search_ads__ad_group_report_tmp')),\n staging_columns=get_ad_group_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='apple_search_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n date as date_day, \n ad_group_id,\n impressions,\n local_spend_amount as spend,\n local_spend_currency as currency,\n coalesce(conversions, tap_installs) as conversions, \n coalesce(tap_installs, conversions) as tap_installs,\n coalesce(new_downloads, tap_new_downloads) as new_downloads,\n coalesce(tap_new_downloads, new_downloads) as tap_new_downloads,\n coalesce(redownloads, tap_redownloads) as redownloads,\n coalesce(tap_redownloads, redownloads) as tap_redownloads,\n taps\n\n {{ apple_search_ads_fill_pass_through_columns(\n pass_through_fields=var('apple_search_ads__ad_group_passthrough_metrics'),\n except=['conversions']) }}\n\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_group_report_tmp", "package": null, "version": null}, {"name": "stg_apple_search_ads__ad_group_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.apple_search_ads.get_ad_group_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.apple_search_ads.apple_search_ads_fill_pass_through_columns"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_group_report_tmp"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads__ad_group_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_group_report_tmp\"\n),\n\nfields as (\n\n select\n \n ad_group_id as ad_group_id,\n date as date,\n conversions as conversions,\n impressions as impressions,\n local_spend_amount as local_spend_amount,\n local_spend_currency as local_spend_currency,\n new_downloads as new_downloads,\n redownloads as redownloads,\n taps as taps,\n tap_installs as tap_installs,\n tap_new_downloads as tap_new_downloads,\n tap_redownloads as tap_redownloads\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n date as date_day, \n ad_group_id,\n impressions,\n local_spend_amount as spend,\n local_spend_currency as currency,\n coalesce(conversions, tap_installs) as conversions, \n coalesce(tap_installs, conversions) as tap_installs,\n coalesce(new_downloads, tap_new_downloads) as new_downloads,\n coalesce(tap_new_downloads, new_downloads) as tap_new_downloads,\n coalesce(redownloads, tap_redownloads) as redownloads,\n coalesce(tap_redownloads, redownloads) as tap_redownloads,\n taps\n\n \n\n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__organization": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__organization", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/stg_apple_search_ads__organization.sql", "original_file_path": "models/staging/stg_apple_search_ads__organization.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__organization", "fqn": ["apple_search_ads", "staging", "stg_apple_search_ads__organization"], "alias": "stg_apple_search_ads__organization", "checksum": {"name": "sha256", "checksum": "a237fc021beae9640979eed4a7565362fa414d3ec2c48f67f799ca05d2e256c7"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents an organization in Apple Search Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.source_relation"]}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Specified currency for respective organization.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "payment_model": {"name": "payment_model", "description": "Values include 'LOC', 'PAYG' or (payment method hasn't been set).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "organization_name": {"name": "organization_name", "description": "Name of organization.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "time_zone": {"name": "time_zone", "description": "Organization default timezone; values can be ORTZ or UTC.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "apple_search_ads://models/staging/stg_apple_search_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.1961753, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__organization\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_apple_search_ads__organization_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_apple_search_ads__organization_tmp')),\n staging_columns=get_organization_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='apple_search_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as organization_id,\n currency,\n payment_model,\n name as organization_name,\n time_zone\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__organization_tmp", "package": null, "version": null}, {"name": "stg_apple_search_ads__organization_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.apple_search_ads.get_organization_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__organization_tmp"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads__organization.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__organization_tmp\"\n),\n\nfields as (\n\n select\n \n currency as currency,\n id as id,\n name as name,\n payment_model as payment_model,\n time_zone as time_zone\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as organization_id,\n currency,\n payment_model,\n name as organization_name,\n time_zone\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__ad_group_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_group_history_tmp", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/tmp/stg_apple_search_ads__ad_group_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_apple_search_ads__ad_group_history_tmp.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_group_history_tmp", "fqn": ["apple_search_ads", "staging", "tmp", "stg_apple_search_ads__ad_group_history_tmp"], "alias": "stg_apple_search_ads__ad_group_history_tmp", "checksum": {"name": "sha256", "checksum": "75b99fe16f788842517719c57c82e7f1140f88c8a5e2bdbe54e51e0c2dbc9370"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708215.029553, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_group_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\n{% if var('apple_search_ads_union_schemas', []) | length > 0 or var('apple_search_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_group_history', \n database_variable='apple_search_ads_database', \n schema_variable='apple_search_ads_schema', \n default_database=target.database,\n default_schema='apple_search_ads',\n default_variable='ad_group_history',\n union_schema_variable='apple_search_ads_union_schemas',\n union_database_variable='apple_search_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='apple_search_ads_sources',\n single_source_name='apple_search_ads',\n single_table_name='ad_group_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["apple_search_ads", "ad_group_history"], ["apple_search_ads", "ad_group_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.apple_search_ads.apple_search_ads.ad_group_history"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/tmp/stg_apple_search_ads__ad_group_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: apple_search_ads_ad_group_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: apple_search_ad_group_history_data\n\n\n select\n \"id\",\n \"modification_time\",\n \"automated_keywords_opt_in\",\n \"campaign_id\",\n \"cpa_goal_amount\",\n \"cpa_goal_currency\",\n \"default_cpc_bid_amount\",\n \"default_cpc_bid_currency\",\n \"deleted\",\n \"end_time\",\n \"name\",\n \"organization_id\",\n \"serving_state_reasons\",\n \"serving_status\",\n \"start_time\",\n \"status\",\n \"storefronts\"\n from \"postgres\".\"public\".\"apple_search_ad_group_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__campaign_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__campaign_report_tmp", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/tmp/stg_apple_search_ads__campaign_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_apple_search_ads__campaign_report_tmp.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__campaign_report_tmp", "fqn": ["apple_search_ads", "staging", "tmp", "stg_apple_search_ads__campaign_report_tmp"], "alias": "stg_apple_search_ads__campaign_report_tmp", "checksum": {"name": "sha256", "checksum": "806601e26978e61eaec0a1ae29a2879c209382c42a20bd1ca367a789fa77e1db"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708215.0403972, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\n{% if var('apple_search_ads_union_schemas', []) | length > 0 or var('apple_search_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_report', \n database_variable='apple_search_ads_database', \n schema_variable='apple_search_ads_schema', \n default_database=target.database,\n default_schema='apple_search_ads',\n default_variable='campaign_report',\n union_schema_variable='apple_search_ads_union_schemas',\n union_database_variable='apple_search_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='apple_search_ads_sources',\n single_source_name='apple_search_ads',\n single_table_name='campaign_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["apple_search_ads", "campaign_report"], ["apple_search_ads", "campaign_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.apple_search_ads.apple_search_ads.campaign_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/tmp/stg_apple_search_ads__campaign_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: apple_search_ads_campaign_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: apple_search_campaign_report_data\n\n\n select\n \"date\",\n \"id\",\n \"avg_cpa_amount\",\n \"avg_cpa_currency\",\n \"avg_cpt_amount\",\n \"avg_cpt_currency\",\n \"conversion_rate\",\n \"conversions\",\n \"impressions\",\n \"lat_off_installs\",\n \"lat_on_installs\",\n \"local_spend_amount\",\n \"local_spend_currency\",\n \"new_downloads\",\n \"redownloads\",\n \"tap_through_rate\",\n \"taps\",\n \"tap_installs\",\n \"tap_new_downloads\",\n \"tap_redownloads\"\n from \"postgres\".\"public\".\"apple_search_campaign_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__campaign_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__campaign_history_tmp", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/tmp/stg_apple_search_ads__campaign_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_apple_search_ads__campaign_history_tmp.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__campaign_history_tmp", "fqn": ["apple_search_ads", "staging", "tmp", "stg_apple_search_ads__campaign_history_tmp"], "alias": "stg_apple_search_ads__campaign_history_tmp", "checksum": {"name": "sha256", "checksum": "f3685e8e12d74d80cae84acab3ea488454cdb561c05c2d9750d266fef1340d6d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708215.0511482, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\n{% if var('apple_search_ads_union_schemas', []) | length > 0 or var('apple_search_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_history', \n database_variable='apple_search_ads_database', \n schema_variable='apple_search_ads_schema', \n default_database=target.database,\n default_schema='apple_search_ads',\n default_variable='campaign_history',\n union_schema_variable='apple_search_ads_union_schemas',\n union_database_variable='apple_search_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='apple_search_ads_sources',\n single_source_name='apple_search_ads',\n single_table_name='campaign_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["apple_search_ads", "campaign_history"], ["apple_search_ads", "campaign_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.apple_search_ads.apple_search_ads.campaign_history"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/tmp/stg_apple_search_ads__campaign_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: apple_search_ads_campaign_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: apple_search_campaign_history_data\n\n\n select\n \"id\",\n \"modification_time\",\n \"adam_id\",\n \"budget_amount\",\n \"budget_currency\",\n \"budget_orders\",\n \"daily_budget_amount\",\n \"daily_budget_currency\",\n \"deleted\",\n \"end_time\",\n \"loc_invoice_detail_buyer_email\",\n \"loc_invoice_detail_buyer_name\",\n \"loc_invoice_detail_client_name\",\n \"loc_invoice_detail_order_number\",\n \"name\",\n \"organization_id\",\n \"payment_model\",\n \"serving_state_reasons\",\n \"serving_status\",\n \"start_time\",\n \"status\"\n from \"postgres\".\"public\".\"apple_search_campaign_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__keyword_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__keyword_history_tmp", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/tmp/stg_apple_search_ads__keyword_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_apple_search_ads__keyword_history_tmp.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__keyword_history_tmp", "fqn": ["apple_search_ads", "staging", "tmp", "stg_apple_search_ads__keyword_history_tmp"], "alias": "stg_apple_search_ads__keyword_history_tmp", "checksum": {"name": "sha256", "checksum": "7a1c187e725b57fc0e2d57f647e52d97009569e9f559325be4834378a0f82e2f"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708215.062987, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__keyword_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\n{% if var('apple_search_ads_union_schemas', []) | length > 0 or var('apple_search_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='keyword_history', \n database_variable='apple_search_ads_database', \n schema_variable='apple_search_ads_schema', \n default_database=target.database,\n default_schema='apple_search_ads',\n default_variable='keyword_history',\n union_schema_variable='apple_search_ads_union_schemas',\n union_database_variable='apple_search_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='apple_search_ads_sources',\n single_source_name='apple_search_ads',\n single_table_name='keyword_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["apple_search_ads", "keyword_history"], ["apple_search_ads", "keyword_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.apple_search_ads.apple_search_ads.keyword_history"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/tmp/stg_apple_search_ads__keyword_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: apple_search_ads_keyword_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: apple_search_keyword_history_data\n\n\n select\n \"id\",\n \"modification_time\",\n \"ad_group_id\",\n \"bid_amount\",\n \"bid_currency\",\n \"campaign_id\",\n \"deleted\",\n \"match_type\",\n \"status\",\n \"text\"\n from \"postgres\".\"public\".\"apple_search_keyword_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__search_term_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__search_term_report_tmp", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/tmp/stg_apple_search_ads__search_term_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_apple_search_ads__search_term_report_tmp.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__search_term_report_tmp", "fqn": ["apple_search_ads", "staging", "tmp", "stg_apple_search_ads__search_term_report_tmp"], "alias": "stg_apple_search_ads__search_term_report_tmp", "checksum": {"name": "sha256", "checksum": "c19662b56c0269db51a0fb2fe98276e97c9fda46d46f757ee8f3942c6889d7ae"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708215.0737019, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__search_term_report_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__apple_search_ads_enabled','apple_search_ads__using_search_terms'])) }}\n\n{% if var('apple_search_ads_union_schemas', []) | length > 0 or var('apple_search_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='search_term_report', \n database_variable='apple_search_ads_database', \n schema_variable='apple_search_ads_schema', \n default_database=target.database,\n default_schema='apple_search_ads',\n default_variable='search_term_report',\n union_schema_variable='apple_search_ads_union_schemas',\n union_database_variable='apple_search_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='apple_search_ads_sources',\n single_source_name='apple_search_ads',\n single_table_name='search_term_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["apple_search_ads", "search_term_report"], ["apple_search_ads", "search_term_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.apple_search_ads.apple_search_ads.search_term_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/tmp/stg_apple_search_ads__search_term_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: apple_search_ads_search_term_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: apple_search_search_term_report_data\n\n\n select\n \"_fivetran_id\",\n \"ad_group_id\",\n \"campaign_id\",\n \"date\",\n \"ad_group_deleted\",\n \"ad_group_name\",\n \"avg_cpa_amount\",\n \"avg_cpa_currency\",\n \"avg_cpt_amount\",\n \"avg_cpt_currency\",\n \"bid_amount_amount\",\n \"bid_amount_currency\",\n \"conversion_rate\",\n \"conversions\",\n \"deleted\",\n \"impressions\",\n \"keyword\",\n \"keyword_display_status\",\n \"keyword_id\",\n \"lat_off_installs\",\n \"lat_on_installs\",\n \"local_spend_amount\",\n \"local_spend_currency\",\n \"match_type\",\n \"new_downloads\",\n \"redownloads\",\n \"search_term_source\",\n \"search_term_text\",\n \"tap_through_rate\",\n \"taps\",\n \"tap_installs\",\n \"tap_new_downloads\",\n \"tap_redownloads\"\n from \"postgres\".\"public\".\"apple_search_search_term_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__keyword_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__keyword_report_tmp", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/tmp/stg_apple_search_ads__keyword_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_apple_search_ads__keyword_report_tmp.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__keyword_report_tmp", "fqn": ["apple_search_ads", "staging", "tmp", "stg_apple_search_ads__keyword_report_tmp"], "alias": "stg_apple_search_ads__keyword_report_tmp", "checksum": {"name": "sha256", "checksum": "d41cd93af1a24bcd62aa926cb64bc83b7a4d4b33cdc6b2796e90d5247be1d6b9"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708215.0845683, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__keyword_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\n{% if var('apple_search_ads_union_schemas', []) | length > 0 or var('apple_search_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='keyword_report', \n database_variable='apple_search_ads_database', \n schema_variable='apple_search_ads_schema', \n default_database=target.database,\n default_schema='apple_search_ads',\n default_variable='keyword_report',\n union_schema_variable='apple_search_ads_union_schemas',\n union_database_variable='apple_search_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='apple_search_ads_sources',\n single_source_name='apple_search_ads',\n single_table_name='keyword_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["apple_search_ads", "keyword_report"], ["apple_search_ads", "keyword_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.apple_search_ads.apple_search_ads.keyword_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/tmp/stg_apple_search_ads__keyword_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: apple_search_ads_keyword_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: apple_search_keyword_report_data\n\n\n select\n \"date\",\n \"id\",\n \"avg_cpa_amount\",\n \"avg_cpa_currency\",\n \"avg_cpt_amount\",\n \"avg_cpt_currency\",\n \"conversion_rate\",\n \"conversions\",\n \"impressions\",\n \"lat_off_installs\",\n \"lat_on_installs\",\n \"local_spend_amount\",\n \"local_spend_currency\",\n \"new_downloads\",\n \"redownloads\",\n \"tap_through_rate\",\n \"taps\",\n \"tap_installs\",\n \"tap_new_downloads\",\n \"tap_redownloads\"\n from \"postgres\".\"public\".\"apple_search_keyword_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__ad_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_history_tmp", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/tmp/stg_apple_search_ads__ad_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_apple_search_ads__ad_history_tmp.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_history_tmp", "fqn": ["apple_search_ads", "staging", "tmp", "stg_apple_search_ads__ad_history_tmp"], "alias": "stg_apple_search_ads__ad_history_tmp", "checksum": {"name": "sha256", "checksum": "9edaf3379243d092338c4b863295cf1e021cf5623273a34ed001fdf57a6c8bf2"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708215.0962205, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\n{% if var('apple_search_ads_union_schemas', []) | length > 0 or var('apple_search_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_history', \n database_variable='apple_search_ads_database', \n schema_variable='apple_search_ads_schema', \n default_database=target.database,\n default_schema='apple_search_ads',\n default_variable='ad_history',\n union_schema_variable='apple_search_ads_union_schemas',\n union_database_variable='apple_search_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='apple_search_ads_sources',\n single_source_name='apple_search_ads',\n single_table_name='ad_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["apple_search_ads", "ad_history"], ["apple_search_ads", "ad_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.apple_search_ads.apple_search_ads.ad_history"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/tmp/stg_apple_search_ads__ad_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: apple_search_ads_ad_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: apple_search_ad_history_data\n\n\n select\n \"creation_time\",\n \"modification_time\",\n \"org_id\",\n \"campaign_id\",\n \"ad_group_id\",\n \"name\",\n \"id\",\n \"creative_id\",\n \"creative_type\",\n \"status\"\n from \"postgres\".\"public\".\"apple_search_ad_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__ad_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_report_tmp", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/tmp/stg_apple_search_ads__ad_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_apple_search_ads__ad_report_tmp.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_report_tmp", "fqn": ["apple_search_ads", "staging", "tmp", "stg_apple_search_ads__ad_report_tmp"], "alias": "stg_apple_search_ads__ad_report_tmp", "checksum": {"name": "sha256", "checksum": "ed2508015a875221eb9c01d9f6e99f08186ee01997fc038cd236d06ec2059f39"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708215.107043, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\n{% if var('apple_search_ads_union_schemas', []) | length > 0 or var('apple_search_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_level_report', \n database_variable='apple_search_ads_database', \n schema_variable='apple_search_ads_schema', \n default_database=target.database,\n default_schema='apple_search_ads',\n default_variable='ad_level_report',\n union_schema_variable='apple_search_ads_union_schemas',\n union_database_variable='apple_search_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='apple_search_ads_sources',\n single_source_name='apple_search_ads',\n single_table_name='ad_level_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["apple_search_ads", "ad_level_report"], ["apple_search_ads", "ad_level_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.apple_search_ads.apple_search_ads.ad_level_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/tmp/stg_apple_search_ads__ad_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: apple_search_ads_ad_level_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: apple_search_ad_report_data\n\n\n select\n \"date\",\n \"campaign_id\",\n \"ad_group_id\",\n \"ad_id\",\n \"impressions\",\n \"local_spend_amount\",\n \"local_spend_currency\",\n \"new_downloads\",\n \"redownloads\",\n \"tap_installs\",\n \"tap_new_downloads\",\n \"tap_redownloads\",\n \"taps\",\n \"conversions\"\n from \"postgres\".\"public\".\"apple_search_ad_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__ad_group_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__ad_group_report_tmp", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/tmp/stg_apple_search_ads__ad_group_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_apple_search_ads__ad_group_report_tmp.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__ad_group_report_tmp", "fqn": ["apple_search_ads", "staging", "tmp", "stg_apple_search_ads__ad_group_report_tmp"], "alias": "stg_apple_search_ads__ad_group_report_tmp", "checksum": {"name": "sha256", "checksum": "ad3a2f54eed05a5470b28e2a348dadb45b595f44b9f02cf91ea488abd084476a"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708215.117637, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_group_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\n{% if var('apple_search_ads_union_schemas', []) | length > 0 or var('apple_search_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_group_report', \n database_variable='apple_search_ads_database', \n schema_variable='apple_search_ads_schema', \n default_database=target.database,\n default_schema='apple_search_ads',\n default_variable='ad_group_report',\n union_schema_variable='apple_search_ads_union_schemas',\n union_database_variable='apple_search_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='apple_search_ads_sources',\n single_source_name='apple_search_ads',\n single_table_name='ad_group_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["apple_search_ads", "ad_group_report"], ["apple_search_ads", "ad_group_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.apple_search_ads.apple_search_ads.ad_group_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/tmp/stg_apple_search_ads__ad_group_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: apple_search_ads_ad_group_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: apple_search_ad_group_report_data\n\n\n select\n \"ad_group_id\",\n \"date\",\n \"avg_cpa_amount\",\n \"avg_cpa_currency\",\n \"avg_cpt_amount\",\n \"avg_cpt_currency\",\n \"conversion_rate\",\n \"conversions\",\n \"impressions\",\n \"lat_off_installs\",\n \"lat_on_installs\",\n \"local_spend_amount\",\n \"local_spend_currency\",\n \"new_downloads\",\n \"redownloads\",\n \"tap_through_rate\",\n \"taps\",\n \"tap_installs\",\n \"tap_new_downloads\",\n \"tap_redownloads\"\n from \"postgres\".\"public\".\"apple_search_ad_group_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.apple_search_ads.stg_apple_search_ads__organization_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_apple_search_ads__organization_tmp", "resource_type": "model", "package_name": "apple_search_ads", "path": "staging/tmp/stg_apple_search_ads__organization_tmp.sql", "original_file_path": "models/staging/tmp/stg_apple_search_ads__organization_tmp.sql", "unique_id": "model.apple_search_ads.stg_apple_search_ads__organization_tmp", "fqn": ["apple_search_ads", "staging", "tmp", "stg_apple_search_ads__organization_tmp"], "alias": "stg_apple_search_ads__organization_tmp", "checksum": {"name": "sha256", "checksum": "681f9d1c727372db8d81bf6c38c422c08960093460dd1f12ba5ff096178b56df"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708215.1293008, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__organization_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__apple_search_ads_enabled', True)) }}\n\n{% if var('apple_search_ads_union_schemas', []) | length > 0 or var('apple_search_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='organization', \n database_variable='apple_search_ads_database', \n schema_variable='apple_search_ads_schema', \n default_database=target.database,\n default_schema='apple_search_ads',\n default_variable='organization',\n union_schema_variable='apple_search_ads_union_schemas',\n union_database_variable='apple_search_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='apple_search_ads_sources',\n single_source_name='apple_search_ads',\n single_table_name='organization'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["apple_search_ads", "organization"], ["apple_search_ads", "organization"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.apple_search_ads.apple_search_ads.organization"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/tmp/stg_apple_search_ads__organization_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: apple_search_ads_organization_identifier\n -- database: postgres \n -- schema: public\n -- identifier: apple_search_organization_data\n\n\n select\n \"id\",\n \"currency\",\n \"name\",\n \"payment_model\",\n \"role_names\",\n \"time_zone\"\n from \"postgres\".\"public\".\"apple_search_organization_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.reddit_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "reddit_ads__campaign_report", "resource_type": "model", "package_name": "reddit_ads", "path": "reddit_ads__campaign_report.sql", "original_file_path": "models/reddit_ads__campaign_report.sql", "unique_id": "model.reddit_ads.reddit_ads__campaign_report", "fqn": ["reddit_ads", "reddit_ads__campaign_report"], "alias": "reddit_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "2c9f70052ba1a5f8c071eb20a28606c4eeda5a7b3ac32e45494f43dba74043db"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily number of clicks, impressions, and spend per campaign, along with account information.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "campaign_name": {"name": "campaign_name", "description": "Name of campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "currency": {"name": "currency", "description": "The currency this account uses (ISO-4217)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.currency"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "spend": {"name": "spend", "description": "Spend converted out of microcurrency (so Spend/1,000,000)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "The total click-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "The total view-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion"]}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "purchase_conversions": {"name": "purchase_conversions", "description": "Total attributed click-through conversions for purchase events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_view_through_conversions": {"name": "purchase_view_through_conversions", "description": "Total attributed view-through conversions for purchase events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_value": {"name": "purchase_value", "description": "Total monetary value associated with purchase conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_items": {"name": "purchase_items", "description": "Total number of items involved in purchase conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_conversions": {"name": "lead_conversions", "description": "Total attributed click-through conversions for lead generation events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_view_through_conversions": {"name": "lead_view_through_conversions", "description": "Total attributed view-through conversions for lead generation events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_value": {"name": "lead_value", "description": "Total monetary value associated with lead generation conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_items": {"name": "lead_items", "description": "Total number of items involved in lead generation conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_conversions": {"name": "custom_conversions", "description": "Total attributed click-through conversions for custom-defined events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_view_through_conversions": {"name": "custom_view_through_conversions", "description": "Total attributed view-through conversions for custom-defined events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_value": {"name": "custom_value", "description": "Total monetary value associated with custom-defined conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_items": {"name": "custom_items", "description": "Total number of items involved in custom-defined conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.2770422, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_reddit_ads__campaign_report') }}\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_reddit_ads__campaign') }}\n),\n\naccounts as (\n\n select *\n from {{ ref('stg_reddit_ads__account') }}\n),\n\n{# This includes data at the event type level that we'll need to roll up and pivot out #}\nconversions_report as (\n\n select *\n from {{ ref('stg_reddit_ads__campaign_conversions_report') }}\n),\n\nrollup_conversions_report as (\n\n select \n source_relation,\n date_day,\n campaign_id,\n sum(conversions) as conversions,\n sum(view_through_conversions) as view_through_conversions,\n sum(total_value) as total_value,\n sum(total_items) as total_items\n\n {% if var('reddit_ads__conversion_event_types') %}\n {% for event_type in var('reddit_ads__conversion_event_types') %}\n , sum(case when event_name = '{{ event_type|lower }}' then conversions else 0 end) as {{ event_type|lower }}_conversions\n , sum(case when event_name = '{{ event_type|lower }}' then view_through_conversions else 0 end) as {{ event_type|lower }}_view_through_conversions\n , sum(case when event_name = '{{ event_type|lower }}' then total_value else 0 end) as {{ event_type|lower }}_value\n , sum(case when event_name = '{{ event_type|lower }}' then total_items else 0 end) as {{ event_type|lower }}_items\n {% endfor %}\n {% endif %}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='reddit_ads__campaign_conversions_passthrough_metrics', transform = 'sum') }}\n\n from conversions_report\n\n {% if var('reddit_ads__conversion_event_types') %}\n where \n {% for event_type in var('reddit_ads__conversion_event_types') %}\n event_name = '{{ event_type|lower }}'\n {% if not loop.last %} or {% endif %} \n {% endfor %}\n {% endif %}\n\n group by 1,2,3\n),\n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n accounts.currency,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(rollup_conversions_report.conversions) as conversions,\n sum(rollup_conversions_report.view_through_conversions) as view_through_conversions,\n sum(rollup_conversions_report.total_value) as total_value,\n sum(rollup_conversions_report.total_items) as total_items\n\n {% if var('reddit_ads__conversion_event_types') %} \n {% for event_type in var('reddit_ads__conversion_event_types') %}\n , sum({{ event_type|lower }}_conversions) as {{ event_type|lower }}_conversions\n , sum({{ event_type|lower }}_view_through_conversions) as {{ event_type|lower }}_view_through_conversions\n , sum({{ event_type|lower }}_value) as {{ event_type|lower }}_value\n , sum({{ event_type|lower }}_items) as {{ event_type|lower }}_items\n {% endfor %}\n {% endif %}\n\n {{ reddit_ads_persist_pass_through_columns(pass_through_variable='reddit_ads__campaign_passthrough_metrics', identifier = 'report', transform = 'sum', alias_fields=['conversions', 'view_through_conversions', 'total_value', 'total_items']) }}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='reddit_ads__campaign_conversions_passthrough_metrics', transform = 'sum') }}\n\n from report\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join rollup_conversions_report\n on report.campaign_id = rollup_conversions_report.campaign_id\n and report.source_relation = rollup_conversions_report.source_relation\n and report.date_day = rollup_conversions_report.date_day\n {{ dbt_utils.group_by(6) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__campaign_report", "package": null, "version": null}, {"name": "stg_reddit_ads__campaign", "package": null, "version": null}, {"name": "stg_reddit_ads__account", "package": null, "version": null}, {"name": "stg_reddit_ads__campaign_conversions_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.reddit_ads.reddit_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.reddit_ads.stg_reddit_ads__campaign_report", "model.reddit_ads.stg_reddit_ads__campaign", "model.reddit_ads.stg_reddit_ads__account", "model.reddit_ads.stg_reddit_ads__campaign_conversions_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_report\"\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign\"\n),\n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account\"\n),\n\n\nconversions_report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_conversions_report\"\n),\n\nrollup_conversions_report as (\n\n select \n source_relation,\n date_day,\n campaign_id,\n sum(conversions) as conversions,\n sum(view_through_conversions) as view_through_conversions,\n sum(total_value) as total_value,\n sum(total_items) as total_items\n\n \n \n , sum(case when event_name = 'lead' then conversions else 0 end) as lead_conversions\n , sum(case when event_name = 'lead' then view_through_conversions else 0 end) as lead_view_through_conversions\n , sum(case when event_name = 'lead' then total_value else 0 end) as lead_value\n , sum(case when event_name = 'lead' then total_items else 0 end) as lead_items\n \n , sum(case when event_name = 'purchase' then conversions else 0 end) as purchase_conversions\n , sum(case when event_name = 'purchase' then view_through_conversions else 0 end) as purchase_view_through_conversions\n , sum(case when event_name = 'purchase' then total_value else 0 end) as purchase_value\n , sum(case when event_name = 'purchase' then total_items else 0 end) as purchase_items\n \n , sum(case when event_name = 'custom' then conversions else 0 end) as custom_conversions\n , sum(case when event_name = 'custom' then view_through_conversions else 0 end) as custom_view_through_conversions\n , sum(case when event_name = 'custom' then total_value else 0 end) as custom_value\n , sum(case when event_name = 'custom' then total_items else 0 end) as custom_items\n \n \n\n \n\n\n\n\n\n from conversions_report\n\n \n where \n \n event_name = 'lead'\n or \n \n event_name = 'purchase'\n or \n \n event_name = 'custom'\n \n \n \n\n group by 1,2,3\n),\n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n accounts.currency,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(rollup_conversions_report.conversions) as conversions,\n sum(rollup_conversions_report.view_through_conversions) as view_through_conversions,\n sum(rollup_conversions_report.total_value) as total_value,\n sum(rollup_conversions_report.total_items) as total_items\n\n \n \n , sum(lead_conversions) as lead_conversions\n , sum(lead_view_through_conversions) as lead_view_through_conversions\n , sum(lead_value) as lead_value\n , sum(lead_items) as lead_items\n \n , sum(purchase_conversions) as purchase_conversions\n , sum(purchase_view_through_conversions) as purchase_view_through_conversions\n , sum(purchase_value) as purchase_value\n , sum(purchase_items) as purchase_items\n \n , sum(custom_conversions) as custom_conversions\n , sum(custom_view_through_conversions) as custom_view_through_conversions\n , sum(custom_value) as custom_value\n , sum(custom_items) as custom_items\n \n \n\n \n\n\n\n\n\n \n\n\n\n\n\n from report\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join rollup_conversions_report\n on report.campaign_id = rollup_conversions_report.campaign_id\n and report.source_relation = rollup_conversions_report.source_relation\n and report.date_day = rollup_conversions_report.date_day\n group by 1,2,3,4,5,6\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.reddit_ads__campaign_country_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "reddit_ads__campaign_country_report", "resource_type": "model", "package_name": "reddit_ads", "path": "reddit_ads__campaign_country_report.sql", "original_file_path": "models/reddit_ads__campaign_country_report.sql", "unique_id": "model.reddit_ads.reddit_ads__campaign_country_report", "fqn": ["reddit_ads", "reddit_ads__campaign_country_report"], "alias": "reddit_ads__campaign_country_report", "checksum": {"name": "sha256", "checksum": "b083a4587ec843b55b2bbdd4c4588caae5a5e4adfc896306b8edf00fcf5db74e"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily number of clicks, impressions, and spend per campaign and country, along with account information.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "Name of campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_name"]}, "country": {"name": "country", "description": "The country associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.country"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "spend": {"name": "spend", "description": "Spend converted out of microcurrency (so Spend/1,000,000)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "The total click-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "The total view-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion"]}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "purchase_conversions": {"name": "purchase_conversions", "description": "Total attributed click-through conversions for purchase events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_view_through_conversions": {"name": "purchase_view_through_conversions", "description": "Total attributed view-through conversions for purchase events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_value": {"name": "purchase_value", "description": "Total monetary value associated with purchase conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_items": {"name": "purchase_items", "description": "Total number of items involved in purchase conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_conversions": {"name": "lead_conversions", "description": "Total attributed click-through conversions for lead generation events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_view_through_conversions": {"name": "lead_view_through_conversions", "description": "Total attributed view-through conversions for lead generation events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_value": {"name": "lead_value", "description": "Total monetary value associated with lead generation conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_items": {"name": "lead_items", "description": "Total number of items involved in lead generation conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_conversions": {"name": "custom_conversions", "description": "Total attributed click-through conversions for custom-defined events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_view_through_conversions": {"name": "custom_view_through_conversions", "description": "Total attributed view-through conversions for custom-defined events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_value": {"name": "custom_value", "description": "Total monetary value associated with custom-defined conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_items": {"name": "custom_items", "description": "Total number of items involved in custom-defined conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The currency this account uses (ISO-4217)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.currency"]}, "effective_status": {"name": "effective_status", "description": "The current effective status of the ad, reflecting both configured status and any internal processing states that may affect delivery.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "configured_status": {"name": "configured_status", "description": "The user-defined status of the ad (e.g., ACTIVE, PAUSED), indicating whether it is intended to be running.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_processing": {"name": "is_processing", "description": "A boolean flag indicating whether the ad is still being processed and not yet ready for delivery.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective": {"name": "objective", "description": "The advertising goal or objective selected for the campaign, such as CONVERSIONS, TRAFFIC, or BRAND_AWARENESS.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "funding_instrument_id": {"name": "funding_instrument_id", "description": "The ID of the funding instrument (e.g., credit card or line of credit) used to pay for the ad campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.2846036, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__campaign_country_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars([\n 'ad_reporting__reddit_ads_enabled',\n 'reddit_ads__using_campaign_country_report'])\n) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_reddit_ads__campaign_country_report') }}\n),\n\nrollup_report as (\n\n select \n source_relation,\n date_day,\n account_id,\n campaign_id,\n country,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend\n\n {{ fivetran_utils.persist_pass_through_columns(\n pass_through_variable='reddit_ads__campaign_country_passthrough_metrics',\n transform = 'sum') }}\n\n from report\n\n {{ dbt_utils.group_by(5) }}\n),\n\n{% set country_conversions_report_enabled = var('reddit_ads__using_campaign_country_conversions_report', True) %}\n{% if country_conversions_report_enabled %}\nconversions_report as (\n\n select *\n from {{ ref('stg_reddit_ads__campaign_country_conversions_report') }}\n),\n\nrollup_conversions_report as (\n\n select \n source_relation,\n date_day,\n account_id,\n campaign_id,\n country,\n sum(conversions) as conversions,\n sum(view_through_conversions) as view_through_conversions,\n sum(total_items) as total_items,\n sum(total_value) as total_value\n\n {% if var('reddit_ads__conversion_event_types') %}\n {% for event_type in var('reddit_ads__conversion_event_types') %}\n , sum(case when event_name = '{{ event_type|lower }}' then conversions else 0 end) as {{ event_type|lower }}_conversions\n , sum(case when event_name = '{{ event_type|lower }}' then view_through_conversions else 0 end) as {{ event_type|lower }}_view_through_conversions\n , sum(case when event_name = '{{ event_type|lower }}' then total_value else 0 end) as {{ event_type|lower }}_value\n , sum(case when event_name = '{{ event_type|lower }}' then total_items else 0 end) as {{ event_type|lower }}_items\n {% endfor %}\n {% endif %}\n\n {{ fivetran_utils.persist_pass_through_columns(\n pass_through_variable='reddit_ads__campaign_country_conversions_passthrough_metrics',\n transform = 'sum') }}\n\n from conversions_report\n\n {% if var('reddit_ads__conversion_event_types') %}\n where \n {% for event_type in var('reddit_ads__conversion_event_types') %}\n event_name = '{{ event_type|lower }}'\n {{ 'or' if not loop.last }}\n {% endfor %}\n {% endif %}\n\n {{ dbt_utils.group_by(5) }}\n),\n{% endif %}\n\ncampaigns as (\n\n select *\n from {{ ref('stg_reddit_ads__campaign') }}\n),\n\naccounts as (\n\n select *\n from {{ ref('stg_reddit_ads__account') }}\n),\n\njoined as (\n\n select\n rollup_report.source_relation,\n rollup_report.date_day,\n rollup_report.account_id,\n rollup_report.campaign_id,\n rollup_report.country,\n rollup_report.clicks,\n rollup_report.impressions,\n rollup_report.spend\n {{ reddit_ads_persist_pass_through_columns(\n pass_through_variable='reddit_ads__campaign_country_passthrough_metrics',\n identifier = 'rollup_report') }}\n\n {% if country_conversions_report_enabled %}\n ,\n rollup_conversions_report.conversions,\n rollup_conversions_report.view_through_conversions,\n rollup_conversions_report.total_value,\n rollup_conversions_report.total_items\n\n {% if var('reddit_ads__conversion_event_types') %} \n {% for event_type in var('reddit_ads__conversion_event_types') %}\n , {{ event_type|lower }}_conversions\n , {{ event_type|lower }}_view_through_conversions\n , {{ event_type|lower }}_value\n , {{ event_type|lower }}_items\n {% endfor %}\n {% endif %}\n\n {{ reddit_ads_persist_pass_through_columns(\n pass_through_variable='reddit_ads__campaign_country_conversions_passthrough_metrics',\n identifier = 'rollup_conversions_report') }}\n\n from rollup_report\n left join rollup_conversions_report\n on rollup_report.campaign_id = rollup_conversions_report.campaign_id\n and rollup_report.account_id = rollup_conversions_report.account_id\n and rollup_report.source_relation = rollup_conversions_report.source_relation\n and rollup_report.date_day = rollup_conversions_report.date_day\n and rollup_report.country = rollup_conversions_report.country\n\n {% else %}\n from rollup_report\n \n {% endif %}\n),\n\nfinal as (\n select\n joined.*,\n campaigns.campaign_name,\n accounts.currency,\n campaigns.effective_status,\n campaigns.configured_status,\n campaigns.is_processing,\n campaigns.objective,\n campaigns.funding_instrument_id\n from joined\n left join accounts\n on joined.account_id = accounts.account_id\n and joined.source_relation = accounts.source_relation\n left join campaigns\n on joined.campaign_id = campaigns.campaign_id\n and joined.source_relation = campaigns.source_relation\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__campaign_country_report", "package": null, "version": null}, {"name": "stg_reddit_ads__campaign_country_conversions_report", "package": null, "version": null}, {"name": "stg_reddit_ads__campaign", "package": null, "version": null}, {"name": "stg_reddit_ads__account", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by", "macro.reddit_ads.reddit_ads_persist_pass_through_columns"], "nodes": ["model.reddit_ads.stg_reddit_ads__campaign_country_report", "model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report", "model.reddit_ads.stg_reddit_ads__campaign", "model.reddit_ads.stg_reddit_ads__account"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads__campaign_country_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_country_report\"\n),\n\nrollup_report as (\n\n select \n source_relation,\n date_day,\n account_id,\n campaign_id,\n country,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend\n\n \n\n\n\n\n\n from report\n\n group by 1,2,3,4,5\n),\n\n\n\nconversions_report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_country_conversions_report\"\n),\n\nrollup_conversions_report as (\n\n select \n source_relation,\n date_day,\n account_id,\n campaign_id,\n country,\n sum(conversions) as conversions,\n sum(view_through_conversions) as view_through_conversions,\n sum(total_items) as total_items,\n sum(total_value) as total_value\n\n \n \n , sum(case when event_name = 'lead' then conversions else 0 end) as lead_conversions\n , sum(case when event_name = 'lead' then view_through_conversions else 0 end) as lead_view_through_conversions\n , sum(case when event_name = 'lead' then total_value else 0 end) as lead_value\n , sum(case when event_name = 'lead' then total_items else 0 end) as lead_items\n \n , sum(case when event_name = 'purchase' then conversions else 0 end) as purchase_conversions\n , sum(case when event_name = 'purchase' then view_through_conversions else 0 end) as purchase_view_through_conversions\n , sum(case when event_name = 'purchase' then total_value else 0 end) as purchase_value\n , sum(case when event_name = 'purchase' then total_items else 0 end) as purchase_items\n \n , sum(case when event_name = 'custom' then conversions else 0 end) as custom_conversions\n , sum(case when event_name = 'custom' then view_through_conversions else 0 end) as custom_view_through_conversions\n , sum(case when event_name = 'custom' then total_value else 0 end) as custom_value\n , sum(case when event_name = 'custom' then total_items else 0 end) as custom_items\n \n \n\n \n\n\n\n\n\n from conversions_report\n\n \n where \n \n event_name = 'lead'\n or\n \n event_name = 'purchase'\n or\n \n event_name = 'custom'\n \n \n \n\n group by 1,2,3,4,5\n),\n\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign\"\n),\n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account\"\n),\n\njoined as (\n\n select\n rollup_report.source_relation,\n rollup_report.date_day,\n rollup_report.account_id,\n rollup_report.campaign_id,\n rollup_report.country,\n rollup_report.clicks,\n rollup_report.impressions,\n rollup_report.spend\n \n\n\n\n\n\n \n ,\n rollup_conversions_report.conversions,\n rollup_conversions_report.view_through_conversions,\n rollup_conversions_report.total_value,\n rollup_conversions_report.total_items\n\n \n \n , lead_conversions\n , lead_view_through_conversions\n , lead_value\n , lead_items\n \n , purchase_conversions\n , purchase_view_through_conversions\n , purchase_value\n , purchase_items\n \n , custom_conversions\n , custom_view_through_conversions\n , custom_value\n , custom_items\n \n \n\n \n\n\n\n\n\n from rollup_report\n left join rollup_conversions_report\n on rollup_report.campaign_id = rollup_conversions_report.campaign_id\n and rollup_report.account_id = rollup_conversions_report.account_id\n and rollup_report.source_relation = rollup_conversions_report.source_relation\n and rollup_report.date_day = rollup_conversions_report.date_day\n and rollup_report.country = rollup_conversions_report.country\n\n \n),\n\nfinal as (\n select\n joined.*,\n campaigns.campaign_name,\n accounts.currency,\n campaigns.effective_status,\n campaigns.configured_status,\n campaigns.is_processing,\n campaigns.objective,\n campaigns.funding_instrument_id\n from joined\n left join accounts\n on joined.account_id = accounts.account_id\n and joined.source_relation = accounts.source_relation\n left join campaigns\n on joined.campaign_id = campaigns.campaign_id\n and joined.source_relation = campaigns.source_relation\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.reddit_ads__url_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "reddit_ads__url_report", "resource_type": "model", "package_name": "reddit_ads", "path": "reddit_ads__url_report.sql", "original_file_path": "models/reddit_ads__url_report.sql", "unique_id": "model.reddit_ads.reddit_ads__url_report", "fqn": ["reddit_ads", "reddit_ads__url_report"], "alias": "reddit_ads__url_report", "checksum": {"name": "sha256", "checksum": "a3cff883520ced2084feaecd94195863f8aaded7811e572e99432eb998262562"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily number of clicks, impressions, and spend per url and utm parameters, along with post,ad, account, campaign, and ad group information.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date_day"]}, "ad_name": {"name": "ad_name", "description": "Name of ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_name"]}, "ad_id": {"name": "ad_id", "description": "The ID of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_id"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "campaign_name": {"name": "campaign_name", "description": "Name of campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "Name of ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_id"]}, "currency": {"name": "currency", "description": "The currency this account uses (ISO-4217)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.currency"]}, "post_id": {"name": "post_id", "description": "The ID of the post.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.post_id"]}, "post_url": {"name": "post_url", "description": "The URL belonging to the post.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.post_url"]}, "click_url": {"name": "click_url", "description": "The destination url, or the website address, that a visitor goes to when they click on the ad", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_url"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "spend": {"name": "spend", "description": "Spend converted out of microcurrency (so Spend/1,000,000)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the `click_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_host": {"name": "url_host", "description": "The URL host of the ad, extracted from the `click_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_path": {"name": "url_path", "description": "The URL path of the ad, extracted from the `click_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_source": {"name": "utm_source", "description": "The site that sent traffic to your page. Microsoft Advertising sets this to Bing; extracted from the `click_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_medium": {"name": "utm_medium", "description": "Which channel was used. Microsoft Advertising sets this to cp; extracted from the `click_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_campaign": {"name": "utm_campaign", "description": "Which campaign the keyword came from; extracted from the `click_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_content": {"name": "utm_content", "description": "Which ad group the keyword came from; extracted from the `click_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_term": {"name": "utm_term", "description": "Which keyword brought people to your website; extracted from the `click_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "The total click-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "The total view-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion"]}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "purchase_conversions": {"name": "purchase_conversions", "description": "Total attributed click-through conversions for purchase events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_view_through_conversions": {"name": "purchase_view_through_conversions", "description": "Total attributed view-through conversions for purchase events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_value": {"name": "purchase_value", "description": "Total monetary value associated with purchase conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_items": {"name": "purchase_items", "description": "Total number of items involved in purchase conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_conversions": {"name": "lead_conversions", "description": "Total attributed click-through conversions for lead generation events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_view_through_conversions": {"name": "lead_view_through_conversions", "description": "Total attributed view-through conversions for lead generation events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_value": {"name": "lead_value", "description": "Total monetary value associated with lead generation conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_items": {"name": "lead_items", "description": "Total number of items involved in lead generation conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_conversions": {"name": "custom_conversions", "description": "Total attributed click-through conversions for custom-defined events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_view_through_conversions": {"name": "custom_view_through_conversions", "description": "Total attributed view-through conversions for custom-defined events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_value": {"name": "custom_value", "description": "Total monetary value associated with custom-defined conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_items": {"name": "custom_items", "description": "Total number of items involved in custom-defined conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.2801185, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__url_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_reddit_ads__ad_report') }}\n),\n\nads as (\n\n select *\n from {{ ref('stg_reddit_ads__ad') }}\n),\n\nad_groups as (\n\n select *\n from {{ ref('stg_reddit_ads__ad_group') }}\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_reddit_ads__campaign') }}\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_reddit_ads__account') }}\n),\n\n{# This includes data at the event type level that we'll need to roll up and pivot out #}\nconversions_report as (\n\n select *\n from {{ ref('stg_reddit_ads__ad_conversions_report') }}\n),\n\nrollup_conversions_report as (\n\n select \n source_relation,\n date_day,\n ad_id,\n sum(conversions) as conversions,\n sum(view_through_conversions) as view_through_conversions,\n sum(total_value) as total_value,\n sum(total_items) as total_items\n\n {% if var('reddit_ads__conversion_event_types') %}\n {% for event_type in var('reddit_ads__conversion_event_types') %}\n , sum(case when event_name = '{{ event_type|lower }}' then conversions else 0 end) as {{ event_type|lower }}_conversions\n , sum(case when event_name = '{{ event_type|lower }}' then view_through_conversions else 0 end) as {{ event_type|lower }}_view_through_conversions\n , sum(case when event_name = '{{ event_type|lower }}' then total_value else 0 end) as {{ event_type|lower }}_value\n , sum(case when event_name = '{{ event_type|lower }}' then total_items else 0 end) as {{ event_type|lower }}_items\n {% endfor %}\n {% endif %}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='reddit_ads__ad_conversions_passthrough_metrics', transform = 'sum') }}\n\n from conversions_report\n\n {% if var('reddit_ads__conversion_event_types') %}\n where \n {% for event_type in var('reddit_ads__conversion_event_types') %}\n event_name = '{{ event_type|lower }}'\n {% if not loop.last %} or {% endif %} \n {% endfor %}\n {% endif %}\n\n group by 1,2,3\n),\n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n ads.ad_name,\n report.ad_id,\n report.account_id,\n campaigns.campaign_name,\n ads.campaign_id,\n ad_groups.ad_group_name,\n ads.ad_group_id,\n accounts.currency,\n ads.post_id,\n ads.post_url,\n ads.click_url,\n {{ dbt.split_part('ads.click_url', \"'?'\", 1) }} as base_url,\n {{ dbt_utils.get_url_host('ads.click_url') }} as url_host,\n '/' || {{ dbt_utils.get_url_path('ads.click_url') }} as url_path,\n {{ reddit_ads.reddit_ads_extract_url_parameter('ads.click_url', 'utm_source') }} as utm_source,\n {{ reddit_ads.reddit_ads_extract_url_parameter('ads.click_url', 'utm_medium') }} as utm_medium,\n {{ reddit_ads.reddit_ads_extract_url_parameter('ads.click_url', 'utm_term') }} as utm_term,\n {{ reddit_ads.reddit_ads_extract_url_parameter('ads.click_url', 'utm_content') }} as utm_content,\n coalesce( {{ reddit_ads.reddit_ads_extract_url_parameter('ads.click_url', 'utm_campaign') }}, campaigns.campaign_name) as utm_campaign,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(rollup_conversions_report.conversions) as conversions,\n sum(rollup_conversions_report.view_through_conversions) as view_through_conversions,\n sum(rollup_conversions_report.total_value) as total_value,\n sum(rollup_conversions_report.total_items) as total_items\n\n {% if var('reddit_ads__conversion_event_types') %} \n {% for event_type in var('reddit_ads__conversion_event_types') %}\n , sum({{ event_type|lower }}_conversions) as {{ event_type|lower }}_conversions\n , sum({{ event_type|lower }}_view_through_conversions) as {{ event_type|lower }}_view_through_conversions\n , sum({{ event_type|lower }}_value) as {{ event_type|lower }}_value\n , sum({{ event_type|lower }}_items) as {{ event_type|lower }}_items\n {% endfor %}\n {% endif %}\n\n {{ reddit_ads_persist_pass_through_columns(pass_through_variable='reddit_ads__ad_passthrough_metrics', identifier = 'report', transform = 'sum', alias_fields=['conversions', 'view_through_conversions', 'total_value', 'total_items']) }}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='reddit_ads__ad_conversions_passthrough_metrics', transform = 'sum') }}\n\n from report\n left join ads\n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join ad_groups\n on ads.ad_group_id = ad_groups.ad_group_id\n and ads.source_relation = ad_groups.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n left join rollup_conversions_report\n on report.ad_id = rollup_conversions_report.ad_id\n and report.source_relation = rollup_conversions_report.source_relation\n and report.date_day = rollup_conversions_report.date_day\n \n {{ dbt_utils.group_by(20) }}\n), \n\nfiltered as (\n\n select *\n from joined\n\n {% if var('ad_reporting__url_report__using_null_filter', True) %}\n where click_url is not null -- filter for only ads with valid URLs\n {% endif %}\n)\n\nselect *\nfrom filtered", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__ad_report", "package": null, "version": null}, {"name": "stg_reddit_ads__ad", "package": null, "version": null}, {"name": "stg_reddit_ads__ad_group", "package": null, "version": null}, {"name": "stg_reddit_ads__campaign", "package": null, "version": null}, {"name": "stg_reddit_ads__account", "package": null, "version": null}, {"name": "stg_reddit_ads__ad_conversions_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.dbt.split_part", "macro.dbt_utils.get_url_host", "macro.dbt_utils.get_url_path", "macro.reddit_ads.reddit_ads_extract_url_parameter", "macro.reddit_ads.reddit_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.reddit_ads.stg_reddit_ads__ad_report", "model.reddit_ads.stg_reddit_ads__ad", "model.reddit_ads.stg_reddit_ads__ad_group", "model.reddit_ads.stg_reddit_ads__campaign", "model.reddit_ads.stg_reddit_ads__account", "model.reddit_ads.stg_reddit_ads__ad_conversions_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads__url_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_report\"\n),\n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad\"\n),\n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group\"\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign\"\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account\"\n),\n\n\nconversions_report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_conversions_report\"\n),\n\nrollup_conversions_report as (\n\n select \n source_relation,\n date_day,\n ad_id,\n sum(conversions) as conversions,\n sum(view_through_conversions) as view_through_conversions,\n sum(total_value) as total_value,\n sum(total_items) as total_items\n\n \n \n , sum(case when event_name = 'lead' then conversions else 0 end) as lead_conversions\n , sum(case when event_name = 'lead' then view_through_conversions else 0 end) as lead_view_through_conversions\n , sum(case when event_name = 'lead' then total_value else 0 end) as lead_value\n , sum(case when event_name = 'lead' then total_items else 0 end) as lead_items\n \n , sum(case when event_name = 'purchase' then conversions else 0 end) as purchase_conversions\n , sum(case when event_name = 'purchase' then view_through_conversions else 0 end) as purchase_view_through_conversions\n , sum(case when event_name = 'purchase' then total_value else 0 end) as purchase_value\n , sum(case when event_name = 'purchase' then total_items else 0 end) as purchase_items\n \n , sum(case when event_name = 'custom' then conversions else 0 end) as custom_conversions\n , sum(case when event_name = 'custom' then view_through_conversions else 0 end) as custom_view_through_conversions\n , sum(case when event_name = 'custom' then total_value else 0 end) as custom_value\n , sum(case when event_name = 'custom' then total_items else 0 end) as custom_items\n \n \n\n \n\n\n\n\n\n from conversions_report\n\n \n where \n \n event_name = 'lead'\n or \n \n event_name = 'purchase'\n or \n \n event_name = 'custom'\n \n \n \n\n group by 1,2,3\n),\n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n ads.ad_name,\n report.ad_id,\n report.account_id,\n campaigns.campaign_name,\n ads.campaign_id,\n ad_groups.ad_group_name,\n ads.ad_group_id,\n accounts.currency,\n ads.post_id,\n ads.post_url,\n ads.click_url,\n \n\n \n \n\n split_part(\n ads.click_url,\n '?',\n 1\n )\n\n\n \n\n as base_url,\n \n \n cast(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n \n\n replace(\n \n\n replace(\n \n\n replace(\n ads.click_url,\n 'android-app://',\n ''\n )\n\n\n,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n '/',\n 1\n )\n\n\n \n\n,\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_host,\n '/' || \n \n cast(\n\n \n \n\n split_part(\n \n\n right(\n \n\n replace(\n \n\n replace(\n ads.click_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n \n\n length(\n \n\n replace(\n \n\n replace(\n ads.click_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n )-coalesce(\n nullif(\n\n position(\n '/' in \n\n replace(\n \n\n replace(\n ads.click_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ), 0),\n \n\n position(\n '?' in \n\n replace(\n \n\n replace(\n ads.click_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ) - 1\n )\n ),\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_path,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n ads.click_url,\n 'utm_source=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_source,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n ads.click_url,\n 'utm_medium=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_medium,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n ads.click_url,\n 'utm_term=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_term,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n ads.click_url,\n 'utm_content=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_content,\n coalesce( nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n ads.click_url,\n 'utm_campaign=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,''), campaigns.campaign_name) as utm_campaign,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(rollup_conversions_report.conversions) as conversions,\n sum(rollup_conversions_report.view_through_conversions) as view_through_conversions,\n sum(rollup_conversions_report.total_value) as total_value,\n sum(rollup_conversions_report.total_items) as total_items\n\n \n \n , sum(lead_conversions) as lead_conversions\n , sum(lead_view_through_conversions) as lead_view_through_conversions\n , sum(lead_value) as lead_value\n , sum(lead_items) as lead_items\n \n , sum(purchase_conversions) as purchase_conversions\n , sum(purchase_view_through_conversions) as purchase_view_through_conversions\n , sum(purchase_value) as purchase_value\n , sum(purchase_items) as purchase_items\n \n , sum(custom_conversions) as custom_conversions\n , sum(custom_view_through_conversions) as custom_view_through_conversions\n , sum(custom_value) as custom_value\n , sum(custom_items) as custom_items\n \n \n\n \n\n\n\n\n\n \n\n\n\n\n\n from report\n left join ads\n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join ad_groups\n on ads.ad_group_id = ad_groups.ad_group_id\n and ads.source_relation = ad_groups.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n left join rollup_conversions_report\n on report.ad_id = rollup_conversions_report.ad_id\n and report.source_relation = rollup_conversions_report.source_relation\n and report.date_day = rollup_conversions_report.date_day\n \n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20\n), \n\nfiltered as (\n\n select *\n from joined\n\n \n where click_url is not null -- filter for only ads with valid URLs\n \n)\n\nselect *\nfrom filtered", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.reddit_ads__account_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "reddit_ads__account_report", "resource_type": "model", "package_name": "reddit_ads", "path": "reddit_ads__account_report.sql", "original_file_path": "models/reddit_ads__account_report.sql", "unique_id": "model.reddit_ads.reddit_ads__account_report", "fqn": ["reddit_ads", "reddit_ads__account_report"], "alias": "reddit_ads__account_report", "checksum": {"name": "sha256", "checksum": "d243be37628e15b7c880ad98039231802dbc67e713527dc76325bb8bd71e58a5"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily number of clicks, impressions, and spend of ads by account, account timezone, attribution type, and currency.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "currency": {"name": "currency", "description": "The currency this account uses (ISO-4217)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.currency"]}, "attribution_type": {"name": "attribution_type", "description": "Attribution type: \"CLICK_THROUGH_CONVERSION\", \"VIEW_THROUGH_CONVERSION\", or \"ALL_CONVERSION\".\nCLICK_THROUGH_CONVERSION: A user clicked on your ad and then completed the conversion action on your site. \nVIEW_THROUGH_CONVERSION: A user saw your ad and did not click it, but did complete the conversion action on your site.\nALL_CONVERSION: Combination of both.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.attribution_type"]}, "time_zone_id": {"name": "time_zone_id", "description": "The time zone id preference for this account", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.time_zone_id"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "spend": {"name": "spend", "description": "Spend converted out of microcurrency (so Spend/1,000,000)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "The total click-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "The total view-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion"]}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "purchase_conversions": {"name": "purchase_conversions", "description": "Total attributed click-through conversions for purchase events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_view_through_conversions": {"name": "purchase_view_through_conversions", "description": "Total attributed view-through conversions for purchase events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_value": {"name": "purchase_value", "description": "Total monetary value associated with purchase conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_items": {"name": "purchase_items", "description": "Total number of items involved in purchase conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_conversions": {"name": "lead_conversions", "description": "Total attributed click-through conversions for lead generation events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_view_through_conversions": {"name": "lead_view_through_conversions", "description": "Total attributed view-through conversions for lead generation events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_value": {"name": "lead_value", "description": "Total monetary value associated with lead generation conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_items": {"name": "lead_items", "description": "Total number of items involved in lead generation conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_conversions": {"name": "custom_conversions", "description": "Total attributed click-through conversions for custom-defined events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_view_through_conversions": {"name": "custom_view_through_conversions", "description": "Total attributed view-through conversions for custom-defined events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_value": {"name": "custom_value", "description": "Total monetary value associated with custom-defined conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_items": {"name": "custom_items", "description": "Total number of items involved in custom-defined conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.2712643, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__account_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_reddit_ads__account_report') }}\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_reddit_ads__account') }}\n),\n\n{# This includes data at the event type level that we'll need to roll up and pivot out #}\nconversions_report as (\n\n select *\n from {{ ref('stg_reddit_ads__account_conversions_report') }}\n),\n\nrollup_conversions_report as (\n\n select \n source_relation,\n date_day,\n account_id,\n sum(conversions) as conversions,\n sum(view_through_conversions) as view_through_conversions,\n sum(total_value) as total_value,\n sum(total_items) as total_items\n\n {% if var('reddit_ads__conversion_event_types') %}\n {% for event_type in var('reddit_ads__conversion_event_types') %}\n , sum(case when event_name = '{{ event_type|lower }}' then conversions else 0 end) as {{ event_type|lower }}_conversions\n , sum(case when event_name = '{{ event_type|lower }}' then view_through_conversions else 0 end) as {{ event_type|lower }}_view_through_conversions\n , sum(case when event_name = '{{ event_type|lower }}' then total_value else 0 end) as {{ event_type|lower }}_value\n , sum(case when event_name = '{{ event_type|lower }}' then total_items else 0 end) as {{ event_type|lower }}_items\n {% endfor %}\n {% endif %}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='reddit_ads__account_conversions_passthrough_metrics', transform = 'sum') }}\n\n from conversions_report\n\n {% if var('reddit_ads__conversion_event_types') %}\n where \n {% for event_type in var('reddit_ads__conversion_event_types') %}\n event_name = '{{ event_type|lower }}'\n {% if not loop.last %} or {% endif %} \n {% endfor %}\n {% endif %}\n\n group by 1,2,3\n),\n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n report.account_id,\n accounts.currency,\n accounts.attribution_type,\n accounts.time_zone_id,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(rollup_conversions_report.conversions) as conversions,\n sum(rollup_conversions_report.view_through_conversions) as view_through_conversions,\n sum(rollup_conversions_report.total_value) as total_value,\n sum(rollup_conversions_report.total_items) as total_items\n\n {% if var('reddit_ads__conversion_event_types') %} \n {% for event_type in var('reddit_ads__conversion_event_types') %}\n , sum({{ event_type|lower }}_conversions) as {{ event_type|lower }}_conversions\n , sum({{ event_type|lower }}_view_through_conversions) as {{ event_type|lower }}_view_through_conversions\n , sum({{ event_type|lower }}_value) as {{ event_type|lower }}_value\n , sum({{ event_type|lower }}_items) as {{ event_type|lower }}_items\n {% endfor %}\n {% endif %}\n\n {{ reddit_ads_persist_pass_through_columns(pass_through_variable='reddit_ads__account_passthrough_metrics', identifier = 'report', transform = 'sum', alias_fields=['conversions', 'view_through_conversions', 'total_value', 'total_items']) }}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='reddit_ads__account_conversions_passthrough_metrics', transform = 'sum') }}\n\n from report\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join rollup_conversions_report\n on report.account_id = rollup_conversions_report.account_id\n and report.source_relation = rollup_conversions_report.source_relation\n and report.date_day = rollup_conversions_report.date_day\n {{ dbt_utils.group_by(6) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__account_report", "package": null, "version": null}, {"name": "stg_reddit_ads__account", "package": null, "version": null}, {"name": "stg_reddit_ads__account_conversions_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.reddit_ads.reddit_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.reddit_ads.stg_reddit_ads__account_report", "model.reddit_ads.stg_reddit_ads__account", "model.reddit_ads.stg_reddit_ads__account_conversions_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads__account_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account_report\"\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account\"\n),\n\n\nconversions_report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account_conversions_report\"\n),\n\nrollup_conversions_report as (\n\n select \n source_relation,\n date_day,\n account_id,\n sum(conversions) as conversions,\n sum(view_through_conversions) as view_through_conversions,\n sum(total_value) as total_value,\n sum(total_items) as total_items\n\n \n \n , sum(case when event_name = 'lead' then conversions else 0 end) as lead_conversions\n , sum(case when event_name = 'lead' then view_through_conversions else 0 end) as lead_view_through_conversions\n , sum(case when event_name = 'lead' then total_value else 0 end) as lead_value\n , sum(case when event_name = 'lead' then total_items else 0 end) as lead_items\n \n , sum(case when event_name = 'purchase' then conversions else 0 end) as purchase_conversions\n , sum(case when event_name = 'purchase' then view_through_conversions else 0 end) as purchase_view_through_conversions\n , sum(case when event_name = 'purchase' then total_value else 0 end) as purchase_value\n , sum(case when event_name = 'purchase' then total_items else 0 end) as purchase_items\n \n , sum(case when event_name = 'custom' then conversions else 0 end) as custom_conversions\n , sum(case when event_name = 'custom' then view_through_conversions else 0 end) as custom_view_through_conversions\n , sum(case when event_name = 'custom' then total_value else 0 end) as custom_value\n , sum(case when event_name = 'custom' then total_items else 0 end) as custom_items\n \n \n\n \n\n\n\n\n\n from conversions_report\n\n \n where \n \n event_name = 'lead'\n or \n \n event_name = 'purchase'\n or \n \n event_name = 'custom'\n \n \n \n\n group by 1,2,3\n),\n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n report.account_id,\n accounts.currency,\n accounts.attribution_type,\n accounts.time_zone_id,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(rollup_conversions_report.conversions) as conversions,\n sum(rollup_conversions_report.view_through_conversions) as view_through_conversions,\n sum(rollup_conversions_report.total_value) as total_value,\n sum(rollup_conversions_report.total_items) as total_items\n\n \n \n , sum(lead_conversions) as lead_conversions\n , sum(lead_view_through_conversions) as lead_view_through_conversions\n , sum(lead_value) as lead_value\n , sum(lead_items) as lead_items\n \n , sum(purchase_conversions) as purchase_conversions\n , sum(purchase_view_through_conversions) as purchase_view_through_conversions\n , sum(purchase_value) as purchase_value\n , sum(purchase_items) as purchase_items\n \n , sum(custom_conversions) as custom_conversions\n , sum(custom_view_through_conversions) as custom_view_through_conversions\n , sum(custom_value) as custom_value\n , sum(custom_items) as custom_items\n \n \n\n \n\n\n\n\n\n \n\n\n\n\n\n from report\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join rollup_conversions_report\n on report.account_id = rollup_conversions_report.account_id\n and report.source_relation = rollup_conversions_report.source_relation\n and report.date_day = rollup_conversions_report.date_day\n group by 1,2,3,4,5,6\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.reddit_ads__ad_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "reddit_ads__ad_report", "resource_type": "model", "package_name": "reddit_ads", "path": "reddit_ads__ad_report.sql", "original_file_path": "models/reddit_ads__ad_report.sql", "unique_id": "model.reddit_ads.reddit_ads__ad_report", "fqn": ["reddit_ads", "reddit_ads__ad_report"], "alias": "reddit_ads__ad_report", "checksum": {"name": "sha256", "checksum": "d317ae0b0d3b2aacb87e410f326a595d3f232de86842691a6ede9cc6daf2e87f"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily number of clicks, impressions, and spend per ad, along with account, campaign, ad group, and post information.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date_day"]}, "ad_id": {"name": "ad_id", "description": "The ID of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_id"]}, "ad_name": {"name": "ad_name", "description": "Name of ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_name"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "campaign_name": {"name": "campaign_name", "description": "Name of campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "Name of ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_id"]}, "currency": {"name": "currency", "description": "The currency this account uses (ISO-4217)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.currency"]}, "post_id": {"name": "post_id", "description": "The ID of the post.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.post_id"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "spend": {"name": "spend", "description": "Spend converted out of microcurrency (so Spend/1,000,000)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "The total click-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "The total view-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion"]}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "purchase_conversions": {"name": "purchase_conversions", "description": "Total attributed click-through conversions for purchase events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_view_through_conversions": {"name": "purchase_view_through_conversions", "description": "Total attributed view-through conversions for purchase events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_value": {"name": "purchase_value", "description": "Total monetary value associated with purchase conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_items": {"name": "purchase_items", "description": "Total number of items involved in purchase conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_conversions": {"name": "lead_conversions", "description": "Total attributed click-through conversions for lead generation events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_view_through_conversions": {"name": "lead_view_through_conversions", "description": "Total attributed view-through conversions for lead generation events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_value": {"name": "lead_value", "description": "Total monetary value associated with lead generation conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_items": {"name": "lead_items", "description": "Total number of items involved in lead generation conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_conversions": {"name": "custom_conversions", "description": "Total attributed click-through conversions for custom-defined events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_view_through_conversions": {"name": "custom_view_through_conversions", "description": "Total attributed view-through conversions for custom-defined events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_value": {"name": "custom_value", "description": "Total monetary value associated with custom-defined conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_items": {"name": "custom_items", "description": "Total number of items involved in custom-defined conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.2753234, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__ad_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_reddit_ads__ad_report') }}\n),\n\nads as (\n\n select *\n from {{ ref('stg_reddit_ads__ad') }}\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_reddit_ads__ad_group') }}\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_reddit_ads__campaign') }}\n),\n\naccounts as (\n\n select *\n from {{ ref('stg_reddit_ads__account') }}\n),\n\n{# This includes data at the event type level that we'll need to roll up and pivot out #}\nconversions_report as (\n\n select *\n from {{ ref('stg_reddit_ads__ad_conversions_report') }}\n),\n\nrollup_conversions_report as (\n\n select \n source_relation,\n date_day,\n ad_id,\n sum(conversions) as conversions,\n sum(view_through_conversions) as view_through_conversions,\n sum(total_value) as total_value,\n sum(total_items) as total_items\n\n {% if var('reddit_ads__conversion_event_types') %}\n {% for event_type in var('reddit_ads__conversion_event_types') %}\n , sum(case when event_name = '{{ event_type|lower }}' then conversions else 0 end) as {{ event_type|lower }}_conversions\n , sum(case when event_name = '{{ event_type|lower }}' then view_through_conversions else 0 end) as {{ event_type|lower }}_view_through_conversions\n , sum(case when event_name = '{{ event_type|lower }}' then total_value else 0 end) as {{ event_type|lower }}_value\n , sum(case when event_name = '{{ event_type|lower }}' then total_items else 0 end) as {{ event_type|lower }}_items\n {% endfor %}\n {% endif %}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='reddit_ads__ad_conversions_passthrough_metrics', transform = 'sum') }}\n\n from conversions_report\n\n {% if var('reddit_ads__conversion_event_types') %}\n where \n {% for event_type in var('reddit_ads__conversion_event_types') %}\n event_name = '{{ event_type|lower }}'\n {% if not loop.last %} or {% endif %} \n {% endfor %}\n {% endif %}\n\n group by 1,2,3\n),\n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n report.ad_id,\n ads.ad_name,\n report.account_id,\n campaigns.campaign_name,\n ads.campaign_id,\n ad_groups.ad_group_name,\n ads.ad_group_id,\n accounts.currency,\n ads.post_id,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(rollup_conversions_report.conversions) as conversions,\n sum(rollup_conversions_report.view_through_conversions) as view_through_conversions,\n sum(rollup_conversions_report.total_value) as total_value,\n sum(rollup_conversions_report.total_items) as total_items\n\n {% if var('reddit_ads__conversion_event_types') %} \n {% for event_type in var('reddit_ads__conversion_event_types') %}\n , sum({{ event_type|lower }}_conversions) as {{ event_type|lower }}_conversions\n , sum({{ event_type|lower }}_view_through_conversions) as {{ event_type|lower }}_view_through_conversions\n , sum({{ event_type|lower }}_value) as {{ event_type|lower }}_value\n , sum({{ event_type|lower }}_items) as {{ event_type|lower }}_items\n {% endfor %}\n {% endif %}\n\n {{ reddit_ads_persist_pass_through_columns(pass_through_variable='reddit_ads__ad_passthrough_metrics', identifier = 'report', transform = 'sum', alias_fields=['conversions', 'view_through_conversions', 'total_value', 'total_items']) }}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='reddit_ads__ad_conversions_passthrough_metrics', transform = 'sum') }}\n\n from report\n left join ads\n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join ad_groups\n on ads.ad_group_id = ad_groups.ad_group_id\n and ads.source_relation = ad_groups.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n left join rollup_conversions_report\n on report.ad_id = rollup_conversions_report.ad_id\n and report.source_relation = rollup_conversions_report.source_relation\n and report.date_day = rollup_conversions_report.date_day\n {{ dbt_utils.group_by(11) }}\n\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__ad_report", "package": null, "version": null}, {"name": "stg_reddit_ads__ad", "package": null, "version": null}, {"name": "stg_reddit_ads__ad_group", "package": null, "version": null}, {"name": "stg_reddit_ads__campaign", "package": null, "version": null}, {"name": "stg_reddit_ads__account", "package": null, "version": null}, {"name": "stg_reddit_ads__ad_conversions_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.reddit_ads.reddit_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.reddit_ads.stg_reddit_ads__ad_report", "model.reddit_ads.stg_reddit_ads__ad", "model.reddit_ads.stg_reddit_ads__ad_group", "model.reddit_ads.stg_reddit_ads__campaign", "model.reddit_ads.stg_reddit_ads__account", "model.reddit_ads.stg_reddit_ads__ad_conversions_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads__ad_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_report\"\n),\n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad\"\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group\"\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign\"\n),\n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account\"\n),\n\n\nconversions_report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_conversions_report\"\n),\n\nrollup_conversions_report as (\n\n select \n source_relation,\n date_day,\n ad_id,\n sum(conversions) as conversions,\n sum(view_through_conversions) as view_through_conversions,\n sum(total_value) as total_value,\n sum(total_items) as total_items\n\n \n \n , sum(case when event_name = 'lead' then conversions else 0 end) as lead_conversions\n , sum(case when event_name = 'lead' then view_through_conversions else 0 end) as lead_view_through_conversions\n , sum(case when event_name = 'lead' then total_value else 0 end) as lead_value\n , sum(case when event_name = 'lead' then total_items else 0 end) as lead_items\n \n , sum(case when event_name = 'purchase' then conversions else 0 end) as purchase_conversions\n , sum(case when event_name = 'purchase' then view_through_conversions else 0 end) as purchase_view_through_conversions\n , sum(case when event_name = 'purchase' then total_value else 0 end) as purchase_value\n , sum(case when event_name = 'purchase' then total_items else 0 end) as purchase_items\n \n , sum(case when event_name = 'custom' then conversions else 0 end) as custom_conversions\n , sum(case when event_name = 'custom' then view_through_conversions else 0 end) as custom_view_through_conversions\n , sum(case when event_name = 'custom' then total_value else 0 end) as custom_value\n , sum(case when event_name = 'custom' then total_items else 0 end) as custom_items\n \n \n\n \n\n\n\n\n\n from conversions_report\n\n \n where \n \n event_name = 'lead'\n or \n \n event_name = 'purchase'\n or \n \n event_name = 'custom'\n \n \n \n\n group by 1,2,3\n),\n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n report.ad_id,\n ads.ad_name,\n report.account_id,\n campaigns.campaign_name,\n ads.campaign_id,\n ad_groups.ad_group_name,\n ads.ad_group_id,\n accounts.currency,\n ads.post_id,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(rollup_conversions_report.conversions) as conversions,\n sum(rollup_conversions_report.view_through_conversions) as view_through_conversions,\n sum(rollup_conversions_report.total_value) as total_value,\n sum(rollup_conversions_report.total_items) as total_items\n\n \n \n , sum(lead_conversions) as lead_conversions\n , sum(lead_view_through_conversions) as lead_view_through_conversions\n , sum(lead_value) as lead_value\n , sum(lead_items) as lead_items\n \n , sum(purchase_conversions) as purchase_conversions\n , sum(purchase_view_through_conversions) as purchase_view_through_conversions\n , sum(purchase_value) as purchase_value\n , sum(purchase_items) as purchase_items\n \n , sum(custom_conversions) as custom_conversions\n , sum(custom_view_through_conversions) as custom_view_through_conversions\n , sum(custom_value) as custom_value\n , sum(custom_items) as custom_items\n \n \n\n \n\n\n\n\n\n \n\n\n\n\n\n from report\n left join ads\n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join ad_groups\n on ads.ad_group_id = ad_groups.ad_group_id\n and ads.source_relation = ad_groups.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n left join rollup_conversions_report\n on report.ad_id = rollup_conversions_report.ad_id\n and report.source_relation = rollup_conversions_report.source_relation\n and report.date_day = rollup_conversions_report.date_day\n group by 1,2,3,4,5,6,7,8,9,10,11\n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.reddit_ads__ad_group_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "reddit_ads__ad_group_report", "resource_type": "model", "package_name": "reddit_ads", "path": "reddit_ads__ad_group_report.sql", "original_file_path": "models/reddit_ads__ad_group_report.sql", "unique_id": "model.reddit_ads.reddit_ads__ad_group_report", "fqn": ["reddit_ads", "reddit_ads__ad_group_report"], "alias": "reddit_ads__ad_group_report", "checksum": {"name": "sha256", "checksum": "4ad3ac31ab9acbc33583494548fb6205684594260057857aea768c6b2ea041e0"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily number of clicks, impressions, and spend per ad group, along with campaign and account information.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "Name of ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_id"]}, "campaign_name": {"name": "campaign_name", "description": "Name of campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "currency": {"name": "currency", "description": "The currency this account uses (ISO-4217)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.currency"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "spend": {"name": "spend", "description": "Spend converted out of microcurrency (so Spend/1,000,000)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "The total click-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "The total view-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion"]}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "purchase_conversions": {"name": "purchase_conversions", "description": "Total attributed click-through conversions for purchase events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_view_through_conversions": {"name": "purchase_view_through_conversions", "description": "Total attributed view-through conversions for purchase events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_value": {"name": "purchase_value", "description": "Total monetary value associated with purchase conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "purchase_items": {"name": "purchase_items", "description": "Total number of items involved in purchase conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_conversions": {"name": "lead_conversions", "description": "Total attributed click-through conversions for lead generation events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_view_through_conversions": {"name": "lead_view_through_conversions", "description": "Total attributed view-through conversions for lead generation events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_value": {"name": "lead_value", "description": "Total monetary value associated with lead generation conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lead_items": {"name": "lead_items", "description": "Total number of items involved in lead generation conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_conversions": {"name": "custom_conversions", "description": "Total attributed click-through conversions for custom-defined events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_view_through_conversions": {"name": "custom_view_through_conversions", "description": "Total attributed view-through conversions for custom-defined events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_value": {"name": "custom_value", "description": "Total monetary value associated with custom-defined conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "custom_items": {"name": "custom_items", "description": "Total number of items involved in custom-defined conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.2730215, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__ad_group_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_reddit_ads__ad_group_report') }}\n),\n\nad_groups as (\n\n select *\n from {{ ref('stg_reddit_ads__ad_group') }}\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_reddit_ads__campaign') }}\n),\n\naccounts as (\n\n select *\n from {{ ref('stg_reddit_ads__account') }}\n),\n\n{# This includes data at the event type level that we'll need to roll up and pivot out #}\nconversions_report as (\n\n select *\n from {{ ref('stg_reddit_ads__ad_group_conversions_report') }}\n),\n\nrollup_conversions_report as (\n\n select \n source_relation,\n date_day,\n ad_group_id,\n sum(conversions) as conversions,\n sum(view_through_conversions) as view_through_conversions,\n sum(total_value) as total_value,\n sum(total_items) as total_items\n\n {% if var('reddit_ads__conversion_event_types') %}\n {% for event_type in var('reddit_ads__conversion_event_types') %}\n , sum(case when event_name = '{{ event_type|lower }}' then conversions else 0 end) as {{ event_type|lower }}_conversions\n , sum(case when event_name = '{{ event_type|lower }}' then view_through_conversions else 0 end) as {{ event_type|lower }}_view_through_conversions\n , sum(case when event_name = '{{ event_type|lower }}' then total_value else 0 end) as {{ event_type|lower }}_value\n , sum(case when event_name = '{{ event_type|lower }}' then total_items else 0 end) as {{ event_type|lower }}_items\n {% endfor %}\n {% endif %}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='reddit_ads__ad_group_conversions_passthrough_metrics', transform = 'sum') }}\n\n from conversions_report\n\n {% if var('reddit_ads__conversion_event_types') %}\n where \n {% for event_type in var('reddit_ads__conversion_event_types') %}\n event_name = '{{ event_type|lower }}'\n {% if not loop.last %} or {% endif %} \n {% endfor %}\n {% endif %}\n\n group by 1,2,3\n),\n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n report.account_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n campaigns.campaign_name,\n ad_groups.campaign_id,\n accounts.currency,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(rollup_conversions_report.conversions) as conversions,\n sum(rollup_conversions_report.view_through_conversions) as view_through_conversions,\n sum(rollup_conversions_report.total_value) as total_value,\n sum(rollup_conversions_report.total_items) as total_items\n\n {% if var('reddit_ads__conversion_event_types') %} \n {% for event_type in var('reddit_ads__conversion_event_types') %}\n , sum({{ event_type|lower }}_conversions) as {{ event_type|lower }}_conversions\n , sum({{ event_type|lower }}_view_through_conversions) as {{ event_type|lower }}_view_through_conversions\n , sum({{ event_type|lower }}_value) as {{ event_type|lower }}_value\n , sum({{ event_type|lower }}_items) as {{ event_type|lower }}_items\n {% endfor %}\n {% endif %}\n\n {{ reddit_ads_persist_pass_through_columns(pass_through_variable='reddit_ads__ad_group_passthrough_metrics', identifier = 'report', transform = 'sum', alias_fields=['conversions', 'view_through_conversions', 'total_value', 'total_items']) }}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='reddit_ads__ad_group_conversions_passthrough_metrics', transform = 'sum') }}\n\n from report\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join campaigns\n on ad_groups.campaign_id = campaigns.campaign_id\n and ad_groups.source_relation = campaigns.source_relation\n left join rollup_conversions_report\n on report.ad_group_id = rollup_conversions_report.ad_group_id\n and report.source_relation = rollup_conversions_report.source_relation\n and report.date_day = rollup_conversions_report.date_day\n {{ dbt_utils.group_by(8) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__ad_group_report", "package": null, "version": null}, {"name": "stg_reddit_ads__ad_group", "package": null, "version": null}, {"name": "stg_reddit_ads__campaign", "package": null, "version": null}, {"name": "stg_reddit_ads__account", "package": null, "version": null}, {"name": "stg_reddit_ads__ad_group_conversions_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.persist_pass_through_columns", "macro.reddit_ads.reddit_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.reddit_ads.stg_reddit_ads__ad_group_report", "model.reddit_ads.stg_reddit_ads__ad_group", "model.reddit_ads.stg_reddit_ads__campaign", "model.reddit_ads.stg_reddit_ads__account", "model.reddit_ads.stg_reddit_ads__ad_group_conversions_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads__ad_group_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group_report\"\n),\n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group\"\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign\"\n),\n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account\"\n),\n\n\nconversions_report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group_conversions_report\"\n),\n\nrollup_conversions_report as (\n\n select \n source_relation,\n date_day,\n ad_group_id,\n sum(conversions) as conversions,\n sum(view_through_conversions) as view_through_conversions,\n sum(total_value) as total_value,\n sum(total_items) as total_items\n\n \n \n , sum(case when event_name = 'lead' then conversions else 0 end) as lead_conversions\n , sum(case when event_name = 'lead' then view_through_conversions else 0 end) as lead_view_through_conversions\n , sum(case when event_name = 'lead' then total_value else 0 end) as lead_value\n , sum(case when event_name = 'lead' then total_items else 0 end) as lead_items\n \n , sum(case when event_name = 'purchase' then conversions else 0 end) as purchase_conversions\n , sum(case when event_name = 'purchase' then view_through_conversions else 0 end) as purchase_view_through_conversions\n , sum(case when event_name = 'purchase' then total_value else 0 end) as purchase_value\n , sum(case when event_name = 'purchase' then total_items else 0 end) as purchase_items\n \n , sum(case when event_name = 'custom' then conversions else 0 end) as custom_conversions\n , sum(case when event_name = 'custom' then view_through_conversions else 0 end) as custom_view_through_conversions\n , sum(case when event_name = 'custom' then total_value else 0 end) as custom_value\n , sum(case when event_name = 'custom' then total_items else 0 end) as custom_items\n \n \n\n \n\n\n\n\n\n from conversions_report\n\n \n where \n \n event_name = 'lead'\n or \n \n event_name = 'purchase'\n or \n \n event_name = 'custom'\n \n \n \n\n group by 1,2,3\n),\n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n report.account_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n campaigns.campaign_name,\n ad_groups.campaign_id,\n accounts.currency,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(rollup_conversions_report.conversions) as conversions,\n sum(rollup_conversions_report.view_through_conversions) as view_through_conversions,\n sum(rollup_conversions_report.total_value) as total_value,\n sum(rollup_conversions_report.total_items) as total_items\n\n \n \n , sum(lead_conversions) as lead_conversions\n , sum(lead_view_through_conversions) as lead_view_through_conversions\n , sum(lead_value) as lead_value\n , sum(lead_items) as lead_items\n \n , sum(purchase_conversions) as purchase_conversions\n , sum(purchase_view_through_conversions) as purchase_view_through_conversions\n , sum(purchase_value) as purchase_value\n , sum(purchase_items) as purchase_items\n \n , sum(custom_conversions) as custom_conversions\n , sum(custom_view_through_conversions) as custom_view_through_conversions\n , sum(custom_value) as custom_value\n , sum(custom_items) as custom_items\n \n \n\n \n\n\n\n\n\n \n\n\n\n\n\n from report\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join campaigns\n on ad_groups.campaign_id = campaigns.campaign_id\n and ad_groups.source_relation = campaigns.source_relation\n left join rollup_conversions_report\n on report.ad_group_id = rollup_conversions_report.ad_group_id\n and report.source_relation = rollup_conversions_report.source_relation\n and report.date_day = rollup_conversions_report.date_day\n group by 1,2,3,4,5,6,7,8\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__ad_group": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_group", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/stg_reddit_ads__ad_group.sql", "original_file_path": "models/staging/stg_reddit_ads__ad_group.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__ad_group", "fqn": ["reddit_ads", "staging", "stg_reddit_ads__ad_group"], "alias": "stg_reddit_ads__ad_group", "checksum": {"name": "sha256", "checksum": "da64d1b5afdfee37e1a9871da13ed3054e1146e6996700208acd4f1f4588f829"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents information about each ad group.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_id"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "bid_strategy": {"name": "bid_strategy", "description": "The bid strategy for this entity. \"MAXIMIZE_VOLUME\", \"MANUAL_BIDDING\", or \"BIDLESS\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.bid_strategy"]}, "bid_value": {"name": "bid_value", "description": "The amount to pay in microcurrency per bidding event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.bid_value"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "configured_status": {"name": "configured_status", "description": "The status configured by the account owner. \"ACTIVE\", \"PAUSED\", \"ARCHIVED\", \"DELETED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.configured_status"]}, "effective_status": {"name": "effective_status", "description": "The calculated status determining the real status of this entity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.effective_status"]}, "end_time_at": {"name": "end_time_at", "description": "When the entity will stop delivering.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.end_time"]}, "expand_targeting": {"name": "expand_targeting", "description": "Boolean that when selected, allows Reddit to expand your targeting to maximize your results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.expand_targeting"]}, "goal_type": {"name": "goal_type", "description": "The type of goal for the entity. \"IMPRESSIONS\", \"PERCENTAGE\", \"CLICKS\", \"CONVERSIONS\", \"LIFETIME_SPEND\", \"DAILY_SPEND\", or \"VIDEO_VIEWABLE_IMPRESSIONS\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.goal_type"]}, "goal_value": {"name": "goal_value", "description": "The value used to determine the goal has been met. This is measured in microcurrency for monetary goals types.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.goal_value"]}, "is_processing": {"name": "is_processing", "description": "Whether or not effective status is processing", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.is_processing"]}, "ad_group_name": {"name": "ad_group_name", "description": "Name of ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_name"]}, "optimization_strategy_type": {"name": "optimization_strategy_type", "description": "The strategy to use when optimizing the delivery of an ad. \"DOWNSTREAM_CONVERSIONS\" or \"APP_INSTALLS\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.optimization_strategy_type"]}, "start_time_at": {"name": "start_time_at", "description": "When the entity will begin to deliver.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.start_time"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/staging/stg_reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.3617177, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_reddit_ads__ad_group_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_reddit_ads__ad_group_tmp')),\n staging_columns=get_ad_group_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='reddit_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n account_id,\n bid_strategy,\n bid_value,\n campaign_id,\n configured_status,\n effective_status,\n cast(end_time as {{ dbt.type_timestamp() }}) as end_time_at,\n expand_targeting,\n goal_type,\n goal_value,\n id as ad_group_id,\n is_processing,\n name as ad_group_name,\n optimization_strategy_type,\n cast(start_time as {{ dbt.type_timestamp() }}) as start_time_at\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__ad_group_tmp", "package": null, "version": null}, {"name": "stg_reddit_ads__ad_group_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.reddit_ads.get_ad_group_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.reddit_ads.stg_reddit_ads__ad_group_tmp"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads__ad_group.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n bid_strategy as bid_strategy,\n bid_value as bid_value,\n campaign_id as campaign_id,\n configured_status as configured_status,\n effective_status as effective_status,\n end_time as end_time,\n expand_targeting as expand_targeting,\n goal_type as goal_type,\n goal_value as goal_value,\n id as id,\n is_processing as is_processing,\n name as name,\n optimization_strategy_type as optimization_strategy_type,\n start_time as start_time\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n account_id,\n bid_strategy,\n bid_value,\n campaign_id,\n configured_status,\n effective_status,\n cast(end_time as timestamp) as end_time_at,\n expand_targeting,\n goal_type,\n goal_value,\n id as ad_group_id,\n is_processing,\n name as ad_group_name,\n optimization_strategy_type,\n cast(start_time as timestamp) as start_time_at\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__ad_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_report", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/stg_reddit_ads__ad_report.sql", "original_file_path": "models/staging/stg_reddit_ads__ad_report.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__ad_report", "fqn": ["reddit_ads", "staging", "stg_reddit_ads__ad_report"], "alias": "stg_reddit_ads__ad_report", "checksum": {"name": "sha256", "checksum": "22a7246e7a8509250b3d16fccd4a9a533d4d8562038e4dbcefca9812abe6ea23"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a summary of events for each given date and ad.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "ad_id": {"name": "ad_id", "description": "The ID of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_id"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "region": {"name": "region", "description": "The region (US state or UK country) targeted for the reports", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.region"]}, "spend": {"name": "spend", "description": "Spend converted out of microcurrency (so Spend/1,000,000)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/staging/stg_reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.3597777, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_reddit_ads__ad_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_reddit_ads__ad_report_tmp')),\n staging_columns=get_ad_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='reddit_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n account_id,\n ad_id,\n coalesce(clicks,0) as clicks,\n date as date_day,\n coalesce(impressions,0) as impressions,\n region,\n {{ reddit_ads.convert_microcurrency('spend') }} as spend\n \n {{ fivetran_utils.fill_pass_through_columns('reddit_ads__ad_passthrough_metrics') }}\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__ad_report_tmp", "package": null, "version": null}, {"name": "stg_reddit_ads__ad_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.reddit_ads.get_ad_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.reddit_ads.convert_microcurrency", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.reddit_ads.stg_reddit_ads__ad_report_tmp"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads__ad_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n ad_id as ad_id,\n clicks as clicks,\n date as date,\n impressions as impressions,\n region as region,\n spend as spend,\n date as date_day\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n account_id,\n ad_id,\n coalesce(clicks,0) as clicks,\n date as date_day,\n coalesce(impressions,0) as impressions,\n region,\n \n coalesce(cast(spend as numeric(28,6)) / cast(1000000 as numeric(28,6)), 0)\n as spend\n \n \n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__ad_conversions_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_conversions_report", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/stg_reddit_ads__ad_conversions_report.sql", "original_file_path": "models/staging/stg_reddit_ads__ad_conversions_report.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__ad_conversions_report", "fqn": ["reddit_ads", "staging", "stg_reddit_ads__ad_conversions_report"], "alias": "stg_reddit_ads__ad_conversions_report", "checksum": {"name": "sha256", "checksum": "192420f1f3056e8fa8adec4b0e8288372b012c4555d9cdf0aa764f44c6fb2910"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Provides a summary of conversion events at the individual ad level, aggregating key metrics by event and day such as view-through and click-through conversions.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "ad_id": {"name": "ad_id", "description": "The ID of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_id"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "event_name": {"name": "event_name", "description": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.event_name"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "conversions": {"name": "conversions", "description": "The total click-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion"]}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "The total view-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion"]}, "source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/staging/stg_reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.3675268, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_conversions_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_reddit_ads__ad_conversions_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_reddit_ads__ad_conversions_report_tmp')),\n staging_columns=get_ad_conversions_report_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='reddit_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_synced,\n account_id,\n ad_id,\n date as date_day,\n lower(event_name) as event_name,\n coalesce(total_items, 0) as total_items,\n coalesce(total_value, 0) as total_value,\n coalesce(clicks, click_through_conversion_attribution_window_month, 0) as conversions,\n coalesce(views, view_through_conversion_attribution_window_month, 0) as view_through_conversions\n \n {{ fivetran_utils.fill_pass_through_columns('reddit_ads__ad_conversions_passthrough_metrics') }}\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": ["doc.reddit_ads.stg_reddit_ads__ad_conversions_report"], "language": "sql", "refs": [{"name": "stg_reddit_ads__ad_conversions_report_tmp", "package": null, "version": null}, {"name": "stg_reddit_ads__ad_conversions_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.reddit_ads.get_ad_conversions_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.reddit_ads.stg_reddit_ads__ad_conversions_report_tmp"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads__ad_conversions_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_conversions_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n ad_id as ad_id,\n cast(null as integer) as clicks,\n click_through_conversion_attribution_window_month as click_through_conversion_attribution_window_month,\n date as date,\n event_name as event_name,\n total_items as total_items,\n total_value as total_value,\n cast(null as integer) as views,\n view_through_conversion_attribution_window_month as view_through_conversion_attribution_window_month\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_synced,\n account_id,\n ad_id,\n date as date_day,\n lower(event_name) as event_name,\n coalesce(total_items, 0) as total_items,\n coalesce(total_value, 0) as total_value,\n coalesce(clicks, click_through_conversion_attribution_window_month, 0) as conversions,\n coalesce(views, view_through_conversion_attribution_window_month, 0) as view_through_conversions\n \n \n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__campaign": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/stg_reddit_ads__campaign.sql", "original_file_path": "models/staging/stg_reddit_ads__campaign.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__campaign", "fqn": ["reddit_ads", "staging", "stg_reddit_ads__campaign"], "alias": "stg_reddit_ads__campaign", "checksum": {"name": "sha256", "checksum": "a49b8cc309b03bfec5657cef3d13e334db88069530938e8b1cfa9dc137f6a5a1"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents information about each campaign.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "configured_status": {"name": "configured_status", "description": "The status configured by the account owner. \"ACTIVE\", \"PAUSED\", \"ARCHIVED\", \"DELETED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.configured_status"]}, "effective_status": {"name": "effective_status", "description": "The calculated status determining the real status of this entity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.effective_status"]}, "funding_instrument_id": {"name": "funding_instrument_id", "description": "Campaign level funding instrument id", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.funding_instrument_id"]}, "is_processing": {"name": "is_processing", "description": "Whether or not effective status is processing", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.is_processing"]}, "campaign_name": {"name": "campaign_name", "description": "Name of campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_name"]}, "objective": {"name": "objective", "description": "The objective type of a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.objective"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/staging/stg_reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.3636959, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_reddit_ads__campaign_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_reddit_ads__campaign_tmp')),\n staging_columns=get_campaign_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='reddit_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n account_id,\n configured_status,\n effective_status,\n funding_instrument_id,\n id as campaign_id,\n is_processing,\n name as campaign_name,\n objective\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__campaign_tmp", "package": null, "version": null}, {"name": "stg_reddit_ads__campaign_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.reddit_ads.get_campaign_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.reddit_ads.stg_reddit_ads__campaign_tmp"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads__campaign.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n configured_status as configured_status,\n effective_status as effective_status,\n funding_instrument_id as funding_instrument_id,\n id as id,\n is_processing as is_processing,\n name as name,\n objective as objective\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n account_id,\n configured_status,\n effective_status,\n funding_instrument_id,\n id as campaign_id,\n is_processing,\n name as campaign_name,\n objective\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_country_conversions_report", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/stg_reddit_ads__campaign_country_conversions_report.sql", "original_file_path": "models/staging/stg_reddit_ads__campaign_country_conversions_report.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report", "fqn": ["reddit_ads", "staging", "stg_reddit_ads__campaign_country_conversions_report"], "alias": "stg_reddit_ads__campaign_country_conversions_report", "checksum": {"name": "sha256", "checksum": "d19ac3e970becaa7a61909d0c7a4ba76cbdb1f26223639db8124740af8ef48ab"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Provides a summary of conversion events at the campaign and country level, aggregating key metrics by event and day such as view-through and click-through conversions.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "country": {"name": "country", "description": "The country associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.country"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "event_name": {"name": "event_name", "description": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.event_name"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "conversions": {"name": "conversions", "description": "The total click-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion"]}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "The total view-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion"]}, "source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/staging/stg_reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.370509, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_country_conversions_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars([\n 'ad_reporting__reddit_ads_enabled',\n 'reddit_ads__using_campaign_country_report',\n 'reddit_ads__using_campaign_country_conversions_report'])\n) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_reddit_ads__campaign_country_conversions_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_reddit_ads__campaign_country_conversions_report_tmp')),\n staging_columns=get_campaign_country_conversions_report_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='reddit_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_synced,\n account_id,\n campaign_id,\n date as date_day,\n country,\n lower(event_name) as event_name,\n coalesce(total_items,0) as total_items,\n coalesce(total_value,0) as total_value,\n coalesce(clicks, click_through_conversion_attribution_window_month, 0) as conversions,\n coalesce(views, view_through_conversion_attribution_window_month, 0) as view_through_conversions\n\n {{ fivetran_utils.fill_pass_through_columns('reddit_ads__campaign_country_conversions_passthrough_metrics') }}\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": ["doc.reddit_ads.campaign_country_conversions_report"], "language": "sql", "refs": [{"name": "stg_reddit_ads__campaign_country_conversions_report_tmp", "package": null, "version": null}, {"name": "stg_reddit_ads__campaign_country_conversions_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.reddit_ads.get_campaign_country_conversions_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report_tmp"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads__campaign_country_conversions_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_country_conversions_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n cast(null as float) as avg_value,\n campaign_id as campaign_id,\n cast(null as integer) as clicks,\n click_through_conversion_attribution_window_month as click_through_conversion_attribution_window_month,\n country as country,\n date as date,\n event_name as event_name,\n total_items as total_items,\n total_value as total_value,\n cast(null as integer) as views,\n view_through_conversion_attribution_window_month as view_through_conversion_attribution_window_month\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_synced,\n account_id,\n campaign_id,\n date as date_day,\n country,\n lower(event_name) as event_name,\n coalesce(total_items,0) as total_items,\n coalesce(total_value,0) as total_value,\n coalesce(clicks, click_through_conversion_attribution_window_month, 0) as conversions,\n coalesce(views, view_through_conversion_attribution_window_month, 0) as view_through_conversions\n\n \n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_report", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/stg_reddit_ads__campaign_report.sql", "original_file_path": "models/staging/stg_reddit_ads__campaign_report.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_report", "fqn": ["reddit_ads", "staging", "stg_reddit_ads__campaign_report"], "alias": "stg_reddit_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "3ee1dc5dc88198ea936dff530972f79c8df3f7d94559570a48e4849e41c56303"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a summary of events for each given date and campaign.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "region": {"name": "region", "description": "The region (US state or UK country) targeted for the reports", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.region"]}, "spend": {"name": "spend", "description": "Spend converted out of microcurrency (so Spend/1,000,000)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/staging/stg_reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.3646374, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_reddit_ads__campaign_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_reddit_ads__campaign_report_tmp')),\n staging_columns=get_campaign_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='reddit_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n account_id,\n campaign_id,\n coalesce(clicks,0) as clicks,\n date as date_day,\n coalesce(impressions,0) as impressions,\n region,\n {{ reddit_ads.convert_microcurrency('spend') }} as spend\n \n {{ fivetran_utils.fill_pass_through_columns('reddit_ads__campaign_passthrough_metrics') }}\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__campaign_report_tmp", "package": null, "version": null}, {"name": "stg_reddit_ads__campaign_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.reddit_ads.get_campaign_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.reddit_ads.convert_microcurrency", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.reddit_ads.stg_reddit_ads__campaign_report_tmp"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n campaign_id as campaign_id,\n clicks as clicks,\n date as date,\n impressions as impressions,\n region as region,\n spend as spend,\n date as date_day\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n account_id,\n campaign_id,\n coalesce(clicks,0) as clicks,\n date as date_day,\n coalesce(impressions,0) as impressions,\n region,\n \n coalesce(cast(spend as numeric(28,6)) / cast(1000000 as numeric(28,6)), 0)\n as spend\n \n \n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__ad": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/stg_reddit_ads__ad.sql", "original_file_path": "models/staging/stg_reddit_ads__ad.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__ad", "fqn": ["reddit_ads", "staging", "stg_reddit_ads__ad"], "alias": "stg_reddit_ads__ad", "checksum": {"name": "sha256", "checksum": "959174d214ac7cd49c55a530a58c45af4e23d084cbf8928188524b4e0cc9e599"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents information about each ad.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}, "ad_id": {"name": "ad_id", "description": "The ID of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_id"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "click_url": {"name": "click_url", "description": "The destination url, or the website address, that a visitor goes to when they click on the ad", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_url"]}, "configured_status": {"name": "configured_status", "description": "The status configured by the account owner. \"ACTIVE\", \"PAUSED\", \"ARCHIVED\", \"DELETED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.configured_status"]}, "effective_status": {"name": "effective_status", "description": "The calculated status determining the real status of this entity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.effective_status"]}, "is_processing": {"name": "is_processing", "description": "Whether or not effective status is processing", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.is_processing"]}, "ad_name": {"name": "ad_name", "description": "Name of ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_name"]}, "post_id": {"name": "post_id", "description": "The ID of the post.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.post_id"]}, "post_url": {"name": "post_url", "description": "The URL belonging to the post.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.post_url"]}, "rejection_reason": {"name": "rejection_reason", "description": "Reason why entity was rejected.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.rejection_reason"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/staging/stg_reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.3585587, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_reddit_ads__ad_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_reddit_ads__ad_tmp')),\n staging_columns=get_ad_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='reddit_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n account_id,\n ad_group_id,\n campaign_id,\n click_url,\n configured_status,\n effective_status,\n id as ad_id,\n is_processing,\n name as ad_name,\n post_id,\n post_url,\n rejection_reason\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__ad_tmp", "package": null, "version": null}, {"name": "stg_reddit_ads__ad_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.reddit_ads.get_ad_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.reddit_ads.stg_reddit_ads__ad_tmp"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads__ad.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n ad_group_id as ad_group_id,\n campaign_id as campaign_id,\n click_url as click_url,\n configured_status as configured_status,\n effective_status as effective_status,\n id as id,\n is_processing as is_processing,\n name as name,\n post_id as post_id,\n post_url as post_url,\n rejection_reason as rejection_reason\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n account_id,\n ad_group_id,\n campaign_id,\n click_url,\n configured_status,\n effective_status,\n id as ad_id,\n is_processing,\n name as ad_name,\n post_id,\n post_url,\n rejection_reason\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__account_conversions_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__account_conversions_report", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/stg_reddit_ads__account_conversions_report.sql", "original_file_path": "models/staging/stg_reddit_ads__account_conversions_report.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__account_conversions_report", "fqn": ["reddit_ads", "staging", "stg_reddit_ads__account_conversions_report"], "alias": "stg_reddit_ads__account_conversions_report", "checksum": {"name": "sha256", "checksum": "0a6e7b5a810d37edb229c20e95b9eb4538ec2275bb4c7fb8b725f5d79ad3429d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Provides a summary of conversion events at the account level, aggregating key metrics by event and day such as view-through and click-through conversions.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "event_name": {"name": "event_name", "description": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.event_name"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "conversions": {"name": "conversions", "description": "The total click-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion"]}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "The total view-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion"]}, "source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/staging/stg_reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.365552, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account_conversions_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_reddit_ads__account_conversions_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_reddit_ads__account_conversions_report_tmp')),\n staging_columns=get_account_conversions_report_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='reddit_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_synced,\n account_id,\n date as date_day,\n lower(event_name) as event_name,\n coalesce(total_items,0) as total_items,\n coalesce(total_value,0) as total_value,\n coalesce(clicks, click_through_conversion_attribution_window_month, 0) as conversions,\n coalesce(views, view_through_conversion_attribution_window_month, 0) as view_through_conversions\n \n {{ fivetran_utils.fill_pass_through_columns('reddit_ads__account_conversions_passthrough_metrics') }}\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": ["doc.reddit_ads.stg_reddit_ads__account_conversions_report"], "language": "sql", "refs": [{"name": "stg_reddit_ads__account_conversions_report_tmp", "package": null, "version": null}, {"name": "stg_reddit_ads__account_conversions_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.reddit_ads.get_account_conversions_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.reddit_ads.stg_reddit_ads__account_conversions_report_tmp"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads__account_conversions_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account_conversions_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n cast(null as integer) as clicks,\n click_through_conversion_attribution_window_month as click_through_conversion_attribution_window_month,\n date as date,\n event_name as event_name,\n total_items as total_items,\n total_value as total_value,\n cast(null as integer) as views,\n view_through_conversion_attribution_window_month as view_through_conversion_attribution_window_month\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_synced,\n account_id,\n date as date_day,\n lower(event_name) as event_name,\n coalesce(total_items,0) as total_items,\n coalesce(total_value,0) as total_value,\n coalesce(clicks, click_through_conversion_attribution_window_month, 0) as conversions,\n coalesce(views, view_through_conversion_attribution_window_month, 0) as view_through_conversions\n \n \n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__account_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__account_report", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/stg_reddit_ads__account_report.sql", "original_file_path": "models/staging/stg_reddit_ads__account_report.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__account_report", "fqn": ["reddit_ads", "staging", "stg_reddit_ads__account_report"], "alias": "stg_reddit_ads__account_report", "checksum": {"name": "sha256", "checksum": "43a50246b76914003044d726a2f32ddd5e79c4b81b4e53d155e3fac4858d19f3"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a summary of events for each given date and account.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "region": {"name": "region", "description": "The region (US state or UK country) targeted for the reports", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.region"]}, "spend": {"name": "spend", "description": "Spend converted out of microcurrency (so Spend/1,000,000)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/staging/stg_reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.357424, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_reddit_ads__account_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_reddit_ads__account_report_tmp')),\n staging_columns=get_account_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='reddit_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n account_id,\n coalesce(clicks,0) as clicks,\n date as date_day,\n coalesce(impressions,0) as impressions,\n region,\n {{ reddit_ads.convert_microcurrency('spend') }} as spend\n \n {{ fivetran_utils.fill_pass_through_columns('reddit_ads__account_passthrough_metrics') }}\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__account_report_tmp", "package": null, "version": null}, {"name": "stg_reddit_ads__account_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.reddit_ads.get_account_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.reddit_ads.convert_microcurrency", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.reddit_ads.stg_reddit_ads__account_report_tmp"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads__account_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n clicks as clicks,\n date as date,\n impressions as impressions,\n region as region,\n spend as spend,\n date as date_day\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n account_id,\n coalesce(clicks,0) as clicks,\n date as date_day,\n coalesce(impressions,0) as impressions,\n region,\n \n coalesce(cast(spend as numeric(28,6)) / cast(1000000 as numeric(28,6)), 0)\n as spend\n \n \n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__campaign_conversions_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_conversions_report", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/stg_reddit_ads__campaign_conversions_report.sql", "original_file_path": "models/staging/stg_reddit_ads__campaign_conversions_report.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_conversions_report", "fqn": ["reddit_ads", "staging", "stg_reddit_ads__campaign_conversions_report"], "alias": "stg_reddit_ads__campaign_conversions_report", "checksum": {"name": "sha256", "checksum": "275cd73d649436a0b8408bdc79124c7922f0af37bf724e2b774b0a1f28de7ff1"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Provides a summary of conversion events at the campaign level, aggregating key metrics by event and day such as view-through and click-through conversions.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "event_name": {"name": "event_name", "description": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.event_name"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "conversions": {"name": "conversions", "description": "The total click-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion"]}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "The total view-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion"]}, "source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/staging/stg_reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.3684962, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_conversions_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_reddit_ads__campaign_conversions_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_reddit_ads__campaign_conversions_report_tmp')),\n staging_columns=get_campaign_conversions_report_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='reddit_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_synced,\n account_id,\n campaign_id,\n date as date_day,\n lower(event_name) as event_name,\n coalesce(total_items,0) as total_items,\n coalesce(total_value,0) as total_value,\n coalesce(clicks, click_through_conversion_attribution_window_month, 0) as conversions,\n coalesce(views, view_through_conversion_attribution_window_month, 0) as view_through_conversions\n \n {{ fivetran_utils.fill_pass_through_columns('reddit_ads__campaign_conversions_passthrough_metrics') }}\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": ["doc.reddit_ads.stg_reddit_ads__campaign_conversions_report"], "language": "sql", "refs": [{"name": "stg_reddit_ads__campaign_conversions_report_tmp", "package": null, "version": null}, {"name": "stg_reddit_ads__campaign_conversions_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.reddit_ads.get_campaign_conversions_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.reddit_ads.stg_reddit_ads__campaign_conversions_report_tmp"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads__campaign_conversions_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_conversions_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n campaign_id as campaign_id,\n cast(null as integer) as clicks,\n click_through_conversion_attribution_window_month as click_through_conversion_attribution_window_month,\n date as date,\n event_name as event_name,\n total_items as total_items,\n total_value as total_value,\n cast(null as integer) as views,\n view_through_conversion_attribution_window_month as view_through_conversion_attribution_window_month\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_synced,\n account_id,\n campaign_id,\n date as date_day,\n lower(event_name) as event_name,\n coalesce(total_items,0) as total_items,\n coalesce(total_value,0) as total_value,\n coalesce(clicks, click_through_conversion_attribution_window_month, 0) as conversions,\n coalesce(views, view_through_conversion_attribution_window_month, 0) as view_through_conversions\n \n \n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__ad_group_conversions_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_group_conversions_report", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/stg_reddit_ads__ad_group_conversions_report.sql", "original_file_path": "models/staging/stg_reddit_ads__ad_group_conversions_report.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__ad_group_conversions_report", "fqn": ["reddit_ads", "staging", "stg_reddit_ads__ad_group_conversions_report"], "alias": "stg_reddit_ads__ad_group_conversions_report", "checksum": {"name": "sha256", "checksum": "13632a9a07209b5c8a628e31e625fa18b1997e4f8045bd7e7bfcee1e789242b4"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Provides a summary of conversion events at the ad group level, aggregating key metrics by event and day such as view-through and click-through conversions.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_id"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "event_name": {"name": "event_name", "description": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.event_name"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "conversions": {"name": "conversions", "description": "The total click-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion"]}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "The total view-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion"]}, "source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/staging/stg_reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.3665717, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group_conversions_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_reddit_ads__ad_group_conversions_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_reddit_ads__ad_group_conversions_report_tmp')),\n staging_columns=get_ad_group_conversions_report_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='reddit_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_synced,\n account_id,\n ad_group_id,\n date as date_day,\n lower(event_name) as event_name,\n coalesce(total_items,0) as total_items,\n coalesce(total_value,0) as total_value,\n coalesce(clicks, click_through_conversion_attribution_window_month, 0) as conversions,\n coalesce(views, view_through_conversion_attribution_window_month, 0) as view_through_conversions\n \n {{ fivetran_utils.fill_pass_through_columns('reddit_ads__ad_group_conversions_passthrough_metrics') }}\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": ["doc.reddit_ads.stg_reddit_ads__ad_group_conversions_report"], "language": "sql", "refs": [{"name": "stg_reddit_ads__ad_group_conversions_report_tmp", "package": null, "version": null}, {"name": "stg_reddit_ads__ad_group_conversions_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.reddit_ads.get_ad_group_conversions_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.reddit_ads.stg_reddit_ads__ad_group_conversions_report_tmp"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads__ad_group_conversions_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group_conversions_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n ad_group_id as ad_group_id,\n cast(null as integer) as clicks,\n click_through_conversion_attribution_window_month as click_through_conversion_attribution_window_month,\n date as date,\n event_name as event_name,\n total_items as total_items,\n total_value as total_value,\n cast(null as integer) as views,\n view_through_conversion_attribution_window_month as view_through_conversion_attribution_window_month\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_synced,\n account_id,\n ad_group_id,\n date as date_day,\n lower(event_name) as event_name,\n coalesce(total_items,0) as total_items,\n coalesce(total_value,0) as total_value,\n coalesce(clicks, click_through_conversion_attribution_window_month, 0) as conversions,\n coalesce(views, view_through_conversion_attribution_window_month, 0) as view_through_conversions\n \n \n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__ad_group_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_group_report", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/stg_reddit_ads__ad_group_report.sql", "original_file_path": "models/staging/stg_reddit_ads__ad_group_report.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__ad_group_report", "fqn": ["reddit_ads", "staging", "stg_reddit_ads__ad_group_report"], "alias": "stg_reddit_ads__ad_group_report", "checksum": {"name": "sha256", "checksum": "434bc26b468b67584d3329a95c24a8deb3091ee4cdbcb9ed969bb34a698b4e29"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a summary of events for each given date and ad group.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_id"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "region": {"name": "region", "description": "The region (US state or UK country) targeted for the reports", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.region"]}, "spend": {"name": "spend", "description": "Spend converted out of microcurrency (so Spend/1,000,000)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/staging/stg_reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.362723, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_reddit_ads__ad_group_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_reddit_ads__ad_group_report_tmp')),\n staging_columns=get_ad_group_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='reddit_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n account_id,\n ad_group_id,\n coalesce(clicks,0) as clicks,\n date as date_day,\n coalesce(impressions,0) as impressions,\n region,\n {{ reddit_ads.convert_microcurrency('spend') }} as spend\n \n {{ fivetran_utils.fill_pass_through_columns('reddit_ads__ad_group_passthrough_metrics') }}\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__ad_group_report_tmp", "package": null, "version": null}, {"name": "stg_reddit_ads__ad_group_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.reddit_ads.get_ad_group_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.reddit_ads.convert_microcurrency", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.reddit_ads.stg_reddit_ads__ad_group_report_tmp"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads__ad_group_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n ad_group_id as ad_group_id,\n clicks as clicks,\n date as date,\n impressions as impressions,\n region as region,\n spend as spend,\n date as date_day\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n account_id,\n ad_group_id,\n coalesce(clicks,0) as clicks,\n date as date_day,\n coalesce(impressions,0) as impressions,\n region,\n \n coalesce(cast(spend as numeric(28,6)) / cast(1000000 as numeric(28,6)), 0)\n as spend\n \n \n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__campaign_country_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_country_report", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/stg_reddit_ads__campaign_country_report.sql", "original_file_path": "models/staging/stg_reddit_ads__campaign_country_report.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_country_report", "fqn": ["reddit_ads", "staging", "stg_reddit_ads__campaign_country_report"], "alias": "stg_reddit_ads__campaign_country_report", "checksum": {"name": "sha256", "checksum": "9fb3c016c3e5ad44c5c67f194d330204a27d53024114cab8a99ac21d48b97ee1"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a summary of events at the date, country, and campaign level.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "country": {"name": "country", "description": "The country associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.country"]}, "date_day": {"name": "date_day", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "region": {"name": "region", "description": "The region (US state or UK country) targeted for the reports", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.region"]}, "spend": {"name": "spend", "description": "Spend converted out of microcurrency (so Spend/1,000,000)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/staging/stg_reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.3695154, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_country_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars([\n 'ad_reporting__reddit_ads_enabled',\n 'reddit_ads__using_campaign_country_report'])\n) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_reddit_ads__campaign_country_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_reddit_ads__campaign_country_report_tmp')),\n staging_columns=get_campaign_country_report_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='reddit_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation,\n _fivetran_synced,\n account_id,\n campaign_id,\n country,\n date as date_day,\n coalesce(clicks,0) as clicks,\n coalesce(impressions,0) as impressions,\n region,\n {{ reddit_ads.convert_microcurrency('spend') }} as spend\n\n {{ fivetran_utils.fill_pass_through_columns('reddit_ads__campaign_country_passthrough_metrics') }}\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": ["doc.reddit_ads.campaign_country_report"], "language": "sql", "refs": [{"name": "stg_reddit_ads__campaign_country_report_tmp", "package": null, "version": null}, {"name": "stg_reddit_ads__campaign_country_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.reddit_ads.get_campaign_country_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.reddit_ads.convert_microcurrency", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.reddit_ads.stg_reddit_ads__campaign_country_report_tmp"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads__campaign_country_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_country_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n campaign_id as campaign_id,\n clicks as clicks,\n country as country,\n date as date,\n impressions as impressions,\n region as region,\n spend as spend,\n date as date_day\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation,\n _fivetran_synced,\n account_id,\n campaign_id,\n country,\n date as date_day,\n coalesce(clicks,0) as clicks,\n coalesce(impressions,0) as impressions,\n region,\n \n coalesce(cast(spend as numeric(28,6)) / cast(1000000 as numeric(28,6)), 0)\n as spend\n\n \n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__account": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__account", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/stg_reddit_ads__account.sql", "original_file_path": "models/staging/stg_reddit_ads__account.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__account", "fqn": ["reddit_ads", "staging", "stg_reddit_ads__account"], "alias": "stg_reddit_ads__account", "checksum": {"name": "sha256", "checksum": "058b85510c1277f43764b29b7af75946447525151b33a756b023373be9242e25"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents information about an account.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "attribution_type": {"name": "attribution_type", "description": "Attribution type: \"CLICK_THROUGH_CONVERSION\", \"VIEW_THROUGH_CONVERSION\", or \"ALL_CONVERSION\".\nCLICK_THROUGH_CONVERSION: A user clicked on your ad and then completed the conversion action on your site. \nVIEW_THROUGH_CONVERSION: A user saw your ad and did not click it, but did complete the conversion action on your site.\nALL_CONVERSION: Combination of both.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.attribution_type"]}, "click_attribution_window": {"name": "click_attribution_window", "description": "Determines how long after clicking on your ad you count that user\u2019s actions as a conversion. \"DAY\", \"WEEK\", or \"MONTH\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_attribution_window"]}, "created_at": {"name": "created_at", "description": "Time that the respective record (ad, ad group, campaign, post, etc) was created. ISO-8601 timestamp.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.created_at"]}, "currency": {"name": "currency", "description": "The currency this account uses (ISO-4217)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.currency"]}, "time_zone_id": {"name": "time_zone_id", "description": "The time zone id preference for this account", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.time_zone_id"]}, "view_attribution_window": {"name": "view_attribution_window", "description": "Determines how long after viewing on your ad you count that user\u2019s actions as a conversion. \"DAY\", \"WEEK\", or \"MONTH\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_attribution_window"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "reddit_ads://models/staging/stg_reddit_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.356517, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_reddit_ads__account_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_reddit_ads__account_tmp')),\n staging_columns=get_account_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='reddit_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n attribution_type,\n click_attribution_window,\n cast(created_at as {{ dbt.type_timestamp() }}) as created_at,\n currency,\n id as account_id,\n time_zone_id,\n view_attribution_window\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__account_tmp", "package": null, "version": null}, {"name": "stg_reddit_ads__account_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.reddit_ads.get_account_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp"], "nodes": ["model.reddit_ads.stg_reddit_ads__account_tmp"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads__account.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n attribution_type as attribution_type,\n click_attribution_window as click_attribution_window,\n created_at as created_at,\n currency as currency,\n id as id,\n time_zone_id as time_zone_id,\n view_attribution_window as view_attribution_window\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n attribution_type,\n click_attribution_window,\n cast(created_at as timestamp) as created_at,\n currency,\n id as account_id,\n time_zone_id,\n view_attribution_window\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__ad_conversions_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_conversions_report_tmp", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/tmp/stg_reddit_ads__ad_conversions_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_reddit_ads__ad_conversions_report_tmp.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__ad_conversions_report_tmp", "fqn": ["reddit_ads", "staging", "tmp", "stg_reddit_ads__ad_conversions_report_tmp"], "alias": "stg_reddit_ads__ad_conversions_report_tmp", "checksum": {"name": "sha256", "checksum": "8ca05e63c8af8709ebe9bd577987e1606ffc69a99f16337ae7382316f44589de"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708215.6276538, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_conversions_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\n{% if var('reddit_ads_union_schemas', []) | length > 0 or var('reddit_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_conversions_report', \n database_variable='reddit_ads_database', \n schema_variable='reddit_ads_schema', \n default_database=target.database,\n default_schema='reddit_ads',\n default_variable='ad_conversions_report',\n union_schema_variable='reddit_ads_union_schemas',\n union_database_variable='reddit_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='reddit_ads_sources',\n single_source_name='reddit_ads',\n single_table_name='ad_conversions_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["reddit_ads", "ad_conversions_report"], ["reddit_ads", "ad_conversions_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.reddit_ads.reddit_ads.ad_conversions_report"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/tmp/stg_reddit_ads__ad_conversions_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: reddit_ads_ad_conversions_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: reddit_ads_ad_conversions\n\n\n select\n \"_fivetran_synced\",\n \"account_id\",\n \"ad_id\",\n \"avg_value\",\n \"click_through_conversion_attribution_window_day\",\n \"click_through_conversion_attribution_window_month\",\n \"click_through_conversion_attribution_window_week\",\n \"date\",\n \"event_name\",\n \"total_items\",\n \"total_value\",\n \"view_through_conversion_attribution_window_day\",\n \"view_through_conversion_attribution_window_month\",\n \"view_through_conversion_attribution_window_week\"\n from \"postgres\".\"public\".\"reddit_ads_ad_conversions\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_country_conversions_report_tmp", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/tmp/stg_reddit_ads__campaign_country_conversions_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_reddit_ads__campaign_country_conversions_report_tmp.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report_tmp", "fqn": ["reddit_ads", "staging", "tmp", "stg_reddit_ads__campaign_country_conversions_report_tmp"], "alias": "stg_reddit_ads__campaign_country_conversions_report_tmp", "checksum": {"name": "sha256", "checksum": "43ed5c51a96f4f5b194882b0bd1fa2b39f33967f52c07f8d15b49557c8b4c878"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708215.6383498, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_country_conversions_report_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars([\n 'ad_reporting__reddit_ads_enabled',\n 'reddit_ads__using_campaign_country_report',\n 'reddit_ads__using_campaign_country_conversions_report'])\n) }}\n\n{% if var('reddit_ads_union_schemas', []) | length > 0 or var('reddit_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_country_conversions_report', \n database_variable='reddit_ads_database', \n schema_variable='reddit_ads_schema', \n default_database=target.database,\n default_schema='reddit_ads',\n default_variable='campaign_country_conversions_report',\n union_schema_variable='reddit_ads_union_schemas',\n union_database_variable='reddit_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='reddit_ads_sources',\n single_source_name='reddit_ads',\n single_table_name='campaign_country_conversions_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["reddit_ads", "campaign_country_conversions_report"], ["reddit_ads", "campaign_country_conversions_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.reddit_ads.reddit_ads.campaign_country_conversions_report"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/tmp/stg_reddit_ads__campaign_country_conversions_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: reddit_ads_campaign_country_conversions_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: reddit_ads_campaign_country_conversions_report_data\n\n\n select\n \"_fivetran_synced\",\n \"account_id\",\n \"campaign_id\",\n \"click_through_conversion_attribution_window_month\",\n \"country\",\n \"date\",\n \"event_name\",\n \"total_items\",\n \"total_value\",\n \"view_through_conversion_attribution_window_month\"\n from \"postgres\".\"public\".\"reddit_ads_campaign_country_conversions_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__account_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__account_report_tmp", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/tmp/stg_reddit_ads__account_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_reddit_ads__account_report_tmp.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__account_report_tmp", "fqn": ["reddit_ads", "staging", "tmp", "stg_reddit_ads__account_report_tmp"], "alias": "stg_reddit_ads__account_report_tmp", "checksum": {"name": "sha256", "checksum": "c49719da88307b1e740567618d9424144f2b858c17bed6d0c4436b3704c695c2"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708215.6492035, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\n{% if var('reddit_ads_union_schemas', []) | length > 0 or var('reddit_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='account_report', \n database_variable='reddit_ads_database', \n schema_variable='reddit_ads_schema', \n default_database=target.database,\n default_schema='reddit_ads',\n default_variable='account_report',\n union_schema_variable='reddit_ads_union_schemas',\n union_database_variable='reddit_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='reddit_ads_sources',\n single_source_name='reddit_ads',\n single_table_name='account_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["reddit_ads", "account_report"], ["reddit_ads", "account_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.reddit_ads.reddit_ads.account_report"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/tmp/stg_reddit_ads__account_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: reddit_ads_account_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: reddit_ads_account_report_data\n\n\n select\n \"account_id\",\n \"date\",\n \"_fivetran_synced\",\n \"app_install_metrics_add_payment_info\",\n \"app_install_metrics_add_to_cart\",\n \"app_install_metrics_app_launch\",\n \"app_install_metrics_completed_tutorial\",\n \"app_install_metrics_install\",\n \"app_install_metrics_level_achieved\",\n \"app_install_metrics_purchase\",\n \"app_install_metrics_search\",\n \"app_install_metrics_sign_up\",\n \"app_install_metrics_spend\",\n \"app_install_metrics_spend_credits\",\n \"app_install_metrics_view_content\",\n \"clicks\",\n \"comment_downvotes\",\n \"comment_upvotes\",\n \"comments_page_views\",\n \"conversion_roas\",\n \"cpc\",\n \"ctr\",\n \"ecpm\",\n \"gallery_item_caption\",\n \"gallery_item_id\",\n \"impressions\",\n \"legacy_click_conversions_attribution_window_day\",\n \"legacy_click_conversions_attribution_window_month\",\n \"legacy_click_conversions_attribution_window_week\",\n \"legacy_view_conversions_attribution_window_day\",\n \"legacy_view_conversions_attribution_window_month\",\n \"legacy_view_conversions_attribution_window_week\",\n \"priority\",\n \"region\",\n \"spend\",\n \"video_fully_viewable_impressions\",\n \"video_plays_expanded\",\n \"video_plays_with_sound\",\n \"video_started\",\n \"video_viewable_impressions\",\n \"video_watched_100_percent\",\n \"video_watched_10_seconds\",\n \"video_watched_25_percent\",\n \"video_watched_3_seconds\",\n \"video_watched_50_percent\",\n \"video_watched_5_seconds\",\n \"video_watched_75_percent\",\n \"video_watched_95_percent\",\n \"viewable_impressions\",\n \"viewer_comments\"\n from \"postgres\".\"public\".\"reddit_ads_account_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__campaign_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_report_tmp", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/tmp/stg_reddit_ads__campaign_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_reddit_ads__campaign_report_tmp.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_report_tmp", "fqn": ["reddit_ads", "staging", "tmp", "stg_reddit_ads__campaign_report_tmp"], "alias": "stg_reddit_ads__campaign_report_tmp", "checksum": {"name": "sha256", "checksum": "8d566b524e1eee73ae761735f9e42549ed740cdc6a2548f997f789104cd1990b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708215.660851, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\n{% if var('reddit_ads_union_schemas', []) | length > 0 or var('reddit_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_report', \n database_variable='reddit_ads_database', \n schema_variable='reddit_ads_schema', \n default_database=target.database,\n default_schema='reddit_ads',\n default_variable='campaign_report',\n union_schema_variable='reddit_ads_union_schemas',\n union_database_variable='reddit_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='reddit_ads_sources',\n single_source_name='reddit_ads',\n single_table_name='campaign_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["reddit_ads", "campaign_report"], ["reddit_ads", "campaign_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.reddit_ads.reddit_ads.campaign_report"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/tmp/stg_reddit_ads__campaign_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: reddit_ads_campaign_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: reddit_ads_campaign_report_data\n\n\n select\n \"account_id\",\n \"campaign_id\",\n \"date\",\n \"_fivetran_synced\",\n \"app_install_metrics_add_payment_info\",\n \"app_install_metrics_add_to_cart\",\n \"app_install_metrics_app_launch\",\n \"app_install_metrics_completed_tutorial\",\n \"app_install_metrics_install\",\n \"app_install_metrics_level_achieved\",\n \"app_install_metrics_purchase\",\n \"app_install_metrics_search\",\n \"app_install_metrics_sign_up\",\n \"app_install_metrics_spend\",\n \"app_install_metrics_spend_credits\",\n \"app_install_metrics_view_content\",\n \"clicks\",\n \"comment_downvotes\",\n \"comment_upvotes\",\n \"comments_page_views\",\n \"conversion_roas\",\n \"cpc\",\n \"ctr\",\n \"ecpm\",\n \"gallery_item_caption\",\n \"gallery_item_id\",\n \"impressions\",\n \"legacy_click_conversions_attribution_window_day\",\n \"legacy_click_conversions_attribution_window_month\",\n \"legacy_click_conversions_attribution_window_week\",\n \"legacy_view_conversions_attribution_window_day\",\n \"legacy_view_conversions_attribution_window_month\",\n \"legacy_view_conversions_attribution_window_week\",\n \"priority\",\n \"region\",\n \"spend\",\n \"video_fully_viewable_impressions\",\n \"video_plays_expanded\",\n \"video_plays_with_sound\",\n \"video_started\",\n \"video_viewable_impressions\",\n \"video_watched_100_percent\",\n \"video_watched_10_seconds\",\n \"video_watched_25_percent\",\n \"video_watched_3_seconds\",\n \"video_watched_50_percent\",\n \"video_watched_5_seconds\",\n \"video_watched_75_percent\",\n \"video_watched_95_percent\",\n \"viewable_impressions\",\n \"viewer_comments\"\n from \"postgres\".\"public\".\"reddit_ads_campaign_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__ad_group_conversions_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_group_conversions_report_tmp", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/tmp/stg_reddit_ads__ad_group_conversions_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_reddit_ads__ad_group_conversions_report_tmp.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__ad_group_conversions_report_tmp", "fqn": ["reddit_ads", "staging", "tmp", "stg_reddit_ads__ad_group_conversions_report_tmp"], "alias": "stg_reddit_ads__ad_group_conversions_report_tmp", "checksum": {"name": "sha256", "checksum": "7a3a38dae036ee6c4f4edea9eb3d60df6b458b85543e5b150c4b29a0ff56183b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708215.67169, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group_conversions_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\n{% if var('reddit_ads_union_schemas', []) | length > 0 or var('reddit_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_group_conversions_report', \n database_variable='reddit_ads_database', \n schema_variable='reddit_ads_schema', \n default_database=target.database,\n default_schema='reddit_ads',\n default_variable='ad_group_conversions_report',\n union_schema_variable='reddit_ads_union_schemas',\n union_database_variable='reddit_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='reddit_ads_sources',\n single_source_name='reddit_ads',\n single_table_name='ad_group_conversions_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["reddit_ads", "ad_group_conversions_report"], ["reddit_ads", "ad_group_conversions_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.reddit_ads.reddit_ads.ad_group_conversions_report"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/tmp/stg_reddit_ads__ad_group_conversions_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: reddit_ads_ad_group_conversions_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: reddit_ads_ad_group_conversions\n\n\n select\n \"_fivetran_synced\",\n \"account_id\",\n \"ad_group_id\",\n \"avg_value\",\n \"click_through_conversion_attribution_window_day\",\n \"click_through_conversion_attribution_window_month\",\n \"click_through_conversion_attribution_window_week\",\n \"date\",\n \"event_name\",\n \"total_items\",\n \"total_value\",\n \"view_through_conversion_attribution_window_day\",\n \"view_through_conversion_attribution_window_month\",\n \"view_through_conversion_attribution_window_week\"\n from \"postgres\".\"public\".\"reddit_ads_ad_group_conversions\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__ad_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_tmp", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/tmp/stg_reddit_ads__ad_tmp.sql", "original_file_path": "models/staging/tmp/stg_reddit_ads__ad_tmp.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__ad_tmp", "fqn": ["reddit_ads", "staging", "tmp", "stg_reddit_ads__ad_tmp"], "alias": "stg_reddit_ads__ad_tmp", "checksum": {"name": "sha256", "checksum": "99fc15469e76ced6fb4122e464e7e8f4be6900e43eff718bef430e39d07f388a"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708215.682421, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\n{% if var('reddit_ads_union_schemas', []) | length > 0 or var('reddit_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad', \n database_variable='reddit_ads_database', \n schema_variable='reddit_ads_schema', \n default_database=target.database,\n default_schema='reddit_ads',\n default_variable='ad',\n union_schema_variable='reddit_ads_union_schemas',\n union_database_variable='reddit_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='reddit_ads_sources',\n single_source_name='reddit_ads',\n single_table_name='ad'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["reddit_ads", "ad"], ["reddit_ads", "ad"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.reddit_ads.reddit_ads.ad"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/tmp/stg_reddit_ads__ad_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: reddit_ads_ad_identifier\n -- database: postgres \n -- schema: public\n -- identifier: reddit_ads_ad_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"account_id\",\n \"ad_group_id\",\n \"campaign_id\",\n \"click_url\",\n \"configured_status\",\n \"effective_status\",\n \"is_processing\",\n \"name\",\n \"post_id\",\n \"post_url\",\n \"preview_expiry\",\n \"preview_url\",\n \"rejection_reason\",\n \"search_term\"\n from \"postgres\".\"public\".\"reddit_ads_ad_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__campaign_country_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_country_report_tmp", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/tmp/stg_reddit_ads__campaign_country_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_reddit_ads__campaign_country_report_tmp.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_country_report_tmp", "fqn": ["reddit_ads", "staging", "tmp", "stg_reddit_ads__campaign_country_report_tmp"], "alias": "stg_reddit_ads__campaign_country_report_tmp", "checksum": {"name": "sha256", "checksum": "dfcc2be0b6d7c6040dbd314ba63a2b74f74fa46cb1329722f3b1946da54412e7"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708215.6941657, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_country_report_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars([\n 'ad_reporting__reddit_ads_enabled',\n 'reddit_ads__using_campaign_country_report'])\n) }}\n\n{% if var('reddit_ads_union_schemas', []) | length > 0 or var('reddit_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_country_report', \n database_variable='reddit_ads_database', \n schema_variable='reddit_ads_schema', \n default_database=target.database,\n default_schema='reddit_ads',\n default_variable='campaign_country_report',\n union_schema_variable='reddit_ads_union_schemas',\n union_database_variable='reddit_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='reddit_ads_sources',\n single_source_name='reddit_ads',\n single_table_name='campaign_country_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["reddit_ads", "campaign_country_report"], ["reddit_ads", "campaign_country_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.reddit_ads.reddit_ads.campaign_country_report"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/tmp/stg_reddit_ads__campaign_country_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: reddit_ads_campaign_country_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: reddit_ads_campaign_country_report_data\n\n\n select\n \"_fivetran_synced\",\n \"account_id\",\n \"campaign_id\",\n \"clicks\",\n \"country\",\n \"date\",\n \"impressions\",\n \"region\",\n \"spend\"\n from \"postgres\".\"public\".\"reddit_ads_campaign_country_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__account_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__account_tmp", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/tmp/stg_reddit_ads__account_tmp.sql", "original_file_path": "models/staging/tmp/stg_reddit_ads__account_tmp.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__account_tmp", "fqn": ["reddit_ads", "staging", "tmp", "stg_reddit_ads__account_tmp"], "alias": "stg_reddit_ads__account_tmp", "checksum": {"name": "sha256", "checksum": "46a5666b3cb9b0b2020c2991ad8ff2c5fe9fcf29bd7c47e0074070e46dd1f26f"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708215.7049525, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\n{%- set business_account_or_account = 'business_account' if var('reddit_ads__using_business_account', True) else 'account' -%}\n\n{% if var('reddit_ads_union_schemas', []) | length > 0 or var('reddit_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier=business_account_or_account, \n database_variable='reddit_ads_database', \n schema_variable='reddit_ads_schema', \n default_database=target.database,\n default_schema='reddit_ads',\n default_variable=business_account_or_account,\n union_schema_variable='reddit_ads_union_schemas',\n union_database_variable='reddit_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='reddit_ads_sources',\n single_source_name='reddit_ads',\n single_table_name=business_account_or_account\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["reddit_ads", "business_account"], ["reddit_ads", "business_account"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.reddit_ads.reddit_ads.business_account"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/tmp/stg_reddit_ads__account_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: reddit_ads_business_account_identifier\n -- database: postgres \n -- schema: public\n -- identifier: reddit_ads_business_account_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"attribution_type\",\n \"click_attribution_window\",\n \"created_at\",\n \"currency\",\n \"status\",\n \"time_zone_id\",\n \"view_attribution_window\"\n from \"postgres\".\"public\".\"reddit_ads_business_account_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__campaign_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_tmp", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/tmp/stg_reddit_ads__campaign_tmp.sql", "original_file_path": "models/staging/tmp/stg_reddit_ads__campaign_tmp.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_tmp", "fqn": ["reddit_ads", "staging", "tmp", "stg_reddit_ads__campaign_tmp"], "alias": "stg_reddit_ads__campaign_tmp", "checksum": {"name": "sha256", "checksum": "61b9d5eab6a17819b65078c9c5a842656f5e339e14585e75ca2d99fb39bbcbc0"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708215.7162244, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\n{% if var('reddit_ads_union_schemas', []) | length > 0 or var('reddit_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign', \n database_variable='reddit_ads_database', \n schema_variable='reddit_ads_schema', \n default_database=target.database,\n default_schema='reddit_ads',\n default_variable='campaign',\n union_schema_variable='reddit_ads_union_schemas',\n union_database_variable='reddit_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='reddit_ads_sources',\n single_source_name='reddit_ads',\n single_table_name='campaign'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["reddit_ads", "campaign"], ["reddit_ads", "campaign"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.reddit_ads.reddit_ads.campaign"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/tmp/stg_reddit_ads__campaign_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: reddit_ads_campaign_identifier\n -- database: postgres \n -- schema: public\n -- identifier: reddit_ads_campaign_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"account_id\",\n \"configured_status\",\n \"effective_status\",\n \"funding_instrument_id\",\n \"is_processing\",\n \"name\",\n \"objective\"\n from \"postgres\".\"public\".\"reddit_ads_campaign_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__ad_group_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_group_report_tmp", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/tmp/stg_reddit_ads__ad_group_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_reddit_ads__ad_group_report_tmp.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__ad_group_report_tmp", "fqn": ["reddit_ads", "staging", "tmp", "stg_reddit_ads__ad_group_report_tmp"], "alias": "stg_reddit_ads__ad_group_report_tmp", "checksum": {"name": "sha256", "checksum": "3b222e54709a8f6a93a51df76ad58d3b9469c1c905f100f5ec80d635e059db73"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708215.7269607, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\n{% if var('reddit_ads_union_schemas', []) | length > 0 or var('reddit_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_group_report', \n database_variable='reddit_ads_database', \n schema_variable='reddit_ads_schema', \n default_database=target.database,\n default_schema='reddit_ads',\n default_variable='ad_group_report',\n union_schema_variable='reddit_ads_union_schemas',\n union_database_variable='reddit_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='reddit_ads_sources',\n single_source_name='reddit_ads',\n single_table_name='ad_group_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["reddit_ads", "ad_group_report"], ["reddit_ads", "ad_group_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.reddit_ads.reddit_ads.ad_group_report"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/tmp/stg_reddit_ads__ad_group_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: reddit_ads_ad_group_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: reddit_ads_ad_group_report_data\n\n\n select\n \"account_id\",\n \"ad_group_id\",\n \"date\",\n \"_fivetran_synced\",\n \"app_install_metrics_add_payment_info\",\n \"app_install_metrics_add_to_cart\",\n \"app_install_metrics_app_launch\",\n \"app_install_metrics_completed_tutorial\",\n \"app_install_metrics_install\",\n \"app_install_metrics_level_achieved\",\n \"app_install_metrics_purchase\",\n \"app_install_metrics_search\",\n \"app_install_metrics_sign_up\",\n \"app_install_metrics_spend\",\n \"app_install_metrics_spend_credits\",\n \"app_install_metrics_view_content\",\n \"clicks\",\n \"comment_downvotes\",\n \"comment_upvotes\",\n \"comments_page_views\",\n \"conversion_roas\",\n \"cpc\",\n \"ctr\",\n \"ecpm\",\n \"gallery_item_caption\",\n \"gallery_item_id\",\n \"impressions\",\n \"legacy_click_conversions_attribution_window_day\",\n \"legacy_click_conversions_attribution_window_month\",\n \"legacy_click_conversions_attribution_window_week\",\n \"legacy_view_conversions_attribution_window_day\",\n \"legacy_view_conversions_attribution_window_month\",\n \"legacy_view_conversions_attribution_window_week\",\n \"priority\",\n \"region\",\n \"spend\",\n \"video_fully_viewable_impressions\",\n \"video_plays_expanded\",\n \"video_plays_with_sound\",\n \"video_started\",\n \"video_viewable_impressions\",\n \"video_watched_100_percent\",\n \"video_watched_10_seconds\",\n \"video_watched_25_percent\",\n \"video_watched_3_seconds\",\n \"video_watched_50_percent\",\n \"video_watched_5_seconds\",\n \"video_watched_75_percent\",\n \"video_watched_95_percent\",\n \"viewable_impressions\",\n \"viewer_comments\"\n from \"postgres\".\"public\".\"reddit_ads_ad_group_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__account_conversions_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__account_conversions_report_tmp", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/tmp/stg_reddit_ads__account_conversions_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_reddit_ads__account_conversions_report_tmp.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__account_conversions_report_tmp", "fqn": ["reddit_ads", "staging", "tmp", "stg_reddit_ads__account_conversions_report_tmp"], "alias": "stg_reddit_ads__account_conversions_report_tmp", "checksum": {"name": "sha256", "checksum": "8627dc3199e97b24d1e2ca0cd9cb57a6ddfd656c81eb631c9125dad04ca004f7"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708215.73892, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account_conversions_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\n{% if var('reddit_ads_union_schemas', []) | length > 0 or var('reddit_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='account_conversions_report', \n database_variable='reddit_ads_database', \n schema_variable='reddit_ads_schema', \n default_database=target.database,\n default_schema='reddit_ads',\n default_variable='account_conversions_report',\n union_schema_variable='reddit_ads_union_schemas',\n union_database_variable='reddit_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='reddit_ads_sources',\n single_source_name='reddit_ads',\n single_table_name='account_conversions_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["reddit_ads", "account_conversions_report"], ["reddit_ads", "account_conversions_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.reddit_ads.reddit_ads.account_conversions_report"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/tmp/stg_reddit_ads__account_conversions_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: reddit_ads_account_conversions_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: reddit_ads_account_conversions\n\n\n select\n \"_fivetran_synced\",\n \"account_id\",\n \"avg_value\",\n \"click_through_conversion_attribution_window_day\",\n \"click_through_conversion_attribution_window_month\",\n \"click_through_conversion_attribution_window_week\",\n \"date\",\n \"event_name\",\n \"total_items\",\n \"total_value\",\n \"view_through_conversion_attribution_window_day\",\n \"view_through_conversion_attribution_window_month\",\n \"view_through_conversion_attribution_window_week\"\n from \"postgres\".\"public\".\"reddit_ads_account_conversions\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__ad_group_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_group_tmp", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/tmp/stg_reddit_ads__ad_group_tmp.sql", "original_file_path": "models/staging/tmp/stg_reddit_ads__ad_group_tmp.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__ad_group_tmp", "fqn": ["reddit_ads", "staging", "tmp", "stg_reddit_ads__ad_group_tmp"], "alias": "stg_reddit_ads__ad_group_tmp", "checksum": {"name": "sha256", "checksum": "8b21e40e629435d8873ccf083ad35839203ebffdbe7bd3f45d4707d08afde24a"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708215.7494483, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\n{% if var('reddit_ads_union_schemas', []) | length > 0 or var('reddit_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_group', \n database_variable='reddit_ads_database', \n schema_variable='reddit_ads_schema', \n default_database=target.database,\n default_schema='reddit_ads',\n default_variable='ad_group',\n union_schema_variable='reddit_ads_union_schemas',\n union_database_variable='reddit_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='reddit_ads_sources',\n single_source_name='reddit_ads',\n single_table_name='ad_group'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["reddit_ads", "ad_group"], ["reddit_ads", "ad_group"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.reddit_ads.reddit_ads.ad_group"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/tmp/stg_reddit_ads__ad_group_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: reddit_ads_ad_group_identifier\n -- database: postgres \n -- schema: public\n -- identifier: reddit_ads_ad_group_data\n\n\n select\n \"account_id\",\n \"id\",\n \"_fivetran_synced\",\n \"bid_strategy\",\n \"bid_value\",\n \"campaign_id\",\n \"configured_status\",\n \"effective_status\",\n \"end_time\",\n \"expand_targeting\",\n \"goal_type\",\n \"goal_value\",\n \"is_processing\",\n \"name\",\n \"optimization_strategy_type\",\n \"start_time\"\n from \"postgres\".\"public\".\"reddit_ads_ad_group_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__campaign_conversions_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__campaign_conversions_report_tmp", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/tmp/stg_reddit_ads__campaign_conversions_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_reddit_ads__campaign_conversions_report_tmp.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__campaign_conversions_report_tmp", "fqn": ["reddit_ads", "staging", "tmp", "stg_reddit_ads__campaign_conversions_report_tmp"], "alias": "stg_reddit_ads__campaign_conversions_report_tmp", "checksum": {"name": "sha256", "checksum": "4f214ad86d990c74937b9569b743f6273cbf8fa6d6cefe1c6c561e9bf386fd19"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708215.7600923, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_conversions_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\n{% if var('reddit_ads_union_schemas', []) | length > 0 or var('reddit_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_conversions_report', \n database_variable='reddit_ads_database', \n schema_variable='reddit_ads_schema', \n default_database=target.database,\n default_schema='reddit_ads',\n default_variable='campaign_conversions_report',\n union_schema_variable='reddit_ads_union_schemas',\n union_database_variable='reddit_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='reddit_ads_sources',\n single_source_name='reddit_ads',\n single_table_name='campaign_conversions_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["reddit_ads", "campaign_conversions_report"], ["reddit_ads", "campaign_conversions_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.reddit_ads.reddit_ads.campaign_conversions_report"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/tmp/stg_reddit_ads__campaign_conversions_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: reddit_ads_campaign_conversions_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: reddit_ads_campaign_conversions\n\n\n select\n \"_fivetran_synced\",\n \"account_id\",\n \"avg_value\",\n \"campaign_id\",\n \"click_through_conversion_attribution_window_day\",\n \"click_through_conversion_attribution_window_month\",\n \"click_through_conversion_attribution_window_week\",\n \"date\",\n \"event_name\",\n \"total_items\",\n \"total_value\",\n \"view_through_conversion_attribution_window_day\",\n \"view_through_conversion_attribution_window_month\",\n \"view_through_conversion_attribution_window_week\"\n from \"postgres\".\"public\".\"reddit_ads_campaign_conversions\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.reddit_ads.stg_reddit_ads__ad_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_reddit_ads__ad_report_tmp", "resource_type": "model", "package_name": "reddit_ads", "path": "staging/tmp/stg_reddit_ads__ad_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_reddit_ads__ad_report_tmp.sql", "unique_id": "model.reddit_ads.stg_reddit_ads__ad_report_tmp", "fqn": ["reddit_ads", "staging", "tmp", "stg_reddit_ads__ad_report_tmp"], "alias": "stg_reddit_ads__ad_report_tmp", "checksum": {"name": "sha256", "checksum": "49cfa2477a106e0483f1cbbbdf42fdc0a3dee26b18d627707eeb769768636ed6"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708215.7717643, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__reddit_ads_enabled', True)) }}\n\n{% if var('reddit_ads_union_schemas', []) | length > 0 or var('reddit_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_report', \n database_variable='reddit_ads_database', \n schema_variable='reddit_ads_schema', \n default_database=target.database,\n default_schema='reddit_ads',\n default_variable='ad_report',\n union_schema_variable='reddit_ads_union_schemas',\n union_database_variable='reddit_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='reddit_ads_sources',\n single_source_name='reddit_ads',\n single_table_name='ad_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["reddit_ads", "ad_report"], ["reddit_ads", "ad_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.reddit_ads.reddit_ads.ad_report"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/tmp/stg_reddit_ads__ad_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: reddit_ads_ad_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: reddit_ads_ad_report_data\n\n\n select\n \"account_id\",\n \"ad_id\",\n \"date\",\n \"_fivetran_synced\",\n \"app_install_metrics_add_payment_info\",\n \"app_install_metrics_add_to_cart\",\n \"app_install_metrics_app_launch\",\n \"app_install_metrics_completed_tutorial\",\n \"app_install_metrics_install\",\n \"app_install_metrics_level_achieved\",\n \"app_install_metrics_purchase\",\n \"app_install_metrics_search\",\n \"app_install_metrics_sign_up\",\n \"app_install_metrics_spend\",\n \"app_install_metrics_spend_credits\",\n \"app_install_metrics_view_content\",\n \"clicks\",\n \"comment_downvotes\",\n \"comment_upvotes\",\n \"comments_page_views\",\n \"conversion_roas\",\n \"cpc\",\n \"ctr\",\n \"ecpm\",\n \"gallery_item_caption\",\n \"gallery_item_id\",\n \"impressions\",\n \"legacy_click_conversions_attribution_window_day\",\n \"legacy_click_conversions_attribution_window_month\",\n \"legacy_click_conversions_attribution_window_week\",\n \"legacy_view_conversions_attribution_window_day\",\n \"legacy_view_conversions_attribution_window_month\",\n \"legacy_view_conversions_attribution_window_week\",\n \"priority\",\n \"region\",\n \"spend\",\n \"video_fully_viewable_impressions\",\n \"video_plays_expanded\",\n \"video_plays_with_sound\",\n \"video_started\",\n \"video_viewable_impressions\",\n \"video_watched_100_percent\",\n \"video_watched_10_seconds\",\n \"video_watched_25_percent\",\n \"video_watched_3_seconds\",\n \"video_watched_50_percent\",\n \"video_watched_5_seconds\",\n \"video_watched_75_percent\",\n \"video_watched_95_percent\",\n \"viewable_impressions\",\n \"viewer_comments\"\n from \"postgres\".\"public\".\"reddit_ads_ad_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.snapchat_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__campaign_report", "resource_type": "model", "package_name": "snapchat_ads", "path": "snapchat_ads__campaign_report.sql", "original_file_path": "models/snapchat_ads__campaign_report.sql", "unique_id": "model.snapchat_ads.snapchat_ads__campaign_report", "fqn": ["snapchat_ads", "snapchat_ads__campaign_report"], "alias": "snapchat_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "c16377f005063037c79ffc522e938cf49cf800f1296aa9d5bc8973f113c96470"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Snapchat campaign.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_id": {"name": "ad_account_id", "description": "The ID of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_name": {"name": "ad_account_name", "description": "The name of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The currency used by the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the campaign in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the campaign had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes the campaign had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases for the campaign on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases for campaign on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "The total conversions being brought in the conversion fields you select in your `snapchat_ads__conversion_fields`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.412585, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\nwith campaign_hourly as (\n\n select *,\n {% if var('snapchat_ads__conversion_fields', none) %}\n {{ var('snapchat_ads__conversion_fields') | join(' + ') }} as total_conversions\n {% else %}\n 0 as total_conversions\n {% endif %}\n from {{ ref('stg_snapchat_ads__campaign_hourly_report') }}\n\n), account as (\n\n select *\n from {{ ref('stg_snapchat_ads__ad_account_history') }}\n where is_most_recent_record = true\n\n), campaigns as (\n\n select *\n from {{ ref('stg_snapchat_ads__campaign_history') }}\n where is_most_recent_record = true\n\n\n), aggregated as (\n\n select\n campaign_hourly.source_relation,\n cast(campaign_hourly.date_hour as date) as date_day,\n account.ad_account_id,\n account.ad_account_name,\n campaign_hourly.campaign_id,\n campaigns.campaign_name,\n account.currency,\n sum(campaign_hourly.swipes) as swipes,\n sum(campaign_hourly.impressions) as impressions,\n round(sum(campaign_hourly.spend),2) as spend,\n sum(campaign_hourly.total_conversions) as total_conversions,\n round(cast(sum(campaign_hourly.conversion_purchases_value) as {{ dbt.type_numeric() }}), 2) as conversion_purchases_value\n\n {{ snapchat_ads_persist_pass_through_columns(pass_through_variable='snapchat_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='snapchat_ads__campaign_hourly_report_passthrough_metrics', exclude_fields=['conversion_purchases_value']) }}\n \n {{ snapchat_ads_persist_pass_through_columns(pass_through_variable='snapchat_ads__campaign_hourly_report_passthrough_metrics', transform='sum', exclude_fields=['conversion_purchases_value']) }}\n \n from campaign_hourly\n left join campaigns\n on campaign_hourly.campaign_id = campaigns.campaign_id\n and campaign_hourly.source_relation = campaigns.source_relation\n left join account\n on campaigns.ad_account_id = account.ad_account_id\n and campaigns.source_relation = account.source_relation\n \n {{ dbt_utils.group_by(7) }}\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_hourly_report", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_account_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.type_numeric", "macro.snapchat_ads.snapchat_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report", "model.snapchat_ads.stg_snapchat_ads__ad_account_history", "model.snapchat_ads.stg_snapchat_ads__campaign_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith campaign_hourly as (\n\n select *,\n \n conversion_purchases as total_conversions\n \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_hourly_report\"\n\n), account as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_account_history\"\n where is_most_recent_record = true\n\n), campaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_history\"\n where is_most_recent_record = true\n\n\n), aggregated as (\n\n select\n campaign_hourly.source_relation,\n cast(campaign_hourly.date_hour as date) as date_day,\n account.ad_account_id,\n account.ad_account_name,\n campaign_hourly.campaign_id,\n campaigns.campaign_name,\n account.currency,\n sum(campaign_hourly.swipes) as swipes,\n sum(campaign_hourly.impressions) as impressions,\n round(sum(campaign_hourly.spend),2) as spend,\n sum(campaign_hourly.total_conversions) as total_conversions,\n round(cast(sum(campaign_hourly.conversion_purchases_value) as numeric(28,6)), 2) as conversion_purchases_value\n\n \n\n\n\n \n \n\n\n\n \n\n\n\n \n \n \n \n , sum(coalesce(conversion_purchases, 0)) as conversion_purchases\n \n\n \n\n\n\n \n \n\n\n\n\n\n \n\n\n\n\n\n \n from campaign_hourly\n left join campaigns\n on campaign_hourly.campaign_id = campaigns.campaign_id\n and campaign_hourly.source_relation = campaigns.source_relation\n left join account\n on campaigns.ad_account_id = account.ad_account_id\n and campaigns.source_relation = account.source_relation\n \n group by 1,2,3,4,5,6,7\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.snapchat_ads__url_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__url_report", "resource_type": "model", "package_name": "snapchat_ads", "path": "snapchat_ads__url_report.sql", "original_file_path": "models/snapchat_ads__url_report.sql", "unique_id": "model.snapchat_ads.snapchat_ads__url_report", "fqn": ["snapchat_ads", "snapchat_ads__url_report"], "alias": "snapchat_ads__url_report", "checksum": {"name": "sha256", "checksum": "59837fd6d04c7817a570854f2c0d402c141a4a9b1e31bb831112280d24ead2b9"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of Snapchat ads that leverage urls.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_id": {"name": "ad_id", "description": "The ID of the ad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_squad_id": {"name": "ad_squad_id", "description": "The ID of the ad squad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_id": {"name": "ad_account_id", "description": "The ID of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_name": {"name": "ad_account_name", "description": "The name of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_name": {"name": "ad_name", "description": "The name of the ad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_squad_name": {"name": "ad_squad_name", "description": "The name of the ad squad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The currency used by the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the web_view_url.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_host": {"name": "url_host", "description": "The URL host of the ad, extracted from the web_view_url.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_path": {"name": "url_path", "description": "The URL path of the ad, extracted from the web_view_url.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_source": {"name": "utm_source", "description": "The utm_source parameter of the ad, extracted from the web_view_url.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_medium": {"name": "utm_medium", "description": "The utm_medium parameter of the ad, extracted from the web_view_url.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_campaign": {"name": "utm_campaign", "description": "The utm_campaign parameter of the ad, extracted from the web_view_url.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_content": {"name": "utm_content", "description": "The utm_content parameter of the ad, extracted from the web_view_url.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_term": {"name": "utm_term", "description": "The utm_term parameter of the ad, extracted from the web_view_url.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the ad in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases for an ad on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases for an ad on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "The total conversions being brought in the conversion fields you select in your `snapchat_ads__conversion_fields`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.415662, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__url_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\nwith ad_hourly as (\n\n select *,\n {% if var('snapchat_ads__conversion_fields', none) %}\n {{ var('snapchat_ads__conversion_fields') | join(' + ') }} as total_conversions\n {% else %}\n 0 as total_conversions\n {% endif %}\n from {{ ref('stg_snapchat_ads__ad_hourly_report') }}\n\n), creatives as (\n\n select *\n from {{ ref('snapchat_ads__creative_history_prep') }}\n\n), account as (\n\n select *\n from {{ ref('stg_snapchat_ads__ad_account_history') }}\n where is_most_recent_record = true\n\n), ads as (\n\n select *\n from {{ ref('stg_snapchat_ads__ad_history') }}\n where is_most_recent_record = true\n\n), ad_squads as (\n\n select *\n from {{ ref('stg_snapchat_ads__ad_squad_history') }}\n where is_most_recent_record = true\n\n), campaigns as (\n\n select *\n from {{ ref('stg_snapchat_ads__campaign_history') }}\n where is_most_recent_record = true\n\n\n), aggregated as (\n\n select\n ad_hourly.source_relation,\n cast(ad_hourly.date_hour as date) as date_day,\n account.ad_account_id,\n account.ad_account_name,\n ad_hourly.ad_id,\n ads.ad_name,\n ad_squads.ad_squad_id,\n ad_squads.ad_squad_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n account.currency,\n creatives.base_url,\n creatives.url_host,\n creatives.url_path,\n creatives.utm_source,\n creatives.utm_medium,\n creatives.utm_campaign,\n creatives.utm_content,\n creatives.utm_term,\n sum(ad_hourly.swipes) as swipes,\n sum(ad_hourly.impressions) as impressions,\n round(sum(ad_hourly.spend),2) as spend,\n sum(ad_hourly.total_conversions) as total_conversions,\n round(cast(sum(ad_hourly.conversion_purchases_value) as {{ dbt.type_numeric() }}), 2) as conversion_purchases_value\n \n {{ snapchat_ads_persist_pass_through_columns(pass_through_variable='snapchat_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='snapchat_ads__ad_hourly_passthrough_metrics', exclude_fields=['conversion_purchases_value']) }}\n\n {{ snapchat_ads_persist_pass_through_columns(pass_through_variable='snapchat_ads__ad_hourly_passthrough_metrics', transform='sum', exclude_fields=['conversion_purchases_value']) }}\n \n from ad_hourly\n left join ads \n on ad_hourly.ad_id = ads.ad_id\n and ad_hourly.source_relation = ads.source_relation\n left join creatives\n on ads.creative_id = creatives.creative_id\n and ads.source_relation = creatives.source_relation\n left join ad_squads\n on ads.ad_squad_id = ad_squads.ad_squad_id\n and ads.source_relation = ad_squads.source_relation\n left join campaigns\n on ad_squads.campaign_id = campaigns.campaign_id\n and ad_squads.source_relation = campaigns.source_relation\n left join account\n on creatives.ad_account_id = account.ad_account_id\n and creatives.source_relation = account.source_relation\n\n {% if var('ad_reporting__url_report__using_null_filter', True) %}\n -- We only want utm ads to populate this report. Therefore, we filter where url ads are populated.\n where creatives.url is not null\n {% endif %}\n\n {{ dbt_utils.group_by(19) }}\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_hourly_report", "package": null, "version": null}, {"name": "snapchat_ads__creative_history_prep", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_account_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_squad_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.type_numeric", "macro.snapchat_ads.snapchat_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_hourly_report", "model.snapchat_ads.snapchat_ads__creative_history_prep", "model.snapchat_ads.stg_snapchat_ads__ad_account_history", "model.snapchat_ads.stg_snapchat_ads__ad_history", "model.snapchat_ads.stg_snapchat_ads__ad_squad_history", "model.snapchat_ads.stg_snapchat_ads__campaign_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat_ads__url_report.sql", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__snapchat_ads__creative_history_prep as (\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_history\"\n where is_most_recent_record = true\n\n), url_tags as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_url_tag_history\"\n where is_most_recent_record = true\n\n), url_tags_pivoted as (\n\n select \n source_relation,\n creative_id,\n min(case when param_key = 'utm_source' then param_value end) as utm_source,\n min(case when param_key = 'utm_medium' then param_value end) as utm_medium,\n min(case when param_key = 'utm_campaign' then param_value end) as utm_campaign,\n min(case when param_key = 'utm_content' then param_value end) as utm_content,\n min(case when param_key = 'utm_term' then param_value end) as utm_term\n from url_tags\n group by 1,2\n\n), fields as (\n\n select\n base.source_relation,\n base.creative_id,\n base.ad_account_id,\n base.creative_name,\n base.url,\n \n\n \n \n\n split_part(\n base.url,\n '?',\n 1\n )\n\n\n \n\n as base_url,\n \n \n cast(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n \n\n replace(\n \n\n replace(\n \n\n replace(\n base.url,\n 'android-app://',\n ''\n )\n\n\n,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n '/',\n 1\n )\n\n\n \n\n,\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_host,\n '/' || \n \n cast(\n\n \n \n\n split_part(\n \n\n right(\n \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n \n\n length(\n \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n )-coalesce(\n nullif(\n\n position(\n '/' in \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ), 0),\n \n\n position(\n '?' in \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ) - 1\n )\n ),\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_path,\n coalesce(url_tags_pivoted.utm_source, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_source=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_source,\n coalesce(url_tags_pivoted.utm_medium, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_medium=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_medium,\n coalesce(url_tags_pivoted.utm_campaign, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_campaign=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_campaign,\n coalesce(url_tags_pivoted.utm_content, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_content=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_content,\n coalesce(url_tags_pivoted.utm_term, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_term=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_term\n from base\n left join url_tags_pivoted\n on base.creative_id = url_tags_pivoted.creative_id\n and base.source_relation = url_tags_pivoted.source_relation\n\n)\n\nselect *\nfrom fields\n), ad_hourly as (\n\n select *,\n \n conversion_purchases as total_conversions\n \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_hourly_report\"\n\n), creatives as (\n\n select *\n from __dbt__cte__snapchat_ads__creative_history_prep\n\n), account as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_account_history\"\n where is_most_recent_record = true\n\n), ads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_history\"\n where is_most_recent_record = true\n\n), ad_squads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_history\"\n where is_most_recent_record = true\n\n), campaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_history\"\n where is_most_recent_record = true\n\n\n), aggregated as (\n\n select\n ad_hourly.source_relation,\n cast(ad_hourly.date_hour as date) as date_day,\n account.ad_account_id,\n account.ad_account_name,\n ad_hourly.ad_id,\n ads.ad_name,\n ad_squads.ad_squad_id,\n ad_squads.ad_squad_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n account.currency,\n creatives.base_url,\n creatives.url_host,\n creatives.url_path,\n creatives.utm_source,\n creatives.utm_medium,\n creatives.utm_campaign,\n creatives.utm_content,\n creatives.utm_term,\n sum(ad_hourly.swipes) as swipes,\n sum(ad_hourly.impressions) as impressions,\n round(sum(ad_hourly.spend),2) as spend,\n sum(ad_hourly.total_conversions) as total_conversions,\n round(cast(sum(ad_hourly.conversion_purchases_value) as numeric(28,6)), 2) as conversion_purchases_value\n \n \n\n\n\n \n \n\n\n\n \n\n\n\n \n \n \n \n , sum(coalesce(conversion_purchases, 0)) as conversion_purchases\n \n\n \n\n\n\n\n \n\n\n\n\n\n \n\n\n\n\n\n \n from ad_hourly\n left join ads \n on ad_hourly.ad_id = ads.ad_id\n and ad_hourly.source_relation = ads.source_relation\n left join creatives\n on ads.creative_id = creatives.creative_id\n and ads.source_relation = creatives.source_relation\n left join ad_squads\n on ads.ad_squad_id = ad_squads.ad_squad_id\n and ads.source_relation = ad_squads.source_relation\n left join campaigns\n on ad_squads.campaign_id = campaigns.campaign_id\n and ad_squads.source_relation = campaigns.source_relation\n left join account\n on creatives.ad_account_id = account.ad_account_id\n and creatives.source_relation = account.source_relation\n\n \n -- We only want utm ads to populate this report. Therefore, we filter where url ads are populated.\n where creatives.url is not null\n \n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.snapchat_ads.snapchat_ads__creative_history_prep", "sql": " __dbt__cte__snapchat_ads__creative_history_prep as (\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_history\"\n where is_most_recent_record = true\n\n), url_tags as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_url_tag_history\"\n where is_most_recent_record = true\n\n), url_tags_pivoted as (\n\n select \n source_relation,\n creative_id,\n min(case when param_key = 'utm_source' then param_value end) as utm_source,\n min(case when param_key = 'utm_medium' then param_value end) as utm_medium,\n min(case when param_key = 'utm_campaign' then param_value end) as utm_campaign,\n min(case when param_key = 'utm_content' then param_value end) as utm_content,\n min(case when param_key = 'utm_term' then param_value end) as utm_term\n from url_tags\n group by 1,2\n\n), fields as (\n\n select\n base.source_relation,\n base.creative_id,\n base.ad_account_id,\n base.creative_name,\n base.url,\n \n\n \n \n\n split_part(\n base.url,\n '?',\n 1\n )\n\n\n \n\n as base_url,\n \n \n cast(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n \n\n replace(\n \n\n replace(\n \n\n replace(\n base.url,\n 'android-app://',\n ''\n )\n\n\n,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n '/',\n 1\n )\n\n\n \n\n,\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_host,\n '/' || \n \n cast(\n\n \n \n\n split_part(\n \n\n right(\n \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n \n\n length(\n \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n )-coalesce(\n nullif(\n\n position(\n '/' in \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ), 0),\n \n\n position(\n '?' in \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ) - 1\n )\n ),\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_path,\n coalesce(url_tags_pivoted.utm_source, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_source=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_source,\n coalesce(url_tags_pivoted.utm_medium, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_medium=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_medium,\n coalesce(url_tags_pivoted.utm_campaign, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_campaign=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_campaign,\n coalesce(url_tags_pivoted.utm_content, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_content=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_content,\n coalesce(url_tags_pivoted.utm_term, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_term=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_term\n from base\n left join url_tags_pivoted\n on base.creative_id = url_tags_pivoted.creative_id\n and base.source_relation = url_tags_pivoted.source_relation\n\n)\n\nselect *\nfrom fields\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.snapchat_ads__campaign_country_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__campaign_country_report", "resource_type": "model", "package_name": "snapchat_ads", "path": "snapchat_ads__campaign_country_report.sql", "original_file_path": "models/snapchat_ads__campaign_country_report.sql", "unique_id": "model.snapchat_ads.snapchat_ads__campaign_country_report", "fqn": ["snapchat_ads", "snapchat_ads__campaign_country_report"], "alias": "snapchat_ads__campaign_country_report", "checksum": {"name": "sha256", "checksum": "4d6042fcce9a1ef51c7de16dd8e2c33bea4172b631d95d26fc4b5372963351b2"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Snapchat campaign per country.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country": {"name": "country", "description": "The country where the campaign was delivered.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_id": {"name": "ad_account_id", "description": "The ID of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_name": {"name": "ad_account_name", "description": "The name of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The currency used by the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the campaign in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the campaign had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes the campaign had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "Number of times components of the campaign were shared.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "saves": {"name": "saves", "description": "Number of times components of the campaign were saved to Memories.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "The total conversions being brought in the conversion fields you select in your `snapchat_ads__conversion_fields`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases for the campaign on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases for the campaign on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the campaign was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_daily_budget": {"name": "campaign_daily_budget", "description": "Daily spend cap for the campaign (converted from microcurrency).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_time": {"name": "start_time", "description": "The start time of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_time": {"name": "end_time", "description": "The end time of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Campaign status (e.g., ACTIVE, PAUSED, ARCHIVED).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective": {"name": "objective", "description": "The objective of the campaign (e.g., BRAND_AWARENESS, APP_INSTALL, etc.).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_lifetime_spend_cap": {"name": "campaign_lifetime_spend_cap", "description": "Lifetime spend cap for the campaign (converted from microcurrency).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.4186635, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_country_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true) and var('snapchat_ads__using_campaign_country_report', false)) }}\n\nwith campaign_daily as (\n\n select *,\n {% if var('snapchat_ads__conversion_fields', none) %}\n {{ var('snapchat_ads__conversion_fields') | join(' + ') }} as total_conversions\n {% else %}\n 0 as total_conversions\n {% endif %}\n from {{ ref('stg_snapchat_ads__campaign_geo_country_daily_report') }}\n\n), account as (\n\n select *\n from {{ ref('stg_snapchat_ads__ad_account_history') }}\n where is_most_recent_record = true\n\n), campaigns as (\n\n select *\n from {{ ref('stg_snapchat_ads__campaign_history') }}\n where is_most_recent_record = true\n\n\n), aggregated as (\n\n select\n campaign_daily.source_relation,\n campaign_daily.date_day,\n campaign_daily.campaign_id,\n campaigns.campaign_name,\n campaign_daily.country,\n account.ad_account_id,\n account.ad_account_name,\n campaigns.created_at,\n campaigns.daily_budget as campaign_daily_budget,\n campaigns.start_time,\n campaigns.end_time,\n campaigns.status,\n campaigns.objective,\n campaigns.lifetime_spend_cap as campaign_lifetime_spend_cap,\n account.currency,\n sum(campaign_daily.swipes) as swipes,\n sum(campaign_daily.impressions) as impressions,\n round(sum(campaign_daily.spend),2) as spend,\n sum(campaign_daily.shares) as shares,\n sum(campaign_daily.saves) as saves,\n sum(campaign_daily.total_conversions) as total_conversions,\n round(cast(sum(campaign_daily.conversion_purchases_value) as {{ dbt.type_numeric() }}), 2) as conversion_purchases_value\n\n {{ snapchat_ads_persist_pass_through_columns(pass_through_variable='snapchat_ads__conversion_fields', transform='sum', coalesce_with=0) }}\n \n {{ snapchat_ads_persist_pass_through_columns(pass_through_variable='snapchat_ads__campaign_daily_country_report_passthrough_metrics', transform='sum') }}\n\n from campaign_daily\n left join campaigns\n on campaign_daily.campaign_id = campaigns.campaign_id\n and campaign_daily.source_relation = campaigns.source_relation\n left join account\n on campaigns.ad_account_id = account.ad_account_id\n and campaigns.source_relation = account.source_relation\n\n {{ dbt_utils.group_by(15) }}\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_geo_country_daily_report", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_account_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.type_numeric", "macro.snapchat_ads.snapchat_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report", "model.snapchat_ads.stg_snapchat_ads__ad_account_history", "model.snapchat_ads.stg_snapchat_ads__campaign_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat_ads__campaign_country_report.sql", "compiled": true, "compiled_code": "\n\nwith campaign_daily as (\n\n select *,\n \n conversion_purchases as total_conversions\n \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_geo_country_daily_report\"\n\n), account as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_account_history\"\n where is_most_recent_record = true\n\n), campaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_history\"\n where is_most_recent_record = true\n\n\n), aggregated as (\n\n select\n campaign_daily.source_relation,\n campaign_daily.date_day,\n campaign_daily.campaign_id,\n campaigns.campaign_name,\n campaign_daily.country,\n account.ad_account_id,\n account.ad_account_name,\n campaigns.created_at,\n campaigns.daily_budget as campaign_daily_budget,\n campaigns.start_time,\n campaigns.end_time,\n campaigns.status,\n campaigns.objective,\n campaigns.lifetime_spend_cap as campaign_lifetime_spend_cap,\n account.currency,\n sum(campaign_daily.swipes) as swipes,\n sum(campaign_daily.impressions) as impressions,\n round(sum(campaign_daily.spend),2) as spend,\n sum(campaign_daily.shares) as shares,\n sum(campaign_daily.saves) as saves,\n sum(campaign_daily.total_conversions) as total_conversions,\n round(cast(sum(campaign_daily.conversion_purchases_value) as numeric(28,6)), 2) as conversion_purchases_value\n\n \n\n\n\n\n\n\n\n \n \n \n \n , sum(coalesce(conversion_purchases, 0)) as conversion_purchases\n \n\n \n\n\n\n \n \n\n\n\n\n\n\n\n\n\n\n from campaign_daily\n left join campaigns\n on campaign_daily.campaign_id = campaigns.campaign_id\n and campaign_daily.source_relation = campaigns.source_relation\n left join account\n on campaigns.ad_account_id = account.ad_account_id\n and campaigns.source_relation = account.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.snapchat_ads__campaign_region_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__campaign_region_report", "resource_type": "model", "package_name": "snapchat_ads", "path": "snapchat_ads__campaign_region_report.sql", "original_file_path": "models/snapchat_ads__campaign_region_report.sql", "unique_id": "model.snapchat_ads.snapchat_ads__campaign_region_report", "fqn": ["snapchat_ads", "snapchat_ads__campaign_region_report"], "alias": "snapchat_ads__campaign_region_report", "checksum": {"name": "sha256", "checksum": "5b82a098a34660cde64027d76eb0402f6dfc683516cf488a6fa747b5f7e03785"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Snapchat campaign per region.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "region": {"name": "region", "description": "The region where the campaign was delivered.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_id": {"name": "ad_account_id", "description": "The ID of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_name": {"name": "ad_account_name", "description": "The name of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The currency used by the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the campaign in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the campaign had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes the campaign had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "Number of times components of the campaign were shared.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "saves": {"name": "saves", "description": "Number of times components of the campaign were saved to Memories.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "The total conversions being brought in the conversion fields you select in your `snapchat_ads__conversion_fields`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases for the campaign on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases for the campaign on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp of when the campaign was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_daily_budget": {"name": "campaign_daily_budget", "description": "Daily spend cap for the campaign (converted from microcurrency).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_time": {"name": "start_time", "description": "The start time of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_time": {"name": "end_time", "description": "The end time of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Campaign status (e.g., ACTIVE, PAUSED, ARCHIVED).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective": {"name": "objective", "description": "The objective of the campaign (e.g., BRAND_AWARENESS, APP_INSTALL, etc.).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_lifetime_spend_cap": {"name": "campaign_lifetime_spend_cap", "description": "Lifetime spend cap for the campaign (converted from microcurrency).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.420303, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_region_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true) and var('snapchat_ads__using_campaign_region_report', false)) }}\n\nwith campaign_daily as (\n\n select *,\n {% if var('snapchat_ads__conversion_fields', none) %}\n {{ var('snapchat_ads__conversion_fields') | join(' + ') }} as total_conversions\n {% else %}\n 0 as total_conversions\n {% endif %}\n from {{ ref('stg_snapchat_ads__campaign_geo_region_daily_report') }}\n\n), account as (\n\n select *\n from {{ ref('stg_snapchat_ads__ad_account_history') }}\n where is_most_recent_record = true\n\n), campaigns as (\n\n select *\n from {{ ref('stg_snapchat_ads__campaign_history') }}\n where is_most_recent_record = true\n\n\n), aggregated as (\n\n select\n campaign_daily.source_relation,\n campaign_daily.date_day,\n campaign_daily.campaign_id,\n campaigns.campaign_name,\n campaign_daily.region,\n account.ad_account_id,\n account.ad_account_name,\n campaigns.created_at,\n campaigns.daily_budget as campaign_daily_budget,\n campaigns.start_time,\n campaigns.end_time,\n campaigns.status,\n campaigns.objective,\n campaigns.lifetime_spend_cap as campaign_lifetime_spend_cap,\n account.currency,\n sum(campaign_daily.swipes) as swipes,\n sum(campaign_daily.impressions) as impressions,\n round(sum(campaign_daily.spend),2) as spend,\n sum(campaign_daily.shares) as shares,\n sum(campaign_daily.saves) as saves,\n sum(campaign_daily.total_conversions) as total_conversions,\n round(cast(sum(campaign_daily.conversion_purchases_value) as {{ dbt.type_numeric() }}), 2) as conversion_purchases_value\n\n {{ snapchat_ads_persist_pass_through_columns(pass_through_variable='snapchat_ads__conversion_fields', transform='sum', coalesce_with=0) }}\n \n {{ snapchat_ads_persist_pass_through_columns(pass_through_variable='snapchat_ads__campaign_daily_region_report_passthrough_metrics', transform='sum') }}\n \n from campaign_daily\n left join campaigns\n on campaign_daily.campaign_id = campaigns.campaign_id\n and campaign_daily.source_relation = campaigns.source_relation\n left join account\n on campaigns.ad_account_id = account.ad_account_id\n and campaigns.source_relation = account.source_relation\n \n {{ dbt_utils.group_by(15) }}\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_geo_region_daily_report", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_account_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.type_numeric", "macro.snapchat_ads.snapchat_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report", "model.snapchat_ads.stg_snapchat_ads__ad_account_history", "model.snapchat_ads.stg_snapchat_ads__campaign_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat_ads__campaign_region_report.sql", "compiled": true, "compiled_code": "\n\nwith campaign_daily as (\n\n select *,\n \n conversion_purchases as total_conversions\n \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_geo_region_daily_report\"\n\n), account as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_account_history\"\n where is_most_recent_record = true\n\n), campaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_history\"\n where is_most_recent_record = true\n\n\n), aggregated as (\n\n select\n campaign_daily.source_relation,\n campaign_daily.date_day,\n campaign_daily.campaign_id,\n campaigns.campaign_name,\n campaign_daily.region,\n account.ad_account_id,\n account.ad_account_name,\n campaigns.created_at,\n campaigns.daily_budget as campaign_daily_budget,\n campaigns.start_time,\n campaigns.end_time,\n campaigns.status,\n campaigns.objective,\n campaigns.lifetime_spend_cap as campaign_lifetime_spend_cap,\n account.currency,\n sum(campaign_daily.swipes) as swipes,\n sum(campaign_daily.impressions) as impressions,\n round(sum(campaign_daily.spend),2) as spend,\n sum(campaign_daily.shares) as shares,\n sum(campaign_daily.saves) as saves,\n sum(campaign_daily.total_conversions) as total_conversions,\n round(cast(sum(campaign_daily.conversion_purchases_value) as numeric(28,6)), 2) as conversion_purchases_value\n\n \n\n\n\n\n\n\n\n \n \n \n \n , sum(coalesce(conversion_purchases, 0)) as conversion_purchases\n \n\n \n\n\n\n \n \n\n\n\n\n\n\n\n\n\n \n from campaign_daily\n left join campaigns\n on campaign_daily.campaign_id = campaigns.campaign_id\n and campaign_daily.source_relation = campaigns.source_relation\n left join account\n on campaigns.ad_account_id = account.ad_account_id\n and campaigns.source_relation = account.source_relation\n \n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.snapchat_ads__ad_squad_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__ad_squad_report", "resource_type": "model", "package_name": "snapchat_ads", "path": "snapchat_ads__ad_squad_report.sql", "original_file_path": "models/snapchat_ads__ad_squad_report.sql", "unique_id": "model.snapchat_ads.snapchat_ads__ad_squad_report", "fqn": ["snapchat_ads", "snapchat_ads__ad_squad_report"], "alias": "snapchat_ads__ad_squad_report", "checksum": {"name": "sha256", "checksum": "e3429475af588de41f1b42e2dcbc8ba7bb8073de12ee49902b64aee5ea5e89dd"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Snapchat ad squad.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_squad_id": {"name": "ad_squad_id", "description": "The ID of the ad squad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_id": {"name": "ad_account_id", "description": "The ID of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_name": {"name": "ad_account_name", "description": "The name of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_squad_name": {"name": "ad_squad_name", "description": "The name of the ad squad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The currency used by the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the ad squad in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the ad squad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes the ad squad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases for an ad squad on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases for an ad squad on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "The total conversions being brought in the conversion fields you select in your `snapchat_ads__conversion_fields`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.4139144, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__ad_squad_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\nwith ad_squad_hourly as (\n\n select *,\n {% if var('snapchat_ads__conversion_fields', none) %}\n {{ var('snapchat_ads__conversion_fields') | join(' + ') }} as total_conversions\n {% else %}\n 0 as total_conversions\n {% endif %}\n from {{ ref('stg_snapchat_ads__ad_squad_hourly_report') }}\n\n), account as (\n\n select *\n from {{ ref('stg_snapchat_ads__ad_account_history') }}\n where is_most_recent_record = true\n\n), ad_squads as (\n\n select *\n from {{ ref('stg_snapchat_ads__ad_squad_history') }}\n where is_most_recent_record = true\n\n), campaigns as (\n\n select *\n from {{ ref('stg_snapchat_ads__campaign_history') }}\n where is_most_recent_record = true\n\n\n), aggregated as (\n\n select\n ad_squad_hourly.source_relation,\n cast(ad_squad_hourly.date_hour as date) as date_day,\n account.ad_account_id,\n account.ad_account_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n ad_squad_hourly.ad_squad_id,\n ad_squads.ad_squad_name,\n account.currency,\n sum(ad_squad_hourly.swipes) as swipes,\n sum(ad_squad_hourly.impressions) as impressions,\n round(sum(ad_squad_hourly.spend),2) as spend,\n sum(ad_squad_hourly.total_conversions) as total_conversions,\n round(cast(sum(ad_squad_hourly.conversion_purchases_value) as {{ dbt.type_numeric() }}), 2) as conversion_purchases_value\n\n {{ snapchat_ads_persist_pass_through_columns(pass_through_variable='snapchat_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='snapchat_ads__ad_squad_hourly_passthrough_metrics', exclude_fields=['conversion_purchases_value']) }}\n \n {{ snapchat_ads_persist_pass_through_columns(pass_through_variable='snapchat_ads__ad_squad_hourly_passthrough_metrics', transform='sum', exclude_fields=['conversion_purchases_value']) }}\n\n from ad_squad_hourly\n left join ad_squads\n on ad_squad_hourly.ad_squad_id = ad_squads.ad_squad_id\n and ad_squad_hourly.source_relation = ad_squads.source_relation\n left join campaigns\n on ad_squads.campaign_id = campaigns.campaign_id\n and ad_squads.source_relation = campaigns.source_relation\n left join account\n on campaigns.ad_account_id = account.ad_account_id\n and campaigns.source_relation = account.source_relation\n \n {{ dbt_utils.group_by(9) }}\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_squad_hourly_report", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_account_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_squad_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.type_numeric", "macro.snapchat_ads.snapchat_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report", "model.snapchat_ads.stg_snapchat_ads__ad_account_history", "model.snapchat_ads.stg_snapchat_ads__ad_squad_history", "model.snapchat_ads.stg_snapchat_ads__campaign_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat_ads__ad_squad_report.sql", "compiled": true, "compiled_code": "\n\nwith ad_squad_hourly as (\n\n select *,\n \n conversion_purchases as total_conversions\n \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_hourly_report\"\n\n), account as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_account_history\"\n where is_most_recent_record = true\n\n), ad_squads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_history\"\n where is_most_recent_record = true\n\n), campaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_history\"\n where is_most_recent_record = true\n\n\n), aggregated as (\n\n select\n ad_squad_hourly.source_relation,\n cast(ad_squad_hourly.date_hour as date) as date_day,\n account.ad_account_id,\n account.ad_account_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n ad_squad_hourly.ad_squad_id,\n ad_squads.ad_squad_name,\n account.currency,\n sum(ad_squad_hourly.swipes) as swipes,\n sum(ad_squad_hourly.impressions) as impressions,\n round(sum(ad_squad_hourly.spend),2) as spend,\n sum(ad_squad_hourly.total_conversions) as total_conversions,\n round(cast(sum(ad_squad_hourly.conversion_purchases_value) as numeric(28,6)), 2) as conversion_purchases_value\n\n \n\n\n\n \n \n\n\n\n \n\n\n\n \n \n \n \n , sum(coalesce(conversion_purchases, 0)) as conversion_purchases\n \n\n \n\n\n\n \n \n\n\n\n\n\n \n\n\n\n\n\n\n from ad_squad_hourly\n left join ad_squads\n on ad_squad_hourly.ad_squad_id = ad_squads.ad_squad_id\n and ad_squad_hourly.source_relation = ad_squads.source_relation\n left join campaigns\n on ad_squads.campaign_id = campaigns.campaign_id\n and ad_squads.source_relation = campaigns.source_relation\n left join account\n on campaigns.ad_account_id = account.ad_account_id\n and campaigns.source_relation = account.source_relation\n \n group by 1,2,3,4,5,6,7,8,9\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.snapchat_ads__ad_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__ad_report", "resource_type": "model", "package_name": "snapchat_ads", "path": "snapchat_ads__ad_report.sql", "original_file_path": "models/snapchat_ads__ad_report.sql", "unique_id": "model.snapchat_ads.snapchat_ads__ad_report", "fqn": ["snapchat_ads", "snapchat_ads__ad_report"], "alias": "snapchat_ads__ad_report", "checksum": {"name": "sha256", "checksum": "ff7dac356172cc09474fda0ad12780fdd28137a260773a16b469a8e292a12923"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Snapchat ad account.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_id": {"name": "ad_id", "description": "The ID of the ad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_id": {"name": "ad_account_id", "description": "The ID of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_name": {"name": "ad_account_name", "description": "The name of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_name": {"name": "ad_name", "description": "The name of the ad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_squad_id": {"name": "ad_squad_id", "description": "The ID of the ad squad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_squad_name": {"name": "ad_squad_name", "description": "The name of the ad squad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The currency used by the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the ad in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases for an ad on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases for an ad on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "The total conversions being brought in the conversion fields you select in your `snapchat_ads__conversion_fields`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.4113922, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__ad_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\nwith ad_hourly as (\n\n select *,\n {% if var('snapchat_ads__conversion_fields', none) %}\n {{ var('snapchat_ads__conversion_fields') | join(' + ') }} as total_conversions\n {% else %}\n 0 as total_conversions\n {% endif %}\n from {{ ref('stg_snapchat_ads__ad_hourly_report') }}\n\n), creatives as (\n\n select *\n from {{ ref('snapchat_ads__creative_history_prep') }}\n\n), account as (\n\n select *\n from {{ ref('stg_snapchat_ads__ad_account_history') }}\n where is_most_recent_record = true\n\n), ads as (\n\n select *\n from {{ ref('stg_snapchat_ads__ad_history') }}\n where is_most_recent_record = true\n\n), ad_squads as (\n\n select *\n from {{ ref('stg_snapchat_ads__ad_squad_history') }}\n where is_most_recent_record = true\n\n), campaigns as (\n\n select *\n from {{ ref('stg_snapchat_ads__campaign_history') }}\n where is_most_recent_record = true\n\n\n), aggregated as (\n\n select\n ad_hourly.source_relation,\n cast(ad_hourly.date_hour as date) as date_day,\n account.ad_account_id,\n account.ad_account_name,\n ad_hourly.ad_id,\n ads.ad_name,\n ad_squads.ad_squad_id,\n ad_squads.ad_squad_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n account.currency,\n sum(ad_hourly.swipes) as swipes,\n sum(ad_hourly.impressions) as impressions,\n round(sum(ad_hourly.spend),2) as spend,\n sum(ad_hourly.total_conversions) as total_conversions,\n round(cast(sum(ad_hourly.conversion_purchases_value) as {{ dbt.type_numeric() }}), 2) as conversion_purchases_value\n\n {{ snapchat_ads_persist_pass_through_columns(pass_through_variable='snapchat_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='snapchat_ads__ad_hourly_passthrough_metrics', exclude_fields=['conversion_purchases_value']) }}\n\n {{ snapchat_ads_persist_pass_through_columns(pass_through_variable='snapchat_ads__ad_hourly_passthrough_metrics', transform='sum', exclude_fields=['conversion_purchases_value']) }}\n\n from ad_hourly\n left join ads \n on ad_hourly.ad_id = ads.ad_id\n and ad_hourly.source_relation = ads.source_relation\n left join creatives\n on ads.creative_id = creatives.creative_id\n and ads.source_relation = creatives.source_relation\n left join account\n on creatives.ad_account_id = account.ad_account_id\n and creatives.source_relation = account.source_relation\n left join ad_squads\n on ads.ad_squad_id = ad_squads.ad_squad_id\n and ads.source_relation = ad_squads.source_relation\n left join campaigns\n on ad_squads.campaign_id = campaigns.campaign_id\n and ad_squads.source_relation = campaigns.source_relation\n \n {{ dbt_utils.group_by(11) }}\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_hourly_report", "package": null, "version": null}, {"name": "snapchat_ads__creative_history_prep", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_account_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_squad_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.type_numeric", "macro.snapchat_ads.snapchat_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_hourly_report", "model.snapchat_ads.snapchat_ads__creative_history_prep", "model.snapchat_ads.stg_snapchat_ads__ad_account_history", "model.snapchat_ads.stg_snapchat_ads__ad_history", "model.snapchat_ads.stg_snapchat_ads__ad_squad_history", "model.snapchat_ads.stg_snapchat_ads__campaign_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat_ads__ad_report.sql", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__snapchat_ads__creative_history_prep as (\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_history\"\n where is_most_recent_record = true\n\n), url_tags as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_url_tag_history\"\n where is_most_recent_record = true\n\n), url_tags_pivoted as (\n\n select \n source_relation,\n creative_id,\n min(case when param_key = 'utm_source' then param_value end) as utm_source,\n min(case when param_key = 'utm_medium' then param_value end) as utm_medium,\n min(case when param_key = 'utm_campaign' then param_value end) as utm_campaign,\n min(case when param_key = 'utm_content' then param_value end) as utm_content,\n min(case when param_key = 'utm_term' then param_value end) as utm_term\n from url_tags\n group by 1,2\n\n), fields as (\n\n select\n base.source_relation,\n base.creative_id,\n base.ad_account_id,\n base.creative_name,\n base.url,\n \n\n \n \n\n split_part(\n base.url,\n '?',\n 1\n )\n\n\n \n\n as base_url,\n \n \n cast(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n \n\n replace(\n \n\n replace(\n \n\n replace(\n base.url,\n 'android-app://',\n ''\n )\n\n\n,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n '/',\n 1\n )\n\n\n \n\n,\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_host,\n '/' || \n \n cast(\n\n \n \n\n split_part(\n \n\n right(\n \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n \n\n length(\n \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n )-coalesce(\n nullif(\n\n position(\n '/' in \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ), 0),\n \n\n position(\n '?' in \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ) - 1\n )\n ),\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_path,\n coalesce(url_tags_pivoted.utm_source, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_source=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_source,\n coalesce(url_tags_pivoted.utm_medium, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_medium=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_medium,\n coalesce(url_tags_pivoted.utm_campaign, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_campaign=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_campaign,\n coalesce(url_tags_pivoted.utm_content, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_content=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_content,\n coalesce(url_tags_pivoted.utm_term, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_term=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_term\n from base\n left join url_tags_pivoted\n on base.creative_id = url_tags_pivoted.creative_id\n and base.source_relation = url_tags_pivoted.source_relation\n\n)\n\nselect *\nfrom fields\n), ad_hourly as (\n\n select *,\n \n conversion_purchases as total_conversions\n \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_hourly_report\"\n\n), creatives as (\n\n select *\n from __dbt__cte__snapchat_ads__creative_history_prep\n\n), account as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_account_history\"\n where is_most_recent_record = true\n\n), ads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_history\"\n where is_most_recent_record = true\n\n), ad_squads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_history\"\n where is_most_recent_record = true\n\n), campaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_history\"\n where is_most_recent_record = true\n\n\n), aggregated as (\n\n select\n ad_hourly.source_relation,\n cast(ad_hourly.date_hour as date) as date_day,\n account.ad_account_id,\n account.ad_account_name,\n ad_hourly.ad_id,\n ads.ad_name,\n ad_squads.ad_squad_id,\n ad_squads.ad_squad_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n account.currency,\n sum(ad_hourly.swipes) as swipes,\n sum(ad_hourly.impressions) as impressions,\n round(sum(ad_hourly.spend),2) as spend,\n sum(ad_hourly.total_conversions) as total_conversions,\n round(cast(sum(ad_hourly.conversion_purchases_value) as numeric(28,6)), 2) as conversion_purchases_value\n\n \n\n\n\n \n \n\n\n\n \n\n\n\n \n \n \n \n , sum(coalesce(conversion_purchases, 0)) as conversion_purchases\n \n\n \n\n\n\n\n \n\n\n\n\n\n \n\n\n\n\n\n\n from ad_hourly\n left join ads \n on ad_hourly.ad_id = ads.ad_id\n and ad_hourly.source_relation = ads.source_relation\n left join creatives\n on ads.creative_id = creatives.creative_id\n and ads.source_relation = creatives.source_relation\n left join account\n on creatives.ad_account_id = account.ad_account_id\n and creatives.source_relation = account.source_relation\n left join ad_squads\n on ads.ad_squad_id = ad_squads.ad_squad_id\n and ads.source_relation = ad_squads.source_relation\n left join campaigns\n on ad_squads.campaign_id = campaigns.campaign_id\n and ad_squads.source_relation = campaigns.source_relation\n \n group by 1,2,3,4,5,6,7,8,9,10,11\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.snapchat_ads.snapchat_ads__creative_history_prep", "sql": " __dbt__cte__snapchat_ads__creative_history_prep as (\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_history\"\n where is_most_recent_record = true\n\n), url_tags as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_url_tag_history\"\n where is_most_recent_record = true\n\n), url_tags_pivoted as (\n\n select \n source_relation,\n creative_id,\n min(case when param_key = 'utm_source' then param_value end) as utm_source,\n min(case when param_key = 'utm_medium' then param_value end) as utm_medium,\n min(case when param_key = 'utm_campaign' then param_value end) as utm_campaign,\n min(case when param_key = 'utm_content' then param_value end) as utm_content,\n min(case when param_key = 'utm_term' then param_value end) as utm_term\n from url_tags\n group by 1,2\n\n), fields as (\n\n select\n base.source_relation,\n base.creative_id,\n base.ad_account_id,\n base.creative_name,\n base.url,\n \n\n \n \n\n split_part(\n base.url,\n '?',\n 1\n )\n\n\n \n\n as base_url,\n \n \n cast(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n \n\n replace(\n \n\n replace(\n \n\n replace(\n base.url,\n 'android-app://',\n ''\n )\n\n\n,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n '/',\n 1\n )\n\n\n \n\n,\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_host,\n '/' || \n \n cast(\n\n \n \n\n split_part(\n \n\n right(\n \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n \n\n length(\n \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n )-coalesce(\n nullif(\n\n position(\n '/' in \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ), 0),\n \n\n position(\n '?' in \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ) - 1\n )\n ),\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_path,\n coalesce(url_tags_pivoted.utm_source, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_source=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_source,\n coalesce(url_tags_pivoted.utm_medium, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_medium=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_medium,\n coalesce(url_tags_pivoted.utm_campaign, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_campaign=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_campaign,\n coalesce(url_tags_pivoted.utm_content, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_content=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_content,\n coalesce(url_tags_pivoted.utm_term, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_term=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_term\n from base\n left join url_tags_pivoted\n on base.creative_id = url_tags_pivoted.creative_id\n and base.source_relation = url_tags_pivoted.source_relation\n\n)\n\nselect *\nfrom fields\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.snapchat_ads__account_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__account_report", "resource_type": "model", "package_name": "snapchat_ads", "path": "snapchat_ads__account_report.sql", "original_file_path": "models/snapchat_ads__account_report.sql", "unique_id": "model.snapchat_ads.snapchat_ads__account_report", "fqn": ["snapchat_ads", "snapchat_ads__account_report"], "alias": "snapchat_ads__account_report", "checksum": {"name": "sha256", "checksum": "91096e7014d0e95f63e59278afd05f37c79262e7c12f4f4f489b4c5d60abeade"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Snapchat ad account.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_id": {"name": "ad_account_id", "description": "The ID of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_name": {"name": "ad_account_name", "description": "The name of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The currency used by the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend for the account on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions for the account on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes for the account on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases for the account on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases for the account on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "The total conversions being brought in the conversion fields you select in your `snapchat_ads__conversion_fields`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.408641, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__account_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\nwith ad_hourly as (\n\n select *,\n {% if var('snapchat_ads__conversion_fields', none) %}\n {{ var('snapchat_ads__conversion_fields') | join(' + ') }} as total_conversions\n {% else %}\n 0 as total_conversions\n {% endif %}\n from {{ ref('stg_snapchat_ads__ad_hourly_report') }}\n\n), account as (\n\n select *\n from {{ ref('stg_snapchat_ads__ad_account_history') }}\n where is_most_recent_record = true\n\n), ads as (\n\n select *\n from {{ ref('stg_snapchat_ads__ad_history') }}\n where is_most_recent_record = true\n\n), ad_squads as (\n\n select *\n from {{ ref('stg_snapchat_ads__ad_squad_history') }}\n where is_most_recent_record = true\n\n), campaigns as (\n\n select *\n from {{ ref('stg_snapchat_ads__campaign_history') }}\n where is_most_recent_record = true\n\n\n), aggregated as (\n\n select\n ad_hourly.source_relation,\n cast(ad_hourly.date_hour as date) as date_day,\n account.ad_account_id,\n account.ad_account_name,\n account.currency,\n sum(ad_hourly.swipes) as swipes,\n sum(ad_hourly.impressions) as impressions,\n round(sum(ad_hourly.spend),2) as spend,\n sum(ad_hourly.total_conversions) as total_conversions,\n round(cast(sum(ad_hourly.conversion_purchases_value) as {{ dbt.type_numeric() }}), 2) as conversion_purchases_value\n\n {{ snapchat_ads_persist_pass_through_columns(pass_through_variable='snapchat_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='snapchat_ads__ad_hourly_passthrough_metrics', exclude_fields=['conversion_purchases_value']) }}\n\n {{ snapchat_ads_persist_pass_through_columns(pass_through_variable='snapchat_ads__ad_hourly_passthrough_metrics', transform='sum', exclude_fields=['conversion_purchases_value']) }}\n\n from ad_hourly\n left join ads \n on ad_hourly.ad_id = ads.ad_id\n and ad_hourly.source_relation = ads.source_relation\n left join ad_squads\n on ads.ad_squad_id = ad_squads.ad_squad_id\n and ads.source_relation = ad_squads.source_relation\n left join campaigns\n on ad_squads.campaign_id = campaigns.campaign_id\n and ad_squads.source_relation = campaigns.source_relation\n left join account\n on campaigns.ad_account_id = account.ad_account_id\n and campaigns.source_relation = account.source_relation\n\n {{ dbt_utils.group_by(5) }}\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_hourly_report", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_account_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_squad_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.type_numeric", "macro.snapchat_ads.snapchat_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_hourly_report", "model.snapchat_ads.stg_snapchat_ads__ad_account_history", "model.snapchat_ads.stg_snapchat_ads__ad_history", "model.snapchat_ads.stg_snapchat_ads__ad_squad_history", "model.snapchat_ads.stg_snapchat_ads__campaign_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat_ads__account_report.sql", "compiled": true, "compiled_code": "\n\nwith ad_hourly as (\n\n select *,\n \n conversion_purchases as total_conversions\n \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_hourly_report\"\n\n), account as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_account_history\"\n where is_most_recent_record = true\n\n), ads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_history\"\n where is_most_recent_record = true\n\n), ad_squads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_history\"\n where is_most_recent_record = true\n\n), campaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_history\"\n where is_most_recent_record = true\n\n\n), aggregated as (\n\n select\n ad_hourly.source_relation,\n cast(ad_hourly.date_hour as date) as date_day,\n account.ad_account_id,\n account.ad_account_name,\n account.currency,\n sum(ad_hourly.swipes) as swipes,\n sum(ad_hourly.impressions) as impressions,\n round(sum(ad_hourly.spend),2) as spend,\n sum(ad_hourly.total_conversions) as total_conversions,\n round(cast(sum(ad_hourly.conversion_purchases_value) as numeric(28,6)), 2) as conversion_purchases_value\n\n \n\n\n\n \n \n\n\n\n \n\n\n\n \n \n \n \n , sum(coalesce(conversion_purchases, 0)) as conversion_purchases\n \n\n \n\n\n\n\n \n\n\n\n\n\n \n\n\n\n\n\n\n from ad_hourly\n left join ads \n on ad_hourly.ad_id = ads.ad_id\n and ad_hourly.source_relation = ads.source_relation\n left join ad_squads\n on ads.ad_squad_id = ad_squads.ad_squad_id\n and ads.source_relation = ad_squads.source_relation\n left join campaigns\n on ad_squads.campaign_id = campaigns.campaign_id\n and ad_squads.source_relation = campaigns.source_relation\n left join account\n on campaigns.ad_account_id = account.ad_account_id\n and campaigns.source_relation = account.source_relation\n\n group by 1,2,3,4,5\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__creative_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__creative_history", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/stg_snapchat_ads__creative_history.sql", "original_file_path": "models/staging/stg_snapchat_ads__creative_history.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__creative_history", "fqn": ["snapchat_ads", "staging", "stg_snapchat_ads__creative_history"], "alias": "stg_snapchat_ads__creative_history", "checksum": {"name": "sha256", "checksum": "96c444fa425bed7c83d79b283016abca2c147ef05d7996b68a4ff7fee399d8d8"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a historic version of a creative in Snapchat.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}, "creative_id": {"name": "creative_id", "description": "The ID of the creative in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_name": {"name": "creative_name", "description": "The name of the creative in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_id": {"name": "ad_account_id", "description": "The ID of the related ad account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url": {"name": "url", "description": "The URL of the creative if the creative is of type 'web view'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Created at timestamp.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/staging/stg_snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.5113626, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_snapchat_ads__creative_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_snapchat_ads__creative_history_tmp')),\n staging_columns=get_creative_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='snapchat_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as creative_id,\n cast (created_at as {{ dbt.type_timestamp() }}) as created_at,\n ad_account_id,\n name as creative_name,\n web_view_url as url,\n cast (_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast (updated_at as {{ dbt.type_timestamp() }}) as updated_at,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='snapchat_ads') }} order by _fivetran_synced desc) =1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__creative_history_tmp", "package": null, "version": null}, {"name": "stg_snapchat_ads__creative_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.snapchat_ads.get_creative_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__creative_history_tmp"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat_ads__creative_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_history_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n ad_account_id as ad_account_id,\n cast(null as timestamp) as created_at,\n id as id,\n name as name,\n cast(null as timestamp) as updated_at,\n web_view_url as web_view_url\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as creative_id,\n cast (created_at as timestamp) as created_at,\n ad_account_id,\n name as creative_name,\n web_view_url as url,\n cast (_fivetran_synced as timestamp) as _fivetran_synced,\n cast (updated_at as timestamp) as updated_at,\n row_number() over (partition by id order by _fivetran_synced desc) =1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__ad_squad_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_squad_history", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/stg_snapchat_ads__ad_squad_history.sql", "original_file_path": "models/staging/stg_snapchat_ads__ad_squad_history.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_squad_history", "fqn": ["snapchat_ads", "staging", "stg_snapchat_ads__ad_squad_history"], "alias": "stg_snapchat_ads__ad_squad_history", "checksum": {"name": "sha256", "checksum": "a5bf1506009cccce65fcf790c7c960e75393482c9a595e6438831dd31781e578"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a historic version of an ad squad in Snapchat.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}, "ad_squad_id": {"name": "ad_squad_id", "description": "The ID of the ad squad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_squad_name": {"name": "ad_squad_name", "description": "The name of the ad squad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Created at timestamp.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/staging/stg_snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.5046017, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_snapchat_ads__ad_squad_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_snapchat_ads__ad_squad_history_tmp')),\n staging_columns=get_ad_squad_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='snapchat_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as ad_squad_id,\n name as ad_squad_name,\n cast (created_at as {{ dbt.type_timestamp() }}) as created_at,\n campaign_id,\n cast (_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast (updated_at as {{ dbt.type_timestamp() }}) as updated_at,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='snapchat_ads') }} order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_squad_history_tmp", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_squad_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.snapchat_ads.get_ad_squad_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_history_tmp"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat_ads__ad_squad_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_history_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n campaign_id as campaign_id,\n cast(null as timestamp) as created_at,\n id as id,\n name as name,\n cast(null as timestamp) as updated_at\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as ad_squad_id,\n name as ad_squad_name,\n cast (created_at as timestamp) as created_at,\n campaign_id,\n cast (_fivetran_synced as timestamp) as _fivetran_synced,\n cast (updated_at as timestamp) as updated_at,\n row_number() over (partition by id order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_hourly_report", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/stg_snapchat_ads__ad_hourly_report.sql", "original_file_path": "models/staging/stg_snapchat_ads__ad_hourly_report.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report", "fqn": ["snapchat_ads", "staging", "stg_snapchat_ads__ad_hourly_report"], "alias": "stg_snapchat_ads__ad_hourly_report", "checksum": {"name": "sha256", "checksum": "826ca1addcc8418adee89d0060427f0cdbdaac7b4bdf1b63f25b22ccb8a52258"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents an hourly performance summary for an ad in Snapchat.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "ad_id": {"name": "ad_id", "description": "The ID of the ad that the report relates to in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_hour": {"name": "date_hour", "description": "The hour that the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_1": {"name": "attachment_quartile_1", "description": "Number of times your Long Form Video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_2": {"name": "attachment_quartile_2", "description": "Number of times your Long Form Video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_3": {"name": "attachment_quartile_3", "description": "Number of times your Long Form Video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_total_view_time": {"name": "attachment_total_view_time", "description": "Total time Snapchatters spent on the attachment (HH:MM:SS)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_view_completion": {"name": "attachment_view_completion", "description": "The number of times your Long Form Video was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_1": {"name": "quartile_1", "description": "The number of times your video ad was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_2": {"name": "quartile_2", "description": "The number of times your video ad was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_3": {"name": "quartile_3", "description": "The number of times your video ad was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "saves": {"name": "saves", "description": "Number of times an ad was saved to Memories", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "Number of times an ad was shared in a Chat or Story", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "screen_time": {"name": "screen_time", "description": "The number of seconds spent watching your ad across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views": {"name": "video_views", "description": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_completion": {"name": "view_completion", "description": "The number of times your video ad was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_time": {"name": "view_time", "description": "The number of seconds spent watching your ad across all users reached.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions for an ad in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend for an ad in the hour of the record converted from micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes for an ad in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases attributed to an ad for the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases attributed to an ad in the hour of the record (in Ad Account's currency, converted from microcurrency).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/staging/stg_snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.5035465, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_hourly_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_snapchat_ads__ad_hourly_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_snapchat_ads__ad_hourly_report_tmp')),\n staging_columns=get_ad_hourly_report_columns()\n )\n }} \n \n {{ fivetran_utils.apply_source_relation(package_name='snapchat_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n ad_id,\n cast (date as {{ dbt.type_timestamp() }}) as date_hour,\n attachment_quartile_1,\n attachment_quartile_2,\n attachment_quartile_3,\n (attachment_total_view_time_millis / 1000000.0) as attachment_total_view_time,\n attachment_view_completion,\n quartile_1,\n quartile_2,\n quartile_3,\n saves,\n shares,\n (screen_time_millis / 1000000.0) as screen_time,\n video_views,\n view_completion,\n (view_time_millis / 1000000.0) as view_time,\n impressions,\n (spend / 1000000.0) as spend,\n swipes,\n coalesce(cast(conversion_purchases_value as {{ dbt.type_float() }}), 0) / 1000000.0 as conversion_purchases_value\n\n {% for conversion in var('snapchat_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {{ snapchat_ads_fill_pass_through_columns(pass_through_fields=var('snapchat_ads__ad_hourly_passthrough_metrics'), except=(var('snapchat_ads__conversion_fields') + ['conversion_purchases_value'])) }}\n\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_hourly_report_tmp", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_hourly_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.snapchat_ads.get_ad_hourly_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_float", "macro.dbt.type_bigint", "macro.snapchat_ads.snapchat_ads_fill_pass_through_columns"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_hourly_report_tmp"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat_ads__ad_hourly_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_hourly_report_tmp\"\n),\n\nfields as (\n\n select\n \n ad_id as ad_id,\n cast(null as numeric(28,6)) as attachment_quartile_1,\n cast(null as numeric(28,6)) as attachment_quartile_2,\n cast(null as numeric(28,6)) as attachment_quartile_3,\n cast(null as numeric(28,6)) as attachment_total_view_time_millis,\n cast(null as numeric(28,6)) as attachment_view_completion,\n date as date,\n impressions as impressions,\n cast(null as numeric(28,6)) as quartile_1,\n cast(null as numeric(28,6)) as quartile_2,\n cast(null as numeric(28,6)) as quartile_3,\n cast(null as numeric(28,6)) as saves,\n cast(null as numeric(28,6)) as screen_time_millis,\n cast(null as numeric(28,6)) as shares,\n spend as spend,\n swipes as swipes,\n cast(null as numeric(28,6)) as video_views,\n cast(null as numeric(28,6)) as view_completion,\n cast(null as numeric(28,6)) as view_time_millis,\n conversion_purchases_value as conversion_purchases_value,\n conversion_purchases as conversion_purchases \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n ad_id,\n cast (date as timestamp) as date_hour,\n attachment_quartile_1,\n attachment_quartile_2,\n attachment_quartile_3,\n (attachment_total_view_time_millis / 1000000.0) as attachment_total_view_time,\n attachment_view_completion,\n quartile_1,\n quartile_2,\n quartile_3,\n saves,\n shares,\n (screen_time_millis / 1000000.0) as screen_time,\n video_views,\n view_completion,\n (view_time_millis / 1000000.0) as view_time,\n impressions,\n (spend / 1000000.0) as spend,\n swipes,\n coalesce(cast(conversion_purchases_value as float), 0) / 1000000.0 as conversion_purchases_value\n\n \n , coalesce(cast(conversion_purchases as bigint), 0) as conversion_purchases\n \n\n \n\n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_geo_region_daily_report", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/stg_snapchat_ads__campaign_geo_region_daily_report.sql", "original_file_path": "models/staging/stg_snapchat_ads__campaign_geo_region_daily_report.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report", "fqn": ["snapchat_ads", "staging", "stg_snapchat_ads__campaign_geo_region_daily_report"], "alias": "stg_snapchat_ads__campaign_geo_region_daily_report", "checksum": {"name": "sha256", "checksum": "c68a0f865a231a32e8dd0e29d662e4e80fb125a3a114c68d118e80d82752f27d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a daily performance summary per region for each campaign.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "ID of campaign", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "region": {"name": "region", "description": "The region that the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The day that the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_1": {"name": "attachment_quartile_1", "description": "Number of times your Long Form Video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_2": {"name": "attachment_quartile_2", "description": "Number of times your Long Form Video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_3": {"name": "attachment_quartile_3", "description": "Number of times your Long Form Video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_total_view_time": {"name": "attachment_total_view_time", "description": "Total time Snapchatters spent on the attachment (HH:MM:SS)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_view_completion": {"name": "attachment_view_completion", "description": "The number of times your Long Form Video was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_1": {"name": "quartile_1", "description": "The number of times your video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_2": {"name": "quartile_2", "description": "The number of times your video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_3": {"name": "quartile_3", "description": "The number of times your video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "saves": {"name": "saves", "description": "Number of times components of the campaign were saved to Memories", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "Number of times components of the campaign were shared in a Chat or Story", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "screen_time": {"name": "screen_time", "description": "The number of seconds spent watching your campaign across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views": {"name": "video_views", "description": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_completion": {"name": "view_completion", "description": "The number of times your video was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_time": {"name": "view_time", "description": "The number of seconds spent watching your campaign across all users reached.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions for a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend for a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes for a campaign. Swipes are when your ad was swiped up on or the CTA was tapped to view the attachment below.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases attributed to a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases attributed to a campaign for the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/staging/stg_snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.5162637, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_geo_region_daily_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true) and var('snapchat_ads__using_campaign_region_report', false)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_snapchat_ads__campaign_geo_region_daily_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_snapchat_ads__campaign_geo_region_daily_report_tmp')),\n staging_columns=get_campaign_geo_region_daily_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='snapchat_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n campaign_id,\n upper(region) as region,\n cast(date as {{ dbt.type_timestamp() }}) as date_day,\n attachment_quartile_1,\n attachment_quartile_2,\n attachment_quartile_3,\n (attachment_total_view_time_millis / 1000000.0) as attachment_total_view_time,\n attachment_view_completion,\n quartile_1,\n quartile_2,\n quartile_3,\n saves,\n shares,\n (screen_time_millis / 1000000.0) as screen_time,\n video_views,\n view_completion,\n (view_time_millis / 1000000.0) as view_time,\n impressions,\n (spend / 1000000.0) as spend,\n swipes,\n coalesce(cast(conversion_purchases_value as {{ dbt.type_float() }}), 0) / 1000000.0 as conversion_purchases_value\n\n {% for conversion in var('snapchat_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {{ snapchat_ads_fill_pass_through_columns(pass_through_fields=var('snapchat_ads__campaign_daily_region_report_passthrough_metrics')) }}\n \n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_geo_region_daily_report_tmp", "package": null, "version": null}, {"name": "stg_snapchat_ads__campaign_geo_region_daily_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.snapchat_ads.get_campaign_geo_region_daily_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_float", "macro.dbt.type_bigint", "macro.snapchat_ads.snapchat_ads_fill_pass_through_columns"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report_tmp"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat_ads__campaign_geo_region_daily_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_geo_region_daily_report_tmp\"\n),\n\nfields as (\n\n select\n \n attachment_quartile_1 as attachment_quartile_1,\n attachment_quartile_2 as attachment_quartile_2,\n attachment_quartile_3 as attachment_quartile_3,\n attachment_total_view_time_millis as attachment_total_view_time_millis,\n attachment_view_completion as attachment_view_completion,\n campaign_id as campaign_id,\n date as date,\n region as region,\n impressions as impressions,\n quartile_1 as quartile_1,\n quartile_2 as quartile_2,\n quartile_3 as quartile_3,\n saves as saves,\n screen_time_millis as screen_time_millis,\n shares as shares,\n spend as spend,\n swipes as swipes,\n video_views as video_views,\n view_completion as view_completion,\n view_time_millis as view_time_millis,\n conversion_purchases_value as conversion_purchases_value,\n cast(null as TEXT) as conversion_purchases\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n campaign_id,\n upper(region) as region,\n cast(date as timestamp) as date_day,\n attachment_quartile_1,\n attachment_quartile_2,\n attachment_quartile_3,\n (attachment_total_view_time_millis / 1000000.0) as attachment_total_view_time,\n attachment_view_completion,\n quartile_1,\n quartile_2,\n quartile_3,\n saves,\n shares,\n (screen_time_millis / 1000000.0) as screen_time,\n video_views,\n view_completion,\n (view_time_millis / 1000000.0) as view_time,\n impressions,\n (spend / 1000000.0) as spend,\n swipes,\n coalesce(cast(conversion_purchases_value as float), 0) / 1000000.0 as conversion_purchases_value\n\n \n , coalesce(cast(conversion_purchases as bigint), 0) as conversion_purchases\n \n\n \n\n\n\n\n \n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_geo_country_daily_report", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/stg_snapchat_ads__campaign_geo_country_daily_report.sql", "original_file_path": "models/staging/stg_snapchat_ads__campaign_geo_country_daily_report.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report", "fqn": ["snapchat_ads", "staging", "stg_snapchat_ads__campaign_geo_country_daily_report"], "alias": "stg_snapchat_ads__campaign_geo_country_daily_report", "checksum": {"name": "sha256", "checksum": "b5c97b5b5acc28258cf259e0413f5e881d199d0fdb841928396067103f88cef2"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a daily performance summary per country for each campaign.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "ID of campaign", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country": {"name": "country", "description": "The country that the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The day that the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_1": {"name": "attachment_quartile_1", "description": "Number of times your Long Form Video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_2": {"name": "attachment_quartile_2", "description": "Number of times your Long Form Video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_3": {"name": "attachment_quartile_3", "description": "Number of times your Long Form Video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_total_view_time": {"name": "attachment_total_view_time", "description": "Total time Snapchatters spent on the attachment (HH:MM:SS)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_view_completion": {"name": "attachment_view_completion", "description": "The number of times your Long Form Video was viewed to completion (97%)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_1": {"name": "quartile_1", "description": "The number of times your video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_2": {"name": "quartile_2", "description": "The number of times your video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_3": {"name": "quartile_3", "description": "The number of times your video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "saves": {"name": "saves", "description": "Number of times components of the campaign were saved to Memories", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "Number of times components of the campaign were shared in a Chat or Story", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "screen_time": {"name": "screen_time", "description": "The number of seconds spent watching your campaign across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views": {"name": "video_views", "description": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_completion": {"name": "view_completion", "description": "The number of times your video was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_time": {"name": "view_time", "description": "The number of seconds spent watching your campaign across all users reached.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions for a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend for a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes for a campaign. Swipes are when your ad was swiped up on or the CTA was tapped to view the attachment below.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases attributed to a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases attributed to a campaign for the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/staging/stg_snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.5145578, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_geo_country_daily_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true) and var('snapchat_ads__using_campaign_country_report', false)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_snapchat_ads__campaign_geo_country_daily_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_snapchat_ads__campaign_geo_country_daily_report_tmp')),\n staging_columns=get_campaign_geo_country_daily_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='snapchat_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n campaign_id,\n upper(country) as country,\n cast(date as {{ dbt.type_timestamp() }}) as date_day,\n attachment_quartile_1,\n attachment_quartile_2,\n attachment_quartile_3,\n (attachment_total_view_time_millis / 1000000.0) as attachment_total_view_time,\n attachment_view_completion,\n quartile_1,\n quartile_2,\n quartile_3,\n saves,\n shares,\n (screen_time_millis / 1000000.0) as screen_time,\n video_views,\n view_completion,\n (view_time_millis / 1000000.0) as view_time,\n impressions,\n (spend / 1000000.0) as spend,\n swipes,\n coalesce(cast(conversion_purchases_value as {{ dbt.type_float() }}), 0) / 1000000.0 as conversion_purchases_value\n\n {% for conversion in var('snapchat_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {{ snapchat_ads_fill_pass_through_columns(pass_through_fields=var('snapchat_ads__campaign_daily_country_report_passthrough_metrics')) }}\n \n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_geo_country_daily_report_tmp", "package": null, "version": null}, {"name": "stg_snapchat_ads__campaign_geo_country_daily_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.snapchat_ads.get_campaign_geo_country_daily_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_float", "macro.dbt.type_bigint", "macro.snapchat_ads.snapchat_ads_fill_pass_through_columns"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report_tmp"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat_ads__campaign_geo_country_daily_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_geo_country_daily_report_tmp\"\n),\n\nfields as (\n\n select\n \n attachment_quartile_1 as attachment_quartile_1,\n attachment_quartile_2 as attachment_quartile_2,\n attachment_quartile_3 as attachment_quartile_3,\n attachment_total_view_time_millis as attachment_total_view_time_millis,\n attachment_view_completion as attachment_view_completion,\n campaign_id as campaign_id,\n date as date,\n country as country,\n impressions as impressions,\n quartile_1 as quartile_1,\n quartile_2 as quartile_2,\n quartile_3 as quartile_3,\n saves as saves,\n screen_time_millis as screen_time_millis,\n shares as shares,\n spend as spend,\n swipes as swipes,\n video_views as video_views,\n view_completion as view_completion,\n view_time_millis as view_time_millis,\n conversion_purchases_value as conversion_purchases_value,\n cast(null as TEXT) as conversion_purchases\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n campaign_id,\n upper(country) as country,\n cast(date as timestamp) as date_day,\n attachment_quartile_1,\n attachment_quartile_2,\n attachment_quartile_3,\n (attachment_total_view_time_millis / 1000000.0) as attachment_total_view_time,\n attachment_view_completion,\n quartile_1,\n quartile_2,\n quartile_3,\n saves,\n shares,\n (screen_time_millis / 1000000.0) as screen_time,\n video_views,\n view_completion,\n (view_time_millis / 1000000.0) as view_time,\n impressions,\n (spend / 1000000.0) as spend,\n swipes,\n coalesce(cast(conversion_purchases_value as float), 0) / 1000000.0 as conversion_purchases_value\n\n \n , coalesce(cast(conversion_purchases as bigint), 0) as conversion_purchases\n \n\n \n\n\n\n\n \n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_squad_hourly_report", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/stg_snapchat_ads__ad_squad_hourly_report.sql", "original_file_path": "models/staging/stg_snapchat_ads__ad_squad_hourly_report.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report", "fqn": ["snapchat_ads", "staging", "stg_snapchat_ads__ad_squad_hourly_report"], "alias": "stg_snapchat_ads__ad_squad_hourly_report", "checksum": {"name": "sha256", "checksum": "056d9b63ded661bec7565f7df7cc7c8a73cda9d2762acb6e932357b559e8c0f8"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a historic version of an ad in Snapchat.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "ad_squad_id": {"name": "ad_squad_id", "description": "ID of the ad squad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_hour": {"name": "date_hour", "description": "The hour that the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_1": {"name": "attachment_quartile_1", "description": "Number of times your Long Form Video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_2": {"name": "attachment_quartile_2", "description": "Number of times your Long Form Video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_3": {"name": "attachment_quartile_3", "description": "Number of times your Long Form Video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_total_view_time": {"name": "attachment_total_view_time", "description": "Total time Snapchatters spent on the attachment (HH:MM:SS)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_view_completion": {"name": "attachment_view_completion", "description": "The number of times your Long Form Video was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_1": {"name": "quartile_1", "description": "The number of times your video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_2": {"name": "quartile_2", "description": "The number of times your video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_3": {"name": "quartile_3", "description": "The number of times your video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "saves": {"name": "saves", "description": "Number of times components of the ad squad were saved to Memories", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "Number of times components of the ad squad were shared in a Chat or Story", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "screen_time": {"name": "screen_time", "description": "The number of seconds spent watching your ad squad across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views": {"name": "video_views", "description": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_completion": {"name": "view_completion", "description": "The number of times your video ad was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_time": {"name": "view_time", "description": "The number of seconds spent watching your ad squad across all users reached.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions for an ad squad in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend for an ad squad in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes for an ad squad in the hour of the record. Swipes are when your ad was swiped up on or the CTA was tapped to view the attachment below.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases attributed to an ad squad for the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases attributed to an ad squad in the hour of the record (in Ad Account's currency, converted from microcurrency).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/staging/stg_snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.506128, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_hourly_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_snapchat_ads__ad_squad_hourly_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_snapchat_ads__ad_squad_hourly_report_tmp')),\n staging_columns=get_ad_squad_hourly_report_columns()\n )\n }} \n \n {{ fivetran_utils.apply_source_relation(package_name='snapchat_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n ad_squad_id,\n cast (date as {{ dbt.type_timestamp() }}) as date_hour,\n attachment_quartile_1,\n attachment_quartile_2,\n attachment_quartile_3,\n (attachment_total_view_time_millis / 1000000.0) as attachment_total_view_time,\n attachment_view_completion,\n quartile_1,\n quartile_2,\n quartile_3,\n saves,\n shares,\n (screen_time_millis / 1000000.0) as screen_time,\n video_views,\n view_completion,\n (view_time_millis / 1000000.0) as view_time,\n impressions,\n (spend / 1000000.0) as spend,\n swipes,\n coalesce(cast(conversion_purchases_value as {{ dbt.type_float() }}), 0) / 1000000.0 as conversion_purchases_value\n\n {% for conversion in var('snapchat_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {{ snapchat_ads_fill_pass_through_columns(pass_through_fields=var('snapchat_ads__ad_squad_hourly_passthrough_metrics'), except=(var('snapchat_ads__conversion_fields') + ['conversion_purchases_value'])) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_squad_hourly_report_tmp", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_squad_hourly_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.snapchat_ads.get_ad_squad_hourly_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_float", "macro.dbt.type_bigint", "macro.snapchat_ads.snapchat_ads_fill_pass_through_columns"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report_tmp"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat_ads__ad_squad_hourly_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_hourly_report_tmp\"\n),\n\nfields as (\n\n select\n \n ad_squad_id as ad_squad_id,\n attachment_quartile_1 as attachment_quartile_1,\n attachment_quartile_2 as attachment_quartile_2,\n attachment_quartile_3 as attachment_quartile_3,\n attachment_total_view_time_millis as attachment_total_view_time_millis,\n attachment_view_completion as attachment_view_completion,\n date as date,\n impressions as impressions,\n quartile_1 as quartile_1,\n quartile_2 as quartile_2,\n quartile_3 as quartile_3,\n saves as saves,\n screen_time_millis as screen_time_millis,\n shares as shares,\n spend as spend,\n swipes as swipes,\n video_views as video_views,\n view_completion as view_completion,\n view_time_millis as view_time_millis,\n conversion_purchases_value as conversion_purchases_value,\n conversion_purchases as conversion_purchases \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n ad_squad_id,\n cast (date as timestamp) as date_hour,\n attachment_quartile_1,\n attachment_quartile_2,\n attachment_quartile_3,\n (attachment_total_view_time_millis / 1000000.0) as attachment_total_view_time,\n attachment_view_completion,\n quartile_1,\n quartile_2,\n quartile_3,\n saves,\n shares,\n (screen_time_millis / 1000000.0) as screen_time,\n video_views,\n view_completion,\n (view_time_millis / 1000000.0) as view_time,\n impressions,\n (spend / 1000000.0) as spend,\n swipes,\n coalesce(cast(conversion_purchases_value as float), 0) / 1000000.0 as conversion_purchases_value\n\n \n , coalesce(cast(conversion_purchases as bigint), 0) as conversion_purchases\n \n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__creative_url_tag_history", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/stg_snapchat_ads__creative_url_tag_history.sql", "original_file_path": "models/staging/stg_snapchat_ads__creative_url_tag_history.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history", "fqn": ["snapchat_ads", "staging", "stg_snapchat_ads__creative_url_tag_history"], "alias": "stg_snapchat_ads__creative_url_tag_history", "checksum": {"name": "sha256", "checksum": "5c60bce0ea6860ecdaed285c3a90afa8dbcefbc56364c6fcf3203666aaf3f49f"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a URL paramter key-value pair for a creative in Snapchat.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "creative_id": {"name": "creative_id", "description": "The ID of the related creative in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "param_key": {"name": "param_key", "description": "The URL parameter key, i.e. UTM_SOURCE.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "param_value": {"name": "param_value", "description": "The URL parameter value, i.e. Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/staging/stg_snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.5128376, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_url_tag_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_snapchat_ads__creative_url_tag_history_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_snapchat_ads__creative_url_tag_history_tmp')),\n staging_columns=get_creative_url_tag_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='snapchat_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n creative_id,\n key as param_key,\n value as param_value,\n cast (updated_at as {{ dbt.type_timestamp() }}) as updated_at,\n row_number() over (partition by creative_id, key {{ fivetran_utils.partition_by_source_relation(package_name='snapchat_ads') }} order by updated_at desc) =1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__creative_url_tag_history_tmp", "package": null, "version": null}, {"name": "stg_snapchat_ads__creative_url_tag_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.snapchat_ads.get_creative_url_tag_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history_tmp"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat_ads__creative_url_tag_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_url_tag_history_tmp\"\n\n),\n\nfields as (\n\n select\n \n creative_id as creative_id,\n key as key,\n updated_at as updated_at,\n value as value\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n creative_id,\n key as param_key,\n value as param_value,\n cast (updated_at as timestamp) as updated_at,\n row_number() over (partition by creative_id, key order by updated_at desc) =1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__ad_account_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_account_history", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/stg_snapchat_ads__ad_account_history.sql", "original_file_path": "models/staging/stg_snapchat_ads__ad_account_history.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_account_history", "fqn": ["snapchat_ads", "staging", "stg_snapchat_ads__ad_account_history"], "alias": "stg_snapchat_ads__ad_account_history", "checksum": {"name": "sha256", "checksum": "6ea64dad5e11f3c21e6e7fb576196a5486e75ba3065c9cfb366bc353c42eab36"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a historic version of an ad account in Snapchat.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}, "ad_account_id": {"name": "ad_account_id", "description": "The ID of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_name": {"name": "ad_account_name", "description": "The name of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser": {"name": "advertiser", "description": "Name of advertiser", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Currency used by account", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Created at timestamp", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone": {"name": "timezone", "description": "Account timezone", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/staging/stg_snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.4995687, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_account_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_snapchat_ads__ad_account_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_snapchat_ads__ad_account_history_tmp')),\n staging_columns=get_ad_account_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='snapchat_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as ad_account_id,\n name as ad_account_name,\n cast (created_at as {{ dbt.type_timestamp() }}) as created_at,\n advertiser, \n currency,\n timezone,\n cast (_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast (updated_at as {{ dbt.type_timestamp() }}) as updated_at,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='snapchat_ads') }} order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_account_history_tmp", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_account_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.snapchat_ads.get_ad_account_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_account_history_tmp"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat_ads__ad_account_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_account_history_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n cast(null as TEXT) as advertiser,\n cast(null as timestamp) as created_at,\n cast(null as TEXT) as currency,\n id as id,\n name as name,\n cast(null as TEXT) as timezone,\n cast(null as TEXT) as type,\n cast(null as timestamp) as updated_at\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as ad_account_id,\n name as ad_account_name,\n cast (created_at as timestamp) as created_at,\n advertiser, \n currency,\n timezone,\n cast (_fivetran_synced as timestamp) as _fivetran_synced,\n cast (updated_at as timestamp) as updated_at,\n row_number() over (partition by id order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__campaign_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_history", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/stg_snapchat_ads__campaign_history.sql", "original_file_path": "models/staging/stg_snapchat_ads__campaign_history.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_history", "fqn": ["snapchat_ads", "staging", "stg_snapchat_ads__campaign_history"], "alias": "stg_snapchat_ads__campaign_history", "checksum": {"name": "sha256", "checksum": "aa8fda0d9eaf1004c38b62ec1a3dec7e16c17bb49c5d4a1ba5754cff82023016"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a historic version of a campaign in Snapchat.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}, "campaign_id": {"name": "campaign_id", "description": "The id of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_id": {"name": "ad_account_id", "description": "The ID of the related ad account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Created at timestamp.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.is_most_recent_record"]}, "daily_budget": {"name": "daily_budget", "description": "Daily Spend Cap converted from microcurrency", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_time": {"name": "start_time", "description": "Start time", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_time": {"name": "end_time", "description": "End time", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lifetime_spend_cap": {"name": "lifetime_spend_cap", "description": "Lifetime spend cap for the campaign converted from microcurrency", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Campaign status (ACTIVE, PAUSED)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective": {"name": "objective", "description": "Objective of the Campaign (BRAND_AWARENESS (default), APP_CONVERSION, APP_INSTALL, etc)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/staging/stg_snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.5080917, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_snapchat_ads__campaign_history_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_snapchat_ads__campaign_history_tmp')),\n staging_columns=get_campaign_history_columns()\n )\n }}\n\n {{ fivetran_utils.apply_source_relation(package_name='snapchat_ads') }}\n\n from base\n\n),\n\nfinal as (\n\n select\n source_relation,\n id as campaign_id,\n ad_account_id,\n cast(created_at as {{ dbt.type_timestamp() }}) as created_at,\n name as campaign_name,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast(updated_at as {{ dbt.type_timestamp() }}) as updated_at,\n (daily_budget_micro / 1000000.0) as daily_budget,\n cast(start_time as {{ dbt.type_timestamp() }}) as start_time,\n cast(end_time as {{ dbt.type_timestamp() }}) as end_time,\n (lifetime_spend_cap_micro / 1000000.0) as lifetime_spend_cap,\n status,\n objective,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='snapchat_ads') }} order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_history_tmp", "package": null, "version": null}, {"name": "stg_snapchat_ads__campaign_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.snapchat_ads.get_campaign_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_history_tmp"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat_ads__campaign_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_history_tmp\"\n\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n ad_account_id as ad_account_id,\n cast(null as timestamp) as created_at,\n id as id,\n name as name,\n cast(null as timestamp) as updated_at,\n cast(null as integer) as daily_budget_micro,\n cast(null as timestamp) as start_time,\n cast(null as timestamp) as end_time,\n cast(null as integer) as lifetime_spend_cap_micro,\n cast(null as TEXT) as status,\n cast(null as TEXT) as objective\n\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n\n),\n\nfinal as (\n\n select\n source_relation,\n id as campaign_id,\n ad_account_id,\n cast(created_at as timestamp) as created_at,\n name as campaign_name,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n cast(updated_at as timestamp) as updated_at,\n (daily_budget_micro / 1000000.0) as daily_budget,\n cast(start_time as timestamp) as start_time,\n cast(end_time as timestamp) as end_time,\n (lifetime_spend_cap_micro / 1000000.0) as lifetime_spend_cap,\n status,\n objective,\n row_number() over (partition by id order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__ad_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_history", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/stg_snapchat_ads__ad_history.sql", "original_file_path": "models/staging/stg_snapchat_ads__ad_history.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_history", "fqn": ["snapchat_ads", "staging", "stg_snapchat_ads__ad_history"], "alias": "stg_snapchat_ads__ad_history", "checksum": {"name": "sha256", "checksum": "1c12fc38b7eedfb08957c102f483905c9f58f6c9839964b39c75c28363f18a87"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a historic version of an ad in Snapchat.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}, "ad_id": {"name": "ad_id", "description": "The ID of the ad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_squad_id": {"name": "ad_squad_id", "description": "The ID of the related ad squad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_id": {"name": "creative_id", "description": "The ID of the related creative in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_name": {"name": "ad_name", "description": "The name of the ad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Created at timestamp", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/staging/stg_snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.500603, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_snapchat_ads__ad_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_snapchat_ads__ad_history_tmp')),\n staging_columns=get_ad_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='snapchat_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as ad_id,\n name as ad_name,\n cast (created_at as {{ dbt.type_timestamp() }}) as created_at,\n ad_squad_id,\n creative_id,\n cast (_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast (updated_at as {{ dbt.type_timestamp() }}) as updated_at,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='snapchat_ads') }} order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_history_tmp", "package": null, "version": null}, {"name": "stg_snapchat_ads__ad_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.snapchat_ads.get_ad_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_history_tmp"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat_ads__ad_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_history_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n ad_squad_id as ad_squad_id,\n cast(null as timestamp) as created_at,\n creative_id as creative_id,\n id as id,\n name as name,\n cast(null as timestamp) as updated_at\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as ad_id,\n name as ad_name,\n cast (created_at as timestamp) as created_at,\n ad_squad_id,\n creative_id,\n cast (_fivetran_synced as timestamp) as _fivetran_synced,\n cast (updated_at as timestamp) as updated_at,\n row_number() over (partition by id order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_hourly_report", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/stg_snapchat_ads__campaign_hourly_report.sql", "original_file_path": "models/staging/stg_snapchat_ads__campaign_hourly_report.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report", "fqn": ["snapchat_ads", "staging", "stg_snapchat_ads__campaign_hourly_report"], "alias": "stg_snapchat_ads__campaign_hourly_report", "checksum": {"name": "sha256", "checksum": "744073009cfb48fcda365575b183b729c51fb0e87934f4dfb5a3d4fd94a9d50b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a historic version of an ad in Snapchat.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "ID of campaign", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_hour": {"name": "date_hour", "description": "The hour that the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_1": {"name": "attachment_quartile_1", "description": "Number of times your Long Form Video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_2": {"name": "attachment_quartile_2", "description": "Number of times your Long Form Video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_3": {"name": "attachment_quartile_3", "description": "Number of times your Long Form Video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_total_view_time": {"name": "attachment_total_view_time", "description": "Total time Snapchatters spent on the attachment (HH:MM:SS)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_view_completion": {"name": "attachment_view_completion", "description": "The number of times your Long Form Video was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_1": {"name": "quartile_1", "description": "The number of times your video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_2": {"name": "quartile_2", "description": "The number of times your video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_3": {"name": "quartile_3", "description": "The number of times your video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "saves": {"name": "saves", "description": "Number of times components of the campaign were saved to Memories", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "Number of times components of the campaign were shared in a Chat or Story", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "screen_time": {"name": "screen_time", "description": "The number of seconds spent watching your campaign across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views": {"name": "video_views", "description": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_completion": {"name": "view_completion", "description": "The number of times your video was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_time": {"name": "view_time", "description": "The number of seconds spent watching your campaign across all users reached.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions for a campaign in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend for a campaign in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes for a campaign in the hour of the record. Swipes are when your ad was swiped up on or the CTA was tapped to view the attachment below.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases attributed to a campaign for the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases attributed to a campaign in the hour of the record (in Ad Account's currency, converted from microcurrency).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "snapchat_ads://models/staging/stg_snapchat.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.509624, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_hourly_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_snapchat_ads__campaign_hourly_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_snapchat_ads__campaign_hourly_report_tmp')),\n staging_columns=get_campaign_hourly_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='snapchat_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n campaign_id,\n cast (date as {{ dbt.type_timestamp() }}) as date_hour,\n attachment_quartile_1,\n attachment_quartile_2,\n attachment_quartile_3,\n (attachment_total_view_time_millis / 1000000.0) as attachment_total_view_time,\n attachment_view_completion,\n quartile_1,\n quartile_2,\n quartile_3,\n saves,\n shares,\n (screen_time_millis / 1000000.0) as screen_time,\n video_views,\n view_completion,\n (view_time_millis / 1000000.0) as view_time,\n impressions,\n (spend / 1000000.0) as spend,\n swipes,\n coalesce(cast(conversion_purchases_value as {{ dbt.type_float() }}), 0) / 1000000.0 as conversion_purchases_value\n\n {% for conversion in var('snapchat_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {{ snapchat_ads_fill_pass_through_columns(pass_through_fields=var('snapchat_ads__campaign_hourly_report_passthrough_metrics'), except=(var('snapchat_ads__conversion_fields') + ['conversion_purchases_value'])) }}\n \n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_hourly_report_tmp", "package": null, "version": null}, {"name": "stg_snapchat_ads__campaign_hourly_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.snapchat_ads.get_campaign_hourly_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_float", "macro.dbt.type_bigint", "macro.snapchat_ads.snapchat_ads_fill_pass_through_columns"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report_tmp"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat_ads__campaign_hourly_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_hourly_report_tmp\"\n),\n\nfields as (\n\n select\n \n attachment_quartile_1 as attachment_quartile_1,\n attachment_quartile_2 as attachment_quartile_2,\n attachment_quartile_3 as attachment_quartile_3,\n attachment_total_view_time_millis as attachment_total_view_time_millis,\n attachment_view_completion as attachment_view_completion,\n campaign_id as campaign_id,\n date as date,\n impressions as impressions,\n quartile_1 as quartile_1,\n quartile_2 as quartile_2,\n quartile_3 as quartile_3,\n saves as saves,\n screen_time_millis as screen_time_millis,\n shares as shares,\n spend as spend,\n swipes as swipes,\n video_views as video_views,\n view_completion as view_completion,\n view_time_millis as view_time_millis,\n conversion_purchases_value as conversion_purchases_value,\n conversion_purchases as conversion_purchases\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n campaign_id,\n cast (date as timestamp) as date_hour,\n attachment_quartile_1,\n attachment_quartile_2,\n attachment_quartile_3,\n (attachment_total_view_time_millis / 1000000.0) as attachment_total_view_time,\n attachment_view_completion,\n quartile_1,\n quartile_2,\n quartile_3,\n saves,\n shares,\n (screen_time_millis / 1000000.0) as screen_time,\n video_views,\n view_completion,\n (view_time_millis / 1000000.0) as view_time,\n impressions,\n (spend / 1000000.0) as spend,\n swipes,\n coalesce(cast(conversion_purchases_value as float), 0) / 1000000.0 as conversion_purchases_value\n\n \n , coalesce(cast(conversion_purchases as bigint), 0) as conversion_purchases\n \n\n \n\n\n\n\n \n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__ad_squad_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_squad_history_tmp", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/tmp/stg_snapchat_ads__ad_squad_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_snapchat_ads__ad_squad_history_tmp.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_squad_history_tmp", "fqn": ["snapchat_ads", "staging", "tmp", "stg_snapchat_ads__ad_squad_history_tmp"], "alias": "stg_snapchat_ads__ad_squad_history_tmp", "checksum": {"name": "sha256", "checksum": "54b0932b74d1c699e5746185d2e61711e7152ba373883624ca22407e98e1a35d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708216.2362356, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\n{% if var('snapchat_ads_union_schemas', []) | length > 0 or var('snapchat_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_squad_history', \n database_variable='snapchat_ads_database', \n schema_variable='snapchat_ads_schema', \n default_database=target.database,\n default_schema='snapchat_ads',\n default_variable='ad_squad_history',\n union_schema_variable='snapchat_ads_union_schemas',\n union_database_variable='snapchat_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='snapchat_ads_sources',\n single_source_name='snapchat_ads',\n single_table_name='ad_squad_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["snapchat_ads", "ad_squad_history"], ["snapchat_ads", "ad_squad_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.snapchat_ads.snapchat_ads.ad_squad_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/tmp/stg_snapchat_ads__ad_squad_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: snapchat_ads_ad_squad_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: snapchat_ad_squad_history_data\n\n\n select\n \"id\",\n \"campaign_id\",\n \"name\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"snapchat_ad_squad_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_geo_country_daily_report_tmp", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/tmp/stg_snapchat_ads__campaign_geo_country_daily_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_snapchat_ads__campaign_geo_country_daily_report_tmp.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report_tmp", "fqn": ["snapchat_ads", "staging", "tmp", "stg_snapchat_ads__campaign_geo_country_daily_report_tmp"], "alias": "stg_snapchat_ads__campaign_geo_country_daily_report_tmp", "checksum": {"name": "sha256", "checksum": "608b5229228eac4a2fa5bc0fc82d3557312213c024337163b79dab417ca0cd64"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708216.2468636, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_geo_country_daily_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true) and var('snapchat_ads__using_campaign_country_report', false)) }}\n\n{% if var('snapchat_ads_union_schemas', []) | length > 0 or var('snapchat_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_geo_country_daily_report', \n database_variable='snapchat_ads_database', \n schema_variable='snapchat_ads_schema', \n default_database=target.database,\n default_schema='snapchat_ads',\n default_variable='campaign_geo_country_daily_report',\n union_schema_variable='snapchat_ads_union_schemas',\n union_database_variable='snapchat_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='snapchat_ads_sources',\n single_source_name='snapchat_ads',\n single_table_name='campaign_geo_country_daily_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["snapchat_ads", "campaign_geo_country_daily_report"], ["snapchat_ads", "campaign_geo_country_daily_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.snapchat_ads.snapchat_ads.campaign_geo_country_daily_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/tmp/stg_snapchat_ads__campaign_geo_country_daily_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: snapchat_ads_campaign_geo_country_daily_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: snapchat_campaign_geo_country_daily_report_data\n\n\n select\n \"attachment_quartile_1\",\n \"attachment_quartile_2\",\n \"attachment_quartile_3\",\n \"attachment_total_view_time_millis\",\n \"attachment_view_completion\",\n \"campaign_id\",\n \"date\",\n \"country\",\n \"impressions\",\n \"quartile_1\",\n \"quartile_2\",\n \"quartile_3\",\n \"saves\",\n \"screen_time_millis\",\n \"shares\",\n \"spend\",\n \"swipes\",\n \"video_views\",\n \"view_completion\",\n \"view_time_millis\",\n \"conversion_purchases_value\"\n from \"postgres\".\"public\".\"snapchat_campaign_geo_country_daily_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__creative_url_tag_history_tmp", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/tmp/stg_snapchat_ads__creative_url_tag_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_snapchat_ads__creative_url_tag_history_tmp.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history_tmp", "fqn": ["snapchat_ads", "staging", "tmp", "stg_snapchat_ads__creative_url_tag_history_tmp"], "alias": "stg_snapchat_ads__creative_url_tag_history_tmp", "checksum": {"name": "sha256", "checksum": "41030a99c096de1da9b1a4729c54ec1c635597def9bbeb4bd135479347992f91"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708216.2588859, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_url_tag_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\n{% if var('snapchat_ads_union_schemas', []) | length > 0 or var('snapchat_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='creative_url_tag_history', \n database_variable='snapchat_ads_database', \n schema_variable='snapchat_ads_schema', \n default_database=target.database,\n default_schema='snapchat_ads',\n default_variable='creative_url_tag_history',\n union_schema_variable='snapchat_ads_union_schemas',\n union_database_variable='snapchat_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='snapchat_ads_sources',\n single_source_name='snapchat_ads',\n single_table_name='creative_url_tag_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["snapchat_ads", "creative_url_tag_history"], ["snapchat_ads", "creative_url_tag_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.snapchat_ads.snapchat_ads.creative_url_tag_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/tmp/stg_snapchat_ads__creative_url_tag_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: snapchat_ads_creative_url_tag_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: snapchat_creative_url_tag_history_data\n\n\n select\n \"creative_id\",\n \"key\",\n \"value\",\n \"updated_at\"\n from \"postgres\".\"public\".\"snapchat_creative_url_tag_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_squad_hourly_report_tmp", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/tmp/stg_snapchat_ads__ad_squad_hourly_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_snapchat_ads__ad_squad_hourly_report_tmp.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report_tmp", "fqn": ["snapchat_ads", "staging", "tmp", "stg_snapchat_ads__ad_squad_hourly_report_tmp"], "alias": "stg_snapchat_ads__ad_squad_hourly_report_tmp", "checksum": {"name": "sha256", "checksum": "d1ac3ee9201c46aae50d1de1084102f3e4bd6c4a48c97dabc7004f0d94492080"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708216.269518, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_hourly_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\n{% if var('snapchat_ads_union_schemas', []) | length > 0 or var('snapchat_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_squad_hourly_report', \n database_variable='snapchat_ads_database', \n schema_variable='snapchat_ads_schema', \n default_database=target.database,\n default_schema='snapchat_ads',\n default_variable='ad_squad_hourly_report',\n union_schema_variable='snapchat_ads_union_schemas',\n union_database_variable='snapchat_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='snapchat_ads_sources',\n single_source_name='snapchat_ads',\n single_table_name='ad_squad_hourly_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["snapchat_ads", "ad_squad_hourly_report"], ["snapchat_ads", "ad_squad_hourly_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.snapchat_ads.snapchat_ads.ad_squad_hourly_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/tmp/stg_snapchat_ads__ad_squad_hourly_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: snapchat_ads_ad_squad_hourly_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: snapchat_ad_squad_hourly_report_data\n\n\n select\n \"ad_squad_id\",\n \"date\",\n \"_fivetran_synced\",\n \"android_installs\",\n \"attachment_avg_view_time_millis\",\n \"attachment_quartile_1\",\n \"attachment_quartile_2\",\n \"attachment_quartile_3\",\n \"attachment_total_view_time_millis\",\n \"attachment_view_completion\",\n \"avg_screen_time_millis\",\n \"avg_view_time_millis\",\n \"conversion_add_billing\",\n \"conversion_add_cart\",\n \"conversion_app_opens\",\n \"conversion_level_completes\",\n \"conversion_page_views\",\n \"conversion_purchases\",\n \"conversion_purchases_value\",\n \"conversion_save\",\n \"conversion_searches\",\n \"conversion_sign_ups\",\n \"conversion_start_checkout\",\n \"conversion_view_content\",\n \"impressions\",\n \"ios_installs\",\n \"quartile_1\",\n \"quartile_2\",\n \"quartile_3\",\n \"saves\",\n \"screen_time_millis\",\n \"shares\",\n \"spend\",\n \"story_completes\",\n \"story_opens\",\n \"swipe_up_percent\",\n \"swipes\",\n \"total_installs\",\n \"video_views\",\n \"view_completion\",\n \"view_time_millis\"\n from \"postgres\".\"public\".\"snapchat_ad_squad_hourly_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_hourly_report_tmp", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/tmp/stg_snapchat_ads__campaign_hourly_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_snapchat_ads__campaign_hourly_report_tmp.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report_tmp", "fqn": ["snapchat_ads", "staging", "tmp", "stg_snapchat_ads__campaign_hourly_report_tmp"], "alias": "stg_snapchat_ads__campaign_hourly_report_tmp", "checksum": {"name": "sha256", "checksum": "ec10a64c1065d40017856d236999fc154aaf94b1d1ace30feb3371d7150ae3ed"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708216.28036, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_hourly_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\n{% if var('snapchat_ads_union_schemas', []) | length > 0 or var('snapchat_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_hourly_report', \n database_variable='snapchat_ads_database', \n schema_variable='snapchat_ads_schema', \n default_database=target.database,\n default_schema='snapchat_ads',\n default_variable='campaign_hourly_report',\n union_schema_variable='snapchat_ads_union_schemas',\n union_database_variable='snapchat_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='snapchat_ads_sources',\n single_source_name='snapchat_ads',\n single_table_name='campaign_hourly_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["snapchat_ads", "campaign_hourly_report"], ["snapchat_ads", "campaign_hourly_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.snapchat_ads.snapchat_ads.campaign_hourly_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/tmp/stg_snapchat_ads__campaign_hourly_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: snapchat_ads_campaign_hourly_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: snapchat_campaign_hourly_report_data\n\n\n select\n \"campaign_id\",\n \"date\",\n \"_fivetran_synced\",\n \"android_installs\",\n \"attachment_avg_view_time_millis\",\n \"attachment_quartile_1\",\n \"attachment_quartile_2\",\n \"attachment_quartile_3\",\n \"attachment_total_view_time_millis\",\n \"attachment_view_completion\",\n \"avg_screen_time_millis\",\n \"avg_view_time_millis\",\n \"conversion_add_billing\",\n \"conversion_add_cart\",\n \"conversion_app_opens\",\n \"conversion_level_completes\",\n \"conversion_page_views\",\n \"conversion_purchases\",\n \"conversion_purchases_value\",\n \"conversion_save\",\n \"conversion_searches\",\n \"conversion_sign_ups\",\n \"conversion_start_checkout\",\n \"conversion_view_content\",\n \"impressions\",\n \"ios_installs\",\n \"quartile_1\",\n \"quartile_2\",\n \"quartile_3\",\n \"saves\",\n \"screen_time_millis\",\n \"shares\",\n \"spend\",\n \"story_completes\",\n \"story_opens\",\n \"swipe_up_percent\",\n \"swipes\",\n \"total_installs\",\n \"video_views\",\n \"view_completion\",\n \"view_time_millis\"\n from \"postgres\".\"public\".\"snapchat_campaign_hourly_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__campaign_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_history_tmp", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/tmp/stg_snapchat_ads__campaign_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_snapchat_ads__campaign_history_tmp.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_history_tmp", "fqn": ["snapchat_ads", "staging", "tmp", "stg_snapchat_ads__campaign_history_tmp"], "alias": "stg_snapchat_ads__campaign_history_tmp", "checksum": {"name": "sha256", "checksum": "fde4a5d27c343283dcdb8e9f0b525168c722bede41de09291c66e475a82df440"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708216.2920773, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\n{% if var('snapchat_ads_union_schemas', []) | length > 0 or var('snapchat_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_history', \n database_variable='snapchat_ads_database', \n schema_variable='snapchat_ads_schema', \n default_database=target.database,\n default_schema='snapchat_ads',\n default_variable='campaign_history',\n union_schema_variable='snapchat_ads_union_schemas',\n union_database_variable='snapchat_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='snapchat_ads_sources',\n single_source_name='snapchat_ads',\n single_table_name='campaign_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["snapchat_ads", "campaign_history"], ["snapchat_ads", "campaign_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.snapchat_ads.snapchat_ads.campaign_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/tmp/stg_snapchat_ads__campaign_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: snapchat_ads_campaign_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: snapchat_campaign_history_data\n\n\n select\n \"id\",\n \"ad_account_id\",\n \"name\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"snapchat_campaign_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__ad_account_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_account_history_tmp", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/tmp/stg_snapchat_ads__ad_account_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_snapchat_ads__ad_account_history_tmp.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_account_history_tmp", "fqn": ["snapchat_ads", "staging", "tmp", "stg_snapchat_ads__ad_account_history_tmp"], "alias": "stg_snapchat_ads__ad_account_history_tmp", "checksum": {"name": "sha256", "checksum": "38eea03e72a7827e1f896c0ae0bc19bd391ced072c647ea35d2bcf5d3672d33a"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708216.3028393, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_account_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\n{% if var('snapchat_ads_union_schemas', []) | length > 0 or var('snapchat_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_account_history', \n database_variable='snapchat_ads_database', \n schema_variable='snapchat_ads_schema', \n default_database=target.database,\n default_schema='snapchat_ads',\n default_variable='ad_account_history',\n union_schema_variable='snapchat_ads_union_schemas',\n union_database_variable='snapchat_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='snapchat_ads_sources',\n single_source_name='snapchat_ads',\n single_table_name='ad_account_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["snapchat_ads", "ad_account_history"], ["snapchat_ads", "ad_account_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.snapchat_ads.snapchat_ads.ad_account_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/tmp/stg_snapchat_ads__ad_account_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: snapchat_ads_ad_account_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: snapchat_ad_account_history_data\n\n\n select\n \"id\",\n \"name\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"snapchat_ad_account_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__ad_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_history_tmp", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/tmp/stg_snapchat_ads__ad_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_snapchat_ads__ad_history_tmp.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_history_tmp", "fqn": ["snapchat_ads", "staging", "tmp", "stg_snapchat_ads__ad_history_tmp"], "alias": "stg_snapchat_ads__ad_history_tmp", "checksum": {"name": "sha256", "checksum": "33440d5eea972c3f4b5cc4557b382c9fee64ac31e7d1398909845d491a738146"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708216.3134968, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\n{% if var('snapchat_ads_union_schemas', []) | length > 0 or var('snapchat_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_history', \n database_variable='snapchat_ads_database', \n schema_variable='snapchat_ads_schema', \n default_database=target.database,\n default_schema='snapchat_ads',\n default_variable='ad_history',\n union_schema_variable='snapchat_ads_union_schemas',\n union_database_variable='snapchat_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='snapchat_ads_sources',\n single_source_name='snapchat_ads',\n single_table_name='ad_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["snapchat_ads", "ad_history"], ["snapchat_ads", "ad_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.snapchat_ads.snapchat_ads.ad_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/tmp/stg_snapchat_ads__ad_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: snapchat_ads_ad_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: snapchat_ad_history_data\n\n\n select\n \"id\",\n \"ad_squad_id\",\n \"creative_id\",\n \"name\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"snapchat_ad_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__campaign_geo_region_daily_report_tmp", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/tmp/stg_snapchat_ads__campaign_geo_region_daily_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_snapchat_ads__campaign_geo_region_daily_report_tmp.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report_tmp", "fqn": ["snapchat_ads", "staging", "tmp", "stg_snapchat_ads__campaign_geo_region_daily_report_tmp"], "alias": "stg_snapchat_ads__campaign_geo_region_daily_report_tmp", "checksum": {"name": "sha256", "checksum": "bb014a0eba007300d8b97000bc5d98a9cde027bc30dd2ae48887e5dae5345741"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708216.325272, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_geo_region_daily_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true) and var('snapchat_ads__using_campaign_region_report', false)) }}\n\n{% if var('snapchat_ads_union_schemas', []) | length > 0 or var('snapchat_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_geo_region_daily_report', \n database_variable='snapchat_ads_database', \n schema_variable='snapchat_ads_schema', \n default_database=target.database,\n default_schema='snapchat_ads',\n default_variable='campaign_geo_region_daily_report',\n union_schema_variable='snapchat_ads_union_schemas',\n union_database_variable='snapchat_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='snapchat_ads_sources',\n single_source_name='snapchat_ads',\n single_table_name='campaign_geo_region_daily_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["snapchat_ads", "campaign_geo_region_daily_report"], ["snapchat_ads", "campaign_geo_region_daily_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.snapchat_ads.snapchat_ads.campaign_geo_region_daily_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/tmp/stg_snapchat_ads__campaign_geo_region_daily_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: snapchat_ads_campaign_geo_region_daily_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: snapchat_campaign_geo_region_daily_report_data\n\n\n select\n \"attachment_quartile_1\",\n \"attachment_quartile_2\",\n \"attachment_quartile_3\",\n \"attachment_total_view_time_millis\",\n \"attachment_view_completion\",\n \"campaign_id\",\n \"date\",\n \"region\",\n \"impressions\",\n \"quartile_1\",\n \"quartile_2\",\n \"quartile_3\",\n \"saves\",\n \"screen_time_millis\",\n \"shares\",\n \"spend\",\n \"swipes\",\n \"video_views\",\n \"view_completion\",\n \"view_time_millis\",\n \"conversion_purchases_value\"\n from \"postgres\".\"public\".\"snapchat_campaign_geo_region_daily_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__ad_hourly_report_tmp", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/tmp/stg_snapchat_ads__ad_hourly_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_snapchat_ads__ad_hourly_report_tmp.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report_tmp", "fqn": ["snapchat_ads", "staging", "tmp", "stg_snapchat_ads__ad_hourly_report_tmp"], "alias": "stg_snapchat_ads__ad_hourly_report_tmp", "checksum": {"name": "sha256", "checksum": "f637119610c052498df954e8501ab0e205ba3c268d905116944008830f5ca9d3"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708216.33633, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_hourly_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\n{% if var('snapchat_ads_union_schemas', []) | length > 0 or var('snapchat_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_hourly_report', \n database_variable='snapchat_ads_database', \n schema_variable='snapchat_ads_schema', \n default_database=target.database,\n default_schema='snapchat_ads',\n default_variable='ad_hourly_report',\n union_schema_variable='snapchat_ads_union_schemas',\n union_database_variable='snapchat_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='snapchat_ads_sources',\n single_source_name='snapchat_ads',\n single_table_name='ad_hourly_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["snapchat_ads", "ad_hourly_report"], ["snapchat_ads", "ad_hourly_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.snapchat_ads.snapchat_ads.ad_hourly_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/tmp/stg_snapchat_ads__ad_hourly_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: snapchat_ads_ad_hourly_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: snapchat_ad_hourly_report_data\n\n\n select\n \"ad_id\",\n \"date\",\n \"impressions\",\n \"spend\",\n \"swipes\",\n \"conversion_purchases_value\",\n \"conversion_add_billing\",\n \"conversion_add_cart\",\n \"conversion_app_opens\",\n \"conversion_level_completes\",\n \"conversion_page_views\",\n \"conversion_purchases\",\n \"conversion_save\",\n \"conversion_searches\",\n \"conversion_sign_ups\",\n \"conversion_start_checkout\",\n \"conversion_view_content\"\n from \"postgres\".\"public\".\"snapchat_ad_hourly_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.stg_snapchat_ads__creative_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_snapchat_ads__creative_history_tmp", "resource_type": "model", "package_name": "snapchat_ads", "path": "staging/tmp/stg_snapchat_ads__creative_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_snapchat_ads__creative_history_tmp.sql", "unique_id": "model.snapchat_ads.stg_snapchat_ads__creative_history_tmp", "fqn": ["snapchat_ads", "staging", "tmp", "stg_snapchat_ads__creative_history_tmp"], "alias": "stg_snapchat_ads__creative_history_tmp", "checksum": {"name": "sha256", "checksum": "df237d994c73b14ddcc6e5dfbe0244962ab53508d64c908f8b1b12b92ab5948b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708216.346935, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\n\n{% if var('snapchat_ads_union_schemas', []) | length > 0 or var('snapchat_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='creative_history', \n database_variable='snapchat_ads_database', \n schema_variable='snapchat_ads_schema', \n default_database=target.database,\n default_schema='snapchat_ads',\n default_variable='creative_history',\n union_schema_variable='snapchat_ads_union_schemas',\n union_database_variable='snapchat_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='snapchat_ads_sources',\n single_source_name='snapchat_ads',\n single_table_name='creative_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["snapchat_ads", "creative_history"], ["snapchat_ads", "creative_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.snapchat_ads.snapchat_ads.creative_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/tmp/stg_snapchat_ads__creative_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: snapchat_ads_creative_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: snapchat_creative_history_data\n\n\n select\n \"id\",\n \"ad_account_id\",\n \"name\",\n \"web_view_url\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"snapchat_creative_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.snapchat_ads.snapchat_ads__creative_history_prep": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "snapchat_ads__creative_history_prep", "resource_type": "model", "package_name": "snapchat_ads", "path": "intermediate/snapchat_ads__creative_history_prep.sql", "original_file_path": "models/intermediate/snapchat_ads__creative_history_prep.sql", "unique_id": "model.snapchat_ads.snapchat_ads__creative_history_prep", "fqn": ["snapchat_ads", "intermediate", "snapchat_ads__creative_history_prep"], "alias": "snapchat_ads__creative_history_prep", "checksum": {"name": "sha256", "checksum": "7d2d2fff48586c7db57b1f6e43c8b207aaef5356a7820ad3b0f9d6fad0cda94d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "ephemeral", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708216.3576348, "relation_name": null, "raw_code": "{{ config(enabled=var('ad_reporting__snapchat_ads_enabled', true)) }}\nwith base as (\n\n select *\n from {{ ref('stg_snapchat_ads__creative_history') }}\n where is_most_recent_record = true\n\n), url_tags as (\n\n select *\n from {{ ref('stg_snapchat_ads__creative_url_tag_history') }}\n where is_most_recent_record = true\n\n), url_tags_pivoted as (\n\n select \n source_relation,\n creative_id,\n min(case when param_key = 'utm_source' then param_value end) as utm_source,\n min(case when param_key = 'utm_medium' then param_value end) as utm_medium,\n min(case when param_key = 'utm_campaign' then param_value end) as utm_campaign,\n min(case when param_key = 'utm_content' then param_value end) as utm_content,\n min(case when param_key = 'utm_term' then param_value end) as utm_term\n from url_tags\n group by 1,2\n\n), fields as (\n\n select\n base.source_relation,\n base.creative_id,\n base.ad_account_id,\n base.creative_name,\n base.url,\n {{ dbt.split_part('base.url', \"'?'\", 1) }} as base_url,\n {{ dbt_utils.get_url_host('base.url') }} as url_host,\n '/' || {{ dbt_utils.get_url_path('base.url') }} as url_path,\n coalesce(url_tags_pivoted.utm_source, {{ snapchat_ads.snapchat_ads_extract_url_parameter('base.url', 'utm_source') }}) as utm_source,\n coalesce(url_tags_pivoted.utm_medium, {{ snapchat_ads.snapchat_ads_extract_url_parameter('base.url', 'utm_medium') }}) as utm_medium,\n coalesce(url_tags_pivoted.utm_campaign, {{ snapchat_ads.snapchat_ads_extract_url_parameter('base.url', 'utm_campaign') }}) as utm_campaign,\n coalesce(url_tags_pivoted.utm_content, {{ snapchat_ads.snapchat_ads_extract_url_parameter('base.url', 'utm_content') }}) as utm_content,\n coalesce(url_tags_pivoted.utm_term, {{ snapchat_ads.snapchat_ads_extract_url_parameter('base.url', 'utm_term') }}) as utm_term\n from base\n left join url_tags_pivoted\n on base.creative_id = url_tags_pivoted.creative_id\n and base.source_relation = url_tags_pivoted.source_relation\n\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__creative_history", "package": null, "version": null}, {"name": "stg_snapchat_ads__creative_url_tag_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.split_part", "macro.dbt_utils.get_url_host", "macro.dbt_utils.get_url_path", "macro.snapchat_ads.snapchat_ads_extract_url_parameter"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__creative_history", "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/intermediate/snapchat_ads__creative_history_prep.sql", "compiled": true, "compiled_code": "\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_history\"\n where is_most_recent_record = true\n\n), url_tags as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_url_tag_history\"\n where is_most_recent_record = true\n\n), url_tags_pivoted as (\n\n select \n source_relation,\n creative_id,\n min(case when param_key = 'utm_source' then param_value end) as utm_source,\n min(case when param_key = 'utm_medium' then param_value end) as utm_medium,\n min(case when param_key = 'utm_campaign' then param_value end) as utm_campaign,\n min(case when param_key = 'utm_content' then param_value end) as utm_content,\n min(case when param_key = 'utm_term' then param_value end) as utm_term\n from url_tags\n group by 1,2\n\n), fields as (\n\n select\n base.source_relation,\n base.creative_id,\n base.ad_account_id,\n base.creative_name,\n base.url,\n \n\n \n \n\n split_part(\n base.url,\n '?',\n 1\n )\n\n\n \n\n as base_url,\n \n \n cast(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n \n\n replace(\n \n\n replace(\n \n\n replace(\n base.url,\n 'android-app://',\n ''\n )\n\n\n,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n '/',\n 1\n )\n\n\n \n\n,\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_host,\n '/' || \n \n cast(\n\n \n \n\n split_part(\n \n\n right(\n \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n \n\n length(\n \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n )-coalesce(\n nullif(\n\n position(\n '/' in \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ), 0),\n \n\n position(\n '?' in \n\n replace(\n \n\n replace(\n base.url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ) - 1\n )\n ),\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_path,\n coalesce(url_tags_pivoted.utm_source, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_source=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_source,\n coalesce(url_tags_pivoted.utm_medium, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_medium=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_medium,\n coalesce(url_tags_pivoted.utm_campaign, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_campaign=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_campaign,\n coalesce(url_tags_pivoted.utm_content, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_content=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_content,\n coalesce(url_tags_pivoted.utm_term, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n base.url,\n 'utm_term=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_term\n from base\n left join url_tags_pivoted\n on base.creative_id = url_tags_pivoted.creative_id\n and base.source_relation = url_tags_pivoted.source_relation\n\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.pinterest_ads__campaign_region_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__campaign_region_report", "resource_type": "model", "package_name": "pinterest", "path": "pinterest_ads__campaign_region_report.sql", "original_file_path": "models/pinterest_ads__campaign_region_report.sql", "unique_id": "model.pinterest.pinterest_ads__campaign_region_report", "fqn": ["pinterest", "pinterest_ads__campaign_region_report"], "alias": "pinterest_ads__campaign_region_report", "checksum": {"name": "sha256", "checksum": "df55196c067952e5517730f33aad71281efb54cc5414701e95eac08f2d803bbd"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the region and campaign level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "date_day": {"name": "date_day", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "country_id": {"name": "country_id", "description": "The ID of the targeted country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.country_id"]}, "country_name": {"name": "country_name", "description": "Name of the targeted country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "region_id": {"name": "region_id", "description": "The ID of the targeted region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.region_id"]}, "region_name": {"name": "region_name", "description": "Name of the targeted region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "Status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "advertiser_name": {"name": "advertiser_name", "description": "Name of the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_created_at": {"name": "campaign_created_at", "description": "Campaign creation time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_start_time": {"name": "campaign_start_time", "description": "Timestamp when the campaign became active or was scheduled to start.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_end_time": {"name": "campaign_end_time", "description": "Timestamp when the campaign ended or is scheduled to end.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_spend_cap": {"name": "budget_spend_cap", "description": "Maximum amount allowed to be spent over a specified budget period for the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lifetime_spend_cap": {"name": "lifetime_spend_cap", "description": "Total maximum spend allowed across the entire lifespan of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_objective_type": {"name": "campaign_objective_type", "description": "The primary goal of the campaign (e.g., brand awareness, conversions, video views).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "default_ad_group_budget_in_micro_currency": {"name": "default_ad_group_budget_in_micro_currency", "description": "When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_campaign_budget_optimization": {"name": "is_campaign_budget_optimization", "description": "Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_flexible_daily_budgets": {"name": "is_flexible_daily_budgets", "description": "Determine if a campaign has flexible daily budgets setup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of paid and earned impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impressions"]}, "clicks": {"name": "clicks", "description": "The number of paid and earned clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clicks"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value": {"name": "total_conversions_value", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/pinterest.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.6135488, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_region_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__pinterest_ads_enabled','pinterest__using_pin_promotion_targeting_report', 'pinterest__using_targeting_geo_region'])) }}\n\nwith report as (\n select *\n from {{ ref('stg_pinterest_ads__pin_promotion_targeting_report') }}\n where lower(targeting_type) = 'region'\n),\n\nregions as (\n select *\n from {{ ref('stg_pinterest_ads__targeting_geo_region') }}\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_pinterest_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\nadvertisers as (\n select *\n from {{ ref('stg_pinterest_ads__advertiser_history') }}\n where is_most_recent_record = True\n),\n\n{% set using_targeting_geo = var('pinterest__using_targeting_geo', true) %}\n{% if using_targeting_geo %}\ncountries as (\n select *\n from {{ ref('stg_pinterest_ads__targeting_geo') }}\n),\n{% endif %}\n\nfields as (\n\n select\n report.source_relation,\n report.date_day,\n regions.region_name,\n regions.region_id,\n report.campaign_id,\n regions.country_id,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n {{ pinterest_ads_persist_pass_through_columns(pass_through_variable='pinterest__pin_promotion_targeting_report_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0) }}\n\n from report\n left join regions\n on report.targeting_value = regions.region_id\n and report.source_relation = regions.source_relation\n\n {{ dbt_utils.group_by(6) }}\n\n),\n\nfinal as (\n select\n fields.*,\n {{ 'countries.country_name,' if using_targeting_geo }}\n advertisers.advertiser_name,\n advertisers.advertiser_id,\n campaigns.campaign_name,\n campaigns.campaign_status,\n campaigns.budget_spend_cap,\n campaigns.lifetime_spend_cap,\n campaigns.created_at as campaign_created_at,\n campaigns.default_ad_group_budget_in_micro_currency,\n campaigns.end_time as campaign_end_time,\n campaigns.is_campaign_budget_optimization,\n campaigns.is_flexible_daily_budgets,\n campaigns.objective_type as campaign_objective_type,\n campaigns.start_time as campaign_start_time\n from fields\n left join campaigns\n on fields.campaign_id = campaigns.campaign_id\n and fields.source_relation = campaigns.source_relation\n left join advertisers\n on campaigns.advertiser_id = advertisers.advertiser_id\n and campaigns.source_relation = advertisers.source_relation\n\n {% if using_targeting_geo %}\n left join countries\n on fields.country_id = countries.country_id\n and fields.source_relation = countries.source_relation\n {% endif %}\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__pin_promotion_targeting_report", "package": null, "version": null}, {"name": "stg_pinterest_ads__targeting_geo_region", "package": null, "version": null}, {"name": "stg_pinterest_ads__campaign_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__advertiser_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__targeting_geo", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.pinterest.pinterest_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report", "model.pinterest.stg_pinterest_ads__targeting_geo_region", "model.pinterest.stg_pinterest_ads__campaign_history", "model.pinterest.stg_pinterest_ads__advertiser_history", "model.pinterest.stg_pinterest_ads__targeting_geo"]}, "compiled_path": "target/compiled/pinterest/models/pinterest_ads__campaign_region_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_targeting_report\"\n where lower(targeting_type) = 'region'\n),\n\nregions as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__targeting_geo_region\"\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\nadvertisers as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_history\"\n where is_most_recent_record = True\n),\n\n\n\ncountries as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__targeting_geo\"\n),\n\n\nfields as (\n\n select\n report.source_relation,\n report.date_day,\n regions.region_name,\n regions.region_id,\n report.campaign_id,\n regions.country_id,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n \n\n\n\n\n\n from report\n left join regions\n on report.targeting_value = regions.region_id\n and report.source_relation = regions.source_relation\n\n group by 1,2,3,4,5,6\n\n),\n\nfinal as (\n select\n fields.*,\n countries.country_name,\n advertisers.advertiser_name,\n advertisers.advertiser_id,\n campaigns.campaign_name,\n campaigns.campaign_status,\n campaigns.budget_spend_cap,\n campaigns.lifetime_spend_cap,\n campaigns.created_at as campaign_created_at,\n campaigns.default_ad_group_budget_in_micro_currency,\n campaigns.end_time as campaign_end_time,\n campaigns.is_campaign_budget_optimization,\n campaigns.is_flexible_daily_budgets,\n campaigns.objective_type as campaign_objective_type,\n campaigns.start_time as campaign_start_time\n from fields\n left join campaigns\n on fields.campaign_id = campaigns.campaign_id\n and fields.source_relation = campaigns.source_relation\n left join advertisers\n on campaigns.advertiser_id = advertisers.advertiser_id\n and campaigns.source_relation = advertisers.source_relation\n\n \n left join countries\n on fields.country_id = countries.country_id\n and fields.source_relation = countries.source_relation\n \n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.pinterest_ads__keyword_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__keyword_report", "resource_type": "model", "package_name": "pinterest", "path": "pinterest_ads__keyword_report.sql", "original_file_path": "models/pinterest_ads__keyword_report.sql", "unique_id": "model.pinterest.pinterest_ads__keyword_report", "fqn": ["pinterest", "pinterest_ads__keyword_report"], "alias": "pinterest_ads__keyword_report", "checksum": {"name": "sha256", "checksum": "0f46d4d8fdbc15ac8d1aa57d53d43e724c966d5024ee99c3f747a6f0e92e6471"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of a keyword at the advertiser, campaign, ad group, and keyword level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "date_day": {"name": "date_day", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "advertiser_name": {"name": "advertiser_name", "description": "Name of the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "campaign_name": {"name": "campaign_name", "description": "Name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "Name of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "keyword_id": {"name": "keyword_id", "description": "Unique identifier of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "match_type": {"name": "match_type", "description": "Type of match the keyword is tied to. Either Exact or Broad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "parent_type": {"name": "parent_type", "description": "Identifier of what grain the parent type is. Ad group or campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_value": {"name": "keyword_value", "description": "The text value that makes upd the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend"]}, "clicks": {"name": "clicks", "description": "The number of paid and earned clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clicks"]}, "impressions": {"name": "impressions", "description": "The number of paid and earned impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impressions"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value": {"name": "total_conversions_value", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/pinterest.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.6018066, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__keyword_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__pinterest_ads_enabled','pinterest__using_keywords'])) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_pinterest_ads__keyword_report') }}\n), \n\nadvertisers as (\n\n select *\n from {{ ref('stg_pinterest_ads__advertiser_history') }}\n where is_most_recent_record = True\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_pinterest_ads__campaign_history') }}\n where is_most_recent_record = True\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_pinterest_ads__ad_group_history') }}\n where is_most_recent_record = True\n), \n\nkeywords as (\n\n select *\n from {{ ref('stg_pinterest_ads__keyword_history') }}\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n report.source_relation,\n report.date_day,\n advertisers.advertiser_name,\n advertisers.advertiser_id,\n campaigns.campaign_name,\n campaigns.campaign_id,\n ad_groups.ad_group_name,\n ad_groups.ad_group_id,\n report.keyword_id,\n keywords.match_type,\n keywords.parent_type,\n keywords.keyword_value,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n {{ pinterest_ads_persist_pass_through_columns(pass_through_variable='pinterest__keyword_report_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0, exclude_fields=['total_conversions','total_conversions_quantity','total_conversions_value']) }}\n\n from report\n left join keywords\n on report.keyword_id = keywords.keyword_id\n and report.source_relation = keywords.source_relation\n left join ad_groups\n on keywords.ad_group_id = ad_groups.ad_group_id\n and keywords.source_relation = ad_groups.source_relation\n left join campaigns\n on ad_groups.campaign_id = campaigns.campaign_id\n and ad_groups.source_relation = campaigns.source_relation\n left join advertisers\n on campaigns.advertiser_id = advertisers.advertiser_id\n and campaigns.source_relation = advertisers.source_relation\n {{ dbt_utils.group_by(12) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__keyword_report", "package": null, "version": null}, {"name": "stg_pinterest_ads__advertiser_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__campaign_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__keyword_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.pinterest.pinterest_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.pinterest.stg_pinterest_ads__keyword_report", "model.pinterest.stg_pinterest_ads__advertiser_history", "model.pinterest.stg_pinterest_ads__campaign_history", "model.pinterest.stg_pinterest_ads__ad_group_history", "model.pinterest.stg_pinterest_ads__keyword_history"]}, "compiled_path": "target/compiled/pinterest/models/pinterest_ads__keyword_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__keyword_report\"\n), \n\nadvertisers as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_history\"\n where is_most_recent_record = True\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_history\"\n where is_most_recent_record = True\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\nkeywords as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__keyword_history\"\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n report.source_relation,\n report.date_day,\n advertisers.advertiser_name,\n advertisers.advertiser_id,\n campaigns.campaign_name,\n campaigns.campaign_id,\n ad_groups.ad_group_name,\n ad_groups.ad_group_id,\n report.keyword_id,\n keywords.match_type,\n keywords.parent_type,\n keywords.keyword_value,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n \n\n\n\n\n\n from report\n left join keywords\n on report.keyword_id = keywords.keyword_id\n and report.source_relation = keywords.source_relation\n left join ad_groups\n on keywords.ad_group_id = ad_groups.ad_group_id\n and keywords.source_relation = ad_groups.source_relation\n left join campaigns\n on ad_groups.campaign_id = campaigns.campaign_id\n and ad_groups.source_relation = campaigns.source_relation\n left join advertisers\n on campaigns.advertiser_id = advertisers.advertiser_id\n and campaigns.source_relation = advertisers.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.pinterest_ads__advertiser_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__advertiser_report", "resource_type": "model", "package_name": "pinterest", "path": "pinterest_ads__advertiser_report.sql", "original_file_path": "models/pinterest_ads__advertiser_report.sql", "unique_id": "model.pinterest.pinterest_ads__advertiser_report", "fqn": ["pinterest", "pinterest_ads__advertiser_report"], "alias": "pinterest_ads__advertiser_report", "checksum": {"name": "sha256", "checksum": "760cc4e0bdd8d9482a50666721061d52ab49949e99e0417d874adff43694f960"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of an advertiser on the Pinterest Ads platform.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "date_day": {"name": "date_day", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "advertiser_name": {"name": "advertiser_name", "description": "Name of the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "currency_code": {"name": "currency_code", "description": "The currency code which the advertiser is set up using.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country": {"name": "country", "description": "The country code where the advertiser is located.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend"]}, "clicks": {"name": "clicks", "description": "The number of paid and earned clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clicks"]}, "impressions": {"name": "impressions", "description": "The number of paid and earned impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impressions"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value": {"name": "total_conversions_value", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/pinterest.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.599743, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__advertiser_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_pinterest_ads__advertiser_report') }}\n), \n\nadvertisers as (\n\n select *\n from {{ ref('stg_pinterest_ads__advertiser_history') }}\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n report.source_relation,\n report.date_day,\n advertisers.advertiser_name,\n report.advertiser_id,\n advertisers.currency_code,\n advertisers.country,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n {{ pinterest_ads_persist_pass_through_columns(pass_through_variable='pinterest__advertiser_report_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0, exclude_fields=['total_conversions','total_conversions_quantity','total_conversions_value']) }}\n\n from report\n left join advertisers\n on cast(report.advertiser_id as {{ dbt.type_string() }}) = cast(advertisers.advertiser_id as {{ dbt.type_string() }})\n and report.source_relation = advertisers.source_relation\n {{ dbt_utils.group_by(6) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__advertiser_report", "package": null, "version": null}, {"name": "stg_pinterest_ads__advertiser_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.pinterest.pinterest_ads_persist_pass_through_columns", "macro.dbt.type_string", "macro.dbt_utils.group_by"], "nodes": ["model.pinterest.stg_pinterest_ads__advertiser_report", "model.pinterest.stg_pinterest_ads__advertiser_history"]}, "compiled_path": "target/compiled/pinterest/models/pinterest_ads__advertiser_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_report\"\n), \n\nadvertisers as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_history\"\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n report.source_relation,\n report.date_day,\n advertisers.advertiser_name,\n report.advertiser_id,\n advertisers.currency_code,\n advertisers.country,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n \n\n\n\n\n\n from report\n left join advertisers\n on cast(report.advertiser_id as TEXT) = cast(advertisers.advertiser_id as TEXT)\n and report.source_relation = advertisers.source_relation\n group by 1,2,3,4,5,6\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.pinterest_ads__url_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__url_report", "resource_type": "model", "package_name": "pinterest", "path": "pinterest_ads__url_report.sql", "original_file_path": "models/pinterest_ads__url_report.sql", "unique_id": "model.pinterest.pinterest_ads__url_report", "fqn": ["pinterest", "pinterest_ads__url_report"], "alias": "pinterest_ads__url_report", "checksum": {"name": "sha256", "checksum": "73f2fb65808d3d2f71b6532bfd5b44ed36d2eb757d5a9e2db13de677dfd253f8"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the advertiser, campaign, ad group, and url level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "date_day": {"name": "date_day", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "advertiser_name": {"name": "advertiser_name", "description": "Name of the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "Status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_status": {"name": "ad_group_status", "description": "Status of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "destination_url": {"name": "destination_url", "description": "Pin destination URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pin_promotion_id": {"name": "pin_promotion_id", "description": "The ID of the related Pin promotion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.pin_promotion_id"]}, "pin_name": {"name": "pin_name", "description": "Pin promotion name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pin_status": {"name": "pin_status", "description": "The status of the Pin promotion. One of \"ACTIVE\", \"ARCHIVED\", \"PAUSED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_type": {"name": "creative_type", "description": "The creative type. \nOne of \"APP\", \"APP_VIDEO\", \"BOARD\", \"CAROUSEL\", \"CINEMATIC\", \"COMMERCE\", \"MAX_VIDEO\", \"NATIVE_VIDEO\", \"REGULAR\", \n\"SEARCH_PROMINENCE\", \"SEARCH_PROMINENCE_CAROUSEL\", \"SHOPPING\", \"SHOP_THE_PIN\", \"THIRD_PARTY\", or \"VIDEO\".\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_host": {"name": "url_host", "description": "The URL host of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_path": {"name": "url_path", "description": "The URL path of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_source": {"name": "utm_source", "description": "The utm_source parameter of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_medium": {"name": "utm_medium", "description": "The utm_medium parameter of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_campaign": {"name": "utm_campaign", "description": "The utm_campaign parameter of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_content": {"name": "utm_content", "description": "The utm_content parameter of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_term": {"name": "utm_term", "description": "The utm_term parameter of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of paid and earned impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impressions"]}, "clicks": {"name": "clicks", "description": "The number of paid and earned clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clicks"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value": {"name": "total_conversions_value", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/pinterest.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.5954742, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__url_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_pinterest_ads__pin_promotion_report') }}\n), \n\npins as (\n\n select *\n from {{ ref('stg_pinterest_ads__pin_promotion_history') }}\n where is_most_recent_record = True\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_pinterest_ads__ad_group_history') }}\n where is_most_recent_record = True\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_pinterest_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\nadvertisers as (\n\n select *\n from {{ ref('stg_pinterest_ads__advertiser_history') }}\n where is_most_recent_record = True\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n campaigns.advertiser_id,\n advertisers.advertiser_name,\n report.campaign_id,\n campaigns.campaign_name,\n campaigns.campaign_status,\n report.ad_group_id,\n ad_groups.ad_group_name,\n ad_groups.ad_group_status,\n pins.destination_url,\n pins.creative_type,\n report.pin_promotion_id,\n pins.pin_name,\n pins.pin_status,\n pins.base_url,\n pins.url_host,\n pins.url_path,\n pins.utm_source,\n pins.utm_medium,\n pins.utm_campaign,\n pins.utm_content,\n pins.utm_term,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n {{ pinterest_ads_persist_pass_through_columns(pass_through_variable='pinterest__pin_promotion_report_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0, exclude_fields=['total_conversions','total_conversions_quantity','total_conversions_value']) }}\n\n from report \n left join pins \n on report.pin_promotion_id = pins.pin_promotion_id\n and report.source_relation = pins.source_relation\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join campaigns \n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join advertisers\n on campaigns.advertiser_id = advertisers.advertiser_id\n and campaigns.source_relation = advertisers.source_relation\n\n {% if var('ad_reporting__url_report__using_null_filter', True) %}\n where pins.destination_url is not null\n {% endif %}\n\n {{ dbt_utils.group_by(23) }}\n)\n\nselect * \nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__pin_promotion_report", "package": null, "version": null}, {"name": "stg_pinterest_ads__pin_promotion_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__campaign_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__advertiser_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.pinterest.pinterest_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.pinterest.stg_pinterest_ads__pin_promotion_report", "model.pinterest.stg_pinterest_ads__pin_promotion_history", "model.pinterest.stg_pinterest_ads__ad_group_history", "model.pinterest.stg_pinterest_ads__campaign_history", "model.pinterest.stg_pinterest_ads__advertiser_history"]}, "compiled_path": "target/compiled/pinterest/models/pinterest_ads__url_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_report\"\n), \n\npins as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_history\"\n where is_most_recent_record = True\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\nadvertisers as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_history\"\n where is_most_recent_record = True\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n campaigns.advertiser_id,\n advertisers.advertiser_name,\n report.campaign_id,\n campaigns.campaign_name,\n campaigns.campaign_status,\n report.ad_group_id,\n ad_groups.ad_group_name,\n ad_groups.ad_group_status,\n pins.destination_url,\n pins.creative_type,\n report.pin_promotion_id,\n pins.pin_name,\n pins.pin_status,\n pins.base_url,\n pins.url_host,\n pins.url_path,\n pins.utm_source,\n pins.utm_medium,\n pins.utm_campaign,\n pins.utm_content,\n pins.utm_term,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n \n\n\n\n\n\n from report \n left join pins \n on report.pin_promotion_id = pins.pin_promotion_id\n and report.source_relation = pins.source_relation\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join campaigns \n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join advertisers\n on campaigns.advertiser_id = advertisers.advertiser_id\n and campaigns.source_relation = advertisers.source_relation\n\n \n where pins.destination_url is not null\n \n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23\n)\n\nselect * \nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.pinterest_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__campaign_report", "resource_type": "model", "package_name": "pinterest", "path": "pinterest_ads__campaign_report.sql", "original_file_path": "models/pinterest_ads__campaign_report.sql", "unique_id": "model.pinterest.pinterest_ads__campaign_report", "fqn": ["pinterest", "pinterest_ads__campaign_report"], "alias": "pinterest_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "eb0e3fc0893458e6bd25c059bb5b5e852bbec7dccc62b4b756f04c6f774521f4"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the advertiser and campaign level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "date_day": {"name": "date_day", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "advertiser_name": {"name": "advertiser_name", "description": "Name of the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "Status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of paid and earned impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impressions"]}, "clicks": {"name": "clicks", "description": "The number of paid and earned clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clicks"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value": {"name": "total_conversions_value", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/pinterest.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.598212, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\nwith report as (\n select *\n from {{ ref('stg_pinterest_ads__campaign_report') }}\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_pinterest_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\nadvertisers as (\n select *\n from {{ ref('stg_pinterest_ads__advertiser_history') }}\n where is_most_recent_record = True\n),\n\nfields as (\n\n select\n report.source_relation,\n report.date_day,\n advertisers.advertiser_name,\n advertisers.advertiser_id,\n campaigns.campaign_name,\n report.campaign_id,\n campaigns.campaign_status,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n {{ pinterest_ads_persist_pass_through_columns(pass_through_variable='pinterest__campaign_report_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0, exclude_fields=['total_conversions','total_conversions_quantity','total_conversions_value']) }}\n\n from report\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join advertisers\n on campaigns.advertiser_id = advertisers.advertiser_id\n and campaigns.source_relation = advertisers.source_relation\n {{ dbt_utils.group_by(7) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__campaign_report", "package": null, "version": null}, {"name": "stg_pinterest_ads__campaign_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__advertiser_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.pinterest.pinterest_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.pinterest.stg_pinterest_ads__campaign_report", "model.pinterest.stg_pinterest_ads__campaign_history", "model.pinterest.stg_pinterest_ads__advertiser_history"]}, "compiled_path": "target/compiled/pinterest/models/pinterest_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_report\"\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\nadvertisers as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_history\"\n where is_most_recent_record = True\n),\n\nfields as (\n\n select\n report.source_relation,\n report.date_day,\n advertisers.advertiser_name,\n advertisers.advertiser_id,\n campaigns.campaign_name,\n report.campaign_id,\n campaigns.campaign_status,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n \n\n\n\n\n\n from report\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join advertisers\n on campaigns.advertiser_id = advertisers.advertiser_id\n and campaigns.source_relation = advertisers.source_relation\n group by 1,2,3,4,5,6,7\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.pinterest_ads__campaign_country_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__campaign_country_report", "resource_type": "model", "package_name": "pinterest", "path": "pinterest_ads__campaign_country_report.sql", "original_file_path": "models/pinterest_ads__campaign_country_report.sql", "unique_id": "model.pinterest.pinterest_ads__campaign_country_report", "fqn": ["pinterest", "pinterest_ads__campaign_country_report"], "alias": "pinterest_ads__campaign_country_report", "checksum": {"name": "sha256", "checksum": "4185ef29d4372f921ab36e092e0e57874aab8e25071e20a0f26392ea666643ad"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the country and campaign level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "date_day": {"name": "date_day", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "country_id": {"name": "country_id", "description": "The ID of the targeted country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.country_id"]}, "country_name": {"name": "country_name", "description": "Name of the targeted country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "Status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "advertiser_name": {"name": "advertiser_name", "description": "Name of the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_created_at": {"name": "campaign_created_at", "description": "Campaign creation time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_start_time": {"name": "campaign_start_time", "description": "Timestamp when the campaign became active or was scheduled to start.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_end_time": {"name": "campaign_end_time", "description": "Timestamp when the campaign ended or is scheduled to end.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_spend_cap": {"name": "budget_spend_cap", "description": "Maximum amount allowed to be spent over a specified budget period for the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lifetime_spend_cap": {"name": "lifetime_spend_cap", "description": "Total maximum spend allowed across the entire lifespan of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_objective_type": {"name": "campaign_objective_type", "description": "The primary goal of the campaign (e.g., brand awareness, conversions, video views).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "default_ad_group_budget_in_micro_currency": {"name": "default_ad_group_budget_in_micro_currency", "description": "When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_campaign_budget_optimization": {"name": "is_campaign_budget_optimization", "description": "Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_flexible_daily_budgets": {"name": "is_flexible_daily_budgets", "description": "Determine if a campaign has flexible daily budgets setup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of paid and earned impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impressions"]}, "clicks": {"name": "clicks", "description": "The number of paid and earned clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clicks"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value": {"name": "total_conversions_value", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/pinterest.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.6097686, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_country_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__pinterest_ads_enabled','pinterest__using_pin_promotion_targeting_report', 'pinterest__using_targeting_geo'])) }}\n\nwith report as (\n select *\n from {{ ref('stg_pinterest_ads__pin_promotion_targeting_report') }}\n where lower(targeting_type) = 'country'\n),\n\ncountries as (\n select *\n from {{ ref('stg_pinterest_ads__targeting_geo') }}\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_pinterest_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\nadvertisers as (\n select *\n from {{ ref('stg_pinterest_ads__advertiser_history') }}\n where is_most_recent_record = True\n),\n\nfields as (\n\n select\n report.source_relation,\n report.date_day,\n countries.country_name,\n countries.country_id,\n report.campaign_id,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n {{ pinterest_ads_persist_pass_through_columns(pass_through_variable='pinterest__pin_promotion_targeting_report_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0) }}\n\n from report\n left join countries\n on report.targeting_value = countries.country_id\n and report.source_relation = countries.source_relation\n\n {{ dbt_utils.group_by(5) }}\n),\n\nfinal as (\n select\n fields.*,\n advertisers.advertiser_name,\n advertisers.advertiser_id,\n campaigns.campaign_name,\n campaigns.campaign_status,\n campaigns.budget_spend_cap,\n campaigns.lifetime_spend_cap,\n campaigns.created_at as campaign_created_at,\n campaigns.default_ad_group_budget_in_micro_currency,\n campaigns.end_time as campaign_end_time,\n campaigns.is_campaign_budget_optimization,\n campaigns.is_flexible_daily_budgets,\n campaigns.objective_type as campaign_objective_type,\n campaigns.start_time as campaign_start_time\n from fields\n left join campaigns\n on fields.campaign_id = campaigns.campaign_id\n and fields.source_relation = campaigns.source_relation\n left join advertisers\n on campaigns.advertiser_id = advertisers.advertiser_id\n and campaigns.source_relation = advertisers.source_relation\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__pin_promotion_targeting_report", "package": null, "version": null}, {"name": "stg_pinterest_ads__targeting_geo", "package": null, "version": null}, {"name": "stg_pinterest_ads__campaign_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__advertiser_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.pinterest.pinterest_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report", "model.pinterest.stg_pinterest_ads__targeting_geo", "model.pinterest.stg_pinterest_ads__campaign_history", "model.pinterest.stg_pinterest_ads__advertiser_history"]}, "compiled_path": "target/compiled/pinterest/models/pinterest_ads__campaign_country_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_targeting_report\"\n where lower(targeting_type) = 'country'\n),\n\ncountries as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__targeting_geo\"\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\nadvertisers as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_history\"\n where is_most_recent_record = True\n),\n\nfields as (\n\n select\n report.source_relation,\n report.date_day,\n countries.country_name,\n countries.country_id,\n report.campaign_id,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n \n\n\n\n\n\n from report\n left join countries\n on report.targeting_value = countries.country_id\n and report.source_relation = countries.source_relation\n\n group by 1,2,3,4,5\n),\n\nfinal as (\n select\n fields.*,\n advertisers.advertiser_name,\n advertisers.advertiser_id,\n campaigns.campaign_name,\n campaigns.campaign_status,\n campaigns.budget_spend_cap,\n campaigns.lifetime_spend_cap,\n campaigns.created_at as campaign_created_at,\n campaigns.default_ad_group_budget_in_micro_currency,\n campaigns.end_time as campaign_end_time,\n campaigns.is_campaign_budget_optimization,\n campaigns.is_flexible_daily_budgets,\n campaigns.objective_type as campaign_objective_type,\n campaigns.start_time as campaign_start_time\n from fields\n left join campaigns\n on fields.campaign_id = campaigns.campaign_id\n and fields.source_relation = campaigns.source_relation\n left join advertisers\n on campaigns.advertiser_id = advertisers.advertiser_id\n and campaigns.source_relation = advertisers.source_relation\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.pinterest_ads__pin_promotion_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__pin_promotion_report", "resource_type": "model", "package_name": "pinterest", "path": "pinterest_ads__pin_promotion_report.sql", "original_file_path": "models/pinterest_ads__pin_promotion_report.sql", "unique_id": "model.pinterest.pinterest_ads__pin_promotion_report", "fqn": ["pinterest", "pinterest_ads__pin_promotion_report"], "alias": "pinterest_ads__pin_promotion_report", "checksum": {"name": "sha256", "checksum": "5470dc091d896e0188b3ebd869d9fb1d90a1070c377e7362984c772f4b197f4f"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the advertiser, campaign, ad group, and pin level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "date_day": {"name": "date_day", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "advertiser_name": {"name": "advertiser_name", "description": "Name of the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "Name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "Status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "Name of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_status": {"name": "ad_group_status", "description": "Status of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_type": {"name": "creative_type", "description": "The creative type. \nOne of \"APP\", \"APP_VIDEO\", \"BOARD\", \"CAROUSEL\", \"CINEMATIC\", \"COMMERCE\", \"MAX_VIDEO\", \"NATIVE_VIDEO\", \"REGULAR\", \n\"SEARCH_PROMINENCE\", \"SEARCH_PROMINENCE_CAROUSEL\", \"SHOPPING\", \"SHOP_THE_PIN\", \"THIRD_PARTY\", or \"VIDEO\".\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pin_promotion_id": {"name": "pin_promotion_id", "description": "The ID of the related Pin promotion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.pin_promotion_id"]}, "pin_name": {"name": "pin_name", "description": "Name of the pin.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pin_status": {"name": "pin_status", "description": "Status of the pin.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "destination_url": {"name": "destination_url", "description": "Pin destination URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of paid and earned clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clicks"]}, "impressions": {"name": "impressions", "description": "The number of paid and earned impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value": {"name": "total_conversions_value", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/pinterest.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.6037521, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__pin_promotion_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_pinterest_ads__pin_promotion_report') }}\n), \n\npins as (\n\n select *\n from {{ ref('stg_pinterest_ads__pin_promotion_history') }}\n where is_most_recent_record = True\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_pinterest_ads__ad_group_history') }}\n where is_most_recent_record = True\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_pinterest_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\nadvertisers as (\n\n select *\n from {{ ref('stg_pinterest_ads__advertiser_history') }}\n where is_most_recent_record = True\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n campaigns.advertiser_id,\n advertisers.advertiser_name,\n report.campaign_id,\n campaigns.campaign_name,\n campaigns.campaign_status,\n report.ad_group_id,\n ad_groups.ad_group_name,\n ad_groups.ad_group_status,\n pins.creative_type,\n report.pin_promotion_id,\n pins.pin_name,\n pins.pin_status,\n pins.destination_url,\n pins.base_url,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n {{ pinterest_ads_persist_pass_through_columns(pass_through_variable='pinterest__pin_promotion_report_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0, exclude_fields=['total_conversions','total_conversions_quantity','total_conversions_value']) }}\n\n from report \n left join pins \n on report.pin_promotion_id = pins.pin_promotion_id\n and report.source_relation = pins.source_relation\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join campaigns \n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join advertisers\n on campaigns.advertiser_id = advertisers.advertiser_id\n and campaigns.source_relation = advertisers.source_relation\n\n {{ dbt_utils.group_by(16) }}\n)\n\nselect * \nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__pin_promotion_report", "package": null, "version": null}, {"name": "stg_pinterest_ads__pin_promotion_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__campaign_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__advertiser_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.pinterest.pinterest_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.pinterest.stg_pinterest_ads__pin_promotion_report", "model.pinterest.stg_pinterest_ads__pin_promotion_history", "model.pinterest.stg_pinterest_ads__ad_group_history", "model.pinterest.stg_pinterest_ads__campaign_history", "model.pinterest.stg_pinterest_ads__advertiser_history"]}, "compiled_path": "target/compiled/pinterest/models/pinterest_ads__pin_promotion_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_report\"\n), \n\npins as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_history\"\n where is_most_recent_record = True\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\nadvertisers as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_history\"\n where is_most_recent_record = True\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n campaigns.advertiser_id,\n advertisers.advertiser_name,\n report.campaign_id,\n campaigns.campaign_name,\n campaigns.campaign_status,\n report.ad_group_id,\n ad_groups.ad_group_name,\n ad_groups.ad_group_status,\n pins.creative_type,\n report.pin_promotion_id,\n pins.pin_name,\n pins.pin_status,\n pins.destination_url,\n pins.base_url,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n \n\n\n\n\n\n from report \n left join pins \n on report.pin_promotion_id = pins.pin_promotion_id\n and report.source_relation = pins.source_relation\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join campaigns \n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join advertisers\n on campaigns.advertiser_id = advertisers.advertiser_id\n and campaigns.source_relation = advertisers.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16\n)\n\nselect * \nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.pinterest_ads__ad_group_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "pinterest_ads__ad_group_report", "resource_type": "model", "package_name": "pinterest", "path": "pinterest_ads__ad_group_report.sql", "original_file_path": "models/pinterest_ads__ad_group_report.sql", "unique_id": "model.pinterest.pinterest_ads__ad_group_report", "fqn": ["pinterest", "pinterest_ads__ad_group_report"], "alias": "pinterest_ads__ad_group_report", "checksum": {"name": "sha256", "checksum": "41209526d0e948e0f77cd373cdf3cc565500d3bbec72419b163cbab307777e62"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the campaign, advertiser, and ad group level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "date_day": {"name": "date_day", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "advertiser_name": {"name": "advertiser_name", "description": "Name of the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "Status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_status": {"name": "ad_group_status", "description": "Status of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Ad group creation time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_time": {"name": "start_time", "description": "Ad group start time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_time": {"name": "end_time", "description": "Ad group end time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of paid and earned impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impressions"]}, "clicks": {"name": "clicks", "description": "The number of paid and earned clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clicks"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value": {"name": "total_conversions_value", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/pinterest.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.596967, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__ad_group_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_pinterest_ads__ad_group_report') }}\n), \n\nadvertisers as (\n\n select *\n from {{ ref('stg_pinterest_ads__advertiser_history') }}\n where is_most_recent_record = True\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_pinterest_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\nad_groups as (\n\n select *\n from {{ ref('stg_pinterest_ads__ad_group_history') }}\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n report.source_relation,\n report.date_day,\n advertisers.advertiser_name,\n advertisers.advertiser_id,\n campaigns.campaign_name,\n campaigns.campaign_status,\n campaigns.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n ad_groups.created_at,\n ad_groups.start_time,\n ad_groups.end_time,\n ad_groups.ad_group_status,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n {{ pinterest_ads_persist_pass_through_columns(pass_through_variable='pinterest__ad_group_report_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0, exclude_fields=['total_conversions','total_conversions_quantity','total_conversions_value']) }}\n\n from report\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join campaigns\n on ad_groups.campaign_id = campaigns.campaign_id\n and ad_groups.source_relation = campaigns.source_relation\n left join advertisers\n on campaigns.advertiser_id = advertisers.advertiser_id\n and campaigns.source_relation = advertisers.source_relation\n {{ dbt_utils.group_by(13) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__ad_group_report", "package": null, "version": null}, {"name": "stg_pinterest_ads__advertiser_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__campaign_history", "package": null, "version": null}, {"name": "stg_pinterest_ads__ad_group_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.pinterest.pinterest_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.pinterest.stg_pinterest_ads__ad_group_report", "model.pinterest.stg_pinterest_ads__advertiser_history", "model.pinterest.stg_pinterest_ads__campaign_history", "model.pinterest.stg_pinterest_ads__ad_group_history"]}, "compiled_path": "target/compiled/pinterest/models/pinterest_ads__ad_group_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__ad_group_report\"\n), \n\nadvertisers as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_history\"\n where is_most_recent_record = True\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n report.source_relation,\n report.date_day,\n advertisers.advertiser_name,\n advertisers.advertiser_id,\n campaigns.campaign_name,\n campaigns.campaign_status,\n campaigns.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n ad_groups.created_at,\n ad_groups.start_time,\n ad_groups.end_time,\n ad_groups.ad_group_status,\n sum(report.spend) as spend,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_quantity) as total_conversions_quantity,\n sum(report.total_conversions_value) as total_conversions_value\n\n \n\n\n\n\n\n from report\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join campaigns\n on ad_groups.campaign_id = campaigns.campaign_id\n and ad_groups.source_relation = campaigns.source_relation\n left join advertisers\n on campaigns.advertiser_id = advertisers.advertiser_id\n and campaigns.source_relation = advertisers.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__pin_promotion_targeting_report", "resource_type": "model", "package_name": "pinterest", "path": "staging/stg_pinterest_ads__pin_promotion_targeting_report.sql", "original_file_path": "models/staging/stg_pinterest_ads__pin_promotion_targeting_report.sql", "unique_id": "model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report", "fqn": ["pinterest", "staging", "stg_pinterest_ads__pin_promotion_targeting_report"], "alias": "stg_pinterest_ads__pin_promotion_targeting_report", "checksum": {"name": "sha256", "checksum": "a2fd66cf671238a7e85369791d7fea02f63b57a760f53a04cea41b4b33357d23"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Contains performance metrics for promoted Pins segmented by applied targeting criteria, including targeting type, value, and related campaign metadata.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}, "date_day": {"name": "date_day", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "targeting_type": {"name": "targeting_type", "description": "Reporting targeting type for ads. Possible values 'KEYWORD', 'APPTYPE', 'GENDER', 'LOCATION', 'PLACEMENT', 'COUNTRY', 'TARGETED_INTEREST', 'PINNER_INTEREST', 'AUDIENCE_INCLUDE', 'GEO', 'AGE_BUCKET', 'REGION', 'QUIZ_RESULT', 'AGE_BUCKET_AND_GENDER'", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "targeting_value": {"name": "targeting_value", "description": "The specific value applied within the targeting type (e.g., 'Fashion' for interest, 'New York' for location).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "pin_promotion_id": {"name": "pin_promotion_id", "description": "The ID of the related Pin promotion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.pin_promotion_id"]}, "impressions": {"name": "impressions", "description": "The number of paid and earned impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impressions"]}, "clicks": {"name": "clicks", "description": "The number of paid and earned clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clicks"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value": {"name": "total_conversions_value", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/staging/stg_pinterest_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.8108108, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_targeting_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__pinterest_ads_enabled','pinterest__using_pin_promotion_targeting_report'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_pinterest_ads__pin_promotion_targeting_report_tmp') }}\n\n), fields as (\n\n select\n {{ fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_pinterest_ads__pin_promotion_targeting_report_tmp')),\n staging_columns=get_pin_promotion_targeting_report_columns()\n ) }}\n\n {{ fivetran_utils.apply_source_relation(package_name='pinterest_ads') }}\n \n from base\n\n), final as (\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast(date as {{ dbt.type_timestamp() }}) as date_day,\n cast(targeting_type as {{ dbt.type_string() }}) as targeting_type,\n cast(targeting_value as {{ dbt.type_string() }}) as targeting_value,\n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id,\n cast(advertiser_id as {{ dbt.type_string() }}) as advertiser_id,\n cast(campaign_id as {{ dbt.type_string() }}) as campaign_id,\n cast(pin_promotion_id as {{ dbt.type_string() }}) as pin_promotion_id,\n coalesce(impression_1,0) + coalesce(impression_2,0) as impressions,\n coalesce(clickthrough_1,0) + coalesce(clickthrough_2,0) as clicks,\n coalesce(spend_in_micro_dollar, 0) / 1000000.0 as spend,\n coalesce(total_conversions, 0) as total_conversions,\n coalesce(total_conversions_quantity, 0) as total_conversions_quantity,\n coalesce(total_conversions_value_in_micro_dollar, 0) / 1000000.0 as total_conversions_value\n\n {{ pinterest_ads_fill_pass_through_columns(pass_through_fields=var('pinterest__pin_promotion_targeting_report_passthrough_metrics')) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__pin_promotion_targeting_report_tmp", "package": null, "version": null}, {"name": "stg_pinterest_ads__pin_promotion_targeting_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.pinterest.get_pin_promotion_targeting_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.pinterest.pinterest_ads_fill_pass_through_columns"], "nodes": ["model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report_tmp"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads__pin_promotion_targeting_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_targeting_report_tmp\"\n\n), fields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n date as date,\n targeting_type as targeting_type,\n targeting_value as targeting_value,\n ad_group_id as ad_group_id,\n advertiser_id as advertiser_id,\n campaign_id as campaign_id,\n pin_promotion_id as pin_promotion_id,\n clickthrough_1 as clickthrough_1,\n clickthrough_2 as clickthrough_2,\n impression_1 as impression_1,\n impression_2 as impression_2,\n spend_in_micro_dollar as spend_in_micro_dollar,\n total_conversions as total_conversions,\n total_conversions_quantity as total_conversions_quantity,\n total_conversions_value_in_micro_dollar as total_conversions_value_in_micro_dollar\n\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.pinterest_ads' as TEXT) as source_relation\n\n \n from base\n\n), final as (\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n cast(date as timestamp) as date_day,\n cast(targeting_type as TEXT) as targeting_type,\n cast(targeting_value as TEXT) as targeting_value,\n cast(ad_group_id as TEXT) as ad_group_id,\n cast(advertiser_id as TEXT) as advertiser_id,\n cast(campaign_id as TEXT) as campaign_id,\n cast(pin_promotion_id as TEXT) as pin_promotion_id,\n coalesce(impression_1,0) + coalesce(impression_2,0) as impressions,\n coalesce(clickthrough_1,0) + coalesce(clickthrough_2,0) as clicks,\n coalesce(spend_in_micro_dollar, 0) / 1000000.0 as spend,\n coalesce(total_conversions, 0) as total_conversions,\n coalesce(total_conversions_quantity, 0) as total_conversions_quantity,\n coalesce(total_conversions_value_in_micro_dollar, 0) / 1000000.0 as total_conversions_value\n\n \t\n\n\t\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__pin_promotion_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__pin_promotion_report", "resource_type": "model", "package_name": "pinterest", "path": "staging/stg_pinterest_ads__pin_promotion_report.sql", "original_file_path": "models/staging/stg_pinterest_ads__pin_promotion_report.sql", "unique_id": "model.pinterest.stg_pinterest_ads__pin_promotion_report", "fqn": ["pinterest", "staging", "stg_pinterest_ads__pin_promotion_report"], "alias": "stg_pinterest_ads__pin_promotion_report", "checksum": {"name": "sha256", "checksum": "25ee3060dcc5e04ae50f85d7b42326c2088c71530eac77bf3ccacee2b154c896"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Pinterest Pin promotion by ad group, campaign, and advertiser.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "date_day": {"name": "date_day", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "pin_promotion_id": {"name": "pin_promotion_id", "description": "The ID of the related Pin promotion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.pin_promotion_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "impressions": {"name": "impressions", "description": "The number of paid and earned impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impressions"]}, "clicks": {"name": "clicks", "description": "The number of paid and earned clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clicks"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value": {"name": "total_conversions_value", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/staging/stg_pinterest_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.8019361, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_pinterest_ads__pin_promotion_report_tmp') }}\n), \n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_pinterest_ads__pin_promotion_report_tmp')),\n staging_columns=get_pin_promotion_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='pinterest_ads') }}\n\n from base\n), \n\nfinal as (\n\n select\n source_relation, \n {{ dbt.date_trunc('day', 'date') }} as date_day,\n cast(pin_promotion_id as {{ dbt.type_string() }}) as pin_promotion_id,\n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id,\n cast(campaign_id as {{ dbt.type_string() }}) as campaign_id,\n cast(advertiser_id as {{ dbt.type_string() }}) as advertiser_id,\n coalesce(impression_1,0) + coalesce(impression_2,0) as impressions,\n coalesce(clickthrough_1,0) + coalesce(clickthrough_2,0) as clicks,\n coalesce(spend_in_micro_dollar, 0) / 1000000.0 as spend,\n coalesce(total_conversions, 0) as total_conversions,\n coalesce(total_conversions_quantity, 0) as total_conversions_quantity,\n coalesce(total_conversions_value_in_micro_dollar, 0) / 1000000.0 as total_conversions_value\n\n {{ pinterest_ads_fill_pass_through_columns(pass_through_fields=var('pinterest__pin_promotion_report_passthrough_metrics'), except=['total_conversions','total_conversions_quantity','total_conversions_value']) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__pin_promotion_report_tmp", "package": null, "version": null}, {"name": "stg_pinterest_ads__pin_promotion_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.pinterest.get_pin_promotion_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.date_trunc", "macro.dbt.type_string", "macro.pinterest.pinterest_ads_fill_pass_through_columns"], "nodes": ["model.pinterest.stg_pinterest_ads__pin_promotion_report_tmp"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads__pin_promotion_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_report_tmp\"\n), \n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n ad_group_id as ad_group_id,\n advertiser_id as advertiser_id,\n campaign_id as campaign_id,\n clickthrough_1 as clickthrough_1,\n clickthrough_2 as clickthrough_2,\n date as date,\n impression_1 as impression_1,\n impression_2 as impression_2,\n pin_promotion_id as pin_promotion_id,\n spend_in_micro_dollar as spend_in_micro_dollar,\n total_conversions as total_conversions,\n total_conversions_quantity as total_conversions_quantity,\n total_conversions_value_in_micro_dollar as total_conversions_value_in_micro_dollar\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.pinterest_ads' as TEXT) as source_relation\n\n\n from base\n), \n\nfinal as (\n\n select\n source_relation, \n date_trunc('day', date) as date_day,\n cast(pin_promotion_id as TEXT) as pin_promotion_id,\n cast(ad_group_id as TEXT) as ad_group_id,\n cast(campaign_id as TEXT) as campaign_id,\n cast(advertiser_id as TEXT) as advertiser_id,\n coalesce(impression_1,0) + coalesce(impression_2,0) as impressions,\n coalesce(clickthrough_1,0) + coalesce(clickthrough_2,0) as clicks,\n coalesce(spend_in_micro_dollar, 0) / 1000000.0 as spend,\n coalesce(total_conversions, 0) as total_conversions,\n coalesce(total_conversions_quantity, 0) as total_conversions_quantity,\n coalesce(total_conversions_value_in_micro_dollar, 0) / 1000000.0 as total_conversions_value\n\n \t\n\n\t\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__ad_group_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__ad_group_history", "resource_type": "model", "package_name": "pinterest", "path": "staging/stg_pinterest_ads__ad_group_history.sql", "original_file_path": "models/staging/stg_pinterest_ads__ad_group_history.sql", "unique_id": "model.pinterest.stg_pinterest_ads__ad_group_history", "fqn": ["pinterest", "staging", "stg_pinterest_ads__ad_group_history"], "alias": "stg_pinterest_ads__ad_group_history", "checksum": {"name": "sha256", "checksum": "1883248b7841561a14c66736bfe1c8e4186dabcdb8631f5cff2b193b0948d9a3"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of a Pinterest Ad Group.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Parent Campaign ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Ad group creation time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_status": {"name": "ad_group_status", "description": "The status of the Ad group. One of \"ACTIVE\", \"ARCHIVED\", \"PAUSED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "start_time": {"name": "start_time", "description": "Ad group start time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_time": {"name": "end_time", "description": "Ad group end time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pacing_delivery_type": {"name": "pacing_delivery_type", "description": "Ad group pacing delivery type. With ACCELERATED, an ad group budget is spent as fast as possible. With STANDARD, an ad group budget is spent smoothly over a day. When using CBO, only the STANDARD pacing delivery type is allowed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement_group": {"name": "placement_group", "description": "The placement group. \"ALL\", \"SEARCH\", \"BROWSE\", or \"OTHER\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "summary_status": {"name": "summary_status", "description": "Summary status. \"RUNNING\", \"PAUSED\", \"NOT_STARTED\", \"COMPLETED\", \"ADVERTISER_DISABLED\", \"ARCHIVED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether the record is the most recent version of the object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/staging/stg_pinterest_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.7979262, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__ad_group_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_pinterest_ads__ad_group_history_tmp') }}\n), \n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_pinterest_ads__ad_group_history_tmp')),\n staging_columns=get_ad_group_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='pinterest_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n cast(id as {{ dbt.type_string() }}) as ad_group_id,\n name as ad_group_name,\n status as ad_group_status,\n ad_account_id as advertiser_id,\n _fivetran_synced,\n cast(campaign_id as {{ dbt.type_string() }}) as campaign_id,\n created_time as created_at,\n end_time,\n pacing_delivery_type,\n placement_group,\n start_time,\n summary_status,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='pinterest_ads') }} order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__ad_group_history_tmp", "package": null, "version": null}, {"name": "stg_pinterest_ads__ad_group_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.pinterest.get_ad_group_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.pinterest.stg_pinterest_ads__ad_group_history_tmp"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads__ad_group_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__ad_group_history_tmp\"\n), \n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n campaign_id as campaign_id,\n created_time as created_time,\n end_time as end_time,\n id as id,\n ad_account_id as ad_account_id,\n name as name,\n pacing_delivery_type as pacing_delivery_type,\n placement_group as placement_group,\n start_time as start_time,\n status as status,\n summary_status as summary_status\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.pinterest_ads' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n cast(id as TEXT) as ad_group_id,\n name as ad_group_name,\n status as ad_group_status,\n ad_account_id as advertiser_id,\n _fivetran_synced,\n cast(campaign_id as TEXT) as campaign_id,\n created_time as created_at,\n end_time,\n pacing_delivery_type,\n placement_group,\n start_time,\n summary_status,\n row_number() over (partition by id order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__targeting_geo_region": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__targeting_geo_region", "resource_type": "model", "package_name": "pinterest", "path": "staging/stg_pinterest_ads__targeting_geo_region.sql", "original_file_path": "models/staging/stg_pinterest_ads__targeting_geo_region.sql", "unique_id": "model.pinterest.stg_pinterest_ads__targeting_geo_region", "fqn": ["pinterest", "staging", "stg_pinterest_ads__targeting_geo_region"], "alias": "stg_pinterest_ads__targeting_geo_region", "checksum": {"name": "sha256", "checksum": "b097105f1a7de4cee512fed5474fd82f95da2d1447501a01d91e9239f22cd121"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Maps region targeting values used in campaigns, including standardized names and associated location codes.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}, "country_id": {"name": "country_id", "description": "The ID of the targeted country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.country_id"]}, "region_id": {"name": "region_id", "description": "The ID of the targeted region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.region_id"]}, "region_name": {"name": "region_name", "description": "The name of the targeted region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/staging/stg_pinterest_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.812344, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__targeting_geo_region\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__pinterest_ads_enabled', 'pinterest__using_targeting_geo_region'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_pinterest_ads__targeting_geo_region_tmp') }}\n\n), fields as (\n\n select\n {{ fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_pinterest_ads__targeting_geo_region_tmp')),\n staging_columns=get_targeting_geo_region_columns()\n ) }}\n\n {{ fivetran_utils.apply_source_relation(package_name='pinterest_ads') }}\n \n from base\n\n), final as (\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast(country_id as {{ dbt.type_string() }}) as country_id,\n cast(region_id as {{ dbt.type_string() }}) as region_id,\n region_name\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__targeting_geo_region_tmp", "package": null, "version": null}, {"name": "stg_pinterest_ads__targeting_geo_region_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.pinterest.get_targeting_geo_region_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_string"], "nodes": ["model.pinterest.stg_pinterest_ads__targeting_geo_region_tmp"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads__targeting_geo_region.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__targeting_geo_region_tmp\"\n\n), fields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n country_id as country_id,\n region_id as region_id,\n region_name as region_name\n\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.pinterest_ads' as TEXT) as source_relation\n\n \n from base\n\n), final as (\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n cast(country_id as TEXT) as country_id,\n cast(region_id as TEXT) as region_id,\n region_name\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__campaign_report", "resource_type": "model", "package_name": "pinterest", "path": "staging/stg_pinterest_ads__campaign_report.sql", "original_file_path": "models/staging/stg_pinterest_ads__campaign_report.sql", "unique_id": "model.pinterest.stg_pinterest_ads__campaign_report", "fqn": ["pinterest", "staging", "stg_pinterest_ads__campaign_report"], "alias": "stg_pinterest_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "8f7c215e9940a4bc633f1309bbf530df68554bb486339340f99e5b80e659d573"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of Campaigns by advertiser.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "date_day": {"name": "date_day", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "Name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "Status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "impressions": {"name": "impressions", "description": "The number of paid and earned impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impressions"]}, "clicks": {"name": "clicks", "description": "The number of paid and earned clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clicks"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value": {"name": "total_conversions_value", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/staging/stg_pinterest_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.8071504, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_pinterest_ads__campaign_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_pinterest_ads__campaign_report_tmp')),\n staging_columns=get_campaign_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='pinterest_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n {{ dbt.date_trunc('day', 'date') }} as date_day,\n cast(campaign_id as {{ dbt.type_string() }}) as campaign_id,\n campaign_name,\n campaign_status,\n cast(advertiser_id as {{ dbt.type_string() }}) as advertiser_id,\n coalesce(impression_1,0) + coalesce(impression_2,0) as impressions,\n coalesce(clickthrough_1,0) + coalesce(clickthrough_2,0) as clicks,\n coalesce(spend_in_micro_dollar, 0) / 1000000.0 as spend,\n coalesce(total_conversions, 0) as total_conversions,\n coalesce(total_conversions_quantity, 0) as total_conversions_quantity,\n coalesce(total_conversions_value_in_micro_dollar, 0) / 1000000.0 as total_conversions_value\n\n {{ pinterest_ads_fill_pass_through_columns(pass_through_fields=var('pinterest__campaign_report_passthrough_metrics'), except=['total_conversions','total_conversions_quantity','total_conversions_value']) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__campaign_report_tmp", "package": null, "version": null}, {"name": "stg_pinterest_ads__campaign_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.pinterest.get_campaign_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.date_trunc", "macro.dbt.type_string", "macro.pinterest.pinterest_ads_fill_pass_through_columns"], "nodes": ["model.pinterest.stg_pinterest_ads__campaign_report_tmp"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n advertiser_id as advertiser_id,\n campaign_id as campaign_id,\n campaign_name as campaign_name,\n campaign_status as campaign_status,\n clickthrough_1 as clickthrough_1,\n clickthrough_2 as clickthrough_2,\n date as date,\n impression_1 as impression_1,\n impression_2 as impression_2,\n spend_in_micro_dollar as spend_in_micro_dollar,\n total_conversions as total_conversions,\n total_conversions_quantity as total_conversions_quantity,\n total_conversions_value_in_micro_dollar as total_conversions_value_in_micro_dollar\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.pinterest_ads' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date_trunc('day', date) as date_day,\n cast(campaign_id as TEXT) as campaign_id,\n campaign_name,\n campaign_status,\n cast(advertiser_id as TEXT) as advertiser_id,\n coalesce(impression_1,0) + coalesce(impression_2,0) as impressions,\n coalesce(clickthrough_1,0) + coalesce(clickthrough_2,0) as clicks,\n coalesce(spend_in_micro_dollar, 0) / 1000000.0 as spend,\n coalesce(total_conversions, 0) as total_conversions,\n coalesce(total_conversions_quantity, 0) as total_conversions_quantity,\n coalesce(total_conversions_value_in_micro_dollar, 0) / 1000000.0 as total_conversions_value\n\n \t\n\n\t\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__advertiser_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__advertiser_history", "resource_type": "model", "package_name": "pinterest", "path": "staging/stg_pinterest_ads__advertiser_history.sql", "original_file_path": "models/staging/stg_pinterest_ads__advertiser_history.sql", "unique_id": "model.pinterest.stg_pinterest_ads__advertiser_history", "fqn": ["pinterest", "staging", "stg_pinterest_ads__advertiser_history"], "alias": "stg_pinterest_ads__advertiser_history", "checksum": {"name": "sha256", "checksum": "bbdd02b52c28a90529b0cb045f2da6d7870f2d18b4ba1c964e9398042565f17b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of an advertiser.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "advertiser_name": {"name": "advertiser_name", "description": "Name of the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country": {"name": "country", "description": "The country code where the advertiser is located.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp of when a record was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.created_at"]}, "currency_code": {"name": "currency_code", "description": "The currency code which the advertiser is set up using.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when a record was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.updated_at"]}, "owner_username": {"name": "owner_username", "description": "Advertiser's username.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "owner_user_id": {"name": "owner_user_id", "description": "Unique identifier of the owner user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_permissions": {"name": "advertiser_permissions", "description": "The permissions associated with this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether the record is the most recent version of the object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/staging/stg_pinterest_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.8046143, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_pinterest_ads__advertiser_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_pinterest_ads__advertiser_history_tmp')),\n staging_columns=get_advertiser_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='pinterest_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as {{ dbt.type_string() }}) as advertiser_id,\n name as advertiser_name,\n country,\n created_time as created_at,\n currency as currency_code,\n owner_user_id,\n owner_username,\n advertiser_permissions, -- permissions was renamed in macro\n updated_time as updated_at,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='pinterest_ads') }} order by updated_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__advertiser_history_tmp", "package": null, "version": null}, {"name": "stg_pinterest_ads__advertiser_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.pinterest.get_advertiser_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.pinterest.stg_pinterest_ads__advertiser_history_tmp"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads__advertiser_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_history_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n country as country,\n created_time as created_time,\n currency as currency,\n id as id,\n owner_user_id as owner_user_id,\n owner_username as owner_username,\n name as name,\n \n \"permissions\" as advertiser_permissions,\n updated_time as updated_time\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.pinterest_ads' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as TEXT) as advertiser_id,\n name as advertiser_name,\n country,\n created_time as created_at,\n currency as currency_code,\n owner_user_id,\n owner_username,\n advertiser_permissions, -- permissions was renamed in macro\n updated_time as updated_at,\n row_number() over (partition by id order by updated_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__campaign_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__campaign_history", "resource_type": "model", "package_name": "pinterest", "path": "staging/stg_pinterest_ads__campaign_history.sql", "original_file_path": "models/staging/stg_pinterest_ads__campaign_history.sql", "unique_id": "model.pinterest.stg_pinterest_ads__campaign_history", "fqn": ["pinterest", "staging", "stg_pinterest_ads__campaign_history"], "alias": "stg_pinterest_ads__campaign_history", "checksum": {"name": "sha256", "checksum": "753907d1bec94e3ad400698673a916d859bf2e40d799c25a1e80229a11181c29"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of a Pinterest Campaign.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "created_at": {"name": "created_at", "description": "Campaign creation time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "campaign_name": {"name": "campaign_name", "description": "Campaign name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "The status of the Campaign. One of \"ACTIVE\", \"ARCHIVED\", \"PAUSED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "default_ad_group_budget_in_micro_currency": {"name": "default_ad_group_budget_in_micro_currency", "description": "When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_automated_campaign": {"name": "is_automated_campaign", "description": "Specifies whether the campaign was created in the automated campaign flow", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_campaign_budget_optimization": {"name": "is_campaign_budget_optimization", "description": "Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_flexible_daily_budgets": {"name": "is_flexible_daily_budgets", "description": "Determine if a campaign has flexible daily budgets setup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_time": {"name": "start_time", "description": "Timestamp when the campaign became active or was scheduled to start.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_time": {"name": "end_time", "description": "Timestamp when the campaign ended or is scheduled to end.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_spend_cap": {"name": "budget_spend_cap", "description": "Maximum amount allowed to be spent over a specified budget period for the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lifetime_spend_cap": {"name": "lifetime_spend_cap", "description": "Total maximum spend allowed across the entire lifespan of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective_type": {"name": "objective_type", "description": "The primary goal of the campaign (e.g., brand awareness, conversions, video views).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether the record is the most recent version of the object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/staging/stg_pinterest_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.7993383, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_pinterest_ads__campaign_history_tmp') }}\n), \n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_pinterest_ads__campaign_history_tmp')),\n staging_columns=get_campaign_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='pinterest_ads') }}\n\n from base\n), \n\nfinal as (\n\n select\n source_relation, \n cast(id as {{ dbt.type_string() }}) as campaign_id,\n name as campaign_name,\n cast(advertiser_id as {{ dbt.type_string() }}) as advertiser_id,\n default_ad_group_budget_in_micro_currency,\n is_automated_campaign,\n is_campaign_budget_optimization,\n is_flexible_daily_budgets,\n status as campaign_status,\n _fivetran_synced,\n created_time as created_at,\n start_time,\n end_time,\n budget_spend_cap,\n lifetime_spend_cap,\n objective_type,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='pinterest_ads') }} order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__campaign_history_tmp", "package": null, "version": null}, {"name": "stg_pinterest_ads__campaign_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.pinterest.get_campaign_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.pinterest.stg_pinterest_ads__campaign_history_tmp"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads__campaign_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_history_tmp\"\n), \n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n created_time as created_time,\n default_ad_group_budget_in_micro_currency as default_ad_group_budget_in_micro_currency,\n is_automated_campaign as is_automated_campaign,\n is_campaign_budget_optimization as is_campaign_budget_optimization,\n is_flexible_daily_budgets as is_flexible_daily_budgets,\n id as id,\n advertiser_id as advertiser_id,\n name as name,\n status as status,\n cast(null as timestamp) as start_time,\n cast(null as timestamp) as end_time,\n cast(null as integer) as budget_spend_cap,\n cast(null as integer) as lifetime_spend_cap,\n cast(null as TEXT) as objective_type\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.pinterest_ads' as TEXT) as source_relation\n\n\n from base\n), \n\nfinal as (\n\n select\n source_relation, \n cast(id as TEXT) as campaign_id,\n name as campaign_name,\n cast(advertiser_id as TEXT) as advertiser_id,\n default_ad_group_budget_in_micro_currency,\n is_automated_campaign,\n is_campaign_budget_optimization,\n is_flexible_daily_budgets,\n status as campaign_status,\n _fivetran_synced,\n created_time as created_at,\n start_time,\n end_time,\n budget_spend_cap,\n lifetime_spend_cap,\n objective_type,\n row_number() over (partition by id order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__keyword_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__keyword_history", "resource_type": "model", "package_name": "pinterest", "path": "staging/stg_pinterest_ads__keyword_history.sql", "original_file_path": "models/staging/stg_pinterest_ads__keyword_history.sql", "unique_id": "model.pinterest.stg_pinterest_ads__keyword_history", "fqn": ["pinterest", "staging", "stg_pinterest_ads__keyword_history"], "alias": "stg_pinterest_ads__keyword_history", "checksum": {"name": "sha256", "checksum": "ff13b0f10c74a5086c3e92455b8257c51de83c042cc9172f22eecb177da77e8d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Keyword.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "keyword_id": {"name": "keyword_id", "description": "Unique identifier of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_value": {"name": "keyword_value", "description": "The text value that makes upd the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_id": {"name": "_fivetran_id", "description": "The unique identifier of the record within the Fivetran synced table.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "archived": {"name": "archived", "description": "Boolean indicating if the keyword is archived.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid": {"name": "bid", "description": "Bid amount set for the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "match_type": {"name": "match_type", "description": "Type of match the keyword is tied to. Either Exact or Broad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "parent_type": {"name": "parent_type", "description": "Identifier of what grain the parent type is. Ad group or campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether the record is the most recent version of the object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/staging/stg_pinterest_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.8083034, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__keyword_history\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__pinterest_ads_enabled','pinterest__using_keywords'])) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_pinterest_ads__keyword_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_pinterest_ads__keyword_history_tmp')),\n staging_columns=get_keyword_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='pinterest_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n cast(id as {{ dbt.type_string() }}) as keyword_id,\n value as keyword_value,\n _fivetran_id,\n _fivetran_synced,\n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id,\n cast(advertiser_id as {{ dbt.type_string() }}) as advertiser_id,\n archived,\n bid,\n cast(campaign_id as {{ dbt.type_string() }}) as campaign_id,\n match_type,\n parent_type,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='pinterest_ads') }} order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__keyword_history_tmp", "package": null, "version": null}, {"name": "stg_pinterest_ads__keyword_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.pinterest.get_keyword_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.pinterest.stg_pinterest_ads__keyword_history_tmp"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads__keyword_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__keyword_history_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_id as _fivetran_id,\n _fivetran_synced as _fivetran_synced,\n ad_group_id as ad_group_id,\n advertiser_id as advertiser_id,\n archived as archived,\n bid as bid,\n campaign_id as campaign_id,\n id as id,\n match_type as match_type,\n parent_type as parent_type,\n value as value\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.pinterest_ads' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n cast(id as TEXT) as keyword_id,\n value as keyword_value,\n _fivetran_id,\n _fivetran_synced,\n cast(ad_group_id as TEXT) as ad_group_id,\n cast(advertiser_id as TEXT) as advertiser_id,\n archived,\n bid,\n cast(campaign_id as TEXT) as campaign_id,\n match_type,\n parent_type,\n row_number() over (partition by id order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__advertiser_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__advertiser_report", "resource_type": "model", "package_name": "pinterest", "path": "staging/stg_pinterest_ads__advertiser_report.sql", "original_file_path": "models/staging/stg_pinterest_ads__advertiser_report.sql", "unique_id": "model.pinterest.stg_pinterest_ads__advertiser_report", "fqn": ["pinterest", "staging", "stg_pinterest_ads__advertiser_report"], "alias": "stg_pinterest_ads__advertiser_report", "checksum": {"name": "sha256", "checksum": "5bae0f0801914697867722be8d84256319e1a8e68c9b76ad3afb04a665f9209c"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of an Advertiser.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "date_day": {"name": "date_day", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "impressions": {"name": "impressions", "description": "The number of paid and earned impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impressions"]}, "clicks": {"name": "clicks", "description": "The number of paid and earned clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clicks"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value": {"name": "total_conversions_value", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/staging/stg_pinterest_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.8059673, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_pinterest_ads__advertiser_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_pinterest_ads__advertiser_report_tmp')),\n staging_columns=get_advertiser_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='pinterest_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n {{ dbt.date_trunc('day', 'date') }} as date_day,\n cast(advertiser_id as {{ dbt.type_string() }}) as advertiser_id,\n coalesce(impression_1,0) + coalesce(impression_2,0) as impressions,\n coalesce(clickthrough_1,0) + coalesce(clickthrough_2,0) as clicks,\n coalesce(spend_in_micro_dollar, 0) / 1000000.0 as spend,\n coalesce(total_conversions, 0) as total_conversions,\n coalesce(total_conversions_quantity, 0) as total_conversions_quantity,\n coalesce(total_conversions_value_in_micro_dollar, 0) / 1000000.0 as total_conversions_value\n\n {{ pinterest_ads_fill_pass_through_columns(pass_through_fields=var('pinterest__advertiser_report_passthrough_metrics'), except=['total_conversions','total_conversions_quantity','total_conversions_value']) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__advertiser_report_tmp", "package": null, "version": null}, {"name": "stg_pinterest_ads__advertiser_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.pinterest.get_advertiser_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.date_trunc", "macro.dbt.type_string", "macro.pinterest.pinterest_ads_fill_pass_through_columns"], "nodes": ["model.pinterest.stg_pinterest_ads__advertiser_report_tmp"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads__advertiser_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n advertiser_id as advertiser_id,\n clickthrough_1 as clickthrough_1,\n clickthrough_2 as clickthrough_2,\n date as date,\n impression_1 as impression_1,\n impression_2 as impression_2,\n spend_in_micro_dollar as spend_in_micro_dollar,\n total_conversions as total_conversions,\n total_conversions_quantity as total_conversions_quantity,\n total_conversions_value_in_micro_dollar as total_conversions_value_in_micro_dollar\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.pinterest_ads' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date_trunc('day', date) as date_day,\n cast(advertiser_id as TEXT) as advertiser_id,\n coalesce(impression_1,0) + coalesce(impression_2,0) as impressions,\n coalesce(clickthrough_1,0) + coalesce(clickthrough_2,0) as clicks,\n coalesce(spend_in_micro_dollar, 0) / 1000000.0 as spend,\n coalesce(total_conversions, 0) as total_conversions,\n coalesce(total_conversions_quantity, 0) as total_conversions_quantity,\n coalesce(total_conversions_value_in_micro_dollar, 0) / 1000000.0 as total_conversions_value\n\n \t\n\n\t\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__pin_promotion_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__pin_promotion_history", "resource_type": "model", "package_name": "pinterest", "path": "staging/stg_pinterest_ads__pin_promotion_history.sql", "original_file_path": "models/staging/stg_pinterest_ads__pin_promotion_history.sql", "unique_id": "model.pinterest.stg_pinterest_ads__pin_promotion_history", "fqn": ["pinterest", "staging", "stg_pinterest_ads__pin_promotion_history"], "alias": "stg_pinterest_ads__pin_promotion_history", "checksum": {"name": "sha256", "checksum": "8a461be83757c3f5d006518afc5ad72f46be26ca64997f308fe8acf78f3057ff"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of a Pinterest Pin promotion.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "pin_promotion_id": {"name": "pin_promotion_id", "description": "Pin promotion ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "Pin promotion ad group ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Pin creation time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "destination_url": {"name": "destination_url", "description": "Pin destination URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pin_name": {"name": "pin_name", "description": "Pin promotion name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pin_id": {"name": "pin_id", "description": "Original pin ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pin_status": {"name": "pin_status", "description": "The status of the Pin promotion. One of \"ACTIVE\", \"ARCHIVED\", \"PAUSED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_type": {"name": "creative_type", "description": "The creative type. \nOne of \"APP\", \"APP_VIDEO\", \"BOARD\", \"CAROUSEL\", \"CINEMATIC\", \"COMMERCE\", \"MAX_VIDEO\", \"NATIVE_VIDEO\", \"REGULAR\", \n\"SEARCH_PROMINENCE\", \"SEARCH_PROMINENCE_CAROUSEL\", \"SHOPPING\", \"SHOP_THE_PIN\", \"THIRD_PARTY\", or \"VIDEO\".\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether the record is the most recent version of the object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.is_most_recent_record"]}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_host": {"name": "url_host", "description": "The URL host of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_path": {"name": "url_path", "description": "The URL path of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_source": {"name": "utm_source", "description": "The utm_source parameter of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_medium": {"name": "utm_medium", "description": "The utm_medium parameter of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_campaign": {"name": "utm_campaign", "description": "The utm_campaign parameter of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_content": {"name": "utm_content", "description": "The utm_content parameter of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_term": {"name": "utm_term", "description": "The utm_term parameter of the ad, extracted from the `destination_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/staging/stg_pinterest_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.8007731, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_pinterest_ads__pin_promotion_history_tmp') }}\n), \n\nfields as (\n\n select\n\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_pinterest_ads__pin_promotion_history_tmp')),\n staging_columns=get_pin_promotion_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='pinterest_ads') }}\n\n from base\n), \n\nfinal as (\n\n select\n source_relation,\n cast(id as {{ dbt.type_string() }}) as pin_promotion_id,\n cast(ad_account_id as {{ dbt.type_string() }}) as advertiser_id,\n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id,\n created_time as created_at,\n destination_url,\n {{ dbt.split_part('destination_url', \"'?'\", 1) }} as base_url,\n {{ dbt_utils.get_url_host('destination_url') }} as url_host,\n '/' || {{ dbt_utils.get_url_path('destination_url') }} as url_path,\n {{ pinterest.pinterest_ads_extract_url_parameter('destination_url', 'utm_source') }} as utm_source,\n {{ pinterest.pinterest_ads_extract_url_parameter('destination_url', 'utm_medium') }} as utm_medium,\n {{ pinterest.pinterest_ads_extract_url_parameter('destination_url', 'utm_campaign') }} as utm_campaign,\n {{ pinterest.pinterest_ads_extract_url_parameter('destination_url', 'utm_content') }} as utm_content,\n {{ pinterest.pinterest_ads_extract_url_parameter('destination_url', 'utm_term') }} as utm_term,\n name as pin_name,\n cast(pin_id as {{ dbt.type_string() }}) as pin_id,\n status as pin_status,\n creative_type,\n _fivetran_synced,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='pinterest_ads') }} order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__pin_promotion_history_tmp", "package": null, "version": null}, {"name": "stg_pinterest_ads__pin_promotion_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.pinterest.get_pin_promotion_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.dbt.split_part", "macro.dbt_utils.get_url_host", "macro.dbt_utils.get_url_path", "macro.pinterest.pinterest_ads_extract_url_parameter", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.pinterest.stg_pinterest_ads__pin_promotion_history_tmp"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads__pin_promotion_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_history_tmp\"\n), \n\nfields as (\n\n select\n\n \n _fivetran_synced as _fivetran_synced,\n ad_group_id as ad_group_id,\n ad_account_id as ad_account_id,\n cast(null as TEXT) as android_deep_link,\n cast(null as TEXT) as click_tracking_url,\n created_time as created_time,\n creative_type as creative_type,\n destination_url as destination_url,\n id as id,\n cast(null as TEXT) as ios_deep_link,\n cast(null as boolean) as is_pin_deleted,\n cast(null as boolean) as is_removable,\n name as name,\n pin_id as pin_id,\n cast(null as TEXT) as review_status,\n status as status,\n cast(null as timestamp) as updated_time,\n cast(null as TEXT) as view_tracking_url\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.pinterest_ads' as TEXT) as source_relation\n\n\n from base\n), \n\nfinal as (\n\n select\n source_relation,\n cast(id as TEXT) as pin_promotion_id,\n cast(ad_account_id as TEXT) as advertiser_id,\n cast(ad_group_id as TEXT) as ad_group_id,\n created_time as created_at,\n destination_url,\n \n\n \n \n\n split_part(\n destination_url,\n '?',\n 1\n )\n\n\n \n\n as base_url,\n \n \n cast(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n \n\n replace(\n \n\n replace(\n \n\n replace(\n destination_url,\n 'android-app://',\n ''\n )\n\n\n,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n '/',\n 1\n )\n\n\n \n\n,\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_host,\n '/' || \n \n cast(\n\n \n \n\n split_part(\n \n\n right(\n \n\n replace(\n \n\n replace(\n destination_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n \n\n length(\n \n\n replace(\n \n\n replace(\n destination_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n )-coalesce(\n nullif(\n\n position(\n '/' in \n\n replace(\n \n\n replace(\n destination_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ), 0),\n \n\n position(\n '?' in \n\n replace(\n \n\n replace(\n destination_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ) - 1\n )\n ),\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_path,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n destination_url,\n 'utm_source=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_source,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n destination_url,\n 'utm_medium=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_medium,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n destination_url,\n 'utm_campaign=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_campaign,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n destination_url,\n 'utm_content=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_content,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n destination_url,\n 'utm_term=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_term,\n name as pin_name,\n cast(pin_id as TEXT) as pin_id,\n status as pin_status,\n creative_type,\n _fivetran_synced,\n row_number() over (partition by id order by _fivetran_synced desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__targeting_geo": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__targeting_geo", "resource_type": "model", "package_name": "pinterest", "path": "staging/stg_pinterest_ads__targeting_geo.sql", "original_file_path": "models/staging/stg_pinterest_ads__targeting_geo.sql", "unique_id": "model.pinterest.stg_pinterest_ads__targeting_geo", "fqn": ["pinterest", "staging", "stg_pinterest_ads__targeting_geo"], "alias": "stg_pinterest_ads__targeting_geo", "checksum": {"name": "sha256", "checksum": "63f3cee1b5091fca6a3323e842fd66d2022c2c0befd3029b85bc217b9ff37c55"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Maps country targeting values used in campaigns, including standardized names and associated location codes.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "country_id": {"name": "country_id", "description": "The ID of the targeted country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.country_id"]}, "country_name": {"name": "country_name", "description": "The name of the targeted country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/staging/stg_pinterest_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.8115923, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__targeting_geo\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__pinterest_ads_enabled', 'pinterest__using_targeting_geo'])) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_pinterest_ads__targeting_geo_tmp') }}\n\n), fields as (\n\n select\n {{ fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_pinterest_ads__targeting_geo_tmp')),\n staging_columns=get_targeting_geo_columns()\n ) }}\n\n {{ fivetran_utils.apply_source_relation(package_name='pinterest_ads') }}\n \n from base\n\n), final as (\n select\n source_relation,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n cast(country_id as {{ dbt.type_string() }}) as country_id,\n country_name\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__targeting_geo_tmp", "package": null, "version": null}, {"name": "stg_pinterest_ads__targeting_geo_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.pinterest.get_targeting_geo_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.type_string"], "nodes": ["model.pinterest.stg_pinterest_ads__targeting_geo_tmp"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads__targeting_geo.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__targeting_geo_tmp\"\n\n), fields as (\n\n select\n \n country_id as country_id,\n country_name as country_name,\n _fivetran_synced as _fivetran_synced\n\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.pinterest_ads' as TEXT) as source_relation\n\n \n from base\n\n), final as (\n select\n source_relation,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n cast(country_id as TEXT) as country_id,\n country_name\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__keyword_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__keyword_report", "resource_type": "model", "package_name": "pinterest", "path": "staging/stg_pinterest_ads__keyword_report.sql", "original_file_path": "models/staging/stg_pinterest_ads__keyword_report.sql", "unique_id": "model.pinterest.stg_pinterest_ads__keyword_report", "fqn": ["pinterest", "staging", "stg_pinterest_ads__keyword_report"], "alias": "stg_pinterest_ads__keyword_report", "checksum": {"name": "sha256", "checksum": "4ac80a21e27a3f15690588305a2422c0cdff0b85752e4bedfab4424a640b6be2"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of Keywords by ad group, campaign, and advertiser.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "date_day": {"name": "date_day", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "keyword_id": {"name": "keyword_id", "description": "Unique identifier of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pin_promotion_id": {"name": "pin_promotion_id", "description": "The ID of the related Pin promotion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.pin_promotion_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "Name of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_status": {"name": "ad_group_status", "description": "Status of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "impressions": {"name": "impressions", "description": "The number of paid and earned impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impressions"]}, "clicks": {"name": "clicks", "description": "The number of paid and earned clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clicks"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value": {"name": "total_conversions_value", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/staging/stg_pinterest_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.8096378, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__keyword_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__pinterest_ads_enabled','pinterest__using_keywords'])) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_pinterest_ads__keyword_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_pinterest_ads__keyword_report_tmp')),\n staging_columns=get_keyword_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='pinterest_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n {{ dbt.date_trunc('day', 'date') }} as date_day,\n cast(keyword_id as {{dbt.type_string() }}) as keyword_id,\n cast(pin_promotion_id as {{dbt.type_string() }}) as pin_promotion_id,\n cast(ad_group_id as {{dbt.type_string() }}) as ad_group_id,\n ad_group_name,\n ad_group_status,\n cast(campaign_id as {{dbt.type_string() }}) as campaign_id,\n cast(advertiser_id as {{dbt.type_string() }}) as advertiser_id,\n coalesce(impression_1,0) + coalesce(impression_2,0) as impressions,\n coalesce(clickthrough_1,0) + coalesce(clickthrough_2,0) as clicks,\n coalesce(spend_in_micro_dollar, 0) / 1000000.0 as spend,\n coalesce(total_conversions, 0) as total_conversions,\n coalesce(total_conversions_quantity, 0) as total_conversions_quantity,\n coalesce(total_conversions_value_in_micro_dollar, 0) / 1000000.0 as total_conversions_value\n\n {{ pinterest_ads_fill_pass_through_columns(pass_through_fields=var('pinterest__keyword_report_passthrough_metrics'), except=['total_conversions','total_conversions_quantity','total_conversions_value']) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__keyword_report_tmp", "package": null, "version": null}, {"name": "stg_pinterest_ads__keyword_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.pinterest.get_keyword_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.date_trunc", "macro.dbt.type_string", "macro.pinterest.pinterest_ads_fill_pass_through_columns"], "nodes": ["model.pinterest.stg_pinterest_ads__keyword_report_tmp"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads__keyword_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__keyword_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n ad_group_id as ad_group_id,\n ad_group_name as ad_group_name,\n ad_group_status as ad_group_status,\n advertiser_id as advertiser_id,\n campaign_id as campaign_id,\n clickthrough_1 as clickthrough_1,\n clickthrough_2 as clickthrough_2,\n date as date,\n impression_1 as impression_1,\n impression_2 as impression_2,\n keyword_id as keyword_id,\n pin_promotion_id as pin_promotion_id,\n spend_in_micro_dollar as spend_in_micro_dollar,\n total_conversions as total_conversions,\n total_conversions_quantity as total_conversions_quantity,\n total_conversions_value_in_micro_dollar as total_conversions_value_in_micro_dollar\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.pinterest_ads' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n date_trunc('day', date) as date_day,\n cast(keyword_id as TEXT) as keyword_id,\n cast(pin_promotion_id as TEXT) as pin_promotion_id,\n cast(ad_group_id as TEXT) as ad_group_id,\n ad_group_name,\n ad_group_status,\n cast(campaign_id as TEXT) as campaign_id,\n cast(advertiser_id as TEXT) as advertiser_id,\n coalesce(impression_1,0) + coalesce(impression_2,0) as impressions,\n coalesce(clickthrough_1,0) + coalesce(clickthrough_2,0) as clicks,\n coalesce(spend_in_micro_dollar, 0) / 1000000.0 as spend,\n coalesce(total_conversions, 0) as total_conversions,\n coalesce(total_conversions_quantity, 0) as total_conversions_quantity,\n coalesce(total_conversions_value_in_micro_dollar, 0) / 1000000.0 as total_conversions_value\n\n \t\n\n\t\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__ad_group_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__ad_group_report", "resource_type": "model", "package_name": "pinterest", "path": "staging/stg_pinterest_ads__ad_group_report.sql", "original_file_path": "models/staging/stg_pinterest_ads__ad_group_report.sql", "unique_id": "model.pinterest.stg_pinterest_ads__ad_group_report", "fqn": ["pinterest", "staging", "stg_pinterest_ads__ad_group_report"], "alias": "stg_pinterest_ads__ad_group_report", "checksum": {"name": "sha256", "checksum": "e395625feff6a007c2e1bcf04d6d4c814838375efa04427134b48f9eaa612ed4"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Pinterest Ad Groups by campaign and advertiser.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.source_relation"]}, "date_day": {"name": "date_day", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "Name of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_status": {"name": "ad_group_status", "description": "Status of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "impressions": {"name": "impressions", "description": "The number of paid and earned impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impressions"]}, "clicks": {"name": "clicks", "description": "The number of paid and earned clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clicks"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value": {"name": "total_conversions_value", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "pinterest://models/staging/stg_pinterest_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.8032098, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__ad_group_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_pinterest_ads__ad_group_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_pinterest_ads__ad_group_report_tmp')),\n staging_columns=get_ad_group_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='pinterest_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n {{ dbt.date_trunc('day', 'date') }} as date_day,\n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id,\n ad_group_name,\n ad_group_status,\n cast(campaign_id as {{ dbt.type_string() }}) as campaign_id,\n cast(advertiser_id as {{ dbt.type_string() }}) as advertiser_id,\n coalesce(impression_1,0) + coalesce(impression_2,0) as impressions,\n coalesce(clickthrough_1,0) + coalesce(clickthrough_2,0) as clicks,\n coalesce(spend_in_micro_dollar, 0) / 1000000.0 as spend,\n coalesce(total_conversions, 0) as total_conversions,\n coalesce(total_conversions_quantity, 0) as total_conversions_quantity,\n coalesce(total_conversions_value_in_micro_dollar, 0) / 1000000.0 as total_conversions_value\n\n {{ pinterest_ads_fill_pass_through_columns(pass_through_fields=var('pinterest__ad_group_report_passthrough_metrics'), except=['total_conversions','total_conversions_quantity','total_conversions_value']) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__ad_group_report_tmp", "package": null, "version": null}, {"name": "stg_pinterest_ads__ad_group_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.pinterest.get_ad_group_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.date_trunc", "macro.dbt.type_string", "macro.pinterest.pinterest_ads_fill_pass_through_columns"], "nodes": ["model.pinterest.stg_pinterest_ads__ad_group_report_tmp"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads__ad_group_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__ad_group_report_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n ad_group_id as ad_group_id,\n ad_group_name as ad_group_name,\n ad_group_status as ad_group_status,\n advertiser_id as advertiser_id,\n campaign_id as campaign_id,\n clickthrough_1 as clickthrough_1,\n clickthrough_2 as clickthrough_2,\n date as date,\n impression_1 as impression_1,\n impression_2 as impression_2,\n spend_in_micro_dollar as spend_in_micro_dollar,\n total_conversions as total_conversions,\n total_conversions_quantity as total_conversions_quantity,\n total_conversions_value_in_micro_dollar as total_conversions_value_in_micro_dollar\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.pinterest_ads' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date_trunc('day', date) as date_day,\n cast(ad_group_id as TEXT) as ad_group_id,\n ad_group_name,\n ad_group_status,\n cast(campaign_id as TEXT) as campaign_id,\n cast(advertiser_id as TEXT) as advertiser_id,\n coalesce(impression_1,0) + coalesce(impression_2,0) as impressions,\n coalesce(clickthrough_1,0) + coalesce(clickthrough_2,0) as clicks,\n coalesce(spend_in_micro_dollar, 0) / 1000000.0 as spend,\n coalesce(total_conversions, 0) as total_conversions,\n coalesce(total_conversions_quantity, 0) as total_conversions_quantity,\n coalesce(total_conversions_value_in_micro_dollar, 0) / 1000000.0 as total_conversions_value\n\n \t\n\n\t\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__pin_promotion_targeting_report_tmp", "resource_type": "model", "package_name": "pinterest", "path": "staging/tmp/stg_pinterest_ads__pin_promotion_targeting_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_pinterest_ads__pin_promotion_targeting_report_tmp.sql", "unique_id": "model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report_tmp", "fqn": ["pinterest", "staging", "tmp", "stg_pinterest_ads__pin_promotion_targeting_report_tmp"], "alias": "stg_pinterest_ads__pin_promotion_targeting_report_tmp", "checksum": {"name": "sha256", "checksum": "93b1c9d986bc81385d756b80cc4f23dbb9556b506da975aee40b93837842ea5c"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708216.7998936, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_targeting_report_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__pinterest_ads_enabled', 'pinterest__using_pin_promotion_targeting_report'])) }}\n\n{% if var('pinterest_ads_union_schemas', []) | length > 0 or var('pinterest_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='pin_promotion_targeting_report',\n database_variable='pinterest_database',\n schema_variable='pinterest_schema',\n default_database=target.database,\n default_schema='pinterest_ads',\n default_variable='pin_promotion_targeting_report',\n union_schema_variable='pinterest_ads_union_schemas',\n union_database_variable='pinterest_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='pinterest_ads_sources',\n single_source_name='pinterest_ads',\n single_table_name='pin_promotion_targeting_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["pinterest_ads", "pin_promotion_targeting_report"], ["pinterest_ads", "pin_promotion_targeting_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.pinterest.pinterest_ads.pin_promotion_targeting_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/tmp/stg_pinterest_ads__pin_promotion_targeting_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: pinterest_ads_pin_promotion_targeting_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: pinterest_pin_promotion_targeting_report_data\n\n\n select\n \"_fivetran_synced\",\n \"date\",\n \"targeting_type\",\n \"targeting_value\",\n \"ad_group_id\",\n \"advertiser_id\",\n \"campaign_id\",\n \"pin_promotion_id\",\n \"clickthrough_1\",\n \"clickthrough_2\",\n \"impression_1\",\n \"impression_2\",\n \"spend_in_micro_dollar\",\n \"total_conversions\",\n \"total_conversions_quantity\",\n \"total_conversions_value_in_micro_dollar\"\n from \"postgres\".\"public\".\"pinterest_pin_promotion_targeting_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__ad_group_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__ad_group_report_tmp", "resource_type": "model", "package_name": "pinterest", "path": "staging/tmp/stg_pinterest_ads__ad_group_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_pinterest_ads__ad_group_report_tmp.sql", "unique_id": "model.pinterest.stg_pinterest_ads__ad_group_report_tmp", "fqn": ["pinterest", "staging", "tmp", "stg_pinterest_ads__ad_group_report_tmp"], "alias": "stg_pinterest_ads__ad_group_report_tmp", "checksum": {"name": "sha256", "checksum": "34fd143082a76d7bcb98d4c8f060e1de28b2e71f25eb35e4c5fb3593536e9d0f"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708216.811277, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__ad_group_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\n{% if var('pinterest_ads_union_schemas', []) | length > 0 or var('pinterest_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_group_report',\n database_variable='pinterest_database',\n schema_variable='pinterest_schema',\n default_database=target.database,\n default_schema='pinterest_ads',\n default_variable='ad_group_report',\n union_schema_variable='pinterest_ads_union_schemas',\n union_database_variable='pinterest_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='pinterest_ads_sources',\n single_source_name='pinterest_ads',\n single_table_name='ad_group_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["pinterest_ads", "ad_group_report"], ["pinterest_ads", "ad_group_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.pinterest.pinterest_ads.ad_group_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/tmp/stg_pinterest_ads__ad_group_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: pinterest_ads_ad_group_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: pinterest_ad_group_report_data\n\n\n select\n \"date\",\n \"ad_group_id\",\n \"ad_group_name\",\n \"ad_group_status\",\n \"campaign_id\",\n \"advertiser_id\",\n \"_fivetran_synced\",\n \"impression_1\",\n \"impression_2\",\n \"clickthrough_1\",\n \"clickthrough_2\",\n \"spend_in_micro_dollar\",\n \"total_conversions\",\n \"total_conversions_quantity\",\n \"total_conversions_value_in_micro_dollar\",\n \"total_view_checkout\"\n from \"postgres\".\"public\".\"pinterest_ad_group_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__pin_promotion_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__pin_promotion_history_tmp", "resource_type": "model", "package_name": "pinterest", "path": "staging/tmp/stg_pinterest_ads__pin_promotion_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_pinterest_ads__pin_promotion_history_tmp.sql", "unique_id": "model.pinterest.stg_pinterest_ads__pin_promotion_history_tmp", "fqn": ["pinterest", "staging", "tmp", "stg_pinterest_ads__pin_promotion_history_tmp"], "alias": "stg_pinterest_ads__pin_promotion_history_tmp", "checksum": {"name": "sha256", "checksum": "0148faded2d7e7567d1467f5ce201ad6b8fc7eb5accfa0c36548da2b11a9d513"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708216.821829, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\n{% if var('pinterest_ads_union_schemas', []) | length > 0 or var('pinterest_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='pin_promotion_history',\n database_variable='pinterest_database',\n schema_variable='pinterest_schema',\n default_database=target.database,\n default_schema='pinterest_ads',\n default_variable='pin_promotion_history',\n union_schema_variable='pinterest_ads_union_schemas',\n union_database_variable='pinterest_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='pinterest_ads_sources',\n single_source_name='pinterest_ads',\n single_table_name='pin_promotion_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["pinterest_ads", "pin_promotion_history"], ["pinterest_ads", "pin_promotion_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.pinterest.pinterest_ads.pin_promotion_history"]}, "compiled_path": "target/compiled/pinterest/models/staging/tmp/stg_pinterest_ads__pin_promotion_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: pinterest_ads_pin_promotion_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: pinterest_pin_promotion_history_data\n\n\n select\n \"id\",\n \"ad_group_id\",\n \"created_time\",\n \"destination_url\",\n \"name\",\n \"pin_id\",\n \"status\",\n \"creative_type\",\n \"_fivetran_synced\",\n \"ad_account_id\"\n from \"postgres\".\"public\".\"pinterest_pin_promotion_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__campaign_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__campaign_report_tmp", "resource_type": "model", "package_name": "pinterest", "path": "staging/tmp/stg_pinterest_ads__campaign_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_pinterest_ads__campaign_report_tmp.sql", "unique_id": "model.pinterest.stg_pinterest_ads__campaign_report_tmp", "fqn": ["pinterest", "staging", "tmp", "stg_pinterest_ads__campaign_report_tmp"], "alias": "stg_pinterest_ads__campaign_report_tmp", "checksum": {"name": "sha256", "checksum": "ad4dd33bf6b6c32fc43e6cf6338058e36224a71523a26a1687804e2d338b92f1"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708216.832574, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\n{% if var('pinterest_ads_union_schemas', []) | length > 0 or var('pinterest_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_report',\n database_variable='pinterest_database',\n schema_variable='pinterest_schema',\n default_database=target.database,\n default_schema='pinterest_ads',\n default_variable='campaign_report',\n union_schema_variable='pinterest_ads_union_schemas',\n union_database_variable='pinterest_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='pinterest_ads_sources',\n single_source_name='pinterest_ads',\n single_table_name='campaign_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["pinterest_ads", "campaign_report"], ["pinterest_ads", "campaign_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.pinterest.pinterest_ads.campaign_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/tmp/stg_pinterest_ads__campaign_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: pinterest_ads_campaign_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: pinterest_campaign_report_data\n\n\n select\n \"date\",\n \"campaign_id\",\n \"campaign_name\",\n \"campaign_status\",\n \"advertiser_id\",\n \"_fivetran_synced\",\n \"impression_1\",\n \"impression_2\",\n \"clickthrough_1\",\n \"clickthrough_2\",\n \"spend_in_micro_dollar\",\n \"total_conversions\",\n \"total_conversions_quantity\",\n \"total_conversions_value_in_micro_dollar\"\n from \"postgres\".\"public\".\"pinterest_campaign_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__advertiser_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__advertiser_history_tmp", "resource_type": "model", "package_name": "pinterest", "path": "staging/tmp/stg_pinterest_ads__advertiser_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_pinterest_ads__advertiser_history_tmp.sql", "unique_id": "model.pinterest.stg_pinterest_ads__advertiser_history_tmp", "fqn": ["pinterest", "staging", "tmp", "stg_pinterest_ads__advertiser_history_tmp"], "alias": "stg_pinterest_ads__advertiser_history_tmp", "checksum": {"name": "sha256", "checksum": "0a0ce2037e1594fdb65db4599b6ff5645fbd73e03cf4084ebe9c9169e21c66c5"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708216.843216, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\n{% if var('pinterest_ads_union_schemas', []) | length > 0 or var('pinterest_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='advertiser_history',\n database_variable='pinterest_database',\n schema_variable='pinterest_schema',\n default_database=target.database,\n default_schema='pinterest_ads',\n default_variable='advertiser_history',\n union_schema_variable='pinterest_ads_union_schemas',\n union_database_variable='pinterest_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='pinterest_ads_sources',\n single_source_name='pinterest_ads',\n single_table_name='advertiser_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["pinterest_ads", "advertiser_history"], ["pinterest_ads", "advertiser_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.pinterest.pinterest_ads.advertiser_history"]}, "compiled_path": "target/compiled/pinterest/models/staging/tmp/stg_pinterest_ads__advertiser_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: pinterest_ads_advertiser_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: pinterest_advertiser_history_data\n\n\n select\n \"id\",\n \"updated_time\",\n \"_fivetran_synced\",\n \"billing_profile_status\",\n \"billing_type\",\n \"country\",\n \"created_time\",\n \"currency\",\n \"merchant_id\",\n \"name\",\n \"owner_user_id\",\n \"status\",\n \"owner_username\",\n \"permissions\"\n from \"postgres\".\"public\".\"pinterest_advertiser_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__keyword_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__keyword_history_tmp", "resource_type": "model", "package_name": "pinterest", "path": "staging/tmp/stg_pinterest_ads__keyword_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_pinterest_ads__keyword_history_tmp.sql", "unique_id": "model.pinterest.stg_pinterest_ads__keyword_history_tmp", "fqn": ["pinterest", "staging", "tmp", "stg_pinterest_ads__keyword_history_tmp"], "alias": "stg_pinterest_ads__keyword_history_tmp", "checksum": {"name": "sha256", "checksum": "07a3a2c06c741e131f0f4dc7f7c5a4f0d35182a42d82799ab66d611aa30c7ffa"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708216.8548086, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__keyword_history_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__pinterest_ads_enabled','pinterest__using_keywords'])) }}\n\n{% if var('pinterest_ads_union_schemas', []) | length > 0 or var('pinterest_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='keyword_history',\n database_variable='pinterest_database',\n schema_variable='pinterest_schema',\n default_database=target.database,\n default_schema='pinterest_ads',\n default_variable='keyword_history',\n union_schema_variable='pinterest_ads_union_schemas',\n union_database_variable='pinterest_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='pinterest_ads_sources',\n single_source_name='pinterest_ads',\n single_table_name='keyword_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["pinterest_ads", "keyword_history"], ["pinterest_ads", "keyword_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.pinterest.pinterest_ads.keyword_history"]}, "compiled_path": "target/compiled/pinterest/models/staging/tmp/stg_pinterest_ads__keyword_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: pinterest_ads_keyword_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: pinterest_keyword_history_data\n\n\n select\n \"_fivetran_id\",\n \"_fivetran_synced\",\n \"ad_group_id\",\n \"advertiser_id\",\n \"archived\",\n \"bid\",\n \"campaign_id\",\n \"id\",\n \"match_type\",\n \"parent_type\",\n \"value\"\n from \"postgres\".\"public\".\"pinterest_keyword_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__pin_promotion_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__pin_promotion_report_tmp", "resource_type": "model", "package_name": "pinterest", "path": "staging/tmp/stg_pinterest_ads__pin_promotion_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_pinterest_ads__pin_promotion_report_tmp.sql", "unique_id": "model.pinterest.stg_pinterest_ads__pin_promotion_report_tmp", "fqn": ["pinterest", "staging", "tmp", "stg_pinterest_ads__pin_promotion_report_tmp"], "alias": "stg_pinterest_ads__pin_promotion_report_tmp", "checksum": {"name": "sha256", "checksum": "7f45f896d44c9d9ac38b3bd2229745b99ca5e330be6a9ada81c8d431e6b18973"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708216.865601, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\n{% if var('pinterest_ads_union_schemas', []) | length > 0 or var('pinterest_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='pin_promotion_report',\n database_variable='pinterest_database',\n schema_variable='pinterest_schema',\n default_database=target.database,\n default_schema='pinterest_ads',\n default_variable='pin_promotion_report',\n union_schema_variable='pinterest_ads_union_schemas',\n union_database_variable='pinterest_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='pinterest_ads_sources',\n single_source_name='pinterest_ads',\n single_table_name='pin_promotion_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["pinterest_ads", "pin_promotion_report"], ["pinterest_ads", "pin_promotion_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.pinterest.pinterest_ads.pin_promotion_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/tmp/stg_pinterest_ads__pin_promotion_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: pinterest_ads_pin_promotion_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: pinterest_pin_promotion_report_data\n\n\n select\n \"date\",\n \"pin_promotion_id\",\n \"ad_group_id\",\n \"campaign_id\",\n \"advertiser_id\",\n \"_fivetran_synced\",\n \"impression_1\",\n \"impression_2\",\n \"clickthrough_1\",\n \"clickthrough_2\",\n \"spend_in_micro_dollar\",\n \"total_conversions\",\n \"total_conversions_quantity\",\n \"total_conversions_value_in_micro_dollar\"\n from \"postgres\".\"public\".\"pinterest_pin_promotion_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__advertiser_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__advertiser_report_tmp", "resource_type": "model", "package_name": "pinterest", "path": "staging/tmp/stg_pinterest_ads__advertiser_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_pinterest_ads__advertiser_report_tmp.sql", "unique_id": "model.pinterest.stg_pinterest_ads__advertiser_report_tmp", "fqn": ["pinterest", "staging", "tmp", "stg_pinterest_ads__advertiser_report_tmp"], "alias": "stg_pinterest_ads__advertiser_report_tmp", "checksum": {"name": "sha256", "checksum": "0ca52710005610e018bc7136c1acf758b459197934ebfa6e47d949057e67af03"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708216.8762171, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\n{% if var('pinterest_ads_union_schemas', []) | length > 0 or var('pinterest_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='advertiser_report',\n database_variable='pinterest_database',\n schema_variable='pinterest_schema',\n default_database=target.database,\n default_schema='pinterest_ads',\n default_variable='advertiser_report',\n union_schema_variable='pinterest_ads_union_schemas',\n union_database_variable='pinterest_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='pinterest_ads_sources',\n single_source_name='pinterest_ads',\n single_table_name='advertiser_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["pinterest_ads", "advertiser_report"], ["pinterest_ads", "advertiser_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.pinterest.pinterest_ads.advertiser_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/tmp/stg_pinterest_ads__advertiser_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: pinterest_ads_advertiser_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: pinterest_advertiser_report_data\n\n\n select\n \"date\",\n \"advertiser_id\",\n \"_fivetran_synced\",\n \"impression_1\",\n \"impression_2\",\n \"clickthrough_1\",\n \"clickthrough_2\",\n \"spend_in_micro_dollar\",\n \"total_conversions\",\n \"total_conversions_quantity\",\n \"total_conversions_value_in_micro_dollar\"\n from \"postgres\".\"public\".\"pinterest_advertiser_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__ad_group_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__ad_group_history_tmp", "resource_type": "model", "package_name": "pinterest", "path": "staging/tmp/stg_pinterest_ads__ad_group_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_pinterest_ads__ad_group_history_tmp.sql", "unique_id": "model.pinterest.stg_pinterest_ads__ad_group_history_tmp", "fqn": ["pinterest", "staging", "tmp", "stg_pinterest_ads__ad_group_history_tmp"], "alias": "stg_pinterest_ads__ad_group_history_tmp", "checksum": {"name": "sha256", "checksum": "33a49af934069ae3deb3ecabcca30777f20f197a3ce758330c3bae8eaa097dfe"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708216.9624083, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__ad_group_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\n{% if var('pinterest_ads_union_schemas', []) | length > 0 or var('pinterest_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_group_history', \n database_variable='pinterest_database', \n schema_variable='pinterest_schema', \n default_database=target.database,\n default_schema='pinterest_ads',\n default_variable='ad_group_history',\n union_schema_variable='pinterest_ads_union_schemas',\n union_database_variable='pinterest_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='pinterest_ads_sources',\n single_source_name='pinterest_ads',\n single_table_name='ad_group_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["pinterest_ads", "ad_group_history"], ["pinterest_ads", "ad_group_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.pinterest.pinterest_ads.ad_group_history"]}, "compiled_path": "target/compiled/pinterest/models/staging/tmp/stg_pinterest_ads__ad_group_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: pinterest_ads_ad_group_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: pinterest_ad_group_history_data\n\n\n select\n \"id\",\n \"campaign_id\",\n \"created_time\",\n \"name\",\n \"status\",\n \"start_time\",\n \"end_time\",\n \"_fivetran_synced\",\n \"pacing_delivery_type\",\n \"placement_group\",\n \"summary_status\",\n \"ad_account_id\"\n from \"postgres\".\"public\".\"pinterest_ad_group_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__targeting_geo_region_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__targeting_geo_region_tmp", "resource_type": "model", "package_name": "pinterest", "path": "staging/tmp/stg_pinterest_ads__targeting_geo_region_tmp.sql", "original_file_path": "models/staging/tmp/stg_pinterest_ads__targeting_geo_region_tmp.sql", "unique_id": "model.pinterest.stg_pinterest_ads__targeting_geo_region_tmp", "fqn": ["pinterest", "staging", "tmp", "stg_pinterest_ads__targeting_geo_region_tmp"], "alias": "stg_pinterest_ads__targeting_geo_region_tmp", "checksum": {"name": "sha256", "checksum": "765550e6ca3fb178a2fdc71dfa377bdbd46f24e0cdade72f94628da25106c220"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708216.97321, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__targeting_geo_region_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__pinterest_ads_enabled', 'pinterest__using_targeting_geo_region'])) }}\n\n{% if var('pinterest_ads_union_schemas', []) | length > 0 or var('pinterest_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='targeting_geo_region',\n database_variable='pinterest_database',\n schema_variable='pinterest_schema',\n default_database=target.database,\n default_schema='pinterest_ads',\n default_variable='targeting_geo_region',\n union_schema_variable='pinterest_ads_union_schemas',\n union_database_variable='pinterest_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='pinterest_ads_sources',\n single_source_name='pinterest_ads',\n single_table_name='targeting_geo_region'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["pinterest_ads", "targeting_geo_region"], ["pinterest_ads", "targeting_geo_region"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.pinterest.pinterest_ads.targeting_geo_region"]}, "compiled_path": "target/compiled/pinterest/models/staging/tmp/stg_pinterest_ads__targeting_geo_region_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: pinterest_ads_targeting_geo_region_identifier\n -- database: postgres \n -- schema: public\n -- identifier: pinterest_targeting_geo_region_data\n\n\n select\n \"_fivetran_synced\",\n \"country_id\",\n \"region_id\",\n \"region_name\"\n from \"postgres\".\"public\".\"pinterest_targeting_geo_region_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__campaign_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__campaign_history_tmp", "resource_type": "model", "package_name": "pinterest", "path": "staging/tmp/stg_pinterest_ads__campaign_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_pinterest_ads__campaign_history_tmp.sql", "unique_id": "model.pinterest.stg_pinterest_ads__campaign_history_tmp", "fqn": ["pinterest", "staging", "tmp", "stg_pinterest_ads__campaign_history_tmp"], "alias": "stg_pinterest_ads__campaign_history_tmp", "checksum": {"name": "sha256", "checksum": "1b20d76a2d4f401b22ce88e7d7e940f0a7a39644a7bd8bd8397d53a7059dad3c"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708216.984079, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__pinterest_ads_enabled', True)) }}\n\n{% if var('pinterest_ads_union_schemas', []) | length > 0 or var('pinterest_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_history',\n database_variable='pinterest_database',\n schema_variable='pinterest_schema',\n default_database=target.database,\n default_schema='pinterest_ads',\n default_variable='campaign_history',\n union_schema_variable='pinterest_ads_union_schemas',\n union_database_variable='pinterest_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='pinterest_ads_sources',\n single_source_name='pinterest_ads',\n single_table_name='campaign_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["pinterest_ads", "campaign_history"], ["pinterest_ads", "campaign_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.pinterest.pinterest_ads.campaign_history"]}, "compiled_path": "target/compiled/pinterest/models/staging/tmp/stg_pinterest_ads__campaign_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: pinterest_ads_campaign_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: pinterest_campaign_history_data\n\n\n select\n \"id\",\n \"created_time\",\n \"name\",\n \"status\",\n \"_fivetran_synced\",\n \"advertiser_id\",\n \"default_ad_group_budget_in_micro_currency\",\n \"is_automated_campaign\",\n \"is_campaign_budget_optimization\",\n \"is_flexible_daily_budgets\"\n from \"postgres\".\"public\".\"pinterest_campaign_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__targeting_geo_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__targeting_geo_tmp", "resource_type": "model", "package_name": "pinterest", "path": "staging/tmp/stg_pinterest_ads__targeting_geo_tmp.sql", "original_file_path": "models/staging/tmp/stg_pinterest_ads__targeting_geo_tmp.sql", "unique_id": "model.pinterest.stg_pinterest_ads__targeting_geo_tmp", "fqn": ["pinterest", "staging", "tmp", "stg_pinterest_ads__targeting_geo_tmp"], "alias": "stg_pinterest_ads__targeting_geo_tmp", "checksum": {"name": "sha256", "checksum": "330aa403f8663b97e1c75951a9dc73860b164b1cb515d5ec17d6e75b5d74b3c0"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708216.9946558, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__targeting_geo_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__pinterest_ads_enabled', 'pinterest__using_targeting_geo'])) }}\n\n{% if var('pinterest_ads_union_schemas', []) | length > 0 or var('pinterest_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='targeting_geo',\n database_variable='pinterest_database',\n schema_variable='pinterest_schema',\n default_database=target.database,\n default_schema='pinterest_ads',\n default_variable='targeting_geo',\n union_schema_variable='pinterest_ads_union_schemas',\n union_database_variable='pinterest_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='pinterest_ads_sources',\n single_source_name='pinterest_ads',\n single_table_name='targeting_geo'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["pinterest_ads", "targeting_geo"], ["pinterest_ads", "targeting_geo"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.pinterest.pinterest_ads.targeting_geo"]}, "compiled_path": "target/compiled/pinterest/models/staging/tmp/stg_pinterest_ads__targeting_geo_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: pinterest_ads_targeting_geo_identifier\n -- database: postgres \n -- schema: public\n -- identifier: pinterest_targeting_geo_data\n\n\n select\n \"country_id\",\n \"country_name\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"pinterest_targeting_geo_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.pinterest.stg_pinterest_ads__keyword_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_pinterest_ads__keyword_report_tmp", "resource_type": "model", "package_name": "pinterest", "path": "staging/tmp/stg_pinterest_ads__keyword_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_pinterest_ads__keyword_report_tmp.sql", "unique_id": "model.pinterest.stg_pinterest_ads__keyword_report_tmp", "fqn": ["pinterest", "staging", "tmp", "stg_pinterest_ads__keyword_report_tmp"], "alias": "stg_pinterest_ads__keyword_report_tmp", "checksum": {"name": "sha256", "checksum": "3992915e51255cb556ab907d0e845f37b6606b37111e2acb4d6e27011d72b680"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708217.0066695, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__keyword_report_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__pinterest_ads_enabled','pinterest__using_keywords'])) }}\n\n{% if var('pinterest_ads_union_schemas', []) | length > 0 or var('pinterest_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='keyword_report',\n database_variable='pinterest_database',\n schema_variable='pinterest_schema',\n default_database=target.database,\n default_schema='pinterest_ads',\n default_variable='keyword_report',\n union_schema_variable='pinterest_ads_union_schemas',\n union_database_variable='pinterest_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='pinterest_ads_sources',\n single_source_name='pinterest_ads',\n single_table_name='keyword_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["pinterest_ads", "keyword_report"], ["pinterest_ads", "keyword_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.pinterest.pinterest_ads.keyword_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/tmp/stg_pinterest_ads__keyword_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: pinterest_ads_keyword_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: pinterest_keyword_report_data\n\n\n select\n \"date\",\n \"keyword_id\",\n \"pin_promotion_id\",\n \"ad_group_id\",\n \"ad_group_name\",\n \"ad_group_status\",\n \"campaign_id\",\n \"advertiser_id\",\n \"_fivetran_synced\",\n \"impression_1\",\n \"impression_2\",\n \"clickthrough_1\",\n \"clickthrough_2\",\n \"spend_in_micro_dollar\",\n \"total_conversions\",\n \"total_conversions_quantity\",\n \"total_conversions_value_in_micro_dollar\"\n from \"postgres\".\"public\".\"pinterest_keyword_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.google_ads__search_term_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "google_ads__search_term_report", "resource_type": "model", "package_name": "google_ads", "path": "google_ads__search_term_report.sql", "original_file_path": "models/google_ads__search_term_report.sql", "unique_id": "model.google_ads.google_ads__search_term_report", "fqn": ["google_ads", "google_ads__search_term_report"], "alias": "google_ads__search_term_report", "checksum": {"name": "sha256", "checksum": "49fdd52da3b4b0387112fc8a654aa7ce150963c2f1ab945a4642565e11ffd789"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance at the ad group level for search terms matching tracked keywords.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "account_name": {"name": "account_name", "description": "The descriptive name of the Customer account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.account_descriptive_name"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "currency_code": {"name": "currency_code", "description": "The currency which the account uses.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "search_term": {"name": "search_term", "description": "A word or set of words a person enters when searching on Google or one of Google's Search Network sites", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.search_term"]}, "keyword_text": {"name": "keyword_text", "description": "The text of the keyword (at most 80 characters and 10 words).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.info_text"]}, "search_term_match_type": {"name": "search_term_match_type", "description": "How closely the search terms that triggered your ads on Google are related to the actual keywords in your account. Can be `BROAD` ,`EXACT`, `PHRASE`, `UNKNOWN`, or `UNSPECIFIED`.\n\nSee more details [here](https://support.google.com/google-ads/answer/7478529?sjid=15681083914881504235-NC&visit_id=638760377693438101-1187740487&rd=1).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.search_term_match_type"]}, "status": {"name": "status", "description": "Indicates whether the search term is currently one of your targeted or excluded keywords. Possible values: `ADDED`, `ADDED_EXCLUDED`, `EXCLUDED`, `NONE`, `UNKNOWN`, or `UNSPECIFIED`", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.search_term_status"]}, "spend": {"name": "spend", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}, "criterion_id": {"name": "criterion_id", "description": "Reference to the ad group criterion used for the associated keyword. One `keyword_text` may have multiple `criterion_id` values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.8808002, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"google_ads__search_term_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True) and var('google_ads__using_search_term_keyword_stats', True)) }}\n\nwith stats as (\n\n select *\n from {{ ref('stg_google_ads__search_term_keyword_stats') }}\n), \n\ncampaigns_accounts as (\n\n select *\n from {{ ref('int_google_ads__campaigns_accounts') }}\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_google_ads__ad_group_history') }}\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n stats.source_relation,\n stats.date_day,\n campaigns_accounts.account_name,\n stats.account_id,\n campaigns_accounts.currency_code,\n campaigns_accounts.campaign_name,\n stats.campaign_id,\n ad_groups.ad_group_name,\n stats.ad_group_id,\n stats.search_term,\n stats.keyword_text,\n stats.criterion_id,\n stats.search_term_match_type,\n stats.status,\n sum(stats.spend) as spend,\n sum(stats.clicks) as clicks,\n sum(stats.impressions) as impressions,\n sum(stats.conversions) as conversions,\n sum(stats.conversions_value) as conversions_value,\n sum(stats.view_through_conversions) as view_through_conversions\n\n {{ google_ads_persist_pass_through_columns(pass_through_variable='google_ads__search_term_keyword_stats_passthrough_metrics', identifier='stats', transform='sum', coalesce_with=0) }}\n\n from stats\n left join ad_groups\n on stats.ad_group_id = ad_groups.ad_group_id\n and stats.source_relation = ad_groups.source_relation\n left join campaigns_accounts\n on stats.campaign_id = campaigns_accounts.campaign_id\n and stats.source_relation = campaigns_accounts.source_relation\n {{ dbt_utils.group_by(14) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__search_term_keyword_stats", "package": null, "version": null}, {"name": "int_google_ads__campaigns_accounts", "package": null, "version": null}, {"name": "stg_google_ads__ad_group_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.google_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.google_ads.stg_google_ads__search_term_keyword_stats", "model.google_ads.int_google_ads__campaigns_accounts", "model.google_ads.stg_google_ads__ad_group_history"]}, "compiled_path": "target/compiled/google_ads/models/google_ads__search_term_report.sql", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__int_google_ads__campaigns_accounts as (\n\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final\n), stats as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__search_term_keyword_stats\"\n), \n\ncampaigns_accounts as (\n\n select *\n from __dbt__cte__int_google_ads__campaigns_accounts\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n stats.source_relation,\n stats.date_day,\n campaigns_accounts.account_name,\n stats.account_id,\n campaigns_accounts.currency_code,\n campaigns_accounts.campaign_name,\n stats.campaign_id,\n ad_groups.ad_group_name,\n stats.ad_group_id,\n stats.search_term,\n stats.keyword_text,\n stats.criterion_id,\n stats.search_term_match_type,\n stats.status,\n sum(stats.spend) as spend,\n sum(stats.clicks) as clicks,\n sum(stats.impressions) as impressions,\n sum(stats.conversions) as conversions,\n sum(stats.conversions_value) as conversions_value,\n sum(stats.view_through_conversions) as view_through_conversions\n\n \n\n\n\n\n\n from stats\n left join ad_groups\n on stats.ad_group_id = ad_groups.ad_group_id\n and stats.source_relation = ad_groups.source_relation\n left join campaigns_accounts\n on stats.campaign_id = campaigns_accounts.campaign_id\n and stats.source_relation = campaigns_accounts.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.google_ads.int_google_ads__campaigns_accounts", "sql": " __dbt__cte__int_google_ads__campaigns_accounts as (\n\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.google_ads__ad_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "google_ads__ad_report", "resource_type": "model", "package_name": "google_ads", "path": "google_ads__ad_report.sql", "original_file_path": "models/google_ads__ad_report.sql", "unique_id": "model.google_ads.google_ads__ad_report", "fqn": ["google_ads", "google_ads__ad_report"], "alias": "google_ads__ad_report", "checksum": {"name": "sha256", "checksum": "dc31e0c4b6d55b87821c25127e6223e9058a3d8319f00eee4a900cc9ebd509b3"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance at the ad level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "account_name": {"name": "account_name", "description": "The descriptive name of the Customer account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.account_descriptive_name"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "currency_code": {"name": "currency_code", "description": "The currency which the account uses.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "ad_id": {"name": "ad_id", "description": "The unique identifier of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "display_url": {"name": "display_url", "description": "The url which is displayed with the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "source_final_urls": {"name": "source_final_urls", "description": "The final urls that are used within the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_status": {"name": "ad_status", "description": "The status of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_type": {"name": "ad_type", "description": "The type of the ad that is being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.8742104, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"google_ads__ad_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith stats as (\n\n select *\n from {{ ref('stg_google_ads__ad_stats') }}\n), \n\ncampaigns_accounts as (\n\n select *\n from {{ ref('int_google_ads__campaigns_accounts') }}\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_google_ads__ad_group_history') }}\n where is_most_recent_record = True\n),\n\nads as (\n\n select *\n from {{ ref('stg_google_ads__ad_history') }}\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n stats.source_relation,\n stats.date_day,\n campaigns_accounts.account_name,\n campaigns_accounts.account_id,\n campaigns_accounts.currency_code,\n campaigns_accounts.campaign_name,\n campaigns_accounts.campaign_id,\n ad_groups.ad_group_name,\n stats.ad_group_id,\n stats.ad_id,\n ads.ad_name,\n ads.ad_status,\n ads.ad_type,\n ads.display_url,\n ads.source_final_urls,\n sum(stats.spend) as spend,\n sum(stats.clicks) as clicks,\n sum(stats.impressions) as impressions,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value,\n sum(view_through_conversions) as view_through_conversions\n\n {{ google_ads_persist_pass_through_columns(pass_through_variable='google_ads__ad_stats_passthrough_metrics', identifier='stats', transform='sum', coalesce_with=0, exclude_fields=['conversions','conversions_value','view_through_conversions']) }}\n\n from stats\n left join ads\n on stats.ad_id = ads.ad_id\n and stats.source_relation = ads.source_relation\n and stats.ad_group_id = ads.ad_group_id\n left join ad_groups\n on ads.ad_group_id = ad_groups.ad_group_id\n and ads.source_relation = ad_groups.source_relation\n left join campaigns_accounts\n on ad_groups.campaign_id = campaigns_accounts.campaign_id\n and ad_groups.source_relation = campaigns_accounts.source_relation\n {{ dbt_utils.group_by(15) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_stats", "package": null, "version": null}, {"name": "int_google_ads__campaigns_accounts", "package": null, "version": null}, {"name": "stg_google_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_google_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.google_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.google_ads.stg_google_ads__ad_stats", "model.google_ads.int_google_ads__campaigns_accounts", "model.google_ads.stg_google_ads__ad_group_history", "model.google_ads.stg_google_ads__ad_history"]}, "compiled_path": "target/compiled/google_ads/models/google_ads__ad_report.sql", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__int_google_ads__campaigns_accounts as (\n\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final\n), stats as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_stats\"\n), \n\ncampaigns_accounts as (\n\n select *\n from __dbt__cte__int_google_ads__campaigns_accounts\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_history\"\n where is_most_recent_record = True\n),\n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_history\"\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n stats.source_relation,\n stats.date_day,\n campaigns_accounts.account_name,\n campaigns_accounts.account_id,\n campaigns_accounts.currency_code,\n campaigns_accounts.campaign_name,\n campaigns_accounts.campaign_id,\n ad_groups.ad_group_name,\n stats.ad_group_id,\n stats.ad_id,\n ads.ad_name,\n ads.ad_status,\n ads.ad_type,\n ads.display_url,\n ads.source_final_urls,\n sum(stats.spend) as spend,\n sum(stats.clicks) as clicks,\n sum(stats.impressions) as impressions,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value,\n sum(view_through_conversions) as view_through_conversions\n\n \n\n\n\n\n\n from stats\n left join ads\n on stats.ad_id = ads.ad_id\n and stats.source_relation = ads.source_relation\n and stats.ad_group_id = ads.ad_group_id\n left join ad_groups\n on ads.ad_group_id = ad_groups.ad_group_id\n and ads.source_relation = ad_groups.source_relation\n left join campaigns_accounts\n on ad_groups.campaign_id = campaigns_accounts.campaign_id\n and ad_groups.source_relation = campaigns_accounts.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.google_ads.int_google_ads__campaigns_accounts", "sql": " __dbt__cte__int_google_ads__campaigns_accounts as (\n\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.google_ads__ad_group_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "google_ads__ad_group_report", "resource_type": "model", "package_name": "google_ads", "path": "google_ads__ad_group_report.sql", "original_file_path": "models/google_ads__ad_group_report.sql", "unique_id": "model.google_ads.google_ads__ad_group_report", "fqn": ["google_ads", "google_ads__ad_group_report"], "alias": "google_ads__ad_group_report", "checksum": {"name": "sha256", "checksum": "fe10e735f038ef73b6198421fe276e3dc5c29eb34daea07a1e649b88b90e265b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance at the ad group level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "account_name": {"name": "account_name", "description": "The descriptive name of the Customer account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.account_descriptive_name"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "currency_code": {"name": "currency_code", "description": "The currency which the account uses.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "ad_group_status": {"name": "ad_group_status", "description": "The status of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_type": {"name": "ad_group_type", "description": "The type of ad group which is serving ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.871758, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"google_ads__ad_group_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith stats as (\n\n select *\n from {{ ref('stg_google_ads__ad_group_stats') }}\n),\n\ncampaigns_accounts as (\n\n select *\n from {{ ref('int_google_ads__campaigns_accounts') }}\n),\n\nad_groups as (\n\n select *\n from {{ ref('stg_google_ads__ad_group_history') }}\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n stats.source_relation,\n stats.date_day,\n campaigns_accounts.account_name,\n campaigns_accounts.account_id,\n campaigns_accounts.currency_code,\n campaigns_accounts.campaign_name,\n campaigns_accounts.campaign_id,\n ad_groups.ad_group_name,\n stats.ad_group_id,\n ad_groups.ad_group_status,\n ad_groups.ad_group_type,\n sum(stats.spend) as spend,\n sum(stats.clicks) as clicks,\n sum(stats.impressions) as impressions,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value,\n sum(view_through_conversions) as view_through_conversions\n\n {{ google_ads_persist_pass_through_columns(pass_through_variable='google_ads__ad_group_stats_passthrough_metrics', identifier='stats', transform='sum', coalesce_with=0, exclude_fields=['conversions','conversions_value','view_through_conversions']) }}\n\n from stats\n left join ad_groups\n on stats.ad_group_id = ad_groups.ad_group_id\n and stats.source_relation = ad_groups.source_relation\n left join campaigns_accounts\n on ad_groups.campaign_id = campaigns_accounts.campaign_id\n and ad_groups.source_relation = campaigns_accounts.source_relation\n {{ dbt_utils.group_by(11) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_group_stats", "package": null, "version": null}, {"name": "int_google_ads__campaigns_accounts", "package": null, "version": null}, {"name": "stg_google_ads__ad_group_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.google_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.google_ads.stg_google_ads__ad_group_stats", "model.google_ads.int_google_ads__campaigns_accounts", "model.google_ads.stg_google_ads__ad_group_history"]}, "compiled_path": "target/compiled/google_ads/models/google_ads__ad_group_report.sql", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__int_google_ads__campaigns_accounts as (\n\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final\n), stats as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_stats\"\n),\n\ncampaigns_accounts as (\n\n select *\n from __dbt__cte__int_google_ads__campaigns_accounts\n),\n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n stats.source_relation,\n stats.date_day,\n campaigns_accounts.account_name,\n campaigns_accounts.account_id,\n campaigns_accounts.currency_code,\n campaigns_accounts.campaign_name,\n campaigns_accounts.campaign_id,\n ad_groups.ad_group_name,\n stats.ad_group_id,\n ad_groups.ad_group_status,\n ad_groups.ad_group_type,\n sum(stats.spend) as spend,\n sum(stats.clicks) as clicks,\n sum(stats.impressions) as impressions,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value,\n sum(view_through_conversions) as view_through_conversions\n\n \n\n\n\n\n\n from stats\n left join ad_groups\n on stats.ad_group_id = ad_groups.ad_group_id\n and stats.source_relation = ad_groups.source_relation\n left join campaigns_accounts\n on ad_groups.campaign_id = campaigns_accounts.campaign_id\n and ad_groups.source_relation = campaigns_accounts.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.google_ads.int_google_ads__campaigns_accounts", "sql": " __dbt__cte__int_google_ads__campaigns_accounts as (\n\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.google_ads__account_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "google_ads__account_report", "resource_type": "model", "package_name": "google_ads", "path": "google_ads__account_report.sql", "original_file_path": "models/google_ads__account_report.sql", "unique_id": "model.google_ads.google_ads__account_report", "fqn": ["google_ads", "google_ads__account_report"], "alias": "google_ads__account_report", "checksum": {"name": "sha256", "checksum": "aaa1bae43d7a161831bcbbe9dec200c01c7189f790f6d6a7d1070862d2bafef5"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance at the account level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "account_name": {"name": "account_name", "description": "The descriptive name of the Customer account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.account_descriptive_name"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "time_zone": {"name": "time_zone", "description": "The time zone which the account is located.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency_code": {"name": "currency_code", "description": "The currency which the account uses.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "auto_tagging_enabled": {"name": "auto_tagging_enabled", "description": "Boolean indicating if the account uses auto tagging within ad urls.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.8700466, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"google_ads__account_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith stats as (\n\n select *\n from {{ ref('stg_google_ads__account_stats') }}\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_google_ads__account_history') }}\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n stats.source_relation,\n stats.date_day,\n accounts.account_name,\n stats.account_id,\n accounts.currency_code,\n accounts.auto_tagging_enabled,\n accounts.time_zone,\n sum(stats.spend) as spend,\n sum(stats.clicks) as clicks,\n sum(stats.impressions) as impressions,\n sum(stats.conversions) as conversions,\n sum(stats.conversions_value) as conversions_value,\n sum(stats.view_through_conversions) as view_through_conversions\n\n {{ google_ads_persist_pass_through_columns(pass_through_variable='google_ads__account_stats_passthrough_metrics', identifier='stats', transform='sum', coalesce_with=0, exclude_fields=['conversions','conversions_value','view_through_conversions']) }}\n\n from stats\n left join accounts\n on stats.account_id = accounts.account_id\n and stats.source_relation = accounts.source_relation\n {{ dbt_utils.group_by(7) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__account_stats", "package": null, "version": null}, {"name": "stg_google_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.google_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.google_ads.stg_google_ads__account_stats", "model.google_ads.stg_google_ads__account_history"]}, "compiled_path": "target/compiled/google_ads/models/google_ads__account_report.sql", "compiled": true, "compiled_code": "\n\nwith stats as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_stats\"\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n stats.source_relation,\n stats.date_day,\n accounts.account_name,\n stats.account_id,\n accounts.currency_code,\n accounts.auto_tagging_enabled,\n accounts.time_zone,\n sum(stats.spend) as spend,\n sum(stats.clicks) as clicks,\n sum(stats.impressions) as impressions,\n sum(stats.conversions) as conversions,\n sum(stats.conversions_value) as conversions_value,\n sum(stats.view_through_conversions) as view_through_conversions\n\n \n\n\n\n\n\n from stats\n left join accounts\n on stats.account_id = accounts.account_id\n and stats.source_relation = accounts.source_relation\n group by 1,2,3,4,5,6,7\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.google_ads__campaign_bid_modifiers_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "google_ads__campaign_bid_modifiers_report", "resource_type": "model", "package_name": "google_ads", "path": "google_ads__campaign_bid_modifiers_report.sql", "original_file_path": "models/google_ads__campaign_bid_modifiers_report.sql", "unique_id": "model.google_ads.google_ads__campaign_bid_modifiers_report", "fqn": ["google_ads", "google_ads__campaign_bid_modifiers_report"], "alias": "google_ads__campaign_bid_modifiers_report", "checksum": {"name": "sha256", "checksum": "b8acc437825d9c45198b8645dfe87e2da50055e914fa2aca8b12b8ecebcea142"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a specific bid modifier and its performance insights. Data is at the campaign-criterion grain since bid modifiers are campaign-level settings, and analysis focuses on overall modifier effectiveness. Campaigns with no bid modifiers will have a null criterion record.", "columns": {"bid_modifier_report_key": {"name": "bid_modifier_report_key", "description": "Surrogate key for the campaign bid modifiers report, combining source_relation, account_id, campaign_id, and criterion_id.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "account_name": {"name": "account_name", "description": "The descriptive name of the Customer account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.account_descriptive_name"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_name"]}, "advertising_channel_type": {"name": "advertising_channel_type", "description": "The type of advertising channel being used by the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertising_channel_subtype": {"name": "advertising_channel_subtype", "description": "The advertising channel subtype that is being used by the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "General status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "serving_status": {"name": "serving_status", "description": "Status of the ads and how they are currently being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_campaign_live": {"name": "is_campaign_live", "description": "Boolean indicating if the campaign is both enabled and actively serving (campaign_status = 'ENABLED' and serving_status = 'SERVING').", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bidding_strategy_type": {"name": "bidding_strategy_type", "description": "The type of bidding strategy (MANUAL_CPC, TARGET_CPA, etc.).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "target_cpa": {"name": "target_cpa", "description": "Target cost per acquisition.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "target_roas": {"name": "target_roas", "description": "Target return on ad spend.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "enhanced_cpc": {"name": "enhanced_cpc", "description": "Boolean indicating if enhanced CPC is enabled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "manual_cpa": {"name": "manual_cpa", "description": "Manual cost per acquisition setting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "manual_cpm": {"name": "manual_cpm", "description": "Manual cost per mille setting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "manual_cpv": {"name": "manual_cpv", "description": "Manual cost per view setting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bidding_status": {"name": "bidding_status", "description": "The status of the bidding strategy.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "criterion_id": {"name": "criterion_id", "description": "Unique identifier of the criterion that the bid modifier is applied to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_modifier": {"name": "bid_modifier", "description": "The modifier applied to the bid for this criterion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "interaction_type": {"name": "interaction_type", "description": "The type of interaction for the bid modifier.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "interaction_event_types": {"name": "interaction_event_types", "description": "The event types for the interaction.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "modifier_type": {"name": "modifier_type", "description": "The type of modifier (device, location, age_range, gender, income_range, parental_status, audience, keyword, topic, placement, or other).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "modifier_direction": {"name": "modifier_direction", "description": "Direction of the modifier (positive adjustment, negative adjustment, no adjustment, no modifier set).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "modifier_change": {"name": "modifier_change", "description": "The bid modifier change as a decimal (bid_modifier - 1).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_spend": {"name": "total_spend", "description": "Total spend in the last 30 days.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "avg_ctr": {"name": "avg_ctr", "description": "Average click-through rate as a decimal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "avg_cpc": {"name": "avg_cpc", "description": "Average cost per click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "calculated_observation": {"name": "calculated_observation", "description": "Performance observation that drives the recommendation based on configurable thresholds from individual low/high threshold variables like `google_ads__cpc_low`, `google_ads__cpc_high`, `google_ads__ctr_low`, `google_ads__ctr_high`, `google_ads__spend_low`, `google_ads__spend_high`, and `google_ads__bid_modifier_low`, `google_ads__bid_modifier_high`. Possible values include campaign disabled, campaign ended, not serving, high cpc, low ctr, high spend, manual bidding, disabled modifier, high positive modifier, significant negative modifier, high performance, high spend + poor performance, moderate performance, low spend, and normal performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "calculated_recommendation": {"name": "calculated_recommendation", "description": "Inferred action for bid modifier optimization based on dbt package logic and configurable threshold variables (Add modifiers, Review adjustments, Monitor performance, Monitor).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "calculated_priority": {"name": "calculated_priority", "description": "Inferred priority level for focusing on most critical issues first (high, medium, low), derived from configurable performance threshold variables.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.8898122, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"google_ads__campaign_bid_modifiers_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True) and var('google_ads__using_campaign_bid_modifier_history', True)) }}\n\n{% set using_campaign_bidding_strategy_history = var('google_ads__using_campaign_bidding_strategy_history', True) %}\n{% set using_campaign_criterion_history = var('google_ads__using_campaign_criterion_history', True) %}\n\n{% set diagnostic_thresholds = get_threshold_high_lows() %}\n\nwith bid_modifiers as (\n select *\n from {{ ref('stg_google_ads__campaign_bid_modifier_history') }}\n where is_most_recent_record = True\n),\n\n{% if using_campaign_bidding_strategy_history %}\nbidding_strategy as (\n select *\n from {{ ref('stg_google_ads__campaign_bidding_strategy_history') }}\n where is_most_recent_record = True\n),\n{% endif %}\n\n{% if using_campaign_criterion_history %}\ncampaign_criterion as (\n select *\n from {{ ref('stg_google_ads__campaign_criterion_history') }}\n where is_most_recent_record = True\n),\n{% endif %}\n\ncampaigns_accounts as (\n select *\n from {{ ref('int_google_ads__campaigns_accounts') }}\n),\n\n-- Performance by campaign last 30 days from staging\nrecent_campaign_performance as (\n select\n campaign_id,\n source_relation,\n sum(spend) as total_spend,\n sum(clicks) as total_clicks,\n sum(impressions) as total_impressions,\n\n -- CTR = Click-Through Rate (shows if bid adjustments improve engagement)\n {{ dbt_utils.safe_divide('sum(clicks)', 'sum(impressions)') }} as avg_ctr,\n -- CPC = Cost Per Click (shows actual cost impact of bid modifications)\n {{ dbt_utils.safe_divide('sum(spend)', 'sum(clicks)') }} as avg_cpc\n from {{ ref('stg_google_ads__campaign_stats') }}\n -- Rolling 30-day window for recent performance analysis\n -- Note: This creates non-deterministic results that change daily, which is intentional\n -- to provide current performance context for bid modifier recommendations\n where date_day >= {{ dbt.dateadd('day', -30, dbt.current_timestamp()) }}\n group by 1, 2\n),\n\n-- Base data gathering with joins and basic field calculations\ncampaign_base as (\n select\n campaigns_accounts.source_relation,\n campaigns_accounts.account_name,\n campaigns_accounts.account_id,\n campaigns_accounts.campaign_id,\n campaigns_accounts.campaign_name,\n campaigns_accounts.advertising_channel_type,\n campaigns_accounts.advertising_channel_subtype,\n campaigns_accounts.campaign_status,\n campaigns_accounts.serving_status,\n\n -- Helper field for live campaigns\n case\n when upper(campaigns_accounts.campaign_status) = 'ENABLED' and upper(campaigns_accounts.serving_status) = 'SERVING' then true\n else false\n end as is_campaign_live,\n\n {% if var('google_ads__using_campaign_bidding_strategy_history', True) %}\n -- Bidding strategy information\n coalesce(bidding_strategy.bidding_strategy_type, 'unknown') as bidding_strategy_type,\n coalesce(bidding_strategy.target_cpa, 0) as target_cpa,\n bidding_strategy.target_roas,\n bidding_strategy.enhanced_cpc,\n bidding_strategy.manual_cpa,\n bidding_strategy.manual_cpm,\n bidding_strategy.manual_cpv,\n bidding_strategy.bidding_status,\n {% endif %}\n\n -- Bid modifier information\n bid_modifiers.criterion_id,\n bid_modifiers.bid_modifier,\n bid_modifiers.interaction_type,\n bid_modifiers.interaction_event_types,\n\n {% if var('google_ads__using_campaign_criterion_history', True) %}\n -- Categorize modifier type based on criterion relationships\n case\n when campaign_criterion.device_type is not null then 'device'\n when campaign_criterion.geo_target_constant_id is not null then 'location'\n when campaign_criterion.age_range_type is not null then 'age_range'\n when campaign_criterion.gender_type is not null then 'gender'\n when campaign_criterion.income_range_type is not null then 'income_range'\n when campaign_criterion.parental_status_type is not null then 'parental_status'\n when campaign_criterion.user_list_id is not null then 'audience'\n when campaign_criterion.keyword_text is not null then 'keyword'\n when campaign_criterion.topic_constant_id is not null then 'topic'\n when campaign_criterion.placement_url is not null then 'placement'\n else 'other'\n end as modifier_type,\n {% else %}\n 'unknown' as modifier_type,\n {% endif %}\n\n case\n when bid_modifiers.bid_modifier = 0 then 'disabled'\n when bid_modifiers.bid_modifier > 1 then 'positive adjustment'\n when bid_modifiers.bid_modifier < 1 and bid_modifiers.bid_modifier > 0 then 'negative adjustment'\n when bid_modifiers.bid_modifier = 1 then 'no adjustment'\n else 'no modifier set'\n end as modifier_direction,\n\n -- Bid modifier change (decimal)\n case\n when bid_modifiers.bid_modifier is not null then (bid_modifiers.bid_modifier - 1)\n else 0\n end as modifier_change,\n\n -- Performance metrics to evaluate bid modifier effectiveness\n coalesce(recent_campaign_performance.total_spend, 0) as total_spend,\n coalesce(recent_campaign_performance.avg_ctr, 0) as avg_ctr,\n coalesce(recent_campaign_performance.avg_cpc, 0) as avg_cpc\n\n from campaigns_accounts\n left join bid_modifiers\n on campaigns_accounts.campaign_id = bid_modifiers.campaign_id\n and campaigns_accounts.source_relation = bid_modifiers.source_relation\n left join recent_campaign_performance\n on campaigns_accounts.campaign_id = recent_campaign_performance.campaign_id\n and campaigns_accounts.source_relation = recent_campaign_performance.source_relation\n\n {% if var('google_ads__using_campaign_bidding_strategy_history', True) %}\n left join bidding_strategy\n on campaigns_accounts.campaign_id = bidding_strategy.campaign_id\n and campaigns_accounts.source_relation = bidding_strategy.source_relation\n {% endif %}\n\n {% if var('google_ads__using_campaign_criterion_history', True) %}\n left join campaign_criterion\n on bid_modifiers.criterion_id = campaign_criterion.criterion_id\n and campaigns_accounts.campaign_id = campaign_criterion.campaign_id\n and campaigns_accounts.source_relation = campaign_criterion.source_relation\n {% endif %}\n),\n\n-- Determine recommendation reason based on performance thresholds and current bid settings\nrecommendation_logic as (\n select\n *,\n -- Inferred performance observation that drives the recommendation\n case\n when campaign_status in ('REMOVED', 'PAUSED')\n then 'campaign disabled'\n when serving_status = 'ENDED'\n then 'campaign ended'\n when serving_status != 'SERVING'\n then 'not serving'\n when avg_cpc > {{ diagnostic_thresholds['cpc']['high'] }}\n and bid_modifier is null\n and is_campaign_live\n then 'high cpc'\n when avg_ctr < {{ diagnostic_thresholds['ctr']['low'] }}\n and bid_modifier > 1\n and is_campaign_live\n then 'low ctr'\n when total_spend > {{ diagnostic_thresholds['spend']['high'] }}\n and bid_modifier is null\n and is_campaign_live\n then 'high spend'\n {% if var('google_ads__using_campaign_bidding_strategy_history', True) %}\n when lower(bidding_strategy_type) in ('manual_cpc', 'enhanced_cpc')\n and bid_modifier is null\n then 'manual bidding'\n {% endif %}\n when bid_modifier = 0\n then 'disabled modifier'\n when bid_modifier > {{ diagnostic_thresholds['bid_modifier']['high'] }}\n then 'high positive modifier'\n when bid_modifier < {{ diagnostic_thresholds['bid_modifier']['low'] }} and bid_modifier > 0\n then 'significant negative modifier'\n when avg_ctr >= {{ diagnostic_thresholds['ctr']['high'] }}\n and avg_cpc <= {{ diagnostic_thresholds['cpc']['low'] }}\n then 'high performance'\n when total_spend > {{ diagnostic_thresholds['spend']['high'] }}\n and avg_ctr < {{ diagnostic_thresholds['ctr']['low'] }}\n then 'high spend + poor performance'\n when total_spend >= {{ diagnostic_thresholds['spend']['low'] }}\n and total_spend <= {{ diagnostic_thresholds['spend']['high'] }}\n and avg_ctr >= {{ diagnostic_thresholds['ctr']['low'] }}\n then 'moderate performance'\n when total_spend < {{ diagnostic_thresholds['spend']['low'] }}\n and total_spend > 0\n then 'low spend'\n else 'no notable observation'\n end as calculated_observation\n\n from campaign_base\n),\n\n-- derive action from reason to avoid duplicating threshold logic\nfinal as (\n select\n *,\n -- inferred action based on the performance observation\n case\n when calculated_observation = 'campaign disabled' then 'enable campaign'\n when calculated_observation = 'campaign ended' then 'review or restart campaign'\n when calculated_observation = 'not serving' then 'resolve serving issues'\n when calculated_observation in ('high cpc', 'high spend', 'manual bidding') then 'add modifiers'\n when calculated_observation in ('low ctr', 'significant negative modifier', 'disabled modifier') then 'review adjustments'\n when calculated_observation = 'high positive modifier' then 'monitor performance'\n when calculated_observation = 'high performance' then 'scale successful modifiers'\n when calculated_observation = 'high spend + poor performance' then 'optimize bid modifiers'\n when calculated_observation = 'moderate performance' then 'optimize gradually'\n when calculated_observation = 'low spend' then 'consider increasing budget'\n else 'monitor'\n end as calculated_recommendation,\n\n -- inferred priority level for focusing on most critical issues first\n case\n -- High: Campaign blocking issues\n when calculated_observation in ('campaign disabled', 'not serving') then 'high'\n\n -- High: Cost/spend issues requiring immediate attention\n when calculated_observation in ('high cpc', 'high spend', 'high spend + poor performance') then 'high'\n\n -- Medium: Setup and optimization issues\n when calculated_observation = 'campaign ended' then 'medium'\n when calculated_observation in ('significant negative modifier', 'low ctr', 'disabled modifier') then 'medium'\n when calculated_observation in ('manual bidding', 'high positive modifier') then 'medium'\n\n -- Low: Normal operations and good performance\n when calculated_observation in ('high performance', 'moderate performance', 'low spend') then 'low'\n else 'low'\n end as calculated_priority\n from recommendation_logic\n)\n\nselect\n *,\n {{ dbt_utils.generate_surrogate_key(['source_relation', 'account_id', 'campaign_id', 'criterion_id']) }} as bid_modifier_report_key\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_bid_modifier_history", "package": null, "version": null}, {"name": "stg_google_ads__campaign_bidding_strategy_history", "package": null, "version": null}, {"name": "stg_google_ads__campaign_criterion_history", "package": null, "version": null}, {"name": "int_google_ads__campaigns_accounts", "package": null, "version": null}, {"name": "stg_google_ads__campaign_stats", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_threshold_high_lows", "macro.dbt_utils.safe_divide", "macro.dbt.current_timestamp", "macro.dbt.dateadd", "macro.dbt_utils.generate_surrogate_key"], "nodes": ["model.google_ads.stg_google_ads__campaign_bid_modifier_history", "model.google_ads.stg_google_ads__campaign_bidding_strategy_history", "model.google_ads.stg_google_ads__campaign_criterion_history", "model.google_ads.int_google_ads__campaigns_accounts", "model.google_ads.stg_google_ads__campaign_stats"]}, "compiled_path": "target/compiled/google_ads/models/google_ads__campaign_bid_modifiers_report.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\nwith __dbt__cte__int_google_ads__campaigns_accounts as (\n\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final\n), bid_modifiers as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_bid_modifier_history\"\n where is_most_recent_record = True\n),\n\n\nbidding_strategy as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_bidding_strategy_history\"\n where is_most_recent_record = True\n),\n\n\n\ncampaign_criterion as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_criterion_history\"\n where is_most_recent_record = True\n),\n\n\ncampaigns_accounts as (\n select *\n from __dbt__cte__int_google_ads__campaigns_accounts\n),\n\n-- Performance by campaign last 30 days from staging\nrecent_campaign_performance as (\n select\n campaign_id,\n source_relation,\n sum(spend) as total_spend,\n sum(clicks) as total_clicks,\n sum(impressions) as total_impressions,\n\n -- CTR = Click-Through Rate (shows if bid adjustments improve engagement)\n \n ( sum(clicks) ) / nullif( ( sum(impressions) ), 0)\n as avg_ctr,\n -- CPC = Cost Per Click (shows actual cost impact of bid modifications)\n \n ( sum(spend) ) / nullif( ( sum(clicks) ), 0)\n as avg_cpc\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_stats\"\n -- Rolling 30-day window for recent performance analysis\n -- Note: This creates non-deterministic results that change daily, which is intentional\n -- to provide current performance context for bid modifier recommendations\n where date_day >= \n\n now() + ((interval '1 day') * (-30))\n\n\n group by 1, 2\n),\n\n-- Base data gathering with joins and basic field calculations\ncampaign_base as (\n select\n campaigns_accounts.source_relation,\n campaigns_accounts.account_name,\n campaigns_accounts.account_id,\n campaigns_accounts.campaign_id,\n campaigns_accounts.campaign_name,\n campaigns_accounts.advertising_channel_type,\n campaigns_accounts.advertising_channel_subtype,\n campaigns_accounts.campaign_status,\n campaigns_accounts.serving_status,\n\n -- Helper field for live campaigns\n case\n when upper(campaigns_accounts.campaign_status) = 'ENABLED' and upper(campaigns_accounts.serving_status) = 'SERVING' then true\n else false\n end as is_campaign_live,\n\n \n -- Bidding strategy information\n coalesce(bidding_strategy.bidding_strategy_type, 'unknown') as bidding_strategy_type,\n coalesce(bidding_strategy.target_cpa, 0) as target_cpa,\n bidding_strategy.target_roas,\n bidding_strategy.enhanced_cpc,\n bidding_strategy.manual_cpa,\n bidding_strategy.manual_cpm,\n bidding_strategy.manual_cpv,\n bidding_strategy.bidding_status,\n \n\n -- Bid modifier information\n bid_modifiers.criterion_id,\n bid_modifiers.bid_modifier,\n bid_modifiers.interaction_type,\n bid_modifiers.interaction_event_types,\n\n \n -- Categorize modifier type based on criterion relationships\n case\n when campaign_criterion.device_type is not null then 'device'\n when campaign_criterion.geo_target_constant_id is not null then 'location'\n when campaign_criterion.age_range_type is not null then 'age_range'\n when campaign_criterion.gender_type is not null then 'gender'\n when campaign_criterion.income_range_type is not null then 'income_range'\n when campaign_criterion.parental_status_type is not null then 'parental_status'\n when campaign_criterion.user_list_id is not null then 'audience'\n when campaign_criterion.keyword_text is not null then 'keyword'\n when campaign_criterion.topic_constant_id is not null then 'topic'\n when campaign_criterion.placement_url is not null then 'placement'\n else 'other'\n end as modifier_type,\n \n\n case\n when bid_modifiers.bid_modifier = 0 then 'disabled'\n when bid_modifiers.bid_modifier > 1 then 'positive adjustment'\n when bid_modifiers.bid_modifier < 1 and bid_modifiers.bid_modifier > 0 then 'negative adjustment'\n when bid_modifiers.bid_modifier = 1 then 'no adjustment'\n else 'no modifier set'\n end as modifier_direction,\n\n -- Bid modifier change (decimal)\n case\n when bid_modifiers.bid_modifier is not null then (bid_modifiers.bid_modifier - 1)\n else 0\n end as modifier_change,\n\n -- Performance metrics to evaluate bid modifier effectiveness\n coalesce(recent_campaign_performance.total_spend, 0) as total_spend,\n coalesce(recent_campaign_performance.avg_ctr, 0) as avg_ctr,\n coalesce(recent_campaign_performance.avg_cpc, 0) as avg_cpc\n\n from campaigns_accounts\n left join bid_modifiers\n on campaigns_accounts.campaign_id = bid_modifiers.campaign_id\n and campaigns_accounts.source_relation = bid_modifiers.source_relation\n left join recent_campaign_performance\n on campaigns_accounts.campaign_id = recent_campaign_performance.campaign_id\n and campaigns_accounts.source_relation = recent_campaign_performance.source_relation\n\n \n left join bidding_strategy\n on campaigns_accounts.campaign_id = bidding_strategy.campaign_id\n and campaigns_accounts.source_relation = bidding_strategy.source_relation\n \n\n \n left join campaign_criterion\n on bid_modifiers.criterion_id = campaign_criterion.criterion_id\n and campaigns_accounts.campaign_id = campaign_criterion.campaign_id\n and campaigns_accounts.source_relation = campaign_criterion.source_relation\n \n),\n\n-- Determine recommendation reason based on performance thresholds and current bid settings\nrecommendation_logic as (\n select\n *,\n -- Inferred performance observation that drives the recommendation\n case\n when campaign_status in ('REMOVED', 'PAUSED')\n then 'campaign disabled'\n when serving_status = 'ENDED'\n then 'campaign ended'\n when serving_status != 'SERVING'\n then 'not serving'\n when avg_cpc > 3.0\n and bid_modifier is null\n and is_campaign_live\n then 'high cpc'\n when avg_ctr < 0.015\n and bid_modifier > 1\n and is_campaign_live\n then 'low ctr'\n when total_spend > 500.0\n and bid_modifier is null\n and is_campaign_live\n then 'high spend'\n \n when lower(bidding_strategy_type) in ('manual_cpc', 'enhanced_cpc')\n and bid_modifier is null\n then 'manual bidding'\n \n when bid_modifier = 0\n then 'disabled modifier'\n when bid_modifier > 1.5\n then 'high positive modifier'\n when bid_modifier < 0.7 and bid_modifier > 0\n then 'significant negative modifier'\n when avg_ctr >= 0.03\n and avg_cpc <= 1.0\n then 'high performance'\n when total_spend > 500.0\n and avg_ctr < 0.015\n then 'high spend + poor performance'\n when total_spend >= 100.0\n and total_spend <= 500.0\n and avg_ctr >= 0.015\n then 'moderate performance'\n when total_spend < 100.0\n and total_spend > 0\n then 'low spend'\n else 'no notable observation'\n end as calculated_observation\n\n from campaign_base\n),\n\n-- derive action from reason to avoid duplicating threshold logic\nfinal as (\n select\n *,\n -- inferred action based on the performance observation\n case\n when calculated_observation = 'campaign disabled' then 'enable campaign'\n when calculated_observation = 'campaign ended' then 'review or restart campaign'\n when calculated_observation = 'not serving' then 'resolve serving issues'\n when calculated_observation in ('high cpc', 'high spend', 'manual bidding') then 'add modifiers'\n when calculated_observation in ('low ctr', 'significant negative modifier', 'disabled modifier') then 'review adjustments'\n when calculated_observation = 'high positive modifier' then 'monitor performance'\n when calculated_observation = 'high performance' then 'scale successful modifiers'\n when calculated_observation = 'high spend + poor performance' then 'optimize bid modifiers'\n when calculated_observation = 'moderate performance' then 'optimize gradually'\n when calculated_observation = 'low spend' then 'consider increasing budget'\n else 'monitor'\n end as calculated_recommendation,\n\n -- inferred priority level for focusing on most critical issues first\n case\n -- High: Campaign blocking issues\n when calculated_observation in ('campaign disabled', 'not serving') then 'high'\n\n -- High: Cost/spend issues requiring immediate attention\n when calculated_observation in ('high cpc', 'high spend', 'high spend + poor performance') then 'high'\n\n -- Medium: Setup and optimization issues\n when calculated_observation = 'campaign ended' then 'medium'\n when calculated_observation in ('significant negative modifier', 'low ctr', 'disabled modifier') then 'medium'\n when calculated_observation in ('manual bidding', 'high positive modifier') then 'medium'\n\n -- Low: Normal operations and good performance\n when calculated_observation in ('high performance', 'moderate performance', 'low spend') then 'low'\n else 'low'\n end as calculated_priority\n from recommendation_logic\n)\n\nselect\n *,\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(account_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(campaign_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(criterion_id as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as bid_modifier_report_key\nfrom final", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.google_ads.int_google_ads__campaigns_accounts", "sql": " __dbt__cte__int_google_ads__campaigns_accounts as (\n\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": ["bid_modifier_report_key"], "time_spine": null}, "model.google_ads.google_ads__campaign_budget_diagnostics_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "google_ads__campaign_budget_diagnostics_report", "resource_type": "model", "package_name": "google_ads", "path": "google_ads__campaign_budget_diagnostics_report.sql", "original_file_path": "models/google_ads__campaign_budget_diagnostics_report.sql", "unique_id": "model.google_ads.google_ads__campaign_budget_diagnostics_report", "fqn": ["google_ads", "google_ads__campaign_budget_diagnostics_report"], "alias": "google_ads__campaign_budget_diagnostics_report", "checksum": {"name": "sha256", "checksum": "4d648df642262eea71cdc2edb015bdaaad23adf8007577754ffde8546c680ca5"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a campaign's budget constraints and performance diagnostics.", "columns": {"budget_diagnostics_report_key": {"name": "budget_diagnostics_report_key", "description": "Surrogate key for the campaign budget diagnostics report, combining source_relation, account_id, campaign_id, and date_day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "date_day": {"name": "date_day", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_name"]}, "account_name": {"name": "account_name", "description": "The descriptive name of the Customer account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.account_descriptive_name"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "advertising_channel_type": {"name": "advertising_channel_type", "description": "The type of advertising channel being used by the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertising_channel_subtype": {"name": "advertising_channel_subtype", "description": "The advertising channel subtype that is being used by the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "General status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "serving_status": {"name": "serving_status", "description": "Status of the ads and how they are currently being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_campaign_live": {"name": "is_campaign_live", "description": "Boolean indicating if the campaign is both enabled and actively serving (campaign_status = 'ENABLED' and serving_status = 'SERVING').", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget": {"name": "daily_budget", "description": "The daily budget amount for the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_budget": {"name": "total_budget", "description": "The total budget amount for lifetime campaigns.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_type": {"name": "budget_type", "description": "The type of budget (DAILY, LIFETIME, etc.).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_status": {"name": "budget_status", "description": "The status of the budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "has_recommended_budget": {"name": "has_recommended_budget", "description": "Boolean indicating if Google has a recommended budget for this campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "recommended_daily_budget": {"name": "recommended_daily_budget", "description": "Google's recommended daily budget when available, otherwise falls back to current daily budget for consistency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bidding_strategy_type": {"name": "bidding_strategy_type", "description": "The type of bidding strategy (MANUAL_CPC, TARGET_CPA, etc.).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "target_cpa": {"name": "target_cpa", "description": "Target cost per acquisition.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "target_roas": {"name": "target_roas", "description": "Target return on ad spend.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "enhanced_cpc": {"name": "enhanced_cpc", "description": "Boolean indicating if enhanced CPC is enabled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "spend": {"name": "spend", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "ctr": {"name": "ctr", "description": "The click-through rate. A ratio showing how often people who see your ad or free product listing end up clicking it. See more details [here](https://support.google.com/google-ads/answer/2615875?hl=en&ref_topic=24937&sjid=15681083914881504235-NC).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ctr"]}, "budget_utilization": {"name": "budget_utilization", "description": "Decimal representing budget utilization (spend / daily_budget).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_targeting_criteria": {"name": "total_targeting_criteria", "description": "Total number of targeting criteria set for the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "location_targeting_count": {"name": "location_targeting_count", "description": "Number of location targeting criteria.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "audience_targeting_count": {"name": "audience_targeting_count", "description": "Number of audience targeting criteria.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "location_targeting_breadth": {"name": "location_targeting_breadth", "description": "Assessment of location targeting breadth - 'limited' (fewer than the low threshold), 'broad' (more than the high threshold), or 'normal'. Thresholds are configurable via google_ads__location_targeting_low and google_ads__location_targeting_high variables.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_device_targeting": {"name": "is_device_targeting", "description": "Boolean indicating if device targeting criteria are set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_audience_targeting": {"name": "is_audience_targeting", "description": "Boolean indicating if audience targeting criteria are set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_increase_opportunity": {"name": "budget_increase_opportunity", "description": "Dollar amount by which Google recommends increasing the daily budget (0 when Google has no recommendation).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "calculated_observation": {"name": "calculated_observation", "description": "Performance observation that drives the budget recommendation based on configurable thresholds from `google_ads__budget_high_lows`, `google_ads__ctr_high_lows`, `google_ads__cpc_high_lows`, `google_ads__spend_high_lows`, `google_ads__location_targeting_high_lows`, and `google_ads__bid_modifier_high_lows` variables. Possible values include campaign disabled, campaign ended, not serving, budget constrained, budget + targeting constrained, targeting constrained, quality/relevance + targeting constrained, quality/relevance constrained, high spend + good performance, high spend + poor performance, moderate spend + normal performance, low spend + low budget utilization, low spend + budget constrained, low spend, no spend + no targeting, no spend, budget disabled, and normal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "calculated_recommendation": {"name": "calculated_recommendation", "description": "Inferred action for budget optimization based on dbt package logic and configurable threshold variables (increase budget, optimize targeting/bids, improve relevance, etc.).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "calculated_priority": {"name": "calculated_priority", "description": "Inferred priority level for focusing on most critical budget issues first (high, medium, low), derived from configurable performance threshold variables.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.896492, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"google_ads__campaign_budget_diagnostics_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True) and var('google_ads__using_campaign_budget_history', True)) }}\n\n{% set using_campaign_bidding_strategy_history = var('google_ads__using_campaign_bidding_strategy_history', True) %}\n{% set using_campaign_criterion_history = var('google_ads__using_campaign_criterion_history', True) %}\n\n{% set diagnostic_thresholds = get_threshold_high_lows() %}\n\nwith campaign_report as (\n select *\n from {{ ref('google_ads__campaign_report') }}\n),\n\ncampaign_budget as (\n select *\n from {{ ref('stg_google_ads__campaign_budget_history') }}\n where is_most_recent_record = True\n),\n\n{% if using_campaign_bidding_strategy_history %}\ncampaign_bidding_strategy as (\n select *\n from {{ ref('stg_google_ads__campaign_bidding_strategy_history') }}\n where is_most_recent_record = True\n),\n{% endif %}\n\n{% if using_campaign_criterion_history %}\ncampaign_criterion as (\n select *\n from {{ ref('stg_google_ads__campaign_criterion_history') }}\n where is_most_recent_record = True\n),\n{% endif %}\n\n{% if using_campaign_criterion_history %}\n-- Raw targeting counts by campaign\ncampaign_targeting_counts as (\n select\n campaign_id,\n source_relation,\n count(*) as total_criteria_count,\n count(case when geo_target_constant_id is not null then 1 end) as location_targets_count,\n count(case when device_type is not null then 1 end) as device_targets_count,\n count(case when age_range_type is not null then 1 end) as age_targets_count,\n count(case when gender_type is not null then 1 end) as gender_targets_count,\n count(case when user_list_id is not null then 1 end) as audience_targets_count\n\n from campaign_criterion\n group by 1, 2\n),\n\n-- Apply targeting constraint logic\ncampaign_targeting_analysis as (\n select\n *,\n -- Targeting constraint flags\n case\n when location_targets_count < {{ diagnostic_thresholds['location_targeting']['low'] }} then 'limited'\n when location_targets_count > {{ diagnostic_thresholds['location_targeting']['high'] }} then 'broad'\n else 'normal'\n end as location_targeting_breadth,\n\n (device_targets_count > 0) as is_device_targeting,\n (audience_targets_count > 0) as is_audience_targeting\n\n from campaign_targeting_counts\n),\n{% endif %}\n\n\n\n-- Base data gathering with joins and basic field calculations\ncampaign_base as (\n select\n campaign_report.source_relation,\n campaign_report.date_day,\n campaign_report.campaign_id,\n campaign_report.campaign_name,\n campaign_report.account_name,\n campaign_report.account_id,\n campaign_report.advertising_channel_type,\n campaign_report.advertising_channel_subtype,\n campaign_report.status as campaign_status,\n campaign_report.serving_status,\n\n -- Budget information\n coalesce(campaign_budget.daily_budget, 0) as daily_budget,\n coalesce(campaign_budget.total_budget, 0) as total_budget,\n campaign_budget.budget_type,\n campaign_budget.budget_status,\n campaign_budget.has_recommended_budget,\n -- Use Google's recommendation when available, otherwise fall back to current budget\n case\n when campaign_budget.recommended_daily_budget > 0\n then campaign_budget.recommended_daily_budget\n else coalesce(campaign_budget.daily_budget, 0)\n end as recommended_daily_budget,\n\n {% if using_campaign_bidding_strategy_history %}\n -- Bidding strategy information\n campaign_bidding_strategy.bidding_strategy_type,\n coalesce(campaign_bidding_strategy.target_cpa, 0) as target_cpa,\n coalesce(campaign_bidding_strategy.target_roas, 0) as target_roas,\n campaign_bidding_strategy.enhanced_cpc,\n {% endif %}\n\n -- Performance metrics\n campaign_report.impressions,\n campaign_report.spend,\n campaign_report.clicks,\n\n {% if using_campaign_criterion_history %}\n -- Targeting constraint information\n coalesce(campaign_targeting_analysis.total_criteria_count, 0) as total_targeting_criteria,\n coalesce(campaign_targeting_analysis.location_targets_count, 0) as location_targeting_count,\n coalesce(campaign_targeting_analysis.audience_targets_count, 0) as audience_targeting_count,\n coalesce(campaign_targeting_analysis.location_targeting_breadth, 'normal') as location_targeting_breadth,\n coalesce(campaign_targeting_analysis.is_device_targeting, false) as is_device_targeting,\n coalesce(campaign_targeting_analysis.is_audience_targeting, false) as is_audience_targeting,\n {% endif %}\n\n -- Click-through rate (shows ad relevance and quality)\n campaign_report.ctr,\n -- Budget usage (shows if budget constraints are limiting performance)\n {{ dbt_utils.safe_divide('campaign_report.spend', 'campaign_budget.daily_budget') }} as budget_utilization,\n -- Helper field for live campaigns\n (upper(campaign_report.status) = 'ENABLED' and upper(campaign_report.serving_status) = 'SERVING') as is_campaign_live\n\n from campaign_report\n left join campaign_budget\n on campaign_report.campaign_id = campaign_budget.campaign_id\n and campaign_report.source_relation = campaign_budget.source_relation\n {% if using_campaign_bidding_strategy_history %}\n left join campaign_bidding_strategy\n on campaign_report.campaign_id = campaign_bidding_strategy.campaign_id\n and campaign_report.source_relation = campaign_bidding_strategy.source_relation\n {% endif %}\n {% if using_campaign_criterion_history %}\n left join campaign_targeting_analysis\n on campaign_report.campaign_id = campaign_targeting_analysis.campaign_id\n and campaign_report.source_relation = campaign_targeting_analysis.source_relation\n {% endif %}\n),\n\n-- Apply business logic for diagnostics\nrecommendation_logic as (\n select\n *,\n \n -- Budget increase opportunity (simple difference since recommended_daily_budget falls back to current when no recommendation)\n recommended_daily_budget - daily_budget as budget_increase_opportunity,\n\n -- Inferred performance observation that drives the recommendation\n case\n when campaign_status in ('REMOVED', 'PAUSED')\n then 'campaign disabled'\n when serving_status = 'ENDED'\n then 'campaign ended'\n when serving_status != 'SERVING'\n then 'not serving'\n when budget_utilization >= {{ diagnostic_thresholds['budget']['high'] }}\n and daily_budget > 0\n and is_campaign_live\n then 'budget constrained'\n {% if using_campaign_criterion_history %}\n when budget_utilization >= {{ diagnostic_thresholds['budget']['low'] }} -- \">= budget.low\" translates to moderate budget utilization\n and location_targeting_breadth = 'limited'\n and daily_budget > 0\n and is_campaign_live\n then 'budget + targeting constrained'\n when spend > 0\n and location_targeting_breadth = 'limited'\n and not is_audience_targeting\n and is_campaign_live\n then 'targeting constrained'\n when spend > 0\n and impressions > 0\n and ctr < {{ diagnostic_thresholds['ctr']['low'] }}\n and not is_audience_targeting\n and is_campaign_live\n then 'quality/relevance + targeting constrained'\n {% endif %}\n when spend > 0\n and impressions > 0\n and ctr < {{ diagnostic_thresholds['ctr']['low'] }}\n and is_campaign_live\n then 'quality/relevance constrained'\n when spend > {{ diagnostic_thresholds['spend']['high'] }}\n and impressions > 0\n and ctr >= {{ diagnostic_thresholds['ctr']['high'] }}\n and is_campaign_live\n then 'high spend + good performance'\n when spend > {{ diagnostic_thresholds['spend']['high'] }}\n and impressions > 0\n and ctr < {{ diagnostic_thresholds['ctr']['low'] }}\n and is_campaign_live\n then 'high spend + poor performance'\n when spend >= {{ diagnostic_thresholds['spend']['low'] }}\n and spend <= {{ diagnostic_thresholds['spend']['high'] }}\n and ctr >= {{ diagnostic_thresholds['ctr']['low'] }}\n and ctr < {{ diagnostic_thresholds['ctr']['high'] }}\n and is_campaign_live\n then 'moderate spend + normal performance'\n when spend < {{ diagnostic_thresholds['spend']['low'] }}\n and spend > 0\n and budget_utilization < {{ diagnostic_thresholds['budget']['low'] }}\n and is_campaign_live\n then 'low spend + low budget utilization'\n when spend < {{ diagnostic_thresholds['spend']['low'] }}\n and spend > 0\n and budget_utilization >= {{ diagnostic_thresholds['budget']['low'] }}\n and is_campaign_live\n then 'low spend + budget constrained'\n when spend < {{ diagnostic_thresholds['spend']['low'] }}\n and spend > 0\n and is_campaign_live\n then 'low spend'\n {% if using_campaign_criterion_history %}\n when spend = 0\n and total_targeting_criteria = 0\n then 'no spend + no targeting'\n {% endif %}\n when spend = 0\n then 'no spend'\n when budget_status != 'ENABLED'\n then 'budget disabled'\n when campaign_status != 'ENABLED'\n then 'campaign disabled'\n else 'no notable observation'\n end as calculated_observation\n\n from campaign_base\n),\n\n-- Derive action and priority from observation\nfinal as (\n select\n *,\n -- Inferred action based on the performance observation\n case\n when calculated_observation in ('campaign disabled', 'budget disabled') then 'enable campaign'\n when calculated_observation = 'campaign ended' then 'review or restart campaign'\n when calculated_observation = 'not serving' then 'resolve serving issues'\n when calculated_observation in ('budget constrained', 'budget + targeting constrained') then 'increase budget'\n when calculated_observation = 'targeting constrained' then 'expand targeting'\n when calculated_observation in ('quality/relevance constrained', 'quality/relevance + targeting constrained') then 'improve relevance'\n when calculated_observation in ('no spend + no targeting', 'no spend') then 'diagnose setup'\n when calculated_observation = 'high spend + good performance' then 'maintain and scale'\n when calculated_observation = 'high spend + poor performance' then 'improve efficiency'\n when calculated_observation = 'moderate spend + normal performance' then 'optimize gradually'\n when calculated_observation = 'low spend + low budget utilization' then 'diagnose targeting and bidding'\n when calculated_observation = 'low spend + budget constrained' then 'increase budget'\n when calculated_observation = 'low spend' then 'consider increasing budget'\n else 'monitor'\n end as calculated_recommendation,\n\n -- Inferred priority level for focusing on most critical issues first\n case\n -- High: Campaign/Budget blocking issues\n when calculated_observation in ('campaign disabled', 'budget disabled', 'not serving') then 'high'\n when calculated_observation in ('budget constrained', 'budget + targeting constrained') then 'high'\n when calculated_observation in ('no spend + no targeting', 'no spend') then 'high'\n\n -- High: Poor performance with high spend\n when calculated_observation = 'high spend + poor performance' then 'high'\n\n -- Medium: Setup and constraint issues\n when calculated_observation = 'campaign ended' then 'medium'\n when calculated_observation in ('targeting constrained', 'quality/relevance constrained', 'quality/relevance + targeting constrained') then 'medium'\n when calculated_observation in ('low spend + low budget utilization', 'low spend + budget constrained') then 'medium'\n\n -- Low: Normal operations and good performance\n when calculated_observation in ('high spend + good performance', 'moderate spend + normal performance', 'low spend') then 'low'\n else 'low'\n end as calculated_priority\n from recommendation_logic\n)\n\nselect\n *,\n {{ dbt_utils.generate_surrogate_key(['source_relation', 'account_id', 'campaign_id', 'date_day']) }} as budget_diagnostics_report_key\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__campaign_report", "package": null, "version": null}, {"name": "stg_google_ads__campaign_budget_history", "package": null, "version": null}, {"name": "stg_google_ads__campaign_bidding_strategy_history", "package": null, "version": null}, {"name": "stg_google_ads__campaign_criterion_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_threshold_high_lows", "macro.dbt_utils.safe_divide", "macro.dbt_utils.generate_surrogate_key"], "nodes": ["model.google_ads.google_ads__campaign_report", "model.google_ads.stg_google_ads__campaign_budget_history", "model.google_ads.stg_google_ads__campaign_bidding_strategy_history", "model.google_ads.stg_google_ads__campaign_criterion_history"]}, "compiled_path": "target/compiled/google_ads/models/google_ads__campaign_budget_diagnostics_report.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\nwith campaign_report as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"google_ads__campaign_report\"\n),\n\ncampaign_budget as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_budget_history\"\n where is_most_recent_record = True\n),\n\n\ncampaign_bidding_strategy as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_bidding_strategy_history\"\n where is_most_recent_record = True\n),\n\n\n\ncampaign_criterion as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_criterion_history\"\n where is_most_recent_record = True\n),\n\n\n\n-- Raw targeting counts by campaign\ncampaign_targeting_counts as (\n select\n campaign_id,\n source_relation,\n count(*) as total_criteria_count,\n count(case when geo_target_constant_id is not null then 1 end) as location_targets_count,\n count(case when device_type is not null then 1 end) as device_targets_count,\n count(case when age_range_type is not null then 1 end) as age_targets_count,\n count(case when gender_type is not null then 1 end) as gender_targets_count,\n count(case when user_list_id is not null then 1 end) as audience_targets_count\n\n from campaign_criterion\n group by 1, 2\n),\n\n-- Apply targeting constraint logic\ncampaign_targeting_analysis as (\n select\n *,\n -- Targeting constraint flags\n case\n when location_targets_count < 5.0 then 'limited'\n when location_targets_count > 50.0 then 'broad'\n else 'normal'\n end as location_targeting_breadth,\n\n (device_targets_count > 0) as is_device_targeting,\n (audience_targets_count > 0) as is_audience_targeting\n\n from campaign_targeting_counts\n),\n\n\n\n\n-- Base data gathering with joins and basic field calculations\ncampaign_base as (\n select\n campaign_report.source_relation,\n campaign_report.date_day,\n campaign_report.campaign_id,\n campaign_report.campaign_name,\n campaign_report.account_name,\n campaign_report.account_id,\n campaign_report.advertising_channel_type,\n campaign_report.advertising_channel_subtype,\n campaign_report.status as campaign_status,\n campaign_report.serving_status,\n\n -- Budget information\n coalesce(campaign_budget.daily_budget, 0) as daily_budget,\n coalesce(campaign_budget.total_budget, 0) as total_budget,\n campaign_budget.budget_type,\n campaign_budget.budget_status,\n campaign_budget.has_recommended_budget,\n -- Use Google's recommendation when available, otherwise fall back to current budget\n case\n when campaign_budget.recommended_daily_budget > 0\n then campaign_budget.recommended_daily_budget\n else coalesce(campaign_budget.daily_budget, 0)\n end as recommended_daily_budget,\n\n \n -- Bidding strategy information\n campaign_bidding_strategy.bidding_strategy_type,\n coalesce(campaign_bidding_strategy.target_cpa, 0) as target_cpa,\n coalesce(campaign_bidding_strategy.target_roas, 0) as target_roas,\n campaign_bidding_strategy.enhanced_cpc,\n \n\n -- Performance metrics\n campaign_report.impressions,\n campaign_report.spend,\n campaign_report.clicks,\n\n \n -- Targeting constraint information\n coalesce(campaign_targeting_analysis.total_criteria_count, 0) as total_targeting_criteria,\n coalesce(campaign_targeting_analysis.location_targets_count, 0) as location_targeting_count,\n coalesce(campaign_targeting_analysis.audience_targets_count, 0) as audience_targeting_count,\n coalesce(campaign_targeting_analysis.location_targeting_breadth, 'normal') as location_targeting_breadth,\n coalesce(campaign_targeting_analysis.is_device_targeting, false) as is_device_targeting,\n coalesce(campaign_targeting_analysis.is_audience_targeting, false) as is_audience_targeting,\n \n\n -- Click-through rate (shows ad relevance and quality)\n campaign_report.ctr,\n -- Budget usage (shows if budget constraints are limiting performance)\n \n ( campaign_report.spend ) / nullif( ( campaign_budget.daily_budget ), 0)\n as budget_utilization,\n -- Helper field for live campaigns\n (upper(campaign_report.status) = 'ENABLED' and upper(campaign_report.serving_status) = 'SERVING') as is_campaign_live\n\n from campaign_report\n left join campaign_budget\n on campaign_report.campaign_id = campaign_budget.campaign_id\n and campaign_report.source_relation = campaign_budget.source_relation\n \n left join campaign_bidding_strategy\n on campaign_report.campaign_id = campaign_bidding_strategy.campaign_id\n and campaign_report.source_relation = campaign_bidding_strategy.source_relation\n \n \n left join campaign_targeting_analysis\n on campaign_report.campaign_id = campaign_targeting_analysis.campaign_id\n and campaign_report.source_relation = campaign_targeting_analysis.source_relation\n \n),\n\n-- Apply business logic for diagnostics\nrecommendation_logic as (\n select\n *,\n \n -- Budget increase opportunity (simple difference since recommended_daily_budget falls back to current when no recommendation)\n recommended_daily_budget - daily_budget as budget_increase_opportunity,\n\n -- Inferred performance observation that drives the recommendation\n case\n when campaign_status in ('REMOVED', 'PAUSED')\n then 'campaign disabled'\n when serving_status = 'ENDED'\n then 'campaign ended'\n when serving_status != 'SERVING'\n then 'not serving'\n when budget_utilization >= 0.95\n and daily_budget > 0\n and is_campaign_live\n then 'budget constrained'\n \n when budget_utilization >= 0.75 -- \">= budget.low\" translates to moderate budget utilization\n and location_targeting_breadth = 'limited'\n and daily_budget > 0\n and is_campaign_live\n then 'budget + targeting constrained'\n when spend > 0\n and location_targeting_breadth = 'limited'\n and not is_audience_targeting\n and is_campaign_live\n then 'targeting constrained'\n when spend > 0\n and impressions > 0\n and ctr < 0.015\n and not is_audience_targeting\n and is_campaign_live\n then 'quality/relevance + targeting constrained'\n \n when spend > 0\n and impressions > 0\n and ctr < 0.015\n and is_campaign_live\n then 'quality/relevance constrained'\n when spend > 500.0\n and impressions > 0\n and ctr >= 0.03\n and is_campaign_live\n then 'high spend + good performance'\n when spend > 500.0\n and impressions > 0\n and ctr < 0.015\n and is_campaign_live\n then 'high spend + poor performance'\n when spend >= 100.0\n and spend <= 500.0\n and ctr >= 0.015\n and ctr < 0.03\n and is_campaign_live\n then 'moderate spend + normal performance'\n when spend < 100.0\n and spend > 0\n and budget_utilization < 0.75\n and is_campaign_live\n then 'low spend + low budget utilization'\n when spend < 100.0\n and spend > 0\n and budget_utilization >= 0.75\n and is_campaign_live\n then 'low spend + budget constrained'\n when spend < 100.0\n and spend > 0\n and is_campaign_live\n then 'low spend'\n \n when spend = 0\n and total_targeting_criteria = 0\n then 'no spend + no targeting'\n \n when spend = 0\n then 'no spend'\n when budget_status != 'ENABLED'\n then 'budget disabled'\n when campaign_status != 'ENABLED'\n then 'campaign disabled'\n else 'no notable observation'\n end as calculated_observation\n\n from campaign_base\n),\n\n-- Derive action and priority from observation\nfinal as (\n select\n *,\n -- Inferred action based on the performance observation\n case\n when calculated_observation in ('campaign disabled', 'budget disabled') then 'enable campaign'\n when calculated_observation = 'campaign ended' then 'review or restart campaign'\n when calculated_observation = 'not serving' then 'resolve serving issues'\n when calculated_observation in ('budget constrained', 'budget + targeting constrained') then 'increase budget'\n when calculated_observation = 'targeting constrained' then 'expand targeting'\n when calculated_observation in ('quality/relevance constrained', 'quality/relevance + targeting constrained') then 'improve relevance'\n when calculated_observation in ('no spend + no targeting', 'no spend') then 'diagnose setup'\n when calculated_observation = 'high spend + good performance' then 'maintain and scale'\n when calculated_observation = 'high spend + poor performance' then 'improve efficiency'\n when calculated_observation = 'moderate spend + normal performance' then 'optimize gradually'\n when calculated_observation = 'low spend + low budget utilization' then 'diagnose targeting and bidding'\n when calculated_observation = 'low spend + budget constrained' then 'increase budget'\n when calculated_observation = 'low spend' then 'consider increasing budget'\n else 'monitor'\n end as calculated_recommendation,\n\n -- Inferred priority level for focusing on most critical issues first\n case\n -- High: Campaign/Budget blocking issues\n when calculated_observation in ('campaign disabled', 'budget disabled', 'not serving') then 'high'\n when calculated_observation in ('budget constrained', 'budget + targeting constrained') then 'high'\n when calculated_observation in ('no spend + no targeting', 'no spend') then 'high'\n\n -- High: Poor performance with high spend\n when calculated_observation = 'high spend + poor performance' then 'high'\n\n -- Medium: Setup and constraint issues\n when calculated_observation = 'campaign ended' then 'medium'\n when calculated_observation in ('targeting constrained', 'quality/relevance constrained', 'quality/relevance + targeting constrained') then 'medium'\n when calculated_observation in ('low spend + low budget utilization', 'low spend + budget constrained') then 'medium'\n\n -- Low: Normal operations and good performance\n when calculated_observation in ('high spend + good performance', 'moderate spend + normal performance', 'low spend') then 'low'\n else 'low'\n end as calculated_priority\n from recommendation_logic\n)\n\nselect\n *,\n md5(cast(coalesce(cast(source_relation as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(account_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(campaign_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(date_day as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as budget_diagnostics_report_key\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": ["budget_diagnostics_report_key"], "time_spine": null}, "model.google_ads.google_ads__url_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "google_ads__url_report", "resource_type": "model", "package_name": "google_ads", "path": "google_ads__url_report.sql", "original_file_path": "models/google_ads__url_report.sql", "unique_id": "model.google_ads.google_ads__url_report", "fqn": ["google_ads", "google_ads__url_report"], "alias": "google_ads__url_report", "checksum": {"name": "sha256", "checksum": "4de5cafaf0441a6d518c7847647a820868645bf903a2ca78a86396673fd6dfb3"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of URLs at the ad level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "account_name": {"name": "account_name", "description": "The descriptive name of the Customer account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.account_descriptive_name"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "currency_code": {"name": "currency_code", "description": "The currency which the account uses.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "ad_id": {"name": "ad_id", "description": "The unique identifier of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.base_url"]}, "url_host": {"name": "url_host", "description": "The URL host of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.url_host"]}, "url_path": {"name": "url_path", "description": "The URL path of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.url_path"]}, "utm_source": {"name": "utm_source", "description": "The utm_source parameter of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.utm_source"]}, "utm_medium": {"name": "utm_medium", "description": "The utm_medium parameter of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.utm_medium"]}, "utm_campaign": {"name": "utm_campaign", "description": "The utm_campaign parameter of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.utm_campaign"]}, "utm_content": {"name": "utm_content", "description": "The utm_content parameter of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.utm_content"]}, "utm_term": {"name": "utm_term", "description": "The utm_term parameter of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.utm_term"]}, "spend": {"name": "spend", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.8685453, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"google_ads__url_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith stats as (\n\n select *\n from {{ ref('stg_google_ads__ad_stats') }}\n), \n\ncampaigns_accounts as (\n\n select *\n from {{ ref('int_google_ads__campaigns_accounts') }}\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_google_ads__ad_group_history') }}\n where is_most_recent_record = True\n),\n\nads as (\n\n select *\n from {{ ref('stg_google_ads__ad_history') }}\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n stats.source_relation,\n stats.date_day,\n campaigns_accounts.account_name,\n campaigns_accounts.account_id,\n campaigns_accounts.currency_code,\n campaigns_accounts.campaign_name,\n campaigns_accounts.campaign_id,\n ad_groups.ad_group_name,\n stats.ad_group_id,\n stats.ad_id,\n ads.base_url,\n ads.url_host,\n ads.url_path,\n\n {% if var('google_auto_tagging_enabled', false) %}\n\n coalesce( {{ google_ads.google_ads_extract_url_parameter('ads.final_url', 'utm_source') }} , 'google') as utm_source,\n coalesce( {{ google_ads.google_ads_extract_url_parameter('ads.final_url', 'utm_medium') }} , 'cpc') as utm_medium,\n coalesce( {{ google_ads.google_ads_extract_url_parameter('ads.final_url', 'utm_campaign') }} , campaigns_accounts.campaign_name) as utm_campaign,\n coalesce( {{ google_ads.google_ads_extract_url_parameter('ads.final_url', 'utm_content') }} , ad_groups.ad_group_name) as utm_content,\n\n {% else %}\n\n ads.utm_source,\n ads.utm_medium,\n ads.utm_campaign,\n ads.utm_content,\n \n {% endif %}\n\n ads.utm_term,\n sum(stats.spend) as spend,\n sum(stats.clicks) as clicks,\n sum(stats.impressions) as impressions,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value,\n sum(view_through_conversions) as view_through_conversions\n\n {{ google_ads_persist_pass_through_columns(pass_through_variable='google_ads__ad_stats_passthrough_metrics', identifier='stats', transform='sum', coalesce_with=0, exclude_fields=['conversions','conversions_value','view_through_conversions']) }}\n\n from stats\n left join ads\n on stats.ad_id = ads.ad_id\n and stats.source_relation = ads.source_relation\n and stats.ad_group_id = ads.ad_group_id\n left join ad_groups\n on ads.ad_group_id = ad_groups.ad_group_id\n and ads.source_relation = ad_groups.source_relation\n left join campaigns_accounts\n on ad_groups.campaign_id = campaigns_accounts.campaign_id\n and ad_groups.source_relation = campaigns_accounts.source_relation\n\n {% if var('ad_reporting__url_report__using_null_filter', True) %}\n where ads.source_final_urls is not null\n {% endif %}\n\n {{ dbt_utils.group_by(18) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_stats", "package": null, "version": null}, {"name": "int_google_ads__campaigns_accounts", "package": null, "version": null}, {"name": "stg_google_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_google_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.google_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.google_ads.stg_google_ads__ad_stats", "model.google_ads.int_google_ads__campaigns_accounts", "model.google_ads.stg_google_ads__ad_group_history", "model.google_ads.stg_google_ads__ad_history"]}, "compiled_path": "target/compiled/google_ads/models/google_ads__url_report.sql", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__int_google_ads__campaigns_accounts as (\n\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final\n), stats as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_stats\"\n), \n\ncampaigns_accounts as (\n\n select *\n from __dbt__cte__int_google_ads__campaigns_accounts\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_history\"\n where is_most_recent_record = True\n),\n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_history\"\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n stats.source_relation,\n stats.date_day,\n campaigns_accounts.account_name,\n campaigns_accounts.account_id,\n campaigns_accounts.currency_code,\n campaigns_accounts.campaign_name,\n campaigns_accounts.campaign_id,\n ad_groups.ad_group_name,\n stats.ad_group_id,\n stats.ad_id,\n ads.base_url,\n ads.url_host,\n ads.url_path,\n\n \n\n ads.utm_source,\n ads.utm_medium,\n ads.utm_campaign,\n ads.utm_content,\n \n \n\n ads.utm_term,\n sum(stats.spend) as spend,\n sum(stats.clicks) as clicks,\n sum(stats.impressions) as impressions,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value,\n sum(view_through_conversions) as view_through_conversions\n\n \n\n\n\n\n\n from stats\n left join ads\n on stats.ad_id = ads.ad_id\n and stats.source_relation = ads.source_relation\n and stats.ad_group_id = ads.ad_group_id\n left join ad_groups\n on ads.ad_group_id = ad_groups.ad_group_id\n and ads.source_relation = ad_groups.source_relation\n left join campaigns_accounts\n on ad_groups.campaign_id = campaigns_accounts.campaign_id\n and ad_groups.source_relation = campaigns_accounts.source_relation\n\n \n where ads.source_final_urls is not null\n \n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.google_ads.int_google_ads__campaigns_accounts", "sql": " __dbt__cte__int_google_ads__campaigns_accounts as (\n\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.google_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "google_ads__campaign_report", "resource_type": "model", "package_name": "google_ads", "path": "google_ads__campaign_report.sql", "original_file_path": "models/google_ads__campaign_report.sql", "unique_id": "model.google_ads.google_ads__campaign_report", "fqn": ["google_ads", "google_ads__campaign_report"], "alias": "google_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "3faa9df9a62716349ec0e8aa2b9e95ecbcd49a15ae3b7e23c6f3c5dbdd440521"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of a campaign at the campaign/advertising_channel/advertising_channel_subtype level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "account_name": {"name": "account_name", "description": "The descriptive name of the Customer account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.account_descriptive_name"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "currency_code": {"name": "currency_code", "description": "The currency which the account uses.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "advertising_channel_type": {"name": "advertising_channel_type", "description": "The channel type of the ads being served within the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertising_channel_subtype": {"name": "advertising_channel_subtype", "description": "The channel subtype of the ads being served within the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "serving_status": {"name": "serving_status", "description": "Status of the ads and how they are currently being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}, "ctr": {"name": "ctr", "description": "Click-through rate as a decimal, calculated as clicks / impressions. Shows ad relevance and engagement.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.8766265, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"google_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith stats as (\n\n select *\n from {{ ref('stg_google_ads__campaign_stats') }}\n),\n\ncampaigns_accounts as (\n\n select *\n from {{ ref('int_google_ads__campaigns_accounts') }}\n),\n\nfields as (\n\n select\n stats.source_relation,\n stats.date_day,\n campaigns_accounts.account_name,\n campaigns_accounts.account_id,\n campaigns_accounts.currency_code,\n campaigns_accounts.campaign_name,\n stats.campaign_id,\n campaigns_accounts.advertising_channel_type,\n campaigns_accounts.advertising_channel_subtype,\n campaigns_accounts.campaign_status as status,\n campaigns_accounts.serving_status,\n sum(stats.spend) as spend,\n sum(stats.clicks) as clicks,\n sum(stats.impressions) as impressions,\n sum(stats.conversions) as conversions,\n sum(stats.conversions_value) as conversions_value,\n sum(stats.view_through_conversions) as view_through_conversions,\n {{ dbt_utils.safe_divide('sum(stats.clicks)', 'sum(stats.impressions)') }} as ctr -- Click-through rate (shows ad relevance and engagement)\n\n {{ google_ads_persist_pass_through_columns(pass_through_variable='google_ads__campaign_stats_passthrough_metrics', identifier='stats', transform='sum', coalesce_with=0, exclude_fields=['conversions','conversions_value','view_through_conversions']) }}\n\n from stats\n left join campaigns_accounts\n on stats.campaign_id = campaigns_accounts.campaign_id\n and stats.source_relation = campaigns_accounts.source_relation\n {{ dbt_utils.group_by(11) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_stats", "package": null, "version": null}, {"name": "int_google_ads__campaigns_accounts", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt_utils.safe_divide", "macro.google_ads.google_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.google_ads.stg_google_ads__campaign_stats", "model.google_ads.int_google_ads__campaigns_accounts"]}, "compiled_path": "target/compiled/google_ads/models/google_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__int_google_ads__campaigns_accounts as (\n\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final\n), stats as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_stats\"\n),\n\ncampaigns_accounts as (\n\n select *\n from __dbt__cte__int_google_ads__campaigns_accounts\n),\n\nfields as (\n\n select\n stats.source_relation,\n stats.date_day,\n campaigns_accounts.account_name,\n campaigns_accounts.account_id,\n campaigns_accounts.currency_code,\n campaigns_accounts.campaign_name,\n stats.campaign_id,\n campaigns_accounts.advertising_channel_type,\n campaigns_accounts.advertising_channel_subtype,\n campaigns_accounts.campaign_status as status,\n campaigns_accounts.serving_status,\n sum(stats.spend) as spend,\n sum(stats.clicks) as clicks,\n sum(stats.impressions) as impressions,\n sum(stats.conversions) as conversions,\n sum(stats.conversions_value) as conversions_value,\n sum(stats.view_through_conversions) as view_through_conversions,\n \n ( sum(stats.clicks) ) / nullif( ( sum(stats.impressions) ), 0)\n as ctr -- Click-through rate (shows ad relevance and engagement)\n\n \n\n\n\n\n\n from stats\n left join campaigns_accounts\n on stats.campaign_id = campaigns_accounts.campaign_id\n and stats.source_relation = campaigns_accounts.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.google_ads.int_google_ads__campaigns_accounts", "sql": " __dbt__cte__int_google_ads__campaigns_accounts as (\n\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.google_ads__keyword_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "google_ads__keyword_report", "resource_type": "model", "package_name": "google_ads", "path": "google_ads__keyword_report.sql", "original_file_path": "models/google_ads__keyword_report.sql", "unique_id": "model.google_ads.google_ads__keyword_report", "fqn": ["google_ads", "google_ads__keyword_report"], "alias": "google_ads__keyword_report", "checksum": {"name": "sha256", "checksum": "9edc66e1e5f8e8c6fee124dbfeb88f2a56b92fefe54e13a6cad17d42dfbeb0e9"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance at the ad group level for keywords.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "account_name": {"name": "account_name", "description": "The descriptive name of the Customer account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.account_descriptive_name"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "currency_code": {"name": "currency_code", "description": "The currency which the account uses.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "criterion_id": {"name": "criterion_id", "description": "The unique identifier of the criterion being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "type": {"name": "type", "description": "The type of keyword ad being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The status of the keyword ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_match_type": {"name": "keyword_match_type", "description": "The match type criteria used for the keyword ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_text": {"name": "keyword_text", "description": "The specific keyword text that is used.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.8787758, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"google_ads__keyword_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith stats as (\n\n select *\n from {{ ref('stg_google_ads__keyword_stats') }}\n), \n\ncampaigns_accounts as (\n\n select *\n from {{ ref('int_google_ads__campaigns_accounts') }}\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_google_ads__ad_group_history') }}\n where is_most_recent_record = True\n), \n\ncriterions as (\n\n select *\n from {{ ref('stg_google_ads__ad_group_criterion_history') }}\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n stats.source_relation,\n stats.date_day,\n campaigns_accounts.account_name,\n stats.account_id,\n campaigns_accounts.currency_code,\n campaigns_accounts.campaign_name,\n stats.campaign_id,\n ad_groups.ad_group_name,\n stats.ad_group_id,\n stats.criterion_id,\n criterions.type,\n criterions.status,\n criterions.keyword_match_type,\n criterions.keyword_text,\n sum(stats.spend) as spend,\n sum(stats.clicks) as clicks,\n sum(stats.impressions) as impressions,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value,\n sum(view_through_conversions) as view_through_conversions\n\n {{ google_ads_persist_pass_through_columns(pass_through_variable='google_ads__keyword_stats_passthrough_metrics', identifier='stats', transform='sum', coalesce_with=0, exclude_fields=['conversions','conversions_value','view_through_conversions']) }}\n\n from stats\n left join criterions\n on stats.criterion_id = criterions.criterion_id\n and stats.source_relation = criterions.source_relation\n left join ad_groups\n on stats.ad_group_id = ad_groups.ad_group_id\n and stats.source_relation = ad_groups.source_relation\n left join campaigns_accounts\n on stats.campaign_id = campaigns_accounts.campaign_id\n and stats.source_relation = campaigns_accounts.source_relation\n {{ dbt_utils.group_by(14) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__keyword_stats", "package": null, "version": null}, {"name": "int_google_ads__campaigns_accounts", "package": null, "version": null}, {"name": "stg_google_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_google_ads__ad_group_criterion_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.google_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.google_ads.stg_google_ads__keyword_stats", "model.google_ads.int_google_ads__campaigns_accounts", "model.google_ads.stg_google_ads__ad_group_history", "model.google_ads.stg_google_ads__ad_group_criterion_history"]}, "compiled_path": "target/compiled/google_ads/models/google_ads__keyword_report.sql", "compiled": true, "compiled_code": "\n\nwith __dbt__cte__int_google_ads__campaigns_accounts as (\n\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final\n), stats as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__keyword_stats\"\n), \n\ncampaigns_accounts as (\n\n select *\n from __dbt__cte__int_google_ads__campaigns_accounts\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\ncriterions as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_criterion_history\"\n where is_most_recent_record = True\n), \n\nfields as (\n\n select\n stats.source_relation,\n stats.date_day,\n campaigns_accounts.account_name,\n stats.account_id,\n campaigns_accounts.currency_code,\n campaigns_accounts.campaign_name,\n stats.campaign_id,\n ad_groups.ad_group_name,\n stats.ad_group_id,\n stats.criterion_id,\n criterions.type,\n criterions.status,\n criterions.keyword_match_type,\n criterions.keyword_text,\n sum(stats.spend) as spend,\n sum(stats.clicks) as clicks,\n sum(stats.impressions) as impressions,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value,\n sum(view_through_conversions) as view_through_conversions\n\n \n\n\n\n\n\n from stats\n left join criterions\n on stats.criterion_id = criterions.criterion_id\n and stats.source_relation = criterions.source_relation\n left join ad_groups\n on stats.ad_group_id = ad_groups.ad_group_id\n and stats.source_relation = ad_groups.source_relation\n left join campaigns_accounts\n on stats.campaign_id = campaigns_accounts.campaign_id\n and stats.source_relation = campaigns_accounts.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.google_ads.int_google_ads__campaigns_accounts", "sql": " __dbt__cte__int_google_ads__campaigns_accounts as (\n\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__account_stats": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__account_stats", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__account_stats.sql", "original_file_path": "models/staging/stg_google_ads__account_stats.sql", "unique_id": "model.google_ads.stg_google_ads__account_stats", "fqn": ["google_ads", "staging", "stg_google_ads__account_stats"], "alias": "stg_google_ads__account_stats", "checksum": {"name": "sha256", "checksum": "1483cb7859e41b7c200981378496060307293ad55db1ef815dcff1d2a1ba49f2"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of an account in Google Ads broken down to the ad network and device type.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "date_day": {"name": "date_day", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "ad_network_type": {"name": "ad_network_type", "description": "The Google Ad network type used across the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_network_type"]}, "device": {"name": "device", "description": "Account ad performance per unique device where the ads were served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.device"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "spend": {"name": "spend", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.9424107, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_stats\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_google_ads__account_stats_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__account_stats_tmp')),\n staging_columns=get_account_stats_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n customer_id as account_id, \n date as date_day,\n ad_network_type,\n device,\n coalesce(clicks, 0) as clicks, \n coalesce(cost_micros, 0) / 1000000.0 as spend, \n coalesce(impressions, 0) as impressions,\n coalesce(conversions, 0) as conversions,\n coalesce(conversions_value, 0) as conversions_value,\n coalesce(view_through_conversions, 0) as view_through_conversions\n \n {{ google_ads_fill_pass_through_columns(pass_through_fields=var('google_ads__account_stats_passthrough_metrics'), except=['conversions', \"conversions_value\", \"view_through_conversions\"]) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__account_stats_tmp", "package": null, "version": null}, {"name": "stg_google_ads__account_stats_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_account_stats_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.google_ads.google_ads_fill_pass_through_columns"], "nodes": ["model.google_ads.stg_google_ads__account_stats_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__account_stats.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_stats_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_id as _fivetran_id,\n _fivetran_synced as _fivetran_synced,\n ad_network_type as ad_network_type,\n clicks as clicks,\n cost_micros as cost_micros,\n customer_id as customer_id,\n date as date,\n device as device,\n impressions as impressions,\n conversions as conversions,\n conversions_value as conversions_value,\n view_through_conversions as view_through_conversions\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n customer_id as account_id, \n date as date_day,\n ad_network_type,\n device,\n coalesce(clicks, 0) as clicks, \n coalesce(cost_micros, 0) / 1000000.0 as spend, \n coalesce(impressions, 0) as impressions,\n coalesce(conversions, 0) as conversions,\n coalesce(conversions_value, 0) as conversions_value,\n coalesce(view_through_conversions, 0) as view_through_conversions\n \n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__ad_group_stats": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_group_stats", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__ad_group_stats.sql", "original_file_path": "models/staging/stg_google_ads__ad_group_stats.sql", "unique_id": "model.google_ads.stg_google_ads__ad_group_stats", "fqn": ["google_ads", "staging", "stg_google_ads__ad_group_stats"], "alias": "stg_google_ads__ad_group_stats", "checksum": {"name": "sha256", "checksum": "7adf2107c94462aa1fa0ac6f669d932138f5da66aae41eadd7a9da16d0f1c315"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of an ad group in Google Ads broken down to the ad network and device type.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "date_day": {"name": "date_day", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "ad_network_type": {"name": "ad_network_type", "description": "The Google Ad network type used across the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_network_type"]}, "device": {"name": "device", "description": "Account ad performance per unique device where the ads were served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.device"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "spend": {"name": "spend", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.9388885, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_stats\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_google_ads__ad_group_stats_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__ad_group_stats_tmp')),\n staging_columns=get_ad_group_stats_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n customer_id as account_id, \n date as date_day, \n cast(id as {{ dbt.type_string() }}) as ad_group_id, \n campaign_id, \n device,\n ad_network_type,\n coalesce(clicks, 0) as clicks, \n coalesce(cost_micros, 0) / 1000000.0 as spend, \n coalesce(impressions, 0) as impressions,\n coalesce(conversions, 0) as conversions,\n coalesce(conversions_value, 0) as conversions_value,\n coalesce(view_through_conversions, 0) as view_through_conversions\n \n {{ google_ads_fill_pass_through_columns(pass_through_fields=var('google_ads__ad_group_stats_passthrough_metrics'), except=['conversions', \"conversions_value\", \"view_through_conversions\"]) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_group_stats_tmp", "package": null, "version": null}, {"name": "stg_google_ads__ad_group_stats_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_ad_group_stats_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.google_ads.google_ads_fill_pass_through_columns"], "nodes": ["model.google_ads.stg_google_ads__ad_group_stats_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__ad_group_stats.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_stats_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_id as _fivetran_id,\n _fivetran_synced as _fivetran_synced,\n ad_network_type as ad_network_type,\n campaign_id as campaign_id,\n clicks as clicks,\n cost_micros as cost_micros,\n customer_id as customer_id,\n date as date,\n device as device,\n id as id,\n impressions as impressions,\n conversions as conversions,\n conversions_value as conversions_value,\n view_through_conversions as view_through_conversions\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n customer_id as account_id, \n date as date_day, \n cast(id as TEXT) as ad_group_id, \n campaign_id, \n device,\n ad_network_type,\n coalesce(clicks, 0) as clicks, \n coalesce(cost_micros, 0) / 1000000.0 as spend, \n coalesce(impressions, 0) as impressions,\n coalesce(conversions, 0) as conversions,\n coalesce(conversions_value, 0) as conversions_value,\n coalesce(view_through_conversions, 0) as view_through_conversions\n \n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__account_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__account_history", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__account_history.sql", "original_file_path": "models/staging/stg_google_ads__account_history.sql", "unique_id": "model.google_ads.stg_google_ads__account_history", "fqn": ["google_ads", "staging", "stg_google_ads__account_history"], "alias": "stg_google_ads__account_history", "checksum": {"name": "sha256", "checksum": "c24e632389d4b0d90a331f54a8468cc4aa5cd67d8fdc3a6ed82629c03337e55b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of an account in Google Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The ID of the Account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.account_id"]}, "currency_code": {"name": "currency_code", "description": "The currency of the spend reported.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "auto_tagging_enabled": {"name": "auto_tagging_enabled", "description": "Boolean indicating if auto tagging is enabled on the account ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "time_zone": {"name": "time_zone", "description": "The time zone of the account ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "The descriptive name of the Customer account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.account_descriptive_name"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads._fivetran_synced"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether the record is the most recent version of the object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.9287748, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_google_ads__account_history_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__account_history_tmp')),\n staging_columns=get_account_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as account_id,\n updated_at,\n currency_code,\n auto_tagging_enabled,\n time_zone,\n descriptive_name as account_name,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='google_ads') }} order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__account_history_tmp", "package": null, "version": null}, {"name": "stg_google_ads__account_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_account_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.google_ads.stg_google_ads__account_history_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__account_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history_tmp\"\n\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n auto_tagging_enabled as auto_tagging_enabled,\n currency_code as currency_code,\n descriptive_name as descriptive_name,\n id as id,\n time_zone as time_zone,\n updated_at as updated_at,\n cast(null as boolean) as _fivetran_active\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as account_id,\n updated_at,\n currency_code,\n auto_tagging_enabled,\n time_zone,\n descriptive_name as account_name,\n row_number() over (partition by id order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__ad_group_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_group_history", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__ad_group_history.sql", "original_file_path": "models/staging/stg_google_ads__ad_group_history.sql", "unique_id": "model.google_ads.stg_google_ads__ad_group_history", "fqn": ["google_ads", "staging", "stg_google_ads__ad_group_history"], "alias": "stg_google_ads__ad_group_history", "checksum": {"name": "sha256", "checksum": "975a28a6356dad15fd349196e7f5681cb7d879c3c24c5176491e443a890707bb"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of an ad group in Google Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "ad_group_type": {"name": "ad_group_type", "description": "The type of the ad group in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_type"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_name"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_name"]}, "ad_group_status": {"name": "ad_group_status", "description": "Status of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_status"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether the record is the most recent version of the object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.9297578, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_google_ads__ad_group_history_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__ad_group_history_tmp')),\n staging_columns=get_ad_group_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as {{ dbt.type_string() }}) as ad_group_id,\n updated_at,\n type as ad_group_type, \n campaign_id, \n campaign_name, \n name as ad_group_name, \n status as ad_group_status,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='google_ads') }} order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_group_history_tmp", "package": null, "version": null}, {"name": "stg_google_ads__ad_group_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_ad_group_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.google_ads.stg_google_ads__ad_group_history_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__ad_group_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_history_tmp\"\n\n),\n\nfields as (\n\n select\n \n campaign_id as campaign_id,\n campaign_name as campaign_name,\n id as id,\n name as name,\n status as status,\n type as type,\n updated_at as updated_at,\n cast(null as boolean) as _fivetran_active\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as TEXT) as ad_group_id,\n updated_at,\n type as ad_group_type, \n campaign_id, \n campaign_name, \n name as ad_group_name, \n status as ad_group_status,\n row_number() over (partition by id order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__campaign_stats": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_stats", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__campaign_stats.sql", "original_file_path": "models/staging/stg_google_ads__campaign_stats.sql", "unique_id": "model.google_ads.stg_google_ads__campaign_stats", "fqn": ["google_ads", "staging", "stg_google_ads__campaign_stats"], "alias": "stg_google_ads__campaign_stats", "checksum": {"name": "sha256", "checksum": "0a6f489a9c965114a9b63b47a59898baeaceae5513804119a07c11c285704b18"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a campaign in Google Ads broken down to the ad network and device type.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "date_day": {"name": "date_day", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "ad_network_type": {"name": "ad_network_type", "description": "The Google Ad network type used across the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_network_type"]}, "device": {"name": "device", "description": "Account ad performance per unique device where the ads were served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.device"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "spend": {"name": "spend", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.9400299, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_stats\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_google_ads__campaign_stats_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__campaign_stats_tmp')),\n staging_columns=get_campaign_stats_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n customer_id as account_id, \n date as date_day, \n id as campaign_id, \n ad_network_type,\n device,\n coalesce(clicks, 0) as clicks, \n coalesce(cost_micros, 0) / 1000000.0 as spend, \n coalesce(impressions, 0) as impressions,\n coalesce(conversions, 0) as conversions,\n coalesce(conversions_value, 0) as conversions_value,\n coalesce(view_through_conversions, 0) as view_through_conversions\n \n {{ google_ads_fill_pass_through_columns(pass_through_fields=var('google_ads__campaign_stats_passthrough_metrics'), except=['conversions', \"conversions_value\", \"view_through_conversions\"]) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_stats_tmp", "package": null, "version": null}, {"name": "stg_google_ads__campaign_stats_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_campaign_stats_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.google_ads.google_ads_fill_pass_through_columns"], "nodes": ["model.google_ads.stg_google_ads__campaign_stats_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__campaign_stats.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_stats_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_id as _fivetran_id,\n _fivetran_synced as _fivetran_synced,\n ad_network_type as ad_network_type,\n clicks as clicks,\n cost_micros as cost_micros,\n customer_id as customer_id,\n date as date,\n device as device,\n id as id,\n impressions as impressions,\n conversions as conversions,\n conversions_value as conversions_value,\n view_through_conversions as view_through_conversions\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n customer_id as account_id, \n date as date_day, \n id as campaign_id, \n ad_network_type,\n device,\n coalesce(clicks, 0) as clicks, \n coalesce(cost_micros, 0) / 1000000.0 as spend, \n coalesce(impressions, 0) as impressions,\n coalesce(conversions, 0) as conversions,\n coalesce(conversions_value, 0) as conversions_value,\n coalesce(view_through_conversions, 0) as view_through_conversions\n \n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__campaign_budget_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_budget_history", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__campaign_budget_history.sql", "original_file_path": "models/staging/stg_google_ads__campaign_budget_history.sql", "unique_id": "model.google_ads.stg_google_ads__campaign_budget_history", "fqn": ["google_ads", "staging", "stg_google_ads__campaign_budget_history"], "alias": "stg_google_ads__campaign_budget_history", "checksum": {"name": "sha256", "checksum": "7fa23c1b1dd88c604a539192aefd83dd4352bb660447a3c86833d5f07548e983"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a historical version of a campaign budget in Google Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "daily_budget": {"name": "daily_budget", "description": "The daily budget amount in dollars, converted from amount_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "has_recommended_budget": {"name": "has_recommended_budget", "description": "Boolean indicating if Google has a recommended budget for this campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "recommended_daily_budget": {"name": "recommended_daily_budget", "description": "Google's recommended daily budget amount in dollars, converted from recommended_budget_amount_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_budget": {"name": "total_budget", "description": "The total budget amount in dollars for lifetime budgets, converted from total_amount_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_type": {"name": "budget_type", "description": "The type of budget (DAILY, LIFETIME, etc.).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_status": {"name": "budget_status", "description": "The status of the budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether the record is the most recent version of the object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.9461777, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_budget_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True) and var('google_ads__using_campaign_budget_history', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_google_ads__campaign_budget_history_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__campaign_budget_history_tmp')),\n staging_columns=get_campaign_budget_history_columns()\n )\n }}\n\n\n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n updated_at,\n campaign_id,\n amount_micros / 1000000.0 as daily_budget,\n status as budget_status,\n has_recommended_budget,\n recommended_budget_amount_micros / 1000000.0 as recommended_daily_budget,\n total_amount_micros / 1000000.0 as total_budget,\n type as budget_type,\n row_number() over (partition by campaign_id {{ fivetran_utils.partition_by_source_relation(package_name='google_ads') }} order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_budget_history_tmp", "package": null, "version": null}, {"name": "stg_google_ads__campaign_budget_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_campaign_budget_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.google_ads.stg_google_ads__campaign_budget_history_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__campaign_budget_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_budget_history_tmp\"\n\n),\n\nfields as (\n\n select\n \n id as id,\n updated_at as updated_at,\n campaign_id as campaign_id,\n amount_micros as amount_micros,\n delivery_method as delivery_method,\n explicitly_shared as explicitly_shared,\n name as name,\n reference_count as reference_count,\n status as status,\n has_recommended_budget as has_recommended_budget,\n period as period,\n recommended_budget_amount_micros as recommended_budget_amount_micros,\n total_amount_micros as total_amount_micros,\n type as type,\n _fivetran_active as _fivetran_active\n\n\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n updated_at,\n campaign_id,\n amount_micros / 1000000.0 as daily_budget,\n status as budget_status,\n has_recommended_budget,\n recommended_budget_amount_micros / 1000000.0 as recommended_daily_budget,\n total_amount_micros / 1000000.0 as total_budget,\n type as budget_type,\n row_number() over (partition by campaign_id order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__campaign_bid_modifier_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_bid_modifier_history", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__campaign_bid_modifier_history.sql", "original_file_path": "models/staging/stg_google_ads__campaign_bid_modifier_history.sql", "unique_id": "model.google_ads.stg_google_ads__campaign_bid_modifier_history", "fqn": ["google_ads", "staging", "stg_google_ads__campaign_bid_modifier_history"], "alias": "stg_google_ads__campaign_bid_modifier_history", "checksum": {"name": "sha256", "checksum": "b0e8cbebf0728494a13430b496479e4c28bf38ca8ce4a780e72d2b5f15f88a45"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a historical version of a campaign bid modifier in Google Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "criterion_id": {"name": "criterion_id", "description": "Unique identifier of the criterion that the bid modifier is applied to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_modifier": {"name": "bid_modifier", "description": "The modifier applied to the bid for this criterion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "interaction_type": {"name": "interaction_type", "description": "The type of interaction for the bid modifier.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "interaction_event_types": {"name": "interaction_event_types", "description": "The event types for the interaction.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether the record is the most recent version of the object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.9451525, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_bid_modifier_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True) and var('google_ads__using_campaign_bid_modifier_history', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_google_ads__campaign_bid_modifier_history_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__campaign_bid_modifier_history_tmp')),\n staging_columns=get_campaign_bid_modifier_history_columns()\n )\n }}\n\n\n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n campaign_id,\n criterion_id,\n bid_modifier,\n interaction_type,\n interaction_event_types,\n updated_at,\n row_number() over (partition by campaign_id, criterion_id {{ fivetran_utils.partition_by_source_relation(package_name='google_ads') }} order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_bid_modifier_history_tmp", "package": null, "version": null}, {"name": "stg_google_ads__campaign_bid_modifier_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_campaign_bid_modifier_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.google_ads.stg_google_ads__campaign_bid_modifier_history_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__campaign_bid_modifier_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_bid_modifier_history_tmp\"\n\n),\n\nfields as (\n\n select\n \n campaign_id as campaign_id,\n criterion_id as criterion_id,\n bid_modifier as bid_modifier,\n interaction_type as interaction_type,\n interaction_event_types as interaction_event_types,\n updated_at as updated_at,\n _fivetran_active as _fivetran_active\n\n\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n campaign_id,\n criterion_id,\n bid_modifier,\n interaction_type,\n interaction_event_types,\n updated_at,\n row_number() over (partition by campaign_id, criterion_id order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__keyword_stats": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__keyword_stats", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__keyword_stats.sql", "original_file_path": "models/staging/stg_google_ads__keyword_stats.sql", "unique_id": "model.google_ads.stg_google_ads__keyword_stats", "fqn": ["google_ads", "staging", "stg_google_ads__keyword_stats"], "alias": "stg_google_ads__keyword_stats", "checksum": {"name": "sha256", "checksum": "6d5023f3f164b181243119c03070a2a00311bab3342378e2d582d87cd9e0e8ef"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a keyword in Google Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "date_day": {"name": "date_day", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "keyword_id": {"name": "keyword_id", "description": "The unique ID of the keyword record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "criterion_id": {"name": "criterion_id", "description": "Reference to the ad group criterion used for the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "spend": {"name": "spend", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.9412355, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__keyword_stats\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_google_ads__keyword_stats_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__keyword_stats_tmp')),\n staging_columns=get_keyword_stats_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n _fivetran_id as keyword_id,\n customer_id as account_id, \n date as date_day, \n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id,\n ad_group_criterion_criterion_id as criterion_id,\n campaign_id, \n coalesce(clicks, 0) as clicks, \n coalesce(cost_micros, 0) / 1000000.0 as spend, \n coalesce(impressions, 0) as impressions,\n coalesce(conversions, 0) as conversions,\n coalesce(conversions_value, 0) as conversions_value,\n coalesce(view_through_conversions, 0) as view_through_conversions\n \n {{ google_ads_fill_pass_through_columns(pass_through_fields=var('google_ads__keyword_stats_passthrough_metrics'), except=['conversions', \"conversions_value\", \"view_through_conversions\"]) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__keyword_stats_tmp", "package": null, "version": null}, {"name": "stg_google_ads__keyword_stats_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_keyword_stats_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.google_ads.google_ads_fill_pass_through_columns"], "nodes": ["model.google_ads.stg_google_ads__keyword_stats_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__keyword_stats.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__keyword_stats_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_id as _fivetran_id,\n _fivetran_synced as _fivetran_synced,\n ad_group_criterion_criterion_id as ad_group_criterion_criterion_id,\n ad_group_id as ad_group_id,\n ad_network_type as ad_network_type,\n campaign_id as campaign_id,\n clicks as clicks,\n cost_micros as cost_micros,\n customer_id as customer_id,\n date as date,\n device as device,\n impressions as impressions,\n conversions as conversions,\n conversions_value as conversions_value,\n view_through_conversions as view_through_conversions\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n _fivetran_id as keyword_id,\n customer_id as account_id, \n date as date_day, \n cast(ad_group_id as TEXT) as ad_group_id,\n ad_group_criterion_criterion_id as criterion_id,\n campaign_id, \n coalesce(clicks, 0) as clicks, \n coalesce(cost_micros, 0) / 1000000.0 as spend, \n coalesce(impressions, 0) as impressions,\n coalesce(conversions, 0) as conversions,\n coalesce(conversions_value, 0) as conversions_value,\n coalesce(view_through_conversions, 0) as view_through_conversions\n \n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__ad_stats": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_stats", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__ad_stats.sql", "original_file_path": "models/staging/stg_google_ads__ad_stats.sql", "unique_id": "model.google_ads.stg_google_ads__ad_stats", "fqn": ["google_ads", "staging", "stg_google_ads__ad_stats"], "alias": "stg_google_ads__ad_stats", "checksum": {"name": "sha256", "checksum": "c6d9037906224b8362fb2936ddeecc5d299023d6b9b02054f7a0ba7dc4ede422"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of an ad in Google Ads broken down to the ad network, device type, and ad_group_id.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "date_day": {"name": "date_day", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "ad_id": {"name": "ad_id", "description": "The ID of the Ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "ad_network_type": {"name": "ad_network_type", "description": "The Google Ad network type used across the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_network_type"]}, "keyword_ad_group_criterion": {"name": "keyword_ad_group_criterion", "description": "The ad group which the keyword criterion resides.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "device": {"name": "device", "description": "Account ad performance per unique device where the ads were served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.device"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "spend": {"name": "spend", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.9338574, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_stats\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_google_ads__ad_stats_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__ad_stats_tmp')),\n staging_columns=get_ad_stats_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n customer_id as account_id, \n date as date_day, \n {% if target.type in ('spark','databricks') %}\n coalesce(cast(ad_group_id as {{ dbt.type_string() }}), split(ad_group,'adGroups/')[1]) as ad_group_id,\n {% else %}\n coalesce(cast(ad_group_id as {{ dbt.type_string() }}), {{ dbt.split_part(string_text='ad_group', delimiter_text=\"'adGroups/'\", part_number=2) }}) as ad_group_id,\n {% endif %}\n keyword_ad_group_criterion,\n ad_network_type,\n device,\n ad_id, \n campaign_id, \n coalesce(clicks, 0) as clicks, \n coalesce(cost_micros, 0) / 1000000.0 as spend, \n coalesce(impressions, 0) as impressions,\n coalesce(conversions, 0) as conversions,\n coalesce(conversions_value, 0) as conversions_value,\n coalesce(view_through_conversions, 0) as view_through_conversions\n\n {{ google_ads_fill_pass_through_columns(pass_through_fields=var('google_ads__ad_stats_passthrough_metrics'), except=['conversions', \"conversions_value\", \"view_through_conversions\"]) }}\n\n from fields\n)\n\nselect * from final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_stats_tmp", "package": null, "version": null}, {"name": "stg_google_ads__ad_stats_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_ad_stats_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.dbt.split_part", "macro.google_ads.google_ads_fill_pass_through_columns"], "nodes": ["model.google_ads.stg_google_ads__ad_stats_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__ad_stats.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_stats_tmp\"\n\n),\n\nfields as (\n\n select\n \n ad_group as ad_group,\n ad_group_id as ad_group_id,\n ad_id as ad_id,\n ad_network_type as ad_network_type,\n campaign_id as campaign_id,\n clicks as clicks,\n cost_micros as cost_micros,\n customer_id as customer_id,\n date as date,\n device as device,\n impressions as impressions,\n keyword_ad_group_criterion as keyword_ad_group_criterion,\n conversions as conversions,\n conversions_value as conversions_value,\n view_through_conversions as view_through_conversions\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n customer_id as account_id, \n date as date_day, \n \n coalesce(cast(ad_group_id as TEXT), \n\n \n \n\n split_part(\n ad_group,\n 'adGroups/',\n 2\n )\n\n\n \n\n) as ad_group_id,\n \n keyword_ad_group_criterion,\n ad_network_type,\n device,\n ad_id, \n campaign_id, \n coalesce(clicks, 0) as clicks, \n coalesce(cost_micros, 0) / 1000000.0 as spend, \n coalesce(impressions, 0) as impressions,\n coalesce(conversions, 0) as conversions,\n coalesce(conversions_value, 0) as conversions_value,\n coalesce(view_through_conversions, 0) as view_through_conversions\n\n \n\n\n\n\n\n from fields\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__ad_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_history", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__ad_history.sql", "original_file_path": "models/staging/stg_google_ads__ad_history.sql", "unique_id": "model.google_ads.stg_google_ads__ad_history", "fqn": ["google_ads", "staging", "stg_google_ads__ad_history"], "alias": "stg_google_ads__ad_history", "checksum": {"name": "sha256", "checksum": "f2da7dbb48248ef620b8fc71255aba890efb7e97de8eac15d7023106c40c111e"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of an ad in Google Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "ad_id": {"name": "ad_id", "description": "The ID of the Ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_id"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "display_url": {"name": "display_url", "description": "The display url of the ad that is being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_type": {"name": "ad_type", "description": "The type of the ad in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_type"]}, "ad_status": {"name": "ad_status", "description": "Status of the Ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_status"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether the record is the most recent version of the object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.is_most_recent_record"]}, "source_final_urls": {"name": "source_final_urls", "description": "The original list of final urls expressed as an array. Please be aware the test used on this field is intended to warn you if you have fields with multiple urls. If you do, the `final_url` field will filter down the urls within the array to just the first. Therefore, this package will only leverage one of possibly many urls within this field array.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "final_url": {"name": "final_url", "description": "The first url in the list of the urls within the `final_urls` source field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.base_url"]}, "url_host": {"name": "url_host", "description": "The URL host of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.url_host"]}, "url_path": {"name": "url_path", "description": "The URL path of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.url_path"]}, "utm_source": {"name": "utm_source", "description": "The utm_source parameter of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.utm_source"]}, "utm_medium": {"name": "utm_medium", "description": "The utm_medium parameter of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.utm_medium"]}, "utm_campaign": {"name": "utm_campaign", "description": "The utm_campaign parameter of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.utm_campaign"]}, "utm_content": {"name": "utm_content", "description": "The utm_content parameter of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.utm_content"]}, "utm_term": {"name": "utm_term", "description": "The utm_term parameter of the ad, extracted from the `final_urls`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.utm_term"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.9315906, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_google_ads__ad_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__ad_history_tmp')),\n staging_columns=get_ad_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id, \n id as ad_id,\n name as ad_name,\n updated_at,\n type as ad_type,\n status as ad_status,\n display_url,\n final_urls as source_final_urls,\n replace(replace(final_urls, '[', ''),']','') as final_urls,\n row_number() over (partition by id, ad_group_id {{ fivetran_utils.partition_by_source_relation(package_name='google_ads') }} order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n),\n\nfinal_urls as (\n\n select \n *,\n --Extract the first url within the list of urls provided within the final_urls field\n {{ dbt.split_part(string_text='final_urls', delimiter_text=\"','\", part_number=1) }} as final_url\n\n from final\n\n),\n\nurl_fields as (\n select \n *,\n {{ dbt.split_part('final_url', \"'?'\", 1) }} as base_url,\n {{ dbt_utils.get_url_host('final_url') }} as url_host,\n '/' || {{ dbt_utils.get_url_path('final_url') }} as url_path,\n {{ google_ads.google_ads_extract_url_parameter('final_url', 'utm_source') }} as utm_source,\n {{ google_ads.google_ads_extract_url_parameter('final_url', 'utm_medium') }} as utm_medium,\n {{ google_ads.google_ads_extract_url_parameter('final_url', 'utm_campaign') }} as utm_campaign,\n {{ google_ads.google_ads_extract_url_parameter('final_url', 'utm_content') }} as utm_content,\n {{ google_ads.google_ads_extract_url_parameter('final_url', 'utm_term') }} as utm_term\n from final_urls\n)\n\nselect * \nfrom url_fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_history_tmp", "package": null, "version": null}, {"name": "stg_google_ads__ad_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_ad_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.fivetran_utils.partition_by_source_relation", "macro.dbt.split_part", "macro.dbt_utils.get_url_host", "macro.dbt_utils.get_url_path", "macro.google_ads.google_ads_extract_url_parameter"], "nodes": ["model.google_ads.stg_google_ads__ad_history_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__ad_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_history_tmp\"\n),\n\nfields as (\n\n select\n \n ad_group_id as ad_group_id,\n display_url as display_url,\n final_urls as final_urls,\n id as id,\n name as name,\n status as status,\n type as type,\n updated_at as updated_at,\n cast(null as boolean) as _fivetran_active\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(ad_group_id as TEXT) as ad_group_id, \n id as ad_id,\n name as ad_name,\n updated_at,\n type as ad_type,\n status as ad_status,\n display_url,\n final_urls as source_final_urls,\n replace(replace(final_urls, '[', ''),']','') as final_urls,\n row_number() over (partition by id, ad_group_id order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n),\n\nfinal_urls as (\n\n select \n *,\n --Extract the first url within the list of urls provided within the final_urls field\n \n\n \n \n\n split_part(\n final_urls,\n ',',\n 1\n )\n\n\n \n\n as final_url\n\n from final\n\n),\n\nurl_fields as (\n select \n *,\n \n\n \n \n\n split_part(\n final_url,\n '?',\n 1\n )\n\n\n \n\n as base_url,\n \n \n cast(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n \n\n replace(\n \n\n replace(\n \n\n replace(\n final_url,\n 'android-app://',\n ''\n )\n\n\n,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n '/',\n 1\n )\n\n\n \n\n,\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_host,\n '/' || \n \n cast(\n\n \n \n\n split_part(\n \n\n right(\n \n\n replace(\n \n\n replace(\n final_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n \n\n length(\n \n\n replace(\n \n\n replace(\n final_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n )-coalesce(\n nullif(\n\n position(\n '/' in \n\n replace(\n \n\n replace(\n final_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ), 0),\n \n\n position(\n '?' in \n\n replace(\n \n\n replace(\n final_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ) - 1\n )\n ),\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_path,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n final_url,\n 'utm_source=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_source,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n final_url,\n 'utm_medium=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_medium,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n final_url,\n 'utm_campaign=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_campaign,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n final_url,\n 'utm_content=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_content,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n final_url,\n 'utm_term=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_term\n from final_urls\n)\n\nselect * \nfrom url_fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__ad_group_criterion_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_group_criterion_history", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__ad_group_criterion_history.sql", "original_file_path": "models/staging/stg_google_ads__ad_group_criterion_history.sql", "unique_id": "model.google_ads.stg_google_ads__ad_group_criterion_history", "fqn": ["google_ads", "staging", "stg_google_ads__ad_group_criterion_history"], "alias": "stg_google_ads__ad_group_criterion_history", "checksum": {"name": "sha256", "checksum": "dd658cb5c3120d8e798782414b31aabce002635e64dd043ed09f922c073f8be7"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a historical version of an ad group criterion in Google Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "criterion_id": {"name": "criterion_id", "description": "Unique identifier of the ad group criterion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "base_campaign_id": {"name": "base_campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "type": {"name": "type", "description": "The type of ad group criterion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The current status of the ad group criterion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_match_type": {"name": "keyword_match_type", "description": "The match type which dictate how closely the keyword needs to match with the user\u2019s search query so that the ad can be considered for the auction.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_text": {"name": "keyword_text", "description": "The text used within the keyword criterion that is being matched against.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether the record is the most recent version of the object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.9376428, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_criterion_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_google_ads__ad_group_criterion_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__ad_group_criterion_history_tmp')),\n staging_columns=get_ad_group_criterion_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as criterion_id,\n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id,\n base_campaign_id,\n updated_at,\n type,\n status,\n keyword_match_type,\n keyword_text,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='google_ads') }} order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_group_criterion_history_tmp", "package": null, "version": null}, {"name": "stg_google_ads__ad_group_criterion_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_ad_group_criterion_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.google_ads.stg_google_ads__ad_group_criterion_history_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__ad_group_criterion_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_criterion_history_tmp\"\n),\n\nfields as (\n\n select\n \n id as id,\n ad_group_id as ad_group_id,\n base_campaign_id as base_campaign_id,\n _fivetran_synced as _fivetran_synced,\n updated_at as updated_at,\n type as type,\n status as status,\n keyword_match_type as keyword_match_type,\n keyword_text as keyword_text,\n cast(null as boolean) as _fivetran_active\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as criterion_id,\n cast(ad_group_id as TEXT) as ad_group_id,\n base_campaign_id,\n updated_at,\n type,\n status,\n keyword_match_type,\n keyword_text,\n row_number() over (partition by id order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__search_term_keyword_stats": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__search_term_keyword_stats", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__search_term_keyword_stats.sql", "original_file_path": "models/staging/stg_google_ads__search_term_keyword_stats.sql", "unique_id": "model.google_ads.stg_google_ads__search_term_keyword_stats", "fqn": ["google_ads", "staging", "stg_google_ads__search_term_keyword_stats"], "alias": "stg_google_ads__search_term_keyword_stats", "checksum": {"name": "sha256", "checksum": "e959c4e02c3e911646bba80785f3e9603c99b27131ebf33251ea810bd2aff3df"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a search term (including associated tracked keywords) in Google Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "date_day": {"name": "date_day", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "search_term_id": {"name": "search_term_id", "description": "The unique ID of the search term record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "search_term": {"name": "search_term", "description": "A word or set of words a person enters when searching on Google or one of Google's Search Network sites", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.search_term"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "search_term_match_type": {"name": "search_term_match_type", "description": "How closely the search terms that triggered your ads on Google are related to the actual keywords in your account. Can be `BROAD` ,`EXACT`, `PHRASE`, `UNKNOWN`, or `UNSPECIFIED`.\n\nSee more details [here](https://support.google.com/google-ads/answer/7478529?sjid=15681083914881504235-NC&visit_id=638760377693438101-1187740487&rd=1).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.search_term_match_type"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "keyword_ad_group_criterion": {"name": "keyword_ad_group_criterion", "description": "The resource name of the keyword's ad group criterion. Ad group criterion resource names have the form: `customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}`", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.keyword_ad_group_criterion"]}, "status": {"name": "status", "description": "Indicates whether the search term is currently one of your targeted or excluded keywords. Possible values: `ADDED`, `ADDED_EXCLUDED`, `EXCLUDED`, `NONE`, `UNKNOWN`, or `UNSPECIFIED`", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.search_term_status"]}, "keyword_text": {"name": "keyword_text", "description": "The text of the keyword (at most 80 characters and 10 words).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.info_text"]}, "spend": {"name": "spend", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "criterion_id": {"name": "criterion_id", "description": "Reference to the ad group criterion used for the associated keyword. One `keyword_text` may have multiple `criterion_id` values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.9441438, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__search_term_keyword_stats\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True) and var('google_ads__using_search_term_keyword_stats', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_google_ads__search_term_keyword_stats_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__search_term_keyword_stats_tmp')),\n staging_columns=get_search_term_keyword_stats_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n customer_id as account_id,\n date as date_day,\n _fivetran_id as search_term_id,\n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id,\n campaign_id,\n keyword_ad_group_criterion,\n {# keyword_ad_group_criterion is formatted as: customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id} #}\n {{ dbt.split_part(string_text=\"keyword_ad_group_criterion\", delimiter_text=\"'~'\", part_number=2) }} as criterion_id,\n search_term,\n info_text as keyword_text,\n search_term_match_type,\n status, \n coalesce(clicks, 0) as clicks, \n coalesce(cost_micros, 0) / 1000000.0 as spend, \n coalesce(impressions, 0) as impressions,\n coalesce(conversions, 0) as conversions,\n coalesce(conversions_value, 0) as conversions_value,\n coalesce(view_through_conversions, 0) as view_through_conversions\n\n {{ google_ads_fill_pass_through_columns(pass_through_fields=var('google_ads__search_term_keyword_stats_passthrough_metrics')) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__search_term_keyword_stats_tmp", "package": null, "version": null}, {"name": "stg_google_ads__search_term_keyword_stats_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_search_term_keyword_stats_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.dbt.split_part", "macro.google_ads.google_ads_fill_pass_through_columns"], "nodes": ["model.google_ads.stg_google_ads__search_term_keyword_stats_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__search_term_keyword_stats.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__search_term_keyword_stats_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_id as _fivetran_id,\n _fivetran_synced as _fivetran_synced,\n ad_group_id as ad_group_id,\n campaign_id as campaign_id,\n clicks as clicks,\n conversions as conversions,\n conversions_value as conversions_value,\n cost_micros as cost_micros,\n customer_id as customer_id,\n date as date,\n impressions as impressions,\n info_text as info_text,\n keyword_ad_group_criterion as keyword_ad_group_criterion,\n search_term as search_term,\n search_term_match_type as search_term_match_type,\n status as status,\n view_through_conversions as view_through_conversions\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n customer_id as account_id,\n date as date_day,\n _fivetran_id as search_term_id,\n cast(ad_group_id as TEXT) as ad_group_id,\n campaign_id,\n keyword_ad_group_criterion,\n \n \n\n \n \n\n split_part(\n keyword_ad_group_criterion,\n '~',\n 2\n )\n\n\n \n\n as criterion_id,\n search_term,\n info_text as keyword_text,\n search_term_match_type,\n status, \n coalesce(clicks, 0) as clicks, \n coalesce(cost_micros, 0) / 1000000.0 as spend, \n coalesce(impressions, 0) as impressions,\n coalesce(conversions, 0) as conversions,\n coalesce(conversions_value, 0) as conversions_value,\n coalesce(view_through_conversions, 0) as view_through_conversions\n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__campaign_bidding_strategy_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_bidding_strategy_history", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__campaign_bidding_strategy_history.sql", "original_file_path": "models/staging/stg_google_ads__campaign_bidding_strategy_history.sql", "unique_id": "model.google_ads.stg_google_ads__campaign_bidding_strategy_history", "fqn": ["google_ads", "staging", "stg_google_ads__campaign_bidding_strategy_history"], "alias": "stg_google_ads__campaign_bidding_strategy_history", "checksum": {"name": "sha256", "checksum": "cdca3aa07882444b8da052aeede74cd7e4831a435e9b1f917f8931dc89d3f660"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a historical version of a campaign bidding strategy in Google Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "enhanced_cpc": {"name": "enhanced_cpc", "description": "Boolean indicating if enhanced CPC is enabled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "manual_cpa": {"name": "manual_cpa", "description": "Manual cost per acquisition setting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "manual_cpm": {"name": "manual_cpm", "description": "Manual cost per mille setting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "manual_cpv": {"name": "manual_cpv", "description": "Manual cost per view setting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bidding_status": {"name": "bidding_status", "description": "The status of the bidding strategy.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "target_cpa": {"name": "target_cpa", "description": "Target cost per acquisition in dollars, converted from target_cpa_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "target_roas": {"name": "target_roas", "description": "Target return on ad spend.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bidding_strategy_type": {"name": "bidding_strategy_type", "description": "The type of bidding strategy (MANUAL_CPC, TARGET_CPA, etc.).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether the record is the most recent version of the object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.9514256, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_bidding_strategy_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True) and var('google_ads__using_campaign_bidding_strategy_history', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_google_ads__campaign_bidding_strategy_history_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__campaign_bidding_strategy_history_tmp')),\n staging_columns=get_campaign_bidding_strategy_history_columns()\n )\n }}\n\n\n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n campaign_id,\n updated_at,\n enhanced_cpc,\n manual_cpa,\n manual_cpm,\n manual_cpv,\n status as bidding_status,\n target_cpa_micros / 1000000.0 as target_cpa,\n target_roas,\n type as bidding_strategy_type,\n row_number() over (partition by campaign_id {{ fivetran_utils.partition_by_source_relation(package_name='google_ads') }} order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_bidding_strategy_history_tmp", "package": null, "version": null}, {"name": "stg_google_ads__campaign_bidding_strategy_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_campaign_bidding_strategy_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.google_ads.stg_google_ads__campaign_bidding_strategy_history_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__campaign_bidding_strategy_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_bidding_strategy_history_tmp\"\n\n),\n\nfields as (\n\n select\n \n campaign_id as campaign_id,\n updated_at as updated_at,\n cpc_bid_ceiling_micros as cpc_bid_ceiling_micros,\n cpc_bid_floor_micros as cpc_bid_floor_micros,\n enhanced_cpc as enhanced_cpc,\n enhanced_cpc_enabled as enhanced_cpc_enabled,\n location as location,\n location_fraction_micros as location_fraction_micros,\n manual_cpa as manual_cpa,\n manual_cpm as manual_cpm,\n manual_cpv as manual_cpv,\n name as name,\n status as status,\n target_cpa_micros as target_cpa_micros,\n target_cpm as target_cpm,\n target_roas as target_roas,\n type as type,\n _fivetran_active as _fivetran_active\n\n\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n campaign_id,\n updated_at,\n enhanced_cpc,\n manual_cpa,\n manual_cpm,\n manual_cpv,\n status as bidding_status,\n target_cpa_micros / 1000000.0 as target_cpa,\n target_roas,\n type as bidding_strategy_type,\n row_number() over (partition by campaign_id order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__campaign_criterion_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_criterion_history", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__campaign_criterion_history.sql", "original_file_path": "models/staging/stg_google_ads__campaign_criterion_history.sql", "unique_id": "model.google_ads.stg_google_ads__campaign_criterion_history", "fqn": ["google_ads", "staging", "stg_google_ads__campaign_criterion_history"], "alias": "stg_google_ads__campaign_criterion_history", "checksum": {"name": "sha256", "checksum": "b40b2b38671e063d114a1d02da5c2b04ab7908528caa59d2870a6d1d5cdaf930"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a historical version of a campaign criterion in Google Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "criterion_id": {"name": "criterion_id", "description": "Unique identifier of the campaign criterion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "age_range_type": {"name": "age_range_type", "description": "The age range type for demographic targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "device_type": {"name": "device_type", "description": "The device type for targeting (MOBILE, DESKTOP, TABLET).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "geo_target_constant_id": {"name": "geo_target_constant_id", "description": "The geographic target constant ID for location targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "gender_type": {"name": "gender_type", "description": "The gender type for demographic targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "income_range_type": {"name": "income_range_type", "description": "The income range type for demographic targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_text": {"name": "keyword_text", "description": "The keyword text for keyword targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "parental_status_type": {"name": "parental_status_type", "description": "The parental status type for demographic targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement_url": {"name": "placement_url", "description": "The placement URL for placement targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "topic_constant_id": {"name": "topic_constant_id", "description": "The topic constant ID for topic targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "user_list_id": {"name": "user_list_id", "description": "The user list ID for audience targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether the record is the most recent version of the object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.9503324, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_criterion_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True) and var('google_ads__using_campaign_criterion_history', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_google_ads__campaign_criterion_history_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__campaign_criterion_history_tmp')),\n staging_columns=get_campaign_criterion_history_columns()\n )\n }}\n\n\n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n id as criterion_id,\n updated_at,\n campaign_id,\n geo_target_constant_id,\n topic_constant_id,\n user_list_id,\n age_range_type,\n device_type,\n gender_type,\n income_range_type,\n keyword_text,\n parental_status_type,\n placement_url,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='google_ads') }} order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_criterion_history_tmp", "package": null, "version": null}, {"name": "stg_google_ads__campaign_criterion_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_campaign_criterion_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.google_ads.stg_google_ads__campaign_criterion_history_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__campaign_criterion_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_criterion_history_tmp\"\n\n),\n\nfields as (\n\n select\n \n id as id,\n updated_at as updated_at,\n campaign_id as campaign_id,\n geo_target_constant_id as geo_target_constant_id,\n mobile_device_id as mobile_device_id,\n operating_system_version_id as operating_system_version_id,\n topic_constant_id as topic_constant_id,\n user_interest_id as user_interest_id,\n user_list_id as user_list_id,\n age_range_type as age_range_type,\n bid_modifier as bid_modifier,\n carrier_country_code as carrier_country_code,\n carrier_name as carrier_name,\n content_label_type as content_label_type,\n device_type as device_type,\n display_name as display_name,\n gender_type as gender_type,\n income_range_type as income_range_type,\n ip_block_ip_address as ip_block_ip_address,\n negative as negative,\n keyword_match_type as keyword_match_type,\n keyword_text as keyword_text,\n language_code as language_code,\n language_name as language_name,\n mobile_app_category_constant_id as mobile_app_category_constant_id,\n mobile_app_category_constant_name as mobile_app_category_constant_name,\n mobile_application_app_id as mobile_application_app_id,\n mobile_application_name as mobile_application_name,\n parental_status_type as parental_status_type,\n placement_url as placement_url,\n status as status,\n type as type,\n youtube_channel_id as youtube_channel_id,\n youtube_video_id as youtube_video_id,\n _fivetran_active as _fivetran_active,\n _fivetran_synced as _fivetran_synced\n\n\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n id as criterion_id,\n updated_at,\n campaign_id,\n geo_target_constant_id,\n topic_constant_id,\n user_list_id,\n age_range_type,\n device_type,\n gender_type,\n income_range_type,\n keyword_text,\n parental_status_type,\n placement_url,\n row_number() over (partition by id order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__campaign_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_history", "resource_type": "model", "package_name": "google_ads", "path": "staging/stg_google_ads__campaign_history.sql", "original_file_path": "models/staging/stg_google_ads__campaign_history.sql", "unique_id": "model.google_ads.stg_google_ads__campaign_history", "fqn": ["google_ads", "staging", "stg_google_ads__campaign_history"], "alias": "stg_google_ads__campaign_history", "checksum": {"name": "sha256", "checksum": "d88b43b16ca176e99502cab0d2a2314459210f3255142fc01f34d8373ce827b4"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of a campaign in Google Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "advertising_channel_type": {"name": "advertising_channel_type", "description": "The type of advertising channel being used by the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertising_channel_subtype": {"name": "advertising_channel_subtype", "description": "The advertising channel subtype that is being used by the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_date": {"name": "start_date", "description": "The start date of the campaign. Uses start_date_time when available, falls back to start_date for backward compatibility.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_date": {"name": "end_date", "description": "The end date of the campaign. Uses end_date_time when available, falls back to end_date for backward compatibility.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "serving_status": {"name": "serving_status", "description": "Status of the ads and how they are currently being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "General status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tracking_url_template": {"name": "tracking_url_template", "description": "The tracking url template being used throughout the campaign ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_name"]}, "account_id": {"name": "account_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether the record is the most recent version of the object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "google_ads://models/staging/stg_google_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708222.9362895, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_google_ads__campaign_history_tmp') }}\n\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_google_ads__campaign_history_tmp')),\n staging_columns=get_campaign_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='google_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as campaign_id, \n updated_at,\n name as campaign_name,\n customer_id as account_id,\n advertising_channel_type,\n advertising_channel_subtype,\n coalesce(cast(start_date_time as {{ dbt.type_string() }}), cast(start_date as {{ dbt.type_string() }})) as start_date,\n coalesce(cast(end_date_time as {{ dbt.type_string() }}), cast(end_date as {{ dbt.type_string() }})) as end_date,\n serving_status,\n status,\n tracking_url_template,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='google_ads') }} order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_history_tmp", "package": null, "version": null}, {"name": "stg_google_ads__campaign_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.google_ads.get_campaign_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.google_ads.stg_google_ads__campaign_history_tmp"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads__campaign_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history_tmp\"\n\n),\n\nfields as (\n\n select\n \n advertising_channel_subtype as advertising_channel_subtype,\n advertising_channel_type as advertising_channel_type,\n customer_id as customer_id,\n end_date as end_date,\n cast(null as timestamp) as end_date_time,\n id as id,\n name as name,\n serving_status as serving_status,\n start_date as start_date,\n cast(null as timestamp) as start_date_time,\n status as status,\n tracking_url_template as tracking_url_template,\n updated_at as updated_at,\n cast(null as boolean) as _fivetran_active\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as campaign_id, \n updated_at,\n name as campaign_name,\n customer_id as account_id,\n advertising_channel_type,\n advertising_channel_subtype,\n coalesce(cast(start_date_time as TEXT), cast(start_date as TEXT)) as start_date,\n coalesce(cast(end_date_time as TEXT), cast(end_date as TEXT)) as end_date,\n serving_status,\n status,\n tracking_url_template,\n row_number() over (partition by id order by updated_at desc) = 1 as is_most_recent_record\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__ad_group_criterion_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_group_criterion_history_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__ad_group_criterion_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__ad_group_criterion_history_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__ad_group_criterion_history_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__ad_group_criterion_history_tmp"], "alias": "stg_google_ads__ad_group_criterion_history_tmp", "checksum": {"name": "sha256", "checksum": "63056b60a1f353599f3b69fb25b49c738abe69144f326b86a2aca382f9450b23"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708217.527522, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_criterion_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_group_criterion_history', \n database_variable='google_ads_database', \n schema_variable='google_ads_schema', \n default_database=target.database,\n default_schema='google_ads',\n default_variable='ad_group_criterion_history',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='ad_group_criterion_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "ad_group_criterion_history"], ["google_ads", "ad_group_criterion_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.ad_group_criterion_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__ad_group_criterion_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_ad_group_criterion_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_ad_group_criterion_history_data\n\n\n select\n \"id\",\n \"ad_group_id\",\n \"base_campaign_id\",\n \"updated_at\",\n \"_fivetran_synced\",\n \"type\",\n \"status\",\n \"keyword_match_type\",\n \"keyword_text\"\n from \"postgres\".\"public\".\"google_ads_ad_group_criterion_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__campaign_budget_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_budget_history_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__campaign_budget_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__campaign_budget_history_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__campaign_budget_history_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__campaign_budget_history_tmp"], "alias": "stg_google_ads__campaign_budget_history_tmp", "checksum": {"name": "sha256", "checksum": "c7cfd70d902eb74511a7d827c7805d9cf0db513d112e5ffbef237ca516a85316"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708217.5382693, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_budget_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True) and var('google_ads__using_campaign_budget_history', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_budget_history',\n database_variable='google_ads_database',\n schema_variable='google_ads_schema',\n default_database=target.database,\n default_schema='google_ads',\n default_variable='campaign_budget_history',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='campaign_budget_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "campaign_budget_history"], ["google_ads", "campaign_budget_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.campaign_budget_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__campaign_budget_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_campaign_budget_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_campaign_budget_history_data\n\n\n select\n \"id\",\n \"updated_at\",\n \"campaign_id\",\n \"amount_micros\",\n \"delivery_method\",\n \"explicitly_shared\",\n \"name\",\n \"reference_count\",\n \"status\",\n \"has_recommended_budget\",\n \"period\",\n \"recommended_budget_amount_micros\",\n \"total_amount_micros\",\n \"type\",\n \"_fivetran_active\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"google_ads_campaign_budget_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__campaign_stats_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_stats_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__campaign_stats_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__campaign_stats_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__campaign_stats_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__campaign_stats_tmp"], "alias": "stg_google_ads__campaign_stats_tmp", "checksum": {"name": "sha256", "checksum": "d7e3d58f6494ca6557e387de5bc5c8a228263fba4b22be44efe56af9de61b598"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708217.5492265, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_stats_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_stats', \n database_variable='google_ads_database', \n schema_variable='google_ads_schema', \n default_database=target.database,\n default_schema='google_ads',\n default_variable='campaign_stats',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='campaign_stats'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "campaign_stats"], ["google_ads", "campaign_stats"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.campaign_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__campaign_stats_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_campaign_stats_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_campaign_stats_data\n\n\n select\n \"_fivetran_id\",\n \"customer_id\",\n \"date\",\n \"_fivetran_synced\",\n \"active_view_impressions\",\n \"active_view_measurability\",\n \"active_view_measurable_cost_micros\",\n \"active_view_measurable_impressions\",\n \"active_view_viewability\",\n \"ad_network_type\",\n \"base_campaign\",\n \"clicks\",\n \"conversions\",\n \"conversions_value\",\n \"cost_micros\",\n \"device\",\n \"id\",\n \"impressions\",\n \"interaction_event_types\",\n \"interactions\",\n \"view_through_conversions\"\n from \"postgres\".\"public\".\"google_ads_campaign_stats_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__campaign_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_history_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__campaign_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__campaign_history_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__campaign_history_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__campaign_history_tmp"], "alias": "stg_google_ads__campaign_history_tmp", "checksum": {"name": "sha256", "checksum": "47624df19aa5630cab425555743638e1172fe93ce28049eccd8f7e2e1c5e9847"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708217.5607598, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_history', \n database_variable='google_ads_database', \n schema_variable='google_ads_schema', \n default_database=target.database,\n default_schema='google_ads',\n default_variable='campaign_history',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='campaign_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "campaign_history"], ["google_ads", "campaign_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.campaign_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__campaign_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_campaign_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_campaign_history_data\n\n\n select\n \"id\",\n \"updated_at\",\n \"name\",\n \"customer_id\",\n \"advertising_channel_type\",\n \"advertising_channel_subtype\",\n \"start_date\",\n \"end_date\",\n \"serving_status\",\n \"status\",\n \"tracking_url_template\"\n from \"postgres\".\"public\".\"google_ads_campaign_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__account_stats_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__account_stats_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__account_stats_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__account_stats_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__account_stats_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__account_stats_tmp"], "alias": "stg_google_ads__account_stats_tmp", "checksum": {"name": "sha256", "checksum": "b3028b7ca5054447ec186489ea8decefa1c57bc863986bdae1d45dbbb28c8a4d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708217.5713637, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_stats_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='account_stats', \n database_variable='google_ads_database', \n schema_variable='google_ads_schema', \n default_database=target.database,\n default_schema='google_ads',\n default_variable='account_stats',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='account_stats'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "account_stats"], ["google_ads", "account_stats"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.account_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__account_stats_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_account_stats_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_account_stats_data\n\n\n select\n \"_fivetran_id\",\n \"customer_id\",\n \"date\",\n \"_fivetran_synced\",\n \"active_view_impressions\",\n \"active_view_measurability\",\n \"active_view_measurable_cost_micros\",\n \"active_view_measurable_impressions\",\n \"active_view_viewability\",\n \"ad_network_type\",\n \"clicks\",\n \"conversions\",\n \"conversions_value\",\n \"cost_micros\",\n \"device\",\n \"impressions\",\n \"interaction_event_types\",\n \"interactions\",\n \"view_through_conversions\"\n from \"postgres\".\"public\".\"google_ads_account_stats_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__campaign_bid_modifier_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_bid_modifier_history_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__campaign_bid_modifier_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__campaign_bid_modifier_history_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__campaign_bid_modifier_history_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__campaign_bid_modifier_history_tmp"], "alias": "stg_google_ads__campaign_bid_modifier_history_tmp", "checksum": {"name": "sha256", "checksum": "2ce1ab7b441c071b47d590608625deadb5c8139b910393cd75e239c5315229e2"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708217.5823967, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_bid_modifier_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True) and var('google_ads__using_campaign_bid_modifier_history', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_bid_modifier_history',\n database_variable='google_ads_database',\n schema_variable='google_ads_schema',\n default_database=target.database,\n default_schema='google_ads',\n default_variable='campaign_bid_modifier_history',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='campaign_bid_modifier_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "campaign_bid_modifier_history"], ["google_ads", "campaign_bid_modifier_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.campaign_bid_modifier_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__campaign_bid_modifier_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_campaign_bid_modifier_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_campaign_bid_modifier_history_data\n\n\n select\n \"campaign_id\",\n \"criterion_id\",\n \"bid_modifier\",\n \"interaction_type\",\n \"interaction_event_types\",\n \"updated_at\",\n \"_fivetran_active\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"google_ads_campaign_bid_modifier_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__search_term_keyword_stats_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__search_term_keyword_stats_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__search_term_keyword_stats_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__search_term_keyword_stats_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__search_term_keyword_stats_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__search_term_keyword_stats_tmp"], "alias": "stg_google_ads__search_term_keyword_stats_tmp", "checksum": {"name": "sha256", "checksum": "52e76034d6e0ae931e81c27b3e81adb9c5f30817cfc7ee9089c0ac88743302e9"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708217.594318, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__search_term_keyword_stats_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True) and var('google_ads__using_search_term_keyword_stats', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='search_term_keyword_stats', \n database_variable='google_ads_database', \n schema_variable='google_ads_schema', \n default_database=target.database,\n default_schema='google_ads',\n default_variable='search_term_keyword_stats',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='search_term_keyword_stats'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "search_term_keyword_stats"], ["google_ads", "search_term_keyword_stats"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.search_term_keyword_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__search_term_keyword_stats_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_search_term_keyword_stats_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_search_term_keyword_stats_data\n\n\n select\n \"_fivetran_id\",\n \"_fivetran_synced\",\n \"ad_group_id\",\n \"campaign_id\",\n \"clicks\",\n \"conversions\",\n \"conversions_value\",\n \"cost_micros\",\n \"customer_id\",\n \"date\",\n \"impressions\",\n \"info_text\",\n \"keyword_ad_group_criterion\",\n \"search_term\",\n \"search_term_match_type\",\n \"status\",\n \"view_through_conversions\"\n from \"postgres\".\"public\".\"google_ads_search_term_keyword_stats_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__ad_group_stats_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_group_stats_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__ad_group_stats_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__ad_group_stats_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__ad_group_stats_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__ad_group_stats_tmp"], "alias": "stg_google_ads__ad_group_stats_tmp", "checksum": {"name": "sha256", "checksum": "fe0f28b5974c01cfb8da8a18f2e4ddcdb4ff6a953caf60a66ce525d3f8b11883"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708217.6054516, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_stats_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_group_stats', \n database_variable='google_ads_database', \n schema_variable='google_ads_schema', \n default_database=target.database,\n default_schema='google_ads',\n default_variable='ad_group_stats',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='ad_group_stats'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "ad_group_stats"], ["google_ads", "ad_group_stats"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.ad_group_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__ad_group_stats_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_ad_group_stats_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_ad_group_stats_data\n\n\n select\n \"_fivetran_id\",\n \"customer_id\",\n \"date\",\n \"_fivetran_synced\",\n \"active_view_impressions\",\n \"active_view_measurability\",\n \"active_view_measurable_cost_micros\",\n \"active_view_measurable_impressions\",\n \"active_view_viewability\",\n \"ad_network_type\",\n \"base_ad_group\",\n \"campaign_base_campaign\",\n \"campaign_id\",\n \"clicks\",\n \"conversions\",\n \"conversions_value\",\n \"cost_micros\",\n \"device\",\n \"id\",\n \"impressions\",\n \"interaction_event_types\",\n \"interactions\",\n \"view_through_conversions\"\n from \"postgres\".\"public\".\"google_ads_ad_group_stats_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__campaign_criterion_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_criterion_history_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__campaign_criterion_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__campaign_criterion_history_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__campaign_criterion_history_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__campaign_criterion_history_tmp"], "alias": "stg_google_ads__campaign_criterion_history_tmp", "checksum": {"name": "sha256", "checksum": "97291f57298d185e15af8d815d53db028ed81b0f6c351b11370d8481a8e2e3ab"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708217.6160471, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_criterion_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True) and var('google_ads__using_campaign_criterion_history', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_criterion_history',\n database_variable='google_ads_database',\n schema_variable='google_ads_schema',\n default_database=target.database,\n default_schema='google_ads',\n default_variable='campaign_criterion_history',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='campaign_criterion_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "campaign_criterion_history"], ["google_ads", "campaign_criterion_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.campaign_criterion_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__campaign_criterion_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_campaign_criterion_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_campaign_criterion_history_data\n\n\n select\n \"id\",\n \"updated_at\",\n \"campaign_id\",\n \"geo_target_constant_id\",\n \"mobile_device_id\",\n \"operating_system_version_id\",\n \"topic_constant_id\",\n \"user_interest_id\",\n \"user_list_id\",\n \"age_range_type\",\n \"bid_modifier\",\n \"carrier_country_code\",\n \"carrier_name\",\n \"content_label_type\",\n \"device_type\",\n \"display_name\",\n \"gender_type\",\n \"income_range_type\",\n \"ip_block_ip_address\",\n \"negative\",\n \"keyword_match_type\",\n \"keyword_text\",\n \"language_code\",\n \"language_name\",\n \"mobile_app_category_constant_id\",\n \"mobile_app_category_constant_name\",\n \"mobile_application_app_id\",\n \"mobile_application_name\",\n \"parental_status_type\",\n \"placement_url\",\n \"status\",\n \"type\",\n \"youtube_channel_id\",\n \"youtube_video_id\",\n \"_fivetran_active\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"google_ads_campaign_criterion_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__keyword_stats_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__keyword_stats_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__keyword_stats_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__keyword_stats_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__keyword_stats_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__keyword_stats_tmp"], "alias": "stg_google_ads__keyword_stats_tmp", "checksum": {"name": "sha256", "checksum": "e5ba405b5ec8ebd3dcd5a4028acb2aae273361c654c7a49a9744d47447c6615e"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708217.6279478, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__keyword_stats_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='keyword_stats', \n database_variable='google_ads_database', \n schema_variable='google_ads_schema', \n default_database=target.database,\n default_schema='google_ads',\n default_variable='keyword_stats',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='keyword_stats'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "keyword_stats"], ["google_ads", "keyword_stats"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.keyword_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__keyword_stats_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_keyword_stats_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_keyword_stats_data\n\n\n select\n \"_fivetran_id\",\n \"customer_id\",\n \"date\",\n \"_fivetran_synced\",\n \"active_view_impressions\",\n \"active_view_measurability\",\n \"active_view_measurable_cost_micros\",\n \"active_view_measurable_impressions\",\n \"active_view_viewability\",\n \"ad_group_base_ad_group\",\n \"ad_group_criterion_criterion_id\",\n \"ad_group_id\",\n \"ad_network_type\",\n \"campaign_base_campaign\",\n \"campaign_id\",\n \"clicks\",\n \"conversions\",\n \"conversions_value\",\n \"cost_micros\",\n \"device\",\n \"impressions\",\n \"interaction_event_types\",\n \"interactions\",\n \"view_through_conversions\"\n from \"postgres\".\"public\".\"google_ads_keyword_stats_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__ad_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_history_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__ad_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__ad_history_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__ad_history_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__ad_history_tmp"], "alias": "stg_google_ads__ad_history_tmp", "checksum": {"name": "sha256", "checksum": "c6a698b67a518ff7efea4f0bcdfe827f6c75d872278cf8c67c14b7c7285f5a51"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708217.6384943, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_history', \n database_variable='google_ads_database', \n schema_variable='google_ads_schema', \n default_database=target.database,\n default_schema='google_ads',\n default_variable='ad_history',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='ad_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "ad_history"], ["google_ads", "ad_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.ad_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__ad_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_ad_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_ad_history_data\n\n\n select\n \"ad_group_id\",\n \"id\",\n \"name\",\n \"updated_at\",\n \"type\",\n \"status\",\n \"display_url\",\n \"final_urls\"\n from \"postgres\".\"public\".\"google_ads_ad_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__campaign_bidding_strategy_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__campaign_bidding_strategy_history_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__campaign_bidding_strategy_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__campaign_bidding_strategy_history_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__campaign_bidding_strategy_history_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__campaign_bidding_strategy_history_tmp"], "alias": "stg_google_ads__campaign_bidding_strategy_history_tmp", "checksum": {"name": "sha256", "checksum": "fe76e3e4e1ee0d794e95ffa83e36914a69fe0a4a99c70a1cbd7a5d9cda35fd41"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708217.6491416, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_bidding_strategy_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True) and var('google_ads__using_campaign_bidding_strategy_history', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_bidding_strategy_history',\n database_variable='google_ads_database',\n schema_variable='google_ads_schema',\n default_database=target.database,\n default_schema='google_ads',\n default_variable='campaign_bidding_strategy_history',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='campaign_bidding_strategy_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "campaign_bidding_strategy_history"], ["google_ads", "campaign_bidding_strategy_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.campaign_bidding_strategy_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__campaign_bidding_strategy_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_campaign_bidding_strategy_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_campaign_bidding_strategy_history_data\n\n\n select\n \"campaign_id\",\n \"updated_at\",\n \"cpc_bid_ceiling_micros\",\n \"cpc_bid_floor_micros\",\n \"enhanced_cpc\",\n \"enhanced_cpc_enabled\",\n \"location\",\n \"location_fraction_micros\",\n \"manual_cpa\",\n \"manual_cpm\",\n \"manual_cpv\",\n \"name\",\n \"status\",\n \"target_cpa_micros\",\n \"target_cpm\",\n \"target_roas\",\n \"type\",\n \"_fivetran_active\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"google_ads_campaign_bidding_strategy_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__account_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__account_history_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__account_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__account_history_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__account_history_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__account_history_tmp"], "alias": "stg_google_ads__account_history_tmp", "checksum": {"name": "sha256", "checksum": "04d151667ede29b416ae5f2d20043fd8fae2ee611661c0cfa3f42cd27ac883f8"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708217.6599617, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='account_history', \n database_variable='google_ads_database', \n schema_variable='google_ads_schema', \n default_database=target.database,\n default_schema='google_ads',\n default_variable='account_history',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='account_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "account_history"], ["google_ads", "account_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.account_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__account_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_account_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_account_history_data\n\n\n select\n \"id\",\n \"updated_at\",\n \"_fivetran_synced\",\n \"auto_tagging_enabled\",\n \"currency_code\",\n \"descriptive_name\",\n \"final_url_suffix\",\n \"hidden\",\n \"manager\",\n \"manager_customer_id\",\n \"optimization_score\",\n \"pay_per_conversion_eligibility_failure_reasons\",\n \"test_account\",\n \"time_zone\",\n \"tracking_url_template\"\n from \"postgres\".\"public\".\"google_ads_account_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__ad_group_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_group_history_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__ad_group_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__ad_group_history_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__ad_group_history_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__ad_group_history_tmp"], "alias": "stg_google_ads__ad_group_history_tmp", "checksum": {"name": "sha256", "checksum": "521ca990eda54e5f856c7ffb59ddec3daedf2204e01af29d893948af2518cc17"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708217.6716547, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_group_history', \n database_variable='google_ads_database', \n schema_variable='google_ads_schema', \n default_database=target.database,\n default_schema='google_ads',\n default_variable='ad_group_history',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='ad_group_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "ad_group_history"], ["google_ads", "ad_group_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.ad_group_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__ad_group_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_ad_group_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_ad_group_history_data\n\n\n select\n \"id\",\n \"updated_at\",\n \"type\",\n \"campaign_id\",\n \"campaign_name\",\n \"name\",\n \"status\"\n from \"postgres\".\"public\".\"google_ads_ad_group_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.stg_google_ads__ad_stats_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_google_ads__ad_stats_tmp", "resource_type": "model", "package_name": "google_ads", "path": "staging/tmp/stg_google_ads__ad_stats_tmp.sql", "original_file_path": "models/staging/tmp/stg_google_ads__ad_stats_tmp.sql", "unique_id": "model.google_ads.stg_google_ads__ad_stats_tmp", "fqn": ["google_ads", "staging", "tmp", "stg_google_ads__ad_stats_tmp"], "alias": "stg_google_ads__ad_stats_tmp", "checksum": {"name": "sha256", "checksum": "3e363172d0cc23605d9e5ca18846ce090141162f7e1981fffc24ce16ca09795b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708217.682326, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_stats_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\n{% if var('google_ads_union_schemas', []) | length > 0 or var('google_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_stats', \n database_variable='google_ads_database', \n schema_variable='google_ads_schema', \n default_database=target.database,\n default_schema='google_ads',\n default_variable='ad_stats',\n union_schema_variable='google_ads_union_schemas',\n union_database_variable='google_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='google_ads_sources',\n single_source_name='google_ads',\n single_table_name='ad_stats'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["google_ads", "ad_stats"], ["google_ads", "ad_stats"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.google_ads.google_ads.ad_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/tmp/stg_google_ads__ad_stats_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: google_ads_ad_stats_identifier\n -- database: postgres \n -- schema: public\n -- identifier: google_ads_ad_stats_data\n\n\n select\n \"customer_id\",\n \"date\",\n \"ad_group_id\",\n \"ad_group\",\n \"keyword_ad_group_criterion\",\n \"ad_network_type\",\n \"device\",\n \"ad_id\",\n \"campaign_id\",\n \"clicks\",\n \"cost_micros\",\n \"impressions\",\n \"conversions\",\n \"conversions_value\",\n \"view_through_conversions\"\n from \"postgres\".\"public\".\"google_ads_ad_stats_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.google_ads.int_google_ads__campaigns_accounts": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "int_google_ads__campaigns_accounts", "resource_type": "model", "package_name": "google_ads", "path": "intermediate/int_google_ads__campaigns_accounts.sql", "original_file_path": "models/intermediate/int_google_ads__campaigns_accounts.sql", "unique_id": "model.google_ads.int_google_ads__campaigns_accounts", "fqn": ["google_ads", "intermediate", "int_google_ads__campaigns_accounts"], "alias": "int_google_ads__campaigns_accounts", "checksum": {"name": "sha256", "checksum": "99411ca7507d33287a03e18ea8db1a54eef1f318aa8734903e65a243f57d900d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "ephemeral", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708217.6927729, "relation_name": null, "raw_code": "{{ config(enabled=var('ad_reporting__google_ads_enabled', True)) }}\n\nwith campaigns as (\n select *\n from {{ ref('stg_google_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from {{ ref('stg_google_ads__account_history') }}\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_history", "package": null, "version": null}, {"name": "stg_google_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": ["model.google_ads.stg_google_ads__campaign_history", "model.google_ads.stg_google_ads__account_history"]}, "compiled_path": "target/compiled/google_ads/models/intermediate/int_google_ads__campaigns_accounts.sql", "compiled": true, "compiled_code": "\n\nwith campaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\n where is_most_recent_record = True\n),\n\nfinal as (\n select\n -- Campaign dimensional data\n campaigns.source_relation,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.status as campaign_status,\n campaigns.serving_status,\n campaigns.advertising_channel_type,\n campaigns.advertising_channel_subtype,\n\n -- Account dimensional data\n accounts.account_id,\n accounts.account_name,\n accounts.currency_code,\n accounts.time_zone,\n accounts.auto_tagging_enabled\n\n from campaigns\n left join accounts\n on campaigns.account_id = accounts.account_id\n and campaigns.source_relation = accounts.source_relation\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.amazon_ads__search_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "amazon_ads__search_report", "resource_type": "model", "package_name": "amazon_ads", "path": "amazon_ads__search_report.sql", "original_file_path": "models/amazon_ads__search_report.sql", "unique_id": "model.amazon_ads.amazon_ads__search_report", "fqn": ["amazon_ads", "amazon_ads__search_report"], "alias": "amazon_ads__search_report", "checksum": {"name": "sha256", "checksum": "b4171d0945ea0be2cc5c50811fdaaa66f86e47e679d6e7ae6a0cf493535cf572"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance at the search term level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "account_id": {"name": "account_id", "description": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_id"]}, "account_name": {"name": "account_name", "description": "Account Name. Not currently populated for sellers.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_name"]}, "country_code": {"name": "country_code", "description": "The code for a given country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.country_code"]}, "keyword_id": {"name": "keyword_id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_id"]}, "keyword_text": {"name": "keyword_text", "description": "The exact text for the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_text"]}, "match_type": {"name": "match_type", "description": "Type of matching for the keyword used in bid. One of: BROAD, PHRASE, or EXACT.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.match_type"]}, "portfolio_id": {"name": "portfolio_id", "description": "The ID of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_id"]}, "portfolio_name": {"name": "portfolio_name", "description": "The name of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_name"]}, "profile_id": {"name": "profile_id", "description": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.profile_id"]}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "search_term": {"name": "search_term", "description": "The search term used by the customer.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.search_term"]}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}, "targeting": {"name": "targeting", "description": "A string representation of the expression object used in the targeting clause.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.targeting"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.086767, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__search_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith report as (\n select *\n from {{ ref('stg_amazon_ads__search_term_ad_keyword_report') }}\n), \n\naccount_info as (\n select *\n from {{ ref('stg_amazon_ads__profile') }}\n where _fivetran_deleted = False\n),\n\nportfolios as (\n select *\n from {{ ref('int_amazon_ads__portfolio_history') }}\n), \n\ncampaigns as (\n select *\n from {{ ref('stg_amazon_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\nad_groups as (\n select *\n from {{ ref('stg_amazon_ads__ad_group_history') }}\n where is_most_recent_record = True\n), \n\nkeywords as (\n select *\n from {{ ref('stg_amazon_ads__keyword_history') }}\n where is_most_recent_record = True\n), \n\nfields as (\n select\n report.source_relation,\n report.date_day,\n account_info.account_name,\n account_info.account_id,\n account_info.country_code,\n account_info.profile_id,\n portfolios.portfolio_name,\n portfolios.portfolio_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n report.keyword_id,\n keywords.keyword_text,\n keywords.match_type,\n keywords.serving_status,\n keywords.state,\n report.search_term,\n report.targeting,\n sum(report.cost) as cost,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.purchases_30_d) as purchases_30_d,\n sum(report.sales_30_d) as sales_30_d\n\n {{ amazon_ads_persist_pass_through_columns(pass_through_variable='amazon_ads__search_term_ad_keyword_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0, exclude_fields=['purchases_30_d','sales_30_d']) }} \n\n from report\n\n left join keywords\n on keywords.keyword_id = report.keyword_id\n and keywords.source_relation = report.source_relation\n left join ad_groups\n on ad_groups.ad_group_id = report.ad_group_id\n and ad_groups.source_relation = report.source_relation\n left join campaigns\n on campaigns.campaign_id = report.campaign_id\n and campaigns.source_relation = report.source_relation\n left join portfolios\n on portfolios.portfolio_id = campaigns.portfolio_id\n and portfolios.source_relation = campaigns.source_relation\n left join account_info\n on account_info.profile_id = campaigns.profile_id\n and account_info.source_relation = campaigns.source_relation\n\n {{ dbt_utils.group_by(19) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__search_term_ad_keyword_report", "package": null, "version": null}, {"name": "stg_amazon_ads__profile", "package": null, "version": null}, {"name": "int_amazon_ads__portfolio_history", "package": null, "version": null}, {"name": "stg_amazon_ads__campaign_history", "package": null, "version": null}, {"name": "stg_amazon_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_amazon_ads__keyword_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.amazon_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report", "model.amazon_ads.stg_amazon_ads__profile", "model.amazon_ads.int_amazon_ads__portfolio_history", "model.amazon_ads.stg_amazon_ads__campaign_history", "model.amazon_ads.stg_amazon_ads__ad_group_history", "model.amazon_ads.stg_amazon_ads__keyword_history"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads__search_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__search_term_ad_keyword_report\"\n), \n\naccount_info as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__profile\"\n where _fivetran_deleted = False\n),\n\nportfolios as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"int_amazon_ads__portfolio_history\"\n), \n\ncampaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\nad_groups as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\nkeywords as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__keyword_history\"\n where is_most_recent_record = True\n), \n\nfields as (\n select\n report.source_relation,\n report.date_day,\n account_info.account_name,\n account_info.account_id,\n account_info.country_code,\n account_info.profile_id,\n portfolios.portfolio_name,\n portfolios.portfolio_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n report.keyword_id,\n keywords.keyword_text,\n keywords.match_type,\n keywords.serving_status,\n keywords.state,\n report.search_term,\n report.targeting,\n sum(report.cost) as cost,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.purchases_30_d) as purchases_30_d,\n sum(report.sales_30_d) as sales_30_d\n\n \n\n\n\n \n\n from report\n\n left join keywords\n on keywords.keyword_id = report.keyword_id\n and keywords.source_relation = report.source_relation\n left join ad_groups\n on ad_groups.ad_group_id = report.ad_group_id\n and ad_groups.source_relation = report.source_relation\n left join campaigns\n on campaigns.campaign_id = report.campaign_id\n and campaigns.source_relation = report.source_relation\n left join portfolios\n on portfolios.portfolio_id = campaigns.portfolio_id\n and portfolios.source_relation = campaigns.source_relation\n left join account_info\n on account_info.profile_id = campaigns.profile_id\n and account_info.source_relation = campaigns.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.amazon_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "amazon_ads__campaign_report", "resource_type": "model", "package_name": "amazon_ads", "path": "amazon_ads__campaign_report.sql", "original_file_path": "models/amazon_ads__campaign_report.sql", "unique_id": "model.amazon_ads.amazon_ads__campaign_report", "fqn": ["amazon_ads", "amazon_ads__campaign_report"], "alias": "amazon_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "8cefb303901e71edf27b9931b7ad848e32d449dc97aebb7680f5f188a00028c1"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance at the campaign level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "account_id": {"name": "account_id", "description": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_id"]}, "account_name": {"name": "account_name", "description": "Account Name. Not currently populated for sellers.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_name"]}, "campaign_bidding_strategy": {"name": "campaign_bidding_strategy", "description": "The bidding strategy associated with a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_bidding_strategy"]}, "campaign_budget_amount": {"name": "campaign_budget_amount", "description": "Total budget allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_amount"]}, "campaign_budget_currency_code": {"name": "campaign_budget_currency_code", "description": "The currency code associated with the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_currency_code"]}, "campaign_budget_type": {"name": "campaign_budget_type", "description": "One of: daily or lifetime.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_type"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_name"]}, "country_code": {"name": "country_code", "description": "The code for a given country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.country_code"]}, "portfolio_id": {"name": "portfolio_id", "description": "The ID of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_id"]}, "portfolio_name": {"name": "portfolio_name", "description": "The name of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_name"]}, "profile_id": {"name": "profile_id", "description": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.profile_id"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.0789013, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith report as (\n select *\n from {{ ref('stg_amazon_ads__campaign_level_report') }}\n), \n\naccount_info as (\n select *\n from {{ ref('stg_amazon_ads__profile') }}\n where _fivetran_deleted = False\n),\n\nportfolios as (\n select *\n from {{ ref('int_amazon_ads__portfolio_history') }}\n), \n\ncampaigns as (\n select *\n from {{ ref('stg_amazon_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\nfields as (\n select\n report.source_relation,\n report.date_day,\n account_info.account_name,\n account_info.account_id,\n account_info.country_code,\n account_info.profile_id,\n portfolios.portfolio_name,\n portfolios.portfolio_id,\n campaigns.campaign_name,\n report.campaign_id,\n report.campaign_bidding_strategy,\n report.campaign_budget_amount,\n report.campaign_budget_currency_code,\n report.campaign_budget_type,\n sum(report.cost) as cost,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.purchases_30_d) as purchases_30_d,\n sum(report.sales_30_d) as sales_30_d\n\n {{ amazon_ads_persist_pass_through_columns(pass_through_variable='amazon_ads__campaign_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0, exclude_fields=['purchases_30_d','sales_30_d']) }} \n\n from report\n\n left join campaigns\n on campaigns.campaign_id = report.campaign_id\n and campaigns.source_relation = report.source_relation\n left join portfolios\n on portfolios.portfolio_id = campaigns.portfolio_id\n and portfolios.source_relation = campaigns.source_relation \n left join account_info\n on account_info.profile_id = campaigns.profile_id\n and account_info.source_relation = campaigns.source_relation \n\n {{ dbt_utils.group_by(14) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__campaign_level_report", "package": null, "version": null}, {"name": "stg_amazon_ads__profile", "package": null, "version": null}, {"name": "int_amazon_ads__portfolio_history", "package": null, "version": null}, {"name": "stg_amazon_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.amazon_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.amazon_ads.stg_amazon_ads__campaign_level_report", "model.amazon_ads.stg_amazon_ads__profile", "model.amazon_ads.int_amazon_ads__portfolio_history", "model.amazon_ads.stg_amazon_ads__campaign_history"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_level_report\"\n), \n\naccount_info as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__profile\"\n where _fivetran_deleted = False\n),\n\nportfolios as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"int_amazon_ads__portfolio_history\"\n), \n\ncampaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\nfields as (\n select\n report.source_relation,\n report.date_day,\n account_info.account_name,\n account_info.account_id,\n account_info.country_code,\n account_info.profile_id,\n portfolios.portfolio_name,\n portfolios.portfolio_id,\n campaigns.campaign_name,\n report.campaign_id,\n report.campaign_bidding_strategy,\n report.campaign_budget_amount,\n report.campaign_budget_currency_code,\n report.campaign_budget_type,\n sum(report.cost) as cost,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.purchases_30_d) as purchases_30_d,\n sum(report.sales_30_d) as sales_30_d\n\n \n\n\n\n \n\n from report\n\n left join campaigns\n on campaigns.campaign_id = report.campaign_id\n and campaigns.source_relation = report.source_relation\n left join portfolios\n on portfolios.portfolio_id = campaigns.portfolio_id\n and portfolios.source_relation = campaigns.source_relation \n left join account_info\n on account_info.profile_id = campaigns.profile_id\n and account_info.source_relation = campaigns.source_relation \n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.amazon_ads__account_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "amazon_ads__account_report", "resource_type": "model", "package_name": "amazon_ads", "path": "amazon_ads__account_report.sql", "original_file_path": "models/amazon_ads__account_report.sql", "unique_id": "model.amazon_ads.amazon_ads__account_report", "fqn": ["amazon_ads", "amazon_ads__account_report"], "alias": "amazon_ads__account_report", "checksum": {"name": "sha256", "checksum": "16944b494db996760584a557ee19f44fe4e36519eff8d47eb094534675110baa"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance at the account level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "profile_id": {"name": "profile_id", "description": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.profile_id"]}, "account_id": {"name": "account_id", "description": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_id"]}, "account_name": {"name": "account_name", "description": "Account Name. Not currently populated for sellers.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_name"]}, "country_code": {"name": "country_code", "description": "The code for a given country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.country_code"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.0709612, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__account_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith report as (\n select *\n --use campaign report since account report not provided\n from {{ ref('stg_amazon_ads__campaign_level_report') }}\n), \n\naccount_info as (\n select *\n from {{ ref('stg_amazon_ads__profile') }}\n where _fivetran_deleted = False\n),\n\ncampaigns as (\n select *\n from {{ ref('stg_amazon_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\nfields as (\n select\n report.source_relation,\n report.date_day,\n account_info.account_name,\n account_info.account_id,\n account_info.country_code,\n account_info.profile_id,\n sum(report.cost) as cost,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.purchases_30_d) as purchases_30_d,\n sum(report.sales_30_d) as sales_30_d\n\n {{ amazon_ads_persist_pass_through_columns(pass_through_variable='amazon_ads__campaign_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0, exclude_fields=['purchases_30_d','sales_30_d']) }}\n\n from report\n\n left join campaigns\n on campaigns.campaign_id = report.campaign_id\n and campaigns.source_relation = report.source_relation\n left join account_info\n on account_info.profile_id = campaigns.profile_id\n and account_info.source_relation = campaigns.source_relation\n \n\n {{ dbt_utils.group_by(6) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__campaign_level_report", "package": null, "version": null}, {"name": "stg_amazon_ads__profile", "package": null, "version": null}, {"name": "stg_amazon_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.amazon_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.amazon_ads.stg_amazon_ads__campaign_level_report", "model.amazon_ads.stg_amazon_ads__profile", "model.amazon_ads.stg_amazon_ads__campaign_history"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads__account_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n select *\n --use campaign report since account report not provided\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_level_report\"\n), \n\naccount_info as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__profile\"\n where _fivetran_deleted = False\n),\n\ncampaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\nfields as (\n select\n report.source_relation,\n report.date_day,\n account_info.account_name,\n account_info.account_id,\n account_info.country_code,\n account_info.profile_id,\n sum(report.cost) as cost,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.purchases_30_d) as purchases_30_d,\n sum(report.sales_30_d) as sales_30_d\n\n \n\n\n\n\n\n from report\n\n left join campaigns\n on campaigns.campaign_id = report.campaign_id\n and campaigns.source_relation = report.source_relation\n left join account_info\n on account_info.profile_id = campaigns.profile_id\n and account_info.source_relation = campaigns.source_relation\n \n\n group by 1,2,3,4,5,6\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.amazon_ads__portfolio_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "amazon_ads__portfolio_report", "resource_type": "model", "package_name": "amazon_ads", "path": "amazon_ads__portfolio_report.sql", "original_file_path": "models/amazon_ads__portfolio_report.sql", "unique_id": "model.amazon_ads.amazon_ads__portfolio_report", "fqn": ["amazon_ads", "amazon_ads__portfolio_report"], "alias": "amazon_ads__portfolio_report", "checksum": {"name": "sha256", "checksum": "b8c9f790249199a351760b8cf17cc8c9da33684a1b3b62f08e94c2145a6a8dcb"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance at the portfolio level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "account_id": {"name": "account_id", "description": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_id"]}, "account_name": {"name": "account_name", "description": "Account Name. Not currently populated for sellers.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_name"]}, "budget_amount": {"name": "budget_amount", "description": "The budget amount associated with the portfolio. Cannot be null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_currency_code": {"name": "budget_currency_code", "description": "The currency used for all monetary values for entities under this profile. Cannot be null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_end_date": {"name": "budget_end_date", "description": "The end date after which the budget is no longer applied. Optional if policy is set to dateRange or monthlyRecurring.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_start_date": {"name": "budget_start_date", "description": "The starting date in YYYYMMDD format to which the budget is applied. Required if policy is set to dateRange. Not specified if policy is set to monthlyRecurring. Note that the starting date for monthlyRecurring is the date when the policy is set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_policy": {"name": "budget_policy", "description": "The budget policy. Set to dateRange to specify a budget for a specific period of time. Set to monthlyRecurring to specify a budget that is automatically renewed at the beginning of each month. Cannot be null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country_code": {"name": "country_code", "description": "The code for a given country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.country_code"]}, "in_budget": {"name": "in_budget", "description": "Indicates the current budget status of the portfolio. Set to true if the portfolio is in budget, set to false if the portfolio is out of budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "portfolio_id": {"name": "portfolio_id", "description": "The ID of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_id"]}, "portfolio_name": {"name": "portfolio_name", "description": "The name of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_name"]}, "profile_id": {"name": "profile_id", "description": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.profile_id"]}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.0824704, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__portfolio_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__amazon_ads_enabled','amazon_ads__portfolio_history_enabled'])) }}\n\nwith report as (\n select *\n --use campaign report since portfolio report not provided\n from {{ ref('stg_amazon_ads__campaign_level_report') }}\n), \n\naccount_info as (\n select *\n from {{ ref('stg_amazon_ads__profile') }}\n where _fivetran_deleted = False\n),\n\nportfolios as (\n select *\n from {{ ref('stg_amazon_ads__portfolio_history') }}\n where is_most_recent_record = True\n), \n\ncampaigns as (\n select *\n from {{ ref('stg_amazon_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\nfields as (\n select\n report.source_relation,\n report.date_day,\n account_info.account_name,\n account_info.account_id,\n account_info.country_code,\n account_info.profile_id,\n portfolios.portfolio_name,\n portfolios.portfolio_id,\n portfolios.budget_amount,\n portfolios.budget_currency_code,\n portfolios.budget_start_date,\n portfolios.budget_end_date,\n portfolios.budget_policy,\n portfolios.in_budget,\n portfolios.serving_status,\n portfolios.state,\n sum(report.cost) as cost,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.purchases_30_d) as purchases_30_d,\n sum(report.sales_30_d) as sales_30_d\n\n {{ amazon_ads_persist_pass_through_columns(pass_through_variable='amazon_ads__campaign_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0, exclude_fields=['purchases_30_d','sales_30_d']) }} \n\n from portfolios\n\n left join campaigns\n on campaigns.portfolio_id = portfolios.portfolio_id\n and campaigns.source_relation = portfolios.source_relation\n left join account_info\n on account_info.profile_id = campaigns.profile_id\n and account_info.source_relation = campaigns.source_relation\n left join report\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n\n {{ dbt_utils.group_by(16) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__campaign_level_report", "package": null, "version": null}, {"name": "stg_amazon_ads__profile", "package": null, "version": null}, {"name": "stg_amazon_ads__portfolio_history", "package": null, "version": null}, {"name": "stg_amazon_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.amazon_ads.amazon_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.amazon_ads.stg_amazon_ads__campaign_level_report", "model.amazon_ads.stg_amazon_ads__profile", "model.amazon_ads.stg_amazon_ads__portfolio_history", "model.amazon_ads.stg_amazon_ads__campaign_history"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads__portfolio_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n select *\n --use campaign report since portfolio report not provided\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_level_report\"\n), \n\naccount_info as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__profile\"\n where _fivetran_deleted = False\n),\n\nportfolios as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__portfolio_history\"\n where is_most_recent_record = True\n), \n\ncampaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\nfields as (\n select\n report.source_relation,\n report.date_day,\n account_info.account_name,\n account_info.account_id,\n account_info.country_code,\n account_info.profile_id,\n portfolios.portfolio_name,\n portfolios.portfolio_id,\n portfolios.budget_amount,\n portfolios.budget_currency_code,\n portfolios.budget_start_date,\n portfolios.budget_end_date,\n portfolios.budget_policy,\n portfolios.in_budget,\n portfolios.serving_status,\n portfolios.state,\n sum(report.cost) as cost,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.purchases_30_d) as purchases_30_d,\n sum(report.sales_30_d) as sales_30_d\n\n \n\n\n\n \n\n from portfolios\n\n left join campaigns\n on campaigns.portfolio_id = portfolios.portfolio_id\n and campaigns.source_relation = portfolios.source_relation\n left join account_info\n on account_info.profile_id = campaigns.profile_id\n and account_info.source_relation = campaigns.source_relation\n left join report\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.amazon_ads__keyword_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "amazon_ads__keyword_report", "resource_type": "model", "package_name": "amazon_ads", "path": "amazon_ads__keyword_report.sql", "original_file_path": "models/amazon_ads__keyword_report.sql", "unique_id": "model.amazon_ads.amazon_ads__keyword_report", "fqn": ["amazon_ads", "amazon_ads__keyword_report"], "alias": "amazon_ads__keyword_report", "checksum": {"name": "sha256", "checksum": "53370ecd41c5a7917f7f5af699bcdf8725207b0ffd65ba90cbc8e2a823b1592b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance at the keyword level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "account_id": {"name": "account_id", "description": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_id"]}, "account_name": {"name": "account_name", "description": "Account Name. Not currently populated for sellers.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_name"]}, "country_code": {"name": "country_code", "description": "The code for a given country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.country_code"]}, "keyword_bid": {"name": "keyword_bid", "description": "Bid associated with a keyword or targeting expression.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_bid"]}, "keyword_id": {"name": "keyword_id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_id"]}, "keyword_text": {"name": "keyword_text", "description": "The exact text for the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_text"]}, "keyword_type": {"name": "keyword_type", "description": "Type of matching for the keyword used in bid. One of: BROAD, PHRASE, or EXACT.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_type"]}, "match_type": {"name": "match_type", "description": "Type of matching for the keyword used in bid. One of: BROAD, PHRASE, or EXACT.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.match_type"]}, "portfolio_id": {"name": "portfolio_id", "description": "The ID of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_id"]}, "portfolio_name": {"name": "portfolio_name", "description": "The name of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_name"]}, "profile_id": {"name": "profile_id", "description": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.profile_id"]}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.0848048, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__keyword_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith report as (\n select *\n from {{ ref('stg_amazon_ads__targeting_keyword_report') }}\n), \n\naccount_info as (\n select *\n from {{ ref('stg_amazon_ads__profile') }}\n where _fivetran_deleted = False\n),\n\nportfolios as (\n select *\n from {{ ref('int_amazon_ads__portfolio_history') }}\n), \n\ncampaigns as (\n select *\n from {{ ref('stg_amazon_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\nad_groups as (\n select *\n from {{ ref('stg_amazon_ads__ad_group_history') }}\n where is_most_recent_record = True\n), \n\nkeywords as (\n select *\n from {{ ref('stg_amazon_ads__keyword_history') }}\n where is_most_recent_record = True\n), \n\nfields as (\n select\n report.source_relation,\n report.date_day,\n account_info.account_name,\n account_info.account_id,\n account_info.country_code,\n account_info.profile_id,\n portfolios.portfolio_name,\n portfolios.portfolio_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n report.keyword_id,\n keywords.keyword_text,\n keywords.serving_status,\n keywords.state,\n report.keyword_bid,\n report.keyword_type,\n report.match_type,\n sum(report.cost) as cost,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.purchases_30_d) as purchases_30_d,\n sum(report.sales_30_d) as sales_30_d\n\n {{ amazon_ads_persist_pass_through_columns(pass_through_variable='amazon_ads__targeting_keyword_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0, exclude_fields=['purchases_30_d','sales_30_d']) }}\n\n from report\n\n left join keywords\n on keywords.keyword_id = report.keyword_id\n and keywords.source_relation = report.source_relation\n left join ad_groups\n on ad_groups.ad_group_id = report.ad_group_id\n and ad_groups.source_relation = report.source_relation\n left join campaigns\n on campaigns.campaign_id = report.campaign_id\n and campaigns.source_relation = report.source_relation\n left join portfolios\n on portfolios.portfolio_id = campaigns.portfolio_id\n and portfolios.source_relation = campaigns.source_relation\n left join account_info\n on account_info.profile_id = campaigns.profile_id\n and account_info.source_relation = campaigns.source_relation\n\n {{ dbt_utils.group_by(19) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__targeting_keyword_report", "package": null, "version": null}, {"name": "stg_amazon_ads__profile", "package": null, "version": null}, {"name": "int_amazon_ads__portfolio_history", "package": null, "version": null}, {"name": "stg_amazon_ads__campaign_history", "package": null, "version": null}, {"name": "stg_amazon_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_amazon_ads__keyword_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.amazon_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.amazon_ads.stg_amazon_ads__targeting_keyword_report", "model.amazon_ads.stg_amazon_ads__profile", "model.amazon_ads.int_amazon_ads__portfolio_history", "model.amazon_ads.stg_amazon_ads__campaign_history", "model.amazon_ads.stg_amazon_ads__ad_group_history", "model.amazon_ads.stg_amazon_ads__keyword_history"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads__keyword_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__targeting_keyword_report\"\n), \n\naccount_info as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__profile\"\n where _fivetran_deleted = False\n),\n\nportfolios as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"int_amazon_ads__portfolio_history\"\n), \n\ncampaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\nad_groups as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\nkeywords as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__keyword_history\"\n where is_most_recent_record = True\n), \n\nfields as (\n select\n report.source_relation,\n report.date_day,\n account_info.account_name,\n account_info.account_id,\n account_info.country_code,\n account_info.profile_id,\n portfolios.portfolio_name,\n portfolios.portfolio_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n report.keyword_id,\n keywords.keyword_text,\n keywords.serving_status,\n keywords.state,\n report.keyword_bid,\n report.keyword_type,\n report.match_type,\n sum(report.cost) as cost,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.purchases_30_d) as purchases_30_d,\n sum(report.sales_30_d) as sales_30_d\n\n \n\n\n\n\n\n from report\n\n left join keywords\n on keywords.keyword_id = report.keyword_id\n and keywords.source_relation = report.source_relation\n left join ad_groups\n on ad_groups.ad_group_id = report.ad_group_id\n and ad_groups.source_relation = report.source_relation\n left join campaigns\n on campaigns.campaign_id = report.campaign_id\n and campaigns.source_relation = report.source_relation\n left join portfolios\n on portfolios.portfolio_id = campaigns.portfolio_id\n and portfolios.source_relation = campaigns.source_relation\n left join account_info\n on account_info.profile_id = campaigns.profile_id\n and account_info.source_relation = campaigns.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.amazon_ads__ad_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "amazon_ads__ad_report", "resource_type": "model", "package_name": "amazon_ads", "path": "amazon_ads__ad_report.sql", "original_file_path": "models/amazon_ads__ad_report.sql", "unique_id": "model.amazon_ads.amazon_ads__ad_report", "fqn": ["amazon_ads", "amazon_ads__ad_report"], "alias": "amazon_ads__ad_report", "checksum": {"name": "sha256", "checksum": "5cf0c8bdc9ab5aa8e9a2dace8324fe415dcb7aba8a5773fc2e31b89f193e8140"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance at the ad level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "account_id": {"name": "account_id", "description": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_id"]}, "account_name": {"name": "account_name", "description": "Account Name. Not currently populated for sellers.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_name"]}, "ad_id": {"name": "ad_id", "description": "The ID of the Ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_name"]}, "country_code": {"name": "country_code", "description": "The code for a given country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.country_code"]}, "portfolio_id": {"name": "portfolio_id", "description": "The ID of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_id"]}, "portfolio_name": {"name": "portfolio_name", "description": "The name of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_name"]}, "profile_id": {"name": "profile_id", "description": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.profile_id"]}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}, "advertised_asin": {"name": "advertised_asin", "description": "The ASIN associated to an advertised product.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.advertised_asin"]}, "advertised_sku": {"name": "advertised_sku", "description": "The SKU being advertised.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.advertised_sku"]}, "campaign_budget_amount": {"name": "campaign_budget_amount", "description": "Total budget allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_amount"]}, "campaign_budget_currency_code": {"name": "campaign_budget_currency_code", "description": "The currency code associated with the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_currency_code"]}, "campaign_budget_type": {"name": "campaign_budget_type", "description": "One of: daily or lifetime.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_type"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.077432, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__ad_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith report as (\n select *\n from {{ ref('stg_amazon_ads__advertised_product_report') }}\n), \n\naccount_info as (\n select *\n from {{ ref('stg_amazon_ads__profile') }}\n where _fivetran_deleted = False\n),\n\nportfolios as (\n select *\n from {{ ref('int_amazon_ads__portfolio_history') }}\n), \n\ncampaigns as (\n select *\n from {{ ref('stg_amazon_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\nad_groups as (\n select *\n from {{ ref('stg_amazon_ads__ad_group_history') }}\n where is_most_recent_record = True\n), \n\nads as (\n select *\n from {{ ref('stg_amazon_ads__product_ad_history') }}\n where is_most_recent_record = True\n),\n\nfields as (\n select\n report.source_relation,\n report.date_day,\n account_info.account_name,\n account_info.account_id,\n account_info.country_code,\n account_info.profile_id,\n portfolios.portfolio_name,\n portfolios.portfolio_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n report.ad_id,\n ads.serving_status,\n ads.state,\n report.advertised_asin,\n report.advertised_sku,\n report.campaign_budget_amount,\n report.campaign_budget_currency_code,\n report.campaign_budget_type,\n sum(report.cost) as cost,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.purchases_30_d) as purchases_30_d,\n sum(report.sales_30_d) as sales_30_d\n\n {{ amazon_ads_persist_pass_through_columns(pass_through_variable='amazon_ads__advertised_product_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0, exclude_fields=['purchases_30_d','sales_30_d']) }}\n\n from report\n \n left join ads\n on ads.ad_id = report.ad_id\n and ads.source_relation = report.source_relation\n left join ad_groups\n on ad_groups.ad_group_id = report.ad_group_id\n and ad_groups.source_relation = report.source_relation\n left join campaigns\n on campaigns.campaign_id = report.campaign_id\n and campaigns.source_relation = report.source_relation\n left join portfolios\n on portfolios.portfolio_id = campaigns.portfolio_id\n and portfolios.source_relation = campaigns.source_relation \n left join account_info\n on account_info.profile_id = campaigns.profile_id\n and account_info.source_relation = campaigns.source_relation \n\n {{ dbt_utils.group_by(20) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__advertised_product_report", "package": null, "version": null}, {"name": "stg_amazon_ads__profile", "package": null, "version": null}, {"name": "int_amazon_ads__portfolio_history", "package": null, "version": null}, {"name": "stg_amazon_ads__campaign_history", "package": null, "version": null}, {"name": "stg_amazon_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_amazon_ads__product_ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.amazon_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.amazon_ads.stg_amazon_ads__advertised_product_report", "model.amazon_ads.stg_amazon_ads__profile", "model.amazon_ads.int_amazon_ads__portfolio_history", "model.amazon_ads.stg_amazon_ads__campaign_history", "model.amazon_ads.stg_amazon_ads__ad_group_history", "model.amazon_ads.stg_amazon_ads__product_ad_history"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads__ad_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__advertised_product_report\"\n), \n\naccount_info as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__profile\"\n where _fivetran_deleted = False\n),\n\nportfolios as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"int_amazon_ads__portfolio_history\"\n), \n\ncampaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\nad_groups as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\nads as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__product_ad_history\"\n where is_most_recent_record = True\n),\n\nfields as (\n select\n report.source_relation,\n report.date_day,\n account_info.account_name,\n account_info.account_id,\n account_info.country_code,\n account_info.profile_id,\n portfolios.portfolio_name,\n portfolios.portfolio_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n report.ad_id,\n ads.serving_status,\n ads.state,\n report.advertised_asin,\n report.advertised_sku,\n report.campaign_budget_amount,\n report.campaign_budget_currency_code,\n report.campaign_budget_type,\n sum(report.cost) as cost,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.purchases_30_d) as purchases_30_d,\n sum(report.sales_30_d) as sales_30_d\n\n \n\n\n\n\n\n from report\n \n left join ads\n on ads.ad_id = report.ad_id\n and ads.source_relation = report.source_relation\n left join ad_groups\n on ad_groups.ad_group_id = report.ad_group_id\n and ad_groups.source_relation = report.source_relation\n left join campaigns\n on campaigns.campaign_id = report.campaign_id\n and campaigns.source_relation = report.source_relation\n left join portfolios\n on portfolios.portfolio_id = campaigns.portfolio_id\n and portfolios.source_relation = campaigns.source_relation \n left join account_info\n on account_info.profile_id = campaigns.profile_id\n and account_info.source_relation = campaigns.source_relation \n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.amazon_ads__ad_group_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "amazon_ads__ad_group_report", "resource_type": "model", "package_name": "amazon_ads", "path": "amazon_ads__ad_group_report.sql", "original_file_path": "models/amazon_ads__ad_group_report.sql", "unique_id": "model.amazon_ads.amazon_ads__ad_group_report", "fqn": ["amazon_ads", "amazon_ads__ad_group_report"], "alias": "amazon_ads__ad_group_report", "checksum": {"name": "sha256", "checksum": "649bd5784a32bba8e64559e8c9f3fc603ad7414e801781ffc2115e24aa84ca8a"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance at the ad group level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "account_id": {"name": "account_id", "description": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_id"]}, "account_name": {"name": "account_name", "description": "Account Name. Not currently populated for sellers.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_name"]}, "campaign_bidding_strategy": {"name": "campaign_bidding_strategy", "description": "The bidding strategy associated with a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_bidding_strategy"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_name"]}, "country_code": {"name": "country_code", "description": "The code for a given country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.country_code"]}, "default_bid": {"name": "default_bid", "description": "The date of creation of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.default_bid"]}, "portfolio_id": {"name": "portfolio_id", "description": "The ID of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_id"]}, "portfolio_name": {"name": "portfolio_name", "description": "The name of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_name"]}, "profile_id": {"name": "profile_id", "description": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.profile_id"]}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.0740993, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__ad_group_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith report as (\n select *\n from {{ ref('stg_amazon_ads__ad_group_level_report') }}\n), \n\naccount_info as (\n select *\n from {{ ref('stg_amazon_ads__profile') }}\n where _fivetran_deleted = False\n),\n\nportfolios as (\n select *\n from {{ ref('int_amazon_ads__portfolio_history') }}\n), \n\ncampaigns as (\n select *\n from {{ ref('stg_amazon_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\nad_groups as (\n select *\n from {{ ref('stg_amazon_ads__ad_group_history') }}\n where is_most_recent_record = True\n), \n\nfields as (\n select\n report.source_relation,\n report.date_day,\n account_info.account_name,\n account_info.account_id,\n account_info.country_code,\n account_info.profile_id,\n portfolios.portfolio_name,\n portfolios.portfolio_id,\n campaigns.campaign_name,\n campaigns.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n ad_groups.serving_status,\n ad_groups.state,\n ad_groups.default_bid,\n report.campaign_bidding_strategy,\n sum(report.cost) as cost,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.purchases_30_d) as purchases_30_d,\n sum(report.sales_30_d) as sales_30_d\n\n {{ amazon_ads_persist_pass_through_columns(pass_through_variable='amazon_ads__ad_group_passthrough_metrics', identifier='report', transform='sum', coalesce_with=0, exclude_fields=['purchases_30_d','sales_30_d']) }}\n\n from report\n\n left join ad_groups\n on ad_groups.ad_group_id = report.ad_group_id\n and ad_groups.source_relation = report.source_relation\n left join campaigns\n on campaigns.campaign_id = ad_groups.campaign_id\n and campaigns.source_relation = ad_groups.source_relation\n left join portfolios\n on portfolios.portfolio_id = campaigns.portfolio_id\n and portfolios.source_relation = campaigns.source_relation\n left join account_info\n on account_info.profile_id = campaigns.profile_id\n and account_info.source_relation = campaigns.source_relation\n\n {{ dbt_utils.group_by(16) }}\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__ad_group_level_report", "package": null, "version": null}, {"name": "stg_amazon_ads__profile", "package": null, "version": null}, {"name": "int_amazon_ads__portfolio_history", "package": null, "version": null}, {"name": "stg_amazon_ads__campaign_history", "package": null, "version": null}, {"name": "stg_amazon_ads__ad_group_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.amazon_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.amazon_ads.stg_amazon_ads__ad_group_level_report", "model.amazon_ads.stg_amazon_ads__profile", "model.amazon_ads.int_amazon_ads__portfolio_history", "model.amazon_ads.stg_amazon_ads__campaign_history", "model.amazon_ads.stg_amazon_ads__ad_group_history"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads__ad_group_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__ad_group_level_report\"\n), \n\naccount_info as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__profile\"\n where _fivetran_deleted = False\n),\n\nportfolios as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"int_amazon_ads__portfolio_history\"\n), \n\ncampaigns as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\nad_groups as (\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__ad_group_history\"\n where is_most_recent_record = True\n), \n\nfields as (\n select\n report.source_relation,\n report.date_day,\n account_info.account_name,\n account_info.account_id,\n account_info.country_code,\n account_info.profile_id,\n portfolios.portfolio_name,\n portfolios.portfolio_id,\n campaigns.campaign_name,\n campaigns.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n ad_groups.serving_status,\n ad_groups.state,\n ad_groups.default_bid,\n report.campaign_bidding_strategy,\n sum(report.cost) as cost,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.purchases_30_d) as purchases_30_d,\n sum(report.sales_30_d) as sales_30_d\n\n \n\n\n\n\n\n from report\n\n left join ad_groups\n on ad_groups.ad_group_id = report.ad_group_id\n and ad_groups.source_relation = report.source_relation\n left join campaigns\n on campaigns.campaign_id = ad_groups.campaign_id\n and campaigns.source_relation = ad_groups.source_relation\n left join portfolios\n on portfolios.portfolio_id = campaigns.portfolio_id\n and portfolios.source_relation = campaigns.source_relation\n left join account_info\n on account_info.profile_id = campaigns.profile_id\n and account_info.source_relation = campaigns.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__search_term_ad_keyword_report", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/stg_amazon_ads__search_term_ad_keyword_report.sql", "original_file_path": "models/staging/stg_amazon_ads__search_term_ad_keyword_report.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report", "fqn": ["amazon_ads", "staging", "stg_amazon_ads__search_term_ad_keyword_report"], "alias": "stg_amazon_ads__search_term_ad_keyword_report", "checksum": {"name": "sha256", "checksum": "922833dd61ab4d70f5f8e8d2a929b3634b644b4012c7a8b4cd4a75ecab1598cc"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Search term reports contain search term performance metrics broken down by targeting expressions and keywords.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "ad_keyword_status": {"name": "ad_keyword_status", "description": "Current status of a keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_keyword_status"]}, "campaign_budget_amount": {"name": "campaign_budget_amount", "description": "Total budget allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_amount"]}, "campaign_budget_currency_code": {"name": "campaign_budget_currency_code", "description": "The currency code associated with the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_currency_code"]}, "campaign_budget_type": {"name": "campaign_budget_type", "description": "One of: daily or lifetime.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_type"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "keyword_bid": {"name": "keyword_bid", "description": "Bid associated with a keyword or targeting expression.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_bid"]}, "keyword_id": {"name": "keyword_id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_id"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "search_term": {"name": "search_term", "description": "The search term used by the customer.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.search_term"]}, "targeting": {"name": "targeting", "description": "A string representation of the expression object used in the targeting clause.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.targeting"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/staging/stg_amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.1478121, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__search_term_ad_keyword_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_amazon_ads__search_term_ad_keyword_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_amazon_ads__search_term_ad_keyword_report_tmp')),\n staging_columns=get_search_term_ad_keyword_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='amazon_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id,\n ad_keyword_status,\n campaign_budget_amount,\n campaign_budget_currency_code,\n campaign_budget_type,\n cast(campaign_id as {{ dbt.type_string() }}) as campaign_id,\n clicks,\n cost,\n date as date_day,\n impressions,\n keyword_bid,\n cast(keyword_id as {{ dbt.type_string() }}) as keyword_id,\n search_term,\n targeting,\n purchases_30_d,\n sales_30_d\n\n {{ amazon_ads_fill_pass_through_columns(pass_through_fields=var('amazon_ads__search_term_ad_keyword_passthrough_metrics'), except=['purchases_30_d', 'sales_30_d']) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__search_term_ad_keyword_report_tmp", "package": null, "version": null}, {"name": "stg_amazon_ads__search_term_ad_keyword_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.get_search_term_ad_keyword_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.amazon_ads.amazon_ads_fill_pass_through_columns"], "nodes": ["model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report_tmp"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads__search_term_ad_keyword_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__search_term_ad_keyword_report_tmp\"\n),\n\nfields as (\n\n select\n \n ad_group_id as ad_group_id,\n cast(null as TEXT) as ad_keyword_status,\n campaign_budget_amount as campaign_budget_amount,\n campaign_budget_currency_code as campaign_budget_currency_code,\n campaign_budget_type as campaign_budget_type,\n campaign_id as campaign_id,\n clicks as clicks,\n cost as cost,\n date as date,\n impressions as impressions,\n keyword_bid as keyword_bid,\n keyword_id as keyword_id,\n search_term as search_term,\n targeting as targeting,\n cast(null as integer) as purchases_30_d,\n cast(null as float) as sales_30_d\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(ad_group_id as TEXT) as ad_group_id,\n ad_keyword_status,\n campaign_budget_amount,\n campaign_budget_currency_code,\n campaign_budget_type,\n cast(campaign_id as TEXT) as campaign_id,\n clicks,\n cost,\n date as date_day,\n impressions,\n keyword_bid,\n cast(keyword_id as TEXT) as keyword_id,\n search_term,\n targeting,\n purchases_30_d,\n sales_30_d\n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__ad_group_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__ad_group_history", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/stg_amazon_ads__ad_group_history.sql", "original_file_path": "models/staging/stg_amazon_ads__ad_group_history.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__ad_group_history", "fqn": ["amazon_ads", "staging", "stg_amazon_ads__ad_group_history"], "alias": "stg_amazon_ads__ad_group_history", "checksum": {"name": "sha256", "checksum": "b92358cdcbadfa3bf07c1f629c5ecb046ce3bd72c9ed6b12ae5fda63ef71837b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents an ad group in Amazon Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "creation_date": {"name": "creation_date", "description": "The date of creation of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.creation_date"]}, "default_bid": {"name": "default_bid", "description": "The date of creation of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.default_bid"]}, "last_updated_date": {"name": "last_updated_date", "description": "Date of last update to record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.last_updated_date"]}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean indicating whether record was the most recent instance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/staging/stg_amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.1352594, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__ad_group_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_amazon_ads__ad_group_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_amazon_ads__ad_group_history_tmp')),\n staging_columns=get_ad_group_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='amazon_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as {{ dbt.type_string() }}) as ad_group_id,\n cast(campaign_id as {{ dbt.type_string() }}) as campaign_id,\n creation_date,\n default_bid,\n last_updated_date,\n name as ad_group_name,\n serving_status,\n state,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='amazon_ads') }} order by last_updated_date desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__ad_group_history_tmp", "package": null, "version": null}, {"name": "stg_amazon_ads__ad_group_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.get_ad_group_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.amazon_ads.stg_amazon_ads__ad_group_history_tmp"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads__ad_group_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__ad_group_history_tmp\"\n),\n\nfields as (\n\n select\n \n campaign_id as campaign_id,\n creation_date as creation_date,\n default_bid as default_bid,\n id as id,\n last_updated_date as last_updated_date,\n name as name,\n serving_status as serving_status,\n state as state\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as TEXT) as ad_group_id,\n cast(campaign_id as TEXT) as campaign_id,\n creation_date,\n default_bid,\n last_updated_date,\n name as ad_group_name,\n serving_status,\n state,\n row_number() over (partition by id order by last_updated_date desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__portfolio_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__portfolio_history", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/stg_amazon_ads__portfolio_history.sql", "original_file_path": "models/staging/stg_amazon_ads__portfolio_history.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__portfolio_history", "fqn": ["amazon_ads", "staging", "stg_amazon_ads__portfolio_history"], "alias": "stg_amazon_ads__portfolio_history", "checksum": {"name": "sha256", "checksum": "248ef50d2d55f79b8e1c51068bedb82f9a8cac3b550f25c97be6fd979ba9df78"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a portfolio in Amazon Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "portfolio_id": {"name": "portfolio_id", "description": "The ID of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_id"]}, "portfolio_name": {"name": "portfolio_name", "description": "The name of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_name"]}, "last_updated_date": {"name": "last_updated_date", "description": "Date of last update to record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.last_updated_date"]}, "creation_date": {"name": "creation_date", "description": "The date of creation of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.creation_date"]}, "budget_amount": {"name": "budget_amount", "description": "The budget amount associated with the portfolio. Cannot be null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_currency_code": {"name": "budget_currency_code", "description": "The currency used for all monetary values for entities under this profile. Cannot be null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_end_date": {"name": "budget_end_date", "description": "The end date after which the budget is no longer applied. Optional if policy is set to dateRange or monthlyRecurring.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_start_date": {"name": "budget_start_date", "description": "The starting date in YYYYMMDD format to which the budget is applied. Required if policy is set to dateRange. Not specified if policy is set to monthlyRecurring. Note that the starting date for monthlyRecurring is the date when the policy is set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_policy": {"name": "budget_policy", "description": "The budget policy. Set to dateRange to specify a budget for a specific period of time. Set to monthlyRecurring to specify a budget that is automatically renewed at the beginning of each month. Cannot be null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "in_budget": {"name": "in_budget", "description": "Indicates the current budget status of the portfolio. Set to true if the portfolio is in budget, set to false if the portfolio is out of budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_id": {"name": "profile_id", "description": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.profile_id"]}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean indicating whether record was the most recent instance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/staging/stg_amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.1428492, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__portfolio_history\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__amazon_ads_enabled','amazon_ads__portfolio_history_enabled'])) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_amazon_ads__portfolio_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_amazon_ads__portfolio_history_tmp')),\n staging_columns=get_portfolio_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='amazon_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as {{ dbt.type_string() }}) as portfolio_id,\n budget_amount,\n budget_currency_code,\n budget_end_date,\n budget_policy,\n budget_start_date,\n creation_date,\n in_budget,\n last_updated_date,\n name as portfolio_name,\n cast(profile_id as {{ dbt.type_string() }}) as profile_id,\n serving_status,\n state,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='amazon_ads') }} order by last_updated_date desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__portfolio_history_tmp", "package": null, "version": null}, {"name": "stg_amazon_ads__portfolio_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.amazon_ads.get_portfolio_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.amazon_ads.stg_amazon_ads__portfolio_history_tmp"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads__portfolio_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__portfolio_history_tmp\"\n),\n\nfields as (\n\n select\n \n budget_amount as budget_amount,\n budget_currency_code as budget_currency_code,\n budget_end_date as budget_end_date,\n budget_policy as budget_policy,\n budget_start_date as budget_start_date,\n creation_date as creation_date,\n id as id,\n in_budget as in_budget,\n last_updated_date as last_updated_date,\n name as name,\n profile_id as profile_id,\n serving_status as serving_status,\n state as state\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as TEXT) as portfolio_id,\n budget_amount,\n budget_currency_code,\n budget_end_date,\n budget_policy,\n budget_start_date,\n creation_date,\n in_budget,\n last_updated_date,\n name as portfolio_name,\n cast(profile_id as TEXT) as profile_id,\n serving_status,\n state,\n row_number() over (partition by id order by last_updated_date desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__campaign_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__campaign_history", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/stg_amazon_ads__campaign_history.sql", "original_file_path": "models/staging/stg_amazon_ads__campaign_history.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__campaign_history", "fqn": ["amazon_ads", "staging", "stg_amazon_ads__campaign_history"], "alias": "stg_amazon_ads__campaign_history", "checksum": {"name": "sha256", "checksum": "5d109847fdd7a54a02a0d0552b20a3a32827842c1f774a355a2a15508035d78e"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a campaign in Amazon Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_name"]}, "creation_date": {"name": "creation_date", "description": "The date of creation of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.creation_date"]}, "last_updated_date": {"name": "last_updated_date", "description": "Date of last update to record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.last_updated_date"]}, "portfolio_id": {"name": "portfolio_id", "description": "The ID of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_id"]}, "bidding_strategy": {"name": "bidding_strategy", "description": "The bidding strategy associated with a campaign (legacyForSales, autoForSales, or manual.)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget": {"name": "budget", "description": "The budget for the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_type": {"name": "budget_type", "description": "One of: daily or lifetime.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_type"]}, "effective_budget": {"name": "effective_budget", "description": "Adjusted budget for the campaign that has been impacted by a budget rule.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_date": {"name": "end_date", "description": "The end date of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_id": {"name": "profile_id", "description": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.profile_id"]}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "start_date": {"name": "start_date", "description": "The start date of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}, "targeting_type": {"name": "targeting_type", "description": "The type of targeting used for the campaign, either manual or auto.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean indicating whether record was the most recent instance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/staging/stg_amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.1391118, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_amazon_ads__campaign_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_amazon_ads__campaign_history_tmp')),\n staging_columns=get_campaign_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='amazon_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as {{ dbt.type_string() }}) as campaign_id,\n last_updated_date,\n bidding_strategy,\n creation_date,\n end_date,\n name as campaign_name,\n cast(portfolio_id as {{ dbt.type_string() }}) as portfolio_id,\n cast(profile_id as {{ dbt.type_string() }}) as profile_id,\n serving_status,\n start_date,\n state,\n targeting_type,\n budget,\n budget_type,\n effective_budget,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='amazon_ads') }} order by last_updated_date desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__campaign_history_tmp", "package": null, "version": null}, {"name": "stg_amazon_ads__campaign_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.get_campaign_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.amazon_ads.stg_amazon_ads__campaign_history_tmp"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads__campaign_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_history_tmp\"\n),\n\nfields as (\n\n select\n \n bidding_strategy as bidding_strategy,\n creation_date as creation_date,\n end_date as end_date,\n id as id,\n last_updated_date as last_updated_date,\n name as name,\n portfolio_id as portfolio_id,\n profile_id as profile_id,\n serving_status as serving_status,\n start_date as start_date,\n state as state,\n targeting_type as targeting_type,\n budget as budget,\n budget_type as budget_type,\n effective_budget as effective_budget\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as TEXT) as campaign_id,\n last_updated_date,\n bidding_strategy,\n creation_date,\n end_date,\n name as campaign_name,\n cast(portfolio_id as TEXT) as portfolio_id,\n cast(profile_id as TEXT) as profile_id,\n serving_status,\n start_date,\n state,\n targeting_type,\n budget,\n budget_type,\n effective_budget,\n row_number() over (partition by id order by last_updated_date desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__ad_group_level_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__ad_group_level_report", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/stg_amazon_ads__ad_group_level_report.sql", "original_file_path": "models/staging/stg_amazon_ads__ad_group_level_report.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__ad_group_level_report", "fqn": ["amazon_ads", "staging", "stg_amazon_ads__ad_group_level_report"], "alias": "stg_amazon_ads__ad_group_level_report", "checksum": {"name": "sha256", "checksum": "aa52f2bd1885bbc2191b2cb2936ee4ecfdcd9c823f408ac3134aec6531b3f386"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance by Amazon ad group.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "campaign_bidding_strategy": {"name": "campaign_bidding_strategy", "description": "The bidding strategy associated with a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_bidding_strategy"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/staging/stg_amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.1362724, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__ad_group_level_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\nwith base as (\n\n select * \n from {{ ref('stg_amazon_ads__ad_group_level_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_amazon_ads__ad_group_level_report_tmp')),\n staging_columns=get_ad_group_level_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='amazon_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id,\n campaign_bidding_strategy,\n clicks,\n cost,\n date as date_day,\n impressions,\n purchases_30_d,\n sales_30_d\n \n {{ amazon_ads_fill_pass_through_columns(pass_through_fields=var('amazon_ads__ad_group_passthrough_metrics'), except=['purchases_30_d', 'sales_30_d']) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__ad_group_level_report_tmp", "package": null, "version": null}, {"name": "stg_amazon_ads__ad_group_level_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.get_ad_group_level_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.amazon_ads.amazon_ads_fill_pass_through_columns"], "nodes": ["model.amazon_ads.stg_amazon_ads__ad_group_level_report_tmp"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads__ad_group_level_report.sql", "compiled": true, "compiled_code": "\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__ad_group_level_report_tmp\"\n),\n\nfields as (\n\n select\n \n ad_group_id as ad_group_id,\n campaign_bidding_strategy as campaign_bidding_strategy,\n clicks as clicks,\n cost as cost,\n date as date,\n impressions as impressions,\n cast(null as integer) as purchases_30_d,\n cast(null as float) as sales_30_d\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(ad_group_id as TEXT) as ad_group_id,\n campaign_bidding_strategy,\n clicks,\n cost,\n date as date_day,\n impressions,\n purchases_30_d,\n sales_30_d\n \n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__targeting_keyword_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__targeting_keyword_report", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/stg_amazon_ads__targeting_keyword_report.sql", "original_file_path": "models/staging/stg_amazon_ads__targeting_keyword_report.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__targeting_keyword_report", "fqn": ["amazon_ads", "staging", "stg_amazon_ads__targeting_keyword_report"], "alias": "stg_amazon_ads__targeting_keyword_report", "checksum": {"name": "sha256", "checksum": "b31838ddeeb3c6af579e32dfb1121fb4aec4013a1ffc10121ebe0e8d271eb4db"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Targeting reports contain performance metrics broken down by both targeting expressions and keywords.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "ad_keyword_status": {"name": "ad_keyword_status", "description": "Current status of a keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_keyword_status"]}, "campaign_budget_amount": {"name": "campaign_budget_amount", "description": "Total budget allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_amount"]}, "campaign_budget_currency_code": {"name": "campaign_budget_currency_code", "description": "The currency code associated with the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_currency_code"]}, "campaign_budget_type": {"name": "campaign_budget_type", "description": "One of: daily or lifetime.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_type"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "keyword_bid": {"name": "keyword_bid", "description": "Bid associated with a keyword or targeting expression.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_bid"]}, "keyword_id": {"name": "keyword_id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_id"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "keyword_type": {"name": "keyword_type", "description": "Type of matching for the keyword used in bid. One of: BROAD, PHRASE, or EXACT.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_type"]}, "match_type": {"name": "match_type", "description": "Type of matching for the keyword used in bid. One of: BROAD, PHRASE, or EXACT.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.match_type"]}, "targeting": {"name": "targeting", "description": "A string representation of the expression object used in the targeting clause.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.targeting"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/staging/stg_amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.1465106, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__targeting_keyword_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_amazon_ads__targeting_keyword_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_amazon_ads__targeting_keyword_report_tmp')),\n staging_columns=get_targeting_keyword_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='amazon_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id,\n ad_keyword_status,\n campaign_budget_amount,\n campaign_budget_currency_code,\n campaign_budget_type,\n cast(campaign_id as {{ dbt.type_string() }}) as campaign_id,\n clicks,\n cost,\n date as date_day,\n impressions,\n keyword_bid,\n cast(keyword_id as {{ dbt.type_string() }}) as keyword_id,\n keyword_type,\n match_type,\n targeting,\n purchases_30_d,\n sales_30_d\n\n {{ amazon_ads_fill_pass_through_columns(pass_through_fields=var('amazon_ads__targeting_keyword_passthrough_metrics'), except=['purchases_30_d', 'sales_30_d']) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__targeting_keyword_report_tmp", "package": null, "version": null}, {"name": "stg_amazon_ads__targeting_keyword_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.get_targeting_keyword_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.amazon_ads.amazon_ads_fill_pass_through_columns"], "nodes": ["model.amazon_ads.stg_amazon_ads__targeting_keyword_report_tmp"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads__targeting_keyword_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__targeting_keyword_report_tmp\"\n),\n\nfields as (\n\n select\n \n ad_group_id as ad_group_id,\n ad_keyword_status as ad_keyword_status,\n campaign_budget_amount as campaign_budget_amount,\n campaign_budget_currency_code as campaign_budget_currency_code,\n campaign_budget_type as campaign_budget_type,\n campaign_id as campaign_id,\n clicks as clicks,\n cost as cost,\n date as date,\n impressions as impressions,\n keyword_bid as keyword_bid,\n keyword_id as keyword_id,\n keyword_type as keyword_type,\n match_type as match_type,\n targeting as targeting,\n cast(null as integer) as purchases_30_d,\n cast(null as float) as sales_30_d\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(ad_group_id as TEXT) as ad_group_id,\n ad_keyword_status,\n campaign_budget_amount,\n campaign_budget_currency_code,\n campaign_budget_type,\n cast(campaign_id as TEXT) as campaign_id,\n clicks,\n cost,\n date as date_day,\n impressions,\n keyword_bid,\n cast(keyword_id as TEXT) as keyword_id,\n keyword_type,\n match_type,\n targeting,\n purchases_30_d,\n sales_30_d\n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__advertised_product_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__advertised_product_report", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/stg_amazon_ads__advertised_product_report.sql", "original_file_path": "models/staging/stg_amazon_ads__advertised_product_report.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__advertised_product_report", "fqn": ["amazon_ads", "staging", "stg_amazon_ads__advertised_product_report"], "alias": "stg_amazon_ads__advertised_product_report", "checksum": {"name": "sha256", "checksum": "b8f3274b34d3d6eca309b4a4c57552fdd851c3fe99285a88e7900394578eb3a8"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Advertised product reports contain performance data for products that are advertised as part of your campaigns.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "ad_id": {"name": "ad_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "advertised_asin": {"name": "advertised_asin", "description": "The ASIN associated to an advertised product.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.advertised_asin"]}, "advertised_sku": {"name": "advertised_sku", "description": "The SKU being advertised.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.advertised_sku"]}, "campaign_budget_amount": {"name": "campaign_budget_amount", "description": "Total budget allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_amount"]}, "campaign_budget_currency_code": {"name": "campaign_budget_currency_code", "description": "The currency code associated with the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_currency_code"]}, "campaign_budget_type": {"name": "campaign_budget_type", "description": "One of: daily or lifetime.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_type"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/staging/stg_amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.1377769, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__advertised_product_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_amazon_ads__advertised_product_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_amazon_ads__advertised_product_report_tmp')),\n staging_columns=get_advertised_product_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='amazon_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(ad_id as {{ dbt.type_string() }}) as ad_id,\n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id,\n advertised_asin,\n advertised_sku,\n campaign_budget_amount,\n campaign_budget_currency_code,\n campaign_budget_type,\n cast(campaign_id as {{ dbt.type_string() }}) as campaign_id,\n clicks,\n cost,\n date as date_day,\n impressions,\n purchases_30_d,\n sales_30_d\n \n {{ amazon_ads_fill_pass_through_columns(pass_through_fields=var('amazon_ads__advertised_product_passthrough_metrics'), except=['purchases_30_d', 'sales_30_d']) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__advertised_product_report_tmp", "package": null, "version": null}, {"name": "stg_amazon_ads__advertised_product_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.get_advertised_product_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.amazon_ads.amazon_ads_fill_pass_through_columns"], "nodes": ["model.amazon_ads.stg_amazon_ads__advertised_product_report_tmp"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads__advertised_product_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__advertised_product_report_tmp\"\n),\n\nfields as (\n\n select\n \n ad_group_id as ad_group_id,\n ad_id as ad_id,\n advertised_asin as advertised_asin,\n advertised_sku as advertised_sku,\n campaign_budget_amount as campaign_budget_amount,\n campaign_budget_currency_code as campaign_budget_currency_code,\n campaign_budget_type as campaign_budget_type,\n campaign_id as campaign_id,\n clicks as clicks,\n cost as cost,\n date as date,\n impressions as impressions,\n cast(null as integer) as purchases_30_d,\n cast(null as float) as sales_30_d\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(ad_id as TEXT) as ad_id,\n cast(ad_group_id as TEXT) as ad_group_id,\n advertised_asin,\n advertised_sku,\n campaign_budget_amount,\n campaign_budget_currency_code,\n campaign_budget_type,\n cast(campaign_id as TEXT) as campaign_id,\n clicks,\n cost,\n date as date_day,\n impressions,\n purchases_30_d,\n sales_30_d\n \n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__keyword_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__keyword_history", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/stg_amazon_ads__keyword_history.sql", "original_file_path": "models/staging/stg_amazon_ads__keyword_history.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__keyword_history", "fqn": ["amazon_ads", "staging", "stg_amazon_ads__keyword_history"], "alias": "stg_amazon_ads__keyword_history", "checksum": {"name": "sha256", "checksum": "dbaf0a033752695b539a48206654e34f5414a54e8994e458db3dae658fc621c7"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a keyword in Amazon Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "keyword_id": {"name": "keyword_id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_id"]}, "last_updated_date": {"name": "last_updated_date", "description": "Date of last update to record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.last_updated_date"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "bid": {"name": "bid", "description": "Bid associated with this keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.bid_keyword"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "creation_date": {"name": "creation_date", "description": "The date of creation of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.creation_date"]}, "keyword_text": {"name": "keyword_text", "description": "The exact text for the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "match_type": {"name": "match_type", "description": "One of (broad, exact, or phrase.)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_match_type"]}, "native_language_keyword": {"name": "native_language_keyword", "description": "The unlocalized keyword text in the preferred locale of the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "native_language_locale": {"name": "native_language_locale", "description": "The preferred language locale of the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean indicating whether record was the most recent instance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/staging/stg_amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.141608, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__keyword_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_amazon_ads__keyword_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_amazon_ads__keyword_history_tmp')),\n staging_columns=get_keyword_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='amazon_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as {{ dbt.type_string() }}) as keyword_id,\n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id,\n bid,\n cast(campaign_id as {{ dbt.type_string() }}) as campaign_id,\n creation_date,\n keyword_text,\n last_updated_date,\n match_type,\n native_language_keyword,\n serving_status,\n state,\n native_language_locale,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='amazon_ads') }} order by last_updated_date desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__keyword_history_tmp", "package": null, "version": null}, {"name": "stg_amazon_ads__keyword_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.get_keyword_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.amazon_ads.stg_amazon_ads__keyword_history_tmp"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads__keyword_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__keyword_history_tmp\"\n),\n\nfields as (\n\n select\n \n ad_group_id as ad_group_id,\n bid as bid,\n campaign_id as campaign_id,\n creation_date as creation_date,\n id as id,\n keyword_text as keyword_text,\n last_updated_date as last_updated_date,\n match_type as match_type,\n native_language_keyword as native_language_keyword,\n serving_status as serving_status,\n state as state,\n native_language_locale as native_language_locale\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as TEXT) as keyword_id,\n cast(ad_group_id as TEXT) as ad_group_id,\n bid,\n cast(campaign_id as TEXT) as campaign_id,\n creation_date,\n keyword_text,\n last_updated_date,\n match_type,\n native_language_keyword,\n serving_status,\n state,\n native_language_locale,\n row_number() over (partition by id order by last_updated_date desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__campaign_level_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__campaign_level_report", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/stg_amazon_ads__campaign_level_report.sql", "original_file_path": "models/staging/stg_amazon_ads__campaign_level_report.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__campaign_level_report", "fqn": ["amazon_ads", "staging", "stg_amazon_ads__campaign_level_report"], "alias": "stg_amazon_ads__campaign_level_report", "checksum": {"name": "sha256", "checksum": "26d28d96834f54faff1859f82c50ed58f75feba319534bf61ae381473183e5b5"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Campaign reports contain performance data broken down at the campaign level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "campaign_applicable_budget_rule_id": {"name": "campaign_applicable_budget_rule_id", "description": "The ID associated to the active budget rule for a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_applicable_budget_rule_id"]}, "campaign_applicable_budget_rule_name": {"name": "campaign_applicable_budget_rule_name", "description": "The name associated to the active budget rule for a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_applicable_budget_rule_name"]}, "campaign_bidding_strategy": {"name": "campaign_bidding_strategy", "description": "The bidding strategy associated with a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_bidding_strategy"]}, "campaign_budget_amount": {"name": "campaign_budget_amount", "description": "Total budget allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_amount"]}, "campaign_budget_currency_code": {"name": "campaign_budget_currency_code", "description": "The currency code associated with the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_currency_code"]}, "campaign_budget_type": {"name": "campaign_budget_type", "description": "One of: daily or lifetime.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_type"]}, "campaign_rule_based_budget_amount": {"name": "campaign_rule_based_budget_amount", "description": "The value of the rule-based budget for a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_rule_based_budget_amount"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/staging/stg_amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.1404014, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_level_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_amazon_ads__campaign_level_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_amazon_ads__campaign_level_report_tmp')),\n staging_columns=get_campaign_level_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='amazon_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n campaign_applicable_budget_rule_id,\n campaign_applicable_budget_rule_name,\n campaign_bidding_strategy,\n campaign_budget_amount,\n campaign_budget_currency_code,\n campaign_budget_type,\n cast(campaign_id as {{ dbt.type_string() }}) as campaign_id,\n campaign_rule_based_budget_amount,\n clicks,\n cost,\n date as date_day,\n impressions,\n purchases_30_d,\n sales_30_d\n\n {{ amazon_ads_fill_pass_through_columns(pass_through_fields=var('amazon_ads__campaign_passthrough_metrics'), except=['purchases_30_d', 'sales_30_d']) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__campaign_level_report_tmp", "package": null, "version": null}, {"name": "stg_amazon_ads__campaign_level_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.get_campaign_level_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.amazon_ads.amazon_ads_fill_pass_through_columns"], "nodes": ["model.amazon_ads.stg_amazon_ads__campaign_level_report_tmp"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads__campaign_level_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_level_report_tmp\"\n),\n\nfields as (\n\n select\n \n campaign_applicable_budget_rule_id as campaign_applicable_budget_rule_id,\n campaign_applicable_budget_rule_name as campaign_applicable_budget_rule_name,\n campaign_bidding_strategy as campaign_bidding_strategy,\n campaign_budget_amount as campaign_budget_amount,\n campaign_budget_currency_code as campaign_budget_currency_code,\n campaign_budget_type as campaign_budget_type,\n campaign_id as campaign_id,\n campaign_rule_based_budget_amount as campaign_rule_based_budget_amount,\n clicks as clicks,\n cost as cost,\n date as date,\n impressions as impressions,\n purchases_30_d as purchases_30_d,\n sales_30_d as sales_30_d\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n campaign_applicable_budget_rule_id,\n campaign_applicable_budget_rule_name,\n campaign_bidding_strategy,\n campaign_budget_amount,\n campaign_budget_currency_code,\n campaign_budget_type,\n cast(campaign_id as TEXT) as campaign_id,\n campaign_rule_based_budget_amount,\n clicks,\n cost,\n date as date_day,\n impressions,\n purchases_30_d,\n sales_30_d\n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__profile": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__profile", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/stg_amazon_ads__profile.sql", "original_file_path": "models/staging/stg_amazon_ads__profile.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__profile", "fqn": ["amazon_ads", "staging", "stg_amazon_ads__profile"], "alias": "stg_amazon_ads__profile", "checksum": {"name": "sha256", "checksum": "4a524c8198fc506924fe7058aff58222287c034659acfce0651fe9aff3756d41"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a profile. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean created by Fivetran to indicate whether the record has been deleted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads._fivetran_deleted"]}, "profile_id": {"name": "profile_id", "description": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.profile_id"]}, "account_id": {"name": "account_id", "description": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_id"]}, "account_marketplace_string_id": {"name": "account_marketplace_string_id", "description": "The identifier of the marketplace to which the account is associated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "Account Name. Not currently populated for sellers.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.account_name"]}, "account_sub_type": {"name": "account_sub_type", "description": "The account subtype.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_type": {"name": "account_type", "description": "One of seller, vendor, or agency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_valid_payment_method": {"name": "account_valid_payment_method", "description": "For Vendors, this returns if the Advertiser has set up a valid payment method.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country_code": {"name": "country_code", "description": "The code for a given country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.country_code"]}, "currency_code": {"name": "currency_code", "description": "The currency used for all monetary values for entities under this profile.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.currency_code"]}, "daily_budget": {"name": "daily_budget", "description": "Daily budget for Sponsored Product campaigns for seller type accounts.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone": {"name": "timezone", "description": "The time zone used for all date-based campaign management and reporting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/staging/stg_amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.1451132, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__profile\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_amazon_ads__profile_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_amazon_ads__profile_tmp')),\n staging_columns=get_profile_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='amazon_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as {{ dbt.type_string() }}) as profile_id,\n cast(account_id as {{ dbt.type_string() }}) as account_id,\n account_marketplace_string_id,\n account_name,\n account_sub_type,\n account_type,\n account_valid_payment_method,\n country_code,\n currency_code,\n daily_budget,\n timezone,\n _fivetran_deleted\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__profile_tmp", "package": null, "version": null}, {"name": "stg_amazon_ads__profile_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.get_profile_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string"], "nodes": ["model.amazon_ads.stg_amazon_ads__profile_tmp"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads__profile.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__profile_tmp\"\n),\n\nfields as (\n\n select\n \n id as id,\n account_id as account_id,\n account_marketplace_string_id as account_marketplace_string_id,\n account_name as account_name,\n account_sub_type as account_sub_type,\n account_type as account_type,\n account_valid_payment_method as account_valid_payment_method,\n country_code as country_code,\n currency_code as currency_code,\n daily_budget as daily_budget,\n timezone as timezone,\n _fivetran_deleted as _fivetran_deleted\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as TEXT) as profile_id,\n cast(account_id as TEXT) as account_id,\n account_marketplace_string_id,\n account_name,\n account_sub_type,\n account_type,\n account_valid_payment_method,\n country_code,\n currency_code,\n daily_budget,\n timezone,\n _fivetran_deleted\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__product_ad_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__product_ad_history", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/stg_amazon_ads__product_ad_history.sql", "original_file_path": "models/staging/stg_amazon_ads__product_ad_history.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__product_ad_history", "fqn": ["amazon_ads", "staging", "stg_amazon_ads__product_ad_history"], "alias": "stg_amazon_ads__product_ad_history", "checksum": {"name": "sha256", "checksum": "b01e70975ac97cfcc68f21165faebaf40f6ce0e1235c616c4f2dc56e7ddd6aa7"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a product in Amazon Ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.source_relation"]}, "ad_id": {"name": "ad_id", "description": "The ID of the Ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_id"]}, "last_updated_date": {"name": "last_updated_date", "description": "Date of last update to record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.last_updated_date"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "asin": {"name": "asin", "description": "The ASIN associated with the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creation_date": {"name": "creation_date", "description": "The date of creation of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.creation_date"]}, "sku": {"name": "sku", "description": "The product SKU associated with the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean indicating whether record was the most recent instance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "amazon_ads://models/staging/stg_amazon_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.1439521, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__product_ad_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_amazon_ads__product_ad_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_amazon_ads__product_ad_history_tmp')),\n staging_columns=get_product_ad_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='amazon_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as {{ dbt.type_string() }}) as ad_id,\n cast(ad_group_id as {{ dbt.type_string() }}) as ad_group_id,\n asin,\n cast(campaign_id as {{ dbt.type_string() }}) as campaign_id,\n creation_date,\n last_updated_date,\n serving_status,\n sku,\n state,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='amazon_ads') }} order by last_updated_date desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__product_ad_history_tmp", "package": null, "version": null}, {"name": "stg_amazon_ads__product_ad_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.amazon_ads.get_product_ad_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_string", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.amazon_ads.stg_amazon_ads__product_ad_history_tmp"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads__product_ad_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__product_ad_history_tmp\"\n),\n\nfields as (\n\n select\n \n ad_group_id as ad_group_id,\n asin as asin,\n campaign_id as campaign_id,\n creation_date as creation_date,\n id as id,\n last_updated_date as last_updated_date,\n serving_status as serving_status,\n sku as sku,\n state as state\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as TEXT) as ad_id,\n cast(ad_group_id as TEXT) as ad_group_id,\n asin,\n cast(campaign_id as TEXT) as campaign_id,\n creation_date,\n last_updated_date,\n serving_status,\n sku,\n state,\n row_number() over (partition by id order by last_updated_date desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__keyword_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__keyword_history_tmp", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/tmp/stg_amazon_ads__keyword_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_amazon_ads__keyword_history_tmp.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__keyword_history_tmp", "fqn": ["amazon_ads", "staging", "tmp", "stg_amazon_ads__keyword_history_tmp"], "alias": "stg_amazon_ads__keyword_history_tmp", "checksum": {"name": "sha256", "checksum": "7b8132355b140aa6e4f6ced3e5948c4dfb594db9ff5b29b2c5bb7f8464bcb612"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708218.1173012, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__keyword_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\n{% if var('amazon_ads_union_schemas', []) | length > 0 or var('amazon_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='keyword_history', \n database_variable='amazon_ads_database', \n schema_variable='amazon_ads_schema', \n default_database=target.database,\n default_schema='amazon_ads',\n default_variable='keyword_history',\n union_schema_variable='amazon_ads_union_schemas',\n union_database_variable='amazon_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='amazon_ads_sources',\n single_source_name='amazon_ads',\n single_table_name='keyword_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["amazon_ads", "keyword_history"], ["amazon_ads", "keyword_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.amazon_ads.amazon_ads.keyword_history"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/tmp/stg_amazon_ads__keyword_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: amazon_ads_keyword_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: amazon_ads_keyword_history_data\n\n\n select\n \"id\",\n \"last_updated_date\",\n \"_fivetran_synced\",\n \"ad_group_id\",\n \"bid\",\n \"campaign_id\",\n \"creation_date\",\n \"keyword_text\",\n \"match_type\",\n \"native_language_keyword\",\n \"serving_status\",\n \"state\",\n \"native_language_locale\"\n from \"postgres\".\"public\".\"amazon_ads_keyword_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__campaign_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__campaign_history_tmp", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/tmp/stg_amazon_ads__campaign_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_amazon_ads__campaign_history_tmp.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__campaign_history_tmp", "fqn": ["amazon_ads", "staging", "tmp", "stg_amazon_ads__campaign_history_tmp"], "alias": "stg_amazon_ads__campaign_history_tmp", "checksum": {"name": "sha256", "checksum": "a6c7ccb3bba8fc386a2a7291aeee00b585c8d19b14c131ab5e4ee3bbcbe303a4"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708218.1278613, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\n{% if var('amazon_ads_union_schemas', []) | length > 0 or var('amazon_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_history', \n database_variable='amazon_ads_database', \n schema_variable='amazon_ads_schema', \n default_database=target.database,\n default_schema='amazon_ads',\n default_variable='campaign_history',\n union_schema_variable='amazon_ads_union_schemas',\n union_database_variable='amazon_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='amazon_ads_sources',\n single_source_name='amazon_ads',\n single_table_name='campaign_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["amazon_ads", "campaign_history"], ["amazon_ads", "campaign_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.amazon_ads.amazon_ads.campaign_history"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/tmp/stg_amazon_ads__campaign_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: amazon_ads_campaign_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: amazon_ads_campaign_history_data\n\n\n select\n \"id\",\n \"last_updated_date\",\n \"_fivetran_synced\",\n \"bidding_strategy\",\n \"creation_date\",\n \"budget\",\n \"end_date\",\n \"name\",\n \"portfolio_id\",\n \"profile_id\",\n \"serving_status\",\n \"start_date\",\n \"state\",\n \"targeting_type\",\n \"budget_type\",\n \"effective_budget\"\n from \"postgres\".\"public\".\"amazon_ads_campaign_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__search_term_ad_keyword_report_tmp", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/tmp/stg_amazon_ads__search_term_ad_keyword_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_amazon_ads__search_term_ad_keyword_report_tmp.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report_tmp", "fqn": ["amazon_ads", "staging", "tmp", "stg_amazon_ads__search_term_ad_keyword_report_tmp"], "alias": "stg_amazon_ads__search_term_ad_keyword_report_tmp", "checksum": {"name": "sha256", "checksum": "2ccd82d36486f242bf863cf6ef5e68a842ca40a46d5468b9a1b38c47cf321fc0"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708218.1385317, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__search_term_ad_keyword_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\n{% if var('amazon_ads_union_schemas', []) | length > 0 or var('amazon_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='search_term_ad_keyword_report', \n database_variable='amazon_ads_database', \n schema_variable='amazon_ads_schema', \n default_database=target.database,\n default_schema='amazon_ads',\n default_variable='search_term_ad_keyword_report',\n union_schema_variable='amazon_ads_union_schemas',\n union_database_variable='amazon_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='amazon_ads_sources',\n single_source_name='amazon_ads',\n single_table_name='search_term_ad_keyword_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["amazon_ads", "search_term_ad_keyword_report"], ["amazon_ads", "search_term_ad_keyword_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.amazon_ads.amazon_ads.search_term_ad_keyword_report"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/tmp/stg_amazon_ads__search_term_ad_keyword_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: amazon_ads_search_term_ad_keyword_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: amazon_ads_search_term_ad_keyword_report_data\n\n\n select\n \"ad_group_id\",\n \"campaign_id\",\n \"date\",\n \"keyword_id\",\n \"_fivetran_synced\",\n \"campaign_budget_amount\",\n \"campaign_budget_currency_code\",\n \"campaign_budget_type\",\n \"clicks\",\n \"cost\",\n \"impressions\",\n \"keyword_bid\",\n \"search_term\",\n \"targeting\"\n from \"postgres\".\"public\".\"amazon_ads_search_term_ad_keyword_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__campaign_level_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__campaign_level_report_tmp", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/tmp/stg_amazon_ads__campaign_level_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_amazon_ads__campaign_level_report_tmp.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__campaign_level_report_tmp", "fqn": ["amazon_ads", "staging", "tmp", "stg_amazon_ads__campaign_level_report_tmp"], "alias": "stg_amazon_ads__campaign_level_report_tmp", "checksum": {"name": "sha256", "checksum": "a73b069a9c57479eb126f59c2360c6a9faae53cb18633bb58f47de722e1e1640"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708218.149138, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_level_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\n{% if var('amazon_ads_union_schemas', []) | length > 0 or var('amazon_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_level_report', \n database_variable='amazon_ads_database', \n schema_variable='amazon_ads_schema', \n default_database=target.database,\n default_schema='amazon_ads',\n default_variable='campaign_level_report',\n union_schema_variable='amazon_ads_union_schemas',\n union_database_variable='amazon_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='amazon_ads_sources',\n single_source_name='amazon_ads',\n single_table_name='campaign_level_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["amazon_ads", "campaign_level_report"], ["amazon_ads", "campaign_level_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.amazon_ads.amazon_ads.campaign_level_report"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/tmp/stg_amazon_ads__campaign_level_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: amazon_ads_campaign_level_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: amazon_ads_campaign_level_report_data\n\n\n select\n \"campaign_id\",\n \"date\",\n \"_fivetran_synced\",\n \"campaign_applicable_budget_rule_id\",\n \"campaign_applicable_budget_rule_name\",\n \"campaign_bidding_strategy\",\n \"campaign_budget_amount\",\n \"campaign_budget_currency_code\",\n \"campaign_budget_type\",\n \"clicks\",\n \"cost\",\n \"impressions\",\n \"campaign_rule_based_budget_amount\",\n \"sales_7_d\",\n \"purchases_30_d\",\n \"sales_30_d\"\n from \"postgres\".\"public\".\"amazon_ads_campaign_level_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__profile_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__profile_tmp", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/tmp/stg_amazon_ads__profile_tmp.sql", "original_file_path": "models/staging/tmp/stg_amazon_ads__profile_tmp.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__profile_tmp", "fqn": ["amazon_ads", "staging", "tmp", "stg_amazon_ads__profile_tmp"], "alias": "stg_amazon_ads__profile_tmp", "checksum": {"name": "sha256", "checksum": "6ebb916ae09e297be68a551e03175770daa27009e1dccc8d4e79f92516cfe1fa"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708218.161096, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__profile_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\n{% if var('amazon_ads_union_schemas', []) | length > 0 or var('amazon_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='profile', \n database_variable='amazon_ads_database', \n schema_variable='amazon_ads_schema', \n default_database=target.database,\n default_schema='amazon_ads',\n default_variable='profile',\n union_schema_variable='amazon_ads_union_schemas',\n union_database_variable='amazon_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='amazon_ads_sources',\n single_source_name='amazon_ads',\n single_table_name='profile'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["amazon_ads", "profile"], ["amazon_ads", "profile"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.amazon_ads.amazon_ads.profile"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/tmp/stg_amazon_ads__profile_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: amazon_ads_profile_identifier\n -- database: postgres \n -- schema: public\n -- identifier: amazon_ads_profile_data\n\n\n select\n \"id\",\n \"_fivetran_deleted\",\n \"_fivetran_synced\",\n \"account_id\",\n \"account_marketplace_string_id\",\n \"account_name\",\n \"account_sub_type\",\n \"account_type\",\n \"account_valid_payment_method\",\n \"country_code\",\n \"currency_code\",\n \"daily_budget\",\n \"timezone\"\n from \"postgres\".\"public\".\"amazon_ads_profile_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__ad_group_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__ad_group_history_tmp", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/tmp/stg_amazon_ads__ad_group_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_amazon_ads__ad_group_history_tmp.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__ad_group_history_tmp", "fqn": ["amazon_ads", "staging", "tmp", "stg_amazon_ads__ad_group_history_tmp"], "alias": "stg_amazon_ads__ad_group_history_tmp", "checksum": {"name": "sha256", "checksum": "e5c1668edfd9a86d7f014dd1dbdea6684559d08693ea0cfeca1d37ded0b5a98b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708218.1717362, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__ad_group_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\n{% if var('amazon_ads_union_schemas', []) | length > 0 or var('amazon_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_group_history', \n database_variable='amazon_ads_database', \n schema_variable='amazon_ads_schema', \n default_database=target.database,\n default_schema='amazon_ads',\n default_variable='ad_group_history',\n union_schema_variable='amazon_ads_union_schemas',\n union_database_variable='amazon_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='amazon_ads_sources',\n single_source_name='amazon_ads',\n single_table_name='ad_group_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["amazon_ads", "ad_group_history"], ["amazon_ads", "ad_group_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.amazon_ads.amazon_ads.ad_group_history"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/tmp/stg_amazon_ads__ad_group_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: amazon_ads_ad_group_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: amazon_ads_ad_group_history_data\n\n\n select\n \"id\",\n \"last_updated_date\",\n \"_fivetran_synced\",\n \"campaign_id\",\n \"creation_date\",\n \"default_bid\",\n \"name\",\n \"serving_status\",\n \"state\"\n from \"postgres\".\"public\".\"amazon_ads_ad_group_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__targeting_keyword_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__targeting_keyword_report_tmp", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/tmp/stg_amazon_ads__targeting_keyword_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_amazon_ads__targeting_keyword_report_tmp.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__targeting_keyword_report_tmp", "fqn": ["amazon_ads", "staging", "tmp", "stg_amazon_ads__targeting_keyword_report_tmp"], "alias": "stg_amazon_ads__targeting_keyword_report_tmp", "checksum": {"name": "sha256", "checksum": "2faa7e5bda77d2a5f08e0db47520698ce39828a41bd178d0ef79ff5d829c7f43"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708218.1823978, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__targeting_keyword_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\n{% if var('amazon_ads_union_schemas', []) | length > 0 or var('amazon_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='targeting_keyword_report', \n database_variable='amazon_ads_database', \n schema_variable='amazon_ads_schema', \n default_database=target.database,\n default_schema='amazon_ads',\n default_variable='targeting_keyword_report',\n union_schema_variable='amazon_ads_union_schemas',\n union_database_variable='amazon_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='amazon_ads_sources',\n single_source_name='amazon_ads',\n single_table_name='targeting_keyword_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["amazon_ads", "targeting_keyword_report"], ["amazon_ads", "targeting_keyword_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.amazon_ads.amazon_ads.targeting_keyword_report"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/tmp/stg_amazon_ads__targeting_keyword_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: amazon_ads_targeting_keyword_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: amazon_ads_targeting_keyword_report_data\n\n\n select\n \"ad_group_id\",\n \"campaign_id\",\n \"date\",\n \"keyword_id\",\n \"_fivetran_synced\",\n \"ad_keyword_status\",\n \"campaign_budget_amount\",\n \"campaign_budget_currency_code\",\n \"campaign_budget_type\",\n \"clicks\",\n \"cost\",\n \"impressions\",\n \"keyword_bid\",\n \"keyword_type\",\n \"match_type\",\n \"targeting\"\n from \"postgres\".\"public\".\"amazon_ads_targeting_keyword_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__advertised_product_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__advertised_product_report_tmp", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/tmp/stg_amazon_ads__advertised_product_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_amazon_ads__advertised_product_report_tmp.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__advertised_product_report_tmp", "fqn": ["amazon_ads", "staging", "tmp", "stg_amazon_ads__advertised_product_report_tmp"], "alias": "stg_amazon_ads__advertised_product_report_tmp", "checksum": {"name": "sha256", "checksum": "17a88b978f4dc101972f8a5a9a894bc2e158dc51c6fd72774e3c8ba03c68bb4e"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708218.1939538, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__advertised_product_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\n{% if var('amazon_ads_union_schemas', []) | length > 0 or var('amazon_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='advertised_product_report', \n database_variable='amazon_ads_database', \n schema_variable='amazon_ads_schema', \n default_database=target.database,\n default_schema='amazon_ads',\n default_variable='advertised_product_report',\n union_schema_variable='amazon_ads_union_schemas',\n union_database_variable='amazon_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='amazon_ads_sources',\n single_source_name='amazon_ads',\n single_table_name='advertised_product_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["amazon_ads", "advertised_product_report"], ["amazon_ads", "advertised_product_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.amazon_ads.amazon_ads.advertised_product_report"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/tmp/stg_amazon_ads__advertised_product_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: amazon_ads_advertised_product_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: amazon_ads_advertised_product_report_data\n\n\n select\n \"ad_group_id\",\n \"ad_id\",\n \"campaign_id\",\n \"date\",\n \"_fivetran_synced\",\n \"campaign_budget_amount\",\n \"campaign_budget_currency_code\",\n \"campaign_budget_type\",\n \"clicks\",\n \"cost\",\n \"impressions\",\n \"advertised_asin\",\n \"advertised_sku\"\n from \"postgres\".\"public\".\"amazon_ads_advertised_product_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__ad_group_level_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__ad_group_level_report_tmp", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/tmp/stg_amazon_ads__ad_group_level_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_amazon_ads__ad_group_level_report_tmp.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__ad_group_level_report_tmp", "fqn": ["amazon_ads", "staging", "tmp", "stg_amazon_ads__ad_group_level_report_tmp"], "alias": "stg_amazon_ads__ad_group_level_report_tmp", "checksum": {"name": "sha256", "checksum": "acb545136d6b6a77f3685fbebe4bf84ad29c0cf3b48037e0357c9b44c18dad9a"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708218.2047026, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__ad_group_level_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\n{% if var('amazon_ads_union_schemas', []) | length > 0 or var('amazon_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_group_level_report', \n database_variable='amazon_ads_database', \n schema_variable='amazon_ads_schema', \n default_database=target.database,\n default_schema='amazon_ads',\n default_variable='ad_group_level_report',\n union_schema_variable='amazon_ads_union_schemas',\n union_database_variable='amazon_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='amazon_ads_sources',\n single_source_name='amazon_ads',\n single_table_name='ad_group_level_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["amazon_ads", "ad_group_level_report"], ["amazon_ads", "ad_group_level_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.amazon_ads.amazon_ads.ad_group_level_report"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/tmp/stg_amazon_ads__ad_group_level_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: amazon_ads_ad_group_level_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: amazon_ads_ad_group_level_report_data\n\n\n select\n \"ad_group_id\",\n \"date\",\n \"_fivetran_synced\",\n \"campaign_bidding_strategy\",\n \"clicks\",\n \"cost\",\n \"impressions\"\n from \"postgres\".\"public\".\"amazon_ads_ad_group_level_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__portfolio_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__portfolio_history_tmp", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/tmp/stg_amazon_ads__portfolio_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_amazon_ads__portfolio_history_tmp.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__portfolio_history_tmp", "fqn": ["amazon_ads", "staging", "tmp", "stg_amazon_ads__portfolio_history_tmp"], "alias": "stg_amazon_ads__portfolio_history_tmp", "checksum": {"name": "sha256", "checksum": "6b7646b12996809d7f34b7ac42f76f4b8616a4e8feaad5f24e1d1b01c618c034"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708218.2152524, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__portfolio_history_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__amazon_ads_enabled','amazon_ads__portfolio_history_enabled'])) }}\n\n{% if var('amazon_ads_union_schemas', []) | length > 0 or var('amazon_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='portfolio_history', \n database_variable='amazon_ads_database', \n schema_variable='amazon_ads_schema', \n default_database=target.database,\n default_schema='amazon_ads',\n default_variable='portfolio_history',\n union_schema_variable='amazon_ads_union_schemas',\n union_database_variable='amazon_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='amazon_ads_sources',\n single_source_name='amazon_ads',\n single_table_name='portfolio_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["amazon_ads", "portfolio_history"], ["amazon_ads", "portfolio_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.amazon_ads.amazon_ads.portfolio_history"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/tmp/stg_amazon_ads__portfolio_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: amazon_ads_portfolio_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: amazon_ads_portfolio_history_data\n\n\n select\n \"id\",\n \"last_updated_date\",\n \"_fivetran_synced\",\n \"budget_amount\",\n \"budget_currency_code\",\n \"budget_end_date\",\n \"budget_policy\",\n \"budget_start_date\",\n \"creation_date\",\n \"in_budget\",\n \"name\",\n \"profile_id\",\n \"serving_status\",\n \"state\"\n from \"postgres\".\"public\".\"amazon_ads_portfolio_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.stg_amazon_ads__product_ad_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_amazon_ads__product_ad_history_tmp", "resource_type": "model", "package_name": "amazon_ads", "path": "staging/tmp/stg_amazon_ads__product_ad_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_amazon_ads__product_ad_history_tmp.sql", "unique_id": "model.amazon_ads.stg_amazon_ads__product_ad_history_tmp", "fqn": ["amazon_ads", "staging", "tmp", "stg_amazon_ads__product_ad_history_tmp"], "alias": "stg_amazon_ads__product_ad_history_tmp", "checksum": {"name": "sha256", "checksum": "1387de6d7f9a296cdda6ab62ea06544ec1cfd6e62e39ff4759534b76a97d6cef"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708218.2261918, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__product_ad_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\n{% if var('amazon_ads_union_schemas', []) | length > 0 or var('amazon_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='product_ad_history', \n database_variable='amazon_ads_database', \n schema_variable='amazon_ads_schema', \n default_database=target.database,\n default_schema='amazon_ads',\n default_variable='product_ad_history',\n union_schema_variable='amazon_ads_union_schemas',\n union_database_variable='amazon_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='amazon_ads_sources',\n single_source_name='amazon_ads',\n single_table_name='product_ad_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["amazon_ads", "product_ad_history"], ["amazon_ads", "product_ad_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.amazon_ads.amazon_ads.product_ad_history"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/tmp/stg_amazon_ads__product_ad_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: amazon_ads_product_ad_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: amazon_ads_product_ad_history_data\n\n\n select\n \"id\",\n \"last_updated_date\",\n \"_fivetran_synced\",\n \"ad_group_id\",\n \"asin\",\n \"campaign_id\",\n \"creation_date\",\n \"serving_status\",\n \"sku\",\n \"state\"\n from \"postgres\".\"public\".\"amazon_ads_product_ad_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.amazon_ads.int_amazon_ads__portfolio_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "int_amazon_ads__portfolio_history", "resource_type": "model", "package_name": "amazon_ads", "path": "intermediate/int_amazon_ads__portfolio_history.sql", "original_file_path": "models/intermediate/int_amazon_ads__portfolio_history.sql", "unique_id": "model.amazon_ads.int_amazon_ads__portfolio_history", "fqn": ["amazon_ads", "intermediate", "int_amazon_ads__portfolio_history"], "alias": "int_amazon_ads__portfolio_history", "checksum": {"name": "sha256", "checksum": "4adc8889e2f5adf01f24c7c5676b17c9dbb7877004cc9f2bcb1770ecf3f41ecf"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708218.2379713, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"int_amazon_ads__portfolio_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__amazon_ads_enabled', True)) }}\n\n{# This intermediate model creates a dummy portfolio table if the user does not use portfolios. \nIf they are using them, the normal portfolio_history will be used. #}\n\nwith portfolios as (\n select\n {% if var('amazon_ads__portfolio_history_enabled', True) %}\n *\n from {{ ref('stg_amazon_ads__portfolio_history') }}\n where is_most_recent_record = True\n {% else %}\n cast(null as {{ dbt.type_string() }}) as source_relation,\n {# uses the columns macro from the source package to populate column names #}\n {%- set columns = amazon_ads.get_portfolio_history_columns() -%}\n {% for column in columns %}\n {# set null for each column #}\n {%- if column['name'] == 'id' -%}\n cast(null as {{ dbt.type_string() }}) as portfolio_id\n {%- elif column['name'] == 'name' -%}\n cast(null as {{ dbt.type_string() }}) as portfolio_name\n {%- elif column['name'] == 'profile_id' -%}\n cast(null as {{ dbt.type_string() }}) as profile_id\n {%- else -%}\n cast(null as {{ column['datatype'] }}) as {{ column['name'] }}\n {%- endif -%}\n {# add comma if not the last column #}\n {%- if not loop.last -%} , {% endif -%}\n {% endfor %}\n {% endif %}\n)\n\nselect * \nfrom portfolios", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__portfolio_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": ["model.amazon_ads.stg_amazon_ads__portfolio_history"]}, "compiled_path": "target/compiled/amazon_ads/models/intermediate/int_amazon_ads__portfolio_history.sql", "compiled": true, "compiled_code": "\n\n\n\nwith portfolios as (\n select\n \n *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__portfolio_history\"\n where is_most_recent_record = True\n \n)\n\nselect * \nfrom portfolios", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.twitter_ads__promoted_tweet_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "twitter_ads__promoted_tweet_report", "resource_type": "model", "package_name": "twitter_ads", "path": "twitter_ads__promoted_tweet_report.sql", "original_file_path": "models/twitter_ads__promoted_tweet_report.sql", "unique_id": "model.twitter_ads.twitter_ads__promoted_tweet_report", "fqn": ["twitter_ads", "twitter_ads__promoted_tweet_report"], "alias": "twitter_ads__promoted_tweet_report", "checksum": {"name": "sha256", "checksum": "802120de116735b628336b7181c12ee82ad9900d5bff25cd5eb2fa6d7582ef21"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the account, campaign, line item (ad group), and promoted tweet level, within a placement in Twitter.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "The name of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_id": {"name": "line_item_id", "description": "The ID of the related line item (ad group).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_name": {"name": "line_item_name", "description": "The ID of the related line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "promoted_tweet_id": {"name": "promoted_tweet_id", "description": "The ID of the promoted tweet that the URL appeared in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tweet_id": {"name": "tweet_id", "description": "The ID of the tweet that the URL appeared in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tweet_name": {"name": "tweet_name", "description": "The name, if provided, of the tweet that the URL appeared in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "full_text": {"name": "full_text", "description": "The full text of the tweet that the URL appeared in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The currency all metrics for the account are set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the promoted tweet + URL on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the promoted tweet + URL on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend for the promoted tweet + URL on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend_micro": {"name": "spend_micro", "description": "The spend, in micros, for the tweet + URL on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The URL clicks for the promoted tweet + URL on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "approval_status": {"name": "approval_status", "description": "The approval status of the promoted tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The timestamp the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.created_at"]}, "is_deleted": {"name": "is_deleted", "description": "Whether the record has been deleted or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.deleted"]}, "promoted_tweet_status": {"name": "promoted_tweet_status", "description": "The status of the promoted tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "The status of the tweet's campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_status": {"name": "line_item_status", "description": "The status of the tweet's line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The timestamp the account was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.updated_at"]}, "language": {"name": "language", "description": "Two-letter language code of the tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions_sale_amount": {"name": "total_conversions_sale_amount", "description": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/twitter.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.2147036, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__promoted_tweet_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\nwith report as (\n\n select \n *,\n {# Let's sum up conversions into general fields for ease of use #}\n {{ var('twitter_ads__conversion_fields') | join(' + ') if var('twitter_ads__conversion_fields') else 0 }} as total_conversions,\n {{ var('twitter_ads__conversion_sale_amount_fields') | join(' + ') if var('twitter_ads__conversion_sale_amount_fields') else 0 }} as total_conversions_sale_amount\n\n from {{ ref('stg_twitter_ads__promoted_tweet_report') }}\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_twitter_ads__campaign_history') }}\n where is_latest_version\n),\n\naccounts as (\n\n select *\n from {{ ref('stg_twitter_ads__account_history') }}\n where is_latest_version\n),\n\nline_items as (\n\n select *\n from {{ ref('stg_twitter_ads__line_item_history') }}\n where is_latest_version\n),\n\npromoted_tweets as (\n\n select *\n from {{ ref('stg_twitter_ads__promoted_tweet_history') }}\n where is_latest_version\n),\n\ntweets as (\n\n select *\n from {{ ref('stg_twitter_ads__tweet') }}\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n line_items.line_item_id,\n line_items.name as line_item_name,\n report.promoted_tweet_id,\n promoted_tweets.tweet_id,\n tweets.name as tweet_name,\n tweets.full_text,\n promoted_tweets.is_deleted,\n promoted_tweets.entity_status as promoted_tweet_status,\n campaigns.entity_status as campaign_status,\n line_items.entity_status as line_item_status,\n tweets.language,\n campaigns.currency,\n promoted_tweets.approval_status,\n promoted_tweets.created_timestamp,\n promoted_tweets.updated_timestamp,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n {# Persist all of the customizable fields #}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='twitter_ads__promoted_tweet_report_passthrough_metrics') }}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_sale_amount_fields', transform='sum', coalesce_with=0, except_variable='twitter_ads__promoted_tweet_report_passthrough_metrics') }}\n {{ fivetran_utils.persist_pass_through_columns('twitter_ads__promoted_tweet_report_passthrough_metrics', transform='sum') }}\n\n from report \n left join promoted_tweets \n on report.promoted_tweet_id = promoted_tweets.promoted_tweet_id\n and report.source_relation = promoted_tweets.source_relation\n left join tweets\n on promoted_tweets.tweet_id = tweets.tweet_id\n and promoted_tweets.source_relation = tweets.source_relation\n left join line_items\n on promoted_tweets.line_item_id = line_items.line_item_id\n and promoted_tweets.source_relation = line_items.source_relation\n left join campaigns \n on line_items.campaign_id = campaigns.campaign_id\n and line_items.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n\n {{ dbt_utils.group_by(22) }}\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__promoted_tweet_report", "package": null, "version": null}, {"name": "stg_twitter_ads__campaign_history", "package": null, "version": null}, {"name": "stg_twitter_ads__account_history", "package": null, "version": null}, {"name": "stg_twitter_ads__line_item_history", "package": null, "version": null}, {"name": "stg_twitter_ads__promoted_tweet_history", "package": null, "version": null}, {"name": "stg_twitter_ads__tweet", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.twitter_ads_persist_pass_through_columns", "macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_report", "model.twitter_ads.stg_twitter_ads__campaign_history", "model.twitter_ads.stg_twitter_ads__account_history", "model.twitter_ads.stg_twitter_ads__line_item_history", "model.twitter_ads.stg_twitter_ads__promoted_tweet_history", "model.twitter_ads.stg_twitter_ads__tweet"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter_ads__promoted_tweet_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select \n *,\n \n conversion_purchases_metric + conversion_custom_metric as total_conversions,\n conversion_purchases_sale_amount + conversion_custom_sale_amount as total_conversions_sale_amount\n\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_report\"\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_history\"\n where is_latest_version\n),\n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__account_history\"\n where is_latest_version\n),\n\nline_items as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_history\"\n where is_latest_version\n),\n\npromoted_tweets as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_history\"\n where is_latest_version\n),\n\ntweets as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__tweet\"\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n line_items.line_item_id,\n line_items.name as line_item_name,\n report.promoted_tweet_id,\n promoted_tweets.tweet_id,\n tweets.name as tweet_name,\n tweets.full_text,\n promoted_tweets.is_deleted,\n promoted_tweets.entity_status as promoted_tweet_status,\n campaigns.entity_status as campaign_status,\n line_items.entity_status as line_item_status,\n tweets.language,\n campaigns.currency,\n promoted_tweets.approval_status,\n promoted_tweets.created_timestamp,\n promoted_tweets.updated_timestamp,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n \n \n\n\n\n \n \n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_metric, 0)) as conversion_purchases_metric\n \n \n \n , sum(coalesce(conversion_custom_metric, 0)) as conversion_custom_metric\n \n \n\n\n\n \n\n\n\n \n \n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_sale_amount, 0)) as conversion_purchases_sale_amount\n \n \n \n , sum(coalesce(conversion_custom_sale_amount, 0)) as conversion_custom_sale_amount\n \n \n\n\n\n \n\n\n\n\n\n from report \n left join promoted_tweets \n on report.promoted_tweet_id = promoted_tweets.promoted_tweet_id\n and report.source_relation = promoted_tweets.source_relation\n left join tweets\n on promoted_tweets.tweet_id = tweets.tweet_id\n and promoted_tweets.source_relation = tweets.source_relation\n left join line_items\n on promoted_tweets.line_item_id = line_items.line_item_id\n and promoted_tweets.source_relation = line_items.source_relation\n left join campaigns \n on line_items.campaign_id = campaigns.campaign_id\n and line_items.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.twitter_ads__campaign_region_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "twitter_ads__campaign_region_report", "resource_type": "model", "package_name": "twitter_ads", "path": "twitter_ads__campaign_region_report.sql", "original_file_path": "models/twitter_ads__campaign_region_report.sql", "unique_id": "model.twitter_ads.twitter_ads__campaign_region_report", "fqn": ["twitter_ads", "twitter_ads__campaign_region_report"], "alias": "twitter_ads__campaign_region_report", "checksum": {"name": "sha256", "checksum": "5f324ec1e35b16869876699808bd8666b9e07ada850bd88a940b6757665a21cf"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the account and campaign level, within a placement in Twitter.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country": {"name": "country", "description": "Long-form name of the country being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.country"]}, "region": {"name": "region", "description": "Long-form name of the geopgraphic region being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.region"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks on that date. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions on that date. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend on that date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend_micro": {"name": "spend_micro", "description": "The amount of spend, in micros, on that date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The number of URL clicks on that date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "The name of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_created_timestamp": {"name": "campaign_created_timestamp", "description": "The timestamp the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.created_at"]}, "campaign_currency": {"name": "campaign_currency", "description": "The currency all metrics for the account are set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_campaign_deleted": {"name": "is_campaign_deleted", "description": "Whether the record has been deleted or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.deleted"]}, "campaign_end_timestamp": {"name": "campaign_end_timestamp", "description": "The time the campaign will end", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "The status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_frequency_cap": {"name": "campaign_frequency_cap", "description": "The maximum number of times an ad could be delivered to a user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_campaign_servable": {"name": "is_campaign_servable", "description": "Whether the campaign is in a state to be actively served to users.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_campaign_standard_delivery": {"name": "is_campaign_standard_delivery", "description": "Whether standard delivery is enabled (vs accelerated delivery).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_start_timestamp": {"name": "campaign_start_timestamp", "description": "The time the campaign will start.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_updated_timestamp": {"name": "campaign_updated_timestamp", "description": "The timestamp the account was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.updated_at"]}, "campaign_funding_instrument_id": {"name": "campaign_funding_instrument_id", "description": "Reference to the funding instrument.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_daily_budget_amount": {"name": "campaign_daily_budget_amount", "description": "The daily budget amount to be allocated to the campaign. The currency associated with the specified funding instrument will be used.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_total_budget_amount": {"name": "campaign_total_budget_amount", "description": "The total budget amount to be allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions_sale_amount": {"name": "total_conversions_sale_amount", "description": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/twitter.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.2257175, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_region_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True) and var('twitter_ads__using_campaign_regions_report', False)) }}\n\nwith report as (\n\n select \n *,\n {# Let's sum up conversions into general fields for ease of use #}\n {{ var('twitter_ads__conversion_fields') | join(' + ') if var('twitter_ads__conversion_fields') else 0 }} as total_conversions,\n {{ var('twitter_ads__conversion_sale_amount_fields') | join(' + ') if var('twitter_ads__conversion_sale_amount_fields') else 0 }} as total_conversions_sale_amount\n\n from {{ ref('stg_twitter_ads__campaign_regions_report') }}\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_twitter_ads__campaign_history') }}\n where is_latest_version\n),\n\naccounts as (\n\n select *\n from {{ ref('stg_twitter_ads__account_history') }}\n where is_latest_version\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.region,\n report.country,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n report.campaign_id,\n campaigns.campaign_name,\n campaigns.is_deleted as is_campaign_deleted,\n campaigns.entity_status as campaign_status,\n campaigns.currency as campaign_currency,\n campaigns.is_servable as is_campaign_servable,\n campaigns.is_standard_delivery as is_campaign_standard_delivery,\n campaigns.frequency_cap as campaign_frequency_cap,\n campaigns.start_timestamp as campaign_start_timestamp,\n campaigns.end_timestamp as campaign_end_timestamp,\n campaigns.created_timestamp as campaign_created_timestamp,\n campaigns.updated_timestamp as campaign_updated_timestamp,\n campaigns.funding_instrument_id as campaign_funding_instrument_id,\n campaigns.daily_budget_amount as campaign_daily_budget_amount,\n campaigns.total_budget_amount as campaign_total_budget_amount,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n {# Persist all of the customizable fields #}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_fields', transform='sum', coalesce_with=0) }}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_sale_amount_fields', transform='sum', coalesce_with=0) }}\n {{ fivetran_utils.persist_pass_through_columns('twitter_ads__campaign_regions_report_passthrough_metrics', transform='sum') }}\n\n from report \n left join campaigns \n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n\n {{ dbt_utils.group_by(22) }}\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_regions_report", "package": null, "version": null}, {"name": "stg_twitter_ads__campaign_history", "package": null, "version": null}, {"name": "stg_twitter_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.twitter_ads_persist_pass_through_columns", "macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_regions_report", "model.twitter_ads.stg_twitter_ads__campaign_history", "model.twitter_ads.stg_twitter_ads__account_history"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter_ads__campaign_region_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select \n *,\n \n conversion_purchases_metric + conversion_custom_metric as total_conversions,\n conversion_purchases_sale_amount + conversion_custom_sale_amount as total_conversions_sale_amount\n\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_regions_report\"\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_history\"\n where is_latest_version\n),\n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__account_history\"\n where is_latest_version\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.region,\n report.country,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n report.campaign_id,\n campaigns.campaign_name,\n campaigns.is_deleted as is_campaign_deleted,\n campaigns.entity_status as campaign_status,\n campaigns.currency as campaign_currency,\n campaigns.is_servable as is_campaign_servable,\n campaigns.is_standard_delivery as is_campaign_standard_delivery,\n campaigns.frequency_cap as campaign_frequency_cap,\n campaigns.start_timestamp as campaign_start_timestamp,\n campaigns.end_timestamp as campaign_end_timestamp,\n campaigns.created_timestamp as campaign_created_timestamp,\n campaigns.updated_timestamp as campaign_updated_timestamp,\n campaigns.funding_instrument_id as campaign_funding_instrument_id,\n campaigns.daily_budget_amount as campaign_daily_budget_amount,\n campaigns.total_budget_amount as campaign_total_budget_amount,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n \n \n\n\n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_metric, 0)) as conversion_purchases_metric\n \n \n \n , sum(coalesce(conversion_custom_metric, 0)) as conversion_custom_metric\n \n \n\n\n\n \n\n\n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_sale_amount, 0)) as conversion_purchases_sale_amount\n \n \n \n , sum(coalesce(conversion_custom_sale_amount, 0)) as conversion_custom_sale_amount\n \n \n\n\n\n \n\n\n\n\n\n from report \n left join campaigns \n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.twitter_ads__account_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "twitter_ads__account_report", "resource_type": "model", "package_name": "twitter_ads", "path": "twitter_ads__account_report.sql", "original_file_path": "models/twitter_ads__account_report.sql", "unique_id": "model.twitter_ads.twitter_ads__account_report", "fqn": ["twitter_ads", "twitter_ads__account_report"], "alias": "twitter_ads__account_report", "checksum": {"name": "sha256", "checksum": "5cbe68fd857b25e8022c923542748da6bdb26b0c8d9ae39ab62a31c1961fc4c6"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the account level, within a placement in Twitter.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "spend_micro": {"name": "spend_micro", "description": "The spend (in micros) for the account on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend for the account on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for th account on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the account on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The url clicks for the account on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "approval_status": {"name": "approval_status", "description": "The approval status of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "business_id": {"name": "business_id", "description": "The ID of the related business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "business_name": {"name": "business_name", "description": "The name of the related business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The timestamp the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.created_at"]}, "is_deleted": {"name": "is_deleted", "description": "Whether the record has been deleted or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.deleted"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "Name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "industry_type": {"name": "industry_type", "description": "The industry of the accounts.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone": {"name": "timezone", "description": "The timezone the account is set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone_switched_timestamp": {"name": "timezone_switched_timestamp", "description": "The timestamp the account's timezone was last changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The timestamp the account was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.updated_at"]}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions_sale_amount": {"name": "total_conversions_sale_amount", "description": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/twitter.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.208982, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__account_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\nwith accounts as (\n\n select *\n from {{ ref('stg_twitter_ads__account_history') }}\n where is_latest_version\n),\n\npromoted_tweet_report as (\n \n select \n *,\n {# Let's sum up conversions into general fields for ease of use #}\n {{ var('twitter_ads__conversion_fields') | join(' + ') if var('twitter_ads__conversion_fields') else 0 }} as total_conversions,\n {{ var('twitter_ads__conversion_sale_amount_fields') | join(' + ') if var('twitter_ads__conversion_sale_amount_fields') else 0 }} as total_conversions_sale_amount\n\n from {{ ref('stg_twitter_ads__promoted_tweet_report') }}\n),\n\nrollup_report as (\n\n select \n source_relation,\n date_day,\n account_id,\n placement,\n sum(clicks) as clicks, \n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(spend_micro) as spend_micro,\n sum(url_clicks) as url_clicks,\n sum(total_conversions) as total_conversions,\n sum(total_conversions_sale_amount) as total_conversions_sale_amount\n\n {# Persist all of the customizable fields #}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='twitter_ads__promoted_tweet_report_passthrough_metrics') }}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_sale_amount_fields', transform='sum', coalesce_with=0, except_variable='twitter_ads__promoted_tweet_report_passthrough_metrics') }}\n {{ fivetran_utils.persist_pass_through_columns('twitter_ads__promoted_tweet_report_passthrough_metrics', transform='sum') }}\n \n from promoted_tweet_report\n {{ dbt_utils.group_by(4) }}\n\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n accounts.is_deleted,\n accounts.timezone,\n accounts.industry_type,\n accounts.approval_status,\n accounts.business_name,\n accounts.business_id,\n accounts.created_timestamp,\n accounts.updated_timestamp,\n accounts.timezone_switched_timestamp,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n {# Persist all of the customizable fields #}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='twitter_ads__promoted_tweet_report_passthrough_metrics') }}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_sale_amount_fields', transform='sum', coalesce_with=0, except_variable='twitter_ads__promoted_tweet_report_passthrough_metrics') }}\n {{ fivetran_utils.persist_pass_through_columns('twitter_ads__promoted_tweet_report_passthrough_metrics', transform='sum') }}\n\n from rollup_report as report\n left join accounts \n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n\n {{ dbt_utils.group_by(14) }}\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__account_history", "package": null, "version": null}, {"name": "stg_twitter_ads__promoted_tweet_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.twitter_ads_persist_pass_through_columns", "macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.twitter_ads.stg_twitter_ads__account_history", "model.twitter_ads.stg_twitter_ads__promoted_tweet_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter_ads__account_report.sql", "compiled": true, "compiled_code": "\n\nwith accounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__account_history\"\n where is_latest_version\n),\n\npromoted_tweet_report as (\n \n select \n *,\n \n conversion_purchases_metric + conversion_custom_metric as total_conversions,\n conversion_purchases_sale_amount + conversion_custom_sale_amount as total_conversions_sale_amount\n\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_report\"\n),\n\nrollup_report as (\n\n select \n source_relation,\n date_day,\n account_id,\n placement,\n sum(clicks) as clicks, \n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(spend_micro) as spend_micro,\n sum(url_clicks) as url_clicks,\n sum(total_conversions) as total_conversions,\n sum(total_conversions_sale_amount) as total_conversions_sale_amount\n\n \n \n\n\n\n \n \n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_metric, 0)) as conversion_purchases_metric\n \n \n \n , sum(coalesce(conversion_custom_metric, 0)) as conversion_custom_metric\n \n \n\n\n\n \n\n\n\n \n \n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_sale_amount, 0)) as conversion_purchases_sale_amount\n \n \n \n , sum(coalesce(conversion_custom_sale_amount, 0)) as conversion_custom_sale_amount\n \n \n\n\n\n \n\n\n\n\n \n from promoted_tweet_report\n group by 1,2,3,4\n\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n accounts.is_deleted,\n accounts.timezone,\n accounts.industry_type,\n accounts.approval_status,\n accounts.business_name,\n accounts.business_id,\n accounts.created_timestamp,\n accounts.updated_timestamp,\n accounts.timezone_switched_timestamp,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n \n \n\n\n\n \n \n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_metric, 0)) as conversion_purchases_metric\n \n \n \n , sum(coalesce(conversion_custom_metric, 0)) as conversion_custom_metric\n \n \n\n\n\n \n\n\n\n \n \n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_sale_amount, 0)) as conversion_purchases_sale_amount\n \n \n \n , sum(coalesce(conversion_custom_sale_amount, 0)) as conversion_custom_sale_amount\n \n \n\n\n\n \n\n\n\n\n\n from rollup_report as report\n left join accounts \n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.twitter_ads__campaign_country_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "twitter_ads__campaign_country_report", "resource_type": "model", "package_name": "twitter_ads", "path": "twitter_ads__campaign_country_report.sql", "original_file_path": "models/twitter_ads__campaign_country_report.sql", "unique_id": "model.twitter_ads.twitter_ads__campaign_country_report", "fqn": ["twitter_ads", "twitter_ads__campaign_country_report"], "alias": "twitter_ads__campaign_country_report", "checksum": {"name": "sha256", "checksum": "8e653901f4ed7ea5c76734f30ba2bba6750afa61f84fc699c0597552a6e14f4c"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the account and campaign level, within a placement in Twitter.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country": {"name": "country", "description": "Long-form name of the country being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.country"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks on that date. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions on that date. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend on that date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend_micro": {"name": "spend_micro", "description": "The amount of spend, in micros, on that date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The number of URL clicks on that date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "The name of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_created_timestamp": {"name": "campaign_created_timestamp", "description": "The timestamp the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.created_at"]}, "campaign_currency": {"name": "campaign_currency", "description": "The currency all metrics for the account are set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_campaign_deleted": {"name": "is_campaign_deleted", "description": "Whether the record has been deleted or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.deleted"]}, "campaign_end_timestamp": {"name": "campaign_end_timestamp", "description": "The time the campaign will end", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "The status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_frequency_cap": {"name": "campaign_frequency_cap", "description": "The maximum number of times an ad could be delivered to a user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_campaign_servable": {"name": "is_campaign_servable", "description": "Whether the campaign is in a state to be actively served to users.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_campaign_standard_delivery": {"name": "is_campaign_standard_delivery", "description": "Whether standard delivery is enabled (vs accelerated delivery).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_start_timestamp": {"name": "campaign_start_timestamp", "description": "The time the campaign will start.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_updated_timestamp": {"name": "campaign_updated_timestamp", "description": "The timestamp the account was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.updated_at"]}, "campaign_funding_instrument_id": {"name": "campaign_funding_instrument_id", "description": "Reference to the funding instrument.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_daily_budget_amount": {"name": "campaign_daily_budget_amount", "description": "The daily budget amount to be allocated to the campaign. The currency associated with the specified funding instrument will be used.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_total_budget_amount": {"name": "campaign_total_budget_amount", "description": "The total budget amount to be allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions_sale_amount": {"name": "total_conversions_sale_amount", "description": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/twitter.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.2236028, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_country_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True) and var('twitter_ads__using_campaign_locations_report', False)) }}\n\nwith report as (\n\n select \n *,\n {# Let's sum up conversions into general fields for ease of use #}\n {{ var('twitter_ads__conversion_fields') | join(' + ') if var('twitter_ads__conversion_fields') else 0 }} as total_conversions,\n {{ var('twitter_ads__conversion_sale_amount_fields') | join(' + ') if var('twitter_ads__conversion_sale_amount_fields') else 0 }} as total_conversions_sale_amount\n\n from {{ ref('stg_twitter_ads__campaign_locations_report') }}\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_twitter_ads__campaign_history') }}\n where is_latest_version\n),\n\naccounts as (\n\n select *\n from {{ ref('stg_twitter_ads__account_history') }}\n where is_latest_version\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.country,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n report.campaign_id,\n campaigns.campaign_name,\n campaigns.is_deleted as is_campaign_deleted,\n campaigns.entity_status as campaign_status,\n campaigns.currency as campaign_currency,\n campaigns.is_servable as is_campaign_servable,\n campaigns.is_standard_delivery as is_campaign_standard_delivery,\n campaigns.frequency_cap as campaign_frequency_cap,\n campaigns.start_timestamp as campaign_start_timestamp,\n campaigns.end_timestamp as campaign_end_timestamp,\n campaigns.created_timestamp as campaign_created_timestamp,\n campaigns.updated_timestamp as campaign_updated_timestamp,\n campaigns.funding_instrument_id as campaign_funding_instrument_id,\n campaigns.daily_budget_amount as campaign_daily_budget_amount,\n campaigns.total_budget_amount as campaign_total_budget_amount,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n {# Persist all of the customizable fields #}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_fields', transform='sum', coalesce_with=0) }}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_sale_amount_fields', transform='sum', coalesce_with=0) }}\n {{ fivetran_utils.persist_pass_through_columns('twitter_ads__campaign_locations_report_passthrough_metrics', transform='sum') }}\n\n from report \n left join campaigns \n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n\n {{ dbt_utils.group_by(21) }}\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_locations_report", "package": null, "version": null}, {"name": "stg_twitter_ads__campaign_history", "package": null, "version": null}, {"name": "stg_twitter_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.twitter_ads_persist_pass_through_columns", "macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_locations_report", "model.twitter_ads.stg_twitter_ads__campaign_history", "model.twitter_ads.stg_twitter_ads__account_history"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter_ads__campaign_country_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select \n *,\n \n conversion_purchases_metric + conversion_custom_metric as total_conversions,\n conversion_purchases_sale_amount + conversion_custom_sale_amount as total_conversions_sale_amount\n\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_locations_report\"\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_history\"\n where is_latest_version\n),\n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__account_history\"\n where is_latest_version\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.country,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n report.campaign_id,\n campaigns.campaign_name,\n campaigns.is_deleted as is_campaign_deleted,\n campaigns.entity_status as campaign_status,\n campaigns.currency as campaign_currency,\n campaigns.is_servable as is_campaign_servable,\n campaigns.is_standard_delivery as is_campaign_standard_delivery,\n campaigns.frequency_cap as campaign_frequency_cap,\n campaigns.start_timestamp as campaign_start_timestamp,\n campaigns.end_timestamp as campaign_end_timestamp,\n campaigns.created_timestamp as campaign_created_timestamp,\n campaigns.updated_timestamp as campaign_updated_timestamp,\n campaigns.funding_instrument_id as campaign_funding_instrument_id,\n campaigns.daily_budget_amount as campaign_daily_budget_amount,\n campaigns.total_budget_amount as campaign_total_budget_amount,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n \n \n\n\n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_metric, 0)) as conversion_purchases_metric\n \n \n \n , sum(coalesce(conversion_custom_metric, 0)) as conversion_custom_metric\n \n \n\n\n\n \n\n\n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_sale_amount, 0)) as conversion_purchases_sale_amount\n \n \n \n , sum(coalesce(conversion_custom_sale_amount, 0)) as conversion_custom_sale_amount\n \n \n\n\n\n \n\n\n\n\n\n from report \n left join campaigns \n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.twitter_ads__url_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "twitter_ads__url_report", "resource_type": "model", "package_name": "twitter_ads", "path": "twitter_ads__url_report.sql", "original_file_path": "models/twitter_ads__url_report.sql", "unique_id": "model.twitter_ads.twitter_ads__url_report", "fqn": ["twitter_ads", "twitter_ads__url_report"], "alias": "twitter_ads__url_report", "checksum": {"name": "sha256", "checksum": "cc59a82d5690a3359dc4223b4a07254449ccb6a5d1e16191bf4d9a9534edabfd"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the account, campaign, line item (ad group), promoted tweet, and url level, within a placement in Twitter.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "The name of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_id": {"name": "line_item_id", "description": "The ID of the related line item (ad group).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_name": {"name": "line_item_name", "description": "The ID of the related line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "promoted_tweet_id": {"name": "promoted_tweet_id", "description": "The ID of the promoted tweet that the URL appeared in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tweet_id": {"name": "tweet_id", "description": "The ID of the tweet that the URL appeared in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tweet_name": {"name": "tweet_name", "description": "The name, if provided, of the tweet that the URL appeared in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tweet_full_text": {"name": "tweet_full_text", "description": "The full text of the tweet that the URL appeared in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_host": {"name": "url_host", "description": "The URL host of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_path": {"name": "url_path", "description": "The URL path of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_source": {"name": "utm_source", "description": "The utm_source parameter of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_medium": {"name": "utm_medium", "description": "The utm_medium parameter of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_campaign": {"name": "utm_campaign", "description": "The utm_campaign parameter of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_content": {"name": "utm_content", "description": "The utm_content parameter of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_term": {"name": "utm_term", "description": "The utm_term parameter of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "display_url": {"name": "display_url", "description": "The URL as it will be displayed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "expanded_url": {"name": "expanded_url", "description": "The fully expanded URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The currency all metrics for the account are set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the promoted tweet + URL on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the promoted tweet + URL on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend for the promoted tweet + URL on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend_micro": {"name": "spend_micro", "description": "The spend, in micros, for the tweet + URL on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The URL clicks for the promoted tweet + URL on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions_sale_amount": {"name": "total_conversions_sale_amount", "description": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/twitter.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.2176695, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__url_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\nwith report as (\n\n select \n *,\n {# Let's sum up conversions into general fields for ease of use #}\n {{ var('twitter_ads__conversion_fields') | join(' + ') if var('twitter_ads__conversion_fields') else 0 }} as total_conversions,\n {{ var('twitter_ads__conversion_sale_amount_fields') | join(' + ') if var('twitter_ads__conversion_sale_amount_fields') else 0 }} as total_conversions_sale_amount\n\n from {{ ref('stg_twitter_ads__promoted_tweet_report') }}\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_twitter_ads__campaign_history') }}\n where is_latest_version\n),\n\naccounts as (\n\n select *\n from {{ ref('stg_twitter_ads__account_history') }}\n where is_latest_version\n),\n\nline_items as (\n\n select *\n from {{ ref('stg_twitter_ads__line_item_history') }}\n where is_latest_version\n),\n\npromoted_tweets as (\n\n select *\n from {{ ref('stg_twitter_ads__promoted_tweet_history') }}\n where is_latest_version\n),\n\ntweets as (\n\n select *\n from {{ ref('stg_twitter_ads__tweet') }}\n),\n\ntweet_url as (\n\n select *\n from {{ ref('stg_twitter_ads__tweet_url') }}\n where index = 0\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n line_items.line_item_id,\n line_items.name as line_item_name,\n report.promoted_tweet_id,\n promoted_tweets.tweet_id,\n tweets.name as tweet_name,\n tweets.full_text as tweet_full_text,\n tweet_url.base_url,\n tweet_url.url_host,\n tweet_url.url_path,\n tweet_url.utm_source,\n tweet_url.utm_medium,\n tweet_url.utm_campaign,\n tweet_url.utm_content,\n tweet_url.utm_term,\n tweet_url.expanded_url,\n tweet_url.display_url,\n campaigns.currency,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n {# Persist all of the customizable fields #}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='twitter_ads__promoted_tweet_report_passthrough_metrics') }}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_sale_amount_fields', transform='sum', coalesce_with=0, except_variable='twitter_ads__promoted_tweet_report_passthrough_metrics') }}\n {{ fivetran_utils.persist_pass_through_columns('twitter_ads__promoted_tweet_report_passthrough_metrics', transform='sum') }}\n\n from report \n left join promoted_tweets \n on report.promoted_tweet_id = promoted_tweets.promoted_tweet_id\n and report.source_relation = promoted_tweets.source_relation\n left join tweet_url \n on promoted_tweets.tweet_id = tweet_url.tweet_id\n and promoted_tweets.source_relation = tweet_url.source_relation\n left join tweets\n on promoted_tweets.tweet_id = tweets.tweet_id\n and promoted_tweets.source_relation = tweets.source_relation\n left join line_items\n on promoted_tweets.line_item_id = line_items.line_item_id\n and promoted_tweets.source_relation = line_items.source_relation\n left join campaigns \n on line_items.campaign_id = campaigns.campaign_id\n and line_items.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n \n {% if var('ad_reporting__url_report__using_null_filter', True) %}\n where tweet_url.expanded_url is not null\n {% endif %}\n\n {{ dbt_utils.group_by(24) }}\n\n \n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__promoted_tweet_report", "package": null, "version": null}, {"name": "stg_twitter_ads__campaign_history", "package": null, "version": null}, {"name": "stg_twitter_ads__account_history", "package": null, "version": null}, {"name": "stg_twitter_ads__line_item_history", "package": null, "version": null}, {"name": "stg_twitter_ads__promoted_tweet_history", "package": null, "version": null}, {"name": "stg_twitter_ads__tweet", "package": null, "version": null}, {"name": "stg_twitter_ads__tweet_url", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.twitter_ads_persist_pass_through_columns", "macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_report", "model.twitter_ads.stg_twitter_ads__campaign_history", "model.twitter_ads.stg_twitter_ads__account_history", "model.twitter_ads.stg_twitter_ads__line_item_history", "model.twitter_ads.stg_twitter_ads__promoted_tweet_history", "model.twitter_ads.stg_twitter_ads__tweet", "model.twitter_ads.stg_twitter_ads__tweet_url"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter_ads__url_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select \n *,\n \n conversion_purchases_metric + conversion_custom_metric as total_conversions,\n conversion_purchases_sale_amount + conversion_custom_sale_amount as total_conversions_sale_amount\n\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_report\"\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_history\"\n where is_latest_version\n),\n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__account_history\"\n where is_latest_version\n),\n\nline_items as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_history\"\n where is_latest_version\n),\n\npromoted_tweets as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_history\"\n where is_latest_version\n),\n\ntweets as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__tweet\"\n),\n\ntweet_url as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__tweet_url\"\n where index = 0\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n line_items.line_item_id,\n line_items.name as line_item_name,\n report.promoted_tweet_id,\n promoted_tweets.tweet_id,\n tweets.name as tweet_name,\n tweets.full_text as tweet_full_text,\n tweet_url.base_url,\n tweet_url.url_host,\n tweet_url.url_path,\n tweet_url.utm_source,\n tweet_url.utm_medium,\n tweet_url.utm_campaign,\n tweet_url.utm_content,\n tweet_url.utm_term,\n tweet_url.expanded_url,\n tweet_url.display_url,\n campaigns.currency,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n \n \n\n\n\n \n \n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_metric, 0)) as conversion_purchases_metric\n \n \n \n , sum(coalesce(conversion_custom_metric, 0)) as conversion_custom_metric\n \n \n\n\n\n \n\n\n\n \n \n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_sale_amount, 0)) as conversion_purchases_sale_amount\n \n \n \n , sum(coalesce(conversion_custom_sale_amount, 0)) as conversion_custom_sale_amount\n \n \n\n\n\n \n\n\n\n\n\n from report \n left join promoted_tweets \n on report.promoted_tweet_id = promoted_tweets.promoted_tweet_id\n and report.source_relation = promoted_tweets.source_relation\n left join tweet_url \n on promoted_tweets.tweet_id = tweet_url.tweet_id\n and promoted_tweets.source_relation = tweet_url.source_relation\n left join tweets\n on promoted_tweets.tweet_id = tweets.tweet_id\n and promoted_tweets.source_relation = tweets.source_relation\n left join line_items\n on promoted_tweets.line_item_id = line_items.line_item_id\n and promoted_tweets.source_relation = line_items.source_relation\n left join campaigns \n on line_items.campaign_id = campaigns.campaign_id\n and line_items.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n \n \n where tweet_url.expanded_url is not null\n \n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24\n\n \n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.twitter_ads__line_item_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "twitter_ads__line_item_report", "resource_type": "model", "package_name": "twitter_ads", "path": "twitter_ads__line_item_report.sql", "original_file_path": "models/twitter_ads__line_item_report.sql", "unique_id": "model.twitter_ads.twitter_ads__line_item_report", "fqn": ["twitter_ads", "twitter_ads__line_item_report"], "alias": "twitter_ads__line_item_report", "checksum": {"name": "sha256", "checksum": "cdde5ad082dcf2e5848646fbad87c8efb5540f8a5db0f61e95c7dba5aab28eb7"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the account, campaign, and line item (ad group) level, within a placement in Twitter.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the line item's campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the line item's campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks on that date. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions on that date. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_id": {"name": "line_item_id", "description": "The ID of the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_name": {"name": "line_item_name", "description": "The name of the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend on that date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend_micro": {"name": "spend_micro", "description": "The amount of spend, in micros, on that date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The number of URL clicks on that date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "The name of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_domain": {"name": "advertiser_domain", "description": "The website domain for this advertiser, without the protocol specification.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_user_id": {"name": "advertiser_user_id", "description": "The Twitter user identifier for the handle promoting the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_type": {"name": "bid_type", "description": "The bidding mechanism.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_unit": {"name": "bid_unit", "description": "The bid unit for this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "charge_by": {"name": "charge_by", "description": "The unit to charge this line item by.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The timestamp the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.created_at"]}, "creative_source": {"name": "creative_source", "description": "The source of the creatives for the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The currency in which metrics will be reported.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_deleted": {"name": "is_deleted", "description": "Whether the record has been deleted or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.deleted"]}, "end_timestamp": {"name": "end_timestamp", "description": "The timestamp at which the line item will stop being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_status": {"name": "line_item_status", "description": "The status of the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "The status of the line item's related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective": {"name": "objective", "description": "The campaign objective for this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "optimization": {"name": "optimization", "description": "The optimization setting to use with this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "primary_web_event_tag": {"name": "primary_web_event_tag", "description": "The identifier of the primary web event tag. Allows more accurate tracking of engagements for the campaign pertaining to this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "product_type": {"name": "product_type", "description": "The type of promoted product that this line item will contain.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_timestamp": {"name": "start_timestamp", "description": "The timestamp at which the line item will start being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The timestamp the account was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.updated_at"]}, "bid_amount": {"name": "bid_amount", "description": "The bid amount to be associated with this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_budget_amount": {"name": "total_budget_amount", "description": "The total budget amount to be allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "target_cpa": {"name": "target_cpa", "description": "The target cost per acquisition for the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions_sale_amount": {"name": "total_conversions_sale_amount", "description": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/twitter.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.205449, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__line_item_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\nwith report as (\n\n select \n *,\n {# Let's sum up conversions into general fields for ease of use #}\n {{ var('twitter_ads__conversion_fields') | join(' + ') if var('twitter_ads__conversion_fields') else 0 }} as total_conversions,\n {{ var('twitter_ads__conversion_sale_amount_fields') | join(' + ') if var('twitter_ads__conversion_sale_amount_fields') else 0 }} as total_conversions_sale_amount\n\n from {{ ref('stg_twitter_ads__line_item_report') }}\n),\n\nline_items as (\n\n select *\n from {{ ref('stg_twitter_ads__line_item_history') }}\n where is_latest_version\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_twitter_ads__campaign_history') }}\n where is_latest_version\n),\n\naccounts as (\n\n select *\n from {{ ref('stg_twitter_ads__account_history') }}\n where is_latest_version\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n line_items.campaign_id,\n campaigns.campaign_name,\n report.line_item_id,\n line_items.name as line_item_name,\n line_items.is_deleted,\n line_items.entity_status as line_item_status,\n campaigns.entity_status as campaign_status,\n line_items.currency,\n line_items.advertiser_domain,\n line_items.advertiser_user_id,\n line_items.bid_type,\n line_items.bid_unit,\n line_items.charge_by,\n line_items.objective,\n line_items.optimization,\n line_items.product_type,\n line_items.primary_web_event_tag,\n line_items.creative_source,\n line_items.start_timestamp,\n line_items.end_timestamp,\n line_items.created_timestamp,\n line_items.updated_timestamp,\n line_items.target_cpa,\n line_items.total_budget_amount,\n line_items.bid_amount,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n {# Persist all of the customizable fields #}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='twitter_ads__line_item_report_passthrough_metrics') }}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_sale_amount_fields', transform='sum', coalesce_with=0, except_variable='twitter_ads__line_item_report_passthrough_metrics') }}\n {{ fivetran_utils.persist_pass_through_columns('twitter_ads__line_item_report_passthrough_metrics', transform='sum')}}\n\n from report \n left join line_items\n on report.line_item_id = line_items.line_item_id\n and report.source_relation = line_items.source_relation\n left join campaigns \n on line_items.campaign_id = campaigns.campaign_id\n and line_items.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n\n {{ dbt_utils.group_by(30) }}\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__line_item_report", "package": null, "version": null}, {"name": "stg_twitter_ads__line_item_history", "package": null, "version": null}, {"name": "stg_twitter_ads__campaign_history", "package": null, "version": null}, {"name": "stg_twitter_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.twitter_ads_persist_pass_through_columns", "macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.twitter_ads.stg_twitter_ads__line_item_report", "model.twitter_ads.stg_twitter_ads__line_item_history", "model.twitter_ads.stg_twitter_ads__campaign_history", "model.twitter_ads.stg_twitter_ads__account_history"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter_ads__line_item_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select \n *,\n \n conversion_purchases_metric + conversion_custom_metric as total_conversions,\n conversion_purchases_sale_amount + conversion_custom_sale_amount as total_conversions_sale_amount\n\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_report\"\n),\n\nline_items as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_history\"\n where is_latest_version\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_history\"\n where is_latest_version\n),\n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__account_history\"\n where is_latest_version\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n line_items.campaign_id,\n campaigns.campaign_name,\n report.line_item_id,\n line_items.name as line_item_name,\n line_items.is_deleted,\n line_items.entity_status as line_item_status,\n campaigns.entity_status as campaign_status,\n line_items.currency,\n line_items.advertiser_domain,\n line_items.advertiser_user_id,\n line_items.bid_type,\n line_items.bid_unit,\n line_items.charge_by,\n line_items.objective,\n line_items.optimization,\n line_items.product_type,\n line_items.primary_web_event_tag,\n line_items.creative_source,\n line_items.start_timestamp,\n line_items.end_timestamp,\n line_items.created_timestamp,\n line_items.updated_timestamp,\n line_items.target_cpa,\n line_items.total_budget_amount,\n line_items.bid_amount,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n \n \n\n\n\n \n \n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_metric, 0)) as conversion_purchases_metric\n \n \n \n , sum(coalesce(conversion_custom_metric, 0)) as conversion_custom_metric\n \n \n\n\n\n \n\n\n\n \n \n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_sale_amount, 0)) as conversion_purchases_sale_amount\n \n \n \n , sum(coalesce(conversion_custom_sale_amount, 0)) as conversion_custom_sale_amount\n \n \n\n\n\n \n\n\n\n\n\n from report \n left join line_items\n on report.line_item_id = line_items.line_item_id\n and report.source_relation = line_items.source_relation\n left join campaigns \n on line_items.campaign_id = campaigns.campaign_id\n and line_items.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.twitter_ads__keyword_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "twitter_ads__keyword_report", "resource_type": "model", "package_name": "twitter_ads", "path": "twitter_ads__keyword_report.sql", "original_file_path": "models/twitter_ads__keyword_report.sql", "unique_id": "model.twitter_ads.twitter_ads__keyword_report", "fqn": ["twitter_ads", "twitter_ads__keyword_report"], "alias": "twitter_ads__keyword_report", "checksum": {"name": "sha256", "checksum": "58e23c6e46746a3a61028882c9d0c88fb19b447092dcc2a211b3694168c22435"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the account, campaign, line item (ad group), and keyword level, within a placement in Twitter.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend_micro": {"name": "spend_micro", "description": "The spend for the line item + keyword on that day, in micros and in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend for the line item + keyword on that day in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the line item + keyword on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the line item + keyword on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The url clicks for the line item + keyword on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword": {"name": "keyword", "description": "The keyword whose performance is being tracked.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_id": {"name": "keyword_id", "description": "Unique key of the table built from the combination of 'account_id', 'line_item_id', 'segment', and 'placement' fields.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "Name of the associated account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_id": {"name": "line_item_id", "description": "The ID of the related line item (ad group).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_name": {"name": "line_item_name", "description": "The ID of the related line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The currency all metrics for the account are set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions_sale_amount": {"name": "total_conversions_sale_amount", "description": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/twitter.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.210692, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__keyword_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__twitter_ads_enabled','twitter_ads__using_keywords'])) }}\n\nwith report as (\n\n select \n *,\n {# Let's sum up conversions into general fields for ease of use #}\n {{ var('twitter_ads__conversion_fields') | join(' + ') if var('twitter_ads__conversion_fields') else 0 }} as total_conversions,\n {{ var('twitter_ads__conversion_sale_amount_fields') | join(' + ') if var('twitter_ads__conversion_sale_amount_fields') else 0 }} as total_conversions_sale_amount\n\n from {{ ref('stg_twitter_ads__line_item_keywords_report') }}\n),\n\nline_items as (\n\n select *\n from {{ ref('stg_twitter_ads__line_item_history') }}\n where is_latest_version\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_twitter_ads__campaign_history') }}\n where is_latest_version\n),\n\naccounts as (\n\n select *\n from {{ ref('stg_twitter_ads__account_history') }}\n where is_latest_version\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n line_items.campaign_id,\n campaigns.campaign_name,\n report.line_item_id,\n line_items.name as line_item_name,\n report.keyword_id,\n report.keyword,\n line_items.currency,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='twitter_ads__line_item_keywords_report_passthrough_metrics') }}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_sale_amount_fields', transform='sum', coalesce_with=0, except_variable='twitter_ads__line_item_keywords_report_passthrough_metrics') }}\n {{ fivetran_utils.persist_pass_through_columns('twitter_ads__line_item_keywords_report_passthrough_metrics', transform='sum')}}\n\n from report \n left join line_items\n on report.line_item_id = line_items.line_item_id\n and report.source_relation = line_items.source_relation\n left join campaigns \n on line_items.campaign_id = campaigns.campaign_id\n and line_items.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n\n {{ dbt_utils.group_by(12) }}\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__line_item_keywords_report", "package": null, "version": null}, {"name": "stg_twitter_ads__line_item_history", "package": null, "version": null}, {"name": "stg_twitter_ads__campaign_history", "package": null, "version": null}, {"name": "stg_twitter_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.twitter_ads.twitter_ads_persist_pass_through_columns", "macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.twitter_ads.stg_twitter_ads__line_item_keywords_report", "model.twitter_ads.stg_twitter_ads__line_item_history", "model.twitter_ads.stg_twitter_ads__campaign_history", "model.twitter_ads.stg_twitter_ads__account_history"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter_ads__keyword_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select \n *,\n \n conversion_purchases_metric + conversion_custom_metric as total_conversions,\n conversion_purchases_sale_amount + conversion_custom_sale_amount as total_conversions_sale_amount\n\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_keywords_report\"\n),\n\nline_items as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_history\"\n where is_latest_version\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_history\"\n where is_latest_version\n),\n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__account_history\"\n where is_latest_version\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n line_items.campaign_id,\n campaigns.campaign_name,\n report.line_item_id,\n line_items.name as line_item_name,\n report.keyword_id,\n report.keyword,\n line_items.currency,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n \n\n\n\n \n \n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_metric, 0)) as conversion_purchases_metric\n \n \n \n , sum(coalesce(conversion_custom_metric, 0)) as conversion_custom_metric\n \n \n\n\n\n \n\n\n\n \n \n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_sale_amount, 0)) as conversion_purchases_sale_amount\n \n \n \n , sum(coalesce(conversion_custom_sale_amount, 0)) as conversion_custom_sale_amount\n \n \n\n\n\n \n\n\n\n\n\n from report \n left join line_items\n on report.line_item_id = line_items.line_item_id\n and report.source_relation = line_items.source_relation\n left join campaigns \n on line_items.campaign_id = campaigns.campaign_id\n and line_items.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.twitter_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "twitter_ads__campaign_report", "resource_type": "model", "package_name": "twitter_ads", "path": "twitter_ads__campaign_report.sql", "original_file_path": "models/twitter_ads__campaign_report.sql", "unique_id": "model.twitter_ads.twitter_ads__campaign_report", "fqn": ["twitter_ads", "twitter_ads__campaign_report"], "alias": "twitter_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "83ec21dd1a14f586c35629703d9cbf532a15fa7177f64484d284c1a897e11370"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the account and campaign level, within a placement in Twitter.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks on that date. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions on that date. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend on that date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend_micro": {"name": "spend_micro", "description": "The amount of spend, in micros, on that date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The number of URL clicks on that date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "The name of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The timestamp the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.created_at"]}, "currency": {"name": "currency", "description": "The currency all metrics for the account are set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_deleted": {"name": "is_deleted", "description": "Whether the record has been deleted or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.deleted"]}, "end_timestamp": {"name": "end_timestamp", "description": "The time the campaign will end", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "The status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "frequency_cap": {"name": "frequency_cap", "description": "The maximum number of times an ad could be delivered to a user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_servable": {"name": "is_servable", "description": "Whether the campaign is in a state to be actively served to users.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_standard_delivery": {"name": "is_standard_delivery", "description": "Whether standard delivery is enabled (vs accelerated delivery).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_timestamp": {"name": "start_timestamp", "description": "The time the campaign will start.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The timestamp the account was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.updated_at"]}, "funding_instrument_id": {"name": "funding_instrument_id", "description": "Reference to the funding instrument.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_amount": {"name": "daily_budget_amount", "description": "The daily budget amount to be allocated to the campaign. The currency associated with the specified funding instrument will be used.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_budget_amount": {"name": "total_budget_amount", "description": "The total budget amount to be allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions": {"name": "total_conversions", "description": "Sum of all fields included in `twitter_ads__conversion_fields` variable (default = conversion_purchases_metric + conversion_custom_metric).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversions_sale_amount": {"name": "total_conversions_sale_amount", "description": "Sum of all fields included in `twitter_ads__conversion_sale_amount_fields` variable (default = conversion_purchases_sale_amount + conversion_custom_sale_amount).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/twitter.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.199198, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\nwith report as (\n\n select \n *,\n {# Let's sum up conversions into general fields for ease of use #}\n {{ var('twitter_ads__conversion_fields') | join(' + ') if var('twitter_ads__conversion_fields') else 0 }} as total_conversions,\n {{ var('twitter_ads__conversion_sale_amount_fields') | join(' + ') if var('twitter_ads__conversion_sale_amount_fields') else 0 }} as total_conversions_sale_amount\n\n from {{ ref('stg_twitter_ads__campaign_report') }}\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_twitter_ads__campaign_history') }}\n where is_latest_version\n),\n\naccounts as (\n\n select *\n from {{ ref('stg_twitter_ads__account_history') }}\n where is_latest_version\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n report.campaign_id,\n campaigns.campaign_name,\n campaigns.is_deleted,\n campaigns.entity_status as campaign_status,\n campaigns.currency,\n campaigns.is_servable,\n campaigns.is_standard_delivery,\n campaigns.frequency_cap,\n campaigns.start_timestamp,\n campaigns.end_timestamp,\n campaigns.created_timestamp,\n campaigns.updated_timestamp,\n campaigns.funding_instrument_id,\n campaigns.daily_budget_amount,\n campaigns.total_budget_amount,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n {# Persist all of the customizable fields #}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_fields', transform='sum', coalesce_with=0, except_variable='twitter_ads__campaign_report_passthrough_metrics') }}\n {{ twitter_ads_persist_pass_through_columns(pass_through_variable='twitter_ads__conversion_sale_amount_fields', transform='sum', coalesce_with=0, except_variable='twitter_ads__campaign_report_passthrough_metrics') }}\n {{ fivetran_utils.persist_pass_through_columns('twitter_ads__campaign_report_passthrough_metrics', transform='sum') }}\n\n from report \n left join campaigns \n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n\n {{ dbt_utils.group_by(20) }}\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_report", "package": null, "version": null}, {"name": "stg_twitter_ads__campaign_history", "package": null, "version": null}, {"name": "stg_twitter_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.twitter_ads_persist_pass_through_columns", "macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_report", "model.twitter_ads.stg_twitter_ads__campaign_history", "model.twitter_ads.stg_twitter_ads__account_history"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select \n *,\n \n conversion_purchases_metric + conversion_custom_metric as total_conversions,\n conversion_purchases_sale_amount + conversion_custom_sale_amount as total_conversions_sale_amount\n\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_report\"\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_history\"\n where is_latest_version\n),\n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__account_history\"\n where is_latest_version\n),\n\nfinal as (\n\n select \n report.source_relation,\n report.date_day,\n report.placement, \n report.account_id,\n accounts.name as account_name,\n report.campaign_id,\n campaigns.campaign_name,\n campaigns.is_deleted,\n campaigns.entity_status as campaign_status,\n campaigns.currency,\n campaigns.is_servable,\n campaigns.is_standard_delivery,\n campaigns.frequency_cap,\n campaigns.start_timestamp,\n campaigns.end_timestamp,\n campaigns.created_timestamp,\n campaigns.updated_timestamp,\n campaigns.funding_instrument_id,\n campaigns.daily_budget_amount,\n campaigns.total_budget_amount,\n sum(report.clicks) as clicks, \n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.spend_micro) as spend_micro,\n sum(report.url_clicks) as url_clicks,\n sum(report.total_conversions) as total_conversions,\n sum(report.total_conversions_sale_amount) as total_conversions_sale_amount\n\n \n \n\n\n\n \n \n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_metric, 0)) as conversion_purchases_metric\n \n \n \n , sum(coalesce(conversion_custom_metric, 0)) as conversion_custom_metric\n \n \n\n\n\n \n\n\n\n \n \n\n\n\n\n\n \n \n , sum(coalesce(conversion_purchases_sale_amount, 0)) as conversion_purchases_sale_amount\n \n \n \n , sum(coalesce(conversion_custom_sale_amount, 0)) as conversion_custom_sale_amount\n \n \n\n\n\n \n\n\n\n\n\n from report \n left join campaigns \n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__tweet": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__tweet", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/stg_twitter_ads__tweet.sql", "original_file_path": "models/staging/stg_twitter_ads__tweet.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__tweet", "fqn": ["twitter_ads", "staging", "stg_twitter_ads__tweet"], "alias": "stg_twitter_ads__tweet", "checksum": {"name": "sha256", "checksum": "f44ddbd038fa677e6699ec2e0bd57abc62c9bc82cdb3c35bcc13775e041a4c7f"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a tweet, promoted or not.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tweet_id": {"name": "tweet_id", "description": "Unique identifier of the tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "If provided, the non-public title of the tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "full_text": {"name": "full_text", "description": "Full text of the tweet's content.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "language": {"name": "language", "description": "Two-letter language code of the tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/staging/stg_twitter_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.3018925, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__tweet\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_twitter_ads__tweet_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_twitter_ads__tweet_tmp')),\n staging_columns=get_tweet_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='twitter_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n account_id,\n id as tweet_id,\n name,\n full_text,\n lang as language\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__tweet_tmp", "package": null, "version": null}, {"name": "stg_twitter_ads__tweet_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.get_tweet_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.twitter_ads.stg_twitter_ads__tweet_tmp"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads__tweet.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__tweet_tmp\"\n),\n\nfields as (\n\n select\n \n account_id as account_id,\n full_text as full_text,\n id as id,\n lang as lang,\n name as name\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n account_id,\n id as tweet_id,\n name,\n full_text,\n lang as language\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__campaign_locations_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_locations_report", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/stg_twitter_ads__campaign_locations_report.sql", "original_file_path": "models/staging/stg_twitter_ads__campaign_locations_report.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_locations_report", "fqn": ["twitter_ads", "staging", "stg_twitter_ads__campaign_locations_report"], "alias": "stg_twitter_ads__campaign_locations_report", "checksum": {"name": "sha256", "checksum": "191eb2293aa0a2287a28ccc9f0b0493aaaf17a5f74a5c95ea02d9f9b6699a6ea"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the performance of an ad campaign on a given day in a specific country, for its placement in Twitter.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "country": {"name": "country", "description": "Long-form name of the country being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.country"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend_micro": {"name": "spend_micro", "description": "The spend for the campaign on that day, in micros and in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend for the campaign on that day in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the campaign on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the campaign on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The url clicks for the campaign on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/staging/stg_twitter_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.3032794, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_locations_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True) and var('twitter_ads__using_campaign_locations_report', False)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_twitter_ads__campaign_locations_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_twitter_ads__campaign_locations_report_tmp')),\n staging_columns=get_campaign_locations_report_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='twitter_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n {{ dbt.date_trunc('day', 'date') }} as date_day,\n -- Most people have country stored in segment_name, but some will have it in segment still\n coalesce(segment_name, segment) as country,\n account_id,\n campaign_id,\n placement,\n clicks,\n impressions,\n billed_charge_local_micro as spend_micro,\n round(billed_charge_local_micro / 1000000.0,2) as spend,\n url_clicks\n\n {% for conversion in var('twitter_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {% for conversion_value in var('twitter_ads__conversion_sale_amount_fields', []) %}\n , coalesce(cast({{ conversion_value }} as {{ dbt.type_float() }}), 0) as {{ conversion_value }}\n {% endfor %}\n\n {{ twitter_ads_fill_pass_through_columns(pass_through_fields=var('twitter_ads__campaign_locations_report_passthrough_metrics')) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_locations_report_tmp", "package": null, "version": null}, {"name": "stg_twitter_ads__campaign_locations_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.get_campaign_locations_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.date_trunc", "macro.dbt.type_bigint", "macro.dbt.type_float", "macro.twitter_ads.twitter_ads_fill_pass_through_columns"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_locations_report_tmp"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads__campaign_locations_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_locations_report_tmp\"\n),\n\nfields as (\n\n select\n \n cast(null as TEXT) as segment_name,\n segment as segment,\n account_id as account_id,\n billed_charge_local_micro as billed_charge_local_micro,\n campaign_id as campaign_id,\n clicks as clicks,\n date as date,\n impressions as impressions,\n placement as placement,\n url_clicks as url_clicks,\n cast(null as TEXT) as conversion_purchases_metric,\n cast(null as TEXT) as conversion_custom_metric,\n cast(null as TEXT) as conversion_purchases_sale_amount,\n cast(null as TEXT) as conversion_custom_sale_amount\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n date_trunc('day', date) as date_day,\n -- Most people have country stored in segment_name, but some will have it in segment still\n coalesce(segment_name, segment) as country,\n account_id,\n campaign_id,\n placement,\n clicks,\n impressions,\n billed_charge_local_micro as spend_micro,\n round(billed_charge_local_micro / 1000000.0,2) as spend,\n url_clicks\n\n \n , coalesce(cast(conversion_purchases_metric as bigint), 0) as conversion_purchases_metric\n \n , coalesce(cast(conversion_custom_metric as bigint), 0) as conversion_custom_metric\n \n\n \n , coalesce(cast(conversion_purchases_sale_amount as float), 0) as conversion_purchases_sale_amount\n \n , coalesce(cast(conversion_custom_sale_amount as float), 0) as conversion_custom_sale_amount\n \n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__campaign_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_history", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/stg_twitter_ads__campaign_history.sql", "original_file_path": "models/staging/stg_twitter_ads__campaign_history.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_history", "fqn": ["twitter_ads", "staging", "stg_twitter_ads__campaign_history"], "alias": "stg_twitter_ads__campaign_history", "checksum": {"name": "sha256", "checksum": "17165a900060941f71e86d9994fd591f729816f7561f67b20089babd72a5ca23"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of each campaign. The versions can be differentiated by the updated_at timestamp.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The timestamp the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.created_at"]}, "currency": {"name": "currency", "description": "The currency all metrics for the account are set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_amount_local_micro": {"name": "daily_budget_amount_local_micro", "description": "The daily budget amount to be allocated to the campaign, in micros. The currency associated with the specified funding instrument will be used.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_deleted": {"name": "is_deleted", "description": "Whether the record has been deleted or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.deleted"]}, "duration_in_days": {"name": "duration_in_days", "description": "The time period within which the frequency_cap is achieved.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_timestamp": {"name": "end_timestamp", "description": "The time the campaign will end", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "entity_status": {"name": "entity_status", "description": "The status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "frequency_cap": {"name": "frequency_cap", "description": "The maximum number of times an ad could be delivered to a user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_servable": {"name": "is_servable", "description": "Whether the campaign is in a state to be actively served to users.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_standard_delivery": {"name": "is_standard_delivery", "description": "Whether standard delivery is enabled (vs accelerated delivery).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_timestamp": {"name": "start_timestamp", "description": "The time the campaign will start.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_budget_amount_local_micro": {"name": "total_budget_amount_local_micro", "description": "The total budget amount to be allocated to the campaign, in micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The timestamp the account was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.updated_at"]}, "is_latest_version": {"name": "is_latest_version", "description": "Whether the record is the most latest version for the campaign", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "funding_instrument_id": {"name": "funding_instrument_id", "description": "Reference to the funding instrument.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_amount": {"name": "daily_budget_amount", "description": "The daily budget amount to be allocated to the campaign. The currency associated with the specified funding instrument will be used.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_budget_amount": {"name": "total_budget_amount", "description": "The total budget amount to be allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/staging/stg_twitter_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.289907, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\nwith source as (\n\n select *\n from {{ ref('stg_twitter_ads__campaign_history_tmp') }}\n\n),\n\nfields as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_twitter_ads__campaign_history_tmp')),\n staging_columns=get_campaign_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='twitter_ads') }}\n\n from source\n\n), \n\nfinal as (\n\n select\n source_relation,\n account_id,\n created_at as created_timestamp,\n currency,\n daily_budget_amount_local_micro,\n deleted as is_deleted,\n duration_in_days,\n end_time as end_timestamp,\n entity_status,\n frequency_cap,\n funding_instrument_id,\n id as campaign_id,\n name as campaign_name,\n servable as is_servable,\n standard_delivery as is_standard_delivery,\n start_time as start_timestamp,\n total_budget_amount_local_micro,\n updated_at as updated_timestamp,\n round(daily_budget_amount_local_micro / 1000000.0,2) as daily_budget_amount,\n round(total_budget_amount_local_micro / 1000000.0,2) as total_budget_amount,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='twitter_ads') }} order by updated_at desc) = 1 as is_latest_version\n \n from fields \n)\n\nselect * from final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_history_tmp", "package": null, "version": null}, {"name": "stg_twitter_ads__campaign_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.get_campaign_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_history_tmp"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads__campaign_history.sql", "compiled": true, "compiled_code": "\n\nwith source as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_history_tmp\"\n\n),\n\nfields as (\n\n select\n \n \n account_id as account_id,\n created_at as created_at,\n currency as currency,\n daily_budget_amount_local_micro as daily_budget_amount_local_micro,\n deleted as deleted,\n duration_in_days as duration_in_days,\n end_time as end_time,\n entity_status as entity_status,\n frequency_cap as frequency_cap,\n funding_instrument_id as funding_instrument_id,\n id as id,\n name as name,\n servable as servable,\n standard_delivery as standard_delivery,\n start_time as start_time,\n total_budget_amount_local_micro as total_budget_amount_local_micro,\n updated_at as updated_at\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from source\n\n), \n\nfinal as (\n\n select\n source_relation,\n account_id,\n created_at as created_timestamp,\n currency,\n daily_budget_amount_local_micro,\n deleted as is_deleted,\n duration_in_days,\n end_time as end_timestamp,\n entity_status,\n frequency_cap,\n funding_instrument_id,\n id as campaign_id,\n name as campaign_name,\n servable as is_servable,\n standard_delivery as is_standard_delivery,\n start_time as start_timestamp,\n total_budget_amount_local_micro,\n updated_at as updated_timestamp,\n round(daily_budget_amount_local_micro / 1000000.0,2) as daily_budget_amount,\n round(total_budget_amount_local_micro / 1000000.0,2) as total_budget_amount,\n row_number() over (partition by id order by updated_at desc) = 1 as is_latest_version\n \n from fields \n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__promoted_tweet_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__promoted_tweet_history", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/stg_twitter_ads__promoted_tweet_history.sql", "original_file_path": "models/staging/stg_twitter_ads__promoted_tweet_history.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__promoted_tweet_history", "fqn": ["twitter_ads", "staging", "stg_twitter_ads__promoted_tweet_history"], "alias": "stg_twitter_ads__promoted_tweet_history", "checksum": {"name": "sha256", "checksum": "8118737cecd53a75a6f648e6df4e5b7cc89c138a2948ee655f6553182b59b8fb"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of each promoted tweet. The versions can be differentiated by the updated_at timestamp.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "approval_status": {"name": "approval_status", "description": "The approval status of the promoted tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The timestamp the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.created_at"]}, "is_deleted": {"name": "is_deleted", "description": "Whether the record has been deleted or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.deleted"]}, "entity_status": {"name": "entity_status", "description": "The status of the promoted tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "promoted_tweet_id": {"name": "promoted_tweet_id", "description": "The ID of the promoted tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_id": {"name": "line_item_id", "description": "The ID of the related line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tweet_id": {"name": "tweet_id", "description": "The ID of the related tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The timestamp the account was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.updated_at"]}, "is_latest_version": {"name": "is_latest_version", "description": "Whether the record is the most latest version for the promoted tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/staging/stg_twitter_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.2937694, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\nwith source as (\n\n select *\n from {{ ref('stg_twitter_ads__promoted_tweet_history_tmp') }}\n\n),\n\nfields as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_twitter_ads__promoted_tweet_history_tmp')),\n staging_columns=get_promoted_tweet_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='twitter_ads') }}\n\n from source\n\n), \n\nfinal as (\n\n select\n source_relation,\n approval_status,\n created_at as created_timestamp,\n deleted as is_deleted,\n entity_status,\n id as promoted_tweet_id,\n line_item_id,\n tweet_id,\n updated_at as updated_timestamp,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='twitter_ads') }} order by updated_at desc) = 1 as is_latest_version\n from fields \n)\n\nselect * from final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__promoted_tweet_history_tmp", "package": null, "version": null}, {"name": "stg_twitter_ads__promoted_tweet_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.get_promoted_tweet_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_history_tmp"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads__promoted_tweet_history.sql", "compiled": true, "compiled_code": "\n\nwith source as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_history_tmp\"\n\n),\n\nfields as (\n\n select\n \n \n approval_status as approval_status,\n created_at as created_at,\n deleted as deleted,\n entity_status as entity_status,\n id as id,\n line_item_id as line_item_id,\n tweet_id as tweet_id,\n updated_at as updated_at\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from source\n\n), \n\nfinal as (\n\n select\n source_relation,\n approval_status,\n created_at as created_timestamp,\n deleted as is_deleted,\n entity_status,\n id as promoted_tweet_id,\n line_item_id,\n tweet_id,\n updated_at as updated_timestamp,\n row_number() over (partition by id order by updated_at desc) = 1 as is_latest_version\n from fields \n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__tweet_url": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__tweet_url", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/stg_twitter_ads__tweet_url.sql", "original_file_path": "models/staging/stg_twitter_ads__tweet_url.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__tweet_url", "fqn": ["twitter_ads", "staging", "stg_twitter_ads__tweet_url"], "alias": "stg_twitter_ads__tweet_url", "checksum": {"name": "sha256", "checksum": "4364ab7bb2a22dedd69405b107ffa5af41e873ff7a73d84868bdc72e8b045c99"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a URL used in a tweet.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "display_url": {"name": "display_url", "description": "The URL as it will be displayed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "expanded_url": {"name": "expanded_url", "description": "The fully expanded URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "index": {"name": "index", "description": "The index of the URL within the tweet (ie if there are multiple URLs)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "indices": {"name": "indices", "description": "The start and end point of where the URL is placed in the tweet text.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tweet_id": {"name": "tweet_id", "description": "The ID of the related tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url": {"name": "url", "description": "The 't.co' shortened URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_host": {"name": "url_host", "description": "The URL host of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_path": {"name": "url_path", "description": "The URL path of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_source": {"name": "utm_source", "description": "The utm_source parameter of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_medium": {"name": "utm_medium", "description": "The utm_medium parameter of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_campaign": {"name": "utm_campaign", "description": "The utm_campaign parameter of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_content": {"name": "utm_content", "description": "The utm_content parameter of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_term": {"name": "utm_term", "description": "The utm_term parameter of the ad, extracted from the `expanded_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/staging/stg_twitter_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.2969904, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__tweet_url\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\nwith source as (\n\n select *\n from {{ ref('stg_twitter_ads__tweet_url_tmp') }}\n\n),\n\nfields as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_twitter_ads__tweet_url_tmp')),\n staging_columns=get_tweet_url_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='twitter_ads') }}\n\n from source\n\n), \n\nfinal as (\n\n select\n source_relation,\n display_url,\n expanded_url,\n index,\n indices,\n tweet_id,\n url,\n {{ dbt.split_part('expanded_url', \"'?'\", 1) }} as base_url,\n {{ dbt_utils.get_url_host('expanded_url') }} as url_host,\n '/' || {{ dbt_utils.get_url_path('expanded_url') }} as url_path,\n {{ twitter_ads.twitter_ads_extract_url_parameter('expanded_url', 'utm_source') }} as utm_source,\n {{ twitter_ads.twitter_ads_extract_url_parameter('expanded_url', 'utm_medium') }} as utm_medium,\n {{ twitter_ads.twitter_ads_extract_url_parameter('expanded_url', 'utm_campaign') }} as utm_campaign,\n {{ twitter_ads.twitter_ads_extract_url_parameter('expanded_url', 'utm_content') }} as utm_content,\n {{ twitter_ads.twitter_ads_extract_url_parameter('expanded_url', 'utm_term') }} as utm_term\n \n from fields\n\n)\n\nselect * from final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__tweet_url_tmp", "package": null, "version": null}, {"name": "stg_twitter_ads__tweet_url_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.get_tweet_url_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.split_part", "macro.dbt_utils.get_url_host", "macro.dbt_utils.get_url_path", "macro.twitter_ads.twitter_ads_extract_url_parameter"], "nodes": ["model.twitter_ads.stg_twitter_ads__tweet_url_tmp"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads__tweet_url.sql", "compiled": true, "compiled_code": "\n\nwith source as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__tweet_url_tmp\"\n\n),\n\nfields as (\n\n select\n \n \n display_url as display_url,\n expanded_url as expanded_url,\n index as index,\n indices as indices,\n tweet_id as tweet_id,\n url as url\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from source\n\n), \n\nfinal as (\n\n select\n source_relation,\n display_url,\n expanded_url,\n index,\n indices,\n tweet_id,\n url,\n \n\n \n \n\n split_part(\n expanded_url,\n '?',\n 1\n )\n\n\n \n\n as base_url,\n \n \n cast(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n \n\n replace(\n \n\n replace(\n \n\n replace(\n expanded_url,\n 'android-app://',\n ''\n )\n\n\n,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n '/',\n 1\n )\n\n\n \n\n,\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_host,\n '/' || \n \n cast(\n\n \n \n\n split_part(\n \n\n right(\n \n\n replace(\n \n\n replace(\n expanded_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n \n\n length(\n \n\n replace(\n \n\n replace(\n expanded_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n )-coalesce(\n nullif(\n\n position(\n '/' in \n\n replace(\n \n\n replace(\n expanded_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ), 0),\n \n\n position(\n '?' in \n\n replace(\n \n\n replace(\n expanded_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ) - 1\n )\n ),\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_path,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n expanded_url,\n 'utm_source=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_source,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n expanded_url,\n 'utm_medium=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_medium,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n expanded_url,\n 'utm_campaign=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_campaign,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n expanded_url,\n 'utm_content=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_content,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n expanded_url,\n 'utm_term=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_term\n \n from fields\n\n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__campaign_regions_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_regions_report", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/stg_twitter_ads__campaign_regions_report.sql", "original_file_path": "models/staging/stg_twitter_ads__campaign_regions_report.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_regions_report", "fqn": ["twitter_ads", "staging", "stg_twitter_ads__campaign_regions_report"], "alias": "stg_twitter_ads__campaign_regions_report", "checksum": {"name": "sha256", "checksum": "bc5b0673bae61d7618e8eaa0297de05496241e3b7c13fbe832cab74041fd04ac"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the performance of an ad campaign on a given day in a specific geographic region, for its placement in Twitter.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "country": {"name": "country", "description": "Long-form name of the country being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.country"]}, "region": {"name": "region", "description": "Long-form name of the geopgraphic region being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.region"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend_micro": {"name": "spend_micro", "description": "The spend for the campaign on that day, in micros and in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend for the campaign on that day in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the campaign on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the campaign on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The url clicks for the campaign on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/staging/stg_twitter_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.3046567, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_regions_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True) and var('twitter_ads__using_campaign_regions_report', False)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_twitter_ads__campaign_regions_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_twitter_ads__campaign_regions_report_tmp')),\n staging_columns=get_campaign_regions_report_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='twitter_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n {{ dbt.date_trunc('day', 'date') }} as date_day,\n -- Most people have region stored in segment_name, but some will have it in segment still\n coalesce(segment_name, segment) as region,\n case when lower(location_type) = 'countries' then location_name else null end as country,\n account_id,\n campaign_id,\n placement,\n clicks,\n impressions,\n billed_charge_local_micro as spend_micro,\n round(billed_charge_local_micro / 1000000.0,2) as spend,\n url_clicks\n\n {% for conversion in var('twitter_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {% for conversion_value in var('twitter_ads__conversion_sale_amount_fields', []) %}\n , coalesce(cast({{ conversion_value }} as {{ dbt.type_float() }}), 0) as {{ conversion_value }}\n {% endfor %}\n\n {{ twitter_ads_fill_pass_through_columns(pass_through_fields=var('twitter_ads__campaign_regions_report_passthrough_metrics')) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_regions_report_tmp", "package": null, "version": null}, {"name": "stg_twitter_ads__campaign_regions_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.get_campaign_regions_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.date_trunc", "macro.dbt.type_bigint", "macro.dbt.type_float", "macro.twitter_ads.twitter_ads_fill_pass_through_columns"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_regions_report_tmp"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads__campaign_regions_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_regions_report_tmp\"\n),\n\nfields as (\n\n select\n \n location_name as location_name,\n location_type as location_type,\n segment as segment,\n cast(null as TEXT) as segment_name,\n account_id as account_id,\n billed_charge_local_micro as billed_charge_local_micro,\n campaign_id as campaign_id,\n clicks as clicks,\n date as date,\n impressions as impressions,\n placement as placement,\n url_clicks as url_clicks,\n cast(null as TEXT) as conversion_purchases_metric,\n cast(null as TEXT) as conversion_custom_metric,\n cast(null as TEXT) as conversion_purchases_sale_amount,\n cast(null as TEXT) as conversion_custom_sale_amount\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n date_trunc('day', date) as date_day,\n -- Most people have region stored in segment_name, but some will have it in segment still\n coalesce(segment_name, segment) as region,\n case when lower(location_type) = 'countries' then location_name else null end as country,\n account_id,\n campaign_id,\n placement,\n clicks,\n impressions,\n billed_charge_local_micro as spend_micro,\n round(billed_charge_local_micro / 1000000.0,2) as spend,\n url_clicks\n\n \n , coalesce(cast(conversion_purchases_metric as bigint), 0) as conversion_purchases_metric\n \n , coalesce(cast(conversion_custom_metric as bigint), 0) as conversion_custom_metric\n \n\n \n , coalesce(cast(conversion_purchases_sale_amount as float), 0) as conversion_purchases_sale_amount\n \n , coalesce(cast(conversion_custom_sale_amount as float), 0) as conversion_custom_sale_amount\n \n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__line_item_keywords_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__line_item_keywords_report", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/stg_twitter_ads__line_item_keywords_report.sql", "original_file_path": "models/staging/stg_twitter_ads__line_item_keywords_report.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__line_item_keywords_report", "fqn": ["twitter_ads", "staging", "stg_twitter_ads__line_item_keywords_report"], "alias": "stg_twitter_ads__line_item_keywords_report", "checksum": {"name": "sha256", "checksum": "b05a1c4b50494ecd1af123902748a7cfe06997855d09471ece28b9fe384f9253"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the performance of a line item (ad group) and keyword combination on a given day, for its placement in Twitter.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "keyword_id": {"name": "keyword_id", "description": "Unique key of the table built from the combination of 'account_id', 'line_item_id','segment', and 'placement' fields.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend_micro": {"name": "spend_micro", "description": "The spend for the line item + keyword on that day, in micros and in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend for the line item + keyword on that day in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the line item + keyword on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the line item + keyword on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_id": {"name": "line_item_id", "description": "The ID of the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The url clicks for the line item + keyword on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword": {"name": "keyword", "description": "The keyword whose performance is being tracked.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/staging/stg_twitter_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.3009596, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_keywords_report\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__twitter_ads_enabled','twitter_ads__using_keywords'])) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_twitter_ads__line_item_keywords_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_twitter_ads__line_item_keywords_report_tmp')),\n staging_columns=get_line_item_keywords_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='twitter_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n {{ dbt.date_trunc('day', 'date') }} as date_day,\n {{ dbt_utils.generate_surrogate_key(['account_id', 'line_item_id','segment','placement']) }} as keyword_id,\n account_id,\n line_item_id,\n segment as keyword,\n placement,\n clicks,\n impressions,\n billed_charge_local_micro as spend_micro,\n round(billed_charge_local_micro / 1000000.0,2) as spend,\n url_clicks\n\n {% for conversion in var('twitter_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {% for conversion_value in var('twitter_ads__conversion_sale_amount_fields', []) %}\n , coalesce(cast({{ conversion_value }} as {{ dbt.type_float() }}), 0) as {{ conversion_value }}\n {% endfor %}\n\n {{ twitter_ads_fill_pass_through_columns(pass_through_fields=var('twitter_ads__line_item_keywords_report_passthrough_metrics'), except=(var('twitter_ads__conversion_fields') + var('twitter_ads__conversion_sale_amount_fields'))) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__line_item_keywords_report_tmp", "package": null, "version": null}, {"name": "stg_twitter_ads__line_item_keywords_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.twitter_ads.get_line_item_keywords_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.date_trunc", "macro.dbt_utils.generate_surrogate_key", "macro.dbt.type_bigint", "macro.dbt.type_float", "macro.twitter_ads.twitter_ads_fill_pass_through_columns"], "nodes": ["model.twitter_ads.stg_twitter_ads__line_item_keywords_report_tmp"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads__line_item_keywords_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_keywords_report_tmp\"\n),\n\nfields as (\n\n select\n \n account_id as account_id,\n billed_charge_local_micro as billed_charge_local_micro,\n clicks as clicks,\n date as date,\n impressions as impressions,\n line_item_id as line_item_id,\n placement as placement,\n segment as segment,\n url_clicks as url_clicks,\n conversion_purchases_metric as conversion_purchases_metric,\n conversion_custom_metric as conversion_custom_metric,\n conversion_purchases_sale_amount as conversion_purchases_sale_amount,\n conversion_custom_sale_amount as conversion_custom_sale_amount\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date_trunc('day', date) as date_day,\n md5(cast(coalesce(cast(account_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(line_item_id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(segment as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(placement as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as keyword_id,\n account_id,\n line_item_id,\n segment as keyword,\n placement,\n clicks,\n impressions,\n billed_charge_local_micro as spend_micro,\n round(billed_charge_local_micro / 1000000.0,2) as spend,\n url_clicks\n\n \n , coalesce(cast(conversion_purchases_metric as bigint), 0) as conversion_purchases_metric\n \n , coalesce(cast(conversion_custom_metric as bigint), 0) as conversion_custom_metric\n \n\n \n , coalesce(cast(conversion_purchases_sale_amount as float), 0) as conversion_purchases_sale_amount\n \n , coalesce(cast(conversion_custom_sale_amount as float), 0) as conversion_custom_sale_amount\n \n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__line_item_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__line_item_report", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/stg_twitter_ads__line_item_report.sql", "original_file_path": "models/staging/stg_twitter_ads__line_item_report.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__line_item_report", "fqn": ["twitter_ads", "staging", "stg_twitter_ads__line_item_report"], "alias": "stg_twitter_ads__line_item_report", "checksum": {"name": "sha256", "checksum": "cb1bb859ec2f322aafab0990b554675f60a15f15e1342015388f3a2ae8ab9217"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the performance of a line item (ad group) on a given day, for its placement in Twitter.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend_micro": {"name": "spend_micro", "description": "The spend for the line item on that day, in micros and in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend for the line item on that day in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the line item on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the line item on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_id": {"name": "line_item_id", "description": "The ID of the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The url clicks for the line item on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/staging/stg_twitter_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.29965, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_twitter_ads__line_item_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_twitter_ads__line_item_report_tmp')),\n staging_columns=get_line_item_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='twitter_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n {{ dbt.date_trunc('day', 'date') }} as date_day,\n account_id,\n line_item_id,\n placement,\n clicks,\n impressions,\n billed_charge_local_micro as spend_micro,\n round(billed_charge_local_micro / 1000000.0,2) as spend,\n url_clicks\n\n {% for conversion in var('twitter_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {% for conversion_value in var('twitter_ads__conversion_sale_amount_fields', []) %}\n , coalesce(cast({{ conversion_value }} as {{ dbt.type_float() }}), 0) as {{ conversion_value }}\n {% endfor %}\n\n {{ twitter_ads_fill_pass_through_columns(pass_through_fields=var('twitter_ads__line_item_report_passthrough_metrics'), except=(var('twitter_ads__conversion_fields') + var('twitter_ads__conversion_sale_amount_fields'))) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__line_item_report_tmp", "package": null, "version": null}, {"name": "stg_twitter_ads__line_item_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.get_line_item_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.date_trunc", "macro.dbt.type_bigint", "macro.dbt.type_float", "macro.twitter_ads.twitter_ads_fill_pass_through_columns"], "nodes": ["model.twitter_ads.stg_twitter_ads__line_item_report_tmp"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads__line_item_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_report_tmp\"\n),\n\nfields as (\n\n select\n \n account_id as account_id,\n billed_charge_local_micro as billed_charge_local_micro,\n clicks as clicks,\n date as date,\n impressions as impressions,\n line_item_id as line_item_id,\n placement as placement,\n url_clicks as url_clicks,\n conversion_purchases_metric as conversion_purchases_metric,\n conversion_custom_metric as conversion_custom_metric,\n conversion_purchases_sale_amount as conversion_purchases_sale_amount,\n conversion_custom_sale_amount as conversion_custom_sale_amount\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date_trunc('day', date) as date_day,\n account_id,\n line_item_id,\n placement,\n clicks,\n impressions,\n billed_charge_local_micro as spend_micro,\n round(billed_charge_local_micro / 1000000.0,2) as spend,\n url_clicks\n\n \n , coalesce(cast(conversion_purchases_metric as bigint), 0) as conversion_purchases_metric\n \n , coalesce(cast(conversion_custom_metric as bigint), 0) as conversion_custom_metric\n \n\n \n , coalesce(cast(conversion_purchases_sale_amount as float), 0) as conversion_purchases_sale_amount\n \n , coalesce(cast(conversion_custom_sale_amount as float), 0) as conversion_custom_sale_amount\n \n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__line_item_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__line_item_history", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/stg_twitter_ads__line_item_history.sql", "original_file_path": "models/staging/stg_twitter_ads__line_item_history.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__line_item_history", "fqn": ["twitter_ads", "staging", "stg_twitter_ads__line_item_history"], "alias": "stg_twitter_ads__line_item_history", "checksum": {"name": "sha256", "checksum": "97caf5a88a09db388dcf010a7a578512546d72e9f80f5c84a12a57f013dc2c99"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of each line item. The versions can be differentiated by the updated_at timestamp.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "advertiser_domain": {"name": "advertiser_domain", "description": "The website domain for this advertiser, without the protocol specification.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_user_id": {"name": "advertiser_user_id", "description": "The Twitter user identifier for the handle promoting the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "automatically_select_bid": {"name": "automatically_select_bid", "description": "Whether automatically optimize bidding is enabled based on daily budget and campaign flight dates.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_amount_local_micro": {"name": "bid_amount_local_micro", "description": "The bid amount to be associated with this line item, in micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_type": {"name": "bid_type", "description": "The bidding mechanism.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_unit": {"name": "bid_unit", "description": "The bid unit for this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "charge_by": {"name": "charge_by", "description": "The unit to charge this line item by.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The timestamp the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.created_at"]}, "creative_source": {"name": "creative_source", "description": "The source of the creatives for the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The currency in which metrics will be reported.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_deleted": {"name": "is_deleted", "description": "Whether the record has been deleted or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.deleted"]}, "end_timestamp": {"name": "end_timestamp", "description": "The timestamp at which the line item will stop being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "entity_status": {"name": "entity_status", "description": "The status of the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_id": {"name": "line_item_id", "description": "The ID of the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective": {"name": "objective", "description": "The campaign objective for this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "optimization": {"name": "optimization", "description": "The optimization setting to use with this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "primary_web_event_tag": {"name": "primary_web_event_tag", "description": "The identifier of the primary web event tag. Allows more accurate tracking of engagements for the campaign pertaining to this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "product_type": {"name": "product_type", "description": "The type of promoted product that this line item will contain.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_timestamp": {"name": "start_timestamp", "description": "The timestamp at which the line item will start being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "target_cpa_local_micro": {"name": "target_cpa_local_micro", "description": "The target cost per acquisition for the line item, in micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_budget_amount_local_micro": {"name": "total_budget_amount_local_micro", "description": "The total budget amount to be allocated to the line item, in micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The timestamp the account was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.updated_at"]}, "is_latest_version": {"name": "is_latest_version", "description": "Whether the record is the most latest version for the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_amount": {"name": "bid_amount", "description": "The bid amount to be associated with this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_budget_amount": {"name": "total_budget_amount", "description": "The total budget amount to be allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "target_cpa": {"name": "target_cpa", "description": "The target cost per acquisition for the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/staging/stg_twitter_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.292745, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\nwith source as (\n\n select *\n from {{ ref('stg_twitter_ads__line_item_history_tmp') }}\n\n),\n\nfields as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_twitter_ads__line_item_history_tmp')),\n staging_columns=get_line_item_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='twitter_ads') }}\n\n from source\n\n), \n\nfinal as (\n\n select\n source_relation,\n advertiser_domain,\n advertiser_user_id,\n automatically_select_bid,\n bid_amount_local_micro,\n bid_type,\n bid_unit,\n campaign_id,\n charge_by,\n created_at as created_timestamp,\n creative_source,\n currency,\n deleted as is_deleted,\n end_time as end_timestamp,\n entity_status,\n id as line_item_id,\n name,\n objective,\n optimization,\n primary_web_event_tag,\n product_type,\n start_time as start_timestamp,\n target_cpa_local_micro,\n total_budget_amount_local_micro,\n updated_at as updated_timestamp,\n round(bid_amount_local_micro / 1000000.0,2) as bid_amount,\n round(total_budget_amount_local_micro / 1000000.0,2) as total_budget_amount,\n round(target_cpa_local_micro / 1000000.0,2) as target_cpa,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='twitter_ads') }} order by updated_at desc) = 1 as is_latest_version\n \n from fields \n)\n\nselect * from final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__line_item_history_tmp", "package": null, "version": null}, {"name": "stg_twitter_ads__line_item_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.get_line_item_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.twitter_ads.stg_twitter_ads__line_item_history_tmp"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads__line_item_history.sql", "compiled": true, "compiled_code": "\n\nwith source as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_history_tmp\"\n\n),\n\nfields as (\n\n select\n \n \n advertiser_domain as advertiser_domain,\n advertiser_user_id as advertiser_user_id,\n automatically_select_bid as automatically_select_bid,\n bid_amount_local_micro as bid_amount_local_micro,\n bid_type as bid_type,\n bid_unit as bid_unit,\n campaign_id as campaign_id,\n charge_by as charge_by,\n created_at as created_at,\n creative_source as creative_source,\n currency as currency,\n deleted as deleted,\n end_time as end_time,\n entity_status as entity_status,\n id as id,\n name as name,\n objective as objective,\n optimization as optimization,\n primary_web_event_tag as primary_web_event_tag,\n product_type as product_type,\n start_time as start_time,\n target_cpa_local_micro as target_cpa_local_micro,\n total_budget_amount_local_micro as total_budget_amount_local_micro,\n updated_at as updated_at\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from source\n\n), \n\nfinal as (\n\n select\n source_relation,\n advertiser_domain,\n advertiser_user_id,\n automatically_select_bid,\n bid_amount_local_micro,\n bid_type,\n bid_unit,\n campaign_id,\n charge_by,\n created_at as created_timestamp,\n creative_source,\n currency,\n deleted as is_deleted,\n end_time as end_timestamp,\n entity_status,\n id as line_item_id,\n name,\n objective,\n optimization,\n primary_web_event_tag,\n product_type,\n start_time as start_timestamp,\n target_cpa_local_micro,\n total_budget_amount_local_micro,\n updated_at as updated_timestamp,\n round(bid_amount_local_micro / 1000000.0,2) as bid_amount,\n round(total_budget_amount_local_micro / 1000000.0,2) as total_budget_amount,\n round(target_cpa_local_micro / 1000000.0,2) as target_cpa,\n row_number() over (partition by id order by updated_at desc) = 1 as is_latest_version\n \n from fields \n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__account_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__account_history", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/stg_twitter_ads__account_history.sql", "original_file_path": "models/staging/stg_twitter_ads__account_history.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__account_history", "fqn": ["twitter_ads", "staging", "stg_twitter_ads__account_history"], "alias": "stg_twitter_ads__account_history", "checksum": {"name": "sha256", "checksum": "c9a8e8307bddb360a513b911534c09794c479aead05f714bee34eda6784a8ab5"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents a version of each account. The versions can be differentiated by the updated_at timestamp.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "approval_status": {"name": "approval_status", "description": "The approval status of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "business_id": {"name": "business_id", "description": "The ID of the related business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "business_name": {"name": "business_name", "description": "The name of the related business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_timestamp": {"name": "created_timestamp", "description": "The timestamp the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.created_at"]}, "is_deleted": {"name": "is_deleted", "description": "Whether the record has been deleted or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.deleted"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "industry_type": {"name": "industry_type", "description": "The industry of the accounts.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone": {"name": "timezone", "description": "The timezone the account is set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone_switched_timestamp": {"name": "timezone_switched_timestamp", "description": "The timestamp the account's timezone was last changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_timestamp": {"name": "updated_timestamp", "description": "The timestamp the account was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.updated_at"]}, "is_latest_version": {"name": "is_latest_version", "description": "Whether the record is the most latest version for the account", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "salt": {"name": "salt", "description": "The random encryption key used to hash data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/staging/stg_twitter_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.286939, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__account_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\nwith source as (\n\n select *\n from {{ ref('stg_twitter_ads__account_history_tmp') }}\n\n),\n\nfields as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_twitter_ads__account_history_tmp')),\n staging_columns=get_account_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='twitter_ads') }}\n\n from source\n\n), \n\nfinal as (\n\n select\n source_relation,\n approval_status,\n business_id,\n business_name,\n created_at as created_timestamp,\n deleted as is_deleted,\n id as account_id,\n industry_type,\n name,\n salt,\n timezone,\n timezone_switch_at as timezone_switched_timestamp,\n updated_at as updated_timestamp,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='twitter_ads') }} order by updated_at desc) = 1 as is_latest_version\n \n from fields \n)\n\nselect * from final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__account_history_tmp", "package": null, "version": null}, {"name": "stg_twitter_ads__account_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.get_account_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.twitter_ads.stg_twitter_ads__account_history_tmp"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads__account_history.sql", "compiled": true, "compiled_code": "\n\nwith source as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__account_history_tmp\"\n\n),\n\nfields as (\n\n select\n \n \n approval_status as approval_status,\n business_id as business_id,\n business_name as business_name,\n created_at as created_at,\n deleted as deleted,\n id as id,\n industry_type as industry_type,\n name as name,\n salt as salt,\n timezone as timezone,\n timezone_switch_at as timezone_switch_at,\n updated_at as updated_at\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from source\n\n), \n\nfinal as (\n\n select\n source_relation,\n approval_status,\n business_id,\n business_name,\n created_at as created_timestamp,\n deleted as is_deleted,\n id as account_id,\n industry_type,\n name,\n salt,\n timezone,\n timezone_switch_at as timezone_switched_timestamp,\n updated_at as updated_timestamp,\n row_number() over (partition by id order by updated_at desc) = 1 as is_latest_version\n \n from fields \n)\n\nselect * from final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__promoted_tweet_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__promoted_tweet_report", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/stg_twitter_ads__promoted_tweet_report.sql", "original_file_path": "models/staging/stg_twitter_ads__promoted_tweet_report.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__promoted_tweet_report", "fqn": ["twitter_ads", "staging", "stg_twitter_ads__promoted_tweet_report"], "alias": "stg_twitter_ads__promoted_tweet_report", "checksum": {"name": "sha256", "checksum": "f9bd68ae048ddee9112129fb5cb7ed1e2a54dc671fa76bcc659ce9e3e3b53032"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the performance of a promoted tweet on a given day, in the tweet's defined placement.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend_micro": {"name": "spend_micro", "description": "The spend (in micros) for the promoted tweet on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend for the promoted tweet on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the promoted tweet on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the promoted tweet on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "promoted_tweet_id": {"name": "promoted_tweet_id", "description": "The ID of the related promoted tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The url clicks for the promoted tweet on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/staging/stg_twitter_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.2950952, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\nwith source as (\n\n select *\n from {{ ref('stg_twitter_ads__promoted_tweet_report_tmp') }}\n\n),\n\nrenamed as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_twitter_ads__promoted_tweet_report_tmp')),\n staging_columns=get_promoted_tweet_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='twitter_ads') }}\n\n from source\n\n), spend_calc as (\n\n select\n source_relation,\n {{ dbt.date_trunc('day', 'date') }} as date_day,\n account_id,\n promoted_tweet_id,\n placement,\n clicks as clicks,\n impressions as impressions,\n billed_charge_local_micro as spend_micro,\n round(billed_charge_local_micro / 1000000.0,2) as spend,\n url_clicks as url_clicks\n\n {% for conversion in var('twitter_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {% for conversion_value in var('twitter_ads__conversion_sale_amount_fields', []) %}\n , coalesce(cast({{ conversion_value }} as {{ dbt.type_float() }}), 0) as {{ conversion_value }}\n {% endfor %}\n\n {{ twitter_ads_fill_pass_through_columns(pass_through_fields=var('twitter_ads__promoted_tweet_report_passthrough_metrics'), except=(var('twitter_ads__conversion_fields') + var('twitter_ads__conversion_sale_amount_fields'))) }}\n\n from renamed\n\n)\n\nselect * from spend_calc", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__promoted_tweet_report_tmp", "package": null, "version": null}, {"name": "stg_twitter_ads__promoted_tweet_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.get_promoted_tweet_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.date_trunc", "macro.dbt.type_bigint", "macro.dbt.type_float", "macro.twitter_ads.twitter_ads_fill_pass_through_columns"], "nodes": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_report_tmp"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads__promoted_tweet_report.sql", "compiled": true, "compiled_code": "\n\nwith source as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_report_tmp\"\n\n),\n\nrenamed as (\n\n select\n \n \n account_id as account_id,\n billed_charge_local_micro as billed_charge_local_micro,\n clicks as clicks,\n date as date,\n impressions as impressions,\n placement as placement,\n promoted_tweet_id as promoted_tweet_id,\n url_clicks as url_clicks,\n cast(null as TEXT) as conversion_purchases_metric,\n cast(null as TEXT) as conversion_custom_metric,\n cast(null as TEXT) as conversion_purchases_sale_amount,\n cast(null as TEXT) as conversion_custom_sale_amount\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from source\n\n), spend_calc as (\n\n select\n source_relation,\n date_trunc('day', date) as date_day,\n account_id,\n promoted_tweet_id,\n placement,\n clicks as clicks,\n impressions as impressions,\n billed_charge_local_micro as spend_micro,\n round(billed_charge_local_micro / 1000000.0,2) as spend,\n url_clicks as url_clicks\n\n \n , coalesce(cast(conversion_purchases_metric as bigint), 0) as conversion_purchases_metric\n \n , coalesce(cast(conversion_custom_metric as bigint), 0) as conversion_custom_metric\n \n\n \n , coalesce(cast(conversion_purchases_sale_amount as float), 0) as conversion_purchases_sale_amount\n \n , coalesce(cast(conversion_custom_sale_amount as float), 0) as conversion_custom_sale_amount\n \n\n \n\n\n\n\n\n from renamed\n\n)\n\nselect * from spend_calc", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_report", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/stg_twitter_ads__campaign_report.sql", "original_file_path": "models/staging/stg_twitter_ads__campaign_report.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_report", "fqn": ["twitter_ads", "staging", "stg_twitter_ads__campaign_report"], "alias": "stg_twitter_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "76d7fdb8023d658e157e94401c53ef41619b3287f0e037e26534a5ade1e809b2"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the performance of an ad campaign on a given day, for its placement in Twitter.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend_micro": {"name": "spend_micro", "description": "The spend for the campaign on that day, in micros and in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend for the campaign on that day in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the campaign on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the campaign on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The url clicks for the campaign on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "twitter_ads://models/staging/stg_twitter_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.2983632, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_twitter_ads__campaign_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_twitter_ads__campaign_report_tmp')),\n staging_columns=get_campaign_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='twitter_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n {{ dbt.date_trunc('day', 'date') }} as date_day,\n account_id,\n campaign_id,\n placement,\n clicks,\n impressions,\n billed_charge_local_micro as spend_micro,\n round(billed_charge_local_micro / 1000000.0,2) as spend,\n url_clicks\n\n\n {% for conversion in var('twitter_ads__conversion_fields', []) %}\n , coalesce(cast({{ conversion }} as {{ dbt.type_bigint() }}), 0) as {{ conversion }}\n {% endfor %}\n\n {% for conversion_value in var('twitter_ads__conversion_sale_amount_fields', []) %}\n , coalesce(cast({{ conversion_value }} as {{ dbt.type_float() }}), 0) as {{ conversion_value }}\n {% endfor %}\n\n {{ twitter_ads_fill_pass_through_columns(pass_through_fields=var('twitter_ads__campaign_report_passthrough_metrics'), except=(var('twitter_ads__conversion_fields') + var('twitter_ads__conversion_sale_amount_fields'))) }}\n \n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_report_tmp", "package": null, "version": null}, {"name": "stg_twitter_ads__campaign_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.twitter_ads.get_campaign_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.date_trunc", "macro.dbt.type_bigint", "macro.dbt.type_float", "macro.twitter_ads.twitter_ads_fill_pass_through_columns"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_report_tmp"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_report_tmp\"\n),\n\nfields as (\n\n select\n \n account_id as account_id,\n billed_charge_local_micro as billed_charge_local_micro,\n campaign_id as campaign_id,\n clicks as clicks,\n date as date,\n impressions as impressions,\n placement as placement,\n url_clicks as url_clicks,\n conversion_purchases_metric as conversion_purchases_metric,\n conversion_custom_metric as conversion_custom_metric,\n conversion_purchases_sale_amount as conversion_purchases_sale_amount,\n conversion_custom_sale_amount as conversion_custom_sale_amount\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date_trunc('day', date) as date_day,\n account_id,\n campaign_id,\n placement,\n clicks,\n impressions,\n billed_charge_local_micro as spend_micro,\n round(billed_charge_local_micro / 1000000.0,2) as spend,\n url_clicks\n\n\n \n , coalesce(cast(conversion_purchases_metric as bigint), 0) as conversion_purchases_metric\n \n , coalesce(cast(conversion_custom_metric as bigint), 0) as conversion_custom_metric\n \n\n \n , coalesce(cast(conversion_purchases_sale_amount as float), 0) as conversion_purchases_sale_amount\n \n , coalesce(cast(conversion_custom_sale_amount as float), 0) as conversion_custom_sale_amount\n \n\n \n\n\n\n\n \n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__campaign_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_report_tmp", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/tmp/stg_twitter_ads__campaign_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_twitter_ads__campaign_report_tmp.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_report_tmp", "fqn": ["twitter_ads", "staging", "tmp", "stg_twitter_ads__campaign_report_tmp"], "alias": "stg_twitter_ads__campaign_report_tmp", "checksum": {"name": "sha256", "checksum": "0072c0adb43b3b76afe3e8ff0983919dc78e180e9121aa61da9aa010673188bf"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708218.7524688, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\n{% if var('twitter_ads_union_schemas', []) | length > 0 or var('twitter_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_report',\n database_variable='twitter_ads_database',\n schema_variable='twitter_ads_schema',\n default_database=target.database,\n default_schema='twitter_ads',\n default_variable='campaign_report',\n union_schema_variable='twitter_ads_union_schemas',\n union_database_variable='twitter_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='twitter_ads_sources',\n single_source_name='twitter_ads',\n single_table_name='campaign_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["twitter_ads", "campaign_report"], ["twitter_ads", "campaign_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.twitter_ads.twitter_ads.campaign_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/tmp/stg_twitter_ads__campaign_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: twitter_ads_campaign_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: twitter_campaign_report_data\n\n\n select\n \"account_id\",\n \"campaign_id\",\n \"date\",\n \"placement\",\n \"_fivetran_synced\",\n \"app_clicks\",\n \"billed_charge_local_micro\",\n \"billed_engagements\",\n \"card_engagements\",\n \"carousel_swipes\",\n \"clicks\",\n \"conversion_custom_metric\",\n \"conversion_custom_order_quantity\",\n \"conversion_custom_order_quantity_engagement\",\n \"conversion_custom_order_quantity_view\",\n \"conversion_custom_post_engagement\",\n \"conversion_custom_post_view\",\n \"conversion_custom_sale_amount\",\n \"conversion_custom_sale_amount_engagement\",\n \"conversion_custom_sale_amount_view\",\n \"conversion_downloads_metric\",\n \"conversion_downloads_order_quantity\",\n \"conversion_downloads_order_quantity_engagement\",\n \"conversion_downloads_order_quantity_view\",\n \"conversion_downloads_post_engagement\",\n \"conversion_downloads_post_view\",\n \"conversion_downloads_sale_amount\",\n \"conversion_downloads_sale_amount_engagement\",\n \"conversion_downloads_sale_amount_view\",\n \"conversion_purchases_assisted\",\n \"conversion_purchases_metric\",\n \"conversion_purchases_order_quantity\",\n \"conversion_purchases_order_quantity_engagement\",\n \"conversion_purchases_order_quantity_view\",\n \"conversion_purchases_post_engagement\",\n \"conversion_purchases_post_view\",\n \"conversion_purchases_sale_amount\",\n \"conversion_purchases_sale_amount_engagement\",\n \"conversion_purchases_sale_amount_view\",\n \"conversion_sign_ups_assisted\",\n \"conversion_sign_ups_metric\",\n \"conversion_sign_ups_order_quantity\",\n \"conversion_sign_ups_order_quantity_engagement\",\n \"conversion_sign_ups_order_quantity_view\",\n \"conversion_sign_ups_post_engagement\",\n \"conversion_sign_ups_post_view\",\n \"conversion_sign_ups_sale_amount\",\n \"conversion_sign_ups_sale_amount_engagement\",\n \"conversion_sign_ups_sale_amount_view\",\n \"conversion_site_visits_metric\",\n \"conversion_site_visits_order_quantity\",\n \"conversion_site_visits_order_quantity_engagement\",\n \"conversion_site_visits_order_quantity_view\",\n \"conversion_site_visits_post_engagement\",\n \"conversion_site_visits_post_view\",\n \"conversion_site_visits_sale_amount\",\n \"conversion_site_visits_sale_amount_engagement\",\n \"conversion_site_visits_sale_amount_view\",\n \"engagements\",\n \"follows\",\n \"impressions\",\n \"likes\",\n \"media_engagements\",\n \"media_views\",\n \"mobile_conversion_achievements_unlocked_assisted\",\n \"mobile_conversion_achievements_unlocked_order_quantity\",\n \"mobile_conversion_achievements_unlocked_post_engagement\",\n \"mobile_conversion_achievements_unlocked_post_view\",\n \"mobile_conversion_achievements_unlocked_sale_amount\",\n \"mobile_conversion_add_to_carts_assisted\",\n \"mobile_conversion_add_to_carts_order_quantity\",\n \"mobile_conversion_add_to_carts_post_engagement\",\n \"mobile_conversion_add_to_carts_post_view\",\n \"mobile_conversion_add_to_carts_sale_amount\",\n \"mobile_conversion_add_to_wishlists_assisted\",\n \"mobile_conversion_add_to_wishlists_order_quantity\",\n \"mobile_conversion_add_to_wishlists_post_engagement\",\n \"mobile_conversion_add_to_wishlists_post_view\",\n \"mobile_conversion_add_to_wishlists_sale_amount\",\n \"mobile_conversion_checkouts_initiated_assisted\",\n \"mobile_conversion_checkouts_initiated_order_quantity\",\n \"mobile_conversion_checkouts_initiated_post_engagement\",\n \"mobile_conversion_checkouts_initiated_post_view\",\n \"mobile_conversion_checkouts_initiated_sale_amount\",\n \"mobile_conversion_content_views_assisted\",\n \"mobile_conversion_content_views_order_quantity\",\n \"mobile_conversion_content_views_post_engagement\",\n \"mobile_conversion_content_views_post_view\",\n \"mobile_conversion_content_views_sale_amount\",\n \"mobile_conversion_downloads_order_quantity\",\n \"mobile_conversion_downloads_post_engagement\",\n \"mobile_conversion_downloads_post_view\",\n \"mobile_conversion_downloads_sale_amount\",\n \"mobile_conversion_installs_assisted\",\n \"mobile_conversion_installs_order_quantity\",\n \"mobile_conversion_installs_post_engagement\",\n \"mobile_conversion_installs_post_view\",\n \"mobile_conversion_installs_sale_amount\",\n \"mobile_conversion_invites_assisted\",\n \"mobile_conversion_invites_order_quantity\",\n \"mobile_conversion_invites_post_engagement\",\n \"mobile_conversion_invites_post_view\",\n \"mobile_conversion_invites_sale_amount\",\n \"mobile_conversion_key_page_views_post_engagement\",\n \"mobile_conversion_key_page_views_post_view\",\n \"mobile_conversion_levels_achieved_assisted\",\n \"mobile_conversion_levels_achieved_order_quantity\",\n \"mobile_conversion_levels_achieved_post_engagement\",\n \"mobile_conversion_levels_achieved_post_view\",\n \"mobile_conversion_levels_achieved_sale_amount\",\n \"mobile_conversion_lifetime_value_achievements_unlocked_metric\",\n \"mobile_conversion_lifetime_value_achievements_unlocked_order_qu\",\n \"mobile_conversion_lifetime_value_achievements_unlocked_sale_amo\",\n \"mobile_conversion_lifetime_value_add_to_carts_metric\",\n \"mobile_conversion_lifetime_value_add_to_carts_order_quantity\",\n \"mobile_conversion_lifetime_value_add_to_carts_sale_amount\",\n \"mobile_conversion_lifetime_value_add_to_wishlists_metric\",\n \"mobile_conversion_lifetime_value_add_to_wishlists_order_quantit\",\n \"mobile_conversion_lifetime_value_add_to_wishlists_sale_amount\",\n \"mobile_conversion_lifetime_value_checkouts_initiated_metric\",\n \"mobile_conversion_lifetime_value_checkouts_initiated_order_quan\",\n \"mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun\",\n \"mobile_conversion_lifetime_value_content_views_metric\",\n \"mobile_conversion_lifetime_value_content_views_order_quantity\",\n \"mobile_conversion_lifetime_value_content_views_sale_amount\",\n \"mobile_conversion_lifetime_value_invites_metric\",\n \"mobile_conversion_lifetime_value_invites_order_quantity\",\n \"mobile_conversion_lifetime_value_invites_sale_amount\",\n \"mobile_conversion_lifetime_value_levels_achieved_metric\",\n \"mobile_conversion_lifetime_value_levels_achieved_order_quantity\",\n \"mobile_conversion_lifetime_value_levels_achieved_sale_amount\",\n \"mobile_conversion_lifetime_value_logins_metric\",\n \"mobile_conversion_lifetime_value_logins_order_quantity\",\n \"mobile_conversion_lifetime_value_logins_sale_amount\",\n \"mobile_conversion_lifetime_value_payment_info_additions_metric\",\n \"mobile_conversion_lifetime_value_payment_info_additions_order_q\",\n \"mobile_conversion_lifetime_value_payment_info_additions_sale_am\",\n \"mobile_conversion_lifetime_value_purchases_metric\",\n \"mobile_conversion_lifetime_value_purchases_order_quantity\",\n \"mobile_conversion_lifetime_value_purchases_sale_amount\",\n \"mobile_conversion_lifetime_value_rates_metric\",\n \"mobile_conversion_lifetime_value_rates_order_quantity\",\n \"mobile_conversion_lifetime_value_rates_sale_amount\",\n \"mobile_conversion_lifetime_value_reservations_metric\",\n \"mobile_conversion_lifetime_value_reservations_order_quantity\",\n \"mobile_conversion_lifetime_value_reservations_sale_amount\",\n \"mobile_conversion_lifetime_value_searches_metric\",\n \"mobile_conversion_lifetime_value_searches_order_quantity\",\n \"mobile_conversion_lifetime_value_searches_sale_amount\",\n \"mobile_conversion_lifetime_value_shares_metric\",\n \"mobile_conversion_lifetime_value_shares_order_quantity\",\n \"mobile_conversion_lifetime_value_shares_sale_amount\",\n \"mobile_conversion_lifetime_value_sign_ups_metric\",\n \"mobile_conversion_lifetime_value_sign_ups_order_quantity\",\n \"mobile_conversion_lifetime_value_sign_ups_sale_amount\",\n \"mobile_conversion_lifetime_value_spent_credits_metric\",\n \"mobile_conversion_lifetime_value_spent_credits_order_quantity\",\n \"mobile_conversion_lifetime_value_spent_credits_sale_amount\",\n \"mobile_conversion_lifetime_value_tutorials_completed_metric\",\n \"mobile_conversion_lifetime_value_tutorials_completed_order_quan\",\n \"mobile_conversion_lifetime_value_tutorials_completed_sale_amoun\",\n \"mobile_conversion_lifetime_value_updates_metric\",\n \"mobile_conversion_lifetime_value_updates_order_quantity\",\n \"mobile_conversion_lifetime_value_updates_sale_amount\",\n \"mobile_conversion_logins_assisted\",\n \"mobile_conversion_logins_order_quantity\",\n \"mobile_conversion_logins_post_engagement\",\n \"mobile_conversion_logins_post_view\",\n \"mobile_conversion_logins_sale_amount\",\n \"mobile_conversion_payment_info_additions_assisted\",\n \"mobile_conversion_payment_info_additions_order_quantity\",\n \"mobile_conversion_payment_info_additions_post_engagement\",\n \"mobile_conversion_payment_info_additions_post_view\",\n \"mobile_conversion_payment_info_additions_sale_amount\",\n \"mobile_conversion_purchases_assisted\",\n \"mobile_conversion_purchases_order_quantity\",\n \"mobile_conversion_purchases_post_engagement\",\n \"mobile_conversion_purchases_post_view\",\n \"mobile_conversion_purchases_sale_amount\",\n \"mobile_conversion_rates_assisted\",\n \"mobile_conversion_rates_order_quantity\",\n \"mobile_conversion_rates_post_engagement\",\n \"mobile_conversion_rates_post_view\",\n \"mobile_conversion_rates_sale_amount\",\n \"mobile_conversion_re_engages_assisted\",\n \"mobile_conversion_re_engages_order_quantity\",\n \"mobile_conversion_re_engages_post_engagement\",\n \"mobile_conversion_re_engages_post_view\",\n \"mobile_conversion_re_engages_sale_amount\",\n \"mobile_conversion_reservations_assisted\",\n \"mobile_conversion_reservations_order_quantity\",\n \"mobile_conversion_reservations_post_engagement\",\n \"mobile_conversion_reservations_post_view\",\n \"mobile_conversion_reservations_sale_amount\",\n \"mobile_conversion_searches_assisted\",\n \"mobile_conversion_searches_order_quantity\",\n \"mobile_conversion_searches_post_engagement\",\n \"mobile_conversion_searches_post_view\",\n \"mobile_conversion_searches_sale_amount\",\n \"mobile_conversion_shares_assisted\",\n \"mobile_conversion_shares_order_quantity\",\n \"mobile_conversion_shares_post_engagement\",\n \"mobile_conversion_shares_post_view\",\n \"mobile_conversion_shares_sale_amount\",\n \"mobile_conversion_sign_ups_assisted\",\n \"mobile_conversion_sign_ups_order_quantity\",\n \"mobile_conversion_sign_ups_post_engagement\",\n \"mobile_conversion_sign_ups_post_view\",\n \"mobile_conversion_sign_ups_sale_amount\",\n \"mobile_conversion_site_visits_order_quantity\",\n \"mobile_conversion_site_visits_post_engagement\",\n \"mobile_conversion_site_visits_post_view\",\n \"mobile_conversion_site_visits_sale_amount\",\n \"mobile_conversion_spent_credits_assisted\",\n \"mobile_conversion_spent_credits_order_quantity\",\n \"mobile_conversion_spent_credits_post_engagement\",\n \"mobile_conversion_spent_credits_post_view\",\n \"mobile_conversion_spent_credits_sale_amount\",\n \"mobile_conversion_tutorials_completed_assisted\",\n \"mobile_conversion_tutorials_completed_order_quantity\",\n \"mobile_conversion_tutorials_completed_post_engagement\",\n \"mobile_conversion_tutorials_completed_post_view\",\n \"mobile_conversion_tutorials_completed_sale_amount\",\n \"mobile_conversion_updates_assisted\",\n \"mobile_conversion_updates_order_quantity\",\n \"mobile_conversion_updates_post_engagement\",\n \"mobile_conversion_updates_post_view\",\n \"mobile_conversion_updates_sale_amount\",\n \"poll_card_vote\",\n \"qualified_impressions\",\n \"replies\",\n \"retweets\",\n \"tweets_send\",\n \"unfollows\",\n \"url_clicks\",\n \"video_3_s_100_pct_views\",\n \"video_6_s_views\",\n \"video_content_starts\",\n \"video_cta_clicks\",\n \"video_mrc_views\",\n \"video_total_views\",\n \"video_views_100\",\n \"video_views_25\",\n \"video_views_50\",\n \"video_views_75\",\n \"mobile_conversion_installs_skan_post_engagement\",\n \"mobile_conversion_installs_skan_post_view\",\n \"mobile_conversion_purchases_skan_post_engagement\",\n \"mobile_conversion_purchases_skan_post_view\",\n \"video_15_s_views\",\n \"auto_created_conversion_landing_page_view\",\n \"auto_created_conversion_session\"\n from \"postgres\".\"public\".\"twitter_campaign_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__campaign_regions_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_regions_report_tmp", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/tmp/stg_twitter_ads__campaign_regions_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_twitter_ads__campaign_regions_report_tmp.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_regions_report_tmp", "fqn": ["twitter_ads", "staging", "tmp", "stg_twitter_ads__campaign_regions_report_tmp"], "alias": "stg_twitter_ads__campaign_regions_report_tmp", "checksum": {"name": "sha256", "checksum": "af8f97be11b9863514221eb9b89275237bf8d97ae2448f6754be0c07c6d020b1"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708218.763105, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_regions_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True) and var('twitter_ads__using_campaign_regions_report', False)) }}\n\n{% if var('twitter_ads_union_schemas', []) | length > 0 or var('twitter_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_regions_report',\n database_variable='twitter_ads_database',\n schema_variable='twitter_ads_schema',\n default_database=target.database,\n default_schema='twitter_ads',\n default_variable='campaign_regions_report',\n union_schema_variable='twitter_ads_union_schemas',\n union_database_variable='twitter_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='twitter_ads_sources',\n single_source_name='twitter_ads',\n single_table_name='campaign_regions_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["twitter_ads", "campaign_regions_report"], ["twitter_ads", "campaign_regions_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.twitter_ads.twitter_ads.campaign_regions_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/tmp/stg_twitter_ads__campaign_regions_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: twitter_ads_campaign_regions_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: twitter_campaign_regions_report_data\n\n\n select\n \"location_name\",\n \"location_type\",\n \"segment\",\n \"account_id\",\n \"billed_charge_local_micro\",\n \"campaign_id\",\n \"clicks\",\n \"date\",\n \"impressions\",\n \"placement\",\n \"url_clicks\"\n from \"postgres\".\"public\".\"twitter_campaign_regions_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__campaign_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_history_tmp", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/tmp/stg_twitter_ads__campaign_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_twitter_ads__campaign_history_tmp.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_history_tmp", "fqn": ["twitter_ads", "staging", "tmp", "stg_twitter_ads__campaign_history_tmp"], "alias": "stg_twitter_ads__campaign_history_tmp", "checksum": {"name": "sha256", "checksum": "652243666d352210eee5e8da1167c8d298ec3174a6dfb45b0c13d8848a69fa60"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708218.7742262, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\n{% if var('twitter_ads_union_schemas', []) | length > 0 or var('twitter_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_history',\n database_variable='twitter_ads_database',\n schema_variable='twitter_ads_schema',\n default_database=target.database,\n default_schema='twitter_ads',\n default_variable='campaign_history',\n union_schema_variable='twitter_ads_union_schemas',\n union_database_variable='twitter_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='twitter_ads_sources',\n single_source_name='twitter_ads',\n single_table_name='campaign_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["twitter_ads", "campaign_history"], ["twitter_ads", "campaign_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.twitter_ads.twitter_ads.campaign_history"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/tmp/stg_twitter_ads__campaign_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: twitter_ads_campaign_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: twitter_campaign_history_data\n\n\n select\n \"_fivetran_synced\",\n \"account_id\",\n \"created_at\",\n \"currency\",\n \"daily_budget_amount_local_micro\",\n \"deleted\",\n \"duration_in_days\",\n \"end_time\",\n \"entity_status\",\n \"frequency_cap\",\n \"funding_instrument_id\",\n \"id\",\n \"name\",\n \"servable\",\n \"standard_delivery\",\n \"start_time\",\n \"total_budget_amount_local_micro\",\n \"updated_at\"\n from \"postgres\".\"public\".\"twitter_campaign_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__line_item_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__line_item_history_tmp", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/tmp/stg_twitter_ads__line_item_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_twitter_ads__line_item_history_tmp.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__line_item_history_tmp", "fqn": ["twitter_ads", "staging", "tmp", "stg_twitter_ads__line_item_history_tmp"], "alias": "stg_twitter_ads__line_item_history_tmp", "checksum": {"name": "sha256", "checksum": "aa6f33a38e0e41976bd71b53581fb8e6b011ff6731c4d5762216db610901d6c8"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708218.7858522, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\n{% if var('twitter_ads_union_schemas', []) | length > 0 or var('twitter_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='line_item_history',\n database_variable='twitter_ads_database',\n schema_variable='twitter_ads_schema',\n default_database=target.database,\n default_schema='twitter_ads',\n default_variable='line_item_history',\n union_schema_variable='twitter_ads_union_schemas',\n union_database_variable='twitter_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='twitter_ads_sources',\n single_source_name='twitter_ads',\n single_table_name='line_item_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["twitter_ads", "line_item_history"], ["twitter_ads", "line_item_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.twitter_ads.twitter_ads.line_item_history"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/tmp/stg_twitter_ads__line_item_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: twitter_ads_line_item_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: twitter_line_item_history_data\n\n\n select\n \"advertiser_domain\",\n \"advertiser_user_id\",\n \"automatically_select_bid\",\n \"bid_amount_local_micro\",\n \"bid_type\",\n \"bid_unit\",\n \"campaign_id\",\n \"charge_by\",\n \"created_at\",\n \"creative_source\",\n \"currency\",\n \"deleted\",\n \"end_time\",\n \"entity_status\",\n \"id\",\n \"name\",\n \"objective\",\n \"optimization\",\n \"primary_web_event_tag\",\n \"product_type\",\n \"start_time\",\n \"target_cpa_local_micro\",\n \"total_budget_amount_local_micro\",\n \"updated_at\"\n from \"postgres\".\"public\".\"twitter_line_item_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__promoted_tweet_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__promoted_tweet_report_tmp", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/tmp/stg_twitter_ads__promoted_tweet_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_twitter_ads__promoted_tweet_report_tmp.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__promoted_tweet_report_tmp", "fqn": ["twitter_ads", "staging", "tmp", "stg_twitter_ads__promoted_tweet_report_tmp"], "alias": "stg_twitter_ads__promoted_tweet_report_tmp", "checksum": {"name": "sha256", "checksum": "b48edb66ac4ecc607561780165aff356fed7b33b088ab56bbb7be341f6e055e6"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708218.7964582, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\n{% if var('twitter_ads_union_schemas', []) | length > 0 or var('twitter_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='promoted_tweet_report',\n database_variable='twitter_ads_database',\n schema_variable='twitter_ads_schema',\n default_database=target.database,\n default_schema='twitter_ads',\n default_variable='promoted_tweet_report',\n union_schema_variable='twitter_ads_union_schemas',\n union_database_variable='twitter_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='twitter_ads_sources',\n single_source_name='twitter_ads',\n single_table_name='promoted_tweet_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["twitter_ads", "promoted_tweet_report"], ["twitter_ads", "promoted_tweet_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.twitter_ads.twitter_ads.promoted_tweet_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/tmp/stg_twitter_ads__promoted_tweet_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: twitter_ads_promoted_tweet_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: twitter_promoted_tweet_report_data\n\n\n select\n \"_fivetran_synced\",\n \"account_id\",\n \"billed_charge_local_micro\",\n \"clicks\",\n \"date\",\n \"impressions\",\n \"promoted_tweet_id\",\n \"url_clicks\",\n \"placement\"\n from \"postgres\".\"public\".\"twitter_promoted_tweet_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__campaign_locations_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__campaign_locations_report_tmp", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/tmp/stg_twitter_ads__campaign_locations_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_twitter_ads__campaign_locations_report_tmp.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__campaign_locations_report_tmp", "fqn": ["twitter_ads", "staging", "tmp", "stg_twitter_ads__campaign_locations_report_tmp"], "alias": "stg_twitter_ads__campaign_locations_report_tmp", "checksum": {"name": "sha256", "checksum": "250038b9407c673ec77955785b7f46d875a8a5082091778347c7383d93231d53"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708218.8072436, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_locations_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True) and var('twitter_ads__using_campaign_locations_report', False)) }}\n\n{% if var('twitter_ads_union_schemas', []) | length > 0 or var('twitter_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_locations_report',\n database_variable='twitter_ads_database',\n schema_variable='twitter_ads_schema',\n default_database=target.database,\n default_schema='twitter_ads',\n default_variable='campaign_locations_report',\n union_schema_variable='twitter_ads_union_schemas',\n union_database_variable='twitter_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='twitter_ads_sources',\n single_source_name='twitter_ads',\n single_table_name='campaign_locations_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["twitter_ads", "campaign_locations_report"], ["twitter_ads", "campaign_locations_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.twitter_ads.twitter_ads.campaign_locations_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/tmp/stg_twitter_ads__campaign_locations_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: twitter_ads_campaign_locations_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: twitter_campaign_locations_report_data\n\n\n select\n \"segment\",\n \"account_id\",\n \"billed_charge_local_micro\",\n \"campaign_id\",\n \"clicks\",\n \"date\",\n \"impressions\",\n \"placement\",\n \"url_clicks\"\n from \"postgres\".\"public\".\"twitter_campaign_locations_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__line_item_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__line_item_report_tmp", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/tmp/stg_twitter_ads__line_item_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_twitter_ads__line_item_report_tmp.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__line_item_report_tmp", "fqn": ["twitter_ads", "staging", "tmp", "stg_twitter_ads__line_item_report_tmp"], "alias": "stg_twitter_ads__line_item_report_tmp", "checksum": {"name": "sha256", "checksum": "18977c917618a00edb2b2371945c7543897dcff2ad185487eac00ed5a62b0359"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708218.818181, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\n{% if var('twitter_ads_union_schemas', []) | length > 0 or var('twitter_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='line_item_report',\n database_variable='twitter_ads_database',\n schema_variable='twitter_ads_schema',\n default_database=target.database,\n default_schema='twitter_ads',\n default_variable='line_item_report',\n union_schema_variable='twitter_ads_union_schemas',\n union_database_variable='twitter_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='twitter_ads_sources',\n single_source_name='twitter_ads',\n single_table_name='line_item_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["twitter_ads", "line_item_report"], ["twitter_ads", "line_item_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.twitter_ads.twitter_ads.line_item_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/tmp/stg_twitter_ads__line_item_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: twitter_ads_line_item_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: twitter_line_item_report_data\n\n\n select\n \"account_id\",\n \"date\",\n \"line_item_id\",\n \"placement\",\n \"_fivetran_synced\",\n \"app_clicks\",\n \"billed_charge_local_micro\",\n \"billed_engagements\",\n \"card_engagements\",\n \"carousel_swipes\",\n \"clicks\",\n \"conversion_custom_metric\",\n \"conversion_custom_order_quantity\",\n \"conversion_custom_order_quantity_engagement\",\n \"conversion_custom_order_quantity_view\",\n \"conversion_custom_post_engagement\",\n \"conversion_custom_post_view\",\n \"conversion_custom_sale_amount\",\n \"conversion_custom_sale_amount_engagement\",\n \"conversion_custom_sale_amount_view\",\n \"conversion_downloads_metric\",\n \"conversion_downloads_order_quantity\",\n \"conversion_downloads_order_quantity_engagement\",\n \"conversion_downloads_order_quantity_view\",\n \"conversion_downloads_post_engagement\",\n \"conversion_downloads_post_view\",\n \"conversion_downloads_sale_amount\",\n \"conversion_downloads_sale_amount_engagement\",\n \"conversion_downloads_sale_amount_view\",\n \"conversion_purchases_assisted\",\n \"conversion_purchases_metric\",\n \"conversion_purchases_order_quantity\",\n \"conversion_purchases_order_quantity_engagement\",\n \"conversion_purchases_order_quantity_view\",\n \"conversion_purchases_post_engagement\",\n \"conversion_purchases_post_view\",\n \"conversion_purchases_sale_amount\",\n \"conversion_purchases_sale_amount_engagement\",\n \"conversion_purchases_sale_amount_view\",\n \"conversion_sign_ups_assisted\",\n \"conversion_sign_ups_metric\",\n \"conversion_sign_ups_order_quantity\",\n \"conversion_sign_ups_order_quantity_engagement\",\n \"conversion_sign_ups_order_quantity_view\",\n \"conversion_sign_ups_post_engagement\",\n \"conversion_sign_ups_post_view\",\n \"conversion_sign_ups_sale_amount\",\n \"conversion_sign_ups_sale_amount_engagement\",\n \"conversion_sign_ups_sale_amount_view\",\n \"conversion_site_visits_metric\",\n \"conversion_site_visits_order_quantity\",\n \"conversion_site_visits_order_quantity_engagement\",\n \"conversion_site_visits_order_quantity_view\",\n \"conversion_site_visits_post_engagement\",\n \"conversion_site_visits_post_view\",\n \"conversion_site_visits_sale_amount\",\n \"conversion_site_visits_sale_amount_engagement\",\n \"conversion_site_visits_sale_amount_view\",\n \"engagements\",\n \"follows\",\n \"impressions\",\n \"likes\",\n \"media_engagements\",\n \"media_views\",\n \"mobile_conversion_achievements_unlocked_assisted\",\n \"mobile_conversion_achievements_unlocked_order_quantity\",\n \"mobile_conversion_achievements_unlocked_post_engagement\",\n \"mobile_conversion_achievements_unlocked_post_view\",\n \"mobile_conversion_achievements_unlocked_sale_amount\",\n \"mobile_conversion_add_to_carts_assisted\",\n \"mobile_conversion_add_to_carts_order_quantity\",\n \"mobile_conversion_add_to_carts_post_engagement\",\n \"mobile_conversion_add_to_carts_post_view\",\n \"mobile_conversion_add_to_carts_sale_amount\",\n \"mobile_conversion_add_to_wishlists_assisted\",\n \"mobile_conversion_add_to_wishlists_order_quantity\",\n \"mobile_conversion_add_to_wishlists_post_engagement\",\n \"mobile_conversion_add_to_wishlists_post_view\",\n \"mobile_conversion_add_to_wishlists_sale_amount\",\n \"mobile_conversion_checkouts_initiated_assisted\",\n \"mobile_conversion_checkouts_initiated_order_quantity\",\n \"mobile_conversion_checkouts_initiated_post_engagement\",\n \"mobile_conversion_checkouts_initiated_post_view\",\n \"mobile_conversion_checkouts_initiated_sale_amount\",\n \"mobile_conversion_content_views_assisted\",\n \"mobile_conversion_content_views_order_quantity\",\n \"mobile_conversion_content_views_post_engagement\",\n \"mobile_conversion_content_views_post_view\",\n \"mobile_conversion_content_views_sale_amount\",\n \"mobile_conversion_downloads_order_quantity\",\n \"mobile_conversion_downloads_post_engagement\",\n \"mobile_conversion_downloads_post_view\",\n \"mobile_conversion_downloads_sale_amount\",\n \"mobile_conversion_installs_assisted\",\n \"mobile_conversion_installs_order_quantity\",\n \"mobile_conversion_installs_post_engagement\",\n \"mobile_conversion_installs_post_view\",\n \"mobile_conversion_installs_sale_amount\",\n \"mobile_conversion_invites_assisted\",\n \"mobile_conversion_invites_order_quantity\",\n \"mobile_conversion_invites_post_engagement\",\n \"mobile_conversion_invites_post_view\",\n \"mobile_conversion_invites_sale_amount\",\n \"mobile_conversion_key_page_views_post_engagement\",\n \"mobile_conversion_key_page_views_post_view\",\n \"mobile_conversion_levels_achieved_assisted\",\n \"mobile_conversion_levels_achieved_order_quantity\",\n \"mobile_conversion_levels_achieved_post_engagement\",\n \"mobile_conversion_levels_achieved_post_view\",\n \"mobile_conversion_levels_achieved_sale_amount\",\n \"mobile_conversion_lifetime_value_achievements_unlocked_metric\",\n \"mobile_conversion_lifetime_value_achievements_unlocked_order_qu\",\n \"mobile_conversion_lifetime_value_achievements_unlocked_sale_amo\",\n \"mobile_conversion_lifetime_value_add_to_carts_metric\",\n \"mobile_conversion_lifetime_value_add_to_carts_order_quantity\",\n \"mobile_conversion_lifetime_value_add_to_carts_sale_amount\",\n \"mobile_conversion_lifetime_value_add_to_wishlists_metric\",\n \"mobile_conversion_lifetime_value_add_to_wishlists_order_quantit\",\n \"mobile_conversion_lifetime_value_add_to_wishlists_sale_amount\",\n \"mobile_conversion_lifetime_value_checkouts_initiated_metric\",\n \"mobile_conversion_lifetime_value_checkouts_initiated_order_quan\",\n \"mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun\",\n \"mobile_conversion_lifetime_value_content_views_metric\",\n \"mobile_conversion_lifetime_value_content_views_order_quantity\",\n \"mobile_conversion_lifetime_value_content_views_sale_amount\",\n \"mobile_conversion_lifetime_value_invites_metric\",\n \"mobile_conversion_lifetime_value_invites_order_quantity\",\n \"mobile_conversion_lifetime_value_invites_sale_amount\",\n \"mobile_conversion_lifetime_value_levels_achieved_metric\",\n \"mobile_conversion_lifetime_value_levels_achieved_order_quantity\",\n \"mobile_conversion_lifetime_value_levels_achieved_sale_amount\",\n \"mobile_conversion_lifetime_value_logins_metric\",\n \"mobile_conversion_lifetime_value_logins_order_quantity\",\n \"mobile_conversion_lifetime_value_logins_sale_amount\",\n \"mobile_conversion_lifetime_value_payment_info_additions_metric\",\n \"mobile_conversion_lifetime_value_payment_info_additions_order_q\",\n \"mobile_conversion_lifetime_value_payment_info_additions_sale_am\",\n \"mobile_conversion_lifetime_value_purchases_metric\",\n \"mobile_conversion_lifetime_value_purchases_order_quantity\",\n \"mobile_conversion_lifetime_value_purchases_sale_amount\",\n \"mobile_conversion_lifetime_value_rates_metric\",\n \"mobile_conversion_lifetime_value_rates_order_quantity\",\n \"mobile_conversion_lifetime_value_rates_sale_amount\",\n \"mobile_conversion_lifetime_value_reservations_metric\",\n \"mobile_conversion_lifetime_value_reservations_order_quantity\",\n \"mobile_conversion_lifetime_value_reservations_sale_amount\",\n \"mobile_conversion_lifetime_value_searches_metric\",\n \"mobile_conversion_lifetime_value_searches_order_quantity\",\n \"mobile_conversion_lifetime_value_searches_sale_amount\",\n \"mobile_conversion_lifetime_value_shares_metric\",\n \"mobile_conversion_lifetime_value_shares_order_quantity\",\n \"mobile_conversion_lifetime_value_shares_sale_amount\",\n \"mobile_conversion_lifetime_value_sign_ups_metric\",\n \"mobile_conversion_lifetime_value_sign_ups_order_quantity\",\n \"mobile_conversion_lifetime_value_sign_ups_sale_amount\",\n \"mobile_conversion_lifetime_value_spent_credits_metric\",\n \"mobile_conversion_lifetime_value_spent_credits_order_quantity\",\n \"mobile_conversion_lifetime_value_spent_credits_sale_amount\",\n \"mobile_conversion_lifetime_value_tutorials_completed_metric\",\n \"mobile_conversion_lifetime_value_tutorials_completed_order_quan\",\n \"mobile_conversion_lifetime_value_tutorials_completed_sale_amoun\",\n \"mobile_conversion_lifetime_value_updates_metric\",\n \"mobile_conversion_lifetime_value_updates_order_quantity\",\n \"mobile_conversion_lifetime_value_updates_sale_amount\",\n \"mobile_conversion_logins_assisted\",\n \"mobile_conversion_logins_order_quantity\",\n \"mobile_conversion_logins_post_engagement\",\n \"mobile_conversion_logins_post_view\",\n \"mobile_conversion_logins_sale_amount\",\n \"mobile_conversion_payment_info_additions_assisted\",\n \"mobile_conversion_payment_info_additions_order_quantity\",\n \"mobile_conversion_payment_info_additions_post_engagement\",\n \"mobile_conversion_payment_info_additions_post_view\",\n \"mobile_conversion_payment_info_additions_sale_amount\",\n \"mobile_conversion_purchases_assisted\",\n \"mobile_conversion_purchases_order_quantity\",\n \"mobile_conversion_purchases_post_engagement\",\n \"mobile_conversion_purchases_post_view\",\n \"mobile_conversion_purchases_sale_amount\",\n \"mobile_conversion_rates_assisted\",\n \"mobile_conversion_rates_order_quantity\",\n \"mobile_conversion_rates_post_engagement\",\n \"mobile_conversion_rates_post_view\",\n \"mobile_conversion_rates_sale_amount\",\n \"mobile_conversion_re_engages_assisted\",\n \"mobile_conversion_re_engages_order_quantity\",\n \"mobile_conversion_re_engages_post_engagement\",\n \"mobile_conversion_re_engages_post_view\",\n \"mobile_conversion_re_engages_sale_amount\",\n \"mobile_conversion_reservations_assisted\",\n \"mobile_conversion_reservations_order_quantity\",\n \"mobile_conversion_reservations_post_engagement\",\n \"mobile_conversion_reservations_post_view\",\n \"mobile_conversion_reservations_sale_amount\",\n \"mobile_conversion_searches_assisted\",\n \"mobile_conversion_searches_order_quantity\",\n \"mobile_conversion_searches_post_engagement\",\n \"mobile_conversion_searches_post_view\",\n \"mobile_conversion_searches_sale_amount\",\n \"mobile_conversion_shares_assisted\",\n \"mobile_conversion_shares_order_quantity\",\n \"mobile_conversion_shares_post_engagement\",\n \"mobile_conversion_shares_post_view\",\n \"mobile_conversion_shares_sale_amount\",\n \"mobile_conversion_sign_ups_assisted\",\n \"mobile_conversion_sign_ups_order_quantity\",\n \"mobile_conversion_sign_ups_post_engagement\",\n \"mobile_conversion_sign_ups_post_view\",\n \"mobile_conversion_sign_ups_sale_amount\",\n \"mobile_conversion_site_visits_order_quantity\",\n \"mobile_conversion_site_visits_post_engagement\",\n \"mobile_conversion_site_visits_post_view\",\n \"mobile_conversion_site_visits_sale_amount\",\n \"mobile_conversion_spent_credits_assisted\",\n \"mobile_conversion_spent_credits_order_quantity\",\n \"mobile_conversion_spent_credits_post_engagement\",\n \"mobile_conversion_spent_credits_post_view\",\n \"mobile_conversion_spent_credits_sale_amount\",\n \"mobile_conversion_tutorials_completed_assisted\",\n \"mobile_conversion_tutorials_completed_order_quantity\",\n \"mobile_conversion_tutorials_completed_post_engagement\",\n \"mobile_conversion_tutorials_completed_post_view\",\n \"mobile_conversion_tutorials_completed_sale_amount\",\n \"mobile_conversion_updates_assisted\",\n \"mobile_conversion_updates_order_quantity\",\n \"mobile_conversion_updates_post_engagement\",\n \"mobile_conversion_updates_post_view\",\n \"mobile_conversion_updates_sale_amount\",\n \"poll_card_vote\",\n \"qualified_impressions\",\n \"replies\",\n \"retweets\",\n \"tweets_send\",\n \"unfollows\",\n \"url_clicks\",\n \"video_3_s_100_pct_views\",\n \"video_6_s_views\",\n \"video_content_starts\",\n \"video_cta_clicks\",\n \"video_mrc_views\",\n \"video_total_views\",\n \"video_views_100\",\n \"video_views_25\",\n \"video_views_50\",\n \"video_views_75\",\n \"mobile_conversion_installs_skan_post_engagement\",\n \"mobile_conversion_installs_skan_post_view\",\n \"mobile_conversion_purchases_skan_post_engagement\",\n \"mobile_conversion_purchases_skan_post_view\",\n \"video_15_s_views\",\n \"auto_created_conversion_landing_page_view\",\n \"auto_created_conversion_session\"\n from \"postgres\".\"public\".\"twitter_line_item_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__account_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__account_history_tmp", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/tmp/stg_twitter_ads__account_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_twitter_ads__account_history_tmp.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__account_history_tmp", "fqn": ["twitter_ads", "staging", "tmp", "stg_twitter_ads__account_history_tmp"], "alias": "stg_twitter_ads__account_history_tmp", "checksum": {"name": "sha256", "checksum": "fbdce56610b1d55177125431103ff0a3329cec21827266bc1c4b852d13bf48b2"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708218.8303041, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__account_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\n{% if var('twitter_ads_union_schemas', []) | length > 0 or var('twitter_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='account_history', \n database_variable='twitter_ads_database', \n schema_variable='twitter_ads_schema', \n default_database=target.database,\n default_schema='twitter_ads',\n default_variable='account_history',\n union_schema_variable='twitter_ads_union_schemas',\n union_database_variable='twitter_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='twitter_ads_sources',\n single_source_name='twitter_ads',\n single_table_name='account_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["twitter_ads", "account_history"], ["twitter_ads", "account_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.twitter_ads.twitter_ads.account_history"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/tmp/stg_twitter_ads__account_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: twitter_ads_account_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: twitter_account_history_data\n\n\n select\n \"_fivetran_synced\",\n \"approval_status\",\n \"business_id\",\n \"business_name\",\n \"created_at\",\n \"deleted\",\n \"id\",\n \"industry_type\",\n \"name\",\n \"salt\",\n \"timezone\",\n \"timezone_switch_at\",\n \"updated_at\"\n from \"postgres\".\"public\".\"twitter_account_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__promoted_tweet_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__promoted_tweet_history_tmp", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/tmp/stg_twitter_ads__promoted_tweet_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_twitter_ads__promoted_tweet_history_tmp.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__promoted_tweet_history_tmp", "fqn": ["twitter_ads", "staging", "tmp", "stg_twitter_ads__promoted_tweet_history_tmp"], "alias": "stg_twitter_ads__promoted_tweet_history_tmp", "checksum": {"name": "sha256", "checksum": "194a9c37fbc2f8c998914c8c8cd6a2a6f7309764fe335ad4da371765d9334bf7"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708218.8409123, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\n{% if var('twitter_ads_union_schemas', []) | length > 0 or var('twitter_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='promoted_tweet_history',\n database_variable='twitter_ads_database',\n schema_variable='twitter_ads_schema',\n default_database=target.database,\n default_schema='twitter_ads',\n default_variable='promoted_tweet_history',\n union_schema_variable='twitter_ads_union_schemas',\n union_database_variable='twitter_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='twitter_ads_sources',\n single_source_name='twitter_ads',\n single_table_name='promoted_tweet_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["twitter_ads", "promoted_tweet_history"], ["twitter_ads", "promoted_tweet_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.twitter_ads.twitter_ads.promoted_tweet_history"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/tmp/stg_twitter_ads__promoted_tweet_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: twitter_ads_promoted_tweet_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: twitter_promoted_tweet_history_data\n\n\n select\n \"_fivetran_synced\",\n \"approval_status\",\n \"created_at\",\n \"deleted\",\n \"entity_status\",\n \"id\",\n \"line_item_id\",\n \"tweet_id\",\n \"updated_at\"\n from \"postgres\".\"public\".\"twitter_promoted_tweet_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__line_item_keywords_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__line_item_keywords_report_tmp", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/tmp/stg_twitter_ads__line_item_keywords_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_twitter_ads__line_item_keywords_report_tmp.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__line_item_keywords_report_tmp", "fqn": ["twitter_ads", "staging", "tmp", "stg_twitter_ads__line_item_keywords_report_tmp"], "alias": "stg_twitter_ads__line_item_keywords_report_tmp", "checksum": {"name": "sha256", "checksum": "9be92960644cac6c631e79794d470796ba61396b181cf3519c58c6c44c2c4570"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708218.851707, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_keywords_report_tmp\"", "raw_code": "{{ config(enabled=fivetran_utils.enabled_vars(['ad_reporting__twitter_ads_enabled','twitter_ads__using_keywords'])) }}\n\n{% if var('twitter_ads_union_schemas', []) | length > 0 or var('twitter_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='line_item_keywords_report',\n database_variable='twitter_ads_database',\n schema_variable='twitter_ads_schema',\n default_database=target.database,\n default_schema='twitter_ads',\n default_variable='line_item_keywords_report',\n union_schema_variable='twitter_ads_union_schemas',\n union_database_variable='twitter_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='twitter_ads_sources',\n single_source_name='twitter_ads',\n single_table_name='line_item_keywords_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["twitter_ads", "line_item_keywords_report"], ["twitter_ads", "line_item_keywords_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.enabled_vars", "macro.fivetran_utils.union_connections"], "nodes": ["source.twitter_ads.twitter_ads.line_item_keywords_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/tmp/stg_twitter_ads__line_item_keywords_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: twitter_ads_line_item_keywords_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: twitter_line_item_keywords_report_data\n\n\n select\n \"account_id\",\n \"date\",\n \"line_item_id\",\n \"placement\",\n \"segment\",\n \"_fivetran_synced\",\n \"app_clicks\",\n \"billed_charge_local_micro\",\n \"billed_engagements\",\n \"card_engagements\",\n \"carousel_swipes\",\n \"clicks\",\n \"conversion_custom_metric\",\n \"conversion_custom_order_quantity\",\n \"conversion_custom_order_quantity_engagement\",\n \"conversion_custom_order_quantity_view\",\n \"conversion_custom_post_engagement\",\n \"conversion_custom_post_view\",\n \"conversion_custom_sale_amount\",\n \"conversion_custom_sale_amount_engagement\",\n \"conversion_custom_sale_amount_view\",\n \"conversion_downloads_metric\",\n \"conversion_downloads_order_quantity\",\n \"conversion_downloads_order_quantity_engagement\",\n \"conversion_downloads_order_quantity_view\",\n \"conversion_downloads_post_engagement\",\n \"conversion_downloads_post_view\",\n \"conversion_downloads_sale_amount\",\n \"conversion_downloads_sale_amount_engagement\",\n \"conversion_downloads_sale_amount_view\",\n \"conversion_purchases_assisted\",\n \"conversion_purchases_metric\",\n \"conversion_purchases_order_quantity\",\n \"conversion_purchases_order_quantity_engagement\",\n \"conversion_purchases_order_quantity_view\",\n \"conversion_purchases_post_engagement\",\n \"conversion_purchases_post_view\",\n \"conversion_purchases_sale_amount\",\n \"conversion_purchases_sale_amount_engagement\",\n \"conversion_purchases_sale_amount_view\",\n \"conversion_sign_ups_assisted\",\n \"conversion_sign_ups_metric\",\n \"conversion_sign_ups_order_quantity\",\n \"conversion_sign_ups_order_quantity_engagement\",\n \"conversion_sign_ups_order_quantity_view\",\n \"conversion_sign_ups_post_engagement\",\n \"conversion_sign_ups_post_view\",\n \"conversion_sign_ups_sale_amount\",\n \"conversion_sign_ups_sale_amount_engagement\",\n \"conversion_sign_ups_sale_amount_view\",\n \"conversion_site_visits_metric\",\n \"conversion_site_visits_order_quantity\",\n \"conversion_site_visits_order_quantity_engagement\",\n \"conversion_site_visits_order_quantity_view\",\n \"conversion_site_visits_post_engagement\",\n \"conversion_site_visits_post_view\",\n \"conversion_site_visits_sale_amount\",\n \"conversion_site_visits_sale_amount_engagement\",\n \"conversion_site_visits_sale_amount_view\",\n \"engagements\",\n \"follows\",\n \"impressions\",\n \"likes\",\n \"media_engagements\",\n \"media_views\",\n \"mobile_conversion_achievements_unlocked_assisted\",\n \"mobile_conversion_achievements_unlocked_order_quantity\",\n \"mobile_conversion_achievements_unlocked_post_engagement\",\n \"mobile_conversion_achievements_unlocked_post_view\",\n \"mobile_conversion_achievements_unlocked_sale_amount\",\n \"mobile_conversion_add_to_carts_assisted\",\n \"mobile_conversion_add_to_carts_order_quantity\",\n \"mobile_conversion_add_to_carts_post_engagement\",\n \"mobile_conversion_add_to_carts_post_view\",\n \"mobile_conversion_add_to_carts_sale_amount\",\n \"mobile_conversion_add_to_wishlists_assisted\",\n \"mobile_conversion_add_to_wishlists_order_quantity\",\n \"mobile_conversion_add_to_wishlists_post_engagement\",\n \"mobile_conversion_add_to_wishlists_post_view\",\n \"mobile_conversion_add_to_wishlists_sale_amount\",\n \"mobile_conversion_checkouts_initiated_assisted\",\n \"mobile_conversion_checkouts_initiated_order_quantity\",\n \"mobile_conversion_checkouts_initiated_post_engagement\",\n \"mobile_conversion_checkouts_initiated_post_view\",\n \"mobile_conversion_checkouts_initiated_sale_amount\",\n \"mobile_conversion_content_views_assisted\",\n \"mobile_conversion_content_views_order_quantity\",\n \"mobile_conversion_content_views_post_engagement\",\n \"mobile_conversion_content_views_post_view\",\n \"mobile_conversion_content_views_sale_amount\",\n \"mobile_conversion_downloads_order_quantity\",\n \"mobile_conversion_downloads_post_engagement\",\n \"mobile_conversion_downloads_post_view\",\n \"mobile_conversion_downloads_sale_amount\",\n \"mobile_conversion_installs_assisted\",\n \"mobile_conversion_installs_order_quantity\",\n \"mobile_conversion_installs_post_engagement\",\n \"mobile_conversion_installs_post_view\",\n \"mobile_conversion_installs_sale_amount\",\n \"mobile_conversion_installs_skan_post_engagement\",\n \"mobile_conversion_installs_skan_post_view\",\n \"mobile_conversion_invites_assisted\",\n \"mobile_conversion_invites_order_quantity\",\n \"mobile_conversion_invites_post_engagement\",\n \"mobile_conversion_invites_post_view\",\n \"mobile_conversion_invites_sale_amount\",\n \"mobile_conversion_key_page_views_post_engagement\",\n \"mobile_conversion_key_page_views_post_view\",\n \"mobile_conversion_levels_achieved_assisted\",\n \"mobile_conversion_levels_achieved_order_quantity\",\n \"mobile_conversion_levels_achieved_post_engagement\",\n \"mobile_conversion_levels_achieved_post_view\",\n \"mobile_conversion_levels_achieved_sale_amount\",\n \"mobile_conversion_lifetime_value_achievements_unlocked_metric\",\n \"mobile_conversion_lifetime_value_achievements_unlocked_order_qu\",\n \"mobile_conversion_lifetime_value_achievements_unlocked_sale_amo\",\n \"mobile_conversion_lifetime_value_add_to_carts_metric\",\n \"mobile_conversion_lifetime_value_add_to_carts_order_quantity\",\n \"mobile_conversion_lifetime_value_add_to_carts_sale_amount\",\n \"mobile_conversion_lifetime_value_add_to_wishlists_metric\",\n \"mobile_conversion_lifetime_value_add_to_wishlists_order_quantit\",\n \"mobile_conversion_lifetime_value_add_to_wishlists_sale_amount\",\n \"mobile_conversion_lifetime_value_checkouts_initiated_metric\",\n \"mobile_conversion_lifetime_value_checkouts_initiated_order_quan\",\n \"mobile_conversion_lifetime_value_checkouts_initiated_sale_amoun\",\n \"mobile_conversion_lifetime_value_content_views_metric\",\n \"mobile_conversion_lifetime_value_content_views_order_quantity\",\n \"mobile_conversion_lifetime_value_content_views_sale_amount\",\n \"mobile_conversion_lifetime_value_invites_metric\",\n \"mobile_conversion_lifetime_value_invites_order_quantity\",\n \"mobile_conversion_lifetime_value_invites_sale_amount\",\n \"mobile_conversion_lifetime_value_levels_achieved_metric\",\n \"mobile_conversion_lifetime_value_levels_achieved_order_quantity\",\n \"mobile_conversion_lifetime_value_levels_achieved_sale_amount\",\n \"mobile_conversion_lifetime_value_logins_metric\",\n \"mobile_conversion_lifetime_value_logins_order_quantity\",\n \"mobile_conversion_lifetime_value_logins_sale_amount\",\n \"mobile_conversion_lifetime_value_payment_info_additions_metric\",\n \"mobile_conversion_lifetime_value_payment_info_additions_order_q\",\n \"mobile_conversion_lifetime_value_payment_info_additions_sale_am\",\n \"mobile_conversion_lifetime_value_purchases_metric\",\n \"mobile_conversion_lifetime_value_purchases_order_quantity\",\n \"mobile_conversion_lifetime_value_purchases_sale_amount\",\n \"mobile_conversion_lifetime_value_rates_metric\",\n \"mobile_conversion_lifetime_value_rates_order_quantity\",\n \"mobile_conversion_lifetime_value_rates_sale_amount\",\n \"mobile_conversion_lifetime_value_reservations_metric\",\n \"mobile_conversion_lifetime_value_reservations_order_quantity\",\n \"mobile_conversion_lifetime_value_reservations_sale_amount\",\n \"mobile_conversion_lifetime_value_searches_metric\",\n \"mobile_conversion_lifetime_value_searches_order_quantity\",\n \"mobile_conversion_lifetime_value_searches_sale_amount\",\n \"mobile_conversion_lifetime_value_shares_metric\",\n \"mobile_conversion_lifetime_value_shares_order_quantity\",\n \"mobile_conversion_lifetime_value_shares_sale_amount\",\n \"mobile_conversion_lifetime_value_sign_ups_metric\",\n \"mobile_conversion_lifetime_value_sign_ups_order_quantity\",\n \"mobile_conversion_lifetime_value_sign_ups_sale_amount\",\n \"mobile_conversion_lifetime_value_spent_credits_metric\",\n \"mobile_conversion_lifetime_value_spent_credits_order_quantity\",\n \"mobile_conversion_lifetime_value_spent_credits_sale_amount\",\n \"mobile_conversion_lifetime_value_tutorials_completed_metric\",\n \"mobile_conversion_lifetime_value_tutorials_completed_order_quan\",\n \"mobile_conversion_lifetime_value_tutorials_completed_sale_amoun\",\n \"mobile_conversion_lifetime_value_updates_metric\",\n \"mobile_conversion_lifetime_value_updates_order_quantity\",\n \"mobile_conversion_lifetime_value_updates_sale_amount\",\n \"mobile_conversion_logins_assisted\",\n \"mobile_conversion_logins_order_quantity\",\n \"mobile_conversion_logins_post_engagement\",\n \"mobile_conversion_logins_post_view\",\n \"mobile_conversion_logins_sale_amount\",\n \"mobile_conversion_payment_info_additions_assisted\",\n \"mobile_conversion_payment_info_additions_order_quantity\",\n \"mobile_conversion_payment_info_additions_post_engagement\",\n \"mobile_conversion_payment_info_additions_post_view\",\n \"mobile_conversion_payment_info_additions_sale_amount\",\n \"mobile_conversion_purchases_assisted\",\n \"mobile_conversion_purchases_order_quantity\",\n \"mobile_conversion_purchases_post_engagement\",\n \"mobile_conversion_purchases_post_view\",\n \"mobile_conversion_purchases_sale_amount\",\n \"mobile_conversion_purchases_skan_post_engagement\",\n \"mobile_conversion_purchases_skan_post_view\",\n \"mobile_conversion_rates_assisted\",\n \"mobile_conversion_rates_order_quantity\",\n \"mobile_conversion_rates_post_engagement\",\n \"mobile_conversion_rates_post_view\",\n \"mobile_conversion_rates_sale_amount\",\n \"mobile_conversion_re_engages_assisted\",\n \"mobile_conversion_re_engages_order_quantity\",\n \"mobile_conversion_re_engages_post_engagement\",\n \"mobile_conversion_re_engages_post_view\",\n \"mobile_conversion_re_engages_sale_amount\",\n \"mobile_conversion_reservations_assisted\",\n \"mobile_conversion_reservations_order_quantity\",\n \"mobile_conversion_reservations_post_engagement\",\n \"mobile_conversion_reservations_post_view\",\n \"mobile_conversion_reservations_sale_amount\",\n \"mobile_conversion_searches_assisted\",\n \"mobile_conversion_searches_order_quantity\",\n \"mobile_conversion_searches_post_engagement\",\n \"mobile_conversion_searches_post_view\",\n \"mobile_conversion_searches_sale_amount\",\n \"mobile_conversion_shares_assisted\",\n \"mobile_conversion_shares_order_quantity\",\n \"mobile_conversion_shares_post_engagement\",\n \"mobile_conversion_shares_post_view\",\n \"mobile_conversion_shares_sale_amount\",\n \"mobile_conversion_sign_ups_assisted\",\n \"mobile_conversion_sign_ups_order_quantity\",\n \"mobile_conversion_sign_ups_post_engagement\",\n \"mobile_conversion_sign_ups_post_view\",\n \"mobile_conversion_sign_ups_sale_amount\",\n \"mobile_conversion_site_visits_order_quantity\",\n \"mobile_conversion_site_visits_post_engagement\",\n \"mobile_conversion_site_visits_post_view\",\n \"mobile_conversion_site_visits_sale_amount\",\n \"mobile_conversion_spent_credits_assisted\",\n \"mobile_conversion_spent_credits_order_quantity\",\n \"mobile_conversion_spent_credits_post_engagement\",\n \"mobile_conversion_spent_credits_post_view\",\n \"mobile_conversion_spent_credits_sale_amount\",\n \"mobile_conversion_tutorials_completed_assisted\",\n \"mobile_conversion_tutorials_completed_order_quantity\",\n \"mobile_conversion_tutorials_completed_post_engagement\",\n \"mobile_conversion_tutorials_completed_post_view\",\n \"mobile_conversion_tutorials_completed_sale_amount\",\n \"mobile_conversion_updates_assisted\",\n \"mobile_conversion_updates_order_quantity\",\n \"mobile_conversion_updates_post_engagement\",\n \"mobile_conversion_updates_post_view\",\n \"mobile_conversion_updates_sale_amount\",\n \"poll_card_vote\",\n \"qualified_impressions\",\n \"replies\",\n \"retweets\",\n \"tweets_send\",\n \"unfollows\",\n \"url_clicks\",\n \"video_15_s_views\",\n \"video_3_s_100_pct_views\",\n \"video_6_s_views\",\n \"video_content_starts\",\n \"video_cta_clicks\",\n \"video_total_views\",\n \"video_views_100\",\n \"video_views_25\",\n \"video_views_50\",\n \"video_views_75\"\n from \"postgres\".\"public\".\"twitter_line_item_keywords_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__tweet_url_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__tweet_url_tmp", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/tmp/stg_twitter_ads__tweet_url_tmp.sql", "original_file_path": "models/staging/tmp/stg_twitter_ads__tweet_url_tmp.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__tweet_url_tmp", "fqn": ["twitter_ads", "staging", "tmp", "stg_twitter_ads__tweet_url_tmp"], "alias": "stg_twitter_ads__tweet_url_tmp", "checksum": {"name": "sha256", "checksum": "a48de17d2405d27d360ed8e3d34984fa75638653c23cbd2e5caaf2c13651460f"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708218.8634903, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__tweet_url_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\n{% if var('twitter_ads_union_schemas', []) | length > 0 or var('twitter_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='tweet_url',\n database_variable='twitter_ads_database',\n schema_variable='twitter_ads_schema',\n default_database=target.database,\n default_schema='twitter_ads',\n default_variable='tweet_url',\n union_schema_variable='twitter_ads_union_schemas',\n union_database_variable='twitter_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='twitter_ads_sources',\n single_source_name='twitter_ads',\n single_table_name='tweet_url'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["twitter_ads", "tweet_url"], ["twitter_ads", "tweet_url"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.twitter_ads.twitter_ads.tweet_url"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/tmp/stg_twitter_ads__tweet_url_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: twitter_ads_tweet_url_identifier\n -- database: postgres \n -- schema: public\n -- identifier: twitter_tweet_url_data\n\n\n select\n \"_fivetran_synced\",\n \"display_url\",\n \"expanded_url\",\n \"index\",\n \"indices\",\n \"tweet_id\",\n \"url\"\n from \"postgres\".\"public\".\"twitter_tweet_url_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.twitter_ads.stg_twitter_ads__tweet_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_twitter_ads__tweet_tmp", "resource_type": "model", "package_name": "twitter_ads", "path": "staging/tmp/stg_twitter_ads__tweet_tmp.sql", "original_file_path": "models/staging/tmp/stg_twitter_ads__tweet_tmp.sql", "unique_id": "model.twitter_ads.stg_twitter_ads__tweet_tmp", "fqn": ["twitter_ads", "staging", "tmp", "stg_twitter_ads__tweet_tmp"], "alias": "stg_twitter_ads__tweet_tmp", "checksum": {"name": "sha256", "checksum": "02451ebf2b9df4e25513839dacdab686cc64ca5d7373ee1532df6ad49ba2a1f7"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708218.8741255, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__tweet_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__twitter_ads_enabled', True)) }}\n\n{% if var('twitter_ads_union_schemas', []) | length > 0 or var('twitter_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='tweet',\n database_variable='twitter_ads_database',\n schema_variable='twitter_ads_schema',\n default_database=target.database,\n default_schema='twitter_ads',\n default_variable='tweet',\n union_schema_variable='twitter_ads_union_schemas',\n union_database_variable='twitter_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='twitter_ads_sources',\n single_source_name='twitter_ads',\n single_table_name='tweet'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["twitter_ads", "tweet"], ["twitter_ads", "tweet"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.twitter_ads.twitter_ads.tweet"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/tmp/stg_twitter_ads__tweet_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: twitter_ads_tweet_identifier\n -- database: postgres \n -- schema: public\n -- identifier: twitter_tweet_data\n\n\n select\n \"id\",\n \"_fivetran_synced\",\n \"account_id\",\n \"card_uri\",\n \"coordinates_coordinates\",\n \"coordinates_type\",\n \"created_at\",\n \"favorite_count\",\n \"favorited\",\n \"followers\",\n \"full_text\",\n \"geo_coordinates\",\n \"geo_type\",\n \"in_reply_to_screen_name\",\n \"in_reply_to_status_id\",\n \"in_reply_to_user_id\",\n \"lang\",\n \"media_key\",\n \"retweet_count\",\n \"retweeted\",\n \"source\",\n \"truncated\",\n \"tweet_type\",\n \"user_id\",\n \"name\"\n from \"postgres\".\"public\".\"twitter_tweet_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.ad_reporting__keyword_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "ad_reporting__keyword_report", "resource_type": "model", "package_name": "ad_reporting", "path": "ad_reporting__keyword_report.sql", "original_file_path": "models/ad_reporting__keyword_report.sql", "unique_id": "model.ad_reporting.ad_reporting__keyword_report", "fqn": ["ad_reporting", "ad_reporting__keyword_report"], "alias": "ad_reporting__keyword_report", "checksum": {"name": "sha256", "checksum": "ed5e69f41036f0af7af5037ebe26b0456a3dca8ff9b775c919d18f1c35156bb2"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents daily metrics by keyword, ad group, campaign and account.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.date_day"]}, "platform": {"name": "platform", "description": "The ad platform associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.platform"]}, "account_id": {"name": "account_id", "description": "The ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_id"]}, "account_name": {"name": "account_name", "description": "The name of the account, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID representing the campaign, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.campaign_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID representing the ad group, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the ad group, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.ad_group_name"]}, "keyword_id": {"name": "keyword_id", "description": "The ID representing the keyword, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.keyword_id"]}, "keyword_text": {"name": "keyword_text", "description": "The keyword text.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.keyword_text"]}, "keyword_match_type": {"name": "keyword_match_type", "description": "The keyword match type associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.keyword_match_type"]}, "clicks": {"name": "clicks", "description": "The count of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.clicks"]}, "impressions": {"name": "impressions", "description": "The count of impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.impressions"]}, "spend": {"name": "spend", "description": "The cost of the ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.spend"]}, "conversions": {"name": "conversions", "description": "The count of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The monetary value of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "ad_reporting://models/ad_reporting_models.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.5487177, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__keyword_report\"", "raw_code": "{% set include_list = ['amazon_ads', 'apple_search_ads', 'google_ads', 'microsoft_ads'] %}\n{% do include_list.append('pinterest_ads') if var('pinterest__using_keywords', true) %}\n{% do include_list.append('twitter_ads') if var('twitter_ads__using_keywords', true) %}\n\n{% set enabled_packages = get_enabled_packages(include=include_list)%}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith base as (\n\n select *\n from {{ ref('int_ad_reporting__keyword_report') }}\n),\n\naggregated as (\n \n select\n source_relation,\n date_day,\n platform,\n account_id,\n account_name,\n campaign_id,\n campaign_name,\n ad_group_id,\n ad_group_name,\n keyword_id,\n keyword_text,\n keyword_match_type,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value\n\n {{ ad_reporting_persist_pass_through_columns(pass_through_variable='ad_reporting__keyword_passthrough_metrics', transform = 'sum', alias_fields=['conversions', 'conversions_value']) }}\n\n from base\n {{ dbt_utils.group_by(12) }}\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_ad_reporting__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.ad_reporting_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.ad_reporting.int_ad_reporting__keyword_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting__keyword_report.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\nwith __dbt__cte__int_ad_reporting__keyword_report as (\n\n\n\n\n\n\n\nwith\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__keyword_report\"\n\n),\n\n\n\ngoogle_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(criterion_id as TEXT) as keyword_id\n\n \n ,cast(keyword_match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__keyword_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_name as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__keyword_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_value as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__keyword_report\"\n\n),\n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(line_item_id as TEXT) as ad_group_id\n\n \n ,cast(line_item_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(null as TEXT) as keyword_match_type\n\n \n ,cast(keyword as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__keyword_report\"\n\n), \n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__keyword_report\"\n\n), \n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from twitter_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n), base as (\n\n select *\n from __dbt__cte__int_ad_reporting__keyword_report\n),\n\naggregated as (\n \n select\n source_relation,\n date_day,\n platform,\n account_id,\n account_name,\n campaign_id,\n campaign_name,\n ad_group_id,\n ad_group_name,\n keyword_id,\n keyword_text,\n keyword_match_type,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value\n\n \n\n\n\n\n\n from base\n group by 1,2,3,4,5,6,7,8,9,10,11,12\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.ad_reporting.int_ad_reporting__keyword_report", "sql": " __dbt__cte__int_ad_reporting__keyword_report as (\n\n\n\n\n\n\n\nwith\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__keyword_report\"\n\n),\n\n\n\ngoogle_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(criterion_id as TEXT) as keyword_id\n\n \n ,cast(keyword_match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__keyword_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_name as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__keyword_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_value as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__keyword_report\"\n\n),\n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(line_item_id as TEXT) as ad_group_id\n\n \n ,cast(line_item_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(null as TEXT) as keyword_match_type\n\n \n ,cast(keyword as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__keyword_report\"\n\n), \n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__keyword_report\"\n\n), \n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from twitter_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.ad_reporting__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "ad_reporting__campaign_report", "resource_type": "model", "package_name": "ad_reporting", "path": "ad_reporting__campaign_report.sql", "original_file_path": "models/ad_reporting__campaign_report.sql", "unique_id": "model.ad_reporting.ad_reporting__campaign_report", "fqn": ["ad_reporting", "ad_reporting__campaign_report"], "alias": "ad_reporting__campaign_report", "checksum": {"name": "sha256", "checksum": "47f504069deefb56c5c643f6189cde8184fdc3c802242edfeb182e4010ad4323"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents daily metrics by campaign and account.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.date_day"]}, "platform": {"name": "platform", "description": "The ad platform associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.platform"]}, "account_id": {"name": "account_id", "description": "The ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_id"]}, "account_name": {"name": "account_name", "description": "The name of the account, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID representing the campaign, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.campaign_name"]}, "clicks": {"name": "clicks", "description": "The count of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.clicks"]}, "impressions": {"name": "impressions", "description": "The count of impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.impressions"]}, "spend": {"name": "spend", "description": "The cost of the ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.spend"]}, "conversions": {"name": "conversions", "description": "The count of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The monetary value of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "ad_reporting://models/ad_reporting_models.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.5473654, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__campaign_report\"", "raw_code": "{% set enabled_packages = get_enabled_packages() %}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith base as (\n\n select *\n from {{ ref('int_ad_reporting__campaign_report') }}\n),\n\naggregated as (\n \n select\n source_relation,\n date_day,\n platform,\n account_id,\n account_name,\n campaign_id,\n campaign_name,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value\n\n {{ ad_reporting_persist_pass_through_columns(pass_through_variable='ad_reporting__campaign_passthrough_metrics', transform = 'sum', alias_fields=['conversions', 'conversions_value']) }}\n\n from base\n {{ dbt_utils.group_by(7) }}\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_ad_reporting__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.ad_reporting_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.ad_reporting.int_ad_reporting__campaign_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting__campaign_report.sql", "compiled": true, "compiled_code": "\n\n\nwith __dbt__cte__int_ad_reporting__campaign_report as (\n\n\n\nwith\n\n\nfacebook_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__campaign_report\"\n\n),\n\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__campaign_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_report\"\n\n),\n\n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__campaign_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__campaign_group_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__campaign_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_report\"\n\n),\n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__campaign_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__campaign_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n), base as (\n\n select *\n from __dbt__cte__int_ad_reporting__campaign_report\n),\n\naggregated as (\n \n select\n source_relation,\n date_day,\n platform,\n account_id,\n account_name,\n campaign_id,\n campaign_name,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value\n\n \n\n\n\n\n\n from base\n group by 1,2,3,4,5,6,7\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.ad_reporting.int_ad_reporting__campaign_report", "sql": " __dbt__cte__int_ad_reporting__campaign_report as (\n\n\n\nwith\n\n\nfacebook_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__campaign_report\"\n\n),\n\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__campaign_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_report\"\n\n),\n\n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__campaign_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__campaign_group_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__campaign_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_report\"\n\n),\n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__campaign_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__campaign_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.ad_reporting__monthly_campaign_country_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "ad_reporting__monthly_campaign_country_report", "resource_type": "model", "package_name": "ad_reporting", "path": "ad_reporting__monthly_campaign_country_report.sql", "original_file_path": "models/ad_reporting__monthly_campaign_country_report.sql", "unique_id": "model.ad_reporting.ad_reporting__monthly_campaign_country_report", "fqn": ["ad_reporting", "ad_reporting__monthly_campaign_country_report"], "alias": "ad_reporting__monthly_campaign_country_report", "checksum": {"name": "sha256", "checksum": "65092884ae2e8e9de1d891358ddbb6cc362d4c56fd32fb63ab3d44328c144590"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents monthly metrics by campaign and country. Country names are standardized to ISO-3166 names.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.source_relation"]}, "date_month": {"name": "date_month", "description": "Month of the record, truncated to the first day of the month.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "platform": {"name": "platform", "description": "The ad platform associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.platform"]}, "account_id": {"name": "account_id", "description": "The ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_id"]}, "account_name": {"name": "account_name", "description": "The name of the account, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID representing the campaign, if present in the source data. Facebook Ads presents country data only at the account level and will have a null value for this field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign, if present in the source data. Facebook Ads presents country data only at the account level and will have a value of `Account-level` for this field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.clicks"]}, "impressions": {"name": "impressions", "description": "The count of impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.impressions"]}, "spend": {"name": "spend", "description": "The cost of the ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.spend"]}, "conversions": {"name": "conversions", "description": "The count of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The monetary value of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions_value"]}, "country": {"name": "country", "description": "Standardized ISO-3166 name of the country where the campaign was served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country_code": {"name": "country_code", "description": "ISO-3166 two-letter code of the country where the campaign was served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "global_region": {"name": "global_region", "description": "Greater global region in which the country is located.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "ad_reporting://models/ad_reporting_models.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.5538168, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__monthly_campaign_country_report\"", "raw_code": "{% set include_list = [] %}\n{% do include_list.append('facebook_ads') if var('facebook_ads__using_demographics_country', false) %}\n{% do include_list.append('linkedin_ads') if var('linkedin_ads__using_geo', true) and var('linkedin_ads__using_monthly_ad_analytics_by_member_country', true) %}\n{% do include_list.append('microsoft_ads') if var('microsoft_ads__using_geographic_daily_report', false) %}\n{% do include_list.append('pinterest_ads') if var('pinterest__using_pin_promotion_targeting_report', true) and var('pinterest__using_targeting_geo', true) %}\n{% do include_list.append('reddit_ads') if var('reddit_ads__using_campaign_country_report', true) %}\n{% do include_list.append('snapchat_ads') if var('snapchat_ads__using_campaign_country_report', false) %}\n{% do include_list.append('tiktok_ads') if var('tiktok_ads__using_campaign_country_report', true) %}\n{% do include_list.append('twitter_ads') if var('twitter_ads__using_campaign_locations_report', false) %}\n\n{% set enabled_packages = get_enabled_packages(include=include_list)%}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith base as (\n\n select *\n from {{ ref('int_ad_reporting__monthly_campaign_country_report') }}\n),\n\ncountry_mapping as (\n\n select *\n from {{ ref('int_ad_reporting__country_mapping') }}\n),\n\n{# Before grabbing the country codes or names for platforms that only provide the codes, let's standardize the existing country names #}\nstandardize_country_names as (\n\n select \n base.*,\n coalesce(country_mapping.country_name, base.country) as standardized_alt_country_name\n\n from base \n left join country_mapping\n on base.country = country_mapping.alternative_country_name\n),\n\n{# Now grab the country names for platforms that only provide codes and vice versa #}\nmap_countries_and_codes as (\n\n select \n standardize_country_names.*,\n coalesce(standardize_country_names.standardized_alt_country_name, country_mapping.country_name) as standardized_country,\n coalesce(standardize_country_names.country_code, country_mapping.country_code) as standardized_country_code,\n country_mapping.global_region\n\n from standardize_country_names \n left join country_mapping\n on standardize_country_names.standardized_alt_country_name = country_mapping.country_name\n or standardize_country_names.country_code = country_mapping.country_code\n),\n\naggregated as (\n \n select\n source_relation,\n cast({{ dbt.date_trunc(\"month\", \"date_day\") }} as date) as date_month,\n platform,\n account_id,\n account_name,\n campaign_id,\n campaign_name,\n standardized_country as country,\n standardized_country_code as country_code,\n global_region,\n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n\n {{ ad_reporting_persist_pass_through_columns(pass_through_variable='ad_reporting__country_passthrough_metrics', transform = 'sum', alias_fields=['conversions', 'conversions_value']) }}\n\n from map_countries_and_codes\n {{ dbt_utils.group_by(10) }}\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_ad_reporting__monthly_campaign_country_report", "package": null, "version": null}, {"name": "int_ad_reporting__country_mapping", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.dbt.date_trunc", "macro.ad_reporting.ad_reporting_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.ad_reporting.int_ad_reporting__monthly_campaign_country_report", "model.ad_reporting.int_ad_reporting__country_mapping"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting__monthly_campaign_country_report.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n\n\n\n\n\n\nwith __dbt__cte__int_ad_reporting__monthly_campaign_country_report as (\n\n\n\n\n\n\n\n\n\n\n\n\n\nwith \n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(null as TEXT) as campaign_id\n\n \n ,cast('Account-level' as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(null as TEXT) as country\n\n \n ,cast(replace(country, 'unknown', 'Unknown') as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__country_report\"\n\n),\n\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_month)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(replace(country_name, 'Hong Kong SAR', 'Hong Kong SAR China') as TEXT) as country\n\n \n ,cast(null as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__monthly_campaign_country_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(country as TEXT) as country\n\n \n ,cast(null as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_country_report\"\n\n),\n\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(replace(country_name, 'U.S.', 'United States') as TEXT) as country\n\n \n ,cast(country_id as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_country_report\"\n\n),\n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(null as TEXT) as country\n\n \n ,cast(country as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__campaign_country_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(null as TEXT) as country\n\n \n ,cast(country as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_country_report\"\n\n),\n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(country_name as TEXT) as country\n\n \n ,cast(country_code as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__campaign_country_report\"\n\n),\n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(country as TEXT) as country\n\n \n ,cast(null as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_country_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from facebook_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n), __dbt__cte__int_ad_reporting__country_mapping as (\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nwith create_country_mapping as (\n select\n 'Afghanistan' as country_name,\n '' as alternative_country_name,\n 'AF' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n '\u00c5land Islands' as country_name,\n '' as alternative_country_name,\n 'AX' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Albania' as country_name,\n '' as alternative_country_name,\n 'AL' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Algeria' as country_name,\n '' as alternative_country_name,\n 'DZ' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'American Samoa' as country_name,\n '' as alternative_country_name,\n 'AS' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Andorra' as country_name,\n '' as alternative_country_name,\n 'AD' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Angola' as country_name,\n '' as alternative_country_name,\n 'AO' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Anguilla' as country_name,\n '' as alternative_country_name,\n 'AI' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Antarctica' as country_name,\n '' as alternative_country_name,\n 'AQ' as country_code,\n '' as global_region\n\n union all \n \n select\n 'Antigua and Barbuda' as country_name,\n '' as alternative_country_name,\n 'AG' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Argentina' as country_name,\n '' as alternative_country_name,\n 'AR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Armenia' as country_name,\n '' as alternative_country_name,\n 'AM' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Aruba' as country_name,\n '' as alternative_country_name,\n 'AW' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Australia' as country_name,\n '' as alternative_country_name,\n 'AU' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Austria' as country_name,\n '' as alternative_country_name,\n 'AT' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Azerbaijan' as country_name,\n '' as alternative_country_name,\n 'AZ' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Bahamas' as country_name,\n '' as alternative_country_name,\n 'BS' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Bahrain' as country_name,\n '' as alternative_country_name,\n 'BH' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Bangladesh' as country_name,\n '' as alternative_country_name,\n 'BD' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Barbados' as country_name,\n '' as alternative_country_name,\n 'BB' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Belarus' as country_name,\n '' as alternative_country_name,\n 'BY' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Belgium' as country_name,\n '' as alternative_country_name,\n 'BE' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Belize' as country_name,\n '' as alternative_country_name,\n 'BZ' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Benin' as country_name,\n '' as alternative_country_name,\n 'BJ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Bermuda' as country_name,\n '' as alternative_country_name,\n 'BM' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'Bhutan' as country_name,\n '' as alternative_country_name,\n 'BT' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Bolivia (Plurinational State of)' as country_name,\n 'Bolivia' as alternative_country_name,\n 'BO' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Bonaire, Sint Eustatius and Saba' as country_name,\n '' as alternative_country_name,\n 'BQ' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Bosnia and Herzegovina' as country_name,\n '' as alternative_country_name,\n 'BA' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Botswana' as country_name,\n '' as alternative_country_name,\n 'BW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Bouvet Island' as country_name,\n '' as alternative_country_name,\n 'BV' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Brazil' as country_name,\n '' as alternative_country_name,\n 'BR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'British Indian Ocean Territory' as country_name,\n '' as alternative_country_name,\n 'IO' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Brunei Darussalam' as country_name,\n 'Brunei' as alternative_country_name,\n 'BN' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Bulgaria' as country_name,\n '' as alternative_country_name,\n 'BG' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Burkina Faso' as country_name,\n '' as alternative_country_name,\n 'BF' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Burundi' as country_name,\n '' as alternative_country_name,\n 'BI' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Cabo Verde' as country_name,\n 'Cape Verde' as alternative_country_name,\n 'CV' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Cambodia' as country_name,\n '' as alternative_country_name,\n 'KH' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Cameroon' as country_name,\n '' as alternative_country_name,\n 'CM' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Canada' as country_name,\n '' as alternative_country_name,\n 'CA' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'Cayman Islands' as country_name,\n '' as alternative_country_name,\n 'KY' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Central African Republic' as country_name,\n '' as alternative_country_name,\n 'CF' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Chad' as country_name,\n '' as alternative_country_name,\n 'TD' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Chile' as country_name,\n '' as alternative_country_name,\n 'CL' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'China' as country_name,\n '' as alternative_country_name,\n 'CN' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Christmas Island' as country_name,\n '' as alternative_country_name,\n 'CX' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Cocos (Keeling) Islands' as country_name,\n '' as alternative_country_name,\n 'CC' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Colombia' as country_name,\n '' as alternative_country_name,\n 'CO' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Comoros' as country_name,\n '' as alternative_country_name,\n 'KM' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Congo' as country_name,\n 'Republic of the Congo' as alternative_country_name,\n 'CG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Congo, Democratic Republic of the' as country_name,\n 'Democratic Republic of the Congo' as alternative_country_name,\n 'CD' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Cook Islands' as country_name,\n '' as alternative_country_name,\n 'CK' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Costa Rica' as country_name,\n '' as alternative_country_name,\n 'CR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'C\u00f4te d''Ivoire' as country_name,\n 'Cote d''Ivoire' as alternative_country_name,\n 'CI' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Croatia' as country_name,\n '' as alternative_country_name,\n 'HR' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Cuba' as country_name,\n '' as alternative_country_name,\n 'CU' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Cura\u00e7ao' as country_name,\n '' as alternative_country_name,\n 'CW' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Cyprus' as country_name,\n '' as alternative_country_name,\n 'CY' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Czechia' as country_name,\n 'Czech Republic' as alternative_country_name,\n 'CZ' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Denmark' as country_name,\n '' as alternative_country_name,\n 'DK' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Djibouti' as country_name,\n '' as alternative_country_name,\n 'DJ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Dominica' as country_name,\n '' as alternative_country_name,\n 'DM' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Dominican Republic' as country_name,\n '' as alternative_country_name,\n 'DO' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Ecuador' as country_name,\n '' as alternative_country_name,\n 'EC' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Egypt' as country_name,\n '' as alternative_country_name,\n 'EG' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'El Salvador' as country_name,\n '' as alternative_country_name,\n 'SV' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Equatorial Guinea' as country_name,\n '' as alternative_country_name,\n 'GQ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Eritrea' as country_name,\n '' as alternative_country_name,\n 'ER' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Estonia' as country_name,\n '' as alternative_country_name,\n 'EE' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Eswatini' as country_name,\n '' as alternative_country_name,\n 'SZ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Ethiopia' as country_name,\n '' as alternative_country_name,\n 'ET' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Falkland Islands (Malvinas)' as country_name,\n '' as alternative_country_name,\n 'FK' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Faroe Islands' as country_name,\n '' as alternative_country_name,\n 'FO' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Fiji' as country_name,\n '' as alternative_country_name,\n 'FJ' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'Finland' as country_name,\n '' as alternative_country_name,\n 'FI' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'France' as country_name,\n '' as alternative_country_name,\n 'FR' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'French Guiana' as country_name,\n '' as alternative_country_name,\n 'GF' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'French Polynesia' as country_name,\n '' as alternative_country_name,\n 'PF' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'French Southern Territories' as country_name,\n '' as alternative_country_name,\n 'TF' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Gabon' as country_name,\n '' as alternative_country_name,\n 'GA' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Gambia' as country_name,\n '' as alternative_country_name,\n 'GM' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Georgia' as country_name,\n '' as alternative_country_name,\n 'GE' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Germany' as country_name,\n '' as alternative_country_name,\n 'DE' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Ghana' as country_name,\n '' as alternative_country_name,\n 'GH' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Gibraltar' as country_name,\n '' as alternative_country_name,\n 'GI' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Greece' as country_name,\n '' as alternative_country_name,\n 'GR' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Greenland' as country_name,\n '' as alternative_country_name,\n 'GL' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'Grenada' as country_name,\n '' as alternative_country_name,\n 'GD' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Guadeloupe' as country_name,\n '' as alternative_country_name,\n 'GP' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Guam' as country_name,\n '' as alternative_country_name,\n 'GU' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Guatemala' as country_name,\n '' as alternative_country_name,\n 'GT' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Guernsey' as country_name,\n '' as alternative_country_name,\n 'GG' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Guinea' as country_name,\n '' as alternative_country_name,\n 'GN' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Guinea-Bissau' as country_name,\n '' as alternative_country_name,\n 'GW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Guyana' as country_name,\n '' as alternative_country_name,\n 'GY' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Haiti' as country_name,\n '' as alternative_country_name,\n 'HT' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Heard Island and McDonald Islands' as country_name,\n '' as alternative_country_name,\n 'HM' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Holy See' as country_name,\n '' as alternative_country_name,\n 'VA' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Honduras' as country_name,\n '' as alternative_country_name,\n 'HN' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Hong Kong' as country_name,\n 'Hong Kong SAR China' as alternative_country_name,\n 'HK' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Hungary' as country_name,\n '' as alternative_country_name,\n 'HU' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Iceland' as country_name,\n '' as alternative_country_name,\n 'IS' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'India' as country_name,\n '' as alternative_country_name,\n 'IN' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Indonesia' as country_name,\n '' as alternative_country_name,\n 'ID' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Iran (Islamic Republic of)' as country_name,\n 'Iran' as alternative_country_name,\n 'IR' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Iraq' as country_name,\n '' as alternative_country_name,\n 'IQ' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Ireland' as country_name,\n '' as alternative_country_name,\n 'IE' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Isle of Man' as country_name,\n '' as alternative_country_name,\n 'IM' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Israel' as country_name,\n '' as alternative_country_name,\n 'IL' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Italy' as country_name,\n '' as alternative_country_name,\n 'IT' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Jamaica' as country_name,\n '' as alternative_country_name,\n 'JM' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Japan' as country_name,\n '' as alternative_country_name,\n 'JP' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Jersey' as country_name,\n '' as alternative_country_name,\n 'JE' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Jordan' as country_name,\n '' as alternative_country_name,\n 'JO' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Kazakhstan' as country_name,\n '' as alternative_country_name,\n 'KZ' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Kenya' as country_name,\n '' as alternative_country_name,\n 'KE' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Kiribati' as country_name,\n '' as alternative_country_name,\n 'KI' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Korea (Democratic People''s Republic of)' as country_name,\n '' as alternative_country_name,\n 'KP' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Korea, Republic of' as country_name,\n 'South Korea' as alternative_country_name,\n 'KR' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Kuwait' as country_name,\n '' as alternative_country_name,\n 'KW' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Kyrgyzstan' as country_name,\n '' as alternative_country_name,\n 'KG' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Lao People''s Democratic Republic' as country_name,\n 'Laos' as alternative_country_name,\n 'LA' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Latvia' as country_name,\n '' as alternative_country_name,\n 'LV' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Lebanon' as country_name,\n '' as alternative_country_name,\n 'LB' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Lesotho' as country_name,\n '' as alternative_country_name,\n 'LS' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Liberia' as country_name,\n '' as alternative_country_name,\n 'LR' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Libya' as country_name,\n '' as alternative_country_name,\n 'LY' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'Liechtenstein' as country_name,\n '' as alternative_country_name,\n 'LI' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Lithuania' as country_name,\n '' as alternative_country_name,\n 'LT' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Luxembourg' as country_name,\n '' as alternative_country_name,\n 'LU' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Macao' as country_name,\n 'Macau' as alternative_country_name,\n 'MO' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Madagascar' as country_name,\n '' as alternative_country_name,\n 'MG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Malawi' as country_name,\n '' as alternative_country_name,\n 'MW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Malaysia' as country_name,\n '' as alternative_country_name,\n 'MY' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Maldives' as country_name,\n '' as alternative_country_name,\n 'MV' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Mali' as country_name,\n '' as alternative_country_name,\n 'ML' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Malta' as country_name,\n '' as alternative_country_name,\n 'MT' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Marshall Islands' as country_name,\n '' as alternative_country_name,\n 'MH' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Martinique' as country_name,\n '' as alternative_country_name,\n 'MQ' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Mauritania' as country_name,\n '' as alternative_country_name,\n 'MR' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Mauritius' as country_name,\n '' as alternative_country_name,\n 'MU' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Mayotte' as country_name,\n '' as alternative_country_name,\n 'YT' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Mexico' as country_name,\n '' as alternative_country_name,\n 'MX' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Micronesia (Federated States of)' as country_name,\n 'Micronesia' as alternative_country_name,\n 'FM' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Moldova, Republic of' as country_name,\n 'Moldova' as alternative_country_name,\n 'MD' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Monaco' as country_name,\n '' as alternative_country_name,\n 'MC' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Mongolia' as country_name,\n '' as alternative_country_name,\n 'MN' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Montenegro' as country_name,\n '' as alternative_country_name,\n 'ME' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Montserrat' as country_name,\n '' as alternative_country_name,\n 'MS' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Morocco' as country_name,\n '' as alternative_country_name,\n 'MA' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'Mozambique' as country_name,\n '' as alternative_country_name,\n 'MZ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Myanmar' as country_name,\n '' as alternative_country_name,\n 'MM' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Namibia' as country_name,\n '' as alternative_country_name,\n '' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Nauru' as country_name,\n '' as alternative_country_name,\n 'NR' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Nepal' as country_name,\n '' as alternative_country_name,\n 'NP' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Netherlands (Kingdom of the)' as country_name,\n 'Netherlands' as alternative_country_name,\n 'NL' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'New Caledonia' as country_name,\n '' as alternative_country_name,\n 'NC' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'New Zealand' as country_name,\n '' as alternative_country_name,\n 'NZ' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Nicaragua' as country_name,\n '' as alternative_country_name,\n 'NI' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Niger' as country_name,\n '' as alternative_country_name,\n 'NE' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Nigeria' as country_name,\n '' as alternative_country_name,\n 'NG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Niue' as country_name,\n '' as alternative_country_name,\n 'NU' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Norfolk Island' as country_name,\n '' as alternative_country_name,\n 'NF' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'North Macedonia' as country_name,\n '' as alternative_country_name,\n 'MK' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Northern Mariana Islands' as country_name,\n '' as alternative_country_name,\n 'MP' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Norway' as country_name,\n '' as alternative_country_name,\n 'NO' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Oman' as country_name,\n '' as alternative_country_name,\n 'OM' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Pakistan' as country_name,\n '' as alternative_country_name,\n 'PK' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Palau' as country_name,\n '' as alternative_country_name,\n 'PW' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Palestine, State of' as country_name,\n '' as alternative_country_name,\n 'PS' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Panama' as country_name,\n '' as alternative_country_name,\n 'PA' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Papua New Guinea' as country_name,\n '' as alternative_country_name,\n 'PG' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'Paraguay' as country_name,\n '' as alternative_country_name,\n 'PY' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Peru' as country_name,\n '' as alternative_country_name,\n 'PE' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Philippines' as country_name,\n '' as alternative_country_name,\n 'PH' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Pitcairn' as country_name,\n '' as alternative_country_name,\n 'PN' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Poland' as country_name,\n '' as alternative_country_name,\n 'PL' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Portugal' as country_name,\n '' as alternative_country_name,\n 'PT' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Puerto Rico' as country_name,\n '' as alternative_country_name,\n 'PR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Qatar' as country_name,\n '' as alternative_country_name,\n 'QA' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'R\u00e9union' as country_name,\n 'Reunion' as alternative_country_name,\n 'RE' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Romania' as country_name,\n '' as alternative_country_name,\n 'RO' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Russian Federation' as country_name,\n 'Russia' as alternative_country_name,\n 'RU' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Rwanda' as country_name,\n '' as alternative_country_name,\n 'RW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Saint Barth\u00e9lemy' as country_name,\n 'St. Barth\u00e9lemy' as alternative_country_name,\n 'BL' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Saint Helena, Ascension and Tristan da Cunha' as country_name,\n 'St. Helena, Ascension and Tristan da Cunha' as alternative_country_name,\n 'SH' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Saint Kitts and Nevis' as country_name,\n 'St. Kitts and Nevis' as alternative_country_name,\n 'KN' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Saint Lucia' as country_name,\n 'St. Lucia' as alternative_country_name,\n 'LC' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Saint Martin (French part)' as country_name,\n 'St. Martin (French part)' as alternative_country_name,\n 'MF' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Saint Pierre and Miquelon' as country_name,\n 'St. Pierre and Miquelon' as alternative_country_name,\n 'PM' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'Saint Vincent and the Grenadines' as country_name,\n 'St. Vincent and the Grenadines' as alternative_country_name,\n 'VC' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Samoa' as country_name,\n '' as alternative_country_name,\n 'WS' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'San Marino' as country_name,\n '' as alternative_country_name,\n 'SM' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Sao Tome and Principe' as country_name,\n 'S\u00e3o Tom\u00e9 and Principe' as alternative_country_name,\n 'ST' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Saudi Arabia' as country_name,\n '' as alternative_country_name,\n 'SA' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Senegal' as country_name,\n '' as alternative_country_name,\n 'SN' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Serbia' as country_name,\n '' as alternative_country_name,\n 'RS' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Seychelles' as country_name,\n '' as alternative_country_name,\n 'SC' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Sierra Leone' as country_name,\n '' as alternative_country_name,\n 'SL' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Singapore' as country_name,\n '' as alternative_country_name,\n 'SG' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Sint Maarten (Dutch part)' as country_name,\n '' as alternative_country_name,\n 'SX' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Slovakia' as country_name,\n '' as alternative_country_name,\n 'SK' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Slovenia' as country_name,\n '' as alternative_country_name,\n 'SI' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Solomon Islands' as country_name,\n '' as alternative_country_name,\n 'SB' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'Somalia' as country_name,\n '' as alternative_country_name,\n 'SO' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'South Africa' as country_name,\n '' as alternative_country_name,\n 'ZA' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'South Georgia and the South Sandwich Islands' as country_name,\n '' as alternative_country_name,\n 'GS' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'South Sudan' as country_name,\n '' as alternative_country_name,\n 'SS' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Spain' as country_name,\n '' as alternative_country_name,\n 'ES' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Sri Lanka' as country_name,\n '' as alternative_country_name,\n 'LK' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Sudan' as country_name,\n '' as alternative_country_name,\n 'SD' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'Suriname' as country_name,\n '' as alternative_country_name,\n 'SR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Svalbard and Jan Mayen' as country_name,\n '' as alternative_country_name,\n 'SJ' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Sweden' as country_name,\n '' as alternative_country_name,\n 'SE' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Switzerland' as country_name,\n '' as alternative_country_name,\n 'CH' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Syrian Arab Republic' as country_name,\n '' as alternative_country_name,\n 'SY' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Taiwan, Province of China' as country_name,\n 'Taiwan' as alternative_country_name,\n 'TW' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Tajikistan' as country_name,\n '' as alternative_country_name,\n 'TJ' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Tanzania, United Republic of' as country_name,\n 'Tanzania' as alternative_country_name,\n 'TZ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Thailand' as country_name,\n '' as alternative_country_name,\n 'TH' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Timor-Leste' as country_name,\n '' as alternative_country_name,\n 'TL' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Togo' as country_name,\n '' as alternative_country_name,\n 'TG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Tokelau' as country_name,\n '' as alternative_country_name,\n 'TK' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Tonga' as country_name,\n '' as alternative_country_name,\n 'TO' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Trinidad and Tobago' as country_name,\n '' as alternative_country_name,\n 'TT' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Tunisia' as country_name,\n '' as alternative_country_name,\n 'TN' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'T\u00fcrkiye' as country_name,\n 'Turkey' as alternative_country_name,\n 'TR' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Turkmenistan' as country_name,\n '' as alternative_country_name,\n 'TM' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Turks and Caicos Islands' as country_name,\n '' as alternative_country_name,\n 'TC' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Tuvalu' as country_name,\n '' as alternative_country_name,\n 'TV' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Uganda' as country_name,\n '' as alternative_country_name,\n 'UG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Ukraine' as country_name,\n '' as alternative_country_name,\n 'UA' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'United Arab Emirates' as country_name,\n '' as alternative_country_name,\n 'AE' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'United Kingdom of Great Britain and Northern Ireland' as country_name,\n 'United Kingdom' as alternative_country_name,\n 'GB' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'United States of America' as country_name,\n 'United States' as alternative_country_name,\n 'US' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'United States Minor Outlying Islands' as country_name,\n '' as alternative_country_name,\n 'UM' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Uruguay' as country_name,\n '' as alternative_country_name,\n 'UY' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Uzbekistan' as country_name,\n '' as alternative_country_name,\n 'UZ' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Vanuatu' as country_name,\n '' as alternative_country_name,\n 'VU' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'Venezuela (Bolivarian Republic of)' as country_name,\n 'Venezuela' as alternative_country_name,\n 'VE' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Viet Nam' as country_name,\n 'Vietnam' as alternative_country_name,\n 'VN' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Virgin Islands (British)' as country_name,\n 'British Virgin Islands' as alternative_country_name,\n 'VG' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Virgin Islands (U.S.)' as country_name,\n '' as alternative_country_name,\n 'VI' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Wallis and Futuna' as country_name,\n '' as alternative_country_name,\n 'WF' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Western Sahara' as country_name,\n '' as alternative_country_name,\n 'EH' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'Yemen' as country_name,\n '' as alternative_country_name,\n 'YE' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Zambia' as country_name,\n '' as alternative_country_name,\n 'ZM' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Zimbabwe' as country_name,\n '' as alternative_country_name,\n 'ZW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Kosovo' as country_name,\n '' as alternative_country_name,\n 'XK' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Unknown' as country_name,\n '' as alternative_country_name,\n 'Unknown' as country_code,\n 'Unknown' as global_region\n\n \n \n), \n\nfinal as (\n\n select \n country_name,\n case when alternative_country_name = '' then null else alternative_country_name end as alternative_country_name,\n country_code,\n global_region\n from create_country_mapping\n)\n\nselect *\nfrom final\n), base as (\n\n select *\n from __dbt__cte__int_ad_reporting__monthly_campaign_country_report\n),\n\ncountry_mapping as (\n\n select *\n from __dbt__cte__int_ad_reporting__country_mapping\n),\n\n\nstandardize_country_names as (\n\n select \n base.*,\n coalesce(country_mapping.country_name, base.country) as standardized_alt_country_name\n\n from base \n left join country_mapping\n on base.country = country_mapping.alternative_country_name\n),\n\n\nmap_countries_and_codes as (\n\n select \n standardize_country_names.*,\n coalesce(standardize_country_names.standardized_alt_country_name, country_mapping.country_name) as standardized_country,\n coalesce(standardize_country_names.country_code, country_mapping.country_code) as standardized_country_code,\n country_mapping.global_region\n\n from standardize_country_names \n left join country_mapping\n on standardize_country_names.standardized_alt_country_name = country_mapping.country_name\n or standardize_country_names.country_code = country_mapping.country_code\n),\n\naggregated as (\n \n select\n source_relation,\n cast(date_trunc('month', date_day) as date) as date_month,\n platform,\n account_id,\n account_name,\n campaign_id,\n campaign_name,\n standardized_country as country,\n standardized_country_code as country_code,\n global_region,\n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n\n \n\n\n\n\n\n from map_countries_and_codes\n group by 1,2,3,4,5,6,7,8,9,10\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.ad_reporting.int_ad_reporting__monthly_campaign_country_report", "sql": " __dbt__cte__int_ad_reporting__monthly_campaign_country_report as (\n\n\n\n\n\n\n\n\n\n\n\n\n\nwith \n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(null as TEXT) as campaign_id\n\n \n ,cast('Account-level' as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(null as TEXT) as country\n\n \n ,cast(replace(country, 'unknown', 'Unknown') as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__country_report\"\n\n),\n\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_month)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(replace(country_name, 'Hong Kong SAR', 'Hong Kong SAR China') as TEXT) as country\n\n \n ,cast(null as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__monthly_campaign_country_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(country as TEXT) as country\n\n \n ,cast(null as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_country_report\"\n\n),\n\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(replace(country_name, 'U.S.', 'United States') as TEXT) as country\n\n \n ,cast(country_id as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_country_report\"\n\n),\n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(null as TEXT) as country\n\n \n ,cast(country as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__campaign_country_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(null as TEXT) as country\n\n \n ,cast(country as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_country_report\"\n\n),\n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(country_name as TEXT) as country\n\n \n ,cast(country_code as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__campaign_country_report\"\n\n),\n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(country as TEXT) as country\n\n \n ,cast(null as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_country_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from facebook_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n)"}, {"id": "model.ad_reporting.int_ad_reporting__country_mapping", "sql": " __dbt__cte__int_ad_reporting__country_mapping as (\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nwith create_country_mapping as (\n select\n 'Afghanistan' as country_name,\n '' as alternative_country_name,\n 'AF' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n '\u00c5land Islands' as country_name,\n '' as alternative_country_name,\n 'AX' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Albania' as country_name,\n '' as alternative_country_name,\n 'AL' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Algeria' as country_name,\n '' as alternative_country_name,\n 'DZ' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'American Samoa' as country_name,\n '' as alternative_country_name,\n 'AS' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Andorra' as country_name,\n '' as alternative_country_name,\n 'AD' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Angola' as country_name,\n '' as alternative_country_name,\n 'AO' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Anguilla' as country_name,\n '' as alternative_country_name,\n 'AI' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Antarctica' as country_name,\n '' as alternative_country_name,\n 'AQ' as country_code,\n '' as global_region\n\n union all \n \n select\n 'Antigua and Barbuda' as country_name,\n '' as alternative_country_name,\n 'AG' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Argentina' as country_name,\n '' as alternative_country_name,\n 'AR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Armenia' as country_name,\n '' as alternative_country_name,\n 'AM' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Aruba' as country_name,\n '' as alternative_country_name,\n 'AW' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Australia' as country_name,\n '' as alternative_country_name,\n 'AU' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Austria' as country_name,\n '' as alternative_country_name,\n 'AT' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Azerbaijan' as country_name,\n '' as alternative_country_name,\n 'AZ' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Bahamas' as country_name,\n '' as alternative_country_name,\n 'BS' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Bahrain' as country_name,\n '' as alternative_country_name,\n 'BH' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Bangladesh' as country_name,\n '' as alternative_country_name,\n 'BD' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Barbados' as country_name,\n '' as alternative_country_name,\n 'BB' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Belarus' as country_name,\n '' as alternative_country_name,\n 'BY' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Belgium' as country_name,\n '' as alternative_country_name,\n 'BE' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Belize' as country_name,\n '' as alternative_country_name,\n 'BZ' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Benin' as country_name,\n '' as alternative_country_name,\n 'BJ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Bermuda' as country_name,\n '' as alternative_country_name,\n 'BM' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'Bhutan' as country_name,\n '' as alternative_country_name,\n 'BT' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Bolivia (Plurinational State of)' as country_name,\n 'Bolivia' as alternative_country_name,\n 'BO' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Bonaire, Sint Eustatius and Saba' as country_name,\n '' as alternative_country_name,\n 'BQ' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Bosnia and Herzegovina' as country_name,\n '' as alternative_country_name,\n 'BA' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Botswana' as country_name,\n '' as alternative_country_name,\n 'BW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Bouvet Island' as country_name,\n '' as alternative_country_name,\n 'BV' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Brazil' as country_name,\n '' as alternative_country_name,\n 'BR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'British Indian Ocean Territory' as country_name,\n '' as alternative_country_name,\n 'IO' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Brunei Darussalam' as country_name,\n 'Brunei' as alternative_country_name,\n 'BN' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Bulgaria' as country_name,\n '' as alternative_country_name,\n 'BG' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Burkina Faso' as country_name,\n '' as alternative_country_name,\n 'BF' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Burundi' as country_name,\n '' as alternative_country_name,\n 'BI' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Cabo Verde' as country_name,\n 'Cape Verde' as alternative_country_name,\n 'CV' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Cambodia' as country_name,\n '' as alternative_country_name,\n 'KH' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Cameroon' as country_name,\n '' as alternative_country_name,\n 'CM' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Canada' as country_name,\n '' as alternative_country_name,\n 'CA' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'Cayman Islands' as country_name,\n '' as alternative_country_name,\n 'KY' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Central African Republic' as country_name,\n '' as alternative_country_name,\n 'CF' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Chad' as country_name,\n '' as alternative_country_name,\n 'TD' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Chile' as country_name,\n '' as alternative_country_name,\n 'CL' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'China' as country_name,\n '' as alternative_country_name,\n 'CN' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Christmas Island' as country_name,\n '' as alternative_country_name,\n 'CX' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Cocos (Keeling) Islands' as country_name,\n '' as alternative_country_name,\n 'CC' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Colombia' as country_name,\n '' as alternative_country_name,\n 'CO' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Comoros' as country_name,\n '' as alternative_country_name,\n 'KM' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Congo' as country_name,\n 'Republic of the Congo' as alternative_country_name,\n 'CG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Congo, Democratic Republic of the' as country_name,\n 'Democratic Republic of the Congo' as alternative_country_name,\n 'CD' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Cook Islands' as country_name,\n '' as alternative_country_name,\n 'CK' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Costa Rica' as country_name,\n '' as alternative_country_name,\n 'CR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'C\u00f4te d''Ivoire' as country_name,\n 'Cote d''Ivoire' as alternative_country_name,\n 'CI' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Croatia' as country_name,\n '' as alternative_country_name,\n 'HR' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Cuba' as country_name,\n '' as alternative_country_name,\n 'CU' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Cura\u00e7ao' as country_name,\n '' as alternative_country_name,\n 'CW' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Cyprus' as country_name,\n '' as alternative_country_name,\n 'CY' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Czechia' as country_name,\n 'Czech Republic' as alternative_country_name,\n 'CZ' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Denmark' as country_name,\n '' as alternative_country_name,\n 'DK' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Djibouti' as country_name,\n '' as alternative_country_name,\n 'DJ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Dominica' as country_name,\n '' as alternative_country_name,\n 'DM' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Dominican Republic' as country_name,\n '' as alternative_country_name,\n 'DO' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Ecuador' as country_name,\n '' as alternative_country_name,\n 'EC' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Egypt' as country_name,\n '' as alternative_country_name,\n 'EG' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'El Salvador' as country_name,\n '' as alternative_country_name,\n 'SV' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Equatorial Guinea' as country_name,\n '' as alternative_country_name,\n 'GQ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Eritrea' as country_name,\n '' as alternative_country_name,\n 'ER' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Estonia' as country_name,\n '' as alternative_country_name,\n 'EE' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Eswatini' as country_name,\n '' as alternative_country_name,\n 'SZ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Ethiopia' as country_name,\n '' as alternative_country_name,\n 'ET' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Falkland Islands (Malvinas)' as country_name,\n '' as alternative_country_name,\n 'FK' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Faroe Islands' as country_name,\n '' as alternative_country_name,\n 'FO' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Fiji' as country_name,\n '' as alternative_country_name,\n 'FJ' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'Finland' as country_name,\n '' as alternative_country_name,\n 'FI' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'France' as country_name,\n '' as alternative_country_name,\n 'FR' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'French Guiana' as country_name,\n '' as alternative_country_name,\n 'GF' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'French Polynesia' as country_name,\n '' as alternative_country_name,\n 'PF' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'French Southern Territories' as country_name,\n '' as alternative_country_name,\n 'TF' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Gabon' as country_name,\n '' as alternative_country_name,\n 'GA' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Gambia' as country_name,\n '' as alternative_country_name,\n 'GM' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Georgia' as country_name,\n '' as alternative_country_name,\n 'GE' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Germany' as country_name,\n '' as alternative_country_name,\n 'DE' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Ghana' as country_name,\n '' as alternative_country_name,\n 'GH' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Gibraltar' as country_name,\n '' as alternative_country_name,\n 'GI' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Greece' as country_name,\n '' as alternative_country_name,\n 'GR' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Greenland' as country_name,\n '' as alternative_country_name,\n 'GL' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'Grenada' as country_name,\n '' as alternative_country_name,\n 'GD' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Guadeloupe' as country_name,\n '' as alternative_country_name,\n 'GP' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Guam' as country_name,\n '' as alternative_country_name,\n 'GU' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Guatemala' as country_name,\n '' as alternative_country_name,\n 'GT' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Guernsey' as country_name,\n '' as alternative_country_name,\n 'GG' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Guinea' as country_name,\n '' as alternative_country_name,\n 'GN' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Guinea-Bissau' as country_name,\n '' as alternative_country_name,\n 'GW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Guyana' as country_name,\n '' as alternative_country_name,\n 'GY' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Haiti' as country_name,\n '' as alternative_country_name,\n 'HT' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Heard Island and McDonald Islands' as country_name,\n '' as alternative_country_name,\n 'HM' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Holy See' as country_name,\n '' as alternative_country_name,\n 'VA' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Honduras' as country_name,\n '' as alternative_country_name,\n 'HN' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Hong Kong' as country_name,\n 'Hong Kong SAR China' as alternative_country_name,\n 'HK' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Hungary' as country_name,\n '' as alternative_country_name,\n 'HU' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Iceland' as country_name,\n '' as alternative_country_name,\n 'IS' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'India' as country_name,\n '' as alternative_country_name,\n 'IN' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Indonesia' as country_name,\n '' as alternative_country_name,\n 'ID' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Iran (Islamic Republic of)' as country_name,\n 'Iran' as alternative_country_name,\n 'IR' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Iraq' as country_name,\n '' as alternative_country_name,\n 'IQ' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Ireland' as country_name,\n '' as alternative_country_name,\n 'IE' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Isle of Man' as country_name,\n '' as alternative_country_name,\n 'IM' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Israel' as country_name,\n '' as alternative_country_name,\n 'IL' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Italy' as country_name,\n '' as alternative_country_name,\n 'IT' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Jamaica' as country_name,\n '' as alternative_country_name,\n 'JM' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Japan' as country_name,\n '' as alternative_country_name,\n 'JP' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Jersey' as country_name,\n '' as alternative_country_name,\n 'JE' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Jordan' as country_name,\n '' as alternative_country_name,\n 'JO' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Kazakhstan' as country_name,\n '' as alternative_country_name,\n 'KZ' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Kenya' as country_name,\n '' as alternative_country_name,\n 'KE' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Kiribati' as country_name,\n '' as alternative_country_name,\n 'KI' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Korea (Democratic People''s Republic of)' as country_name,\n '' as alternative_country_name,\n 'KP' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Korea, Republic of' as country_name,\n 'South Korea' as alternative_country_name,\n 'KR' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Kuwait' as country_name,\n '' as alternative_country_name,\n 'KW' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Kyrgyzstan' as country_name,\n '' as alternative_country_name,\n 'KG' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Lao People''s Democratic Republic' as country_name,\n 'Laos' as alternative_country_name,\n 'LA' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Latvia' as country_name,\n '' as alternative_country_name,\n 'LV' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Lebanon' as country_name,\n '' as alternative_country_name,\n 'LB' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Lesotho' as country_name,\n '' as alternative_country_name,\n 'LS' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Liberia' as country_name,\n '' as alternative_country_name,\n 'LR' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Libya' as country_name,\n '' as alternative_country_name,\n 'LY' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'Liechtenstein' as country_name,\n '' as alternative_country_name,\n 'LI' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Lithuania' as country_name,\n '' as alternative_country_name,\n 'LT' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Luxembourg' as country_name,\n '' as alternative_country_name,\n 'LU' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Macao' as country_name,\n 'Macau' as alternative_country_name,\n 'MO' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Madagascar' as country_name,\n '' as alternative_country_name,\n 'MG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Malawi' as country_name,\n '' as alternative_country_name,\n 'MW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Malaysia' as country_name,\n '' as alternative_country_name,\n 'MY' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Maldives' as country_name,\n '' as alternative_country_name,\n 'MV' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Mali' as country_name,\n '' as alternative_country_name,\n 'ML' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Malta' as country_name,\n '' as alternative_country_name,\n 'MT' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Marshall Islands' as country_name,\n '' as alternative_country_name,\n 'MH' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Martinique' as country_name,\n '' as alternative_country_name,\n 'MQ' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Mauritania' as country_name,\n '' as alternative_country_name,\n 'MR' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Mauritius' as country_name,\n '' as alternative_country_name,\n 'MU' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Mayotte' as country_name,\n '' as alternative_country_name,\n 'YT' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Mexico' as country_name,\n '' as alternative_country_name,\n 'MX' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Micronesia (Federated States of)' as country_name,\n 'Micronesia' as alternative_country_name,\n 'FM' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Moldova, Republic of' as country_name,\n 'Moldova' as alternative_country_name,\n 'MD' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Monaco' as country_name,\n '' as alternative_country_name,\n 'MC' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Mongolia' as country_name,\n '' as alternative_country_name,\n 'MN' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Montenegro' as country_name,\n '' as alternative_country_name,\n 'ME' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Montserrat' as country_name,\n '' as alternative_country_name,\n 'MS' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Morocco' as country_name,\n '' as alternative_country_name,\n 'MA' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'Mozambique' as country_name,\n '' as alternative_country_name,\n 'MZ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Myanmar' as country_name,\n '' as alternative_country_name,\n 'MM' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Namibia' as country_name,\n '' as alternative_country_name,\n '' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Nauru' as country_name,\n '' as alternative_country_name,\n 'NR' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Nepal' as country_name,\n '' as alternative_country_name,\n 'NP' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Netherlands (Kingdom of the)' as country_name,\n 'Netherlands' as alternative_country_name,\n 'NL' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'New Caledonia' as country_name,\n '' as alternative_country_name,\n 'NC' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'New Zealand' as country_name,\n '' as alternative_country_name,\n 'NZ' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Nicaragua' as country_name,\n '' as alternative_country_name,\n 'NI' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Niger' as country_name,\n '' as alternative_country_name,\n 'NE' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Nigeria' as country_name,\n '' as alternative_country_name,\n 'NG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Niue' as country_name,\n '' as alternative_country_name,\n 'NU' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Norfolk Island' as country_name,\n '' as alternative_country_name,\n 'NF' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'North Macedonia' as country_name,\n '' as alternative_country_name,\n 'MK' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Northern Mariana Islands' as country_name,\n '' as alternative_country_name,\n 'MP' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Norway' as country_name,\n '' as alternative_country_name,\n 'NO' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Oman' as country_name,\n '' as alternative_country_name,\n 'OM' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Pakistan' as country_name,\n '' as alternative_country_name,\n 'PK' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Palau' as country_name,\n '' as alternative_country_name,\n 'PW' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Palestine, State of' as country_name,\n '' as alternative_country_name,\n 'PS' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Panama' as country_name,\n '' as alternative_country_name,\n 'PA' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Papua New Guinea' as country_name,\n '' as alternative_country_name,\n 'PG' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'Paraguay' as country_name,\n '' as alternative_country_name,\n 'PY' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Peru' as country_name,\n '' as alternative_country_name,\n 'PE' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Philippines' as country_name,\n '' as alternative_country_name,\n 'PH' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Pitcairn' as country_name,\n '' as alternative_country_name,\n 'PN' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Poland' as country_name,\n '' as alternative_country_name,\n 'PL' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Portugal' as country_name,\n '' as alternative_country_name,\n 'PT' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Puerto Rico' as country_name,\n '' as alternative_country_name,\n 'PR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Qatar' as country_name,\n '' as alternative_country_name,\n 'QA' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'R\u00e9union' as country_name,\n 'Reunion' as alternative_country_name,\n 'RE' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Romania' as country_name,\n '' as alternative_country_name,\n 'RO' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Russian Federation' as country_name,\n 'Russia' as alternative_country_name,\n 'RU' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Rwanda' as country_name,\n '' as alternative_country_name,\n 'RW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Saint Barth\u00e9lemy' as country_name,\n 'St. Barth\u00e9lemy' as alternative_country_name,\n 'BL' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Saint Helena, Ascension and Tristan da Cunha' as country_name,\n 'St. Helena, Ascension and Tristan da Cunha' as alternative_country_name,\n 'SH' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Saint Kitts and Nevis' as country_name,\n 'St. Kitts and Nevis' as alternative_country_name,\n 'KN' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Saint Lucia' as country_name,\n 'St. Lucia' as alternative_country_name,\n 'LC' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Saint Martin (French part)' as country_name,\n 'St. Martin (French part)' as alternative_country_name,\n 'MF' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Saint Pierre and Miquelon' as country_name,\n 'St. Pierre and Miquelon' as alternative_country_name,\n 'PM' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'Saint Vincent and the Grenadines' as country_name,\n 'St. Vincent and the Grenadines' as alternative_country_name,\n 'VC' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Samoa' as country_name,\n '' as alternative_country_name,\n 'WS' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'San Marino' as country_name,\n '' as alternative_country_name,\n 'SM' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Sao Tome and Principe' as country_name,\n 'S\u00e3o Tom\u00e9 and Principe' as alternative_country_name,\n 'ST' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Saudi Arabia' as country_name,\n '' as alternative_country_name,\n 'SA' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Senegal' as country_name,\n '' as alternative_country_name,\n 'SN' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Serbia' as country_name,\n '' as alternative_country_name,\n 'RS' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Seychelles' as country_name,\n '' as alternative_country_name,\n 'SC' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Sierra Leone' as country_name,\n '' as alternative_country_name,\n 'SL' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Singapore' as country_name,\n '' as alternative_country_name,\n 'SG' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Sint Maarten (Dutch part)' as country_name,\n '' as alternative_country_name,\n 'SX' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Slovakia' as country_name,\n '' as alternative_country_name,\n 'SK' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Slovenia' as country_name,\n '' as alternative_country_name,\n 'SI' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Solomon Islands' as country_name,\n '' as alternative_country_name,\n 'SB' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'Somalia' as country_name,\n '' as alternative_country_name,\n 'SO' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'South Africa' as country_name,\n '' as alternative_country_name,\n 'ZA' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'South Georgia and the South Sandwich Islands' as country_name,\n '' as alternative_country_name,\n 'GS' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'South Sudan' as country_name,\n '' as alternative_country_name,\n 'SS' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Spain' as country_name,\n '' as alternative_country_name,\n 'ES' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Sri Lanka' as country_name,\n '' as alternative_country_name,\n 'LK' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Sudan' as country_name,\n '' as alternative_country_name,\n 'SD' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'Suriname' as country_name,\n '' as alternative_country_name,\n 'SR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Svalbard and Jan Mayen' as country_name,\n '' as alternative_country_name,\n 'SJ' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Sweden' as country_name,\n '' as alternative_country_name,\n 'SE' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Switzerland' as country_name,\n '' as alternative_country_name,\n 'CH' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Syrian Arab Republic' as country_name,\n '' as alternative_country_name,\n 'SY' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Taiwan, Province of China' as country_name,\n 'Taiwan' as alternative_country_name,\n 'TW' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Tajikistan' as country_name,\n '' as alternative_country_name,\n 'TJ' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Tanzania, United Republic of' as country_name,\n 'Tanzania' as alternative_country_name,\n 'TZ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Thailand' as country_name,\n '' as alternative_country_name,\n 'TH' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Timor-Leste' as country_name,\n '' as alternative_country_name,\n 'TL' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Togo' as country_name,\n '' as alternative_country_name,\n 'TG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Tokelau' as country_name,\n '' as alternative_country_name,\n 'TK' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Tonga' as country_name,\n '' as alternative_country_name,\n 'TO' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Trinidad and Tobago' as country_name,\n '' as alternative_country_name,\n 'TT' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Tunisia' as country_name,\n '' as alternative_country_name,\n 'TN' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'T\u00fcrkiye' as country_name,\n 'Turkey' as alternative_country_name,\n 'TR' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Turkmenistan' as country_name,\n '' as alternative_country_name,\n 'TM' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Turks and Caicos Islands' as country_name,\n '' as alternative_country_name,\n 'TC' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Tuvalu' as country_name,\n '' as alternative_country_name,\n 'TV' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Uganda' as country_name,\n '' as alternative_country_name,\n 'UG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Ukraine' as country_name,\n '' as alternative_country_name,\n 'UA' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'United Arab Emirates' as country_name,\n '' as alternative_country_name,\n 'AE' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'United Kingdom of Great Britain and Northern Ireland' as country_name,\n 'United Kingdom' as alternative_country_name,\n 'GB' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'United States of America' as country_name,\n 'United States' as alternative_country_name,\n 'US' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'United States Minor Outlying Islands' as country_name,\n '' as alternative_country_name,\n 'UM' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Uruguay' as country_name,\n '' as alternative_country_name,\n 'UY' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Uzbekistan' as country_name,\n '' as alternative_country_name,\n 'UZ' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Vanuatu' as country_name,\n '' as alternative_country_name,\n 'VU' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'Venezuela (Bolivarian Republic of)' as country_name,\n 'Venezuela' as alternative_country_name,\n 'VE' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Viet Nam' as country_name,\n 'Vietnam' as alternative_country_name,\n 'VN' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Virgin Islands (British)' as country_name,\n 'British Virgin Islands' as alternative_country_name,\n 'VG' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Virgin Islands (U.S.)' as country_name,\n '' as alternative_country_name,\n 'VI' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Wallis and Futuna' as country_name,\n '' as alternative_country_name,\n 'WF' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Western Sahara' as country_name,\n '' as alternative_country_name,\n 'EH' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'Yemen' as country_name,\n '' as alternative_country_name,\n 'YE' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Zambia' as country_name,\n '' as alternative_country_name,\n 'ZM' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Zimbabwe' as country_name,\n '' as alternative_country_name,\n 'ZW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Kosovo' as country_name,\n '' as alternative_country_name,\n 'XK' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Unknown' as country_name,\n '' as alternative_country_name,\n 'Unknown' as country_code,\n 'Unknown' as global_region\n\n \n \n), \n\nfinal as (\n\n select \n country_name,\n case when alternative_country_name = '' then null else alternative_country_name end as alternative_country_name,\n country_code,\n global_region\n from create_country_mapping\n)\n\nselect *\nfrom final\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.ad_reporting__monthly_campaign_region_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "ad_reporting__monthly_campaign_region_report", "resource_type": "model", "package_name": "ad_reporting", "path": "ad_reporting__monthly_campaign_region_report.sql", "original_file_path": "models/ad_reporting__monthly_campaign_region_report.sql", "unique_id": "model.ad_reporting.ad_reporting__monthly_campaign_region_report", "fqn": ["ad_reporting", "ad_reporting__monthly_campaign_region_report"], "alias": "ad_reporting__monthly_campaign_region_report", "checksum": {"name": "sha256", "checksum": "d6e6628a75863cadc3046d2ae284a5dfc95bf22f4c1162608a6672e7b2409fac"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents monthly metrics by campaign and region (state, province, metropolitan area, etc.) provided by each platform.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.source_relation"]}, "date_month": {"name": "date_month", "description": "Month of the record, truncated to the first day of the month.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "platform": {"name": "platform", "description": "The ad platform associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.platform"]}, "account_id": {"name": "account_id", "description": "The ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_id"]}, "account_name": {"name": "account_name", "description": "The name of the account, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID representing the campaign, if present in the source data. Facebook Ads presents country data only at the account level and will have a null value for this field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign, if present in the source data. Facebook Ads presents country data only at the account level and will have a value of `Account-level` for this field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.clicks"]}, "impressions": {"name": "impressions", "description": "The count of impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.impressions"]}, "spend": {"name": "spend", "description": "The cost of the ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.spend"]}, "conversions": {"name": "conversions", "description": "The count of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The monetary value of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions_value"]}, "region": {"name": "region", "description": "Region the ad was served in. The formatting may vary across platforms. This may be a state, province, metropolitan area, etc. Snapchat Ads provides this as a two-letter abbreviation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "ad_reporting://models/ad_reporting_models.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.5549657, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__monthly_campaign_region_report\"", "raw_code": "{% set include_list = [] %}\n{% do include_list.append('facebook_ads') if var('facebook_ads__using_demographics_region', false) %}\n{% do include_list.append('linkedin_ads') if var('linkedin_ads__using_geo', true) and var('linkedin_ads__using_monthly_ad_analytics_by_member_region', true) %}\n{% do include_list.append('microsoft_ads') if var('microsoft_ads__using_geographic_daily_report', false) %}\n{% do include_list.append('pinterest_ads') if var('pinterest__using_pin_promotion_targeting_report', true) and var('pinterest__using_targeting_geo_region', true) %}\n{% do include_list.append('snapchat_ads') if var('snapchat_ads__using_campaign_region_report', false) %}\n{% do include_list.append('twitter_ads') if var('twitter_ads__using_campaign_regions_report', false) %}\n\n{% set enabled_packages = get_enabled_packages(include=include_list)%}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith base as (\n\n select *\n from {{ ref('int_ad_reporting__monthly_campaign_region_report') }}\n),\n\naggregated as (\n \n select\n source_relation,\n cast({{ dbt.date_trunc(\"month\", \"date_day\") }} as date) as date_month,\n platform,\n account_id,\n account_name,\n campaign_id,\n campaign_name,\n region,\n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n\n {{ ad_reporting_persist_pass_through_columns(pass_through_variable='ad_reporting__country_passthrough_metrics', transform = 'sum', alias_fields=['conversions', 'conversions_value']) }}\n\n from base\n {{ dbt_utils.group_by(8) }}\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_ad_reporting__monthly_campaign_region_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.dbt.date_trunc", "macro.ad_reporting.ad_reporting_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.ad_reporting.int_ad_reporting__monthly_campaign_region_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting__monthly_campaign_region_report.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n\n\n\n\nwith __dbt__cte__int_ad_reporting__monthly_campaign_region_report as (\n\n\n\n\n\n\n\n\n\n\n\nwith \n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(null as TEXT) as campaign_id\n\n \n ,cast('Account-level' as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__region_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_month)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region_name as TEXT) as region\n\n \n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__monthly_campaign_region_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_region_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region_name as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_region_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(replace(region, 'UNKNOWN', 'Unknown') as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_region_report\"\n\n),\n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_region_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from facebook_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from twitter_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n), base as (\n\n select *\n from __dbt__cte__int_ad_reporting__monthly_campaign_region_report\n),\n\naggregated as (\n \n select\n source_relation,\n cast(date_trunc('month', date_day) as date) as date_month,\n platform,\n account_id,\n account_name,\n campaign_id,\n campaign_name,\n region,\n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n\n \n\n\n\n\n\n from base\n group by 1,2,3,4,5,6,7,8\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.ad_reporting.int_ad_reporting__monthly_campaign_region_report", "sql": " __dbt__cte__int_ad_reporting__monthly_campaign_region_report as (\n\n\n\n\n\n\n\n\n\n\n\nwith \n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(null as TEXT) as campaign_id\n\n \n ,cast('Account-level' as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__region_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_month)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region_name as TEXT) as region\n\n \n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__monthly_campaign_region_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_region_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region_name as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_region_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(replace(region, 'UNKNOWN', 'Unknown') as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_region_report\"\n\n),\n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_region_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from facebook_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from twitter_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.ad_reporting__url_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "ad_reporting__url_report", "resource_type": "model", "package_name": "ad_reporting", "path": "ad_reporting__url_report.sql", "original_file_path": "models/ad_reporting__url_report.sql", "unique_id": "model.ad_reporting.ad_reporting__url_report", "fqn": ["ad_reporting", "ad_reporting__url_report"], "alias": "ad_reporting__url_report", "checksum": {"name": "sha256", "checksum": "7c8639ff09989134503970ae52f1be403409a4ebc28fe5abced5f93000c4945f"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents daily metrics by URL (and if applicable, URL UTM parameters), ad group, campaign and account.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.date_day"]}, "platform": {"name": "platform", "description": "The ad platform associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.platform"]}, "account_id": {"name": "account_id", "description": "The ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_id"]}, "account_name": {"name": "account_name", "description": "The name of the account, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID representing the campaign, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.campaign_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID representing the ad group, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the ad group, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.ad_group_name"]}, "base_url": {"name": "base_url", "description": "The base url of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.base_url"]}, "url_host": {"name": "url_host", "description": "The URL host of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.url_host"]}, "url_path": {"name": "url_path", "description": "The URL path of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.url_path"]}, "utm_source": {"name": "utm_source", "description": "The utm_source parameter of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.utm_source"]}, "utm_medium": {"name": "utm_medium", "description": "The utm_medium parameter of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.utm_medium"]}, "utm_campaign": {"name": "utm_campaign", "description": "The utm_campaign parameter of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.utm_campaign"]}, "utm_content": {"name": "utm_content", "description": "The utm_content parameter of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.utm_content"]}, "utm_term": {"name": "utm_term", "description": "The utm_term parameter of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.utm_term"]}, "clicks": {"name": "clicks", "description": "The count of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.clicks"]}, "impressions": {"name": "impressions", "description": "The count of impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.impressions"]}, "spend": {"name": "spend", "description": "The cost of the ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.spend"]}, "conversions": {"name": "conversions", "description": "The count of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The monetary value of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "ad_reporting://models/ad_reporting_models.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.5523243, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__url_report\"", "raw_code": "{% set enabled_packages = get_enabled_packages(exclude=['amazon_ads', 'apple_search_ads']) %}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith base as (\n\n select *\n from {{ ref('int_ad_reporting__url_report') }}\n),\n\naggregated as (\n \n select\n source_relation,\n date_day, \n platform,\n account_id, \n account_name, \n campaign_id,\n campaign_name,\n ad_group_id,\n ad_group_name,\n base_url,\n url_host,\n url_path,\n utm_source,\n utm_medium,\n utm_campaign,\n utm_content,\n utm_term,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value\n\n {{ ad_reporting_persist_pass_through_columns(pass_through_variable='ad_reporting__ad_passthrough_metrics', transform = 'sum', alias_fields=['conversions', 'conversions_value']) }}\n\n from base\n {{ dbt_utils.group_by(17) }}\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_ad_reporting__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.ad_reporting_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.ad_reporting.int_ad_reporting__url_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting__url_report.sql", "compiled": true, "compiled_code": "\n\n\nwith __dbt__cte__int_ad_reporting__url_report as (\n\n\n\nwith\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__url_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__url_report\"\n\n),\n\n\n\n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_set_id as TEXT) as ad_group_id\n\n \n ,cast(ad_set_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__url_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as ad_group_id\n\n \n ,cast(campaign_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__url_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__url_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(ad_squad_id as TEXT) as ad_group_id\n\n \n ,cast(ad_squad_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__url_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__url_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(line_item_id as TEXT) as ad_group_id\n\n \n ,cast(line_item_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__url_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__url_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n), base as (\n\n select *\n from __dbt__cte__int_ad_reporting__url_report\n),\n\naggregated as (\n \n select\n source_relation,\n date_day, \n platform,\n account_id, \n account_name, \n campaign_id,\n campaign_name,\n ad_group_id,\n ad_group_name,\n base_url,\n url_host,\n url_path,\n utm_source,\n utm_medium,\n utm_campaign,\n utm_content,\n utm_term,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value\n\n \n\n\n\n\n\n from base\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.ad_reporting.int_ad_reporting__url_report", "sql": " __dbt__cte__int_ad_reporting__url_report as (\n\n\n\nwith\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__url_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__url_report\"\n\n),\n\n\n\n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_set_id as TEXT) as ad_group_id\n\n \n ,cast(ad_set_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__url_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as ad_group_id\n\n \n ,cast(campaign_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__url_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__url_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(ad_squad_id as TEXT) as ad_group_id\n\n \n ,cast(ad_squad_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__url_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__url_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(line_item_id as TEXT) as ad_group_id\n\n \n ,cast(line_item_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__url_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__url_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.ad_reporting__ad_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "ad_reporting__ad_report", "resource_type": "model", "package_name": "ad_reporting", "path": "ad_reporting__ad_report.sql", "original_file_path": "models/ad_reporting__ad_report.sql", "unique_id": "model.ad_reporting.ad_reporting__ad_report", "fqn": ["ad_reporting", "ad_reporting__ad_report"], "alias": "ad_reporting__ad_report", "checksum": {"name": "sha256", "checksum": "e6b430f3190b08e886e772e6e0a64656688e5834eba257d80c1ad1e756bba2bb"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents daily metrics by ad, ad group, campaign and account.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.date_day"]}, "platform": {"name": "platform", "description": "The ad platform associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.platform"]}, "account_id": {"name": "account_id", "description": "The ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_id"]}, "account_name": {"name": "account_name", "description": "The name of the account, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID representing the campaign, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.campaign_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID representing the ad group, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the ad group, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.ad_group_name"]}, "ad_id": {"name": "ad_id", "description": "The ID representing the ad, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.ad_id"]}, "ad_name": {"name": "ad_name", "description": "The name of the ad, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.ad_name"]}, "clicks": {"name": "clicks", "description": "The count of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.clicks"]}, "impressions": {"name": "impressions", "description": "The count of impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.impressions"]}, "spend": {"name": "spend", "description": "The cost of the ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.spend"]}, "conversions": {"name": "conversions", "description": "The count of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The monetary value of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "ad_reporting://models/ad_reporting_models.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.546239, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__ad_report\"", "raw_code": "{% set enabled_packages = get_enabled_packages() %}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith base as (\n\n select *\n from {{ ref('int_ad_reporting__ad_report') }}\n),\n\naggregated as (\n \n select\n source_relation,\n date_day,\n platform,\n account_id,\n account_name,\n campaign_id,\n campaign_name,\n ad_group_id,\n ad_group_name,\n ad_id,\n ad_name,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value\n \n {{ ad_reporting_persist_pass_through_columns(pass_through_variable='ad_reporting__ad_passthrough_metrics', transform = 'sum', alias_fields=['conversions', 'conversions_value']) }}\n\n from base\n {{ dbt_utils.group_by(11) }}\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_ad_reporting__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.ad_reporting_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.ad_reporting.int_ad_reporting__ad_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting__ad_report.sql", "compiled": true, "compiled_code": "\n\n\nwith __dbt__cte__int_ad_reporting__ad_report as (\n\n\n\nwith\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__ad_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__ad_report\"\n\n),\n\n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__ad_report\"\n\n),\n\n\n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_set_id as TEXT) as ad_group_id\n\n \n ,cast(ad_set_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__ad_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as ad_group_id\n\n \n ,cast(campaign_name as TEXT) as ad_group_name\n\n \n ,cast(creative_id as TEXT) as ad_id\n\n \n ,cast(null as TEXT) as ad_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__creative_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(pin_promotion_id as TEXT) as ad_id\n\n \n ,cast(pin_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__pin_promotion_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(ad_squad_id as TEXT) as ad_group_id\n\n \n ,cast(ad_squad_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__ad_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__ad_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(line_item_id as TEXT) as ad_group_id\n\n \n ,cast(line_item_name as TEXT) as ad_group_name\n\n \n ,cast(promoted_tweet_id as TEXT) as ad_id\n\n \n ,cast(tweet_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__promoted_tweet_report\"\n\n), \n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(advertised_asin as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__ad_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__ad_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n), base as (\n\n select *\n from __dbt__cte__int_ad_reporting__ad_report\n),\n\naggregated as (\n \n select\n source_relation,\n date_day,\n platform,\n account_id,\n account_name,\n campaign_id,\n campaign_name,\n ad_group_id,\n ad_group_name,\n ad_id,\n ad_name,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value\n \n \n\n\n\n\n\n from base\n group by 1,2,3,4,5,6,7,8,9,10,11\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.ad_reporting.int_ad_reporting__ad_report", "sql": " __dbt__cte__int_ad_reporting__ad_report as (\n\n\n\nwith\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__ad_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__ad_report\"\n\n),\n\n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__ad_report\"\n\n),\n\n\n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_set_id as TEXT) as ad_group_id\n\n \n ,cast(ad_set_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__ad_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as ad_group_id\n\n \n ,cast(campaign_name as TEXT) as ad_group_name\n\n \n ,cast(creative_id as TEXT) as ad_id\n\n \n ,cast(null as TEXT) as ad_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__creative_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(pin_promotion_id as TEXT) as ad_id\n\n \n ,cast(pin_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__pin_promotion_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(ad_squad_id as TEXT) as ad_group_id\n\n \n ,cast(ad_squad_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__ad_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__ad_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(line_item_id as TEXT) as ad_group_id\n\n \n ,cast(line_item_name as TEXT) as ad_group_name\n\n \n ,cast(promoted_tweet_id as TEXT) as ad_id\n\n \n ,cast(tweet_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__promoted_tweet_report\"\n\n), \n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(advertised_asin as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__ad_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__ad_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.ad_reporting__account_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "ad_reporting__account_report", "resource_type": "model", "package_name": "ad_reporting", "path": "ad_reporting__account_report.sql", "original_file_path": "models/ad_reporting__account_report.sql", "unique_id": "model.ad_reporting.ad_reporting__account_report", "fqn": ["ad_reporting", "ad_reporting__account_report"], "alias": "ad_reporting__account_report", "checksum": {"name": "sha256", "checksum": "a3d1d911b21f4d4230c39ce69de3f963ea9f911ad1edfd14a4a5d40939333b54"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents daily metrics by account.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.date_day"]}, "platform": {"name": "platform", "description": "The ad platform associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.platform"]}, "account_id": {"name": "account_id", "description": "The ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_id"]}, "account_name": {"name": "account_name", "description": "The name of the account, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_name"]}, "clicks": {"name": "clicks", "description": "The count of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.clicks"]}, "impressions": {"name": "impressions", "description": "The count of impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.impressions"]}, "spend": {"name": "spend", "description": "The cost of the ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.spend"]}, "conversions": {"name": "conversions", "description": "The count of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The monetary value of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "ad_reporting://models/ad_reporting_models.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.543677, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__account_report\"", "raw_code": "{% set enabled_packages = get_enabled_packages() %}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith base as (\n\n select *\n from {{ ref('int_ad_reporting__account_report') }}\n),\n\naggregated as (\n \n select\n source_relation,\n date_day,\n platform,\n account_id,\n account_name,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value\n\n {{ ad_reporting_persist_pass_through_columns(pass_through_variable='ad_reporting__account_passthrough_metrics', transform = 'sum', alias_fields=['conversions', 'conversions_value']) }}\n\n from base\n {{ dbt_utils.group_by(5) }}\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_ad_reporting__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.ad_reporting_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.ad_reporting.int_ad_reporting__account_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting__account_report.sql", "compiled": true, "compiled_code": "\n\n\nwith __dbt__cte__int_ad_reporting__account_report as (\n\n\n\nwith\n\n\nfacebook_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__account_report\"\n\n),\n\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__account_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__account_report\"\n\n),\n\n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__organization_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__account_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__advertiser_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__account_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__advertiser_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__account_report\"\n\n),\n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__account_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__account_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n), base as (\n\n select *\n from __dbt__cte__int_ad_reporting__account_report\n),\n\naggregated as (\n \n select\n source_relation,\n date_day,\n platform,\n account_id,\n account_name,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value\n\n \n\n\n\n\n\n from base\n group by 1,2,3,4,5\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.ad_reporting.int_ad_reporting__account_report", "sql": " __dbt__cte__int_ad_reporting__account_report as (\n\n\n\nwith\n\n\nfacebook_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__account_report\"\n\n),\n\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__account_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__account_report\"\n\n),\n\n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__organization_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__account_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__advertiser_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__account_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__advertiser_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__account_report\"\n\n),\n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__account_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__account_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.ad_reporting__ad_group_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "ad_reporting__ad_group_report", "resource_type": "model", "package_name": "ad_reporting", "path": "ad_reporting__ad_group_report.sql", "original_file_path": "models/ad_reporting__ad_group_report.sql", "unique_id": "model.ad_reporting.ad_reporting__ad_group_report", "fqn": ["ad_reporting", "ad_reporting__ad_group_report"], "alias": "ad_reporting__ad_group_report", "checksum": {"name": "sha256", "checksum": "5c0b5972fa79e21e67f7d5d0ff510424b54604dc214e1b978d22bc45b6b5b51d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents daily metrics by ad group, campaign and account.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.date_day"]}, "platform": {"name": "platform", "description": "The ad platform associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.platform"]}, "account_id": {"name": "account_id", "description": "The ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_id"]}, "account_name": {"name": "account_name", "description": "The name of the account, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID representing the campaign, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.campaign_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID representing the ad group, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the ad group, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.ad_group_name"]}, "clicks": {"name": "clicks", "description": "The count of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.clicks"]}, "impressions": {"name": "impressions", "description": "The count of impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.impressions"]}, "spend": {"name": "spend", "description": "The cost of the ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.spend"]}, "conversions": {"name": "conversions", "description": "The count of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The monetary value of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "ad_reporting://models/ad_reporting_models.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.5448704, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__ad_group_report\"", "raw_code": "{% set enabled_packages = get_enabled_packages() %}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith base as (\n\n select *\n from {{ ref('int_ad_reporting__ad_group_report') }}\n),\n\naggregated as (\n \n select\n source_relation,\n date_day,\n platform,\n account_id,\n account_name,\n campaign_id,\n campaign_name,\n ad_group_id,\n ad_group_name,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value\n\n {{ ad_reporting_persist_pass_through_columns(pass_through_variable='ad_reporting__ad_group_passthrough_metrics', transform = 'sum', alias_fields=['conversions', 'conversions_value']) }}\n\n from base\n {{ dbt_utils.group_by(9) }}\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_ad_reporting__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.ad_reporting_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.ad_reporting.int_ad_reporting__ad_group_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting__ad_group_report.sql", "compiled": true, "compiled_code": "\n\n\nwith __dbt__cte__int_ad_reporting__ad_group_report as (\n\n\n\nwith\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__ad_group_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__ad_group_report\"\n\n),\n\n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__ad_group_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as ad_group_id\n\n \n ,cast(campaign_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__campaign_report\"\n\n),\n\n\n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_set_id as TEXT) as ad_group_id\n\n \n ,cast(ad_set_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__ad_set_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__ad_group_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(ad_squad_id as TEXT) as ad_group_id\n\n \n ,cast(ad_squad_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__ad_squad_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__ad_group_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(line_item_id as TEXT) as ad_group_id\n\n \n ,cast(line_item_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__line_item_report\"\n\n), \n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__ad_group_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__ad_group_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n), base as (\n\n select *\n from __dbt__cte__int_ad_reporting__ad_group_report\n),\n\naggregated as (\n \n select\n source_relation,\n date_day,\n platform,\n account_id,\n account_name,\n campaign_id,\n campaign_name,\n ad_group_id,\n ad_group_name,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value\n\n \n\n\n\n\n\n from base\n group by 1,2,3,4,5,6,7,8,9\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.ad_reporting.int_ad_reporting__ad_group_report", "sql": " __dbt__cte__int_ad_reporting__ad_group_report as (\n\n\n\nwith\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__ad_group_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__ad_group_report\"\n\n),\n\n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__ad_group_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as ad_group_id\n\n \n ,cast(campaign_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__campaign_report\"\n\n),\n\n\n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_set_id as TEXT) as ad_group_id\n\n \n ,cast(ad_set_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__ad_set_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__ad_group_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(ad_squad_id as TEXT) as ad_group_id\n\n \n ,cast(ad_squad_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__ad_squad_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__ad_group_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(line_item_id as TEXT) as ad_group_id\n\n \n ,cast(line_item_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__line_item_report\"\n\n), \n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__ad_group_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__ad_group_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.ad_reporting__search_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "ad_reporting__search_report", "resource_type": "model", "package_name": "ad_reporting", "path": "ad_reporting__search_report.sql", "original_file_path": "models/ad_reporting__search_report.sql", "unique_id": "model.ad_reporting.ad_reporting__search_report", "fqn": ["ad_reporting", "ad_reporting__search_report"], "alias": "ad_reporting__search_report", "checksum": {"name": "sha256", "checksum": "dd9f2cfde264c525665cddabb05ff7562dfd3c40754a9c4bfd6cfd71540654f4"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents daily metrics by search query, ad group, campaign and account.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.date_day"]}, "platform": {"name": "platform", "description": "The ad platform associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.platform"]}, "account_id": {"name": "account_id", "description": "The ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_id"]}, "account_name": {"name": "account_name", "description": "The name of the account, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.account_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID representing the campaign, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.campaign_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID representing the ad group, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the ad group, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.ad_group_name"]}, "keyword_id": {"name": "keyword_id", "description": "The ID representing the keyword, if present in the source data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.keyword_id"]}, "keyword_text": {"name": "keyword_text", "description": "The keyword text.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.keyword_text"]}, "search_query": {"name": "search_query", "description": "The search query text.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.search_query"]}, "search_match_type": {"name": "search_match_type", "description": "The search match type associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.search_match_type"]}, "clicks": {"name": "clicks", "description": "The count of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.clicks"]}, "impressions": {"name": "impressions", "description": "The count of impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.impressions"]}, "spend": {"name": "spend", "description": "The cost of the ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.spend"]}, "conversions": {"name": "conversions", "description": "The count of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The monetary value of attributed conversion events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.ad_reporting.conversions_value"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "ad_reporting://models/ad_reporting_models.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.5507493, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__search_report\"", "raw_code": "{% set include_list = ['amazon_ads', 'microsoft_ads'] %}\n{% do include_list.append('apple_search_ads') if var('apple_search_ads__using_search_terms', true) %}\n{% do include_list.append('google_ads') if var('google_ads__using_search_term_keyword_stats', true) %}\n\n{% set enabled_packages = get_enabled_packages(include=include_list)%}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith base as (\n\n select *\n from {{ ref('int_ad_reporting__search_report') }}\n),\n\naggregated as (\n \n select\n source_relation,\n date_day,\n platform,\n account_id,\n account_name,\n campaign_id,\n campaign_name,\n ad_group_id,\n ad_group_name,\n keyword_id,\n keyword_text,\n search_query,\n search_match_type,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value\n\n {{ ad_reporting_persist_pass_through_columns(pass_through_variable='ad_reporting__search_passthrough_metrics', transform = 'sum', alias_fields=['conversions', 'conversions_value']) }}\n\n from base\n {{ dbt_utils.group_by(13) }}\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "int_ad_reporting__search_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.ad_reporting_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.ad_reporting.int_ad_reporting__search_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting__search_report.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\nwith __dbt__cte__int_ad_reporting__search_report as (\n\n\n\n\n\n\n\nwith \n\nmicrosoft_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(keyword_name as TEXT) as keyword_text\n\n \n ,cast(match_type as TEXT) as search_match_type\n\n \n ,cast(search_query as TEXT) as search_query\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__search_report\"\n\n), \n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(match_type as TEXT) as search_match_type\n\n \n ,cast(search_term_text as TEXT) as search_query\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__search_term_report\"\n\n), \n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(match_type as TEXT) as search_match_type\n\n \n ,cast(search_term as TEXT) as search_query\n\n \n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__search_report\"\n\n), \n\n\n\ngoogle_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(criterion_id as TEXT) as keyword_id\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(search_term_match_type as TEXT) as search_match_type\n\n \n ,cast(search_term as TEXT) as search_query\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__search_term_report\"\n\n), \n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from microsoft_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n), base as (\n\n select *\n from __dbt__cte__int_ad_reporting__search_report\n),\n\naggregated as (\n \n select\n source_relation,\n date_day,\n platform,\n account_id,\n account_name,\n campaign_id,\n campaign_name,\n ad_group_id,\n ad_group_name,\n keyword_id,\n keyword_text,\n search_query,\n search_match_type,\n sum(clicks) as clicks,\n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(conversions) as conversions,\n sum(conversions_value) as conversions_value\n\n \n\n\n\n\n\n from base\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [{"id": "model.ad_reporting.int_ad_reporting__search_report", "sql": " __dbt__cte__int_ad_reporting__search_report as (\n\n\n\n\n\n\n\nwith \n\nmicrosoft_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(keyword_name as TEXT) as keyword_text\n\n \n ,cast(match_type as TEXT) as search_match_type\n\n \n ,cast(search_query as TEXT) as search_query\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__search_report\"\n\n), \n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(match_type as TEXT) as search_match_type\n\n \n ,cast(search_term_text as TEXT) as search_query\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__search_term_report\"\n\n), \n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(match_type as TEXT) as search_match_type\n\n \n ,cast(search_term as TEXT) as search_query\n\n \n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__search_report\"\n\n), \n\n\n\ngoogle_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(criterion_id as TEXT) as keyword_id\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(search_term_match_type as TEXT) as search_match_type\n\n \n ,cast(search_term as TEXT) as search_query\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__search_term_report\"\n\n), \n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from microsoft_ads\n\n\n\n\n)\n\nselect *\nfrom unioned\n)"}], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.int_ad_reporting__url_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "int_ad_reporting__url_report", "resource_type": "model", "package_name": "ad_reporting", "path": "intermediate/int_ad_reporting__url_report.sql", "original_file_path": "models/intermediate/int_ad_reporting__url_report.sql", "unique_id": "model.ad_reporting.int_ad_reporting__url_report", "fqn": ["ad_reporting", "intermediate", "int_ad_reporting__url_report"], "alias": "int_ad_reporting__url_report", "checksum": {"name": "sha256", "checksum": "c63f2f7ced76a775e88dcbd14c6a40b18cfd4597438584de7e9e93353f635fc7"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708219.0091038, "relation_name": null, "raw_code": "{% set enabled_packages = get_enabled_packages(exclude=['amazon_ads', 'apple_search_ads']) %}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith\n{% for package in ['google_ads', 'microsoft_ads'] %}\n{% if package in enabled_packages %}\n{{ package }} as (\n {{ get_query(\n platform=package,\n report_type='url',\n relation=ref(package ~ '__url_report')\n ) }}\n),\n{% endif %}\n{% endfor %}\n\n{% if 'facebook_ads' in enabled_packages %}\nfacebook_ads as (\n\n {{ get_query(\n platform='facebook_ads', \n report_type='url', \n field_mapping={\n 'ad_group_id': 'ad_set_id',\n 'ad_group_name': 'ad_set_name'\n },\n relation=ref('facebook_ads__url_report')\n ) }}\n),\n{% endif %}\n\n{% if 'linkedin_ads' in enabled_packages %}\nlinkedin_ads as (\n\n {{ get_query(\n platform='linkedin_ads', \n report_type='url', \n field_mapping={\n 'campaign_id': 'campaign_group_id',\n 'campaign_name': 'campaign_group_name',\n 'ad_group_id': 'campaign_id',\n 'ad_group_name': 'campaign_name',\n 'spend': 'cost',\n 'conversions': 'total_conversions',\n 'conversions_value': 'conversion_value_in_local_currency'\n },\n relation=ref('linkedin_ads__url_report')\n ) }}\n),\n{% endif %}\n\n{% if 'pinterest_ads' in enabled_packages %}\npinterest_ads as (\n\n {{ get_query(\n platform='pinterest_ads', \n report_type='url', \n field_mapping={\n 'account_id': 'advertiser_id',\n 'account_name': 'advertiser_name',\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_value'\n },\n relation=ref('pinterest_ads__url_report')\n ) }}\n),\n{% endif %}\n\n{% if 'snapchat_ads' in enabled_packages %}\nsnapchat_ads as (\n\n {{ get_query(\n platform='snapchat_ads', \n report_type='url', \n field_mapping={\n 'account_id': 'ad_account_id',\n 'account_name': 'ad_account_name',\n 'ad_group_id': 'ad_squad_id',\n 'ad_group_name': 'ad_squad_name',\n 'clicks':'swipes',\n 'conversions': 'total_conversions',\n 'conversions_value': 'conversion_purchases_value'\n },\n relation=ref('snapchat_ads__url_report')\n ) }}\n), \n{% endif %}\n\n{% if 'tiktok_ads' in enabled_packages %}\ntiktok_ads as (\n\n {{ get_query(\n platform='tiktok_ads', \n report_type='url', \n field_mapping={\n 'account_id': 'advertiser_id',\n 'account_name': 'advertiser_name',\n 'conversions': 'conversion',\n 'conversions_value': 'total_conversion_value'\n },\n relation=ref('tiktok_ads__url_report')\n ) }}\n), \n{% endif %}\n\n{% if 'twitter_ads' in enabled_packages %}\ntwitter_ads as (\n\n {{ get_query(\n platform='twitter_ads', \n report_type='url', \n field_mapping={\n 'ad_group_id': 'line_item_id',\n 'ad_group_name': 'line_item_name',\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_sale_amount'\n },\n relation=ref('twitter_ads__url_report')\n ) }}\n), \n{% endif %}\n\n{% if 'reddit_ads' in enabled_packages %}\nreddit_ads as (\n\n {{ get_query(\n platform='reddit_ads', \n report_type='url', \n field_mapping={\n 'account_name': 'null',\n 'conversions_value': 'total_value'\n },\n relation=ref('reddit_ads__url_report')\n ) }}\n),\n{% endif %}\n\nunioned as (\n\n {{ union_ctes(ctes=enabled_packages)}}\n)\n\nselect *\nfrom unioned", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__url_report", "package": null, "version": null}, {"name": "microsoft_ads__url_report", "package": null, "version": null}, {"name": "facebook_ads__url_report", "package": null, "version": null}, {"name": "linkedin_ads__url_report", "package": null, "version": null}, {"name": "pinterest_ads__url_report", "package": null, "version": null}, {"name": "snapchat_ads__url_report", "package": null, "version": null}, {"name": "tiktok_ads__url_report", "package": null, "version": null}, {"name": "twitter_ads__url_report", "package": null, "version": null}, {"name": "reddit_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.get_query", "macro.ad_reporting.union_ctes"], "nodes": ["model.google_ads.google_ads__url_report", "model.microsoft_ads.microsoft_ads__url_report", "model.facebook_ads.facebook_ads__url_report", "model.linkedin.linkedin_ads__url_report", "model.pinterest.pinterest_ads__url_report", "model.snapchat_ads.snapchat_ads__url_report", "model.tiktok_ads.tiktok_ads__url_report", "model.twitter_ads.twitter_ads__url_report", "model.reddit_ads.reddit_ads__url_report"]}, "compiled_path": "target/compiled/ad_reporting/models/intermediate/int_ad_reporting__url_report.sql", "compiled": true, "compiled_code": "\n\n\nwith\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__url_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__url_report\"\n\n),\n\n\n\n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_set_id as TEXT) as ad_group_id\n\n \n ,cast(ad_set_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__url_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as ad_group_id\n\n \n ,cast(campaign_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__url_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__url_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(ad_squad_id as TEXT) as ad_group_id\n\n \n ,cast(ad_squad_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__url_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__url_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(line_item_id as TEXT) as ad_group_id\n\n \n ,cast(line_item_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__url_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(base_url as TEXT) as base_url\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n ,cast(url_host as TEXT) as url_host\n\n \n ,cast(url_path as TEXT) as url_path\n\n \n ,cast(utm_campaign as TEXT) as utm_campaign\n\n \n ,cast(utm_content as TEXT) as utm_content\n\n \n ,cast(utm_medium as TEXT) as utm_medium\n\n \n ,cast(utm_source as TEXT) as utm_source\n\n \n ,cast(utm_term as TEXT) as utm_term\n\n \n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__url_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.int_ad_reporting__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "int_ad_reporting__campaign_report", "resource_type": "model", "package_name": "ad_reporting", "path": "intermediate/int_ad_reporting__campaign_report.sql", "original_file_path": "models/intermediate/int_ad_reporting__campaign_report.sql", "unique_id": "model.ad_reporting.int_ad_reporting__campaign_report", "fqn": ["ad_reporting", "intermediate", "int_ad_reporting__campaign_report"], "alias": "int_ad_reporting__campaign_report", "checksum": {"name": "sha256", "checksum": "f758d9e24adfea761b4ef99282c19d7048a334cf62c21373c7c661101d1dccf4"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708219.1447444, "relation_name": null, "raw_code": "{% set enabled_packages = get_enabled_packages() %}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith\n{% for package in ['facebook_ads', 'google_ads', 'microsoft_ads'] %}\n{% if package in enabled_packages %}\n{{ package }} as (\n {{ get_query(\n platform=package,\n report_type='campaign',\n relation=ref(package ~ '__campaign_report')\n ) }}\n),\n{% endif %}\n{% endfor %}\n\n{% if 'apple_search_ads' in enabled_packages %}\napple_search_ads as (\n\n {{ get_query(\n platform='apple_search_ads', \n report_type='campaign', \n field_mapping={\n 'account_id': 'organization_id',\n 'account_name': 'organization_name',\n 'clicks': 'taps',\n 'conversions': 'tap_installs',\n 'conversions_value': 'null'\n },\n relation=ref('apple_search_ads__campaign_report')\n ) }}\n),\n{% endif %}\n\n{% if 'linkedin_ads' in enabled_packages %}\nlinkedin_ads as (\n\n {{ get_query(\n platform='linkedin_ads', \n report_type='campaign', \n field_mapping={\n 'campaign_id': 'campaign_group_id',\n 'campaign_name': 'campaign_group_name',\n 'spend': 'cost',\n 'conversions': 'total_conversions',\n 'conversions_value': 'conversion_value_in_local_currency'\n },\n relation=ref('linkedin_ads__campaign_group_report')\n ) }}\n),\n{% endif %}\n\n{% if 'pinterest_ads' in enabled_packages %}\npinterest_ads as (\n\n {{ get_query(\n platform='pinterest_ads', \n report_type='campaign', \n field_mapping={\n 'account_id': 'advertiser_id',\n 'account_name': 'advertiser_name',\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_value'\n },\n relation=ref('pinterest_ads__campaign_report')\n ) }}\n),\n{% endif %}\n\n{% if 'snapchat_ads' in enabled_packages %}\nsnapchat_ads as (\n\n {{ get_query(\n platform='snapchat_ads', \n report_type='campaign', \n field_mapping={\n 'account_id': 'ad_account_id',\n 'account_name': 'ad_account_name',\n 'clicks':'swipes',\n 'conversions': 'total_conversions',\n 'conversions_value': 'conversion_purchases_value'\n },\n relation=ref('snapchat_ads__campaign_report')\n ) }}\n), \n{% endif %}\n\n{% if 'tiktok_ads' in enabled_packages %}\ntiktok_ads as (\n\n {{ get_query(\n platform='tiktok_ads', \n report_type='campaign', \n field_mapping={\n 'account_id': 'advertiser_id',\n 'account_name': 'advertiser_name',\n 'conversions': 'conversion',\n 'conversions_value': 'total_conversion_value'\n },\n relation=ref('tiktok_ads__campaign_report')\n ) }}\n), \n{% endif %}\n\n{% if 'twitter_ads' in enabled_packages %}\ntwitter_ads as (\n\n {{ get_query(\n platform='twitter_ads', \n report_type='campaign', \n field_mapping={\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_sale_amount'\n },\n relation=ref('twitter_ads__campaign_report')\n ) }}\n),\n{% endif %}\n\n{% if 'amazon_ads' in enabled_packages %}\namazon_ads as (\n\n {{ get_query(\n platform='amazon_ads', \n report_type='campaign', \n field_mapping={\n 'spend': 'cost',\n 'conversions': 'purchases_30_d',\n 'conversions_value': 'sales_30_d'\n },\n relation=ref('amazon_ads__campaign_report')\n ) }}\n), \n{% endif %}\n\n{% if 'reddit_ads' in enabled_packages %}\nreddit_ads as (\n\n {{ get_query(\n platform='reddit_ads', \n report_type='campaign', \n field_mapping={\n 'account_name': 'null',\n 'conversions_value': 'total_value'\n },\n relation=ref('reddit_ads__campaign_report')\n ) }}\n),\n{% endif %}\n\nunioned as (\n\n {{ union_ctes(ctes=enabled_packages)}}\n)\n\nselect *\nfrom unioned", "doc_blocks": [], "language": "sql", "refs": [{"name": "facebook_ads__campaign_report", "package": null, "version": null}, {"name": "google_ads__campaign_report", "package": null, "version": null}, {"name": "microsoft_ads__campaign_report", "package": null, "version": null}, {"name": "apple_search_ads__campaign_report", "package": null, "version": null}, {"name": "linkedin_ads__campaign_group_report", "package": null, "version": null}, {"name": "pinterest_ads__campaign_report", "package": null, "version": null}, {"name": "snapchat_ads__campaign_report", "package": null, "version": null}, {"name": "tiktok_ads__campaign_report", "package": null, "version": null}, {"name": "twitter_ads__campaign_report", "package": null, "version": null}, {"name": "amazon_ads__campaign_report", "package": null, "version": null}, {"name": "reddit_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.get_query", "macro.ad_reporting.union_ctes"], "nodes": ["model.facebook_ads.facebook_ads__campaign_report", "model.google_ads.google_ads__campaign_report", "model.microsoft_ads.microsoft_ads__campaign_report", "model.apple_search_ads.apple_search_ads__campaign_report", "model.linkedin.linkedin_ads__campaign_group_report", "model.pinterest.pinterest_ads__campaign_report", "model.snapchat_ads.snapchat_ads__campaign_report", "model.tiktok_ads.tiktok_ads__campaign_report", "model.twitter_ads.twitter_ads__campaign_report", "model.amazon_ads.amazon_ads__campaign_report", "model.reddit_ads.reddit_ads__campaign_report"]}, "compiled_path": "target/compiled/ad_reporting/models/intermediate/int_ad_reporting__campaign_report.sql", "compiled": true, "compiled_code": "\n\n\nwith\n\n\nfacebook_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__campaign_report\"\n\n),\n\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__campaign_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_report\"\n\n),\n\n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__campaign_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__campaign_group_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__campaign_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_report\"\n\n),\n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__campaign_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__campaign_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.int_ad_reporting__monthly_campaign_country_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "int_ad_reporting__monthly_campaign_country_report", "resource_type": "model", "package_name": "ad_reporting", "path": "intermediate/int_ad_reporting__monthly_campaign_country_report.sql", "original_file_path": "models/intermediate/int_ad_reporting__monthly_campaign_country_report.sql", "unique_id": "model.ad_reporting.int_ad_reporting__monthly_campaign_country_report", "fqn": ["ad_reporting", "intermediate", "int_ad_reporting__monthly_campaign_country_report"], "alias": "int_ad_reporting__monthly_campaign_country_report", "checksum": {"name": "sha256", "checksum": "cfd5531fcebdd124447f1d86a32b6ccb47e4c52fd923507523f404d0845f1f7d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708219.2049193, "relation_name": null, "raw_code": "{% set include_list = [] %}\n{% do include_list.append('facebook_ads') if var('facebook_ads__using_demographics_country', false) %}\n{% do include_list.append('linkedin_ads') if var('linkedin_ads__using_geo', true) and var('linkedin_ads__using_monthly_ad_analytics_by_member_country', true) %}\n{% do include_list.append('microsoft_ads') if var('microsoft_ads__using_geographic_daily_report', false) %}\n{% do include_list.append('pinterest_ads') if var('pinterest__using_pin_promotion_targeting_report', true) and var('pinterest__using_targeting_geo', true) %}\n{% do include_list.append('reddit_ads') if var('reddit_ads__using_campaign_country_report', true) %}\n{% do include_list.append('snapchat_ads') if var('snapchat_ads__using_campaign_country_report', false) %}\n{% do include_list.append('tiktok_ads') if var('tiktok_ads__using_campaign_country_report', true) %}\n{% do include_list.append('twitter_ads') if var('twitter_ads__using_campaign_locations_report', false) %}\n\n{% set enabled_packages = get_enabled_packages(include=include_list) %}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith \n{% if 'facebook_ads' in enabled_packages %}\nfacebook_ads as (\n\n {{ get_query(\n platform='facebook_ads', \n report_type='country', \n field_mapping={\n 'campaign_id': 'null',\n 'campaign_name': \"'Account-level'\",\n 'conversions_value': 'null',\n 'country': 'null',\n 'country_code': \"replace(country, 'unknown', 'Unknown')\"\n },\n relation=ref('facebook_ads__country_report')\n ) }}\n),\n{% endif %}\n\n{% if 'linkedin_ads' in enabled_packages %}\n{# Linkedin sends Hong Kong as Hong Kong SAR while others send it as Hong Kong SAR China or Hong Kong #}\nlinkedin_ads as (\n\n {{ get_query(\n platform='linkedin_ads', \n report_type='country', \n field_mapping={\n 'campaign_id': 'campaign_group_id',\n 'campaign_name': 'campaign_group_name',\n 'spend': 'cost',\n 'conversions': 'total_conversions',\n 'conversions_value': 'conversion_value_in_local_currency',\n 'country': \"replace(country_name, 'Hong Kong SAR', 'Hong Kong SAR China')\",\n 'country_code': 'null'\n },\n relation=ref('linkedin_ads__monthly_campaign_country_report')\n ) }}\n),\n{% endif %}\n\n{% if 'microsoft_ads' in enabled_packages %}\nmicrosoft_ads as (\n\n {{ get_query(\n platform='microsoft_ads', \n report_type='country', \n field_mapping={\n 'country_code': 'null'\n },\n relation=ref('microsoft_ads__campaign_country_report')\n ) }}\n),\n{% endif %}\n\n{% if 'pinterest_ads' in enabled_packages %}\n{# Pinterest Ads labels the United States as U.S. #}\npinterest_ads as (\n\n {{ get_query(\n platform='pinterest_ads', \n report_type='country', \n field_mapping={\n 'account_id': 'advertiser_id',\n 'account_name': 'advertiser_name',\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_value',\n 'country_code': 'country_id',\n 'country': \"replace(country_name, 'U.S.', 'United States')\"\n },\n relation=ref('pinterest_ads__campaign_country_report')\n ) }}\n),\n{% endif %}\n\n{% if 'reddit_ads' in enabled_packages %}\nreddit_ads as (\n\n {{ get_query(\n platform='reddit_ads', \n report_type='country', \n field_mapping={\n 'account_name': 'null',\n 'conversions_value': 'total_value',\n 'country': 'null',\n 'country_code': 'country'\n },\n relation=ref('reddit_ads__campaign_country_report')\n ) }}\n),\n{% endif %}\n\n{% if 'snapchat_ads' in enabled_packages %}\nsnapchat_ads as (\n\n {{ get_query(\n platform='snapchat_ads', \n report_type='country', \n field_mapping={\n 'account_id': 'ad_account_id',\n 'account_name': 'ad_account_name',\n 'clicks': 'swipes',\n 'conversions': 'total_conversions',\n 'conversions_value': 'conversion_purchases_value',\n 'country': 'null',\n 'country_code': 'country'\n },\n relation=ref('snapchat_ads__campaign_country_report')\n ) }}\n),\n{% endif %}\n\n{% if 'tiktok_ads' in enabled_packages %}\ntiktok_ads as (\n\n {{ get_query(\n platform='tiktok_ads', \n report_type='country', \n field_mapping={\n 'account_id': 'advertiser_id',\n 'account_name': 'advertiser_name',\n 'conversions': 'conversion',\n 'conversions_value': 'null',\n 'country': 'country_name' if var('tiktok_ads__using_location', true) else 'null',\n 'country_code': 'country_code'\n },\n relation=ref('tiktok_ads__campaign_country_report')\n ) }}\n),\n{% endif %}\n\n{% if 'twitter_ads' in enabled_packages %}\ntwitter_ads as (\n\n {{ get_query(\n platform='twitter_ads', \n report_type='country', \n field_mapping={\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_sale_amount',\n 'country_code': 'null'\n },\n relation=ref('twitter_ads__campaign_country_report')\n ) }}\n),\n{% endif %}\n\nunioned as (\n\n {{ union_ctes(ctes=enabled_packages) }}\n)\n\nselect *\nfrom unioned", "doc_blocks": [], "language": "sql", "refs": [{"name": "facebook_ads__country_report", "package": null, "version": null}, {"name": "linkedin_ads__monthly_campaign_country_report", "package": null, "version": null}, {"name": "microsoft_ads__campaign_country_report", "package": null, "version": null}, {"name": "pinterest_ads__campaign_country_report", "package": null, "version": null}, {"name": "reddit_ads__campaign_country_report", "package": null, "version": null}, {"name": "snapchat_ads__campaign_country_report", "package": null, "version": null}, {"name": "tiktok_ads__campaign_country_report", "package": null, "version": null}, {"name": "twitter_ads__campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.get_query", "macro.ad_reporting.union_ctes"], "nodes": ["model.facebook_ads.facebook_ads__country_report", "model.linkedin.linkedin_ads__monthly_campaign_country_report", "model.microsoft_ads.microsoft_ads__campaign_country_report", "model.pinterest.pinterest_ads__campaign_country_report", "model.reddit_ads.reddit_ads__campaign_country_report", "model.snapchat_ads.snapchat_ads__campaign_country_report", "model.tiktok_ads.tiktok_ads__campaign_country_report", "model.twitter_ads.twitter_ads__campaign_country_report"]}, "compiled_path": "target/compiled/ad_reporting/models/intermediate/int_ad_reporting__monthly_campaign_country_report.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n\n\n\n\n\n\nwith \n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(null as TEXT) as campaign_id\n\n \n ,cast('Account-level' as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(null as TEXT) as country\n\n \n ,cast(replace(country, 'unknown', 'Unknown') as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__country_report\"\n\n),\n\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_month)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(replace(country_name, 'Hong Kong SAR', 'Hong Kong SAR China') as TEXT) as country\n\n \n ,cast(null as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__monthly_campaign_country_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(country as TEXT) as country\n\n \n ,cast(null as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_country_report\"\n\n),\n\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(replace(country_name, 'U.S.', 'United States') as TEXT) as country\n\n \n ,cast(country_id as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_country_report\"\n\n),\n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(null as TEXT) as country\n\n \n ,cast(country as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__campaign_country_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(null as TEXT) as country\n\n \n ,cast(country as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_country_report\"\n\n),\n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(country_name as TEXT) as country\n\n \n ,cast(country_code as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__campaign_country_report\"\n\n),\n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(country as TEXT) as country\n\n \n ,cast(null as TEXT) as country_code\n\n \n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_country_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from facebook_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.int_ad_reporting__ad_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "int_ad_reporting__ad_report", "resource_type": "model", "package_name": "ad_reporting", "path": "intermediate/int_ad_reporting__ad_report.sql", "original_file_path": "models/intermediate/int_ad_reporting__ad_report.sql", "unique_id": "model.ad_reporting.int_ad_reporting__ad_report", "fqn": ["ad_reporting", "intermediate", "int_ad_reporting__ad_report"], "alias": "int_ad_reporting__ad_report", "checksum": {"name": "sha256", "checksum": "6d1386977154c816977a1aaeab27907c687d107db030acfdf5f5696b28f097ec"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708219.2642176, "relation_name": null, "raw_code": "{% set enabled_packages = get_enabled_packages() %}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith\n{% for package in ['google_ads', 'microsoft_ads'] %}\n{% if package in enabled_packages %}\n{{ package }} as (\n {{ get_query(\n platform=package,\n report_type='ad',\n relation=ref(package ~ '__ad_report')\n ) }}\n),\n{% endif %}\n{% endfor %}\n\n{% if 'apple_search_ads' in enabled_packages %}\napple_search_ads as (\n\n {{ get_query(\n platform='apple_search_ads', \n report_type='ad', \n field_mapping={\n 'account_id': 'organization_id',\n 'account_name': 'organization_name',\n 'clicks': 'taps',\n 'conversions': 'tap_installs',\n 'conversions_value': 'null'\n },\n relation=ref('apple_search_ads__ad_report')\n ) }}\n),\n{% endif %}\n\n{% if 'facebook_ads' in enabled_packages %}\nfacebook_ads as (\n\n {{ get_query(\n platform='facebook_ads', \n report_type='ad', \n field_mapping={\n 'ad_group_id': 'ad_set_id',\n 'ad_group_name': 'ad_set_name'\n },\n relation=ref('facebook_ads__ad_report')\n ) }}\n),\n{% endif %}\n\n{% if 'linkedin_ads' in enabled_packages %}\nlinkedin_ads as (\n\n {{ get_query(\n platform='linkedin_ads', \n report_type='ad', \n field_mapping={\n 'campaign_id': 'campaign_group_id',\n 'campaign_name': 'campaign_group_name',\n 'ad_group_id': 'campaign_id',\n 'ad_group_name': 'campaign_name',\n 'ad_id': 'creative_id',\n 'ad_name': 'null',\n 'spend': 'cost',\n 'conversions': 'total_conversions',\n 'conversions_value': 'conversion_value_in_local_currency'\n },\n relation=ref('linkedin_ads__creative_report')\n ) }}\n),\n{% endif %}\n\n{% if 'pinterest_ads' in enabled_packages %}\npinterest_ads as (\n\n {{ get_query(\n platform='pinterest_ads', \n report_type='ad', \n field_mapping={\n 'account_id': 'advertiser_id',\n 'account_name': 'advertiser_name',\n 'ad_id': 'pin_promotion_id',\n 'ad_name': 'pin_name',\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_value'\n },\n relation=ref('pinterest_ads__pin_promotion_report')\n ) }}\n),\n{% endif %}\n\n{% if 'snapchat_ads' in enabled_packages %}\nsnapchat_ads as (\n\n {{ get_query(\n platform='snapchat_ads', \n report_type='ad', \n field_mapping={\n 'account_id': 'ad_account_id',\n 'account_name': 'ad_account_name',\n 'campaign_id': 'campaign_id',\n 'campaign_name': 'campaign_name',\n 'ad_group_id': 'ad_squad_id',\n 'ad_group_name': 'ad_squad_name',\n 'clicks':'swipes',\n 'conversions': 'total_conversions',\n 'conversions_value': 'conversion_purchases_value'\n },\n relation=ref('snapchat_ads__ad_report')\n ) }}\n), \n{% endif %}\n\n{% if 'tiktok_ads' in enabled_packages %}\ntiktok_ads as (\n\n {{ get_query(\n platform='tiktok_ads', \n report_type='ad', \n field_mapping={\n 'account_id': 'advertiser_id',\n 'account_name': 'advertiser_name',\n 'conversions': 'conversion',\n 'conversions_value': 'total_conversion_value'\n },\n relation=ref('tiktok_ads__ad_report')\n ) }}\n), \n{% endif %}\n\n{% if 'twitter_ads' in enabled_packages %}\ntwitter_ads as (\n\n {{ get_query(\n platform='twitter_ads', \n report_type='ad', \n field_mapping={\n 'ad_group_id': 'line_item_id',\n 'ad_group_name': 'line_item_name',\n 'ad_id': 'promoted_tweet_id',\n 'ad_name': 'tweet_name',\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_sale_amount'\n },\n relation=ref('twitter_ads__promoted_tweet_report')\n ) }}\n), \n{% endif %}\n\n{% if 'amazon_ads' in enabled_packages %}\namazon_ads as (\n\n {{ get_query(\n platform='amazon_ads', \n report_type='ad', \n field_mapping={\n 'spend': 'cost',\n 'ad_name': 'advertised_asin',\n 'conversions': 'purchases_30_d',\n 'conversions_value': 'sales_30_d'\n },\n relation=ref('amazon_ads__ad_report')\n ) }}\n), \n{% endif %}\n\n{% if 'reddit_ads' in enabled_packages %}\nreddit_ads as (\n\n {{ get_query(\n platform='reddit_ads', \n report_type='ad', \n field_mapping={\n 'account_name': 'null',\n 'conversions_value': 'total_value'\n },\n relation=ref('reddit_ads__ad_report')\n ) }}\n),\n{% endif %}\n\nunioned as (\n\n {{ union_ctes(ctes=enabled_packages)}}\n)\n\nselect *\nfrom unioned", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__ad_report", "package": null, "version": null}, {"name": "microsoft_ads__ad_report", "package": null, "version": null}, {"name": "apple_search_ads__ad_report", "package": null, "version": null}, {"name": "facebook_ads__ad_report", "package": null, "version": null}, {"name": "linkedin_ads__creative_report", "package": null, "version": null}, {"name": "pinterest_ads__pin_promotion_report", "package": null, "version": null}, {"name": "snapchat_ads__ad_report", "package": null, "version": null}, {"name": "tiktok_ads__ad_report", "package": null, "version": null}, {"name": "twitter_ads__promoted_tweet_report", "package": null, "version": null}, {"name": "amazon_ads__ad_report", "package": null, "version": null}, {"name": "reddit_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.get_query", "macro.ad_reporting.union_ctes"], "nodes": ["model.google_ads.google_ads__ad_report", "model.microsoft_ads.microsoft_ads__ad_report", "model.apple_search_ads.apple_search_ads__ad_report", "model.facebook_ads.facebook_ads__ad_report", "model.linkedin.linkedin_ads__creative_report", "model.pinterest.pinterest_ads__pin_promotion_report", "model.snapchat_ads.snapchat_ads__ad_report", "model.tiktok_ads.tiktok_ads__ad_report", "model.twitter_ads.twitter_ads__promoted_tweet_report", "model.amazon_ads.amazon_ads__ad_report", "model.reddit_ads.reddit_ads__ad_report"]}, "compiled_path": "target/compiled/ad_reporting/models/intermediate/int_ad_reporting__ad_report.sql", "compiled": true, "compiled_code": "\n\n\nwith\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__ad_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__ad_report\"\n\n),\n\n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__ad_report\"\n\n),\n\n\n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_set_id as TEXT) as ad_group_id\n\n \n ,cast(ad_set_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__ad_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as ad_group_id\n\n \n ,cast(campaign_name as TEXT) as ad_group_name\n\n \n ,cast(creative_id as TEXT) as ad_id\n\n \n ,cast(null as TEXT) as ad_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__creative_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(pin_promotion_id as TEXT) as ad_id\n\n \n ,cast(pin_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__pin_promotion_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(ad_squad_id as TEXT) as ad_group_id\n\n \n ,cast(ad_squad_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__ad_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__ad_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(line_item_id as TEXT) as ad_group_id\n\n \n ,cast(line_item_name as TEXT) as ad_group_name\n\n \n ,cast(promoted_tweet_id as TEXT) as ad_id\n\n \n ,cast(tweet_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__promoted_tweet_report\"\n\n), \n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(advertised_asin as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__ad_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(ad_id as TEXT) as ad_id\n\n \n ,cast(ad_name as TEXT) as ad_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__ad_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.int_ad_reporting__search_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "int_ad_reporting__search_report", "resource_type": "model", "package_name": "ad_reporting", "path": "intermediate/int_ad_reporting__search_report.sql", "original_file_path": "models/intermediate/int_ad_reporting__search_report.sql", "unique_id": "model.ad_reporting.int_ad_reporting__search_report", "fqn": ["ad_reporting", "intermediate", "int_ad_reporting__search_report"], "alias": "int_ad_reporting__search_report", "checksum": {"name": "sha256", "checksum": "1ebb6fcb26e81ccdda3af0ee23a398dc8851d2954837e422bde162be20a5f809"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708219.3420758, "relation_name": null, "raw_code": "{% set include_list = ['amazon_ads', 'microsoft_ads'] %}\n{% do include_list.append('apple_search_ads') if var('apple_search_ads__using_search_terms', true) %}\n{% do include_list.append('google_ads') if var('google_ads__using_search_term_keyword_stats', true) %}\n\n{% set enabled_packages = get_enabled_packages(include=include_list)%}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith \n{% if 'microsoft_ads' in enabled_packages %}\nmicrosoft_ads as (\n\n {{ get_query(\n platform='microsoft_ads', \n report_type='search', \n field_mapping={\n 'keyword_text': 'keyword_name',\n 'search_match_type': 'match_type'\n },\n relation=ref('microsoft_ads__search_report')\n ) }}\n), \n{% endif %}\n\n{% if 'apple_search_ads' in enabled_packages and var('apple_search_ads__using_search_terms', True) %}\napple_search_ads as (\n\n {{ get_query(\n platform='apple_search_ads', \n report_type='search', \n field_mapping={\n 'account_id': 'organization_id',\n 'account_name': 'organization_name',\n 'search_match_type': 'match_type',\n 'search_query': 'search_term_text',\n 'clicks': 'taps',\n 'conversions': 'tap_installs',\n 'conversions_value': 'null'\n },\n relation=ref('apple_search_ads__search_term_report')\n ) }}\n), \n{% endif %}\n\n{% if 'amazon_ads' in enabled_packages %}\namazon_ads as (\n\n {{ get_query(\n platform='amazon_ads', \n report_type='search', \n field_mapping={\n 'spend': 'cost',\n 'search_match_type': 'match_type',\n 'search_query': 'search_term',\n 'conversions': 'purchases_30_d',\n 'conversions_value': 'sales_30_d'\n },\n relation=ref('amazon_ads__search_report')\n ) }}\n), \n{% endif %}\n\n{% if 'google_ads' in enabled_packages and var('google_ads__using_search_term_keyword_stats', True) %}\ngoogle_ads as (\n\n {{ get_query(\n platform='google_ads', \n report_type='search', \n field_mapping={\n 'search_match_type': 'search_term_match_type',\n 'search_query': 'search_term',\n 'keyword_id': 'criterion_id'\n },\n relation=ref('google_ads__search_term_report')\n ) }}\n), \n{% endif %}\n\nunioned as (\n\n {{ union_ctes(ctes=enabled_packages)}}\n)\n\nselect *\nfrom unioned", "doc_blocks": [], "language": "sql", "refs": [{"name": "microsoft_ads__search_report", "package": null, "version": null}, {"name": "apple_search_ads__search_term_report", "package": null, "version": null}, {"name": "amazon_ads__search_report", "package": null, "version": null}, {"name": "google_ads__search_term_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.get_query", "macro.ad_reporting.union_ctes"], "nodes": ["model.microsoft_ads.microsoft_ads__search_report", "model.apple_search_ads.apple_search_ads__search_term_report", "model.amazon_ads.amazon_ads__search_report", "model.google_ads.google_ads__search_term_report"]}, "compiled_path": "target/compiled/ad_reporting/models/intermediate/int_ad_reporting__search_report.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\nwith \n\nmicrosoft_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(keyword_name as TEXT) as keyword_text\n\n \n ,cast(match_type as TEXT) as search_match_type\n\n \n ,cast(search_query as TEXT) as search_query\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__search_report\"\n\n), \n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(match_type as TEXT) as search_match_type\n\n \n ,cast(search_term_text as TEXT) as search_query\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__search_term_report\"\n\n), \n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(match_type as TEXT) as search_match_type\n\n \n ,cast(search_term as TEXT) as search_query\n\n \n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__search_report\"\n\n), \n\n\n\ngoogle_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(criterion_id as TEXT) as keyword_id\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(search_term_match_type as TEXT) as search_match_type\n\n \n ,cast(search_term as TEXT) as search_query\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__search_term_report\"\n\n), \n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from microsoft_ads\n\n\n\n\n)\n\nselect *\nfrom unioned", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.int_ad_reporting__keyword_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "int_ad_reporting__keyword_report", "resource_type": "model", "package_name": "ad_reporting", "path": "intermediate/int_ad_reporting__keyword_report.sql", "original_file_path": "models/intermediate/int_ad_reporting__keyword_report.sql", "unique_id": "model.ad_reporting.int_ad_reporting__keyword_report", "fqn": ["ad_reporting", "intermediate", "int_ad_reporting__keyword_report"], "alias": "int_ad_reporting__keyword_report", "checksum": {"name": "sha256", "checksum": "a840534875fd3dfd970e0a3ee9275ef0319534cf53eccc118c52ad5d09fef430"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708219.380091, "relation_name": null, "raw_code": "{% set include_list = ['amazon_ads', 'apple_search_ads', 'google_ads', 'microsoft_ads'] %}\n{% do include_list.append('pinterest_ads') if var('pinterest__using_keywords', true) %}\n{% do include_list.append('twitter_ads') if var('twitter_ads__using_keywords', true) %}\n\n{% set enabled_packages = get_enabled_packages(include=include_list)%}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith\n{% if 'apple_search_ads' in enabled_packages %}\napple_search_ads as (\n\n {{ get_query(\n platform='apple_search_ads', \n report_type='keyword', \n field_mapping={\n 'account_id': 'organization_id',\n 'account_name': 'organization_name',\n 'keyword_match_type': 'match_type',\n 'clicks': 'taps',\n 'conversions': 'tap_installs',\n 'conversions_value': 'null'\n },\n relation=ref('apple_search_ads__keyword_report')\n ) }}\n),\n{% endif %}\n\n{% if 'google_ads' in enabled_packages %}\ngoogle_ads as (\n\n {{ get_query(\n platform='google_ads', \n report_type='keyword', \n field_mapping={\n 'keyword_id': 'criterion_id',\n },\n relation=ref('google_ads__keyword_report')\n ) }}\n),\n{% endif %}\n\n{% if 'microsoft_ads' in enabled_packages %}\nmicrosoft_ads as (\n\n {{ get_query(\n platform='microsoft_ads', \n report_type='keyword', \n field_mapping={\n 'keyword_text': 'keyword_name',\n 'keyword_match_type': 'match_type'\n },\n relation=ref('microsoft_ads__keyword_report')\n ) }}\n),\n{% endif %}\n\n{% if 'pinterest_ads' in enabled_packages and var('pinterest__using_keywords', True) %}\npinterest_ads as (\n\n {{ get_query(\n platform='pinterest_ads', \n report_type='keyword', \n field_mapping={\n 'account_id': 'advertiser_id',\n 'account_name': 'advertiser_name',\n 'keyword_text': 'keyword_value',\n 'keyword_match_type': 'match_type',\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_value'\n },\n relation=ref('pinterest_ads__keyword_report')\n ) }}\n),\n{% endif %}\n\n{% if 'twitter_ads' in enabled_packages and var('twitter_ads__using_keywords', True) %}\ntwitter_ads as (\n\n {{ get_query(\n platform='twitter_ads', \n report_type='keyword', \n field_mapping={\n 'ad_group_id': 'line_item_id',\n 'ad_group_name': 'line_item_name',\n 'keyword_id': 'keyword_id',\n 'keyword_text': 'keyword',\n 'keyword_match_type': 'null',\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_sale_amount'\n },\n relation=ref('twitter_ads__keyword_report')\n ) }}\n), \n{% endif %}\n\n{% if 'amazon_ads' in enabled_packages %}\namazon_ads as (\n\n {{ get_query(\n platform='amazon_ads', \n report_type='keyword', \n field_mapping={\n 'spend': 'cost',\n 'keyword_match_type': 'match_type',\n 'conversions': 'purchases_30_d',\n 'conversions_value': 'sales_30_d'\n },\n relation=ref('amazon_ads__keyword_report')\n ) }}\n), \n{% endif %}\n\nunioned as (\n\n {{ union_ctes(ctes=enabled_packages)}}\n)\n\nselect *\nfrom unioned", "doc_blocks": [], "language": "sql", "refs": [{"name": "apple_search_ads__keyword_report", "package": null, "version": null}, {"name": "google_ads__keyword_report", "package": null, "version": null}, {"name": "microsoft_ads__keyword_report", "package": null, "version": null}, {"name": "pinterest_ads__keyword_report", "package": null, "version": null}, {"name": "twitter_ads__keyword_report", "package": null, "version": null}, {"name": "amazon_ads__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.get_query", "macro.ad_reporting.union_ctes"], "nodes": ["model.apple_search_ads.apple_search_ads__keyword_report", "model.google_ads.google_ads__keyword_report", "model.microsoft_ads.microsoft_ads__keyword_report", "model.pinterest.pinterest_ads__keyword_report", "model.twitter_ads.twitter_ads__keyword_report", "model.amazon_ads.amazon_ads__keyword_report"]}, "compiled_path": "target/compiled/ad_reporting/models/intermediate/int_ad_reporting__keyword_report.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\nwith\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__keyword_report\"\n\n),\n\n\n\ngoogle_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(criterion_id as TEXT) as keyword_id\n\n \n ,cast(keyword_match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__keyword_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_name as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__keyword_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_value as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__keyword_report\"\n\n),\n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(line_item_id as TEXT) as ad_group_id\n\n \n ,cast(line_item_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(null as TEXT) as keyword_match_type\n\n \n ,cast(keyword as TEXT) as keyword_text\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__keyword_report\"\n\n), \n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(keyword_id as TEXT) as keyword_id\n\n \n ,cast(match_type as TEXT) as keyword_match_type\n\n \n ,cast(keyword_text as TEXT) as keyword_text\n\n \n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__keyword_report\"\n\n), \n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from twitter_ads\n\n\n\n\n)\n\nselect *\nfrom unioned", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.int_ad_reporting__ad_group_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "int_ad_reporting__ad_group_report", "resource_type": "model", "package_name": "ad_reporting", "path": "intermediate/int_ad_reporting__ad_group_report.sql", "original_file_path": "models/intermediate/int_ad_reporting__ad_group_report.sql", "unique_id": "model.ad_reporting.int_ad_reporting__ad_group_report", "fqn": ["ad_reporting", "intermediate", "int_ad_reporting__ad_group_report"], "alias": "int_ad_reporting__ad_group_report", "checksum": {"name": "sha256", "checksum": "8a12689ca84a50414015e9702b5c5235072abee340617dd7c8d4560160690123"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708219.5103314, "relation_name": null, "raw_code": "{% set enabled_packages = get_enabled_packages() %}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith\n{% for package in ['google_ads', 'microsoft_ads'] %}\n{% if package in enabled_packages %}\n{{ package }} as (\n {{ get_query(\n platform=package,\n report_type='ad_group',\n relation=ref(package ~ '__ad_group_report')\n ) }}\n),\n{% endif %}\n{% endfor %}\n\n{% if 'apple_search_ads' in enabled_packages %}\napple_search_ads as (\n\n {{ get_query(\n platform='apple_search_ads', \n report_type='ad_group', \n field_mapping={\n 'account_id': 'organization_id',\n 'account_name': 'organization_name',\n 'clicks': 'taps',\n 'conversions': 'tap_installs',\n 'conversions_value': 'null'\n },\n relation=ref('apple_search_ads__ad_group_report')\n ) }}\n),\n{% endif %}\n\n{% if 'linkedin_ads' in enabled_packages %}\nlinkedin_ads as (\n\n {{ get_query(\n platform='linkedin_ads', \n report_type='ad_group', \n field_mapping={\n 'campaign_id': 'campaign_group_id',\n 'campaign_name': 'campaign_group_name',\n 'ad_group_id': 'campaign_id',\n 'ad_group_name': 'campaign_name',\n 'spend': 'cost',\n 'conversions': 'total_conversions',\n 'conversions_value': 'conversion_value_in_local_currency'\n },\n relation=ref('linkedin_ads__campaign_report')\n ) }}\n),\n{% endif %}\n\n{% if 'facebook_ads' in enabled_packages %}\nfacebook_ads as (\n\n {{ get_query(\n platform='facebook_ads', \n report_type='ad_group', \n field_mapping={\n 'ad_group_id': 'ad_set_id',\n 'ad_group_name': 'ad_set_name'\n },\n relation=ref('facebook_ads__ad_set_report')\n ) }}\n),\n{% endif %}\n\n{% if 'pinterest_ads' in enabled_packages %}\npinterest_ads as (\n\n {{ get_query(\n platform='pinterest_ads', \n report_type='ad_group', \n field_mapping={\n 'account_id': 'advertiser_id',\n 'account_name': 'advertiser_name',\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_value'\n },\n relation=ref('pinterest_ads__ad_group_report')\n ) }}\n),\n{% endif %}\n\n{% if 'snapchat_ads' in enabled_packages %}\nsnapchat_ads as (\n\n {{ get_query(\n platform='snapchat_ads', \n report_type='ad_group', \n field_mapping={\n 'account_id': 'ad_account_id',\n 'account_name': 'ad_account_name',\n 'ad_group_id': 'ad_squad_id',\n 'ad_group_name': 'ad_squad_name',\n 'clicks':'swipes',\n 'conversions': 'total_conversions',\n 'conversions_value': 'conversion_purchases_value'\n },\n relation=ref('snapchat_ads__ad_squad_report')\n ) }}\n), \n{% endif %}\n\n{% if 'tiktok_ads' in enabled_packages %}\ntiktok_ads as (\n\n {{ get_query(\n platform='tiktok_ads', \n report_type='ad_group', \n field_mapping={\n 'account_id': 'advertiser_id',\n 'account_name': 'advertiser_name',\n 'conversions': 'conversion',\n 'conversions_value': 'total_conversion_value'\n },\n relation=ref('tiktok_ads__ad_group_report')\n ) }}\n), \n{% endif %}\n\n{% if 'twitter_ads' in enabled_packages %}\ntwitter_ads as (\n\n {{ get_query(\n platform='twitter_ads', \n report_type='ad_group', \n field_mapping={\n 'ad_group_id': 'line_item_id',\n 'ad_group_name': 'line_item_name',\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_sale_amount'\n },\n relation=ref('twitter_ads__line_item_report')\n ) }}\n), \n{% endif %}\n\n{% if 'amazon_ads' in enabled_packages %}\namazon_ads as (\n\n {{ get_query(\n platform='amazon_ads', \n report_type='ad_group', \n field_mapping={\n 'spend': 'cost',\n 'conversions': 'purchases_30_d',\n 'conversions_value': 'sales_30_d'\n },\n relation=ref('amazon_ads__ad_group_report')\n ) }}\n), \n{% endif %}\n\n{% if 'reddit_ads' in enabled_packages %}\nreddit_ads as (\n\n {{ get_query(\n platform='reddit_ads', \n report_type='ad_group', \n field_mapping={\n 'account_name': 'null',\n 'conversions_value': 'total_value'\n },\n relation=ref('reddit_ads__ad_group_report')\n ) }}\n),\n{% endif %}\n\nunioned as (\n\n {{ union_ctes(ctes=enabled_packages)}}\n)\n\nselect *\nfrom unioned", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__ad_group_report", "package": null, "version": null}, {"name": "microsoft_ads__ad_group_report", "package": null, "version": null}, {"name": "apple_search_ads__ad_group_report", "package": null, "version": null}, {"name": "linkedin_ads__campaign_report", "package": null, "version": null}, {"name": "facebook_ads__ad_set_report", "package": null, "version": null}, {"name": "pinterest_ads__ad_group_report", "package": null, "version": null}, {"name": "snapchat_ads__ad_squad_report", "package": null, "version": null}, {"name": "tiktok_ads__ad_group_report", "package": null, "version": null}, {"name": "twitter_ads__line_item_report", "package": null, "version": null}, {"name": "amazon_ads__ad_group_report", "package": null, "version": null}, {"name": "reddit_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.get_query", "macro.ad_reporting.union_ctes"], "nodes": ["model.google_ads.google_ads__ad_group_report", "model.microsoft_ads.microsoft_ads__ad_group_report", "model.apple_search_ads.apple_search_ads__ad_group_report", "model.linkedin.linkedin_ads__campaign_report", "model.facebook_ads.facebook_ads__ad_set_report", "model.pinterest.pinterest_ads__ad_group_report", "model.snapchat_ads.snapchat_ads__ad_squad_report", "model.tiktok_ads.tiktok_ads__ad_group_report", "model.twitter_ads.twitter_ads__line_item_report", "model.amazon_ads.amazon_ads__ad_group_report", "model.reddit_ads.reddit_ads__ad_group_report"]}, "compiled_path": "target/compiled/ad_reporting/models/intermediate/int_ad_reporting__ad_group_report.sql", "compiled": true, "compiled_code": "\n\n\nwith\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__ad_group_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__ad_group_report\"\n\n),\n\n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__ad_group_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as ad_group_id\n\n \n ,cast(campaign_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__campaign_report\"\n\n),\n\n\n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_set_id as TEXT) as ad_group_id\n\n \n ,cast(ad_set_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__ad_set_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__ad_group_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(ad_squad_id as TEXT) as ad_group_id\n\n \n ,cast(ad_squad_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__ad_squad_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__ad_group_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(line_item_id as TEXT) as ad_group_id\n\n \n ,cast(line_item_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__line_item_report\"\n\n), \n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__ad_group_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(ad_group_id as TEXT) as ad_group_id\n\n \n ,cast(ad_group_name as TEXT) as ad_group_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__ad_group_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.int_ad_reporting__account_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "int_ad_reporting__account_report", "resource_type": "model", "package_name": "ad_reporting", "path": "intermediate/int_ad_reporting__account_report.sql", "original_file_path": "models/intermediate/int_ad_reporting__account_report.sql", "unique_id": "model.ad_reporting.int_ad_reporting__account_report", "fqn": ["ad_reporting", "intermediate", "int_ad_reporting__account_report"], "alias": "int_ad_reporting__account_report", "checksum": {"name": "sha256", "checksum": "0888451c5db29c06c94538869fb662db70307f0ea0d25a82974ed3e53bb18809"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708219.5825202, "relation_name": null, "raw_code": "{% set enabled_packages = get_enabled_packages() %}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith\n{% for package in ['facebook_ads', 'google_ads', 'microsoft_ads'] %}\n{% if package in enabled_packages %}\n{{ package }} as (\n {{ get_query(\n platform=package,\n report_type='account',\n relation=ref(package ~ '__account_report')\n ) }}\n),\n{% endif %}\n{% endfor %}\n\n{% if 'apple_search_ads' in enabled_packages %}\napple_search_ads as (\n\n {{ get_query(\n platform='apple_search_ads', \n report_type='account', \n field_mapping={\n 'account_id': 'organization_id',\n 'account_name': 'organization_name',\n 'clicks': 'taps',\n 'conversions': 'tap_installs',\n 'conversions_value': 'null'\n },\n relation=ref('apple_search_ads__organization_report')\n ) }}\n),\n{% endif %}\n\n{% if 'linkedin_ads' in enabled_packages %}\nlinkedin_ads as (\n\n {{ get_query(\n platform='linkedin_ads', \n report_type='account', \n field_mapping={\n 'spend': 'cost',\n 'conversions': 'total_conversions',\n 'conversions_value': 'conversion_value_in_local_currency'\n },\n relation=ref('linkedin_ads__account_report')\n ) }}\n),\n{% endif %}\n\n{% if 'pinterest_ads' in enabled_packages %}\npinterest_ads as (\n\n {{ get_query(\n platform='pinterest_ads', \n report_type='account', \n field_mapping={\n 'account_id': 'advertiser_id',\n 'account_name': 'advertiser_name',\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_value'\n },\n relation=ref('pinterest_ads__advertiser_report')\n ) }}\n),\n{% endif %}\n\n{% if 'snapchat_ads' in enabled_packages %}\nsnapchat_ads as (\n\n {{ get_query(\n platform='snapchat_ads', \n report_type='account', \n field_mapping={\n 'account_id': 'ad_account_id',\n 'account_name': 'ad_account_name',\n 'clicks':'swipes',\n 'conversions': 'total_conversions',\n 'conversions_value': 'conversion_purchases_value'\n },\n relation=ref('snapchat_ads__account_report')\n ) }}\n), \n{% endif %}\n\n{% if 'tiktok_ads' in enabled_packages %}\ntiktok_ads as (\n\n {{ get_query(\n platform='tiktok_ads', \n report_type='account', \n field_mapping={\n 'account_id': 'advertiser_id',\n 'account_name': 'advertiser_name',\n 'conversions': 'conversion',\n 'conversions_value': 'total_conversion_value'\n },\n relation=ref('tiktok_ads__advertiser_report')\n ) }}\n), \n{% endif %}\n\n{% if 'twitter_ads' in enabled_packages %}\ntwitter_ads as (\n\n {{ get_query(\n platform='twitter_ads', \n report_type='account', \n field_mapping={\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_sale_amount'\n },\n relation=ref('twitter_ads__account_report')\n ) }}\n),\n{% endif %}\n\n{% if 'amazon_ads' in enabled_packages %}\namazon_ads as (\n\n {{ get_query(\n platform='amazon_ads', \n report_type='account', \n field_mapping={\n 'spend': 'cost',\n 'conversions': 'purchases_30_d',\n 'conversions_value': 'sales_30_d'\n },\n relation=ref('amazon_ads__account_report')\n ) }}\n), \n{% endif %}\n\n{% if 'reddit_ads' in enabled_packages %}\nreddit_ads as (\n\n {{ get_query(\n platform='reddit_ads', \n report_type='account', \n field_mapping={\n 'account_name': 'null',\n 'conversions_value': 'total_value'\n },\n relation=ref('reddit_ads__account_report')\n ) }}\n),\n{% endif %}\n\nunioned as (\n\n {{ union_ctes(ctes=enabled_packages)}}\n)\n\nselect *\nfrom unioned", "doc_blocks": [], "language": "sql", "refs": [{"name": "facebook_ads__account_report", "package": null, "version": null}, {"name": "google_ads__account_report", "package": null, "version": null}, {"name": "microsoft_ads__account_report", "package": null, "version": null}, {"name": "apple_search_ads__organization_report", "package": null, "version": null}, {"name": "linkedin_ads__account_report", "package": null, "version": null}, {"name": "pinterest_ads__advertiser_report", "package": null, "version": null}, {"name": "snapchat_ads__account_report", "package": null, "version": null}, {"name": "tiktok_ads__advertiser_report", "package": null, "version": null}, {"name": "twitter_ads__account_report", "package": null, "version": null}, {"name": "amazon_ads__account_report", "package": null, "version": null}, {"name": "reddit_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.get_query", "macro.ad_reporting.union_ctes"], "nodes": ["model.facebook_ads.facebook_ads__account_report", "model.google_ads.google_ads__account_report", "model.microsoft_ads.microsoft_ads__account_report", "model.apple_search_ads.apple_search_ads__organization_report", "model.linkedin.linkedin_ads__account_report", "model.pinterest.pinterest_ads__advertiser_report", "model.snapchat_ads.snapchat_ads__account_report", "model.tiktok_ads.tiktok_ads__advertiser_report", "model.twitter_ads.twitter_ads__account_report", "model.amazon_ads.amazon_ads__account_report", "model.reddit_ads.reddit_ads__account_report"]}, "compiled_path": "target/compiled/ad_reporting/models/intermediate/int_ad_reporting__account_report.sql", "compiled": true, "compiled_code": "\n\n\nwith\n\n\nfacebook_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__account_report\"\n\n),\n\n\n\ngoogle_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'google_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__account_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__account_report\"\n\n),\n\n\n\n\napple_search_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'apple_search_ads' as TEXT) as platform,\n\n cast(organization_id as TEXT) as account_id\n\n \n ,cast(organization_name as TEXT) as account_name\n\n \n ,cast(taps as integer) as clicks\n\n ,cast(tap_installs as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__organization_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__account_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__advertiser_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__account_report\"\n\n), \n\n\n\ntiktok_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'tiktok_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversion as float) as conversions\n\n ,cast(total_conversion_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__advertiser_report\"\n\n), \n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__account_report\"\n\n),\n\n\n\namazon_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'amazon_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(purchases_30_d as float) as conversions\n\n ,cast(sales_30_d as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__account_report\"\n\n), \n\n\n\nreddit_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'reddit_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(null as TEXT) as account_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(total_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__account_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from amazon_ads\n\nunion all\n\nselect * from apple_search_ads\n\nunion all\n\nselect * from facebook_ads\n\nunion all\n\nselect * from google_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from tiktok_ads\n\nunion all\n\nselect * from twitter_ads\n\nunion all\n\nselect * from reddit_ads\n\n\n\n\n)\n\nselect *\nfrom unioned", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.int_ad_reporting__monthly_campaign_region_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "int_ad_reporting__monthly_campaign_region_report", "resource_type": "model", "package_name": "ad_reporting", "path": "intermediate/int_ad_reporting__monthly_campaign_region_report.sql", "original_file_path": "models/intermediate/int_ad_reporting__monthly_campaign_region_report.sql", "unique_id": "model.ad_reporting.int_ad_reporting__monthly_campaign_region_report", "fqn": ["ad_reporting", "intermediate", "int_ad_reporting__monthly_campaign_region_report"], "alias": "int_ad_reporting__monthly_campaign_region_report", "checksum": {"name": "sha256", "checksum": "b25f2a0f68c0aa291121032a4c6ecc278b9dd3ee41428ccd82a1ca270e82e3f7"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708219.6357577, "relation_name": null, "raw_code": "{% set include_list = [] %}\n{% do include_list.append('facebook_ads') if var('facebook_ads__using_demographics_region', false) %}\n{% do include_list.append('linkedin_ads') if var('linkedin_ads__using_geo', true) and var('linkedin_ads__using_monthly_ad_analytics_by_member_region', true) %}\n{% do include_list.append('microsoft_ads') if var('microsoft_ads__using_geographic_daily_report', false) %}\n{% do include_list.append('pinterest_ads') if var('pinterest__using_pin_promotion_targeting_report', true) and var('pinterest__using_targeting_geo_region', true) %}\n{% do include_list.append('snapchat_ads') if var('snapchat_ads__using_campaign_region_report', false) %}\n{% do include_list.append('twitter_ads') if var('twitter_ads__using_campaign_regions_report', false) %}\n\n{% set enabled_packages = get_enabled_packages(include=include_list) %}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\nwith \n{% if 'facebook_ads' in enabled_packages %}\nfacebook_ads as (\n\n {{ get_query(\n platform='facebook_ads', \n report_type='region', \n field_mapping={\n 'campaign_id': 'null',\n 'campaign_name': \"'Account-level'\",\n 'conversions_value': 'null'\n },\n relation=ref('facebook_ads__region_report')\n ) }}\n),\n{% endif %}\n\n{% if 'linkedin_ads' in enabled_packages %}\nlinkedin_ads as (\n\n {{ get_query(\n platform='linkedin_ads', \n report_type='region', \n field_mapping={\n 'campaign_id': 'campaign_group_id',\n 'campaign_name': 'campaign_group_name',\n 'spend': 'cost',\n 'conversions': 'total_conversions',\n 'conversions_value': 'conversion_value_in_local_currency',\n 'region': 'region_name'\n },\n relation=ref('linkedin_ads__monthly_campaign_region_report')\n ) }}\n),\n{% endif %}\n\n{% if 'microsoft_ads' in enabled_packages %}\nmicrosoft_ads as (\n\n {{ get_query(\n platform='microsoft_ads', \n report_type='region',\n relation=ref('microsoft_ads__campaign_region_report')\n ) }}\n),\n{% endif %}\n\n{% if 'pinterest_ads' in enabled_packages %}\npinterest_ads as (\n\n {{ get_query(\n platform='pinterest_ads', \n report_type='region', \n field_mapping={\n 'account_id': 'advertiser_id',\n 'account_name': 'advertiser_name',\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_value',\n 'region': 'region_name'\n },\n relation=ref('pinterest_ads__campaign_region_report')\n ) }}\n),\n{% endif %}\n\n{% if 'snapchat_ads' in enabled_packages %}\nsnapchat_ads as (\n\n {{ get_query(\n platform='snapchat_ads', \n report_type='region', \n field_mapping={\n 'account_id': 'ad_account_id',\n 'account_name': 'ad_account_name',\n 'clicks':'swipes',\n 'conversions': 'total_conversions',\n 'conversions_value': 'conversion_purchases_value',\n 'region': \"replace(region, 'UNKNOWN', 'Unknown')\"\n },\n relation=ref('snapchat_ads__campaign_region_report')\n ) }}\n),\n{% endif %}\n\n{% if 'twitter_ads' in enabled_packages %}\ntwitter_ads as (\n\n {{ get_query(\n platform='twitter_ads', \n report_type='region', \n field_mapping={\n 'conversions': 'total_conversions',\n 'conversions_value': 'total_conversions_sale_amount'\n },\n relation=ref('twitter_ads__campaign_region_report')\n ) }}\n),\n{% endif %}\n\nunioned as (\n\n {{ union_ctes(ctes=enabled_packages) }}\n)\n\nselect *\nfrom unioned", "doc_blocks": [], "language": "sql", "refs": [{"name": "facebook_ads__region_report", "package": null, "version": null}, {"name": "linkedin_ads__monthly_campaign_region_report", "package": null, "version": null}, {"name": "microsoft_ads__campaign_region_report", "package": null, "version": null}, {"name": "pinterest_ads__campaign_region_report", "package": null, "version": null}, {"name": "snapchat_ads__campaign_region_report", "package": null, "version": null}, {"name": "twitter_ads__campaign_region_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled", "macro.ad_reporting.get_query", "macro.ad_reporting.union_ctes"], "nodes": ["model.facebook_ads.facebook_ads__region_report", "model.linkedin.linkedin_ads__monthly_campaign_region_report", "model.microsoft_ads.microsoft_ads__campaign_region_report", "model.pinterest.pinterest_ads__campaign_region_report", "model.snapchat_ads.snapchat_ads__campaign_region_report", "model.twitter_ads.twitter_ads__campaign_region_report"]}, "compiled_path": "target/compiled/ad_reporting/models/intermediate/int_ad_reporting__monthly_campaign_region_report.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n\n\n\n\nwith \n\nfacebook_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'facebook_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(null as TEXT) as campaign_id\n\n \n ,cast('Account-level' as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(null as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__region_report\"\n\n),\n\n\n\nlinkedin_ads as (\n\n select \n source_relation,\n \n date(date_month)\n as date_day,\n cast( 'linkedin_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_group_id as TEXT) as campaign_id\n\n \n ,cast(campaign_group_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_value_in_local_currency as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region_name as TEXT) as region\n\n \n ,cast(cost as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__monthly_campaign_region_report\"\n\n),\n\n\n\nmicrosoft_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'microsoft_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(conversions as float) as conversions\n\n ,cast(conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_region_report\"\n\n),\n\n\n\npinterest_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'pinterest_ads' as TEXT) as platform,\n\n cast(advertiser_id as TEXT) as account_id\n\n \n ,cast(advertiser_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region_name as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_region_report\"\n\n),\n\n\n\nsnapchat_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'snapchat_ads' as TEXT) as platform,\n\n cast(ad_account_id as TEXT) as account_id\n\n \n ,cast(ad_account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(swipes as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(conversion_purchases_value as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(replace(region, 'UNKNOWN', 'Unknown') as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_region_report\"\n\n),\n\n\n\ntwitter_ads as (\n\n select \n source_relation,\n \n date(date_day)\n as date_day,\n cast( 'twitter_ads' as TEXT) as platform,\n\n cast(account_id as TEXT) as account_id\n\n \n ,cast(account_name as TEXT) as account_name\n\n \n ,cast(campaign_id as TEXT) as campaign_id\n\n \n ,cast(campaign_name as TEXT) as campaign_name\n\n \n ,cast(clicks as integer) as clicks\n\n ,cast(total_conversions as float) as conversions\n\n ,cast(total_conversions_sale_amount as float) as conversions_value\n\n ,cast(impressions as integer) as impressions\n\n ,cast(region as TEXT) as region\n\n \n ,cast(spend as float) as spend\n\n \nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_region_report\"\n\n),\n\n\nunioned as (\n\n \n\n\nselect * from facebook_ads\n\nunion all\n\nselect * from linkedin_ads\n\nunion all\n\nselect * from microsoft_ads\n\nunion all\n\nselect * from pinterest_ads\n\nunion all\n\nselect * from snapchat_ads\n\nunion all\n\nselect * from twitter_ads\n\n\n\n\n)\n\nselect *\nfrom unioned", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.int_ad_reporting__country_mapping": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "int_ad_reporting__country_mapping", "resource_type": "model", "package_name": "ad_reporting", "path": "intermediate/utils/int_ad_reporting__country_mapping.sql", "original_file_path": "models/intermediate/utils/int_ad_reporting__country_mapping.sql", "unique_id": "model.ad_reporting.int_ad_reporting__country_mapping", "fqn": ["ad_reporting", "intermediate", "utils", "int_ad_reporting__country_mapping"], "alias": "int_ad_reporting__country_mapping", "checksum": {"name": "sha256", "checksum": "79c0fa52a1c1be3d360f10450fd5c55be983a737907b610a84c71bcae2b7cf9d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "ephemeral", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"materialized": "ephemeral", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708219.6797287, "relation_name": null, "raw_code": "{% set include_list = [] %}\n{% do include_list.append('facebook_ads') if var('facebook_ads__using_demographics_country', false) %}\n{% do include_list.append('linkedin_ads') if var('linkedin_ads__using_geo', true) and var('linkedin_ads__using_monthly_ad_analytics_by_member_country', true) %}\n{% do include_list.append('microsoft_ads') if var('microsoft_ads__using_geographic_daily_report', false) %}\n{% do include_list.append('pinterest_ads') if var('pinterest__using_pin_promotion_targeting_report', true) and var('pinterest__using_targeting_geo', true) %}\n{% do include_list.append('reddit_ads') if var('reddit_ads__using_campaign_country_report', true) %}\n{% do include_list.append('snapchat_ads') if var('snapchat_ads__using_campaign_country_report', false) %}\n{% do include_list.append('tiktok_ads') if var('tiktok_ads__using_campaign_country_report', true) %}\n{% do include_list.append('twitter_ads') if var('twitter_ads__using_campaign_locations_report', false) %}\n\n{% set enabled_packages = get_enabled_packages(include=include_list)%}\n{{ config(enabled=is_enabled(enabled_packages)) }}\n\n{% set country_mapping = [\n {'country_name': 'Afghanistan', 'alternative_country_name': '', 'country_code': 'AF', 'global_region': 'Southern Asia'},\n {'country_name': '\u00c5land Islands', 'alternative_country_name': '', 'country_code': 'AX', 'global_region': 'Northern Europe'},\n {'country_name': 'Albania', 'alternative_country_name': '', 'country_code': 'AL', 'global_region': 'Southern Europe'},\n {'country_name': 'Algeria', 'alternative_country_name': '', 'country_code': 'DZ', 'global_region': 'Northern Africa'},\n {'country_name': 'American Samoa', 'alternative_country_name': '', 'country_code': 'AS', 'global_region': 'Polynesia'},\n {'country_name': 'Andorra', 'alternative_country_name': '', 'country_code': 'AD', 'global_region': 'Southern Europe'},\n {'country_name': 'Angola', 'alternative_country_name': '', 'country_code': 'AO', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Anguilla', 'alternative_country_name': '', 'country_code': 'AI', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Antarctica', 'alternative_country_name': '', 'country_code': 'AQ', 'global_region': ''},\n {'country_name': 'Antigua and Barbuda', 'alternative_country_name': '', 'country_code': 'AG', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Argentina', 'alternative_country_name': '', 'country_code': 'AR', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Armenia', 'alternative_country_name': '', 'country_code': 'AM', 'global_region': 'Western Asia'},\n {'country_name': 'Aruba', 'alternative_country_name': '', 'country_code': 'AW', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Australia', 'alternative_country_name': '', 'country_code': 'AU', 'global_region': 'Australia and New Zealand'},\n {'country_name': 'Austria', 'alternative_country_name': '', 'country_code': 'AT', 'global_region': 'Western Europe'},\n {'country_name': 'Azerbaijan', 'alternative_country_name': '', 'country_code': 'AZ', 'global_region': 'Western Asia'},\n {'country_name': 'Bahamas', 'alternative_country_name': '', 'country_code': 'BS', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Bahrain', 'alternative_country_name': '', 'country_code': 'BH', 'global_region': 'Western Asia'},\n {'country_name': 'Bangladesh', 'alternative_country_name': '', 'country_code': 'BD', 'global_region': 'Southern Asia'},\n {'country_name': 'Barbados', 'alternative_country_name': '', 'country_code': 'BB', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Belarus', 'alternative_country_name': '', 'country_code': 'BY', 'global_region': 'Eastern Europe'},\n {'country_name': 'Belgium', 'alternative_country_name': '', 'country_code': 'BE', 'global_region': 'Western Europe'},\n {'country_name': 'Belize', 'alternative_country_name': '', 'country_code': 'BZ', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Benin', 'alternative_country_name': '', 'country_code': 'BJ', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Bermuda', 'alternative_country_name': '', 'country_code': 'BM', 'global_region': 'Northern America'},\n {'country_name': 'Bhutan', 'alternative_country_name': '', 'country_code': 'BT', 'global_region': 'Southern Asia'},\n {'country_name': 'Bolivia (Plurinational State of)', 'alternative_country_name': 'Bolivia', 'country_code': 'BO', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Bonaire, Sint Eustatius and Saba', 'alternative_country_name': '', 'country_code': 'BQ', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Bosnia and Herzegovina', 'alternative_country_name': '', 'country_code': 'BA', 'global_region': 'Southern Europe'},\n {'country_name': 'Botswana', 'alternative_country_name': '', 'country_code': 'BW', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Bouvet Island', 'alternative_country_name': '', 'country_code': 'BV', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Brazil', 'alternative_country_name': '', 'country_code': 'BR', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'British Indian Ocean Territory', 'alternative_country_name': '', 'country_code': 'IO', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Brunei Darussalam', 'alternative_country_name': 'Brunei', 'country_code': 'BN', 'global_region': 'South-eastern Asia'},\n {'country_name': 'Bulgaria', 'alternative_country_name': '', 'country_code': 'BG', 'global_region': 'Eastern Europe'},\n {'country_name': 'Burkina Faso', 'alternative_country_name': '', 'country_code': 'BF', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Burundi', 'alternative_country_name': '', 'country_code': 'BI', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Cabo Verde', 'alternative_country_name': 'Cape Verde', 'country_code': 'CV', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Cambodia', 'alternative_country_name': '', 'country_code': 'KH', 'global_region': 'South-eastern Asia'},\n {'country_name': 'Cameroon', 'alternative_country_name': '', 'country_code': 'CM', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Canada', 'alternative_country_name': '', 'country_code': 'CA', 'global_region': 'Northern America'},\n {'country_name': 'Cayman Islands', 'alternative_country_name': '', 'country_code': 'KY', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Central African Republic', 'alternative_country_name': '', 'country_code': 'CF', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Chad', 'alternative_country_name': '', 'country_code': 'TD', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Chile', 'alternative_country_name': '', 'country_code': 'CL', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'China', 'alternative_country_name': '', 'country_code': 'CN', 'global_region': 'Eastern Asia'},\n {'country_name': 'Christmas Island', 'alternative_country_name': '', 'country_code': 'CX', 'global_region': 'Australia and New Zealand'},\n {'country_name': 'Cocos (Keeling) Islands', 'alternative_country_name': '', 'country_code': 'CC', 'global_region': 'Australia and New Zealand'},\n {'country_name': 'Colombia', 'alternative_country_name': '', 'country_code': 'CO', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Comoros', 'alternative_country_name': '', 'country_code': 'KM', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Congo', 'alternative_country_name': 'Republic of the Congo', 'country_code': 'CG', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Congo, Democratic Republic of the', 'alternative_country_name': 'Democratic Republic of the Congo', 'country_code': 'CD', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Cook Islands', 'alternative_country_name': '', 'country_code': 'CK', 'global_region': 'Polynesia'},\n {'country_name': 'Costa Rica', 'alternative_country_name': '', 'country_code': 'CR', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': \"C\u00f4te d'Ivoire\", 'alternative_country_name': \"Cote d'Ivoire\", 'country_code': 'CI', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Croatia', 'alternative_country_name': '', 'country_code': 'HR', 'global_region': 'Southern Europe'},\n {'country_name': 'Cuba', 'alternative_country_name': '', 'country_code': 'CU', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Cura\u00e7ao', 'alternative_country_name': '', 'country_code': 'CW', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Cyprus', 'alternative_country_name': '', 'country_code': 'CY', 'global_region': 'Western Asia'},\n {'country_name': 'Czechia', 'alternative_country_name': 'Czech Republic', 'country_code': 'CZ', 'global_region': 'Eastern Europe'},\n {'country_name': 'Denmark', 'alternative_country_name': '', 'country_code': 'DK', 'global_region': 'Northern Europe'},\n {'country_name': 'Djibouti', 'alternative_country_name': '', 'country_code': 'DJ', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Dominica', 'alternative_country_name': '', 'country_code': 'DM', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Dominican Republic', 'alternative_country_name': '', 'country_code': 'DO', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Ecuador', 'alternative_country_name': '', 'country_code': 'EC', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Egypt', 'alternative_country_name': '', 'country_code': 'EG', 'global_region': 'Northern Africa'},\n {'country_name': 'El Salvador', 'alternative_country_name': '', 'country_code': 'SV', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Equatorial Guinea', 'alternative_country_name': '', 'country_code': 'GQ', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Eritrea', 'alternative_country_name': '', 'country_code': 'ER', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Estonia', 'alternative_country_name': '', 'country_code': 'EE', 'global_region': 'Northern Europe'},\n {'country_name': 'Eswatini', 'alternative_country_name': '', 'country_code': 'SZ', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Ethiopia', 'alternative_country_name': '', 'country_code': 'ET', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Falkland Islands (Malvinas)', 'alternative_country_name': '', 'country_code': 'FK', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Faroe Islands', 'alternative_country_name': '', 'country_code': 'FO', 'global_region': 'Northern Europe'},\n {'country_name': 'Fiji', 'alternative_country_name': '', 'country_code': 'FJ', 'global_region': 'Melanesia'},\n {'country_name': 'Finland', 'alternative_country_name': '', 'country_code': 'FI', 'global_region': 'Northern Europe'},\n {'country_name': 'France', 'alternative_country_name': '', 'country_code': 'FR', 'global_region': 'Western Europe'},\n {'country_name': 'French Guiana', 'alternative_country_name': '', 'country_code': 'GF', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'French Polynesia', 'alternative_country_name': '', 'country_code': 'PF', 'global_region': 'Polynesia'},\n {'country_name': 'French Southern Territories', 'alternative_country_name': '', 'country_code': 'TF', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Gabon', 'alternative_country_name': '', 'country_code': 'GA', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Gambia', 'alternative_country_name': '', 'country_code': 'GM', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Georgia', 'alternative_country_name': '', 'country_code': 'GE', 'global_region': 'Western Asia'},\n {'country_name': 'Germany', 'alternative_country_name': '', 'country_code': 'DE', 'global_region': 'Western Europe'},\n {'country_name': 'Ghana', 'alternative_country_name': '', 'country_code': 'GH', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Gibraltar', 'alternative_country_name': '', 'country_code': 'GI', 'global_region': 'Southern Europe'},\n {'country_name': 'Greece', 'alternative_country_name': '', 'country_code': 'GR', 'global_region': 'Southern Europe'},\n {'country_name': 'Greenland', 'alternative_country_name': '', 'country_code': 'GL', 'global_region': 'Northern America'},\n {'country_name': 'Grenada', 'alternative_country_name': '', 'country_code': 'GD', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Guadeloupe', 'alternative_country_name': '', 'country_code': 'GP', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Guam', 'alternative_country_name': '', 'country_code': 'GU', 'global_region': 'Micronesia'},\n {'country_name': 'Guatemala', 'alternative_country_name': '', 'country_code': 'GT', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Guernsey', 'alternative_country_name': '', 'country_code': 'GG', 'global_region': 'Northern Europe'},\n {'country_name': 'Guinea', 'alternative_country_name': '', 'country_code': 'GN', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Guinea-Bissau', 'alternative_country_name': '', 'country_code': 'GW', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Guyana', 'alternative_country_name': '', 'country_code': 'GY', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Haiti', 'alternative_country_name': '', 'country_code': 'HT', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Heard Island and McDonald Islands', 'alternative_country_name': '', 'country_code': 'HM', 'global_region': 'Australia and New Zealand'},\n {'country_name': 'Holy See', 'alternative_country_name': '', 'country_code': 'VA', 'global_region': 'Southern Europe'},\n {'country_name': 'Honduras', 'alternative_country_name': '', 'country_code': 'HN', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Hong Kong', 'alternative_country_name': 'Hong Kong SAR China', 'country_code': 'HK', 'global_region': 'Eastern Asia'},\n {'country_name': 'Hungary', 'alternative_country_name': '', 'country_code': 'HU', 'global_region': 'Eastern Europe'},\n {'country_name': 'Iceland', 'alternative_country_name': '', 'country_code': 'IS', 'global_region': 'Northern Europe'},\n {'country_name': 'India', 'alternative_country_name': '', 'country_code': 'IN', 'global_region': 'Southern Asia'},\n {'country_name': 'Indonesia', 'alternative_country_name': '', 'country_code': 'ID', 'global_region': 'South-eastern Asia'},\n {'country_name': 'Iran (Islamic Republic of)', 'alternative_country_name': 'Iran', 'country_code': 'IR', 'global_region': 'Southern Asia'},\n {'country_name': 'Iraq', 'alternative_country_name': '', 'country_code': 'IQ', 'global_region': 'Western Asia'},\n {'country_name': 'Ireland', 'alternative_country_name': '', 'country_code': 'IE', 'global_region': 'Northern Europe'},\n {'country_name': 'Isle of Man', 'alternative_country_name': '', 'country_code': 'IM', 'global_region': 'Northern Europe'},\n {'country_name': 'Israel', 'alternative_country_name': '', 'country_code': 'IL', 'global_region': 'Western Asia'},\n {'country_name': 'Italy', 'alternative_country_name': '', 'country_code': 'IT', 'global_region': 'Southern Europe'},\n {'country_name': 'Jamaica', 'alternative_country_name': '', 'country_code': 'JM', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Japan', 'alternative_country_name': '', 'country_code': 'JP', 'global_region': 'Eastern Asia'},\n {'country_name': 'Jersey', 'alternative_country_name': '', 'country_code': 'JE', 'global_region': 'Northern Europe'},\n {'country_name': 'Jordan', 'alternative_country_name': '', 'country_code': 'JO', 'global_region': 'Western Asia'},\n {'country_name': 'Kazakhstan', 'alternative_country_name': '', 'country_code': 'KZ', 'global_region': 'Central Asia'},\n {'country_name': 'Kenya', 'alternative_country_name': '', 'country_code': 'KE', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Kiribati', 'alternative_country_name': '', 'country_code': 'KI', 'global_region': 'Micronesia'},\n {'country_name': \"Korea (Democratic People's Republic of)\", 'alternative_country_name': '', 'country_code': 'KP', 'global_region': 'Eastern Asia'},\n {'country_name': 'Korea, Republic of', 'alternative_country_name': 'South Korea', 'country_code': 'KR', 'global_region': 'Eastern Asia'},\n {'country_name': 'Kuwait', 'alternative_country_name': '', 'country_code': 'KW', 'global_region': 'Western Asia'},\n {'country_name': 'Kyrgyzstan', 'alternative_country_name': '', 'country_code': 'KG', 'global_region': 'Central Asia'},\n {'country_name': \"Lao People's Democratic Republic\", 'alternative_country_name': 'Laos', 'country_code': 'LA', 'global_region': 'South-eastern Asia'},\n {'country_name': 'Latvia', 'alternative_country_name': '', 'country_code': 'LV', 'global_region': 'Northern Europe'},\n {'country_name': 'Lebanon', 'alternative_country_name': '', 'country_code': 'LB', 'global_region': 'Western Asia'},\n {'country_name': 'Lesotho', 'alternative_country_name': '', 'country_code': 'LS', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Liberia', 'alternative_country_name': '', 'country_code': 'LR', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Libya', 'alternative_country_name': '', 'country_code': 'LY', 'global_region': 'Northern Africa'},\n {'country_name': 'Liechtenstein', 'alternative_country_name': '', 'country_code': 'LI', 'global_region': 'Western Europe'},\n {'country_name': 'Lithuania', 'alternative_country_name': '', 'country_code': 'LT', 'global_region': 'Northern Europe'},\n {'country_name': 'Luxembourg', 'alternative_country_name': '', 'country_code': 'LU', 'global_region': 'Western Europe'},\n {'country_name': 'Macao', 'alternative_country_name': 'Macau', 'country_code': 'MO', 'global_region': 'Eastern Asia'},\n {'country_name': 'Madagascar', 'alternative_country_name': '', 'country_code': 'MG', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Malawi', 'alternative_country_name': '', 'country_code': 'MW', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Malaysia', 'alternative_country_name': '', 'country_code': 'MY', 'global_region': 'South-eastern Asia'},\n {'country_name': 'Maldives', 'alternative_country_name': '', 'country_code': 'MV', 'global_region': 'Southern Asia'},\n {'country_name': 'Mali', 'alternative_country_name': '', 'country_code': 'ML', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Malta', 'alternative_country_name': '', 'country_code': 'MT', 'global_region': 'Southern Europe'},\n {'country_name': 'Marshall Islands', 'alternative_country_name': '', 'country_code': 'MH', 'global_region': 'Micronesia'},\n {'country_name': 'Martinique', 'alternative_country_name': '', 'country_code': 'MQ', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Mauritania', 'alternative_country_name': '', 'country_code': 'MR', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Mauritius', 'alternative_country_name': '', 'country_code': 'MU', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Mayotte', 'alternative_country_name': '', 'country_code': 'YT', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Mexico', 'alternative_country_name': '', 'country_code': 'MX', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Micronesia (Federated States of)', 'alternative_country_name': 'Micronesia', 'country_code': 'FM', 'global_region': 'Micronesia'},\n {'country_name': 'Moldova, Republic of', 'alternative_country_name': 'Moldova', 'country_code': 'MD', 'global_region': 'Eastern Europe'},\n {'country_name': 'Monaco', 'alternative_country_name': '', 'country_code': 'MC', 'global_region': 'Western Europe'},\n {'country_name': 'Mongolia', 'alternative_country_name': '', 'country_code': 'MN', 'global_region': 'Eastern Asia'},\n {'country_name': 'Montenegro', 'alternative_country_name': '', 'country_code': 'ME', 'global_region': 'Southern Europe'},\n {'country_name': 'Montserrat', 'alternative_country_name': '', 'country_code': 'MS', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Morocco', 'alternative_country_name': '', 'country_code': 'MA', 'global_region': 'Northern Africa'},\n {'country_name': 'Mozambique', 'alternative_country_name': '', 'country_code': 'MZ', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Myanmar', 'alternative_country_name': '', 'country_code': 'MM', 'global_region': 'South-eastern Asia'},\n {'country_name': 'Namibia', 'alternative_country_name': '', 'country_code': '', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Nauru', 'alternative_country_name': '', 'country_code': 'NR', 'global_region': 'Micronesia'},\n {'country_name': 'Nepal', 'alternative_country_name': '', 'country_code': 'NP', 'global_region': 'Southern Asia'},\n {'country_name': 'Netherlands (Kingdom of the)', 'alternative_country_name': 'Netherlands', 'country_code': 'NL', 'global_region': 'Western Europe'},\n {'country_name': 'New Caledonia', 'alternative_country_name': '', 'country_code': 'NC', 'global_region': 'Melanesia'},\n {'country_name': 'New Zealand', 'alternative_country_name': '', 'country_code': 'NZ', 'global_region': 'Australia and New Zealand'},\n {'country_name': 'Nicaragua', 'alternative_country_name': '', 'country_code': 'NI', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Niger', 'alternative_country_name': '', 'country_code': 'NE', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Nigeria', 'alternative_country_name': '', 'country_code': 'NG', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Niue', 'alternative_country_name': '', 'country_code': 'NU', 'global_region': 'Polynesia'},\n {'country_name': 'Norfolk Island', 'alternative_country_name': '', 'country_code': 'NF', 'global_region': 'Australia and New Zealand'},\n {'country_name': 'North Macedonia', 'alternative_country_name': '', 'country_code': 'MK', 'global_region': 'Southern Europe'},\n {'country_name': 'Northern Mariana Islands', 'alternative_country_name': '', 'country_code': 'MP', 'global_region': 'Micronesia'},\n {'country_name': 'Norway', 'alternative_country_name': '', 'country_code': 'NO', 'global_region': 'Northern Europe'},\n {'country_name': 'Oman', 'alternative_country_name': '', 'country_code': 'OM', 'global_region': 'Western Asia'},\n {'country_name': 'Pakistan', 'alternative_country_name': '', 'country_code': 'PK', 'global_region': 'Southern Asia'},\n {'country_name': 'Palau', 'alternative_country_name': '', 'country_code': 'PW', 'global_region': 'Micronesia'},\n {'country_name': 'Palestine, State of', 'alternative_country_name': '', 'country_code': 'PS', 'global_region': 'Western Asia'},\n {'country_name': 'Panama', 'alternative_country_name': '', 'country_code': 'PA', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Papua New Guinea', 'alternative_country_name': '', 'country_code': 'PG', 'global_region': 'Melanesia'},\n {'country_name': 'Paraguay', 'alternative_country_name': '', 'country_code': 'PY', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Peru', 'alternative_country_name': '', 'country_code': 'PE', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Philippines', 'alternative_country_name': '', 'country_code': 'PH', 'global_region': 'South-eastern Asia'},\n {'country_name': 'Pitcairn', 'alternative_country_name': '', 'country_code': 'PN', 'global_region': 'Polynesia'},\n {'country_name': 'Poland', 'alternative_country_name': '', 'country_code': 'PL', 'global_region': 'Eastern Europe'},\n {'country_name': 'Portugal', 'alternative_country_name': '', 'country_code': 'PT', 'global_region': 'Southern Europe'},\n {'country_name': 'Puerto Rico', 'alternative_country_name': '', 'country_code': 'PR', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Qatar', 'alternative_country_name': '', 'country_code': 'QA', 'global_region': 'Western Asia'},\n {'country_name': 'R\u00e9union', 'alternative_country_name': 'Reunion', 'country_code': 'RE', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Romania', 'alternative_country_name': '', 'country_code': 'RO', 'global_region': 'Eastern Europe'},\n {'country_name': 'Russian Federation', 'alternative_country_name': 'Russia', 'country_code': 'RU', 'global_region': 'Eastern Europe'},\n {'country_name': 'Rwanda', 'alternative_country_name': '', 'country_code': 'RW', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Saint Barth\u00e9lemy', 'alternative_country_name': 'St. Barth\u00e9lemy', 'country_code': 'BL', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Saint Helena, Ascension and Tristan da Cunha', 'alternative_country_name': 'St. Helena, Ascension and Tristan da Cunha', 'country_code': 'SH', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Saint Kitts and Nevis', 'alternative_country_name': 'St. Kitts and Nevis', 'country_code': 'KN', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Saint Lucia', 'alternative_country_name': 'St. Lucia', 'country_code': 'LC', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Saint Martin (French part)', 'alternative_country_name': 'St. Martin (French part)', 'country_code': 'MF', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Saint Pierre and Miquelon', 'alternative_country_name': 'St. Pierre and Miquelon', 'country_code': 'PM', 'global_region': 'Northern America'},\n {'country_name': 'Saint Vincent and the Grenadines', 'alternative_country_name': 'St. Vincent and the Grenadines', 'country_code': 'VC', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Samoa', 'alternative_country_name': '', 'country_code': 'WS', 'global_region': 'Polynesia'},\n {'country_name': 'San Marino', 'alternative_country_name': '', 'country_code': 'SM', 'global_region': 'Southern Europe'},\n {'country_name': 'Sao Tome and Principe', 'alternative_country_name': 'S\u00e3o Tom\u00e9 and Principe', 'country_code': 'ST', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Saudi Arabia', 'alternative_country_name': '', 'country_code': 'SA', 'global_region': 'Western Asia'},\n {'country_name': 'Senegal', 'alternative_country_name': '', 'country_code': 'SN', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Serbia', 'alternative_country_name': '', 'country_code': 'RS', 'global_region': 'Southern Europe'},\n {'country_name': 'Seychelles', 'alternative_country_name': '', 'country_code': 'SC', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Sierra Leone', 'alternative_country_name': '', 'country_code': 'SL', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Singapore', 'alternative_country_name': '', 'country_code': 'SG', 'global_region': 'South-eastern Asia'},\n {'country_name': 'Sint Maarten (Dutch part)', 'alternative_country_name': '', 'country_code': 'SX', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Slovakia', 'alternative_country_name': '', 'country_code': 'SK', 'global_region': 'Eastern Europe'},\n {'country_name': 'Slovenia', 'alternative_country_name': '', 'country_code': 'SI', 'global_region': 'Southern Europe'},\n {'country_name': 'Solomon Islands', 'alternative_country_name': '', 'country_code': 'SB', 'global_region': 'Melanesia'},\n {'country_name': 'Somalia', 'alternative_country_name': '', 'country_code': 'SO', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'South Africa', 'alternative_country_name': '', 'country_code': 'ZA', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'South Georgia and the South Sandwich Islands', 'alternative_country_name': '', 'country_code': 'GS', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'South Sudan', 'alternative_country_name': '', 'country_code': 'SS', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Spain', 'alternative_country_name': '', 'country_code': 'ES', 'global_region': 'Southern Europe'},\n {'country_name': 'Sri Lanka', 'alternative_country_name': '', 'country_code': 'LK', 'global_region': 'Southern Asia'},\n {'country_name': 'Sudan', 'alternative_country_name': '', 'country_code': 'SD', 'global_region': 'Northern Africa'},\n {'country_name': 'Suriname', 'alternative_country_name': '', 'country_code': 'SR', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Svalbard and Jan Mayen', 'alternative_country_name': '', 'country_code': 'SJ', 'global_region': 'Northern Europe'},\n {'country_name': 'Sweden', 'alternative_country_name': '', 'country_code': 'SE', 'global_region': 'Northern Europe'},\n {'country_name': 'Switzerland', 'alternative_country_name': '', 'country_code': 'CH', 'global_region': 'Western Europe'},\n {'country_name': 'Syrian Arab Republic', 'alternative_country_name': '', 'country_code': 'SY', 'global_region': 'Western Asia'},\n {'country_name': 'Taiwan, Province of China', 'alternative_country_name': 'Taiwan', 'country_code': 'TW', 'global_region': 'Eastern Asia'},\n {'country_name': 'Tajikistan', 'alternative_country_name': '', 'country_code': 'TJ', 'global_region': 'Central Asia'},\n {'country_name': 'Tanzania, United Republic of', 'alternative_country_name': 'Tanzania', 'country_code': 'TZ', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Thailand', 'alternative_country_name': '', 'country_code': 'TH', 'global_region': 'South-eastern Asia'},\n {'country_name': 'Timor-Leste', 'alternative_country_name': '', 'country_code': 'TL', 'global_region': 'South-eastern Asia'},\n {'country_name': 'Togo', 'alternative_country_name': '', 'country_code': 'TG', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Tokelau', 'alternative_country_name': '', 'country_code': 'TK', 'global_region': 'Polynesia'},\n {'country_name': 'Tonga', 'alternative_country_name': '', 'country_code': 'TO', 'global_region': 'Polynesia'},\n {'country_name': 'Trinidad and Tobago', 'alternative_country_name': '', 'country_code': 'TT', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Tunisia', 'alternative_country_name': '', 'country_code': 'TN', 'global_region': 'Northern Africa'},\n {'country_name': 'T\u00fcrkiye', 'alternative_country_name': 'Turkey', 'country_code': 'TR', 'global_region': 'Western Asia'},\n {'country_name': 'Turkmenistan', 'alternative_country_name': '', 'country_code': 'TM', 'global_region': 'Central Asia'},\n {'country_name': 'Turks and Caicos Islands', 'alternative_country_name': '', 'country_code': 'TC', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Tuvalu', 'alternative_country_name': '', 'country_code': 'TV', 'global_region': 'Polynesia'},\n {'country_name': 'Uganda', 'alternative_country_name': '', 'country_code': 'UG', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Ukraine', 'alternative_country_name': '', 'country_code': 'UA', 'global_region': 'Eastern Europe'},\n {'country_name': 'United Arab Emirates', 'alternative_country_name': '', 'country_code': 'AE', 'global_region': 'Western Asia'},\n {'country_name': 'United Kingdom of Great Britain and Northern Ireland', 'alternative_country_name': 'United Kingdom', 'country_code': 'GB', 'global_region': 'Northern Europe'},\n {'country_name': 'United States of America', 'alternative_country_name': 'United States', 'country_code': 'US', 'global_region': 'Northern America'},\n {'country_name': 'United States Minor Outlying Islands', 'alternative_country_name': '', 'country_code': 'UM', 'global_region': 'Micronesia'},\n {'country_name': 'Uruguay', 'alternative_country_name': '', 'country_code': 'UY', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Uzbekistan', 'alternative_country_name': '', 'country_code': 'UZ', 'global_region': 'Central Asia'},\n {'country_name': 'Vanuatu', 'alternative_country_name': '', 'country_code': 'VU', 'global_region': 'Melanesia'},\n {'country_name': 'Venezuela (Bolivarian Republic of)', 'alternative_country_name': 'Venezuela', 'country_code': 'VE', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Viet Nam', 'alternative_country_name': 'Vietnam', 'country_code': 'VN', 'global_region': 'South-eastern Asia'},\n {'country_name': 'Virgin Islands (British)', 'alternative_country_name': 'British Virgin Islands', 'country_code': 'VG', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Virgin Islands (U.S.)', 'alternative_country_name': '', 'country_code': 'VI', 'global_region': 'Latin America and the Caribbean'},\n {'country_name': 'Wallis and Futuna', 'alternative_country_name': '', 'country_code': 'WF', 'global_region': 'Polynesia'},\n {'country_name': 'Western Sahara', 'alternative_country_name': '', 'country_code': 'EH', 'global_region': 'Northern Africa'},\n {'country_name': 'Yemen', 'alternative_country_name': '', 'country_code': 'YE', 'global_region': 'Western Asia'},\n {'country_name': 'Zambia', 'alternative_country_name': '', 'country_code': 'ZM', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Zimbabwe', 'alternative_country_name': '', 'country_code': 'ZW', 'global_region': 'Sub-Saharan Africa'},\n {'country_name': 'Kosovo', 'alternative_country_name': '', 'country_code': 'XK', 'global_region': 'Southern Europe'},\n {'country_name': 'Unknown', 'alternative_country_name': '', 'country_code': 'Unknown', 'global_region': 'Unknown'}\n] %}\n\n{# \nPostgres requires double single quotes '' to escape a single quote in a string\nThe other warehouses use a backslash \\ to escape a single quote in a string\n#}\n\nwith create_country_mapping as (\n {%- for country in country_mapping %}\n select\n '{{ country.country_name | replace(\"'\", \"\\\\'\") if target.type != \"postgres\" else country.country_name | replace(\"'\", \"''\") }}' as country_name,\n '{{ country.alternative_country_name | replace(\"'\", \"\\\\'\") if target.type != \"postgres\" else country.alternative_country_name | replace(\"'\", \"''\") }}' as alternative_country_name,\n '{{ country.country_code }}' as country_code,\n '{{ country.global_region }}' as global_region\n\n {% if not loop.last %} union all {% endif %}\n {% endfor %}\n), \n\nfinal as (\n\n select \n country_name,\n case when alternative_country_name = '' then null else alternative_country_name end as alternative_country_name,\n country_code,\n global_region\n from create_country_mapping\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages", "macro.ad_reporting.is_enabled"], "nodes": []}, "compiled_path": "target/compiled/ad_reporting/models/intermediate/utils/int_ad_reporting__country_mapping.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nwith create_country_mapping as (\n select\n 'Afghanistan' as country_name,\n '' as alternative_country_name,\n 'AF' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n '\u00c5land Islands' as country_name,\n '' as alternative_country_name,\n 'AX' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Albania' as country_name,\n '' as alternative_country_name,\n 'AL' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Algeria' as country_name,\n '' as alternative_country_name,\n 'DZ' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'American Samoa' as country_name,\n '' as alternative_country_name,\n 'AS' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Andorra' as country_name,\n '' as alternative_country_name,\n 'AD' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Angola' as country_name,\n '' as alternative_country_name,\n 'AO' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Anguilla' as country_name,\n '' as alternative_country_name,\n 'AI' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Antarctica' as country_name,\n '' as alternative_country_name,\n 'AQ' as country_code,\n '' as global_region\n\n union all \n \n select\n 'Antigua and Barbuda' as country_name,\n '' as alternative_country_name,\n 'AG' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Argentina' as country_name,\n '' as alternative_country_name,\n 'AR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Armenia' as country_name,\n '' as alternative_country_name,\n 'AM' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Aruba' as country_name,\n '' as alternative_country_name,\n 'AW' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Australia' as country_name,\n '' as alternative_country_name,\n 'AU' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Austria' as country_name,\n '' as alternative_country_name,\n 'AT' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Azerbaijan' as country_name,\n '' as alternative_country_name,\n 'AZ' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Bahamas' as country_name,\n '' as alternative_country_name,\n 'BS' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Bahrain' as country_name,\n '' as alternative_country_name,\n 'BH' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Bangladesh' as country_name,\n '' as alternative_country_name,\n 'BD' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Barbados' as country_name,\n '' as alternative_country_name,\n 'BB' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Belarus' as country_name,\n '' as alternative_country_name,\n 'BY' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Belgium' as country_name,\n '' as alternative_country_name,\n 'BE' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Belize' as country_name,\n '' as alternative_country_name,\n 'BZ' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Benin' as country_name,\n '' as alternative_country_name,\n 'BJ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Bermuda' as country_name,\n '' as alternative_country_name,\n 'BM' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'Bhutan' as country_name,\n '' as alternative_country_name,\n 'BT' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Bolivia (Plurinational State of)' as country_name,\n 'Bolivia' as alternative_country_name,\n 'BO' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Bonaire, Sint Eustatius and Saba' as country_name,\n '' as alternative_country_name,\n 'BQ' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Bosnia and Herzegovina' as country_name,\n '' as alternative_country_name,\n 'BA' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Botswana' as country_name,\n '' as alternative_country_name,\n 'BW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Bouvet Island' as country_name,\n '' as alternative_country_name,\n 'BV' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Brazil' as country_name,\n '' as alternative_country_name,\n 'BR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'British Indian Ocean Territory' as country_name,\n '' as alternative_country_name,\n 'IO' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Brunei Darussalam' as country_name,\n 'Brunei' as alternative_country_name,\n 'BN' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Bulgaria' as country_name,\n '' as alternative_country_name,\n 'BG' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Burkina Faso' as country_name,\n '' as alternative_country_name,\n 'BF' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Burundi' as country_name,\n '' as alternative_country_name,\n 'BI' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Cabo Verde' as country_name,\n 'Cape Verde' as alternative_country_name,\n 'CV' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Cambodia' as country_name,\n '' as alternative_country_name,\n 'KH' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Cameroon' as country_name,\n '' as alternative_country_name,\n 'CM' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Canada' as country_name,\n '' as alternative_country_name,\n 'CA' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'Cayman Islands' as country_name,\n '' as alternative_country_name,\n 'KY' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Central African Republic' as country_name,\n '' as alternative_country_name,\n 'CF' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Chad' as country_name,\n '' as alternative_country_name,\n 'TD' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Chile' as country_name,\n '' as alternative_country_name,\n 'CL' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'China' as country_name,\n '' as alternative_country_name,\n 'CN' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Christmas Island' as country_name,\n '' as alternative_country_name,\n 'CX' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Cocos (Keeling) Islands' as country_name,\n '' as alternative_country_name,\n 'CC' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Colombia' as country_name,\n '' as alternative_country_name,\n 'CO' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Comoros' as country_name,\n '' as alternative_country_name,\n 'KM' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Congo' as country_name,\n 'Republic of the Congo' as alternative_country_name,\n 'CG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Congo, Democratic Republic of the' as country_name,\n 'Democratic Republic of the Congo' as alternative_country_name,\n 'CD' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Cook Islands' as country_name,\n '' as alternative_country_name,\n 'CK' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Costa Rica' as country_name,\n '' as alternative_country_name,\n 'CR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'C\u00f4te d''Ivoire' as country_name,\n 'Cote d''Ivoire' as alternative_country_name,\n 'CI' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Croatia' as country_name,\n '' as alternative_country_name,\n 'HR' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Cuba' as country_name,\n '' as alternative_country_name,\n 'CU' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Cura\u00e7ao' as country_name,\n '' as alternative_country_name,\n 'CW' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Cyprus' as country_name,\n '' as alternative_country_name,\n 'CY' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Czechia' as country_name,\n 'Czech Republic' as alternative_country_name,\n 'CZ' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Denmark' as country_name,\n '' as alternative_country_name,\n 'DK' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Djibouti' as country_name,\n '' as alternative_country_name,\n 'DJ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Dominica' as country_name,\n '' as alternative_country_name,\n 'DM' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Dominican Republic' as country_name,\n '' as alternative_country_name,\n 'DO' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Ecuador' as country_name,\n '' as alternative_country_name,\n 'EC' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Egypt' as country_name,\n '' as alternative_country_name,\n 'EG' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'El Salvador' as country_name,\n '' as alternative_country_name,\n 'SV' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Equatorial Guinea' as country_name,\n '' as alternative_country_name,\n 'GQ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Eritrea' as country_name,\n '' as alternative_country_name,\n 'ER' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Estonia' as country_name,\n '' as alternative_country_name,\n 'EE' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Eswatini' as country_name,\n '' as alternative_country_name,\n 'SZ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Ethiopia' as country_name,\n '' as alternative_country_name,\n 'ET' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Falkland Islands (Malvinas)' as country_name,\n '' as alternative_country_name,\n 'FK' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Faroe Islands' as country_name,\n '' as alternative_country_name,\n 'FO' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Fiji' as country_name,\n '' as alternative_country_name,\n 'FJ' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'Finland' as country_name,\n '' as alternative_country_name,\n 'FI' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'France' as country_name,\n '' as alternative_country_name,\n 'FR' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'French Guiana' as country_name,\n '' as alternative_country_name,\n 'GF' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'French Polynesia' as country_name,\n '' as alternative_country_name,\n 'PF' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'French Southern Territories' as country_name,\n '' as alternative_country_name,\n 'TF' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Gabon' as country_name,\n '' as alternative_country_name,\n 'GA' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Gambia' as country_name,\n '' as alternative_country_name,\n 'GM' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Georgia' as country_name,\n '' as alternative_country_name,\n 'GE' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Germany' as country_name,\n '' as alternative_country_name,\n 'DE' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Ghana' as country_name,\n '' as alternative_country_name,\n 'GH' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Gibraltar' as country_name,\n '' as alternative_country_name,\n 'GI' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Greece' as country_name,\n '' as alternative_country_name,\n 'GR' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Greenland' as country_name,\n '' as alternative_country_name,\n 'GL' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'Grenada' as country_name,\n '' as alternative_country_name,\n 'GD' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Guadeloupe' as country_name,\n '' as alternative_country_name,\n 'GP' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Guam' as country_name,\n '' as alternative_country_name,\n 'GU' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Guatemala' as country_name,\n '' as alternative_country_name,\n 'GT' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Guernsey' as country_name,\n '' as alternative_country_name,\n 'GG' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Guinea' as country_name,\n '' as alternative_country_name,\n 'GN' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Guinea-Bissau' as country_name,\n '' as alternative_country_name,\n 'GW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Guyana' as country_name,\n '' as alternative_country_name,\n 'GY' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Haiti' as country_name,\n '' as alternative_country_name,\n 'HT' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Heard Island and McDonald Islands' as country_name,\n '' as alternative_country_name,\n 'HM' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Holy See' as country_name,\n '' as alternative_country_name,\n 'VA' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Honduras' as country_name,\n '' as alternative_country_name,\n 'HN' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Hong Kong' as country_name,\n 'Hong Kong SAR China' as alternative_country_name,\n 'HK' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Hungary' as country_name,\n '' as alternative_country_name,\n 'HU' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Iceland' as country_name,\n '' as alternative_country_name,\n 'IS' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'India' as country_name,\n '' as alternative_country_name,\n 'IN' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Indonesia' as country_name,\n '' as alternative_country_name,\n 'ID' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Iran (Islamic Republic of)' as country_name,\n 'Iran' as alternative_country_name,\n 'IR' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Iraq' as country_name,\n '' as alternative_country_name,\n 'IQ' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Ireland' as country_name,\n '' as alternative_country_name,\n 'IE' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Isle of Man' as country_name,\n '' as alternative_country_name,\n 'IM' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Israel' as country_name,\n '' as alternative_country_name,\n 'IL' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Italy' as country_name,\n '' as alternative_country_name,\n 'IT' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Jamaica' as country_name,\n '' as alternative_country_name,\n 'JM' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Japan' as country_name,\n '' as alternative_country_name,\n 'JP' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Jersey' as country_name,\n '' as alternative_country_name,\n 'JE' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Jordan' as country_name,\n '' as alternative_country_name,\n 'JO' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Kazakhstan' as country_name,\n '' as alternative_country_name,\n 'KZ' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Kenya' as country_name,\n '' as alternative_country_name,\n 'KE' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Kiribati' as country_name,\n '' as alternative_country_name,\n 'KI' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Korea (Democratic People''s Republic of)' as country_name,\n '' as alternative_country_name,\n 'KP' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Korea, Republic of' as country_name,\n 'South Korea' as alternative_country_name,\n 'KR' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Kuwait' as country_name,\n '' as alternative_country_name,\n 'KW' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Kyrgyzstan' as country_name,\n '' as alternative_country_name,\n 'KG' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Lao People''s Democratic Republic' as country_name,\n 'Laos' as alternative_country_name,\n 'LA' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Latvia' as country_name,\n '' as alternative_country_name,\n 'LV' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Lebanon' as country_name,\n '' as alternative_country_name,\n 'LB' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Lesotho' as country_name,\n '' as alternative_country_name,\n 'LS' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Liberia' as country_name,\n '' as alternative_country_name,\n 'LR' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Libya' as country_name,\n '' as alternative_country_name,\n 'LY' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'Liechtenstein' as country_name,\n '' as alternative_country_name,\n 'LI' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Lithuania' as country_name,\n '' as alternative_country_name,\n 'LT' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Luxembourg' as country_name,\n '' as alternative_country_name,\n 'LU' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Macao' as country_name,\n 'Macau' as alternative_country_name,\n 'MO' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Madagascar' as country_name,\n '' as alternative_country_name,\n 'MG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Malawi' as country_name,\n '' as alternative_country_name,\n 'MW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Malaysia' as country_name,\n '' as alternative_country_name,\n 'MY' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Maldives' as country_name,\n '' as alternative_country_name,\n 'MV' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Mali' as country_name,\n '' as alternative_country_name,\n 'ML' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Malta' as country_name,\n '' as alternative_country_name,\n 'MT' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Marshall Islands' as country_name,\n '' as alternative_country_name,\n 'MH' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Martinique' as country_name,\n '' as alternative_country_name,\n 'MQ' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Mauritania' as country_name,\n '' as alternative_country_name,\n 'MR' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Mauritius' as country_name,\n '' as alternative_country_name,\n 'MU' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Mayotte' as country_name,\n '' as alternative_country_name,\n 'YT' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Mexico' as country_name,\n '' as alternative_country_name,\n 'MX' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Micronesia (Federated States of)' as country_name,\n 'Micronesia' as alternative_country_name,\n 'FM' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Moldova, Republic of' as country_name,\n 'Moldova' as alternative_country_name,\n 'MD' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Monaco' as country_name,\n '' as alternative_country_name,\n 'MC' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Mongolia' as country_name,\n '' as alternative_country_name,\n 'MN' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Montenegro' as country_name,\n '' as alternative_country_name,\n 'ME' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Montserrat' as country_name,\n '' as alternative_country_name,\n 'MS' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Morocco' as country_name,\n '' as alternative_country_name,\n 'MA' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'Mozambique' as country_name,\n '' as alternative_country_name,\n 'MZ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Myanmar' as country_name,\n '' as alternative_country_name,\n 'MM' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Namibia' as country_name,\n '' as alternative_country_name,\n '' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Nauru' as country_name,\n '' as alternative_country_name,\n 'NR' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Nepal' as country_name,\n '' as alternative_country_name,\n 'NP' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Netherlands (Kingdom of the)' as country_name,\n 'Netherlands' as alternative_country_name,\n 'NL' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'New Caledonia' as country_name,\n '' as alternative_country_name,\n 'NC' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'New Zealand' as country_name,\n '' as alternative_country_name,\n 'NZ' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'Nicaragua' as country_name,\n '' as alternative_country_name,\n 'NI' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Niger' as country_name,\n '' as alternative_country_name,\n 'NE' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Nigeria' as country_name,\n '' as alternative_country_name,\n 'NG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Niue' as country_name,\n '' as alternative_country_name,\n 'NU' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Norfolk Island' as country_name,\n '' as alternative_country_name,\n 'NF' as country_code,\n 'Australia and New Zealand' as global_region\n\n union all \n \n select\n 'North Macedonia' as country_name,\n '' as alternative_country_name,\n 'MK' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Northern Mariana Islands' as country_name,\n '' as alternative_country_name,\n 'MP' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Norway' as country_name,\n '' as alternative_country_name,\n 'NO' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Oman' as country_name,\n '' as alternative_country_name,\n 'OM' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Pakistan' as country_name,\n '' as alternative_country_name,\n 'PK' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Palau' as country_name,\n '' as alternative_country_name,\n 'PW' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Palestine, State of' as country_name,\n '' as alternative_country_name,\n 'PS' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Panama' as country_name,\n '' as alternative_country_name,\n 'PA' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Papua New Guinea' as country_name,\n '' as alternative_country_name,\n 'PG' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'Paraguay' as country_name,\n '' as alternative_country_name,\n 'PY' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Peru' as country_name,\n '' as alternative_country_name,\n 'PE' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Philippines' as country_name,\n '' as alternative_country_name,\n 'PH' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Pitcairn' as country_name,\n '' as alternative_country_name,\n 'PN' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Poland' as country_name,\n '' as alternative_country_name,\n 'PL' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Portugal' as country_name,\n '' as alternative_country_name,\n 'PT' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Puerto Rico' as country_name,\n '' as alternative_country_name,\n 'PR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Qatar' as country_name,\n '' as alternative_country_name,\n 'QA' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'R\u00e9union' as country_name,\n 'Reunion' as alternative_country_name,\n 'RE' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Romania' as country_name,\n '' as alternative_country_name,\n 'RO' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Russian Federation' as country_name,\n 'Russia' as alternative_country_name,\n 'RU' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Rwanda' as country_name,\n '' as alternative_country_name,\n 'RW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Saint Barth\u00e9lemy' as country_name,\n 'St. Barth\u00e9lemy' as alternative_country_name,\n 'BL' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Saint Helena, Ascension and Tristan da Cunha' as country_name,\n 'St. Helena, Ascension and Tristan da Cunha' as alternative_country_name,\n 'SH' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Saint Kitts and Nevis' as country_name,\n 'St. Kitts and Nevis' as alternative_country_name,\n 'KN' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Saint Lucia' as country_name,\n 'St. Lucia' as alternative_country_name,\n 'LC' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Saint Martin (French part)' as country_name,\n 'St. Martin (French part)' as alternative_country_name,\n 'MF' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Saint Pierre and Miquelon' as country_name,\n 'St. Pierre and Miquelon' as alternative_country_name,\n 'PM' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'Saint Vincent and the Grenadines' as country_name,\n 'St. Vincent and the Grenadines' as alternative_country_name,\n 'VC' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Samoa' as country_name,\n '' as alternative_country_name,\n 'WS' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'San Marino' as country_name,\n '' as alternative_country_name,\n 'SM' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Sao Tome and Principe' as country_name,\n 'S\u00e3o Tom\u00e9 and Principe' as alternative_country_name,\n 'ST' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Saudi Arabia' as country_name,\n '' as alternative_country_name,\n 'SA' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Senegal' as country_name,\n '' as alternative_country_name,\n 'SN' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Serbia' as country_name,\n '' as alternative_country_name,\n 'RS' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Seychelles' as country_name,\n '' as alternative_country_name,\n 'SC' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Sierra Leone' as country_name,\n '' as alternative_country_name,\n 'SL' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Singapore' as country_name,\n '' as alternative_country_name,\n 'SG' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Sint Maarten (Dutch part)' as country_name,\n '' as alternative_country_name,\n 'SX' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Slovakia' as country_name,\n '' as alternative_country_name,\n 'SK' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'Slovenia' as country_name,\n '' as alternative_country_name,\n 'SI' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Solomon Islands' as country_name,\n '' as alternative_country_name,\n 'SB' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'Somalia' as country_name,\n '' as alternative_country_name,\n 'SO' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'South Africa' as country_name,\n '' as alternative_country_name,\n 'ZA' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'South Georgia and the South Sandwich Islands' as country_name,\n '' as alternative_country_name,\n 'GS' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'South Sudan' as country_name,\n '' as alternative_country_name,\n 'SS' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Spain' as country_name,\n '' as alternative_country_name,\n 'ES' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Sri Lanka' as country_name,\n '' as alternative_country_name,\n 'LK' as country_code,\n 'Southern Asia' as global_region\n\n union all \n \n select\n 'Sudan' as country_name,\n '' as alternative_country_name,\n 'SD' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'Suriname' as country_name,\n '' as alternative_country_name,\n 'SR' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Svalbard and Jan Mayen' as country_name,\n '' as alternative_country_name,\n 'SJ' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Sweden' as country_name,\n '' as alternative_country_name,\n 'SE' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'Switzerland' as country_name,\n '' as alternative_country_name,\n 'CH' as country_code,\n 'Western Europe' as global_region\n\n union all \n \n select\n 'Syrian Arab Republic' as country_name,\n '' as alternative_country_name,\n 'SY' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Taiwan, Province of China' as country_name,\n 'Taiwan' as alternative_country_name,\n 'TW' as country_code,\n 'Eastern Asia' as global_region\n\n union all \n \n select\n 'Tajikistan' as country_name,\n '' as alternative_country_name,\n 'TJ' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Tanzania, United Republic of' as country_name,\n 'Tanzania' as alternative_country_name,\n 'TZ' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Thailand' as country_name,\n '' as alternative_country_name,\n 'TH' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Timor-Leste' as country_name,\n '' as alternative_country_name,\n 'TL' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Togo' as country_name,\n '' as alternative_country_name,\n 'TG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Tokelau' as country_name,\n '' as alternative_country_name,\n 'TK' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Tonga' as country_name,\n '' as alternative_country_name,\n 'TO' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Trinidad and Tobago' as country_name,\n '' as alternative_country_name,\n 'TT' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Tunisia' as country_name,\n '' as alternative_country_name,\n 'TN' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'T\u00fcrkiye' as country_name,\n 'Turkey' as alternative_country_name,\n 'TR' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Turkmenistan' as country_name,\n '' as alternative_country_name,\n 'TM' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Turks and Caicos Islands' as country_name,\n '' as alternative_country_name,\n 'TC' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Tuvalu' as country_name,\n '' as alternative_country_name,\n 'TV' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Uganda' as country_name,\n '' as alternative_country_name,\n 'UG' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Ukraine' as country_name,\n '' as alternative_country_name,\n 'UA' as country_code,\n 'Eastern Europe' as global_region\n\n union all \n \n select\n 'United Arab Emirates' as country_name,\n '' as alternative_country_name,\n 'AE' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'United Kingdom of Great Britain and Northern Ireland' as country_name,\n 'United Kingdom' as alternative_country_name,\n 'GB' as country_code,\n 'Northern Europe' as global_region\n\n union all \n \n select\n 'United States of America' as country_name,\n 'United States' as alternative_country_name,\n 'US' as country_code,\n 'Northern America' as global_region\n\n union all \n \n select\n 'United States Minor Outlying Islands' as country_name,\n '' as alternative_country_name,\n 'UM' as country_code,\n 'Micronesia' as global_region\n\n union all \n \n select\n 'Uruguay' as country_name,\n '' as alternative_country_name,\n 'UY' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Uzbekistan' as country_name,\n '' as alternative_country_name,\n 'UZ' as country_code,\n 'Central Asia' as global_region\n\n union all \n \n select\n 'Vanuatu' as country_name,\n '' as alternative_country_name,\n 'VU' as country_code,\n 'Melanesia' as global_region\n\n union all \n \n select\n 'Venezuela (Bolivarian Republic of)' as country_name,\n 'Venezuela' as alternative_country_name,\n 'VE' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Viet Nam' as country_name,\n 'Vietnam' as alternative_country_name,\n 'VN' as country_code,\n 'South-eastern Asia' as global_region\n\n union all \n \n select\n 'Virgin Islands (British)' as country_name,\n 'British Virgin Islands' as alternative_country_name,\n 'VG' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Virgin Islands (U.S.)' as country_name,\n '' as alternative_country_name,\n 'VI' as country_code,\n 'Latin America and the Caribbean' as global_region\n\n union all \n \n select\n 'Wallis and Futuna' as country_name,\n '' as alternative_country_name,\n 'WF' as country_code,\n 'Polynesia' as global_region\n\n union all \n \n select\n 'Western Sahara' as country_name,\n '' as alternative_country_name,\n 'EH' as country_code,\n 'Northern Africa' as global_region\n\n union all \n \n select\n 'Yemen' as country_name,\n '' as alternative_country_name,\n 'YE' as country_code,\n 'Western Asia' as global_region\n\n union all \n \n select\n 'Zambia' as country_name,\n '' as alternative_country_name,\n 'ZM' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Zimbabwe' as country_name,\n '' as alternative_country_name,\n 'ZW' as country_code,\n 'Sub-Saharan Africa' as global_region\n\n union all \n \n select\n 'Kosovo' as country_name,\n '' as alternative_country_name,\n 'XK' as country_code,\n 'Southern Europe' as global_region\n\n union all \n \n select\n 'Unknown' as country_name,\n '' as alternative_country_name,\n 'Unknown' as country_code,\n 'Unknown' as global_region\n\n \n \n), \n\nfinal as (\n\n select \n country_name,\n case when alternative_country_name = '' then null else alternative_country_name end as alternative_country_name,\n country_code,\n global_region\n from create_country_mapping\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.ad_reporting.metricflow_time_spine": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "metricflow_time_spine", "resource_type": "model", "package_name": "ad_reporting", "path": "semantic_models/metricflow_time_spine.sql", "original_file_path": "models/semantic_models/metricflow_time_spine.sql", "unique_id": "model.ad_reporting.metricflow_time_spine", "fqn": ["ad_reporting", "semantic_models", "metricflow_time_spine"], "alias": "metricflow_time_spine", "checksum": {"name": "sha256", "checksum": "e34af24277da865ee1d3e4f5f7934421f4e02bdfb744f69db208b85fb7e604f3"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Metricflow time spine", "columns": {"date_day": {"name": "date_day", "description": "", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": "day", "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "ad_reporting://models/semantic_models/ad_reporting__ad_report.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "ad_reporting_{{ var('directed_schema','dev') }}", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.679933, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"metricflow_time_spine\"", "raw_code": "{{ config(enabled=var('ad_reporting__metricflow_time_spine_enabled', True)) }}\nwith \n\ndays as (\n {{ ad_reporting.fivetran_get_base_dates(n_dateparts=365*10, datepart=\"day\") }}\n\n),\n\ncast_to_date as (\n\n select \n cast(date_day as date) as date_day\n \n from days\n\n)\n\nselect * from cast_to_date", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.fivetran_get_base_dates"], "nodes": []}, "compiled_path": "target/compiled/ad_reporting/models/semantic_models/metricflow_time_spine.sql", "compiled": true, "compiled_code": "\nwith \n\ndays as (\n with\n date_spine as (\n\n \n\n \n with\n rawdata as (\n\n \n\n \n\n with\n p as (\n select 0 as generated_number\n union all\n select 1\n ),\n unioned as (\n\n select\n\n \n p0.generated_number * power(2, 0)\n + \n \n p1.generated_number * power(2, 1)\n + \n \n p2.generated_number * power(2, 2)\n + \n \n p3.generated_number * power(2, 3)\n + \n \n p4.generated_number * power(2, 4)\n + \n \n p5.generated_number * power(2, 5)\n + \n \n p6.generated_number * power(2, 6)\n + \n \n p7.generated_number * power(2, 7)\n + \n \n p8.generated_number * power(2, 8)\n + \n \n p9.generated_number * power(2, 9)\n + \n \n p10.generated_number * power(2, 10)\n + \n \n p11.generated_number * power(2, 11)\n \n \n + 1 as generated_number\n\n from\n\n \n p as p0 cross join \n \n p as p1 cross join \n \n p as p2 cross join \n \n p as p3 cross join \n \n p as p4 cross join \n \n p as p5 cross join \n \n p as p6 cross join \n \n p as p7 cross join \n \n p as p8 cross join \n \n p as p9 cross join \n \n p as p10 cross join \n \n p as p11 \n \n\n )\n\n select *\n from unioned\n where generated_number <= 3651\n order by generated_number\n\n\n\n ),\n\n all_periods as (\n\n select\n (\n \n\n \n\n cast(cast(\n cast(now() as timestamp)\n at time zone 'UTC' at time zone 'America/Los_Angeles'\n as timestamp\n ) as date) + ((interval '1 day') * (-3650))\n\n + ((interval '1 day') * ((row_number() over (order by 1) - 1)))\n\n\n ) as date_day\n from rawdata\n\n ),\n\n filtered as (\n\n select * from all_periods where date_day <= cast(\n\n cast(cast(\n cast(now() as timestamp)\n at time zone 'UTC' at time zone 'America/Los_Angeles'\n as timestamp\n ) as date) + ((interval '1 day') * (1))\n\n as date)\n\n )\n\n select *\n from filtered\n\n\n\n )\n select\n cast(d.date_day as timestamp) as date_day\n from date_spine d\n\n\n),\n\ncast_to_date as (\n\n select \n cast(date_day as date) as date_day\n \n from days\n\n)\n\nselect * from cast_to_date", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": {"standard_granularity_column": "date_day", "custom_granularities": []}}, "model.tiktok_ads.tiktok_ads__url_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "tiktok_ads__url_report", "resource_type": "model", "package_name": "tiktok_ads", "path": "tiktok_ads__url_report.sql", "original_file_path": "models/tiktok_ads__url_report.sql", "unique_id": "model.tiktok_ads.tiktok_ads__url_report", "fqn": ["tiktok_ads", "tiktok_ads__url_report"], "alias": "tiktok_ads__url_report", "checksum": {"name": "sha256", "checksum": "111d54116b4eb5bdc6b3e6051a14d0995e745a075025dc614c51e807ce555bf0"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the URL level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "Day of record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_id": {"name": "ad_id", "description": "Ad ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_name": {"name": "ad_name", "description": "Ad name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_name": {"name": "advertiser_name", "description": "Advertiser name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "Advertiser ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the `landing page url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_host": {"name": "url_host", "description": "The URL host of the ad, extracted from the `landing page url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_path": {"name": "url_path", "description": "The URL path of the ad, extracted from the `landing page url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_source": {"name": "utm_source", "description": "The utm_source parameter of the ad, extracted from the `landing page url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_medium": {"name": "utm_medium", "description": "The utm_medium parameter of the ad, extracted from the `landing page url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_campaign": {"name": "utm_campaign", "description": "The utm_campaign parameter of the ad, extracted from the `landing page url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_content": {"name": "utm_content", "description": "The utm_content parameter of the ad, extracted from the `landing page url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_term": {"name": "utm_term", "description": "The utm_term parameter of the ad, extracted from the `landing page url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "audience_type": {"name": "audience_type", "description": "Audience Type", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget": {"name": "budget", "description": "Ad budget. Returns 0.0 when Campaign Budget Optimization (budget_optimize_switch) is on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "category": {"name": "category", "description": "Ad group category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "gender": {"name": "gender", "description": "Gender that you want to target.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Advertiser's currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reach": {"name": "reach", "description": "The number of unique users who saw your ads at least once. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion": {"name": "conversion", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "likes": {"name": "likes", "description": "The number of likes your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "comments": {"name": "comments", "description": "The number of comments your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "The number of shares that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_visits": {"name": "profile_visits", "description": "The number of profile visits that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "follows": {"name": "follows", "description": "The number of follows that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_2_s": {"name": "video_watched_2_s", "description": "The number of times your video played for at least 2 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_6_s": {"name": "video_watched_6_s", "description": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_25": {"name": "video_views_p_25", "description": "The number of times your video was played at 25% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_50": {"name": "video_views_p_50", "description": "The number of times your video was played at 50% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_75": {"name": "video_views_p_75", "description": "The number of times your video was played at 75% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion": {"name": "real_time_conversion", "description": "Number of times your ad resulted in the optimization event you selected.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_purchase_value": {"name": "total_purchase_value", "description": "The total value of purchase events that occurred in your app that were recorded by your measurement partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_sales_lead_value": {"name": "total_sales_lead_value", "description": "The monetary worth or potential value assigned to a lead generated through ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversion_value": {"name": "total_conversion_value", "description": "The accumulated value of `total_purchase_value` and `total_sales_lead_value`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_cpc": {"name": "daily_cpc", "description": "The average amount of money you've spent on a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_cpm": {"name": "daily_cpm", "description": "The average amount of money you've spent per 1,000 impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_ctr": {"name": "daily_ctr", "description": "The percentage of times people saw your ad and performed a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.7774112, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__url_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\nwith hourly as (\n \n select *\n from {{ ref('stg_tiktok_ads__ad_report_hourly') }}\n), \n\nads as (\n\n select *\n from {{ ref('stg_tiktok_ads__ad_history') }}\n where is_most_recent_record\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_tiktok_ads__ad_group_history') }}\n where is_most_recent_record\n), \n\nadvertiser as (\n\n select *\n from {{ ref('stg_tiktok_ads__advertiser') }}\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_tiktok_ads__campaign_history') }}\n where is_most_recent_record\n), \n\naggregated as (\n\n select\n hourly.source_relation,\n cast(hourly.stat_time_hour as date) as date_day,\n ad_groups.advertiser_id,\n advertiser.advertiser_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n ad_groups.ad_group_id,\n ad_groups.ad_group_name,\n hourly.ad_id,\n ads.ad_name,\n ads.base_url,\n ads.url_host,\n ads.url_path,\n ads.utm_source,\n ads.utm_medium,\n ads.utm_campaign,\n ads.utm_content,\n ads.utm_term,\n advertiser.currency,\n ad_groups.category,\n ad_groups.gender,\n ad_groups.audience_type,\n ad_groups.budget,\n sum(hourly.impressions) as impressions,\n sum(hourly.clicks) as clicks,\n sum(hourly.spend) as spend,\n sum(hourly.reach) as reach,\n sum(hourly.conversion) as conversion,\n sum(hourly.likes) as likes,\n sum(hourly.comments) as comments,\n sum(hourly.shares) as shares,\n sum(hourly.profile_visits) as profile_visits,\n sum(hourly.follows) as follows,\n sum(hourly.video_watched_2_s) as video_watched_2_s,\n sum(hourly.video_watched_6_s) as video_watched_6_s,\n sum(hourly.video_views_p_25) as video_views_p_25,\n sum(hourly.video_views_p_50) as video_views_p_50, \n sum(hourly.video_views_p_75) as video_views_p_75,\n sum(hourly.real_time_conversion) as real_time_conversion,\n sum(hourly.total_purchase_value) as total_purchase_value,\n sum(hourly.total_sales_lead_value) as total_sales_lead_value,\n sum(hourly.total_purchase_value + hourly.total_sales_lead_value) as total_conversion_value,\n sum(hourly.spend)/nullif(sum(hourly.clicks),0) as daily_cpc,\n (sum(hourly.spend)/nullif(sum(hourly.impressions),0))*1000 as daily_cpm,\n (sum(hourly.clicks)/nullif(sum(hourly.impressions),0))*100 as daily_ctr\n\n {{ tiktok_ads_persist_pass_through_columns(pass_through_variable='tiktok_ads__ad_hourly_passthrough_metrics', identifier='hourly', transform='sum', coalesce_with=0, exclude_fields=['real_time_conversion','total_purchase_value','total_sales_lead_value']) }}\n\n from hourly\n left join ads\n on hourly.ad_id = ads.ad_id\n and hourly.source_relation = ads.source_relation\n left join ad_groups \n on ads.ad_group_id = ad_groups.ad_group_id\n and ads.source_relation = ad_groups.source_relation\n left join advertiser\n on ads.advertiser_id = advertiser.advertiser_id\n and ads.source_relation = advertiser.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n\n {% if var('ad_reporting__url_report__using_null_filter', True) %}\n -- We are filtering for only ads where url fields are populated.\n where ads.landing_page_url is not null\n {% endif %}\n\n {{ dbt_utils.group_by(23) }}\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__ad_report_hourly", "package": null, "version": null}, {"name": "stg_tiktok_ads__ad_history", "package": null, "version": null}, {"name": "stg_tiktok_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_tiktok_ads__advertiser", "package": null, "version": null}, {"name": "stg_tiktok_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.tiktok_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__ad_report_hourly", "model.tiktok_ads.stg_tiktok_ads__ad_history", "model.tiktok_ads.stg_tiktok_ads__ad_group_history", "model.tiktok_ads.stg_tiktok_ads__advertiser", "model.tiktok_ads.stg_tiktok_ads__campaign_history"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads__url_report.sql", "compiled": true, "compiled_code": "\n\nwith hourly as (\n \n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_report_hourly\"\n), \n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_history\"\n where is_most_recent_record\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_group_history\"\n where is_most_recent_record\n), \n\nadvertiser as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__advertiser\"\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_history\"\n where is_most_recent_record\n), \n\naggregated as (\n\n select\n hourly.source_relation,\n cast(hourly.stat_time_hour as date) as date_day,\n ad_groups.advertiser_id,\n advertiser.advertiser_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n ad_groups.ad_group_id,\n ad_groups.ad_group_name,\n hourly.ad_id,\n ads.ad_name,\n ads.base_url,\n ads.url_host,\n ads.url_path,\n ads.utm_source,\n ads.utm_medium,\n ads.utm_campaign,\n ads.utm_content,\n ads.utm_term,\n advertiser.currency,\n ad_groups.category,\n ad_groups.gender,\n ad_groups.audience_type,\n ad_groups.budget,\n sum(hourly.impressions) as impressions,\n sum(hourly.clicks) as clicks,\n sum(hourly.spend) as spend,\n sum(hourly.reach) as reach,\n sum(hourly.conversion) as conversion,\n sum(hourly.likes) as likes,\n sum(hourly.comments) as comments,\n sum(hourly.shares) as shares,\n sum(hourly.profile_visits) as profile_visits,\n sum(hourly.follows) as follows,\n sum(hourly.video_watched_2_s) as video_watched_2_s,\n sum(hourly.video_watched_6_s) as video_watched_6_s,\n sum(hourly.video_views_p_25) as video_views_p_25,\n sum(hourly.video_views_p_50) as video_views_p_50, \n sum(hourly.video_views_p_75) as video_views_p_75,\n sum(hourly.real_time_conversion) as real_time_conversion,\n sum(hourly.total_purchase_value) as total_purchase_value,\n sum(hourly.total_sales_lead_value) as total_sales_lead_value,\n sum(hourly.total_purchase_value + hourly.total_sales_lead_value) as total_conversion_value,\n sum(hourly.spend)/nullif(sum(hourly.clicks),0) as daily_cpc,\n (sum(hourly.spend)/nullif(sum(hourly.impressions),0))*1000 as daily_cpm,\n (sum(hourly.clicks)/nullif(sum(hourly.impressions),0))*100 as daily_ctr\n\n \n\n\n\n\n\n from hourly\n left join ads\n on hourly.ad_id = ads.ad_id\n and hourly.source_relation = ads.source_relation\n left join ad_groups \n on ads.ad_group_id = ad_groups.ad_group_id\n and ads.source_relation = ad_groups.source_relation\n left join advertiser\n on ads.advertiser_id = advertiser.advertiser_id\n and ads.source_relation = advertiser.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n\n \n -- We are filtering for only ads where url fields are populated.\n where ads.landing_page_url is not null\n \n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.tiktok_ads__advertiser_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "tiktok_ads__advertiser_report", "resource_type": "model", "package_name": "tiktok_ads", "path": "tiktok_ads__advertiser_report.sql", "original_file_path": "models/tiktok_ads__advertiser_report.sql", "unique_id": "model.tiktok_ads.tiktok_ads__advertiser_report", "fqn": ["tiktok_ads", "tiktok_ads__advertiser_report"], "alias": "tiktok_ads__advertiser_report", "checksum": {"name": "sha256", "checksum": "7c9f50bf4266f414588d3fe4787002b6a8e28bdf4fbf3d8e4979b42921f4ebeb"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the account level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "Day of record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_name": {"name": "advertiser_name", "description": "Advertiser name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "Advertiser ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Advertiser's currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reach": {"name": "reach", "description": "The number of unique users who saw your ads at least once. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion": {"name": "conversion", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "likes": {"name": "likes", "description": "The number of likes your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "comments": {"name": "comments", "description": "The number of comments your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "The number of shares that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_visits": {"name": "profile_visits", "description": "The number of profile visits that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "follows": {"name": "follows", "description": "The number of follows that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_2_s": {"name": "video_watched_2_s", "description": "The number of times your video played for at least 2 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_6_s": {"name": "video_watched_6_s", "description": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_25": {"name": "video_views_p_25", "description": "The number of times your video was played at 25% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_50": {"name": "video_views_p_50", "description": "The number of times your video was played at 50% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_75": {"name": "video_views_p_75", "description": "The number of times your video was played at 75% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion": {"name": "real_time_conversion", "description": "Number of times your ad resulted in the optimization event you selected.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_purchase_value": {"name": "total_purchase_value", "description": "The total value of purchase events that occurred in your app that were recorded by your measurement partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_sales_lead_value": {"name": "total_sales_lead_value", "description": "The monetary worth or potential value assigned to a lead generated through ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversion_value": {"name": "total_conversion_value", "description": "The accumulated value of `total_purchase_value` and `total_sales_lead_value`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_cpc": {"name": "daily_cpc", "description": "The average amount of money you've spent on a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_cpm": {"name": "daily_cpm", "description": "The average amount of money you've spent per 1,000 impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_ctr": {"name": "daily_ctr", "description": "The percentage of times people saw your ad and performed a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.7672687, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__advertiser_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\nwith hourly as (\n \n select *\n from {{ ref('stg_tiktok_ads__ad_report_hourly') }}\n),\n\nadvertiser as (\n\n select *\n from {{ ref('stg_tiktok_ads__advertiser') }}\n), \n\nads as (\n\n select *\n from {{ ref('stg_tiktok_ads__ad_history') }}\n where is_most_recent_record\n), \n\njoined as (\n\n select\n hourly.source_relation,\n cast(hourly.stat_time_hour as date) as date_day,\n ads.advertiser_id,\n advertiser.advertiser_name,\n advertiser.currency,\n sum(hourly.clicks) as clicks,\n sum(hourly.impressions) as impressions,\n sum(hourly.spend) as spend,\n sum(hourly.reach) as reach,\n sum(hourly.conversion) as conversion,\n sum(hourly.likes) as likes,\n sum(hourly.comments) as comments,\n sum(hourly.shares) as shares,\n sum(hourly.profile_visits) as profile_visits,\n sum(hourly.follows) as follows,\n sum(hourly.video_watched_2_s) as video_watched_2_s, \n sum(hourly.video_watched_6_s) as video_watched_6_s, \n sum(hourly.video_views_p_25) as video_views_p_25, \n sum(hourly.video_views_p_50) as video_views_p_50,\n sum(hourly.video_views_p_75) as video_views_p_75,\n sum(hourly.real_time_conversion) as real_time_conversion,\n sum(hourly.total_purchase_value) as total_purchase_value,\n sum(hourly.total_sales_lead_value) as total_sales_lead_value,\n sum(hourly.total_purchase_value + hourly.total_sales_lead_value) as total_conversion_value,\n sum(hourly.spend)/nullif(sum(hourly.clicks),0) as daily_cpc,\n (sum(hourly.spend)/nullif(sum(hourly.impressions),0))*1000 as daily_cpm,\n (sum(hourly.clicks)/nullif(sum(hourly.impressions),0))*100 as daily_ctr\n\n {{ tiktok_ads_persist_pass_through_columns(pass_through_variable='tiktok_ads__ad_hourly_passthrough_metrics', identifier='hourly', transform='sum', coalesce_with=0, exclude_fields=['real_time_conversion','total_purchase_value','total_sales_lead_value']) }} \n\n from hourly\n left join ads\n on hourly.ad_id = ads.ad_id\n and hourly.source_relation = ads.source_relation\n left join advertiser\n on ads.advertiser_id = advertiser.advertiser_id\n and ads.source_relation = advertiser.source_relation\n {{ dbt_utils.group_by(5) }}\n\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__ad_report_hourly", "package": null, "version": null}, {"name": "stg_tiktok_ads__advertiser", "package": null, "version": null}, {"name": "stg_tiktok_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.tiktok_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__ad_report_hourly", "model.tiktok_ads.stg_tiktok_ads__advertiser", "model.tiktok_ads.stg_tiktok_ads__ad_history"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads__advertiser_report.sql", "compiled": true, "compiled_code": "\n\nwith hourly as (\n \n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_report_hourly\"\n),\n\nadvertiser as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__advertiser\"\n), \n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_history\"\n where is_most_recent_record\n), \n\njoined as (\n\n select\n hourly.source_relation,\n cast(hourly.stat_time_hour as date) as date_day,\n ads.advertiser_id,\n advertiser.advertiser_name,\n advertiser.currency,\n sum(hourly.clicks) as clicks,\n sum(hourly.impressions) as impressions,\n sum(hourly.spend) as spend,\n sum(hourly.reach) as reach,\n sum(hourly.conversion) as conversion,\n sum(hourly.likes) as likes,\n sum(hourly.comments) as comments,\n sum(hourly.shares) as shares,\n sum(hourly.profile_visits) as profile_visits,\n sum(hourly.follows) as follows,\n sum(hourly.video_watched_2_s) as video_watched_2_s, \n sum(hourly.video_watched_6_s) as video_watched_6_s, \n sum(hourly.video_views_p_25) as video_views_p_25, \n sum(hourly.video_views_p_50) as video_views_p_50,\n sum(hourly.video_views_p_75) as video_views_p_75,\n sum(hourly.real_time_conversion) as real_time_conversion,\n sum(hourly.total_purchase_value) as total_purchase_value,\n sum(hourly.total_sales_lead_value) as total_sales_lead_value,\n sum(hourly.total_purchase_value + hourly.total_sales_lead_value) as total_conversion_value,\n sum(hourly.spend)/nullif(sum(hourly.clicks),0) as daily_cpc,\n (sum(hourly.spend)/nullif(sum(hourly.impressions),0))*1000 as daily_cpm,\n (sum(hourly.clicks)/nullif(sum(hourly.impressions),0))*100 as daily_ctr\n\n \n\n\n\n \n\n from hourly\n left join ads\n on hourly.ad_id = ads.ad_id\n and hourly.source_relation = ads.source_relation\n left join advertiser\n on ads.advertiser_id = advertiser.advertiser_id\n and ads.source_relation = advertiser.source_relation\n group by 1,2,3,4,5\n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.tiktok_ads__ad_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "tiktok_ads__ad_report", "resource_type": "model", "package_name": "tiktok_ads", "path": "tiktok_ads__ad_report.sql", "original_file_path": "models/tiktok_ads__ad_report.sql", "unique_id": "model.tiktok_ads.tiktok_ads__ad_report", "fqn": ["tiktok_ads", "tiktok_ads__ad_report"], "alias": "tiktok_ads__ad_report", "checksum": {"name": "sha256", "checksum": "96cdb8811bdb2de448852af698a0c6a326da73d5fb59d10efb15e86ed82b7e54"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the ad level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "Day of record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_id": {"name": "ad_id", "description": "Ad ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_name": {"name": "ad_name", "description": "Ad name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_name": {"name": "advertiser_name", "description": "Advertiser name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "Advertiser ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "audience_type": {"name": "audience_type", "description": "Audience Type", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget": {"name": "budget", "description": "Ad budget. Returns 0.0 when Campaign Budget Optimization (budget_optimize_switch) is on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "category": {"name": "category", "description": "Ad group category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "gender": {"name": "gender", "description": "Gender that you want to target.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Advertiser's currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reach": {"name": "reach", "description": "The number of unique users who saw your ads at least once. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion": {"name": "conversion", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "likes": {"name": "likes", "description": "The number of likes your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "comments": {"name": "comments", "description": "The number of comments your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "The number of shares that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_visits": {"name": "profile_visits", "description": "The number of profile visits that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "follows": {"name": "follows", "description": "The number of follows that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_2_s": {"name": "video_watched_2_s", "description": "The number of times your video played for at least 2 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_6_s": {"name": "video_watched_6_s", "description": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_25": {"name": "video_views_p_25", "description": "The number of times your video was played at 25% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_50": {"name": "video_views_p_50", "description": "The number of times your video was played at 50% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_75": {"name": "video_views_p_75", "description": "The number of times your video was played at 75% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion": {"name": "real_time_conversion", "description": "Number of times your ad resulted in the optimization event you selected.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_purchase_value": {"name": "total_purchase_value", "description": "The total value of purchase events that occurred in your app that were recorded by your measurement partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_sales_lead_value": {"name": "total_sales_lead_value", "description": "The monetary worth or potential value assigned to a lead generated through ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversion_value": {"name": "total_conversion_value", "description": "The accumulated value of `total_purchase_value` and `total_sales_lead_value`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_cpc": {"name": "daily_cpc", "description": "The average amount of money you've spent on a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_cpm": {"name": "daily_cpm", "description": "The average amount of money you've spent per 1,000 impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_ctr": {"name": "daily_ctr", "description": "The percentage of times people saw your ad and performed a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.7705808, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__ad_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\nwith hourly as (\n \n select *\n from {{ ref('stg_tiktok_ads__ad_report_hourly') }}\n), \n\nads as (\n\n select *\n from {{ ref('stg_tiktok_ads__ad_history') }}\n where is_most_recent_record\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_tiktok_ads__ad_group_history') }}\n where is_most_recent_record\n), \n\nadvertiser as (\n\n select *\n from {{ ref('stg_tiktok_ads__advertiser') }}\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_tiktok_ads__campaign_history') }}\n where is_most_recent_record\n),\n\naggregated as (\n\n select\n hourly.source_relation,\n cast(hourly.stat_time_hour as date) as date_day,\n ad_groups.advertiser_id,\n advertiser.advertiser_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n ad_groups.ad_group_id,\n ad_groups.ad_group_name,\n hourly.ad_id,\n ads.ad_name,\n advertiser.currency,\n ad_groups.category,\n ad_groups.gender,\n ad_groups.audience_type,\n ad_groups.budget,\n sum(hourly.impressions) as impressions,\n sum(hourly.clicks) as clicks,\n sum(hourly.spend) as spend,\n sum(hourly.reach) as reach,\n sum(hourly.conversion) as conversion,\n sum(hourly.likes) as likes,\n sum(hourly.comments) as comments,\n sum(hourly.shares) as shares,\n sum(hourly.profile_visits) as profile_visits,\n sum(hourly.follows) as follows,\n sum(hourly.video_watched_2_s) as video_watched_2_s,\n sum(hourly.video_watched_6_s) as video_watched_6_s,\n sum(hourly.video_views_p_25) as video_views_p_25,\n sum(hourly.video_views_p_50) as video_views_p_50, \n sum(hourly.video_views_p_75) as video_views_p_75,\n sum(hourly.real_time_conversion) as real_time_conversion,\n sum(hourly.total_purchase_value) as total_purchase_value,\n sum(hourly.total_sales_lead_value) as total_sales_lead_value,\n sum(hourly.total_purchase_value + hourly.total_sales_lead_value) as total_conversion_value,\n sum(hourly.spend)/nullif(sum(hourly.clicks),0) as daily_cpc,\n (sum(hourly.spend)/nullif(sum(hourly.impressions),0))*1000 as daily_cpm,\n (sum(hourly.clicks)/nullif(sum(hourly.impressions),0))*100 as daily_ctr\n\n {{ tiktok_ads_persist_pass_through_columns(pass_through_variable='tiktok_ads__ad_hourly_passthrough_metrics', identifier='hourly', transform='sum', coalesce_with=0, exclude_fields=['real_time_conversion','total_purchase_value','total_sales_lead_value']) }} \n\n from hourly\n left join ads\n on hourly.ad_id = ads.ad_id\n and hourly.source_relation = ads.source_relation\n left join ad_groups \n on ads.ad_group_id = ad_groups.ad_group_id\n and ads.source_relation = ad_groups.source_relation\n left join advertiser\n on ads.advertiser_id = advertiser.advertiser_id\n and ads.source_relation = advertiser.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n {{ dbt_utils.group_by(15) }}\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__ad_report_hourly", "package": null, "version": null}, {"name": "stg_tiktok_ads__ad_history", "package": null, "version": null}, {"name": "stg_tiktok_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_tiktok_ads__advertiser", "package": null, "version": null}, {"name": "stg_tiktok_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.tiktok_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__ad_report_hourly", "model.tiktok_ads.stg_tiktok_ads__ad_history", "model.tiktok_ads.stg_tiktok_ads__ad_group_history", "model.tiktok_ads.stg_tiktok_ads__advertiser", "model.tiktok_ads.stg_tiktok_ads__campaign_history"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads__ad_report.sql", "compiled": true, "compiled_code": "\n\nwith hourly as (\n \n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_report_hourly\"\n), \n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_history\"\n where is_most_recent_record\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_group_history\"\n where is_most_recent_record\n), \n\nadvertiser as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__advertiser\"\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_history\"\n where is_most_recent_record\n),\n\naggregated as (\n\n select\n hourly.source_relation,\n cast(hourly.stat_time_hour as date) as date_day,\n ad_groups.advertiser_id,\n advertiser.advertiser_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n ad_groups.ad_group_id,\n ad_groups.ad_group_name,\n hourly.ad_id,\n ads.ad_name,\n advertiser.currency,\n ad_groups.category,\n ad_groups.gender,\n ad_groups.audience_type,\n ad_groups.budget,\n sum(hourly.impressions) as impressions,\n sum(hourly.clicks) as clicks,\n sum(hourly.spend) as spend,\n sum(hourly.reach) as reach,\n sum(hourly.conversion) as conversion,\n sum(hourly.likes) as likes,\n sum(hourly.comments) as comments,\n sum(hourly.shares) as shares,\n sum(hourly.profile_visits) as profile_visits,\n sum(hourly.follows) as follows,\n sum(hourly.video_watched_2_s) as video_watched_2_s,\n sum(hourly.video_watched_6_s) as video_watched_6_s,\n sum(hourly.video_views_p_25) as video_views_p_25,\n sum(hourly.video_views_p_50) as video_views_p_50, \n sum(hourly.video_views_p_75) as video_views_p_75,\n sum(hourly.real_time_conversion) as real_time_conversion,\n sum(hourly.total_purchase_value) as total_purchase_value,\n sum(hourly.total_sales_lead_value) as total_sales_lead_value,\n sum(hourly.total_purchase_value + hourly.total_sales_lead_value) as total_conversion_value,\n sum(hourly.spend)/nullif(sum(hourly.clicks),0) as daily_cpc,\n (sum(hourly.spend)/nullif(sum(hourly.impressions),0))*1000 as daily_cpm,\n (sum(hourly.clicks)/nullif(sum(hourly.impressions),0))*100 as daily_ctr\n\n \n\n\n\n \n\n from hourly\n left join ads\n on hourly.ad_id = ads.ad_id\n and hourly.source_relation = ads.source_relation\n left join ad_groups \n on ads.ad_group_id = ad_groups.ad_group_id\n and ads.source_relation = ad_groups.source_relation\n left join advertiser\n on ads.advertiser_id = advertiser.advertiser_id\n and ads.source_relation = advertiser.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.tiktok_ads__ad_group_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "tiktok_ads__ad_group_report", "resource_type": "model", "package_name": "tiktok_ads", "path": "tiktok_ads__ad_group_report.sql", "original_file_path": "models/tiktok_ads__ad_group_report.sql", "unique_id": "model.tiktok_ads.tiktok_ads__ad_group_report", "fqn": ["tiktok_ads", "tiktok_ads__ad_group_report"], "alias": "tiktok_ads__ad_group_report", "checksum": {"name": "sha256", "checksum": "eb74f033f70d89b58811f2c8dba2eeed6ec976cc61f3d92d387385dd60fcd077"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads at the ad group level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "Day of record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "Advertiser ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_name": {"name": "advertiser_name", "description": "Advertiser name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Advertiser's currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "audience_type": {"name": "audience_type", "description": "Audience Type", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget": {"name": "budget", "description": "Ad budget. Returns 0.0 when Campaign Budget Optimization (budget_optimize_switch) is on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "category": {"name": "category", "description": "Ad group category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "gender": {"name": "gender", "description": "Gender that you want to target.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reach": {"name": "reach", "description": "The number of unique users who saw your ads at least once. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion": {"name": "conversion", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "likes": {"name": "likes", "description": "The number of likes your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "comments": {"name": "comments", "description": "The number of comments your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "The number of shares that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_visits": {"name": "profile_visits", "description": "The number of profile visits that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "follows": {"name": "follows", "description": "The number of follows that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_2_s": {"name": "video_watched_2_s", "description": "The number of times your video played for at least 2 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_6_s": {"name": "video_watched_6_s", "description": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_25": {"name": "video_views_p_25", "description": "The number of times your video was played at 25% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_50": {"name": "video_views_p_50", "description": "The number of times your video was played at 50% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_75": {"name": "video_views_p_75", "description": "The number of times your video was played at 75% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion": {"name": "real_time_conversion", "description": "Number of times your ad resulted in the optimization event you selected.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_purchase_value": {"name": "total_purchase_value", "description": "The total value of purchase events that occurred in your app that were recorded by your measurement partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_sales_lead_value": {"name": "total_sales_lead_value", "description": "The monetary worth or potential value assigned to a lead generated through ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversion_value": {"name": "total_conversion_value", "description": "The accumulated value of `total_purchase_value` and `total_sales_lead_value`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_cpc": {"name": "daily_cpc", "description": "The average amount of money you've spent on a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_cpm": {"name": "daily_cpm", "description": "The average amount of money you've spent per 1,000 impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_ctr": {"name": "daily_ctr", "description": "The percentage of times people saw your ad and performed a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.7728057, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__ad_group_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\nwith hourly as (\n \n select *\n from {{ ref('stg_tiktok_ads__ad_group_report_hourly') }}\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_tiktok_ads__ad_group_history') }}\n where is_most_recent_record\n), \n\nadvertiser as (\n\n select *\n from {{ ref('stg_tiktok_ads__advertiser') }}\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_tiktok_ads__campaign_history') }}\n where is_most_recent_record\n), \n\naggregated as (\n\n select\n hourly.source_relation,\n cast(hourly.stat_time_hour as date) as date_day,\n ad_groups.advertiser_id,\n advertiser.advertiser_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n hourly.ad_group_id,\n ad_groups.ad_group_name,\n advertiser.currency, \n ad_groups.category,\n ad_groups.gender,\n ad_groups.audience_type,\n ad_groups.budget,\n sum(hourly.impressions) as impressions,\n sum(hourly.clicks) as clicks,\n sum(hourly.spend) as spend,\n sum(hourly.reach) as reach,\n sum(hourly.conversion) as conversion,\n sum(hourly.likes) as likes,\n sum(hourly.comments) as comments,\n sum(hourly.shares) as shares,\n sum(hourly.profile_visits) as profile_visits,\n sum(hourly.follows) as follows,\n sum(hourly.video_watched_2_s) as video_watched_2_s,\n sum(hourly.video_watched_6_s) as video_watched_6_s,\n sum(hourly.video_views_p_25) as video_views_p_25,\n sum(hourly.video_views_p_50) as video_views_p_50, \n sum(hourly.video_views_p_75) as video_views_p_75,\n sum(hourly.real_time_conversion) as real_time_conversion,\n sum(hourly.total_purchase_value) as total_purchase_value,\n sum(hourly.total_sales_lead_value) as total_sales_lead_value, \n sum(hourly.total_purchase_value + hourly.total_sales_lead_value) as total_conversion_value, \n sum(hourly.spend)/nullif(sum(hourly.clicks),0) as daily_cpc,\n (sum(hourly.spend)/nullif(sum(hourly.impressions),0))*1000 as daily_cpm,\n (sum(hourly.clicks)/nullif(sum(hourly.impressions),0))*100 as daily_ctr\n \n {{ tiktok_ads_persist_pass_through_columns(pass_through_variable='tiktok_ads__ad_group_hourly_passthrough_metrics', identifier='hourly', transform='sum', coalesce_with=0, exclude_fields=['real_time_conversion','total_purchase_value','total_sales_lead_value']) }} \n\n from hourly\n left join ad_groups \n on hourly.ad_group_id = ad_groups.ad_group_id\n and hourly.source_relation = ad_groups.source_relation\n left join advertiser\n on ad_groups.advertiser_id = advertiser.advertiser_id\n and ad_groups.source_relation = advertiser.source_relation\n left join campaigns\n on ad_groups.campaign_id = campaigns.campaign_id\n and ad_groups.source_relation = campaigns.source_relation\n {{ dbt_utils.group_by(13) }}\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__ad_group_report_hourly", "package": null, "version": null}, {"name": "stg_tiktok_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_tiktok_ads__advertiser", "package": null, "version": null}, {"name": "stg_tiktok_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.tiktok_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly", "model.tiktok_ads.stg_tiktok_ads__ad_group_history", "model.tiktok_ads.stg_tiktok_ads__advertiser", "model.tiktok_ads.stg_tiktok_ads__campaign_history"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads__ad_group_report.sql", "compiled": true, "compiled_code": "\n\nwith hourly as (\n \n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_group_report_hourly\"\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_group_history\"\n where is_most_recent_record\n), \n\nadvertiser as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__advertiser\"\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_history\"\n where is_most_recent_record\n), \n\naggregated as (\n\n select\n hourly.source_relation,\n cast(hourly.stat_time_hour as date) as date_day,\n ad_groups.advertiser_id,\n advertiser.advertiser_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n hourly.ad_group_id,\n ad_groups.ad_group_name,\n advertiser.currency, \n ad_groups.category,\n ad_groups.gender,\n ad_groups.audience_type,\n ad_groups.budget,\n sum(hourly.impressions) as impressions,\n sum(hourly.clicks) as clicks,\n sum(hourly.spend) as spend,\n sum(hourly.reach) as reach,\n sum(hourly.conversion) as conversion,\n sum(hourly.likes) as likes,\n sum(hourly.comments) as comments,\n sum(hourly.shares) as shares,\n sum(hourly.profile_visits) as profile_visits,\n sum(hourly.follows) as follows,\n sum(hourly.video_watched_2_s) as video_watched_2_s,\n sum(hourly.video_watched_6_s) as video_watched_6_s,\n sum(hourly.video_views_p_25) as video_views_p_25,\n sum(hourly.video_views_p_50) as video_views_p_50, \n sum(hourly.video_views_p_75) as video_views_p_75,\n sum(hourly.real_time_conversion) as real_time_conversion,\n sum(hourly.total_purchase_value) as total_purchase_value,\n sum(hourly.total_sales_lead_value) as total_sales_lead_value, \n sum(hourly.total_purchase_value + hourly.total_sales_lead_value) as total_conversion_value, \n sum(hourly.spend)/nullif(sum(hourly.clicks),0) as daily_cpc,\n (sum(hourly.spend)/nullif(sum(hourly.impressions),0))*1000 as daily_cpm,\n (sum(hourly.clicks)/nullif(sum(hourly.impressions),0))*100 as daily_ctr\n \n \n\n\n\n \n\n from hourly\n left join ad_groups \n on hourly.ad_group_id = ad_groups.ad_group_id\n and hourly.source_relation = ad_groups.source_relation\n left join advertiser\n on ad_groups.advertiser_id = advertiser.advertiser_id\n and ad_groups.source_relation = advertiser.source_relation\n left join campaigns\n on ad_groups.campaign_id = campaigns.campaign_id\n and ad_groups.source_relation = campaigns.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.tiktok_ads__campaign_country_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "tiktok_ads__campaign_country_report", "resource_type": "model", "package_name": "tiktok_ads", "path": "tiktok_ads__campaign_country_report.sql", "original_file_path": "models/tiktok_ads__campaign_country_report.sql", "unique_id": "model.tiktok_ads.tiktok_ads__campaign_country_report", "fqn": ["tiktok_ads", "tiktok_ads__campaign_country_report"], "alias": "tiktok_ads__campaign_country_report", "checksum": {"name": "sha256", "checksum": "d087032d06148805138428857c2f6e6f7336f1c048d0ec36f2ae8b7a0aa89ef2"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of a campaign at the country/geographic region level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The reporting date for the campaign data (in YYYY-MM-DD format).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Unique identifier for the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "Name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_type": {"name": "campaign_type", "description": "Type/category of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Timestamp when the campaign was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country_code": {"name": "country_code", "description": "Audience country or region code.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "Unique identifier for the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_name": {"name": "advertiser_name", "description": "Name of the advertiser account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Currency in which spend and cost metrics are reported.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective_type": {"name": "objective_type", "description": "Objective type of the campaign (e.g., conversions, traffic).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Current status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "split_test_variable": {"name": "split_test_variable", "description": "Split Test variables. Optional values; TARGETING, BIDDING_OPTIMIZATION, CREATIVE.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget": {"name": "budget", "description": "Total budget allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_mode": {"name": "budget_mode", "description": "Budget pacing mode (e.g., daily, total).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion": {"name": "conversion", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_cpc": {"name": "daily_cpc", "description": "The average amount of money you've spent on a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_cpm": {"name": "daily_cpm", "description": "The average amount of money you've spent per 1,000 impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_ctr": {"name": "daily_ctr", "description": "The percentage of times people saw your ad and performed a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion": {"name": "real_time_conversion", "description": "Number of times your ad resulted in the optimization event you selected.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country_name": {"name": "country_name", "description": "Human-readable name of the geographic region associated with the country code.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "location_id": {"name": "location_id", "description": "TikTok's identifier for the country-level location record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "parent_location_id": {"name": "parent_location_id", "description": "Identifier of the parent region, enabling hierarchical rollups (city to province to country).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "has_support_below_18": {"name": "has_support_below_18", "description": "Whether the location supports targeting users under 18. Used for compliance with age-restricted ad targeting rules.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.7813675, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__campaign_country_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true) and var('tiktok_ads__using_campaign_country_report', true)) }}\n\nwith country_report as (\n \n select *\n from {{ ref('stg_tiktok_ads__campaign_country_report') }}\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_tiktok_ads__campaign_history') }}\n where is_most_recent_record\n), \n\nadvertiser as (\n\n select *\n from {{ ref('stg_tiktok_ads__advertiser') }}\n),\n\n{% if var('tiktok_ads__using_location', true) %}\nlocations as (\n\n select *\n from {{ ref('stg_tiktok_ads__location') }}\n where upper(region_level) = 'COUNTRY'\n),\n{% endif %}\n\naggregated as (\n\n select\n country_report.source_relation,\n country_report.stat_time_day as date_day,\n country_report.campaign_id,\n campaigns.campaign_name,\n campaigns.campaign_type,\n campaigns.created_at,\n country_report.country_code,\n advertiser.advertiser_id,\n advertiser.advertiser_name,\n advertiser.currency,\n campaigns.objective_type,\n campaigns.status,\n campaigns.split_test_variable,\n campaigns.budget,\n campaigns.budget_mode,\n {% if var('tiktok_ads__using_location', true) %}\n locations.region_name as country_name,\n locations.location_id,\n locations.parent_location_id,\n locations.has_support_below_18,\n {% endif %}\n sum(country_report.clicks) as clicks,\n sum(country_report.impressions) as impressions,\n sum(country_report.spend) as spend,\n sum(country_report.conversion) as conversion,\n sum(country_report.spend)/nullif(sum(country_report.clicks),0) as daily_cpc,\n (sum(country_report.spend)/nullif(sum(country_report.impressions),0))*1000 as daily_cpm,\n (sum(country_report.clicks)/nullif(sum(country_report.impressions),0))*100 as daily_ctr,\n sum(country_report.real_time_conversion) as real_time_conversion\n\n {{ tiktok_ads_persist_pass_through_columns(pass_through_variable='tiktok_ads__campaign_country_report_passthrough_metrics', identifier='country_report', transform='sum', coalesce_with=0) }} \n\n from country_report\n left join campaigns\n on country_report.campaign_id = campaigns.campaign_id\n and country_report.source_relation = campaigns.source_relation\n left join advertiser\n on campaigns.advertiser_id = advertiser.advertiser_id\n and campaigns.source_relation = advertiser.source_relation\n {% if var('tiktok_ads__using_location', true) %}\n left join locations\n on country_report.country_code = locations.country_code\n and campaigns.advertiser_id = locations.advertiser_id\n and country_report.source_relation = locations.source_relation\n {% endif %}\n\n {{ dbt_utils.group_by(n=15 + (4 if var('tiktok_ads__using_location', true) else 0)) }}\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__campaign_country_report", "package": null, "version": null}, {"name": "stg_tiktok_ads__campaign_history", "package": null, "version": null}, {"name": "stg_tiktok_ads__advertiser", "package": null, "version": null}, {"name": "stg_tiktok_ads__location", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.tiktok_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__campaign_country_report", "model.tiktok_ads.stg_tiktok_ads__campaign_history", "model.tiktok_ads.stg_tiktok_ads__advertiser", "model.tiktok_ads.stg_tiktok_ads__location"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads__campaign_country_report.sql", "compiled": true, "compiled_code": "\n\nwith country_report as (\n \n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_country_report\"\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_history\"\n where is_most_recent_record\n), \n\nadvertiser as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__advertiser\"\n),\n\n\nlocations as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__location\"\n where upper(region_level) = 'COUNTRY'\n),\n\n\naggregated as (\n\n select\n country_report.source_relation,\n country_report.stat_time_day as date_day,\n country_report.campaign_id,\n campaigns.campaign_name,\n campaigns.campaign_type,\n campaigns.created_at,\n country_report.country_code,\n advertiser.advertiser_id,\n advertiser.advertiser_name,\n advertiser.currency,\n campaigns.objective_type,\n campaigns.status,\n campaigns.split_test_variable,\n campaigns.budget,\n campaigns.budget_mode,\n \n locations.region_name as country_name,\n locations.location_id,\n locations.parent_location_id,\n locations.has_support_below_18,\n \n sum(country_report.clicks) as clicks,\n sum(country_report.impressions) as impressions,\n sum(country_report.spend) as spend,\n sum(country_report.conversion) as conversion,\n sum(country_report.spend)/nullif(sum(country_report.clicks),0) as daily_cpc,\n (sum(country_report.spend)/nullif(sum(country_report.impressions),0))*1000 as daily_cpm,\n (sum(country_report.clicks)/nullif(sum(country_report.impressions),0))*100 as daily_ctr,\n sum(country_report.real_time_conversion) as real_time_conversion\n\n \n\n\n\n \n\n from country_report\n left join campaigns\n on country_report.campaign_id = campaigns.campaign_id\n and country_report.source_relation = campaigns.source_relation\n left join advertiser\n on campaigns.advertiser_id = advertiser.advertiser_id\n and campaigns.source_relation = advertiser.source_relation\n \n left join locations\n on country_report.country_code = locations.country_code\n and campaigns.advertiser_id = locations.advertiser_id\n and country_report.source_relation = locations.source_relation\n \n\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.tiktok_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "tiktok_ads__campaign_report", "resource_type": "model", "package_name": "tiktok_ads", "path": "tiktok_ads__campaign_report.sql", "original_file_path": "models/tiktok_ads__campaign_report.sql", "unique_id": "model.tiktok_ads.tiktok_ads__campaign_report", "fqn": ["tiktok_ads", "tiktok_ads__campaign_report"], "alias": "tiktok_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "e75c84c275540e79dfd7403d86098d7ff4dfff6d8f009ed93f6cce561564de08"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance at the campaign level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "Day of record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Advertiser's currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "Advertiser ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_name": {"name": "advertiser_name", "description": "Advertiser name", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reach": {"name": "reach", "description": "The number of unique users who saw your ads at least once. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion": {"name": "conversion", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "likes": {"name": "likes", "description": "The number of likes your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "comments": {"name": "comments", "description": "The number of comments your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "The number of shares that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_visits": {"name": "profile_visits", "description": "The number of profile visits that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "follows": {"name": "follows", "description": "The number of follows that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_2_s": {"name": "video_watched_2_s", "description": "The number of times your video played for at least 2 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_6_s": {"name": "video_watched_6_s", "description": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_25": {"name": "video_views_p_25", "description": "The number of times your video was played at 25% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_50": {"name": "video_views_p_50", "description": "The number of times your video was played at 50% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_75": {"name": "video_views_p_75", "description": "The number of times your video was played at 75% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion": {"name": "real_time_conversion", "description": "Number of times your ad resulted in the optimization event you selected.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_purchase_value": {"name": "total_purchase_value", "description": "The total value of purchase events that occurred in your app that were recorded by your measurement partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_sales_lead_value": {"name": "total_sales_lead_value", "description": "The monetary worth or potential value assigned to a lead generated through ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_conversion_value": {"name": "total_conversion_value", "description": "The accumulated value of `total_purchase_value` and `total_sales_lead_value`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_cpc": {"name": "daily_cpc", "description": "The average amount of money you've spent on a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_cpm": {"name": "daily_cpm", "description": "The average amount of money you've spent per 1,000 impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_ctr": {"name": "daily_ctr", "description": "The percentage of times people saw your ad and performed a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.7747786, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\nwith hourly as (\n \n select *\n from {{ ref('stg_tiktok_ads__campaign_report_hourly') }}\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_tiktok_ads__campaign_history') }}\n where is_most_recent_record\n), \n\nadvertiser as (\n\n select *\n from {{ ref('stg_tiktok_ads__advertiser') }}\n), \n\naggregated as (\n\n select\n hourly.source_relation,\n cast(hourly.stat_time_hour as date) as date_day,\n advertiser.advertiser_id,\n advertiser.advertiser_name,\n hourly.campaign_id,\n campaigns.campaign_name,\n advertiser.currency,\n sum(hourly.impressions) as impressions,\n sum(hourly.clicks) as clicks,\n sum(hourly.spend) as spend,\n sum(hourly.reach) as reach,\n sum(hourly.conversion) as conversion,\n sum(hourly.likes) as likes,\n sum(hourly.comments) as comments,\n sum(hourly.shares) as shares,\n sum(hourly.profile_visits) as profile_visits,\n sum(hourly.follows) as follows,\n sum(hourly.video_watched_2_s) as video_watched_2_s,\n sum(hourly.video_watched_6_s) as video_watched_6_s,\n sum(hourly.video_views_p_25) as video_views_p_25,\n sum(hourly.video_views_p_50) as video_views_p_50, \n sum(hourly.video_views_p_75) as video_views_p_75,\n sum(hourly.real_time_conversion) as real_time_conversion,\n sum(hourly.total_purchase_value) as total_purchase_value,\n sum(hourly.total_sales_lead_value) as total_sales_lead_value,\n sum(hourly.total_purchase_value + hourly.total_sales_lead_value) as total_conversion_value,\n sum(hourly.spend)/nullif(sum(hourly.clicks),0) as daily_cpc,\n (sum(hourly.spend)/nullif(sum(hourly.impressions),0))*1000 as daily_cpm,\n (sum(hourly.clicks)/nullif(sum(hourly.impressions),0))*100 as daily_ctr\n\n {{ tiktok_ads_persist_pass_through_columns(pass_through_variable='tiktok_ads__campaign_hourly_passthrough_metrics', identifier='hourly', transform='sum', coalesce_with=0, exclude_fields=['real_time_conversion','total_purchase_value','total_sales_lead_value']) }} \n\n from hourly\n left join campaigns\n on hourly.campaign_id = campaigns.campaign_id\n and hourly.source_relation = campaigns.source_relation\n left join advertiser\n on campaigns.advertiser_id = advertiser.advertiser_id\n and campaigns.source_relation = advertiser.source_relation\n {{ dbt_utils.group_by(7) }}\n\n)\n\nselect *\nfrom aggregated", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__campaign_report_hourly", "package": null, "version": null}, {"name": "stg_tiktok_ads__campaign_history", "package": null, "version": null}, {"name": "stg_tiktok_ads__advertiser", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.tiktok_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly", "model.tiktok_ads.stg_tiktok_ads__campaign_history", "model.tiktok_ads.stg_tiktok_ads__advertiser"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith hourly as (\n \n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_report_hourly\"\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_history\"\n where is_most_recent_record\n), \n\nadvertiser as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__advertiser\"\n), \n\naggregated as (\n\n select\n hourly.source_relation,\n cast(hourly.stat_time_hour as date) as date_day,\n advertiser.advertiser_id,\n advertiser.advertiser_name,\n hourly.campaign_id,\n campaigns.campaign_name,\n advertiser.currency,\n sum(hourly.impressions) as impressions,\n sum(hourly.clicks) as clicks,\n sum(hourly.spend) as spend,\n sum(hourly.reach) as reach,\n sum(hourly.conversion) as conversion,\n sum(hourly.likes) as likes,\n sum(hourly.comments) as comments,\n sum(hourly.shares) as shares,\n sum(hourly.profile_visits) as profile_visits,\n sum(hourly.follows) as follows,\n sum(hourly.video_watched_2_s) as video_watched_2_s,\n sum(hourly.video_watched_6_s) as video_watched_6_s,\n sum(hourly.video_views_p_25) as video_views_p_25,\n sum(hourly.video_views_p_50) as video_views_p_50, \n sum(hourly.video_views_p_75) as video_views_p_75,\n sum(hourly.real_time_conversion) as real_time_conversion,\n sum(hourly.total_purchase_value) as total_purchase_value,\n sum(hourly.total_sales_lead_value) as total_sales_lead_value,\n sum(hourly.total_purchase_value + hourly.total_sales_lead_value) as total_conversion_value,\n sum(hourly.spend)/nullif(sum(hourly.clicks),0) as daily_cpc,\n (sum(hourly.spend)/nullif(sum(hourly.impressions),0))*1000 as daily_cpm,\n (sum(hourly.clicks)/nullif(sum(hourly.impressions),0))*100 as daily_ctr\n\n \n\n\n\n \n\n from hourly\n left join campaigns\n on hourly.campaign_id = campaigns.campaign_id\n and hourly.source_relation = campaigns.source_relation\n left join advertiser\n on campaigns.advertiser_id = advertiser.advertiser_id\n and campaigns.source_relation = advertiser.source_relation\n group by 1,2,3,4,5,6,7\n\n)\n\nselect *\nfrom aggregated", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__campaign_report_hourly", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/stg_tiktok_ads__campaign_report_hourly.sql", "original_file_path": "models/staging/stg_tiktok_ads__campaign_report_hourly.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly", "fqn": ["tiktok_ads", "staging", "stg_tiktok_ads__campaign_report_hourly"], "alias": "stg_tiktok_ads__campaign_report_hourly", "checksum": {"name": "sha256", "checksum": "470f2426231bd6a8ae7e3aaddb73990f6a291cbf4d808eb94b98da7173ae0028"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represent data for each campaign for each hour.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "Campaign id", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "stat_time_hour": {"name": "stat_time_hour", "description": "Hour of activity", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_conversion": {"name": "cost_per_conversion", "description": "The average amount of money you've spent on a conversion. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpc": {"name": "cpc", "description": "The average amount of money you've spent on a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_play_actions": {"name": "video_play_actions", "description": "The number of times your video starts to play. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_rate": {"name": "conversion_rate", "description": "The percentage of results you received out of all the clicks of your ads. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_75": {"name": "video_views_p_75", "description": "The number of times your video was played at 75% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_50": {"name": "video_views_p_50", "description": "The number of times your video was played at 50% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of times your ads were on screen.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "comments": {"name": "comments", "description": "The number of comments your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion": {"name": "conversion", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "The number of shares your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks on your ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_25": {"name": "video_views_p_25", "description": "The number of times your video was played at 25% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reach": {"name": "reach", "description": "The number of unique users who saw your ads at least once. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "average_video_play": {"name": "average_video_play", "description": "The average time your video was played per single video view, including any time spent replaying the video.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "average_video_play_per_user": {"name": "average_video_play_per_user", "description": "The average time per user your video was played per single video view, including any time spent replaying the video.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_visits": {"name": "profile_visits", "description": "The number of profile visits the ad drove during the campaign. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpm": {"name": "cpm", "description": "The average amount of money you've spent per 1,000 impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ctr": {"name": "ctr", "description": "The percentage of times people saw your ad and performed a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_2_s": {"name": "video_watched_2_s", "description": "The number of times your video played for at least 2 seconds. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "follows": {"name": "follows", "description": "The number of new followers that were gained within 1 day of a user seeing a paid ad. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_6_s": {"name": "video_watched_6_s", "description": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The estimated total amount of money you've spent on your campaign, ad group or ad during its schedule.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "likes": {"name": "likes", "description": "The number of likes your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion": {"name": "real_time_conversion", "description": "Number of times your ad resulted in the optimization event you selected.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_purchase_value": {"name": "total_purchase_value", "description": "The total value of purchase events that occurred in your app that were recorded by your measurement partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_sales_lead_value": {"name": "total_sales_lead_value", "description": "The monetary worth or potential value assigned to a lead generated through ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/staging/stg_tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.8378103, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_report_hourly\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_tiktok_ads__campaign_report_hourly_tmp') }}\n), \n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_tiktok_ads__campaign_report_hourly_tmp')),\n staging_columns=get_campaign_report_hourly_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='tiktok_ads') }}\n\n from base\n), \n\nfinal as (\n\n select\n source_relation, \n campaign_id,\n cast(stat_time_hour as {{ dbt.type_timestamp() }}) as stat_time_hour,\n cpc, \n cpm,\n ctr,\n coalesce(impressions, 0) as impressions,\n coalesce(clicks, 0) as clicks, \n coalesce(spend, 0) as spend, \n reach,\n coalesce(conversion, 0) as conversion,\n cost_per_conversion,\n conversion_rate,\n coalesce(likes, 0) as likes,\n coalesce(comments, 0) as comments,\n coalesce(shares, 0) as shares,\n coalesce(profile_visits, 0) as profile_visits,\n coalesce(follows, 0) as follows,\n coalesce(video_play_actions, 0) as video_play_actions,\n coalesce(video_watched_2_s, 0) as video_watched_2_s,\n coalesce(video_watched_6_s, 0) as video_watched_6_s,\n coalesce(video_views_p_25, 0) as video_views_p_25,\n coalesce(video_views_p_50, 0) as video_views_p_50,\n coalesce(video_views_p_75, 0) as video_views_p_75,\n average_video_play,\n average_video_play_per_user,\n coalesce(real_time_conversion, 0) as real_time_conversion,\n coalesce(total_purchase_value, 0) as total_purchase_value,\n coalesce(total_sales_lead_value, 0) as total_sales_lead_value\n\n {{ tiktok_ads_fill_pass_through_columns(pass_through_fields=var('tiktok_ads__campaign_hourly_passthrough_metrics'), except_fields=[\"real_time_conversion\", \"total_purchase_value\", \"total_sales_lead_value\"]) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__campaign_report_hourly_tmp", "package": null, "version": null}, {"name": "stg_tiktok_ads__campaign_report_hourly_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.get_campaign_report_hourly_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.tiktok_ads.tiktok_ads_fill_pass_through_columns"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly_tmp"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads__campaign_report_hourly.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_report_hourly_tmp\"\n), \n\nfields as (\n\n select\n \n campaign_id as campaign_id,\n average_video_play as average_video_play,\n average_video_play_per_user as average_video_play_per_user,\n clicks as clicks,\n comments as comments,\n conversion as conversion,\n conversion_rate as conversion_rate,\n cost_per_conversion as cost_per_conversion,\n cpc as cpc,\n cpm as cpm,\n ctr as ctr,\n follows as follows,\n impressions as impressions,\n likes as likes,\n profile_visits as profile_visits,\n reach as reach,\n real_time_conversion as real_time_conversion,\n shares as shares,\n spend as spend,\n stat_time_hour as stat_time_hour,\n total_purchase_value as total_purchase_value,\n total_sales_lead_value as total_sales_lead_value,\n video_play_actions as video_play_actions,\n video_views_p_25 as video_views_p_25,\n video_views_p_50 as video_views_p_50,\n video_views_p_75 as video_views_p_75,\n video_watched_2_s as video_watched_2_s,\n video_watched_6_s as video_watched_6_s\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n), \n\nfinal as (\n\n select\n source_relation, \n campaign_id,\n cast(stat_time_hour as timestamp) as stat_time_hour,\n cpc, \n cpm,\n ctr,\n coalesce(impressions, 0) as impressions,\n coalesce(clicks, 0) as clicks, \n coalesce(spend, 0) as spend, \n reach,\n coalesce(conversion, 0) as conversion,\n cost_per_conversion,\n conversion_rate,\n coalesce(likes, 0) as likes,\n coalesce(comments, 0) as comments,\n coalesce(shares, 0) as shares,\n coalesce(profile_visits, 0) as profile_visits,\n coalesce(follows, 0) as follows,\n coalesce(video_play_actions, 0) as video_play_actions,\n coalesce(video_watched_2_s, 0) as video_watched_2_s,\n coalesce(video_watched_6_s, 0) as video_watched_6_s,\n coalesce(video_views_p_25, 0) as video_views_p_25,\n coalesce(video_views_p_50, 0) as video_views_p_50,\n coalesce(video_views_p_75, 0) as video_views_p_75,\n average_video_play,\n average_video_play_per_user,\n coalesce(real_time_conversion, 0) as real_time_conversion,\n coalesce(total_purchase_value, 0) as total_purchase_value,\n coalesce(total_sales_lead_value, 0) as total_sales_lead_value\n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_group_report_hourly", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/stg_tiktok_ads__ad_group_report_hourly.sql", "original_file_path": "models/staging/stg_tiktok_ads__ad_group_report_hourly.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly", "fqn": ["tiktok_ads", "staging", "stg_tiktok_ads__ad_group_report_hourly"], "alias": "stg_tiktok_ads__ad_group_report_hourly", "checksum": {"name": "sha256", "checksum": "54901d7642fa03ed211b240bcde6e04f7868eb5e6141e84148096046193918b1"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents data for each ad group for each hour.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group id", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "stat_time_hour": {"name": "stat_time_hour", "description": "Hour of activity", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_conversion": {"name": "cost_per_conversion", "description": "The average amount of money you've spent on a conversion. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpc": {"name": "cpc", "description": "The average amount of money you've spent on a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_play_actions": {"name": "video_play_actions", "description": "The number of times your video starts to play. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_rate": {"name": "conversion_rate", "description": "The percentage of results you received out of all the clicks of your ads. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_75": {"name": "video_views_p_75", "description": "The number of times your video was played at 75% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_50": {"name": "video_views_p_50", "description": "The number of times your video was played at 50% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of times your ads were on screen.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "comments": {"name": "comments", "description": "The number of comments your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion": {"name": "conversion", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "The number of shares your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks on your ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_25": {"name": "video_views_p_25", "description": "The number of times your video was played at 25% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reach": {"name": "reach", "description": "The number of unique users who saw your ads at least once. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "average_video_play": {"name": "average_video_play", "description": "The average time your video was played per single video view, including any time spent replaying the video.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "average_video_play_per_user": {"name": "average_video_play_per_user", "description": "The average time per user your video was played per single video view, including any time spent replaying the video.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_visits": {"name": "profile_visits", "description": "The number of profile visits the ad drove during the campaign. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpm": {"name": "cpm", "description": "The average amount of money you've spent per 1,000 impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ctr": {"name": "ctr", "description": "The percentage of times people saw your ad and performed a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_2_s": {"name": "video_watched_2_s", "description": "The number of times your video played for at least 2 seconds. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "follows": {"name": "follows", "description": "The number of new followers that were gained within 1 day of a user seeing a paid ad. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_6_s": {"name": "video_watched_6_s", "description": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The estimated total amount of money you've spent on your campaign, ad group or ad during its schedule.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "likes": {"name": "likes", "description": "The number of likes your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion": {"name": "real_time_conversion", "description": "Number of times your ad resulted in the optimization event you selected.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_purchase_value": {"name": "total_purchase_value", "description": "The total value of purchase events that occurred in your app that were recorded by your measurement partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_sales_lead_value": {"name": "total_sales_lead_value", "description": "The monetary worth or potential value assigned to a lead generated through ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/staging/stg_tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.8358865, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_group_report_hourly\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_tiktok_ads__ad_group_report_hourly_tmp') }}\n), \n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_tiktok_ads__ad_group_report_hourly_tmp')),\n staging_columns=get_ad_group_report_hourly_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='tiktok_ads') }}\n\n from base\n), \n\nfinal as (\n\n select\n source_relation, \n adgroup_id as ad_group_id,\n cast(stat_time_hour as {{ dbt.type_timestamp() }}) as stat_time_hour, \n cpc, \n cpm, \n ctr, \n coalesce(impressions, 0) as impressions,\n coalesce(clicks, 0) as clicks, \n coalesce(spend, 0) as spend, \n coalesce(reach, 0) as reach, \n coalesce(conversion, 0) as conversion, \n cost_per_conversion, \n conversion_rate, \n coalesce(likes, 0) as likes,\n coalesce(comments, 0) as comments,\n coalesce(shares, 0) as shares,\n coalesce(profile_visits, 0) as profile_visits,\n coalesce(follows, 0) as follows,\n coalesce(video_play_actions, 0) as video_play_actions,\n coalesce(video_watched_2_s, 0) as video_watched_2_s,\n coalesce(video_watched_6_s, 0) as video_watched_6_s,\n coalesce(video_views_p_25, 0) as video_views_p_25,\n coalesce(video_views_p_50, 0) as video_views_p_50,\n coalesce(video_views_p_75, 0) as video_views_p_75,\n average_video_play, \n average_video_play_per_user,\n coalesce(real_time_conversion, 0) as real_time_conversion,\n coalesce(total_purchase_value, 0) as total_purchase_value,\n coalesce(total_sales_lead_value, 0) as total_sales_lead_value\n\n {{ tiktok_ads_fill_pass_through_columns(pass_through_fields=var('tiktok_ads__ad_group_hourly_passthrough_metrics'), except_fields=[\"real_time_conversion\", \"total_purchase_value\", \"total_sales_lead_value\"]) }}\n\n from fields\n) \n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__ad_group_report_hourly_tmp", "package": null, "version": null}, {"name": "stg_tiktok_ads__ad_group_report_hourly_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.get_ad_group_report_hourly_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.tiktok_ads.tiktok_ads_fill_pass_through_columns"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly_tmp"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads__ad_group_report_hourly.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_group_report_hourly_tmp\"\n), \n\nfields as (\n\n select\n \n adgroup_id as adgroup_id,\n average_video_play as average_video_play,\n average_video_play_per_user as average_video_play_per_user,\n clicks as clicks,\n comments as comments,\n conversion as conversion,\n conversion_rate as conversion_rate,\n cost_per_conversion as cost_per_conversion,\n cpc as cpc,\n cpm as cpm,\n ctr as ctr,\n follows as follows,\n impressions as impressions,\n likes as likes,\n profile_visits as profile_visits,\n reach as reach,\n real_time_conversion as real_time_conversion,\n shares as shares,\n spend as spend,\n stat_time_hour as stat_time_hour,\n total_purchase_value as total_purchase_value,\n total_sales_lead_value as total_sales_lead_value,\n video_play_actions as video_play_actions,\n video_views_p_25 as video_views_p_25,\n video_views_p_50 as video_views_p_50,\n video_views_p_75 as video_views_p_75,\n video_watched_2_s as video_watched_2_s,\n video_watched_6_s as video_watched_6_s\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n), \n\nfinal as (\n\n select\n source_relation, \n adgroup_id as ad_group_id,\n cast(stat_time_hour as timestamp) as stat_time_hour, \n cpc, \n cpm, \n ctr, \n coalesce(impressions, 0) as impressions,\n coalesce(clicks, 0) as clicks, \n coalesce(spend, 0) as spend, \n coalesce(reach, 0) as reach, \n coalesce(conversion, 0) as conversion, \n cost_per_conversion, \n conversion_rate, \n coalesce(likes, 0) as likes,\n coalesce(comments, 0) as comments,\n coalesce(shares, 0) as shares,\n coalesce(profile_visits, 0) as profile_visits,\n coalesce(follows, 0) as follows,\n coalesce(video_play_actions, 0) as video_play_actions,\n coalesce(video_watched_2_s, 0) as video_watched_2_s,\n coalesce(video_watched_6_s, 0) as video_watched_6_s,\n coalesce(video_views_p_25, 0) as video_views_p_25,\n coalesce(video_views_p_50, 0) as video_views_p_50,\n coalesce(video_views_p_75, 0) as video_views_p_75,\n average_video_play, \n average_video_play_per_user,\n coalesce(real_time_conversion, 0) as real_time_conversion,\n coalesce(total_purchase_value, 0) as total_purchase_value,\n coalesce(total_sales_lead_value, 0) as total_sales_lead_value\n\n \n\n\n\n\n\n from fields\n) \n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__campaign_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__campaign_history", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/stg_tiktok_ads__campaign_history.sql", "original_file_path": "models/staging/stg_tiktok_ads__campaign_history.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__campaign_history", "fqn": ["tiktok_ads", "staging", "stg_tiktok_ads__campaign_history"], "alias": "stg_tiktok_ads__campaign_history", "checksum": {"name": "sha256", "checksum": "4150c478d9bbb6b2eed471c77d81b6da4a4b0b09611c95bf468fe3819e19878a"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents data for each campaign.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Time the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "Advertiser ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_type": {"name": "campaign_type", "description": "Campaign Type, indicates the campaign is a regular campaign or iOS 14 campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "split_test_variable": {"name": "split_test_variable", "description": "Split Test variables. Optional values; TARGETING, BIDDING_OPTIMIZATION, CREATIVE.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget": {"name": "budget", "description": "Campaign budget", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_mode": {"name": "budget_mode", "description": "Budget type", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Time at which the campaign was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_new_structure": {"name": "is_new_structure", "description": "Whether the campaign is a new structure (for the same campaign, the structure of campaign, adgroups and ads are the same)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective_type": {"name": "objective_type", "description": "Advertising objective.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "opt_status": {"name": "opt_status", "description": "Operation status.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Campaign status.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Whether record is the most recent one for this particular grain.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/staging/stg_tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.8298104, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_tiktok_ads__campaign_history_tmp') }}\n), \n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_tiktok_ads__campaign_history_tmp')),\n staging_columns=get_campaign_history_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='tiktok_ads') }}\n\n from base\n), \n\nfinal as (\n\n select\n source_relation, \n campaign_id,\n cast(updated_at as {{ dbt.type_timestamp() }}) as updated_at,\n advertiser_id,\n campaign_name,\n campaign_type,\n split_test_variable,\n objective_type,\n status,\n budget,\n budget_mode,\n create_time as created_at,\n is_new_structure,\n row_number() over (partition by campaign_id {{ fivetran_utils.partition_by_source_relation(package_name='tiktok_ads') }} order by updated_at desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__campaign_history_tmp", "package": null, "version": null}, {"name": "stg_tiktok_ads__campaign_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.get_campaign_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__campaign_history_tmp"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads__campaign_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_history_tmp\"\n), \n\nfields as (\n\n select\n \n advertiser_id as advertiser_id,\n campaign_id as campaign_id,\n cast(null as TEXT) as campaign_name,\n cast(null as TEXT) as campaign_type,\n cast(null as TEXT) as split_test_variable,\n updated_at as updated_at,\n cast(null as TEXT) as objective_type,\n cast(null as TEXT) as status,\n cast(null as numeric(28,6)) as budget,\n cast(null as TEXT) as budget_mode,\n create_time as create_time,\n is_new_structure as is_new_structure\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n), \n\nfinal as (\n\n select\n source_relation, \n campaign_id,\n cast(updated_at as timestamp) as updated_at,\n advertiser_id,\n campaign_name,\n campaign_type,\n split_test_variable,\n objective_type,\n status,\n budget,\n budget_mode,\n create_time as created_at,\n is_new_structure,\n row_number() over (partition by campaign_id order by updated_at desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__ad_group_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_group_history", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/stg_tiktok_ads__ad_group_history.sql", "original_file_path": "models/staging/stg_tiktok_ads__ad_group_history.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_group_history", "fqn": ["tiktok_ads", "staging", "stg_tiktok_ads__ad_group_history"], "alias": "stg_tiktok_ads__ad_group_history", "checksum": {"name": "sha256", "checksum": "5676fd9b7fbbc245617ef817c360ada6ef3a839e76ad70686afe900ca8bcd942"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents data for each ad group.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Time the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "Advertiser ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "action_categories": {"name": "action_categories", "description": "IDs of the action categories (behaviors) that you want to target.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The Ad group's campaign ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "action_days": {"name": "action_days", "description": "Action days", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name. Character limit is 512 and cannot contain emoji.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "age_groups": {"name": "age_groups", "description": "Age groups you want to target.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "audience_type": {"name": "audience_type", "description": "Audience Type", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget": {"name": "budget", "description": "Ad budget. Returns 0.0 when Campaign Budget Optimization (budget_optimize_switch) is on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "category": {"name": "category", "description": "Ad group category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "display_name": {"name": "display_name", "description": "Display name of ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "interest_category": {"name": "interest_category", "description": "Interest classification. If the interest is specified, users that do not meet interest target will be excluded during delivery.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "frequency": {"name": "frequency", "description": "frequency, together with frequency_schedule, controls how often people see your ad (only available for REACH ads). For example, frequency = 2 frequency_schedule = 3 means \"show ads no more than twice every 3 day\".\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "frequency_schedule": {"name": "frequency_schedule", "description": "frequency, together with frequency, controls how often people see your ad (only available for REACH ads).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "gender": {"name": "gender", "description": "Gender that you want to target.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "landing_page_url": {"name": "landing_page_url", "description": "Landing page URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "languages": {"name": "languages", "description": "Codes of the languages that you want to target.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Whether record is the most recent one for this particular grain.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/staging/stg_tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.8255403, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_group_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_tiktok_ads__ad_group_history_tmp') }}\n), \n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_tiktok_ads__ad_group_history_tmp')),\n staging_columns=get_ad_group_history_columns()\n )\n }}\n\n \n {{ fivetran_utils.apply_source_relation(package_name='tiktok_ads') }}\n\n from base\n), \n\nfinal as (\n\n select\n source_relation,\n adgroup_id as ad_group_id,\n cast(updated_at as {{ dbt.type_timestamp() }}) as updated_at,\n advertiser_id,\n campaign_id,\n action_days,\n action_categories,\n adgroup_name as ad_group_name,\n age_groups,\n audience_type,\n budget,\n category,\n display_name,\n interest_category_v_2 as interest_category,\n frequency,\n frequency_schedule,\n gender,\n languages, \n landing_page_url,\n row_number() over (partition by adgroup_id {{ fivetran_utils.partition_by_source_relation(package_name='tiktok_ads') }} order by updated_at desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__ad_group_history_tmp", "package": null, "version": null}, {"name": "stg_tiktok_ads__ad_group_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.get_ad_group_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__ad_group_history_tmp"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads__ad_group_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_group_history_tmp\"\n), \n\nfields as (\n\n select\n \n action_days as action_days,\n adgroup_id as adgroup_id,\n adgroup_name as adgroup_name,\n advertiser_id as advertiser_id,\n audience_type as audience_type,\n budget as budget,\n campaign_id as campaign_id,\n category as category,\n display_name as display_name,\n frequency as frequency,\n frequency_schedule as frequency_schedule,\n gender as gender,\n landing_page_url as landing_page_url,\n updated_at as updated_at,\n interest_category_v_2 as interest_category_v_2,\n action_categories as action_categories,\n age_groups as age_groups,\n languages as languages\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n), \n\nfinal as (\n\n select\n source_relation,\n adgroup_id as ad_group_id,\n cast(updated_at as timestamp) as updated_at,\n advertiser_id,\n campaign_id,\n action_days,\n action_categories,\n adgroup_name as ad_group_name,\n age_groups,\n audience_type,\n budget,\n category,\n display_name,\n interest_category_v_2 as interest_category,\n frequency,\n frequency_schedule,\n gender,\n languages, \n landing_page_url,\n row_number() over (partition by adgroup_id order by updated_at desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_report_hourly", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/stg_tiktok_ads__ad_report_hourly.sql", "original_file_path": "models/staging/stg_tiktok_ads__ad_report_hourly.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly", "fqn": ["tiktok_ads", "staging", "stg_tiktok_ads__ad_report_hourly"], "alias": "stg_tiktok_ads__ad_report_hourly", "checksum": {"name": "sha256", "checksum": "cbf1e4e059485aabb414c2c80e2241f229e758f029ddaa25f72aeadf757569e1"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents data for each ad for each hour.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "ad_id": {"name": "ad_id", "description": "Ad id", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "stat_time_hour": {"name": "stat_time_hour", "description": "Hour of activity", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_conversion": {"name": "cost_per_conversion", "description": "The average amount of money you've spent on a conversion. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpc": {"name": "cpc", "description": "The average amount of money you've spent on a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_play_actions": {"name": "video_play_actions", "description": "The number of times your video starts to play. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_rate": {"name": "conversion_rate", "description": "The percentage of results you received out of all the clicks of your ads. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_75": {"name": "video_views_p_75", "description": "The number of times your video was played at 75% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_50": {"name": "video_views_p_50", "description": "The number of times your video was played at 50% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of times your ads were on screen.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "comments": {"name": "comments", "description": "The number of comments your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion": {"name": "conversion", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "The number of shares your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks on your ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_25": {"name": "video_views_p_25", "description": "The number of times your video was played at 25% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reach": {"name": "reach", "description": "The number of unique users who saw your ads at least once. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "average_video_play": {"name": "average_video_play", "description": "The average time your video was played per single video view, including any time spent replaying the video.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "average_video_play_per_user": {"name": "average_video_play_per_user", "description": "The average time per user your video was played per single video view, including any time spent replaying the video.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_visits": {"name": "profile_visits", "description": "The number of profile visits the ad drove during the campaign. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpm": {"name": "cpm", "description": "The average amount of money you've spent per 1,000 impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ctr": {"name": "ctr", "description": "The percentage of times people saw your ad and performed a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_2_s": {"name": "video_watched_2_s", "description": "The number of times your video played for at least 2 seconds. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "follows": {"name": "follows", "description": "The number of new followers that were gained within 1 day of a user seeing a paid ad. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_6_s": {"name": "video_watched_6_s", "description": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The estimated total amount of money you've spent on your campaign, ad group or ad during its schedule.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "likes": {"name": "likes", "description": "The number of likes your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion": {"name": "real_time_conversion", "description": "Number of times your ad resulted in the optimization event you selected.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_purchase_value": {"name": "total_purchase_value", "description": "The total value of purchase events that occurred in your app that were recorded by your measurement partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_sales_lead_value": {"name": "total_sales_lead_value", "description": "The monetary worth or potential value assigned to a lead generated through ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/staging/stg_tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.833949, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_report_hourly\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_tiktok_ads__ad_report_hourly_tmp') }}\n), \n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_tiktok_ads__ad_report_hourly_tmp')),\n staging_columns=get_ad_report_hourly_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='tiktok_ads') }}\n\n from base\n), \n\nfinal as (\n\n select\n source_relation, \n ad_id, \n cast(stat_time_hour as {{ dbt.type_timestamp() }}) as stat_time_hour, \n cpc, \n cpm, \n ctr, \n coalesce(impressions, 0) as impressions,\n coalesce(clicks, 0) as clicks, \n coalesce(spend, 0) as spend, \n reach, \n coalesce(conversion, 0) as conversion,\n cost_per_conversion, \n conversion_rate, \n coalesce(likes, 0) as likes,\n coalesce(comments, 0) as comments,\n coalesce(shares, 0) as shares,\n coalesce(profile_visits, 0) as profile_visits,\n coalesce(follows, 0) as follows,\n coalesce(video_play_actions, 0) as video_play_actions,\n coalesce(video_watched_2_s, 0) as video_watched_2_s,\n coalesce(video_watched_6_s, 0) as video_watched_6_s,\n coalesce(video_views_p_25, 0) as video_views_p_25,\n coalesce(video_views_p_50, 0) as video_views_p_50,\n coalesce(video_views_p_75, 0) as video_views_p_75,\n average_video_play, \n average_video_play_per_user,\n coalesce(real_time_conversion, 0) as real_time_conversion,\n coalesce(total_purchase_value, 0) as total_purchase_value,\n coalesce(total_sales_lead_value, 0) as total_sales_lead_value\n\n {{ tiktok_ads_fill_pass_through_columns(pass_through_fields=var('tiktok_ads__ad_hourly_passthrough_metrics'), except_fields=[\"real_time_conversion\", \"total_purchase_value\", \"total_sales_lead_value\"]) }}\n\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__ad_report_hourly_tmp", "package": null, "version": null}, {"name": "stg_tiktok_ads__ad_report_hourly_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.get_ad_report_hourly_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.tiktok_ads.tiktok_ads_fill_pass_through_columns"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__ad_report_hourly_tmp"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads__ad_report_hourly.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_report_hourly_tmp\"\n), \n\nfields as (\n\n select\n \n ad_id as ad_id,\n average_video_play as average_video_play,\n average_video_play_per_user as average_video_play_per_user,\n clicks as clicks,\n comments as comments,\n conversion as conversion,\n conversion_rate as conversion_rate,\n cost_per_conversion as cost_per_conversion,\n cpc as cpc,\n cpm as cpm,\n ctr as ctr,\n follows as follows,\n impressions as impressions,\n likes as likes,\n profile_visits as profile_visits,\n real_time_conversion as real_time_conversion,\n reach as reach,\n shares as shares,\n spend as spend,\n stat_time_hour as stat_time_hour,\n total_purchase_value as total_purchase_value,\n total_sales_lead_value as total_sales_lead_value,\n video_play_actions as video_play_actions,\n video_views_p_25 as video_views_p_25,\n video_views_p_50 as video_views_p_50,\n video_views_p_75 as video_views_p_75,\n video_watched_2_s as video_watched_2_s,\n video_watched_6_s as video_watched_6_s\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n), \n\nfinal as (\n\n select\n source_relation, \n ad_id, \n cast(stat_time_hour as timestamp) as stat_time_hour, \n cpc, \n cpm, \n ctr, \n coalesce(impressions, 0) as impressions,\n coalesce(clicks, 0) as clicks, \n coalesce(spend, 0) as spend, \n reach, \n coalesce(conversion, 0) as conversion,\n cost_per_conversion, \n conversion_rate, \n coalesce(likes, 0) as likes,\n coalesce(comments, 0) as comments,\n coalesce(shares, 0) as shares,\n coalesce(profile_visits, 0) as profile_visits,\n coalesce(follows, 0) as follows,\n coalesce(video_play_actions, 0) as video_play_actions,\n coalesce(video_watched_2_s, 0) as video_watched_2_s,\n coalesce(video_watched_6_s, 0) as video_watched_6_s,\n coalesce(video_views_p_25, 0) as video_views_p_25,\n coalesce(video_views_p_50, 0) as video_views_p_50,\n coalesce(video_views_p_75, 0) as video_views_p_75,\n average_video_play, \n average_video_play_per_user,\n coalesce(real_time_conversion, 0) as real_time_conversion,\n coalesce(total_purchase_value, 0) as total_purchase_value,\n coalesce(total_sales_lead_value, 0) as total_sales_lead_value\n\n \n\n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__location": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__location", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/stg_tiktok_ads__location.sql", "original_file_path": "models/staging/stg_tiktok_ads__location.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__location", "fqn": ["tiktok_ads", "staging", "stg_tiktok_ads__location"], "alias": "stg_tiktok_ads__location", "checksum": {"name": "sha256", "checksum": "06cd540070e809f43ea77d6287466e34bd102e06935b1c2b71fed36959084422"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Reference table of geographic regions and locations available for TikTok Ads targeting. Each record represents a location, such as a country, province, or city.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "location_id": {"name": "location_id", "description": "Unique identifier for the geographic region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "Advertiser ID associated with this location record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country_code": {"name": "country_code", "description": "Two-letter ISO country code for the location.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "region_name": {"name": "region_name", "description": "Human-readable name of the geographic region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "region_level": {"name": "region_level", "description": "Reporting granularity of the location (e.g. COUNTRY, PROVINCE, CITY).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "area_type": {"name": "area_type", "description": "Classification of the location, such as administrative region or media market.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "parent_location_id": {"name": "parent_location_id", "description": "Identifier of the parent region, enabling hierarchical rollups (city to state to country).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "has_support_below_18": {"name": "has_support_below_18", "description": "Whether the location supports targeting users under 18. Used for compliance with age-restricted ad targeting rules.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp indicating when the record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/staging/stg_tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.8410156, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__location\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true) and var('tiktok_ads__using_location', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_tiktok_ads__location_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_tiktok_ads__location_tmp')),\n staging_columns=get_location_columns()\n )\n }}\n\n {{ fivetran_utils.apply_source_relation(package_name='tiktok_ads') }}\n\n from base\n\n),\n\nfinal as (\n\n select\n source_relation,\n region_id as location_id,\n advertiser_id,\n country_code,\n region_name,\n region_level,\n area_type,\n parent_id as parent_location_id,\n support_below_18 as has_support_below_18,\n _fivetran_synced\n\n from fields\n\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__location_tmp", "package": null, "version": null}, {"name": "stg_tiktok_ads__location_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.get_location_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__location_tmp"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads__location.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__location_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n advertiser_id as advertiser_id,\n area_type as area_type,\n country_code as country_code,\n parent_id as parent_id,\n region_id as region_id,\n region_level as region_level,\n region_name as region_name,\n support_below_18 as support_below_18\n\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n\n),\n\nfinal as (\n\n select\n source_relation,\n region_id as location_id,\n advertiser_id,\n country_code,\n region_name,\n region_level,\n area_type,\n parent_id as parent_location_id,\n support_below_18 as has_support_below_18,\n _fivetran_synced\n\n from fields\n\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__ad_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_history", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/stg_tiktok_ads__ad_history.sql", "original_file_path": "models/staging/stg_tiktok_ads__ad_history.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_history", "fqn": ["tiktok_ads", "staging", "stg_tiktok_ads__ad_history"], "alias": "stg_tiktok_ads__ad_history", "checksum": {"name": "sha256", "checksum": "61d9b9aee00a11a281e60bdc013c5621b99cda848362f504aa7e827bb87abc0a"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents data for each ad.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "ad_id": {"name": "ad_id", "description": "Ad ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Time the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "Advertiser ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the `landing page url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_name": {"name": "ad_name", "description": "Ad Name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "call_to_action": {"name": "call_to_action", "description": "Call to action values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_tracking_url": {"name": "click_tracking_url", "description": "Click monitoring URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impression_tracking_url": {"name": "impression_tracking_url", "description": "Display monitoring URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "landing_page_url": {"name": "landing_page_url", "description": "Landing page URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_host": {"name": "url_host", "description": "The URL host of the ad, extracted from the `landing_page_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_path": {"name": "url_path", "description": "The URL path of the ad, extracted from the `landing_page_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_source": {"name": "utm_source", "description": "The utm_source parameter of the ad, extracted from the `landing_page_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_medium": {"name": "utm_medium", "description": "The utm_medium parameter of the ad, extracted from the `landing_page_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_campaign": {"name": "utm_campaign", "description": "The utm_campaign parameter of the ad, extracted from the `landing_page_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_content": {"name": "utm_content", "description": "The utm_content parameter of the ad, extracted from the `landing_page_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_term": {"name": "utm_term", "description": "The utm_term parameter of the ad, extracted from the `landing_page_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Whether record is the most recent one for this particular grain.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/staging/stg_tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.8279006, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_tiktok_ads__ad_history_tmp') }}\n), \n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_tiktok_ads__ad_history_tmp')),\n staging_columns=get_ad_history_columns()\n )\n }}\n\n \n {{ fivetran_utils.apply_source_relation(package_name='tiktok_ads') }}\n\n from base\n), \n\nfinal as (\n\n select\n source_relation, \n ad_id,\n cast(updated_at as {{ dbt.type_timestamp() }}) as updated_at,\n adgroup_id as ad_group_id,\n advertiser_id,\n campaign_id,\n ad_name,\n call_to_action,\n click_tracking_url,\n impression_tracking_url,\n {{ dbt.split_part('landing_page_url', \"'?'\", 1) }} as base_url,\n {{ dbt_utils.get_url_host('landing_page_url') }} as url_host,\n '/' || {{ dbt_utils.get_url_path('landing_page_url') }} as url_path,\n {{ tiktok_ads.tiktok_ads_extract_url_parameter('landing_page_url', 'utm_source') }} as utm_source,\n {{ tiktok_ads.tiktok_ads_extract_url_parameter('landing_page_url', 'utm_medium') }} as utm_medium,\n {{ tiktok_ads.tiktok_ads_extract_url_parameter('landing_page_url', 'utm_campaign') }} as utm_campaign,\n {{ tiktok_ads.tiktok_ads_extract_url_parameter('landing_page_url', 'utm_content') }} as utm_content,\n {{ tiktok_ads.tiktok_ads_extract_url_parameter('landing_page_url', 'utm_term') }} as utm_term,\n landing_page_url,\n row_number() over (partition by ad_id {{ fivetran_utils.partition_by_source_relation(package_name='tiktok_ads') }} order by updated_at desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__ad_history_tmp", "package": null, "version": null}, {"name": "stg_tiktok_ads__ad_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.get_ad_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_timestamp", "macro.dbt.split_part", "macro.dbt_utils.get_url_host", "macro.dbt_utils.get_url_path", "macro.tiktok_ads.tiktok_ads_extract_url_parameter", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__ad_history_tmp"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads__ad_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_history_tmp\"\n), \n\nfields as (\n\n select\n \n ad_id as ad_id,\n ad_name as ad_name,\n adgroup_id as adgroup_id,\n advertiser_id as advertiser_id,\n call_to_action as call_to_action,\n campaign_id as campaign_id,\n click_tracking_url as click_tracking_url,\n impression_tracking_url as impression_tracking_url,\n landing_page_url as landing_page_url,\n updated_at as updated_at\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n), \n\nfinal as (\n\n select\n source_relation, \n ad_id,\n cast(updated_at as timestamp) as updated_at,\n adgroup_id as ad_group_id,\n advertiser_id,\n campaign_id,\n ad_name,\n call_to_action,\n click_tracking_url,\n impression_tracking_url,\n \n\n \n \n\n split_part(\n landing_page_url,\n '?',\n 1\n )\n\n\n \n\n as base_url,\n \n \n cast(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n \n\n replace(\n \n\n replace(\n \n\n replace(\n landing_page_url,\n 'android-app://',\n ''\n )\n\n\n,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n '/',\n 1\n )\n\n\n \n\n,\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_host,\n '/' || \n \n cast(\n\n \n \n\n split_part(\n \n\n right(\n \n\n replace(\n \n\n replace(\n landing_page_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n \n\n length(\n \n\n replace(\n \n\n replace(\n landing_page_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n )-coalesce(\n nullif(\n\n position(\n '/' in \n\n replace(\n \n\n replace(\n landing_page_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ), 0),\n \n\n position(\n '?' in \n\n replace(\n \n\n replace(\n landing_page_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ) - 1\n )\n ),\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_path,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n landing_page_url,\n 'utm_source=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_source,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n landing_page_url,\n 'utm_medium=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_medium,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n landing_page_url,\n 'utm_campaign=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_campaign,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n landing_page_url,\n 'utm_content=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_content,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n landing_page_url,\n 'utm_term=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_term,\n landing_page_url,\n row_number() over (partition by ad_id order by updated_at desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__advertiser": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__advertiser", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/stg_tiktok_ads__advertiser.sql", "original_file_path": "models/staging/stg_tiktok_ads__advertiser.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__advertiser", "fqn": ["tiktok_ads", "staging", "stg_tiktok_ads__advertiser"], "alias": "stg_tiktok_ads__advertiser", "checksum": {"name": "sha256", "checksum": "dd3c4766397d970d33230ade1f53d18f1985d2b74e44676fd02d9fef11df9cae"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents data for each advertiser.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "advertiser_id": {"name": "advertiser_id", "description": "Advertiser ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "address": {"name": "address", "description": "Advertiser address information", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "balance": {"name": "balance", "description": "Account available balance", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "company": {"name": "company", "description": "Advertiser's company name", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "contacter": {"name": "contacter", "description": "Contact Person", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country": {"name": "country", "description": "The advertiser's country", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "create_time": {"name": "create_time", "description": "Advertiser's create time", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Type of currency used by advertisers", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "description": {"name": "description", "description": "Brand description, i.e. promotional content", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "email": {"name": "email", "description": "Advertiser contact email, desensitised data", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "industry": {"name": "industry", "description": "Advertiser industry category", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "language": {"name": "language", "description": "Language used by advertisers", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "license_no": {"name": "license_no", "description": "License number", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "license_url": {"name": "license_url", "description": "License preview address, the link is valid for an hour by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_name": {"name": "advertiser_name", "description": "Advertiser name", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cellphone_number": {"name": "cellphone_number", "description": "Contact mobile number, desensitised data", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "telephone_number": {"name": "telephone_number", "description": "Fixed phone number, desensitised data", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone": {"name": "timezone", "description": "Ad account time zone including GMT offset", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/staging/stg_tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.8215487, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__advertiser\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_tiktok_ads__advertiser_tmp') }}\n), \n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_tiktok_ads__advertiser_tmp')),\n staging_columns=get_advertiser_columns()\n )\n }}\n\n \n {{ fivetran_utils.apply_source_relation(package_name='tiktok_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as advertiser_id, \n address, \n balance, \n company, \n contacter, \n country, \n currency, \n description, \n email, \n industry, \n language,\n name as advertiser_name, \n coalesce(cellphone_number, phone_number) as cellphone_number, \n coalesce(telephone_number, telephone) as telephone_number,\n timezone\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__advertiser_tmp", "package": null, "version": null}, {"name": "stg_tiktok_ads__advertiser_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.get_advertiser_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__advertiser_tmp"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads__advertiser.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__advertiser_tmp\"\n), \n\nfields as (\n\n select\n \n address as address,\n balance as balance,\n cellphone_number as cellphone_number,\n company as company,\n contacter as contacter,\n country as country,\n currency as currency,\n description as description,\n email as email,\n id as id,\n industry as industry,\n language as language,\n name as name,\n cast(null as TEXT) as phone_number,\n cast(null as TEXT) as telephone,\n telephone_number as telephone_number,\n timezone as timezone\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as advertiser_id, \n address, \n balance, \n company, \n contacter, \n country, \n currency, \n description, \n email, \n industry, \n language,\n name as advertiser_name, \n coalesce(cellphone_number, phone_number) as cellphone_number, \n coalesce(telephone_number, telephone) as telephone_number,\n timezone\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__campaign_country_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__campaign_country_report", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/stg_tiktok_ads__campaign_country_report.sql", "original_file_path": "models/staging/stg_tiktok_ads__campaign_country_report.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__campaign_country_report", "fqn": ["tiktok_ads", "staging", "stg_tiktok_ads__campaign_country_report"], "alias": "stg_tiktok_ads__campaign_country_report", "checksum": {"name": "sha256", "checksum": "b213b92f39600ca626b1aa96c44a205548115fb3c254275f1567eff1e40b1cb1"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record provides country-level reporting metrics at the campaign level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.tiktok_ads.source_relation"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp indicating when the record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Unique identifier of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "Total number of times users clicked on ads within the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion": {"name": "conversion", "description": "Number of attributed conversions from ads in the campaign based on the TikTok attribution model.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_rate": {"name": "conversion_rate", "description": "Ratio of conversions to impressions, calculated as conversions divided by impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_conversion": {"name": "cost_per_conversion", "description": "Average cost per conversion, calculated as total spend divided by conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country_code": {"name": "country_code", "description": "Audience country or region code.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpc": {"name": "cpc", "description": "Cost per click, calculated as spend divided by the number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpm": {"name": "cpm", "description": "Cost per thousand impressions, calculated as (spend / impressions) * 1000.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ctr": {"name": "ctr", "description": "Click-through rate, calculated as clicks divided by impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "Total number of times ads in the campaign were shown.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion": {"name": "real_time_conversion", "description": "Number of real-time conversions tracked by TikTok.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "Total amount spent for the campaign in the account currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "stat_time_day": {"name": "stat_time_day", "description": "The reporting date for the campaign data (in YYYY-MM-DD format).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "tiktok_ads://models/staging/stg_tiktok_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.839356, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_country_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true) and var('tiktok_ads__using_campaign_country_report', true)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_tiktok_ads__campaign_country_report_tmp') }}\n), \n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_tiktok_ads__campaign_country_report_tmp')),\n staging_columns=get_campaign_country_report_columns()\n )\n }}\n \n {{ fivetran_utils.apply_source_relation(package_name='tiktok_ads') }}\n\n from base\n), \n\nfinal as (\n\n select\n campaign_id,\n cast(stat_time_day as date) as stat_time_day,\n country_code,\n coalesce(clicks, 0) as clicks,\n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(conversion, 0) as conversion,\n coalesce(conversion_rate, 0) as conversion_rate,\n coalesce(cost_per_conversion, 0) as cost_per_conversion,\n coalesce(cpc, 0) as cpc,\n coalesce(cpm, 0) as cpm,\n coalesce(ctr, 0) as ctr,\n coalesce(real_time_conversion, 0) as real_time_conversion,\n source_relation,\n _fivetran_synced\n\n {{ tiktok_ads_fill_pass_through_columns(pass_through_fields=var('tiktok_ads__campaign_country_report_passthrough_metrics')) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__campaign_country_report_tmp", "package": null, "version": null}, {"name": "stg_tiktok_ads__campaign_country_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.tiktok_ads.get_campaign_country_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.tiktok_ads.tiktok_ads_fill_pass_through_columns"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__campaign_country_report_tmp"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads__campaign_country_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_country_report_tmp\"\n), \n\nfields as (\n\n select\n \n _fivetran_synced as _fivetran_synced,\n campaign_id as campaign_id,\n clicks as clicks,\n conversion as conversion,\n conversion_rate as conversion_rate,\n cost_per_conversion as cost_per_conversion,\n country_code as country_code,\n cpc as cpc,\n cpm as cpm,\n ctr as ctr,\n impressions as impressions,\n real_time_conversion as real_time_conversion,\n spend as spend,\n stat_time_day as stat_time_day\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n), \n\nfinal as (\n\n select\n campaign_id,\n cast(stat_time_day as date) as stat_time_day,\n country_code,\n coalesce(clicks, 0) as clicks,\n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(conversion, 0) as conversion,\n coalesce(conversion_rate, 0) as conversion_rate,\n coalesce(cost_per_conversion, 0) as cost_per_conversion,\n coalesce(cpc, 0) as cpc,\n coalesce(cpm, 0) as cpm,\n coalesce(ctr, 0) as ctr,\n coalesce(real_time_conversion, 0) as real_time_conversion,\n source_relation,\n _fivetran_synced\n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__campaign_country_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__campaign_country_report_tmp", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/tmp/stg_tiktok_ads__campaign_country_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_tiktok_ads__campaign_country_report_tmp.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__campaign_country_report_tmp", "fqn": ["tiktok_ads", "staging", "tmp", "stg_tiktok_ads__campaign_country_report_tmp"], "alias": "stg_tiktok_ads__campaign_country_report_tmp", "checksum": {"name": "sha256", "checksum": "d7c90de674bcf5ae74eea872980ca47acdd5d4c0162743943c4263f6fe6b742b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708220.1876233, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_country_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true) and var('tiktok_ads__using_campaign_country_report', true)) }}\n\n{% if var('tiktok_ads_union_schemas', []) | length > 0 or var('tiktok_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_country_report', \n database_variable='tiktok_ads_database', \n schema_variable='tiktok_ads_schema', \n default_database=target.database,\n default_schema='tiktok_ads',\n default_variable='campaign_country_report',\n union_schema_variable='tiktok_ads_union_schemas',\n union_database_variable='tiktok_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='tiktok_ads_sources',\n single_source_name='tiktok_ads',\n single_table_name='campaign_country_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tiktok_ads", "campaign_country_report"], ["tiktok_ads", "campaign_country_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.tiktok_ads.tiktok_ads.campaign_country_report"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/tmp/stg_tiktok_ads__campaign_country_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: tiktok_ads_campaign_country_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: tiktok_campaign_country_report_data\n\n\n select\n \"_fivetran_synced\",\n \"campaign_id\",\n \"clicks\",\n \"conversion\",\n \"conversion_rate\",\n \"cost_per_conversion\",\n \"country_code\",\n \"cpc\",\n \"cpm\",\n \"ctr\",\n \"impressions\",\n \"real_time_conversion\",\n \"spend\",\n \"stat_time_day\"\n from \"postgres\".\"public\".\"tiktok_campaign_country_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__ad_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_history_tmp", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/tmp/stg_tiktok_ads__ad_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_tiktok_ads__ad_history_tmp.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_history_tmp", "fqn": ["tiktok_ads", "staging", "tmp", "stg_tiktok_ads__ad_history_tmp"], "alias": "stg_tiktok_ads__ad_history_tmp", "checksum": {"name": "sha256", "checksum": "d76353ca8b7ba780137ee13960485104668306f62d03d5a9d55abac6143a4987"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708220.1986897, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\n{% if var('tiktok_ads_union_schemas', []) | length > 0 or var('tiktok_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_history', \n database_variable='tiktok_ads_database', \n schema_variable='tiktok_ads_schema', \n default_database=target.database,\n default_schema='tiktok_ads',\n default_variable='ad_history',\n union_schema_variable='tiktok_ads_union_schemas',\n union_database_variable='tiktok_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='tiktok_ads_sources',\n single_source_name='tiktok_ads',\n single_table_name='ad_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tiktok_ads", "ad_history"], ["tiktok_ads", "ad_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.tiktok_ads.tiktok_ads.ad_history"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/tmp/stg_tiktok_ads__ad_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: tiktok_ads_ad_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: tiktok_ad_history_data\n\n\n select\n \"ad_id\",\n \"updated_at\",\n \"advertiser_id\",\n \"adgroup_id\",\n \"campaign_id\",\n \"create_time\",\n \"ad_name\",\n \"call_to_action\",\n \"secondary_status\",\n \"operation_status\",\n \"ad_text\",\n \"video_id\",\n \"app_name\",\n \"deeplink\",\n \"landing_page_url\",\n \"display_name\",\n \"profile_image_url\",\n \"impression_tracking_url\",\n \"click_tracking_url\",\n \"playable_url\",\n \"is_aco\",\n \"creative_authorized\",\n \"is_new_structure\",\n \"image_ids\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"tiktok_ad_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_report_hourly_tmp", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/tmp/stg_tiktok_ads__ad_report_hourly_tmp.sql", "original_file_path": "models/staging/tmp/stg_tiktok_ads__ad_report_hourly_tmp.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly_tmp", "fqn": ["tiktok_ads", "staging", "tmp", "stg_tiktok_ads__ad_report_hourly_tmp"], "alias": "stg_tiktok_ads__ad_report_hourly_tmp", "checksum": {"name": "sha256", "checksum": "2ffc850c7e67b4403ab60cf8557ae13120fb2c7fddf74b9dc0985ca0ce4a2b9b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708220.2092986, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_report_hourly_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\n{% if var('tiktok_ads_union_schemas', []) | length > 0 or var('tiktok_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_report_hourly', \n database_variable='tiktok_ads_database', \n schema_variable='tiktok_ads_schema', \n default_database=target.database,\n default_schema='tiktok_ads',\n default_variable='ad_report_hourly',\n union_schema_variable='tiktok_ads_union_schemas',\n union_database_variable='tiktok_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='tiktok_ads_sources',\n single_source_name='tiktok_ads',\n single_table_name='ad_report_hourly'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tiktok_ads", "ad_report_hourly"], ["tiktok_ads", "ad_report_hourly"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.tiktok_ads.tiktok_ads.ad_report_hourly"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/tmp/stg_tiktok_ads__ad_report_hourly_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: tiktok_ads_ad_report_hourly_identifier\n -- database: postgres \n -- schema: public\n -- identifier: tiktok_ad_report_hourly_data\n\n\n select\n \"ad_id\",\n \"stat_time_hour\",\n \"cost_per_conversion\",\n \"cpc\",\n \"video_play_actions\",\n \"conversion_rate\",\n \"video_views_p_75\",\n \"result\",\n \"video_views_p_50\",\n \"impressions\",\n \"comments\",\n \"real_time_cost_per_result\",\n \"conversion\",\n \"real_time_result\",\n \"video_views_p_100\",\n \"shares\",\n \"real_time_conversion_rate\",\n \"cost_per_secondary_goal_result\",\n \"secondary_goal_result_rate\",\n \"clicks\",\n \"cost_per_1000_reached\",\n \"video_views_p_25\",\n \"reach\",\n \"real_time_cost_per_conversion\",\n \"profile_visits_rate\",\n \"average_video_play\",\n \"profile_visits\",\n \"cpm\",\n \"ctr\",\n \"video_watched_2_s\",\n \"follows\",\n \"result_rate\",\n \"video_watched_6_s\",\n \"secondary_goal_result\",\n \"cost_per_result\",\n \"average_video_play_per_user\",\n \"real_time_result_rate\",\n \"spend\",\n \"likes\",\n \"real_time_conversion\",\n \"total_purchase_value\",\n \"total_sales_lead_value\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"tiktok_ad_report_hourly_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__campaign_report_hourly_tmp", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/tmp/stg_tiktok_ads__campaign_report_hourly_tmp.sql", "original_file_path": "models/staging/tmp/stg_tiktok_ads__campaign_report_hourly_tmp.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly_tmp", "fqn": ["tiktok_ads", "staging", "tmp", "stg_tiktok_ads__campaign_report_hourly_tmp"], "alias": "stg_tiktok_ads__campaign_report_hourly_tmp", "checksum": {"name": "sha256", "checksum": "8f0d1df15c93f581ab3b02e1e96dda529a30a45194dc90b794f65aa40e57c51d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708220.2209482, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_report_hourly_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\n{% if var('tiktok_ads_union_schemas', []) | length > 0 or var('tiktok_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_report_hourly', \n database_variable='tiktok_ads_database', \n schema_variable='tiktok_ads_schema', \n default_database=target.database,\n default_schema='tiktok_ads',\n default_variable='campaign_report_hourly',\n union_schema_variable='tiktok_ads_union_schemas',\n union_database_variable='tiktok_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='tiktok_ads_sources',\n single_source_name='tiktok_ads',\n single_table_name='campaign_report_hourly'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tiktok_ads", "campaign_report_hourly"], ["tiktok_ads", "campaign_report_hourly"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.tiktok_ads.tiktok_ads.campaign_report_hourly"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/tmp/stg_tiktok_ads__campaign_report_hourly_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: tiktok_ads_campaign_report_hourly_identifier\n -- database: postgres \n -- schema: public\n -- identifier: tiktok_campaign_report_hourly_data\n\n\n select\n \"campaign_id\",\n \"stat_time_hour\",\n \"cost_per_conversion\",\n \"cpc\",\n \"video_play_actions\",\n \"conversion_rate\",\n \"video_views_p_75\",\n \"result\",\n \"video_views_p_50\",\n \"impressions\",\n \"comments\",\n \"real_time_cost_per_result\",\n \"conversion\",\n \"real_time_result\",\n \"video_views_p_100\",\n \"shares\",\n \"real_time_conversion_rate\",\n \"cost_per_secondary_goal_result\",\n \"secondary_goal_result_rate\",\n \"clicks\",\n \"cost_per_1000_reached\",\n \"video_views_p_25\",\n \"reach\",\n \"real_time_cost_per_conversion\",\n \"profile_visits_rate\",\n \"average_video_play\",\n \"profile_visits\",\n \"cpm\",\n \"ctr\",\n \"video_watched_2_s\",\n \"follows\",\n \"result_rate\",\n \"video_watched_6_s\",\n \"secondary_goal_result\",\n \"cost_per_result\",\n \"average_video_play_per_user\",\n \"real_time_result_rate\",\n \"spend\",\n \"likes\",\n \"real_time_conversion\",\n \"total_purchase_value\",\n \"total_sales_lead_value\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"tiktok_campaign_report_hourly_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_group_report_hourly_tmp", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/tmp/stg_tiktok_ads__ad_group_report_hourly_tmp.sql", "original_file_path": "models/staging/tmp/stg_tiktok_ads__ad_group_report_hourly_tmp.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly_tmp", "fqn": ["tiktok_ads", "staging", "tmp", "stg_tiktok_ads__ad_group_report_hourly_tmp"], "alias": "stg_tiktok_ads__ad_group_report_hourly_tmp", "checksum": {"name": "sha256", "checksum": "bab55a30e8f6e36f8a23e50fddedd7e74660fba6ee0502c57569cb89c02ced96"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708220.2316751, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_group_report_hourly_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\n{% if var('tiktok_ads_union_schemas', []) | length > 0 or var('tiktok_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='adgroup_report_hourly', \n database_variable='tiktok_ads_database', \n schema_variable='tiktok_ads_schema', \n default_database=target.database,\n default_schema='tiktok_ads',\n default_variable='adgroup_report_hourly',\n union_schema_variable='tiktok_ads_union_schemas',\n union_database_variable='tiktok_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='tiktok_ads_sources',\n single_source_name='tiktok_ads',\n single_table_name='adgroup_report_hourly'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tiktok_ads", "adgroup_report_hourly"], ["tiktok_ads", "adgroup_report_hourly"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.tiktok_ads.tiktok_ads.adgroup_report_hourly"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/tmp/stg_tiktok_ads__ad_group_report_hourly_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: tiktok_ads_adgroup_report_hourly_identifier\n -- database: postgres \n -- schema: public\n -- identifier: tiktok_adgroup_report_hourly_data\n\n\n select\n \"adgroup_id\",\n \"stat_time_hour\",\n \"cost_per_conversion\",\n \"cpc\",\n \"video_play_actions\",\n \"conversion_rate\",\n \"video_views_p_75\",\n \"result\",\n \"video_views_p_50\",\n \"impressions\",\n \"comments\",\n \"real_time_cost_per_result\",\n \"conversion\",\n \"real_time_result\",\n \"video_views_p_100\",\n \"shares\",\n \"real_time_conversion_rate\",\n \"cost_per_secondary_goal_result\",\n \"secondary_goal_result_rate\",\n \"clicks\",\n \"cost_per_1000_reached\",\n \"video_views_p_25\",\n \"reach\",\n \"real_time_cost_per_conversion\",\n \"profile_visits_rate\",\n \"average_video_play\",\n \"profile_visits\",\n \"cpm\",\n \"ctr\",\n \"video_watched_2_s\",\n \"follows\",\n \"result_rate\",\n \"video_watched_6_s\",\n \"secondary_goal_result\",\n \"cost_per_result\",\n \"average_video_play_per_user\",\n \"real_time_result_rate\",\n \"spend\",\n \"likes\",\n \"real_time_conversion\",\n \"total_purchase_value\",\n \"total_sales_lead_value\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"tiktok_adgroup_report_hourly_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__ad_group_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__ad_group_history_tmp", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/tmp/stg_tiktok_ads__ad_group_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_tiktok_ads__ad_group_history_tmp.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__ad_group_history_tmp", "fqn": ["tiktok_ads", "staging", "tmp", "stg_tiktok_ads__ad_group_history_tmp"], "alias": "stg_tiktok_ads__ad_group_history_tmp", "checksum": {"name": "sha256", "checksum": "b38c0d2158c9d862fd3f9adb72ef9bf957323e73e7d544907751eb5eb645f111"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708220.2424276, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_group_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\n{% if var('tiktok_ads_union_schemas', []) | length > 0 or var('tiktok_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='adgroup_history', \n database_variable='tiktok_ads_database', \n schema_variable='tiktok_ads_schema', \n default_database=target.database,\n default_schema='tiktok_ads',\n default_variable='adgroup_history',\n union_schema_variable='tiktok_ads_union_schemas',\n union_database_variable='tiktok_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='tiktok_ads_sources',\n single_source_name='tiktok_ads',\n single_table_name='adgroup_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tiktok_ads", "adgroup_history"], ["tiktok_ads", "adgroup_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.tiktok_ads.tiktok_ads.adgroup_history"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/tmp/stg_tiktok_ads__ad_group_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: tiktok_ads_adgroup_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: tiktok_adgroup_history_data\n\n\n select\n \"adgroup_id\",\n \"updated_at\",\n \"advertiser_id\",\n \"campaign_id\",\n \"create_time\",\n \"adgroup_name\",\n \"placement_type\",\n \"profile_image\",\n \"landing_page_url\",\n \"display_name\",\n \"app_type\",\n \"app_download_url\",\n \"app_name\",\n \"optimization_event\",\n \"secondary_optimization_event\",\n \"creative_material_mode\",\n \"audience_type\",\n \"gender\",\n \"min_android_version\",\n \"min_ios_version\",\n \"budget_mode\",\n \"schedule_type\",\n \"dayparting\",\n \"optimization_goal\",\n \"cpv_video_duration\",\n \"pacing\",\n \"billing_event\",\n \"bid_type\",\n \"deep_bid_type\",\n \"impression_tracking_url\",\n \"click_tracking_url\",\n \"secondary_status\",\n \"operation_status\",\n \"statistic_type\",\n \"video_download\",\n \"open_url\",\n \"open_url_type\",\n \"fallback_type\",\n \"budget\",\n \"bid_price\",\n \"conversion_bid_price\",\n \"deep_cpa_bid\",\n \"schedule_start_time\",\n \"schedule_end_time\",\n \"app_id\",\n \"pixel_id\",\n \"inventory_filter_enabled\",\n \"is_hfss\",\n \"is_new_structure\",\n \"category\",\n \"is_comment_disable\",\n \"skip_learning_phase\",\n \"frequency\",\n \"frequency_schedule\",\n \"action_days\",\n \"audience\",\n \"excluded_audience\",\n \"location\",\n \"interest_category_v_2\",\n \"pangle_block_app_list_id\",\n \"action_categories\",\n \"placements\",\n \"keywords\",\n \"age_groups\",\n \"languages\",\n \"operating_systems\",\n \"network_types\",\n \"carriers\",\n \"video_actions\",\n \"package\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"tiktok_adgroup_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__campaign_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__campaign_history_tmp", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/tmp/stg_tiktok_ads__campaign_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_tiktok_ads__campaign_history_tmp.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__campaign_history_tmp", "fqn": ["tiktok_ads", "staging", "tmp", "stg_tiktok_ads__campaign_history_tmp"], "alias": "stg_tiktok_ads__campaign_history_tmp", "checksum": {"name": "sha256", "checksum": "6aad4015833b55cf8121d550e86f4df7cc8853a448289028af58708b11a0c6e8"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708220.2530181, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\n{% if var('tiktok_ads_union_schemas', []) | length > 0 or var('tiktok_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_history', \n database_variable='tiktok_ads_database', \n schema_variable='tiktok_ads_schema', \n default_database=target.database,\n default_schema='tiktok_ads',\n default_variable='campaign_history',\n union_schema_variable='tiktok_ads_union_schemas',\n union_database_variable='tiktok_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='tiktok_ads_sources',\n single_source_name='tiktok_ads',\n single_table_name='campaign_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tiktok_ads", "campaign_history"], ["tiktok_ads", "campaign_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.tiktok_ads.tiktok_ads.campaign_history"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/tmp/stg_tiktok_ads__campaign_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: tiktok_ads_campaign_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: tiktok_campaign_history_data\n\n\n select\n \"ad_id\",\n \"updated_at\",\n \"advertiser_id\",\n \"adgroup_id\",\n \"campaign_id\",\n \"create_time\",\n \"ad_name\",\n \"call_to_action\",\n \"secondary_status\",\n \"operation_status\",\n \"ad_text\",\n \"video_id\",\n \"app_name\",\n \"deeplink\",\n \"landing_page_url\",\n \"display_name\",\n \"profile_image_url\",\n \"impression_tracking_url\",\n \"click_tracking_url\",\n \"playable_url\",\n \"is_aco\",\n \"creative_authorized\",\n \"is_new_structure\",\n \"image_ids\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"tiktok_campaign_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__advertiser_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__advertiser_tmp", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/tmp/stg_tiktok_ads__advertiser_tmp.sql", "original_file_path": "models/staging/tmp/stg_tiktok_ads__advertiser_tmp.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__advertiser_tmp", "fqn": ["tiktok_ads", "staging", "tmp", "stg_tiktok_ads__advertiser_tmp"], "alias": "stg_tiktok_ads__advertiser_tmp", "checksum": {"name": "sha256", "checksum": "5f1de765650326643e68812b269762c3f2c47180c3e09568f1eef19d7fcba35d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708220.2649658, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__advertiser_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true)) }}\n\n{% if var('tiktok_ads_union_schemas', []) | length > 0 or var('tiktok_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='advertiser', \n database_variable='tiktok_ads_database', \n schema_variable='tiktok_ads_schema', \n default_database=target.database,\n default_schema='tiktok_ads',\n default_variable='advertiser',\n union_schema_variable='tiktok_ads_union_schemas',\n union_database_variable='tiktok_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='tiktok_ads_sources',\n single_source_name='tiktok_ads',\n single_table_name='advertiser'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tiktok_ads", "advertiser"], ["tiktok_ads", "advertiser"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.tiktok_ads.tiktok_ads.advertiser"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/tmp/stg_tiktok_ads__advertiser_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: tiktok_ads_advertiser_identifier\n -- database: postgres \n -- schema: public\n -- identifier: tiktok_advertiser_data\n\n\n select\n \"id\",\n \"name\",\n \"address\",\n \"company\",\n \"contacter\",\n \"country\",\n \"currency\",\n \"description\",\n \"email\",\n \"industry\",\n \"license_no\",\n \"license_url\",\n \"promotion_area\",\n \"rejected_reason\",\n \"role\",\n \"status\",\n \"telephone_number\",\n \"timezone\",\n \"balance\",\n \"create_time\",\n \"language\",\n \"cellphone_number\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"tiktok_advertiser_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.tiktok_ads.stg_tiktok_ads__location_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_tiktok_ads__location_tmp", "resource_type": "model", "package_name": "tiktok_ads", "path": "staging/tmp/stg_tiktok_ads__location_tmp.sql", "original_file_path": "models/staging/tmp/stg_tiktok_ads__location_tmp.sql", "unique_id": "model.tiktok_ads.stg_tiktok_ads__location_tmp", "fqn": ["tiktok_ads", "staging", "tmp", "stg_tiktok_ads__location_tmp"], "alias": "stg_tiktok_ads__location_tmp", "checksum": {"name": "sha256", "checksum": "ffbfb89c7e57d42b17ae65f6363427e816399474288f39c880f340e8f88f410e"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708220.2755363, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__location_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__tiktok_ads_enabled', true) and var('tiktok_ads__using_location', true)) }}\n\n{% if var('tiktok_ads_union_schemas', []) | length > 0 or var('tiktok_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='location',\n database_variable='tiktok_ads_database',\n schema_variable='tiktok_ads_schema',\n default_database=target.database,\n default_schema='tiktok_ads',\n default_variable='location',\n union_schema_variable='tiktok_ads_union_schemas',\n union_database_variable='tiktok_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='tiktok_ads_sources',\n single_source_name='tiktok_ads',\n single_table_name='location'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["tiktok_ads", "location"], ["tiktok_ads", "location"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.tiktok_ads.tiktok_ads.location"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/tmp/stg_tiktok_ads__location_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: tiktok_ads_location_identifier\n -- database: postgres \n -- schema: public\n -- identifier: tiktok_location_data\n\n\n select\n \"_fivetran_synced\",\n \"advertiser_id\",\n \"area_type\",\n \"country_code\",\n \"parent_id\",\n \"region_id\",\n \"region_level\",\n \"region_name\",\n \"support_below_18\"\n from \"postgres\".\"public\".\"tiktok_location_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.microsoft_ads__keyword_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__keyword_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "microsoft_ads__keyword_report.sql", "original_file_path": "models/microsoft_ads__keyword_report.sql", "unique_id": "model.microsoft_ads.microsoft_ads__keyword_report", "fqn": ["microsoft_ads", "microsoft_ads__keyword_report"], "alias": "microsoft_ads__keyword_report", "checksum": {"name": "sha256", "checksum": "5caa9c62f3f31d211af7ef8bc54eefdfb404b9b2a4798462c02f16d2a550556d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily clicks, impressions, spend (and if applicable other passthrough metrics) of ads by keyword, ad, ad group, campaign, account, device os, device type, network and currency code.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_name": {"name": "account_name", "description": "The name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_name"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "ad_name": {"name": "ad_name", "description": "The name of the corresponding ad; `title_part_1` is used as the default ad name but you may customize this by using the `microsoft_ads__ad_name_selector` variable. For more information, refer to the [README](https://github.com/fivetran/dbt_microsoft_ads/blob/main/README.md#change-how-ad-name-is-determined).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_name"]}, "ad_id": {"name": "ad_id", "description": "The ID of the corresponding ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_id"]}, "keyword_name": {"name": "keyword_name", "description": "The keyword(s) associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.keyword_name"]}, "keyword_id": {"name": "keyword_id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.keyword_id"]}, "match_type": {"name": "match_type", "description": "The match type associated with this record; values contain but may not be limited to 'Broad', 'Exact', 'Phrase'. Please refer to Microsoft Ad's [documentation](https://help.ads.microsoft.com/#apex/ads/en/50822/1).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.match_type"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_value": {"name": "all_conversions_value", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.9399328, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__keyword_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_microsoft_ads__keyword_daily_report') }}\n\n), \n\nkeywords as (\n\n select *\n from {{ ref('stg_microsoft_ads__keyword_history') }}\n where is_most_recent_record = True\n),\n\nads as (\n\n select *\n from {{ ref('stg_microsoft_ads__ad_history') }}\n where is_most_recent_record = True\n\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_microsoft_ads__ad_group_history') }}\n where is_most_recent_record = True\n\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_microsoft_ads__campaign_history') }}\n where is_most_recent_record = True\n\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_microsoft_ads__account_history') }}\n where is_most_recent_record = True\n\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n ads.ad_name,\n report.ad_id,\n keywords.keyword_name,\n report.keyword_id,\n keywords.match_type,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n {{ microsoft_ads_persist_pass_through_columns(pass_through_variable='microsoft_ads__keyword_passthrough_metrics', transform='sum', coalesce_with=0, exclude_fields=['conversions', 'conversions_value', 'all_conversions', 'all_conversions_value']) }}\n\n from report\n left join ads\n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join keywords\n on report.keyword_id = keywords.keyword_id\n and report.source_relation = keywords.source_relation\n {{ dbt_utils.group_by(17) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__keyword_daily_report", "package": null, "version": null}, {"name": "stg_microsoft_ads__keyword_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__ad_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__campaign_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.microsoft_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__keyword_daily_report", "model.microsoft_ads.stg_microsoft_ads__keyword_history", "model.microsoft_ads.stg_microsoft_ads__ad_history", "model.microsoft_ads.stg_microsoft_ads__ad_group_history", "model.microsoft_ads.stg_microsoft_ads__campaign_history", "model.microsoft_ads.stg_microsoft_ads__account_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads__keyword_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__keyword_daily_report\"\n\n), \n\nkeywords as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__keyword_history\"\n where is_most_recent_record = True\n),\n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_history\"\n where is_most_recent_record = True\n\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_group_history\"\n where is_most_recent_record = True\n\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_history\"\n where is_most_recent_record = True\n\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_history\"\n where is_most_recent_record = True\n\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n ads.ad_name,\n report.ad_id,\n keywords.keyword_name,\n report.keyword_id,\n keywords.match_type,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n \n\n\n\n\n\n from report\n left join ads\n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join keywords\n on report.keyword_id = keywords.keyword_id\n and report.source_relation = keywords.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.microsoft_ads__url_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__url_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "microsoft_ads__url_report.sql", "original_file_path": "models/microsoft_ads__url_report.sql", "unique_id": "model.microsoft_ads.microsoft_ads__url_report", "fqn": ["microsoft_ads", "microsoft_ads__url_report"], "alias": "microsoft_ads__url_report", "checksum": {"name": "sha256", "checksum": "bcb01e337414f8df64f53bb8bb07447c355b82b9cbf25cdaee56341a38672440"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily clicks, impressions, spend (and if applicable other passthrough metrics) of ads by ad, ad group, campaign, account, ad type, device os, device type, network, currency code, url and utm parameters.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_name": {"name": "account_name", "description": "The name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_name"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "ad_name": {"name": "ad_name", "description": "The name of the corresponding ad; `title_part_1` is used as the default ad name but you may customize this by using the `microsoft_ads__ad_name_selector` variable. For more information, refer to the [README](https://github.com/fivetran/dbt_microsoft_ads/blob/main/README.md#change-how-ad-name-is-determined).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_name"]}, "ad_id": {"name": "ad_id", "description": "The ID of the corresponding ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_id"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the `final_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_host": {"name": "url_host", "description": "The URL host of the ad, extracted from the `final_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_path": {"name": "url_path", "description": "The URL path of the ad, extracted from the `final_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_source": {"name": "utm_source", "description": "The site that sent traffic to your page. Microsoft Advertising sets this to Bing; extracted from the `final_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_medium": {"name": "utm_medium", "description": "Which channel was used. Microsoft Advertising sets this to cp; extracted from the `final_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_campaign": {"name": "utm_campaign", "description": "Which campaign the keyword came from; extracted from the `final_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_content": {"name": "utm_content", "description": "Which ad group the keyword came from; extracted from the `final_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_term": {"name": "utm_term", "description": "Which keyword brought people to your website; extracted from the `final_url`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_value": {"name": "all_conversions_value", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.9434571, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__url_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_microsoft_ads__ad_daily_report') }}\n\n), \n\nads as (\n\n select *\n from {{ ref('stg_microsoft_ads__ad_history') }}\n where is_most_recent_record = True\n\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_microsoft_ads__ad_group_history') }}\n where is_most_recent_record = True\n\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_microsoft_ads__campaign_history') }}\n where is_most_recent_record = True\n\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_microsoft_ads__account_history') }}\n where is_most_recent_record = True\n\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n ads.ad_name,\n report.ad_id,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n {{ dbt.split_part('ads.final_url', \"'?'\", 1) }} as base_url,\n {{ dbt_utils.get_url_host('ads.final_url') }} as url_host,\n '/' || {{ dbt_utils.get_url_path('ads.final_url') }} as url_path,\n\n {% if var('microsoft_ads_auto_tagging_enabled', false) %}\n\n coalesce( {{ microsoft_ads.microsoft_ads_extract_url_parameter('ads.final_url', 'utm_source') }} , 'Bing') as utm_source,\n coalesce( {{ microsoft_ads.microsoft_ads_extract_url_parameter('ads.final_url', 'utm_medium') }}, 'cpc') as utm_medium,\n coalesce( {{ microsoft_ads.microsoft_ads_extract_url_parameter('ads.final_url', 'utm_campaign') }}, campaigns.campaign_name) as utm_campaign,\n coalesce( {{ microsoft_ads.microsoft_ads_extract_url_parameter('ads.final_url', 'utm_content') }}, ad_groups.ad_group_name) as utm_content,\n {% else %}\n\n {{ microsoft_ads.microsoft_ads_extract_url_parameter('ads.final_url', 'utm_source') }} as utm_source,\n {{ microsoft_ads.microsoft_ads_extract_url_parameter('ads.final_url', 'utm_medium') }} as utm_medium,\n {{ microsoft_ads.microsoft_ads_extract_url_parameter('ads.final_url', 'utm_campaign') }} as utm_campaign,\n {{ microsoft_ads.microsoft_ads_extract_url_parameter('ads.final_url', 'utm_content') }} as utm_content,\n {% endif %}\n\n {{ microsoft_ads.microsoft_ads_extract_url_parameter('ads.final_url', 'utm_term') }} as utm_term,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n {{ microsoft_ads_persist_pass_through_columns(pass_through_variable='microsoft_ads__ad_passthrough_metrics', transform='sum', coalesce_with=0, exclude_fields=['conversions', 'conversions_value', 'all_conversions', 'all_conversions_value']) }}\n\n from report\n left join ads\n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n {{ dbt_utils.group_by(22) }}\n), \n\nfiltered as (\n\n select * \n from joined\n\n {% if var('ad_reporting__url_report__using_null_filter', True) %}\n where base_url is not null\n {% endif %}\n)\n\nselect *\nfrom filtered", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__ad_daily_report", "package": null, "version": null}, {"name": "stg_microsoft_ads__ad_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__campaign_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.split_part", "macro.dbt_utils.get_url_host", "macro.dbt_utils.get_url_path", "macro.microsoft_ads.microsoft_ads_extract_url_parameter", "macro.microsoft_ads.microsoft_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__ad_daily_report", "model.microsoft_ads.stg_microsoft_ads__ad_history", "model.microsoft_ads.stg_microsoft_ads__ad_group_history", "model.microsoft_ads.stg_microsoft_ads__campaign_history", "model.microsoft_ads.stg_microsoft_ads__account_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads__url_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_daily_report\"\n\n), \n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_history\"\n where is_most_recent_record = True\n\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_group_history\"\n where is_most_recent_record = True\n\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_history\"\n where is_most_recent_record = True\n\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_history\"\n where is_most_recent_record = True\n\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n ads.ad_name,\n report.ad_id,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n \n\n \n \n\n split_part(\n ads.final_url,\n '?',\n 1\n )\n\n\n \n\n as base_url,\n \n \n cast(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n \n\n replace(\n \n\n replace(\n \n\n replace(\n ads.final_url,\n 'android-app://',\n ''\n )\n\n\n,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n '/',\n 1\n )\n\n\n \n\n,\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_host,\n '/' || \n \n cast(\n\n \n \n\n split_part(\n \n\n right(\n \n\n replace(\n \n\n replace(\n ads.final_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n \n\n length(\n \n\n replace(\n \n\n replace(\n ads.final_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n )-coalesce(\n nullif(\n\n position(\n '/' in \n\n replace(\n \n\n replace(\n ads.final_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ), 0),\n \n\n position(\n '?' in \n\n replace(\n \n\n replace(\n ads.final_url,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ) - 1\n )\n ),\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_path,\n\n \n\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n ads.final_url,\n 'utm_source=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_source,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n ads.final_url,\n 'utm_medium=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_medium,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n ads.final_url,\n 'utm_campaign=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_campaign,\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n ads.final_url,\n 'utm_content=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_content,\n \n\n nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n ads.final_url,\n 'utm_term=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'') as utm_term,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n \n\n\n\n\n\n from report\n left join ads\n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22\n), \n\nfiltered as (\n\n select * \n from joined\n\n \n where base_url is not null\n \n)\n\nselect *\nfrom filtered", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.microsoft_ads__account_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__account_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "microsoft_ads__account_report.sql", "original_file_path": "models/microsoft_ads__account_report.sql", "unique_id": "model.microsoft_ads.microsoft_ads__account_report", "fqn": ["microsoft_ads", "microsoft_ads__account_report"], "alias": "microsoft_ads__account_report", "checksum": {"name": "sha256", "checksum": "a1f9fa8dd6e85c9184c2e1c68a72c93d27996f919373a1f32672b64ff5415d63"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily clicks, impressions, spend (and if applicable other passthrough metrics) of ads by account, account timezone, device os, device type, network and currency code.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_name": {"name": "account_name", "description": "The name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_name"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "account_timezone": {"name": "account_timezone", "description": "The time zone associated with this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_timezone"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.9327633, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__account_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_microsoft_ads__account_daily_report') }}\n\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_microsoft_ads__account_history') }}\n where is_most_recent_record = True\n)\n\n, joined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_name,\n report.account_id,\n accounts.time_zone as account_timezone,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions\n -- all_conversion_value is not available for the account_report\n\n {{ microsoft_ads_persist_pass_through_columns(pass_through_variable='microsoft_ads__account_passthrough_metrics', transform='sum', coalesce_with=0, exclude_fields=['conversions_value', 'conversions', 'all_conversions']) }} \n \n from report\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n {{ dbt_utils.group_by(9) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__account_daily_report", "package": null, "version": null}, {"name": "stg_microsoft_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.microsoft_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__account_daily_report", "model.microsoft_ads.stg_microsoft_ads__account_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads__account_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_daily_report\"\n\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_history\"\n where is_most_recent_record = True\n)\n\n, joined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_name,\n report.account_id,\n accounts.time_zone as account_timezone,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions\n -- all_conversion_value is not available for the account_report\n\n \n\n\n\n \n \n from report\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n group by 1,2,3,4,5,6,7,8,9\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.microsoft_ads__campaign_country_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__campaign_country_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "microsoft_ads__campaign_country_report.sql", "original_file_path": "models/microsoft_ads__campaign_country_report.sql", "unique_id": "model.microsoft_ads.microsoft_ads__campaign_country_report", "fqn": ["microsoft_ads", "microsoft_ads__campaign_country_report"], "alias": "microsoft_ads__campaign_country_report", "checksum": {"name": "sha256", "checksum": "c26ac1733a8ad10f1f3e8def7d5fbae25b93a1fe18e749869554590a6f35fa7f"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads by country, account, campaign, campaign type, campaign timezone, campaign status, device os, device type, network, and currency code.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "country": {"name": "country", "description": "The country or region where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.country"]}, "account_name": {"name": "account_name", "description": "The name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_name"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "campaign_type": {"name": "campaign_type", "description": "The campaign type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaigntype?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_type"]}, "campaign_timezone": {"name": "campaign_timezone", "description": "The time zone associated with this campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_timezone"]}, "campaign_status": {"name": "campaign_status", "description": "The status of this campaign; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaignstatus?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_status"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "location_id": {"name": "location_id", "description": "The Microsoft Advertising identifier of the location where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.location_id"]}, "goal": {"name": "goal", "description": "The name of the goal you set for the conversions you want, meaning actions customers take after clicking your ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.goal"]}, "geo_language": {"name": "geo_language", "description": "The language of the publisher where the ad was shown.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_budget": {"name": "campaign_budget", "description": "The amount to spend daily across all campaigns that share the budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget"]}, "campaign_budget_id": {"name": "campaign_budget_id", "description": "The unique Microsoft Advertising identifier of the budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget_id"]}, "campaign_budget_type": {"name": "campaign_budget_type", "description": "The budget type determines the pace at which the budget is spent throughout the day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget_type"]}, "campaign_language": {"name": "campaign_language", "description": "The language that the associated ad was viewed in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.language"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_value": {"name": "all_conversions_value", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.9470994, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_country_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True) and var('microsoft_ads__using_geographic_daily_report', False)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_microsoft_ads__geographic_daily_report') }}\n\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_microsoft_ads__campaign_history') }}\n where is_most_recent_record = True\n\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_microsoft_ads__account_history') }}\n where is_most_recent_record = True\n\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n report.country,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n campaigns.type as campaign_type,\n campaigns.time_zone as campaign_timezone,\n campaigns.status as campaign_status,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n report.location_id,\n report.goal,\n report.language as geo_language,\n campaigns.budget as campaign_budget,\n campaigns.budget_id as campaign_budget_id,\n campaigns.budget_type as campaign_budget_type,\n campaigns.language as campaign_language,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n {{ microsoft_ads_persist_pass_through_columns(pass_through_variable='microsoft_ads__geographic_passthrough_metrics', transform='sum', coalesce_with=0) }} \n\n from report\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n {{ dbt_utils.group_by(21) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__geographic_daily_report", "package": null, "version": null}, {"name": "stg_microsoft_ads__campaign_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.microsoft_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__geographic_daily_report", "model.microsoft_ads.stg_microsoft_ads__campaign_history", "model.microsoft_ads.stg_microsoft_ads__account_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads__campaign_country_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__geographic_daily_report\"\n\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_history\"\n where is_most_recent_record = True\n\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_history\"\n where is_most_recent_record = True\n\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n report.country,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n campaigns.type as campaign_type,\n campaigns.time_zone as campaign_timezone,\n campaigns.status as campaign_status,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n report.location_id,\n report.goal,\n report.language as geo_language,\n campaigns.budget as campaign_budget,\n campaigns.budget_id as campaign_budget_id,\n campaigns.budget_type as campaign_budget_type,\n campaigns.language as campaign_language,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n \n\n\n\n \n\n from report\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.microsoft_ads__campaign_region_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__campaign_region_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "microsoft_ads__campaign_region_report.sql", "original_file_path": "models/microsoft_ads__campaign_region_report.sql", "unique_id": "model.microsoft_ads.microsoft_ads__campaign_region_report", "fqn": ["microsoft_ads", "microsoft_ads__campaign_region_report"], "alias": "microsoft_ads__campaign_region_report", "checksum": {"name": "sha256", "checksum": "9c372c18809334e3e4e875e4f7a73dd6f2ebd8a73e3b66c308ed6a498ec6f281"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance of ads by state or region, account, campaign, campaign type, campaign timezone, campaign status, device os, device type, network, and currency code.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "region": {"name": "region", "description": "The state or geographic region where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.state"]}, "country": {"name": "country", "description": "The country or region where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.country"]}, "account_name": {"name": "account_name", "description": "The name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_name"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "campaign_type": {"name": "campaign_type", "description": "The campaign type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaigntype?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_type"]}, "campaign_timezone": {"name": "campaign_timezone", "description": "The time zone associated with this campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_timezone"]}, "campaign_status": {"name": "campaign_status", "description": "The status of this campaign; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaignstatus?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_status"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "location_id": {"name": "location_id", "description": "The Microsoft Advertising identifier of the location where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.location_id"]}, "goal": {"name": "goal", "description": "The name of the goal you set for the conversions you want, meaning actions customers take after clicking your ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.goal"]}, "geo_language": {"name": "geo_language", "description": "The language of the publisher where the ad was shown.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_budget": {"name": "campaign_budget", "description": "The amount to spend daily across all campaigns that share the budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget"]}, "campaign_budget_id": {"name": "campaign_budget_id", "description": "The unique Microsoft Advertising identifier of the budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget_id"]}, "campaign_budget_type": {"name": "campaign_budget_type", "description": "The budget type determines the pace at which the budget is spent throughout the day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget_type"]}, "campaign_language": {"name": "campaign_language", "description": "The language that the associated ad was viewed in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.language"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_value": {"name": "all_conversions_value", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.9489942, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_region_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True) and var('microsoft_ads__using_geographic_daily_report', False)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_microsoft_ads__geographic_daily_report') }}\n\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_microsoft_ads__campaign_history') }}\n where is_most_recent_record = True\n\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_microsoft_ads__account_history') }}\n where is_most_recent_record = True\n\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n report.region,\n report.country,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n campaigns.type as campaign_type,\n campaigns.time_zone as campaign_timezone,\n campaigns.status as campaign_status,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n report.location_id,\n report.goal,\n report.language as geo_language,\n campaigns.budget as campaign_budget,\n campaigns.budget_id as campaign_budget_id,\n campaigns.budget_type as campaign_budget_type,\n campaigns.language as campaign_language,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n {{ microsoft_ads_persist_pass_through_columns(pass_through_variable='microsoft_ads__geographic_passthrough_metrics', transform='sum', coalesce_with=0) }} \n\n from report\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n {{ dbt_utils.group_by(22) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__geographic_daily_report", "package": null, "version": null}, {"name": "stg_microsoft_ads__campaign_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.microsoft_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__geographic_daily_report", "model.microsoft_ads.stg_microsoft_ads__campaign_history", "model.microsoft_ads.stg_microsoft_ads__account_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads__campaign_region_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__geographic_daily_report\"\n\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_history\"\n where is_most_recent_record = True\n\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_history\"\n where is_most_recent_record = True\n\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n report.region,\n report.country,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n campaigns.type as campaign_type,\n campaigns.time_zone as campaign_timezone,\n campaigns.status as campaign_status,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n report.location_id,\n report.goal,\n report.language as geo_language,\n campaigns.budget as campaign_budget,\n campaigns.budget_id as campaign_budget_id,\n campaigns.budget_type as campaign_budget_type,\n campaigns.language as campaign_language,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n \n\n\n\n \n\n from report\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.microsoft_ads__ad_group_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__ad_group_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "microsoft_ads__ad_group_report.sql", "original_file_path": "models/microsoft_ads__ad_group_report.sql", "unique_id": "model.microsoft_ads.microsoft_ads__ad_group_report", "fqn": ["microsoft_ads", "microsoft_ads__ad_group_report"], "alias": "microsoft_ads__ad_group_report", "checksum": {"name": "sha256", "checksum": "cf9dc9bb7f8eb119c9c39add58869c116d443774ca6597f17f69f599709d48a3"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily clicks, impressions, spend (and if applicable other passthrough metrics) of ads by ad group, campaign, account, device os, device type, network and currency code.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_name": {"name": "account_name", "description": "The name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_name"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_value": {"name": "all_conversions_value", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.9346025, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__ad_group_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_microsoft_ads__ad_group_daily_report') }}\n\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_microsoft_ads__ad_group_history') }}\n where is_most_recent_record = True\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_microsoft_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\naccounts as (\n\n select *\n from {{ ref('stg_microsoft_ads__account_history') }}\n where is_most_recent_record = True\n),\n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value, \n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n {{ microsoft_ads_persist_pass_through_columns(pass_through_variable='microsoft_ads__ad_group_passthrough_metrics', transform='sum', coalesce_with=0, exclude_fields=['conversions', 'conversions_value', 'all_conversions', 'all_conversions_value']) }} \n from report\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n {{ dbt_utils.group_by(12) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__ad_group_daily_report", "package": null, "version": null}, {"name": "stg_microsoft_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__campaign_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.microsoft_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report", "model.microsoft_ads.stg_microsoft_ads__ad_group_history", "model.microsoft_ads.stg_microsoft_ads__campaign_history", "model.microsoft_ads.stg_microsoft_ads__account_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads__ad_group_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_group_daily_report\"\n\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_group_history\"\n where is_most_recent_record = True\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_history\"\n where is_most_recent_record = True\n),\n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value, \n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n \n\n\n\n \n from report\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.microsoft_ads__ad_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__ad_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "microsoft_ads__ad_report.sql", "original_file_path": "models/microsoft_ads__ad_report.sql", "unique_id": "model.microsoft_ads.microsoft_ads__ad_report", "fqn": ["microsoft_ads", "microsoft_ads__ad_report"], "alias": "microsoft_ads__ad_report", "checksum": {"name": "sha256", "checksum": "6ae8dbf67fb1306668d52910df6589e56bec50877fdb4967466bbb684aa69b02"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily clicks, impressions, spend (and if applicable other passthrough metrics) of ads by ad, ad group, campaign, account, ad type, device os, device type, network and currency code.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_name": {"name": "account_name", "description": "The name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_name"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "ad_name": {"name": "ad_name", "description": "The name of the corresponding ad; `title_part_1` is used as the default ad name but you may customize this by using the `microsoft_ads__ad_name_selector` variable. For more information, refer to the [README](https://github.com/fivetran/dbt_microsoft_ads/blob/main/README.md#change-how-ad-name-is-determined).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_name"]}, "ad_id": {"name": "ad_id", "description": "The ID of the corresponding ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_id"]}, "ad_type": {"name": "ad_type", "description": "The ad type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/adtype?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_type"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_value": {"name": "all_conversions_value", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.936157, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__ad_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_microsoft_ads__ad_daily_report') }}\n\n), \n\nads as (\n\n select *\n from {{ ref('stg_microsoft_ads__ad_history') }}\n where is_most_recent_record = True\n\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_microsoft_ads__ad_group_history') }}\n where is_most_recent_record = True\n\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_microsoft_ads__campaign_history') }}\n where is_most_recent_record = True\n\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_microsoft_ads__account_history') }}\n where is_most_recent_record = True\n\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n ads.ad_name,\n report.ad_id,\n ads.type as ad_type,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n {{ microsoft_ads_persist_pass_through_columns(pass_through_variable='microsoft_ads__ad_passthrough_metrics', transform='sum', coalesce_with=0, exclude_fields=['conversions', 'conversions_value', 'all_conversions', 'all_conversions_value']) }} \n\n from report\n left join ads\n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n {{ dbt_utils.group_by(15) }}\n\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__ad_daily_report", "package": null, "version": null}, {"name": "stg_microsoft_ads__ad_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__campaign_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.microsoft_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__ad_daily_report", "model.microsoft_ads.stg_microsoft_ads__ad_history", "model.microsoft_ads.stg_microsoft_ads__ad_group_history", "model.microsoft_ads.stg_microsoft_ads__campaign_history", "model.microsoft_ads.stg_microsoft_ads__account_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads__ad_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_daily_report\"\n\n), \n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_history\"\n where is_most_recent_record = True\n\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_group_history\"\n where is_most_recent_record = True\n\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_history\"\n where is_most_recent_record = True\n\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_history\"\n where is_most_recent_record = True\n\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n ads.ad_name,\n report.ad_id,\n ads.type as ad_type,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n \n\n\n\n \n\n from report\n left join ads\n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15\n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.microsoft_ads__search_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__search_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "microsoft_ads__search_report.sql", "original_file_path": "models/microsoft_ads__search_report.sql", "unique_id": "model.microsoft_ads.microsoft_ads__search_report", "fqn": ["microsoft_ads", "microsoft_ads__search_report"], "alias": "microsoft_ads__search_report", "checksum": {"name": "sha256", "checksum": "6c95ed70f275580780a9635cc1d758b21fc4e145c31bb996cd58682116b89656"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily clicks, impressions, spend (and if applicable other passthrough metrics) of ads by search query, keyword, ad, ad group, campaign, account, device os, device type and network.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_name": {"name": "account_name", "description": "The name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_name"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_name"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "ad_name": {"name": "ad_name", "description": "The name of the corresponding ad; `title_part_1` is used as the default ad name but you may customize this by using the `microsoft_ads__ad_name_selector` variable. For more information, refer to the [README](https://github.com/fivetran/dbt_microsoft_ads/blob/main/README.md#change-how-ad-name-is-determined).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_name"]}, "ad_id": {"name": "ad_id", "description": "The ID of the corresponding ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_id"]}, "keyword_name": {"name": "keyword_name", "description": "The keyword(s) associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.keyword_name"]}, "keyword_id": {"name": "keyword_id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.keyword_id"]}, "match_type": {"name": "match_type", "description": "The match type associated with this record; values contain but may not be limited to 'Broad', 'Exact', 'Phrase'. Please refer to Microsoft Ad's [documentation](https://help.ads.microsoft.com/#apex/ads/en/50822/1).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.match_type"]}, "search_query": {"name": "search_query", "description": "The search query string associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.search_query"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_value": {"name": "all_conversions_value", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.9415805, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__search_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_microsoft_ads__search_daily_report') }}\n\n), \n\nkeywords as (\n\n select *\n from {{ ref('stg_microsoft_ads__keyword_history') }}\n where is_most_recent_record = True\n),\n\nads as (\n\n select *\n from {{ ref('stg_microsoft_ads__ad_history') }}\n where is_most_recent_record = True\n\n), \n\nad_groups as (\n\n select *\n from {{ ref('stg_microsoft_ads__ad_group_history') }}\n where is_most_recent_record = True\n\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_microsoft_ads__campaign_history') }}\n where is_most_recent_record = True\n\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_microsoft_ads__account_history') }}\n where is_most_recent_record = True\n\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n ads.ad_name,\n report.ad_id,\n report.keyword_id,\n keywords.keyword_name,\n coalesce(report.delivered_match_type, report.bid_match_type) as match_type,\n report.search_query,\n report.device_os,\n report.device_type,\n report.network,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n {{ microsoft_ads_persist_pass_through_columns(pass_through_variable='microsoft_ads__search_passthrough_metrics', transform='sum', coalesce_with=0, exclude_fields=['conversions', 'conversions_value', 'all_conversions', 'all_conversions_value']) }}\n\n from report\n left join ads\n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join keywords\n on report.keyword_id = keywords.keyword_id\n and report.source_relation = keywords.source_relation\n {{ dbt_utils.group_by(17) }}\n\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__search_daily_report", "package": null, "version": null}, {"name": "stg_microsoft_ads__keyword_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__ad_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__ad_group_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__campaign_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.microsoft_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__search_daily_report", "model.microsoft_ads.stg_microsoft_ads__keyword_history", "model.microsoft_ads.stg_microsoft_ads__ad_history", "model.microsoft_ads.stg_microsoft_ads__ad_group_history", "model.microsoft_ads.stg_microsoft_ads__campaign_history", "model.microsoft_ads.stg_microsoft_ads__account_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads__search_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__search_daily_report\"\n\n), \n\nkeywords as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__keyword_history\"\n where is_most_recent_record = True\n),\n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_history\"\n where is_most_recent_record = True\n\n), \n\nad_groups as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_group_history\"\n where is_most_recent_record = True\n\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_history\"\n where is_most_recent_record = True\n\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_history\"\n where is_most_recent_record = True\n\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n ad_groups.ad_group_name,\n report.ad_group_id,\n ads.ad_name,\n report.ad_id,\n report.keyword_id,\n keywords.keyword_name,\n coalesce(report.delivered_match_type, report.bid_match_type) as match_type,\n report.search_query,\n report.device_os,\n report.device_type,\n report.network,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n \n\n\n\n\n\n from report\n left join ads\n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join ad_groups\n on report.ad_group_id = ad_groups.ad_group_id\n and report.source_relation = ad_groups.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join keywords\n on report.keyword_id = keywords.keyword_id\n and report.source_relation = keywords.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17\n\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.microsoft_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "microsoft_ads__campaign_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "microsoft_ads__campaign_report.sql", "original_file_path": "models/microsoft_ads__campaign_report.sql", "unique_id": "model.microsoft_ads.microsoft_ads__campaign_report", "fqn": ["microsoft_ads", "microsoft_ads__campaign_report"], "alias": "microsoft_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "8d5964101af657167486f7e609012d7a5882ce6c6d60aab7075075bff2829929"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily clicks, impressions, spend (and if applicable other passthrough metrics) of ads by campaign, account, campaign type, campaign timezone, campaign status, device os, device type, network and currency code.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_name": {"name": "account_name", "description": "The name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_name"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "campaign_type": {"name": "campaign_type", "description": "The campaign type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaigntype?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_type"]}, "campaign_timezone": {"name": "campaign_timezone", "description": "The time zone associated with this campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_timezone"]}, "campaign_status": {"name": "campaign_status", "description": "The status of this campaign; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaignstatus?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_status"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_value": {"name": "all_conversions_value", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708223.937926, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_microsoft_ads__campaign_daily_report') }}\n\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_microsoft_ads__campaign_history') }}\n where is_most_recent_record = True\n),\n\naccounts as (\n\n select *\n from {{ ref('stg_microsoft_ads__account_history') }}\n where is_most_recent_record = True\n),\n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n campaigns.type as campaign_type,\n campaigns.time_zone as campaign_timezone,\n campaigns.status as campaign_status,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n {{ microsoft_ads_persist_pass_through_columns(pass_through_variable='microsoft_ads__campaign_passthrough_metrics', transform='sum', coalesce_with=0, exclude_fields=['conversions', 'conversions_value', 'all_conversions', 'all_conversions_value']) }} \n\n from report\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n {{ dbt_utils.group_by(13) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__campaign_daily_report", "package": null, "version": null}, {"name": "stg_microsoft_ads__campaign_history", "package": null, "version": null}, {"name": "stg_microsoft_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.microsoft_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__campaign_daily_report", "model.microsoft_ads.stg_microsoft_ads__campaign_history", "model.microsoft_ads.stg_microsoft_ads__account_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_daily_report\"\n\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_history\"\n where is_most_recent_record = True\n),\n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_history\"\n where is_most_recent_record = True\n),\n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_name,\n report.account_id,\n campaigns.campaign_name,\n report.campaign_id,\n campaigns.type as campaign_type,\n campaigns.time_zone as campaign_timezone,\n campaigns.status as campaign_status,\n report.device_os,\n report.device_type,\n report.network,\n report.currency_code,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(report.conversions) as conversions,\n sum(report.conversions_value) as conversions_value,\n sum(report.all_conversions) as all_conversions,\n sum(report.all_conversions_value) as all_conversions_value\n\n \n\n\n\n \n\n from report\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join campaigns\n on report.campaign_id = campaigns.campaign_id\n and report.source_relation = campaigns.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__account_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__account_history", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/stg_microsoft_ads__account_history.sql", "original_file_path": "models/staging/stg_microsoft_ads__account_history.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__account_history", "fqn": ["microsoft_ads", "staging", "stg_microsoft_ads__account_history"], "alias": "stg_microsoft_ads__account_history", "checksum": {"name": "sha256", "checksum": "da2473dc4540e08bcb7f17e397c2243d024dff18acd657774c50906912688ab2"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a version of one or more Microsoft accounts.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "account_name": {"name": "account_name", "description": "The name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_name"]}, "modified_at": {"name": "modified_at", "description": "The time each version of the object was last modified, i.e. when that version of the object was 'created'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.modified_at"]}, "time_zone": {"name": "time_zone", "description": "The time zone associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.time_zone"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/staging/stg_microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.0105443, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_microsoft_ads__account_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_microsoft_ads__account_history_tmp')),\n staging_columns=get_account_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='microsoft_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as account_id,\n name as account_name,\n last_modified_time as modified_at,\n time_zone,\n currency_code,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='microsoft_ads') }} order by last_modified_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__account_history_tmp", "package": null, "version": null}, {"name": "stg_microsoft_ads__account_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.get_account_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__account_history_tmp"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads__account_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_history_tmp\"\n),\n\nfields as (\n\n select\n \n id as id,\n name as name,\n last_modified_time as last_modified_time,\n time_zone as time_zone,\n currency_code as currency_code\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as account_id,\n name as account_name,\n last_modified_time as modified_at,\n time_zone,\n currency_code,\n row_number() over (partition by id order by last_modified_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_group_daily_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/stg_microsoft_ads__ad_group_daily_report.sql", "original_file_path": "models/staging/stg_microsoft_ads__ad_group_daily_report.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report", "fqn": ["microsoft_ads", "staging", "stg_microsoft_ads__ad_group_daily_report"], "alias": "stg_microsoft_ads__ad_group_daily_report", "checksum": {"name": "sha256", "checksum": "9f0ee61715ffc7c14eee054e789aa199218eac607923372c713f84a58a044611"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance by account, campaign, ad group and all non-metric columns.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "language": {"name": "language", "description": "The language that the associated ad was viewed in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.language"]}, "ad_distribution": {"name": "ad_distribution", "description": "The distribution medium associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_distribution"]}, "bid_match_type": {"name": "bid_match_type", "description": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.bid_match_type"]}, "delivered_match_type": {"name": "delivered_match_type", "description": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.delivered_match_type"]}, "top_vs_other": {"name": "top_vs_other", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_value": {"name": "all_conversions_value", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/staging/stg_microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.0163405, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_group_daily_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_microsoft_ads__ad_group_daily_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_microsoft_ads__ad_group_daily_report_tmp')),\n staging_columns=get_ad_group_daily_report_columns()\n )\n }}\n\n \n {{ fivetran_utils.apply_source_relation(package_name='microsoft_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n account_id,\n campaign_id,\n ad_group_id,\n currency_code,\n device_os,\n device_type,\n network,\n language,\n ad_distribution,\n bid_match_type,\n delivered_match_type,\n top_vs_other,\n coalesce(clicks, 0) as clicks, \n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(coalesce(cast(conversions_qualified as {{ dbt.type_int() }}), cast(conversions as {{ dbt.type_int() }})), 0) as conversions,\n coalesce(cast(revenue as {{ dbt.type_float() }}), 0) as conversions_value,\n coalesce(coalesce(cast(all_conversions_qualified as {{ dbt.type_int() }}), cast(all_conversions as {{ dbt.type_int() }})), 0) as all_conversions,\n -- sometimes this field comes in as a string\n coalesce(cast(replace(cast(all_revenue as {{ dbt.type_string() }}), ',', '') as {{ dbt.type_float() }}), 0) as all_conversions_value\n\n {{ microsoft_ads_fill_pass_through_columns(pass_through_fields=var('microsoft_ads__ad_group_passthrough_metrics'), except=['conversions', 'conversions_value', 'all_conversions', 'all_conversions_value']) }}\n\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__ad_group_daily_report_tmp", "package": null, "version": null}, {"name": "stg_microsoft_ads__ad_group_daily_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.get_ad_group_daily_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_int", "macro.dbt.type_float", "macro.dbt.type_string", "macro.microsoft_ads.microsoft_ads_fill_pass_through_columns"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report_tmp"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads__ad_group_daily_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_group_daily_report_tmp\"\n),\n\nfields as (\n\n select\n \n account_id as account_id,\n ad_distribution as ad_distribution,\n ad_group_id as ad_group_id,\n bid_match_type as bid_match_type,\n campaign_id as campaign_id,\n clicks as clicks,\n currency_code as currency_code,\n date as date,\n delivered_match_type as delivered_match_type,\n device_os as device_os,\n device_type as device_type,\n impressions as impressions,\n language as language,\n network as network,\n spend as spend,\n top_vs_other as top_vs_other,\n conversions_qualified as conversions_qualified,\n conversions as conversions,\n revenue as revenue,\n all_conversions as all_conversions,\n all_conversions_qualified as all_conversions_qualified,\n all_revenue as all_revenue\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n account_id,\n campaign_id,\n ad_group_id,\n currency_code,\n device_os,\n device_type,\n network,\n language,\n ad_distribution,\n bid_match_type,\n delivered_match_type,\n top_vs_other,\n coalesce(clicks, 0) as clicks, \n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(coalesce(cast(conversions_qualified as integer), cast(conversions as integer)), 0) as conversions,\n coalesce(cast(revenue as float), 0) as conversions_value,\n coalesce(coalesce(cast(all_conversions_qualified as integer), cast(all_conversions as integer)), 0) as all_conversions,\n -- sometimes this field comes in as a string\n coalesce(cast(replace(cast(all_revenue as TEXT), ',', '') as float), 0) as all_conversions_value\n\n \n\n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__campaign_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__campaign_history", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/stg_microsoft_ads__campaign_history.sql", "original_file_path": "models/staging/stg_microsoft_ads__campaign_history.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__campaign_history", "fqn": ["microsoft_ads", "staging", "stg_microsoft_ads__campaign_history"], "alias": "stg_microsoft_ads__campaign_history", "checksum": {"name": "sha256", "checksum": "7461d5314266a94c55972efcd85eef49a8b57e73185294279d3bb5bcc21c3d2d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a version of one or more Microsoft campaigns.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_name"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "modified_at": {"name": "modified_at", "description": "The time each version of the object was last modified, i.e. when that version of the object was 'created'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.modified_at"]}, "type": {"name": "type", "description": "The campaign type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaigntype?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_type"]}, "time_zone": {"name": "time_zone", "description": "The time zone associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.time_zone"]}, "status": {"name": "status", "description": "The status of this campaign; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaignstatus?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_status"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.is_most_recent_record"]}, "budget": {"name": "budget", "description": "The amount to spend daily across all campaigns that share the budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget"]}, "budget_id": {"name": "budget_id", "description": "The unique Microsoft Advertising identifier of the budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget_id"]}, "budget_type": {"name": "budget_type", "description": "The budget type determines the pace at which the budget is spent throughout the day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget_type"]}, "language": {"name": "language", "description": "The language that the associated ad was viewed in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.language"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/staging/stg_microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.0223126, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_microsoft_ads__campaign_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_microsoft_ads__campaign_history_tmp')),\n staging_columns=get_campaign_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='microsoft_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as campaign_id,\n name as campaign_name,\n account_id,\n modified_time as modified_at,\n type,\n time_zone,\n status,\n budget,\n budget_id,\n budget_type,\n language,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='microsoft_ads') }} order by modified_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__campaign_history_tmp", "package": null, "version": null}, {"name": "stg_microsoft_ads__campaign_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.get_campaign_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__campaign_history_tmp"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads__campaign_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_history_tmp\"\n),\n\nfields as (\n\n select\n \n id as id,\n name as name,\n account_id as account_id,\n modified_time as modified_time,\n type as type,\n time_zone as time_zone,\n status as status,\n cast(null as float) as budget,\n cast(null as integer) as budget_id,\n cast(null as TEXT) as budget_type,\n cast(null as TEXT) as language\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as campaign_id,\n name as campaign_name,\n account_id,\n modified_time as modified_at,\n type,\n time_zone,\n status,\n budget,\n budget_id,\n budget_type,\n language,\n row_number() over (partition by id order by modified_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__campaign_daily_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__campaign_daily_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/stg_microsoft_ads__campaign_daily_report.sql", "original_file_path": "models/staging/stg_microsoft_ads__campaign_daily_report.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__campaign_daily_report", "fqn": ["microsoft_ads", "staging", "stg_microsoft_ads__campaign_daily_report"], "alias": "stg_microsoft_ads__campaign_daily_report", "checksum": {"name": "sha256", "checksum": "dd0603c20a49298dd1f5bd5a29ae83481f0750ce5571e9347659bd74a19c7664"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance by account, campaign and all non-metric columns.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "ad_distribution": {"name": "ad_distribution", "description": "The distribution medium associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_distribution"]}, "bid_match_type": {"name": "bid_match_type", "description": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.bid_match_type"]}, "delivered_match_type": {"name": "delivered_match_type", "description": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.delivered_match_type"]}, "top_vs_other": {"name": "top_vs_other", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "budget_association_status": {"name": "budget_association_status", "description": "Indicates whether or not the campaign is currently spending from the budget mentioned in the BudgetName column. The possible values are `Current` and `Ended`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget_association_status"]}, "budget_name": {"name": "budget_name", "description": "The name of the budget. This column will be empty for unshared budgets.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget_name"]}, "budget_status": {"name": "budget_status", "description": "The budget status. The possible values are `Active` and `Deleted`. This column will be empty for unshared budgets.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget_status"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_value": {"name": "all_conversions_value", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/staging/stg_microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.024501, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_daily_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_microsoft_ads__campaign_daily_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_microsoft_ads__campaign_daily_report_tmp')),\n staging_columns=get_campaign_daily_report_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='microsoft_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n account_id,\n campaign_id,\n currency_code,\n device_os,\n device_type,\n network,\n ad_distribution,\n bid_match_type,\n delivered_match_type,\n top_vs_other,\n budget_association_status,\n budget_name,\n budget_status,\n coalesce(clicks, 0) as clicks, \n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(coalesce(cast(conversions_qualified as {{ dbt.type_int() }}), cast(conversions as {{ dbt.type_int() }})), 0) as conversions,\n coalesce(cast(revenue as {{ dbt.type_float() }}), 0) as conversions_value,\n coalesce(coalesce(cast(all_conversions_qualified as {{ dbt.type_int() }}), cast(all_conversions as {{ dbt.type_int() }})), 0) as all_conversions,\n -- sometimes this field comes in as a string\n coalesce(cast(replace(cast(all_revenue as {{ dbt.type_string() }}), ',', '') as {{ dbt.type_float() }}), 0) as all_conversions_value\n\n {{ microsoft_ads_fill_pass_through_columns(pass_through_fields=var('microsoft_ads__campaign_passthrough_metrics'), except=['conversions', 'conversions_value', 'all_conversions', 'all_conversions_value']) }}\n\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__campaign_daily_report_tmp", "package": null, "version": null}, {"name": "stg_microsoft_ads__campaign_daily_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.get_campaign_daily_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_int", "macro.dbt.type_float", "macro.dbt.type_string", "macro.microsoft_ads.microsoft_ads_fill_pass_through_columns"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__campaign_daily_report_tmp"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads__campaign_daily_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_daily_report_tmp\"\n),\n\nfields as (\n\n select\n \n account_id as account_id,\n ad_distribution as ad_distribution,\n bid_match_type as bid_match_type,\n campaign_id as campaign_id,\n clicks as clicks,\n currency_code as currency_code,\n date as date,\n delivered_match_type as delivered_match_type,\n device_os as device_os,\n device_type as device_type,\n impressions as impressions,\n network as network,\n spend as spend,\n top_vs_other as top_vs_other,\n budget_association_status as budget_association_status,\n budget_name as budget_name,\n cast(null as TEXT) as budget_status,\n conversions_qualified as conversions_qualified,\n conversions as conversions,\n revenue as revenue,\n all_conversions as all_conversions,\n all_conversions_qualified as all_conversions_qualified,\n all_revenue as all_revenue\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n account_id,\n campaign_id,\n currency_code,\n device_os,\n device_type,\n network,\n ad_distribution,\n bid_match_type,\n delivered_match_type,\n top_vs_other,\n budget_association_status,\n budget_name,\n budget_status,\n coalesce(clicks, 0) as clicks, \n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(coalesce(cast(conversions_qualified as integer), cast(conversions as integer)), 0) as conversions,\n coalesce(cast(revenue as float), 0) as conversions_value,\n coalesce(coalesce(cast(all_conversions_qualified as integer), cast(all_conversions as integer)), 0) as all_conversions,\n -- sometimes this field comes in as a string\n coalesce(cast(replace(cast(all_revenue as TEXT), ',', '') as float), 0) as all_conversions_value\n\n \n\n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__ad_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_history", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/stg_microsoft_ads__ad_history.sql", "original_file_path": "models/staging/stg_microsoft_ads__ad_history.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_history", "fqn": ["microsoft_ads", "staging", "stg_microsoft_ads__ad_history"], "alias": "stg_microsoft_ads__ad_history", "checksum": {"name": "sha256", "checksum": "e2052bcacc3f50d7a028ea50cd4c95b47fe9dba75ab5e4d9c7d49e40e27d6ac5"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a version of one or more Microsoft ads.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "ad_id": {"name": "ad_id", "description": "The ID of the corresponding ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_id"]}, "ad_name": {"name": "ad_name", "description": "The name of the corresponding ad; `title_part_1` is used as the default ad name but you may customize this by using the `microsoft_ads__ad_name_selector` variable. For more information, refer to the [README](https://github.com/fivetran/dbt_microsoft_ads/blob/main/README.md#change-how-ad-name-is-determined).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_name"]}, "final_url": {"name": "final_url", "description": "The full URL that the ad links to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.final_url"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "modified_at": {"name": "modified_at", "description": "The time each version of the object was last modified, i.e. when that version of the object was 'created'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.modified_at"]}, "status": {"name": "status", "description": "The status of this ad; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/adstatus?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_status"]}, "type": {"name": "type", "description": "The ad type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/adtype?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_type"]}, "title": {"name": "title", "description": "The title of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.title"]}, "title_part_1": {"name": "title_part_1", "description": "Part 1 of the title.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.title_part_1"]}, "title_part_2": {"name": "title_part_2", "description": "Part 2 of the title.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.title_part_2"]}, "title_part_3": {"name": "title_part_3", "description": "Part 3 of the title.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.title_part_3"]}, "domain": {"name": "domain", "description": "The associated domain that the ad links to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.domain"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/staging/stg_microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.018298, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_microsoft_ads__ad_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_microsoft_ads__ad_history_tmp')),\n staging_columns=get_ad_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='microsoft_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as ad_id,\n {{ var('microsoft_ads__ad_name_selector', 'title_part_1') }} as ad_name,\n title,\n title_part_1,\n title_part_2,\n title_part_3,\n final_url,\n domain,\n ad_group_id,\n modified_time as modified_at,\n status,\n type,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='microsoft_ads') }} order by modified_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__ad_history_tmp", "package": null, "version": null}, {"name": "stg_microsoft_ads__ad_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.get_ad_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__ad_history_tmp"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads__ad_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_history_tmp\"\n),\n\nfields as (\n\n select\n \n id as id,\n title as title,\n title_part_1 as title_part_1,\n title_part_2 as title_part_2,\n title_part_3 as title_part_3,\n final_url as final_url,\n ad_group_id as ad_group_id,\n modified_time as modified_time,\n status as status,\n type as type,\n domain as domain\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as ad_id,\n title_part_1 as ad_name,\n title,\n title_part_1,\n title_part_2,\n title_part_3,\n final_url,\n domain,\n ad_group_id,\n modified_time as modified_at,\n status,\n type,\n row_number() over (partition by id order by modified_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__geographic_daily_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__geographic_daily_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/stg_microsoft_ads__geographic_daily_report.sql", "original_file_path": "models/staging/stg_microsoft_ads__geographic_daily_report.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__geographic_daily_report", "fqn": ["microsoft_ads", "staging", "stg_microsoft_ads__geographic_daily_report"], "alias": "stg_microsoft_ads__geographic_daily_report", "checksum": {"name": "sha256", "checksum": "6ed8f9ebeab28bb8bfbe642e75ee4e6d8874171d67926a8bb68adbd804e485cd"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance segmented by geographic location and related attributes.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "country": {"name": "country", "description": "The country or region where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.country"]}, "region": {"name": "region", "description": "The state or geographic region where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.state"]}, "county": {"name": "county", "description": "The county where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.county"]}, "postal_code": {"name": "postal_code", "description": "The postal code where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.postal_code"]}, "city": {"name": "city", "description": "The city where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.city"]}, "metro_area": {"name": "metro_area", "description": "The metro area (Microsoft Market Area in the United States) where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.metro_area"]}, "location_type": {"name": "location_type", "description": "The location type used to deliver ads. Values include \"Physical location\" and \"Location of interest\". \n\n\"Physical location\" indicates the user was in the corresponding City, Country, MetroArea, or State. \"Location of interest\" indicates the user was searching for or viewing pages about the location.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.location_type"]}, "most_specific_location": {"name": "most_specific_location", "description": "The most specific location used to deliver ads. If postal code is available, it is prioritized; otherwise, it may match city or country/region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.most_specific_location"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "language": {"name": "language", "description": "The language of the publisher where the ad was shown.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_distribution": {"name": "ad_distribution", "description": "The distribution medium associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_distribution"]}, "bid_match_type": {"name": "bid_match_type", "description": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.bid_match_type"]}, "delivered_match_type": {"name": "delivered_match_type", "description": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.delivered_match_type"]}, "top_vs_other": {"name": "top_vs_other", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "goal": {"name": "goal", "description": "The name of the goal you set for the conversions you want, meaning actions customers take after clicking your ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.goal"]}, "location_id": {"name": "location_id", "description": "The Microsoft Advertising identifier of the location where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.location_id"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_value": {"name": "all_conversions_value", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/staging/stg_microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.1335242, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__geographic_daily_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True) and var('microsoft_ads__using_geographic_daily_report', False)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_microsoft_ads__geographic_daily_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_microsoft_ads__geographic_daily_report_tmp')),\n staging_columns=get_geographic_daily_report_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='microsoft_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n date as date_day,\n account_id,\n campaign_id,\n ad_group_id,\n country,\n state as region,\n county,\n postal_code,\n city,\n metro_area,\n location_id,\n location_type,\n most_specific_location,\n currency_code,\n device_os,\n device_type,\n network,\n language,\n ad_distribution,\n bid_match_type,\n delivered_match_type,\n top_vs_other,\n goal,\n coalesce(clicks, 0) as clicks, \n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(coalesce(cast(conversions_qualified as {{ dbt.type_int() }}), cast(conversions as {{ dbt.type_int() }})), 0) as conversions,\n coalesce(cast(revenue as {{ dbt.type_float() }}), 0) as conversions_value,\n coalesce(coalesce(cast(all_conversions_qualified as {{ dbt.type_int() }}), cast(all_conversions as {{ dbt.type_int() }})), 0) as all_conversions,\n -- sometimes this field comes in as a string\n coalesce(cast(replace(cast(all_revenue as {{ dbt.type_string() }}), ',', '') as {{ dbt.type_float() }}), 0) as all_conversions_value\n\n {{ microsoft_ads_fill_pass_through_columns(pass_through_fields=var('microsoft_ads__geographic_passthrough_metrics')) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__geographic_daily_report_tmp", "package": null, "version": null}, {"name": "stg_microsoft_ads__geographic_daily_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.get_geographic_daily_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_int", "macro.dbt.type_float", "macro.dbt.type_string", "macro.microsoft_ads.microsoft_ads_fill_pass_through_columns"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__geographic_daily_report_tmp"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads__geographic_daily_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__geographic_daily_report_tmp\"\n),\n\nfields as (\n\n select\n \n account_id as account_id,\n ad_distribution as ad_distribution,\n ad_group_id as ad_group_id,\n all_conversions as all_conversions,\n all_conversions_qualified as all_conversions_qualified,\n all_revenue as all_revenue,\n bid_match_type as bid_match_type,\n campaign_id as campaign_id,\n city as city,\n clicks as clicks,\n conversions as conversions,\n conversions_qualified as conversions_qualified,\n country as country,\n county as county,\n currency_code as currency_code,\n date as date,\n delivered_match_type as delivered_match_type,\n device_os as device_os,\n device_type as device_type,\n goal as goal,\n impressions as impressions,\n language as language,\n location_id as location_id,\n location_type as location_type,\n metro_area as metro_area,\n cast(null as TEXT) as most_specific_location,\n network as network,\n postal_code as postal_code,\n spend as spend,\n state as state,\n top_vs_other as top_vs_other,\n revenue as revenue\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation,\n date as date_day,\n account_id,\n campaign_id,\n ad_group_id,\n country,\n state as region,\n county,\n postal_code,\n city,\n metro_area,\n location_id,\n location_type,\n most_specific_location,\n currency_code,\n device_os,\n device_type,\n network,\n language,\n ad_distribution,\n bid_match_type,\n delivered_match_type,\n top_vs_other,\n goal,\n coalesce(clicks, 0) as clicks, \n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(coalesce(cast(conversions_qualified as integer), cast(conversions as integer)), 0) as conversions,\n coalesce(cast(revenue as float), 0) as conversions_value,\n coalesce(coalesce(cast(all_conversions_qualified as integer), cast(all_conversions as integer)), 0) as all_conversions,\n -- sometimes this field comes in as a string\n coalesce(cast(replace(cast(all_revenue as TEXT), ',', '') as float), 0) as all_conversions_value\n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__ad_group_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_group_history", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/stg_microsoft_ads__ad_group_history.sql", "original_file_path": "models/staging/stg_microsoft_ads__ad_group_history.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_group_history", "fqn": ["microsoft_ads", "staging", "stg_microsoft_ads__ad_group_history"], "alias": "stg_microsoft_ads__ad_group_history", "checksum": {"name": "sha256", "checksum": "9e0c0dde6eb512f014f1b37633a9cec7f4eef47fec9a8b55c1541f0ed964852c"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a version of one or more Microsoft ad groups.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "The name of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "modified_at": {"name": "modified_at", "description": "The time each version of the object was last modified, i.e. when that version of the object was 'created'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.modified_at"]}, "start_date": {"name": "start_date", "description": "The date in which an ad group starts running.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.start_date"]}, "end_date": {"name": "end_date", "description": "The date in which this ad group will no longer run.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.end_date"]}, "status": {"name": "status", "description": "The status of this ad group; see the following [documentation](https://help.ads.microsoft.com/apex/index/3/en/53094) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_status"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/staging/stg_microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.0142395, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_group_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_microsoft_ads__ad_group_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_microsoft_ads__ad_group_history_tmp')),\n staging_columns=get_ad_group_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='microsoft_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as ad_group_id,\n name as ad_group_name,\n campaign_id,\n modified_time as modified_at,\n start_date,\n end_date,\n status,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='microsoft_ads') }} order by modified_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__ad_group_history_tmp", "package": null, "version": null}, {"name": "stg_microsoft_ads__ad_group_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.get_ad_group_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__ad_group_history_tmp"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads__ad_group_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_group_history_tmp\"\n),\n\nfields as (\n\n select\n \n id as id,\n name as name,\n campaign_id as campaign_id,\n modified_time as modified_time,\n start_date as start_date,\n end_date as end_date,\n status as status\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as ad_group_id,\n name as ad_group_name,\n campaign_id,\n modified_time as modified_at,\n start_date,\n end_date,\n status,\n row_number() over (partition by id order by modified_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__keyword_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__keyword_history", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/stg_microsoft_ads__keyword_history.sql", "original_file_path": "models/staging/stg_microsoft_ads__keyword_history.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__keyword_history", "fqn": ["microsoft_ads", "staging", "stg_microsoft_ads__keyword_history"], "alias": "stg_microsoft_ads__keyword_history", "checksum": {"name": "sha256", "checksum": "44aa410989b246765c4a57e2faafe8294baa5041a493d3f1e927c6869e8ef953"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents a version of one or more Microsoft keywords.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "keyword_id": {"name": "keyword_id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.keyword_id"]}, "keyword_name": {"name": "keyword_name", "description": "The keyword(s) associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.keyword_name"]}, "modified_at": {"name": "modified_at", "description": "The time each version of the object was last modified, i.e. when that version of the object was 'created'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.modified_at"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "match_type": {"name": "match_type", "description": "The match type associated with this record; values contain but may not be limited to 'Broad', 'Exact', 'Phrase'. Please refer to Microsoft Ad's [documentation](https://help.ads.microsoft.com/#apex/ads/en/50822/1).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.match_type"]}, "status": {"name": "status", "description": "The status of this keyword; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/keywordstatus?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.keyword_status"]}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.is_most_recent_record"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/staging/stg_microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.026114, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__keyword_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_microsoft_ads__keyword_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_microsoft_ads__keyword_history_tmp')),\n staging_columns=get_keyword_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='microsoft_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as keyword_id,\n name as keyword_name,\n modified_time as modified_at,\n ad_group_id,\n match_type,\n status,\n row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='microsoft_ads') }} order by modified_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__keyword_history_tmp", "package": null, "version": null}, {"name": "stg_microsoft_ads__keyword_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.get_keyword_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__keyword_history_tmp"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads__keyword_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__keyword_history_tmp\"\n),\n\nfields as (\n\n select\n \n id as id,\n name as name,\n modified_time as modified_time,\n ad_group_id as ad_group_id,\n match_type as match_type,\n status as status\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n id as keyword_id,\n name as keyword_name,\n modified_time as modified_at,\n ad_group_id,\n match_type,\n status,\n row_number() over (partition by id order by modified_time desc) = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__search_daily_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__search_daily_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/stg_microsoft_ads__search_daily_report.sql", "original_file_path": "models/staging/stg_microsoft_ads__search_daily_report.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__search_daily_report", "fqn": ["microsoft_ads", "staging", "stg_microsoft_ads__search_daily_report"], "alias": "stg_microsoft_ads__search_daily_report", "checksum": {"name": "sha256", "checksum": "51ca576a5612d5524b635ee465d36727a75d06e284313ace521de8593a6d35a0"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance by account, campaign, ad group, ad, keyword and all non-metric columns.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "ad_id": {"name": "ad_id", "description": "The ID of the corresponding ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_id"]}, "keyword_id": {"name": "keyword_id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.keyword_id"]}, "search_query": {"name": "search_query", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "language": {"name": "language", "description": "The language that the associated ad was viewed in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.language"]}, "ad_distribution": {"name": "ad_distribution", "description": "The distribution medium associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_distribution"]}, "bid_match_type": {"name": "bid_match_type", "description": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.bid_match_type"]}, "delivered_match_type": {"name": "delivered_match_type", "description": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.delivered_match_type"]}, "top_vs_other": {"name": "top_vs_other", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_value": {"name": "all_conversions_value", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/staging/stg_microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.0309522, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__search_daily_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_microsoft_ads__search_daily_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_microsoft_ads__search_daily_report_tmp')),\n staging_columns=get_search_daily_report_columns()\n )\n }}\n\n \n {{ fivetran_utils.apply_source_relation(package_name='microsoft_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n account_id,\n campaign_id,\n ad_group_id,\n ad_id,\n keyword_id,\n search_query,\n device_os,\n device_type,\n network,\n language,\n bid_match_type,\n delivered_match_type,\n top_vs_other,\n coalesce(clicks, 0) as clicks, \n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(coalesce(cast(conversions_qualified as {{ dbt.type_int() }}), cast(conversions as {{ dbt.type_int() }})), 0) as conversions,\n coalesce(cast(revenue as {{ dbt.type_float() }}), 0) as conversions_value,\n coalesce(coalesce(cast(all_conversions_qualified as {{ dbt.type_int() }}), cast(all_conversions as {{ dbt.type_int() }})), 0) as all_conversions,\n -- sometimes this field comes in as a string\n coalesce(cast(replace(cast(all_revenue as {{ dbt.type_string() }}), ',', '') as {{ dbt.type_float() }}), 0) as all_conversions_value\n\n {{ microsoft_ads_fill_pass_through_columns(pass_through_fields=var('microsoft_ads__search_passthrough_metrics'), except=['conversions', 'conversions_value', 'all_conversions', 'all_conversions_value']) }}\n\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__search_daily_report_tmp", "package": null, "version": null}, {"name": "stg_microsoft_ads__search_daily_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.get_search_daily_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_int", "macro.dbt.type_float", "macro.dbt.type_string", "macro.microsoft_ads.microsoft_ads_fill_pass_through_columns"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__search_daily_report_tmp"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads__search_daily_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__search_daily_report_tmp\"\n),\n\nfields as (\n\n select\n \n account_id as account_id,\n ad_group_id as ad_group_id,\n ad_id as ad_id,\n bid_match_type as bid_match_type,\n campaign_id as campaign_id,\n clicks as clicks,\n date as date,\n delivered_match_type as delivered_match_type,\n device_os as device_os,\n device_type as device_type,\n impressions as impressions,\n keyword_id as keyword_id,\n language as language,\n network as network,\n search_query as search_query,\n spend as spend,\n top_vs_other as top_vs_other,\n conversions_qualified as conversions_qualified,\n conversions as conversions,\n revenue as revenue,\n all_conversions as all_conversions,\n all_conversions_qualified as all_conversions_qualified,\n all_revenue as all_revenue\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n account_id,\n campaign_id,\n ad_group_id,\n ad_id,\n keyword_id,\n search_query,\n device_os,\n device_type,\n network,\n language,\n bid_match_type,\n delivered_match_type,\n top_vs_other,\n coalesce(clicks, 0) as clicks, \n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(coalesce(cast(conversions_qualified as integer), cast(conversions as integer)), 0) as conversions,\n coalesce(cast(revenue as float), 0) as conversions_value,\n coalesce(coalesce(cast(all_conversions_qualified as integer), cast(all_conversions as integer)), 0) as all_conversions,\n -- sometimes this field comes in as a string\n coalesce(cast(replace(cast(all_revenue as TEXT), ',', '') as float), 0) as all_conversions_value\n\n \n\n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__account_daily_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__account_daily_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/stg_microsoft_ads__account_daily_report.sql", "original_file_path": "models/staging/stg_microsoft_ads__account_daily_report.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__account_daily_report", "fqn": ["microsoft_ads", "staging", "stg_microsoft_ads__account_daily_report"], "alias": "stg_microsoft_ads__account_daily_report", "checksum": {"name": "sha256", "checksum": "1c54b56f644cf726024d377ec3f743d37978ada685cfde1906015f843afb4e95"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance by account and all non-metric columns.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "ad_distribution": {"name": "ad_distribution", "description": "The distribution medium associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_distribution"]}, "bid_match_type": {"name": "bid_match_type", "description": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.bid_match_type"]}, "delivered_match_type": {"name": "delivered_match_type", "description": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.delivered_match_type"]}, "top_vs_other": {"name": "top_vs_other", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/staging/stg_microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.0125139, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_daily_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_microsoft_ads__account_daily_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_microsoft_ads__account_daily_report_tmp')),\n staging_columns=get_account_daily_report_columns()\n )\n }}\n\n \n {{ fivetran_utils.apply_source_relation(package_name='microsoft_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n account_id,\n device_os,\n device_type,\n network,\n currency_code, \n ad_distribution,\n bid_match_type,\n delivered_match_type,\n top_vs_other,\n coalesce(clicks, 0) as clicks, \n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(coalesce(cast(conversions_qualified as {{ dbt.type_int() }}), cast(conversions as {{ dbt.type_int() }})), 0) as conversions,\n coalesce(cast(revenue as {{ dbt.type_float() }}), 0) as conversions_value,\n coalesce(cast(all_conversions_qualified as {{ dbt.type_int() }}), 0) as all_conversions \n -- this report does not have an all_revenue or an all_conversions field\n\n {{ microsoft_ads_fill_pass_through_columns(pass_through_fields=var('microsoft_ads__account_passthrough_metrics'), except=['conversions', 'conversions_value', 'all_conversions']) }}\n\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__account_daily_report_tmp", "package": null, "version": null}, {"name": "stg_microsoft_ads__account_daily_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.get_account_daily_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_int", "macro.dbt.type_float", "macro.microsoft_ads.microsoft_ads_fill_pass_through_columns"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__account_daily_report_tmp"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads__account_daily_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_daily_report_tmp\"\n),\n\nfields as (\n\n select\n \n account_id as account_id,\n ad_distribution as ad_distribution,\n bid_match_type as bid_match_type,\n clicks as clicks,\n currency_code as currency_code,\n date as date,\n delivered_match_type as delivered_match_type,\n device_os as device_os,\n device_type as device_type,\n impressions as impressions,\n network as network,\n spend as spend,\n top_vs_other as top_vs_other,\n conversions_qualified as conversions_qualified,\n conversions as conversions,\n revenue as revenue,\n all_conversions_qualified as all_conversions_qualified\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n account_id,\n device_os,\n device_type,\n network,\n currency_code, \n ad_distribution,\n bid_match_type,\n delivered_match_type,\n top_vs_other,\n coalesce(clicks, 0) as clicks, \n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(coalesce(cast(conversions_qualified as integer), cast(conversions as integer)), 0) as conversions,\n coalesce(cast(revenue as float), 0) as conversions_value,\n coalesce(cast(all_conversions_qualified as integer), 0) as all_conversions \n -- this report does not have an all_revenue or an all_conversions field\n\n \n\n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__keyword_daily_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__keyword_daily_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/stg_microsoft_ads__keyword_daily_report.sql", "original_file_path": "models/staging/stg_microsoft_ads__keyword_daily_report.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__keyword_daily_report", "fqn": ["microsoft_ads", "staging", "stg_microsoft_ads__keyword_daily_report"], "alias": "stg_microsoft_ads__keyword_daily_report", "checksum": {"name": "sha256", "checksum": "f792964990f9e62a112f2db3bbd75da5d623c56af7effd0c8ca36b550b0a9526"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance by account, campaign, ad group, ad, keyword and all non-metric columns.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "ad_id": {"name": "ad_id", "description": "The ID of the corresponding ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_id"]}, "keyword_id": {"name": "keyword_id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.keyword_id"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "language": {"name": "language", "description": "The language that the associated ad was viewed in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.language"]}, "ad_distribution": {"name": "ad_distribution", "description": "The distribution medium associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_distribution"]}, "bid_match_type": {"name": "bid_match_type", "description": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.bid_match_type"]}, "delivered_match_type": {"name": "delivered_match_type", "description": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.delivered_match_type"]}, "top_vs_other": {"name": "top_vs_other", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_value": {"name": "all_conversions_value", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/staging/stg_microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.0286508, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__keyword_daily_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_microsoft_ads__keyword_daily_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_microsoft_ads__keyword_daily_report_tmp')),\n staging_columns=get_keyword_daily_report_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='microsoft_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n account_id,\n campaign_id,\n ad_group_id,\n ad_id,\n keyword_id,\n currency_code,\n device_os,\n device_type,\n network,\n language,\n ad_distribution,\n bid_match_type,\n delivered_match_type,\n top_vs_other,\n coalesce(clicks, 0) as clicks, \n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(coalesce(cast(conversions_qualified as {{ dbt.type_int() }}), cast(conversions as {{ dbt.type_int() }})), 0) as conversions,\n coalesce(cast(revenue as {{ dbt.type_float() }}), 0) as conversions_value,\n coalesce(coalesce(cast(all_conversions_qualified as {{ dbt.type_int() }}), cast(all_conversions as {{ dbt.type_int() }})), 0) as all_conversions,\n -- sometimes this field comes in as a string\n coalesce(cast(replace(cast(all_revenue as {{ dbt.type_string() }}), ',', '') as {{ dbt.type_float() }}), 0) as all_conversions_value\n\n {{ microsoft_ads_fill_pass_through_columns(pass_through_fields=var('microsoft_ads__keyword_passthrough_metrics'), except=['conversions', 'conversions_value', 'all_conversions', 'all_conversions_value']) }}\n \n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__keyword_daily_report_tmp", "package": null, "version": null}, {"name": "stg_microsoft_ads__keyword_daily_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.get_keyword_daily_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_int", "macro.dbt.type_float", "macro.dbt.type_string", "macro.microsoft_ads.microsoft_ads_fill_pass_through_columns"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__keyword_daily_report_tmp"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads__keyword_daily_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__keyword_daily_report_tmp\"\n),\n\nfields as (\n\n select\n \n account_id as account_id,\n ad_distribution as ad_distribution,\n ad_group_id as ad_group_id,\n ad_id as ad_id,\n bid_match_type as bid_match_type,\n campaign_id as campaign_id,\n clicks as clicks,\n currency_code as currency_code,\n date as date,\n delivered_match_type as delivered_match_type,\n device_os as device_os,\n device_type as device_type,\n impressions as impressions,\n keyword_id as keyword_id,\n language as language,\n network as network,\n spend as spend,\n top_vs_other as top_vs_other,\n conversions_qualified as conversions_qualified,\n conversions as conversions,\n revenue as revenue,\n all_conversions as all_conversions,\n all_conversions_qualified as all_conversions_qualified,\n all_revenue as all_revenue\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n account_id,\n campaign_id,\n ad_group_id,\n ad_id,\n keyword_id,\n currency_code,\n device_os,\n device_type,\n network,\n language,\n ad_distribution,\n bid_match_type,\n delivered_match_type,\n top_vs_other,\n coalesce(clicks, 0) as clicks, \n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(coalesce(cast(conversions_qualified as integer), cast(conversions as integer)), 0) as conversions,\n coalesce(cast(revenue as float), 0) as conversions_value,\n coalesce(coalesce(cast(all_conversions_qualified as integer), cast(all_conversions as integer)), 0) as all_conversions,\n -- sometimes this field comes in as a string\n coalesce(cast(replace(cast(all_revenue as TEXT), ',', '') as float), 0) as all_conversions_value\n\n \n\n\n\n\n \n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__ad_daily_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_daily_report", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/stg_microsoft_ads__ad_daily_report.sql", "original_file_path": "models/staging/stg_microsoft_ads__ad_daily_report.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_daily_report", "fqn": ["microsoft_ads", "staging", "stg_microsoft_ads__ad_daily_report"], "alias": "stg_microsoft_ads__ad_daily_report", "checksum": {"name": "sha256", "checksum": "6d31980f62cd2bfcaa8a3596e06bede4405ff2112189201fce0243e5b2b233af"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table represents the daily performance by account, campaign, ad group, ad and all non-metric columns.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "ad_id": {"name": "ad_id", "description": "The ID of the corresponding ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_id"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "language": {"name": "language", "description": "The language that the associated ad was viewed in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.language"]}, "ad_distribution": {"name": "ad_distribution", "description": "The distribution medium associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_distribution"]}, "bid_match_type": {"name": "bid_match_type", "description": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.bid_match_type"]}, "delivered_match_type": {"name": "delivered_match_type", "description": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.delivered_match_type"]}, "top_vs_other": {"name": "top_vs_other", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_value": {"name": "all_conversions_value", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "microsoft_ads://models/staging/stg_microsoft_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.0205176, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_daily_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_microsoft_ads__ad_daily_report_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_microsoft_ads__ad_daily_report_tmp')),\n staging_columns=get_ad_daily_report_columns()\n )\n }}\n\n \n {{ fivetran_utils.apply_source_relation(package_name='microsoft_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n account_id,\n campaign_id,\n ad_group_id,\n ad_id,\n currency_code,\n device_os,\n device_type,\n network,\n language,\n ad_distribution,\n bid_match_type,\n delivered_match_type,\n top_vs_other,\n coalesce(clicks, 0) as clicks, \n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(coalesce(cast(conversions_qualified as {{ dbt.type_int() }}), cast(conversions as {{ dbt.type_int() }})), 0) as conversions,\n coalesce(cast(revenue as {{ dbt.type_float() }}), 0) as conversions_value,\n coalesce(coalesce(cast(all_conversions_qualified as {{ dbt.type_int() }}), cast(all_conversions as {{ dbt.type_int() }})), 0) as all_conversions,\n -- sometimes this field comes in as a string\n coalesce(cast(replace(cast(all_revenue as {{ dbt.type_string() }}), ',', '') as {{ dbt.type_float() }}), 0) as all_conversions_value\n\n {{ microsoft_ads_fill_pass_through_columns(pass_through_fields=var('microsoft_ads__ad_passthrough_metrics'), except=['conversions', 'conversions_value', 'all_conversions', 'all_conversions_value']) }}\n\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__ad_daily_report_tmp", "package": null, "version": null}, {"name": "stg_microsoft_ads__ad_daily_report_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.microsoft_ads.get_ad_daily_report_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_int", "macro.dbt.type_float", "macro.dbt.type_string", "macro.microsoft_ads.microsoft_ads_fill_pass_through_columns"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__ad_daily_report_tmp"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads__ad_daily_report.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_daily_report_tmp\"\n),\n\nfields as (\n\n select\n \n account_id as account_id,\n ad_distribution as ad_distribution,\n ad_group_id as ad_group_id,\n ad_id as ad_id,\n bid_match_type as bid_match_type,\n campaign_id as campaign_id,\n clicks as clicks,\n currency_code as currency_code,\n date as date,\n delivered_match_type as delivered_match_type,\n device_os as device_os,\n device_type as device_type,\n impressions as impressions,\n language as language,\n network as network,\n spend as spend,\n top_vs_other as top_vs_other,\n conversions_qualified as conversions_qualified,\n conversions as conversions,\n revenue as revenue,\n all_conversions as all_conversions,\n all_conversions_qualified as all_conversions_qualified,\n all_revenue as all_revenue\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n date as date_day,\n account_id,\n campaign_id,\n ad_group_id,\n ad_id,\n currency_code,\n device_os,\n device_type,\n network,\n language,\n ad_distribution,\n bid_match_type,\n delivered_match_type,\n top_vs_other,\n coalesce(clicks, 0) as clicks, \n coalesce(impressions, 0) as impressions,\n coalesce(spend, 0) as spend,\n coalesce(coalesce(cast(conversions_qualified as integer), cast(conversions as integer)), 0) as conversions,\n coalesce(cast(revenue as float), 0) as conversions_value,\n coalesce(coalesce(cast(all_conversions_qualified as integer), cast(all_conversions as integer)), 0) as all_conversions,\n -- sometimes this field comes in as a string\n coalesce(cast(replace(cast(all_revenue as TEXT), ',', '') as float), 0) as all_conversions_value\n\n \n\n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__campaign_daily_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__campaign_daily_report_tmp", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/tmp/stg_microsoft_ads__campaign_daily_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_microsoft_ads__campaign_daily_report_tmp.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__campaign_daily_report_tmp", "fqn": ["microsoft_ads", "staging", "tmp", "stg_microsoft_ads__campaign_daily_report_tmp"], "alias": "stg_microsoft_ads__campaign_daily_report_tmp", "checksum": {"name": "sha256", "checksum": "f5818c23e17da9b3c048c225cb76fe74f2d1d93c62b3d5ae60f50ce35c29fbcd"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708220.8127332, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_daily_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\n{% if var('microsoft_ads_union_schemas', []) | length > 0 or var('microsoft_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_performance_daily_report', \n database_variable='microsoft_ads_database', \n schema_variable='microsoft_ads_schema', \n default_database=target.database,\n default_schema='microsoft_ads',\n default_variable='campaign_performance_daily_report',\n union_schema_variable='microsoft_ads_union_schemas',\n union_database_variable='microsoft_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='microsoft_ads_sources',\n single_source_name='microsoft_ads',\n single_table_name='campaign_performance_daily_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["microsoft_ads", "campaign_performance_daily_report"], ["microsoft_ads", "campaign_performance_daily_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.microsoft_ads.microsoft_ads.campaign_performance_daily_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/tmp/stg_microsoft_ads__campaign_daily_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: microsoft_ads_campaign_performance_daily_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: microsoft_ads_campaign_performance_daily_report_data\n\n\n select\n \"date\",\n \"account_id\",\n \"campaign_id\",\n \"currency_code\",\n \"device_os\",\n \"device_type\",\n \"network\",\n \"ad_distribution\",\n \"bid_match_type\",\n \"delivered_match_type\",\n \"top_vs_other\",\n \"budget_association_status\",\n \"budget_name\",\n \"clicks\",\n \"impressions\",\n \"spend\",\n \"conversions_qualified\",\n \"conversions\",\n \"revenue\",\n \"all_conversions_qualified\",\n \"all_conversions\",\n \"all_revenue\"\n from \"postgres\".\"public\".\"microsoft_ads_campaign_performance_daily_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__ad_group_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_group_history_tmp", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/tmp/stg_microsoft_ads__ad_group_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_microsoft_ads__ad_group_history_tmp.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_group_history_tmp", "fqn": ["microsoft_ads", "staging", "tmp", "stg_microsoft_ads__ad_group_history_tmp"], "alias": "stg_microsoft_ads__ad_group_history_tmp", "checksum": {"name": "sha256", "checksum": "ee363544afb12a8c7cce0fb6b29796d00dcaae9ea60a190b54cb35154df6e7ad"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708220.8235295, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_group_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\n{% if var('microsoft_ads_union_schemas', []) | length > 0 or var('microsoft_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_group_history', \n database_variable='microsoft_ads_database', \n schema_variable='microsoft_ads_schema', \n default_database=target.database,\n default_schema='microsoft_ads',\n default_variable='ad_group_history',\n union_schema_variable='microsoft_ads_union_schemas',\n union_database_variable='microsoft_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='microsoft_ads_sources',\n single_source_name='microsoft_ads',\n single_table_name='ad_group_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["microsoft_ads", "ad_group_history"], ["microsoft_ads", "ad_group_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.microsoft_ads.microsoft_ads.ad_group_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/tmp/stg_microsoft_ads__ad_group_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: microsoft_ads_ad_group_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: microsoft_ads_ad_group_history_data\n\n\n select\n \"id\",\n \"name\",\n \"campaign_id\",\n \"modified_time\",\n \"start_date\",\n \"end_date\",\n \"status\"\n from \"postgres\".\"public\".\"microsoft_ads_ad_group_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__account_daily_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__account_daily_report_tmp", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/tmp/stg_microsoft_ads__account_daily_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_microsoft_ads__account_daily_report_tmp.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__account_daily_report_tmp", "fqn": ["microsoft_ads", "staging", "tmp", "stg_microsoft_ads__account_daily_report_tmp"], "alias": "stg_microsoft_ads__account_daily_report_tmp", "checksum": {"name": "sha256", "checksum": "e7b1c1bf466d3ea1cba1ad13c0f37d9d35d24bb6e07581387b0f1c09114d7ed9"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708220.8350008, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_daily_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\n{% if var('microsoft_ads_union_schemas', []) | length > 0 or var('microsoft_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='account_performance_daily_report', \n database_variable='microsoft_ads_database', \n schema_variable='microsoft_ads_schema', \n default_database=target.database,\n default_schema='microsoft_ads',\n default_variable='account_performance_daily_report',\n union_schema_variable='microsoft_ads_union_schemas',\n union_database_variable='microsoft_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='microsoft_ads_sources',\n single_source_name='microsoft_ads',\n single_table_name='account_performance_daily_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["microsoft_ads", "account_performance_daily_report"], ["microsoft_ads", "account_performance_daily_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.microsoft_ads.microsoft_ads.account_performance_daily_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/tmp/stg_microsoft_ads__account_daily_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: microsoft_ads_account_performance_daily_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: microsoft_ads_account_performance_daily_report_data\n\n\n select\n \"date\",\n \"account_id\",\n \"device_os\",\n \"device_type\",\n \"network\",\n \"currency_code\",\n \"ad_distribution\",\n \"bid_match_type\",\n \"delivered_match_type\",\n \"top_vs_other\",\n \"clicks\",\n \"impressions\",\n \"spend\",\n \"conversions_qualified\",\n \"conversions\",\n \"revenue\",\n \"all_conversions_qualified\"\n from \"postgres\".\"public\".\"microsoft_ads_account_performance_daily_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__search_daily_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__search_daily_report_tmp", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/tmp/stg_microsoft_ads__search_daily_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_microsoft_ads__search_daily_report_tmp.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__search_daily_report_tmp", "fqn": ["microsoft_ads", "staging", "tmp", "stg_microsoft_ads__search_daily_report_tmp"], "alias": "stg_microsoft_ads__search_daily_report_tmp", "checksum": {"name": "sha256", "checksum": "b404f0b72b048f657f909482bccbd385efdd8ee703ebce1ae8113ecdc7d2ea0e"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708220.8456402, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__search_daily_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\n{% if var('microsoft_ads_union_schemas', []) | length > 0 or var('microsoft_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='search_query_performance_daily_report', \n database_variable='microsoft_ads_database', \n schema_variable='microsoft_ads_schema', \n default_database=target.database,\n default_schema='microsoft_ads',\n default_variable='search_query_performance_daily_report',\n union_schema_variable='microsoft_ads_union_schemas',\n union_database_variable='microsoft_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='microsoft_ads_sources',\n single_source_name='microsoft_ads',\n single_table_name='search_query_performance_daily_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["microsoft_ads", "search_query_performance_daily_report"], ["microsoft_ads", "search_query_performance_daily_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.microsoft_ads.microsoft_ads.search_query_performance_daily_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/tmp/stg_microsoft_ads__search_daily_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: microsoft_ads_search_query_performance_daily_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: microsoft_ads_search_performance_daily_report_data\n\n\n select\n \"date\",\n \"account_id\",\n \"campaign_id\",\n \"ad_group_id\",\n \"ad_id\",\n \"keyword_id\",\n \"search_query\",\n \"device_os\",\n \"device_type\",\n \"network\",\n \"language\",\n \"bid_match_type\",\n \"delivered_match_type\",\n \"top_vs_other\",\n \"clicks\",\n \"impressions\",\n \"spend\",\n \"conversions_qualified\",\n \"conversions\",\n \"revenue\",\n \"all_conversions_qualified\",\n \"all_conversions\",\n \"all_revenue\"\n from \"postgres\".\"public\".\"microsoft_ads_search_performance_daily_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__account_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__account_history_tmp", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/tmp/stg_microsoft_ads__account_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_microsoft_ads__account_history_tmp.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__account_history_tmp", "fqn": ["microsoft_ads", "staging", "tmp", "stg_microsoft_ads__account_history_tmp"], "alias": "stg_microsoft_ads__account_history_tmp", "checksum": {"name": "sha256", "checksum": "af8658e1da86e23fc4c953aeab5c66bf3be3dbc5a324ad6c1a2fff4c083341ef"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708220.856342, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\n{% if var('microsoft_ads_union_schemas', []) | length > 0 or var('microsoft_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='account_history', \n database_variable='microsoft_ads_database', \n schema_variable='microsoft_ads_schema', \n default_database=target.database,\n default_schema='microsoft_ads',\n default_variable='account_history',\n union_schema_variable='microsoft_ads_union_schemas',\n union_database_variable='microsoft_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='microsoft_ads_sources',\n single_source_name='microsoft_ads',\n single_table_name='account_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["microsoft_ads", "account_history"], ["microsoft_ads", "account_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.microsoft_ads.microsoft_ads.account_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/tmp/stg_microsoft_ads__account_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: microsoft_ads_account_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: microsoft_ads_account_history_data\n\n\n select\n \"id\",\n \"name\",\n \"last_modified_time\",\n \"time_zone\",\n \"currency_code\"\n from \"postgres\".\"public\".\"microsoft_ads_account_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__ad_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_history_tmp", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/tmp/stg_microsoft_ads__ad_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_microsoft_ads__ad_history_tmp.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_history_tmp", "fqn": ["microsoft_ads", "staging", "tmp", "stg_microsoft_ads__ad_history_tmp"], "alias": "stg_microsoft_ads__ad_history_tmp", "checksum": {"name": "sha256", "checksum": "00b2b4fb3306482edbb9b6451aa4255365e2c539d8fea3f319bb504daeb1d084"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708220.8680272, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\n{% if var('microsoft_ads_union_schemas', []) | length > 0 or var('microsoft_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_history', \n database_variable='microsoft_ads_database', \n schema_variable='microsoft_ads_schema', \n default_database=target.database,\n default_schema='microsoft_ads',\n default_variable='ad_history',\n union_schema_variable='microsoft_ads_union_schemas',\n union_database_variable='microsoft_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='microsoft_ads_sources',\n single_source_name='microsoft_ads',\n single_table_name='ad_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["microsoft_ads", "ad_history"], ["microsoft_ads", "ad_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.microsoft_ads.microsoft_ads.ad_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/tmp/stg_microsoft_ads__ad_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: microsoft_ads_ad_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: microsoft_ads_ad_history_data\n\n\n select\n \"id\",\n \"title_part_1\",\n \"final_url\",\n \"ad_group_id\",\n \"modified_time\",\n \"status\",\n \"type\",\n \"title\",\n \"title_part_2\",\n \"title_part_3\",\n \"domain\"\n from \"postgres\".\"public\".\"microsoft_ads_ad_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__geographic_daily_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__geographic_daily_report_tmp", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/tmp/stg_microsoft_ads__geographic_daily_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_microsoft_ads__geographic_daily_report_tmp.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__geographic_daily_report_tmp", "fqn": ["microsoft_ads", "staging", "tmp", "stg_microsoft_ads__geographic_daily_report_tmp"], "alias": "stg_microsoft_ads__geographic_daily_report_tmp", "checksum": {"name": "sha256", "checksum": "448e861c1c46f666a4c37927b47200bea6e131f129c44099b27727641d4c45e0"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708220.8786068, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__geographic_daily_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True) and var('microsoft_ads__using_geographic_daily_report', False)) }}\n\n{% if var('microsoft_ads_union_schemas', []) | length > 0 or var('microsoft_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='geographic_performance_daily_report', \n database_variable='microsoft_ads_database', \n schema_variable='microsoft_ads_schema', \n default_database=target.database,\n default_schema='microsoft_ads',\n default_variable='geographic_performance_daily_report',\n union_schema_variable='microsoft_ads_union_schemas',\n union_database_variable='microsoft_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='microsoft_ads_sources',\n single_source_name='microsoft_ads',\n single_table_name='geographic_performance_daily_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["microsoft_ads", "geographic_performance_daily_report"], ["microsoft_ads", "geographic_performance_daily_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.microsoft_ads.microsoft_ads.geographic_performance_daily_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/tmp/stg_microsoft_ads__geographic_daily_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: microsoft_ads_geographic_performance_daily_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: microsoft_ads_geographic_performance_daily_report_data\n\n\n select\n \"account_id\",\n \"ad_distribution\",\n \"ad_group_id\",\n \"all_conversions\",\n \"all_conversions_qualified\",\n \"all_revenue\",\n \"bid_match_type\",\n \"campaign_id\",\n \"city\",\n \"clicks\",\n \"conversions\",\n \"conversions_qualified\",\n \"country\",\n \"county\",\n \"currency_code\",\n \"date\",\n \"delivered_match_type\",\n \"device_os\",\n \"device_type\",\n \"impressions\",\n \"language\",\n \"location_type\",\n \"metro_area\",\n \"postal_code\",\n \"network\",\n \"spend\",\n \"state\",\n \"top_vs_other\",\n \"revenue\",\n \"location_id\",\n \"goal\"\n from \"postgres\".\"public\".\"microsoft_ads_geographic_performance_daily_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__keyword_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__keyword_history_tmp", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/tmp/stg_microsoft_ads__keyword_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_microsoft_ads__keyword_history_tmp.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__keyword_history_tmp", "fqn": ["microsoft_ads", "staging", "tmp", "stg_microsoft_ads__keyword_history_tmp"], "alias": "stg_microsoft_ads__keyword_history_tmp", "checksum": {"name": "sha256", "checksum": "7018bb69ea16d01c0d4058c247f2acf02fc00721162d400ad7dc6aa0bf03d52b"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708220.8895652, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__keyword_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\n{% if var('microsoft_ads_union_schemas', []) | length > 0 or var('microsoft_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='keyword_history', \n database_variable='microsoft_ads_database', \n schema_variable='microsoft_ads_schema', \n default_database=target.database,\n default_schema='microsoft_ads',\n default_variable='keyword_history',\n union_schema_variable='microsoft_ads_union_schemas',\n union_database_variable='microsoft_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='microsoft_ads_sources',\n single_source_name='microsoft_ads',\n single_table_name='keyword_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["microsoft_ads", "keyword_history"], ["microsoft_ads", "keyword_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.microsoft_ads.microsoft_ads.keyword_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/tmp/stg_microsoft_ads__keyword_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: microsoft_ads_keyword_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: microsoft_ads_keyword_history_data\n\n\n select\n \"id\",\n \"name\",\n \"modified_time\",\n \"ad_group_id\",\n \"match_type\",\n \"status\"\n from \"postgres\".\"public\".\"microsoft_ads_keyword_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__keyword_daily_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__keyword_daily_report_tmp", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/tmp/stg_microsoft_ads__keyword_daily_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_microsoft_ads__keyword_daily_report_tmp.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__keyword_daily_report_tmp", "fqn": ["microsoft_ads", "staging", "tmp", "stg_microsoft_ads__keyword_daily_report_tmp"], "alias": "stg_microsoft_ads__keyword_daily_report_tmp", "checksum": {"name": "sha256", "checksum": "fe1cfcdb222c28cf6591752bba489265600111b2009a60656013e522e869601c"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708220.9001923, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__keyword_daily_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\n{% if var('microsoft_ads_union_schemas', []) | length > 0 or var('microsoft_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='keyword_performance_daily_report', \n database_variable='microsoft_ads_database', \n schema_variable='microsoft_ads_schema', \n default_database=target.database,\n default_schema='microsoft_ads',\n default_variable='keyword_performance_daily_report',\n union_schema_variable='microsoft_ads_union_schemas',\n union_database_variable='microsoft_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='microsoft_ads_sources',\n single_source_name='microsoft_ads',\n single_table_name='keyword_performance_daily_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["microsoft_ads", "keyword_performance_daily_report"], ["microsoft_ads", "keyword_performance_daily_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.microsoft_ads.microsoft_ads.keyword_performance_daily_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/tmp/stg_microsoft_ads__keyword_daily_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: microsoft_ads_keyword_performance_daily_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: microsoft_ads_keyword_performance_daily_report_data\n\n\n select\n \"date\",\n \"account_id\",\n \"campaign_id\",\n \"ad_group_id\",\n \"ad_id\",\n \"keyword_id\",\n \"currency_code\",\n \"device_os\",\n \"device_type\",\n \"network\",\n \"language\",\n \"ad_distribution\",\n \"bid_match_type\",\n \"delivered_match_type\",\n \"top_vs_other\",\n \"clicks\",\n \"impressions\",\n \"spend\",\n \"conversions_qualified\",\n \"conversions\",\n \"revenue\",\n \"all_conversions_qualified\",\n \"all_conversions\",\n \"all_revenue\"\n from \"postgres\".\"public\".\"microsoft_ads_keyword_performance_daily_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_group_daily_report_tmp", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/tmp/stg_microsoft_ads__ad_group_daily_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_microsoft_ads__ad_group_daily_report_tmp.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report_tmp", "fqn": ["microsoft_ads", "staging", "tmp", "stg_microsoft_ads__ad_group_daily_report_tmp"], "alias": "stg_microsoft_ads__ad_group_daily_report_tmp", "checksum": {"name": "sha256", "checksum": "8eea854174b248a328c1b5af00c1d47fda20097fc33408ebd744fe15c40b3b26"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708220.9121668, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_group_daily_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\n{% if var('microsoft_ads_union_schemas', []) | length > 0 or var('microsoft_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_group_performance_daily_report', \n database_variable='microsoft_ads_database', \n schema_variable='microsoft_ads_schema', \n default_database=target.database,\n default_schema='microsoft_ads',\n default_variable='ad_group_performance_daily_report',\n union_schema_variable='microsoft_ads_union_schemas',\n union_database_variable='microsoft_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='microsoft_ads_sources',\n single_source_name='microsoft_ads',\n single_table_name='ad_group_performance_daily_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["microsoft_ads", "ad_group_performance_daily_report"], ["microsoft_ads", "ad_group_performance_daily_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.microsoft_ads.microsoft_ads.ad_group_performance_daily_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/tmp/stg_microsoft_ads__ad_group_daily_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: microsoft_ads_ad_group_performance_daily_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: microsoft_ads_ad_group_performance_daily_report_data\n\n\n select\n \"date\",\n \"account_id\",\n \"campaign_id\",\n \"ad_group_id\",\n \"currency_code\",\n \"device_os\",\n \"device_type\",\n \"network\",\n \"language\",\n \"ad_distribution\",\n \"bid_match_type\",\n \"delivered_match_type\",\n \"top_vs_other\",\n \"clicks\",\n \"impressions\",\n \"spend\",\n \"conversions_qualified\",\n \"conversions\",\n \"revenue\",\n \"all_conversions_qualified\",\n \"all_conversions\",\n \"all_revenue\"\n from \"postgres\".\"public\".\"microsoft_ads_ad_group_performance_daily_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__campaign_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__campaign_history_tmp", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/tmp/stg_microsoft_ads__campaign_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_microsoft_ads__campaign_history_tmp.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__campaign_history_tmp", "fqn": ["microsoft_ads", "staging", "tmp", "stg_microsoft_ads__campaign_history_tmp"], "alias": "stg_microsoft_ads__campaign_history_tmp", "checksum": {"name": "sha256", "checksum": "73d4c9217b2e85b0531633e5953c18acd7000789153c12cda9025f2496dc9334"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708220.9227276, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\n{% if var('microsoft_ads_union_schemas', []) | length > 0 or var('microsoft_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_history', \n database_variable='microsoft_ads_database', \n schema_variable='microsoft_ads_schema', \n default_database=target.database,\n default_schema='microsoft_ads',\n default_variable='campaign_history',\n union_schema_variable='microsoft_ads_union_schemas',\n union_database_variable='microsoft_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='microsoft_ads_sources',\n single_source_name='microsoft_ads',\n single_table_name='campaign_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["microsoft_ads", "campaign_history"], ["microsoft_ads", "campaign_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.microsoft_ads.microsoft_ads.campaign_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/tmp/stg_microsoft_ads__campaign_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: microsoft_ads_campaign_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: microsoft_ads_campaign_history_data\n\n\n select\n \"id\",\n \"name\",\n \"account_id\",\n \"modified_time\",\n \"type\",\n \"time_zone\",\n \"status\"\n from \"postgres\".\"public\".\"microsoft_ads_campaign_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.microsoft_ads.stg_microsoft_ads__ad_daily_report_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_microsoft_ads__ad_daily_report_tmp", "resource_type": "model", "package_name": "microsoft_ads", "path": "staging/tmp/stg_microsoft_ads__ad_daily_report_tmp.sql", "original_file_path": "models/staging/tmp/stg_microsoft_ads__ad_daily_report_tmp.sql", "unique_id": "model.microsoft_ads.stg_microsoft_ads__ad_daily_report_tmp", "fqn": ["microsoft_ads", "staging", "tmp", "stg_microsoft_ads__ad_daily_report_tmp"], "alias": "stg_microsoft_ads__ad_daily_report_tmp", "checksum": {"name": "sha256", "checksum": "53ae857c1a40e5c2fe4278290f5254cd73494922f7b107dd35468aac806f1f81"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708220.9333258, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_daily_report_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__microsoft_ads_enabled', True)) }}\n\n{% if var('microsoft_ads_union_schemas', []) | length > 0 or var('microsoft_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_performance_daily_report', \n database_variable='microsoft_ads_database', \n schema_variable='microsoft_ads_schema', \n default_database=target.database,\n default_schema='microsoft_ads',\n default_variable='ad_performance_daily_report',\n union_schema_variable='microsoft_ads_union_schemas',\n union_database_variable='microsoft_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='microsoft_ads_sources',\n single_source_name='microsoft_ads',\n single_table_name='ad_performance_daily_report'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["microsoft_ads", "ad_performance_daily_report"], ["microsoft_ads", "ad_performance_daily_report"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.microsoft_ads.microsoft_ads.ad_performance_daily_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/tmp/stg_microsoft_ads__ad_daily_report_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: microsoft_ads_ad_performance_daily_report_identifier\n -- database: postgres \n -- schema: public\n -- identifier: microsoft_ads_ad_performance_daily_report_data\n\n\n select\n \"date\",\n \"account_id\",\n \"campaign_id\",\n \"ad_group_id\",\n \"ad_id\",\n \"currency_code\",\n \"device_os\",\n \"device_type\",\n \"network\",\n \"language\",\n \"ad_distribution\",\n \"bid_match_type\",\n \"delivered_match_type\",\n \"top_vs_other\",\n \"clicks\",\n \"impressions\",\n \"spend\",\n \"conversions_qualified\",\n \"conversions\",\n \"revenue\",\n \"all_conversions_qualified\",\n \"all_conversions\",\n \"all_revenue\"\n from \"postgres\".\"public\".\"microsoft_ads_ad_performance_daily_report_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.facebook_ads__region_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "facebook_ads__region_report", "resource_type": "model", "package_name": "facebook_ads", "path": "facebook_ads__region_report.sql", "original_file_path": "models/facebook_ads__region_report.sql", "unique_id": "model.facebook_ads.facebook_ads__region_report", "fqn": ["facebook_ads", "facebook_ads__region_report"], "alias": "facebook_ads__region_report", "checksum": {"name": "sha256", "checksum": "59a7a9ad922476e93025d8ad6a811f7080ae9eb1d2e4c48aed3f8dfae99798fa"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Facebook account at the region level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "The name of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the ad in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total number of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_purchase_conversions": {"name": "onsite_conversion_purchase_conversions", "description": "Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_lead_grouped_conversions": {"name": "onsite_conversion_lead_grouped_conversions", "description": "Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_purchase_conversions": {"name": "offsite_conversion_fb_pixel_purchase_conversions", "description": "Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_lead_conversions": {"name": "offsite_conversion_fb_pixel_lead_conversions", "description": "Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_custom_conversions": {"name": "offsite_conversion_fb_pixel_custom_conversions", "description": "Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_business_country_code": {"name": "account_business_country_code", "description": "Country code of business associated to account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_business_state": {"name": "account_business_state", "description": "State abbreviation for business address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_currency": {"name": "account_currency", "description": "Currency associated with account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_timezone": {"name": "account_timezone", "description": "Timezone associated with account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_timezone_offset_hours_utc": {"name": "account_timezone_offset_hours_utc", "description": "Time zone difference from UTC.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_min_daily_budget": {"name": "account_min_daily_budget", "description": "The minimum daily budget for this Ad Account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "region_id": {"name": "region_id", "description": "Fivetran-generated unique ID of the geographic region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.region_id"]}, "region": {"name": "region", "description": "Geographic region whose ad performance is being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.region"]}, "frequency": {"name": "frequency", "description": "The average number of times each person saw your ads; it is calculated as impressions divided by reach.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.frequency"]}, "reach": {"name": "reach", "description": "The number of people who saw any content from your Page or about your Page. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.reach"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/facebook.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.1983352, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__region_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True) and var('facebook_ads__using_demographics_region', False)) }}\n\nwith accounts as (\n\n select *\n from {{ ref('stg_facebook_ads__account_history') }}\n where is_most_recent_record = true\n\n),\n\ndemographics_region as (\n\n select *\n from {{ ref('stg_facebook_ads__demographics_region') }}\n),\n\ndemographics_region_actions as (\n\n select *\n from {{ ref('stg_facebook_ads__demographics_region_actions') }}\n),\n\nregion_conversions as (\n\n select\n source_relation,\n account_id,\n region_id,\n date_day,\n sum(conversions) as conversions\n\n {% for action_type in var('facebook_ads__conversion_action_types') %}\n ,sum(case when \n {% if action_type.name %}\n action_type = '{{ action_type.name }}'\n {% elif action_type.pattern %}\n action_type like '{{ action_type.pattern }}'\n {% endif %}\n\n {% if action_type.where_sql %}\n and {{ action_type.where_sql }}\n {% endif %}\n then conversions else 0 end) \n as {{ facebook_action_slug(action_type) }}_conversions\n {% endfor %}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='facebook_ads__demographics_region_actions_passthrough_metrics', transform='sum') }}\n\n from demographics_region_actions\n {% if var('facebook_ads__conversion_action_types') -%}\n where \n {# Limit conversions to the chosen action types #}\n {% for action_type in var('facebook_ads__conversion_action_types') -%}\n (\n {%- if action_type.name -%}\n action_type = '{{ action_type.name }}'\n {%- elif action_type.pattern -%}\n action_type like '{{ action_type.pattern }}'\n {%- endif -%}\n\n {% if action_type.where_sql %}\n and {{ action_type.where_sql }}\n {%- endif -%}\n ) {% if not loop.last %} or {% endif %}\n {%- endfor %}\n {% endif %}\n {{ dbt_utils.group_by(n=4) }}\n),\n\njoined as (\n\n select \n demographics_region.source_relation,\n demographics_region.date_day,\n demographics_region.region_id,\n demographics_region.region,\n demographics_region.account_id,\n accounts.account_name,\n accounts.business_state as account_business_state,\n accounts.business_country_code as account_business_country_code,\n accounts.timezone_name as account_timezone,\n accounts.timezone_offset_hours_utc as account_timezone_offset_hours_utc,\n accounts.currency as account_currency,\n accounts.min_daily_budget as account_min_daily_budget,\n\n sum(demographics_region.impressions) as impressions,\n sum(demographics_region.clicks) as clicks,\n sum(demographics_region.spend) as spend,\n sum(demographics_region.reach) as reach,\n sum(demographics_region.frequency) as frequency,\n sum(coalesce(region_conversions.conversions, 0)) as conversions\n\n {% for action_type in var('facebook_ads__conversion_action_types') %}\n , sum(coalesce(region_conversions.{{ facebook_action_slug(action_type) }}_conversions, 0)) \n as {{ facebook_action_slug(action_type) }}_conversions\n {% endfor %}\n\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__demographics_region_passthrough_metrics', transform = 'sum', coalesce_with=0) }}\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__demographics_region_actions_passthrough_metrics', transform = 'sum', coalesce_with=0) }}\n \n from demographics_region\n left join region_conversions\n on demographics_region.region_id = region_conversions.region_id\n and demographics_region.account_id = region_conversions.account_id\n and demographics_region.date_day = region_conversions.date_day\n and demographics_region.source_relation = region_conversions.source_relation\n left join accounts\n on demographics_region.account_id = accounts.account_id\n and demographics_region.source_relation = accounts.source_relation\n {{ dbt_utils.group_by(n=12) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__account_history", "package": null, "version": null}, {"name": "stg_facebook_ads__demographics_region", "package": null, "version": null}, {"name": "stg_facebook_ads__demographics_region_actions", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.facebook_action_slug", "macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by", "macro.facebook_ads.facebook_ads_persist_pass_through_columns"], "nodes": ["model.facebook_ads.stg_facebook_ads__account_history", "model.facebook_ads.stg_facebook_ads__demographics_region", "model.facebook_ads.stg_facebook_ads__demographics_region_actions"]}, "compiled_path": "target/compiled/facebook_ads/models/facebook_ads__region_report.sql", "compiled": true, "compiled_code": "\n\nwith accounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__account_history\"\n where is_most_recent_record = true\n\n),\n\ndemographics_region as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_region\"\n),\n\ndemographics_region_actions as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_region_actions\"\n),\n\nregion_conversions as (\n\n select\n source_relation,\n account_id,\n region_id,\n date_day,\n sum(conversions) as conversions\n\n \n ,sum(case when \n \n action_type = 'onsite_conversion.purchase'\n \n\n \n then conversions else 0 end) \n as onsite_conversion_purchase_conversions\n \n ,sum(case when \n \n action_type = 'onsite_conversion.lead_grouped'\n \n\n \n then conversions else 0 end) \n as onsite_conversion_lead_grouped_conversions\n \n ,sum(case when \n \n action_type = 'offsite_conversion.fb_pixel_purchase'\n \n\n \n then conversions else 0 end) \n as offsite_conversion_fb_pixel_purchase_conversions\n \n ,sum(case when \n \n action_type = 'offsite_conversion.fb_pixel_lead'\n \n\n \n then conversions else 0 end) \n as offsite_conversion_fb_pixel_lead_conversions\n \n ,sum(case when \n \n action_type = 'offsite_conversion.fb_pixel_custom'\n \n\n \n then conversions else 0 end) \n as offsite_conversion_fb_pixel_custom_conversions\n \n\n \n\n\n\n\n\n from demographics_region_actions\n where \n \n (action_type = 'onsite_conversion.purchase') or (action_type = 'onsite_conversion.lead_grouped') or (action_type = 'offsite_conversion.fb_pixel_purchase') or (action_type = 'offsite_conversion.fb_pixel_lead') or (action_type = 'offsite_conversion.fb_pixel_custom') \n \n group by 1,2,3,4\n),\n\njoined as (\n\n select \n demographics_region.source_relation,\n demographics_region.date_day,\n demographics_region.region_id,\n demographics_region.region,\n demographics_region.account_id,\n accounts.account_name,\n accounts.business_state as account_business_state,\n accounts.business_country_code as account_business_country_code,\n accounts.timezone_name as account_timezone,\n accounts.timezone_offset_hours_utc as account_timezone_offset_hours_utc,\n accounts.currency as account_currency,\n accounts.min_daily_budget as account_min_daily_budget,\n\n sum(demographics_region.impressions) as impressions,\n sum(demographics_region.clicks) as clicks,\n sum(demographics_region.spend) as spend,\n sum(demographics_region.reach) as reach,\n sum(demographics_region.frequency) as frequency,\n sum(coalesce(region_conversions.conversions, 0)) as conversions\n\n \n , sum(coalesce(region_conversions.onsite_conversion_purchase_conversions, 0)) \n as onsite_conversion_purchase_conversions\n \n , sum(coalesce(region_conversions.onsite_conversion_lead_grouped_conversions, 0)) \n as onsite_conversion_lead_grouped_conversions\n \n , sum(coalesce(region_conversions.offsite_conversion_fb_pixel_purchase_conversions, 0)) \n as offsite_conversion_fb_pixel_purchase_conversions\n \n , sum(coalesce(region_conversions.offsite_conversion_fb_pixel_lead_conversions, 0)) \n as offsite_conversion_fb_pixel_lead_conversions\n \n , sum(coalesce(region_conversions.offsite_conversion_fb_pixel_custom_conversions, 0)) \n as offsite_conversion_fb_pixel_custom_conversions\n \n\n \n\n\n\n\n \n\n\n\n\n \n from demographics_region\n left join region_conversions\n on demographics_region.region_id = region_conversions.region_id\n and demographics_region.account_id = region_conversions.account_id\n and demographics_region.date_day = region_conversions.date_day\n and demographics_region.source_relation = region_conversions.source_relation\n left join accounts\n on demographics_region.account_id = accounts.account_id\n and demographics_region.source_relation = accounts.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.facebook_ads__country_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "facebook_ads__country_report", "resource_type": "model", "package_name": "facebook_ads", "path": "facebook_ads__country_report.sql", "original_file_path": "models/facebook_ads__country_report.sql", "unique_id": "model.facebook_ads.facebook_ads__country_report", "fqn": ["facebook_ads", "facebook_ads__country_report"], "alias": "facebook_ads__country_report", "checksum": {"name": "sha256", "checksum": "2862f381c757daac6b0aaca571ed71851b0d08a083fab52c43182299a1385a06"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Facebook account at the country level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "The name of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the ad in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total number of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_purchase_conversions": {"name": "onsite_conversion_purchase_conversions", "description": "Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_lead_grouped_conversions": {"name": "onsite_conversion_lead_grouped_conversions", "description": "Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_purchase_conversions": {"name": "offsite_conversion_fb_pixel_purchase_conversions", "description": "Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_lead_conversions": {"name": "offsite_conversion_fb_pixel_lead_conversions", "description": "Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_custom_conversions": {"name": "offsite_conversion_fb_pixel_custom_conversions", "description": "Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_business_country_code": {"name": "account_business_country_code", "description": "Country code of business associated to account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_currency": {"name": "account_currency", "description": "Currency associated with account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_timezone": {"name": "account_timezone", "description": "Timezone associated with account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_timezone_offset_hours_utc": {"name": "account_timezone_offset_hours_utc", "description": "Time zone difference from UTC.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_min_daily_budget": {"name": "account_min_daily_budget", "description": "The minimum daily budget for this Ad Account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country_id": {"name": "country_id", "description": "Fivetran-generated unique ID of the country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.country_id"]}, "country": {"name": "country", "description": "Country whose ad performance is being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.country"]}, "frequency": {"name": "frequency", "description": "The average number of times each person saw your ads; it is calculated as impressions divided by reach.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.frequency"]}, "reach": {"name": "reach", "description": "The number of people who saw any content from your Page or about your Page. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.reach"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/facebook.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.1964495, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__country_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True) and var('facebook_ads__using_demographics_country', False)) }}\n\nwith accounts as (\n\n select *\n from {{ ref('stg_facebook_ads__account_history') }}\n where is_most_recent_record = true\n),\n\ndemographics_country as (\n\n select *\n from {{ ref('stg_facebook_ads__demographics_country') }}\n),\n\ndemographics_country_actions as (\n\n select *\n from {{ ref('stg_facebook_ads__demographics_country_actions') }}\n),\n\ncountry_conversions as (\n\n select\n source_relation,\n account_id,\n country_id,\n date_day,\n sum(conversions) as conversions\n\n {% for action_type in var('facebook_ads__conversion_action_types') %}\n ,sum(case when \n {% if action_type.name %}\n action_type = '{{ action_type.name }}'\n {% elif action_type.pattern %}\n action_type like '{{ action_type.pattern }}'\n {% endif %}\n\n {% if action_type.where_sql %}\n and {{ action_type.where_sql }}\n {% endif %}\n then conversions else 0 end) \n as {{ facebook_action_slug(action_type) }}_conversions\n {% endfor %}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='facebook_ads__demographics_country_actions_passthrough_metrics', transform='sum') }}\n\n from demographics_country_actions\n {% if var('facebook_ads__conversion_action_types') -%}\n where \n {# Limit conversions to the chosen action types #}\n {% for action_type in var('facebook_ads__conversion_action_types') -%}\n (\n {%- if action_type.name -%}\n action_type = '{{ action_type.name }}'\n {%- elif action_type.pattern -%}\n action_type like '{{ action_type.pattern }}'\n {%- endif -%}\n\n {% if action_type.where_sql %}\n and {{ action_type.where_sql }}\n {%- endif -%}\n ) {% if not loop.last %} or {% endif %}\n {%- endfor %}\n {% endif %}\n {{ dbt_utils.group_by(n=4) }}\n),\n\njoined as (\n\n select \n demographics_country.source_relation,\n demographics_country.date_day,\n demographics_country.country_id,\n demographics_country.country,\n demographics_country.account_id,\n accounts.account_name,\n accounts.business_country_code as account_business_country_code,\n accounts.timezone_name as account_timezone,\n accounts.timezone_offset_hours_utc as account_timezone_offset_hours_utc,\n accounts.currency as account_currency,\n accounts.min_daily_budget as account_min_daily_budget,\n\n sum(demographics_country.impressions) as impressions,\n sum(demographics_country.clicks) as clicks,\n sum(demographics_country.spend) as spend,\n sum(demographics_country.reach) as reach,\n sum(demographics_country.frequency) as frequency,\n sum(coalesce(country_conversions.conversions, 0)) as conversions\n \n {% for action_type in var('facebook_ads__conversion_action_types') %}\n , sum(coalesce(country_conversions.{{ facebook_action_slug(action_type) }}_conversions, 0)) \n as {{ facebook_action_slug(action_type) }}_conversions\n {% endfor %}\n\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__demographics_country_passthrough_metrics', transform = 'sum', coalesce_with=0) }}\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__demographics_country_actions_passthrough_metrics', transform = 'sum', coalesce_with=0) }}\n \n from demographics_country\n left join country_conversions\n on demographics_country.country_id = country_conversions.country_id\n and demographics_country.account_id = country_conversions.account_id\n and demographics_country.date_day = country_conversions.date_day\n and demographics_country.source_relation = country_conversions.source_relation\n left join accounts\n on demographics_country.account_id = accounts.account_id\n and demographics_country.source_relation = accounts.source_relation\n {{ dbt_utils.group_by(n=11) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__account_history", "package": null, "version": null}, {"name": "stg_facebook_ads__demographics_country", "package": null, "version": null}, {"name": "stg_facebook_ads__demographics_country_actions", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.facebook_action_slug", "macro.fivetran_utils.persist_pass_through_columns", "macro.dbt_utils.group_by", "macro.facebook_ads.facebook_ads_persist_pass_through_columns"], "nodes": ["model.facebook_ads.stg_facebook_ads__account_history", "model.facebook_ads.stg_facebook_ads__demographics_country", "model.facebook_ads.stg_facebook_ads__demographics_country_actions"]}, "compiled_path": "target/compiled/facebook_ads/models/facebook_ads__country_report.sql", "compiled": true, "compiled_code": "\n\nwith accounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__account_history\"\n where is_most_recent_record = true\n),\n\ndemographics_country as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_country\"\n),\n\ndemographics_country_actions as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_country_actions\"\n),\n\ncountry_conversions as (\n\n select\n source_relation,\n account_id,\n country_id,\n date_day,\n sum(conversions) as conversions\n\n \n ,sum(case when \n \n action_type = 'onsite_conversion.purchase'\n \n\n \n then conversions else 0 end) \n as onsite_conversion_purchase_conversions\n \n ,sum(case when \n \n action_type = 'onsite_conversion.lead_grouped'\n \n\n \n then conversions else 0 end) \n as onsite_conversion_lead_grouped_conversions\n \n ,sum(case when \n \n action_type = 'offsite_conversion.fb_pixel_purchase'\n \n\n \n then conversions else 0 end) \n as offsite_conversion_fb_pixel_purchase_conversions\n \n ,sum(case when \n \n action_type = 'offsite_conversion.fb_pixel_lead'\n \n\n \n then conversions else 0 end) \n as offsite_conversion_fb_pixel_lead_conversions\n \n ,sum(case when \n \n action_type = 'offsite_conversion.fb_pixel_custom'\n \n\n \n then conversions else 0 end) \n as offsite_conversion_fb_pixel_custom_conversions\n \n\n \n\n\n\n\n\n from demographics_country_actions\n where \n \n (action_type = 'onsite_conversion.purchase') or (action_type = 'onsite_conversion.lead_grouped') or (action_type = 'offsite_conversion.fb_pixel_purchase') or (action_type = 'offsite_conversion.fb_pixel_lead') or (action_type = 'offsite_conversion.fb_pixel_custom') \n \n group by 1,2,3,4\n),\n\njoined as (\n\n select \n demographics_country.source_relation,\n demographics_country.date_day,\n demographics_country.country_id,\n demographics_country.country,\n demographics_country.account_id,\n accounts.account_name,\n accounts.business_country_code as account_business_country_code,\n accounts.timezone_name as account_timezone,\n accounts.timezone_offset_hours_utc as account_timezone_offset_hours_utc,\n accounts.currency as account_currency,\n accounts.min_daily_budget as account_min_daily_budget,\n\n sum(demographics_country.impressions) as impressions,\n sum(demographics_country.clicks) as clicks,\n sum(demographics_country.spend) as spend,\n sum(demographics_country.reach) as reach,\n sum(demographics_country.frequency) as frequency,\n sum(coalesce(country_conversions.conversions, 0)) as conversions\n \n \n , sum(coalesce(country_conversions.onsite_conversion_purchase_conversions, 0)) \n as onsite_conversion_purchase_conversions\n \n , sum(coalesce(country_conversions.onsite_conversion_lead_grouped_conversions, 0)) \n as onsite_conversion_lead_grouped_conversions\n \n , sum(coalesce(country_conversions.offsite_conversion_fb_pixel_purchase_conversions, 0)) \n as offsite_conversion_fb_pixel_purchase_conversions\n \n , sum(coalesce(country_conversions.offsite_conversion_fb_pixel_lead_conversions, 0)) \n as offsite_conversion_fb_pixel_lead_conversions\n \n , sum(coalesce(country_conversions.offsite_conversion_fb_pixel_custom_conversions, 0)) \n as offsite_conversion_fb_pixel_custom_conversions\n \n\n \n\n\n\n\n \n\n\n\n\n \n from demographics_country\n left join country_conversions\n on demographics_country.country_id = country_conversions.country_id\n and demographics_country.account_id = country_conversions.account_id\n and demographics_country.date_day = country_conversions.date_day\n and demographics_country.source_relation = country_conversions.source_relation\n left join accounts\n on demographics_country.account_id = accounts.account_id\n and demographics_country.source_relation = accounts.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.facebook_ads__url_tags": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "facebook_ads__url_tags", "resource_type": "model", "package_name": "facebook_ads", "path": "facebook_ads__url_tags.sql", "original_file_path": "models/facebook_ads__url_tags.sql", "unique_id": "model.facebook_ads.facebook_ads__url_tags", "fqn": ["facebook_ads", "facebook_ads__url_tags"], "alias": "facebook_ads__url_tags", "checksum": {"name": "sha256", "checksum": "be1a1246670d2244b717944ccfdf111ab84af2e43cff2c092c16dc160f6b6b23"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record is a unique combination of creative_id and corresponding key, value, type contained in the url_tags field", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "_fivetran_id": {"name": "_fivetran_id", "description": "The unique fivetran ID for this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_id": {"name": "creative_id", "description": "The associated creative_id for this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "key": {"name": "key", "description": "The url tag object name e.g. utm_source associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "value": {"name": "value", "description": "The value assigned to the url tag object associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "type": {"name": "type", "description": "The type assigned to the url tag object e.g. 'AD_VIDEO'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/facebook.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.193926, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__url_tags\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith base as (\n\n select *\n from {{ ref('stg_facebook_ads__creative_history') }}\n where is_most_recent_record = true\n), \n\nrequired_fields as (\n\n select\n source_relation,\n _fivetran_id,\n creative_id,\n url_tags\n from base\n where url_tags is not null\n), \n\n{{ get_url_tags_query(\n output_cte_name='fields', \n url_tags_datatype=get_column_datatype('stg_facebook_ads__creative_history', 'url_tags')\n) }} \n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__creative_history", "package": null, "version": null}, {"name": "stg_facebook_ads__creative_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.get_column_datatype", "macro.facebook_ads.get_url_tags_query"], "nodes": ["model.facebook_ads.stg_facebook_ads__creative_history"]}, "compiled_path": "target/compiled/facebook_ads/models/facebook_ads__url_tags.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__creative_history\"\n where is_most_recent_record = true\n), \n\nrequired_fields as (\n\n select\n source_relation,\n _fivetran_id,\n creative_id,\n url_tags\n from base\n where url_tags is not null\n), \n\n\n\n unnested as (\n select\n source_relation,\n _fivetran_id,\n creative_id,\n url_tag_element\n from required_fields\n cross join lateral json_array_elements(replace(trim(url_tags::text, '\"'),'\\\\','')::json) as url_tag_element\n\n where url_tags is not null\n ),\n\n fields as (\n select\n source_relation,\n _fivetran_id,\n creative_id,\n url_tag_element->>'key' as key,\n url_tag_element->>'value' as value,\n url_tag_element->>'type' as type\n from unnested\n ) \n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.facebook_ads__ad_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "facebook_ads__ad_report", "resource_type": "model", "package_name": "facebook_ads", "path": "facebook_ads__ad_report.sql", "original_file_path": "models/facebook_ads__ad_report.sql", "unique_id": "model.facebook_ads.facebook_ads__ad_report", "fqn": ["facebook_ads", "facebook_ads__ad_report"], "alias": "facebook_ads__ad_report", "checksum": {"name": "sha256", "checksum": "81dfc61680d6a483c03c8e8df33e0c2d3ac3687dfc0abf03543aaa0100ef050f"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Facebook ad.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "The name of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_set_id": {"name": "ad_set_id", "description": "The ID of the related ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_set_name": {"name": "ad_set_name", "description": "The name of the related ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_id": {"name": "ad_id", "description": "The ID of the related ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_name": {"name": "ad_name", "description": "The name of the related ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the ad in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total number of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions_value": {"name": "conversions_value", "description": "Total monetary value of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_purchase_conversions": {"name": "onsite_conversion_purchase_conversions", "description": "Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_lead_grouped_conversions": {"name": "onsite_conversion_lead_grouped_conversions", "description": "Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_purchase_conversions": {"name": "offsite_conversion_fb_pixel_purchase_conversions", "description": "Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_lead_conversions": {"name": "offsite_conversion_fb_pixel_lead_conversions", "description": "Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_custom_conversions": {"name": "offsite_conversion_fb_pixel_custom_conversions", "description": "Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_purchase_conversions_value": {"name": "onsite_conversion_purchase_conversions_value", "description": "Monetary value of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_lead_grouped_conversions_value": {"name": "onsite_conversion_lead_grouped_conversions_value", "description": "Monetary value of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_purchase_conversions_value": {"name": "offsite_conversion_fb_pixel_purchase_conversions_value", "description": "Monetary value of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_lead_conversions_value": {"name": "offsite_conversion_fb_pixel_lead_conversions_value", "description": "Monetary value of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_custom_conversions_value": {"name": "offsite_conversion_fb_pixel_custom_conversions_value", "description": "Monetary value of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_domain": {"name": "conversion_domain", "description": "The domain you've configured the ad to convert to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/facebook.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.1848404, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__ad_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_facebook_ads__basic_ad') }}\n\n), \n\nconversion_report as (\n\n select *\n from {{ ref('int_facebook_ads__conversions') }}\n\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_facebook_ads__account_history') }}\n where is_most_recent_record = true\n\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_facebook_ads__campaign_history') }}\n where is_most_recent_record = true\n\n),\n\nad_sets as (\n\n select *\n from {{ ref('stg_facebook_ads__ad_set_history') }}\n where is_most_recent_record = true\n\n),\n\nads as (\n\n select *\n from {{ ref('stg_facebook_ads__ad_history') }}\n where is_most_recent_record = true\n\n),\n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n accounts.account_id,\n accounts.account_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n ad_sets.ad_set_id,\n ad_sets.ad_set_name,\n ads.ad_id,\n ads.ad_name,\n ads.conversion_domain,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(coalesce(conversion_report.conversions, 0)) as conversions,\n sum(coalesce(conversion_report.conversions_value, 0)) as conversions_value\n\n {% for action_type in var('facebook_ads__conversion_action_types') %}\n , sum(coalesce(conversion_report.{{ facebook_action_slug(action_type) }}_conversions, 0)) \n as {{ facebook_action_slug(action_type) }}_conversions\n , sum(coalesce(conversion_report.{{ facebook_action_slug(action_type) }}_conversions_value, 0)) \n as {{ facebook_action_slug(action_type) }}_conversions_value\n {% endfor %}\n\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_passthrough_metrics', transform = 'sum', exclude_fields=['conversions', 'conversions_value']) }}\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_actions_passthrough_metrics', transform = 'sum', coalesce_with=0) }}\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_action_values_passthrough_metrics', transform = 'sum', coalesce_with=0) }}\n\n from report \n left join conversion_report\n on report.date_day = conversion_report.date_day\n and report.ad_id = conversion_report.ad_id\n and report.source_relation = conversion_report.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join ads \n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n left join ad_sets\n on ads.ad_set_id = ad_sets.ad_set_id\n and ads.source_relation = ad_sets.source_relation\n {{ dbt_utils.group_by(11) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__basic_ad", "package": null, "version": null}, {"name": "int_facebook_ads__conversions", "package": null, "version": null}, {"name": "stg_facebook_ads__account_history", "package": null, "version": null}, {"name": "stg_facebook_ads__campaign_history", "package": null, "version": null}, {"name": "stg_facebook_ads__ad_set_history", "package": null, "version": null}, {"name": "stg_facebook_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.facebook_action_slug", "macro.facebook_ads.facebook_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.facebook_ads.stg_facebook_ads__basic_ad", "model.facebook_ads.int_facebook_ads__conversions", "model.facebook_ads.stg_facebook_ads__account_history", "model.facebook_ads.stg_facebook_ads__campaign_history", "model.facebook_ads.stg_facebook_ads__ad_set_history", "model.facebook_ads.stg_facebook_ads__ad_history"]}, "compiled_path": "target/compiled/facebook_ads/models/facebook_ads__ad_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad\"\n\n), \n\nconversion_report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"int_facebook_ads__conversions\"\n\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__account_history\"\n where is_most_recent_record = true\n\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__campaign_history\"\n where is_most_recent_record = true\n\n),\n\nad_sets as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_set_history\"\n where is_most_recent_record = true\n\n),\n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_history\"\n where is_most_recent_record = true\n\n),\n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n accounts.account_id,\n accounts.account_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n ad_sets.ad_set_id,\n ad_sets.ad_set_name,\n ads.ad_id,\n ads.ad_name,\n ads.conversion_domain,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(coalesce(conversion_report.conversions, 0)) as conversions,\n sum(coalesce(conversion_report.conversions_value, 0)) as conversions_value\n\n \n , sum(coalesce(conversion_report.onsite_conversion_purchase_conversions, 0)) \n as onsite_conversion_purchase_conversions\n , sum(coalesce(conversion_report.onsite_conversion_purchase_conversions_value, 0)) \n as onsite_conversion_purchase_conversions_value\n \n , sum(coalesce(conversion_report.onsite_conversion_lead_grouped_conversions, 0)) \n as onsite_conversion_lead_grouped_conversions\n , sum(coalesce(conversion_report.onsite_conversion_lead_grouped_conversions_value, 0)) \n as onsite_conversion_lead_grouped_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_purchase_conversions, 0)) \n as offsite_conversion_fb_pixel_purchase_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_purchase_conversions_value, 0)) \n as offsite_conversion_fb_pixel_purchase_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_lead_conversions, 0)) \n as offsite_conversion_fb_pixel_lead_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_lead_conversions_value, 0)) \n as offsite_conversion_fb_pixel_lead_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_custom_conversions, 0)) \n as offsite_conversion_fb_pixel_custom_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_custom_conversions_value, 0)) \n as offsite_conversion_fb_pixel_custom_conversions_value\n \n\n \n\n\n\n\n \n\n\n\n\n \n\n\n\n\n\n from report \n left join conversion_report\n on report.date_day = conversion_report.date_day\n and report.ad_id = conversion_report.ad_id\n and report.source_relation = conversion_report.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join ads \n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n left join ad_sets\n on ads.ad_set_id = ad_sets.ad_set_id\n and ads.source_relation = ad_sets.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.facebook_ads__account_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "facebook_ads__account_report", "resource_type": "model", "package_name": "facebook_ads", "path": "facebook_ads__account_report.sql", "original_file_path": "models/facebook_ads__account_report.sql", "unique_id": "model.facebook_ads.facebook_ads__account_report", "fqn": ["facebook_ads", "facebook_ads__account_report"], "alias": "facebook_ads__account_report", "checksum": {"name": "sha256", "checksum": "7f53bab8030336e9baf746b14d2cc04979910150d71bc9bae18e6f447a220a35"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Facebook account.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "The name of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the ad in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total number of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions_value": {"name": "conversions_value", "description": "Total monetary value of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_purchase_conversions": {"name": "onsite_conversion_purchase_conversions", "description": "Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_lead_grouped_conversions": {"name": "onsite_conversion_lead_grouped_conversions", "description": "Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_purchase_conversions": {"name": "offsite_conversion_fb_pixel_purchase_conversions", "description": "Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_lead_conversions": {"name": "offsite_conversion_fb_pixel_lead_conversions", "description": "Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_custom_conversions": {"name": "offsite_conversion_fb_pixel_custom_conversions", "description": "Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_purchase_conversions_value": {"name": "onsite_conversion_purchase_conversions_value", "description": "Monetary value of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_lead_grouped_conversions_value": {"name": "onsite_conversion_lead_grouped_conversions_value", "description": "Monetary value of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_purchase_conversions_value": {"name": "offsite_conversion_fb_pixel_purchase_conversions_value", "description": "Monetary value of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_lead_conversions_value": {"name": "offsite_conversion_fb_pixel_lead_conversions_value", "description": "Monetary value of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_custom_conversions_value": {"name": "offsite_conversion_fb_pixel_custom_conversions_value", "description": "Monetary value of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_status": {"name": "account_status", "description": "Current status of account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "business_country_code": {"name": "business_country_code", "description": "Country code of business associated to account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The time account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Currency associated with account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone_name": {"name": "timezone_name", "description": "Timezone associated with account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/facebook.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.1930425, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__account_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_facebook_ads__basic_ad') }}\n\n), \n\nconversion_report as (\n\n select *\n from {{ ref('int_facebook_ads__conversions') }}\n\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_facebook_ads__account_history') }}\n where is_most_recent_record = true\n\n),\n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n accounts.account_id,\n accounts.account_name,\n accounts.account_status,\n accounts.business_country_code,\n accounts.created_at,\n accounts.currency,\n accounts.timezone_name,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(coalesce(conversion_report.conversions, 0)) as conversions,\n sum(coalesce(conversion_report.conversions_value, 0)) as conversions_value\n \n {% for action_type in var('facebook_ads__conversion_action_types') %}\n , sum(coalesce(conversion_report.{{ facebook_action_slug(action_type) }}_conversions, 0)) \n as {{ facebook_action_slug(action_type) }}_conversions\n , sum(coalesce(conversion_report.{{ facebook_action_slug(action_type) }}_conversions_value, 0)) \n as {{ facebook_action_slug(action_type) }}_conversions_value\n {% endfor %}\n\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_passthrough_metrics', transform = 'sum', exclude_fields=['conversions', 'conversions_value']) }}\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_actions_passthrough_metrics', transform = 'sum', coalesce_with=0) }}\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_action_values_passthrough_metrics', transform = 'sum', coalesce_with=0) }}\n\n from report \n left join conversion_report\n on report.date_day = conversion_report.date_day\n and report.ad_id = conversion_report.ad_id\n and report.source_relation = conversion_report.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n {{ dbt_utils.group_by(9) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__basic_ad", "package": null, "version": null}, {"name": "int_facebook_ads__conversions", "package": null, "version": null}, {"name": "stg_facebook_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.facebook_action_slug", "macro.facebook_ads.facebook_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.facebook_ads.stg_facebook_ads__basic_ad", "model.facebook_ads.int_facebook_ads__conversions", "model.facebook_ads.stg_facebook_ads__account_history"]}, "compiled_path": "target/compiled/facebook_ads/models/facebook_ads__account_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad\"\n\n), \n\nconversion_report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"int_facebook_ads__conversions\"\n\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__account_history\"\n where is_most_recent_record = true\n\n),\n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n accounts.account_id,\n accounts.account_name,\n accounts.account_status,\n accounts.business_country_code,\n accounts.created_at,\n accounts.currency,\n accounts.timezone_name,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(coalesce(conversion_report.conversions, 0)) as conversions,\n sum(coalesce(conversion_report.conversions_value, 0)) as conversions_value\n \n \n , sum(coalesce(conversion_report.onsite_conversion_purchase_conversions, 0)) \n as onsite_conversion_purchase_conversions\n , sum(coalesce(conversion_report.onsite_conversion_purchase_conversions_value, 0)) \n as onsite_conversion_purchase_conversions_value\n \n , sum(coalesce(conversion_report.onsite_conversion_lead_grouped_conversions, 0)) \n as onsite_conversion_lead_grouped_conversions\n , sum(coalesce(conversion_report.onsite_conversion_lead_grouped_conversions_value, 0)) \n as onsite_conversion_lead_grouped_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_purchase_conversions, 0)) \n as offsite_conversion_fb_pixel_purchase_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_purchase_conversions_value, 0)) \n as offsite_conversion_fb_pixel_purchase_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_lead_conversions, 0)) \n as offsite_conversion_fb_pixel_lead_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_lead_conversions_value, 0)) \n as offsite_conversion_fb_pixel_lead_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_custom_conversions, 0)) \n as offsite_conversion_fb_pixel_custom_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_custom_conversions_value, 0)) \n as offsite_conversion_fb_pixel_custom_conversions_value\n \n\n \n\n\n\n\n \n\n\n\n\n \n\n\n\n\n\n from report \n left join conversion_report\n on report.date_day = conversion_report.date_day\n and report.ad_id = conversion_report.ad_id\n and report.source_relation = conversion_report.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n group by 1,2,3,4,5,6,7,8,9\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.facebook_ads__campaign_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "facebook_ads__campaign_report", "resource_type": "model", "package_name": "facebook_ads", "path": "facebook_ads__campaign_report.sql", "original_file_path": "models/facebook_ads__campaign_report.sql", "unique_id": "model.facebook_ads.facebook_ads__campaign_report", "fqn": ["facebook_ads", "facebook_ads__campaign_report"], "alias": "facebook_ads__campaign_report", "checksum": {"name": "sha256", "checksum": "9467f89f25c96f2d90b7ece00a6db15bea95b3b99cf867cc74f25f34428b34b5"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Facebook campaign.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "The name of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the ad in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total number of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions_value": {"name": "conversions_value", "description": "Total monetary value of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_purchase_conversions": {"name": "onsite_conversion_purchase_conversions", "description": "Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_lead_grouped_conversions": {"name": "onsite_conversion_lead_grouped_conversions", "description": "Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_purchase_conversions": {"name": "offsite_conversion_fb_pixel_purchase_conversions", "description": "Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_lead_conversions": {"name": "offsite_conversion_fb_pixel_lead_conversions", "description": "Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_custom_conversions": {"name": "offsite_conversion_fb_pixel_custom_conversions", "description": "Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_purchase_conversions_value": {"name": "onsite_conversion_purchase_conversions_value", "description": "Monetary value of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_lead_grouped_conversions_value": {"name": "onsite_conversion_lead_grouped_conversions_value", "description": "Monetary value of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_purchase_conversions_value": {"name": "offsite_conversion_fb_pixel_purchase_conversions_value", "description": "Monetary value of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_lead_conversions_value": {"name": "offsite_conversion_fb_pixel_lead_conversions_value", "description": "Monetary value of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_custom_conversions_value": {"name": "offsite_conversion_fb_pixel_custom_conversions_value", "description": "Monetary value of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_at": {"name": "start_at", "description": "Timestamp of designated campaign start time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_at": {"name": "end_at", "description": "Timestamp of designated campaign end time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget": {"name": "daily_budget", "description": "Daily budget of campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_remaining": {"name": "budget_remaining", "description": "Remaining budget of campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lifetime_budget": {"name": "lifetime_budget", "description": "Lifetime budget of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Status values are - 'ACTIVE', 'PAUSED', 'DELETED', 'ARCHIVED'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/facebook.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.1904159, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__campaign_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_facebook_ads__basic_ad') }}\n\n), \n\nconversion_report as (\n\n select *\n from {{ ref('int_facebook_ads__conversions') }}\n\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_facebook_ads__account_history') }}\n where is_most_recent_record = true\n\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_facebook_ads__campaign_history') }}\n where is_most_recent_record = true\n\n),\n\nads as (\n\n select *\n from {{ ref('stg_facebook_ads__ad_history') }}\n where is_most_recent_record = true\n\n),\n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n accounts.account_id,\n accounts.account_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.start_at,\n campaigns.end_at,\n campaigns.status,\n campaigns.daily_budget,\n campaigns.lifetime_budget,\n campaigns.budget_remaining,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend, \n sum(coalesce(conversion_report.conversions, 0)) as conversions,\n sum(coalesce(conversion_report.conversions_value, 0)) as conversions_value\n\n {% for action_type in var('facebook_ads__conversion_action_types') %}\n , sum(coalesce(conversion_report.{{ facebook_action_slug(action_type) }}_conversions, 0)) \n as {{ facebook_action_slug(action_type) }}_conversions\n , sum(coalesce(conversion_report.{{ facebook_action_slug(action_type) }}_conversions_value, 0)) \n as {{ facebook_action_slug(action_type) }}_conversions_value\n {% endfor %}\n\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_passthrough_metrics', transform = 'sum', exclude_fields=['conversions', 'conversions_value']) }}\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_actions_passthrough_metrics', transform = 'sum', coalesce_with=0) }}\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_action_values_passthrough_metrics', transform = 'sum', coalesce_with=0) }}\n\n from report \n left join conversion_report\n on report.date_day = conversion_report.date_day\n and report.ad_id = conversion_report.ad_id\n and report.source_relation = conversion_report.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join ads \n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n {{ dbt_utils.group_by(12) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__basic_ad", "package": null, "version": null}, {"name": "int_facebook_ads__conversions", "package": null, "version": null}, {"name": "stg_facebook_ads__account_history", "package": null, "version": null}, {"name": "stg_facebook_ads__campaign_history", "package": null, "version": null}, {"name": "stg_facebook_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.facebook_action_slug", "macro.facebook_ads.facebook_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.facebook_ads.stg_facebook_ads__basic_ad", "model.facebook_ads.int_facebook_ads__conversions", "model.facebook_ads.stg_facebook_ads__account_history", "model.facebook_ads.stg_facebook_ads__campaign_history", "model.facebook_ads.stg_facebook_ads__ad_history"]}, "compiled_path": "target/compiled/facebook_ads/models/facebook_ads__campaign_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad\"\n\n), \n\nconversion_report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"int_facebook_ads__conversions\"\n\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__account_history\"\n where is_most_recent_record = true\n\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__campaign_history\"\n where is_most_recent_record = true\n\n),\n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_history\"\n where is_most_recent_record = true\n\n),\n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n accounts.account_id,\n accounts.account_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n campaigns.start_at,\n campaigns.end_at,\n campaigns.status,\n campaigns.daily_budget,\n campaigns.lifetime_budget,\n campaigns.budget_remaining,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend, \n sum(coalesce(conversion_report.conversions, 0)) as conversions,\n sum(coalesce(conversion_report.conversions_value, 0)) as conversions_value\n\n \n , sum(coalesce(conversion_report.onsite_conversion_purchase_conversions, 0)) \n as onsite_conversion_purchase_conversions\n , sum(coalesce(conversion_report.onsite_conversion_purchase_conversions_value, 0)) \n as onsite_conversion_purchase_conversions_value\n \n , sum(coalesce(conversion_report.onsite_conversion_lead_grouped_conversions, 0)) \n as onsite_conversion_lead_grouped_conversions\n , sum(coalesce(conversion_report.onsite_conversion_lead_grouped_conversions_value, 0)) \n as onsite_conversion_lead_grouped_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_purchase_conversions, 0)) \n as offsite_conversion_fb_pixel_purchase_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_purchase_conversions_value, 0)) \n as offsite_conversion_fb_pixel_purchase_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_lead_conversions, 0)) \n as offsite_conversion_fb_pixel_lead_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_lead_conversions_value, 0)) \n as offsite_conversion_fb_pixel_lead_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_custom_conversions, 0)) \n as offsite_conversion_fb_pixel_custom_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_custom_conversions_value, 0)) \n as offsite_conversion_fb_pixel_custom_conversions_value\n \n\n \n\n\n\n\n \n\n\n\n\n \n\n\n\n\n\n from report \n left join conversion_report\n on report.date_day = conversion_report.date_day\n and report.ad_id = conversion_report.ad_id\n and report.source_relation = conversion_report.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join ads \n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.facebook_ads__ad_set_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "facebook_ads__ad_set_report", "resource_type": "model", "package_name": "facebook_ads", "path": "facebook_ads__ad_set_report.sql", "original_file_path": "models/facebook_ads__ad_set_report.sql", "unique_id": "model.facebook_ads.facebook_ads__ad_set_report", "fqn": ["facebook_ads", "facebook_ads__ad_set_report"], "alias": "facebook_ads__ad_set_report", "checksum": {"name": "sha256", "checksum": "e545a86e76ab522dc6764200b0f24e19a6dcc3733a0091452eed450c032ecfb7"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Facebook ad set.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "The name of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_set_id": {"name": "ad_set_id", "description": "The ID of the related ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_set_name": {"name": "ad_set_name", "description": "The name of the related ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the ad in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total number of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions_value": {"name": "conversions_value", "description": "Total monetary value of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_purchase_conversions": {"name": "onsite_conversion_purchase_conversions", "description": "Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_lead_grouped_conversions": {"name": "onsite_conversion_lead_grouped_conversions", "description": "Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_purchase_conversions": {"name": "offsite_conversion_fb_pixel_purchase_conversions", "description": "Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_lead_conversions": {"name": "offsite_conversion_fb_pixel_lead_conversions", "description": "Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_custom_conversions": {"name": "offsite_conversion_fb_pixel_custom_conversions", "description": "Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_purchase_conversions_value": {"name": "onsite_conversion_purchase_conversions_value", "description": "Monetary value of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_lead_grouped_conversions_value": {"name": "onsite_conversion_lead_grouped_conversions_value", "description": "Monetary value of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_purchase_conversions_value": {"name": "offsite_conversion_fb_pixel_purchase_conversions_value", "description": "Monetary value of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_lead_conversions_value": {"name": "offsite_conversion_fb_pixel_lead_conversions_value", "description": "Monetary value of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_custom_conversions_value": {"name": "offsite_conversion_fb_pixel_custom_conversions_value", "description": "Monetary value of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "optimization_goal": {"name": "optimization_goal", "description": "The optimization goal this ad set is using. Possible values defined [here](https://developers.facebook.com/docs/marketing-api/reference/ad-campaign/#fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_at": {"name": "start_at", "description": "Timestamp of designated ad set start time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_at": {"name": "end_at", "description": "Timestamp of designated ad set end time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_strategy": {"name": "bid_strategy", "description": "Bid strategy values are - 'LOWEST_COST_WITHOUT_CAP', 'LOWEST_COST_WITH_BID_CAP', 'COST_CAP', 'LOWEST_COST_WITH_MIN_ROAS'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget": {"name": "daily_budget", "description": "Daily budget of ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_remaining": {"name": "budget_remaining", "description": "Remaining budget of ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/facebook.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.188163, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__ad_set_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_facebook_ads__basic_ad') }}\n\n), \n\nconversion_report as (\n\n select *\n from {{ ref('int_facebook_ads__conversions') }}\n\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_facebook_ads__account_history') }}\n where is_most_recent_record = true\n\n),\n\ncampaigns as (\n\n select *\n from {{ ref('stg_facebook_ads__campaign_history') }}\n where is_most_recent_record = true\n\n),\n\nad_sets as (\n\n select *\n from {{ ref('stg_facebook_ads__ad_set_history') }}\n where is_most_recent_record = true\n\n),\n\nads as (\n\n select *\n from {{ ref('stg_facebook_ads__ad_history') }}\n where is_most_recent_record = true\n\n),\n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n accounts.account_id,\n accounts.account_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n ad_sets.ad_set_id,\n ad_sets.ad_set_name,\n ad_sets.start_at,\n ad_sets.end_at,\n ad_sets.bid_strategy,\n ad_sets.daily_budget,\n ad_sets.budget_remaining,\n ad_sets.optimization_goal,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend, \n sum(coalesce(conversion_report.conversions, 0)) as conversions,\n sum(coalesce(conversion_report.conversions_value, 0)) as conversions_value\n\n {% for action_type in var('facebook_ads__conversion_action_types') %}\n , sum(coalesce(conversion_report.{{ facebook_action_slug(action_type) }}_conversions, 0)) \n as {{ facebook_action_slug(action_type) }}_conversions\n , sum(coalesce(conversion_report.{{ facebook_action_slug(action_type) }}_conversions_value, 0)) \n as {{ facebook_action_slug(action_type) }}_conversions_value\n {% endfor %}\n\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_passthrough_metrics', transform = 'sum', exclude_fields=['conversions', 'conversions_value']) }}\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_actions_passthrough_metrics', transform = 'sum', coalesce_with=0) }}\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_action_values_passthrough_metrics', transform = 'sum', coalesce_with=0) }}\n\n from report \n left join conversion_report\n on report.date_day = conversion_report.date_day\n and report.ad_id = conversion_report.ad_id\n and report.source_relation = conversion_report.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join ads \n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n left join ad_sets\n on ads.ad_set_id = ad_sets.ad_set_id\n and ads.source_relation = ad_sets.source_relation\n {{ dbt_utils.group_by(14) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__basic_ad", "package": null, "version": null}, {"name": "int_facebook_ads__conversions", "package": null, "version": null}, {"name": "stg_facebook_ads__account_history", "package": null, "version": null}, {"name": "stg_facebook_ads__campaign_history", "package": null, "version": null}, {"name": "stg_facebook_ads__ad_set_history", "package": null, "version": null}, {"name": "stg_facebook_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.facebook_action_slug", "macro.facebook_ads.facebook_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.facebook_ads.stg_facebook_ads__basic_ad", "model.facebook_ads.int_facebook_ads__conversions", "model.facebook_ads.stg_facebook_ads__account_history", "model.facebook_ads.stg_facebook_ads__campaign_history", "model.facebook_ads.stg_facebook_ads__ad_set_history", "model.facebook_ads.stg_facebook_ads__ad_history"]}, "compiled_path": "target/compiled/facebook_ads/models/facebook_ads__ad_set_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad\"\n\n), \n\nconversion_report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"int_facebook_ads__conversions\"\n\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__account_history\"\n where is_most_recent_record = true\n\n),\n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__campaign_history\"\n where is_most_recent_record = true\n\n),\n\nad_sets as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_set_history\"\n where is_most_recent_record = true\n\n),\n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_history\"\n where is_most_recent_record = true\n\n),\n\njoined as (\n\n select \n report.source_relation,\n report.date_day,\n accounts.account_id,\n accounts.account_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n ad_sets.ad_set_id,\n ad_sets.ad_set_name,\n ad_sets.start_at,\n ad_sets.end_at,\n ad_sets.bid_strategy,\n ad_sets.daily_budget,\n ad_sets.budget_remaining,\n ad_sets.optimization_goal,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend, \n sum(coalesce(conversion_report.conversions, 0)) as conversions,\n sum(coalesce(conversion_report.conversions_value, 0)) as conversions_value\n\n \n , sum(coalesce(conversion_report.onsite_conversion_purchase_conversions, 0)) \n as onsite_conversion_purchase_conversions\n , sum(coalesce(conversion_report.onsite_conversion_purchase_conversions_value, 0)) \n as onsite_conversion_purchase_conversions_value\n \n , sum(coalesce(conversion_report.onsite_conversion_lead_grouped_conversions, 0)) \n as onsite_conversion_lead_grouped_conversions\n , sum(coalesce(conversion_report.onsite_conversion_lead_grouped_conversions_value, 0)) \n as onsite_conversion_lead_grouped_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_purchase_conversions, 0)) \n as offsite_conversion_fb_pixel_purchase_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_purchase_conversions_value, 0)) \n as offsite_conversion_fb_pixel_purchase_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_lead_conversions, 0)) \n as offsite_conversion_fb_pixel_lead_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_lead_conversions_value, 0)) \n as offsite_conversion_fb_pixel_lead_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_custom_conversions, 0)) \n as offsite_conversion_fb_pixel_custom_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_custom_conversions_value, 0)) \n as offsite_conversion_fb_pixel_custom_conversions_value\n \n\n \n\n\n\n\n \n\n\n\n\n \n\n\n\n\n\n from report \n left join conversion_report\n on report.date_day = conversion_report.date_day\n and report.ad_id = conversion_report.ad_id\n and report.source_relation = conversion_report.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation\n left join ads \n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n left join ad_sets\n on ads.ad_set_id = ad_sets.ad_set_id\n and ads.source_relation = ad_sets.source_relation\n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.facebook_ads__url_report": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "facebook_ads__url_report", "resource_type": "model", "package_name": "facebook_ads", "path": "facebook_ads__url_report.sql", "original_file_path": "models/facebook_ads__url_report.sql", "unique_id": "model.facebook_ads.facebook_ads__url_report", "fqn": ["facebook_ads", "facebook_ads__url_report"], "alias": "facebook_ads__url_report", "checksum": {"name": "sha256", "checksum": "7e33ea42888d8ba3f2245a510727e771b2fe9983949833f60337c27d1e795347"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of a Facebook ad at the URL level.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "date_day": {"name": "date_day", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "The name of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_set_id": {"name": "ad_set_id", "description": "The ID of the related ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_set_name": {"name": "ad_set_name", "description": "The name of the related ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_id": {"name": "ad_id", "description": "The ID of the related ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_name": {"name": "ad_name", "description": "The name of the related ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_id": {"name": "creative_id", "description": "The ID of the related creative.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_name": {"name": "creative_name", "description": "The name of the related creative.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "base_url": {"name": "base_url", "description": "The base URL of the ad, extracted from the page_link and template_page_link.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_host": {"name": "url_host", "description": "The URL host of the ad, extracted from the page_link and template_page_link.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_path": {"name": "url_path", "description": "The URL path of the ad, extracted from the page_link and template_page_link.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_source": {"name": "utm_source", "description": "The utm_source parameter of the ad, extracted from the page_link and template_page_link.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_medium": {"name": "utm_medium", "description": "The utm_medium parameter of the ad, extracted from the page_link and template_page_link.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_campaign": {"name": "utm_campaign", "description": "The utm_campaign parameter of the ad, extracted from the page_link and template_page_link.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_content": {"name": "utm_content", "description": "The utm_content parameter of the ad, extracted from the page_link and template_page_link.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "utm_term": {"name": "utm_term", "description": "The utm_term parameter of the ad, extracted from the page_link and template_page_link.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the ad in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total number of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions_value": {"name": "conversions_value", "description": "Total monetary value of conversions using the default attribution window on the given day. See the [README](https://github.com/fivetran/dbt_facebook_ads?tab=readme-ov-file#configuring-conversion-action-types) for details around conversion-eligible action types.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_purchase_conversions": {"name": "onsite_conversion_purchase_conversions", "description": "Number of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_lead_grouped_conversions": {"name": "onsite_conversion_lead_grouped_conversions", "description": "Number of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_purchase_conversions": {"name": "offsite_conversion_fb_pixel_purchase_conversions", "description": "Number of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_lead_conversions": {"name": "offsite_conversion_fb_pixel_lead_conversions", "description": "Number of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_custom_conversions": {"name": "offsite_conversion_fb_pixel_custom_conversions", "description": "Number of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_purchase_conversions_value": {"name": "onsite_conversion_purchase_conversions_value", "description": "Monetary value of purchase conversions made within Meta technologies (such as Pages or Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "onsite_conversion_lead_grouped_conversions_value": {"name": "onsite_conversion_lead_grouped_conversions_value", "description": "Monetary value of leads submitted on Meta technologies (including forms and Messenger) and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_purchase_conversions_value": {"name": "offsite_conversion_fb_pixel_purchase_conversions_value", "description": "Monetary value of purchase events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_lead_conversions_value": {"name": "offsite_conversion_fb_pixel_lead_conversions_value", "description": "Monetary value of lead events tracked by the pixel or Conversions API on your website and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_conversion_fb_pixel_custom_conversions_value": {"name": "offsite_conversion_fb_pixel_custom_conversions_value", "description": "Monetary value of custom pixel events defined by the advertiser and attributed to your ads, using the default attribution window. Additional custom action types can be configured via the `facebook_ads__conversion_action_types` variable.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/facebook.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.1828115, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__url_report\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith report as (\n\n select *\n from {{ ref('stg_facebook_ads__basic_ad') }}\n\n), \n\nconversion_report as (\n\n select *\n from {{ ref('int_facebook_ads__conversions') }}\n\n), \n\ncreatives as (\n\n select *\n from {{ ref('int_facebook_ads__creative_history') }}\n\n), \n\naccounts as (\n\n select *\n from {{ ref('stg_facebook_ads__account_history') }}\n where is_most_recent_record = true\n\n), \n\nads as (\n\n select *\n from {{ ref('stg_facebook_ads__ad_history') }}\n where is_most_recent_record = true\n\n), \n\nad_sets as (\n\n select *\n from {{ ref('stg_facebook_ads__ad_set_history') }}\n where is_most_recent_record = true\n\n), \n\ncampaigns as (\n\n select *\n from {{ ref('stg_facebook_ads__campaign_history') }}\n where is_most_recent_record = true\n\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_id,\n accounts.account_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n ad_sets.ad_set_id,\n ad_sets.ad_set_name,\n ads.ad_id,\n ads.ad_name,\n creatives.creative_id,\n creatives.creative_name,\n creatives.base_url,\n creatives.url_host,\n creatives.url_path,\n creatives.utm_source,\n creatives.utm_medium,\n creatives.utm_campaign,\n creatives.utm_content,\n creatives.utm_term,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(coalesce(conversion_report.conversions, 0)) as conversions,\n sum(coalesce(conversion_report.conversions_value, 0)) as conversions_value\n\n {% for action_type in var('facebook_ads__conversion_action_types') %}\n , sum(coalesce(conversion_report.{{ facebook_action_slug(action_type) }}_conversions, 0)) \n as {{ facebook_action_slug(action_type) }}_conversions\n , sum(coalesce(conversion_report.{{ facebook_action_slug(action_type) }}_conversions_value, 0)) \n as {{ facebook_action_slug(action_type) }}_conversions_value\n {% endfor %}\n\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_passthrough_metrics', transform = 'sum', exclude_fields=['conversions', 'conversions_value']) }}\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_actions_passthrough_metrics', transform = 'sum', coalesce_with=0) }}\n {{ facebook_ads_persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_action_values_passthrough_metrics', transform = 'sum', coalesce_with=0) }}\n\n from report\n left join conversion_report\n on report.date_day = conversion_report.date_day\n and report.ad_id = conversion_report.ad_id\n and report.source_relation = conversion_report.source_relation\n left join ads \n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join creatives\n on ads.creative_id = creatives.creative_id\n and ads.source_relation = creatives.source_relation\n left join ad_sets\n on ads.ad_set_id = ad_sets.ad_set_id\n and ads.source_relation = ad_sets.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation \n\n {% if var('ad_reporting__url_report__using_null_filter', True) %}\n where creatives.url is not null\n {% endif %}\n \n {{ dbt_utils.group_by(20) }}\n)\n\nselect *\nfrom joined", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__basic_ad", "package": null, "version": null}, {"name": "int_facebook_ads__conversions", "package": null, "version": null}, {"name": "int_facebook_ads__creative_history", "package": null, "version": null}, {"name": "stg_facebook_ads__account_history", "package": null, "version": null}, {"name": "stg_facebook_ads__ad_history", "package": null, "version": null}, {"name": "stg_facebook_ads__ad_set_history", "package": null, "version": null}, {"name": "stg_facebook_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.facebook_action_slug", "macro.facebook_ads.facebook_ads_persist_pass_through_columns", "macro.dbt_utils.group_by"], "nodes": ["model.facebook_ads.stg_facebook_ads__basic_ad", "model.facebook_ads.int_facebook_ads__conversions", "model.facebook_ads.int_facebook_ads__creative_history", "model.facebook_ads.stg_facebook_ads__account_history", "model.facebook_ads.stg_facebook_ads__ad_history", "model.facebook_ads.stg_facebook_ads__ad_set_history", "model.facebook_ads.stg_facebook_ads__campaign_history"]}, "compiled_path": "target/compiled/facebook_ads/models/facebook_ads__url_report.sql", "compiled": true, "compiled_code": "\n\nwith report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad\"\n\n), \n\nconversion_report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"int_facebook_ads__conversions\"\n\n), \n\ncreatives as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"int_facebook_ads__creative_history\"\n\n), \n\naccounts as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__account_history\"\n where is_most_recent_record = true\n\n), \n\nads as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_history\"\n where is_most_recent_record = true\n\n), \n\nad_sets as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_set_history\"\n where is_most_recent_record = true\n\n), \n\ncampaigns as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__campaign_history\"\n where is_most_recent_record = true\n\n), \n\njoined as (\n\n select\n report.source_relation,\n report.date_day,\n accounts.account_id,\n accounts.account_name,\n campaigns.campaign_id,\n campaigns.campaign_name,\n ad_sets.ad_set_id,\n ad_sets.ad_set_name,\n ads.ad_id,\n ads.ad_name,\n creatives.creative_id,\n creatives.creative_name,\n creatives.base_url,\n creatives.url_host,\n creatives.url_path,\n creatives.utm_source,\n creatives.utm_medium,\n creatives.utm_campaign,\n creatives.utm_content,\n creatives.utm_term,\n sum(report.clicks) as clicks,\n sum(report.impressions) as impressions,\n sum(report.spend) as spend,\n sum(coalesce(conversion_report.conversions, 0)) as conversions,\n sum(coalesce(conversion_report.conversions_value, 0)) as conversions_value\n\n \n , sum(coalesce(conversion_report.onsite_conversion_purchase_conversions, 0)) \n as onsite_conversion_purchase_conversions\n , sum(coalesce(conversion_report.onsite_conversion_purchase_conversions_value, 0)) \n as onsite_conversion_purchase_conversions_value\n \n , sum(coalesce(conversion_report.onsite_conversion_lead_grouped_conversions, 0)) \n as onsite_conversion_lead_grouped_conversions\n , sum(coalesce(conversion_report.onsite_conversion_lead_grouped_conversions_value, 0)) \n as onsite_conversion_lead_grouped_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_purchase_conversions, 0)) \n as offsite_conversion_fb_pixel_purchase_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_purchase_conversions_value, 0)) \n as offsite_conversion_fb_pixel_purchase_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_lead_conversions, 0)) \n as offsite_conversion_fb_pixel_lead_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_lead_conversions_value, 0)) \n as offsite_conversion_fb_pixel_lead_conversions_value\n \n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_custom_conversions, 0)) \n as offsite_conversion_fb_pixel_custom_conversions\n , sum(coalesce(conversion_report.offsite_conversion_fb_pixel_custom_conversions_value, 0)) \n as offsite_conversion_fb_pixel_custom_conversions_value\n \n\n \n\n\n\n\n \n\n\n\n\n \n\n\n\n\n\n from report\n left join conversion_report\n on report.date_day = conversion_report.date_day\n and report.ad_id = conversion_report.ad_id\n and report.source_relation = conversion_report.source_relation\n left join ads \n on report.ad_id = ads.ad_id\n and report.source_relation = ads.source_relation\n left join creatives\n on ads.creative_id = creatives.creative_id\n and ads.source_relation = creatives.source_relation\n left join ad_sets\n on ads.ad_set_id = ad_sets.ad_set_id\n and ads.source_relation = ad_sets.source_relation\n left join campaigns\n on ads.campaign_id = campaigns.campaign_id\n and ads.source_relation = campaigns.source_relation\n left join accounts\n on report.account_id = accounts.account_id\n and report.source_relation = accounts.source_relation \n\n \n where creatives.url is not null\n \n \n group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20\n)\n\nselect *\nfrom joined", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__demographics_region": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_region", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/stg_facebook_ads__demographics_region.sql", "original_file_path": "models/staging/stg_facebook_ads__demographics_region.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_region", "fqn": ["facebook_ads", "staging", "stg_facebook_ads__demographics_region"], "alias": "stg_facebook_ads__demographics_region", "checksum": {"name": "sha256", "checksum": "82f834b8444667ed1e2a4b98546198a786b246e3815a89b3f057055908d67c34"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Ads report segmented by geographic region.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "region_id": {"name": "region_id", "description": "Fivetran-generated unique ID of the geographic region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.region_id"]}, "region": {"name": "region", "description": "Geographic region whose ad performance is being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.region"]}, "date_day": {"name": "date_day", "description": "The date of the reported performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.date"]}, "account_id": {"name": "account_id", "description": "The ID of the ad account that this ad belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.account_id"]}, "impressions": {"name": "impressions", "description": "The number of impressions the ads had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.impressions"]}, "clicks": {"name": "clicks", "description": "The number of clicks on links to select destinations or experiences, on or off Facebook-owned properties. Inline link clicks use a fixed 1-day-click attribution window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.inline_link_clicks"]}, "spend": {"name": "spend", "description": "Ad spend in a given day for the breakdown.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.spend"]}, "reach": {"name": "reach", "description": "The number of people who saw any content from your Page or about your Page. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.reach"]}, "frequency": {"name": "frequency", "description": "The average number of times each person saw your ads; it is calculated as impressions divided by reach.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.frequency"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/staging/stg_facebook_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.2615716, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_region\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True) and var('facebook_ads__using_demographics_region', False)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_facebook_ads__demographics_region_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_facebook_ads__demographics_region_tmp')),\n staging_columns=get_demographics_region_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='facebook_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_id as region_id,\n region,\n date as date_day,\n cast(account_id as {{ dbt.type_bigint() }}) as account_id,\n impressions,\n coalesce(inline_link_clicks,0) as clicks,\n spend,\n reach,\n frequency\n\n {{ fivetran_utils.fill_pass_through_columns('facebook_ads__demographics_region_passthrough_metrics') }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": ["doc.facebook_ads.demographics_region"], "language": "sql", "refs": [{"name": "stg_facebook_ads__demographics_region_tmp", "package": null, "version": null}, {"name": "stg_facebook_ads__demographics_region_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.get_demographics_region_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_bigint", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.facebook_ads.stg_facebook_ads__demographics_region_tmp"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads__demographics_region.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_region_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_id as _fivetran_id,\n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n date as date,\n frequency as frequency,\n impressions as impressions,\n inline_link_clicks as inline_link_clicks,\n reach as reach,\n region as region,\n spend as spend\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_id as region_id,\n region,\n date as date_day,\n cast(account_id as bigint) as account_id,\n impressions,\n coalesce(inline_link_clicks,0) as clicks,\n spend,\n reach,\n frequency\n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__basic_ad_action_values": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__basic_ad_action_values", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/stg_facebook_ads__basic_ad_action_values.sql", "original_file_path": "models/staging/stg_facebook_ads__basic_ad_action_values.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__basic_ad_action_values", "fqn": ["facebook_ads", "staging", "stg_facebook_ads__basic_ad_action_values"], "alias": "stg_facebook_ads__basic_ad_action_values", "checksum": {"name": "sha256", "checksum": "a2dacbc7f99fcbb8c408c96134cddbb5d0d873eeebf2e50e713a03331d3c5aeb"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily conversion values associated with an ad in Facebook. This is the prebuilt `basic_ad` report broken down by `action_type` and `action_values` Include more conversion value metrics by configuring the `facebook_ads__basic_ad_action_values_passthrough_metrics` variable.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "action_type": {"name": "action_type", "description": "The kind of actions taken on your ad, Page, app or event after your ad was served to someone, even if they didn't click on it. Action types include Page likes, app installs, conversions, event responses and more. Actions prepended by app_custom_event come from mobile app events and actions prepended by offsite_conversion come from the Facebook Pixel.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_id": {"name": "ad_id", "description": "The ID of the ad the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_id": {"name": "_fivetran_id", "description": "Unique record identifier.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the reported performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "index": {"name": "index", "description": "Index reflecting the `action_type` tracked for this ad on this day. A primary key created by Fivetran utilized for tracking data, specifically when there are multiple rows associated with a single row in the parent table.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.index"]}, "conversions_value": {"name": "conversions_value", "description": "Monetary value associated with the conversion action using the default attribution window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/staging/stg_facebook_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.2588093, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad_action_values\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_facebook_ads__basic_ad_action_values_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_facebook_ads__basic_ad_action_values_tmp')),\n staging_columns=get_basic_ad_action_values_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='facebook_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n lower(action_type) as action_type,\n cast(ad_id as {{ dbt.type_bigint() }}) as ad_id,\n _fivetran_id,\n date as date_day,\n index,\n cast(coalesce(value, 0) as {{ dbt.type_float() }}) as conversions_value\n\n {{ facebook_ads_fill_pass_through_columns(var('facebook_ads__basic_ad_action_values_passthrough_metrics')) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__basic_ad_action_values_tmp", "package": null, "version": null}, {"name": "stg_facebook_ads__basic_ad_action_values_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.get_basic_ad_action_values_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_bigint", "macro.dbt.type_float", "macro.facebook_ads.facebook_ads_fill_pass_through_columns"], "nodes": ["model.facebook_ads.stg_facebook_ads__basic_ad_action_values_tmp"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads__basic_ad_action_values.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad_action_values_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_id as _fivetran_id,\n _fivetran_synced as _fivetran_synced,\n action_type as action_type,\n ad_id as ad_id,\n date as date,\n index as index,\n value as value\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n lower(action_type) as action_type,\n cast(ad_id as bigint) as ad_id,\n _fivetran_id,\n date as date_day,\n index,\n cast(coalesce(value, 0) as float) as conversions_value\n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__basic_ad": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__basic_ad", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/stg_facebook_ads__basic_ad.sql", "original_file_path": "models/staging/stg_facebook_ads__basic_ad.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__basic_ad", "fqn": ["facebook_ads", "staging", "stg_facebook_ads__basic_ad"], "alias": "stg_facebook_ads__basic_ad", "checksum": {"name": "sha256", "checksum": "bf40f829575a18b972c2952619a78bbb095da53ddb4b2b29d6f6111696184e1f"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily performance of an ad in Facebook.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "ad_id": {"name": "ad_id", "description": "The ID of the ad the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_name": {"name": "ad_name", "description": "Name of the ad the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_set_name": {"name": "ad_set_name", "description": "Name of the ad set the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the reported performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the ad account that this ad belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the ad in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reach": {"name": "reach", "description": "The number of people who saw any content from your Page or about your Page. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "frequency": {"name": "frequency", "description": "The average number of times each person saw your ad; it is calculated as impressions divided by reach.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/staging/stg_facebook_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.2570906, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_facebook_ads__basic_ad_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_facebook_ads__basic_ad_tmp')),\n staging_columns=get_basic_ad_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='facebook_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(ad_id as {{ dbt.type_bigint() }}) as ad_id,\n ad_name,\n adset_name as ad_set_name,\n date as date_day,\n cast(account_id as {{ dbt.type_bigint() }}) as account_id,\n impressions,\n coalesce(inline_link_clicks,0) as clicks,\n spend\n\n {# \n Reach and Frequency are not included in downstream models by default, though they are included in the staging model.\n The below ensures that users can add Reach and Frequency to downstream models with the `facebook_ads__basic_ad_passthrough_metrics` variable\n while avoiding duplicate column errors.\n #}\n {%- set check = [] %}\n {%- for field in var('facebook_ads__basic_ad_passthrough_metrics') -%}\n {%- set field_name = field.alias|default(field.name)|lower %}\n {% if field_name in ['reach', 'frequency'] %}\n {% do check.append(field_name) %}\n {% endif %}\n {%- endfor %}\n\n {%- for metric in ['reach', 'frequency'] -%}\n {% if metric not in check %}\n , {{ metric }}\n {% endif %}\n {%- endfor %}\n\n {{ fivetran_utils.fill_pass_through_columns('facebook_ads__basic_ad_passthrough_metrics') }}\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__basic_ad_tmp", "package": null, "version": null}, {"name": "stg_facebook_ads__basic_ad_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.get_basic_ad_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_bigint", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.facebook_ads.stg_facebook_ads__basic_ad_tmp"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads__basic_ad.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad_tmp\"\n),\n\nfields as (\n\n select\n \n ad_id as ad_id,\n cast(null as TEXT) as ad_name,\n cast(null as TEXT) as adset_name,\n date as date,\n account_id as account_id,\n impressions as impressions,\n inline_link_clicks as inline_link_clicks,\n spend as spend,\n cast(null as integer) as reach,\n cast(null as float) as frequency\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(ad_id as bigint) as ad_id,\n ad_name,\n adset_name as ad_set_name,\n date as date_day,\n cast(account_id as bigint) as account_id,\n impressions,\n coalesce(inline_link_clicks,0) as clicks,\n spend\n\n \n , reach\n \n , frequency\n \n\n \n\n\n\n\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__campaign_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__campaign_history", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/stg_facebook_ads__campaign_history.sql", "original_file_path": "models/staging/stg_facebook_ads__campaign_history.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__campaign_history", "fqn": ["facebook_ads", "staging", "stg_facebook_ads__campaign_history"], "alias": "stg_facebook_ads__campaign_history", "checksum": {"name": "sha256", "checksum": "5ef367b9564e77882c479fca7b0d2e0818e42ab3520bce20a0f4b9f29c6bedb4"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table reflects a Facebook campaign.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the ad account that this campaign belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record. All records should have this value set to True given we filter on it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.is_most_recent_record"]}, "updated_at": {"name": "updated_at", "description": "The timestamp of the last update of a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.updated_time"]}, "created_at": {"name": "created_at", "description": "The time the campaign was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_at": {"name": "start_at", "description": "Timestamp of designated campaign start time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_at": {"name": "end_at", "description": "Timestamp of designated campaign end time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget": {"name": "daily_budget", "description": "Daily budget of campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_remaining": {"name": "budget_remaining", "description": "Remaining budget of campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lifetime_budget": {"name": "lifetime_budget", "description": "Lifetime budget of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Status values are - 'ACTIVE', 'PAUSED', 'DELETED', 'ARCHIVED'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/staging/stg_facebook_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.2544146, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__campaign_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_facebook_ads__campaign_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_facebook_ads__campaign_history_tmp')),\n staging_columns=get_campaign_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='facebook_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n updated_time as updated_at,\n created_time as created_at,\n cast(account_id as {{ dbt.type_bigint() }}) as account_id,\n cast(id as {{ dbt.type_bigint() }}) as campaign_id,\n name as campaign_name,\n start_time as start_at,\n stop_time as end_at,\n status,\n daily_budget,\n lifetime_budget,\n budget_remaining,\n case when id is null and updated_time is null \n then row_number() over ({{ fivetran_utils.partition_by_source_relation(package_name='facebook_ads', has_other_partitions='no') }} order by source_relation)\n else row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='facebook_ads') }} order by updated_time desc) end = 1 as is_most_recent_record\n from fields\n\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__campaign_history_tmp", "package": null, "version": null}, {"name": "stg_facebook_ads__campaign_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.get_campaign_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_bigint", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.facebook_ads.stg_facebook_ads__campaign_history_tmp"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads__campaign_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__campaign_history_tmp\"\n),\n\nfields as (\n\n select\n \n updated_time as updated_time,\n cast(null as timestamp) as created_time,\n account_id as account_id,\n id as id,\n name as name,\n cast(null as timestamp) as start_time,\n cast(null as timestamp) as stop_time,\n cast(null as TEXT) as status,\n cast(null as integer) as daily_budget,\n cast(null as integer) as lifetime_budget,\n cast(null as float) as budget_remaining\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n updated_time as updated_at,\n created_time as created_at,\n cast(account_id as bigint) as account_id,\n cast(id as bigint) as campaign_id,\n name as campaign_name,\n start_time as start_at,\n stop_time as end_at,\n status,\n daily_budget,\n lifetime_budget,\n budget_remaining,\n case when id is null and updated_time is null \n then row_number() over ( order by source_relation)\n else row_number() over (partition by id order by updated_time desc) end = 1 as is_most_recent_record\n from fields\n\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__demographics_region_actions": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_region_actions", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/stg_facebook_ads__demographics_region_actions.sql", "original_file_path": "models/staging/stg_facebook_ads__demographics_region_actions.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_region_actions", "fqn": ["facebook_ads", "staging", "stg_facebook_ads__demographics_region_actions"], "alias": "stg_facebook_ads__demographics_region_actions", "checksum": {"name": "sha256", "checksum": "18a9293bfee09d01e281194bc2d9f24067cfa6a35fed86b7588d752c3cc4d202"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents daily conversion performance by geographic region. This is the prebuilt `demographics_region` report broken down by `action_type`.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "region_id": {"name": "region_id", "description": "Fivetran-generated unique ID of the geographic region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.region_id"]}, "action_type": {"name": "action_type", "description": "The kind of actions taken on your ad, Page, app or event after your ad was served to someone, even if they didn't click on it. Action types include Page likes, app installs, conversions, event responses and more.\nActions prepended by `app_custom_event` come from mobile app events and actions prepended by `offsite_conversion` come from the Facebook Pixel.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.action_type"]}, "account_id": {"name": "account_id", "description": "The ID of the ad account that this ad belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.account_id"]}, "date_day": {"name": "date_day", "description": "The date of the reported performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.date"]}, "index": {"name": "index", "description": "Index reflecting the `action_type` tracked for this ad on this day. A primary key created by Fivetran utilized for tracking data, specifically when there are multiple rows associated with a single row in the parent table.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.index"]}, "conversions": {"name": "conversions", "description": "Conversion metric value using the default attribution window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.conversions"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/staging/stg_facebook_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.2624843, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_region_actions\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True) and var('facebook_ads__using_demographics_region', False)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_facebook_ads__demographics_region_actions_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_facebook_ads__demographics_region_actions_tmp')),\n staging_columns=get_demographics_region_actions_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='facebook_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_id as region_id,\n lower(action_type) as action_type,\n cast(account_id as {{ dbt.type_bigint() }}) as account_id,\n date as date_day,\n index,\n cast(coalesce(value, 0) as {{ dbt.type_float() }}) as conversions\n\n {{ fivetran_utils.fill_pass_through_columns('facebook_ads__demographics_region_actions_passthrough_metrics') }}\n \n from fields\n)\n\nselect *\nfrom final", "doc_blocks": ["doc.facebook_ads.demographics_region_actions"], "language": "sql", "refs": [{"name": "stg_facebook_ads__demographics_region_actions_tmp", "package": null, "version": null}, {"name": "stg_facebook_ads__demographics_region_actions_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.get_demographics_region_actions_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_bigint", "macro.dbt.type_float", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.facebook_ads.stg_facebook_ads__demographics_region_actions_tmp"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads__demographics_region_actions.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_region_actions_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_id as _fivetran_id,\n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n action_type as action_type,\n date as date,\n index as index,\n value as value\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_id as region_id,\n lower(action_type) as action_type,\n cast(account_id as bigint) as account_id,\n date as date_day,\n index,\n cast(coalesce(value, 0) as float) as conversions\n\n \n\n\n\n\n \n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__ad_set_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__ad_set_history", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/stg_facebook_ads__ad_set_history.sql", "original_file_path": "models/staging/stg_facebook_ads__ad_set_history.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__ad_set_history", "fqn": ["facebook_ads", "staging", "stg_facebook_ads__ad_set_history"], "alias": "stg_facebook_ads__ad_set_history", "checksum": {"name": "sha256", "checksum": "98dd6376b043f5cfffe8c5ef166e2df3a440e37e2e08616afbab73fdba6f01e7"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table reflects a Facebook ad set.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "ad_set_id": {"name": "ad_set_id", "description": "The ID of the ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the ad account that this ad set belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Ad campaign that contains this ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_set_name": {"name": "ad_set_name", "description": "The name of the ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record. All records should have this value set to True given we filter on it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.is_most_recent_record"]}, "updated_at": {"name": "updated_at", "description": "The timestamp of the last update of a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.updated_time"]}, "start_at": {"name": "start_at", "description": "Timestamp of designated ad set start time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_at": {"name": "end_at", "description": "Timestamp of designated ad set end time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_strategy": {"name": "bid_strategy", "description": "Bid strategy values are - 'LOWEST_COST_WITHOUT_CAP', 'LOWEST_COST_WITH_BID_CAP', 'COST_CAP', 'LOWEST_COST_WITH_MIN_ROAS'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget": {"name": "daily_budget", "description": "Daily budget of ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_remaining": {"name": "budget_remaining", "description": "Remaining budget of ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Status values are - 'ACTIVE', 'PAUSED', 'DELETED', 'ARCHIVED'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "optimization_goal": {"name": "optimization_goal", "description": "The optimization goal this ad set is using. Possible values defined [here](https://developers.facebook.com/docs/marketing-api/reference/ad-campaign/#fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/staging/stg_facebook_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.2532063, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_set_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_facebook_ads__ad_set_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_facebook_ads__ad_set_history_tmp')),\n staging_columns=get_ad_set_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='facebook_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n updated_time as updated_at,\n cast(id as {{ dbt.type_bigint() }}) as ad_set_id,\n name as ad_set_name,\n cast(account_id as {{ dbt.type_bigint() }}) as account_id,\n cast(campaign_id as {{ dbt.type_bigint() }}) as campaign_id,\n start_time as start_at,\n end_time as end_at,\n bid_strategy,\n daily_budget,\n budget_remaining,\n status,\n optimization_goal,\n case when id is null and updated_time is null\n then row_number() over ({{ fivetran_utils.partition_by_source_relation(package_name='facebook_ads', has_other_partitions='no') }} order by source_relation)\n else row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='facebook_ads') }} order by updated_time desc) end = 1 as is_most_recent_record\n from fields\n\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__ad_set_history_tmp", "package": null, "version": null}, {"name": "stg_facebook_ads__ad_set_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.get_ad_set_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_bigint", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.facebook_ads.stg_facebook_ads__ad_set_history_tmp"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads__ad_set_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_set_history_tmp\"\n),\n\nfields as (\n\n select\n \n updated_time as updated_time,\n id as id,\n name as name,\n account_id as account_id,\n campaign_id as campaign_id,\n cast(null as timestamp) as start_time,\n cast(null as timestamp) as end_time,\n cast(null as TEXT) as bid_strategy,\n cast(null as integer) as daily_budget,\n cast(null as integer) as budget_remaining,\n cast(null as TEXT) as status,\n cast(null as TEXT) as optimization_goal\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n updated_time as updated_at,\n cast(id as bigint) as ad_set_id,\n name as ad_set_name,\n cast(account_id as bigint) as account_id,\n cast(campaign_id as bigint) as campaign_id,\n start_time as start_at,\n end_time as end_at,\n bid_strategy,\n daily_budget,\n budget_remaining,\n status,\n optimization_goal,\n case when id is null and updated_time is null\n then row_number() over ( order by source_relation)\n else row_number() over (partition by id order by updated_time desc) end = 1 as is_most_recent_record\n from fields\n\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__account_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__account_history", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/stg_facebook_ads__account_history.sql", "original_file_path": "models/staging/stg_facebook_ads__account_history.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__account_history", "fqn": ["facebook_ads", "staging", "stg_facebook_ads__account_history"], "alias": "stg_facebook_ads__account_history", "checksum": {"name": "sha256", "checksum": "936c72fe6b609d970df117e52fb81fa68eea6bb804d75a3f33a9ce6535d3f606"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table reflects a Facebook ad account.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "account_id": {"name": "account_id", "description": "The ID of the ad account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "Name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record. All records should have this value set to True given we filter on it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.is_most_recent_record"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._fivetran_synced"]}, "account_status": {"name": "account_status", "description": "Current status of account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "business_country_code": {"name": "business_country_code", "description": "Country code of business associated to account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The time account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Currency associated with account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone_name": {"name": "timezone_name", "description": "Timezone associated with account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone_offset_hours_utc": {"name": "timezone_offset_hours_utc", "description": "Time zone difference from UTC.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "business_state": {"name": "business_state", "description": "State abbreviation for business address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "min_daily_budget": {"name": "min_daily_budget", "description": "The minimum daily budget for this Ad Account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/staging/stg_facebook_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.2505298, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__account_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_facebook_ads__account_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_facebook_ads__account_history_tmp')),\n staging_columns=get_account_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='facebook_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as {{ dbt.type_bigint() }}) as account_id,\n _fivetran_synced,\n name as account_name,\n account_status,\n business_country_code,\n business_state,\n created_time as created_at,\n currency,\n timezone_name,\n timezone_offset_hours_utc,\n min_daily_budget,\n case when id is null and _fivetran_synced is null \n then row_number() over ({{ fivetran_utils.partition_by_source_relation(package_name='facebook_ads', has_other_partitions='no') }} order by source_relation)\n else row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='facebook_ads') }} order by _fivetran_synced desc) end = 1 as is_most_recent_record\n from fields\n\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__account_history_tmp", "package": null, "version": null}, {"name": "stg_facebook_ads__account_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.get_account_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_bigint", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.facebook_ads.stg_facebook_ads__account_history_tmp"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads__account_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__account_history_tmp\"\n),\n\nfields as (\n\n select\n \n id as id,\n _fivetran_synced as _fivetran_synced,\n name as name,\n cast(null as TEXT) as account_status,\n cast(null as TEXT) as business_country_code,\n cast(null as timestamp) as created_time,\n cast(null as TEXT) as currency,\n cast(null as TEXT) as timezone_name,\n cast(null as float) as timezone_offset_hours_utc,\n cast(null as TEXT) as business_state,\n cast(null as integer) as min_daily_budget\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n cast(id as bigint) as account_id,\n _fivetran_synced,\n name as account_name,\n account_status,\n business_country_code,\n business_state,\n created_time as created_at,\n currency,\n timezone_name,\n timezone_offset_hours_utc,\n min_daily_budget,\n case when id is null and _fivetran_synced is null \n then row_number() over ( order by source_relation)\n else row_number() over (partition by id order by _fivetran_synced desc) end = 1 as is_most_recent_record\n from fields\n\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__creative_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__creative_history", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/stg_facebook_ads__creative_history.sql", "original_file_path": "models/staging/stg_facebook_ads__creative_history.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__creative_history", "fqn": ["facebook_ads", "staging", "stg_facebook_ads__creative_history"], "alias": "stg_facebook_ads__creative_history", "checksum": {"name": "sha256", "checksum": "05b1d4f44ebda09ce746772876fa1f67345bc78ef704709cbeca45b0ee8984db"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table reflects a Facebook creative.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "_fivetran_id": {"name": "_fivetran_id", "description": "Unique record identifier", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._fivetran_synced"]}, "creative_id": {"name": "creative_id", "description": "Unique ID for an ad creative.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "Ad account ID for the account this ad creative belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_name": {"name": "creative_name", "description": "Name of this ad creative as seen in the ad account's library.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_tags": {"name": "url_tags", "description": "A set of query string parameters which will replace or be appended to urls clicked from page post ads, message of the post, and canvas app install creatives only.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Indicates whether a record is the most recent version of that record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "page_link": {"name": "page_link", "description": "Link for the page.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "template_page_link": {"name": "template_page_link", "description": "URL destination of Facebook dynamic ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "asset_feed_spec_link_urls": {"name": "asset_feed_spec_link_urls", "description": "Link to the asset feed spec", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "object_story_link_data_child_attachments": {"name": "object_story_link_data_child_attachments", "description": "Link of the object story child attachments", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "object_story_link_data_caption": {"name": "object_story_link_data_caption", "description": "Link of the object story caption", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "object_story_link_data_description": {"name": "object_story_link_data_description", "description": "Link of the object story description", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "object_story_link_data_link": {"name": "object_story_link_data_link", "description": "Link of the object story link", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "object_story_link_data_message": {"name": "object_story_link_data_message", "description": "Link of the object story message", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "template_app_link_spec_ios": {"name": "template_app_link_spec_ios", "description": "Link of the object story spec for ios", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "template_app_link_spec_ipad": {"name": "template_app_link_spec_ipad", "description": "Link of the template app spec for ipad", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "template_app_link_spec_android": {"name": "template_app_link_spec_android", "description": "Link of the template app for android", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "template_app_link_spec_iphone": {"name": "template_app_link_spec_iphone", "description": "Link of the template app for iphone", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/staging/stg_facebook_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.2559576, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__creative_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_facebook_ads__creative_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_facebook_ads__creative_history_tmp')),\n staging_columns=get_creative_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='facebook_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n _fivetran_id,\n _fivetran_synced,\n cast(id as {{ dbt.type_bigint() }}) as creative_id,\n cast(account_id as {{ dbt.type_bigint() }}) as account_id,\n name as creative_name,\n page_link,\n template_page_link,\n url_tags,\n asset_feed_spec_link_urls,\n object_story_link_data_child_attachments,\n object_story_link_data_caption, \n object_story_link_data_description, \n object_story_link_data_link, \n object_story_link_data_message,\n template_app_link_spec_ios,\n template_app_link_spec_ipad,\n template_app_link_spec_android,\n template_app_link_spec_iphone,\n case when id is null and _fivetran_synced is null \n then row_number() over ({{ fivetran_utils.partition_by_source_relation(package_name='facebook_ads', has_other_partitions='no') }} order by source_relation)\n else row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='facebook_ads') }} order by _fivetran_synced desc) end = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__creative_history_tmp", "package": null, "version": null}, {"name": "stg_facebook_ads__creative_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.get_creative_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_bigint", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.facebook_ads.stg_facebook_ads__creative_history_tmp"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads__creative_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__creative_history_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_id as _fivetran_id,\n _fivetran_synced as _fivetran_synced,\n id as id,\n account_id as account_id,\n name as name,\n page_link as page_link,\n template_page_link as template_page_link,\n url_tags as url_tags,\n asset_feed_spec_link_urls as asset_feed_spec_link_urls,\n object_story_link_data_child_attachments as object_story_link_data_child_attachments,\n object_story_link_data_caption as object_story_link_data_caption,\n object_story_link_data_description as object_story_link_data_description,\n object_story_link_data_link as object_story_link_data_link,\n object_story_link_data_message as object_story_link_data_message,\n cast(null as TEXT) as template_app_link_spec_android,\n template_app_link_spec_ios as template_app_link_spec_ios,\n cast(null as TEXT) as template_app_link_spec_ipad,\n cast(null as TEXT) as template_app_link_spec_iphone\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n _fivetran_id,\n _fivetran_synced,\n cast(id as bigint) as creative_id,\n cast(account_id as bigint) as account_id,\n name as creative_name,\n page_link,\n template_page_link,\n url_tags,\n asset_feed_spec_link_urls,\n object_story_link_data_child_attachments,\n object_story_link_data_caption, \n object_story_link_data_description, \n object_story_link_data_link, \n object_story_link_data_message,\n template_app_link_spec_ios,\n template_app_link_spec_ipad,\n template_app_link_spec_android,\n template_app_link_spec_iphone,\n case when id is null and _fivetran_synced is null \n then row_number() over ( order by source_relation)\n else row_number() over (partition by id order by _fivetran_synced desc) end = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__basic_ad_actions": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__basic_ad_actions", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/stg_facebook_ads__basic_ad_actions.sql", "original_file_path": "models/staging/stg_facebook_ads__basic_ad_actions.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__basic_ad_actions", "fqn": ["facebook_ads", "staging", "stg_facebook_ads__basic_ad_actions"], "alias": "stg_facebook_ads__basic_ad_actions", "checksum": {"name": "sha256", "checksum": "9cc32f6a7277d26d6c60ce62ef9328ae1c23838de7b973ef45195e2660dab424"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents the daily conversion performance of an ad in Facebook. This is the prebuilt `basic_ad` report broken down by `action_type`. Include more conversion value metrics by configuring the `facebook_ads__basic_ad_actions_passthrough_metrics` variable.\n", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "action_type": {"name": "action_type", "description": "The kind of actions taken on your ad, Page, app or event after your ad was served to someone, even if they didn't click on it. Action types include Page likes, app installs, conversions, event responses and more. Actions prepended by app_custom_event come from mobile app events and actions prepended by offsite_conversion come from the Facebook Pixel.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_id": {"name": "ad_id", "description": "The ID of the ad the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_id": {"name": "_fivetran_id", "description": "Unique record identifier.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date_day": {"name": "date_day", "description": "The date of the reported performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "index": {"name": "index", "description": "Index reflecting the `action_type` tracked for this ad on this day. A primary key created by Fivetran utilized for tracking data, specifically when there are multiple rows associated with a single row in the parent table.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.index"]}, "conversions": {"name": "conversions", "description": "Conversion metric value using the default attribution window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/staging/stg_facebook_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.2579122, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad_actions\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_facebook_ads__basic_ad_actions_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_facebook_ads__basic_ad_actions_tmp')),\n staging_columns=get_basic_ad_actions_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='facebook_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n lower(action_type) as action_type,\n cast(ad_id as {{ dbt.type_bigint() }}) as ad_id,\n _fivetran_id,\n date as date_day,\n index,\n cast(coalesce(value, 0) as {{ dbt.type_float() }}) as conversions\n\n {{ facebook_ads_fill_pass_through_columns(var('facebook_ads__basic_ad_actions_passthrough_metrics')) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__basic_ad_actions_tmp", "package": null, "version": null}, {"name": "stg_facebook_ads__basic_ad_actions_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.get_basic_ad_actions_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_bigint", "macro.dbt.type_float", "macro.facebook_ads.facebook_ads_fill_pass_through_columns"], "nodes": ["model.facebook_ads.stg_facebook_ads__basic_ad_actions_tmp"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads__basic_ad_actions.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad_actions_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_id as _fivetran_id,\n _fivetran_synced as _fivetran_synced,\n action_type as action_type,\n ad_id as ad_id,\n date as date,\n index as index,\n value as value\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n lower(action_type) as action_type,\n cast(ad_id as bigint) as ad_id,\n _fivetran_id,\n date as date_day,\n index,\n cast(coalesce(value, 0) as float) as conversions\n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__demographics_country_actions": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_country_actions", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/stg_facebook_ads__demographics_country_actions.sql", "original_file_path": "models/staging/stg_facebook_ads__demographics_country_actions.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_country_actions", "fqn": ["facebook_ads", "staging", "stg_facebook_ads__demographics_country_actions"], "alias": "stg_facebook_ads__demographics_country_actions", "checksum": {"name": "sha256", "checksum": "a32a28a34b991e871c2d249caa10d0e74c0aabb88027eafdc59b1e0a924f1410"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record represents daily conversion performance by country. This is the prebuilt `demographics_country` report broken down by `action_type`.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "country_id": {"name": "country_id", "description": "Fivetran-generated unique ID of the country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.country_id"]}, "action_type": {"name": "action_type", "description": "The kind of actions taken on your ad, Page, app or event after your ad was served to someone, even if they didn't click on it. Action types include Page likes, app installs, conversions, event responses and more.\nActions prepended by `app_custom_event` come from mobile app events and actions prepended by `offsite_conversion` come from the Facebook Pixel.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.action_type"]}, "account_id": {"name": "account_id", "description": "The ID of the ad account that this ad belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.account_id"]}, "date_day": {"name": "date_day", "description": "The date of the reported performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.date"]}, "index": {"name": "index", "description": "Index reflecting the `action_type` tracked for this ad on this day. A primary key created by Fivetran utilized for tracking data, specifically when there are multiple rows associated with a single row in the parent table.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.index"]}, "conversions": {"name": "conversions", "description": "Conversion metric value using the default attribution window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.conversions"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/staging/stg_facebook_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.2606153, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_country_actions\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True) and var('facebook_ads__using_demographics_country', False)) }}\n\n\nwith base as (\n\n select * \n from {{ ref('stg_facebook_ads__demographics_country_actions_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_facebook_ads__demographics_country_actions_tmp')),\n staging_columns=get_demographics_country_actions_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='facebook_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_id as country_id,\n lower(action_type) as action_type,\n cast(account_id as {{ dbt.type_bigint() }}) as account_id,\n date as date_day,\n index,\n cast(coalesce(value, 0) as {{ dbt.type_float() }}) as conversions\n\n {{ facebook_ads_fill_pass_through_columns(var('facebook_ads__demographics_country_actions_passthrough_metrics')) }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": ["doc.facebook_ads.demographics_country_actions"], "language": "sql", "refs": [{"name": "stg_facebook_ads__demographics_country_actions_tmp", "package": null, "version": null}, {"name": "stg_facebook_ads__demographics_country_actions_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.get_demographics_country_actions_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_bigint", "macro.dbt.type_float", "macro.facebook_ads.facebook_ads_fill_pass_through_columns"], "nodes": ["model.facebook_ads.stg_facebook_ads__demographics_country_actions_tmp"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads__demographics_country_actions.sql", "compiled": true, "compiled_code": "\n\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_country_actions_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_id as _fivetran_id,\n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n action_type as action_type,\n date as date,\n index as index,\n value as value\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_id as country_id,\n lower(action_type) as action_type,\n cast(account_id as bigint) as account_id,\n date as date_day,\n index,\n cast(coalesce(value, 0) as float) as conversions\n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__demographics_country": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_country", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/stg_facebook_ads__demographics_country.sql", "original_file_path": "models/staging/stg_facebook_ads__demographics_country.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_country", "fqn": ["facebook_ads", "staging", "stg_facebook_ads__demographics_country"], "alias": "stg_facebook_ads__demographics_country", "checksum": {"name": "sha256", "checksum": "f1122fa466ae80aac897aa51a2cc4487a06f723dc3215e50d7ef106c505f4fbc"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Ads report segmented by country.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "country_id": {"name": "country_id", "description": "Fivetran-generated unique ID of the country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.country_id"]}, "country": {"name": "country", "description": "Country whose ad performance is being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.country"]}, "date_day": {"name": "date_day", "description": "The date of the reported performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.date"]}, "account_id": {"name": "account_id", "description": "The ID of the ad account that this ad belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.account_id"]}, "impressions": {"name": "impressions", "description": "The number of impressions the ads had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.impressions"]}, "clicks": {"name": "clicks", "description": "The number of clicks on links to select destinations or experiences, on or off Facebook-owned properties. Inline link clicks use a fixed 1-day-click attribution window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.inline_link_clicks"]}, "spend": {"name": "spend", "description": "Ad spend in a given day for the breakdown.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.spend"]}, "reach": {"name": "reach", "description": "The number of people who saw any content from your Page or about your Page. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.reach"]}, "frequency": {"name": "frequency", "description": "The average number of times each person saw your ads; it is calculated as impressions divided by reach.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.frequency"]}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/staging/stg_facebook_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.2597754, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_country\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True) and var('facebook_ads__using_demographics_country', False)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_facebook_ads__demographics_country_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_facebook_ads__demographics_country_tmp')),\n staging_columns=get_demographics_country_columns()\n )\n }}\n {{ fivetran_utils.apply_source_relation(package_name='facebook_ads') }}\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_id as country_id,\n country,\n date as date_day,\n cast(account_id as {{ dbt.type_bigint() }}) as account_id,\n impressions,\n coalesce(inline_link_clicks,0) as clicks,\n spend,\n reach,\n frequency\n\n {{ fivetran_utils.fill_pass_through_columns('facebook_ads__demographics_country_passthrough_metrics') }}\n\n from fields\n)\n\nselect *\nfrom final", "doc_blocks": ["doc.facebook_ads.demographics_country"], "language": "sql", "refs": [{"name": "stg_facebook_ads__demographics_country_tmp", "package": null, "version": null}, {"name": "stg_facebook_ads__demographics_country_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.get_demographics_country_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_bigint", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["model.facebook_ads.stg_facebook_ads__demographics_country_tmp"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads__demographics_country.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_country_tmp\"\n),\n\nfields as (\n\n select\n \n _fivetran_id as _fivetran_id,\n _fivetran_synced as _fivetran_synced,\n account_id as account_id,\n country as country,\n date as date,\n frequency as frequency,\n impressions as impressions,\n inline_link_clicks as inline_link_clicks,\n reach as reach,\n spend as spend\n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n from base\n),\n\nfinal as (\n \n select \n source_relation, \n _fivetran_id as country_id,\n country,\n date as date_day,\n cast(account_id as bigint) as account_id,\n impressions,\n coalesce(inline_link_clicks,0) as clicks,\n spend,\n reach,\n frequency\n\n \n\n\n\n\n\n from fields\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__ad_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__ad_history", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/stg_facebook_ads__ad_history.sql", "original_file_path": "models/staging/stg_facebook_ads__ad_history.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__ad_history", "fqn": ["facebook_ads", "staging", "stg_facebook_ads__ad_history"], "alias": "stg_facebook_ads__ad_history", "checksum": {"name": "sha256", "checksum": "7b4781c1c06ac20de9b76bf5f9660372f7aee2af096a1ffdde33ff25bdd523e2"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "table", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "Each record in this table reflects a Facebook ad.", "columns": {"source_relation": {"name": "source_relation", "description": "The source of the record if the unioning functionality is being used. If not this field will be empty.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.source_relation"]}, "ad_id": {"name": "ad_id", "description": "The ID of this ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the ad account that this ad belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_set_id": {"name": "ad_set_id", "description": "ID of the ad set that contains the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Ad campaign that contains this ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_id": {"name": "creative_id", "description": "The ID of the ad creative to be used by this ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_name": {"name": "ad_name", "description": "Name of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_most_recent_record": {"name": "is_most_recent_record", "description": "Boolean representing whether a record is the most recent version of that record. All records should have this value set to True given we filter on it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.is_most_recent_record"]}, "updated_at": {"name": "updated_at", "description": "The timestamp of the last update of a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.updated_time"]}, "conversion_domain": {"name": "conversion_domain", "description": "The domain you've configured the ad to convert to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "facebook_ads://models/staging/stg_facebook_ads.yml", "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "table", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708224.2516415, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith base as (\n\n select * \n from {{ ref('stg_facebook_ads__ad_history_tmp') }}\n),\n\nfields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(ref('stg_facebook_ads__ad_history_tmp')),\n staging_columns=get_ad_history_columns()\n )\n }}\n \n \n {{ fivetran_utils.apply_source_relation(package_name='facebook_ads') }}\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n updated_time as updated_at,\n cast(id as {{ dbt.type_bigint() }}) as ad_id,\n name as ad_name,\n cast(account_id as {{ dbt.type_bigint() }}) as account_id,\n cast(ad_set_id as {{ dbt.type_bigint() }}) as ad_set_id, \n cast(campaign_id as {{ dbt.type_bigint() }}) as campaign_id,\n cast(creative_id as {{ dbt.type_bigint() }}) as creative_id,\n conversion_domain,\n case when id is null and updated_time is null \n then row_number() over ({{ fivetran_utils.partition_by_source_relation(package_name='facebook_ads', has_other_partitions='no') }} order by source_relation)\n else row_number() over (partition by id {{ fivetran_utils.partition_by_source_relation(package_name='facebook_ads') }} order by updated_time desc) end = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__ad_history_tmp", "package": null, "version": null}, {"name": "stg_facebook_ads__ad_history_tmp", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.get_ad_history_columns", "macro.fivetran_utils.fill_staging_columns", "macro.fivetran_utils.apply_source_relation", "macro.dbt.type_bigint", "macro.fivetran_utils.partition_by_source_relation"], "nodes": ["model.facebook_ads.stg_facebook_ads__ad_history_tmp"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads__ad_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_history_tmp\"\n),\n\nfields as (\n\n select\n \n updated_time as updated_time,\n id as id,\n name as name,\n account_id as account_id,\n ad_set_id as ad_set_id,\n campaign_id as campaign_id,\n creative_id as creative_id,\n cast(null as TEXT) as conversion_domain\n \n \n \n\n\n\n\n \n \n\n\n\n\n\n, cast('postgres.public' as TEXT) as source_relation\n\n\n from base\n),\n\nfinal as (\n\n select\n source_relation, \n updated_time as updated_at,\n cast(id as bigint) as ad_id,\n name as ad_name,\n cast(account_id as bigint) as account_id,\n cast(ad_set_id as bigint) as ad_set_id, \n cast(campaign_id as bigint) as campaign_id,\n cast(creative_id as bigint) as creative_id,\n conversion_domain,\n case when id is null and updated_time is null \n then row_number() over ( order by source_relation)\n else row_number() over (partition by id order by updated_time desc) end = 1 as is_most_recent_record\n from fields\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__ad_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__ad_history_tmp", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/tmp/stg_facebook_ads__ad_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_facebook_ads__ad_history_tmp.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__ad_history_tmp", "fqn": ["facebook_ads", "staging", "tmp", "stg_facebook_ads__ad_history_tmp"], "alias": "stg_facebook_ads__ad_history_tmp", "checksum": {"name": "sha256", "checksum": "69640d599f14b45980f0aab445077ded703a9c0a89ae6f5d5274c1133c3078fc"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.422657, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\n{% if var('facebook_ads_union_schemas', []) | length > 0 or var('facebook_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_history', \n database_variable='facebook_ads_database', \n schema_variable='facebook_ads_schema', \n default_database=target.database,\n default_schema='facebook_ads',\n default_variable='ad_history',\n union_schema_variable='facebook_ads_union_schemas',\n union_database_variable='facebook_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='facebook_ads_sources',\n single_source_name='facebook_ads',\n single_table_name='ad_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["facebook_ads", "ad_history"], ["facebook_ads", "ad_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.facebook_ads.facebook_ads.ad_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/tmp/stg_facebook_ads__ad_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: facebook_ads_ad_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: facebook_ads_ad_history_data\n\n\n select\n \"id\",\n \"account_id\",\n \"ad_set_id\",\n \"campaign_id\",\n \"creative_id\",\n \"name\",\n \"_fivetran_synced\",\n \"updated_time\"\n from \"postgres\".\"public\".\"facebook_ads_ad_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__campaign_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__campaign_history_tmp", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/tmp/stg_facebook_ads__campaign_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_facebook_ads__campaign_history_tmp.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__campaign_history_tmp", "fqn": ["facebook_ads", "staging", "tmp", "stg_facebook_ads__campaign_history_tmp"], "alias": "stg_facebook_ads__campaign_history_tmp", "checksum": {"name": "sha256", "checksum": "93f4b670d7de16d0852812bbdc76f92951a444bb846e9600f969030f47d3d227"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.4336727, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__campaign_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\n{% if var('facebook_ads_union_schemas', []) | length > 0 or var('facebook_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='campaign_history', \n database_variable='facebook_ads_database', \n schema_variable='facebook_ads_schema', \n default_database=target.database,\n default_schema='facebook_ads',\n default_variable='campaign_history',\n union_schema_variable='facebook_ads_union_schemas',\n union_database_variable='facebook_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='facebook_ads_sources',\n single_source_name='facebook_ads',\n single_table_name='campaign_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["facebook_ads", "campaign_history"], ["facebook_ads", "campaign_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.facebook_ads.facebook_ads.campaign_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/tmp/stg_facebook_ads__campaign_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: facebook_ads_campaign_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: facebook_ads_campaign_history_data\n\n\n select\n \"id\",\n \"account_id\",\n \"name\",\n \"_fivetran_synced\",\n \"updated_time\"\n from \"postgres\".\"public\".\"facebook_ads_campaign_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__demographics_country_actions_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_country_actions_tmp", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/tmp/stg_facebook_ads__demographics_country_actions_tmp.sql", "original_file_path": "models/staging/tmp/stg_facebook_ads__demographics_country_actions_tmp.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_country_actions_tmp", "fqn": ["facebook_ads", "staging", "tmp", "stg_facebook_ads__demographics_country_actions_tmp"], "alias": "stg_facebook_ads__demographics_country_actions_tmp", "checksum": {"name": "sha256", "checksum": "8dfb0b1ce0fe86bfbbb485dc152bf9b0449e5c9a24eec0a75db043f0bf0373e3"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.4442024, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_country_actions_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True) and var('facebook_ads__using_demographics_country', False)) }}\n\n{% if var('facebook_ads_union_schemas', []) | length > 0 or var('facebook_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='demographics_country_actions', \n database_variable='facebook_ads_database', \n schema_variable='facebook_ads_schema', \n default_database=target.database,\n default_schema='facebook_ads',\n default_variable='demographics_country_actions',\n union_schema_variable='facebook_ads_union_schemas',\n union_database_variable='facebook_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='facebook_ads_sources',\n single_source_name='facebook_ads',\n single_table_name='demographics_country_actions'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["facebook_ads", "demographics_country_actions"], ["facebook_ads", "demographics_country_actions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.facebook_ads.facebook_ads.demographics_country_actions"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/tmp/stg_facebook_ads__demographics_country_actions_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: facebook_ads_demographics_country_actions_identifier\n -- database: postgres \n -- schema: public\n -- identifier: facebook_ads_demographics_country_actions_data\n\n\n select\n \"_fivetran_id\",\n \"_fivetran_synced\",\n \"account_id\",\n \"action_type\",\n \"date\",\n \"index\",\n \"inline\",\n \"value\"\n from \"postgres\".\"public\".\"facebook_ads_demographics_country_actions_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__demographics_region_actions_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_region_actions_tmp", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/tmp/stg_facebook_ads__demographics_region_actions_tmp.sql", "original_file_path": "models/staging/tmp/stg_facebook_ads__demographics_region_actions_tmp.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_region_actions_tmp", "fqn": ["facebook_ads", "staging", "tmp", "stg_facebook_ads__demographics_region_actions_tmp"], "alias": "stg_facebook_ads__demographics_region_actions_tmp", "checksum": {"name": "sha256", "checksum": "994c905bf51c38640efe529fcc79faf062914943fe300f86191831d1757ae62e"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.4550889, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_region_actions_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True) and var('facebook_ads__using_demographics_region', False)) }}\n\n{% if var('facebook_ads_union_schemas', []) | length > 0 or var('facebook_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='demographics_region_actions', \n database_variable='facebook_ads_database', \n schema_variable='facebook_ads_schema', \n default_database=target.database,\n default_schema='facebook_ads',\n default_variable='demographics_region_actions',\n union_schema_variable='facebook_ads_union_schemas',\n union_database_variable='facebook_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='facebook_ads_sources',\n single_source_name='facebook_ads',\n single_table_name='demographics_region_actions'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["facebook_ads", "demographics_region_actions"], ["facebook_ads", "demographics_region_actions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.facebook_ads.facebook_ads.demographics_region_actions"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/tmp/stg_facebook_ads__demographics_region_actions_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: facebook_ads_demographics_region_actions_identifier\n -- database: postgres \n -- schema: public\n -- identifier: facebook_ads_demographics_region_actions_data\n\n\n select\n \"_fivetran_id\",\n \"_fivetran_synced\",\n \"account_id\",\n \"action_type\",\n \"date\",\n \"index\",\n \"value\"\n from \"postgres\".\"public\".\"facebook_ads_demographics_region_actions_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__basic_ad_actions_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__basic_ad_actions_tmp", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/tmp/stg_facebook_ads__basic_ad_actions_tmp.sql", "original_file_path": "models/staging/tmp/stg_facebook_ads__basic_ad_actions_tmp.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__basic_ad_actions_tmp", "fqn": ["facebook_ads", "staging", "tmp", "stg_facebook_ads__basic_ad_actions_tmp"], "alias": "stg_facebook_ads__basic_ad_actions_tmp", "checksum": {"name": "sha256", "checksum": "514f7a0a69d9cae69d9fa81d64c6105bd9b9c4b3775e595ba1a53fcf489b4866"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.4670987, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad_actions_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\n{% if var('facebook_ads_union_schemas', []) | length > 0 or var('facebook_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='basic_ad_actions', \n database_variable='facebook_ads_database', \n schema_variable='facebook_ads_schema', \n default_database=target.database,\n default_schema='facebook_ads',\n default_variable='basic_ad_actions',\n union_schema_variable='facebook_ads_union_schemas',\n union_database_variable='facebook_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='facebook_ads_sources',\n single_source_name='facebook_ads',\n single_table_name='basic_ad_actions'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["facebook_ads", "basic_ad_actions"], ["facebook_ads", "basic_ad_actions"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.facebook_ads.facebook_ads.basic_ad_actions"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/tmp/stg_facebook_ads__basic_ad_actions_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: facebook_ads_basic_ad_actions_identifier\n -- database: postgres \n -- schema: public\n -- identifier: facebook_ads_basic_ad_actions_data\n\n\n select\n \"_fivetran_id\",\n \"ad_id\",\n \"date\",\n \"index\",\n \"_1_d_view\",\n \"_7_d_click\",\n \"_fivetran_synced\",\n \"action_type\",\n \"inline\",\n \"value\"\n from \"postgres\".\"public\".\"facebook_ads_basic_ad_actions_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__basic_ad_action_values_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__basic_ad_action_values_tmp", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/tmp/stg_facebook_ads__basic_ad_action_values_tmp.sql", "original_file_path": "models/staging/tmp/stg_facebook_ads__basic_ad_action_values_tmp.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__basic_ad_action_values_tmp", "fqn": ["facebook_ads", "staging", "tmp", "stg_facebook_ads__basic_ad_action_values_tmp"], "alias": "stg_facebook_ads__basic_ad_action_values_tmp", "checksum": {"name": "sha256", "checksum": "1dff437225c41f2eddacd2cb6f83c2ea12e2884f343977919260333d2db745f8"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.4776459, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad_action_values_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\n{% if var('facebook_ads_union_schemas', []) | length > 0 or var('facebook_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='basic_ad_action_values', \n database_variable='facebook_ads_database', \n schema_variable='facebook_ads_schema', \n default_database=target.database,\n default_schema='facebook_ads',\n default_variable='basic_ad_action_values',\n union_schema_variable='facebook_ads_union_schemas',\n union_database_variable='facebook_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='facebook_ads_sources',\n single_source_name='facebook_ads',\n single_table_name='basic_ad_action_values'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["facebook_ads", "basic_ad_action_values"], ["facebook_ads", "basic_ad_action_values"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.facebook_ads.facebook_ads.basic_ad_action_values"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/tmp/stg_facebook_ads__basic_ad_action_values_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: facebook_ads_basic_ad_action_values_identifier\n -- database: postgres \n -- schema: public\n -- identifier: facebook_ads_basic_ad_action_values_data\n\n\n select\n \"ad_id\",\n \"date\",\n \"_fivetran_id\",\n \"index\",\n \"action_type\",\n \"value\",\n \"_fivetran_synced\",\n \"_7_d_click\"\n from \"postgres\".\"public\".\"facebook_ads_basic_ad_action_values_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__ad_set_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__ad_set_history_tmp", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/tmp/stg_facebook_ads__ad_set_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_facebook_ads__ad_set_history_tmp.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__ad_set_history_tmp", "fqn": ["facebook_ads", "staging", "tmp", "stg_facebook_ads__ad_set_history_tmp"], "alias": "stg_facebook_ads__ad_set_history_tmp", "checksum": {"name": "sha256", "checksum": "4ed7d93ef5f59c0db18901ddd8d77efa81fc4e8a4b1583cec148247b882a5dbe"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.488105, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_set_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\n{% if var('facebook_ads_union_schemas', []) | length > 0 or var('facebook_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='ad_set_history', \n database_variable='facebook_ads_database', \n schema_variable='facebook_ads_schema', \n default_database=target.database,\n default_schema='facebook_ads',\n default_variable='ad_set_history',\n union_schema_variable='facebook_ads_union_schemas',\n union_database_variable='facebook_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='facebook_ads_sources',\n single_source_name='facebook_ads',\n single_table_name='ad_set_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["facebook_ads", "ad_set_history"], ["facebook_ads", "ad_set_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.facebook_ads.facebook_ads.ad_set_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/tmp/stg_facebook_ads__ad_set_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: facebook_ads_ad_set_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: facebook_ads_ad_set_history_data\n\n\n select\n \"id\",\n \"account_id\",\n \"campaign_id\",\n \"name\",\n \"_fivetran_synced\",\n \"updated_time\"\n from \"postgres\".\"public\".\"facebook_ads_ad_set_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__demographics_region_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_region_tmp", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/tmp/stg_facebook_ads__demographics_region_tmp.sql", "original_file_path": "models/staging/tmp/stg_facebook_ads__demographics_region_tmp.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_region_tmp", "fqn": ["facebook_ads", "staging", "tmp", "stg_facebook_ads__demographics_region_tmp"], "alias": "stg_facebook_ads__demographics_region_tmp", "checksum": {"name": "sha256", "checksum": "4735bf5587e892abc9a7e1fabed2fd018811c4cbd5e20ee808e1892177ef0d2f"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.4997478, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_region_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True) and var('facebook_ads__using_demographics_region', False)) }}\n\n{% if var('facebook_ads_union_schemas', []) | length > 0 or var('facebook_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='demographics_region', \n database_variable='facebook_ads_database', \n schema_variable='facebook_ads_schema', \n default_database=target.database,\n default_schema='facebook_ads',\n default_variable='demographics_region',\n union_schema_variable='facebook_ads_union_schemas',\n union_database_variable='facebook_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='facebook_ads_sources',\n single_source_name='facebook_ads',\n single_table_name='demographics_region'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["facebook_ads", "demographics_region"], ["facebook_ads", "demographics_region"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.facebook_ads.facebook_ads.demographics_region"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/tmp/stg_facebook_ads__demographics_region_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: facebook_ads_demographics_region_identifier\n -- database: postgres \n -- schema: public\n -- identifier: facebook_ads_demographics_region_data\n\n\n select\n \"_fivetran_id\",\n \"_fivetran_synced\",\n \"account_id\",\n \"date\",\n \"frequency\",\n \"impressions\",\n \"inline_link_clicks\",\n \"reach\",\n \"region\",\n \"spend\"\n from \"postgres\".\"public\".\"facebook_ads_demographics_region_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__creative_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__creative_history_tmp", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/tmp/stg_facebook_ads__creative_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_facebook_ads__creative_history_tmp.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__creative_history_tmp", "fqn": ["facebook_ads", "staging", "tmp", "stg_facebook_ads__creative_history_tmp"], "alias": "stg_facebook_ads__creative_history_tmp", "checksum": {"name": "sha256", "checksum": "50f98f7303f7c5381a2bfae92d4b8dbf2eec68b77a6b4b2a1db0fa31bf21d20d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.5104759, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__creative_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\n{% if var('facebook_ads_union_schemas', []) | length > 0 or var('facebook_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='creative_history', \n database_variable='facebook_ads_database', \n schema_variable='facebook_ads_schema', \n default_database=target.database,\n default_schema='facebook_ads',\n default_variable='creative_history',\n union_schema_variable='facebook_ads_union_schemas',\n union_database_variable='facebook_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='facebook_ads_sources',\n single_source_name='facebook_ads',\n single_table_name='creative_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["facebook_ads", "creative_history"], ["facebook_ads", "creative_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.facebook_ads.facebook_ads.creative_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/tmp/stg_facebook_ads__creative_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: facebook_ads_creative_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: facebook_ads_creative_history_data\n\n\n select\n \"page_link\",\n \"template_page_link\",\n \"id\",\n \"account_id\",\n \"name\",\n \"url_tags\",\n \"_fivetran_synced\",\n \"asset_feed_spec_link_urls\",\n \"object_story_link_data_child_attachments\",\n \"object_story_link_data_caption\",\n \"object_story_link_data_description\",\n \"object_story_link_data_link\",\n \"object_story_link_data_message\",\n \"template_app_link_spec_ios\",\n \"_fivetran_id\"\n from \"postgres\".\"public\".\"facebook_ads_creative_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__basic_ad_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__basic_ad_tmp", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/tmp/stg_facebook_ads__basic_ad_tmp.sql", "original_file_path": "models/staging/tmp/stg_facebook_ads__basic_ad_tmp.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__basic_ad_tmp", "fqn": ["facebook_ads", "staging", "tmp", "stg_facebook_ads__basic_ad_tmp"], "alias": "stg_facebook_ads__basic_ad_tmp", "checksum": {"name": "sha256", "checksum": "94115712a5fc6cee54d504d75bb69b64fb1282cafa80759e6677361bae908644"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.521137, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\n{% if var('facebook_ads_union_schemas', []) | length > 0 or var('facebook_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='basic_ad', \n database_variable='facebook_ads_database', \n schema_variable='facebook_ads_schema', \n default_database=target.database,\n default_schema='facebook_ads',\n default_variable='basic_ad',\n union_schema_variable='facebook_ads_union_schemas',\n union_database_variable='facebook_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='facebook_ads_sources',\n single_source_name='facebook_ads',\n single_table_name='basic_ad'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["facebook_ads", "basic_ad"], ["facebook_ads", "basic_ad"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.facebook_ads.facebook_ads.basic_ad"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/tmp/stg_facebook_ads__basic_ad_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: facebook_ads_basic_ad_identifier\n -- database: postgres \n -- schema: public\n -- identifier: facebook_ads_basic_ad_data\n\n\n select\n \"ad_id\",\n \"date\",\n \"account_id\",\n \"impressions\",\n \"inline_link_clicks\",\n \"spend\"\n from \"postgres\".\"public\".\"facebook_ads_basic_ad_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__account_history_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__account_history_tmp", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/tmp/stg_facebook_ads__account_history_tmp.sql", "original_file_path": "models/staging/tmp/stg_facebook_ads__account_history_tmp.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__account_history_tmp", "fqn": ["facebook_ads", "staging", "tmp", "stg_facebook_ads__account_history_tmp"], "alias": "stg_facebook_ads__account_history_tmp", "checksum": {"name": "sha256", "checksum": "da6da5831a90053d0a41979c7ccf895e84dddd31a98990e43f01667f205219ee"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.5315804, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__account_history_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\n{% if var('facebook_ads_union_schemas', []) | length > 0 or var('facebook_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='account_history', \n database_variable='facebook_ads_database', \n schema_variable='facebook_ads_schema', \n default_database=target.database,\n default_schema='facebook_ads',\n default_variable='account_history',\n union_schema_variable='facebook_ads_union_schemas',\n union_database_variable='facebook_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='facebook_ads_sources',\n single_source_name='facebook_ads',\n single_table_name='account_history'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["facebook_ads", "account_history"], ["facebook_ads", "account_history"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.facebook_ads.facebook_ads.account_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/tmp/stg_facebook_ads__account_history_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: facebook_ads_account_history_identifier\n -- database: postgres \n -- schema: public\n -- identifier: facebook_ads_account_history_data\n\n\n select\n \"id\",\n \"name\",\n \"_fivetran_synced\"\n from \"postgres\".\"public\".\"facebook_ads_account_history_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.stg_facebook_ads__demographics_country_tmp": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "stg_facebook_ads__demographics_country_tmp", "resource_type": "model", "package_name": "facebook_ads", "path": "staging/tmp/stg_facebook_ads__demographics_country_tmp.sql", "original_file_path": "models/staging/tmp/stg_facebook_ads__demographics_country_tmp.sql", "unique_id": "model.facebook_ads.stg_facebook_ads__demographics_country_tmp", "fqn": ["facebook_ads", "staging", "tmp", "stg_facebook_ads__demographics_country_tmp"], "alias": "stg_facebook_ads__demographics_country_tmp", "checksum": {"name": "sha256", "checksum": "d3ae294701936a8efcc7d31324439af136dc33fca0f4e87cf27301f13f863587"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.5433245, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__demographics_country_tmp\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True) and var('facebook_ads__using_demographics_country', False)) }}\n\n{% if var('facebook_ads_union_schemas', []) | length > 0 or var('facebook_ads_union_databases', []) | length > 0 %}\n\n{{\n fivetran_utils.union_data(\n table_identifier='demographics_country', \n database_variable='facebook_ads_database', \n schema_variable='facebook_ads_schema', \n default_database=target.database,\n default_schema='facebook_ads',\n default_variable='demographics_country',\n union_schema_variable='facebook_ads_union_schemas',\n union_database_variable='facebook_ads_union_databases'\n )\n}}\n\n{% else %}\n\n{{\n fivetran_utils.union_connections(\n connection_dictionary='facebook_ads_sources',\n single_source_name='facebook_ads',\n single_table_name='demographics_country'\n )\n}}\n\n{% endif %}", "doc_blocks": [], "language": "sql", "refs": [], "sources": [["facebook_ads", "demographics_country"], ["facebook_ads", "demographics_country"]], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.fivetran_utils.union_connections"], "nodes": ["source.facebook_ads.facebook_ads.demographics_country"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/tmp/stg_facebook_ads__demographics_country_tmp.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\n\n-- ** Values passed to adapter.get_relation:\n -- full-identifier_var: facebook_ads_demographics_country_identifier\n -- database: postgres \n -- schema: public\n -- identifier: facebook_ads_demographics_country_data\n\n\n select\n \"_fivetran_id\",\n \"_fivetran_synced\",\n \"account_id\",\n \"country\",\n \"date\",\n \"frequency\",\n \"impressions\",\n \"inline_link_clicks\",\n \"reach\",\n \"spend\"\n from \"postgres\".\"public\".\"facebook_ads_demographics_country_data\" as source_table\n\n \n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.int_facebook_ads__creative_history": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "int_facebook_ads__creative_history", "resource_type": "model", "package_name": "facebook_ads", "path": "intermediate/int_facebook_ads__creative_history.sql", "original_file_path": "models/intermediate/int_facebook_ads__creative_history.sql", "unique_id": "model.facebook_ads.int_facebook_ads__creative_history", "fqn": ["facebook_ads", "intermediate", "int_facebook_ads__creative_history"], "alias": "int_facebook_ads__creative_history", "checksum": {"name": "sha256", "checksum": "15eac1da0274e1755906e0ea1571247593eaa71e9d42bb376695fe152d30e38d"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.5542064, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"int_facebook_ads__creative_history\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\n{% set url_field = \"coalesce(page_link,template_page_link)\" %}\n\nwith base as (\n\n select *\n from {{ ref('stg_facebook_ads__creative_history') }}\n where is_most_recent_record = true\n\n), \n\nurl_tags as (\n\n select *\n from {{ ref('facebook_ads__url_tags') }}\n), \n\nurl_tags_pivoted as (\n\n select \n source_relation,\n _fivetran_id,\n creative_id,\n min(case when key = 'utm_source' then value end) as utm_source,\n min(case when key = 'utm_medium' then value end) as utm_medium,\n min(case when key = 'utm_campaign' then value end) as utm_campaign,\n min(case when key = 'utm_content' then value end) as utm_content,\n min(case when key = 'utm_term' then value end) as utm_term\n from url_tags\n group by 1,2,3\n\n), \n\nfields as (\n\n select\n base.source_relation,\n base._fivetran_id,\n base.creative_id,\n base.account_id,\n base.creative_name,\n {{ url_field }} as url,\n {{ dbt.split_part(url_field, \"'?'\", 1) }} as base_url,\n {{ dbt_utils.get_url_host(url_field) }} as url_host,\n '/' || {{ dbt_utils.get_url_path(url_field) }} as url_path,\n coalesce(url_tags_pivoted.utm_source, {{ facebook_ads.facebook_ads_extract_url_parameter(url_field, 'utm_source') }}) as utm_source,\n coalesce(url_tags_pivoted.utm_medium, {{ facebook_ads.facebook_ads_extract_url_parameter(url_field, 'utm_medium') }}) as utm_medium,\n coalesce(url_tags_pivoted.utm_campaign, {{ facebook_ads.facebook_ads_extract_url_parameter(url_field, 'utm_campaign') }}) as utm_campaign,\n coalesce(url_tags_pivoted.utm_content, {{ facebook_ads.facebook_ads_extract_url_parameter(url_field, 'utm_content') }}) as utm_content,\n coalesce(url_tags_pivoted.utm_term, {{ facebook_ads.facebook_ads_extract_url_parameter(url_field, 'utm_term') }}) as utm_term\n from base\n left join url_tags_pivoted\n on base._fivetran_id = url_tags_pivoted._fivetran_id\n and base.source_relation = url_tags_pivoted.source_relation\n and base.creative_id = url_tags_pivoted.creative_id\n)\n\nselect *\nfrom fields", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__creative_history", "package": null, "version": null}, {"name": "facebook_ads__url_tags", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.split_part", "macro.dbt_utils.get_url_host", "macro.dbt_utils.get_url_path", "macro.facebook_ads.facebook_ads_extract_url_parameter"], "nodes": ["model.facebook_ads.stg_facebook_ads__creative_history", "model.facebook_ads.facebook_ads__url_tags"]}, "compiled_path": "target/compiled/facebook_ads/models/intermediate/int_facebook_ads__creative_history.sql", "compiled": true, "compiled_code": "\n\n\n\nwith base as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__creative_history\"\n where is_most_recent_record = true\n\n), \n\nurl_tags as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__url_tags\"\n), \n\nurl_tags_pivoted as (\n\n select \n source_relation,\n _fivetran_id,\n creative_id,\n min(case when key = 'utm_source' then value end) as utm_source,\n min(case when key = 'utm_medium' then value end) as utm_medium,\n min(case when key = 'utm_campaign' then value end) as utm_campaign,\n min(case when key = 'utm_content' then value end) as utm_content,\n min(case when key = 'utm_term' then value end) as utm_term\n from url_tags\n group by 1,2,3\n\n), \n\nfields as (\n\n select\n base.source_relation,\n base._fivetran_id,\n base.creative_id,\n base.account_id,\n base.creative_name,\n coalesce(page_link,template_page_link) as url,\n \n\n \n \n\n split_part(\n coalesce(page_link,template_page_link),\n '?',\n 1\n )\n\n\n \n\n as base_url,\n \n \n cast(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n \n\n replace(\n \n\n replace(\n \n\n replace(\n coalesce(page_link,template_page_link),\n 'android-app://',\n ''\n )\n\n\n,\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n '/',\n 1\n )\n\n\n \n\n,\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_host,\n '/' || \n \n cast(\n\n \n \n\n split_part(\n \n\n right(\n \n\n replace(\n \n\n replace(\n coalesce(page_link,template_page_link),\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n,\n \n\n length(\n \n\n replace(\n \n\n replace(\n coalesce(page_link,template_page_link),\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n )-coalesce(\n nullif(\n\n position(\n '/' in \n\n replace(\n \n\n replace(\n coalesce(page_link,template_page_link),\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ), 0),\n \n\n position(\n '?' in \n\n replace(\n \n\n replace(\n coalesce(page_link,template_page_link),\n 'http://',\n ''\n )\n\n\n,\n 'https://',\n ''\n )\n\n\n\n ) - 1\n )\n ),\n '?',\n 1\n )\n\n\n \n\n as TEXT)\n as url_path,\n coalesce(url_tags_pivoted.utm_source, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n coalesce(page_link,template_page_link),\n 'utm_source=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_source,\n coalesce(url_tags_pivoted.utm_medium, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n coalesce(page_link,template_page_link),\n 'utm_medium=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_medium,\n coalesce(url_tags_pivoted.utm_campaign, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n coalesce(page_link,template_page_link),\n 'utm_campaign=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_campaign,\n coalesce(url_tags_pivoted.utm_content, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n coalesce(page_link,template_page_link),\n 'utm_content=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_content,\n coalesce(url_tags_pivoted.utm_term, nullif(\n\n \n \n\n split_part(\n \n\n \n \n\n split_part(\n coalesce(page_link,template_page_link),\n 'utm_term=',\n 2\n )\n\n\n \n\n,\n '&',\n 1\n )\n\n\n \n\n,'')) as utm_term\n from base\n left join url_tags_pivoted\n on base._fivetran_id = url_tags_pivoted._fivetran_id\n and base.source_relation = url_tags_pivoted.source_relation\n and base.creative_id = url_tags_pivoted.creative_id\n)\n\nselect *\nfrom fields", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "model.facebook_ads.int_facebook_ads__conversions": {"database": "postgres", "schema": "public_ad_reporting_dev", "name": "int_facebook_ads__conversions", "resource_type": "model", "package_name": "facebook_ads", "path": "intermediate/int_facebook_ads__conversions.sql", "original_file_path": "models/intermediate/int_facebook_ads__conversions.sql", "unique_id": "model.facebook_ads.int_facebook_ads__conversions", "fqn": ["facebook_ads", "intermediate", "int_facebook_ads__conversions"], "alias": "int_facebook_ads__conversions", "checksum": {"name": "sha256", "checksum": "3b28dc1b86305818d7e44672dc80b693b1269a333c0c022b78ceedda739771cc"}, "config": {"enabled": true, "alias": null, "schema": "ad_reporting_dev", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "view", "incremental_strategy": null, "batch_size": null, "lookback": 1, "begin": null, "persist_docs": {"relation": true, "columns": true}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "event_time": null, "concurrent_batches": null, "access": "protected", "freshness": null}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"schema": "ad_reporting_{{ var('directed_schema','dev') }}", "materialized": "view", "enabled": true, "persist_docs": {"relation": true, "columns": "{{ false if target.type in ('databricks') else true }}"}}, "created_at": 1783708221.5775745, "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"int_facebook_ads__conversions\"", "raw_code": "{{ config(enabled=var('ad_reporting__facebook_ads_enabled', True)) }}\n\nwith actions_report as (\n\n select *\n from {{ ref('stg_facebook_ads__basic_ad_actions') }}\n),\n\naction_values_report as (\n\n select *\n from {{ ref('stg_facebook_ads__basic_ad_action_values') }}\n),\n\naction_metrics as (\n\n select\n source_relation,\n ad_id,\n date_day,\n sum(conversions) as conversions\n\n {% for action_type in var('facebook_ads__conversion_action_types') %}\n ,sum(case when \n {% if action_type.name %}\n action_type = '{{ action_type.name }}'\n {% elif action_type.pattern %}\n action_type like '{{ action_type.pattern }}'\n {% endif %}\n\n {% if action_type.where_sql %}\n and {{ action_type.where_sql }}\n {% endif %}\n then conversions else 0 end) \n as {{ facebook_action_slug(action_type) }}_conversions\n {% endfor %}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_actions_passthrough_metrics', transform='sum') }}\n\n from actions_report\n {% if var('facebook_ads__conversion_action_types') -%}\n where \n {# Limit conversions to the chosen action types #}\n {% for action_type in var('facebook_ads__conversion_action_types') -%}\n (\n {%- if action_type.name -%}\n action_type = '{{ action_type.name }}'\n {%- elif action_type.pattern -%}\n action_type like '{{ action_type.pattern }}'\n {%- endif -%}\n\n {% if action_type.where_sql %}\n and {{ action_type.where_sql }}\n {%- endif -%}\n ) {% if not loop.last %} or {% endif %}\n {%- endfor %}\n {% endif %}\n group by 1,2,3\n),\n\naction_value_metrics as (\n\n select\n source_relation,\n ad_id,\n date_day,\n sum(conversions_value) as conversions_value\n\n {% for action_type in var('facebook_ads__conversion_action_types') %}\n ,sum(case when \n {% if action_type.name %}\n action_type = '{{ action_type.name }}'\n {% elif action_type.pattern %}\n action_type like '{{ action_type.pattern }}'\n {% endif %}\n\n {% if action_type.where_sql %}\n and {{ action_type.where_sql }}\n {% endif %}\n then conversions_value else 0 end) \n as {{ facebook_action_slug(action_type) }}_conversions_value\n {% endfor %}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_action_values_passthrough_metrics', transform='sum') }}\n\n from action_values_report\n {% if var('facebook_ads__conversion_action_types') -%}\n where \n {# Limit conversions to the chosen action types #}\n {% for action_type in var('facebook_ads__conversion_action_types') -%}\n (\n {%- if action_type.name -%}\n action_type = '{{ action_type.name }}'\n {%- elif action_type.pattern -%}\n action_type like '{{ action_type.pattern }}'\n {%- endif -%}\n\n {% if action_type.where_sql %}\n and {{ action_type.where_sql }}\n {%- endif -%}\n ) {% if not loop.last %} or {% endif %}\n {%- endfor %}\n {% endif %}\n\n group by 1,2,3\n),\n\nmetrics_join as (\n\n select\n action_metrics.source_relation,\n action_metrics.ad_id,\n action_metrics.date_day,\n action_metrics.conversions,\n action_value_metrics.conversions_value\n \n {% for action_type in var('facebook_ads__conversion_action_types') %}\n ,{{ facebook_action_slug(action_type) }}_conversions\n ,{{ facebook_action_slug(action_type) }}_conversions_value\n {% endfor %}\n\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_actions_passthrough_metrics', identifier='action_metrics') }}\n {{ fivetran_utils.persist_pass_through_columns(pass_through_variable='facebook_ads__basic_ad_action_values_passthrough_metrics', identifier='action_value_metrics') }}\n\n from action_metrics \n left join action_value_metrics\n on action_metrics.source_relation = action_value_metrics.source_relation\n and action_metrics.ad_id = action_value_metrics.ad_id\n and action_metrics.date_day = action_value_metrics.date_day\n)\n\nselect * \nfrom metrics_join", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__basic_ad_actions", "package": null, "version": null}, {"name": "stg_facebook_ads__basic_ad_action_values", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.facebook_ads.facebook_action_slug", "macro.fivetran_utils.persist_pass_through_columns"], "nodes": ["model.facebook_ads.stg_facebook_ads__basic_ad_actions", "model.facebook_ads.stg_facebook_ads__basic_ad_action_values"]}, "compiled_path": "target/compiled/facebook_ads/models/intermediate/int_facebook_ads__conversions.sql", "compiled": true, "compiled_code": "\n\nwith actions_report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad_actions\"\n),\n\naction_values_report as (\n\n select *\n from \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad_action_values\"\n),\n\naction_metrics as (\n\n select\n source_relation,\n ad_id,\n date_day,\n sum(conversions) as conversions\n\n \n ,sum(case when \n \n action_type = 'onsite_conversion.purchase'\n \n\n \n then conversions else 0 end) \n as onsite_conversion_purchase_conversions\n \n ,sum(case when \n \n action_type = 'onsite_conversion.lead_grouped'\n \n\n \n then conversions else 0 end) \n as onsite_conversion_lead_grouped_conversions\n \n ,sum(case when \n \n action_type = 'offsite_conversion.fb_pixel_purchase'\n \n\n \n then conversions else 0 end) \n as offsite_conversion_fb_pixel_purchase_conversions\n \n ,sum(case when \n \n action_type = 'offsite_conversion.fb_pixel_lead'\n \n\n \n then conversions else 0 end) \n as offsite_conversion_fb_pixel_lead_conversions\n \n ,sum(case when \n \n action_type = 'offsite_conversion.fb_pixel_custom'\n \n\n \n then conversions else 0 end) \n as offsite_conversion_fb_pixel_custom_conversions\n \n\n \n\n\n\n\n\n from actions_report\n where \n \n (action_type = 'onsite_conversion.purchase') or (action_type = 'onsite_conversion.lead_grouped') or (action_type = 'offsite_conversion.fb_pixel_purchase') or (action_type = 'offsite_conversion.fb_pixel_lead') or (action_type = 'offsite_conversion.fb_pixel_custom') \n \n group by 1,2,3\n),\n\naction_value_metrics as (\n\n select\n source_relation,\n ad_id,\n date_day,\n sum(conversions_value) as conversions_value\n\n \n ,sum(case when \n \n action_type = 'onsite_conversion.purchase'\n \n\n \n then conversions_value else 0 end) \n as onsite_conversion_purchase_conversions_value\n \n ,sum(case when \n \n action_type = 'onsite_conversion.lead_grouped'\n \n\n \n then conversions_value else 0 end) \n as onsite_conversion_lead_grouped_conversions_value\n \n ,sum(case when \n \n action_type = 'offsite_conversion.fb_pixel_purchase'\n \n\n \n then conversions_value else 0 end) \n as offsite_conversion_fb_pixel_purchase_conversions_value\n \n ,sum(case when \n \n action_type = 'offsite_conversion.fb_pixel_lead'\n \n\n \n then conversions_value else 0 end) \n as offsite_conversion_fb_pixel_lead_conversions_value\n \n ,sum(case when \n \n action_type = 'offsite_conversion.fb_pixel_custom'\n \n\n \n then conversions_value else 0 end) \n as offsite_conversion_fb_pixel_custom_conversions_value\n \n\n \n\n\n\n\n\n from action_values_report\n where \n \n (action_type = 'onsite_conversion.purchase') or (action_type = 'onsite_conversion.lead_grouped') or (action_type = 'offsite_conversion.fb_pixel_purchase') or (action_type = 'offsite_conversion.fb_pixel_lead') or (action_type = 'offsite_conversion.fb_pixel_custom') \n \n\n group by 1,2,3\n),\n\nmetrics_join as (\n\n select\n action_metrics.source_relation,\n action_metrics.ad_id,\n action_metrics.date_day,\n action_metrics.conversions,\n action_value_metrics.conversions_value\n \n \n ,onsite_conversion_purchase_conversions\n ,onsite_conversion_purchase_conversions_value\n \n ,onsite_conversion_lead_grouped_conversions\n ,onsite_conversion_lead_grouped_conversions_value\n \n ,offsite_conversion_fb_pixel_purchase_conversions\n ,offsite_conversion_fb_pixel_purchase_conversions_value\n \n ,offsite_conversion_fb_pixel_lead_conversions\n ,offsite_conversion_fb_pixel_lead_conversions_value\n \n ,offsite_conversion_fb_pixel_custom_conversions\n ,offsite_conversion_fb_pixel_custom_conversions_value\n \n\n \n\n\n\n\n \n\n\n\n\n\n from action_metrics \n left join action_value_metrics\n on action_metrics.source_relation = action_value_metrics.source_relation\n and action_metrics.ad_id = action_value_metrics.ad_id\n and action_metrics.date_day = action_value_metrics.date_day\n)\n\nselect * \nfrom metrics_join", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null, "primary_key": [], "time_spine": null}, "test.linkedin.not_null_linkedin_ads__account_report_account_id.0c34ea1842": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__account_report_account_id", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__account_report_account_id.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__account_report_account_id.0c34ea1842", "fqn": ["linkedin", "not_null_linkedin_ads__account_report_account_id"], "alias": "not_null_linkedin_ads__account_report_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708221.8003576, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__account_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__account_report_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__account_report\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.linkedin_ads__account_report", "attached_node": "model.linkedin.linkedin_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('linkedin_ads__account_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_linkedin_ads__account_report_date_day.c4b33f8f53": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__account_report_date_day", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__account_report_date_day.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__account_report_date_day.c4b33f8f53", "fqn": ["linkedin", "not_null_linkedin_ads__account_report_date_day"], "alias": "not_null_linkedin_ads__account_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708221.8031204, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__account_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__account_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__account_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.linkedin_ads__account_report", "attached_node": "model.linkedin.linkedin_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('linkedin_ads__account_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_linkedin_ads__campaign_report_date_day.8d320b88b1": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__campaign_report_date_day", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__campaign_report_date_day.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__campaign_report_date_day.8d320b88b1", "fqn": ["linkedin", "not_null_linkedin_ads__campaign_report_date_day"], "alias": "not_null_linkedin_ads__campaign_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708221.8056712, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__campaign_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__campaign_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__campaign_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.linkedin_ads__campaign_report", "attached_node": "model.linkedin.linkedin_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('linkedin_ads__campaign_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_linkedin_ads__campaign_report_campaign_id.bf43964b15": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__campaign_report_campaign_id.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__campaign_report_campaign_id.bf43964b15", "fqn": ["linkedin", "not_null_linkedin_ads__campaign_report_campaign_id"], "alias": "not_null_linkedin_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708221.8083732, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__campaign_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.linkedin_ads__campaign_report", "attached_node": "model.linkedin.linkedin_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('linkedin_ads__campaign_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_linkedin_ads__campaign_group_report_date_day.2676a1f76b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__campaign_group_report_date_day", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__campaign_group_report_date_day.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__campaign_group_report_date_day.2676a1f76b", "fqn": ["linkedin", "not_null_linkedin_ads__campaign_group_report_date_day"], "alias": "not_null_linkedin_ads__campaign_group_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708221.810912, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__campaign_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__campaign_group_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__campaign_group_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__campaign_group_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.linkedin_ads__campaign_group_report", "attached_node": "model.linkedin.linkedin_ads__campaign_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('linkedin_ads__campaign_group_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_linkedin_ads__campaign_group_report_campaign_group_id.39b448cdaf": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__campaign_group_report_campaign_group_id", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__campaign_group_report_campaign_group_id.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__campaign_group_report_campaign_group_id.39b448cdaf", "fqn": ["linkedin", "not_null_linkedin_ads__campaign_group_report_campaign_group_id"], "alias": "not_null_linkedin_ads__campaign_group_report_campaign_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708221.8134425, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__campaign_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__campaign_group_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__campaign_group_report_campaign_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__campaign_group_report\"\nwhere campaign_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_group_id", "file_key_name": "models.linkedin_ads__campaign_group_report", "attached_node": "model.linkedin.linkedin_ads__campaign_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_group_id", "model": "{{ get_where_subquery(ref('linkedin_ads__campaign_group_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_linkedin_ads__creative_report_date_day.0c6338b020": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__creative_report_date_day", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__creative_report_date_day.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__creative_report_date_day.0c6338b020", "fqn": ["linkedin", "not_null_linkedin_ads__creative_report_date_day"], "alias": "not_null_linkedin_ads__creative_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708221.8159037, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__creative_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__creative_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__creative_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__creative_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.linkedin_ads__creative_report", "attached_node": "model.linkedin.linkedin_ads__creative_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('linkedin_ads__creative_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_linkedin_ads__creative_report_creative_id.096d93f889": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__creative_report_creative_id", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__creative_report_creative_id.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__creative_report_creative_id.096d93f889", "fqn": ["linkedin", "not_null_linkedin_ads__creative_report_creative_id"], "alias": "not_null_linkedin_ads__creative_report_creative_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708221.818505, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__creative_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__creative_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__creative_report_creative_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect creative_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__creative_report\"\nwhere creative_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "creative_id", "file_key_name": "models.linkedin_ads__creative_report", "attached_node": "model.linkedin.linkedin_ads__creative_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "creative_id", "model": "{{ get_where_subquery(ref('linkedin_ads__creative_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_linkedin_ads__url_report_date_day.48b540f315": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__url_report_date_day", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__url_report_date_day.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__url_report_date_day.48b540f315", "fqn": ["linkedin", "not_null_linkedin_ads__url_report_date_day"], "alias": "not_null_linkedin_ads__url_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708221.8209934, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__url_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__url_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__url_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.linkedin_ads__url_report", "attached_node": "model.linkedin.linkedin_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('linkedin_ads__url_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_linkedin_ads__url_report_creative_id.83967fe9d2": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__url_report_creative_id", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__url_report_creative_id.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__url_report_creative_id.83967fe9d2", "fqn": ["linkedin", "not_null_linkedin_ads__url_report_creative_id"], "alias": "not_null_linkedin_ads__url_report_creative_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708221.823473, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__url_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__url_report_creative_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect creative_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__url_report\"\nwhere creative_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "creative_id", "file_key_name": "models.linkedin_ads__url_report", "attached_node": "model.linkedin.linkedin_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "creative_id", "model": "{{ get_where_subquery(ref('linkedin_ads__url_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_linkedin_ads__url_report_click_uri.81534087cb": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__url_report_click_uri", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__url_report_click_uri.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__url_report_click_uri.81534087cb", "fqn": ["linkedin", "not_null_linkedin_ads__url_report_click_uri"], "alias": "not_null_linkedin_ads__url_report_click_uri", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"enabled": true}, "created_at": 1783708221.8267388, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(enabled=True) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__url_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__url_report_click_uri.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect click_uri\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__url_report\"\nwhere click_uri is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "click_uri", "file_key_name": "models.linkedin_ads__url_report", "attached_node": "model.linkedin.linkedin_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "click_uri", "model": "{{ get_where_subquery(ref('linkedin_ads__url_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_linkedin_ads__monthly_campaign_country_report_date_month.ab0a8d3050": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__monthly_campaign_country_report_date_month", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__monthly_e69e063829cf5fc29a5efbeea1ded0b2.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__monthly_campaign_country_report_date_month.ab0a8d3050", "fqn": ["linkedin", "not_null_linkedin_ads__monthly_campaign_country_report_date_month"], "alias": "not_null_linkedin_ads__monthly_e69e063829cf5fc29a5efbeea1ded0b2", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_linkedin_ads__monthly_e69e063829cf5fc29a5efbeea1ded0b2", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_linkedin_ads__monthly_e69e063829cf5fc29a5efbeea1ded0b2"}, "created_at": 1783708221.8293202, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_linkedin_ads__monthly_e69e063829cf5fc29a5efbeea1ded0b2\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__monthly_campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__monthly_campaign_country_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__monthly_e69e063829cf5fc29a5efbeea1ded0b2.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_month\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__monthly_campaign_country_report\"\nwhere date_month is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_month", "file_key_name": "models.linkedin_ads__monthly_campaign_country_report", "attached_node": "model.linkedin.linkedin_ads__monthly_campaign_country_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_month", "model": "{{ get_where_subquery(ref('linkedin_ads__monthly_campaign_country_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_linkedin_ads__monthly_campaign_country_report_campaign_id.4624641c1c": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__monthly_campaign_country_report_campaign_id", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__monthly_0837b859b384a25b2df1c63ff671b24d.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__monthly_campaign_country_report_campaign_id.4624641c1c", "fqn": ["linkedin", "not_null_linkedin_ads__monthly_campaign_country_report_campaign_id"], "alias": "not_null_linkedin_ads__monthly_0837b859b384a25b2df1c63ff671b24d", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_linkedin_ads__monthly_0837b859b384a25b2df1c63ff671b24d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_linkedin_ads__monthly_0837b859b384a25b2df1c63ff671b24d"}, "created_at": 1783708221.8319142, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_linkedin_ads__monthly_0837b859b384a25b2df1c63ff671b24d\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__monthly_campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__monthly_campaign_country_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__monthly_0837b859b384a25b2df1c63ff671b24d.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__monthly_campaign_country_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.linkedin_ads__monthly_campaign_country_report", "attached_node": "model.linkedin.linkedin_ads__monthly_campaign_country_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('linkedin_ads__monthly_campaign_country_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_linkedin_ads__monthly_campaign_region_report_date_month.4fd809085e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__monthly_campaign_region_report_date_month", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__monthly_52b93cb419209deea0ecea8aeddd6fe8.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__monthly_campaign_region_report_date_month.4fd809085e", "fqn": ["linkedin", "not_null_linkedin_ads__monthly_campaign_region_report_date_month"], "alias": "not_null_linkedin_ads__monthly_52b93cb419209deea0ecea8aeddd6fe8", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_linkedin_ads__monthly_52b93cb419209deea0ecea8aeddd6fe8", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_linkedin_ads__monthly_52b93cb419209deea0ecea8aeddd6fe8"}, "created_at": 1783708221.8344169, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_linkedin_ads__monthly_52b93cb419209deea0ecea8aeddd6fe8\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__monthly_campaign_region_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__monthly_campaign_region_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__monthly_52b93cb419209deea0ecea8aeddd6fe8.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_month\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__monthly_campaign_region_report\"\nwhere date_month is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_month", "file_key_name": "models.linkedin_ads__monthly_campaign_region_report", "attached_node": "model.linkedin.linkedin_ads__monthly_campaign_region_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_month", "model": "{{ get_where_subquery(ref('linkedin_ads__monthly_campaign_region_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_linkedin_ads__monthly_campaign_region_report_campaign_id.5884bc5d68": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_linkedin_ads__monthly_campaign_region_report_campaign_id", "resource_type": "test", "package_name": "linkedin", "path": "not_null_linkedin_ads__monthly_d8d2fb9356c0edb46ee9b89812dc2020.sql", "original_file_path": "models/linkedin.yml", "unique_id": "test.linkedin.not_null_linkedin_ads__monthly_campaign_region_report_campaign_id.5884bc5d68", "fqn": ["linkedin", "not_null_linkedin_ads__monthly_campaign_region_report_campaign_id"], "alias": "not_null_linkedin_ads__monthly_d8d2fb9356c0edb46ee9b89812dc2020", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_linkedin_ads__monthly_d8d2fb9356c0edb46ee9b89812dc2020", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_linkedin_ads__monthly_d8d2fb9356c0edb46ee9b89812dc2020"}, "created_at": 1783708221.8368793, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_linkedin_ads__monthly_d8d2fb9356c0edb46ee9b89812dc2020\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "linkedin_ads__monthly_campaign_region_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.linkedin_ads__monthly_campaign_region_report"]}, "compiled_path": "target/compiled/linkedin/models/linkedin.yml/not_null_linkedin_ads__monthly_d8d2fb9356c0edb46ee9b89812dc2020.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"linkedin_ads__monthly_campaign_region_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.linkedin_ads__monthly_campaign_region_report", "attached_node": "model.linkedin.linkedin_ads__monthly_campaign_region_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('linkedin_ads__monthly_campaign_region_report')) }}"}, "namespace": null}}, "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_creative_creative_id.062abfe14b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_linkedin_ads__ad_analytics_by_creative_creative_id", "resource_type": "test", "package_name": "linkedin", "path": "not_null_stg_linkedin_ads__ad_analytics_by_creative_creative_id.sql", "original_file_path": "models/staging/stg_linkedin.yml", "unique_id": "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_creative_creative_id.062abfe14b", "fqn": ["linkedin", "staging", "not_null_stg_linkedin_ads__ad_analytics_by_creative_creative_id"], "alias": "not_null_stg_linkedin_ads__ad_analytics_by_creative_creative_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708221.8516994, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__ad_analytics_by_creative", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_creative"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin.yml/not_null_stg_linkedin_ads__ad_analytics_by_creative_creative_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect creative_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_creative\"\nwhere creative_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "creative_id", "file_key_name": "models.stg_linkedin_ads__ad_analytics_by_creative", "attached_node": "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "creative_id", "model": "{{ get_where_subquery(ref('stg_linkedin_ads__ad_analytics_by_creative')) }}"}, "namespace": null}}, "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_creative_date_day.cb81bc4766": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_linkedin_ads__ad_analytics_by_creative_date_day", "resource_type": "test", "package_name": "linkedin", "path": "not_null_stg_linkedin_ads__ad_analytics_by_creative_date_day.sql", "original_file_path": "models/staging/stg_linkedin.yml", "unique_id": "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_creative_date_day.cb81bc4766", "fqn": ["linkedin", "staging", "not_null_stg_linkedin_ads__ad_analytics_by_creative_date_day"], "alias": "not_null_stg_linkedin_ads__ad_analytics_by_creative_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708221.8543212, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__ad_analytics_by_creative", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_creative"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin.yml/not_null_stg_linkedin_ads__ad_analytics_by_creative_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_creative\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_linkedin_ads__ad_analytics_by_creative", "attached_node": "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_linkedin_ads__ad_analytics_by_creative')) }}"}, "namespace": null}}, "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_campaign_campaign_id.d6ae242f1a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_linkedin_ads__ad_analytics_by_campaign_campaign_id", "resource_type": "test", "package_name": "linkedin", "path": "not_null_stg_linkedin_ads__ad_analytics_by_campaign_campaign_id.sql", "original_file_path": "models/staging/stg_linkedin.yml", "unique_id": "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_campaign_campaign_id.d6ae242f1a", "fqn": ["linkedin", "staging", "not_null_stg_linkedin_ads__ad_analytics_by_campaign_campaign_id"], "alias": "not_null_stg_linkedin_ads__ad_analytics_by_campaign_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708221.8567986, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__ad_analytics_by_campaign", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin.yml/not_null_stg_linkedin_ads__ad_analytics_by_campaign_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_campaign\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_linkedin_ads__ad_analytics_by_campaign", "attached_node": "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_linkedin_ads__ad_analytics_by_campaign')) }}"}, "namespace": null}}, "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_campaign_date_day.ef97bed766": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_linkedin_ads__ad_analytics_by_campaign_date_day", "resource_type": "test", "package_name": "linkedin", "path": "not_null_stg_linkedin_ads__ad_analytics_by_campaign_date_day.sql", "original_file_path": "models/staging/stg_linkedin.yml", "unique_id": "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_campaign_date_day.ef97bed766", "fqn": ["linkedin", "staging", "not_null_stg_linkedin_ads__ad_analytics_by_campaign_date_day"], "alias": "not_null_stg_linkedin_ads__ad_analytics_by_campaign_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708221.8593018, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__ad_analytics_by_campaign", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin.yml/not_null_stg_linkedin_ads__ad_analytics_by_campaign_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__ad_analytics_by_campaign\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_linkedin_ads__ad_analytics_by_campaign", "attached_node": "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_linkedin_ads__ad_analytics_by_campaign')) }}"}, "namespace": null}}, "test.linkedin.not_null_stg_linkedin_ads__creative_history_creative_id.4d51d55474": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_linkedin_ads__creative_history_creative_id", "resource_type": "test", "package_name": "linkedin", "path": "not_null_stg_linkedin_ads__creative_history_creative_id.sql", "original_file_path": "models/staging/stg_linkedin.yml", "unique_id": "test.linkedin.not_null_stg_linkedin_ads__creative_history_creative_id.4d51d55474", "fqn": ["linkedin", "staging", "not_null_stg_linkedin_ads__creative_history_creative_id"], "alias": "not_null_stg_linkedin_ads__creative_history_creative_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708221.8617697, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__creative_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.stg_linkedin_ads__creative_history"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin.yml/not_null_stg_linkedin_ads__creative_history_creative_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect creative_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__creative_history\"\nwhere creative_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "creative_id", "file_key_name": "models.stg_linkedin_ads__creative_history", "attached_node": "model.linkedin.stg_linkedin_ads__creative_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "creative_id", "model": "{{ get_where_subquery(ref('stg_linkedin_ads__creative_history')) }}"}, "namespace": null}}, "test.linkedin.not_null_stg_linkedin_ads__campaign_history_campaign_id.b026971ca2": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_linkedin_ads__campaign_history_campaign_id", "resource_type": "test", "package_name": "linkedin", "path": "not_null_stg_linkedin_ads__campaign_history_campaign_id.sql", "original_file_path": "models/staging/stg_linkedin.yml", "unique_id": "test.linkedin.not_null_stg_linkedin_ads__campaign_history_campaign_id.b026971ca2", "fqn": ["linkedin", "staging", "not_null_stg_linkedin_ads__campaign_history_campaign_id"], "alias": "not_null_stg_linkedin_ads__campaign_history_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708221.8642468, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.stg_linkedin_ads__campaign_history"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin.yml/not_null_stg_linkedin_ads__campaign_history_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_history\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_linkedin_ads__campaign_history", "attached_node": "model.linkedin.stg_linkedin_ads__campaign_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_linkedin_ads__campaign_history')) }}"}, "namespace": null}}, "test.linkedin.not_null_stg_linkedin_ads__campaign_history_version_tag.64954cc469": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_linkedin_ads__campaign_history_version_tag", "resource_type": "test", "package_name": "linkedin", "path": "not_null_stg_linkedin_ads__campaign_history_version_tag.sql", "original_file_path": "models/staging/stg_linkedin.yml", "unique_id": "test.linkedin.not_null_stg_linkedin_ads__campaign_history_version_tag.64954cc469", "fqn": ["linkedin", "staging", "not_null_stg_linkedin_ads__campaign_history_version_tag"], "alias": "not_null_stg_linkedin_ads__campaign_history_version_tag", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708221.8668103, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.stg_linkedin_ads__campaign_history"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin.yml/not_null_stg_linkedin_ads__campaign_history_version_tag.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect version_tag\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_history\"\nwhere version_tag is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "version_tag", "file_key_name": "models.stg_linkedin_ads__campaign_history", "attached_node": "model.linkedin.stg_linkedin_ads__campaign_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "version_tag", "model": "{{ get_where_subquery(ref('stg_linkedin_ads__campaign_history')) }}"}, "namespace": null}}, "test.linkedin.not_null_stg_linkedin_ads__campaign_group_history_campaign_group_id.3888f3777d": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_linkedin_ads__campaign_group_history_campaign_group_id", "resource_type": "test", "package_name": "linkedin", "path": "not_null_stg_linkedin_ads__cam_ff659fc451955e2142e65b7eefd44f9a.sql", "original_file_path": "models/staging/stg_linkedin.yml", "unique_id": "test.linkedin.not_null_stg_linkedin_ads__campaign_group_history_campaign_group_id.3888f3777d", "fqn": ["linkedin", "staging", "not_null_stg_linkedin_ads__campaign_group_history_campaign_group_id"], "alias": "not_null_stg_linkedin_ads__cam_ff659fc451955e2142e65b7eefd44f9a", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_linkedin_ads__cam_ff659fc451955e2142e65b7eefd44f9a", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_linkedin_ads__cam_ff659fc451955e2142e65b7eefd44f9a"}, "created_at": 1783708221.869308, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_linkedin_ads__cam_ff659fc451955e2142e65b7eefd44f9a\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__campaign_group_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.stg_linkedin_ads__campaign_group_history"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin.yml/not_null_stg_linkedin_ads__cam_ff659fc451955e2142e65b7eefd44f9a.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_group_history\"\nwhere campaign_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_group_id", "file_key_name": "models.stg_linkedin_ads__campaign_group_history", "attached_node": "model.linkedin.stg_linkedin_ads__campaign_group_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_group_id", "model": "{{ get_where_subquery(ref('stg_linkedin_ads__campaign_group_history')) }}"}, "namespace": null}}, "test.linkedin.not_null_stg_linkedin_ads__campaign_group_history_last_modified_at.a716e2a7ea": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_linkedin_ads__campaign_group_history_last_modified_at", "resource_type": "test", "package_name": "linkedin", "path": "not_null_stg_linkedin_ads__cam_2e7858c2b570943ef2af34e42f5302bd.sql", "original_file_path": "models/staging/stg_linkedin.yml", "unique_id": "test.linkedin.not_null_stg_linkedin_ads__campaign_group_history_last_modified_at.a716e2a7ea", "fqn": ["linkedin", "staging", "not_null_stg_linkedin_ads__campaign_group_history_last_modified_at"], "alias": "not_null_stg_linkedin_ads__cam_2e7858c2b570943ef2af34e42f5302bd", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_linkedin_ads__cam_2e7858c2b570943ef2af34e42f5302bd", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_linkedin_ads__cam_2e7858c2b570943ef2af34e42f5302bd"}, "created_at": 1783708221.8717484, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_linkedin_ads__cam_2e7858c2b570943ef2af34e42f5302bd\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__campaign_group_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.stg_linkedin_ads__campaign_group_history"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin.yml/not_null_stg_linkedin_ads__cam_2e7858c2b570943ef2af34e42f5302bd.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect last_modified_at\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__campaign_group_history\"\nwhere last_modified_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "last_modified_at", "file_key_name": "models.stg_linkedin_ads__campaign_group_history", "attached_node": "model.linkedin.stg_linkedin_ads__campaign_group_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "last_modified_at", "model": "{{ get_where_subquery(ref('stg_linkedin_ads__campaign_group_history')) }}"}, "namespace": null}}, "test.linkedin.not_null_stg_linkedin_ads__account_history_account_id.a9fa7f93c0": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_linkedin_ads__account_history_account_id", "resource_type": "test", "package_name": "linkedin", "path": "not_null_stg_linkedin_ads__account_history_account_id.sql", "original_file_path": "models/staging/stg_linkedin.yml", "unique_id": "test.linkedin.not_null_stg_linkedin_ads__account_history_account_id.a9fa7f93c0", "fqn": ["linkedin", "staging", "not_null_stg_linkedin_ads__account_history_account_id"], "alias": "not_null_stg_linkedin_ads__account_history_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708221.874184, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.stg_linkedin_ads__account_history"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin.yml/not_null_stg_linkedin_ads__account_history_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__account_history\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.stg_linkedin_ads__account_history", "attached_node": "model.linkedin.stg_linkedin_ads__account_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('stg_linkedin_ads__account_history')) }}"}, "namespace": null}}, "test.linkedin.not_null_stg_linkedin_ads__account_history_version_tag.58c46c5d81": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_linkedin_ads__account_history_version_tag", "resource_type": "test", "package_name": "linkedin", "path": "not_null_stg_linkedin_ads__account_history_version_tag.sql", "original_file_path": "models/staging/stg_linkedin.yml", "unique_id": "test.linkedin.not_null_stg_linkedin_ads__account_history_version_tag.58c46c5d81", "fqn": ["linkedin", "staging", "not_null_stg_linkedin_ads__account_history_version_tag"], "alias": "not_null_stg_linkedin_ads__account_history_version_tag", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708221.8767736, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.stg_linkedin_ads__account_history"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin.yml/not_null_stg_linkedin_ads__account_history_version_tag.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect version_tag\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__account_history\"\nwhere version_tag is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "version_tag", "file_key_name": "models.stg_linkedin_ads__account_history", "attached_node": "model.linkedin.stg_linkedin_ads__account_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "version_tag", "model": "{{ get_where_subquery(ref('stg_linkedin_ads__account_history')) }}"}, "namespace": null}}, "test.linkedin.not_null_stg_linkedin_ads__geo_geo_id.a9fc61210c": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_linkedin_ads__geo_geo_id", "resource_type": "test", "package_name": "linkedin", "path": "not_null_stg_linkedin_ads__geo_geo_id.sql", "original_file_path": "models/staging/stg_linkedin.yml", "unique_id": "test.linkedin.not_null_stg_linkedin_ads__geo_geo_id.a9fc61210c", "fqn": ["linkedin", "staging", "not_null_stg_linkedin_ads__geo_geo_id"], "alias": "not_null_stg_linkedin_ads__geo_geo_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708221.8792777, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__geo", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.stg_linkedin_ads__geo"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin.yml/not_null_stg_linkedin_ads__geo_geo_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect geo_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__geo\"\nwhere geo_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "geo_id", "file_key_name": "models.stg_linkedin_ads__geo", "attached_node": "model.linkedin.stg_linkedin_ads__geo", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "geo_id", "model": "{{ get_where_subquery(ref('stg_linkedin_ads__geo')) }}"}, "namespace": null}}, "test.linkedin.not_null_stg_linkedin_ads__monthly_ad_analytics_by_country_date_month.553fe89e70": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_linkedin_ads__monthly_ad_analytics_by_country_date_month", "resource_type": "test", "package_name": "linkedin", "path": "not_null_stg_linkedin_ads__mon_02cf32e2b626ecead73883f0f8c85f37.sql", "original_file_path": "models/staging/stg_linkedin.yml", "unique_id": "test.linkedin.not_null_stg_linkedin_ads__monthly_ad_analytics_by_country_date_month.553fe89e70", "fqn": ["linkedin", "staging", "not_null_stg_linkedin_ads__monthly_ad_analytics_by_country_date_month"], "alias": "not_null_stg_linkedin_ads__mon_02cf32e2b626ecead73883f0f8c85f37", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_linkedin_ads__mon_02cf32e2b626ecead73883f0f8c85f37", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_linkedin_ads__mon_02cf32e2b626ecead73883f0f8c85f37"}, "created_at": 1783708221.8817272, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_linkedin_ads__mon_02cf32e2b626ecead73883f0f8c85f37\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__monthly_ad_analytics_by_country", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin.yml/not_null_stg_linkedin_ads__mon_02cf32e2b626ecead73883f0f8c85f37.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_month\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__monthly_ad_analytics_by_country\"\nwhere date_month is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_month", "file_key_name": "models.stg_linkedin_ads__monthly_ad_analytics_by_country", "attached_node": "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_month", "model": "{{ get_where_subquery(ref('stg_linkedin_ads__monthly_ad_analytics_by_country')) }}"}, "namespace": null}}, "test.linkedin.not_null_stg_linkedin_ads__monthly_ad_analytics_by_region_date_month.d065ed2b78": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_linkedin_ads__monthly_ad_analytics_by_region_date_month", "resource_type": "test", "package_name": "linkedin", "path": "not_null_stg_linkedin_ads__mon_57eb656cab457d14853c1e72854cab3d.sql", "original_file_path": "models/staging/stg_linkedin.yml", "unique_id": "test.linkedin.not_null_stg_linkedin_ads__monthly_ad_analytics_by_region_date_month.d065ed2b78", "fqn": ["linkedin", "staging", "not_null_stg_linkedin_ads__monthly_ad_analytics_by_region_date_month"], "alias": "not_null_stg_linkedin_ads__mon_57eb656cab457d14853c1e72854cab3d", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_linkedin_ads__mon_57eb656cab457d14853c1e72854cab3d", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_linkedin_ads__mon_57eb656cab457d14853c1e72854cab3d"}, "created_at": 1783708221.8841825, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_linkedin_ads__mon_57eb656cab457d14853c1e72854cab3d\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_linkedin_ads__monthly_ad_analytics_by_region", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region"]}, "compiled_path": "target/compiled/linkedin/models/staging/stg_linkedin.yml/not_null_stg_linkedin_ads__mon_57eb656cab457d14853c1e72854cab3d.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_month\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_linkedin_ads__monthly_ad_analytics_by_region\"\nwhere date_month is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_month", "file_key_name": "models.stg_linkedin_ads__monthly_ad_analytics_by_region", "attached_node": "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_month", "model": "{{ get_where_subquery(ref('stg_linkedin_ads__monthly_ad_analytics_by_region')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_ad_group_id.60febec6b5": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_apple_search_ads__ad_group_report_ad_group_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_apple_search_ads__ad_group_report_ad_group_id.sql", "original_file_path": "models/apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_ad_group_id.60febec6b5", "fqn": ["apple_search_ads", "not_null_apple_search_ads__ad_group_report_ad_group_id"], "alias": "not_null_apple_search_ads__ad_group_report_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.130292, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "apple_search_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_group_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__ad_group_report_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__ad_group_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.apple_search_ads__ad_group_report", "attached_node": "model.apple_search_ads.apple_search_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('apple_search_ads__ad_group_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_date_day.e6ffb30b3c": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_apple_search_ads__ad_group_report_date_day", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_apple_search_ads__ad_group_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_date_day.e6ffb30b3c", "fqn": ["apple_search_ads", "not_null_apple_search_ads__ad_group_report_date_day"], "alias": "not_null_apple_search_ads__ad_group_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.132915, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "apple_search_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_group_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__ad_group_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__ad_group_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.apple_search_ads__ad_group_report", "attached_node": "model.apple_search_ads.apple_search_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__ad_group_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_apple_search_ads__ad_report_ad_id.0ab2c5075c": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_apple_search_ads__ad_report_ad_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_apple_search_ads__ad_report_ad_id.sql", "original_file_path": "models/apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_report_ad_id.0ab2c5075c", "fqn": ["apple_search_ads", "not_null_apple_search_ads__ad_report_ad_id"], "alias": "not_null_apple_search_ads__ad_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.135473, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "apple_search_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__ad_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__ad_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.apple_search_ads__ad_report", "attached_node": "model.apple_search_ads.apple_search_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('apple_search_ads__ad_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_apple_search_ads__ad_report_date_day.b86c049e17": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_apple_search_ads__ad_report_date_day", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_apple_search_ads__ad_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_apple_search_ads__ad_report_date_day.b86c049e17", "fqn": ["apple_search_ads", "not_null_apple_search_ads__ad_report_date_day"], "alias": "not_null_apple_search_ads__ad_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.138013, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "apple_search_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__ad_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__ad_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__ad_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.apple_search_ads__ad_report", "attached_node": "model.apple_search_ads.apple_search_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__ad_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_apple_search_ads__campaign_report_campaign_id.e26ed1e146": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_apple_search_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_apple_search_ads__campaign_report_campaign_id.sql", "original_file_path": "models/apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_apple_search_ads__campaign_report_campaign_id.e26ed1e146", "fqn": ["apple_search_ads", "not_null_apple_search_ads__campaign_report_campaign_id"], "alias": "not_null_apple_search_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.1405232, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "apple_search_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__campaign_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.apple_search_ads__campaign_report", "attached_node": "model.apple_search_ads.apple_search_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('apple_search_ads__campaign_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_apple_search_ads__campaign_report_date_day.35652b8d1a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_apple_search_ads__campaign_report_date_day", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_apple_search_ads__campaign_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_apple_search_ads__campaign_report_date_day.35652b8d1a", "fqn": ["apple_search_ads", "not_null_apple_search_ads__campaign_report_date_day"], "alias": "not_null_apple_search_ads__campaign_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.1429656, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "apple_search_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__campaign_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__campaign_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__campaign_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.apple_search_ads__campaign_report", "attached_node": "model.apple_search_ads.apple_search_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__campaign_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_apple_search_ads__keyword_report_keyword_id.ea493710db": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_apple_search_ads__keyword_report_keyword_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_apple_search_ads__keyword_report_keyword_id.sql", "original_file_path": "models/apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_apple_search_ads__keyword_report_keyword_id.ea493710db", "fqn": ["apple_search_ads", "not_null_apple_search_ads__keyword_report_keyword_id"], "alias": "not_null_apple_search_ads__keyword_report_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.1454422, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "apple_search_ads__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__keyword_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__keyword_report_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__keyword_report\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.apple_search_ads__keyword_report", "attached_node": "model.apple_search_ads.apple_search_ads__keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('apple_search_ads__keyword_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_apple_search_ads__keyword_report_date_day.3dec8d0e82": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_apple_search_ads__keyword_report_date_day", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_apple_search_ads__keyword_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_apple_search_ads__keyword_report_date_day.3dec8d0e82", "fqn": ["apple_search_ads", "not_null_apple_search_ads__keyword_report_date_day"], "alias": "not_null_apple_search_ads__keyword_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.1480138, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "apple_search_ads__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__keyword_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__keyword_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__keyword_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.apple_search_ads__keyword_report", "attached_node": "model.apple_search_ads.apple_search_ads__keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__keyword_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_apple_search_ads__organization_report_organization_id.b6cf7d69f8": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_apple_search_ads__organization_report_organization_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_apple_search_ads__organization_report_organization_id.sql", "original_file_path": "models/apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_apple_search_ads__organization_report_organization_id.b6cf7d69f8", "fqn": ["apple_search_ads", "not_null_apple_search_ads__organization_report_organization_id"], "alias": "not_null_apple_search_ads__organization_report_organization_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.1504927, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "apple_search_ads__organization_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__organization_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__organization_report_organization_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect organization_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__organization_report\"\nwhere organization_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "organization_id", "file_key_name": "models.apple_search_ads__organization_report", "attached_node": "model.apple_search_ads.apple_search_ads__organization_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "organization_id", "model": "{{ get_where_subquery(ref('apple_search_ads__organization_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_apple_search_ads__organization_report_date_day.5784fed523": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_apple_search_ads__organization_report_date_day", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_apple_search_ads__organization_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_apple_search_ads__organization_report_date_day.5784fed523", "fqn": ["apple_search_ads", "not_null_apple_search_ads__organization_report_date_day"], "alias": "not_null_apple_search_ads__organization_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.1529255, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "apple_search_ads__organization_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__organization_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__organization_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__organization_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.apple_search_ads__organization_report", "attached_node": "model.apple_search_ads.apple_search_ads__organization_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__organization_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_apple_search_ads__search_term_report_date_day.1bc3b0d57c": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_apple_search_ads__search_term_report_date_day", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_apple_search_ads__search_term_report_date_day.sql", "original_file_path": "models/apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_apple_search_ads__search_term_report_date_day.1bc3b0d57c", "fqn": ["apple_search_ads", "not_null_apple_search_ads__search_term_report_date_day"], "alias": "not_null_apple_search_ads__search_term_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.155401, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "apple_search_ads__search_term_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__search_term_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__search_term_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__search_term_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.apple_search_ads__search_term_report", "attached_node": "model.apple_search_ads.apple_search_ads__search_term_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('apple_search_ads__search_term_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_apple_search_ads__search_term_report_search_term_text.aecc7447f7": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_apple_search_ads__search_term_report_search_term_text", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_apple_search_ads__search_term_report_search_term_text.sql", "original_file_path": "models/apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_apple_search_ads__search_term_report_search_term_text.aecc7447f7", "fqn": ["apple_search_ads", "not_null_apple_search_ads__search_term_report_search_term_text"], "alias": "not_null_apple_search_ads__search_term_report_search_term_text", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.1579623, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "apple_search_ads__search_term_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.apple_search_ads__search_term_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/apple_search_ads.yml/not_null_apple_search_ads__search_term_report_search_term_text.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect search_term_text\nfrom \"postgres\".\"public_ad_reporting_dev\".\"apple_search_ads__search_term_report\"\nwhere search_term_text is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "search_term_text", "file_key_name": "models.apple_search_ads__search_term_report", "attached_node": "model.apple_search_ads.apple_search_ads__search_term_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "search_term_text", "model": "{{ get_where_subquery(ref('apple_search_ads__search_term_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__ad_group_history_modified_at", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__ad_group_history_modified_at.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__ad_group_history_modified_at"], "alias": "not_null_stg_apple_search_ads__ad_group_history_modified_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.1992981, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_group_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_group_history"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_group_history_modified_at.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect modified_at\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_group_history\"\nwhere modified_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "modified_at", "file_key_name": "models.stg_apple_search_ads__ad_group_history", "attached_node": "model.apple_search_ads.stg_apple_search_ads__ad_group_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "modified_at", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_group_history')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__ad_group_history_ad_group_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__ad_group_history_ad_group_id.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__ad_group_history_ad_group_id"], "alias": "not_null_stg_apple_search_ads__ad_group_history_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.2018564, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_group_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_group_history"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_group_history_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_group_history\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_apple_search_ads__ad_group_history", "attached_node": "model.apple_search_ads.stg_apple_search_ads__ad_group_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_group_history')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__ad_group_report_ad_group_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__ad_group_report_ad_group_id.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__ad_group_report_ad_group_id"], "alias": "not_null_stg_apple_search_ads__ad_group_report_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.2044444, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_group_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_group_report_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_group_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_apple_search_ads__ad_group_report", "attached_node": "model.apple_search_ads.stg_apple_search_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_group_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__ad_group_report_date_day", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__ad_group_report_date_day.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__ad_group_report_date_day"], "alias": "not_null_stg_apple_search_ads__ad_group_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.2069063, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_group_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_group_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_group_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__ad_group_report", "attached_node": "model.apple_search_ads.stg_apple_search_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_group_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__ad_history_modified_at", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__ad_history_modified_at.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__ad_history_modified_at"], "alias": "not_null_stg_apple_search_ads__ad_history_modified_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.2093925, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_history"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_history_modified_at.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect modified_at\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_history\"\nwhere modified_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "modified_at", "file_key_name": "models.stg_apple_search_ads__ad_history", "attached_node": "model.apple_search_ads.stg_apple_search_ads__ad_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "modified_at", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_history')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__ad_history_ad_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__ad_history_ad_id.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__ad_history_ad_id"], "alias": "not_null_stg_apple_search_ads__ad_history_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.2118366, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_history"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_history_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_history\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_apple_search_ads__ad_history", "attached_node": "model.apple_search_ads.stg_apple_search_ads__ad_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_history')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__ad_report_date_day", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__ad_report_date_day.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__ad_report_date_day"], "alias": "not_null_stg_apple_search_ads__ad_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.214326, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__ad_report", "attached_node": "model.apple_search_ads.stg_apple_search_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__ad_report_ad_group_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__ad_report_ad_group_id.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__ad_report_ad_group_id"], "alias": "not_null_stg_apple_search_ads__ad_report_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.2168732, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_report_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_apple_search_ads__ad_report", "attached_node": "model.apple_search_ads.stg_apple_search_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__ad_report_ad_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__ad_report_ad_id.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__ad_report_ad_id"], "alias": "not_null_stg_apple_search_ads__ad_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.219375, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__ad_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__ad_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__ad_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_apple_search_ads__ad_report", "attached_node": "model.apple_search_ads.stg_apple_search_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__ad_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__campaign_history_modified_at", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__campaign_history_modified_at.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__campaign_history_modified_at"], "alias": "not_null_stg_apple_search_ads__campaign_history_modified_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.2218356, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__campaign_history"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__campaign_history_modified_at.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect modified_at\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_history\"\nwhere modified_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "modified_at", "file_key_name": "models.stg_apple_search_ads__campaign_history", "attached_node": "model.apple_search_ads.stg_apple_search_ads__campaign_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "modified_at", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_history')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__campaign_history_campaign_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__campaign_history_campaign_id.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__campaign_history_campaign_id"], "alias": "not_null_stg_apple_search_ads__campaign_history_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.2243447, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__campaign_history"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__campaign_history_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_history\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_apple_search_ads__campaign_history", "attached_node": "model.apple_search_ads.stg_apple_search_ads__campaign_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_history')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__campaign_report_campaign_id.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__campaign_report_campaign_id"], "alias": "not_null_stg_apple_search_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.2269242, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__campaign_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_apple_search_ads__campaign_report", "attached_node": "model.apple_search_ads.stg_apple_search_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__campaign_report_date_day", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__campaign_report_date_day.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__campaign_report_date_day"], "alias": "not_null_stg_apple_search_ads__campaign_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.2295308, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__campaign_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__campaign_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__campaign_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__campaign_report", "attached_node": "model.apple_search_ads.stg_apple_search_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__campaign_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__keyword_history_modified_at", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__keyword_history_modified_at.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__keyword_history_modified_at"], "alias": "not_null_stg_apple_search_ads__keyword_history_modified_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.2319884, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__keyword_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__keyword_history"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__keyword_history_modified_at.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect modified_at\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__keyword_history\"\nwhere modified_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "modified_at", "file_key_name": "models.stg_apple_search_ads__keyword_history", "attached_node": "model.apple_search_ads.stg_apple_search_ads__keyword_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "modified_at", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_history')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__keyword_history_keyword_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__keyword_history_keyword_id.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__keyword_history_keyword_id"], "alias": "not_null_stg_apple_search_ads__keyword_history_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.234511, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__keyword_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__keyword_history"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__keyword_history_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__keyword_history\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.stg_apple_search_ads__keyword_history", "attached_node": "model.apple_search_ads.stg_apple_search_ads__keyword_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_history')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__keyword_report_keyword_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__keyword_report_keyword_id.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__keyword_report_keyword_id"], "alias": "not_null_stg_apple_search_ads__keyword_report_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.2369592, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__keyword_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__keyword_report_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__keyword_report\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.stg_apple_search_ads__keyword_report", "attached_node": "model.apple_search_ads.stg_apple_search_ads__keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__keyword_report_date_day", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__keyword_report_date_day.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__keyword_report_date_day"], "alias": "not_null_stg_apple_search_ads__keyword_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.2395732, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__keyword_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__keyword_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__keyword_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__keyword_report", "attached_node": "model.apple_search_ads.stg_apple_search_ads__keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__keyword_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__organization_organization_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__organization_organization_id.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__organization_organization_id"], "alias": "not_null_stg_apple_search_ads__organization_organization_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.2420182, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__organization", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__organization"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__organization_organization_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect organization_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__organization\"\nwhere organization_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "organization_id", "file_key_name": "models.stg_apple_search_ads__organization", "attached_node": "model.apple_search_ads.stg_apple_search_ads__organization", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "organization_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__organization')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__search_term_report__fivetran_id", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__search_term_report__fivetran_id.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__search_term_report__fivetran_id"], "alias": "not_null_stg_apple_search_ads__search_term_report__fivetran_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.244516, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__search_term_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__search_term_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__search_term_report__fivetran_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect _fivetran_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__search_term_report\"\nwhere _fivetran_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "_fivetran_id", "file_key_name": "models.stg_apple_search_ads__search_term_report", "attached_node": "model.apple_search_ads.stg_apple_search_ads__search_term_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_fivetran_id", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__search_term_report')) }}"}, "namespace": null}}, "test.apple_search_ads.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_apple_search_ads__search_term_report_date_day", "resource_type": "test", "package_name": "apple_search_ads", "path": "not_null_stg_apple_search_ads__search_term_report_date_day.sql", "original_file_path": "models/staging/stg_apple_search_ads.yml", "unique_id": "test.apple_search_ads.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302", "fqn": ["apple_search_ads", "staging", "not_null_stg_apple_search_ads__search_term_report_date_day"], "alias": "not_null_stg_apple_search_ads__search_term_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.2469509, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_apple_search_ads__search_term_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.apple_search_ads.stg_apple_search_ads__search_term_report"]}, "compiled_path": "target/compiled/apple_search_ads/models/staging/stg_apple_search_ads.yml/not_null_stg_apple_search_ads__search_term_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_apple_search_ads__search_term_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_apple_search_ads__search_term_report", "attached_node": "model.apple_search_ads.stg_apple_search_ads__search_term_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_apple_search_ads__search_term_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_reddit_ads__account_report_date_day.7b43e6cb90": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_reddit_ads__account_report_date_day", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_reddit_ads__account_report_date_day.sql", "original_file_path": "models/reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_reddit_ads__account_report_date_day.7b43e6cb90", "fqn": ["reddit_ads", "not_null_reddit_ads__account_report_date_day"], "alias": "not_null_reddit_ads__account_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.2856836, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "reddit_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.reddit_ads__account_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads.yml/not_null_reddit_ads__account_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__account_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.reddit_ads__account_report", "attached_node": "model.reddit_ads.reddit_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('reddit_ads__account_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_reddit_ads__account_report_account_id.16f11188c5": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_reddit_ads__account_report_account_id", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_reddit_ads__account_report_account_id.sql", "original_file_path": "models/reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_reddit_ads__account_report_account_id.16f11188c5", "fqn": ["reddit_ads", "not_null_reddit_ads__account_report_account_id"], "alias": "not_null_reddit_ads__account_report_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.288251, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "reddit_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.reddit_ads__account_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads.yml/not_null_reddit_ads__account_report_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__account_report\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.reddit_ads__account_report", "attached_node": "model.reddit_ads.reddit_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('reddit_ads__account_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_reddit_ads__ad_group_report_date_day.6463e6f6f7": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_reddit_ads__ad_group_report_date_day", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_reddit_ads__ad_group_report_date_day.sql", "original_file_path": "models/reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_reddit_ads__ad_group_report_date_day.6463e6f6f7", "fqn": ["reddit_ads", "not_null_reddit_ads__ad_group_report_date_day"], "alias": "not_null_reddit_ads__ad_group_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.2907312, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "reddit_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.reddit_ads__ad_group_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads.yml/not_null_reddit_ads__ad_group_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__ad_group_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.reddit_ads__ad_group_report", "attached_node": "model.reddit_ads.reddit_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('reddit_ads__ad_group_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_reddit_ads__ad_group_report_ad_group_id.057bd60604": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_reddit_ads__ad_group_report_ad_group_id", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_reddit_ads__ad_group_report_ad_group_id.sql", "original_file_path": "models/reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_reddit_ads__ad_group_report_ad_group_id.057bd60604", "fqn": ["reddit_ads", "not_null_reddit_ads__ad_group_report_ad_group_id"], "alias": "not_null_reddit_ads__ad_group_report_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.2932148, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "reddit_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.reddit_ads__ad_group_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads.yml/not_null_reddit_ads__ad_group_report_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__ad_group_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.reddit_ads__ad_group_report", "attached_node": "model.reddit_ads.reddit_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('reddit_ads__ad_group_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_reddit_ads__ad_report_date_day.608b21c69a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_reddit_ads__ad_report_date_day", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_reddit_ads__ad_report_date_day.sql", "original_file_path": "models/reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_reddit_ads__ad_report_date_day.608b21c69a", "fqn": ["reddit_ads", "not_null_reddit_ads__ad_report_date_day"], "alias": "not_null_reddit_ads__ad_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.2957854, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "reddit_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.reddit_ads__ad_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads.yml/not_null_reddit_ads__ad_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__ad_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.reddit_ads__ad_report", "attached_node": "model.reddit_ads.reddit_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('reddit_ads__ad_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_reddit_ads__ad_report_ad_id.1da054a14e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_reddit_ads__ad_report_ad_id", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_reddit_ads__ad_report_ad_id.sql", "original_file_path": "models/reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_reddit_ads__ad_report_ad_id.1da054a14e", "fqn": ["reddit_ads", "not_null_reddit_ads__ad_report_ad_id"], "alias": "not_null_reddit_ads__ad_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.298311, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "reddit_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.reddit_ads__ad_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads.yml/not_null_reddit_ads__ad_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__ad_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.reddit_ads__ad_report", "attached_node": "model.reddit_ads.reddit_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('reddit_ads__ad_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_reddit_ads__campaign_report_date_day.f79cca4131": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_reddit_ads__campaign_report_date_day", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_reddit_ads__campaign_report_date_day.sql", "original_file_path": "models/reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_reddit_ads__campaign_report_date_day.f79cca4131", "fqn": ["reddit_ads", "not_null_reddit_ads__campaign_report_date_day"], "alias": "not_null_reddit_ads__campaign_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.3007765, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "reddit_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.reddit_ads__campaign_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads.yml/not_null_reddit_ads__campaign_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__campaign_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.reddit_ads__campaign_report", "attached_node": "model.reddit_ads.reddit_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('reddit_ads__campaign_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_reddit_ads__campaign_report_campaign_id.f5491a0b49": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_reddit_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_reddit_ads__campaign_report_campaign_id.sql", "original_file_path": "models/reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_reddit_ads__campaign_report_campaign_id.f5491a0b49", "fqn": ["reddit_ads", "not_null_reddit_ads__campaign_report_campaign_id"], "alias": "not_null_reddit_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.3032415, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "reddit_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.reddit_ads__campaign_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads.yml/not_null_reddit_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.reddit_ads__campaign_report", "attached_node": "model.reddit_ads.reddit_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('reddit_ads__campaign_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_reddit_ads__url_report_date_day.4b0f6363da": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_reddit_ads__url_report_date_day", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_reddit_ads__url_report_date_day.sql", "original_file_path": "models/reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_reddit_ads__url_report_date_day.4b0f6363da", "fqn": ["reddit_ads", "not_null_reddit_ads__url_report_date_day"], "alias": "not_null_reddit_ads__url_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.3057752, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "reddit_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.reddit_ads__url_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads.yml/not_null_reddit_ads__url_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__url_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.reddit_ads__url_report", "attached_node": "model.reddit_ads.reddit_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('reddit_ads__url_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_reddit_ads__url_report_ad_id.8ff83da2b0": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_reddit_ads__url_report_ad_id", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_reddit_ads__url_report_ad_id.sql", "original_file_path": "models/reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_reddit_ads__url_report_ad_id.8ff83da2b0", "fqn": ["reddit_ads", "not_null_reddit_ads__url_report_ad_id"], "alias": "not_null_reddit_ads__url_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.3084435, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "reddit_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.reddit_ads__url_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads.yml/not_null_reddit_ads__url_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__url_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.reddit_ads__url_report", "attached_node": "model.reddit_ads.reddit_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('reddit_ads__url_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_reddit_ads__url_report_base_url.2f585bebcb": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_reddit_ads__url_report_base_url", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_reddit_ads__url_report_base_url.sql", "original_file_path": "models/reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_reddit_ads__url_report_base_url.2f585bebcb", "fqn": ["reddit_ads", "not_null_reddit_ads__url_report_base_url"], "alias": "not_null_reddit_ads__url_report_base_url", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"enabled": true}, "created_at": 1783708222.3116803, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(enabled=True) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "reddit_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.reddit_ads__url_report"]}, "compiled_path": "target/compiled/reddit_ads/models/reddit_ads.yml/not_null_reddit_ads__url_report_base_url.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect base_url\nfrom \"postgres\".\"public_ad_reporting_dev\".\"reddit_ads__url_report\"\nwhere base_url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "base_url", "file_key_name": "models.reddit_ads__url_report", "attached_node": "model.reddit_ads.reddit_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "base_url", "model": "{{ get_where_subquery(ref('reddit_ads__url_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_stg_reddit_ads__account_account_id.512f0b8078": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_reddit_ads__account_account_id", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_stg_reddit_ads__account_account_id.sql", "original_file_path": "models/staging/stg_reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_stg_reddit_ads__account_account_id.512f0b8078", "fqn": ["reddit_ads", "staging", "not_null_stg_reddit_ads__account_account_id"], "alias": "not_null_stg_reddit_ads__account_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.371572, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__account", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.stg_reddit_ads__account"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads.yml/not_null_stg_reddit_ads__account_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.stg_reddit_ads__account", "attached_node": "model.reddit_ads.stg_reddit_ads__account", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('stg_reddit_ads__account')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_stg_reddit_ads__account_report_account_id.1f2a0195de": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_reddit_ads__account_report_account_id", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_stg_reddit_ads__account_report_account_id.sql", "original_file_path": "models/staging/stg_reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_stg_reddit_ads__account_report_account_id.1f2a0195de", "fqn": ["reddit_ads", "staging", "not_null_stg_reddit_ads__account_report_account_id"], "alias": "not_null_stg_reddit_ads__account_report_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.3742278, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.stg_reddit_ads__account_report"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads.yml/not_null_stg_reddit_ads__account_report_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__account_report\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.stg_reddit_ads__account_report", "attached_node": "model.reddit_ads.stg_reddit_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('stg_reddit_ads__account_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_stg_reddit_ads__ad_ad_id.40188b63dd": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_reddit_ads__ad_ad_id", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_stg_reddit_ads__ad_ad_id.sql", "original_file_path": "models/staging/stg_reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_stg_reddit_ads__ad_ad_id.40188b63dd", "fqn": ["reddit_ads", "staging", "not_null_stg_reddit_ads__ad_ad_id"], "alias": "not_null_stg_reddit_ads__ad_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.3767266, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__ad", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.stg_reddit_ads__ad"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads.yml/not_null_stg_reddit_ads__ad_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_reddit_ads__ad", "attached_node": "model.reddit_ads.stg_reddit_ads__ad", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_reddit_ads__ad')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_stg_reddit_ads__ad_report_ad_id.c4af84b857": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_reddit_ads__ad_report_ad_id", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_stg_reddit_ads__ad_report_ad_id.sql", "original_file_path": "models/staging/stg_reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_stg_reddit_ads__ad_report_ad_id.c4af84b857", "fqn": ["reddit_ads", "staging", "not_null_stg_reddit_ads__ad_report_ad_id"], "alias": "not_null_stg_reddit_ads__ad_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.379262, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.stg_reddit_ads__ad_report"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads.yml/not_null_stg_reddit_ads__ad_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_reddit_ads__ad_report", "attached_node": "model.reddit_ads.stg_reddit_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_reddit_ads__ad_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_stg_reddit_ads__ad_group_ad_group_id.65795d8dc2": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_reddit_ads__ad_group_ad_group_id", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_stg_reddit_ads__ad_group_ad_group_id.sql", "original_file_path": "models/staging/stg_reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_stg_reddit_ads__ad_group_ad_group_id.65795d8dc2", "fqn": ["reddit_ads", "staging", "not_null_stg_reddit_ads__ad_group_ad_group_id"], "alias": "not_null_stg_reddit_ads__ad_group_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.3817415, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__ad_group", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.stg_reddit_ads__ad_group"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads.yml/not_null_stg_reddit_ads__ad_group_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_reddit_ads__ad_group", "attached_node": "model.reddit_ads.stg_reddit_ads__ad_group", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_reddit_ads__ad_group')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_stg_reddit_ads__ad_group_report_ad_group_id.9836cd084d": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_reddit_ads__ad_group_report_ad_group_id", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_stg_reddit_ads__ad_group_report_ad_group_id.sql", "original_file_path": "models/staging/stg_reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_stg_reddit_ads__ad_group_report_ad_group_id.9836cd084d", "fqn": ["reddit_ads", "staging", "not_null_stg_reddit_ads__ad_group_report_ad_group_id"], "alias": "not_null_stg_reddit_ads__ad_group_report_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.384262, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.stg_reddit_ads__ad_group_report"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads.yml/not_null_stg_reddit_ads__ad_group_report_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__ad_group_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_reddit_ads__ad_group_report", "attached_node": "model.reddit_ads.stg_reddit_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_reddit_ads__ad_group_report')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_stg_reddit_ads__campaign_campaign_id.f3f24e4682": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_reddit_ads__campaign_campaign_id", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_stg_reddit_ads__campaign_campaign_id.sql", "original_file_path": "models/staging/stg_reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_stg_reddit_ads__campaign_campaign_id.f3f24e4682", "fqn": ["reddit_ads", "staging", "not_null_stg_reddit_ads__campaign_campaign_id"], "alias": "not_null_stg_reddit_ads__campaign_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.3868484, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__campaign", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.stg_reddit_ads__campaign"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads.yml/not_null_stg_reddit_ads__campaign_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_reddit_ads__campaign", "attached_node": "model.reddit_ads.stg_reddit_ads__campaign", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_reddit_ads__campaign')) }}"}, "namespace": null}}, "test.reddit_ads.not_null_stg_reddit_ads__campaign_report_campaign_id.c717612b4f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_reddit_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "reddit_ads", "path": "not_null_stg_reddit_ads__campaign_report_campaign_id.sql", "original_file_path": "models/staging/stg_reddit_ads.yml", "unique_id": "test.reddit_ads.not_null_stg_reddit_ads__campaign_report_campaign_id.c717612b4f", "fqn": ["reddit_ads", "staging", "not_null_stg_reddit_ads__campaign_report_campaign_id"], "alias": "not_null_stg_reddit_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.3893547, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_reddit_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.reddit_ads.stg_reddit_ads__campaign_report"]}, "compiled_path": "target/compiled/reddit_ads/models/staging/stg_reddit_ads.yml/not_null_stg_reddit_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_reddit_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_reddit_ads__campaign_report", "attached_node": "model.reddit_ads.stg_reddit_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_reddit_ads__campaign_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__account_report_date_day.688d7ed260": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__account_report_date_day", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__account_report_date_day.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__account_report_date_day.688d7ed260", "fqn": ["snapchat_ads", "not_null_snapchat_ads__account_report_date_day"], "alias": "not_null_snapchat_ads__account_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.4213545, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__account_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__account_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__account_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.snapchat_ads__account_report", "attached_node": "model.snapchat_ads.snapchat_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('snapchat_ads__account_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__account_report_ad_account_id.589c81966b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__account_report_ad_account_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__account_report_ad_account_id.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__account_report_ad_account_id.589c81966b", "fqn": ["snapchat_ads", "not_null_snapchat_ads__account_report_ad_account_id"], "alias": "not_null_snapchat_ads__account_report_ad_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "warn", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"severity": "warn"}, "created_at": 1783708222.4243705, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(severity=\"warn\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__account_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__account_report_ad_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__account_report\"\nwhere ad_account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_account_id", "file_key_name": "models.snapchat_ads__account_report", "attached_node": "model.snapchat_ads.snapchat_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_account_id", "model": "{{ get_where_subquery(ref('snapchat_ads__account_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__ad_report_date_day.7c5350c8fe": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__ad_report_date_day", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__ad_report_date_day.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__ad_report_date_day.7c5350c8fe", "fqn": ["snapchat_ads", "not_null_snapchat_ads__ad_report_date_day"], "alias": "not_null_snapchat_ads__ad_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.4268918, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__ad_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__ad_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__ad_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.snapchat_ads__ad_report", "attached_node": "model.snapchat_ads.snapchat_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('snapchat_ads__ad_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__ad_report_ad_id.9000850744": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__ad_report_ad_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__ad_report_ad_id.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__ad_report_ad_id.9000850744", "fqn": ["snapchat_ads", "not_null_snapchat_ads__ad_report_ad_id"], "alias": "not_null_snapchat_ads__ad_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.4294157, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__ad_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__ad_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__ad_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.snapchat_ads__ad_report", "attached_node": "model.snapchat_ads.snapchat_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('snapchat_ads__ad_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__campaign_report_date_day.4e4e31223b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__campaign_report_date_day", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__campaign_report_date_day.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__campaign_report_date_day.4e4e31223b", "fqn": ["snapchat_ads", "not_null_snapchat_ads__campaign_report_date_day"], "alias": "not_null_snapchat_ads__campaign_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.4319096, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__campaign_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__campaign_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.snapchat_ads__campaign_report", "attached_node": "model.snapchat_ads.snapchat_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('snapchat_ads__campaign_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__campaign_report_campaign_id.19fd7135ac": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__campaign_report_campaign_id.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__campaign_report_campaign_id.19fd7135ac", "fqn": ["snapchat_ads", "not_null_snapchat_ads__campaign_report_campaign_id"], "alias": "not_null_snapchat_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.4344954, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__campaign_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.snapchat_ads__campaign_report", "attached_node": "model.snapchat_ads.snapchat_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('snapchat_ads__campaign_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__ad_squad_report_date_day.39118ca639": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__ad_squad_report_date_day", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__ad_squad_report_date_day.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__ad_squad_report_date_day.39118ca639", "fqn": ["snapchat_ads", "not_null_snapchat_ads__ad_squad_report_date_day"], "alias": "not_null_snapchat_ads__ad_squad_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.4369593, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__ad_squad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__ad_squad_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__ad_squad_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__ad_squad_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.snapchat_ads__ad_squad_report", "attached_node": "model.snapchat_ads.snapchat_ads__ad_squad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('snapchat_ads__ad_squad_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__ad_squad_report_ad_squad_id.424c0bbffe": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__ad_squad_report_ad_squad_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__ad_squad_report_ad_squad_id.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__ad_squad_report_ad_squad_id.424c0bbffe", "fqn": ["snapchat_ads", "not_null_snapchat_ads__ad_squad_report_ad_squad_id"], "alias": "not_null_snapchat_ads__ad_squad_report_ad_squad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.4394844, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__ad_squad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__ad_squad_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__ad_squad_report_ad_squad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_squad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__ad_squad_report\"\nwhere ad_squad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_squad_id", "file_key_name": "models.snapchat_ads__ad_squad_report", "attached_node": "model.snapchat_ads.snapchat_ads__ad_squad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_squad_id", "model": "{{ get_where_subquery(ref('snapchat_ads__ad_squad_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__url_report_date_day.bcbe87a7f6": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__url_report_date_day", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__url_report_date_day.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__url_report_date_day.bcbe87a7f6", "fqn": ["snapchat_ads", "not_null_snapchat_ads__url_report_date_day"], "alias": "not_null_snapchat_ads__url_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.4419632, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__url_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__url_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__url_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.snapchat_ads__url_report", "attached_node": "model.snapchat_ads.snapchat_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('snapchat_ads__url_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__url_report_ad_id.ecbdfc0d78": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__url_report_ad_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__url_report_ad_id.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__url_report_ad_id.ecbdfc0d78", "fqn": ["snapchat_ads", "not_null_snapchat_ads__url_report_ad_id"], "alias": "not_null_snapchat_ads__url_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.444473, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__url_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__url_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__url_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.snapchat_ads__url_report", "attached_node": "model.snapchat_ads.snapchat_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('snapchat_ads__url_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__url_report_base_url.15676dc1de": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__url_report_base_url", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__url_report_base_url.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__url_report_base_url.15676dc1de", "fqn": ["snapchat_ads", "not_null_snapchat_ads__url_report_base_url"], "alias": "not_null_snapchat_ads__url_report_base_url", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"enabled": true}, "created_at": 1783708222.4477744, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(enabled=True) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__url_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__url_report_base_url.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect base_url\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__url_report\"\nwhere base_url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "base_url", "file_key_name": "models.snapchat_ads__url_report", "attached_node": "model.snapchat_ads.snapchat_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "base_url", "model": "{{ get_where_subquery(ref('snapchat_ads__url_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_date_day.b946d6ae47": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__campaign_country_report_date_day", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__campaign_country_report_date_day.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_date_day.b946d6ae47", "fqn": ["snapchat_ads", "not_null_snapchat_ads__campaign_country_report_date_day"], "alias": "not_null_snapchat_ads__campaign_country_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.4503396, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__campaign_country_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__campaign_country_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_country_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.snapchat_ads__campaign_country_report", "attached_node": "model.snapchat_ads.snapchat_ads__campaign_country_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('snapchat_ads__campaign_country_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_campaign_id.33fe016201": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__campaign_country_report_campaign_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__campaign_country_report_campaign_id.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_campaign_id.33fe016201", "fqn": ["snapchat_ads", "not_null_snapchat_ads__campaign_country_report_campaign_id"], "alias": "not_null_snapchat_ads__campaign_country_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.4528103, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__campaign_country_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__campaign_country_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_country_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.snapchat_ads__campaign_country_report", "attached_node": "model.snapchat_ads.snapchat_ads__campaign_country_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('snapchat_ads__campaign_country_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_country.332a585832": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__campaign_country_report_country", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__campaign_country_report_country.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_country.332a585832", "fqn": ["snapchat_ads", "not_null_snapchat_ads__campaign_country_report_country"], "alias": "not_null_snapchat_ads__campaign_country_report_country", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.4552932, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__campaign_country_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__campaign_country_report_country.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect country\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_country_report\"\nwhere country is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "country", "file_key_name": "models.snapchat_ads__campaign_country_report", "attached_node": "model.snapchat_ads.snapchat_ads__campaign_country_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "country", "model": "{{ get_where_subquery(ref('snapchat_ads__campaign_country_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_date_day.3d3ad303c4": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__campaign_region_report_date_day", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__campaign_region_report_date_day.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_date_day.3d3ad303c4", "fqn": ["snapchat_ads", "not_null_snapchat_ads__campaign_region_report_date_day"], "alias": "not_null_snapchat_ads__campaign_region_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.457873, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__campaign_region_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__campaign_region_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__campaign_region_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_region_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.snapchat_ads__campaign_region_report", "attached_node": "model.snapchat_ads.snapchat_ads__campaign_region_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('snapchat_ads__campaign_region_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_campaign_id.9b92b4f074": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__campaign_region_report_campaign_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__campaign_region_report_campaign_id.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_campaign_id.9b92b4f074", "fqn": ["snapchat_ads", "not_null_snapchat_ads__campaign_region_report_campaign_id"], "alias": "not_null_snapchat_ads__campaign_region_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.4603863, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__campaign_region_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__campaign_region_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__campaign_region_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_region_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.snapchat_ads__campaign_region_report", "attached_node": "model.snapchat_ads.snapchat_ads__campaign_region_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('snapchat_ads__campaign_region_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_region.041579919a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_snapchat_ads__campaign_region_report_region", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_snapchat_ads__campaign_region_report_region.sql", "original_file_path": "models/snapchat.yml", "unique_id": "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_region.041579919a", "fqn": ["snapchat_ads", "not_null_snapchat_ads__campaign_region_report_region"], "alias": "not_null_snapchat_ads__campaign_region_report_region", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.4628625, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "snapchat_ads__campaign_region_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.snapchat_ads__campaign_region_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/snapchat.yml/not_null_snapchat_ads__campaign_region_report_region.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect region\nfrom \"postgres\".\"public_ad_reporting_dev\".\"snapchat_ads__campaign_region_report\"\nwhere region is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "region", "file_key_name": "models.snapchat_ads__campaign_region_report", "attached_node": "model.snapchat_ads.snapchat_ads__campaign_region_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "region", "model": "{{ get_where_subquery(ref('snapchat_ads__campaign_region_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__ad_account_history__fivetran_synced.2d5dd77824": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__ad_account_history__fivetran_synced", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__ad_account_history__fivetran_synced.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__ad_account_history__fivetran_synced.2d5dd77824", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__ad_account_history__fivetran_synced"], "alias": "not_null_stg_snapchat_ads__ad_account_history__fivetran_synced", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.5174026, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_account_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__ad_account_history__fivetran_synced.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect _fivetran_synced\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_account_history\"\nwhere _fivetran_synced is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "_fivetran_synced", "file_key_name": "models.stg_snapchat_ads__ad_account_history", "attached_node": "model.snapchat_ads.stg_snapchat_ads__ad_account_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_fivetran_synced", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__ad_account_history')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__ad_account_history_ad_account_id.426d71d605": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__ad_account_history_ad_account_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__ad_account_history_ad_account_id.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__ad_account_history_ad_account_id.426d71d605", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__ad_account_history_ad_account_id"], "alias": "not_null_stg_snapchat_ads__ad_account_history_ad_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.5199552, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_account_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__ad_account_history_ad_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_account_history\"\nwhere ad_account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_account_id", "file_key_name": "models.stg_snapchat_ads__ad_account_history", "attached_node": "model.snapchat_ads.stg_snapchat_ads__ad_account_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_account_id", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__ad_account_history')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__ad_history__fivetran_synced.1607c70fda": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__ad_history__fivetran_synced", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__ad_history__fivetran_synced.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__ad_history__fivetran_synced.1607c70fda", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__ad_history__fivetran_synced"], "alias": "not_null_stg_snapchat_ads__ad_history__fivetran_synced", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.522471, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__ad_history__fivetran_synced.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect _fivetran_synced\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_history\"\nwhere _fivetran_synced is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "_fivetran_synced", "file_key_name": "models.stg_snapchat_ads__ad_history", "attached_node": "model.snapchat_ads.stg_snapchat_ads__ad_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_fivetran_synced", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__ad_history')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__ad_history_ad_id.e9d367fd15": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__ad_history_ad_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__ad_history_ad_id.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__ad_history_ad_id.e9d367fd15", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__ad_history_ad_id"], "alias": "not_null_stg_snapchat_ads__ad_history_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.5249379, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__ad_history_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_history\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_snapchat_ads__ad_history", "attached_node": "model.snapchat_ads.stg_snapchat_ads__ad_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__ad_history')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__ad_hourly_report_ad_id.7e763de19d": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__ad_hourly_report_ad_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__ad_hourly_report_ad_id.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__ad_hourly_report_ad_id.7e763de19d", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__ad_hourly_report_ad_id"], "alias": "not_null_stg_snapchat_ads__ad_hourly_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.5275092, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_hourly_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_hourly_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__ad_hourly_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_hourly_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_snapchat_ads__ad_hourly_report", "attached_node": "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__ad_hourly_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__ad_hourly_report_date_hour.666cda1cd7": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__ad_hourly_report_date_hour", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__ad_hourly_report_date_hour.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__ad_hourly_report_date_hour.666cda1cd7", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__ad_hourly_report_date_hour"], "alias": "not_null_stg_snapchat_ads__ad_hourly_report_date_hour", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.5299652, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_hourly_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_hourly_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__ad_hourly_report_date_hour.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_hour\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_hourly_report\"\nwhere date_hour is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_hour", "file_key_name": "models.stg_snapchat_ads__ad_hourly_report", "attached_node": "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_hour", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__ad_hourly_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_history__fivetran_synced.7ed7d105ae": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__ad_squad_history__fivetran_synced", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__ad_squad_history__fivetran_synced.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_history__fivetran_synced.7ed7d105ae", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__ad_squad_history__fivetran_synced"], "alias": "not_null_stg_snapchat_ads__ad_squad_history__fivetran_synced", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.5324595, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_squad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__ad_squad_history__fivetran_synced.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect _fivetran_synced\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_history\"\nwhere _fivetran_synced is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "_fivetran_synced", "file_key_name": "models.stg_snapchat_ads__ad_squad_history", "attached_node": "model.snapchat_ads.stg_snapchat_ads__ad_squad_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_fivetran_synced", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__ad_squad_history')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_history_ad_squad_id.71c7122278": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__ad_squad_history_ad_squad_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__ad_squad_history_ad_squad_id.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_history_ad_squad_id.71c7122278", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__ad_squad_history_ad_squad_id"], "alias": "not_null_stg_snapchat_ads__ad_squad_history_ad_squad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.5349042, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_squad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__ad_squad_history_ad_squad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_squad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_history\"\nwhere ad_squad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_squad_id", "file_key_name": "models.stg_snapchat_ads__ad_squad_history", "attached_node": "model.snapchat_ads.stg_snapchat_ads__ad_squad_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_squad_id", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__ad_squad_history')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_hourly_report_ad_squad_id.ab16aa72c9": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__ad_squad_hourly_report_ad_squad_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__ad_squad_hourly_report_ad_squad_id.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_hourly_report_ad_squad_id.ab16aa72c9", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__ad_squad_hourly_report_ad_squad_id"], "alias": "not_null_stg_snapchat_ads__ad_squad_hourly_report_ad_squad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.5374966, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_squad_hourly_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__ad_squad_hourly_report_ad_squad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_squad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_hourly_report\"\nwhere ad_squad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_squad_id", "file_key_name": "models.stg_snapchat_ads__ad_squad_hourly_report", "attached_node": "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_squad_id", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__ad_squad_hourly_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_hourly_report_date_hour.6f0b63a9cb": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__ad_squad_hourly_report_date_hour", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__ad_squad_hourly_report_date_hour.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_hourly_report_date_hour.6f0b63a9cb", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__ad_squad_hourly_report_date_hour"], "alias": "not_null_stg_snapchat_ads__ad_squad_hourly_report_date_hour", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.539952, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__ad_squad_hourly_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__ad_squad_hourly_report_date_hour.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_hour\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__ad_squad_hourly_report\"\nwhere date_hour is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_hour", "file_key_name": "models.stg_snapchat_ads__ad_squad_hourly_report", "attached_node": "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_hour", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__ad_squad_hourly_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_history__fivetran_synced.55bc48b3ec": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__campaign_history__fivetran_synced", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__campaign_history__fivetran_synced.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_history__fivetran_synced.55bc48b3ec", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__campaign_history__fivetran_synced"], "alias": "not_null_stg_snapchat_ads__campaign_history__fivetran_synced", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.5424385, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__campaign_history__fivetran_synced.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect _fivetran_synced\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_history\"\nwhere _fivetran_synced is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "_fivetran_synced", "file_key_name": "models.stg_snapchat_ads__campaign_history", "attached_node": "model.snapchat_ads.stg_snapchat_ads__campaign_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_fivetran_synced", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__campaign_history')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_history_campaign_id.f74a0fb8c0": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__campaign_history_campaign_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__campaign_history_campaign_id.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_history_campaign_id.f74a0fb8c0", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__campaign_history_campaign_id"], "alias": "not_null_stg_snapchat_ads__campaign_history_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.5449095, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__campaign_history_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_history\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_snapchat_ads__campaign_history", "attached_node": "model.snapchat_ads.stg_snapchat_ads__campaign_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__campaign_history')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_hourly_report_campaign_id.f255c38a3e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__campaign_hourly_report_campaign_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__campaign_hourly_report_campaign_id.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_hourly_report_campaign_id.f255c38a3e", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__campaign_hourly_report_campaign_id"], "alias": "not_null_stg_snapchat_ads__campaign_hourly_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.547515, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_hourly_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__campaign_hourly_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_hourly_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_snapchat_ads__campaign_hourly_report", "attached_node": "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__campaign_hourly_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_hourly_report_date_hour.0bc4218ac8": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__campaign_hourly_report_date_hour", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__campaign_hourly_report_date_hour.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_hourly_report_date_hour.0bc4218ac8", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__campaign_hourly_report_date_hour"], "alias": "not_null_stg_snapchat_ads__campaign_hourly_report_date_hour", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.5502644, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_hourly_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__campaign_hourly_report_date_hour.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_hour\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_hourly_report\"\nwhere date_hour is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_hour", "file_key_name": "models.stg_snapchat_ads__campaign_hourly_report", "attached_node": "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_hour", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__campaign_hourly_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__creative_history__fivetran_synced.b9c95b4380": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__creative_history__fivetran_synced", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__creative_history__fivetran_synced.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__creative_history__fivetran_synced.b9c95b4380", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__creative_history__fivetran_synced"], "alias": "not_null_stg_snapchat_ads__creative_history__fivetran_synced", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.5528016, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__creative_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__creative_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__creative_history__fivetran_synced.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect _fivetran_synced\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_history\"\nwhere _fivetran_synced is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "_fivetran_synced", "file_key_name": "models.stg_snapchat_ads__creative_history", "attached_node": "model.snapchat_ads.stg_snapchat_ads__creative_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_fivetran_synced", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__creative_history')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__creative_history_creative_id.09c83690f4": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__creative_history_creative_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__creative_history_creative_id.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__creative_history_creative_id.09c83690f4", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__creative_history_creative_id"], "alias": "not_null_stg_snapchat_ads__creative_history_creative_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.5553162, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__creative_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__creative_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__creative_history_creative_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect creative_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_history\"\nwhere creative_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "creative_id", "file_key_name": "models.stg_snapchat_ads__creative_history", "attached_node": "model.snapchat_ads.stg_snapchat_ads__creative_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "creative_id", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__creative_history')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__creative_url_tag_history_creative_id.7ff6bb9c1b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__creative_url_tag_history_creative_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__creative_url_tag_history_creative_id.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__creative_url_tag_history_creative_id.7ff6bb9c1b", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__creative_url_tag_history_creative_id"], "alias": "not_null_stg_snapchat_ads__creative_url_tag_history_creative_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.5577934, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__creative_url_tag_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__creative_url_tag_history_creative_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect creative_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__creative_url_tag_history\"\nwhere creative_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "creative_id", "file_key_name": "models.stg_snapchat_ads__creative_url_tag_history", "attached_node": "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "creative_id", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__creative_url_tag_history')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_campaign_id.1b07be54fe": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__campaign_geo_country_daily_report_campaign_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__cam_c531bc4cfae6ac93ea3b7f505e38db6f.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_campaign_id.1b07be54fe", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__campaign_geo_country_daily_report_campaign_id"], "alias": "not_null_stg_snapchat_ads__cam_c531bc4cfae6ac93ea3b7f505e38db6f", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_snapchat_ads__cam_c531bc4cfae6ac93ea3b7f505e38db6f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_snapchat_ads__cam_c531bc4cfae6ac93ea3b7f505e38db6f"}, "created_at": 1783708222.5604086, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_snapchat_ads__cam_c531bc4cfae6ac93ea3b7f505e38db6f\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_geo_country_daily_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__cam_c531bc4cfae6ac93ea3b7f505e38db6f.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_geo_country_daily_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_snapchat_ads__campaign_geo_country_daily_report", "attached_node": "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__campaign_geo_country_daily_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_country.34db53b159": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__campaign_geo_country_daily_report_country", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__cam_409ae8ef0a41706ac936bf4e5d45ebc0.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_country.34db53b159", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__campaign_geo_country_daily_report_country"], "alias": "not_null_stg_snapchat_ads__cam_409ae8ef0a41706ac936bf4e5d45ebc0", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_snapchat_ads__cam_409ae8ef0a41706ac936bf4e5d45ebc0", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_snapchat_ads__cam_409ae8ef0a41706ac936bf4e5d45ebc0"}, "created_at": 1783708222.5628831, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_snapchat_ads__cam_409ae8ef0a41706ac936bf4e5d45ebc0\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_geo_country_daily_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__cam_409ae8ef0a41706ac936bf4e5d45ebc0.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect country\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_geo_country_daily_report\"\nwhere country is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "country", "file_key_name": "models.stg_snapchat_ads__campaign_geo_country_daily_report", "attached_node": "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "country", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__campaign_geo_country_daily_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_date_day.d3d7dd7af1": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__campaign_geo_country_daily_report_date_day", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__cam_95bf2c1bccb5bb16d3b01c6875d4e36b.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_date_day.d3d7dd7af1", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__campaign_geo_country_daily_report_date_day"], "alias": "not_null_stg_snapchat_ads__cam_95bf2c1bccb5bb16d3b01c6875d4e36b", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_snapchat_ads__cam_95bf2c1bccb5bb16d3b01c6875d4e36b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_snapchat_ads__cam_95bf2c1bccb5bb16d3b01c6875d4e36b"}, "created_at": 1783708222.565416, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_snapchat_ads__cam_95bf2c1bccb5bb16d3b01c6875d4e36b\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_geo_country_daily_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__cam_95bf2c1bccb5bb16d3b01c6875d4e36b.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_geo_country_daily_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_snapchat_ads__campaign_geo_country_daily_report", "attached_node": "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__campaign_geo_country_daily_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_campaign_id.99fbccb78d": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__campaign_geo_region_daily_report_campaign_id", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__cam_530712a440410eb91fb3d99e8431a9f8.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_campaign_id.99fbccb78d", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__campaign_geo_region_daily_report_campaign_id"], "alias": "not_null_stg_snapchat_ads__cam_530712a440410eb91fb3d99e8431a9f8", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_snapchat_ads__cam_530712a440410eb91fb3d99e8431a9f8", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_snapchat_ads__cam_530712a440410eb91fb3d99e8431a9f8"}, "created_at": 1783708222.5679076, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_snapchat_ads__cam_530712a440410eb91fb3d99e8431a9f8\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_geo_region_daily_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__cam_530712a440410eb91fb3d99e8431a9f8.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_geo_region_daily_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_snapchat_ads__campaign_geo_region_daily_report", "attached_node": "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__campaign_geo_region_daily_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_region.44327f07bf": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__campaign_geo_region_daily_report_region", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__cam_cf0d460ca2173737e9e44f3e224da27b.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_region.44327f07bf", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__campaign_geo_region_daily_report_region"], "alias": "not_null_stg_snapchat_ads__cam_cf0d460ca2173737e9e44f3e224da27b", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_snapchat_ads__cam_cf0d460ca2173737e9e44f3e224da27b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_snapchat_ads__cam_cf0d460ca2173737e9e44f3e224da27b"}, "created_at": 1783708222.5708017, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_snapchat_ads__cam_cf0d460ca2173737e9e44f3e224da27b\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_geo_region_daily_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__cam_cf0d460ca2173737e9e44f3e224da27b.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect region\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_geo_region_daily_report\"\nwhere region is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "region", "file_key_name": "models.stg_snapchat_ads__campaign_geo_region_daily_report", "attached_node": "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "region", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__campaign_geo_region_daily_report')) }}"}, "namespace": null}}, "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_date_day.eec50e6826": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_snapchat_ads__campaign_geo_region_daily_report_date_day", "resource_type": "test", "package_name": "snapchat_ads", "path": "not_null_stg_snapchat_ads__cam_d9fbe46cdf21c0531cc37d0e0d471c95.sql", "original_file_path": "models/staging/stg_snapchat.yml", "unique_id": "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_date_day.eec50e6826", "fqn": ["snapchat_ads", "staging", "not_null_stg_snapchat_ads__campaign_geo_region_daily_report_date_day"], "alias": "not_null_stg_snapchat_ads__cam_d9fbe46cdf21c0531cc37d0e0d471c95", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_snapchat_ads__cam_d9fbe46cdf21c0531cc37d0e0d471c95", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_snapchat_ads__cam_d9fbe46cdf21c0531cc37d0e0d471c95"}, "created_at": 1783708222.5733306, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_snapchat_ads__cam_d9fbe46cdf21c0531cc37d0e0d471c95\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_snapchat_ads__campaign_geo_region_daily_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report"]}, "compiled_path": "target/compiled/snapchat_ads/models/staging/stg_snapchat.yml/not_null_stg_snapchat_ads__cam_d9fbe46cdf21c0531cc37d0e0d471c95.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_snapchat_ads__campaign_geo_region_daily_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_snapchat_ads__campaign_geo_region_daily_report", "attached_node": "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_snapchat_ads__campaign_geo_region_daily_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__url_report_date_day.b09048037e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__url_report_date_day", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__url_report_date_day.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__url_report_date_day.b09048037e", "fqn": ["pinterest", "not_null_pinterest_ads__url_report_date_day"], "alias": "not_null_pinterest_ads__url_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.6155033, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__url_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__url_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__url_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.pinterest_ads__url_report", "attached_node": "model.pinterest.pinterest_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('pinterest_ads__url_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__url_report_destination_url.0bb7f30502": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__url_report_destination_url", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__url_report_destination_url.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__url_report_destination_url.0bb7f30502", "fqn": ["pinterest", "not_null_pinterest_ads__url_report_destination_url"], "alias": "not_null_pinterest_ads__url_report_destination_url", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"enabled": true}, "created_at": 1783708222.620279, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(enabled=True) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__url_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__url_report_destination_url.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect destination_url\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__url_report\"\nwhere destination_url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "destination_url", "file_key_name": "models.pinterest_ads__url_report", "attached_node": "model.pinterest.pinterest_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "destination_url", "model": "{{ get_where_subquery(ref('pinterest_ads__url_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__url_report_pin_promotion_id.0da711ad6a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__url_report_pin_promotion_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__url_report_pin_promotion_id.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__url_report_pin_promotion_id.0da711ad6a", "fqn": ["pinterest", "not_null_pinterest_ads__url_report_pin_promotion_id"], "alias": "not_null_pinterest_ads__url_report_pin_promotion_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.7246962, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__url_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__url_report_pin_promotion_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect pin_promotion_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__url_report\"\nwhere pin_promotion_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "pin_promotion_id", "file_key_name": "models.pinterest_ads__url_report", "attached_node": "model.pinterest.pinterest_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "pin_promotion_id", "model": "{{ get_where_subquery(ref('pinterest_ads__url_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__ad_group_report_date_day.ed7c27b8a7": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__ad_group_report_date_day", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__ad_group_report_date_day.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__ad_group_report_date_day.ed7c27b8a7", "fqn": ["pinterest", "not_null_pinterest_ads__ad_group_report_date_day"], "alias": "not_null_pinterest_ads__ad_group_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.7273698, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__ad_group_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__ad_group_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__ad_group_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.pinterest_ads__ad_group_report", "attached_node": "model.pinterest.pinterest_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('pinterest_ads__ad_group_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__ad_group_report_ad_group_id.134f9ac6c2": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__ad_group_report_ad_group_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__ad_group_report_ad_group_id.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__ad_group_report_ad_group_id.134f9ac6c2", "fqn": ["pinterest", "not_null_pinterest_ads__ad_group_report_ad_group_id"], "alias": "not_null_pinterest_ads__ad_group_report_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.7299602, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__ad_group_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__ad_group_report_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__ad_group_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.pinterest_ads__ad_group_report", "attached_node": "model.pinterest.pinterest_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('pinterest_ads__ad_group_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__campaign_report_date_day.10ac8272bf": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__campaign_report_date_day", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__campaign_report_date_day.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__campaign_report_date_day.10ac8272bf", "fqn": ["pinterest", "not_null_pinterest_ads__campaign_report_date_day"], "alias": "not_null_pinterest_ads__campaign_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.7324936, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__campaign_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__campaign_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.pinterest_ads__campaign_report", "attached_node": "model.pinterest.pinterest_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('pinterest_ads__campaign_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__campaign_report_campaign_id.8001ea60f2": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__campaign_report_campaign_id.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__campaign_report_campaign_id.8001ea60f2", "fqn": ["pinterest", "not_null_pinterest_ads__campaign_report_campaign_id"], "alias": "not_null_pinterest_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.7350943, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__campaign_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.pinterest_ads__campaign_report", "attached_node": "model.pinterest.pinterest_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('pinterest_ads__campaign_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__advertiser_report_date_day.aedeceeeca": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__advertiser_report_date_day", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__advertiser_report_date_day.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__advertiser_report_date_day.aedeceeeca", "fqn": ["pinterest", "not_null_pinterest_ads__advertiser_report_date_day"], "alias": "not_null_pinterest_ads__advertiser_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.7376235, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__advertiser_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__advertiser_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__advertiser_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__advertiser_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.pinterest_ads__advertiser_report", "attached_node": "model.pinterest.pinterest_ads__advertiser_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('pinterest_ads__advertiser_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__advertiser_report_advertiser_id.13380f0672": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__advertiser_report_advertiser_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__advertiser_report_advertiser_id.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__advertiser_report_advertiser_id.13380f0672", "fqn": ["pinterest", "not_null_pinterest_ads__advertiser_report_advertiser_id"], "alias": "not_null_pinterest_ads__advertiser_report_advertiser_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.7401466, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__advertiser_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__advertiser_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__advertiser_report_advertiser_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect advertiser_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__advertiser_report\"\nwhere advertiser_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "advertiser_id", "file_key_name": "models.pinterest_ads__advertiser_report", "attached_node": "model.pinterest.pinterest_ads__advertiser_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "advertiser_id", "model": "{{ get_where_subquery(ref('pinterest_ads__advertiser_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__keyword_report_date_day.23130e9fba": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__keyword_report_date_day", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__keyword_report_date_day.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__keyword_report_date_day.23130e9fba", "fqn": ["pinterest", "not_null_pinterest_ads__keyword_report_date_day"], "alias": "not_null_pinterest_ads__keyword_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.7426486, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__keyword_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__keyword_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__keyword_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.pinterest_ads__keyword_report", "attached_node": "model.pinterest.pinterest_ads__keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('pinterest_ads__keyword_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__keyword_report_keyword_id.0d73460198": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__keyword_report_keyword_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__keyword_report_keyword_id.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__keyword_report_keyword_id.0d73460198", "fqn": ["pinterest", "not_null_pinterest_ads__keyword_report_keyword_id"], "alias": "not_null_pinterest_ads__keyword_report_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.7452667, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__keyword_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__keyword_report_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__keyword_report\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.pinterest_ads__keyword_report", "attached_node": "model.pinterest.pinterest_ads__keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('pinterest_ads__keyword_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__pin_promotion_report_date_day.3128d28cfd": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__pin_promotion_report_date_day", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__pin_promotion_report_date_day.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__pin_promotion_report_date_day.3128d28cfd", "fqn": ["pinterest", "not_null_pinterest_ads__pin_promotion_report_date_day"], "alias": "not_null_pinterest_ads__pin_promotion_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.7477732, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__pin_promotion_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__pin_promotion_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__pin_promotion_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__pin_promotion_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.pinterest_ads__pin_promotion_report", "attached_node": "model.pinterest.pinterest_ads__pin_promotion_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('pinterest_ads__pin_promotion_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__pin_promotion_report_pin_promotion_id.2540e0a561": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__pin_promotion_report_pin_promotion_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__pin_promotion_report_pin_promotion_id.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__pin_promotion_report_pin_promotion_id.2540e0a561", "fqn": ["pinterest", "not_null_pinterest_ads__pin_promotion_report_pin_promotion_id"], "alias": "not_null_pinterest_ads__pin_promotion_report_pin_promotion_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.750262, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__pin_promotion_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__pin_promotion_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__pin_promotion_report_pin_promotion_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect pin_promotion_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__pin_promotion_report\"\nwhere pin_promotion_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "pin_promotion_id", "file_key_name": "models.pinterest_ads__pin_promotion_report", "attached_node": "model.pinterest.pinterest_ads__pin_promotion_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "pin_promotion_id", "model": "{{ get_where_subquery(ref('pinterest_ads__pin_promotion_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__campaign_country_report_date_day.a9da473d38": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__campaign_country_report_date_day", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__campaign_country_report_date_day.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__campaign_country_report_date_day.a9da473d38", "fqn": ["pinterest", "not_null_pinterest_ads__campaign_country_report_date_day"], "alias": "not_null_pinterest_ads__campaign_country_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.7527373, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__campaign_country_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__campaign_country_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_country_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.pinterest_ads__campaign_country_report", "attached_node": "model.pinterest.pinterest_ads__campaign_country_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('pinterest_ads__campaign_country_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__campaign_country_report_campaign_id.9b1d309d2b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__campaign_country_report_campaign_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__campaign_country_report_campaign_id.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__campaign_country_report_campaign_id.9b1d309d2b", "fqn": ["pinterest", "not_null_pinterest_ads__campaign_country_report_campaign_id"], "alias": "not_null_pinterest_ads__campaign_country_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.7553158, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__campaign_country_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__campaign_country_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_country_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.pinterest_ads__campaign_country_report", "attached_node": "model.pinterest.pinterest_ads__campaign_country_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('pinterest_ads__campaign_country_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__campaign_region_report_date_day.e81588bc6e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__campaign_region_report_date_day", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__campaign_region_report_date_day.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__campaign_region_report_date_day.e81588bc6e", "fqn": ["pinterest", "not_null_pinterest_ads__campaign_region_report_date_day"], "alias": "not_null_pinterest_ads__campaign_region_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.757803, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__campaign_region_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__campaign_region_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__campaign_region_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_region_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.pinterest_ads__campaign_region_report", "attached_node": "model.pinterest.pinterest_ads__campaign_region_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('pinterest_ads__campaign_region_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_pinterest_ads__campaign_region_report_campaign_id.1a64423d71": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_pinterest_ads__campaign_region_report_campaign_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_pinterest_ads__campaign_region_report_campaign_id.sql", "original_file_path": "models/pinterest.yml", "unique_id": "test.pinterest.not_null_pinterest_ads__campaign_region_report_campaign_id.1a64423d71", "fqn": ["pinterest", "not_null_pinterest_ads__campaign_region_report_campaign_id"], "alias": "not_null_pinterest_ads__campaign_region_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.7602963, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "pinterest_ads__campaign_region_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.pinterest_ads__campaign_region_report"]}, "compiled_path": "target/compiled/pinterest/models/pinterest.yml/not_null_pinterest_ads__campaign_region_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"pinterest_ads__campaign_region_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.pinterest_ads__campaign_region_report", "attached_node": "model.pinterest.pinterest_ads__campaign_region_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('pinterest_ads__campaign_region_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__ad_group_history_ad_group_id.220c6220be": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__ad_group_history_ad_group_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__ad_group_history_ad_group_id.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__ad_group_history_ad_group_id.220c6220be", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__ad_group_history_ad_group_id"], "alias": "not_null_stg_pinterest_ads__ad_group_history_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.8134239, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__ad_group_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__ad_group_history"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__ad_group_history_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__ad_group_history\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_pinterest_ads__ad_group_history", "attached_node": "model.pinterest.stg_pinterest_ads__ad_group_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__ad_group_history')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__campaign_history_campaign_id.60cb10d341": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__campaign_history_campaign_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__campaign_history_campaign_id.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__campaign_history_campaign_id.60cb10d341", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__campaign_history_campaign_id"], "alias": "not_null_stg_pinterest_ads__campaign_history_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.8160083, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__campaign_history"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__campaign_history_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_history\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_pinterest_ads__campaign_history", "attached_node": "model.pinterest.stg_pinterest_ads__campaign_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__campaign_history')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_history_pin_promotion_id.171995cd34": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__pin_promotion_history_pin_promotion_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__pi_5cf03dfc3d2615f9d68ae62d55aa2b8f.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_history_pin_promotion_id.171995cd34", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__pin_promotion_history_pin_promotion_id"], "alias": "not_null_stg_pinterest_ads__pi_5cf03dfc3d2615f9d68ae62d55aa2b8f", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_pinterest_ads__pi_5cf03dfc3d2615f9d68ae62d55aa2b8f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_pinterest_ads__pi_5cf03dfc3d2615f9d68ae62d55aa2b8f"}, "created_at": 1783708222.8185773, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_pinterest_ads__pi_5cf03dfc3d2615f9d68ae62d55aa2b8f\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__pin_promotion_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__pin_promotion_history"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__pi_5cf03dfc3d2615f9d68ae62d55aa2b8f.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect pin_promotion_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_history\"\nwhere pin_promotion_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "pin_promotion_id", "file_key_name": "models.stg_pinterest_ads__pin_promotion_history", "attached_node": "model.pinterest.stg_pinterest_ads__pin_promotion_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "pin_promotion_id", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__pin_promotion_history')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_report_date_day.ed272212a1": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__pin_promotion_report_date_day", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__pin_promotion_report_date_day.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_report_date_day.ed272212a1", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__pin_promotion_report_date_day"], "alias": "not_null_stg_pinterest_ads__pin_promotion_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.8211734, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__pin_promotion_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__pin_promotion_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__pin_promotion_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_pinterest_ads__pin_promotion_report", "attached_node": "model.pinterest.stg_pinterest_ads__pin_promotion_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__pin_promotion_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_report_pin_promotion_id.9c3c9f71ab": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__pin_promotion_report_pin_promotion_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__pi_d0985f4b7b2bc6d5ec7f384cc03d6f4b.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_report_pin_promotion_id.9c3c9f71ab", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__pin_promotion_report_pin_promotion_id"], "alias": "not_null_stg_pinterest_ads__pi_d0985f4b7b2bc6d5ec7f384cc03d6f4b", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_pinterest_ads__pi_d0985f4b7b2bc6d5ec7f384cc03d6f4b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_pinterest_ads__pi_d0985f4b7b2bc6d5ec7f384cc03d6f4b"}, "created_at": 1783708222.8236618, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_pinterest_ads__pi_d0985f4b7b2bc6d5ec7f384cc03d6f4b\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__pin_promotion_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__pin_promotion_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__pi_d0985f4b7b2bc6d5ec7f384cc03d6f4b.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect pin_promotion_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__pin_promotion_report\"\nwhere pin_promotion_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "pin_promotion_id", "file_key_name": "models.stg_pinterest_ads__pin_promotion_report", "attached_node": "model.pinterest.stg_pinterest_ads__pin_promotion_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "pin_promotion_id", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__pin_promotion_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__ad_group_report_date_day.80e8904c4c": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__ad_group_report_date_day", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__ad_group_report_date_day.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__ad_group_report_date_day.80e8904c4c", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__ad_group_report_date_day"], "alias": "not_null_stg_pinterest_ads__ad_group_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.8261526, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__ad_group_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__ad_group_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__ad_group_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_pinterest_ads__ad_group_report", "attached_node": "model.pinterest.stg_pinterest_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__ad_group_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__ad_group_report_ad_group_id.bb8cf3c471": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__ad_group_report_ad_group_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__ad_group_report_ad_group_id.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__ad_group_report_ad_group_id.bb8cf3c471", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__ad_group_report_ad_group_id"], "alias": "not_null_stg_pinterest_ads__ad_group_report_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.8286426, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__ad_group_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__ad_group_report_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__ad_group_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_pinterest_ads__ad_group_report", "attached_node": "model.pinterest.stg_pinterest_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__ad_group_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__advertiser_history_advertiser_id.7d24f665fb": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__advertiser_history_advertiser_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__advertiser_history_advertiser_id.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__advertiser_history_advertiser_id.7d24f665fb", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__advertiser_history_advertiser_id"], "alias": "not_null_stg_pinterest_ads__advertiser_history_advertiser_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.8311322, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__advertiser_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__advertiser_history"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__advertiser_history_advertiser_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect advertiser_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_history\"\nwhere advertiser_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "advertiser_id", "file_key_name": "models.stg_pinterest_ads__advertiser_history", "attached_node": "model.pinterest.stg_pinterest_ads__advertiser_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "advertiser_id", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__advertiser_history')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__advertiser_report_date_day.153bd03c95": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__advertiser_report_date_day", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__advertiser_report_date_day.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__advertiser_report_date_day.153bd03c95", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__advertiser_report_date_day"], "alias": "not_null_stg_pinterest_ads__advertiser_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.8337257, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__advertiser_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__advertiser_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__advertiser_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_pinterest_ads__advertiser_report", "attached_node": "model.pinterest.stg_pinterest_ads__advertiser_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__advertiser_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__advertiser_report_advertiser_id.1b16ed73ff": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__advertiser_report_advertiser_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__advertiser_report_advertiser_id.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__advertiser_report_advertiser_id.1b16ed73ff", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__advertiser_report_advertiser_id"], "alias": "not_null_stg_pinterest_ads__advertiser_report_advertiser_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.8362174, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__advertiser_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__advertiser_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__advertiser_report_advertiser_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect advertiser_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__advertiser_report\"\nwhere advertiser_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "advertiser_id", "file_key_name": "models.stg_pinterest_ads__advertiser_report", "attached_node": "model.pinterest.stg_pinterest_ads__advertiser_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "advertiser_id", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__advertiser_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__campaign_report_date_day.7ef5fb1238": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__campaign_report_date_day", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__campaign_report_date_day.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__campaign_report_date_day.7ef5fb1238", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__campaign_report_date_day"], "alias": "not_null_stg_pinterest_ads__campaign_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.838699, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__campaign_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__campaign_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_pinterest_ads__campaign_report", "attached_node": "model.pinterest.stg_pinterest_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__campaign_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__campaign_report_campaign_id.a287eba0fc": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__campaign_report_campaign_id.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__campaign_report_campaign_id.a287eba0fc", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__campaign_report_campaign_id"], "alias": "not_null_stg_pinterest_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.841182, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__campaign_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_pinterest_ads__campaign_report", "attached_node": "model.pinterest.stg_pinterest_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__campaign_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__keyword_history_keyword_id.246889377a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__keyword_history_keyword_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__keyword_history_keyword_id.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__keyword_history_keyword_id.246889377a", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__keyword_history_keyword_id"], "alias": "not_null_stg_pinterest_ads__keyword_history_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.843763, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__keyword_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__keyword_history"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__keyword_history_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__keyword_history\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.stg_pinterest_ads__keyword_history", "attached_node": "model.pinterest.stg_pinterest_ads__keyword_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__keyword_history')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__keyword_report_date_day.9937216300": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__keyword_report_date_day", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__keyword_report_date_day.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__keyword_report_date_day.9937216300", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__keyword_report_date_day"], "alias": "not_null_stg_pinterest_ads__keyword_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.8462958, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__keyword_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__keyword_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__keyword_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_pinterest_ads__keyword_report", "attached_node": "model.pinterest.stg_pinterest_ads__keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__keyword_report')) }}"}, "namespace": null}}, "test.pinterest.not_null_stg_pinterest_ads__keyword_report_keyword_id.5f00679c48": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_pinterest_ads__keyword_report_keyword_id", "resource_type": "test", "package_name": "pinterest", "path": "not_null_stg_pinterest_ads__keyword_report_keyword_id.sql", "original_file_path": "models/staging/stg_pinterest_ads.yml", "unique_id": "test.pinterest.not_null_stg_pinterest_ads__keyword_report_keyword_id.5f00679c48", "fqn": ["pinterest", "staging", "not_null_stg_pinterest_ads__keyword_report_keyword_id"], "alias": "not_null_stg_pinterest_ads__keyword_report_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.8487709, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_pinterest_ads__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.pinterest.stg_pinterest_ads__keyword_report"]}, "compiled_path": "target/compiled/pinterest/models/staging/stg_pinterest_ads.yml/not_null_stg_pinterest_ads__keyword_report_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_pinterest_ads__keyword_report\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.stg_pinterest_ads__keyword_report", "attached_node": "model.pinterest.stg_pinterest_ads__keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('stg_pinterest_ads__keyword_report')) }}"}, "namespace": null}}, "test.google_ads.not_null_google_ads__url_report_base_url.e3578c0f72": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_google_ads__url_report_base_url", "resource_type": "test", "package_name": "google_ads", "path": "not_null_google_ads__url_report_base_url.sql", "original_file_path": "models/google_ads.yml", "unique_id": "test.google_ads.not_null_google_ads__url_report_base_url.e3578c0f72", "fqn": ["google_ads", "not_null_google_ads__url_report_base_url"], "alias": "not_null_google_ads__url_report_base_url", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"enabled": true}, "created_at": 1783708222.898252, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(enabled=True) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.google_ads__url_report"]}, "compiled_path": "target/compiled/google_ads/models/google_ads.yml/not_null_google_ads__url_report_base_url.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect base_url\nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__url_report\"\nwhere base_url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "base_url", "file_key_name": "models.google_ads__url_report", "attached_node": "model.google_ads.google_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "base_url", "model": "{{ get_where_subquery(ref('google_ads__url_report')) }}"}, "namespace": null}}, "test.google_ads.not_null_google_ads__account_report_account_id.abb0985422": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_google_ads__account_report_account_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_google_ads__account_report_account_id.sql", "original_file_path": "models/google_ads.yml", "unique_id": "test.google_ads.not_null_google_ads__account_report_account_id.abb0985422", "fqn": ["google_ads", "not_null_google_ads__account_report_account_id"], "alias": "not_null_google_ads__account_report_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.9009013, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.google_ads__account_report"]}, "compiled_path": "target/compiled/google_ads/models/google_ads.yml/not_null_google_ads__account_report_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__account_report\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.google_ads__account_report", "attached_node": "model.google_ads.google_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('google_ads__account_report')) }}"}, "namespace": null}}, "test.google_ads.not_null_google_ads__ad_group_report_ad_group_id.c186523c0c": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_google_ads__ad_group_report_ad_group_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_google_ads__ad_group_report_ad_group_id.sql", "original_file_path": "models/google_ads.yml", "unique_id": "test.google_ads.not_null_google_ads__ad_group_report_ad_group_id.c186523c0c", "fqn": ["google_ads", "not_null_google_ads__ad_group_report_ad_group_id"], "alias": "not_null_google_ads__ad_group_report_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.9034343, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.google_ads__ad_group_report"]}, "compiled_path": "target/compiled/google_ads/models/google_ads.yml/not_null_google_ads__ad_group_report_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__ad_group_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.google_ads__ad_group_report", "attached_node": "model.google_ads.google_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('google_ads__ad_group_report')) }}"}, "namespace": null}}, "test.google_ads.not_null_google_ads__ad_report_ad_id.7bd6a287ad": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_google_ads__ad_report_ad_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_google_ads__ad_report_ad_id.sql", "original_file_path": "models/google_ads.yml", "unique_id": "test.google_ads.not_null_google_ads__ad_report_ad_id.7bd6a287ad", "fqn": ["google_ads", "not_null_google_ads__ad_report_ad_id"], "alias": "not_null_google_ads__ad_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.9059129, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.google_ads__ad_report"]}, "compiled_path": "target/compiled/google_ads/models/google_ads.yml/not_null_google_ads__ad_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__ad_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.google_ads__ad_report", "attached_node": "model.google_ads.google_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('google_ads__ad_report')) }}"}, "namespace": null}}, "test.google_ads.not_null_google_ads__campaign_report_campaign_id.cc6694fa0e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_google_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_google_ads__campaign_report_campaign_id.sql", "original_file_path": "models/google_ads.yml", "unique_id": "test.google_ads.not_null_google_ads__campaign_report_campaign_id.cc6694fa0e", "fqn": ["google_ads", "not_null_google_ads__campaign_report_campaign_id"], "alias": "not_null_google_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.908445, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.google_ads__campaign_report"]}, "compiled_path": "target/compiled/google_ads/models/google_ads.yml/not_null_google_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.google_ads__campaign_report", "attached_node": "model.google_ads.google_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('google_ads__campaign_report')) }}"}, "namespace": null}}, "test.google_ads.not_null_google_ads__keyword_report_criterion_id.4cab66a055": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_google_ads__keyword_report_criterion_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_google_ads__keyword_report_criterion_id.sql", "original_file_path": "models/google_ads.yml", "unique_id": "test.google_ads.not_null_google_ads__keyword_report_criterion_id.4cab66a055", "fqn": ["google_ads", "not_null_google_ads__keyword_report_criterion_id"], "alias": "not_null_google_ads__keyword_report_criterion_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.9110055, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.google_ads__keyword_report"]}, "compiled_path": "target/compiled/google_ads/models/google_ads.yml/not_null_google_ads__keyword_report_criterion_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect criterion_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__keyword_report\"\nwhere criterion_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "criterion_id", "file_key_name": "models.google_ads__keyword_report", "attached_node": "model.google_ads.google_ads__keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "criterion_id", "model": "{{ get_where_subquery(ref('google_ads__keyword_report')) }}"}, "namespace": null}}, "test.google_ads.unique_google_ads__campaign_bid_modifiers_report_bid_modifier_report_key.d68443174a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "unique_google_ads__campaign_bid_modifiers_report_bid_modifier_report_key", "resource_type": "test", "package_name": "google_ads", "path": "unique_google_ads__campaign_bi_91883b1465a6678a36c4106b02a8ae1e.sql", "original_file_path": "models/google_ads.yml", "unique_id": "test.google_ads.unique_google_ads__campaign_bid_modifiers_report_bid_modifier_report_key.d68443174a", "fqn": ["google_ads", "unique_google_ads__campaign_bid_modifiers_report_bid_modifier_report_key"], "alias": "unique_google_ads__campaign_bi_91883b1465a6678a36c4106b02a8ae1e", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "unique_google_ads__campaign_bi_91883b1465a6678a36c4106b02a8ae1e", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "unique_google_ads__campaign_bi_91883b1465a6678a36c4106b02a8ae1e"}, "created_at": 1783708222.9135556, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}{{ config(alias=\"unique_google_ads__campaign_bi_91883b1465a6678a36c4106b02a8ae1e\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__campaign_bid_modifiers_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.google_ads__campaign_bid_modifiers_report"]}, "compiled_path": "target/compiled/google_ads/models/google_ads.yml/unique_google_ads__campaign_bi_91883b1465a6678a36c4106b02a8ae1e.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n bid_modifier_report_key as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__campaign_bid_modifiers_report\"\nwhere bid_modifier_report_key is not null\ngroup by bid_modifier_report_key\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "bid_modifier_report_key", "file_key_name": "models.google_ads__campaign_bid_modifiers_report", "attached_node": "model.google_ads.google_ads__campaign_bid_modifiers_report", "test_metadata": {"name": "unique", "kwargs": {"column_name": "bid_modifier_report_key", "model": "{{ get_where_subquery(ref('google_ads__campaign_bid_modifiers_report')) }}"}, "namespace": null}}, "test.google_ads.not_null_google_ads__campaign_bid_modifiers_report_bid_modifier_report_key.746ae8cfa3": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_google_ads__campaign_bid_modifiers_report_bid_modifier_report_key", "resource_type": "test", "package_name": "google_ads", "path": "not_null_google_ads__campaign__7623adbff6c2c83eee0c27709c46d7ac.sql", "original_file_path": "models/google_ads.yml", "unique_id": "test.google_ads.not_null_google_ads__campaign_bid_modifiers_report_bid_modifier_report_key.746ae8cfa3", "fqn": ["google_ads", "not_null_google_ads__campaign_bid_modifiers_report_bid_modifier_report_key"], "alias": "not_null_google_ads__campaign__7623adbff6c2c83eee0c27709c46d7ac", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_google_ads__campaign__7623adbff6c2c83eee0c27709c46d7ac", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_google_ads__campaign__7623adbff6c2c83eee0c27709c46d7ac"}, "created_at": 1783708222.916022, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_google_ads__campaign__7623adbff6c2c83eee0c27709c46d7ac\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__campaign_bid_modifiers_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.google_ads__campaign_bid_modifiers_report"]}, "compiled_path": "target/compiled/google_ads/models/google_ads.yml/not_null_google_ads__campaign__7623adbff6c2c83eee0c27709c46d7ac.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect bid_modifier_report_key\nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__campaign_bid_modifiers_report\"\nwhere bid_modifier_report_key is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "bid_modifier_report_key", "file_key_name": "models.google_ads__campaign_bid_modifiers_report", "attached_node": "model.google_ads.google_ads__campaign_bid_modifiers_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "bid_modifier_report_key", "model": "{{ get_where_subquery(ref('google_ads__campaign_bid_modifiers_report')) }}"}, "namespace": null}}, "test.google_ads.not_null_google_ads__campaign_bid_modifiers_report_campaign_id.68d212d025": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_google_ads__campaign_bid_modifiers_report_campaign_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_google_ads__campaign_bid_modifiers_report_campaign_id.sql", "original_file_path": "models/google_ads.yml", "unique_id": "test.google_ads.not_null_google_ads__campaign_bid_modifiers_report_campaign_id.68d212d025", "fqn": ["google_ads", "not_null_google_ads__campaign_bid_modifiers_report_campaign_id"], "alias": "not_null_google_ads__campaign_bid_modifiers_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.9185097, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__campaign_bid_modifiers_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.google_ads__campaign_bid_modifiers_report"]}, "compiled_path": "target/compiled/google_ads/models/google_ads.yml/not_null_google_ads__campaign_bid_modifiers_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__campaign_bid_modifiers_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.google_ads__campaign_bid_modifiers_report", "attached_node": "model.google_ads.google_ads__campaign_bid_modifiers_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('google_ads__campaign_bid_modifiers_report')) }}"}, "namespace": null}}, "test.google_ads.unique_google_ads__campaign_budget_diagnostics_report_budget_diagnostics_report_key.ca90f632f4": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "unique_google_ads__campaign_budget_diagnostics_report_budget_diagnostics_report_key", "resource_type": "test", "package_name": "google_ads", "path": "unique_google_ads__campaign_bu_1ddc6b7b2afd945b69982edba695581f.sql", "original_file_path": "models/google_ads.yml", "unique_id": "test.google_ads.unique_google_ads__campaign_budget_diagnostics_report_budget_diagnostics_report_key.ca90f632f4", "fqn": ["google_ads", "unique_google_ads__campaign_budget_diagnostics_report_budget_diagnostics_report_key"], "alias": "unique_google_ads__campaign_bu_1ddc6b7b2afd945b69982edba695581f", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "unique_google_ads__campaign_bu_1ddc6b7b2afd945b69982edba695581f", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "unique_google_ads__campaign_bu_1ddc6b7b2afd945b69982edba695581f"}, "created_at": 1783708222.920994, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}{{ config(alias=\"unique_google_ads__campaign_bu_1ddc6b7b2afd945b69982edba695581f\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__campaign_budget_diagnostics_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.google_ads__campaign_budget_diagnostics_report"]}, "compiled_path": "target/compiled/google_ads/models/google_ads.yml/unique_google_ads__campaign_bu_1ddc6b7b2afd945b69982edba695581f.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n budget_diagnostics_report_key as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__campaign_budget_diagnostics_report\"\nwhere budget_diagnostics_report_key is not null\ngroup by budget_diagnostics_report_key\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "budget_diagnostics_report_key", "file_key_name": "models.google_ads__campaign_budget_diagnostics_report", "attached_node": "model.google_ads.google_ads__campaign_budget_diagnostics_report", "test_metadata": {"name": "unique", "kwargs": {"column_name": "budget_diagnostics_report_key", "model": "{{ get_where_subquery(ref('google_ads__campaign_budget_diagnostics_report')) }}"}, "namespace": null}}, "test.google_ads.not_null_google_ads__campaign_budget_diagnostics_report_budget_diagnostics_report_key.c2c4d80aab": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_google_ads__campaign_budget_diagnostics_report_budget_diagnostics_report_key", "resource_type": "test", "package_name": "google_ads", "path": "not_null_google_ads__campaign__c82c9250f20cdabf740824419677e5af.sql", "original_file_path": "models/google_ads.yml", "unique_id": "test.google_ads.not_null_google_ads__campaign_budget_diagnostics_report_budget_diagnostics_report_key.c2c4d80aab", "fqn": ["google_ads", "not_null_google_ads__campaign_budget_diagnostics_report_budget_diagnostics_report_key"], "alias": "not_null_google_ads__campaign__c82c9250f20cdabf740824419677e5af", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_google_ads__campaign__c82c9250f20cdabf740824419677e5af", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_google_ads__campaign__c82c9250f20cdabf740824419677e5af"}, "created_at": 1783708222.9236248, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_google_ads__campaign__c82c9250f20cdabf740824419677e5af\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__campaign_budget_diagnostics_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.google_ads__campaign_budget_diagnostics_report"]}, "compiled_path": "target/compiled/google_ads/models/google_ads.yml/not_null_google_ads__campaign__c82c9250f20cdabf740824419677e5af.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect budget_diagnostics_report_key\nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__campaign_budget_diagnostics_report\"\nwhere budget_diagnostics_report_key is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "budget_diagnostics_report_key", "file_key_name": "models.google_ads__campaign_budget_diagnostics_report", "attached_node": "model.google_ads.google_ads__campaign_budget_diagnostics_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "budget_diagnostics_report_key", "model": "{{ get_where_subquery(ref('google_ads__campaign_budget_diagnostics_report')) }}"}, "namespace": null}}, "test.google_ads.not_null_google_ads__campaign_budget_diagnostics_report_campaign_id.9a579bd702": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_google_ads__campaign_budget_diagnostics_report_campaign_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_google_ads__campaign__f0d04e6e07a495e7a3b44b3343e487e2.sql", "original_file_path": "models/google_ads.yml", "unique_id": "test.google_ads.not_null_google_ads__campaign_budget_diagnostics_report_campaign_id.9a579bd702", "fqn": ["google_ads", "not_null_google_ads__campaign_budget_diagnostics_report_campaign_id"], "alias": "not_null_google_ads__campaign__f0d04e6e07a495e7a3b44b3343e487e2", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_google_ads__campaign__f0d04e6e07a495e7a3b44b3343e487e2", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_google_ads__campaign__f0d04e6e07a495e7a3b44b3343e487e2"}, "created_at": 1783708222.926134, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_google_ads__campaign__f0d04e6e07a495e7a3b44b3343e487e2\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "google_ads__campaign_budget_diagnostics_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.google_ads__campaign_budget_diagnostics_report"]}, "compiled_path": "target/compiled/google_ads/models/google_ads.yml/not_null_google_ads__campaign__f0d04e6e07a495e7a3b44b3343e487e2.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"google_ads__campaign_budget_diagnostics_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.google_ads__campaign_budget_diagnostics_report", "attached_node": "model.google_ads.google_ads__campaign_budget_diagnostics_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('google_ads__campaign_budget_diagnostics_report')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__account_history_account_id.5ca373f51f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__account_history_account_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__account_history_account_id.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__account_history_account_id.5ca373f51f", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__account_history_account_id"], "alias": "not_null_stg_google_ads__account_history_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.9524841, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__account_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__account_history_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_history\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.stg_google_ads__account_history", "attached_node": "model.google_ads.stg_google_ads__account_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('stg_google_ads__account_history')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__ad_group_history_ad_group_id.f6c7c939be": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__ad_group_history_ad_group_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__ad_group_history_ad_group_id.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__ad_group_history_ad_group_id.f6c7c939be", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__ad_group_history_ad_group_id"], "alias": "not_null_stg_google_ads__ad_group_history_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.9551878, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_group_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__ad_group_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__ad_group_history_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_history\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_google_ads__ad_group_history", "attached_node": "model.google_ads.stg_google_ads__ad_group_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_google_ads__ad_group_history')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__ad_history_ad_id.8c23c38248": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__ad_history_ad_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__ad_history_ad_id.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__ad_history_ad_id.8c23c38248", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__ad_history_ad_id"], "alias": "not_null_stg_google_ads__ad_history_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.9577105, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__ad_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__ad_history_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_history\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_google_ads__ad_history", "attached_node": "model.google_ads.stg_google_ads__ad_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_google_ads__ad_history')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__ad_stats_date_day.9a43c0fce4": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__ad_stats_date_day", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__ad_stats_date_day.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__ad_stats_date_day.9a43c0fce4", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__ad_stats_date_day"], "alias": "not_null_stg_google_ads__ad_stats_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.9602273, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_stats", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__ad_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__ad_stats_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_stats\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_google_ads__ad_stats", "attached_node": "model.google_ads.stg_google_ads__ad_stats", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_google_ads__ad_stats')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__ad_stats_ad_id.2612d83cc8": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__ad_stats_ad_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__ad_stats_ad_id.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__ad_stats_ad_id.2612d83cc8", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__ad_stats_ad_id"], "alias": "not_null_stg_google_ads__ad_stats_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.962878, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_stats", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__ad_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__ad_stats_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_stats\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_google_ads__ad_stats", "attached_node": "model.google_ads.stg_google_ads__ad_stats", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_google_ads__ad_stats')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__campaign_history_campaign_id.fa0c825e75": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__campaign_history_campaign_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__campaign_history_campaign_id.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__campaign_history_campaign_id.fa0c825e75", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__campaign_history_campaign_id"], "alias": "not_null_stg_google_ads__campaign_history_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.965528, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__campaign_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__campaign_history_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_history\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_google_ads__campaign_history", "attached_node": "model.google_ads.stg_google_ads__campaign_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_google_ads__campaign_history')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__ad_group_criterion_history_criterion_id.7a0a8b8476": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__ad_group_criterion_history_criterion_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__ad_gr_fa51ec93a9a1e739108966cace6ed031.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__ad_group_criterion_history_criterion_id.7a0a8b8476", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__ad_group_criterion_history_criterion_id"], "alias": "not_null_stg_google_ads__ad_gr_fa51ec93a9a1e739108966cace6ed031", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_google_ads__ad_gr_fa51ec93a9a1e739108966cace6ed031", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_google_ads__ad_gr_fa51ec93a9a1e739108966cace6ed031"}, "created_at": 1783708222.9680398, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_google_ads__ad_gr_fa51ec93a9a1e739108966cace6ed031\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_group_criterion_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__ad_group_criterion_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__ad_gr_fa51ec93a9a1e739108966cace6ed031.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect criterion_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_criterion_history\"\nwhere criterion_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "criterion_id", "file_key_name": "models.stg_google_ads__ad_group_criterion_history", "attached_node": "model.google_ads.stg_google_ads__ad_group_criterion_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "criterion_id", "model": "{{ get_where_subquery(ref('stg_google_ads__ad_group_criterion_history')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__ad_group_stats_date_day.3c6a221786": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__ad_group_stats_date_day", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__ad_group_stats_date_day.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__ad_group_stats_date_day.3c6a221786", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__ad_group_stats_date_day"], "alias": "not_null_stg_google_ads__ad_group_stats_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.970563, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_group_stats", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__ad_group_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__ad_group_stats_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_stats\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_google_ads__ad_group_stats", "attached_node": "model.google_ads.stg_google_ads__ad_group_stats", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_google_ads__ad_group_stats')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__ad_group_stats_ad_group_id.a8d430f077": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__ad_group_stats_ad_group_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__ad_group_stats_ad_group_id.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__ad_group_stats_ad_group_id.a8d430f077", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__ad_group_stats_ad_group_id"], "alias": "not_null_stg_google_ads__ad_group_stats_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.973114, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__ad_group_stats", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__ad_group_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__ad_group_stats_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__ad_group_stats\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_google_ads__ad_group_stats", "attached_node": "model.google_ads.stg_google_ads__ad_group_stats", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_google_ads__ad_group_stats')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__campaign_stats_date_day.dc097fd76b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__campaign_stats_date_day", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__campaign_stats_date_day.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__campaign_stats_date_day.dc097fd76b", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__campaign_stats_date_day"], "alias": "not_null_stg_google_ads__campaign_stats_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.975719, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_stats", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__campaign_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__campaign_stats_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_stats\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_google_ads__campaign_stats", "attached_node": "model.google_ads.stg_google_ads__campaign_stats", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_google_ads__campaign_stats')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__campaign_stats_campaign_id.11587fa10f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__campaign_stats_campaign_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__campaign_stats_campaign_id.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__campaign_stats_campaign_id.11587fa10f", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__campaign_stats_campaign_id"], "alias": "not_null_stg_google_ads__campaign_stats_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.9782445, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_stats", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__campaign_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__campaign_stats_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_stats\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_google_ads__campaign_stats", "attached_node": "model.google_ads.stg_google_ads__campaign_stats", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_google_ads__campaign_stats')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__keyword_stats_date_day.a9da72f74d": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__keyword_stats_date_day", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__keyword_stats_date_day.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__keyword_stats_date_day.a9da72f74d", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__keyword_stats_date_day"], "alias": "not_null_stg_google_ads__keyword_stats_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.980749, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__keyword_stats", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__keyword_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__keyword_stats_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__keyword_stats\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_google_ads__keyword_stats", "attached_node": "model.google_ads.stg_google_ads__keyword_stats", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_google_ads__keyword_stats')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__keyword_stats_keyword_id.f0945d6cf0": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__keyword_stats_keyword_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__keyword_stats_keyword_id.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__keyword_stats_keyword_id.f0945d6cf0", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__keyword_stats_keyword_id"], "alias": "not_null_stg_google_ads__keyword_stats_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.983257, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__keyword_stats", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__keyword_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__keyword_stats_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__keyword_stats\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.stg_google_ads__keyword_stats", "attached_node": "model.google_ads.stg_google_ads__keyword_stats", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('stg_google_ads__keyword_stats')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__account_stats_account_id.2a9da5417b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__account_stats_account_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__account_stats_account_id.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__account_stats_account_id.2a9da5417b", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__account_stats_account_id"], "alias": "not_null_stg_google_ads__account_stats_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.9857924, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__account_stats", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__account_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__account_stats_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_stats\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.stg_google_ads__account_stats", "attached_node": "model.google_ads.stg_google_ads__account_stats", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('stg_google_ads__account_stats')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__account_stats_date_day.57ac8772d5": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__account_stats_date_day", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__account_stats_date_day.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__account_stats_date_day.57ac8772d5", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__account_stats_date_day"], "alias": "not_null_stg_google_ads__account_stats_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.9884644, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__account_stats", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__account_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__account_stats_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__account_stats\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_google_ads__account_stats", "attached_node": "model.google_ads.stg_google_ads__account_stats", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_google_ads__account_stats')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__search_term_keyword_stats_date_day.3ff55abd88": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__search_term_keyword_stats_date_day", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__search_term_keyword_stats_date_day.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__search_term_keyword_stats_date_day.3ff55abd88", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__search_term_keyword_stats_date_day"], "alias": "not_null_stg_google_ads__search_term_keyword_stats_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.9909801, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__search_term_keyword_stats", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__search_term_keyword_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__search_term_keyword_stats_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__search_term_keyword_stats\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_google_ads__search_term_keyword_stats", "attached_node": "model.google_ads.stg_google_ads__search_term_keyword_stats", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_google_ads__search_term_keyword_stats')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__search_term_keyword_stats_search_term_id.0019238ba2": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__search_term_keyword_stats_search_term_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__searc_9f4ce7ddcf9a513878be3f94abd0ade5.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__search_term_keyword_stats_search_term_id.0019238ba2", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__search_term_keyword_stats_search_term_id"], "alias": "not_null_stg_google_ads__searc_9f4ce7ddcf9a513878be3f94abd0ade5", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_google_ads__searc_9f4ce7ddcf9a513878be3f94abd0ade5", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_google_ads__searc_9f4ce7ddcf9a513878be3f94abd0ade5"}, "created_at": 1783708222.9935112, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_google_ads__searc_9f4ce7ddcf9a513878be3f94abd0ade5\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__search_term_keyword_stats", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__search_term_keyword_stats"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__searc_9f4ce7ddcf9a513878be3f94abd0ade5.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect search_term_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__search_term_keyword_stats\"\nwhere search_term_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "search_term_id", "file_key_name": "models.stg_google_ads__search_term_keyword_stats", "attached_node": "model.google_ads.stg_google_ads__search_term_keyword_stats", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "search_term_id", "model": "{{ get_where_subquery(ref('stg_google_ads__search_term_keyword_stats')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__campaign_bid_modifier_history_campaign_id.c7e1e11f33": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__campaign_bid_modifier_history_campaign_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__campa_1f2e9490d197c28f3463cea8a54acb04.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__campaign_bid_modifier_history_campaign_id.c7e1e11f33", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__campaign_bid_modifier_history_campaign_id"], "alias": "not_null_stg_google_ads__campa_1f2e9490d197c28f3463cea8a54acb04", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_google_ads__campa_1f2e9490d197c28f3463cea8a54acb04", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_google_ads__campa_1f2e9490d197c28f3463cea8a54acb04"}, "created_at": 1783708222.9959862, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_google_ads__campa_1f2e9490d197c28f3463cea8a54acb04\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_bid_modifier_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__campaign_bid_modifier_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__campa_1f2e9490d197c28f3463cea8a54acb04.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_bid_modifier_history\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_google_ads__campaign_bid_modifier_history", "attached_node": "model.google_ads.stg_google_ads__campaign_bid_modifier_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_google_ads__campaign_bid_modifier_history')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__campaign_budget_history_campaign_id.730c3d8025": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__campaign_budget_history_campaign_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__campaign_budget_history_campaign_id.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__campaign_budget_history_campaign_id.730c3d8025", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__campaign_budget_history_campaign_id"], "alias": "not_null_stg_google_ads__campaign_budget_history_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708222.9985821, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_budget_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__campaign_budget_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__campaign_budget_history_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_budget_history\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_google_ads__campaign_budget_history", "attached_node": "model.google_ads.stg_google_ads__campaign_budget_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_google_ads__campaign_budget_history')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__campaign_criterion_history_criterion_id.ade9d1fdbd": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__campaign_criterion_history_criterion_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__campa_07090dc61c9469df9efaefd00736d6f8.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__campaign_criterion_history_criterion_id.ade9d1fdbd", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__campaign_criterion_history_criterion_id"], "alias": "not_null_stg_google_ads__campa_07090dc61c9469df9efaefd00736d6f8", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_google_ads__campa_07090dc61c9469df9efaefd00736d6f8", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_google_ads__campa_07090dc61c9469df9efaefd00736d6f8"}, "created_at": 1783708223.0010896, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_google_ads__campa_07090dc61c9469df9efaefd00736d6f8\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_criterion_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__campaign_criterion_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__campa_07090dc61c9469df9efaefd00736d6f8.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect criterion_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_criterion_history\"\nwhere criterion_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "criterion_id", "file_key_name": "models.stg_google_ads__campaign_criterion_history", "attached_node": "model.google_ads.stg_google_ads__campaign_criterion_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "criterion_id", "model": "{{ get_where_subquery(ref('stg_google_ads__campaign_criterion_history')) }}"}, "namespace": null}}, "test.google_ads.not_null_stg_google_ads__campaign_bidding_strategy_history_campaign_id.7efbcd0291": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_google_ads__campaign_bidding_strategy_history_campaign_id", "resource_type": "test", "package_name": "google_ads", "path": "not_null_stg_google_ads__campa_9334ed317d472e4773126e30548eff86.sql", "original_file_path": "models/staging/stg_google_ads.yml", "unique_id": "test.google_ads.not_null_stg_google_ads__campaign_bidding_strategy_history_campaign_id.7efbcd0291", "fqn": ["google_ads", "staging", "not_null_stg_google_ads__campaign_bidding_strategy_history_campaign_id"], "alias": "not_null_stg_google_ads__campa_9334ed317d472e4773126e30548eff86", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_google_ads__campa_9334ed317d472e4773126e30548eff86", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_google_ads__campa_9334ed317d472e4773126e30548eff86"}, "created_at": 1783708223.0036929, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_google_ads__campa_9334ed317d472e4773126e30548eff86\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_google_ads__campaign_bidding_strategy_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.google_ads.stg_google_ads__campaign_bidding_strategy_history"]}, "compiled_path": "target/compiled/google_ads/models/staging/stg_google_ads.yml/not_null_stg_google_ads__campa_9334ed317d472e4773126e30548eff86.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_google_ads__campaign_bidding_strategy_history\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_google_ads__campaign_bidding_strategy_history", "attached_node": "model.google_ads.stg_google_ads__campaign_bidding_strategy_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_google_ads__campaign_bidding_strategy_history')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_amazon_ads__account_report_profile_id.87fb8dbe66": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_amazon_ads__account_report_profile_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_amazon_ads__account_report_profile_id.sql", "original_file_path": "models/amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_amazon_ads__account_report_profile_id.87fb8dbe66", "fqn": ["amazon_ads", "not_null_amazon_ads__account_report_profile_id"], "alias": "not_null_amazon_ads__account_report_profile_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.0878239, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "amazon_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.amazon_ads__account_report"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads.yml/not_null_amazon_ads__account_report_profile_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect profile_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__account_report\"\nwhere profile_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "profile_id", "file_key_name": "models.amazon_ads__account_report", "attached_node": "model.amazon_ads.amazon_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "profile_id", "model": "{{ get_where_subquery(ref('amazon_ads__account_report')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_amazon_ads__account_report_account_id.83adef7061": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_amazon_ads__account_report_account_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_amazon_ads__account_report_account_id.sql", "original_file_path": "models/amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_amazon_ads__account_report_account_id.83adef7061", "fqn": ["amazon_ads", "not_null_amazon_ads__account_report_account_id"], "alias": "not_null_amazon_ads__account_report_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.0905411, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "amazon_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.amazon_ads__account_report"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads.yml/not_null_amazon_ads__account_report_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__account_report\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.amazon_ads__account_report", "attached_node": "model.amazon_ads.amazon_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('amazon_ads__account_report')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_amazon_ads__ad_group_report_ad_group_id.8a23dc123a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_amazon_ads__ad_group_report_ad_group_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_amazon_ads__ad_group_report_ad_group_id.sql", "original_file_path": "models/amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_amazon_ads__ad_group_report_ad_group_id.8a23dc123a", "fqn": ["amazon_ads", "not_null_amazon_ads__ad_group_report_ad_group_id"], "alias": "not_null_amazon_ads__ad_group_report_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.0930445, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "amazon_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.amazon_ads__ad_group_report"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads.yml/not_null_amazon_ads__ad_group_report_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__ad_group_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.amazon_ads__ad_group_report", "attached_node": "model.amazon_ads.amazon_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('amazon_ads__ad_group_report')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_amazon_ads__ad_report_ad_id.93728159b3": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_amazon_ads__ad_report_ad_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_amazon_ads__ad_report_ad_id.sql", "original_file_path": "models/amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_amazon_ads__ad_report_ad_id.93728159b3", "fqn": ["amazon_ads", "not_null_amazon_ads__ad_report_ad_id"], "alias": "not_null_amazon_ads__ad_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.0955982, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "amazon_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.amazon_ads__ad_report"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads.yml/not_null_amazon_ads__ad_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__ad_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.amazon_ads__ad_report", "attached_node": "model.amazon_ads.amazon_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('amazon_ads__ad_report')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_amazon_ads__campaign_report_campaign_id.a9cabadd7c": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_amazon_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_amazon_ads__campaign_report_campaign_id.sql", "original_file_path": "models/amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_amazon_ads__campaign_report_campaign_id.a9cabadd7c", "fqn": ["amazon_ads", "not_null_amazon_ads__campaign_report_campaign_id"], "alias": "not_null_amazon_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.0981314, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "amazon_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.amazon_ads__campaign_report"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads.yml/not_null_amazon_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.amazon_ads__campaign_report", "attached_node": "model.amazon_ads.amazon_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('amazon_ads__campaign_report')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_amazon_ads__portfolio_report_profile_id.1a910441c6": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_amazon_ads__portfolio_report_profile_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_amazon_ads__portfolio_report_profile_id.sql", "original_file_path": "models/amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_amazon_ads__portfolio_report_profile_id.1a910441c6", "fqn": ["amazon_ads", "not_null_amazon_ads__portfolio_report_profile_id"], "alias": "not_null_amazon_ads__portfolio_report_profile_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.10073, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "amazon_ads__portfolio_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.amazon_ads__portfolio_report"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads.yml/not_null_amazon_ads__portfolio_report_profile_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect profile_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__portfolio_report\"\nwhere profile_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "profile_id", "file_key_name": "models.amazon_ads__portfolio_report", "attached_node": "model.amazon_ads.amazon_ads__portfolio_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "profile_id", "model": "{{ get_where_subquery(ref('amazon_ads__portfolio_report')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_amazon_ads__keyword_report_keyword_id.303f680e4a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_amazon_ads__keyword_report_keyword_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_amazon_ads__keyword_report_keyword_id.sql", "original_file_path": "models/amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_amazon_ads__keyword_report_keyword_id.303f680e4a", "fqn": ["amazon_ads", "not_null_amazon_ads__keyword_report_keyword_id"], "alias": "not_null_amazon_ads__keyword_report_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.103229, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "amazon_ads__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.amazon_ads__keyword_report"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads.yml/not_null_amazon_ads__keyword_report_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__keyword_report\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.amazon_ads__keyword_report", "attached_node": "model.amazon_ads.amazon_ads__keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('amazon_ads__keyword_report')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_amazon_ads__search_report_search_term.3c23d4658a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_amazon_ads__search_report_search_term", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_amazon_ads__search_report_search_term.sql", "original_file_path": "models/amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_amazon_ads__search_report_search_term.3c23d4658a", "fqn": ["amazon_ads", "not_null_amazon_ads__search_report_search_term"], "alias": "not_null_amazon_ads__search_report_search_term", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.1057105, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "amazon_ads__search_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.amazon_ads__search_report"]}, "compiled_path": "target/compiled/amazon_ads/models/amazon_ads.yml/not_null_amazon_ads__search_report_search_term.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect search_term\nfrom \"postgres\".\"public_ad_reporting_dev\".\"amazon_ads__search_report\"\nwhere search_term is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "search_term", "file_key_name": "models.amazon_ads__search_report", "attached_node": "model.amazon_ads.amazon_ads__search_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "search_term", "model": "{{ get_where_subquery(ref('amazon_ads__search_report')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_stg_amazon_ads__ad_group_history_ad_group_id.6b524b990b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_amazon_ads__ad_group_history_ad_group_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_stg_amazon_ads__ad_group_history_ad_group_id.sql", "original_file_path": "models/staging/stg_amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_stg_amazon_ads__ad_group_history_ad_group_id.6b524b990b", "fqn": ["amazon_ads", "staging", "not_null_stg_amazon_ads__ad_group_history_ad_group_id"], "alias": "not_null_stg_amazon_ads__ad_group_history_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.1488588, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__ad_group_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.stg_amazon_ads__ad_group_history"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads.yml/not_null_stg_amazon_ads__ad_group_history_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__ad_group_history\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_amazon_ads__ad_group_history", "attached_node": "model.amazon_ads.stg_amazon_ads__ad_group_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_amazon_ads__ad_group_history')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_stg_amazon_ads__ad_group_level_report_ad_group_id.ee4ef641c3": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_amazon_ads__ad_group_level_report_ad_group_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_stg_amazon_ads__ad_group_level_report_ad_group_id.sql", "original_file_path": "models/staging/stg_amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_stg_amazon_ads__ad_group_level_report_ad_group_id.ee4ef641c3", "fqn": ["amazon_ads", "staging", "not_null_stg_amazon_ads__ad_group_level_report_ad_group_id"], "alias": "not_null_stg_amazon_ads__ad_group_level_report_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.1515155, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__ad_group_level_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.stg_amazon_ads__ad_group_level_report"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads.yml/not_null_stg_amazon_ads__ad_group_level_report_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__ad_group_level_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_amazon_ads__ad_group_level_report", "attached_node": "model.amazon_ads.stg_amazon_ads__ad_group_level_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_amazon_ads__ad_group_level_report')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_stg_amazon_ads__advertised_product_report_ad_id.307c6bc8d4": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_amazon_ads__advertised_product_report_ad_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_stg_amazon_ads__advertised_product_report_ad_id.sql", "original_file_path": "models/staging/stg_amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_stg_amazon_ads__advertised_product_report_ad_id.307c6bc8d4", "fqn": ["amazon_ads", "staging", "not_null_stg_amazon_ads__advertised_product_report_ad_id"], "alias": "not_null_stg_amazon_ads__advertised_product_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.154013, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__advertised_product_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.stg_amazon_ads__advertised_product_report"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads.yml/not_null_stg_amazon_ads__advertised_product_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__advertised_product_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_amazon_ads__advertised_product_report", "attached_node": "model.amazon_ads.stg_amazon_ads__advertised_product_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_amazon_ads__advertised_product_report')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_stg_amazon_ads__campaign_history_campaign_id.49e395897c": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_amazon_ads__campaign_history_campaign_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_stg_amazon_ads__campaign_history_campaign_id.sql", "original_file_path": "models/staging/stg_amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_stg_amazon_ads__campaign_history_campaign_id.49e395897c", "fqn": ["amazon_ads", "staging", "not_null_stg_amazon_ads__campaign_history_campaign_id"], "alias": "not_null_stg_amazon_ads__campaign_history_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.1565707, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.stg_amazon_ads__campaign_history"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads.yml/not_null_stg_amazon_ads__campaign_history_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_history\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_amazon_ads__campaign_history", "attached_node": "model.amazon_ads.stg_amazon_ads__campaign_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_amazon_ads__campaign_history')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_stg_amazon_ads__campaign_level_report_campaign_id.1efec68194": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_amazon_ads__campaign_level_report_campaign_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_stg_amazon_ads__campaign_level_report_campaign_id.sql", "original_file_path": "models/staging/stg_amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_stg_amazon_ads__campaign_level_report_campaign_id.1efec68194", "fqn": ["amazon_ads", "staging", "not_null_stg_amazon_ads__campaign_level_report_campaign_id"], "alias": "not_null_stg_amazon_ads__campaign_level_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.15904, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__campaign_level_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.stg_amazon_ads__campaign_level_report"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads.yml/not_null_stg_amazon_ads__campaign_level_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__campaign_level_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_amazon_ads__campaign_level_report", "attached_node": "model.amazon_ads.stg_amazon_ads__campaign_level_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_amazon_ads__campaign_level_report')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_stg_amazon_ads__keyword_history_keyword_id.f21f6add6e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_amazon_ads__keyword_history_keyword_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_stg_amazon_ads__keyword_history_keyword_id.sql", "original_file_path": "models/staging/stg_amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_stg_amazon_ads__keyword_history_keyword_id.f21f6add6e", "fqn": ["amazon_ads", "staging", "not_null_stg_amazon_ads__keyword_history_keyword_id"], "alias": "not_null_stg_amazon_ads__keyword_history_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.1616359, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__keyword_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.stg_amazon_ads__keyword_history"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads.yml/not_null_stg_amazon_ads__keyword_history_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__keyword_history\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.stg_amazon_ads__keyword_history", "attached_node": "model.amazon_ads.stg_amazon_ads__keyword_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('stg_amazon_ads__keyword_history')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_stg_amazon_ads__portfolio_history_portfolio_id.e22bb2ba02": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_amazon_ads__portfolio_history_portfolio_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_stg_amazon_ads__portfolio_history_portfolio_id.sql", "original_file_path": "models/staging/stg_amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_stg_amazon_ads__portfolio_history_portfolio_id.e22bb2ba02", "fqn": ["amazon_ads", "staging", "not_null_stg_amazon_ads__portfolio_history_portfolio_id"], "alias": "not_null_stg_amazon_ads__portfolio_history_portfolio_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.1641486, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__portfolio_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.stg_amazon_ads__portfolio_history"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads.yml/not_null_stg_amazon_ads__portfolio_history_portfolio_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect portfolio_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__portfolio_history\"\nwhere portfolio_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "portfolio_id", "file_key_name": "models.stg_amazon_ads__portfolio_history", "attached_node": "model.amazon_ads.stg_amazon_ads__portfolio_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "portfolio_id", "model": "{{ get_where_subquery(ref('stg_amazon_ads__portfolio_history')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_stg_amazon_ads__product_ad_history_ad_id.8744ab1cd8": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_amazon_ads__product_ad_history_ad_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_stg_amazon_ads__product_ad_history_ad_id.sql", "original_file_path": "models/staging/stg_amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_stg_amazon_ads__product_ad_history_ad_id.8744ab1cd8", "fqn": ["amazon_ads", "staging", "not_null_stg_amazon_ads__product_ad_history_ad_id"], "alias": "not_null_stg_amazon_ads__product_ad_history_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.1666293, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__product_ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.stg_amazon_ads__product_ad_history"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads.yml/not_null_stg_amazon_ads__product_ad_history_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__product_ad_history\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_amazon_ads__product_ad_history", "attached_node": "model.amazon_ads.stg_amazon_ads__product_ad_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_amazon_ads__product_ad_history')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_stg_amazon_ads__profile_profile_id.bd192c102b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_amazon_ads__profile_profile_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_stg_amazon_ads__profile_profile_id.sql", "original_file_path": "models/staging/stg_amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_stg_amazon_ads__profile_profile_id.bd192c102b", "fqn": ["amazon_ads", "staging", "not_null_stg_amazon_ads__profile_profile_id"], "alias": "not_null_stg_amazon_ads__profile_profile_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.1692202, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__profile", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.stg_amazon_ads__profile"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads.yml/not_null_stg_amazon_ads__profile_profile_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect profile_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__profile\"\nwhere profile_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "profile_id", "file_key_name": "models.stg_amazon_ads__profile", "attached_node": "model.amazon_ads.stg_amazon_ads__profile", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "profile_id", "model": "{{ get_where_subquery(ref('stg_amazon_ads__profile')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_stg_amazon_ads__targeting_keyword_report_keyword_id.101a3299d7": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_amazon_ads__targeting_keyword_report_keyword_id", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_stg_amazon_ads__targeting_keyword_report_keyword_id.sql", "original_file_path": "models/staging/stg_amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_stg_amazon_ads__targeting_keyword_report_keyword_id.101a3299d7", "fqn": ["amazon_ads", "staging", "not_null_stg_amazon_ads__targeting_keyword_report_keyword_id"], "alias": "not_null_stg_amazon_ads__targeting_keyword_report_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.1718397, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__targeting_keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.stg_amazon_ads__targeting_keyword_report"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads.yml/not_null_stg_amazon_ads__targeting_keyword_report_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__targeting_keyword_report\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.stg_amazon_ads__targeting_keyword_report", "attached_node": "model.amazon_ads.stg_amazon_ads__targeting_keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('stg_amazon_ads__targeting_keyword_report')) }}"}, "namespace": null}}, "test.amazon_ads.not_null_stg_amazon_ads__search_term_ad_keyword_report_search_term.ef04af3b06": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_amazon_ads__search_term_ad_keyword_report_search_term", "resource_type": "test", "package_name": "amazon_ads", "path": "not_null_stg_amazon_ads__searc_f003e4b73838d347c57dd6506254bcfe.sql", "original_file_path": "models/staging/stg_amazon_ads.yml", "unique_id": "test.amazon_ads.not_null_stg_amazon_ads__search_term_ad_keyword_report_search_term.ef04af3b06", "fqn": ["amazon_ads", "staging", "not_null_stg_amazon_ads__search_term_ad_keyword_report_search_term"], "alias": "not_null_stg_amazon_ads__searc_f003e4b73838d347c57dd6506254bcfe", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_amazon_ads__searc_f003e4b73838d347c57dd6506254bcfe", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_amazon_ads__searc_f003e4b73838d347c57dd6506254bcfe"}, "created_at": 1783708223.1743724, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_amazon_ads__searc_f003e4b73838d347c57dd6506254bcfe\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_amazon_ads__search_term_ad_keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report"]}, "compiled_path": "target/compiled/amazon_ads/models/staging/stg_amazon_ads.yml/not_null_stg_amazon_ads__searc_f003e4b73838d347c57dd6506254bcfe.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect search_term\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_amazon_ads__search_term_ad_keyword_report\"\nwhere search_term is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "search_term", "file_key_name": "models.stg_amazon_ads__search_term_ad_keyword_report", "attached_node": "model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "search_term", "model": "{{ get_where_subquery(ref('stg_amazon_ads__search_term_ad_keyword_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__campaign_report_campaign_id.03b1c451b8": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__campaign_report_campaign_id.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__campaign_report_campaign_id.03b1c451b8", "fqn": ["twitter_ads", "not_null_twitter_ads__campaign_report_campaign_id"], "alias": "not_null_twitter_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.2267754, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__campaign_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.twitter_ads__campaign_report", "attached_node": "model.twitter_ads.twitter_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('twitter_ads__campaign_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__campaign_report_date_day.2b30b279b0": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__campaign_report_date_day", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__campaign_report_date_day.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__campaign_report_date_day.2b30b279b0", "fqn": ["twitter_ads", "not_null_twitter_ads__campaign_report_date_day"], "alias": "not_null_twitter_ads__campaign_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.2294629, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__campaign_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__campaign_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.twitter_ads__campaign_report", "attached_node": "model.twitter_ads.twitter_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('twitter_ads__campaign_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__campaign_report_placement.c66d252e82": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__campaign_report_placement", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__campaign_report_placement.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__campaign_report_placement.c66d252e82", "fqn": ["twitter_ads", "not_null_twitter_ads__campaign_report_placement"], "alias": "not_null_twitter_ads__campaign_report_placement", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.2320483, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__campaign_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__campaign_report_placement.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect placement\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_report\"\nwhere placement is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "placement", "file_key_name": "models.twitter_ads__campaign_report", "attached_node": "model.twitter_ads.twitter_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "placement", "model": "{{ get_where_subquery(ref('twitter_ads__campaign_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__line_item_report_date_day.86c934e8ce": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__line_item_report_date_day", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__line_item_report_date_day.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__line_item_report_date_day.86c934e8ce", "fqn": ["twitter_ads", "not_null_twitter_ads__line_item_report_date_day"], "alias": "not_null_twitter_ads__line_item_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.2345936, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__line_item_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__line_item_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__line_item_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__line_item_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.twitter_ads__line_item_report", "attached_node": "model.twitter_ads.twitter_ads__line_item_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('twitter_ads__line_item_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__line_item_report_line_item_id.0462d58211": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__line_item_report_line_item_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__line_item_report_line_item_id.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__line_item_report_line_item_id.0462d58211", "fqn": ["twitter_ads", "not_null_twitter_ads__line_item_report_line_item_id"], "alias": "not_null_twitter_ads__line_item_report_line_item_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.2371085, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__line_item_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__line_item_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__line_item_report_line_item_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect line_item_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__line_item_report\"\nwhere line_item_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "line_item_id", "file_key_name": "models.twitter_ads__line_item_report", "attached_node": "model.twitter_ads.twitter_ads__line_item_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "line_item_id", "model": "{{ get_where_subquery(ref('twitter_ads__line_item_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__line_item_report_placement.f103369312": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__line_item_report_placement", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__line_item_report_placement.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__line_item_report_placement.f103369312", "fqn": ["twitter_ads", "not_null_twitter_ads__line_item_report_placement"], "alias": "not_null_twitter_ads__line_item_report_placement", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.2396078, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__line_item_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__line_item_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__line_item_report_placement.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect placement\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__line_item_report\"\nwhere placement is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "placement", "file_key_name": "models.twitter_ads__line_item_report", "attached_node": "model.twitter_ads.twitter_ads__line_item_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "placement", "model": "{{ get_where_subquery(ref('twitter_ads__line_item_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__account_report_date_day.84896c5846": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__account_report_date_day", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__account_report_date_day.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__account_report_date_day.84896c5846", "fqn": ["twitter_ads", "not_null_twitter_ads__account_report_date_day"], "alias": "not_null_twitter_ads__account_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.242489, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__account_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__account_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__account_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.twitter_ads__account_report", "attached_node": "model.twitter_ads.twitter_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('twitter_ads__account_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__account_report_placement.157dcb6194": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__account_report_placement", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__account_report_placement.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__account_report_placement.157dcb6194", "fqn": ["twitter_ads", "not_null_twitter_ads__account_report_placement"], "alias": "not_null_twitter_ads__account_report_placement", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.2449632, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__account_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__account_report_placement.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect placement\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__account_report\"\nwhere placement is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "placement", "file_key_name": "models.twitter_ads__account_report", "attached_node": "model.twitter_ads.twitter_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "placement", "model": "{{ get_where_subquery(ref('twitter_ads__account_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__account_report_account_id.90d5808908": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__account_report_account_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__account_report_account_id.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__account_report_account_id.90d5808908", "fqn": ["twitter_ads", "not_null_twitter_ads__account_report_account_id"], "alias": "not_null_twitter_ads__account_report_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.247462, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__account_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__account_report_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__account_report\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.twitter_ads__account_report", "attached_node": "model.twitter_ads.twitter_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('twitter_ads__account_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__keyword_report_date_day.e0ce90c1ec": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__keyword_report_date_day", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__keyword_report_date_day.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__keyword_report_date_day.e0ce90c1ec", "fqn": ["twitter_ads", "not_null_twitter_ads__keyword_report_date_day"], "alias": "not_null_twitter_ads__keyword_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.2499554, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__keyword_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__keyword_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__keyword_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.twitter_ads__keyword_report", "attached_node": "model.twitter_ads.twitter_ads__keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('twitter_ads__keyword_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__keyword_report_keyword_id.91efa0a538": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__keyword_report_keyword_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__keyword_report_keyword_id.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__keyword_report_keyword_id.91efa0a538", "fqn": ["twitter_ads", "not_null_twitter_ads__keyword_report_keyword_id"], "alias": "not_null_twitter_ads__keyword_report_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.2524905, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__keyword_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__keyword_report_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__keyword_report\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.twitter_ads__keyword_report", "attached_node": "model.twitter_ads.twitter_ads__keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('twitter_ads__keyword_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__promoted_tweet_report_placement.d89c9b27e5": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__promoted_tweet_report_placement", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__promoted_tweet_report_placement.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__promoted_tweet_report_placement.d89c9b27e5", "fqn": ["twitter_ads", "not_null_twitter_ads__promoted_tweet_report_placement"], "alias": "not_null_twitter_ads__promoted_tweet_report_placement", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.2551208, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__promoted_tweet_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__promoted_tweet_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__promoted_tweet_report_placement.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect placement\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__promoted_tweet_report\"\nwhere placement is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "placement", "file_key_name": "models.twitter_ads__promoted_tweet_report", "attached_node": "model.twitter_ads.twitter_ads__promoted_tweet_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "placement", "model": "{{ get_where_subquery(ref('twitter_ads__promoted_tweet_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__promoted_tweet_report_promoted_tweet_id.5df08e154e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__promoted_tweet_report_promoted_tweet_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__promoted_tweet_report_promoted_tweet_id.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__promoted_tweet_report_promoted_tweet_id.5df08e154e", "fqn": ["twitter_ads", "not_null_twitter_ads__promoted_tweet_report_promoted_tweet_id"], "alias": "not_null_twitter_ads__promoted_tweet_report_promoted_tweet_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.2576072, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__promoted_tweet_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__promoted_tweet_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__promoted_tweet_report_promoted_tweet_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect promoted_tweet_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__promoted_tweet_report\"\nwhere promoted_tweet_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "promoted_tweet_id", "file_key_name": "models.twitter_ads__promoted_tweet_report", "attached_node": "model.twitter_ads.twitter_ads__promoted_tweet_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "promoted_tweet_id", "model": "{{ get_where_subquery(ref('twitter_ads__promoted_tweet_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__url_report_date_day.33fcb7e04b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__url_report_date_day", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__url_report_date_day.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__url_report_date_day.33fcb7e04b", "fqn": ["twitter_ads", "not_null_twitter_ads__url_report_date_day"], "alias": "not_null_twitter_ads__url_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.2601123, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__url_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__url_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__url_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.twitter_ads__url_report", "attached_node": "model.twitter_ads.twitter_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('twitter_ads__url_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__url_report_placement.92ca3b192e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__url_report_placement", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__url_report_placement.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__url_report_placement.92ca3b192e", "fqn": ["twitter_ads", "not_null_twitter_ads__url_report_placement"], "alias": "not_null_twitter_ads__url_report_placement", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.2626176, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__url_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__url_report_placement.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect placement\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__url_report\"\nwhere placement is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "placement", "file_key_name": "models.twitter_ads__url_report", "attached_node": "model.twitter_ads.twitter_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "placement", "model": "{{ get_where_subquery(ref('twitter_ads__url_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__url_report_promoted_tweet_id.d690f99143": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__url_report_promoted_tweet_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__url_report_promoted_tweet_id.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__url_report_promoted_tweet_id.d690f99143", "fqn": ["twitter_ads", "not_null_twitter_ads__url_report_promoted_tweet_id"], "alias": "not_null_twitter_ads__url_report_promoted_tweet_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.2652037, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__url_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__url_report_promoted_tweet_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect promoted_tweet_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__url_report\"\nwhere promoted_tweet_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "promoted_tweet_id", "file_key_name": "models.twitter_ads__url_report", "attached_node": "model.twitter_ads.twitter_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "promoted_tweet_id", "model": "{{ get_where_subquery(ref('twitter_ads__url_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__url_report_base_url.dfd7ab549e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__url_report_base_url", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__url_report_base_url.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__url_report_base_url.dfd7ab549e", "fqn": ["twitter_ads", "not_null_twitter_ads__url_report_base_url"], "alias": "not_null_twitter_ads__url_report_base_url", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"enabled": true}, "created_at": 1783708223.2684522, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(enabled=True) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__url_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__url_report_base_url.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect base_url\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__url_report\"\nwhere base_url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "base_url", "file_key_name": "models.twitter_ads__url_report", "attached_node": "model.twitter_ads.twitter_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "base_url", "model": "{{ get_where_subquery(ref('twitter_ads__url_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__campaign_country_report_campaign_id.d08c7d25a2": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__campaign_country_report_campaign_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__campaign_country_report_campaign_id.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__campaign_country_report_campaign_id.d08c7d25a2", "fqn": ["twitter_ads", "not_null_twitter_ads__campaign_country_report_campaign_id"], "alias": "not_null_twitter_ads__campaign_country_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.270978, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__campaign_country_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__campaign_country_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_country_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.twitter_ads__campaign_country_report", "attached_node": "model.twitter_ads.twitter_ads__campaign_country_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('twitter_ads__campaign_country_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__campaign_country_report_date_day.33eabfbcaa": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__campaign_country_report_date_day", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__campaign_country_report_date_day.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__campaign_country_report_date_day.33eabfbcaa", "fqn": ["twitter_ads", "not_null_twitter_ads__campaign_country_report_date_day"], "alias": "not_null_twitter_ads__campaign_country_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.2734988, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__campaign_country_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__campaign_country_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_country_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.twitter_ads__campaign_country_report", "attached_node": "model.twitter_ads.twitter_ads__campaign_country_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('twitter_ads__campaign_country_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__campaign_country_report_placement.3a4c65b9c5": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__campaign_country_report_placement", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__campaign_country_report_placement.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__campaign_country_report_placement.3a4c65b9c5", "fqn": ["twitter_ads", "not_null_twitter_ads__campaign_country_report_placement"], "alias": "not_null_twitter_ads__campaign_country_report_placement", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.276122, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__campaign_country_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__campaign_country_report_placement.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect placement\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_country_report\"\nwhere placement is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "placement", "file_key_name": "models.twitter_ads__campaign_country_report", "attached_node": "model.twitter_ads.twitter_ads__campaign_country_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "placement", "model": "{{ get_where_subquery(ref('twitter_ads__campaign_country_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__campaign_region_report_campaign_id.c06b8be032": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__campaign_region_report_campaign_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__campaign_region_report_campaign_id.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__campaign_region_report_campaign_id.c06b8be032", "fqn": ["twitter_ads", "not_null_twitter_ads__campaign_region_report_campaign_id"], "alias": "not_null_twitter_ads__campaign_region_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.278638, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__campaign_region_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__campaign_region_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__campaign_region_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_region_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.twitter_ads__campaign_region_report", "attached_node": "model.twitter_ads.twitter_ads__campaign_region_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('twitter_ads__campaign_region_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__campaign_region_report_date_day.884ad86a28": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__campaign_region_report_date_day", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__campaign_region_report_date_day.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__campaign_region_report_date_day.884ad86a28", "fqn": ["twitter_ads", "not_null_twitter_ads__campaign_region_report_date_day"], "alias": "not_null_twitter_ads__campaign_region_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.281161, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__campaign_region_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__campaign_region_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__campaign_region_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_region_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.twitter_ads__campaign_region_report", "attached_node": "model.twitter_ads.twitter_ads__campaign_region_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('twitter_ads__campaign_region_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_twitter_ads__campaign_region_report_placement.e6fb374bf5": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_twitter_ads__campaign_region_report_placement", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_twitter_ads__campaign_region_report_placement.sql", "original_file_path": "models/twitter.yml", "unique_id": "test.twitter_ads.not_null_twitter_ads__campaign_region_report_placement.e6fb374bf5", "fqn": ["twitter_ads", "not_null_twitter_ads__campaign_region_report_placement"], "alias": "not_null_twitter_ads__campaign_region_report_placement", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.2836645, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "twitter_ads__campaign_region_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.twitter_ads__campaign_region_report"]}, "compiled_path": "target/compiled/twitter_ads/models/twitter.yml/not_null_twitter_ads__campaign_region_report_placement.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect placement\nfrom \"postgres\".\"public_ad_reporting_dev\".\"twitter_ads__campaign_region_report\"\nwhere placement is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "placement", "file_key_name": "models.twitter_ads__campaign_region_report", "attached_node": "model.twitter_ads.twitter_ads__campaign_region_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "placement", "model": "{{ get_where_subquery(ref('twitter_ads__campaign_region_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__account_history_account_id.66fb3601e2": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__account_history_account_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__account_history_account_id.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__account_history_account_id.66fb3601e2", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__account_history_account_id"], "alias": "not_null_stg_twitter_ads__account_history_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.3057234, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__account_history"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__account_history_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__account_history\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.stg_twitter_ads__account_history", "attached_node": "model.twitter_ads.stg_twitter_ads__account_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('stg_twitter_ads__account_history')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__campaign_history_campaign_id.51218487ce": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__campaign_history_campaign_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__campaign_history_campaign_id.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__campaign_history_campaign_id.51218487ce", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__campaign_history_campaign_id"], "alias": "not_null_stg_twitter_ads__campaign_history_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.308339, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_history"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__campaign_history_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_history\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_twitter_ads__campaign_history", "attached_node": "model.twitter_ads.stg_twitter_ads__campaign_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_twitter_ads__campaign_history')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__line_item_history_line_item_id.2cef040809": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__line_item_history_line_item_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__line_item_history_line_item_id.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__line_item_history_line_item_id.2cef040809", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__line_item_history_line_item_id"], "alias": "not_null_stg_twitter_ads__line_item_history_line_item_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.3108609, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__line_item_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__line_item_history"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__line_item_history_line_item_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect line_item_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_history\"\nwhere line_item_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "line_item_id", "file_key_name": "models.stg_twitter_ads__line_item_history", "attached_node": "model.twitter_ads.stg_twitter_ads__line_item_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "line_item_id", "model": "{{ get_where_subquery(ref('stg_twitter_ads__line_item_history')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_history_promoted_tweet_id.f447a1cd09": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__promoted_tweet_history_promoted_tweet_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__prom_b9fd075f90e22952cf35b8a246a98976.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_history_promoted_tweet_id.f447a1cd09", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__promoted_tweet_history_promoted_tweet_id"], "alias": "not_null_stg_twitter_ads__prom_b9fd075f90e22952cf35b8a246a98976", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_twitter_ads__prom_b9fd075f90e22952cf35b8a246a98976", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_twitter_ads__prom_b9fd075f90e22952cf35b8a246a98976"}, "created_at": 1783708223.3135016, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_twitter_ads__prom_b9fd075f90e22952cf35b8a246a98976\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__promoted_tweet_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_history"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__prom_b9fd075f90e22952cf35b8a246a98976.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect promoted_tweet_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_history\"\nwhere promoted_tweet_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "promoted_tweet_id", "file_key_name": "models.stg_twitter_ads__promoted_tweet_history", "attached_node": "model.twitter_ads.stg_twitter_ads__promoted_tweet_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "promoted_tweet_id", "model": "{{ get_where_subquery(ref('stg_twitter_ads__promoted_tweet_history')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_date_day.c4c46a5894": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__promoted_tweet_report_date_day", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__promoted_tweet_report_date_day.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_date_day.c4c46a5894", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__promoted_tweet_report_date_day"], "alias": "not_null_stg_twitter_ads__promoted_tweet_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.3159952, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__promoted_tweet_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__promoted_tweet_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_twitter_ads__promoted_tweet_report", "attached_node": "model.twitter_ads.stg_twitter_ads__promoted_tweet_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_twitter_ads__promoted_tweet_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_promoted_tweet_id.6028694598": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__promoted_tweet_report_promoted_tweet_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__prom_46616b936836e80f58bf2b489d5247aa.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_promoted_tweet_id.6028694598", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__promoted_tweet_report_promoted_tweet_id"], "alias": "not_null_stg_twitter_ads__prom_46616b936836e80f58bf2b489d5247aa", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_twitter_ads__prom_46616b936836e80f58bf2b489d5247aa", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"alias": "not_null_stg_twitter_ads__prom_46616b936836e80f58bf2b489d5247aa"}, "created_at": 1783708223.3185296, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_twitter_ads__prom_46616b936836e80f58bf2b489d5247aa\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__promoted_tweet_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__prom_46616b936836e80f58bf2b489d5247aa.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect promoted_tweet_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_report\"\nwhere promoted_tweet_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "promoted_tweet_id", "file_key_name": "models.stg_twitter_ads__promoted_tweet_report", "attached_node": "model.twitter_ads.stg_twitter_ads__promoted_tweet_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "promoted_tweet_id", "model": "{{ get_where_subquery(ref('stg_twitter_ads__promoted_tweet_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_placement.c1b1f648b3": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__promoted_tweet_report_placement", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__promoted_tweet_report_placement.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_placement.c1b1f648b3", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__promoted_tweet_report_placement"], "alias": "not_null_stg_twitter_ads__promoted_tweet_report_placement", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.3210194, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__promoted_tweet_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__promoted_tweet_report_placement.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect placement\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__promoted_tweet_report\"\nwhere placement is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "placement", "file_key_name": "models.stg_twitter_ads__promoted_tweet_report", "attached_node": "model.twitter_ads.stg_twitter_ads__promoted_tweet_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "placement", "model": "{{ get_where_subquery(ref('stg_twitter_ads__promoted_tweet_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__tweet_url_index.e998fb67be": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__tweet_url_index", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__tweet_url_index.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__tweet_url_index.e998fb67be", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__tweet_url_index"], "alias": "not_null_stg_twitter_ads__tweet_url_index", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.32355, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__tweet_url", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__tweet_url"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__tweet_url_index.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect index\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__tweet_url\"\nwhere index is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "index", "file_key_name": "models.stg_twitter_ads__tweet_url", "attached_node": "model.twitter_ads.stg_twitter_ads__tweet_url", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "index", "model": "{{ get_where_subquery(ref('stg_twitter_ads__tweet_url')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__tweet_url_tweet_id.f7e1670218": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__tweet_url_tweet_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__tweet_url_tweet_id.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__tweet_url_tweet_id.f7e1670218", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__tweet_url_tweet_id"], "alias": "not_null_stg_twitter_ads__tweet_url_tweet_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.3261333, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__tweet_url", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__tweet_url"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__tweet_url_tweet_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect tweet_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__tweet_url\"\nwhere tweet_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "tweet_id", "file_key_name": "models.stg_twitter_ads__tweet_url", "attached_node": "model.twitter_ads.stg_twitter_ads__tweet_url", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tweet_id", "model": "{{ get_where_subquery(ref('stg_twitter_ads__tweet_url')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_date_day.053c09786c": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__campaign_report_date_day", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__campaign_report_date_day.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_date_day.053c09786c", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__campaign_report_date_day"], "alias": "not_null_stg_twitter_ads__campaign_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.3286452, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__campaign_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_twitter_ads__campaign_report", "attached_node": "model.twitter_ads.stg_twitter_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_twitter_ads__campaign_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_campaign_id.a63b62981f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__campaign_report_campaign_id.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_campaign_id.a63b62981f", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__campaign_report_campaign_id"], "alias": "not_null_stg_twitter_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.3311553, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_twitter_ads__campaign_report", "attached_node": "model.twitter_ads.stg_twitter_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_twitter_ads__campaign_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_placement.5067d8c4f4": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__campaign_report_placement", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__campaign_report_placement.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_placement.5067d8c4f4", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__campaign_report_placement"], "alias": "not_null_stg_twitter_ads__campaign_report_placement", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.3336587, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__campaign_report_placement.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect placement\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_report\"\nwhere placement is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "placement", "file_key_name": "models.stg_twitter_ads__campaign_report", "attached_node": "model.twitter_ads.stg_twitter_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "placement", "model": "{{ get_where_subquery(ref('stg_twitter_ads__campaign_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_date_day.0f4d8cc8fe": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__line_item_report_date_day", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__line_item_report_date_day.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_date_day.0f4d8cc8fe", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__line_item_report_date_day"], "alias": "not_null_stg_twitter_ads__line_item_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.3365383, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__line_item_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__line_item_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__line_item_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_twitter_ads__line_item_report", "attached_node": "model.twitter_ads.stg_twitter_ads__line_item_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_twitter_ads__line_item_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_line_item_id.9f5a4860b7": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__line_item_report_line_item_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__line_item_report_line_item_id.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_line_item_id.9f5a4860b7", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__line_item_report_line_item_id"], "alias": "not_null_stg_twitter_ads__line_item_report_line_item_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.339046, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__line_item_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__line_item_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__line_item_report_line_item_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect line_item_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_report\"\nwhere line_item_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "line_item_id", "file_key_name": "models.stg_twitter_ads__line_item_report", "attached_node": "model.twitter_ads.stg_twitter_ads__line_item_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "line_item_id", "model": "{{ get_where_subquery(ref('stg_twitter_ads__line_item_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_placement.cd7e77e0eb": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__line_item_report_placement", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__line_item_report_placement.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_placement.cd7e77e0eb", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__line_item_report_placement"], "alias": "not_null_stg_twitter_ads__line_item_report_placement", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.3415751, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__line_item_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__line_item_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__line_item_report_placement.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect placement\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_report\"\nwhere placement is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "placement", "file_key_name": "models.stg_twitter_ads__line_item_report", "attached_node": "model.twitter_ads.stg_twitter_ads__line_item_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "placement", "model": "{{ get_where_subquery(ref('stg_twitter_ads__line_item_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__line_item_keywords_report_keyword_id.e5f015e9ec": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__line_item_keywords_report_keyword_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__line_item_keywords_report_keyword_id.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__line_item_keywords_report_keyword_id.e5f015e9ec", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__line_item_keywords_report_keyword_id"], "alias": "not_null_stg_twitter_ads__line_item_keywords_report_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.3440464, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__line_item_keywords_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__line_item_keywords_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__line_item_keywords_report_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_keywords_report\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.stg_twitter_ads__line_item_keywords_report", "attached_node": "model.twitter_ads.stg_twitter_ads__line_item_keywords_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('stg_twitter_ads__line_item_keywords_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__line_item_keywords_report_date_day.c7e7155b13": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__line_item_keywords_report_date_day", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__line_item_keywords_report_date_day.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__line_item_keywords_report_date_day.c7e7155b13", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__line_item_keywords_report_date_day"], "alias": "not_null_stg_twitter_ads__line_item_keywords_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.34658, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__line_item_keywords_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__line_item_keywords_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__line_item_keywords_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__line_item_keywords_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_twitter_ads__line_item_keywords_report", "attached_node": "model.twitter_ads.stg_twitter_ads__line_item_keywords_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_twitter_ads__line_item_keywords_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__tweet_tweet_id.a0427f37cd": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__tweet_tweet_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__tweet_tweet_id.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__tweet_tweet_id.a0427f37cd", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__tweet_tweet_id"], "alias": "not_null_stg_twitter_ads__tweet_tweet_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.4439952, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__tweet", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__tweet"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__tweet_tweet_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect tweet_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__tweet\"\nwhere tweet_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "tweet_id", "file_key_name": "models.stg_twitter_ads__tweet", "attached_node": "model.twitter_ads.stg_twitter_ads__tweet", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "tweet_id", "model": "{{ get_where_subquery(ref('stg_twitter_ads__tweet')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_country.8bc44f6e39": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__campaign_locations_report_country", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__campaign_locations_report_country.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_country.8bc44f6e39", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__campaign_locations_report_country"], "alias": "not_null_stg_twitter_ads__campaign_locations_report_country", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.446632, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_locations_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_locations_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__campaign_locations_report_country.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect country\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_locations_report\"\nwhere country is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "country", "file_key_name": "models.stg_twitter_ads__campaign_locations_report", "attached_node": "model.twitter_ads.stg_twitter_ads__campaign_locations_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "country", "model": "{{ get_where_subquery(ref('stg_twitter_ads__campaign_locations_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_date_day.bf69378746": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__campaign_locations_report_date_day", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__campaign_locations_report_date_day.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_date_day.bf69378746", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__campaign_locations_report_date_day"], "alias": "not_null_stg_twitter_ads__campaign_locations_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.4491973, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_locations_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_locations_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__campaign_locations_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_locations_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_twitter_ads__campaign_locations_report", "attached_node": "model.twitter_ads.stg_twitter_ads__campaign_locations_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_twitter_ads__campaign_locations_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_campaign_id.e1ddc306c2": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__campaign_locations_report_campaign_id", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__campaign_locations_report_campaign_id.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_campaign_id.e1ddc306c2", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__campaign_locations_report_campaign_id"], "alias": "not_null_stg_twitter_ads__campaign_locations_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.4518225, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_locations_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_locations_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__campaign_locations_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_locations_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_twitter_ads__campaign_locations_report", "attached_node": "model.twitter_ads.stg_twitter_ads__campaign_locations_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_twitter_ads__campaign_locations_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_placement.638fb0cf03": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__campaign_locations_report_placement", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__campaign_locations_report_placement.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_placement.638fb0cf03", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__campaign_locations_report_placement"], "alias": "not_null_stg_twitter_ads__campaign_locations_report_placement", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.45471, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_locations_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_locations_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__campaign_locations_report_placement.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect placement\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_locations_report\"\nwhere placement is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "placement", "file_key_name": "models.stg_twitter_ads__campaign_locations_report", "attached_node": "model.twitter_ads.stg_twitter_ads__campaign_locations_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "placement", "model": "{{ get_where_subquery(ref('stg_twitter_ads__campaign_locations_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__campaign_regions_report_region.7b8b6fd555": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__campaign_regions_report_region", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__campaign_regions_report_region.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__campaign_regions_report_region.7b8b6fd555", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__campaign_regions_report_region"], "alias": "not_null_stg_twitter_ads__campaign_regions_report_region", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.4572947, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_regions_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_regions_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__campaign_regions_report_region.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect region\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_regions_report\"\nwhere region is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "region", "file_key_name": "models.stg_twitter_ads__campaign_regions_report", "attached_node": "model.twitter_ads.stg_twitter_ads__campaign_regions_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "region", "model": "{{ get_where_subquery(ref('stg_twitter_ads__campaign_regions_report')) }}"}, "namespace": null}}, "test.twitter_ads.not_null_stg_twitter_ads__campaign_regions_report_date_day.e7f9f99776": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_twitter_ads__campaign_regions_report_date_day", "resource_type": "test", "package_name": "twitter_ads", "path": "not_null_stg_twitter_ads__campaign_regions_report_date_day.sql", "original_file_path": "models/staging/stg_twitter_ads.yml", "unique_id": "test.twitter_ads.not_null_stg_twitter_ads__campaign_regions_report_date_day.e7f9f99776", "fqn": ["twitter_ads", "staging", "not_null_stg_twitter_ads__campaign_regions_report_date_day"], "alias": "not_null_stg_twitter_ads__campaign_regions_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.4598072, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_twitter_ads__campaign_regions_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.twitter_ads.stg_twitter_ads__campaign_regions_report"]}, "compiled_path": "target/compiled/twitter_ads/models/staging/stg_twitter_ads.yml/not_null_stg_twitter_ads__campaign_regions_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_twitter_ads__campaign_regions_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.stg_twitter_ads__campaign_regions_report", "attached_node": "model.twitter_ads.stg_twitter_ads__campaign_regions_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('stg_twitter_ads__campaign_regions_report')) }}"}, "namespace": null}}, "test.ad_reporting.not_null_ad_reporting__account_report_account_id.316a64c022": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_ad_reporting__account_report_account_id", "resource_type": "test", "package_name": "ad_reporting", "path": "not_null_ad_reporting__account_report_account_id.sql", "original_file_path": "models/ad_reporting_models.yml", "unique_id": "test.ad_reporting.not_null_ad_reporting__account_report_account_id.316a64c022", "fqn": ["ad_reporting", "not_null_ad_reporting__account_report_account_id"], "alias": "not_null_ad_reporting__account_report_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "warn", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"severity": "warn"}, "created_at": 1783708223.5560892, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(severity=\"warn\") }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "ad_reporting__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.ad_reporting.ad_reporting__account_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting_models.yml/not_null_ad_reporting__account_report_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__account_report\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.ad_reporting__account_report", "attached_node": "model.ad_reporting.ad_reporting__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('ad_reporting__account_report')) }}"}, "namespace": null}}, "test.ad_reporting.not_null_ad_reporting__ad_group_report_ad_group_id.963e17e842": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_ad_reporting__ad_group_report_ad_group_id", "resource_type": "test", "package_name": "ad_reporting", "path": "not_null_ad_reporting__ad_group_report_ad_group_id.sql", "original_file_path": "models/ad_reporting_models.yml", "unique_id": "test.ad_reporting.not_null_ad_reporting__ad_group_report_ad_group_id.963e17e842", "fqn": ["ad_reporting", "not_null_ad_reporting__ad_group_report_ad_group_id"], "alias": "not_null_ad_reporting__ad_group_report_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.5586855, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "ad_reporting__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.ad_reporting.ad_reporting__ad_group_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting_models.yml/not_null_ad_reporting__ad_group_report_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__ad_group_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.ad_reporting__ad_group_report", "attached_node": "model.ad_reporting.ad_reporting__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('ad_reporting__ad_group_report')) }}"}, "namespace": null}}, "test.ad_reporting.not_null_ad_reporting__ad_report_ad_id.f3eb210152": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_ad_reporting__ad_report_ad_id", "resource_type": "test", "package_name": "ad_reporting", "path": "not_null_ad_reporting__ad_report_ad_id.sql", "original_file_path": "models/ad_reporting_models.yml", "unique_id": "test.ad_reporting.not_null_ad_reporting__ad_report_ad_id.f3eb210152", "fqn": ["ad_reporting", "not_null_ad_reporting__ad_report_ad_id"], "alias": "not_null_ad_reporting__ad_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.562002, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "ad_reporting__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.ad_reporting.ad_reporting__ad_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting_models.yml/not_null_ad_reporting__ad_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__ad_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.ad_reporting__ad_report", "attached_node": "model.ad_reporting.ad_reporting__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('ad_reporting__ad_report')) }}"}, "namespace": null}}, "test.ad_reporting.not_null_ad_reporting__campaign_report_campaign_id.1cfaa7698b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_ad_reporting__campaign_report_campaign_id", "resource_type": "test", "package_name": "ad_reporting", "path": "not_null_ad_reporting__campaign_report_campaign_id.sql", "original_file_path": "models/ad_reporting_models.yml", "unique_id": "test.ad_reporting.not_null_ad_reporting__campaign_report_campaign_id.1cfaa7698b", "fqn": ["ad_reporting", "not_null_ad_reporting__campaign_report_campaign_id"], "alias": "not_null_ad_reporting__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.5645688, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "ad_reporting__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.ad_reporting.ad_reporting__campaign_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting_models.yml/not_null_ad_reporting__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.ad_reporting__campaign_report", "attached_node": "model.ad_reporting.ad_reporting__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('ad_reporting__campaign_report')) }}"}, "namespace": null}}, "test.ad_reporting.not_null_ad_reporting__keyword_report_keyword_id.51a45fb334": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_ad_reporting__keyword_report_keyword_id", "resource_type": "test", "package_name": "ad_reporting", "path": "not_null_ad_reporting__keyword_report_keyword_id.sql", "original_file_path": "models/ad_reporting_models.yml", "unique_id": "test.ad_reporting.not_null_ad_reporting__keyword_report_keyword_id.51a45fb334", "fqn": ["ad_reporting", "not_null_ad_reporting__keyword_report_keyword_id"], "alias": "not_null_ad_reporting__keyword_report_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.5671053, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "ad_reporting__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.ad_reporting.ad_reporting__keyword_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting_models.yml/not_null_ad_reporting__keyword_report_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__keyword_report\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.ad_reporting__keyword_report", "attached_node": "model.ad_reporting.ad_reporting__keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('ad_reporting__keyword_report')) }}"}, "namespace": null}}, "test.ad_reporting.not_null_ad_reporting__search_report_search_query.ee2f0fcafb": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_ad_reporting__search_report_search_query", "resource_type": "test", "package_name": "ad_reporting", "path": "not_null_ad_reporting__search_report_search_query.sql", "original_file_path": "models/ad_reporting_models.yml", "unique_id": "test.ad_reporting.not_null_ad_reporting__search_report_search_query.ee2f0fcafb", "fqn": ["ad_reporting", "not_null_ad_reporting__search_report_search_query"], "alias": "not_null_ad_reporting__search_report_search_query", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.5696309, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "ad_reporting__search_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.ad_reporting.ad_reporting__search_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting_models.yml/not_null_ad_reporting__search_report_search_query.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect search_query\nfrom \"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__search_report\"\nwhere search_query is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "search_query", "file_key_name": "models.ad_reporting__search_report", "attached_node": "model.ad_reporting.ad_reporting__search_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "search_query", "model": "{{ get_where_subquery(ref('ad_reporting__search_report')) }}"}, "namespace": null}}, "test.ad_reporting.not_null_ad_reporting__url_report_base_url.a29864e5b6": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_ad_reporting__url_report_base_url", "resource_type": "test", "package_name": "ad_reporting", "path": "not_null_ad_reporting__url_report_base_url.sql", "original_file_path": "models/ad_reporting_models.yml", "unique_id": "test.ad_reporting.not_null_ad_reporting__url_report_base_url.a29864e5b6", "fqn": ["ad_reporting", "not_null_ad_reporting__url_report_base_url"], "alias": "not_null_ad_reporting__url_report_base_url", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"enabled": true}, "created_at": 1783708223.5729473, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(enabled=True) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "ad_reporting__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.ad_reporting.ad_reporting__url_report"]}, "compiled_path": "target/compiled/ad_reporting/models/ad_reporting_models.yml/not_null_ad_reporting__url_report_base_url.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect base_url\nfrom \"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__url_report\"\nwhere base_url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "base_url", "file_key_name": "models.ad_reporting__url_report", "attached_node": "model.ad_reporting.ad_reporting__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "base_url", "model": "{{ get_where_subquery(ref('ad_reporting__url_report')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_tiktok_ads__advertiser_report_date_day.1276998c99": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_tiktok_ads__advertiser_report_date_day", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_tiktok_ads__advertiser_report_date_day.sql", "original_file_path": "models/tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_tiktok_ads__advertiser_report_date_day.1276998c99", "fqn": ["tiktok_ads", "not_null_tiktok_ads__advertiser_report_date_day"], "alias": "not_null_tiktok_ads__advertiser_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.7825382, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "tiktok_ads__advertiser_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.tiktok_ads__advertiser_report"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads.yml/not_null_tiktok_ads__advertiser_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__advertiser_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.tiktok_ads__advertiser_report", "attached_node": "model.tiktok_ads.tiktok_ads__advertiser_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('tiktok_ads__advertiser_report')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_tiktok_ads__advertiser_report_advertiser_id.f956c568ce": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_tiktok_ads__advertiser_report_advertiser_id", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_tiktok_ads__advertiser_report_advertiser_id.sql", "original_file_path": "models/tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_tiktok_ads__advertiser_report_advertiser_id.f956c568ce", "fqn": ["tiktok_ads", "not_null_tiktok_ads__advertiser_report_advertiser_id"], "alias": "not_null_tiktok_ads__advertiser_report_advertiser_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.7852762, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "tiktok_ads__advertiser_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.tiktok_ads__advertiser_report"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads.yml/not_null_tiktok_ads__advertiser_report_advertiser_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect advertiser_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__advertiser_report\"\nwhere advertiser_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "advertiser_id", "file_key_name": "models.tiktok_ads__advertiser_report", "attached_node": "model.tiktok_ads.tiktok_ads__advertiser_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "advertiser_id", "model": "{{ get_where_subquery(ref('tiktok_ads__advertiser_report')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_tiktok_ads__ad_report_date_day.d61ee4a5ed": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_tiktok_ads__ad_report_date_day", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_tiktok_ads__ad_report_date_day.sql", "original_file_path": "models/tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_tiktok_ads__ad_report_date_day.d61ee4a5ed", "fqn": ["tiktok_ads", "not_null_tiktok_ads__ad_report_date_day"], "alias": "not_null_tiktok_ads__ad_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.7878141, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "tiktok_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.tiktok_ads__ad_report"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads.yml/not_null_tiktok_ads__ad_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__ad_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.tiktok_ads__ad_report", "attached_node": "model.tiktok_ads.tiktok_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('tiktok_ads__ad_report')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_tiktok_ads__ad_report_ad_id.2d8166e707": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_tiktok_ads__ad_report_ad_id", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_tiktok_ads__ad_report_ad_id.sql", "original_file_path": "models/tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_tiktok_ads__ad_report_ad_id.2d8166e707", "fqn": ["tiktok_ads", "not_null_tiktok_ads__ad_report_ad_id"], "alias": "not_null_tiktok_ads__ad_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.7905023, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "tiktok_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.tiktok_ads__ad_report"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads.yml/not_null_tiktok_ads__ad_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__ad_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.tiktok_ads__ad_report", "attached_node": "model.tiktok_ads.tiktok_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('tiktok_ads__ad_report')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_tiktok_ads__ad_group_report_date_day.e39164964e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_tiktok_ads__ad_group_report_date_day", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_tiktok_ads__ad_group_report_date_day.sql", "original_file_path": "models/tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_tiktok_ads__ad_group_report_date_day.e39164964e", "fqn": ["tiktok_ads", "not_null_tiktok_ads__ad_group_report_date_day"], "alias": "not_null_tiktok_ads__ad_group_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.7931051, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "tiktok_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.tiktok_ads__ad_group_report"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads.yml/not_null_tiktok_ads__ad_group_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__ad_group_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.tiktok_ads__ad_group_report", "attached_node": "model.tiktok_ads.tiktok_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('tiktok_ads__ad_group_report')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_tiktok_ads__ad_group_report_ad_group_id.17fb8710f4": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_tiktok_ads__ad_group_report_ad_group_id", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_tiktok_ads__ad_group_report_ad_group_id.sql", "original_file_path": "models/tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_tiktok_ads__ad_group_report_ad_group_id.17fb8710f4", "fqn": ["tiktok_ads", "not_null_tiktok_ads__ad_group_report_ad_group_id"], "alias": "not_null_tiktok_ads__ad_group_report_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.7957573, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "tiktok_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.tiktok_ads__ad_group_report"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads.yml/not_null_tiktok_ads__ad_group_report_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__ad_group_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.tiktok_ads__ad_group_report", "attached_node": "model.tiktok_ads.tiktok_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('tiktok_ads__ad_group_report')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_tiktok_ads__campaign_report_date_day.3807b0e836": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_tiktok_ads__campaign_report_date_day", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_tiktok_ads__campaign_report_date_day.sql", "original_file_path": "models/tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_tiktok_ads__campaign_report_date_day.3807b0e836", "fqn": ["tiktok_ads", "not_null_tiktok_ads__campaign_report_date_day"], "alias": "not_null_tiktok_ads__campaign_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.7983406, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "tiktok_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.tiktok_ads__campaign_report"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads.yml/not_null_tiktok_ads__campaign_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__campaign_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.tiktok_ads__campaign_report", "attached_node": "model.tiktok_ads.tiktok_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('tiktok_ads__campaign_report')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_tiktok_ads__campaign_report_campaign_id.8a2b0c8ef8": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_tiktok_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_tiktok_ads__campaign_report_campaign_id.sql", "original_file_path": "models/tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_tiktok_ads__campaign_report_campaign_id.8a2b0c8ef8", "fqn": ["tiktok_ads", "not_null_tiktok_ads__campaign_report_campaign_id"], "alias": "not_null_tiktok_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.8008432, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "tiktok_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.tiktok_ads__campaign_report"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads.yml/not_null_tiktok_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.tiktok_ads__campaign_report", "attached_node": "model.tiktok_ads.tiktok_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('tiktok_ads__campaign_report')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_tiktok_ads__url_report_date_day.d593573eff": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_tiktok_ads__url_report_date_day", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_tiktok_ads__url_report_date_day.sql", "original_file_path": "models/tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_tiktok_ads__url_report_date_day.d593573eff", "fqn": ["tiktok_ads", "not_null_tiktok_ads__url_report_date_day"], "alias": "not_null_tiktok_ads__url_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.8033438, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "tiktok_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.tiktok_ads__url_report"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads.yml/not_null_tiktok_ads__url_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__url_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.tiktok_ads__url_report", "attached_node": "model.tiktok_ads.tiktok_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('tiktok_ads__url_report')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_tiktok_ads__url_report_ad_id.6c41067bd0": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_tiktok_ads__url_report_ad_id", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_tiktok_ads__url_report_ad_id.sql", "original_file_path": "models/tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_tiktok_ads__url_report_ad_id.6c41067bd0", "fqn": ["tiktok_ads", "not_null_tiktok_ads__url_report_ad_id"], "alias": "not_null_tiktok_ads__url_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.8057923, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "tiktok_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.tiktok_ads__url_report"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads.yml/not_null_tiktok_ads__url_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__url_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.tiktok_ads__url_report", "attached_node": "model.tiktok_ads.tiktok_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('tiktok_ads__url_report')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_tiktok_ads__url_report_base_url.37afef2e1b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_tiktok_ads__url_report_base_url", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_tiktok_ads__url_report_base_url.sql", "original_file_path": "models/tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_tiktok_ads__url_report_base_url.37afef2e1b", "fqn": ["tiktok_ads", "not_null_tiktok_ads__url_report_base_url"], "alias": "not_null_tiktok_ads__url_report_base_url", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"enabled": true}, "created_at": 1783708223.8092253, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(enabled=True) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "tiktok_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.tiktok_ads__url_report"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads.yml/not_null_tiktok_ads__url_report_base_url.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect base_url\nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__url_report\"\nwhere base_url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "base_url", "file_key_name": "models.tiktok_ads__url_report", "attached_node": "model.tiktok_ads.tiktok_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "base_url", "model": "{{ get_where_subquery(ref('tiktok_ads__url_report')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_tiktok_ads__campaign_country_report_date_day.c68c1bd379": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_tiktok_ads__campaign_country_report_date_day", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_tiktok_ads__campaign_country_report_date_day.sql", "original_file_path": "models/tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_tiktok_ads__campaign_country_report_date_day.c68c1bd379", "fqn": ["tiktok_ads", "not_null_tiktok_ads__campaign_country_report_date_day"], "alias": "not_null_tiktok_ads__campaign_country_report_date_day", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.8118072, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "tiktok_ads__campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.tiktok_ads__campaign_country_report"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads.yml/not_null_tiktok_ads__campaign_country_report_date_day.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect date_day\nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__campaign_country_report\"\nwhere date_day is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "date_day", "file_key_name": "models.tiktok_ads__campaign_country_report", "attached_node": "model.tiktok_ads.tiktok_ads__campaign_country_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "date_day", "model": "{{ get_where_subquery(ref('tiktok_ads__campaign_country_report')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_tiktok_ads__campaign_country_report_campaign_id.f439b91d6d": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_tiktok_ads__campaign_country_report_campaign_id", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_tiktok_ads__campaign_country_report_campaign_id.sql", "original_file_path": "models/tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_tiktok_ads__campaign_country_report_campaign_id.f439b91d6d", "fqn": ["tiktok_ads", "not_null_tiktok_ads__campaign_country_report_campaign_id"], "alias": "not_null_tiktok_ads__campaign_country_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.8143363, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "tiktok_ads__campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.tiktok_ads__campaign_country_report"]}, "compiled_path": "target/compiled/tiktok_ads/models/tiktok_ads.yml/not_null_tiktok_ads__campaign_country_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"tiktok_ads__campaign_country_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.tiktok_ads__campaign_country_report", "attached_node": "model.tiktok_ads.tiktok_ads__campaign_country_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('tiktok_ads__campaign_country_report')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_stg_tiktok_ads__advertiser_advertiser_id.5deab92def": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_tiktok_ads__advertiser_advertiser_id", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_stg_tiktok_ads__advertiser_advertiser_id.sql", "original_file_path": "models/staging/stg_tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_stg_tiktok_ads__advertiser_advertiser_id.5deab92def", "fqn": ["tiktok_ads", "staging", "not_null_stg_tiktok_ads__advertiser_advertiser_id"], "alias": "not_null_stg_tiktok_ads__advertiser_advertiser_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.8420994, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__advertiser", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__advertiser"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads.yml/not_null_stg_tiktok_ads__advertiser_advertiser_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect advertiser_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__advertiser\"\nwhere advertiser_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "advertiser_id", "file_key_name": "models.stg_tiktok_ads__advertiser", "attached_node": "model.tiktok_ads.stg_tiktok_ads__advertiser", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "advertiser_id", "model": "{{ get_where_subquery(ref('stg_tiktok_ads__advertiser')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_history_ad_group_id.04778d7fad": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_tiktok_ads__ad_group_history_ad_group_id", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_stg_tiktok_ads__ad_group_history_ad_group_id.sql", "original_file_path": "models/staging/stg_tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_history_ad_group_id.04778d7fad", "fqn": ["tiktok_ads", "staging", "not_null_stg_tiktok_ads__ad_group_history_ad_group_id"], "alias": "not_null_stg_tiktok_ads__ad_group_history_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.8446903, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__ad_group_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__ad_group_history"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads.yml/not_null_stg_tiktok_ads__ad_group_history_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_group_history\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_tiktok_ads__ad_group_history", "attached_node": "model.tiktok_ads.stg_tiktok_ads__ad_group_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_tiktok_ads__ad_group_history')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_stg_tiktok_ads__ad_history_ad_id.4ffd05b23a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_tiktok_ads__ad_history_ad_id", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_stg_tiktok_ads__ad_history_ad_id.sql", "original_file_path": "models/staging/stg_tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_stg_tiktok_ads__ad_history_ad_id.4ffd05b23a", "fqn": ["tiktok_ads", "staging", "not_null_stg_tiktok_ads__ad_history_ad_id"], "alias": "not_null_stg_tiktok_ads__ad_history_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.8472252, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__ad_history"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads.yml/not_null_stg_tiktok_ads__ad_history_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_history\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_tiktok_ads__ad_history", "attached_node": "model.tiktok_ads.stg_tiktok_ads__ad_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_tiktok_ads__ad_history')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_history_campaign_id.7f9147d1e1": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_tiktok_ads__campaign_history_campaign_id", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_stg_tiktok_ads__campaign_history_campaign_id.sql", "original_file_path": "models/staging/stg_tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_history_campaign_id.7f9147d1e1", "fqn": ["tiktok_ads", "staging", "not_null_stg_tiktok_ads__campaign_history_campaign_id"], "alias": "not_null_stg_tiktok_ads__campaign_history_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.849844, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__campaign_history"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads.yml/not_null_stg_tiktok_ads__campaign_history_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_history\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_tiktok_ads__campaign_history", "attached_node": "model.tiktok_ads.stg_tiktok_ads__campaign_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_tiktok_ads__campaign_history')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_stg_tiktok_ads__ad_report_hourly_ad_id.ee84d783ed": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_tiktok_ads__ad_report_hourly_ad_id", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_stg_tiktok_ads__ad_report_hourly_ad_id.sql", "original_file_path": "models/staging/stg_tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_stg_tiktok_ads__ad_report_hourly_ad_id.ee84d783ed", "fqn": ["tiktok_ads", "staging", "not_null_stg_tiktok_ads__ad_report_hourly_ad_id"], "alias": "not_null_stg_tiktok_ads__ad_report_hourly_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.8523643, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__ad_report_hourly", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__ad_report_hourly"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads.yml/not_null_stg_tiktok_ads__ad_report_hourly_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_report_hourly\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_tiktok_ads__ad_report_hourly", "attached_node": "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_tiktok_ads__ad_report_hourly')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_stg_tiktok_ads__ad_report_hourly_stat_time_hour.9e2a2dca81": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_tiktok_ads__ad_report_hourly_stat_time_hour", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_stg_tiktok_ads__ad_report_hourly_stat_time_hour.sql", "original_file_path": "models/staging/stg_tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_stg_tiktok_ads__ad_report_hourly_stat_time_hour.9e2a2dca81", "fqn": ["tiktok_ads", "staging", "not_null_stg_tiktok_ads__ad_report_hourly_stat_time_hour"], "alias": "not_null_stg_tiktok_ads__ad_report_hourly_stat_time_hour", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.8548534, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__ad_report_hourly", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__ad_report_hourly"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads.yml/not_null_stg_tiktok_ads__ad_report_hourly_stat_time_hour.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect stat_time_hour\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_report_hourly\"\nwhere stat_time_hour is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "stat_time_hour", "file_key_name": "models.stg_tiktok_ads__ad_report_hourly", "attached_node": "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "stat_time_hour", "model": "{{ get_where_subquery(ref('stg_tiktok_ads__ad_report_hourly')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_report_hourly_ad_group_id.8da17119f1": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_tiktok_ads__ad_group_report_hourly_ad_group_id", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_stg_tiktok_ads__ad_group_report_hourly_ad_group_id.sql", "original_file_path": "models/staging/stg_tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_report_hourly_ad_group_id.8da17119f1", "fqn": ["tiktok_ads", "staging", "not_null_stg_tiktok_ads__ad_group_report_hourly_ad_group_id"], "alias": "not_null_stg_tiktok_ads__ad_group_report_hourly_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.857397, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__ad_group_report_hourly", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads.yml/not_null_stg_tiktok_ads__ad_group_report_hourly_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_group_report_hourly\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_tiktok_ads__ad_group_report_hourly", "attached_node": "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_tiktok_ads__ad_group_report_hourly')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_report_hourly_stat_time_hour.ca4b495127": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_tiktok_ads__ad_group_report_hourly_stat_time_hour", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_stg_tiktok_ads__ad_group_report_hourly_stat_time_hour.sql", "original_file_path": "models/staging/stg_tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_report_hourly_stat_time_hour.ca4b495127", "fqn": ["tiktok_ads", "staging", "not_null_stg_tiktok_ads__ad_group_report_hourly_stat_time_hour"], "alias": "not_null_stg_tiktok_ads__ad_group_report_hourly_stat_time_hour", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.8603873, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__ad_group_report_hourly", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads.yml/not_null_stg_tiktok_ads__ad_group_report_hourly_stat_time_hour.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect stat_time_hour\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__ad_group_report_hourly\"\nwhere stat_time_hour is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "stat_time_hour", "file_key_name": "models.stg_tiktok_ads__ad_group_report_hourly", "attached_node": "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "stat_time_hour", "model": "{{ get_where_subquery(ref('stg_tiktok_ads__ad_group_report_hourly')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_report_hourly_campaign_id.ef898379fb": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_tiktok_ads__campaign_report_hourly_campaign_id", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_stg_tiktok_ads__campaign_report_hourly_campaign_id.sql", "original_file_path": "models/staging/stg_tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_report_hourly_campaign_id.ef898379fb", "fqn": ["tiktok_ads", "staging", "not_null_stg_tiktok_ads__campaign_report_hourly_campaign_id"], "alias": "not_null_stg_tiktok_ads__campaign_report_hourly_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.8628898, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__campaign_report_hourly", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads.yml/not_null_stg_tiktok_ads__campaign_report_hourly_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_report_hourly\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_tiktok_ads__campaign_report_hourly", "attached_node": "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_tiktok_ads__campaign_report_hourly')) }}"}, "namespace": null}}, "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_report_hourly_stat_time_hour.e75e13184c": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_tiktok_ads__campaign_report_hourly_stat_time_hour", "resource_type": "test", "package_name": "tiktok_ads", "path": "not_null_stg_tiktok_ads__campaign_report_hourly_stat_time_hour.sql", "original_file_path": "models/staging/stg_tiktok_ads.yml", "unique_id": "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_report_hourly_stat_time_hour.e75e13184c", "fqn": ["tiktok_ads", "staging", "not_null_stg_tiktok_ads__campaign_report_hourly_stat_time_hour"], "alias": "not_null_stg_tiktok_ads__campaign_report_hourly_stat_time_hour", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.8654187, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_tiktok_ads__campaign_report_hourly", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly"]}, "compiled_path": "target/compiled/tiktok_ads/models/staging/stg_tiktok_ads.yml/not_null_stg_tiktok_ads__campaign_report_hourly_stat_time_hour.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect stat_time_hour\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_tiktok_ads__campaign_report_hourly\"\nwhere stat_time_hour is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "stat_time_hour", "file_key_name": "models.stg_tiktok_ads__campaign_report_hourly", "attached_node": "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "stat_time_hour", "model": "{{ get_where_subquery(ref('stg_tiktok_ads__campaign_report_hourly')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_microsoft_ads__account_report_account_id.f88e46157e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_microsoft_ads__account_report_account_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_microsoft_ads__account_report_account_id.sql", "original_file_path": "models/microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_microsoft_ads__account_report_account_id.f88e46157e", "fqn": ["microsoft_ads", "not_null_microsoft_ads__account_report_account_id"], "alias": "not_null_microsoft_ads__account_report_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.9500906, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "microsoft_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.microsoft_ads__account_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads.yml/not_null_microsoft_ads__account_report_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__account_report\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.microsoft_ads__account_report", "attached_node": "model.microsoft_ads.microsoft_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('microsoft_ads__account_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_microsoft_ads__ad_group_report_ad_group_id.1974ec5ab9": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_microsoft_ads__ad_group_report_ad_group_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_microsoft_ads__ad_group_report_ad_group_id.sql", "original_file_path": "models/microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_microsoft_ads__ad_group_report_ad_group_id.1974ec5ab9", "fqn": ["microsoft_ads", "not_null_microsoft_ads__ad_group_report_ad_group_id"], "alias": "not_null_microsoft_ads__ad_group_report_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.952683, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "microsoft_ads__ad_group_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.microsoft_ads__ad_group_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads.yml/not_null_microsoft_ads__ad_group_report_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__ad_group_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.microsoft_ads__ad_group_report", "attached_node": "model.microsoft_ads.microsoft_ads__ad_group_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('microsoft_ads__ad_group_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_microsoft_ads__ad_report_ad_id.b089709125": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_microsoft_ads__ad_report_ad_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_microsoft_ads__ad_report_ad_id.sql", "original_file_path": "models/microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_microsoft_ads__ad_report_ad_id.b089709125", "fqn": ["microsoft_ads", "not_null_microsoft_ads__ad_report_ad_id"], "alias": "not_null_microsoft_ads__ad_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.9552495, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "microsoft_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.microsoft_ads__ad_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads.yml/not_null_microsoft_ads__ad_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__ad_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.microsoft_ads__ad_report", "attached_node": "model.microsoft_ads.microsoft_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('microsoft_ads__ad_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_microsoft_ads__campaign_report_campaign_id.67aa50e1f8": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_microsoft_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_microsoft_ads__campaign_report_campaign_id.sql", "original_file_path": "models/microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_microsoft_ads__campaign_report_campaign_id.67aa50e1f8", "fqn": ["microsoft_ads", "not_null_microsoft_ads__campaign_report_campaign_id"], "alias": "not_null_microsoft_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.9577692, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "microsoft_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.microsoft_ads__campaign_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads.yml/not_null_microsoft_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.microsoft_ads__campaign_report", "attached_node": "model.microsoft_ads.microsoft_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('microsoft_ads__campaign_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_microsoft_ads__keyword_report_keyword_id.da1d648d3b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_microsoft_ads__keyword_report_keyword_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_microsoft_ads__keyword_report_keyword_id.sql", "original_file_path": "models/microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_microsoft_ads__keyword_report_keyword_id.da1d648d3b", "fqn": ["microsoft_ads", "not_null_microsoft_ads__keyword_report_keyword_id"], "alias": "not_null_microsoft_ads__keyword_report_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.9607952, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "microsoft_ads__keyword_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.microsoft_ads__keyword_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads.yml/not_null_microsoft_ads__keyword_report_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__keyword_report\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.microsoft_ads__keyword_report", "attached_node": "model.microsoft_ads.microsoft_ads__keyword_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('microsoft_ads__keyword_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_microsoft_ads__search_report_search_query.fa3625d66d": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_microsoft_ads__search_report_search_query", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_microsoft_ads__search_report_search_query.sql", "original_file_path": "models/microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_microsoft_ads__search_report_search_query.fa3625d66d", "fqn": ["microsoft_ads", "not_null_microsoft_ads__search_report_search_query"], "alias": "not_null_microsoft_ads__search_report_search_query", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.9633422, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "microsoft_ads__search_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.microsoft_ads__search_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads.yml/not_null_microsoft_ads__search_report_search_query.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect search_query\nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__search_report\"\nwhere search_query is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "search_query", "file_key_name": "models.microsoft_ads__search_report", "attached_node": "model.microsoft_ads.microsoft_ads__search_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "search_query", "model": "{{ get_where_subquery(ref('microsoft_ads__search_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_microsoft_ads__url_report_base_url.c1af50307a": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_microsoft_ads__url_report_base_url", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_microsoft_ads__url_report_base_url.sql", "original_file_path": "models/microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_microsoft_ads__url_report_base_url.c1af50307a", "fqn": ["microsoft_ads", "not_null_microsoft_ads__url_report_base_url"], "alias": "not_null_microsoft_ads__url_report_base_url", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"enabled": true}, "created_at": 1783708223.9665644, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(enabled=True) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "microsoft_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.microsoft_ads__url_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads.yml/not_null_microsoft_ads__url_report_base_url.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect base_url\nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__url_report\"\nwhere base_url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "base_url", "file_key_name": "models.microsoft_ads__url_report", "attached_node": "model.microsoft_ads.microsoft_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "base_url", "model": "{{ get_where_subquery(ref('microsoft_ads__url_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_microsoft_ads__campaign_country_report_account_id.9d9807033d": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_microsoft_ads__campaign_country_report_account_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_microsoft_ads__campaign_country_report_account_id.sql", "original_file_path": "models/microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_microsoft_ads__campaign_country_report_account_id.9d9807033d", "fqn": ["microsoft_ads", "not_null_microsoft_ads__campaign_country_report_account_id"], "alias": "not_null_microsoft_ads__campaign_country_report_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.9691355, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "microsoft_ads__campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.microsoft_ads__campaign_country_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads.yml/not_null_microsoft_ads__campaign_country_report_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_country_report\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.microsoft_ads__campaign_country_report", "attached_node": "model.microsoft_ads.microsoft_ads__campaign_country_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('microsoft_ads__campaign_country_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_microsoft_ads__campaign_country_report_campaign_id.10b01e8782": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_microsoft_ads__campaign_country_report_campaign_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_microsoft_ads__campaign_country_report_campaign_id.sql", "original_file_path": "models/microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_microsoft_ads__campaign_country_report_campaign_id.10b01e8782", "fqn": ["microsoft_ads", "not_null_microsoft_ads__campaign_country_report_campaign_id"], "alias": "not_null_microsoft_ads__campaign_country_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.971773, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "microsoft_ads__campaign_country_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.microsoft_ads__campaign_country_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads.yml/not_null_microsoft_ads__campaign_country_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_country_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.microsoft_ads__campaign_country_report", "attached_node": "model.microsoft_ads.microsoft_ads__campaign_country_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('microsoft_ads__campaign_country_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_microsoft_ads__campaign_region_report_account_id.b3a2b47986": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_microsoft_ads__campaign_region_report_account_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_microsoft_ads__campaign_region_report_account_id.sql", "original_file_path": "models/microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_microsoft_ads__campaign_region_report_account_id.b3a2b47986", "fqn": ["microsoft_ads", "not_null_microsoft_ads__campaign_region_report_account_id"], "alias": "not_null_microsoft_ads__campaign_region_report_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.97431, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "microsoft_ads__campaign_region_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.microsoft_ads__campaign_region_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads.yml/not_null_microsoft_ads__campaign_region_report_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_region_report\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.microsoft_ads__campaign_region_report", "attached_node": "model.microsoft_ads.microsoft_ads__campaign_region_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('microsoft_ads__campaign_region_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_microsoft_ads__campaign_region_report_campaign_id.b1d4f5a20f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_microsoft_ads__campaign_region_report_campaign_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_microsoft_ads__campaign_region_report_campaign_id.sql", "original_file_path": "models/microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_microsoft_ads__campaign_region_report_campaign_id.b1d4f5a20f", "fqn": ["microsoft_ads", "not_null_microsoft_ads__campaign_region_report_campaign_id"], "alias": "not_null_microsoft_ads__campaign_region_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708223.976788, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "microsoft_ads__campaign_region_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.microsoft_ads__campaign_region_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/microsoft_ads.yml/not_null_microsoft_ads__campaign_region_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"microsoft_ads__campaign_region_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.microsoft_ads__campaign_region_report", "attached_node": "model.microsoft_ads.microsoft_ads__campaign_region_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('microsoft_ads__campaign_region_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_stg_microsoft_ads__account_history_account_id.cc273ee54e": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_microsoft_ads__account_history_account_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_stg_microsoft_ads__account_history_account_id.sql", "original_file_path": "models/staging/stg_microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_stg_microsoft_ads__account_history_account_id.cc273ee54e", "fqn": ["microsoft_ads", "staging", "not_null_stg_microsoft_ads__account_history_account_id"], "alias": "not_null_stg_microsoft_ads__account_history_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708224.1347735, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__account_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads.yml/not_null_stg_microsoft_ads__account_history_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_history\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.stg_microsoft_ads__account_history", "attached_node": "model.microsoft_ads.stg_microsoft_ads__account_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('stg_microsoft_ads__account_history')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_stg_microsoft_ads__account_daily_report_account_id.b17f45fe79": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_microsoft_ads__account_daily_report_account_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_stg_microsoft_ads__account_daily_report_account_id.sql", "original_file_path": "models/staging/stg_microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_stg_microsoft_ads__account_daily_report_account_id.b17f45fe79", "fqn": ["microsoft_ads", "staging", "not_null_stg_microsoft_ads__account_daily_report_account_id"], "alias": "not_null_stg_microsoft_ads__account_daily_report_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708224.1374779, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__account_daily_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__account_daily_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads.yml/not_null_stg_microsoft_ads__account_daily_report_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__account_daily_report\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.stg_microsoft_ads__account_daily_report", "attached_node": "model.microsoft_ads.stg_microsoft_ads__account_daily_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('stg_microsoft_ads__account_daily_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_stg_microsoft_ads__ad_group_history_ad_group_id.c8353342b7": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_microsoft_ads__ad_group_history_ad_group_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_stg_microsoft_ads__ad_group_history_ad_group_id.sql", "original_file_path": "models/staging/stg_microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_stg_microsoft_ads__ad_group_history_ad_group_id.c8353342b7", "fqn": ["microsoft_ads", "staging", "not_null_stg_microsoft_ads__ad_group_history_ad_group_id"], "alias": "not_null_stg_microsoft_ads__ad_group_history_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708224.139982, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__ad_group_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__ad_group_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads.yml/not_null_stg_microsoft_ads__ad_group_history_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_group_history\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_microsoft_ads__ad_group_history", "attached_node": "model.microsoft_ads.stg_microsoft_ads__ad_group_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_microsoft_ads__ad_group_history')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_stg_microsoft_ads__ad_group_daily_report_ad_group_id.3e03e6eff7": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_microsoft_ads__ad_group_daily_report_ad_group_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_stg_microsoft_ads__ad_group_daily_report_ad_group_id.sql", "original_file_path": "models/staging/stg_microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_stg_microsoft_ads__ad_group_daily_report_ad_group_id.3e03e6eff7", "fqn": ["microsoft_ads", "staging", "not_null_stg_microsoft_ads__ad_group_daily_report_ad_group_id"], "alias": "not_null_stg_microsoft_ads__ad_group_daily_report_ad_group_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708224.1425173, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__ad_group_daily_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads.yml/not_null_stg_microsoft_ads__ad_group_daily_report_ad_group_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_group_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_group_daily_report\"\nwhere ad_group_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_group_id", "file_key_name": "models.stg_microsoft_ads__ad_group_daily_report", "attached_node": "model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_group_id", "model": "{{ get_where_subquery(ref('stg_microsoft_ads__ad_group_daily_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_stg_microsoft_ads__ad_history_ad_id.6d02c26574": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_microsoft_ads__ad_history_ad_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_stg_microsoft_ads__ad_history_ad_id.sql", "original_file_path": "models/staging/stg_microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_stg_microsoft_ads__ad_history_ad_id.6d02c26574", "fqn": ["microsoft_ads", "staging", "not_null_stg_microsoft_ads__ad_history_ad_id"], "alias": "not_null_stg_microsoft_ads__ad_history_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708224.1451063, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__ad_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads.yml/not_null_stg_microsoft_ads__ad_history_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_history\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_microsoft_ads__ad_history", "attached_node": "model.microsoft_ads.stg_microsoft_ads__ad_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_microsoft_ads__ad_history')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_stg_microsoft_ads__ad_daily_report_ad_id.1ed6689aa8": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_microsoft_ads__ad_daily_report_ad_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_stg_microsoft_ads__ad_daily_report_ad_id.sql", "original_file_path": "models/staging/stg_microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_stg_microsoft_ads__ad_daily_report_ad_id.1ed6689aa8", "fqn": ["microsoft_ads", "staging", "not_null_stg_microsoft_ads__ad_daily_report_ad_id"], "alias": "not_null_stg_microsoft_ads__ad_daily_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708224.147675, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__ad_daily_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__ad_daily_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads.yml/not_null_stg_microsoft_ads__ad_daily_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__ad_daily_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_microsoft_ads__ad_daily_report", "attached_node": "model.microsoft_ads.stg_microsoft_ads__ad_daily_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_microsoft_ads__ad_daily_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_stg_microsoft_ads__campaign_history_campaign_id.ee080a2122": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_microsoft_ads__campaign_history_campaign_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_stg_microsoft_ads__campaign_history_campaign_id.sql", "original_file_path": "models/staging/stg_microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_stg_microsoft_ads__campaign_history_campaign_id.ee080a2122", "fqn": ["microsoft_ads", "staging", "not_null_stg_microsoft_ads__campaign_history_campaign_id"], "alias": "not_null_stg_microsoft_ads__campaign_history_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708224.150196, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__campaign_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads.yml/not_null_stg_microsoft_ads__campaign_history_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_history\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_microsoft_ads__campaign_history", "attached_node": "model.microsoft_ads.stg_microsoft_ads__campaign_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_microsoft_ads__campaign_history')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_stg_microsoft_ads__campaign_daily_report_campaign_id.8ac0418e84": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_microsoft_ads__campaign_daily_report_campaign_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_stg_microsoft_ads__campaign_daily_report_campaign_id.sql", "original_file_path": "models/staging/stg_microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_stg_microsoft_ads__campaign_daily_report_campaign_id.8ac0418e84", "fqn": ["microsoft_ads", "staging", "not_null_stg_microsoft_ads__campaign_daily_report_campaign_id"], "alias": "not_null_stg_microsoft_ads__campaign_daily_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708224.1526682, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__campaign_daily_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__campaign_daily_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads.yml/not_null_stg_microsoft_ads__campaign_daily_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__campaign_daily_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_microsoft_ads__campaign_daily_report", "attached_node": "model.microsoft_ads.stg_microsoft_ads__campaign_daily_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_microsoft_ads__campaign_daily_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_stg_microsoft_ads__keyword_history_keyword_id.19164a6209": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_microsoft_ads__keyword_history_keyword_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_stg_microsoft_ads__keyword_history_keyword_id.sql", "original_file_path": "models/staging/stg_microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_stg_microsoft_ads__keyword_history_keyword_id.19164a6209", "fqn": ["microsoft_ads", "staging", "not_null_stg_microsoft_ads__keyword_history_keyword_id"], "alias": "not_null_stg_microsoft_ads__keyword_history_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708224.1552837, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__keyword_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__keyword_history"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads.yml/not_null_stg_microsoft_ads__keyword_history_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__keyword_history\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.stg_microsoft_ads__keyword_history", "attached_node": "model.microsoft_ads.stg_microsoft_ads__keyword_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('stg_microsoft_ads__keyword_history')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_stg_microsoft_ads__keyword_daily_report_keyword_id.e16b8c5047": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_microsoft_ads__keyword_daily_report_keyword_id", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_stg_microsoft_ads__keyword_daily_report_keyword_id.sql", "original_file_path": "models/staging/stg_microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_stg_microsoft_ads__keyword_daily_report_keyword_id.e16b8c5047", "fqn": ["microsoft_ads", "staging", "not_null_stg_microsoft_ads__keyword_daily_report_keyword_id"], "alias": "not_null_stg_microsoft_ads__keyword_daily_report_keyword_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708224.1577857, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__keyword_daily_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__keyword_daily_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads.yml/not_null_stg_microsoft_ads__keyword_daily_report_keyword_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect keyword_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__keyword_daily_report\"\nwhere keyword_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "keyword_id", "file_key_name": "models.stg_microsoft_ads__keyword_daily_report", "attached_node": "model.microsoft_ads.stg_microsoft_ads__keyword_daily_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "keyword_id", "model": "{{ get_where_subquery(ref('stg_microsoft_ads__keyword_daily_report')) }}"}, "namespace": null}}, "test.microsoft_ads.not_null_stg_microsoft_ads__search_daily_report_search_query.57f687adcc": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_microsoft_ads__search_daily_report_search_query", "resource_type": "test", "package_name": "microsoft_ads", "path": "not_null_stg_microsoft_ads__search_daily_report_search_query.sql", "original_file_path": "models/staging/stg_microsoft_ads.yml", "unique_id": "test.microsoft_ads.not_null_stg_microsoft_ads__search_daily_report_search_query.57f687adcc", "fqn": ["microsoft_ads", "staging", "not_null_stg_microsoft_ads__search_daily_report_search_query"], "alias": "not_null_stg_microsoft_ads__search_daily_report_search_query", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708224.160301, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_microsoft_ads__search_daily_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.microsoft_ads.stg_microsoft_ads__search_daily_report"]}, "compiled_path": "target/compiled/microsoft_ads/models/staging/stg_microsoft_ads.yml/not_null_stg_microsoft_ads__search_daily_report_search_query.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect search_query\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_microsoft_ads__search_daily_report\"\nwhere search_query is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "search_query", "file_key_name": "models.stg_microsoft_ads__search_daily_report", "attached_node": "model.microsoft_ads.stg_microsoft_ads__search_daily_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "search_query", "model": "{{ get_where_subquery(ref('stg_microsoft_ads__search_daily_report')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_facebook_ads__url_report_base_url.b7757e50be": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_facebook_ads__url_report_base_url", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_facebook_ads__url_report_base_url.sql", "original_file_path": "models/facebook.yml", "unique_id": "test.facebook_ads.not_null_facebook_ads__url_report_base_url.b7757e50be", "fqn": ["facebook_ads", "not_null_facebook_ads__url_report_base_url"], "alias": "not_null_facebook_ads__url_report_base_url", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"enabled": true}, "created_at": 1783708224.2001033, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(enabled=True) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "facebook_ads__url_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.facebook_ads__url_report"]}, "compiled_path": "target/compiled/facebook_ads/models/facebook.yml/not_null_facebook_ads__url_report_base_url.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect base_url\nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__url_report\"\nwhere base_url is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "base_url", "file_key_name": "models.facebook_ads__url_report", "attached_node": "model.facebook_ads.facebook_ads__url_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "base_url", "model": "{{ get_where_subquery(ref('facebook_ads__url_report')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_facebook_ads__ad_report_ad_id.3811d9c238": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_facebook_ads__ad_report_ad_id", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_facebook_ads__ad_report_ad_id.sql", "original_file_path": "models/facebook.yml", "unique_id": "test.facebook_ads.not_null_facebook_ads__ad_report_ad_id.3811d9c238", "fqn": ["facebook_ads", "not_null_facebook_ads__ad_report_ad_id"], "alias": "not_null_facebook_ads__ad_report_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708224.2026947, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "facebook_ads__ad_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.facebook_ads__ad_report"]}, "compiled_path": "target/compiled/facebook_ads/models/facebook.yml/not_null_facebook_ads__ad_report_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__ad_report\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.facebook_ads__ad_report", "attached_node": "model.facebook_ads.facebook_ads__ad_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('facebook_ads__ad_report')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_facebook_ads__ad_set_report_ad_set_id.1ac870f5e4": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_facebook_ads__ad_set_report_ad_set_id", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_facebook_ads__ad_set_report_ad_set_id.sql", "original_file_path": "models/facebook.yml", "unique_id": "test.facebook_ads.not_null_facebook_ads__ad_set_report_ad_set_id.1ac870f5e4", "fqn": ["facebook_ads", "not_null_facebook_ads__ad_set_report_ad_set_id"], "alias": "not_null_facebook_ads__ad_set_report_ad_set_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708224.2053509, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "facebook_ads__ad_set_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.facebook_ads__ad_set_report"]}, "compiled_path": "target/compiled/facebook_ads/models/facebook.yml/not_null_facebook_ads__ad_set_report_ad_set_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_set_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__ad_set_report\"\nwhere ad_set_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_set_id", "file_key_name": "models.facebook_ads__ad_set_report", "attached_node": "model.facebook_ads.facebook_ads__ad_set_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_set_id", "model": "{{ get_where_subquery(ref('facebook_ads__ad_set_report')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_facebook_ads__campaign_report_campaign_id.d4f96d8d21": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_facebook_ads__campaign_report_campaign_id", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_facebook_ads__campaign_report_campaign_id.sql", "original_file_path": "models/facebook.yml", "unique_id": "test.facebook_ads.not_null_facebook_ads__campaign_report_campaign_id.d4f96d8d21", "fqn": ["facebook_ads", "not_null_facebook_ads__campaign_report_campaign_id"], "alias": "not_null_facebook_ads__campaign_report_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708224.2079074, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "facebook_ads__campaign_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.facebook_ads__campaign_report"]}, "compiled_path": "target/compiled/facebook_ads/models/facebook.yml/not_null_facebook_ads__campaign_report_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__campaign_report\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.facebook_ads__campaign_report", "attached_node": "model.facebook_ads.facebook_ads__campaign_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('facebook_ads__campaign_report')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_facebook_ads__account_report_account_id.9be02b4024": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_facebook_ads__account_report_account_id", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_facebook_ads__account_report_account_id.sql", "original_file_path": "models/facebook.yml", "unique_id": "test.facebook_ads.not_null_facebook_ads__account_report_account_id.9be02b4024", "fqn": ["facebook_ads", "not_null_facebook_ads__account_report_account_id"], "alias": "not_null_facebook_ads__account_report_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708224.2104576, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "facebook_ads__account_report", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.facebook_ads__account_report"]}, "compiled_path": "target/compiled/facebook_ads/models/facebook.yml/not_null_facebook_ads__account_report_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__account_report\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.facebook_ads__account_report", "attached_node": "model.facebook_ads.facebook_ads__account_report", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('facebook_ads__account_report')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_facebook_ads__url_tags__fivetran_id.151d9515f3": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_facebook_ads__url_tags__fivetran_id", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_facebook_ads__url_tags__fivetran_id.sql", "original_file_path": "models/facebook.yml", "unique_id": "test.facebook_ads.not_null_facebook_ads__url_tags__fivetran_id.151d9515f3", "fqn": ["facebook_ads", "not_null_facebook_ads__url_tags__fivetran_id"], "alias": "not_null_facebook_ads__url_tags__fivetran_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708224.2129784, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "facebook_ads__url_tags", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.facebook_ads__url_tags"]}, "compiled_path": "target/compiled/facebook_ads/models/facebook.yml/not_null_facebook_ads__url_tags__fivetran_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect _fivetran_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"facebook_ads__url_tags\"\nwhere _fivetran_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "_fivetran_id", "file_key_name": "models.facebook_ads__url_tags", "attached_node": "model.facebook_ads.facebook_ads__url_tags", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_fivetran_id", "model": "{{ get_where_subquery(ref('facebook_ads__url_tags')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_stg_facebook_ads__account_history_account_id.f1cf38c40f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_facebook_ads__account_history_account_id", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_stg_facebook_ads__account_history_account_id.sql", "original_file_path": "models/staging/stg_facebook_ads.yml", "unique_id": "test.facebook_ads.not_null_stg_facebook_ads__account_history_account_id.f1cf38c40f", "fqn": ["facebook_ads", "staging", "not_null_stg_facebook_ads__account_history_account_id"], "alias": "not_null_stg_facebook_ads__account_history_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708224.2635596, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.stg_facebook_ads__account_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads.yml/not_null_stg_facebook_ads__account_history_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__account_history\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.stg_facebook_ads__account_history", "attached_node": "model.facebook_ads.stg_facebook_ads__account_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('stg_facebook_ads__account_history')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_stg_facebook_ads__account_history__fivetran_synced.0570e35e1f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_facebook_ads__account_history__fivetran_synced", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_stg_facebook_ads__account_history__fivetran_synced.sql", "original_file_path": "models/staging/stg_facebook_ads.yml", "unique_id": "test.facebook_ads.not_null_stg_facebook_ads__account_history__fivetran_synced.0570e35e1f", "fqn": ["facebook_ads", "staging", "not_null_stg_facebook_ads__account_history__fivetran_synced"], "alias": "not_null_stg_facebook_ads__account_history__fivetran_synced", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708224.2661655, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.stg_facebook_ads__account_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads.yml/not_null_stg_facebook_ads__account_history__fivetran_synced.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect _fivetran_synced\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__account_history\"\nwhere _fivetran_synced is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "_fivetran_synced", "file_key_name": "models.stg_facebook_ads__account_history", "attached_node": "model.facebook_ads.stg_facebook_ads__account_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_fivetran_synced", "model": "{{ get_where_subquery(ref('stg_facebook_ads__account_history')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_stg_facebook_ads__ad_history_ad_id.11429d3064": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_facebook_ads__ad_history_ad_id", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_stg_facebook_ads__ad_history_ad_id.sql", "original_file_path": "models/staging/stg_facebook_ads.yml", "unique_id": "test.facebook_ads.not_null_stg_facebook_ads__ad_history_ad_id.11429d3064", "fqn": ["facebook_ads", "staging", "not_null_stg_facebook_ads__ad_history_ad_id"], "alias": "not_null_stg_facebook_ads__ad_history_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708224.2687018, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.stg_facebook_ads__ad_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads.yml/not_null_stg_facebook_ads__ad_history_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_history\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_facebook_ads__ad_history", "attached_node": "model.facebook_ads.stg_facebook_ads__ad_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_facebook_ads__ad_history')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_stg_facebook_ads__ad_history_updated_at.250a5a84e4": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_facebook_ads__ad_history_updated_at", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_stg_facebook_ads__ad_history_updated_at.sql", "original_file_path": "models/staging/stg_facebook_ads.yml", "unique_id": "test.facebook_ads.not_null_stg_facebook_ads__ad_history_updated_at.250a5a84e4", "fqn": ["facebook_ads", "staging", "not_null_stg_facebook_ads__ad_history_updated_at"], "alias": "not_null_stg_facebook_ads__ad_history_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708224.271315, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__ad_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.stg_facebook_ads__ad_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads.yml/not_null_stg_facebook_ads__ad_history_updated_at.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect updated_at\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_history\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "models.stg_facebook_ads__ad_history", "attached_node": "model.facebook_ads.stg_facebook_ads__ad_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(ref('stg_facebook_ads__ad_history')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_stg_facebook_ads__ad_set_history_ad_set_id.e19a1df1bb": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_facebook_ads__ad_set_history_ad_set_id", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_stg_facebook_ads__ad_set_history_ad_set_id.sql", "original_file_path": "models/staging/stg_facebook_ads.yml", "unique_id": "test.facebook_ads.not_null_stg_facebook_ads__ad_set_history_ad_set_id.e19a1df1bb", "fqn": ["facebook_ads", "staging", "not_null_stg_facebook_ads__ad_set_history_ad_set_id"], "alias": "not_null_stg_facebook_ads__ad_set_history_ad_set_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708224.2738316, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__ad_set_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.stg_facebook_ads__ad_set_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads.yml/not_null_stg_facebook_ads__ad_set_history_ad_set_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_set_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_set_history\"\nwhere ad_set_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_set_id", "file_key_name": "models.stg_facebook_ads__ad_set_history", "attached_node": "model.facebook_ads.stg_facebook_ads__ad_set_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_set_id", "model": "{{ get_where_subquery(ref('stg_facebook_ads__ad_set_history')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_stg_facebook_ads__ad_set_history_updated_at.ef7fafe0fa": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_facebook_ads__ad_set_history_updated_at", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_stg_facebook_ads__ad_set_history_updated_at.sql", "original_file_path": "models/staging/stg_facebook_ads.yml", "unique_id": "test.facebook_ads.not_null_stg_facebook_ads__ad_set_history_updated_at.ef7fafe0fa", "fqn": ["facebook_ads", "staging", "not_null_stg_facebook_ads__ad_set_history_updated_at"], "alias": "not_null_stg_facebook_ads__ad_set_history_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708224.2763484, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__ad_set_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.stg_facebook_ads__ad_set_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads.yml/not_null_stg_facebook_ads__ad_set_history_updated_at.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect updated_at\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__ad_set_history\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "models.stg_facebook_ads__ad_set_history", "attached_node": "model.facebook_ads.stg_facebook_ads__ad_set_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(ref('stg_facebook_ads__ad_set_history')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_stg_facebook_ads__campaign_history_campaign_id.1ca7a83852": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_facebook_ads__campaign_history_campaign_id", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_stg_facebook_ads__campaign_history_campaign_id.sql", "original_file_path": "models/staging/stg_facebook_ads.yml", "unique_id": "test.facebook_ads.not_null_stg_facebook_ads__campaign_history_campaign_id.1ca7a83852", "fqn": ["facebook_ads", "staging", "not_null_stg_facebook_ads__campaign_history_campaign_id"], "alias": "not_null_stg_facebook_ads__campaign_history_campaign_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708224.278856, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.stg_facebook_ads__campaign_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads.yml/not_null_stg_facebook_ads__campaign_history_campaign_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect campaign_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__campaign_history\"\nwhere campaign_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "campaign_id", "file_key_name": "models.stg_facebook_ads__campaign_history", "attached_node": "model.facebook_ads.stg_facebook_ads__campaign_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "campaign_id", "model": "{{ get_where_subquery(ref('stg_facebook_ads__campaign_history')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_stg_facebook_ads__campaign_history_updated_at.9e59f99270": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_facebook_ads__campaign_history_updated_at", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_stg_facebook_ads__campaign_history_updated_at.sql", "original_file_path": "models/staging/stg_facebook_ads.yml", "unique_id": "test.facebook_ads.not_null_stg_facebook_ads__campaign_history_updated_at.9e59f99270", "fqn": ["facebook_ads", "staging", "not_null_stg_facebook_ads__campaign_history_updated_at"], "alias": "not_null_stg_facebook_ads__campaign_history_updated_at", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708224.2813618, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__campaign_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.stg_facebook_ads__campaign_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads.yml/not_null_stg_facebook_ads__campaign_history_updated_at.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect updated_at\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__campaign_history\"\nwhere updated_at is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "updated_at", "file_key_name": "models.stg_facebook_ads__campaign_history", "attached_node": "model.facebook_ads.stg_facebook_ads__campaign_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "updated_at", "model": "{{ get_where_subquery(ref('stg_facebook_ads__campaign_history')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_stg_facebook_ads__creative_history__fivetran_synced.3b0593cb4f": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_facebook_ads__creative_history__fivetran_synced", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_stg_facebook_ads__creative_history__fivetran_synced.sql", "original_file_path": "models/staging/stg_facebook_ads.yml", "unique_id": "test.facebook_ads.not_null_stg_facebook_ads__creative_history__fivetran_synced.3b0593cb4f", "fqn": ["facebook_ads", "staging", "not_null_stg_facebook_ads__creative_history__fivetran_synced"], "alias": "not_null_stg_facebook_ads__creative_history__fivetran_synced", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708224.283961, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__creative_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.stg_facebook_ads__creative_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads.yml/not_null_stg_facebook_ads__creative_history__fivetran_synced.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect _fivetran_synced\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__creative_history\"\nwhere _fivetran_synced is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "_fivetran_synced", "file_key_name": "models.stg_facebook_ads__creative_history", "attached_node": "model.facebook_ads.stg_facebook_ads__creative_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "_fivetran_synced", "model": "{{ get_where_subquery(ref('stg_facebook_ads__creative_history')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_stg_facebook_ads__creative_history_creative_id.eb4d804261": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_facebook_ads__creative_history_creative_id", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_stg_facebook_ads__creative_history_creative_id.sql", "original_file_path": "models/staging/stg_facebook_ads.yml", "unique_id": "test.facebook_ads.not_null_stg_facebook_ads__creative_history_creative_id.eb4d804261", "fqn": ["facebook_ads", "staging", "not_null_stg_facebook_ads__creative_history_creative_id"], "alias": "not_null_stg_facebook_ads__creative_history_creative_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708224.286485, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__creative_history", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.stg_facebook_ads__creative_history"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads.yml/not_null_stg_facebook_ads__creative_history_creative_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect creative_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__creative_history\"\nwhere creative_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "creative_id", "file_key_name": "models.stg_facebook_ads__creative_history", "attached_node": "model.facebook_ads.stg_facebook_ads__creative_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "creative_id", "model": "{{ get_where_subquery(ref('stg_facebook_ads__creative_history')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_stg_facebook_ads__basic_ad_ad_id.2611b250fc": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_facebook_ads__basic_ad_ad_id", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_stg_facebook_ads__basic_ad_ad_id.sql", "original_file_path": "models/staging/stg_facebook_ads.yml", "unique_id": "test.facebook_ads.not_null_stg_facebook_ads__basic_ad_ad_id.2611b250fc", "fqn": ["facebook_ads", "staging", "not_null_stg_facebook_ads__basic_ad_ad_id"], "alias": "not_null_stg_facebook_ads__basic_ad_ad_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708224.2889626, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__basic_ad", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.stg_facebook_ads__basic_ad"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads.yml/not_null_stg_facebook_ads__basic_ad_ad_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect ad_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad\"\nwhere ad_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "ad_id", "file_key_name": "models.stg_facebook_ads__basic_ad", "attached_node": "model.facebook_ads.stg_facebook_ads__basic_ad", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "ad_id", "model": "{{ get_where_subquery(ref('stg_facebook_ads__basic_ad')) }}"}, "namespace": null}}, "test.facebook_ads.not_null_stg_facebook_ads__basic_ad_account_id.d06f6d861b": {"database": "postgres", "schema": "public_dbt_test__audit", "name": "not_null_stg_facebook_ads__basic_ad_account_id", "resource_type": "test", "package_name": "facebook_ads", "path": "not_null_stg_facebook_ads__basic_ad_account_id.sql", "original_file_path": "models/staging/stg_facebook_ads.yml", "unique_id": "test.facebook_ads.not_null_stg_facebook_ads__basic_ad_account_id.d06f6d861b", "fqn": ["facebook_ads", "staging", "not_null_stg_facebook_ads__basic_ad_account_id"], "alias": "not_null_stg_facebook_ads__basic_ad_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1783708224.2914557, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "doc_blocks": [], "language": "sql", "refs": [{"name": "stg_facebook_ads__basic_ad", "package": null, "version": null}], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.facebook_ads.stg_facebook_ads__basic_ad"]}, "compiled_path": "target/compiled/facebook_ads/models/staging/stg_facebook_ads.yml/not_null_stg_facebook_ads__basic_ad_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"public_ad_reporting_dev\".\"stg_facebook_ads__basic_ad\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.stg_facebook_ads__basic_ad", "attached_node": "model.facebook_ads.stg_facebook_ads__basic_ad", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('stg_facebook_ads__basic_ad')) }}"}, "namespace": null}}}, "sources": {"source.linkedin.linkedin_ads.ad_analytics_by_creative": {"database": "postgres", "schema": "public", "name": "ad_analytics_by_creative", "resource_type": "source", "package_name": "linkedin", "path": "models/staging/src_linkedin.yml", "original_file_path": "models/staging/src_linkedin.yml", "unique_id": "source.linkedin.linkedin_ads.ad_analytics_by_creative", "fqn": ["linkedin", "staging", "linkedin_ads", "ad_analytics_by_creative"], "source_name": "linkedin_ads", "source_description": "", "loader": "fivetran", "identifier": "linkedin_ad_analytics_by_creative_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents the daily performance of ads at the creative level.", "columns": {"creative_id": {"name": "creative_id", "description": "The ID of the related creative.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "day": {"name": "day", "description": "The day of the activity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_in_local_currency": {"name": "cost_in_local_currency", "description": "The cost of the ads in the local currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_in_usd": {"name": "cost_in_usd", "description": "The cost of the ads in the USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"linkedin_ad_analytics_by_creative_data\"", "created_at": 1783708224.3233132, "unrendered_database": "{% if target.type != 'spark'%}{{ var('linkedin_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('linkedin_ads_schema', 'linkedin_ads') }}", "doc_blocks": []}, "source.linkedin.linkedin_ads.creative_history": {"database": "postgres", "schema": "public", "name": "creative_history", "resource_type": "source", "package_name": "linkedin", "path": "models/staging/src_linkedin.yml", "original_file_path": "models/staging/src_linkedin.yml", "unique_id": "source.linkedin.linkedin_ads.creative_history", "fqn": ["linkedin", "staging", "linkedin_ads", "creative_history"], "source_name": "linkedin_ads", "source_description": "", "loader": "fivetran", "identifier": "linkedin_ad_creative_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a 'version' of a creative.", "columns": {"id": {"name": "id", "description": "Unique internal ID representing the creative.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_time": {"name": "last_modified_time", "description": "The timestamp of when the version was updated (Linkedin Ads pre-January 2023 API Update).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_at": {"name": "last_modified_at", "description": "The timestamp of when the version was updated (Linkedin Ads post-January 2023 API Update).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_time": {"name": "created_time", "description": "The timestamp of when the creative was created (Linkedin Ads pre-January 2023 API Update).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp of when the creative was created (Linkedin Ads post-January 2023 API Update).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign the creative belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_uri": {"name": "click_uri", "description": "Deprecated url field. Please refer to the text_ad_landing_page and spotlight_landing_page fields for relevant landing page information.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "text_ad_landing_page": {"name": "text_ad_landing_page", "description": "The URL where the member should be redirected to, on clicking the text ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spotlight_landing_page": {"name": "spotlight_landing_page", "description": "The URL where the member should be redirected to, on clicking the spotlight ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "intended_status": {"name": "intended_status", "description": "ACTIVE - Creative creation is complete and creative is available for review and serve.\nPAUSED - Creative creation is complete and creative is current, but should temporarily not be served. This status is not valid upon creation.\nDRAFT - Creative creation is incomplete and may still be edited.\nARCHIVED - Creative creation is complete, but creative should not be served and should be separated from non-archived creatives in any UI.\nCANCELED - Creative is permanently canceled.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"linkedin_ad_creative_history_data\"", "created_at": 1783708224.3254945, "unrendered_database": "{% if target.type != 'spark'%}{{ var('linkedin_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('linkedin_ads_schema', 'linkedin_ads') }}", "doc_blocks": []}, "source.linkedin.linkedin_ads.campaign_history": {"database": "postgres", "schema": "public", "name": "campaign_history", "resource_type": "source", "package_name": "linkedin", "path": "models/staging/src_linkedin.yml", "original_file_path": "models/staging/src_linkedin.yml", "unique_id": "source.linkedin.linkedin_ads.campaign_history", "fqn": ["linkedin", "staging", "linkedin_ads", "campaign_history"], "source_name": "linkedin_ads", "source_description": "", "loader": "fivetran", "identifier": "linkedin_ad_campaign_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a 'version' of a campaign.", "columns": {"id": {"name": "id", "description": "Unique internal ID representing the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_time": {"name": "last_modified_time", "description": "The timestamp of when the version was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the account the campaign belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_group_id": {"name": "campaign_group_id", "description": "The ID of the campaign group the campaign belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_time": {"name": "created_time", "description": "The timestamp of when the campaign was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "A label for the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "version_tag": {"name": "version_tag", "description": "An integer representation of the version of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "audience_expansion_enabled": {"name": "audience_expansion_enabled", "description": "Boolean (default=false) representing whether Audience Expansion is enabled for the campaign provides query expansion for certain targeting criteria.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_type": {"name": "cost_type", "description": "CPM - Cost per thousand advertising impressions. If type=SPONSORED_INMAILS; cost per send(CPS) is measured as CPM x 1000.\nCPC- Cost per individual click on the associated link.\nCPV- Cost per view for video ads.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_selection": {"name": "creative_selection", "description": "ROUND_ROBIN - Rotate through available creatives to serve them as evenly as possible.\nOPTIMIZED (default) - Bias selection taking into account such as expected performance. Not available for Message and Conversation Ads (type=SPONSORED_INMAILS).\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_amount": {"name": "daily_budget_amount", "description": "Maximum amount to spend per day UTC. The amount of money as a real number string.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_currency_code": {"name": "daily_budget_currency_code", "description": "ISO currency code. The currency must match that of the parent account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "format": {"name": "format", "description": "The ad format on the campaign level. See https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads/campaign-formats?view=li-lms-2022-07", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "locale_country": {"name": "locale_country", "description": "Locale of the campaign. An uppercase two-letter country code as defined by ISO-3166.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "locale_language": {"name": "locale_language", "description": "Locale of the campaign. A lowercase two-letter language code as defined by ISO-639.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective_type": {"name": "objective_type", "description": "Campaign Objective type values. Click [here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ad-budget-pricing-type-combinations?view=li-lms-2022-07) for Campaign Objective descriptions. One of: - BRAND_AWARENESS - ENGAGEMENT - JOB_APPLICANTS - LEAD_GENERATION - WEBSITE_CONVERSIONS - WEBSITE_VISITS - VIDEO_VIEWS\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "offsite_delivery_enabled": {"name": "offsite_delivery_enabled", "description": "Boolean indicating if this campaign to allowed to be served on the LinkedIn Audience Network to extend the reach of your campaign by delivering ads beyond the LinkedIn feed to members on third-party apps and sites.\t(default will be \"True\" from June 30, 2022)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "optimization_target_type": {"name": "optimization_target_type", "description": "Determines how this campaign is optimized for spending. If this is not set, there is no optimization. Refer to the documentation here. Default = 'NONE'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_start": {"name": "run_schedule_start", "description": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the inclusive (greater than or equal to) value in which to start the range.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_end": {"name": "run_schedule_end", "description": "Scheduled date range to run associated creatives. The start date must be non-null. Represents the exclusive (strictly less than) value in which to end the range, if provided.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "ACTIVE - Denotes that the campaign is fully servable.\nPAUSED - Denotes that the campaign meets all requirements to be served, but temporarily should not be.\nARCHIVED - Denotes that the campaign is presently inactive, and should mostly be hidden in the UI until un-archived.\nCOMPLETED - Denotes that the campaign has reached a specified budgetary or chronological limit.\nCANCELED - Denotes that the campaign has been permanently canceled, such as when an advertising account is permanently closed.\nDRAFT - Denotes that the campaign is still being edited and not eligible for serving. Some validation will be postponed until the campaign is activated.\nPENDING_DELETION - Denotes that the campaign has been requested to be deleted that is currently pending.\nREMOVED - Denotes that the campaign was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "type": {"name": "type", "description": "TEXT_AD - Text-based ads that show up in the right column or top of the page on LinkedIn.\nSPONSORED_UPDATES - Native ads that promote a company's content updates in the LinkedIn feed.\nSPONSORED_INMAILS - Personalized messages with a call-to-action button delivered to a LinkedIn's member inbox.\nDYNAMIC - Ads that are dynamically personalized.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "unit_cost_amount": {"name": "unit_cost_amount", "description": "This value is used as one of the following: amount to bid (for manual bidding), amount which is the target cost (for target cost bidding) per click, impression, or other event depending on the pricing model, or cost cap (for cost cap bidding). The amount of money as a real number string. The amount should be non-negative if the bidding strategy is manual, target cost, or cost cap bidding. The default is 0 with the currency code set to match that of the associated account.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "unit_cost_currency_code": {"name": "unit_cost_currency_code", "description": "Amount to bid per click, impression, or other event depending on the pricing model. The default is 0 with the currency code set to match that of the associated account. ISO currency code.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"linkedin_ad_campaign_history_data\"", "created_at": 1783708224.326389, "unrendered_database": "{% if target.type != 'spark'%}{{ var('linkedin_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('linkedin_ads_schema', 'linkedin_ads') }}", "doc_blocks": []}, "source.linkedin.linkedin_ads.campaign_group_history": {"database": "postgres", "schema": "public", "name": "campaign_group_history", "resource_type": "source", "package_name": "linkedin", "path": "models/staging/src_linkedin.yml", "original_file_path": "models/staging/src_linkedin.yml", "unique_id": "source.linkedin.linkedin_ads.campaign_group_history", "fqn": ["linkedin", "staging", "linkedin_ads", "campaign_group_history"], "source_name": "linkedin_ads", "source_description": "", "loader": "fivetran", "identifier": "linkedin_ad_campaign_group_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a 'version' of a campaign group.", "columns": {"id": {"name": "id", "description": "Unique internal ID representing the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_time": {"name": "last_modified_time", "description": "The timestamp of when the version was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the account the campaign group belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_time": {"name": "created_time", "description": "The timestamp of when the campaign group was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "A label for the campaign group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "backfilled": {"name": "backfilled", "description": "Flag that denotes whether the campaign group was created organically or to backfill existing campaigns. This is a read-only field set by the system. Default = false", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_start": {"name": "run_schedule_start", "description": "Represents the inclusive (greater than or equal to) date when to start running the associated campaigns under this campaign group. This field is required.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "run_schedule_end": {"name": "run_schedule_end", "description": "Represents the exclusive (strictly less than) date when to stop running the associated campaigns under this campaign group. If this field is unset, it indicates an open range with no end date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Status of campaign group. Possible values are: ACTIVE - Denotes that the campaign group is capable of serving ads, subject to run date and budget limitations (as well as any other limitations at the account or campaign level). ARCHIVED - Denotes that the campaign group is presently inactive, and should mostly be hidden in the UI until un-archived. CANCELLED - Denotes that the campaign group has been permanently canceled and cannot be reactivated. Not a settable status. DRAFT - Denotes that the campaign group is in a preliminary state and should temporarily not be served. PAUSED - Denotes that the campaign group meets all requirements to be served, but temporarily should not be. PENDING_DELETION - Denotes that the campaign group has been requested to be deleted that is currently pending. REMOVED - Denoted that the campaign group was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"linkedin_ad_campaign_group_history_data\"", "created_at": 1783708224.3270795, "unrendered_database": "{% if target.type != 'spark'%}{{ var('linkedin_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('linkedin_ads_schema', 'linkedin_ads') }}", "doc_blocks": []}, "source.linkedin.linkedin_ads.account_history": {"database": "postgres", "schema": "public", "name": "account_history", "resource_type": "source", "package_name": "linkedin", "path": "models/staging/src_linkedin.yml", "original_file_path": "models/staging/src_linkedin.yml", "unique_id": "source.linkedin.linkedin_ads.account_history", "fqn": ["linkedin", "staging", "linkedin_ads", "account_history"], "source_name": "linkedin_ads", "source_description": "", "loader": "fivetran", "identifier": "linkedin_ad_account_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a 'version' of an account.", "columns": {"id": {"name": "id", "description": "Unique internal ID representing the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "last_modified_time": {"name": "last_modified_time", "description": "The timestamp of when the version was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_time": {"name": "created_time", "description": "The timestamp of when the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "A label for the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The ISO 4217 currency code of the account, such as 'USD' for United States Dollar (default).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "version_tag": {"name": "version_tag", "description": "An integer representation of the version of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "notified_on_campaign_optimization": {"name": "notified_on_campaign_optimization", "description": "Boolean (default=false) indicating if the campaign contact is notified about campaign optimization opportunities", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "notified_on_creative_approval": {"name": "notified_on_creative_approval", "description": "Boolean (default=false) indicating if the creative contact is notified when a creative has been reviewed and approved", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "notified_on_creative_rejection": {"name": "notified_on_creative_rejection", "description": "Boolean (default=false) indicating if the creative contact is notified when a creative has been rejected due to content", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "notified_on_end_of_campaign": {"name": "notified_on_end_of_campaign", "description": "Boolean (default=false) indicating if the campaign contact is notified when an associated campaign has been completed", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "ACTIVE - Account is active; this is the default state\nCANCELLED - Account has been permanently cancelled\nDRAFT - Account is in draft status, meaning it's not yet fully set up and it is not serving\nPENDING_DELETION - Denotes that the account has been requested to be deleted that is currently pending\nREMOVED - Denotes that the account was deleted, but must remain fetchable due to the existence of performance data.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "type": {"name": "type", "description": "BUSINESS - This is the only value allowed when creating accounts through the API.\nENTERPRISE - This value cannot be used to create accounts through the API and is reserved for accounts created by LinkedIn's internal ad operations systems.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"linkedin_ad_account_history_data\"", "created_at": 1783708224.3277712, "unrendered_database": "{% if target.type != 'spark'%}{{ var('linkedin_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('linkedin_ads_schema', 'linkedin_ads') }}", "doc_blocks": []}, "source.linkedin.linkedin_ads.ad_analytics_by_campaign": {"database": "postgres", "schema": "public", "name": "ad_analytics_by_campaign", "resource_type": "source", "package_name": "linkedin", "path": "models/staging/src_linkedin.yml", "original_file_path": "models/staging/src_linkedin.yml", "unique_id": "source.linkedin.linkedin_ads.ad_analytics_by_campaign", "fqn": ["linkedin", "staging", "linkedin_ads", "ad_analytics_by_campaign"], "source_name": "linkedin_ads", "source_description": "", "loader": "fivetran", "identifier": "linkedin_ad_analytics_by_campaign_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents the daily performance of ads at the campaign level.", "columns": {"campaign_id": {"name": "campaign_id", "description": "The ID of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "day": {"name": "day", "description": "The day of the activity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_in_local_currency": {"name": "cost_in_local_currency", "description": "The cost of the ads in the local currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_in_usd": {"name": "cost_in_usd", "description": "The cost of the ads in the USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"linkedin_ad_analytics_by_campaign_data\"", "created_at": 1783708224.3284411, "unrendered_database": "{% if target.type != 'spark'%}{{ var('linkedin_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('linkedin_ads_schema', 'linkedin_ads') }}", "doc_blocks": []}, "source.linkedin.linkedin_ads.geo": {"database": "postgres", "schema": "public", "name": "geo", "resource_type": "source", "package_name": "linkedin", "path": "models/staging/src_linkedin.yml", "original_file_path": "models/staging/src_linkedin.yml", "unique_id": "source.linkedin.linkedin_ads.geo", "fqn": ["linkedin", "staging", "linkedin_ads", "geo"], "source_name": "linkedin_ads", "source_description": "", "loader": "fivetran", "identifier": "linkedin_geo_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Contains geographic data for LinkedIn Ads, including IDs and names of locations.", "columns": {"id": {"name": "id", "description": "Unique identifier for the geographic entity, used for joins in reporting tables.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "value": {"name": "value", "description": "Name of the geographic entity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"linkedin_geo_data\"", "created_at": 1783708224.3290777, "unrendered_database": "{% if target.type != 'spark'%}{{ var('linkedin_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('linkedin_ads_schema', 'linkedin_ads') }}", "doc_blocks": []}, "source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_country": {"database": "postgres", "schema": "public", "name": "monthly_ad_analytics_by_member_country", "resource_type": "source", "package_name": "linkedin", "path": "models/staging/src_linkedin.yml", "original_file_path": "models/staging/src_linkedin.yml", "unique_id": "source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_country", "fqn": ["linkedin", "staging", "linkedin_ads", "monthly_ad_analytics_by_member_country"], "source_name": "linkedin_ads", "source_description": "", "loader": "fivetran", "identifier": "linkedin_monthly_ad_analytics_by_member_country_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Monthly LinkedIn Ads performance metrics aggregated by member country and campaign.", "columns": {"campaign_id": {"name": "campaign_id", "description": "Identifier of the LinkedIn Ads campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "month": {"name": "month", "description": "Month of the reporting data, aliased as `date_month`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "member_country": {"name": "member_country", "description": "ID representing the country of the LinkedIn members who interacted with the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_in_local_currency": {"name": "cost_in_local_currency", "description": "The cost of the ads in the local currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_in_usd": {"name": "cost_in_usd", "description": "The cost of the ads in the USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"linkedin_monthly_ad_analytics_by_member_country_data\"", "created_at": 1783708224.3297307, "unrendered_database": "{% if target.type != 'spark'%}{{ var('linkedin_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('linkedin_ads_schema', 'linkedin_ads') }}", "doc_blocks": []}, "source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_region": {"database": "postgres", "schema": "public", "name": "monthly_ad_analytics_by_member_region", "resource_type": "source", "package_name": "linkedin", "path": "models/staging/src_linkedin.yml", "original_file_path": "models/staging/src_linkedin.yml", "unique_id": "source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_region", "fqn": ["linkedin", "staging", "linkedin_ads", "monthly_ad_analytics_by_member_region"], "source_name": "linkedin_ads", "source_description": "", "loader": "fivetran", "identifier": "linkedin_monthly_ad_analytics_by_member_region_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Monthly LinkedIn Ads performance metrics aggregated by member region and campaign.", "columns": {"campaign_id": {"name": "campaign_id", "description": "Identifier of the LinkedIn Ads campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "month": {"name": "month", "description": "Month of the reporting data, aliased as `date_month`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The count of chargeable clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "member_region": {"name": "member_region", "description": "ID representing the region of the LinkedIn members who interacted with the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "This is the count of \"impressions\" for Direct Ads and Sponsored Updates and \"sends\" for InMails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_value_in_local_currency": {"name": "conversion_value_in_local_currency", "description": "The value generated by your conversions, displayed in your LinkedIn account's local currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_in_local_currency": {"name": "cost_in_local_currency", "description": "The cost of the ads in the local currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_in_usd": {"name": "cost_in_usd", "description": "The cost of the ads in the USD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_website_conversions": {"name": "external_website_conversions", "description": "The actions taken on your website that you've defined as valuable to your business after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "one_click_leads": {"name": "one_click_leads", "description": "Leads submitted after clicking on LinkedIn ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"linkedin_monthly_ad_analytics_by_member_region_data\"", "created_at": 1783708224.3304658, "unrendered_database": "{% if target.type != 'spark'%}{{ var('linkedin_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('linkedin_ads_schema', 'linkedin_ads') }}", "doc_blocks": []}, "source.apple_search_ads.apple_search_ads.ad_group_history": {"database": "postgres", "schema": "public", "name": "ad_group_history", "resource_type": "source", "package_name": "apple_search_ads", "path": "models/staging/src_apple_search_ads.yml", "original_file_path": "models/staging/src_apple_search_ads.yml", "unique_id": "source.apple_search_ads.apple_search_ads.ad_group_history", "fqn": ["apple_search_ads", "staging", "apple_search_ads", "ad_group_history"], "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "apple_search_ad_group_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of an ad group in Apple Search Ads.", "columns": {"modification_time": {"name": "modification_time", "description": "Timestamp of when the ad group object was last modified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "id": {"name": "id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_time": {"name": "start_time", "description": "Timestamp of designated ad group start time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_time": {"name": "end_time", "description": "The designated ad group end time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Ad group name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The current status of the ad group, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"apple_search_ad_group_history_data\"", "created_at": 1783708224.3311317, "unrendered_database": "{% if target.type != 'spark' %}{{ var('apple_search_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('apple_search_ads_schema', 'apple_search_ads') }}", "doc_blocks": []}, "source.apple_search_ads.apple_search_ads.ad_group_report": {"database": "postgres", "schema": "public", "name": "ad_group_report", "resource_type": "source", "package_name": "apple_search_ads", "path": "models/staging/src_apple_search_ads.yml", "original_file_path": "models/staging/src_apple_search_ads.yml", "unique_id": "source.apple_search_ads.apple_search_ads.ad_group_report", "fqn": ["apple_search_ads", "staging", "apple_search_ads", "ad_group_report"], "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "apple_search_ad_group_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of an ad group in Apple Search Ads.", "columns": {"ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "local_spend_amount": {"name": "local_spend_amount", "description": "The sum of costs associated with the number of impressions served; Spend is measured in the currency used in the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"apple_search_ad_group_report_data\"", "created_at": 1783708224.3317907, "unrendered_database": "{% if target.type != 'spark' %}{{ var('apple_search_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('apple_search_ads_schema', 'apple_search_ads') }}", "doc_blocks": []}, "source.apple_search_ads.apple_search_ads.ad_history": {"database": "postgres", "schema": "public", "name": "ad_history", "resource_type": "source", "package_name": "apple_search_ads", "path": "models/staging/src_apple_search_ads.yml", "original_file_path": "models/staging/src_apple_search_ads.yml", "unique_id": "source.apple_search_ads.apple_search_ads.ad_history", "fqn": ["apple_search_ads", "staging", "apple_search_ads", "ad_history"], "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "apple_search_ad_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of an ad in Apple Search Ads.", "columns": {"creation_time": {"name": "creation_time", "description": "Timestamp of when ad was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "modification_time": {"name": "modification_time", "description": "Timestamp of when the ad object was last modified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "org_id": {"name": "org_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Ad name associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "id": {"name": "id", "description": "Ad ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The current status of the ad, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"apple_search_ad_history_data\"", "created_at": 1783708224.3324614, "unrendered_database": "{% if target.type != 'spark' %}{{ var('apple_search_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('apple_search_ads_schema', 'apple_search_ads') }}", "doc_blocks": []}, "source.apple_search_ads.apple_search_ads.ad_level_report": {"database": "postgres", "schema": "public", "name": "ad_level_report", "resource_type": "source", "package_name": "apple_search_ads", "path": "models/staging/src_apple_search_ads.yml", "original_file_path": "models/staging/src_apple_search_ads.yml", "unique_id": "source.apple_search_ads.apple_search_ads.ad_level_report", "fqn": ["apple_search_ads", "staging", "apple_search_ads", "ad_level_report"], "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "apple_search_ad_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of an ad in Apple Search Ads.", "columns": {"date": {"name": "date", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_id": {"name": "ad_id", "description": "Ad ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "local_spend_amount": {"name": "local_spend_amount", "description": "The sum of costs associated with the number of impressions served; Spend is measured in the currency used in the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"apple_search_ad_report_data\"", "created_at": 1783708224.3331676, "unrendered_database": "{% if target.type != 'spark' %}{{ var('apple_search_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('apple_search_ads_schema', 'apple_search_ads') }}", "doc_blocks": []}, "source.apple_search_ads.apple_search_ads.campaign_history": {"database": "postgres", "schema": "public", "name": "campaign_history", "resource_type": "source", "package_name": "apple_search_ads", "path": "models/staging/src_apple_search_ads.yml", "original_file_path": "models/staging/src_apple_search_ads.yml", "unique_id": "source.apple_search_ads.apple_search_ads.campaign_history", "fqn": ["apple_search_ads", "staging", "apple_search_ads", "campaign_history"], "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "apple_search_campaign_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of a campaign in Apple Search Ads.", "columns": {"modification_time": {"name": "modification_time", "description": "Timestamp of when the campaign object was last modified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "id": {"name": "id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_time": {"name": "start_time", "description": "The designated ad group start time (ad group with the earliest start time associated with this campaign).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_time": {"name": "end_time", "description": "The designated campaign end time (ad group with the latest start time associated with this campaign).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Campaign name for the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The current status of the campaign, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"apple_search_campaign_history_data\"", "created_at": 1783708224.3338063, "unrendered_database": "{% if target.type != 'spark' %}{{ var('apple_search_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('apple_search_ads_schema', 'apple_search_ads') }}", "doc_blocks": []}, "source.apple_search_ads.apple_search_ads.campaign_report": {"database": "postgres", "schema": "public", "name": "campaign_report", "resource_type": "source", "package_name": "apple_search_ads", "path": "models/staging/src_apple_search_ads.yml", "original_file_path": "models/staging/src_apple_search_ads.yml", "unique_id": "source.apple_search_ads.apple_search_ads.campaign_report", "fqn": ["apple_search_ads", "staging", "apple_search_ads", "campaign_report"], "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "apple_search_campaign_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of a campaign in Apple Search Ads.", "columns": {"id": {"name": "id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "local_spend_amount": {"name": "local_spend_amount", "description": "The sum of costs associated with the number of impressions served; Spend is measured in the currency used in the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"apple_search_campaign_report_data\"", "created_at": 1783708224.3345308, "unrendered_database": "{% if target.type != 'spark' %}{{ var('apple_search_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('apple_search_ads_schema', 'apple_search_ads') }}", "doc_blocks": []}, "source.apple_search_ads.apple_search_ads.keyword_history": {"database": "postgres", "schema": "public", "name": "keyword_history", "resource_type": "source", "package_name": "apple_search_ads", "path": "models/staging/src_apple_search_ads.yml", "original_file_path": "models/staging/src_apple_search_ads.yml", "unique_id": "source.apple_search_ads.apple_search_ads.keyword_history", "fqn": ["apple_search_ads", "staging", "apple_search_ads", "keyword_history"], "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "apple_search_keyword_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of a keyword in Apple Search Ads.", "columns": {"modification_time": {"name": "modification_time", "description": "Timestamp of when the keyword object was last modified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "id": {"name": "id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_amount": {"name": "bid_amount", "description": "The bid amount to display your ad for the matching text value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_currency": {"name": "bid_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; EXACT or BROAD.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The current status of the keyword, values include ENABLED and PAUSED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "text": {"name": "text", "description": "The word or phrase to match in user searches, to show respective ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"apple_search_keyword_history_data\"", "created_at": 1783708224.3352356, "unrendered_database": "{% if target.type != 'spark' %}{{ var('apple_search_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('apple_search_ads_schema', 'apple_search_ads') }}", "doc_blocks": []}, "source.apple_search_ads.apple_search_ads.keyword_report": {"database": "postgres", "schema": "public", "name": "keyword_report", "resource_type": "source", "package_name": "apple_search_ads", "path": "models/staging/src_apple_search_ads.yml", "original_file_path": "models/staging/src_apple_search_ads.yml", "unique_id": "source.apple_search_ads.apple_search_ads.keyword_report", "fqn": ["apple_search_ads", "staging", "apple_search_ads", "keyword_report"], "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "apple_search_keyword_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of a keyword in Apple Search Ads.", "columns": {"id": {"name": "id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "local_spend_amount": {"name": "local_spend_amount", "description": "The sum of costs associated with the number of impressions served; Spend is measured in the currency used in the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"apple_search_keyword_report_data\"", "created_at": 1783708224.3359158, "unrendered_database": "{% if target.type != 'spark' %}{{ var('apple_search_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('apple_search_ads_schema', 'apple_search_ads') }}", "doc_blocks": []}, "source.apple_search_ads.apple_search_ads.organization": {"database": "postgres", "schema": "public", "name": "organization", "resource_type": "source", "package_name": "apple_search_ads", "path": "models/staging/src_apple_search_ads.yml", "original_file_path": "models/staging/src_apple_search_ads.yml", "unique_id": "source.apple_search_ads.apple_search_ads.organization", "fqn": ["apple_search_ads", "staging", "apple_search_ads", "organization"], "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "apple_search_organization_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents an organization in Apple Search Ads.", "columns": {"organization_id": {"name": "organization_id", "description": "Organization ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Specified currency for respective organization.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "payment_model": {"name": "payment_model", "description": "Values include 'LOC', 'PAYG' or (payment method hasn't been set).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "organization_name": {"name": "organization_name", "description": "Name of organization.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "time_zone": {"name": "time_zone", "description": "Organization default timezone; values can be ORTZ or UTC.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"apple_search_organization_data\"", "created_at": 1783708224.3365874, "unrendered_database": "{% if target.type != 'spark' %}{{ var('apple_search_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('apple_search_ads_schema', 'apple_search_ads') }}", "doc_blocks": []}, "source.apple_search_ads.apple_search_ads.search_term_report": {"database": "postgres", "schema": "public", "name": "search_term_report", "resource_type": "source", "package_name": "apple_search_ads", "path": "models/staging/src_apple_search_ads.yml", "original_file_path": "models/staging/src_apple_search_ads.yml", "unique_id": "source.apple_search_ads.apple_search_ads.search_term_report", "fqn": ["apple_search_ads", "staging", "apple_search_ads", "search_term_report"], "source_name": "apple_search_ads", "source_description": "", "loader": "Fivetran", "identifier": "apple_search_search_term_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of a search term in Apple Search Ads.", "columns": {"_fivetran_id": {"name": "_fivetran_id", "description": "A Fivetran internal unique id that helps us avoid duplicate rows in primary keyless tables.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "Ad group ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "Date for daily report aggregation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_name": {"name": "ad_group_name", "description": "Ad group name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_amount_amount": {"name": "bid_amount_amount", "description": "The bid amount to display your ad for the matching text value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_amount_currency": {"name": "bid_amount_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword": {"name": "keyword", "description": "The word or phrase to match in user searches, to show respective ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_display_status": {"name": "keyword_display_status", "description": "The keyword display status can either be ACTIVE or PAUSED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_id": {"name": "keyword_id", "description": "Keyword ID associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "local_spend_amount": {"name": "local_spend_amount", "description": "The sum of costs associated with the number of impressions served; Spend is measured in the currency used in the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "local_spend_currency": {"name": "local_spend_currency", "description": "This currency value should match the respective organization's currency value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "match_type": {"name": "match_type", "description": "Controls how ads are matched to user searches; values include EXACT, BROAD or AUTO.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "search_term_source": {"name": "search_term_source", "description": "The search term source can either be TARGETED or AUTO; if this value is AUTO so will match_type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "search_term_text": {"name": "search_term_text", "description": "The word or phrase to match of user searches.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversions": {"name": "conversions", "description": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.conversions"]}, "impressions": {"name": "impressions", "description": "Number of times your ad appeared in App Store search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "taps": {"name": "taps", "description": "The number of times ad was tapped by users within the reporting time period.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "new_downloads": {"name": "new_downloads", "description": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.new_downloads"]}, "redownloads": {"name": "redownloads", "description": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.redownloads"]}, "tap_installs": {"name": "tap_installs", "description": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_installs"]}, "tap_new_downloads": {"name": "tap_new_downloads", "description": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_new_downloads"]}, "tap_redownloads": {"name": "tap_redownloads", "description": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.apple_search_ads.tap_redownloads"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"apple_search_search_term_report_data\"", "created_at": 1783708224.337338, "unrendered_database": "{% if target.type != 'spark' %}{{ var('apple_search_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('apple_search_ads_schema', 'apple_search_ads') }}", "doc_blocks": []}, "source.reddit_ads.reddit_ads.business_account": {"database": "postgres", "schema": "public", "name": "business_account", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.business_account", "fqn": ["reddit_ads", "staging", "reddit_ads", "business_account"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_business_account_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents information about an account.", "columns": {"id": {"name": "id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "attribution_type": {"name": "attribution_type", "description": "Attribution type: \"CLICK_THROUGH_CONVERSION\", \"VIEW_THROUGH_CONVERSION\", or \"ALL_CONVERSION\".\nCLICK_THROUGH_CONVERSION: A user clicked on your ad and then completed the conversion action on your site. \nVIEW_THROUGH_CONVERSION: A user saw your ad and did not click it, but did complete the conversion action on your site.\nALL_CONVERSION: Combination of both.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.attribution_type"]}, "click_attribution_window": {"name": "click_attribution_window", "description": "Determines how long after clicking on your ad you count that user\u2019s actions as a conversion. \"DAY\", \"WEEK\", or \"MONTH\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_attribution_window"]}, "created_at": {"name": "created_at", "description": "Time that the respective record (ad, ad group, campaign, post, etc) was created. ISO-8601 timestamp.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.created_at"]}, "currency": {"name": "currency", "description": "The currency this account uses (ISO-4217)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.currency"]}, "time_zone_id": {"name": "time_zone_id", "description": "The time zone id preference for this account", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.time_zone_id"]}, "view_attribution_window": {"name": "view_attribution_window", "description": "Determines how long after viewing on your ad you count that user\u2019s actions as a conversion. \"DAY\", \"WEEK\", or \"MONTH\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_attribution_window"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_business_account_data\"", "created_at": 1783708224.339226, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": []}, "source.reddit_ads.reddit_ads.account_report": {"database": "postgres", "schema": "public", "name": "account_report", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.account_report", "fqn": ["reddit_ads", "staging", "reddit_ads", "account_report"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_account_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a summary of events for each given date and account.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "conversion_roas": {"name": "conversion_roas", "description": "Return on ad spend for purchases for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.conversion_roas"]}, "cpc": {"name": "cpc", "description": "The cost-per-click for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.cpc"]}, "ctr": {"name": "ctr", "description": "The click-through-rate for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ctr"]}, "date": {"name": "date", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "ecpm": {"name": "ecpm", "description": "The effective CPM for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ecpm"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "region": {"name": "region", "description": "The region (US state or UK country) targeted for the reports", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.region"]}, "spend": {"name": "spend", "description": "The amount (in microcurrency) spent for this report period in Ad Account's currency, as defined [here](https://ads-api.reddit.com/docs/#tag/Reporting/paths/~1api~1v2.0~1accounts~1{account_id}~1reports/get)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.spend"]}, "video_started": {"name": "video_started", "description": "The number of times the ad was served and the video began playing", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_started"]}, "video_watched_25_percent": {"name": "video_watched_25_percent", "description": "The number of times the ad was served and at least 25% of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_25_percent"]}, "video_watched_3_seconds": {"name": "video_watched_3_seconds", "description": "The number of times the ad was served and at least 3 seconds of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_3_seconds"]}, "video_watched_50_percent": {"name": "video_watched_50_percent", "description": "The number of times the ad was served and at least 50% of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_50_percent"]}, "video_watched_5_seconds": {"name": "video_watched_5_seconds", "description": "The number of times the ad was served and at least 5 seconds of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_5_seconds"]}, "video_watched_75_percent": {"name": "video_watched_75_percent", "description": "The number of times the ad was served and at least 75% of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_75_percent"]}, "viewer_comments": {"name": "viewer_comments", "description": "The number of times a user saw the post, and also commented on it. We count per view + comment combination (similar to a conversion)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.viewer_comments"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_account_report_data\"", "created_at": 1783708224.3399327, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": []}, "source.reddit_ads.reddit_ads.ad": {"database": "postgres", "schema": "public", "name": "ad", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.ad", "fqn": ["reddit_ads", "staging", "reddit_ads", "ad"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_ad_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents information about each ad.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "click_url": {"name": "click_url", "description": "The destination url, or the website address, that a visitor goes to when they click on the ad", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_url"]}, "configured_status": {"name": "configured_status", "description": "The status configured by the account owner. \"ACTIVE\", \"PAUSED\", \"ARCHIVED\", \"DELETED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.configured_status"]}, "effective_status": {"name": "effective_status", "description": "The calculated status determining the real status of this entity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.effective_status"]}, "id": {"name": "id", "description": "The ID of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_id"]}, "is_processing": {"name": "is_processing", "description": "Whether or not effective status is processing", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.is_processing"]}, "name": {"name": "name", "description": "Name of ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_name"]}, "post_id": {"name": "post_id", "description": "The ID of the post.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.post_id"]}, "post_url": {"name": "post_url", "description": "The URL belonging to the post.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.post_url"]}, "rejection_reason": {"name": "rejection_reason", "description": "Reason why entity was rejected.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.rejection_reason"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_ad_data\"", "created_at": 1783708224.340631, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": []}, "source.reddit_ads.reddit_ads.ad_report": {"database": "postgres", "schema": "public", "name": "ad_report", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.ad_report", "fqn": ["reddit_ads", "staging", "reddit_ads", "ad_report"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_ad_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a summary of events for each given date and ad.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "ad_id": {"name": "ad_id", "description": "The ID of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_id"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "conversion_roas": {"name": "conversion_roas", "description": "Return on ad spend for purchases for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.conversion_roas"]}, "cpc": {"name": "cpc", "description": "The cost-per-click for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.cpc"]}, "ctr": {"name": "ctr", "description": "The click-through-rate for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ctr"]}, "date": {"name": "date", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "ecpm": {"name": "ecpm", "description": "The effective CPM for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ecpm"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "region": {"name": "region", "description": "The region (US state or UK country) targeted for the reports", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.region"]}, "spend": {"name": "spend", "description": "The amount (in microcurrency) spent for this report period in Ad Account's currency, as defined [here](https://ads-api.reddit.com/docs/#tag/Reporting/paths/~1api~1v2.0~1accounts~1{account_id}~1reports/get)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.spend"]}, "video_started": {"name": "video_started", "description": "The number of times the ad was served and the video began playing", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_started"]}, "video_watched_25_percent": {"name": "video_watched_25_percent", "description": "The number of times the ad was served and at least 25% of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_25_percent"]}, "video_watched_3_seconds": {"name": "video_watched_3_seconds", "description": "The number of times the ad was served and at least 3 seconds of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_3_seconds"]}, "video_watched_50_percent": {"name": "video_watched_50_percent", "description": "The number of times the ad was served and at least 50% of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_50_percent"]}, "video_watched_5_seconds": {"name": "video_watched_5_seconds", "description": "The number of times the ad was served and at least 5 seconds of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_5_seconds"]}, "video_watched_75_percent": {"name": "video_watched_75_percent", "description": "The number of times the ad was served and at least 75% of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_75_percent"]}, "viewer_comments": {"name": "viewer_comments", "description": "The number of times a user saw the post, and also commented on it. We count per view + comment combination (similar to a conversion)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.viewer_comments"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_ad_report_data\"", "created_at": 1783708224.3413472, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": []}, "source.reddit_ads.reddit_ads.ad_group": {"database": "postgres", "schema": "public", "name": "ad_group", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.ad_group", "fqn": ["reddit_ads", "staging", "reddit_ads", "ad_group"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_ad_group_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents information about each ad group.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "bid_strategy": {"name": "bid_strategy", "description": "The bid strategy for this entity. \"MAXIMIZE_VOLUME\", \"MANUAL_BIDDING\", or \"BIDLESS\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.bid_strategy"]}, "bid_value": {"name": "bid_value", "description": "The amount to pay in microcurrency per bidding event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.bid_value"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "configured_status": {"name": "configured_status", "description": "The status configured by the account owner. \"ACTIVE\", \"PAUSED\", \"ARCHIVED\", \"DELETED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.configured_status"]}, "effective_status": {"name": "effective_status", "description": "The calculated status determining the real status of this entity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.effective_status"]}, "end_time": {"name": "end_time", "description": "When the entity will stop delivering.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.end_time"]}, "expand_targeting": {"name": "expand_targeting", "description": "Boolean that when selected, allows Reddit to expand your targeting to maximize your results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.expand_targeting"]}, "goal_type": {"name": "goal_type", "description": "The type of goal for the entity. \"IMPRESSIONS\", \"PERCENTAGE\", \"CLICKS\", \"CONVERSIONS\", \"LIFETIME_SPEND\", \"DAILY_SPEND\", or \"VIDEO_VIEWABLE_IMPRESSIONS\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.goal_type"]}, "goal_value": {"name": "goal_value", "description": "The value used to determine the goal has been met. This is measured in microcurrency for monetary goals types.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.goal_value"]}, "id": {"name": "id", "description": "The ID of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_id"]}, "is_processing": {"name": "is_processing", "description": "Whether or not effective status is processing", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.is_processing"]}, "name": {"name": "name", "description": "Name of ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_name"]}, "optimization_strategy_type": {"name": "optimization_strategy_type", "description": "The strategy to use when optimizing the delivery of an ad. \"DOWNSTREAM_CONVERSIONS\" or \"APP_INSTALLS\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.optimization_strategy_type"]}, "start_time": {"name": "start_time", "description": "When the entity will begin to deliver.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.start_time"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_ad_group_data\"", "created_at": 1783708224.3420906, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": []}, "source.reddit_ads.reddit_ads.ad_group_report": {"database": "postgres", "schema": "public", "name": "ad_group_report", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.ad_group_report", "fqn": ["reddit_ads", "staging", "reddit_ads", "ad_group_report"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_ad_group_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a summary of events for each given date and ad group.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_id"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "conversion_roas": {"name": "conversion_roas", "description": "Return on ad spend for purchases for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.conversion_roas"]}, "cpc": {"name": "cpc", "description": "The cost-per-click for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.cpc"]}, "ctr": {"name": "ctr", "description": "The click-through-rate for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ctr"]}, "date": {"name": "date", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "ecpm": {"name": "ecpm", "description": "The effective CPM for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ecpm"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "region": {"name": "region", "description": "The region (US state or UK country) targeted for the reports", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.region"]}, "spend": {"name": "spend", "description": "The amount (in microcurrency) spent for this report period in Ad Account's currency, as defined [here](https://ads-api.reddit.com/docs/#tag/Reporting/paths/~1api~1v2.0~1accounts~1{account_id}~1reports/get)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.spend"]}, "video_started": {"name": "video_started", "description": "The number of times the ad was served and the video began playing", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_started"]}, "video_watched_25_percent": {"name": "video_watched_25_percent", "description": "The number of times the ad was served and at least 25% of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_25_percent"]}, "video_watched_3_seconds": {"name": "video_watched_3_seconds", "description": "The number of times the ad was served and at least 3 seconds of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_3_seconds"]}, "video_watched_50_percent": {"name": "video_watched_50_percent", "description": "The number of times the ad was served and at least 50% of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_50_percent"]}, "video_watched_5_seconds": {"name": "video_watched_5_seconds", "description": "The number of times the ad was served and at least 5 seconds of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_5_seconds"]}, "video_watched_75_percent": {"name": "video_watched_75_percent", "description": "The number of times the ad was served and at least 75% of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_75_percent"]}, "viewer_comments": {"name": "viewer_comments", "description": "The number of times a user saw the post, and also commented on it. We count per view + comment combination (similar to a conversion)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.viewer_comments"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_ad_group_report_data\"", "created_at": 1783708224.3427944, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": []}, "source.reddit_ads.reddit_ads.campaign": {"database": "postgres", "schema": "public", "name": "campaign", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.campaign", "fqn": ["reddit_ads", "staging", "reddit_ads", "campaign"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_campaign_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents information about each campaign.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "configured_status": {"name": "configured_status", "description": "The status configured by the account owner. \"ACTIVE\", \"PAUSED\", \"ARCHIVED\", \"DELETED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.configured_status"]}, "effective_status": {"name": "effective_status", "description": "The calculated status determining the real status of this entity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.effective_status"]}, "funding_instrument_id": {"name": "funding_instrument_id", "description": "Campaign level funding instrument id", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.funding_instrument_id"]}, "id": {"name": "id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "is_processing": {"name": "is_processing", "description": "Whether or not effective status is processing", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.is_processing"]}, "name": {"name": "name", "description": "Name of campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_name"]}, "objective": {"name": "objective", "description": "The objective type of a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.objective"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_campaign_data\"", "created_at": 1783708224.3434665, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": []}, "source.reddit_ads.reddit_ads.campaign_report": {"database": "postgres", "schema": "public", "name": "campaign_report", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.campaign_report", "fqn": ["reddit_ads", "staging", "reddit_ads", "campaign_report"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_campaign_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a summary of events for each given date and campaign.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "conversion_roas": {"name": "conversion_roas", "description": "Return on ad spend for purchases for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.conversion_roas"]}, "cpc": {"name": "cpc", "description": "The cost-per-click for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.cpc"]}, "ctr": {"name": "ctr", "description": "The click-through-rate for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ctr"]}, "date": {"name": "date", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "ecpm": {"name": "ecpm", "description": "The effective CPM for this period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ecpm"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "region": {"name": "region", "description": "The region (US state or UK country) targeted for the reports", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.region"]}, "spend": {"name": "spend", "description": "The amount (in microcurrency) spent for this report period in Ad Account's currency, as defined [here](https://ads-api.reddit.com/docs/#tag/Reporting/paths/~1api~1v2.0~1accounts~1{account_id}~1reports/get)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.spend"]}, "video_started": {"name": "video_started", "description": "The number of times the ad was served and the video began playing", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_started"]}, "video_watched_25_percent": {"name": "video_watched_25_percent", "description": "The number of times the ad was served and at least 25% of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_25_percent"]}, "video_watched_3_seconds": {"name": "video_watched_3_seconds", "description": "The number of times the ad was served and at least 3 seconds of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_3_seconds"]}, "video_watched_50_percent": {"name": "video_watched_50_percent", "description": "The number of times the ad was served and at least 50% of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_50_percent"]}, "video_watched_5_seconds": {"name": "video_watched_5_seconds", "description": "The number of times the ad was served and at least 5 seconds of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_5_seconds"]}, "video_watched_75_percent": {"name": "video_watched_75_percent", "description": "The number of times the ad was served and at least 75% of the video has played", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.video_watched_75_percent"]}, "viewer_comments": {"name": "viewer_comments", "description": "The number of times a user saw the post, and also commented on it. We count per view + comment combination (similar to a conversion)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.viewer_comments"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_campaign_report_data\"", "created_at": 1783708224.3441741, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": []}, "source.reddit_ads.reddit_ads.account_conversions_report": {"database": "postgres", "schema": "public", "name": "account_conversions_report", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.account_conversions_report", "fqn": ["reddit_ads", "staging", "reddit_ads", "account_conversions_report"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_account_conversions", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Provides a summary of conversion events at the account level, aggregating key metrics by event and day.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "date": {"name": "date", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "event_name": {"name": "event_name", "description": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.event_name"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "avg_value": {"name": "avg_value", "description": "The average value of conversions over a given period.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.avg_value"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "click_through_conversion_attribution_window_month": {"name": "click_through_conversion_attribution_window_month", "description": "[DEPRECATED] This column has been deprecated as of August 2025 in favor of the `clicks` column. The total click-through conversions attributed, for the given month-long window.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "views": {"name": "views", "description": "The number of views detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.views"]}, "view_through_conversion_attribution_window_month": {"name": "view_through_conversion_attribution_window_month", "description": "[DEPRECATED] This column has been deprecated as of August 2025 in favor of the `views` column. The total view-through conversions attributed, for the given month-long window.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_through_conversion_attribution_window_day": {"name": "click_through_conversion_attribution_window_day", "description": "The total click-through conversions attributed, for the given day-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion_attribution_window_day"]}, "click_through_conversion_attribution_window_week": {"name": "click_through_conversion_attribution_window_week", "description": "The total click-through conversions attributed, for the given week-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion_attribution_window_week"]}, "view_through_conversion_attribution_window_day": {"name": "view_through_conversion_attribution_window_day", "description": "The total click-through conversions attributed, for the given day-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion_attribution_window_day"]}, "view_through_conversion_attribution_window_week": {"name": "view_through_conversion_attribution_window_week", "description": "The total click-through conversions attributed, for the given week-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion_attribution_window_week"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_account_conversions\"", "created_at": 1783708224.344884, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": ["doc.reddit_ads.account_conversions_report"]}, "source.reddit_ads.reddit_ads.ad_group_conversions_report": {"database": "postgres", "schema": "public", "name": "ad_group_conversions_report", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.ad_group_conversions_report", "fqn": ["reddit_ads", "staging", "reddit_ads", "ad_group_conversions_report"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_ad_group_conversions", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Provides a summary of conversion events at the ad group level, aggregating key metrics by event and day.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_group_id"]}, "date": {"name": "date", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "event_name": {"name": "event_name", "description": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.event_name"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "avg_value": {"name": "avg_value", "description": "The average value of conversions over a given period.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.avg_value"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "click_through_conversion_attribution_window_month": {"name": "click_through_conversion_attribution_window_month", "description": "[DEPRECATED] This column has been deprecated as of August 2025 in favor of the `clicks` column. The total click-through conversions attributed, for the given month-long window.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "views": {"name": "views", "description": "The number of views detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.views"]}, "view_through_conversion_attribution_window_month": {"name": "view_through_conversion_attribution_window_month", "description": "[DEPRECATED] This column has been deprecated as of August 2025 in favor of the `views` column. The total view-through conversions attributed, for the given month-long window.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_through_conversion_attribution_window_day": {"name": "click_through_conversion_attribution_window_day", "description": "The total click-through conversions attributed, for the given day-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion_attribution_window_day"]}, "click_through_conversion_attribution_window_week": {"name": "click_through_conversion_attribution_window_week", "description": "The total click-through conversions attributed, for the given week-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion_attribution_window_week"]}, "view_through_conversion_attribution_window_day": {"name": "view_through_conversion_attribution_window_day", "description": "The total click-through conversions attributed, for the given day-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion_attribution_window_day"]}, "view_through_conversion_attribution_window_week": {"name": "view_through_conversion_attribution_window_week", "description": "The total click-through conversions attributed, for the given week-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion_attribution_window_week"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_ad_group_conversions\"", "created_at": 1783708224.3455846, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": ["doc.reddit_ads.ad_group_conversions_report"]}, "source.reddit_ads.reddit_ads.ad_conversions_report": {"database": "postgres", "schema": "public", "name": "ad_conversions_report", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.ad_conversions_report", "fqn": ["reddit_ads", "staging", "reddit_ads", "ad_conversions_report"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_ad_conversions", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Provides a summary of conversion events at the individual ad level, aggregating key metrics by event and day.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "ad_id": {"name": "ad_id", "description": "The ID of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.ad_id"]}, "date": {"name": "date", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "event_name": {"name": "event_name", "description": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.event_name"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "avg_value": {"name": "avg_value", "description": "The average value of conversions over a given period.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.avg_value"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "click_through_conversion_attribution_window_month": {"name": "click_through_conversion_attribution_window_month", "description": "[DEPRECATED] This column has been deprecated as of August 2025 in favor of the `clicks` column. The total click-through conversions attributed, for the given month-long window.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "views": {"name": "views", "description": "The number of views detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.views"]}, "view_through_conversion_attribution_window_month": {"name": "view_through_conversion_attribution_window_month", "description": "[DEPRECATED] This column has been deprecated as of August 2025 in favor of the `views` column. The total view-through conversions attributed, for the given month-long window.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_through_conversion_attribution_window_day": {"name": "click_through_conversion_attribution_window_day", "description": "The total click-through conversions attributed, for the given day-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion_attribution_window_day"]}, "click_through_conversion_attribution_window_week": {"name": "click_through_conversion_attribution_window_week", "description": "The total click-through conversions attributed, for the given week-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion_attribution_window_week"]}, "view_through_conversion_attribution_window_day": {"name": "view_through_conversion_attribution_window_day", "description": "The total click-through conversions attributed, for the given day-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion_attribution_window_day"]}, "view_through_conversion_attribution_window_week": {"name": "view_through_conversion_attribution_window_week", "description": "The total click-through conversions attributed, for the given week-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion_attribution_window_week"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_ad_conversions\"", "created_at": 1783708224.346295, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": ["doc.reddit_ads.ad_conversions_report"]}, "source.reddit_ads.reddit_ads.campaign_conversions_report": {"database": "postgres", "schema": "public", "name": "campaign_conversions_report", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.campaign_conversions_report", "fqn": ["reddit_ads", "staging", "reddit_ads", "campaign_conversions_report"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_campaign_conversions", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Provides a summary of conversion events at the campaign level, aggregating key metrics by event and day.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "date": {"name": "date", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "event_name": {"name": "event_name", "description": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.event_name"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "avg_value": {"name": "avg_value", "description": "The average value of conversions over a given period.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.avg_value"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "click_through_conversion_attribution_window_month": {"name": "click_through_conversion_attribution_window_month", "description": "[DEPRECATED] This column has been deprecated as of August 2025 in favor of the `clicks` column. The total click-through conversions attributed, for the given month-long window.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "views": {"name": "views", "description": "The number of views detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.views"]}, "view_through_conversion_attribution_window_month": {"name": "view_through_conversion_attribution_window_month", "description": "[DEPRECATED] This column has been deprecated as of August 2025 in favor of the `views` column. The total view-through conversions attributed, for the given month-long window.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_through_conversion_attribution_window_day": {"name": "click_through_conversion_attribution_window_day", "description": "The total click-through conversions attributed, for the given day-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion_attribution_window_day"]}, "click_through_conversion_attribution_window_week": {"name": "click_through_conversion_attribution_window_week", "description": "The total click-through conversions attributed, for the given week-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.click_through_conversion_attribution_window_week"]}, "view_through_conversion_attribution_window_day": {"name": "view_through_conversion_attribution_window_day", "description": "The total click-through conversions attributed, for the given day-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion_attribution_window_day"]}, "view_through_conversion_attribution_window_week": {"name": "view_through_conversion_attribution_window_week", "description": "The total click-through conversions attributed, for the given week-long window. Not included by the package by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.view_through_conversion_attribution_window_week"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_campaign_conversions\"", "created_at": 1783708224.3469772, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": ["doc.reddit_ads.campaign_conversions_report"]}, "source.reddit_ads.reddit_ads.campaign_country_report": {"database": "postgres", "schema": "public", "name": "campaign_country_report", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.campaign_country_report", "fqn": ["reddit_ads", "staging", "reddit_ads", "campaign_country_report"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_campaign_country_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a summary of events at the date, country, and campaign level.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "country": {"name": "country", "description": "The country associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.country"]}, "date": {"name": "date", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions served for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.impressions"]}, "region": {"name": "region", "description": "The region (US state or UK country) targeted for the reports", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.region"]}, "spend": {"name": "spend", "description": "The amount (in microcurrency) spent for this report period in Ad Account's currency, as defined [here](https://ads-api.reddit.com/docs/#tag/Reporting/paths/~1api~1v2.0~1accounts~1{account_id}~1reports/get)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.spend"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_campaign_country_report_data\"", "created_at": 1783708224.3476963, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": ["doc.reddit_ads.campaign_country_report"]}, "source.reddit_ads.reddit_ads.campaign_country_conversions_report": {"database": "postgres", "schema": "public", "name": "campaign_country_conversions_report", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.campaign_country_conversions_report", "fqn": ["reddit_ads", "staging", "reddit_ads", "campaign_country_conversions_report"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_campaign_country_conversions_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Provides a summary of conversion events at the campaign and country level, aggregating key metrics by event and day such as view-through and click-through conversions.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.campaign_id"]}, "country": {"name": "country", "description": "The country associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.country"]}, "date": {"name": "date", "description": "YYYY-MM-DD formatted date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.date"]}, "event_name": {"name": "event_name", "description": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.event_name"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads._fivetran_synced"]}, "clicks": {"name": "clicks", "description": "The number of clicks detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.clicks"]}, "click_through_conversion_attribution_window_month": {"name": "click_through_conversion_attribution_window_month", "description": "[DEPRECATED] This column has been deprecated as of August 2025 in favor of the `clicks` column. The total click-through conversions attributed, for the given month-long window.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_items": {"name": "total_items", "description": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_items"]}, "total_value": {"name": "total_value", "description": "The total monetary value associated with a conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.total_value"]}, "views": {"name": "views", "description": "The number of views detected for this report period", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.reddit_ads.views"]}, "view_through_conversion_attribution_window_month": {"name": "view_through_conversion_attribution_window_month", "description": "[DEPRECATED] This column has been deprecated as of August 2025 in favor of the `views` column. The total view-through conversions attributed, for the given month-long window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_campaign_country_conversions_report_data\"", "created_at": 1783708224.3483822, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": ["doc.reddit_ads.campaign_country_conversions_report"]}, "source.snapchat_ads.snapchat_ads.ad_account_history": {"database": "postgres", "schema": "public", "name": "ad_account_history", "resource_type": "source", "package_name": "snapchat_ads", "path": "models/staging/src_snapchat.yml", "original_file_path": "models/staging/src_snapchat.yml", "unique_id": "source.snapchat_ads.snapchat_ads.ad_account_history", "fqn": ["snapchat_ads", "staging", "snapchat_ads", "ad_account_history"], "source_name": "snapchat_ads", "source_description": "", "loader": "Fivetran", "identifier": "snapchat_ad_account_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents a historic version of an ad account in Snapchat.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}, "id": {"name": "id", "description": "The ID of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser": {"name": "advertiser", "description": "Name of advertiser", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Currency used by account", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Created at timestamp", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone": {"name": "timezone", "description": "Account timezone", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"snapchat_ad_account_history_data\"", "created_at": 1783708224.3490138, "unrendered_database": "{% if target.type != 'spark'%}{{ var('snapchat_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('snapchat_ads_schema', 'snapchat_ads') }}", "doc_blocks": []}, "source.snapchat_ads.snapchat_ads.ad_history": {"database": "postgres", "schema": "public", "name": "ad_history", "resource_type": "source", "package_name": "snapchat_ads", "path": "models/staging/src_snapchat.yml", "original_file_path": "models/staging/src_snapchat.yml", "unique_id": "source.snapchat_ads.snapchat_ads.ad_history", "fqn": ["snapchat_ads", "staging", "snapchat_ads", "ad_history"], "source_name": "snapchat_ads", "source_description": "", "loader": "Fivetran", "identifier": "snapchat_ad_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents a historic version of an ad in Snapchat.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}, "id": {"name": "id", "description": "The ID of the ad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_squad_id": {"name": "ad_squad_id", "description": "The ID of the related ad squad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_id": {"name": "creative_id", "description": "The ID of the related creative in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the ad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Created at timestamp", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"snapchat_ad_history_data\"", "created_at": 1783708224.3496637, "unrendered_database": "{% if target.type != 'spark'%}{{ var('snapchat_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('snapchat_ads_schema', 'snapchat_ads') }}", "doc_blocks": []}, "source.snapchat_ads.snapchat_ads.ad_hourly_report": {"database": "postgres", "schema": "public", "name": "ad_hourly_report", "resource_type": "source", "package_name": "snapchat_ads", "path": "models/staging/src_snapchat.yml", "original_file_path": "models/staging/src_snapchat.yml", "unique_id": "source.snapchat_ads.snapchat_ads.ad_hourly_report", "fqn": ["snapchat_ads", "staging", "snapchat_ads", "ad_hourly_report"], "source_name": "snapchat_ads", "source_description": "", "loader": "Fivetran", "identifier": "snapchat_ad_hourly_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents an hourly performance summary for an ad in Snapchat.", "columns": {"ad_id": {"name": "ad_id", "description": "The ID of the ad that the report relates to in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "The hour that the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_1": {"name": "attachment_quartile_1", "description": "Number of times your Long Form Video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_2": {"name": "attachment_quartile_2", "description": "Number of times your Long Form Video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_3": {"name": "attachment_quartile_3", "description": "Number of times your Long Form Video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_total_view_time_millis": {"name": "attachment_total_view_time_millis", "description": "Total time Snapchatters spent on the attachment (HH:MM:SS)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_view_completion": {"name": "attachment_view_completion", "description": "The number of times your Long Form Video was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_1": {"name": "quartile_1", "description": "The number of times your video ad was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_2": {"name": "quartile_2", "description": "The number of times your video ad was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_3": {"name": "quartile_3", "description": "The number of times your video ad was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "saves": {"name": "saves", "description": "Number of times an ad was saved to Memories", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "Number of times an ad was shared in a Chat or Story", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "screen_time_millis": {"name": "screen_time_millis", "description": "The number of milli seconds spent watching your ad across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views": {"name": "video_views", "description": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_completion": {"name": "view_completion", "description": "The number of times your video ad was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_time_millis": {"name": "view_time_millis", "description": "The number of milli seconds spent watching your ad across all users reached.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions for an ad in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend in microdollars for an ad in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes for an ad in the hour of the record. Swipes are when your ad was swiped up on or the CTA was tapped to view the attachment below.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases attributed to an ad in the hour of the record (microcurrency in Ad Account's currency).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases attributed to an ad in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_add_billing": {"name": "conversion_add_billing", "description": "Total number of attributed \"ADD_BILLING\" conversion events for an ad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_save": {"name": "conversion_save", "description": "Total number of attributed \"SAVE\" conversion events for an ad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_add_cart": {"name": "conversion_add_cart", "description": "Total number of attributed \"ADD_CART\" conversion events for an ad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups": {"name": "conversion_sign_ups", "description": "Total number of attributed \"SIGN_UP\" conversion events for an ad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_start_checkout": {"name": "conversion_start_checkout", "description": "Total number of attributed \"START_CHECKOUT\" conversion events for an ad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_searches": {"name": "conversion_searches", "description": "Total number of attributed \"SEARCH\" conversion events for an ad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_view_content": {"name": "conversion_view_content", "description": "Total number of attributed \"VIEW_CONTENT\" conversion events for an ad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_app_opens": {"name": "conversion_app_opens", "description": "Total number of attributed \"APP_OPEN\" conversion events for an ad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_level_completes": {"name": "conversion_level_completes", "description": "Total number of attributed \"LEVEL_COMPLETE\" conversion events for an ad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_page_views": {"name": "conversion_page_views", "description": "Total number of attributed \"PAGE_VIEW\" conversion events for an ad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"snapchat_ad_hourly_report_data\"", "created_at": 1783708224.3504195, "unrendered_database": "{% if target.type != 'spark'%}{{ var('snapchat_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('snapchat_ads_schema', 'snapchat_ads') }}", "doc_blocks": []}, "source.snapchat_ads.snapchat_ads.ad_squad_history": {"database": "postgres", "schema": "public", "name": "ad_squad_history", "resource_type": "source", "package_name": "snapchat_ads", "path": "models/staging/src_snapchat.yml", "original_file_path": "models/staging/src_snapchat.yml", "unique_id": "source.snapchat_ads.snapchat_ads.ad_squad_history", "fqn": ["snapchat_ads", "staging", "snapchat_ads", "ad_squad_history"], "source_name": "snapchat_ads", "source_description": "", "loader": "Fivetran", "identifier": "snapchat_ad_squad_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents a historic version of an ad squad in Snapchat.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}, "id": {"name": "id", "description": "The ID of the ad squad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Created at timestamp.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the ad squad in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"snapchat_ad_squad_history_data\"", "created_at": 1783708224.351083, "unrendered_database": "{% if target.type != 'spark'%}{{ var('snapchat_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('snapchat_ads_schema', 'snapchat_ads') }}", "doc_blocks": []}, "source.snapchat_ads.snapchat_ads.ad_squad_hourly_report": {"database": "postgres", "schema": "public", "name": "ad_squad_hourly_report", "resource_type": "source", "package_name": "snapchat_ads", "path": "models/staging/src_snapchat.yml", "original_file_path": "models/staging/src_snapchat.yml", "unique_id": "source.snapchat_ads.snapchat_ads.ad_squad_hourly_report", "fqn": ["snapchat_ads", "staging", "snapchat_ads", "ad_squad_hourly_report"], "source_name": "snapchat_ads", "source_description": "", "loader": "Fivetran", "identifier": "snapchat_ad_squad_hourly_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents an hourly performance summary for each ad squad.", "columns": {"ad_squad_id": {"name": "ad_squad_id", "description": "ID of the ad squad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "The hour that the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_1": {"name": "attachment_quartile_1", "description": "Number of times your Long Form Video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_2": {"name": "attachment_quartile_2", "description": "Number of times your Long Form Video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_3": {"name": "attachment_quartile_3", "description": "Number of times your Long Form Video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_total_view_time_millis": {"name": "attachment_total_view_time_millis", "description": "Total time Snapchatters spent on the attachment (HH:MM:SS)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_view_completion": {"name": "attachment_view_completion", "description": "The number of times your Long Form Video was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_1": {"name": "quartile_1", "description": "The number of times your video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_2": {"name": "quartile_2", "description": "The number of times your video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_3": {"name": "quartile_3", "description": "The number of times your video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "saves": {"name": "saves", "description": "Number of times components of the ad squad were saved to Memories", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "Number of times components of the ad squad were shared in a Chat or Story", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "screen_time_millis": {"name": "screen_time_millis", "description": "The number of milli seconds spent watching your ad squad across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views": {"name": "video_views", "description": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_completion": {"name": "view_completion", "description": "The number of times your video was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_time_millis": {"name": "view_time_millis", "description": "The number of milli seconds spent watching your ad squad across all users reached.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions for an ad squad in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend in microdollars for an ad squad in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes for an ad squad in the hour of the record. Swipes are when your ad was swiped up on or the CTA was tapped to view the attachment below.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases attributed to an ad squad in the hour of the record (microcurrency in Ad Account's currency).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases attributed to an ad squad in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_add_billing": {"name": "conversion_add_billing", "description": "Total number of attributed \"ADD_BILLING\" conversion events for an ad squad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_save": {"name": "conversion_save", "description": "Total number of attributed \"SAVE\" conversion events for an ad squad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_add_cart": {"name": "conversion_add_cart", "description": "Total number of attributed \"ADD_CART\" conversion events for an ad squad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups": {"name": "conversion_sign_ups", "description": "Total number of attributed \"SIGN_UP\" conversion events for an ad squad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_start_checkout": {"name": "conversion_start_checkout", "description": "Total number of attributed \"START_CHECKOUT\" conversion events for an ad squad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_searches": {"name": "conversion_searches", "description": "Total number of attributed \"SEARCH\" conversion events for an ad squad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_view_content": {"name": "conversion_view_content", "description": "Total number of attributed \"VIEW_CONTENT\" conversion events for an ad squad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_app_opens": {"name": "conversion_app_opens", "description": "Total number of attributed \"APP_OPEN\" conversion events for an ad squad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_level_completes": {"name": "conversion_level_completes", "description": "Total number of attributed \"LEVEL_COMPLETE\" conversion events for an ad squad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_page_views": {"name": "conversion_page_views", "description": "Total number of attributed \"PAGE_VIEW\" conversion events for an ad squad in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"snapchat_ad_squad_hourly_report_data\"", "created_at": 1783708224.3518066, "unrendered_database": "{% if target.type != 'spark'%}{{ var('snapchat_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('snapchat_ads_schema', 'snapchat_ads') }}", "doc_blocks": []}, "source.snapchat_ads.snapchat_ads.campaign_history": {"database": "postgres", "schema": "public", "name": "campaign_history", "resource_type": "source", "package_name": "snapchat_ads", "path": "models/staging/src_snapchat.yml", "original_file_path": "models/staging/src_snapchat.yml", "unique_id": "source.snapchat_ads.snapchat_ads.campaign_history", "fqn": ["snapchat_ads", "staging", "snapchat_ads", "campaign_history"], "source_name": "snapchat_ads", "source_description": "", "loader": "Fivetran", "identifier": "snapchat_campaign_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents a historic version of a campaign in Snapchat.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}, "id": {"name": "id", "description": "The name of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Created at timestamp.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_id": {"name": "ad_account_id", "description": "The ID of the related ad account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the campaign in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_micro": {"name": "daily_budget_micro", "description": "Daily Spend Cap (micro-currency)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_time": {"name": "start_time", "description": "Start time", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_time": {"name": "end_time", "description": "End time", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lifetime_spend_cap_micro": {"name": "lifetime_spend_cap_micro", "description": "Lifetime spend cap for the campaign (microcurrency)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Campaign status (ACTIVE, PAUSED)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective": {"name": "objective", "description": "Objective of the Campaign (BRAND_AWARENESS (default), APP_CONVERSION, APP_INSTALL, etc)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"snapchat_campaign_history_data\"", "created_at": 1783708224.3524675, "unrendered_database": "{% if target.type != 'spark'%}{{ var('snapchat_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('snapchat_ads_schema', 'snapchat_ads') }}", "doc_blocks": []}, "source.snapchat_ads.snapchat_ads.campaign_hourly_report": {"database": "postgres", "schema": "public", "name": "campaign_hourly_report", "resource_type": "source", "package_name": "snapchat_ads", "path": "models/staging/src_snapchat.yml", "original_file_path": "models/staging/src_snapchat.yml", "unique_id": "source.snapchat_ads.snapchat_ads.campaign_hourly_report", "fqn": ["snapchat_ads", "staging", "snapchat_ads", "campaign_hourly_report"], "source_name": "snapchat_ads", "source_description": "", "loader": "Fivetran", "identifier": "snapchat_campaign_hourly_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents an hourly performance summary for each campaign.", "columns": {"campaign_id": {"name": "campaign_id", "description": "ID of campaign", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "The hour that the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_1": {"name": "attachment_quartile_1", "description": "Number of times your Long Form Video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_2": {"name": "attachment_quartile_2", "description": "Number of times your Long Form Video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_3": {"name": "attachment_quartile_3", "description": "Number of times your Long Form Video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_total_view_time_millis": {"name": "attachment_total_view_time_millis", "description": "Total time Snapchatters spent on the attachment (HH:MM:SS)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_view_completion": {"name": "attachment_view_completion", "description": "The number of times your Long Form Video was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_1": {"name": "quartile_1", "description": "The number of times your video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_2": {"name": "quartile_2", "description": "The number of times your video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_3": {"name": "quartile_3", "description": "The number of times your video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "saves": {"name": "saves", "description": "Number of times components of the campaign were saved to Memories", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "Number of times components of the campaign were shared in a Chat or Story", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "screen_time_millis": {"name": "screen_time_millis", "description": "The number of milli seconds spent watching your campaign across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views": {"name": "video_views", "description": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_completion": {"name": "view_completion", "description": "The number of times your video was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_time_millis": {"name": "view_time_millis", "description": "The number of milli seconds spent watching your campaign across all users reached.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions for a campaign in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend in microdollars for a campaign in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes for a campaign in the hour of the record. Swipes are when your ad was swiped up on or the CTA was tapped to view the attachment below.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases attributed to a campaign in the hour of the record (microcurrency in Ad Account's currency).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases attributed to a campaign in the hour of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_add_billing": {"name": "conversion_add_billing", "description": "Total number of attributed \"ADD_BILLING\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_save": {"name": "conversion_save", "description": "Total number of attributed \"SAVE\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_add_cart": {"name": "conversion_add_cart", "description": "Total number of attributed \"ADD_CART\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups": {"name": "conversion_sign_ups", "description": "Total number of attributed \"SIGN_UP\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_start_checkout": {"name": "conversion_start_checkout", "description": "Total number of attributed \"START_CHECKOUT\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_searches": {"name": "conversion_searches", "description": "Total number of attributed \"SEARCH\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_view_content": {"name": "conversion_view_content", "description": "Total number of attributed \"VIEW_CONTENT\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_app_opens": {"name": "conversion_app_opens", "description": "Total number of attributed \"APP_OPEN\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_level_completes": {"name": "conversion_level_completes", "description": "Total number of attributed \"LEVEL_COMPLETE\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_page_views": {"name": "conversion_page_views", "description": "Total number of attributed \"PAGE_VIEW\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"snapchat_campaign_hourly_report_data\"", "created_at": 1783708224.353251, "unrendered_database": "{% if target.type != 'spark'%}{{ var('snapchat_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('snapchat_ads_schema', 'snapchat_ads') }}", "doc_blocks": []}, "source.snapchat_ads.snapchat_ads.creative_history": {"database": "postgres", "schema": "public", "name": "creative_history", "resource_type": "source", "package_name": "snapchat_ads", "path": "models/staging/src_snapchat.yml", "original_file_path": "models/staging/src_snapchat.yml", "unique_id": "source.snapchat_ads.snapchat_ads.creative_history", "fqn": ["snapchat_ads", "staging", "snapchat_ads", "creative_history"], "source_name": "snapchat_ads", "source_description": "", "loader": "Fivetran", "identifier": "snapchat_creative_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents a historic version of a creative in Snapchat.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}, "id": {"name": "id", "description": "The ID of the creative in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Created at timestamp.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_account_id": {"name": "ad_account_id", "description": "The ID of the related ad account in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the creative in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "web_view_url": {"name": "web_view_url", "description": "The URL of the creative if the creative is of type 'web view'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"snapchat_creative_history_data\"", "created_at": 1783708224.3538704, "unrendered_database": "{% if target.type != 'spark'%}{{ var('snapchat_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('snapchat_ads_schema', 'snapchat_ads') }}", "doc_blocks": []}, "source.snapchat_ads.snapchat_ads.creative_url_tag_history": {"database": "postgres", "schema": "public", "name": "creative_url_tag_history", "resource_type": "source", "package_name": "snapchat_ads", "path": "models/staging/src_snapchat.yml", "original_file_path": "models/staging/src_snapchat.yml", "unique_id": "source.snapchat_ads.snapchat_ads.creative_url_tag_history", "fqn": ["snapchat_ads", "staging", "snapchat_ads", "creative_url_tag_history"], "source_name": "snapchat_ads", "source_description": "", "loader": "Fivetran", "identifier": "snapchat_creative_url_tag_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents a URL parameter key-value pair for a creative in Snapchat.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}, "creative_id": {"name": "creative_id", "description": "The ID of the related creative in Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "Created at timestamp.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "key": {"name": "key", "description": "The URL parameter key, i.e. UTM_SOURCE.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "value": {"name": "value", "description": "The URL parameter value, i.e. Snapchat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"snapchat_creative_url_tag_history_data\"", "created_at": 1783708224.3545077, "unrendered_database": "{% if target.type != 'spark'%}{{ var('snapchat_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('snapchat_ads_schema', 'snapchat_ads') }}", "doc_blocks": []}, "source.snapchat_ads.snapchat_ads.campaign_geo_country_daily_report": {"database": "postgres", "schema": "public", "name": "campaign_geo_country_daily_report", "resource_type": "source", "package_name": "snapchat_ads", "path": "models/staging/src_snapchat.yml", "original_file_path": "models/staging/src_snapchat.yml", "unique_id": "source.snapchat_ads.snapchat_ads.campaign_geo_country_daily_report", "fqn": ["snapchat_ads", "staging", "snapchat_ads", "campaign_geo_country_daily_report"], "source_name": "snapchat_ads", "source_description": "", "loader": "Fivetran", "identifier": "snapchat_campaign_geo_country_daily_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a daily performance summary per country for each campaign.", "columns": {"campaign_id": {"name": "campaign_id", "description": "ID of campaign", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "The day that the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country": {"name": "country", "description": "The country that the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_1": {"name": "attachment_quartile_1", "description": "Number of times your Long Form Video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_2": {"name": "attachment_quartile_2", "description": "Number of times your Long Form Video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_3": {"name": "attachment_quartile_3", "description": "Number of times your Long Form Video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_total_view_time_millis": {"name": "attachment_total_view_time_millis", "description": "Total time Snapchatters spent on the attachment (HH:MM:SS)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_view_completion": {"name": "attachment_view_completion", "description": "The number of times your Long Form Video was viewed to completion (97%)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_1": {"name": "quartile_1", "description": "The number of times your video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_2": {"name": "quartile_2", "description": "The number of times your video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_3": {"name": "quartile_3", "description": "The number of times your video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "saves": {"name": "saves", "description": "Number of times components of the campaign were saved to Memories", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "Number of times components of the campaign were shared in a Chat or Story", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "screen_time_millis": {"name": "screen_time_millis", "description": "The number of milli seconds spent watching your campaign across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views": {"name": "video_views", "description": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_completion": {"name": "view_completion", "description": "The number of times your video campaign was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_time_millis": {"name": "view_time_millis", "description": "The number of milli seconds spent watching your campaign across all users reached.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions for a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend in microdollars for a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes for a campaign. Swipes are when your ad was swiped up on or the CTA was tapped to view the attachment below.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases attributed to a campaign (microcurrency in Ad Account's currency).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases attributed to a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_add_billing": {"name": "conversion_add_billing", "description": "Total number of attributed \"ADD_BILLING\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_save": {"name": "conversion_save", "description": "Total number of attributed \"SAVE\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_add_cart": {"name": "conversion_add_cart", "description": "Total number of attributed \"ADD_CART\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups": {"name": "conversion_sign_ups", "description": "Total number of attributed \"SIGN_UP\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_start_checkout": {"name": "conversion_start_checkout", "description": "Total number of attributed \"START_CHECKOUT\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_searches": {"name": "conversion_searches", "description": "Total number of attributed \"SEARCH\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_view_content": {"name": "conversion_view_content", "description": "Total number of attributed \"VIEW_CONTENT\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_app_opens": {"name": "conversion_app_opens", "description": "Total number of attributed \"APP_OPEN\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_level_completes": {"name": "conversion_level_completes", "description": "Total number of attributed \"LEVEL_COMPLETE\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_page_views": {"name": "conversion_page_views", "description": "Total number of attributed \"PAGE_VIEW\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"snapchat_campaign_geo_country_daily_report_data\"", "created_at": 1783708224.3552656, "unrendered_database": "{% if target.type != 'spark'%}{{ var('snapchat_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('snapchat_ads_schema', 'snapchat_ads') }}", "doc_blocks": []}, "source.snapchat_ads.snapchat_ads.campaign_geo_region_daily_report": {"database": "postgres", "schema": "public", "name": "campaign_geo_region_daily_report", "resource_type": "source", "package_name": "snapchat_ads", "path": "models/staging/src_snapchat.yml", "original_file_path": "models/staging/src_snapchat.yml", "unique_id": "source.snapchat_ads.snapchat_ads.campaign_geo_region_daily_report", "fqn": ["snapchat_ads", "staging", "snapchat_ads", "campaign_geo_region_daily_report"], "source_name": "snapchat_ads", "source_description": "", "loader": "Fivetran", "identifier": "snapchat_campaign_geo_region_daily_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a daily performance summary per each region for each campaign.", "columns": {"campaign_id": {"name": "campaign_id", "description": "ID of campaign", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "The day that the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "region": {"name": "region", "description": "The region that the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_1": {"name": "attachment_quartile_1", "description": "Number of times your Long Form Video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_2": {"name": "attachment_quartile_2", "description": "Number of times your Long Form Video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_quartile_3": {"name": "attachment_quartile_3", "description": "Number of times your Long Form Video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_total_view_time_millis": {"name": "attachment_total_view_time_millis", "description": "Total time Snapchatters spent on the attachment (HH:MM:SS)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attachment_view_completion": {"name": "attachment_view_completion", "description": "The number of times your Long Form Video was viewed to completion (97%)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_1": {"name": "quartile_1", "description": "The number of times your video was viewed to 25%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_2": {"name": "quartile_2", "description": "The number of times your video was viewed to 50%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "quartile_3": {"name": "quartile_3", "description": "The number of times your video was viewed to 75%", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "saves": {"name": "saves", "description": "Number of times components of the campaign were saved to Memories", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "Number of times components of the campaign were shared in a Chat or Story", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "screen_time_millis": {"name": "screen_time_millis", "description": "The number of milli seconds spent watching your campaign across all paid impressions. Screen time starts recording as soon as the media is fully rendered on the device and the autoplay video starts", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views": {"name": "video_views", "description": "The number of times your video was watched at least 2 seconds or swiped up, whichever comes first", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_completion": {"name": "view_completion", "description": "The number of times your video was viewed to completion (97% )", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_time_millis": {"name": "view_time_millis", "description": "The number of milli seconds spent watching your campaign across all users reached.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions for a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The amount of spend in microdollars for a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "swipes": {"name": "swipes", "description": "The number of swipes for a campaign. Swipes are when your ad was swiped up on or the CTA was tapped to view the attachment below.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_value": {"name": "conversion_purchases_value", "description": "The total value of purchases attributed to a campaign (microcurrency in Ad Account's currency).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases": {"name": "conversion_purchases", "description": "The total number of purchases attributed to a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_add_billing": {"name": "conversion_add_billing", "description": "Total number of attributed \"ADD_BILLING\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_save": {"name": "conversion_save", "description": "Total number of attributed \"SAVE\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_add_cart": {"name": "conversion_add_cart", "description": "Total number of attributed \"ADD_CART\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups": {"name": "conversion_sign_ups", "description": "Total number of attributed \"SIGN_UP\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_start_checkout": {"name": "conversion_start_checkout", "description": "Total number of attributed \"START_CHECKOUT\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_searches": {"name": "conversion_searches", "description": "Total number of attributed \"SEARCH\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_view_content": {"name": "conversion_view_content", "description": "Total number of attributed \"VIEW_CONTENT\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_app_opens": {"name": "conversion_app_opens", "description": "Total number of attributed \"APP_OPEN\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_level_completes": {"name": "conversion_level_completes", "description": "Total number of attributed \"LEVEL_COMPLETE\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_page_views": {"name": "conversion_page_views", "description": "Total number of attributed \"PAGE_VIEW\" conversion events for a campaign in the hour of the record. This is brought in via the snapchat_ads__conversion_fields variable. For more information, refer to the [README](https://github.com/fivetran/dbt_snapchat_ads/blob/main/README.md#configuring-conversion-fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.snapchat_ads._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"snapchat_campaign_geo_region_daily_report_data\"", "created_at": 1783708224.3560226, "unrendered_database": "{% if target.type != 'spark'%}{{ var('snapchat_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('snapchat_ads_schema', 'snapchat_ads') }}", "doc_blocks": []}, "source.pinterest.pinterest_ads.pin_promotion_report": {"database": "postgres", "schema": "public", "name": "pin_promotion_report", "resource_type": "source", "package_name": "pinterest", "path": "models/staging/src_pinterest_ads.yml", "original_file_path": "models/staging/src_pinterest_ads.yml", "unique_id": "source.pinterest.pinterest_ads.pin_promotion_report", "fqn": ["pinterest", "staging", "pinterest_ads", "pin_promotion_report"], "source_name": "pinterest_ads", "source_description": "", "loader": "Fivetran", "identifier": "pinterest_pin_promotion_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of a Pinterest Pin promotion.", "columns": {"date": {"name": "date", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "pin_promotion_id": {"name": "pin_promotion_id", "description": "The ID of the related Pin promotion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.pin_promotion_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}, "impression_1": {"name": "impression_1", "description": "The number of paid pin impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impression_1"]}, "impression_2": {"name": "impression_2", "description": "The number of earned pin impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impression_2"]}, "clickthrough_1": {"name": "clickthrough_1", "description": "The number of paid pin clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clickthrough_1"]}, "clickthrough_2": {"name": "clickthrough_2", "description": "The number of earned outbound clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clickthrough_2"]}, "spend_in_micro_dollar": {"name": "spend_in_micro_dollar", "description": "The amount of spend in micro dollars that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend_in_micro_dollar"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value_in_micro_dollar": {"name": "total_conversions_value_in_micro_dollar", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. The value is expressed in microdollars, where one microdollar is one-millionth of a US dollar. Example: If the total order value from conversions is $50,000, this would be represented as 50,000,000,000 microdollars.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value_in_micro_dollar"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"pinterest_pin_promotion_report_data\"", "created_at": 1783708224.3567088, "unrendered_database": "{% if target.type != 'spark'%}{{ var('pinterest_ads_database', var('pinterest_database',target.database)) }}{% endif %}", "unrendered_schema": "{{ var('pinterest_ads_schema', var('pinterest_schema', 'pinterest_ads')) }}", "doc_blocks": []}, "source.pinterest.pinterest_ads.pin_promotion_history": {"database": "postgres", "schema": "public", "name": "pin_promotion_history", "resource_type": "source", "package_name": "pinterest", "path": "models/staging/src_pinterest_ads.yml", "original_file_path": "models/staging/src_pinterest_ads.yml", "unique_id": "source.pinterest.pinterest_ads.pin_promotion_history", "fqn": ["pinterest", "staging", "pinterest_ads", "pin_promotion_history"], "source_name": "pinterest_ads", "source_description": "", "loader": "Fivetran", "identifier": "pinterest_pin_promotion_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of a Pinterest Pin promotion.", "columns": {"id": {"name": "id", "description": "The ID of the related Pin promotion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.pin_promotion_id"]}, "ad_account_id": {"name": "ad_account_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_account_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "created_time": {"name": "created_time", "description": "Pin creation time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "destination_url": {"name": "destination_url", "description": "Pin destination URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Pin promotion name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pin_id": {"name": "pin_id", "description": "Original pin ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The status of the Pin promotion. One of \"ACTIVE\", \"ARCHIVED\", \"PAUSED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_type": {"name": "creative_type", "description": "The creative type. \nOne of \"APP\", \"APP_VIDEO\", \"BOARD\", \"CAROUSEL\", \"CINEMATIC\", \"COMMERCE\", \"MAX_VIDEO\", \"NATIVE_VIDEO\", \"REGULAR\", \n\"SEARCH_PROMINENCE\", \"SEARCH_PROMINENCE_CAROUSEL\", \"SHOPPING\", \"SHOP_THE_PIN\", \"THIRD_PARTY\", or \"VIDEO\".\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"pinterest_pin_promotion_history_data\"", "created_at": 1783708224.3573754, "unrendered_database": "{% if target.type != 'spark'%}{{ var('pinterest_ads_database', var('pinterest_database',target.database)) }}{% endif %}", "unrendered_schema": "{{ var('pinterest_ads_schema', var('pinterest_schema', 'pinterest_ads')) }}", "doc_blocks": []}, "source.pinterest.pinterest_ads.campaign_history": {"database": "postgres", "schema": "public", "name": "campaign_history", "resource_type": "source", "package_name": "pinterest", "path": "models/staging/src_pinterest_ads.yml", "original_file_path": "models/staging/src_pinterest_ads.yml", "unique_id": "source.pinterest.pinterest_ads.campaign_history", "fqn": ["pinterest", "staging", "pinterest_ads", "campaign_history"], "source_name": "pinterest_ads", "source_description": "", "loader": "Fivetran", "identifier": "pinterest_campaign_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of a Pinterest Campaign.", "columns": {"id": {"name": "id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "created_time": {"name": "created_time", "description": "Campaign creation time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "name": {"name": "name", "description": "Campaign name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The status of the Campaign. One of \"ACTIVE\", \"ARCHIVED\", \"PAUSED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "default_ad_group_budget_in_micro_currency": {"name": "default_ad_group_budget_in_micro_currency", "description": "When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_automated_campaign": {"name": "is_automated_campaign", "description": "Specifies whether the campaign was created in the automated campaign flow", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_campaign_budget_optimization": {"name": "is_campaign_budget_optimization", "description": "Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_flexible_daily_budgets": {"name": "is_flexible_daily_budgets", "description": "Determine if a campaign has flexible daily budgets setup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_time": {"name": "start_time", "description": "Timestamp when the campaign became active or was scheduled to start.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_time": {"name": "end_time", "description": "Timestamp when the campaign ended or is scheduled to end.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_spend_cap": {"name": "budget_spend_cap", "description": "Maximum amount allowed to be spent over a specified budget period for the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lifetime_spend_cap": {"name": "lifetime_spend_cap", "description": "Total maximum spend allowed across the entire lifespan of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective_type": {"name": "objective_type", "description": "The primary goal of the campaign (e.g., brand awareness, conversions, video views).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"pinterest_campaign_history_data\"", "created_at": 1783708224.3580923, "unrendered_database": "{% if target.type != 'spark'%}{{ var('pinterest_ads_database', var('pinterest_database',target.database)) }}{% endif %}", "unrendered_schema": "{{ var('pinterest_ads_schema', var('pinterest_schema', 'pinterest_ads')) }}", "doc_blocks": []}, "source.pinterest.pinterest_ads.ad_group_history": {"database": "postgres", "schema": "public", "name": "ad_group_history", "resource_type": "source", "package_name": "pinterest", "path": "models/staging/src_pinterest_ads.yml", "original_file_path": "models/staging/src_pinterest_ads.yml", "unique_id": "source.pinterest.pinterest_ads.ad_group_history", "fqn": ["pinterest", "staging", "pinterest_ads", "ad_group_history"], "source_name": "pinterest_ads", "source_description": "", "loader": "Fivetran", "identifier": "pinterest_ad_group_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of a Pinterest Ad Group.", "columns": {"id": {"name": "id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "ad_account_id": {"name": "ad_account_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_account_id"]}, "created_time": {"name": "created_time", "description": "Ad group creation time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Ad group name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The status of the Ad group. One of \"ACTIVE\", \"ARCHIVED\", \"PAUSED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_time": {"name": "start_time", "description": "Ad group start time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_time": {"name": "end_time", "description": "Ad group end time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pacing_delivery_type": {"name": "pacing_delivery_type", "description": "Ad group pacing delivery type. With ACCELERATED, an ad group budget is spent as fast as possible. With STANDARD, an ad group budget is spent smoothly over a day. When using CBO, only the STANDARD pacing delivery type is allowed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement_group": {"name": "placement_group", "description": "The placement group. \"ALL\", \"SEARCH\", \"BROWSE\", or \"OTHER\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "summary_status": {"name": "summary_status", "description": "Summary status. \"RUNNING\", \"PAUSED\", \"NOT_STARTED\", \"COMPLETED\", \"ADVERTISER_DISABLED\", \"ARCHIVED\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"pinterest_ad_group_history_data\"", "created_at": 1783708224.3588126, "unrendered_database": "{% if target.type != 'spark'%}{{ var('pinterest_ads_database', var('pinterest_database',target.database)) }}{% endif %}", "unrendered_schema": "{{ var('pinterest_ads_schema', var('pinterest_schema', 'pinterest_ads')) }}", "doc_blocks": []}, "source.pinterest.pinterest_ads.ad_group_report": {"database": "postgres", "schema": "public", "name": "ad_group_report", "resource_type": "source", "package_name": "pinterest", "path": "models/staging/src_pinterest_ads.yml", "original_file_path": "models/staging/src_pinterest_ads.yml", "unique_id": "source.pinterest.pinterest_ads.ad_group_report", "fqn": ["pinterest", "staging", "pinterest_ads", "ad_group_report"], "source_name": "pinterest_ads", "source_description": "", "loader": "Fivetran", "identifier": "pinterest_ad_group_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of a Pinterest ad group.", "columns": {"date": {"name": "date", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "Name of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_status": {"name": "ad_group_status", "description": "Status of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}, "impression_1": {"name": "impression_1", "description": "The number of paid pin impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impression_1"]}, "impression_2": {"name": "impression_2", "description": "The number of earned pin impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impression_2"]}, "clickthrough_1": {"name": "clickthrough_1", "description": "The number of paid pin clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clickthrough_1"]}, "clickthrough_2": {"name": "clickthrough_2", "description": "The number of earned outbound clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clickthrough_2"]}, "spend_in_micro_dollar": {"name": "spend_in_micro_dollar", "description": "The amount of spend in micro dollars that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend_in_micro_dollar"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value_in_micro_dollar": {"name": "total_conversions_value_in_micro_dollar", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. The value is expressed in microdollars, where one microdollar is one-millionth of a US dollar. Example: If the total order value from conversions is $50,000, this would be represented as 50,000,000,000 microdollars.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value_in_micro_dollar"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"pinterest_ad_group_report_data\"", "created_at": 1783708224.3595061, "unrendered_database": "{% if target.type != 'spark'%}{{ var('pinterest_ads_database', var('pinterest_database',target.database)) }}{% endif %}", "unrendered_schema": "{{ var('pinterest_ads_schema', var('pinterest_schema', 'pinterest_ads')) }}", "doc_blocks": []}, "source.pinterest.pinterest_ads.advertiser_history": {"database": "postgres", "schema": "public", "name": "advertiser_history", "resource_type": "source", "package_name": "pinterest", "path": "models/staging/src_pinterest_ads.yml", "original_file_path": "models/staging/src_pinterest_ads.yml", "unique_id": "source.pinterest.pinterest_ads.advertiser_history", "fqn": ["pinterest", "staging", "pinterest_ads", "advertiser_history"], "source_name": "pinterest_ads", "source_description": "", "loader": "Fivetran", "identifier": "pinterest_advertiser_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of a Pinterest advertiser.", "columns": {"id": {"name": "id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "name": {"name": "name", "description": "Name of the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country": {"name": "country", "description": "The country code where the advertiser is located.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_time": {"name": "created_time", "description": "Timestamp of when a record was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.created_at"]}, "currency": {"name": "currency", "description": "The currency code which the a", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_time": {"name": "updated_time", "description": "Timestamp of when a record was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.updated_at"]}, "owner_username": {"name": "owner_username", "description": "Advertiser's username.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "owner_user_id": {"name": "owner_user_id", "description": "Unique identifier of the owner user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "permissions": {"name": "permissions", "description": "The permissions associated with this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"pinterest_advertiser_history_data\"", "created_at": 1783708224.3601816, "unrendered_database": "{% if target.type != 'spark'%}{{ var('pinterest_ads_database', var('pinterest_database',target.database)) }}{% endif %}", "unrendered_schema": "{{ var('pinterest_ads_schema', var('pinterest_schema', 'pinterest_ads')) }}", "doc_blocks": []}, "source.pinterest.pinterest_ads.advertiser_report": {"database": "postgres", "schema": "public", "name": "advertiser_report", "resource_type": "source", "package_name": "pinterest", "path": "models/staging/src_pinterest_ads.yml", "original_file_path": "models/staging/src_pinterest_ads.yml", "unique_id": "source.pinterest.pinterest_ads.advertiser_report", "fqn": ["pinterest", "staging", "pinterest_ads", "advertiser_report"], "source_name": "pinterest_ads", "source_description": "", "loader": "Fivetran", "identifier": "pinterest_advertiser_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of a Pinterest advertiser.", "columns": {"date": {"name": "date", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}, "impression_1": {"name": "impression_1", "description": "The number of paid pin impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impression_1"]}, "impression_2": {"name": "impression_2", "description": "The number of earned pin impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impression_2"]}, "clickthrough_1": {"name": "clickthrough_1", "description": "The number of paid pin clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clickthrough_1"]}, "clickthrough_2": {"name": "clickthrough_2", "description": "The number of earned outbound clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clickthrough_2"]}, "spend_in_micro_dollar": {"name": "spend_in_micro_dollar", "description": "The amount of spend in micro dollars that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend_in_micro_dollar"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value_in_micro_dollar": {"name": "total_conversions_value_in_micro_dollar", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. The value is expressed in microdollars, where one microdollar is one-millionth of a US dollar. Example: If the total order value from conversions is $50,000, this would be represented as 50,000,000,000 microdollars.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value_in_micro_dollar"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"pinterest_advertiser_report_data\"", "created_at": 1783708224.3608332, "unrendered_database": "{% if target.type != 'spark'%}{{ var('pinterest_ads_database', var('pinterest_database',target.database)) }}{% endif %}", "unrendered_schema": "{{ var('pinterest_ads_schema', var('pinterest_schema', 'pinterest_ads')) }}", "doc_blocks": []}, "source.pinterest.pinterest_ads.campaign_report": {"database": "postgres", "schema": "public", "name": "campaign_report", "resource_type": "source", "package_name": "pinterest", "path": "models/staging/src_pinterest_ads.yml", "original_file_path": "models/staging/src_pinterest_ads.yml", "unique_id": "source.pinterest.pinterest_ads.campaign_report", "fqn": ["pinterest", "staging", "pinterest_ads", "campaign_report"], "source_name": "pinterest_ads", "source_description": "", "loader": "Fivetran", "identifier": "pinterest_campaign_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of a Pinterest campaign.", "columns": {"date": {"name": "date", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "Name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_status": {"name": "campaign_status", "description": "Status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}, "impression_1": {"name": "impression_1", "description": "The number of paid pin impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impression_1"]}, "impression_2": {"name": "impression_2", "description": "The number of earned pin impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impression_2"]}, "clickthrough_1": {"name": "clickthrough_1", "description": "The number of paid pin clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clickthrough_1"]}, "clickthrough_2": {"name": "clickthrough_2", "description": "The number of earned outbound clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clickthrough_2"]}, "spend_in_micro_dollar": {"name": "spend_in_micro_dollar", "description": "The amount of spend in micro dollars that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend_in_micro_dollar"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value_in_micro_dollar": {"name": "total_conversions_value_in_micro_dollar", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. The value is expressed in microdollars, where one microdollar is one-millionth of a US dollar. Example: If the total order value from conversions is $50,000, this would be represented as 50,000,000,000 microdollars.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value_in_micro_dollar"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"pinterest_campaign_report_data\"", "created_at": 1783708224.3615472, "unrendered_database": "{% if target.type != 'spark'%}{{ var('pinterest_ads_database', var('pinterest_database',target.database)) }}{% endif %}", "unrendered_schema": "{{ var('pinterest_ads_schema', var('pinterest_schema', 'pinterest_ads')) }}", "doc_blocks": []}, "source.pinterest.pinterest_ads.keyword_history": {"database": "postgres", "schema": "public", "name": "keyword_history", "resource_type": "source", "package_name": "pinterest", "path": "models/staging/src_pinterest_ads.yml", "original_file_path": "models/staging/src_pinterest_ads.yml", "unique_id": "source.pinterest.pinterest_ads.keyword_history", "fqn": ["pinterest", "staging", "pinterest_ads", "keyword_history"], "source_name": "pinterest_ads", "source_description": "", "loader": "Fivetran", "identifier": "pinterest_keyword_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of a Pinterest keyword.", "columns": {"id": {"name": "id", "description": "Unique identifier of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "value": {"name": "value", "description": "The text value that makes upd the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_id": {"name": "_fivetran_id", "description": "The unique identifier of the record within the Fivetran synced table.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "archived": {"name": "archived", "description": "Boolean indicating if the keyword is archived.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid": {"name": "bid", "description": "Bid amount set for the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "match_type": {"name": "match_type", "description": "Type of match the keyword is tied to. Either Exact or Broad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "parent_type": {"name": "parent_type", "description": "Identifier of what grain the parent type is. Ad group or campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"pinterest_keyword_history_data\"", "created_at": 1783708224.3622212, "unrendered_database": "{% if target.type != 'spark'%}{{ var('pinterest_ads_database', var('pinterest_database',target.database)) }}{% endif %}", "unrendered_schema": "{{ var('pinterest_ads_schema', var('pinterest_schema', 'pinterest_ads')) }}", "doc_blocks": []}, "source.pinterest.pinterest_ads.keyword_report": {"database": "postgres", "schema": "public", "name": "keyword_report", "resource_type": "source", "package_name": "pinterest", "path": "models/staging/src_pinterest_ads.yml", "original_file_path": "models/staging/src_pinterest_ads.yml", "unique_id": "source.pinterest.pinterest_ads.keyword_report", "fqn": ["pinterest", "staging", "pinterest_ads", "keyword_report"], "source_name": "pinterest_ads", "source_description": "", "loader": "Fivetran", "identifier": "pinterest_keyword_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of a Pinterest key word.", "columns": {"date": {"name": "date", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "keyword_id": {"name": "keyword_id", "description": "Unique identifier of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pin_promotion_id": {"name": "pin_promotion_id", "description": "The ID of the related Pin promotion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.pin_promotion_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "ad_group_name": {"name": "ad_group_name", "description": "Name of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_status": {"name": "ad_group_status", "description": "Status of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}, "impression_1": {"name": "impression_1", "description": "The number of paid pin impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impression_1"]}, "impression_2": {"name": "impression_2", "description": "The number of earned pin impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impression_2"]}, "clickthrough_1": {"name": "clickthrough_1", "description": "The number of paid pin clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clickthrough_1"]}, "clickthrough_2": {"name": "clickthrough_2", "description": "The number of earned outbound clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clickthrough_2"]}, "spend_in_micro_dollar": {"name": "spend_in_micro_dollar", "description": "The amount of spend in micro dollars that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend_in_micro_dollar"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value_in_micro_dollar": {"name": "total_conversions_value_in_micro_dollar", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. The value is expressed in microdollars, where one microdollar is one-millionth of a US dollar. Example: If the total order value from conversions is $50,000, this would be represented as 50,000,000,000 microdollars.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value_in_micro_dollar"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"pinterest_keyword_report_data\"", "created_at": 1783708224.3628845, "unrendered_database": "{% if target.type != 'spark'%}{{ var('pinterest_ads_database', var('pinterest_database',target.database)) }}{% endif %}", "unrendered_schema": "{{ var('pinterest_ads_schema', var('pinterest_schema', 'pinterest_ads')) }}", "doc_blocks": []}, "source.pinterest.pinterest_ads.pin_promotion_targeting_report": {"database": "postgres", "schema": "public", "name": "pin_promotion_targeting_report", "resource_type": "source", "package_name": "pinterest", "path": "models/staging/src_pinterest_ads.yml", "original_file_path": "models/staging/src_pinterest_ads.yml", "unique_id": "source.pinterest.pinterest_ads.pin_promotion_targeting_report", "fqn": ["pinterest", "staging", "pinterest_ads", "pin_promotion_targeting_report"], "source_name": "pinterest_ads", "source_description": "", "loader": "Fivetran", "identifier": "pinterest_pin_promotion_targeting_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Contains performance metrics for promoted Pins segmented by applied targeting criteria, including targeting type, value, and related campaign metadata.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}, "date": {"name": "date", "description": "The performance date of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.date_day"]}, "targeting_type": {"name": "targeting_type", "description": "Reporting targeting type for ads. Possible values 'KEYWORD', 'APPTYPE', 'GENDER', 'LOCATION', 'PLACEMENT', 'COUNTRY', 'TARGETED_INTEREST', 'PINNER_INTEREST', 'AUDIENCE_INCLUDE', 'GEO', 'AGE_BUCKET', 'REGION', 'QUIZ_RESULT', 'AGE_BUCKET_AND_GENDER'", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "targeting_value": {"name": "targeting_value", "description": "The specific value applied within the targeting type (e.g., 'Fashion' for interest, 'New York' for location).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the related Ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.ad_group_id"]}, "advertiser_id": {"name": "advertiser_id", "description": "The ID of the related Advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.advertiser_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.campaign_id"]}, "pin_promotion_id": {"name": "pin_promotion_id", "description": "The ID of the related Pin promotion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.pin_promotion_id"]}, "clickthrough_1": {"name": "clickthrough_1", "description": "The number of paid pin clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clickthrough_1"]}, "clickthrough_2": {"name": "clickthrough_2", "description": "The number of earned outbound clicks that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.clickthrough_2"]}, "impression_1": {"name": "impression_1", "description": "The number of paid pin impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impression_1"]}, "impression_2": {"name": "impression_2", "description": "The number of earned pin impressions that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.impression_2"]}, "spend_in_micro_dollar": {"name": "spend_in_micro_dollar", "description": "The amount of spend in micro dollars that occurred on the day of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.spend_in_micro_dollar"]}, "total_conversions": {"name": "total_conversions", "description": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions"]}, "total_conversions_quantity": {"name": "total_conversions_quantity", "description": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_quantity"]}, "total_conversions_value_in_micro_dollar": {"name": "total_conversions_value_in_micro_dollar", "description": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. The value is expressed in microdollars, where one microdollar is one-millionth of a US dollar. Example: If the total order value from conversions is $50,000, this would be represented as 50,000,000,000 microdollars.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.total_conversions_value_in_micro_dollar"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"pinterest_pin_promotion_targeting_report_data\"", "created_at": 1783708224.3635702, "unrendered_database": "{% if target.type != 'spark'%}{{ var('pinterest_ads_database', var('pinterest_database',target.database)) }}{% endif %}", "unrendered_schema": "{{ var('pinterest_ads_schema', var('pinterest_schema', 'pinterest_ads')) }}", "doc_blocks": []}, "source.pinterest.pinterest_ads.targeting_geo": {"database": "postgres", "schema": "public", "name": "targeting_geo", "resource_type": "source", "package_name": "pinterest", "path": "models/staging/src_pinterest_ads.yml", "original_file_path": "models/staging/src_pinterest_ads.yml", "unique_id": "source.pinterest.pinterest_ads.targeting_geo", "fqn": ["pinterest", "staging", "pinterest_ads", "targeting_geo"], "source_name": "pinterest_ads", "source_description": "", "loader": "Fivetran", "identifier": "pinterest_targeting_geo_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Maps country targeting values used in campaigns, including standardized names and associated location codes.", "columns": {"country_id": {"name": "country_id", "description": "The ID of the targeted country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.country_id"]}, "country_name": {"name": "country_name", "description": "The name of the targeted country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"pinterest_targeting_geo_data\"", "created_at": 1783708224.3641925, "unrendered_database": "{% if target.type != 'spark'%}{{ var('pinterest_ads_database', var('pinterest_database',target.database)) }}{% endif %}", "unrendered_schema": "{{ var('pinterest_ads_schema', var('pinterest_schema', 'pinterest_ads')) }}", "doc_blocks": []}, "source.pinterest.pinterest_ads.targeting_geo_region": {"database": "postgres", "schema": "public", "name": "targeting_geo_region", "resource_type": "source", "package_name": "pinterest", "path": "models/staging/src_pinterest_ads.yml", "original_file_path": "models/staging/src_pinterest_ads.yml", "unique_id": "source.pinterest.pinterest_ads.targeting_geo_region", "fqn": ["pinterest", "staging", "pinterest_ads", "targeting_geo_region"], "source_name": "pinterest_ads", "source_description": "", "loader": "Fivetran", "identifier": "pinterest_targeting_geo_region_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Maps region targeting values used in campaigns, including standardized names and associated location codes.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest._fivetran_synced"]}, "country_id": {"name": "country_id", "description": "The ID of the targeted country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.country_id"]}, "region_id": {"name": "region_id", "description": "The ID of the targeted region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.pinterest.region_id"]}, "region_name": {"name": "region_name", "description": "The ID of the targeted region.\"", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"pinterest_targeting_geo_region_data\"", "created_at": 1783708224.3648384, "unrendered_database": "{% if target.type != 'spark'%}{{ var('pinterest_ads_database', var('pinterest_database',target.database)) }}{% endif %}", "unrendered_schema": "{{ var('pinterest_ads_schema', var('pinterest_schema', 'pinterest_ads')) }}", "doc_blocks": []}, "source.google_ads.google_ads.ad_stats": {"database": "postgres", "schema": "public", "name": "ad_stats", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.ad_stats", "fqn": ["google_ads", "staging", "google_ads", "ad_stats"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_ad_stats_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of an ad in Google Ads broken down to the ad network, device type, and ad group criterion.", "columns": {"customer_id": {"name": "customer_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "date": {"name": "date", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "ad_group": {"name": "ad_group", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "ad_id": {"name": "ad_id", "description": "The ID of the Ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "ad_network_type": {"name": "ad_network_type", "description": "The Google Ad network type used across the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_network_type"]}, "device": {"name": "device", "description": "Account ad performance per unique device where the ads were served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.device"]}, "keyword_ad_group_criterion": {"name": "keyword_ad_group_criterion", "description": "The ad group which the keyword criterion resides.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "cost_micros": {"name": "cost_micros", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_ad_stats_data\"", "created_at": 1783708224.3655293, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.google_ads.google_ads.ad_history": {"database": "postgres", "schema": "public", "name": "ad_history", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.ad_history", "fqn": ["google_ads", "staging", "google_ads", "ad_history"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_ad_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of an ad in Google Ads.", "columns": {"ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "id": {"name": "id", "description": "The ID of the Ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_id"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "display_url": {"name": "display_url", "description": "The display url of the ad that is being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "type": {"name": "type", "description": "The type of the ad in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_type"]}, "status": {"name": "status", "description": "Status of the Ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_status"]}, "final_urls": {"name": "final_urls", "description": "A list of urls that are used for the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean representing whether the state of the record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_ad_history_data\"", "created_at": 1783708224.3661864, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.google_ads.google_ads.ad_group_history": {"database": "postgres", "schema": "public", "name": "ad_group_history", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.ad_group_history", "fqn": ["google_ads", "staging", "google_ads", "ad_group_history"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_ad_group_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of an ad group in Google Ads.", "columns": {"id": {"name": "id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "type": {"name": "type", "description": "The type of the ad group in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_type"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "campaign_name": {"name": "campaign_name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_name"]}, "name": {"name": "name", "description": "The name of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_name"]}, "status": {"name": "status", "description": "Status of the ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_status"]}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean representing whether the state of the record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_ad_group_history_data\"", "created_at": 1783708224.3668132, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.google_ads.google_ads.campaign_history": {"database": "postgres", "schema": "public", "name": "campaign_history", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.campaign_history", "fqn": ["google_ads", "staging", "google_ads", "campaign_history"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_campaign_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of a campaign in Google Ads.", "columns": {"id": {"name": "id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "ad_network_type": {"name": "ad_network_type", "description": "The Google Ad network type used across the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_network_type"]}, "advertising_channel_type": {"name": "advertising_channel_type", "description": "The type of advertising channel being used by the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertising_channel_subtype": {"name": "advertising_channel_subtype", "description": "The advertising channel subtype that is being used by the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_date": {"name": "start_date", "description": "The start date of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_date_time": {"name": "start_date_time", "description": "The start date and time of the campaign as a timestamp.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_date": {"name": "end_date", "description": "The end date of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_date_time": {"name": "end_date_time", "description": "The end date and time of the campaign as a timestamp.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "serving_status": {"name": "serving_status", "description": "Status of the ads and how they are currently being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "General status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tracking_url_template": {"name": "tracking_url_template", "description": "The tracking url template being used throughout the campaign ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "device": {"name": "device", "description": "Account ad performance per unique device where the ads were served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.device"]}, "name": {"name": "name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_name"]}, "customer_id": {"name": "customer_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean representing whether the state of the record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_campaign_history_data\"", "created_at": 1783708224.3675156, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.google_ads.google_ads.account_history": {"database": "postgres", "schema": "public", "name": "account_history", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.account_history", "fqn": ["google_ads", "staging", "google_ads", "account_history"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_account_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a historical version of an account in Google Ads.", "columns": {"id": {"name": "id", "description": "The ID of the Account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.account_id"]}, "currency_code": {"name": "currency_code", "description": "The currency of the spend reported.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "auto_tagging_enabled": {"name": "auto_tagging_enabled", "description": "Boolean indicating if auto tagging is enabled on the account ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "time_zone": {"name": "time_zone", "description": "The time zone of the account ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "descriptive_name": {"name": "descriptive_name", "description": "The descriptive name of the Customer account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.account_descriptive_name"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean representing whether the state of the record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_account_history_data\"", "created_at": 1783708224.368177, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.google_ads.google_ads.ad_group_criterion_history": {"database": "postgres", "schema": "public", "name": "ad_group_criterion_history", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.ad_group_criterion_history", "fqn": ["google_ads", "staging", "google_ads", "ad_group_criterion_history"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_ad_group_criterion_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a historical version of an ad group criterion in Google Ads.", "columns": {"id": {"name": "id", "description": "Unique identifier of the ad group criterion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "base_campaign_id": {"name": "base_campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "type": {"name": "type", "description": "The type of ad group criterion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The current status of the ad group criterion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_match_type": {"name": "keyword_match_type", "description": "The match type which dictate how closely the keyword needs to match with the user's search query so that the ad can be considered for the auction.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_text": {"name": "keyword_text", "description": "The text used within the keyword criterion that is being matched against.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean representing whether the state of the record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_ad_group_criterion_history_data\"", "created_at": 1783708224.3688571, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.google_ads.google_ads.ad_group_stats": {"database": "postgres", "schema": "public", "name": "ad_group_stats", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.ad_group_stats", "fqn": ["google_ads", "staging", "google_ads", "ad_group_stats"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_ad_group_stats_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of an ad group in Google Ads broken down to the ad network and device type.", "columns": {"customer_id": {"name": "customer_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "date": {"name": "date", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "id": {"name": "id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "ad_network_type": {"name": "ad_network_type", "description": "The Google Ad network type used across the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_network_type"]}, "device": {"name": "device", "description": "Account ad performance per unique device where the ads were served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.device"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "cost_micros": {"name": "cost_micros", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_ad_group_stats_data\"", "created_at": 1783708224.3695304, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.google_ads.google_ads.campaign_stats": {"database": "postgres", "schema": "public", "name": "campaign_stats", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.campaign_stats", "fqn": ["google_ads", "staging", "google_ads", "campaign_stats"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_campaign_stats_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of a campaign in Google Ads broken down to the ad network and device type.", "columns": {"customer_id": {"name": "customer_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "date": {"name": "date", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "id": {"name": "id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "cost_micros": {"name": "cost_micros", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_campaign_stats_data\"", "created_at": 1783708224.3701878, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.google_ads.google_ads.keyword_stats": {"database": "postgres", "schema": "public", "name": "keyword_stats", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.keyword_stats", "fqn": ["google_ads", "staging", "google_ads", "keyword_stats"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_keyword_stats_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of a keyword in Google Ads.", "columns": {"customer_id": {"name": "customer_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "date": {"name": "date", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "_fivetran_id": {"name": "_fivetran_id", "description": "The unique ID of the keyword record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "ad_group_criterion_criterion_id": {"name": "ad_group_criterion_criterion_id", "description": "Reference to the ad group criterion used for the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "cost_micros": {"name": "cost_micros", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_keyword_stats_data\"", "created_at": 1783708224.3708375, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.google_ads.google_ads.account_stats": {"database": "postgres", "schema": "public", "name": "account_stats", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.account_stats", "fqn": ["google_ads", "staging", "google_ads", "account_stats"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_account_stats_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of an account in Google Ads broken down to the ad network and device type.", "columns": {"customer_id": {"name": "customer_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "date": {"name": "date", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "ad_network_type": {"name": "ad_network_type", "description": "The Google Ad network type used across the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_network_type"]}, "device": {"name": "device", "description": "Account ad performance per unique device where the ads were served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.device"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "cost_micros": {"name": "cost_micros", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_account_stats_data\"", "created_at": 1783708224.3715181, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.google_ads.google_ads.search_term_keyword_stats": {"database": "postgres", "schema": "public", "name": "search_term_keyword_stats", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.search_term_keyword_stats", "fqn": ["google_ads", "staging", "google_ads", "search_term_keyword_stats"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_search_term_keyword_stats_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of a search term (including associated tracked keywords) in Google Ads.", "columns": {"customer_id": {"name": "customer_id", "description": "The Customer ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.external_customer_id"]}, "date": {"name": "date", "description": "The date being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.date"]}, "_fivetran_id": {"name": "_fivetran_id", "description": "Unique ID used by Fivetran to sync and dedupe data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads._fivetran_id"]}, "resource_name": {"name": "resource_name", "description": "The resource name of the search term view. Search term view resource names have the form: `customers/{customer_id}/searchTermViews/{campaign_id}~{ad_group_id}~{URL-base64_search_term}`", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.resource_name"]}, "search_term": {"name": "search_term", "description": "A word or set of words a person enters when searching on Google or one of Google's Search Network sites", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.search_term"]}, "conversions_value": {"name": "conversions_value", "description": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_value"]}, "conversions": {"name": "conversions", "description": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "search_term_match_type": {"name": "search_term_match_type", "description": "How closely the search terms that triggered your ads on Google are related to the actual keywords in your account. Can be `BROAD` ,`EXACT`, `PHRASE`, `UNKNOWN`, or `UNSPECIFIED`.\n\nSee more details [here](https://support.google.com/google-ads/answer/7478529?sjid=15681083914881504235-NC&visit_id=638760377693438101-1187740487&rd=1).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.search_term_match_type"]}, "impressions": {"name": "impressions", "description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.impressions"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ad_group_id"]}, "view_through_conversions": {"name": "view_through_conversions", "description": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.view_through_conversions"]}, "clicks": {"name": "clicks", "description": "The number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.clicks"]}, "keyword_ad_group_criterion": {"name": "keyword_ad_group_criterion", "description": "The resource name of the keyword's ad group criterion. Ad group criterion resource names have the form: `customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}`", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.keyword_ad_group_criterion"]}, "status": {"name": "status", "description": "Indicates whether the search term is currently one of your targeted or excluded keywords. Possible values: `ADDED`, `ADDED_EXCLUDED`, `EXCLUDED`, `NONE`, `UNKNOWN`, or `UNSPECIFIED`", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.search_term_status"]}, "info_text": {"name": "info_text", "description": "The text of the keyword (at most 80 characters and 10 words).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.info_text"]}, "conversions_from_interactions_value_per_interaction": {"name": "conversions_from_interactions_value_per_interaction", "description": "The value of conversions from interactions divided by the number of ad interactions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_from_interactions_value_per_interaction"]}, "average_cpc": {"name": "average_cpc", "description": "Average cost-per-click. The average amount that you've been charged for a click on your ad. Average cost-per-click (avg. CPC) is calculated by dividing the total cost of your clicks by the total number of clicks. See more details [here](https://support.google.com/google-ads/answer/14074?hl=en&ref_topic=24937&sjid=15681083914881504235-NC).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.average_cpc"]}, "ctr": {"name": "ctr", "description": "The click-through rate. A ratio showing how often people who see your ad or free product listing end up clicking it. See more details [here](https://support.google.com/google-ads/answer/2615875?hl=en&ref_topic=24937&sjid=15681083914881504235-NC).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.ctr"]}, "conversions_from_interactions_rate": {"name": "conversions_from_interactions_rate", "description": "Conversions from interactions divided by the number of ad interactions (such as clicks for text ads or views for video ads).\n\nSee more details [here](https://support.google.com/google-ads/answer/2684489?hl=en&ref_topic=24937&sjid=15681083914881504235-NC).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.conversions_from_interactions_rate"]}, "cost_micros": {"name": "cost_micros", "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.cost"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_search_term_keyword_stats_data\"", "created_at": 1783708224.37227, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.google_ads.google_ads.campaign_bid_modifier_history": {"database": "postgres", "schema": "public", "name": "campaign_bid_modifier_history", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.campaign_bid_modifier_history", "fqn": ["google_ads", "staging", "google_ads", "campaign_bid_modifier_history"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_campaign_bid_modifier_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a historical version of a campaign bid modifier in Google Ads.", "columns": {"campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "criterion_id": {"name": "criterion_id", "description": "Unique identifier of the criterion that the bid modifier is applied to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_modifier": {"name": "bid_modifier", "description": "The modifier applied to the bid for this criterion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "interaction_type": {"name": "interaction_type", "description": "The type of interaction for the bid modifier.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "interaction_event_types": {"name": "interaction_event_types", "description": "The event types for the interaction.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean representing whether the state of the record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_campaign_bid_modifier_history_data\"", "created_at": 1783708224.372899, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.google_ads.google_ads.campaign_budget_history": {"database": "postgres", "schema": "public", "name": "campaign_budget_history", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.campaign_budget_history", "fqn": ["google_ads", "staging", "google_ads", "campaign_budget_history"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_campaign_budget_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a historical version of a campaign budget in Google Ads.", "columns": {"id": {"name": "id", "description": "Unique identifier of the budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "amount_micros": {"name": "amount_micros", "description": "The daily budget amount in micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "delivery_method": {"name": "delivery_method", "description": "The delivery method for the budget (STANDARD or ACCELERATED).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "explicitly_shared": {"name": "explicitly_shared", "description": "Boolean indicating if the budget is explicitly shared across campaigns.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reference_count": {"name": "reference_count", "description": "The number of campaigns using this budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The status of the budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "has_recommended_budget": {"name": "has_recommended_budget", "description": "Boolean indicating if Google has a recommended budget for this campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "period": {"name": "period", "description": "The budget period (e.g., DAILY, LIFETIME).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "recommended_budget_amount_micros": {"name": "recommended_budget_amount_micros", "description": "Google's recommended daily budget amount in micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_amount_micros": {"name": "total_amount_micros", "description": "The total budget amount in micros for lifetime budgets.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "type": {"name": "type", "description": "The type of budget (DAILY, LIFETIME, etc.).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean representing whether the state of the record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_campaign_budget_history_data\"", "created_at": 1783708224.373585, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.google_ads.google_ads.campaign_criterion_history": {"database": "postgres", "schema": "public", "name": "campaign_criterion_history", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.campaign_criterion_history", "fqn": ["google_ads", "staging", "google_ads", "campaign_criterion_history"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_campaign_criterion_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a historical version of a campaign criterion in Google Ads.", "columns": {"id": {"name": "id", "description": "Unique identifier of the campaign criterion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "geo_target_constant_id": {"name": "geo_target_constant_id", "description": "The geographic target constant ID for location targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_device_id": {"name": "mobile_device_id", "description": "The mobile device constant ID for mobile device targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "operating_system_version_id": {"name": "operating_system_version_id", "description": "The operating system version constant ID for OS targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "topic_constant_id": {"name": "topic_constant_id", "description": "The topic constant ID for topic targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "user_interest_id": {"name": "user_interest_id", "description": "The user interest constant ID for interest targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "user_list_id": {"name": "user_list_id", "description": "The user list ID for audience targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "age_range_type": {"name": "age_range_type", "description": "The age range type for demographic targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_modifier": {"name": "bid_modifier", "description": "The bid modifier applied to this criterion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "carrier_country_code": {"name": "carrier_country_code", "description": "The country code for carrier targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "carrier_name": {"name": "carrier_name", "description": "The carrier name for carrier targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "content_label_type": {"name": "content_label_type", "description": "The content label type for content exclusion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "device_type": {"name": "device_type", "description": "The device type for targeting (MOBILE, DESKTOP, TABLET).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "display_name": {"name": "display_name", "description": "The display name of the criterion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "gender_type": {"name": "gender_type", "description": "The gender type for demographic targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "income_range_type": {"name": "income_range_type", "description": "The income range type for demographic targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ip_block_ip_address": {"name": "ip_block_ip_address", "description": "The IP address for IP block targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "negative": {"name": "negative", "description": "Boolean indicating if this is a negative criterion (exclusion).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_match_type": {"name": "keyword_match_type", "description": "The match type for keyword targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keyword_text": {"name": "keyword_text", "description": "The keyword text for keyword targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "language_code": {"name": "language_code", "description": "The language code for language targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "language_name": {"name": "language_name", "description": "The language name for language targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_app_category_constant_id": {"name": "mobile_app_category_constant_id", "description": "The mobile app category constant ID for app category targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_app_category_constant_name": {"name": "mobile_app_category_constant_name", "description": "The mobile app category name for app category targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_application_app_id": {"name": "mobile_application_app_id", "description": "The mobile application app ID for app targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_application_name": {"name": "mobile_application_name", "description": "The mobile application name for app targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "parental_status_type": {"name": "parental_status_type", "description": "The parental status type for demographic targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement_url": {"name": "placement_url", "description": "The placement URL for placement targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The status of the criterion.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "type": {"name": "type", "description": "The type of criterion (e.g., KEYWORD, PLACEMENT, AUDIENCE).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "youtube_channel_id": {"name": "youtube_channel_id", "description": "The YouTube channel ID for YouTube channel targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "youtube_video_id": {"name": "youtube_video_id", "description": "The YouTube video ID for YouTube video targeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean representing whether the state of the record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_campaign_criterion_history_data\"", "created_at": 1783708224.3747833, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.google_ads.google_ads.campaign_bidding_strategy_history": {"database": "postgres", "schema": "public", "name": "campaign_bidding_strategy_history", "resource_type": "source", "package_name": "google_ads", "path": "models/staging/src_google_ads.yml", "original_file_path": "models/staging/src_google_ads.yml", "unique_id": "source.google_ads.google_ads.campaign_bidding_strategy_history", "fqn": ["google_ads", "staging", "google_ads", "campaign_bidding_strategy_history"], "source_name": "google_ads", "source_description": "", "loader": "Fivetran", "identifier": "google_ads_campaign_bidding_strategy_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a historical version of a campaign bidding strategy in Google Ads.", "columns": {"campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.campaign_id"]}, "updated_at": {"name": "updated_at", "description": "Timestamp of when the record was last updated in Google Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.google_ads.updated_at"]}, "cpc_bid_ceiling_micros": {"name": "cpc_bid_ceiling_micros", "description": "The maximum cost per click bid in micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpc_bid_floor_micros": {"name": "cpc_bid_floor_micros", "description": "The minimum cost per click bid in micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "enhanced_cpc": {"name": "enhanced_cpc", "description": "Boolean indicating if enhanced CPC is enabled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "enhanced_cpc_enabled": {"name": "enhanced_cpc_enabled", "description": "Boolean indicating if enhanced CPC is enabled (alternative field).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "location": {"name": "location", "description": "The location for location-based bidding strategies.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "location_fraction_micros": {"name": "location_fraction_micros", "description": "The location fraction for location-based strategies in micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "manual_cpa": {"name": "manual_cpa", "description": "Manual cost per acquisition setting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "manual_cpm": {"name": "manual_cpm", "description": "Manual cost per mille setting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "manual_cpv": {"name": "manual_cpv", "description": "Manual cost per view setting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the bidding strategy.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "The status of the bidding strategy.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "target_cpa_micros": {"name": "target_cpa_micros", "description": "Target cost per acquisition in micros.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "target_cpm": {"name": "target_cpm", "description": "Target cost per mille.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "target_roas": {"name": "target_roas", "description": "Target return on ad spend.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "type": {"name": "type", "description": "The type of bidding strategy (MANUAL_CPC, TARGET_CPA, etc.).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "Boolean representing whether the state of the record is currently active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"google_ads_campaign_bidding_strategy_history_data\"", "created_at": 1783708224.375493, "unrendered_database": "{% if target.type != 'spark' %}{{ var('google_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('google_ads_schema', 'google_ads') }}", "doc_blocks": []}, "source.amazon_ads.amazon_ads.ad_group_history": {"database": "postgres", "schema": "public", "name": "ad_group_history", "resource_type": "source", "package_name": "amazon_ads", "path": "models/staging/src_amazon_ads.yml", "original_file_path": "models/staging/src_amazon_ads.yml", "unique_id": "source.amazon_ads.amazon_ads.ad_group_history", "fqn": ["amazon_ads", "staging", "amazon_ads", "ad_group_history"], "source_name": "amazon_ads", "source_description": "", "loader": "Fivetran", "identifier": "amazon_ads_ad_group_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents an ad group in Amazon Ads.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads._fivetran_synced"]}, "id": {"name": "id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "name": {"name": "name", "description": "The name of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "creation_date": {"name": "creation_date", "description": "The date of creation of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.creation_date"]}, "default_bid": {"name": "default_bid", "description": "The date of creation of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.default_bid"]}, "last_updated_date": {"name": "last_updated_date", "description": "Date of last update to record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.last_updated_date"]}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"amazon_ads_ad_group_history_data\"", "created_at": 1783708224.3761723, "unrendered_database": "{% if target.type != 'spark'%}{{ var('amazon_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('amazon_ads_schema', 'amazon_ads') }}", "doc_blocks": []}, "source.amazon_ads.amazon_ads.ad_group_level_report": {"database": "postgres", "schema": "public", "name": "ad_group_level_report", "resource_type": "source", "package_name": "amazon_ads", "path": "models/staging/src_amazon_ads.yml", "original_file_path": "models/staging/src_amazon_ads.yml", "unique_id": "source.amazon_ads.amazon_ads.ad_group_level_report", "fqn": ["amazon_ads", "staging", "amazon_ads", "ad_group_level_report"], "source_name": "amazon_ads", "source_description": "", "loader": "Fivetran", "identifier": "amazon_ads_ad_group_level_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents the daily performance by Amazon ad group.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads._fivetran_synced"]}, "date": {"name": "date", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "campaign_bidding_strategy": {"name": "campaign_bidding_strategy", "description": "The bidding strategy associated with a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_bidding_strategy"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"amazon_ads_ad_group_level_report_data\"", "created_at": 1783708224.3768053, "unrendered_database": "{% if target.type != 'spark'%}{{ var('amazon_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('amazon_ads_schema', 'amazon_ads') }}", "doc_blocks": []}, "source.amazon_ads.amazon_ads.advertised_product_report": {"database": "postgres", "schema": "public", "name": "advertised_product_report", "resource_type": "source", "package_name": "amazon_ads", "path": "models/staging/src_amazon_ads.yml", "original_file_path": "models/staging/src_amazon_ads.yml", "unique_id": "source.amazon_ads.amazon_ads.advertised_product_report", "fqn": ["amazon_ads", "staging", "amazon_ads", "advertised_product_report"], "source_name": "amazon_ads", "source_description": "", "loader": "Fivetran", "identifier": "amazon_ads_advertised_product_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Advertised product reports contain performance data for products that are advertised as part of your campaigns.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads._fivetran_synced"]}, "date": {"name": "date", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "ad_id": {"name": "ad_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "advertised_asin": {"name": "advertised_asin", "description": "The ASIN associated to an advertised product.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.advertised_asin"]}, "advertised_sku": {"name": "advertised_sku", "description": "The SKU being advertised.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.advertised_sku"]}, "campaign_budget_amount": {"name": "campaign_budget_amount", "description": "Total budget allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_amount"]}, "campaign_budget_currency_code": {"name": "campaign_budget_currency_code", "description": "The currency code associated with the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_currency_code"]}, "campaign_budget_type": {"name": "campaign_budget_type", "description": "One of: daily or lifetime.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_type"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"amazon_ads_advertised_product_report_data\"", "created_at": 1783708224.3775015, "unrendered_database": "{% if target.type != 'spark'%}{{ var('amazon_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('amazon_ads_schema', 'amazon_ads') }}", "doc_blocks": []}, "source.amazon_ads.amazon_ads.campaign_history": {"database": "postgres", "schema": "public", "name": "campaign_history", "resource_type": "source", "package_name": "amazon_ads", "path": "models/staging/src_amazon_ads.yml", "original_file_path": "models/staging/src_amazon_ads.yml", "unique_id": "source.amazon_ads.amazon_ads.campaign_history", "fqn": ["amazon_ads", "staging", "amazon_ads", "campaign_history"], "source_name": "amazon_ads", "source_description": "", "loader": "Fivetran", "identifier": "amazon_ads_campaign_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a campaign in Amazon Ads.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads._fivetran_synced"]}, "id": {"name": "id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "name": {"name": "name", "description": "The name of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_name"]}, "creation_date": {"name": "creation_date", "description": "The date of creation of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.creation_date"]}, "last_updated_date": {"name": "last_updated_date", "description": "Date of last update to record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.last_updated_date"]}, "portfolio_id": {"name": "portfolio_id", "description": "The ID of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_id"]}, "bidding_strategy": {"name": "bidding_strategy", "description": "The bidding strategy associated with a campaign (legacyForSales, autoForSales, or manual.)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget": {"name": "budget", "description": "The budget for the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_type": {"name": "budget_type", "description": "One of: daily or lifetime.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_type"]}, "effective_budget": {"name": "effective_budget", "description": "Adjusted budget for the campaign that has been impacted by a budget rule.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_date": {"name": "end_date", "description": "The end date of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_id": {"name": "profile_id", "description": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.profile_id"]}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "start_date": {"name": "start_date", "description": "The start date of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}, "targeting_type": {"name": "targeting_type", "description": "The type of targeting used for the campaign, either manual or auto.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"amazon_ads_campaign_history_data\"", "created_at": 1783708224.3782256, "unrendered_database": "{% if target.type != 'spark'%}{{ var('amazon_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('amazon_ads_schema', 'amazon_ads') }}", "doc_blocks": []}, "source.amazon_ads.amazon_ads.campaign_level_report": {"database": "postgres", "schema": "public", "name": "campaign_level_report", "resource_type": "source", "package_name": "amazon_ads", "path": "models/staging/src_amazon_ads.yml", "original_file_path": "models/staging/src_amazon_ads.yml", "unique_id": "source.amazon_ads.amazon_ads.campaign_level_report", "fqn": ["amazon_ads", "staging", "amazon_ads", "campaign_level_report"], "source_name": "amazon_ads", "source_description": "", "loader": "Fivetran", "identifier": "amazon_ads_campaign_level_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents the daily performance by Amazon campaign.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads._fivetran_synced"]}, "date": {"name": "date", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "campaign_applicable_budget_rule_id": {"name": "campaign_applicable_budget_rule_id", "description": "The ID associated to the active budget rule for a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_applicable_budget_rule_id"]}, "campaign_applicable_budget_rule_name": {"name": "campaign_applicable_budget_rule_name", "description": "The name associated to the active budget rule for a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_applicable_budget_rule_name"]}, "campaign_bidding_strategy": {"name": "campaign_bidding_strategy", "description": "The bidding strategy associated with a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_bidding_strategy"]}, "campaign_budget_amount": {"name": "campaign_budget_amount", "description": "Total budget allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_amount"]}, "campaign_budget_currency_code": {"name": "campaign_budget_currency_code", "description": "The currency code associated with the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_currency_code"]}, "campaign_budget_type": {"name": "campaign_budget_type", "description": "One of: daily or lifetime.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_type"]}, "campaign_rule_based_budget_amount": {"name": "campaign_rule_based_budget_amount", "description": "The value of the rule-based budget for a campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_rule_based_budget_amount"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"amazon_ads_campaign_level_report_data\"", "created_at": 1783708224.37889, "unrendered_database": "{% if target.type != 'spark'%}{{ var('amazon_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('amazon_ads_schema', 'amazon_ads') }}", "doc_blocks": []}, "source.amazon_ads.amazon_ads.keyword_history": {"database": "postgres", "schema": "public", "name": "keyword_history", "resource_type": "source", "package_name": "amazon_ads", "path": "models/staging/src_amazon_ads.yml", "original_file_path": "models/staging/src_amazon_ads.yml", "unique_id": "source.amazon_ads.amazon_ads.keyword_history", "fqn": ["amazon_ads", "staging", "amazon_ads", "keyword_history"], "source_name": "amazon_ads", "source_description": "", "loader": "Fivetran", "identifier": "amazon_ads_keyword_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a keyword in Amazon Ads.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads._fivetran_synced"]}, "id": {"name": "id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_id"]}, "last_updated_date": {"name": "last_updated_date", "description": "Date of last update to record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.last_updated_date"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "bid": {"name": "bid", "description": "Bid associated with this keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.bid_keyword"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "creation_date": {"name": "creation_date", "description": "The date of creation of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.creation_date"]}, "keyword_text": {"name": "keyword_text", "description": "The exact text for the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "match_type": {"name": "match_type", "description": "One of (broad, exact, or phrase.)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_match_type"]}, "native_language_keyword": {"name": "native_language_keyword", "description": "The unlocalized keyword text in the preferred locale of the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "native_language_locale": {"name": "native_language_locale", "description": "The preferred language locale of the advertiser.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"amazon_ads_keyword_history_data\"", "created_at": 1783708224.3795502, "unrendered_database": "{% if target.type != 'spark'%}{{ var('amazon_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('amazon_ads_schema', 'amazon_ads') }}", "doc_blocks": []}, "source.amazon_ads.amazon_ads.portfolio_history": {"database": "postgres", "schema": "public", "name": "portfolio_history", "resource_type": "source", "package_name": "amazon_ads", "path": "models/staging/src_amazon_ads.yml", "original_file_path": "models/staging/src_amazon_ads.yml", "unique_id": "source.amazon_ads.amazon_ads.portfolio_history", "fqn": ["amazon_ads", "staging", "amazon_ads", "portfolio_history"], "source_name": "amazon_ads", "source_description": "", "loader": "Fivetran", "identifier": "amazon_ads_portfolio_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a portfolio in Amazon Ads.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads._fivetran_synced"]}, "id": {"name": "id", "description": "The ID of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_id"]}, "name": {"name": "name", "description": "The name of the Portfolio.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.portfolio_name"]}, "last_updated_date": {"name": "last_updated_date", "description": "Date of last update to record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.last_updated_date"]}, "creation_date": {"name": "creation_date", "description": "The date of creation of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.creation_date"]}, "budget_amount": {"name": "budget_amount", "description": "The budget amount associated with the portfolio. Cannot be null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_currency_code": {"name": "budget_currency_code", "description": "The currency used for all monetary values for entities under this profile. Cannot be null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_end_date": {"name": "budget_end_date", "description": "The end date after which the budget is no longer applied. Optional if policy is set to dateRange or monthlyRecurring.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_start_date": {"name": "budget_start_date", "description": "The starting date in YYYYMMDD format to which the budget is applied. Required if policy is set to dateRange. Not specified if policy is set to monthlyRecurring. Note that the starting date for monthlyRecurring is the date when the policy is set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_policy": {"name": "budget_policy", "description": "The budget policy. Set to dateRange to specify a budget for a specific period of time. Set to monthlyRecurring to specify a budget that is automatically renewed at the beginning of each month. Cannot be null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "in_budget": {"name": "in_budget", "description": "Indicates the current budget status of the portfolio. Set to true if the portfolio is in budget, set to false if the portfolio is out of budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_id": {"name": "profile_id", "description": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.profile_id"]}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"amazon_ads_portfolio_history_data\"", "created_at": 1783708224.3802204, "unrendered_database": "{% if target.type != 'spark'%}{{ var('amazon_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('amazon_ads_schema', 'amazon_ads') }}", "doc_blocks": []}, "source.amazon_ads.amazon_ads.product_ad_history": {"database": "postgres", "schema": "public", "name": "product_ad_history", "resource_type": "source", "package_name": "amazon_ads", "path": "models/staging/src_amazon_ads.yml", "original_file_path": "models/staging/src_amazon_ads.yml", "unique_id": "source.amazon_ads.amazon_ads.product_ad_history", "fqn": ["amazon_ads", "staging", "amazon_ads", "product_ad_history"], "source_name": "amazon_ads", "source_description": "", "loader": "Fivetran", "identifier": "amazon_ads_product_ad_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a product in Amazon Ads.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads._fivetran_synced"]}, "id": {"name": "id", "description": "The ID of the Ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_id"]}, "last_updated_date": {"name": "last_updated_date", "description": "Date of last update to record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.last_updated_date"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "asin": {"name": "asin", "description": "The Amazon Standard Identification Number (ASIN) associated with the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creation_date": {"name": "creation_date", "description": "The date of creation of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.creation_date"]}, "sku": {"name": "sku", "description": "The product SKU associated with the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "serving_status": {"name": "serving_status", "description": "The current serving status of the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.serving_status"]}, "state": {"name": "state", "description": "The state of the record (enabled, paused, or archived).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.state"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"amazon_ads_product_ad_history_data\"", "created_at": 1783708224.3808901, "unrendered_database": "{% if target.type != 'spark'%}{{ var('amazon_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('amazon_ads_schema', 'amazon_ads') }}", "doc_blocks": []}, "source.amazon_ads.amazon_ads.profile": {"database": "postgres", "schema": "public", "name": "profile", "resource_type": "source", "package_name": "amazon_ads", "path": "models/staging/src_amazon_ads.yml", "original_file_path": "models/staging/src_amazon_ads.yml", "unique_id": "source.amazon_ads.amazon_ads.profile", "fqn": ["amazon_ads", "staging", "amazon_ads", "profile"], "source_name": "amazon_ads", "source_description": "", "loader": "Fivetran", "identifier": "amazon_ads_profile_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a profile. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace.", "columns": {"_fivetran_deleted": {"name": "_fivetran_deleted", "description": "Boolean created by Fivetran to indicate whether the record has been deleted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads._fivetran_deleted"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads._fivetran_synced"]}, "id": {"name": "id", "description": "ID of the profile.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplace.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_marketplace_string_id": {"name": "account_marketplace_string_id", "description": "The identifier of the marketplace to which the account is associated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_name": {"name": "account_name", "description": "Account Name. Not currently populated for sellers.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_sub_type": {"name": "account_sub_type", "description": "The account subtype.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_type": {"name": "account_type", "description": "One of seller, vendor, or agency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_valid_payment_method": {"name": "account_valid_payment_method", "description": "For Vendors, this returns if the Advertiser has set up a valid payment method.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country_code": {"name": "country_code", "description": "The code for a given country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency_code": {"name": "currency_code", "description": "The currency used for all monetary values for entities under this profile.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget": {"name": "daily_budget", "description": "Daily budget for Sponsored Product campaigns for seller type accounts.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone": {"name": "timezone", "description": "The time zone used for all date-based campaign management and reporting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"amazon_ads_profile_data\"", "created_at": 1783708224.3815503, "unrendered_database": "{% if target.type != 'spark'%}{{ var('amazon_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('amazon_ads_schema', 'amazon_ads') }}", "doc_blocks": []}, "source.amazon_ads.amazon_ads.targeting_keyword_report": {"database": "postgres", "schema": "public", "name": "targeting_keyword_report", "resource_type": "source", "package_name": "amazon_ads", "path": "models/staging/src_amazon_ads.yml", "original_file_path": "models/staging/src_amazon_ads.yml", "unique_id": "source.amazon_ads.amazon_ads.targeting_keyword_report", "fqn": ["amazon_ads", "staging", "amazon_ads", "targeting_keyword_report"], "source_name": "amazon_ads", "source_description": "", "loader": "Fivetran", "identifier": "amazon_ads_targeting_keyword_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Targeting reports contain performance metrics broken down by both targeting expressions and keywords.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads._fivetran_synced"]}, "date": {"name": "date", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "ad_keyword_status": {"name": "ad_keyword_status", "description": "Current status of a keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_keyword_status"]}, "campaign_budget_amount": {"name": "campaign_budget_amount", "description": "Total budget allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_amount"]}, "campaign_budget_currency_code": {"name": "campaign_budget_currency_code", "description": "The currency code associated with the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_currency_code"]}, "campaign_budget_type": {"name": "campaign_budget_type", "description": "One of: daily or lifetime.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_type"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "keyword_bid": {"name": "keyword_bid", "description": "Bid associated with a keyword or targeting expression.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_bid"]}, "keyword_id": {"name": "keyword_id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_id"]}, "keyword_type": {"name": "keyword_type", "description": "Type of matching for the keyword used in bid. One of: BROAD, PHRASE, or EXACT.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_type"]}, "match_type": {"name": "match_type", "description": "Type of matching for the keyword used in bid. One of: BROAD, PHRASE, or EXACT.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.match_type"]}, "targeting": {"name": "targeting", "description": "A string representation of the expression object used in the targeting clause.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.targeting"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"amazon_ads_targeting_keyword_report_data\"", "created_at": 1783708224.38223, "unrendered_database": "{% if target.type != 'spark'%}{{ var('amazon_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('amazon_ads_schema', 'amazon_ads') }}", "doc_blocks": []}, "source.amazon_ads.amazon_ads.search_term_ad_keyword_report": {"database": "postgres", "schema": "public", "name": "search_term_ad_keyword_report", "resource_type": "source", "package_name": "amazon_ads", "path": "models/staging/src_amazon_ads.yml", "original_file_path": "models/staging/src_amazon_ads.yml", "unique_id": "source.amazon_ads.amazon_ads.search_term_ad_keyword_report", "fqn": ["amazon_ads", "staging", "amazon_ads", "search_term_ad_keyword_report"], "source_name": "amazon_ads", "source_description": "", "loader": "Fivetran", "identifier": "amazon_ads_search_term_ad_keyword_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Search term reports contain search term performance metrics broken down by targeting expressions and keywords.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when a record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads._fivetran_synced"]}, "date": {"name": "date", "description": "The date of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.report_date"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the AdGroup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.ad_group_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the Campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_id"]}, "keyword_id": {"name": "keyword_id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_id"]}, "clicks": {"name": "clicks", "description": "Total number of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.clicks"]}, "impressions": {"name": "impressions", "description": "Total number of ad impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.impressions"]}, "cost": {"name": "cost", "description": "Total cost of ad clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.cost"]}, "campaign_budget_amount": {"name": "campaign_budget_amount", "description": "Total budget allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_amount"]}, "campaign_budget_currency_code": {"name": "campaign_budget_currency_code", "description": "The currency code associated with the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_currency_code"]}, "campaign_budget_type": {"name": "campaign_budget_type", "description": "One of: daily or lifetime.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.campaign_budget_type"]}, "keyword_bid": {"name": "keyword_bid", "description": "Bid associated with a keyword or targeting expression.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.keyword_bid"]}, "search_term": {"name": "search_term", "description": "The search term used by the customer.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.search_term"]}, "targeting": {"name": "targeting", "description": "A string representation of the expression object used in the targeting clause.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.targeting"]}, "purchases_30_d": {"name": "purchases_30_d", "description": "Number of attributed conversion events occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.purchases_30_d"]}, "sales_30_d": {"name": "sales_30_d", "description": "Total value of sales occurring within 30 days of an ad click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.amazon_ads.sales_30_d"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"amazon_ads_search_term_ad_keyword_report_data\"", "created_at": 1783708224.3828876, "unrendered_database": "{% if target.type != 'spark'%}{{ var('amazon_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('amazon_ads_schema', 'amazon_ads') }}", "doc_blocks": []}, "source.twitter_ads.twitter_ads.account_history": {"database": "postgres", "schema": "public", "name": "account_history", "resource_type": "source", "package_name": "twitter_ads", "path": "models/staging/src_twitter_ads.yml", "original_file_path": "models/staging/src_twitter_ads.yml", "unique_id": "source.twitter_ads.twitter_ads.account_history", "fqn": ["twitter_ads", "staging", "twitter_ads", "account_history"], "source_name": "twitter_ads", "source_description": "", "loader": "fivetran", "identifier": "twitter_account_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of each account. The versions can be differentiated by the updated_at timestamp.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads._fivetran_synced"]}, "approval_status": {"name": "approval_status", "description": "The approval status of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "business_id": {"name": "business_id", "description": "The ID of the related business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "business_name": {"name": "business_name", "description": "The name of the related business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.created_at"]}, "deleted": {"name": "deleted", "description": "Whether the record has been deleted or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.deleted"]}, "id": {"name": "id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "industry_type": {"name": "industry_type", "description": "The industry of the accounts.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone": {"name": "timezone", "description": "The timezone the account is set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone_switch_at": {"name": "timezone_switch_at", "description": "The timestamp the account's timezone was last changed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "The timestamp the account was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.updated_at"]}, "salt": {"name": "salt", "description": "The random encryption key used to has data.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"twitter_account_history_data\"", "created_at": 1783708224.3836005, "unrendered_database": "{% if target.type != 'spark'%}{{ var('twitter_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('twitter_ads_schema', 'twitter_ads') }}", "doc_blocks": []}, "source.twitter_ads.twitter_ads.campaign_history": {"database": "postgres", "schema": "public", "name": "campaign_history", "resource_type": "source", "package_name": "twitter_ads", "path": "models/staging/src_twitter_ads.yml", "original_file_path": "models/staging/src_twitter_ads.yml", "unique_id": "source.twitter_ads.twitter_ads.campaign_history", "fqn": ["twitter_ads", "staging", "twitter_ads", "campaign_history"], "source_name": "twitter_ads", "source_description": "", "loader": "fivetran", "identifier": "twitter_campaign_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of each campaign. The versions can be differentiated by the updated_at timestamp.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.created_at"]}, "currency": {"name": "currency", "description": "The currently all metrics for the account are set to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget_amount_local_micro": {"name": "daily_budget_amount_local_micro", "description": "The daily budget amount to be allocated to the campaign. The currency associated with the specified funding instrument will be used.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "deleted": {"name": "deleted", "description": "Whether the record has been deleted or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.deleted"]}, "duration_in_days": {"name": "duration_in_days", "description": "The time period within which the frequency_cap is achieved.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_time": {"name": "end_time", "description": "The time the campaign will end", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "entity_status": {"name": "entity_status", "description": "The status of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "frequency_cap": {"name": "frequency_cap", "description": "The maximum number of times an ad could be delivered to a user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "servable": {"name": "servable", "description": "Whether the campaign is in a state to be actively served to users.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "standard_delivery": {"name": "standard_delivery", "description": "Whether standard delivery is enabled (vs accelerated delivery).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_time": {"name": "start_time", "description": "The time the campaign will start.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_budget_amount_local_micro": {"name": "total_budget_amount_local_micro", "description": "The total budget amount to be allocated to the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "The timestamp the account was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.updated_at"]}, "funding_instrument_id": {"name": "funding_instrument_id", "description": "Reference to the funding instrument.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"twitter_campaign_history_data\"", "created_at": 1783708224.3842897, "unrendered_database": "{% if target.type != 'spark'%}{{ var('twitter_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('twitter_ads_schema', 'twitter_ads') }}", "doc_blocks": []}, "source.twitter_ads.twitter_ads.line_item_history": {"database": "postgres", "schema": "public", "name": "line_item_history", "resource_type": "source", "package_name": "twitter_ads", "path": "models/staging/src_twitter_ads.yml", "original_file_path": "models/staging/src_twitter_ads.yml", "unique_id": "source.twitter_ads.twitter_ads.line_item_history", "fqn": ["twitter_ads", "staging", "twitter_ads", "line_item_history"], "source_name": "twitter_ads", "source_description": "", "loader": "fivetran", "identifier": "twitter_line_item_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of each line item. The versions can be differentiated by the updated_at timestamp.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads._fivetran_synced"]}, "advertiser_domain": {"name": "advertiser_domain", "description": "The website domain for this advertiser, without the protocol specification.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_user_id": {"name": "advertiser_user_id", "description": "The Twitter user identifier for the handle promoting the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "automatically_select_bid": {"name": "automatically_select_bid", "description": "Whether automatically optimize bidding is enabled based on daily budget and campaign flight dates.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_amount_local_micro": {"name": "bid_amount_local_micro", "description": "The bid amount to be associated with this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_type": {"name": "bid_type", "description": "The bidding mechanism.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_unit": {"name": "bid_unit", "description": "The bid unit for this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the related campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "charge_by": {"name": "charge_by", "description": "The unit to charge this line item by.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.created_at"]}, "creative_source": {"name": "creative_source", "description": "The source of the creatives for the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "The currency in which metrics will be reported.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "deleted": {"name": "deleted", "description": "Whether the record has been deleted or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.deleted"]}, "end_time": {"name": "end_time", "description": "The timestamp at which the line item will stop being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "entity_status": {"name": "entity_status", "description": "The status of the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The ID of the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective": {"name": "objective", "description": "The campaign objective for this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "optimization": {"name": "optimization", "description": "The optimization setting to use with this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "primary_web_event_tag": {"name": "primary_web_event_tag", "description": "The identifier of the primary web event tag. Allows more accurate tracking of engagements for the campaign pertaining to this line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "product_type": {"name": "product_type", "description": "The type of promoted product that this line item will contain.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_time": {"name": "start_time", "description": "The timestamp at which the line item will start being served.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "target_cpa_local_micro": {"name": "target_cpa_local_micro", "description": "The target cost per acquisition for the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_budget_amount_local_micro": {"name": "total_budget_amount_local_micro", "description": "The total budget amount to be allocated to the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "The timestamp the account was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.updated_at"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"twitter_line_item_history_data\"", "created_at": 1783708224.3849854, "unrendered_database": "{% if target.type != 'spark'%}{{ var('twitter_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('twitter_ads_schema', 'twitter_ads') }}", "doc_blocks": []}, "source.twitter_ads.twitter_ads.promoted_tweet_history": {"database": "postgres", "schema": "public", "name": "promoted_tweet_history", "resource_type": "source", "package_name": "twitter_ads", "path": "models/staging/src_twitter_ads.yml", "original_file_path": "models/staging/src_twitter_ads.yml", "unique_id": "source.twitter_ads.twitter_ads.promoted_tweet_history", "fqn": ["twitter_ads", "staging", "twitter_ads", "promoted_tweet_history"], "source_name": "twitter_ads", "source_description": "", "loader": "fivetran", "identifier": "twitter_promoted_tweet_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of each promoted tweet. The versions can be differentiated by the updated_at timestamp.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads._fivetran_synced"]}, "approval_status": {"name": "approval_status", "description": "The approval status of the promoted tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "The timestamp the account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.created_at"]}, "deleted": {"name": "deleted", "description": "Whether the record has been deleted or not.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.deleted"]}, "entity_status": {"name": "entity_status", "description": "The status of the promoted tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "id": {"name": "id", "description": "The ID of the promoted tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_id": {"name": "line_item_id", "description": "The ID of the related line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tweet_id": {"name": "tweet_id", "description": "The ID of the related tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "The timestamp the account was last updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.updated_at"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"twitter_promoted_tweet_history_data\"", "created_at": 1783708224.385642, "unrendered_database": "{% if target.type != 'spark'%}{{ var('twitter_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('twitter_ads_schema', 'twitter_ads') }}", "doc_blocks": []}, "source.twitter_ads.twitter_ads.tweet_url": {"database": "postgres", "schema": "public", "name": "tweet_url", "resource_type": "source", "package_name": "twitter_ads", "path": "models/staging/src_twitter_ads.yml", "original_file_path": "models/staging/src_twitter_ads.yml", "unique_id": "source.twitter_ads.twitter_ads.tweet_url", "fqn": ["twitter_ads", "staging", "twitter_ads", "tweet_url"], "source_name": "twitter_ads", "source_description": "", "loader": "fivetran", "identifier": "twitter_tweet_url_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a URL used in a tweet.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads._fivetran_synced"]}, "display_url": {"name": "display_url", "description": "The URL as it will be displayed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "expanded_url": {"name": "expanded_url", "description": "The fully expanded URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "index": {"name": "index", "description": "The index of the URL within the tweet (ie if there are multiple URLs in the tweet).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "indices": {"name": "indices", "description": "The start and end point of where the URL is placed in the tweet text.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "tweet_id": {"name": "tweet_id", "description": "The ID of the related tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url": {"name": "url", "description": "The 't.co' shortened URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"twitter_tweet_url_data\"", "created_at": 1783708224.3863306, "unrendered_database": "{% if target.type != 'spark'%}{{ var('twitter_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('twitter_ads_schema', 'twitter_ads') }}", "doc_blocks": []}, "source.twitter_ads.twitter_ads.promoted_tweet_report": {"database": "postgres", "schema": "public", "name": "promoted_tweet_report", "resource_type": "source", "package_name": "twitter_ads", "path": "models/staging/src_twitter_ads.yml", "original_file_path": "models/staging/src_twitter_ads.yml", "unique_id": "source.twitter_ads.twitter_ads.promoted_tweet_report", "fqn": ["twitter_ads", "staging", "twitter_ads", "promoted_tweet_report"], "source_name": "twitter_ads", "source_description": "", "loader": "fivetran", "identifier": "twitter_promoted_tweet_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the performance of a promoted tweet on a given day, in its defined placement.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "billed_charge_local_micro": {"name": "billed_charge_local_micro", "description": "The spend for the promoted tweet on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the promoted tweet on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the promoted tweet on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "promoted_tweet_id": {"name": "promoted_tweet_id", "description": "The ID of the related promoted tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The url clicks for the promoted tweet on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_assisted": {"name": "mobile_conversion_payment_info_additions_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_post_engagement": {"name": "mobile_conversion_payment_info_additions_post_engagement", "description": "Number of **post-engagement** mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_post_view": {"name": "mobile_conversion_payment_info_additions_post_view", "description": "Number of **post-view** mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_assisted": {"name": "mobile_conversion_add_to_wishlists_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_post_engagement": {"name": "mobile_conversion_add_to_wishlists_post_engagement", "description": "Number of **post-engagement** mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_post_view": {"name": "mobile_conversion_add_to_wishlists_post_view", "description": "Number of **post-view** mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_assisted": {"name": "mobile_conversion_add_to_carts_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_post_engagement": {"name": "mobile_conversion_add_to_carts_post_engagement", "description": "Number of **post-engagement** mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_post_view": {"name": "mobile_conversion_add_to_carts_post_view", "description": "Number of **post-view** mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups_metric": {"name": "conversion_sign_ups_metric", "description": "Total number of sign ups. This is the same as the sum of post views, post engagements and assisted sign ups. This is also the sum of website and mobile app sign ups", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_assisted": {"name": "mobile_conversion_checkouts_initiated_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_post_engagement": {"name": "mobile_conversion_checkouts_initiated_post_engagement", "description": "Number of **post-engagement** mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_post_view": {"name": "mobile_conversion_checkouts_initiated_post_view", "description": "Number of **post-view** mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_assisted": {"name": "mobile_conversion_searches_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_post_engagement": {"name": "mobile_conversion_searches_post_engagement", "description": "Number of **post-engagement** mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_post_view": {"name": "mobile_conversion_searches_post_view", "description": "Number of **post-view** mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_assisted": {"name": "mobile_conversion_content_views_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_post_engagement": {"name": "mobile_conversion_content_views_post_engagement", "description": "Number of **post-engagement** mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_post_view": {"name": "mobile_conversion_content_views_post_view", "description": "Number of **post-view** mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_sale_amount": {"name": "mobile_conversion_payment_info_additions_sale_amount", "description": "The sale amount corresponding to mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_sale_amount": {"name": "mobile_conversion_add_to_wishlists_sale_amount", "description": "The sale amount corresponding to mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_sale_amount": {"name": "mobile_conversion_add_to_carts_sale_amount", "description": "The sale amount corresponding to mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups_sale_amount": {"name": "conversion_sign_ups_sale_amount", "description": "The sale amount corresponding to sign ups.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_sale_amount": {"name": "mobile_conversion_checkouts_initiated_sale_amount", "description": "The sale amount corresponding to mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_sale_amount": {"name": "mobile_conversion_searches_sale_amount", "description": "The sale amount corresponding to mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_sale_amount": {"name": "mobile_conversion_content_views_sale_amount", "description": "The sale amount corresponding to mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"twitter_promoted_tweet_report_data\"", "created_at": 1783708224.3871355, "unrendered_database": "{% if target.type != 'spark'%}{{ var('twitter_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('twitter_ads_schema', 'twitter_ads') }}", "doc_blocks": []}, "source.twitter_ads.twitter_ads.tweet": {"database": "postgres", "schema": "public", "name": "tweet", "resource_type": "source", "package_name": "twitter_ads", "path": "models/staging/src_twitter_ads.yml", "original_file_path": "models/staging/src_twitter_ads.yml", "unique_id": "source.twitter_ads.twitter_ads.tweet", "fqn": ["twitter_ads", "staging", "twitter_ads", "tweet"], "source_name": "twitter_ads", "source_description": "", "loader": "fivetran", "identifier": "twitter_tweet_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a tweet, promoted or not.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "id": {"name": "id", "description": "Unique identifier of the tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "If provided, the non-public title of the tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "full_text": {"name": "full_text", "description": "Full text of the tweet's content.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lang": {"name": "lang", "description": "Two-letter language code of the tweet.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"twitter_tweet_data\"", "created_at": 1783708224.3877687, "unrendered_database": "{% if target.type != 'spark'%}{{ var('twitter_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('twitter_ads_schema', 'twitter_ads') }}", "doc_blocks": []}, "source.twitter_ads.twitter_ads.campaign_report": {"database": "postgres", "schema": "public", "name": "campaign_report", "resource_type": "source", "package_name": "twitter_ads", "path": "models/staging/src_twitter_ads.yml", "original_file_path": "models/staging/src_twitter_ads.yml", "unique_id": "source.twitter_ads.twitter_ads.campaign_report", "fqn": ["twitter_ads", "staging", "twitter_ads", "campaign_report"], "source_name": "twitter_ads", "source_description": "", "loader": "fivetran", "identifier": "twitter_campaign_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the performance of an ad campaign on a given day.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "billed_charge_local_micro": {"name": "billed_charge_local_micro", "description": "The spend for the campaign on that day, in micros and in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the campaign on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the campaign on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the ad campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The url clicks for the campaign on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_assisted": {"name": "mobile_conversion_payment_info_additions_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_post_engagement": {"name": "mobile_conversion_payment_info_additions_post_engagement", "description": "Number of **post-engagement** mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_post_view": {"name": "mobile_conversion_payment_info_additions_post_view", "description": "Number of **post-view** mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_assisted": {"name": "mobile_conversion_add_to_wishlists_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_post_engagement": {"name": "mobile_conversion_add_to_wishlists_post_engagement", "description": "Number of **post-engagement** mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_post_view": {"name": "mobile_conversion_add_to_wishlists_post_view", "description": "Number of **post-view** mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_assisted": {"name": "mobile_conversion_add_to_carts_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_post_engagement": {"name": "mobile_conversion_add_to_carts_post_engagement", "description": "Number of **post-engagement** mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_post_view": {"name": "mobile_conversion_add_to_carts_post_view", "description": "Number of **post-view** mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups_metric": {"name": "conversion_sign_ups_metric", "description": "Total number of sign ups. This is the same as the sum of post views, post engagements and assisted sign ups. This is also the sum of website and mobile app sign ups", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_assisted": {"name": "mobile_conversion_checkouts_initiated_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_post_engagement": {"name": "mobile_conversion_checkouts_initiated_post_engagement", "description": "Number of **post-engagement** mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_post_view": {"name": "mobile_conversion_checkouts_initiated_post_view", "description": "Number of **post-view** mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_assisted": {"name": "mobile_conversion_searches_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_post_engagement": {"name": "mobile_conversion_searches_post_engagement", "description": "Number of **post-engagement** mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_post_view": {"name": "mobile_conversion_searches_post_view", "description": "Number of **post-view** mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_assisted": {"name": "mobile_conversion_content_views_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_post_engagement": {"name": "mobile_conversion_content_views_post_engagement", "description": "Number of **post-engagement** mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_post_view": {"name": "mobile_conversion_content_views_post_view", "description": "Number of **post-view** mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_sale_amount": {"name": "mobile_conversion_payment_info_additions_sale_amount", "description": "The sale amount corresponding to mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_sale_amount": {"name": "mobile_conversion_add_to_wishlists_sale_amount", "description": "The sale amount corresponding to mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_sale_amount": {"name": "mobile_conversion_add_to_carts_sale_amount", "description": "The sale amount corresponding to mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups_sale_amount": {"name": "conversion_sign_ups_sale_amount", "description": "The sale amount corresponding to sign ups.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_sale_amount": {"name": "mobile_conversion_checkouts_initiated_sale_amount", "description": "The sale amount corresponding to mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_sale_amount": {"name": "mobile_conversion_searches_sale_amount", "description": "The sale amount corresponding to mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_sale_amount": {"name": "mobile_conversion_content_views_sale_amount", "description": "The sale amount corresponding to mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"twitter_campaign_report_data\"", "created_at": 1783708224.3885787, "unrendered_database": "{% if target.type != 'spark'%}{{ var('twitter_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('twitter_ads_schema', 'twitter_ads') }}", "doc_blocks": []}, "source.twitter_ads.twitter_ads.line_item_report": {"database": "postgres", "schema": "public", "name": "line_item_report", "resource_type": "source", "package_name": "twitter_ads", "path": "models/staging/src_twitter_ads.yml", "original_file_path": "models/staging/src_twitter_ads.yml", "unique_id": "source.twitter_ads.twitter_ads.line_item_report", "fqn": ["twitter_ads", "staging", "twitter_ads", "line_item_report"], "source_name": "twitter_ads", "source_description": "", "loader": "fivetran", "identifier": "twitter_line_item_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the performance of a line item (ad group) on a given day.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "billed_charge_local_micro": {"name": "billed_charge_local_micro", "description": "The spend for the line item on that day, in micros and in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the line item on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the line item on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_id": {"name": "line_item_id", "description": "The ID of the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The url clicks for the line item on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_assisted": {"name": "mobile_conversion_payment_info_additions_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_post_engagement": {"name": "mobile_conversion_payment_info_additions_post_engagement", "description": "Number of **post-engagement** mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_post_view": {"name": "mobile_conversion_payment_info_additions_post_view", "description": "Number of **post-view** mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_assisted": {"name": "mobile_conversion_add_to_wishlists_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_post_engagement": {"name": "mobile_conversion_add_to_wishlists_post_engagement", "description": "Number of **post-engagement** mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_post_view": {"name": "mobile_conversion_add_to_wishlists_post_view", "description": "Number of **post-view** mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_assisted": {"name": "mobile_conversion_add_to_carts_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_post_engagement": {"name": "mobile_conversion_add_to_carts_post_engagement", "description": "Number of **post-engagement** mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_post_view": {"name": "mobile_conversion_add_to_carts_post_view", "description": "Number of **post-view** mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups_metric": {"name": "conversion_sign_ups_metric", "description": "Total number of sign ups. This is the same as the sum of post views, post engagements and assisted sign ups. This is also the sum of website and mobile app sign ups", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_assisted": {"name": "mobile_conversion_checkouts_initiated_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_post_engagement": {"name": "mobile_conversion_checkouts_initiated_post_engagement", "description": "Number of **post-engagement** mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_post_view": {"name": "mobile_conversion_checkouts_initiated_post_view", "description": "Number of **post-view** mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_assisted": {"name": "mobile_conversion_searches_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_post_engagement": {"name": "mobile_conversion_searches_post_engagement", "description": "Number of **post-engagement** mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_post_view": {"name": "mobile_conversion_searches_post_view", "description": "Number of **post-view** mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_assisted": {"name": "mobile_conversion_content_views_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_post_engagement": {"name": "mobile_conversion_content_views_post_engagement", "description": "Number of **post-engagement** mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_post_view": {"name": "mobile_conversion_content_views_post_view", "description": "Number of **post-view** mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_sale_amount": {"name": "mobile_conversion_payment_info_additions_sale_amount", "description": "The sale amount corresponding to mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_sale_amount": {"name": "mobile_conversion_add_to_wishlists_sale_amount", "description": "The sale amount corresponding to mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_sale_amount": {"name": "mobile_conversion_add_to_carts_sale_amount", "description": "The sale amount corresponding to mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups_sale_amount": {"name": "conversion_sign_ups_sale_amount", "description": "The sale amount corresponding to sign ups.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_sale_amount": {"name": "mobile_conversion_checkouts_initiated_sale_amount", "description": "The sale amount corresponding to mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_sale_amount": {"name": "mobile_conversion_searches_sale_amount", "description": "The sale amount corresponding to mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_sale_amount": {"name": "mobile_conversion_content_views_sale_amount", "description": "The sale amount corresponding to mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"twitter_line_item_report_data\"", "created_at": 1783708224.3893752, "unrendered_database": "{% if target.type != 'spark'%}{{ var('twitter_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('twitter_ads_schema', 'twitter_ads') }}", "doc_blocks": []}, "source.twitter_ads.twitter_ads.line_item_keywords_report": {"database": "postgres", "schema": "public", "name": "line_item_keywords_report", "resource_type": "source", "package_name": "twitter_ads", "path": "models/staging/src_twitter_ads.yml", "original_file_path": "models/staging/src_twitter_ads.yml", "unique_id": "source.twitter_ads.twitter_ads.line_item_keywords_report", "fqn": ["twitter_ads", "staging", "twitter_ads", "line_item_keywords_report"], "source_name": "twitter_ads", "source_description": "", "loader": "fivetran", "identifier": "twitter_line_item_keywords_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the performance of a line item (ad group) and keyword combination on a given day.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "billed_charge_local_micro": {"name": "billed_charge_local_micro", "description": "The spend for the line item + keyword on that day, in micros and in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the line item + keyword on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the line item + keyword on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "line_item_id": {"name": "line_item_id", "description": "The ID of the line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The url clicks for the line item + keyword on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "segment": {"name": "segment", "description": "The keyword whose performance is being tracked.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_assisted": {"name": "mobile_conversion_payment_info_additions_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_post_engagement": {"name": "mobile_conversion_payment_info_additions_post_engagement", "description": "Number of **post-engagement** mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_post_view": {"name": "mobile_conversion_payment_info_additions_post_view", "description": "Number of **post-view** mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_assisted": {"name": "mobile_conversion_add_to_wishlists_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_post_engagement": {"name": "mobile_conversion_add_to_wishlists_post_engagement", "description": "Number of **post-engagement** mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_post_view": {"name": "mobile_conversion_add_to_wishlists_post_view", "description": "Number of **post-view** mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_assisted": {"name": "mobile_conversion_add_to_carts_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_post_engagement": {"name": "mobile_conversion_add_to_carts_post_engagement", "description": "Number of **post-engagement** mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_post_view": {"name": "mobile_conversion_add_to_carts_post_view", "description": "Number of **post-view** mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups_metric": {"name": "conversion_sign_ups_metric", "description": "Total number of sign ups. This is the same as the sum of post views, post engagements and assisted sign ups. This is also the sum of website and mobile app sign ups", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_assisted": {"name": "mobile_conversion_checkouts_initiated_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_post_engagement": {"name": "mobile_conversion_checkouts_initiated_post_engagement", "description": "Number of **post-engagement** mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_post_view": {"name": "mobile_conversion_checkouts_initiated_post_view", "description": "Number of **post-view** mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_assisted": {"name": "mobile_conversion_searches_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_post_engagement": {"name": "mobile_conversion_searches_post_engagement", "description": "Number of **post-engagement** mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_post_view": {"name": "mobile_conversion_searches_post_view", "description": "Number of **post-view** mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_assisted": {"name": "mobile_conversion_content_views_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_post_engagement": {"name": "mobile_conversion_content_views_post_engagement", "description": "Number of **post-engagement** mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_post_view": {"name": "mobile_conversion_content_views_post_view", "description": "Number of **post-view** mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_sale_amount": {"name": "mobile_conversion_payment_info_additions_sale_amount", "description": "The sale amount corresponding to mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_sale_amount": {"name": "mobile_conversion_add_to_wishlists_sale_amount", "description": "The sale amount corresponding to mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_sale_amount": {"name": "mobile_conversion_add_to_carts_sale_amount", "description": "The sale amount corresponding to mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups_sale_amount": {"name": "conversion_sign_ups_sale_amount", "description": "The sale amount corresponding to sign ups.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_sale_amount": {"name": "mobile_conversion_checkouts_initiated_sale_amount", "description": "The sale amount corresponding to mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_sale_amount": {"name": "mobile_conversion_searches_sale_amount", "description": "The sale amount corresponding to mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_sale_amount": {"name": "mobile_conversion_content_views_sale_amount", "description": "The sale amount corresponding to mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"twitter_line_item_keywords_report_data\"", "created_at": 1783708224.3902261, "unrendered_database": "{% if target.type != 'spark'%}{{ var('twitter_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('twitter_ads_schema', 'twitter_ads') }}", "doc_blocks": []}, "source.twitter_ads.twitter_ads.campaign_locations_report": {"database": "postgres", "schema": "public", "name": "campaign_locations_report", "resource_type": "source", "package_name": "twitter_ads", "path": "models/staging/src_twitter_ads.yml", "original_file_path": "models/staging/src_twitter_ads.yml", "unique_id": "source.twitter_ads.twitter_ads.campaign_locations_report", "fqn": ["twitter_ads", "staging", "twitter_ads", "campaign_locations_report"], "source_name": "twitter_ads", "source_description": "", "loader": "fivetran", "identifier": "twitter_campaign_locations_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the performance of an ad campaign on a given day in a specific country.", "columns": {"segment_name": {"name": "segment_name", "description": "Long-form name of the country being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.country"]}, "segment": {"name": "segment", "description": "(DEPRECATED IN JUNE 2023) Long-form name of the country being reported on. Coalesced with the newer `segment_name` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "billed_charge_local_micro": {"name": "billed_charge_local_micro", "description": "The spend for the campaign on that day, in micros and in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the campaign on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the campaign on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the ad campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The url clicks for the campaign on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_assisted": {"name": "mobile_conversion_payment_info_additions_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_post_engagement": {"name": "mobile_conversion_payment_info_additions_post_engagement", "description": "Number of **post-engagement** mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_post_view": {"name": "mobile_conversion_payment_info_additions_post_view", "description": "Number of **post-view** mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_assisted": {"name": "mobile_conversion_add_to_wishlists_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_post_engagement": {"name": "mobile_conversion_add_to_wishlists_post_engagement", "description": "Number of **post-engagement** mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_post_view": {"name": "mobile_conversion_add_to_wishlists_post_view", "description": "Number of **post-view** mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_assisted": {"name": "mobile_conversion_add_to_carts_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_post_engagement": {"name": "mobile_conversion_add_to_carts_post_engagement", "description": "Number of **post-engagement** mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_post_view": {"name": "mobile_conversion_add_to_carts_post_view", "description": "Number of **post-view** mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups_metric": {"name": "conversion_sign_ups_metric", "description": "Total number of sign ups. This is the same as the sum of post views, post engagements and assisted sign ups. This is also the sum of website and mobile app sign ups", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_assisted": {"name": "mobile_conversion_checkouts_initiated_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_post_engagement": {"name": "mobile_conversion_checkouts_initiated_post_engagement", "description": "Number of **post-engagement** mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_post_view": {"name": "mobile_conversion_checkouts_initiated_post_view", "description": "Number of **post-view** mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_assisted": {"name": "mobile_conversion_searches_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_post_engagement": {"name": "mobile_conversion_searches_post_engagement", "description": "Number of **post-engagement** mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_post_view": {"name": "mobile_conversion_searches_post_view", "description": "Number of **post-view** mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_assisted": {"name": "mobile_conversion_content_views_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_post_engagement": {"name": "mobile_conversion_content_views_post_engagement", "description": "Number of **post-engagement** mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_post_view": {"name": "mobile_conversion_content_views_post_view", "description": "Number of **post-view** mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_sale_amount": {"name": "mobile_conversion_payment_info_additions_sale_amount", "description": "The sale amount corresponding to mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_sale_amount": {"name": "mobile_conversion_add_to_wishlists_sale_amount", "description": "The sale amount corresponding to mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_sale_amount": {"name": "mobile_conversion_add_to_carts_sale_amount", "description": "The sale amount corresponding to mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups_sale_amount": {"name": "conversion_sign_ups_sale_amount", "description": "The sale amount corresponding to sign ups.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_sale_amount": {"name": "mobile_conversion_checkouts_initiated_sale_amount", "description": "The sale amount corresponding to mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_sale_amount": {"name": "mobile_conversion_searches_sale_amount", "description": "The sale amount corresponding to mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_sale_amount": {"name": "mobile_conversion_content_views_sale_amount", "description": "The sale amount corresponding to mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"twitter_campaign_locations_report_data\"", "created_at": 1783708224.3910136, "unrendered_database": "{% if target.type != 'spark'%}{{ var('twitter_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('twitter_ads_schema', 'twitter_ads') }}", "doc_blocks": []}, "source.twitter_ads.twitter_ads.campaign_regions_report": {"database": "postgres", "schema": "public", "name": "campaign_regions_report", "resource_type": "source", "package_name": "twitter_ads", "path": "models/staging/src_twitter_ads.yml", "original_file_path": "models/staging/src_twitter_ads.yml", "unique_id": "source.twitter_ads.twitter_ads.campaign_regions_report", "fqn": ["twitter_ads", "staging", "twitter_ads", "campaign_regions_report"], "source_name": "twitter_ads", "source_description": "", "loader": "fivetran", "identifier": "twitter_campaign_regions_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the performance of an ad campaign on a given day in a specific geographic region.", "columns": {"segment_name": {"name": "segment_name", "description": "Long-form name of the geopgraphic region being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads.region"]}, "segment": {"name": "segment", "description": "(DEPRECATED IN JUNE 2023) Long-form name of the geographic region being reported on. Coalesced with the newer `segment_name` field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "location_type": {"name": "location_type", "description": "Type of umbrella `LOCATION`. Likely to be `COUNTRIES`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "location_name": {"name": "location_name", "description": "Name of the umbrella `LOCATION`. Likely to be the country name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.twitter_ads._fivetran_synced"]}, "account_id": {"name": "account_id", "description": "The ID of the related account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "billed_charge_local_micro": {"name": "billed_charge_local_micro", "description": "The spend for the campaign on that day, in micros and in whichever currency was selected during account creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The clicks for the campaign on that day. Includes clicks on the URL (shortened or regular links), profile pic, screen name, username, detail, hashtags, and likes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "The date of the performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The impressions for the campaign on that day. This is the number of users who see a Promoted Ad either in their home timeline or search results.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The ID of the ad campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_clicks": {"name": "url_clicks", "description": "The url clicks for the campaign on that day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "Where on Twitter the ad is being displayed. Possible values include 'ALL_ON_TWITTER', 'PUBLISHER_NETWORK', 'TWITTER_PROFILE', 'TWITTER_SEARCH', 'TWITTER_TIMELINE', and 'TAP_*', which are more granular options for `PUBLISHER_NETWORK`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_metric": {"name": "conversion_purchases_metric", "description": "Total number of purchases. The sum of post view, post engagement, and assisted purchases for both your website and mobile app. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_metric": {"name": "conversion_custom_metric", "description": "The number of conversions of type CUSTOM. Included by the `twitter_ads__conversion_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_assisted": {"name": "mobile_conversion_payment_info_additions_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_post_engagement": {"name": "mobile_conversion_payment_info_additions_post_engagement", "description": "Number of **post-engagement** mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_post_view": {"name": "mobile_conversion_payment_info_additions_post_view", "description": "Number of **post-view** mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_assisted": {"name": "mobile_conversion_add_to_wishlists_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_post_engagement": {"name": "mobile_conversion_add_to_wishlists_post_engagement", "description": "Number of **post-engagement** mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_post_view": {"name": "mobile_conversion_add_to_wishlists_post_view", "description": "Number of **post-view** mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_assisted": {"name": "mobile_conversion_add_to_carts_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_post_engagement": {"name": "mobile_conversion_add_to_carts_post_engagement", "description": "Number of **post-engagement** mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_post_view": {"name": "mobile_conversion_add_to_carts_post_view", "description": "Number of **post-view** mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups_metric": {"name": "conversion_sign_ups_metric", "description": "Total number of sign ups. This is the same as the sum of post views, post engagements and assisted sign ups. This is also the sum of website and mobile app sign ups", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_assisted": {"name": "mobile_conversion_checkouts_initiated_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_post_engagement": {"name": "mobile_conversion_checkouts_initiated_post_engagement", "description": "Number of **post-engagement** mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_post_view": {"name": "mobile_conversion_checkouts_initiated_post_view", "description": "Number of **post-view** mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_assisted": {"name": "mobile_conversion_searches_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_post_engagement": {"name": "mobile_conversion_searches_post_engagement", "description": "Number of **post-engagement** mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_post_view": {"name": "mobile_conversion_searches_post_view", "description": "Number of **post-view** mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_assisted": {"name": "mobile_conversion_content_views_assisted", "description": "Number of **assisted** (engaged with ad but did not immediately convert) mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_post_engagement": {"name": "mobile_conversion_content_views_post_engagement", "description": "Number of **post-engagement** mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_post_view": {"name": "mobile_conversion_content_views_post_view", "description": "Number of **post-view** mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_purchases_sale_amount": {"name": "conversion_purchases_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_custom_sale_amount": {"name": "conversion_custom_sale_amount", "description": "The sale amount corresponding to PURCHASE conversion events. Included by the `twitter_ads__conversion_sale_amount_fields` variable by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_payment_info_additions_sale_amount": {"name": "mobile_conversion_payment_info_additions_sale_amount", "description": "The sale amount corresponding to mobile conversions of type PAYMENT_INFO_ADDITION.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_wishlists_sale_amount": {"name": "mobile_conversion_add_to_wishlists_sale_amount", "description": "The sale amount corresponding to mobile conversions of type ADD_TO_WISHLIST.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_add_to_carts_sale_amount": {"name": "mobile_conversion_add_to_carts_sale_amount", "description": "The sale amount corresponding to mobile conversions of type ADD_TO_CART.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_sign_ups_sale_amount": {"name": "conversion_sign_ups_sale_amount", "description": "The sale amount corresponding to sign ups.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_checkouts_initiated_sale_amount": {"name": "mobile_conversion_checkouts_initiated_sale_amount", "description": "The sale amount corresponding to mobile conversions of type CHECKOUT_INITIATED.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_searches_sale_amount": {"name": "mobile_conversion_searches_sale_amount", "description": "The sale amount corresponding to mobile conversions of type SEARCH.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "mobile_conversion_content_views_sale_amount": {"name": "mobile_conversion_content_views_sale_amount", "description": "The sale amount corresponding to mobile conversions of type CONTENT_VIEW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"twitter_campaign_regions_report_data\"", "created_at": 1783708224.391875, "unrendered_database": "{% if target.type != 'spark'%}{{ var('twitter_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('twitter_ads_schema', 'twitter_ads') }}", "doc_blocks": []}, "source.tiktok_ads.tiktok_ads.advertiser": {"database": "postgres", "schema": "public", "name": "advertiser", "resource_type": "source", "package_name": "tiktok_ads", "path": "models/staging/src_tiktok_ads.yml", "original_file_path": "models/staging/src_tiktok_ads.yml", "unique_id": "source.tiktok_ads.tiktok_ads.advertiser", "fqn": ["tiktok_ads", "staging", "tiktok_ads", "advertiser"], "source_name": "tiktok_ads", "source_description": "", "loader": "fivetran", "identifier": "tiktok_advertiser_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents data for one advertiser.", "columns": {"id": {"name": "id", "description": "Advertiser ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "address": {"name": "address", "description": "Advertiser address information", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "balance": {"name": "balance", "description": "Account available balance", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cellphone_number": {"name": "cellphone_number", "description": "Contact mobile number, desensitised data. This is the newest version of the field `phone_number`, which was renamed after the Tiktok Ads v1.3 API release.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "company": {"name": "company", "description": "Advertiser's company name", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "contacter": {"name": "contacter", "description": "Contact Person", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country": {"name": "country", "description": "The advertiser's country", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "create_time": {"name": "create_time", "description": "Advertiser's create time", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Type of currency used by advertisers", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "description": {"name": "description", "description": "Brand description, i.e. promotional content", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "email": {"name": "email", "description": "Advertiser contact email, desensitised data", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "industry": {"name": "industry", "description": "Advertiser industry category", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "language": {"name": "language", "description": "Language used by advertisers", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "license_no": {"name": "license_no", "description": "License number", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "license_url": {"name": "license_url", "description": "License preview address, the link is valid for an hour by default.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Advertiser name", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "phone_number": {"name": "phone_number", "description": "Contact mobile number, desensitised data. IMPORTANT: This field will not be populated for connectors utilizing the Tiktok Ads v1.3 API version, as the column was renamed. The new column name is `cellphone_number`.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "promotion_area": {"name": "promotion_area", "description": "Operation area", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reason": {"name": "reason", "description": "Reason for rejection", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "role": {"name": "role", "description": "Advertiser role", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Advertiser status", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "telephone": {"name": "telephone", "description": "Fixed phone number, desensitised data IMPORTANT: This field will not be populated for connectors utilizing the Tiktok Ads v1.3 API version, as the column was renamed. The new column name is `telephone_number`.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "telephone_number": {"name": "telephone_number", "description": "Fixed phone number, desensitised data This is the newest version of the field `telephone`, which was renamed after the Tiktok Ads v1.3 API release.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone": {"name": "timezone", "description": "Ad account time zone including GMT offset", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"tiktok_advertiser_data\"", "created_at": 1783708224.3926258, "unrendered_database": "{% if target.type != 'spark' %}{{var('tiktok_ads_database', target.database)}}{% endif %}", "unrendered_schema": "{{var('tiktok_ads_schema', 'tiktok_ads')}}", "doc_blocks": []}, "source.tiktok_ads.tiktok_ads.campaign_history": {"database": "postgres", "schema": "public", "name": "campaign_history", "resource_type": "source", "package_name": "tiktok_ads", "path": "models/staging/src_tiktok_ads.yml", "original_file_path": "models/staging/src_tiktok_ads.yml", "unique_id": "source.tiktok_ads.tiktok_ads.campaign_history", "fqn": ["tiktok_ads", "staging", "tiktok_ads", "campaign_history"], "source_name": "tiktok_ads", "source_description": "", "loader": "fivetran", "identifier": "tiktok_campaign_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of a TikTok campaign.", "columns": {"campaign_id": {"name": "campaign_id", "description": "Campaign ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Time the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "Advertiser ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget": {"name": "budget", "description": "Campaign budget", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_mode": {"name": "budget_mode", "description": "Budget type", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_name": {"name": "campaign_name", "description": "Campaign name", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_type": {"name": "campaign_type", "description": "Campaign Type, indicates the campaign is a regular campaign or iOS 14 campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "create_time": {"name": "create_time", "description": "Time at which the campaign was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_new_structure": {"name": "is_new_structure", "description": "Whether the campaign is a new structure (for the same campaign, the structure of campaign, adgroups and ads are the same)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "objective_type": {"name": "objective_type", "description": "Advertising objective.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "opt_status": {"name": "opt_status", "description": "Operation status.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Campaign status", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "split_test_variable": {"name": "split_test_variable", "description": "Split Test variables. Optional values; TARGETING, BIDDING_OPTIMIZATION , CREATIVE.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"tiktok_campaign_history_data\"", "created_at": 1783708224.3933425, "unrendered_database": "{% if target.type != 'spark' %}{{var('tiktok_ads_database', target.database)}}{% endif %}", "unrendered_schema": "{{var('tiktok_ads_schema', 'tiktok_ads')}}", "doc_blocks": []}, "source.tiktok_ads.tiktok_ads.adgroup_history": {"database": "postgres", "schema": "public", "name": "adgroup_history", "resource_type": "source", "package_name": "tiktok_ads", "path": "models/staging/src_tiktok_ads.yml", "original_file_path": "models/staging/src_tiktok_ads.yml", "unique_id": "source.tiktok_ads.tiktok_ads.adgroup_history", "fqn": ["tiktok_ads", "staging", "tiktok_ads", "adgroup_history"], "source_name": "tiktok_ads", "source_description": "", "loader": "fivetran", "identifier": "tiktok_adgroup_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of a TikTok ad group.", "columns": {"adgroup_id": {"name": "adgroup_id", "description": "Ad group ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Time the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "Advertiser ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "The Ad group's campaign ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "action_categories": {"name": "action_categories", "description": "IDs of the action categories (behaviors) that you want to target.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "action_days": {"name": "action_days", "description": "The number of days of the time period to include action from.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "adgroup_name": {"name": "adgroup_name", "description": "Ad group name. Character limit is 512 and cannot contain emoji.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "age_groups": {"name": "age_groups", "description": "Age groups you want to target. This is the newest version of the field `age`, which was renamed after the Tiktok Ads v1.3 API release.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "android_osv": {"name": "android_osv", "description": "Minimum Android version.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "app_download_url": {"name": "app_download_url", "description": "App download link", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "app_id": {"name": "app_id", "description": "The Application id of the promoted app", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "app_name": {"name": "app_name", "description": "App name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "app_type": {"name": "app_type", "description": "App type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "audience": {"name": "audience", "description": "A list of audience IDs.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "audience_type": {"name": "audience_type", "description": "Audience Type", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid": {"name": "bid", "description": "CPC, CPM bidding, oCPM learning bidding", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_type": {"name": "bid_type", "description": "Bidding Strategy", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "billing_event": {"name": "billing_event", "description": "Bid method.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget": {"name": "budget", "description": "Ad budget. Returns 0.0 when Campaign Budget Optimization (budget_optimize_switch) is on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_mode": {"name": "budget_mode", "description": "Budget mode. This field will be ignored when Campaign Budget Optimization (budget_optimize_switch) is enabled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "carriers": {"name": "carriers", "description": "Carriers that you want to target.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "category": {"name": "category", "description": "Ad group category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_tracking_url": {"name": "click_tracking_url", "description": "Click monitoring URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "connection_type": {"name": "connection_type", "description": "Device connection types that you want to target. Default; unlimited.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_bid": {"name": "conversion_bid", "description": "oCPM conversion bid", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpv_video_duration": {"name": "cpv_video_duration", "description": "Video playback duration, required if optimize_goal is VIDEO_VIEW. Allowed values; SIX_SECONDS (video playback 6s), TWO_SECONDS (video playback 2s)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_material_mode": {"name": "creative_material_mode", "description": "Creative delivery mode.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "dayparting": {"name": "dayparting", "description": "Ad delivery period, the default is always and the format is 48 * 7 character string, represented by 0 or 1. > That is, with half an hour as the minimum granularity, a day (24 hours) is divided by the minimum granularity(30 mins) from Monday to Sunday. Resulting in a 48*7 format.0 represents not to be delivered, 1 represents delivery. no transmission, full transmission 0, full transmission 1 all represent full time delivery", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "deep_bid_type": {"name": "deep_bid_type", "description": "Bidding strategy for in-app events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "deep_cpabid": {"name": "deep_cpabid", "description": "Deep bid", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "deep_external_action": {"name": "deep_external_action", "description": "Deep conversion event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "display_name": {"name": "display_name", "description": "Display name of ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "enable_inventory_filter": {"name": "enable_inventory_filter", "description": "Inventory filtering (Unsafe videos will not be displayed).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "excluded_audience": {"name": "excluded_audience", "description": "A list of audience ID to be excluded.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "external_action": {"name": "external_action", "description": "Conversion event for the ad group. It is required when the promoted object is an app with tracking urls, or when pixel_id is specified.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "fallback_type": {"name": "fallback_type", "description": "Fallback Type. If the audience do not have the app installed, you can have them fall back to install the app, or to view a specific web page. Not applicable for Deferred Deeplink. Allowed values; APP_INSTALL, WEBSITE, UNSET. If website is chosen, you need to specify the url via landing_page_url field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "frequency": {"name": "frequency", "description": "frequency, together with frequency_schedule, controls how often people see your ad (only available for REACH ads). For example, frequency = 2 frequency_schedule = 3 means \"show ads no more than twice every 3 day\".\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "frequency_schedule": {"name": "frequency_schedule", "description": "frequency, together with frequency, controls how often people see your ad (only available for REACH ads).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "gender": {"name": "gender", "description": "Gender that you want to target.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impression_tracking_url": {"name": "impression_tracking_url", "description": "Display monitoring URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "interest_category_v2": {"name": "interest_category_v2", "description": "Interest classification. If the interest is specified, users that do not meet interest target will be excluded during delivery.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ios_osv": {"name": "ios_osv", "description": "Minimum iOS version.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_comment_disable": {"name": "is_comment_disable", "description": "Whether to allow comments on your ads on TikTok, Vigo, Helo.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_hfss": {"name": "is_hfss", "description": "Whether the promoted content is HFSS foods (foods that are high in fat, salt, or sugar).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_new_structure": {"name": "is_new_structure", "description": "Whether the campaign is a new structure.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "keywords": {"name": "keywords", "description": "Keywords used.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "landing_page_url": {"name": "landing_page_url", "description": "Landing page URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "languages": {"name": "languages", "description": "Codes of the languages that you want to target.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "location": {"name": "location", "description": "IDs of the locations that you want to target.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "open_url": {"name": "open_url", "description": "The specific location where you want your audience to go if they have your app installed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "open_url_type": {"name": "open_url_type", "description": "The open URL type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "operation_system": {"name": "operation_system", "description": "Device operating systems that you want to target.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "opt_status": {"name": "opt_status", "description": "Operation status.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "optimize_goal": {"name": "optimize_goal", "description": "Optimization goal.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pacing": {"name": "pacing", "description": "You can choose between PACING_MODE_SMOOTH and PACING_MODE_FAST. For PACING_MODE_SMOOTH, the budget is allocated evenly within the scheduled time. PACING_MODE_FAST would consume budget and produce results as soon as possible. \n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "package": {"name": "package", "description": "Package name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pangle_block_app_list_id": {"name": "pangle_block_app_list_id", "description": "Pangle app block list ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "pixel_id": {"name": "pixel_id", "description": "Pixel ID. Only application for landing pages.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement": {"name": "placement", "description": "The apps where you want to deliver your ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "placement_type": {"name": "placement_type", "description": "Placement type.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_image": {"name": "profile_image", "description": "Avatar URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "schedule_end_time": {"name": "schedule_end_time", "description": "Ad delivery end time (UTC+0). Format should be YYYY-MM-DD HH:MM:SS", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "schedule_start_time": {"name": "schedule_start_time", "description": "Ad delivery start time (UTC+0). Format should be YYYY-MM-DD HH:MM:SS", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "schedule_type": {"name": "schedule_type", "description": "The schedule type, which can be either SCHEDULE_START_END or SCHEDULE_FROM_NOW.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "skip_learning_phase": {"name": "skip_learning_phase", "description": "Whether to skip the learning stage.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "statistic_type": {"name": "statistic_type", "description": "conversion bid statistic type", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Ad group status", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_actions": {"name": "video_actions", "description": "Number of video actions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_download": {"name": "video_download", "description": "Whether users can download your video ads on TikTok(cannot be updated once created).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"tiktok_adgroup_history_data\"", "created_at": 1783708224.3942683, "unrendered_database": "{% if target.type != 'spark' %}{{var('tiktok_ads_database', target.database)}}{% endif %}", "unrendered_schema": "{{var('tiktok_ads_schema', 'tiktok_ads')}}", "doc_blocks": []}, "source.tiktok_ads.tiktok_ads.ad_history": {"database": "postgres", "schema": "public", "name": "ad_history", "resource_type": "source", "package_name": "tiktok_ads", "path": "models/staging/src_tiktok_ads.yml", "original_file_path": "models/staging/src_tiktok_ads.yml", "unique_id": "source.tiktok_ads.tiktok_ads.ad_history", "fqn": ["tiktok_ads", "staging", "tiktok_ads", "ad_history"], "source_name": "tiktok_ads", "source_description": "", "loader": "fivetran", "identifier": "tiktok_ad_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents a version of a TikTok ad.", "columns": {"ad_id": {"name": "ad_id", "description": "Ad ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "updated_at": {"name": "updated_at", "description": "Time the record was updated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "adgroup_id": {"name": "adgroup_id", "description": "Ad group ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "Advertiser ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Campaign ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_name": {"name": "ad_name", "description": "Ad Name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_text": {"name": "ad_text", "description": "The ad text.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "app_name": {"name": "app_name", "description": "The display name of app download ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "call_to_action": {"name": "call_to_action", "description": "Call to action values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_tracking_url": {"name": "click_tracking_url", "description": "Click monitoring URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "create_time": {"name": "create_time", "description": "Time at which the ad was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "display_name": {"name": "display_name", "description": "The display name of landing page or pure exposure ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "image_ids": {"name": "image_ids", "description": "A list of image IDs.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impression_tracking_url": {"name": "impression_tracking_url", "description": "Display monitoring URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_aco": {"name": "is_aco", "description": "Whether the ad is an automated ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_creative_authorized": {"name": "is_creative_authorized", "description": "Whether you grant displaying some of your ads in our TikTok For Business Creative Center. Only valid for non-US advertisers, the default value is false.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "is_new_structure": {"name": "is_new_structure", "description": "Whether the campaign is a new structure.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "landing_page_url": {"name": "landing_page_url", "description": "Landing page URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "open_url": {"name": "open_url", "description": "The specific location where you want your audience to go if they have your app installed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "opt_status": {"name": "opt_status", "description": "Operation status.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "playable_url": {"name": "playable_url", "description": "Playable material url.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_image": {"name": "profile_image", "description": "Avatar URL.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Ad status.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_id": {"name": "video_id", "description": "The video ID.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"tiktok_ad_history_data\"", "created_at": 1783708224.3950057, "unrendered_database": "{% if target.type != 'spark' %}{{var('tiktok_ads_database', target.database)}}{% endif %}", "unrendered_schema": "{{var('tiktok_ads_schema', 'tiktok_ads')}}", "doc_blocks": []}, "source.tiktok_ads.tiktok_ads.ad_report_hourly": {"database": "postgres", "schema": "public", "name": "ad_report_hourly", "resource_type": "source", "package_name": "tiktok_ads", "path": "models/staging/src_tiktok_ads.yml", "original_file_path": "models/staging/src_tiktok_ads.yml", "unique_id": "source.tiktok_ads.tiktok_ads.ad_report_hourly", "fqn": ["tiktok_ads", "staging", "tiktok_ads", "ad_report_hourly"], "source_name": "tiktok_ads", "source_description": "", "loader": "fivetran", "identifier": "tiktok_ad_report_hourly_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents data for each ad for each hour.", "columns": {"ad_id": {"name": "ad_id", "description": "Ad id", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "stat_time_hour": {"name": "stat_time_hour", "description": "Hour of activity", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_conversion": {"name": "cost_per_conversion", "description": "The average amount of money you've spent on a conversion. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion": {"name": "real_time_conversion", "description": "The number of times your ad achieved an outcome, based on the objective and settings you selected. (The total count is based on when the conversion actually happened.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpc": {"name": "cpc", "description": "The average amount of money you've spent on a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_play_actions": {"name": "video_play_actions", "description": "The number of times your video starts to play. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_rate": {"name": "conversion_rate", "description": "The percentage of results you received out of all the clicks of your ads. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_75": {"name": "video_views_p_75", "description": "The number of times your video was played at 75% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "result": {"name": "result", "description": "The number of times your ad achieved an outcome, based on the optimization goal you selected. As one campaign may have a number of different optimization goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view the results. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_50": {"name": "video_views_p_50", "description": "The number of times your video was played at 50% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of times your ads were on screen.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "comments": {"name": "comments", "description": "The number of comments your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_cost_per_result": {"name": "real_time_cost_per_result", "description": "As a campaign may have different optimization goals, the total number of result is not supported in campaign section now, please go to the ad group section to view the cost per Result. (The total count is based on when the conversion actually happened.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion": {"name": "conversion", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_result": {"name": "real_time_result", "description": "The number of times your ad achieved an outcome, based on the optimization goal you selected. As a campaign may have different optimization goals, the total number of result is not supported in campaign section now , Please go to the ad group section to view the result. (The total count is based on when the conversion actually happened.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_view_p_100": {"name": "video_view_p_100", "description": "The number of times your video was played at 100% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "The number of shares your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion_rate": {"name": "real_time_conversion_rate", "description": "The percentage of results you received out of all the clicks of your ads. (The total count is based on when the conversion actually happened.)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_secondary_goal_result": {"name": "cost_per_secondary_goal_result", "description": "The average cost for each secondary goal result from your adverts. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "secondary_goal_result_rate": {"name": "secondary_goal_result_rate", "description": "The percentage of secondary goal results you achieved out of all of the installs of your adverts. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. The total count is calculated based on the time each ad impression occurred.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks on your ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_1000_reached": {"name": "cost_per_1000_reached", "description": "The average cost to reach 1,000 unique users. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_25": {"name": "video_views_p_25", "description": "The number of times your video was played at 25% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reach": {"name": "reach", "description": "The number of unique users who saw your ads at least once. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_cost_per_conversion": {"name": "real_time_cost_per_conversion", "description": "The average amount of money you've spent on a conversion. (The total count is based on when the conversion actually happened.)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_visits_rate": {"name": "profile_visits_rate", "description": "The rate of profile visits per impression the paid ad drove during the campaign. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "average_video_play": {"name": "average_video_play", "description": "The average time your video was played per single video view, including any time spent replaying the video.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_visits": {"name": "profile_visits", "description": "The number of profile visits the ad drove during the campaign. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpm": {"name": "cpm", "description": "The average amount of money you've spent per 1,000 impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ctr": {"name": "ctr", "description": "The percentage of times people saw your ad and performed a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_2_s": {"name": "video_watched_2_s", "description": "The number of times your video played for at least 2 seconds. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "follows": {"name": "follows", "description": "The number of new followers that were gained within 1 day of a user seeing a paid ad. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "result_rate": {"name": "result_rate", "description": "The percentage of results you achieved out of all of the views/clicks on your ads. As one campaign may have a number of different optimization goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view the result rate. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_6_s": {"name": "video_watched_6_s", "description": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "secondary_goal_result": {"name": "secondary_goal_result", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_result": {"name": "cost_per_result", "description": "The average cost for each result from your ads. As one campaign may have a number of different optimization goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view the cost per result. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "average_video_play_per_user": {"name": "average_video_play_per_user", "description": "The average time your video was played per person, including any time spent replaying the video. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_result_rate": {"name": "real_time_result_rate", "description": "As a campaign may have different optimization goals, the total number of result is not supported in campaign section now ,Please go to the ad group section to view the Result Rate. (The total count is based on when the conversion actually happened.)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The estimated total amount of money you've spent on your campaign, ad group or ad during its schedule.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "likes": {"name": "likes", "description": "The number of likes your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_purchase_value": {"name": "total_purchase_value", "description": "The total value of purchase events that occurred in your app that were recorded by your measurement partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_sales_lead_value": {"name": "total_sales_lead_value", "description": "The monetary worth or potential value assigned to a lead generated through ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"tiktok_ad_report_hourly_data\"", "created_at": 1783708224.3958063, "unrendered_database": "{% if target.type != 'spark' %}{{var('tiktok_ads_database', target.database)}}{% endif %}", "unrendered_schema": "{{var('tiktok_ads_schema', 'tiktok_ads')}}", "doc_blocks": []}, "source.tiktok_ads.tiktok_ads.campaign_report_hourly": {"database": "postgres", "schema": "public", "name": "campaign_report_hourly", "resource_type": "source", "package_name": "tiktok_ads", "path": "models/staging/src_tiktok_ads.yml", "original_file_path": "models/staging/src_tiktok_ads.yml", "unique_id": "source.tiktok_ads.tiktok_ads.campaign_report_hourly", "fqn": ["tiktok_ads", "staging", "tiktok_ads", "campaign_report_hourly"], "source_name": "tiktok_ads", "source_description": "", "loader": "fivetran", "identifier": "tiktok_campaign_report_hourly_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents data for each campaign for each hour.", "columns": {"campaign_id": {"name": "campaign_id", "description": "Campaign id", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "stat_time_hour": {"name": "stat_time_hour", "description": "Hour of activity", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_conversion": {"name": "cost_per_conversion", "description": "The average amount of money you've spent on a conversion. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion": {"name": "real_time_conversion", "description": "The number of times your ad achieved an outcome, based on the objective and settings you selected. (The total count is based on when the conversion actually happened.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpc": {"name": "cpc", "description": "The average amount of money you've spent on a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_play_actions": {"name": "video_play_actions", "description": "The number of times your video starts to play. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_rate": {"name": "conversion_rate", "description": "The percentage of results you received out of all the clicks of your ads. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_75": {"name": "video_views_p_75", "description": "The number of times your video was played at 75% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "result": {"name": "result", "description": "The number of times your ad achieved an outcome, based on the optimization goal you selected. As one campaign may have a number of different optimization goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view the results. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_50": {"name": "video_views_p_50", "description": "The number of times your video was played at 50% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of times your ads were on screen.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "comments": {"name": "comments", "description": "The number of comments your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_cost_per_result": {"name": "real_time_cost_per_result", "description": "As a campaign may have different optimization goals, the total number of result is not supported in campaign section now, please go to the ad group section to view the cost per Result. (The total count is based on when the conversion actually happened.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion": {"name": "conversion", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_result": {"name": "real_time_result", "description": "The number of times your ad achieved an outcome, based on the optimization goal you selected. As a campaign may have different optimization goals, the total number of result is not supported in campaign section now , Please go to the ad group section to view the result. (The total count is based on when the conversion actually happened.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_view_p_100": {"name": "video_view_p_100", "description": "The number of times your video was played at 100% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "The number of shares your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion_rate": {"name": "real_time_conversion_rate", "description": "The percentage of results you received out of all the clicks of your ads. (The total count is based on when the conversion actually happened.)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_secondary_goal_result": {"name": "cost_per_secondary_goal_result", "description": "The average cost for each secondary goal result from your adverts. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "secondary_goal_result_rate": {"name": "secondary_goal_result_rate", "description": "The percentage of secondary goal results you achieved out of all of the installs of your adverts. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. The total count is calculated based on the time each ad impression occurred.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks on your ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_1000_reached": {"name": "cost_per_1000_reached", "description": "The average cost to reach 1,000 unique users. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_25": {"name": "video_views_p_25", "description": "The number of times your video was played at 25% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reach": {"name": "reach", "description": "The number of unique users who saw your ads at least once. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_cost_per_conversion": {"name": "real_time_cost_per_conversion", "description": "The average amount of money you've spent on a conversion. (The total count is based on when the conversion actually happened.)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_visits_rate": {"name": "profile_visits_rate", "description": "The rate of profile visits per impression the paid ad drove during the campaign. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "average_video_play": {"name": "average_video_play", "description": "The average time your video was played per single video view, including any time spent replaying the video.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_visits": {"name": "profile_visits", "description": "The number of profile visits the ad drove during the campaign. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpm": {"name": "cpm", "description": "The average amount of money you've spent per 1,000 impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ctr": {"name": "ctr", "description": "The percentage of times people saw your ad and performed a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_2_s": {"name": "video_watched_2_s", "description": "The number of times your video played for at least 2 seconds. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "follows": {"name": "follows", "description": "The number of new followers that were gained within 1 day of a user seeing a paid ad. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "result_rate": {"name": "result_rate", "description": "The percentage of results you achieved out of all of the views/clicks on your ads. As one campaign may have a number of different optimization goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view the result rate. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_6_s": {"name": "video_watched_6_s", "description": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "secondary_goal_result": {"name": "secondary_goal_result", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_result": {"name": "cost_per_result", "description": "The average cost for each result from your ads. As one campaign may have a number of different optimization goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view the cost per result. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "average_video_play_per_user": {"name": "average_video_play_per_user", "description": "The average time your video was played per person, including any time spent replaying the video. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_result_rate": {"name": "real_time_result_rate", "description": "As a campaign may have different optimization goals, the total number of result is not supported in campaign section now ,Please go to the ad group section to view the Result Rate. (The total count is based on when the conversion actually happened.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The estimated total amount of money you've spent on your campaign, ad group or ad during its schedule.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "likes": {"name": "likes", "description": "The number of likes your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_purchase_value": {"name": "total_purchase_value", "description": "The total value of purchase events that occurred in your app that were recorded by your measurement partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_sales_lead_value": {"name": "total_sales_lead_value", "description": "The monetary worth or potential value assigned to a lead generated through ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"tiktok_campaign_report_hourly_data\"", "created_at": 1783708224.396632, "unrendered_database": "{% if target.type != 'spark' %}{{var('tiktok_ads_database', target.database)}}{% endif %}", "unrendered_schema": "{{var('tiktok_ads_schema', 'tiktok_ads')}}", "doc_blocks": []}, "source.tiktok_ads.tiktok_ads.adgroup_report_hourly": {"database": "postgres", "schema": "public", "name": "adgroup_report_hourly", "resource_type": "source", "package_name": "tiktok_ads", "path": "models/staging/src_tiktok_ads.yml", "original_file_path": "models/staging/src_tiktok_ads.yml", "unique_id": "source.tiktok_ads.tiktok_ads.adgroup_report_hourly", "fqn": ["tiktok_ads", "staging", "tiktok_ads", "adgroup_report_hourly"], "source_name": "tiktok_ads", "source_description": "", "loader": "fivetran", "identifier": "tiktok_adgroup_report_hourly_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents data for each ad group for each hour.", "columns": {"adgroup_id": {"name": "adgroup_id", "description": "Ad group id", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "stat_time_hour": {"name": "stat_time_hour", "description": "Hour of activity", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_conversion": {"name": "cost_per_conversion", "description": "The average amount of money you've spent on a conversion. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion": {"name": "real_time_conversion", "description": "The number of times your ad achieved an outcome, based on the objective and settings you selected. (The total count is based on when the conversion actually happened.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpc": {"name": "cpc", "description": "The average amount of money you've spent on a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_play_actions": {"name": "video_play_actions", "description": "The number of times your video starts to play. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_rate": {"name": "conversion_rate", "description": "The percentage of results you received out of all the clicks of your ads. (The total count is calculated based on the time each ad impression occurred.)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_75": {"name": "video_views_p_75", "description": "The number of times your video was played at 75% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "result": {"name": "result", "description": "The number of times your ad achieved an outcome, based on the optimization goal you selected. As one campaign may have a number of different optimization goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view the results. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_50": {"name": "video_views_p_50", "description": "The number of times your video was played at 50% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of times your ads were on screen.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "comments": {"name": "comments", "description": "The number of comments your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_cost_per_result": {"name": "real_time_cost_per_result", "description": "As a campaign may have different optimization goals, the total number of result is not supported in campaign section now, please go to the ad group section to view the cost per Result. (The total count is based on when the conversion actually happened.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion": {"name": "conversion", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_result": {"name": "real_time_result", "description": "The number of times your ad achieved an outcome, based on the optimization goal you selected. As a campaign may have different optimization goals, the total number of result is not supported in campaign section now , Please go to the ad group section to view the result. (The total count is based on when the conversion actually happened.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_view_p_100": {"name": "video_view_p_100", "description": "The number of times your video was played at 100% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "shares": {"name": "shares", "description": "The number of shares your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion_rate": {"name": "real_time_conversion_rate", "description": "The percentage of results you received out of all the clicks of your ads. (The total count is based on when the conversion actually happened.)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_secondary_goal_result": {"name": "cost_per_secondary_goal_result", "description": "The average cost for each secondary goal result from your adverts. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "secondary_goal_result_rate": {"name": "secondary_goal_result_rate", "description": "The percentage of secondary goal results you achieved out of all of the installs of your adverts. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. The total count is calculated based on the time each ad impression occurred.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "The number of clicks on your ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_1000_reached": {"name": "cost_per_1000_reached", "description": "The average cost to reach 1,000 unique users. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_views_p_25": {"name": "video_views_p_25", "description": "The number of times your video was played at 25% of its length. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reach": {"name": "reach", "description": "The number of unique users who saw your ads at least once. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_cost_per_conversion": {"name": "real_time_cost_per_conversion", "description": "The average amount of money you've spent on a conversion. (The total count is based on when the conversion actually happened.)", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_visits_rate": {"name": "profile_visits_rate", "description": "The rate of profile visits per impression the paid ad drove during the campaign. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "average_video_play": {"name": "average_video_play", "description": "The average time your video was played per single video view, including any time spent replaying the video.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "profile_visits": {"name": "profile_visits", "description": "The number of profile visits the ad drove during the campaign. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpm": {"name": "cpm", "description": "The average amount of money you've spent per 1,000 impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ctr": {"name": "ctr", "description": "The percentage of times people saw your ad and performed a click.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_2_s": {"name": "video_watched_2_s", "description": "The number of times your video played for at least 2 seconds. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "follows": {"name": "follows", "description": "The number of new followers that were gained within 1 day of a user seeing a paid ad. This metric is only for Boosted TikToks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "result_rate": {"name": "result_rate", "description": "The percentage of results you achieved out of all of the views/clicks on your ads. As one campaign may have a number of different optimization goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view the result rate. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "video_watched_6_s": {"name": "video_watched_6_s", "description": "The number of times your video played for at least 6 seconds, or completely played. Replays will not be counted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "secondary_goal_result": {"name": "secondary_goal_result", "description": "The number of times your ad achieved an outcome, based on the secondary goal you selected. As one campaign may have a number of different secondary goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_result": {"name": "cost_per_result", "description": "The average cost for each result from your ads. As one campaign may have a number of different optimization goals, this statistic is not supported for campaigns. Please go to ad groups or ads to view the cost per result. (The total count is calculated based on the time each ad impression occurred.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "average_video_play_per_user": {"name": "average_video_play_per_user", "description": "The average time your video was played per person, including any time spent replaying the video. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_result_rate": {"name": "real_time_result_rate", "description": "As a campaign may have different optimization goals, the total number of result is not supported in campaign section now ,Please go to the ad group section to view the Result Rate. (The total count is based on when the conversion actually happened.)\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The estimated total amount of money you've spent on your campaign, ad group or ad during its schedule.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "likes": {"name": "likes", "description": "The number of likes your video creative received within 1 day of a user seeing a paid ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp of when Fivetran synced a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_purchase_value": {"name": "total_purchase_value", "description": "The total value of purchase events that occurred in your app that were recorded by your measurement partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "total_sales_lead_value": {"name": "total_sales_lead_value", "description": "The monetary worth or potential value assigned to a lead generated through ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"tiktok_adgroup_report_hourly_data\"", "created_at": 1783708224.3974562, "unrendered_database": "{% if target.type != 'spark' %}{{var('tiktok_ads_database', target.database)}}{% endif %}", "unrendered_schema": "{{var('tiktok_ads_schema', 'tiktok_ads')}}", "doc_blocks": []}, "source.tiktok_ads.tiktok_ads.campaign_country_report": {"database": "postgres", "schema": "public", "name": "campaign_country_report", "resource_type": "source", "package_name": "tiktok_ads", "path": "models/staging/src_tiktok_ads.yml", "original_file_path": "models/staging/src_tiktok_ads.yml", "unique_id": "source.tiktok_ads.tiktok_ads.campaign_country_report", "fqn": ["tiktok_ads", "staging", "tiktok_ads", "campaign_country_report"], "source_name": "tiktok_ads", "source_description": "", "loader": "fivetran", "identifier": "tiktok_campaign_country_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record provides country-level reporting metrics at the campaign level.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp indicating when the record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Unique identifier of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "clicks": {"name": "clicks", "description": "Total number of times users clicked on ads within the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion": {"name": "conversion", "description": "Number of attributed conversions from ads in the campaign based on the TikTok attribution model.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "conversion_rate": {"name": "conversion_rate", "description": "Ratio of conversions to impressions, calculated as conversions divided by impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cost_per_conversion": {"name": "cost_per_conversion", "description": "Average cost per conversion, calculated as total spend divided by conversions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country_code": {"name": "country_code", "description": "Audience country or region code.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpc": {"name": "cpc", "description": "Cost per click, calculated as spend divided by the number of clicks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "cpm": {"name": "cpm", "description": "Cost per thousand impressions, calculated as (spend / impressions) * 1000.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ctr": {"name": "ctr", "description": "Click-through rate, calculated as clicks divided by impressions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "Total number of times ads in the campaign were shown.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "real_time_conversion": {"name": "real_time_conversion", "description": "Number of real-time conversions tracked by TikTok.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "Total amount spent for the campaign in the account currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "stat_time_day": {"name": "stat_time_day", "description": "The reporting date for the campaign data (in YYYY-MM-DD format).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"tiktok_campaign_country_report_data\"", "created_at": 1783708224.398136, "unrendered_database": "{% if target.type != 'spark' %}{{var('tiktok_ads_database', target.database)}}{% endif %}", "unrendered_schema": "{{var('tiktok_ads_schema', 'tiktok_ads')}}", "doc_blocks": []}, "source.tiktok_ads.tiktok_ads.location": {"database": "postgres", "schema": "public", "name": "location", "resource_type": "source", "package_name": "tiktok_ads", "path": "models/staging/src_tiktok_ads.yml", "original_file_path": "models/staging/src_tiktok_ads.yml", "unique_id": "source.tiktok_ads.tiktok_ads.location", "fqn": ["tiktok_ads", "staging", "tiktok_ads", "location"], "source_name": "tiktok_ads", "source_description": "", "loader": "fivetran", "identifier": "tiktok_location_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Reference table of geographic regions and locations available for TikTok Ads targeting. Each record represents a location, such as a country, province, or city.", "columns": {"_fivetran_synced": {"name": "_fivetran_synced", "description": "Timestamp indicating when the record was last synced.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "region_id": {"name": "region_id", "description": "Unique identifier for the geographic region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "advertiser_id": {"name": "advertiser_id", "description": "Advertiser ID associated with this location record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "country_code": {"name": "country_code", "description": "Two-letter ISO country code for the location.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "region_name": {"name": "region_name", "description": "Human-readable name of the geographic region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "region_level": {"name": "region_level", "description": "Reporting granularity of the location (e.g. COUNTRY, PROVINCE, CITY).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "area_type": {"name": "area_type", "description": "Classification of the location, such as administrative region or media market.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "parent_id": {"name": "parent_id", "description": "Identifier of the parent region, enabling hierarchical rollups (city to province to country).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "support_below_18": {"name": "support_below_18", "description": "Whether the location supports targeting users under 18. Used for compliance with age-restricted ad targeting rules.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"tiktok_location_data\"", "created_at": 1783708224.3987746, "unrendered_database": "{% if target.type != 'spark' %}{{var('tiktok_ads_database', target.database)}}{% endif %}", "unrendered_schema": "{{var('tiktok_ads_schema', 'tiktok_ads')}}", "doc_blocks": []}, "source.microsoft_ads.microsoft_ads.account_history": {"database": "postgres", "schema": "public", "name": "account_history", "resource_type": "source", "package_name": "microsoft_ads", "path": "models/staging/src_microsoft_ads.yml", "original_file_path": "models/staging/src_microsoft_ads.yml", "unique_id": "source.microsoft_ads.microsoft_ads.account_history", "fqn": ["microsoft_ads", "staging", "microsoft_ads", "account_history"], "source_name": "microsoft_ads", "source_description": "", "loader": "Fivetran", "identifier": "microsoft_ads_account_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents a version of one or more Microsoft accounts.", "columns": {"id": {"name": "id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "name": {"name": "name", "description": "The name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_name"]}, "last_modified_time": {"name": "last_modified_time", "description": "The time each version of the object was last modified, i.e. when that version of the object was 'created'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.modified_at"]}, "time_zone": {"name": "time_zone", "description": "The time zone associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.time_zone"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_account_history_data\"", "created_at": 1783708224.3994153, "unrendered_database": "{% if target.type != 'spark'%}{{ var('microsoft_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('microsoft_ads_schema', 'bingads') }}", "doc_blocks": []}, "source.microsoft_ads.microsoft_ads.account_performance_daily_report": {"database": "postgres", "schema": "public", "name": "account_performance_daily_report", "resource_type": "source", "package_name": "microsoft_ads", "path": "models/staging/src_microsoft_ads.yml", "original_file_path": "models/staging/src_microsoft_ads.yml", "unique_id": "source.microsoft_ads.microsoft_ads.account_performance_daily_report", "fqn": ["microsoft_ads", "staging", "microsoft_ads", "account_performance_daily_report"], "source_name": "microsoft_ads", "source_description": "", "loader": "Fivetran", "identifier": "microsoft_ads_account_performance_daily_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents the daily performance by account and all non-metric columns.", "columns": {"date": {"name": "date", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "ad_distribution": {"name": "ad_distribution", "description": "The distribution medium associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_distribution"]}, "bid_match_type": {"name": "bid_match_type", "description": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.bid_match_type"]}, "delivered_match_type": {"name": "delivered_match_type", "description": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.delivered_match_type"]}, "top_vs_other": {"name": "top_vs_other", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions_qualified": {"name": "conversions_qualified", "description": "Number of [conversions](https://learn.microsoft.com/en-us/advertising/reporting-service/conversionperformancereportcolumn?view=bingads-13#conversionsqualified), measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions_qualified"]}, "conversions": {"name": "conversions", "description": "(Deprecated in 2022 in favor of `conversions_qualified`) Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions_src"]}, "revenue": {"name": "revenue", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions_qualified": {"name": "all_conversions_qualified", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions_qualified"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_account_performance_daily_report_data\"", "created_at": 1783708224.4001129, "unrendered_database": "{% if target.type != 'spark'%}{{ var('microsoft_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('microsoft_ads_schema', 'bingads') }}", "doc_blocks": []}, "source.microsoft_ads.microsoft_ads.ad_group_history": {"database": "postgres", "schema": "public", "name": "ad_group_history", "resource_type": "source", "package_name": "microsoft_ads", "path": "models/staging/src_microsoft_ads.yml", "original_file_path": "models/staging/src_microsoft_ads.yml", "unique_id": "source.microsoft_ads.microsoft_ads.ad_group_history", "fqn": ["microsoft_ads", "staging", "microsoft_ads", "ad_group_history"], "source_name": "microsoft_ads", "source_description": "", "loader": "Fivetran", "identifier": "microsoft_ads_ad_group_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents a version of one or more Microsoft ad groups.", "columns": {"id": {"name": "id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "name": {"name": "name", "description": "The name of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_name"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "modified_time": {"name": "modified_time", "description": "The time each version of the object was last modified, i.e. when that version of the object was 'created'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.modified_at"]}, "start_date": {"name": "start_date", "description": "The date in which an ad group starts running.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.start_date"]}, "end_date": {"name": "end_date", "description": "The date in which this ad group will no longer run.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.end_date"]}, "status": {"name": "status", "description": "The status of this ad group; see the following [documentation](https://help.ads.microsoft.com/apex/index/3/en/53094) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_status"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_ad_group_history_data\"", "created_at": 1783708224.4011302, "unrendered_database": "{% if target.type != 'spark'%}{{ var('microsoft_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('microsoft_ads_schema', 'bingads') }}", "doc_blocks": []}, "source.microsoft_ads.microsoft_ads.ad_group_performance_daily_report": {"database": "postgres", "schema": "public", "name": "ad_group_performance_daily_report", "resource_type": "source", "package_name": "microsoft_ads", "path": "models/staging/src_microsoft_ads.yml", "original_file_path": "models/staging/src_microsoft_ads.yml", "unique_id": "source.microsoft_ads.microsoft_ads.ad_group_performance_daily_report", "fqn": ["microsoft_ads", "staging", "microsoft_ads", "ad_group_performance_daily_report"], "source_name": "microsoft_ads", "source_description": "", "loader": "Fivetran", "identifier": "microsoft_ads_ad_group_performance_daily_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents the daily performance by account, campaign, ad group and all non-metric columns.", "columns": {"date": {"name": "date", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "language": {"name": "language", "description": "The language that the associated ad was viewed in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.language"]}, "ad_distribution": {"name": "ad_distribution", "description": "The distribution medium associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_distribution"]}, "bid_match_type": {"name": "bid_match_type", "description": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.bid_match_type"]}, "delivered_match_type": {"name": "delivered_match_type", "description": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.delivered_match_type"]}, "top_vs_other": {"name": "top_vs_other", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions_qualified": {"name": "conversions_qualified", "description": "Number of [conversions](https://learn.microsoft.com/en-us/advertising/reporting-service/conversionperformancereportcolumn?view=bingads-13#conversionsqualified), measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions_qualified"]}, "conversions": {"name": "conversions", "description": "(Deprecated in 2022 in favor of `conversions_qualified`) Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions_src"]}, "revenue": {"name": "revenue", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions_qualified": {"name": "all_conversions_qualified", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions_qualified"]}, "all_conversions": {"name": "all_conversions", "description": "(Deprecated in 2022 in favor of `conversions_qualified`)\nNumber of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions_src"]}, "all_revenue": {"name": "all_revenue", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_ad_group_performance_daily_report_data\"", "created_at": 1783708224.4018438, "unrendered_database": "{% if target.type != 'spark'%}{{ var('microsoft_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('microsoft_ads_schema', 'bingads') }}", "doc_blocks": []}, "source.microsoft_ads.microsoft_ads.ad_history": {"database": "postgres", "schema": "public", "name": "ad_history", "resource_type": "source", "package_name": "microsoft_ads", "path": "models/staging/src_microsoft_ads.yml", "original_file_path": "models/staging/src_microsoft_ads.yml", "unique_id": "source.microsoft_ads.microsoft_ads.ad_history", "fqn": ["microsoft_ads", "staging", "microsoft_ads", "ad_history"], "source_name": "microsoft_ads", "source_description": "", "loader": "Fivetran", "identifier": "microsoft_ads_ad_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents a version of one or more Microsoft ads.", "columns": {"id": {"name": "id", "description": "The ID of the corresponding ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "modified_time": {"name": "modified_time", "description": "The time each version of the object was last modified, i.e. when that version of the object was 'created'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.modified_at"]}, "status": {"name": "status", "description": "The status of this ad; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/adstatus?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_status"]}, "type": {"name": "type", "description": "The ad type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/adtype?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_type"]}, "title": {"name": "title", "description": "The title of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.title"]}, "title_part_1": {"name": "title_part_1", "description": "Part 1 of the title.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.title_part_1"]}, "title_part_2": {"name": "title_part_2", "description": "Part 2 of the title.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.title_part_2"]}, "title_part_3": {"name": "title_part_3", "description": "Part 3 of the title.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.title_part_3"]}, "final_url": {"name": "final_url", "description": "The full URL that the ad links to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.final_url"]}, "domain": {"name": "domain", "description": "The associated domain that the ad links to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.domain"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_ad_history_data\"", "created_at": 1783708224.402561, "unrendered_database": "{% if target.type != 'spark'%}{{ var('microsoft_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('microsoft_ads_schema', 'bingads') }}", "doc_blocks": []}, "source.microsoft_ads.microsoft_ads.ad_performance_daily_report": {"database": "postgres", "schema": "public", "name": "ad_performance_daily_report", "resource_type": "source", "package_name": "microsoft_ads", "path": "models/staging/src_microsoft_ads.yml", "original_file_path": "models/staging/src_microsoft_ads.yml", "unique_id": "source.microsoft_ads.microsoft_ads.ad_performance_daily_report", "fqn": ["microsoft_ads", "staging", "microsoft_ads", "ad_performance_daily_report"], "source_name": "microsoft_ads", "source_description": "", "loader": "Fivetran", "identifier": "microsoft_ads_ad_performance_daily_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents the daily performance by account, campaign, ad group, ad and all non-metric columns.", "columns": {"date": {"name": "date", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "ad_id": {"name": "ad_id", "description": "The ID of the corresponding ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_id"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "language": {"name": "language", "description": "The language that the associated ad was viewed in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.language"]}, "ad_distribution": {"name": "ad_distribution", "description": "The distribution medium associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_distribution"]}, "bid_match_type": {"name": "bid_match_type", "description": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.bid_match_type"]}, "delivered_match_type": {"name": "delivered_match_type", "description": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.delivered_match_type"]}, "top_vs_other": {"name": "top_vs_other", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions_qualified": {"name": "conversions_qualified", "description": "Number of [conversions](https://learn.microsoft.com/en-us/advertising/reporting-service/conversionperformancereportcolumn?view=bingads-13#conversionsqualified), measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions_qualified"]}, "conversions": {"name": "conversions", "description": "(Deprecated in 2022 in favor of `conversions_qualified`) Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions_src"]}, "revenue": {"name": "revenue", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions_qualified": {"name": "all_conversions_qualified", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions_qualified"]}, "all_conversions": {"name": "all_conversions", "description": "(Deprecated in 2022 in favor of `conversions_qualified`)\nNumber of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions_src"]}, "all_revenue": {"name": "all_revenue", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_ad_performance_daily_report_data\"", "created_at": 1783708224.4033003, "unrendered_database": "{% if target.type != 'spark'%}{{ var('microsoft_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('microsoft_ads_schema', 'bingads') }}", "doc_blocks": []}, "source.microsoft_ads.microsoft_ads.campaign_history": {"database": "postgres", "schema": "public", "name": "campaign_history", "resource_type": "source", "package_name": "microsoft_ads", "path": "models/staging/src_microsoft_ads.yml", "original_file_path": "models/staging/src_microsoft_ads.yml", "unique_id": "source.microsoft_ads.microsoft_ads.campaign_history", "fqn": ["microsoft_ads", "staging", "microsoft_ads", "campaign_history"], "source_name": "microsoft_ads", "source_description": "", "loader": "Fivetran", "identifier": "microsoft_ads_campaign_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents a version of one or more Microsoft campaigns.", "columns": {"id": {"name": "id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "name": {"name": "name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_name"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "modified_time": {"name": "modified_time", "description": "The time each version of the object was last modified, i.e. when that version of the object was 'created'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.modified_at"]}, "type": {"name": "type", "description": "The campaign type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaigntype?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_type"]}, "time_zone": {"name": "time_zone", "description": "The time zone associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.time_zone"]}, "status": {"name": "status", "description": "The status of this campaign; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaignstatus?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_status"]}, "budget": {"name": "budget", "description": "The amount to spend daily across all campaigns that share the budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget"]}, "budget_id": {"name": "budget_id", "description": "The unique Microsoft Advertising identifier of the budget.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget_id"]}, "budget_type": {"name": "budget_type", "description": "The budget type determines the pace at which the budget is spent throughout the day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget_type"]}, "language": {"name": "language", "description": "The language that the associated ad was viewed in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.language"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_campaign_history_data\"", "created_at": 1783708224.4039845, "unrendered_database": "{% if target.type != 'spark'%}{{ var('microsoft_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('microsoft_ads_schema', 'bingads') }}", "doc_blocks": []}, "source.microsoft_ads.microsoft_ads.campaign_performance_daily_report": {"database": "postgres", "schema": "public", "name": "campaign_performance_daily_report", "resource_type": "source", "package_name": "microsoft_ads", "path": "models/staging/src_microsoft_ads.yml", "original_file_path": "models/staging/src_microsoft_ads.yml", "unique_id": "source.microsoft_ads.microsoft_ads.campaign_performance_daily_report", "fqn": ["microsoft_ads", "staging", "microsoft_ads", "campaign_performance_daily_report"], "source_name": "microsoft_ads", "source_description": "", "loader": "Fivetran", "identifier": "microsoft_ads_campaign_performance_daily_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents the daily performance by account, campaign and all non-metric columns.", "columns": {"date": {"name": "date", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "ad_distribution": {"name": "ad_distribution", "description": "The distribution medium associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_distribution"]}, "bid_match_type": {"name": "bid_match_type", "description": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.bid_match_type"]}, "delivered_match_type": {"name": "delivered_match_type", "description": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.delivered_match_type"]}, "top_vs_other": {"name": "top_vs_other", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "budget_association_status": {"name": "budget_association_status", "description": "Indicates whether or not the campaign is currently spending from the budget mentioned in the BudgetName column. The possible values are `Current` and `Ended`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget_association_status"]}, "budget_name": {"name": "budget_name", "description": "The name of the budget. This column will be empty for unshared budgets.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget_name"]}, "budget_status": {"name": "budget_status", "description": "The budget status. The possible values are `Active` and `Deleted`. This column will be empty for unshared budgets.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.budget_status"]}, "conversions_qualified": {"name": "conversions_qualified", "description": "Number of [conversions](https://learn.microsoft.com/en-us/advertising/reporting-service/conversionperformancereportcolumn?view=bingads-13#conversionsqualified), measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions_qualified"]}, "conversions": {"name": "conversions", "description": "(Deprecated in 2022 in favor of `conversions_qualified`) Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions_src"]}, "revenue": {"name": "revenue", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions_qualified": {"name": "all_conversions_qualified", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions_qualified"]}, "all_conversions": {"name": "all_conversions", "description": "(Deprecated in 2022 in favor of `conversions_qualified`)\nNumber of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions_src"]}, "all_revenue": {"name": "all_revenue", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_campaign_performance_daily_report_data\"", "created_at": 1783708224.4047055, "unrendered_database": "{% if target.type != 'spark'%}{{ var('microsoft_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('microsoft_ads_schema', 'bingads') }}", "doc_blocks": []}, "source.microsoft_ads.microsoft_ads.keyword_history": {"database": "postgres", "schema": "public", "name": "keyword_history", "resource_type": "source", "package_name": "microsoft_ads", "path": "models/staging/src_microsoft_ads.yml", "original_file_path": "models/staging/src_microsoft_ads.yml", "unique_id": "source.microsoft_ads.microsoft_ads.keyword_history", "fqn": ["microsoft_ads", "staging", "microsoft_ads", "keyword_history"], "source_name": "microsoft_ads", "source_description": "", "loader": "Fivetran", "identifier": "microsoft_ads_keyword_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents a version of one or more Microsoft keywords.", "columns": {"id": {"name": "id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.keyword_id"]}, "name": {"name": "name", "description": "The keyword(s) associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.keyword_name"]}, "modified_time": {"name": "modified_time", "description": "The time each version of the object was last modified, i.e. when that version of the object was 'created'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.modified_at"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "match_type": {"name": "match_type", "description": "The match type associated with this record; values contain but may not be limited to 'Broad', 'Exact', 'Phrase'. Please refer to Microsoft Ad's [documentation](https://help.ads.microsoft.com/#apex/ads/en/50822/1).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.match_type"]}, "status": {"name": "status", "description": "The status of this keyword; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/keywordstatus?view=bingads-13) for more information on values and definitions.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.keyword_status"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_keyword_history_data\"", "created_at": 1783708224.405353, "unrendered_database": "{% if target.type != 'spark'%}{{ var('microsoft_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('microsoft_ads_schema', 'bingads') }}", "doc_blocks": []}, "source.microsoft_ads.microsoft_ads.keyword_performance_daily_report": {"database": "postgres", "schema": "public", "name": "keyword_performance_daily_report", "resource_type": "source", "package_name": "microsoft_ads", "path": "models/staging/src_microsoft_ads.yml", "original_file_path": "models/staging/src_microsoft_ads.yml", "unique_id": "source.microsoft_ads.microsoft_ads.keyword_performance_daily_report", "fqn": ["microsoft_ads", "staging", "microsoft_ads", "keyword_performance_daily_report"], "source_name": "microsoft_ads", "source_description": "", "loader": "Fivetran", "identifier": "microsoft_ads_keyword_performance_daily_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents the daily performance by account, campaign, ad group, ad, keyword and all non-metric columns.", "columns": {"date": {"name": "date", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "ad_id": {"name": "ad_id", "description": "The ID of the corresponding ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_id"]}, "keyword_id": {"name": "keyword_id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.keyword_id"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "language": {"name": "language", "description": "The language that the associated ad was viewed in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.language"]}, "ad_distribution": {"name": "ad_distribution", "description": "The distribution medium associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_distribution"]}, "bid_match_type": {"name": "bid_match_type", "description": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.bid_match_type"]}, "delivered_match_type": {"name": "delivered_match_type", "description": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.delivered_match_type"]}, "top_vs_other": {"name": "top_vs_other", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions_qualified": {"name": "conversions_qualified", "description": "Number of [conversions](https://learn.microsoft.com/en-us/advertising/reporting-service/conversionperformancereportcolumn?view=bingads-13#conversionsqualified), measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions_qualified"]}, "conversions": {"name": "conversions", "description": "(Deprecated in 2022 in favor of `conversions_qualified`) Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions_src"]}, "revenue": {"name": "revenue", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions_qualified": {"name": "all_conversions_qualified", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions_qualified"]}, "all_conversions": {"name": "all_conversions", "description": "(Deprecated in 2022 in favor of `conversions_qualified`)\nNumber of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions_src"]}, "all_revenue": {"name": "all_revenue", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_keyword_performance_daily_report_data\"", "created_at": 1783708224.406048, "unrendered_database": "{% if target.type != 'spark'%}{{ var('microsoft_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('microsoft_ads_schema', 'bingads') }}", "doc_blocks": []}, "source.microsoft_ads.microsoft_ads.search_query_performance_daily_report": {"database": "postgres", "schema": "public", "name": "search_query_performance_daily_report", "resource_type": "source", "package_name": "microsoft_ads", "path": "models/staging/src_microsoft_ads.yml", "original_file_path": "models/staging/src_microsoft_ads.yml", "unique_id": "source.microsoft_ads.microsoft_ads.search_query_performance_daily_report", "fqn": ["microsoft_ads", "staging", "microsoft_ads", "search_query_performance_daily_report"], "source_name": "microsoft_ads", "source_description": "", "loader": "Fivetran", "identifier": "microsoft_ads_search_performance_daily_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents the daily performance by account, campaign, ad group, ad, keyword and all non-metric columns.", "columns": {"date": {"name": "date", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "ad_id": {"name": "ad_id", "description": "The ID of the corresponding ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_id"]}, "keyword_id": {"name": "keyword_id", "description": "The ID of the keyword.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.keyword_id"]}, "search_query": {"name": "search_query", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "language": {"name": "language", "description": "The language that the associated ad was viewed in.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.language"]}, "ad_distribution": {"name": "ad_distribution", "description": "The distribution medium associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_distribution"]}, "bid_match_type": {"name": "bid_match_type", "description": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.bid_match_type"]}, "delivered_match_type": {"name": "delivered_match_type", "description": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.delivered_match_type"]}, "top_vs_other": {"name": "top_vs_other", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "conversions_qualified": {"name": "conversions_qualified", "description": "Number of [conversions](https://learn.microsoft.com/en-us/advertising/reporting-service/conversionperformancereportcolumn?view=bingads-13#conversionsqualified), measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions_qualified"]}, "conversions": {"name": "conversions", "description": "(Deprecated in 2022 in favor of `conversions_qualified`) Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions_src"]}, "revenue": {"name": "revenue", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}, "all_conversions_qualified": {"name": "all_conversions_qualified", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions_qualified"]}, "all_conversions": {"name": "all_conversions", "description": "(Deprecated in 2022 in favor of `conversions_qualified`)\nNumber of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions_src"]}, "all_revenue": {"name": "all_revenue", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_search_performance_daily_report_data\"", "created_at": 1783708224.4068043, "unrendered_database": "{% if target.type != 'spark'%}{{ var('microsoft_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('microsoft_ads_schema', 'bingads') }}", "doc_blocks": []}, "source.microsoft_ads.microsoft_ads.geographic_performance_daily_report": {"database": "postgres", "schema": "public", "name": "geographic_performance_daily_report", "resource_type": "source", "package_name": "microsoft_ads", "path": "models/staging/src_microsoft_ads.yml", "original_file_path": "models/staging/src_microsoft_ads.yml", "unique_id": "source.microsoft_ads.microsoft_ads.geographic_performance_daily_report", "fqn": ["microsoft_ads", "staging", "microsoft_ads", "geographic_performance_daily_report"], "source_name": "microsoft_ads", "source_description": "", "loader": "Fivetran", "identifier": "microsoft_ads_geographic_performance_daily_report_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table represents the daily performance by geographic metrics.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.account_id"]}, "ad_distribution": {"name": "ad_distribution", "description": "The distribution medium associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_distribution"]}, "ad_group_id": {"name": "ad_group_id", "description": "The ID of the corresponding ad group.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.ad_group_id"]}, "all_conversions": {"name": "all_conversions", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions"]}, "all_conversions_qualified": {"name": "all_conversions_qualified", "description": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_conversions_qualified"]}, "all_revenue": {"name": "all_revenue", "description": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.all_revenue"]}, "bid_match_type": {"name": "bid_match_type", "description": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.bid_match_type"]}, "campaign_id": {"name": "campaign_id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.campaign_id"]}, "city": {"name": "city", "description": "The city where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.city"]}, "clicks": {"name": "clicks", "description": "The number of clicks that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.clicks"]}, "conversions": {"name": "conversions", "description": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions"]}, "conversions_qualified": {"name": "conversions_qualified", "description": "Number of [conversions](https://learn.microsoft.com/en-us/advertising/reporting-service/conversionperformancereportcolumn?view=bingads-13#conversionsqualified), measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.conversions_qualified"]}, "country": {"name": "country", "description": "The country or region where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.country"]}, "county": {"name": "county", "description": "The county where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.county"]}, "currency_code": {"name": "currency_code", "description": "The currency code associated with spend and, if applicable, other metrics associated with currency.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.currency_code"]}, "date": {"name": "date", "description": "The date of the performance report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.date_day"]}, "delivered_match_type": {"name": "delivered_match_type", "description": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.delivered_match_type"]}, "device_os": {"name": "device_os", "description": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_os"]}, "device_type": {"name": "device_type", "description": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.device_type"]}, "goal": {"name": "goal", "description": "The name of the goal you set for the conversions you want, meaning actions customers take after clicking your ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.goal"]}, "impressions": {"name": "impressions", "description": "The number of impressions that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.impressions"]}, "language": {"name": "language", "description": "The language of the publisher where the ad was shown.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "location_type": {"name": "location_type", "description": "The location type used to deliver ads. Values include \"Physical location\" and \"Location of interest\". \n\n\"Physical location\" indicates the user was in the corresponding City, Country, MetroArea, or State. \"Location of interest\" indicates the user was searching for or viewing pages about the location.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.location_type"]}, "metro_area": {"name": "metro_area", "description": "The metro area (Microsoft Market Area in the United States) where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.metro_area"]}, "most_specific_location": {"name": "most_specific_location", "description": "The most specific location used to deliver ads. If postal code is available, it is prioritized; otherwise, it may match city or country/region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.most_specific_location"]}, "network": {"name": "network", "description": "The network associated with this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.network"]}, "postal_code": {"name": "postal_code", "description": "The postal code where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.postal_code"]}, "spend": {"name": "spend", "description": "The amount of spend that occurred by the grain of the report.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.spend"]}, "state": {"name": "state", "description": "The state or geographic region where the user was physically located when they clicked the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.state"]}, "top_vs_other": {"name": "top_vs_other", "description": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.top_vs_other"]}, "revenue": {"name": "revenue", "description": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.microsoft_ads.revenue"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"microsoft_ads_geographic_performance_daily_report_data\"", "created_at": 1783708224.4075708, "unrendered_database": "{% if target.type != 'spark'%}{{ var('microsoft_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('microsoft_ads_schema', 'bingads') }}", "doc_blocks": []}, "source.facebook_ads.facebook_ads.account_history": {"database": "postgres", "schema": "public", "name": "account_history", "resource_type": "source", "package_name": "facebook_ads", "path": "models/staging/src_facebook_ads.yml", "original_file_path": "models/staging/src_facebook_ads.yml", "unique_id": "source.facebook_ads.facebook_ads.account_history", "fqn": ["facebook_ads", "staging", "facebook_ads", "account_history"], "source_name": "facebook_ads", "source_description": "", "loader": "Fivetran", "identifier": "facebook_ads_account_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table reflects a version of a Facebook ad account.", "columns": {"id": {"name": "id", "description": "The ID of the ad account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._fivetran_synced"]}, "account_status": {"name": "account_status", "description": "Current status of account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "business_country_code": {"name": "business_country_code", "description": "Country code of business associated to account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_time": {"name": "created_time", "description": "The time account was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "Currency associated with account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone_name": {"name": "timezone_name", "description": "Timezone associated with account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "business_state": {"name": "business_state", "description": "State abbreviation for business address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "timezone_offset_hours_utc": {"name": "timezone_offset_hours_utc", "description": "Time zone difference from UTC.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "min_daily_budget": {"name": "min_daily_budget", "description": "The minimum daily budget for this Ad Account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"facebook_ads_account_history_data\"", "created_at": 1783708224.408241, "unrendered_database": "{% if target.type != 'spark' %}{{ var('facebook_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('facebook_ads_schema', 'facebook_ads') }}", "doc_blocks": []}, "source.facebook_ads.facebook_ads.ad_history": {"database": "postgres", "schema": "public", "name": "ad_history", "resource_type": "source", "package_name": "facebook_ads", "path": "models/staging/src_facebook_ads.yml", "original_file_path": "models/staging/src_facebook_ads.yml", "unique_id": "source.facebook_ads.facebook_ads.ad_history", "fqn": ["facebook_ads", "staging", "facebook_ads", "ad_history"], "source_name": "facebook_ads", "source_description": "", "loader": "Fivetran", "identifier": "facebook_ads_ad_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table reflects a version of a Facebook ad.", "columns": {"id": {"name": "id", "description": "The ID of this ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the ad account that this ad belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_set_id": {"name": "ad_set_id", "description": "ID of the ad set that contains the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Ad campaign that contains this ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "creative_id": {"name": "creative_id", "description": "The ID of the ad creative to be used by this ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Name of the ad.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._fivetran_synced"]}, "updated_time": {"name": "updated_time", "description": "The timestamp of the last update of a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.updated_time"]}, "conversion_domain": {"name": "conversion_domain", "description": "The domain you've configured the ad to convert to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"facebook_ads_ad_history_data\"", "created_at": 1783708224.4088948, "unrendered_database": "{% if target.type != 'spark' %}{{ var('facebook_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('facebook_ads_schema', 'facebook_ads') }}", "doc_blocks": []}, "source.facebook_ads.facebook_ads.ad_set_history": {"database": "postgres", "schema": "public", "name": "ad_set_history", "resource_type": "source", "package_name": "facebook_ads", "path": "models/staging/src_facebook_ads.yml", "original_file_path": "models/staging/src_facebook_ads.yml", "unique_id": "source.facebook_ads.facebook_ads.ad_set_history", "fqn": ["facebook_ads", "staging", "facebook_ads", "ad_set_history"], "source_name": "facebook_ads", "source_description": "", "loader": "Fivetran", "identifier": "facebook_ads_ad_set_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table reflects a version of a Facebook ad set.", "columns": {"id": {"name": "id", "description": "The ID of the ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the ad account that this ad set belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "campaign_id": {"name": "campaign_id", "description": "Ad campaign that contains this ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._fivetran_synced"]}, "updated_time": {"name": "updated_time", "description": "The timestamp of the last update of a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.updated_time"]}, "start_time": {"name": "start_time", "description": "Timestamp of designated ad set start time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "end_time": {"name": "end_time", "description": "Timestamp of designated ad set end time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "bid_strategy": {"name": "bid_strategy", "description": "Bid strategy values are - 'LOWEST_COST_WITHOUT_CAP', 'LOWEST_COST_WITH_BID_CAP', 'COST_CAP', 'LOWEST_COST_WITH_MIN_ROAS'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget": {"name": "daily_budget", "description": "Daily budget of ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_remaining": {"name": "budget_remaining", "description": "Remaining budget of ad set.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Status values are - 'ACTIVE', 'PAUSED', 'DELETED', 'ARCHIVED'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "optimization_goal": {"name": "optimization_goal", "description": "The optimization goal this ad set is using. Possible values defined [here](https://developers.facebook.com/docs/marketing-api/reference/ad-campaign/#fields).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"facebook_ads_ad_set_history_data\"", "created_at": 1783708224.4095616, "unrendered_database": "{% if target.type != 'spark' %}{{ var('facebook_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('facebook_ads_schema', 'facebook_ads') }}", "doc_blocks": []}, "source.facebook_ads.facebook_ads.basic_ad": {"database": "postgres", "schema": "public", "name": "basic_ad", "resource_type": "source", "package_name": "facebook_ads", "path": "models/staging/src_facebook_ads.yml", "original_file_path": "models/staging/src_facebook_ads.yml", "unique_id": "source.facebook_ads.facebook_ads.basic_ad", "fqn": ["facebook_ads", "staging", "facebook_ads", "basic_ad"], "source_name": "facebook_ads", "source_description": "", "loader": "Fivetran", "identifier": "facebook_ads_basic_ad_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily performance of an ad in Facebook.", "columns": {"ad_id": {"name": "ad_id", "description": "The ID of the ad the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_name": {"name": "ad_name", "description": "Name of the ad the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "adset_name": {"name": "adset_name", "description": "Name of the ad set the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "The date of the reported performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the ad account that this ad belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "impressions": {"name": "impressions", "description": "The number of impressions the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "inline_link_clicks": {"name": "inline_link_clicks", "description": "The number of clicks the ad had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "spend": {"name": "spend", "description": "The spend on the ad in the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "reach": {"name": "reach", "description": "The number of people who saw any content from your Page or about your Page. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "frequency": {"name": "frequency", "description": "The average number of times each person saw your ad; it is calculated as impressions divided by reach.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"facebook_ads_basic_ad_data\"", "created_at": 1783708224.4102435, "unrendered_database": "{% if target.type != 'spark' %}{{ var('facebook_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('facebook_ads_schema', 'facebook_ads') }}", "doc_blocks": []}, "source.facebook_ads.facebook_ads.basic_ad_actions": {"database": "postgres", "schema": "public", "name": "basic_ad_actions", "resource_type": "source", "package_name": "facebook_ads", "path": "models/staging/src_facebook_ads.yml", "original_file_path": "models/staging/src_facebook_ads.yml", "unique_id": "source.facebook_ads.facebook_ads.basic_ad_actions", "fqn": ["facebook_ads", "staging", "facebook_ads", "basic_ad_actions"], "source_name": "facebook_ads", "source_description": "", "loader": "Fivetran", "identifier": "facebook_ads_basic_ad_actions_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents the daily conversion performance of an ad in Facebook. This is the prebuilt `basic_ad` report broken down by `action_type`.", "columns": {"_1_d_view": {"name": "_1_d_view", "description": "Conversion metric value using an attribution window of \"1 day after viewing the ad\". Not included in downstream models by default, but can be added using the `facebook_ads__basic_ad_actions_passthrough_metrics` var.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_7_d_click": {"name": "_7_d_click", "description": "Conversion metric value using an attribution window of \"7 days after clicking the ad\". Not included in downstream models by default, but can be added using the `facebook_ads__basic_ad_actions_passthrough_metrics` var.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_28_d_click": {"name": "_28_d_click", "description": "Conversion metric value using an attribution window of \"28 days after clicking the ad\". Deprecated by Facebook due to digital privacy initiatives. Not included in downstream models by default, but can be added using the `facebook_ads__basic_ad_actions_passthrough_metrics` var.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_id": {"name": "_fivetran_id", "description": "Unique record identifier.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._fivetran_synced"]}, "action_type": {"name": "action_type", "description": "The kind of actions taken on your ad, Page, app or event after your ad was served to someone, even if they didn't click on it. Action types include Page likes, app installs, conversions, event responses and more. Actions prepended by app_custom_event come from mobile app events and actions prepended by offsite_conversion come from the Facebook Pixel.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_id": {"name": "ad_id", "description": "The ID of the ad the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "The date of the reported performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "index": {"name": "index", "description": "Index reflecting the `action_type` tracked for this ad on this day. A primary key created by Fivetran utilized for tracking data, specifically when there are multiple rows associated with a single row in the parent table.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.index"]}, "inline": {"name": "inline", "description": "Conversion metric value using the attribution window that occurs on the ad itself. Not included in downstream models by default, but can be added using the `facebook_ads__basic_ad_actions_passthrough_metrics` var.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "value": {"name": "value", "description": "Conversion metric value using the default attribution window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"facebook_ads_basic_ad_actions_data\"", "created_at": 1783708224.4108853, "unrendered_database": "{% if target.type != 'spark' %}{{ var('facebook_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('facebook_ads_schema', 'facebook_ads') }}", "doc_blocks": []}, "source.facebook_ads.facebook_ads.basic_ad_action_values": {"database": "postgres", "schema": "public", "name": "basic_ad_action_values", "resource_type": "source", "package_name": "facebook_ads", "path": "models/staging/src_facebook_ads.yml", "original_file_path": "models/staging/src_facebook_ads.yml", "unique_id": "source.facebook_ads.facebook_ads.basic_ad_action_values", "fqn": ["facebook_ads", "staging", "facebook_ads", "basic_ad_action_values"], "source_name": "facebook_ads", "source_description": "", "loader": "Fivetran", "identifier": "facebook_ads_basic_ad_action_values_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": null, "external": null, "description": "Each record represents the daily conversion values associated with an ad in Facebook. This is the prebuilt `basic_ad` report broken down by `action_type` and `action_value`.", "columns": {"_7_d_click": {"name": "_7_d_click", "description": "Conversion metric value using an attribution window of \"7 days after clicking the ad\". Not included in downstream models by default, but can be added using the `facebook_ads__basic_ad_actions_passthrough_metrics` var.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_id": {"name": "_fivetran_id", "description": "Unique record identifier.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._fivetran_synced"]}, "action_type": {"name": "action_type", "description": "The kind of actions taken on your ad, Page, app or event after your ad was served to someone, even if they didn't click on it. Action types include Page likes, app installs, conversions, event responses and more. Actions prepended by app_custom_event come from mobile app events and actions prepended by offsite_conversion come from the Facebook Pixel.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "ad_id": {"name": "ad_id", "description": "The ID of the ad the report relates to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "date": {"name": "date", "description": "The date of the reported performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "index": {"name": "index", "description": "Index reflecting the `action_type` tracked for this ad on this day. A primary key created by Fivetran utilized for tracking data, specifically when there are multiple rows associated with a single row in the parent table.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.index"]}, "value": {"name": "value", "description": "Monetary value associated with the convesion action using the default attribution window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": null, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": null, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"facebook_ads_basic_ad_action_values_data\"", "created_at": 1783708224.4113753, "unrendered_database": "{% if target.type != 'spark' %}{{ var('facebook_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('facebook_ads_schema', 'facebook_ads') }}", "doc_blocks": []}, "source.facebook_ads.facebook_ads.campaign_history": {"database": "postgres", "schema": "public", "name": "campaign_history", "resource_type": "source", "package_name": "facebook_ads", "path": "models/staging/src_facebook_ads.yml", "original_file_path": "models/staging/src_facebook_ads.yml", "unique_id": "source.facebook_ads.facebook_ads.campaign_history", "fqn": ["facebook_ads", "staging", "facebook_ads", "campaign_history"], "source_name": "facebook_ads", "source_description": "", "loader": "Fivetran", "identifier": "facebook_ads_campaign_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table reflects a version of a Facebook campaign.", "columns": {"id": {"name": "id", "description": "The ID of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "The ID of the ad account that this campaign belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "The name of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._fivetran_synced"]}, "updated_time": {"name": "updated_time", "description": "The timestamp of the last update of a record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.updated_time"]}, "created_time": {"name": "created_time", "description": "The time the campaign was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "start_time": {"name": "start_time", "description": "Timestamp of designated campaign start time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "stop_time": {"name": "stop_time", "description": "Timestamp of designated campaign end time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "daily_budget": {"name": "daily_budget", "description": "Daily budget of campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "budget_remaining": {"name": "budget_remaining", "description": "Remaining budget of campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "lifetime_budget": {"name": "lifetime_budget", "description": "Lifetime budget of the campaign.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "status": {"name": "status", "description": "Status values are - 'ACTIVE', 'PAUSED', 'DELETED', 'ARCHIVED'.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"facebook_ads_campaign_history_data\"", "created_at": 1783708224.4120924, "unrendered_database": "{% if target.type != 'spark' %}{{ var('facebook_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('facebook_ads_schema', 'facebook_ads') }}", "doc_blocks": []}, "source.facebook_ads.facebook_ads.creative_history": {"database": "postgres", "schema": "public", "name": "creative_history", "resource_type": "source", "package_name": "facebook_ads", "path": "models/staging/src_facebook_ads.yml", "original_file_path": "models/staging/src_facebook_ads.yml", "unique_id": "source.facebook_ads.facebook_ads.creative_history", "fqn": ["facebook_ads", "staging", "facebook_ads", "creative_history"], "source_name": "facebook_ads", "source_description": "", "loader": "Fivetran", "identifier": "facebook_ads_creative_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record in this table reflects a version of a Facebook creative.", "columns": {"_fivetran_id": {"name": "_fivetran_id", "description": "Unique record identifier", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "page_link": {"name": "page_link", "description": "URL destination of Facebook ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "template_page_link": {"name": "template_page_link", "description": "URL destination of Facebook dynamic ads.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "id": {"name": "id", "description": "Unique ID for an ad creative.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "account_id": {"name": "account_id", "description": "Ad account ID for the account this ad creative belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "name": {"name": "name", "description": "Name of this ad creative as seen in the ad account's library.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "url_tags": {"name": "url_tags", "description": "A set of query string parameters which will replace or be appended to urls clicked from page post ads, message of the post, and canvas app install creatives only.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._fivetran_synced"]}, "asset_feed_spec_link_urls": {"name": "asset_feed_spec_link_urls", "description": "Link to the asset feed spec", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "object_story_link_data_child_attachments": {"name": "object_story_link_data_child_attachments", "description": "Link of the object story child attachments", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "object_story_link_data_caption": {"name": "object_story_link_data_caption", "description": "Link of the object story caption", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "object_story_link_data_description": {"name": "object_story_link_data_description", "description": "Link of the object story description", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "object_story_link_data_link": {"name": "object_story_link_data_link", "description": "Link of the object story link", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "object_story_link_data_message": {"name": "object_story_link_data_message", "description": "Link of the object story message", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "template_app_link_spec_ios": {"name": "template_app_link_spec_ios", "description": "Link of the object story spec for ios", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "template_app_link_spec_ipad": {"name": "template_app_link_spec_ipad", "description": "Link of the template app spec for ipad", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "template_app_link_spec_android": {"name": "template_app_link_spec_android", "description": "Link of the template app for android", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "template_app_link_spec_iphone": {"name": "template_app_link_spec_iphone", "description": "Link of the template app for iphone", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"facebook_ads_creative_history_data\"", "created_at": 1783708224.412766, "unrendered_database": "{% if target.type != 'spark' %}{{ var('facebook_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('facebook_ads_schema', 'facebook_ads') }}", "doc_blocks": []}, "source.facebook_ads.facebook_ads.demographics_country": {"database": "postgres", "schema": "public", "name": "demographics_country", "resource_type": "source", "package_name": "facebook_ads", "path": "models/staging/src_facebook_ads.yml", "original_file_path": "models/staging/src_facebook_ads.yml", "unique_id": "source.facebook_ads.facebook_ads.demographics_country", "fqn": ["facebook_ads", "staging", "facebook_ads", "demographics_country"], "source_name": "facebook_ads", "source_description": "", "loader": "Fivetran", "identifier": "facebook_ads_demographics_country_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Ads report segmented by country.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the ad account that this ad belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.account_id"]}, "date": {"name": "date", "description": "The date of the reported performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.date"]}, "_fivetran_id": {"name": "_fivetran_id", "description": "Fivetran-generated unique ID of the country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.country_id"]}, "country": {"name": "country", "description": "Country whose ad performance is being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.country"]}, "impressions": {"name": "impressions", "description": "The number of impressions the ads had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.impressions"]}, "inline_link_clicks": {"name": "inline_link_clicks", "description": "The number of clicks on links to select destinations or experiences, on or off Facebook-owned properties. Inline link clicks use a fixed 1-day-click attribution window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.inline_link_clicks"]}, "reach": {"name": "reach", "description": "The number of people who saw any content from your Page or about your Page. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.reach"]}, "cost_per_inline_link_click": {"name": "cost_per_inline_link_click", "description": "The average cost of each inline link click. Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.cost_per_inline_link_click"]}, "cpc": {"name": "cpc", "description": "The average cost for each click (all). Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.cpc"]}, "cpm": {"name": "cpm", "description": "The average cost for 1,000 impressions. Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.cpm"]}, "ctr": {"name": "ctr", "description": "The percentage of times people saw your ad and performed a click (all). Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.ctr"]}, "frequency": {"name": "frequency", "description": "The average number of times each person saw your ads; it is calculated as impressions divided by reach.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.frequency"]}, "spend": {"name": "spend", "description": "Ad spend in a given day for the breakdown.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.spend"]}, "inline_link_click_ctr": {"name": "inline_link_click_ctr", "description": "The percentage of time people saw your ads and performed an inline link click. Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.inline_link_click_ctr"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"facebook_ads_demographics_country_data\"", "created_at": 1783708224.4134526, "unrendered_database": "{% if target.type != 'spark' %}{{ var('facebook_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('facebook_ads_schema', 'facebook_ads') }}", "doc_blocks": ["doc.facebook_ads.demographics_country"]}, "source.facebook_ads.facebook_ads.demographics_country_actions": {"database": "postgres", "schema": "public", "name": "demographics_country_actions", "resource_type": "source", "package_name": "facebook_ads", "path": "models/staging/src_facebook_ads.yml", "original_file_path": "models/staging/src_facebook_ads.yml", "unique_id": "source.facebook_ads.facebook_ads.demographics_country_actions", "fqn": ["facebook_ads", "staging", "facebook_ads", "demographics_country_actions"], "source_name": "facebook_ads", "source_description": "", "loader": "Fivetran", "identifier": "facebook_ads_demographics_country_actions_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents daily conversion performance by country. This is the prebuilt `demographics_country` report broken down by `action_type`.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the ad account that this ad belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.account_id"]}, "date": {"name": "date", "description": "The date of the reported performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.date"]}, "_fivetran_id": {"name": "_fivetran_id", "description": "Fivetran-generated unique ID of the country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.country_id"]}, "index": {"name": "index", "description": "Index reflecting the `action_type` tracked for this ad on this day. A primary key created by Fivetran utilized for tracking data, specifically when there are multiple rows associated with a single row in the parent table.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.index"]}, "action_type": {"name": "action_type", "description": "The kind of actions taken on your ad, Page, app or event after your ad was served to someone, even if they didn't click on it. Action types include Page likes, app installs, conversions, event responses and more.\nActions prepended by `app_custom_event` come from mobile app events and actions prepended by `offsite_conversion` come from the Facebook Pixel.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.action_type"]}, "value": {"name": "value", "description": "Conversion metric value using the default attribution window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.conversions"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._fivetran_synced"]}, "inline": {"name": "inline", "description": "Conversion metric value using the attribution window that occurs on the ad itself. Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.inline"]}, "_7_d_click": {"name": "_7_d_click", "description": "Conversion metric value using an attribution window of \"7 days after clicking the ad\". Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._7_d_click"]}, "_1_d_view": {"name": "_1_d_view", "description": "Conversion metric value using an attribution window of \"1 day after viewing the ad\". Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._1_d_view"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"facebook_ads_demographics_country_actions_data\"", "created_at": 1783708224.4141119, "unrendered_database": "{% if target.type != 'spark' %}{{ var('facebook_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('facebook_ads_schema', 'facebook_ads') }}", "doc_blocks": ["doc.facebook_ads.demographics_country_actions"]}, "source.facebook_ads.facebook_ads.demographics_region": {"database": "postgres", "schema": "public", "name": "demographics_region", "resource_type": "source", "package_name": "facebook_ads", "path": "models/staging/src_facebook_ads.yml", "original_file_path": "models/staging/src_facebook_ads.yml", "unique_id": "source.facebook_ads.facebook_ads.demographics_region", "fqn": ["facebook_ads", "staging", "facebook_ads", "demographics_region"], "source_name": "facebook_ads", "source_description": "", "loader": "Fivetran", "identifier": "facebook_ads_demographics_region_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Ads report segmented by geographic region.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the ad account that this ad belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.account_id"]}, "date": {"name": "date", "description": "The date of the reported performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.date"]}, "_fivetran_id": {"name": "_fivetran_id", "description": "Fivetran-generated unique ID of the geographic region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.region_id"]}, "region": {"name": "region", "description": "Geographic region whose ad performance is being reported on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.region"]}, "impressions": {"name": "impressions", "description": "The number of impressions the ads had on the given day.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.impressions"]}, "inline_link_clicks": {"name": "inline_link_clicks", "description": "The number of clicks on links to select destinations or experiences, on or off Facebook-owned properties. Inline link clicks use a fixed 1-day-click attribution window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.inline_link_clicks"]}, "reach": {"name": "reach", "description": "The number of people who saw any content from your Page or about your Page. This metric is estimated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.reach"]}, "cost_per_inline_link_click": {"name": "cost_per_inline_link_click", "description": "The average cost of each inline link click. Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.cost_per_inline_link_click"]}, "cpc": {"name": "cpc", "description": "The average cost for each click (all). Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.cpc"]}, "cpm": {"name": "cpm", "description": "The average cost for 1,000 impressions. Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.cpm"]}, "ctr": {"name": "ctr", "description": "The percentage of times people saw your ad and performed a click (all). Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.ctr"]}, "frequency": {"name": "frequency", "description": "The average number of times each person saw your ads; it is calculated as impressions divided by reach.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.frequency"]}, "spend": {"name": "spend", "description": "Ad spend in a given day for the breakdown.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.spend"]}, "inline_link_click_ctr": {"name": "inline_link_click_ctr", "description": "The percentage of time people saw your ads and performed an inline link click. Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.inline_link_click_ctr"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._fivetran_synced"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"facebook_ads_demographics_region_data\"", "created_at": 1783708224.414825, "unrendered_database": "{% if target.type != 'spark' %}{{ var('facebook_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('facebook_ads_schema', 'facebook_ads') }}", "doc_blocks": ["doc.facebook_ads.demographics_region"]}, "source.facebook_ads.facebook_ads.demographics_region_actions": {"database": "postgres", "schema": "public", "name": "demographics_region_actions", "resource_type": "source", "package_name": "facebook_ads", "path": "models/staging/src_facebook_ads.yml", "original_file_path": "models/staging/src_facebook_ads.yml", "unique_id": "source.facebook_ads.facebook_ads.demographics_region_actions", "fqn": ["facebook_ads", "staging", "facebook_ads", "demographics_region_actions"], "source_name": "facebook_ads", "source_description": "", "loader": "Fivetran", "identifier": "facebook_ads_demographics_region_actions_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents daily conversion performance by geographic region. This is the prebuilt `demographics_region` report broken down by `action_type`.", "columns": {"account_id": {"name": "account_id", "description": "The ID of the ad account that this ad belongs to.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.account_id"]}, "date": {"name": "date", "description": "The date of the reported performance.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.date"]}, "_fivetran_id": {"name": "_fivetran_id", "description": "Fivetran-generated unique ID of the geographic region.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.region_id"]}, "index": {"name": "index", "description": "Index reflecting the `action_type` tracked for this ad on this day. A primary key created by Fivetran utilized for tracking data, specifically when there are multiple rows associated with a single row in the parent table.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.index"]}, "action_type": {"name": "action_type", "description": "The kind of actions taken on your ad, Page, app or event after your ad was served to someone, even if they didn't click on it. Action types include Page likes, app installs, conversions, event responses and more.\nActions prepended by `app_custom_event` come from mobile app events and actions prepended by `offsite_conversion` come from the Facebook Pixel.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.action_type"]}, "value": {"name": "value", "description": "Conversion metric value using the default attribution window.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.conversions"]}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "When the record was last synced by Fivetran.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads._fivetran_synced"]}, "inline": {"name": "inline", "description": "Conversion metric value using the attribution window that occurs on the ad itself. Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": ["doc.facebook_ads.inline"]}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": true, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"facebook_ads_demographics_region_actions_data\"", "created_at": 1783708224.4154804, "unrendered_database": "{% if target.type != 'spark' %}{{ var('facebook_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('facebook_ads_schema', 'facebook_ads') }}", "doc_blocks": ["doc.facebook_ads.demographics_region_actions"]}}, "macros": {"macro.dbt_postgres.postgres__get_catalog_relations": {"name": "postgres__get_catalog_relations", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "unique_id": "macro.dbt_postgres.postgres__get_catalog_relations", "macro_sql": "{% macro postgres__get_catalog_relations(information_schema, relations) -%}\n {%- call statement('catalog', fetch_result=True) -%}\n\n {#\n If the user has multiple databases set and the first one is wrong, this will fail.\n But we won't fail in the case where there are multiple quoting-difference-only dbs, which is better.\n #}\n {% set database = information_schema.database %}\n {{ adapter.verify_database(database) }}\n\n select\n '{{ database }}' as table_database,\n sch.nspname as table_schema,\n tbl.relname as table_name,\n case tbl.relkind\n when 'v' then 'VIEW'\n when 'm' then 'MATERIALIZED VIEW'\n else 'BASE TABLE'\n end as table_type,\n tbl_desc.description as table_comment,\n col.attname as column_name,\n col.attnum as column_index,\n pg_catalog.format_type(col.atttypid, col.atttypmod) as column_type,\n col_desc.description as column_comment,\n pg_get_userbyid(tbl.relowner) as table_owner\n\n from pg_catalog.pg_namespace sch\n join pg_catalog.pg_class tbl on tbl.relnamespace = sch.oid\n join pg_catalog.pg_attribute col on col.attrelid = tbl.oid\n left outer join pg_catalog.pg_description tbl_desc on (tbl_desc.objoid = tbl.oid and tbl_desc.objsubid = 0)\n left outer join pg_catalog.pg_description col_desc on (col_desc.objoid = tbl.oid and col_desc.objsubid = col.attnum)\n where (\n {%- for relation in relations -%}\n {%- if relation.identifier -%}\n (upper(sch.nspname) = upper('{{ relation.schema }}') and\n upper(tbl.relname) = upper('{{ relation.identifier }}'))\n {%- else-%}\n upper(sch.nspname) = upper('{{ relation.schema }}')\n {%- endif -%}\n {%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n )\n and not pg_is_other_temp_schema(sch.oid) -- not a temporary schema belonging to another session\n and tbl.relpersistence in ('p', 'u') -- [p]ermanent table or [u]nlogged table. Exclude [t]emporary tables\n and tbl.relkind in ('r', 'v', 'f', 'p', 'm') -- o[r]dinary table, [v]iew, [f]oreign table, [p]artitioned table, [m]aterialized view. Other values are [i]ndex, [S]equence, [c]omposite type, [t]OAST table\n and col.attnum > 0 -- negative numbers are used for system columns such as oid\n and not col.attisdropped -- column as not been dropped\n\n order by\n sch.nspname,\n tbl.relname,\n col.attnum\n\n {%- endcall -%}\n\n {{ return(load_result('catalog').table) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "relations", "type": null, "description": ""}], "created_at": 1783708210.654429, "supported_languages": null}, "macro.dbt_postgres.postgres__get_catalog": {"name": "postgres__get_catalog", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "unique_id": "macro.dbt_postgres.postgres__get_catalog", "macro_sql": "{% macro postgres__get_catalog(information_schema, schemas) -%}\n {%- set relations = [] -%}\n {%- for schema in schemas -%}\n {%- set dummy = relations.append({'schema': schema}) -%}\n {%- endfor -%}\n {{ return(postgres__get_catalog_relations(information_schema, relations)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_catalog_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "schemas", "type": null, "description": ""}], "created_at": 1783708210.6551988, "supported_languages": null}, "macro.dbt_postgres.postgres__current_timestamp": {"name": "postgres__current_timestamp", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__current_timestamp", "macro_sql": "{% macro postgres__current_timestamp() -%}\n now()\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.6556463, "supported_languages": null}, "macro.dbt_postgres.postgres__snapshot_string_as_time": {"name": "postgres__snapshot_string_as_time", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__snapshot_string_as_time", "macro_sql": "{% macro postgres__snapshot_string_as_time(timestamp) -%}\n {%- set result = \"'\" ~ timestamp ~ \"'::timestamp without time zone\" -%}\n {{ return(result) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "timestamp", "type": null, "description": ""}], "created_at": 1783708210.6560297, "supported_languages": null}, "macro.dbt_postgres.postgres__snapshot_get_time": {"name": "postgres__snapshot_get_time", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__snapshot_get_time", "macro_sql": "{% macro postgres__snapshot_get_time() -%}\n {{ current_timestamp() }}::timestamp without time zone\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.6562927, "supported_languages": null}, "macro.dbt_postgres.postgres__current_timestamp_backcompat": {"name": "postgres__current_timestamp_backcompat", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__current_timestamp_backcompat", "macro_sql": "{% macro postgres__current_timestamp_backcompat() %}\n current_timestamp::{{ type_timestamp() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.656526, "supported_languages": null}, "macro.dbt_postgres.postgres__current_timestamp_in_utc_backcompat": {"name": "postgres__current_timestamp_in_utc_backcompat", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/timestamps.sql", "original_file_path": "macros/timestamps.sql", "unique_id": "macro.dbt_postgres.postgres__current_timestamp_in_utc_backcompat", "macro_sql": "{% macro postgres__current_timestamp_in_utc_backcompat() %}\n (current_timestamp at time zone 'utc')::{{ type_timestamp() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.6567557, "supported_languages": null}, "macro.dbt_postgres.postgres__get_relations": {"name": "postgres__get_relations", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations.sql", "original_file_path": "macros/relations.sql", "unique_id": "macro.dbt_postgres.postgres__get_relations", "macro_sql": "{% macro postgres__get_relations() -%}\n\n {#\n -- in pg_depend, objid is the dependent, refobjid is the referenced object\n -- > a pg_depend entry indicates that the referenced object cannot be\n -- > dropped without also dropping the dependent object.\n #}\n\n {%- call statement('relations', fetch_result=True) -%}\n select distinct\n dependent_namespace.nspname as dependent_schema,\n dependent_class.relname as dependent_name,\n referenced_namespace.nspname as referenced_schema,\n referenced_class.relname as referenced_name\n\n -- Query for views: views are entries in pg_class with an entry in pg_rewrite, but we avoid\n -- a seq scan on pg_rewrite by leveraging the fact there is an \"internal\" row in pg_depend for\n -- the view...\n from pg_class as dependent_class\n join pg_namespace as dependent_namespace on dependent_namespace.oid = dependent_class.relnamespace\n join pg_depend as dependent_depend on dependent_depend.refobjid = dependent_class.oid\n and dependent_depend.classid = 'pg_rewrite'::regclass\n and dependent_depend.refclassid = 'pg_class'::regclass\n and dependent_depend.deptype = 'i'\n\n -- ... and via pg_depend (that has a row per column, hence the need for \"distinct\" above, and\n -- making sure to exclude the internal row to avoid a view appearing to depend on itself)...\n join pg_depend as joining_depend on joining_depend.objid = dependent_depend.objid\n and joining_depend.classid = 'pg_rewrite'::regclass\n and joining_depend.refclassid = 'pg_class'::regclass\n and joining_depend.refobjid != dependent_depend.refobjid\n\n -- ... we can find the tables they query from in pg_class, but excluding system tables. Note we\n -- don't need need to exclude _dependent_ system tables, because they only query from other\n -- system tables, and so are automatically excluded by excluding _referenced_ system tables\n join pg_class as referenced_class on referenced_class.oid = joining_depend.refobjid\n join pg_namespace as referenced_namespace on referenced_namespace.oid = referenced_class.relnamespace\n and referenced_namespace.nspname != 'information_schema'\n and referenced_namespace.nspname not like 'pg\\_%'\n\n order by\n dependent_schema, dependent_name, referenced_schema, referenced_name;\n\n {%- endcall -%}\n\n {{ return(load_result('relations').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.6577315, "supported_languages": null}, "macro.dbt_postgres.postgres_get_relations": {"name": "postgres_get_relations", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations.sql", "original_file_path": "macros/relations.sql", "unique_id": "macro.dbt_postgres.postgres_get_relations", "macro_sql": "{% macro postgres_get_relations() %}\n {{ return(postgres__get_relations()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.6580095, "supported_languages": null}, "macro.dbt_postgres.postgres__create_table_as": {"name": "postgres__create_table_as", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__create_table_as", "macro_sql": "{% macro postgres__create_table_as(temporary, relation, sql) -%}\n {%- set unlogged = config.get('unlogged', default=false) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n\n create {% if temporary -%}\n temporary\n {%- elif unlogged -%}\n unlogged\n {%- endif %} table {{ relation }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced %}\n {{ get_assert_columns_equivalent(sql) }}\n {% endif -%}\n {% if contract_config.enforced and (not temporary) -%}\n {{ get_table_columns_and_constraints() }} ;\n insert into {{ relation }} (\n {{ adapter.dispatch('get_column_names', 'dbt')() }}\n )\n {%- set sql = get_select_subquery(sql) %}\n {% else %}\n as\n {% endif %}\n (\n {{ sql }}\n );\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent", "macro.dbt.get_table_columns_and_constraints", "macro.dbt.default__get_column_names", "macro.dbt.get_select_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "temporary", "type": null, "description": ""}, {"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783708210.6625805, "supported_languages": null}, "macro.dbt_postgres.postgres__get_create_index_sql": {"name": "postgres__get_create_index_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_create_index_sql", "macro_sql": "{% macro postgres__get_create_index_sql(relation, index_dict) -%}\n {%- set index_config = adapter.parse_index(index_dict) -%}\n {%- set comma_separated_columns = \", \".join(index_config.columns) -%}\n {%- set index_name = index_config.render(relation) -%}\n\n create {% if index_config.unique -%}\n unique\n {%- endif %} index if not exists\n \"{{ index_name }}\"\n on {{ relation }} {% if index_config.type -%}\n using {{ index_config.type }}\n {%- endif %}\n ({{ comma_separated_columns }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "index_dict", "type": null, "description": ""}], "created_at": 1783708210.6637228, "supported_languages": null}, "macro.dbt_postgres.postgres__create_schema": {"name": "postgres__create_schema", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__create_schema", "macro_sql": "{% macro postgres__create_schema(relation) -%}\n {% if relation.database -%}\n {{ adapter.verify_database(relation.database) }}\n {%- endif -%}\n {%- call statement('create_schema') -%}\n create schema if not exists {{ relation.without_identifier().include(database=False) }}\n {%- endcall -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.6645184, "supported_languages": null}, "macro.dbt_postgres.postgres__drop_schema": {"name": "postgres__drop_schema", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__drop_schema", "macro_sql": "{% macro postgres__drop_schema(relation) -%}\n {% if relation.database -%}\n {{ adapter.verify_database(relation.database) }}\n {%- endif -%}\n {%- call statement('drop_schema') -%}\n drop schema if exists {{ relation.without_identifier().include(database=False) }} cascade\n {%- endcall -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.6651921, "supported_languages": null}, "macro.dbt_postgres.postgres__get_columns_in_relation": {"name": "postgres__get_columns_in_relation", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_columns_in_relation", "macro_sql": "{% macro postgres__get_columns_in_relation(relation) -%}\n {% call statement('get_columns_in_relation', fetch_result=True) %}\n select\n column_name,\n data_type,\n character_maximum_length,\n numeric_precision,\n numeric_scale\n\n from {{ relation.information_schema('columns') }}\n where table_name = '{{ relation.identifier }}'\n {% if relation.schema %}\n and table_schema = '{{ relation.schema }}'\n {% endif %}\n order by ordinal_position\n\n {% endcall %}\n {% set table = load_result('get_columns_in_relation').table %}\n {{ return(sql_convert_columns_in_relation(table)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.sql_convert_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.6661484, "supported_languages": null}, "macro.dbt_postgres.postgres__list_relations_without_caching": {"name": "postgres__list_relations_without_caching", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__list_relations_without_caching", "macro_sql": "{% macro postgres__list_relations_without_caching(schema_relation) %}\n {% call statement('list_relations_without_caching', fetch_result=True) -%}\n select\n '{{ schema_relation.database }}' as database,\n tablename as name,\n schemaname as schema,\n 'table' as type\n from pg_tables\n where schemaname ilike '{{ schema_relation.schema }}'\n union all\n select\n '{{ schema_relation.database }}' as database,\n viewname as name,\n schemaname as schema,\n 'view' as type\n from pg_views\n where schemaname ilike '{{ schema_relation.schema }}'\n union all\n select\n '{{ schema_relation.database }}' as database,\n matviewname as name,\n schemaname as schema,\n 'materialized_view' as type\n from pg_matviews\n where schemaname ilike '{{ schema_relation.schema }}'\n {% endcall %}\n {{ return(load_result('list_relations_without_caching').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_relation", "type": null, "description": ""}], "created_at": 1783708210.6670134, "supported_languages": null}, "macro.dbt_postgres.postgres__information_schema_name": {"name": "postgres__information_schema_name", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__information_schema_name", "macro_sql": "{% macro postgres__information_schema_name(database) -%}\n {% if database_name -%}\n {{ adapter.verify_database(database_name) }}\n {%- endif -%}\n information_schema\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}], "created_at": 1783708210.6673925, "supported_languages": null}, "macro.dbt_postgres.postgres__list_schemas": {"name": "postgres__list_schemas", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__list_schemas", "macro_sql": "{% macro postgres__list_schemas(database) %}\n {% if database -%}\n {{ adapter.verify_database(database) }}\n {%- endif -%}\n {% call statement('list_schemas', fetch_result=True, auto_begin=False) %}\n select distinct nspname from pg_namespace\n {% endcall %}\n {{ return(load_result('list_schemas').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}], "created_at": 1783708210.6681032, "supported_languages": null}, "macro.dbt_postgres.postgres__check_schema_exists": {"name": "postgres__check_schema_exists", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__check_schema_exists", "macro_sql": "{% macro postgres__check_schema_exists(information_schema, schema) -%}\n {% if information_schema.database -%}\n {{ adapter.verify_database(information_schema.database) }}\n {%- endif -%}\n {% call statement('check_schema_exists', fetch_result=True, auto_begin=False) %}\n select count(*) from pg_namespace where nspname = '{{ schema }}'\n {% endcall %}\n {{ return(load_result('check_schema_exists').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "schema", "type": null, "description": ""}], "created_at": 1783708210.6688817, "supported_languages": null}, "macro.dbt_postgres.postgres__make_relation_with_suffix": {"name": "postgres__make_relation_with_suffix", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__make_relation_with_suffix", "macro_sql": "{% macro postgres__make_relation_with_suffix(base_relation, suffix, dstring) %}\n {% if dstring %}\n {% set dt = modules.datetime.datetime.now() %}\n {% set dtstring = dt.strftime(\"%H%M%S%f\") %}\n {% set suffix = suffix ~ dtstring %}\n {% endif %}\n {% set suffix_length = suffix|length %}\n {% set relation_max_name_length = base_relation.relation_max_name_length() %}\n {% if suffix_length > relation_max_name_length %}\n {% do exceptions.raise_compiler_error('Relation suffix is too long (' ~ suffix_length ~ ' characters). Maximum length is ' ~ relation_max_name_length ~ ' characters.') %}\n {% endif %}\n {% set identifier = base_relation.identifier[:relation_max_name_length - suffix_length] ~ suffix %}\n\n {{ return(base_relation.incorporate(path={\"identifier\": identifier })) }}\n\n {% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}, {"name": "dstring", "type": null, "description": ""}], "created_at": 1783708210.6705415, "supported_languages": null}, "macro.dbt_postgres.postgres__make_intermediate_relation": {"name": "postgres__make_intermediate_relation", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__make_intermediate_relation", "macro_sql": "{% macro postgres__make_intermediate_relation(base_relation, suffix) %}\n {{ return(postgres__make_relation_with_suffix(base_relation, suffix, dstring=False)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_relation_with_suffix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1783708210.6709406, "supported_languages": null}, "macro.dbt_postgres.postgres__make_temp_relation": {"name": "postgres__make_temp_relation", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__make_temp_relation", "macro_sql": "{% macro postgres__make_temp_relation(base_relation, suffix) %}\n {% set temp_relation = postgres__make_relation_with_suffix(base_relation, suffix, dstring=True) %}\n {{ return(temp_relation.incorporate(path={\"schema\": none,\n \"database\": none})) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_relation_with_suffix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1783708210.671607, "supported_languages": null}, "macro.dbt_postgres.postgres__make_backup_relation": {"name": "postgres__make_backup_relation", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__make_backup_relation", "macro_sql": "{% macro postgres__make_backup_relation(base_relation, backup_relation_type, suffix) %}\n {% set backup_relation = postgres__make_relation_with_suffix(base_relation, suffix, dstring=False) %}\n {{ return(backup_relation.incorporate(type=backup_relation_type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_relation_with_suffix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "backup_relation_type", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1783708210.6721752, "supported_languages": null}, "macro.dbt_postgres.postgres_escape_comment": {"name": "postgres_escape_comment", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres_escape_comment", "macro_sql": "{% macro postgres_escape_comment(comment) -%}\n {% if comment is not string %}\n {% do exceptions.raise_compiler_error('cannot escape a non-string: ' ~ comment) %}\n {% endif %}\n {%- set magic = '$dbt_comment_literal_block$' -%}\n {%- if magic in comment -%}\n {%- do exceptions.raise_compiler_error('The string ' ~ magic ~ ' is not allowed in comments.') -%}\n {%- endif -%}\n {{ magic }}{{ comment }}{{ magic }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "comment", "type": null, "description": ""}], "created_at": 1783708210.673022, "supported_languages": null}, "macro.dbt_postgres.postgres__alter_relation_comment": {"name": "postgres__alter_relation_comment", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__alter_relation_comment", "macro_sql": "{% macro postgres__alter_relation_comment(relation, comment) %}\n {% set escaped_comment = postgres_escape_comment(comment) %}\n {% if relation.type == 'materialized_view' -%}\n {% set relation_type = \"materialized view\" %}\n {%- else -%}\n {%- set relation_type = relation.type -%}\n {%- endif -%}\n comment on {{ relation_type }} {{ relation }} is {{ escaped_comment }};\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres_escape_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "comment", "type": null, "description": ""}], "created_at": 1783708210.673804, "supported_languages": null}, "macro.dbt_postgres.postgres__alter_column_comment": {"name": "postgres__alter_column_comment", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__alter_column_comment", "macro_sql": "{% macro postgres__alter_column_comment(relation, column_dict) %}\n {% set existing_columns = adapter.get_columns_in_relation(relation) | map(attribute=\"name\") | list %}\n {% for column_name in column_dict if (column_name in existing_columns) %}\n {% set comment = column_dict[column_name]['description'] %}\n {% set escaped_comment = postgres_escape_comment(comment) %}\n comment on column {{ relation }}.{{ adapter.quote(column_name) if column_dict[column_name]['quote'] else column_name }} is {{ escaped_comment }};\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres_escape_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "column_dict", "type": null, "description": ""}], "created_at": 1783708210.675133, "supported_languages": null}, "macro.dbt_postgres.postgres__get_show_grant_sql": {"name": "postgres__get_show_grant_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_show_grant_sql", "macro_sql": "\n\n{%- macro postgres__get_show_grant_sql(relation) -%}\n select grantee, privilege_type\n from {{ relation.information_schema('role_table_grants') }}\n where grantor = current_role\n and grantee != current_role\n and table_schema = '{{ relation.schema }}'\n and table_name = '{{ relation.identifier }}'\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.6755593, "supported_languages": null}, "macro.dbt_postgres.postgres__copy_grants": {"name": "postgres__copy_grants", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__copy_grants", "macro_sql": "{% macro postgres__copy_grants() %}\n {{ return(False) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.6758132, "supported_languages": null}, "macro.dbt_postgres.postgres__get_show_indexes_sql": {"name": "postgres__get_show_indexes_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_show_indexes_sql", "macro_sql": "{% macro postgres__get_show_indexes_sql(relation) %}\n select\n i.relname as name,\n m.amname as method,\n ix.indisunique as \"unique\",\n array_to_string(array_agg(a.attname), ',') as column_names\n from pg_index ix\n join pg_class i\n on i.oid = ix.indexrelid\n join pg_am m\n on m.oid=i.relam\n join pg_class t\n on t.oid = ix.indrelid\n join pg_namespace n\n on n.oid = t.relnamespace\n join pg_attribute a\n on a.attrelid = t.oid\n and a.attnum = ANY(ix.indkey)\n where t.relname = '{{ relation.identifier }}'\n and n.nspname = '{{ relation.schema }}'\n and t.relkind in ('r', 'm')\n group by 1, 2, 3\n order by 1, 2, 3\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.6761904, "supported_languages": null}, "macro.dbt_postgres.postgres__get_drop_index_sql": {"name": "postgres__get_drop_index_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__get_drop_index_sql", "macro_sql": "\n\n\n{%- macro postgres__get_drop_index_sql(relation, index_name) -%}\n drop index if exists \"{{ relation.schema }}\".\"{{ index_name }}\"\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "index_name", "type": null, "description": ""}], "created_at": 1783708210.6764872, "supported_languages": null}, "macro.dbt_postgres.postgres__listagg": {"name": "postgres__listagg", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "unique_id": "macro.dbt_postgres.postgres__listagg", "macro_sql": "{% macro postgres__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n {% if limit_num -%}\n array_to_string(\n (array_agg(\n {{ measure }}\n {% if order_by_clause -%}\n {{ order_by_clause }}\n {%- endif %}\n ))[1:{{ limit_num }}],\n {{ delimiter_text }}\n )\n {%- else %}\n string_agg(\n {{ measure }},\n {{ delimiter_text }}\n {% if order_by_clause -%}\n {{ order_by_clause }}\n {%- endif %}\n )\n {%- endif %}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "measure", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "order_by_clause", "type": null, "description": ""}, {"name": "limit_num", "type": null, "description": ""}], "created_at": 1783708210.677563, "supported_languages": null}, "macro.dbt_postgres.postgres__any_value": {"name": "postgres__any_value", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "unique_id": "macro.dbt_postgres.postgres__any_value", "macro_sql": "{% macro postgres__any_value(expression) -%}\n\n min({{ expression }})\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1783708210.677889, "supported_languages": null}, "macro.dbt_postgres.postgres__last_day": {"name": "postgres__last_day", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt_postgres.postgres__last_day", "macro_sql": "{% macro postgres__last_day(date, datepart) -%}\n\n {%- if datepart == 'quarter' -%}\n -- postgres dateadd does not support quarter interval.\n cast(\n {{dbt.dateadd('day', '-1',\n dbt.dateadd('month', '3', dbt.date_trunc(datepart, date))\n )}}\n as date)\n {%- else -%}\n {{dbt.default_last_day(date, datepart)}}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.date_trunc", "macro.dbt.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783708210.6788688, "supported_languages": null}, "macro.dbt_postgres.postgres__dateadd": {"name": "postgres__dateadd", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "unique_id": "macro.dbt_postgres.postgres__dateadd", "macro_sql": "{% macro postgres__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n {{ from_date_or_timestamp }} + ((interval '1 {{ datepart }}') * ({{ interval }}))\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_date_or_timestamp", "type": null, "description": ""}], "created_at": 1783708210.6793773, "supported_languages": null}, "macro.dbt_postgres.postgres__datediff": {"name": "postgres__datediff", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "unique_id": "macro.dbt_postgres.postgres__datediff", "macro_sql": "{% macro postgres__datediff(first_date, second_date, datepart) -%}\n\n {% if datepart == 'year' %}\n (date_part('year', ({{second_date}})::date) - date_part('year', ({{first_date}})::date))\n {% elif datepart == 'quarter' %}\n ({{ datediff(first_date, second_date, 'year') }} * 4 + date_part('quarter', ({{second_date}})::date) - date_part('quarter', ({{first_date}})::date))\n {% elif datepart == 'month' %}\n ({{ datediff(first_date, second_date, 'year') }} * 12 + date_part('month', ({{second_date}})::date) - date_part('month', ({{first_date}})::date))\n {% elif datepart == 'day' %}\n (({{second_date}})::date - ({{first_date}})::date)\n {% elif datepart == 'week' %}\n ({{ datediff(first_date, second_date, 'day') }} / 7 + case\n when date_part('dow', ({{first_date}})::timestamp) <= date_part('dow', ({{second_date}})::timestamp) then\n case when {{first_date}} <= {{second_date}} then 0 else -1 end\n else\n case when {{first_date}} <= {{second_date}} then 1 else 0 end\n end)\n {% elif datepart == 'hour' %}\n ({{ datediff(first_date, second_date, 'day') }} * 24 + date_part('hour', ({{second_date}})::timestamp) - date_part('hour', ({{first_date}})::timestamp))\n {% elif datepart == 'minute' %}\n ({{ datediff(first_date, second_date, 'hour') }} * 60 + date_part('minute', ({{second_date}})::timestamp) - date_part('minute', ({{first_date}})::timestamp))\n {% elif datepart == 'second' %}\n ({{ datediff(first_date, second_date, 'minute') }} * 60 + floor(date_part('second', ({{second_date}})::timestamp)) - floor(date_part('second', ({{first_date}})::timestamp)))\n {% elif datepart == 'millisecond' %}\n ({{ datediff(first_date, second_date, 'minute') }} * 60000 + floor(date_part('millisecond', ({{second_date}})::timestamp)) - floor(date_part('millisecond', ({{first_date}})::timestamp)))\n {% elif datepart == 'microsecond' %}\n ({{ datediff(first_date, second_date, 'minute') }} * 60000000 + floor(date_part('microsecond', ({{second_date}})::timestamp)) - floor(date_part('microsecond', ({{first_date}})::timestamp)))\n {% else %}\n {{ exceptions.raise_compiler_error(\"Unsupported datepart for macro datediff in postgres: {!r}\".format(datepart)) }}\n {% endif %}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783708210.6833894, "supported_languages": null}, "macro.dbt_postgres.postgres__split_part": {"name": "postgres__split_part", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt_postgres.postgres__split_part", "macro_sql": "{% macro postgres__split_part(string_text, delimiter_text, part_number) %}\n\n {% if part_number >= 0 %}\n {{ dbt.default__split_part(string_text, delimiter_text, part_number) }}\n {% else %}\n {{ dbt._split_part_negative(string_text, delimiter_text, part_number) }}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__split_part", "macro.dbt._split_part_negative"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string_text", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "part_number", "type": null, "description": ""}], "created_at": 1783708210.6842356, "supported_languages": null}, "macro.dbt_postgres.postgres__get_incremental_default_sql": {"name": "postgres__get_incremental_default_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/materializations/incremental_strategies.sql", "original_file_path": "macros/materializations/incremental_strategies.sql", "unique_id": "macro.dbt_postgres.postgres__get_incremental_default_sql", "macro_sql": "{% macro postgres__get_incremental_default_sql(arg_dict) %}\n\n {% if arg_dict[\"unique_key\"] %}\n {% do return(get_incremental_delete_insert_sql(arg_dict)) %}\n {% else %}\n {% do return(get_incremental_append_sql(arg_dict)) %}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_incremental_delete_insert_sql", "macro.dbt.get_incremental_append_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1783708210.6851113, "supported_languages": null}, "macro.dbt_postgres.postgres__get_incremental_microbatch_sql": {"name": "postgres__get_incremental_microbatch_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/materializations/incremental_strategies.sql", "original_file_path": "macros/materializations/incremental_strategies.sql", "unique_id": "macro.dbt_postgres.postgres__get_incremental_microbatch_sql", "macro_sql": "{% macro postgres__get_incremental_microbatch_sql(arg_dict) %}\n\n {% if arg_dict[\"unique_key\"] %}\n {% do return(adapter.dispatch('get_incremental_merge_sql', 'dbt')(arg_dict)) %}\n {% else %}\n {{ exceptions.raise_compiler_error(\"dbt-postgres 'microbatch' requires a `unique_key` config\") }}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_incremental_merge_sql", "macro.dbt.default__get_incremental_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1783708210.685777, "supported_languages": null}, "macro.dbt_postgres.postgres__snapshot_merge_sql": {"name": "postgres__snapshot_merge_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/materializations/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshot_merge.sql", "unique_id": "macro.dbt_postgres.postgres__snapshot_merge_sql", "macro_sql": "{% macro postgres__snapshot_merge_sql(target, source, insert_cols) -%}\n {%- set insert_cols_csv = insert_cols | join(', ') -%}\n\n {%- set columns = config.get(\"snapshot_table_column_names\") or get_snapshot_table_column_names() -%}\n\n update {{ target }}\n set {{ columns.dbt_valid_to }} = DBT_INTERNAL_SOURCE.{{ columns.dbt_valid_to }}\n from {{ source }} as DBT_INTERNAL_SOURCE\n where DBT_INTERNAL_SOURCE.{{ columns.dbt_scd_id }}::text = {{ target }}.{{ columns.dbt_scd_id }}::text\n and DBT_INTERNAL_SOURCE.dbt_change_type::text in ('update'::text, 'delete'::text)\n {% if config.get(\"dbt_valid_to_current\") %}\n and ({{ target }}.{{ columns.dbt_valid_to }} = {{ config.get('dbt_valid_to_current') }} or {{ target }}.{{ columns.dbt_valid_to }} is null);\n {% else %}\n and {{ target }}.{{ columns.dbt_valid_to }} is null;\n {% endif %}\n\n\n insert into {{ target }} ({{ insert_cols_csv }})\n select {% for column in insert_cols -%}\n DBT_INTERNAL_SOURCE.{{ column }} {%- if not loop.last %}, {%- endif %}\n {%- endfor %}\n from {{ source }} as DBT_INTERNAL_SOURCE\n where DBT_INTERNAL_SOURCE.dbt_change_type::text = 'insert'::text;\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_snapshot_table_column_names"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "insert_cols", "type": null, "description": ""}], "created_at": 1783708210.6881, "supported_languages": null}, "macro.dbt_postgres.postgres__formatted_scalar_function_args_sql": {"name": "postgres__formatted_scalar_function_args_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt_postgres.postgres__formatted_scalar_function_args_sql", "macro_sql": "{% macro postgres__formatted_scalar_function_args_sql() %}\n {% set args = [] %}\n {% for arg in model.arguments -%}\n {% set default_value = arg.get('default_value', none) %}\n {% if default_value != none %}\n {%- do args.append(arg.name ~ ' ' ~ arg.data_type ~ ' DEFAULT ' ~ default_value) -%}\n {% else %}\n {%- do args.append(arg.name ~ ' ' ~ arg.data_type) -%}\n {% endif %}\n {%- endfor %}\n {{ args | join(', ') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.6895308, "supported_languages": null}, "macro.dbt_postgres.postgres__describe_materialized_view": {"name": "postgres__describe_materialized_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/describe.sql", "original_file_path": "macros/relations/materialized_view/describe.sql", "unique_id": "macro.dbt_postgres.postgres__describe_materialized_view", "macro_sql": "{% macro postgres__describe_materialized_view(relation) %}\n -- for now just get the indexes, we don't need the name or the query yet\n {% set _indexes = run_query(get_show_indexes_sql(relation)) %}\n {% do return({'indexes': _indexes}) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.get_show_indexes_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.69016, "supported_languages": null}, "macro.dbt_postgres.postgres__drop_materialized_view": {"name": "postgres__drop_materialized_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/drop.sql", "original_file_path": "macros/relations/materialized_view/drop.sql", "unique_id": "macro.dbt_postgres.postgres__drop_materialized_view", "macro_sql": "{% macro postgres__drop_materialized_view(relation) -%}\n drop materialized view if exists {{ relation }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.6904612, "supported_languages": null}, "macro.dbt_postgres.postgres__refresh_materialized_view": {"name": "postgres__refresh_materialized_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/refresh.sql", "original_file_path": "macros/relations/materialized_view/refresh.sql", "unique_id": "macro.dbt_postgres.postgres__refresh_materialized_view", "macro_sql": "{% macro postgres__refresh_materialized_view(relation) %}\n refresh materialized view {{ relation }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.6907485, "supported_languages": null}, "macro.dbt_postgres.postgres__get_rename_materialized_view_sql": {"name": "postgres__get_rename_materialized_view_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/rename.sql", "original_file_path": "macros/relations/materialized_view/rename.sql", "unique_id": "macro.dbt_postgres.postgres__get_rename_materialized_view_sql", "macro_sql": "{% macro postgres__get_rename_materialized_view_sql(relation, new_name) %}\n alter materialized view {{ relation }} rename to {{ new_name }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1783708210.6912441, "supported_languages": null}, "macro.dbt_postgres.postgres__get_create_materialized_view_as_sql": {"name": "postgres__get_create_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/create.sql", "original_file_path": "macros/relations/materialized_view/create.sql", "unique_id": "macro.dbt_postgres.postgres__get_create_materialized_view_as_sql", "macro_sql": "{% macro postgres__get_create_materialized_view_as_sql(relation, sql) %}\n create materialized view if not exists {{ relation }} as {{ sql }};\n\n {% for _index_dict in config.get('indexes', []) -%}\n {{- get_create_index_sql(relation, _index_dict) -}}{{ ';' if not loop.last else \"\" }}\n {%- endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783708210.6921196, "supported_languages": null}, "macro.dbt_postgres.postgres__get_alter_materialized_view_as_sql": {"name": "postgres__get_alter_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt_postgres.postgres__get_alter_materialized_view_as_sql", "macro_sql": "{% macro postgres__get_alter_materialized_view_as_sql(\n relation,\n configuration_changes,\n sql,\n existing_relation,\n backup_relation,\n intermediate_relation\n) %}\n\n -- apply a full refresh immediately if needed\n {% if configuration_changes.requires_full_refresh %}\n\n {{ get_replace_sql(existing_relation, relation, sql) }}\n\n -- otherwise apply individual changes as needed\n {% else %}\n\n {{ postgres__update_indexes_on_materialized_view(relation, configuration_changes.indexes) }}\n\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_replace_sql", "macro.dbt_postgres.postgres__update_indexes_on_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "configuration_changes", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}, {"name": "existing_relation", "type": null, "description": ""}, {"name": "backup_relation", "type": null, "description": ""}, {"name": "intermediate_relation", "type": null, "description": ""}], "created_at": 1783708210.6932237, "supported_languages": null}, "macro.dbt_postgres.postgres__update_indexes_on_materialized_view": {"name": "postgres__update_indexes_on_materialized_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt_postgres.postgres__update_indexes_on_materialized_view", "macro_sql": "\n\n\n{%- macro postgres__update_indexes_on_materialized_view(relation, index_changes) -%}\n {{- log(\"Applying UPDATE INDEXES to: \" ~ relation) -}}\n\n {%- for _index_change in index_changes -%}\n {%- set _index = _index_change.context -%}\n\n {%- if _index_change.action == \"drop\" -%}\n\n {{ postgres__get_drop_index_sql(relation, _index.name) }}\n\n {%- elif _index_change.action == \"create\" -%}\n\n {{ postgres__get_create_index_sql(relation, _index.as_node_config) }}\n\n {%- endif -%}\n\t{{ ';' if not loop.last else \"\" }}\n\n {%- endfor -%}\n\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_drop_index_sql", "macro.dbt_postgres.postgres__get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "index_changes", "type": null, "description": ""}], "created_at": 1783708210.6943188, "supported_languages": null}, "macro.dbt_postgres.postgres__get_materialized_view_configuration_changes": {"name": "postgres__get_materialized_view_configuration_changes", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt_postgres.postgres__get_materialized_view_configuration_changes", "macro_sql": "{% macro postgres__get_materialized_view_configuration_changes(existing_relation, new_config) %}\n {% set _existing_materialized_view = postgres__describe_materialized_view(existing_relation) %}\n {% set _configuration_changes = existing_relation.get_materialized_view_config_change_collection(_existing_materialized_view, new_config.model) %}\n {% do return(_configuration_changes) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__describe_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "existing_relation", "type": null, "description": ""}, {"name": "new_config", "type": null, "description": ""}], "created_at": 1783708210.694915, "supported_languages": null}, "macro.dbt_postgres.postgres__get_replace_view_sql": {"name": "postgres__get_replace_view_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt_postgres.postgres__get_replace_view_sql", "macro_sql": "{% macro postgres__get_replace_view_sql(relation, sql) -%}\n\n {%- set sql_header = config.get('sql_header', none) -%}\n {{ sql_header if sql_header is not none }}\n\n create or replace view {{ relation }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced %}\n {{ get_assert_columns_equivalent(sql) }}\n {%- endif %}\n as (\n {{ sql }}\n );\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783708210.6959763, "supported_languages": null}, "macro.dbt_postgres.postgres__drop_view": {"name": "postgres__drop_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/view/drop.sql", "original_file_path": "macros/relations/view/drop.sql", "unique_id": "macro.dbt_postgres.postgres__drop_view", "macro_sql": "{% macro postgres__drop_view(relation) -%}\n drop view if exists {{ relation }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.696301, "supported_languages": null}, "macro.dbt_postgres.postgres__get_rename_view_sql": {"name": "postgres__get_rename_view_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/view/rename.sql", "original_file_path": "macros/relations/view/rename.sql", "unique_id": "macro.dbt_postgres.postgres__get_rename_view_sql", "macro_sql": "{% macro postgres__get_rename_view_sql(relation, new_name) %}\n alter view {{ relation }} rename to {{ new_name }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1783708210.6966515, "supported_languages": null}, "macro.dbt_postgres.postgres__get_replace_table_sql": {"name": "postgres__get_replace_table_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/table/replace.sql", "original_file_path": "macros/relations/table/replace.sql", "unique_id": "macro.dbt_postgres.postgres__get_replace_table_sql", "macro_sql": "{% macro postgres__get_replace_table_sql(relation, sql) -%}\n\n {%- set sql_header = config.get('sql_header', none) -%}\n {{ sql_header if sql_header is not none }}\n\n create or replace table {{ relation }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced %}\n {{ get_assert_columns_equivalent(sql) }}\n {{ get_table_columns_and_constraints() }}\n {%- set sql = get_select_subquery(sql) %}\n {% endif %}\n as (\n {{ sql }}\n );\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent", "macro.dbt.get_table_columns_and_constraints", "macro.dbt.get_select_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783708210.6978967, "supported_languages": null}, "macro.dbt_postgres.postgres__drop_table": {"name": "postgres__drop_table", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/table/drop.sql", "original_file_path": "macros/relations/table/drop.sql", "unique_id": "macro.dbt_postgres.postgres__drop_table", "macro_sql": "{% macro postgres__drop_table(relation) -%}\n drop table if exists {{ relation }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.6982262, "supported_languages": null}, "macro.dbt_postgres.postgres__get_rename_table_sql": {"name": "postgres__get_rename_table_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/relations/table/rename.sql", "original_file_path": "macros/relations/table/rename.sql", "unique_id": "macro.dbt_postgres.postgres__get_rename_table_sql", "macro_sql": "{% macro postgres__get_rename_table_sql(relation, new_name) %}\n alter table {{ relation }} rename to {{ new_name }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1783708210.6985815, "supported_languages": null}, "macro.dbt.type_string": {"name": "type_string", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_string", "macro_sql": "\n\n{%- macro type_string() -%}\n {{ return(adapter.dispatch('type_string', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.6998897, "supported_languages": null}, "macro.dbt.default__type_string": {"name": "default__type_string", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_string", "macro_sql": "{% macro default__type_string() %}\n {{ return(api.Column.translate_type(\"string\")) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.700231, "supported_languages": null}, "macro.dbt.type_timestamp": {"name": "type_timestamp", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_timestamp", "macro_sql": "\n\n{%- macro type_timestamp() -%}\n {{ return(adapter.dispatch('type_timestamp', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.700566, "supported_languages": null}, "macro.dbt.default__type_timestamp": {"name": "default__type_timestamp", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_timestamp", "macro_sql": "{% macro default__type_timestamp() %}\n {{ return(api.Column.translate_type(\"timestamp\")) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.7008734, "supported_languages": null}, "macro.dbt.type_float": {"name": "type_float", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_float", "macro_sql": "\n\n{%- macro type_float() -%}\n {{ return(adapter.dispatch('type_float', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.7013266, "supported_languages": null}, "macro.dbt.default__type_float": {"name": "default__type_float", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_float", "macro_sql": "{% macro default__type_float() %}\n {{ return(api.Column.translate_type(\"float\")) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.7016373, "supported_languages": null}, "macro.dbt.type_numeric": {"name": "type_numeric", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_numeric", "macro_sql": "\n\n{%- macro type_numeric() -%}\n {{ return(adapter.dispatch('type_numeric', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.7019665, "supported_languages": null}, "macro.dbt.default__type_numeric": {"name": "default__type_numeric", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_numeric", "macro_sql": "{% macro default__type_numeric() %}\n {{ return(api.Column.numeric_type(\"numeric\", 28, 6)) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.702349, "supported_languages": null}, "macro.dbt.type_bigint": {"name": "type_bigint", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_bigint", "macro_sql": "\n\n{%- macro type_bigint() -%}\n {{ return(adapter.dispatch('type_bigint', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.7026832, "supported_languages": null}, "macro.dbt.default__type_bigint": {"name": "default__type_bigint", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_bigint", "macro_sql": "{% macro default__type_bigint() %}\n {{ return(api.Column.translate_type(\"bigint\")) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.7029943, "supported_languages": null}, "macro.dbt.type_int": {"name": "type_int", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_int", "macro_sql": "\n\n{%- macro type_int() -%}\n {{ return(adapter.dispatch('type_int', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.703354, "supported_languages": null}, "macro.dbt.default__type_int": {"name": "default__type_int", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_int", "macro_sql": "{%- macro default__type_int() -%}\n {{ return(api.Column.translate_type(\"integer\")) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.703671, "supported_languages": null}, "macro.dbt.type_boolean": {"name": "type_boolean", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.type_boolean", "macro_sql": "\n\n{%- macro type_boolean() -%}\n {{ return(adapter.dispatch('type_boolean', 'dbt')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__type_boolean"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.7040067, "supported_languages": null}, "macro.dbt.default__type_boolean": {"name": "default__type_boolean", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "unique_id": "macro.dbt.default__type_boolean", "macro_sql": "{%- macro default__type_boolean() -%}\n {{ return(api.Column.translate_type(\"boolean\")) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.7043242, "supported_languages": null}, "macro.dbt.string_literal": {"name": "string_literal", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/literal.sql", "original_file_path": "macros/utils/literal.sql", "unique_id": "macro.dbt.string_literal", "macro_sql": "{%- macro string_literal(value) -%}\n {{ return(adapter.dispatch('string_literal', 'dbt') (value)) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__string_literal"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "value", "type": null, "description": ""}], "created_at": 1783708210.7048192, "supported_languages": null}, "macro.dbt.default__string_literal": {"name": "default__string_literal", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/literal.sql", "original_file_path": "macros/utils/literal.sql", "unique_id": "macro.dbt.default__string_literal", "macro_sql": "{% macro default__string_literal(value) -%}\n '{{ value }}'\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "value", "type": null, "description": ""}], "created_at": 1783708210.7050388, "supported_languages": null}, "macro.dbt.safe_cast": {"name": "safe_cast", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/safe_cast.sql", "original_file_path": "macros/utils/safe_cast.sql", "unique_id": "macro.dbt.safe_cast", "macro_sql": "{% macro safe_cast(field, type) %}\n {{ return(adapter.dispatch('safe_cast', 'dbt') (field, type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1783708210.7056277, "supported_languages": null}, "macro.dbt.default__safe_cast": {"name": "default__safe_cast", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/safe_cast.sql", "original_file_path": "macros/utils/safe_cast.sql", "unique_id": "macro.dbt.default__safe_cast", "macro_sql": "{% macro default__safe_cast(field, type) %}\n {# most databases don't support this function yet\n so we just need to use cast #}\n cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1783708210.705919, "supported_languages": null}, "macro.dbt.cast": {"name": "cast", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/cast.sql", "original_file_path": "macros/utils/cast.sql", "unique_id": "macro.dbt.cast", "macro_sql": "{% macro cast(field, type) %}\n {{ return(adapter.dispatch('cast', 'dbt') (field, type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1783708210.706514, "supported_languages": null}, "macro.dbt.default__cast": {"name": "default__cast", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/cast.sql", "original_file_path": "macros/utils/cast.sql", "unique_id": "macro.dbt.default__cast", "macro_sql": "{% macro default__cast(field, type) %}\n cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1783708210.7067933, "supported_languages": null}, "macro.dbt.get_powers_of_two": {"name": "get_powers_of_two", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/generate_series.sql", "original_file_path": "macros/utils/generate_series.sql", "unique_id": "macro.dbt.get_powers_of_two", "macro_sql": "{% macro get_powers_of_two(upper_bound) %}\n {{ return(adapter.dispatch('get_powers_of_two', 'dbt')(upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1783708210.7076392, "supported_languages": null}, "macro.dbt.default__get_powers_of_two": {"name": "default__get_powers_of_two", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/generate_series.sql", "original_file_path": "macros/utils/generate_series.sql", "unique_id": "macro.dbt.default__get_powers_of_two", "macro_sql": "{% macro default__get_powers_of_two(upper_bound) %}\n\n {% if upper_bound <= 0 %}\n {{ exceptions.raise_compiler_error(\"upper bound must be positive\") }}\n {% endif %}\n\n {% for _ in range(1, 100) %}\n {% if upper_bound <= 2 ** loop.index %}{{ return(loop.index) }}{% endif %}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1783708210.7086093, "supported_languages": null}, "macro.dbt.generate_series": {"name": "generate_series", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/generate_series.sql", "original_file_path": "macros/utils/generate_series.sql", "unique_id": "macro.dbt.generate_series", "macro_sql": "{% macro generate_series(upper_bound) %}\n {{ return(adapter.dispatch('generate_series', 'dbt')(upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_series"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1783708210.7089996, "supported_languages": null}, "macro.dbt.default__generate_series": {"name": "default__generate_series", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/generate_series.sql", "original_file_path": "macros/utils/generate_series.sql", "unique_id": "macro.dbt.default__generate_series", "macro_sql": "{% macro default__generate_series(upper_bound) %}\n\n {% set n = dbt.get_powers_of_two(upper_bound) %}\n\n with p as (\n select 0 as generated_number union all select 1\n ), unioned as (\n\n select\n\n {% for i in range(n) %}\n p{{i}}.generated_number * power(2, {{i}})\n {% if not loop.last %} + {% endif %}\n {% endfor %}\n + 1\n as generated_number\n\n from\n\n {% for i in range(n) %}\n p as p{{i}}\n {% if not loop.last %} cross join {% endif %}\n {% endfor %}\n\n )\n\n select *\n from unioned\n where generated_number <= {{upper_bound}}\n order by generated_number\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1783708210.710082, "supported_languages": null}, "macro.dbt.date_trunc": {"name": "date_trunc", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_trunc.sql", "original_file_path": "macros/utils/date_trunc.sql", "unique_id": "macro.dbt.date_trunc", "macro_sql": "{% macro date_trunc(datepart, date) -%}\n {{ return(adapter.dispatch('date_trunc', 'dbt') (datepart, date)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "date", "type": null, "description": ""}], "created_at": 1783708210.7106454, "supported_languages": null}, "macro.dbt.default__date_trunc": {"name": "default__date_trunc", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_trunc.sql", "original_file_path": "macros/utils/date_trunc.sql", "unique_id": "macro.dbt.default__date_trunc", "macro_sql": "{% macro default__date_trunc(datepart, date) -%}\n date_trunc('{{datepart}}', {{date}})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "date", "type": null, "description": ""}], "created_at": 1783708210.710921, "supported_languages": null}, "macro.dbt.listagg": {"name": "listagg", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "unique_id": "macro.dbt.listagg", "macro_sql": "{% macro listagg(measure, delimiter_text=\"','\", order_by_clause=none, limit_num=none) -%}\n {{ return(adapter.dispatch('listagg', 'dbt') (measure, delimiter_text, order_by_clause, limit_num)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__listagg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "measure", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "order_by_clause", "type": null, "description": ""}, {"name": "limit_num", "type": null, "description": ""}], "created_at": 1783708210.7117999, "supported_languages": null}, "macro.dbt.default__listagg": {"name": "default__listagg", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "unique_id": "macro.dbt.default__listagg", "macro_sql": "{% macro default__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n {% if limit_num -%}\n array_to_string(\n array_slice(\n array_agg(\n {{ measure }}\n ){% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n ,0\n ,{{ limit_num }}\n ),\n {{ delimiter_text }}\n )\n {%- else %}\n listagg(\n {{ measure }},\n {{ delimiter_text }}\n )\n {% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n {%- endif %}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "measure", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "order_by_clause", "type": null, "description": ""}, {"name": "limit_num", "type": null, "description": ""}], "created_at": 1783708210.7126448, "supported_languages": null}, "macro.dbt.replace": {"name": "replace", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/replace.sql", "original_file_path": "macros/utils/replace.sql", "unique_id": "macro.dbt.replace", "macro_sql": "{% macro replace(field, old_chars, new_chars) -%}\n {{ return(adapter.dispatch('replace', 'dbt') (field, old_chars, new_chars)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__replace"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "old_chars", "type": null, "description": ""}, {"name": "new_chars", "type": null, "description": ""}], "created_at": 1783708210.7132747, "supported_languages": null}, "macro.dbt.default__replace": {"name": "default__replace", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/replace.sql", "original_file_path": "macros/utils/replace.sql", "unique_id": "macro.dbt.default__replace", "macro_sql": "{% macro default__replace(field, old_chars, new_chars) %}\n\n replace(\n {{ field }},\n {{ old_chars }},\n {{ new_chars }}\n )\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "old_chars", "type": null, "description": ""}, {"name": "new_chars", "type": null, "description": ""}], "created_at": 1783708210.713616, "supported_languages": null}, "macro.dbt.any_value": {"name": "any_value", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "unique_id": "macro.dbt.any_value", "macro_sql": "{% macro any_value(expression) -%}\n {{ return(adapter.dispatch('any_value', 'dbt') (expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__any_value"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1783708210.714123, "supported_languages": null}, "macro.dbt.default__any_value": {"name": "default__any_value", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "unique_id": "macro.dbt.default__any_value", "macro_sql": "{% macro default__any_value(expression) -%}\n\n any_value({{ expression }})\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1783708210.7143517, "supported_languages": null}, "macro.dbt.except": {"name": "except", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/except.sql", "original_file_path": "macros/utils/except.sql", "unique_id": "macro.dbt.except", "macro_sql": "{% macro except() %}\n {{ return(adapter.dispatch('except', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.7148077, "supported_languages": null}, "macro.dbt.default__except": {"name": "default__except", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/except.sql", "original_file_path": "macros/utils/except.sql", "unique_id": "macro.dbt.default__except", "macro_sql": "{% macro default__except() %}\n\n except\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.7149746, "supported_languages": null}, "macro.dbt.last_day": {"name": "last_day", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt.last_day", "macro_sql": "{% macro last_day(date, datepart) %}\n {{ return(adapter.dispatch('last_day', 'dbt') (date, datepart)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783708210.7156086, "supported_languages": null}, "macro.dbt.default_last_day": {"name": "default_last_day", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt.default_last_day", "macro_sql": "\n\n{%- macro default_last_day(date, datepart) -%}\n cast(\n {{dbt.dateadd('day', '-1',\n dbt.dateadd(datepart, '1', dbt.date_trunc(datepart, date))\n )}}\n as date)\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783708210.7161686, "supported_languages": null}, "macro.dbt.default__last_day": {"name": "default__last_day", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "unique_id": "macro.dbt.default__last_day", "macro_sql": "{% macro default__last_day(date, datepart) -%}\n {{dbt.default_last_day(date, datepart)}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783708210.7164752, "supported_languages": null}, "macro.dbt.date": {"name": "date", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date.sql", "original_file_path": "macros/utils/date.sql", "unique_id": "macro.dbt.date", "macro_sql": "{% macro date(year, month, day) %}\n {{ return(adapter.dispatch('date', 'dbt') (year, month, day)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__date"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "year", "type": null, "description": ""}, {"name": "month", "type": null, "description": ""}, {"name": "day", "type": null, "description": ""}], "created_at": 1783708210.7172382, "supported_languages": null}, "macro.dbt.default__date": {"name": "default__date", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date.sql", "original_file_path": "macros/utils/date.sql", "unique_id": "macro.dbt.default__date", "macro_sql": "{% macro default__date(year, month, day) -%}\n {%- set dt = modules.datetime.date(year, month, day) -%}\n {%- set iso_8601_formatted_date = dt.strftime('%Y-%m-%d') -%}\n to_date('{{ iso_8601_formatted_date }}', 'YYYY-MM-DD')\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "year", "type": null, "description": ""}, {"name": "month", "type": null, "description": ""}, {"name": "day", "type": null, "description": ""}], "created_at": 1783708210.7178543, "supported_languages": null}, "macro.dbt.array_concat": {"name": "array_concat", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_concat.sql", "original_file_path": "macros/utils/array_concat.sql", "unique_id": "macro.dbt.array_concat", "macro_sql": "{% macro array_concat(array_1, array_2) -%}\n {{ return(adapter.dispatch('array_concat', 'dbt')(array_1, array_2)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__array_concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "array_1", "type": null, "description": ""}, {"name": "array_2", "type": null, "description": ""}], "created_at": 1783708210.718425, "supported_languages": null}, "macro.dbt.default__array_concat": {"name": "default__array_concat", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_concat.sql", "original_file_path": "macros/utils/array_concat.sql", "unique_id": "macro.dbt.default__array_concat", "macro_sql": "{% macro default__array_concat(array_1, array_2) -%}\n array_cat({{ array_1 }}, {{ array_2 }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "array_1", "type": null, "description": ""}, {"name": "array_2", "type": null, "description": ""}], "created_at": 1783708210.7187066, "supported_languages": null}, "macro.dbt.get_intervals_between": {"name": "get_intervals_between", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_spine.sql", "original_file_path": "macros/utils/date_spine.sql", "unique_id": "macro.dbt.get_intervals_between", "macro_sql": "{% macro get_intervals_between(start_date, end_date, datepart) -%}\n {{ return(adapter.dispatch('get_intervals_between', 'dbt')(start_date, end_date, datepart)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_intervals_between"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783708210.7196999, "supported_languages": null}, "macro.dbt.default__get_intervals_between": {"name": "default__get_intervals_between", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_spine.sql", "original_file_path": "macros/utils/date_spine.sql", "unique_id": "macro.dbt.default__get_intervals_between", "macro_sql": "{% macro default__get_intervals_between(start_date, end_date, datepart) -%}\n {%- call statement('get_intervals_between', fetch_result=True) %}\n\n select {{ dbt.datediff(start_date, end_date, datepart) }}\n\n {%- endcall -%}\n\n {%- set value_list = load_result('get_intervals_between') -%}\n\n {%- if value_list and value_list['data'] -%}\n {%- set values = value_list['data'] | map(attribute=0) | list %}\n {{ return(values[0]) }}\n {%- else -%}\n {{ return(1) }}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783708210.7209308, "supported_languages": null}, "macro.dbt.date_spine": {"name": "date_spine", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_spine.sql", "original_file_path": "macros/utils/date_spine.sql", "unique_id": "macro.dbt.date_spine", "macro_sql": "{% macro date_spine(datepart, start_date, end_date) %}\n {{ return(adapter.dispatch('date_spine', 'dbt')(datepart, start_date, end_date)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1783708210.7214296, "supported_languages": null}, "macro.dbt.default__date_spine": {"name": "default__date_spine", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/date_spine.sql", "original_file_path": "macros/utils/date_spine.sql", "unique_id": "macro.dbt.default__date_spine", "macro_sql": "{% macro default__date_spine(datepart, start_date, end_date) %}\n\n\n {# call as follows:\n\n date_spine(\n \"day\",\n \"to_date('01/01/2016', 'mm/dd/yyyy')\",\n \"dbt.dateadd(week, 1, current_date)\"\n ) #}\n\n\n with rawdata as (\n\n {{dbt.generate_series(\n dbt.get_intervals_between(start_date, end_date, datepart)\n )}}\n\n ),\n\n all_periods as (\n\n select (\n {{\n dbt.dateadd(\n datepart,\n \"row_number() over (order by 1) - 1\",\n start_date\n )\n }}\n ) as date_{{datepart}}\n from rawdata\n\n ),\n\n filtered as (\n\n select *\n from all_periods\n where date_{{datepart}} <= {{ end_date }}\n\n )\n\n select * from filtered\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.generate_series", "macro.dbt.get_intervals_between", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1783708210.7221644, "supported_languages": null}, "macro.dbt.dateadd": {"name": "dateadd", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "unique_id": "macro.dbt.dateadd", "macro_sql": "{% macro dateadd(datepart, interval, from_date_or_timestamp) %}\n {{ return(adapter.dispatch('dateadd', 'dbt')(datepart, interval, from_date_or_timestamp)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_date_or_timestamp", "type": null, "description": ""}], "created_at": 1783708210.7227838, "supported_languages": null}, "macro.dbt.default__dateadd": {"name": "default__dateadd", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "unique_id": "macro.dbt.default__dateadd", "macro_sql": "{% macro default__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n dateadd(\n {{ datepart }},\n {{ interval }},\n {{ from_date_or_timestamp }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_date_or_timestamp", "type": null, "description": ""}], "created_at": 1783708210.7231503, "supported_languages": null}, "macro.dbt.cast_bool_to_text": {"name": "cast_bool_to_text", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/cast_bool_to_text.sql", "original_file_path": "macros/utils/cast_bool_to_text.sql", "unique_id": "macro.dbt.cast_bool_to_text", "macro_sql": "{% macro cast_bool_to_text(field) %}\n {{ adapter.dispatch('cast_bool_to_text', 'dbt') (field) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1783708210.7238998, "supported_languages": null}, "macro.dbt.default__cast_bool_to_text": {"name": "default__cast_bool_to_text", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/cast_bool_to_text.sql", "original_file_path": "macros/utils/cast_bool_to_text.sql", "unique_id": "macro.dbt.default__cast_bool_to_text", "macro_sql": "{% macro default__cast_bool_to_text(field) %}\n cast({{ field }} as {{ api.Column.translate_type('string') }})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1783708210.7243154, "supported_languages": null}, "macro.dbt.array_append": {"name": "array_append", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_append.sql", "original_file_path": "macros/utils/array_append.sql", "unique_id": "macro.dbt.array_append", "macro_sql": "{% macro array_append(array, new_element) -%}\n {{ return(adapter.dispatch('array_append', 'dbt')(array, new_element)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__array_append"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "array", "type": null, "description": ""}, {"name": "new_element", "type": null, "description": ""}], "created_at": 1783708210.7248862, "supported_languages": null}, "macro.dbt.default__array_append": {"name": "default__array_append", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_append.sql", "original_file_path": "macros/utils/array_append.sql", "unique_id": "macro.dbt.default__array_append", "macro_sql": "{% macro default__array_append(array, new_element) -%}\n array_append({{ array }}, {{ new_element }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "array", "type": null, "description": ""}, {"name": "new_element", "type": null, "description": ""}], "created_at": 1783708210.7252018, "supported_languages": null}, "macro.dbt.concat": {"name": "concat", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/concat.sql", "original_file_path": "macros/utils/concat.sql", "unique_id": "macro.dbt.concat", "macro_sql": "{% macro concat(fields) -%}\n {{ return(adapter.dispatch('concat', 'dbt')(fields)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "fields", "type": null, "description": ""}], "created_at": 1783708210.7256892, "supported_languages": null}, "macro.dbt.default__concat": {"name": "default__concat", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/concat.sql", "original_file_path": "macros/utils/concat.sql", "unique_id": "macro.dbt.default__concat", "macro_sql": "{% macro default__concat(fields) -%}\n {{ fields|join(' || ') }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "fields", "type": null, "description": ""}], "created_at": 1783708210.725951, "supported_languages": null}, "macro.dbt.bool_or": {"name": "bool_or", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/bool_or.sql", "original_file_path": "macros/utils/bool_or.sql", "unique_id": "macro.dbt.bool_or", "macro_sql": "{% macro bool_or(expression) -%}\n {{ return(adapter.dispatch('bool_or', 'dbt') (expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__bool_or"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1783708210.726724, "supported_languages": null}, "macro.dbt.default__bool_or": {"name": "default__bool_or", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/bool_or.sql", "original_file_path": "macros/utils/bool_or.sql", "unique_id": "macro.dbt.default__bool_or", "macro_sql": "{% macro default__bool_or(expression) -%}\n\n bool_or({{ expression }})\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1783708210.7269504, "supported_languages": null}, "macro.dbt.hash": {"name": "hash", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/hash.sql", "original_file_path": "macros/utils/hash.sql", "unique_id": "macro.dbt.hash", "macro_sql": "{% macro hash(field) -%}\n {{ return(adapter.dispatch('hash', 'dbt') (field)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__hash"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1783708210.7274923, "supported_languages": null}, "macro.dbt.default__hash": {"name": "default__hash", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/hash.sql", "original_file_path": "macros/utils/hash.sql", "unique_id": "macro.dbt.default__hash", "macro_sql": "{% macro default__hash(field) -%}\n md5(cast({{ field }} as {{ api.Column.translate_type('string') }}))\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1783708210.7278192, "supported_languages": null}, "macro.dbt.array_construct": {"name": "array_construct", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_construct.sql", "original_file_path": "macros/utils/array_construct.sql", "unique_id": "macro.dbt.array_construct", "macro_sql": "{% macro array_construct(inputs=[], data_type=api.Column.translate_type('integer')) -%}\n {{ return(adapter.dispatch('array_construct', 'dbt')(inputs, data_type)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__array_construct"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "inputs", "type": null, "description": ""}, {"name": "data_type", "type": null, "description": ""}], "created_at": 1783708210.7285938, "supported_languages": null}, "macro.dbt.default__array_construct": {"name": "default__array_construct", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/array_construct.sql", "original_file_path": "macros/utils/array_construct.sql", "unique_id": "macro.dbt.default__array_construct", "macro_sql": "{% macro default__array_construct(inputs, data_type) -%}\n {% if inputs|length > 0 %}\n array[ {{ inputs|join(' , ') }} ]\n {% else %}\n array[]::{{data_type}}[]\n {% endif %}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "inputs", "type": null, "description": ""}, {"name": "data_type", "type": null, "description": ""}], "created_at": 1783708210.7291138, "supported_languages": null}, "macro.dbt.right": {"name": "right", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/right.sql", "original_file_path": "macros/utils/right.sql", "unique_id": "macro.dbt.right", "macro_sql": "{% macro right(string_text, length_expression) -%}\n {{ return(adapter.dispatch('right', 'dbt') (string_text, length_expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__right"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string_text", "type": null, "description": ""}, {"name": "length_expression", "type": null, "description": ""}], "created_at": 1783708210.7296805, "supported_languages": null}, "macro.dbt.default__right": {"name": "default__right", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/right.sql", "original_file_path": "macros/utils/right.sql", "unique_id": "macro.dbt.default__right", "macro_sql": "{% macro default__right(string_text, length_expression) %}\n\n right(\n {{ string_text }},\n {{ length_expression }}\n )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string_text", "type": null, "description": ""}, {"name": "length_expression", "type": null, "description": ""}], "created_at": 1783708210.7299676, "supported_languages": null}, "macro.dbt.escape_single_quotes": {"name": "escape_single_quotes", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/escape_single_quotes.sql", "original_file_path": "macros/utils/escape_single_quotes.sql", "unique_id": "macro.dbt.escape_single_quotes", "macro_sql": "{% macro escape_single_quotes(expression) %}\n {{ return(adapter.dispatch('escape_single_quotes', 'dbt') (expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__escape_single_quotes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1783708210.730612, "supported_languages": null}, "macro.dbt.default__escape_single_quotes": {"name": "default__escape_single_quotes", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/escape_single_quotes.sql", "original_file_path": "macros/utils/escape_single_quotes.sql", "unique_id": "macro.dbt.default__escape_single_quotes", "macro_sql": "{% macro default__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\",\"''\") }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1783708210.7309074, "supported_languages": null}, "macro.dbt.datediff": {"name": "datediff", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "unique_id": "macro.dbt.datediff", "macro_sql": "{% macro datediff(first_date, second_date, datepart) %}\n {{ return(adapter.dispatch('datediff', 'dbt')(first_date, second_date, datepart)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783708210.7315502, "supported_languages": null}, "macro.dbt.default__datediff": {"name": "default__datediff", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "unique_id": "macro.dbt.default__datediff", "macro_sql": "{% macro default__datediff(first_date, second_date, datepart) -%}\n\n datediff(\n {{ datepart }},\n {{ first_date }},\n {{ second_date }}\n )\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783708210.7318969, "supported_languages": null}, "macro.dbt.intersect": {"name": "intersect", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/intersect.sql", "original_file_path": "macros/utils/intersect.sql", "unique_id": "macro.dbt.intersect", "macro_sql": "{% macro intersect() %}\n {{ return(adapter.dispatch('intersect', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__intersect"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.7323868, "supported_languages": null}, "macro.dbt.default__intersect": {"name": "default__intersect", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/intersect.sql", "original_file_path": "macros/utils/intersect.sql", "unique_id": "macro.dbt.default__intersect", "macro_sql": "{% macro default__intersect() %}\n\n intersect\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.7325585, "supported_languages": null}, "macro.dbt.equals": {"name": "equals", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/equals.sql", "original_file_path": "macros/utils/equals.sql", "unique_id": "macro.dbt.equals", "macro_sql": "{% macro equals(expr1, expr2) %}\n {{ return(adapter.dispatch('equals', 'dbt') (expr1, expr2)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__equals"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expr1", "type": null, "description": ""}, {"name": "expr2", "type": null, "description": ""}], "created_at": 1783708210.7332168, "supported_languages": null}, "macro.dbt.default__equals": {"name": "default__equals", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/equals.sql", "original_file_path": "macros/utils/equals.sql", "unique_id": "macro.dbt.default__equals", "macro_sql": "{% macro default__equals(expr1, expr2) -%}\n{%- if adapter.behavior.enable_truthy_nulls_equals_macro.no_warn %}\n case when (({{ expr1 }} = {{ expr2 }}) or ({{ expr1 }} is null and {{ expr2 }} is null))\n then 0\n else 1\n end = 0\n{%- else -%}\n ({{ expr1 }} = {{ expr2 }})\n{%- endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expr1", "type": null, "description": ""}, {"name": "expr2", "type": null, "description": ""}], "created_at": 1783708210.7339327, "supported_languages": null}, "macro.dbt.split_part": {"name": "split_part", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt.split_part", "macro_sql": "{% macro split_part(string_text, delimiter_text, part_number) %}\n {{ return(adapter.dispatch('split_part', 'dbt') (string_text, delimiter_text, part_number)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__split_part"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string_text", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "part_number", "type": null, "description": ""}], "created_at": 1783708210.734683, "supported_languages": null}, "macro.dbt.default__split_part": {"name": "default__split_part", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt.default__split_part", "macro_sql": "{% macro default__split_part(string_text, delimiter_text, part_number) %}\n\n split_part(\n {{ string_text }},\n {{ delimiter_text }},\n {{ part_number }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string_text", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "part_number", "type": null, "description": ""}], "created_at": 1783708210.7350287, "supported_languages": null}, "macro.dbt._split_part_negative": {"name": "_split_part_negative", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt._split_part_negative", "macro_sql": "{% macro _split_part_negative(string_text, delimiter_text, part_number) %}\n\n split_part(\n {{ string_text }},\n {{ delimiter_text }},\n length({{ string_text }})\n - length(\n replace({{ string_text }}, {{ delimiter_text }}, '')\n ) + 2 + {{ part_number }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string_text", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "part_number", "type": null, "description": ""}], "created_at": 1783708210.7355294, "supported_languages": null}, "macro.dbt.length": {"name": "length", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/length.sql", "original_file_path": "macros/utils/length.sql", "unique_id": "macro.dbt.length", "macro_sql": "{% macro length(expression) -%}\n {{ return(adapter.dispatch('length', 'dbt') (expression)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__length"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1783708210.7360382, "supported_languages": null}, "macro.dbt.default__length": {"name": "default__length", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/length.sql", "original_file_path": "macros/utils/length.sql", "unique_id": "macro.dbt.default__length", "macro_sql": "{% macro default__length(expression) %}\n\n length(\n {{ expression }}\n )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expression", "type": null, "description": ""}], "created_at": 1783708210.7362933, "supported_languages": null}, "macro.dbt.position": {"name": "position", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/position.sql", "original_file_path": "macros/utils/position.sql", "unique_id": "macro.dbt.position", "macro_sql": "{% macro position(substring_text, string_text) -%}\n {{ return(adapter.dispatch('position', 'dbt') (substring_text, string_text)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__position"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "substring_text", "type": null, "description": ""}, {"name": "string_text", "type": null, "description": ""}], "created_at": 1783708210.736846, "supported_languages": null}, "macro.dbt.default__position": {"name": "default__position", "resource_type": "macro", "package_name": "dbt", "path": "macros/utils/position.sql", "original_file_path": "macros/utils/position.sql", "unique_id": "macro.dbt.default__position", "macro_sql": "{% macro default__position(substring_text, string_text) %}\n\n position(\n {{ substring_text }} in {{ string_text }}\n )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "substring_text", "type": null, "description": ""}, {"name": "string_text", "type": null, "description": ""}], "created_at": 1783708210.7371604, "supported_languages": null}, "macro.dbt.default__test_unique": {"name": "default__test_unique", "resource_type": "macro", "package_name": "dbt", "path": "macros/generic_test_sql/unique.sql", "original_file_path": "macros/generic_test_sql/unique.sql", "unique_id": "macro.dbt.default__test_unique", "macro_sql": "{% macro default__test_unique(model, column_name) %}\n\nselect\n {{ column_name }} as unique_field,\n count(*) as n_records\n\nfrom {{ model }}\nwhere {{ column_name }} is not null\ngroup by {{ column_name }}\nhaving count(*) > 1\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}], "created_at": 1783708210.7376335, "supported_languages": null}, "macro.dbt.default__test_not_null": {"name": "default__test_not_null", "resource_type": "macro", "package_name": "dbt", "path": "macros/generic_test_sql/not_null.sql", "original_file_path": "macros/generic_test_sql/not_null.sql", "unique_id": "macro.dbt.default__test_not_null", "macro_sql": "{% macro default__test_not_null(model, column_name) %}\n\n{% set column_list = '*' if should_store_failures() else column_name %}\n\nselect {{ column_list }}\nfrom {{ model }}\nwhere {{ column_name }} is null\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.should_store_failures"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}], "created_at": 1783708210.738253, "supported_languages": null}, "macro.dbt.default__test_relationships": {"name": "default__test_relationships", "resource_type": "macro", "package_name": "dbt", "path": "macros/generic_test_sql/relationships.sql", "original_file_path": "macros/generic_test_sql/relationships.sql", "unique_id": "macro.dbt.default__test_relationships", "macro_sql": "{% macro default__test_relationships(model, column_name, to, field) %}\n\nwith child as (\n select {{ column_name }} as from_field\n from {{ model }}\n where {{ column_name }} is not null\n),\n\nparent as (\n select {{ field }} as to_field\n from {{ to }}\n)\n\nselect\n from_field\n\nfrom child\nleft join parent\n on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "to", "type": null, "description": ""}, {"name": "field", "type": null, "description": ""}], "created_at": 1783708210.7388232, "supported_languages": null}, "macro.dbt.default__test_accepted_values": {"name": "default__test_accepted_values", "resource_type": "macro", "package_name": "dbt", "path": "macros/generic_test_sql/accepted_values.sql", "original_file_path": "macros/generic_test_sql/accepted_values.sql", "unique_id": "macro.dbt.default__test_accepted_values", "macro_sql": "{% macro default__test_accepted_values(model, column_name, values, quote=True) %}\n\nwith all_values as (\n\n select\n {{ column_name }} as value_field,\n count(*) as n_records\n\n from {{ model }}\n group by {{ column_name }}\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n {% for value in values -%}\n {% if quote -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif -%}\n {%- if not loop.last -%},{%- endif %}\n {%- endfor %}\n)\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "values", "type": null, "description": ""}, {"name": "quote", "type": null, "description": ""}], "created_at": 1783708210.7398345, "supported_languages": null}, "macro.dbt.copy_grants": {"name": "copy_grants", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.copy_grants", "macro_sql": "{% macro copy_grants() %}\n {{ return(adapter.dispatch('copy_grants', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__copy_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.7419019, "supported_languages": null}, "macro.dbt.default__copy_grants": {"name": "default__copy_grants", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__copy_grants", "macro_sql": "{% macro default__copy_grants() %}\n {{ return(True) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.7421746, "supported_languages": null}, "macro.dbt.support_multiple_grantees_per_dcl_statement": {"name": "support_multiple_grantees_per_dcl_statement", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.support_multiple_grantees_per_dcl_statement", "macro_sql": "{% macro support_multiple_grantees_per_dcl_statement() %}\n {{ return(adapter.dispatch('support_multiple_grantees_per_dcl_statement', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__support_multiple_grantees_per_dcl_statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.7425194, "supported_languages": null}, "macro.dbt.default__support_multiple_grantees_per_dcl_statement": {"name": "default__support_multiple_grantees_per_dcl_statement", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__support_multiple_grantees_per_dcl_statement", "macro_sql": "\n\n{%- macro default__support_multiple_grantees_per_dcl_statement() -%}\n {{ return(True) }}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.7428477, "supported_languages": null}, "macro.dbt.should_revoke": {"name": "should_revoke", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.should_revoke", "macro_sql": "{% macro should_revoke(existing_relation, full_refresh_mode=True) %}\n\n {% if not existing_relation %}\n {#-- The table doesn't already exist, so no grants to copy over --#}\n {{ return(False) }}\n {% elif full_refresh_mode %}\n {#-- The object is being REPLACED -- whether grants are copied over depends on the value of user config --#}\n {{ return(copy_grants()) }}\n {% else %}\n {#-- The table is being merged/upserted/inserted -- grants will be carried over --#}\n {{ return(True) }}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.copy_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "existing_relation", "type": null, "description": ""}, {"name": "full_refresh_mode", "type": null, "description": ""}], "created_at": 1783708210.743567, "supported_languages": null}, "macro.dbt.get_show_grant_sql": {"name": "get_show_grant_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.get_show_grant_sql", "macro_sql": "{% macro get_show_grant_sql(relation) %}\n {{ return(adapter.dispatch(\"get_show_grant_sql\", \"dbt\")(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_show_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.743946, "supported_languages": null}, "macro.dbt.default__get_show_grant_sql": {"name": "default__get_show_grant_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_show_grant_sql", "macro_sql": "{% macro default__get_show_grant_sql(relation) %}\n show grants on {{ relation.render() }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.7442276, "supported_languages": null}, "macro.dbt.get_grant_sql": {"name": "get_grant_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.get_grant_sql", "macro_sql": "{% macro get_grant_sql(relation, privilege, grantees) %}\n {{ return(adapter.dispatch('get_grant_sql', 'dbt')(relation, privilege, grantees)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "privilege", "type": null, "description": ""}, {"name": "grantees", "type": null, "description": ""}], "created_at": 1783708210.744688, "supported_languages": null}, "macro.dbt.default__get_grant_sql": {"name": "default__get_grant_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_grant_sql", "macro_sql": "\n\n{%- macro default__get_grant_sql(relation, privilege, grantees) -%}\n grant {{ privilege }} on {{ relation.render() }} to {{ grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "privilege", "type": null, "description": ""}, {"name": "grantees", "type": null, "description": ""}], "created_at": 1783708210.7451231, "supported_languages": null}, "macro.dbt.get_revoke_sql": {"name": "get_revoke_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.get_revoke_sql", "macro_sql": "{% macro get_revoke_sql(relation, privilege, grantees) %}\n {{ return(adapter.dispatch('get_revoke_sql', 'dbt')(relation, privilege, grantees)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_revoke_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "privilege", "type": null, "description": ""}, {"name": "grantees", "type": null, "description": ""}], "created_at": 1783708210.745587, "supported_languages": null}, "macro.dbt.default__get_revoke_sql": {"name": "default__get_revoke_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_revoke_sql", "macro_sql": "\n\n{%- macro default__get_revoke_sql(relation, privilege, grantees) -%}\n {%- set quoted_grantees = [] -%}\n {%- for grantee in grantees -%}\n {%- do quoted_grantees.append(adapter.quote(grantee)) -%}\n {%- endfor -%}\n revoke {{ privilege }} on {{ relation.render() }} from {{ quoted_grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "privilege", "type": null, "description": ""}, {"name": "grantees", "type": null, "description": ""}], "created_at": 1783708210.7463572, "supported_languages": null}, "macro.dbt.get_dcl_statement_list": {"name": "get_dcl_statement_list", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.get_dcl_statement_list", "macro_sql": "{% macro get_dcl_statement_list(relation, grant_config, get_dcl_macro) %}\n {{ return(adapter.dispatch('get_dcl_statement_list', 'dbt')(relation, grant_config, get_dcl_macro)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_dcl_statement_list"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "grant_config", "type": null, "description": ""}, {"name": "get_dcl_macro", "type": null, "description": ""}], "created_at": 1783708210.7468228, "supported_languages": null}, "macro.dbt.default__get_dcl_statement_list": {"name": "default__get_dcl_statement_list", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_dcl_statement_list", "macro_sql": "\n\n{%- macro default__get_dcl_statement_list(relation, grant_config, get_dcl_macro) -%}\n {#\n -- Unpack grant_config into specific privileges and the set of users who need them granted/revoked.\n -- Depending on whether this database supports multiple grantees per statement, pass in the list of\n -- all grantees per privilege, or (if not) template one statement per privilege-grantee pair.\n -- `get_dcl_macro` will be either `get_grant_sql` or `get_revoke_sql`\n #}\n {%- set dcl_statements = [] -%}\n {%- for privilege, grantees in grant_config.items() %}\n {%- if support_multiple_grantees_per_dcl_statement() and grantees -%}\n {%- set dcl = get_dcl_macro(relation, privilege, grantees) -%}\n {%- do dcl_statements.append(dcl) -%}\n {%- else -%}\n {%- for grantee in grantees -%}\n {% set dcl = get_dcl_macro(relation, privilege, [grantee]) %}\n {%- do dcl_statements.append(dcl) -%}\n {% endfor -%}\n {%- endif -%}\n {%- endfor -%}\n {{ return(dcl_statements) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.support_multiple_grantees_per_dcl_statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "grant_config", "type": null, "description": ""}, {"name": "get_dcl_macro", "type": null, "description": ""}], "created_at": 1783708210.74819, "supported_languages": null}, "macro.dbt.call_dcl_statements": {"name": "call_dcl_statements", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.call_dcl_statements", "macro_sql": "{% macro call_dcl_statements(dcl_statement_list) %}\n {{ return(adapter.dispatch(\"call_dcl_statements\", \"dbt\")(dcl_statement_list)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__call_dcl_statements"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "dcl_statement_list", "type": null, "description": ""}], "created_at": 1783708210.748573, "supported_languages": null}, "macro.dbt.default__call_dcl_statements": {"name": "default__call_dcl_statements", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__call_dcl_statements", "macro_sql": "{% macro default__call_dcl_statements(dcl_statement_list) %}\n {#\n -- By default, supply all grant + revoke statements in a single semicolon-separated block,\n -- so that they're all processed together.\n\n -- Some databases do not support this. Those adapters will need to override this macro\n -- to run each statement individually.\n #}\n {% call statement('grants') %}\n {% for dcl_statement in dcl_statement_list %}\n {{ dcl_statement }};\n {% endfor %}\n {% endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "dcl_statement_list", "type": null, "description": ""}], "created_at": 1783708210.7490788, "supported_languages": null}, "macro.dbt.apply_grants": {"name": "apply_grants", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.apply_grants", "macro_sql": "{% macro apply_grants(relation, grant_config, should_revoke) %}\n {{ return(adapter.dispatch(\"apply_grants\", \"dbt\")(relation, grant_config, should_revoke)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__apply_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "grant_config", "type": null, "description": ""}, {"name": "should_revoke", "type": null, "description": ""}], "created_at": 1783708210.7495472, "supported_languages": null}, "macro.dbt.default__apply_grants": {"name": "default__apply_grants", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__apply_grants", "macro_sql": "{% macro default__apply_grants(relation, grant_config, should_revoke=True) %}\n {#-- If grant_config is {} or None, this is a no-op --#}\n {% if grant_config %}\n {% if should_revoke %}\n {#-- We think previous grants may have carried over --#}\n {#-- Show current grants and calculate diffs --#}\n {% set current_grants_table = run_query(get_show_grant_sql(relation)) %}\n {% set current_grants_dict = adapter.standardize_grants_dict(current_grants_table) %}\n {% set needs_granting = diff_of_two_dicts(grant_config, current_grants_dict) %}\n {% set needs_revoking = diff_of_two_dicts(current_grants_dict, grant_config) %}\n {% if not (needs_granting or needs_revoking) %}\n {{ log('On ' ~ relation.render() ~': All grants are in place, no revocation or granting needed.')}}\n {% endif %}\n {% else %}\n {#-- We don't think there's any chance of previous grants having carried over. --#}\n {#-- Jump straight to granting what the user has configured. --#}\n {% set needs_revoking = {} %}\n {% set needs_granting = grant_config %}\n {% endif %}\n {% if needs_granting or needs_revoking %}\n {% set revoke_statement_list = get_dcl_statement_list(relation, needs_revoking, get_revoke_sql) %}\n {% set grant_statement_list = get_dcl_statement_list(relation, needs_granting, get_grant_sql) %}\n {% set dcl_statement_list = revoke_statement_list + grant_statement_list %}\n {% if dcl_statement_list %}\n {{ call_dcl_statements(dcl_statement_list) }}\n {% endif %}\n {% endif %}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.get_show_grant_sql", "macro.dbt.get_dcl_statement_list", "macro.dbt.call_dcl_statements"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "grant_config", "type": null, "description": ""}, {"name": "should_revoke", "type": null, "description": ""}], "created_at": 1783708210.7519836, "supported_languages": null}, "macro.dbt.get_create_index_sql": {"name": "get_create_index_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.get_create_index_sql", "macro_sql": "{% macro get_create_index_sql(relation, index_dict) -%}\n {{ return(adapter.dispatch('get_create_index_sql', 'dbt')(relation, index_dict)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "index_dict", "type": null, "description": ""}], "created_at": 1783708210.7529602, "supported_languages": null}, "macro.dbt.default__get_create_index_sql": {"name": "default__get_create_index_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.default__get_create_index_sql", "macro_sql": "{% macro default__get_create_index_sql(relation, index_dict) -%}\n {% do return(None) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "index_dict", "type": null, "description": ""}], "created_at": 1783708210.7532783, "supported_languages": null}, "macro.dbt.create_indexes": {"name": "create_indexes", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.create_indexes", "macro_sql": "{% macro create_indexes(relation) -%}\n {{ adapter.dispatch('create_indexes', 'dbt')(relation) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.753609, "supported_languages": null}, "macro.dbt.default__create_indexes": {"name": "default__create_indexes", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.default__create_indexes", "macro_sql": "{% macro default__create_indexes(relation) -%}\n {%- set _indexes = config.get('indexes', default=[]) -%}\n\n {% for _index_dict in _indexes %}\n {% set create_index_sql = get_create_index_sql(relation, _index_dict) %}\n {% if create_index_sql %}\n {% do run_query(create_index_sql) %}\n {% endif %}\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_create_index_sql", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.7544386, "supported_languages": null}, "macro.dbt.get_drop_index_sql": {"name": "get_drop_index_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.get_drop_index_sql", "macro_sql": "{% macro get_drop_index_sql(relation, index_name) -%}\n {{ adapter.dispatch('get_drop_index_sql', 'dbt')(relation, index_name) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_drop_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "index_name", "type": null, "description": ""}], "created_at": 1783708210.7548099, "supported_languages": null}, "macro.dbt.default__get_drop_index_sql": {"name": "default__get_drop_index_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.default__get_drop_index_sql", "macro_sql": "{% macro default__get_drop_index_sql(relation, index_name) -%}\n {{ exceptions.raise_compiler_error(\"`get_drop_index_sql has not been implemented for this adapter.\") }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "index_name", "type": null, "description": ""}], "created_at": 1783708210.7551143, "supported_languages": null}, "macro.dbt.get_show_indexes_sql": {"name": "get_show_indexes_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.get_show_indexes_sql", "macro_sql": "{% macro get_show_indexes_sql(relation) -%}\n {{ adapter.dispatch('get_show_indexes_sql', 'dbt')(relation) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_show_indexes_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.7554374, "supported_languages": null}, "macro.dbt.default__get_show_indexes_sql": {"name": "default__get_show_indexes_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "unique_id": "macro.dbt.default__get_show_indexes_sql", "macro_sql": "{% macro default__get_show_indexes_sql(relation) -%}\n {{ exceptions.raise_compiler_error(\"`get_show_indexes_sql has not been implemented for this adapter.\") }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.7556965, "supported_languages": null}, "macro.dbt.get_columns_in_relation": {"name": "get_columns_in_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_columns_in_relation", "macro_sql": "{% macro get_columns_in_relation(relation) -%}\n {{ return(adapter.dispatch('get_columns_in_relation', 'dbt')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.7578654, "supported_languages": null}, "macro.dbt.default__get_columns_in_relation": {"name": "default__get_columns_in_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__get_columns_in_relation", "macro_sql": "{% macro default__get_columns_in_relation(relation) -%}\n {{ exceptions.raise_not_implemented(\n 'get_columns_in_relation macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.758229, "supported_languages": null}, "macro.dbt.sql_convert_columns_in_relation": {"name": "sql_convert_columns_in_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.sql_convert_columns_in_relation", "macro_sql": "{% macro sql_convert_columns_in_relation(table) -%}\n {% set columns = [] %}\n {% for row in table %}\n {% do columns.append(api.Column(*row)) %}\n {% endfor %}\n {{ return(columns) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table", "type": null, "description": ""}], "created_at": 1783708210.7588446, "supported_languages": null}, "macro.dbt.get_list_of_column_names": {"name": "get_list_of_column_names", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_list_of_column_names", "macro_sql": "\n\n{%- macro get_list_of_column_names(columns) -%}\n {% set col_names = [] %}\n {% for col in columns %}\n {% do col_names.append(col.name) %}\n {% endfor %}\n {{ return(col_names) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "columns", "type": null, "description": ""}], "created_at": 1783708210.7594483, "supported_languages": null}, "macro.dbt.get_empty_subquery_sql": {"name": "get_empty_subquery_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_empty_subquery_sql", "macro_sql": "{% macro get_empty_subquery_sql(select_sql, select_sql_header=none) -%}\n {{ return(adapter.dispatch('get_empty_subquery_sql', 'dbt')(select_sql, select_sql_header)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_empty_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "select_sql", "type": null, "description": ""}, {"name": "select_sql_header", "type": null, "description": ""}], "created_at": 1783708210.7598815, "supported_languages": null}, "macro.dbt.default__get_empty_subquery_sql": {"name": "default__get_empty_subquery_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__get_empty_subquery_sql", "macro_sql": "{% macro default__get_empty_subquery_sql(select_sql, select_sql_header=none) %}\n {%- if select_sql_header is not none -%}\n {{ select_sql_header }}\n {%- endif -%}\n select * from (\n {{ select_sql }}\n ) as __dbt_sbq\n where false\n limit 0\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "select_sql", "type": null, "description": ""}, {"name": "select_sql_header", "type": null, "description": ""}], "created_at": 1783708210.7603264, "supported_languages": null}, "macro.dbt.get_empty_schema_sql": {"name": "get_empty_schema_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_empty_schema_sql", "macro_sql": "{% macro get_empty_schema_sql(columns) -%}\n {{ return(adapter.dispatch('get_empty_schema_sql', 'dbt')(columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_empty_schema_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "columns", "type": null, "description": ""}], "created_at": 1783708210.7607968, "supported_languages": null}, "macro.dbt.default__get_empty_schema_sql": {"name": "default__get_empty_schema_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__get_empty_schema_sql", "macro_sql": "{% macro default__get_empty_schema_sql(columns) %}\n {%- set col_err = [] -%}\n {%- set col_naked_numeric = [] -%}\n select\n {% for i in columns %}\n {%- set col = columns[i] -%}\n {%- if col['data_type'] is not defined -%}\n {%- do col_err.append(col['name']) -%}\n {#-- If this column's type is just 'numeric' then it is missing precision/scale, raise a warning --#}\n {%- elif col['data_type'].strip().lower() in ('numeric', 'decimal', 'number') -%}\n {%- do col_naked_numeric.append(col['name']) -%}\n {%- endif -%}\n {% set col_name = adapter.quote(col['name']) if col.get('quote') else col['name'] %}\n {{ cast('null', col['data_type']) }} as {{ col_name }}{{ \", \" if not loop.last }}\n {%- endfor -%}\n {%- if (col_err | length) > 0 -%}\n {{ exceptions.column_type_missing(column_names=col_err) }}\n {%- elif (col_naked_numeric | length) > 0 -%}\n {{ exceptions.warn(\"Detected columns with numeric type and unspecified precision/scale, this can lead to unintended rounding: \" ~ col_naked_numeric ~ \"`\") }}\n {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "columns", "type": null, "description": ""}], "created_at": 1783708210.763147, "supported_languages": null}, "macro.dbt.get_column_schema_from_query": {"name": "get_column_schema_from_query", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_column_schema_from_query", "macro_sql": "{% macro get_column_schema_from_query(select_sql, select_sql_header=none) -%}\n {% set columns = [] %}\n {# -- Using an 'empty subquery' here to get the same schema as the given select_sql statement, without necessitating a data scan.#}\n {% set sql = get_empty_subquery_sql(select_sql, select_sql_header) %}\n {% set column_schema = adapter.get_column_schema_from_query(sql) %}\n {{ return(column_schema) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_empty_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "select_sql", "type": null, "description": ""}, {"name": "select_sql_header", "type": null, "description": ""}], "created_at": 1783708210.7638385, "supported_languages": null}, "macro.dbt.get_columns_in_query": {"name": "get_columns_in_query", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.get_columns_in_query", "macro_sql": "{% macro get_columns_in_query(select_sql) -%}\n {{ return(adapter.dispatch('get_columns_in_query', 'dbt')(select_sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "select_sql", "type": null, "description": ""}], "created_at": 1783708210.7642388, "supported_languages": null}, "macro.dbt.default__get_columns_in_query": {"name": "default__get_columns_in_query", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__get_columns_in_query", "macro_sql": "{% macro default__get_columns_in_query(select_sql) %}\n {% call statement('get_columns_in_query', fetch_result=True, auto_begin=False) -%}\n {{ get_empty_subquery_sql(select_sql) }}\n {% endcall %}\n {{ return(load_result('get_columns_in_query').table.columns | map(attribute='name') | list) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.get_empty_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "select_sql", "type": null, "description": ""}], "created_at": 1783708210.76492, "supported_languages": null}, "macro.dbt.alter_column_type": {"name": "alter_column_type", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.alter_column_type", "macro_sql": "{% macro alter_column_type(relation, column_name, new_column_type) -%}\n {{ return(adapter.dispatch('alter_column_type', 'dbt')(relation, column_name, new_column_type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "new_column_type", "type": null, "description": ""}], "created_at": 1783708210.7653925, "supported_languages": null}, "macro.dbt.default__alter_column_type": {"name": "default__alter_column_type", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__alter_column_type", "macro_sql": "{% macro default__alter_column_type(relation, column_name, new_column_type) -%}\n {#\n 1. Create a new column (w/ temp name and correct type)\n 2. Copy data over to it\n 3. Drop the existing column (cascade!)\n 4. Rename the new column to existing column\n #}\n {%- set tmp_column = column_name + \"__dbt_alter\" -%}\n\n {% call statement('alter_column_type') %}\n alter table {{ relation.render() }} add column {{ adapter.quote(tmp_column) }} {{ new_column_type }};\n update {{ relation.render() }} set {{ adapter.quote(tmp_column) }} = {{ adapter.quote(column_name) }};\n alter table {{ relation.render() }} drop column {{ adapter.quote(column_name) }} cascade;\n alter table {{ relation.render() }} rename column {{ adapter.quote(tmp_column) }} to {{ adapter.quote(column_name) }}\n {% endcall %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "new_column_type", "type": null, "description": ""}], "created_at": 1783708210.7667031, "supported_languages": null}, "macro.dbt.alter_relation_add_remove_columns": {"name": "alter_relation_add_remove_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.alter_relation_add_remove_columns", "macro_sql": "{% macro alter_relation_add_remove_columns(relation, add_columns = none, remove_columns = none) -%}\n {{ return(adapter.dispatch('alter_relation_add_remove_columns', 'dbt')(relation, add_columns, remove_columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__alter_relation_add_remove_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "add_columns", "type": null, "description": ""}, {"name": "remove_columns", "type": null, "description": ""}], "created_at": 1783708210.767234, "supported_languages": null}, "macro.dbt.default__alter_relation_add_remove_columns": {"name": "default__alter_relation_add_remove_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "unique_id": "macro.dbt.default__alter_relation_add_remove_columns", "macro_sql": "{% macro default__alter_relation_add_remove_columns(relation, add_columns, remove_columns) %}\n\n {% if add_columns is none %}\n {% set add_columns = [] %}\n {% endif %}\n {% if remove_columns is none %}\n {% set remove_columns = [] %}\n {% endif %}\n\n {% set sql -%}\n\n alter {{ relation.type }} {{ relation.render() }}\n\n {% for column in add_columns %}\n add column {{ column.quoted }} {{ column.expanded_data_type }}{{ ',' if not loop.last }}\n {% endfor %}{{ ',' if add_columns and remove_columns }}\n\n {% for column in remove_columns %}\n drop column {{ column.quoted }}{{ ',' if not loop.last }}\n {% endfor %}\n\n {%- endset -%}\n\n {% do run_query(sql) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "add_columns", "type": null, "description": ""}, {"name": "remove_columns", "type": null, "description": ""}], "created_at": 1783708210.7688432, "supported_languages": null}, "macro.dbt.current_timestamp": {"name": "current_timestamp", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.current_timestamp", "macro_sql": "{%- macro current_timestamp() -%}\n {{ adapter.dispatch('current_timestamp', 'dbt')() }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt_postgres.postgres__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.7697692, "supported_languages": null}, "macro.dbt.default__current_timestamp": {"name": "default__current_timestamp", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.default__current_timestamp", "macro_sql": "{% macro default__current_timestamp() -%}\n {{ exceptions.raise_not_implemented(\n 'current_timestamp macro not implemented for adapter ' + adapter.type()) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.7701242, "supported_languages": null}, "macro.dbt.snapshot_get_time": {"name": "snapshot_get_time", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.snapshot_get_time", "macro_sql": "\n\n{%- macro snapshot_get_time() -%}\n {{ adapter.dispatch('snapshot_get_time', 'dbt')() }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt_postgres.postgres__snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.7704828, "supported_languages": null}, "macro.dbt.default__snapshot_get_time": {"name": "default__snapshot_get_time", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.default__snapshot_get_time", "macro_sql": "{% macro default__snapshot_get_time() %}\n {{ current_timestamp() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.7707117, "supported_languages": null}, "macro.dbt.get_snapshot_get_time_data_type": {"name": "get_snapshot_get_time_data_type", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.get_snapshot_get_time_data_type", "macro_sql": "{% macro get_snapshot_get_time_data_type() %}\n {% set snapshot_time = adapter.dispatch('snapshot_get_time', 'dbt')() %}\n {% set time_data_type_sql = 'select ' ~ snapshot_time ~ ' as dbt_snapshot_time' %}\n {% set snapshot_time_column_schema = get_column_schema_from_query(time_data_type_sql) %}\n {% set time_data_type = snapshot_time_column_schema[0].dtype %}\n {{ return(time_data_type or none) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.snapshot_get_time", "macro.dbt_postgres.postgres__snapshot_get_time", "macro.dbt.get_column_schema_from_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.7715573, "supported_languages": null}, "macro.dbt.current_timestamp_backcompat": {"name": "current_timestamp_backcompat", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.current_timestamp_backcompat", "macro_sql": "{% macro current_timestamp_backcompat() %}\n {{ return(adapter.dispatch('current_timestamp_backcompat', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__current_timestamp_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.771897, "supported_languages": null}, "macro.dbt.default__current_timestamp_backcompat": {"name": "default__current_timestamp_backcompat", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.default__current_timestamp_backcompat", "macro_sql": "{% macro default__current_timestamp_backcompat() %}\n current_timestamp::timestamp\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.7720768, "supported_languages": null}, "macro.dbt.current_timestamp_in_utc_backcompat": {"name": "current_timestamp_in_utc_backcompat", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.current_timestamp_in_utc_backcompat", "macro_sql": "{% macro current_timestamp_in_utc_backcompat() %}\n {{ return(adapter.dispatch('current_timestamp_in_utc_backcompat', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__current_timestamp_in_utc_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.772526, "supported_languages": null}, "macro.dbt.default__current_timestamp_in_utc_backcompat": {"name": "default__current_timestamp_in_utc_backcompat", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/timestamps.sql", "original_file_path": "macros/adapters/timestamps.sql", "unique_id": "macro.dbt.default__current_timestamp_in_utc_backcompat", "macro_sql": "{% macro default__current_timestamp_in_utc_backcompat() %}\n {{ return(adapter.dispatch('current_timestamp_backcompat', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.current_timestamp_backcompat", "macro.dbt_postgres.postgres__current_timestamp_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.7728634, "supported_languages": null}, "macro.dbt.get_show_sql": {"name": "get_show_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/show.sql", "original_file_path": "macros/adapters/show.sql", "unique_id": "macro.dbt.get_show_sql", "macro_sql": "{% macro get_show_sql(compiled_code, sql_header, limit) -%}\n {%- if sql_header is not none -%}\n {{ sql_header }}\n {%- endif %}\n {{ get_limit_subquery_sql(compiled_code, limit) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_limit_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "compiled_code", "type": null, "description": ""}, {"name": "sql_header", "type": null, "description": ""}, {"name": "limit", "type": null, "description": ""}], "created_at": 1783708210.7736309, "supported_languages": null}, "macro.dbt.get_limit_subquery_sql": {"name": "get_limit_subquery_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/show.sql", "original_file_path": "macros/adapters/show.sql", "unique_id": "macro.dbt.get_limit_subquery_sql", "macro_sql": "\n{%- macro get_limit_subquery_sql(sql, limit) -%}\n {{ adapter.dispatch('get_limit_sql', 'dbt')(sql, limit) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__get_limit_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}, {"name": "limit", "type": null, "description": ""}], "created_at": 1783708210.7740047, "supported_languages": null}, "macro.dbt.default__get_limit_sql": {"name": "default__get_limit_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/show.sql", "original_file_path": "macros/adapters/show.sql", "unique_id": "macro.dbt.default__get_limit_sql", "macro_sql": "{% macro default__get_limit_sql(sql, limit) %}\n {{ sql }}\n {% if limit is not none %}\n limit {{ limit }}\n {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}, {"name": "limit", "type": null, "description": ""}], "created_at": 1783708210.7744195, "supported_languages": null}, "macro.dbt.get_catalog_relations": {"name": "get_catalog_relations", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_catalog_relations", "macro_sql": "{% macro get_catalog_relations(information_schema, relations) -%}\n {{ return(adapter.dispatch('get_catalog_relations', 'dbt')(information_schema, relations)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_catalog_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "relations", "type": null, "description": ""}], "created_at": 1783708210.7761233, "supported_languages": null}, "macro.dbt.default__get_catalog_relations": {"name": "default__get_catalog_relations", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_catalog_relations", "macro_sql": "{% macro default__get_catalog_relations(information_schema, relations) -%}\n {% set typename = adapter.type() %}\n {% set msg -%}\n get_catalog_relations not implemented for {{ typename }}\n {%- endset %}\n\n {{ exceptions.raise_compiler_error(msg) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "relations", "type": null, "description": ""}], "created_at": 1783708210.776657, "supported_languages": null}, "macro.dbt.get_catalog": {"name": "get_catalog", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_catalog", "macro_sql": "{% macro get_catalog(information_schema, schemas) -%}\n {{ return(adapter.dispatch('get_catalog', 'dbt')(information_schema, schemas)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_catalog"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "schemas", "type": null, "description": ""}], "created_at": 1783708210.7770832, "supported_languages": null}, "macro.dbt.default__get_catalog": {"name": "default__get_catalog", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_catalog", "macro_sql": "{% macro default__get_catalog(information_schema, schemas) -%}\n\n {% set typename = adapter.type() %}\n {% set msg -%}\n get_catalog not implemented for {{ typename }}\n {%- endset %}\n\n {{ exceptions.raise_compiler_error(msg) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "schemas", "type": null, "description": ""}], "created_at": 1783708210.7776146, "supported_languages": null}, "macro.dbt.information_schema_name": {"name": "information_schema_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.information_schema_name", "macro_sql": "{% macro information_schema_name(database) %}\n {{ return(adapter.dispatch('information_schema_name', 'dbt')(database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__information_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}], "created_at": 1783708210.7779987, "supported_languages": null}, "macro.dbt.default__information_schema_name": {"name": "default__information_schema_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__information_schema_name", "macro_sql": "{% macro default__information_schema_name(database) -%}\n {%- if database -%}\n {{ database }}.INFORMATION_SCHEMA\n {%- else -%}\n INFORMATION_SCHEMA\n {%- endif -%}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}], "created_at": 1783708210.7783492, "supported_languages": null}, "macro.dbt.list_schemas": {"name": "list_schemas", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.list_schemas", "macro_sql": "{% macro list_schemas(database) -%}\n {{ return(adapter.dispatch('list_schemas', 'dbt')(database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__list_schemas"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}], "created_at": 1783708210.7787144, "supported_languages": null}, "macro.dbt.default__list_schemas": {"name": "default__list_schemas", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__list_schemas", "macro_sql": "{% macro default__list_schemas(database) -%}\n {% set sql %}\n select distinct schema_name\n from {{ information_schema_name(database) }}.SCHEMATA\n where catalog_name ilike '{{ database }}'\n {% endset %}\n {{ return(run_query(sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.information_schema_name", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}], "created_at": 1783708210.7792277, "supported_languages": null}, "macro.dbt.check_schema_exists": {"name": "check_schema_exists", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.check_schema_exists", "macro_sql": "{% macro check_schema_exists(information_schema, schema) -%}\n {{ return(adapter.dispatch('check_schema_exists', 'dbt')(information_schema, schema)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__check_schema_exists"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "schema", "type": null, "description": ""}], "created_at": 1783708210.779633, "supported_languages": null}, "macro.dbt.default__check_schema_exists": {"name": "default__check_schema_exists", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__check_schema_exists", "macro_sql": "{% macro default__check_schema_exists(information_schema, schema) -%}\n {% set sql -%}\n select count(*)\n from {{ information_schema.replace(information_schema_view='SCHEMATA') }}\n where catalog_name='{{ information_schema.database }}'\n and schema_name='{{ schema }}'\n {%- endset %}\n {{ return(run_query(sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.replace", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "schema", "type": null, "description": ""}], "created_at": 1783708210.7803676, "supported_languages": null}, "macro.dbt.list_relations_without_caching": {"name": "list_relations_without_caching", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.list_relations_without_caching", "macro_sql": "{% macro list_relations_without_caching(schema_relation) %}\n {{ return(adapter.dispatch('list_relations_without_caching', 'dbt')(schema_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__list_relations_without_caching"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_relation", "type": null, "description": ""}], "created_at": 1783708210.7807515, "supported_languages": null}, "macro.dbt.default__list_relations_without_caching": {"name": "default__list_relations_without_caching", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__list_relations_without_caching", "macro_sql": "{% macro default__list_relations_without_caching(schema_relation) %}\n {{ exceptions.raise_not_implemented(\n 'list_relations_without_caching macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_relation", "type": null, "description": ""}], "created_at": 1783708210.781098, "supported_languages": null}, "macro.dbt.list_function_relations_without_caching": {"name": "list_function_relations_without_caching", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.list_function_relations_without_caching", "macro_sql": "{% macro list_function_relations_without_caching(schema_relation) %}\n {{ return(adapter.dispatch('list_function_relations_without_caching', 'dbt')(schema_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__list_function_relations_without_caching"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_relation", "type": null, "description": ""}], "created_at": 1783708210.7814746, "supported_languages": null}, "macro.dbt.default__list_function_relations_without_caching": {"name": "default__list_function_relations_without_caching", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__list_function_relations_without_caching", "macro_sql": "{% macro default__list_function_relations_without_caching(schema_relation) %}\n {{ exceptions.raise_not_implemented(\n 'list_function_relations_without_caching macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_relation", "type": null, "description": ""}], "created_at": 1783708210.7818103, "supported_languages": null}, "macro.dbt.get_catalog_for_single_relation": {"name": "get_catalog_for_single_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_catalog_for_single_relation", "macro_sql": "{% macro get_catalog_for_single_relation(relation) %}\n {{ return(adapter.dispatch('get_catalog_for_single_relation', 'dbt')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_catalog_for_single_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.7822115, "supported_languages": null}, "macro.dbt.default__get_catalog_for_single_relation": {"name": "default__get_catalog_for_single_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_catalog_for_single_relation", "macro_sql": "{% macro default__get_catalog_for_single_relation(relation) %}\n {{ exceptions.raise_not_implemented(\n 'get_catalog_for_single_relation macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.782536, "supported_languages": null}, "macro.dbt.get_relations": {"name": "get_relations", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_relations", "macro_sql": "{% macro get_relations() %}\n {{ return(adapter.dispatch('get_relations', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.782869, "supported_languages": null}, "macro.dbt.default__get_relations": {"name": "default__get_relations", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_relations", "macro_sql": "{% macro default__get_relations() %}\n {{ exceptions.raise_not_implemented(\n 'get_relations macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.7832155, "supported_languages": null}, "macro.dbt.get_relation_last_modified": {"name": "get_relation_last_modified", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.get_relation_last_modified", "macro_sql": "{% macro get_relation_last_modified(information_schema, relations) %}\n {{ return(adapter.dispatch('get_relation_last_modified', 'dbt')(information_schema, relations)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_relation_last_modified"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "relations", "type": null, "description": ""}], "created_at": 1783708210.7836344, "supported_languages": null}, "macro.dbt.default__get_relation_last_modified": {"name": "default__get_relation_last_modified", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "unique_id": "macro.dbt.default__get_relation_last_modified", "macro_sql": "{% macro default__get_relation_last_modified(information_schema, relations) %}\n {{ exceptions.raise_not_implemented(\n 'get_relation_last_modified macro not implemented for adapter ' + adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "information_schema", "type": null, "description": ""}, {"name": "relations", "type": null, "description": ""}], "created_at": 1783708210.78398, "supported_languages": null}, "macro.dbt.make_intermediate_relation": {"name": "make_intermediate_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.make_intermediate_relation", "macro_sql": "{% macro make_intermediate_relation(base_relation, suffix='__dbt_tmp') %}\n {{ return(adapter.dispatch('make_intermediate_relation', 'dbt')(base_relation, suffix)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_intermediate_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1783708210.7853253, "supported_languages": null}, "macro.dbt.default__make_intermediate_relation": {"name": "default__make_intermediate_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__make_intermediate_relation", "macro_sql": "{% macro default__make_intermediate_relation(base_relation, suffix) %}\n {{ return(default__make_temp_relation(base_relation, suffix)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1783708210.7856688, "supported_languages": null}, "macro.dbt.make_temp_relation": {"name": "make_temp_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.make_temp_relation", "macro_sql": "{% macro make_temp_relation(base_relation, suffix='__dbt_tmp') %}\n {#-- This ensures microbatch batches get unique temp relations to avoid clobbering --#}\n {% if suffix == '__dbt_tmp' and model.batch %}\n {% set suffix = suffix ~ '_' ~ model.batch.id %}\n {% endif %}\n\n {{ return(adapter.dispatch('make_temp_relation', 'dbt')(base_relation, suffix)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1783708210.7864583, "supported_languages": null}, "macro.dbt.default__make_temp_relation": {"name": "default__make_temp_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__make_temp_relation", "macro_sql": "{% macro default__make_temp_relation(base_relation, suffix) %}\n {%- set temp_identifier = base_relation.identifier ~ suffix -%}\n {%- set temp_relation = base_relation.incorporate(\n path={\"identifier\": temp_identifier}) -%}\n\n {{ return(temp_relation) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1783708210.7870471, "supported_languages": null}, "macro.dbt.make_backup_relation": {"name": "make_backup_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.make_backup_relation", "macro_sql": "{% macro make_backup_relation(base_relation, backup_relation_type, suffix='__dbt_backup') %}\n {{ return(adapter.dispatch('make_backup_relation', 'dbt')(base_relation, backup_relation_type, suffix)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__make_backup_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "backup_relation_type", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1783708210.787565, "supported_languages": null}, "macro.dbt.default__make_backup_relation": {"name": "default__make_backup_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__make_backup_relation", "macro_sql": "{% macro default__make_backup_relation(base_relation, backup_relation_type, suffix) %}\n {%- set backup_identifier = base_relation.identifier ~ suffix -%}\n {%- set backup_relation = base_relation.incorporate(\n path={\"identifier\": backup_identifier},\n type=backup_relation_type\n ) -%}\n {{ return(backup_relation) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_relation", "type": null, "description": ""}, {"name": "backup_relation_type", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}], "created_at": 1783708210.788339, "supported_languages": null}, "macro.dbt.truncate_relation": {"name": "truncate_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.truncate_relation", "macro_sql": "{% macro truncate_relation(relation) -%}\n {{ return(adapter.dispatch('truncate_relation', 'dbt')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__truncate_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.788714, "supported_languages": null}, "macro.dbt.default__truncate_relation": {"name": "default__truncate_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__truncate_relation", "macro_sql": "{% macro default__truncate_relation(relation) -%}\n {% call statement('truncate_relation') -%}\n truncate table {{ relation.render() }}\n {%- endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.789101, "supported_languages": null}, "macro.dbt.get_or_create_relation": {"name": "get_or_create_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.get_or_create_relation", "macro_sql": "{% macro get_or_create_relation(database, schema, identifier, type) -%}\n {{ return(adapter.dispatch('get_or_create_relation', 'dbt')(database, schema, identifier, type)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_or_create_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}, {"name": "schema", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1783708210.7896056, "supported_languages": null}, "macro.dbt.default__get_or_create_relation": {"name": "default__get_or_create_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.default__get_or_create_relation", "macro_sql": "{% macro default__get_or_create_relation(database, schema, identifier, type) %}\n {%- set target_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) %}\n\n {% if target_relation %}\n {% do return([true, target_relation]) %}\n {% endif %}\n\n {%- set new_relation = api.Relation.create(\n database=database,\n schema=schema,\n identifier=identifier,\n type=type\n ) -%}\n {% do return([false, new_relation]) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "database", "type": null, "description": ""}, {"name": "schema", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1783708210.790717, "supported_languages": null}, "macro.dbt.load_cached_relation": {"name": "load_cached_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.load_cached_relation", "macro_sql": "{% macro load_cached_relation(relation) %}\n {% do return(adapter.get_relation(\n database=relation.database,\n schema=relation.schema,\n identifier=relation.identifier\n )) -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.7912033, "supported_languages": null}, "macro.dbt.load_relation": {"name": "load_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "unique_id": "macro.dbt.load_relation", "macro_sql": "{% macro load_relation(relation) %}\n {{ return(load_cached_relation(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.7914987, "supported_languages": null}, "macro.dbt.create_schema": {"name": "create_schema", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "unique_id": "macro.dbt.create_schema", "macro_sql": "{% macro create_schema(relation) -%}\n {{ adapter.dispatch('create_schema', 'dbt')(relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__create_schema"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.7921486, "supported_languages": null}, "macro.dbt.default__create_schema": {"name": "default__create_schema", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "unique_id": "macro.dbt.default__create_schema", "macro_sql": "{% macro default__create_schema(relation) -%}\n {%- call statement('create_schema') -%}\n create schema if not exists {{ relation.without_identifier() }}\n {% endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.7925313, "supported_languages": null}, "macro.dbt.drop_schema": {"name": "drop_schema", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "unique_id": "macro.dbt.drop_schema", "macro_sql": "{% macro drop_schema(relation) -%}\n {{ adapter.dispatch('drop_schema', 'dbt')(relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__drop_schema"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.7928586, "supported_languages": null}, "macro.dbt.default__drop_schema": {"name": "default__drop_schema", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "unique_id": "macro.dbt.default__drop_schema", "macro_sql": "{% macro default__drop_schema(relation) -%}\n {%- call statement('drop_schema') -%}\n drop schema if exists {{ relation.without_identifier() }} cascade\n {% endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.7932618, "supported_languages": null}, "macro.dbt.collect_freshness": {"name": "collect_freshness", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "unique_id": "macro.dbt.collect_freshness", "macro_sql": "{% macro collect_freshness(source, loaded_at_field, filter) %}\n {{ return(adapter.dispatch('collect_freshness', 'dbt')(source, loaded_at_field, filter))}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source", "type": null, "description": ""}, {"name": "loaded_at_field", "type": null, "description": ""}, {"name": "filter", "type": null, "description": ""}], "created_at": 1783708210.7941694, "supported_languages": null}, "macro.dbt.default__collect_freshness": {"name": "default__collect_freshness", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "unique_id": "macro.dbt.default__collect_freshness", "macro_sql": "{% macro default__collect_freshness(source, loaded_at_field, filter) %}\n {% call statement('collect_freshness', fetch_result=True, auto_begin=False) -%}\n select\n max({{ loaded_at_field }}) as max_loaded_at,\n {{ current_timestamp() }} as snapshotted_at\n from {{ source }}\n {% if filter %}\n where {{ filter }}\n {% endif %}\n {% endcall %}\n {{ return(load_result('collect_freshness')) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source", "type": null, "description": ""}, {"name": "loaded_at_field", "type": null, "description": ""}, {"name": "filter", "type": null, "description": ""}], "created_at": 1783708210.7949936, "supported_languages": null}, "macro.dbt.collect_freshness_custom_sql": {"name": "collect_freshness_custom_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "unique_id": "macro.dbt.collect_freshness_custom_sql", "macro_sql": "{% macro collect_freshness_custom_sql(source, loaded_at_query) %}\n {{ return(adapter.dispatch('collect_freshness_custom_sql', 'dbt')(source, loaded_at_query))}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__collect_freshness_custom_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source", "type": null, "description": ""}, {"name": "loaded_at_query", "type": null, "description": ""}], "created_at": 1783708210.7954323, "supported_languages": null}, "macro.dbt.default__collect_freshness_custom_sql": {"name": "default__collect_freshness_custom_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "unique_id": "macro.dbt.default__collect_freshness_custom_sql", "macro_sql": "{% macro default__collect_freshness_custom_sql(source, loaded_at_query) %}\n {% call statement('collect_freshness_custom_sql', fetch_result=True, auto_begin=False) -%}\n with source_query as (\n {{ loaded_at_query }}\n )\n select\n (select * from source_query) as max_loaded_at,\n {{ current_timestamp() }} as snapshotted_at\n {% endcall %}\n {{ return(load_result('collect_freshness_custom_sql')) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source", "type": null, "description": ""}, {"name": "loaded_at_query", "type": null, "description": ""}], "created_at": 1783708210.7960527, "supported_languages": null}, "macro.dbt.alter_column_comment": {"name": "alter_column_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.alter_column_comment", "macro_sql": "{% macro alter_column_comment(relation, column_dict) -%}\n {{ return(adapter.dispatch('alter_column_comment', 'dbt')(relation, column_dict)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "column_dict", "type": null, "description": ""}], "created_at": 1783708210.797326, "supported_languages": null}, "macro.dbt.default__alter_column_comment": {"name": "default__alter_column_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.default__alter_column_comment", "macro_sql": "{% macro default__alter_column_comment(relation, column_dict) -%}\n {{ exceptions.raise_not_implemented(\n 'alter_column_comment macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "column_dict", "type": null, "description": ""}], "created_at": 1783708210.7978027, "supported_languages": null}, "macro.dbt.alter_relation_comment": {"name": "alter_relation_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.alter_relation_comment", "macro_sql": "{% macro alter_relation_comment(relation, relation_comment) -%}\n {{ return(adapter.dispatch('alter_relation_comment', 'dbt')(relation, relation_comment)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__alter_relation_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "relation_comment", "type": null, "description": ""}], "created_at": 1783708210.7982526, "supported_languages": null}, "macro.dbt.default__alter_relation_comment": {"name": "default__alter_relation_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.default__alter_relation_comment", "macro_sql": "{% macro default__alter_relation_comment(relation, relation_comment) -%}\n {{ exceptions.raise_not_implemented(\n 'alter_relation_comment macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "relation_comment", "type": null, "description": ""}], "created_at": 1783708210.798596, "supported_languages": null}, "macro.dbt.persist_docs": {"name": "persist_docs", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.persist_docs", "macro_sql": "{% macro persist_docs(relation, model, for_relation=true, for_columns=true) -%}\n {{ return(adapter.dispatch('persist_docs', 'dbt')(relation, model, for_relation, for_columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "model", "type": null, "description": ""}, {"name": "for_relation", "type": null, "description": ""}, {"name": "for_columns", "type": null, "description": ""}], "created_at": 1783708210.7991502, "supported_languages": null}, "macro.dbt.validate_doc_columns": {"name": "validate_doc_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.validate_doc_columns", "macro_sql": "{% macro validate_doc_columns(relation, column_dict, existing_column_names) %}\n {% set existing_lower = existing_column_names | map(\"lower\") | list %}\n {% set missing = [] %}\n {% set filtered = {} %}\n {% for col_name in column_dict %}\n {% set is_quoted = column_dict[col_name]['quote'] %}\n {% if is_quoted %}\n {% set present = col_name in existing_column_names %}\n {% else %}\n {% set present = col_name | lower in existing_lower %}\n {% endif %}\n {% if present %}\n {% do filtered.update({col_name: column_dict[col_name]}) %}\n {% else %}\n {% do missing.append(col_name) %}\n {% endif %}\n {% endfor %}\n {% if missing | length > 0 %}\n {{ exceptions.warn(\"In relation \" ~ relation.render() ~ \": The following columns are specified in the schema but are not present in the database: \" ~ missing | join(\", \")) }}\n {% endif %}\n {{ return(filtered) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "column_dict", "type": null, "description": ""}, {"name": "existing_column_names", "type": null, "description": ""}], "created_at": 1783708210.8012407, "supported_languages": null}, "macro.dbt.default__persist_docs": {"name": "default__persist_docs", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "unique_id": "macro.dbt.default__persist_docs", "macro_sql": "{% macro default__persist_docs(relation, model, for_relation, for_columns) -%}\n {% if for_relation and config.persist_relation_docs() and model.description %}\n {% do run_query(alter_relation_comment(relation, model.description)) %}\n {% endif %}\n\n {% if for_columns and config.persist_column_docs() and model.columns %}\n {% set existing_columns = adapter.get_columns_in_relation(relation) | map(attribute=\"name\") | list %}\n {% set filtered_columns = validate_doc_columns(relation, model.columns, existing_columns) %}\n {% set alter_comment_sql = alter_column_comment(relation, filtered_columns) %}\n {% if alter_comment_sql and alter_comment_sql | trim | length > 0 %}\n {% do run_query(alter_comment_sql) %}\n {% endif %}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.alter_relation_comment", "macro.dbt.validate_doc_columns", "macro.dbt.alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "model", "type": null, "description": ""}, {"name": "for_relation", "type": null, "description": ""}, {"name": "for_columns", "type": null, "description": ""}], "created_at": 1783708210.8028674, "supported_languages": null}, "macro.dbt.validate_sql": {"name": "validate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/validate_sql.sql", "original_file_path": "macros/adapters/validate_sql.sql", "unique_id": "macro.dbt.validate_sql", "macro_sql": "{% macro validate_sql(sql) -%}\n {{ return(adapter.dispatch('validate_sql', 'dbt')(sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__validate_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1783708210.8034544, "supported_languages": null}, "macro.dbt.default__validate_sql": {"name": "default__validate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/validate_sql.sql", "original_file_path": "macros/adapters/validate_sql.sql", "unique_id": "macro.dbt.default__validate_sql", "macro_sql": "{% macro default__validate_sql(sql) -%}\n {% call statement('validate_sql') -%}\n explain {{ sql }}\n {% endcall %}\n {{ return(load_result('validate_sql')) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1783708210.8039186, "supported_languages": null}, "macro.dbt.convert_datetime": {"name": "convert_datetime", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "unique_id": "macro.dbt.convert_datetime", "macro_sql": "{% macro convert_datetime(date_str, date_fmt) %}\n\n {% set error_msg -%}\n The provided partition date '{{ date_str }}' does not match the expected format '{{ date_fmt }}'\n {%- endset %}\n\n {% set res = try_or_compiler_error(error_msg, modules.datetime.datetime.strptime, date_str.strip(), date_fmt) %}\n {{ return(res) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "date_str", "type": null, "description": ""}, {"name": "date_fmt", "type": null, "description": ""}], "created_at": 1783708210.8053596, "supported_languages": null}, "macro.dbt.dates_in_range": {"name": "dates_in_range", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "unique_id": "macro.dbt.dates_in_range", "macro_sql": "{% macro dates_in_range(start_date_str, end_date_str=none, in_fmt=\"%Y%m%d\", out_fmt=\"%Y%m%d\") %}\n {% set end_date_str = start_date_str if end_date_str is none else end_date_str %}\n\n {% set start_date = convert_datetime(start_date_str, in_fmt) %}\n {% set end_date = convert_datetime(end_date_str, in_fmt) %}\n\n {% set day_count = (end_date - start_date).days %}\n {% if day_count < 0 %}\n {% set msg -%}\n Partition start date is after the end date ({{ start_date }}, {{ end_date }})\n {%- endset %}\n\n {{ exceptions.raise_compiler_error(msg, model) }}\n {% endif %}\n\n {% set date_list = [] %}\n {% for i in range(0, day_count + 1) %}\n {% set the_date = (modules.datetime.timedelta(days=i) + start_date) %}\n {% if not out_fmt %}\n {% set _ = date_list.append(the_date) %}\n {% else %}\n {% set _ = date_list.append(the_date.strftime(out_fmt)) %}\n {% endif %}\n {% endfor %}\n\n {{ return(date_list) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.convert_datetime"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date_str", "type": null, "description": ""}, {"name": "end_date_str", "type": null, "description": ""}, {"name": "in_fmt", "type": null, "description": ""}, {"name": "out_fmt", "type": null, "description": ""}], "created_at": 1783708210.8077059, "supported_languages": null}, "macro.dbt.partition_range": {"name": "partition_range", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "unique_id": "macro.dbt.partition_range", "macro_sql": "{% macro partition_range(raw_partition_date, date_fmt='%Y%m%d') %}\n {% set partition_range = (raw_partition_date | string).split(\",\") %}\n\n {% if (partition_range | length) == 1 %}\n {% set start_date = partition_range[0] %}\n {% set end_date = none %}\n {% elif (partition_range | length) == 2 %}\n {% set start_date = partition_range[0] %}\n {% set end_date = partition_range[1] %}\n {% else %}\n {{ exceptions.raise_compiler_error(\"Invalid partition time. Expected format: {Start Date}[,{End Date}]. Got: \" ~ raw_partition_date) }}\n {% endif %}\n\n {{ return(dates_in_range(start_date, end_date, in_fmt=date_fmt)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.dates_in_range"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "raw_partition_date", "type": null, "description": ""}, {"name": "date_fmt", "type": null, "description": ""}], "created_at": 1783708210.8093467, "supported_languages": null}, "macro.dbt.py_current_timestring": {"name": "py_current_timestring", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "unique_id": "macro.dbt.py_current_timestring", "macro_sql": "{% macro py_current_timestring() %}\n {% set dt = modules.datetime.datetime.now() %}\n {% do return(dt.strftime(\"%Y%m%d%H%M%S%f\")) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.8098133, "supported_languages": null}, "macro.dbt.statement": {"name": "statement", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "unique_id": "macro.dbt.statement", "macro_sql": "\n{%- macro statement(name=None, fetch_result=False, auto_begin=True, language='sql') -%}\n {%- if execute: -%}\n {%- set compiled_code = caller() -%}\n\n {%- if name == 'main' -%}\n {{ log('Writing runtime {} for node \"{}\"'.format(language, model['unique_id'])) }}\n {{ write(compiled_code) }}\n {%- endif -%}\n {%- if language == 'sql'-%}\n {%- set res, table = adapter.execute(compiled_code, auto_begin=auto_begin, fetch=fetch_result) -%}\n {%- elif language == 'python' -%}\n {%- set res = submit_python_job(model, compiled_code) -%}\n {#-- TODO: What should table be for python models? --#}\n {%- set table = None -%}\n {%- else -%}\n {% do exceptions.raise_compiler_error(\"statement macro didn't get supported language\") %}\n {%- endif -%}\n\n {%- if name is not none -%}\n {{ store_result(name, response=res, agate_table=table) }}\n {%- endif -%}\n\n {%- endif -%}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "name", "type": null, "description": ""}, {"name": "fetch_result", "type": null, "description": ""}, {"name": "auto_begin", "type": null, "description": ""}, {"name": "language", "type": null, "description": ""}], "created_at": 1783708210.8123846, "supported_languages": null}, "macro.dbt.noop_statement": {"name": "noop_statement", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "unique_id": "macro.dbt.noop_statement", "macro_sql": "{% macro noop_statement(name=None, message=None, code=None, rows_affected=None, res=None) -%}\n {%- set sql = caller() -%}\n\n {%- if name == 'main' -%}\n {{ log('Writing runtime SQL for node \"{}\"'.format(model['unique_id'])) }}\n {{ write(sql) }}\n {%- endif -%}\n\n {%- if name is not none -%}\n {{ store_raw_result(name, message=message, code=code, rows_affected=rows_affected, agate_table=res) }}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "name", "type": null, "description": ""}, {"name": "message", "type": null, "description": ""}, {"name": "code", "type": null, "description": ""}, {"name": "rows_affected", "type": null, "description": ""}, {"name": "res", "type": null, "description": ""}], "created_at": 1783708210.8135347, "supported_languages": null}, "macro.dbt.run_query": {"name": "run_query", "resource_type": "macro", "package_name": "dbt", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "unique_id": "macro.dbt.run_query", "macro_sql": "{% macro run_query(sql) %}\n {% call statement(\"run_query_statement\", fetch_result=true, auto_begin=false) %}\n {{ sql }}\n {% endcall %}\n\n {% do return(load_result(\"run_query_statement\").table) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1783708210.8141346, "supported_languages": null}, "macro.dbt.set_sql_header": {"name": "set_sql_header", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "unique_id": "macro.dbt.set_sql_header", "macro_sql": "{% macro set_sql_header(config) -%}\n {{ config.set('sql_header', caller()) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "config", "type": null, "description": ""}], "created_at": 1783708210.8147244, "supported_languages": null}, "macro.dbt.should_full_refresh": {"name": "should_full_refresh", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "unique_id": "macro.dbt.should_full_refresh", "macro_sql": "{% macro should_full_refresh() %}\n {% set config_full_refresh = config.get('full_refresh') %}\n {% if config_full_refresh is none %}\n {% set config_full_refresh = flags.FULL_REFRESH %}\n {% endif %}\n {% do return(config_full_refresh) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.8153534, "supported_languages": null}, "macro.dbt.should_store_failures": {"name": "should_store_failures", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "unique_id": "macro.dbt.should_store_failures", "macro_sql": "{% macro should_store_failures() %}\n {% set config_store_failures = config.get('store_failures') %}\n {% if config_store_failures is none %}\n {% set config_store_failures = flags.STORE_FAILURES %}\n {% endif %}\n {% do return(config_store_failures) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.8159487, "supported_languages": null}, "macro.dbt.run_hooks": {"name": "run_hooks", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.run_hooks", "macro_sql": "{% macro run_hooks(hooks, inside_transaction=True) %}\n {% for hook in hooks | selectattr('transaction', 'equalto', inside_transaction) %}\n {% if not inside_transaction and loop.first %}\n {% call statement(auto_begin=inside_transaction) %}\n commit;\n {% endcall %}\n {% endif %}\n {% set rendered = render(hook.get('sql')) | trim %}\n {% if (rendered | length) > 0 %}\n {% call statement(auto_begin=inside_transaction) %}\n {{ rendered }}\n {% endcall %}\n {% endif %}\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "hooks", "type": null, "description": ""}, {"name": "inside_transaction", "type": null, "description": ""}], "created_at": 1783708210.8176537, "supported_languages": null}, "macro.dbt.make_hook_config": {"name": "make_hook_config", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.make_hook_config", "macro_sql": "{% macro make_hook_config(sql, inside_transaction) %}\n {{ tojson({\"sql\": sql, \"transaction\": inside_transaction}) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}, {"name": "inside_transaction", "type": null, "description": ""}], "created_at": 1783708210.8180742, "supported_languages": null}, "macro.dbt.before_begin": {"name": "before_begin", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.before_begin", "macro_sql": "{% macro before_begin(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1783708210.8183823, "supported_languages": null}, "macro.dbt.in_transaction": {"name": "in_transaction", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.in_transaction", "macro_sql": "{% macro in_transaction(sql) %}\n {{ make_hook_config(sql, inside_transaction=True) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1783708210.8186753, "supported_languages": null}, "macro.dbt.after_commit": {"name": "after_commit", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "unique_id": "macro.dbt.after_commit", "macro_sql": "{% macro after_commit(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1783708210.818964, "supported_languages": null}, "macro.dbt.materialization_view_default": {"name": "materialization_view_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/view.sql", "original_file_path": "macros/materializations/models/view.sql", "unique_id": "macro.dbt.materialization_view_default", "macro_sql": "{%- materialization view, default -%}\n\n {%- set existing_relation = load_cached_relation(this) -%}\n {%- set target_relation = this.incorporate(type='view') -%}\n {%- set intermediate_relation = make_intermediate_relation(target_relation) -%}\n\n -- the intermediate_relation should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation\n {%- set preexisting_intermediate_relation = load_cached_relation(intermediate_relation) -%}\n /*\n This relation (probably) doesn't exist yet. If it does exist, it's a leftover from\n a previous run, and we're going to try to drop it immediately. At the end of this\n materialization, we're going to rename the \"existing_relation\" to this identifier,\n and then we're going to drop it. In order to make sure we run the correct one of:\n - drop view ...\n - drop table ...\n\n We need to set the type of this relation to be the type of the existing_relation, if it exists,\n or else \"view\" as a sane default if it does not. Note that if the existing_relation does not\n exist, then there is nothing to move out of the way and subsequentally drop. In that case,\n this relation will be effectively unused.\n */\n {%- set backup_relation_type = 'view' if existing_relation is none else existing_relation.type -%}\n {%- set backup_relation = make_backup_relation(target_relation, backup_relation_type) -%}\n -- as above, the backup_relation should not already exist\n {%- set preexisting_backup_relation = load_cached_relation(backup_relation) -%}\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- drop the temp relations if they exist already in the database\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_view_as_sql(intermediate_relation, sql) }}\n {%- endcall %}\n\n -- cleanup\n -- move the existing view out of the way\n {% if existing_relation is not none %}\n /* Do the equivalent of rename_if_exists. 'existing_relation' could have been dropped\n since the variable was first set. */\n {% set existing_relation = load_cached_relation(existing_relation) %}\n {% if existing_relation is not none %}\n {{ adapter.rename_relation(existing_relation, backup_relation) }}\n {% endif %}\n {% endif %}\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n {{ drop_relation_if_exists(backup_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization -%}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.run_hooks", "macro.dbt.drop_relation_if_exists", "macro.dbt.statement", "macro.dbt.get_create_view_as_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1783708210.8232083, "supported_languages": ["sql"]}, "macro.dbt.materialization_materialized_view_default": {"name": "materialization_materialized_view_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialization_materialized_view_default", "macro_sql": "{% materialization materialized_view, default %}\n {% set existing_relation = load_cached_relation(this) %}\n {% set target_relation = this.incorporate(type=this.MaterializedView) %}\n {% set intermediate_relation = make_intermediate_relation(target_relation) %}\n {% set backup_relation_type = target_relation.MaterializedView if existing_relation is none else existing_relation.type %}\n {% set backup_relation = make_backup_relation(target_relation, backup_relation_type) %}\n\n {{ materialized_view_setup(backup_relation, intermediate_relation, pre_hooks) }}\n\n {% set build_sql = materialized_view_get_build_sql(existing_relation, target_relation, backup_relation, intermediate_relation) %}\n\n {% if build_sql == '' %}\n {{ materialized_view_execute_no_op(target_relation) }}\n {% else %}\n {{ materialized_view_execute_build_sql(build_sql, existing_relation, target_relation, post_hooks) }}\n {% endif %}\n\n {{ materialized_view_teardown(backup_relation, intermediate_relation, post_hooks) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.materialized_view_setup", "macro.dbt.materialized_view_get_build_sql", "macro.dbt.materialized_view_execute_no_op", "macro.dbt.materialized_view_execute_build_sql", "macro.dbt.materialized_view_teardown"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1783708210.826287, "supported_languages": ["sql"]}, "macro.dbt.materialized_view_setup": {"name": "materialized_view_setup", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_setup", "macro_sql": "{% macro materialized_view_setup(backup_relation, intermediate_relation, pre_hooks) %}\n\n -- backup_relation and intermediate_relation should not already exist in the database\n -- it's possible these exist because of a previous run that exited unexpectedly\n {% set preexisting_backup_relation = load_cached_relation(backup_relation) %}\n {% set preexisting_intermediate_relation = load_cached_relation(intermediate_relation) %}\n\n -- drop the temp relations if they exist already in the database\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "backup_relation", "type": null, "description": ""}, {"name": "intermediate_relation", "type": null, "description": ""}, {"name": "pre_hooks", "type": null, "description": ""}], "created_at": 1783708210.827082, "supported_languages": null}, "macro.dbt.materialized_view_teardown": {"name": "materialized_view_teardown", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_teardown", "macro_sql": "{% macro materialized_view_teardown(backup_relation, intermediate_relation, post_hooks) %}\n\n -- drop the temp relations if they exist to leave the database clean for the next run\n {{ drop_relation_if_exists(backup_relation) }}\n {{ drop_relation_if_exists(intermediate_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "backup_relation", "type": null, "description": ""}, {"name": "intermediate_relation", "type": null, "description": ""}, {"name": "post_hooks", "type": null, "description": ""}], "created_at": 1783708210.8276014, "supported_languages": null}, "macro.dbt.materialized_view_get_build_sql": {"name": "materialized_view_get_build_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_get_build_sql", "macro_sql": "{% macro materialized_view_get_build_sql(existing_relation, target_relation, backup_relation, intermediate_relation) %}\n\n {% set full_refresh_mode = should_full_refresh() %}\n\n -- determine the scenario we're in: create, full_refresh, alter, refresh data\n {% if existing_relation is none %}\n {% set build_sql = get_create_materialized_view_as_sql(target_relation, sql) %}\n {% elif full_refresh_mode or not existing_relation.is_materialized_view %}\n {% set build_sql = get_replace_sql(existing_relation, target_relation, sql) %}\n {% else %}\n\n -- get config options\n {% set on_configuration_change = config.get('on_configuration_change') %}\n {% set configuration_changes = get_materialized_view_configuration_changes(existing_relation, config) %}\n\n {% if configuration_changes is none %}\n {% set build_sql = refresh_materialized_view(target_relation) %}\n\n {% elif on_configuration_change == 'apply' %}\n {% set build_sql = get_alter_materialized_view_as_sql(target_relation, configuration_changes, sql, existing_relation, backup_relation, intermediate_relation) %}\n {% elif on_configuration_change == 'continue' %}\n {% set build_sql = '' %}\n {{ exceptions.warn(\"Configuration changes were identified and `on_configuration_change` was set to `continue` for `\" ~ target_relation.render() ~ \"`\") }}\n {% elif on_configuration_change == 'fail' %}\n {{ exceptions.raise_fail_fast_error(\"Configuration changes were identified and `on_configuration_change` was set to `fail` for `\" ~ target_relation.render() ~ \"`\") }}\n\n {% else %}\n -- this only happens if the user provides a value other than `apply`, 'skip', 'fail'\n {{ exceptions.raise_compiler_error(\"Unexpected configuration scenario\") }}\n\n {% endif %}\n\n {% endif %}\n\n {% do return(build_sql) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.should_full_refresh", "macro.dbt.get_create_materialized_view_as_sql", "macro.dbt.get_replace_sql", "macro.dbt.get_materialized_view_configuration_changes", "macro.dbt.refresh_materialized_view", "macro.dbt.get_alter_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "existing_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}, {"name": "backup_relation", "type": null, "description": ""}, {"name": "intermediate_relation", "type": null, "description": ""}], "created_at": 1783708210.8302398, "supported_languages": null}, "macro.dbt.materialized_view_execute_no_op": {"name": "materialized_view_execute_no_op", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_execute_no_op", "macro_sql": "{% macro materialized_view_execute_no_op(target_relation) %}\n {% do store_raw_result(\n name=\"main\",\n message=\"skip \" ~ target_relation,\n code=\"skip\",\n rows_affected=\"-1\"\n ) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}], "created_at": 1783708210.8307183, "supported_languages": null}, "macro.dbt.materialized_view_execute_build_sql": {"name": "materialized_view_execute_build_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view.sql", "unique_id": "macro.dbt.materialized_view_execute_build_sql", "macro_sql": "{% macro materialized_view_execute_build_sql(build_sql, existing_relation, target_relation, post_hooks) %}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set grant_config = config.get('grants') %}\n\n {% call statement(name=\"main\") %}\n {{ build_sql }}\n {% endcall %}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "build_sql", "type": null, "description": ""}, {"name": "existing_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}, {"name": "post_hooks", "type": null, "description": ""}], "created_at": 1783708210.8320239, "supported_languages": null}, "macro.dbt.materialization_table_default": {"name": "materialization_table_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table.sql", "original_file_path": "macros/materializations/models/table.sql", "unique_id": "macro.dbt.materialization_table_default", "macro_sql": "{% materialization table, default %}\n\n {%- set existing_relation = load_cached_relation(this) -%}\n {%- set target_relation = this.incorporate(type='table') %}\n {%- set intermediate_relation = make_intermediate_relation(target_relation) -%}\n -- the intermediate_relation should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation\n {%- set preexisting_intermediate_relation = load_cached_relation(intermediate_relation) -%}\n /*\n See ../view/view.sql for more information about this relation.\n */\n {%- set backup_relation_type = 'table' if existing_relation is none else existing_relation.type -%}\n {%- set backup_relation = make_backup_relation(target_relation, backup_relation_type) -%}\n -- as above, the backup_relation should not already exist\n {%- set preexisting_backup_relation = load_cached_relation(backup_relation) -%}\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n\n -- drop the temp relations if they exist already in the database\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_table_as_sql(False, intermediate_relation, sql) }}\n {%- endcall %}\n\n {% do create_indexes(intermediate_relation) %}\n\n -- cleanup\n {% if existing_relation is not none %}\n /* Do the equivalent of rename_if_exists. 'existing_relation' could have been dropped\n since the variable was first set. */\n {% set existing_relation = load_cached_relation(existing_relation) %}\n {% if existing_relation is not none %}\n {{ adapter.rename_relation(existing_relation, backup_relation) }}\n {% endif %}\n {% endif %}\n\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n -- finally, drop the existing/backup relation after the commit\n {{ drop_relation_if_exists(backup_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.get_create_table_as_sql", "macro.dbt.create_indexes", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1783708210.8362298, "supported_languages": ["sql"]}, "macro.dbt.incremental_validate_on_schema_change": {"name": "incremental_validate_on_schema_change", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.incremental_validate_on_schema_change", "macro_sql": "{% macro incremental_validate_on_schema_change(on_schema_change, default='ignore') %}\n\n {% if on_schema_change not in ['sync_all_columns', 'append_new_columns', 'fail', 'ignore'] %}\n\n {% set log_message = 'Invalid value for on_schema_change (%s) specified. Setting default value of %s.' % (on_schema_change, default) %}\n {% do log(log_message) %}\n\n {{ return(default) }}\n\n {% else %}\n\n {{ return(on_schema_change) }}\n\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "on_schema_change", "type": null, "description": ""}, {"name": "default", "type": null, "description": ""}], "created_at": 1783708210.8386872, "supported_languages": null}, "macro.dbt.check_for_schema_changes": {"name": "check_for_schema_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.check_for_schema_changes", "macro_sql": "{% macro check_for_schema_changes(source_relation, target_relation) %}\n {{ return(adapter.dispatch('check_for_schema_changes', 'dbt')(source_relation, target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__check_for_schema_changes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1783708210.8391476, "supported_languages": null}, "macro.dbt.default__check_for_schema_changes": {"name": "default__check_for_schema_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.default__check_for_schema_changes", "macro_sql": "{% macro default__check_for_schema_changes(source_relation, target_relation) %}\n\n {% set schema_changed = False %}\n\n {%- set source_columns = adapter.get_columns_in_relation(source_relation) -%}\n {%- set target_columns = adapter.get_columns_in_relation(target_relation) -%}\n {%- set source_not_in_target = diff_columns(source_columns, target_columns) -%}\n {%- set target_not_in_source = diff_columns(target_columns, source_columns) -%}\n\n {% set new_target_types = diff_column_data_types(source_columns, target_columns) %}\n\n {% if source_not_in_target != [] %}\n {% set schema_changed = True %}\n {% elif target_not_in_source != [] or new_target_types != [] %}\n {% set schema_changed = True %}\n {% elif new_target_types != [] %}\n {% set schema_changed = True %}\n {% endif %}\n\n {% set changes_dict = {\n 'schema_changed': schema_changed,\n 'source_not_in_target': source_not_in_target,\n 'target_not_in_source': target_not_in_source,\n 'source_columns': source_columns,\n 'target_columns': target_columns,\n 'new_target_types': new_target_types\n } %}\n\n {% set msg %}\n In {{ target_relation }}:\n Schema changed: {{ schema_changed }}\n Source columns not in target: {{ source_not_in_target }}\n Target columns not in source: {{ target_not_in_source }}\n New column types: {{ new_target_types }}\n {% endset %}\n\n {% do log(msg) %}\n\n {{ return(changes_dict) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.diff_columns", "macro.dbt.diff_column_data_types"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1783708210.84174, "supported_languages": null}, "macro.dbt.sync_column_schemas": {"name": "sync_column_schemas", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.sync_column_schemas", "macro_sql": "{% macro sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n {{ return(adapter.dispatch('sync_column_schemas', 'dbt')(on_schema_change, target_relation, schema_changes_dict)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__sync_column_schemas"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "on_schema_change", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}, {"name": "schema_changes_dict", "type": null, "description": ""}], "created_at": 1783708210.842256, "supported_languages": null}, "macro.dbt.default__sync_column_schemas": {"name": "default__sync_column_schemas", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.default__sync_column_schemas", "macro_sql": "{% macro default__sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n\n {%- set add_to_target_arr = schema_changes_dict['source_not_in_target'] -%}\n {%- set remove_from_target_arr = schema_changes_dict['target_not_in_source'] -%}\n {%- set new_target_types = schema_changes_dict['new_target_types'] -%}\n\n {%- if on_schema_change == 'append_new_columns'-%}\n {%- if add_to_target_arr | length > 0 -%}\n {%- do alter_relation_add_remove_columns(target_relation, add_to_target_arr, none) -%}\n {%- endif -%}\n\n {% elif on_schema_change == 'sync_all_columns' %}\n\n {% if add_to_target_arr | length > 0 or remove_from_target_arr | length > 0 %}\n {%- do alter_relation_add_remove_columns(target_relation, add_to_target_arr, remove_from_target_arr) -%}\n {% endif %}\n\n {% if new_target_types != [] %}\n {% for ntt in new_target_types %}\n {% set column_name = ntt['column_name'] %}\n {% set new_type = ntt['new_type'] %}\n {% do alter_column_type(target_relation, column_name, new_type) %}\n {% endfor %}\n {% endif %}\n\n {% endif %}\n\n {% set schema_change_message %}\n In {{ target_relation }}:\n Schema change approach: {{ on_schema_change }}\n Columns added: {{ add_to_target_arr }}\n Columns removed: {{ remove_from_target_arr }}\n Data types changed: {{ new_target_types }}\n {% endset %}\n\n {% do log(schema_change_message) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.alter_relation_add_remove_columns", "macro.dbt.alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "on_schema_change", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}, {"name": "schema_changes_dict", "type": null, "description": ""}], "created_at": 1783708210.8446622, "supported_languages": null}, "macro.dbt.process_schema_changes": {"name": "process_schema_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.process_schema_changes", "macro_sql": "{% macro process_schema_changes(on_schema_change, source_relation, target_relation) %}\n {{ return(adapter.dispatch('process_schema_changes', 'dbt')(on_schema_change, source_relation, target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__process_schema_changes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "on_schema_change", "type": null, "description": ""}, {"name": "source_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1783708210.8451688, "supported_languages": null}, "macro.dbt.default__process_schema_changes": {"name": "default__process_schema_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "unique_id": "macro.dbt.default__process_schema_changes", "macro_sql": "{% macro default__process_schema_changes(on_schema_change, source_relation, target_relation) %}\n\n {% if on_schema_change == 'ignore' %}\n\n {{ return({}) }}\n\n {% else %}\n\n {% set schema_changes_dict = check_for_schema_changes(source_relation, target_relation) %}\n\n {% if schema_changes_dict['schema_changed'] %}\n\n {% if on_schema_change == 'fail' %}\n\n {% set fail_msg %}\n The source and target schemas on this incremental model are out of sync!\n They can be reconciled in several ways:\n - set the `on_schema_change` config to either append_new_columns or sync_all_columns, depending on your situation.\n - Re-run the incremental model with `full_refresh: True` to update the target schema.\n - update the schema manually and re-run the process.\n\n Additional troubleshooting context:\n Source columns not in target: {{ schema_changes_dict['source_not_in_target'] }}\n Target columns not in source: {{ schema_changes_dict['target_not_in_source'] }}\n New column types: {{ schema_changes_dict['new_target_types'] }}\n {% endset %}\n\n {% do exceptions.raise_compiler_error(fail_msg) %}\n\n {# -- unless we ignore, run the sync operation per the config #}\n {% else %}\n\n {% do sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n\n {% endif %}\n\n {% endif %}\n\n {{ return(schema_changes_dict['source_columns']) }}\n\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.check_for_schema_changes", "macro.dbt.sync_column_schemas"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "on_schema_change", "type": null, "description": ""}, {"name": "source_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1783708210.8468442, "supported_languages": null}, "macro.dbt.get_merge_sql": {"name": "get_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.get_merge_sql", "macro_sql": "{% macro get_merge_sql(target, source, unique_key, dest_columns, incremental_predicates=none) -%}\n -- back compat for old kwarg name\n {% set incremental_predicates = kwargs.get('predicates', incremental_predicates) %}\n {{ adapter.dispatch('get_merge_sql', 'dbt')(target, source, unique_key, dest_columns, incremental_predicates) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "unique_key", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}, {"name": "incremental_predicates", "type": null, "description": ""}], "created_at": 1783708210.8490016, "supported_languages": null}, "macro.dbt.get_merge_unique_key_match": {"name": "get_merge_unique_key_match", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.get_merge_unique_key_match", "macro_sql": "{% macro get_merge_unique_key_match(source_unique_key, target_unique_key) %}\n {{ return(adapter.dispatch('get_merge_unique_key_match', 'dbt')(source_unique_key, target_unique_key)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_merge_unique_key_match"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_unique_key", "type": null, "description": ""}, {"name": "target_unique_key", "type": null, "description": ""}], "created_at": 1783708210.8494573, "supported_languages": null}, "macro.dbt.default__get_merge_unique_key_match": {"name": "default__get_merge_unique_key_match", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.default__get_merge_unique_key_match", "macro_sql": "{% macro default__get_merge_unique_key_match(source_unique_key, target_unique_key) -%}\n {{ return(equals(source_unique_key, target_unique_key) | trim) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.equals"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_unique_key", "type": null, "description": ""}, {"name": "target_unique_key", "type": null, "description": ""}], "created_at": 1783708210.8498087, "supported_languages": null}, "macro.dbt.default__get_merge_sql": {"name": "default__get_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.default__get_merge_sql", "macro_sql": "{% macro default__get_merge_sql(target, source, unique_key, dest_columns, incremental_predicates=none) -%}\n {%- set predicates = [] if incremental_predicates is none else [] + incremental_predicates -%}\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n {%- set merge_update_columns = config.get('merge_update_columns') -%}\n {%- set merge_exclude_columns = config.get('merge_exclude_columns') -%}\n {%- set update_columns = get_merge_update_columns(merge_update_columns, merge_exclude_columns, dest_columns) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {% if unique_key %}\n {% if unique_key is sequence and unique_key is not mapping and unique_key is not string %}\n {% for key in unique_key %}\n {% set this_key_match %}\n DBT_INTERNAL_SOURCE.{{ key }} = DBT_INTERNAL_DEST.{{ key }}\n {% endset %}\n {% do predicates.append(this_key_match) %}\n {% endfor %}\n {% else %}\n {% set source_unique_key = (\"DBT_INTERNAL_SOURCE.\" ~ unique_key) | trim %}\n {% set target_unique_key = (\"DBT_INTERNAL_DEST.\" ~ unique_key) | trim %}\n {% set unique_key_match = get_merge_unique_key_match(source_unique_key, target_unique_key) %}\n {% do predicates.append(unique_key_match) %}\n {% endif %}\n {% else %}\n {% do predicates.append('FALSE') %}\n {% endif %}\n\n {{ sql_header if sql_header is not none }}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on {{\"(\" ~ predicates | join(\") and (\") ~ \")\"}}\n\n {% if unique_key %}\n when matched then update set\n {% for column_name in update_columns -%}\n {{ column_name }} = DBT_INTERNAL_SOURCE.{{ column_name }}\n {%- if not loop.last %}, {%- endif %}\n {%- endfor %}\n {% endif %}\n\n when not matched then insert\n ({{ dest_cols_csv }})\n values\n ({{ dest_cols_csv }})\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv", "macro.dbt.get_merge_update_columns", "macro.dbt.get_merge_unique_key_match"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "unique_key", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}, {"name": "incremental_predicates", "type": null, "description": ""}], "created_at": 1783708210.8533163, "supported_languages": null}, "macro.dbt.get_delete_insert_merge_sql": {"name": "get_delete_insert_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.get_delete_insert_merge_sql", "macro_sql": "{% macro get_delete_insert_merge_sql(target, source, unique_key, dest_columns, incremental_predicates) -%}\n {{ adapter.dispatch('get_delete_insert_merge_sql', 'dbt')(target, source, unique_key, dest_columns, incremental_predicates) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "unique_key", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}, {"name": "incremental_predicates", "type": null, "description": ""}], "created_at": 1783708210.8541963, "supported_languages": null}, "macro.dbt.default__get_delete_insert_merge_sql": {"name": "default__get_delete_insert_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.default__get_delete_insert_merge_sql", "macro_sql": "{% macro default__get_delete_insert_merge_sql(target, source, unique_key, dest_columns, incremental_predicates) -%}\n\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n\n {% if unique_key %}\n {% if unique_key is string %}\n {% set unique_key = [unique_key] %}\n {% endif %}\n\n {%- set unique_key_str = unique_key|join(', ') -%}\n\n delete from {{ target }} as DBT_INTERNAL_DEST\n where ({{ unique_key_str }}) in (\n select distinct {{ unique_key_str }}\n from {{ source }} as DBT_INTERNAL_SOURCE\n )\n {%- if incremental_predicates %}\n {% for predicate in incremental_predicates %}\n and {{ predicate }}\n {% endfor %}\n {%- endif -%};\n\n {% endif %}\n\n insert into {{ target }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ source }}\n )\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "unique_key", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}, {"name": "incremental_predicates", "type": null, "description": ""}], "created_at": 1783708210.855648, "supported_languages": null}, "macro.dbt.get_insert_overwrite_merge_sql": {"name": "get_insert_overwrite_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.get_insert_overwrite_merge_sql", "macro_sql": "{% macro get_insert_overwrite_merge_sql(target, source, dest_columns, predicates, include_sql_header=false) -%}\n {{ adapter.dispatch('get_insert_overwrite_merge_sql', 'dbt')(target, source, dest_columns, predicates, include_sql_header) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_insert_overwrite_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}, {"name": "predicates", "type": null, "description": ""}, {"name": "include_sql_header", "type": null, "description": ""}], "created_at": 1783708210.8561966, "supported_languages": null}, "macro.dbt.default__get_insert_overwrite_merge_sql": {"name": "default__get_insert_overwrite_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "unique_id": "macro.dbt.default__get_insert_overwrite_merge_sql", "macro_sql": "{% macro default__get_insert_overwrite_merge_sql(target, source, dest_columns, predicates, include_sql_header) -%}\n {#-- The only time include_sql_header is True: --#}\n {#-- BigQuery + insert_overwrite strategy + \"static\" partitions config --#}\n {#-- We should consider including the sql header at the materialization level instead --#}\n\n {%- set predicates = [] if predicates is none else [] + predicates -%}\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none and include_sql_header }}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on FALSE\n\n when not matched by source\n {% if predicates %} and {{ predicates | join(' and ') }} {% endif %}\n then delete\n\n when not matched then insert\n ({{ dest_cols_csv }})\n values\n ({{ dest_cols_csv }})\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}, {"name": "predicates", "type": null, "description": ""}, {"name": "include_sql_header", "type": null, "description": ""}], "created_at": 1783708210.8574991, "supported_languages": null}, "macro.dbt.materialization_incremental_default": {"name": "materialization_incremental_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/incremental.sql", "original_file_path": "macros/materializations/models/incremental/incremental.sql", "unique_id": "macro.dbt.materialization_incremental_default", "macro_sql": "{% materialization incremental, default -%}\n\n -- relations\n {%- set existing_relation = load_cached_relation(this) -%}\n {%- set target_relation = this.incorporate(type='table') -%}\n {%- set temp_relation = make_temp_relation(target_relation)-%}\n {%- set intermediate_relation = make_intermediate_relation(target_relation)-%}\n {%- set backup_relation_type = 'table' if existing_relation is none else existing_relation.type -%}\n {%- set backup_relation = make_backup_relation(target_relation, backup_relation_type) -%}\n\n -- configs\n {%- set unique_key = config.get('unique_key') -%}\n {%- set full_refresh_mode = (should_full_refresh() or existing_relation.is_view) -%}\n {%- set on_schema_change = incremental_validate_on_schema_change(config.get('on_schema_change'), default='ignore') -%}\n\n -- the temp_ and backup_ relations should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation. This has to happen before\n -- BEGIN, in a separate transaction\n {%- set preexisting_intermediate_relation = load_cached_relation(intermediate_relation)-%}\n {%- set preexisting_backup_relation = load_cached_relation(backup_relation) -%}\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set to_drop = [] %}\n\n {% set incremental_strategy = config.get('incremental_strategy') or 'default' %}\n {% set strategy_sql_macro_func = adapter.get_incremental_strategy_macro(context, incremental_strategy) %}\n\n {% if existing_relation is none %}\n {% set build_sql = get_create_table_as_sql(False, target_relation, sql) %}\n {% set relation_for_indexes = target_relation %}\n {% elif full_refresh_mode %}\n {% set build_sql = get_create_table_as_sql(False, intermediate_relation, sql) %}\n {% set relation_for_indexes = intermediate_relation %}\n {% set need_swap = true %}\n {% else %}\n {% do run_query(get_create_table_as_sql(True, temp_relation, sql)) %}\n {% set relation_for_indexes = temp_relation %}\n {% set contract_config = config.get('contract') %}\n {% if not contract_config or not contract_config.enforced %}\n {% do adapter.expand_target_column_types(\n from_relation=temp_relation,\n to_relation=target_relation) %}\n {% endif %}\n {#-- Process schema changes. Returns dict of changes if successful. Use source columns for upserting/merging --#}\n {% set dest_columns = process_schema_changes(on_schema_change, temp_relation, existing_relation) %}\n {% if not dest_columns %}\n {% set dest_columns = adapter.get_columns_in_relation(existing_relation) %}\n {% endif %}\n\n {#-- Get the incremental_strategy, the macro to use for the strategy, and build the sql --#}\n {% set incremental_predicates = config.get('predicates', none) or config.get('incremental_predicates', none) %}\n {% set strategy_arg_dict = ({'target_relation': target_relation, 'temp_relation': temp_relation, 'unique_key': unique_key, 'dest_columns': dest_columns, 'incremental_predicates': incremental_predicates }) %}\n {% set build_sql = strategy_sql_macro_func(strategy_arg_dict) %}\n\n {% endif %}\n\n {% call statement(\"main\") %}\n {{ build_sql }}\n {% endcall %}\n\n {% if existing_relation is none or existing_relation.is_view or should_full_refresh() %}\n {% do create_indexes(relation_for_indexes) %}\n {% endif %}\n\n {% if need_swap %}\n {% do adapter.rename_relation(target_relation, backup_relation) %}\n {% do adapter.rename_relation(intermediate_relation, target_relation) %}\n {% do to_drop.append(backup_relation) %}\n {% endif %}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {% do adapter.commit() %}\n\n {% for rel in to_drop %}\n {% do adapter.drop_relation(rel) %}\n {% endfor %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_temp_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.should_full_refresh", "macro.dbt.incremental_validate_on_schema_change", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.get_create_table_as_sql", "macro.dbt.run_query", "macro.dbt.process_schema_changes", "macro.dbt.statement", "macro.dbt.create_indexes", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1783708210.8660178, "supported_languages": ["sql"]}, "macro.dbt.get_incremental_append_sql": {"name": "get_incremental_append_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_append_sql", "macro_sql": "{% macro get_incremental_append_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_append_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_incremental_append_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1783708210.8673234, "supported_languages": null}, "macro.dbt.default__get_incremental_append_sql": {"name": "default__get_incremental_append_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_append_sql", "macro_sql": "{% macro default__get_incremental_append_sql(arg_dict) %}\n\n {% do return(get_insert_into_sql(arg_dict[\"target_relation\"], arg_dict[\"temp_relation\"], arg_dict[\"dest_columns\"])) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_insert_into_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1783708210.8678086, "supported_languages": null}, "macro.dbt.get_incremental_delete_insert_sql": {"name": "get_incremental_delete_insert_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_delete_insert_sql", "macro_sql": "{% macro get_incremental_delete_insert_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_delete_insert_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_incremental_delete_insert_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1783708210.8682222, "supported_languages": null}, "macro.dbt.default__get_incremental_delete_insert_sql": {"name": "default__get_incremental_delete_insert_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_delete_insert_sql", "macro_sql": "{% macro default__get_incremental_delete_insert_sql(arg_dict) %}\n\n {% do return(get_delete_insert_merge_sql(arg_dict[\"target_relation\"], arg_dict[\"temp_relation\"], arg_dict[\"unique_key\"], arg_dict[\"dest_columns\"], arg_dict[\"incremental_predicates\"])) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1783708210.8688037, "supported_languages": null}, "macro.dbt.get_incremental_merge_sql": {"name": "get_incremental_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_merge_sql", "macro_sql": "{% macro get_incremental_merge_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_merge_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_incremental_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1783708210.8692038, "supported_languages": null}, "macro.dbt.default__get_incremental_merge_sql": {"name": "default__get_incremental_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_merge_sql", "macro_sql": "{% macro default__get_incremental_merge_sql(arg_dict) %}\n\n {% do return(get_merge_sql(arg_dict[\"target_relation\"], arg_dict[\"temp_relation\"], arg_dict[\"unique_key\"], arg_dict[\"dest_columns\"], arg_dict[\"incremental_predicates\"])) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1783708210.869777, "supported_languages": null}, "macro.dbt.get_incremental_insert_overwrite_sql": {"name": "get_incremental_insert_overwrite_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_insert_overwrite_sql", "macro_sql": "{% macro get_incremental_insert_overwrite_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_insert_overwrite_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_incremental_insert_overwrite_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1783708210.8701737, "supported_languages": null}, "macro.dbt.default__get_incremental_insert_overwrite_sql": {"name": "default__get_incremental_insert_overwrite_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_insert_overwrite_sql", "macro_sql": "{% macro default__get_incremental_insert_overwrite_sql(arg_dict) %}\n\n {% do return(get_insert_overwrite_merge_sql(arg_dict[\"target_relation\"], arg_dict[\"temp_relation\"], arg_dict[\"dest_columns\"], arg_dict[\"incremental_predicates\"])) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_insert_overwrite_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1783708210.8706913, "supported_languages": null}, "macro.dbt.get_incremental_default_sql": {"name": "get_incremental_default_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_default_sql", "macro_sql": "{% macro get_incremental_default_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_default_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_incremental_default_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1783708210.8710775, "supported_languages": null}, "macro.dbt.default__get_incremental_default_sql": {"name": "default__get_incremental_default_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_default_sql", "macro_sql": "{% macro default__get_incremental_default_sql(arg_dict) %}\n\n {% do return(get_incremental_append_sql(arg_dict)) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_incremental_append_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1783708210.8713892, "supported_languages": null}, "macro.dbt.get_incremental_microbatch_sql": {"name": "get_incremental_microbatch_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_incremental_microbatch_sql", "macro_sql": "{% macro get_incremental_microbatch_sql(arg_dict) %}\n\n {{ return(adapter.dispatch('get_incremental_microbatch_sql', 'dbt')(arg_dict)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_incremental_microbatch_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1783708210.8717575, "supported_languages": null}, "macro.dbt.default__get_incremental_microbatch_sql": {"name": "default__get_incremental_microbatch_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.default__get_incremental_microbatch_sql", "macro_sql": "{% macro default__get_incremental_microbatch_sql(arg_dict) %}\n\n {{ exceptions.raise_not_implemented('microbatch materialization strategy not implemented for adapter ' + adapter.type()) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "arg_dict", "type": null, "description": ""}], "created_at": 1783708210.8721044, "supported_languages": null}, "macro.dbt.get_insert_into_sql": {"name": "get_insert_into_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/strategies.sql", "original_file_path": "macros/materializations/models/incremental/strategies.sql", "unique_id": "macro.dbt.get_insert_into_sql", "macro_sql": "{% macro get_insert_into_sql(target_relation, temp_relation, dest_columns) %}\n\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n\n insert into {{ target_relation }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ temp_relation }}\n )\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}, {"name": "temp_relation", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}], "created_at": 1783708210.8726726, "supported_languages": null}, "macro.dbt.get_quoted_csv": {"name": "get_quoted_csv", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.get_quoted_csv", "macro_sql": "{% macro get_quoted_csv(column_names) %}\n\n {% set quoted = [] %}\n {% for col in column_names -%}\n {%- do quoted.append(adapter.quote(col)) -%}\n {%- endfor %}\n\n {%- set dest_cols_csv = quoted | join(', ') -%}\n {{ return(dest_cols_csv) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column_names", "type": null, "description": ""}], "created_at": 1783708210.8743107, "supported_languages": null}, "macro.dbt.diff_columns": {"name": "diff_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.diff_columns", "macro_sql": "{% macro diff_columns(source_columns, target_columns) %}\n\n {% set result = [] %}\n {% set source_names = source_columns | map(attribute = 'column') | list %}\n {% set target_names = target_columns | map(attribute = 'column') | list %}\n\n {# --check whether the name attribute exists in the target - this does not perform a data type check #}\n {% for sc in source_columns %}\n {% if sc.name not in target_names %}\n {{ result.append(sc) }}\n {% endif %}\n {% endfor %}\n\n {{ return(result) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_columns", "type": null, "description": ""}, {"name": "target_columns", "type": null, "description": ""}], "created_at": 1783708210.875524, "supported_languages": null}, "macro.dbt.diff_column_data_types": {"name": "diff_column_data_types", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.diff_column_data_types", "macro_sql": "{% macro diff_column_data_types(source_columns, target_columns) %}\n {{ return(adapter.dispatch('diff_column_data_types', 'dbt')(source_columns, target_columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__diff_column_data_types"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_columns", "type": null, "description": ""}, {"name": "target_columns", "type": null, "description": ""}], "created_at": 1783708210.8759618, "supported_languages": null}, "macro.dbt.default__diff_column_data_types": {"name": "default__diff_column_data_types", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.default__diff_column_data_types", "macro_sql": "{% macro default__diff_column_data_types(source_columns, target_columns) %}\n {% set result = [] %}\n {% for sc in source_columns %}\n {% set tc = target_columns | selectattr(\"name\", \"equalto\", sc.name) | list | first %}\n {% if tc %}\n {% if sc.expanded_data_type != tc.expanded_data_type and not sc.can_expand_to(other_column=tc) %}\n {{ result.append( { 'column_name': tc.name, 'new_type': sc.expanded_data_type } ) }}\n {% endif %}\n {% endif %}\n {% endfor %}\n\n {{ return(result) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_columns", "type": null, "description": ""}, {"name": "target_columns", "type": null, "description": ""}], "created_at": 1783708210.8773062, "supported_languages": null}, "macro.dbt.get_merge_update_columns": {"name": "get_merge_update_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.get_merge_update_columns", "macro_sql": "{% macro get_merge_update_columns(merge_update_columns, merge_exclude_columns, dest_columns) %}\n {{ return(adapter.dispatch('get_merge_update_columns', 'dbt')(merge_update_columns, merge_exclude_columns, dest_columns)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_merge_update_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "merge_update_columns", "type": null, "description": ""}, {"name": "merge_exclude_columns", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}], "created_at": 1783708210.87778, "supported_languages": null}, "macro.dbt.default__get_merge_update_columns": {"name": "default__get_merge_update_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "unique_id": "macro.dbt.default__get_merge_update_columns", "macro_sql": "{% macro default__get_merge_update_columns(merge_update_columns, merge_exclude_columns, dest_columns) %}\n {%- set default_cols = dest_columns | map(attribute=\"quoted\") | list -%}\n\n {%- if merge_update_columns and merge_exclude_columns -%}\n {{ exceptions.raise_compiler_error(\n 'Model cannot specify merge_update_columns and merge_exclude_columns. Please update model to use only one config'\n )}}\n {%- elif merge_update_columns -%}\n {%- set update_columns = merge_update_columns -%}\n {%- elif merge_exclude_columns -%}\n {%- set update_columns = [] -%}\n {%- for column in dest_columns -%}\n {% if column.column | lower not in merge_exclude_columns | map(\"lower\") | list %}\n {%- do update_columns.append(column.quoted) -%}\n {% endif %}\n {%- endfor -%}\n {%- else -%}\n {%- set update_columns = default_cols -%}\n {%- endif -%}\n\n {{ return(update_columns) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "merge_update_columns", "type": null, "description": ""}, {"name": "merge_exclude_columns", "type": null, "description": ""}, {"name": "dest_columns", "type": null, "description": ""}], "created_at": 1783708210.8792531, "supported_languages": null}, "macro.dbt.is_incremental": {"name": "is_incremental", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/incremental/is_incremental.sql", "original_file_path": "macros/materializations/models/incremental/is_incremental.sql", "unique_id": "macro.dbt.is_incremental", "macro_sql": "{% macro is_incremental() %}\n {#-- do not run introspective queries in parsing #}\n {% if not execute %}\n {{ return(False) }}\n {% else %}\n {% set relation = adapter.get_relation(this.database, this.schema, this.table) %}\n {{ return(relation is not none\n and relation.type == 'table'\n and model.config.materialized == 'incremental'\n and not should_full_refresh()) }}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.should_full_refresh"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.8804073, "supported_languages": null}, "macro.dbt.can_clone_table": {"name": "can_clone_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/can_clone_table.sql", "original_file_path": "macros/materializations/models/clone/can_clone_table.sql", "unique_id": "macro.dbt.can_clone_table", "macro_sql": "{% macro can_clone_table() %}\n {{ return(adapter.dispatch('can_clone_table', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__can_clone_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.88088, "supported_languages": null}, "macro.dbt.default__can_clone_table": {"name": "default__can_clone_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/can_clone_table.sql", "original_file_path": "macros/materializations/models/clone/can_clone_table.sql", "unique_id": "macro.dbt.default__can_clone_table", "macro_sql": "{% macro default__can_clone_table() %}\n {{ return(False) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.881148, "supported_languages": null}, "macro.dbt.create_or_replace_clone": {"name": "create_or_replace_clone", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/create_or_replace_clone.sql", "original_file_path": "macros/materializations/models/clone/create_or_replace_clone.sql", "unique_id": "macro.dbt.create_or_replace_clone", "macro_sql": "{% macro create_or_replace_clone(this_relation, defer_relation) %}\n {{ return(adapter.dispatch('create_or_replace_clone', 'dbt')(this_relation, defer_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_or_replace_clone"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "this_relation", "type": null, "description": ""}, {"name": "defer_relation", "type": null, "description": ""}], "created_at": 1783708210.881712, "supported_languages": null}, "macro.dbt.default__create_or_replace_clone": {"name": "default__create_or_replace_clone", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/create_or_replace_clone.sql", "original_file_path": "macros/materializations/models/clone/create_or_replace_clone.sql", "unique_id": "macro.dbt.default__create_or_replace_clone", "macro_sql": "{% macro default__create_or_replace_clone(this_relation, defer_relation) %}\n create or replace table {{ this_relation.render() }} clone {{ defer_relation.render() }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "this_relation", "type": null, "description": ""}, {"name": "defer_relation", "type": null, "description": ""}], "created_at": 1783708210.8820748, "supported_languages": null}, "macro.dbt.materialization_clone_default": {"name": "materialization_clone_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/clone.sql", "original_file_path": "macros/materializations/models/clone/clone.sql", "unique_id": "macro.dbt.materialization_clone_default", "macro_sql": "{%- materialization clone, default -%}\n\n {%- set relations = {'relations': []} -%}\n\n {%- if not defer_relation -%}\n -- nothing to do\n {{ log(\"No relation found in state manifest for \" ~ model.unique_id, info=True) }}\n {{ return(relations) }}\n {%- endif -%}\n\n {%- set existing_relation = load_cached_relation(this) -%}\n\n {%- if existing_relation and not flags.FULL_REFRESH -%}\n -- noop!\n {{ log(\"Relation \" ~ existing_relation ~ \" already exists\", info=True) }}\n {{ return(relations) }}\n {%- endif -%}\n\n {%- set other_existing_relation = load_cached_relation(defer_relation) -%}\n\n -- If this is a database that can do zero-copy cloning of tables, and the other relation is a table, then this will be a table\n -- Otherwise, this will be a view\n\n {% set can_clone_table = can_clone_table() %}\n {%- set grant_config = config.get('grants') -%}\n\n {%- if other_existing_relation and other_existing_relation.type == 'table' and can_clone_table -%}\n\n {%- set target_relation = this.incorporate(type='table') -%}\n {% if existing_relation is not none and not existing_relation.is_table %}\n {{ log(\"Dropping relation \" ~ existing_relation.render() ~ \" because it is of type \" ~ existing_relation.type) }}\n {{ drop_relation_if_exists(existing_relation) }}\n {% endif %}\n\n -- as a general rule, data platforms that can clone tables can also do atomic 'create or replace'\n {% if target_relation.database == defer_relation.database and\n target_relation.schema == defer_relation.schema and\n target_relation.identifier == defer_relation.identifier %}\n {{ log(\"Target relation and defer relation are the same, skipping clone for relation: \" ~ target_relation.render()) }}\n {% else %}\n {% call statement('main') %}\n {{ create_or_replace_clone(target_relation, defer_relation) }}\n {% endcall %}\n {% endif %}\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n {% do persist_docs(target_relation, model) %}\n\n {{ return({'relations': [target_relation]}) }}\n\n {%- else -%}\n\n {%- set target_relation = this.incorporate(type='view') -%}\n\n -- reuse the view materialization\n -- TODO: support actual dispatch for materialization macros\n -- Tracking ticket: https://github.com/dbt-labs/dbt-core/issues/7799\n {% set search_name = \"materialization_view_\" ~ adapter.type() %}\n {% if not search_name in context %}\n {% set search_name = \"materialization_view_default\" %}\n {% endif %}\n {% set materialization_macro = context[search_name] %}\n {% set relations = materialization_macro() %}\n {{ return(relations) }}\n\n {%- endif -%}\n\n{%- endmaterialization -%}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.can_clone_table", "macro.dbt.drop_relation_if_exists", "macro.dbt.statement", "macro.dbt.create_or_replace_clone", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1783708210.8873022, "supported_languages": ["sql"]}, "macro.dbt.function_execute_build_sql": {"name": "function_execute_build_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/helpers.sql", "original_file_path": "macros/materializations/functions/helpers.sql", "unique_id": "macro.dbt.function_execute_build_sql", "macro_sql": "{% macro function_execute_build_sql(build_sql, existing_relation, target_relation) %}\n {{ return(adapter.dispatch('function_execute_build_sql', 'dbt')(build_sql, existing_relation, target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__function_execute_build_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "build_sql", "type": null, "description": ""}, {"name": "existing_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1783708210.8880794, "supported_languages": null}, "macro.dbt.default__function_execute_build_sql": {"name": "default__function_execute_build_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/helpers.sql", "original_file_path": "macros/materializations/functions/helpers.sql", "unique_id": "macro.dbt.default__function_execute_build_sql", "macro_sql": "{% macro default__function_execute_build_sql(build_sql, existing_relation, target_relation) %}\n\n {% set grant_config = config.get('grants') %}\n\n {% call statement(name=\"main\") %}\n {{ build_sql }}\n {% endcall %}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ adapter.commit() }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "build_sql", "type": null, "description": ""}, {"name": "existing_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1783708210.889156, "supported_languages": null}, "macro.dbt.materialization_function_default": {"name": "materialization_function_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/function.sql", "original_file_path": "macros/materializations/functions/function.sql", "unique_id": "macro.dbt.materialization_function_default", "macro_sql": "{% materialization function, default, supported_languages=['sql', 'python', 'javascript'] %}\n {% set existing_relation = load_cached_relation(this) %}\n {% set target_relation = this.incorporate(type=this.Function) %}\n\n {{ run_hooks(pre_hooks) }}\n\n {% set function_config = this.get_function_config(model) %}\n {% set macro_name = this.get_function_macro_name(function_config) %}\n\n {# Doing this aliasing of adapter.dispatch is a hacky way to disable the static analysis of actually calling adapter.dispatch #}\n {# This is necessary because the static analysis breaks being able to dynamically pass a macro_name #}\n {% set _dispatch = adapter.dispatch %}\n\n {% set build_sql = _dispatch(macro_name, 'dbt')(target_relation) %}\n {{ function_execute_build_sql(build_sql, existing_relation, target_relation) }}\n {{ run_hooks(post_hooks) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.run_hooks", "macro.dbt.function_execute_build_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1783708210.8910184, "supported_languages": ["sql", "python", "javascript"]}, "macro.dbt.get_aggregate_function_create_replace_signature": {"name": "get_aggregate_function_create_replace_signature", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.get_aggregate_function_create_replace_signature", "macro_sql": "{% macro get_aggregate_function_create_replace_signature(target_relation) %}\n {{ return(adapter.dispatch('get_aggregate_function_create_replace_signature', 'dbt')(target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_aggregate_function_create_replace_signature"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}], "created_at": 1783708210.8922758, "supported_languages": null}, "macro.dbt.default__get_aggregate_function_create_replace_signature": {"name": "default__get_aggregate_function_create_replace_signature", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.default__get_aggregate_function_create_replace_signature", "macro_sql": "{% macro default__get_aggregate_function_create_replace_signature(target_relation) %}\n CREATE OR REPLACE AGGREGATE FUNCTION {{ target_relation.render() }} ({{ get_formatted_aggregate_function_args()}})\n RETURNS {{ model.returns.data_type }}\n {{ get_function_language_specifier() }}\n {{ get_aggregate_function_volatility_specifier() }}\n {% if model.get('language') == 'python' %}\n {{ get_function_python_options() }}\n {% endif %}\n AS\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_formatted_aggregate_function_args", "macro.dbt.get_function_language_specifier", "macro.dbt.get_aggregate_function_volatility_specifier", "macro.dbt.get_function_python_options"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}], "created_at": 1783708210.8930128, "supported_languages": null}, "macro.dbt.get_formatted_aggregate_function_args": {"name": "get_formatted_aggregate_function_args", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.get_formatted_aggregate_function_args", "macro_sql": "{% macro get_formatted_aggregate_function_args() %}\n {{ return(adapter.dispatch('get_formatted_aggregate_function_args', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_formatted_aggregate_function_args"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.8934026, "supported_languages": null}, "macro.dbt.default__get_formatted_aggregate_function_args": {"name": "default__get_formatted_aggregate_function_args", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.default__get_formatted_aggregate_function_args", "macro_sql": "{% macro default__get_formatted_aggregate_function_args() %}\n {# conveniently we can reuse the sql scalar function args #}\n {{ formatted_scalar_function_args_sql() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.formatted_scalar_function_args_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.8936489, "supported_languages": null}, "macro.dbt.get_function_language_specifier": {"name": "get_function_language_specifier", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.get_function_language_specifier", "macro_sql": "{% macro get_function_language_specifier() %}\n {{ return(adapter.dispatch('get_function_language_specifier', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_function_language_specifier"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.893988, "supported_languages": null}, "macro.dbt.default__get_function_language_specifier": {"name": "default__get_function_language_specifier", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.default__get_function_language_specifier", "macro_sql": "{% macro default__get_function_language_specifier() %}\n {% set language = model.get('language') %}\n {% if language == 'sql' %}\n {# generally you dont need to specify the language for sql functions #}\n {% elif language == 'python' %}\n LANGUAGE PYTHON\n {% elif language == 'javascript' %}\n LANGUAGE js\n {% else %}\n {{ 'LANGUAGE ' ~ language.upper() }}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.8947608, "supported_languages": null}, "macro.dbt.get_aggregate_function_volatility_specifier": {"name": "get_aggregate_function_volatility_specifier", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.get_aggregate_function_volatility_specifier", "macro_sql": "{% macro get_aggregate_function_volatility_specifier() %}\n {{ return(adapter.dispatch('get_aggregate_function_volatility_specifier', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_aggregate_function_volatility_specifier"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.895128, "supported_languages": null}, "macro.dbt.default__get_aggregate_function_volatility_specifier": {"name": "default__get_aggregate_function_volatility_specifier", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.default__get_aggregate_function_volatility_specifier", "macro_sql": "{% macro default__get_aggregate_function_volatility_specifier() %}\n {{ scalar_function_volatility_sql() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.scalar_function_volatility_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.8953543, "supported_languages": null}, "macro.dbt.get_function_python_options": {"name": "get_function_python_options", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.get_function_python_options", "macro_sql": "{% macro get_function_python_options() %}\n {{ return(adapter.dispatch('get_function_python_options', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_function_python_options"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.8956892, "supported_languages": null}, "macro.dbt.default__get_function_python_options": {"name": "default__get_function_python_options", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/aggregate.sql", "original_file_path": "macros/materializations/functions/aggregate.sql", "unique_id": "macro.dbt.default__get_function_python_options", "macro_sql": "{% macro default__get_function_python_options() %}\n RUNTIME_VERSION = '{{ model.config.get('runtime_version') }}'\n HANDLER = '{{ model.config.get('entry_point') }}'\n {% set packages = model.config.get('packages', []) %}\n {% if packages %}\n PACKAGES = ('{{ packages | join(\"','\") }}')\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.8964584, "supported_languages": null}, "macro.dbt.scalar_function_sql": {"name": "scalar_function_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.scalar_function_sql", "macro_sql": "{% macro scalar_function_sql(target_relation) %}\n {{ return(adapter.dispatch('scalar_function_sql', 'dbt')(target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__scalar_function_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}], "created_at": 1783708210.8980112, "supported_languages": null}, "macro.dbt.default__scalar_function_sql": {"name": "default__scalar_function_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__scalar_function_sql", "macro_sql": "{% macro default__scalar_function_sql(target_relation) %}\n {{ scalar_function_create_replace_signature_sql(target_relation) }}\n {{ scalar_function_body_sql() }};\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.scalar_function_create_replace_signature_sql", "macro.dbt.scalar_function_body_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}], "created_at": 1783708210.8984845, "supported_languages": null}, "macro.dbt.scalar_function_create_replace_signature_sql": {"name": "scalar_function_create_replace_signature_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.scalar_function_create_replace_signature_sql", "macro_sql": "{% macro scalar_function_create_replace_signature_sql(target_relation) %}\n {{ return(adapter.dispatch('scalar_function_create_replace_signature_sql', 'dbt')(target_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__scalar_function_create_replace_signature_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}], "created_at": 1783708210.898874, "supported_languages": null}, "macro.dbt.default__scalar_function_create_replace_signature_sql": {"name": "default__scalar_function_create_replace_signature_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__scalar_function_create_replace_signature_sql", "macro_sql": "{% macro default__scalar_function_create_replace_signature_sql(target_relation) %}\n CREATE OR REPLACE FUNCTION {{ target_relation.render() }} ({{ formatted_scalar_function_args_sql()}})\n RETURNS {{ model.returns.data_type }}\n {{ scalar_function_volatility_sql() }}\n AS\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.formatted_scalar_function_args_sql", "macro.dbt.scalar_function_volatility_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target_relation", "type": null, "description": ""}], "created_at": 1783708210.8993452, "supported_languages": null}, "macro.dbt.formatted_scalar_function_args_sql": {"name": "formatted_scalar_function_args_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.formatted_scalar_function_args_sql", "macro_sql": "{% macro formatted_scalar_function_args_sql() %}\n {{ return(adapter.dispatch('formatted_scalar_function_args_sql', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__formatted_scalar_function_args_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.89969, "supported_languages": null}, "macro.dbt.formatted_scalar_function_args_javascript": {"name": "formatted_scalar_function_args_javascript", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.formatted_scalar_function_args_javascript", "macro_sql": "{% macro formatted_scalar_function_args_javascript() %}\n {{ return(adapter.dispatch('formatted_scalar_function_args_javascript', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__formatted_scalar_function_args_javascript"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.9000306, "supported_languages": null}, "macro.dbt.default__formatted_scalar_function_args_sql": {"name": "default__formatted_scalar_function_args_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__formatted_scalar_function_args_sql", "macro_sql": "{% macro default__formatted_scalar_function_args_sql() %}\n {% set args = [] %}\n {% for arg in model.arguments -%}\n {%- do args.append(arg.name ~ ' ' ~ arg.data_type) -%}\n {%- endfor %}\n {{ args | join(', ') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.9007063, "supported_languages": null}, "macro.dbt.default__formatted_scalar_function_args_javascript": {"name": "default__formatted_scalar_function_args_javascript", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__formatted_scalar_function_args_javascript", "macro_sql": "{% macro default__formatted_scalar_function_args_javascript() %}\n {% set msg = \"formatted_scalar_function_args_javascript not implemented for adapter \" ~ adapter.type() %}\n {% do exceptions.raise_compiler_error(msg) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.9011462, "supported_languages": null}, "macro.dbt.scalar_function_body_sql": {"name": "scalar_function_body_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.scalar_function_body_sql", "macro_sql": "{% macro scalar_function_body_sql() %}\n {{ return(adapter.dispatch('scalar_function_body_sql', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__scalar_function_body_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.9014847, "supported_languages": null}, "macro.dbt.default__scalar_function_body_sql": {"name": "default__scalar_function_body_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__scalar_function_body_sql", "macro_sql": "{% macro default__scalar_function_body_sql() %}\n $$\n {{ model.compiled_code }}\n $$ LANGUAGE SQL\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.9016998, "supported_languages": null}, "macro.dbt.scalar_function_volatility_sql": {"name": "scalar_function_volatility_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.scalar_function_volatility_sql", "macro_sql": "{% macro scalar_function_volatility_sql() %}\n {{ return(adapter.dispatch('scalar_function_volatility_sql', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__scalar_function_volatility_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.9020298, "supported_languages": null}, "macro.dbt.scalar_function_volatility_javascript": {"name": "scalar_function_volatility_javascript", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.scalar_function_volatility_javascript", "macro_sql": "{% macro scalar_function_volatility_javascript() %}\n {{ return(adapter.dispatch('scalar_function_volatility_javascript', 'dbt')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__scalar_function_volatility_javascript"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.9024026, "supported_languages": null}, "macro.dbt.default__scalar_function_volatility_javascript": {"name": "default__scalar_function_volatility_javascript", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__scalar_function_volatility_javascript", "macro_sql": "{% macro default__scalar_function_volatility_javascript() %}\n {% set volatility = model.config.get('volatility') %}\n {% if volatility != none %}\n {% set msg = \"Volatility is not supported by \" ~ adapter.type() ~ \" in javascript UDF and will be ignored\" %}\n {% do exceptions.warn(msg) %}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.9031153, "supported_languages": null}, "macro.dbt.default__scalar_function_volatility_sql": {"name": "default__scalar_function_volatility_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__scalar_function_volatility_sql", "macro_sql": "{% macro default__scalar_function_volatility_sql() %}\n {% set volatility = model.config.get('volatility') %}\n {% if volatility == 'deterministic' %}\n IMMUTABLE\n {% elif volatility == 'stable' %}\n STABLE\n {% elif volatility == 'non-deterministic' %}\n VOLATILE\n {% elif volatility != none %}\n {# This shouldn't happen unless a new volatility is invented #}\n {% do unsupported_volatility_warning(volatility) %}\n {% endif %}\n {# If no volatility is set, don't add anything and let the data warehouse default it #}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.unsupported_volatility_warning"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.9039447, "supported_languages": null}, "macro.dbt.unsupported_volatility_warning": {"name": "unsupported_volatility_warning", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.unsupported_volatility_warning", "macro_sql": "{% macro unsupported_volatility_warning(volatility) %}\n {{ return(adapter.dispatch('unsupported_volatility_warning', 'dbt')(volatility)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__unsupported_volatility_warning"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "volatility", "type": null, "description": ""}], "created_at": 1783708210.9043372, "supported_languages": null}, "macro.dbt.default__unsupported_volatility_warning": {"name": "default__unsupported_volatility_warning", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/functions/scalar.sql", "original_file_path": "macros/materializations/functions/scalar.sql", "unique_id": "macro.dbt.default__unsupported_volatility_warning", "macro_sql": "{% macro default__unsupported_volatility_warning(volatility) %}\n {% set msg = \"Found `\" ~ volatility ~ \"` volatility specified on function `\" ~ model.name ~ \"`. This volatility is not supported by \" ~ adapter.type() ~ \", and will be ignored\" %}\n {% do exceptions.warn(msg) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "volatility", "type": null, "description": ""}], "created_at": 1783708210.9048655, "supported_languages": null}, "macro.dbt.create_columns": {"name": "create_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.create_columns", "macro_sql": "{% macro create_columns(relation, columns) %}\n {{ adapter.dispatch('create_columns', 'dbt')(relation, columns) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "columns", "type": null, "description": ""}], "created_at": 1783708210.9087877, "supported_languages": null}, "macro.dbt.default__create_columns": {"name": "default__create_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__create_columns", "macro_sql": "{% macro default__create_columns(relation, columns) %}\n {% for column in columns %}\n {% call statement() %}\n alter table {{ relation.render() }} add column {{ adapter.quote(column.name) }} {{ column.expanded_data_type }};\n {% endcall %}\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "columns", "type": null, "description": ""}], "created_at": 1783708210.9095764, "supported_languages": null}, "macro.dbt.post_snapshot": {"name": "post_snapshot", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.post_snapshot", "macro_sql": "{% macro post_snapshot(staging_relation) %}\n {{ adapter.dispatch('post_snapshot', 'dbt')(staging_relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "staging_relation", "type": null, "description": ""}], "created_at": 1783708210.9099257, "supported_languages": null}, "macro.dbt.default__post_snapshot": {"name": "default__post_snapshot", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__post_snapshot", "macro_sql": "{% macro default__post_snapshot(staging_relation) %}\n {# no-op #}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "staging_relation", "type": null, "description": ""}], "created_at": 1783708210.9101424, "supported_languages": null}, "macro.dbt.get_true_sql": {"name": "get_true_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.get_true_sql", "macro_sql": "{% macro get_true_sql() %}\n {{ adapter.dispatch('get_true_sql', 'dbt')() }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_true_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.910447, "supported_languages": null}, "macro.dbt.default__get_true_sql": {"name": "default__get_true_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__get_true_sql", "macro_sql": "{% macro default__get_true_sql() %}\n {{ return('TRUE') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.9106913, "supported_languages": null}, "macro.dbt.snapshot_staging_table": {"name": "snapshot_staging_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.snapshot_staging_table", "macro_sql": "{% macro snapshot_staging_table(strategy, source_sql, target_relation) -%}\n {{ adapter.dispatch('snapshot_staging_table', 'dbt')(strategy, source_sql, target_relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__snapshot_staging_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "strategy", "type": null, "description": ""}, {"name": "source_sql", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1783708210.9111273, "supported_languages": null}, "macro.dbt.get_snapshot_table_column_names": {"name": "get_snapshot_table_column_names", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.get_snapshot_table_column_names", "macro_sql": "{% macro get_snapshot_table_column_names() %}\n {{ return({'dbt_valid_to': 'dbt_valid_to', 'dbt_valid_from': 'dbt_valid_from', 'dbt_scd_id': 'dbt_scd_id', 'dbt_updated_at': 'dbt_updated_at', 'dbt_is_deleted': 'dbt_is_deleted'}) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.9116247, "supported_languages": null}, "macro.dbt.default__snapshot_staging_table": {"name": "default__snapshot_staging_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__snapshot_staging_table", "macro_sql": "{% macro default__snapshot_staging_table(strategy, source_sql, target_relation) -%}\n {% set columns = config.get('snapshot_table_column_names') or get_snapshot_table_column_names() %}\n {% if strategy.hard_deletes == 'new_record' %}\n {% set new_scd_id = snapshot_hash_arguments([columns.dbt_scd_id, snapshot_get_time()]) %}\n {% endif %}\n with snapshot_query as (\n\n {{ source_sql }}\n\n ),\n\n snapshotted_data as (\n\n select *, {{ unique_key_fields(strategy.unique_key) }}\n from {{ target_relation }}\n where\n {% if config.get('dbt_valid_to_current') %}\n\t\t{% set source_unique_key = columns.dbt_valid_to | trim %}\n\t\t{% set target_unique_key = config.get('dbt_valid_to_current') | trim %}\n\n\t\t{# The exact equals semantics between NULL values depends on the current behavior flag set. Also, update records if the source field is null #}\n ( {{ equals(source_unique_key, target_unique_key) }} or {{ source_unique_key }} is null )\n {% else %}\n {{ columns.dbt_valid_to }} is null\n {% endif %}\n\n ),\n\n insertions_source_data as (\n\n select *, {{ unique_key_fields(strategy.unique_key) }},\n {{ strategy.updated_at }} as {{ columns.dbt_updated_at }},\n {{ strategy.updated_at }} as {{ columns.dbt_valid_from }},\n {{ get_dbt_valid_to_current(strategy, columns) }},\n {{ strategy.scd_id }} as {{ columns.dbt_scd_id }}\n\n from snapshot_query\n ),\n\n updates_source_data as (\n\n select *, {{ unique_key_fields(strategy.unique_key) }},\n {{ strategy.updated_at }} as {{ columns.dbt_updated_at }},\n {{ strategy.updated_at }} as {{ columns.dbt_valid_from }},\n {{ strategy.updated_at }} as {{ columns.dbt_valid_to }}\n\n from snapshot_query\n ),\n\n {%- if strategy.hard_deletes == 'invalidate' or strategy.hard_deletes == 'new_record' %}\n\n deletes_source_data as (\n\n select *, {{ unique_key_fields(strategy.unique_key) }}\n from snapshot_query\n ),\n {% endif %}\n\n insertions as (\n\n select\n 'insert' as dbt_change_type,\n source_data.*\n {%- if strategy.hard_deletes == 'new_record' -%}\n ,'False' as {{ columns.dbt_is_deleted }}\n {%- endif %}\n\n from insertions_source_data as source_data\n left outer join snapshotted_data\n on {{ unique_key_join_on(strategy.unique_key, \"snapshotted_data\", \"source_data\") }}\n where {{ unique_key_is_null(strategy.unique_key, \"snapshotted_data\") }}\n or ({{ unique_key_is_not_null(strategy.unique_key, \"snapshotted_data\") }} and (\n {{ strategy.row_changed }} {%- if strategy.hard_deletes == 'new_record' -%} or snapshotted_data.{{ columns.dbt_is_deleted }} = 'True' {% endif %}\n )\n\n )\n\n ),\n\n updates as (\n\n select\n 'update' as dbt_change_type,\n source_data.*,\n snapshotted_data.{{ columns.dbt_scd_id }}\n {%- if strategy.hard_deletes == 'new_record' -%}\n , snapshotted_data.{{ columns.dbt_is_deleted }}\n {%- endif %}\n\n from updates_source_data as source_data\n join snapshotted_data\n on {{ unique_key_join_on(strategy.unique_key, \"snapshotted_data\", \"source_data\") }}\n where (\n {{ strategy.row_changed }} {%- if strategy.hard_deletes == 'new_record' -%} or snapshotted_data.{{ columns.dbt_is_deleted }} = 'True' {% endif %}\n )\n )\n\n {%- if strategy.hard_deletes == 'invalidate' or strategy.hard_deletes == 'new_record' %}\n ,\n deletes as (\n\n select\n 'delete' as dbt_change_type,\n source_data.*,\n {{ snapshot_get_time() }} as {{ columns.dbt_valid_from }},\n {{ snapshot_get_time() }} as {{ columns.dbt_updated_at }},\n {{ snapshot_get_time() }} as {{ columns.dbt_valid_to }},\n snapshotted_data.{{ columns.dbt_scd_id }}\n {%- if strategy.hard_deletes == 'new_record' -%}\n , snapshotted_data.{{ columns.dbt_is_deleted }}\n {%- endif %}\n from snapshotted_data\n left join deletes_source_data as source_data\n on {{ unique_key_join_on(strategy.unique_key, \"snapshotted_data\", \"source_data\") }}\n where {{ unique_key_is_null(strategy.unique_key, \"source_data\") }}\n\n {%- if strategy.hard_deletes == 'new_record' %}\n and not (\n --avoid updating the record's valid_to if the latest entry is marked as deleted\n snapshotted_data.{{ columns.dbt_is_deleted }} = 'True'\n and\n {% if config.get('dbt_valid_to_current') -%}\n snapshotted_data.{{ columns.dbt_valid_to }} = {{ config.get('dbt_valid_to_current') }}\n {%- else -%}\n snapshotted_data.{{ columns.dbt_valid_to }} is null\n {%- endif %}\n )\n {%- endif %}\n )\n {%- endif %}\n\n {%- if strategy.hard_deletes == 'new_record' %}\n {% set snapshotted_cols = get_list_of_column_names(get_columns_in_relation(target_relation)) %}\n {% set source_col_names = get_columns_in_query(source_sql) %}\n ,\n deletion_records as (\n\n select\n 'insert' as dbt_change_type,\n {%- for col_name in source_col_names -%}\n {%- if col_name in snapshotted_cols -%}\n snapshotted_data.{{ adapter.quote(col_name) }},\n {%- else -%}\n source_data.{{ adapter.quote(col_name) }},\n {%- endif -%}\n {% endfor -%}\n {%- if strategy.unique_key | is_list -%}\n {%- for key in strategy.unique_key -%}\n snapshotted_data.{{ key }} as dbt_unique_key_{{ loop.index }},\n {% endfor -%}\n {%- else -%}\n snapshotted_data.dbt_unique_key as dbt_unique_key,\n {% endif -%}\n {{ snapshot_get_time() }} as {{ columns.dbt_valid_from }},\n {{ snapshot_get_time() }} as {{ columns.dbt_updated_at }},\n snapshotted_data.{{ columns.dbt_valid_to }} as {{ columns.dbt_valid_to }},\n {{ new_scd_id }} as {{ columns.dbt_scd_id }},\n 'True' as {{ columns.dbt_is_deleted }}\n from snapshotted_data\n left join deletes_source_data as source_data\n on {{ unique_key_join_on(strategy.unique_key, \"snapshotted_data\", \"source_data\") }}\n where {{ unique_key_is_null(strategy.unique_key, \"source_data\") }}\n and not (\n --avoid inserting a new record if the latest one is marked as deleted\n snapshotted_data.{{ columns.dbt_is_deleted }} = 'True'\n and\n {% if config.get('dbt_valid_to_current') -%}\n snapshotted_data.{{ columns.dbt_valid_to }} = {{ config.get('dbt_valid_to_current') }}\n {%- else -%}\n snapshotted_data.{{ columns.dbt_valid_to }} is null\n {%- endif %}\n )\n\n )\n {%- endif %}\n\n select * from insertions\n union all\n select * from updates\n {%- if strategy.hard_deletes == 'invalidate' or strategy.hard_deletes == 'new_record' %}\n union all\n select * from deletes\n {%- endif %}\n {%- if strategy.hard_deletes == 'new_record' %}\n union all\n select * from deletion_records\n {%- endif %}\n\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_snapshot_table_column_names", "macro.dbt.snapshot_hash_arguments", "macro.dbt.snapshot_get_time", "macro.dbt.unique_key_fields", "macro.dbt.equals", "macro.dbt.get_dbt_valid_to_current", "macro.dbt.unique_key_join_on", "macro.dbt.unique_key_is_null", "macro.dbt.unique_key_is_not_null", "macro.dbt.get_list_of_column_names", "macro.dbt.get_columns_in_relation", "macro.dbt.get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "strategy", "type": null, "description": ""}, {"name": "source_sql", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1783708210.9204915, "supported_languages": null}, "macro.dbt.build_snapshot_table": {"name": "build_snapshot_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.build_snapshot_table", "macro_sql": "{% macro build_snapshot_table(strategy, sql) -%}\n {{ adapter.dispatch('build_snapshot_table', 'dbt')(strategy, sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__build_snapshot_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "strategy", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783708210.9209266, "supported_languages": null}, "macro.dbt.default__build_snapshot_table": {"name": "default__build_snapshot_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.default__build_snapshot_table", "macro_sql": "{% macro default__build_snapshot_table(strategy, sql) %}\n {% set columns = config.get('snapshot_table_column_names') or get_snapshot_table_column_names() %}\n\n select *,\n {{ strategy.scd_id }} as {{ columns.dbt_scd_id }},\n {{ strategy.updated_at }} as {{ columns.dbt_updated_at }},\n {{ strategy.updated_at }} as {{ columns.dbt_valid_from }},\n {{ get_dbt_valid_to_current(strategy, columns) }}\n {%- if strategy.hard_deletes == 'new_record' -%}\n , 'False' as {{ columns.dbt_is_deleted }}\n {% endif -%}\n from (\n {{ sql }}\n ) sbq\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_snapshot_table_column_names", "macro.dbt.get_dbt_valid_to_current"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "strategy", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783708210.9219809, "supported_languages": null}, "macro.dbt.build_snapshot_staging_table": {"name": "build_snapshot_staging_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.build_snapshot_staging_table", "macro_sql": "{% macro build_snapshot_staging_table(strategy, sql, target_relation) %}\n {% set temp_relation = make_temp_relation(target_relation) %}\n\n {% set select = snapshot_staging_table(strategy, sql, target_relation) %}\n\n {% call statement('build_snapshot_staging_relation') %}\n {{ create_table_as(True, temp_relation, select) }}\n {% endcall %}\n\n {% do return(temp_relation) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.make_temp_relation", "macro.dbt.snapshot_staging_table", "macro.dbt.statement", "macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "strategy", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}], "created_at": 1783708210.9228632, "supported_languages": null}, "macro.dbt.get_updated_at_column_data_type": {"name": "get_updated_at_column_data_type", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.get_updated_at_column_data_type", "macro_sql": "{% macro get_updated_at_column_data_type(snapshot_sql) %}\n {% set snapshot_sql_column_schema = get_column_schema_from_query(snapshot_sql) %}\n {% set dbt_updated_at_data_type = null %}\n {% set ns = namespace() -%} {#-- handle for-loop scoping with a namespace --#}\n {% set ns.dbt_updated_at_data_type = null -%}\n {% for column in snapshot_sql_column_schema %}\n {% if ((column.column == 'dbt_updated_at') or (column.column == 'DBT_UPDATED_AT')) %}\n {% set ns.dbt_updated_at_data_type = column.dtype %}\n {% endif %}\n {% endfor %}\n {{ return(ns.dbt_updated_at_data_type or none) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_column_schema_from_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "snapshot_sql", "type": null, "description": ""}], "created_at": 1783708210.9240868, "supported_languages": null}, "macro.dbt.check_time_data_types": {"name": "check_time_data_types", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.check_time_data_types", "macro_sql": "{% macro check_time_data_types(sql) %}\n {% set dbt_updated_at_data_type = get_updated_at_column_data_type(sql) %}\n {% set snapshot_get_time_data_type = get_snapshot_get_time_data_type() %}\n {% if snapshot_get_time_data_type is not none and dbt_updated_at_data_type is not none and snapshot_get_time_data_type != dbt_updated_at_data_type %}\n {% if exceptions.warn_snapshot_timestamp_data_types %}\n {{ exceptions.warn_snapshot_timestamp_data_types(snapshot_get_time_data_type, dbt_updated_at_data_type) }}\n {% endif %}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_updated_at_column_data_type", "macro.dbt.get_snapshot_get_time_data_type"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1783708210.9249372, "supported_languages": null}, "macro.dbt.get_dbt_valid_to_current": {"name": "get_dbt_valid_to_current", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.get_dbt_valid_to_current", "macro_sql": "{% macro get_dbt_valid_to_current(strategy, columns) %}\n {% set dbt_valid_to_current = config.get('dbt_valid_to_current') or \"null\" %}\n coalesce(nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}), {{dbt_valid_to_current}})\n as {{ columns.dbt_valid_to }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "strategy", "type": null, "description": ""}, {"name": "columns", "type": null, "description": ""}], "created_at": 1783708210.9255283, "supported_languages": null}, "macro.dbt.unique_key_fields": {"name": "unique_key_fields", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.unique_key_fields", "macro_sql": "{% macro unique_key_fields(unique_key) %}\n {% if unique_key | is_list %}\n {% for key in unique_key %}\n {{ key }} as dbt_unique_key_{{ loop.index }}\n {%- if not loop.last %} , {%- endif %}\n {% endfor %}\n {% else %}\n {{ unique_key }} as dbt_unique_key\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "unique_key", "type": null, "description": ""}], "created_at": 1783708210.9262674, "supported_languages": null}, "macro.dbt.unique_key_join_on": {"name": "unique_key_join_on", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.unique_key_join_on", "macro_sql": "{% macro unique_key_join_on(unique_key, identifier, from_identifier) %}\n {% if unique_key | is_list %}\n {% for key in unique_key %}\n\t {% set source_unique_key = (identifier ~ \".dbt_unique_key_\" ~ loop.index) | trim %}\n\t {% set target_unique_key = (from_identifier ~ \".dbt_unique_key_\" ~ loop.index) | trim %}\n\t {{ equals(source_unique_key, target_unique_key) }}\n {%- if not loop.last %} and {%- endif %}\n {% endfor %}\n {% else %}\n {{ identifier }}.dbt_unique_key = {{ from_identifier }}.dbt_unique_key\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.equals"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "unique_key", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "from_identifier", "type": null, "description": ""}], "created_at": 1783708210.9274385, "supported_languages": null}, "macro.dbt.unique_key_is_null": {"name": "unique_key_is_null", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.unique_key_is_null", "macro_sql": "{% macro unique_key_is_null(unique_key, identifier) %}\n {% if unique_key | is_list %}\n {{ identifier }}.dbt_unique_key_1 is null\n {% else %}\n {{ identifier }}.dbt_unique_key is null\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "unique_key", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}], "created_at": 1783708210.9278698, "supported_languages": null}, "macro.dbt.unique_key_is_not_null": {"name": "unique_key_is_not_null", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "unique_id": "macro.dbt.unique_key_is_not_null", "macro_sql": "{% macro unique_key_is_not_null(unique_key, identifier) %}\n {% if unique_key | is_list %}\n {{ identifier }}.dbt_unique_key_1 is not null\n {% else %}\n {{ identifier }}.dbt_unique_key is not null\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "unique_key", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}], "created_at": 1783708210.9283214, "supported_languages": null}, "macro.dbt.strategy_dispatch": {"name": "strategy_dispatch", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.strategy_dispatch", "macro_sql": "{% macro strategy_dispatch(name) -%}\n{% set original_name = name %}\n {% if '.' in name %}\n {% set package_name, name = name.split(\".\", 1) %}\n {% else %}\n {% set package_name = none %}\n {% endif %}\n\n {% if package_name is none %}\n {% set package_context = context %}\n {% elif package_name in context %}\n {% set package_context = context[package_name] %}\n {% else %}\n {% set error_msg %}\n Could not find package '{{package_name}}', called with '{{original_name}}'\n {% endset %}\n {{ exceptions.raise_compiler_error(error_msg | trim) }}\n {% endif %}\n\n {%- set search_name = 'snapshot_' ~ name ~ '_strategy' -%}\n\n {% if search_name not in package_context %}\n {% set error_msg %}\n The specified strategy macro '{{name}}' was not found in package '{{ package_name }}'\n {% endset %}\n {{ exceptions.raise_compiler_error(error_msg | trim) }}\n {% endif %}\n {{ return(package_context[search_name]) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "name", "type": null, "description": ""}], "created_at": 1783708210.9323332, "supported_languages": null}, "macro.dbt.snapshot_hash_arguments": {"name": "snapshot_hash_arguments", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_hash_arguments", "macro_sql": "{% macro snapshot_hash_arguments(args) -%}\n {{ adapter.dispatch('snapshot_hash_arguments', 'dbt')(args) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "args", "type": null, "description": ""}], "created_at": 1783708210.9327397, "supported_languages": null}, "macro.dbt.default__snapshot_hash_arguments": {"name": "default__snapshot_hash_arguments", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.default__snapshot_hash_arguments", "macro_sql": "{% macro default__snapshot_hash_arguments(args) -%}\n md5({%- for arg in args -%}\n coalesce(cast({{ arg }} as varchar ), '')\n {% if not loop.last %} || '|' || {% endif %}\n {%- endfor -%})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "args", "type": null, "description": ""}], "created_at": 1783708210.9332342, "supported_languages": null}, "macro.dbt.snapshot_timestamp_strategy": {"name": "snapshot_timestamp_strategy", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_timestamp_strategy", "macro_sql": "{% macro snapshot_timestamp_strategy(node, snapshotted_rel, current_rel, model_config, target_exists) %}\n {# The model_config parameter is no longer used, but is passed in anyway for compatibility. #}\n {% set primary_key = config.get('unique_key') %}\n {% set updated_at = config.get('updated_at') %}\n {% set hard_deletes = adapter.get_hard_deletes_behavior(config) %}\n {% set invalidate_hard_deletes = hard_deletes == 'invalidate' %}\n {% set columns = config.get(\"snapshot_table_column_names\") or get_snapshot_table_column_names() %}\n\n {#/*\n The snapshot relation might not have an {{ updated_at }} value if the\n snapshot strategy is changed from `check` to `timestamp`. We\n should use a dbt-created column for the comparison in the snapshot\n table instead of assuming that the user-supplied {{ updated_at }}\n will be present in the historical data.\n\n See https://github.com/dbt-labs/dbt-core/issues/2350\n */ #}\n {% set row_changed_expr -%}\n ({{ snapshotted_rel }}.{{ columns.dbt_valid_from }} < {{ current_rel }}.{{ updated_at }})\n {%- endset %}\n\n {% set scd_args = api.Relation.scd_args(primary_key, updated_at) %}\n {% set scd_id_expr = snapshot_hash_arguments(scd_args) %}\n\n {% do return({\n \"unique_key\": primary_key,\n \"updated_at\": updated_at,\n \"row_changed\": row_changed_expr,\n \"scd_id\": scd_id_expr,\n \"invalidate_hard_deletes\": invalidate_hard_deletes,\n \"hard_deletes\": hard_deletes\n }) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_snapshot_table_column_names", "macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "node", "type": null, "description": ""}, {"name": "snapshotted_rel", "type": null, "description": ""}, {"name": "current_rel", "type": null, "description": ""}, {"name": "model_config", "type": null, "description": ""}, {"name": "target_exists", "type": null, "description": ""}], "created_at": 1783708210.9353268, "supported_languages": null}, "macro.dbt.snapshot_string_as_time": {"name": "snapshot_string_as_time", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_string_as_time", "macro_sql": "{% macro snapshot_string_as_time(timestamp) -%}\n {{ adapter.dispatch('snapshot_string_as_time', 'dbt')(timestamp) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__snapshot_string_as_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "timestamp", "type": null, "description": ""}], "created_at": 1783708210.9356747, "supported_languages": null}, "macro.dbt.default__snapshot_string_as_time": {"name": "default__snapshot_string_as_time", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.default__snapshot_string_as_time", "macro_sql": "{% macro default__snapshot_string_as_time(timestamp) %}\n {% do exceptions.raise_not_implemented(\n 'snapshot_string_as_time macro not implemented for adapter '+adapter.type()\n ) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "timestamp", "type": null, "description": ""}], "created_at": 1783708210.9360256, "supported_languages": null}, "macro.dbt.snapshot_check_all_get_existing_columns": {"name": "snapshot_check_all_get_existing_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_check_all_get_existing_columns", "macro_sql": "{% macro snapshot_check_all_get_existing_columns(node, target_exists, check_cols_config) -%}\n {%- if not target_exists -%}\n {#-- no table yet -> return whatever the query does --#}\n {{ return((false, query_columns)) }}\n {%- endif -%}\n\n {#-- handle any schema changes --#}\n {%- set target_relation = adapter.get_relation(database=node.database, schema=node.schema, identifier=node.alias) -%}\n\n {% if check_cols_config == 'all' %}\n {%- set query_columns = get_columns_in_query(node['compiled_code']) -%}\n\n {% elif check_cols_config is iterable and (check_cols_config | length) > 0 %}\n {#-- query for proper casing/quoting, to support comparison below --#}\n {%- set select_check_cols_from_target -%}\n {#-- N.B. The whitespace below is necessary to avoid edge case issue with comments --#}\n {#-- See: https://github.com/dbt-labs/dbt-core/issues/6781 --#}\n select {{ check_cols_config | join(', ') }} from (\n {{ node['compiled_code'] }}\n ) subq\n {%- endset -%}\n {% set query_columns = get_columns_in_query(select_check_cols_from_target) %}\n\n {% else %}\n {% do exceptions.raise_compiler_error(\"Invalid value for 'check_cols': \" ~ check_cols_config) %}\n {% endif %}\n\n {%- set existing_cols = adapter.get_columns_in_relation(target_relation) | map(attribute = 'name') | list -%}\n {%- set ns = namespace() -%} {#-- handle for-loop scoping with a namespace --#}\n {%- set ns.column_added = false -%}\n\n {%- set intersection = [] -%}\n {%- for col in query_columns -%}\n {%- if col in existing_cols -%}\n {%- do intersection.append(adapter.quote(col)) -%}\n {%- else -%}\n {% set ns.column_added = true %}\n {%- endif -%}\n {%- endfor -%}\n {{ return((ns.column_added, intersection)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "node", "type": null, "description": ""}, {"name": "target_exists", "type": null, "description": ""}, {"name": "check_cols_config", "type": null, "description": ""}], "created_at": 1783708210.9389162, "supported_languages": null}, "macro.dbt.snapshot_check_strategy": {"name": "snapshot_check_strategy", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.snapshot_check_strategy", "macro_sql": "{% macro snapshot_check_strategy(node, snapshotted_rel, current_rel, model_config, target_exists) %}\n {# The model_config parameter is no longer used, but is passed in anyway for compatibility. #}\n {% set check_cols_config = config.get('check_cols') %}\n {% set primary_key = config.get('unique_key') %}\n {% set hard_deletes = adapter.get_hard_deletes_behavior(config) %}\n {% set invalidate_hard_deletes = hard_deletes == 'invalidate' %}\n {% set updated_at = config.get('updated_at') or snapshot_get_time() %}\n\n {% set column_added = false %}\n\n {% set column_added, check_cols = snapshot_check_all_get_existing_columns(node, target_exists, check_cols_config) %}\n\n {%- set row_changed_expr -%}\n (\n {%- if column_added -%}\n {{ get_true_sql() }}\n {%- else -%}\n {%- for col in check_cols -%}\n {{ snapshotted_rel }}.{{ col }} != {{ current_rel }}.{{ col }}\n or\n (\n (({{ snapshotted_rel }}.{{ col }} is null) and not ({{ current_rel }}.{{ col }} is null))\n or\n ((not {{ snapshotted_rel }}.{{ col }} is null) and ({{ current_rel }}.{{ col }} is null))\n )\n {%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n {%- endif -%}\n )\n {%- endset %}\n\n {% set scd_args = api.Relation.scd_args(primary_key, updated_at) %}\n {% set scd_id_expr = snapshot_hash_arguments(scd_args) %}\n\n {% do return({\n \"unique_key\": primary_key,\n \"updated_at\": updated_at,\n \"row_changed\": row_changed_expr,\n \"scd_id\": scd_id_expr,\n \"invalidate_hard_deletes\": invalidate_hard_deletes,\n \"hard_deletes\": hard_deletes\n }) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.snapshot_get_time", "macro.dbt.snapshot_check_all_get_existing_columns", "macro.dbt.get_true_sql", "macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "node", "type": null, "description": ""}, {"name": "snapshotted_rel", "type": null, "description": ""}, {"name": "current_rel", "type": null, "description": ""}, {"name": "model_config", "type": null, "description": ""}, {"name": "target_exists", "type": null, "description": ""}], "created_at": 1783708210.941822, "supported_languages": null}, "macro.dbt.materialization_snapshot_default": {"name": "materialization_snapshot_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/snapshot.sql", "original_file_path": "macros/materializations/snapshots/snapshot.sql", "unique_id": "macro.dbt.materialization_snapshot_default", "macro_sql": "{% materialization snapshot, default %}\n\n {%- set target_table = model.get('alias', model.get('name')) -%}\n\n {%- set strategy_name = config.get('strategy') -%}\n {%- set unique_key = config.get('unique_key') %}\n -- grab current tables grants config for comparision later on\n {%- set grant_config = config.get('grants') -%}\n\n {% set target_relation_exists, target_relation = get_or_create_relation(\n database=model.database,\n schema=model.schema,\n identifier=target_table,\n type='table') -%}\n\n {%- if not target_relation.is_table -%}\n {% do exceptions.relation_wrong_type(target_relation, 'table') %}\n {%- endif -%}\n\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set strategy_macro = strategy_dispatch(strategy_name) %}\n {# The model['config'] parameter below is no longer used, but passing anyway for compatibility #}\n {# It was a dictionary of config, instead of the config object from the context #}\n {% set strategy = strategy_macro(model, \"snapshotted_data\", \"source_data\", model['config'], target_relation_exists) %}\n\n {% if not target_relation_exists %}\n\n {% set build_sql = build_snapshot_table(strategy, model['compiled_code']) %}\n {% set build_or_select_sql = build_sql %}\n {% set final_sql = create_table_as(False, target_relation, build_sql) %}\n\n {% else %}\n\n {% set columns = config.get(\"snapshot_table_column_names\") or get_snapshot_table_column_names() %}\n\n {{ adapter.assert_valid_snapshot_target_given_strategy(target_relation, columns, strategy) }}\n\n {% set build_or_select_sql = snapshot_staging_table(strategy, sql, target_relation) %}\n {% set staging_table = build_snapshot_staging_table(strategy, sql, target_relation) %}\n\n -- this may no-op if the database does not require column expansion\n {% do adapter.expand_target_column_types(from_relation=staging_table,\n to_relation=target_relation) %}\n\n {% set remove_columns = ['dbt_change_type', 'DBT_CHANGE_TYPE', 'dbt_unique_key', 'DBT_UNIQUE_KEY'] %}\n {% if unique_key | is_list %}\n {% for key in strategy.unique_key %}\n {{ remove_columns.append('dbt_unique_key_' + loop.index|string) }}\n {{ remove_columns.append('DBT_UNIQUE_KEY_' + loop.index|string) }}\n {% endfor %}\n {% endif %}\n\n {% set missing_columns = adapter.get_missing_columns(staging_table, target_relation)\n | rejectattr('name', 'in', remove_columns)\n | list %}\n\n {% do create_columns(target_relation, missing_columns) %}\n\n {% set source_columns = adapter.get_columns_in_relation(staging_table)\n | rejectattr('name', 'in', remove_columns)\n | list %}\n\n {% set quoted_source_columns = [] %}\n {% for column in source_columns %}\n {% do quoted_source_columns.append(adapter.quote(column.name)) %}\n {% endfor %}\n\n {% set final_sql = snapshot_merge_sql(\n target = target_relation,\n source = staging_table,\n insert_cols = quoted_source_columns\n )\n %}\n\n {% endif %}\n\n\n {{ check_time_data_types(build_or_select_sql) }}\n\n {% call statement('main') %}\n {{ final_sql }}\n {% endcall %}\n\n {% set should_revoke = should_revoke(target_relation_exists, full_refresh_mode=False) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if not target_relation_exists %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n {% if staging_table is defined %}\n {% do post_snapshot(staging_table) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.get_or_create_relation", "macro.dbt.run_hooks", "macro.dbt.strategy_dispatch", "macro.dbt.build_snapshot_table", "macro.dbt.create_table_as", "macro.dbt.get_snapshot_table_column_names", "macro.dbt.snapshot_staging_table", "macro.dbt.build_snapshot_staging_table", "macro.dbt.create_columns", "macro.dbt.snapshot_merge_sql", "macro.dbt.check_time_data_types", "macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes", "macro.dbt.post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1783708210.9498882, "supported_languages": ["sql"]}, "macro.dbt.snapshot_merge_sql": {"name": "snapshot_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "unique_id": "macro.dbt.snapshot_merge_sql", "macro_sql": "{% macro snapshot_merge_sql(target, source, insert_cols) -%}\n {{ adapter.dispatch('snapshot_merge_sql', 'dbt')(target, source, insert_cols) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__snapshot_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "insert_cols", "type": null, "description": ""}], "created_at": 1783708210.950777, "supported_languages": null}, "macro.dbt.default__snapshot_merge_sql": {"name": "default__snapshot_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "unique_id": "macro.dbt.default__snapshot_merge_sql", "macro_sql": "{% macro default__snapshot_merge_sql(target, source, insert_cols) -%}\n {%- set insert_cols_csv = insert_cols | join(', ') -%}\n\n {%- set columns = config.get(\"snapshot_table_column_names\") or get_snapshot_table_column_names() -%}\n\n merge into {{ target.render() }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on DBT_INTERNAL_SOURCE.{{ columns.dbt_scd_id }} = DBT_INTERNAL_DEST.{{ columns.dbt_scd_id }}\n\n when matched\n {% if config.get(\"dbt_valid_to_current\") %}\n\t{% set source_unique_key = (\"DBT_INTERNAL_DEST.\" ~ columns.dbt_valid_to) | trim %}\n\t{% set target_unique_key = config.get('dbt_valid_to_current') | trim %}\n\tand ({{ equals(source_unique_key, target_unique_key) }} or {{ source_unique_key }} is null)\n\n {% else %}\n and DBT_INTERNAL_DEST.{{ columns.dbt_valid_to }} is null\n {% endif %}\n and DBT_INTERNAL_SOURCE.dbt_change_type in ('update', 'delete')\n then update\n set {{ columns.dbt_valid_to }} = DBT_INTERNAL_SOURCE.{{ columns.dbt_valid_to }}\n\n when not matched\n and DBT_INTERNAL_SOURCE.dbt_change_type = 'insert'\n then insert ({{ insert_cols_csv }})\n values ({{ insert_cols_csv }})\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_snapshot_table_column_names", "macro.dbt.equals"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "target", "type": null, "description": ""}, {"name": "source", "type": null, "description": ""}, {"name": "insert_cols", "type": null, "description": ""}], "created_at": 1783708210.9524767, "supported_languages": null}, "macro.dbt.get_test_sql": {"name": "get_test_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "unique_id": "macro.dbt.get_test_sql", "macro_sql": "{% macro get_test_sql(main_sql, fail_calc, warn_if, error_if, limit) -%}\n {{ adapter.dispatch('get_test_sql', 'dbt')(main_sql, fail_calc, warn_if, error_if, limit) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "main_sql", "type": null, "description": ""}, {"name": "fail_calc", "type": null, "description": ""}, {"name": "warn_if", "type": null, "description": ""}, {"name": "error_if", "type": null, "description": ""}, {"name": "limit", "type": null, "description": ""}], "created_at": 1783708210.9535162, "supported_languages": null}, "macro.dbt.default__get_test_sql": {"name": "default__get_test_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "unique_id": "macro.dbt.default__get_test_sql", "macro_sql": "{% macro default__get_test_sql(main_sql, fail_calc, warn_if, error_if, limit) -%}\n select\n {{ fail_calc }} as failures,\n {{ fail_calc }} {{ warn_if }} as should_warn,\n {{ fail_calc }} {{ error_if }} as should_error\n from (\n {{ main_sql }}\n {{ \"limit \" ~ limit if limit != none }}\n ) dbt_internal_test\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "main_sql", "type": null, "description": ""}, {"name": "fail_calc", "type": null, "description": ""}, {"name": "warn_if", "type": null, "description": ""}, {"name": "error_if", "type": null, "description": ""}, {"name": "limit", "type": null, "description": ""}], "created_at": 1783708210.954187, "supported_languages": null}, "macro.dbt.get_unit_test_sql": {"name": "get_unit_test_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "unique_id": "macro.dbt.get_unit_test_sql", "macro_sql": "{% macro get_unit_test_sql(main_sql, expected_fixture_sql, expected_column_names) -%}\n {{ adapter.dispatch('get_unit_test_sql', 'dbt')(main_sql, expected_fixture_sql, expected_column_names) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_unit_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "main_sql", "type": null, "description": ""}, {"name": "expected_fixture_sql", "type": null, "description": ""}, {"name": "expected_column_names", "type": null, "description": ""}], "created_at": 1783708210.9546018, "supported_languages": null}, "macro.dbt.default__get_unit_test_sql": {"name": "default__get_unit_test_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "unique_id": "macro.dbt.default__get_unit_test_sql", "macro_sql": "{% macro default__get_unit_test_sql(main_sql, expected_fixture_sql, expected_column_names) -%}\n-- Build actual result given inputs\nwith dbt_internal_unit_test_actual as (\n select\n {% for expected_column_name in expected_column_names %}{{expected_column_name}}{% if not loop.last -%},{% endif %}{%- endfor -%}, {{ dbt.string_literal(\"actual\") }} as {{ adapter.quote(\"actual_or_expected\") }}\n from (\n {{ main_sql }}\n ) _dbt_internal_unit_test_actual\n),\n-- Build expected result\ndbt_internal_unit_test_expected as (\n select\n {% for expected_column_name in expected_column_names %}{{expected_column_name}}{% if not loop.last -%}, {% endif %}{%- endfor -%}, {{ dbt.string_literal(\"expected\") }} as {{ adapter.quote(\"actual_or_expected\") }}\n from (\n {{ expected_fixture_sql }}\n ) _dbt_internal_unit_test_expected\n)\n-- Union actual and expected results\nselect * from dbt_internal_unit_test_actual\nunion all\nselect * from dbt_internal_unit_test_expected\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.string_literal"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "main_sql", "type": null, "description": ""}, {"name": "expected_fixture_sql", "type": null, "description": ""}, {"name": "expected_column_names", "type": null, "description": ""}], "created_at": 1783708210.9558303, "supported_languages": null}, "macro.dbt.materialization_unit_default": {"name": "materialization_unit_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/unit.sql", "original_file_path": "macros/materializations/tests/unit.sql", "unique_id": "macro.dbt.materialization_unit_default", "macro_sql": "{%- materialization unit, default -%}\n\n {% set relations = [] %}\n {% set sql_header = config.get('sql_header') if flags.REQUIRE_SQL_HEADER_IN_TEST_CONFIGS else none %}\n\n {% set expected_rows = config.get('expected_rows') %}\n {% set expected_sql = config.get('expected_sql') %}\n {% set tested_expected_column_names = expected_rows[0].keys() if (expected_rows | length ) > 0 else get_columns_in_query(sql) %}\n\n {%- set target_relation = this.incorporate(type='table') -%}\n {%- set temp_relation = make_temp_relation(target_relation)-%}\n {% do run_query(get_create_table_as_sql(True, temp_relation, get_empty_subquery_sql(sql))) %}\n {%- set columns_in_relation = adapter.get_columns_in_relation(temp_relation) -%}\n {%- set column_name_to_data_types = {} -%}\n {%- set column_name_to_quoted = {} -%}\n {%- for column in columns_in_relation -%}\n {%- do column_name_to_data_types.update({column.name|lower: column.data_type}) -%}\n {%- do column_name_to_quoted.update({column.name|lower: column.quoted}) -%}\n {%- endfor -%}\n\n {%- set expected_column_names_quoted = [] -%}\n {%- for column_name in tested_expected_column_names -%}\n {%- do expected_column_names_quoted.append(column_name_to_quoted[column_name|lower]) -%}\n {%- endfor -%}\n\n {% if not expected_sql %}\n {% set expected_sql = get_expected_sql(expected_rows, column_name_to_data_types, column_name_to_quoted) %}\n {% endif %}\n {% set unit_test_sql = get_unit_test_sql(sql, expected_sql, expected_column_names_quoted) %}\n\n {% call statement('main', fetch_result=True) -%}\n\n {% if sql_header %}{{ sql_header }}{% endif %}\n {{ unit_test_sql }}\n\n {%- endcall %}\n\n {% do adapter.drop_relation(temp_relation) %}\n\n {{ return({'relations': relations}) }}\n\n{%- endmaterialization -%}", "depends_on": {"macros": ["macro.dbt.get_columns_in_query", "macro.dbt.make_temp_relation", "macro.dbt.run_query", "macro.dbt.get_create_table_as_sql", "macro.dbt.get_empty_subquery_sql", "macro.dbt.get_expected_sql", "macro.dbt.get_unit_test_sql", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1783708210.9599376, "supported_languages": ["sql"]}, "macro.dbt.materialization_test_default": {"name": "materialization_test_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/test.sql", "original_file_path": "macros/materializations/tests/test.sql", "unique_id": "macro.dbt.materialization_test_default", "macro_sql": "{%- materialization test, default -%}\n\n {% set relations = [] %}\n {% set limit = config.get('limit') %}\n {% set sql_header = config.get('sql_header') if flags.REQUIRE_SQL_HEADER_IN_TEST_CONFIGS else none %}\n\n {% set sql_with_limit %}\n {{ get_limit_subquery_sql(sql, limit) }}\n {% endset %}\n\n {% if should_store_failures() %}\n\n {% set identifier = model['alias'] %}\n {% set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) %}\n\n {% set store_failures_as = config.get('store_failures_as') %}\n -- if `--store-failures` is invoked via command line and `store_failures_as` is not set,\n -- config.get('store_failures_as', 'table') returns None, not 'table'\n {% if store_failures_as == none %}{% set store_failures_as = 'table' %}{% endif %}\n {% if store_failures_as not in ['table', 'view'] %}\n {{ exceptions.raise_compiler_error(\n \"'\" ~ store_failures_as ~ \"' is not a valid value for `store_failures_as`. \"\n \"Accepted values are: ['ephemeral', 'table', 'view']\"\n ) }}\n {% endif %}\n\n {% set target_relation = api.Relation.create(\n identifier=identifier, schema=schema, database=database, type=store_failures_as) -%} %}\n\n {% if old_relation %}\n {% do adapter.drop_relation(old_relation) %}\n {% endif %}\n\n {% call statement(auto_begin=True) %}\n {% if sql_header %}{{ sql_header }}{% endif %}\n {{ get_create_sql(target_relation, sql_with_limit) }}\n {% endcall %}\n\n {% do relations.append(target_relation) %}\n\n {# Since the test failures have already been saved to the database, reuse that result rather than querying again #}\n {% set main_sql %}\n select *\n from {{ target_relation }}\n {% endset %}\n\n {{ adapter.commit() }}\n\n {% else %}\n\n {% set main_sql = sql_with_limit %}\n\n {% endif %}\n\n {% set fail_calc = config.get('fail_calc') %}\n {% set warn_if = config.get('warn_if') %}\n {% set error_if = config.get('error_if') %}\n\n {% call statement('main', fetch_result=True) -%}\n\n {% if sql_header %}{{ sql_header }}{% endif %}\n {# The limit has already been included above, and we do not want to duplicate it again. We also want to be safe for macro overrides treating `limit` as a required parameter. #}\n {{ get_test_sql(main_sql, fail_calc, warn_if, error_if, limit=none)}}\n\n {%- endcall %}\n\n {{ return({'relations': relations}) }}\n\n{%- endmaterialization -%}", "depends_on": {"macros": ["macro.dbt.get_limit_subquery_sql", "macro.dbt.should_store_failures", "macro.dbt.statement", "macro.dbt.get_create_sql", "macro.dbt.get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1783708210.9650786, "supported_languages": ["sql"]}, "macro.dbt.get_where_subquery": {"name": "get_where_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "unique_id": "macro.dbt.get_where_subquery", "macro_sql": "{% macro get_where_subquery(relation) -%}\n {% do return(adapter.dispatch('get_where_subquery', 'dbt')(relation)) %}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_where_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.9657712, "supported_languages": null}, "macro.dbt.default__get_where_subquery": {"name": "default__get_where_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "unique_id": "macro.dbt.default__get_where_subquery", "macro_sql": "{% macro default__get_where_subquery(relation) -%}\n {% set where = config.get('where', '') %}\n {% if where %}\n {%- set filtered -%}\n (select * from {{ relation }} where {{ where }}) dbt_subquery\n {%- endset -%}\n {% do return(filtered) %}\n {%- else -%}\n {% do return(relation) %}\n {%- endif -%}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.9665709, "supported_languages": null}, "macro.dbt.materialization_seed_default": {"name": "materialization_seed_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/seed.sql", "original_file_path": "macros/materializations/seeds/seed.sql", "unique_id": "macro.dbt.materialization_seed_default", "macro_sql": "{% materialization seed, default %}\n\n {%- set identifier = model['alias'] -%}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n\n {%- set exists_as_table = (old_relation is not none and old_relation.is_table) -%}\n {%- set exists_as_view = (old_relation is not none and old_relation.is_view) -%}\n\n {%- set grant_config = config.get('grants') -%}\n {%- set agate_table = load_agate_table() -%}\n -- grab current tables grants config for comparison later on\n\n {%- do store_result('agate_table', response='OK', agate_table=agate_table) -%}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% set create_table_sql = \"\" %}\n {% if exists_as_view %}\n {{ exceptions.raise_compiler_error(\"Cannot seed to '{}', it is a view\".format(old_relation.render())) }}\n {% elif exists_as_table %}\n {% set create_table_sql = reset_csv_table(model, full_refresh_mode, old_relation, agate_table) %}\n {% else %}\n {% set create_table_sql = create_csv_table(model, agate_table) %}\n {% endif %}\n\n {% set code = 'CREATE' if full_refresh_mode else 'INSERT' %}\n {% set rows_affected = (agate_table.rows | length) %}\n {% set sql = \"\" %}\n {% if rows_affected > 0 %}\n {% set sql = load_csv_rows(model, agate_table) %}\n {% endif %}\n\n {% call noop_statement('main', code ~ ' ' ~ rows_affected, code, rows_affected) %}\n {{ get_csv_sql(create_table_sql, sql) }};\n {% endcall %}\n\n {% set target_relation = this.incorporate(type='table') %}\n\n {% set should_revoke = should_revoke(old_relation, full_refresh_mode) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if full_refresh_mode or not exists_as_table %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.should_full_refresh", "macro.dbt.run_hooks", "macro.dbt.reset_csv_table", "macro.dbt.create_csv_table", "macro.dbt.load_csv_rows", "macro.dbt.noop_statement", "macro.dbt.get_csv_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "supported_languages", "type": null, "description": ""}], "created_at": 1783708210.971858, "supported_languages": ["sql"]}, "macro.dbt.create_csv_table": {"name": "create_csv_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.create_csv_table", "macro_sql": "{% macro create_csv_table(model, agate_table) -%}\n {{ adapter.dispatch('create_csv_table', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "agate_table", "type": null, "description": ""}], "created_at": 1783708210.97368, "supported_languages": null}, "macro.dbt.default__create_csv_table": {"name": "default__create_csv_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__create_csv_table", "macro_sql": "{% macro default__create_csv_table(model, agate_table) %}\n {%- set column_override = model['config'].get('column_types', {}) -%}\n {%- set quote_seed_column = model['config'].get('quote_columns', None) -%}\n\n {% set sql %}\n create table {{ this.render() }} (\n {%- for col_name in agate_table.column_names -%}\n {%- set inferred_type = adapter.convert_type(agate_table, loop.index0) -%}\n {%- set type = column_override.get(col_name, inferred_type) -%}\n {%- set column_name = (col_name | string) -%}\n {{ adapter.quote_seed_column(column_name, quote_seed_column) }} {{ type }} {%- if not loop.last -%}, {%- endif -%}\n {%- endfor -%}\n )\n {% endset %}\n\n {% call statement('_') -%}\n {{ sql }}\n {%- endcall %}\n\n {{ return(sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "agate_table", "type": null, "description": ""}], "created_at": 1783708210.975497, "supported_languages": null}, "macro.dbt.reset_csv_table": {"name": "reset_csv_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.reset_csv_table", "macro_sql": "{% macro reset_csv_table(model, full_refresh, old_relation, agate_table) -%}\n {{ adapter.dispatch('reset_csv_table', 'dbt')(model, full_refresh, old_relation, agate_table) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__reset_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "full_refresh", "type": null, "description": ""}, {"name": "old_relation", "type": null, "description": ""}, {"name": "agate_table", "type": null, "description": ""}], "created_at": 1783708210.9759686, "supported_languages": null}, "macro.dbt.default__reset_csv_table": {"name": "default__reset_csv_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__reset_csv_table", "macro_sql": "{% macro default__reset_csv_table(model, full_refresh, old_relation, agate_table) %}\n {% set sql = \"\" %}\n {% if full_refresh %}\n {{ adapter.drop_relation(old_relation) }}\n {% set sql = create_csv_table(model, agate_table) %}\n {% else %}\n {{ adapter.truncate_relation(old_relation) }}\n {% set sql = \"truncate table \" ~ old_relation.render() %}\n {% endif %}\n\n {{ return(sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "full_refresh", "type": null, "description": ""}, {"name": "old_relation", "type": null, "description": ""}, {"name": "agate_table", "type": null, "description": ""}], "created_at": 1783708210.9769707, "supported_languages": null}, "macro.dbt.get_csv_sql": {"name": "get_csv_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.get_csv_sql", "macro_sql": "{% macro get_csv_sql(create_or_truncate_sql, insert_sql) %}\n {{ adapter.dispatch('get_csv_sql', 'dbt')(create_or_truncate_sql, insert_sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_csv_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "create_or_truncate_sql", "type": null, "description": ""}, {"name": "insert_sql", "type": null, "description": ""}], "created_at": 1783708210.9773803, "supported_languages": null}, "macro.dbt.default__get_csv_sql": {"name": "default__get_csv_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__get_csv_sql", "macro_sql": "{% macro default__get_csv_sql(create_or_truncate_sql, insert_sql) %}\n {{ create_or_truncate_sql }};\n -- dbt seed --\n {{ insert_sql }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "create_or_truncate_sql", "type": null, "description": ""}, {"name": "insert_sql", "type": null, "description": ""}], "created_at": 1783708210.9776611, "supported_languages": null}, "macro.dbt.get_binding_char": {"name": "get_binding_char", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.get_binding_char", "macro_sql": "{% macro get_binding_char() -%}\n {{ adapter.dispatch('get_binding_char', 'dbt')() }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.9779499, "supported_languages": null}, "macro.dbt.default__get_binding_char": {"name": "default__get_binding_char", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__get_binding_char", "macro_sql": "{% macro default__get_binding_char() %}\n {{ return('%s') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.978229, "supported_languages": null}, "macro.dbt.get_batch_size": {"name": "get_batch_size", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.get_batch_size", "macro_sql": "{% macro get_batch_size() -%}\n {{ return(adapter.dispatch('get_batch_size', 'dbt')()) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_batch_size"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.9785597, "supported_languages": null}, "macro.dbt.default__get_batch_size": {"name": "default__get_batch_size", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__get_batch_size", "macro_sql": "{% macro default__get_batch_size() %}\n {{ return(10000) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708210.9788034, "supported_languages": null}, "macro.dbt.get_seed_column_quoted_csv": {"name": "get_seed_column_quoted_csv", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.get_seed_column_quoted_csv", "macro_sql": "{% macro get_seed_column_quoted_csv(model, column_names) %}\n {%- set quote_seed_column = model['config'].get('quote_columns', None) -%}\n {% set quoted = [] %}\n {% for col in column_names -%}\n {%- do quoted.append(adapter.quote_seed_column(col, quote_seed_column)) -%}\n {%- endfor %}\n\n {%- set dest_cols_csv = quoted | join(', ') -%}\n {{ return(dest_cols_csv) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_names", "type": null, "description": ""}], "created_at": 1783708210.9798741, "supported_languages": null}, "macro.dbt.load_csv_rows": {"name": "load_csv_rows", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.load_csv_rows", "macro_sql": "{% macro load_csv_rows(model, agate_table) -%}\n {{ adapter.dispatch('load_csv_rows', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__load_csv_rows"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "agate_table", "type": null, "description": ""}], "created_at": 1783708210.9802804, "supported_languages": null}, "macro.dbt.default__load_csv_rows": {"name": "default__load_csv_rows", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt.default__load_csv_rows", "macro_sql": "{% macro default__load_csv_rows(model, agate_table) %}\n\n {% set batch_size = get_batch_size() %}\n\n {% set cols_sql = get_seed_column_quoted_csv(model, agate_table.column_names) %}\n {% set bindings = [] %}\n\n {% set statements = [] %}\n\n {% for chunk in agate_table.rows | batch(batch_size) %}\n {% set bindings = [] %}\n\n {% for row in chunk %}\n {% do bindings.extend(row) %}\n {% endfor %}\n\n {% set sql %}\n insert into {{ this.render() }} ({{ cols_sql }}) values\n {% for row in chunk -%}\n ({%- for column in agate_table.column_names -%}\n {{ get_binding_char() }}\n {%- if not loop.last%},{%- endif %}\n {%- endfor -%})\n {%- if not loop.last%},{%- endif %}\n {%- endfor %}\n {% endset %}\n\n {% do adapter.add_query(sql, bindings=bindings, abridge_sql_log=True) %}\n\n {% if loop.index0 == 0 %}\n {% do statements.append(sql) %}\n {% endif %}\n {% endfor %}\n\n {# Return SQL so we can render it out into the compiled files #}\n {{ return(statements[0]) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_batch_size", "macro.dbt.get_seed_column_quoted_csv", "macro.dbt.get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "agate_table", "type": null, "description": ""}], "created_at": 1783708210.9827378, "supported_languages": null}, "macro.dbt.get_drop_backup_sql": {"name": "get_drop_backup_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop_backup.sql", "original_file_path": "macros/relations/drop_backup.sql", "unique_id": "macro.dbt.get_drop_backup_sql", "macro_sql": "{%- macro get_drop_backup_sql(relation) -%}\n {{- log('Applying DROP BACKUP to: ' ~ relation) -}}\n {{- adapter.dispatch('get_drop_backup_sql', 'dbt')(relation) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_drop_backup_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.9833827, "supported_languages": null}, "macro.dbt.default__get_drop_backup_sql": {"name": "default__get_drop_backup_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop_backup.sql", "original_file_path": "macros/relations/drop_backup.sql", "unique_id": "macro.dbt.default__get_drop_backup_sql", "macro_sql": "{%- macro default__get_drop_backup_sql(relation) -%}\n\n -- get the standard backup name\n {% set backup_relation = make_backup_relation(relation, relation.type) %}\n\n {{ get_drop_sql(backup_relation) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.make_backup_relation", "macro.dbt.get_drop_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.9838035, "supported_languages": null}, "macro.dbt.get_create_intermediate_sql": {"name": "get_create_intermediate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create_intermediate.sql", "original_file_path": "macros/relations/create_intermediate.sql", "unique_id": "macro.dbt.get_create_intermediate_sql", "macro_sql": "{%- macro get_create_intermediate_sql(relation, sql) -%}\n {{- log('Applying CREATE INTERMEDIATE to: ' ~ relation) -}}\n {{- adapter.dispatch('get_create_intermediate_sql', 'dbt')(relation, sql) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_create_intermediate_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783708210.9844794, "supported_languages": null}, "macro.dbt.default__get_create_intermediate_sql": {"name": "default__get_create_intermediate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create_intermediate.sql", "original_file_path": "macros/relations/create_intermediate.sql", "unique_id": "macro.dbt.default__get_create_intermediate_sql", "macro_sql": "{%- macro default__get_create_intermediate_sql(relation, sql) -%}\n\n -- get the standard intermediate name\n {% set intermediate_relation = make_intermediate_relation(relation) %}\n\n -- drop any pre-existing intermediate\n {{ get_drop_sql(intermediate_relation) }};\n\n {{ get_create_sql(intermediate_relation, sql) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.make_intermediate_relation", "macro.dbt.get_drop_sql", "macro.dbt.get_create_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783708210.9849875, "supported_languages": null}, "macro.dbt.get_replace_sql": {"name": "get_replace_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/replace.sql", "original_file_path": "macros/relations/replace.sql", "unique_id": "macro.dbt.get_replace_sql", "macro_sql": "{% macro get_replace_sql(existing_relation, target_relation, sql) %}\n {{- log('Applying REPLACE to: ' ~ existing_relation) -}}\n {{- adapter.dispatch('get_replace_sql', 'dbt')(existing_relation, target_relation, sql) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_replace_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "existing_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783708210.9860256, "supported_languages": null}, "macro.dbt.default__get_replace_sql": {"name": "default__get_replace_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/replace.sql", "original_file_path": "macros/relations/replace.sql", "unique_id": "macro.dbt.default__get_replace_sql", "macro_sql": "{% macro default__get_replace_sql(existing_relation, target_relation, sql) %}\n\n {# /* use a create or replace statement if possible */ #}\n\n {% set is_replaceable = existing_relation.type == target_relation.type and existing_relation.can_be_replaced %}\n\n {% if is_replaceable and existing_relation.is_view %}\n {{ get_replace_view_sql(target_relation, sql) }}\n\n {% elif is_replaceable and existing_relation.is_table %}\n {{ get_replace_table_sql(target_relation, sql) }}\n\n {% elif is_replaceable and existing_relation.is_materialized_view %}\n {{ get_replace_materialized_view_sql(target_relation, sql) }}\n\n {# /* a create or replace statement is not possible, so try to stage and/or backup to be safe */ #}\n\n {# /* create target_relation as an intermediate relation, then swap it out with the existing one using a backup */ #}\n {%- elif target_relation.can_be_renamed and existing_relation.can_be_renamed -%}\n {{ get_create_intermediate_sql(target_relation, sql) }};\n {{ get_create_backup_sql(existing_relation) }};\n {{ get_rename_intermediate_sql(target_relation) }};\n {{ get_drop_backup_sql(existing_relation) }}\n\n {# /* create target_relation as an intermediate relation, then swap it out with the existing one without using a backup */ #}\n {%- elif target_relation.can_be_renamed -%}\n {{ get_create_intermediate_sql(target_relation, sql) }};\n {{ get_drop_sql(existing_relation) }};\n {{ get_rename_intermediate_sql(target_relation) }}\n\n {# /* create target_relation in place by first backing up the existing relation */ #}\n {%- elif existing_relation.can_be_renamed -%}\n {{ get_create_backup_sql(existing_relation) }};\n {{ get_create_sql(target_relation, sql) }};\n {{ get_drop_backup_sql(existing_relation) }}\n\n {# /* no renaming is allowed, so just drop and create */ #}\n {%- else -%}\n {{ get_drop_sql(existing_relation) }};\n {{ get_create_sql(target_relation, sql) }}\n\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_replace_view_sql", "macro.dbt.get_replace_table_sql", "macro.dbt.get_replace_materialized_view_sql", "macro.dbt.get_create_intermediate_sql", "macro.dbt.get_create_backup_sql", "macro.dbt.get_rename_intermediate_sql", "macro.dbt.get_drop_backup_sql", "macro.dbt.get_drop_sql", "macro.dbt.get_create_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "existing_relation", "type": null, "description": ""}, {"name": "target_relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783708210.9884453, "supported_languages": null}, "macro.dbt.get_rename_intermediate_sql": {"name": "get_rename_intermediate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename_intermediate.sql", "original_file_path": "macros/relations/rename_intermediate.sql", "unique_id": "macro.dbt.get_rename_intermediate_sql", "macro_sql": "{%- macro get_rename_intermediate_sql(relation) -%}\n {{- log('Applying RENAME INTERMEDIATE to: ' ~ relation) -}}\n {{- adapter.dispatch('get_rename_intermediate_sql', 'dbt')(relation) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_rename_intermediate_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.9890795, "supported_languages": null}, "macro.dbt.default__get_rename_intermediate_sql": {"name": "default__get_rename_intermediate_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename_intermediate.sql", "original_file_path": "macros/relations/rename_intermediate.sql", "unique_id": "macro.dbt.default__get_rename_intermediate_sql", "macro_sql": "{%- macro default__get_rename_intermediate_sql(relation) -%}\n\n -- get the standard intermediate name\n {% set intermediate_relation = make_intermediate_relation(relation) %}\n\n {{ get_rename_sql(intermediate_relation, relation.identifier) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.make_intermediate_relation", "macro.dbt.get_rename_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.9895191, "supported_languages": null}, "macro.dbt.get_drop_sql": {"name": "get_drop_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.get_drop_sql", "macro_sql": "{%- macro get_drop_sql(relation) -%}\n {{- log('Applying DROP to: ' ~ relation) -}}\n {{- adapter.dispatch('get_drop_sql', 'dbt')(relation) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_drop_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.990397, "supported_languages": null}, "macro.dbt.default__get_drop_sql": {"name": "default__get_drop_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.default__get_drop_sql", "macro_sql": "{%- macro default__get_drop_sql(relation) -%}\n\n {%- if relation.is_view -%}\n {{ drop_view(relation) }}\n\n {%- elif relation.is_table -%}\n {{ drop_table(relation) }}\n\n {%- elif relation.is_materialized_view -%}\n {{ drop_materialized_view(relation) }}\n\n {%- else -%}\n drop {{ relation.type }} if exists {{ relation.render() }} cascade\n\n {%- endif -%}\n\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.drop_view", "macro.dbt.drop_table", "macro.dbt.drop_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.9912076, "supported_languages": null}, "macro.dbt.drop_relation": {"name": "drop_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.drop_relation", "macro_sql": "{% macro drop_relation(relation) -%}\n {{ return(adapter.dispatch('drop_relation', 'dbt')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__drop_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.991582, "supported_languages": null}, "macro.dbt.default__drop_relation": {"name": "default__drop_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.default__drop_relation", "macro_sql": "{% macro default__drop_relation(relation) -%}\n {% call statement('drop_relation', auto_begin=False) -%}\n {{ get_drop_sql(relation) }}\n {%- endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.get_drop_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.9919922, "supported_languages": null}, "macro.dbt.drop_relation_if_exists": {"name": "drop_relation_if_exists", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/drop.sql", "original_file_path": "macros/relations/drop.sql", "unique_id": "macro.dbt.drop_relation_if_exists", "macro_sql": "{% macro drop_relation_if_exists(relation) %}\n {% if relation is not none %}\n {{ adapter.drop_relation(relation) }}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.9924283, "supported_languages": null}, "macro.dbt.drop_schema_named": {"name": "drop_schema_named", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/schema.sql", "original_file_path": "macros/relations/schema.sql", "unique_id": "macro.dbt.drop_schema_named", "macro_sql": "{% macro drop_schema_named(schema_name) %}\n {{ return(adapter.dispatch('drop_schema_named', 'dbt') (schema_name)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__drop_schema_named"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_name", "type": null, "description": ""}], "created_at": 1783708210.9929593, "supported_languages": null}, "macro.dbt.default__drop_schema_named": {"name": "default__drop_schema_named", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/schema.sql", "original_file_path": "macros/relations/schema.sql", "unique_id": "macro.dbt.default__drop_schema_named", "macro_sql": "{% macro default__drop_schema_named(schema_name) %}\n {% set schema_relation = api.Relation.create(schema=schema_name) %}\n {{ adapter.drop_schema(schema_relation) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_name", "type": null, "description": ""}], "created_at": 1783708210.9935338, "supported_languages": null}, "macro.dbt.get_create_backup_sql": {"name": "get_create_backup_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create_backup.sql", "original_file_path": "macros/relations/create_backup.sql", "unique_id": "macro.dbt.get_create_backup_sql", "macro_sql": "{%- macro get_create_backup_sql(relation) -%}\n {{- log('Applying CREATE BACKUP to: ' ~ relation) -}}\n {{- adapter.dispatch('get_create_backup_sql', 'dbt')(relation) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_create_backup_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.9942136, "supported_languages": null}, "macro.dbt.default__get_create_backup_sql": {"name": "default__get_create_backup_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create_backup.sql", "original_file_path": "macros/relations/create_backup.sql", "unique_id": "macro.dbt.default__get_create_backup_sql", "macro_sql": "{%- macro default__get_create_backup_sql(relation) -%}\n\n -- get the standard backup name\n {% set backup_relation = make_backup_relation(relation, relation.type) %}\n\n -- drop any pre-existing backup\n {{ get_drop_sql(backup_relation) }};\n\n {{ get_rename_sql(relation, backup_relation.identifier) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.make_backup_relation", "macro.dbt.get_drop_sql", "macro.dbt.get_rename_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708210.9947684, "supported_languages": null}, "macro.dbt.get_rename_sql": {"name": "get_rename_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename.sql", "original_file_path": "macros/relations/rename.sql", "unique_id": "macro.dbt.get_rename_sql", "macro_sql": "{%- macro get_rename_sql(relation, new_name) -%}\n {{- log('Applying RENAME to: ' ~ relation) -}}\n {{- adapter.dispatch('get_rename_sql', 'dbt')(relation, new_name) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_rename_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1783708210.9956677, "supported_languages": null}, "macro.dbt.default__get_rename_sql": {"name": "default__get_rename_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename.sql", "original_file_path": "macros/relations/rename.sql", "unique_id": "macro.dbt.default__get_rename_sql", "macro_sql": "{%- macro default__get_rename_sql(relation, new_name) -%}\n\n {%- if relation.is_view -%}\n {{ get_rename_view_sql(relation, new_name) }}\n\n {%- elif relation.is_table -%}\n {{ get_rename_table_sql(relation, new_name) }}\n\n {%- elif relation.is_materialized_view -%}\n {{ get_rename_materialized_view_sql(relation, new_name) }}\n\n {%- else -%}\n {{- exceptions.raise_compiler_error(\"`get_rename_sql` has not been implemented for: \" ~ relation.type ) -}}\n\n {%- endif -%}\n\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.get_rename_view_sql", "macro.dbt.get_rename_table_sql", "macro.dbt.get_rename_materialized_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1783708210.9965534, "supported_languages": null}, "macro.dbt.rename_relation": {"name": "rename_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename.sql", "original_file_path": "macros/relations/rename.sql", "unique_id": "macro.dbt.rename_relation", "macro_sql": "{% macro rename_relation(from_relation, to_relation) -%}\n {{ return(adapter.dispatch('rename_relation', 'dbt')(from_relation, to_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__rename_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from_relation", "type": null, "description": ""}, {"name": "to_relation", "type": null, "description": ""}], "created_at": 1783708210.9969716, "supported_languages": null}, "macro.dbt.default__rename_relation": {"name": "default__rename_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/rename.sql", "original_file_path": "macros/relations/rename.sql", "unique_id": "macro.dbt.default__rename_relation", "macro_sql": "{% macro default__rename_relation(from_relation, to_relation) -%}\n {% set target_name = adapter.quote_as_configured(to_relation.identifier, 'identifier') %}\n {% call statement('rename_relation') -%}\n alter table {{ from_relation.render() }} rename to {{ target_name }}\n {%- endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from_relation", "type": null, "description": ""}, {"name": "to_relation", "type": null, "description": ""}], "created_at": 1783708210.9976823, "supported_languages": null}, "macro.dbt.get_create_sql": {"name": "get_create_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create.sql", "original_file_path": "macros/relations/create.sql", "unique_id": "macro.dbt.get_create_sql", "macro_sql": "{%- macro get_create_sql(relation, sql) -%}\n {{- log('Applying CREATE to: ' ~ relation) -}}\n {{- adapter.dispatch('get_create_sql', 'dbt')(relation, sql) -}}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt.default__get_create_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783708210.9984467, "supported_languages": null}, "macro.dbt.default__get_create_sql": {"name": "default__get_create_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/create.sql", "original_file_path": "macros/relations/create.sql", "unique_id": "macro.dbt.default__get_create_sql", "macro_sql": "{%- macro default__get_create_sql(relation, sql) -%}\n\n {%- if relation.is_view -%}\n {{ get_create_view_as_sql(relation, sql) }}\n\n {%- elif relation.is_table -%}\n {{ get_create_table_as_sql(False, relation, sql) }}\n\n {%- elif relation.is_materialized_view -%}\n {{ get_create_materialized_view_as_sql(relation, sql) }}\n\n {%- else -%}\n {{- exceptions.raise_compiler_error(\"`get_create_sql` has not been implemented for: \" ~ relation.type ) -}}\n\n {%- endif -%}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.get_create_view_as_sql", "macro.dbt.get_create_table_as_sql", "macro.dbt.get_create_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783708210.9993553, "supported_languages": null}, "macro.dbt.get_replace_materialized_view_sql": {"name": "get_replace_materialized_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/replace.sql", "original_file_path": "macros/relations/materialized_view/replace.sql", "unique_id": "macro.dbt.get_replace_materialized_view_sql", "macro_sql": "{% macro get_replace_materialized_view_sql(relation, sql) %}\n {{- adapter.dispatch('get_replace_materialized_view_sql', 'dbt')(relation, sql) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_replace_materialized_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783708210.999875, "supported_languages": null}, "macro.dbt.default__get_replace_materialized_view_sql": {"name": "default__get_replace_materialized_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/replace.sql", "original_file_path": "macros/relations/materialized_view/replace.sql", "unique_id": "macro.dbt.default__get_replace_materialized_view_sql", "macro_sql": "{% macro default__get_replace_materialized_view_sql(relation, sql) %}\n {{ exceptions.raise_compiler_error(\n \"`get_replace_materialized_view_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783708211.0002036, "supported_languages": null}, "macro.dbt.drop_materialized_view": {"name": "drop_materialized_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/drop.sql", "original_file_path": "macros/relations/materialized_view/drop.sql", "unique_id": "macro.dbt.drop_materialized_view", "macro_sql": "{% macro drop_materialized_view(relation) -%}\n {{- adapter.dispatch('drop_materialized_view', 'dbt')(relation) -}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__drop_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708211.0006895, "supported_languages": null}, "macro.dbt.default__drop_materialized_view": {"name": "default__drop_materialized_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/drop.sql", "original_file_path": "macros/relations/materialized_view/drop.sql", "unique_id": "macro.dbt.default__drop_materialized_view", "macro_sql": "{% macro default__drop_materialized_view(relation) -%}\n drop materialized view if exists {{ relation.render() }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708211.0009463, "supported_languages": null}, "macro.dbt.refresh_materialized_view": {"name": "refresh_materialized_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/refresh.sql", "original_file_path": "macros/relations/materialized_view/refresh.sql", "unique_id": "macro.dbt.refresh_materialized_view", "macro_sql": "{% macro refresh_materialized_view(relation) %}\n {{- log('Applying REFRESH to: ' ~ relation) -}}\n {{- adapter.dispatch('refresh_materialized_view', 'dbt')(relation) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__refresh_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708211.0015457, "supported_languages": null}, "macro.dbt.default__refresh_materialized_view": {"name": "default__refresh_materialized_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/refresh.sql", "original_file_path": "macros/relations/materialized_view/refresh.sql", "unique_id": "macro.dbt.default__refresh_materialized_view", "macro_sql": "{% macro default__refresh_materialized_view(relation) %}\n {{ exceptions.raise_compiler_error(\"`refresh_materialized_view` has not been implemented for this adapter.\") }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708211.0018215, "supported_languages": null}, "macro.dbt.get_rename_materialized_view_sql": {"name": "get_rename_materialized_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/rename.sql", "original_file_path": "macros/relations/materialized_view/rename.sql", "unique_id": "macro.dbt.get_rename_materialized_view_sql", "macro_sql": "{% macro get_rename_materialized_view_sql(relation, new_name) %}\n {{- adapter.dispatch('get_rename_materialized_view_sql', 'dbt')(relation, new_name) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_rename_materialized_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1783708211.0023525, "supported_languages": null}, "macro.dbt.default__get_rename_materialized_view_sql": {"name": "default__get_rename_materialized_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/rename.sql", "original_file_path": "macros/relations/materialized_view/rename.sql", "unique_id": "macro.dbt.default__get_rename_materialized_view_sql", "macro_sql": "{% macro default__get_rename_materialized_view_sql(relation, new_name) %}\n {{ exceptions.raise_compiler_error(\n \"`get_rename_materialized_view_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1783708211.002954, "supported_languages": null}, "macro.dbt.get_create_materialized_view_as_sql": {"name": "get_create_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/create.sql", "original_file_path": "macros/relations/materialized_view/create.sql", "unique_id": "macro.dbt.get_create_materialized_view_as_sql", "macro_sql": "{% macro get_create_materialized_view_as_sql(relation, sql) -%}\n {{- adapter.dispatch('get_create_materialized_view_as_sql', 'dbt')(relation, sql) -}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_create_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783708211.003496, "supported_languages": null}, "macro.dbt.default__get_create_materialized_view_as_sql": {"name": "default__get_create_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/create.sql", "original_file_path": "macros/relations/materialized_view/create.sql", "unique_id": "macro.dbt.default__get_create_materialized_view_as_sql", "macro_sql": "{% macro default__get_create_materialized_view_as_sql(relation, sql) -%}\n {{ exceptions.raise_compiler_error(\n \"`get_create_materialized_view_as_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783708211.003797, "supported_languages": null}, "macro.dbt.get_alter_materialized_view_as_sql": {"name": "get_alter_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt.get_alter_materialized_view_as_sql", "macro_sql": "{% macro get_alter_materialized_view_as_sql(\n relation,\n configuration_changes,\n sql,\n existing_relation,\n backup_relation,\n intermediate_relation\n) %}\n {{- log('Applying ALTER to: ' ~ relation) -}}\n {{- adapter.dispatch('get_alter_materialized_view_as_sql', 'dbt')(\n relation,\n configuration_changes,\n sql,\n existing_relation,\n backup_relation,\n intermediate_relation\n ) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_alter_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "configuration_changes", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}, {"name": "existing_relation", "type": null, "description": ""}, {"name": "backup_relation", "type": null, "description": ""}, {"name": "intermediate_relation", "type": null, "description": ""}], "created_at": 1783708211.0048213, "supported_languages": null}, "macro.dbt.default__get_alter_materialized_view_as_sql": {"name": "default__get_alter_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt.default__get_alter_materialized_view_as_sql", "macro_sql": "{% macro default__get_alter_materialized_view_as_sql(\n relation,\n configuration_changes,\n sql,\n existing_relation,\n backup_relation,\n intermediate_relation\n) %}\n {{ exceptions.raise_compiler_error(\"Materialized views have not been implemented for this adapter.\") }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "configuration_changes", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}, {"name": "existing_relation", "type": null, "description": ""}, {"name": "backup_relation", "type": null, "description": ""}, {"name": "intermediate_relation", "type": null, "description": ""}], "created_at": 1783708211.0052288, "supported_languages": null}, "macro.dbt.get_materialized_view_configuration_changes": {"name": "get_materialized_view_configuration_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt.get_materialized_view_configuration_changes", "macro_sql": "{% macro get_materialized_view_configuration_changes(existing_relation, new_config) %}\n /* {#\n It's recommended that configuration changes be formatted as follows:\n {\"\": [{\"action\": \"\", \"context\": ...}]}\n\n For example:\n {\n \"indexes\": [\n {\"action\": \"drop\", \"context\": \"index_abc\"},\n {\"action\": \"create\", \"context\": {\"columns\": [\"column_1\", \"column_2\"], \"type\": \"hash\", \"unique\": True}},\n ],\n }\n\n Either way, `get_materialized_view_configuration_changes` needs to align with `get_alter_materialized_view_as_sql`.\n #} */\n {{- log('Determining configuration changes on: ' ~ existing_relation) -}}\n {%- do return(adapter.dispatch('get_materialized_view_configuration_changes', 'dbt')(existing_relation, new_config)) -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_materialized_view_configuration_changes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "existing_relation", "type": null, "description": ""}, {"name": "new_config", "type": null, "description": ""}], "created_at": 1783708211.0057857, "supported_languages": null}, "macro.dbt.default__get_materialized_view_configuration_changes": {"name": "default__get_materialized_view_configuration_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/materialized_view/alter.sql", "original_file_path": "macros/relations/materialized_view/alter.sql", "unique_id": "macro.dbt.default__get_materialized_view_configuration_changes", "macro_sql": "{% macro default__get_materialized_view_configuration_changes(existing_relation, new_config) %}\n {{ exceptions.raise_compiler_error(\"Materialized views have not been implemented for this adapter.\") }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "existing_relation", "type": null, "description": ""}, {"name": "new_config", "type": null, "description": ""}], "created_at": 1783708211.0061078, "supported_languages": null}, "macro.dbt.get_replace_view_sql": {"name": "get_replace_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.get_replace_view_sql", "macro_sql": "{% macro get_replace_view_sql(relation, sql) %}\n {{- adapter.dispatch('get_replace_view_sql', 'dbt')(relation, sql) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_replace_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783708211.00708, "supported_languages": null}, "macro.dbt.default__get_replace_view_sql": {"name": "default__get_replace_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.default__get_replace_view_sql", "macro_sql": "{% macro default__get_replace_view_sql(relation, sql) %}\n {{ exceptions.raise_compiler_error(\n \"`get_replace_view_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783708211.0073895, "supported_languages": null}, "macro.dbt.create_or_replace_view": {"name": "create_or_replace_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.create_or_replace_view", "macro_sql": "{% macro create_or_replace_view() %}\n {%- set identifier = model['alias'] -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set exists_as_view = (old_relation is not none and old_relation.is_view) -%}\n\n {%- set target_relation = api.Relation.create(\n identifier=identifier, schema=schema, database=database,\n type='view') -%}\n {% set grant_config = config.get('grants') %}\n\n {{ run_hooks(pre_hooks) }}\n\n -- If there's a table with the same name and we weren't told to full refresh,\n -- that's an error. If we were told to full refresh, drop it. This behavior differs\n -- for Snowflake and BigQuery, so multiple dispatch is used.\n {%- if old_relation is not none and old_relation.is_table -%}\n {{ handle_existing_table(should_full_refresh(), old_relation) }}\n {%- endif -%}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_view_as_sql(target_relation, sql) }}\n {%- endcall %}\n\n {% set should_revoke = should_revoke(exists_as_view, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {{ run_hooks(post_hooks) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.handle_existing_table", "macro.dbt.should_full_refresh", "macro.dbt.statement", "macro.dbt.get_create_view_as_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.0096164, "supported_languages": null}, "macro.dbt.handle_existing_table": {"name": "handle_existing_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.handle_existing_table", "macro_sql": "{% macro handle_existing_table(full_refresh, old_relation) %}\n {{ adapter.dispatch('handle_existing_table', 'dbt')(full_refresh, old_relation) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__handle_existing_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "full_refresh", "type": null, "description": ""}, {"name": "old_relation", "type": null, "description": ""}], "created_at": 1783708211.0100133, "supported_languages": null}, "macro.dbt.default__handle_existing_table": {"name": "default__handle_existing_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/replace.sql", "original_file_path": "macros/relations/view/replace.sql", "unique_id": "macro.dbt.default__handle_existing_table", "macro_sql": "{% macro default__handle_existing_table(full_refresh, old_relation) %}\n {{ log(\"Dropping relation \" ~ old_relation.render() ~ \" because it is of type \" ~ old_relation.type) }}\n {{ adapter.drop_relation(old_relation) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "full_refresh", "type": null, "description": ""}, {"name": "old_relation", "type": null, "description": ""}], "created_at": 1783708211.010513, "supported_languages": null}, "macro.dbt.drop_view": {"name": "drop_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/drop.sql", "original_file_path": "macros/relations/view/drop.sql", "unique_id": "macro.dbt.drop_view", "macro_sql": "{% macro drop_view(relation) -%}\n {{- adapter.dispatch('drop_view', 'dbt')(relation) -}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__drop_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708211.0110207, "supported_languages": null}, "macro.dbt.default__drop_view": {"name": "default__drop_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/drop.sql", "original_file_path": "macros/relations/view/drop.sql", "unique_id": "macro.dbt.default__drop_view", "macro_sql": "{% macro default__drop_view(relation) -%}\n drop view if exists {{ relation.render() }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708211.0113003, "supported_languages": null}, "macro.dbt.get_rename_view_sql": {"name": "get_rename_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/rename.sql", "original_file_path": "macros/relations/view/rename.sql", "unique_id": "macro.dbt.get_rename_view_sql", "macro_sql": "{% macro get_rename_view_sql(relation, new_name) %}\n {{- adapter.dispatch('get_rename_view_sql', 'dbt')(relation, new_name) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_rename_view_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1783708211.0118124, "supported_languages": null}, "macro.dbt.default__get_rename_view_sql": {"name": "default__get_rename_view_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/rename.sql", "original_file_path": "macros/relations/view/rename.sql", "unique_id": "macro.dbt.default__get_rename_view_sql", "macro_sql": "{% macro default__get_rename_view_sql(relation, new_name) %}\n {{ exceptions.raise_compiler_error(\n \"`get_rename_view_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1783708211.012243, "supported_languages": null}, "macro.dbt.get_create_view_as_sql": {"name": "get_create_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/create.sql", "original_file_path": "macros/relations/view/create.sql", "unique_id": "macro.dbt.get_create_view_as_sql", "macro_sql": "{% macro get_create_view_as_sql(relation, sql) -%}\n {{ adapter.dispatch('get_create_view_as_sql', 'dbt')(relation, sql) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_create_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783708211.0129595, "supported_languages": null}, "macro.dbt.default__get_create_view_as_sql": {"name": "default__get_create_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/create.sql", "original_file_path": "macros/relations/view/create.sql", "unique_id": "macro.dbt.default__get_create_view_as_sql", "macro_sql": "{% macro default__get_create_view_as_sql(relation, sql) -%}\n {{ return(create_view_as(relation, sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783708211.0133154, "supported_languages": null}, "macro.dbt.create_view_as": {"name": "create_view_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/create.sql", "original_file_path": "macros/relations/view/create.sql", "unique_id": "macro.dbt.create_view_as", "macro_sql": "{% macro create_view_as(relation, sql) -%}\n {{ adapter.dispatch('create_view_as', 'dbt')(relation, sql) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783708211.0136833, "supported_languages": null}, "macro.dbt.default__create_view_as": {"name": "default__create_view_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/view/create.sql", "original_file_path": "macros/relations/view/create.sql", "unique_id": "macro.dbt.default__create_view_as", "macro_sql": "{% macro default__create_view_as(relation, sql) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n create view {{ relation.render() }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced %}\n {{ get_assert_columns_equivalent(sql) }}\n {%- endif %}\n as (\n {{ sql }}\n );\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783708211.0145772, "supported_languages": null}, "macro.dbt.get_replace_table_sql": {"name": "get_replace_table_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/replace.sql", "original_file_path": "macros/relations/table/replace.sql", "unique_id": "macro.dbt.get_replace_table_sql", "macro_sql": "{% macro get_replace_table_sql(relation, sql) %}\n {{- adapter.dispatch('get_replace_table_sql', 'dbt')(relation, sql) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_replace_table_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783708211.0151215, "supported_languages": null}, "macro.dbt.default__get_replace_table_sql": {"name": "default__get_replace_table_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/replace.sql", "original_file_path": "macros/relations/table/replace.sql", "unique_id": "macro.dbt.default__get_replace_table_sql", "macro_sql": "{% macro default__get_replace_table_sql(relation, sql) %}\n {{ exceptions.raise_compiler_error(\n \"`get_replace_table_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783708211.015431, "supported_languages": null}, "macro.dbt.drop_table": {"name": "drop_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/drop.sql", "original_file_path": "macros/relations/table/drop.sql", "unique_id": "macro.dbt.drop_table", "macro_sql": "{% macro drop_table(relation) -%}\n {{- adapter.dispatch('drop_table', 'dbt')(relation) -}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__drop_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708211.0159032, "supported_languages": null}, "macro.dbt.default__drop_table": {"name": "default__drop_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/drop.sql", "original_file_path": "macros/relations/table/drop.sql", "unique_id": "macro.dbt.default__drop_table", "macro_sql": "{% macro default__drop_table(relation) -%}\n drop table if exists {{ relation.render() }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708211.0161815, "supported_languages": null}, "macro.dbt.get_rename_table_sql": {"name": "get_rename_table_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/rename.sql", "original_file_path": "macros/relations/table/rename.sql", "unique_id": "macro.dbt.get_rename_table_sql", "macro_sql": "{% macro get_rename_table_sql(relation, new_name) %}\n {{- adapter.dispatch('get_rename_table_sql', 'dbt')(relation, new_name) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_rename_table_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1783708211.016706, "supported_languages": null}, "macro.dbt.default__get_rename_table_sql": {"name": "default__get_rename_table_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/rename.sql", "original_file_path": "macros/relations/table/rename.sql", "unique_id": "macro.dbt.default__get_rename_table_sql", "macro_sql": "{% macro default__get_rename_table_sql(relation, new_name) %}\n {{ exceptions.raise_compiler_error(\n \"`get_rename_table_sql` has not been implemented for this adapter.\"\n ) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "new_name", "type": null, "description": ""}], "created_at": 1783708211.01702, "supported_languages": null}, "macro.dbt.get_create_table_as_sql": {"name": "get_create_table_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.get_create_table_as_sql", "macro_sql": "{% macro get_create_table_as_sql(temporary, relation, sql) -%}\n {{ adapter.dispatch('get_create_table_as_sql', 'dbt')(temporary, relation, sql) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_create_table_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "temporary", "type": null, "description": ""}, {"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783708211.0182278, "supported_languages": null}, "macro.dbt.default__get_create_table_as_sql": {"name": "default__get_create_table_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.default__get_create_table_as_sql", "macro_sql": "{% macro default__get_create_table_as_sql(temporary, relation, sql) -%}\n {{ return(create_table_as(temporary, relation, sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "temporary", "type": null, "description": ""}, {"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783708211.0186043, "supported_languages": null}, "macro.dbt.create_table_as": {"name": "create_table_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.create_table_as", "macro_sql": "{% macro create_table_as(temporary, relation, compiled_code, language='sql') -%}\n {# backward compatibility for create_table_as that does not support language #}\n {% if language == \"sql\" %}\n {{ adapter.dispatch('create_table_as', 'dbt')(temporary, relation, compiled_code)}}\n {% else %}\n {{ adapter.dispatch('create_table_as', 'dbt')(temporary, relation, compiled_code, language) }}\n {% endif %}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "temporary", "type": null, "description": ""}, {"name": "relation", "type": null, "description": ""}, {"name": "compiled_code", "type": null, "description": ""}, {"name": "language", "type": null, "description": ""}], "created_at": 1783708211.0195825, "supported_languages": null}, "macro.dbt.default__create_table_as": {"name": "default__create_table_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.default__create_table_as", "macro_sql": "{% macro default__create_table_as(temporary, relation, sql) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n\n create {% if temporary: -%}temporary{%- endif %} table\n {{ relation.include(database=(not temporary), schema=(not temporary)) }}\n {% set contract_config = config.get('contract') %}\n {% if contract_config.enforced and (not temporary) %}\n {{ get_assert_columns_equivalent(sql) }}\n {{ get_table_columns_and_constraints() }}\n {%- set sql = get_select_subquery(sql) %}\n {% endif %}\n as (\n {{ sql }}\n );\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_assert_columns_equivalent", "macro.dbt.get_table_columns_and_constraints", "macro.dbt.get_select_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "temporary", "type": null, "description": ""}, {"name": "relation", "type": null, "description": ""}, {"name": "sql", "type": null, "description": ""}], "created_at": 1783708211.0209699, "supported_languages": null}, "macro.dbt.default__get_column_names": {"name": "default__get_column_names", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.default__get_column_names", "macro_sql": "{% macro default__get_column_names() %}\n {#- loop through user_provided_columns to get column names -#}\n {%- set user_provided_columns = model['columns'] -%}\n {%- for i in user_provided_columns %}\n {%- set col = user_provided_columns[i] -%}\n {%- set col_name = adapter.quote(col['name']) if col.get('quote') else col['name'] -%}\n {{ col_name }}{{ \", \" if not loop.last }}\n {%- endfor -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.0219076, "supported_languages": null}, "macro.dbt.get_select_subquery": {"name": "get_select_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.get_select_subquery", "macro_sql": "{% macro get_select_subquery(sql) %}\n {{ return(adapter.dispatch('get_select_subquery', 'dbt')(sql)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_select_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1783708211.022316, "supported_languages": null}, "macro.dbt.default__get_select_subquery": {"name": "default__get_select_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/table/create.sql", "original_file_path": "macros/relations/table/create.sql", "unique_id": "macro.dbt.default__get_select_subquery", "macro_sql": "{% macro default__get_select_subquery(sql) %}\n select {{ adapter.dispatch('get_column_names', 'dbt')() }}\n from (\n {{ sql }}\n ) as model_subq\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_column_names"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1783708211.022682, "supported_languages": null}, "macro.dbt.get_table_columns_and_constraints": {"name": "get_table_columns_and_constraints", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.get_table_columns_and_constraints", "macro_sql": "{%- macro get_table_columns_and_constraints() -%}\n {{ adapter.dispatch('get_table_columns_and_constraints', 'dbt')() }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__get_table_columns_and_constraints"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.024107, "supported_languages": null}, "macro.dbt.default__get_table_columns_and_constraints": {"name": "default__get_table_columns_and_constraints", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.default__get_table_columns_and_constraints", "macro_sql": "{% macro default__get_table_columns_and_constraints() -%}\n {{ return(table_columns_and_constraints()) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.table_columns_and_constraints"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.0243626, "supported_languages": null}, "macro.dbt.table_columns_and_constraints": {"name": "table_columns_and_constraints", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.table_columns_and_constraints", "macro_sql": "{% macro table_columns_and_constraints() %}\n {# loop through user_provided_columns to create DDL with data types and constraints #}\n {%- set raw_column_constraints = adapter.render_raw_columns_constraints(raw_columns=model['columns']) -%}\n {%- set raw_model_constraints = adapter.render_raw_model_constraints(raw_constraints=model['constraints']) -%}\n (\n {% for c in raw_column_constraints -%}\n {{ c }}{{ \",\" if not loop.last or raw_model_constraints }}\n {% endfor %}\n {% for c in raw_model_constraints -%}\n {{ c }}{{ \",\" if not loop.last }}\n {% endfor -%}\n )\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.0254467, "supported_languages": null}, "macro.dbt.get_assert_columns_equivalent": {"name": "get_assert_columns_equivalent", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.get_assert_columns_equivalent", "macro_sql": "\n\n{%- macro get_assert_columns_equivalent(sql) -%}\n {{ adapter.dispatch('get_assert_columns_equivalent', 'dbt')(sql) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__get_assert_columns_equivalent"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1783708211.0257862, "supported_languages": null}, "macro.dbt.default__get_assert_columns_equivalent": {"name": "default__get_assert_columns_equivalent", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.default__get_assert_columns_equivalent", "macro_sql": "{% macro default__get_assert_columns_equivalent(sql) -%}\n {{ return(assert_columns_equivalent(sql)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.assert_columns_equivalent"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1783708211.0260851, "supported_languages": null}, "macro.dbt.assert_columns_equivalent": {"name": "assert_columns_equivalent", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.assert_columns_equivalent", "macro_sql": "{% macro assert_columns_equivalent(sql) %}\n\n {#-- First ensure the user has defined 'columns' in yaml specification --#}\n {%- set user_defined_columns = model['columns'] -%}\n {%- if not user_defined_columns -%}\n {{ exceptions.raise_contract_error([], []) }}\n {%- endif -%}\n\n {#-- Obtain the column schema provided by sql file. #}\n {%- set sql_file_provided_columns = get_column_schema_from_query(sql, config.get('sql_header', none)) -%}\n {#--Obtain the column schema provided by the schema file by generating an 'empty schema' query from the model's columns. #}\n {%- set schema_file_provided_columns = get_column_schema_from_query(get_empty_schema_sql(user_defined_columns)) -%}\n\n {#-- create dictionaries with name and formatted data type and strings for exception #}\n {%- set sql_columns = format_columns(sql_file_provided_columns) -%}\n {%- set yaml_columns = format_columns(schema_file_provided_columns) -%}\n\n {%- if sql_columns|length != yaml_columns|length -%}\n {%- do exceptions.raise_contract_error(yaml_columns, sql_columns) -%}\n {%- endif -%}\n\n {%- for sql_col in sql_columns -%}\n {%- set yaml_col = [] -%}\n {%- for this_col in yaml_columns -%}\n {%- if this_col['name'] == sql_col['name'] -%}\n {%- do yaml_col.append(this_col) -%}\n {%- break -%}\n {%- endif -%}\n {%- endfor -%}\n {%- if not yaml_col -%}\n {#-- Column with name not found in yaml #}\n {%- do exceptions.raise_contract_error(yaml_columns, sql_columns) -%}\n {%- endif -%}\n {%- if sql_col['formatted'] != yaml_col[0]['formatted'] -%}\n {#-- Column data types don't match #}\n {%- do exceptions.raise_contract_error(yaml_columns, sql_columns) -%}\n {%- endif -%}\n {%- endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_column_schema_from_query", "macro.dbt.get_empty_schema_sql", "macro.dbt.format_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "sql", "type": null, "description": ""}], "created_at": 1783708211.0287175, "supported_languages": null}, "macro.dbt.format_columns": {"name": "format_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.format_columns", "macro_sql": "{% macro format_columns(columns) %}\n {% set formatted_columns = [] %}\n {% for column in columns %}\n {%- set formatted_column = adapter.dispatch('format_column', 'dbt')(column) -%}\n {%- do formatted_columns.append(formatted_column) -%}\n {% endfor %}\n {{ return(formatted_columns) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__format_column"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "columns", "type": null, "description": ""}], "created_at": 1783708211.029518, "supported_languages": null}, "macro.dbt.default__format_column": {"name": "default__format_column", "resource_type": "macro", "package_name": "dbt", "path": "macros/relations/column/columns_spec_ddl.sql", "original_file_path": "macros/relations/column/columns_spec_ddl.sql", "unique_id": "macro.dbt.default__format_column", "macro_sql": "{% macro default__format_column(column) -%}\n {% set data_type = column.dtype %}\n {% set formatted = column.column.lower() ~ \" \" ~ data_type %}\n {{ return({'name': column.name, 'data_type': data_type, 'formatted': formatted}) }}\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}], "created_at": 1783708211.0302665, "supported_languages": null}, "macro.dbt.generate_database_name": {"name": "generate_database_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "unique_id": "macro.dbt.generate_database_name", "macro_sql": "{% macro generate_database_name(custom_database_name=none, node=none) -%}\n {% do return(adapter.dispatch('generate_database_name', 'dbt')(custom_database_name, node)) %}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_database_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_database_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1783708211.0310452, "supported_languages": null}, "macro.dbt.default__generate_database_name": {"name": "default__generate_database_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "unique_id": "macro.dbt.default__generate_database_name", "macro_sql": "{% macro default__generate_database_name(custom_database_name=none, node=none) -%}\n {%- set default_database = target.database -%}\n {%- if node is not none -%}\n {%- set catalog_relation = adapter.build_catalog_relation(node) -%}\n {%- if catalog_relation and catalog_relation|attr('catalog_database') -%}\n {{ return(catalog_relation.catalog_database) }}\n {%- endif -%}\n {%- endif -%}\n {%- if custom_database_name is none -%}\n\n {{ default_database }}\n\n {%- else -%}\n\n {{ custom_database_name }}\n\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_database_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1783708211.0320795, "supported_languages": null}, "macro.dbt.generate_schema_name": {"name": "generate_schema_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "unique_id": "macro.dbt.generate_schema_name", "macro_sql": "{% macro generate_schema_name(custom_schema_name=none, node=none) -%}\n {{ return(adapter.dispatch('generate_schema_name', 'dbt')(custom_schema_name, node)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_schema_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1783708211.0329201, "supported_languages": null}, "macro.dbt.default__generate_schema_name": {"name": "default__generate_schema_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "unique_id": "macro.dbt.default__generate_schema_name", "macro_sql": "{% macro default__generate_schema_name(custom_schema_name, node) -%}\n\n {%- set default_schema = target.schema -%}\n {%- if custom_schema_name is none -%}\n\n {{ default_schema }}\n\n {%- else -%}\n\n {{ default_schema }}_{{ custom_schema_name | trim }}\n\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_schema_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1783708211.0335991, "supported_languages": null}, "macro.dbt.generate_schema_name_for_env": {"name": "generate_schema_name_for_env", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "unique_id": "macro.dbt.generate_schema_name_for_env", "macro_sql": "{% macro generate_schema_name_for_env(custom_schema_name, node) -%}\n\n {%- set default_schema = target.schema -%}\n {%- if target.name == 'prod' and custom_schema_name is not none -%}\n\n {{ custom_schema_name | trim }}\n\n {%- else -%}\n\n {{ default_schema }}\n\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_schema_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1783708211.0342007, "supported_languages": null}, "macro.dbt.generate_latest_version_pointer_alias": {"name": "generate_latest_version_pointer_alias", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_latest_version_pointer_alias.sql", "original_file_path": "macros/get_custom_name/get_latest_version_pointer_alias.sql", "unique_id": "macro.dbt.generate_latest_version_pointer_alias", "macro_sql": "{% macro generate_latest_version_pointer_alias(custom_alias_name=none, node=none) -%}\n {% do return(adapter.dispatch('generate_latest_version_pointer_alias', 'dbt')(custom_alias_name, node)) %}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_latest_version_pointer_alias"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_alias_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1783708211.0349035, "supported_languages": null}, "macro.dbt.default__generate_latest_version_pointer_alias": {"name": "default__generate_latest_version_pointer_alias", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_latest_version_pointer_alias.sql", "original_file_path": "macros/get_custom_name/get_latest_version_pointer_alias.sql", "unique_id": "macro.dbt.default__generate_latest_version_pointer_alias", "macro_sql": "{% macro default__generate_latest_version_pointer_alias(custom_alias_name=none, node=none) -%}\n {%- if custom_alias_name -%}\n {{ custom_alias_name | trim }}\n {%- else -%}\n {{ node.name }}\n {%- endif -%}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_alias_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1783708211.0353746, "supported_languages": null}, "macro.dbt.generate_alias_name": {"name": "generate_alias_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "unique_id": "macro.dbt.generate_alias_name", "macro_sql": "{% macro generate_alias_name(custom_alias_name=none, node=none) -%}\n {% do return(adapter.dispatch('generate_alias_name', 'dbt')(custom_alias_name, node)) %}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__generate_alias_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_alias_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1783708211.0361044, "supported_languages": null}, "macro.dbt.default__generate_alias_name": {"name": "default__generate_alias_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "unique_id": "macro.dbt.default__generate_alias_name", "macro_sql": "{% macro default__generate_alias_name(custom_alias_name=none, node=none) -%}\n\n {%- if custom_alias_name -%}\n\n {{ custom_alias_name | trim }}\n\n {%- elif node.version -%}\n\n {{ return(node.name ~ \"_v\" ~ (node.version | replace(\".\", \"_\"))) }}\n\n {%- else -%}\n\n {{ node.name }}\n\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "custom_alias_name", "type": null, "description": ""}, {"name": "node", "type": null, "description": ""}], "created_at": 1783708211.0368667, "supported_languages": null}, "macro.dbt.resolve_model_name": {"name": "resolve_model_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.resolve_model_name", "macro_sql": "{% macro resolve_model_name(input_model_name) %}\n {{ return(adapter.dispatch('resolve_model_name', 'dbt')(input_model_name)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__resolve_model_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "input_model_name", "type": null, "description": ""}], "created_at": 1783708211.038412, "supported_languages": null}, "macro.dbt.default__resolve_model_name": {"name": "default__resolve_model_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.default__resolve_model_name", "macro_sql": "\n\n{%- macro default__resolve_model_name(input_model_name) -%}\n {{ input_model_name | string | replace('\"', '\\\"') }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "input_model_name", "type": null, "description": ""}], "created_at": 1783708211.0387397, "supported_languages": null}, "macro.dbt.build_ref_function": {"name": "build_ref_function", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.build_ref_function", "macro_sql": "{% macro build_ref_function(model) %}\n\n {%- set ref_dict = {} -%}\n {%- for _ref in model.refs -%}\n {% set _ref_args = [_ref.get('package'), _ref['name']] if _ref.get('package') else [_ref['name'],] %}\n {%- set resolved = ref(*_ref_args, v=_ref.get('version')) -%}\n\n {#\n We want to get the string of the returned relation by calling .render() in order to skip sample/empty\n mode rendering logic. However, people override the default ref macro, and often return a string instead\n of a relation (like the ref macro does by default). Thus, to make sure we dont blow things up, we have\n to ensure the resolved relation has a .render() method.\n #}\n {%- if resolved.render is defined and resolved.render is callable -%}\n {%- set resolved = resolved.render() -%}\n {%- endif -%}\n\n {%- if _ref.get('version') -%}\n {% do _ref_args.extend([\"v\" ~ _ref['version']]) %}\n {%- endif -%}\n {%- do ref_dict.update({_ref_args | join('.'): resolve_model_name(resolved)}) -%}\n {%- endfor -%}\n\ndef ref(*args, **kwargs):\n refs = {{ ref_dict | tojson }}\n key = '.'.join(args)\n version = kwargs.get(\"v\") or kwargs.get(\"version\")\n if version:\n key += f\".v{version}\"\n dbt_load_df_function = kwargs.get(\"dbt_load_df_function\")\n return dbt_load_df_function(refs[key])\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.resolve_model_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}], "created_at": 1783708211.0406797, "supported_languages": null}, "macro.dbt.build_source_function": {"name": "build_source_function", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.build_source_function", "macro_sql": "{% macro build_source_function(model) %}\n\n {%- set source_dict = {} -%}\n {%- for _source in model.sources -%}\n {%- set resolved = source(*_source) -%}\n {%- do source_dict.update({_source | join('.'): resolve_model_name(resolved)}) -%}\n {%- endfor -%}\n\ndef source(*args, dbt_load_df_function):\n sources = {{ source_dict | tojson }}\n key = '.'.join(args)\n return dbt_load_df_function(sources[key])\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.resolve_model_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}], "created_at": 1783708211.0415168, "supported_languages": null}, "macro.dbt.build_config_dict": {"name": "build_config_dict", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.build_config_dict", "macro_sql": "{% macro build_config_dict(model) %}\n {%- set config_dict = {} -%}\n {% set config_dbt_used = zip(model.config.config_keys_used, model.config.config_keys_defaults) | list %}\n {%- for key, default in config_dbt_used -%}\n {# weird type testing with enum, would be much easier to write this logic in Python! #}\n {%- if key == \"language\" -%}\n {%- set value = \"python\" -%}\n {%- endif -%}\n {%- set value = model.config.get(key, default) -%}\n {%- do config_dict.update({key: value}) -%}\n {%- endfor -%}\n {# Handle dbt.config.meta_get() calls - use separate dict to avoid overwriting native configs #}\n {%- set meta_dict = {} -%}\n {%- if model.config.meta_keys_used -%}\n {% set meta_dbt_used = zip(model.config.meta_keys_used, model.config.meta_keys_defaults) | list %}\n {%- for key, default in meta_dbt_used -%}\n {%- if model.config.meta and key in model.config.meta -%}\n {%- set value = model.config.meta[key] -%}\n {%- else -%}\n {%- set value = default -%}\n {%- endif -%}\n {%- do meta_dict.update({key: value}) -%}\n {%- endfor -%}\n {%- endif -%}\nconfig_dict = {{ config_dict }}\nmeta_dict = {{ meta_dict }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}], "created_at": 1783708211.0438335, "supported_languages": null}, "macro.dbt.py_script_postfix": {"name": "py_script_postfix", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.py_script_postfix", "macro_sql": "{% macro py_script_postfix(model) %}\n# This part is user provided model code\n# you will need to copy the next section to run the code\n# COMMAND ----------\n# this part is dbt logic for get ref work, do not modify\n\n{{ build_ref_function(model ) }}\n{{ build_source_function(model ) }}\n{{ build_config_dict(model) }}\n\nclass config:\n def __init__(self, *args, **kwargs):\n pass\n\n @staticmethod\n def get(key, default=None):\n return config_dict.get(key, default)\n\n @staticmethod\n def meta_get(key, default=None):\n return meta_dict.get(key, default)\n\nclass this:\n \"\"\"dbt.this() or dbt.this.identifier\"\"\"\n database = \"{{ this.database }}\"\n schema = \"{{ this.schema }}\"\n identifier = \"{{ this.identifier }}\"\n {% set this_relation_name = resolve_model_name(this) %}\n def __repr__(self):\n return '{{ this_relation_name }}'\n\n\nclass dbtObj:\n def __init__(self, load_df_function) -> None:\n self.source = lambda *args: source(*args, dbt_load_df_function=load_df_function)\n self.ref = lambda *args, **kwargs: ref(*args, **kwargs, dbt_load_df_function=load_df_function)\n self.config = config\n self.this = this()\n self.is_incremental = {{ is_incremental() }}\n\n# COMMAND ----------\n{{py_script_comment()}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.build_ref_function", "macro.dbt.build_source_function", "macro.dbt.build_config_dict", "macro.dbt.resolve_model_name", "macro.dbt.is_incremental", "macro.dbt.py_script_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}], "created_at": 1783708211.0449042, "supported_languages": null}, "macro.dbt.py_script_comment": {"name": "py_script_comment", "resource_type": "macro", "package_name": "dbt", "path": "macros/python_model/python.sql", "original_file_path": "macros/python_model/python.sql", "unique_id": "macro.dbt.py_script_comment", "macro_sql": "{%macro py_script_comment()%}\n{%endmacro%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.0450919, "supported_languages": null}, "macro.dbt.get_fixture_sql": {"name": "get_fixture_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/unit_test_sql/get_fixture_sql.sql", "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", "unique_id": "macro.dbt.get_fixture_sql", "macro_sql": "{% macro get_fixture_sql(rows, column_name_to_data_types) %}\n-- Fixture for {{ model.name }}\n{% set default_row = {} %}\n\n{%- if not column_name_to_data_types -%}\n{#-- Use defer_relation IFF it is available in the manifest and 'this' is missing from the database --#}\n{%- set this_or_defer_relation = defer_relation if (defer_relation and not load_relation(this)) else this -%}\n{%- set columns_in_relation = adapter.get_columns_in_relation(this_or_defer_relation) -%}\n\n{%- set column_name_to_data_types = {} -%}\n{%- set column_name_to_quoted = {} -%}\n{%- for column in columns_in_relation -%}\n\n{#-- This needs to be a case-insensitive comparison --#}\n{%- do column_name_to_data_types.update({column.name|lower: column.data_type}) -%}\n{%- do column_name_to_quoted.update({column.name|lower: column.quoted}) -%}\n{%- endfor -%}\n{%- endif -%}\n\n{%- if not column_name_to_data_types -%}\n {{ exceptions.raise_compiler_error(\"Not able to get columns for unit test '\" ~ model.name ~ \"' from relation \" ~ this ~ \" because the relation doesn't exist\") }}\n{%- endif -%}\n\n{%- for column_name, column_type in column_name_to_data_types.items() -%}\n {%- do default_row.update({column_name: (safe_cast(\"null\", column_type) | trim )}) -%}\n{%- endfor -%}\n\n{{ validate_fixture_rows(rows, row_number) }}\n\n{%- for row in rows -%}\n{%- set formatted_row = format_row(row, column_name_to_data_types) -%}\n{%- set default_row_copy = default_row.copy() -%}\n{%- do default_row_copy.update(formatted_row) -%}\nselect\n{%- for column_name, column_value in default_row_copy.items() %} {{ column_value }} as {{ column_name_to_quoted[column_name] }}{% if not loop.last -%}, {%- endif %}\n{%- endfor %}\n{%- if not loop.last %}\nunion all\n{% endif %}\n{%- endfor -%}\n\n{%- if (rows | length) == 0 -%}\n select\n {%- for column_name, column_value in default_row.items() %} {{ column_value }} as {{ column_name_to_quoted[column_name] }}{% if not loop.last -%},{%- endif %}\n {%- endfor %}\n limit 0\n{%- endif -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.load_relation", "macro.dbt.safe_cast", "macro.dbt.validate_fixture_rows", "macro.dbt.format_row"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "rows", "type": null, "description": ""}, {"name": "column_name_to_data_types", "type": null, "description": ""}], "created_at": 1783708211.0502005, "supported_languages": null}, "macro.dbt.get_expected_sql": {"name": "get_expected_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/unit_test_sql/get_fixture_sql.sql", "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", "unique_id": "macro.dbt.get_expected_sql", "macro_sql": "{% macro get_expected_sql(rows, column_name_to_data_types, column_name_to_quoted) %}\n\n{%- if (rows | length) == 0 -%}\n select * from dbt_internal_unit_test_actual\n limit 0\n{%- else -%}\n{%- for row in rows -%}\n{%- set formatted_row = format_row(row, column_name_to_data_types) -%}\nselect\n{%- for column_name, column_value in formatted_row.items() %} {{ column_value }} as {{ column_name_to_quoted[column_name] }}{% if not loop.last -%}, {%- endif %}\n{%- endfor %}\n{%- if not loop.last %}\nunion all\n{% endif %}\n{%- endfor -%}\n{%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.format_row"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "rows", "type": null, "description": ""}, {"name": "column_name_to_data_types", "type": null, "description": ""}, {"name": "column_name_to_quoted", "type": null, "description": ""}], "created_at": 1783708211.0513911, "supported_languages": null}, "macro.dbt.format_row": {"name": "format_row", "resource_type": "macro", "package_name": "dbt", "path": "macros/unit_test_sql/get_fixture_sql.sql", "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", "unique_id": "macro.dbt.format_row", "macro_sql": "\n\n{%- macro format_row(row, column_name_to_data_types) -%}\n {#-- generate case-insensitive formatted row --#}\n {% set formatted_row = {} %}\n {%- for column_name, column_value in row.items() -%}\n {% set column_name = column_name|lower %}\n\n {%- if column_name not in column_name_to_data_types %}\n {#-- if user-provided row contains column name that relation does not contain, raise an error --#}\n {% set fixture_name = \"expected output\" if model.resource_type == 'unit_test' else (\"'\" ~ model.name ~ \"'\") %}\n {{ exceptions.raise_compiler_error(\n \"Invalid column name: '\" ~ column_name ~ \"' in unit test fixture for \" ~ fixture_name ~ \".\"\n \"\\nAccepted columns for \" ~ fixture_name ~ \" are: \" ~ (column_name_to_data_types.keys()|list)\n ) }}\n {%- endif -%}\n\n {%- set column_type = column_name_to_data_types[column_name] %}\n\n {#-- For string fixture values, strip varchar length to prevent silent truncation (GH-11974) --#}\n {%- if column_value is string and 'varying' in column_type -%}\n {%- set column_type = column_type.split('(')[0] -%}\n {%- endif -%}\n\n {#-- sanitize column_value: wrap yaml strings in quotes, apply cast --#}\n {%- set column_value_clean = column_value -%}\n {%- if column_value is string -%}\n {%- set column_value_clean = dbt.string_literal(dbt.escape_single_quotes(column_value)) -%}\n {%- elif column_value is none -%}\n {%- set column_value_clean = 'null' -%}\n {%- endif -%}\n\n {%- set row_update = {column_name: safe_cast(column_value_clean, column_type) } -%}\n {%- do formatted_row.update(row_update) -%}\n {%- endfor -%}\n {{ return(formatted_row) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.string_literal", "macro.dbt.escape_single_quotes", "macro.dbt.safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "row", "type": null, "description": ""}, {"name": "column_name_to_data_types", "type": null, "description": ""}], "created_at": 1783708211.053958, "supported_languages": null}, "macro.dbt.validate_fixture_rows": {"name": "validate_fixture_rows", "resource_type": "macro", "package_name": "dbt", "path": "macros/unit_test_sql/get_fixture_sql.sql", "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", "unique_id": "macro.dbt.validate_fixture_rows", "macro_sql": "{%- macro validate_fixture_rows(rows, row_number) -%}\n {{ return(adapter.dispatch('validate_fixture_rows', 'dbt')(rows, row_number)) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.default__validate_fixture_rows"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "rows", "type": null, "description": ""}, {"name": "row_number", "type": null, "description": ""}], "created_at": 1783708211.0544128, "supported_languages": null}, "macro.dbt.default__validate_fixture_rows": {"name": "default__validate_fixture_rows", "resource_type": "macro", "package_name": "dbt", "path": "macros/unit_test_sql/get_fixture_sql.sql", "original_file_path": "macros/unit_test_sql/get_fixture_sql.sql", "unique_id": "macro.dbt.default__validate_fixture_rows", "macro_sql": "{%- macro default__validate_fixture_rows(rows, row_number) -%}\n {# This is an abstract method for adapter overrides as needed #}\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "rows", "type": null, "description": ""}, {"name": "row_number", "type": null, "description": ""}], "created_at": 1783708211.0546174, "supported_languages": null}, "macro.dbt.test_unique": {"name": "test_unique", "resource_type": "macro", "package_name": "dbt", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "unique_id": "macro.dbt.test_unique", "macro_sql": "{% test unique(model, column_name) %}\n {% set macro = adapter.dispatch('test_unique', 'dbt') %}\n {{ macro(model, column_name) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt.default__test_unique"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.055476, "supported_languages": null}, "macro.dbt.test_not_null": {"name": "test_not_null", "resource_type": "macro", "package_name": "dbt", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "unique_id": "macro.dbt.test_not_null", "macro_sql": "{% test not_null(model, column_name) %}\n {% set macro = adapter.dispatch('test_not_null', 'dbt') %}\n {{ macro(model, column_name) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt.default__test_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.0559692, "supported_languages": null}, "macro.dbt.test_accepted_values": {"name": "test_accepted_values", "resource_type": "macro", "package_name": "dbt", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "unique_id": "macro.dbt.test_accepted_values", "macro_sql": "{% test accepted_values(model, column_name, values, quote=True) %}\n {% set macro = adapter.dispatch('test_accepted_values', 'dbt') %}\n {{ macro(model, column_name, values, quote) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt.default__test_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.056593, "supported_languages": null}, "macro.dbt.test_relationships": {"name": "test_relationships", "resource_type": "macro", "package_name": "dbt", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "unique_id": "macro.dbt.test_relationships", "macro_sql": "{% test relationships(model, column_name, to, field) %}\n {% set macro = adapter.dispatch('test_relationships', 'dbt') %}\n {{ macro(model, column_name, to, field) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt.default__test_relationships"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.0571961, "supported_languages": null}, "macro.linkedin.linkedin_ads_persist_pass_through_columns": {"name": "linkedin_ads_persist_pass_through_columns", "resource_type": "macro", "package_name": "linkedin", "path": "macros/linkedin_ads_persist_pass_through_columns.sql", "original_file_path": "macros/linkedin_ads_persist_pass_through_columns.sql", "unique_id": "macro.linkedin.linkedin_ads_persist_pass_through_columns", "macro_sql": "{% macro linkedin_ads_persist_pass_through_columns(pass_through_variable, identifier=none, transform='', coalesce_with=none, except_variable=none, exclude_fields=[]) %}\n\n{% set except_fields = [] %}\n{% if except_variable is not none %}\n {# Start creating list of fields to exclude #}\n {% for item in var(except_variable) %}\n {% do except_fields.append(item.name) %}\n {% endfor %}\n{% endif %}\n\n{% for field in exclude_fields %}\n {% do except_fields.append(field) %}\n{% endfor %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n {% set field_name = field.alias|default(field.name)|lower if field is mapping else field|lower %}\n \n {% if field_name not in except_fields %}\n , {{ transform ~ '(' ~ ('coalesce(' if coalesce_with is not none else '') ~ (identifier ~ '.' if identifier else '') ~ field_name ~ ((', ' ~ coalesce_with ~ ')') if coalesce_with is not none else '') ~ ')' }} as {{ field_name }}\n {% endif %}\n\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "transform", "type": null, "description": ""}, {"name": "coalesce_with", "type": null, "description": ""}, {"name": "except_variable", "type": null, "description": ""}, {"name": "exclude_fields", "type": null, "description": ""}], "created_at": 1783708211.0600128, "supported_languages": null}, "macro.linkedin.linkedin_ads_extract_url_parameter": {"name": "linkedin_ads_extract_url_parameter", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/linkedin_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/linkedin_ads_extract_url_parameters.sql", "unique_id": "macro.linkedin.linkedin_ads_extract_url_parameter", "macro_sql": "{% macro linkedin_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ return(adapter.dispatch('linkedin_ads_extract_url_parameter', 'linkedin') (field, url_parameter)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.linkedin.default__linkedin_ads_extract_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.0606842, "supported_languages": null}, "macro.linkedin.default__linkedin_ads_extract_url_parameter": {"name": "default__linkedin_ads_extract_url_parameter", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/linkedin_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/linkedin_ads_extract_url_parameters.sql", "unique_id": "macro.linkedin.default__linkedin_ads_extract_url_parameter", "macro_sql": "{% macro default__linkedin_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ dbt_utils.get_url_parameter(field, url_parameter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.0609922, "supported_languages": null}, "macro.linkedin.spark__linkedin_ads_extract_url_parameter": {"name": "spark__linkedin_ads_extract_url_parameter", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/linkedin_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/linkedin_ads_extract_url_parameters.sql", "unique_id": "macro.linkedin.spark__linkedin_ads_extract_url_parameter", "macro_sql": "{% macro spark__linkedin_ads_extract_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"=([^&]+)'\" -%}\nnullif(regexp_extract({{ field }}, {{ formatted_url_parameter }}, 1), '')\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.0614297, "supported_languages": null}, "macro.linkedin.get_monthly_ad_analytics_by_member_region_columns": {"name": "get_monthly_ad_analytics_by_member_region_columns", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/get_monthly_ad_analytics_by_member_region_columns.sql", "original_file_path": "macros/staging/get_monthly_ad_analytics_by_member_region_columns.sql", "unique_id": "macro.linkedin.get_monthly_ad_analytics_by_member_region_columns", "macro_sql": "{% macro get_monthly_ad_analytics_by_member_region_columns() %}\n\n{% set columns = [\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"month\", \"datatype\": dbt.type_string(), \"alias\": \"date_month\"},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"member_region\", \"datatype\": dbt.type_int()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversion_value_in_local_currency\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"cost_in_local_currency\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"cost_in_usd\", \"datatype\": dbt.type_numeric()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('linkedin_ads__conversion_fields')) }}\n\n{{ linkedin_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('linkedin_ads__monthly_ad_analytics_by_member_region_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_numeric", "macro.fivetran_utils.add_pass_through_columns", "macro.linkedin.linkedin_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.0638733, "supported_languages": null}, "macro.linkedin.linkedin_ads_fill_pass_through_columns": {"name": "linkedin_ads_fill_pass_through_columns", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/linkedin_ads_fill_pass_through_columns.sql", "original_file_path": "macros/staging/linkedin_ads_fill_pass_through_columns.sql", "unique_id": "macro.linkedin.linkedin_ads_fill_pass_through_columns", "macro_sql": "{% macro linkedin_ads_fill_pass_through_columns(pass_through_fields, except=[]) %}\n\n{% if pass_through_fields %}\n {% for field in pass_through_fields %}\n {% if (field.alias if field.alias else field.name) not in except %}\n {% if field.transform_sql %}\n , coalesce(cast({{ field.transform_sql }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% else %}\n , coalesce(cast({{ field.alias if field.alias else field.name }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% endif %}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}], "created_at": 1783708211.0656304, "supported_languages": null}, "macro.linkedin.get_geo_columns": {"name": "get_geo_columns", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/get_geo_columns.sql", "original_file_path": "macros/staging/get_geo_columns.sql", "unique_id": "macro.linkedin.get_geo_columns", "macro_sql": "{% macro get_geo_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"value\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.066447, "supported_languages": null}, "macro.linkedin.get_account_history_columns": {"name": "get_account_history_columns", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/get_account_history_columns.sql", "original_file_path": "macros/staging/get_account_history_columns.sql", "unique_id": "macro.linkedin.get_account_history_columns", "macro_sql": "{% macro get_account_history_columns() %}\n\n{% set columns = [\n {\"name\": \"created_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"last_modified_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"version_tag\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.0682983, "supported_languages": null}, "macro.linkedin.get_creative_history_columns": {"name": "get_creative_history_columns", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/get_creative_history_columns.sql", "original_file_path": "macros/staging/get_creative_history_columns.sql", "unique_id": "macro.linkedin.get_creative_history_columns", "macro_sql": "{% macro get_creative_history_columns() %}\n\n{% set columns = [\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"click_uri\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"last_modified_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_modified_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"intended_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"text_ad_landing_page\", \"datatype\": dbt.type_string()},\n {\"name\": \"spotlight_landing_page\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.0706835, "supported_languages": null}, "macro.linkedin.date_from_month_string": {"name": "date_from_month_string", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/date_from_month_string.sql", "original_file_path": "macros/staging/date_from_month_string.sql", "unique_id": "macro.linkedin.date_from_month_string", "macro_sql": "{% macro date_from_month_string(month_str) %}\n {{ return(adapter.dispatch('date_from_month_string', 'linkedin')(month_str)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.linkedin.default__date_from_month_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "month_str", "type": null, "description": ""}], "created_at": 1783708211.071339, "supported_languages": null}, "macro.linkedin.default__date_from_month_string": {"name": "default__date_from_month_string", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/date_from_month_string.sql", "original_file_path": "macros/staging/date_from_month_string.sql", "unique_id": "macro.linkedin.default__date_from_month_string", "macro_sql": "{% macro default__date_from_month_string(month_str) %}\n to_date(\n split_part({{ month_str }}, '-', 1) || '-' || lpad(split_part({{ month_str }}, '-', 2), 2, '0') || '-01',\n 'YYYY-MM-DD'\n )\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "month_str", "type": null, "description": ""}], "created_at": 1783708211.0716136, "supported_languages": null}, "macro.linkedin.bigquery__date_from_month_string": {"name": "bigquery__date_from_month_string", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/date_from_month_string.sql", "original_file_path": "macros/staging/date_from_month_string.sql", "unique_id": "macro.linkedin.bigquery__date_from_month_string", "macro_sql": "{% macro bigquery__date_from_month_string(month_str) %}\n parse_date('%Y-%m-%d', concat(split({{ month_str }}, '-')[offset(0)], '-', lpad(split({{ month_str }}, '-')[offset(1)], 2, '0'), '-01'))\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "month_str", "type": null, "description": ""}], "created_at": 1783708211.071876, "supported_languages": null}, "macro.linkedin.databricks__date_from_month_string": {"name": "databricks__date_from_month_string", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/date_from_month_string.sql", "original_file_path": "macros/staging/date_from_month_string.sql", "unique_id": "macro.linkedin.databricks__date_from_month_string", "macro_sql": "{% macro databricks__date_from_month_string(month_str) %}\n to_date(\n concat(split({{ month_str }}, '-')[0], '-', lpad(split({{ month_str }}, '-')[1], 2, '0'), '-01')\n )\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "month_str", "type": null, "description": ""}], "created_at": 1783708211.072164, "supported_languages": null}, "macro.linkedin.get_ad_analytics_by_creative_columns": {"name": "get_ad_analytics_by_creative_columns", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/get_ad_analytics_by_creative_columns.sql", "original_file_path": "macros/staging/get_ad_analytics_by_creative_columns.sql", "unique_id": "macro.linkedin.get_ad_analytics_by_creative_columns", "macro_sql": "{% macro get_ad_analytics_by_creative_columns() %}\n\n{% set columns = [\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"cost_in_local_currency\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"cost_in_usd\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"creative_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"day\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversion_value_in_local_currency\", \"datatype\": dbt.type_numeric()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('linkedin_ads__conversion_fields')) }}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ linkedin_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('linkedin_ads__creative_passthrough_metrics'), except_fields=(var('linkedin_ads__conversion_fields') + ['conversion_value_in_local_currency'])) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_numeric", "macro.dbt.type_timestamp", "macro.fivetran_utils.add_pass_through_columns", "macro.linkedin.linkedin_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.0744112, "supported_languages": null}, "macro.linkedin.linkedin_ads_add_pass_through_columns": {"name": "linkedin_ads_add_pass_through_columns", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/linkedin_ads_add_pass_through_columns.sql", "original_file_path": "macros/staging/linkedin_ads_add_pass_through_columns.sql", "unique_id": "macro.linkedin.linkedin_ads_add_pass_through_columns", "macro_sql": "{% macro linkedin_ads_add_pass_through_columns(base_columns, pass_through_fields, except_fields=[]) %}\n\n{% if pass_through_fields %}\n {% for column in pass_through_fields %}\n\n {% if column is mapping %}\n {% set col_name = column.alias|default(column.name)|lower %}\n \n {% if col_name not in except_fields %}\n {% if column.alias %}\n {% do base_columns.append({ \"name\": column.name, \"alias\": column.alias, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% else %}\n {% do base_columns.append({ \"name\": column.name, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% else %}\n {% if column|lower not in except_fields %}\n {% do base_columns.append({ \"name\": column, \"datatype\": dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_columns", "type": null, "description": ""}, {"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except_fields", "type": null, "description": ""}], "created_at": 1783708211.0769534, "supported_languages": null}, "macro.linkedin.get_monthly_ad_analytics_by_member_country_columns": {"name": "get_monthly_ad_analytics_by_member_country_columns", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/get_monthly_ad_analytics_by_member_country_columns.sql", "original_file_path": "macros/staging/get_monthly_ad_analytics_by_member_country_columns.sql", "unique_id": "macro.linkedin.get_monthly_ad_analytics_by_member_country_columns", "macro_sql": "{% macro get_monthly_ad_analytics_by_member_country_columns() %}\n\n{% set columns = [\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"month\", \"datatype\": dbt.type_string(), \"alias\": \"date_month\"},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"member_country\", \"datatype\": dbt.type_int()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversion_value_in_local_currency\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"cost_in_local_currency\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"cost_in_usd\", \"datatype\": dbt.type_numeric()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('linkedin_ads__conversion_fields')) }}\n\n{{ linkedin_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('linkedin_ads__monthly_ad_analytics_by_member_country_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_numeric", "macro.fivetran_utils.add_pass_through_columns", "macro.linkedin.linkedin_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.0792787, "supported_languages": null}, "macro.linkedin.get_campaign_group_history_columns": {"name": "get_campaign_group_history_columns", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/get_campaign_group_history_columns.sql", "original_file_path": "macros/staging/get_campaign_group_history_columns.sql", "unique_id": "macro.linkedin.get_campaign_group_history_columns", "macro_sql": "{% macro get_campaign_group_history_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"backfilled\", \"datatype\": \"boolean\"},\n {\"name\": \"created_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"last_modified_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"run_schedule_end\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"run_schedule_start\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.0812757, "supported_languages": null}, "macro.linkedin.get_campaign_history_columns": {"name": "get_campaign_history_columns", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/get_campaign_history_columns.sql", "original_file_path": "macros/staging/get_campaign_history_columns.sql", "unique_id": "macro.linkedin.get_campaign_history_columns", "macro_sql": "{% macro get_campaign_history_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"audience_expansion_enabled\", \"datatype\": \"boolean\"},\n {\"name\": \"campaign_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"cost_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"creative_selection\", \"datatype\": dbt.type_string()},\n {\"name\": \"daily_budget_amount\", \"datatype\": dbt.type_float()},\n {\"name\": \"daily_budget_currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"format\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"last_modified_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"locale_country\", \"datatype\": dbt.type_string()},\n {\"name\": \"locale_language\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"objective_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"offsite_delivery_enabled\", \"datatype\": \"boolean\"},\n {\"name\": \"optimization_target_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"run_schedule_end\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"run_schedule_start\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"unit_cost_amount\", \"datatype\": dbt.type_float()},\n {\"name\": \"unit_cost_currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"version_tag\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.0859983, "supported_languages": null}, "macro.linkedin.get_ad_analytics_by_campaign_columns": {"name": "get_ad_analytics_by_campaign_columns", "resource_type": "macro", "package_name": "linkedin", "path": "macros/staging/get_ad_analytics_by_campaign_columns.sql", "original_file_path": "macros/staging/get_ad_analytics_by_campaign_columns.sql", "unique_id": "macro.linkedin.get_ad_analytics_by_campaign_columns", "macro_sql": "{% macro get_ad_analytics_by_campaign_columns() %}\n\n{% set columns = [\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"cost_in_local_currency\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"cost_in_usd\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"day\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversion_value_in_local_currency\", \"datatype\": dbt.type_numeric()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('linkedin_ads__conversion_fields')) }}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ linkedin_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('linkedin_ads__campaign_passthrough_metrics'), except_fields=(var('linkedin_ads__conversion_fields') + ['conversion_value_in_local_currency'])) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_numeric", "macro.dbt.type_timestamp", "macro.fivetran_utils.add_pass_through_columns", "macro.linkedin.linkedin_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.08829, "supported_languages": null}, "macro.apple_search_ads.apple_search_ads_persist_pass_through_columns": {"name": "apple_search_ads_persist_pass_through_columns", "resource_type": "macro", "package_name": "apple_search_ads", "path": "macros/apple_search_ads_persist_pass_through_columns.sql", "original_file_path": "macros/apple_search_ads_persist_pass_through_columns.sql", "unique_id": "macro.apple_search_ads.apple_search_ads_persist_pass_through_columns", "macro_sql": "{% macro apple_search_ads_persist_pass_through_columns(pass_through_variable, identifier=none, transform='', coalesce_with=none, exclude_fields=[]) %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n {% set field_name = field.alias|default(field.name)|lower if field is mapping else field %}\n {% if field_name not in exclude_fields %}\n , {{ transform ~ '(' ~ ('coalesce(' if coalesce_with is not none else '') ~ (identifier ~ '.' if identifier else '') ~ field_name ~ ((', ' ~ coalesce_with ~ ')') if coalesce_with is not none else '') ~ ')' }} as {{ field_name }}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "transform", "type": null, "description": ""}, {"name": "coalesce_with", "type": null, "description": ""}, {"name": "exclude_fields", "type": null, "description": ""}], "created_at": 1783708211.0902083, "supported_languages": null}, "macro.apple_search_ads.get_campaign_report_columns": {"name": "get_campaign_report_columns", "resource_type": "macro", "package_name": "apple_search_ads", "path": "macros/staging/get_campaign_report_columns.sql", "original_file_path": "macros/staging/get_campaign_report_columns.sql", "unique_id": "macro.apple_search_ads.get_campaign_report_columns", "macro_sql": "{% macro get_campaign_report_columns() %}\n\n{% set columns = [\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"local_spend_amount\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"local_spend_currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"new_downloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"redownloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"taps\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_installs\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_new_downloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_redownloads\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ apple_search_ads_add_pass_through_columns(\n base_columns=columns,\n pass_through_fields=var('apple_search_ads__campaign_passthrough_metrics'),\n except_fields=['conversions']\n ) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_numeric", "macro.dbt.type_string", "macro.apple_search_ads.apple_search_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.0930889, "supported_languages": null}, "macro.apple_search_ads.apple_search_ads_fill_pass_through_columns": {"name": "apple_search_ads_fill_pass_through_columns", "resource_type": "macro", "package_name": "apple_search_ads", "path": "macros/staging/apple_search_ads_fill_passthrough_columns.sql", "original_file_path": "macros/staging/apple_search_ads_fill_passthrough_columns.sql", "unique_id": "macro.apple_search_ads.apple_search_ads_fill_pass_through_columns", "macro_sql": "{% macro apple_search_ads_fill_pass_through_columns(pass_through_fields, except=[]) %}\n\n{% if pass_through_fields %}\n {% for field in pass_through_fields %}\n {% if (field.alias if field.alias else field.name) not in except %}\n {% if field.transform_sql %}\n , coalesce(cast({{ field.transform_sql }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% else %}\n , coalesce(cast({{ field.alias if field.alias else field.name }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% endif %}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}], "created_at": 1783708211.0947893, "supported_languages": null}, "macro.apple_search_ads.apple_search_ads_add_pass_through_columns": {"name": "apple_search_ads_add_pass_through_columns", "resource_type": "macro", "package_name": "apple_search_ads", "path": "macros/staging/apple_search_ads_add_pass_through_columns.sql", "original_file_path": "macros/staging/apple_search_ads_add_pass_through_columns.sql", "unique_id": "macro.apple_search_ads.apple_search_ads_add_pass_through_columns", "macro_sql": "{% macro apple_search_ads_add_pass_through_columns(base_columns, pass_through_fields, except_fields=[]) %}\n\n{% if pass_through_fields %}\n {% for column in pass_through_fields %}\n\n {% if column is mapping %}\n {% set col_name = column.alias|default(column.name)|lower %}\n \n {% if col_name not in except_fields %}\n {% if column.alias %}\n {% do base_columns.append({ \"name\": column.name, \"alias\": column.alias, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% else %}\n {% do base_columns.append({ \"name\": column.name, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% else %}\n {% if column|lower not in except_fields %}\n {% do base_columns.append({ \"name\": column, \"datatype\": dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_columns", "type": null, "description": ""}, {"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except_fields", "type": null, "description": ""}], "created_at": 1783708211.097405, "supported_languages": null}, "macro.apple_search_ads.get_keyword_report_columns": {"name": "get_keyword_report_columns", "resource_type": "macro", "package_name": "apple_search_ads", "path": "macros/staging/get_keyword_report_columns.sql", "original_file_path": "macros/staging/get_keyword_report_columns.sql", "unique_id": "macro.apple_search_ads.get_keyword_report_columns", "macro_sql": "{% macro get_keyword_report_columns() %}\n\n{% set columns = [\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"local_spend_amount\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"local_spend_currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"new_downloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"redownloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"taps\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_installs\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_new_downloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_redownloads\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ apple_search_ads_add_pass_through_columns(\n base_columns=columns,\n pass_through_fields=var('apple_search_ads__keyword_passthrough_metrics'),\n except_fields=['conversions']\n ) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_numeric", "macro.dbt.type_string", "macro.apple_search_ads.apple_search_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.10022, "supported_languages": null}, "macro.apple_search_ads.get_ad_history_columns": {"name": "get_ad_history_columns", "resource_type": "macro", "package_name": "apple_search_ads", "path": "macros/staging/get_ad_history_columns.sql", "original_file_path": "macros/staging/get_ad_history_columns.sql", "unique_id": "macro.apple_search_ads.get_ad_history_columns", "macro_sql": "{% macro get_ad_history_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"creation_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"modification_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"org_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.1020515, "supported_languages": null}, "macro.apple_search_ads.get_ad_group_report_columns": {"name": "get_ad_group_report_columns", "resource_type": "macro", "package_name": "apple_search_ads", "path": "macros/staging/get_ad_group_report_columns.sql", "original_file_path": "macros/staging/get_ad_group_report_columns.sql", "unique_id": "macro.apple_search_ads.get_ad_group_report_columns", "macro_sql": "{% macro get_ad_group_report_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"local_spend_amount\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"local_spend_currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"new_downloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"redownloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"taps\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_installs\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_new_downloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_redownloads\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ apple_search_ads_add_pass_through_columns(\n base_columns=columns,\n pass_through_fields=var('apple_search_ads__ad_group_passthrough_metrics'),\n except_fields=['conversions']\n ) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_numeric", "macro.dbt.type_string", "macro.apple_search_ads.apple_search_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.1048512, "supported_languages": null}, "macro.apple_search_ads.get_organization_columns": {"name": "get_organization_columns", "resource_type": "macro", "package_name": "apple_search_ads", "path": "macros/staging/get_organization_columns.sql", "original_file_path": "macros/staging/get_organization_columns.sql", "unique_id": "macro.apple_search_ads.get_organization_columns", "macro_sql": "{% macro get_organization_columns() %}\n\n{% set columns = [\n {\"name\": \"currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"payment_model\", \"datatype\": dbt.type_string()},\n {\"name\": \"time_zone\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.1061873, "supported_languages": null}, "macro.apple_search_ads.get_search_term_report_columns": {"name": "get_search_term_report_columns", "resource_type": "macro", "package_name": "apple_search_ads", "path": "macros/staging/get_search_term_report_columns.sql", "original_file_path": "macros/staging/get_search_term_report_columns.sql", "unique_id": "macro.apple_search_ads.get_search_term_report_columns", "macro_sql": "{% macro get_search_term_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_group_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"bid_amount_amount\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"bid_amount_currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"keyword\", \"datatype\": dbt.type_string()},\n {\"name\": \"keyword_display_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"keyword_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"local_spend_amount\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"local_spend_currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"new_downloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"redownloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"search_term_source\", \"datatype\": dbt.type_string()},\n {\"name\": \"search_term_text\", \"datatype\": dbt.type_string()},\n {\"name\": \"taps\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_installs\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_new_downloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_redownloads\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ apple_search_ads_add_pass_through_columns(\n base_columns=columns,\n pass_through_fields=var('apple_search_ads__search_term_passthrough_metrics'),\n except_fields=['conversions']\n ) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int", "macro.dbt.type_numeric", "macro.apple_search_ads.apple_search_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.1113448, "supported_languages": null}, "macro.apple_search_ads.get_keyword_history_columns": {"name": "get_keyword_history_columns", "resource_type": "macro", "package_name": "apple_search_ads", "path": "macros/staging/get_keyword_history_columns.sql", "original_file_path": "macros/staging/get_keyword_history_columns.sql", "unique_id": "macro.apple_search_ads.get_keyword_history_columns", "macro_sql": "{% macro get_keyword_history_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"bid_amount\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"bid_currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"modification_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"text\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_numeric", "macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.1134324, "supported_languages": null}, "macro.apple_search_ads.get_ad_level_report_columns": {"name": "get_ad_level_report_columns", "resource_type": "macro", "package_name": "apple_search_ads", "path": "macros/staging/get_ad_level_report_columns.sql", "original_file_path": "macros/staging/get_ad_level_report_columns.sql", "unique_id": "macro.apple_search_ads.get_ad_level_report_columns", "macro_sql": "{% macro get_ad_level_report_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"local_spend_amount\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"local_spend_currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"new_downloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"redownloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"taps\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_installs\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_new_downloads\", \"datatype\": dbt.type_int()},\n {\"name\": \"tap_redownloads\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ apple_search_ads_add_pass_through_columns(\n base_columns=columns,\n pass_through_fields=var('apple_search_ads__ad_passthrough_metrics'),\n except_fields=['conversions']\n ) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_numeric", "macro.dbt.type_string", "macro.apple_search_ads.apple_search_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.1165948, "supported_languages": null}, "macro.apple_search_ads.get_campaign_history_columns": {"name": "get_campaign_history_columns", "resource_type": "macro", "package_name": "apple_search_ads", "path": "macros/staging/get_campaign_history_columns.sql", "original_file_path": "macros/staging/get_campaign_history_columns.sql", "unique_id": "macro.apple_search_ads.get_campaign_history_columns", "macro_sql": "{% macro get_campaign_history_columns() %}\n\n{% set columns = [\n {\"name\": \"end_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"modification_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"organization_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"start_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.1182904, "supported_languages": null}, "macro.apple_search_ads.get_ad_group_history_columns": {"name": "get_ad_group_history_columns", "resource_type": "macro", "package_name": "apple_search_ads", "path": "macros/staging/get_ad_group_history_columns.sql", "original_file_path": "macros/staging/get_ad_group_history_columns.sql", "unique_id": "macro.apple_search_ads.get_ad_group_history_columns", "macro_sql": "{% macro get_ad_group_history_columns() %}\n\n{% set columns = [\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"end_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"modification_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"organization_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"start_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.1201532, "supported_languages": null}, "macro.reddit_ads.reddit_ads_persist_pass_through_columns": {"name": "reddit_ads_persist_pass_through_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/reddit_ads_persist_pass_through_columns.sql", "original_file_path": "macros/reddit_ads_persist_pass_through_columns.sql", "unique_id": "macro.reddit_ads.reddit_ads_persist_pass_through_columns", "macro_sql": "{% macro reddit_ads_persist_pass_through_columns(pass_through_variable, identifier=none, transform='', coalesce_with=none, alias_fields=[]) %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n {% set field_name = field.alias|default(field.name)|lower if field is mapping else field %}\n , {{ transform ~ '(cast(' ~ ('coalesce(' if coalesce_with is not none else '') ~ (identifier ~ '.' if identifier else '') ~ field_name ~ ((', ' ~ coalesce_with ~ ')') if coalesce_with is not none else '') ~ ' as ' ~ dbt.type_float() ~ '))' }} \n as {{ field_name ~ ('_c' if field_name in alias_fields else '') }}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "transform", "type": null, "description": ""}, {"name": "coalesce_with", "type": null, "description": ""}, {"name": "alias_fields", "type": null, "description": ""}], "created_at": 1783708211.122129, "supported_languages": null}, "macro.reddit_ads.reddit_ads_extract_url_parameter": {"name": "reddit_ads_extract_url_parameter", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/reddit_ads_extract_url_parameters.sql", "original_file_path": "macros/reddit_ads_extract_url_parameters.sql", "unique_id": "macro.reddit_ads.reddit_ads_extract_url_parameter", "macro_sql": "{% macro reddit_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ return(adapter.dispatch('reddit_ads_extract_url_parameter', 'reddit_ads') (field, url_parameter)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.reddit_ads.default__reddit_ads_extract_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.1227717, "supported_languages": null}, "macro.reddit_ads.default__reddit_ads_extract_url_parameter": {"name": "default__reddit_ads_extract_url_parameter", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/reddit_ads_extract_url_parameters.sql", "original_file_path": "macros/reddit_ads_extract_url_parameters.sql", "unique_id": "macro.reddit_ads.default__reddit_ads_extract_url_parameter", "macro_sql": "{% macro default__reddit_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ dbt_utils.get_url_parameter(field, url_parameter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.1231077, "supported_languages": null}, "macro.reddit_ads.spark__reddit_ads_extract_url_parameter": {"name": "spark__reddit_ads_extract_url_parameter", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/reddit_ads_extract_url_parameters.sql", "original_file_path": "macros/reddit_ads_extract_url_parameters.sql", "unique_id": "macro.reddit_ads.spark__reddit_ads_extract_url_parameter", "macro_sql": "{% macro spark__reddit_ads_extract_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"=([^&]+)'\" -%}\nnullif(regexp_extract({{ field }}, {{ formatted_url_parameter }}, 1), '')\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.1235354, "supported_languages": null}, "macro.reddit_ads.get_campaign_report_columns": {"name": "get_campaign_report_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/get_campaign_report_columns.sql", "original_file_path": "macros/staging/get_campaign_report_columns.sql", "unique_id": "macro.reddit_ads.get_campaign_report_columns", "macro_sql": "{% macro get_campaign_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"region\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend\", \"datatype\": dbt.type_int()}\n] %}\n\n{% if target.type in ('bigquery', 'spark', 'databricks') %}\n {{ columns.append( {\"name\": 'date', \"datatype\": \"date\", \"quote\": True, \"alias\": \"date_day\" } ) }}\n\n{% else %}\n {{ columns.append( {\"name\": 'date', \"datatype\": \"date\", \"alias\": \"date_day\"} ) }}\n\n{% endif %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('reddit_ads__campaign_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.126472, "supported_languages": null}, "macro.reddit_ads.get_account_report_columns": {"name": "get_account_report_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/get_account_report_columns.sql", "original_file_path": "macros/staging/get_account_report_columns.sql", "unique_id": "macro.reddit_ads.get_account_report_columns", "macro_sql": "{% macro get_account_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"region\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend\", \"datatype\": dbt.type_int()}\n] %}\n\n{% if target.type in ('bigquery', 'spark', 'databricks') %}\n {{ columns.append( {\"name\": 'date', \"datatype\": \"date\", \"quote\": True, \"alias\": \"date_day\" } ) }}\n\n{% else %}\n {{ columns.append( {\"name\": 'date', \"datatype\": \"date\", \"alias\": \"date_day\"} ) }}\n\n{% endif %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('reddit_ads__account_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.129247, "supported_languages": null}, "macro.reddit_ads.get_ad_group_report_columns": {"name": "get_ad_group_report_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/get_ad_group_report_columns.sql", "original_file_path": "macros/staging/get_ad_group_report_columns.sql", "unique_id": "macro.reddit_ads.get_ad_group_report_columns", "macro_sql": "{% macro get_ad_group_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_string()}, \n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"region\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend\", \"datatype\": dbt.type_int()}\n] %}\n\n{% if target.type in ('bigquery', 'spark', 'databricks') %}\n {{ columns.append( {\"name\": 'date', \"datatype\": \"date\", \"quote\": True, \"alias\": \"date_day\" } ) }}\n\n{% else %}\n {{ columns.append( {\"name\": 'date', \"datatype\": \"date\", \"alias\": \"date_day\"} ) }}\n\n{% endif %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('reddit_ads__ad_group_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.1323266, "supported_languages": null}, "macro.reddit_ads.get_campaign_conversions_report_columns": {"name": "get_campaign_conversions_report_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/get_campaign_conversions_report_columns.sql", "original_file_path": "macros/staging/get_campaign_conversions_report_columns.sql", "unique_id": "macro.reddit_ads.get_campaign_conversions_report_columns", "macro_sql": "{% macro get_campaign_conversions_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"click_through_conversion_attribution_window_month\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"event_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"total_items\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_value\", \"datatype\": dbt.type_int()},\n {\"name\": \"views\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_through_conversion_attribution_window_month\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('reddit_ads__campaign_conversions_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.1349018, "supported_languages": null}, "macro.reddit_ads.get_campaign_country_report_columns": {"name": "get_campaign_country_report_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/get_campaign_country_report_columns.sql", "original_file_path": "macros/staging/get_campaign_country_report_columns.sql", "unique_id": "macro.reddit_ads.get_campaign_country_report_columns", "macro_sql": "{% macro get_campaign_country_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"country\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"region\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend\", \"datatype\": dbt.type_int()}\n] %}\n\n{% if target.type in ('bigquery', 'spark', 'databricks') %}\n {{ columns.append( {\"name\": 'date', \"datatype\": \"date\", \"quote\": True, \"alias\": \"date_day\" } ) }}\n\n{% else %}\n {{ columns.append( {\"name\": 'date', \"datatype\": \"date\", \"alias\": \"date_day\"} ) }}\n\n{% endif %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('reddit_ads__campaign_country_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.1381056, "supported_languages": null}, "macro.reddit_ads.get_ad_group_conversions_report_columns": {"name": "get_ad_group_conversions_report_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/get_ad_group_conversions_report_columns.sql", "original_file_path": "macros/staging/get_ad_group_conversions_report_columns.sql", "unique_id": "macro.reddit_ads.get_ad_group_conversions_report_columns", "macro_sql": "{% macro get_ad_group_conversions_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"click_through_conversion_attribution_window_month\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"event_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"total_items\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_value\", \"datatype\": dbt.type_int()},\n {\"name\": \"views\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_through_conversion_attribution_window_month\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('reddit_ads__ad_group_conversions_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.14067, "supported_languages": null}, "macro.reddit_ads.get_account_columns": {"name": "get_account_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/get_account_columns.sql", "original_file_path": "macros/staging/get_account_columns.sql", "unique_id": "macro.reddit_ads.get_account_columns", "macro_sql": "{% macro get_account_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"attribution_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"click_attribution_window\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"time_zone_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"view_attribution_window\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.1425457, "supported_languages": null}, "macro.reddit_ads.get_campaign_columns": {"name": "get_campaign_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/get_campaign_columns.sql", "original_file_path": "macros/staging/get_campaign_columns.sql", "unique_id": "macro.reddit_ads.get_campaign_columns", "macro_sql": "{% macro get_campaign_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"configured_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"effective_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"funding_instrument_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_processing\", \"datatype\": \"boolean\"},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"objective\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.1445386, "supported_languages": null}, "macro.reddit_ads.get_account_conversions_report_columns": {"name": "get_account_conversions_report_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/get_account_conversions_report_columns.sql", "original_file_path": "macros/staging/get_account_conversions_report_columns.sql", "unique_id": "macro.reddit_ads.get_account_conversions_report_columns", "macro_sql": "{% macro get_account_conversions_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"click_through_conversion_attribution_window_month\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"event_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"total_items\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_value\", \"datatype\": dbt.type_int()},\n {\"name\": \"views\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_through_conversion_attribution_window_month\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('reddit_ads__account_conversions_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.146954, "supported_languages": null}, "macro.reddit_ads.get_ad_conversions_report_columns": {"name": "get_ad_conversions_report_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/get_ad_conversions_report_columns.sql", "original_file_path": "macros/staging/get_ad_conversions_report_columns.sql", "unique_id": "macro.reddit_ads.get_ad_conversions_report_columns", "macro_sql": "{% macro get_ad_conversions_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"click_through_conversion_attribution_window_month\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"event_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"total_items\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_value\", \"datatype\": dbt.type_int()},\n {\"name\": \"views\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_through_conversion_attribution_window_month\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('reddit_ads__ad_conversions_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.1494894, "supported_languages": null}, "macro.reddit_ads.get_campaign_country_conversions_report_columns": {"name": "get_campaign_country_conversions_report_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/get_campaign_country_conversions_report_columns.sql", "original_file_path": "macros/staging/get_campaign_country_conversions_report_columns.sql", "unique_id": "macro.reddit_ads.get_campaign_country_conversions_report_columns", "macro_sql": "{% macro get_campaign_country_conversions_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"avg_value\", \"datatype\": dbt.type_float()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"click_through_conversion_attribution_window_month\", \"datatype\": dbt.type_int()},\n {\"name\": \"country\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"event_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"total_items\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_value\", \"datatype\": dbt.type_int()},\n {\"name\": \"views\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_through_conversion_attribution_window_month\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('reddit_ads__campaign_country_conversions_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_float", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.1523507, "supported_languages": null}, "macro.reddit_ads.get_ad_columns": {"name": "get_ad_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/get_ad_columns.sql", "original_file_path": "macros/staging/get_ad_columns.sql", "unique_id": "macro.reddit_ads.get_ad_columns", "macro_sql": "{% macro get_ad_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"click_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"configured_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"effective_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_processing\", \"datatype\": \"boolean\"},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"post_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"post_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"rejection_reason\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.155042, "supported_languages": null}, "macro.reddit_ads.get_ad_group_columns": {"name": "get_ad_group_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/get_ad_group_columns.sql", "original_file_path": "macros/staging/get_ad_group_columns.sql", "unique_id": "macro.reddit_ads.get_ad_group_columns", "macro_sql": "{% macro get_ad_group_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"bid_strategy\", \"datatype\": dbt.type_string()},\n {\"name\": \"bid_value\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"configured_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"effective_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"end_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"expand_targeting\", \"datatype\": \"boolean\"},\n {\"name\": \"goal_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"goal_value\", \"datatype\": dbt.type_int()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_processing\", \"datatype\": \"boolean\"},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"optimization_strategy_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"start_time\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.1583707, "supported_languages": null}, "macro.reddit_ads.get_ad_report_columns": {"name": "get_ad_report_columns", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/get_ad_report_columns.sql", "original_file_path": "macros/staging/get_ad_report_columns.sql", "unique_id": "macro.reddit_ads.get_ad_report_columns", "macro_sql": "{% macro get_ad_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"region\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend\", \"datatype\": dbt.type_int()}\n] %}\n\n{% if target.type in ('bigquery', 'spark', 'databricks') %}\n {{ columns.append( {\"name\": 'date', \"datatype\": \"date\", \"quote\": True, \"alias\": \"date_day\" } ) }}\n\n{% else %}\n {{ columns.append( {\"name\": \"date\", \"datatype\": \"date\", \"alias\": \"date_day\"} ) }}\n\n{% endif %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('reddit_ads__ad_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.1613426, "supported_languages": null}, "macro.reddit_ads.convert_microcurrency": {"name": "convert_microcurrency", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/convert_microcurrency.sql", "original_file_path": "macros/staging/convert_microcurrency.sql", "unique_id": "macro.reddit_ads.convert_microcurrency", "macro_sql": "{% macro convert_microcurrency(value) %}\n {{ return(adapter.dispatch('convert_microcurrency', 'reddit_ads') (value)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.reddit_ads.default__convert_microcurrency"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "value", "type": null, "description": ""}], "created_at": 1783708211.161881, "supported_languages": null}, "macro.reddit_ads.default__convert_microcurrency": {"name": "default__convert_microcurrency", "resource_type": "macro", "package_name": "reddit_ads", "path": "macros/staging/convert_microcurrency.sql", "original_file_path": "macros/staging/convert_microcurrency.sql", "unique_id": "macro.reddit_ads.default__convert_microcurrency", "macro_sql": "{% macro default__convert_microcurrency(value) %}\n coalesce(cast({{ value }} as {{ dbt.type_numeric() }}) / cast(1000000 as {{ dbt.type_numeric() }}), 0)\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "value", "type": null, "description": ""}], "created_at": 1783708211.162274, "supported_languages": null}, "macro.snapchat_ads.snapchat_ads_extract_url_parameter": {"name": "snapchat_ads_extract_url_parameter", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/snapchat_ads_extract_url_parameters.sql", "original_file_path": "macros/snapchat_ads_extract_url_parameters.sql", "unique_id": "macro.snapchat_ads.snapchat_ads_extract_url_parameter", "macro_sql": "{% macro snapchat_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ return(adapter.dispatch('snapchat_ads_extract_url_parameter', 'snapchat_ads') (field, url_parameter)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.snapchat_ads.default__snapchat_ads_extract_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.1629922, "supported_languages": null}, "macro.snapchat_ads.default__snapchat_ads_extract_url_parameter": {"name": "default__snapchat_ads_extract_url_parameter", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/snapchat_ads_extract_url_parameters.sql", "original_file_path": "macros/snapchat_ads_extract_url_parameters.sql", "unique_id": "macro.snapchat_ads.default__snapchat_ads_extract_url_parameter", "macro_sql": "{% macro default__snapchat_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ dbt_utils.get_url_parameter(field, url_parameter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.1633368, "supported_languages": null}, "macro.snapchat_ads.spark__snapchat_ads_extract_url_parameter": {"name": "spark__snapchat_ads_extract_url_parameter", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/snapchat_ads_extract_url_parameters.sql", "original_file_path": "macros/snapchat_ads_extract_url_parameters.sql", "unique_id": "macro.snapchat_ads.spark__snapchat_ads_extract_url_parameter", "macro_sql": "{% macro spark__snapchat_ads_extract_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"=([^&]+)'\" -%}\nnullif(regexp_extract({{ field }}, {{ formatted_url_parameter }}, 1), '')\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.1637442, "supported_languages": null}, "macro.snapchat_ads.snapchat_ads_persist_pass_through_columns": {"name": "snapchat_ads_persist_pass_through_columns", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/snapchat_ads_persist_pass_through_columns.sql", "original_file_path": "macros/snapchat_ads_persist_pass_through_columns.sql", "unique_id": "macro.snapchat_ads.snapchat_ads_persist_pass_through_columns", "macro_sql": "{% macro snapchat_ads_persist_pass_through_columns(pass_through_variable, identifier=none, transform='', coalesce_with=none, except_variable=none, exclude_fields=[]) %}\n\n{% set except_fields = [] %}\n{% if except_variable is not none %}\n {# Start creating list of fields to exclude #}\n {% for item in var(except_variable) %}\n {% do except_fields.append(item.name) %}\n {% endfor %}\n{% endif %}\n\n{% for field in exclude_fields %}\n {% do except_fields.append(field) %}\n{% endfor %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n {% set field_name = field.alias|default(field.name)|lower if field is mapping else field|lower %}\n \n {% if field_name not in except_fields %}\n , {{ transform ~ '(' ~ ('coalesce(' if coalesce_with is not none else '') ~ (identifier ~ '.' if identifier else '') ~ field_name ~ ((', ' ~ coalesce_with ~ ')') if coalesce_with is not none else '') ~ ')' }} as {{ field_name }}\n {% endif %}\n\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "transform", "type": null, "description": ""}, {"name": "coalesce_with", "type": null, "description": ""}, {"name": "except_variable", "type": null, "description": ""}, {"name": "exclude_fields", "type": null, "description": ""}], "created_at": 1783708211.166528, "supported_languages": null}, "macro.snapchat_ads.get_ad_squad_history_columns": {"name": "get_ad_squad_history_columns", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/staging/get_ad_squad_history_columns.sql", "original_file_path": "macros/staging/get_ad_squad_history_columns.sql", "unique_id": "macro.snapchat_ads.get_ad_squad_history_columns", "macro_sql": "{% macro get_ad_squad_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.1680243, "supported_languages": null}, "macro.snapchat_ads.get_ad_history_columns": {"name": "get_ad_history_columns", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/staging/get_ad_history_columns.sql", "original_file_path": "macros/staging/get_ad_history_columns.sql", "unique_id": "macro.snapchat_ads.get_ad_history_columns", "macro_sql": "{% macro get_ad_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ad_squad_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"creative_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.1696978, "supported_languages": null}, "macro.snapchat_ads.get_ad_account_history_columns": {"name": "get_ad_account_history_columns", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/staging/get_ad_account_history_columns.sql", "original_file_path": "macros/staging/get_ad_account_history_columns.sql", "unique_id": "macro.snapchat_ads.get_ad_account_history_columns", "macro_sql": "{% macro get_ad_account_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"advertiser\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"timezone\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.1717103, "supported_languages": null}, "macro.snapchat_ads.snapchat_ads_fill_pass_through_columns": {"name": "snapchat_ads_fill_pass_through_columns", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/staging/snapchat_ads_fill_pass_through_columns.sql", "original_file_path": "macros/staging/snapchat_ads_fill_pass_through_columns.sql", "unique_id": "macro.snapchat_ads.snapchat_ads_fill_pass_through_columns", "macro_sql": "{% macro snapchat_ads_fill_pass_through_columns(pass_through_fields, except=[]) %}\n\n{% if pass_through_fields %}\n {% for field in pass_through_fields %}\n {% if (field.alias if field.alias else field.name) not in except %}\n {% if field.transform_sql %}\n , coalesce(cast({{ field.transform_sql }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% else %}\n , coalesce(cast({{ field.alias if field.alias else field.name }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% endif %}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}], "created_at": 1783708211.1734095, "supported_languages": null}, "macro.snapchat_ads.get_campaign_geo_region_daily_report_columns": {"name": "get_campaign_geo_region_daily_report_columns", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/staging/get_campaign_geo_region_daily_report_columns.sql", "original_file_path": "macros/staging/get_campaign_geo_region_daily_report_columns.sql", "unique_id": "macro.snapchat_ads.get_campaign_geo_region_daily_report_columns", "macro_sql": "{% macro get_campaign_geo_region_daily_report_columns() %}\n\n{% set columns = [\n {\"name\": \"attachment_quartile_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_quartile_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_quartile_3\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_total_view_time_millis\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_view_completion\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"region\", \"datatype\": dbt.type_string()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"quartile_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"quartile_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"quartile_3\", \"datatype\": dbt.type_int()},\n {\"name\": \"saves\", \"datatype\": dbt.type_int()},\n {\"name\": \"screen_time_millis\", \"datatype\": dbt.type_int()},\n {\"name\": \"shares\", \"datatype\": dbt.type_int()},\n {\"name\": \"spend\", \"datatype\": dbt.type_int()},\n {\"name\": \"swipes\", \"datatype\": dbt.type_int()},\n {\"name\": \"video_views\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_completion\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_time_millis\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversion_purchases_value\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('snapchat_ads__conversion_fields')) }}\n\n{{ snapchat_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('snapchat_ads__campaign_daily_region_report_passthrough_metrics')) }}\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.fivetran_utils.add_pass_through_columns", "macro.snapchat_ads.snapchat_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.1780367, "supported_languages": null}, "macro.snapchat_ads.get_creative_history_columns": {"name": "get_creative_history_columns", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/staging/get_creative_history_columns.sql", "original_file_path": "macros/staging/get_creative_history_columns.sql", "unique_id": "macro.snapchat_ads.get_creative_history_columns", "macro_sql": "{% macro get_creative_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ad_account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"web_view_url\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.1798265, "supported_languages": null}, "macro.snapchat_ads.get_ad_squad_hourly_report_columns": {"name": "get_ad_squad_hourly_report_columns", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/staging/get_ad_squad_hourly_report_columns.sql", "original_file_path": "macros/staging/get_ad_squad_hourly_report_columns.sql", "unique_id": "macro.snapchat_ads.get_ad_squad_hourly_report_columns", "macro_sql": "{% macro get_ad_squad_hourly_report_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_squad_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"attachment_quartile_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_quartile_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_quartile_3\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_total_view_time_millis\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_view_completion\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"quartile_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"quartile_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"quartile_3\", \"datatype\": dbt.type_int()},\n {\"name\": \"saves\", \"datatype\": dbt.type_int()},\n {\"name\": \"screen_time_millis\", \"datatype\": dbt.type_int()},\n {\"name\": \"shares\", \"datatype\": dbt.type_int()},\n {\"name\": \"spend\", \"datatype\": dbt.type_int()},\n {\"name\": \"swipes\", \"datatype\": dbt.type_int()},\n {\"name\": \"video_views\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_completion\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_time_millis\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversion_purchases_value\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('snapchat_ads__conversion_fields')) }}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ snapchat_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('snapchat_ads__ad_squad_hourly_passthrough_metrics'), except_fields=(var('snapchat_ads__conversion_fields') + ['conversion_purchases_value'])) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.fivetran_utils.add_pass_through_columns", "macro.snapchat_ads.snapchat_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.1843374, "supported_languages": null}, "macro.snapchat_ads.get_campaign_hourly_report_columns": {"name": "get_campaign_hourly_report_columns", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/staging/get_campaign_hourly_report_columns.sql", "original_file_path": "macros/staging/get_campaign_hourly_report_columns.sql", "unique_id": "macro.snapchat_ads.get_campaign_hourly_report_columns", "macro_sql": "{% macro get_campaign_hourly_report_columns() %}\n\n{% set columns = [\n {\"name\": \"attachment_quartile_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_quartile_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_quartile_3\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_total_view_time_millis\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_view_completion\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"quartile_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"quartile_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"quartile_3\", \"datatype\": dbt.type_int()},\n {\"name\": \"saves\", \"datatype\": dbt.type_int()},\n {\"name\": \"screen_time_millis\", \"datatype\": dbt.type_int()},\n {\"name\": \"shares\", \"datatype\": dbt.type_int()},\n {\"name\": \"spend\", \"datatype\": dbt.type_int()},\n {\"name\": \"swipes\", \"datatype\": dbt.type_int()},\n {\"name\": \"video_views\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_completion\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_time_millis\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversion_purchases_value\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('snapchat_ads__conversion_fields')) }}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ snapchat_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('snapchat_ads__campaign_hourly_report_passthrough_metrics'), except_fields=(var('snapchat_ads__conversion_fields') + ['conversion_purchases_value'])) }}\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.fivetran_utils.add_pass_through_columns", "macro.snapchat_ads.snapchat_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.1889136, "supported_languages": null}, "macro.snapchat_ads.get_campaign_geo_country_daily_report_columns": {"name": "get_campaign_geo_country_daily_report_columns", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/staging/get_campaign_geo_country_daily_report_columns.sql", "original_file_path": "macros/staging/get_campaign_geo_country_daily_report_columns.sql", "unique_id": "macro.snapchat_ads.get_campaign_geo_country_daily_report_columns", "macro_sql": "{% macro get_campaign_geo_country_daily_report_columns() %}\n\n{% set columns = [\n {\"name\": \"attachment_quartile_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_quartile_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_quartile_3\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_total_view_time_millis\", \"datatype\": dbt.type_int()},\n {\"name\": \"attachment_view_completion\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"country\", \"datatype\": dbt.type_string()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"quartile_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"quartile_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"quartile_3\", \"datatype\": dbt.type_int()},\n {\"name\": \"saves\", \"datatype\": dbt.type_int()},\n {\"name\": \"screen_time_millis\", \"datatype\": dbt.type_int()},\n {\"name\": \"shares\", \"datatype\": dbt.type_int()},\n {\"name\": \"spend\", \"datatype\": dbt.type_int()},\n {\"name\": \"swipes\", \"datatype\": dbt.type_int()},\n {\"name\": \"video_views\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_completion\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_time_millis\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversion_purchases_value\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('snapchat_ads__conversion_fields')) }}\n\n{{ snapchat_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('snapchat_ads__campaign_daily_country_report_passthrough_metrics')) }}\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.fivetran_utils.add_pass_through_columns", "macro.snapchat_ads.snapchat_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.1934345, "supported_languages": null}, "macro.snapchat_ads.snapchat_ads_add_pass_through_columns": {"name": "snapchat_ads_add_pass_through_columns", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/staging/snapchat_ads_add_pass_through_columns.sql", "original_file_path": "macros/staging/snapchat_ads_add_pass_through_columns.sql", "unique_id": "macro.snapchat_ads.snapchat_ads_add_pass_through_columns", "macro_sql": "{% macro snapchat_ads_add_pass_through_columns(base_columns, pass_through_fields, except_fields=[]) %}\n\n{% if pass_through_fields %}\n {% for column in pass_through_fields %}\n\n {% if column is mapping %}\n {% set col_name = column.alias|default(column.name)|lower %}\n \n {% if col_name not in except_fields %}\n {% if column.alias %}\n {% do base_columns.append({ \"name\": column.name, \"alias\": column.alias, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% else %}\n {% do base_columns.append({ \"name\": column.name, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% else %}\n {% if column|lower not in except_fields %}\n {% do base_columns.append({ \"name\": column, \"datatype\": dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_columns", "type": null, "description": ""}, {"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except_fields", "type": null, "description": ""}], "created_at": 1783708211.1960118, "supported_languages": null}, "macro.snapchat_ads.get_creative_url_tag_history_columns": {"name": "get_creative_url_tag_history_columns", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/staging/get_creative_url_tag_history_columns.sql", "original_file_path": "macros/staging/get_creative_url_tag_history_columns.sql", "unique_id": "macro.snapchat_ads.get_creative_url_tag_history_columns", "macro_sql": "{% macro get_creative_url_tag_history_columns() %}\n\n{% set columns = [\n {\"name\": \"creative_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"key\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"value\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.1971843, "supported_languages": null}, "macro.snapchat_ads.get_ad_hourly_report_columns": {"name": "get_ad_hourly_report_columns", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/staging/get_ad_hourly_report_columns.sql", "original_file_path": "macros/staging/get_ad_hourly_report_columns.sql", "unique_id": "macro.snapchat_ads.get_ad_hourly_report_columns", "macro_sql": "{% macro get_ad_hourly_report_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"attachment_quartile_1\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"attachment_quartile_2\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"attachment_quartile_3\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"attachment_total_view_time_millis\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"attachment_view_completion\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"quartile_1\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"quartile_2\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"quartile_3\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"saves\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"screen_time_millis\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"shares\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"spend\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"swipes\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_views\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"view_completion\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"view_time_millis\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"conversion_purchases_value\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('snapchat_ads__conversion_fields')) }}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ snapchat_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('snapchat_ads__ad_hourly_passthrough_metrics'), except_fields=(var('snapchat_ads__conversion_fields') + ['conversion_purchases_value'])) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_numeric", "macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns", "macro.snapchat_ads.snapchat_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.201746, "supported_languages": null}, "macro.snapchat_ads.get_campaign_history_columns": {"name": "get_campaign_history_columns", "resource_type": "macro", "package_name": "snapchat_ads", "path": "macros/staging/get_campaign_history_columns.sql", "original_file_path": "macros/staging/get_campaign_history_columns.sql", "unique_id": "macro.snapchat_ads.get_campaign_history_columns", "macro_sql": "{% macro get_campaign_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ad_account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"daily_budget_micro\", \"datatype\": dbt.type_int()},\n {\"name\": \"start_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"end_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"lifetime_spend_cap_micro\", \"datatype\": dbt.type_int()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"objective\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.2043242, "supported_languages": null}, "macro.pinterest.pinterest_ads_persist_pass_through_columns": {"name": "pinterest_ads_persist_pass_through_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/pinterest_ads_persist_pass_through_columns.sql", "original_file_path": "macros/pinterest_ads_persist_pass_through_columns.sql", "unique_id": "macro.pinterest.pinterest_ads_persist_pass_through_columns", "macro_sql": "{% macro pinterest_ads_persist_pass_through_columns(pass_through_variable, identifier=none, transform='', coalesce_with=none, exclude_fields=[]) %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n {% set field_name = field.alias|default(field.name)|lower if field is mapping else field %}\n {% if field_name not in exclude_fields %}\n , {{ transform ~ '(' ~ ('coalesce(' if coalesce_with is not none else '') ~ (identifier ~ '.' if identifier else '') ~ field_name ~ ((', ' ~ coalesce_with ~ ')') if coalesce_with is not none else '') ~ ')' }} as {{ field_name }}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "transform", "type": null, "description": ""}, {"name": "coalesce_with", "type": null, "description": ""}, {"name": "exclude_fields", "type": null, "description": ""}], "created_at": 1783708211.2062297, "supported_languages": null}, "macro.pinterest.get_campaign_report_columns": {"name": "get_campaign_report_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/get_campaign_report_columns.sql", "original_file_path": "macros/staging/get_campaign_report_columns.sql", "unique_id": "macro.pinterest.get_campaign_report_columns", "macro_sql": "{% macro get_campaign_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"advertiser_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"clickthrough_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"clickthrough_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impression_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"impression_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"spend_in_micro_dollar\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions_quantity\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions_value_in_micro_dollar\", \"datatype\": dbt.type_int()}\n] %}\n\n{# Make backwards compatible in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ pinterest_ads_add_passthrough_columns(base_columns=columns, pass_through_fields=var('pinterest__campaign_report_passthrough_metrics'), except_fields=['total_conversions', \"total_conversions_quantity\", \"total_conversions_value_in_micro_dollar\"]) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.pinterest.pinterest_ads_add_passthrough_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.2095, "supported_languages": null}, "macro.pinterest.get_pin_promotion_history_columns": {"name": "get_pin_promotion_history_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/get_pin_promotion_history_columns.sql", "original_file_path": "macros/staging/get_pin_promotion_history_columns.sql", "unique_id": "macro.pinterest.get_pin_promotion_history_columns", "macro_sql": "{% macro get_pin_promotion_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"android_deep_link\", \"datatype\": dbt.type_string()},\n {\"name\": \"click_tracking_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"creative_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"destination_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ios_deep_link\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_pin_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"is_removable\", \"datatype\": \"boolean\"},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"pin_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"review_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"view_tracking_url\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.2130466, "supported_languages": null}, "macro.pinterest.get_advertiser_history_columns": {"name": "get_advertiser_history_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/get_advertiser_history_columns.sql", "original_file_path": "macros/staging/get_advertiser_history_columns.sql", "unique_id": "macro.pinterest.get_advertiser_history_columns", "macro_sql": "{% macro get_advertiser_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"country\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"owner_user_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"owner_username\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"permissions\", \"datatype\": dbt.type_string(), \"quote\": True, \"alias\": \"advertiser_permissions\"},\n {\"name\": \"updated_time\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.2153754, "supported_languages": null}, "macro.pinterest.get_pin_promotion_report_columns": {"name": "get_pin_promotion_report_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/get_pin_promotion_report_columns.sql", "original_file_path": "macros/staging/get_pin_promotion_report_columns.sql", "unique_id": "macro.pinterest.get_pin_promotion_report_columns", "macro_sql": "{% macro get_pin_promotion_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"advertiser_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clickthrough_1\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"clickthrough_2\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impression_1\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"impression_2\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"pin_promotion_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend_in_micro_dollar\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"total_conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions_quantity\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions_value_in_micro_dollar\", \"datatype\": dbt.type_int()}\n] %}\n\n{# Make backwards compatible in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ pinterest_ads_add_passthrough_columns(base_columns=columns, pass_through_fields=var('pinterest__pin_promotion_report_passthrough_metrics'), except_fields=['total_conversions', \"total_conversions_quantity\", \"total_conversions_value_in_micro_dollar\"]) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_numeric", "macro.dbt.type_int", "macro.pinterest.pinterest_ads_add_passthrough_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.2186472, "supported_languages": null}, "macro.pinterest.get_keyword_report_columns": {"name": "get_keyword_report_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/get_keyword_report_columns.sql", "original_file_path": "macros/staging/get_keyword_report_columns.sql", "unique_id": "macro.pinterest.get_keyword_report_columns", "macro_sql": "{% macro get_keyword_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"advertiser_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clickthrough_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"clickthrough_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impression_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"impression_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"keyword_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"pin_promotion_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend_in_micro_dollar\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions_quantity\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions_value_in_micro_dollar\", \"datatype\": dbt.type_int()}\n] %}\n\n{# Make backwards compatible in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ pinterest_ads_add_passthrough_columns(base_columns=columns, pass_through_fields=var('pinterest__keyword_report_passthrough_metrics'), except_fields=['total_conversions', \"total_conversions_quantity\", \"total_conversions_value_in_micro_dollar\"]) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.pinterest.pinterest_ads_add_passthrough_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.2224908, "supported_languages": null}, "macro.pinterest.pinterest_ads_extract_url_parameter": {"name": "pinterest_ads_extract_url_parameter", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/pinterest_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/pinterest_ads_extract_url_parameters.sql", "unique_id": "macro.pinterest.pinterest_ads_extract_url_parameter", "macro_sql": "{% macro pinterest_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ return(adapter.dispatch('pinterest_ads_extract_url_parameter', 'pinterest') (field, url_parameter)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.pinterest.default__pinterest_ads_extract_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.2231522, "supported_languages": null}, "macro.pinterest.default__pinterest_ads_extract_url_parameter": {"name": "default__pinterest_ads_extract_url_parameter", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/pinterest_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/pinterest_ads_extract_url_parameters.sql", "unique_id": "macro.pinterest.default__pinterest_ads_extract_url_parameter", "macro_sql": "{% macro default__pinterest_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ dbt_utils.get_url_parameter(field, url_parameter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.2234626, "supported_languages": null}, "macro.pinterest.spark__pinterest_ads_extract_url_parameter": {"name": "spark__pinterest_ads_extract_url_parameter", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/pinterest_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/pinterest_ads_extract_url_parameters.sql", "unique_id": "macro.pinterest.spark__pinterest_ads_extract_url_parameter", "macro_sql": "{% macro spark__pinterest_ads_extract_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"=([^&]+)'\" -%}\nnullif(regexp_extract({{ field }}, {{ formatted_url_parameter }}, 1), '')\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.2238684, "supported_languages": null}, "macro.pinterest.get_targeting_geo_columns": {"name": "get_targeting_geo_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/get_targeting_geo_columns.sql", "original_file_path": "macros/staging/get_targeting_geo_columns.sql", "unique_id": "macro.pinterest.get_targeting_geo_columns", "macro_sql": "{% macro get_targeting_geo_columns() %}\n\n{% set columns = [\n {\"name\": \"country_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"country_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.224932, "supported_languages": null}, "macro.pinterest.get_advertiser_report_columns": {"name": "get_advertiser_report_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/get_advertiser_report_columns.sql", "original_file_path": "macros/staging/get_advertiser_report_columns.sql", "unique_id": "macro.pinterest.get_advertiser_report_columns", "macro_sql": "{% macro get_advertiser_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"advertiser_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clickthrough_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"clickthrough_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impression_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"impression_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"spend_in_micro_dollar\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions_quantity\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions_value_in_micro_dollar\", \"datatype\": dbt.type_int()}\n] %}\n\n{# Make backwards compatible in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ pinterest_ads_add_passthrough_columns(base_columns=columns, pass_through_fields=var('pinterest__advertiser_report_passthrough_metrics'), except_fields=['total_conversions', \"total_conversions_quantity\", \"total_conversions_value_in_micro_dollar\"]) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.pinterest.pinterest_ads_add_passthrough_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.227981, "supported_languages": null}, "macro.pinterest.get_ad_group_report_columns": {"name": "get_ad_group_report_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/get_ad_group_report_columns.sql", "original_file_path": "macros/staging/get_ad_group_report_columns.sql", "unique_id": "macro.pinterest.get_ad_group_report_columns", "macro_sql": "{% macro get_ad_group_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"advertiser_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clickthrough_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"clickthrough_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impression_1\", \"datatype\": dbt.type_int()},\n {\"name\": \"impression_2\", \"datatype\": dbt.type_int()},\n {\"name\": \"spend_in_micro_dollar\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions_quantity\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions_value_in_micro_dollar\", \"datatype\": dbt.type_int()}\n] %}\n\n{# Make backwards compatible in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ pinterest_ads_add_passthrough_columns(base_columns=columns, pass_through_fields=var('pinterest__ad_group_report_passthrough_metrics'), except_fields=['total_conversions', \"total_conversions_quantity\", \"total_conversions_value_in_micro_dollar\"]) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.pinterest.pinterest_ads_add_passthrough_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.2314005, "supported_languages": null}, "macro.pinterest.get_pin_promotion_targeting_report_columns": {"name": "get_pin_promotion_targeting_report_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/get_pin_promotion_targeting_report_columns.sql", "original_file_path": "macros/staging/get_pin_promotion_targeting_report_columns.sql", "unique_id": "macro.pinterest.get_pin_promotion_targeting_report_columns", "macro_sql": "{% macro get_pin_promotion_targeting_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"targeting_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"targeting_value\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"advertiser_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"pin_promotion_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clickthrough_1\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"clickthrough_2\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"impression_1\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"impression_2\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"spend_in_micro_dollar\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"total_conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions_quantity\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_conversions_value_in_micro_dollar\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ pinterest_ads_add_passthrough_columns(base_columns=columns, pass_through_fields=var('pinterest__pin_promotion_targeting_report_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_numeric", "macro.dbt.type_int", "macro.pinterest.pinterest_ads_add_passthrough_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.2348182, "supported_languages": null}, "macro.pinterest.get_keyword_history_columns": {"name": "get_keyword_history_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/get_keyword_history_columns.sql", "original_file_path": "macros/staging/get_keyword_history_columns.sql", "unique_id": "macro.pinterest.get_keyword_history_columns", "macro_sql": "{% macro get_keyword_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"advertiser_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"archived\", \"datatype\": \"boolean\"},\n {\"name\": \"bid\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"parent_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"value\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.2371812, "supported_languages": null}, "macro.pinterest.pinterest_ads_add_passthrough_columns": {"name": "pinterest_ads_add_passthrough_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/pinterest_ads_add_passthrough_columns.sql", "original_file_path": "macros/staging/pinterest_ads_add_passthrough_columns.sql", "unique_id": "macro.pinterest.pinterest_ads_add_passthrough_columns", "macro_sql": "{% macro pinterest_ads_add_passthrough_columns(base_columns, pass_through_fields, except_fields=[]) %}\t\n\n{% if pass_through_fields %}\t\n {% for column in pass_through_fields %}\t\n\n {% if column is mapping %}\t\n {% set col_name = column.alias|default(column.name)|lower %}\t\n\n {% if col_name not in except_fields %}\t\n {% if column.alias %}\t\n {% do base_columns.append({ \"name\": column.name, \"alias\": column.alias, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\t\n {% else %}\t\n {% do base_columns.append({ \"name\": column.name, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\t\n {% endif %}\t\n {% endif %}\t\n\n {% else %}\t\n {% if column|lower not in except_fields %}\t\n {% do base_columns.append({ \"name\": column, \"datatype\": dbt.type_string()}) %}\t\n {% endif %}\t\n {% endif %}\t\n\n {% endfor %}\t\n{% endif %}\t\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_columns", "type": null, "description": ""}, {"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except_fields", "type": null, "description": ""}], "created_at": 1783708211.23977, "supported_languages": null}, "macro.pinterest.get_targeting_geo_region_columns": {"name": "get_targeting_geo_region_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/get_targeting_geo_region_columns.sql", "original_file_path": "macros/staging/get_targeting_geo_region_columns.sql", "unique_id": "macro.pinterest.get_targeting_geo_region_columns", "macro_sql": "{% macro get_targeting_geo_region_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"country_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"region_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"region_name\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.240918, "supported_languages": null}, "macro.pinterest.get_campaign_history_columns": {"name": "get_campaign_history_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/get_campaign_history_columns.sql", "original_file_path": "macros/staging/get_campaign_history_columns.sql", "unique_id": "macro.pinterest.get_campaign_history_columns", "macro_sql": "{% macro get_campaign_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"created_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"default_ad_group_budget_in_micro_currency\", \"datatype\": dbt.type_int()},\n {\"name\": \"is_automated_campaign\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"is_campaign_budget_optimization\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"is_flexible_daily_budgets\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"advertiser_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"start_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"end_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"budget_spend_cap\", \"datatype\": dbt.type_int()},\n {\"name\": \"lifetime_spend_cap\", \"datatype\": dbt.type_int()},\n {\"name\": \"objective_type\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_boolean", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.243969, "supported_languages": null}, "macro.pinterest.get_ad_group_history_columns": {"name": "get_ad_group_history_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/get_ad_group_history_columns.sql", "original_file_path": "macros/staging/get_ad_group_history_columns.sql", "unique_id": "macro.pinterest.get_ad_group_history_columns", "macro_sql": "{% macro get_ad_group_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"end_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"pacing_delivery_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"placement_group\", \"datatype\": dbt.type_string()},\n {\"name\": \"start_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"summary_status\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.2465289, "supported_languages": null}, "macro.pinterest.pinterest_ads_fill_pass_through_columns": {"name": "pinterest_ads_fill_pass_through_columns", "resource_type": "macro", "package_name": "pinterest", "path": "macros/staging/pinterest_ads_fill_pass_through_columns.sql", "original_file_path": "macros/staging/pinterest_ads_fill_pass_through_columns.sql", "unique_id": "macro.pinterest.pinterest_ads_fill_pass_through_columns", "macro_sql": "{% macro pinterest_ads_fill_pass_through_columns(pass_through_fields, except=[]) %}\t\n\n{% if pass_through_fields %}\t\n {% for field in pass_through_fields %}\t\n {% if (field.alias if field.alias else field.name) not in except %}\t\n {% if field.transform_sql %}\t\n , coalesce(cast({{ field.transform_sql }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\t\n {% else %}\t\n , coalesce(cast({{ field.alias if field.alias else field.name }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\t\n {% endif %}\t\n {% endif %}\t\n {% endfor %}\t\n{% endif %}\t\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}], "created_at": 1783708211.2482276, "supported_languages": null}, "macro.google_ads.google_ads_persist_pass_through_columns": {"name": "google_ads_persist_pass_through_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/google_ads_persist_pass_through_columns.sql", "original_file_path": "macros/google_ads_persist_pass_through_columns.sql", "unique_id": "macro.google_ads.google_ads_persist_pass_through_columns", "macro_sql": "{% macro google_ads_persist_pass_through_columns(pass_through_variable, identifier=none, transform='', coalesce_with=none, exclude_fields=[]) %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n {% set field_name = field.alias|default(field.name)|lower if field is mapping else field %}\n {% if field_name not in exclude_fields %}\n , {{ transform ~ '(' ~ ('coalesce(' if coalesce_with is not none else '') ~ (identifier ~ '.' if identifier else '') ~ field_name ~ ((', ' ~ coalesce_with ~ ')') if coalesce_with is not none else '') ~ ')' }} as {{ field_name }}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "transform", "type": null, "description": ""}, {"name": "coalesce_with", "type": null, "description": ""}, {"name": "exclude_fields", "type": null, "description": ""}], "created_at": 1783708211.2501056, "supported_languages": null}, "macro.google_ads.get_threshold_high_lows": {"name": "get_threshold_high_lows", "resource_type": "macro", "package_name": "google_ads", "path": "macros/get_threshold_high_lows.sql", "original_file_path": "macros/get_threshold_high_lows.sql", "unique_id": "macro.google_ads.get_threshold_high_lows", "macro_sql": "{% macro get_threshold_high_lows() %}\n {{ return(adapter.dispatch('get_threshold_high_lows', 'google_ads')()) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.google_ads.default__get_threshold_high_lows"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.250856, "supported_languages": null}, "macro.google_ads.default__get_threshold_high_lows": {"name": "default__get_threshold_high_lows", "resource_type": "macro", "package_name": "google_ads", "path": "macros/get_threshold_high_lows.sql", "original_file_path": "macros/get_threshold_high_lows.sql", "unique_id": "macro.google_ads.default__get_threshold_high_lows", "macro_sql": "{% macro default__get_threshold_high_lows() %}\n {%- set diagnostic_thresholds = {\n 'cpc': {\n 'low': var('google_ads__cpc_low', 1.0),\n 'high': var('google_ads__cpc_high', 3.0)\n },\n 'ctr': {\n 'low': var('google_ads__ctr_low', 0.015),\n 'high': var('google_ads__ctr_high', 0.03)\n },\n 'spend': {\n 'low': var('google_ads__spend_low', 100.0),\n 'high': var('google_ads__spend_high', 500.0)\n },\n 'bid_modifier': {\n 'low': var('google_ads__bid_modifier_low', 0.7),\n 'high': var('google_ads__bid_modifier_high', 1.5)\n },\n 'budget': {\n 'low': var('google_ads__budget_low', 0.75),\n 'high': var('google_ads__budget_high', 0.95)\n },\n 'location_targeting': {\n 'low': var('google_ads__location_targeting_low', 5.0),\n 'high': var('google_ads__location_targeting_high', 50.0)\n }\n } -%}\n\n {{ return(diagnostic_thresholds) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.253127, "supported_languages": null}, "macro.google_ads.get_campaign_criterion_history_columns": {"name": "get_campaign_criterion_history_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_campaign_criterion_history_columns.sql", "original_file_path": "macros/staging/get_campaign_criterion_history_columns.sql", "unique_id": "macro.google_ads.get_campaign_criterion_history_columns", "macro_sql": "{% macro get_campaign_criterion_history_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"geo_target_constant_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"mobile_device_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"operating_system_version_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"topic_constant_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"user_interest_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"user_list_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"age_range_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"bid_modifier\", \"datatype\": dbt.type_float()},\n {\"name\": \"carrier_country_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"carrier_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"content_label_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"display_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"gender_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"income_range_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"ip_block_ip_address\", \"datatype\": dbt.type_string()},\n {\"name\": \"negative\", \"datatype\": \"boolean\"},\n {\"name\": \"keyword_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"keyword_text\", \"datatype\": dbt.type_string()},\n {\"name\": \"language_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"language_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"mobile_app_category_constant_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"mobile_app_category_constant_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"mobile_application_app_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"mobile_application_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"parental_status_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"placement_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"youtube_channel_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"youtube_video_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.2598817, "supported_languages": null}, "macro.google_ads.get_keyword_stats_columns": {"name": "get_keyword_stats_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_keyword_stats_columns.sql", "original_file_path": "macros/staging/get_keyword_stats_columns.sql", "unique_id": "macro.google_ads.get_keyword_stats_columns", "macro_sql": "{% macro get_keyword_stats_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ad_group_criterion_criterion_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_network_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"cost_micros\", \"datatype\": dbt.type_int()},\n {\"name\": \"customer_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"device\", \"datatype\": dbt.type_string()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions_value\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_through_conversions\", \"datatype\": dbt.type_int()}\n] %}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ google_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('google_ads__keyword_stats_passthrough_metrics'), except_fields=['conversions', \"conversions_value\", \"view_through_conversions\"]) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.google_ads.google_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.2633293, "supported_languages": null}, "macro.google_ads.google_ads_fill_pass_through_columns": {"name": "google_ads_fill_pass_through_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/google_ads_fill_pass_through_columns.sql", "original_file_path": "macros/staging/google_ads_fill_pass_through_columns.sql", "unique_id": "macro.google_ads.google_ads_fill_pass_through_columns", "macro_sql": "{% macro google_ads_fill_pass_through_columns(pass_through_fields, except=[]) %}\n\n{% if pass_through_fields %}\n {% for field in pass_through_fields %}\n {% if (field.alias if field.alias else field.name) not in except %}\n {% if field.transform_sql %}\n , coalesce(cast({{ field.transform_sql }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% else %}\n , coalesce(cast({{ field.alias if field.alias else field.name }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% endif %}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}], "created_at": 1783708211.2650237, "supported_languages": null}, "macro.google_ads.get_campaign_bidding_strategy_history_columns": {"name": "get_campaign_bidding_strategy_history_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_campaign_bidding_strategy_history_columns.sql", "original_file_path": "macros/staging/get_campaign_bidding_strategy_history_columns.sql", "unique_id": "macro.google_ads.get_campaign_bidding_strategy_history_columns", "macro_sql": "{% macro get_campaign_bidding_strategy_history_columns() %}\n\n{% set columns = [\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"cpc_bid_ceiling_micros\", \"datatype\": dbt.type_int()},\n {\"name\": \"cpc_bid_floor_micros\", \"datatype\": dbt.type_int()},\n {\"name\": \"enhanced_cpc\", \"datatype\": \"boolean\"},\n {\"name\": \"enhanced_cpc_enabled\", \"datatype\": \"boolean\"},\n {\"name\": \"location\", \"datatype\": dbt.type_string()},\n {\"name\": \"location_fraction_micros\", \"datatype\": dbt.type_int()},\n {\"name\": \"manual_cpa\", \"datatype\": dbt.type_float()},\n {\"name\": \"manual_cpm\", \"datatype\": dbt.type_float()},\n {\"name\": \"manual_cpv\", \"datatype\": dbt.type_float()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"target_cpa_micros\", \"datatype\": dbt.type_int()},\n {\"name\": \"target_cpm\", \"datatype\": dbt.type_float()},\n {\"name\": \"target_roas\", \"datatype\": dbt.type_float()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.2685552, "supported_languages": null}, "macro.google_ads.google_ads_extract_url_parameter": {"name": "google_ads_extract_url_parameter", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/google_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/google_ads_extract_url_parameters.sql", "unique_id": "macro.google_ads.google_ads_extract_url_parameter", "macro_sql": "{% macro google_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ return(adapter.dispatch('google_ads_extract_url_parameter', 'google_ads') (field, url_parameter)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.google_ads.default__google_ads_extract_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.2692177, "supported_languages": null}, "macro.google_ads.default__google_ads_extract_url_parameter": {"name": "default__google_ads_extract_url_parameter", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/google_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/google_ads_extract_url_parameters.sql", "unique_id": "macro.google_ads.default__google_ads_extract_url_parameter", "macro_sql": "{% macro default__google_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ dbt_utils.get_url_parameter(field, url_parameter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.2695284, "supported_languages": null}, "macro.google_ads.spark__google_ads_extract_url_parameter": {"name": "spark__google_ads_extract_url_parameter", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/google_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/google_ads_extract_url_parameters.sql", "unique_id": "macro.google_ads.spark__google_ads_extract_url_parameter", "macro_sql": "{% macro spark__google_ads_extract_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"=([^&]+)'\" -%}\nnullif(regexp_extract({{ field }}, {{ formatted_url_parameter }}, 1), '')\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.2700055, "supported_languages": null}, "macro.google_ads.get_ad_history_columns": {"name": "get_ad_history_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_ad_history_columns.sql", "original_file_path": "macros/staging/get_ad_history_columns.sql", "unique_id": "macro.google_ads.get_ad_history_columns", "macro_sql": "{% macro get_ad_history_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"display_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"final_urls\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.27232, "supported_languages": null}, "macro.google_ads.get_ad_stats_columns": {"name": "get_ad_stats_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_ad_stats_columns.sql", "original_file_path": "macros/staging/get_ad_stats_columns.sql", "unique_id": "macro.google_ads.get_ad_stats_columns", "macro_sql": "{% macro get_ad_stats_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_group\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_network_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"cost_micros\", \"datatype\": dbt.type_int()},\n {\"name\": \"customer_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"device\", \"datatype\": dbt.type_string()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"keyword_ad_group_criterion\", \"datatype\": dbt.type_string()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions_value\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_through_conversions\", \"datatype\": dbt.type_int()}\n] %}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ google_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('google_ads__ad_stats_passthrough_metrics'), except_fields=['conversions', \"conversions_value\", \"view_through_conversions\"]) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int", "macro.google_ads.google_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.275729, "supported_languages": null}, "macro.google_ads.get_account_history_columns": {"name": "get_account_history_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_account_history_columns.sql", "original_file_path": "macros/staging/get_account_history_columns.sql", "unique_id": "macro.google_ads.get_account_history_columns", "macro_sql": "{% macro get_account_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"auto_tagging_enabled\", \"datatype\": \"boolean\"},\n {\"name\": \"currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"descriptive_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"time_zone\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.277536, "supported_languages": null}, "macro.google_ads.get_ad_group_stats_columns": {"name": "get_ad_group_stats_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_ad_group_stats_columns.sql", "original_file_path": "macros/staging/get_ad_group_stats_columns.sql", "unique_id": "macro.google_ads.get_ad_group_stats_columns", "macro_sql": "{% macro get_ad_group_stats_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ad_network_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"cost_micros\", \"datatype\": dbt.type_int()},\n {\"name\": \"customer_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"device\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions_value\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_through_conversions\", \"datatype\": dbt.type_int()}\n] %}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ google_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('google_ads__ad_group_stats_passthrough_metrics'), except_fields=['conversions', \"conversions_value\", \"view_through_conversions\"]) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.google_ads.google_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.280821, "supported_languages": null}, "macro.google_ads.get_campaign_bid_modifier_history_columns": {"name": "get_campaign_bid_modifier_history_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_campaign_bid_modifier_history_columns.sql", "original_file_path": "macros/staging/get_campaign_bid_modifier_history_columns.sql", "unique_id": "macro.google_ads.get_campaign_bid_modifier_history_columns", "macro_sql": "{% macro get_campaign_bid_modifier_history_columns() %}\n\n{% set columns = [\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"criterion_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"bid_modifier\", \"datatype\": dbt.type_float()},\n {\"name\": \"interaction_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"interaction_event_types\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_float", "macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.2824876, "supported_languages": null}, "macro.google_ads.google_ads_add_pass_through_columns": {"name": "google_ads_add_pass_through_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/google_ads_add_pass_through_columns.sql", "original_file_path": "macros/staging/google_ads_add_pass_through_columns.sql", "unique_id": "macro.google_ads.google_ads_add_pass_through_columns", "macro_sql": "{% macro google_ads_add_pass_through_columns(base_columns, pass_through_fields, except_fields=[]) %}\n\n{% if pass_through_fields %}\n {% for column in pass_through_fields %}\n\n {% if column is mapping %}\n {% set col_name = column.alias|default(column.name)|lower %}\n \n {% if col_name not in except_fields %}\n {% if column.alias %}\n {% do base_columns.append({ \"name\": column.name, \"alias\": column.alias, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% else %}\n {% do base_columns.append({ \"name\": column.name, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% else %}\n {% if column|lower not in except_fields %}\n {% do base_columns.append({ \"name\": column, \"datatype\": dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_columns", "type": null, "description": ""}, {"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except_fields", "type": null, "description": ""}], "created_at": 1783708211.2850711, "supported_languages": null}, "macro.google_ads.get_ad_group_criterion_history_columns": {"name": "get_ad_group_criterion_history_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_ad_group_criterion_history_columns.sql", "original_file_path": "macros/staging/get_ad_group_criterion_history_columns.sql", "unique_id": "macro.google_ads.get_ad_group_criterion_history_columns", "macro_sql": "{% macro get_ad_group_criterion_history_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"base_campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"keyword_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"keyword_text\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.2872393, "supported_languages": null}, "macro.google_ads.get_campaign_budget_history_columns": {"name": "get_campaign_budget_history_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_campaign_budget_history_columns.sql", "original_file_path": "macros/staging/get_campaign_budget_history_columns.sql", "unique_id": "macro.google_ads.get_campaign_budget_history_columns", "macro_sql": "{% macro get_campaign_budget_history_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"amount_micros\", \"datatype\": dbt.type_int()},\n {\"name\": \"delivery_method\", \"datatype\": dbt.type_string()},\n {\"name\": \"explicitly_shared\", \"datatype\": \"boolean\"},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"reference_count\", \"datatype\": dbt.type_int()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"has_recommended_budget\", \"datatype\": \"boolean\"},\n {\"name\": \"period\", \"datatype\": dbt.type_string()},\n {\"name\": \"recommended_budget_amount_micros\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_amount_micros\", \"datatype\": dbt.type_int()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.2902443, "supported_languages": null}, "macro.google_ads.get_search_term_keyword_stats_columns": {"name": "get_search_term_keyword_stats_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_search_term_keyword_stats_columns.sql", "original_file_path": "macros/staging/get_search_term_keyword_stats_columns.sql", "unique_id": "macro.google_ads.get_search_term_keyword_stats_columns", "macro_sql": "{% macro get_search_term_keyword_stats_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_float()},\n {\"name\": \"conversions_value\", \"datatype\": dbt.type_float()},\n {\"name\": \"cost_micros\", \"datatype\": dbt.type_int()},\n {\"name\": \"customer_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"info_text\", \"datatype\": dbt.type_string()},\n {\"name\": \"keyword_ad_group_criterion\", \"datatype\": dbt.type_string()},\n {\"name\": \"search_term\", \"datatype\": dbt.type_string()},\n {\"name\": \"search_term_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"view_through_conversions\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ google_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('google_ads__search_term_keyword_stats_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_float", "macro.google_ads.google_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.2937686, "supported_languages": null}, "macro.google_ads.get_campaign_stats_columns": {"name": "get_campaign_stats_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_campaign_stats_columns.sql", "original_file_path": "macros/staging/get_campaign_stats_columns.sql", "unique_id": "macro.google_ads.get_campaign_stats_columns", "macro_sql": "{% macro get_campaign_stats_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ad_network_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"cost_micros\", \"datatype\": dbt.type_int()},\n {\"name\": \"customer_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"device\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions_value\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_through_conversions\", \"datatype\": dbt.type_int()}\n] %}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ google_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('google_ads__campaign_stats_passthrough_metrics'), except_fields=['conversions', \"conversions_value\", \"view_through_conversions\"]) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.google_ads.google_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.2968113, "supported_languages": null}, "macro.google_ads.get_campaign_history_columns": {"name": "get_campaign_history_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_campaign_history_columns.sql", "original_file_path": "macros/staging/get_campaign_history_columns.sql", "unique_id": "macro.google_ads.get_campaign_history_columns", "macro_sql": "{% macro get_campaign_history_columns() %}\n\n{% set columns = [\n {\"name\": \"advertising_channel_subtype\", \"datatype\": dbt.type_string()},\n {\"name\": \"advertising_channel_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"customer_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"end_date\", \"datatype\": dbt.type_string()},\n {\"name\": \"end_date_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"serving_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"start_date\", \"datatype\": dbt.type_string()},\n {\"name\": \"start_date_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"tracking_url_template\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.299683, "supported_languages": null}, "macro.google_ads.get_ad_group_history_columns": {"name": "get_ad_group_history_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_ad_group_history_columns.sql", "original_file_path": "macros/staging/get_ad_group_history_columns.sql", "unique_id": "macro.google_ads.get_ad_group_history_columns", "macro_sql": "{% macro get_ad_group_history_columns() %}\n\n{% set columns = [\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.3014886, "supported_languages": null}, "macro.google_ads.get_account_stats_columns": {"name": "get_account_stats_columns", "resource_type": "macro", "package_name": "google_ads", "path": "macros/staging/get_account_stats_columns.sql", "original_file_path": "macros/staging/get_account_stats_columns.sql", "unique_id": "macro.google_ads.get_account_stats_columns", "macro_sql": "{% macro get_account_stats_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ad_network_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"cost_micros\", \"datatype\": dbt.type_int()},\n {\"name\": \"customer_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"device\", \"datatype\": dbt.type_string()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions_value\", \"datatype\": dbt.type_int()},\n {\"name\": \"view_through_conversions\", \"datatype\": dbt.type_int()}\n] %}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ google_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('google_ads__account_stats_passthrough_metrics'), except_fields=['conversions', \"conversions_value\", \"view_through_conversions\"]) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.google_ads.google_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.3043494, "supported_languages": null}, "macro.amazon_ads.amazon_ads_persist_pass_through_columns": {"name": "amazon_ads_persist_pass_through_columns", "resource_type": "macro", "package_name": "amazon_ads", "path": "macros/amazon_ads_persist_pass_through_columns.sql", "original_file_path": "macros/amazon_ads_persist_pass_through_columns.sql", "unique_id": "macro.amazon_ads.amazon_ads_persist_pass_through_columns", "macro_sql": "{% macro amazon_ads_persist_pass_through_columns(pass_through_variable, identifier=none, transform='', coalesce_with=none, exclude_fields=[]) %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n {% set field_name = field.alias|default(field.name)|lower if field is mapping else field %}\n {% if field_name not in exclude_fields %}\n , {{ transform ~ '(' ~ ('coalesce(' if coalesce_with is not none else '') ~ (identifier ~ '.' if identifier else '') ~ field_name ~ ((', ' ~ coalesce_with ~ ')') if coalesce_with is not none else '') ~ ')' }} as {{ field_name }}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "transform", "type": null, "description": ""}, {"name": "coalesce_with", "type": null, "description": ""}, {"name": "exclude_fields", "type": null, "description": ""}], "created_at": 1783708211.3062692, "supported_languages": null}, "macro.amazon_ads.amazon_ads_add_pass_through_columns": {"name": "amazon_ads_add_pass_through_columns", "resource_type": "macro", "package_name": "amazon_ads", "path": "macros/staging/amazon_ads_add_pass_though_columns.sql", "original_file_path": "macros/staging/amazon_ads_add_pass_though_columns.sql", "unique_id": "macro.amazon_ads.amazon_ads_add_pass_through_columns", "macro_sql": "{% macro amazon_ads_add_pass_through_columns(base_columns, pass_through_fields, except_fields=[]) %}\n\n{% if pass_through_fields %}\n {% for column in pass_through_fields %}\n \n {% if column is mapping %}\n {% set col_name = column.alias|default(column.name)|lower %}\n\n {% if col_name not in except_fields %}\n {% if column.alias %}\n {% do base_columns.append({ \"name\": column.name, \"alias\": column.alias, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% else %}\n {% do base_columns.append({ \"name\": column.name, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% else %}\n {% if column|lower not in except_fields %}\n {% do base_columns.append({ \"name\": column, \"datatype\": dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_columns", "type": null, "description": ""}, {"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except_fields", "type": null, "description": ""}], "created_at": 1783708211.3089373, "supported_languages": null}, "macro.amazon_ads.get_advertised_product_report_columns": {"name": "get_advertised_product_report_columns", "resource_type": "macro", "package_name": "amazon_ads", "path": "macros/staging/get_advertised_product_report_columns.sql", "original_file_path": "macros/staging/get_advertised_product_report_columns.sql", "unique_id": "macro.amazon_ads.get_advertised_product_report_columns", "macro_sql": "{% macro get_advertised_product_report_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"advertised_asin\", \"datatype\": dbt.type_string()},\n {\"name\": \"advertised_sku\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_budget_amount\", \"datatype\": dbt.type_float()},\n {\"name\": \"campaign_budget_currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_budget_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"cost\", \"datatype\": dbt.type_float()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"purchases_30_d\", \"datatype\": dbt.type_int()},\n {\"name\": \"sales_30_d\", \"datatype\": dbt.type_float()}\n] %}\n\n{# Add backwards compatibility if conversion metrics were added via passthrough columns prior to them being brought in by default #}\n{{ amazon_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('amazon_ads__advertised_product_passthrough_metrics'), except_fields=['purchases_30_d', 'sales_30_d']) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_float", "macro.amazon_ads.amazon_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.3121667, "supported_languages": null}, "macro.amazon_ads.get_ad_group_level_report_columns": {"name": "get_ad_group_level_report_columns", "resource_type": "macro", "package_name": "amazon_ads", "path": "macros/staging/get_ad_group_level_report_columns.sql", "original_file_path": "macros/staging/get_ad_group_level_report_columns.sql", "unique_id": "macro.amazon_ads.get_ad_group_level_report_columns", "macro_sql": "{% macro get_ad_group_level_report_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_bidding_strategy\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"cost\", \"datatype\": dbt.type_float()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"purchases_30_d\", \"datatype\": dbt.type_int()},\n {\"name\": \"sales_30_d\", \"datatype\": dbt.type_float()}\n] %}\n\n{# Add backwards compatibility if conversion metrics were added via passthrough columns prior to them being brought in by default #}\n{{ amazon_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('amazon_ads__ad_group_passthrough_metrics'), except_fields=['purchases_30_d', 'sales_30_d']) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_float", "macro.amazon_ads.amazon_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.3143466, "supported_languages": null}, "macro.amazon_ads.amazon_ads_fill_pass_through_columns": {"name": "amazon_ads_fill_pass_through_columns", "resource_type": "macro", "package_name": "amazon_ads", "path": "macros/staging/amazon_ads_fill_pass_through_columns.sql", "original_file_path": "macros/staging/amazon_ads_fill_pass_through_columns.sql", "unique_id": "macro.amazon_ads.amazon_ads_fill_pass_through_columns", "macro_sql": "{% macro amazon_ads_fill_pass_through_columns(pass_through_fields, except=[]) %}\n\n{% if pass_through_fields %}\n {% for field in pass_through_fields %}\n {% if (field.alias if field.alias else field.name) not in except %}\n {% if field.transform_sql %}\n , coalesce(cast({{ field.transform_sql }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% else %}\n , coalesce(cast({{ field.alias if field.alias else field.name }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% endif %}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}], "created_at": 1783708211.3160205, "supported_languages": null}, "macro.amazon_ads.get_search_term_ad_keyword_report_columns": {"name": "get_search_term_ad_keyword_report_columns", "resource_type": "macro", "package_name": "amazon_ads", "path": "macros/staging/get_search_term_ad_keyword_report_columns.sql", "original_file_path": "macros/staging/get_search_term_ad_keyword_report_columns.sql", "unique_id": "macro.amazon_ads.get_search_term_ad_keyword_report_columns", "macro_sql": "{% macro get_search_term_ad_keyword_report_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_keyword_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_budget_amount\", \"datatype\": dbt.type_float()},\n {\"name\": \"campaign_budget_currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_budget_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"cost\", \"datatype\": dbt.type_float()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"keyword_bid\", \"datatype\": dbt.type_float()},\n {\"name\": \"keyword_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"search_term\", \"datatype\": dbt.type_string()},\n {\"name\": \"targeting\", \"datatype\": dbt.type_string()},\n {\"name\": \"purchases_30_d\", \"datatype\": dbt.type_int()},\n {\"name\": \"sales_30_d\", \"datatype\": dbt.type_float()}\n] %}\n\n{# Add backwards compatibility if conversion metrics were added via passthrough columns prior to them being brought in by default #}\n{{ amazon_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('amazon_ads__search_term_ad_keyword_passthrough_metrics'), except_fields=['purchases_30_d', 'sales_30_d']) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_float", "macro.amazon_ads.amazon_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.319561, "supported_languages": null}, "macro.amazon_ads.get_product_ad_history_columns": {"name": "get_product_ad_history_columns", "resource_type": "macro", "package_name": "amazon_ads", "path": "macros/staging/get_product_ad_history_columns.sql", "original_file_path": "macros/staging/get_product_ad_history_columns.sql", "unique_id": "macro.amazon_ads.get_product_ad_history_columns", "macro_sql": "{% macro get_product_ad_history_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"asin\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"creation_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_updated_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"serving_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"sku\", \"datatype\": dbt.type_string()},\n {\"name\": \"state\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.3216093, "supported_languages": null}, "macro.amazon_ads.get_portfolio_history_columns": {"name": "get_portfolio_history_columns", "resource_type": "macro", "package_name": "amazon_ads", "path": "macros/staging/get_portfolio_history_columns.sql", "original_file_path": "macros/staging/get_portfolio_history_columns.sql", "unique_id": "macro.amazon_ads.get_portfolio_history_columns", "macro_sql": "{% macro get_portfolio_history_columns() %}\n\n{% set columns = [\n {\"name\": \"budget_amount\", \"datatype\": dbt.type_float()},\n {\"name\": \"budget_currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"budget_end_date\", \"datatype\": \"date\"},\n {\"name\": \"budget_policy\", \"datatype\": dbt.type_string()},\n {\"name\": \"budget_start_date\", \"datatype\": \"date\"},\n {\"name\": \"creation_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"in_budget\", \"datatype\": \"boolean\"},\n {\"name\": \"last_updated_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"profile_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"serving_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"state\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_float", "macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.3242853, "supported_languages": null}, "macro.amazon_ads.get_campaign_level_report_columns": {"name": "get_campaign_level_report_columns", "resource_type": "macro", "package_name": "amazon_ads", "path": "macros/staging/get_campaign_level_report_columns.sql", "original_file_path": "macros/staging/get_campaign_level_report_columns.sql", "unique_id": "macro.amazon_ads.get_campaign_level_report_columns", "macro_sql": "{% macro get_campaign_level_report_columns() %}\n\n{% set columns = [\n {\"name\": \"campaign_applicable_budget_rule_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_applicable_budget_rule_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_bidding_strategy\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_budget_amount\", \"datatype\": dbt.type_float()},\n {\"name\": \"campaign_budget_currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_budget_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_rule_based_budget_amount\", \"datatype\": dbt.type_float()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"cost\", \"datatype\": dbt.type_float()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"purchases_30_d\", \"datatype\": dbt.type_int()},\n {\"name\": \"sales_30_d\", \"datatype\": dbt.type_float()}\n] %}\n\n{# Add backwards compatibility if conversion metrics were added via passthrough columns prior to them being brought in by default #}\n{{ amazon_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('amazon_ads__campaign_passthrough_metrics'), except_fields=['purchases_30_d', 'sales_30_d']) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_float", "macro.dbt.type_int", "macro.amazon_ads.amazon_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.3274899, "supported_languages": null}, "macro.amazon_ads.get_keyword_history_columns": {"name": "get_keyword_history_columns", "resource_type": "macro", "package_name": "amazon_ads", "path": "macros/staging/get_keyword_history_columns.sql", "original_file_path": "macros/staging/get_keyword_history_columns.sql", "unique_id": "macro.amazon_ads.get_keyword_history_columns", "macro_sql": "{% macro get_keyword_history_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"bid\", \"datatype\": dbt.type_float()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"creation_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"keyword_text\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_updated_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"native_language_keyword\", \"datatype\": dbt.type_string()},\n {\"name\": \"serving_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"state\", \"datatype\": dbt.type_string()},\n {\"name\": \"native_language_locale\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_float", "macro.dbt.type_timestamp", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.3300352, "supported_languages": null}, "macro.amazon_ads.get_targeting_keyword_report_columns": {"name": "get_targeting_keyword_report_columns", "resource_type": "macro", "package_name": "amazon_ads", "path": "macros/staging/get_targeting_keyword_report_columns.sql", "original_file_path": "macros/staging/get_targeting_keyword_report_columns.sql", "unique_id": "macro.amazon_ads.get_targeting_keyword_report_columns", "macro_sql": "{% macro get_targeting_keyword_report_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_keyword_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_budget_amount\", \"datatype\": dbt.type_float()},\n {\"name\": \"campaign_budget_currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_budget_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"cost\", \"datatype\": dbt.type_float()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"keyword_bid\", \"datatype\": dbt.type_float()},\n {\"name\": \"keyword_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"keyword_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"targeting\", \"datatype\": dbt.type_string()},\n {\"name\": \"purchases_30_d\", \"datatype\": dbt.type_int()},\n {\"name\": \"sales_30_d\", \"datatype\": dbt.type_float()}\n] %}\n\n{# Add backwards compatibility if conversion metrics were added via passthrough columns prior to them being brought in by default #}\n{{ amazon_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('amazon_ads__targeting_keyword_passthrough_metrics'), except_fields=['purchases_30_d', 'sales_30_d']) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_float", "macro.amazon_ads.amazon_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.3339083, "supported_languages": null}, "macro.amazon_ads.get_profile_columns": {"name": "get_profile_columns", "resource_type": "macro", "package_name": "amazon_ads", "path": "macros/staging/get_profile_columns.sql", "original_file_path": "macros/staging/get_profile_columns.sql", "unique_id": "macro.amazon_ads.get_profile_columns", "macro_sql": "{% macro get_profile_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"account_marketplace_string_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"account_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"account_sub_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"account_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"account_valid_payment_method\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"country_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"daily_budget\", \"datatype\": dbt.type_int()},\n {\"name\": \"timezone\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_deleted\", \"datatype\": dbt.type_boolean()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_boolean"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.3364758, "supported_languages": null}, "macro.amazon_ads.get_campaign_history_columns": {"name": "get_campaign_history_columns", "resource_type": "macro", "package_name": "amazon_ads", "path": "macros/staging/get_campaign_history_columns.sql", "original_file_path": "macros/staging/get_campaign_history_columns.sql", "unique_id": "macro.amazon_ads.get_campaign_history_columns", "macro_sql": "{% macro get_campaign_history_columns() %}\n\n{% set columns = [\n {\"name\": \"bidding_strategy\", \"datatype\": dbt.type_string()},\n {\"name\": \"creation_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"end_date\", \"datatype\": \"date\"},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_updated_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"portfolio_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"profile_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"serving_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"start_date\", \"datatype\": \"date\"},\n {\"name\": \"state\", \"datatype\": dbt.type_string()},\n {\"name\": \"targeting_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"budget\", \"datatype\": dbt.type_float()},\n {\"name\": \"budget_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"effective_budget\", \"datatype\": dbt.type_float()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.3394878, "supported_languages": null}, "macro.amazon_ads.get_ad_group_history_columns": {"name": "get_ad_group_history_columns", "resource_type": "macro", "package_name": "amazon_ads", "path": "macros/staging/get_ad_group_history_columns.sql", "original_file_path": "macros/staging/get_ad_group_history_columns.sql", "unique_id": "macro.amazon_ads.get_ad_group_history_columns", "macro_sql": "{% macro get_ad_group_history_columns() %}\n\n{% set columns = [\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"creation_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"default_bid\", \"datatype\": dbt.type_float()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_updated_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"serving_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"state\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.dbt.type_float", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.3413844, "supported_languages": null}, "macro.dbt_utils.safe_add": {"name": "safe_add", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "unique_id": "macro.dbt_utils.safe_add", "macro_sql": "{%- macro safe_add(field_list) -%}\n {{ return(adapter.dispatch('safe_add', 'dbt_utils')(field_list)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__safe_add"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1783708211.342027, "supported_languages": null}, "macro.dbt_utils.default__safe_add": {"name": "default__safe_add", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_add.sql", "original_file_path": "macros/sql/safe_add.sql", "unique_id": "macro.dbt_utils.default__safe_add", "macro_sql": "\n\n{%- macro default__safe_add(field_list) -%}\n\n{%- if field_list is not iterable or field_list is string or field_list is mapping -%}\n\n{%- set error_message = '\nWarning: the `safe_add` macro now takes a single list argument instead of \\\nstring arguments. The {}.{} model triggered this warning. \\\n'.format(model.package_name, model.name) -%}\n\n{%- do exceptions.warn(error_message) -%}\n\n{%- endif -%}\n\n{% set fields = [] %}\n\n{%- for field in field_list -%}\n\n {% do fields.append(\"coalesce(\" ~ field ~ \", 0)\") %}\n\n{%- endfor -%}\n\n{{ fields|join(' +\\n ') }}\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1783708211.3431396, "supported_languages": null}, "macro.dbt_utils.get_filtered_columns_in_relation": {"name": "get_filtered_columns_in_relation", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "unique_id": "macro.dbt_utils.get_filtered_columns_in_relation", "macro_sql": "{% macro get_filtered_columns_in_relation(from, except=[]) -%}\n {{ return(adapter.dispatch('get_filtered_columns_in_relation', 'dbt_utils')(from, except)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}], "created_at": 1783708211.343914, "supported_languages": null}, "macro.dbt_utils.default__get_filtered_columns_in_relation": {"name": "default__get_filtered_columns_in_relation", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_filtered_columns_in_relation.sql", "original_file_path": "macros/sql/get_filtered_columns_in_relation.sql", "unique_id": "macro.dbt_utils.default__get_filtered_columns_in_relation", "macro_sql": "{% macro default__get_filtered_columns_in_relation(from, except=[]) -%}\n {%- do dbt_utils._is_relation(from, 'get_filtered_columns_in_relation') -%}\n {%- do dbt_utils._is_ephemeral(from, 'get_filtered_columns_in_relation') -%}\n\n {# -- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n {%- if not execute -%}\n {{ return([]) }}\n {% endif %}\n\n {%- set include_cols = [] %}\n {%- set cols = adapter.get_columns_in_relation(from) -%}\n {%- set except = except | map(\"lower\") | list %}\n {%- for col in cols -%}\n {%- if col.column|lower not in except -%}\n {% do include_cols.append(col.column) %}\n {%- endif %}\n {%- endfor %}\n\n {{ return(include_cols) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}], "created_at": 1783708211.3454041, "supported_languages": null}, "macro.dbt_utils.nullcheck_table": {"name": "nullcheck_table", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "unique_id": "macro.dbt_utils.nullcheck_table", "macro_sql": "{% macro nullcheck_table(relation) %}\n {{ return(adapter.dispatch('nullcheck_table', 'dbt_utils')(relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708211.3459797, "supported_languages": null}, "macro.dbt_utils.default__nullcheck_table": {"name": "default__nullcheck_table", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/nullcheck_table.sql", "original_file_path": "macros/sql/nullcheck_table.sql", "unique_id": "macro.dbt_utils.default__nullcheck_table", "macro_sql": "{% macro default__nullcheck_table(relation) %}\n\n {%- do dbt_utils._is_relation(relation, 'nullcheck_table') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'nullcheck_table') -%}\n {% set cols = adapter.get_columns_in_relation(relation) %}\n\n select {{ dbt_utils.nullcheck(cols) }}\n from {{relation}}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}], "created_at": 1783708211.34675, "supported_languages": null}, "macro.dbt_utils.deduplicate": {"name": "deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.deduplicate", "macro_sql": "{%- macro deduplicate(relation, partition_by, order_by) -%}\n {{ return(adapter.dispatch('deduplicate', 'dbt_utils')(relation, partition_by, order_by)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.postgres__deduplicate"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}], "created_at": 1783708211.3478506, "supported_languages": null}, "macro.dbt_utils.default__deduplicate": {"name": "default__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.default__deduplicate", "macro_sql": "\n\n{%- macro default__deduplicate(relation, partition_by, order_by) -%}\n\n with row_numbered as (\n select\n _inner.*,\n row_number() over (\n partition by {{ partition_by }}\n order by {{ order_by }}\n ) as rn\n from {{ relation }} as _inner\n )\n\n select\n distinct data.*\n from {{ relation }} as data\n {#\n -- Not all DBs will support natural joins but the ones that do include:\n -- Oracle, MySQL, SQLite, Redshift, Teradata, Materialize, Databricks\n -- Apache Spark, SingleStore, Vertica\n -- Those that do not appear to support natural joins include:\n -- SQLServer, Trino, Presto, Rockset, Athena\n #}\n natural join row_numbered\n where row_numbered.rn = 1\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}], "created_at": 1783708211.3483098, "supported_languages": null}, "macro.dbt_utils.redshift__deduplicate": {"name": "redshift__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.redshift__deduplicate", "macro_sql": "{% macro redshift__deduplicate(relation, partition_by, order_by) -%}\n\n select *\n from {{ relation }} as tt\n qualify\n row_number() over (\n partition by {{ partition_by }}\n order by {{ order_by }}\n ) = 1\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}], "created_at": 1783708211.3486543, "supported_languages": null}, "macro.dbt_utils.postgres__deduplicate": {"name": "postgres__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.postgres__deduplicate", "macro_sql": "\n{%- macro postgres__deduplicate(relation, partition_by, order_by) -%}\n\n select\n distinct on ({{ partition_by }}) *\n from {{ relation }}\n order by {{ partition_by }}{{ ',' ~ order_by }}\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}], "created_at": 1783708211.3490436, "supported_languages": null}, "macro.dbt_utils.snowflake__deduplicate": {"name": "snowflake__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.snowflake__deduplicate", "macro_sql": "\n{%- macro snowflake__deduplicate(relation, partition_by, order_by) -%}\n\n select *\n from {{ relation }}\n qualify\n row_number() over (\n partition by {{ partition_by }}\n order by {{ order_by }}\n ) = 1\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}], "created_at": 1783708211.3494172, "supported_languages": null}, "macro.dbt_utils.databricks__deduplicate": {"name": "databricks__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.databricks__deduplicate", "macro_sql": "\n{%- macro databricks__deduplicate(relation, partition_by, order_by) -%}\n\n select *\n from {{ relation }}\n qualify\n row_number() over (\n partition by {{ partition_by }}\n order by {{ order_by }}\n ) = 1\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}], "created_at": 1783708211.3498607, "supported_languages": null}, "macro.dbt_utils.bigquery__deduplicate": {"name": "bigquery__deduplicate", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/deduplicate.sql", "original_file_path": "macros/sql/deduplicate.sql", "unique_id": "macro.dbt_utils.bigquery__deduplicate", "macro_sql": "\n{%- macro bigquery__deduplicate(relation, partition_by, order_by) -%}\n\n select unique.*\n from (\n select\n array_agg (\n original\n order by {{ order_by }}\n limit 1\n )[offset(0)] unique\n from {{ relation }} original\n group by {{ partition_by }}\n )\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}], "created_at": 1783708211.3502414, "supported_languages": null}, "macro.dbt_utils.get_tables_by_prefix_sql": {"name": "get_tables_by_prefix_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "unique_id": "macro.dbt_utils.get_tables_by_prefix_sql", "macro_sql": "{% macro get_tables_by_prefix_sql(schema, prefix, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_tables_by_prefix_sql', 'dbt_utils')(schema, prefix, exclude, database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783708211.3509746, "supported_languages": null}, "macro.dbt_utils.default__get_tables_by_prefix_sql": {"name": "default__get_tables_by_prefix_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_prefix_sql.sql", "original_file_path": "macros/sql/get_tables_by_prefix_sql.sql", "unique_id": "macro.dbt_utils.default__get_tables_by_prefix_sql", "macro_sql": "{% macro default__get_tables_by_prefix_sql(schema, prefix, exclude='', database=target.database) %}\n\n {{ dbt_utils.get_tables_by_pattern_sql(\n schema_pattern = schema,\n table_pattern = prefix ~ '%',\n exclude = exclude,\n database = database\n ) }}\n \n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783708211.3515577, "supported_languages": null}, "macro.dbt_utils.get_powers_of_two": {"name": "get_powers_of_two", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "unique_id": "macro.dbt_utils.get_powers_of_two", "macro_sql": "{% macro get_powers_of_two(upper_bound) %}\n {{ return(adapter.dispatch('get_powers_of_two', 'dbt_utils')(upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1783708211.3524003, "supported_languages": null}, "macro.dbt_utils.default__get_powers_of_two": {"name": "default__get_powers_of_two", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "unique_id": "macro.dbt_utils.default__get_powers_of_two", "macro_sql": "{% macro default__get_powers_of_two(upper_bound) %}\n\n {% if upper_bound <= 0 %}\n {{ exceptions.raise_compiler_error(\"upper bound must be positive\") }}\n {% endif %}\n\n {% for _ in range(1, 100) %}\n {% if upper_bound <= 2 ** loop.index %}{{ return(loop.index) }}{% endif %}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1783708211.353253, "supported_languages": null}, "macro.dbt_utils.generate_series": {"name": "generate_series", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "unique_id": "macro.dbt_utils.generate_series", "macro_sql": "{% macro generate_series(upper_bound) %}\n {{ return(adapter.dispatch('generate_series', 'dbt_utils')(upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__generate_series"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1783708211.353639, "supported_languages": null}, "macro.dbt_utils.default__generate_series": {"name": "default__generate_series", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_series.sql", "original_file_path": "macros/sql/generate_series.sql", "unique_id": "macro.dbt_utils.default__generate_series", "macro_sql": "{% macro default__generate_series(upper_bound) %}\n\n {% set n = dbt_utils.get_powers_of_two(upper_bound) %}\n\n with p as (\n select 0 as generated_number union all select 1\n ), unioned as (\n\n select\n\n {% for i in range(n) %}\n p{{i}}.generated_number * power(2, {{i}})\n {% if not loop.last %} + {% endif %}\n {% endfor %}\n + 1\n as generated_number\n\n from\n\n {% for i in range(n) %}\n p as p{{i}}\n {% if not loop.last %} cross join {% endif %}\n {% endfor %}\n\n )\n\n select *\n from unioned\n where generated_number <= {{upper_bound}}\n order by generated_number\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1783708211.3547502, "supported_languages": null}, "macro.dbt_utils.safe_divide": {"name": "safe_divide", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_divide.sql", "original_file_path": "macros/sql/safe_divide.sql", "unique_id": "macro.dbt_utils.safe_divide", "macro_sql": "{% macro safe_divide(numerator, denominator) -%}\n {{ return(adapter.dispatch('safe_divide', 'dbt_utils')(numerator, denominator)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__safe_divide"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "numerator", "type": null, "description": ""}, {"name": "denominator", "type": null, "description": ""}], "created_at": 1783708211.3553433, "supported_languages": null}, "macro.dbt_utils.default__safe_divide": {"name": "default__safe_divide", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_divide.sql", "original_file_path": "macros/sql/safe_divide.sql", "unique_id": "macro.dbt_utils.default__safe_divide", "macro_sql": "{% macro default__safe_divide(numerator, denominator) %}\n ( {{ numerator }} ) / nullif( ( {{ denominator }} ), 0)\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "numerator", "type": null, "description": ""}, {"name": "denominator", "type": null, "description": ""}], "created_at": 1783708211.3556306, "supported_languages": null}, "macro.dbt_utils.get_query_results_as_dict": {"name": "get_query_results_as_dict", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "unique_id": "macro.dbt_utils.get_query_results_as_dict", "macro_sql": "{% macro get_query_results_as_dict(query) %}\n {{ return(adapter.dispatch('get_query_results_as_dict', 'dbt_utils')(query)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_query_results_as_dict"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "query", "type": null, "description": ""}], "created_at": 1783708211.3563108, "supported_languages": null}, "macro.dbt_utils.default__get_query_results_as_dict": {"name": "default__get_query_results_as_dict", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_query_results_as_dict.sql", "original_file_path": "macros/sql/get_query_results_as_dict.sql", "unique_id": "macro.dbt_utils.default__get_query_results_as_dict", "macro_sql": "{% macro default__get_query_results_as_dict(query) %}\n\n{# This macro returns a dictionary of the form {column_name: (tuple_of_results)} #}\n\n {%- call statement('get_query_results', fetch_result=True,auto_begin=false) -%}\n\n {{ query }}\n\n {%- endcall -%}\n\n {% set sql_results={} %}\n\n {%- if execute -%}\n {% set sql_results_table = load_result('get_query_results').table.columns %}\n {% for column_name, column in sql_results_table.items() %}\n {% do sql_results.update({column_name: column.values()}) %}\n {% endfor %}\n {%- endif -%}\n\n {{ return(sql_results) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "query", "type": null, "description": ""}], "created_at": 1783708211.3575056, "supported_languages": null}, "macro.dbt_utils.get_relations_by_pattern": {"name": "get_relations_by_pattern", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "unique_id": "macro.dbt_utils.get_relations_by_pattern", "macro_sql": "{% macro get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_relations_by_pattern', 'dbt_utils')(schema_pattern, table_pattern, exclude, database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783708211.3584566, "supported_languages": null}, "macro.dbt_utils.default__get_relations_by_pattern": {"name": "default__get_relations_by_pattern", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_relations_by_pattern.sql", "original_file_path": "macros/sql/get_relations_by_pattern.sql", "unique_id": "macro.dbt_utils.default__get_relations_by_pattern", "macro_sql": "{% macro default__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {%- call statement('get_tables', fetch_result=True) %}\n\n {{ dbt_utils.get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude, database) }}\n\n {%- endcall -%}\n\n {%- set table_list = load_result('get_tables') -%}\n\n {%- if table_list and table_list['table'] -%}\n {%- set tbl_relations = [] -%}\n {%- for row in table_list['table'] -%}\n {%- set tbl_relation = api.Relation.create(\n database=database,\n schema=row.table_schema,\n identifier=row.table_name,\n type=row.table_type\n ) -%}\n {%- do tbl_relations.append(tbl_relation) -%}\n {%- endfor -%}\n\n {{ return(tbl_relations) }}\n {%- else -%}\n {{ return([]) }}\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783708211.360293, "supported_languages": null}, "macro.dbt_utils.nullcheck": {"name": "nullcheck", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "unique_id": "macro.dbt_utils.nullcheck", "macro_sql": "{% macro nullcheck(cols) %}\n {{ return(adapter.dispatch('nullcheck', 'dbt_utils')(cols)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__nullcheck"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "cols", "type": null, "description": ""}], "created_at": 1783708211.360907, "supported_languages": null}, "macro.dbt_utils.default__nullcheck": {"name": "default__nullcheck", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/nullcheck.sql", "original_file_path": "macros/sql/nullcheck.sql", "unique_id": "macro.dbt_utils.default__nullcheck", "macro_sql": "{% macro default__nullcheck(cols) %}\n{%- for col in cols %}\n\n {% if col.is_string() -%}\n\n nullif({{col.name}},'') as {{col.name}}\n\n {%- else -%}\n\n {{col.name}}\n\n {%- endif -%}\n\n{%- if not loop.last -%} , {%- endif -%}\n\n{%- endfor -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "cols", "type": null, "description": ""}], "created_at": 1783708211.361609, "supported_languages": null}, "macro.dbt_utils.get_single_value": {"name": "get_single_value", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_single_value.sql", "original_file_path": "macros/sql/get_single_value.sql", "unique_id": "macro.dbt_utils.get_single_value", "macro_sql": "{% macro get_single_value(query, default=none) %}\n {{ return(adapter.dispatch('get_single_value', 'dbt_utils')(query, default)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_single_value"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "query", "type": null, "description": ""}, {"name": "default", "type": null, "description": ""}], "created_at": 1783708211.3624141, "supported_languages": null}, "macro.dbt_utils.default__get_single_value": {"name": "default__get_single_value", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_single_value.sql", "original_file_path": "macros/sql/get_single_value.sql", "unique_id": "macro.dbt_utils.default__get_single_value", "macro_sql": "{% macro default__get_single_value(query, default) %}\n\n{# This macro returns the (0, 0) record in a query, i.e. the first row of the first column #}\n\n {%- call statement('get_query_result', fetch_result=True, auto_begin=false) -%}\n\n {{ query }}\n\n {%- endcall -%}\n\n {%- if execute -%}\n\n {% set r = load_result('get_query_result').table.columns[0].values() %}\n {% if r | length == 0 %}\n {% do print('Query `' ~ query ~ '` returned no rows. Using the default value: ' ~ default) %}\n {% set sql_result = default %}\n {% else %}\n {% set sql_result = r[0] %}\n {% endif %}\n \n {%- else -%}\n \n {% set sql_result = default %}\n \n {%- endif -%}\n\n {% do return(sql_result) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "query", "type": null, "description": ""}, {"name": "default", "type": null, "description": ""}], "created_at": 1783708211.3638964, "supported_languages": null}, "macro.dbt_utils.generate_surrogate_key": {"name": "generate_surrogate_key", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_surrogate_key.sql", "original_file_path": "macros/sql/generate_surrogate_key.sql", "unique_id": "macro.dbt_utils.generate_surrogate_key", "macro_sql": "{%- macro generate_surrogate_key(field_list) -%}\n {{ return(adapter.dispatch('generate_surrogate_key', 'dbt_utils')(field_list)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__generate_surrogate_key"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1783708211.3646393, "supported_languages": null}, "macro.dbt_utils.default__generate_surrogate_key": {"name": "default__generate_surrogate_key", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/generate_surrogate_key.sql", "original_file_path": "macros/sql/generate_surrogate_key.sql", "unique_id": "macro.dbt_utils.default__generate_surrogate_key", "macro_sql": "\n\n{%- macro default__generate_surrogate_key(field_list) -%}\n\n{%- if var('surrogate_key_treat_nulls_as_empty_strings', False) -%}\n {%- set default_null_value = \"\" -%}\n{%- else -%}\n {%- set default_null_value = '_dbt_utils_surrogate_key_null_' -%}\n{%- endif -%}\n\n{%- set fields = [] -%}\n\n{%- for field in field_list -%}\n\n {%- do fields.append(\n \"coalesce(cast(\" ~ field ~ \" as \" ~ dbt.type_string() ~ \"), '\" ~ default_null_value ~\"')\"\n ) -%}\n\n {%- if not loop.last %}\n {%- do fields.append(\"'-'\") -%}\n {%- endif -%}\n\n{%- endfor -%}\n\n{{ dbt.hash(dbt.concat(fields)) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.hash", "macro.dbt.concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1783708211.365926, "supported_languages": null}, "macro.dbt_utils.get_intervals_between": {"name": "get_intervals_between", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "unique_id": "macro.dbt_utils.get_intervals_between", "macro_sql": "{% macro get_intervals_between(start_date, end_date, datepart) -%}\n {{ return(adapter.dispatch('get_intervals_between', 'dbt_utils')(start_date, end_date, datepart)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_intervals_between"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783708211.3668694, "supported_languages": null}, "macro.dbt_utils.default__get_intervals_between": {"name": "default__get_intervals_between", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "unique_id": "macro.dbt_utils.default__get_intervals_between", "macro_sql": "{% macro default__get_intervals_between(start_date, end_date, datepart) -%}\n {%- call statement('get_intervals_between', fetch_result=True) %}\n\n select {{ dbt.datediff(start_date, end_date, datepart) }}\n\n {%- endcall -%}\n\n {%- set value_list = load_result('get_intervals_between') -%}\n\n {%- if value_list and value_list['data'] -%}\n {%- set values = value_list['data'] | map(attribute=0) | list %}\n {{ return(values[0]) }}\n {%- else -%}\n {{ return(1) }}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783708211.368077, "supported_languages": null}, "macro.dbt_utils.date_spine": {"name": "date_spine", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "unique_id": "macro.dbt_utils.date_spine", "macro_sql": "{% macro date_spine(datepart, start_date, end_date) %}\n {{ return(adapter.dispatch('date_spine', 'dbt_utils')(datepart, start_date, end_date)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1783708211.3685615, "supported_languages": null}, "macro.dbt_utils.default__date_spine": {"name": "default__date_spine", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/date_spine.sql", "original_file_path": "macros/sql/date_spine.sql", "unique_id": "macro.dbt_utils.default__date_spine", "macro_sql": "{% macro default__date_spine(datepart, start_date, end_date) %}\n\n\n{# call as follows:\n\ndate_spine(\n \"day\",\n \"to_date('01/01/2016', 'mm/dd/yyyy')\",\n \"dbt.dateadd(week, 1, current_date)\"\n) #}\n\n\nwith rawdata as (\n\n {{dbt_utils.generate_series(\n dbt_utils.get_intervals_between(start_date, end_date, datepart)\n )}}\n\n),\n\nall_periods as (\n\n select (\n {{\n dbt.dateadd(\n datepart,\n \"row_number() over (order by generated_number) - 1\",\n start_date\n )\n }}\n ) as date_{{datepart}}\n from rawdata\n\n),\n\nfiltered as (\n\n select *\n from all_periods\n where date_{{datepart}} <= {{ end_date }}\n\n)\n\nselect * from filtered\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.generate_series", "macro.dbt_utils.get_intervals_between", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1783708211.3692966, "supported_languages": null}, "macro.dbt_utils.get_relations_by_prefix": {"name": "get_relations_by_prefix", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "unique_id": "macro.dbt_utils.get_relations_by_prefix", "macro_sql": "{% macro get_relations_by_prefix(schema, prefix, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_relations_by_prefix', 'dbt_utils')(schema, prefix, exclude, database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_relations_by_prefix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783708211.3702402, "supported_languages": null}, "macro.dbt_utils.default__get_relations_by_prefix": {"name": "default__get_relations_by_prefix", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_relations_by_prefix.sql", "original_file_path": "macros/sql/get_relations_by_prefix.sql", "unique_id": "macro.dbt_utils.default__get_relations_by_prefix", "macro_sql": "{% macro default__get_relations_by_prefix(schema, prefix, exclude='', database=target.database) %}\n\n {%- call statement('get_tables', fetch_result=True) %}\n\n {{ dbt_utils.get_tables_by_prefix_sql(schema, prefix, exclude, database) }}\n\n {%- endcall -%}\n\n {%- set table_list = load_result('get_tables') -%}\n\n {%- if table_list and table_list['table'] -%}\n {%- set tbl_relations = [] -%}\n {%- for row in table_list['table'] -%}\n {%- set tbl_relation = api.Relation.create(\n database=database,\n schema=row.table_schema,\n identifier=row.table_name,\n type=row.table_type\n ) -%}\n {%- do tbl_relations.append(tbl_relation) -%}\n {%- endfor -%}\n\n {{ return(tbl_relations) }}\n {%- else -%}\n {{ return([]) }}\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt_utils.get_tables_by_prefix_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783708211.3720741, "supported_languages": null}, "macro.dbt_utils.union_relations": {"name": "union_relations", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "unique_id": "macro.dbt_utils.union_relations", "macro_sql": "{%- macro union_relations(relations, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation', where=none) -%}\n {{ return(adapter.dispatch('union_relations', 'dbt_utils')(relations, column_override, include, exclude, source_column_name, where)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__union_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relations", "type": null, "description": ""}, {"name": "column_override", "type": null, "description": ""}, {"name": "include", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "source_column_name", "type": null, "description": ""}, {"name": "where", "type": null, "description": ""}], "created_at": 1783708211.3741388, "supported_languages": null}, "macro.dbt_utils.default__union_relations": {"name": "default__union_relations", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/union.sql", "original_file_path": "macros/sql/union.sql", "unique_id": "macro.dbt_utils.default__union_relations", "macro_sql": "\n\n{%- macro default__union_relations(relations, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation', where=none) -%}\n\n {%- if exclude and include -%}\n {{ exceptions.raise_compiler_error(\"Both an exclude and include list were provided to the `union` macro. Only one is allowed\") }}\n {%- endif -%}\n\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. -#}\n {%- if not execute %}\n {{ return('') }}\n {% endif -%}\n\n {%- set column_override = column_override if column_override is not none else {} -%}\n\n {%- set relation_columns = {} -%}\n {%- set column_superset = {} -%}\n {%- set all_excludes = [] -%}\n {%- set all_includes = [] -%}\n\n {%- if exclude -%}\n {%- for exc in exclude -%}\n {%- do all_excludes.append(exc | lower) -%}\n {%- endfor -%}\n {%- endif -%}\n\n {%- if include -%}\n {%- for inc in include -%}\n {%- do all_includes.append(inc | lower) -%}\n {%- endfor -%}\n {%- endif -%}\n\n {%- for relation in relations -%}\n\n {%- do relation_columns.update({relation: []}) -%}\n\n {%- do dbt_utils._is_relation(relation, 'union_relations') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'union_relations') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) -%}\n {%- for col in cols -%}\n\n {#- If an exclude list was provided and the column is in the list, do nothing -#}\n {%- if exclude and col.column | lower in all_excludes -%}\n\n {#- If an include list was provided and the column is not in the list, do nothing -#}\n {%- elif include and col.column | lower not in all_includes -%}\n\n {#- Otherwise add the column to the column superset -#}\n {%- else -%}\n\n {#- update the list of columns in this relation -#}\n {%- do relation_columns[relation].append(col.column) -%}\n\n {%- if col.column in column_superset -%}\n\n {%- set stored = column_superset[col.column] -%}\n {%- if col.is_string() and stored.is_string() and col.string_size() > stored.string_size() -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif %}\n\n {%- else -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif -%}\n\n {%- endif -%}\n\n {%- endfor -%}\n {%- endfor -%}\n\n {%- set ordered_column_names = column_superset.keys() -%}\n {%- set dbt_command = flags.WHICH -%}\n\n\n {% if dbt_command in ['run', 'build'] %}\n {% if (include | length > 0 or exclude | length > 0) and not column_superset.keys() %}\n {%- set relations_string -%}\n {%- for relation in relations -%}\n {{ relation.name }}\n {%- if not loop.last %}, {% endif -%}\n {%- endfor -%}\n {%- endset -%}\n\n {%- set error_message -%}\n There were no columns found to union for relations {{ relations_string }}\n {%- endset -%}\n\n {{ exceptions.raise_compiler_error(error_message) }}\n {%- endif -%}\n {%- endif -%}\n\n {%- for relation in relations %}\n\n (\n select\n\n {%- if source_column_name is not none %}\n cast({{ dbt.string_literal(relation.render()) }} as {{ dbt.type_string() }}) as {{ source_column_name }},\n {%- endif %}\n\n /* No columns from any of the relations.\n This star is only output during dbt compile, and exists to keep SQLFluff happy. */\n {% if dbt_command == 'compile' and ordered_column_names|length == 0 %}\n *\n {% endif %}\n\n {% for col_name in ordered_column_names -%}\n\n {%- set col = column_superset[col_name] %}\n {%- set col_type = column_override.get(col.column, col.data_type) %}\n {%- set col_name = adapter.quote(col_name) if col_name in relation_columns[relation] else 'null' %}\n cast({{ col_name }} as {{ col_type }}) as {{ col.quoted }} {% if not loop.last %},{% endif -%}\n\n {%- endfor %}\n\n from {{ relation }}\n\n {% if where -%}\n where {{ where }}\n {%- endif %}\n )\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n\n {%- endfor -%}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.string_literal", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relations", "type": null, "description": ""}, {"name": "column_override", "type": null, "description": ""}, {"name": "include", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "source_column_name", "type": null, "description": ""}, {"name": "where", "type": null, "description": ""}], "created_at": 1783708211.3812459, "supported_languages": null}, "macro.dbt_utils.get_tables_by_pattern_sql": {"name": "get_tables_by_pattern_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils.get_tables_by_pattern_sql", "macro_sql": "{% macro get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(adapter.dispatch('get_tables_by_pattern_sql', 'dbt_utils')\n (schema_pattern, table_pattern, exclude, database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_tables_by_pattern_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783708211.3828177, "supported_languages": null}, "macro.dbt_utils.default__get_tables_by_pattern_sql": {"name": "default__get_tables_by_pattern_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils.default__get_tables_by_pattern_sql", "macro_sql": "{% macro default__get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n select distinct\n table_schema as {{ adapter.quote('table_schema') }},\n table_name as {{ adapter.quote('table_name') }},\n {{ dbt_utils.get_table_types_sql() }}\n from {{ database }}.information_schema.tables\n where table_schema ilike '{{ schema_pattern }}'\n and table_name ilike '{{ table_pattern }}'\n and table_name not ilike '{{ exclude }}'\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783708211.3835857, "supported_languages": null}, "macro.dbt_utils.redshift__get_tables_by_pattern_sql": {"name": "redshift__get_tables_by_pattern_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils.redshift__get_tables_by_pattern_sql", "macro_sql": "{% macro redshift__get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {% set sql %}\n select distinct\n table_schema as {{ adapter.quote('table_schema') }},\n table_name as {{ adapter.quote('table_name') }},\n {{ dbt_utils.get_table_types_sql() }}\n from \"{{ database }}\".\"information_schema\".\"tables\"\n where table_schema ilike '{{ schema_pattern }}'\n and table_name ilike '{{ table_pattern }}'\n and table_name not ilike '{{ exclude }}'\n union all\n select distinct\n schemaname as {{ adapter.quote('table_schema') }},\n tablename as {{ adapter.quote('table_name') }},\n 'external' as {{ adapter.quote('table_type') }}\n from svv_external_tables\n where redshift_database_name = '{{ database }}'\n and schemaname ilike '{{ schema_pattern }}'\n and table_name ilike '{{ table_pattern }}'\n and table_name not ilike '{{ exclude }}'\n {% endset %}\n\n {{ return(sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783708211.384956, "supported_languages": null}, "macro.dbt_utils.bigquery__get_tables_by_pattern_sql": {"name": "bigquery__get_tables_by_pattern_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils.bigquery__get_tables_by_pattern_sql", "macro_sql": "{% macro bigquery__get_tables_by_pattern_sql(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {% if '%' in schema_pattern %}\n {% set schemata=dbt_utils._bigquery__get_matching_schemata(schema_pattern, database) %}\n {% else %}\n {% set schemata=[schema_pattern] %}\n {% endif %}\n\n {% set sql %}\n {% for schema in schemata %}\n select distinct\n table_schema,\n table_name,\n {{ dbt_utils.get_table_types_sql() }}\n\n from {{ adapter.quote(database) }}.{{ schema }}.INFORMATION_SCHEMA.TABLES\n where lower(table_name) like lower ('{{ table_pattern }}')\n and lower(table_name) not like lower ('{{ exclude }}')\n\n {% if not loop.last %} union all {% endif %}\n\n {% endfor %}\n {% endset %}\n\n {{ return(sql) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._bigquery__get_matching_schemata", "macro.dbt_utils.get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783708211.3864367, "supported_languages": null}, "macro.dbt_utils._bigquery__get_matching_schemata": {"name": "_bigquery__get_matching_schemata", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_tables_by_pattern_sql.sql", "original_file_path": "macros/sql/get_tables_by_pattern_sql.sql", "unique_id": "macro.dbt_utils._bigquery__get_matching_schemata", "macro_sql": "{% macro _bigquery__get_matching_schemata(schema_pattern, database) %}\n {% if execute %}\n\n {% set sql %}\n select schema_name from {{ adapter.quote(database) }}.INFORMATION_SCHEMA.SCHEMATA\n where lower(schema_name) like lower('{{ schema_pattern }}')\n {% endset %}\n\n {% set results=run_query(sql) %}\n\n {% set schemata=results.columns['schema_name'].values() %}\n\n {{ return(schemata) }}\n\n {% else %}\n\n {{ return([]) }}\n\n {% endif %}\n\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783708211.3874633, "supported_languages": null}, "macro.dbt_utils.group_by": {"name": "group_by", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "unique_id": "macro.dbt_utils.group_by", "macro_sql": "{%- macro group_by(n) -%}\n {{ return(adapter.dispatch('group_by', 'dbt_utils')(n)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__group_by"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "n", "type": null, "description": ""}], "created_at": 1783708211.3880155, "supported_languages": null}, "macro.dbt_utils.default__group_by": {"name": "default__group_by", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/groupby.sql", "original_file_path": "macros/sql/groupby.sql", "unique_id": "macro.dbt_utils.default__group_by", "macro_sql": "\n\n{%- macro default__group_by(n) -%}\n\n group by {% for i in range(1, n + 1) -%}\n {{ i }}{{ ',' if not loop.last }} \n {%- endfor -%}\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "n", "type": null, "description": ""}], "created_at": 1783708211.3885543, "supported_languages": null}, "macro.dbt_utils.get_table_types_sql": {"name": "get_table_types_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "unique_id": "macro.dbt_utils.get_table_types_sql", "macro_sql": "{%- macro get_table_types_sql() -%}\n {{ return(adapter.dispatch('get_table_types_sql', 'dbt_utils')()) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt_utils.postgres__get_table_types_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.389193, "supported_languages": null}, "macro.dbt_utils.default__get_table_types_sql": {"name": "default__get_table_types_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "unique_id": "macro.dbt_utils.default__get_table_types_sql", "macro_sql": "{% macro default__get_table_types_sql() %}\n case table_type\n when 'BASE TABLE' then 'table'\n when 'EXTERNAL TABLE' then 'external'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as {{ adapter.quote('table_type') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.389482, "supported_languages": null}, "macro.dbt_utils.postgres__get_table_types_sql": {"name": "postgres__get_table_types_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "unique_id": "macro.dbt_utils.postgres__get_table_types_sql", "macro_sql": "{% macro postgres__get_table_types_sql() %}\n case table_type\n when 'BASE TABLE' then 'table'\n when 'FOREIGN' then 'external'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as {{ adapter.quote('table_type') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.3897607, "supported_languages": null}, "macro.dbt_utils.databricks__get_table_types_sql": {"name": "databricks__get_table_types_sql", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_table_types_sql.sql", "original_file_path": "macros/sql/get_table_types_sql.sql", "unique_id": "macro.dbt_utils.databricks__get_table_types_sql", "macro_sql": "{% macro databricks__get_table_types_sql() %}\n case table_type\n when 'MANAGED' then 'table'\n when 'BASE TABLE' then 'table'\n when 'MATERIALIZED VIEW' then 'materializedview'\n else lower(table_type)\n end as {{ adapter.quote('table_type') }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.390038, "supported_languages": null}, "macro.dbt_utils.degrees_to_radians": {"name": "degrees_to_radians", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "unique_id": "macro.dbt_utils.degrees_to_radians", "macro_sql": "{% macro degrees_to_radians(degrees) -%}\n acos(-1) * {{degrees}} / 180\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "degrees", "type": null, "description": ""}], "created_at": 1783708211.3908856, "supported_languages": null}, "macro.dbt_utils.haversine_distance": {"name": "haversine_distance", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "unique_id": "macro.dbt_utils.haversine_distance", "macro_sql": "{% macro haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n {{ return(adapter.dispatch('haversine_distance', 'dbt_utils')(lat1,lon1,lat2,lon2,unit)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__haversine_distance"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "lat1", "type": null, "description": ""}, {"name": "lon1", "type": null, "description": ""}, {"name": "lat2", "type": null, "description": ""}, {"name": "lon2", "type": null, "description": ""}, {"name": "unit", "type": null, "description": ""}], "created_at": 1783708211.3914685, "supported_languages": null}, "macro.dbt_utils.default__haversine_distance": {"name": "default__haversine_distance", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "unique_id": "macro.dbt_utils.default__haversine_distance", "macro_sql": "{% macro default__haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n{%- if unit == 'mi' %}\n {% set conversion_rate = 1 %}\n{% elif unit == 'km' %}\n {% set conversion_rate = 1.60934 %}\n{% else %}\n {{ exceptions.raise_compiler_error(\"unit input must be one of 'mi' or 'km'. Got \" ~ unit) }}\n{% endif %}\n\n 2 * 3961 * asin(sqrt(power((sin(radians(({{ lat2 }} - {{ lat1 }}) / 2))), 2) +\n cos(radians({{lat1}})) * cos(radians({{lat2}})) *\n power((sin(radians(({{ lon2 }} - {{ lon1 }}) / 2))), 2))) * {{ conversion_rate }}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "lat1", "type": null, "description": ""}, {"name": "lon1", "type": null, "description": ""}, {"name": "lat2", "type": null, "description": ""}, {"name": "lon2", "type": null, "description": ""}, {"name": "unit", "type": null, "description": ""}], "created_at": 1783708211.3926775, "supported_languages": null}, "macro.dbt_utils.bigquery__haversine_distance": {"name": "bigquery__haversine_distance", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/haversine_distance.sql", "original_file_path": "macros/sql/haversine_distance.sql", "unique_id": "macro.dbt_utils.bigquery__haversine_distance", "macro_sql": "{% macro bigquery__haversine_distance(lat1, lon1, lat2, lon2, unit='mi') -%}\n{% set radians_lat1 = dbt_utils.degrees_to_radians(lat1) %}\n{% set radians_lat2 = dbt_utils.degrees_to_radians(lat2) %}\n{% set radians_lon1 = dbt_utils.degrees_to_radians(lon1) %}\n{% set radians_lon2 = dbt_utils.degrees_to_radians(lon2) %}\n{%- if unit == 'mi' %}\n {% set conversion_rate = 1 %}\n{% elif unit == 'km' %}\n {% set conversion_rate = 1.60934 %}\n{% else %}\n {{ exceptions.raise_compiler_error(\"unit input must be one of 'mi' or 'km'. Got \" ~ unit) }}\n{% endif %}\n 2 * 3961 * asin(sqrt(power(sin(({{ radians_lat2 }} - {{ radians_lat1 }}) / 2), 2) +\n cos({{ radians_lat1 }}) * cos({{ radians_lat2 }}) *\n power(sin(({{ radians_lon2 }} - {{ radians_lon1 }}) / 2), 2))) * {{ conversion_rate }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.degrees_to_radians"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "lat1", "type": null, "description": ""}, {"name": "lon1", "type": null, "description": ""}, {"name": "lat2", "type": null, "description": ""}, {"name": "lon2", "type": null, "description": ""}, {"name": "unit", "type": null, "description": ""}], "created_at": 1783708211.3943179, "supported_languages": null}, "macro.dbt_utils.safe_subtract": {"name": "safe_subtract", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_subtract.sql", "original_file_path": "macros/sql/safe_subtract.sql", "unique_id": "macro.dbt_utils.safe_subtract", "macro_sql": "{%- macro safe_subtract(field_list) -%}\n {{ return(adapter.dispatch('safe_subtract', 'dbt_utils')(field_list)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__safe_subtract"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1783708211.3949673, "supported_languages": null}, "macro.dbt_utils.default__safe_subtract": {"name": "default__safe_subtract", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/safe_subtract.sql", "original_file_path": "macros/sql/safe_subtract.sql", "unique_id": "macro.dbt_utils.default__safe_subtract", "macro_sql": "\n\n{%- macro default__safe_subtract(field_list) -%}\n\n{%- if field_list is not iterable or field_list is string or field_list is mapping -%}\n\n{%- set error_message = '\nWarning: the `safe_subtract` macro takes a single list argument instead of \\\nstring arguments. The {}.{} model triggered this warning. \\\n'.format(model.package_name, model.name) -%}\n\n{%- do exceptions.raise_compiler_error(error_message) -%}\n\n{%- endif -%}\n\n{% set fields = [] %}\n\n{%- for field in field_list -%}\n\n {% do fields.append(\"coalesce(\" ~ field ~ \", 0)\") %}\n\n{%- endfor -%}\n\n{{ fields|join(' -\\n ') }}\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1783708211.3960798, "supported_languages": null}, "macro.dbt_utils.get_column_values": {"name": "get_column_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "unique_id": "macro.dbt_utils.get_column_values", "macro_sql": "{% macro get_column_values(table, column, order_by='count(*) desc', max_records=none, default=none, where=none) -%}\n {{ return(adapter.dispatch('get_column_values', 'dbt_utils')(table, column, order_by, max_records, default, where)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_column_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table", "type": null, "description": ""}, {"name": "column", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}, {"name": "max_records", "type": null, "description": ""}, {"name": "default", "type": null, "description": ""}, {"name": "where", "type": null, "description": ""}], "created_at": 1783708211.397446, "supported_languages": null}, "macro.dbt_utils.default__get_column_values": {"name": "default__get_column_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/get_column_values.sql", "original_file_path": "macros/sql/get_column_values.sql", "unique_id": "macro.dbt_utils.default__get_column_values", "macro_sql": "{% macro default__get_column_values(table, column, order_by='count(*) desc', max_records=none, default=none, where=none) -%}\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n {%- if not execute -%}\n {% set default = [] if not default %}\n {{ return(default) }}\n {% endif %}\n\n {%- do dbt_utils._is_ephemeral(table, 'get_column_values') -%}\n\n {# Not all relations are tables. Renaming for internal clarity without breaking functionality for anyone using named arguments #}\n {# TODO: Change the method signature in a future 0.x.0 release #}\n {%- set target_relation = table -%}\n\n {# adapter.load_relation is a convenience wrapper to avoid building a Relation when we already have one #}\n {% set relation_exists = (load_relation(target_relation)) is not none %}\n\n {%- call statement('get_column_values', fetch_result=true) %}\n\n {%- if not relation_exists and default is none -%}\n\n {{ exceptions.raise_compiler_error(\"In get_column_values(): relation \" ~ target_relation ~ \" does not exist and no default value was provided.\") }}\n\n {%- elif not relation_exists and default is not none -%}\n\n {{ log(\"Relation \" ~ target_relation ~ \" does not exist. Returning the default value: \" ~ default) }}\n\n {{ return(default) }}\n\n {%- else -%}\n\n\n select\n {{ column }} as value\n\n from {{ target_relation }}\n\n {% if where is not none %}\n where {{ where }}\n {% endif %}\n\n group by {{ column }}\n order by {{ order_by }}\n\n {% if max_records is not none %}\n limit {{ max_records }}\n {% endif %}\n\n {% endif %}\n\n {%- endcall -%}\n\n {%- set value_list = load_result('get_column_values') -%}\n\n {%- if value_list and value_list['data'] -%}\n {%- set values = value_list['data'] | map(attribute=0) | list %}\n {{ return(values) }}\n {%- else -%}\n {{ return(default) }}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_ephemeral", "macro.dbt.load_relation", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table", "type": null, "description": ""}, {"name": "column", "type": null, "description": ""}, {"name": "order_by", "type": null, "description": ""}, {"name": "max_records", "type": null, "description": ""}, {"name": "default", "type": null, "description": ""}, {"name": "where", "type": null, "description": ""}], "created_at": 1783708211.4004295, "supported_languages": null}, "macro.dbt_utils.width_bucket": {"name": "width_bucket", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "unique_id": "macro.dbt_utils.width_bucket", "macro_sql": "{% macro width_bucket(expr, min_value, max_value, num_buckets) %}\n {{ return(adapter.dispatch('width_bucket', 'dbt_utils') (expr, min_value, max_value, num_buckets)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__width_bucket"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expr", "type": null, "description": ""}, {"name": "min_value", "type": null, "description": ""}, {"name": "max_value", "type": null, "description": ""}, {"name": "num_buckets", "type": null, "description": ""}], "created_at": 1783708211.4013033, "supported_languages": null}, "macro.dbt_utils.default__width_bucket": {"name": "default__width_bucket", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "unique_id": "macro.dbt_utils.default__width_bucket", "macro_sql": "{% macro default__width_bucket(expr, min_value, max_value, num_buckets) -%}\n\n {% set bin_size -%}\n (( {{ max_value }} - {{ min_value }} ) / {{ num_buckets }} )\n {%- endset %}\n (\n -- to break ties when the amount is eaxtly at the bucket egde\n case\n when\n mod(\n {{ dbt.safe_cast(expr, dbt.type_numeric() ) }},\n {{ dbt.safe_cast(bin_size, dbt.type_numeric() ) }}\n ) = 0\n then 1\n else 0\n end\n ) +\n -- Anything over max_value goes the N+1 bucket\n least(\n ceil(\n ({{ expr }} - {{ min_value }})/{{ bin_size }}\n ),\n {{ num_buckets }} + 1\n )\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.safe_cast", "macro.dbt.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expr", "type": null, "description": ""}, {"name": "min_value", "type": null, "description": ""}, {"name": "max_value", "type": null, "description": ""}, {"name": "num_buckets", "type": null, "description": ""}], "created_at": 1783708211.4022555, "supported_languages": null}, "macro.dbt_utils.snowflake__width_bucket": {"name": "snowflake__width_bucket", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/width_bucket.sql", "original_file_path": "macros/sql/width_bucket.sql", "unique_id": "macro.dbt_utils.snowflake__width_bucket", "macro_sql": "{% macro snowflake__width_bucket(expr, min_value, max_value, num_buckets) %}\n width_bucket({{ expr }}, {{ min_value }}, {{ max_value }}, {{ num_buckets }} )\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "expr", "type": null, "description": ""}, {"name": "min_value", "type": null, "description": ""}, {"name": "max_value", "type": null, "description": ""}, {"name": "num_buckets", "type": null, "description": ""}], "created_at": 1783708211.4026506, "supported_languages": null}, "macro.dbt_utils.star": {"name": "star", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "unique_id": "macro.dbt_utils.star", "macro_sql": "{% macro star(from, relation_alias=False, except=[], prefix='', suffix='', quote_identifiers=True, unquote_aliases=False, rename={}) -%}\r\n {{ return(adapter.dispatch('star', 'dbt_utils')(from, relation_alias, except, prefix, suffix, quote_identifiers, unquote_aliases, rename)) }}\r\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__star"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from", "type": null, "description": ""}, {"name": "relation_alias", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}, {"name": "quote_identifiers", "type": null, "description": ""}, {"name": "unquote_aliases", "type": null, "description": ""}, {"name": "rename", "type": null, "description": ""}], "created_at": 1783708211.4043188, "supported_languages": null}, "macro.dbt_utils.default__star": {"name": "default__star", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/star.sql", "original_file_path": "macros/sql/star.sql", "unique_id": "macro.dbt_utils.default__star", "macro_sql": "{% macro default__star(from, relation_alias=False, except=[], prefix='', suffix='', quote_identifiers=True, unquote_aliases=False, rename={}) -%}\r\n {%- do dbt_utils._is_relation(from, 'star') -%}\r\n {%- do dbt_utils._is_ephemeral(from, 'star') -%}\r\n\r\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\r\n {%- if not execute -%}\r\n {% do return('*') %}\r\n {%- endif -%}\r\n\r\n {% set cols = dbt_utils.get_filtered_columns_in_relation(from, except) %}\r\n\r\n {%- set rename_lower = {} -%}\r\n {%- for key, val in rename.items() -%}\r\n {%- do rename_lower.update({key.lower(): val}) -%}\r\n {%- endfor -%}\r\n\r\n {%- if cols|length <= 0 -%}\r\n {% if flags.WHICH == 'compile' %}\r\n {% set response %}\r\n*\r\n/* No columns were returned. Maybe the relation doesn't exist yet\r\nor all columns were excluded. This star is only output during\r\ndbt compile, and exists to keep SQLFluff happy. */\r\n {% endset %}\r\n {% do return(response) %}\r\n {% else %}\r\n {% do return(\"/* no columns returned from star() macro */\") %}\r\n {% endif %}\r\n {%- else -%}\r\n {%- for col in cols %}\r\n {%- if relation_alias %}{{ relation_alias }}.{% else %}{%- endif -%}\r\n {%- if quote_identifiers -%}\r\n {{ adapter.quote(col)|trim }}\r\n {%- if col.lower() in rename_lower %} as {{ rename_lower[col.lower()] }}\r\n {%- elif unquote_aliases %} as {{ (prefix ~ col ~ suffix)|trim }}\r\n {%- elif prefix!='' or suffix!='' %} as {{ adapter.quote(prefix ~ col ~ suffix)|trim }}\r\n {%- endif -%}\r\n {%- else -%}\r\n {{ col|trim }}\r\n {%- if col.lower() in rename_lower %} as {{ rename_lower[col.lower()] }}\r\n {%- elif prefix!='' or suffix!='' %} as {{ (prefix ~ col ~ suffix)|trim }}\r\n {%- endif -%}\r\n {%- endif -%}\r\n {%- if not loop.last %},{{ '\\n ' }}{%- endif -%}\r\n {%- endfor -%}\r\n {% endif %}\r\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "from", "type": null, "description": ""}, {"name": "relation_alias", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}, {"name": "quote_identifiers", "type": null, "description": ""}, {"name": "unquote_aliases", "type": null, "description": ""}, {"name": "rename", "type": null, "description": ""}], "created_at": 1783708211.4084268, "supported_languages": null}, "macro.dbt_utils.pivot": {"name": "pivot", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "unique_id": "macro.dbt_utils.pivot", "macro_sql": "{% macro pivot(column,\n values,\n alias=True,\n agg='sum',\n cmp='=',\n prefix='',\n suffix='',\n then_value=1,\n else_value=0,\n quote_identifiers=True,\n distinct=False) %}\n {{ return(adapter.dispatch('pivot', 'dbt_utils')(column, values, alias, agg, cmp, prefix, suffix, then_value, else_value, quote_identifiers, distinct)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__pivot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}, {"name": "values", "type": null, "description": ""}, {"name": "alias", "type": null, "description": ""}, {"name": "agg", "type": null, "description": ""}, {"name": "cmp", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}, {"name": "then_value", "type": null, "description": ""}, {"name": "else_value", "type": null, "description": ""}, {"name": "quote_identifiers", "type": null, "description": ""}, {"name": "distinct", "type": null, "description": ""}], "created_at": 1783708211.4100053, "supported_languages": null}, "macro.dbt_utils.default__pivot": {"name": "default__pivot", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/pivot.sql", "original_file_path": "macros/sql/pivot.sql", "unique_id": "macro.dbt_utils.default__pivot", "macro_sql": "{% macro default__pivot(column,\n values,\n alias=True,\n agg='sum',\n cmp='=',\n prefix='',\n suffix='',\n then_value=1,\n else_value=0,\n quote_identifiers=True,\n distinct=False) %}\n {% for value in values %}\n {{ agg }}(\n {% if distinct %} distinct {% endif %}\n case\n when {{ column }} {{ cmp }} '{{ dbt.escape_single_quotes(value) }}'\n then {{ then_value }}\n else {{ else_value }}\n end\n )\n {% if alias %}\n {% if quote_identifiers %}\n as {{ adapter.quote(prefix ~ value ~ suffix) }}\n {% else %}\n as {{ dbt_utils.slugify(prefix ~ value ~ suffix) }}\n {% endif %}\n {% endif %}\n {% if not loop.last %},{% endif %}\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.escape_single_quotes", "macro.dbt_utils.slugify"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}, {"name": "values", "type": null, "description": ""}, {"name": "alias", "type": null, "description": ""}, {"name": "agg", "type": null, "description": ""}, {"name": "cmp", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "suffix", "type": null, "description": ""}, {"name": "then_value", "type": null, "description": ""}, {"name": "else_value", "type": null, "description": ""}, {"name": "quote_identifiers", "type": null, "description": ""}, {"name": "distinct", "type": null, "description": ""}], "created_at": 1783708211.4117446, "supported_languages": null}, "macro.dbt_utils.surrogate_key": {"name": "surrogate_key", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "unique_id": "macro.dbt_utils.surrogate_key", "macro_sql": "{%- macro surrogate_key(field_list) -%}\n {% set frustrating_jinja_feature = varargs %}\n {{ return(adapter.dispatch('surrogate_key', 'dbt_utils')(field_list, *varargs)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__surrogate_key"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1783708211.4124525, "supported_languages": null}, "macro.dbt_utils.default__surrogate_key": {"name": "default__surrogate_key", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/surrogate_key.sql", "original_file_path": "macros/sql/surrogate_key.sql", "unique_id": "macro.dbt_utils.default__surrogate_key", "macro_sql": "\n\n{%- macro default__surrogate_key(field_list) -%}\n\n{%- set error_message = '\nWarning: `dbt_utils.surrogate_key` has been replaced by \\\n`dbt_utils.generate_surrogate_key`. The new macro treats null values \\\ndifferently to empty strings. To restore the behaviour of the original \\\nmacro, add a global variable in dbt_project.yml called \\\n`surrogate_key_treat_nulls_as_empty_strings` to your \\\ndbt_project.yml file with a value of True. \\\nThe {}.{} model triggered this warning. \\\n'.format(model.package_name, model.name) -%}\n\n{%- do exceptions.raise_compiler_error(error_message) -%}\n\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_list", "type": null, "description": ""}], "created_at": 1783708211.4129295, "supported_languages": null}, "macro.dbt_utils.unpivot": {"name": "unpivot", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "unique_id": "macro.dbt_utils.unpivot", "macro_sql": "{% macro unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value', quote_identifiers=False) -%}\n {{ return(adapter.dispatch('unpivot', 'dbt_utils')(relation, cast_to, exclude, remove, field_name, value_name, quote_identifiers)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__unpivot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "cast_to", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "remove", "type": null, "description": ""}, {"name": "field_name", "type": null, "description": ""}, {"name": "value_name", "type": null, "description": ""}, {"name": "quote_identifiers", "type": null, "description": ""}], "created_at": 1783708211.4144373, "supported_languages": null}, "macro.dbt_utils.default__unpivot": {"name": "default__unpivot", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/sql/unpivot.sql", "original_file_path": "macros/sql/unpivot.sql", "unique_id": "macro.dbt_utils.default__unpivot", "macro_sql": "{% macro default__unpivot(relation=none, cast_to='varchar', exclude=none, remove=none, field_name='field_name', value_name='value', quote_identifiers=False) -%}\n\n {% if not relation %}\n {{ exceptions.raise_compiler_error(\"Error: argument `relation` is required for `unpivot` macro.\") }}\n {% endif %}\n\n {%- set exclude = exclude if exclude is not none else [] %}\n {%- set remove = remove if remove is not none else [] %}\n\n {%- set include_cols = [] %}\n\n {%- set table_columns = {} %}\n\n {%- do table_columns.update({relation: []}) %}\n\n {%- do dbt_utils._is_relation(relation, 'unpivot') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'unpivot') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) %}\n\n {%- for col in cols -%}\n {%- if col.column.lower() not in remove|map('lower') and col.column.lower() not in exclude|map('lower') -%}\n {% do include_cols.append(col) %}\n {%- endif %}\n {%- endfor %}\n\n\n {%- for col in include_cols -%}\n {%- set current_col_name = adapter.quote(col.column) if quote_identifiers else col.column -%}\n select\n {%- for exclude_col in exclude %}\n {{ adapter.quote(exclude_col) if quote_identifiers else exclude_col }},\n {%- endfor %}\n\n cast('{{ col.column }}' as {{ dbt.type_string() }}) as {{ adapter.quote(field_name) if quote_identifiers else field_name }},\n cast( {% if col.data_type == 'boolean' %}\n {{ dbt.cast_bool_to_text(current_col_name) }}\n {% else %}\n {{ current_col_name }}\n {% endif %}\n as {{ cast_to }}) as {{ adapter.quote(value_name) if quote_identifiers else value_name }}\n\n from {{ relation }}\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n {%- endfor -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.type_string", "macro.dbt.cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relation", "type": null, "description": ""}, {"name": "cast_to", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "remove", "type": null, "description": ""}, {"name": "field_name", "type": null, "description": ""}, {"name": "value_name", "type": null, "description": ""}, {"name": "quote_identifiers", "type": null, "description": ""}], "created_at": 1783708211.418388, "supported_languages": null}, "macro.dbt_utils.test_not_null_proportion": {"name": "test_not_null_proportion", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "unique_id": "macro.dbt_utils.test_not_null_proportion", "macro_sql": "{% macro test_not_null_proportion(model, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_not_null_proportion', 'dbt_utils')(model, group_by_columns, **kwargs)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_not_null_proportion"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1783708211.4192896, "supported_languages": null}, "macro.dbt_utils.default__test_not_null_proportion": {"name": "default__test_not_null_proportion", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_null_proportion.sql", "original_file_path": "macros/generic_tests/not_null_proportion.sql", "unique_id": "macro.dbt_utils.default__test_not_null_proportion", "macro_sql": "{% macro default__test_not_null_proportion(model, group_by_columns) %}\n\n{% set column_name = kwargs.get('column_name', kwargs.get('arg')) %}\n{% set at_least = kwargs.get('at_least', kwargs.get('arg')) %}\n{% set at_most = kwargs.get('at_most', kwargs.get('arg', 1)) %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\nwith validation as (\n select\n {{select_gb_cols}}\n sum(case when {{ column_name }} is null then 0 else 1 end) / cast(count(*) as {{ dbt.type_numeric() }}) as not_null_proportion\n from {{ model }}\n {{groupby_gb_cols}}\n),\nvalidation_errors as (\n select\n {{select_gb_cols}}\n not_null_proportion\n from validation\n where not_null_proportion < {{ at_least }} or not_null_proportion > {{ at_most }}\n)\nselect\n *\nfrom validation_errors\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1783708211.4209406, "supported_languages": null}, "macro.dbt_utils.test_at_least_one": {"name": "test_at_least_one", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "unique_id": "macro.dbt_utils.test_at_least_one", "macro_sql": "{% test at_least_one(model, column_name, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_at_least_one', 'dbt_utils')(model, column_name, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_at_least_one"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1783708211.4218662, "supported_languages": null}, "macro.dbt_utils.default__test_at_least_one": {"name": "default__test_at_least_one", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/at_least_one.sql", "original_file_path": "macros/generic_tests/at_least_one.sql", "unique_id": "macro.dbt_utils.default__test_at_least_one", "macro_sql": "{% macro default__test_at_least_one(model, column_name, group_by_columns) %}\n\n{% set pruned_cols = [column_name] %}\n\n{% if group_by_columns|length() > 0 %}\n\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n {% set pruned_cols = group_by_columns %}\n\n {% if column_name not in pruned_cols %}\n {% do pruned_cols.append(column_name) %}\n {% endif %}\n\n{% endif %}\n\n{% set select_pruned_cols = pruned_cols|join(' ,') %}\n\nselect *\nfrom (\n with pruned_rows as (\n select\n {{ select_pruned_cols }}\n from {{ model }}\n {% if group_by_columns|length() == 0 %}\n where {{ column_name }} is not null\n limit 1\n {% endif %}\n )\n select\n {# In TSQL, subquery aggregate columns need aliases #}\n {# thus: a filler col name, 'filler_column' #}\n {{select_gb_cols}}\n count({{ column_name }}) as filler_column\n\n from pruned_rows\n\n {{groupby_gb_cols}}\n\n having count({{ column_name }}) = 0\n\n) validation_errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1783708211.4236512, "supported_languages": null}, "macro.dbt_utils.test_mutually_exclusive_ranges": {"name": "test_mutually_exclusive_ranges", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "unique_id": "macro.dbt_utils.test_mutually_exclusive_ranges", "macro_sql": "{% test mutually_exclusive_ranges(model, lower_bound_column, upper_bound_column, partition_by=None, gaps='allowed', zero_length_range_allowed=False) %}\n {{ return(adapter.dispatch('test_mutually_exclusive_ranges', 'dbt_utils')(model, lower_bound_column, upper_bound_column, partition_by, gaps, zero_length_range_allowed)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_mutually_exclusive_ranges"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "lower_bound_column", "type": null, "description": ""}, {"name": "upper_bound_column", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "gaps", "type": null, "description": ""}, {"name": "zero_length_range_allowed", "type": null, "description": ""}], "created_at": 1783708211.4251952, "supported_languages": null}, "macro.dbt_utils.default__test_mutually_exclusive_ranges": {"name": "default__test_mutually_exclusive_ranges", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/mutually_exclusive_ranges.sql", "original_file_path": "macros/generic_tests/mutually_exclusive_ranges.sql", "unique_id": "macro.dbt_utils.default__test_mutually_exclusive_ranges", "macro_sql": "{% macro default__test_mutually_exclusive_ranges(model, lower_bound_column, upper_bound_column, partition_by=None, gaps='allowed', zero_length_range_allowed=False) %}\n{% if gaps == 'not_allowed' %}\n {% set allow_gaps_operator='=' %}\n {% set allow_gaps_operator_in_words='equal_to' %}\n{% elif gaps == 'allowed' %}\n {% set allow_gaps_operator='<=' %}\n {% set allow_gaps_operator_in_words='less_than_or_equal_to' %}\n{% elif gaps == 'required' %}\n {% set allow_gaps_operator='<' %}\n {% set allow_gaps_operator_in_words='less_than' %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`gaps` argument for mutually_exclusive_ranges test must be one of ['not_allowed', 'allowed', 'required'] Got: '\" ~ gaps ~\"'.'\"\n ) }}\n{% endif %}\n{% if not zero_length_range_allowed %}\n {% set allow_zero_length_operator='<' %}\n {% set allow_zero_length_operator_in_words='less_than' %}\n{% elif zero_length_range_allowed %}\n {% set allow_zero_length_operator='<=' %}\n {% set allow_zero_length_operator_in_words='less_than_or_equal_to' %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`zero_length_range_allowed` argument for mutually_exclusive_ranges test must be one of [true, false] Got: '\" ~ zero_length_range_allowed ~\"'.'\"\n ) }}\n{% endif %}\n\n{% set partition_clause=\"partition by \" ~ partition_by if partition_by else '' %}\n\nwith window_functions as (\n\n select\n {% if partition_by %}\n {{ partition_by }} as partition_by_col,\n {% endif %}\n {{ lower_bound_column }} as lower_bound,\n {{ upper_bound_column }} as upper_bound,\n\n lead({{ lower_bound_column }}) over (\n {{ partition_clause }}\n order by {{ lower_bound_column }}, {{ upper_bound_column }}\n ) as next_lower_bound,\n\n row_number() over (\n {{ partition_clause }}\n order by {{ lower_bound_column }} desc, {{ upper_bound_column }} desc\n ) = 1 as is_last_record\n\n from {{ model }}\n\n),\n\ncalc as (\n -- We want to return records where one of our assumptions fails, so we'll use\n -- the `not` function with `and` statements so we can write our assumptions more cleanly\n select\n *,\n\n -- For each record: lower_bound should be < upper_bound.\n -- Coalesce it to return an error on the null case (implicit assumption\n -- these columns are not_null)\n coalesce(\n lower_bound {{ allow_zero_length_operator }} upper_bound,\n false\n ) as lower_bound_{{ allow_zero_length_operator_in_words }}_upper_bound,\n\n -- For each record: upper_bound {{ allow_gaps_operator }} the next lower_bound.\n -- Coalesce it to handle null cases for the last record.\n coalesce(\n upper_bound {{ allow_gaps_operator }} next_lower_bound,\n is_last_record,\n false\n ) as upper_bound_{{ allow_gaps_operator_in_words }}_next_lower_bound\n\n from window_functions\n\n),\n\nvalidation_errors as (\n\n select\n *\n from calc\n\n where not(\n -- THE FOLLOWING SHOULD BE TRUE --\n lower_bound_{{ allow_zero_length_operator_in_words }}_upper_bound\n and upper_bound_{{ allow_gaps_operator_in_words }}_next_lower_bound\n )\n)\n\nselect * from validation_errors\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "lower_bound_column", "type": null, "description": ""}, {"name": "upper_bound_column", "type": null, "description": ""}, {"name": "partition_by", "type": null, "description": ""}, {"name": "gaps", "type": null, "description": ""}, {"name": "zero_length_range_allowed", "type": null, "description": ""}], "created_at": 1783708211.4283009, "supported_languages": null}, "macro.dbt_utils.test_expression_is_true": {"name": "test_expression_is_true", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "unique_id": "macro.dbt_utils.test_expression_is_true", "macro_sql": "{% test expression_is_true(model, expression, column_name=None) %}\n {{ return(adapter.dispatch('test_expression_is_true', 'dbt_utils')(model, expression, column_name)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_expression_is_true"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "expression", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}], "created_at": 1783708211.429043, "supported_languages": null}, "macro.dbt_utils.default__test_expression_is_true": {"name": "default__test_expression_is_true", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/expression_is_true.sql", "original_file_path": "macros/generic_tests/expression_is_true.sql", "unique_id": "macro.dbt_utils.default__test_expression_is_true", "macro_sql": "{% macro default__test_expression_is_true(model, expression, column_name) %}\n\n{% set column_list = '*' if should_store_failures() else \"1\" %}\n\nselect\n {{ column_list }}\nfrom {{ model }}\n{% if column_name is none %}\nwhere not({{ expression }})\n{%- else %}\nwhere not({{ column_name }} {{ expression }})\n{%- endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.should_store_failures"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "expression", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}], "created_at": 1783708211.4297886, "supported_languages": null}, "macro.dbt_utils.test_not_accepted_values": {"name": "test_not_accepted_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "unique_id": "macro.dbt_utils.test_not_accepted_values", "macro_sql": "{% test not_accepted_values(model, column_name, values, quote=True) %}\n {{ return(adapter.dispatch('test_not_accepted_values', 'dbt_utils')(model, column_name, values, quote)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_not_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "values", "type": null, "description": ""}, {"name": "quote", "type": null, "description": ""}], "created_at": 1783708211.4306033, "supported_languages": null}, "macro.dbt_utils.default__test_not_accepted_values": {"name": "default__test_not_accepted_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_accepted_values.sql", "original_file_path": "macros/generic_tests/not_accepted_values.sql", "unique_id": "macro.dbt_utils.default__test_not_accepted_values", "macro_sql": "{% macro default__test_not_accepted_values(model, column_name, values, quote=True) %}\nwith all_values as (\n\n select distinct\n {{ column_name }} as value_field\n\n from {{ model }}\n\n),\n\nvalidation_errors as (\n\n select\n value_field\n\n from all_values\n where value_field in (\n {% for value in values -%}\n {% if quote -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif -%}\n {%- if not loop.last -%},{%- endif %}\n {%- endfor %}\n )\n\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "values", "type": null, "description": ""}, {"name": "quote", "type": null, "description": ""}], "created_at": 1783708211.4314072, "supported_languages": null}, "macro.dbt_utils.test_relationships_where": {"name": "test_relationships_where", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "unique_id": "macro.dbt_utils.test_relationships_where", "macro_sql": "{% test relationships_where(model, column_name, to, field, from_condition=\"1=1\", to_condition=\"1=1\") %}\n {{ return(adapter.dispatch('test_relationships_where', 'dbt_utils')(model, column_name, to, field, from_condition, to_condition)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_relationships_where"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "to", "type": null, "description": ""}, {"name": "field", "type": null, "description": ""}, {"name": "from_condition", "type": null, "description": ""}, {"name": "to_condition", "type": null, "description": ""}], "created_at": 1783708211.4323423, "supported_languages": null}, "macro.dbt_utils.default__test_relationships_where": {"name": "default__test_relationships_where", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/relationships_where.sql", "original_file_path": "macros/generic_tests/relationships_where.sql", "unique_id": "macro.dbt_utils.default__test_relationships_where", "macro_sql": "{% macro default__test_relationships_where(model, column_name, to, field, from_condition=\"1=1\", to_condition=\"1=1\") %}\n\n{# T-SQL has no boolean data type so we use 1=1 which returns TRUE #}\n{# ref https://stackoverflow.com/a/7170753/3842610 #}\n\nwith left_table as (\n\n select\n {{column_name}} as id\n\n from {{model}}\n\n where {{column_name}} is not null\n and {{from_condition}}\n\n),\n\nright_table as (\n\n select\n {{field}} as id\n\n from {{to}}\n\n where {{field}} is not null\n and {{to_condition}}\n\n),\n\nexceptions as (\n\n select\n left_table.id,\n right_table.id as right_id\n\n from left_table\n\n left join right_table\n on left_table.id = right_table.id\n\n where right_table.id is null\n\n)\n\nselect * from exceptions\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "to", "type": null, "description": ""}, {"name": "field", "type": null, "description": ""}, {"name": "from_condition", "type": null, "description": ""}, {"name": "to_condition", "type": null, "description": ""}], "created_at": 1783708211.433024, "supported_languages": null}, "macro.dbt_utils.test_fewer_rows_than": {"name": "test_fewer_rows_than", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "unique_id": "macro.dbt_utils.test_fewer_rows_than", "macro_sql": "{% test fewer_rows_than(model, compare_model, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_fewer_rows_than', 'dbt_utils')(model, compare_model, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_fewer_rows_than"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "compare_model", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1783708211.4341176, "supported_languages": null}, "macro.dbt_utils.default__test_fewer_rows_than": {"name": "default__test_fewer_rows_than", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/fewer_rows_than.sql", "original_file_path": "macros/generic_tests/fewer_rows_than.sql", "unique_id": "macro.dbt_utils.default__test_fewer_rows_than", "macro_sql": "{% macro default__test_fewer_rows_than(model, compare_model, group_by_columns) %}\n\n{{ config(fail_calc = 'sum(coalesce(row_count_delta, 0))') }}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set join_gb_cols %}\n {% for c in group_by_columns %}\n and a.{{c}} = b.{{c}}\n {% endfor %}\n {% endset %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n{#-- We must add a fake join key in case additional grouping variables are not provided --#}\n{#-- Redshift does not allow for dynamically created join conditions (e.g. full join on 1 = 1 --#}\n{#-- The same logic is used in equal_rowcount. In case of changes, maintain consistent logic --#}\n{% set group_by_columns = ['id_dbtutils_test_fewer_rows_than'] + group_by_columns %}\n{% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n\n\nwith a as (\n\n select \n {{select_gb_cols}}\n 1 as id_dbtutils_test_fewer_rows_than,\n count(*) as count_our_model \n from {{ model }}\n {{ groupby_gb_cols }}\n\n),\nb as (\n\n select \n {{select_gb_cols}}\n 1 as id_dbtutils_test_fewer_rows_than,\n count(*) as count_comparison_model \n from {{ compare_model }}\n {{ groupby_gb_cols }}\n\n),\ncounts as (\n\n select\n\n {% for c in group_by_columns -%}\n a.{{c}} as {{c}}_a,\n b.{{c}} as {{c}}_b,\n {% endfor %}\n\n count_our_model,\n count_comparison_model\n from a\n full join b on \n a.id_dbtutils_test_fewer_rows_than = b.id_dbtutils_test_fewer_rows_than\n {{ join_gb_cols }}\n\n),\nfinal as (\n\n select *,\n case\n -- fail the test if we have more rows than the reference model and return the row count delta\n when count_our_model > count_comparison_model then (count_our_model - count_comparison_model)\n -- fail the test if they are the same number\n when count_our_model = count_comparison_model then 1\n -- pass the test if the delta is positive (i.e. return the number 0)\n else 0\n end as row_count_delta\n from counts\n\n)\n\nselect * from final\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "compare_model", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1783708211.4362774, "supported_languages": null}, "macro.dbt_utils.test_equal_rowcount": {"name": "test_equal_rowcount", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "unique_id": "macro.dbt_utils.test_equal_rowcount", "macro_sql": "{% test equal_rowcount(model, compare_model, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_equal_rowcount', 'dbt_utils')(model, compare_model, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_equal_rowcount"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "compare_model", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1783708211.437428, "supported_languages": null}, "macro.dbt_utils.default__test_equal_rowcount": {"name": "default__test_equal_rowcount", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/equal_rowcount.sql", "original_file_path": "macros/generic_tests/equal_rowcount.sql", "unique_id": "macro.dbt_utils.default__test_equal_rowcount", "macro_sql": "{% macro default__test_equal_rowcount(model, compare_model, group_by_columns) %}\n\n{#-- Needs to be set at parse time, before we return '' below --#}\n{{ config(fail_calc = 'sum(coalesce(diff_count, 0))') }}\n\n{#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n{%- if not execute -%}\n {{ return('') }}\n{% endif %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(', ') + ', ' %}\n {% set join_gb_cols %}\n {% for c in group_by_columns %}\n and a.{{c}} = b.{{c}}\n {% endfor %}\n {% endset %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n{#-- We must add a fake join key in case additional grouping variables are not provided --#}\n{#-- Redshift does not allow for dynamically created join conditions (e.g. full join on 1 = 1 --#}\n{#-- The same logic is used in fewer_rows_than. In case of changes, maintain consistent logic --#}\n{% set group_by_columns = ['id_dbtutils_test_equal_rowcount'] + group_by_columns %}\n{% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n\nwith a as (\n\n select \n {{select_gb_cols}}\n 1 as id_dbtutils_test_equal_rowcount,\n count(*) as count_a \n from {{ model }}\n {{groupby_gb_cols}}\n\n\n),\nb as (\n\n select \n {{select_gb_cols}}\n 1 as id_dbtutils_test_equal_rowcount,\n count(*) as count_b \n from {{ compare_model }}\n {{groupby_gb_cols}}\n\n),\nfinal as (\n\n select\n \n {% for c in group_by_columns -%}\n a.{{c}} as {{c}}_a,\n b.{{c}} as {{c}}_b,\n {% endfor %}\n\n count_a,\n count_b,\n abs(count_a - count_b) as diff_count\n\n from a\n full join b\n on\n a.id_dbtutils_test_equal_rowcount = b.id_dbtutils_test_equal_rowcount\n {{join_gb_cols}}\n\n\n)\n\nselect * from final\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "compare_model", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1783708211.43964, "supported_languages": null}, "macro.dbt_utils.test_not_empty_string": {"name": "test_not_empty_string", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_empty_string.sql", "original_file_path": "macros/generic_tests/not_empty_string.sql", "unique_id": "macro.dbt_utils.test_not_empty_string", "macro_sql": "{% test not_empty_string(model, column_name, trim_whitespace=true) %}\n\n {{ return(adapter.dispatch('test_not_empty_string', 'dbt_utils')(model, column_name, trim_whitespace)) }}\n\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_not_empty_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "trim_whitespace", "type": null, "description": ""}], "created_at": 1783708211.440401, "supported_languages": null}, "macro.dbt_utils.default__test_not_empty_string": {"name": "default__test_not_empty_string", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_empty_string.sql", "original_file_path": "macros/generic_tests/not_empty_string.sql", "unique_id": "macro.dbt_utils.default__test_not_empty_string", "macro_sql": "{% macro default__test_not_empty_string(model, column_name, trim_whitespace=true) %}\n\n with\n \n all_values as (\n\n select \n\n\n {% if trim_whitespace == true -%}\n\n trim({{ column_name }}) as {{ column_name }}\n\n {%- else -%}\n\n {{ column_name }}\n\n {%- endif %}\n \n from {{ model }}\n\n ),\n\n errors as (\n\n select * from all_values\n where {{ column_name }} = ''\n\n )\n\n select * from errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "trim_whitespace", "type": null, "description": ""}], "created_at": 1783708211.4410057, "supported_languages": null}, "macro.dbt_utils.test_cardinality_equality": {"name": "test_cardinality_equality", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "unique_id": "macro.dbt_utils.test_cardinality_equality", "macro_sql": "{% test cardinality_equality(model, column_name, to, field) %}\n {{ return(adapter.dispatch('test_cardinality_equality', 'dbt_utils')(model, column_name, to, field)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_cardinality_equality"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "to", "type": null, "description": ""}, {"name": "field", "type": null, "description": ""}], "created_at": 1783708211.4417713, "supported_languages": null}, "macro.dbt_utils.default__test_cardinality_equality": {"name": "default__test_cardinality_equality", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/cardinality_equality.sql", "original_file_path": "macros/generic_tests/cardinality_equality.sql", "unique_id": "macro.dbt_utils.default__test_cardinality_equality", "macro_sql": "{% macro default__test_cardinality_equality(model, column_name, to, field) %}\n\n{# T-SQL does not let you use numbers as aliases for columns #}\n{# Thus, no \"GROUP BY 1\" #}\n\nwith table_a as (\nselect\n {{ column_name }},\n count(*) as num_rows\nfrom {{ model }}\ngroup by {{ column_name }}\n),\n\ntable_b as (\nselect\n {{ field }},\n count(*) as num_rows\nfrom {{ to }}\ngroup by {{ field }}\n),\n\nexcept_a as (\n select *\n from table_a\n {{ dbt.except() }}\n select *\n from table_b\n),\n\nexcept_b as (\n select *\n from table_b\n {{ dbt.except() }}\n select *\n from table_a\n),\n\nunioned as (\n select *\n from except_a\n union all\n select *\n from except_b\n)\n\nselect *\nfrom unioned\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "to", "type": null, "description": ""}, {"name": "field", "type": null, "description": ""}], "created_at": 1783708211.4424942, "supported_languages": null}, "macro.dbt_utils.test_sequential_values": {"name": "test_sequential_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "unique_id": "macro.dbt_utils.test_sequential_values", "macro_sql": "{% test sequential_values(model, column_name, interval=1, datepart=None, group_by_columns = []) %}\n\n {{ return(adapter.dispatch('test_sequential_values', 'dbt_utils')(model, column_name, interval, datepart, group_by_columns)) }}\n\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_sequential_values"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1783708211.4435582, "supported_languages": null}, "macro.dbt_utils.default__test_sequential_values": {"name": "default__test_sequential_values", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/sequential_values.sql", "original_file_path": "macros/generic_tests/sequential_values.sql", "unique_id": "macro.dbt_utils.default__test_sequential_values", "macro_sql": "{% macro default__test_sequential_values(model, column_name, interval=1, datepart=None, group_by_columns = []) %}\n\n{% set previous_column_name = \"previous_\" ~ dbt_utils.slugify(column_name) %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(',') + ', ' %}\n {% set partition_gb_cols = 'partition by ' + group_by_columns|join(',') %}\n{% endif %}\n\nwith windowed as (\n\n select\n {{ select_gb_cols }}\n {{ column_name }},\n lag({{ column_name }}) over (\n {{partition_gb_cols}}\n order by {{ column_name }}\n ) as {{ previous_column_name }}\n from {{ model }}\n),\n\nvalidation_errors as (\n select\n *\n from windowed\n {% if datepart %}\n where not(cast({{ column_name }} as {{ dbt.type_timestamp() }})= cast({{ dbt.dateadd(datepart, interval, previous_column_name) }} as {{ dbt.type_timestamp() }}))\n {% else %}\n where not({{ column_name }} = {{ previous_column_name }} + {{ interval }})\n {% endif %}\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.slugify", "macro.dbt.type_timestamp", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1783708211.4454288, "supported_languages": null}, "macro.dbt_utils.test_recency": {"name": "test_recency", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "unique_id": "macro.dbt_utils.test_recency", "macro_sql": "{% test recency(model, field, datepart, interval, ignore_time_component=False, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_recency', 'dbt_utils')(model, field, datepart, interval, ignore_time_component, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_recency"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "field", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "ignore_time_component", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1783708211.446499, "supported_languages": null}, "macro.dbt_utils.default__test_recency": {"name": "default__test_recency", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/recency.sql", "original_file_path": "macros/generic_tests/recency.sql", "unique_id": "macro.dbt_utils.default__test_recency", "macro_sql": "{% macro default__test_recency(model, field, datepart, interval, ignore_time_component, group_by_columns) %}\n\n{% set empty_invocation = flags.EMPTY is defined and flags.EMPTY %}\n\n{% set threshold = 'cast(' ~ dbt.dateadd(datepart, interval * -1, dbt.current_timestamp()) ~ ' as ' ~ ('date' if ignore_time_component else dbt.type_timestamp()) ~ ')' %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n\nwith recency as (\n\n select \n\n {{ select_gb_cols }}\n {% if ignore_time_component %}\n cast(max({{ field }}) as date) as most_recent\n {%- else %}\n max({{ field }}) as most_recent\n {%- endif %}\n\n from {{ model }}\n\n {{ groupby_gb_cols }}\n\n)\n\nselect\n\n {{ select_gb_cols }}\n most_recent,\n {{ threshold }} as threshold\n\nfrom recency\nwhere most_recent < {{ threshold }}\n{%- if not empty_invocation %}\n or most_recent is null\n{%- endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.current_timestamp", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "field", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "ignore_time_component", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1783708211.4485295, "supported_languages": null}, "macro.dbt_utils.test_equality": {"name": "test_equality", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "unique_id": "macro.dbt_utils.test_equality", "macro_sql": "{% test equality(model, compare_model, compare_columns=None, exclude_columns=None, precision = None) %}\n {{ return(adapter.dispatch('test_equality', 'dbt_utils')(model, compare_model, compare_columns, exclude_columns, precision)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_equality"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "compare_model", "type": null, "description": ""}, {"name": "compare_columns", "type": null, "description": ""}, {"name": "exclude_columns", "type": null, "description": ""}, {"name": "precision", "type": null, "description": ""}], "created_at": 1783708211.4507277, "supported_languages": null}, "macro.dbt_utils.default__test_equality": {"name": "default__test_equality", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/equality.sql", "original_file_path": "macros/generic_tests/equality.sql", "unique_id": "macro.dbt_utils.default__test_equality", "macro_sql": "{% macro default__test_equality(model, compare_model, compare_columns=None, exclude_columns=None, precision = None) %}\n\n{%- if compare_columns and exclude_columns -%}\n {{ exceptions.raise_compiler_error(\"Both a compare and an ignore list were provided to the `equality` macro. Only one is allowed\") }}\n{%- endif -%}\n\n{% set set_diff %}\n count(*) + coalesce(abs(\n sum(case when which_diff = 'a_minus_b' then 1 else 0 end) -\n sum(case when which_diff = 'b_minus_a' then 1 else 0 end)\n ), 0)\n{% endset %}\n\n{#-- Needs to be set at parse time, before we return '' below --#}\n{{ config(fail_calc = set_diff) }}\n\n{#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n{%- if not execute -%}\n {{ return('') }}\n{% endif %}\n\n\n\n-- setup\n{%- do dbt_utils._is_relation(model, 'test_equality') -%}\n\n{# Ensure there are no extra columns in the compare_model vs model #}\n{%- if not compare_columns -%}\n {%- do dbt_utils._is_ephemeral(model, 'test_equality') -%}\n {%- do dbt_utils._is_ephemeral(compare_model, 'test_equality') -%}\n\n {%- set model_columns = adapter.get_columns_in_relation(model) -%}\n {%- set compare_model_columns = adapter.get_columns_in_relation(compare_model) -%}\n\n\n {%- if exclude_columns -%}\n {#-- Lower case ignore columns for easier comparison --#}\n {%- set exclude_columns = exclude_columns | map(\"lower\") | list %}\n\n {# Filter out the excluded columns #}\n {%- set include_columns = [] %}\n {%- set include_model_columns = [] %}\n {%- for column in model_columns -%}\n {%- if column.name | lower not in exclude_columns -%}\n {% do include_columns.append(column) %}\n {%- endif %}\n {%- endfor %}\n {%- for column in compare_model_columns -%}\n {%- if column.name | lower not in exclude_columns -%}\n {% do include_model_columns.append(column) %}\n {%- endif %}\n {%- endfor %}\n\n {%- set compare_columns_set = set(include_columns | map(attribute='quoted') | map(\"lower\")) %}\n {%- set compare_model_columns_set = set(include_model_columns | map(attribute='quoted') | map(\"lower\")) %}\n {%- else -%}\n {%- set compare_columns_set = set(model_columns | map(attribute='quoted') | map(\"lower\")) %}\n {%- set compare_model_columns_set = set(compare_model_columns | map(attribute='quoted') | map(\"lower\")) %}\n {%- endif -%}\n\n {% if compare_columns_set != compare_model_columns_set %}\n {{ exceptions.raise_compiler_error(compare_model ~\" has less columns than \" ~ model ~ \", please ensure they have the same columns or use the `compare_columns` or `exclude_columns` arguments to subset them.\") }}\n {% endif %}\n\n\n{% endif %}\n\n{%- if not precision -%}\n {%- if not compare_columns -%}\n {# \n You cannot get the columns in an ephemeral model (due to not existing in the information schema),\n so if the user does not provide an explicit list of columns we must error in the case it is ephemeral\n #}\n {%- do dbt_utils._is_ephemeral(model, 'test_equality') -%}\n {%- set compare_columns = adapter.get_columns_in_relation(model)-%}\n\n {%- if exclude_columns -%}\n {#-- Lower case ignore columns for easier comparison --#}\n {%- set exclude_columns = exclude_columns | map(\"lower\") | list %}\n\n {# Filter out the excluded columns #}\n {%- set include_columns = [] %}\n {%- for column in compare_columns -%}\n {%- if column.name | lower not in exclude_columns -%}\n {% do include_columns.append(column) %}\n {%- endif %}\n {%- endfor %}\n\n {%- set compare_columns = include_columns | map(attribute='quoted') %}\n {%- else -%} {# Compare columns provided #}\n {%- set compare_columns = compare_columns | map(attribute='quoted') %}\n {%- endif -%}\n {%- endif -%}\n\n {% set compare_cols_csv = compare_columns | join(', ') %}\n\n{% else %} {# Precision required #}\n {#-\n If rounding is required, we need to get the types, so it cannot be ephemeral even if they provide column names\n -#}\n {%- do dbt_utils._is_ephemeral(model, 'test_equality') -%}\n {%- set columns = adapter.get_columns_in_relation(model) -%}\n\n {% set columns_list = [] %}\n {%- for col in columns -%}\n {%- if (\n (col.name|lower in compare_columns|map('lower') or not compare_columns) and\n (col.name|lower not in exclude_columns|map('lower') or not exclude_columns)\n ) -%}\n {# Databricks double type is not picked up by any number type checks in dbt #}\n {%- if col.is_float() or col.is_numeric() or col.data_type == 'double' -%}\n {# Cast is required due to postgres not having round for a double precision number #}\n {%- do columns_list.append('round(cast(' ~ col.quoted ~ ' as ' ~ dbt.type_numeric() ~ '),' ~ precision ~ ') as ' ~ col.quoted) -%}\n {%- else -%} {# Non-numeric type #}\n {%- do columns_list.append(col.quoted) -%}\n {%- endif -%}\n {% endif %}\n {%- endfor -%}\n\n {% set compare_cols_csv = columns_list | join(', ') %}\n\n{% endif %}\n\nwith a as (\n\n select * from {{ model }}\n\n),\n\nb as (\n\n select * from {{ compare_model }}\n\n),\n\na_minus_b as (\n\n select {{compare_cols_csv}} from a\n {{ dbt.except() }}\n select {{compare_cols_csv}} from b\n\n),\n\nb_minus_a as (\n\n select {{compare_cols_csv}} from b\n {{ dbt.except() }}\n select {{compare_cols_csv}} from a\n\n),\n\nunioned as (\n\n select 'a_minus_b' as which_diff, a_minus_b.* from a_minus_b\n union all\n select 'b_minus_a' as which_diff, b_minus_a.* from b_minus_a\n\n)\n\nselect * from unioned\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.type_numeric", "macro.dbt.except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "compare_model", "type": null, "description": ""}, {"name": "compare_columns", "type": null, "description": ""}, {"name": "exclude_columns", "type": null, "description": ""}, {"name": "precision", "type": null, "description": ""}], "created_at": 1783708211.4585044, "supported_languages": null}, "macro.dbt_utils.test_unique_combination_of_columns": {"name": "test_unique_combination_of_columns", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "unique_id": "macro.dbt_utils.test_unique_combination_of_columns", "macro_sql": "{% test unique_combination_of_columns(model, combination_of_columns, quote_columns=false) %}\n {{ return(adapter.dispatch('test_unique_combination_of_columns', 'dbt_utils')(model, combination_of_columns, quote_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_unique_combination_of_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "combination_of_columns", "type": null, "description": ""}, {"name": "quote_columns", "type": null, "description": ""}], "created_at": 1783708211.459394, "supported_languages": null}, "macro.dbt_utils.default__test_unique_combination_of_columns": {"name": "default__test_unique_combination_of_columns", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/unique_combination_of_columns.sql", "original_file_path": "macros/generic_tests/unique_combination_of_columns.sql", "unique_id": "macro.dbt_utils.default__test_unique_combination_of_columns", "macro_sql": "{% macro default__test_unique_combination_of_columns(model, combination_of_columns, quote_columns=false) %}\n\n{% if not quote_columns %}\n {%- set column_list=combination_of_columns %}\n{% elif quote_columns %}\n {%- set column_list=[] %}\n {% for column in combination_of_columns -%}\n {% do column_list.append( adapter.quote(column) ) %}\n {%- endfor %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`quote_columns` argument for unique_combination_of_columns test must be one of [True, False] Got: '\" ~ quote ~\"'.'\"\n ) }}\n{% endif %}\n\n{%- set columns_csv=column_list | join(', ') %}\n\n\nwith validation_errors as (\n\n select\n {{ columns_csv }}\n from {{ model }}\n group by {{ columns_csv }}\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "combination_of_columns", "type": null, "description": ""}, {"name": "quote_columns", "type": null, "description": ""}], "created_at": 1783708211.4606485, "supported_languages": null}, "macro.dbt_utils.test_accepted_range": {"name": "test_accepted_range", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "unique_id": "macro.dbt_utils.test_accepted_range", "macro_sql": "{% test accepted_range(model, column_name, min_value=none, max_value=none, inclusive=true) %}\n {{ return(adapter.dispatch('test_accepted_range', 'dbt_utils')(model, column_name, min_value, max_value, inclusive)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_accepted_range"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "min_value", "type": null, "description": ""}, {"name": "max_value", "type": null, "description": ""}, {"name": "inclusive", "type": null, "description": ""}], "created_at": 1783708211.461572, "supported_languages": null}, "macro.dbt_utils.default__test_accepted_range": {"name": "default__test_accepted_range", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/accepted_range.sql", "original_file_path": "macros/generic_tests/accepted_range.sql", "unique_id": "macro.dbt_utils.default__test_accepted_range", "macro_sql": "{% macro default__test_accepted_range(model, column_name, min_value=none, max_value=none, inclusive=true) %}\n\nwith meet_condition as(\n select *\n from {{ model }}\n),\n\nvalidation_errors as (\n select *\n from meet_condition\n where\n -- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds\n 1 = 2\n\n {%- if min_value is not none %}\n -- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule.\n or not {{ column_name }} > {{- \"=\" if inclusive }} {{ min_value }}\n {%- endif %}\n\n {%- if max_value is not none %}\n -- records with a value <= max_value are permitted. The `not` flips this to find records that don't meet the rule.\n or not {{ column_name }} < {{- \"=\" if inclusive }} {{ max_value }}\n {%- endif %}\n)\n\nselect *\nfrom validation_errors\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "min_value", "type": null, "description": ""}, {"name": "max_value", "type": null, "description": ""}, {"name": "inclusive", "type": null, "description": ""}], "created_at": 1783708211.4625235, "supported_languages": null}, "macro.dbt_utils.test_not_constant": {"name": "test_not_constant", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "unique_id": "macro.dbt_utils.test_not_constant", "macro_sql": "{% test not_constant(model, column_name, group_by_columns = []) %}\n {{ return(adapter.dispatch('test_not_constant', 'dbt_utils')(model, column_name, group_by_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_not_constant"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1783708211.4633198, "supported_languages": null}, "macro.dbt_utils.default__test_not_constant": {"name": "default__test_not_constant", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/generic_tests/not_constant.sql", "original_file_path": "macros/generic_tests/not_constant.sql", "unique_id": "macro.dbt_utils.default__test_not_constant", "macro_sql": "{% macro default__test_not_constant(model, column_name, group_by_columns) %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n\nselect\n {# In TSQL, subquery aggregate columns need aliases #}\n {# thus: a filler col name, 'filler_column' #}\n {{select_gb_cols}}\n count(distinct {{ column_name }}) as filler_column\n\nfrom {{ model }}\n\n {{groupby_gb_cols}}\n\nhaving count(distinct {{ column_name }}) = 1\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "model", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}, {"name": "group_by_columns", "type": null, "description": ""}], "created_at": 1783708211.464242, "supported_languages": null}, "macro.dbt_utils.get_url_path": {"name": "get_url_path", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "unique_id": "macro.dbt_utils.get_url_path", "macro_sql": "{% macro get_url_path(field) -%}\n {{ return(adapter.dispatch('get_url_path', 'dbt_utils')(field)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_url_path"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1783708211.4648876, "supported_languages": null}, "macro.dbt_utils.default__get_url_path": {"name": "default__get_url_path", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_path.sql", "original_file_path": "macros/web/get_url_path.sql", "unique_id": "macro.dbt_utils.default__get_url_path", "macro_sql": "{% macro default__get_url_path(field) -%}\n\n {%- set stripped_url =\n dbt.replace(\n dbt.replace(field, \"'http://'\", \"''\"), \"'https://'\", \"''\")\n -%}\n\n {%- set first_slash_pos -%}\n coalesce(\n nullif({{ dbt.position(\"'/'\", stripped_url) }}, 0),\n {{ dbt.position(\"'?'\", stripped_url) }} - 1\n )\n {%- endset -%}\n\n {%- set parsed_path =\n dbt.split_part(\n dbt.right(\n stripped_url,\n dbt.length(stripped_url) ~ \"-\" ~ first_slash_pos\n ),\n \"'?'\", 1\n )\n -%}\n\n {{ dbt.safe_cast(\n parsed_path,\n dbt.type_string()\n )}}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.replace", "macro.dbt.position", "macro.dbt.split_part", "macro.dbt.right", "macro.dbt.length", "macro.dbt.safe_cast", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1783708211.4661686, "supported_languages": null}, "macro.dbt_utils.get_url_host": {"name": "get_url_host", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "unique_id": "macro.dbt_utils.get_url_host", "macro_sql": "{% macro get_url_host(field) -%}\n {{ return(adapter.dispatch('get_url_host', 'dbt_utils')(field)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_url_host"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1783708211.466745, "supported_languages": null}, "macro.dbt_utils.default__get_url_host": {"name": "default__get_url_host", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_host.sql", "original_file_path": "macros/web/get_url_host.sql", "unique_id": "macro.dbt_utils.default__get_url_host", "macro_sql": "{% macro default__get_url_host(field) -%}\n\n{%- set parsed =\n dbt.split_part(\n dbt.split_part(\n dbt.replace(\n dbt.replace(\n dbt.replace(field, \"'android-app://'\", \"''\"\n ), \"'http://'\", \"''\"\n ), \"'https://'\", \"''\"\n ), \"'/'\", 1\n ), \"'?'\", 1\n )\n\n-%}\n\n\n {{ dbt.safe_cast(\n parsed,\n dbt.type_string()\n )}}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.split_part", "macro.dbt.replace", "macro.dbt.safe_cast", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}], "created_at": 1783708211.4676564, "supported_languages": null}, "macro.dbt_utils.get_url_parameter": {"name": "get_url_parameter", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "unique_id": "macro.dbt_utils.get_url_parameter", "macro_sql": "{% macro get_url_parameter(field, url_parameter) -%}\n {{ return(adapter.dispatch('get_url_parameter', 'dbt_utils')(field, url_parameter)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.4682782, "supported_languages": null}, "macro.dbt_utils.default__get_url_parameter": {"name": "default__get_url_parameter", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/web/get_url_parameter.sql", "original_file_path": "macros/web/get_url_parameter.sql", "unique_id": "macro.dbt_utils.default__get_url_parameter", "macro_sql": "{% macro default__get_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"='\" -%}\n\n{%- set split = dbt.split_part(dbt.split_part(field, formatted_url_parameter, 2), \"'&'\", 1) -%}\n\nnullif({{ split }},'')\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.split_part"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.4689221, "supported_languages": null}, "macro.dbt_utils.pretty_time": {"name": "pretty_time", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "unique_id": "macro.dbt_utils.pretty_time", "macro_sql": "{% macro pretty_time(format='%H:%M:%S') %}\n {{ return(adapter.dispatch('pretty_time', 'dbt_utils')(format)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "format", "type": null, "description": ""}], "created_at": 1783708211.4695053, "supported_languages": null}, "macro.dbt_utils.default__pretty_time": {"name": "default__pretty_time", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/pretty_time.sql", "original_file_path": "macros/jinja_helpers/pretty_time.sql", "unique_id": "macro.dbt_utils.default__pretty_time", "macro_sql": "{% macro default__pretty_time(format='%H:%M:%S') %}\n {{ return(modules.datetime.datetime.now().strftime(format)) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "format", "type": null, "description": ""}], "created_at": 1783708211.4699893, "supported_languages": null}, "macro.dbt_utils.log_info": {"name": "log_info", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "unique_id": "macro.dbt_utils.log_info", "macro_sql": "{% macro log_info(message) %}\n {{ return(adapter.dispatch('log_info', 'dbt_utils')(message)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__log_info"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "message", "type": null, "description": ""}], "created_at": 1783708211.4705184, "supported_languages": null}, "macro.dbt_utils.default__log_info": {"name": "default__log_info", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/log_info.sql", "original_file_path": "macros/jinja_helpers/log_info.sql", "unique_id": "macro.dbt_utils.default__log_info", "macro_sql": "{% macro default__log_info(message) %}\n {{ log(dbt_utils.pretty_log_format(message), info=True) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "message", "type": null, "description": ""}], "created_at": 1783708211.4708722, "supported_languages": null}, "macro.dbt_utils._is_ephemeral": {"name": "_is_ephemeral", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/_is_ephemeral.sql", "original_file_path": "macros/jinja_helpers/_is_ephemeral.sql", "unique_id": "macro.dbt_utils._is_ephemeral", "macro_sql": "{% macro _is_ephemeral(obj, macro) %}\n {%- if obj.is_cte -%}\n {% set ephemeral_prefix = api.Relation.add_ephemeral_prefix('') %}\n {% if obj.name.startswith(ephemeral_prefix) %}\n {% set model_name = obj.name[(ephemeral_prefix|length):] %}\n {% else %}\n {% set model_name = obj.name %}\n {%- endif -%}\n {% set error_message %}\nThe `{{ macro }}` macro cannot be used with ephemeral models, as it relies on the information schema.\n\n`{{ model_name }}` is an ephemeral model. Consider making it a view or table instead.\n {% endset %}\n {%- do exceptions.raise_compiler_error(error_message) -%}\n {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "obj", "type": null, "description": ""}, {"name": "macro", "type": null, "description": ""}], "created_at": 1783708211.4723866, "supported_languages": null}, "macro.dbt_utils.pretty_log_format": {"name": "pretty_log_format", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "unique_id": "macro.dbt_utils.pretty_log_format", "macro_sql": "{% macro pretty_log_format(message) %}\n {{ return(adapter.dispatch('pretty_log_format', 'dbt_utils')(message)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__pretty_log_format"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "message", "type": null, "description": ""}], "created_at": 1783708211.47294, "supported_languages": null}, "macro.dbt_utils.default__pretty_log_format": {"name": "default__pretty_log_format", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/pretty_log_format.sql", "original_file_path": "macros/jinja_helpers/pretty_log_format.sql", "unique_id": "macro.dbt_utils.default__pretty_log_format", "macro_sql": "{% macro default__pretty_log_format(message) %}\n {{ return( dbt_utils.pretty_time() ~ ' + ' ~ message) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.pretty_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "message", "type": null, "description": ""}], "created_at": 1783708211.473308, "supported_languages": null}, "macro.dbt_utils._is_relation": {"name": "_is_relation", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/_is_relation.sql", "original_file_path": "macros/jinja_helpers/_is_relation.sql", "unique_id": "macro.dbt_utils._is_relation", "macro_sql": "{% macro _is_relation(obj, macro) %}\n {%- if not (obj is mapping and obj.get('metadata', {}).get('type', '').endswith('Relation')) -%}\n {%- do exceptions.raise_compiler_error(\"Macro \" ~ macro ~ \" expected a Relation but received the value: \" ~ obj) -%}\n {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "obj", "type": null, "description": ""}, {"name": "macro", "type": null, "description": ""}], "created_at": 1783708211.4741886, "supported_languages": null}, "macro.dbt_utils.slugify": {"name": "slugify", "resource_type": "macro", "package_name": "dbt_utils", "path": "macros/jinja_helpers/slugify.sql", "original_file_path": "macros/jinja_helpers/slugify.sql", "unique_id": "macro.dbt_utils.slugify", "macro_sql": "{% macro slugify(string) %}\n\n{% if not string %}\n{{ return('') }}\n{% endif %}\n\n{#- Lower case the string -#}\n{% set string = string | lower %}\n{#- Replace spaces and dashes with underscores -#}\n{% set string = modules.re.sub('[ -]+', '_', string) %}\n{#- Only take letters, numbers, and underscores -#}\n{% set string = modules.re.sub('[^a-z0-9_]+', '', string) %}\n{#- Prepends \"_\" if string begins with a number -#}\n{% set string = modules.re.sub('^[0-9]', '_' + string[0], string) %}\n\n{{ return(string) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}], "created_at": 1783708211.4756546, "supported_languages": null}, "macro.twitter_ads.twitter_ads_persist_pass_through_columns": {"name": "twitter_ads_persist_pass_through_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/twitter_ads_persist_pass_through_columns.sql", "original_file_path": "macros/twitter_ads_persist_pass_through_columns.sql", "unique_id": "macro.twitter_ads.twitter_ads_persist_pass_through_columns", "macro_sql": "{% macro twitter_ads_persist_pass_through_columns(pass_through_variable, identifier=none, transform='', coalesce_with=none, except_variable=none, exclude_fields=[]) %}\n\n{% set except_fields = [] %}\n{% if except_variable is not none %}\n {# Start creating list of fields to exclude #}\n {% for item in var(except_variable) %}\n {% do except_fields.append(item.name) %}\n {% endfor %}\n{% endif %}\n\n{% for field in exclude_fields %}\n {% do except_fields.append(field) %}\n{% endfor %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n {% if field not in except_fields %}\n , {{ transform ~ '(' ~ ('coalesce(' if coalesce_with is not none else '') ~ (identifier ~ '.' if identifier else '') ~ field ~ ((', ' ~ coalesce_with ~ ')') if coalesce_with is not none else '') ~ ')' }} as {{ field }}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "transform", "type": null, "description": ""}, {"name": "coalesce_with", "type": null, "description": ""}, {"name": "except_variable", "type": null, "description": ""}, {"name": "exclude_fields", "type": null, "description": ""}], "created_at": 1783708211.4782047, "supported_languages": null}, "macro.twitter_ads.get_account_history_columns": {"name": "get_account_history_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/staging_columns.sql", "original_file_path": "macros/staging/staging_columns.sql", "unique_id": "macro.twitter_ads.get_account_history_columns", "macro_sql": "{% macro get_account_history_columns() %}\n\n{% set columns = [\n {\"name\": \"approval_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"business_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"business_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"industry_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"salt\", \"datatype\": dbt.type_string()},\n {\"name\": \"timezone\", \"datatype\": dbt.type_string()},\n {\"name\": \"timezone_switch_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.4823692, "supported_languages": null}, "macro.twitter_ads.get_campaign_history_columns": {"name": "get_campaign_history_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/staging_columns.sql", "original_file_path": "macros/staging/staging_columns.sql", "unique_id": "macro.twitter_ads.get_campaign_history_columns", "macro_sql": "{% macro get_campaign_history_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"daily_budget_amount_local_micro\", \"datatype\": dbt.type_int()},\n {\"name\": \"deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"duration_in_days\", \"datatype\": dbt.type_int()},\n {\"name\": \"end_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"entity_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"frequency_cap\", \"datatype\": dbt.type_int()},\n {\"name\": \"funding_instrument_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"servable\", \"datatype\": \"boolean\"},\n {\"name\": \"standard_delivery\", \"datatype\": \"boolean\"},\n {\"name\": \"start_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"total_budget_amount_local_micro\", \"datatype\": dbt.type_int()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.4854255, "supported_languages": null}, "macro.twitter_ads.get_line_item_history_columns": {"name": "get_line_item_history_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/staging_columns.sql", "original_file_path": "macros/staging/staging_columns.sql", "unique_id": "macro.twitter_ads.get_line_item_history_columns", "macro_sql": "{% macro get_line_item_history_columns() %}\n\n{% set columns = [\n {\"name\": \"advertiser_domain\", \"datatype\": dbt.type_string()},\n {\"name\": \"advertiser_user_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"automatically_select_bid\", \"datatype\": \"boolean\"},\n {\"name\": \"bid_amount_local_micro\", \"datatype\": dbt.type_int()},\n {\"name\": \"bid_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"bid_unit\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"charge_by\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"creative_source\", \"datatype\": dbt.type_string()},\n {\"name\": \"currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"end_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"entity_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"objective\", \"datatype\": dbt.type_string()},\n {\"name\": \"optimization\", \"datatype\": dbt.type_string()},\n {\"name\": \"primary_web_event_tag\", \"datatype\": dbt.type_string()},\n {\"name\": \"product_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"start_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"target_cpa_local_micro\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_budget_amount_local_micro\", \"datatype\": dbt.type_int()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.4894588, "supported_languages": null}, "macro.twitter_ads.get_promoted_tweet_history_columns": {"name": "get_promoted_tweet_history_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/staging_columns.sql", "original_file_path": "macros/staging/staging_columns.sql", "unique_id": "macro.twitter_ads.get_promoted_tweet_history_columns", "macro_sql": "{% macro get_promoted_tweet_history_columns() %}\n\n{% set columns = [\n {\"name\": \"approval_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"entity_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"line_item_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"tweet_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.4910758, "supported_languages": null}, "macro.twitter_ads.get_tweet_url_columns": {"name": "get_tweet_url_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/staging_columns.sql", "original_file_path": "macros/staging/staging_columns.sql", "unique_id": "macro.twitter_ads.get_tweet_url_columns", "macro_sql": "{% macro get_tweet_url_columns() %}\n\n{% set columns = [\n {\"name\": \"display_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"expanded_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"index\", \"datatype\": dbt.type_int()},\n {\"name\": \"indices\", \"datatype\": dbt.type_string()},\n {\"name\": \"tweet_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"url\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.4923708, "supported_languages": null}, "macro.twitter_ads.get_promoted_tweet_report_columns": {"name": "get_promoted_tweet_report_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/staging_columns.sql", "original_file_path": "macros/staging/staging_columns.sql", "unique_id": "macro.twitter_ads.get_promoted_tweet_report_columns", "macro_sql": "{% macro get_promoted_tweet_report_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"billed_charge_local_micro\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"placement\", \"datatype\": dbt.type_string()},\n {\"name\": \"promoted_tweet_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"url_clicks\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('twitter_ads__conversion_fields')) }}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('twitter_ads__conversion_sale_amount_fields')) }}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ twitter_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('twitter_ads__promoted_tweet_report_passthrough_metrics'), except_fields=(var('twitter_ads__conversion_fields') + var('twitter_ads__conversion_sale_amount_fields'))) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.fivetran_utils.add_pass_through_columns", "macro.twitter_ads.twitter_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.4946318, "supported_languages": null}, "macro.twitter_ads.get_campaign_report_columns": {"name": "get_campaign_report_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/get_campaign_report_columns.sql", "original_file_path": "macros/staging/get_campaign_report_columns.sql", "unique_id": "macro.twitter_ads.get_campaign_report_columns", "macro_sql": "{% macro get_campaign_report_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"billed_charge_local_micro\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"placement\", \"datatype\": dbt.type_string()},\n {\"name\": \"url_clicks\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('twitter_ads__conversion_fields')) }}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('twitter_ads__conversion_sale_amount_fields')) }}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ twitter_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('twitter_ads__campaign_report_passthrough_metrics'), except_fields=(var('twitter_ads__conversion_fields') + var('twitter_ads__conversion_sale_amount_fields'))) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.fivetran_utils.add_pass_through_columns", "macro.twitter_ads.twitter_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.497267, "supported_languages": null}, "macro.twitter_ads.get_campaign_locations_report_columns": {"name": "get_campaign_locations_report_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/get_campaign_locations_report_columns.sql", "original_file_path": "macros/staging/get_campaign_locations_report_columns.sql", "unique_id": "macro.twitter_ads.get_campaign_locations_report_columns", "macro_sql": "{% macro get_campaign_locations_report_columns() %}\n\n{% set columns = [\n {\"name\": \"segment_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"segment\", \"datatype\": dbt.type_string()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"billed_charge_local_micro\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"placement\", \"datatype\": dbt.type_string()},\n {\"name\": \"url_clicks\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('twitter_ads__conversion_fields')) }}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('twitter_ads__conversion_sale_amount_fields')) }}\n\n{{ twitter_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('twitter_ads__campaign_locations_report_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.fivetran_utils.add_pass_through_columns", "macro.twitter_ads.twitter_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.5000768, "supported_languages": null}, "macro.twitter_ads.get_tweet_columns": {"name": "get_tweet_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/get_tweet_columns.sql", "original_file_path": "macros/staging/get_tweet_columns.sql", "unique_id": "macro.twitter_ads.get_tweet_columns", "macro_sql": "{% macro get_tweet_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"full_text\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"lang\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.5014255, "supported_languages": null}, "macro.twitter_ads.get_campaign_regions_report_columns": {"name": "get_campaign_regions_report_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/get_campaign_regions_report_columns.sql", "original_file_path": "macros/staging/get_campaign_regions_report_columns.sql", "unique_id": "macro.twitter_ads.get_campaign_regions_report_columns", "macro_sql": "{% macro get_campaign_regions_report_columns() %}\n\n{% set columns = [\n {\"name\": \"location_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"location_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"segment\", \"datatype\": dbt.type_string()},\n {\"name\": \"segment_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"billed_charge_local_micro\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"placement\", \"datatype\": dbt.type_string()},\n {\"name\": \"url_clicks\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('twitter_ads__conversion_fields')) }}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('twitter_ads__conversion_sale_amount_fields')) }}\n\n{{ twitter_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('twitter_ads__campaign_regions_report_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.fivetran_utils.add_pass_through_columns", "macro.twitter_ads.twitter_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.504496, "supported_languages": null}, "macro.twitter_ads.twitter_ads_add_pass_through_columns": {"name": "twitter_ads_add_pass_through_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/twitter_ads_add_pass_through_columns.sql", "original_file_path": "macros/staging/twitter_ads_add_pass_through_columns.sql", "unique_id": "macro.twitter_ads.twitter_ads_add_pass_through_columns", "macro_sql": "{% macro twitter_ads_add_pass_through_columns(base_columns, pass_through_fields, except_fields=[]) %}\n\n{% if pass_through_fields %}\n {% for column in pass_through_fields %}\n\n {% if column is mapping %}\n {% set col_name = column.alias|default(column.name)|lower %}\n \n {% if col_name not in except_fields %}\n {% if column.alias %}\n {% do base_columns.append({ \"name\": column.name, \"alias\": column.alias, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% else %}\n {% do base_columns.append({ \"name\": column.name, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% else %}\n {% if column|lower not in except_fields %}\n {% do base_columns.append({ \"name\": column, \"datatype\": dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_columns", "type": null, "description": ""}, {"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except_fields", "type": null, "description": ""}], "created_at": 1783708211.5070424, "supported_languages": null}, "macro.twitter_ads.twitter_ads_fill_pass_through_columns": {"name": "twitter_ads_fill_pass_through_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/twitter_ads_fill_pass_through_columns.sql", "original_file_path": "macros/staging/twitter_ads_fill_pass_through_columns.sql", "unique_id": "macro.twitter_ads.twitter_ads_fill_pass_through_columns", "macro_sql": "{% macro twitter_ads_fill_pass_through_columns(pass_through_fields, except=[]) %}\n\n{% if pass_through_fields %}\n {% for field in pass_through_fields %}\n {% if (field.alias if field.alias else field.name) not in except %}\n {% if field.transform_sql %}\n , coalesce(cast({{ field.transform_sql }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% else %}\n , coalesce(cast({{ field.alias if field.alias else field.name }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% endif %}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}], "created_at": 1783708211.5087516, "supported_languages": null}, "macro.twitter_ads.twitter_ads_extract_url_parameter": {"name": "twitter_ads_extract_url_parameter", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/twitter_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/twitter_ads_extract_url_parameters.sql", "unique_id": "macro.twitter_ads.twitter_ads_extract_url_parameter", "macro_sql": "{% macro twitter_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ return(adapter.dispatch('twitter_ads_extract_url_parameter', 'twitter_ads') (field, url_parameter)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.twitter_ads.default__twitter_ads_extract_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.5094104, "supported_languages": null}, "macro.twitter_ads.default__twitter_ads_extract_url_parameter": {"name": "default__twitter_ads_extract_url_parameter", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/twitter_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/twitter_ads_extract_url_parameters.sql", "unique_id": "macro.twitter_ads.default__twitter_ads_extract_url_parameter", "macro_sql": "{% macro default__twitter_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ dbt_utils.get_url_parameter(field, url_parameter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.5097208, "supported_languages": null}, "macro.twitter_ads.spark__twitter_ads_extract_url_parameter": {"name": "spark__twitter_ads_extract_url_parameter", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/twitter_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/twitter_ads_extract_url_parameters.sql", "unique_id": "macro.twitter_ads.spark__twitter_ads_extract_url_parameter", "macro_sql": "{% macro spark__twitter_ads_extract_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"=([^&]+)'\" -%}\nnullif(regexp_extract({{ field }}, {{ formatted_url_parameter }}, 1), '')\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.5101485, "supported_languages": null}, "macro.twitter_ads.get_line_item_report_columns": {"name": "get_line_item_report_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/get_line_item_report_columns.sql", "original_file_path": "macros/staging/get_line_item_report_columns.sql", "unique_id": "macro.twitter_ads.get_line_item_report_columns", "macro_sql": "{% macro get_line_item_report_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"billed_charge_local_micro\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"line_item_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"placement\", \"datatype\": dbt.type_string()},\n {\"name\": \"url_clicks\", \"datatype\": dbt.type_int()},\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('twitter_ads__conversion_fields')) }}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('twitter_ads__conversion_sale_amount_fields')) }}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ twitter_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('twitter_ads__line_item_report_passthrough_metrics'), except_fields=(var('twitter_ads__conversion_fields') + var('twitter_ads__conversion_sale_amount_fields'))) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.fivetran_utils.add_pass_through_columns", "macro.twitter_ads.twitter_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.5127454, "supported_languages": null}, "macro.twitter_ads.get_line_item_keywords_report_columns": {"name": "get_line_item_keywords_report_columns", "resource_type": "macro", "package_name": "twitter_ads", "path": "macros/staging/get_line_item_keywords_report_columns.sql", "original_file_path": "macros/staging/get_line_item_keywords_report_columns.sql", "unique_id": "macro.twitter_ads.get_line_item_keywords_report_columns", "macro_sql": "{% macro get_line_item_keywords_report_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"billed_charge_local_micro\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"line_item_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"placement\", \"datatype\": dbt.type_string()},\n {\"name\": \"segment\", \"datatype\": dbt.type_string()},\n {\"name\": \"url_clicks\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('twitter_ads__conversion_fields')) }}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('twitter_ads__conversion_sale_amount_fields')) }}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ twitter_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('twitter_ads__line_item_keywords_report_passthrough_metrics'), except_fields=(var('twitter_ads__conversion_fields') + var('twitter_ads__conversion_sale_amount_fields'))) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.fivetran_utils.add_pass_through_columns", "macro.twitter_ads.twitter_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.5156455, "supported_languages": null}, "macro.fivetran_utils.try_cast": {"name": "try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.try_cast", "macro_sql": "{% macro try_cast(field, type) %}\n {{ adapter.dispatch('try_cast', 'fivetran_utils') (field, type) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__try_cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1783708211.5167007, "supported_languages": null}, "macro.fivetran_utils.default__try_cast": {"name": "default__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.default__try_cast", "macro_sql": "{% macro default__try_cast(field, type) %}\n {# most databases don't support this function yet\n so we just need to use cast #}\n cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1783708211.5169954, "supported_languages": null}, "macro.fivetran_utils.redshift__try_cast": {"name": "redshift__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.redshift__try_cast", "macro_sql": "{% macro redshift__try_cast(field, type) %}\n{%- if type == 'numeric' -%}\n\n case\n when trim({{field}}) ~ '^(0|[1-9][0-9]*)$' then trim({{field}})\n else null\n end::{{type}}\n\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"non-numeric datatypes are not currently supported\") }}\n\n{% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1783708211.5175872, "supported_languages": null}, "macro.fivetran_utils.postgres__try_cast": {"name": "postgres__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.postgres__try_cast", "macro_sql": "{% macro postgres__try_cast(field, type) %}\n{%- if type == 'numeric' -%}\n\n case\n when replace(cast({{field}} as varchar),cast(' ' as varchar),cast('' as varchar)) ~ '^(0|[1-9][0-9]*)$' \n then replace(cast({{field}} as varchar),cast(' ' as varchar),cast('' as varchar))\n else null\n end::{{type}}\n\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"non-numeric datatypes are not currently supported\") }}\n\n{% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1783708211.5182073, "supported_languages": null}, "macro.fivetran_utils.snowflake__try_cast": {"name": "snowflake__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.snowflake__try_cast", "macro_sql": "{% macro snowflake__try_cast(field, type) %}\n try_cast(cast({{field}} as varchar) as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1783708211.5184855, "supported_languages": null}, "macro.fivetran_utils.bigquery__try_cast": {"name": "bigquery__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.bigquery__try_cast", "macro_sql": "{% macro bigquery__try_cast(field, type) %}\n safe_cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1783708211.5187511, "supported_languages": null}, "macro.fivetran_utils.spark__try_cast": {"name": "spark__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.spark__try_cast", "macro_sql": "{% macro spark__try_cast(field, type) %}\n try_cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1783708211.5190177, "supported_languages": null}, "macro.fivetran_utils.sqlserver__try_cast": {"name": "sqlserver__try_cast", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/try_cast.sql", "original_file_path": "macros/try_cast.sql", "unique_id": "macro.fivetran_utils.sqlserver__try_cast", "macro_sql": "{% macro sqlserver__try_cast(field, type) %}\n try_cast({{field}} as {{type}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "type", "type": null, "description": ""}], "created_at": 1783708211.5193145, "supported_languages": null}, "macro.fivetran_utils.union_relations": {"name": "union_relations", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_relations.sql", "original_file_path": "macros/union_relations.sql", "unique_id": "macro.fivetran_utils.union_relations", "macro_sql": "{%- macro union_relations(relations, aliases=none, column_override=none, include=[], exclude=[], source_column_name=none) -%}\n\n {%- if exclude and include -%}\n {{ exceptions.raise_compiler_error(\"Both an exclude and include list were provided to the `union` macro. Only one is allowed\") }}\n {%- endif -%}\n\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. -#}\n {%- if not execute %}\n {{ return('') }}\n {% endif -%}\n\n {%- set column_override = column_override if column_override is not none else {} -%}\n {%- set source_column_name = source_column_name if source_column_name is not none else '_dbt_source_relation' -%}\n\n {%- set relation_columns = {} -%}\n {%- set column_superset = {} -%}\n\n {%- for relation in relations -%}\n\n {%- do relation_columns.update({relation: []}) -%}\n\n {%- do dbt_utils._is_relation(relation, 'union_relations') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) -%}\n {%- for col in cols -%}\n\n {#- If an exclude list was provided and the column is in the list, do nothing -#}\n {%- if exclude and col.column in exclude -%}\n\n {#- If an include list was provided and the column is not in the list, do nothing -#}\n {%- elif include and col.column not in include -%}\n\n {#- Otherwise add the column to the column superset -#}\n {%- else -%}\n\n {#- update the list of columns in this relation -#}\n {%- do relation_columns[relation].append(col.column) -%}\n\n {%- if col.column in column_superset -%}\n\n {%- set stored = column_superset[col.column] -%}\n {%- if col.is_string() and stored.is_string() and col.string_size() > stored.string_size() -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif %}\n\n {%- else -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif -%}\n\n {%- endif -%}\n\n {%- endfor -%}\n {%- endfor -%}\n\n {%- set ordered_column_names = column_superset.keys() -%}\n\n {%- for relation in relations %}\n\n (\n select\n\n cast({{ dbt.string_literal(relation) }} as {{ dbt.type_string() }}) as {{ source_column_name }},\n {% for col_name in ordered_column_names -%}\n\n {%- set col = column_superset[col_name] %}\n {%- set col_type = column_override.get(col.column, col.data_type) %}\n {%- set col_name = adapter.quote(col_name) if col_name in relation_columns[relation] else 'null' %}\n cast({{ col_name }} as {{ col_type }}) as {{ col.quoted }} {% if not loop.last %},{% endif -%}\n\n {%- endfor %}\n\n from {{ aliases[loop.index0] if aliases else relation }}\n )\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n\n {%- endfor -%}\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt.string_literal", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relations", "type": null, "description": ""}, {"name": "aliases", "type": null, "description": ""}, {"name": "column_override", "type": null, "description": ""}, {"name": "include", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "source_column_name", "type": null, "description": ""}], "created_at": 1783708211.5250463, "supported_languages": null}, "macro.fivetran_utils.union_tables": {"name": "union_tables", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_relations.sql", "original_file_path": "macros/union_relations.sql", "unique_id": "macro.fivetran_utils.union_tables", "macro_sql": "{%- macro union_tables(tables, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_table') -%}\n\n {%- do exceptions.warn(\"Warning: the `union_tables` macro is no longer supported and will be deprecated in a future release of dbt-utils. Use the `union_relations` macro instead\") -%}\n\n {{ return(dbt_utils.union_relations(tables, column_override, include, exclude, source_column_name)) }}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt_utils.union_relations"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "tables", "type": null, "description": ""}, {"name": "column_override", "type": null, "description": ""}, {"name": "include", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "source_column_name", "type": null, "description": ""}], "created_at": 1783708211.5257952, "supported_languages": null}, "macro.fivetran_utils.pivot_json_extract": {"name": "pivot_json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/pivot_json_extract.sql", "original_file_path": "macros/pivot_json_extract.sql", "unique_id": "macro.fivetran_utils.pivot_json_extract", "macro_sql": "{% macro pivot_json_extract(string, list_of_properties) %}\n\n{%- for property in list_of_properties -%}\n{%- if property is mapping -%}\nreplace( {{ fivetran_utils.json_extract(string, property.name) }}, '\"', '') as {{ property.alias if property.alias else property.name | replace(' ', '_') | replace('.', '_') | lower }}\n\n{%- else -%}\nreplace( {{ fivetran_utils.json_extract(string, property) }}, '\"', '') as {{ property | replace(' ', '_') | lower }}\n\n{%- endif -%}\n{%- if not loop.last -%},{%- endif %}\n{% endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.json_extract"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "list_of_properties", "type": null, "description": ""}], "created_at": 1783708211.5272958, "supported_languages": null}, "macro.fivetran_utils.calculated_fields": {"name": "calculated_fields", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/calculated_fields.sql", "original_file_path": "macros/calculated_fields.sql", "unique_id": "macro.fivetran_utils.calculated_fields", "macro_sql": "{% macro calculated_fields(variable) -%}\n\n{% if var(variable, none) %}\n {% for field in var(variable) %}\n , {{ field.transform_sql }} as {{ field.name }} \n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "variable", "type": null, "description": ""}], "created_at": 1783708211.5280159, "supported_languages": null}, "macro.fivetran_utils.collect_freshness": {"name": "collect_freshness", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/collect_freshness.sql", "original_file_path": "macros/collect_freshness.sql", "unique_id": "macro.fivetran_utils.collect_freshness", "macro_sql": "{% macro collect_freshness(source, loaded_at_field, filter) %}\n {{ return(adapter.dispatch('collect_freshness')(source, loaded_at_field, filter))}}\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source", "type": null, "description": ""}, {"name": "loaded_at_field", "type": null, "description": ""}, {"name": "filter", "type": null, "description": ""}], "created_at": 1783708211.5289454, "supported_languages": null}, "macro.fivetran_utils.default__collect_freshness": {"name": "default__collect_freshness", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/collect_freshness.sql", "original_file_path": "macros/collect_freshness.sql", "unique_id": "macro.fivetran_utils.default__collect_freshness", "macro_sql": "{% macro default__collect_freshness(source, loaded_at_field, filter) %}\n {% call statement('collect_freshness', fetch_result=True, auto_begin=False) -%}\n\n {%- set enabled_array = [] -%}\n {% for node in graph.sources.values() %}\n {% if node.identifier == source.identifier %}\n {% if (node.meta['is_enabled'] | default(true)) %}\n {%- do enabled_array.append(1) -%}\n {% endif %}\n {% endif %}\n {% endfor %}\n {% set is_enabled = (enabled_array != []) %}\n\n select\n {% if is_enabled %}\n max({{ loaded_at_field }})\n {% else %} \n {{ current_timestamp() }} {% endif %} as max_loaded_at,\n {{ current_timestamp() }} as snapshotted_at\n\n {% if is_enabled %}\n from {{ source }}\n {% if filter %}\n where {{ filter }}\n {% endif %}\n {% endif %}\n\n {% endcall %}\n\n {% if dbt_version.split('.') | map('int') | list >= [1, 5, 0] %}\n {{ return(load_result('collect_freshness')) }}\n {% else %}\n {{ return(load_result('collect_freshness').table) }}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source", "type": null, "description": ""}, {"name": "loaded_at_field", "type": null, "description": ""}, {"name": "filter", "type": null, "description": ""}], "created_at": 1783708211.531387, "supported_languages": null}, "macro.fivetran_utils.snowflake_seed_data": {"name": "snowflake_seed_data", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/snowflake_seed_data.sql", "original_file_path": "macros/snowflake_seed_data.sql", "unique_id": "macro.fivetran_utils.snowflake_seed_data", "macro_sql": "{% macro snowflake_seed_data(seed_name) %}\n\n{% if target.type == 'snowflake' %}\n{{ return(ref(seed_name ~ '_snowflake')) }}\n{% else %}\n{{ return(ref(seed_name)) }}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "seed_name", "type": null, "description": ""}], "created_at": 1783708211.5321698, "supported_languages": null}, "macro.fivetran_utils.json_extract": {"name": "json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.json_extract", "macro_sql": "{% macro json_extract(string, string_path) -%}\n\n{{ adapter.dispatch('json_extract', 'fivetran_utils') (string, string_path) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__json_extract"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1783708211.5329347, "supported_languages": null}, "macro.fivetran_utils.default__json_extract": {"name": "default__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.default__json_extract", "macro_sql": "{% macro default__json_extract(string, string_path) %}\n\n json_extract_path_text({{string}}, {{ \"'\" ~ string_path ~ \"'\" }} )\n \n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1783708211.5332813, "supported_languages": null}, "macro.fivetran_utils.snowflake__json_extract": {"name": "snowflake__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.snowflake__json_extract", "macro_sql": "{% macro snowflake__json_extract(string, string_path) %}\n\n json_extract_path_text(try_parse_json( {{string}} ), {{ \"'\" ~ string_path ~ \"'\" }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1783708211.5336025, "supported_languages": null}, "macro.fivetran_utils.redshift__json_extract": {"name": "redshift__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.redshift__json_extract", "macro_sql": "{% macro redshift__json_extract(string, string_path) %}\n\n case when is_valid_json( {{string}} ) then json_extract_path_text({{string}}, {{ \"'\" ~ string_path ~ \"'\" }} ) else null end\n \n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1783708211.5339577, "supported_languages": null}, "macro.fivetran_utils.bigquery__json_extract": {"name": "bigquery__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.bigquery__json_extract", "macro_sql": "{% macro bigquery__json_extract(string, string_path) %}\n\n json_extract_scalar({{string}}, {{ \"'$.\" ~ string_path ~ \"'\" }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1783708211.5342991, "supported_languages": null}, "macro.fivetran_utils.postgres__json_extract": {"name": "postgres__json_extract", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_extract.sql", "original_file_path": "macros/json_extract.sql", "unique_id": "macro.fivetran_utils.postgres__json_extract", "macro_sql": "{% macro postgres__json_extract(string, string_path) %}\n\n {{string}}::json->>{{\"'\" ~ string_path ~ \"'\" }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1783708211.5346103, "supported_languages": null}, "macro.fivetran_utils.enabled_vars": {"name": "enabled_vars", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/enabled_vars.sql", "original_file_path": "macros/enabled_vars.sql", "unique_id": "macro.fivetran_utils.enabled_vars", "macro_sql": "{% macro enabled_vars(vars) %}\n\n{% for v in vars %}\n \n {% if var(v, True) == False %}\n {{ return(False) }}\n {% endif %}\n\n{% endfor %}\n\n{{ return(True) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "vars", "type": null, "description": ""}], "created_at": 1783708211.5353963, "supported_languages": null}, "macro.fivetran_utils.union_data": {"name": "union_data", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_data.sql", "original_file_path": "macros/union_data.sql", "unique_id": "macro.fivetran_utils.union_data", "macro_sql": "{%- macro union_data(table_identifier, database_variable, schema_variable, default_database, default_schema, default_variable, union_schema_variable='union_schemas', union_database_variable='union_databases') -%}\n\n{{ adapter.dispatch('union_data', 'fivetran_utils') (\n table_identifier, \n database_variable, \n schema_variable, \n default_database, \n default_schema, \n default_variable,\n union_schema_variable,\n union_database_variable\n ) }}\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.fivetran_utils.default__union_data"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_identifier", "type": null, "description": ""}, {"name": "database_variable", "type": null, "description": ""}, {"name": "schema_variable", "type": null, "description": ""}, {"name": "default_database", "type": null, "description": ""}, {"name": "default_schema", "type": null, "description": ""}, {"name": "default_variable", "type": null, "description": ""}, {"name": "union_schema_variable", "type": null, "description": ""}, {"name": "union_database_variable", "type": null, "description": ""}], "created_at": 1783708211.5375853, "supported_languages": null}, "macro.fivetran_utils.default__union_data": {"name": "default__union_data", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_data.sql", "original_file_path": "macros/union_data.sql", "unique_id": "macro.fivetran_utils.default__union_data", "macro_sql": "{%- macro default__union_data(\n table_identifier, \n database_variable, \n schema_variable, \n default_database, \n default_schema, \n default_variable,\n union_schema_variable,\n union_database_variable\n ) -%}\n\n{%- if var(union_schema_variable, none) -%}\n\n {%- set relations = [] -%}\n \n {%- if var(union_schema_variable) is string -%}\n {%- set trimmed = var(union_schema_variable)|trim('[')|trim(']') -%}\n {%- set schemas = trimmed.split(',')|map('trim',\" \")|map('trim','\"')|map('trim',\"'\") -%}\n {%- else -%}\n {%- set schemas = var(union_schema_variable) -%}\n {%- endif -%}\n\n {%- for schema in var(union_schema_variable) -%}\n {%- set relation=adapter.get_relation(\n database=source(schema, table_identifier).database if var('has_defined_sources', false) else var(database_variable, default_database),\n schema=source(schema, table_identifier).schema if var('has_defined_sources', false) else schema,\n identifier=source(schema, table_identifier).identifier if var('has_defined_sources', false) else table_identifier\n ) -%}\n \n {%- set relation_exists=relation is not none -%}\n\n {%- if relation_exists -%}\n {%- do relations.append(relation) -%}\n {%- endif -%}\n\n {%- endfor -%}\n \n {%- if relations != [] -%}\n {{ dbt_utils.union_relations(relations) }}\n {%- else -%}\n {% if execute and not var('fivetran__remove_empty_table_warnings', false) -%}\n {{ exceptions.warn(\"\\n\\nPlease be aware: The \" ~ table_identifier|upper ~ \" table was not found in your \" ~ default_schema|upper ~ \" schema(s). The Fivetran dbt package will create a completely empty \" ~ table_identifier|upper ~ \" staging model as to not break downstream transformations. To turn off these warnings, set the `fivetran__remove_empty_table_warnings` variable to TRUE (see https://github.com/fivetran/dbt_fivetran_utils/tree/releases/v0.4.latest#union_data-source for details).\\n\") }}\n {% endif -%}\n select \n cast(null as {{ dbt.type_string() }}) as _dbt_source_relation\n limit 0\n {%- endif -%}\n\n{%- elif var(union_database_variable, none) -%}\n\n {%- set relations = [] -%}\n\n {%- for database in var(union_database_variable) -%}\n {%- set relation=adapter.get_relation(\n database=source(schema, table_identifier).database if var('has_defined_sources', false) else database,\n schema=source(schema, table_identifier).schema if var('has_defined_sources', false) else var(schema_variable, default_schema),\n identifier=source(schema, table_identifier).identifier if var('has_defined_sources', false) else table_identifier\n ) -%}\n\n {%- set relation_exists=relation is not none -%}\n\n {%- if relation_exists -%}\n {%- do relations.append(relation) -%}\n {%- endif -%}\n\n {%- endfor -%}\n\n {%- if relations != [] -%}\n {{ dbt_utils.union_relations(relations) }}\n {%- else -%}\n {% if execute and not var('fivetran__remove_empty_table_warnings', false) -%}\n {{ exceptions.warn(\"\\n\\nPlease be aware: The \" ~ table_identifier|upper ~ \" table was not found in your \" ~ default_schema|upper ~ \" schema(s). The Fivetran dbt package will create a completely empty \" ~ table_identifier|upper ~ \" staging model as to not break downstream transformations. To turn off these warnings, set the `fivetran__remove_empty_table_warnings` variable to TRUE (see https://github.com/fivetran/dbt_fivetran_utils/tree/releases/v0.4.latest#union_data-source for details).\\n\") }}\n {% endif -%}\n select \n cast(null as {{ dbt.type_string() }}) as _dbt_source_relation\n limit 0\n {%- endif -%}\n\n{%- else -%}\n {% set exception_schemas = {\"linkedin_company_pages\": \"linkedin_pages\", \"instagram_business_pages\": \"instagram_business\"} %}\n {% set relation = namespace(value=\"\") %}\n {% if default_schema in exception_schemas.keys() %}\n {% for corrected_schema_name in exception_schemas.items() %} \n {% if default_schema in corrected_schema_name %}\n {# In order for this macro to effectively work within upstream integration tests (mainly used by the Fivetran dbt package maintainers), this identifier variable selection is required to use the macro with different identifier names. #}\n {% set identifier_var = corrected_schema_name[1] + \"_\" + table_identifier + \"_identifier\" %}\n {%- set relation.value=adapter.get_relation(\n database=source(corrected_schema_name[1], table_identifier).database,\n schema=source(corrected_schema_name[1], table_identifier).schema,\n identifier=var(identifier_var, table_identifier)\n ) -%}\n {% endif %}\n {% endfor %}\n {% else %}\n {# In order for this macro to effectively work within upstream integration tests (mainly used by the Fivetran dbt package maintainers), this identifier variable selection is required to use the macro with different identifier names. #}\n {% set identifier_var = default_schema + \"_\" + table_identifier + \"_identifier\" %}\n {# Unfortunately the Twitter Organic identifiers were misspelled. As such, we will need to account for this in the model. This will be adjusted in the Twitter Organic package, but to ensure backwards compatibility, this needs to be included. #}\n {% if var(identifier_var, none) is none %} \n {% set identifier_var = default_schema + \"_\" + table_identifier + \"_identifer\" %}\n {% endif %}\n {%- set relation.value=adapter.get_relation(\n database=source(default_schema, table_identifier).database,\n schema=source(default_schema, table_identifier).schema,\n identifier=var(identifier_var, table_identifier)\n ) -%}\n {% endif %}\n{%- set table_exists=relation.value is not none -%}\n\n{%- if table_exists -%}\n select * \n from {{ relation.value }}\n{%- else -%}\n {% if execute and not var('fivetran__remove_empty_table_warnings', false) -%}\n {{ exceptions.warn(\"\\n\\nPlease be aware: The \" ~ table_identifier|upper ~ \" table was not found in your \" ~ default_schema|upper ~ \" schema(s). The Fivetran dbt package will create a completely empty \" ~ table_identifier|upper ~ \" staging model as to not break downstream transformations. To turn off these warnings, set the `fivetran__remove_empty_table_warnings` variable to TRUE (see https://github.com/fivetran/dbt_fivetran_utils/tree/releases/v0.4.latest#union_data-source for details).\\n\") }}\n {% endif -%}\n select \n cast(null as {{ dbt.type_string() }}) as _dbt_source_relation\n limit 0\n{%- endif -%}\n{%- endif -%}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt_utils.union_relations", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_identifier", "type": null, "description": ""}, {"name": "database_variable", "type": null, "description": ""}, {"name": "schema_variable", "type": null, "description": ""}, {"name": "default_database", "type": null, "description": ""}, {"name": "default_schema", "type": null, "description": ""}, {"name": "default_variable", "type": null, "description": ""}, {"name": "union_schema_variable", "type": null, "description": ""}, {"name": "union_database_variable", "type": null, "description": ""}], "created_at": 1783708211.5465214, "supported_languages": null}, "macro.fivetran_utils.empty_variable_warning": {"name": "empty_variable_warning", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/empty_variable_warning.sql", "original_file_path": "macros/empty_variable_warning.sql", "unique_id": "macro.fivetran_utils.empty_variable_warning", "macro_sql": "{% macro empty_variable_warning(variable, downstream_model) %}\n\n{% if not var(variable) %}\n{{ log(\n \"\"\"\n Warning: You have passed an empty list to the \"\"\" ~ variable ~ \"\"\".\n As a result, you won't see the history of any columns in the \"\"\" ~ downstream_model ~ \"\"\" model.\n \"\"\",\n info=True\n) }}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "variable", "type": null, "description": ""}, {"name": "downstream_model", "type": null, "description": ""}], "created_at": 1783708211.547357, "supported_languages": null}, "macro.fivetran_utils.string_agg": {"name": "string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.string_agg", "macro_sql": "{% macro string_agg(field_to_agg, delimiter) -%}\n\n{{ adapter.dispatch('string_agg', 'fivetran_utils') (field_to_agg, delimiter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__string_agg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}, {"name": "delimiter", "type": null, "description": ""}], "created_at": 1783708211.5480037, "supported_languages": null}, "macro.fivetran_utils.default__string_agg": {"name": "default__string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.default__string_agg", "macro_sql": "{% macro default__string_agg(field_to_agg, delimiter) %}\n string_agg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}, {"name": "delimiter", "type": null, "description": ""}], "created_at": 1783708211.5483162, "supported_languages": null}, "macro.fivetran_utils.snowflake__string_agg": {"name": "snowflake__string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.snowflake__string_agg", "macro_sql": "{% macro snowflake__string_agg(field_to_agg, delimiter) %}\n listagg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}, {"name": "delimiter", "type": null, "description": ""}], "created_at": 1783708211.5485966, "supported_languages": null}, "macro.fivetran_utils.redshift__string_agg": {"name": "redshift__string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.redshift__string_agg", "macro_sql": "{% macro redshift__string_agg(field_to_agg, delimiter) %}\n listagg({{ field_to_agg }}, {{ delimiter }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}, {"name": "delimiter", "type": null, "description": ""}], "created_at": 1783708211.5488708, "supported_languages": null}, "macro.fivetran_utils.spark__string_agg": {"name": "spark__string_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/string_agg.sql", "original_file_path": "macros/string_agg.sql", "unique_id": "macro.fivetran_utils.spark__string_agg", "macro_sql": "{% macro spark__string_agg(field_to_agg, delimiter) %}\n -- collect set will remove duplicates\n replace(replace(replace(cast( collect_set({{ field_to_agg }}) as string), '[', ''), ']', ''), ', ', {{ delimiter }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}, {"name": "delimiter", "type": null, "description": ""}], "created_at": 1783708211.549175, "supported_languages": null}, "macro.fivetran_utils.array_agg": {"name": "array_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "unique_id": "macro.fivetran_utils.array_agg", "macro_sql": "{% macro array_agg(field_to_agg) -%}\n\n{{ adapter.dispatch('array_agg', 'fivetran_utils') (field_to_agg) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__array_agg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}], "created_at": 1783708211.5496662, "supported_languages": null}, "macro.fivetran_utils.default__array_agg": {"name": "default__array_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "unique_id": "macro.fivetran_utils.default__array_agg", "macro_sql": "{% macro default__array_agg(field_to_agg) %}\n array_agg({{ field_to_agg }})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}], "created_at": 1783708211.5498838, "supported_languages": null}, "macro.fivetran_utils.redshift__array_agg": {"name": "redshift__array_agg", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/array_agg.sql", "original_file_path": "macros/array_agg.sql", "unique_id": "macro.fivetran_utils.redshift__array_agg", "macro_sql": "{% macro redshift__array_agg(field_to_agg) %}\n listagg({{ field_to_agg }}, ',')\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field_to_agg", "type": null, "description": ""}], "created_at": 1783708211.5501213, "supported_languages": null}, "macro.fivetran_utils.extract_url_parameter": {"name": "extract_url_parameter", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/extract_url_parameter.sql", "original_file_path": "macros/extract_url_parameter.sql", "unique_id": "macro.fivetran_utils.extract_url_parameter", "macro_sql": "{% macro extract_url_parameter(field, url_parameter) -%}\n\n{{ adapter.dispatch('extract_url_parameter', 'fivetran_utils') (field, url_parameter) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__extract_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.5506966, "supported_languages": null}, "macro.fivetran_utils.default__extract_url_parameter": {"name": "default__extract_url_parameter", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/extract_url_parameter.sql", "original_file_path": "macros/extract_url_parameter.sql", "unique_id": "macro.fivetran_utils.default__extract_url_parameter", "macro_sql": "{% macro default__extract_url_parameter(field, url_parameter) -%}\n\n{{ dbt_utils.get_url_parameter(field, url_parameter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.5509999, "supported_languages": null}, "macro.fivetran_utils.spark__extract_url_parameter": {"name": "spark__extract_url_parameter", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/extract_url_parameter.sql", "original_file_path": "macros/extract_url_parameter.sql", "unique_id": "macro.fivetran_utils.spark__extract_url_parameter", "macro_sql": "{% macro spark__extract_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"=([^&]+)'\" -%}\nnullif(regexp_extract({{ field }}, {{ formatted_url_parameter }}, 1), '')\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.5514455, "supported_languages": null}, "macro.fivetran_utils.fivetran_date_spine": {"name": "fivetran_date_spine", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fivetran_date_spine.sql", "original_file_path": "macros/fivetran_date_spine.sql", "unique_id": "macro.fivetran_utils.fivetran_date_spine", "macro_sql": "{% macro fivetran_date_spine(datepart, start_date, end_date) -%}\n\n{{ return(adapter.dispatch('fivetran_date_spine', 'fivetran_utils') (datepart, start_date, end_date)) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__fivetran_date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1783708211.5524206, "supported_languages": null}, "macro.fivetran_utils.default__fivetran_date_spine": {"name": "default__fivetran_date_spine", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fivetran_date_spine.sql", "original_file_path": "macros/fivetran_date_spine.sql", "unique_id": "macro.fivetran_utils.default__fivetran_date_spine", "macro_sql": "{% macro default__fivetran_date_spine(datepart, start_date, end_date) %}\n\n {{ dbt_utils.date_spine(datepart, start_date, end_date) }}\n \n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1783708211.5527894, "supported_languages": null}, "macro.fivetran_utils.sqlserver__fivetran_date_spine": {"name": "sqlserver__fivetran_date_spine", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fivetran_date_spine.sql", "original_file_path": "macros/fivetran_date_spine.sql", "unique_id": "macro.fivetran_utils.sqlserver__fivetran_date_spine", "macro_sql": "{% macro sqlserver__fivetran_date_spine(datepart, start_date, end_date) -%}\n\n {% set date_spine_query %}\n with\n\n l0 as (\n\n select c\n from (select 1 union all select 1) as d(c)\n\n ),\n l1 as (\n\n select\n 1 as c\n from l0 as a\n cross join l0 as b\n\n ),\n\n l2 as (\n\n select 1 as c\n from l1 as a\n cross join l1 as b\n ),\n\n l3 as (\n\n select 1 as c\n from l2 as a\n cross join l2 as b\n ),\n\n l4 as (\n\n select 1 as c\n from l3 as a\n cross join l3 as b\n ),\n\n l5 as (\n\n select 1 as c\n from l4 as a\n cross join l4 as b\n ),\n\n nums as (\n\n select row_number() over (order by (select null)) as rownum\n from l5\n ),\n\n rawdata as (\n\n select top ({{dbt.datediff(start_date, end_date, datepart)}}) rownum -1 as n\n from nums\n order by rownum\n ),\n\n all_periods as (\n\n select (\n {{\n dbt.dateadd(\n datepart,\n 'n',\n start_date\n )\n }}\n ) as date_{{datepart}}\n from rawdata\n ),\n\n filtered as (\n\n select *\n from all_periods\n where date_{{datepart}} <= {{ end_date }}\n\n )\n\n select * from filtered\n order by 1\n\n {% endset %}\n\n {% set results = run_query(date_spine_query) %}\n\n {% if execute %}\n\n {% set results_list = results.columns[0].values() %}\n \n {% else %}\n\n {% set results_list = [] %}\n\n {% endif %}\n\n {%- for date_field in results_list %}\n select cast('{{ date_field }}' as date) as date_{{datepart}} {{ 'union all ' if not loop.last else '' }}\n {% endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.datediff", "macro.dbt.dateadd", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1783708211.5545619, "supported_languages": null}, "macro.fivetran_utils.add_dbt_source_relation": {"name": "add_dbt_source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/add_dbt_source_relation.sql", "original_file_path": "macros/add_dbt_source_relation.sql", "unique_id": "macro.fivetran_utils.add_dbt_source_relation", "macro_sql": "{% macro add_dbt_source_relation() %}\n\n{% if var('union_schemas', none) or var('union_databases', none) %}\n, _dbt_source_relation\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.555128, "supported_languages": null}, "macro.fivetran_utils.percentile": {"name": "percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.percentile", "macro_sql": "{% macro percentile(percentile_field, partition_field, percent) -%}\n\n{{ adapter.dispatch('percentile', 'fivetran_utils') (percentile_field, partition_field, percent) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__percentile"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "percentile_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "percent", "type": null, "description": ""}], "created_at": 1783708211.555936, "supported_languages": null}, "macro.fivetran_utils.default__percentile": {"name": "default__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.default__percentile", "macro_sql": "{% macro default__percentile(percentile_field, partition_field, percent) %}\n\n percentile_cont( \n {{ percent }} )\n within group ( order by {{ percentile_field }} )\n over ( partition by {{ partition_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "percentile_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "percent", "type": null, "description": ""}], "created_at": 1783708211.556311, "supported_languages": null}, "macro.fivetran_utils.redshift__percentile": {"name": "redshift__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.redshift__percentile", "macro_sql": "{% macro redshift__percentile(percentile_field, partition_field, percent) %}\n\n percentile_cont( \n {{ percent }} )\n within group ( order by {{ percentile_field }} )\n over ( partition by {{ partition_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "percentile_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "percent", "type": null, "description": ""}], "created_at": 1783708211.5566528, "supported_languages": null}, "macro.fivetran_utils.bigquery__percentile": {"name": "bigquery__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.bigquery__percentile", "macro_sql": "{% macro bigquery__percentile(percentile_field, partition_field, percent) %}\n\n percentile_cont( \n {{ percentile_field }}, \n {{ percent }}) \n over (partition by {{ partition_field }} \n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "percentile_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "percent", "type": null, "description": ""}], "created_at": 1783708211.556994, "supported_languages": null}, "macro.fivetran_utils.postgres__percentile": {"name": "postgres__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.postgres__percentile", "macro_sql": "{% macro postgres__percentile(percentile_field, partition_field, percent) %}\n\n percentile_cont( \n {{ percent }} )\n within group ( order by {{ percentile_field }} )\n /* have to group by partition field */\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "percentile_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "percent", "type": null, "description": ""}], "created_at": 1783708211.55732, "supported_languages": null}, "macro.fivetran_utils.spark__percentile": {"name": "spark__percentile", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/percentile.sql", "original_file_path": "macros/percentile.sql", "unique_id": "macro.fivetran_utils.spark__percentile", "macro_sql": "{% macro spark__percentile(percentile_field, partition_field, percent) %}\n\n percentile( \n {{ percentile_field }}, \n {{ percent }}) \n over (partition by {{ partition_field }} \n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "percentile_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "percent", "type": null, "description": ""}], "created_at": 1783708211.557658, "supported_languages": null}, "macro.fivetran_utils.union_relations_custom": {"name": "union_relations_custom", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_relations_custom.sql", "original_file_path": "macros/union_relations_custom.sql", "unique_id": "macro.fivetran_utils.union_relations_custom", "macro_sql": "{%- macro union_relations_custom(relations, aliases=none, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation', where=none) -%}\n {{ return(adapter.dispatch('union_relations_custom', 'fivetran_utils')(relations, aliases, column_override, include, exclude, source_column_name, where)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__union_relations_custom"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relations", "type": null, "description": ""}, {"name": "aliases", "type": null, "description": ""}, {"name": "column_override", "type": null, "description": ""}, {"name": "include", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "source_column_name", "type": null, "description": ""}, {"name": "where", "type": null, "description": ""}], "created_at": 1783708211.5597854, "supported_languages": null}, "macro.fivetran_utils.default__union_relations_custom": {"name": "default__union_relations_custom", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_relations_custom.sql", "original_file_path": "macros/union_relations_custom.sql", "unique_id": "macro.fivetran_utils.default__union_relations_custom", "macro_sql": "\n\n{%- macro default__union_relations_custom(relations, aliases=none, column_override=none, include=[], exclude=[], source_column_name='_dbt_source_relation', where=none) -%}\n\n {%- if exclude and include -%}\n {{ exceptions.raise_compiler_error(\"Both an exclude and include list were provided to the `union` macro. Only one is allowed\") }}\n {%- endif -%}\n\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. -#}\n {%- if not execute %}\n {{ return('') }}\n {% endif -%}\n\n {%- set column_override = column_override if column_override is not none else {} -%}\n\n {%- set relation_columns = {} -%}\n {%- set column_superset = {} -%}\n {%- set all_excludes = [] -%}\n {%- set all_includes = [] -%}\n\n {%- if exclude -%}\n {%- for exc in exclude -%}\n {%- do all_excludes.append(exc | lower) -%}\n {%- endfor -%}\n {%- endif -%}\n\n {%- if include -%}\n {%- for inc in include -%}\n {%- do all_includes.append(inc | lower) -%}\n {%- endfor -%}\n {%- endif -%}\n\n {%- for relation in relations -%}\n\n {%- do relation_columns.update({relation: []}) -%}\n\n {%- do dbt_utils._is_relation(relation, 'union_relations_custom') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'union_relations_custom') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) -%}\n {%- for col in cols -%}\n\n {#- If an exclude list was provided and the column is in the list, do nothing -#}\n {%- if exclude and col.column | lower in all_excludes -%}\n\n {#- If an include list was provided and the column is not in the list, do nothing -#}\n {%- elif include and col.column | lower not in all_includes -%}\n\n {#- Otherwise add the column to the column superset -#}\n {%- else -%}\n\n {#- update the list of columns in this relation -#}\n {%- do relation_columns[relation].append(col.column) -%}\n\n {%- if col.column in column_superset -%}\n\n {%- set stored = column_superset[col.column] -%}\n {%- if col.is_string() and stored.is_string() and col.string_size() > stored.string_size() -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif %}\n\n {%- else -%}\n\n {%- do column_superset.update({col.column: col}) -%}\n\n {%- endif -%}\n\n {%- endif -%}\n\n {%- endfor -%}\n {%- endfor -%}\n\n {%- set ordered_column_names = column_superset.keys() -%}\n {%- set dbt_command = flags.WHICH -%}\n\n\n {% if dbt_command in ['run', 'build'] %}\n {% if (include | length > 0 or exclude | length > 0) and not column_superset.keys() %}\n {%- set relations_string -%}\n {%- for relation in relations -%}\n {{ relation.name }}\n {%- if not loop.last %}, {% endif -%}\n {%- endfor -%}\n {%- endset -%}\n\n {%- set error_message -%}\n There were no columns found to union for relations {{ relations_string }}\n {%- endset -%}\n\n {{ exceptions.raise_compiler_error(error_message) }}\n {%- endif -%}\n {%- endif -%}\n\n {%- for relation in relations %}\n\n (\n select\n\n {%- if source_column_name is not none %}\n {# dbt_utils union_relations includes the table in the source_relation. For Fivetran dbt package purposes the table should not be included in the source relation. #}\n cast({{ dbt.string_literal(relation.database ~ '.' ~ relation.schema) }} as {{ dbt.type_string() }}) as {{ source_column_name }},\n {%- endif %}\n\n {% for col_name in ordered_column_names -%}\n\n {%- set col = column_superset[col_name] %}\n {%- set col_type = column_override.get(col.column, col.data_type) %}\n {%- set col_name = adapter.quote(col_name) if col_name in relation_columns[relation] else 'null' %}\n cast({{ col_name }} as {{ col_type }}) as {{ col.quoted }} {% if not loop.last %},{% endif -%}\n\n {%- endfor %}\n \n {# This alias is a change from dbt_utils union_relations code. Avoids errors if the table is named a reserved keyword #}\n from {{ aliases[loop.index0] if aliases else relation }} as unioned_relation_{{ loop.index }}\n\n {% if where -%}\n where {{ where }}\n {%- endif %}\n )\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n\n {%- endfor -%}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.string_literal", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "relations", "type": null, "description": ""}, {"name": "aliases", "type": null, "description": ""}, {"name": "column_override", "type": null, "description": ""}, {"name": "include", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "source_column_name", "type": null, "description": ""}, {"name": "where", "type": null, "description": ""}], "created_at": 1783708211.5670853, "supported_languages": null}, "macro.fivetran_utils.apply_source_relation": {"name": "apply_source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/apply_source_relation.sql", "original_file_path": "macros/apply_source_relation.sql", "unique_id": "macro.fivetran_utils.apply_source_relation", "macro_sql": "{% macro apply_source_relation(package_name, use_package_prefix=true) -%}\n\n{{ adapter.dispatch('apply_source_relation', 'fivetran_utils') (package_name, use_package_prefix) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__apply_source_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "package_name", "type": null, "description": ""}, {"name": "use_package_prefix", "type": null, "description": ""}], "created_at": 1783708211.567959, "supported_languages": null}, "macro.fivetran_utils.default__apply_source_relation": {"name": "default__apply_source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/apply_source_relation.sql", "original_file_path": "macros/apply_source_relation.sql", "unique_id": "macro.fivetran_utils.default__apply_source_relation", "macro_sql": "{% macro default__apply_source_relation(package_name, use_package_prefix=true) -%}\n\n{% set sources_var = package_name ~ '_sources' %}\n{% set database_var = package_name ~ '_database' %}\n{% set schema_var = package_name ~ '_schema' %}\n\n{% if use_package_prefix %}\n {% set union_schemas_var = package_name ~ '_union_schemas' %}\n {% set union_databases_var = package_name ~ '_union_databases' %}\n{% else %}\n {% set union_schemas_var = 'union_schemas' %}\n {% set union_databases_var = 'union_databases' %}\n{% endif %}\n\n{% if var(sources_var, []) | length > 0 %}\n, _dbt_source_relation as source_relation\n{% elif var(union_schemas_var, []) | length > 0 or var(union_databases_var, []) | length > 0 %}\n{{ fivetran_utils.source_relation(union_schema_variable=union_schemas_var, union_database_variable=union_databases_var) }}\n{% else %}\n{% set database = var(database_var, target.database) %}\n{% set schema = var(schema_var, package_name) %}\n, cast('{{ database ~ \".\" ~ schema }}' as {{ dbt.type_string() }}) as source_relation\n{% endif %}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.source_relation", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "package_name", "type": null, "description": ""}, {"name": "use_package_prefix", "type": null, "description": ""}], "created_at": 1783708211.570192, "supported_languages": null}, "macro.fivetran_utils.source_relation": {"name": "source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/source_relation.sql", "original_file_path": "macros/source_relation.sql", "unique_id": "macro.fivetran_utils.source_relation", "macro_sql": "{% macro source_relation(union_schema_variable='union_schemas', union_database_variable='union_databases') -%}\n\n{{ adapter.dispatch('source_relation', 'fivetran_utils') (union_schema_variable, union_database_variable) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__source_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "union_schema_variable", "type": null, "description": ""}, {"name": "union_database_variable", "type": null, "description": ""}], "created_at": 1783708211.5709383, "supported_languages": null}, "macro.fivetran_utils.default__source_relation": {"name": "default__source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/source_relation.sql", "original_file_path": "macros/source_relation.sql", "unique_id": "macro.fivetran_utils.default__source_relation", "macro_sql": "{% macro default__source_relation(union_schema_variable, union_database_variable) %}\n\n{% if var(union_schema_variable, none) %}\n, case\n {% for schema in var(union_schema_variable) %}\n when lower(replace(replace(_dbt_source_relation,'\"',''),'`','')) like '%.{{ schema|lower }}.%' then '{{ schema|lower }}'\n {% endfor %}\n end as source_relation\n{% elif var(union_database_variable, none) %}\n, case\n {% for database in var(union_database_variable) %}\n when lower(replace(replace(_dbt_source_relation,'\"',''),'`','')) like '%{{ database|lower }}.%' then '{{ database|lower }}'\n {% endfor %}\n end as source_relation\n{% else %}\n, cast('' as {{ dbt.type_string() }}) as source_relation\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "union_schema_variable", "type": null, "description": ""}, {"name": "union_database_variable", "type": null, "description": ""}], "created_at": 1783708211.5721114, "supported_languages": null}, "macro.fivetran_utils.fill_staging_columns": {"name": "fill_staging_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fill_staging_columns.sql", "original_file_path": "macros/fill_staging_columns.sql", "unique_id": "macro.fivetran_utils.fill_staging_columns", "macro_sql": "{% macro fill_staging_columns(source_columns, staging_columns) %}\n\n{%- set source_column_names = source_columns|map(attribute='name')|map('lower')|list -%}\n{%- set using_source_casing = var('fivetran_using_source_casing', false) -%}\n\n{%- for column in staging_columns %}\n {%- if column.name|lower in source_column_names %}\n {%- if using_source_casing %}\n {%- set column_alias = column.alias if 'alias' in column else column.name %}\n {{ adapter.quote(column.name) }} as {{ adapter.quote(column_alias|upper if target.type == 'snowflake' else column_alias) }}\n {%- else %}\n {{ fivetran_utils.quote_column(column) }} as\n {%- if 'alias' in column %} {{ column.alias }}{% else %} {{ fivetran_utils.quote_column(column) }}{% endif %}\n {%- endif %}\n {%- else %}\n cast(null as {{ column.datatype }}) as\n {%- if 'alias' in column %} {{ column.alias }}{% else %} {{ fivetran_utils.quote_column(column) }}{% endif %}\n {%- endif %}{{ ',' if not loop.last }}\n{%- endfor %}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.quote_column"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "source_columns", "type": null, "description": ""}, {"name": "staging_columns", "type": null, "description": ""}], "created_at": 1783708211.5749676, "supported_languages": null}, "macro.fivetran_utils.quote_column": {"name": "quote_column", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fill_staging_columns.sql", "original_file_path": "macros/fill_staging_columns.sql", "unique_id": "macro.fivetran_utils.quote_column", "macro_sql": "{% macro quote_column(column) %}\n {%- if 'quote' in column %}\n {%- if column.quote %}\n {%- if target.type in ('bigquery', 'spark', 'databricks') %}\n `{{ column.name }}`\n {%- elif target.type == 'snowflake' %}\n \"{{ column.name | upper }}\"\n {%- else %}\n \"{{ column.name }}\"\n {%- endif %}\n {%- else %}{{ column.name }}\n {%- endif %}\n {%- else %}{{ column.name }}\n {%- endif %}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}], "created_at": 1783708211.5761192, "supported_languages": null}, "macro.fivetran_utils.first_value": {"name": "first_value", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "unique_id": "macro.fivetran_utils.first_value", "macro_sql": "{% macro first_value(first_value_field, partition_field, order_by_field, order=\"asc\") -%}\n\n{{ adapter.dispatch('first_value', 'fivetran_utils') (first_value_field, partition_field, order_by_field, order) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__first_value"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_value_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "order_by_field", "type": null, "description": ""}, {"name": "order", "type": null, "description": ""}], "created_at": 1783708211.5768754, "supported_languages": null}, "macro.fivetran_utils.default__first_value": {"name": "default__first_value", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "unique_id": "macro.fivetran_utils.default__first_value", "macro_sql": "{% macro default__first_value(first_value_field, partition_field, order_by_field, order=\"asc\") %}\n\n first_value( {{ first_value_field }} ignore nulls ) over (partition by {{ partition_field }} order by {{ order_by_field }} {{ order }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_value_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "order_by_field", "type": null, "description": ""}, {"name": "order", "type": null, "description": ""}], "created_at": 1783708211.5773287, "supported_languages": null}, "macro.fivetran_utils.redshift__first_value": {"name": "redshift__first_value", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/first_value.sql", "original_file_path": "macros/first_value.sql", "unique_id": "macro.fivetran_utils.redshift__first_value", "macro_sql": "{% macro redshift__first_value(first_value_field, partition_field, order_by_field, order=\"asc\") %}\n\n first_value( {{ first_value_field }} ignore nulls ) over (partition by {{ partition_field }} order by {{ order_by_field }} {{ order }} , {{ partition_field }} rows unbounded preceding )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_value_field", "type": null, "description": ""}, {"name": "partition_field", "type": null, "description": ""}, {"name": "order_by_field", "type": null, "description": ""}, {"name": "order", "type": null, "description": ""}], "created_at": 1783708211.5777905, "supported_languages": null}, "macro.fivetran_utils.ceiling": {"name": "ceiling", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "unique_id": "macro.fivetran_utils.ceiling", "macro_sql": "{% macro ceiling(num) -%}\n\n{{ adapter.dispatch('ceiling', 'fivetran_utils') (num) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__ceiling"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "num", "type": null, "description": ""}], "created_at": 1783708211.578307, "supported_languages": null}, "macro.fivetran_utils.default__ceiling": {"name": "default__ceiling", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "unique_id": "macro.fivetran_utils.default__ceiling", "macro_sql": "{% macro default__ceiling(num) %}\n ceiling({{ num }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "num", "type": null, "description": ""}], "created_at": 1783708211.5785284, "supported_languages": null}, "macro.fivetran_utils.snowflake__ceiling": {"name": "snowflake__ceiling", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/ceiling.sql", "original_file_path": "macros/ceiling.sql", "unique_id": "macro.fivetran_utils.snowflake__ceiling", "macro_sql": "{% macro snowflake__ceiling(num) %}\n ceil({{ num }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "num", "type": null, "description": ""}], "created_at": 1783708211.5787401, "supported_languages": null}, "macro.fivetran_utils.json_parse": {"name": "json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.json_parse", "macro_sql": "{% macro json_parse(string, string_path) -%}\n\n{{ adapter.dispatch('json_parse', 'fivetran_utils') (string, string_path) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__json_parse"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1783708211.579869, "supported_languages": null}, "macro.fivetran_utils.default__json_parse": {"name": "default__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.default__json_parse", "macro_sql": "{% macro default__json_parse(string, string_path) %}\n\n json_extract_path_text({{string}}, {%- for s in string_path -%}'{{ s }}'{%- if not loop.last -%},{%- endif -%}{%- endfor -%} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1783708211.5807078, "supported_languages": null}, "macro.fivetran_utils.redshift__json_parse": {"name": "redshift__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.redshift__json_parse", "macro_sql": "{% macro redshift__json_parse(string, string_path) %}\n\n json_extract_path_text({{string}}, {%- for s in string_path -%}'{{ s }}'{%- if not loop.last -%},{%- endif -%}{%- endfor -%} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1783708211.5812416, "supported_languages": null}, "macro.fivetran_utils.bigquery__json_parse": {"name": "bigquery__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.bigquery__json_parse", "macro_sql": "{% macro bigquery__json_parse(string, string_path) %}\n\n \n json_extract_scalar({{string}}, '$.{%- for s in string_path -%}{{ s }}{%- if not loop.last -%}.{%- endif -%}{%- endfor -%} ')\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1783708211.5817306, "supported_languages": null}, "macro.fivetran_utils.postgres__json_parse": {"name": "postgres__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.postgres__json_parse", "macro_sql": "{% macro postgres__json_parse(string, string_path) %}\n\n {{string}}::json #>> '{ {%- for s in string_path -%}{{ s }}{%- if not loop.last -%},{%- endif -%}{%- endfor -%} }'\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1783708211.5822487, "supported_languages": null}, "macro.fivetran_utils.snowflake__json_parse": {"name": "snowflake__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.snowflake__json_parse", "macro_sql": "{% macro snowflake__json_parse(string, string_path) %}\n\n parse_json( {{string}} ) {%- for s in string_path -%}{% if s is number %}[{{ s }}]{% else %}['{{ s }}']{% endif %}{%- endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1783708211.582796, "supported_languages": null}, "macro.fivetran_utils.spark__json_parse": {"name": "spark__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.spark__json_parse", "macro_sql": "{% macro spark__json_parse(string, string_path) %}\n\n {{string}} : {%- for s in string_path -%}{% if s is number %}[{{ s }}]{% else %}['{{ s }}']{% endif %}{%- endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1783708211.583362, "supported_languages": null}, "macro.fivetran_utils.sqlserver__json_parse": {"name": "sqlserver__json_parse", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/json_parse.sql", "original_file_path": "macros/json_parse.sql", "unique_id": "macro.fivetran_utils.sqlserver__json_parse", "macro_sql": "{% macro sqlserver__json_parse(string, string_path) %}\n\n json_value({{string}}, '$.{%- for s in string_path -%}{{ s }}{%- if not loop.last -%}.{%- endif -%}{%- endfor -%} ')\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string", "type": null, "description": ""}, {"name": "string_path", "type": null, "description": ""}], "created_at": 1783708211.583853, "supported_languages": null}, "macro.fivetran_utils.dummy_coalesce_value": {"name": "dummy_coalesce_value", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/dummy_coalesce_value.sql", "original_file_path": "macros/dummy_coalesce_value.sql", "unique_id": "macro.fivetran_utils.dummy_coalesce_value", "macro_sql": "{% macro dummy_coalesce_value(column) %}\n\n{% set coalesce_value = {\n 'STRING': \"'DUMMY_STRING'\",\n 'BOOLEAN': 'null',\n 'INT': 999999999,\n 'FLOAT': 999999999.99,\n 'TIMESTAMP': 'cast(\"2099-12-31\" as timestamp)',\n 'DATE': 'cast(\"2099-12-31\" as date)',\n} %}\n\n{% if column.is_float() %}\n{{ return(coalesce_value['FLOAT']) }}\n\n{% elif column.is_numeric() %}\n{{ return(coalesce_value['INT']) }}\n\n{% elif column.is_string() %}\n{{ return(coalesce_value['STRING']) }}\n\n{% elif column.data_type|lower == 'boolean' %}\n{{ return(coalesce_value['BOOLEAN']) }}\n\n{% elif 'timestamp' in column.data_type|lower %}\n{{ return(coalesce_value['TIMESTAMP']) }}\n\n{% elif 'date' in column.data_type|lower %}\n{{ return(coalesce_value['DATE']) }}\n\n{% elif 'int' in column.data_type|lower %}\n{{ return(coalesce_value['INT']) }}\n\n{% endif %}\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}], "created_at": 1783708211.5865612, "supported_languages": null}, "macro.fivetran_utils.wrap_in_quotes": {"name": "wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.wrap_in_quotes", "macro_sql": "{%- macro wrap_in_quotes(object_to_quote) -%}\n\n{{ return(adapter.dispatch('wrap_in_quotes', 'fivetran_utils')(object_to_quote)) }}\n\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.fivetran_utils.postgres__wrap_in_quotes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "object_to_quote", "type": null, "description": ""}], "created_at": 1783708211.587231, "supported_languages": null}, "macro.fivetran_utils.default__wrap_in_quotes": {"name": "default__wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.default__wrap_in_quotes", "macro_sql": "{%- macro default__wrap_in_quotes(object_to_quote) -%}\n{# bigquery, spark, databricks #}\n `{{ object_to_quote }}`\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "object_to_quote", "type": null, "description": ""}], "created_at": 1783708211.587472, "supported_languages": null}, "macro.fivetran_utils.snowflake__wrap_in_quotes": {"name": "snowflake__wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.snowflake__wrap_in_quotes", "macro_sql": "{%- macro snowflake__wrap_in_quotes(object_to_quote) -%}\n \"{{ object_to_quote | upper }}\"\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "object_to_quote", "type": null, "description": ""}], "created_at": 1783708211.5877125, "supported_languages": null}, "macro.fivetran_utils.redshift__wrap_in_quotes": {"name": "redshift__wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.redshift__wrap_in_quotes", "macro_sql": "{%- macro redshift__wrap_in_quotes(object_to_quote) -%}\n \"{{ object_to_quote }}\"\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "object_to_quote", "type": null, "description": ""}], "created_at": 1783708211.5879276, "supported_languages": null}, "macro.fivetran_utils.postgres__wrap_in_quotes": {"name": "postgres__wrap_in_quotes", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/wrap_in_quotes.sql", "original_file_path": "macros/wrap_in_quotes.sql", "unique_id": "macro.fivetran_utils.postgres__wrap_in_quotes", "macro_sql": "{%- macro postgres__wrap_in_quotes(object_to_quote) -%}\n \"{{ object_to_quote }}\"\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "object_to_quote", "type": null, "description": ""}], "created_at": 1783708211.5881732, "supported_languages": null}, "macro.fivetran_utils.add_pass_through_columns": {"name": "add_pass_through_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/add_pass_through_columns.sql", "original_file_path": "macros/add_pass_through_columns.sql", "unique_id": "macro.fivetran_utils.add_pass_through_columns", "macro_sql": "{% macro add_pass_through_columns(base_columns, pass_through_var) %}\n\n {% if pass_through_var %}\n\n {% for column in pass_through_var %}\n\n {% if column is mapping %}\n\n {% if column.alias %}\n\n {% do base_columns.append({ \"name\": column.name, \"alias\": column.alias, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n\n {% else %}\n\n {% do base_columns.append({ \"name\": column.name, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n \n {% endif %}\n\n {% else %}\n\n {% do base_columns.append({ \"name\": column, \"datatype\": dbt.type_string()}) %}\n\n {% endif %}\n\n {% endfor %}\n\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_columns", "type": null, "description": ""}, {"name": "pass_through_var", "type": null, "description": ""}], "created_at": 1783708211.5902886, "supported_languages": null}, "macro.fivetran_utils.timestamp_diff": {"name": "timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.timestamp_diff", "macro_sql": "{% macro timestamp_diff(first_date, second_date, datepart) %}\n {{ adapter.dispatch('timestamp_diff', 'fivetran_utils')(first_date, second_date, datepart) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__timestamp_diff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783708211.591779, "supported_languages": null}, "macro.fivetran_utils.default__timestamp_diff": {"name": "default__timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.default__timestamp_diff", "macro_sql": "{% macro default__timestamp_diff(first_date, second_date, datepart) %}\n\n datediff(\n {{ datepart }},\n {{ first_date }},\n {{ second_date }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783708211.5921624, "supported_languages": null}, "macro.fivetran_utils.redshift__timestamp_diff": {"name": "redshift__timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.redshift__timestamp_diff", "macro_sql": "{% macro redshift__timestamp_diff(first_date, second_date, datepart) %}\n\n datediff(\n {{ datepart }},\n {{ first_date }},\n {{ second_date }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783708211.5925117, "supported_languages": null}, "macro.fivetran_utils.bigquery__timestamp_diff": {"name": "bigquery__timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.bigquery__timestamp_diff", "macro_sql": "{% macro bigquery__timestamp_diff(first_date, second_date, datepart) %}\n\n timestamp_diff(\n {{second_date}},\n {{first_date}},\n {{datepart}}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783708211.5928426, "supported_languages": null}, "macro.fivetran_utils.postgres__timestamp_diff": {"name": "postgres__timestamp_diff", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_diff.sql", "original_file_path": "macros/timestamp_diff.sql", "unique_id": "macro.fivetran_utils.postgres__timestamp_diff", "macro_sql": "{% macro postgres__timestamp_diff(first_date, second_date, datepart) %}\n\n {% if datepart == 'year' %}\n (date_part('year', ({{second_date}})::date) - date_part('year', ({{first_date}})::date))\n {% elif datepart == 'quarter' %}\n ({{ dbt.datediff(first_date, second_date, 'year') }} * 4 + date_part('quarter', ({{second_date}})::date) - date_part('quarter', ({{first_date}})::date))\n {% elif datepart == 'month' %}\n ({{ dbt.datediff(first_date, second_date, 'year') }} * 12 + date_part('month', ({{second_date}})::date) - date_part('month', ({{first_date}})::date))\n {% elif datepart == 'day' %}\n (({{second_date}})::date - ({{first_date}})::date)\n {% elif datepart == 'week' %}\n ({{ dbt.datediff(first_date, second_date, 'day') }} / 7 + case\n when date_part('dow', ({{first_date}})::timestamp) <= date_part('dow', ({{second_date}})::timestamp) then\n case when {{first_date}} <= {{second_date}} then 0 else -1 end\n else\n case when {{first_date}} <= {{second_date}} then 1 else 0 end\n end)\n {% elif datepart == 'hour' %}\n ({{ dbt.datediff(first_date, second_date, 'day') }} * 24 + date_part('hour', ({{second_date}})::timestamp) - date_part('hour', ({{first_date}})::timestamp))\n {% elif datepart == 'minute' %}\n ({{ dbt.datediff(first_date, second_date, 'hour') }} * 60 + date_part('minute', ({{second_date}})::timestamp) - date_part('minute', ({{first_date}})::timestamp))\n {% elif datepart == 'second' %}\n ({{ dbt.datediff(first_date, second_date, 'minute') }} * 60 + floor(date_part('second', ({{second_date}})::timestamp)) - floor(date_part('second', ({{first_date}})::timestamp)))\n {% elif datepart == 'millisecond' %}\n ({{ dbt.datediff(first_date, second_date, 'minute') }} * 60000 + floor(date_part('millisecond', ({{second_date}})::timestamp)) - floor(date_part('millisecond', ({{first_date}})::timestamp)))\n {% elif datepart == 'microsecond' %}\n ({{ dbt.datediff(first_date, second_date, 'minute') }} * 60000000 + floor(date_part('microsecond', ({{second_date}})::timestamp)) - floor(date_part('microsecond', ({{first_date}})::timestamp)))\n {% else %}\n {{ exceptions.raise_compiler_error(\"Unsupported datepart for macro datediff in postgres: {!r}\".format(datepart)) }}\n {% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783708211.5962493, "supported_languages": null}, "macro.fivetran_utils.max_bool": {"name": "max_bool", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "unique_id": "macro.fivetran_utils.max_bool", "macro_sql": "{% macro max_bool(boolean_field) -%}\n\n{{ adapter.dispatch('max_bool', 'fivetran_utils') (boolean_field) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__max_bool"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "boolean_field", "type": null, "description": ""}], "created_at": 1783708211.5968087, "supported_languages": null}, "macro.fivetran_utils.default__max_bool": {"name": "default__max_bool", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "unique_id": "macro.fivetran_utils.default__max_bool", "macro_sql": "{% macro default__max_bool(boolean_field) %}\n\n bool_or( {{ boolean_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "boolean_field", "type": null, "description": ""}], "created_at": 1783708211.5970314, "supported_languages": null}, "macro.fivetran_utils.snowflake__max_bool": {"name": "snowflake__max_bool", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "unique_id": "macro.fivetran_utils.snowflake__max_bool", "macro_sql": "{% macro snowflake__max_bool(boolean_field) %}\n\n max( {{ boolean_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "boolean_field", "type": null, "description": ""}], "created_at": 1783708211.5972748, "supported_languages": null}, "macro.fivetran_utils.bigquery__max_bool": {"name": "bigquery__max_bool", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/max_bool.sql", "original_file_path": "macros/max_bool.sql", "unique_id": "macro.fivetran_utils.bigquery__max_bool", "macro_sql": "{% macro bigquery__max_bool(boolean_field) %}\n\n max( {{ boolean_field }} )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "boolean_field", "type": null, "description": ""}], "created_at": 1783708211.5974908, "supported_languages": null}, "macro.fivetran_utils.fill_pass_through_columns": {"name": "fill_pass_through_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/fill_pass_through_columns.sql", "original_file_path": "macros/fill_pass_through_columns.sql", "unique_id": "macro.fivetran_utils.fill_pass_through_columns", "macro_sql": "{% macro fill_pass_through_columns(pass_through_variable) %}\n\n{% if var(pass_through_variable) %}\n {% for field in var(pass_through_variable) %}\n {% if field is mapping %}\n {% if field.transform_sql %}\n , {{ field.transform_sql }} as {{ field.alias if field.alias else field.name }}\n {% else %}\n , {{ field.alias if field.alias else field.name }}\n {% endif %}\n {% else %}\n , {{ field }}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}], "created_at": 1783708211.5988426, "supported_languages": null}, "macro.fivetran_utils.seed_data_helper": {"name": "seed_data_helper", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/seed_data_helper.sql", "original_file_path": "macros/seed_data_helper.sql", "unique_id": "macro.fivetran_utils.seed_data_helper", "macro_sql": "{% macro seed_data_helper(seed_name, warehouses) %}\n\n{% if target.type in warehouses %}\n {% for w in warehouses %}\n {% if target.type == w %}\n {{ return(ref(seed_name ~ \"_\" ~ w ~ \"\")) }}\n {% endif %}\n {% endfor %}\n{% else %}\n{{ return(ref(seed_name)) }}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "seed_name", "type": null, "description": ""}, {"name": "warehouses", "type": null, "description": ""}], "created_at": 1783708211.5999498, "supported_languages": null}, "macro.fivetran_utils.remove_prefix_from_columns": {"name": "remove_prefix_from_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/remove_prefix_from_columns.sql", "original_file_path": "macros/remove_prefix_from_columns.sql", "unique_id": "macro.fivetran_utils.remove_prefix_from_columns", "macro_sql": "{% macro remove_prefix_from_columns(columns, prefix='', exclude=[]) %}\n\n {%- for col in columns if col.name not in exclude -%}\n {%- if col.name[:prefix|length]|lower == prefix -%}\n {{ col.name }} as {{ col.name[prefix|length:] }}\n {%- else -%}\n {{ col.name }}\n {%- endif -%}\n {%- if not loop.last -%},{%- endif %}\n {% endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "columns", "type": null, "description": ""}, {"name": "prefix", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}], "created_at": 1783708211.6011512, "supported_languages": null}, "macro.fivetran_utils.timestamp_add": {"name": "timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.timestamp_add", "macro_sql": "{% macro timestamp_add(datepart, interval, from_timestamp) -%}\n\n{{ adapter.dispatch('timestamp_add', 'fivetran_utils') (datepart, interval, from_timestamp) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.postgres__timestamp_add"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_timestamp", "type": null, "description": ""}], "created_at": 1783708211.6019158, "supported_languages": null}, "macro.fivetran_utils.default__timestamp_add": {"name": "default__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.default__timestamp_add", "macro_sql": "{% macro default__timestamp_add(datepart, interval, from_timestamp) %}\n\n timestampadd(\n {{ datepart }},\n {{ interval }},\n {{ from_timestamp }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_timestamp", "type": null, "description": ""}], "created_at": 1783708211.602279, "supported_languages": null}, "macro.fivetran_utils.bigquery__timestamp_add": {"name": "bigquery__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.bigquery__timestamp_add", "macro_sql": "{% macro bigquery__timestamp_add(datepart, interval, from_timestamp) %}\n\n timestamp_add({{ from_timestamp }}, interval {{ interval }} {{ datepart }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_timestamp", "type": null, "description": ""}], "created_at": 1783708211.6027145, "supported_languages": null}, "macro.fivetran_utils.redshift__timestamp_add": {"name": "redshift__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.redshift__timestamp_add", "macro_sql": "{% macro redshift__timestamp_add(datepart, interval, from_timestamp) %}\n\n dateadd(\n {{ datepart }},\n {{ interval }},\n {{ from_timestamp }}\n )\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_timestamp", "type": null, "description": ""}], "created_at": 1783708211.6030524, "supported_languages": null}, "macro.fivetran_utils.postgres__timestamp_add": {"name": "postgres__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.postgres__timestamp_add", "macro_sql": "{% macro postgres__timestamp_add(datepart, interval, from_timestamp) %}\n\n {{ from_timestamp }} + ((interval '1 {{ datepart }}') * ({{ interval }}))\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_timestamp", "type": null, "description": ""}], "created_at": 1783708211.6034105, "supported_languages": null}, "macro.fivetran_utils.spark__timestamp_add": {"name": "spark__timestamp_add", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/timestamp_add.sql", "original_file_path": "macros/timestamp_add.sql", "unique_id": "macro.fivetran_utils.spark__timestamp_add", "macro_sql": "{% macro spark__timestamp_add(datepart, interval, from_timestamp) %}\n\n {{ dbt.dateadd(datepart, interval, from_timestamp) }}\n \n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_timestamp", "type": null, "description": ""}], "created_at": 1783708211.6037624, "supported_languages": null}, "macro.fivetran_utils.enabled_vars_one_true": {"name": "enabled_vars_one_true", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/enabled_vars_one_true.sql", "original_file_path": "macros/enabled_vars_one_true.sql", "unique_id": "macro.fivetran_utils.enabled_vars_one_true", "macro_sql": "{% macro enabled_vars_one_true(vars) %}\n\n{% for v in vars %}\n \n {% if var(v, False) == True %}\n {{ return(True) }}\n {% endif %}\n\n{% endfor %}\n\n{{ return(False) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "vars", "type": null, "description": ""}], "created_at": 1783708211.6045413, "supported_languages": null}, "macro.fivetran_utils.union_connections": {"name": "union_connections", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_connections.sql", "original_file_path": "macros/union_connections.sql", "unique_id": "macro.fivetran_utils.union_connections", "macro_sql": "{% macro union_connections(connection_dictionary, single_source_name, single_table_name, default_identifier=single_table_name) %}\n\n{{ adapter.dispatch('union_connections', 'fivetran_utils') (connection_dictionary, single_source_name, single_table_name, default_identifier) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__union_connections"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "connection_dictionary", "type": null, "description": ""}, {"name": "single_source_name", "type": null, "description": ""}, {"name": "single_table_name", "type": null, "description": ""}, {"name": "default_identifier", "type": null, "description": ""}], "created_at": 1783708211.6059954, "supported_languages": null}, "macro.fivetran_utils.default__union_connections": {"name": "default__union_connections", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/union_connections.sql", "original_file_path": "macros/union_connections.sql", "unique_id": "macro.fivetran_utils.default__union_connections", "macro_sql": "{% macro default__union_connections(connection_dictionary, single_source_name, single_table_name, default_identifier=single_table_name) %}\n\n{%- set exception_warning = \"\\n\\nPlease be aware: The \" ~ single_source_name|upper ~ \".\" ~ single_table_name|upper ~ \" table was not found in your schema(s). The Fivetran Data Model will create a completely empty staging model as to not break downstream transformations. To turn off these warnings, set the `fivetran__remove_empty_table_warnings` variable to TRUE (see https://github.com/fivetran/dbt_fivetran_utils/tree/releases/v0.4.latest#union_connections-source for details).\\n\"%}\n{%- set using_empty_table_warnings = (execute and not var('fivetran__remove_empty_table_warnings', false)) %}\n{%- set connections = var(connection_dictionary, []) %}\n{%- set using_unioning = connections | length > 0 %}\n{%- set identifier_var = single_source_name + \"_\" + single_table_name + \"_identifier\" %}\n\n{%- if using_unioning %}\n{# For unioning #}\n {%- set relations = [] -%}\n {%- for connection in connections -%}\n\n {% if var('has_defined_sources', false) %}\n {%- set database = source(connection.name, single_table_name).database %}\n {%- set schema = source(connection.name, single_table_name).schema %}\n {%- set identifier = source(connection.name, single_table_name).identifier %}\n {%- else %}\n {%- set database = connection.database if connection.database else target.database %}\n {%- set schema = connection.schema if connection.schema else single_source_name %}\n {%- set identifier = var(identifier_var, default_identifier) %}\n {%- endif %}\n \n {%- set relation=adapter.get_relation(\n database=database,\n schema=schema,\n identifier=identifier\n )\n -%}\n\n {%- if relation is not none -%}\n {%- do relations.append(relation) -%}\n {%- endif -%}\n\n -- ** Values passed to adapter.get_relation:\n {{ '-- database: ' ~ database }}\n {{ '-- schema: ' ~ schema }}\n {{ '-- identifier: ' ~ identifier ~ '\\n' }}\n\n {%- endfor -%}\n\n {%- if relations | length > 0 -%}\n {{ fivetran_utils.union_relations_custom(relations, source_column_name='_dbt_source_relation') }}\n\n {%- else -%}\n {{ exceptions.warn(exception_warning) if using_empty_table_warnings }}\n\n select\n cast(null as {{ dbt.type_string() }}) as _dbt_source_relation\n limit {{ '0' if target.type != 'redshift' else '1' }}\n {%- endif -%}\n\n{% else %}\n{# Not unioning #}\n\n {%- set database = source(single_source_name, single_table_name).database %}\n {%- set schema = source(single_source_name, single_table_name).schema %}\n {%- set identifier = var(identifier_var, default_identifier) %}\n\n {%- set relation=adapter.get_relation(\n database=database,\n schema=schema,\n identifier=identifier\n )\n -%}\n\n -- ** Values passed to adapter.get_relation:\n {{ '-- full-identifier_var: ' ~ identifier_var }}\n {{ '-- database: ' ~ database }} \n {{ '-- schema: ' ~ schema }}\n {{ '-- identifier: ' ~ identifier ~ '\\n' }}\n\n {% if relation is not none -%}\n select\n {{ dbt_utils.star(from=source(single_source_name, single_table_name)) }}\n from {{ source(single_source_name, single_table_name) }} as source_table\n\n {% else %}\n {{ exceptions.warn(exception_warning) if using_empty_table_warnings }}\n\n select\n cast(null as {{ dbt.type_string() }}) as _dbt_source_relation\n limit {{ '0' if target.type != 'redshift' else '1' }}\n {%- endif -%}\n{% endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.union_relations_custom", "macro.dbt.type_string", "macro.dbt_utils.star"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "connection_dictionary", "type": null, "description": ""}, {"name": "single_source_name", "type": null, "description": ""}, {"name": "single_table_name", "type": null, "description": ""}, {"name": "default_identifier", "type": null, "description": ""}], "created_at": 1783708211.6116176, "supported_languages": null}, "macro.fivetran_utils.partition_by_source_relation": {"name": "partition_by_source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/partition_by_source_relation.sql", "original_file_path": "macros/partition_by_source_relation.sql", "unique_id": "macro.fivetran_utils.partition_by_source_relation", "macro_sql": "{% macro partition_by_source_relation(package_name, has_other_partitions='yes', alias=None, package_prefix_union_variable=true) %}\n {{ return(adapter.dispatch('partition_by_source_relation', 'fivetran_utils')(package_name, has_other_partitions, alias, package_prefix_union_variable)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__partition_by_source_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "package_name", "type": null, "description": ""}, {"name": "has_other_partitions", "type": null, "description": ""}, {"name": "alias", "type": null, "description": ""}, {"name": "package_prefix_union_variable", "type": null, "description": ""}], "created_at": 1783708211.6126823, "supported_languages": null}, "macro.fivetran_utils.default__partition_by_source_relation": {"name": "default__partition_by_source_relation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/partition_by_source_relation.sql", "original_file_path": "macros/partition_by_source_relation.sql", "unique_id": "macro.fivetran_utils.default__partition_by_source_relation", "macro_sql": "{% macro default__partition_by_source_relation(package_name, has_other_partitions='yes', alias=None, package_prefix_union_variable=true) -%}\n\n{%- if package_prefix_union_variable %}\n {%- set union_schemas_var = package_name ~ '_union_schemas' -%}\n {%- set union_databases_var = package_name ~ '_union_databases' -%}\n{%- else %}\n {%- set union_schemas_var = 'union_schemas' -%}\n {%- set union_databases_var = 'union_databases' -%}\n{%- endif -%}\n\n{%- set is_unioning = var(union_schemas_var, [])|length > 1 or var(union_databases_var, [])|length > 1 or var(package_name ~ '_sources', [])|length > 1 -%}\n{%- set prefix = '' if alias is none else alias ~ '.' -%}\n\n{%- if has_other_partitions == 'no' -%}\n {{- 'partition by ' ~ prefix ~ 'source_relation' if is_unioning else '' -}}\n{%- else -%}\n {{- ', ' ~ prefix ~ 'source_relation' if is_unioning else '' -}}\n{%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "package_name", "type": null, "description": ""}, {"name": "has_other_partitions", "type": null, "description": ""}, {"name": "alias", "type": null, "description": ""}, {"name": "package_prefix_union_variable", "type": null, "description": ""}], "created_at": 1783708211.614512, "supported_languages": null}, "macro.fivetran_utils.persist_pass_through_columns": {"name": "persist_pass_through_columns", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/persist_pass_through_columns.sql", "original_file_path": "macros/persist_pass_through_columns.sql", "unique_id": "macro.fivetran_utils.persist_pass_through_columns", "macro_sql": "{% macro persist_pass_through_columns(pass_through_variable, identifier=none, transform='') %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n , {{ transform ~ '(' ~ (identifier ~ '.' if identifier else '') ~ (field.alias if field.alias else field.name) ~ ')' }} as {{ field.alias if field.alias else field.name }}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "transform", "type": null, "description": ""}], "created_at": 1783708211.6157513, "supported_languages": null}, "macro.fivetran_utils.drop_schemas_automation": {"name": "drop_schemas_automation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/drop_schemas_automation.sql", "original_file_path": "macros/drop_schemas_automation.sql", "unique_id": "macro.fivetran_utils.drop_schemas_automation", "macro_sql": "{% macro drop_schemas_automation(drop_target_schema=true) %}\n {{ return(adapter.dispatch('drop_schemas_automation', 'fivetran_utils')(drop_target_schema)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.default__drop_schemas_automation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "drop_target_schema", "type": null, "description": ""}], "created_at": 1783708211.6165955, "supported_languages": null}, "macro.fivetran_utils.default__drop_schemas_automation": {"name": "default__drop_schemas_automation", "resource_type": "macro", "package_name": "fivetran_utils", "path": "macros/drop_schemas_automation.sql", "original_file_path": "macros/drop_schemas_automation.sql", "unique_id": "macro.fivetran_utils.default__drop_schemas_automation", "macro_sql": "{% macro default__drop_schemas_automation(drop_target_schema=true) %}\n\n{% set fetch_list_sql %}\n {% if target.type not in ('databricks', 'spark') %}\n select schema_name\n from \n {{ wrap_in_quotes(target.database) }}.INFORMATION_SCHEMA.SCHEMATA\n where lower(schema_name) like '{{ target.schema | lower }}{%- if not drop_target_schema -%}_{%- endif -%}%'\n {% else %}\n SHOW SCHEMAS LIKE '{{ target.schema }}{%- if not drop_target_schema -%}_{%- endif -%}*'\n {% endif %}\n{% endset %}\n\n{% set results = run_query(fetch_list_sql) %}\n\n{% if execute %}\n {% set results_list = results.columns[0].values() %}\n{% else %}\n {% set results_list = [] %}\n{% endif %}\n\n{% for schema_to_drop in results_list %}\n {% do adapter.drop_schema(api.Relation.create(database=target.database, schema=schema_to_drop)) %}\n {{ print('Schema ' ~ schema_to_drop ~ ' successfully dropped from the ' ~ target.database ~ ' database.\\n')}}\n{% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.wrap_in_quotes", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "drop_target_schema", "type": null, "description": ""}], "created_at": 1783708211.6186285, "supported_languages": null}, "macro.ad_reporting.get_query": {"name": "get_query", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/get_query.sql", "original_file_path": "macros/get_query.sql", "unique_id": "macro.ad_reporting.get_query", "macro_sql": "{% macro get_query(platform=None, report_type=None, field_mapping=None, relation=None) %}\n\n{%- set consistent_fields = ['spend', 'impressions', 'clicks', 'conversions', 'conversions_value'] -%}\n{%- set account_fields = ['account_id', 'account_name'] -%}\n{%- set campaign_fields = ['campaign_id', 'campaign_name'] -%}\n{%- set ad_group_fields = ['ad_group_id', 'ad_group_name'] -%}\n{%- set ad_fields = ['ad_id', 'ad_name'] -%}\n{%- set url_fields = ['base_url', 'url_host', 'url_path', 'utm_source', 'utm_medium', 'utm_campaign', 'utm_content', 'utm_term'] -%}\n{%- set keyword_fields = ['keyword_id','keyword_text','keyword_match_type'] -%}\n{%- set search_fields = ['keyword_id', 'keyword_text', 'search_match_type', 'search_query'] -%}\n{%- set country_fields = ['country', 'country_code'] -%}\n{%- set region_fields = ['region'] -%}\n\n{%- if field_mapping is not none -%}\n{%- set fields = field_mapping.keys() -%}\n{%- endif -%}\n\n{%- set final_fields_superset={} -%}\n\n{#- Add the consistent_fields and account_fields to all reports regardless of type -#}\n{%- if report_type -%}\n {%- for consistent_field in consistent_fields -%}\n {%- do final_fields_superset.update({consistent_field: consistent_field}) -%}\n {%- endfor -%}\n {%- for account_field in account_fields -%}\n {%- do final_fields_superset.update({account_field: account_field}) -%}\n {%- endfor -%}\n{%- endif -%}\n\n{#- For account level reports and lower, add account_fields -#}\n{%- if report_type in ['campaign', 'ad_group', 'ad', 'url', 'keyword', 'search', 'account', 'country', 'region'] -%}\n {%- for account_field in account_fields -%}\n {#- When campaign_passthrough_metrics are defined, add them too but only to the ad_group report_type -#}\n {%- if report_type == 'account' and var('ad_reporting__account_passthrough_metrics', []) -%}\n {% set account_passthrough_metric_array_of_dicts = var('ad_reporting__account_passthrough_metrics') %}\n {%- for account_passthrough_metric_dict in account_passthrough_metric_array_of_dicts -%}\n {%- for account_passthrough_metric_value in account_passthrough_metric_dict.values() -%}\n\n {#- Add _c suffix if conversions are present in the passthrough metrics -#}\n {%- if account_passthrough_metric_value == 'conversions' or account_passthrough_metric_value == 'conversions_value' -%}\n {%- do final_fields_superset.update({account_passthrough_metric_value ~ '_c': account_passthrough_metric_value}) -%}\n {%- else -%}\n {%- do final_fields_superset.update({account_passthrough_metric_value: account_passthrough_metric_value}) -%}\n {%- endif -%}\n\n {%- endfor -%}\n {%- endfor -%}\n {%- endif -%}\n {%- do final_fields_superset.update({account_field: account_field}) -%}\n {%- endfor -%}\n{%- endif -%}\n\n{#- For campaign level reports and lower, add campaign_fields -#}\n{%- if report_type in ['campaign', 'ad_group', 'ad', 'url', 'keyword', 'search', 'country', 'region'] -%}\n {%- for campaign_field in campaign_fields -%}\n {#- When campaign_passthrough_metrics are defined, add them too but only to the ad_group report_type -#}\n {%- if report_type == 'campaign' and var('ad_reporting__campaign_passthrough_metrics', []) -%}\n {% set campaign_passthrough_metric_array_of_dicts = var('ad_reporting__campaign_passthrough_metrics') %}\n {%- for campaign_passthrough_metric_dict in campaign_passthrough_metric_array_of_dicts -%}\n {%- for campaign_passthrough_metric_value in campaign_passthrough_metric_dict.values() -%}\n\n {#- Add _c suffix if conversions are present in the passthrough metrics -#}\n {%- if campaign_passthrough_metric_value == 'conversions' or campaign_passthrough_metric_value == 'conversions_value' -%}\n {%- do final_fields_superset.update({campaign_passthrough_metric_value ~ '_c': campaign_passthrough_metric_value}) -%}\n {%- else -%}\n {%- do final_fields_superset.update({campaign_passthrough_metric_value: campaign_passthrough_metric_value}) -%}\n {%- endif -%}\n\n {%- endfor -%}\n {%- endfor -%}\n {%- endif -%}\n {%- do final_fields_superset.update({campaign_field: campaign_field}) -%}\n {%- endfor -%}\n{%- endif -%}\n\n{#- For ad_group level reports, equivalent and lower, add ad_group_fields -#}\n{%- if report_type in ['ad_group', 'ad', 'url', 'keyword', 'search'] -%}\n {%- for ad_group_field in ad_group_fields -%}\n {#- When ad_group_passthrough_metrics are defined, add them too but only to the ad_group report_type -#}\n {%- if report_type == 'ad_group' and var('ad_reporting__ad_group_passthrough_metrics', []) -%}\n {% set ad_group_passthrough_metric_array_of_dicts = var('ad_reporting__ad_group_passthrough_metrics') %}\n {%- for ad_group_passthrough_metric_dict in ad_group_passthrough_metric_array_of_dicts -%}\n {%- for ad_group_passthrough_metric_value in ad_group_passthrough_metric_dict.values() -%}\n\n {#- Add _c suffix if conversions are present in the passthrough metrics -#}\n {%- if ad_group_passthrough_metric_value == 'conversions' or ad_group_passthrough_metric_value == 'conversions_value' -%}\n {%- do final_fields_superset.update({ad_group_passthrough_metric_value ~ '_c': ad_group_passthrough_metric_value}) -%}\n {%- else -%}\n {%- do final_fields_superset.update({ad_group_passthrough_metric_value: ad_group_passthrough_metric_value}) -%}\n {%- endif -%}\n\n {%- endfor -%}\n {%- endfor -%}\n {%- endif -%}\n {%- do final_fields_superset.update({ad_group_field: ad_group_field}) -%}\n {%- endfor -%}\n{%- endif -%}\n\n{#- For ad reports, add ad_fields and ad_passthrough_metrics (if any) -#}\n{%- if report_type == 'ad' -%}\n {%- if var('ad_reporting__ad_passthrough_metrics', []) -%}\n {%- set ad_passthrough_metrics_values = [] -%}\n {%- set ad_passthrough_metrics_array_of_dicts = var('ad_reporting__ad_passthrough_metrics') -%}\n {%- for ad_passthrough_metrics_dict in ad_passthrough_metrics_array_of_dicts -%}\n {%- for _, value in ad_passthrough_metrics_dict.items() -%}\n {%- do ad_passthrough_metrics_values.append(value) -%}\n {%- endfor -%}\n {%- endfor -%}\n {%- set combined_ad_fields = ad_fields + ad_passthrough_metrics_values -%}\n {%- else -%}\n {%- set combined_ad_fields = ad_fields -%}\n {%- endif -%}\n {%- for ad_field in combined_ad_fields -%}\n\n {#- Add _c suffix if conversions are present in the passthrough metrics -#}\n {%- if ad_field == 'conversions' or ad_field == 'conversions_value' -%}\n {%- do final_fields_superset.update({ad_field ~ '_c': ad_field}) -%}\n {%- else -%}\n {%- do final_fields_superset.update({ad_field: ad_field}) -%}\n {%- endif -%}\n\n {%- endfor -%}\n{%- endif -%}\n\n{#- For url level reports, add ad_fields and ad_passthrough_metrics (if any) -#}\n{%- if report_type == 'url' -%}\n {%- if var('ad_reporting__ad_passthrough_metrics', []) -%}\n {%- set ad_passthrough_metrics_values = [] -%}\n {%- set ad_passthrough_metrics_array_of_dicts = var('ad_reporting__ad_passthrough_metrics') -%}\n {%- for ad_passthrough_metrics_dict in ad_passthrough_metrics_array_of_dicts -%}\n {%- for _, value in ad_passthrough_metrics_dict.items() -%}\n {%- do ad_passthrough_metrics_values.append(value) -%}\n {%- endfor -%}\n {%- endfor -%}\n {%- set combined_ad_fields = url_fields + ad_passthrough_metrics_values -%}\n {%- else -%}\n {%- set combined_ad_fields = url_fields -%}\n {%- endif -%}\n {%- for ad_field in combined_ad_fields -%}\n\n {#- Add _c suffix if conversions are present in the passthrough metrics -#}\n {%- if ad_field == 'conversions' or ad_field == 'conversions_value' -%}\n {%- do final_fields_superset.update({ad_field ~ '_c': ad_field}) -%}\n {%- else -%}\n {%- do final_fields_superset.update({ad_field: ad_field}) -%}\n {%- endif -%}\n\n {%- endfor -%}\n{%- endif -%}\n\n{#- For keyword level reports, add keyword_fields and keyword_passthrough_metrics (if any) -#}\n{%- if report_type == 'keyword' -%}\n {%- if var('ad_reporting__keyword_passthrough_metrics', []) -%}\n {%- set keyword_passthrough_metrics_values = [] -%}\n {%- set keyword_passthrough_metrics_array_of_dicts = var('ad_reporting__keyword_passthrough_metrics') -%}\n {%- for keyword_passthrough_metrics_dict in keyword_passthrough_metrics_array_of_dicts -%}\n {%- for _, value in keyword_passthrough_metrics_dict.items() -%}\n {%- do keyword_passthrough_metrics_values.append(value) -%}\n\n {%- endfor -%}\n {%- endfor -%}\n {%- set combined_keyword_fields = keyword_fields + keyword_passthrough_metrics_values -%}\n {%- else -%}\n {%- set combined_keyword_fields = keyword_fields -%}\n {%- endif -%}\n {%- for keyword_field in combined_keyword_fields -%}\n\n {#- Add _c suffix if conversions are present in the passthrough metrics -#}\n {%- if keyword_field == 'conversions' or keyword_field == 'conversions_value' -%}\n {%- do final_fields_superset.update({keyword_field ~ '_c': keyword_field}) -%}\n {%- else -%}\n {%- do final_fields_superset.update({keyword_field: keyword_field}) -%}\n {%- endif -%}\n\n {%- endfor -%}\n{%- endif -%}\n\n{#- For search level reports, add search_fields and search_passthrough_metrics (if any) -#}\n{%- if report_type == 'search' -%}\n {%- if var('ad_reporting__search_passthrough_metrics',[]) -%}\n {%- set search_passthrough_metrics_values = [] -%}\n {%- set search_passthrough_metrics_array_of_dicts = var('ad_reporting__search_passthrough_metrics') -%}\n {%- for search_passthrough_metrics_dict in search_passthrough_metrics_array_of_dicts -%}\n {%- for _, value in search_passthrough_metrics_dict.items() -%}\n {%- do search_passthrough_metrics_values.append(value) -%}\n\n {%- endfor -%}\n {%- endfor -%}\n {%- set combined_search_fields = search_fields + search_passthrough_metrics_values -%}\n {%- else -%}\n {%- set combined_search_fields = search_fields -%}\n {%- endif -%}\n {%- for search_field in combined_search_fields -%}\n\n {#- Add _c suffix if conversions are present in the passthrough metrics -#}\n {%- if search_field == 'conversions' or search_field == 'conversions_value' -%}\n {%- do final_fields_superset.update({search_field ~ '_c': search_field}) -%}\n {%- else -%}\n {%- do final_fields_superset.update({search_field: search_field}) -%}\n {%- endif -%}\n\n {%- endfor -%}\n{%- endif -%}\n\n{#- For country level reports and lower (currently not passing to region but perhaps in the future), add country_fields and country_passthrough_metrics -#}\n{%- if report_type == 'country' -%}\n {%- for country_field in country_fields -%}\n {%- if var('ad_reporting__country_passthrough_metrics', []) -%}\n {% set country_passthrough_metric_array_of_dicts = var('ad_reporting__country_passthrough_metrics') %}\n {%- for country_passthrough_metric_dict in country_passthrough_metric_array_of_dicts -%}\n {%- for country_passthrough_metric_value in country_passthrough_metric_dict.values() -%}\n\n {%- do final_fields_superset.update({country_passthrough_metric_value: country_passthrough_metric_value}) -%}\n\n {%- endfor -%}\n {%- endfor -%}\n {%- endif -%}\n {%- do final_fields_superset.update({country_field: country_field}) -%}\n {%- endfor -%}\n{%- endif -%}\n\n{#- For region-level reports, add region_fields and region_passthrough_metrics (if any) -#}\n{%- if report_type == 'region' -%}\n {%- if var('ad_reporting__region_passthrough_metrics',[]) -%}\n {%- set region_passthrough_metrics_values = [] -%}\n {%- set region_passthrough_metrics_array_of_dicts = var('ad_reporting__region_passthrough_metrics') -%}\n {%- for region_passthrough_metrics_dict in region_passthrough_metrics_array_of_dicts -%}\n {%- for _, value in region_passthrough_metrics_dict.items() -%}\n {%- do region_passthrough_metrics_values.append(value) -%}\n\n {%- endfor -%}\n {%- endfor -%}\n {%- set combined_region_fields = region_fields + region_passthrough_metrics_values -%}\n {%- else -%}\n {%- set combined_region_fields = region_fields -%}\n {%- endif -%}\n {%- for region_field in combined_region_fields -%}\n\n {%- do final_fields_superset.update({region_field: region_field}) -%}\n\n {%- endfor -%}\n{%- endif -%}\n\n{%- if field_mapping is not none -%}\n {%- for field in fields -%}\n {%- do final_fields_superset.update({field:field_mapping[field]}) -%}\n {%- endfor -%}\n{%- endif -%}\n\nselect \n source_relation,\n {{ get_date_from_timestamp('date_month' if platform == 'linkedin_ads' and report_type in ('country', 'region') else 'date_day') }} as date_day,\n cast( '{{ platform }}' as {{ dbt.type_string() }}) as platform,\n\n {% for field in final_fields_superset.keys()|sort()|reject('equalto', 'date_month') -%}\n {% if field in consistent_fields and field not in ['spend', 'conversions', 'conversions_value'] -%}\n cast({{ final_fields_superset[field] }} as {{ dbt.type_int() }}) as {{ field }}\n\n {% elif field in ['spend', 'conversions', 'conversions_value'] -%}\n cast({{ final_fields_superset[field] }} as {{ dbt.type_float() }}) as {{ field }}\n\n {% elif '_id' in field or '_name' in field or 'url' in field or 'utm' in field or field in ['keyword_match_type', 'keyword_text', 'search_match_type', 'search_query', 'country', 'country_code', 'region'] -%}\n cast({{ final_fields_superset[field] }} as {{ dbt.type_string() }}) as {{ field }}\n\n {# This is the case for the rest of fields (passthrough_metrics) #}\n {% else %}\n cast({{ final_fields_superset[field] }} as {{ dbt.type_float() }}) as {{ field }}\n {% endif -%}\n {%- if not loop.last -%},{%- endif -%}\n {%- endfor %}\nfrom {{ relation }}\n{% endmacro %}", "depends_on": {"macros": ["macro.ad_reporting.get_date_from_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.dbt.type_float"]}, "description": "This macro compiles the final query with all aliasing and casting incorporated.", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": "ad_reporting://macros/macros_docs.yml", "arguments": [{"name": "platform", "type": "string", "description": "Specifies the platform for the CTE; this value should match exactly one value for the `all_packages` variable within `macros/get_enabled_packages.sql`.\n"}, {"name": "report_type", "type": "string", "description": "Specifies the report type and should map to the respective model; could take on one of the following values ['account', 'campaign', 'ad_group', 'ad', 'url', 'keyword', 'search'].\n"}, {"name": "field_mapping", "type": null, "description": "A dictionary that specifies any column name overriding as necessary since standard names in Ad Reporting may map to a different name as it appears natively within each platform. Each key will have exactly one corresponding string value; if a value is NULL then it will map to the string 'null'.\n"}, {"name": "relation", "type": null, "description": "This is a reference to the upstream model that the query will be selecting from; an example argument would look like this: relation=ref('tiktok_ads__advertiser_report').\n"}], "created_at": 1783708223.5402596, "supported_languages": null}, "macro.ad_reporting.is_enabled": {"name": "is_enabled", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/is_enabled.sql", "original_file_path": "macros/is_enabled.sql", "unique_id": "macro.ad_reporting.is_enabled", "macro_sql": "{% macro is_enabled(enabled_packages) %}\n\n{% if enabled_packages != [] %}\n {% set is_enabled = True %}\n{% else %}\n {% set is_enabled = False %}\n{% endif %}\n{{ return(is_enabled) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "This macro takes in a list of packages and determines if there is at least one package, if there is, it returns True, else false.", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": "ad_reporting://macros/macros_docs.yml", "arguments": [{"name": "enabled_packages", "type": "list[string]", "description": "List of packages enabled where each package name is a string."}], "created_at": 1783708223.5414395, "supported_languages": null}, "macro.ad_reporting.union_ctes": {"name": "union_ctes", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/union_ctes.sql", "original_file_path": "macros/union_ctes.sql", "unique_id": "macro.ad_reporting.union_ctes", "macro_sql": "{% macro union_ctes(ctes=[]) %}\n\n{% for cte in ctes %}\nselect * from {{ cte }}\n\n{% if not loop.last -%}\n union all\n{% endif -%}\n\n{% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "This macro allows for the unioning (union all) of specified CTEs.", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": "ad_reporting://macros/macros_docs.yml", "arguments": [{"name": "ctes", "type": "optional[list[string]]", "description": "List of strings for CTE names"}], "created_at": 1783708223.5424974, "supported_languages": null}, "macro.ad_reporting.get_date_from_timestamp": {"name": "get_date_from_timestamp", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/get_date_from_timestamp.sql", "original_file_path": "macros/get_date_from_timestamp.sql", "unique_id": "macro.ad_reporting.get_date_from_timestamp", "macro_sql": "{% macro get_date_from_timestamp(column) %}\n {{ return(adapter.dispatch('get_date_from_timestamp') (column)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.ad_reporting.default__get_date_from_timestamp"]}, "description": "This macro takes a column of type timestamp or forces the column into a timestamp (depending on the data warehouse) and extracts the date in the format of e.g. 2022-01-01.", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": "ad_reporting://macros/macros_docs.yml", "arguments": [{"name": "column", "type": "string", "description": "Specifies the column of type timestamp to extract the date from."}], "created_at": 1783708223.536614, "supported_languages": null}, "macro.ad_reporting.default__get_date_from_timestamp": {"name": "default__get_date_from_timestamp", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/get_date_from_timestamp.sql", "original_file_path": "macros/get_date_from_timestamp.sql", "unique_id": "macro.ad_reporting.default__get_date_from_timestamp", "macro_sql": "{% macro default__get_date_from_timestamp(column) %}\n date({{column}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}], "created_at": 1783708211.6440508, "supported_languages": null}, "macro.ad_reporting.bigquery__get_date_from_timestamp": {"name": "bigquery__get_date_from_timestamp", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/get_date_from_timestamp.sql", "original_file_path": "macros/get_date_from_timestamp.sql", "unique_id": "macro.ad_reporting.bigquery__get_date_from_timestamp", "macro_sql": "{% macro bigquery__get_date_from_timestamp(column) %}\n\n cast({{column}} as date)\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}], "created_at": 1783708211.644296, "supported_languages": null}, "macro.ad_reporting.spark__get_date_from_timestamp": {"name": "spark__get_date_from_timestamp", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/get_date_from_timestamp.sql", "original_file_path": "macros/get_date_from_timestamp.sql", "unique_id": "macro.ad_reporting.spark__get_date_from_timestamp", "macro_sql": "{% macro spark__get_date_from_timestamp(column) %}\n\n to_date(to_timestamp({{ column }}),'yyyyMMdd')\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}], "created_at": 1783708211.6445146, "supported_languages": null}, "macro.ad_reporting.snowflake__get_date_from_timestamp": {"name": "snowflake__get_date_from_timestamp", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/get_date_from_timestamp.sql", "original_file_path": "macros/get_date_from_timestamp.sql", "unique_id": "macro.ad_reporting.snowflake__get_date_from_timestamp", "macro_sql": "{% macro snowflake__get_date_from_timestamp(column) %}\n\n to_date(to_timestamp({{ column }}))\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}], "created_at": 1783708211.6447265, "supported_languages": null}, "macro.ad_reporting.get_enabled_packages": {"name": "get_enabled_packages", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/get_enabled_packages.sql", "original_file_path": "macros/get_enabled_packages.sql", "unique_id": "macro.ad_reporting.get_enabled_packages", "macro_sql": "{% macro get_enabled_packages(exclude=none, include=none) %}\n\n{%- if exclude and include -%}\n {{ exceptions.raise_compiler_error(\"Both an exclude and include list were provided `get_enabled_packages` macro. Only one is allowed\") }}\n{%- endif -%}\n\n{% set all_packages = [\n 'amazon_ads',\n 'apple_search_ads', \n 'facebook_ads', \n 'google_ads', \n 'linkedin_ads',\n 'microsoft_ads', \n 'pinterest_ads',\n 'snapchat_ads',\n 'tiktok_ads',\n 'twitter_ads',\n 'reddit_ads'] %}\n\n{% set enabled_packages = [] %}\n\n{% if include != [] %}\n {% for package in all_packages if var('ad_reporting__' ~ package ~ '_enabled', True) %}\n {% if include is not none %}\n {{ enabled_packages.append(package) if package in include }}\n {% elif exclude is not none %}\n {{ enabled_packages.append(package) if package not in exclude }}\n {% else %}\n {{ enabled_packages.append(package) }}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{{ return(enabled_packages) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "This macro evaluates all `ad_reporting___enabled` variables in the user's `dbt_project.yml` and returns a list of packages that are enabled.", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": "ad_reporting://macros/macros_docs.yml", "arguments": [{"name": "exclude", "type": "optional[list[string]]", "description": "This argument is optional and is the list of platforms to exclude in the enabled package evaluation."}, {"name": "include", "type": "optional[list[string]]", "description": "This argument is optional and is the list of platforms to include in the enabled package evaluation."}], "created_at": 1783708223.5382855, "supported_languages": null}, "macro.ad_reporting.ad_reporting_persist_pass_through_columns": {"name": "ad_reporting_persist_pass_through_columns", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/ad_reporting_persist_pass_through_columns.sql", "original_file_path": "macros/ad_reporting_persist_pass_through_columns.sql", "unique_id": "macro.ad_reporting.ad_reporting_persist_pass_through_columns", "macro_sql": "{% macro ad_reporting_persist_pass_through_columns(pass_through_variable, identifier=none, transform='', coalesce_with=none, alias_fields=[]) %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n {% set field_name = field.alias|default(field.name)|lower if field is mapping else field %}\n , {{ transform ~ '(' ~ ('coalesce(' if coalesce_with is not none else '') ~ (identifier ~ '.' if identifier else '') ~ field_name ~ ('_c' if field_name in alias_fields else '') ~ ((', ' ~ coalesce_with ~ ')') if coalesce_with is not none else '') ~ ')' }} \n as {{ field_name ~ ('_c' if field_name in alias_fields else '') }}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "transform", "type": null, "description": ""}, {"name": "coalesce_with", "type": null, "description": ""}, {"name": "alias_fields", "type": null, "description": ""}], "created_at": 1783708211.6498356, "supported_languages": null}, "macro.ad_reporting.fivetran_convert_timezone": {"name": "fivetran_convert_timezone", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_convert_timezone.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_convert_timezone.sql", "unique_id": "macro.ad_reporting.fivetran_convert_timezone", "macro_sql": "{%- macro fivetran_convert_timezone(column, target_tz=None, source_tz=None) -%}\n {%- set source_tz = \"UTC\" if not source_tz else source_tz -%}\n {%- set target_tz = var(\"dbt_date:time_zone\") if not target_tz else target_tz -%}\n {{ return(adapter.dispatch('fivetran_convert_timezone', 'ad_reporting') (column, target_tz, source_tz)) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.ad_reporting.postgres__fivetran_convert_timezone"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}, {"name": "target_tz", "type": null, "description": ""}, {"name": "source_tz", "type": null, "description": ""}], "created_at": 1783708211.6515284, "supported_languages": null}, "macro.ad_reporting.default__fivetran_convert_timezone": {"name": "default__fivetran_convert_timezone", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_convert_timezone.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_convert_timezone.sql", "unique_id": "macro.ad_reporting.default__fivetran_convert_timezone", "macro_sql": "{% macro default__fivetran_convert_timezone(column, target_tz, source_tz) -%}\n convert_timezone(\n '{{ source_tz }}',\n '{{ target_tz }}',\n cast({{ column }} as {{ dbt.type_timestamp() }})\n )\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}, {"name": "target_tz", "type": null, "description": ""}, {"name": "source_tz", "type": null, "description": ""}], "created_at": 1783708211.6520953, "supported_languages": null}, "macro.ad_reporting.bigquery__fivetran_convert_timezone": {"name": "bigquery__fivetran_convert_timezone", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_convert_timezone.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_convert_timezone.sql", "unique_id": "macro.ad_reporting.bigquery__fivetran_convert_timezone", "macro_sql": "{%- macro bigquery__fivetran_convert_timezone(column, target_tz, source_tz=None) -%}\n timestamp(datetime({{ column }}, '{{ target_tz}}'))\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}, {"name": "target_tz", "type": null, "description": ""}, {"name": "source_tz", "type": null, "description": ""}], "created_at": 1783708211.652536, "supported_languages": null}, "macro.ad_reporting.postgres__fivetran_convert_timezone": {"name": "postgres__fivetran_convert_timezone", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_convert_timezone.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_convert_timezone.sql", "unique_id": "macro.ad_reporting.postgres__fivetran_convert_timezone", "macro_sql": "{% macro postgres__fivetran_convert_timezone(column, target_tz, source_tz) -%}\n cast(\n cast({{ column }} as {{ dbt.type_timestamp() }})\n at time zone '{{ source_tz }}' at time zone '{{ target_tz }}'\n as {{ dbt.type_timestamp() }}\n )\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}, {"name": "target_tz", "type": null, "description": ""}, {"name": "source_tz", "type": null, "description": ""}], "created_at": 1783708211.653195, "supported_languages": null}, "macro.ad_reporting.redshift__fivetran_convert_timezone": {"name": "redshift__fivetran_convert_timezone", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_convert_timezone.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_convert_timezone.sql", "unique_id": "macro.ad_reporting.redshift__fivetran_convert_timezone", "macro_sql": "{%- macro redshift__fivetran_convert_timezone(column, target_tz, source_tz) -%}\n {{ return(ad_reporting.default__fivetran_convert_timezone(column, target_tz, source_tz)) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.ad_reporting.default__fivetran_convert_timezone"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}, {"name": "target_tz", "type": null, "description": ""}, {"name": "source_tz", "type": null, "description": ""}], "created_at": 1783708211.6537607, "supported_languages": null}, "macro.ad_reporting.duckdb__fivetran_convert_timezone": {"name": "duckdb__fivetran_convert_timezone", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_convert_timezone.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_convert_timezone.sql", "unique_id": "macro.ad_reporting.duckdb__fivetran_convert_timezone", "macro_sql": "{% macro duckdb__fivetran_convert_timezone(column, target_tz, source_tz) -%}\n {{ return(ad_reporting.postgres__fivetran_convert_timezone(column, target_tz, source_tz)) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.ad_reporting.postgres__fivetran_convert_timezone"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}, {"name": "target_tz", "type": null, "description": ""}, {"name": "source_tz", "type": null, "description": ""}], "created_at": 1783708211.654206, "supported_languages": null}, "macro.ad_reporting.spark__fivetran_convert_timezone": {"name": "spark__fivetran_convert_timezone", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_convert_timezone.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_convert_timezone.sql", "unique_id": "macro.ad_reporting.spark__fivetran_convert_timezone", "macro_sql": "{%- macro spark__fivetran_convert_timezone(column, target_tz, source_tz) -%}\n from_utc_timestamp(\n to_utc_timestamp({{ column }}, '{{ source_tz }}'), '{{ target_tz }}'\n )\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "column", "type": null, "description": ""}, {"name": "target_tz", "type": null, "description": ""}, {"name": "source_tz", "type": null, "description": ""}], "created_at": 1783708211.654553, "supported_languages": null}, "macro.ad_reporting.fivetran_now": {"name": "fivetran_now", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_now.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_now.sql", "unique_id": "macro.ad_reporting.fivetran_now", "macro_sql": "{%- macro fivetran_now(tz=None) -%}\n {{ return(adapter.dispatch('fivetran_now', 'ad_reporting') (tz)) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.ad_reporting.default__fivetran_now"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "tz", "type": null, "description": ""}], "created_at": 1783708211.6551383, "supported_languages": null}, "macro.ad_reporting.default__fivetran_now": {"name": "default__fivetran_now", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_now.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_now.sql", "unique_id": "macro.ad_reporting.default__fivetran_now", "macro_sql": "{%- macro default__fivetran_now(tz=None) -%} \n {{ ad_reporting.fivetran_convert_timezone(dbt.current_timestamp(), tz) }}\n{%- endmacro -%}", "depends_on": {"macros": ["macro.ad_reporting.fivetran_convert_timezone", "macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "tz", "type": null, "description": ""}], "created_at": 1783708211.655482, "supported_languages": null}, "macro.ad_reporting.fivetran_today": {"name": "fivetran_today", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_today.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_today.sql", "unique_id": "macro.ad_reporting.fivetran_today", "macro_sql": "{%- macro fivetran_today(tz=None) -%}\n {{ return(adapter.dispatch('fivetran_today', 'ad_reporting') (tz)) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.ad_reporting.default__fivetran_today"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "tz", "type": null, "description": ""}], "created_at": 1783708211.6563315, "supported_languages": null}, "macro.ad_reporting.default__fivetran_today": {"name": "default__fivetran_today", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_today.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_today.sql", "unique_id": "macro.ad_reporting.default__fivetran_today", "macro_sql": "{%- macro default__fivetran_today(tz=None) -%}\n cast({{ ad_reporting.fivetran_now(tz) }} as date)\n{%- endmacro -%}", "depends_on": {"macros": ["macro.ad_reporting.fivetran_now"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "tz", "type": null, "description": ""}], "created_at": 1783708211.65668, "supported_languages": null}, "macro.ad_reporting.fivetran_get_intervals_between": {"name": "fivetran_get_intervals_between", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_get_intervals_between.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_get_intervals_between.sql", "unique_id": "macro.ad_reporting.fivetran_get_intervals_between", "macro_sql": "{% macro fivetran_get_intervals_between(start_date, end_date, datepart) -%}\n {{ return(adapter.dispatch('fivetran_get_intervals_between', 'ad_reporting') (start_date, end_date, datepart)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.ad_reporting.default__fivetran_get_intervals_between"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783708211.6574717, "supported_languages": null}, "macro.ad_reporting.default__fivetran_get_intervals_between": {"name": "default__fivetran_get_intervals_between", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_get_intervals_between.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_get_intervals_between.sql", "unique_id": "macro.ad_reporting.default__fivetran_get_intervals_between", "macro_sql": "{% macro default__fivetran_get_intervals_between(start_date, end_date, datepart) -%}\n {%- call statement(\"fivetran_get_intervals_between\", fetch_result=True) %}\n\n select {{ dbt.datediff(start_date, end_date, datepart) }}\n\n {%- endcall -%}\n\n {%- set value_list = load_result(\"fivetran_get_intervals_between\") -%}\n\n {%- if value_list and value_list[\"data\"] -%}\n {%- set values = value_list[\"data\"] | map(attribute=0) | list %}\n {{ return(values[0]) }}\n {%- else -%} {{ return(1) }}\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783708211.6586862, "supported_languages": null}, "macro.ad_reporting.fivetran_date_spine": {"name": "fivetran_date_spine", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_date_spine.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_date_spine.sql", "unique_id": "macro.ad_reporting.fivetran_date_spine", "macro_sql": "{% macro fivetran_date_spine(datepart, start_date, end_date) %}\n {{ return(adapter.dispatch('fivetran_date_spine', 'ad_reporting') (datepart, start_date, end_date)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.ad_reporting.default__fivetran_date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1783708211.659482, "supported_languages": null}, "macro.ad_reporting.default__fivetran_date_spine": {"name": "default__fivetran_date_spine", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_date_spine.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_date_spine.sql", "unique_id": "macro.ad_reporting.default__fivetran_date_spine", "macro_sql": "{% macro default__fivetran_date_spine(datepart, start_date, end_date) %}\n\n {# call as follows:\n\nfivetran_date_spine(\n \"day\",\n \"to_date('01/01/2016', 'mm/dd/yyyy')\",\n \"dbt.dateadd(week, 1, current_date)\"\n) #}\n with\n rawdata as (\n\n {{\n ad_reporting.fivetran_generate_series(\n ad_reporting.fivetran_get_intervals_between(start_date, end_date, datepart)\n )\n }}\n\n ),\n\n all_periods as (\n\n select\n (\n {{\n dbt.dateadd(\n datepart,\n \"(row_number() over (order by 1) - 1)\",\n start_date,\n )\n }}\n ) as date_{{ datepart }}\n from rawdata\n\n ),\n\n filtered as (\n\n select * from all_periods where date_{{ datepart }} <= {{ end_date }}\n\n )\n\n select *\n from filtered\n\n{% endmacro %}", "depends_on": {"macros": ["macro.ad_reporting.fivetran_generate_series", "macro.ad_reporting.fivetran_get_intervals_between", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}], "created_at": 1783708211.6602585, "supported_languages": null}, "macro.ad_reporting.fivetran_get_base_dates": {"name": "fivetran_get_base_dates", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_get_base_dates.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_get_base_dates.sql", "unique_id": "macro.ad_reporting.fivetran_get_base_dates", "macro_sql": "{% macro fivetran_get_base_dates(start_date=None, end_date=None, n_dateparts=None, datepart=\"day\") %}\n {{ return(adapter.dispatch('fivetran_get_base_dates', 'ad_reporting') (start_date, end_date, n_dateparts, datepart)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.ad_reporting.default__fivetran_get_base_dates"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}, {"name": "n_dateparts", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783708211.6614156, "supported_languages": null}, "macro.ad_reporting.default__fivetran_get_base_dates": {"name": "default__fivetran_get_base_dates", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_get_base_dates.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_get_base_dates.sql", "unique_id": "macro.ad_reporting.default__fivetran_get_base_dates", "macro_sql": "{% macro default__fivetran_get_base_dates(start_date, end_date, n_dateparts, datepart) %}\n\n {%- if start_date and end_date -%}\n {%- set start_date = (\n \"cast('\" ~ start_date ~ \"' as \" ~ dbt.type_timestamp() ~ \")\"\n ) -%}\n {%- set end_date = (\n \"cast('\" ~ end_date ~ \"' as \" ~ dbt.type_timestamp() ~ \")\"\n ) -%}\n\n {%- elif n_dateparts and datepart -%}\n\n {%- set start_date = dbt.dateadd(\n datepart, -1 * n_dateparts, ad_reporting.fivetran_today()\n ) -%}\n {%- set end_date = ad_reporting.fivetran_tomorrow() -%}\n {%- endif -%}\n\n with\n date_spine as (\n\n {{\n ad_reporting.fivetran_date_spine(\n datepart=datepart,\n start_date=start_date,\n end_date=end_date,\n )\n }}\n\n )\n select\n cast(d.date_{{ datepart }} as {{ dbt.type_timestamp() }}) as date_{{ datepart }}\n from date_spine d\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.dateadd", "macro.ad_reporting.fivetran_today", "macro.ad_reporting.fivetran_tomorrow", "macro.ad_reporting.fivetran_date_spine"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}, {"name": "n_dateparts", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783708211.6631775, "supported_languages": null}, "macro.ad_reporting.bigquery__fivetran_get_base_dates": {"name": "bigquery__fivetran_get_base_dates", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_get_base_dates.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_get_base_dates.sql", "unique_id": "macro.ad_reporting.bigquery__fivetran_get_base_dates", "macro_sql": "{% macro bigquery__fivetran_get_base_dates(start_date, end_date, n_dateparts, datepart) %}\n\n {%- if start_date and end_date -%}\n {%- set start_date = \"cast('\" ~ start_date ~ \"' as datetime )\" -%}\n {%- set end_date = \"cast('\" ~ end_date ~ \"' as datetime )\" -%}\n\n {%- elif n_dateparts and datepart -%}\n\n {%- set start_date = dbt.dateadd(\n datepart, -1 * n_dateparts, ad_reporting.fivetran_today()\n ) -%}\n {%- set end_date = ad_reporting.fivetran_tomorrow() -%}\n {%- endif -%}\n\n with\n date_spine as (\n\n {{\n ad_reporting.fivetran_date_spine(\n datepart=datepart,\n start_date=start_date,\n end_date=end_date,\n )\n }}\n\n )\n select\n cast(d.date_{{ datepart }} as {{ dbt.type_timestamp() }}) as date_{{ datepart }}\n from date_spine d\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.dateadd", "macro.ad_reporting.fivetran_today", "macro.ad_reporting.fivetran_tomorrow", "macro.ad_reporting.fivetran_date_spine", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "start_date", "type": null, "description": ""}, {"name": "end_date", "type": null, "description": ""}, {"name": "n_dateparts", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783708211.6645594, "supported_languages": null}, "macro.ad_reporting.fivetran_tomorrow": {"name": "fivetran_tomorrow", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_tomorrow.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_tomorrow.sql", "unique_id": "macro.ad_reporting.fivetran_tomorrow", "macro_sql": "{%- macro fivetran_tomorrow(date=None, tz=None) -%}\n {{ return(adapter.dispatch('fivetran_tomorrow', 'ad_reporting') (date, tz)) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.ad_reporting.default__fivetran_tomorrow"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "date", "type": null, "description": ""}, {"name": "tz", "type": null, "description": ""}], "created_at": 1783708211.6651802, "supported_languages": null}, "macro.ad_reporting.default__fivetran_tomorrow": {"name": "default__fivetran_tomorrow", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_tomorrow.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_tomorrow.sql", "unique_id": "macro.ad_reporting.default__fivetran_tomorrow", "macro_sql": "{%- macro default__fivetran_tomorrow(date=None, tz=None) -%}\n {{ ad_reporting.fivetran_n_days_away(1, date, tz) }}\n{%- endmacro -%}", "depends_on": {"macros": ["macro.ad_reporting.fivetran_n_days_away"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "date", "type": null, "description": ""}, {"name": "tz", "type": null, "description": ""}], "created_at": 1783708211.665556, "supported_languages": null}, "macro.ad_reporting.fivetran_n_days_away": {"name": "fivetran_n_days_away", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_n_days_away.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_n_days_away.sql", "unique_id": "macro.ad_reporting.fivetran_n_days_away", "macro_sql": "{%- macro fivetran_n_days_away(n, date=None, tz=None) -%}\n {{ return(adapter.dispatch('fivetran_n_days_away', 'ad_reporting') (n, date, tz)) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.ad_reporting.default__fivetran_n_days_away"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "n", "type": null, "description": ""}, {"name": "date", "type": null, "description": ""}, {"name": "tz", "type": null, "description": ""}], "created_at": 1783708211.6662006, "supported_languages": null}, "macro.ad_reporting.default__fivetran_n_days_away": {"name": "default__fivetran_n_days_away", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_n_days_away.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_n_days_away.sql", "unique_id": "macro.ad_reporting.default__fivetran_n_days_away", "macro_sql": "{%- macro default__fivetran_n_days_away(n, date=None, tz=None) -%}\n {{ ad_reporting.fivetran_n_days_ago(-1 * n, date, tz) }}\n{%- endmacro -%}", "depends_on": {"macros": ["macro.ad_reporting.fivetran_n_days_ago"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "n", "type": null, "description": ""}, {"name": "date", "type": null, "description": ""}, {"name": "tz", "type": null, "description": ""}], "created_at": 1783708211.666634, "supported_languages": null}, "macro.ad_reporting.fivetran_n_days_ago": {"name": "fivetran_n_days_ago", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_n_days_ago.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_n_days_ago.sql", "unique_id": "macro.ad_reporting.fivetran_n_days_ago", "macro_sql": "{%- macro fivetran_n_days_ago(n, date=None, tz=None) -%}\n {{ return(adapter.dispatch('fivetran_n_days_ago', 'ad_reporting') (n, date, tz)) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": ["macro.ad_reporting.default__fivetran_n_days_ago"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "n", "type": null, "description": ""}, {"name": "date", "type": null, "description": ""}, {"name": "tz", "type": null, "description": ""}], "created_at": 1783708211.6673865, "supported_languages": null}, "macro.ad_reporting.default__fivetran_n_days_ago": {"name": "default__fivetran_n_days_ago", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_n_days_ago.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_n_days_ago.sql", "unique_id": "macro.ad_reporting.default__fivetran_n_days_ago", "macro_sql": "{%- macro default__fivetran_n_days_ago(n, date=None, tz=None) -%}\n {%-set dt = date if date else ad_reporting.fivetran_today(tz) -%}\n {%- set n = n|int -%}\n cast({{ dbt.dateadd('day', -1 * n, dt) }} as date)\n{%- endmacro -%}", "depends_on": {"macros": ["macro.ad_reporting.fivetran_today", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "n", "type": null, "description": ""}, {"name": "date", "type": null, "description": ""}, {"name": "tz", "type": null, "description": ""}], "created_at": 1783708211.668112, "supported_languages": null}, "macro.ad_reporting.fivetran_get_powers_of_two": {"name": "fivetran_get_powers_of_two", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_get_powers_of_two.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_get_powers_of_two.sql", "unique_id": "macro.ad_reporting.fivetran_get_powers_of_two", "macro_sql": "{% macro fivetran_get_powers_of_two(upper_bound) %}\n {{ return(adapter.dispatch('fivetran_get_powers_of_two', 'ad_reporting') (upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.ad_reporting.default__fivetran_get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1783708211.6687205, "supported_languages": null}, "macro.ad_reporting.default__fivetran_get_powers_of_two": {"name": "default__fivetran_get_powers_of_two", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_get_powers_of_two.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_get_powers_of_two.sql", "unique_id": "macro.ad_reporting.default__fivetran_get_powers_of_two", "macro_sql": "{% macro default__fivetran_get_powers_of_two(upper_bound) %}\n\n {% if upper_bound <= 0 %}\n {{ exceptions.raise_compiler_error(\"upper bound must be positive\") }}\n {% endif %}\n\n {% for _ in range(1, 100) %}\n {% if upper_bound <= 2**loop.index %} {{ return(loop.index) }}{% endif %}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1783708211.6696057, "supported_languages": null}, "macro.ad_reporting.fivetran_generate_series": {"name": "fivetran_generate_series", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_generate_series.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_generate_series.sql", "unique_id": "macro.ad_reporting.fivetran_generate_series", "macro_sql": "{% macro fivetran_generate_series(upper_bound) %}\n {{ return(adapter.dispatch('fivetran_generate_series', 'ad_reporting') (upper_bound)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.ad_reporting.default__fivetran_generate_series"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1783708211.6703122, "supported_languages": null}, "macro.ad_reporting.default__fivetran_generate_series": {"name": "default__fivetran_generate_series", "resource_type": "macro", "package_name": "ad_reporting", "path": "macros/fivetran_date_macros/fivetran_generate_series.sql", "original_file_path": "macros/fivetran_date_macros/fivetran_generate_series.sql", "unique_id": "macro.ad_reporting.default__fivetran_generate_series", "macro_sql": "{% macro default__fivetran_generate_series(upper_bound) %}\n\n {% set n = ad_reporting.fivetran_get_powers_of_two(upper_bound) %}\n\n with\n p as (\n select 0 as generated_number\n union all\n select 1\n ),\n unioned as (\n\n select\n\n {% for i in range(n) %}\n p{{ i }}.generated_number * power(2, {{ i }})\n {% if not loop.last %} + {% endif %}\n {% endfor %}\n + 1 as generated_number\n\n from\n\n {% for i in range(n) %}\n p as p{{ i }} {% if not loop.last %} cross join {% endif %}\n {% endfor %}\n\n )\n\n select *\n from unioned\n where generated_number <= {{ upper_bound }}\n order by generated_number\n\n{% endmacro %}", "depends_on": {"macros": ["macro.ad_reporting.fivetran_get_powers_of_two"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "upper_bound", "type": null, "description": ""}], "created_at": 1783708211.6713734, "supported_languages": null}, "macro.tiktok_ads.tiktok_ads_persist_pass_through_columns": {"name": "tiktok_ads_persist_pass_through_columns", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/tiktok_ads_persist_pass_through_columns.sql", "original_file_path": "macros/tiktok_ads_persist_pass_through_columns.sql", "unique_id": "macro.tiktok_ads.tiktok_ads_persist_pass_through_columns", "macro_sql": "{% macro tiktok_ads_persist_pass_through_columns(pass_through_variable, identifier=none, transform='', coalesce_with=none, exclude_fields=[]) %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n {% set field_name = field.alias|default(field.name)|lower if field is mapping else field %}\n {% if field_name not in exclude_fields %}\n , {{ transform ~ '(' ~ ('coalesce(' if coalesce_with is not none else '') ~ (identifier ~ '.' if identifier else '') ~ field_name ~ ((', ' ~ coalesce_with ~ ')') if coalesce_with is not none else '') ~ ')' }} as {{ field_name }}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "transform", "type": null, "description": ""}, {"name": "coalesce_with", "type": null, "description": ""}, {"name": "exclude_fields", "type": null, "description": ""}], "created_at": 1783708211.673252, "supported_languages": null}, "macro.tiktok_ads.get_advertiser_columns": {"name": "get_advertiser_columns", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/staging/get_advertiser_columns.sql", "original_file_path": "macros/staging/get_advertiser_columns.sql", "unique_id": "macro.tiktok_ads.get_advertiser_columns", "macro_sql": "{% macro get_advertiser_columns() %}\n\n{% set columns = [\n {\"name\": \"address\", \"datatype\": dbt.type_string()},\n {\"name\": \"balance\", \"datatype\": dbt.type_float()},\n {\"name\": \"cellphone_number\", \"datatype\": dbt.type_string()},\n {\"name\": \"company\", \"datatype\": dbt.type_string()},\n {\"name\": \"contacter\", \"datatype\": dbt.type_string()},\n {\"name\": \"country\", \"datatype\": dbt.type_string()},\n {\"name\": \"currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"email\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"industry\", \"datatype\": dbt.type_string()},\n {\"name\": \"language\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"phone_number\", \"datatype\": dbt.type_string()},\n {\"name\": \"telephone\", \"datatype\": dbt.type_string()},\n {\"name\": \"telephone_number\", \"datatype\": dbt.type_string()},\n {\"name\": \"timezone\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_float", "macro.dbt.type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.6767945, "supported_languages": null}, "macro.tiktok_ads.tiktok_ads_extract_url_parameter": {"name": "tiktok_ads_extract_url_parameter", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/staging/tiktok_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/tiktok_ads_extract_url_parameters.sql", "unique_id": "macro.tiktok_ads.tiktok_ads_extract_url_parameter", "macro_sql": "{% macro tiktok_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ return(adapter.dispatch('tiktok_ads_extract_url_parameter', 'tiktok_ads') (field, url_parameter)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.tiktok_ads.default__tiktok_ads_extract_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.677466, "supported_languages": null}, "macro.tiktok_ads.default__tiktok_ads_extract_url_parameter": {"name": "default__tiktok_ads_extract_url_parameter", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/staging/tiktok_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/tiktok_ads_extract_url_parameters.sql", "unique_id": "macro.tiktok_ads.default__tiktok_ads_extract_url_parameter", "macro_sql": "{% macro default__tiktok_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ dbt_utils.get_url_parameter(field, url_parameter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.6777747, "supported_languages": null}, "macro.tiktok_ads.spark__tiktok_ads_extract_url_parameter": {"name": "spark__tiktok_ads_extract_url_parameter", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/staging/tiktok_ads_extract_url_parameters.sql", "original_file_path": "macros/staging/tiktok_ads_extract_url_parameters.sql", "unique_id": "macro.tiktok_ads.spark__tiktok_ads_extract_url_parameter", "macro_sql": "{% macro spark__tiktok_ads_extract_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"=([^&]+)'\" -%}\nnullif(regexp_extract({{ field }}, {{ formatted_url_parameter }}, 1), '')\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.67821, "supported_languages": null}, "macro.tiktok_ads.get_ad_report_hourly_columns": {"name": "get_ad_report_hourly_columns", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/staging/get_ad_report_hourly_columns.sql", "original_file_path": "macros/staging/get_ad_report_hourly_columns.sql", "unique_id": "macro.tiktok_ads.get_ad_report_hourly_columns", "macro_sql": "{% macro get_ad_report_hourly_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_id\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"average_video_play\", \"datatype\": dbt.type_float()},\n {\"name\": \"average_video_play_per_user\", \"datatype\": dbt.type_float()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"comments\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"conversion\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversion_rate\", \"datatype\": dbt.type_float()},\n {\"name\": \"cost_per_conversion\", \"datatype\": dbt.type_float()},\n {\"name\": \"cpc\", \"datatype\": dbt.type_float()},\n {\"name\": \"cpm\", \"datatype\": dbt.type_float()},\n {\"name\": \"ctr\", \"datatype\": dbt.type_float()},\n {\"name\": \"follows\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"likes\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"profile_visits\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"real_time_conversion\", \"datatype\": dbt.type_int()},\n {\"name\": \"reach\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"shares\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"spend\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"stat_time_hour\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"total_purchase_value\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"total_sales_lead_value\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_play_actions\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_views_p_25\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_views_p_50\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_views_p_75\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_watched_2_s\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_watched_6_s\", \"datatype\": dbt.type_numeric()}\n] %}\n \n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ tiktok_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('tiktok_ads__ad_hourly_passthrough_metrics'), except_fields=[\"real_time_conversion\", \"total_purchase_value\", \"total_sales_lead_value\"]) }}\n\n{{ return(columns) }} \n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_numeric", "macro.dbt.type_float", "macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.tiktok_ads.tiktok_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.6840045, "supported_languages": null}, "macro.tiktok_ads.get_ad_history_columns": {"name": "get_ad_history_columns", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/staging/get_ad_history_columns.sql", "original_file_path": "macros/staging/get_ad_history_columns.sql", "unique_id": "macro.tiktok_ads.get_ad_history_columns", "macro_sql": "{% macro get_ad_history_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_id\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"ad_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"adgroup_id\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"advertiser_id\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"call_to_action\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"click_tracking_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"impression_tracking_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"landing_page_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()}\n\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_numeric", "macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.6862302, "supported_languages": null}, "macro.tiktok_ads.get_location_columns": {"name": "get_location_columns", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/staging/get_location_columns.sql", "original_file_path": "macros/staging/get_location_columns.sql", "unique_id": "macro.tiktok_ads.get_location_columns", "macro_sql": "{% macro get_location_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"advertiser_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"area_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"country_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"parent_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"region_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"region_level\", \"datatype\": dbt.type_string()},\n {\"name\": \"region_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"support_below_18\", \"datatype\": dbt.type_boolean()} \n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_boolean"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.688267, "supported_languages": null}, "macro.tiktok_ads.get_campaign_country_report_columns": {"name": "get_campaign_country_report_columns", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/staging/get_campaign_country_report_columns.sql", "original_file_path": "macros/staging/get_campaign_country_report_columns.sql", "unique_id": "macro.tiktok_ads.get_campaign_country_report_columns", "macro_sql": "{% macro get_campaign_country_report_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversion\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversion_rate\", \"datatype\": dbt.type_float()},\n {\"name\": \"cost_per_conversion\", \"datatype\": dbt.type_float()},\n {\"name\": \"country_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"cpc\", \"datatype\": dbt.type_float()},\n {\"name\": \"cpm\", \"datatype\": dbt.type_float()},\n {\"name\": \"ctr\", \"datatype\": dbt.type_float()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"real_time_conversion\", \"datatype\": dbt.type_int()},\n {\"name\": \"spend\", \"datatype\": dbt.type_float()},\n {\"name\": \"stat_time_day\", \"datatype\": dbt.type_timestamp()}\n] %}\n{{ tiktok_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('tiktok_ads__campaign_country_report_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_float", "macro.dbt.type_string", "macro.tiktok_ads.tiktok_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.6913707, "supported_languages": null}, "macro.tiktok_ads.get_campaign_report_hourly_columns": {"name": "get_campaign_report_hourly_columns", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/staging/get_campaign_report_hourly_columns.sql", "original_file_path": "macros/staging/get_campaign_report_hourly_columns.sql", "unique_id": "macro.tiktok_ads.get_campaign_report_hourly_columns", "macro_sql": "{% macro get_campaign_report_hourly_columns() %}\n\n{% set columns = [\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"average_video_play\", \"datatype\": dbt.type_float()},\n {\"name\": \"average_video_play_per_user\", \"datatype\": dbt.type_float()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"comments\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"conversion\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversion_rate\", \"datatype\": dbt.type_float()},\n {\"name\": \"cost_per_conversion\", \"datatype\": dbt.type_float()},\n {\"name\": \"cpc\", \"datatype\": dbt.type_float()},\n {\"name\": \"cpm\", \"datatype\": dbt.type_float()},\n {\"name\": \"ctr\", \"datatype\": dbt.type_float()},\n {\"name\": \"follows\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"likes\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"profile_visits\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"reach\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"real_time_conversion\", \"datatype\": dbt.type_int()},\n {\"name\": \"shares\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"spend\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"stat_time_hour\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"total_purchase_value\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"total_sales_lead_value\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_play_actions\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_views_p_25\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_views_p_50\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_views_p_75\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_watched_2_s\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_watched_6_s\", \"datatype\": dbt.type_numeric()}\n] %}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ tiktok_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('tiktok_ads__campaign_hourly_passthrough_metrics'), except_fields=[\"real_time_conversion\", \"total_purchase_value\", \"total_sales_lead_value\"]) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_numeric", "macro.dbt.type_float", "macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.tiktok_ads.tiktok_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.6969972, "supported_languages": null}, "macro.tiktok_ads.tiktok_ads_fill_pass_through_columns": {"name": "tiktok_ads_fill_pass_through_columns", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/staging/tiktok_ads_fill_pass_through_columns.sql", "original_file_path": "macros/staging/tiktok_ads_fill_pass_through_columns.sql", "unique_id": "macro.tiktok_ads.tiktok_ads_fill_pass_through_columns", "macro_sql": "{% macro tiktok_ads_fill_pass_through_columns(pass_through_fields, except_fields=[]) %}\n\n{% if pass_through_fields %}\n {% for field in pass_through_fields %}\n {% if (field.alias if field.alias else field.name) not in except_fields %}\n {% if field.transform_sql %}\n , coalesce(cast({{ field.transform_sql }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% else %}\n , coalesce(cast({{ field.alias if field.alias else field.name }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% endif %}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except_fields", "type": null, "description": ""}], "created_at": 1783708211.698712, "supported_languages": null}, "macro.tiktok_ads.tiktok_ads_add_pass_through_columns": {"name": "tiktok_ads_add_pass_through_columns", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/staging/tiktok_ads_add_pass_through_columns.sql", "original_file_path": "macros/staging/tiktok_ads_add_pass_through_columns.sql", "unique_id": "macro.tiktok_ads.tiktok_ads_add_pass_through_columns", "macro_sql": "{% macro tiktok_ads_add_pass_through_columns(base_columns, pass_through_fields, except_fields=[]) %}\n\n{% if pass_through_fields %}\n {% for column in pass_through_fields %}\n\n {% if column is mapping %}\n {% set col_name = column.alias|default(column.name)|lower %}\n\n {% if col_name not in except_fields %}\n {% if column.alias %}\n {% do base_columns.append({ \"name\": column.name, \"alias\": column.alias, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% else %}\n {% do base_columns.append({ \"name\": column.name, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% else %}\n {% if column|lower not in except_fields %}\n {% do base_columns.append({ \"name\": column, \"datatype\": dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_columns", "type": null, "description": ""}, {"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except_fields", "type": null, "description": ""}], "created_at": 1783708211.701261, "supported_languages": null}, "macro.tiktok_ads.get_ad_group_report_hourly_columns": {"name": "get_ad_group_report_hourly_columns", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/staging/get_ad_group_report_hourly_columns.sql", "original_file_path": "macros/staging/get_ad_group_report_hourly_columns.sql", "unique_id": "macro.tiktok_ads.get_ad_group_report_hourly_columns", "macro_sql": "{% macro get_ad_group_report_hourly_columns() %}\n\n{% set columns = [\n {\"name\": \"adgroup_id\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"average_video_play\", \"datatype\": dbt.type_float()},\n {\"name\": \"average_video_play_per_user\", \"datatype\": dbt.type_float()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"comments\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"conversion\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversion_rate\", \"datatype\": dbt.type_float()},\n {\"name\": \"cost_per_conversion\", \"datatype\": dbt.type_float()},\n {\"name\": \"cpc\", \"datatype\": dbt.type_float()},\n {\"name\": \"cpm\", \"datatype\": dbt.type_float()},\n {\"name\": \"ctr\", \"datatype\": dbt.type_float()},\n {\"name\": \"follows\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"likes\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"profile_visits\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"reach\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"real_time_conversion\", \"datatype\": dbt.type_int()},\n {\"name\": \"shares\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"spend\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"stat_time_hour\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"total_purchase_value\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"total_sales_lead_value\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_play_actions\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_views_p_25\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_views_p_50\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_views_p_75\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_watched_2_s\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"video_watched_6_s\", \"datatype\": dbt.type_numeric()}\n] %}\n\n{# Doing it this way in case users were bringing in conversion metrics via passthrough columns prior to us adding them by default #}\n{{ tiktok_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('tiktok_ads__ad_group_hourly_passthrough_metrics'), except_fields=[\"real_time_conversion\", \"total_purchase_value\", \"total_sales_lead_value\"]) }}\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_numeric", "macro.dbt.type_float", "macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.tiktok_ads.tiktok_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.7069046, "supported_languages": null}, "macro.tiktok_ads.get_campaign_history_columns": {"name": "get_campaign_history_columns", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/staging/get_campaign_history_columns.sql", "original_file_path": "macros/staging/get_campaign_history_columns.sql", "unique_id": "macro.tiktok_ads.get_campaign_history_columns", "macro_sql": "{% macro get_campaign_history_columns() %}\n\n{% set columns = [\n {\"name\": \"advertiser_id\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"campaign_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"split_test_variable\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"objective_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"budget\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"budget_mode\", \"datatype\": dbt.type_string()},\n {\"name\": \"create_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"is_new_structure\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_numeric", "macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.709467, "supported_languages": null}, "macro.tiktok_ads.get_ad_group_history_columns": {"name": "get_ad_group_history_columns", "resource_type": "macro", "package_name": "tiktok_ads", "path": "macros/staging/get_ad_group_history_columns.sql", "original_file_path": "macros/staging/get_ad_group_history_columns.sql", "unique_id": "macro.tiktok_ads.get_ad_group_history_columns", "macro_sql": "{% macro get_ad_group_history_columns() %}\n\n{% set columns = [\n {\"name\": \"action_days\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"adgroup_id\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"adgroup_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"advertiser_id\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"audience_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"budget\", \"datatype\": dbt.type_float()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"category\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"display_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"frequency\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"frequency_schedule\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"gender\", \"datatype\": dbt.type_string()},\n {\"name\": \"landing_page_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"updated_at\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"interest_category_v_2\", \"datatype\": dbt.type_string()},\n {\"name\": \"action_categories\", \"datatype\": dbt.type_string()},\n {\"name\": \"age_groups\", \"datatype\": dbt.type_string()},\n {\"name\": \"languages\", \"datatype\": dbt.type_string()}\n\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_numeric", "macro.dbt.type_string", "macro.dbt.type_float", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.7129927, "supported_languages": null}, "macro.microsoft_ads.microsoft_ads_persist_pass_through_columns": {"name": "microsoft_ads_persist_pass_through_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/microsoft_ads_persist_pass_through_columns.sql", "original_file_path": "macros/microsoft_ads_persist_pass_through_columns.sql", "unique_id": "macro.microsoft_ads.microsoft_ads_persist_pass_through_columns", "macro_sql": "{% macro microsoft_ads_persist_pass_through_columns(pass_through_variable, identifier=none, transform='', coalesce_with=none, exclude_fields=[]) %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n {% set field_name = field.alias|default(field.name)|lower if field is mapping else field %}\n {% set original_name = field.name if field is mapping else field %}\n \n {% if field_name not in exclude_fields and original_name not in exclude_fields %}\n , {{ transform ~ '(' ~ ('coalesce(' if coalesce_with is not none else '') ~ (identifier ~ '.' if identifier else '') ~ field_name ~ ((', ' ~ coalesce_with ~ ')') if coalesce_with is not none else '') ~ ')' }} as {{ field_name }}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "transform", "type": null, "description": ""}, {"name": "coalesce_with", "type": null, "description": ""}, {"name": "exclude_fields", "type": null, "description": ""}], "created_at": 1783708211.7151306, "supported_languages": null}, "macro.microsoft_ads.microsoft_ads_extract_url_parameter": {"name": "microsoft_ads_extract_url_parameter", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/microsoft_ads_extract_url_parameters.sql", "original_file_path": "macros/microsoft_ads_extract_url_parameters.sql", "unique_id": "macro.microsoft_ads.microsoft_ads_extract_url_parameter", "macro_sql": "{% macro microsoft_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ return(adapter.dispatch('microsoft_ads_extract_url_parameter', 'microsoft_ads') (field, url_parameter)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.microsoft_ads.default__microsoft_ads_extract_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.7157667, "supported_languages": null}, "macro.microsoft_ads.default__microsoft_ads_extract_url_parameter": {"name": "default__microsoft_ads_extract_url_parameter", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/microsoft_ads_extract_url_parameters.sql", "original_file_path": "macros/microsoft_ads_extract_url_parameters.sql", "unique_id": "macro.microsoft_ads.default__microsoft_ads_extract_url_parameter", "macro_sql": "{% macro default__microsoft_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ dbt_utils.get_url_parameter(field, url_parameter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.7160907, "supported_languages": null}, "macro.microsoft_ads.spark__microsoft_ads_extract_url_parameter": {"name": "spark__microsoft_ads_extract_url_parameter", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/microsoft_ads_extract_url_parameters.sql", "original_file_path": "macros/microsoft_ads_extract_url_parameters.sql", "unique_id": "macro.microsoft_ads.spark__microsoft_ads_extract_url_parameter", "macro_sql": "{% macro spark__microsoft_ads_extract_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"=([^&]+)'\" -%}\nnullif(regexp_extract({{ field }}, {{ formatted_url_parameter }}, 1), '')\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.7164934, "supported_languages": null}, "macro.microsoft_ads.get_ad_daily_report_columns": {"name": "get_ad_daily_report_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/staging/get_ad_daily_report_columns.sql", "original_file_path": "macros/staging/get_ad_daily_report_columns.sql", "unique_id": "macro.microsoft_ads.get_ad_daily_report_columns", "macro_sql": "{% macro get_ad_daily_report_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_distribution\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"bid_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"delivered_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_os\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"language\", \"datatype\": dbt.type_string()},\n {\"name\": \"network\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"top_vs_other\", \"datatype\": dbt.type_string()},\n {\"name\": \"conversions_qualified\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"revenue\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"all_conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"all_conversions_qualified\", \"datatype\": dbt.type_int()},\n {\"name\": \"all_revenue\", \"datatype\": dbt.type_numeric()}\n] %} \n\n{{ microsoft_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('microsoft_ads__ad_passthrough_metrics'), except_fields=['conversions_qualified', 'conversions', 'revenue', 'all_conversions_qualified', 'all_conversions', 'all_revenue']) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_numeric", "macro.microsoft_ads.microsoft_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.7215834, "supported_languages": null}, "macro.microsoft_ads.get_ad_group_daily_report_columns": {"name": "get_ad_group_daily_report_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/staging/get_ad_group_daily_report_columns.sql", "original_file_path": "macros/staging/get_ad_group_daily_report_columns.sql", "unique_id": "macro.microsoft_ads.get_ad_group_daily_report_columns", "macro_sql": "{% macro get_ad_group_daily_report_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_distribution\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"bid_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"delivered_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_os\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"language\", \"datatype\": dbt.type_string()},\n {\"name\": \"network\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"top_vs_other\", \"datatype\": dbt.type_string()},\n {\"name\": \"conversions_qualified\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"revenue\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"all_conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"all_conversions_qualified\", \"datatype\": dbt.type_int()},\n {\"name\": \"all_revenue\", \"datatype\": dbt.type_numeric()}\n] %} \n\n{{ microsoft_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('microsoft_ads__ad_group_passthrough_metrics'), except_fields=['conversions_qualified', 'conversions', 'revenue', 'all_conversions_qualified', 'all_conversions', 'all_revenue']) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_numeric", "macro.microsoft_ads.microsoft_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.7263076, "supported_languages": null}, "macro.microsoft_ads.microsoft_ads_fill_pass_through_columns": {"name": "microsoft_ads_fill_pass_through_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/staging/microsoft_ads_fill_pass_through_columns.sql", "original_file_path": "macros/staging/microsoft_ads_fill_pass_through_columns.sql", "unique_id": "macro.microsoft_ads.microsoft_ads_fill_pass_through_columns", "macro_sql": "{% macro microsoft_ads_fill_pass_through_columns(pass_through_fields, except=[]) %}\n\n{% if pass_through_fields %}\n {% for field in pass_through_fields %}\n {% if (field.alias if field.alias else field.name) not in except %}\n {% if field.transform_sql %}\n , coalesce(cast({{ field.transform_sql }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% else %}\n , coalesce(cast({{ field.alias if field.alias else field.name }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% endif %}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except", "type": null, "description": ""}], "created_at": 1783708211.7280135, "supported_languages": null}, "macro.microsoft_ads.get_ad_history_columns": {"name": "get_ad_history_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/staging/get_ad_history_columns.sql", "original_file_path": "macros/staging/get_ad_history_columns.sql", "unique_id": "macro.microsoft_ads.get_ad_history_columns", "macro_sql": "{% macro get_ad_history_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"title\", \"datatype\": dbt.type_string()},\n {\"name\": \"title_part_1\", \"datatype\": dbt.type_string()},\n {\"name\": \"title_part_2\", \"datatype\": dbt.type_string()},\n {\"name\": \"title_part_3\", \"datatype\": dbt.type_string()},\n {\"name\": \"final_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"modified_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"domain\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.730423, "supported_languages": null}, "macro.microsoft_ads.get_account_history_columns": {"name": "get_account_history_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/staging/get_account_history_columns.sql", "original_file_path": "macros/staging/get_account_history_columns.sql", "unique_id": "macro.microsoft_ads.get_account_history_columns", "macro_sql": "{% macro get_account_history_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_modified_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"time_zone\", \"datatype\": dbt.type_string()},\n {\"name\": \"currency_code\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.7317505, "supported_languages": null}, "macro.microsoft_ads.get_keyword_daily_report_columns": {"name": "get_keyword_daily_report_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/staging/get_keyword_daily_report_columns.sql", "original_file_path": "macros/staging/get_keyword_daily_report_columns.sql", "unique_id": "macro.microsoft_ads.get_keyword_daily_report_columns", "macro_sql": "{% macro get_keyword_daily_report_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_distribution\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"bid_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"delivered_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_os\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"keyword_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"language\", \"datatype\": dbt.type_string()},\n {\"name\": \"network\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"top_vs_other\", \"datatype\": dbt.type_string()},\n {\"name\": \"conversions_qualified\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"revenue\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"all_conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"all_conversions_qualified\", \"datatype\": dbt.type_int()},\n {\"name\": \"all_revenue\", \"datatype\": dbt.type_numeric()}\n] %}\n\n{{ microsoft_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('microsoft_ads__keyword_passthrough_metrics'), except_fields=['conversions_qualified', 'conversions', 'revenue', 'all_conversions_qualified', 'all_conversions', 'all_revenue']) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_numeric", "macro.microsoft_ads.microsoft_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.736719, "supported_languages": null}, "macro.microsoft_ads.get_keyword_history_columns": {"name": "get_keyword_history_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/staging/get_keyword_history_columns.sql", "original_file_path": "macros/staging/get_keyword_history_columns.sql", "unique_id": "macro.microsoft_ads.get_keyword_history_columns", "macro_sql": "{% macro get_keyword_history_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"modified_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.7382371, "supported_languages": null}, "macro.microsoft_ads.get_geographic_daily_report_columns": {"name": "get_geographic_daily_report_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/staging/get_geographic_daily_report_columns.sql", "original_file_path": "macros/staging/get_geographic_daily_report_columns.sql", "unique_id": "macro.microsoft_ads.get_geographic_daily_report_columns", "macro_sql": "{% macro get_geographic_daily_report_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_distribution\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"all_conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"all_conversions_qualified\", \"datatype\": dbt.type_float()},\n {\"name\": \"all_revenue\", \"datatype\": dbt.type_float()},\n {\"name\": \"bid_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"city\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions_qualified\", \"datatype\": dbt.type_float()},\n {\"name\": \"country\", \"datatype\": dbt.type_string()},\n {\"name\": \"county\", \"datatype\": dbt.type_string()},\n {\"name\": \"currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"delivered_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_os\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"goal\", \"datatype\": dbt.type_string()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"language\", \"datatype\": dbt.type_string()},\n {\"name\": \"location_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"location_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"metro_area\", \"datatype\": dbt.type_string()},\n {\"name\": \"most_specific_location\", \"datatype\": dbt.type_string()},\n {\"name\": \"network\", \"datatype\": dbt.type_string()},\n {\"name\": \"postal_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend\", \"datatype\": dbt.type_float()},\n {\"name\": \"state\", \"datatype\": dbt.type_string()},\n {\"name\": \"top_vs_other\", \"datatype\": dbt.type_string()},\n {\"name\": \"revenue\", \"datatype\": dbt.type_float()}\n] %}\n\n{{ microsoft_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('microsoft_ads__geographic_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_float", "macro.microsoft_ads.microsoft_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.7444208, "supported_languages": null}, "macro.microsoft_ads.microsoft_ads_add_pass_through_columns": {"name": "microsoft_ads_add_pass_through_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/staging/microsoft_ads_add_pass_through_columns.sql", "original_file_path": "macros/staging/microsoft_ads_add_pass_through_columns.sql", "unique_id": "macro.microsoft_ads.microsoft_ads_add_pass_through_columns", "macro_sql": "{% macro microsoft_ads_add_pass_through_columns(base_columns, pass_through_fields, except_fields=[]) %}\n\n{% if pass_through_fields %}\n {% for column in pass_through_fields %}\n\n {% if column is mapping %}\n {% set col_name = column.alias|default(column.name)|lower %}\n\n {% if col_name not in except_fields %}\n {% if column.alias %}\n {% do base_columns.append({ \"name\": column.name, \"alias\": column.alias, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% else %}\n {% do base_columns.append({ \"name\": column.name, \"datatype\": column.datatype if column.datatype else dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% else %}\n {% if column|lower not in except_fields %}\n {% do base_columns.append({ \"name\": column, \"datatype\": dbt.type_string()}) %}\n {% endif %}\n {% endif %}\n\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "base_columns", "type": null, "description": ""}, {"name": "pass_through_fields", "type": null, "description": ""}, {"name": "except_fields", "type": null, "description": ""}], "created_at": 1783708211.7469752, "supported_languages": null}, "macro.microsoft_ads.get_search_daily_report_columns": {"name": "get_search_daily_report_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/staging/get_search_daily_report_columns.sql", "original_file_path": "macros/staging/get_search_daily_report_columns.sql", "unique_id": "macro.microsoft_ads.get_search_daily_report_columns", "macro_sql": "{% macro get_search_daily_report_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_group_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"bid_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"delivered_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_os\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"keyword_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"language\", \"datatype\": dbt.type_string()},\n {\"name\": \"network\", \"datatype\": dbt.type_string()},\n {\"name\": \"search_query\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"top_vs_other\", \"datatype\": dbt.type_string()},\n {\"name\": \"conversions_qualified\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"revenue\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"all_conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"all_conversions_qualified\", \"datatype\": dbt.type_int()},\n {\"name\": \"all_revenue\", \"datatype\": dbt.type_numeric()}\n] %}\n\n{{ microsoft_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('microsoft_ads__search_passthrough_metrics'), except_fields=['conversions_qualified', 'conversions', 'revenue', 'all_conversions_qualified', 'all_conversions', 'all_revenue']) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_numeric", "macro.microsoft_ads.microsoft_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.7517743, "supported_languages": null}, "macro.microsoft_ads.get_campaign_daily_report_columns": {"name": "get_campaign_daily_report_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/staging/get_campaign_daily_report_columns.sql", "original_file_path": "macros/staging/get_campaign_daily_report_columns.sql", "unique_id": "macro.microsoft_ads.get_campaign_daily_report_columns", "macro_sql": "{% macro get_campaign_daily_report_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_distribution\", \"datatype\": dbt.type_string()},\n {\"name\": \"bid_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"delivered_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_os\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"network\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"top_vs_other\", \"datatype\": dbt.type_string()},\n {\"name\": \"budget_association_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"budget_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"budget_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"conversions_qualified\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"revenue\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"all_conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"all_conversions_qualified\", \"datatype\": dbt.type_int()},\n {\"name\": \"all_revenue\", \"datatype\": dbt.type_numeric()}\n] %} \n\n{{ microsoft_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('microsoft_ads__campaign_passthrough_metrics'), except_fields=['conversions_qualified', 'conversions', 'revenue', 'all_conversions_qualified', 'all_conversions', 'all_revenue']) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_numeric", "macro.microsoft_ads.microsoft_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.7566323, "supported_languages": null}, "macro.microsoft_ads.get_campaign_history_columns": {"name": "get_campaign_history_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/staging/get_campaign_history_columns.sql", "original_file_path": "macros/staging/get_campaign_history_columns.sql", "unique_id": "macro.microsoft_ads.get_campaign_history_columns", "macro_sql": "{% macro get_campaign_history_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"modified_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"time_zone\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"budget\", \"datatype\": dbt.type_float()},\n {\"name\": \"budget_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"budget_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"language\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.7590032, "supported_languages": null}, "macro.microsoft_ads.get_account_daily_report_columns": {"name": "get_account_daily_report_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/staging/get_account_daily_report_columns.sql", "original_file_path": "macros/staging/get_account_daily_report_columns.sql", "unique_id": "macro.microsoft_ads.get_account_daily_report_columns", "macro_sql": "{% macro get_account_daily_report_columns() %}\n\n{% set columns = [\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_distribution\", \"datatype\": dbt.type_string()},\n {\"name\": \"bid_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"currency_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"delivered_match_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_os\", \"datatype\": dbt.type_string()},\n {\"name\": \"device_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"network\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"top_vs_other\", \"datatype\": dbt.type_string()},\n {\"name\": \"conversions_qualified\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversions\", \"datatype\": dbt.type_int()},\n {\"name\": \"revenue\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"all_conversions_qualified\", \"datatype\": dbt.type_int()}\n] %} \n\n{{ microsoft_ads_add_pass_through_columns(base_columns=columns, pass_through_fields=var('microsoft_ads__account_passthrough_metrics'), except_fields=['conversions_qualified', 'conversions', 'revenue', 'all_conversions_qualified']) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_numeric", "macro.microsoft_ads.microsoft_ads_add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.762759, "supported_languages": null}, "macro.microsoft_ads.get_ad_group_history_columns": {"name": "get_ad_group_history_columns", "resource_type": "macro", "package_name": "microsoft_ads", "path": "macros/staging/get_ad_group_history_columns.sql", "original_file_path": "macros/staging/get_ad_group_history_columns.sql", "unique_id": "macro.microsoft_ads.get_ad_group_history_columns", "macro_sql": "{% macro get_ad_group_history_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"modified_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"start_date\", \"datatype\": \"date\"},\n {\"name\": \"end_date\", \"datatype\": \"date\"},\n {\"name\": \"status\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.7643774, "supported_languages": null}, "macro.spark_utils.get_tables": {"name": "get_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.get_tables", "macro_sql": "{% macro get_tables(table_regex_pattern='.*') %}\n\n {% set tables = [] %}\n {% for database in spark__list_schemas('not_used') %}\n {% for table in spark__list_relations_without_caching(database[0]) %}\n {% set db_tablename = database[0] ~ \".\" ~ table[1] %}\n {% set is_match = modules.re.match(table_regex_pattern, db_tablename) %}\n {% if is_match %}\n {% call statement('table_detail', fetch_result=True) -%}\n describe extended {{ db_tablename }}\n {% endcall %}\n\n {% set table_type = load_result('table_detail').table|reverse|selectattr(0, 'in', ('type', 'TYPE', 'Type'))|first %}\n {% if table_type[1]|lower != 'view' %}\n {{ tables.append(db_tablename) }}\n {% endif %}\n {% endif %}\n {% endfor %}\n {% endfor %}\n {{ return(tables) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_regex_pattern", "type": null, "description": ""}], "created_at": 1783708211.7677999, "supported_languages": null}, "macro.spark_utils.get_delta_tables": {"name": "get_delta_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.get_delta_tables", "macro_sql": "{% macro get_delta_tables(table_regex_pattern='.*') %}\n\n {% set delta_tables = [] %}\n {% for db_tablename in get_tables(table_regex_pattern) %}\n {% call statement('table_detail', fetch_result=True) -%}\n describe extended {{ db_tablename }}\n {% endcall %}\n\n {% set table_type = load_result('table_detail').table|reverse|selectattr(0, 'in', ('provider', 'PROVIDER', 'Provider'))|first %}\n {% if table_type[1]|lower == 'delta' %}\n {{ delta_tables.append(db_tablename) }}\n {% endif %}\n {% endfor %}\n {{ return(delta_tables) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.get_tables", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_regex_pattern", "type": null, "description": ""}], "created_at": 1783708211.7692993, "supported_languages": null}, "macro.spark_utils.get_statistic_columns": {"name": "get_statistic_columns", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.get_statistic_columns", "macro_sql": "{% macro get_statistic_columns(table) %}\n\n {% call statement('input_columns', fetch_result=True) %}\n SHOW COLUMNS IN {{ table }}\n {% endcall %}\n {% set input_columns = load_result('input_columns').table %}\n\n {% set output_columns = [] %}\n {% for column in input_columns %}\n {% call statement('column_information', fetch_result=True) %}\n DESCRIBE TABLE {{ table }} `{{ column[0] }}`\n {% endcall %}\n {% if not load_result('column_information').table[1][1].startswith('struct') and not load_result('column_information').table[1][1].startswith('array') %}\n {{ output_columns.append('`' ~ column[0] ~ '`') }}\n {% endif %}\n {% endfor %}\n {{ return(output_columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table", "type": null, "description": ""}], "created_at": 1783708211.7711127, "supported_languages": null}, "macro.spark_utils.spark_optimize_delta_tables": {"name": "spark_optimize_delta_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.spark_optimize_delta_tables", "macro_sql": "{% macro spark_optimize_delta_tables(table_regex_pattern='.*') %}\n\n {% for table in get_delta_tables(table_regex_pattern) %}\n {% set start=modules.datetime.datetime.now() %}\n {% set message_prefix=loop.index ~ \" of \" ~ loop.length %}\n {{ dbt_utils.log_info(message_prefix ~ \" Optimizing \" ~ table) }}\n {% do run_query(\"optimize \" ~ table) %}\n {% set end=modules.datetime.datetime.now() %}\n {% set total_seconds = (end - start).total_seconds() | round(2) %}\n {{ dbt_utils.log_info(message_prefix ~ \" Finished \" ~ table ~ \" in \" ~ total_seconds ~ \"s\") }}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.get_delta_tables", "macro.dbt_utils.log_info", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_regex_pattern", "type": null, "description": ""}], "created_at": 1783708211.7725463, "supported_languages": null}, "macro.spark_utils.spark_vacuum_delta_tables": {"name": "spark_vacuum_delta_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.spark_vacuum_delta_tables", "macro_sql": "{% macro spark_vacuum_delta_tables(table_regex_pattern='.*') %}\n\n {% for table in get_delta_tables(table_regex_pattern) %}\n {% set start=modules.datetime.datetime.now() %}\n {% set message_prefix=loop.index ~ \" of \" ~ loop.length %}\n {{ dbt_utils.log_info(message_prefix ~ \" Vacuuming \" ~ table) }}\n {% do run_query(\"vacuum \" ~ table) %}\n {% set end=modules.datetime.datetime.now() %}\n {% set total_seconds = (end - start).total_seconds() | round(2) %}\n {{ dbt_utils.log_info(message_prefix ~ \" Finished \" ~ table ~ \" in \" ~ total_seconds ~ \"s\") }}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.get_delta_tables", "macro.dbt_utils.log_info", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_regex_pattern", "type": null, "description": ""}], "created_at": 1783708211.7739832, "supported_languages": null}, "macro.spark_utils.spark_analyze_tables": {"name": "spark_analyze_tables", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/maintenance_operation.sql", "original_file_path": "macros/maintenance_operation.sql", "unique_id": "macro.spark_utils.spark_analyze_tables", "macro_sql": "{% macro spark_analyze_tables(table_regex_pattern='.*') %}\n\n {% for table in get_tables(table_regex_pattern) %}\n {% set start=modules.datetime.datetime.now() %}\n {% set columns = get_statistic_columns(table) | join(',') %}\n {% set message_prefix=loop.index ~ \" of \" ~ loop.length %}\n {{ dbt_utils.log_info(message_prefix ~ \" Analyzing \" ~ table) }}\n {% if columns != '' %}\n {% do run_query(\"analyze table \" ~ table ~ \" compute statistics for columns \" ~ columns) %}\n {% endif %}\n {% set end=modules.datetime.datetime.now() %}\n {% set total_seconds = (end - start).total_seconds() | round(2) %}\n {{ dbt_utils.log_info(message_prefix ~ \" Finished \" ~ table ~ \" in \" ~ total_seconds ~ \"s\") }}\n {% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.get_tables", "macro.spark_utils.get_statistic_columns", "macro.dbt_utils.log_info", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_regex_pattern", "type": null, "description": ""}], "created_at": 1783708211.775765, "supported_languages": null}, "macro.spark_utils.assert_not_null": {"name": "assert_not_null", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/etc/assert_not_null.sql", "original_file_path": "macros/etc/assert_not_null.sql", "unique_id": "macro.spark_utils.assert_not_null", "macro_sql": "{% macro assert_not_null(function, arg) -%}\n {{ return(adapter.dispatch('assert_not_null', 'spark_utils')(function, arg)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.spark_utils.default__assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "function", "type": null, "description": ""}, {"name": "arg", "type": null, "description": ""}], "created_at": 1783708211.776385, "supported_languages": null}, "macro.spark_utils.default__assert_not_null": {"name": "default__assert_not_null", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/etc/assert_not_null.sql", "original_file_path": "macros/etc/assert_not_null.sql", "unique_id": "macro.spark_utils.default__assert_not_null", "macro_sql": "{% macro default__assert_not_null(function, arg) %}\n\n coalesce({{function}}({{arg}}), nvl2({{function}}({{arg}}), assert_true({{function}}({{arg}}) is not null), null))\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "function", "type": null, "description": ""}, {"name": "arg", "type": null, "description": ""}], "created_at": 1783708211.7767944, "supported_languages": null}, "macro.spark_utils.spark__get_relations_by_pattern": {"name": "spark__get_relations_by_pattern", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "unique_id": "macro.spark_utils.spark__get_relations_by_pattern", "macro_sql": "{% macro spark__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n\n {%- call statement('get_tables', fetch_result=True) %}\n\n show table extended in {{ schema_pattern }} like '{{ table_pattern }}'\n\n {%- endcall -%}\n\n {%- set table_list = load_result('get_tables') -%}\n\n {%- if table_list and table_list['table'] -%}\n {%- set tbl_relations = [] -%}\n {%- for row in table_list['table'] -%}\n {%- set tbl_relation = api.Relation.create(\n database=None,\n schema=row[0],\n identifier=row[1],\n type=('view' if 'Type: VIEW' in row[3] else 'table')\n ) -%}\n {%- do tbl_relations.append(tbl_relation) -%}\n {%- endfor -%}\n\n {{ return(tbl_relations) }}\n {%- else -%}\n {{ return([]) }}\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783708211.7791524, "supported_languages": null}, "macro.spark_utils.spark__get_relations_by_prefix": {"name": "spark__get_relations_by_prefix", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "unique_id": "macro.spark_utils.spark__get_relations_by_prefix", "macro_sql": "{% macro spark__get_relations_by_prefix(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {% set table_pattern = table_pattern ~ '*' %}\n {{ return(spark_utils.spark__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783708211.7798223, "supported_languages": null}, "macro.spark_utils.spark__get_tables_by_pattern": {"name": "spark__get_tables_by_pattern", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "unique_id": "macro.spark_utils.spark__get_tables_by_pattern", "macro_sql": "{% macro spark__get_tables_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(spark_utils.spark__get_relations_by_pattern(schema_pattern, table_pattern, exclude='', database=target.database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_pattern"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783708211.7803907, "supported_languages": null}, "macro.spark_utils.spark__get_tables_by_prefix": {"name": "spark__get_tables_by_prefix", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "original_file_path": "macros/dbt_utils/sql/get_relations_by_prefix.sql", "unique_id": "macro.spark_utils.spark__get_tables_by_prefix", "macro_sql": "{% macro spark__get_tables_by_prefix(schema_pattern, table_pattern, exclude='', database=target.database) %}\n {{ return(spark_utils.spark__get_relations_by_prefix(schema_pattern, table_pattern, exclude='', database=target.database)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.spark__get_relations_by_prefix"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "schema_pattern", "type": null, "description": ""}, {"name": "table_pattern", "type": null, "description": ""}, {"name": "exclude", "type": null, "description": ""}, {"name": "database", "type": null, "description": ""}], "created_at": 1783708211.780931, "supported_languages": null}, "macro.spark_utils.spark__current_timestamp": {"name": "spark__current_timestamp", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "unique_id": "macro.spark_utils.spark__current_timestamp", "macro_sql": "{% macro spark__current_timestamp() %}\n current_timestamp()\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.7812107, "supported_languages": null}, "macro.spark_utils.spark__current_timestamp_in_utc": {"name": "spark__current_timestamp_in_utc", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/current_timestamp.sql", "unique_id": "macro.spark_utils.spark__current_timestamp_in_utc", "macro_sql": "{% macro spark__current_timestamp_in_utc() %}\n unix_timestamp()\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.781371, "supported_languages": null}, "macro.spark_utils.spark__type_numeric": {"name": "spark__type_numeric", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/datatypes.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/datatypes.sql", "unique_id": "macro.spark_utils.spark__type_numeric", "macro_sql": "{% macro spark__type_numeric() %}\n decimal(28, 6)\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.7815998, "supported_languages": null}, "macro.spark_utils.spark__dateadd": {"name": "spark__dateadd", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/dateadd.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/dateadd.sql", "unique_id": "macro.spark_utils.spark__dateadd", "macro_sql": "{% macro spark__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n {%- set clock_component -%}\n {# make sure the dates + timestamps are real, otherwise raise an error asap #}\n to_unix_timestamp({{ spark_utils.assert_not_null('to_timestamp', from_date_or_timestamp) }})\n - to_unix_timestamp({{ spark_utils.assert_not_null('date', from_date_or_timestamp) }})\n {%- endset -%}\n\n {%- if datepart in ['day', 'week'] -%}\n \n {%- set multiplier = 7 if datepart == 'week' else 1 -%}\n\n to_timestamp(\n to_unix_timestamp(\n date_add(\n {{ spark_utils.assert_not_null('date', from_date_or_timestamp) }},\n cast({{interval}} * {{multiplier}} as int)\n )\n ) + {{clock_component}}\n )\n\n {%- elif datepart in ['month', 'quarter', 'year'] -%}\n \n {%- set multiplier -%} \n {%- if datepart == 'month' -%} 1\n {%- elif datepart == 'quarter' -%} 3\n {%- elif datepart == 'year' -%} 12\n {%- endif -%}\n {%- endset -%}\n\n to_timestamp(\n to_unix_timestamp(\n add_months(\n {{ spark_utils.assert_not_null('date', from_date_or_timestamp) }},\n cast({{interval}} * {{multiplier}} as int)\n )\n ) + {{clock_component}}\n )\n\n {%- elif datepart in ('hour', 'minute', 'second', 'millisecond', 'microsecond') -%}\n \n {%- set multiplier -%} \n {%- if datepart == 'hour' -%} 3600\n {%- elif datepart == 'minute' -%} 60\n {%- elif datepart == 'second' -%} 1\n {%- elif datepart == 'millisecond' -%} (1/1000000)\n {%- elif datepart == 'microsecond' -%} (1/1000000)\n {%- endif -%}\n {%- endset -%}\n\n to_timestamp(\n {{ spark_utils.assert_not_null('to_unix_timestamp', from_date_or_timestamp) }}\n + cast({{interval}} * {{multiplier}} as int)\n )\n\n {%- else -%}\n\n {{ exceptions.raise_compiler_error(\"macro dateadd not implemented for datepart ~ '\" ~ datepart ~ \"' ~ on Spark\") }}\n\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "datepart", "type": null, "description": ""}, {"name": "interval", "type": null, "description": ""}, {"name": "from_date_or_timestamp", "type": null, "description": ""}], "created_at": 1783708211.785471, "supported_languages": null}, "macro.spark_utils.spark__concat": {"name": "spark__concat", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/concat.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/concat.sql", "unique_id": "macro.spark_utils.spark__concat", "macro_sql": "{% macro spark__concat(fields) -%}\n concat({{ fields|join(', ') }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "fields", "type": null, "description": ""}], "created_at": 1783708211.7858524, "supported_languages": null}, "macro.spark_utils.spark__datediff": {"name": "spark__datediff", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/datediff.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/datediff.sql", "unique_id": "macro.spark_utils.spark__datediff", "macro_sql": "{% macro spark__datediff(first_date, second_date, datepart) %}\n\n {%- if datepart in ['day', 'week', 'month', 'quarter', 'year'] -%}\n \n {# make sure the dates are real, otherwise raise an error asap #}\n {% set first_date = spark_utils.assert_not_null('date', first_date) %}\n {% set second_date = spark_utils.assert_not_null('date', second_date) %}\n \n {%- endif -%}\n \n {%- if datepart == 'day' -%}\n \n datediff({{second_date}}, {{first_date}})\n \n {%- elif datepart == 'week' -%}\n \n case when {{first_date}} < {{second_date}}\n then floor(datediff({{second_date}}, {{first_date}})/7)\n else ceil(datediff({{second_date}}, {{first_date}})/7)\n end\n \n -- did we cross a week boundary (Sunday)?\n + case\n when {{first_date}} < {{second_date}} and dayofweek({{second_date}}) < dayofweek({{first_date}}) then 1\n when {{first_date}} > {{second_date}} and dayofweek({{second_date}}) > dayofweek({{first_date}}) then -1\n else 0 end\n\n {%- elif datepart == 'month' -%}\n\n case when {{first_date}} < {{second_date}}\n then floor(months_between(date({{second_date}}), date({{first_date}})))\n else ceil(months_between(date({{second_date}}), date({{first_date}})))\n end\n \n -- did we cross a month boundary?\n + case\n when {{first_date}} < {{second_date}} and dayofmonth({{second_date}}) < dayofmonth({{first_date}}) then 1\n when {{first_date}} > {{second_date}} and dayofmonth({{second_date}}) > dayofmonth({{first_date}}) then -1\n else 0 end\n \n {%- elif datepart == 'quarter' -%}\n \n case when {{first_date}} < {{second_date}}\n then floor(months_between(date({{second_date}}), date({{first_date}}))/3)\n else ceil(months_between(date({{second_date}}), date({{first_date}}))/3)\n end\n \n -- did we cross a quarter boundary?\n + case\n when {{first_date}} < {{second_date}} and (\n (dayofyear({{second_date}}) - (quarter({{second_date}}) * 365/4))\n < (dayofyear({{first_date}}) - (quarter({{first_date}}) * 365/4))\n ) then 1\n when {{first_date}} > {{second_date}} and (\n (dayofyear({{second_date}}) - (quarter({{second_date}}) * 365/4))\n > (dayofyear({{first_date}}) - (quarter({{first_date}}) * 365/4))\n ) then -1\n else 0 end\n\n {%- elif datepart == 'year' -%}\n \n year({{second_date}}) - year({{first_date}})\n\n {%- elif datepart in ('hour', 'minute', 'second', 'millisecond', 'microsecond') -%}\n \n {%- set divisor -%} \n {%- if datepart == 'hour' -%} 3600\n {%- elif datepart == 'minute' -%} 60\n {%- elif datepart == 'second' -%} 1\n {%- elif datepart == 'millisecond' -%} (1/1000)\n {%- elif datepart == 'microsecond' -%} (1/1000000)\n {%- endif -%}\n {%- endset -%}\n\n case when {{first_date}} < {{second_date}}\n then ceil((\n {# make sure the timestamps are real, otherwise raise an error asap #}\n {{ spark_utils.assert_not_null('to_unix_timestamp', spark_utils.assert_not_null('to_timestamp', second_date)) }}\n - {{ spark_utils.assert_not_null('to_unix_timestamp', spark_utils.assert_not_null('to_timestamp', first_date)) }}\n ) / {{divisor}})\n else floor((\n {{ spark_utils.assert_not_null('to_unix_timestamp', spark_utils.assert_not_null('to_timestamp', second_date)) }}\n - {{ spark_utils.assert_not_null('to_unix_timestamp', spark_utils.assert_not_null('to_timestamp', first_date)) }}\n ) / {{divisor}})\n end\n \n {% if datepart == 'millisecond' %}\n + cast(date_format({{second_date}}, 'SSS') as int)\n - cast(date_format({{first_date}}, 'SSS') as int)\n {% endif %}\n \n {% if datepart == 'microsecond' %} \n {% set capture_str = '[0-9]{4}-[0-9]{2}-[0-9]{2}.[0-9]{2}:[0-9]{2}:[0-9]{2}.([0-9]{6})' %}\n -- Spark doesn't really support microseconds, so this is a massive hack!\n -- It will only work if the timestamp-string is of the format\n -- 'yyyy-MM-dd-HH mm.ss.SSSSSS'\n + cast(regexp_extract({{second_date}}, '{{capture_str}}', 1) as int)\n - cast(regexp_extract({{first_date}}, '{{capture_str}}', 1) as int) \n {% endif %}\n\n {%- else -%}\n\n {{ exceptions.raise_compiler_error(\"macro datediff not implemented for datepart ~ '\" ~ datepart ~ \"' ~ on Spark\") }}\n\n {%- endif -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.spark_utils.assert_not_null"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "first_date", "type": null, "description": ""}, {"name": "second_date", "type": null, "description": ""}, {"name": "datepart", "type": null, "description": ""}], "created_at": 1783708211.7928622, "supported_languages": null}, "macro.spark_utils.spark__split_part": {"name": "spark__split_part", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/dbt_utils/cross_db_utils/split_part.sql", "original_file_path": "macros/dbt_utils/cross_db_utils/split_part.sql", "unique_id": "macro.spark_utils.spark__split_part", "macro_sql": "{% macro spark__split_part(string_text, delimiter_text, part_number) %}\n\n {% set delimiter_expr %}\n \n -- escape if starts with a special character\n case when regexp_extract({{ delimiter_text }}, '([^A-Za-z0-9])(.*)', 1) != '_'\n then concat('\\\\', {{ delimiter_text }})\n else {{ delimiter_text }} end\n \n {% endset %}\n\n {% set split_part_expr %}\n \n split(\n {{ string_text }},\n {{ delimiter_expr }}\n )[({{ part_number - 1 }})]\n \n {% endset %}\n \n {{ return(split_part_expr) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "string_text", "type": null, "description": ""}, {"name": "delimiter_text", "type": null, "description": ""}, {"name": "part_number", "type": null, "description": ""}], "created_at": 1783708211.7938561, "supported_languages": null}, "macro.spark_utils.spark__convert_timezone": {"name": "spark__convert_timezone", "resource_type": "macro", "package_name": "spark_utils", "path": "macros/snowplow/convert_timezone.sql", "original_file_path": "macros/snowplow/convert_timezone.sql", "unique_id": "macro.spark_utils.spark__convert_timezone", "macro_sql": "{% macro spark__convert_timezone(in_tz, out_tz, in_timestamp) %}\n from_utc_timestamp(to_utc_timestamp({{in_timestamp}}, {{in_tz}}), {{out_tz}})\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "in_tz", "type": null, "description": ""}, {"name": "out_tz", "type": null, "description": ""}, {"name": "in_timestamp", "type": null, "description": ""}], "created_at": 1783708211.7943366, "supported_languages": null}, "macro.facebook_ads.facebook_ads_extract_url_parameter": {"name": "facebook_ads_extract_url_parameter", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/facebook_ads_extract_url_parameters.sql", "original_file_path": "macros/facebook_ads_extract_url_parameters.sql", "unique_id": "macro.facebook_ads.facebook_ads_extract_url_parameter", "macro_sql": "{% macro facebook_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ return(adapter.dispatch('facebook_ads_extract_url_parameter', 'facebook_ads') (field, url_parameter)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.facebook_ads.default__facebook_ads_extract_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.7949724, "supported_languages": null}, "macro.facebook_ads.default__facebook_ads_extract_url_parameter": {"name": "default__facebook_ads_extract_url_parameter", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/facebook_ads_extract_url_parameters.sql", "original_file_path": "macros/facebook_ads_extract_url_parameters.sql", "unique_id": "macro.facebook_ads.default__facebook_ads_extract_url_parameter", "macro_sql": "{% macro default__facebook_ads_extract_url_parameter(field, url_parameter) -%}\n\n{{ dbt_utils.get_url_parameter(field, url_parameter) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.get_url_parameter"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.7953098, "supported_languages": null}, "macro.facebook_ads.spark__facebook_ads_extract_url_parameter": {"name": "spark__facebook_ads_extract_url_parameter", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/facebook_ads_extract_url_parameters.sql", "original_file_path": "macros/facebook_ads_extract_url_parameters.sql", "unique_id": "macro.facebook_ads.spark__facebook_ads_extract_url_parameter", "macro_sql": "{% macro spark__facebook_ads_extract_url_parameter(field, url_parameter) -%}\n\n{%- set formatted_url_parameter = \"'\" + url_parameter + \"=([^&]+)'\" -%}\nnullif(regexp_extract({{ field }}, {{ formatted_url_parameter }}, 1), '')\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "field", "type": null, "description": ""}, {"name": "url_parameter", "type": null, "description": ""}], "created_at": 1783708211.7957191, "supported_languages": null}, "macro.facebook_ads.get_url_tags_query": {"name": "get_url_tags_query", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/get_url_tag_query.sql", "original_file_path": "macros/get_url_tag_query.sql", "unique_id": "macro.facebook_ads.get_url_tags_query", "macro_sql": "\n\n{%- macro get_url_tags_query(output_cte_name, url_tags_datatype) %}\n {{ return(adapter.dispatch('get_url_tags_query', 'facebook_ads') (output_cte_name, url_tags_datatype)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.facebook_ads.postgres__get_url_tags_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "output_cte_name", "type": null, "description": ""}, {"name": "url_tags_datatype", "type": null, "description": ""}], "created_at": 1783708211.797017, "supported_languages": null}, "macro.facebook_ads.default__get_url_tags_query": {"name": "default__get_url_tags_query", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/get_url_tag_query.sql", "original_file_path": "macros/get_url_tag_query.sql", "unique_id": "macro.facebook_ads.default__get_url_tags_query", "macro_sql": "\n\n{%- macro default__get_url_tags_query(output_cte_name, url_tags_datatype) %}\n\n {{ output_cte_name }} as (\n select\n source_relation,\n _fivetran_id,\n creative_id,\n cast(null as {{ dbt.type_string() }}) as key,\n cast(null as {{ dbt.type_string() }}) as value,\n cast(null as {{ dbt.type_string() }}) as type\n from unnested\n )\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "output_cte_name", "type": null, "description": ""}, {"name": "url_tags_datatype", "type": null, "description": ""}], "created_at": 1783708211.7975144, "supported_languages": null}, "macro.facebook_ads.bigquery__get_url_tags_query": {"name": "bigquery__get_url_tags_query", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/get_url_tag_query.sql", "original_file_path": "macros/get_url_tag_query.sql", "unique_id": "macro.facebook_ads.bigquery__get_url_tags_query", "macro_sql": "\n\n{%- macro bigquery__get_url_tags_query(output_cte_name, url_tags_datatype) %}\n\n {%- set is_native_json = url_tags_datatype == 'json' %}\n\n unnested as (\n select\n source_relation,\n _fivetran_id,\n creative_id,\n url_tag_element\n from required_fields,\n\n {%- if is_native_json %}\n unnest(json_extract_array(url_tags)) as url_tag_element\n {%- else %}\n unnest(json_extract_array(replace(trim(url_tags, '\"'),'\\\\',''))) as url_tag_element\n {%- endif %}\n\n where url_tags is not null\n ),\n\n {{ output_cte_name }} as (\n select\n source_relation,\n _fivetran_id,\n creative_id,\n json_extract_scalar(url_tag_element, '$.key') as key,\n json_extract_scalar(url_tag_element, '$.value') as value,\n json_extract_scalar(url_tag_element, '$.type') as type\n from unnested\n )\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "output_cte_name", "type": null, "description": ""}, {"name": "url_tags_datatype", "type": null, "description": ""}], "created_at": 1783708211.7980967, "supported_languages": null}, "macro.facebook_ads.postgres__get_url_tags_query": {"name": "postgres__get_url_tags_query", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/get_url_tag_query.sql", "original_file_path": "macros/get_url_tag_query.sql", "unique_id": "macro.facebook_ads.postgres__get_url_tags_query", "macro_sql": "\n\n{%- macro postgres__get_url_tags_query(output_cte_name, url_tags_datatype) %}\n\n {%- set is_native_json = url_tags_datatype in ('json', 'jsonb') %}\n\n unnested as (\n select\n source_relation,\n _fivetran_id,\n creative_id,\n url_tag_element\n from required_fields\n\n {%- if is_native_json %}\n cross join lateral {{ url_tags_datatype }}_array_elements(url_tags) as url_tag_element -- use json_array_elements or jsonb_array_elements based on datatype\n {%- else %}\n cross join lateral json_array_elements(replace(trim(url_tags::text, '\"'),'\\\\','')::json) as url_tag_element\n {%- endif %}\n\n where url_tags is not null\n ),\n\n {{ output_cte_name }} as (\n select\n source_relation,\n _fivetran_id,\n creative_id,\n url_tag_element->>'key' as key,\n url_tag_element->>'value' as value,\n url_tag_element->>'type' as type\n from unnested\n )\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "output_cte_name", "type": null, "description": ""}, {"name": "url_tags_datatype", "type": null, "description": ""}], "created_at": 1783708211.7987468, "supported_languages": null}, "macro.facebook_ads.redshift__get_url_tags_query": {"name": "redshift__get_url_tags_query", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/get_url_tag_query.sql", "original_file_path": "macros/get_url_tag_query.sql", "unique_id": "macro.facebook_ads.redshift__get_url_tags_query", "macro_sql": "\n\n{%- macro redshift__get_url_tags_query(output_cte_name, url_tags_datatype) %}\n\n {%- set is_native_json = url_tags_datatype == 'super' %}\n\n url_tags as (\n select\n source_relation,\n _fivetran_id,\n creative_id,\n {{ 'url_tags' if is_native_json else 'json_parse(url_tags)' }} as parsed_url_tags\n from required_fields\n where url_tags is not null\n ),\n\n {{ output_cte_name }} as (\n select\n ut.source_relation,\n ut._fivetran_id,\n ut.creative_id,\n element.key::varchar as key,\n element.value::varchar as value,\n element.type::varchar as type\n from url_tags as ut\n cross join ut.parsed_url_tags as element\n )\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "output_cte_name", "type": null, "description": ""}, {"name": "url_tags_datatype", "type": null, "description": ""}], "created_at": 1783708211.7992723, "supported_languages": null}, "macro.facebook_ads.snowflake__get_url_tags_query": {"name": "snowflake__get_url_tags_query", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/get_url_tag_query.sql", "original_file_path": "macros/get_url_tag_query.sql", "unique_id": "macro.facebook_ads.snowflake__get_url_tags_query", "macro_sql": "\n\n{%- macro snowflake__get_url_tags_query(output_cte_name, url_tags_datatype) %}\n\n {%- set is_native_json = url_tags_datatype in ('variant', 'object', 'array') %}\n\n {{ output_cte_name }} as (\n select\n source_relation,\n _fivetran_id,\n creative_id,\n url_tags.value:key::string as key,\n url_tags.value:value::string as value,\n url_tags.value:type::string as type\n from required_fields,\n lateral flatten(input => {{ 'url_tags' if is_native_json else 'parse_json(url_tags)' }}) as url_tags\n where url_tags is not null\n )\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "output_cte_name", "type": null, "description": ""}, {"name": "url_tags_datatype", "type": null, "description": ""}], "created_at": 1783708211.7998245, "supported_languages": null}, "macro.facebook_ads.spark__get_url_tags_query": {"name": "spark__get_url_tags_query", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/get_url_tag_query.sql", "original_file_path": "macros/get_url_tag_query.sql", "unique_id": "macro.facebook_ads.spark__get_url_tags_query", "macro_sql": "\n\n{%- macro spark__get_url_tags_query(output_cte_name, url_tags_datatype) %}\n {# JSON datatype not supported by Fivetran so no need to check datatype. #}\n\n cleaned_fields as (\n select\n source_relation,\n _fivetran_id,\n creative_id,\n explode(from_json(url_tags, 'array>')) as url_tags\n from required_fields\n where url_tags is not null\n ),\n\n {{ output_cte_name }} as (\n select\n source_relation,\n _fivetran_id,\n creative_id,\n url_tags.key as key,\n url_tags.value as value,\n url_tags.type as type\n from cleaned_fields\n )\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "output_cte_name", "type": null, "description": ""}, {"name": "url_tags_datatype", "type": null, "description": ""}], "created_at": 1783708211.8001578, "supported_languages": null}, "macro.facebook_ads.facebook_action_slug": {"name": "facebook_action_slug", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/facebook_action_slug.sql", "original_file_path": "macros/facebook_action_slug.sql", "unique_id": "macro.facebook_ads.facebook_action_slug", "macro_sql": "{% macro facebook_action_slug(action_type) -%}\n {%- set raw_label = action_type.name if action_type.name else action_type.pattern -%}\n {# replace dots and other separators with underscores before slugifying #}\n {%- set cleaned = raw_label | replace('.', '_') -%}\n\n {{- dbt_utils.slugify(cleaned) -}}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.slugify"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "action_type", "type": null, "description": ""}], "created_at": 1783708211.8008807, "supported_languages": null}, "macro.facebook_ads.facebook_ads_persist_pass_through_columns": {"name": "facebook_ads_persist_pass_through_columns", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/facebook_ads_persist_pass_through_columns.sql", "original_file_path": "macros/facebook_ads_persist_pass_through_columns.sql", "unique_id": "macro.facebook_ads.facebook_ads_persist_pass_through_columns", "macro_sql": "{% macro facebook_ads_persist_pass_through_columns(pass_through_variable, identifier=none, transform='', coalesce_with=none, exclude_fields=[]) %}\n\n{% if var(pass_through_variable, none) %}\n {% for field in var(pass_through_variable) %}\n {% set field_name = field.alias|default(field.name)|lower if field is mapping else field %}\n {% if field_name not in exclude_fields %}\n , {{ transform ~ '(cast(' ~ ('coalesce(' if coalesce_with is not none else '') ~ (identifier ~ '.' if identifier else '') ~ field_name ~ ((', ' ~ coalesce_with ~ ')') if coalesce_with is not none else '') ~ ' as ' ~ dbt.type_float() ~ '))' }} as {{ field_name }}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_variable", "type": null, "description": ""}, {"name": "identifier", "type": null, "description": ""}, {"name": "transform", "type": null, "description": ""}, {"name": "coalesce_with", "type": null, "description": ""}, {"name": "exclude_fields", "type": null, "description": ""}], "created_at": 1783708211.8029575, "supported_languages": null}, "macro.facebook_ads.get_column_datatype": {"name": "get_column_datatype", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/get_column_datatype.sql", "original_file_path": "macros/get_column_datatype.sql", "unique_id": "macro.facebook_ads.get_column_datatype", "macro_sql": "{% macro get_column_datatype(table_name, column_name) -%}\n {{ return(adapter.dispatch('get_column_datatype', 'facebook_ads')(table_name, column_name)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.facebook_ads.default__get_column_datatype"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_name", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}], "created_at": 1783708211.8035996, "supported_languages": null}, "macro.facebook_ads.default__get_column_datatype": {"name": "default__get_column_datatype", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/get_column_datatype.sql", "original_file_path": "macros/get_column_datatype.sql", "unique_id": "macro.facebook_ads.default__get_column_datatype", "macro_sql": "{% macro default__get_column_datatype(table_name, column_name) %}\n {%- set columns = adapter.get_columns_in_relation(ref(table_name)) -%}\n {%- for col in columns if col.name == column_name -%}\n {{ return(col.dtype | lower) }}\n {%- endfor -%}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "table_name", "type": null, "description": ""}, {"name": "column_name", "type": null, "description": ""}], "created_at": 1783708211.8042426, "supported_languages": null}, "macro.facebook_ads.get_demographics_region_actions_columns": {"name": "get_demographics_region_actions_columns", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/staging/get_demographics_region_actions_columns.sql", "original_file_path": "macros/staging/get_demographics_region_actions_columns.sql", "unique_id": "macro.facebook_ads.get_demographics_region_actions_columns", "macro_sql": "{% macro get_demographics_region_actions_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"action_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"index\", \"datatype\": dbt.type_int()},\n {\"name\": \"value\", \"datatype\": dbt.type_float()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('facebook_ads__demographics_region_actions_passthrough_metrics')) }} \n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_float", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.806044, "supported_languages": null}, "macro.facebook_ads.get_basic_ad_columns": {"name": "get_basic_ad_columns", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/staging/get_basic_ad_columns.sql", "original_file_path": "macros/staging/get_basic_ad_columns.sql", "unique_id": "macro.facebook_ads.get_basic_ad_columns", "macro_sql": "{% macro get_basic_ad_columns() %}\n\n{% set columns = [\n {\"name\": \"ad_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"adset_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"inline_link_clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"spend\", \"datatype\": dbt.type_float()},\n {\"name\": \"reach\", \"datatype\": dbt.type_int()},\n {\"name\": \"frequency\", \"datatype\": dbt.type_float()}\n] %}\n\n{# \n Reach and Frequency are not included in downstream models by default, though they are included in the staging model.\n The below ensures that users can add Reach and Frequency to downstream models with the `facebook_ads__basic_ad_passthrough_metrics` variable\n while avoiding duplicate column errors.\n #}\n{% set unique_passthrough = [] %}\n{% for field in var('facebook_ads__basic_ad_passthrough_metrics') %}\n {% if (field.alias if field.alias else field.name)|lower not in ('reach', 'frequency') %}\n {% do unique_passthrough.append({\"name\": field.name, \"alias\": field.alias}) %}\n {% endif %}\n{% endfor %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, unique_passthrough) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_int", "macro.dbt.type_float", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.8093123, "supported_languages": null}, "macro.facebook_ads.get_ad_history_columns": {"name": "get_ad_history_columns", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/staging/get_ad_history_columns.sql", "original_file_path": "macros/staging/get_ad_history_columns.sql", "unique_id": "macro.facebook_ads.get_ad_history_columns", "macro_sql": "{% macro get_ad_history_columns() %}\n\n{% set columns = [\n {\"name\": \"updated_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"ad_set_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"creative_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"conversion_domain\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.811153, "supported_languages": null}, "macro.facebook_ads.get_ad_set_history_columns": {"name": "get_ad_set_history_columns", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/staging/get_ad_set_history_columns.sql", "original_file_path": "macros/staging/get_ad_set_history_columns.sql", "unique_id": "macro.facebook_ads.get_ad_set_history_columns", "macro_sql": "{% macro get_ad_set_history_columns() %}\n\n{% set columns = [\n {\"name\": \"updated_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"start_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"end_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"bid_strategy\", \"datatype\": dbt.type_string()},\n {\"name\": \"daily_budget\", \"datatype\": dbt.type_int()},\n {\"name\": \"budget_remaining\", \"datatype\": dbt.type_int()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"optimization_goal\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.8136969, "supported_languages": null}, "macro.facebook_ads.get_account_history_columns": {"name": "get_account_history_columns", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/staging/get_account_history_columns.sql", "original_file_path": "macros/staging/get_account_history_columns.sql", "unique_id": "macro.facebook_ads.get_account_history_columns", "macro_sql": "{% macro get_account_history_columns() %}\n\n{% set columns = [\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"account_status\", \"datatype\": dbt.type_string()},\n {\"name\": \"business_country_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"currency\", \"datatype\": dbt.type_string()},\n {\"name\": \"timezone_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"timezone_offset_hours_utc\", \"datatype\": dbt.type_float()},\n {\"name\": \"business_state\", \"datatype\": dbt.type_string()},\n {\"name\": \"min_daily_budget\", \"datatype\": dbt.type_int()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_int", "macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.8160825, "supported_languages": null}, "macro.facebook_ads.get_creative_history_columns": {"name": "get_creative_history_columns", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/staging/get_creative_history_columns.sql", "original_file_path": "macros/staging/get_creative_history_columns.sql", "unique_id": "macro.facebook_ads.get_creative_history_columns", "macro_sql": "{% macro get_creative_history_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"page_link\", \"datatype\": dbt.type_string()},\n {\"name\": \"template_page_link\", \"datatype\": dbt.type_string()},\n {\"name\": \"url_tags\", \"datatype\": dbt.type_string()},\n {\"name\": \"asset_feed_spec_link_urls\", \"datatype\": dbt.type_string()},\n {\"name\": \"object_story_link_data_child_attachments\", \"datatype\": dbt.type_string()},\n {\"name\": \"object_story_link_data_caption\", \"datatype\": dbt.type_string()},\n {\"name\": \"object_story_link_data_description\", \"datatype\": dbt.type_string()},\n {\"name\": \"object_story_link_data_link\", \"datatype\": dbt.type_string()},\n {\"name\": \"object_story_link_data_message\", \"datatype\": dbt.type_string()},\n {\"name\": \"template_app_link_spec_android\", \"datatype\": dbt.type_string()},\n {\"name\": \"template_app_link_spec_ios\", \"datatype\": dbt.type_string()},\n {\"name\": \"template_app_link_spec_ipad\", \"datatype\": dbt.type_string()},\n {\"name\": \"template_app_link_spec_iphone\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.8196685, "supported_languages": null}, "macro.facebook_ads.get_demographics_country_actions_columns": {"name": "get_demographics_country_actions_columns", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/staging/get_demographics_country_actions_columns.sql", "original_file_path": "macros/staging/get_demographics_country_actions_columns.sql", "unique_id": "macro.facebook_ads.get_demographics_country_actions_columns", "macro_sql": "{% macro get_demographics_country_actions_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"action_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"index\", \"datatype\": dbt.type_int()},\n {\"name\": \"value\", \"datatype\": dbt.type_float()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('facebook_ads__demographics_country_actions_passthrough_metrics')) }} \n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_float", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.8214967, "supported_languages": null}, "macro.facebook_ads.facebook_ads_fill_pass_through_columns": {"name": "facebook_ads_fill_pass_through_columns", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/staging/facebook_ads_fill_pass_through_columns.sql", "original_file_path": "macros/staging/facebook_ads_fill_pass_through_columns.sql", "unique_id": "macro.facebook_ads.facebook_ads_fill_pass_through_columns", "macro_sql": "{% macro facebook_ads_fill_pass_through_columns(pass_through_fields) %}\n\n{% if pass_through_fields %}\n {% for field in pass_through_fields %}\n {% if field.transform_sql %}\n , coalesce(cast({{ field.transform_sql }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% else %}\n , coalesce(cast({{ field.alias if field.alias else field.name }} as {{ dbt.type_float() }}), 0) as {{ field.alias if field.alias else field.name }}\n {% endif %}\n {% endfor %}\n{% endif %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [{"name": "pass_through_fields", "type": null, "description": ""}], "created_at": 1783708211.8228602, "supported_languages": null}, "macro.facebook_ads.get_demographics_region_columns": {"name": "get_demographics_region_columns", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/staging/get_demographics_region_columns.sql", "original_file_path": "macros/staging/get_demographics_region_columns.sql", "unique_id": "macro.facebook_ads.get_demographics_region_columns", "macro_sql": "{% macro get_demographics_region_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"frequency\", \"datatype\": dbt.type_float()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"inline_link_clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"reach\", \"datatype\": dbt.type_int()},\n {\"name\": \"region\", \"datatype\": dbt.type_string()},\n {\"name\": \"spend\", \"datatype\": dbt.type_float()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('facebook_ads__demographics_region_passthrough_metrics')) }} \n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_float", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.825223, "supported_languages": null}, "macro.facebook_ads.get_basic_ad_actions_columns": {"name": "get_basic_ad_actions_columns", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/staging/get_basic_ad_actions_columns.sql", "original_file_path": "macros/staging/get_basic_ad_actions_columns.sql", "unique_id": "macro.facebook_ads.get_basic_ad_actions_columns", "macro_sql": "{% macro get_basic_ad_actions_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"action_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"index\", \"datatype\": dbt.type_int()},\n {\"name\": \"value\", \"datatype\": dbt.type_float()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('facebook_ads__basic_ad_actions_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_float", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.8270333, "supported_languages": null}, "macro.facebook_ads.get_campaign_history_columns": {"name": "get_campaign_history_columns", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/staging/get_campaign_history_columns.sql", "original_file_path": "macros/staging/get_campaign_history_columns.sql", "unique_id": "macro.facebook_ads.get_campaign_history_columns", "macro_sql": "{% macro get_campaign_history_columns() %}\n\n{% set columns = [\n {\"name\": \"updated_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"created_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_int()},\n {\"name\": \"id\", \"datatype\": dbt.type_int()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"start_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"stop_time\", \"datatype\": dbt.type_timestamp()}, \n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"daily_budget\", \"datatype\": dbt.type_int()},\n {\"name\": \"lifetime_budget\", \"datatype\": dbt.type_int()},\n {\"name\": \"budget_remaining\", \"datatype\": dbt.type_float()}\n] %}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_string", "macro.dbt.type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.8295262, "supported_languages": null}, "macro.facebook_ads.get_demographics_country_columns": {"name": "get_demographics_country_columns", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/staging/get_demographics_country_columns.sql", "original_file_path": "macros/staging/get_demographics_country_columns.sql", "unique_id": "macro.facebook_ads.get_demographics_country_columns", "macro_sql": "{% macro get_demographics_country_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"country\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"frequency\", \"datatype\": dbt.type_float()},\n {\"name\": \"impressions\", \"datatype\": dbt.type_int()},\n {\"name\": \"inline_link_clicks\", \"datatype\": dbt.type_int()},\n {\"name\": \"reach\", \"datatype\": dbt.type_int()},\n {\"name\": \"spend\", \"datatype\": dbt.type_float()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('facebook_ads__demographics_country_passthrough_metrics')) }} \n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_float", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.8318372, "supported_languages": null}, "macro.facebook_ads.get_basic_ad_action_values_columns": {"name": "get_basic_ad_action_values_columns", "resource_type": "macro", "package_name": "facebook_ads", "path": "macros/staging/get_basic_ad_action_values_columns.sql", "original_file_path": "macros/staging/get_basic_ad_action_values_columns.sql", "unique_id": "macro.facebook_ads.get_basic_ad_action_values_columns", "macro_sql": "{% macro get_basic_ad_action_values_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"action_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"ad_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"date\", \"datatype\": \"date\"},\n {\"name\": \"index\", \"datatype\": dbt.type_int()},\n {\"name\": \"value\", \"datatype\": dbt.type_float()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('facebook_ads__basic_ad_action_values_passthrough_metrics')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_string", "macro.dbt.type_timestamp", "macro.dbt.type_int", "macro.dbt.type_float", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "config": {"meta": {}, "docs": {"show": true, "node_color": null}}, "patch_path": null, "arguments": [], "created_at": 1783708211.8336403, "supported_languages": null}}, "docs": {"doc.dbt.__overview__": {"name": "__overview__", "resource_type": "doc", "package_name": "dbt", "path": "overview.md", "original_file_path": "docs/overview.md", "unique_id": "doc.dbt.__overview__", "block_contents": "### Welcome!\n\nWelcome to the auto-generated documentation for your dbt project!\n\n### Navigation\n\nYou can use the `Project` and `Database` navigation tabs on the left side of the window to explore the models\nin your project.\n\n#### Project Tab\nThe `Project` tab mirrors the directory structure of your dbt project. In this tab, you can see all of the\nmodels defined in your dbt project, as well as models imported from dbt packages.\n\n#### Database Tab\nThe `Database` tab also exposes your models, but in a format that looks more like a database explorer. This view\nshows relations (tables and views) grouped into database schemas. Note that ephemeral models are _not_ shown\nin this interface, as they do not exist in the database.\n\n### Graph Exploration\nYou can click the blue icon on the bottom-right corner of the page to view the lineage graph of your models.\n\nOn model pages, you'll see the immediate parents and children of the model you're exploring. By clicking the `Expand`\nbutton at the top-right of this lineage pane, you'll be able to see all of the models that are used to build,\nor are built from, the model you're exploring.\n\nOnce expanded, you'll be able to use the `--select` and `--exclude` model selection syntax to filter the\nmodels in the graph. For more information on model selection, check out the [dbt docs](https://docs.getdbt.com/docs/model-selection-syntax).\n\nNote that you can also right-click on models to interactively filter and explore the graph.\n\n---\n\n### More information\n\n- [What is dbt](https://docs.getdbt.com/docs/introduction)?\n- Read the [dbt viewpoint](https://docs.getdbt.com/docs/viewpoint)\n- [Installation](https://docs.getdbt.com/docs/installation)\n- Join the [dbt Community](https://www.getdbt.com/community/) for questions and discussion"}, "doc.linkedin.source_relation": {"name": "source_relation", "resource_type": "doc", "package_name": "linkedin", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.linkedin.source_relation", "block_contents": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "doc.apple_search_ads.source_relation": {"name": "source_relation", "resource_type": "doc", "package_name": "apple_search_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.apple_search_ads.source_relation", "block_contents": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "doc.apple_search_ads.conversions": {"name": "conversions", "resource_type": "doc", "package_name": "apple_search_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.apple_search_ads.conversions", "block_contents": "Total installs resulting from a view or a tap. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_installs`. We will completely sunset this field from the package by April 2025."}, "doc.apple_search_ads.new_downloads": {"name": "new_downloads", "resource_type": "doc", "package_name": "apple_search_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.apple_search_ads.new_downloads", "block_contents": "App downloads from new users who have never before installed the respective app. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_new_downloads`. We will completely sunset this field from the package by April 2025."}, "doc.apple_search_ads.redownloads": {"name": "redownloads", "resource_type": "doc", "package_name": "apple_search_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.apple_search_ads.redownloads", "block_contents": "Occurs when a user downloads respective app, deletes it, and downloads the same app again following a tap on an ad on the App Store, or downloads the same app to an additional device. This field was deprecated in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) due to the release of Apple Search Ads API v5 and replaced with `tap_redownloads`. We will completely sunset this field from the package by April 2025."}, "doc.apple_search_ads.tap_installs": {"name": "tap_installs", "resource_type": "doc", "package_name": "apple_search_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.apple_search_ads.tap_installs", "block_contents": "The total number of new downloads and redownloads from users who tapped on your ad within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `conversions` field."}, "doc.apple_search_ads.tap_new_downloads": {"name": "tap_new_downloads", "resource_type": "doc", "package_name": "apple_search_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.apple_search_ads.tap_new_downloads", "block_contents": "New downloads from users who tapped on your ad and have not previously downloaded your app. These are counted within a 30-day window. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `new_downloads` field."}, "doc.apple_search_ads.tap_redownloads": {"name": "tap_redownloads", "resource_type": "doc", "package_name": "apple_search_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.apple_search_ads.tap_redownloads", "block_contents": "A redownload is when a user downloads your app, deletes it, then downloads it again on the same device or a different one following an ad tap. A tap-through redownload is counted when a user redownloads your app within 30 days of tapping on the ad. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `redownloads` field."}, "doc.apple_search_ads.total_downloads": {"name": "total_downloads", "resource_type": "doc", "package_name": "apple_search_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.apple_search_ads.total_downloads", "block_contents": "The sum of `new_downloads` and `redownloads`. Following the [release](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) of Apple Search Ads API v5, the package will sunset this field by April 2025. Please refer to its replacement, `tap_total_downloads`, instead."}, "doc.apple_search_ads.tap_total_downloads": {"name": "tap_total_downloads", "resource_type": "doc", "package_name": "apple_search_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.apple_search_ads.tap_total_downloads", "block_contents": "The sum of `tap_new_downloads` and `tap_redownloads`. This field was introduced in [February 2025](https://fivetran.com/docs/changelog/2025/february-2025#applesearchads) as part of the Apple Search Ads v5 API release. It has replaced the `total_downloads` field."}, "doc.reddit_ads._fivetran_synced": {"name": "_fivetran_synced", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads._fivetran_synced", "block_contents": "Timestamp of when Fivetran synced a record."}, "doc.reddit_ads.account_conversions_report": {"name": "account_conversions_report", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.account_conversions_report", "block_contents": "Provides a summary of conversion events at the account level, aggregating key metrics by event and day."}, "doc.reddit_ads.account_id": {"name": "account_id", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.account_id", "block_contents": "The ID of the account."}, "doc.reddit_ads.ad_conversions_report": {"name": "ad_conversions_report", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.ad_conversions_report", "block_contents": "Provides a summary of conversion events at the individual ad level, aggregating key metrics by event and day."}, "doc.reddit_ads.ad_group_conversions_report": {"name": "ad_group_conversions_report", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.ad_group_conversions_report", "block_contents": "Provides a summary of conversion events at the ad group level, aggregating key metrics by event and day."}, "doc.reddit_ads.ad_group_id": {"name": "ad_group_id", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.ad_group_id", "block_contents": "The ID of the ad group."}, "doc.reddit_ads.ad_group_name": {"name": "ad_group_name", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.ad_group_name", "block_contents": "Name of ad group."}, "doc.reddit_ads.ad_id": {"name": "ad_id", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.ad_id", "block_contents": "The ID of the ad."}, "doc.reddit_ads.ad_name": {"name": "ad_name", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.ad_name", "block_contents": "Name of ad."}, "doc.reddit_ads.attribution_type": {"name": "attribution_type", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.attribution_type", "block_contents": "Attribution type: \"CLICK_THROUGH_CONVERSION\", \"VIEW_THROUGH_CONVERSION\", or \"ALL_CONVERSION\".\nCLICK_THROUGH_CONVERSION: A user clicked on your ad and then completed the conversion action on your site. \nVIEW_THROUGH_CONVERSION: A user saw your ad and did not click it, but did complete the conversion action on your site.\nALL_CONVERSION: Combination of both."}, "doc.reddit_ads.avg_value": {"name": "avg_value", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.avg_value", "block_contents": "The average value of conversions over a given period."}, "doc.reddit_ads.bid_strategy": {"name": "bid_strategy", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.bid_strategy", "block_contents": "The bid strategy for this entity. \"MAXIMIZE_VOLUME\", \"MANUAL_BIDDING\", or \"BIDLESS\""}, "doc.reddit_ads.bid_value": {"name": "bid_value", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.bid_value", "block_contents": "The amount to pay in microcurrency per bidding event."}, "doc.reddit_ads.campaign_conversions_report": {"name": "campaign_conversions_report", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.campaign_conversions_report", "block_contents": "Provides a summary of conversion events at the campaign level, aggregating key metrics by event and day."}, "doc.reddit_ads.campaign_country_conversions_report": {"name": "campaign_country_conversions_report", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.campaign_country_conversions_report", "block_contents": "Provides a summary of conversion events at the campaign and country level, aggregating key metrics by event and day such as view-through and click-through conversions."}, "doc.reddit_ads.campaign_country_report": {"name": "campaign_country_report", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.campaign_country_report", "block_contents": "Each record represents a summary of events at the date, country, and campaign level."}, "doc.reddit_ads.campaign_id": {"name": "campaign_id", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.campaign_id", "block_contents": "The ID of the campaign."}, "doc.reddit_ads.campaign_name": {"name": "campaign_name", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.campaign_name", "block_contents": "Name of campaign."}, "doc.reddit_ads.click_attribution_window": {"name": "click_attribution_window", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.click_attribution_window", "block_contents": "Determines how long after clicking on your ad you count that user\u2019s actions as a conversion. \"DAY\", \"WEEK\", or \"MONTH\""}, "doc.reddit_ads.click_through_conversion_attribution_window_day": {"name": "click_through_conversion_attribution_window_day", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.click_through_conversion_attribution_window_day", "block_contents": "The total click-through conversions attributed, for the given day-long window. Not included by the package by default."}, "doc.reddit_ads.click_through_conversion": {"name": "click_through_conversion", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.click_through_conversion", "block_contents": "The total click-through conversions attributed, for the given month-long window."}, "doc.reddit_ads.click_through_conversion_attribution_window_week": {"name": "click_through_conversion_attribution_window_week", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.click_through_conversion_attribution_window_week", "block_contents": "The total click-through conversions attributed, for the given week-long window. Not included by the package by default."}, "doc.reddit_ads.click_url": {"name": "click_url", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.click_url", "block_contents": "The destination url, or the website address, that a visitor goes to when they click on the ad"}, "doc.reddit_ads.clicks": {"name": "clicks", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.clicks", "block_contents": "The number of clicks detected for this report period"}, "doc.reddit_ads.configured_status": {"name": "configured_status", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.configured_status", "block_contents": "The status configured by the account owner. \"ACTIVE\", \"PAUSED\", \"ARCHIVED\", \"DELETED\""}, "doc.reddit_ads.conversion_roas": {"name": "conversion_roas", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.conversion_roas", "block_contents": "Return on ad spend for purchases for this period"}, "doc.reddit_ads.country": {"name": "country", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.country", "block_contents": "The country associated with the record."}, "doc.reddit_ads.cpc": {"name": "cpc", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.cpc", "block_contents": "The cost-per-click for this period"}, "doc.reddit_ads.created_at": {"name": "created_at", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.created_at", "block_contents": "Time that the respective record (ad, ad group, campaign, post, etc) was created. ISO-8601 timestamp."}, "doc.reddit_ads.ctr": {"name": "ctr", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.ctr", "block_contents": "The click-through-rate for this period"}, "doc.reddit_ads.currency": {"name": "currency", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.currency", "block_contents": "The currency this account uses (ISO-4217)"}, "doc.reddit_ads.date": {"name": "date", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.date", "block_contents": "YYYY-MM-DD formatted date"}, "doc.reddit_ads.date_day": {"name": "date_day", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.date_day", "block_contents": "YYYY-MM-DD formatted date"}, "doc.reddit_ads.ecpm": {"name": "ecpm", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.ecpm", "block_contents": "The effective CPM for this period"}, "doc.reddit_ads.effective_status": {"name": "effective_status", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.effective_status", "block_contents": "The calculated status determining the real status of this entity."}, "doc.reddit_ads.end_time": {"name": "end_time", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.end_time", "block_contents": "When the entity will stop delivering."}, "doc.reddit_ads.event_name": {"name": "event_name", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.event_name", "block_contents": "The name of the conversion event or action being tracked, such as a purchase, form submission, or sign-up. This field categorizes different conversion types within the dataset."}, "doc.reddit_ads.expand_targeting": {"name": "expand_targeting", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.expand_targeting", "block_contents": "Boolean that when selected, allows Reddit to expand your targeting to maximize your results."}, "doc.reddit_ads.funding_instrument_id": {"name": "funding_instrument_id", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.funding_instrument_id", "block_contents": "Campaign level funding instrument id"}, "doc.reddit_ads.goal_type": {"name": "goal_type", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.goal_type", "block_contents": "The type of goal for the entity. \"IMPRESSIONS\", \"PERCENTAGE\", \"CLICKS\", \"CONVERSIONS\", \"LIFETIME_SPEND\", \"DAILY_SPEND\", or \"VIDEO_VIEWABLE_IMPRESSIONS\""}, "doc.reddit_ads.goal_value": {"name": "goal_value", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.goal_value", "block_contents": "The value used to determine the goal has been met. This is measured in microcurrency for monetary goals types."}, "doc.reddit_ads.impressions": {"name": "impressions", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.impressions", "block_contents": "The number of impressions served for this report period"}, "doc.reddit_ads.is_processing": {"name": "is_processing", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.is_processing", "block_contents": "Whether or not effective status is processing"}, "doc.reddit_ads.objective": {"name": "objective", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.objective", "block_contents": "The objective type of a campaign."}, "doc.reddit_ads.optimization_strategy_type": {"name": "optimization_strategy_type", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.optimization_strategy_type", "block_contents": "The strategy to use when optimizing the delivery of an ad. \"DOWNSTREAM_CONVERSIONS\" or \"APP_INSTALLS\""}, "doc.reddit_ads.post_id": {"name": "post_id", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.post_id", "block_contents": "The ID of the post."}, "doc.reddit_ads.post_url": {"name": "post_url", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.post_url", "block_contents": "The URL belonging to the post."}, "doc.reddit_ads.region": {"name": "region", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.region", "block_contents": "The region (US state or UK country) targeted for the reports"}, "doc.reddit_ads.rejection_reason": {"name": "rejection_reason", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.rejection_reason", "block_contents": "Reason why entity was rejected."}, "doc.reddit_ads.source_relation": {"name": "source_relation", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.source_relation", "block_contents": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "doc.reddit_ads.spend": {"name": "spend", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.spend", "block_contents": "The amount (in microcurrency) spent for this report period in Ad Account's currency, as defined [here](https://ads-api.reddit.com/docs/#tag/Reporting/paths/~1api~1v2.0~1accounts~1{account_id}~1reports/get)"}, "doc.reddit_ads.start_time": {"name": "start_time", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.start_time", "block_contents": "When the entity will begin to deliver."}, "doc.reddit_ads.stg_reddit_ads__account_conversions_report": {"name": "stg_reddit_ads__account_conversions_report", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.stg_reddit_ads__account_conversions_report", "block_contents": "Provides a summary of conversion events at the account level, aggregating key metrics by event and day such as view-through and click-through conversions."}, "doc.reddit_ads.stg_reddit_ads__ad_conversions_report": {"name": "stg_reddit_ads__ad_conversions_report", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.stg_reddit_ads__ad_conversions_report", "block_contents": "Provides a summary of conversion events at the individual ad level, aggregating key metrics by event and day such as view-through and click-through conversions."}, "doc.reddit_ads.stg_reddit_ads__ad_group_conversions_report": {"name": "stg_reddit_ads__ad_group_conversions_report", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.stg_reddit_ads__ad_group_conversions_report", "block_contents": "Provides a summary of conversion events at the ad group level, aggregating key metrics by event and day such as view-through and click-through conversions."}, "doc.reddit_ads.stg_reddit_ads__campaign_conversions_report": {"name": "stg_reddit_ads__campaign_conversions_report", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.stg_reddit_ads__campaign_conversions_report", "block_contents": "Provides a summary of conversion events at the campaign level, aggregating key metrics by event and day such as view-through and click-through conversions."}, "doc.reddit_ads.time_zone_id": {"name": "time_zone_id", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.time_zone_id", "block_contents": "The time zone id preference for this account"}, "doc.reddit_ads.total_items": {"name": "total_items", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.total_items", "block_contents": "The total number of items involved in a conversion event. This is typically used in e-commerce reports to track the quantity of products sold during a conversion."}, "doc.reddit_ads.total_value": {"name": "total_value", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.total_value", "block_contents": "The total monetary value associated with a conversion event."}, "doc.reddit_ads.video_started": {"name": "video_started", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.video_started", "block_contents": "The number of times the ad was served and the video began playing"}, "doc.reddit_ads.video_watched_25_percent": {"name": "video_watched_25_percent", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.video_watched_25_percent", "block_contents": "The number of times the ad was served and at least 25% of the video has played"}, "doc.reddit_ads.video_watched_3_seconds": {"name": "video_watched_3_seconds", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.video_watched_3_seconds", "block_contents": "The number of times the ad was served and at least 3 seconds of the video has played"}, "doc.reddit_ads.video_watched_50_percent": {"name": "video_watched_50_percent", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.video_watched_50_percent", "block_contents": "The number of times the ad was served and at least 50% of the video has played"}, "doc.reddit_ads.video_watched_5_seconds": {"name": "video_watched_5_seconds", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.video_watched_5_seconds", "block_contents": "The number of times the ad was served and at least 5 seconds of the video has played"}, "doc.reddit_ads.video_watched_75_percent": {"name": "video_watched_75_percent", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.video_watched_75_percent", "block_contents": "The number of times the ad was served and at least 75% of the video has played"}, "doc.reddit_ads.view_attribution_window": {"name": "view_attribution_window", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.view_attribution_window", "block_contents": "Determines how long after viewing on your ad you count that user\u2019s actions as a conversion. \"DAY\", \"WEEK\", or \"MONTH\""}, "doc.reddit_ads.view_through_conversion_attribution_window_day": {"name": "view_through_conversion_attribution_window_day", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.view_through_conversion_attribution_window_day", "block_contents": "The total click-through conversions attributed, for the given day-long window. Not included by the package by default."}, "doc.reddit_ads.view_through_conversion": {"name": "view_through_conversion", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.view_through_conversion", "block_contents": "The total view-through conversions attributed, for the given month-long window."}, "doc.reddit_ads.view_through_conversion_attribution_window_week": {"name": "view_through_conversion_attribution_window_week", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.view_through_conversion_attribution_window_week", "block_contents": "The total click-through conversions attributed, for the given week-long window. Not included by the package by default."}, "doc.reddit_ads.viewer_comments": {"name": "viewer_comments", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.viewer_comments", "block_contents": "The number of times a user saw the post, and also commented on it. We count per view + comment combination (similar to a conversion)"}, "doc.reddit_ads.views": {"name": "views", "resource_type": "doc", "package_name": "reddit_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.reddit_ads.views", "block_contents": "The number of views detected for this report period"}, "doc.snapchat_ads._fivetran_synced": {"name": "_fivetran_synced", "resource_type": "doc", "package_name": "snapchat_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.snapchat_ads._fivetran_synced", "block_contents": "When the record was last synced by Fivetran."}, "doc.snapchat_ads.is_most_recent_record": {"name": "is_most_recent_record", "resource_type": "doc", "package_name": "snapchat_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.snapchat_ads.is_most_recent_record", "block_contents": "Boolean representing whether a record is the most recent version of that record."}, "doc.snapchat_ads.source_relation": {"name": "source_relation", "resource_type": "doc", "package_name": "snapchat_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.snapchat_ads.source_relation", "block_contents": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "doc.pinterest._fivetran_synced": {"name": "_fivetran_synced", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest._fivetran_synced", "block_contents": "Timestamp of when a record was last synced."}, "doc.pinterest.is_most_recent_record": {"name": "is_most_recent_record", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.is_most_recent_record", "block_contents": "Boolean representing whether the record is the most recent version of the object."}, "doc.pinterest.date_day": {"name": "date_day", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.date_day", "block_contents": "The performance date of the record."}, "doc.pinterest.ad_group_id": {"name": "ad_group_id", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.ad_group_id", "block_contents": "The ID of the related Ad group."}, "doc.pinterest.country_id": {"name": "country_id", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.country_id", "block_contents": "The ID of the targeted country."}, "doc.pinterest.region_id": {"name": "region_id", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.region_id", "block_contents": "The ID of the targeted region."}, "doc.pinterest.pin_promotion_id": {"name": "pin_promotion_id", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.pin_promotion_id", "block_contents": "The ID of the related Pin promotion."}, "doc.pinterest.campaign_id": {"name": "campaign_id", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.campaign_id", "block_contents": "The ID of the related Campaign."}, "doc.pinterest.ad_account_id": {"name": "ad_account_id", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.ad_account_id", "block_contents": "The ID of the related Advertiser."}, "doc.pinterest.advertiser_id": {"name": "advertiser_id", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.advertiser_id", "block_contents": "The ID of the related Advertiser."}, "doc.pinterest.impressions": {"name": "impressions", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.impressions", "block_contents": "The number of paid and earned impressions that occurred on the day of the record."}, "doc.pinterest.clicks": {"name": "clicks", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.clicks", "block_contents": "The number of paid and earned clicks that occurred on the day of the record."}, "doc.pinterest.spend": {"name": "spend", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.spend", "block_contents": "The amount of spend that occurred on the day of the record."}, "doc.pinterest.updated_at": {"name": "updated_at", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.updated_at", "block_contents": "Timestamp of when a record was last updated."}, "doc.pinterest.created_at": {"name": "created_at", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.created_at", "block_contents": "Timestamp of when a record was created."}, "doc.pinterest.spend_in_micro_dollar": {"name": "spend_in_micro_dollar", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.spend_in_micro_dollar", "block_contents": "The amount of spend in micro dollars that occurred on the day of the record."}, "doc.pinterest.clickthrough_1": {"name": "clickthrough_1", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.clickthrough_1", "block_contents": "The number of paid pin clicks that occurred on the day of the record."}, "doc.pinterest.clickthrough_2": {"name": "clickthrough_2", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.clickthrough_2", "block_contents": "The number of earned outbound clicks that occurred on the day of the record."}, "doc.pinterest.impression_1": {"name": "impression_1", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.impression_1", "block_contents": "The number of paid pin impressions that occurred on the day of the record."}, "doc.pinterest.impression_2": {"name": "impression_2", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.impression_2", "block_contents": "The number of earned pin impressions that occurred on the day of the record."}, "doc.pinterest.source_relation": {"name": "source_relation", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.source_relation", "block_contents": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "doc.pinterest.total_conversions": {"name": "total_conversions", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.total_conversions", "block_contents": "This is the sum of all website conversions, otherwise known as the number of conversion events. For example, if you track sign-ups and checkouts on your website, it's the sum of all sign-ups and checkouts attributed from clicks, engagements, and views on Pinterest. Example: If a user clicks on a Pinterest ad and completes two different conversion actions (e.g., signs up and checks out), this would be counted as 2 total conversions."}, "doc.pinterest.total_conversions_quantity": {"name": "total_conversions_quantity", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.total_conversions_quantity", "block_contents": "Refers to the total count of items or units involved in the conversions. This metric is often more granular and relates to the specific quantity of products or services purchased or actions taken. Example: If a single checkout includes three items, the total_conversions_quantity would be 3, even though it counts as one total_conversion."}, "doc.pinterest.total_conversions_value_in_micro_dollar": {"name": "total_conversions_value_in_micro_dollar", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.total_conversions_value_in_micro_dollar", "block_contents": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. The value is expressed in microdollars, where one microdollar is one-millionth of a US dollar. Example: If the total order value from conversions is $50,000, this would be represented as 50,000,000,000 microdollars."}, "doc.pinterest.total_conversions_value": {"name": "total_conversions_value", "resource_type": "doc", "package_name": "pinterest", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.pinterest.total_conversions_value", "block_contents": "Total conversions order value. The total value of the conversions, calculated by summing up the revenue or order values attributed to conversions. Converted from the source `total_conversions_value_in_micro_dollar` field."}, "doc.google_ads._fivetran_id": {"name": "_fivetran_id", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads._fivetran_id", "block_contents": "Unique ID used by Fivetran to sync and dedupe data."}, "doc.google_ads._fivetran_synced": {"name": "_fivetran_synced", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads._fivetran_synced", "block_contents": "Timestamp of when a record was last synced."}, "doc.google_ads.account_descriptive_name": {"name": "account_descriptive_name", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.account_descriptive_name", "block_contents": "The descriptive name of the Customer account."}, "doc.google_ads.ad_group_id": {"name": "ad_group_id", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.ad_group_id", "block_contents": "The ID of the AdGroup."}, "doc.google_ads.ad_group_name": {"name": "ad_group_name", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.ad_group_name", "block_contents": "The name of the AdGroup."}, "doc.google_ads.ad_group_status": {"name": "ad_group_status", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.ad_group_status", "block_contents": "Status of the ad group."}, "doc.google_ads.campaign_id": {"name": "campaign_id", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.campaign_id", "block_contents": "The ID of the Campaign."}, "doc.google_ads.ad_id": {"name": "ad_id", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.ad_id", "block_contents": "The ID of the Ad."}, "doc.google_ads.account_id": {"name": "account_id", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.account_id", "block_contents": "The ID of the Account."}, "doc.google_ads.ad_status": {"name": "ad_status", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.ad_status", "block_contents": "Status of the Ad."}, "doc.google_ads.campaign_name": {"name": "campaign_name", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.campaign_name", "block_contents": "The name of the Campaign."}, "doc.google_ads.campaign_status": {"name": "campaign_status", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.campaign_status", "block_contents": "Status of the Campaign."}, "doc.google_ads.clicks": {"name": "clicks", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.clicks", "block_contents": "The number of clicks."}, "doc.google_ads.conversions": {"name": "conversions", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.conversions", "block_contents": "The number of conversions you've received, across your conversion actions. Conversions are measured with conversion tracking and may include [modeled](https://support.google.com/google-ads/answer/10081327?sjid=12862894247631803415-NC) conversions in cases where you are not able to observe all conversions that took place. You can use this column to see how often your ads led customers to actions that you\u2019ve defined as valuable for your business."}, "doc.google_ads.conversions_value": {"name": "conversions_value", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.conversions_value", "block_contents": "The sum of monetary values for your `conversions`. You have to enter a value in the Google Ads UI for your conversion actions to make this metric useful."}, "doc.google_ads.view_through_conversions": {"name": "view_through_conversions", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.view_through_conversions", "block_contents": "For video campaigns, view-through conversions tell you when an _impression_ of your video ad leads to a conversion on your site. The last impression of a video ad will get credit for the view-through conversion.\n\nKeep in mind: An impression is different than a \u201cview\u201d of a video ad. A \u201cview\u201d is counted when someone watches 30 seconds (or the whole ad if it\u2019s shorter than 30 seconds) or clicks on a part of the ad. A \u201cview\u201d that leads to a conversion is counted in the `conversions` column."}, "doc.google_ads.cost": {"name": "cost", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.cost", "block_contents": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period, converted from cost_micros."}, "doc.google_ads.date": {"name": "date", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.date", "block_contents": "The date being reported on."}, "doc.google_ads.effective_final_url": {"name": "effective_final_url", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.effective_final_url", "block_contents": "Effective final URL of the impressions."}, "doc.google_ads.external_customer_id": {"name": "external_customer_id", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.external_customer_id", "block_contents": "The Customer ID."}, "doc.google_ads.impressions": {"name": "impressions", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.impressions", "block_contents": "Count of how often your ad has appeared on a search results page or website on the Google Network."}, "doc.google_ads.criteria_id": {"name": "criteria_id", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.criteria_id", "block_contents": "The Criterion ID."}, "doc.google_ads.gcl_id": {"name": "gcl_id", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.gcl_id", "block_contents": "The Google Click ID."}, "doc.google_ads.criteria": {"name": "criteria", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.criteria", "block_contents": "Descriptive string for the Criterion."}, "doc.google_ads.criteria_destination_url": {"name": "criteria_destination_url", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.criteria_destination_url", "block_contents": "Destination URL of the criterion that triggered ads."}, "doc.google_ads.criteria_type": {"name": "criteria_type", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.criteria_type", "block_contents": "The type of the Criterion."}, "doc.google_ads.base_url": {"name": "base_url", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.base_url", "block_contents": "The base URL of the ad, extracted from the `final_urls`."}, "doc.google_ads.url_host": {"name": "url_host", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.url_host", "block_contents": "The URL host of the ad, extracted from the `final_urls`."}, "doc.google_ads.url_path": {"name": "url_path", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.url_path", "block_contents": "The URL path of the ad, extracted from the `final_urls`."}, "doc.google_ads.utm_source": {"name": "utm_source", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.utm_source", "block_contents": "The utm_source parameter of the ad, extracted from the `final_urls`."}, "doc.google_ads.utm_medium": {"name": "utm_medium", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.utm_medium", "block_contents": "The utm_medium parameter of the ad, extracted from the `final_urls`."}, "doc.google_ads.utm_campaign": {"name": "utm_campaign", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.utm_campaign", "block_contents": "The utm_campaign parameter of the ad, extracted from the `final_urls`."}, "doc.google_ads.utm_content": {"name": "utm_content", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.utm_content", "block_contents": "The utm_content parameter of the ad, extracted from the `final_urls`."}, "doc.google_ads.utm_term": {"name": "utm_term", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.utm_term", "block_contents": "The utm_term parameter of the ad, extracted from the `final_urls`."}, "doc.google_ads.updated_at": {"name": "updated_at", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.updated_at", "block_contents": "Timestamp of when the record was last updated in Google Ads."}, "doc.google_ads.ad_type": {"name": "ad_type", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.ad_type", "block_contents": "The type of the ad in Google Ads."}, "doc.google_ads.ad_group_type": {"name": "ad_group_type", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.ad_group_type", "block_contents": "The type of the ad group in Google Ads."}, "doc.google_ads.is_most_recent_record": {"name": "is_most_recent_record", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.is_most_recent_record", "block_contents": "Boolean representing whether the record is the most recent version of the object."}, "doc.google_ads.ad_network_type": {"name": "ad_network_type", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.ad_network_type", "block_contents": "The Google Ad network type used across the account."}, "doc.google_ads.device": {"name": "device", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.device", "block_contents": "Account ad performance per unique device where the ads were served."}, "doc.google_ads.source_relation": {"name": "source_relation", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.source_relation", "block_contents": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "doc.google_ads.resource_name": {"name": "resource_name", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.resource_name", "block_contents": "The resource name of the search term view. Search term view resource names have the form: `customers/{customer_id}/searchTermViews/{campaign_id}~{ad_group_id}~{URL-base64_search_term}`"}, "doc.google_ads.keyword_ad_group_criterion": {"name": "keyword_ad_group_criterion", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.keyword_ad_group_criterion", "block_contents": "The resource name of the keyword's ad group criterion. Ad group criterion resource names have the form: `customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}`"}, "doc.google_ads.search_term": {"name": "search_term", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.search_term", "block_contents": "A word or set of words a person enters when searching on Google or one of Google's Search Network sites"}, "doc.google_ads.search_term_match_type": {"name": "search_term_match_type", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.search_term_match_type", "block_contents": "How closely the search terms that triggered your ads on Google are related to the actual keywords in your account. Can be `BROAD` ,`EXACT`, `PHRASE`, `UNKNOWN`, or `UNSPECIFIED`.\n\nSee more details [here](https://support.google.com/google-ads/answer/7478529?sjid=15681083914881504235-NC&visit_id=638760377693438101-1187740487&rd=1)."}, "doc.google_ads.absolute_top_impression_percentage": {"name": "absolute_top_impression_percentage", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.absolute_top_impression_percentage", "block_contents": "Search absolute top impression share is the percentage of your Search ad impressions that are shown in the most prominent Search position. See more details [here](https://support.google.com/google-ads/answer/7501826?sjid=15681083914881504235-NC)."}, "doc.google_ads.top_impression_percentage": {"name": "top_impression_percentage", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.top_impression_percentage", "block_contents": "The percent of your ad impressions that are shown adjacent to the top organic search results. See more details [here](https://support.google.com/google-ads/answer/7501826?sjid=15681083914881504235-NC)."}, "doc.google_ads.search_term_status": {"name": "search_term_status", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.search_term_status", "block_contents": "Indicates whether the search term is currently one of your targeted or excluded keywords. Possible values: `ADDED`, `ADDED_EXCLUDED`, `EXCLUDED`, `NONE`, `UNKNOWN`, or `UNSPECIFIED`"}, "doc.google_ads.info_text": {"name": "info_text", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.info_text", "block_contents": "The text of the keyword (at most 80 characters and 10 words)."}, "doc.google_ads.conversions_from_interactions_value_per_interaction": {"name": "conversions_from_interactions_value_per_interaction", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.conversions_from_interactions_value_per_interaction", "block_contents": "The value of conversions from interactions divided by the number of ad interactions."}, "doc.google_ads.average_cpc": {"name": "average_cpc", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.average_cpc", "block_contents": "Average cost-per-click. The average amount that you've been charged for a click on your ad. Average cost-per-click (avg. CPC) is calculated by dividing the total cost of your clicks by the total number of clicks. See more details [here](https://support.google.com/google-ads/answer/14074?hl=en&ref_topic=24937&sjid=15681083914881504235-NC)."}, "doc.google_ads.ctr": {"name": "ctr", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.ctr", "block_contents": "The click-through rate. A ratio showing how often people who see your ad or free product listing end up clicking it. See more details [here](https://support.google.com/google-ads/answer/2615875?hl=en&ref_topic=24937&sjid=15681083914881504235-NC)."}, "doc.google_ads.conversions_from_interactions_rate": {"name": "conversions_from_interactions_rate", "resource_type": "doc", "package_name": "google_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.google_ads.conversions_from_interactions_rate", "block_contents": "Conversions from interactions divided by the number of ad interactions (such as clicks for text ads or views for video ads).\n\nSee more details [here](https://support.google.com/google-ads/answer/2684489?hl=en&ref_topic=24937&sjid=15681083914881504235-NC)."}, "doc.amazon_ads._fivetran_deleted": {"name": "_fivetran_deleted", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads._fivetran_deleted", "block_contents": "Boolean created by Fivetran to indicate whether the record has been deleted."}, "doc.amazon_ads._fivetran_id": {"name": "_fivetran_id", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads._fivetran_id", "block_contents": "Unique ID used by Fivetran to sync and dedupe data."}, "doc.amazon_ads._fivetran_synced": {"name": "_fivetran_synced", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads._fivetran_synced", "block_contents": "Timestamp of when a record was last synced."}, "doc.amazon_ads.account_id": {"name": "account_id", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.account_id", "block_contents": "Identifier for sellers and vendors. Note that this value is not unique and may be the same across marketplaces."}, "doc.amazon_ads.account_name": {"name": "account_name", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.account_name", "block_contents": "Account Name. Not currently populated for sellers."}, "doc.amazon_ads.ad_group_id": {"name": "ad_group_id", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.ad_group_id", "block_contents": "The ID of the AdGroup."}, "doc.amazon_ads.ad_group_name": {"name": "ad_group_name", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.ad_group_name", "block_contents": "The name of the AdGroup."}, "doc.amazon_ads.ad_id": {"name": "ad_id", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.ad_id", "block_contents": "The ID of the Ad."}, "doc.amazon_ads.ad_keyword_status": {"name": "ad_keyword_status", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.ad_keyword_status", "block_contents": "Current status of a keyword."}, "doc.amazon_ads.advertised_asin": {"name": "advertised_asin", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.advertised_asin", "block_contents": "The ASIN associated to an advertised product."}, "doc.amazon_ads.advertised_sku": {"name": "advertised_sku", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.advertised_sku", "block_contents": "The SKU being advertised."}, "doc.amazon_ads.bid_keyword": {"name": "bid_keyword", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.bid_keyword", "block_contents": "Bid associated with this keyword."}, "doc.amazon_ads.campaign_applicable_budget_rule_id": {"name": "campaign_applicable_budget_rule_id", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.campaign_applicable_budget_rule_id", "block_contents": "The ID associated to the active budget rule for a campaign."}, "doc.amazon_ads.campaign_applicable_budget_rule_name": {"name": "campaign_applicable_budget_rule_name", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.campaign_applicable_budget_rule_name", "block_contents": "The name associated to the active budget rule for a campaign."}, "doc.amazon_ads.campaign_bidding_strategy": {"name": "campaign_bidding_strategy", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.campaign_bidding_strategy", "block_contents": "The bidding strategy associated with a campaign."}, "doc.amazon_ads.campaign_budget_amount": {"name": "campaign_budget_amount", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.campaign_budget_amount", "block_contents": "Total budget allocated to the campaign."}, "doc.amazon_ads.campaign_budget_currency_code": {"name": "campaign_budget_currency_code", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.campaign_budget_currency_code", "block_contents": "The currency code associated with the campaign."}, "doc.amazon_ads.campaign_budget_type": {"name": "campaign_budget_type", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.campaign_budget_type", "block_contents": "One of: daily or lifetime."}, "doc.amazon_ads.campaign_id": {"name": "campaign_id", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.campaign_id", "block_contents": "The ID of the Campaign."}, "doc.amazon_ads.campaign_name": {"name": "campaign_name", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.campaign_name", "block_contents": "The name of the Campaign."}, "doc.amazon_ads.campaign_rule_based_budget_amount": {"name": "campaign_rule_based_budget_amount", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.campaign_rule_based_budget_amount", "block_contents": "The value of the rule-based budget for a campaign."}, "doc.amazon_ads.clicks": {"name": "clicks", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.clicks", "block_contents": "Total number of ad clicks."}, "doc.amazon_ads.cost": {"name": "cost", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.cost", "block_contents": "Total cost of ad clicks."}, "doc.amazon_ads.country_code": {"name": "country_code", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.country_code", "block_contents": "The code for a given country."}, "doc.amazon_ads.creation_date": {"name": "creation_date", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.creation_date", "block_contents": "The date of creation of the record."}, "doc.amazon_ads.currency_code": {"name": "currency_code", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.currency_code", "block_contents": "The currency used for all monetary values for entities under this profile."}, "doc.amazon_ads.default_bid": {"name": "default_bid", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.default_bid", "block_contents": "The date of creation of the record."}, "doc.amazon_ads.impressions": {"name": "impressions", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.impressions", "block_contents": "Total number of ad impressions."}, "doc.amazon_ads.is_most_recent_record": {"name": "is_most_recent_record", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.is_most_recent_record", "block_contents": "Boolean indicating whether record was the most recent instance."}, "doc.amazon_ads.keyword_bid": {"name": "keyword_bid", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.keyword_bid", "block_contents": "Bid associated with a keyword or targeting expression."}, "doc.amazon_ads.keyword_id": {"name": "keyword_id", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.keyword_id", "block_contents": "The ID of the keyword."}, "doc.amazon_ads.keyword_match_type": {"name": "keyword_match_type", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.keyword_match_type", "block_contents": "One of (broad, exact, or phrase.)"}, "doc.amazon_ads.keyword_text": {"name": "keyword_text", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.keyword_text", "block_contents": "The exact text for the keyword."}, "doc.amazon_ads.keyword_type": {"name": "keyword_type", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.keyword_type", "block_contents": "Type of matching for the keyword used in bid. One of: BROAD, PHRASE, or EXACT."}, "doc.amazon_ads.last_updated_date": {"name": "last_updated_date", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.last_updated_date", "block_contents": "Date of last update to record."}, "doc.amazon_ads.match_type": {"name": "match_type", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.match_type", "block_contents": "Type of matching for the keyword used in bid. One of: BROAD, PHRASE, or EXACT."}, "doc.amazon_ads.negative_keyword_id": {"name": "negative_keyword_id", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.negative_keyword_id", "block_contents": "The ID of the negative keyword."}, "doc.amazon_ads.portfolio_id": {"name": "portfolio_id", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.portfolio_id", "block_contents": "The ID of the Portfolio."}, "doc.amazon_ads.portfolio_name": {"name": "portfolio_name", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.portfolio_name", "block_contents": "The name of the Portfolio."}, "doc.amazon_ads.profile_id": {"name": "profile_id", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.profile_id", "block_contents": "The profile ID associated with your Amazon Ads account. Advertisers who operate in more than one marketplace (for example, Amazon.com, Amazon.co.uk, Amazon.co.jp) will have one profile associated with each marketplace."}, "doc.amazon_ads.report_date": {"name": "report_date", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.report_date", "block_contents": "The date of the report."}, "doc.amazon_ads.search_term": {"name": "search_term", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.search_term", "block_contents": "The search term used by the customer."}, "doc.amazon_ads.serving_status": {"name": "serving_status", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.serving_status", "block_contents": "The current serving status of the record."}, "doc.amazon_ads.state": {"name": "state", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.state", "block_contents": "The state of the record (enabled, paused, or archived)."}, "doc.amazon_ads.targeting": {"name": "targeting", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.targeting", "block_contents": "A string representation of the expression object used in the targeting clause."}, "doc.amazon_ads.source_relation": {"name": "source_relation", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.source_relation", "block_contents": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "doc.amazon_ads.purchases_30_d": {"name": "purchases_30_d", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.purchases_30_d", "block_contents": "Number of attributed conversion events occurring within 30 days of an ad click."}, "doc.amazon_ads.sales_30_d": {"name": "sales_30_d", "resource_type": "doc", "package_name": "amazon_ads", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.amazon_ads.sales_30_d", "block_contents": "Total value of sales occurring within 30 days of an ad click."}, "doc.twitter_ads._fivetran_synced": {"name": "_fivetran_synced", "resource_type": "doc", "package_name": "twitter_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.twitter_ads._fivetran_synced", "block_contents": "When the record was last synced by Fivetran."}, "doc.twitter_ads.created_at": {"name": "created_at", "resource_type": "doc", "package_name": "twitter_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.twitter_ads.created_at", "block_contents": "The timestamp the account was created."}, "doc.twitter_ads.updated_at": {"name": "updated_at", "resource_type": "doc", "package_name": "twitter_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.twitter_ads.updated_at", "block_contents": "The timestamp the account was last updated."}, "doc.twitter_ads.deleted": {"name": "deleted", "resource_type": "doc", "package_name": "twitter_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.twitter_ads.deleted", "block_contents": "Whether the record has been deleted or not."}, "doc.twitter_ads.source_relation": {"name": "source_relation", "resource_type": "doc", "package_name": "twitter_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.twitter_ads.source_relation", "block_contents": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "doc.twitter_ads.country": {"name": "country", "resource_type": "doc", "package_name": "twitter_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.twitter_ads.country", "block_contents": "Long-form name of the country being reported on."}, "doc.twitter_ads.region": {"name": "region", "resource_type": "doc", "package_name": "twitter_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.twitter_ads.region", "block_contents": "Long-form name of the geopgraphic region being reported on."}, "doc.ad_reporting.account_id": {"name": "account_id", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.account_id", "block_contents": "The ID representing the account."}, "doc.ad_reporting.account_name": {"name": "account_name", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.account_name", "block_contents": "The name of the account, if present in the source data."}, "doc.ad_reporting.ad_group_id": {"name": "ad_group_id", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.ad_group_id", "block_contents": "The ID representing the ad group, if present in the source data."}, "doc.ad_reporting.ad_group_name": {"name": "ad_group_name", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.ad_group_name", "block_contents": "The name of the ad group, if present in the source data."}, "doc.ad_reporting.ad_id": {"name": "ad_id", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.ad_id", "block_contents": "The ID representing the ad, if present in the source data."}, "doc.ad_reporting.ad_name": {"name": "ad_name", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.ad_name", "block_contents": "The name of the ad, if present in the source data."}, "doc.ad_reporting.base_url": {"name": "base_url", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.base_url", "block_contents": "The base url of the ad."}, "doc.ad_reporting.campaign_id": {"name": "campaign_id", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.campaign_id", "block_contents": "The ID representing the campaign, if present in the source data."}, "doc.ad_reporting.campaign_name": {"name": "campaign_name", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.campaign_name", "block_contents": "The name of the campaign, if present in the source data."}, "doc.ad_reporting.clicks": {"name": "clicks", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.clicks", "block_contents": "The count of clicks."}, "doc.ad_reporting.conversions": {"name": "conversions", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.conversions", "block_contents": "The count of attributed conversion events."}, "doc.ad_reporting.conversions_value": {"name": "conversions_value", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.conversions_value", "block_contents": "The monetary value of attributed conversion events."}, "doc.ad_reporting.date_day": {"name": "date_day", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.date_day", "block_contents": "The date of the report."}, "doc.ad_reporting.impressions": {"name": "impressions", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.impressions", "block_contents": "The count of impressions."}, "doc.ad_reporting.keyword_id": {"name": "keyword_id", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.keyword_id", "block_contents": "The ID representing the keyword, if present in the source data."}, "doc.ad_reporting.keyword_match_type": {"name": "keyword_match_type", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.keyword_match_type", "block_contents": "The keyword match type associated with this record."}, "doc.ad_reporting.keyword_text": {"name": "keyword_text", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.keyword_text", "block_contents": "The keyword text."}, "doc.ad_reporting.platform": {"name": "platform", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.platform", "block_contents": "The ad platform associated with this record."}, "doc.ad_reporting.search_match_type": {"name": "search_match_type", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.search_match_type", "block_contents": "The search match type associated with this record."}, "doc.ad_reporting.search_query": {"name": "search_query", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.search_query", "block_contents": "The search query text."}, "doc.ad_reporting.spend": {"name": "spend", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.spend", "block_contents": "The cost of the ads."}, "doc.ad_reporting.url_host": {"name": "url_host", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.url_host", "block_contents": "The URL host of the ad."}, "doc.ad_reporting.url_path": {"name": "url_path", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.url_path", "block_contents": "The URL path of the ad."}, "doc.ad_reporting.utm_campaign": {"name": "utm_campaign", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.utm_campaign", "block_contents": "The utm_campaign parameter of the ad."}, "doc.ad_reporting.utm_content": {"name": "utm_content", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.utm_content", "block_contents": "The utm_content parameter of the ad."}, "doc.ad_reporting.utm_medium": {"name": "utm_medium", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.utm_medium", "block_contents": "The utm_medium parameter of the ad."}, "doc.ad_reporting.utm_source": {"name": "utm_source", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.utm_source", "block_contents": "The utm_source parameter of the ad."}, "doc.ad_reporting.utm_term": {"name": "utm_term", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.utm_term", "block_contents": "The utm_term parameter of the ad."}, "doc.ad_reporting.source_relation": {"name": "source_relation", "resource_type": "doc", "package_name": "ad_reporting", "path": "docs.md", "original_file_path": "models/docs.md", "unique_id": "doc.ad_reporting.source_relation", "block_contents": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "doc.tiktok_ads.source_relation": {"name": "source_relation", "resource_type": "doc", "package_name": "tiktok_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.tiktok_ads.source_relation", "block_contents": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "doc.microsoft_ads.account_id": {"name": "account_id", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.account_id", "block_contents": "The ID of the account."}, "doc.microsoft_ads.account_name": {"name": "account_name", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.account_name", "block_contents": "The name of the account."}, "doc.microsoft_ads.account_timezone": {"name": "account_timezone", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.account_timezone", "block_contents": "The time zone associated with this account."}, "doc.microsoft_ads.ad_distribution": {"name": "ad_distribution", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.ad_distribution", "block_contents": "The distribution medium associated with this record."}, "doc.microsoft_ads.ad_id": {"name": "ad_id", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.ad_id", "block_contents": "The ID of the corresponding ad."}, "doc.microsoft_ads.ad_group_status": {"name": "ad_group_status", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.ad_group_status", "block_contents": "The status of this ad group; see the following [documentation](https://help.ads.microsoft.com/apex/index/3/en/53094) for more information on values and definitions."}, "doc.microsoft_ads.ad_name": {"name": "ad_name", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.ad_name", "block_contents": "The name of the corresponding ad; `title_part_1` is used as the default ad name but you may customize this by using the `microsoft_ads__ad_name_selector` variable. For more information, refer to the [README](https://github.com/fivetran/dbt_microsoft_ads/blob/main/README.md#change-how-ad-name-is-determined)."}, "doc.microsoft_ads.ad_group_id": {"name": "ad_group_id", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.ad_group_id", "block_contents": "The ID of the corresponding ad group."}, "doc.microsoft_ads.ad_group_name": {"name": "ad_group_name", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.ad_group_name", "block_contents": "The name of the corresponding ad group."}, "doc.microsoft_ads.ad_status": {"name": "ad_status", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.ad_status", "block_contents": "The status of this ad; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/adstatus?view=bingads-13) for more information on values and definitions."}, "doc.microsoft_ads.ad_type": {"name": "ad_type", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.ad_type", "block_contents": "The ad type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/adtype?view=bingads-13) for more information on values and definitions."}, "doc.microsoft_ads.bid_match_type": {"name": "bid_match_type", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.bid_match_type", "block_contents": "The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "doc.microsoft_ads.budget": {"name": "budget", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.budget", "block_contents": "The amount to spend daily across all campaigns that share the budget."}, "doc.microsoft_ads.budget_id": {"name": "budget_id", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.budget_id", "block_contents": "The unique Microsoft Advertising identifier of the budget."}, "doc.microsoft_ads.budget_type": {"name": "budget_type", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.budget_type", "block_contents": "The budget type determines the pace at which the budget is spent throughout the day."}, "doc.microsoft_ads.budget_association_status": {"name": "budget_association_status", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.budget_association_status", "block_contents": "Indicates whether or not the campaign is currently spending from the budget mentioned in the BudgetName column. The possible values are `Current` and `Ended`."}, "doc.microsoft_ads.budget_name": {"name": "budget_name", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.budget_name", "block_contents": "The name of the budget. This column will be empty for unshared budgets."}, "doc.microsoft_ads.budget_status": {"name": "budget_status", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.budget_status", "block_contents": "The budget status. The possible values are `Active` and `Deleted`. This column will be empty for unshared budgets."}, "doc.microsoft_ads.campaign_id": {"name": "campaign_id", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.campaign_id", "block_contents": "The ID of the campaign."}, "doc.microsoft_ads.campaign_name": {"name": "campaign_name", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.campaign_name", "block_contents": "The name of the campaign."}, "doc.microsoft_ads.campaign_status": {"name": "campaign_status", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.campaign_status", "block_contents": "The status of this campaign; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaignstatus?view=bingads-13) for more information on values and definitions."}, "doc.microsoft_ads.campaign_timezone": {"name": "campaign_timezone", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.campaign_timezone", "block_contents": "The time zone associated with this campaign."}, "doc.microsoft_ads.campaign_type": {"name": "campaign_type", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.campaign_type", "block_contents": "The campaign type associated with this record; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaigntype?view=bingads-13) for more information on values and definitions."}, "doc.microsoft_ads.clicks": {"name": "clicks", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.clicks", "block_contents": "The number of clicks that occurred by the grain of the report."}, "doc.microsoft_ads.conversions_qualified": {"name": "conversions_qualified", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.conversions_qualified", "block_contents": "Number of [conversions](https://learn.microsoft.com/en-us/advertising/reporting-service/conversionperformancereportcolumn?view=bingads-13#conversionsqualified), measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "doc.microsoft_ads.conversions": {"name": "conversions", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.conversions", "block_contents": "Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the convesion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true. This field coalesces the source `conversions_qualifed` and `conversions` fields, and will be 0 if both are null."}, "doc.microsoft_ads.conversions_src": {"name": "conversions_src", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.conversions_src", "block_contents": "(Deprecated in 2022 in favor of `conversions_qualified`) Number of conversions, measured by completion of an action by a customer after viewing your ad. This will **exclude** any conversions where the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "doc.microsoft_ads.revenue": {"name": "revenue", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.revenue", "block_contents": "The revenue optionally reported by the advertiser as a result of the `conversions` figure. This will **exclude** revenue from conversions in which the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads is set to true."}, "doc.microsoft_ads.all_conversions": {"name": "all_conversions", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.all_conversions", "block_contents": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads. This field coalesces the source `all_conversions_qualifed` and `all_conversions` fields, and will be 0 if both are null."}, "doc.microsoft_ads.all_conversions_qualified": {"name": "all_conversions_qualified", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.all_conversions_qualified", "block_contents": "Number of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** data from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}, "doc.microsoft_ads.all_conversions_src": {"name": "all_conversions_src", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.all_conversions_src", "block_contents": "(Deprecated in 2022 in favor of `conversions_qualified`)\nNumber of all conversions, measured by completion of an action by a customer after viewing your ad. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}, "doc.microsoft_ads.all_revenue": {"name": "all_revenue", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.all_revenue", "block_contents": "The revenue reported by the advertiser as a result of the `all_conversions` figure. This will **include** revenue from conversions regardless of the value of the conversion goal's [ExcludeFromBidding](https://learn.microsoft.com/en-us/advertising/campaign-management-service/conversiongoal?view=bingads-13#excludefrombidding) property in Microsoft Ads."}, "doc.microsoft_ads.currency_code": {"name": "currency_code", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.currency_code", "block_contents": "The currency code associated with spend and, if applicable, other metrics associated with currency."}, "doc.microsoft_ads.date_day": {"name": "date_day", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.date_day", "block_contents": "The date of the performance report."}, "doc.microsoft_ads.delivered_match_type": {"name": "delivered_match_type", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.delivered_match_type", "block_contents": "The delivered match type associated with this record; values include 'Broad', 'Exact', 'Phrase'."}, "doc.microsoft_ads.device_os": {"name": "device_os", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.device_os", "block_contents": "The device operating system associated with this record; values include but may not be limited to 'Windows', 'iOS', 'Android', 'Other', 'BlackBerry' and 'Unknown'."}, "doc.microsoft_ads.device_type": {"name": "device_type", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.device_type", "block_contents": "The device type associated with this record; values include but may not be limited to 'Computer', 'Smartphone', 'Tablet' and 'Unknown'."}, "doc.microsoft_ads.end_date": {"name": "end_date", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.end_date", "block_contents": "The date in which this ad group will no longer run."}, "doc.microsoft_ads.final_url": {"name": "final_url", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.final_url", "block_contents": "The full URL that the ad links to."}, "doc.microsoft_ads.impressions": {"name": "impressions", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.impressions", "block_contents": "The number of impressions that occurred by the grain of the report."}, "doc.microsoft_ads.is_most_recent_record": {"name": "is_most_recent_record", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.is_most_recent_record", "block_contents": "Boolean representing whether a record is the most recent version of that record."}, "doc.microsoft_ads.keyword_id": {"name": "keyword_id", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.keyword_id", "block_contents": "The ID of the keyword."}, "doc.microsoft_ads.keyword_name": {"name": "keyword_name", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.keyword_name", "block_contents": "The keyword(s) associated with this record."}, "doc.microsoft_ads.keyword_status": {"name": "keyword_status", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.keyword_status", "block_contents": "The status of this keyword; see the following [documentation](https://docs.microsoft.com/en-us/advertising/campaign-management-service/keywordstatus?view=bingads-13) for more information on values and definitions."}, "doc.microsoft_ads.language": {"name": "language", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.language", "block_contents": "The language that the associated ad was viewed in."}, "doc.microsoft_ads.match_type": {"name": "match_type", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.match_type", "block_contents": "The match type associated with this record; values contain but may not be limited to 'Broad', 'Exact', 'Phrase'. Please refer to Microsoft Ad's [documentation](https://help.ads.microsoft.com/#apex/ads/en/50822/1)."}, "doc.microsoft_ads.modified_at": {"name": "modified_at", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.modified_at", "block_contents": "The time each version of the object was last modified, i.e. when that version of the object was 'created'."}, "doc.microsoft_ads.network": {"name": "network", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.network", "block_contents": "The network associated with this record."}, "doc.microsoft_ads.search_query": {"name": "search_query", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.search_query", "block_contents": "The search query string associated with this record."}, "doc.microsoft_ads.spend": {"name": "spend", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.spend", "block_contents": "The amount of spend that occurred by the grain of the report."}, "doc.microsoft_ads.start_date": {"name": "start_date", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.start_date", "block_contents": "The date in which an ad group starts running."}, "doc.microsoft_ads.time_zone": {"name": "time_zone", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.time_zone", "block_contents": "The time zone associated with this record."}, "doc.microsoft_ads.top_vs_other": {"name": "top_vs_other", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.top_vs_other", "block_contents": "The position of the ad associated with this record. For more information, refer to Microsoft [documentation](https://help.ads.microsoft.com/apex/index/22/en/14009)."}, "doc.microsoft_ads.source_relation": {"name": "source_relation", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.source_relation", "block_contents": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "doc.microsoft_ads.title": {"name": "title", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.title", "block_contents": "The title of the ad."}, "doc.microsoft_ads.title_part_1": {"name": "title_part_1", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.title_part_1", "block_contents": "Part 1 of the title."}, "doc.microsoft_ads.title_part_2": {"name": "title_part_2", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.title_part_2", "block_contents": "Part 2 of the title."}, "doc.microsoft_ads.title_part_3": {"name": "title_part_3", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.title_part_3", "block_contents": "Part 3 of the title."}, "doc.microsoft_ads.domain": {"name": "domain", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.domain", "block_contents": "The associated domain that the ad links to."}, "doc.microsoft_ads.city": {"name": "city", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.city", "block_contents": "The city where the user was physically located when they clicked the ad."}, "doc.microsoft_ads.county": {"name": "county", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.county", "block_contents": "The county where the user was physically located when they clicked the ad."}, "doc.microsoft_ads.country": {"name": "country", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.country", "block_contents": "The country or region where the user was physically located when they clicked the ad."}, "doc.microsoft_ads.goal": {"name": "goal", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.goal", "block_contents": "The name of the goal you set for the conversions you want, meaning actions customers take after clicking your ad."}, "doc.microsoft_ads.location_id": {"name": "location_id", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.location_id", "block_contents": "The Microsoft Advertising identifier of the location where the user was physically located when they clicked the ad."}, "doc.microsoft_ads.location_type": {"name": "location_type", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.location_type", "block_contents": "The location type used to deliver ads. Values include \"Physical location\" and \"Location of interest\". \n\n\"Physical location\" indicates the user was in the corresponding City, Country, MetroArea, or State. \"Location of interest\" indicates the user was searching for or viewing pages about the location."}, "doc.microsoft_ads.metro_area": {"name": "metro_area", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.metro_area", "block_contents": "The metro area (Microsoft Market Area in the United States) where the user was physically located when they clicked the ad."}, "doc.microsoft_ads.most_specific_location": {"name": "most_specific_location", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.most_specific_location", "block_contents": "The most specific location used to deliver ads. If postal code is available, it is prioritized; otherwise, it may match city or country/region."}, "doc.microsoft_ads.postal_code": {"name": "postal_code", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.postal_code", "block_contents": "The postal code where the user was physically located when they clicked the ad."}, "doc.microsoft_ads.state": {"name": "state", "resource_type": "doc", "package_name": "microsoft_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.microsoft_ads.state", "block_contents": "The state or geographic region where the user was physically located when they clicked the ad."}, "doc.facebook_ads._fivetran_synced": {"name": "_fivetran_synced", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads._fivetran_synced", "block_contents": "When the record was last synced by Fivetran."}, "doc.facebook_ads.is_most_recent_record": {"name": "is_most_recent_record", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.is_most_recent_record", "block_contents": "Boolean representing whether a record is the most recent version of that record. All records should have this value set to True given we filter on it."}, "doc.facebook_ads.updated_time": {"name": "updated_time", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.updated_time", "block_contents": "The timestamp of the last update of a record."}, "doc.facebook_ads.source_relation": {"name": "source_relation", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.source_relation", "block_contents": "The source of the record if the unioning functionality is being used. If not this field will be empty."}, "doc.facebook_ads.demographics_country": {"name": "demographics_country", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.demographics_country", "block_contents": "Ads report segmented by country."}, "doc.facebook_ads.country_id": {"name": "country_id", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.country_id", "block_contents": "Fivetran-generated unique ID of the country."}, "doc.facebook_ads.region_id": {"name": "region_id", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.region_id", "block_contents": "Fivetran-generated unique ID of the geographic region."}, "doc.facebook_ads.account_id": {"name": "account_id", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.account_id", "block_contents": "The ID of the ad account that this ad belongs to."}, "doc.facebook_ads.cost_per_inline_link_click": {"name": "cost_per_inline_link_click", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.cost_per_inline_link_click", "block_contents": "The average cost of each inline link click. Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics)."}, "doc.facebook_ads.country": {"name": "country", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.country", "block_contents": "Country whose ad performance is being reported on."}, "doc.facebook_ads.cpc": {"name": "cpc", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.cpc", "block_contents": "The average cost for each click (all). Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics)."}, "doc.facebook_ads.cpm": {"name": "cpm", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.cpm", "block_contents": "The average cost for 1,000 impressions. Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics)."}, "doc.facebook_ads.ctr": {"name": "ctr", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.ctr", "block_contents": "The percentage of times people saw your ad and performed a click (all). Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics)."}, "doc.facebook_ads.date": {"name": "date", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.date", "block_contents": "The date of the reported performance."}, "doc.facebook_ads.frequency": {"name": "frequency", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.frequency", "block_contents": "The average number of times each person saw your ads; it is calculated as impressions divided by reach."}, "doc.facebook_ads.impressions": {"name": "impressions", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.impressions", "block_contents": "The number of impressions the ads had on the given day."}, "doc.facebook_ads.inline_link_click_ctr": {"name": "inline_link_click_ctr", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.inline_link_click_ctr", "block_contents": "The percentage of time people saw your ads and performed an inline link click. Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics)."}, "doc.facebook_ads.inline_link_clicks": {"name": "inline_link_clicks", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.inline_link_clicks", "block_contents": "The number of clicks on links to select destinations or experiences, on or off Facebook-owned properties. Inline link clicks use a fixed 1-day-click attribution window."}, "doc.facebook_ads.reach": {"name": "reach", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.reach", "block_contents": "The number of people who saw any content from your Page or about your Page. This metric is estimated."}, "doc.facebook_ads.spend": {"name": "spend", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.spend", "block_contents": "Ad spend in a given day for the breakdown."}, "doc.facebook_ads.demographics_country_actions": {"name": "demographics_country_actions", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.demographics_country_actions", "block_contents": "Each record represents daily conversion performance by country. This is the prebuilt `demographics_country` report broken down by `action_type`."}, "doc.facebook_ads._1_d_view": {"name": "_1_d_view", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads._1_d_view", "block_contents": "Conversion metric value using an attribution window of \"1 day after viewing the ad\". Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics)."}, "doc.facebook_ads._7_d_click": {"name": "_7_d_click", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads._7_d_click", "block_contents": "Conversion metric value using an attribution window of \"7 days after clicking the ad\". Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics)."}, "doc.facebook_ads.index": {"name": "index", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.index", "block_contents": "Index reflecting the `action_type` tracked for this ad on this day. A primary key created by Fivetran utilized for tracking data, specifically when there are multiple rows associated with a single row in the parent table."}, "doc.facebook_ads.action_type": {"name": "action_type", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.action_type", "block_contents": "The kind of actions taken on your ad, Page, app or event after your ad was served to someone, even if they didn't click on it. Action types include Page likes, app installs, conversions, event responses and more.\nActions prepended by `app_custom_event` come from mobile app events and actions prepended by `offsite_conversion` come from the Facebook Pixel."}, "doc.facebook_ads.conversions": {"name": "conversions", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.conversions", "block_contents": "Conversion metric value using the default attribution window."}, "doc.facebook_ads.inline": {"name": "inline", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.inline", "block_contents": "Conversion metric value using the attribution window that occurs on the ad itself. Not included in downstream models by default. To persist this field, refer to the [README](https://github.com/fivetran/dbt_facebook_ads_source?tab=readme-ov-file#passing-through-additional-metrics)."}, "doc.facebook_ads.region": {"name": "region", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.region", "block_contents": "Geographic region whose ad performance is being reported on."}, "doc.facebook_ads.demographics_region": {"name": "demographics_region", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.demographics_region", "block_contents": "Ads report segmented by geographic region."}, "doc.facebook_ads.demographics_region_actions": {"name": "demographics_region_actions", "resource_type": "doc", "package_name": "facebook_ads", "path": "staging/docs.md", "original_file_path": "models/staging/docs.md", "unique_id": "doc.facebook_ads.demographics_region_actions", "block_contents": "Each record represents daily conversion performance by geographic region. This is the prebuilt `demographics_region` report broken down by `action_type`."}}, "exposures": {}, "metrics": {"metric.ad_reporting.active_ads": {"name": "active_ads", "resource_type": "metric", "package_name": "ad_reporting", "path": "metrics/ad_reporting__ad_report_metrics.yml", "original_file_path": "models/metrics/ad_reporting__ad_report_metrics.yml", "unique_id": "metric.ad_reporting.active_ads", "fqn": ["ad_reporting", "metrics", "active_ads"], "description": "Count of ads witth spend > 0.", "label": "Active Ads (Fivetran)", "type": "simple", "type_params": {"measure": {"name": "active_ads", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}, "input_measures": [{"name": "active_ads", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}], "numerator": null, "denominator": null, "expr": null, "window": null, "grain_to_date": null, "metrics": [], "conversion_type_params": null, "cumulative_type_params": null, "metric_aggregation_params": null}, "filter": {"where_filters": [{"where_sql_template": "{{Dimension('ad__spend')}} > 0\n"}]}, "metadata": null, "time_granularity": null, "meta": {}, "tags": [], "config": {"enabled": true, "group": null, "meta": {}}, "unrendered_config": {}, "sources": [], "depends_on": {"macros": [], "nodes": ["semantic_model.ad_reporting.ad_report"]}, "refs": [], "metrics": [], "created_at": 1783708223.666837, "group": null}, "metric.ad_reporting.avg_spend_nonzero": {"name": "avg_spend_nonzero", "resource_type": "metric", "package_name": "ad_reporting", "path": "metrics/ad_reporting__ad_report_metrics.yml", "original_file_path": "models/metrics/ad_reporting__ad_report_metrics.yml", "unique_id": "metric.ad_reporting.avg_spend_nonzero", "fqn": ["ad_reporting", "metrics", "avg_spend_nonzero"], "description": "Average ad spend, ignores zero-spend days.", "label": "Avg Spend Non-Zero (Fivetran)", "type": "simple", "type_params": {"measure": {"name": "avg_spend_nonzero", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}, "input_measures": [{"name": "avg_spend_nonzero", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}], "numerator": null, "denominator": null, "expr": null, "window": null, "grain_to_date": null, "metrics": [], "conversion_type_params": null, "cumulative_type_params": null, "metric_aggregation_params": null}, "filter": {"where_filters": [{"where_sql_template": "{{Dimension('ad__spend')}} > 0\n"}]}, "metadata": null, "time_granularity": null, "meta": {}, "tags": [], "config": {"enabled": true, "group": null, "meta": {}}, "unrendered_config": {}, "sources": [], "depends_on": {"macros": [], "nodes": ["semantic_model.ad_reporting.ad_report"]}, "refs": [], "metrics": [], "created_at": 1783708223.6680498, "group": null}, "metric.ad_reporting.avg_spend": {"name": "avg_spend", "resource_type": "metric", "package_name": "ad_reporting", "path": "metrics/ad_reporting__ad_report_metrics.yml", "original_file_path": "models/metrics/ad_reporting__ad_report_metrics.yml", "unique_id": "metric.ad_reporting.avg_spend", "fqn": ["ad_reporting", "metrics", "avg_spend"], "description": "Average ad spend, does not ignore zero-spend days.", "label": "Avg Spend (Fivetran)", "type": "simple", "type_params": {"measure": {"name": "avg_spend", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}, "input_measures": [{"name": "avg_spend", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}], "numerator": null, "denominator": null, "expr": null, "window": null, "grain_to_date": null, "metrics": [], "conversion_type_params": null, "cumulative_type_params": null, "metric_aggregation_params": null}, "filter": null, "metadata": null, "time_granularity": null, "meta": {}, "tags": [], "config": {"enabled": true, "group": null, "meta": {}}, "unrendered_config": {}, "sources": [], "depends_on": {"macros": [], "nodes": ["semantic_model.ad_reporting.ad_report"]}, "refs": [], "metrics": [], "created_at": 1783708223.6691628, "group": null}, "metric.ad_reporting.clicks": {"name": "clicks", "resource_type": "metric", "package_name": "ad_reporting", "path": "metrics/ad_reporting__ad_report_metrics.yml", "original_file_path": "models/metrics/ad_reporting__ad_report_metrics.yml", "unique_id": "metric.ad_reporting.clicks", "fqn": ["ad_reporting", "metrics", "clicks"], "description": "Total clicks", "label": "Ad Clicks (Fivetran)", "type": "simple", "type_params": {"measure": {"name": "clicks", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}, "input_measures": [{"name": "clicks", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}], "numerator": null, "denominator": null, "expr": null, "window": null, "grain_to_date": null, "metrics": [], "conversion_type_params": null, "cumulative_type_params": null, "metric_aggregation_params": null}, "filter": null, "metadata": null, "time_granularity": null, "meta": {}, "tags": [], "config": {"enabled": true, "group": null, "meta": {}}, "unrendered_config": {}, "sources": [], "depends_on": {"macros": [], "nodes": ["semantic_model.ad_reporting.ad_report"]}, "refs": [], "metrics": [], "created_at": 1783708223.6698942, "group": null}, "metric.ad_reporting.impressions": {"name": "impressions", "resource_type": "metric", "package_name": "ad_reporting", "path": "metrics/ad_reporting__ad_report_metrics.yml", "original_file_path": "models/metrics/ad_reporting__ad_report_metrics.yml", "unique_id": "metric.ad_reporting.impressions", "fqn": ["ad_reporting", "metrics", "impressions"], "description": "Total impressions", "label": "Ad Impressions (Fivetran)", "type": "simple", "type_params": {"measure": {"name": "impressions", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}, "input_measures": [{"name": "impressions", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}], "numerator": null, "denominator": null, "expr": null, "window": null, "grain_to_date": null, "metrics": [], "conversion_type_params": null, "cumulative_type_params": null, "metric_aggregation_params": null}, "filter": null, "metadata": null, "time_granularity": null, "meta": {}, "tags": [], "config": {"enabled": true, "group": null, "meta": {}}, "unrendered_config": {}, "sources": [], "depends_on": {"macros": [], "nodes": ["semantic_model.ad_reporting.ad_report"]}, "refs": [], "metrics": [], "created_at": 1783708223.6706343, "group": null}, "metric.ad_reporting.spend": {"name": "spend", "resource_type": "metric", "package_name": "ad_reporting", "path": "metrics/ad_reporting__ad_report_metrics.yml", "original_file_path": "models/metrics/ad_reporting__ad_report_metrics.yml", "unique_id": "metric.ad_reporting.spend", "fqn": ["ad_reporting", "metrics", "spend"], "description": "Total spend (in currency of individual platforms)", "label": "Ad Spend (Fivetran)", "type": "simple", "type_params": {"measure": {"name": "ad_spend", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}, "input_measures": [{"name": "ad_spend", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}], "numerator": null, "denominator": null, "expr": null, "window": null, "grain_to_date": null, "metrics": [], "conversion_type_params": null, "cumulative_type_params": null, "metric_aggregation_params": null}, "filter": null, "metadata": null, "time_granularity": null, "meta": {}, "tags": [], "config": {"enabled": true, "group": null, "meta": {}}, "unrendered_config": {}, "sources": [], "depends_on": {"macros": [], "nodes": ["semantic_model.ad_reporting.ad_report"]}, "refs": [], "metrics": [], "created_at": 1783708223.6719084, "group": null}, "metric.ad_reporting.clickthrough_rate": {"name": "clickthrough_rate", "resource_type": "metric", "package_name": "ad_reporting", "path": "metrics/ad_reporting__ad_report_metrics.yml", "original_file_path": "models/metrics/ad_reporting__ad_report_metrics.yml", "unique_id": "metric.ad_reporting.clickthrough_rate", "fqn": ["ad_reporting", "metrics", "clickthrough_rate"], "description": "Percentage of impressions that did convert into clicks.", "label": "Ad Clickthrough Rate (Fivetran)", "type": "derived", "type_params": {"measure": null, "input_measures": [{"name": "clicks", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}, {"name": "impressions", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}], "numerator": null, "denominator": null, "expr": "clicks/impressions", "window": null, "grain_to_date": null, "metrics": [{"name": "clicks", "filter": null, "alias": null, "offset_window": null, "offset_to_grain": null}, {"name": "impressions", "filter": null, "alias": null, "offset_window": null, "offset_to_grain": null}], "conversion_type_params": null, "cumulative_type_params": null, "metric_aggregation_params": null}, "filter": null, "metadata": null, "time_granularity": null, "meta": {}, "tags": [], "config": {"enabled": true, "group": null, "meta": {}}, "unrendered_config": {}, "sources": [], "depends_on": {"macros": [], "nodes": ["metric.ad_reporting.clicks", "metric.ad_reporting.impressions"]}, "refs": [], "metrics": [], "created_at": 1783708223.6761408, "group": null}, "metric.ad_reporting.cost_per_click": {"name": "cost_per_click", "resource_type": "metric", "package_name": "ad_reporting", "path": "metrics/ad_reporting__ad_report_metrics.yml", "original_file_path": "models/metrics/ad_reporting__ad_report_metrics.yml", "unique_id": "metric.ad_reporting.cost_per_click", "fqn": ["ad_reporting", "metrics", "cost_per_click"], "description": "The ratio of spend to clicks", "label": "Average Ad Cost Per Click (Fivetran)", "type": "derived", "type_params": {"measure": null, "input_measures": [{"name": "clicks", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}, {"name": "ad_spend", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}], "numerator": null, "denominator": null, "expr": "spend/clicks", "window": null, "grain_to_date": null, "metrics": [{"name": "clicks", "filter": null, "alias": null, "offset_window": null, "offset_to_grain": null}, {"name": "spend", "filter": null, "alias": null, "offset_window": null, "offset_to_grain": null}], "conversion_type_params": null, "cumulative_type_params": null, "metric_aggregation_params": null}, "filter": null, "metadata": null, "time_granularity": null, "meta": {}, "tags": [], "config": {"enabled": true, "group": null, "meta": {}}, "unrendered_config": {}, "sources": [], "depends_on": {"macros": [], "nodes": ["metric.ad_reporting.clicks", "metric.ad_reporting.spend"]}, "refs": [], "metrics": [], "created_at": 1783708223.6776543, "group": null}, "metric.ad_reporting.bounce_rate": {"name": "bounce_rate", "resource_type": "metric", "package_name": "ad_reporting", "path": "metrics/ad_reporting__ad_report_metrics.yml", "original_file_path": "models/metrics/ad_reporting__ad_report_metrics.yml", "unique_id": "metric.ad_reporting.bounce_rate", "fqn": ["ad_reporting", "metrics", "bounce_rate"], "description": "Percentage of impressions that did not convert into clicks.", "label": "Average Ad Bounce Rate (Fivetran)", "type": "derived", "type_params": {"measure": null, "input_measures": [{"name": "impressions", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}, {"name": "clicks", "filter": null, "alias": null, "join_to_timespine": false, "fill_nulls_with": null}], "numerator": null, "denominator": null, "expr": "impressions - clicks/impressions", "window": null, "grain_to_date": null, "metrics": [{"name": "impressions", "filter": null, "alias": null, "offset_window": null, "offset_to_grain": null}, {"name": "clicks", "filter": null, "alias": null, "offset_window": null, "offset_to_grain": null}], "conversion_type_params": null, "cumulative_type_params": null, "metric_aggregation_params": null}, "filter": null, "metadata": null, "time_granularity": null, "meta": {}, "tags": [], "config": {"enabled": true, "group": null, "meta": {}}, "unrendered_config": {}, "sources": [], "depends_on": {"macros": [], "nodes": ["metric.ad_reporting.impressions", "metric.ad_reporting.clicks"]}, "refs": [], "metrics": [], "created_at": 1783708223.6791444, "group": null}}, "groups": {}, "selectors": {}, "disabled": {"test.ad_reporting_integration_tests.vertical_account_conversion_comparison": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "vertical_account_conversion_comparison", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "integrity/vertical_account_conversion_comparison.sql", "original_file_path": "tests/integrity/vertical_account_conversion_comparison.sql", "unique_id": "test.ad_reporting_integration_tests.vertical_account_conversion_comparison", "fqn": ["ad_reporting_integration_tests", "integrity", "vertical_account_conversion_comparison"], "alias": "vertical_account_conversion_comparison", "checksum": {"name": "sha256", "checksum": "57b9bb083ae74c65396e514010d4ff7b4b7d3dfda42f201745c084ac4a471ff5"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783708213.0959132, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith account_report as (\n\n select \n platform,\n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__account_report\n group by 1\n),\n\namazon_ads as (\n\n select \n sum(coalesce(purchases_30_d,0)) as conversions,\n sum(coalesce(sales_30_d,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.amazon_ads__account_report\n),\n\napple_search_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(0) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.apple_search_ads__organization_report\n),\n\nlinkedin_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(conversion_value_in_local_currency,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.linkedin_ads__account_report\n),\n\npinterest_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(total_conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.pinterest_ads__advertiser_report\n),\n\nsnapchat_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(conversion_purchases_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.snapchat_ads__account_report\n),\n\ntiktok_ads as (\n\n select \n sum(coalesce(conversion,0)) as conversions,\n sum(coalesce(total_conversion_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.tiktok_ads__advertiser_report\n),\n\ntwitter_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(total_conversions_sale_amount,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.twitter_ads__account_report\n),\n\ngoogle_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.google_ads__account_report\n),\n\nfacebook_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.facebook_ads__account_report\n),\n\nmicrosoft_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.microsoft_ads__account_report\n),\n\nreddit_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(total_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.reddit_ads__account_report\n)\n\nselect \n 'amazon_ads' as platform\nfrom account_report\njoin amazon_ads\n on account_report.platform = 'amazon_ads'\nwhere abs(amazon_ads.conversions - account_report.conversions) >= .01\n or abs(amazon_ads.conversions_value - account_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'apple_search_ads' as platform\nfrom account_report\njoin apple_search_ads\n on account_report.platform = 'apple_search_ads'\nwhere abs(apple_search_ads.conversions - account_report.conversions) >= .01\n or abs(apple_search_ads.conversions_value - account_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'linkedin_ads' as platform\nfrom account_report\njoin linkedin_ads\n on account_report.platform = 'linkedin_ads'\nwhere abs(linkedin_ads.conversions - account_report.conversions) >= .01\n or abs(linkedin_ads.conversions_value - account_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'pinterest_ads' as platform\nfrom account_report\njoin pinterest_ads\n on account_report.platform = 'pinterest_ads'\nwhere abs(pinterest_ads.conversions - account_report.conversions) >= .01\n or abs(pinterest_ads.conversions_value - account_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'snapchat_ads' as platform\nfrom account_report\njoin snapchat_ads\n on account_report.platform = 'snapchat_ads'\nwhere abs(snapchat_ads.conversions - account_report.conversions) >= .01\n or abs(snapchat_ads.conversions_value - account_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'tiktok_ads' as platform\nfrom account_report\njoin tiktok_ads\n on account_report.platform = 'tiktok_ads'\nwhere abs(tiktok_ads.conversions - account_report.conversions) >= .01\n or abs(tiktok_ads.conversions_value - account_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'twitter_ads' as platform\nfrom account_report\njoin twitter_ads\n on account_report.platform = 'twitter_ads'\nwhere abs(twitter_ads.conversions - account_report.conversions) >= .01\n or abs(twitter_ads.conversions_value - account_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'google_ads' as platform\nfrom account_report\njoin google_ads\n on account_report.platform = 'google_ads'\nwhere abs(google_ads.conversions - account_report.conversions) >= .01\n or abs(google_ads.conversions_value - account_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'facebook_ads' as platform\nfrom account_report\njoin facebook_ads\n on account_report.platform = 'facebook_ads'\nwhere abs(facebook_ads.conversions - account_report.conversions) >= .01\n or abs(facebook_ads.conversions_value - account_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'microsoft_ads' as platform\nfrom account_report\njoin microsoft_ads\n on account_report.platform = 'microsoft_ads'\nwhere abs(microsoft_ads.conversions - account_report.conversions) >= .01\n or abs(microsoft_ads.conversions_value - account_report.conversions_value) >= .01\nunion all \n\nselect \n 'reddit_ads' as platform\nfrom account_report\njoin reddit_ads\n on account_report.platform = 'reddit_ads'\nwhere abs(reddit_ads.conversions - account_report.conversions) >= .01\n or abs(reddit_ads.conversions_value - account_report.conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.vertical_ad_conversion_comparison": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "vertical_ad_conversion_comparison", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "integrity/vertical_ad_conversion_comparison.sql", "original_file_path": "tests/integrity/vertical_ad_conversion_comparison.sql", "unique_id": "test.ad_reporting_integration_tests.vertical_ad_conversion_comparison", "fqn": ["ad_reporting_integration_tests", "integrity", "vertical_ad_conversion_comparison"], "alias": "vertical_ad_conversion_comparison", "checksum": {"name": "sha256", "checksum": "7f8fd97c6322443922e9cb51443d95326effdcdbb4a8e7e479eb80154b6ec9d8"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783708213.132755, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith ad_report as (\n\n select \n platform,\n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__ad_report\n group by 1\n),\n\namazon_ads as (\n\n select \n sum(coalesce(purchases_30_d,0)) as conversions,\n sum(coalesce(sales_30_d,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.amazon_ads__ad_report\n),\n\napple_search_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(0) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.apple_search_ads__ad_report\n),\n\nlinkedin_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(conversion_value_in_local_currency,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.linkedin_ads__creative_report\n),\n\npinterest_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(total_conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.pinterest_ads__pin_promotion_report\n),\n\nsnapchat_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(conversion_purchases_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.snapchat_ads__ad_report\n),\n\ntiktok_ads as (\n\n select \n sum(coalesce(conversion,0)) as conversions,\n sum(coalesce(total_conversion_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.tiktok_ads__ad_report\n),\n\ntwitter_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(total_conversions_sale_amount,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.twitter_ads__promoted_tweet_report\n),\n\ngoogle_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.google_ads__ad_report\n),\n\nfacebook_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.facebook_ads__ad_report\n),\n\nmicrosoft_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.microsoft_ads__ad_report\n),\n\nreddit_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(total_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.reddit_ads__ad_report\n)\n\nselect \n 'amazon_ads' as platform\nfrom ad_report\njoin amazon_ads\n on ad_report.platform = 'amazon_ads'\nwhere abs(amazon_ads.conversions - ad_report.conversions) >= .01\n or abs(amazon_ads.conversions_value - ad_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'apple_search_ads' as platform\nfrom ad_report\njoin apple_search_ads\n on ad_report.platform = 'apple_search_ads'\nwhere abs(apple_search_ads.conversions - ad_report.conversions) >= .01\n or abs(apple_search_ads.conversions_value - ad_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'linkedin_ads' as platform\nfrom ad_report\njoin linkedin_ads\n on ad_report.platform = 'linkedin_ads'\nwhere abs(linkedin_ads.conversions - ad_report.conversions) >= .01\n or abs(linkedin_ads.conversions_value - ad_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'pinterest_ads' as platform\nfrom ad_report\njoin pinterest_ads\n on ad_report.platform = 'pinterest_ads'\nwhere abs(pinterest_ads.conversions - ad_report.conversions) >= .01\n or abs(pinterest_ads.conversions_value - ad_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'snapchat_ads' as platform\nfrom ad_report\njoin snapchat_ads\n on ad_report.platform = 'snapchat_ads'\nwhere abs(snapchat_ads.conversions - ad_report.conversions) >= .01\n or abs(snapchat_ads.conversions_value - ad_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'tiktok_ads' as platform\nfrom ad_report\njoin tiktok_ads\n on ad_report.platform = 'tiktok_ads'\nwhere abs(tiktok_ads.conversions - ad_report.conversions) >= .01\n or abs(tiktok_ads.conversions_value - ad_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'twitter_ads' as platform\nfrom ad_report\njoin twitter_ads\n on ad_report.platform = 'twitter_ads'\nwhere abs(twitter_ads.conversions - ad_report.conversions) >= .01\n or abs(twitter_ads.conversions_value - ad_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'google_ads' as platform\nfrom ad_report\njoin google_ads\n on ad_report.platform = 'google_ads'\nwhere abs(google_ads.conversions - ad_report.conversions) >= .01\n or abs(google_ads.conversions_value - ad_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'facebook_ads' as platform\nfrom ad_report\njoin facebook_ads\n on ad_report.platform = 'facebook_ads'\nwhere abs(facebook_ads.conversions - ad_report.conversions) >= .01\n or abs(facebook_ads.conversions_value - ad_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'microsoft_ads' as platform\nfrom ad_report\njoin microsoft_ads\n on ad_report.platform = 'microsoft_ads'\nwhere abs(microsoft_ads.conversions - ad_report.conversions) >= .01\n or abs(microsoft_ads.conversions_value - ad_report.conversions_value) >= .01\nunion all \n\nselect \n 'reddit_ads' as platform\nfrom ad_report\njoin reddit_ads\n on ad_report.platform = 'reddit_ads'\nwhere abs(reddit_ads.conversions - ad_report.conversions) >= .01\n or abs(reddit_ads.conversions_value - ad_report.conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.vertical_country_comparison": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "vertical_country_comparison", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "integrity/vertical_country_comparison.sql", "original_file_path": "tests/integrity/vertical_country_comparison.sql", "unique_id": "test.ad_reporting_integration_tests.vertical_country_comparison", "fqn": ["ad_reporting_integration_tests", "integrity", "vertical_country_comparison"], "alias": "vertical_country_comparison", "checksum": {"name": "sha256", "checksum": "5cc3f26b83d10248a64c00b99cd0cf5918ffa873e49deeda22d1389bf185be09"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783708213.1406047, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\n{% set include_list = [] %}\n{% do include_list.append('facebook_ads') if var('facebook_ads__using_demographics_country', false) %}\n{% do include_list.append('linkedin_ads') if var('linkedin_ads__using_geo', true) and var('linkedin_ads__using_monthly_ad_analytics_by_member_country', true) %}\n{% do include_list.append('microsoft_ads') if var('microsoft_ads__using_geographic_daily_report', false) %}\n{% do include_list.append('pinterest_ads') if var('pinterest__using_pin_promotion_targeting_report', true) and var('pinterest__using_targeting_geo', true) %}\n{% do include_list.append('reddit_ads') if var('reddit_ads__using_campaign_country_report', true) %}\n{% do include_list.append('snapchat_ads') if var('snapchat_ads__using_campaign_country_report', false) %}\n{% do include_list.append('tiktok_ads') if var('tiktok_ads__using_campaign_country_report', true) %}\n{% do include_list.append('twitter_ads') if var('twitter_ads__using_campaign_locations_report', false) %}\n\n{% set enabled_packages = ad_reporting.get_enabled_packages(include=include_list) %}\n\nwith report as (\n\n select \n platform,\n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__monthly_campaign_country_report\n group by 1\n),\n\n{% if 'linkedin_ads' in enabled_packages %}\nlinkedin_ads as (\n\n select \n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(cost, 0)) as spend,\n sum(coalesce(total_conversions, 0)) as conversions,\n sum(coalesce(conversion_value_in_local_currency, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.linkedin_ads__monthly_campaign_country_report\n),\n{% endif %}\n\n{% if 'pinterest_ads' in enabled_packages %}\npinterest_ads as (\n\n select \n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(total_conversions, 0)) as conversions,\n sum(coalesce(total_conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.pinterest_ads__campaign_country_report\n),\n{% endif %}\n\n{% if 'snapchat_ads' in enabled_packages %}\nsnapchat_ads as (\n\n select \n sum(coalesce(swipes, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(total_conversions, 0)) as conversions,\n sum(coalesce(conversion_purchases_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.snapchat_ads__campaign_country_report\n),\n{% endif %}\n\n{% if 'tiktok_ads' in enabled_packages %}\ntiktok_ads as (\n\n select \n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversion, 0)) as conversions,\n 0 as conversions_value\n from {{ target.schema }}_ad_reporting_dev.tiktok_ads__campaign_country_report\n),\n{% endif %}\n\n{% if 'twitter_ads' in enabled_packages %}\ntwitter_ads as (\n\n select \n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(total_conversions, 0)) as conversions,\n sum(coalesce(total_conversions_sale_amount, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.twitter_ads__campaign_country_report\n),\n{% endif %}\n\n{% if 'facebook_ads' in enabled_packages %}\nfacebook_ads as (\n\n select \n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n 0 as conversions_value\n from {{ target.schema }}_ad_reporting_dev.facebook_ads__country_report\n),\n{% endif %}\n\n{% if 'microsoft_ads' in enabled_packages %}\nmicrosoft_ads as (\n\n select \n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.microsoft_ads__campaign_country_report\n),\n{% endif %}\n\n{% if 'reddit_ads' in enabled_packages %}\nreddit_ads as (\n\n select \n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(total_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.reddit_ads__campaign_country_report\n),\n{% endif %}\n\n{% set metrics = ['clicks', 'impressions', 'spend', 'conversions', 'conversions_value'] %}\n\nfinal as (\n{% for platform in enabled_packages %}\n select \n '{{ platform }}' as platform \n {% for metric in metrics %}\n , report.{{ metric }} as ad_reporting_{{ metric }}\n , {{ platform }}.{{ metric }} as platform_{{ metric }}\n {% endfor %}\n from report\n join {{ platform }}\n on report.platform = '{{ platform }}'\n where \n {% for metric in metrics %}\n abs({{ platform }}.{{ metric }} - report.{{ metric }}) >= .01\n {% if not loop.last %} or {% endif %}\n {% endfor %}\n \n {% if not loop.last %} union all {% endif %}\n\n{% endfor %}\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.vertical_region_comparison": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "vertical_region_comparison", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "integrity/vertical_region_comparison.sql", "original_file_path": "tests/integrity/vertical_region_comparison.sql", "unique_id": "test.ad_reporting_integration_tests.vertical_region_comparison", "fqn": ["ad_reporting_integration_tests", "integrity", "vertical_region_comparison"], "alias": "vertical_region_comparison", "checksum": {"name": "sha256", "checksum": "4c20a841eda0e338eaa7dbbc2db644ce0d28413b94e69fd38a48f0109e790914"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783708213.1647563, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\n{% set include_list = [] %}\n{% do include_list.append('facebook_ads') if var('facebook_ads__using_demographics_region', false) %}\n{% do include_list.append('linkedin_ads') if var('linkedin_ads__using_geo', true) and var('linkedin_ads__using_monthly_ad_analytics_by_member_region', true) %}\n{% do include_list.append('microsoft_ads') if var('microsoft_ads__using_geographic_daily_report', false) %}\n{% do include_list.append('pinterest_ads') if var('pinterest__using_pin_promotion_targeting_report', true) and var('pinterest__using_targeting_geo_region', true) %}\n{% do include_list.append('snapchat_ads') if var('snapchat_ads__using_campaign_region_report', false) %}\n{% do include_list.append('twitter_ads') if var('twitter_ads__using_campaign_regions_report', false) %}\n\n{% set enabled_packages = ad_reporting.get_enabled_packages(include=include_list) %}\n\nwith report as (\n\n select \n platform,\n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__monthly_campaign_region_report\n group by 1\n),\n\n{% if 'linkedin_ads' in enabled_packages %}\nlinkedin_ads as (\n\n select \n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(cost, 0)) as spend,\n sum(coalesce(total_conversions, 0)) as conversions,\n sum(coalesce(conversion_value_in_local_currency, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.linkedin_ads__monthly_campaign_region_report\n),\n{% endif %}\n\n{% if 'pinterest_ads' in enabled_packages %}\npinterest_ads as (\n\n select \n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(total_conversions, 0)) as conversions,\n sum(coalesce(total_conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.pinterest_ads__campaign_region_report\n),\n{% endif %}\n\n{% if 'snapchat_ads' in enabled_packages %}\nsnapchat_ads as (\n\n select \n sum(coalesce(swipes, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(total_conversions, 0)) as conversions,\n sum(coalesce(conversion_purchases_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.snapchat_ads__campaign_region_report\n),\n{% endif %}\n\n{% if 'twitter_ads' in enabled_packages %}\ntwitter_ads as (\n\n select \n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(total_conversions, 0)) as conversions,\n sum(coalesce(total_conversions_sale_amount, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.twitter_ads__campaign_region_report\n),\n{% endif %}\n\n{% if 'facebook_ads' in enabled_packages %}\nfacebook_ads as (\n\n select \n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n 0 as conversions_value\n from {{ target.schema }}_ad_reporting_dev.facebook_ads__region_report\n),\n{% endif %}\n\n{% if 'microsoft_ads' in enabled_packages %}\nmicrosoft_ads as (\n\n select \n sum(coalesce(clicks, 0)) as clicks,\n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.microsoft_ads__campaign_region_report\n),\n{% endif %}\n\n{% set metrics = ['clicks', 'impressions', 'spend', 'conversions', 'conversions_value'] %}\n\nfinal as (\n{% for platform in enabled_packages %}\n select \n '{{ platform }}' as platform\n {% for metric in metrics %}\n , report.{{ metric }} as ad_reporting_{{ metric }}\n , {{ platform }}.{{ metric }} as platform_{{ metric }}\n {% endfor %}\n from report\n join {{ platform }}\n on report.platform = '{{ platform }}'\n where \n {% for metric in metrics %}\n abs({{ platform }}.{{ metric }} - report.{{ metric }}) >= .01\n {% if not loop.last %} or {% endif %}\n {% endfor %}\n \n {% if not loop.last %} union all {% endif %}\n\n{% endfor %}\n)\n\nselect *\nfrom final", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": ["macro.ad_reporting.get_enabled_packages"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.vertical_search_conversion_comparison": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "vertical_search_conversion_comparison", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "integrity/vertical_search_conversion_comparison.sql", "original_file_path": "tests/integrity/vertical_search_conversion_comparison.sql", "unique_id": "test.ad_reporting_integration_tests.vertical_search_conversion_comparison", "fqn": ["ad_reporting_integration_tests", "integrity", "vertical_search_conversion_comparison"], "alias": "vertical_search_conversion_comparison", "checksum": {"name": "sha256", "checksum": "455347e442899fb453e8590442067346f02fcc500eef5dabf5e9e7e6078576bc"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783708213.1816993, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith search_report as (\n\n select \n platform,\n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__search_report\n group by 1\n),\n\namazon_ads as (\n\n select \n sum(coalesce(purchases_30_d,0)) as conversions,\n sum(coalesce(sales_30_d,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.amazon_ads__search_report\n),\n\n{% if var('apple_search_ads__using_search_terms', true ) %}\napple_search_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(0) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.apple_search_ads__search_term_report\n),\n{% endif %}\n\n{% if var('google_ads__using_search_term_keyword_stats', true ) %}\ngoogle_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.google_ads__search_term_report\n),\n{% endif %}\n\nmicrosoft_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.microsoft_ads__search_report\n)\n\nselect \n 'amazon_ads' as platform\nfrom search_report\njoin amazon_ads\n on search_report.platform = 'amazon_ads'\nwhere abs(amazon_ads.conversions - search_report.conversions) >= .01\n or abs(amazon_ads.conversions_value - search_report.conversions_value) >= .01\n\nunion all \n\n{% if var('apple_search_ads__using_search_terms', true ) %}\nselect \n 'apple_search_ads' as platform\nfrom search_report\njoin apple_search_ads\n on search_report.platform = 'apple_search_ads'\nwhere abs(apple_search_ads.conversions - search_report.conversions) >= .01\n or abs(apple_search_ads.conversions_value - search_report.conversions_value) >= .01\n\nunion all \n{% endif %}\n\n{% if var('google_ads__using_search_term_keyword_stats', true ) %}\nselect \n 'google_ads' as platform\nfrom search_report\njoin google_ads\n on search_report.platform = 'google_ads'\nwhere abs(google_ads.conversions - search_report.conversions) >= .01\n or abs(google_ads.conversions_value - search_report.conversions_value) >= .01\n\nunion all \n{% endif %}\n\nselect \n 'microsoft_ads' as platform\nfrom search_report\njoin microsoft_ads\n on search_report.platform = 'microsoft_ads'\nwhere abs(microsoft_ads.conversions - search_report.conversions) >= .01\n or abs(microsoft_ads.conversions_value - search_report.conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.vertical_campaign_conversion_comparison": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "vertical_campaign_conversion_comparison", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "integrity/vertical_campaign_conversion_comparison.sql", "original_file_path": "tests/integrity/vertical_campaign_conversion_comparison.sql", "unique_id": "test.ad_reporting_integration_tests.vertical_campaign_conversion_comparison", "fqn": ["ad_reporting_integration_tests", "integrity", "vertical_campaign_conversion_comparison"], "alias": "vertical_campaign_conversion_comparison", "checksum": {"name": "sha256", "checksum": "bf3ee3807ad294a3727806fd3ae81194d3ddb74a5c7f42e7917343179c0ef9a0"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783708213.1896896, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith campaign_report as (\n\n select \n platform,\n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__campaign_report\n group by 1\n),\n\namazon_ads as (\n\n select \n sum(coalesce(purchases_30_d,0)) as conversions,\n sum(coalesce(sales_30_d,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.amazon_ads__campaign_report\n),\n\napple_search_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(0) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.apple_search_ads__campaign_report\n),\n\nlinkedin_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(conversion_value_in_local_currency,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.linkedin_ads__campaign_group_report\n),\n\npinterest_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(total_conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.pinterest_ads__advertiser_report\n),\n\nsnapchat_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(conversion_purchases_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.snapchat_ads__campaign_report\n),\n\ntiktok_ads as (\n\n select \n sum(coalesce(conversion,0)) as conversions,\n sum(coalesce(total_conversion_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.tiktok_ads__campaign_report\n),\n\ntwitter_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(total_conversions_sale_amount,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.twitter_ads__campaign_report\n),\n\ngoogle_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.google_ads__campaign_report\n),\n\nfacebook_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.facebook_ads__campaign_report\n),\n\nmicrosoft_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.microsoft_ads__campaign_report\n),\n\nreddit_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(total_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.reddit_ads__campaign_report\n)\n\nselect \n 'amazon_ads' as platform\nfrom campaign_report\njoin amazon_ads\n on campaign_report.platform = 'amazon_ads'\nwhere abs(amazon_ads.conversions - campaign_report.conversions) >= .01\n or abs(amazon_ads.conversions_value - campaign_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'apple_search_ads' as platform\nfrom campaign_report\njoin apple_search_ads\n on campaign_report.platform = 'apple_search_ads'\nwhere abs(apple_search_ads.conversions - campaign_report.conversions) >= .01\n or abs(apple_search_ads.conversions_value - campaign_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'linkedin_ads' as platform\nfrom campaign_report\njoin linkedin_ads\n on campaign_report.platform = 'linkedin_ads'\nwhere abs(linkedin_ads.conversions - campaign_report.conversions) >= .01\n or abs(linkedin_ads.conversions_value - campaign_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'pinterest_ads' as platform\nfrom campaign_report\njoin pinterest_ads\n on campaign_report.platform = 'pinterest_ads'\nwhere abs(pinterest_ads.conversions - campaign_report.conversions) >= .01\n or abs(pinterest_ads.conversions_value - campaign_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'snapchat_ads' as platform\nfrom campaign_report\njoin snapchat_ads\n on campaign_report.platform = 'snapchat_ads'\nwhere abs(snapchat_ads.conversions - campaign_report.conversions) >= .01\n or abs(snapchat_ads.conversions_value - campaign_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'tiktok_ads' as platform\nfrom campaign_report\njoin tiktok_ads\n on campaign_report.platform = 'tiktok_ads'\nwhere abs(tiktok_ads.conversions - campaign_report.conversions) >= .01\n or abs(tiktok_ads.conversions_value - campaign_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'twitter_ads' as platform\nfrom campaign_report\njoin twitter_ads\n on campaign_report.platform = 'twitter_ads'\nwhere abs(twitter_ads.conversions - campaign_report.conversions) >= .01\n or abs(twitter_ads.conversions_value - campaign_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'google_ads' as platform\nfrom campaign_report\njoin google_ads\n on campaign_report.platform = 'google_ads'\nwhere abs(google_ads.conversions - campaign_report.conversions) >= .01\n or abs(google_ads.conversions_value - campaign_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'facebook_ads' as platform\nfrom campaign_report\njoin facebook_ads\n on campaign_report.platform = 'facebook_ads'\nwhere abs(facebook_ads.conversions - campaign_report.conversions) >= .01\n or abs(facebook_ads.conversions_value - campaign_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'microsoft_ads' as platform\nfrom campaign_report\njoin microsoft_ads\n on campaign_report.platform = 'microsoft_ads'\nwhere abs(microsoft_ads.conversions - campaign_report.conversions) >= .01\n or abs(microsoft_ads.conversions_value - campaign_report.conversions_value) >= .01\nunion all \n\nselect \n 'reddit_ads' as platform\nfrom campaign_report\njoin reddit_ads\n on campaign_report.platform = 'reddit_ads'\nwhere abs(reddit_ads.conversions - campaign_report.conversions) >= .01\n or abs(reddit_ads.conversions_value - campaign_report.conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.vertical_url_conversion_comparison": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "vertical_url_conversion_comparison", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "integrity/vertical_url_conversion_comparison.sql", "original_file_path": "tests/integrity/vertical_url_conversion_comparison.sql", "unique_id": "test.ad_reporting_integration_tests.vertical_url_conversion_comparison", "fqn": ["ad_reporting_integration_tests", "integrity", "vertical_url_conversion_comparison"], "alias": "vertical_url_conversion_comparison", "checksum": {"name": "sha256", "checksum": "8e983eccee223b9bc9f4e614398ef59e6316834b962e35b4b3be07191d744655"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783708213.197457, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith url_report as (\n\n select \n platform,\n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__url_report\n group by 1\n),\n\nlinkedin_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(conversion_value_in_local_currency,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.linkedin_ads__url_report\n),\n\npinterest_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(total_conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.pinterest_ads__url_report\n),\n\nsnapchat_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(conversion_purchases_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.snapchat_ads__url_report\n),\n\ntiktok_ads as (\n\n select \n sum(coalesce(conversion,0)) as conversions,\n sum(coalesce(total_conversion_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.tiktok_ads__url_report\n),\n\ntwitter_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(total_conversions_sale_amount,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.twitter_ads__url_report\n),\n\ngoogle_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.google_ads__url_report\n),\n\nfacebook_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.facebook_ads__url_report\n),\n\nmicrosoft_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.microsoft_ads__url_report\n),\n\nreddit_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(total_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.reddit_ads__url_report\n)\n\nselect \n 'linkedin_ads' as platform\nfrom url_report\njoin linkedin_ads\n on url_report.platform = 'linkedin_ads'\nwhere abs(linkedin_ads.conversions - url_report.conversions) >= .01\n or abs(linkedin_ads.conversions_value - url_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'pinterest_ads' as platform\nfrom url_report\njoin pinterest_ads\n on url_report.platform = 'pinterest_ads'\nwhere abs(pinterest_ads.conversions - url_report.conversions) >= .01\n or abs(pinterest_ads.conversions_value - url_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'snapchat_ads' as platform\nfrom url_report\njoin snapchat_ads\n on url_report.platform = 'snapchat_ads'\nwhere abs(snapchat_ads.conversions - url_report.conversions) >= .01\n or abs(snapchat_ads.conversions_value - url_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'tiktok_ads' as platform\nfrom url_report\njoin tiktok_ads\n on url_report.platform = 'tiktok_ads'\nwhere abs(tiktok_ads.conversions - url_report.conversions) >= .01\n or abs(tiktok_ads.conversions_value - url_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'twitter_ads' as platform\nfrom url_report\njoin twitter_ads\n on url_report.platform = 'twitter_ads'\nwhere abs(twitter_ads.conversions - url_report.conversions) >= .01\n or abs(twitter_ads.conversions_value - url_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'google_ads' as platform\nfrom url_report\njoin google_ads\n on url_report.platform = 'google_ads'\nwhere abs(google_ads.conversions - url_report.conversions) >= .01\n or abs(google_ads.conversions_value - url_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'facebook_ads' as platform\nfrom url_report\njoin facebook_ads\n on url_report.platform = 'facebook_ads'\nwhere abs(facebook_ads.conversions - url_report.conversions) >= .01\n or abs(facebook_ads.conversions_value - url_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'microsoft_ads' as platform\nfrom url_report\njoin microsoft_ads\n on url_report.platform = 'microsoft_ads'\nwhere abs(microsoft_ads.conversions - url_report.conversions) >= .01\n or abs(microsoft_ads.conversions_value - url_report.conversions_value) >= .01\nunion all \n\nselect \n 'reddit_ads' as platform\nfrom url_report\njoin reddit_ads\n on url_report.platform = 'reddit_ads'\nwhere abs(reddit_ads.conversions - url_report.conversions) >= .01\n or abs(reddit_ads.conversions_value - url_report.conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.vertical_keyword_conversion_comparison": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "vertical_keyword_conversion_comparison", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "integrity/vertical_keyword_conversion_comparison.sql", "original_file_path": "tests/integrity/vertical_keyword_conversion_comparison.sql", "unique_id": "test.ad_reporting_integration_tests.vertical_keyword_conversion_comparison", "fqn": ["ad_reporting_integration_tests", "integrity", "vertical_keyword_conversion_comparison"], "alias": "vertical_keyword_conversion_comparison", "checksum": {"name": "sha256", "checksum": "bc0ff953564ed7cb181759c8a353c52373643912ececc8bfe4617a1375418f98"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783708213.2056391, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith keyword_report as (\n\n select \n platform,\n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__keyword_report\n group by 1\n),\n\namazon_ads as (\n\n select \n sum(coalesce(purchases_30_d,0)) as conversions,\n sum(coalesce(sales_30_d,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.amazon_ads__keyword_report\n),\n\napple_search_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(0) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.apple_search_ads__keyword_report\n),\n\npinterest_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(total_conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.pinterest_ads__keyword_report\n),\n\n{% if var('twitter_ads__using_keywords', true ) %}\ntwitter_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(total_conversions_sale_amount,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.twitter_ads__keyword_report\n),\n{% endif %}\n\ngoogle_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.google_ads__keyword_report\n),\n\nmicrosoft_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.microsoft_ads__keyword_report\n)\n\nselect \n 'amazon_ads' as platform\nfrom keyword_report\njoin amazon_ads\n on keyword_report.platform = 'amazon_ads'\nwhere abs(amazon_ads.conversions - keyword_report.conversions) >= .01\n or abs(amazon_ads.conversions_value - keyword_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'apple_search_ads' as platform\nfrom keyword_report\njoin apple_search_ads\n on keyword_report.platform = 'apple_search_ads'\nwhere abs(apple_search_ads.conversions - keyword_report.conversions) >= .01\n or abs(apple_search_ads.conversions_value - keyword_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'pinterest_ads' as platform\nfrom keyword_report\njoin pinterest_ads\n on keyword_report.platform = 'pinterest_ads'\nwhere abs(pinterest_ads.conversions - keyword_report.conversions) >= .01\n or abs(pinterest_ads.conversions_value - keyword_report.conversions_value) >= .01\n\nunion all \n\n{% if var('twitter_ads__using_keywords', true ) %}\nselect \n 'twitter_ads' as platform\nfrom keyword_report\njoin twitter_ads\n on keyword_report.platform = 'twitter_ads'\nwhere abs(twitter_ads.conversions - keyword_report.conversions) >= .01\n or abs(twitter_ads.conversions_value - keyword_report.conversions_value) >= .01\n\nunion all \n{% endif %}\n\nselect \n 'google_ads' as platform\nfrom keyword_report\njoin google_ads\n on keyword_report.platform = 'google_ads'\nwhere abs(google_ads.conversions - keyword_report.conversions) >= .01\n or abs(google_ads.conversions_value - keyword_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'microsoft_ads' as platform\nfrom keyword_report\njoin microsoft_ads\n on keyword_report.platform = 'microsoft_ads'\nwhere abs(microsoft_ads.conversions - keyword_report.conversions) >= .01\n or abs(microsoft_ads.conversions_value - keyword_report.conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.vertical_ad_group_conversion_comparison": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "vertical_ad_group_conversion_comparison", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "integrity/vertical_ad_group_conversion_comparison.sql", "original_file_path": "tests/integrity/vertical_ad_group_conversion_comparison.sql", "unique_id": "test.ad_reporting_integration_tests.vertical_ad_group_conversion_comparison", "fqn": ["ad_reporting_integration_tests", "integrity", "vertical_ad_group_conversion_comparison"], "alias": "vertical_ad_group_conversion_comparison", "checksum": {"name": "sha256", "checksum": "2c9ebd9e3c28fa0b98399ce898ccb4f5ac5075e45607a882f1d08e037a7458e4"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783708213.213299, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith ad_group_report as (\n\n select \n platform,\n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__ad_group_report\n group by 1\n),\n\namazon_ads as (\n\n select \n sum(coalesce(purchases_30_d,0)) as conversions,\n sum(coalesce(sales_30_d,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.amazon_ads__ad_group_report\n),\n\napple_search_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(0) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.apple_search_ads__ad_group_report\n),\n\nlinkedin_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(conversion_value_in_local_currency,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.linkedin_ads__campaign_report\n),\n\npinterest_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(total_conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.pinterest_ads__ad_group_report\n),\n\nsnapchat_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(conversion_purchases_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.snapchat_ads__ad_squad_report\n),\n\ntiktok_ads as (\n\n select \n sum(coalesce(conversion,0)) as conversions,\n sum(coalesce(total_conversion_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.tiktok_ads__ad_group_report\n),\n\ntwitter_ads as (\n\n select \n sum(coalesce(total_conversions,0)) as conversions,\n sum(coalesce(total_conversions_sale_amount,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.twitter_ads__line_item_report\n),\n\ngoogle_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.google_ads__ad_group_report\n),\n\nfacebook_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.facebook_ads__ad_set_report\n),\n\nmicrosoft_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(conversions_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.microsoft_ads__ad_group_report\n),\n\nreddit_ads as (\n\n select \n sum(coalesce(conversions,0)) as conversions,\n sum(coalesce(total_value,0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.reddit_ads__ad_group_report\n)\n\nselect \n 'amazon_ads' as platform\nfrom ad_group_report\njoin amazon_ads\n on ad_group_report.platform = 'amazon_ads'\nwhere abs(amazon_ads.conversions - ad_group_report.conversions) >= .01\n or abs(amazon_ads.conversions_value - ad_group_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'apple_search_ads' as platform\nfrom ad_group_report\njoin apple_search_ads\n on ad_group_report.platform = 'apple_search_ads'\nwhere abs(apple_search_ads.conversions - ad_group_report.conversions) >= .01\n or abs(apple_search_ads.conversions_value - ad_group_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'linkedin_ads' as platform\nfrom ad_group_report\njoin linkedin_ads\n on ad_group_report.platform = 'linkedin_ads'\nwhere abs(linkedin_ads.conversions - ad_group_report.conversions) >= .01\n or abs(linkedin_ads.conversions_value - ad_group_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'pinterest_ads' as platform\nfrom ad_group_report\njoin pinterest_ads\n on ad_group_report.platform = 'pinterest_ads'\nwhere abs(pinterest_ads.conversions - ad_group_report.conversions) >= .01\n or abs(pinterest_ads.conversions_value - ad_group_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'snapchat_ads' as platform\nfrom ad_group_report\njoin snapchat_ads\n on ad_group_report.platform = 'snapchat_ads'\nwhere abs(snapchat_ads.conversions - ad_group_report.conversions) >= .01\n or abs(snapchat_ads.conversions_value - ad_group_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'tiktok_ads' as platform\nfrom ad_group_report\njoin tiktok_ads\n on ad_group_report.platform = 'tiktok_ads'\nwhere abs(tiktok_ads.conversions - ad_group_report.conversions) >= .01\n or abs(tiktok_ads.conversions_value - ad_group_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'twitter_ads' as platform\nfrom ad_group_report\njoin twitter_ads\n on ad_group_report.platform = 'twitter_ads'\nwhere abs(twitter_ads.conversions - ad_group_report.conversions) >= .01\n or abs(twitter_ads.conversions_value - ad_group_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'google_ads' as platform\nfrom ad_group_report\njoin google_ads\n on ad_group_report.platform = 'google_ads'\nwhere abs(google_ads.conversions - ad_group_report.conversions) >= .01\n or abs(google_ads.conversions_value - ad_group_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'facebook_ads' as platform\nfrom ad_group_report\njoin facebook_ads\n on ad_group_report.platform = 'facebook_ads'\nwhere abs(facebook_ads.conversions - ad_group_report.conversions) >= .01\n or abs(facebook_ads.conversions_value - ad_group_report.conversions_value) >= .01\n\nunion all \n\nselect \n 'microsoft_ads' as platform\nfrom ad_group_report\njoin microsoft_ads\n on ad_group_report.platform = 'microsoft_ads'\nwhere abs(microsoft_ads.conversions - ad_group_report.conversions) >= .01\n or abs(microsoft_ads.conversions_value - ad_group_report.conversions_value) >= .01\nunion all \n\nselect \n 'reddit_ads' as platform\nfrom ad_group_report\njoin reddit_ads\n on ad_group_report.platform = 'reddit_ads'\nwhere abs(reddit_ads.conversions - ad_group_report.conversions) >= .01\n or abs(reddit_ads.conversions_value - ad_group_report.conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.consistency_search_report": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_search_report", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "consistency/consistency_search_report.sql", "original_file_path": "tests/consistency/consistency_search_report.sql", "unique_id": "test.ad_reporting_integration_tests.consistency_search_report", "fqn": ["ad_reporting_integration_tests", "consistency", "consistency_search_report"], "alias": "consistency_search_report", "checksum": {"name": "sha256", "checksum": "0a8736340def1f3e8054365db1965679e70b307159a5564d69ebb9de71633542"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783708213.2210293, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith prod as (\n select\n search_query,\n keyword_id,\n sum(clicks) as clicks, \n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_prod.ad_reporting__search_report\n group by 1,2\n),\n\ndev as (\n select\n search_query,\n keyword_id,\n sum(clicks) as clicks, \n sum(impressions) as impressions,\n sum(spend) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__search_report\n group by 1,2\n),\n\nfinal as (\n select \n prod.search_query,\n prod.keyword_id,\n prod.clicks as prod_clicks,\n dev.clicks as dev_clicks,\n prod.impressions as prod_impressions,\n dev.impressions as dev_impressions,\n prod.spend as prod_spend,\n dev.spend as dev_spend,\n prod.conversions as prod_conversions,\n dev.conversions as dev_conversions,\n prod.conversions_value as prod_conversions_value,\n dev.conversions_value as dev_conversions_value\n from prod\n full outer join dev \n on dev.search_query = prod.search_query\n and dev.keyword_id = prod.keyword_id\n\n)\n\nselect *\nfrom final\nwhere\n abs(prod_clicks - dev_clicks) >= .01\n or abs(prod_impressions - dev_impressions) >= .01\n or abs(prod_spend - dev_spend) >= .01\n or abs(prod_conversions - dev_conversions) >= .01\n or abs(prod_conversions_value - dev_conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.consistency_ad_report": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_ad_report", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "consistency/consistency_ad_report.sql", "original_file_path": "tests/consistency/consistency_ad_report.sql", "unique_id": "test.ad_reporting_integration_tests.consistency_ad_report", "fqn": ["ad_reporting_integration_tests", "consistency", "consistency_ad_report"], "alias": "consistency_ad_report", "checksum": {"name": "sha256", "checksum": "681023f92d44ff4e10e0536ca6cc76450b6b15333672229939964358bfcdd6c3"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783708213.2272968, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith prod as (\n select\n ad_id,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_prod.ad_reporting__ad_report\n group by 1\n),\n\ndev as (\n select\n ad_id,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__ad_report\n group by 1\n),\n\nfinal as (\n select \n prod.ad_id,\n prod.clicks as prod_clicks,\n dev.clicks as dev_clicks,\n prod.impressions as prod_impressions,\n dev.impressions as dev_impressions,\n prod.spend as prod_spend,\n dev.spend as dev_spend,\n prod.conversions as prod_conversions,\n dev.conversions as dev_conversions,\n prod.conversions_value as prod_conversions_value,\n dev.conversions_value as dev_conversions_value\n from prod\n full outer join dev \n on dev.ad_id = prod.ad_id\n)\n\nselect *\nfrom final\nwhere\n abs(prod_clicks - dev_clicks) >= .01\n or abs(prod_impressions - dev_impressions) >= .01\n or abs(prod_spend - dev_spend) >= .01\n or abs(prod_conversions - dev_conversions) >= .01\n or abs(prod_conversions_value - dev_conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.consistency_keyword_report": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_keyword_report", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "consistency/consistency_keyword_report.sql", "original_file_path": "tests/consistency/consistency_keyword_report.sql", "unique_id": "test.ad_reporting_integration_tests.consistency_keyword_report", "fqn": ["ad_reporting_integration_tests", "consistency", "consistency_keyword_report"], "alias": "consistency_keyword_report", "checksum": {"name": "sha256", "checksum": "299ee4c16c9f9da9cfd29217e7acfe1415180d539330705c0cf580bfe552e98f"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783708213.2343905, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith prod as (\n select\n keyword_id,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_prod.ad_reporting__keyword_report\n group by 1\n),\n\ndev as (\n select\n keyword_id,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__keyword_report\n group by 1\n),\n\nfinal as (\n select \n prod.keyword_id,\n prod.clicks as prod_clicks,\n dev.clicks as dev_clicks,\n prod.impressions as prod_impressions,\n dev.impressions as dev_impressions,\n prod.spend as prod_spend,\n dev.spend as dev_spend,\n prod.conversions as prod_conversions,\n dev.conversions as dev_conversions,\n prod.conversions_value as prod_conversions_value,\n dev.conversions_value as dev_conversions_value\n from prod\n full outer join dev \n on dev.keyword_id = prod.keyword_id\n)\n\nselect *\nfrom final\nwhere\n abs(prod_clicks - dev_clicks) >= .01\n or abs(prod_impressions - dev_impressions) >= .01\n or abs(prod_spend - dev_spend) >= .01\n or abs(prod_conversions - dev_conversions) >= .01\n or abs(prod_conversions_value - dev_conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.consistency_country_report": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_country_report", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "consistency/consistency_country_report.sql", "original_file_path": "tests/consistency/consistency_country_report.sql", "unique_id": "test.ad_reporting_integration_tests.consistency_country_report", "fqn": ["ad_reporting_integration_tests", "consistency", "consistency_country_report"], "alias": "consistency_country_report", "checksum": {"name": "sha256", "checksum": "ad26133bf62129ef597cf899fa1a2da1e8581735a65134809cb4c87931800b52"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783708213.2405298, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith prod as (\n select\n country,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_prod.ad_reporting__monthly_campaign_country_report\n group by 1\n),\n\ndev as (\n select\n country,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__monthly_campaign_country_report\n group by 1\n),\n\nfinal as (\n select \n prod.country,\n prod.clicks as prod_clicks,\n dev.clicks as dev_clicks,\n prod.impressions as prod_impressions,\n dev.impressions as dev_impressions,\n prod.spend as prod_spend,\n dev.spend as dev_spend,\n prod.conversions as prod_conversions,\n dev.conversions as dev_conversions,\n prod.conversions_value as prod_conversions_value,\n dev.conversions_value as dev_conversions_value\n from prod\n full outer join dev \n on dev.country = prod.country\n)\n\nselect *\nfrom final\nwhere\n abs(prod_clicks - dev_clicks) >= .01\n or abs(prod_impressions - dev_impressions) >= .01\n or abs(prod_spend - dev_spend) >= .01\n or abs(prod_conversions - dev_conversions) >= .01\n or abs(prod_conversions_value - dev_conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.consistency_account_report": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_account_report", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "consistency/consistency_account_report.sql", "original_file_path": "tests/consistency/consistency_account_report.sql", "unique_id": "test.ad_reporting_integration_tests.consistency_account_report", "fqn": ["ad_reporting_integration_tests", "consistency", "consistency_account_report"], "alias": "consistency_account_report", "checksum": {"name": "sha256", "checksum": "0de4c0637a88825ac30e745ab7371f0cbfb459617aff9f679d39a1ebc9674cb0"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783708213.2468054, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith prod as (\n select\n account_id,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_prod.ad_reporting__account_report\n group by 1\n),\n\ndev as (\n select\n account_id,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__account_report\n group by 1\n),\n\nfinal as (\n select \n prod.account_id,\n prod.clicks as prod_clicks,\n dev.clicks as dev_clicks,\n prod.impressions as prod_impressions,\n dev.impressions as dev_impressions,\n prod.spend as prod_spend,\n dev.spend as dev_spend,\n prod.conversions as prod_conversions,\n dev.conversions as dev_conversions,\n prod.conversions_value as prod_conversions_value,\n dev.conversions_value as dev_conversions_value\n from prod\n full outer join dev \n on dev.account_id = prod.account_id\n)\n\nselect *\nfrom final\nwhere\n abs(prod_clicks - dev_clicks) >= .01\n or abs(prod_impressions - dev_impressions) >= .01\n or abs(prod_spend - dev_spend) >= .01\n or abs(prod_conversions - dev_conversions) >= .01\n or abs(prod_conversions_value - dev_conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.consistency_url_report": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_url_report", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "consistency/consistency_url_report.sql", "original_file_path": "tests/consistency/consistency_url_report.sql", "unique_id": "test.ad_reporting_integration_tests.consistency_url_report", "fqn": ["ad_reporting_integration_tests", "consistency", "consistency_url_report"], "alias": "consistency_url_report", "checksum": {"name": "sha256", "checksum": "594cfdbbe03e55c3bc0880461ace3130bf69292547d97b51566fda108f59ae45"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783708213.2529685, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith prod as (\n select\n base_url,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_prod.ad_reporting__url_report\n group by 1\n),\n\ndev as (\n select\n base_url,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__url_report\n group by 1\n),\n\nfinal as (\n select \n prod.base_url,\n prod.clicks as prod_clicks,\n dev.clicks as dev_clicks,\n prod.impressions as prod_impressions,\n dev.impressions as dev_impressions,\n prod.spend as prod_spend,\n dev.spend as dev_spend,\n prod.conversions as prod_conversions,\n dev.conversions as dev_conversions,\n prod.conversions_value as prod_conversions_value,\n dev.conversions_value as dev_conversions_value\n from prod\n full outer join dev \n on dev.base_url = prod.base_url\n)\n\nselect *\nfrom final\nwhere\n abs(prod_clicks - dev_clicks) >= .01\n or abs(prod_impressions - dev_impressions) >= .01\n or abs(prod_spend - dev_spend) >= .01\n or abs(prod_conversions - dev_conversions) >= .01\n or abs(prod_conversions_value - dev_conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.consistency_ad_group_report": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_ad_group_report", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "consistency/consistency_ad_group_report.sql", "original_file_path": "tests/consistency/consistency_ad_group_report.sql", "unique_id": "test.ad_reporting_integration_tests.consistency_ad_group_report", "fqn": ["ad_reporting_integration_tests", "consistency", "consistency_ad_group_report"], "alias": "consistency_ad_group_report", "checksum": {"name": "sha256", "checksum": "47fc74626d8e9bdc30cc6771942884f5f329e215963c979e36499c65d9bac231"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783708213.2601552, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith prod as (\n select\n ad_group_id,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_prod.ad_reporting__ad_group_report\n group by 1\n),\n\ndev as (\n select\n ad_group_id,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__ad_group_report\n group by 1\n),\n\nfinal as (\n select \n prod.ad_group_id,\n prod.clicks as prod_clicks,\n dev.clicks as dev_clicks,\n prod.impressions as prod_impressions,\n dev.impressions as dev_impressions,\n prod.spend as prod_spend,\n dev.spend as dev_spend,\n prod.conversions as prod_conversions,\n dev.conversions as dev_conversions,\n prod.conversions_value as prod_conversions_value,\n dev.conversions_value as dev_conversions_value\n from prod\n full outer join dev \n on dev.ad_group_id = prod.ad_group_id\n)\n\nselect *\nfrom final\nwhere\n abs(prod_clicks - dev_clicks) >= .01\n or abs(prod_impressions - dev_impressions) >= .01\n or abs(prod_spend - dev_spend) >= .01\n or abs(prod_conversions - dev_conversions) >= .01\n or abs(prod_conversions_value - dev_conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.consistency_campaign_report": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_campaign_report", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "consistency/consistency_campaign_report.sql", "original_file_path": "tests/consistency/consistency_campaign_report.sql", "unique_id": "test.ad_reporting_integration_tests.consistency_campaign_report", "fqn": ["ad_reporting_integration_tests", "consistency", "consistency_campaign_report"], "alias": "consistency_campaign_report", "checksum": {"name": "sha256", "checksum": "25b51911dc3c16537f3ae06c7bdab67a7df6d4a4025e8de5a9b963a8fbe609a9"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783708213.2662745, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith prod as (\n select\n campaign_id,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_prod.ad_reporting__campaign_report\n group by 1\n),\n\ndev as (\n select\n campaign_id,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__campaign_report\n group by 1\n),\n\nfinal as (\n select \n prod.campaign_id,\n prod.clicks as prod_clicks,\n dev.clicks as dev_clicks,\n prod.impressions as prod_impressions,\n dev.impressions as dev_impressions,\n prod.spend as prod_spend,\n dev.spend as dev_spend,\n prod.conversions as prod_conversions,\n dev.conversions as dev_conversions,\n prod.conversions_value as prod_conversions_value,\n dev.conversions_value as dev_conversions_value\n from prod\n full outer join dev \n on dev.campaign_id = prod.campaign_id\n)\n\nselect *\nfrom final\nwhere\n abs(prod_clicks - dev_clicks) >= .01\n or abs(prod_impressions - dev_impressions) >= .01\n or abs(prod_spend - dev_spend) >= .01\n or abs(prod_conversions - dev_conversions) >= .01\n or abs(prod_conversions_value - dev_conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "test.ad_reporting_integration_tests.consistency_region_report": [{"database": "postgres", "schema": "public_dbt_test__audit", "name": "consistency_region_report", "resource_type": "test", "package_name": "ad_reporting_integration_tests", "path": "consistency/consistency_region_report.sql", "original_file_path": "tests/consistency/consistency_region_report.sql", "unique_id": "test.ad_reporting_integration_tests.consistency_region_report", "fqn": ["ad_reporting_integration_tests", "consistency", "consistency_region_report"], "alias": "consistency_region_report", "checksum": {"name": "sha256", "checksum": "c2321b26c74a7274ff00fa09cf9834d332e333bbbd60e123684b02398eb5f064"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "static_analysis": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": "fivetran_validations", "enabled": false}, "created_at": 1783708213.2723172, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\nwith prod as (\n select\n region,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_prod.ad_reporting__monthly_campaign_region_report\n group by 1\n),\n\ndev as (\n select\n region,\n sum(coalesce(clicks, 0)) as clicks, \n sum(coalesce(impressions, 0)) as impressions,\n sum(coalesce(spend, 0)) as spend,\n sum(coalesce(conversions, 0)) as conversions,\n sum(coalesce(conversions_value, 0)) as conversions_value\n from {{ target.schema }}_ad_reporting_dev.ad_reporting__monthly_campaign_region_report\n group by 1\n),\n\nfinal as (\n select \n prod.region,\n prod.clicks as prod_clicks,\n dev.clicks as dev_clicks,\n prod.impressions as prod_impressions,\n dev.impressions as dev_impressions,\n prod.spend as prod_spend,\n dev.spend as dev_spend,\n prod.conversions as prod_conversions,\n dev.conversions as dev_conversions,\n prod.conversions_value as prod_conversions_value,\n dev.conversions_value as dev_conversions_value\n from prod\n full outer join dev \n on dev.region = prod.region\n)\n\nselect *\nfrom final\nwhere\n abs(prod_clicks - dev_clicks) >= .01\n or abs(prod_impressions - dev_impressions) >= .01\n or abs(prod_spend - dev_spend) >= .01\n or abs(prod_conversions - dev_conversions) >= .01\n or abs(prod_conversions_value - dev_conversions_value) >= .01", "doc_blocks": [], "language": "sql", "refs": [], "sources": [], "metrics": [], "functions": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "source.reddit_ads.reddit_ads.account": [{"database": "postgres", "schema": "public", "name": "account", "resource_type": "source", "package_name": "reddit_ads", "path": "models/staging/src_reddit_ads.yml", "original_file_path": "models/staging/src_reddit_ads.yml", "unique_id": "source.reddit_ads.reddit_ads.account", "fqn": ["reddit_ads", "staging", "reddit_ads", "account"], "source_name": "reddit_ads", "source_description": "", "loader": "Fivetran", "identifier": "reddit_ads_account_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "external": null, "description": "Each record represents information about an account.", "columns": {"id": {"name": "id", "description": "{{ doc(\"account_id\") }}", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "attribution_type": {"name": "attribution_type", "description": "{{ doc(\"attribution_type\") }}", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "click_attribution_window": {"name": "click_attribution_window", "description": "{{ doc(\"click_attribution_window\") }}", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "created_at": {"name": "created_at", "description": "{{ doc(\"created_at\") }}", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "currency": {"name": "currency", "description": "{{ doc(\"currency\") }}", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "time_zone_id": {"name": "time_zone_id", "description": "{{ doc(\"time_zone_id\") }}", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}, "view_attribution_window": {"name": "view_attribution_window", "description": "{{ doc(\"view_attribution_window\") }}", "meta": {}, "data_type": null, "constraints": [], "quote": null, "config": {"meta": {}, "tags": []}, "tags": [], "granularity": null, "doc_blocks": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": false, "event_time": null, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_field": "_fivetran_synced", "loaded_at_query": null, "meta": {}, "tags": [], "static_analysis": null}, "patch_path": null, "unrendered_config": {"loaded_at_field": "_fivetran_synced", "enabled": false, "freshness": {"warn_after": {"count": 48, "period": "hour"}, "error_after": {"count": 168, "period": "hour"}, "filter": null}, "loaded_at_query": null, "meta": {}, "tags": []}, "relation_name": "\"postgres\".\"public\".\"reddit_ads_account_data\"", "created_at": 1783708224.3385441, "unrendered_database": "{% if target.type != 'spark'%}{{ var('reddit_ads_database', target.database) }}{% endif %}", "unrendered_schema": "{{ var('reddit_ads_schema', 'reddit_ads') }}", "doc_blocks": []}]}, "parent_map": {"seed.ad_reporting_integration_tests.twitter_campaign_locations_report_data": [], "seed.ad_reporting_integration_tests.apple_search_ad_history_data": [], "seed.ad_reporting_integration_tests.snapchat_ad_hourly_report_data": [], "seed.ad_reporting_integration_tests.linkedin_ad_account_history_data": [], "seed.ad_reporting_integration_tests.google_ads_account_history_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_campaign_performance_daily_report_data": [], "seed.ad_reporting_integration_tests.tiktok_advertiser_data": [], "seed.ad_reporting_integration_tests.amazon_ads_targeting_keyword_report_data": [], "seed.ad_reporting_integration_tests.snapchat_creative_url_tag_history_data": [], "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_actions_data": [], "seed.ad_reporting_integration_tests.amazon_ads_ad_group_history_data": [], "seed.ad_reporting_integration_tests.reddit_ads_campaign_data": [], "seed.ad_reporting_integration_tests.apple_search_ad_report_data": [], "seed.ad_reporting_integration_tests.reddit_ads_ad_group_report_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_geographic_performance_daily_report_data": [], "seed.ad_reporting_integration_tests.twitter_promoted_tweet_report_data": [], "seed.ad_reporting_integration_tests.snapchat_creative_history_data": [], "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_data": [], "seed.ad_reporting_integration_tests.google_ads_ad_group_criterion_history_data": [], "seed.ad_reporting_integration_tests.amazon_ads_portfolio_history_data": [], "seed.ad_reporting_integration_tests.apple_search_organization_data": [], "seed.ad_reporting_integration_tests.twitter_campaign_history_data": [], "seed.ad_reporting_integration_tests.linkedin_monthly_ad_analytics_by_member_region_data": [], "seed.ad_reporting_integration_tests.apple_search_campaign_history_data": [], "seed.ad_reporting_integration_tests.pinterest_campaign_report_data": [], "seed.ad_reporting_integration_tests.snapchat_campaign_history_data": [], "seed.ad_reporting_integration_tests.twitter_account_report_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_account_history_data": [], "seed.ad_reporting_integration_tests.snapchat_campaign_hourly_report_data": [], "seed.ad_reporting_integration_tests.facebook_ads_account_history_data": [], "seed.ad_reporting_integration_tests.apple_search_search_term_report_data": [], "seed.ad_reporting_integration_tests.linkedin_monthly_ad_analytics_by_member_country_data": [], "seed.ad_reporting_integration_tests.twitter_promoted_tweet_history_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_search_performance_daily_report_data": [], "seed.ad_reporting_integration_tests.reddit_ads_campaign_report_data": [], "seed.ad_reporting_integration_tests.facebook_ads_demographics_region_actions_data": [], "seed.ad_reporting_integration_tests.twitter_campaign_regions_report_data": [], "seed.ad_reporting_integration_tests.reddit_ads_campaign_country_conversions_report_data": [], "seed.ad_reporting_integration_tests.google_ads_search_term_keyword_stats_data": [], "seed.ad_reporting_integration_tests.snapchat_ad_history_data": [], "seed.ad_reporting_integration_tests.reddit_ads_ad_report_data": [], "seed.ad_reporting_integration_tests.google_ads_campaign_bidding_strategy_history_data": [], "seed.ad_reporting_integration_tests.google_ads_campaign_budget_history_data": [], "seed.ad_reporting_integration_tests.reddit_ads_ad_conversions": [], "seed.ad_reporting_integration_tests.tiktok_location_data": [], "seed.ad_reporting_integration_tests.pinterest_advertiser_report_data": [], "seed.ad_reporting_integration_tests.snapchat_ad_squad_history_data": [], "seed.ad_reporting_integration_tests.twitter_tweet_url_data": [], "seed.ad_reporting_integration_tests.linkedin_ad_creative_history_data": [], "seed.ad_reporting_integration_tests.amazon_ads_search_term_ad_keyword_report_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_ad_group_history_data": [], "seed.ad_reporting_integration_tests.facebook_ads_demographics_region_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_ad_performance_daily_report_data": [], "seed.ad_reporting_integration_tests.apple_search_keyword_history_data": [], "seed.ad_reporting_integration_tests.reddit_ads_account_data": [], "seed.ad_reporting_integration_tests.linkedin_ad_campaign_group_history_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_keyword_performance_daily_report_data": [], "seed.ad_reporting_integration_tests.google_ads_ad_group_history_data": [], "seed.ad_reporting_integration_tests.amazon_ads_profile_data": [], "seed.ad_reporting_integration_tests.pinterest_campaign_history_data": [], "seed.ad_reporting_integration_tests.twitter_line_item_report_data": [], "seed.ad_reporting_integration_tests.google_ads_campaign_stats_data": [], "seed.ad_reporting_integration_tests.twitter_line_item_history_data": [], "seed.ad_reporting_integration_tests.google_ads_ad_stats_data": [], "seed.ad_reporting_integration_tests.reddit_ads_account_conversions": [], "seed.ad_reporting_integration_tests.google_ads_account_stats_data": [], "seed.ad_reporting_integration_tests.snapchat_campaign_geo_country_daily_report_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_ad_group_performance_daily_report_data": [], "seed.ad_reporting_integration_tests.amazon_ads_product_ad_history_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_ad_history_data": [], "seed.ad_reporting_integration_tests.reddit_ads_campaign_country_report_data": [], "seed.ad_reporting_integration_tests.facebook_ads_ad_history_data": [], "seed.ad_reporting_integration_tests.pinterest_ad_group_report_data": [], "seed.ad_reporting_integration_tests.twitter_campaign_report_data": [], "seed.ad_reporting_integration_tests.facebook_ads_ad_set_history_data": [], "seed.ad_reporting_integration_tests.snapchat_campaign_geo_region_daily_report_data": [], "seed.ad_reporting_integration_tests.pinterest_pin_promotion_history_data": [], "seed.ad_reporting_integration_tests.amazon_ads_ad_group_level_report_data": [], "seed.ad_reporting_integration_tests.twitter_line_item_keywords_report_data": [], "seed.ad_reporting_integration_tests.twitter_tweet_data": [], "seed.ad_reporting_integration_tests.tiktok_campaign_country_report_data": [], "seed.ad_reporting_integration_tests.facebook_ads_creative_history_data": [], "seed.ad_reporting_integration_tests.facebook_ads_campaign_history_data": [], "seed.ad_reporting_integration_tests.amazon_ads_campaign_level_report_data": [], "seed.ad_reporting_integration_tests.google_ads_ad_group_stats_data": [], "seed.ad_reporting_integration_tests.apple_search_keyword_report_data": [], "seed.ad_reporting_integration_tests.tiktok_campaign_report_hourly_data": [], "seed.ad_reporting_integration_tests.amazon_ads_advertised_product_report_data": [], "seed.ad_reporting_integration_tests.twitter_account_history_data": [], "seed.ad_reporting_integration_tests.apple_search_ad_group_history_data": [], "seed.ad_reporting_integration_tests.tiktok_adgroup_history_data": [], "seed.ad_reporting_integration_tests.apple_search_campaign_report_data": [], "seed.ad_reporting_integration_tests.reddit_ads_ad_data": [], "seed.ad_reporting_integration_tests.snapchat_ad_squad_hourly_report_data": [], "seed.ad_reporting_integration_tests.linkedin_ad_analytics_by_campaign_data": [], "seed.ad_reporting_integration_tests.snapchat_ad_account_history_data": [], "seed.ad_reporting_integration_tests.tiktok_ad_history_data": [], "seed.ad_reporting_integration_tests.linkedin_ad_analytics_by_creative_data": [], "seed.ad_reporting_integration_tests.reddit_ads_account_report_data": [], "seed.ad_reporting_integration_tests.reddit_ads_ad_group_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_campaign_history_data": [], "seed.ad_reporting_integration_tests.pinterest_pin_promotion_report_data": [], "seed.ad_reporting_integration_tests.pinterest_targeting_geo_data": [], "seed.ad_reporting_integration_tests.linkedin_geo_data": [], "seed.ad_reporting_integration_tests.linkedin_ad_campaign_history_data": [], "seed.ad_reporting_integration_tests.tiktok_campaign_history_data": [], "seed.ad_reporting_integration_tests.google_ads_ad_history_data": [], "seed.ad_reporting_integration_tests.google_ads_campaign_criterion_history_data": [], "seed.ad_reporting_integration_tests.google_ads_campaign_bid_modifier_history_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_account_performance_daily_report_data": [], "seed.ad_reporting_integration_tests.tiktok_adgroup_report_hourly_data": [], "seed.ad_reporting_integration_tests.google_ads_keyword_stats_data": [], "seed.ad_reporting_integration_tests.pinterest_keyword_report_data": [], "seed.ad_reporting_integration_tests.google_ads_campaign_history_data": [], "seed.ad_reporting_integration_tests.pinterest_keyword_history_data": [], "seed.ad_reporting_integration_tests.pinterest_ad_group_history_data": [], "seed.ad_reporting_integration_tests.pinterest_advertiser_history_data": [], "seed.ad_reporting_integration_tests.amazon_ads_campaign_history_data": [], "seed.ad_reporting_integration_tests.facebook_ads_demographics_country_data": [], "seed.ad_reporting_integration_tests.reddit_ads_campaign_conversions": [], "seed.ad_reporting_integration_tests.facebook_ads_demographics_country_actions_data": [], "seed.ad_reporting_integration_tests.apple_search_ad_group_report_data": [], "seed.ad_reporting_integration_tests.reddit_ads_business_account_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_keyword_history_data": [], "seed.ad_reporting_integration_tests.amazon_ads_keyword_history_data": [], "seed.ad_reporting_integration_tests.pinterest_pin_promotion_targeting_report_data": [], "seed.ad_reporting_integration_tests.reddit_ads_ad_group_conversions": [], "seed.ad_reporting_integration_tests.tiktok_ad_report_hourly_data": [], "seed.ad_reporting_integration_tests.pinterest_targeting_geo_region_data": [], "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_action_values_data": [], "model.linkedin.linkedin_ads__creative_report": ["model.linkedin.stg_linkedin_ads__account_history", "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative", "model.linkedin.stg_linkedin_ads__campaign_group_history", "model.linkedin.stg_linkedin_ads__campaign_history", "model.linkedin.stg_linkedin_ads__creative_history"], "model.linkedin.linkedin_ads__campaign_report": ["model.linkedin.stg_linkedin_ads__account_history", "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign", "model.linkedin.stg_linkedin_ads__campaign_group_history", "model.linkedin.stg_linkedin_ads__campaign_history"], "model.linkedin.linkedin_ads__monthly_campaign_region_report": ["model.linkedin.stg_linkedin_ads__account_history", "model.linkedin.stg_linkedin_ads__campaign_group_history", "model.linkedin.stg_linkedin_ads__campaign_history", "model.linkedin.stg_linkedin_ads__geo", "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region"], "model.linkedin.linkedin_ads__monthly_campaign_country_report": ["model.linkedin.stg_linkedin_ads__account_history", "model.linkedin.stg_linkedin_ads__campaign_group_history", "model.linkedin.stg_linkedin_ads__campaign_history", "model.linkedin.stg_linkedin_ads__geo", "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country"], "model.linkedin.linkedin_ads__account_report": ["model.linkedin.stg_linkedin_ads__account_history", "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign", "model.linkedin.stg_linkedin_ads__campaign_history"], "model.linkedin.linkedin_ads__campaign_group_report": ["model.linkedin.stg_linkedin_ads__account_history", "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign", "model.linkedin.stg_linkedin_ads__campaign_group_history", "model.linkedin.stg_linkedin_ads__campaign_history"], "model.linkedin.linkedin_ads__url_report": ["model.linkedin.stg_linkedin_ads__account_history", "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative", "model.linkedin.stg_linkedin_ads__campaign_group_history", "model.linkedin.stg_linkedin_ads__campaign_history", "model.linkedin.stg_linkedin_ads__creative_history"], "model.linkedin.stg_linkedin_ads__geo": ["model.linkedin.stg_linkedin_ads__geo_tmp"], "model.linkedin.stg_linkedin_ads__account_history": ["model.linkedin.stg_linkedin_ads__account_history_tmp"], "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_creative_tmp"], "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country": ["model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country_tmp"], "model.linkedin.stg_linkedin_ads__campaign_group_history": ["model.linkedin.stg_linkedin_ads__campaign_group_history_tmp"], "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region": ["model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region_tmp"], "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign_tmp"], "model.linkedin.stg_linkedin_ads__campaign_history": ["model.linkedin.stg_linkedin_ads__campaign_history_tmp"], "model.linkedin.stg_linkedin_ads__creative_history": ["model.linkedin.stg_linkedin_ads__creative_history_tmp"], "model.linkedin.stg_linkedin_ads__creative_history_tmp": ["source.linkedin.linkedin_ads.creative_history"], "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region_tmp": ["source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_region"], "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country_tmp": ["source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_country"], "model.linkedin.stg_linkedin_ads__campaign_history_tmp": ["source.linkedin.linkedin_ads.campaign_history"], "model.linkedin.stg_linkedin_ads__campaign_group_history_tmp": ["source.linkedin.linkedin_ads.campaign_group_history"], "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign_tmp": ["source.linkedin.linkedin_ads.ad_analytics_by_campaign"], "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative_tmp": ["source.linkedin.linkedin_ads.ad_analytics_by_creative"], "model.linkedin.stg_linkedin_ads__geo_tmp": ["source.linkedin.linkedin_ads.geo"], "model.linkedin.stg_linkedin_ads__account_history_tmp": ["source.linkedin.linkedin_ads.account_history"], "model.apple_search_ads.apple_search_ads__campaign_report": ["model.apple_search_ads.stg_apple_search_ads__campaign_history", "model.apple_search_ads.stg_apple_search_ads__campaign_report", "model.apple_search_ads.stg_apple_search_ads__organization"], "model.apple_search_ads.apple_search_ads__organization_report": ["model.apple_search_ads.stg_apple_search_ads__campaign_history", "model.apple_search_ads.stg_apple_search_ads__campaign_report", "model.apple_search_ads.stg_apple_search_ads__organization"], "model.apple_search_ads.apple_search_ads__search_term_report": ["model.apple_search_ads.stg_apple_search_ads__campaign_history", "model.apple_search_ads.stg_apple_search_ads__organization", "model.apple_search_ads.stg_apple_search_ads__search_term_report"], "model.apple_search_ads.apple_search_ads__ad_report": ["model.apple_search_ads.stg_apple_search_ads__ad_group_history", "model.apple_search_ads.stg_apple_search_ads__ad_history", "model.apple_search_ads.stg_apple_search_ads__ad_report", "model.apple_search_ads.stg_apple_search_ads__campaign_history", "model.apple_search_ads.stg_apple_search_ads__organization"], "model.apple_search_ads.apple_search_ads__keyword_report": ["model.apple_search_ads.stg_apple_search_ads__ad_group_history", "model.apple_search_ads.stg_apple_search_ads__campaign_history", "model.apple_search_ads.stg_apple_search_ads__keyword_history", "model.apple_search_ads.stg_apple_search_ads__keyword_report", "model.apple_search_ads.stg_apple_search_ads__organization"], "model.apple_search_ads.apple_search_ads__ad_group_report": ["model.apple_search_ads.stg_apple_search_ads__ad_group_history", "model.apple_search_ads.stg_apple_search_ads__ad_group_report", "model.apple_search_ads.stg_apple_search_ads__campaign_history", "model.apple_search_ads.stg_apple_search_ads__organization"], "model.apple_search_ads.stg_apple_search_ads__ad_group_history": ["model.apple_search_ads.stg_apple_search_ads__ad_group_history_tmp"], "model.apple_search_ads.stg_apple_search_ads__keyword_history": ["model.apple_search_ads.stg_apple_search_ads__keyword_history_tmp"], "model.apple_search_ads.stg_apple_search_ads__keyword_report": ["model.apple_search_ads.stg_apple_search_ads__keyword_report_tmp"], "model.apple_search_ads.stg_apple_search_ads__campaign_report": ["model.apple_search_ads.stg_apple_search_ads__campaign_report_tmp"], "model.apple_search_ads.stg_apple_search_ads__search_term_report": ["model.apple_search_ads.stg_apple_search_ads__search_term_report_tmp"], "model.apple_search_ads.stg_apple_search_ads__campaign_history": ["model.apple_search_ads.stg_apple_search_ads__campaign_history_tmp"], "model.apple_search_ads.stg_apple_search_ads__ad_report": ["model.apple_search_ads.stg_apple_search_ads__ad_report_tmp"], "model.apple_search_ads.stg_apple_search_ads__ad_history": ["model.apple_search_ads.stg_apple_search_ads__ad_history_tmp"], "model.apple_search_ads.stg_apple_search_ads__ad_group_report": ["model.apple_search_ads.stg_apple_search_ads__ad_group_report_tmp"], "model.apple_search_ads.stg_apple_search_ads__organization": ["model.apple_search_ads.stg_apple_search_ads__organization_tmp"], "model.apple_search_ads.stg_apple_search_ads__ad_group_history_tmp": ["source.apple_search_ads.apple_search_ads.ad_group_history"], "model.apple_search_ads.stg_apple_search_ads__campaign_report_tmp": ["source.apple_search_ads.apple_search_ads.campaign_report"], "model.apple_search_ads.stg_apple_search_ads__campaign_history_tmp": ["source.apple_search_ads.apple_search_ads.campaign_history"], "model.apple_search_ads.stg_apple_search_ads__keyword_history_tmp": ["source.apple_search_ads.apple_search_ads.keyword_history"], "model.apple_search_ads.stg_apple_search_ads__search_term_report_tmp": ["source.apple_search_ads.apple_search_ads.search_term_report"], "model.apple_search_ads.stg_apple_search_ads__keyword_report_tmp": ["source.apple_search_ads.apple_search_ads.keyword_report"], "model.apple_search_ads.stg_apple_search_ads__ad_history_tmp": ["source.apple_search_ads.apple_search_ads.ad_history"], "model.apple_search_ads.stg_apple_search_ads__ad_report_tmp": ["source.apple_search_ads.apple_search_ads.ad_level_report"], "model.apple_search_ads.stg_apple_search_ads__ad_group_report_tmp": ["source.apple_search_ads.apple_search_ads.ad_group_report"], "model.apple_search_ads.stg_apple_search_ads__organization_tmp": ["source.apple_search_ads.apple_search_ads.organization"], "model.reddit_ads.reddit_ads__campaign_report": ["model.reddit_ads.stg_reddit_ads__account", "model.reddit_ads.stg_reddit_ads__campaign", "model.reddit_ads.stg_reddit_ads__campaign_conversions_report", "model.reddit_ads.stg_reddit_ads__campaign_report"], "model.reddit_ads.reddit_ads__campaign_country_report": ["model.reddit_ads.stg_reddit_ads__account", "model.reddit_ads.stg_reddit_ads__campaign", "model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report", "model.reddit_ads.stg_reddit_ads__campaign_country_report"], "model.reddit_ads.reddit_ads__url_report": ["model.reddit_ads.stg_reddit_ads__account", "model.reddit_ads.stg_reddit_ads__ad", "model.reddit_ads.stg_reddit_ads__ad_conversions_report", "model.reddit_ads.stg_reddit_ads__ad_group", "model.reddit_ads.stg_reddit_ads__ad_report", "model.reddit_ads.stg_reddit_ads__campaign"], "model.reddit_ads.reddit_ads__account_report": ["model.reddit_ads.stg_reddit_ads__account", "model.reddit_ads.stg_reddit_ads__account_conversions_report", "model.reddit_ads.stg_reddit_ads__account_report"], "model.reddit_ads.reddit_ads__ad_report": ["model.reddit_ads.stg_reddit_ads__account", "model.reddit_ads.stg_reddit_ads__ad", "model.reddit_ads.stg_reddit_ads__ad_conversions_report", "model.reddit_ads.stg_reddit_ads__ad_group", "model.reddit_ads.stg_reddit_ads__ad_report", "model.reddit_ads.stg_reddit_ads__campaign"], "model.reddit_ads.reddit_ads__ad_group_report": ["model.reddit_ads.stg_reddit_ads__account", "model.reddit_ads.stg_reddit_ads__ad_group", "model.reddit_ads.stg_reddit_ads__ad_group_conversions_report", "model.reddit_ads.stg_reddit_ads__ad_group_report", "model.reddit_ads.stg_reddit_ads__campaign"], "model.reddit_ads.stg_reddit_ads__ad_group": ["model.reddit_ads.stg_reddit_ads__ad_group_tmp"], "model.reddit_ads.stg_reddit_ads__ad_report": ["model.reddit_ads.stg_reddit_ads__ad_report_tmp"], "model.reddit_ads.stg_reddit_ads__ad_conversions_report": ["model.reddit_ads.stg_reddit_ads__ad_conversions_report_tmp"], "model.reddit_ads.stg_reddit_ads__campaign": ["model.reddit_ads.stg_reddit_ads__campaign_tmp"], "model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report": ["model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report_tmp"], "model.reddit_ads.stg_reddit_ads__campaign_report": ["model.reddit_ads.stg_reddit_ads__campaign_report_tmp"], "model.reddit_ads.stg_reddit_ads__ad": ["model.reddit_ads.stg_reddit_ads__ad_tmp"], "model.reddit_ads.stg_reddit_ads__account_conversions_report": ["model.reddit_ads.stg_reddit_ads__account_conversions_report_tmp"], "model.reddit_ads.stg_reddit_ads__account_report": ["model.reddit_ads.stg_reddit_ads__account_report_tmp"], "model.reddit_ads.stg_reddit_ads__campaign_conversions_report": ["model.reddit_ads.stg_reddit_ads__campaign_conversions_report_tmp"], "model.reddit_ads.stg_reddit_ads__ad_group_conversions_report": ["model.reddit_ads.stg_reddit_ads__ad_group_conversions_report_tmp"], "model.reddit_ads.stg_reddit_ads__ad_group_report": ["model.reddit_ads.stg_reddit_ads__ad_group_report_tmp"], "model.reddit_ads.stg_reddit_ads__campaign_country_report": ["model.reddit_ads.stg_reddit_ads__campaign_country_report_tmp"], "model.reddit_ads.stg_reddit_ads__account": ["model.reddit_ads.stg_reddit_ads__account_tmp"], "model.reddit_ads.stg_reddit_ads__ad_conversions_report_tmp": ["source.reddit_ads.reddit_ads.ad_conversions_report"], "model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report_tmp": ["source.reddit_ads.reddit_ads.campaign_country_conversions_report"], "model.reddit_ads.stg_reddit_ads__account_report_tmp": ["source.reddit_ads.reddit_ads.account_report"], "model.reddit_ads.stg_reddit_ads__campaign_report_tmp": ["source.reddit_ads.reddit_ads.campaign_report"], "model.reddit_ads.stg_reddit_ads__ad_group_conversions_report_tmp": ["source.reddit_ads.reddit_ads.ad_group_conversions_report"], "model.reddit_ads.stg_reddit_ads__ad_tmp": ["source.reddit_ads.reddit_ads.ad"], "model.reddit_ads.stg_reddit_ads__campaign_country_report_tmp": ["source.reddit_ads.reddit_ads.campaign_country_report"], "model.reddit_ads.stg_reddit_ads__account_tmp": ["source.reddit_ads.reddit_ads.business_account"], "model.reddit_ads.stg_reddit_ads__campaign_tmp": ["source.reddit_ads.reddit_ads.campaign"], "model.reddit_ads.stg_reddit_ads__ad_group_report_tmp": ["source.reddit_ads.reddit_ads.ad_group_report"], "model.reddit_ads.stg_reddit_ads__account_conversions_report_tmp": ["source.reddit_ads.reddit_ads.account_conversions_report"], "model.reddit_ads.stg_reddit_ads__ad_group_tmp": ["source.reddit_ads.reddit_ads.ad_group"], "model.reddit_ads.stg_reddit_ads__campaign_conversions_report_tmp": ["source.reddit_ads.reddit_ads.campaign_conversions_report"], "model.reddit_ads.stg_reddit_ads__ad_report_tmp": ["source.reddit_ads.reddit_ads.ad_report"], "model.snapchat_ads.snapchat_ads__campaign_report": ["model.snapchat_ads.stg_snapchat_ads__ad_account_history", "model.snapchat_ads.stg_snapchat_ads__campaign_history", "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report"], "model.snapchat_ads.snapchat_ads__url_report": ["model.snapchat_ads.snapchat_ads__creative_history_prep", "model.snapchat_ads.stg_snapchat_ads__ad_account_history", "model.snapchat_ads.stg_snapchat_ads__ad_history", "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report", "model.snapchat_ads.stg_snapchat_ads__ad_squad_history", "model.snapchat_ads.stg_snapchat_ads__campaign_history"], "model.snapchat_ads.snapchat_ads__campaign_country_report": ["model.snapchat_ads.stg_snapchat_ads__ad_account_history", "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report", "model.snapchat_ads.stg_snapchat_ads__campaign_history"], "model.snapchat_ads.snapchat_ads__campaign_region_report": ["model.snapchat_ads.stg_snapchat_ads__ad_account_history", "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report", "model.snapchat_ads.stg_snapchat_ads__campaign_history"], "model.snapchat_ads.snapchat_ads__ad_squad_report": ["model.snapchat_ads.stg_snapchat_ads__ad_account_history", "model.snapchat_ads.stg_snapchat_ads__ad_squad_history", "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report", "model.snapchat_ads.stg_snapchat_ads__campaign_history"], "model.snapchat_ads.snapchat_ads__ad_report": ["model.snapchat_ads.snapchat_ads__creative_history_prep", "model.snapchat_ads.stg_snapchat_ads__ad_account_history", "model.snapchat_ads.stg_snapchat_ads__ad_history", "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report", "model.snapchat_ads.stg_snapchat_ads__ad_squad_history", "model.snapchat_ads.stg_snapchat_ads__campaign_history"], "model.snapchat_ads.snapchat_ads__account_report": ["model.snapchat_ads.stg_snapchat_ads__ad_account_history", "model.snapchat_ads.stg_snapchat_ads__ad_history", "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report", "model.snapchat_ads.stg_snapchat_ads__ad_squad_history", "model.snapchat_ads.stg_snapchat_ads__campaign_history"], "model.snapchat_ads.stg_snapchat_ads__creative_history": ["model.snapchat_ads.stg_snapchat_ads__creative_history_tmp"], "model.snapchat_ads.stg_snapchat_ads__ad_squad_history": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_history_tmp"], "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report": ["model.snapchat_ads.stg_snapchat_ads__ad_hourly_report_tmp"], "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report_tmp"], "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report_tmp"], "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report_tmp"], "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history": ["model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history_tmp"], "model.snapchat_ads.stg_snapchat_ads__ad_account_history": ["model.snapchat_ads.stg_snapchat_ads__ad_account_history_tmp"], "model.snapchat_ads.stg_snapchat_ads__campaign_history": ["model.snapchat_ads.stg_snapchat_ads__campaign_history_tmp"], "model.snapchat_ads.stg_snapchat_ads__ad_history": ["model.snapchat_ads.stg_snapchat_ads__ad_history_tmp"], "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report": ["model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report_tmp"], "model.snapchat_ads.stg_snapchat_ads__ad_squad_history_tmp": ["source.snapchat_ads.snapchat_ads.ad_squad_history"], "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report_tmp": ["source.snapchat_ads.snapchat_ads.campaign_geo_country_daily_report"], "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history_tmp": ["source.snapchat_ads.snapchat_ads.creative_url_tag_history"], "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report_tmp": ["source.snapchat_ads.snapchat_ads.ad_squad_hourly_report"], "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report_tmp": ["source.snapchat_ads.snapchat_ads.campaign_hourly_report"], "model.snapchat_ads.stg_snapchat_ads__campaign_history_tmp": ["source.snapchat_ads.snapchat_ads.campaign_history"], "model.snapchat_ads.stg_snapchat_ads__ad_account_history_tmp": ["source.snapchat_ads.snapchat_ads.ad_account_history"], "model.snapchat_ads.stg_snapchat_ads__ad_history_tmp": ["source.snapchat_ads.snapchat_ads.ad_history"], "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report_tmp": ["source.snapchat_ads.snapchat_ads.campaign_geo_region_daily_report"], "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report_tmp": ["source.snapchat_ads.snapchat_ads.ad_hourly_report"], "model.snapchat_ads.stg_snapchat_ads__creative_history_tmp": ["source.snapchat_ads.snapchat_ads.creative_history"], "model.snapchat_ads.snapchat_ads__creative_history_prep": ["model.snapchat_ads.stg_snapchat_ads__creative_history", "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history"], "model.pinterest.pinterest_ads__campaign_region_report": ["model.pinterest.stg_pinterest_ads__advertiser_history", "model.pinterest.stg_pinterest_ads__campaign_history", "model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report", "model.pinterest.stg_pinterest_ads__targeting_geo", "model.pinterest.stg_pinterest_ads__targeting_geo_region"], "model.pinterest.pinterest_ads__keyword_report": ["model.pinterest.stg_pinterest_ads__ad_group_history", "model.pinterest.stg_pinterest_ads__advertiser_history", "model.pinterest.stg_pinterest_ads__campaign_history", "model.pinterest.stg_pinterest_ads__keyword_history", "model.pinterest.stg_pinterest_ads__keyword_report"], "model.pinterest.pinterest_ads__advertiser_report": ["model.pinterest.stg_pinterest_ads__advertiser_history", "model.pinterest.stg_pinterest_ads__advertiser_report"], "model.pinterest.pinterest_ads__url_report": ["model.pinterest.stg_pinterest_ads__ad_group_history", "model.pinterest.stg_pinterest_ads__advertiser_history", "model.pinterest.stg_pinterest_ads__campaign_history", "model.pinterest.stg_pinterest_ads__pin_promotion_history", "model.pinterest.stg_pinterest_ads__pin_promotion_report"], "model.pinterest.pinterest_ads__campaign_report": ["model.pinterest.stg_pinterest_ads__advertiser_history", "model.pinterest.stg_pinterest_ads__campaign_history", "model.pinterest.stg_pinterest_ads__campaign_report"], "model.pinterest.pinterest_ads__campaign_country_report": ["model.pinterest.stg_pinterest_ads__advertiser_history", "model.pinterest.stg_pinterest_ads__campaign_history", "model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report", "model.pinterest.stg_pinterest_ads__targeting_geo"], "model.pinterest.pinterest_ads__pin_promotion_report": ["model.pinterest.stg_pinterest_ads__ad_group_history", "model.pinterest.stg_pinterest_ads__advertiser_history", "model.pinterest.stg_pinterest_ads__campaign_history", "model.pinterest.stg_pinterest_ads__pin_promotion_history", "model.pinterest.stg_pinterest_ads__pin_promotion_report"], "model.pinterest.pinterest_ads__ad_group_report": ["model.pinterest.stg_pinterest_ads__ad_group_history", "model.pinterest.stg_pinterest_ads__ad_group_report", "model.pinterest.stg_pinterest_ads__advertiser_history", "model.pinterest.stg_pinterest_ads__campaign_history"], "model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report": ["model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report_tmp"], "model.pinterest.stg_pinterest_ads__pin_promotion_report": ["model.pinterest.stg_pinterest_ads__pin_promotion_report_tmp"], "model.pinterest.stg_pinterest_ads__ad_group_history": ["model.pinterest.stg_pinterest_ads__ad_group_history_tmp"], "model.pinterest.stg_pinterest_ads__targeting_geo_region": ["model.pinterest.stg_pinterest_ads__targeting_geo_region_tmp"], "model.pinterest.stg_pinterest_ads__campaign_report": ["model.pinterest.stg_pinterest_ads__campaign_report_tmp"], "model.pinterest.stg_pinterest_ads__advertiser_history": ["model.pinterest.stg_pinterest_ads__advertiser_history_tmp"], "model.pinterest.stg_pinterest_ads__campaign_history": ["model.pinterest.stg_pinterest_ads__campaign_history_tmp"], "model.pinterest.stg_pinterest_ads__keyword_history": ["model.pinterest.stg_pinterest_ads__keyword_history_tmp"], "model.pinterest.stg_pinterest_ads__advertiser_report": ["model.pinterest.stg_pinterest_ads__advertiser_report_tmp"], "model.pinterest.stg_pinterest_ads__pin_promotion_history": ["model.pinterest.stg_pinterest_ads__pin_promotion_history_tmp"], "model.pinterest.stg_pinterest_ads__targeting_geo": ["model.pinterest.stg_pinterest_ads__targeting_geo_tmp"], "model.pinterest.stg_pinterest_ads__keyword_report": ["model.pinterest.stg_pinterest_ads__keyword_report_tmp"], "model.pinterest.stg_pinterest_ads__ad_group_report": ["model.pinterest.stg_pinterest_ads__ad_group_report_tmp"], "model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report_tmp": ["source.pinterest.pinterest_ads.pin_promotion_targeting_report"], "model.pinterest.stg_pinterest_ads__ad_group_report_tmp": ["source.pinterest.pinterest_ads.ad_group_report"], "model.pinterest.stg_pinterest_ads__pin_promotion_history_tmp": ["source.pinterest.pinterest_ads.pin_promotion_history"], "model.pinterest.stg_pinterest_ads__campaign_report_tmp": ["source.pinterest.pinterest_ads.campaign_report"], "model.pinterest.stg_pinterest_ads__advertiser_history_tmp": ["source.pinterest.pinterest_ads.advertiser_history"], "model.pinterest.stg_pinterest_ads__keyword_history_tmp": ["source.pinterest.pinterest_ads.keyword_history"], "model.pinterest.stg_pinterest_ads__pin_promotion_report_tmp": ["source.pinterest.pinterest_ads.pin_promotion_report"], "model.pinterest.stg_pinterest_ads__advertiser_report_tmp": ["source.pinterest.pinterest_ads.advertiser_report"], "model.pinterest.stg_pinterest_ads__ad_group_history_tmp": ["source.pinterest.pinterest_ads.ad_group_history"], "model.pinterest.stg_pinterest_ads__targeting_geo_region_tmp": ["source.pinterest.pinterest_ads.targeting_geo_region"], "model.pinterest.stg_pinterest_ads__campaign_history_tmp": ["source.pinterest.pinterest_ads.campaign_history"], "model.pinterest.stg_pinterest_ads__targeting_geo_tmp": ["source.pinterest.pinterest_ads.targeting_geo"], "model.pinterest.stg_pinterest_ads__keyword_report_tmp": ["source.pinterest.pinterest_ads.keyword_report"], "model.google_ads.google_ads__search_term_report": ["model.google_ads.int_google_ads__campaigns_accounts", "model.google_ads.stg_google_ads__ad_group_history", "model.google_ads.stg_google_ads__search_term_keyword_stats"], "model.google_ads.google_ads__ad_report": ["model.google_ads.int_google_ads__campaigns_accounts", "model.google_ads.stg_google_ads__ad_group_history", "model.google_ads.stg_google_ads__ad_history", "model.google_ads.stg_google_ads__ad_stats"], "model.google_ads.google_ads__ad_group_report": ["model.google_ads.int_google_ads__campaigns_accounts", "model.google_ads.stg_google_ads__ad_group_history", "model.google_ads.stg_google_ads__ad_group_stats"], "model.google_ads.google_ads__account_report": ["model.google_ads.stg_google_ads__account_history", "model.google_ads.stg_google_ads__account_stats"], "model.google_ads.google_ads__campaign_bid_modifiers_report": ["model.google_ads.int_google_ads__campaigns_accounts", "model.google_ads.stg_google_ads__campaign_bid_modifier_history", "model.google_ads.stg_google_ads__campaign_bidding_strategy_history", "model.google_ads.stg_google_ads__campaign_criterion_history", "model.google_ads.stg_google_ads__campaign_stats"], "model.google_ads.google_ads__campaign_budget_diagnostics_report": ["model.google_ads.google_ads__campaign_report", "model.google_ads.stg_google_ads__campaign_bidding_strategy_history", "model.google_ads.stg_google_ads__campaign_budget_history", "model.google_ads.stg_google_ads__campaign_criterion_history"], "model.google_ads.google_ads__url_report": ["model.google_ads.int_google_ads__campaigns_accounts", "model.google_ads.stg_google_ads__ad_group_history", "model.google_ads.stg_google_ads__ad_history", "model.google_ads.stg_google_ads__ad_stats"], "model.google_ads.google_ads__campaign_report": ["model.google_ads.int_google_ads__campaigns_accounts", "model.google_ads.stg_google_ads__campaign_stats"], "model.google_ads.google_ads__keyword_report": ["model.google_ads.int_google_ads__campaigns_accounts", "model.google_ads.stg_google_ads__ad_group_criterion_history", "model.google_ads.stg_google_ads__ad_group_history", "model.google_ads.stg_google_ads__keyword_stats"], "model.google_ads.stg_google_ads__account_stats": ["model.google_ads.stg_google_ads__account_stats_tmp"], "model.google_ads.stg_google_ads__ad_group_stats": ["model.google_ads.stg_google_ads__ad_group_stats_tmp"], "model.google_ads.stg_google_ads__account_history": ["model.google_ads.stg_google_ads__account_history_tmp"], "model.google_ads.stg_google_ads__ad_group_history": ["model.google_ads.stg_google_ads__ad_group_history_tmp"], "model.google_ads.stg_google_ads__campaign_stats": ["model.google_ads.stg_google_ads__campaign_stats_tmp"], "model.google_ads.stg_google_ads__campaign_budget_history": ["model.google_ads.stg_google_ads__campaign_budget_history_tmp"], "model.google_ads.stg_google_ads__campaign_bid_modifier_history": ["model.google_ads.stg_google_ads__campaign_bid_modifier_history_tmp"], "model.google_ads.stg_google_ads__keyword_stats": ["model.google_ads.stg_google_ads__keyword_stats_tmp"], "model.google_ads.stg_google_ads__ad_stats": ["model.google_ads.stg_google_ads__ad_stats_tmp"], "model.google_ads.stg_google_ads__ad_history": ["model.google_ads.stg_google_ads__ad_history_tmp"], "model.google_ads.stg_google_ads__ad_group_criterion_history": ["model.google_ads.stg_google_ads__ad_group_criterion_history_tmp"], "model.google_ads.stg_google_ads__search_term_keyword_stats": ["model.google_ads.stg_google_ads__search_term_keyword_stats_tmp"], "model.google_ads.stg_google_ads__campaign_bidding_strategy_history": ["model.google_ads.stg_google_ads__campaign_bidding_strategy_history_tmp"], "model.google_ads.stg_google_ads__campaign_criterion_history": ["model.google_ads.stg_google_ads__campaign_criterion_history_tmp"], "model.google_ads.stg_google_ads__campaign_history": ["model.google_ads.stg_google_ads__campaign_history_tmp"], "model.google_ads.stg_google_ads__ad_group_criterion_history_tmp": ["source.google_ads.google_ads.ad_group_criterion_history"], "model.google_ads.stg_google_ads__campaign_budget_history_tmp": ["source.google_ads.google_ads.campaign_budget_history"], "model.google_ads.stg_google_ads__campaign_stats_tmp": ["source.google_ads.google_ads.campaign_stats"], "model.google_ads.stg_google_ads__campaign_history_tmp": ["source.google_ads.google_ads.campaign_history"], "model.google_ads.stg_google_ads__account_stats_tmp": ["source.google_ads.google_ads.account_stats"], "model.google_ads.stg_google_ads__campaign_bid_modifier_history_tmp": ["source.google_ads.google_ads.campaign_bid_modifier_history"], "model.google_ads.stg_google_ads__search_term_keyword_stats_tmp": ["source.google_ads.google_ads.search_term_keyword_stats"], "model.google_ads.stg_google_ads__ad_group_stats_tmp": ["source.google_ads.google_ads.ad_group_stats"], "model.google_ads.stg_google_ads__campaign_criterion_history_tmp": ["source.google_ads.google_ads.campaign_criterion_history"], "model.google_ads.stg_google_ads__keyword_stats_tmp": ["source.google_ads.google_ads.keyword_stats"], "model.google_ads.stg_google_ads__ad_history_tmp": ["source.google_ads.google_ads.ad_history"], "model.google_ads.stg_google_ads__campaign_bidding_strategy_history_tmp": ["source.google_ads.google_ads.campaign_bidding_strategy_history"], "model.google_ads.stg_google_ads__account_history_tmp": ["source.google_ads.google_ads.account_history"], "model.google_ads.stg_google_ads__ad_group_history_tmp": ["source.google_ads.google_ads.ad_group_history"], "model.google_ads.stg_google_ads__ad_stats_tmp": ["source.google_ads.google_ads.ad_stats"], "model.google_ads.int_google_ads__campaigns_accounts": ["model.google_ads.stg_google_ads__account_history", "model.google_ads.stg_google_ads__campaign_history"], "model.amazon_ads.amazon_ads__search_report": ["model.amazon_ads.int_amazon_ads__portfolio_history", "model.amazon_ads.stg_amazon_ads__ad_group_history", "model.amazon_ads.stg_amazon_ads__campaign_history", "model.amazon_ads.stg_amazon_ads__keyword_history", "model.amazon_ads.stg_amazon_ads__profile", "model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report"], "model.amazon_ads.amazon_ads__campaign_report": ["model.amazon_ads.int_amazon_ads__portfolio_history", "model.amazon_ads.stg_amazon_ads__campaign_history", "model.amazon_ads.stg_amazon_ads__campaign_level_report", "model.amazon_ads.stg_amazon_ads__profile"], "model.amazon_ads.amazon_ads__account_report": ["model.amazon_ads.stg_amazon_ads__campaign_history", "model.amazon_ads.stg_amazon_ads__campaign_level_report", "model.amazon_ads.stg_amazon_ads__profile"], "model.amazon_ads.amazon_ads__portfolio_report": ["model.amazon_ads.stg_amazon_ads__campaign_history", "model.amazon_ads.stg_amazon_ads__campaign_level_report", "model.amazon_ads.stg_amazon_ads__portfolio_history", "model.amazon_ads.stg_amazon_ads__profile"], "model.amazon_ads.amazon_ads__keyword_report": ["model.amazon_ads.int_amazon_ads__portfolio_history", "model.amazon_ads.stg_amazon_ads__ad_group_history", "model.amazon_ads.stg_amazon_ads__campaign_history", "model.amazon_ads.stg_amazon_ads__keyword_history", "model.amazon_ads.stg_amazon_ads__profile", "model.amazon_ads.stg_amazon_ads__targeting_keyword_report"], "model.amazon_ads.amazon_ads__ad_report": ["model.amazon_ads.int_amazon_ads__portfolio_history", "model.amazon_ads.stg_amazon_ads__ad_group_history", "model.amazon_ads.stg_amazon_ads__advertised_product_report", "model.amazon_ads.stg_amazon_ads__campaign_history", "model.amazon_ads.stg_amazon_ads__product_ad_history", "model.amazon_ads.stg_amazon_ads__profile"], "model.amazon_ads.amazon_ads__ad_group_report": ["model.amazon_ads.int_amazon_ads__portfolio_history", "model.amazon_ads.stg_amazon_ads__ad_group_history", "model.amazon_ads.stg_amazon_ads__ad_group_level_report", "model.amazon_ads.stg_amazon_ads__campaign_history", "model.amazon_ads.stg_amazon_ads__profile"], "model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report": ["model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report_tmp"], "model.amazon_ads.stg_amazon_ads__ad_group_history": ["model.amazon_ads.stg_amazon_ads__ad_group_history_tmp"], "model.amazon_ads.stg_amazon_ads__portfolio_history": ["model.amazon_ads.stg_amazon_ads__portfolio_history_tmp"], "model.amazon_ads.stg_amazon_ads__campaign_history": ["model.amazon_ads.stg_amazon_ads__campaign_history_tmp"], "model.amazon_ads.stg_amazon_ads__ad_group_level_report": ["model.amazon_ads.stg_amazon_ads__ad_group_level_report_tmp"], "model.amazon_ads.stg_amazon_ads__targeting_keyword_report": ["model.amazon_ads.stg_amazon_ads__targeting_keyword_report_tmp"], "model.amazon_ads.stg_amazon_ads__advertised_product_report": ["model.amazon_ads.stg_amazon_ads__advertised_product_report_tmp"], "model.amazon_ads.stg_amazon_ads__keyword_history": ["model.amazon_ads.stg_amazon_ads__keyword_history_tmp"], "model.amazon_ads.stg_amazon_ads__campaign_level_report": ["model.amazon_ads.stg_amazon_ads__campaign_level_report_tmp"], "model.amazon_ads.stg_amazon_ads__profile": ["model.amazon_ads.stg_amazon_ads__profile_tmp"], "model.amazon_ads.stg_amazon_ads__product_ad_history": ["model.amazon_ads.stg_amazon_ads__product_ad_history_tmp"], "model.amazon_ads.stg_amazon_ads__keyword_history_tmp": ["source.amazon_ads.amazon_ads.keyword_history"], "model.amazon_ads.stg_amazon_ads__campaign_history_tmp": ["source.amazon_ads.amazon_ads.campaign_history"], "model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report_tmp": ["source.amazon_ads.amazon_ads.search_term_ad_keyword_report"], "model.amazon_ads.stg_amazon_ads__campaign_level_report_tmp": ["source.amazon_ads.amazon_ads.campaign_level_report"], "model.amazon_ads.stg_amazon_ads__profile_tmp": ["source.amazon_ads.amazon_ads.profile"], "model.amazon_ads.stg_amazon_ads__ad_group_history_tmp": ["source.amazon_ads.amazon_ads.ad_group_history"], "model.amazon_ads.stg_amazon_ads__targeting_keyword_report_tmp": ["source.amazon_ads.amazon_ads.targeting_keyword_report"], "model.amazon_ads.stg_amazon_ads__advertised_product_report_tmp": ["source.amazon_ads.amazon_ads.advertised_product_report"], "model.amazon_ads.stg_amazon_ads__ad_group_level_report_tmp": ["source.amazon_ads.amazon_ads.ad_group_level_report"], "model.amazon_ads.stg_amazon_ads__portfolio_history_tmp": ["source.amazon_ads.amazon_ads.portfolio_history"], "model.amazon_ads.stg_amazon_ads__product_ad_history_tmp": ["source.amazon_ads.amazon_ads.product_ad_history"], "model.amazon_ads.int_amazon_ads__portfolio_history": ["model.amazon_ads.stg_amazon_ads__portfolio_history"], "model.twitter_ads.twitter_ads__promoted_tweet_report": ["model.twitter_ads.stg_twitter_ads__account_history", "model.twitter_ads.stg_twitter_ads__campaign_history", "model.twitter_ads.stg_twitter_ads__line_item_history", "model.twitter_ads.stg_twitter_ads__promoted_tweet_history", "model.twitter_ads.stg_twitter_ads__promoted_tweet_report", "model.twitter_ads.stg_twitter_ads__tweet"], "model.twitter_ads.twitter_ads__campaign_region_report": ["model.twitter_ads.stg_twitter_ads__account_history", "model.twitter_ads.stg_twitter_ads__campaign_history", "model.twitter_ads.stg_twitter_ads__campaign_regions_report"], "model.twitter_ads.twitter_ads__account_report": ["model.twitter_ads.stg_twitter_ads__account_history", "model.twitter_ads.stg_twitter_ads__promoted_tweet_report"], "model.twitter_ads.twitter_ads__campaign_country_report": ["model.twitter_ads.stg_twitter_ads__account_history", "model.twitter_ads.stg_twitter_ads__campaign_history", "model.twitter_ads.stg_twitter_ads__campaign_locations_report"], "model.twitter_ads.twitter_ads__url_report": ["model.twitter_ads.stg_twitter_ads__account_history", "model.twitter_ads.stg_twitter_ads__campaign_history", "model.twitter_ads.stg_twitter_ads__line_item_history", "model.twitter_ads.stg_twitter_ads__promoted_tweet_history", "model.twitter_ads.stg_twitter_ads__promoted_tweet_report", "model.twitter_ads.stg_twitter_ads__tweet", "model.twitter_ads.stg_twitter_ads__tweet_url"], "model.twitter_ads.twitter_ads__line_item_report": ["model.twitter_ads.stg_twitter_ads__account_history", "model.twitter_ads.stg_twitter_ads__campaign_history", "model.twitter_ads.stg_twitter_ads__line_item_history", "model.twitter_ads.stg_twitter_ads__line_item_report"], "model.twitter_ads.twitter_ads__keyword_report": ["model.twitter_ads.stg_twitter_ads__account_history", "model.twitter_ads.stg_twitter_ads__campaign_history", "model.twitter_ads.stg_twitter_ads__line_item_history", "model.twitter_ads.stg_twitter_ads__line_item_keywords_report"], "model.twitter_ads.twitter_ads__campaign_report": ["model.twitter_ads.stg_twitter_ads__account_history", "model.twitter_ads.stg_twitter_ads__campaign_history", "model.twitter_ads.stg_twitter_ads__campaign_report"], "model.twitter_ads.stg_twitter_ads__tweet": ["model.twitter_ads.stg_twitter_ads__tweet_tmp"], "model.twitter_ads.stg_twitter_ads__campaign_locations_report": ["model.twitter_ads.stg_twitter_ads__campaign_locations_report_tmp"], "model.twitter_ads.stg_twitter_ads__campaign_history": ["model.twitter_ads.stg_twitter_ads__campaign_history_tmp"], "model.twitter_ads.stg_twitter_ads__promoted_tweet_history": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_history_tmp"], "model.twitter_ads.stg_twitter_ads__tweet_url": ["model.twitter_ads.stg_twitter_ads__tweet_url_tmp"], "model.twitter_ads.stg_twitter_ads__campaign_regions_report": ["model.twitter_ads.stg_twitter_ads__campaign_regions_report_tmp"], "model.twitter_ads.stg_twitter_ads__line_item_keywords_report": ["model.twitter_ads.stg_twitter_ads__line_item_keywords_report_tmp"], "model.twitter_ads.stg_twitter_ads__line_item_report": ["model.twitter_ads.stg_twitter_ads__line_item_report_tmp"], "model.twitter_ads.stg_twitter_ads__line_item_history": ["model.twitter_ads.stg_twitter_ads__line_item_history_tmp"], "model.twitter_ads.stg_twitter_ads__account_history": ["model.twitter_ads.stg_twitter_ads__account_history_tmp"], "model.twitter_ads.stg_twitter_ads__promoted_tweet_report": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_report_tmp"], "model.twitter_ads.stg_twitter_ads__campaign_report": ["model.twitter_ads.stg_twitter_ads__campaign_report_tmp"], "model.twitter_ads.stg_twitter_ads__campaign_report_tmp": ["source.twitter_ads.twitter_ads.campaign_report"], "model.twitter_ads.stg_twitter_ads__campaign_regions_report_tmp": ["source.twitter_ads.twitter_ads.campaign_regions_report"], "model.twitter_ads.stg_twitter_ads__campaign_history_tmp": ["source.twitter_ads.twitter_ads.campaign_history"], "model.twitter_ads.stg_twitter_ads__line_item_history_tmp": ["source.twitter_ads.twitter_ads.line_item_history"], "model.twitter_ads.stg_twitter_ads__promoted_tweet_report_tmp": ["source.twitter_ads.twitter_ads.promoted_tweet_report"], "model.twitter_ads.stg_twitter_ads__campaign_locations_report_tmp": ["source.twitter_ads.twitter_ads.campaign_locations_report"], "model.twitter_ads.stg_twitter_ads__line_item_report_tmp": ["source.twitter_ads.twitter_ads.line_item_report"], "model.twitter_ads.stg_twitter_ads__account_history_tmp": ["source.twitter_ads.twitter_ads.account_history"], "model.twitter_ads.stg_twitter_ads__promoted_tweet_history_tmp": ["source.twitter_ads.twitter_ads.promoted_tweet_history"], "model.twitter_ads.stg_twitter_ads__line_item_keywords_report_tmp": ["source.twitter_ads.twitter_ads.line_item_keywords_report"], "model.twitter_ads.stg_twitter_ads__tweet_url_tmp": ["source.twitter_ads.twitter_ads.tweet_url"], "model.twitter_ads.stg_twitter_ads__tweet_tmp": ["source.twitter_ads.twitter_ads.tweet"], "model.ad_reporting.ad_reporting__keyword_report": ["model.ad_reporting.int_ad_reporting__keyword_report"], "model.ad_reporting.ad_reporting__campaign_report": ["model.ad_reporting.int_ad_reporting__campaign_report"], "model.ad_reporting.ad_reporting__monthly_campaign_country_report": ["model.ad_reporting.int_ad_reporting__country_mapping", "model.ad_reporting.int_ad_reporting__monthly_campaign_country_report"], "model.ad_reporting.ad_reporting__monthly_campaign_region_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_region_report"], "model.ad_reporting.ad_reporting__url_report": ["model.ad_reporting.int_ad_reporting__url_report"], "model.ad_reporting.ad_reporting__ad_report": ["model.ad_reporting.int_ad_reporting__ad_report"], "model.ad_reporting.ad_reporting__account_report": ["model.ad_reporting.int_ad_reporting__account_report"], "model.ad_reporting.ad_reporting__ad_group_report": ["model.ad_reporting.int_ad_reporting__ad_group_report"], "model.ad_reporting.ad_reporting__search_report": ["model.ad_reporting.int_ad_reporting__search_report"], "model.ad_reporting.int_ad_reporting__url_report": ["model.facebook_ads.facebook_ads__url_report", "model.google_ads.google_ads__url_report", "model.linkedin.linkedin_ads__url_report", "model.microsoft_ads.microsoft_ads__url_report", "model.pinterest.pinterest_ads__url_report", "model.reddit_ads.reddit_ads__url_report", "model.snapchat_ads.snapchat_ads__url_report", "model.tiktok_ads.tiktok_ads__url_report", "model.twitter_ads.twitter_ads__url_report"], "model.ad_reporting.int_ad_reporting__campaign_report": ["model.amazon_ads.amazon_ads__campaign_report", "model.apple_search_ads.apple_search_ads__campaign_report", "model.facebook_ads.facebook_ads__campaign_report", "model.google_ads.google_ads__campaign_report", "model.linkedin.linkedin_ads__campaign_group_report", "model.microsoft_ads.microsoft_ads__campaign_report", "model.pinterest.pinterest_ads__campaign_report", "model.reddit_ads.reddit_ads__campaign_report", "model.snapchat_ads.snapchat_ads__campaign_report", "model.tiktok_ads.tiktok_ads__campaign_report", "model.twitter_ads.twitter_ads__campaign_report"], "model.ad_reporting.int_ad_reporting__monthly_campaign_country_report": ["model.facebook_ads.facebook_ads__country_report", "model.linkedin.linkedin_ads__monthly_campaign_country_report", "model.microsoft_ads.microsoft_ads__campaign_country_report", "model.pinterest.pinterest_ads__campaign_country_report", "model.reddit_ads.reddit_ads__campaign_country_report", "model.snapchat_ads.snapchat_ads__campaign_country_report", "model.tiktok_ads.tiktok_ads__campaign_country_report", "model.twitter_ads.twitter_ads__campaign_country_report"], "model.ad_reporting.int_ad_reporting__ad_report": ["model.amazon_ads.amazon_ads__ad_report", "model.apple_search_ads.apple_search_ads__ad_report", "model.facebook_ads.facebook_ads__ad_report", "model.google_ads.google_ads__ad_report", "model.linkedin.linkedin_ads__creative_report", "model.microsoft_ads.microsoft_ads__ad_report", "model.pinterest.pinterest_ads__pin_promotion_report", "model.reddit_ads.reddit_ads__ad_report", "model.snapchat_ads.snapchat_ads__ad_report", "model.tiktok_ads.tiktok_ads__ad_report", "model.twitter_ads.twitter_ads__promoted_tweet_report"], "model.ad_reporting.int_ad_reporting__search_report": ["model.amazon_ads.amazon_ads__search_report", "model.apple_search_ads.apple_search_ads__search_term_report", "model.google_ads.google_ads__search_term_report", "model.microsoft_ads.microsoft_ads__search_report"], "model.ad_reporting.int_ad_reporting__keyword_report": ["model.amazon_ads.amazon_ads__keyword_report", "model.apple_search_ads.apple_search_ads__keyword_report", "model.google_ads.google_ads__keyword_report", "model.microsoft_ads.microsoft_ads__keyword_report", "model.pinterest.pinterest_ads__keyword_report", "model.twitter_ads.twitter_ads__keyword_report"], "model.ad_reporting.int_ad_reporting__ad_group_report": ["model.amazon_ads.amazon_ads__ad_group_report", "model.apple_search_ads.apple_search_ads__ad_group_report", "model.facebook_ads.facebook_ads__ad_set_report", "model.google_ads.google_ads__ad_group_report", "model.linkedin.linkedin_ads__campaign_report", "model.microsoft_ads.microsoft_ads__ad_group_report", "model.pinterest.pinterest_ads__ad_group_report", "model.reddit_ads.reddit_ads__ad_group_report", "model.snapchat_ads.snapchat_ads__ad_squad_report", "model.tiktok_ads.tiktok_ads__ad_group_report", "model.twitter_ads.twitter_ads__line_item_report"], "model.ad_reporting.int_ad_reporting__account_report": ["model.amazon_ads.amazon_ads__account_report", "model.apple_search_ads.apple_search_ads__organization_report", "model.facebook_ads.facebook_ads__account_report", "model.google_ads.google_ads__account_report", "model.linkedin.linkedin_ads__account_report", "model.microsoft_ads.microsoft_ads__account_report", "model.pinterest.pinterest_ads__advertiser_report", "model.reddit_ads.reddit_ads__account_report", "model.snapchat_ads.snapchat_ads__account_report", "model.tiktok_ads.tiktok_ads__advertiser_report", "model.twitter_ads.twitter_ads__account_report"], "model.ad_reporting.int_ad_reporting__monthly_campaign_region_report": ["model.facebook_ads.facebook_ads__region_report", "model.linkedin.linkedin_ads__monthly_campaign_region_report", "model.microsoft_ads.microsoft_ads__campaign_region_report", "model.pinterest.pinterest_ads__campaign_region_report", "model.snapchat_ads.snapchat_ads__campaign_region_report", "model.twitter_ads.twitter_ads__campaign_region_report"], "model.ad_reporting.int_ad_reporting__country_mapping": [], "model.ad_reporting.metricflow_time_spine": [], "model.tiktok_ads.tiktok_ads__url_report": ["model.tiktok_ads.stg_tiktok_ads__ad_group_history", "model.tiktok_ads.stg_tiktok_ads__ad_history", "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly", "model.tiktok_ads.stg_tiktok_ads__advertiser", "model.tiktok_ads.stg_tiktok_ads__campaign_history"], "model.tiktok_ads.tiktok_ads__advertiser_report": ["model.tiktok_ads.stg_tiktok_ads__ad_history", "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly", "model.tiktok_ads.stg_tiktok_ads__advertiser"], "model.tiktok_ads.tiktok_ads__ad_report": ["model.tiktok_ads.stg_tiktok_ads__ad_group_history", "model.tiktok_ads.stg_tiktok_ads__ad_history", "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly", "model.tiktok_ads.stg_tiktok_ads__advertiser", "model.tiktok_ads.stg_tiktok_ads__campaign_history"], "model.tiktok_ads.tiktok_ads__ad_group_report": ["model.tiktok_ads.stg_tiktok_ads__ad_group_history", "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly", "model.tiktok_ads.stg_tiktok_ads__advertiser", "model.tiktok_ads.stg_tiktok_ads__campaign_history"], "model.tiktok_ads.tiktok_ads__campaign_country_report": ["model.tiktok_ads.stg_tiktok_ads__advertiser", "model.tiktok_ads.stg_tiktok_ads__campaign_country_report", "model.tiktok_ads.stg_tiktok_ads__campaign_history", "model.tiktok_ads.stg_tiktok_ads__location"], "model.tiktok_ads.tiktok_ads__campaign_report": ["model.tiktok_ads.stg_tiktok_ads__advertiser", "model.tiktok_ads.stg_tiktok_ads__campaign_history", "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly"], "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly": ["model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly_tmp"], "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly": ["model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly_tmp"], "model.tiktok_ads.stg_tiktok_ads__campaign_history": ["model.tiktok_ads.stg_tiktok_ads__campaign_history_tmp"], "model.tiktok_ads.stg_tiktok_ads__ad_group_history": ["model.tiktok_ads.stg_tiktok_ads__ad_group_history_tmp"], "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly": ["model.tiktok_ads.stg_tiktok_ads__ad_report_hourly_tmp"], "model.tiktok_ads.stg_tiktok_ads__location": ["model.tiktok_ads.stg_tiktok_ads__location_tmp"], "model.tiktok_ads.stg_tiktok_ads__ad_history": ["model.tiktok_ads.stg_tiktok_ads__ad_history_tmp"], "model.tiktok_ads.stg_tiktok_ads__advertiser": ["model.tiktok_ads.stg_tiktok_ads__advertiser_tmp"], "model.tiktok_ads.stg_tiktok_ads__campaign_country_report": ["model.tiktok_ads.stg_tiktok_ads__campaign_country_report_tmp"], "model.tiktok_ads.stg_tiktok_ads__campaign_country_report_tmp": ["source.tiktok_ads.tiktok_ads.campaign_country_report"], "model.tiktok_ads.stg_tiktok_ads__ad_history_tmp": ["source.tiktok_ads.tiktok_ads.ad_history"], "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly_tmp": ["source.tiktok_ads.tiktok_ads.ad_report_hourly"], "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly_tmp": ["source.tiktok_ads.tiktok_ads.campaign_report_hourly"], "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly_tmp": ["source.tiktok_ads.tiktok_ads.adgroup_report_hourly"], "model.tiktok_ads.stg_tiktok_ads__ad_group_history_tmp": ["source.tiktok_ads.tiktok_ads.adgroup_history"], "model.tiktok_ads.stg_tiktok_ads__campaign_history_tmp": ["source.tiktok_ads.tiktok_ads.campaign_history"], "model.tiktok_ads.stg_tiktok_ads__advertiser_tmp": ["source.tiktok_ads.tiktok_ads.advertiser"], "model.tiktok_ads.stg_tiktok_ads__location_tmp": ["source.tiktok_ads.tiktok_ads.location"], "model.microsoft_ads.microsoft_ads__keyword_report": ["model.microsoft_ads.stg_microsoft_ads__account_history", "model.microsoft_ads.stg_microsoft_ads__ad_group_history", "model.microsoft_ads.stg_microsoft_ads__ad_history", "model.microsoft_ads.stg_microsoft_ads__campaign_history", "model.microsoft_ads.stg_microsoft_ads__keyword_daily_report", "model.microsoft_ads.stg_microsoft_ads__keyword_history"], "model.microsoft_ads.microsoft_ads__url_report": ["model.microsoft_ads.stg_microsoft_ads__account_history", "model.microsoft_ads.stg_microsoft_ads__ad_daily_report", "model.microsoft_ads.stg_microsoft_ads__ad_group_history", "model.microsoft_ads.stg_microsoft_ads__ad_history", "model.microsoft_ads.stg_microsoft_ads__campaign_history"], "model.microsoft_ads.microsoft_ads__account_report": ["model.microsoft_ads.stg_microsoft_ads__account_daily_report", "model.microsoft_ads.stg_microsoft_ads__account_history"], "model.microsoft_ads.microsoft_ads__campaign_country_report": ["model.microsoft_ads.stg_microsoft_ads__account_history", "model.microsoft_ads.stg_microsoft_ads__campaign_history", "model.microsoft_ads.stg_microsoft_ads__geographic_daily_report"], "model.microsoft_ads.microsoft_ads__campaign_region_report": ["model.microsoft_ads.stg_microsoft_ads__account_history", "model.microsoft_ads.stg_microsoft_ads__campaign_history", "model.microsoft_ads.stg_microsoft_ads__geographic_daily_report"], "model.microsoft_ads.microsoft_ads__ad_group_report": ["model.microsoft_ads.stg_microsoft_ads__account_history", "model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report", "model.microsoft_ads.stg_microsoft_ads__ad_group_history", "model.microsoft_ads.stg_microsoft_ads__campaign_history"], "model.microsoft_ads.microsoft_ads__ad_report": ["model.microsoft_ads.stg_microsoft_ads__account_history", "model.microsoft_ads.stg_microsoft_ads__ad_daily_report", "model.microsoft_ads.stg_microsoft_ads__ad_group_history", "model.microsoft_ads.stg_microsoft_ads__ad_history", "model.microsoft_ads.stg_microsoft_ads__campaign_history"], "model.microsoft_ads.microsoft_ads__search_report": ["model.microsoft_ads.stg_microsoft_ads__account_history", "model.microsoft_ads.stg_microsoft_ads__ad_group_history", "model.microsoft_ads.stg_microsoft_ads__ad_history", "model.microsoft_ads.stg_microsoft_ads__campaign_history", "model.microsoft_ads.stg_microsoft_ads__keyword_history", "model.microsoft_ads.stg_microsoft_ads__search_daily_report"], "model.microsoft_ads.microsoft_ads__campaign_report": ["model.microsoft_ads.stg_microsoft_ads__account_history", "model.microsoft_ads.stg_microsoft_ads__campaign_daily_report", "model.microsoft_ads.stg_microsoft_ads__campaign_history"], "model.microsoft_ads.stg_microsoft_ads__account_history": ["model.microsoft_ads.stg_microsoft_ads__account_history_tmp"], "model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report": ["model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report_tmp"], "model.microsoft_ads.stg_microsoft_ads__campaign_history": ["model.microsoft_ads.stg_microsoft_ads__campaign_history_tmp"], "model.microsoft_ads.stg_microsoft_ads__campaign_daily_report": ["model.microsoft_ads.stg_microsoft_ads__campaign_daily_report_tmp"], "model.microsoft_ads.stg_microsoft_ads__ad_history": ["model.microsoft_ads.stg_microsoft_ads__ad_history_tmp"], "model.microsoft_ads.stg_microsoft_ads__geographic_daily_report": ["model.microsoft_ads.stg_microsoft_ads__geographic_daily_report_tmp"], "model.microsoft_ads.stg_microsoft_ads__ad_group_history": ["model.microsoft_ads.stg_microsoft_ads__ad_group_history_tmp"], "model.microsoft_ads.stg_microsoft_ads__keyword_history": ["model.microsoft_ads.stg_microsoft_ads__keyword_history_tmp"], "model.microsoft_ads.stg_microsoft_ads__search_daily_report": ["model.microsoft_ads.stg_microsoft_ads__search_daily_report_tmp"], "model.microsoft_ads.stg_microsoft_ads__account_daily_report": ["model.microsoft_ads.stg_microsoft_ads__account_daily_report_tmp"], "model.microsoft_ads.stg_microsoft_ads__keyword_daily_report": ["model.microsoft_ads.stg_microsoft_ads__keyword_daily_report_tmp"], "model.microsoft_ads.stg_microsoft_ads__ad_daily_report": ["model.microsoft_ads.stg_microsoft_ads__ad_daily_report_tmp"], "model.microsoft_ads.stg_microsoft_ads__campaign_daily_report_tmp": ["source.microsoft_ads.microsoft_ads.campaign_performance_daily_report"], "model.microsoft_ads.stg_microsoft_ads__ad_group_history_tmp": ["source.microsoft_ads.microsoft_ads.ad_group_history"], "model.microsoft_ads.stg_microsoft_ads__account_daily_report_tmp": ["source.microsoft_ads.microsoft_ads.account_performance_daily_report"], "model.microsoft_ads.stg_microsoft_ads__search_daily_report_tmp": ["source.microsoft_ads.microsoft_ads.search_query_performance_daily_report"], "model.microsoft_ads.stg_microsoft_ads__account_history_tmp": ["source.microsoft_ads.microsoft_ads.account_history"], "model.microsoft_ads.stg_microsoft_ads__ad_history_tmp": ["source.microsoft_ads.microsoft_ads.ad_history"], "model.microsoft_ads.stg_microsoft_ads__geographic_daily_report_tmp": ["source.microsoft_ads.microsoft_ads.geographic_performance_daily_report"], "model.microsoft_ads.stg_microsoft_ads__keyword_history_tmp": ["source.microsoft_ads.microsoft_ads.keyword_history"], "model.microsoft_ads.stg_microsoft_ads__keyword_daily_report_tmp": ["source.microsoft_ads.microsoft_ads.keyword_performance_daily_report"], "model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report_tmp": ["source.microsoft_ads.microsoft_ads.ad_group_performance_daily_report"], "model.microsoft_ads.stg_microsoft_ads__campaign_history_tmp": ["source.microsoft_ads.microsoft_ads.campaign_history"], "model.microsoft_ads.stg_microsoft_ads__ad_daily_report_tmp": ["source.microsoft_ads.microsoft_ads.ad_performance_daily_report"], "model.facebook_ads.facebook_ads__region_report": ["model.facebook_ads.stg_facebook_ads__account_history", "model.facebook_ads.stg_facebook_ads__demographics_region", "model.facebook_ads.stg_facebook_ads__demographics_region_actions"], "model.facebook_ads.facebook_ads__country_report": ["model.facebook_ads.stg_facebook_ads__account_history", "model.facebook_ads.stg_facebook_ads__demographics_country", "model.facebook_ads.stg_facebook_ads__demographics_country_actions"], "model.facebook_ads.facebook_ads__url_tags": ["model.facebook_ads.stg_facebook_ads__creative_history"], "model.facebook_ads.facebook_ads__ad_report": ["model.facebook_ads.int_facebook_ads__conversions", "model.facebook_ads.stg_facebook_ads__account_history", "model.facebook_ads.stg_facebook_ads__ad_history", "model.facebook_ads.stg_facebook_ads__ad_set_history", "model.facebook_ads.stg_facebook_ads__basic_ad", "model.facebook_ads.stg_facebook_ads__campaign_history"], "model.facebook_ads.facebook_ads__account_report": ["model.facebook_ads.int_facebook_ads__conversions", "model.facebook_ads.stg_facebook_ads__account_history", "model.facebook_ads.stg_facebook_ads__basic_ad"], "model.facebook_ads.facebook_ads__campaign_report": ["model.facebook_ads.int_facebook_ads__conversions", "model.facebook_ads.stg_facebook_ads__account_history", "model.facebook_ads.stg_facebook_ads__ad_history", "model.facebook_ads.stg_facebook_ads__basic_ad", "model.facebook_ads.stg_facebook_ads__campaign_history"], "model.facebook_ads.facebook_ads__ad_set_report": ["model.facebook_ads.int_facebook_ads__conversions", "model.facebook_ads.stg_facebook_ads__account_history", "model.facebook_ads.stg_facebook_ads__ad_history", "model.facebook_ads.stg_facebook_ads__ad_set_history", "model.facebook_ads.stg_facebook_ads__basic_ad", "model.facebook_ads.stg_facebook_ads__campaign_history"], "model.facebook_ads.facebook_ads__url_report": ["model.facebook_ads.int_facebook_ads__conversions", "model.facebook_ads.int_facebook_ads__creative_history", "model.facebook_ads.stg_facebook_ads__account_history", "model.facebook_ads.stg_facebook_ads__ad_history", "model.facebook_ads.stg_facebook_ads__ad_set_history", "model.facebook_ads.stg_facebook_ads__basic_ad", "model.facebook_ads.stg_facebook_ads__campaign_history"], "model.facebook_ads.stg_facebook_ads__demographics_region": ["model.facebook_ads.stg_facebook_ads__demographics_region_tmp"], "model.facebook_ads.stg_facebook_ads__basic_ad_action_values": ["model.facebook_ads.stg_facebook_ads__basic_ad_action_values_tmp"], "model.facebook_ads.stg_facebook_ads__basic_ad": ["model.facebook_ads.stg_facebook_ads__basic_ad_tmp"], "model.facebook_ads.stg_facebook_ads__campaign_history": ["model.facebook_ads.stg_facebook_ads__campaign_history_tmp"], "model.facebook_ads.stg_facebook_ads__demographics_region_actions": ["model.facebook_ads.stg_facebook_ads__demographics_region_actions_tmp"], "model.facebook_ads.stg_facebook_ads__ad_set_history": ["model.facebook_ads.stg_facebook_ads__ad_set_history_tmp"], "model.facebook_ads.stg_facebook_ads__account_history": ["model.facebook_ads.stg_facebook_ads__account_history_tmp"], "model.facebook_ads.stg_facebook_ads__creative_history": ["model.facebook_ads.stg_facebook_ads__creative_history_tmp"], "model.facebook_ads.stg_facebook_ads__basic_ad_actions": ["model.facebook_ads.stg_facebook_ads__basic_ad_actions_tmp"], "model.facebook_ads.stg_facebook_ads__demographics_country_actions": ["model.facebook_ads.stg_facebook_ads__demographics_country_actions_tmp"], "model.facebook_ads.stg_facebook_ads__demographics_country": ["model.facebook_ads.stg_facebook_ads__demographics_country_tmp"], "model.facebook_ads.stg_facebook_ads__ad_history": ["model.facebook_ads.stg_facebook_ads__ad_history_tmp"], "model.facebook_ads.stg_facebook_ads__ad_history_tmp": ["source.facebook_ads.facebook_ads.ad_history"], "model.facebook_ads.stg_facebook_ads__campaign_history_tmp": ["source.facebook_ads.facebook_ads.campaign_history"], "model.facebook_ads.stg_facebook_ads__demographics_country_actions_tmp": ["source.facebook_ads.facebook_ads.demographics_country_actions"], "model.facebook_ads.stg_facebook_ads__demographics_region_actions_tmp": ["source.facebook_ads.facebook_ads.demographics_region_actions"], "model.facebook_ads.stg_facebook_ads__basic_ad_actions_tmp": ["source.facebook_ads.facebook_ads.basic_ad_actions"], "model.facebook_ads.stg_facebook_ads__basic_ad_action_values_tmp": ["source.facebook_ads.facebook_ads.basic_ad_action_values"], "model.facebook_ads.stg_facebook_ads__ad_set_history_tmp": ["source.facebook_ads.facebook_ads.ad_set_history"], "model.facebook_ads.stg_facebook_ads__demographics_region_tmp": ["source.facebook_ads.facebook_ads.demographics_region"], "model.facebook_ads.stg_facebook_ads__creative_history_tmp": ["source.facebook_ads.facebook_ads.creative_history"], "model.facebook_ads.stg_facebook_ads__basic_ad_tmp": ["source.facebook_ads.facebook_ads.basic_ad"], "model.facebook_ads.stg_facebook_ads__account_history_tmp": ["source.facebook_ads.facebook_ads.account_history"], "model.facebook_ads.stg_facebook_ads__demographics_country_tmp": ["source.facebook_ads.facebook_ads.demographics_country"], "model.facebook_ads.int_facebook_ads__creative_history": ["model.facebook_ads.facebook_ads__url_tags", "model.facebook_ads.stg_facebook_ads__creative_history"], "model.facebook_ads.int_facebook_ads__conversions": ["model.facebook_ads.stg_facebook_ads__basic_ad_action_values", "model.facebook_ads.stg_facebook_ads__basic_ad_actions"], "test.linkedin.not_null_linkedin_ads__account_report_account_id.0c34ea1842": ["model.linkedin.linkedin_ads__account_report"], "test.linkedin.not_null_linkedin_ads__account_report_date_day.c4b33f8f53": ["model.linkedin.linkedin_ads__account_report"], "test.linkedin.not_null_linkedin_ads__campaign_report_date_day.8d320b88b1": ["model.linkedin.linkedin_ads__campaign_report"], "test.linkedin.not_null_linkedin_ads__campaign_report_campaign_id.bf43964b15": ["model.linkedin.linkedin_ads__campaign_report"], "test.linkedin.not_null_linkedin_ads__campaign_group_report_date_day.2676a1f76b": ["model.linkedin.linkedin_ads__campaign_group_report"], "test.linkedin.not_null_linkedin_ads__campaign_group_report_campaign_group_id.39b448cdaf": ["model.linkedin.linkedin_ads__campaign_group_report"], "test.linkedin.not_null_linkedin_ads__creative_report_date_day.0c6338b020": ["model.linkedin.linkedin_ads__creative_report"], "test.linkedin.not_null_linkedin_ads__creative_report_creative_id.096d93f889": ["model.linkedin.linkedin_ads__creative_report"], "test.linkedin.not_null_linkedin_ads__url_report_date_day.48b540f315": ["model.linkedin.linkedin_ads__url_report"], "test.linkedin.not_null_linkedin_ads__url_report_creative_id.83967fe9d2": ["model.linkedin.linkedin_ads__url_report"], "test.linkedin.not_null_linkedin_ads__url_report_click_uri.81534087cb": ["model.linkedin.linkedin_ads__url_report"], "test.linkedin.not_null_linkedin_ads__monthly_campaign_country_report_date_month.ab0a8d3050": ["model.linkedin.linkedin_ads__monthly_campaign_country_report"], "test.linkedin.not_null_linkedin_ads__monthly_campaign_country_report_campaign_id.4624641c1c": ["model.linkedin.linkedin_ads__monthly_campaign_country_report"], "test.linkedin.not_null_linkedin_ads__monthly_campaign_region_report_date_month.4fd809085e": ["model.linkedin.linkedin_ads__monthly_campaign_region_report"], "test.linkedin.not_null_linkedin_ads__monthly_campaign_region_report_campaign_id.5884bc5d68": ["model.linkedin.linkedin_ads__monthly_campaign_region_report"], "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_creative_creative_id.062abfe14b": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_creative"], "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_creative_date_day.cb81bc4766": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_creative"], "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_campaign_campaign_id.d6ae242f1a": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign"], "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_campaign_date_day.ef97bed766": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign"], "test.linkedin.not_null_stg_linkedin_ads__creative_history_creative_id.4d51d55474": ["model.linkedin.stg_linkedin_ads__creative_history"], "test.linkedin.not_null_stg_linkedin_ads__campaign_history_campaign_id.b026971ca2": ["model.linkedin.stg_linkedin_ads__campaign_history"], "test.linkedin.not_null_stg_linkedin_ads__campaign_history_version_tag.64954cc469": ["model.linkedin.stg_linkedin_ads__campaign_history"], "test.linkedin.not_null_stg_linkedin_ads__campaign_group_history_campaign_group_id.3888f3777d": ["model.linkedin.stg_linkedin_ads__campaign_group_history"], "test.linkedin.not_null_stg_linkedin_ads__campaign_group_history_last_modified_at.a716e2a7ea": ["model.linkedin.stg_linkedin_ads__campaign_group_history"], "test.linkedin.not_null_stg_linkedin_ads__account_history_account_id.a9fa7f93c0": ["model.linkedin.stg_linkedin_ads__account_history"], "test.linkedin.not_null_stg_linkedin_ads__account_history_version_tag.58c46c5d81": ["model.linkedin.stg_linkedin_ads__account_history"], "test.linkedin.not_null_stg_linkedin_ads__geo_geo_id.a9fc61210c": ["model.linkedin.stg_linkedin_ads__geo"], "test.linkedin.not_null_stg_linkedin_ads__monthly_ad_analytics_by_country_date_month.553fe89e70": ["model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country"], "test.linkedin.not_null_stg_linkedin_ads__monthly_ad_analytics_by_region_date_month.d065ed2b78": ["model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region"], "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_ad_group_id.60febec6b5": ["model.apple_search_ads.apple_search_ads__ad_group_report"], "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_date_day.e6ffb30b3c": ["model.apple_search_ads.apple_search_ads__ad_group_report"], "test.apple_search_ads.not_null_apple_search_ads__ad_report_ad_id.0ab2c5075c": ["model.apple_search_ads.apple_search_ads__ad_report"], "test.apple_search_ads.not_null_apple_search_ads__ad_report_date_day.b86c049e17": ["model.apple_search_ads.apple_search_ads__ad_report"], "test.apple_search_ads.not_null_apple_search_ads__campaign_report_campaign_id.e26ed1e146": ["model.apple_search_ads.apple_search_ads__campaign_report"], "test.apple_search_ads.not_null_apple_search_ads__campaign_report_date_day.35652b8d1a": ["model.apple_search_ads.apple_search_ads__campaign_report"], "test.apple_search_ads.not_null_apple_search_ads__keyword_report_keyword_id.ea493710db": ["model.apple_search_ads.apple_search_ads__keyword_report"], "test.apple_search_ads.not_null_apple_search_ads__keyword_report_date_day.3dec8d0e82": ["model.apple_search_ads.apple_search_ads__keyword_report"], "test.apple_search_ads.not_null_apple_search_ads__organization_report_organization_id.b6cf7d69f8": ["model.apple_search_ads.apple_search_ads__organization_report"], "test.apple_search_ads.not_null_apple_search_ads__organization_report_date_day.5784fed523": ["model.apple_search_ads.apple_search_ads__organization_report"], "test.apple_search_ads.not_null_apple_search_ads__search_term_report_date_day.1bc3b0d57c": ["model.apple_search_ads.apple_search_ads__search_term_report"], "test.apple_search_ads.not_null_apple_search_ads__search_term_report_search_term_text.aecc7447f7": ["model.apple_search_ads.apple_search_ads__search_term_report"], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f": ["model.apple_search_ads.stg_apple_search_ads__ad_group_history"], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7": ["model.apple_search_ads.stg_apple_search_ads__ad_group_history"], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1": ["model.apple_search_ads.stg_apple_search_ads__ad_group_report"], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b": ["model.apple_search_ads.stg_apple_search_ads__ad_group_report"], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d": ["model.apple_search_ads.stg_apple_search_ads__ad_history"], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a": ["model.apple_search_ads.stg_apple_search_ads__ad_history"], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8": ["model.apple_search_ads.stg_apple_search_ads__ad_report"], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f": ["model.apple_search_ads.stg_apple_search_ads__ad_report"], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58": ["model.apple_search_ads.stg_apple_search_ads__ad_report"], "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9": ["model.apple_search_ads.stg_apple_search_ads__campaign_history"], "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8": ["model.apple_search_ads.stg_apple_search_ads__campaign_history"], "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728": ["model.apple_search_ads.stg_apple_search_ads__campaign_report"], "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3": ["model.apple_search_ads.stg_apple_search_ads__campaign_report"], "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287": ["model.apple_search_ads.stg_apple_search_ads__keyword_history"], "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2": ["model.apple_search_ads.stg_apple_search_ads__keyword_history"], "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e": ["model.apple_search_ads.stg_apple_search_ads__keyword_report"], "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928": ["model.apple_search_ads.stg_apple_search_ads__keyword_report"], "test.apple_search_ads.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb": ["model.apple_search_ads.stg_apple_search_ads__organization"], "test.apple_search_ads.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad": ["model.apple_search_ads.stg_apple_search_ads__search_term_report"], "test.apple_search_ads.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302": ["model.apple_search_ads.stg_apple_search_ads__search_term_report"], "test.reddit_ads.not_null_reddit_ads__account_report_date_day.7b43e6cb90": ["model.reddit_ads.reddit_ads__account_report"], "test.reddit_ads.not_null_reddit_ads__account_report_account_id.16f11188c5": ["model.reddit_ads.reddit_ads__account_report"], "test.reddit_ads.not_null_reddit_ads__ad_group_report_date_day.6463e6f6f7": ["model.reddit_ads.reddit_ads__ad_group_report"], "test.reddit_ads.not_null_reddit_ads__ad_group_report_ad_group_id.057bd60604": ["model.reddit_ads.reddit_ads__ad_group_report"], "test.reddit_ads.not_null_reddit_ads__ad_report_date_day.608b21c69a": ["model.reddit_ads.reddit_ads__ad_report"], "test.reddit_ads.not_null_reddit_ads__ad_report_ad_id.1da054a14e": ["model.reddit_ads.reddit_ads__ad_report"], "test.reddit_ads.not_null_reddit_ads__campaign_report_date_day.f79cca4131": ["model.reddit_ads.reddit_ads__campaign_report"], "test.reddit_ads.not_null_reddit_ads__campaign_report_campaign_id.f5491a0b49": ["model.reddit_ads.reddit_ads__campaign_report"], "test.reddit_ads.not_null_reddit_ads__url_report_date_day.4b0f6363da": ["model.reddit_ads.reddit_ads__url_report"], "test.reddit_ads.not_null_reddit_ads__url_report_ad_id.8ff83da2b0": ["model.reddit_ads.reddit_ads__url_report"], "test.reddit_ads.not_null_reddit_ads__url_report_base_url.2f585bebcb": ["model.reddit_ads.reddit_ads__url_report"], "test.reddit_ads.not_null_stg_reddit_ads__account_account_id.512f0b8078": ["model.reddit_ads.stg_reddit_ads__account"], "test.reddit_ads.not_null_stg_reddit_ads__account_report_account_id.1f2a0195de": ["model.reddit_ads.stg_reddit_ads__account_report"], "test.reddit_ads.not_null_stg_reddit_ads__ad_ad_id.40188b63dd": ["model.reddit_ads.stg_reddit_ads__ad"], "test.reddit_ads.not_null_stg_reddit_ads__ad_report_ad_id.c4af84b857": ["model.reddit_ads.stg_reddit_ads__ad_report"], "test.reddit_ads.not_null_stg_reddit_ads__ad_group_ad_group_id.65795d8dc2": ["model.reddit_ads.stg_reddit_ads__ad_group"], "test.reddit_ads.not_null_stg_reddit_ads__ad_group_report_ad_group_id.9836cd084d": ["model.reddit_ads.stg_reddit_ads__ad_group_report"], "test.reddit_ads.not_null_stg_reddit_ads__campaign_campaign_id.f3f24e4682": ["model.reddit_ads.stg_reddit_ads__campaign"], "test.reddit_ads.not_null_stg_reddit_ads__campaign_report_campaign_id.c717612b4f": ["model.reddit_ads.stg_reddit_ads__campaign_report"], "test.snapchat_ads.not_null_snapchat_ads__account_report_date_day.688d7ed260": ["model.snapchat_ads.snapchat_ads__account_report"], "test.snapchat_ads.not_null_snapchat_ads__account_report_ad_account_id.589c81966b": ["model.snapchat_ads.snapchat_ads__account_report"], "test.snapchat_ads.not_null_snapchat_ads__ad_report_date_day.7c5350c8fe": ["model.snapchat_ads.snapchat_ads__ad_report"], "test.snapchat_ads.not_null_snapchat_ads__ad_report_ad_id.9000850744": ["model.snapchat_ads.snapchat_ads__ad_report"], "test.snapchat_ads.not_null_snapchat_ads__campaign_report_date_day.4e4e31223b": ["model.snapchat_ads.snapchat_ads__campaign_report"], "test.snapchat_ads.not_null_snapchat_ads__campaign_report_campaign_id.19fd7135ac": ["model.snapchat_ads.snapchat_ads__campaign_report"], "test.snapchat_ads.not_null_snapchat_ads__ad_squad_report_date_day.39118ca639": ["model.snapchat_ads.snapchat_ads__ad_squad_report"], "test.snapchat_ads.not_null_snapchat_ads__ad_squad_report_ad_squad_id.424c0bbffe": ["model.snapchat_ads.snapchat_ads__ad_squad_report"], "test.snapchat_ads.not_null_snapchat_ads__url_report_date_day.bcbe87a7f6": ["model.snapchat_ads.snapchat_ads__url_report"], "test.snapchat_ads.not_null_snapchat_ads__url_report_ad_id.ecbdfc0d78": ["model.snapchat_ads.snapchat_ads__url_report"], "test.snapchat_ads.not_null_snapchat_ads__url_report_base_url.15676dc1de": ["model.snapchat_ads.snapchat_ads__url_report"], "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_date_day.b946d6ae47": ["model.snapchat_ads.snapchat_ads__campaign_country_report"], "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_campaign_id.33fe016201": ["model.snapchat_ads.snapchat_ads__campaign_country_report"], "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_country.332a585832": ["model.snapchat_ads.snapchat_ads__campaign_country_report"], "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_date_day.3d3ad303c4": ["model.snapchat_ads.snapchat_ads__campaign_region_report"], "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_campaign_id.9b92b4f074": ["model.snapchat_ads.snapchat_ads__campaign_region_report"], "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_region.041579919a": ["model.snapchat_ads.snapchat_ads__campaign_region_report"], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_account_history__fivetran_synced.2d5dd77824": ["model.snapchat_ads.stg_snapchat_ads__ad_account_history"], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_account_history_ad_account_id.426d71d605": ["model.snapchat_ads.stg_snapchat_ads__ad_account_history"], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_history__fivetran_synced.1607c70fda": ["model.snapchat_ads.stg_snapchat_ads__ad_history"], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_history_ad_id.e9d367fd15": ["model.snapchat_ads.stg_snapchat_ads__ad_history"], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_hourly_report_ad_id.7e763de19d": ["model.snapchat_ads.stg_snapchat_ads__ad_hourly_report"], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_hourly_report_date_hour.666cda1cd7": ["model.snapchat_ads.stg_snapchat_ads__ad_hourly_report"], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_history__fivetran_synced.7ed7d105ae": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_history"], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_history_ad_squad_id.71c7122278": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_history"], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_hourly_report_ad_squad_id.ab16aa72c9": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report"], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_hourly_report_date_hour.6f0b63a9cb": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report"], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_history__fivetran_synced.55bc48b3ec": ["model.snapchat_ads.stg_snapchat_ads__campaign_history"], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_history_campaign_id.f74a0fb8c0": ["model.snapchat_ads.stg_snapchat_ads__campaign_history"], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_hourly_report_campaign_id.f255c38a3e": ["model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report"], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_hourly_report_date_hour.0bc4218ac8": ["model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report"], "test.snapchat_ads.not_null_stg_snapchat_ads__creative_history__fivetran_synced.b9c95b4380": ["model.snapchat_ads.stg_snapchat_ads__creative_history"], "test.snapchat_ads.not_null_stg_snapchat_ads__creative_history_creative_id.09c83690f4": ["model.snapchat_ads.stg_snapchat_ads__creative_history"], "test.snapchat_ads.not_null_stg_snapchat_ads__creative_url_tag_history_creative_id.7ff6bb9c1b": ["model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history"], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_campaign_id.1b07be54fe": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report"], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_country.34db53b159": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report"], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_date_day.d3d7dd7af1": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report"], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_campaign_id.99fbccb78d": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report"], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_region.44327f07bf": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report"], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_date_day.eec50e6826": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report"], "test.pinterest.not_null_pinterest_ads__url_report_date_day.b09048037e": ["model.pinterest.pinterest_ads__url_report"], "test.pinterest.not_null_pinterest_ads__url_report_destination_url.0bb7f30502": ["model.pinterest.pinterest_ads__url_report"], "test.pinterest.not_null_pinterest_ads__url_report_pin_promotion_id.0da711ad6a": ["model.pinterest.pinterest_ads__url_report"], "test.pinterest.not_null_pinterest_ads__ad_group_report_date_day.ed7c27b8a7": ["model.pinterest.pinterest_ads__ad_group_report"], "test.pinterest.not_null_pinterest_ads__ad_group_report_ad_group_id.134f9ac6c2": ["model.pinterest.pinterest_ads__ad_group_report"], "test.pinterest.not_null_pinterest_ads__campaign_report_date_day.10ac8272bf": ["model.pinterest.pinterest_ads__campaign_report"], "test.pinterest.not_null_pinterest_ads__campaign_report_campaign_id.8001ea60f2": ["model.pinterest.pinterest_ads__campaign_report"], "test.pinterest.not_null_pinterest_ads__advertiser_report_date_day.aedeceeeca": ["model.pinterest.pinterest_ads__advertiser_report"], "test.pinterest.not_null_pinterest_ads__advertiser_report_advertiser_id.13380f0672": ["model.pinterest.pinterest_ads__advertiser_report"], "test.pinterest.not_null_pinterest_ads__keyword_report_date_day.23130e9fba": ["model.pinterest.pinterest_ads__keyword_report"], "test.pinterest.not_null_pinterest_ads__keyword_report_keyword_id.0d73460198": ["model.pinterest.pinterest_ads__keyword_report"], "test.pinterest.not_null_pinterest_ads__pin_promotion_report_date_day.3128d28cfd": ["model.pinterest.pinterest_ads__pin_promotion_report"], "test.pinterest.not_null_pinterest_ads__pin_promotion_report_pin_promotion_id.2540e0a561": ["model.pinterest.pinterest_ads__pin_promotion_report"], "test.pinterest.not_null_pinterest_ads__campaign_country_report_date_day.a9da473d38": ["model.pinterest.pinterest_ads__campaign_country_report"], "test.pinterest.not_null_pinterest_ads__campaign_country_report_campaign_id.9b1d309d2b": ["model.pinterest.pinterest_ads__campaign_country_report"], "test.pinterest.not_null_pinterest_ads__campaign_region_report_date_day.e81588bc6e": ["model.pinterest.pinterest_ads__campaign_region_report"], "test.pinterest.not_null_pinterest_ads__campaign_region_report_campaign_id.1a64423d71": ["model.pinterest.pinterest_ads__campaign_region_report"], "test.pinterest.not_null_stg_pinterest_ads__ad_group_history_ad_group_id.220c6220be": ["model.pinterest.stg_pinterest_ads__ad_group_history"], "test.pinterest.not_null_stg_pinterest_ads__campaign_history_campaign_id.60cb10d341": ["model.pinterest.stg_pinterest_ads__campaign_history"], "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_history_pin_promotion_id.171995cd34": ["model.pinterest.stg_pinterest_ads__pin_promotion_history"], "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_report_date_day.ed272212a1": ["model.pinterest.stg_pinterest_ads__pin_promotion_report"], "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_report_pin_promotion_id.9c3c9f71ab": ["model.pinterest.stg_pinterest_ads__pin_promotion_report"], "test.pinterest.not_null_stg_pinterest_ads__ad_group_report_date_day.80e8904c4c": ["model.pinterest.stg_pinterest_ads__ad_group_report"], "test.pinterest.not_null_stg_pinterest_ads__ad_group_report_ad_group_id.bb8cf3c471": ["model.pinterest.stg_pinterest_ads__ad_group_report"], "test.pinterest.not_null_stg_pinterest_ads__advertiser_history_advertiser_id.7d24f665fb": ["model.pinterest.stg_pinterest_ads__advertiser_history"], "test.pinterest.not_null_stg_pinterest_ads__advertiser_report_date_day.153bd03c95": ["model.pinterest.stg_pinterest_ads__advertiser_report"], "test.pinterest.not_null_stg_pinterest_ads__advertiser_report_advertiser_id.1b16ed73ff": ["model.pinterest.stg_pinterest_ads__advertiser_report"], "test.pinterest.not_null_stg_pinterest_ads__campaign_report_date_day.7ef5fb1238": ["model.pinterest.stg_pinterest_ads__campaign_report"], "test.pinterest.not_null_stg_pinterest_ads__campaign_report_campaign_id.a287eba0fc": ["model.pinterest.stg_pinterest_ads__campaign_report"], "test.pinterest.not_null_stg_pinterest_ads__keyword_history_keyword_id.246889377a": ["model.pinterest.stg_pinterest_ads__keyword_history"], "test.pinterest.not_null_stg_pinterest_ads__keyword_report_date_day.9937216300": ["model.pinterest.stg_pinterest_ads__keyword_report"], "test.pinterest.not_null_stg_pinterest_ads__keyword_report_keyword_id.5f00679c48": ["model.pinterest.stg_pinterest_ads__keyword_report"], "test.google_ads.not_null_google_ads__url_report_base_url.e3578c0f72": ["model.google_ads.google_ads__url_report"], "test.google_ads.not_null_google_ads__account_report_account_id.abb0985422": ["model.google_ads.google_ads__account_report"], "test.google_ads.not_null_google_ads__ad_group_report_ad_group_id.c186523c0c": ["model.google_ads.google_ads__ad_group_report"], "test.google_ads.not_null_google_ads__ad_report_ad_id.7bd6a287ad": ["model.google_ads.google_ads__ad_report"], "test.google_ads.not_null_google_ads__campaign_report_campaign_id.cc6694fa0e": ["model.google_ads.google_ads__campaign_report"], "test.google_ads.not_null_google_ads__keyword_report_criterion_id.4cab66a055": ["model.google_ads.google_ads__keyword_report"], "test.google_ads.unique_google_ads__campaign_bid_modifiers_report_bid_modifier_report_key.d68443174a": ["model.google_ads.google_ads__campaign_bid_modifiers_report"], "test.google_ads.not_null_google_ads__campaign_bid_modifiers_report_bid_modifier_report_key.746ae8cfa3": ["model.google_ads.google_ads__campaign_bid_modifiers_report"], "test.google_ads.not_null_google_ads__campaign_bid_modifiers_report_campaign_id.68d212d025": ["model.google_ads.google_ads__campaign_bid_modifiers_report"], "test.google_ads.unique_google_ads__campaign_budget_diagnostics_report_budget_diagnostics_report_key.ca90f632f4": ["model.google_ads.google_ads__campaign_budget_diagnostics_report"], "test.google_ads.not_null_google_ads__campaign_budget_diagnostics_report_budget_diagnostics_report_key.c2c4d80aab": ["model.google_ads.google_ads__campaign_budget_diagnostics_report"], "test.google_ads.not_null_google_ads__campaign_budget_diagnostics_report_campaign_id.9a579bd702": ["model.google_ads.google_ads__campaign_budget_diagnostics_report"], "test.google_ads.not_null_stg_google_ads__account_history_account_id.5ca373f51f": ["model.google_ads.stg_google_ads__account_history"], "test.google_ads.not_null_stg_google_ads__ad_group_history_ad_group_id.f6c7c939be": ["model.google_ads.stg_google_ads__ad_group_history"], "test.google_ads.not_null_stg_google_ads__ad_history_ad_id.8c23c38248": ["model.google_ads.stg_google_ads__ad_history"], "test.google_ads.not_null_stg_google_ads__ad_stats_date_day.9a43c0fce4": ["model.google_ads.stg_google_ads__ad_stats"], "test.google_ads.not_null_stg_google_ads__ad_stats_ad_id.2612d83cc8": ["model.google_ads.stg_google_ads__ad_stats"], "test.google_ads.not_null_stg_google_ads__campaign_history_campaign_id.fa0c825e75": ["model.google_ads.stg_google_ads__campaign_history"], "test.google_ads.not_null_stg_google_ads__ad_group_criterion_history_criterion_id.7a0a8b8476": ["model.google_ads.stg_google_ads__ad_group_criterion_history"], "test.google_ads.not_null_stg_google_ads__ad_group_stats_date_day.3c6a221786": ["model.google_ads.stg_google_ads__ad_group_stats"], "test.google_ads.not_null_stg_google_ads__ad_group_stats_ad_group_id.a8d430f077": ["model.google_ads.stg_google_ads__ad_group_stats"], "test.google_ads.not_null_stg_google_ads__campaign_stats_date_day.dc097fd76b": ["model.google_ads.stg_google_ads__campaign_stats"], "test.google_ads.not_null_stg_google_ads__campaign_stats_campaign_id.11587fa10f": ["model.google_ads.stg_google_ads__campaign_stats"], "test.google_ads.not_null_stg_google_ads__keyword_stats_date_day.a9da72f74d": ["model.google_ads.stg_google_ads__keyword_stats"], "test.google_ads.not_null_stg_google_ads__keyword_stats_keyword_id.f0945d6cf0": ["model.google_ads.stg_google_ads__keyword_stats"], "test.google_ads.not_null_stg_google_ads__account_stats_account_id.2a9da5417b": ["model.google_ads.stg_google_ads__account_stats"], "test.google_ads.not_null_stg_google_ads__account_stats_date_day.57ac8772d5": ["model.google_ads.stg_google_ads__account_stats"], "test.google_ads.not_null_stg_google_ads__search_term_keyword_stats_date_day.3ff55abd88": ["model.google_ads.stg_google_ads__search_term_keyword_stats"], "test.google_ads.not_null_stg_google_ads__search_term_keyword_stats_search_term_id.0019238ba2": ["model.google_ads.stg_google_ads__search_term_keyword_stats"], "test.google_ads.not_null_stg_google_ads__campaign_bid_modifier_history_campaign_id.c7e1e11f33": ["model.google_ads.stg_google_ads__campaign_bid_modifier_history"], "test.google_ads.not_null_stg_google_ads__campaign_budget_history_campaign_id.730c3d8025": ["model.google_ads.stg_google_ads__campaign_budget_history"], "test.google_ads.not_null_stg_google_ads__campaign_criterion_history_criterion_id.ade9d1fdbd": ["model.google_ads.stg_google_ads__campaign_criterion_history"], "test.google_ads.not_null_stg_google_ads__campaign_bidding_strategy_history_campaign_id.7efbcd0291": ["model.google_ads.stg_google_ads__campaign_bidding_strategy_history"], "test.amazon_ads.not_null_amazon_ads__account_report_profile_id.87fb8dbe66": ["model.amazon_ads.amazon_ads__account_report"], "test.amazon_ads.not_null_amazon_ads__account_report_account_id.83adef7061": ["model.amazon_ads.amazon_ads__account_report"], "test.amazon_ads.not_null_amazon_ads__ad_group_report_ad_group_id.8a23dc123a": ["model.amazon_ads.amazon_ads__ad_group_report"], "test.amazon_ads.not_null_amazon_ads__ad_report_ad_id.93728159b3": ["model.amazon_ads.amazon_ads__ad_report"], "test.amazon_ads.not_null_amazon_ads__campaign_report_campaign_id.a9cabadd7c": ["model.amazon_ads.amazon_ads__campaign_report"], "test.amazon_ads.not_null_amazon_ads__portfolio_report_profile_id.1a910441c6": ["model.amazon_ads.amazon_ads__portfolio_report"], "test.amazon_ads.not_null_amazon_ads__keyword_report_keyword_id.303f680e4a": ["model.amazon_ads.amazon_ads__keyword_report"], "test.amazon_ads.not_null_amazon_ads__search_report_search_term.3c23d4658a": ["model.amazon_ads.amazon_ads__search_report"], "test.amazon_ads.not_null_stg_amazon_ads__ad_group_history_ad_group_id.6b524b990b": ["model.amazon_ads.stg_amazon_ads__ad_group_history"], "test.amazon_ads.not_null_stg_amazon_ads__ad_group_level_report_ad_group_id.ee4ef641c3": ["model.amazon_ads.stg_amazon_ads__ad_group_level_report"], "test.amazon_ads.not_null_stg_amazon_ads__advertised_product_report_ad_id.307c6bc8d4": ["model.amazon_ads.stg_amazon_ads__advertised_product_report"], "test.amazon_ads.not_null_stg_amazon_ads__campaign_history_campaign_id.49e395897c": ["model.amazon_ads.stg_amazon_ads__campaign_history"], "test.amazon_ads.not_null_stg_amazon_ads__campaign_level_report_campaign_id.1efec68194": ["model.amazon_ads.stg_amazon_ads__campaign_level_report"], "test.amazon_ads.not_null_stg_amazon_ads__keyword_history_keyword_id.f21f6add6e": ["model.amazon_ads.stg_amazon_ads__keyword_history"], "test.amazon_ads.not_null_stg_amazon_ads__portfolio_history_portfolio_id.e22bb2ba02": ["model.amazon_ads.stg_amazon_ads__portfolio_history"], "test.amazon_ads.not_null_stg_amazon_ads__product_ad_history_ad_id.8744ab1cd8": ["model.amazon_ads.stg_amazon_ads__product_ad_history"], "test.amazon_ads.not_null_stg_amazon_ads__profile_profile_id.bd192c102b": ["model.amazon_ads.stg_amazon_ads__profile"], "test.amazon_ads.not_null_stg_amazon_ads__targeting_keyword_report_keyword_id.101a3299d7": ["model.amazon_ads.stg_amazon_ads__targeting_keyword_report"], "test.amazon_ads.not_null_stg_amazon_ads__search_term_ad_keyword_report_search_term.ef04af3b06": ["model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report"], "test.twitter_ads.not_null_twitter_ads__campaign_report_campaign_id.03b1c451b8": ["model.twitter_ads.twitter_ads__campaign_report"], "test.twitter_ads.not_null_twitter_ads__campaign_report_date_day.2b30b279b0": ["model.twitter_ads.twitter_ads__campaign_report"], "test.twitter_ads.not_null_twitter_ads__campaign_report_placement.c66d252e82": ["model.twitter_ads.twitter_ads__campaign_report"], "test.twitter_ads.not_null_twitter_ads__line_item_report_date_day.86c934e8ce": ["model.twitter_ads.twitter_ads__line_item_report"], "test.twitter_ads.not_null_twitter_ads__line_item_report_line_item_id.0462d58211": ["model.twitter_ads.twitter_ads__line_item_report"], "test.twitter_ads.not_null_twitter_ads__line_item_report_placement.f103369312": ["model.twitter_ads.twitter_ads__line_item_report"], "test.twitter_ads.not_null_twitter_ads__account_report_date_day.84896c5846": ["model.twitter_ads.twitter_ads__account_report"], "test.twitter_ads.not_null_twitter_ads__account_report_placement.157dcb6194": ["model.twitter_ads.twitter_ads__account_report"], "test.twitter_ads.not_null_twitter_ads__account_report_account_id.90d5808908": ["model.twitter_ads.twitter_ads__account_report"], "test.twitter_ads.not_null_twitter_ads__keyword_report_date_day.e0ce90c1ec": ["model.twitter_ads.twitter_ads__keyword_report"], "test.twitter_ads.not_null_twitter_ads__keyword_report_keyword_id.91efa0a538": ["model.twitter_ads.twitter_ads__keyword_report"], "test.twitter_ads.not_null_twitter_ads__promoted_tweet_report_placement.d89c9b27e5": ["model.twitter_ads.twitter_ads__promoted_tweet_report"], "test.twitter_ads.not_null_twitter_ads__promoted_tweet_report_promoted_tweet_id.5df08e154e": ["model.twitter_ads.twitter_ads__promoted_tweet_report"], "test.twitter_ads.not_null_twitter_ads__url_report_date_day.33fcb7e04b": ["model.twitter_ads.twitter_ads__url_report"], "test.twitter_ads.not_null_twitter_ads__url_report_placement.92ca3b192e": ["model.twitter_ads.twitter_ads__url_report"], "test.twitter_ads.not_null_twitter_ads__url_report_promoted_tweet_id.d690f99143": ["model.twitter_ads.twitter_ads__url_report"], "test.twitter_ads.not_null_twitter_ads__url_report_base_url.dfd7ab549e": ["model.twitter_ads.twitter_ads__url_report"], "test.twitter_ads.not_null_twitter_ads__campaign_country_report_campaign_id.d08c7d25a2": ["model.twitter_ads.twitter_ads__campaign_country_report"], "test.twitter_ads.not_null_twitter_ads__campaign_country_report_date_day.33eabfbcaa": ["model.twitter_ads.twitter_ads__campaign_country_report"], "test.twitter_ads.not_null_twitter_ads__campaign_country_report_placement.3a4c65b9c5": ["model.twitter_ads.twitter_ads__campaign_country_report"], "test.twitter_ads.not_null_twitter_ads__campaign_region_report_campaign_id.c06b8be032": ["model.twitter_ads.twitter_ads__campaign_region_report"], "test.twitter_ads.not_null_twitter_ads__campaign_region_report_date_day.884ad86a28": ["model.twitter_ads.twitter_ads__campaign_region_report"], "test.twitter_ads.not_null_twitter_ads__campaign_region_report_placement.e6fb374bf5": ["model.twitter_ads.twitter_ads__campaign_region_report"], "test.twitter_ads.not_null_stg_twitter_ads__account_history_account_id.66fb3601e2": ["model.twitter_ads.stg_twitter_ads__account_history"], "test.twitter_ads.not_null_stg_twitter_ads__campaign_history_campaign_id.51218487ce": ["model.twitter_ads.stg_twitter_ads__campaign_history"], "test.twitter_ads.not_null_stg_twitter_ads__line_item_history_line_item_id.2cef040809": ["model.twitter_ads.stg_twitter_ads__line_item_history"], "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_history_promoted_tweet_id.f447a1cd09": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_history"], "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_date_day.c4c46a5894": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_report"], "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_promoted_tweet_id.6028694598": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_report"], "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_placement.c1b1f648b3": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_report"], "test.twitter_ads.not_null_stg_twitter_ads__tweet_url_index.e998fb67be": ["model.twitter_ads.stg_twitter_ads__tweet_url"], "test.twitter_ads.not_null_stg_twitter_ads__tweet_url_tweet_id.f7e1670218": ["model.twitter_ads.stg_twitter_ads__tweet_url"], "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_date_day.053c09786c": ["model.twitter_ads.stg_twitter_ads__campaign_report"], "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_campaign_id.a63b62981f": ["model.twitter_ads.stg_twitter_ads__campaign_report"], "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_placement.5067d8c4f4": ["model.twitter_ads.stg_twitter_ads__campaign_report"], "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_date_day.0f4d8cc8fe": ["model.twitter_ads.stg_twitter_ads__line_item_report"], "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_line_item_id.9f5a4860b7": ["model.twitter_ads.stg_twitter_ads__line_item_report"], "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_placement.cd7e77e0eb": ["model.twitter_ads.stg_twitter_ads__line_item_report"], "test.twitter_ads.not_null_stg_twitter_ads__line_item_keywords_report_keyword_id.e5f015e9ec": ["model.twitter_ads.stg_twitter_ads__line_item_keywords_report"], "test.twitter_ads.not_null_stg_twitter_ads__line_item_keywords_report_date_day.c7e7155b13": ["model.twitter_ads.stg_twitter_ads__line_item_keywords_report"], "test.twitter_ads.not_null_stg_twitter_ads__tweet_tweet_id.a0427f37cd": ["model.twitter_ads.stg_twitter_ads__tweet"], "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_country.8bc44f6e39": ["model.twitter_ads.stg_twitter_ads__campaign_locations_report"], "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_date_day.bf69378746": ["model.twitter_ads.stg_twitter_ads__campaign_locations_report"], "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_campaign_id.e1ddc306c2": ["model.twitter_ads.stg_twitter_ads__campaign_locations_report"], "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_placement.638fb0cf03": ["model.twitter_ads.stg_twitter_ads__campaign_locations_report"], "test.twitter_ads.not_null_stg_twitter_ads__campaign_regions_report_region.7b8b6fd555": ["model.twitter_ads.stg_twitter_ads__campaign_regions_report"], "test.twitter_ads.not_null_stg_twitter_ads__campaign_regions_report_date_day.e7f9f99776": ["model.twitter_ads.stg_twitter_ads__campaign_regions_report"], "test.ad_reporting.not_null_ad_reporting__account_report_account_id.316a64c022": ["model.ad_reporting.ad_reporting__account_report"], "test.ad_reporting.not_null_ad_reporting__ad_group_report_ad_group_id.963e17e842": ["model.ad_reporting.ad_reporting__ad_group_report"], "test.ad_reporting.not_null_ad_reporting__ad_report_ad_id.f3eb210152": ["model.ad_reporting.ad_reporting__ad_report"], "test.ad_reporting.not_null_ad_reporting__campaign_report_campaign_id.1cfaa7698b": ["model.ad_reporting.ad_reporting__campaign_report"], "test.ad_reporting.not_null_ad_reporting__keyword_report_keyword_id.51a45fb334": ["model.ad_reporting.ad_reporting__keyword_report"], "test.ad_reporting.not_null_ad_reporting__search_report_search_query.ee2f0fcafb": ["model.ad_reporting.ad_reporting__search_report"], "test.ad_reporting.not_null_ad_reporting__url_report_base_url.a29864e5b6": ["model.ad_reporting.ad_reporting__url_report"], "test.tiktok_ads.not_null_tiktok_ads__advertiser_report_date_day.1276998c99": ["model.tiktok_ads.tiktok_ads__advertiser_report"], "test.tiktok_ads.not_null_tiktok_ads__advertiser_report_advertiser_id.f956c568ce": ["model.tiktok_ads.tiktok_ads__advertiser_report"], "test.tiktok_ads.not_null_tiktok_ads__ad_report_date_day.d61ee4a5ed": ["model.tiktok_ads.tiktok_ads__ad_report"], "test.tiktok_ads.not_null_tiktok_ads__ad_report_ad_id.2d8166e707": ["model.tiktok_ads.tiktok_ads__ad_report"], "test.tiktok_ads.not_null_tiktok_ads__ad_group_report_date_day.e39164964e": ["model.tiktok_ads.tiktok_ads__ad_group_report"], "test.tiktok_ads.not_null_tiktok_ads__ad_group_report_ad_group_id.17fb8710f4": ["model.tiktok_ads.tiktok_ads__ad_group_report"], "test.tiktok_ads.not_null_tiktok_ads__campaign_report_date_day.3807b0e836": ["model.tiktok_ads.tiktok_ads__campaign_report"], "test.tiktok_ads.not_null_tiktok_ads__campaign_report_campaign_id.8a2b0c8ef8": ["model.tiktok_ads.tiktok_ads__campaign_report"], "test.tiktok_ads.not_null_tiktok_ads__url_report_date_day.d593573eff": ["model.tiktok_ads.tiktok_ads__url_report"], "test.tiktok_ads.not_null_tiktok_ads__url_report_ad_id.6c41067bd0": ["model.tiktok_ads.tiktok_ads__url_report"], "test.tiktok_ads.not_null_tiktok_ads__url_report_base_url.37afef2e1b": ["model.tiktok_ads.tiktok_ads__url_report"], "test.tiktok_ads.not_null_tiktok_ads__campaign_country_report_date_day.c68c1bd379": ["model.tiktok_ads.tiktok_ads__campaign_country_report"], "test.tiktok_ads.not_null_tiktok_ads__campaign_country_report_campaign_id.f439b91d6d": ["model.tiktok_ads.tiktok_ads__campaign_country_report"], "test.tiktok_ads.not_null_stg_tiktok_ads__advertiser_advertiser_id.5deab92def": ["model.tiktok_ads.stg_tiktok_ads__advertiser"], "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_history_ad_group_id.04778d7fad": ["model.tiktok_ads.stg_tiktok_ads__ad_group_history"], "test.tiktok_ads.not_null_stg_tiktok_ads__ad_history_ad_id.4ffd05b23a": ["model.tiktok_ads.stg_tiktok_ads__ad_history"], "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_history_campaign_id.7f9147d1e1": ["model.tiktok_ads.stg_tiktok_ads__campaign_history"], "test.tiktok_ads.not_null_stg_tiktok_ads__ad_report_hourly_ad_id.ee84d783ed": ["model.tiktok_ads.stg_tiktok_ads__ad_report_hourly"], "test.tiktok_ads.not_null_stg_tiktok_ads__ad_report_hourly_stat_time_hour.9e2a2dca81": ["model.tiktok_ads.stg_tiktok_ads__ad_report_hourly"], "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_report_hourly_ad_group_id.8da17119f1": ["model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly"], "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_report_hourly_stat_time_hour.ca4b495127": ["model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly"], "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_report_hourly_campaign_id.ef898379fb": ["model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly"], "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_report_hourly_stat_time_hour.e75e13184c": ["model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly"], "test.microsoft_ads.not_null_microsoft_ads__account_report_account_id.f88e46157e": ["model.microsoft_ads.microsoft_ads__account_report"], "test.microsoft_ads.not_null_microsoft_ads__ad_group_report_ad_group_id.1974ec5ab9": ["model.microsoft_ads.microsoft_ads__ad_group_report"], "test.microsoft_ads.not_null_microsoft_ads__ad_report_ad_id.b089709125": ["model.microsoft_ads.microsoft_ads__ad_report"], "test.microsoft_ads.not_null_microsoft_ads__campaign_report_campaign_id.67aa50e1f8": ["model.microsoft_ads.microsoft_ads__campaign_report"], "test.microsoft_ads.not_null_microsoft_ads__keyword_report_keyword_id.da1d648d3b": ["model.microsoft_ads.microsoft_ads__keyword_report"], "test.microsoft_ads.not_null_microsoft_ads__search_report_search_query.fa3625d66d": ["model.microsoft_ads.microsoft_ads__search_report"], "test.microsoft_ads.not_null_microsoft_ads__url_report_base_url.c1af50307a": ["model.microsoft_ads.microsoft_ads__url_report"], "test.microsoft_ads.not_null_microsoft_ads__campaign_country_report_account_id.9d9807033d": ["model.microsoft_ads.microsoft_ads__campaign_country_report"], "test.microsoft_ads.not_null_microsoft_ads__campaign_country_report_campaign_id.10b01e8782": ["model.microsoft_ads.microsoft_ads__campaign_country_report"], "test.microsoft_ads.not_null_microsoft_ads__campaign_region_report_account_id.b3a2b47986": ["model.microsoft_ads.microsoft_ads__campaign_region_report"], "test.microsoft_ads.not_null_microsoft_ads__campaign_region_report_campaign_id.b1d4f5a20f": ["model.microsoft_ads.microsoft_ads__campaign_region_report"], "test.microsoft_ads.not_null_stg_microsoft_ads__account_history_account_id.cc273ee54e": ["model.microsoft_ads.stg_microsoft_ads__account_history"], "test.microsoft_ads.not_null_stg_microsoft_ads__account_daily_report_account_id.b17f45fe79": ["model.microsoft_ads.stg_microsoft_ads__account_daily_report"], "test.microsoft_ads.not_null_stg_microsoft_ads__ad_group_history_ad_group_id.c8353342b7": ["model.microsoft_ads.stg_microsoft_ads__ad_group_history"], "test.microsoft_ads.not_null_stg_microsoft_ads__ad_group_daily_report_ad_group_id.3e03e6eff7": ["model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report"], "test.microsoft_ads.not_null_stg_microsoft_ads__ad_history_ad_id.6d02c26574": ["model.microsoft_ads.stg_microsoft_ads__ad_history"], "test.microsoft_ads.not_null_stg_microsoft_ads__ad_daily_report_ad_id.1ed6689aa8": ["model.microsoft_ads.stg_microsoft_ads__ad_daily_report"], "test.microsoft_ads.not_null_stg_microsoft_ads__campaign_history_campaign_id.ee080a2122": ["model.microsoft_ads.stg_microsoft_ads__campaign_history"], "test.microsoft_ads.not_null_stg_microsoft_ads__campaign_daily_report_campaign_id.8ac0418e84": ["model.microsoft_ads.stg_microsoft_ads__campaign_daily_report"], "test.microsoft_ads.not_null_stg_microsoft_ads__keyword_history_keyword_id.19164a6209": ["model.microsoft_ads.stg_microsoft_ads__keyword_history"], "test.microsoft_ads.not_null_stg_microsoft_ads__keyword_daily_report_keyword_id.e16b8c5047": ["model.microsoft_ads.stg_microsoft_ads__keyword_daily_report"], "test.microsoft_ads.not_null_stg_microsoft_ads__search_daily_report_search_query.57f687adcc": ["model.microsoft_ads.stg_microsoft_ads__search_daily_report"], "test.facebook_ads.not_null_facebook_ads__url_report_base_url.b7757e50be": ["model.facebook_ads.facebook_ads__url_report"], "test.facebook_ads.not_null_facebook_ads__ad_report_ad_id.3811d9c238": ["model.facebook_ads.facebook_ads__ad_report"], "test.facebook_ads.not_null_facebook_ads__ad_set_report_ad_set_id.1ac870f5e4": ["model.facebook_ads.facebook_ads__ad_set_report"], "test.facebook_ads.not_null_facebook_ads__campaign_report_campaign_id.d4f96d8d21": ["model.facebook_ads.facebook_ads__campaign_report"], "test.facebook_ads.not_null_facebook_ads__account_report_account_id.9be02b4024": ["model.facebook_ads.facebook_ads__account_report"], "test.facebook_ads.not_null_facebook_ads__url_tags__fivetran_id.151d9515f3": ["model.facebook_ads.facebook_ads__url_tags"], "test.facebook_ads.not_null_stg_facebook_ads__account_history_account_id.f1cf38c40f": ["model.facebook_ads.stg_facebook_ads__account_history"], "test.facebook_ads.not_null_stg_facebook_ads__account_history__fivetran_synced.0570e35e1f": ["model.facebook_ads.stg_facebook_ads__account_history"], "test.facebook_ads.not_null_stg_facebook_ads__ad_history_ad_id.11429d3064": ["model.facebook_ads.stg_facebook_ads__ad_history"], "test.facebook_ads.not_null_stg_facebook_ads__ad_history_updated_at.250a5a84e4": ["model.facebook_ads.stg_facebook_ads__ad_history"], "test.facebook_ads.not_null_stg_facebook_ads__ad_set_history_ad_set_id.e19a1df1bb": ["model.facebook_ads.stg_facebook_ads__ad_set_history"], "test.facebook_ads.not_null_stg_facebook_ads__ad_set_history_updated_at.ef7fafe0fa": ["model.facebook_ads.stg_facebook_ads__ad_set_history"], "test.facebook_ads.not_null_stg_facebook_ads__campaign_history_campaign_id.1ca7a83852": ["model.facebook_ads.stg_facebook_ads__campaign_history"], "test.facebook_ads.not_null_stg_facebook_ads__campaign_history_updated_at.9e59f99270": ["model.facebook_ads.stg_facebook_ads__campaign_history"], "test.facebook_ads.not_null_stg_facebook_ads__creative_history__fivetran_synced.3b0593cb4f": ["model.facebook_ads.stg_facebook_ads__creative_history"], "test.facebook_ads.not_null_stg_facebook_ads__creative_history_creative_id.eb4d804261": ["model.facebook_ads.stg_facebook_ads__creative_history"], "test.facebook_ads.not_null_stg_facebook_ads__basic_ad_ad_id.2611b250fc": ["model.facebook_ads.stg_facebook_ads__basic_ad"], "test.facebook_ads.not_null_stg_facebook_ads__basic_ad_account_id.d06f6d861b": ["model.facebook_ads.stg_facebook_ads__basic_ad"], "source.linkedin.linkedin_ads.ad_analytics_by_creative": [], "source.linkedin.linkedin_ads.creative_history": [], "source.linkedin.linkedin_ads.campaign_history": [], "source.linkedin.linkedin_ads.campaign_group_history": [], "source.linkedin.linkedin_ads.account_history": [], "source.linkedin.linkedin_ads.ad_analytics_by_campaign": [], "source.linkedin.linkedin_ads.geo": [], "source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_country": [], "source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_region": [], "source.apple_search_ads.apple_search_ads.ad_group_history": [], "source.apple_search_ads.apple_search_ads.ad_group_report": [], "source.apple_search_ads.apple_search_ads.ad_history": [], "source.apple_search_ads.apple_search_ads.ad_level_report": [], "source.apple_search_ads.apple_search_ads.campaign_history": [], "source.apple_search_ads.apple_search_ads.campaign_report": [], "source.apple_search_ads.apple_search_ads.keyword_history": [], "source.apple_search_ads.apple_search_ads.keyword_report": [], "source.apple_search_ads.apple_search_ads.organization": [], "source.apple_search_ads.apple_search_ads.search_term_report": [], "source.reddit_ads.reddit_ads.business_account": [], "source.reddit_ads.reddit_ads.account_report": [], "source.reddit_ads.reddit_ads.ad": [], "source.reddit_ads.reddit_ads.ad_report": [], "source.reddit_ads.reddit_ads.ad_group": [], "source.reddit_ads.reddit_ads.ad_group_report": [], "source.reddit_ads.reddit_ads.campaign": [], "source.reddit_ads.reddit_ads.campaign_report": [], "source.reddit_ads.reddit_ads.account_conversions_report": [], "source.reddit_ads.reddit_ads.ad_group_conversions_report": [], "source.reddit_ads.reddit_ads.ad_conversions_report": [], "source.reddit_ads.reddit_ads.campaign_conversions_report": [], "source.reddit_ads.reddit_ads.campaign_country_report": [], "source.reddit_ads.reddit_ads.campaign_country_conversions_report": [], "source.snapchat_ads.snapchat_ads.ad_account_history": [], "source.snapchat_ads.snapchat_ads.ad_history": [], "source.snapchat_ads.snapchat_ads.ad_hourly_report": [], "source.snapchat_ads.snapchat_ads.ad_squad_history": [], "source.snapchat_ads.snapchat_ads.ad_squad_hourly_report": [], "source.snapchat_ads.snapchat_ads.campaign_history": [], "source.snapchat_ads.snapchat_ads.campaign_hourly_report": [], "source.snapchat_ads.snapchat_ads.creative_history": [], "source.snapchat_ads.snapchat_ads.creative_url_tag_history": [], "source.snapchat_ads.snapchat_ads.campaign_geo_country_daily_report": [], "source.snapchat_ads.snapchat_ads.campaign_geo_region_daily_report": [], "source.pinterest.pinterest_ads.pin_promotion_report": [], "source.pinterest.pinterest_ads.pin_promotion_history": [], "source.pinterest.pinterest_ads.campaign_history": [], "source.pinterest.pinterest_ads.ad_group_history": [], "source.pinterest.pinterest_ads.ad_group_report": [], "source.pinterest.pinterest_ads.advertiser_history": [], "source.pinterest.pinterest_ads.advertiser_report": [], "source.pinterest.pinterest_ads.campaign_report": [], "source.pinterest.pinterest_ads.keyword_history": [], "source.pinterest.pinterest_ads.keyword_report": [], "source.pinterest.pinterest_ads.pin_promotion_targeting_report": [], "source.pinterest.pinterest_ads.targeting_geo": [], "source.pinterest.pinterest_ads.targeting_geo_region": [], "source.google_ads.google_ads.ad_stats": [], "source.google_ads.google_ads.ad_history": [], "source.google_ads.google_ads.ad_group_history": [], "source.google_ads.google_ads.campaign_history": [], "source.google_ads.google_ads.account_history": [], "source.google_ads.google_ads.ad_group_criterion_history": [], "source.google_ads.google_ads.ad_group_stats": [], "source.google_ads.google_ads.campaign_stats": [], "source.google_ads.google_ads.keyword_stats": [], "source.google_ads.google_ads.account_stats": [], "source.google_ads.google_ads.search_term_keyword_stats": [], "source.google_ads.google_ads.campaign_bid_modifier_history": [], "source.google_ads.google_ads.campaign_budget_history": [], "source.google_ads.google_ads.campaign_criterion_history": [], "source.google_ads.google_ads.campaign_bidding_strategy_history": [], "source.amazon_ads.amazon_ads.ad_group_history": [], "source.amazon_ads.amazon_ads.ad_group_level_report": [], "source.amazon_ads.amazon_ads.advertised_product_report": [], "source.amazon_ads.amazon_ads.campaign_history": [], "source.amazon_ads.amazon_ads.campaign_level_report": [], "source.amazon_ads.amazon_ads.keyword_history": [], "source.amazon_ads.amazon_ads.portfolio_history": [], "source.amazon_ads.amazon_ads.product_ad_history": [], "source.amazon_ads.amazon_ads.profile": [], "source.amazon_ads.amazon_ads.targeting_keyword_report": [], "source.amazon_ads.amazon_ads.search_term_ad_keyword_report": [], "source.twitter_ads.twitter_ads.account_history": [], "source.twitter_ads.twitter_ads.campaign_history": [], "source.twitter_ads.twitter_ads.line_item_history": [], "source.twitter_ads.twitter_ads.promoted_tweet_history": [], "source.twitter_ads.twitter_ads.tweet_url": [], "source.twitter_ads.twitter_ads.promoted_tweet_report": [], "source.twitter_ads.twitter_ads.tweet": [], "source.twitter_ads.twitter_ads.campaign_report": [], "source.twitter_ads.twitter_ads.line_item_report": [], "source.twitter_ads.twitter_ads.line_item_keywords_report": [], "source.twitter_ads.twitter_ads.campaign_locations_report": [], "source.twitter_ads.twitter_ads.campaign_regions_report": [], "source.tiktok_ads.tiktok_ads.advertiser": [], "source.tiktok_ads.tiktok_ads.campaign_history": [], "source.tiktok_ads.tiktok_ads.adgroup_history": [], "source.tiktok_ads.tiktok_ads.ad_history": [], "source.tiktok_ads.tiktok_ads.ad_report_hourly": [], "source.tiktok_ads.tiktok_ads.campaign_report_hourly": [], "source.tiktok_ads.tiktok_ads.adgroup_report_hourly": [], "source.tiktok_ads.tiktok_ads.campaign_country_report": [], "source.tiktok_ads.tiktok_ads.location": [], "source.microsoft_ads.microsoft_ads.account_history": [], "source.microsoft_ads.microsoft_ads.account_performance_daily_report": [], "source.microsoft_ads.microsoft_ads.ad_group_history": [], "source.microsoft_ads.microsoft_ads.ad_group_performance_daily_report": [], "source.microsoft_ads.microsoft_ads.ad_history": [], "source.microsoft_ads.microsoft_ads.ad_performance_daily_report": [], "source.microsoft_ads.microsoft_ads.campaign_history": [], "source.microsoft_ads.microsoft_ads.campaign_performance_daily_report": [], "source.microsoft_ads.microsoft_ads.keyword_history": [], "source.microsoft_ads.microsoft_ads.keyword_performance_daily_report": [], "source.microsoft_ads.microsoft_ads.search_query_performance_daily_report": [], "source.microsoft_ads.microsoft_ads.geographic_performance_daily_report": [], "source.facebook_ads.facebook_ads.account_history": [], "source.facebook_ads.facebook_ads.ad_history": [], "source.facebook_ads.facebook_ads.ad_set_history": [], "source.facebook_ads.facebook_ads.basic_ad": [], "source.facebook_ads.facebook_ads.basic_ad_actions": [], "source.facebook_ads.facebook_ads.basic_ad_action_values": [], "source.facebook_ads.facebook_ads.campaign_history": [], "source.facebook_ads.facebook_ads.creative_history": [], "source.facebook_ads.facebook_ads.demographics_country": [], "source.facebook_ads.facebook_ads.demographics_country_actions": [], "source.facebook_ads.facebook_ads.demographics_region": [], "source.facebook_ads.facebook_ads.demographics_region_actions": [], "metric.ad_reporting.active_ads": ["semantic_model.ad_reporting.ad_report"], "metric.ad_reporting.avg_spend_nonzero": ["semantic_model.ad_reporting.ad_report"], "metric.ad_reporting.avg_spend": ["semantic_model.ad_reporting.ad_report"], "metric.ad_reporting.clicks": ["semantic_model.ad_reporting.ad_report"], "metric.ad_reporting.impressions": ["semantic_model.ad_reporting.ad_report"], "metric.ad_reporting.spend": ["semantic_model.ad_reporting.ad_report"], "metric.ad_reporting.clickthrough_rate": ["metric.ad_reporting.clicks", "metric.ad_reporting.impressions"], "metric.ad_reporting.cost_per_click": ["metric.ad_reporting.clicks", "metric.ad_reporting.spend"], "metric.ad_reporting.bounce_rate": ["metric.ad_reporting.clicks", "metric.ad_reporting.impressions"], "semantic_model.ad_reporting.ad_report": ["model.ad_reporting.ad_reporting__ad_report"]}, "child_map": {"seed.ad_reporting_integration_tests.twitter_campaign_locations_report_data": [], "seed.ad_reporting_integration_tests.apple_search_ad_history_data": [], "seed.ad_reporting_integration_tests.snapchat_ad_hourly_report_data": [], "seed.ad_reporting_integration_tests.linkedin_ad_account_history_data": [], "seed.ad_reporting_integration_tests.google_ads_account_history_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_campaign_performance_daily_report_data": [], "seed.ad_reporting_integration_tests.tiktok_advertiser_data": [], "seed.ad_reporting_integration_tests.amazon_ads_targeting_keyword_report_data": [], "seed.ad_reporting_integration_tests.snapchat_creative_url_tag_history_data": [], "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_actions_data": [], "seed.ad_reporting_integration_tests.amazon_ads_ad_group_history_data": [], "seed.ad_reporting_integration_tests.reddit_ads_campaign_data": [], "seed.ad_reporting_integration_tests.apple_search_ad_report_data": [], "seed.ad_reporting_integration_tests.reddit_ads_ad_group_report_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_geographic_performance_daily_report_data": [], "seed.ad_reporting_integration_tests.twitter_promoted_tweet_report_data": [], "seed.ad_reporting_integration_tests.snapchat_creative_history_data": [], "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_data": [], "seed.ad_reporting_integration_tests.google_ads_ad_group_criterion_history_data": [], "seed.ad_reporting_integration_tests.amazon_ads_portfolio_history_data": [], "seed.ad_reporting_integration_tests.apple_search_organization_data": [], "seed.ad_reporting_integration_tests.twitter_campaign_history_data": [], "seed.ad_reporting_integration_tests.linkedin_monthly_ad_analytics_by_member_region_data": [], "seed.ad_reporting_integration_tests.apple_search_campaign_history_data": [], "seed.ad_reporting_integration_tests.pinterest_campaign_report_data": [], "seed.ad_reporting_integration_tests.snapchat_campaign_history_data": [], "seed.ad_reporting_integration_tests.twitter_account_report_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_account_history_data": [], "seed.ad_reporting_integration_tests.snapchat_campaign_hourly_report_data": [], "seed.ad_reporting_integration_tests.facebook_ads_account_history_data": [], "seed.ad_reporting_integration_tests.apple_search_search_term_report_data": [], "seed.ad_reporting_integration_tests.linkedin_monthly_ad_analytics_by_member_country_data": [], "seed.ad_reporting_integration_tests.twitter_promoted_tweet_history_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_search_performance_daily_report_data": [], "seed.ad_reporting_integration_tests.reddit_ads_campaign_report_data": [], "seed.ad_reporting_integration_tests.facebook_ads_demographics_region_actions_data": [], "seed.ad_reporting_integration_tests.twitter_campaign_regions_report_data": [], "seed.ad_reporting_integration_tests.reddit_ads_campaign_country_conversions_report_data": [], "seed.ad_reporting_integration_tests.google_ads_search_term_keyword_stats_data": [], "seed.ad_reporting_integration_tests.snapchat_ad_history_data": [], "seed.ad_reporting_integration_tests.reddit_ads_ad_report_data": [], "seed.ad_reporting_integration_tests.google_ads_campaign_bidding_strategy_history_data": [], "seed.ad_reporting_integration_tests.google_ads_campaign_budget_history_data": [], "seed.ad_reporting_integration_tests.reddit_ads_ad_conversions": [], "seed.ad_reporting_integration_tests.tiktok_location_data": [], "seed.ad_reporting_integration_tests.pinterest_advertiser_report_data": [], "seed.ad_reporting_integration_tests.snapchat_ad_squad_history_data": [], "seed.ad_reporting_integration_tests.twitter_tweet_url_data": [], "seed.ad_reporting_integration_tests.linkedin_ad_creative_history_data": [], "seed.ad_reporting_integration_tests.amazon_ads_search_term_ad_keyword_report_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_ad_group_history_data": [], "seed.ad_reporting_integration_tests.facebook_ads_demographics_region_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_ad_performance_daily_report_data": [], "seed.ad_reporting_integration_tests.apple_search_keyword_history_data": [], "seed.ad_reporting_integration_tests.reddit_ads_account_data": [], "seed.ad_reporting_integration_tests.linkedin_ad_campaign_group_history_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_keyword_performance_daily_report_data": [], "seed.ad_reporting_integration_tests.google_ads_ad_group_history_data": [], "seed.ad_reporting_integration_tests.amazon_ads_profile_data": [], "seed.ad_reporting_integration_tests.pinterest_campaign_history_data": [], "seed.ad_reporting_integration_tests.twitter_line_item_report_data": [], "seed.ad_reporting_integration_tests.google_ads_campaign_stats_data": [], "seed.ad_reporting_integration_tests.twitter_line_item_history_data": [], "seed.ad_reporting_integration_tests.google_ads_ad_stats_data": [], "seed.ad_reporting_integration_tests.reddit_ads_account_conversions": [], "seed.ad_reporting_integration_tests.google_ads_account_stats_data": [], "seed.ad_reporting_integration_tests.snapchat_campaign_geo_country_daily_report_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_ad_group_performance_daily_report_data": [], "seed.ad_reporting_integration_tests.amazon_ads_product_ad_history_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_ad_history_data": [], "seed.ad_reporting_integration_tests.reddit_ads_campaign_country_report_data": [], "seed.ad_reporting_integration_tests.facebook_ads_ad_history_data": [], "seed.ad_reporting_integration_tests.pinterest_ad_group_report_data": [], "seed.ad_reporting_integration_tests.twitter_campaign_report_data": [], "seed.ad_reporting_integration_tests.facebook_ads_ad_set_history_data": [], "seed.ad_reporting_integration_tests.snapchat_campaign_geo_region_daily_report_data": [], "seed.ad_reporting_integration_tests.pinterest_pin_promotion_history_data": [], "seed.ad_reporting_integration_tests.amazon_ads_ad_group_level_report_data": [], "seed.ad_reporting_integration_tests.twitter_line_item_keywords_report_data": [], "seed.ad_reporting_integration_tests.twitter_tweet_data": [], "seed.ad_reporting_integration_tests.tiktok_campaign_country_report_data": [], "seed.ad_reporting_integration_tests.facebook_ads_creative_history_data": [], "seed.ad_reporting_integration_tests.facebook_ads_campaign_history_data": [], "seed.ad_reporting_integration_tests.amazon_ads_campaign_level_report_data": [], "seed.ad_reporting_integration_tests.google_ads_ad_group_stats_data": [], "seed.ad_reporting_integration_tests.apple_search_keyword_report_data": [], "seed.ad_reporting_integration_tests.tiktok_campaign_report_hourly_data": [], "seed.ad_reporting_integration_tests.amazon_ads_advertised_product_report_data": [], "seed.ad_reporting_integration_tests.twitter_account_history_data": [], "seed.ad_reporting_integration_tests.apple_search_ad_group_history_data": [], "seed.ad_reporting_integration_tests.tiktok_adgroup_history_data": [], "seed.ad_reporting_integration_tests.apple_search_campaign_report_data": [], "seed.ad_reporting_integration_tests.reddit_ads_ad_data": [], "seed.ad_reporting_integration_tests.snapchat_ad_squad_hourly_report_data": [], "seed.ad_reporting_integration_tests.linkedin_ad_analytics_by_campaign_data": [], "seed.ad_reporting_integration_tests.snapchat_ad_account_history_data": [], "seed.ad_reporting_integration_tests.tiktok_ad_history_data": [], "seed.ad_reporting_integration_tests.linkedin_ad_analytics_by_creative_data": [], "seed.ad_reporting_integration_tests.reddit_ads_account_report_data": [], "seed.ad_reporting_integration_tests.reddit_ads_ad_group_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_campaign_history_data": [], "seed.ad_reporting_integration_tests.pinterest_pin_promotion_report_data": [], "seed.ad_reporting_integration_tests.pinterest_targeting_geo_data": [], "seed.ad_reporting_integration_tests.linkedin_geo_data": [], "seed.ad_reporting_integration_tests.linkedin_ad_campaign_history_data": [], "seed.ad_reporting_integration_tests.tiktok_campaign_history_data": [], "seed.ad_reporting_integration_tests.google_ads_ad_history_data": [], "seed.ad_reporting_integration_tests.google_ads_campaign_criterion_history_data": [], "seed.ad_reporting_integration_tests.google_ads_campaign_bid_modifier_history_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_account_performance_daily_report_data": [], "seed.ad_reporting_integration_tests.tiktok_adgroup_report_hourly_data": [], "seed.ad_reporting_integration_tests.google_ads_keyword_stats_data": [], "seed.ad_reporting_integration_tests.pinterest_keyword_report_data": [], "seed.ad_reporting_integration_tests.google_ads_campaign_history_data": [], "seed.ad_reporting_integration_tests.pinterest_keyword_history_data": [], "seed.ad_reporting_integration_tests.pinterest_ad_group_history_data": [], "seed.ad_reporting_integration_tests.pinterest_advertiser_history_data": [], "seed.ad_reporting_integration_tests.amazon_ads_campaign_history_data": [], "seed.ad_reporting_integration_tests.facebook_ads_demographics_country_data": [], "seed.ad_reporting_integration_tests.reddit_ads_campaign_conversions": [], "seed.ad_reporting_integration_tests.facebook_ads_demographics_country_actions_data": [], "seed.ad_reporting_integration_tests.apple_search_ad_group_report_data": [], "seed.ad_reporting_integration_tests.reddit_ads_business_account_data": [], "seed.ad_reporting_integration_tests.microsoft_ads_keyword_history_data": [], "seed.ad_reporting_integration_tests.amazon_ads_keyword_history_data": [], "seed.ad_reporting_integration_tests.pinterest_pin_promotion_targeting_report_data": [], "seed.ad_reporting_integration_tests.reddit_ads_ad_group_conversions": [], "seed.ad_reporting_integration_tests.tiktok_ad_report_hourly_data": [], "seed.ad_reporting_integration_tests.pinterest_targeting_geo_region_data": [], "seed.ad_reporting_integration_tests.facebook_ads_basic_ad_action_values_data": [], "model.linkedin.linkedin_ads__creative_report": ["model.ad_reporting.int_ad_reporting__ad_report", "test.linkedin.not_null_linkedin_ads__creative_report_creative_id.096d93f889", "test.linkedin.not_null_linkedin_ads__creative_report_date_day.0c6338b020"], "model.linkedin.linkedin_ads__campaign_report": ["model.ad_reporting.int_ad_reporting__ad_group_report", "test.linkedin.not_null_linkedin_ads__campaign_report_campaign_id.bf43964b15", "test.linkedin.not_null_linkedin_ads__campaign_report_date_day.8d320b88b1"], "model.linkedin.linkedin_ads__monthly_campaign_region_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_region_report", "test.linkedin.not_null_linkedin_ads__monthly_campaign_region_report_campaign_id.5884bc5d68", "test.linkedin.not_null_linkedin_ads__monthly_campaign_region_report_date_month.4fd809085e"], "model.linkedin.linkedin_ads__monthly_campaign_country_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_country_report", "test.linkedin.not_null_linkedin_ads__monthly_campaign_country_report_campaign_id.4624641c1c", "test.linkedin.not_null_linkedin_ads__monthly_campaign_country_report_date_month.ab0a8d3050"], "model.linkedin.linkedin_ads__account_report": ["model.ad_reporting.int_ad_reporting__account_report", "test.linkedin.not_null_linkedin_ads__account_report_account_id.0c34ea1842", "test.linkedin.not_null_linkedin_ads__account_report_date_day.c4b33f8f53"], "model.linkedin.linkedin_ads__campaign_group_report": ["model.ad_reporting.int_ad_reporting__campaign_report", "test.linkedin.not_null_linkedin_ads__campaign_group_report_campaign_group_id.39b448cdaf", "test.linkedin.not_null_linkedin_ads__campaign_group_report_date_day.2676a1f76b"], "model.linkedin.linkedin_ads__url_report": ["model.ad_reporting.int_ad_reporting__url_report", "test.linkedin.not_null_linkedin_ads__url_report_click_uri.81534087cb", "test.linkedin.not_null_linkedin_ads__url_report_creative_id.83967fe9d2", "test.linkedin.not_null_linkedin_ads__url_report_date_day.48b540f315"], "model.linkedin.stg_linkedin_ads__geo": ["model.linkedin.linkedin_ads__monthly_campaign_country_report", "model.linkedin.linkedin_ads__monthly_campaign_region_report", "test.linkedin.not_null_stg_linkedin_ads__geo_geo_id.a9fc61210c"], "model.linkedin.stg_linkedin_ads__account_history": ["model.linkedin.linkedin_ads__account_report", "model.linkedin.linkedin_ads__campaign_group_report", "model.linkedin.linkedin_ads__campaign_report", "model.linkedin.linkedin_ads__creative_report", "model.linkedin.linkedin_ads__monthly_campaign_country_report", "model.linkedin.linkedin_ads__monthly_campaign_region_report", "model.linkedin.linkedin_ads__url_report", "test.linkedin.not_null_stg_linkedin_ads__account_history_account_id.a9fa7f93c0", "test.linkedin.not_null_stg_linkedin_ads__account_history_version_tag.58c46c5d81"], "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative": ["model.linkedin.linkedin_ads__creative_report", "model.linkedin.linkedin_ads__url_report", "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_creative_creative_id.062abfe14b", "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_creative_date_day.cb81bc4766"], "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country": ["model.linkedin.linkedin_ads__monthly_campaign_country_report", "test.linkedin.not_null_stg_linkedin_ads__monthly_ad_analytics_by_country_date_month.553fe89e70"], "model.linkedin.stg_linkedin_ads__campaign_group_history": ["model.linkedin.linkedin_ads__campaign_group_report", "model.linkedin.linkedin_ads__campaign_report", "model.linkedin.linkedin_ads__creative_report", "model.linkedin.linkedin_ads__monthly_campaign_country_report", "model.linkedin.linkedin_ads__monthly_campaign_region_report", "model.linkedin.linkedin_ads__url_report", "test.linkedin.not_null_stg_linkedin_ads__campaign_group_history_campaign_group_id.3888f3777d", "test.linkedin.not_null_stg_linkedin_ads__campaign_group_history_last_modified_at.a716e2a7ea"], "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region": ["model.linkedin.linkedin_ads__monthly_campaign_region_report", "test.linkedin.not_null_stg_linkedin_ads__monthly_ad_analytics_by_region_date_month.d065ed2b78"], "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign": ["model.linkedin.linkedin_ads__account_report", "model.linkedin.linkedin_ads__campaign_group_report", "model.linkedin.linkedin_ads__campaign_report", "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_campaign_campaign_id.d6ae242f1a", "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_campaign_date_day.ef97bed766"], "model.linkedin.stg_linkedin_ads__campaign_history": ["model.linkedin.linkedin_ads__account_report", "model.linkedin.linkedin_ads__campaign_group_report", "model.linkedin.linkedin_ads__campaign_report", "model.linkedin.linkedin_ads__creative_report", "model.linkedin.linkedin_ads__monthly_campaign_country_report", "model.linkedin.linkedin_ads__monthly_campaign_region_report", "model.linkedin.linkedin_ads__url_report", "test.linkedin.not_null_stg_linkedin_ads__campaign_history_campaign_id.b026971ca2", "test.linkedin.not_null_stg_linkedin_ads__campaign_history_version_tag.64954cc469"], "model.linkedin.stg_linkedin_ads__creative_history": ["model.linkedin.linkedin_ads__creative_report", "model.linkedin.linkedin_ads__url_report", "test.linkedin.not_null_stg_linkedin_ads__creative_history_creative_id.4d51d55474"], "model.linkedin.stg_linkedin_ads__creative_history_tmp": ["model.linkedin.stg_linkedin_ads__creative_history"], "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region_tmp": ["model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region"], "model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country_tmp": ["model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country"], "model.linkedin.stg_linkedin_ads__campaign_history_tmp": ["model.linkedin.stg_linkedin_ads__campaign_history"], "model.linkedin.stg_linkedin_ads__campaign_group_history_tmp": ["model.linkedin.stg_linkedin_ads__campaign_group_history"], "model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign_tmp": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign"], "model.linkedin.stg_linkedin_ads__ad_analytics_by_creative_tmp": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_creative"], "model.linkedin.stg_linkedin_ads__geo_tmp": ["model.linkedin.stg_linkedin_ads__geo"], "model.linkedin.stg_linkedin_ads__account_history_tmp": ["model.linkedin.stg_linkedin_ads__account_history"], "model.apple_search_ads.apple_search_ads__campaign_report": ["model.ad_reporting.int_ad_reporting__campaign_report", "test.apple_search_ads.not_null_apple_search_ads__campaign_report_campaign_id.e26ed1e146", "test.apple_search_ads.not_null_apple_search_ads__campaign_report_date_day.35652b8d1a"], "model.apple_search_ads.apple_search_ads__organization_report": ["model.ad_reporting.int_ad_reporting__account_report", "test.apple_search_ads.not_null_apple_search_ads__organization_report_date_day.5784fed523", "test.apple_search_ads.not_null_apple_search_ads__organization_report_organization_id.b6cf7d69f8"], "model.apple_search_ads.apple_search_ads__search_term_report": ["model.ad_reporting.int_ad_reporting__search_report", "test.apple_search_ads.not_null_apple_search_ads__search_term_report_date_day.1bc3b0d57c", "test.apple_search_ads.not_null_apple_search_ads__search_term_report_search_term_text.aecc7447f7"], "model.apple_search_ads.apple_search_ads__ad_report": ["model.ad_reporting.int_ad_reporting__ad_report", "test.apple_search_ads.not_null_apple_search_ads__ad_report_ad_id.0ab2c5075c", "test.apple_search_ads.not_null_apple_search_ads__ad_report_date_day.b86c049e17"], "model.apple_search_ads.apple_search_ads__keyword_report": ["model.ad_reporting.int_ad_reporting__keyword_report", "test.apple_search_ads.not_null_apple_search_ads__keyword_report_date_day.3dec8d0e82", "test.apple_search_ads.not_null_apple_search_ads__keyword_report_keyword_id.ea493710db"], "model.apple_search_ads.apple_search_ads__ad_group_report": ["model.ad_reporting.int_ad_reporting__ad_group_report", "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_ad_group_id.60febec6b5", "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_date_day.e6ffb30b3c"], "model.apple_search_ads.stg_apple_search_ads__ad_group_history": ["model.apple_search_ads.apple_search_ads__ad_group_report", "model.apple_search_ads.apple_search_ads__ad_report", "model.apple_search_ads.apple_search_ads__keyword_report", "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7", "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f"], "model.apple_search_ads.stg_apple_search_ads__keyword_history": ["model.apple_search_ads.apple_search_ads__keyword_report", "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2", "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287"], "model.apple_search_ads.stg_apple_search_ads__keyword_report": ["model.apple_search_ads.apple_search_ads__keyword_report", "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928", "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e"], "model.apple_search_ads.stg_apple_search_ads__campaign_report": ["model.apple_search_ads.apple_search_ads__campaign_report", "model.apple_search_ads.apple_search_ads__organization_report", "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728", "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3"], "model.apple_search_ads.stg_apple_search_ads__search_term_report": ["model.apple_search_ads.apple_search_ads__search_term_report", "test.apple_search_ads.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad", "test.apple_search_ads.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302"], "model.apple_search_ads.stg_apple_search_ads__campaign_history": ["model.apple_search_ads.apple_search_ads__ad_group_report", "model.apple_search_ads.apple_search_ads__ad_report", "model.apple_search_ads.apple_search_ads__campaign_report", "model.apple_search_ads.apple_search_ads__keyword_report", "model.apple_search_ads.apple_search_ads__organization_report", "model.apple_search_ads.apple_search_ads__search_term_report", "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8", "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9"], "model.apple_search_ads.stg_apple_search_ads__ad_report": ["model.apple_search_ads.apple_search_ads__ad_report", "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f", "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58", "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8"], "model.apple_search_ads.stg_apple_search_ads__ad_history": ["model.apple_search_ads.apple_search_ads__ad_report", "test.apple_search_ads.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a", "test.apple_search_ads.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d"], "model.apple_search_ads.stg_apple_search_ads__ad_group_report": ["model.apple_search_ads.apple_search_ads__ad_group_report", "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1", "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b"], "model.apple_search_ads.stg_apple_search_ads__organization": ["model.apple_search_ads.apple_search_ads__ad_group_report", "model.apple_search_ads.apple_search_ads__ad_report", "model.apple_search_ads.apple_search_ads__campaign_report", "model.apple_search_ads.apple_search_ads__keyword_report", "model.apple_search_ads.apple_search_ads__organization_report", "model.apple_search_ads.apple_search_ads__search_term_report", "test.apple_search_ads.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb"], "model.apple_search_ads.stg_apple_search_ads__ad_group_history_tmp": ["model.apple_search_ads.stg_apple_search_ads__ad_group_history"], "model.apple_search_ads.stg_apple_search_ads__campaign_report_tmp": ["model.apple_search_ads.stg_apple_search_ads__campaign_report"], "model.apple_search_ads.stg_apple_search_ads__campaign_history_tmp": ["model.apple_search_ads.stg_apple_search_ads__campaign_history"], "model.apple_search_ads.stg_apple_search_ads__keyword_history_tmp": ["model.apple_search_ads.stg_apple_search_ads__keyword_history"], "model.apple_search_ads.stg_apple_search_ads__search_term_report_tmp": ["model.apple_search_ads.stg_apple_search_ads__search_term_report"], "model.apple_search_ads.stg_apple_search_ads__keyword_report_tmp": ["model.apple_search_ads.stg_apple_search_ads__keyword_report"], "model.apple_search_ads.stg_apple_search_ads__ad_history_tmp": ["model.apple_search_ads.stg_apple_search_ads__ad_history"], "model.apple_search_ads.stg_apple_search_ads__ad_report_tmp": ["model.apple_search_ads.stg_apple_search_ads__ad_report"], "model.apple_search_ads.stg_apple_search_ads__ad_group_report_tmp": ["model.apple_search_ads.stg_apple_search_ads__ad_group_report"], "model.apple_search_ads.stg_apple_search_ads__organization_tmp": ["model.apple_search_ads.stg_apple_search_ads__organization"], "model.reddit_ads.reddit_ads__campaign_report": ["model.ad_reporting.int_ad_reporting__campaign_report", "test.reddit_ads.not_null_reddit_ads__campaign_report_campaign_id.f5491a0b49", "test.reddit_ads.not_null_reddit_ads__campaign_report_date_day.f79cca4131"], "model.reddit_ads.reddit_ads__campaign_country_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_country_report"], "model.reddit_ads.reddit_ads__url_report": ["model.ad_reporting.int_ad_reporting__url_report", "test.reddit_ads.not_null_reddit_ads__url_report_ad_id.8ff83da2b0", "test.reddit_ads.not_null_reddit_ads__url_report_base_url.2f585bebcb", "test.reddit_ads.not_null_reddit_ads__url_report_date_day.4b0f6363da"], "model.reddit_ads.reddit_ads__account_report": ["model.ad_reporting.int_ad_reporting__account_report", "test.reddit_ads.not_null_reddit_ads__account_report_account_id.16f11188c5", "test.reddit_ads.not_null_reddit_ads__account_report_date_day.7b43e6cb90"], "model.reddit_ads.reddit_ads__ad_report": ["model.ad_reporting.int_ad_reporting__ad_report", "test.reddit_ads.not_null_reddit_ads__ad_report_ad_id.1da054a14e", "test.reddit_ads.not_null_reddit_ads__ad_report_date_day.608b21c69a"], "model.reddit_ads.reddit_ads__ad_group_report": ["model.ad_reporting.int_ad_reporting__ad_group_report", "test.reddit_ads.not_null_reddit_ads__ad_group_report_ad_group_id.057bd60604", "test.reddit_ads.not_null_reddit_ads__ad_group_report_date_day.6463e6f6f7"], "model.reddit_ads.stg_reddit_ads__ad_group": ["model.reddit_ads.reddit_ads__ad_group_report", "model.reddit_ads.reddit_ads__ad_report", "model.reddit_ads.reddit_ads__url_report", "test.reddit_ads.not_null_stg_reddit_ads__ad_group_ad_group_id.65795d8dc2"], "model.reddit_ads.stg_reddit_ads__ad_report": ["model.reddit_ads.reddit_ads__ad_report", "model.reddit_ads.reddit_ads__url_report", "test.reddit_ads.not_null_stg_reddit_ads__ad_report_ad_id.c4af84b857"], "model.reddit_ads.stg_reddit_ads__ad_conversions_report": ["model.reddit_ads.reddit_ads__ad_report", "model.reddit_ads.reddit_ads__url_report"], "model.reddit_ads.stg_reddit_ads__campaign": ["model.reddit_ads.reddit_ads__ad_group_report", "model.reddit_ads.reddit_ads__ad_report", "model.reddit_ads.reddit_ads__campaign_country_report", "model.reddit_ads.reddit_ads__campaign_report", "model.reddit_ads.reddit_ads__url_report", "test.reddit_ads.not_null_stg_reddit_ads__campaign_campaign_id.f3f24e4682"], "model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report": ["model.reddit_ads.reddit_ads__campaign_country_report"], "model.reddit_ads.stg_reddit_ads__campaign_report": ["model.reddit_ads.reddit_ads__campaign_report", "test.reddit_ads.not_null_stg_reddit_ads__campaign_report_campaign_id.c717612b4f"], "model.reddit_ads.stg_reddit_ads__ad": ["model.reddit_ads.reddit_ads__ad_report", "model.reddit_ads.reddit_ads__url_report", "test.reddit_ads.not_null_stg_reddit_ads__ad_ad_id.40188b63dd"], "model.reddit_ads.stg_reddit_ads__account_conversions_report": ["model.reddit_ads.reddit_ads__account_report"], "model.reddit_ads.stg_reddit_ads__account_report": ["model.reddit_ads.reddit_ads__account_report", "test.reddit_ads.not_null_stg_reddit_ads__account_report_account_id.1f2a0195de"], "model.reddit_ads.stg_reddit_ads__campaign_conversions_report": ["model.reddit_ads.reddit_ads__campaign_report"], "model.reddit_ads.stg_reddit_ads__ad_group_conversions_report": ["model.reddit_ads.reddit_ads__ad_group_report"], "model.reddit_ads.stg_reddit_ads__ad_group_report": ["model.reddit_ads.reddit_ads__ad_group_report", "test.reddit_ads.not_null_stg_reddit_ads__ad_group_report_ad_group_id.9836cd084d"], "model.reddit_ads.stg_reddit_ads__campaign_country_report": ["model.reddit_ads.reddit_ads__campaign_country_report"], "model.reddit_ads.stg_reddit_ads__account": ["model.reddit_ads.reddit_ads__account_report", "model.reddit_ads.reddit_ads__ad_group_report", "model.reddit_ads.reddit_ads__ad_report", "model.reddit_ads.reddit_ads__campaign_country_report", "model.reddit_ads.reddit_ads__campaign_report", "model.reddit_ads.reddit_ads__url_report", "test.reddit_ads.not_null_stg_reddit_ads__account_account_id.512f0b8078"], "model.reddit_ads.stg_reddit_ads__ad_conversions_report_tmp": ["model.reddit_ads.stg_reddit_ads__ad_conversions_report"], "model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report_tmp": ["model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report"], "model.reddit_ads.stg_reddit_ads__account_report_tmp": ["model.reddit_ads.stg_reddit_ads__account_report"], "model.reddit_ads.stg_reddit_ads__campaign_report_tmp": ["model.reddit_ads.stg_reddit_ads__campaign_report"], "model.reddit_ads.stg_reddit_ads__ad_group_conversions_report_tmp": ["model.reddit_ads.stg_reddit_ads__ad_group_conversions_report"], "model.reddit_ads.stg_reddit_ads__ad_tmp": ["model.reddit_ads.stg_reddit_ads__ad"], "model.reddit_ads.stg_reddit_ads__campaign_country_report_tmp": ["model.reddit_ads.stg_reddit_ads__campaign_country_report"], "model.reddit_ads.stg_reddit_ads__account_tmp": ["model.reddit_ads.stg_reddit_ads__account"], "model.reddit_ads.stg_reddit_ads__campaign_tmp": ["model.reddit_ads.stg_reddit_ads__campaign"], "model.reddit_ads.stg_reddit_ads__ad_group_report_tmp": ["model.reddit_ads.stg_reddit_ads__ad_group_report"], "model.reddit_ads.stg_reddit_ads__account_conversions_report_tmp": ["model.reddit_ads.stg_reddit_ads__account_conversions_report"], "model.reddit_ads.stg_reddit_ads__ad_group_tmp": ["model.reddit_ads.stg_reddit_ads__ad_group"], "model.reddit_ads.stg_reddit_ads__campaign_conversions_report_tmp": ["model.reddit_ads.stg_reddit_ads__campaign_conversions_report"], "model.reddit_ads.stg_reddit_ads__ad_report_tmp": ["model.reddit_ads.stg_reddit_ads__ad_report"], "model.snapchat_ads.snapchat_ads__campaign_report": ["model.ad_reporting.int_ad_reporting__campaign_report", "test.snapchat_ads.not_null_snapchat_ads__campaign_report_campaign_id.19fd7135ac", "test.snapchat_ads.not_null_snapchat_ads__campaign_report_date_day.4e4e31223b"], "model.snapchat_ads.snapchat_ads__url_report": ["model.ad_reporting.int_ad_reporting__url_report", "test.snapchat_ads.not_null_snapchat_ads__url_report_ad_id.ecbdfc0d78", "test.snapchat_ads.not_null_snapchat_ads__url_report_base_url.15676dc1de", "test.snapchat_ads.not_null_snapchat_ads__url_report_date_day.bcbe87a7f6"], "model.snapchat_ads.snapchat_ads__campaign_country_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_country_report", "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_campaign_id.33fe016201", "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_country.332a585832", "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_date_day.b946d6ae47"], "model.snapchat_ads.snapchat_ads__campaign_region_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_region_report", "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_campaign_id.9b92b4f074", "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_date_day.3d3ad303c4", "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_region.041579919a"], "model.snapchat_ads.snapchat_ads__ad_squad_report": ["model.ad_reporting.int_ad_reporting__ad_group_report", "test.snapchat_ads.not_null_snapchat_ads__ad_squad_report_ad_squad_id.424c0bbffe", "test.snapchat_ads.not_null_snapchat_ads__ad_squad_report_date_day.39118ca639"], "model.snapchat_ads.snapchat_ads__ad_report": ["model.ad_reporting.int_ad_reporting__ad_report", "test.snapchat_ads.not_null_snapchat_ads__ad_report_ad_id.9000850744", "test.snapchat_ads.not_null_snapchat_ads__ad_report_date_day.7c5350c8fe"], "model.snapchat_ads.snapchat_ads__account_report": ["model.ad_reporting.int_ad_reporting__account_report", "test.snapchat_ads.not_null_snapchat_ads__account_report_ad_account_id.589c81966b", "test.snapchat_ads.not_null_snapchat_ads__account_report_date_day.688d7ed260"], "model.snapchat_ads.stg_snapchat_ads__creative_history": ["model.snapchat_ads.snapchat_ads__creative_history_prep", "test.snapchat_ads.not_null_stg_snapchat_ads__creative_history__fivetran_synced.b9c95b4380", "test.snapchat_ads.not_null_stg_snapchat_ads__creative_history_creative_id.09c83690f4"], "model.snapchat_ads.stg_snapchat_ads__ad_squad_history": ["model.snapchat_ads.snapchat_ads__account_report", "model.snapchat_ads.snapchat_ads__ad_report", "model.snapchat_ads.snapchat_ads__ad_squad_report", "model.snapchat_ads.snapchat_ads__url_report", "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_history__fivetran_synced.7ed7d105ae", "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_history_ad_squad_id.71c7122278"], "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report": ["model.snapchat_ads.snapchat_ads__account_report", "model.snapchat_ads.snapchat_ads__ad_report", "model.snapchat_ads.snapchat_ads__url_report", "test.snapchat_ads.not_null_stg_snapchat_ads__ad_hourly_report_ad_id.7e763de19d", "test.snapchat_ads.not_null_stg_snapchat_ads__ad_hourly_report_date_hour.666cda1cd7"], "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report": ["model.snapchat_ads.snapchat_ads__campaign_region_report", "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_campaign_id.99fbccb78d", "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_date_day.eec50e6826", "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_region.44327f07bf"], "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report": ["model.snapchat_ads.snapchat_ads__campaign_country_report", "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_campaign_id.1b07be54fe", "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_country.34db53b159", "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_date_day.d3d7dd7af1"], "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report": ["model.snapchat_ads.snapchat_ads__ad_squad_report", "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_hourly_report_ad_squad_id.ab16aa72c9", "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_hourly_report_date_hour.6f0b63a9cb"], "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history": ["model.snapchat_ads.snapchat_ads__creative_history_prep", "test.snapchat_ads.not_null_stg_snapchat_ads__creative_url_tag_history_creative_id.7ff6bb9c1b"], "model.snapchat_ads.stg_snapchat_ads__ad_account_history": ["model.snapchat_ads.snapchat_ads__account_report", "model.snapchat_ads.snapchat_ads__ad_report", "model.snapchat_ads.snapchat_ads__ad_squad_report", "model.snapchat_ads.snapchat_ads__campaign_country_report", "model.snapchat_ads.snapchat_ads__campaign_region_report", "model.snapchat_ads.snapchat_ads__campaign_report", "model.snapchat_ads.snapchat_ads__url_report", "test.snapchat_ads.not_null_stg_snapchat_ads__ad_account_history__fivetran_synced.2d5dd77824", "test.snapchat_ads.not_null_stg_snapchat_ads__ad_account_history_ad_account_id.426d71d605"], "model.snapchat_ads.stg_snapchat_ads__campaign_history": ["model.snapchat_ads.snapchat_ads__account_report", "model.snapchat_ads.snapchat_ads__ad_report", "model.snapchat_ads.snapchat_ads__ad_squad_report", "model.snapchat_ads.snapchat_ads__campaign_country_report", "model.snapchat_ads.snapchat_ads__campaign_region_report", "model.snapchat_ads.snapchat_ads__campaign_report", "model.snapchat_ads.snapchat_ads__url_report", "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_history__fivetran_synced.55bc48b3ec", "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_history_campaign_id.f74a0fb8c0"], "model.snapchat_ads.stg_snapchat_ads__ad_history": ["model.snapchat_ads.snapchat_ads__account_report", "model.snapchat_ads.snapchat_ads__ad_report", "model.snapchat_ads.snapchat_ads__url_report", "test.snapchat_ads.not_null_stg_snapchat_ads__ad_history__fivetran_synced.1607c70fda", "test.snapchat_ads.not_null_stg_snapchat_ads__ad_history_ad_id.e9d367fd15"], "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report": ["model.snapchat_ads.snapchat_ads__campaign_report", "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_hourly_report_campaign_id.f255c38a3e", "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_hourly_report_date_hour.0bc4218ac8"], "model.snapchat_ads.stg_snapchat_ads__ad_squad_history_tmp": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_history"], "model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report_tmp": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report"], "model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history_tmp": ["model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history"], "model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report_tmp": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report"], "model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report_tmp": ["model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report"], "model.snapchat_ads.stg_snapchat_ads__campaign_history_tmp": ["model.snapchat_ads.stg_snapchat_ads__campaign_history"], "model.snapchat_ads.stg_snapchat_ads__ad_account_history_tmp": ["model.snapchat_ads.stg_snapchat_ads__ad_account_history"], "model.snapchat_ads.stg_snapchat_ads__ad_history_tmp": ["model.snapchat_ads.stg_snapchat_ads__ad_history"], "model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report_tmp": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report"], "model.snapchat_ads.stg_snapchat_ads__ad_hourly_report_tmp": ["model.snapchat_ads.stg_snapchat_ads__ad_hourly_report"], "model.snapchat_ads.stg_snapchat_ads__creative_history_tmp": ["model.snapchat_ads.stg_snapchat_ads__creative_history"], "model.snapchat_ads.snapchat_ads__creative_history_prep": ["model.snapchat_ads.snapchat_ads__ad_report", "model.snapchat_ads.snapchat_ads__url_report"], "model.pinterest.pinterest_ads__campaign_region_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_region_report", "test.pinterest.not_null_pinterest_ads__campaign_region_report_campaign_id.1a64423d71", "test.pinterest.not_null_pinterest_ads__campaign_region_report_date_day.e81588bc6e"], "model.pinterest.pinterest_ads__keyword_report": ["model.ad_reporting.int_ad_reporting__keyword_report", "test.pinterest.not_null_pinterest_ads__keyword_report_date_day.23130e9fba", "test.pinterest.not_null_pinterest_ads__keyword_report_keyword_id.0d73460198"], "model.pinterest.pinterest_ads__advertiser_report": ["model.ad_reporting.int_ad_reporting__account_report", "test.pinterest.not_null_pinterest_ads__advertiser_report_advertiser_id.13380f0672", "test.pinterest.not_null_pinterest_ads__advertiser_report_date_day.aedeceeeca"], "model.pinterest.pinterest_ads__url_report": ["model.ad_reporting.int_ad_reporting__url_report", "test.pinterest.not_null_pinterest_ads__url_report_date_day.b09048037e", "test.pinterest.not_null_pinterest_ads__url_report_destination_url.0bb7f30502", "test.pinterest.not_null_pinterest_ads__url_report_pin_promotion_id.0da711ad6a"], "model.pinterest.pinterest_ads__campaign_report": ["model.ad_reporting.int_ad_reporting__campaign_report", "test.pinterest.not_null_pinterest_ads__campaign_report_campaign_id.8001ea60f2", "test.pinterest.not_null_pinterest_ads__campaign_report_date_day.10ac8272bf"], "model.pinterest.pinterest_ads__campaign_country_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_country_report", "test.pinterest.not_null_pinterest_ads__campaign_country_report_campaign_id.9b1d309d2b", "test.pinterest.not_null_pinterest_ads__campaign_country_report_date_day.a9da473d38"], "model.pinterest.pinterest_ads__pin_promotion_report": ["model.ad_reporting.int_ad_reporting__ad_report", "test.pinterest.not_null_pinterest_ads__pin_promotion_report_date_day.3128d28cfd", "test.pinterest.not_null_pinterest_ads__pin_promotion_report_pin_promotion_id.2540e0a561"], "model.pinterest.pinterest_ads__ad_group_report": ["model.ad_reporting.int_ad_reporting__ad_group_report", "test.pinterest.not_null_pinterest_ads__ad_group_report_ad_group_id.134f9ac6c2", "test.pinterest.not_null_pinterest_ads__ad_group_report_date_day.ed7c27b8a7"], "model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report": ["model.pinterest.pinterest_ads__campaign_country_report", "model.pinterest.pinterest_ads__campaign_region_report"], "model.pinterest.stg_pinterest_ads__pin_promotion_report": ["model.pinterest.pinterest_ads__pin_promotion_report", "model.pinterest.pinterest_ads__url_report", "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_report_date_day.ed272212a1", "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_report_pin_promotion_id.9c3c9f71ab"], "model.pinterest.stg_pinterest_ads__ad_group_history": ["model.pinterest.pinterest_ads__ad_group_report", "model.pinterest.pinterest_ads__keyword_report", "model.pinterest.pinterest_ads__pin_promotion_report", "model.pinterest.pinterest_ads__url_report", "test.pinterest.not_null_stg_pinterest_ads__ad_group_history_ad_group_id.220c6220be"], "model.pinterest.stg_pinterest_ads__targeting_geo_region": ["model.pinterest.pinterest_ads__campaign_region_report"], "model.pinterest.stg_pinterest_ads__campaign_report": ["model.pinterest.pinterest_ads__campaign_report", "test.pinterest.not_null_stg_pinterest_ads__campaign_report_campaign_id.a287eba0fc", "test.pinterest.not_null_stg_pinterest_ads__campaign_report_date_day.7ef5fb1238"], "model.pinterest.stg_pinterest_ads__advertiser_history": ["model.pinterest.pinterest_ads__ad_group_report", "model.pinterest.pinterest_ads__advertiser_report", "model.pinterest.pinterest_ads__campaign_country_report", "model.pinterest.pinterest_ads__campaign_region_report", "model.pinterest.pinterest_ads__campaign_report", "model.pinterest.pinterest_ads__keyword_report", "model.pinterest.pinterest_ads__pin_promotion_report", "model.pinterest.pinterest_ads__url_report", "test.pinterest.not_null_stg_pinterest_ads__advertiser_history_advertiser_id.7d24f665fb"], "model.pinterest.stg_pinterest_ads__campaign_history": ["model.pinterest.pinterest_ads__ad_group_report", "model.pinterest.pinterest_ads__campaign_country_report", "model.pinterest.pinterest_ads__campaign_region_report", "model.pinterest.pinterest_ads__campaign_report", "model.pinterest.pinterest_ads__keyword_report", "model.pinterest.pinterest_ads__pin_promotion_report", "model.pinterest.pinterest_ads__url_report", "test.pinterest.not_null_stg_pinterest_ads__campaign_history_campaign_id.60cb10d341"], "model.pinterest.stg_pinterest_ads__keyword_history": ["model.pinterest.pinterest_ads__keyword_report", "test.pinterest.not_null_stg_pinterest_ads__keyword_history_keyword_id.246889377a"], "model.pinterest.stg_pinterest_ads__advertiser_report": ["model.pinterest.pinterest_ads__advertiser_report", "test.pinterest.not_null_stg_pinterest_ads__advertiser_report_advertiser_id.1b16ed73ff", "test.pinterest.not_null_stg_pinterest_ads__advertiser_report_date_day.153bd03c95"], "model.pinterest.stg_pinterest_ads__pin_promotion_history": ["model.pinterest.pinterest_ads__pin_promotion_report", "model.pinterest.pinterest_ads__url_report", "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_history_pin_promotion_id.171995cd34"], "model.pinterest.stg_pinterest_ads__targeting_geo": ["model.pinterest.pinterest_ads__campaign_country_report", "model.pinterest.pinterest_ads__campaign_region_report"], "model.pinterest.stg_pinterest_ads__keyword_report": ["model.pinterest.pinterest_ads__keyword_report", "test.pinterest.not_null_stg_pinterest_ads__keyword_report_date_day.9937216300", "test.pinterest.not_null_stg_pinterest_ads__keyword_report_keyword_id.5f00679c48"], "model.pinterest.stg_pinterest_ads__ad_group_report": ["model.pinterest.pinterest_ads__ad_group_report", "test.pinterest.not_null_stg_pinterest_ads__ad_group_report_ad_group_id.bb8cf3c471", "test.pinterest.not_null_stg_pinterest_ads__ad_group_report_date_day.80e8904c4c"], "model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report_tmp": ["model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report"], "model.pinterest.stg_pinterest_ads__ad_group_report_tmp": ["model.pinterest.stg_pinterest_ads__ad_group_report"], "model.pinterest.stg_pinterest_ads__pin_promotion_history_tmp": ["model.pinterest.stg_pinterest_ads__pin_promotion_history"], "model.pinterest.stg_pinterest_ads__campaign_report_tmp": ["model.pinterest.stg_pinterest_ads__campaign_report"], "model.pinterest.stg_pinterest_ads__advertiser_history_tmp": ["model.pinterest.stg_pinterest_ads__advertiser_history"], "model.pinterest.stg_pinterest_ads__keyword_history_tmp": ["model.pinterest.stg_pinterest_ads__keyword_history"], "model.pinterest.stg_pinterest_ads__pin_promotion_report_tmp": ["model.pinterest.stg_pinterest_ads__pin_promotion_report"], "model.pinterest.stg_pinterest_ads__advertiser_report_tmp": ["model.pinterest.stg_pinterest_ads__advertiser_report"], "model.pinterest.stg_pinterest_ads__ad_group_history_tmp": ["model.pinterest.stg_pinterest_ads__ad_group_history"], "model.pinterest.stg_pinterest_ads__targeting_geo_region_tmp": ["model.pinterest.stg_pinterest_ads__targeting_geo_region"], "model.pinterest.stg_pinterest_ads__campaign_history_tmp": ["model.pinterest.stg_pinterest_ads__campaign_history"], "model.pinterest.stg_pinterest_ads__targeting_geo_tmp": ["model.pinterest.stg_pinterest_ads__targeting_geo"], "model.pinterest.stg_pinterest_ads__keyword_report_tmp": ["model.pinterest.stg_pinterest_ads__keyword_report"], "model.google_ads.google_ads__search_term_report": ["model.ad_reporting.int_ad_reporting__search_report"], "model.google_ads.google_ads__ad_report": ["model.ad_reporting.int_ad_reporting__ad_report", "test.google_ads.not_null_google_ads__ad_report_ad_id.7bd6a287ad"], "model.google_ads.google_ads__ad_group_report": ["model.ad_reporting.int_ad_reporting__ad_group_report", "test.google_ads.not_null_google_ads__ad_group_report_ad_group_id.c186523c0c"], "model.google_ads.google_ads__account_report": ["model.ad_reporting.int_ad_reporting__account_report", "test.google_ads.not_null_google_ads__account_report_account_id.abb0985422"], "model.google_ads.google_ads__campaign_bid_modifiers_report": ["test.google_ads.not_null_google_ads__campaign_bid_modifiers_report_bid_modifier_report_key.746ae8cfa3", "test.google_ads.not_null_google_ads__campaign_bid_modifiers_report_campaign_id.68d212d025", "test.google_ads.unique_google_ads__campaign_bid_modifiers_report_bid_modifier_report_key.d68443174a"], "model.google_ads.google_ads__campaign_budget_diagnostics_report": ["test.google_ads.not_null_google_ads__campaign_budget_diagnostics_report_budget_diagnostics_report_key.c2c4d80aab", "test.google_ads.not_null_google_ads__campaign_budget_diagnostics_report_campaign_id.9a579bd702", "test.google_ads.unique_google_ads__campaign_budget_diagnostics_report_budget_diagnostics_report_key.ca90f632f4"], "model.google_ads.google_ads__url_report": ["model.ad_reporting.int_ad_reporting__url_report", "test.google_ads.not_null_google_ads__url_report_base_url.e3578c0f72"], "model.google_ads.google_ads__campaign_report": ["model.ad_reporting.int_ad_reporting__campaign_report", "model.google_ads.google_ads__campaign_budget_diagnostics_report", "test.google_ads.not_null_google_ads__campaign_report_campaign_id.cc6694fa0e"], "model.google_ads.google_ads__keyword_report": ["model.ad_reporting.int_ad_reporting__keyword_report", "test.google_ads.not_null_google_ads__keyword_report_criterion_id.4cab66a055"], "model.google_ads.stg_google_ads__account_stats": ["model.google_ads.google_ads__account_report", "test.google_ads.not_null_stg_google_ads__account_stats_account_id.2a9da5417b", "test.google_ads.not_null_stg_google_ads__account_stats_date_day.57ac8772d5"], "model.google_ads.stg_google_ads__ad_group_stats": ["model.google_ads.google_ads__ad_group_report", "test.google_ads.not_null_stg_google_ads__ad_group_stats_ad_group_id.a8d430f077", "test.google_ads.not_null_stg_google_ads__ad_group_stats_date_day.3c6a221786"], "model.google_ads.stg_google_ads__account_history": ["model.google_ads.google_ads__account_report", "model.google_ads.int_google_ads__campaigns_accounts", "test.google_ads.not_null_stg_google_ads__account_history_account_id.5ca373f51f"], "model.google_ads.stg_google_ads__ad_group_history": ["model.google_ads.google_ads__ad_group_report", "model.google_ads.google_ads__ad_report", "model.google_ads.google_ads__keyword_report", "model.google_ads.google_ads__search_term_report", "model.google_ads.google_ads__url_report", "test.google_ads.not_null_stg_google_ads__ad_group_history_ad_group_id.f6c7c939be"], "model.google_ads.stg_google_ads__campaign_stats": ["model.google_ads.google_ads__campaign_bid_modifiers_report", "model.google_ads.google_ads__campaign_report", "test.google_ads.not_null_stg_google_ads__campaign_stats_campaign_id.11587fa10f", "test.google_ads.not_null_stg_google_ads__campaign_stats_date_day.dc097fd76b"], "model.google_ads.stg_google_ads__campaign_budget_history": ["model.google_ads.google_ads__campaign_budget_diagnostics_report", "test.google_ads.not_null_stg_google_ads__campaign_budget_history_campaign_id.730c3d8025"], "model.google_ads.stg_google_ads__campaign_bid_modifier_history": ["model.google_ads.google_ads__campaign_bid_modifiers_report", "test.google_ads.not_null_stg_google_ads__campaign_bid_modifier_history_campaign_id.c7e1e11f33"], "model.google_ads.stg_google_ads__keyword_stats": ["model.google_ads.google_ads__keyword_report", "test.google_ads.not_null_stg_google_ads__keyword_stats_date_day.a9da72f74d", "test.google_ads.not_null_stg_google_ads__keyword_stats_keyword_id.f0945d6cf0"], "model.google_ads.stg_google_ads__ad_stats": ["model.google_ads.google_ads__ad_report", "model.google_ads.google_ads__url_report", "test.google_ads.not_null_stg_google_ads__ad_stats_ad_id.2612d83cc8", "test.google_ads.not_null_stg_google_ads__ad_stats_date_day.9a43c0fce4"], "model.google_ads.stg_google_ads__ad_history": ["model.google_ads.google_ads__ad_report", "model.google_ads.google_ads__url_report", "test.google_ads.not_null_stg_google_ads__ad_history_ad_id.8c23c38248"], "model.google_ads.stg_google_ads__ad_group_criterion_history": ["model.google_ads.google_ads__keyword_report", "test.google_ads.not_null_stg_google_ads__ad_group_criterion_history_criterion_id.7a0a8b8476"], "model.google_ads.stg_google_ads__search_term_keyword_stats": ["model.google_ads.google_ads__search_term_report", "test.google_ads.not_null_stg_google_ads__search_term_keyword_stats_date_day.3ff55abd88", "test.google_ads.not_null_stg_google_ads__search_term_keyword_stats_search_term_id.0019238ba2"], "model.google_ads.stg_google_ads__campaign_bidding_strategy_history": ["model.google_ads.google_ads__campaign_bid_modifiers_report", "model.google_ads.google_ads__campaign_budget_diagnostics_report", "test.google_ads.not_null_stg_google_ads__campaign_bidding_strategy_history_campaign_id.7efbcd0291"], "model.google_ads.stg_google_ads__campaign_criterion_history": ["model.google_ads.google_ads__campaign_bid_modifiers_report", "model.google_ads.google_ads__campaign_budget_diagnostics_report", "test.google_ads.not_null_stg_google_ads__campaign_criterion_history_criterion_id.ade9d1fdbd"], "model.google_ads.stg_google_ads__campaign_history": ["model.google_ads.int_google_ads__campaigns_accounts", "test.google_ads.not_null_stg_google_ads__campaign_history_campaign_id.fa0c825e75"], "model.google_ads.stg_google_ads__ad_group_criterion_history_tmp": ["model.google_ads.stg_google_ads__ad_group_criterion_history"], "model.google_ads.stg_google_ads__campaign_budget_history_tmp": ["model.google_ads.stg_google_ads__campaign_budget_history"], "model.google_ads.stg_google_ads__campaign_stats_tmp": ["model.google_ads.stg_google_ads__campaign_stats"], "model.google_ads.stg_google_ads__campaign_history_tmp": ["model.google_ads.stg_google_ads__campaign_history"], "model.google_ads.stg_google_ads__account_stats_tmp": ["model.google_ads.stg_google_ads__account_stats"], "model.google_ads.stg_google_ads__campaign_bid_modifier_history_tmp": ["model.google_ads.stg_google_ads__campaign_bid_modifier_history"], "model.google_ads.stg_google_ads__search_term_keyword_stats_tmp": ["model.google_ads.stg_google_ads__search_term_keyword_stats"], "model.google_ads.stg_google_ads__ad_group_stats_tmp": ["model.google_ads.stg_google_ads__ad_group_stats"], "model.google_ads.stg_google_ads__campaign_criterion_history_tmp": ["model.google_ads.stg_google_ads__campaign_criterion_history"], "model.google_ads.stg_google_ads__keyword_stats_tmp": ["model.google_ads.stg_google_ads__keyword_stats"], "model.google_ads.stg_google_ads__ad_history_tmp": ["model.google_ads.stg_google_ads__ad_history"], "model.google_ads.stg_google_ads__campaign_bidding_strategy_history_tmp": ["model.google_ads.stg_google_ads__campaign_bidding_strategy_history"], "model.google_ads.stg_google_ads__account_history_tmp": ["model.google_ads.stg_google_ads__account_history"], "model.google_ads.stg_google_ads__ad_group_history_tmp": ["model.google_ads.stg_google_ads__ad_group_history"], "model.google_ads.stg_google_ads__ad_stats_tmp": ["model.google_ads.stg_google_ads__ad_stats"], "model.google_ads.int_google_ads__campaigns_accounts": ["model.google_ads.google_ads__ad_group_report", "model.google_ads.google_ads__ad_report", "model.google_ads.google_ads__campaign_bid_modifiers_report", "model.google_ads.google_ads__campaign_report", "model.google_ads.google_ads__keyword_report", "model.google_ads.google_ads__search_term_report", "model.google_ads.google_ads__url_report"], "model.amazon_ads.amazon_ads__search_report": ["model.ad_reporting.int_ad_reporting__search_report", "test.amazon_ads.not_null_amazon_ads__search_report_search_term.3c23d4658a"], "model.amazon_ads.amazon_ads__campaign_report": ["model.ad_reporting.int_ad_reporting__campaign_report", "test.amazon_ads.not_null_amazon_ads__campaign_report_campaign_id.a9cabadd7c"], "model.amazon_ads.amazon_ads__account_report": ["model.ad_reporting.int_ad_reporting__account_report", "test.amazon_ads.not_null_amazon_ads__account_report_account_id.83adef7061", "test.amazon_ads.not_null_amazon_ads__account_report_profile_id.87fb8dbe66"], "model.amazon_ads.amazon_ads__portfolio_report": ["test.amazon_ads.not_null_amazon_ads__portfolio_report_profile_id.1a910441c6"], "model.amazon_ads.amazon_ads__keyword_report": ["model.ad_reporting.int_ad_reporting__keyword_report", "test.amazon_ads.not_null_amazon_ads__keyword_report_keyword_id.303f680e4a"], "model.amazon_ads.amazon_ads__ad_report": ["model.ad_reporting.int_ad_reporting__ad_report", "test.amazon_ads.not_null_amazon_ads__ad_report_ad_id.93728159b3"], "model.amazon_ads.amazon_ads__ad_group_report": ["model.ad_reporting.int_ad_reporting__ad_group_report", "test.amazon_ads.not_null_amazon_ads__ad_group_report_ad_group_id.8a23dc123a"], "model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report": ["model.amazon_ads.amazon_ads__search_report", "test.amazon_ads.not_null_stg_amazon_ads__search_term_ad_keyword_report_search_term.ef04af3b06"], "model.amazon_ads.stg_amazon_ads__ad_group_history": ["model.amazon_ads.amazon_ads__ad_group_report", "model.amazon_ads.amazon_ads__ad_report", "model.amazon_ads.amazon_ads__keyword_report", "model.amazon_ads.amazon_ads__search_report", "test.amazon_ads.not_null_stg_amazon_ads__ad_group_history_ad_group_id.6b524b990b"], "model.amazon_ads.stg_amazon_ads__portfolio_history": ["model.amazon_ads.amazon_ads__portfolio_report", "model.amazon_ads.int_amazon_ads__portfolio_history", "test.amazon_ads.not_null_stg_amazon_ads__portfolio_history_portfolio_id.e22bb2ba02"], "model.amazon_ads.stg_amazon_ads__campaign_history": ["model.amazon_ads.amazon_ads__account_report", "model.amazon_ads.amazon_ads__ad_group_report", "model.amazon_ads.amazon_ads__ad_report", "model.amazon_ads.amazon_ads__campaign_report", "model.amazon_ads.amazon_ads__keyword_report", "model.amazon_ads.amazon_ads__portfolio_report", "model.amazon_ads.amazon_ads__search_report", "test.amazon_ads.not_null_stg_amazon_ads__campaign_history_campaign_id.49e395897c"], "model.amazon_ads.stg_amazon_ads__ad_group_level_report": ["model.amazon_ads.amazon_ads__ad_group_report", "test.amazon_ads.not_null_stg_amazon_ads__ad_group_level_report_ad_group_id.ee4ef641c3"], "model.amazon_ads.stg_amazon_ads__targeting_keyword_report": ["model.amazon_ads.amazon_ads__keyword_report", "test.amazon_ads.not_null_stg_amazon_ads__targeting_keyword_report_keyword_id.101a3299d7"], "model.amazon_ads.stg_amazon_ads__advertised_product_report": ["model.amazon_ads.amazon_ads__ad_report", "test.amazon_ads.not_null_stg_amazon_ads__advertised_product_report_ad_id.307c6bc8d4"], "model.amazon_ads.stg_amazon_ads__keyword_history": ["model.amazon_ads.amazon_ads__keyword_report", "model.amazon_ads.amazon_ads__search_report", "test.amazon_ads.not_null_stg_amazon_ads__keyword_history_keyword_id.f21f6add6e"], "model.amazon_ads.stg_amazon_ads__campaign_level_report": ["model.amazon_ads.amazon_ads__account_report", "model.amazon_ads.amazon_ads__campaign_report", "model.amazon_ads.amazon_ads__portfolio_report", "test.amazon_ads.not_null_stg_amazon_ads__campaign_level_report_campaign_id.1efec68194"], "model.amazon_ads.stg_amazon_ads__profile": ["model.amazon_ads.amazon_ads__account_report", "model.amazon_ads.amazon_ads__ad_group_report", "model.amazon_ads.amazon_ads__ad_report", "model.amazon_ads.amazon_ads__campaign_report", "model.amazon_ads.amazon_ads__keyword_report", "model.amazon_ads.amazon_ads__portfolio_report", "model.amazon_ads.amazon_ads__search_report", "test.amazon_ads.not_null_stg_amazon_ads__profile_profile_id.bd192c102b"], "model.amazon_ads.stg_amazon_ads__product_ad_history": ["model.amazon_ads.amazon_ads__ad_report", "test.amazon_ads.not_null_stg_amazon_ads__product_ad_history_ad_id.8744ab1cd8"], "model.amazon_ads.stg_amazon_ads__keyword_history_tmp": ["model.amazon_ads.stg_amazon_ads__keyword_history"], "model.amazon_ads.stg_amazon_ads__campaign_history_tmp": ["model.amazon_ads.stg_amazon_ads__campaign_history"], "model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report_tmp": ["model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report"], "model.amazon_ads.stg_amazon_ads__campaign_level_report_tmp": ["model.amazon_ads.stg_amazon_ads__campaign_level_report"], "model.amazon_ads.stg_amazon_ads__profile_tmp": ["model.amazon_ads.stg_amazon_ads__profile"], "model.amazon_ads.stg_amazon_ads__ad_group_history_tmp": ["model.amazon_ads.stg_amazon_ads__ad_group_history"], "model.amazon_ads.stg_amazon_ads__targeting_keyword_report_tmp": ["model.amazon_ads.stg_amazon_ads__targeting_keyword_report"], "model.amazon_ads.stg_amazon_ads__advertised_product_report_tmp": ["model.amazon_ads.stg_amazon_ads__advertised_product_report"], "model.amazon_ads.stg_amazon_ads__ad_group_level_report_tmp": ["model.amazon_ads.stg_amazon_ads__ad_group_level_report"], "model.amazon_ads.stg_amazon_ads__portfolio_history_tmp": ["model.amazon_ads.stg_amazon_ads__portfolio_history"], "model.amazon_ads.stg_amazon_ads__product_ad_history_tmp": ["model.amazon_ads.stg_amazon_ads__product_ad_history"], "model.amazon_ads.int_amazon_ads__portfolio_history": ["model.amazon_ads.amazon_ads__ad_group_report", "model.amazon_ads.amazon_ads__ad_report", "model.amazon_ads.amazon_ads__campaign_report", "model.amazon_ads.amazon_ads__keyword_report", "model.amazon_ads.amazon_ads__search_report"], "model.twitter_ads.twitter_ads__promoted_tweet_report": ["model.ad_reporting.int_ad_reporting__ad_report", "test.twitter_ads.not_null_twitter_ads__promoted_tweet_report_placement.d89c9b27e5", "test.twitter_ads.not_null_twitter_ads__promoted_tweet_report_promoted_tweet_id.5df08e154e"], "model.twitter_ads.twitter_ads__campaign_region_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_region_report", "test.twitter_ads.not_null_twitter_ads__campaign_region_report_campaign_id.c06b8be032", "test.twitter_ads.not_null_twitter_ads__campaign_region_report_date_day.884ad86a28", "test.twitter_ads.not_null_twitter_ads__campaign_region_report_placement.e6fb374bf5"], "model.twitter_ads.twitter_ads__account_report": ["model.ad_reporting.int_ad_reporting__account_report", "test.twitter_ads.not_null_twitter_ads__account_report_account_id.90d5808908", "test.twitter_ads.not_null_twitter_ads__account_report_date_day.84896c5846", "test.twitter_ads.not_null_twitter_ads__account_report_placement.157dcb6194"], "model.twitter_ads.twitter_ads__campaign_country_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_country_report", "test.twitter_ads.not_null_twitter_ads__campaign_country_report_campaign_id.d08c7d25a2", "test.twitter_ads.not_null_twitter_ads__campaign_country_report_date_day.33eabfbcaa", "test.twitter_ads.not_null_twitter_ads__campaign_country_report_placement.3a4c65b9c5"], "model.twitter_ads.twitter_ads__url_report": ["model.ad_reporting.int_ad_reporting__url_report", "test.twitter_ads.not_null_twitter_ads__url_report_base_url.dfd7ab549e", "test.twitter_ads.not_null_twitter_ads__url_report_date_day.33fcb7e04b", "test.twitter_ads.not_null_twitter_ads__url_report_placement.92ca3b192e", "test.twitter_ads.not_null_twitter_ads__url_report_promoted_tweet_id.d690f99143"], "model.twitter_ads.twitter_ads__line_item_report": ["model.ad_reporting.int_ad_reporting__ad_group_report", "test.twitter_ads.not_null_twitter_ads__line_item_report_date_day.86c934e8ce", "test.twitter_ads.not_null_twitter_ads__line_item_report_line_item_id.0462d58211", "test.twitter_ads.not_null_twitter_ads__line_item_report_placement.f103369312"], "model.twitter_ads.twitter_ads__keyword_report": ["model.ad_reporting.int_ad_reporting__keyword_report", "test.twitter_ads.not_null_twitter_ads__keyword_report_date_day.e0ce90c1ec", "test.twitter_ads.not_null_twitter_ads__keyword_report_keyword_id.91efa0a538"], "model.twitter_ads.twitter_ads__campaign_report": ["model.ad_reporting.int_ad_reporting__campaign_report", "test.twitter_ads.not_null_twitter_ads__campaign_report_campaign_id.03b1c451b8", "test.twitter_ads.not_null_twitter_ads__campaign_report_date_day.2b30b279b0", "test.twitter_ads.not_null_twitter_ads__campaign_report_placement.c66d252e82"], "model.twitter_ads.stg_twitter_ads__tweet": ["model.twitter_ads.twitter_ads__promoted_tweet_report", "model.twitter_ads.twitter_ads__url_report", "test.twitter_ads.not_null_stg_twitter_ads__tweet_tweet_id.a0427f37cd"], "model.twitter_ads.stg_twitter_ads__campaign_locations_report": ["model.twitter_ads.twitter_ads__campaign_country_report", "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_campaign_id.e1ddc306c2", "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_country.8bc44f6e39", "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_date_day.bf69378746", "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_placement.638fb0cf03"], "model.twitter_ads.stg_twitter_ads__campaign_history": ["model.twitter_ads.twitter_ads__campaign_country_report", "model.twitter_ads.twitter_ads__campaign_region_report", "model.twitter_ads.twitter_ads__campaign_report", "model.twitter_ads.twitter_ads__keyword_report", "model.twitter_ads.twitter_ads__line_item_report", "model.twitter_ads.twitter_ads__promoted_tweet_report", "model.twitter_ads.twitter_ads__url_report", "test.twitter_ads.not_null_stg_twitter_ads__campaign_history_campaign_id.51218487ce"], "model.twitter_ads.stg_twitter_ads__promoted_tweet_history": ["model.twitter_ads.twitter_ads__promoted_tweet_report", "model.twitter_ads.twitter_ads__url_report", "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_history_promoted_tweet_id.f447a1cd09"], "model.twitter_ads.stg_twitter_ads__tweet_url": ["model.twitter_ads.twitter_ads__url_report", "test.twitter_ads.not_null_stg_twitter_ads__tweet_url_index.e998fb67be", "test.twitter_ads.not_null_stg_twitter_ads__tweet_url_tweet_id.f7e1670218"], "model.twitter_ads.stg_twitter_ads__campaign_regions_report": ["model.twitter_ads.twitter_ads__campaign_region_report", "test.twitter_ads.not_null_stg_twitter_ads__campaign_regions_report_date_day.e7f9f99776", "test.twitter_ads.not_null_stg_twitter_ads__campaign_regions_report_region.7b8b6fd555"], "model.twitter_ads.stg_twitter_ads__line_item_keywords_report": ["model.twitter_ads.twitter_ads__keyword_report", "test.twitter_ads.not_null_stg_twitter_ads__line_item_keywords_report_date_day.c7e7155b13", "test.twitter_ads.not_null_stg_twitter_ads__line_item_keywords_report_keyword_id.e5f015e9ec"], "model.twitter_ads.stg_twitter_ads__line_item_report": ["model.twitter_ads.twitter_ads__line_item_report", "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_date_day.0f4d8cc8fe", "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_line_item_id.9f5a4860b7", "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_placement.cd7e77e0eb"], "model.twitter_ads.stg_twitter_ads__line_item_history": ["model.twitter_ads.twitter_ads__keyword_report", "model.twitter_ads.twitter_ads__line_item_report", "model.twitter_ads.twitter_ads__promoted_tweet_report", "model.twitter_ads.twitter_ads__url_report", "test.twitter_ads.not_null_stg_twitter_ads__line_item_history_line_item_id.2cef040809"], "model.twitter_ads.stg_twitter_ads__account_history": ["model.twitter_ads.twitter_ads__account_report", "model.twitter_ads.twitter_ads__campaign_country_report", "model.twitter_ads.twitter_ads__campaign_region_report", "model.twitter_ads.twitter_ads__campaign_report", "model.twitter_ads.twitter_ads__keyword_report", "model.twitter_ads.twitter_ads__line_item_report", "model.twitter_ads.twitter_ads__promoted_tweet_report", "model.twitter_ads.twitter_ads__url_report", "test.twitter_ads.not_null_stg_twitter_ads__account_history_account_id.66fb3601e2"], "model.twitter_ads.stg_twitter_ads__promoted_tweet_report": ["model.twitter_ads.twitter_ads__account_report", "model.twitter_ads.twitter_ads__promoted_tweet_report", "model.twitter_ads.twitter_ads__url_report", "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_date_day.c4c46a5894", "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_placement.c1b1f648b3", "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_promoted_tweet_id.6028694598"], "model.twitter_ads.stg_twitter_ads__campaign_report": ["model.twitter_ads.twitter_ads__campaign_report", "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_campaign_id.a63b62981f", "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_date_day.053c09786c", "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_placement.5067d8c4f4"], "model.twitter_ads.stg_twitter_ads__campaign_report_tmp": ["model.twitter_ads.stg_twitter_ads__campaign_report"], "model.twitter_ads.stg_twitter_ads__campaign_regions_report_tmp": ["model.twitter_ads.stg_twitter_ads__campaign_regions_report"], "model.twitter_ads.stg_twitter_ads__campaign_history_tmp": ["model.twitter_ads.stg_twitter_ads__campaign_history"], "model.twitter_ads.stg_twitter_ads__line_item_history_tmp": ["model.twitter_ads.stg_twitter_ads__line_item_history"], "model.twitter_ads.stg_twitter_ads__promoted_tweet_report_tmp": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_report"], "model.twitter_ads.stg_twitter_ads__campaign_locations_report_tmp": ["model.twitter_ads.stg_twitter_ads__campaign_locations_report"], "model.twitter_ads.stg_twitter_ads__line_item_report_tmp": ["model.twitter_ads.stg_twitter_ads__line_item_report"], "model.twitter_ads.stg_twitter_ads__account_history_tmp": ["model.twitter_ads.stg_twitter_ads__account_history"], "model.twitter_ads.stg_twitter_ads__promoted_tweet_history_tmp": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_history"], "model.twitter_ads.stg_twitter_ads__line_item_keywords_report_tmp": ["model.twitter_ads.stg_twitter_ads__line_item_keywords_report"], "model.twitter_ads.stg_twitter_ads__tweet_url_tmp": ["model.twitter_ads.stg_twitter_ads__tweet_url"], "model.twitter_ads.stg_twitter_ads__tweet_tmp": ["model.twitter_ads.stg_twitter_ads__tweet"], "model.ad_reporting.ad_reporting__keyword_report": ["test.ad_reporting.not_null_ad_reporting__keyword_report_keyword_id.51a45fb334"], "model.ad_reporting.ad_reporting__campaign_report": ["test.ad_reporting.not_null_ad_reporting__campaign_report_campaign_id.1cfaa7698b"], "model.ad_reporting.ad_reporting__monthly_campaign_country_report": [], "model.ad_reporting.ad_reporting__monthly_campaign_region_report": [], "model.ad_reporting.ad_reporting__url_report": ["test.ad_reporting.not_null_ad_reporting__url_report_base_url.a29864e5b6"], "model.ad_reporting.ad_reporting__ad_report": ["semantic_model.ad_reporting.ad_report", "test.ad_reporting.not_null_ad_reporting__ad_report_ad_id.f3eb210152"], "model.ad_reporting.ad_reporting__account_report": ["test.ad_reporting.not_null_ad_reporting__account_report_account_id.316a64c022"], "model.ad_reporting.ad_reporting__ad_group_report": ["test.ad_reporting.not_null_ad_reporting__ad_group_report_ad_group_id.963e17e842"], "model.ad_reporting.ad_reporting__search_report": ["test.ad_reporting.not_null_ad_reporting__search_report_search_query.ee2f0fcafb"], "model.ad_reporting.int_ad_reporting__url_report": ["model.ad_reporting.ad_reporting__url_report"], "model.ad_reporting.int_ad_reporting__campaign_report": ["model.ad_reporting.ad_reporting__campaign_report"], "model.ad_reporting.int_ad_reporting__monthly_campaign_country_report": ["model.ad_reporting.ad_reporting__monthly_campaign_country_report"], "model.ad_reporting.int_ad_reporting__ad_report": ["model.ad_reporting.ad_reporting__ad_report"], "model.ad_reporting.int_ad_reporting__search_report": ["model.ad_reporting.ad_reporting__search_report"], "model.ad_reporting.int_ad_reporting__keyword_report": ["model.ad_reporting.ad_reporting__keyword_report"], "model.ad_reporting.int_ad_reporting__ad_group_report": ["model.ad_reporting.ad_reporting__ad_group_report"], "model.ad_reporting.int_ad_reporting__account_report": ["model.ad_reporting.ad_reporting__account_report"], "model.ad_reporting.int_ad_reporting__monthly_campaign_region_report": ["model.ad_reporting.ad_reporting__monthly_campaign_region_report"], "model.ad_reporting.int_ad_reporting__country_mapping": ["model.ad_reporting.ad_reporting__monthly_campaign_country_report"], "model.ad_reporting.metricflow_time_spine": [], "model.tiktok_ads.tiktok_ads__url_report": ["model.ad_reporting.int_ad_reporting__url_report", "test.tiktok_ads.not_null_tiktok_ads__url_report_ad_id.6c41067bd0", "test.tiktok_ads.not_null_tiktok_ads__url_report_base_url.37afef2e1b", "test.tiktok_ads.not_null_tiktok_ads__url_report_date_day.d593573eff"], "model.tiktok_ads.tiktok_ads__advertiser_report": ["model.ad_reporting.int_ad_reporting__account_report", "test.tiktok_ads.not_null_tiktok_ads__advertiser_report_advertiser_id.f956c568ce", "test.tiktok_ads.not_null_tiktok_ads__advertiser_report_date_day.1276998c99"], "model.tiktok_ads.tiktok_ads__ad_report": ["model.ad_reporting.int_ad_reporting__ad_report", "test.tiktok_ads.not_null_tiktok_ads__ad_report_ad_id.2d8166e707", "test.tiktok_ads.not_null_tiktok_ads__ad_report_date_day.d61ee4a5ed"], "model.tiktok_ads.tiktok_ads__ad_group_report": ["model.ad_reporting.int_ad_reporting__ad_group_report", "test.tiktok_ads.not_null_tiktok_ads__ad_group_report_ad_group_id.17fb8710f4", "test.tiktok_ads.not_null_tiktok_ads__ad_group_report_date_day.e39164964e"], "model.tiktok_ads.tiktok_ads__campaign_country_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_country_report", "test.tiktok_ads.not_null_tiktok_ads__campaign_country_report_campaign_id.f439b91d6d", "test.tiktok_ads.not_null_tiktok_ads__campaign_country_report_date_day.c68c1bd379"], "model.tiktok_ads.tiktok_ads__campaign_report": ["model.ad_reporting.int_ad_reporting__campaign_report", "test.tiktok_ads.not_null_tiktok_ads__campaign_report_campaign_id.8a2b0c8ef8", "test.tiktok_ads.not_null_tiktok_ads__campaign_report_date_day.3807b0e836"], "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly": ["model.tiktok_ads.tiktok_ads__campaign_report", "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_report_hourly_campaign_id.ef898379fb", "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_report_hourly_stat_time_hour.e75e13184c"], "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly": ["model.tiktok_ads.tiktok_ads__ad_group_report", "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_report_hourly_ad_group_id.8da17119f1", "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_report_hourly_stat_time_hour.ca4b495127"], "model.tiktok_ads.stg_tiktok_ads__campaign_history": ["model.tiktok_ads.tiktok_ads__ad_group_report", "model.tiktok_ads.tiktok_ads__ad_report", "model.tiktok_ads.tiktok_ads__campaign_country_report", "model.tiktok_ads.tiktok_ads__campaign_report", "model.tiktok_ads.tiktok_ads__url_report", "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_history_campaign_id.7f9147d1e1"], "model.tiktok_ads.stg_tiktok_ads__ad_group_history": ["model.tiktok_ads.tiktok_ads__ad_group_report", "model.tiktok_ads.tiktok_ads__ad_report", "model.tiktok_ads.tiktok_ads__url_report", "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_history_ad_group_id.04778d7fad"], "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly": ["model.tiktok_ads.tiktok_ads__ad_report", "model.tiktok_ads.tiktok_ads__advertiser_report", "model.tiktok_ads.tiktok_ads__url_report", "test.tiktok_ads.not_null_stg_tiktok_ads__ad_report_hourly_ad_id.ee84d783ed", "test.tiktok_ads.not_null_stg_tiktok_ads__ad_report_hourly_stat_time_hour.9e2a2dca81"], "model.tiktok_ads.stg_tiktok_ads__location": ["model.tiktok_ads.tiktok_ads__campaign_country_report"], "model.tiktok_ads.stg_tiktok_ads__ad_history": ["model.tiktok_ads.tiktok_ads__ad_report", "model.tiktok_ads.tiktok_ads__advertiser_report", "model.tiktok_ads.tiktok_ads__url_report", "test.tiktok_ads.not_null_stg_tiktok_ads__ad_history_ad_id.4ffd05b23a"], "model.tiktok_ads.stg_tiktok_ads__advertiser": ["model.tiktok_ads.tiktok_ads__ad_group_report", "model.tiktok_ads.tiktok_ads__ad_report", "model.tiktok_ads.tiktok_ads__advertiser_report", "model.tiktok_ads.tiktok_ads__campaign_country_report", "model.tiktok_ads.tiktok_ads__campaign_report", "model.tiktok_ads.tiktok_ads__url_report", "test.tiktok_ads.not_null_stg_tiktok_ads__advertiser_advertiser_id.5deab92def"], "model.tiktok_ads.stg_tiktok_ads__campaign_country_report": ["model.tiktok_ads.tiktok_ads__campaign_country_report"], "model.tiktok_ads.stg_tiktok_ads__campaign_country_report_tmp": ["model.tiktok_ads.stg_tiktok_ads__campaign_country_report"], "model.tiktok_ads.stg_tiktok_ads__ad_history_tmp": ["model.tiktok_ads.stg_tiktok_ads__ad_history"], "model.tiktok_ads.stg_tiktok_ads__ad_report_hourly_tmp": ["model.tiktok_ads.stg_tiktok_ads__ad_report_hourly"], "model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly_tmp": ["model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly"], "model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly_tmp": ["model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly"], "model.tiktok_ads.stg_tiktok_ads__ad_group_history_tmp": ["model.tiktok_ads.stg_tiktok_ads__ad_group_history"], "model.tiktok_ads.stg_tiktok_ads__campaign_history_tmp": ["model.tiktok_ads.stg_tiktok_ads__campaign_history"], "model.tiktok_ads.stg_tiktok_ads__advertiser_tmp": ["model.tiktok_ads.stg_tiktok_ads__advertiser"], "model.tiktok_ads.stg_tiktok_ads__location_tmp": ["model.tiktok_ads.stg_tiktok_ads__location"], "model.microsoft_ads.microsoft_ads__keyword_report": ["model.ad_reporting.int_ad_reporting__keyword_report", "test.microsoft_ads.not_null_microsoft_ads__keyword_report_keyword_id.da1d648d3b"], "model.microsoft_ads.microsoft_ads__url_report": ["model.ad_reporting.int_ad_reporting__url_report", "test.microsoft_ads.not_null_microsoft_ads__url_report_base_url.c1af50307a"], "model.microsoft_ads.microsoft_ads__account_report": ["model.ad_reporting.int_ad_reporting__account_report", "test.microsoft_ads.not_null_microsoft_ads__account_report_account_id.f88e46157e"], "model.microsoft_ads.microsoft_ads__campaign_country_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_country_report", "test.microsoft_ads.not_null_microsoft_ads__campaign_country_report_account_id.9d9807033d", "test.microsoft_ads.not_null_microsoft_ads__campaign_country_report_campaign_id.10b01e8782"], "model.microsoft_ads.microsoft_ads__campaign_region_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_region_report", "test.microsoft_ads.not_null_microsoft_ads__campaign_region_report_account_id.b3a2b47986", "test.microsoft_ads.not_null_microsoft_ads__campaign_region_report_campaign_id.b1d4f5a20f"], "model.microsoft_ads.microsoft_ads__ad_group_report": ["model.ad_reporting.int_ad_reporting__ad_group_report", "test.microsoft_ads.not_null_microsoft_ads__ad_group_report_ad_group_id.1974ec5ab9"], "model.microsoft_ads.microsoft_ads__ad_report": ["model.ad_reporting.int_ad_reporting__ad_report", "test.microsoft_ads.not_null_microsoft_ads__ad_report_ad_id.b089709125"], "model.microsoft_ads.microsoft_ads__search_report": ["model.ad_reporting.int_ad_reporting__search_report", "test.microsoft_ads.not_null_microsoft_ads__search_report_search_query.fa3625d66d"], "model.microsoft_ads.microsoft_ads__campaign_report": ["model.ad_reporting.int_ad_reporting__campaign_report", "test.microsoft_ads.not_null_microsoft_ads__campaign_report_campaign_id.67aa50e1f8"], "model.microsoft_ads.stg_microsoft_ads__account_history": ["model.microsoft_ads.microsoft_ads__account_report", "model.microsoft_ads.microsoft_ads__ad_group_report", "model.microsoft_ads.microsoft_ads__ad_report", "model.microsoft_ads.microsoft_ads__campaign_country_report", "model.microsoft_ads.microsoft_ads__campaign_region_report", "model.microsoft_ads.microsoft_ads__campaign_report", "model.microsoft_ads.microsoft_ads__keyword_report", "model.microsoft_ads.microsoft_ads__search_report", "model.microsoft_ads.microsoft_ads__url_report", "test.microsoft_ads.not_null_stg_microsoft_ads__account_history_account_id.cc273ee54e"], "model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report": ["model.microsoft_ads.microsoft_ads__ad_group_report", "test.microsoft_ads.not_null_stg_microsoft_ads__ad_group_daily_report_ad_group_id.3e03e6eff7"], "model.microsoft_ads.stg_microsoft_ads__campaign_history": ["model.microsoft_ads.microsoft_ads__ad_group_report", "model.microsoft_ads.microsoft_ads__ad_report", "model.microsoft_ads.microsoft_ads__campaign_country_report", "model.microsoft_ads.microsoft_ads__campaign_region_report", "model.microsoft_ads.microsoft_ads__campaign_report", "model.microsoft_ads.microsoft_ads__keyword_report", "model.microsoft_ads.microsoft_ads__search_report", "model.microsoft_ads.microsoft_ads__url_report", "test.microsoft_ads.not_null_stg_microsoft_ads__campaign_history_campaign_id.ee080a2122"], "model.microsoft_ads.stg_microsoft_ads__campaign_daily_report": ["model.microsoft_ads.microsoft_ads__campaign_report", "test.microsoft_ads.not_null_stg_microsoft_ads__campaign_daily_report_campaign_id.8ac0418e84"], "model.microsoft_ads.stg_microsoft_ads__ad_history": ["model.microsoft_ads.microsoft_ads__ad_report", "model.microsoft_ads.microsoft_ads__keyword_report", "model.microsoft_ads.microsoft_ads__search_report", "model.microsoft_ads.microsoft_ads__url_report", "test.microsoft_ads.not_null_stg_microsoft_ads__ad_history_ad_id.6d02c26574"], "model.microsoft_ads.stg_microsoft_ads__geographic_daily_report": ["model.microsoft_ads.microsoft_ads__campaign_country_report", "model.microsoft_ads.microsoft_ads__campaign_region_report"], "model.microsoft_ads.stg_microsoft_ads__ad_group_history": ["model.microsoft_ads.microsoft_ads__ad_group_report", "model.microsoft_ads.microsoft_ads__ad_report", "model.microsoft_ads.microsoft_ads__keyword_report", "model.microsoft_ads.microsoft_ads__search_report", "model.microsoft_ads.microsoft_ads__url_report", "test.microsoft_ads.not_null_stg_microsoft_ads__ad_group_history_ad_group_id.c8353342b7"], "model.microsoft_ads.stg_microsoft_ads__keyword_history": ["model.microsoft_ads.microsoft_ads__keyword_report", "model.microsoft_ads.microsoft_ads__search_report", "test.microsoft_ads.not_null_stg_microsoft_ads__keyword_history_keyword_id.19164a6209"], "model.microsoft_ads.stg_microsoft_ads__search_daily_report": ["model.microsoft_ads.microsoft_ads__search_report", "test.microsoft_ads.not_null_stg_microsoft_ads__search_daily_report_search_query.57f687adcc"], "model.microsoft_ads.stg_microsoft_ads__account_daily_report": ["model.microsoft_ads.microsoft_ads__account_report", "test.microsoft_ads.not_null_stg_microsoft_ads__account_daily_report_account_id.b17f45fe79"], "model.microsoft_ads.stg_microsoft_ads__keyword_daily_report": ["model.microsoft_ads.microsoft_ads__keyword_report", "test.microsoft_ads.not_null_stg_microsoft_ads__keyword_daily_report_keyword_id.e16b8c5047"], "model.microsoft_ads.stg_microsoft_ads__ad_daily_report": ["model.microsoft_ads.microsoft_ads__ad_report", "model.microsoft_ads.microsoft_ads__url_report", "test.microsoft_ads.not_null_stg_microsoft_ads__ad_daily_report_ad_id.1ed6689aa8"], "model.microsoft_ads.stg_microsoft_ads__campaign_daily_report_tmp": ["model.microsoft_ads.stg_microsoft_ads__campaign_daily_report"], "model.microsoft_ads.stg_microsoft_ads__ad_group_history_tmp": ["model.microsoft_ads.stg_microsoft_ads__ad_group_history"], "model.microsoft_ads.stg_microsoft_ads__account_daily_report_tmp": ["model.microsoft_ads.stg_microsoft_ads__account_daily_report"], "model.microsoft_ads.stg_microsoft_ads__search_daily_report_tmp": ["model.microsoft_ads.stg_microsoft_ads__search_daily_report"], "model.microsoft_ads.stg_microsoft_ads__account_history_tmp": ["model.microsoft_ads.stg_microsoft_ads__account_history"], "model.microsoft_ads.stg_microsoft_ads__ad_history_tmp": ["model.microsoft_ads.stg_microsoft_ads__ad_history"], "model.microsoft_ads.stg_microsoft_ads__geographic_daily_report_tmp": ["model.microsoft_ads.stg_microsoft_ads__geographic_daily_report"], "model.microsoft_ads.stg_microsoft_ads__keyword_history_tmp": ["model.microsoft_ads.stg_microsoft_ads__keyword_history"], "model.microsoft_ads.stg_microsoft_ads__keyword_daily_report_tmp": ["model.microsoft_ads.stg_microsoft_ads__keyword_daily_report"], "model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report_tmp": ["model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report"], "model.microsoft_ads.stg_microsoft_ads__campaign_history_tmp": ["model.microsoft_ads.stg_microsoft_ads__campaign_history"], "model.microsoft_ads.stg_microsoft_ads__ad_daily_report_tmp": ["model.microsoft_ads.stg_microsoft_ads__ad_daily_report"], "model.facebook_ads.facebook_ads__region_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_region_report"], "model.facebook_ads.facebook_ads__country_report": ["model.ad_reporting.int_ad_reporting__monthly_campaign_country_report"], "model.facebook_ads.facebook_ads__url_tags": ["model.facebook_ads.int_facebook_ads__creative_history", "test.facebook_ads.not_null_facebook_ads__url_tags__fivetran_id.151d9515f3"], "model.facebook_ads.facebook_ads__ad_report": ["model.ad_reporting.int_ad_reporting__ad_report", "test.facebook_ads.not_null_facebook_ads__ad_report_ad_id.3811d9c238"], "model.facebook_ads.facebook_ads__account_report": ["model.ad_reporting.int_ad_reporting__account_report", "test.facebook_ads.not_null_facebook_ads__account_report_account_id.9be02b4024"], "model.facebook_ads.facebook_ads__campaign_report": ["model.ad_reporting.int_ad_reporting__campaign_report", "test.facebook_ads.not_null_facebook_ads__campaign_report_campaign_id.d4f96d8d21"], "model.facebook_ads.facebook_ads__ad_set_report": ["model.ad_reporting.int_ad_reporting__ad_group_report", "test.facebook_ads.not_null_facebook_ads__ad_set_report_ad_set_id.1ac870f5e4"], "model.facebook_ads.facebook_ads__url_report": ["model.ad_reporting.int_ad_reporting__url_report", "test.facebook_ads.not_null_facebook_ads__url_report_base_url.b7757e50be"], "model.facebook_ads.stg_facebook_ads__demographics_region": ["model.facebook_ads.facebook_ads__region_report"], "model.facebook_ads.stg_facebook_ads__basic_ad_action_values": ["model.facebook_ads.int_facebook_ads__conversions"], "model.facebook_ads.stg_facebook_ads__basic_ad": ["model.facebook_ads.facebook_ads__account_report", "model.facebook_ads.facebook_ads__ad_report", "model.facebook_ads.facebook_ads__ad_set_report", "model.facebook_ads.facebook_ads__campaign_report", "model.facebook_ads.facebook_ads__url_report", "test.facebook_ads.not_null_stg_facebook_ads__basic_ad_account_id.d06f6d861b", "test.facebook_ads.not_null_stg_facebook_ads__basic_ad_ad_id.2611b250fc"], "model.facebook_ads.stg_facebook_ads__campaign_history": ["model.facebook_ads.facebook_ads__ad_report", "model.facebook_ads.facebook_ads__ad_set_report", "model.facebook_ads.facebook_ads__campaign_report", "model.facebook_ads.facebook_ads__url_report", "test.facebook_ads.not_null_stg_facebook_ads__campaign_history_campaign_id.1ca7a83852", "test.facebook_ads.not_null_stg_facebook_ads__campaign_history_updated_at.9e59f99270"], "model.facebook_ads.stg_facebook_ads__demographics_region_actions": ["model.facebook_ads.facebook_ads__region_report"], "model.facebook_ads.stg_facebook_ads__ad_set_history": ["model.facebook_ads.facebook_ads__ad_report", "model.facebook_ads.facebook_ads__ad_set_report", "model.facebook_ads.facebook_ads__url_report", "test.facebook_ads.not_null_stg_facebook_ads__ad_set_history_ad_set_id.e19a1df1bb", "test.facebook_ads.not_null_stg_facebook_ads__ad_set_history_updated_at.ef7fafe0fa"], "model.facebook_ads.stg_facebook_ads__account_history": ["model.facebook_ads.facebook_ads__account_report", "model.facebook_ads.facebook_ads__ad_report", "model.facebook_ads.facebook_ads__ad_set_report", "model.facebook_ads.facebook_ads__campaign_report", "model.facebook_ads.facebook_ads__country_report", "model.facebook_ads.facebook_ads__region_report", "model.facebook_ads.facebook_ads__url_report", "test.facebook_ads.not_null_stg_facebook_ads__account_history__fivetran_synced.0570e35e1f", "test.facebook_ads.not_null_stg_facebook_ads__account_history_account_id.f1cf38c40f"], "model.facebook_ads.stg_facebook_ads__creative_history": ["model.facebook_ads.facebook_ads__url_tags", "model.facebook_ads.int_facebook_ads__creative_history", "test.facebook_ads.not_null_stg_facebook_ads__creative_history__fivetran_synced.3b0593cb4f", "test.facebook_ads.not_null_stg_facebook_ads__creative_history_creative_id.eb4d804261"], "model.facebook_ads.stg_facebook_ads__basic_ad_actions": ["model.facebook_ads.int_facebook_ads__conversions"], "model.facebook_ads.stg_facebook_ads__demographics_country_actions": ["model.facebook_ads.facebook_ads__country_report"], "model.facebook_ads.stg_facebook_ads__demographics_country": ["model.facebook_ads.facebook_ads__country_report"], "model.facebook_ads.stg_facebook_ads__ad_history": ["model.facebook_ads.facebook_ads__ad_report", "model.facebook_ads.facebook_ads__ad_set_report", "model.facebook_ads.facebook_ads__campaign_report", "model.facebook_ads.facebook_ads__url_report", "test.facebook_ads.not_null_stg_facebook_ads__ad_history_ad_id.11429d3064", "test.facebook_ads.not_null_stg_facebook_ads__ad_history_updated_at.250a5a84e4"], "model.facebook_ads.stg_facebook_ads__ad_history_tmp": ["model.facebook_ads.stg_facebook_ads__ad_history"], "model.facebook_ads.stg_facebook_ads__campaign_history_tmp": ["model.facebook_ads.stg_facebook_ads__campaign_history"], "model.facebook_ads.stg_facebook_ads__demographics_country_actions_tmp": ["model.facebook_ads.stg_facebook_ads__demographics_country_actions"], "model.facebook_ads.stg_facebook_ads__demographics_region_actions_tmp": ["model.facebook_ads.stg_facebook_ads__demographics_region_actions"], "model.facebook_ads.stg_facebook_ads__basic_ad_actions_tmp": ["model.facebook_ads.stg_facebook_ads__basic_ad_actions"], "model.facebook_ads.stg_facebook_ads__basic_ad_action_values_tmp": ["model.facebook_ads.stg_facebook_ads__basic_ad_action_values"], "model.facebook_ads.stg_facebook_ads__ad_set_history_tmp": ["model.facebook_ads.stg_facebook_ads__ad_set_history"], "model.facebook_ads.stg_facebook_ads__demographics_region_tmp": ["model.facebook_ads.stg_facebook_ads__demographics_region"], "model.facebook_ads.stg_facebook_ads__creative_history_tmp": ["model.facebook_ads.stg_facebook_ads__creative_history"], "model.facebook_ads.stg_facebook_ads__basic_ad_tmp": ["model.facebook_ads.stg_facebook_ads__basic_ad"], "model.facebook_ads.stg_facebook_ads__account_history_tmp": ["model.facebook_ads.stg_facebook_ads__account_history"], "model.facebook_ads.stg_facebook_ads__demographics_country_tmp": ["model.facebook_ads.stg_facebook_ads__demographics_country"], "model.facebook_ads.int_facebook_ads__creative_history": ["model.facebook_ads.facebook_ads__url_report"], "model.facebook_ads.int_facebook_ads__conversions": ["model.facebook_ads.facebook_ads__account_report", "model.facebook_ads.facebook_ads__ad_report", "model.facebook_ads.facebook_ads__ad_set_report", "model.facebook_ads.facebook_ads__campaign_report", "model.facebook_ads.facebook_ads__url_report"], "test.linkedin.not_null_linkedin_ads__account_report_account_id.0c34ea1842": [], "test.linkedin.not_null_linkedin_ads__account_report_date_day.c4b33f8f53": [], "test.linkedin.not_null_linkedin_ads__campaign_report_date_day.8d320b88b1": [], "test.linkedin.not_null_linkedin_ads__campaign_report_campaign_id.bf43964b15": [], "test.linkedin.not_null_linkedin_ads__campaign_group_report_date_day.2676a1f76b": [], "test.linkedin.not_null_linkedin_ads__campaign_group_report_campaign_group_id.39b448cdaf": [], "test.linkedin.not_null_linkedin_ads__creative_report_date_day.0c6338b020": [], "test.linkedin.not_null_linkedin_ads__creative_report_creative_id.096d93f889": [], "test.linkedin.not_null_linkedin_ads__url_report_date_day.48b540f315": [], "test.linkedin.not_null_linkedin_ads__url_report_creative_id.83967fe9d2": [], "test.linkedin.not_null_linkedin_ads__url_report_click_uri.81534087cb": [], "test.linkedin.not_null_linkedin_ads__monthly_campaign_country_report_date_month.ab0a8d3050": [], "test.linkedin.not_null_linkedin_ads__monthly_campaign_country_report_campaign_id.4624641c1c": [], "test.linkedin.not_null_linkedin_ads__monthly_campaign_region_report_date_month.4fd809085e": [], "test.linkedin.not_null_linkedin_ads__monthly_campaign_region_report_campaign_id.5884bc5d68": [], "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_creative_creative_id.062abfe14b": [], "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_creative_date_day.cb81bc4766": [], "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_campaign_campaign_id.d6ae242f1a": [], "test.linkedin.not_null_stg_linkedin_ads__ad_analytics_by_campaign_date_day.ef97bed766": [], "test.linkedin.not_null_stg_linkedin_ads__creative_history_creative_id.4d51d55474": [], "test.linkedin.not_null_stg_linkedin_ads__campaign_history_campaign_id.b026971ca2": [], "test.linkedin.not_null_stg_linkedin_ads__campaign_history_version_tag.64954cc469": [], "test.linkedin.not_null_stg_linkedin_ads__campaign_group_history_campaign_group_id.3888f3777d": [], "test.linkedin.not_null_stg_linkedin_ads__campaign_group_history_last_modified_at.a716e2a7ea": [], "test.linkedin.not_null_stg_linkedin_ads__account_history_account_id.a9fa7f93c0": [], "test.linkedin.not_null_stg_linkedin_ads__account_history_version_tag.58c46c5d81": [], "test.linkedin.not_null_stg_linkedin_ads__geo_geo_id.a9fc61210c": [], "test.linkedin.not_null_stg_linkedin_ads__monthly_ad_analytics_by_country_date_month.553fe89e70": [], "test.linkedin.not_null_stg_linkedin_ads__monthly_ad_analytics_by_region_date_month.d065ed2b78": [], "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_ad_group_id.60febec6b5": [], "test.apple_search_ads.not_null_apple_search_ads__ad_group_report_date_day.e6ffb30b3c": [], "test.apple_search_ads.not_null_apple_search_ads__ad_report_ad_id.0ab2c5075c": [], "test.apple_search_ads.not_null_apple_search_ads__ad_report_date_day.b86c049e17": [], "test.apple_search_ads.not_null_apple_search_ads__campaign_report_campaign_id.e26ed1e146": [], "test.apple_search_ads.not_null_apple_search_ads__campaign_report_date_day.35652b8d1a": [], "test.apple_search_ads.not_null_apple_search_ads__keyword_report_keyword_id.ea493710db": [], "test.apple_search_ads.not_null_apple_search_ads__keyword_report_date_day.3dec8d0e82": [], "test.apple_search_ads.not_null_apple_search_ads__organization_report_organization_id.b6cf7d69f8": [], "test.apple_search_ads.not_null_apple_search_ads__organization_report_date_day.5784fed523": [], "test.apple_search_ads.not_null_apple_search_ads__search_term_report_date_day.1bc3b0d57c": [], "test.apple_search_ads.not_null_apple_search_ads__search_term_report_search_term_text.aecc7447f7": [], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_history_modified_at.e5d65fa28f": [], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_history_ad_group_id.dc128eecb7": [], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_report_ad_group_id.a115f9cfc1": [], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_group_report_date_day.4dfd46a43b": [], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_history_modified_at.2eea7e006d": [], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_history_ad_id.4ad3bde32a": [], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_date_day.e6252346d8": [], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_ad_group_id.a397755e9f": [], "test.apple_search_ads.not_null_stg_apple_search_ads__ad_report_ad_id.d08e760c58": [], "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_history_modified_at.f34a7a97c9": [], "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_history_campaign_id.3f0f7502b8": [], "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_report_campaign_id.b83941e728": [], "test.apple_search_ads.not_null_stg_apple_search_ads__campaign_report_date_day.c8dc10a6f3": [], "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_history_modified_at.42fde5a287": [], "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_history_keyword_id.889f83cfd2": [], "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_report_keyword_id.501725b09e": [], "test.apple_search_ads.not_null_stg_apple_search_ads__keyword_report_date_day.16098db928": [], "test.apple_search_ads.not_null_stg_apple_search_ads__organization_organization_id.b013ce33cb": [], "test.apple_search_ads.not_null_stg_apple_search_ads__search_term_report__fivetran_id.aa430d1dad": [], "test.apple_search_ads.not_null_stg_apple_search_ads__search_term_report_date_day.fd93df3302": [], "test.reddit_ads.not_null_reddit_ads__account_report_date_day.7b43e6cb90": [], "test.reddit_ads.not_null_reddit_ads__account_report_account_id.16f11188c5": [], "test.reddit_ads.not_null_reddit_ads__ad_group_report_date_day.6463e6f6f7": [], "test.reddit_ads.not_null_reddit_ads__ad_group_report_ad_group_id.057bd60604": [], "test.reddit_ads.not_null_reddit_ads__ad_report_date_day.608b21c69a": [], "test.reddit_ads.not_null_reddit_ads__ad_report_ad_id.1da054a14e": [], "test.reddit_ads.not_null_reddit_ads__campaign_report_date_day.f79cca4131": [], "test.reddit_ads.not_null_reddit_ads__campaign_report_campaign_id.f5491a0b49": [], "test.reddit_ads.not_null_reddit_ads__url_report_date_day.4b0f6363da": [], "test.reddit_ads.not_null_reddit_ads__url_report_ad_id.8ff83da2b0": [], "test.reddit_ads.not_null_reddit_ads__url_report_base_url.2f585bebcb": [], "test.reddit_ads.not_null_stg_reddit_ads__account_account_id.512f0b8078": [], "test.reddit_ads.not_null_stg_reddit_ads__account_report_account_id.1f2a0195de": [], "test.reddit_ads.not_null_stg_reddit_ads__ad_ad_id.40188b63dd": [], "test.reddit_ads.not_null_stg_reddit_ads__ad_report_ad_id.c4af84b857": [], "test.reddit_ads.not_null_stg_reddit_ads__ad_group_ad_group_id.65795d8dc2": [], "test.reddit_ads.not_null_stg_reddit_ads__ad_group_report_ad_group_id.9836cd084d": [], "test.reddit_ads.not_null_stg_reddit_ads__campaign_campaign_id.f3f24e4682": [], "test.reddit_ads.not_null_stg_reddit_ads__campaign_report_campaign_id.c717612b4f": [], "test.snapchat_ads.not_null_snapchat_ads__account_report_date_day.688d7ed260": [], "test.snapchat_ads.not_null_snapchat_ads__account_report_ad_account_id.589c81966b": [], "test.snapchat_ads.not_null_snapchat_ads__ad_report_date_day.7c5350c8fe": [], "test.snapchat_ads.not_null_snapchat_ads__ad_report_ad_id.9000850744": [], "test.snapchat_ads.not_null_snapchat_ads__campaign_report_date_day.4e4e31223b": [], "test.snapchat_ads.not_null_snapchat_ads__campaign_report_campaign_id.19fd7135ac": [], "test.snapchat_ads.not_null_snapchat_ads__ad_squad_report_date_day.39118ca639": [], "test.snapchat_ads.not_null_snapchat_ads__ad_squad_report_ad_squad_id.424c0bbffe": [], "test.snapchat_ads.not_null_snapchat_ads__url_report_date_day.bcbe87a7f6": [], "test.snapchat_ads.not_null_snapchat_ads__url_report_ad_id.ecbdfc0d78": [], "test.snapchat_ads.not_null_snapchat_ads__url_report_base_url.15676dc1de": [], "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_date_day.b946d6ae47": [], "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_campaign_id.33fe016201": [], "test.snapchat_ads.not_null_snapchat_ads__campaign_country_report_country.332a585832": [], "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_date_day.3d3ad303c4": [], "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_campaign_id.9b92b4f074": [], "test.snapchat_ads.not_null_snapchat_ads__campaign_region_report_region.041579919a": [], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_account_history__fivetran_synced.2d5dd77824": [], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_account_history_ad_account_id.426d71d605": [], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_history__fivetran_synced.1607c70fda": [], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_history_ad_id.e9d367fd15": [], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_hourly_report_ad_id.7e763de19d": [], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_hourly_report_date_hour.666cda1cd7": [], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_history__fivetran_synced.7ed7d105ae": [], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_history_ad_squad_id.71c7122278": [], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_hourly_report_ad_squad_id.ab16aa72c9": [], "test.snapchat_ads.not_null_stg_snapchat_ads__ad_squad_hourly_report_date_hour.6f0b63a9cb": [], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_history__fivetran_synced.55bc48b3ec": [], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_history_campaign_id.f74a0fb8c0": [], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_hourly_report_campaign_id.f255c38a3e": [], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_hourly_report_date_hour.0bc4218ac8": [], "test.snapchat_ads.not_null_stg_snapchat_ads__creative_history__fivetran_synced.b9c95b4380": [], "test.snapchat_ads.not_null_stg_snapchat_ads__creative_history_creative_id.09c83690f4": [], "test.snapchat_ads.not_null_stg_snapchat_ads__creative_url_tag_history_creative_id.7ff6bb9c1b": [], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_campaign_id.1b07be54fe": [], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_country.34db53b159": [], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_country_daily_report_date_day.d3d7dd7af1": [], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_campaign_id.99fbccb78d": [], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_region.44327f07bf": [], "test.snapchat_ads.not_null_stg_snapchat_ads__campaign_geo_region_daily_report_date_day.eec50e6826": [], "test.pinterest.not_null_pinterest_ads__url_report_date_day.b09048037e": [], "test.pinterest.not_null_pinterest_ads__url_report_destination_url.0bb7f30502": [], "test.pinterest.not_null_pinterest_ads__url_report_pin_promotion_id.0da711ad6a": [], "test.pinterest.not_null_pinterest_ads__ad_group_report_date_day.ed7c27b8a7": [], "test.pinterest.not_null_pinterest_ads__ad_group_report_ad_group_id.134f9ac6c2": [], "test.pinterest.not_null_pinterest_ads__campaign_report_date_day.10ac8272bf": [], "test.pinterest.not_null_pinterest_ads__campaign_report_campaign_id.8001ea60f2": [], "test.pinterest.not_null_pinterest_ads__advertiser_report_date_day.aedeceeeca": [], "test.pinterest.not_null_pinterest_ads__advertiser_report_advertiser_id.13380f0672": [], "test.pinterest.not_null_pinterest_ads__keyword_report_date_day.23130e9fba": [], "test.pinterest.not_null_pinterest_ads__keyword_report_keyword_id.0d73460198": [], "test.pinterest.not_null_pinterest_ads__pin_promotion_report_date_day.3128d28cfd": [], "test.pinterest.not_null_pinterest_ads__pin_promotion_report_pin_promotion_id.2540e0a561": [], "test.pinterest.not_null_pinterest_ads__campaign_country_report_date_day.a9da473d38": [], "test.pinterest.not_null_pinterest_ads__campaign_country_report_campaign_id.9b1d309d2b": [], "test.pinterest.not_null_pinterest_ads__campaign_region_report_date_day.e81588bc6e": [], "test.pinterest.not_null_pinterest_ads__campaign_region_report_campaign_id.1a64423d71": [], "test.pinterest.not_null_stg_pinterest_ads__ad_group_history_ad_group_id.220c6220be": [], "test.pinterest.not_null_stg_pinterest_ads__campaign_history_campaign_id.60cb10d341": [], "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_history_pin_promotion_id.171995cd34": [], "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_report_date_day.ed272212a1": [], "test.pinterest.not_null_stg_pinterest_ads__pin_promotion_report_pin_promotion_id.9c3c9f71ab": [], "test.pinterest.not_null_stg_pinterest_ads__ad_group_report_date_day.80e8904c4c": [], "test.pinterest.not_null_stg_pinterest_ads__ad_group_report_ad_group_id.bb8cf3c471": [], "test.pinterest.not_null_stg_pinterest_ads__advertiser_history_advertiser_id.7d24f665fb": [], "test.pinterest.not_null_stg_pinterest_ads__advertiser_report_date_day.153bd03c95": [], "test.pinterest.not_null_stg_pinterest_ads__advertiser_report_advertiser_id.1b16ed73ff": [], "test.pinterest.not_null_stg_pinterest_ads__campaign_report_date_day.7ef5fb1238": [], "test.pinterest.not_null_stg_pinterest_ads__campaign_report_campaign_id.a287eba0fc": [], "test.pinterest.not_null_stg_pinterest_ads__keyword_history_keyword_id.246889377a": [], "test.pinterest.not_null_stg_pinterest_ads__keyword_report_date_day.9937216300": [], "test.pinterest.not_null_stg_pinterest_ads__keyword_report_keyword_id.5f00679c48": [], "test.google_ads.not_null_google_ads__url_report_base_url.e3578c0f72": [], "test.google_ads.not_null_google_ads__account_report_account_id.abb0985422": [], "test.google_ads.not_null_google_ads__ad_group_report_ad_group_id.c186523c0c": [], "test.google_ads.not_null_google_ads__ad_report_ad_id.7bd6a287ad": [], "test.google_ads.not_null_google_ads__campaign_report_campaign_id.cc6694fa0e": [], "test.google_ads.not_null_google_ads__keyword_report_criterion_id.4cab66a055": [], "test.google_ads.unique_google_ads__campaign_bid_modifiers_report_bid_modifier_report_key.d68443174a": [], "test.google_ads.not_null_google_ads__campaign_bid_modifiers_report_bid_modifier_report_key.746ae8cfa3": [], "test.google_ads.not_null_google_ads__campaign_bid_modifiers_report_campaign_id.68d212d025": [], "test.google_ads.unique_google_ads__campaign_budget_diagnostics_report_budget_diagnostics_report_key.ca90f632f4": [], "test.google_ads.not_null_google_ads__campaign_budget_diagnostics_report_budget_diagnostics_report_key.c2c4d80aab": [], "test.google_ads.not_null_google_ads__campaign_budget_diagnostics_report_campaign_id.9a579bd702": [], "test.google_ads.not_null_stg_google_ads__account_history_account_id.5ca373f51f": [], "test.google_ads.not_null_stg_google_ads__ad_group_history_ad_group_id.f6c7c939be": [], "test.google_ads.not_null_stg_google_ads__ad_history_ad_id.8c23c38248": [], "test.google_ads.not_null_stg_google_ads__ad_stats_date_day.9a43c0fce4": [], "test.google_ads.not_null_stg_google_ads__ad_stats_ad_id.2612d83cc8": [], "test.google_ads.not_null_stg_google_ads__campaign_history_campaign_id.fa0c825e75": [], "test.google_ads.not_null_stg_google_ads__ad_group_criterion_history_criterion_id.7a0a8b8476": [], "test.google_ads.not_null_stg_google_ads__ad_group_stats_date_day.3c6a221786": [], "test.google_ads.not_null_stg_google_ads__ad_group_stats_ad_group_id.a8d430f077": [], "test.google_ads.not_null_stg_google_ads__campaign_stats_date_day.dc097fd76b": [], "test.google_ads.not_null_stg_google_ads__campaign_stats_campaign_id.11587fa10f": [], "test.google_ads.not_null_stg_google_ads__keyword_stats_date_day.a9da72f74d": [], "test.google_ads.not_null_stg_google_ads__keyword_stats_keyword_id.f0945d6cf0": [], "test.google_ads.not_null_stg_google_ads__account_stats_account_id.2a9da5417b": [], "test.google_ads.not_null_stg_google_ads__account_stats_date_day.57ac8772d5": [], "test.google_ads.not_null_stg_google_ads__search_term_keyword_stats_date_day.3ff55abd88": [], "test.google_ads.not_null_stg_google_ads__search_term_keyword_stats_search_term_id.0019238ba2": [], "test.google_ads.not_null_stg_google_ads__campaign_bid_modifier_history_campaign_id.c7e1e11f33": [], "test.google_ads.not_null_stg_google_ads__campaign_budget_history_campaign_id.730c3d8025": [], "test.google_ads.not_null_stg_google_ads__campaign_criterion_history_criterion_id.ade9d1fdbd": [], "test.google_ads.not_null_stg_google_ads__campaign_bidding_strategy_history_campaign_id.7efbcd0291": [], "test.amazon_ads.not_null_amazon_ads__account_report_profile_id.87fb8dbe66": [], "test.amazon_ads.not_null_amazon_ads__account_report_account_id.83adef7061": [], "test.amazon_ads.not_null_amazon_ads__ad_group_report_ad_group_id.8a23dc123a": [], "test.amazon_ads.not_null_amazon_ads__ad_report_ad_id.93728159b3": [], "test.amazon_ads.not_null_amazon_ads__campaign_report_campaign_id.a9cabadd7c": [], "test.amazon_ads.not_null_amazon_ads__portfolio_report_profile_id.1a910441c6": [], "test.amazon_ads.not_null_amazon_ads__keyword_report_keyword_id.303f680e4a": [], "test.amazon_ads.not_null_amazon_ads__search_report_search_term.3c23d4658a": [], "test.amazon_ads.not_null_stg_amazon_ads__ad_group_history_ad_group_id.6b524b990b": [], "test.amazon_ads.not_null_stg_amazon_ads__ad_group_level_report_ad_group_id.ee4ef641c3": [], "test.amazon_ads.not_null_stg_amazon_ads__advertised_product_report_ad_id.307c6bc8d4": [], "test.amazon_ads.not_null_stg_amazon_ads__campaign_history_campaign_id.49e395897c": [], "test.amazon_ads.not_null_stg_amazon_ads__campaign_level_report_campaign_id.1efec68194": [], "test.amazon_ads.not_null_stg_amazon_ads__keyword_history_keyword_id.f21f6add6e": [], "test.amazon_ads.not_null_stg_amazon_ads__portfolio_history_portfolio_id.e22bb2ba02": [], "test.amazon_ads.not_null_stg_amazon_ads__product_ad_history_ad_id.8744ab1cd8": [], "test.amazon_ads.not_null_stg_amazon_ads__profile_profile_id.bd192c102b": [], "test.amazon_ads.not_null_stg_amazon_ads__targeting_keyword_report_keyword_id.101a3299d7": [], "test.amazon_ads.not_null_stg_amazon_ads__search_term_ad_keyword_report_search_term.ef04af3b06": [], "test.twitter_ads.not_null_twitter_ads__campaign_report_campaign_id.03b1c451b8": [], "test.twitter_ads.not_null_twitter_ads__campaign_report_date_day.2b30b279b0": [], "test.twitter_ads.not_null_twitter_ads__campaign_report_placement.c66d252e82": [], "test.twitter_ads.not_null_twitter_ads__line_item_report_date_day.86c934e8ce": [], "test.twitter_ads.not_null_twitter_ads__line_item_report_line_item_id.0462d58211": [], "test.twitter_ads.not_null_twitter_ads__line_item_report_placement.f103369312": [], "test.twitter_ads.not_null_twitter_ads__account_report_date_day.84896c5846": [], "test.twitter_ads.not_null_twitter_ads__account_report_placement.157dcb6194": [], "test.twitter_ads.not_null_twitter_ads__account_report_account_id.90d5808908": [], "test.twitter_ads.not_null_twitter_ads__keyword_report_date_day.e0ce90c1ec": [], "test.twitter_ads.not_null_twitter_ads__keyword_report_keyword_id.91efa0a538": [], "test.twitter_ads.not_null_twitter_ads__promoted_tweet_report_placement.d89c9b27e5": [], "test.twitter_ads.not_null_twitter_ads__promoted_tweet_report_promoted_tweet_id.5df08e154e": [], "test.twitter_ads.not_null_twitter_ads__url_report_date_day.33fcb7e04b": [], "test.twitter_ads.not_null_twitter_ads__url_report_placement.92ca3b192e": [], "test.twitter_ads.not_null_twitter_ads__url_report_promoted_tweet_id.d690f99143": [], "test.twitter_ads.not_null_twitter_ads__url_report_base_url.dfd7ab549e": [], "test.twitter_ads.not_null_twitter_ads__campaign_country_report_campaign_id.d08c7d25a2": [], "test.twitter_ads.not_null_twitter_ads__campaign_country_report_date_day.33eabfbcaa": [], "test.twitter_ads.not_null_twitter_ads__campaign_country_report_placement.3a4c65b9c5": [], "test.twitter_ads.not_null_twitter_ads__campaign_region_report_campaign_id.c06b8be032": [], "test.twitter_ads.not_null_twitter_ads__campaign_region_report_date_day.884ad86a28": [], "test.twitter_ads.not_null_twitter_ads__campaign_region_report_placement.e6fb374bf5": [], "test.twitter_ads.not_null_stg_twitter_ads__account_history_account_id.66fb3601e2": [], "test.twitter_ads.not_null_stg_twitter_ads__campaign_history_campaign_id.51218487ce": [], "test.twitter_ads.not_null_stg_twitter_ads__line_item_history_line_item_id.2cef040809": [], "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_history_promoted_tweet_id.f447a1cd09": [], "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_date_day.c4c46a5894": [], "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_promoted_tweet_id.6028694598": [], "test.twitter_ads.not_null_stg_twitter_ads__promoted_tweet_report_placement.c1b1f648b3": [], "test.twitter_ads.not_null_stg_twitter_ads__tweet_url_index.e998fb67be": [], "test.twitter_ads.not_null_stg_twitter_ads__tweet_url_tweet_id.f7e1670218": [], "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_date_day.053c09786c": [], "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_campaign_id.a63b62981f": [], "test.twitter_ads.not_null_stg_twitter_ads__campaign_report_placement.5067d8c4f4": [], "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_date_day.0f4d8cc8fe": [], "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_line_item_id.9f5a4860b7": [], "test.twitter_ads.not_null_stg_twitter_ads__line_item_report_placement.cd7e77e0eb": [], "test.twitter_ads.not_null_stg_twitter_ads__line_item_keywords_report_keyword_id.e5f015e9ec": [], "test.twitter_ads.not_null_stg_twitter_ads__line_item_keywords_report_date_day.c7e7155b13": [], "test.twitter_ads.not_null_stg_twitter_ads__tweet_tweet_id.a0427f37cd": [], "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_country.8bc44f6e39": [], "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_date_day.bf69378746": [], "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_campaign_id.e1ddc306c2": [], "test.twitter_ads.not_null_stg_twitter_ads__campaign_locations_report_placement.638fb0cf03": [], "test.twitter_ads.not_null_stg_twitter_ads__campaign_regions_report_region.7b8b6fd555": [], "test.twitter_ads.not_null_stg_twitter_ads__campaign_regions_report_date_day.e7f9f99776": [], "test.ad_reporting.not_null_ad_reporting__account_report_account_id.316a64c022": [], "test.ad_reporting.not_null_ad_reporting__ad_group_report_ad_group_id.963e17e842": [], "test.ad_reporting.not_null_ad_reporting__ad_report_ad_id.f3eb210152": [], "test.ad_reporting.not_null_ad_reporting__campaign_report_campaign_id.1cfaa7698b": [], "test.ad_reporting.not_null_ad_reporting__keyword_report_keyword_id.51a45fb334": [], "test.ad_reporting.not_null_ad_reporting__search_report_search_query.ee2f0fcafb": [], "test.ad_reporting.not_null_ad_reporting__url_report_base_url.a29864e5b6": [], "test.tiktok_ads.not_null_tiktok_ads__advertiser_report_date_day.1276998c99": [], "test.tiktok_ads.not_null_tiktok_ads__advertiser_report_advertiser_id.f956c568ce": [], "test.tiktok_ads.not_null_tiktok_ads__ad_report_date_day.d61ee4a5ed": [], "test.tiktok_ads.not_null_tiktok_ads__ad_report_ad_id.2d8166e707": [], "test.tiktok_ads.not_null_tiktok_ads__ad_group_report_date_day.e39164964e": [], "test.tiktok_ads.not_null_tiktok_ads__ad_group_report_ad_group_id.17fb8710f4": [], "test.tiktok_ads.not_null_tiktok_ads__campaign_report_date_day.3807b0e836": [], "test.tiktok_ads.not_null_tiktok_ads__campaign_report_campaign_id.8a2b0c8ef8": [], "test.tiktok_ads.not_null_tiktok_ads__url_report_date_day.d593573eff": [], "test.tiktok_ads.not_null_tiktok_ads__url_report_ad_id.6c41067bd0": [], "test.tiktok_ads.not_null_tiktok_ads__url_report_base_url.37afef2e1b": [], "test.tiktok_ads.not_null_tiktok_ads__campaign_country_report_date_day.c68c1bd379": [], "test.tiktok_ads.not_null_tiktok_ads__campaign_country_report_campaign_id.f439b91d6d": [], "test.tiktok_ads.not_null_stg_tiktok_ads__advertiser_advertiser_id.5deab92def": [], "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_history_ad_group_id.04778d7fad": [], "test.tiktok_ads.not_null_stg_tiktok_ads__ad_history_ad_id.4ffd05b23a": [], "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_history_campaign_id.7f9147d1e1": [], "test.tiktok_ads.not_null_stg_tiktok_ads__ad_report_hourly_ad_id.ee84d783ed": [], "test.tiktok_ads.not_null_stg_tiktok_ads__ad_report_hourly_stat_time_hour.9e2a2dca81": [], "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_report_hourly_ad_group_id.8da17119f1": [], "test.tiktok_ads.not_null_stg_tiktok_ads__ad_group_report_hourly_stat_time_hour.ca4b495127": [], "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_report_hourly_campaign_id.ef898379fb": [], "test.tiktok_ads.not_null_stg_tiktok_ads__campaign_report_hourly_stat_time_hour.e75e13184c": [], "test.microsoft_ads.not_null_microsoft_ads__account_report_account_id.f88e46157e": [], "test.microsoft_ads.not_null_microsoft_ads__ad_group_report_ad_group_id.1974ec5ab9": [], "test.microsoft_ads.not_null_microsoft_ads__ad_report_ad_id.b089709125": [], "test.microsoft_ads.not_null_microsoft_ads__campaign_report_campaign_id.67aa50e1f8": [], "test.microsoft_ads.not_null_microsoft_ads__keyword_report_keyword_id.da1d648d3b": [], "test.microsoft_ads.not_null_microsoft_ads__search_report_search_query.fa3625d66d": [], "test.microsoft_ads.not_null_microsoft_ads__url_report_base_url.c1af50307a": [], "test.microsoft_ads.not_null_microsoft_ads__campaign_country_report_account_id.9d9807033d": [], "test.microsoft_ads.not_null_microsoft_ads__campaign_country_report_campaign_id.10b01e8782": [], "test.microsoft_ads.not_null_microsoft_ads__campaign_region_report_account_id.b3a2b47986": [], "test.microsoft_ads.not_null_microsoft_ads__campaign_region_report_campaign_id.b1d4f5a20f": [], "test.microsoft_ads.not_null_stg_microsoft_ads__account_history_account_id.cc273ee54e": [], "test.microsoft_ads.not_null_stg_microsoft_ads__account_daily_report_account_id.b17f45fe79": [], "test.microsoft_ads.not_null_stg_microsoft_ads__ad_group_history_ad_group_id.c8353342b7": [], "test.microsoft_ads.not_null_stg_microsoft_ads__ad_group_daily_report_ad_group_id.3e03e6eff7": [], "test.microsoft_ads.not_null_stg_microsoft_ads__ad_history_ad_id.6d02c26574": [], "test.microsoft_ads.not_null_stg_microsoft_ads__ad_daily_report_ad_id.1ed6689aa8": [], "test.microsoft_ads.not_null_stg_microsoft_ads__campaign_history_campaign_id.ee080a2122": [], "test.microsoft_ads.not_null_stg_microsoft_ads__campaign_daily_report_campaign_id.8ac0418e84": [], "test.microsoft_ads.not_null_stg_microsoft_ads__keyword_history_keyword_id.19164a6209": [], "test.microsoft_ads.not_null_stg_microsoft_ads__keyword_daily_report_keyword_id.e16b8c5047": [], "test.microsoft_ads.not_null_stg_microsoft_ads__search_daily_report_search_query.57f687adcc": [], "test.facebook_ads.not_null_facebook_ads__url_report_base_url.b7757e50be": [], "test.facebook_ads.not_null_facebook_ads__ad_report_ad_id.3811d9c238": [], "test.facebook_ads.not_null_facebook_ads__ad_set_report_ad_set_id.1ac870f5e4": [], "test.facebook_ads.not_null_facebook_ads__campaign_report_campaign_id.d4f96d8d21": [], "test.facebook_ads.not_null_facebook_ads__account_report_account_id.9be02b4024": [], "test.facebook_ads.not_null_facebook_ads__url_tags__fivetran_id.151d9515f3": [], "test.facebook_ads.not_null_stg_facebook_ads__account_history_account_id.f1cf38c40f": [], "test.facebook_ads.not_null_stg_facebook_ads__account_history__fivetran_synced.0570e35e1f": [], "test.facebook_ads.not_null_stg_facebook_ads__ad_history_ad_id.11429d3064": [], "test.facebook_ads.not_null_stg_facebook_ads__ad_history_updated_at.250a5a84e4": [], "test.facebook_ads.not_null_stg_facebook_ads__ad_set_history_ad_set_id.e19a1df1bb": [], "test.facebook_ads.not_null_stg_facebook_ads__ad_set_history_updated_at.ef7fafe0fa": [], "test.facebook_ads.not_null_stg_facebook_ads__campaign_history_campaign_id.1ca7a83852": [], "test.facebook_ads.not_null_stg_facebook_ads__campaign_history_updated_at.9e59f99270": [], "test.facebook_ads.not_null_stg_facebook_ads__creative_history__fivetran_synced.3b0593cb4f": [], "test.facebook_ads.not_null_stg_facebook_ads__creative_history_creative_id.eb4d804261": [], "test.facebook_ads.not_null_stg_facebook_ads__basic_ad_ad_id.2611b250fc": [], "test.facebook_ads.not_null_stg_facebook_ads__basic_ad_account_id.d06f6d861b": [], "source.linkedin.linkedin_ads.ad_analytics_by_creative": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_creative_tmp"], "source.linkedin.linkedin_ads.creative_history": ["model.linkedin.stg_linkedin_ads__creative_history_tmp"], "source.linkedin.linkedin_ads.campaign_history": ["model.linkedin.stg_linkedin_ads__campaign_history_tmp"], "source.linkedin.linkedin_ads.campaign_group_history": ["model.linkedin.stg_linkedin_ads__campaign_group_history_tmp"], "source.linkedin.linkedin_ads.account_history": ["model.linkedin.stg_linkedin_ads__account_history_tmp"], "source.linkedin.linkedin_ads.ad_analytics_by_campaign": ["model.linkedin.stg_linkedin_ads__ad_analytics_by_campaign_tmp"], "source.linkedin.linkedin_ads.geo": ["model.linkedin.stg_linkedin_ads__geo_tmp"], "source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_country": ["model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_country_tmp"], "source.linkedin.linkedin_ads.monthly_ad_analytics_by_member_region": ["model.linkedin.stg_linkedin_ads__monthly_ad_analytics_by_region_tmp"], "source.apple_search_ads.apple_search_ads.ad_group_history": ["model.apple_search_ads.stg_apple_search_ads__ad_group_history_tmp"], "source.apple_search_ads.apple_search_ads.ad_group_report": ["model.apple_search_ads.stg_apple_search_ads__ad_group_report_tmp"], "source.apple_search_ads.apple_search_ads.ad_history": ["model.apple_search_ads.stg_apple_search_ads__ad_history_tmp"], "source.apple_search_ads.apple_search_ads.ad_level_report": ["model.apple_search_ads.stg_apple_search_ads__ad_report_tmp"], "source.apple_search_ads.apple_search_ads.campaign_history": ["model.apple_search_ads.stg_apple_search_ads__campaign_history_tmp"], "source.apple_search_ads.apple_search_ads.campaign_report": ["model.apple_search_ads.stg_apple_search_ads__campaign_report_tmp"], "source.apple_search_ads.apple_search_ads.keyword_history": ["model.apple_search_ads.stg_apple_search_ads__keyword_history_tmp"], "source.apple_search_ads.apple_search_ads.keyword_report": ["model.apple_search_ads.stg_apple_search_ads__keyword_report_tmp"], "source.apple_search_ads.apple_search_ads.organization": ["model.apple_search_ads.stg_apple_search_ads__organization_tmp"], "source.apple_search_ads.apple_search_ads.search_term_report": ["model.apple_search_ads.stg_apple_search_ads__search_term_report_tmp"], "source.reddit_ads.reddit_ads.business_account": ["model.reddit_ads.stg_reddit_ads__account_tmp"], "source.reddit_ads.reddit_ads.account_report": ["model.reddit_ads.stg_reddit_ads__account_report_tmp"], "source.reddit_ads.reddit_ads.ad": ["model.reddit_ads.stg_reddit_ads__ad_tmp"], "source.reddit_ads.reddit_ads.ad_report": ["model.reddit_ads.stg_reddit_ads__ad_report_tmp"], "source.reddit_ads.reddit_ads.ad_group": ["model.reddit_ads.stg_reddit_ads__ad_group_tmp"], "source.reddit_ads.reddit_ads.ad_group_report": ["model.reddit_ads.stg_reddit_ads__ad_group_report_tmp"], "source.reddit_ads.reddit_ads.campaign": ["model.reddit_ads.stg_reddit_ads__campaign_tmp"], "source.reddit_ads.reddit_ads.campaign_report": ["model.reddit_ads.stg_reddit_ads__campaign_report_tmp"], "source.reddit_ads.reddit_ads.account_conversions_report": ["model.reddit_ads.stg_reddit_ads__account_conversions_report_tmp"], "source.reddit_ads.reddit_ads.ad_group_conversions_report": ["model.reddit_ads.stg_reddit_ads__ad_group_conversions_report_tmp"], "source.reddit_ads.reddit_ads.ad_conversions_report": ["model.reddit_ads.stg_reddit_ads__ad_conversions_report_tmp"], "source.reddit_ads.reddit_ads.campaign_conversions_report": ["model.reddit_ads.stg_reddit_ads__campaign_conversions_report_tmp"], "source.reddit_ads.reddit_ads.campaign_country_report": ["model.reddit_ads.stg_reddit_ads__campaign_country_report_tmp"], "source.reddit_ads.reddit_ads.campaign_country_conversions_report": ["model.reddit_ads.stg_reddit_ads__campaign_country_conversions_report_tmp"], "source.snapchat_ads.snapchat_ads.ad_account_history": ["model.snapchat_ads.stg_snapchat_ads__ad_account_history_tmp"], "source.snapchat_ads.snapchat_ads.ad_history": ["model.snapchat_ads.stg_snapchat_ads__ad_history_tmp"], "source.snapchat_ads.snapchat_ads.ad_hourly_report": ["model.snapchat_ads.stg_snapchat_ads__ad_hourly_report_tmp"], "source.snapchat_ads.snapchat_ads.ad_squad_history": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_history_tmp"], "source.snapchat_ads.snapchat_ads.ad_squad_hourly_report": ["model.snapchat_ads.stg_snapchat_ads__ad_squad_hourly_report_tmp"], "source.snapchat_ads.snapchat_ads.campaign_history": ["model.snapchat_ads.stg_snapchat_ads__campaign_history_tmp"], "source.snapchat_ads.snapchat_ads.campaign_hourly_report": ["model.snapchat_ads.stg_snapchat_ads__campaign_hourly_report_tmp"], "source.snapchat_ads.snapchat_ads.creative_history": ["model.snapchat_ads.stg_snapchat_ads__creative_history_tmp"], "source.snapchat_ads.snapchat_ads.creative_url_tag_history": ["model.snapchat_ads.stg_snapchat_ads__creative_url_tag_history_tmp"], "source.snapchat_ads.snapchat_ads.campaign_geo_country_daily_report": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_country_daily_report_tmp"], "source.snapchat_ads.snapchat_ads.campaign_geo_region_daily_report": ["model.snapchat_ads.stg_snapchat_ads__campaign_geo_region_daily_report_tmp"], "source.pinterest.pinterest_ads.pin_promotion_report": ["model.pinterest.stg_pinterest_ads__pin_promotion_report_tmp"], "source.pinterest.pinterest_ads.pin_promotion_history": ["model.pinterest.stg_pinterest_ads__pin_promotion_history_tmp"], "source.pinterest.pinterest_ads.campaign_history": ["model.pinterest.stg_pinterest_ads__campaign_history_tmp"], "source.pinterest.pinterest_ads.ad_group_history": ["model.pinterest.stg_pinterest_ads__ad_group_history_tmp"], "source.pinterest.pinterest_ads.ad_group_report": ["model.pinterest.stg_pinterest_ads__ad_group_report_tmp"], "source.pinterest.pinterest_ads.advertiser_history": ["model.pinterest.stg_pinterest_ads__advertiser_history_tmp"], "source.pinterest.pinterest_ads.advertiser_report": ["model.pinterest.stg_pinterest_ads__advertiser_report_tmp"], "source.pinterest.pinterest_ads.campaign_report": ["model.pinterest.stg_pinterest_ads__campaign_report_tmp"], "source.pinterest.pinterest_ads.keyword_history": ["model.pinterest.stg_pinterest_ads__keyword_history_tmp"], "source.pinterest.pinterest_ads.keyword_report": ["model.pinterest.stg_pinterest_ads__keyword_report_tmp"], "source.pinterest.pinterest_ads.pin_promotion_targeting_report": ["model.pinterest.stg_pinterest_ads__pin_promotion_targeting_report_tmp"], "source.pinterest.pinterest_ads.targeting_geo": ["model.pinterest.stg_pinterest_ads__targeting_geo_tmp"], "source.pinterest.pinterest_ads.targeting_geo_region": ["model.pinterest.stg_pinterest_ads__targeting_geo_region_tmp"], "source.google_ads.google_ads.ad_stats": ["model.google_ads.stg_google_ads__ad_stats_tmp"], "source.google_ads.google_ads.ad_history": ["model.google_ads.stg_google_ads__ad_history_tmp"], "source.google_ads.google_ads.ad_group_history": ["model.google_ads.stg_google_ads__ad_group_history_tmp"], "source.google_ads.google_ads.campaign_history": ["model.google_ads.stg_google_ads__campaign_history_tmp"], "source.google_ads.google_ads.account_history": ["model.google_ads.stg_google_ads__account_history_tmp"], "source.google_ads.google_ads.ad_group_criterion_history": ["model.google_ads.stg_google_ads__ad_group_criterion_history_tmp"], "source.google_ads.google_ads.ad_group_stats": ["model.google_ads.stg_google_ads__ad_group_stats_tmp"], "source.google_ads.google_ads.campaign_stats": ["model.google_ads.stg_google_ads__campaign_stats_tmp"], "source.google_ads.google_ads.keyword_stats": ["model.google_ads.stg_google_ads__keyword_stats_tmp"], "source.google_ads.google_ads.account_stats": ["model.google_ads.stg_google_ads__account_stats_tmp"], "source.google_ads.google_ads.search_term_keyword_stats": ["model.google_ads.stg_google_ads__search_term_keyword_stats_tmp"], "source.google_ads.google_ads.campaign_bid_modifier_history": ["model.google_ads.stg_google_ads__campaign_bid_modifier_history_tmp"], "source.google_ads.google_ads.campaign_budget_history": ["model.google_ads.stg_google_ads__campaign_budget_history_tmp"], "source.google_ads.google_ads.campaign_criterion_history": ["model.google_ads.stg_google_ads__campaign_criterion_history_tmp"], "source.google_ads.google_ads.campaign_bidding_strategy_history": ["model.google_ads.stg_google_ads__campaign_bidding_strategy_history_tmp"], "source.amazon_ads.amazon_ads.ad_group_history": ["model.amazon_ads.stg_amazon_ads__ad_group_history_tmp"], "source.amazon_ads.amazon_ads.ad_group_level_report": ["model.amazon_ads.stg_amazon_ads__ad_group_level_report_tmp"], "source.amazon_ads.amazon_ads.advertised_product_report": ["model.amazon_ads.stg_amazon_ads__advertised_product_report_tmp"], "source.amazon_ads.amazon_ads.campaign_history": ["model.amazon_ads.stg_amazon_ads__campaign_history_tmp"], "source.amazon_ads.amazon_ads.campaign_level_report": ["model.amazon_ads.stg_amazon_ads__campaign_level_report_tmp"], "source.amazon_ads.amazon_ads.keyword_history": ["model.amazon_ads.stg_amazon_ads__keyword_history_tmp"], "source.amazon_ads.amazon_ads.portfolio_history": ["model.amazon_ads.stg_amazon_ads__portfolio_history_tmp"], "source.amazon_ads.amazon_ads.product_ad_history": ["model.amazon_ads.stg_amazon_ads__product_ad_history_tmp"], "source.amazon_ads.amazon_ads.profile": ["model.amazon_ads.stg_amazon_ads__profile_tmp"], "source.amazon_ads.amazon_ads.targeting_keyword_report": ["model.amazon_ads.stg_amazon_ads__targeting_keyword_report_tmp"], "source.amazon_ads.amazon_ads.search_term_ad_keyword_report": ["model.amazon_ads.stg_amazon_ads__search_term_ad_keyword_report_tmp"], "source.twitter_ads.twitter_ads.account_history": ["model.twitter_ads.stg_twitter_ads__account_history_tmp"], "source.twitter_ads.twitter_ads.campaign_history": ["model.twitter_ads.stg_twitter_ads__campaign_history_tmp"], "source.twitter_ads.twitter_ads.line_item_history": ["model.twitter_ads.stg_twitter_ads__line_item_history_tmp"], "source.twitter_ads.twitter_ads.promoted_tweet_history": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_history_tmp"], "source.twitter_ads.twitter_ads.tweet_url": ["model.twitter_ads.stg_twitter_ads__tweet_url_tmp"], "source.twitter_ads.twitter_ads.promoted_tweet_report": ["model.twitter_ads.stg_twitter_ads__promoted_tweet_report_tmp"], "source.twitter_ads.twitter_ads.tweet": ["model.twitter_ads.stg_twitter_ads__tweet_tmp"], "source.twitter_ads.twitter_ads.campaign_report": ["model.twitter_ads.stg_twitter_ads__campaign_report_tmp"], "source.twitter_ads.twitter_ads.line_item_report": ["model.twitter_ads.stg_twitter_ads__line_item_report_tmp"], "source.twitter_ads.twitter_ads.line_item_keywords_report": ["model.twitter_ads.stg_twitter_ads__line_item_keywords_report_tmp"], "source.twitter_ads.twitter_ads.campaign_locations_report": ["model.twitter_ads.stg_twitter_ads__campaign_locations_report_tmp"], "source.twitter_ads.twitter_ads.campaign_regions_report": ["model.twitter_ads.stg_twitter_ads__campaign_regions_report_tmp"], "source.tiktok_ads.tiktok_ads.advertiser": ["model.tiktok_ads.stg_tiktok_ads__advertiser_tmp"], "source.tiktok_ads.tiktok_ads.campaign_history": ["model.tiktok_ads.stg_tiktok_ads__campaign_history_tmp"], "source.tiktok_ads.tiktok_ads.adgroup_history": ["model.tiktok_ads.stg_tiktok_ads__ad_group_history_tmp"], "source.tiktok_ads.tiktok_ads.ad_history": ["model.tiktok_ads.stg_tiktok_ads__ad_history_tmp"], "source.tiktok_ads.tiktok_ads.ad_report_hourly": ["model.tiktok_ads.stg_tiktok_ads__ad_report_hourly_tmp"], "source.tiktok_ads.tiktok_ads.campaign_report_hourly": ["model.tiktok_ads.stg_tiktok_ads__campaign_report_hourly_tmp"], "source.tiktok_ads.tiktok_ads.adgroup_report_hourly": ["model.tiktok_ads.stg_tiktok_ads__ad_group_report_hourly_tmp"], "source.tiktok_ads.tiktok_ads.campaign_country_report": ["model.tiktok_ads.stg_tiktok_ads__campaign_country_report_tmp"], "source.tiktok_ads.tiktok_ads.location": ["model.tiktok_ads.stg_tiktok_ads__location_tmp"], "source.microsoft_ads.microsoft_ads.account_history": ["model.microsoft_ads.stg_microsoft_ads__account_history_tmp"], "source.microsoft_ads.microsoft_ads.account_performance_daily_report": ["model.microsoft_ads.stg_microsoft_ads__account_daily_report_tmp"], "source.microsoft_ads.microsoft_ads.ad_group_history": ["model.microsoft_ads.stg_microsoft_ads__ad_group_history_tmp"], "source.microsoft_ads.microsoft_ads.ad_group_performance_daily_report": ["model.microsoft_ads.stg_microsoft_ads__ad_group_daily_report_tmp"], "source.microsoft_ads.microsoft_ads.ad_history": ["model.microsoft_ads.stg_microsoft_ads__ad_history_tmp"], "source.microsoft_ads.microsoft_ads.ad_performance_daily_report": ["model.microsoft_ads.stg_microsoft_ads__ad_daily_report_tmp"], "source.microsoft_ads.microsoft_ads.campaign_history": ["model.microsoft_ads.stg_microsoft_ads__campaign_history_tmp"], "source.microsoft_ads.microsoft_ads.campaign_performance_daily_report": ["model.microsoft_ads.stg_microsoft_ads__campaign_daily_report_tmp"], "source.microsoft_ads.microsoft_ads.keyword_history": ["model.microsoft_ads.stg_microsoft_ads__keyword_history_tmp"], "source.microsoft_ads.microsoft_ads.keyword_performance_daily_report": ["model.microsoft_ads.stg_microsoft_ads__keyword_daily_report_tmp"], "source.microsoft_ads.microsoft_ads.search_query_performance_daily_report": ["model.microsoft_ads.stg_microsoft_ads__search_daily_report_tmp"], "source.microsoft_ads.microsoft_ads.geographic_performance_daily_report": ["model.microsoft_ads.stg_microsoft_ads__geographic_daily_report_tmp"], "source.facebook_ads.facebook_ads.account_history": ["model.facebook_ads.stg_facebook_ads__account_history_tmp"], "source.facebook_ads.facebook_ads.ad_history": ["model.facebook_ads.stg_facebook_ads__ad_history_tmp"], "source.facebook_ads.facebook_ads.ad_set_history": ["model.facebook_ads.stg_facebook_ads__ad_set_history_tmp"], "source.facebook_ads.facebook_ads.basic_ad": ["model.facebook_ads.stg_facebook_ads__basic_ad_tmp"], "source.facebook_ads.facebook_ads.basic_ad_actions": ["model.facebook_ads.stg_facebook_ads__basic_ad_actions_tmp"], "source.facebook_ads.facebook_ads.basic_ad_action_values": ["model.facebook_ads.stg_facebook_ads__basic_ad_action_values_tmp"], "source.facebook_ads.facebook_ads.campaign_history": ["model.facebook_ads.stg_facebook_ads__campaign_history_tmp"], "source.facebook_ads.facebook_ads.creative_history": ["model.facebook_ads.stg_facebook_ads__creative_history_tmp"], "source.facebook_ads.facebook_ads.demographics_country": ["model.facebook_ads.stg_facebook_ads__demographics_country_tmp"], "source.facebook_ads.facebook_ads.demographics_country_actions": ["model.facebook_ads.stg_facebook_ads__demographics_country_actions_tmp"], "source.facebook_ads.facebook_ads.demographics_region": ["model.facebook_ads.stg_facebook_ads__demographics_region_tmp"], "source.facebook_ads.facebook_ads.demographics_region_actions": ["model.facebook_ads.stg_facebook_ads__demographics_region_actions_tmp"], "metric.ad_reporting.active_ads": [], "metric.ad_reporting.avg_spend_nonzero": [], "metric.ad_reporting.avg_spend": [], "metric.ad_reporting.clicks": ["metric.ad_reporting.bounce_rate", "metric.ad_reporting.clickthrough_rate", "metric.ad_reporting.cost_per_click"], "metric.ad_reporting.impressions": ["metric.ad_reporting.bounce_rate", "metric.ad_reporting.clickthrough_rate"], "metric.ad_reporting.spend": ["metric.ad_reporting.cost_per_click"], "metric.ad_reporting.clickthrough_rate": [], "metric.ad_reporting.cost_per_click": [], "metric.ad_reporting.bounce_rate": [], "semantic_model.ad_reporting.ad_report": ["metric.ad_reporting.active_ads", "metric.ad_reporting.avg_spend", "metric.ad_reporting.avg_spend_nonzero", "metric.ad_reporting.clicks", "metric.ad_reporting.impressions", "metric.ad_reporting.spend"]}, "group_map": {}, "saved_queries": {}, "semantic_models": {"semantic_model.ad_reporting.ad_report": {"name": "ad_report", "resource_type": "semantic_model", "package_name": "ad_reporting", "path": "semantic_models/ad_reporting__ad_report.yml", "original_file_path": "models/semantic_models/ad_reporting__ad_report.yml", "unique_id": "semantic_model.ad_reporting.ad_report", "fqn": ["ad_reporting", "semantic_models", "ad_report"], "model": "ref('ad_reporting__ad_report')", "node_relation": {"alias": "ad_reporting__ad_report", "schema_name": "public_ad_reporting_dev", "database": "postgres", "relation_name": "\"postgres\".\"public_ad_reporting_dev\".\"ad_reporting__ad_report\""}, "description": "Each record represents daily metrics by ad, ad group, campaign and account.", "label": null, "defaults": null, "entities": [], "measures": [{"name": "ad_spend", "agg": "sum", "description": null, "label": null, "create_metric": false, "expr": "spend", "agg_params": null, "non_additive_dimension": null, "agg_time_dimension": "date_day", "config": {"meta": {}}}, {"name": "impressions", "agg": "sum", "description": null, "label": null, "create_metric": false, "expr": "impressions", "agg_params": null, "non_additive_dimension": null, "agg_time_dimension": "date_day", "config": {"meta": {}}}, {"name": "avg_spend", "agg": "average", "description": null, "label": null, "create_metric": false, "expr": "spend", "agg_params": null, "non_additive_dimension": null, "agg_time_dimension": "date_day", "config": {"meta": {}}}, {"name": "clicks", "agg": "sum", "description": null, "label": null, "create_metric": false, "expr": "clicks", "agg_params": null, "non_additive_dimension": null, "agg_time_dimension": "date_day", "config": {"meta": {}}}, {"name": "active_ads", "agg": "count_distinct", "description": null, "label": null, "create_metric": false, "expr": "ad_id", "agg_params": null, "non_additive_dimension": null, "agg_time_dimension": "date_day", "config": {"meta": {}}}, {"name": "avg_spend_nonzero", "agg": "average", "description": null, "label": null, "create_metric": false, "expr": "spend", "agg_params": null, "non_additive_dimension": null, "agg_time_dimension": "date_day", "config": {"meta": {}}}], "dimensions": [{"name": "spend", "type": "categorical", "description": null, "label": null, "is_partition": false, "type_params": null, "expr": null, "metadata": null, "config": {"meta": {}}}, {"name": "account_name", "type": "categorical", "description": null, "label": null, "is_partition": false, "type_params": null, "expr": null, "metadata": null, "config": {"meta": {}}}, {"name": "ad_name", "type": "categorical", "description": null, "label": null, "is_partition": false, "type_params": null, "expr": null, "metadata": null, "config": {"meta": {}}}, {"name": "date_day", "type": "time", "description": null, "label": null, "is_partition": false, "type_params": {"time_granularity": "day", "validity_params": null}, "expr": null, "metadata": null, "config": {"meta": {}}}, {"name": "campaign_name", "type": "categorical", "description": null, "label": null, "is_partition": false, "type_params": null, "expr": null, "metadata": null, "config": {"meta": {}}}, {"name": "campaign_id", "type": "categorical", "description": null, "label": null, "is_partition": false, "type_params": null, "expr": null, "metadata": null, "config": {"meta": {}}}, {"name": "account_id", "type": "categorical", "description": null, "label": null, "is_partition": false, "type_params": null, "expr": null, "metadata": null, "config": {"meta": {}}}, {"name": "ad_id", "type": "categorical", "description": null, "label": null, "is_partition": false, "type_params": null, "expr": null, "metadata": null, "config": {"meta": {}}}, {"name": "platform", "type": "categorical", "description": null, "label": null, "is_partition": false, "type_params": null, "expr": null, "metadata": null, "config": {"meta": {}}}, {"name": "ad_group_id", "type": "categorical", "description": null, "label": null, "is_partition": false, "type_params": null, "expr": null, "metadata": null, "config": {"meta": {}}}, {"name": "ad_group_name", "type": "categorical", "description": null, "label": null, "is_partition": false, "type_params": null, "expr": null, "metadata": null, "config": {"meta": {}}}], "metadata": null, "depends_on": {"macros": [], "nodes": ["model.ad_reporting.ad_reporting__ad_report"]}, "refs": [{"name": "ad_reporting__ad_report", "package": null, "version": null}], "created_at": 1783708223.7421923, "config": {"enabled": true, "group": null, "meta": {}}, "unrendered_config": {}, "primary_entity": "ad", "group": null}}, "unit_tests": {}, "functions": {}} \ No newline at end of file diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index b9fc21d..ae3b625 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -1,5 +1,5 @@ name: 'ad_reporting_integration_tests' -version: '2.7.1' +version: '2.7.2' profile: 'integration_tests' config-version: 2